Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Fri, 21 Jul 2006 19:04:53 +0000 (12:04 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 21 Jul 2006 19:04:53 +0000 (12:04 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (38 commits)
  [SCSI] More buffer->request_buffer changes
  [SCSI] mptfusion: bump version to 3.04.01
  [SCSI] mptfusion: misc fix's
  [SCSI] mptfusion: firmware download boot fix's
  [SCSI] mptfusion: task abort fix's
  [SCSI] mptfusion: sas nexus loss support
  [SCSI] mptfusion: sas loginfo update
  [SCSI] mptfusion: mptctl panic when loading
  [SCSI] mptfusion: sas enclosures with smart drive
  [SCSI] NCR_D700: misc fixes (section and argument ordering)
  [SCSI] scsi_debug: must_check fixes
  [SCSI] scsi_transport_sas: kill the use of channel
  [SCSI] scsi_transport_sas: add expander backlink
  [SCSI] hide EH backup data outside the scsi_cmnd
  [SCSI] ibmvscsi: handle inactive SCSI target during probe
  [SCSI] ibmvscsi: allocate lpevents for ibmvscsi on iseries
  [SCSI] aic7[9x]xx: Remove last vestiges of reverse_scan
  [SCSI] aha152x: stop poking at saved scsi_cmnd members
  [SCSI] st.c: Improve sense output
  [SCSI] lpfc 8.1.7: Change version number to 8.1.7
  ...

1104 files changed:
CREDITS
Documentation/DMA-mapping.txt
Documentation/RCU/whatisRCU.txt
Documentation/SubmitChecklist
Documentation/accounting/delay-accounting.txt [new file with mode: 0644]
Documentation/accounting/getdelays.c [new file with mode: 0644]
Documentation/accounting/taskstats.txt [new file with mode: 0644]
Documentation/drivers/edac/edac.txt
Documentation/feature-removal-schedule.txt
Documentation/filesystems/Locking
Documentation/filesystems/vfs.txt
Documentation/hwmon/abituguru
Documentation/i2c/busses/i2c-sis96x
Documentation/kernel-parameters.txt
Documentation/memory-barriers.txt
Documentation/mips/time.README
Documentation/nfsroot.txt
Documentation/ramdisk.txt
Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
Documentation/usb/usb-serial.txt
MAINTAINERS
Makefile
arch/alpha/kernel/alpha_ksyms.c
arch/alpha/kernel/process.c
arch/alpha/kernel/setup.c
arch/alpha/kernel/sys_sio.c
arch/arm/common/locomo.c
arch/arm/common/sharpsl_pm.c
arch/arm/configs/ep93xx_defconfig
arch/arm/configs/ixp2000_defconfig
arch/arm/configs/ixp23xx_defconfig
arch/arm/configs/lpd270_defconfig
arch/arm/configs/onearm_defconfig
arch/arm/kernel/bios32.c
arch/arm/kernel/irq.c
arch/arm/kernel/setup.c
arch/arm/mach-sa1100/collie.c
arch/arm/mach-sa1100/collie_pm.c
arch/arm/mach-versatile/core.c
arch/arm/nwfpe/softfloat.h
arch/arm26/kernel/setup.c
arch/cris/arch-v10/drivers/eeprom.c
arch/cris/arch-v10/drivers/gpio.c
arch/cris/arch-v32/drivers/cryptocop.c
arch/cris/arch-v32/drivers/gpio.c
arch/cris/arch-v32/drivers/pcf8563.c
arch/cris/arch-v32/drivers/sync_serial.c
arch/cris/kernel/setup.c
arch/frv/kernel/asm-offsets.c
arch/frv/kernel/break.S
arch/frv/kernel/debug-stub.c
arch/frv/kernel/entry.S
arch/frv/kernel/gdb-stub.c
arch/frv/kernel/head.S
arch/frv/kernel/local.h
arch/frv/kernel/pm.c
arch/frv/kernel/process.c
arch/frv/kernel/switch_to.S
arch/frv/kernel/traps.c
arch/frv/mb93090-mb00/pci-vdk.c
arch/i386/defconfig
arch/i386/kernel/crash.c
arch/i386/kernel/ioport.c
arch/i386/kernel/process.c
arch/i386/kernel/ptrace.c
arch/i386/kernel/setup.c
arch/i386/kernel/time.c
arch/i386/kernel/traps.c
arch/i386/lib/usercopy.c
arch/i386/oprofile/nmi_int.c
arch/i386/pci/common.c
arch/i386/pci/pci.h
arch/ia64/dig/setup.c
arch/ia64/kernel/efi.c
arch/ia64/kernel/setup.c
arch/ia64/pci/pci.c
arch/ia64/sn/kernel/setup.c
arch/m32r/kernel/setup.c
arch/mips/Kconfig
arch/mips/Kconfig.debug
arch/mips/Makefile
arch/mips/au1000/common/irq.c
arch/mips/au1000/common/prom.c
arch/mips/au1000/common/setup.c
arch/mips/au1000/common/time.c
arch/mips/au1000/csb250/Makefile [deleted file]
arch/mips/au1000/csb250/board_setup.c [deleted file]
arch/mips/au1000/csb250/init.c [deleted file]
arch/mips/au1000/csb250/irqmap.c [deleted file]
arch/mips/au1000/hydrogen3/Makefile [deleted file]
arch/mips/au1000/hydrogen3/board_setup.c [deleted file]
arch/mips/au1000/hydrogen3/init.c [deleted file]
arch/mips/au1000/hydrogen3/irqmap.c [deleted file]
arch/mips/au1000/pb1200/irqmap.c
arch/mips/basler/excite/excite_dbg_io.c
arch/mips/basler/excite/excite_device.c
arch/mips/basler/excite/excite_iodev.c
arch/mips/basler/excite/excite_procfs.c
arch/mips/basler/excite/excite_prom.c
arch/mips/basler/excite/excite_setup.c
arch/mips/cobalt/setup.c
arch/mips/configs/atlas_defconfig
arch/mips/configs/bigsur_defconfig
arch/mips/configs/capcella_defconfig
arch/mips/configs/cobalt_defconfig
arch/mips/configs/db1000_defconfig
arch/mips/configs/db1100_defconfig
arch/mips/configs/db1200_defconfig
arch/mips/configs/db1500_defconfig
arch/mips/configs/db1550_defconfig
arch/mips/configs/ddb5477_defconfig
arch/mips/configs/decstation_defconfig
arch/mips/configs/e55_defconfig
arch/mips/configs/emma2rh_defconfig
arch/mips/configs/ev64120_defconfig
arch/mips/configs/ev96100_defconfig
arch/mips/configs/excite_defconfig
arch/mips/configs/ip22_defconfig
arch/mips/configs/ip27_defconfig
arch/mips/configs/ip32_defconfig
arch/mips/configs/it8172_defconfig
arch/mips/configs/ivr_defconfig
arch/mips/configs/jaguar-atx_defconfig
arch/mips/configs/jmr3927_defconfig
arch/mips/configs/lasat200_defconfig
arch/mips/configs/malta_defconfig
arch/mips/configs/mipssim_defconfig
arch/mips/configs/mpc30x_defconfig
arch/mips/configs/ocelot_3_defconfig
arch/mips/configs/ocelot_c_defconfig
arch/mips/configs/ocelot_defconfig
arch/mips/configs/ocelot_g_defconfig
arch/mips/configs/pb1100_defconfig
arch/mips/configs/pb1500_defconfig
arch/mips/configs/pb1550_defconfig
arch/mips/configs/pnx8550-jbs_defconfig
arch/mips/configs/pnx8550-v2pci_defconfig
arch/mips/configs/qemu_defconfig
arch/mips/configs/rbhma4500_defconfig
arch/mips/configs/rm200_defconfig
arch/mips/configs/sb1250-swarm_defconfig
arch/mips/configs/sead_defconfig
arch/mips/configs/tb0226_defconfig
arch/mips/configs/tb0229_defconfig
arch/mips/configs/tb0287_defconfig
arch/mips/configs/workpad_defconfig
arch/mips/configs/wrppmc_defconfig
arch/mips/configs/yosemite_defconfig
arch/mips/ddb5xxx/ddb5477/irq.c
arch/mips/ddb5xxx/ddb5477/irq_5477.c
arch/mips/ddb5xxx/ddb5477/setup.c
arch/mips/dec/ioasic-irq.c
arch/mips/dec/kn02-irq.c
arch/mips/dec/setup.c
arch/mips/dec/time.c
arch/mips/defconfig
arch/mips/emma2rh/common/irq.c
arch/mips/emma2rh/common/irq_emma2rh.c
arch/mips/emma2rh/common/prom.c
arch/mips/emma2rh/markeins/irq.c
arch/mips/emma2rh/markeins/irq_markeins.c
arch/mips/emma2rh/markeins/platform.c
arch/mips/emma2rh/markeins/setup.c
arch/mips/gt64120/ev64120/irq.c
arch/mips/gt64120/wrppmc/setup.c
arch/mips/gt64120/wrppmc/time.c
arch/mips/ite-boards/generic/irq.c
arch/mips/ite-boards/generic/it8172_setup.c
arch/mips/ite-boards/generic/time.c
arch/mips/jazz/irq.c
arch/mips/jazz/setup.c
arch/mips/jmr3927/rbhma3100/irq.c
arch/mips/jmr3927/rbhma3100/setup.c
arch/mips/kernel/apm.c
arch/mips/kernel/cpu-probe.c
arch/mips/kernel/entry.S
arch/mips/kernel/gdb-low.S
arch/mips/kernel/genex.S
arch/mips/kernel/head.S
arch/mips/kernel/i8259.c
arch/mips/kernel/irixelf.c
arch/mips/kernel/irq-msc01.c
arch/mips/kernel/irq-mv6434x.c
arch/mips/kernel/irq-rm7000.c
arch/mips/kernel/irq-rm9000.c
arch/mips/kernel/irq.c
arch/mips/kernel/irq_cpu.c
arch/mips/kernel/mips-mt.c
arch/mips/kernel/scall32-o32.S
arch/mips/kernel/scall64-64.S
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/setup.c
arch/mips/kernel/smp.c
arch/mips/kernel/smtc-asm.S
arch/mips/kernel/smtc.c
arch/mips/kernel/time.c
arch/mips/kernel/traps.c
arch/mips/kernel/vpe.c
arch/mips/lasat/interrupt.c
arch/mips/lasat/setup.c
arch/mips/mips-boards/atlas/atlas_int.c
arch/mips/mips-boards/atlas/atlas_setup.c
arch/mips/mips-boards/generic/memory.c
arch/mips/mips-boards/generic/time.c
arch/mips/mips-boards/malta/malta_setup.c
arch/mips/mips-boards/sead/sead_setup.c
arch/mips/mips-boards/sim/Makefile
arch/mips/mips-boards/sim/sim_IRQ.c [deleted file]
arch/mips/mips-boards/sim/sim_irq.S [deleted file]
arch/mips/mips-boards/sim/sim_setup.c
arch/mips/mips-boards/sim/sim_time.c
arch/mips/mm/c-r4k.c
arch/mips/mm/init.c
arch/mips/mm/pgtable.c
arch/mips/mm/tlbex.c
arch/mips/momentum/jaguar_atx/setup.c
arch/mips/momentum/ocelot_3/setup.c
arch/mips/momentum/ocelot_c/cpci-irq.c
arch/mips/momentum/ocelot_c/setup.c
arch/mips/momentum/ocelot_c/uart-irq.c
arch/mips/oprofile/op_model_mipsxx.c
arch/mips/pci/fixup-emma2rh.c
arch/mips/pci/fixup-mpc30x.c
arch/mips/pci/ops-emma2rh.c
arch/mips/pci/pci-emma2rh.c
arch/mips/philips/pnx8550/common/int.c
arch/mips/philips/pnx8550/common/setup.c
arch/mips/philips/pnx8550/common/time.c
arch/mips/pmc-sierra/yosemite/setup.c
arch/mips/qemu/q-reset.c
arch/mips/qemu/q-setup.c
arch/mips/sgi-ip22/ip22-eisa.c
arch/mips/sgi-ip22/ip22-int.c
arch/mips/sgi-ip22/ip22-time.c
arch/mips/sgi-ip27/ip27-irq.c
arch/mips/sgi-ip27/ip27-timer.c
arch/mips/sgi-ip32/ip32-irq.c
arch/mips/sgi-ip32/ip32-setup.c
arch/mips/sibyte/bcm1480/irq.c
arch/mips/sibyte/sb1250/irq.c
arch/mips/sibyte/swarm/setup.c
arch/mips/sni/irq.c
arch/mips/sni/setup.c
arch/mips/tx4927/common/tx4927_irq.c
arch/mips/tx4927/common/tx4927_setup.c
arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
arch/mips/tx4938/common/irq.c
arch/mips/tx4938/common/setup.c
arch/mips/tx4938/toshiba_rbtx4938/irq.c
arch/mips/vr41xx/Kconfig
arch/mips/vr41xx/casio-e55/setup.c
arch/mips/vr41xx/common/Makefile
arch/mips/vr41xx/common/icu.c
arch/mips/vr41xx/common/init.c
arch/mips/vr41xx/common/irq.c
arch/mips/vr41xx/common/vrc4173.c [deleted file]
arch/mips/vr41xx/ibm-workpad/setup.c
arch/mips/vr41xx/nec-cmbvr4133/irq.c
arch/parisc/kernel/pdc_cons.c
arch/powerpc/kernel/ibmebus.c
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/pci_32.c
arch/powerpc/kernel/pci_64.c
arch/powerpc/kernel/ppc_ksyms.c
arch/powerpc/kernel/prom_parse.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/platforms/cell/interrupt.c
arch/powerpc/platforms/cell/spider-pic.c
arch/powerpc/platforms/cell/spu_base.c
arch/powerpc/platforms/iseries/irq.c
arch/powerpc/platforms/powermac/backlight.c
arch/powerpc/platforms/powermac/pci.c
arch/powerpc/platforms/powermac/pic.c
arch/powerpc/platforms/pseries/ras.c
arch/powerpc/platforms/pseries/xics.c
arch/powerpc/sysdev/i8259.c
arch/powerpc/sysdev/mpic.c
arch/ppc/kernel/ppc_ksyms.c
arch/ppc/kernel/setup.c
arch/ppc/platforms/prep_setup.c
arch/s390/Kconfig
arch/s390/hypfs/hypfs_diag.c
arch/s390/kernel/Makefile
arch/s390/kernel/compat_linux.c
arch/s390/kernel/head31.S
arch/s390/kernel/head64.S
arch/s390/kernel/machine_kexec.c
arch/s390/kernel/module.c
arch/s390/kernel/process.c
arch/s390/kernel/profile.c
arch/s390/kernel/s390_ext.c
arch/s390/kernel/setup.c
arch/s390/kernel/time.c
arch/s390/kernel/traps.c
arch/s390/lib/string.c
arch/s390/mm/cmm.c
arch/s390/mm/fault.c
arch/sh/kernel/setup.c
arch/sh64/kernel/setup.c
arch/sh64/kernel/sh_ksyms.c
arch/sparc/kernel/of_device.c
arch/sparc/kernel/setup.c
arch/sparc64/Kconfig
arch/sparc64/defconfig
arch/sparc64/kernel/head.S
arch/sparc64/kernel/of_device.c
arch/sparc64/kernel/pci_psycho.c
arch/sparc64/kernel/prom.c
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/time.c
arch/um/Kconfig.debug
arch/um/Makefile-x86_64
arch/um/defconfig
arch/um/drivers/mconsole_user.c
arch/um/drivers/net_user.c
arch/um/drivers/tty.c
arch/um/drivers/ubd_kern.c
arch/um/include/irq_user.h
arch/um/include/kern_util.h
arch/um/include/longjmp.h
arch/um/include/os.h
arch/um/include/skas/mode_kern_skas.h
arch/um/include/tt/mode_kern_tt.h
arch/um/kernel/Makefile
arch/um/kernel/exec.c [new file with mode: 0644]
arch/um/kernel/exec_kern.c [deleted file]
arch/um/kernel/irq.c
arch/um/kernel/ksyms.c
arch/um/kernel/mem.c
arch/um/kernel/physmem.c
arch/um/kernel/sigio.c [new file with mode: 0644]
arch/um/kernel/sigio_kern.c [deleted file]
arch/um/kernel/signal.c [new file with mode: 0644]
arch/um/kernel/signal_kern.c [deleted file]
arch/um/kernel/skas/mem.c
arch/um/kernel/skas/process_kern.c
arch/um/kernel/skas/syscall.c
arch/um/kernel/syscall.c
arch/um/kernel/syscall_kern.c [deleted file]
arch/um/kernel/time.c [new file with mode: 0644]
arch/um/kernel/time_kern.c [deleted file]
arch/um/kernel/trap.c [new file with mode: 0644]
arch/um/kernel/trap_kern.c [deleted file]
arch/um/kernel/tt/exec_kern.c
arch/um/kernel/tt/mem.c
arch/um/kernel/tt/process_kern.c
arch/um/kernel/tt/syscall_kern.c
arch/um/kernel/tt/tracer.c
arch/um/kernel/um_arch.c
arch/um/kernel/uml.lds.S
arch/um/kernel/vmlinux.lds.S
arch/um/os-Linux/file.c
arch/um/os-Linux/irq.c
arch/um/os-Linux/process.c
arch/um/os-Linux/sigio.c
arch/um/os-Linux/signal.c
arch/um/os-Linux/skas/process.c
arch/um/os-Linux/time.c
arch/um/os-Linux/uaccess.c
arch/x86_64/defconfig
arch/x86_64/ia32/ia32_binfmt.c
arch/x86_64/ia32/ptrace32.c
arch/x86_64/kernel/e820.c
arch/x86_64/kernel/early_printk.c
arch/x86_64/kernel/mce_amd.c
arch/x86_64/kernel/pci-calgary.c
arch/x86_64/kernel/setup.c
arch/x86_64/kernel/smpboot.c
arch/x86_64/kernel/tce.c
arch/x86_64/kernel/traps.c
arch/xtensa/kernel/setup.c
block/blktrace.c
block/ioctl.c
block/ll_rw_blk.c
drivers/acpi/Kconfig
drivers/acpi/ac.c
drivers/acpi/battery.c
drivers/acpi/bus.c
drivers/acpi/button.c
drivers/acpi/cm_sbs.c
drivers/acpi/dispatcher/dsinit.c
drivers/acpi/dispatcher/dsmethod.c
drivers/acpi/dispatcher/dswexec.c
drivers/acpi/dock.c
drivers/acpi/ec.c
drivers/acpi/event.c
drivers/acpi/events/evregion.c
drivers/acpi/events/evxface.c
drivers/acpi/events/evxfregn.c
drivers/acpi/executer/exconfig.c
drivers/acpi/executer/exconvrt.c
drivers/acpi/executer/exmutex.c
drivers/acpi/executer/exsystem.c
drivers/acpi/fan.c
drivers/acpi/hotkey.c
drivers/acpi/namespace/nsalloc.c
drivers/acpi/osl.c
drivers/acpi/parser/psutils.c
drivers/acpi/pci_link.c
drivers/acpi/power.c
drivers/acpi/processor_core.c
drivers/acpi/processor_idle.c
drivers/acpi/sleep/proc.c
drivers/acpi/system.c
drivers/acpi/tables/tbget.c
drivers/acpi/tables/tbinstal.c
drivers/acpi/tables/tbrsdt.c
drivers/acpi/tables/tbxface.c
drivers/acpi/thermal.c
drivers/acpi/utilities/utalloc.c
drivers/acpi/utilities/utdebug.c
drivers/acpi/utilities/utdelete.c
drivers/acpi/utilities/utmisc.c
drivers/acpi/utilities/utmutex.c
drivers/acpi/utilities/utstate.c
drivers/atm/Kconfig
drivers/base/Kconfig
drivers/base/bus.c
drivers/base/core.c
drivers/block/Kconfig
drivers/block/aoe/aoechr.c
drivers/block/cpqarray.c
drivers/block/rd.c
drivers/bluetooth/bcm203x.c
drivers/bluetooth/hci_ldisc.c
drivers/cdrom/cdrom.c
drivers/char/hvsi.c
drivers/char/ip2/ip2main.c
drivers/char/mem.c
drivers/char/nsc_gpio.c
drivers/char/pc8736x_gpio.c
drivers/char/rtc.c
drivers/char/scx200_gpio.c
drivers/char/snsc_event.c
drivers/char/specialix.c
drivers/char/tpm/tpm.c
drivers/char/tpm/tpm_tis.c
drivers/char/vr41xx_giu.c
drivers/crypto/padlock-aes.c
drivers/edac/edac_mc.c
drivers/hwmon/abituguru.c
drivers/i2c/algos/i2c-algo-bit.c
drivers/i2c/algos/i2c-algo-ite.c
drivers/i2c/algos/i2c-algo-pca.c
drivers/i2c/algos/i2c-algo-pcf.c
drivers/i2c/algos/i2c-algo-sibyte.c
drivers/i2c/busses/i2c-iop3xx.c
drivers/i2c/busses/i2c-iop3xx.h
drivers/i2c/busses/i2c-powermac.c
drivers/i2c/busses/scx200_acb.c
drivers/i2c/chips/pca9539.c
drivers/i2c/i2c-core.c
drivers/ide/legacy/ide-cs.c
drivers/ide/pci/generic.c
drivers/infiniband/core/cm.c
drivers/infiniband/core/cma.c
drivers/infiniband/core/fmr_pool.c
drivers/infiniband/core/sa_query.c
drivers/infiniband/hw/mthca/mthca_av.c
drivers/infiniband/hw/mthca/mthca_qp.c
drivers/infiniband/ulp/iser/iser_verbs.c
drivers/infiniband/ulp/srp/ib_srp.c
drivers/isdn/hisax/asuscom.c
drivers/isdn/hisax/avm_a1.c
drivers/isdn/hisax/avm_pci.c
drivers/isdn/hisax/bkm_a4t.c
drivers/isdn/hisax/bkm_a8.c
drivers/isdn/hisax/config.c
drivers/isdn/hisax/diva.c
drivers/isdn/hisax/enternow_pci.c
drivers/isdn/hisax/gazel.c
drivers/isdn/hisax/hfc4s8s_l1.c
drivers/isdn/hisax/hfc_2bds0.c
drivers/isdn/hisax/hfc_2bs0.c
drivers/isdn/hisax/hfc_pci.c
drivers/isdn/hisax/hfcscard.c
drivers/isdn/hisax/icc.c
drivers/isdn/hisax/icc.h
drivers/isdn/hisax/ipacx.c
drivers/isdn/hisax/isurf.c
drivers/isdn/hisax/ix1_micro.c
drivers/isdn/hisax/jade.c
drivers/isdn/hisax/mic.c
drivers/isdn/hisax/netjet.c
drivers/isdn/hisax/niccy.c
drivers/isdn/hisax/nj_s.c
drivers/isdn/hisax/nj_u.c
drivers/isdn/hisax/s0box.c
drivers/isdn/hisax/saphir.c
drivers/isdn/hisax/sportster.c
drivers/isdn/hisax/teleint.c
drivers/isdn/hisax/teles0.c
drivers/isdn/hisax/telespci.c
drivers/isdn/hisax/w6692.c
drivers/isdn/i4l/isdn_common.c
drivers/isdn/i4l/isdn_ppp.c
drivers/leds/Kconfig
drivers/leds/Makefile
drivers/leds/leds-net48xx.c [new file with mode: 0644]
drivers/macintosh/Kconfig
drivers/macintosh/macio_asic.c
drivers/macintosh/smu.c
drivers/md/md.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
drivers/media/dvb/frontends/nxt200x.c
drivers/media/dvb/frontends/or51211.c
drivers/media/dvb/frontends/sp8870.c
drivers/media/dvb/frontends/sp887x.c
drivers/media/video/cx88/cx88-blackbird.c
drivers/message/i2o/core.h
drivers/message/i2o/i2o_config.c
drivers/mfd/ucb1x00-core.c
drivers/mfd/ucb1x00.h
drivers/mmc/sdhci.c
drivers/net/3c59x.c
drivers/net/8139cp.c
drivers/net/8139too.c
drivers/net/bnx2.c
drivers/net/chelsio/sge.c
drivers/net/e1000/e1000.h
drivers/net/e1000/e1000_ethtool.c
drivers/net/e1000/e1000_hw.c
drivers/net/e1000/e1000_hw.h
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_osdep.h
drivers/net/e1000/e1000_param.c
drivers/net/forcedeth.c
drivers/net/hamradio/bpqether.c
drivers/net/irda/ali-ircc.c
drivers/net/irda/smsc-ircc2.c
drivers/net/ixgb/ixgb_main.c
drivers/net/loopback.c
drivers/net/myri10ge/myri10ge.c
drivers/net/s2io.c
drivers/net/s2io.h
drivers/net/sk98lin/h/xmac_ii.h
drivers/net/skge.h
drivers/net/sky2.c
drivers/net/sky2.h
drivers/net/smc91x.h
drivers/net/spider_net.c
drivers/net/spider_net.h
drivers/net/tg3.c
drivers/net/typhoon.c
drivers/net/wan/c101.c
drivers/net/wan/hd6457x.c
drivers/net/wan/hdlc_cisco.c
drivers/net/wan/hdlc_fr.c
drivers/net/wan/hdlc_generic.c
drivers/net/wan/wanxl.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/spectrum_cs.c
drivers/net/wireless/zd1211rw/zd_usb.c
drivers/pci/hotplug/Kconfig
drivers/pci/msi.c
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/probe.c
drivers/pci/quirks.c
drivers/pcmcia/Kconfig
drivers/rtc/Kconfig
drivers/rtc/Makefile
drivers/rtc/rtc-isl1208.c [new file with mode: 0644]
drivers/rtc/rtc-vr41xx.c
drivers/s390/block/dasd_devmap.c
drivers/s390/block/dasd_eckd.c
drivers/s390/block/dasd_fba.c
drivers/s390/block/dasd_genhd.c
drivers/s390/block/dasd_ioctl.c
drivers/s390/block/xpram.c
drivers/s390/char/con3215.c
drivers/s390/char/ctrlchar.c
drivers/s390/char/defkeymap.c
drivers/s390/char/fs3270.c
drivers/s390/char/keyboard.c
drivers/s390/char/raw3270.c
drivers/s390/char/raw3270.h
drivers/s390/char/tape_34xx.c
drivers/s390/char/tape_class.c
drivers/s390/char/tape_core.c
drivers/s390/char/tty3270.c
drivers/s390/char/vmlogrdr.c
drivers/s390/char/vmwatchdog.c
drivers/s390/cio/ccwgroup.c
drivers/s390/cio/chsc.c
drivers/s390/cio/cio.c
drivers/s390/cio/cio.h
drivers/s390/cio/cmf.c
drivers/s390/cio/css.c
drivers/s390/cio/css.h
drivers/s390/cio/device.c
drivers/s390/cio/device_fsm.c
drivers/s390/cio/device_pgid.c
drivers/s390/cio/device_status.c
drivers/s390/cio/qdio.c
drivers/s390/net/claw.c
drivers/s390/net/ctcmain.c
drivers/s390/net/iucv.c
drivers/s390/net/netiucv.c
drivers/s390/net/qeth_main.c
drivers/s390/net/qeth_sys.c
drivers/s390/net/smsgiucv.c
drivers/s390/s390mach.c
drivers/s390/scsi/zfcp_fsf.c
drivers/s390/scsi/zfcp_scsi.c
drivers/scsi/aic7xxx/aic79xx_osm.h
drivers/scsi/ata_piix.c
drivers/serial/8250.c
drivers/serial/dz.c
drivers/serial/ip22zilog.c
drivers/serial/serial_core.c
drivers/serial/sunsab.c
drivers/serial/sunsu.c
drivers/serial/vr41xx_siu.c
drivers/usb/Kconfig
drivers/usb/Makefile
drivers/usb/class/cdc-acm.c
drivers/usb/core/Kconfig
drivers/usb/core/hub.c
drivers/usb/core/inode.c
drivers/usb/gadget/epautoconf.c
drivers/usb/gadget/ether.c
drivers/usb/gadget/file_storage.c
drivers/usb/gadget/rndis.c
drivers/usb/gadget/rndis.h
drivers/usb/gadget/serial.c
drivers/usb/gadget/zero.c
drivers/usb/host/ehci-au1xxx.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ohci-au1xxx.c
drivers/usb/host/ohci-ep93xx.c [new file with mode: 0644]
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hub.c
drivers/usb/host/pci-quirks.c
drivers/usb/input/hid-core.c
drivers/usb/misc/Kconfig
drivers/usb/misc/Makefile
drivers/usb/misc/cy7c63.c [deleted file]
drivers/usb/misc/cypress_cy7c63.c [new file with mode: 0644]
drivers/usb/misc/usblcd.c
drivers/usb/mon/mon_text.c
drivers/usb/net/rtl8150.c
drivers/usb/serial/Kconfig
drivers/usb/serial/Makefile
drivers/usb/serial/airprime.c
drivers/usb/serial/anydata.c
drivers/usb/serial/ark3116.c
drivers/usb/serial/belkin_sa.c
drivers/usb/serial/bus.c
drivers/usb/serial/console.c
drivers/usb/serial/cp2101.c
drivers/usb/serial/cyberjack.c
drivers/usb/serial/cypress_m8.c
drivers/usb/serial/digi_acceleport.c
drivers/usb/serial/empeg.c
drivers/usb/serial/ezusb.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio.h
drivers/usb/serial/funsoft.c
drivers/usb/serial/garmin_gps.c
drivers/usb/serial/generic.c
drivers/usb/serial/hp4x.c
drivers/usb/serial/io_edgeport.c
drivers/usb/serial/io_ti.c
drivers/usb/serial/ipaq.c
drivers/usb/serial/ipw.c
drivers/usb/serial/ir-usb.c
drivers/usb/serial/keyspan.c
drivers/usb/serial/keyspan_pda.c
drivers/usb/serial/kl5kusb105.c
drivers/usb/serial/kobil_sct.c
drivers/usb/serial/mct_u232.c
drivers/usb/serial/navman.c
drivers/usb/serial/omninet.c
drivers/usb/serial/option.c
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.h
drivers/usb/serial/safe_serial.c
drivers/usb/serial/sierra.c [new file with mode: 0644]
drivers/usb/serial/ti_usb_3410_5052.c
drivers/usb/serial/usb-serial.c
drivers/usb/serial/usb-serial.h [deleted file]
drivers/usb/serial/visor.c
drivers/usb/serial/whiteheat.c
drivers/usb/storage/scsiglue.c
drivers/usb/storage/transport.c
drivers/usb/storage/unusual_devs.h
drivers/usb/storage/usb.c
drivers/usb/storage/usb.h
drivers/video/68328fb.c
drivers/video/Kconfig
drivers/video/Makefile
drivers/video/S3triofb.c
drivers/video/amifb.c
drivers/video/arcfb.c
drivers/video/asiliantfb.c
drivers/video/atafb.c
drivers/video/aty/aty128fb.c
drivers/video/aty/atyfb_base.c
drivers/video/aty/radeon_base.c
drivers/video/chipsfb.c
drivers/video/cirrusfb.c
drivers/video/console/dummycon.c
drivers/video/console/fbcon.c
drivers/video/console/mdacon.c
drivers/video/console/newport_con.c
drivers/video/console/promcon.c
drivers/video/console/softcursor.c
drivers/video/console/sticon.c
drivers/video/console/vgacon.c
drivers/video/controlfb.c
drivers/video/cyber2000fb.c
drivers/video/cyberfb.c
drivers/video/dnfb.c
drivers/video/epson1355fb.c
drivers/video/fbcmap.c
drivers/video/fbmem.c
drivers/video/fbmon.c
drivers/video/g364fb.c
drivers/video/geode/gx1fb_core.c
drivers/video/geode/gxfb_core.c
drivers/video/hgafb.c
drivers/video/hitfb.c
drivers/video/hpfb.c
drivers/video/i810/i810_main.c
drivers/video/igafb.c
drivers/video/imacfb.c
drivers/video/imsttfb.c
drivers/video/intelfb/intelfbdrv.c
drivers/video/intelfb/intelfbhw.c
drivers/video/kyro/fbdev.c
drivers/video/macfb.c
drivers/video/matrox/matroxfb_base.h
drivers/video/maxinefb.c
drivers/video/mbx/Makefile [new file with mode: 0644]
drivers/video/mbx/mbxdebugfs.c [new file with mode: 0644]
drivers/video/mbx/mbxfb.c [new file with mode: 0644]
drivers/video/mbx/reg_bits.h [new file with mode: 0644]
drivers/video/mbx/regs.h [new file with mode: 0644]
drivers/video/modedb.c
drivers/video/neofb.c
drivers/video/nvidia/nv_backlight.c
drivers/video/nvidia/nv_proto.h
drivers/video/nvidia/nvidia.c
drivers/video/offb.c
drivers/video/platinumfb.c
drivers/video/pm2fb.c
drivers/video/pm3fb.c
drivers/video/pmag-aa-fb.c
drivers/video/pvr2fb.c
drivers/video/q40fb.c
drivers/video/retz3fb.c
drivers/video/riva/fbdev.c
drivers/video/s3c2410fb.c
drivers/video/savage/savagefb_driver.c
drivers/video/sis/sis_main.c
drivers/video/skeletonfb.c
drivers/video/sun3fb.c
drivers/video/tdfxfb.c
drivers/video/tgafb.c
drivers/video/tx3912fb.c
drivers/video/valkyriefb.c
drivers/video/vesafb.c
drivers/video/vfb.c
drivers/video/vga16fb.c
drivers/video/virgefb.c
drivers/w1/masters/ds2482.c
drivers/w1/w1_io.h [deleted file]
fs/Kconfig
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c
fs/char_dev.c
fs/ext3/acl.h
fs/file.c
fs/hugetlbfs/inode.c
fs/jfs/jfs_txnmgr.c
fs/jfs/namei.c
fs/namei.c
fs/nfsd/nfs4proc.c
fs/nfsd/stats.c
fs/partitions/check.c
fs/proc/array.c
fs/proc/base.c
fs/proc/inode.c
fs/proc/kcore.c
fs/ramfs/file-nommu.c
fs/read_write.c
fs/reiserfs/file.c
fs/reiserfs/procfs.c
fs/splice.c
fs/sysfs/inode.c
fs/xfs/linux-2.6/xfs_linux.h
include/acpi/acconfig.h
include/acpi/acinterp.h
include/acpi/aclocal.h
include/acpi/acmacros.h
include/acpi/acresrc.h
include/acpi/platform/aclinux.h
include/asm-alpha/barrier.h
include/asm-arm/arch-versatile/platform.h
include/asm-arm/system.h
include/asm-arm26/system.h
include/asm-cris/system.h
include/asm-frv/elf.h
include/asm-frv/gdb-stub.h
include/asm-frv/processor.h
include/asm-frv/ptrace.h
include/asm-frv/registers.h
include/asm-frv/system.h
include/asm-frv/thread_info.h
include/asm-generic/Kbuild.asm
include/asm-h8300/page.h
include/asm-h8300/processor.h
include/asm-h8300/system.h
include/asm-i386/system.h
include/asm-i386/thread_info.h
include/asm-ia64/io.h
include/asm-ia64/system.h
include/asm-m32r/system.h
include/asm-m68k/system.h
include/asm-m68knommu/processor.h
include/asm-m68knommu/system.h
include/asm-m68knommu/uaccess.h
include/asm-mips/apm.h
include/asm-mips/atomic.h
include/asm-mips/bitops.h
include/asm-mips/cpu-features.h
include/asm-mips/cpu.h
include/asm-mips/inst.h
include/asm-mips/interrupt.h [deleted file]
include/asm-mips/irqflags.h [new file with mode: 0644]
include/asm-mips/mach-cobalt/cpu-feature-overrides.h
include/asm-mips/mach-dec/mc146818rtc.h
include/asm-mips/mach-excite/cpu-feature-overrides.h
include/asm-mips/mach-excite/excite.h
include/asm-mips/mach-ip27/cpu-feature-overrides.h
include/asm-mips/mach-ja/cpu-feature-overrides.h
include/asm-mips/mach-mips/cpu-feature-overrides.h
include/asm-mips/mach-ocelot3/cpu-feature-overrides.h
include/asm-mips/mach-sibyte/cpu-feature-overrides.h
include/asm-mips/mach-sim/cpu-feature-overrides.h
include/asm-mips/mach-yosemite/cpu-feature-overrides.h
include/asm-mips/mipsregs.h
include/asm-mips/page.h
include/asm-mips/system.h
include/asm-mips/time.h
include/asm-mips/unistd.h
include/asm-mips/vr41xx/capcella.h
include/asm-mips/vr41xx/cmbvr4133.h
include/asm-mips/vr41xx/e55.h [deleted file]
include/asm-mips/vr41xx/irq.h [new file with mode: 0644]
include/asm-mips/vr41xx/mpc30x.h
include/asm-mips/vr41xx/tb0219.h
include/asm-mips/vr41xx/tb0226.h
include/asm-mips/vr41xx/tb0287.h
include/asm-mips/vr41xx/vr41xx.h
include/asm-mips/vr41xx/vrc4173.h [deleted file]
include/asm-mips/vr41xx/workpad.h [deleted file]
include/asm-parisc/system.h
include/asm-powerpc/backlight.h
include/asm-powerpc/irq.h
include/asm-powerpc/system.h
include/asm-ppc/system.h
include/asm-s390/bug.h
include/asm-s390/ccwdev.h
include/asm-s390/cio.h
include/asm-s390/futex.h
include/asm-s390/irqflags.h
include/asm-s390/pgalloc.h
include/asm-s390/processor.h
include/asm-s390/setup.h
include/asm-s390/system.h
include/asm-s390/timex.h
include/asm-sh/processor.h
include/asm-sh/system.h
include/asm-sh64/processor.h
include/asm-sh64/system.h
include/asm-sparc/system.h
include/asm-sparc64/Kbuild
include/asm-sparc64/system.h
include/asm-v850/processor.h
include/asm-v850/system.h
include/asm-x86_64/calgary.h
include/asm-x86_64/system.h
include/asm-x86_64/tce.h
include/asm-xtensa/processor.h
include/asm-xtensa/system.h
include/linux/blktrace_api.h
include/linux/bootmem.h
include/linux/completion.h
include/linux/console_struct.h
include/linux/delayacct.h [new file with mode: 0644]
include/linux/elfcore.h
include/linux/fb.h
include/linux/fs.h
include/linux/hdlc.h
include/linux/i2c-id.h
include/linux/i2c.h
include/linux/if_vlan.h
include/linux/ioport.h
include/linux/kernel.h
include/linux/kthread.h
include/linux/list.h
include/linux/lockdep.h
include/linux/mc146818rtc.h
include/linux/module.h
include/linux/namei.h
include/linux/netdevice.h
include/linux/nfs4.h
include/linux/nfsd/stats.h
include/linux/nsc_gpio.h
include/linux/pci.h
include/linux/pci_regs.h
include/linux/pm_legacy.h
include/linux/raid/md_k.h
include/linux/root_dev.h
include/linux/rwsem.h
include/linux/sched.h
include/linux/serial_core.h
include/linux/skbuff.h
include/linux/taskstats.h [new file with mode: 0644]
include/linux/taskstats_kern.h [new file with mode: 0644]
include/linux/time.h
include/linux/tty.h
include/linux/usb.h
include/linux/usb/serial.h [new file with mode: 0644]
include/linux/usb_ch9.h
include/linux/usb_gadget.h
include/linux/usb_usual.h
include/linux/vmalloc.h
include/linux/vmstat.h
include/linux/vt.h
include/linux/vt_kern.h
include/linux/wait.h
include/net/genetlink.h
include/net/protocol.h
include/net/tcp.h
include/rdma/ib_addr.h
include/rdma/ib_fmr_pool.h
include/sound/core.h
include/sound/cs46xx.h
include/video/mbxfb.h [new file with mode: 0644]
init/Kconfig
init/main.c
kernel/Makefile
kernel/acct.c
kernel/delayacct.c [new file with mode: 0644]
kernel/exit.c
kernel/fork.c
kernel/futex.c
kernel/kallsyms.c
kernel/kthread.c
kernel/lockdep.c
kernel/module.c
kernel/panic.c
kernel/power/pm.c
kernel/power/snapshot.c
kernel/power/swap.c
kernel/printk.c
kernel/resource.c
kernel/rtmutex-tester.c
kernel/sched.c
kernel/softirq.c
kernel/sys.c
kernel/taskstats.c [new file with mode: 0644]
kernel/timer.c
kernel/wait.c
lib/Kconfig.debug
lib/idr.c
mm/bootmem.c
mm/fadvise.c
mm/memory.c
mm/mmzone.c
mm/nommu.c
mm/slab.c
mm/vmalloc.c
mm/vmstat.c
net/atm/clip.c
net/atm/ipcommon.c
net/ax25/af_ax25.c
net/ax25/ax25_dev.c
net/ax25/ax25_ds_subr.c
net/ax25/ax25_ds_timer.c
net/ax25/ax25_iface.c
net/ax25/ax25_in.c
net/bluetooth/cmtp/capi.c
net/bluetooth/cmtp/core.c
net/bluetooth/hci_core.c
net/bluetooth/hidp/Kconfig
net/bluetooth/hidp/core.c
net/bluetooth/l2cap.c
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/tty.c
net/bluetooth/sco.c
net/bridge/br_forward.c
net/bridge/br_netfilter.c
net/core/dev.c
net/core/ethtool.c
net/core/skbuff.c
net/core/stream.c
net/dccp/proto.c
net/decnet/dn_rules.c
net/ipv4/Kconfig
net/ipv4/Makefile
net/ipv4/af_inet.c
net/ipv4/fib_rules.c
net/ipv4/fib_trie.c
net/ipv4/inetpeer.c
net/ipv4/ip_input.c
net/ipv4/ip_output.c
net/ipv4/ipcomp.c
net/ipv4/tcp_compound.c [deleted file]
net/ipv4/tcp_highspeed.c
net/ipv4/tcp_ipv4.c
net/ipv4/xfrm4_output.c
net/ipv6/addrconf.c
net/ipv6/ip6_output.c
net/ipv6/ipcomp6.c
net/ipv6/ipv6_sockglue.c
net/ipv6/tcp_ipv6.c
net/ipv6/xfrm6_output.c
net/netrom/af_netrom.c
net/netrom/nr_timer.c
net/rose/af_rose.c
net/sched/act_api.c
net/sched/sch_htb.c
security/selinux/hooks.c
security/selinux/include/objsec.h
sound/aoa/Makefile
sound/aoa/codecs/snd-aoa-codec-tas-basstreble.h [new file with mode: 0644]
sound/aoa/codecs/snd-aoa-codec-tas.c
sound/aoa/codecs/snd-aoa-codec-tas.h
sound/aoa/core/snd-aoa-gpio-pmf.c
sound/aoa/fabrics/snd-aoa-fabric-layout.c
sound/aoa/soundbus/core.c
sound/aoa/soundbus/i2sbus/i2sbus-control.c
sound/aoa/soundbus/i2sbus/i2sbus-control.h [deleted file]
sound/aoa/soundbus/i2sbus/i2sbus-core.c
sound/aoa/soundbus/i2sbus/i2sbus.h
sound/core/sound.c
sound/core/timer.c
sound/i2c/cs8427.c
sound/isa/cs423x/Makefile
sound/isa/gus/gusextreme.c
sound/isa/wavefront/wavefront_fx.c
sound/isa/wavefront/wavefront_midi.c
sound/isa/wavefront/wavefront_synth.c
sound/pci/Kconfig
sound/pci/ad1889.c
sound/pci/ali5451/ali5451.c
sound/pci/als300.c
sound/pci/als4000.c
sound/pci/atiixp.c
sound/pci/atiixp_modem.c
sound/pci/au88x0/au8810.c
sound/pci/au88x0/au8820.c
sound/pci/au88x0/au8830.c
sound/pci/au88x0/au88x0.h
sound/pci/au88x0/au88x0_a3d.c
sound/pci/au88x0/au88x0_core.c
sound/pci/azt3328.c
sound/pci/bt87x.c
sound/pci/ca0106/ca0106_main.c
sound/pci/cmipci.c
sound/pci/cs4281.c
sound/pci/cs46xx/cs46xx.c
sound/pci/cs46xx/cs46xx_lib.c
sound/pci/cs5535audio/cs5535audio.c
sound/pci/emu10k1/emu10k1.c
sound/pci/emu10k1/emu10k1_main.c
sound/pci/emu10k1/emu10k1x.c
sound/pci/emu10k1/emumpu401.c
sound/pci/ens1370.c
sound/pci/es1938.c
sound/pci/es1968.c
sound/pci/fm801.c
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_analog.c
sound/pci/hda/patch_sigmatel.c
sound/pci/ice1712/aureon.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1724.c
sound/pci/intel8x0.c
sound/pci/intel8x0m.c
sound/pci/korg1212/korg1212.c
sound/pci/maestro3.c
sound/pci/mixart/mixart.c
sound/pci/nm256/nm256.c
sound/pci/pcxhr/pcxhr.c
sound/pci/riptide/riptide.c
sound/pci/rme32.c
sound/pci/rme96.c
sound/pci/rme9652/hdsp.c
sound/pci/rme9652/rme9652.c
sound/pci/sonicvibes.c
sound/pci/trident/trident.c
sound/pci/via82xx.c
sound/pci/via82xx_modem.c
sound/pci/vx222/vx222.c
sound/pci/ymfpci/ymfpci.c
sound/pcmcia/pdaudiocf/pdaudiocf.c

diff --git a/CREDITS b/CREDITS
index 66b9e7a9abff509fef1d8e7c9425fe0dfbb06ece..29be6d1fdf49abe2e4e7b1b442bbc198a4740dc0 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -528,11 +528,11 @@ S: Oxford
 S: United Kingdom
 
 N: Luiz Fernando N. Capitulino
-E: lcapitulino@terra.com.br
-E: lcapitulino@prefeitura.sp.gov.br
-W: http://www.telecentros.sp.gov.br
-D: Little fixes and a lot of janitorial work
-S: E-GOV Telecentros SP
+E: lcapitulino@mandriva.com.br
+E: lcapitulino@gmail.com
+W: http://www.cpu.eti.br
+D: misc kernel hacking
+S: Mandriva
 S: Brazil
 
 N: Remy Card
index 7c717699032c90f403432ef793cfeed8c359fe7b..63392c9132b4d08bf32f3fab82cc0c14c39e15b1 100644 (file)
@@ -698,12 +698,12 @@ these interfaces.  Remember that, as defined, consistent mappings are
 always going to be SAC addressable.
 
 The first thing your driver needs to do is query the PCI platform
-layer with your devices DAC addressing capabilities:
+layer if it is capable of handling your devices DAC addressing
+capabilities:
 
-       int pci_dac_set_dma_mask(struct pci_dev *pdev, u64 mask);
+       int pci_dac_dma_supported(struct pci_dev *hwdev, u64 mask);
 
-This routine behaves identically to pci_set_dma_mask.  You may not
-use the following interfaces if this routine fails.
+You may not use the following interfaces if this routine fails.
 
 Next, DMA addresses using this API are kept track of using the
 dma64_addr_t type.  It is guaranteed to be big enough to hold any
index 4f41a60e5111b1900d749018cda46182a5c000f3..318df44259b37f6556cbe5b6b4e9e12d4a26259a 100644 (file)
@@ -687,8 +687,9 @@ diff shows how closely related RCU and reader-writer locking can be.
        +       spin_lock(&listmutex);
                list_for_each_entry(p, head, lp) {
                        if (p->key == key) {
-                               list_del(&p->list);
+       -                       list_del(&p->list);
        -                       write_unlock(&listmutex);
+       +                       list_del_rcu(&p->list);
        +                       spin_unlock(&listmutex);
        +                       synchronize_rcu();
                                kfree(p);
@@ -736,7 +737,7 @@ Or, for those who prefer a side-by-side listing:
  5   write_lock(&listmutex);            5   spin_lock(&listmutex);
  6   list_for_each_entry(p, head, lp) { 6   list_for_each_entry(p, head, lp) {
  7     if (p->key == key) {             7     if (p->key == key) {
- 8       list_del(&p->list);            8       list_del(&p->list);
+ 8       list_del(&p->list);            8       list_del_rcu(&p->list);
  9       write_unlock(&listmutex);      9       spin_unlock(&listmutex);
                                        10       synchronize_rcu();
 10       kfree(p);                     11       kfree(p);
index 8230098da529d95a4aa9199abf153276cee57fa7..a10bfb6ecd9fa4e55c9beecd2e588c9a0359ec71 100644 (file)
@@ -1,57 +1,63 @@
 Linux Kernel patch sumbittal checklist
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Here are some basic things that developers should do if they
-want to see their kernel patch submittals accepted quicker.
+Here are some basic things that developers should do if they want to see their
+kernel patch submissions accepted more quickly.
 
-These are all above and beyond the documentation that is provided
-in Documentation/SubmittingPatches and elsewhere about submitting
-Linux kernel patches.
+These are all above and beyond the documentation that is provided in
+Documentation/SubmittingPatches and elsewhere regarding submitting Linux
+kernel patches.
 
 
 
-- Builds cleanly with applicable or modified CONFIG options =y, =m, and =n.
-  No gcc warnings/errors, no linker warnings/errors.
+1: Builds cleanly with applicable or modified CONFIG options =y, =m, and
+   =n.  No gcc warnings/errors, no linker warnings/errors.
 
-- Passes allnoconfig, allmodconfig
+2: Passes allnoconfig, allmodconfig
 
-- Builds on multiple CPU arch-es by using local cross-compile tools
-  or something like PLM at OSDL.
+3: Builds on multiple CPU architectures by using local cross-compile tools
+   or something like PLM at OSDL.
 
-- ppc64 is a good architecture for cross-compilation checking because it
-  tends to use `unsigned long' for 64-bit quantities.
+4: ppc64 is a good architecture for cross-compilation checking because it
+   tends to use `unsigned long' for 64-bit quantities.
 
-- Matches kernel coding style(!)
+5: Matches kernel coding style(!)
 
-- Any new or modified CONFIG options don't muck up the config menu.
+6: Any new or modified CONFIG options don't muck up the config menu.
 
-- All new Kconfig options have help text.
+7: All new Kconfig options have help text.
 
-- Has been carefully reviewed with respect to relevant Kconfig
-  combinations.  This is very hard to get right with testing --
-  brainpower pays off here.
+8: Has been carefully reviewed with respect to relevant Kconfig
+   combinations.  This is very hard to get right with testing -- brainpower
+   pays off here.
 
-- Check cleanly with sparse.
+9: Check cleanly with sparse.
 
-- Use 'make checkstack' and 'make namespacecheck' and fix any
-  problems that they find.  Note:  checkstack does not point out
-  problems explicitly, but any one function that uses more than
-  512 bytes on the stack is a candidate for change.
+10: Use 'make checkstack' and 'make namespacecheck' and fix any problems
+    that they find.  Note: checkstack does not point out problems explicitly,
+    but any one function that uses more than 512 bytes on the stack is a
+    candidate for change.
 
-- Include kernel-doc to document global kernel APIs.  (Not required
-  for static functions, but OK there also.)  Use 'make htmldocs'
-  or 'make mandocs' to check the kernel-doc and fix any issues.
+11: Include kernel-doc to document global kernel APIs.  (Not required for
+    static functions, but OK there also.) Use 'make htmldocs' or 'make
+    mandocs' to check the kernel-doc and fix any issues.
 
-- Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT,
-  CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES,
-  CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEP all simultaneously
-  enabled.
+12: Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT,
+    CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES,
+    CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEP all simultaneously
+    enabled.
 
-- Has been build- and runtime tested with and without CONFIG_SMP and
-  CONFIG_PREEMPT.
+13: Has been build- and runtime tested with and without CONFIG_SMP and
+    CONFIG_PREEMPT.
 
-- If the patch affects IO/Disk, etc: has been tested with and without
-  CONFIG_LBD.
+14: If the patch affects IO/Disk, etc: has been tested with and without
+    CONFIG_LBD.
 
+15: All codepaths have been exercised with all lockdep features enabled.
 
-2006-APR-27
+16: All new /proc entries are documented under Documentation/
+
+17: All new kernel boot parameters are documented in
+    Documentation/kernel-parameters.txt.
+
+18: All new module parameters are documented with MODULE_PARM_DESC()
diff --git a/Documentation/accounting/delay-accounting.txt b/Documentation/accounting/delay-accounting.txt
new file mode 100644 (file)
index 0000000..be215e5
--- /dev/null
@@ -0,0 +1,110 @@
+Delay accounting
+----------------
+
+Tasks encounter delays in execution when they wait
+for some kernel resource to become available e.g. a
+runnable task may wait for a free CPU to run on.
+
+The per-task delay accounting functionality measures
+the delays experienced by a task while
+
+a) waiting for a CPU (while being runnable)
+b) completion of synchronous block I/O initiated by the task
+c) swapping in pages
+
+and makes these statistics available to userspace through
+the taskstats interface.
+
+Such delays provide feedback for setting a task's cpu priority,
+io priority and rss limit values appropriately. Long delays for
+important tasks could be a trigger for raising its corresponding priority.
+
+The functionality, through its use of the taskstats interface, also provides
+delay statistics aggregated for all tasks (or threads) belonging to a
+thread group (corresponding to a traditional Unix process). This is a commonly
+needed aggregation that is more efficiently done by the kernel.
+
+Userspace utilities, particularly resource management applications, can also
+aggregate delay statistics into arbitrary groups. To enable this, delay
+statistics of a task are available both during its lifetime as well as on its
+exit, ensuring continuous and complete monitoring can be done.
+
+
+Interface
+---------
+
+Delay accounting uses the taskstats interface which is described
+in detail in a separate document in this directory. Taskstats returns a
+generic data structure to userspace corresponding to per-pid and per-tgid
+statistics. The delay accounting functionality populates specific fields of
+this structure. See
+     include/linux/taskstats.h
+for a description of the fields pertaining to delay accounting.
+It will generally be in the form of counters returning the cumulative
+delay seen for cpu, sync block I/O, swapin etc.
+
+Taking the difference of two successive readings of a given
+counter (say cpu_delay_total) for a task will give the delay
+experienced by the task waiting for the corresponding resource
+in that interval.
+
+When a task exits, records containing the per-task statistics
+are sent to userspace without requiring a command. If it is the last exiting
+task of a thread group, the per-tgid statistics are also sent. More details
+are given in the taskstats interface description.
+
+The getdelays.c userspace utility in this directory allows simple commands to
+be run and the corresponding delay statistics to be displayed. It also serves
+as an example of using the taskstats interface.
+
+Usage
+-----
+
+Compile the kernel with
+       CONFIG_TASK_DELAY_ACCT=y
+       CONFIG_TASKSTATS=y
+
+Enable the accounting at boot time by adding
+the following to the kernel boot options
+       delayacct
+
+and after the system has booted up, use a utility
+similar to  getdelays.c to access the delays
+seen by a given task or a task group (tgid).
+The utility also allows a given command to be
+executed and the corresponding delays to be
+seen.
+
+General format of the getdelays command
+
+getdelays [-t tgid] [-p pid] [-c cmd...]
+
+
+Get delays, since system boot, for pid 10
+# ./getdelays -p 10
+(output similar to next case)
+
+Get sum of delays, since system boot, for all pids with tgid 5
+# ./getdelays -t 5
+
+
+CPU    count   real total      virtual total   delay total
+       7876    92005750        100000000       24001500
+IO     count   delay total
+       0       0
+MEM    count   delay total
+       0       0
+
+Get delays seen in executing a given simple command
+# ./getdelays -c ls /
+
+bin   data1  data3  data5  dev  home  media  opt   root  srv        sys  usr
+boot  data2  data4  data6  etc  lib   mnt    proc  sbin  subdomain  tmp  var
+
+
+CPU    count   real total      virtual total   delay total
+       6       4000250         4000000         0
+IO     count   delay total
+       0       0
+MEM    count   delay total
+       0       0
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
new file mode 100644 (file)
index 0000000..795ca39
--- /dev/null
@@ -0,0 +1,396 @@
+/* getdelays.c
+ *
+ * Utility to get per-pid and per-tgid delay accounting statistics
+ * Also illustrates usage of the taskstats interface
+ *
+ * Copyright (C) Shailabh Nagar, IBM Corp. 2005
+ * Copyright (C) Balbir Singh, IBM Corp. 2006
+ * Copyright (c) Jay Lan, SGI. 2006
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <unistd.h>
+#include <poll.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <signal.h>
+
+#include <linux/genetlink.h>
+#include <linux/taskstats.h>
+
+/*
+ * Generic macros for dealing with netlink sockets. Might be duplicated
+ * elsewhere. It is recommended that commercial grade applications use
+ * libnl or libnetlink and use the interfaces provided by the library
+ */
+#define GENLMSG_DATA(glh)      ((void *)(NLMSG_DATA(glh) + GENL_HDRLEN))
+#define GENLMSG_PAYLOAD(glh)   (NLMSG_PAYLOAD(glh, 0) - GENL_HDRLEN)
+#define NLA_DATA(na)           ((void *)((char*)(na) + NLA_HDRLEN))
+#define NLA_PAYLOAD(len)       (len - NLA_HDRLEN)
+
+#define err(code, fmt, arg...) do { printf(fmt, ##arg); exit(code); } while (0)
+int done = 0;
+int rcvbufsz=0;
+
+    char name[100];
+int dbg=0, print_delays=0;
+__u64 stime, utime;
+#define PRINTF(fmt, arg...) {                  \
+           if (dbg) {                          \
+               printf(fmt, ##arg);             \
+           }                                   \
+       }
+
+/* Maximum size of response requested or message sent */
+#define MAX_MSG_SIZE   256
+/* Maximum number of cpus expected to be specified in a cpumask */
+#define MAX_CPUS       32
+/* Maximum length of pathname to log file */
+#define MAX_FILENAME   256
+
+struct msgtemplate {
+       struct nlmsghdr n;
+       struct genlmsghdr g;
+       char buf[MAX_MSG_SIZE];
+};
+
+char cpumask[100+6*MAX_CPUS];
+
+/*
+ * Create a raw netlink socket and bind
+ */
+static int create_nl_socket(int protocol)
+{
+       int fd;
+       struct sockaddr_nl local;
+
+       fd = socket(AF_NETLINK, SOCK_RAW, protocol);
+       if (fd < 0)
+               return -1;
+
+       if (rcvbufsz)
+               if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
+                               &rcvbufsz, sizeof(rcvbufsz)) < 0) {
+                       printf("Unable to set socket rcv buf size to %d\n",
+                              rcvbufsz);
+                       return -1;
+               }
+
+       memset(&local, 0, sizeof(local));
+       local.nl_family = AF_NETLINK;
+
+       if (bind(fd, (struct sockaddr *) &local, sizeof(local)) < 0)
+               goto error;
+
+       return fd;
+error:
+       close(fd);
+       return -1;
+}
+
+
+int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
+            __u8 genl_cmd, __u16 nla_type,
+            void *nla_data, int nla_len)
+{
+       struct nlattr *na;
+       struct sockaddr_nl nladdr;
+       int r, buflen;
+       char *buf;
+
+       struct msgtemplate msg;
+
+       msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
+       msg.n.nlmsg_type = nlmsg_type;
+       msg.n.nlmsg_flags = NLM_F_REQUEST;
+       msg.n.nlmsg_seq = 0;
+       msg.n.nlmsg_pid = nlmsg_pid;
+       msg.g.cmd = genl_cmd;
+       msg.g.version = 0x1;
+       na = (struct nlattr *) GENLMSG_DATA(&msg);
+       na->nla_type = nla_type;
+       na->nla_len = nla_len + 1 + NLA_HDRLEN;
+       memcpy(NLA_DATA(na), nla_data, nla_len);
+       msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len);
+
+       buf = (char *) &msg;
+       buflen = msg.n.nlmsg_len ;
+       memset(&nladdr, 0, sizeof(nladdr));
+       nladdr.nl_family = AF_NETLINK;
+       while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *) &nladdr,
+                          sizeof(nladdr))) < buflen) {
+               if (r > 0) {
+                       buf += r;
+                       buflen -= r;
+               } else if (errno != EAGAIN)
+                       return -1;
+       }
+       return 0;
+}
+
+
+/*
+ * Probe the controller in genetlink to find the family id
+ * for the TASKSTATS family
+ */
+int get_family_id(int sd)
+{
+       struct {
+               struct nlmsghdr n;
+               struct genlmsghdr g;
+               char buf[256];
+       } ans;
+
+       int id, rc;
+       struct nlattr *na;
+       int rep_len;
+
+       strcpy(name, TASKSTATS_GENL_NAME);
+       rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
+                       CTRL_ATTR_FAMILY_NAME, (void *)name,
+                       strlen(TASKSTATS_GENL_NAME)+1);
+
+       rep_len = recv(sd, &ans, sizeof(ans), 0);
+       if (ans.n.nlmsg_type == NLMSG_ERROR ||
+           (rep_len < 0) || !NLMSG_OK((&ans.n), rep_len))
+               return 0;
+
+       na = (struct nlattr *) GENLMSG_DATA(&ans);
+       na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len));
+       if (na->nla_type == CTRL_ATTR_FAMILY_ID) {
+               id = *(__u16 *) NLA_DATA(na);
+       }
+       return id;
+}
+
+void print_delayacct(struct taskstats *t)
+{
+       printf("\n\nCPU   %15s%15s%15s%15s\n"
+              "      %15llu%15llu%15llu%15llu\n"
+              "IO    %15s%15s\n"
+              "      %15llu%15llu\n"
+              "MEM   %15s%15s\n"
+              "      %15llu%15llu\n\n",
+              "count", "real total", "virtual total", "delay total",
+              t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total,
+              t->cpu_delay_total,
+              "count", "delay total",
+              t->blkio_count, t->blkio_delay_total,
+              "count", "delay total", t->swapin_count, t->swapin_delay_total);
+}
+
+int main(int argc, char *argv[])
+{
+       int c, rc, rep_len, aggr_len, len2, cmd_type;
+       __u16 id;
+       __u32 mypid;
+
+       struct nlattr *na;
+       int nl_sd = -1;
+       int len = 0;
+       pid_t tid = 0;
+       pid_t rtid = 0;
+
+       int fd = 0;
+       int count = 0;
+       int write_file = 0;
+       int maskset = 0;
+       char logfile[128];
+       int loop = 0;
+
+       struct msgtemplate msg;
+
+       while (1) {
+               c = getopt(argc, argv, "dw:r:m:t:p:v:l");
+               if (c < 0)
+                       break;
+
+               switch (c) {
+               case 'd':
+                       printf("print delayacct stats ON\n");
+                       print_delays = 1;
+                       break;
+               case 'w':
+                       strncpy(logfile, optarg, MAX_FILENAME);
+                       printf("write to file %s\n", logfile);
+                       write_file = 1;
+                       break;
+               case 'r':
+                       rcvbufsz = atoi(optarg);
+                       printf("receive buf size %d\n", rcvbufsz);
+                       if (rcvbufsz < 0)
+                               err(1, "Invalid rcv buf size\n");
+                       break;
+               case 'm':
+                       strncpy(cpumask, optarg, sizeof(cpumask));
+                       maskset = 1;
+                       printf("cpumask %s maskset %d\n", cpumask, maskset);
+                       break;
+               case 't':
+                       tid = atoi(optarg);
+                       if (!tid)
+                               err(1, "Invalid tgid\n");
+                       cmd_type = TASKSTATS_CMD_ATTR_TGID;
+                       print_delays = 1;
+                       break;
+               case 'p':
+                       tid = atoi(optarg);
+                       if (!tid)
+                               err(1, "Invalid pid\n");
+                       cmd_type = TASKSTATS_CMD_ATTR_PID;
+                       print_delays = 1;
+                       break;
+               case 'v':
+                       printf("debug on\n");
+                       dbg = 1;
+                       break;
+               case 'l':
+                       printf("listen forever\n");
+                       loop = 1;
+                       break;
+               default:
+                       printf("Unknown option %d\n", c);
+                       exit(-1);
+               }
+       }
+
+       if (write_file) {
+               fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC,
+                         S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+               if (fd == -1) {
+                       perror("Cannot open output file\n");
+                       exit(1);
+               }
+       }
+
+       if ((nl_sd = create_nl_socket(NETLINK_GENERIC)) < 0)
+               err(1, "error creating Netlink socket\n");
+
+
+       mypid = getpid();
+       id = get_family_id(nl_sd);
+       if (!id) {
+               printf("Error getting family id, errno %d", errno);
+               goto err;
+       }
+       PRINTF("family id %d\n", id);
+
+       if (maskset) {
+               rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET,
+                             TASKSTATS_CMD_ATTR_REGISTER_CPUMASK,
+                             &cpumask, sizeof(cpumask));
+               PRINTF("Sent register cpumask, retval %d\n", rc);
+               if (rc < 0) {
+                       printf("error sending register cpumask\n");
+                       goto err;
+               }
+       }
+
+       if (tid) {
+               rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET,
+                             cmd_type, &tid, sizeof(__u32));
+               PRINTF("Sent pid/tgid, retval %d\n", rc);
+               if (rc < 0) {
+                       printf("error sending tid/tgid cmd\n");
+                       goto done;
+               }
+       }
+
+       do {
+               int i;
+
+               rep_len = recv(nl_sd, &msg, sizeof(msg), 0);
+               PRINTF("received %d bytes\n", rep_len);
+
+               if (rep_len < 0) {
+                       printf("nonfatal reply error: errno %d\n", errno);
+                       continue;
+               }
+               if (msg.n.nlmsg_type == NLMSG_ERROR ||
+                   !NLMSG_OK((&msg.n), rep_len)) {
+                       printf("fatal reply error,  errno %d\n", errno);
+                       goto done;
+               }
+
+               PRINTF("nlmsghdr size=%d, nlmsg_len=%d, rep_len=%d\n",
+                      sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len);
+
+
+               rep_len = GENLMSG_PAYLOAD(&msg.n);
+
+               na = (struct nlattr *) GENLMSG_DATA(&msg);
+               len = 0;
+               i = 0;
+               while (len < rep_len) {
+                       len += NLA_ALIGN(na->nla_len);
+                       switch (na->nla_type) {
+                       case TASKSTATS_TYPE_AGGR_TGID:
+                               /* Fall through */
+                       case TASKSTATS_TYPE_AGGR_PID:
+                               aggr_len = NLA_PAYLOAD(na->nla_len);
+                               len2 = 0;
+                               /* For nested attributes, na follows */
+                               na = (struct nlattr *) NLA_DATA(na);
+                               done = 0;
+                               while (len2 < aggr_len) {
+                                       switch (na->nla_type) {
+                                       case TASKSTATS_TYPE_PID:
+                                               rtid = *(int *) NLA_DATA(na);
+                                               if (print_delays)
+                                                       printf("PID\t%d\n", rtid);
+                                               break;
+                                       case TASKSTATS_TYPE_TGID:
+                                               rtid = *(int *) NLA_DATA(na);
+                                               if (print_delays)
+                                                       printf("TGID\t%d\n", rtid);
+                                               break;
+                                       case TASKSTATS_TYPE_STATS:
+                                               count++;
+                                               if (print_delays)
+                                                       print_delayacct((struct taskstats *) NLA_DATA(na));
+                                               if (fd) {
+                                                       if (write(fd, NLA_DATA(na), na->nla_len) < 0) {
+                                                               err(1,"write error\n");
+                                                       }
+                                               }
+                                               if (!loop)
+                                                       goto done;
+                                               break;
+                                       default:
+                                               printf("Unknown nested nla_type %d\n", na->nla_type);
+                                               break;
+                                       }
+                                       len2 += NLA_ALIGN(na->nla_len);
+                                       na = (struct nlattr *) ((char *) na + len2);
+                               }
+                               break;
+
+                       default:
+                               printf("Unknown nla_type %d\n", na->nla_type);
+                               break;
+                       }
+                       na = (struct nlattr *) (GENLMSG_DATA(&msg) + len);
+               }
+       } while (loop);
+done:
+       if (maskset) {
+               rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET,
+                             TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK,
+                             &cpumask, sizeof(cpumask));
+               printf("Sent deregister mask, retval %d\n", rc);
+               if (rc < 0)
+                       err(rc, "error sending deregister cpumask\n");
+       }
+err:
+       close(nl_sd);
+       if (fd)
+               close(fd);
+       return 0;
+}
diff --git a/Documentation/accounting/taskstats.txt b/Documentation/accounting/taskstats.txt
new file mode 100644 (file)
index 0000000..92ebf29
--- /dev/null
@@ -0,0 +1,181 @@
+Per-task statistics interface
+-----------------------------
+
+
+Taskstats is a netlink-based interface for sending per-task and
+per-process statistics from the kernel to userspace.
+
+Taskstats was designed for the following benefits:
+
+- efficiently provide statistics during lifetime of a task and on its exit
+- unified interface for multiple accounting subsystems
+- extensibility for use by future accounting patches
+
+Terminology
+-----------
+
+"pid", "tid" and "task" are used interchangeably and refer to the standard
+Linux task defined by struct task_struct.  per-pid stats are the same as
+per-task stats.
+
+"tgid", "process" and "thread group" are used interchangeably and refer to the
+tasks that share an mm_struct i.e. the traditional Unix process. Despite the
+use of tgid, there is no special treatment for the task that is thread group
+leader - a process is deemed alive as long as it has any task belonging to it.
+
+Usage
+-----
+
+To get statistics during a task's lifetime, userspace opens a unicast netlink
+socket (NETLINK_GENERIC family) and sends commands specifying a pid or a tgid.
+The response contains statistics for a task (if pid is specified) or the sum of
+statistics for all tasks of the process (if tgid is specified).
+
+To obtain statistics for tasks which are exiting, the userspace listener
+sends a register command and specifies a cpumask. Whenever a task exits on
+one of the cpus in the cpumask, its per-pid statistics are sent to the
+registered listener. Using cpumasks allows the data received by one listener
+to be limited and assists in flow control over the netlink interface and is
+explained in more detail below.
+
+If the exiting task is the last thread exiting its thread group,
+an additional record containing the per-tgid stats is also sent to userspace.
+The latter contains the sum of per-pid stats for all threads in the thread
+group, both past and present.
+
+getdelays.c is a simple utility demonstrating usage of the taskstats interface
+for reporting delay accounting statistics. Users can register cpumasks,
+send commands and process responses, listen for per-tid/tgid exit data,
+write the data received to a file and do basic flow control by increasing
+receive buffer sizes.
+
+Interface
+---------
+
+The user-kernel interface is encapsulated in include/linux/taskstats.h
+
+To avoid this documentation becoming obsolete as the interface evolves, only
+an outline of the current version is given. taskstats.h always overrides the
+description here.
+
+struct taskstats is the common accounting structure for both per-pid and
+per-tgid data. It is versioned and can be extended by each accounting subsystem
+that is added to the kernel. The fields and their semantics are defined in the
+taskstats.h file.
+
+The data exchanged between user and kernel space is a netlink message belonging
+to the NETLINK_GENERIC family and using the netlink attributes interface.
+The messages are in the format
+
+    +----------+- - -+-------------+-------------------+
+    | nlmsghdr | Pad |  genlmsghdr | taskstats payload |
+    +----------+- - -+-------------+-------------------+
+
+
+The taskstats payload is one of the following three kinds:
+
+1. Commands: Sent from user to kernel. Commands to get data on
+a pid/tgid consist of one attribute, of type TASKSTATS_CMD_ATTR_PID/TGID,
+containing a u32 pid or tgid in the attribute payload. The pid/tgid denotes
+the task/process for which userspace wants statistics.
+
+Commands to register/deregister interest in exit data from a set of cpus
+consist of one attribute, of type
+TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK and contain a cpumask in the
+attribute payload. The cpumask is specified as an ascii string of
+comma-separated cpu ranges e.g. to listen to exit data from cpus 1,2,3,5,7,8
+the cpumask would be "1-3,5,7-8". If userspace forgets to deregister interest
+in cpus before closing the listening socket, the kernel cleans up its interest
+set over time. However, for the sake of efficiency, an explicit deregistration
+is advisable.
+
+2. Response for a command: sent from the kernel in response to a userspace
+command. The payload is a series of three attributes of type:
+
+a) TASKSTATS_TYPE_AGGR_PID/TGID : attribute containing no payload but indicates
+a pid/tgid will be followed by some stats.
+
+b) TASKSTATS_TYPE_PID/TGID: attribute whose payload is the pid/tgid whose stats
+is being returned.
+
+c) TASKSTATS_TYPE_STATS: attribute with a struct taskstsats as payload. The
+same structure is used for both per-pid and per-tgid stats.
+
+3. New message sent by kernel whenever a task exits. The payload consists of a
+   series of attributes of the following type:
+
+a) TASKSTATS_TYPE_AGGR_PID: indicates next two attributes will be pid+stats
+b) TASKSTATS_TYPE_PID: contains exiting task's pid
+c) TASKSTATS_TYPE_STATS: contains the exiting task's per-pid stats
+d) TASKSTATS_TYPE_AGGR_TGID: indicates next two attributes will be tgid+stats
+e) TASKSTATS_TYPE_TGID: contains tgid of process to which task belongs
+f) TASKSTATS_TYPE_STATS: contains the per-tgid stats for exiting task's process
+
+
+per-tgid stats
+--------------
+
+Taskstats provides per-process stats, in addition to per-task stats, since
+resource management is often done at a process granularity and aggregating task
+stats in userspace alone is inefficient and potentially inaccurate (due to lack
+of atomicity).
+
+However, maintaining per-process, in addition to per-task stats, within the
+kernel has space and time overheads. To address this, the taskstats code
+accumalates each exiting task's statistics into a process-wide data structure.
+When the last task of a process exits, the process level data accumalated also
+gets sent to userspace (along with the per-task data).
+
+When a user queries to get per-tgid data, the sum of all other live threads in
+the group is added up and added to the accumalated total for previously exited
+threads of the same thread group.
+
+Extending taskstats
+-------------------
+
+There are two ways to extend the taskstats interface to export more
+per-task/process stats as patches to collect them get added to the kernel
+in future:
+
+1. Adding more fields to the end of the existing struct taskstats. Backward
+   compatibility is ensured by the version number within the
+   structure. Userspace will use only the fields of the struct that correspond
+   to the version its using.
+
+2. Defining separate statistic structs and using the netlink attributes
+   interface to return them. Since userspace processes each netlink attribute
+   independently, it can always ignore attributes whose type it does not
+   understand (because it is using an older version of the interface).
+
+
+Choosing between 1. and 2. is a matter of trading off flexibility and
+overhead. If only a few fields need to be added, then 1. is the preferable
+path since the kernel and userspace don't need to incur the overhead of
+processing new netlink attributes. But if the new fields expand the existing
+struct too much, requiring disparate userspace accounting utilities to
+unnecessarily receive large structures whose fields are of no interest, then
+extending the attributes structure would be worthwhile.
+
+Flow control for taskstats
+--------------------------
+
+When the rate of task exits becomes large, a listener may not be able to keep
+up with the kernel's rate of sending per-tid/tgid exit data leading to data
+loss. This possibility gets compounded when the taskstats structure gets
+extended and the number of cpus grows large.
+
+To avoid losing statistics, userspace should do one or more of the following:
+
+- increase the receive buffer sizes for the netlink sockets opened by
+listeners to receive exit data.
+
+- create more listeners and reduce the number of cpus being listened to by
+each listener. In the extreme case, there could be one listener for each cpu.
+Users may also consider setting the cpu affinity of the listener to the subset
+of cpus to which it listens, especially if they are listening to just one cpu.
+
+Despite these measures, if the userspace receives ENOBUFS error messages
+indicated overflow of receive buffers, it should take measures to handle the
+loss of data.
+
+----
index 70d96a62e5e12e2dcdcd58a64e623e0f7678c106..7b3d969d29642cf6cef4982cde9dc8bb89e7710d 100644 (file)
@@ -35,15 +35,14 @@ the vendor should tie the parity status bits to 0 if they do not intend
 to generate parity.  Some vendors do not do this, and thus the parity bit
 can "float" giving false positives.
 
-The PCI Parity EDAC device has the ability to "skip" known flaky
-cards during the parity scan. These are set by the parity "blacklist"
-interface in the sysfs for PCI Parity. (See the PCI section in the sysfs
-section below.) There is also a parity "whitelist" which is used as
-an explicit list of devices to scan, while the blacklist is a list
-of devices to skip.
+[There are patches in the kernel queue which will allow for storage of
+quirks of PCI devices reporting false parity positives. The 2.6.18
+kernel should have those patches included. When that becomes available,
+then EDAC will be patched to utilize that information to "skip" such
+devices.]
 
-EDAC will have future error detectors that will be added or integrated
-into EDAC in the following list:
+EDAC will have future error detectors that will be integrated with
+EDAC or added to it, in the following list:
 
        MCE     Machine Check Exception
        MCA     Machine Check Architecture
@@ -93,22 +92,24 @@ EDAC lives in the /sys/devices/system/edac directory. Within this directory
 there currently reside 2 'edac' components:
 
        mc      memory controller(s) system
-       pci     PCI status system
+       pci     PCI control and status system
 
 
 ============================================================================
 Memory Controller (mc) Model
 
 First a background on the memory controller's model abstracted in EDAC.
-Each mc device controls a set of DIMM memory modules. These modules are
+Each 'mc' device controls a set of DIMM memory modules. These modules are
 laid out in a Chip-Select Row (csrowX) and Channel table (chX). There can
-be multiple csrows and two channels.
+be multiple csrows and multiple channels.
 
 Memory controllers allow for several csrows, with 8 csrows being a typical value.
 Yet, the actual number of csrows depends on the electrical "loading"
 of a given motherboard, memory controller and DIMM characteristics.
 
 Dual channels allows for 128 bit data transfers to the CPU from memory.
+Some newer chipsets allow for more than 2 channels, like Fully Buffered DIMMs
+(FB-DIMMs). The following example will assume 2 channels:
 
 
                Channel 0       Channel 1
@@ -234,23 +235,15 @@ Polling period control file:
        The time period, in milliseconds, for polling for error information.
        Too small a value wastes resources.  Too large a value might delay
        necessary handling of errors and might loose valuable information for
-       locating the error.  1000 milliseconds (once each second) is about
-       right for most uses.
+       locating the error.  1000 milliseconds (once each second) is the current
+       default. Systems which require all the bandwidth they can get, may
+       increase this.
 
        LOAD TIME: module/kernel parameter: poll_msec=[0|1]
 
        RUN TIME: echo "1000" >/sys/devices/system/edac/mc/poll_msec
 
 
-Module Version read-only attribute file:
-
-       'mc_version'
-
-       The EDAC CORE module's version and compile date are shown here to
-       indicate what EDAC is running.
-
-
-
 ============================================================================
 'mcX' DIRECTORIES
 
@@ -284,35 +277,6 @@ Seconds since last counter reset control file:
 
 
 
-DIMM capability attribute file:
-
-       'edac_capability'
-
-       The EDAC (Error Detection and Correction) capabilities/modes of
-       the memory controller hardware.
-
-
-DIMM Current Capability attribute file:
-
-       'edac_current_capability'
-
-       The EDAC capabilities available with the hardware
-       configuration.  This may not be the same as "EDAC capability"
-       if the correct memory is not used.  If a memory controller is
-       capable of EDAC, but DIMMs without check bits are in use, then
-       Parity, SECDED, S4ECD4ED capabilities will not be available
-       even though the memory controller might be capable of those
-       modes with the proper memory loaded.
-
-
-Memory Type supported on this controller attribute file:
-
-       'supported_mem_type'
-
-       This attribute file displays the memory type, usually
-       buffered and unbuffered DIMMs.
-
-
 Memory Controller name attribute file:
 
        'mc_name'
@@ -321,16 +285,6 @@ Memory Controller name attribute file:
        that is being utilized.
 
 
-Memory Controller Module name attribute file:
-
-       'module_name'
-
-       This attribute file displays the memory controller module name,
-       version and date built.  The name of the memory controller
-       hardware - some drivers work with multiple controllers and
-       this field shows which hardware is present.
-
-
 Total memory managed by this memory controller attribute file:
 
        'size_mb'
@@ -432,6 +386,9 @@ Memory Type attribute file:
 
        This attribute file will display what type of memory is currently
        on this csrow. Normally, either buffered or unbuffered memory.
+       Examples:
+               Registered-DDR
+               Unbuffered-DDR
 
 
 EDAC Mode of operation attribute file:
@@ -446,8 +403,13 @@ Device type attribute file:
 
        'dev_type'
 
-       This attribute file will display what type of DIMM device is
-       being utilized. Example:  x4
+       This attribute file will display what type of DRAM device is
+       being utilized on this DIMM.
+       Examples:
+               x1
+               x2
+               x4
+               x8
 
 
 Channel 0 CE Count attribute file:
@@ -522,10 +484,10 @@ SYSTEM LOGGING
 If logging for UEs and CEs are enabled then system logs will have
 error notices indicating errors that have been detected:
 
-MC0: CE page 0x283, offset 0xce0, grain 8, syndrome 0x6ec3, row 0,
+EDAC MC0: CE page 0x283, offset 0xce0, grain 8, syndrome 0x6ec3, row 0,
 channel 1 "DIMM_B1": amd76x_edac
 
-MC0: CE page 0x1e5, offset 0xfb0, grain 8, syndrome 0xb741, row 0,
+EDAC MC0: CE page 0x1e5, offset 0xfb0, grain 8, syndrome 0xb741, row 0,
 channel 1 "DIMM_B1": amd76x_edac
 
 
@@ -610,64 +572,4 @@ Parity Count:
 
 
 
-PCI Device Whitelist:
-
-       'pci_parity_whitelist'
-
-       This control file allows for an explicit list of PCI devices to be
-       scanned for parity errors. Only devices found on this list will
-       be examined.  The list is a line of hexadecimal VENDOR and DEVICE
-       ID tuples:
-
-       1022:7450,1434:16a6
-
-       One or more can be inserted, separated by a comma.
-
-       To write the above list doing the following as one command line:
-
-       echo "1022:7450,1434:16a6"
-               > /sys/devices/system/edac/pci/pci_parity_whitelist
-
-
-
-       To display what the whitelist is, simply 'cat' the same file.
-
-
-PCI Device Blacklist:
-
-       'pci_parity_blacklist'
-
-       This control file allows for a list of PCI devices to be
-       skipped for scanning.
-       The list is a line of hexadecimal VENDOR and DEVICE ID tuples:
-
-       1022:7450,1434:16a6
-
-       One or more can be inserted, separated by a comma.
-
-       To write the above list doing the following as one command line:
-
-       echo "1022:7450,1434:16a6"
-               > /sys/devices/system/edac/pci/pci_parity_blacklist
-
-
-       To display what the whitelist currently contains,
-       simply 'cat' the same file.
-
 =======================================================================
-
-PCI Vendor and Devices IDs can be obtained with the lspci command. Using
-the -n option lspci will display the vendor and device IDs. The system
-administrator will have to determine which devices should be scanned or
-skipped.
-
-
-
-The two lists (white and black) are prioritized. blacklist is the lower
-priority and will NOT be utilized when a whitelist has been set.
-Turn OFF a whitelist by an empty echo command:
-
-       echo > /sys/devices/system/edac/pci/pci_parity_whitelist
-
-and any previous blacklist will be utilized.
-
index 99f219a01e0e1f179021d370039ed46d1ba9404c..9d3a0775a11df394f3504dbd13ee60af75db4c3b 100644 (file)
@@ -55,14 +55,6 @@ Who: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
 
 ---------------------------
 
-What:  remove EXPORT_SYMBOL(insert_resource)
-When:  April 2006
-Files: kernel/resource.c
-Why:   No modular usage in the kernel.
-Who:   Adrian Bunk <bunk@stusta.de>
-
----------------------------
-
 What:  PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
 When:  November 2005
 Files: drivers/pcmcia/: pcmcia_ioctl.c
@@ -166,17 +158,6 @@ Who:       Arjan van de Ven <arjan@linux.intel.com>
 
 ---------------------------
 
-What:  remove EXPORT_SYMBOL(tasklist_lock)
-When:  August 2006
-Files: kernel/fork.c
-Why:   tasklist_lock protects the kernel internal task list.  Modules have
-       no business looking at it, and all instances in drivers have been due
-       to use of too-lowlevel APIs.  Having this symbol exported prevents
-       moving to more scalable locking schemes for the task list.
-Who:   Christoph Hellwig <hch@lst.de>
-
----------------------------
-
 What:  mount/umount uevents
 When:  February 2007
 Why:   These events are not correct, and do not properly let userspace know
@@ -266,3 +247,14 @@ Why:       The interrupt related SA_* flags are replaced by IRQF_* to move them
 Who:   Thomas Gleixner <tglx@linutronix.de>
 
 ---------------------------
+
+What:  i2c-ite and i2c-algo-ite drivers
+When:  September 2006
+Why:   These drivers never compiled since they were added to the kernel
+       tree 5 years ago. This feature removal can be reevaluated if
+       someone shows interest in the drivers, fixes them and takes over
+       maintenance.
+       http://marc.theaimsgroup.com/?l=linux-mips&m=115040510817448
+Who:   Jean Delvare <khali@linux-fr.org>
+
+---------------------------
index d31efbbdfe50c49055664f610d391b660a821749..247d7f619aa2c8cc86e7777004c198428798ff9c 100644 (file)
@@ -142,8 +142,8 @@ see also dquot_operations section.
 
 --------------------------- file_system_type ---------------------------
 prototypes:
-       struct int (*get_sb) (struct file_system_type *, int,
-                       const char *, void *, struct vfsmount *);
+       int (*get_sb) (struct file_system_type *, int,
+                      const char *, void *, struct vfsmount *);
        void (*kill_sb) (struct super_block *);
 locking rules:
                may block       BKL
index 9d3aed628bc19a2a4c00c698ecdfe6d1377c6f8d..1cb7e8be927ad55acdd739bd31439096d9c55d5d 100644 (file)
@@ -113,8 +113,8 @@ members are defined:
 struct file_system_type {
        const char *name;
        int fs_flags;
-        struct int (*get_sb) (struct file_system_type *, int,
-                              const char *, void *, struct vfsmount *);
+        int (*get_sb) (struct file_system_type *, int,
+                       const char *, void *, struct vfsmount *);
         void (*kill_sb) (struct super_block *);
         struct module *owner;
         struct file_system_type * next;
index 69cdb527d58fbad1d846f549c053e422025f09a1..b2c0d61b39a2efd7efcfe95b3808059e2ad83ebf 100644 (file)
@@ -2,13 +2,36 @@ Kernel driver abituguru
 =======================
 
 Supported chips:
-  * Abit uGuru (Hardware Monitor part only)
+  * Abit uGuru revision 1-3 (Hardware Monitor part only)
     Prefix: 'abituguru'
     Addresses scanned: ISA 0x0E0
     Datasheet: Not available, this driver is based on reverse engineering.
        A "Datasheet" has been written based on the reverse engineering it
        should be available in the same dir as this file under the name
        abituguru-datasheet.
+    Note:
+       The uGuru is a microcontroller with onboard firmware which programs
+       it to behave as a hwmon IC. There are many different revisions of the
+       firmware and thus effectivly many different revisions of the uGuru.
+       Below is an incomplete list with which revisions are used for which
+       Motherboards:
+       uGuru 1.00    ~ 1.24    (AI7, KV8-MAX3, AN7) (1)
+       uGuru 2.0.0.0 ~ 2.0.4.2 (KV8-PRO)
+       uGuru 2.1.0.0 ~ 2.1.2.8 (AS8, AV8, AA8, AG8, AA8XE, AX8)
+       uGuru 2.2.0.0 ~ 2.2.0.6 (AA8 Fatal1ty)
+       uGuru 2.3.0.0 ~ 2.3.0.9 (AN8)
+       uGuru 3.0.0.0 ~ 3.0.1.2 (AW8, AL8, NI8)
+       uGuru 4.xxxxx?          (AT8 32X) (2)
+       1) For revisions 2 and 3 uGuru's the driver can autodetect the
+          sensortype (Volt or Temp) for bank1 sensors, for revision 1 uGuru's
+          this doesnot always work. For these uGuru's the autodection can
+          be overriden with the bank1_types module param. For all 3 known
+          revison 1 motherboards the correct use of this param is:
+          bank1_types=1,1,0,0,0,0,0,2,0,0,0,0,2,0,0,1
+          You may also need to specify the fan_sensors option for these boards
+          fan_sensors=5
+       2) The current version of the abituguru driver is known to NOT work
+          on these Motherboards
 
 Authors:
        Hans de Goede <j.w.r.degoede@hhs.nl>,
@@ -22,6 +45,11 @@ Module Parameters
 * force: bool          Force detection. Note this parameter only causes the
                        detection to be skipped, if the uGuru can't be read
                        the module initialization (insmod) will still fail.
+* bank1_types: int[]   Bank1 sensortype autodetection override:
+                         -1 autodetect (default)
+                          0 volt sensor
+                          1 temp sensor
+                          2 not connected
 * fan_sensors: int     Tell the driver how many fan speed sensors there are
                        on your motherboard. Default: 0 (autodetect).
 * pwms: int            Tell the driver how many fan speed controls (fan
@@ -29,7 +57,7 @@ Module Parameters
 * verbose: int         How verbose should the driver be? (0-3):
                           0 normal output
                           1 + verbose error reporting
-                          2 + sensors type probing info\n"
+                          2 + sensors type probing info (default)
                           3 + retryable error reporting
                        Default: 2 (the driver is still in the testing phase)
 
index 00a009b977e92b1a942d1138afdccf1b725df956..08d7b2dac69af0dd016e5799402c190e626293ae 100644 (file)
@@ -42,8 +42,8 @@ I suspect that this driver could be made to work for the following SiS
 chipsets as well: 635, and 635T. If anyone owns a board with those chips
 AND is willing to risk crashing & burning an otherwise well-behaved kernel
 in the name of progress... please contact me at <mhoffman@lightlink.com> or
-via the project's mailing list: <lm-sensors@lm-sensors.org>.  Please
-send bug reports and/or success stories as well.
+via the project's mailing list: <i2c@lm-sensors.org>.  Please send bug
+reports and/or success stories as well.
 
 
 TO DOs
index 149f62ba14a5023a59a1cbaa53550b053950edb2..e11f7728ec6f0691b940daa3d2ec5c7b182417fc 100644 (file)
@@ -448,6 +448,8 @@ running once the system is up.
                        Format: <area>[,<node>]
                        See also Documentation/networking/decnet.txt.
 
+       delayacct       [KNL] Enable per-task delay accounting
+
        dhash_entries=  [KNL]
                        Set number of hash buckets for dentry cache.
 
index 28d1bc3edb1c9b98f357ff1f0442aa18a79a60f9..46b9b389df35c52cf90ac544ea538f2e23c54361 100644 (file)
@@ -1015,10 +1015,9 @@ CPU from reordering them.
 There are some more advanced barrier functions:
 
  (*) set_mb(var, value)
- (*) set_wmb(var, value)
 
-     These assign the value to the variable and then insert at least a write
-     barrier after it, depending on the function.  They aren't guaranteed to
+     This assigns the value to the variable and then inserts at least a write
+     barrier after it, depending on the function.  It isn't guaranteed to
      insert anything more than a compiler barrier in a UP compilation.
 
 
index 70bc0dd43d6d52a93c63bc1e91c84ffeccd2d427..69ddc5c14b7990592a1710957985fd9b6e01369b 100644 (file)
@@ -65,7 +65,7 @@ the following functions or values:
        1. (optional) set up RTC routines
        2. (optional) calibrate and set the mips_counter_frequency
 
-  b) board_timer_setup - a function pointer.  Invoked at the end of time_init()
+  b) plat_timer_setup - a function pointer.  Invoked at the end of time_init()
        1. (optional) over-ride any decisions made in time_init()
        2. set up the irqaction for timer interrupt.
        3. enable the timer interrupt
@@ -116,19 +116,17 @@ Step 2:  the machine setup() function
 
   If you supply board_time_init(), set the function poointer.
 
-  Set the function pointer board_timer_setup() (mandatory)
 
-
-Step 3: implement rtc routines, board_time_init() and board_timer_setup()
+Step 3: implement rtc routines, board_time_init() and plat_timer_setup()
   if needed.
 
-  board_time_init() - 
+  board_time_init() -
        a) (optional) set up RTC routines, 
         b) (optional) calibrate and set the mips_counter_frequency
            (only needed if you intended to use fixed_rate_gettimeoffset
             or use cpu counter as timer interrupt source)
 
-  board_timer_setup() - 
+  plat_timer_setup() -
        a) (optional) over-write any choices made above by time_init().
        b) machine specific code should setup the timer irqaction.
        c) enable the timer interrupt
index d56dc71d943086e45a28b2448ee4038471f0e7eb..3cc953cb288ff8887fa8123b68a60288320dc5ca 100644 (file)
@@ -4,15 +4,16 @@ Mounting the root filesystem via NFS (nfsroot)
 Written 1996 by Gero Kuhlmann <gero@gkminix.han.de>
 Updated 1997 by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
 Updated 2006 by Nico Schottelius <nico-kernel-nfsroot@schottelius.org>
+Updated 2006 by Horms <horms@verge.net.au>
 
 
 
-If you want to use a diskless system, as an X-terminal or printer
-server for example, you have to put your root filesystem onto a
-non-disk device. This can either be a ramdisk (see initrd.txt in
-this directory for further information) or a filesystem mounted
-via NFS. The following text describes on how to use NFS for the
-root filesystem. For the rest of this text 'client' means the
+In order to use a diskless system, such as an X-terminal or printer server
+for example, it is necessary for the root filesystem to be present on a
+non-disk device. This may be an initramfs (see Documentation/filesystems/
+ramfs-rootfs-initramfs.txt), a ramdisk (see Documenation/initrd.txt) or a
+filesystem mounted via NFS. The following text describes on how to use NFS
+for the root filesystem. For the rest of this text 'client' means the
 diskless system, and 'server' means the NFS server.
 
 
@@ -21,11 +22,13 @@ diskless system, and 'server' means the NFS server.
 1.) Enabling nfsroot capabilities
     -----------------------------
 
-In order to use nfsroot you have to select support for NFS during
-kernel configuration. Note that NFS cannot be loaded as a module
-in this case. The configuration script will then ask you whether
-you want to use nfsroot, and if yes what kind of auto configuration
-system you want to use. Selecting both BOOTP and RARP is safe.
+In order to use nfsroot, NFS client support needs to be selected as
+built-in during configuration. Once this has been selected, the nfsroot
+option will become available, which should also be selected.
+
+In the networking options, kernel level autoconfiguration can be selected,
+along with the types of autoconfiguration to support. Selecting all of
+DHCP, BOOTP and RARP is safe.
 
 
 
@@ -33,11 +36,10 @@ system you want to use. Selecting both BOOTP and RARP is safe.
 2.) Kernel command line
     -------------------
 
-When the kernel has been loaded by a boot loader (either by loadlin,
-LILO or a network boot program) it has to be told what root fs device
-to use, and where to find the server and the name of the directory
-on the server to mount as root. This can be established by a couple
-of kernel command line parameters:
+When the kernel has been loaded by a boot loader (see below) it needs to be
+told what root fs device to use. And in the case of nfsroot, where to find
+both the server and the name of the directory on the server to mount as root.
+This can be established using the following kernel command line parameters:
 
 
 root=/dev/nfs
@@ -49,23 +51,21 @@ root=/dev/nfs
 
 nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
 
-  If the `nfsroot' parameter is NOT given on the command line, the default
-  "/tftpboot/%s" will be used.
+  If the `nfsroot' parameter is NOT given on the command line,
+  the default "/tftpboot/%s" will be used.
 
-  <server-ip>  Specifies the IP address of the NFS server. If this field
-               is not given, the default address as determined by the
-               `ip' variable (see below) is used. One use of this
-               parameter is for example to allow using different servers
-               for RARP and NFS. Usually you can leave this blank.
+  <server-ip>  Specifies the IP address of the NFS server.
+               The default address is determined by the `ip' parameter
+               (see below). This parameter allows the use of different
+               servers for IP autoconfiguration and NFS.
 
-  <root-dir>   Name of the directory on the server to mount as root. If
-               there is a "%s" token in the string, the token will be
-               replaced by the ASCII-representation of the client's IP
-               address.
+  <root-dir>   Name of the directory on the server to mount as root.
+               If there is a "%s" token in the string, it will be
+               replaced by the ASCII-representation of the client's
+               IP address.
 
   <nfs-options>        Standard NFS options. All options are separated by commas.
-               If the options field is not given, the following defaults
-               will be used:
+               The following defaults are used:
                        port            = as given by server portmap daemon
                        rsize           = 1024
                        wsize           = 1024
@@ -81,129 +81,174 @@ nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
 ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
 
   This parameter tells the kernel how to configure IP addresses of devices
-  and also how to set up the IP routing table. It was originally called `nfsaddrs',
-  but now the boot-time IP configuration works independently of NFS, so it
-  was renamed to `ip' and the old name remained as an alias for compatibility
-  reasons.
+  and also how to set up the IP routing table. It was originally called
+  `nfsaddrs', but now the boot-time IP configuration works independently of
+  NFS, so it was renamed to `ip' and the old name remained as an alias for
+  compatibility reasons.
 
   If this parameter is missing from the kernel command line, all fields are
   assumed to be empty, and the defaults mentioned below apply. In general
-  this means that the kernel tries to configure everything using both
-  RARP and BOOTP (depending on what has been enabled during kernel confi-
-  guration, and if both what protocol answer got in first).
+  this means that the kernel tries to configure everything using
+  autoconfiguration.
+
+  The <autoconf> parameter can appear alone as the value to the `ip'
+  parameter (without all the ':' characters before) in which case auto-
+  configuration is used.
+
+  <client-ip>  IP address of the client.
 
-  <client-ip>  IP address of the client. If empty, the address will either
-               be determined by RARP or BOOTP. What protocol is used de-
-               pends on what has been enabled during kernel configuration
-               and on the <autoconf> parameter. If this parameter is not
-               empty, neither RARP nor BOOTP will be used.
+               Default:  Determined using autoconfiguration.
 
   <server-ip>  IP address of the NFS server. If RARP is used to determine
                the client address and this parameter is NOT empty only
-               replies from the specified server are accepted. To use
-               different RARP and NFS server, specify your RARP server
-               here (or leave it blank), and specify your NFS server in
-               the `nfsroot' parameter (see above). If this entry is blank
-               the address of the server is used which answered the RARP
-               or BOOTP request.
-
-  <gw-ip>      IP address of a gateway if the server is on a different
-               subnet. If this entry is empty no gateway is used and the
-               server is assumed to be on the local network, unless a
-               value has been received by BOOTP.
-
-  <netmask>    Netmask for local network interface. If this is empty,
+               replies from the specified server are accepted.
+
+               Only required for for NFS root. That is autoconfiguration
+               will not be triggered if it is missing and NFS root is not
+               in operation.
+
+               Default: Determined using autoconfiguration.
+                        The address of the autoconfiguration server is used.
+
+  <gw-ip>      IP address of a gateway if the server is on a different subnet.
+
+               Default: Determined using autoconfiguration.
+
+  <netmask>    Netmask for local network interface. If unspecified
                the netmask is derived from the client IP address assuming
-               classful addressing, unless overridden in BOOTP reply.
+               classful addressing.
 
-  <hostname>   Name of the client. If empty, the client IP address is
-               used in ASCII notation, or the value received by BOOTP.
+               Default:  Determined using autoconfiguration.
 
-  <device>     Name of network device to use. If this is empty, all
-               devices are used for RARP and BOOTP requests, and the
-               first one we receive a reply on is configured. If you have
-               only one device, you can safely leave this blank.
+  <hostname>   Name of the client. May be supplied by autoconfiguration,
+               but its absence will not trigger autoconfiguration.
 
-  <autoconf>   Method to use for autoconfiguration. If this is either
-               'rarp' or 'bootp', the specified protocol is used.
-               If the value is 'both' or empty, both protocols are used
-               so far as they have been enabled during kernel configura-
-               tion. 'off' means no autoconfiguration.
+               Default: Client IP address is used in ASCII notation.
 
-  The <autoconf> parameter can appear alone as the value to the `ip'
-  parameter (without all the ':' characters before) in which case auto-
-  configuration is used.
+  <device>     Name of network device to use.
+
+               Default: If the host only has one device, it is used.
+                        Otherwise the device is determined using
+                        autoconfiguration. This is done by sending
+                        autoconfiguration requests out of all devices,
+                        and using the device that received the first reply.
 
+  <autoconf>   Method to use for autoconfiguration. In the case of options
+                which specify multiple autoconfiguration protocols,
+               requests are sent using all protocols, and the first one
+               to reply is used.
 
+               Only autoconfiguration protocols that have been compiled
+               into the kernel will be used, regardless of the value of
+               this option.
 
+                  off or none: don't use autoconfiguration (default)
+                 on or any:   use any protocol available in the kernel
+                 dhcp:        use DHCP
+                 bootp:       use BOOTP
+                 rarp:        use RARP
+                 both:        use both BOOTP and RARP but not DHCP
+                              (old option kept for backwards compatibility)
 
-3.) Kernel loader
-    -------------
+                Default: any
 
-To get the kernel into memory different approaches can be used. They
-depend on what facilities are available:
 
 
-3.1)  Writing the kernel onto a floppy using dd:
-       As always you can just write the kernel onto a floppy using dd,
-       but then it's not possible to use kernel command lines at all.
-       To substitute the 'root=' parameter, create a dummy device on any
-       linux system with major number 0 and minor number 255 using mknod:
 
-               mknod /dev/boot255 c 0 255
+3.) Boot Loader
+    ----------
 
-       Then copy the kernel zImage file onto a floppy using dd:
+To get the kernel into memory different approaches can be used.
+They depend on various facilities being available:
 
-               dd if=/usr/src/linux/arch/i386/boot/zImage of=/dev/fd0
 
-       And finally use rdev to set the root device:
+3.1)  Booting from a floppy using syslinux
 
-               rdev /dev/fd0 /dev/boot255
+       When building kernels, an easy way to create a boot floppy that uses
+       syslinux is to use the zdisk or bzdisk make targets which use
+       and bzimage images respectively. Both targets accept the
+       FDARGS parameter which can be used to set the kernel command line.
 
-       You can then remove the dummy device /dev/boot255 again. There
-       is no real device available for it.
-       The other two kernel command line parameters cannot be substi-
-       tuted with rdev. Therefore, using this method the kernel will
-       by default use RARP and/or BOOTP, and if it gets an answer via
-       RARP will mount the directory /tftpboot/<client-ip>/ as its
-       root. If it got a BOOTP answer the directory name in that answer
-       is used.
+       e.g.
+          make bzdisk FDARGS="root=/dev/nfs"
+
+       Note that the user running this command will need to have
+       access to the floppy drive device, /dev/fd0
+
+       For more information on syslinux, including how to create bootdisks
+       for prebuilt kernels, see http://syslinux.zytor.com/
+
+       N.B: Previously it was possible to write a kernel directly to
+            a floppy using dd, configure the boot device using rdev, and
+            boot using the resulting floppy. Linux no longer supports this
+            method of booting.
+
+3.2) Booting from a cdrom using isolinux
+
+       When building kernels, an easy way to create a bootable cdrom that
+       uses isolinux is to use the isoimage target which uses a bzimage
+       image. Like zdisk and bzdisk, this target accepts the FDARGS
+       parameter which can be used to set the kernel command line.
+
+       e.g.
+         make isoimage FDARGS="root=/dev/nfs"
+
+       The resulting iso image will be arch/<ARCH>/boot/image.iso
+       This can be written to a cdrom using a variety of tools including
+       cdrecord.
+
+       e.g.
+         cdrecord dev=ATAPI:1,0,0 arch/i386/boot/image.iso
+
+       For more information on isolinux, including how to create bootdisks
+       for prebuilt kernels, see http://syslinux.zytor.com/
 
 3.2) Using LILO
-       When using LILO you can specify all necessary command line
-       parameters with the 'append=' command in the LILO configuration
-       file. However, to use the 'root=' command you also need to
-       set up a dummy device as described in 3.1 above. For how to use
-       LILO and its 'append=' command please refer to the LILO
-       documentation.
+       When using LILO all the necessary command line parameters may be
+       specified using the 'append=' directive in the LILO configuration
+       file.
+
+       However, to use the 'root=' directive you also need to create
+       a dummy root device, which may be removed after LILO is run.
+
+       mknod /dev/boot255 c 0 255
+
+       For information on configuring LILO, please refer to its documentation.
 
 3.3) Using GRUB
-       When you use GRUB, you simply append the parameters after the kernel
-       specification: "kernel <kernel> <parameters>" (without the quotes).
+       When using GRUB, kernel parameter are simply appended after the kernel
+       specification: kernel <kernel> <parameters>
 
 3.4) Using loadlin
-       When you want to boot Linux from a DOS command prompt without
-       having a local hard disk to mount as root, you can use loadlin.
-       I was told that it works, but haven't used it myself yet. In
-       general you should be able to create a kernel command line simi-
-       lar to how LILO is doing it. Please refer to the loadlin docu-
-       mentation for further information.
+       loadlin may be used to boot Linux from a DOS command prompt without
+       requiring a local hard disk to mount as root. This has not been
+       thoroughly tested by the authors of this document, but in general
+       it should be possible configure the kernel command line similarly
+       to the configuration of LILO.
+
+       Please refer to the loadlin documentation for further information.
 
 3.5) Using a boot ROM
-       This is probably the most elegant way of booting a diskless
-       client. With a boot ROM the kernel gets loaded using the TFTP
-       protocol. As far as I know, no commercial boot ROMs yet
-       support booting Linux over the network, but there are two
-       free implementations of a boot ROM available on sunsite.unc.edu
-       and its mirrors. They are called 'netboot-nfs' and 'etherboot'.
-       Both contain everything you need to boot a diskless Linux client.
+       This is probably the most elegant way of booting a diskless client.
+       With a boot ROM the kernel is loaded using the TFTP protocol. The
+       authors of this document are not aware of any no commercial boot
+       ROMs that support booting Linux over the network. However, there
+       are two free implementations of a boot ROM, netboot-nfs and
+       etherboot, both of which are available on sunsite.unc.edu, and both
+       of which contain everything you need to boot a diskless Linux client.
 
 3.6) Using pxelinux
-       Using pxelinux you specify the kernel you built with
+       Pxelinux may be used to boot linux using the PXE boot loader
+       which is present on many modern network cards.
+
+       When using pxelinux, the kernel image is specified using
        "kernel <relative-path-below /tftpboot>". The nfsroot parameters
        are passed to the kernel by adding them to the "append" line.
-       You may perhaps also want to fine tune the console output,
-       see Documentation/serial-console.txt for serial console help.
+       It is common to use serial console in conjunction with pxeliunx,
+       see Documentation/serial-console.txt for more information.
+
+       For more information on isolinux, including how to create bootdisks
+       for prebuilt kernels, see http://syslinux.zytor.com/
 
 
 
index 7c25584e082c61919d4e51fde9fcc40d8e1f2bb8..52f75b7d51c2208bcb8352fd7c02e6e45b22474b 100644 (file)
@@ -6,7 +6,7 @@ Contents:
        1) Overview
        2) Kernel Command Line Parameters
        3) Using "rdev -r"
-       4) An Example of Creating a Compressed RAM Disk 
+       4) An Example of Creating a Compressed RAM Disk
 
 
 1) Overview
@@ -34,7 +34,7 @@ make it clearer.  The original "ramdisk=<ram_size>" has been kept around for
 compatibility reasons, but it may be removed in the future.
 
 The new RAM disk also has the ability to load compressed RAM disk images,
-allowing one to squeeze more programs onto an average installation or 
+allowing one to squeeze more programs onto an average installation or
 rescue floppy disk.
 
 
@@ -51,7 +51,7 @@ default is 4096 (4 MB) (8192 (8 MB) on S390).
        ===================
 
 This parameter tells the RAM disk driver how many bytes to use per block.  The
-default is 512.
+default is 1024 (BLOCK_SIZE).
 
 
 3) Using "rdev -r"
@@ -70,7 +70,7 @@ These numbers are no magical secrets, as seen below:
 ./arch/i386/kernel/setup.c:#define RAMDISK_PROMPT_FLAG          0x8000
 ./arch/i386/kernel/setup.c:#define RAMDISK_LOAD_FLAG            0x4000
 
-Consider a typical two floppy disk setup, where you will have the 
+Consider a typical two floppy disk setup, where you will have the
 kernel on disk one, and have already put a RAM disk image onto disk #2.
 
 Hence you want to set bits 0 to 13 as 0, meaning that your RAM disk
@@ -97,12 +97,12 @@ Since the default start = 0 and the default prompt = 1, you could use:
        append = "load_ramdisk=1"
 
 
-4) An Example of Creating a Compressed RAM Disk 
+4) An Example of Creating a Compressed RAM Disk
 ----------------------------------------------
 
 To create a RAM disk image, you will need a spare block device to
 construct it on. This can be the RAM disk device itself, or an
-unused disk partition (such as an unmounted swap partition). For this 
+unused disk partition (such as an unmounted swap partition). For this
 example, we will use the RAM disk device, "/dev/ram0".
 
 Note: This technique should not be done on a machine with less than 8 MB
index 69866d5997a45ab472e1da5a0e15394f0e2e8a6c..b8dc51ca776c84b9e4eae4edf1c8477dc337e19a 100644 (file)
   }        
 
   /* PCI IDs */
-  static struct pci_device_id snd_mychip_ids[] __devinitdata = {
+  static struct pci_device_id snd_mychip_ids[] = {
           { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR,
             PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
           ....
         <informalexample>
           <programlisting>
 <![CDATA[
-  static struct pci_device_id snd_mychip_ids[] __devinitdata = {
+  static struct pci_device_id snd_mychip_ids[] = {
           { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR,
             PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
           ....
index f001cd93b79b68d62ae1803936c506e2733057a8..02b0f7beb6d1623e542d7610e91971eeca2ce614 100644 (file)
@@ -399,10 +399,10 @@ REINER SCT cyberJack pinpad/e-com USB chipcard reader
 
 Prolific PL2303 Driver
 
-  This driver support any device that has the PL2303 chip from Prolific
+  This driver supports any device that has the PL2303 chip from Prolific
   in it.  This includes a number of single port USB to serial
   converters and USB GPS devices.  Devices from Aten (the UC-232) and
-  IO-Data work with this driver.
+  IO-Data work with this driver, as does the DCU-11 mobile-phone cable.
 
   For any questions or problems with this driver, please contact Greg
   Kroah-Hartman at greg@kroah.com
index 196a31c97524eac2ee9fc5235cb1e92f38ca5c7a..e99028ca2f7c9da7fe87ca1bc8ed8c961e183feb 100644 (file)
@@ -274,7 +274,7 @@ S:  Maintained
 ALI1563 I2C DRIVER
 P:     Rudolf Marek
 M:     r.marek@sh.cvut.cz
-L:     lm-sensors@lm-sensors.org
+L:     i2c@lm-sensors.org
 S:     Maintained
 
 ALPHA PORT
@@ -601,6 +601,15 @@ W: http://linuxtv.org
 T:     git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
 S:     Maintained
 
+CALGARY x86-64 IOMMU
+P:     Muli Ben-Yehuda
+M:     muli@il.ibm.com
+P:     Jon D. Mason
+M:     jdmason@us.ibm.com
+L:     linux-kernel@vger.kernel.org
+L:     discuss@x86-64.org
+S:     Maintained
+
 COMMON INTERNET FILE SYSTEM (CIFS)
 P:     Steve French
 M:     sfrench@samba.org
@@ -762,6 +771,7 @@ M:  aliakc@web.de
 P:     Jamie Lenehan
 M:     lenehan@twibble.org
 W:     http://twibble.org/dist/dc395x/
+L:     dc395x@twibble.org
 L:     http://lists.twibble.org/mailman/listinfo/dc395x/
 S:     Maintained
 
@@ -1240,7 +1250,7 @@ S:        Maintained
 I2C SUBSYSTEM
 P:     Jean Delvare
 M:     khali@linux-fr.org
-L:     lm-sensors@lm-sensors.org
+L:     i2c@lm-sensors.org
 W:     http://www.lm-sensors.nu/
 T:     quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
 S:     Maintained
@@ -1492,6 +1502,7 @@ P:        Yi Zhu
 M:     yi.zhu@intel.com
 P:     James Ketrenos
 M:     jketreno@linux.intel.com
+L:     ipw2100-devel@lists.sourceforge.net
 L:     http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
 W:     http://ipw2100.sourceforge.net
 S:     Supported
@@ -1501,6 +1512,7 @@ P:        Yi Zhu
 M:     yi.zhu@intel.com
 P:     James Ketrenos
 M:     jketreno@linux.intel.com
+L:     ipw2100-devel@lists.sourceforge.net
 L:     http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
 W:     http://ipw2200.sourceforge.net
 S:     Supported
@@ -2084,7 +2096,7 @@ S:      Maintained
 OPENCORES I2C BUS DRIVER
 P:     Peter Korsgaard
 M:     jacmet@sunsite.dk
-L:     lm-sensors@lm-sensors.org
+L:     i2c@lm-sensors.org
 S:     Maintained
 
 ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
@@ -2217,6 +2229,7 @@ S:        Maintained
 
 PCMCIA SUBSYSTEM
 P:     Linux PCMCIA Team
+L:     linux-pcmcia@lists.infradead.org
 L:     http://lists.infradead.org/mailman/listinfo/linux-pcmcia
 T:     git kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git
 S:     Maintained
@@ -2227,6 +2240,12 @@ M:       tsbogend@alpha.franken.de
 L:     netdev@vger.kernel.org
 S:     Maintained
 
+PER-TASK DELAY ACCOUNTING
+P:     Shailabh Nagar
+M:     nagar@watson.ibm.com
+L:     linux-kernel@vger.kernel.org
+S:     Maintained
+
 PERSONALITY HANDLING
 P:     Christoph Hellwig
 M:     hch@infradead.org
@@ -2666,6 +2685,11 @@ M:       shemminger@osdl.org
 L:     netdev@vger.kernel.org
 S:     Maintained
 
+SOEKRIS NET48XX LED SUPPORT
+P:     Chris Boot
+M:     bootc@bootc.net
+S:     Maintained
+
 SPARC (sparc32):
 P:     William L. Irwin
 M:     wli@holomorphy.com
@@ -2738,11 +2762,23 @@ P:      Christoph Hellwig
 M:     hch@infradead.org
 S:     Maintained
 
+TC CLASSIFIER
+P:     Jamal Hadi Salim
+M:     hadi@cyberus.ca
+L:     netdev@vger.kernel.org
+S:     Maintained
+
 TI OMAP RANDOM NUMBER GENERATOR SUPPORT
 P:     Deepak Saxena
 M:     dsaxena@plexity.net
 S:     Maintained
 
+TASKSTATS STATISTICS INTERFACE
+P:     Shailabh Nagar
+M:     nagar@watson.ibm.com
+L:     linux-kernel@vger.kernel.org
+S:     Maintained
+
 TI PARALLEL LINK CABLE DRIVER
 P:     Romain Lievin
 M:     roms@lpg.ticalc.org
@@ -3118,7 +3154,7 @@ S:        Maintained
 VIAPRO SMBUS DRIVER
 P:     Jean Delvare
 M:     khali@linux-fr.org
-L:     lm-sensors@lm-sensors.org
+L:     i2c@lm-sensors.org
 S:     Maintained
 
 UCLINUX (AND M68KNOMMU)
@@ -3166,6 +3202,11 @@ S:       Maintained
 W1 DALLAS'S 1-WIRE BUS
 P:     Evgeniy Polyakov
 M:     johnpol@2ka.mipt.ru
+S:     Maintained
+
+W83791D HARDWARE MONITORING DRIVER
+P:     Charles Spirakis
+M:     bezaur@gmail.com
 L:     lm-sensors@lm-sensors.org
 S:     Maintained
 
index 7c010f3325a96f9541731ab9bbd584df0e862398..1dd58d35d72c53dc8e33623f1793bb7f58ed5401 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 18
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc2
 NAME=Crazed Snow-Weasel
 
 # *DOCUMENTATION*
index 425643762bf5889ca9a083f7973770155eba3961..f042cc42b00fc531f7c8e6528aae05002a72b172 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/in.h>
 #include <linux/in6.h>
 #include <linux/pci.h>
+#include <linux/screen_info.h>
 #include <linux/tty.h>
 #include <linux/mm.h>
 #include <linux/delay.h>
index 41ebf51a107a2439ebcc7bf408f446f1e0949ca4..b3a8a29803654eab232f478d7a1c58a9a483c1ee 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/time.h>
 #include <linux/major.h>
 #include <linux/stat.h>
+#include <linux/vt.h>
 #include <linux/mman.h>
 #include <linux/elfcore.h>
 #include <linux/reboot.h>
index 254c507a608c076f9e09aa8acb83edfea90d2975..2cb9c4380113e92e1eaa181558b105fe38a1f4eb 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/slab.h>
 #include <linux/user.h>
 #include <linux/a.out.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/delay.h>
 #include <linux/config.h>      /* CONFIG_ALPHA_LCA etc */
 #include <linux/mc146818rtc.h>
index cd85ef725e0e426446cfbb0957b6819f44bef64e..a654014d202a251a9e01b63d8919bdd3c1a63c2f 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/sched.h>
 #include <linux/pci.h>
 #include <linux/init.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 
 #include <asm/compiler.h>
 #include <asm/ptrace.h>
index fbc3ab0e10117160bde63ed323663c607a02e00a..04de83f4f0088765358cfd98cfed07ade9602fd6 100644 (file)
@@ -506,7 +506,7 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info)
                goto out;
        }
 
-       strncpy(dev->dev.bus_id,info->name,sizeof(dev->dev.bus_id));
+       strncpy(dev->dev.bus_id, info->name, sizeof(dev->dev.bus_id));
        /*
         * If the parent device has a DMA mask associated with it,
         * propagate it down to the children.
@@ -729,7 +729,6 @@ __locomo_probe(struct device *me, struct resource *mem, int irq)
 
        for (i = 0; i < ARRAY_SIZE(locomo_devices); i++)
                locomo_init_one_child(lchip, &locomo_devices[i]);
-
        return 0;
 
  out:
index 045e37e073305b84f1259109f0170be9304629bd..59b5ddec480f6992db54c2e8d0fdae5c9639b2ac 100644 (file)
@@ -412,8 +412,10 @@ static int sharpsl_check_battery_temp(void)
        val = get_select_val(buff);
 
        dev_dbg(sharpsl_pm.dev, "Temperature: %d\n", val);
-       if (val > sharpsl_pm.machinfo->charge_on_temp)
+       if (val > sharpsl_pm.machinfo->charge_on_temp) {
+               printk(KERN_WARNING "Not charging: temperature out of limits.\n");
                return -1;
+       }
 
        return 0;
 }
index b69e88bbc909d906df7730eecf9b8e897e691fc0..c0de6fcd488a85d22566a7241669f67ef59f0ca0 100644 (file)
@@ -1,14 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Wed Apr 19 21:21:01 2006
+# Linux kernel version: 2.6.18-rc1
+# Sun Jul  9 15:21:30 2006
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -43,14 +47,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -83,18 +88,26 @@ CONFIG_DEFAULT_IOSCHED="deadline"
 #
 # System Type
 #
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
 # CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
 CONFIG_ARCH_EP93XX=y
 # CONFIG_ARCH_FOOTBRIDGE is not set
-# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
 # CONFIG_ARCH_IOP3XX is not set
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_IXP2000 is not set
 # CONFIG_ARCH_IXP23XX is not set
 # CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
@@ -102,20 +115,18 @@ CONFIG_ARCH_EP93XX=y
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
 # CONFIG_ARCH_OMAP is not set
-# CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_REALVIEW is not set
-# CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_H720X is not set
-# CONFIG_ARCH_AAEC2000 is not set
-# CONFIG_ARCH_AT91RM9200 is not set
 
 #
 # Cirrus EP93xx Implementation Options
 #
+CONFIG_CRUNCH=y
 
 #
 # EP93xx Platforms
 #
+CONFIG_MACH_EDB9302=y
+CONFIG_MACH_EDB9315=y
+CONFIG_MACH_EDB9315A=y
 CONFIG_MACH_GESBC9312=y
 CONFIG_MACH_TS72XX=y
 
@@ -166,6 +177,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -233,6 +245,8 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -240,6 +254,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
 #
@@ -294,6 +309,7 @@ CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -386,6 +402,8 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
 #
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+CONFIG_MTD_NAND_TS7250=y
 CONFIG_MTD_NAND_IDS=y
 # CONFIG_MTD_NAND_DISKONCHIP is not set
 # CONFIG_MTD_NAND_NANDSIM is not set
@@ -582,6 +600,7 @@ CONFIG_EP93XX_WATCHDOG=y
 # USB-based Watchdog Cards
 #
 # CONFIG_USBPCWATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_NVRAM is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -613,6 +632,7 @@ CONFIG_I2C_ALGOBIT=y
 #
 # I2C Hardware Bus support
 #
+# CONFIG_I2C_OCORES is not set
 # CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_STUB is not set
 # CONFIG_I2C_PCA_ISA is not set
@@ -641,13 +661,13 @@ CONFIG_I2C_DEBUG_CHIP=y
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
 #
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
 # CONFIG_SENSORS_ADM1026 is not set
@@ -675,8 +695,10 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
 # CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
 # CONFIG_SENSORS_W83792D is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83627HF is not set
@@ -704,6 +726,7 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -714,6 +737,7 @@ CONFIG_HWMON=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -806,6 +830,7 @@ CONFIG_USB_SERIAL_CONSOLE=y
 # CONFIG_USB_SERIAL_GENERIC is not set
 # CONFIG_USB_SERIAL_AIRPRIME is not set
 # CONFIG_USB_SERIAL_ANYDATA is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
 # CONFIG_USB_SERIAL_BELKIN is not set
 # CONFIG_USB_SERIAL_WHITEHEAT is not set
 # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
@@ -833,6 +858,7 @@ CONFIG_USB_SERIAL_PL2303=y
 # CONFIG_USB_SERIAL_TI is not set
 # CONFIG_USB_SERIAL_CYBERJACK is not set
 # CONFIG_USB_SERIAL_XIRCOM is not set
+# CONFIG_USB_SERIAL_OPTION is not set
 # CONFIG_USB_SERIAL_OMNINET is not set
 
 #
@@ -845,10 +871,12 @@ CONFIG_USB_SERIAL_PL2303=y
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
+# CONFIG_USB_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
 # CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_LD is not set
 # CONFIG_USB_TEST is not set
 
@@ -880,17 +908,24 @@ CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
 CONFIG_RTC_INTF_SYSFS=y
 CONFIG_RTC_INTF_PROC=y
 CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
 
 #
 # RTC drivers
 #
 # CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
 # CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
 # CONFIG_RTC_DRV_RS5C372 is not set
 CONFIG_RTC_DRV_M48T86=y
 CONFIG_RTC_DRV_EP93XX=y
+# CONFIG_RTC_DRV_PL031 is not set
 # CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 is not set
 
 #
 # File systems
@@ -910,6 +945,7 @@ CONFIG_JBD=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -957,6 +993,7 @@ CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
 CONFIG_JFFS2_FS_WRITEBUFFER=y
 # CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -986,6 +1023,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1066,15 +1104,20 @@ CONFIG_NLS_ISO8859_1=y
 #
 # CONFIG_PRINTK_TIME is not set
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 CONFIG_DEBUG_SLAB=y
 # CONFIG_DEBUG_SLAB_LEAK is not set
-CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
@@ -1114,3 +1157,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index e6f3e4873d6cb967342e41afec4883b1b63341d8..27b3e31a8ad896a9d26a3649522e3a7ef7c98b98 100644 (file)
@@ -1,14 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Wed Apr 19 21:12:49 2006
+# Linux kernel version: 2.6.18-rc1
+# Sun Jul  9 15:28:50 2006
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -43,14 +47,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -83,18 +88,26 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 # System Type
 #
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
 # CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
 # CONFIG_ARCH_EP93XX is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
-# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
 # CONFIG_ARCH_IOP3XX is not set
 # CONFIG_ARCH_IXP4XX is not set
 CONFIG_ARCH_IXP2000=y
 # CONFIG_ARCH_IXP23XX is not set
 # CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
@@ -102,12 +115,6 @@ CONFIG_ARCH_IXP2000=y
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
 # CONFIG_ARCH_OMAP is not set
-# CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_REALVIEW is not set
-# CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_H720X is not set
-# CONFIG_ARCH_AAEC2000 is not set
-# CONFIG_ARCH_AT91RM9200 is not set
 CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
 
 #
@@ -171,6 +178,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -218,6 +226,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
@@ -236,6 +246,8 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -243,6 +255,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
 #
@@ -297,6 +310,7 @@ CONFIG_STANDALONE=y
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -525,6 +539,7 @@ CONFIG_ENP2611_MSF_NET=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -542,7 +557,6 @@ CONFIG_ENP2611_MSF_NET=y
 CONFIG_WAN=y
 # CONFIG_DSCC4 is not set
 # CONFIG_LANMEDIA is not set
-# CONFIG_SYNCLINK_SYNCPPP is not set
 CONFIG_HDLC=y
 CONFIG_HDLC_RAW=y
 # CONFIG_HDLC_RAW_ETH is not set
@@ -654,6 +668,7 @@ CONFIG_IXP2000_WATCHDOG=y
 #
 # CONFIG_PCIPCWATCHDOG is not set
 # CONFIG_WDTPCI is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_NVRAM is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -697,6 +712,7 @@ CONFIG_I2C_ALGOBIT=y
 # CONFIG_I2C_PIIX4 is not set
 CONFIG_I2C_IXP2000=y
 # CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_OCORES is not set
 # CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_PROSAVAGE is not set
 # CONFIG_I2C_SAVAGE4 is not set
@@ -733,13 +749,13 @@ CONFIG_SENSORS_EEPROM=y
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
 #
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
 # CONFIG_SENSORS_ADM1026 is not set
@@ -768,10 +784,12 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
 # CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_VT8231 is not set
 # CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
 # CONFIG_SENSORS_W83792D is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83627HF is not set
@@ -799,6 +817,7 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -808,6 +827,7 @@ CONFIG_HWMON=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -866,6 +886,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -910,6 +931,7 @@ CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
 CONFIG_JFFS2_FS_WRITEBUFFER=y
 # CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -939,6 +961,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -980,14 +1003,19 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
@@ -1027,3 +1055,4 @@ CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index 9ce898a6cf87f3daa5b4828f18fd608084271405..7b18997083cef1aa517d7065bdcdeed4a23fd2bc 100644 (file)
@@ -1,14 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Wed Apr 19 21:13:50 2006
+# Linux kernel version: 2.6.18-rc1
+# Sun Jul  9 14:13:35 2006
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -43,14 +47,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -83,18 +88,26 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 # System Type
 #
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
 # CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
 # CONFIG_ARCH_EP93XX is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
-# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
 # CONFIG_ARCH_IOP3XX is not set
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_IXP2000 is not set
 CONFIG_ARCH_IXP23XX=y
 # CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
@@ -102,12 +115,6 @@ CONFIG_ARCH_IXP23XX=y
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
 # CONFIG_ARCH_OMAP is not set
-# CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_REALVIEW is not set
-# CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_H720X is not set
-# CONFIG_ARCH_AAEC2000 is not set
-# CONFIG_ARCH_AT91RM9200 is not set
 CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
 
 #
@@ -165,6 +172,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
+CONFIG_RESOURCES_64BIT=y
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -212,6 +220,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
@@ -230,6 +240,8 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -237,6 +249,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
 #
@@ -291,6 +304,7 @@ CONFIG_STANDALONE=y
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -520,6 +534,7 @@ CONFIG_BLK_DEV_SD=y
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_IPS is not set
@@ -641,6 +656,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -658,7 +674,6 @@ CONFIG_E1000_NAPI=y
 CONFIG_WAN=y
 # CONFIG_DSCC4 is not set
 # CONFIG_LANMEDIA is not set
-# CONFIG_SYNCLINK_SYNCPPP is not set
 CONFIG_HDLC=y
 CONFIG_HDLC_RAW=y
 # CONFIG_HDLC_RAW_ETH is not set
@@ -775,6 +790,7 @@ CONFIG_WATCHDOG=y
 # USB-based Watchdog Cards
 #
 # CONFIG_USBPCWATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_NVRAM is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -817,6 +833,7 @@ CONFIG_I2C_ALGOBIT=y
 # CONFIG_I2C_I810 is not set
 # CONFIG_I2C_PIIX4 is not set
 # CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_OCORES is not set
 # CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_PROSAVAGE is not set
 # CONFIG_I2C_SAVAGE4 is not set
@@ -853,13 +870,13 @@ CONFIG_SENSORS_EEPROM=y
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
 #
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
 # CONFIG_SENSORS_ADM1026 is not set
@@ -888,10 +905,12 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
 # CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_VT8231 is not set
 # CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
 # CONFIG_SENSORS_W83792D is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83627HF is not set
@@ -919,6 +938,7 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -929,6 +949,7 @@ CONFIG_HWMON=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -959,6 +980,7 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
 # CONFIG_USB_ISP116X_HCD is not set
 CONFIG_USB_OHCI_HCD=y
 # CONFIG_USB_OHCI_BIG_ENDIAN is not set
@@ -1050,10 +1072,12 @@ CONFIG_USB_MON=y
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
+# CONFIG_USB_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
 # CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
 
@@ -1100,6 +1124,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -1146,6 +1171,7 @@ CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
 CONFIG_JFFS2_FS_WRITEBUFFER=y
 # CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -1175,6 +1201,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1255,14 +1282,19 @@ CONFIG_NLS_CODEPAGE_437=y
 #
 # CONFIG_PRINTK_TIME is not set
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
@@ -1302,3 +1334,4 @@ CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index d08bbe59483a721075b465d062cf5a332b05f6a9..4b29e099640d4b05f8cb5bd364d69c25a5166387 100644 (file)
@@ -1,15 +1,19 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-git2
-# Wed Jun 21 22:20:18 2006
+# Linux kernel version: 2.6.18-rc1
+# Sun Jul  9 14:15:23 2006
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_ARCH_MTD_XIP=y
 CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -43,10 +47,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -85,7 +91,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_REALVIEW is not set
 # CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_AT91RM9200 is not set
+# CONFIG_ARCH_AT91 is not set
 # CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
@@ -117,6 +123,7 @@ CONFIG_MACH_LOGICPD_PXA270=y
 # CONFIG_MACH_MAINSTONE is not set
 # CONFIG_ARCH_PXA_IDP is not set
 # CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
 CONFIG_PXA27x=y
 CONFIG_IWMMXT=y
 
@@ -161,6 +168,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -194,8 +202,6 @@ CONFIG_BINFMT_ELF=y
 # Power management options
 #
 # CONFIG_PM is not set
-# CONFIG_PM_LEGACY is not set
-# CONFIG_PM_DEBUG is not set
 # CONFIG_APM is not set
 
 #
@@ -293,6 +299,7 @@ CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -561,6 +568,7 @@ CONFIG_SERIO_LIBPS2=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -588,6 +596,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_NVRAM is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -617,13 +626,13 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
 #
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_F71805F is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
@@ -658,12 +667,13 @@ CONFIG_VIDEO_V4L2=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_MACMODES is not set
-CONFIG_FB_FIRMWARE_EDID=y
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
 # CONFIG_FB_S1D13XXX is not set
@@ -822,6 +832,7 @@ CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
 CONFIG_JFFS2_FS_WRITEBUFFER=y
 # CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -849,6 +860,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -914,14 +926,19 @@ CONFIG_NLS_ISO8859_1=y
 #
 # CONFIG_PRINTK_TIME is not set
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_INFO=y
@@ -961,3 +978,4 @@ CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index 2b4a63be03f71543b63bb03ad2900532d2bd41f5..6a93e3aae10675f68158c655d9eafb15794ad6c8 100644 (file)
@@ -1,14 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-git10
-# Mon Jun 26 13:45:44 2006
+# Linux kernel version: 2.6.18-rc1
+# Sun Jul  9 14:16:20 2006
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -42,10 +46,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -86,7 +92,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_REALVIEW is not set
 # CONFIG_ARCH_VERSATILE is not set
 CONFIG_ARCH_AT91=y
-CONFIG_ARCH_AT91RM9200=y
 # CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
@@ -111,8 +116,15 @@ CONFIG_ARCH_AT91RM9200=y
 # CONFIG_ARCH_OMAP is not set
 
 #
-# AT91RM9200 Implementations
+# Atmel AT91 System-on-Chip
+#
+
 #
+# Atmel AT91 Processors
+#
+CONFIG_ARCH_AT91RM9200=y
+# CONFIG_ARCH_AT91SAM9260 is not set
+# CONFIG_ARCH_AT91SAM9261 is not set
 
 #
 # AT91RM9200 Board Type
@@ -123,12 +135,12 @@ CONFIG_MACH_ONEARM=y
 # CONFIG_MACH_CSB337 is not set
 # CONFIG_MACH_CSB637 is not set
 # CONFIG_MACH_CARMEVA is not set
-# CONFIG_MACH_KB9200 is not set
 # CONFIG_MACH_ATEB9200 is not set
+# CONFIG_MACH_KB9200 is not set
 # CONFIG_MACH_KAFA is not set
 
 #
-# AT91RM9200 Feature Selections
+# AT91 Feature Selections
 #
 CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
 
@@ -186,6 +198,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
 CONFIG_LEDS=y
 CONFIG_LEDS_TIMER=y
 # CONFIG_LEDS_CPU is not set
@@ -600,6 +613,7 @@ CONFIG_AT91_WATCHDOG=y
 # USB-based Watchdog Cards
 #
 # CONFIG_USBPCWATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_NVRAM is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -743,6 +757,7 @@ CONFIG_VIDEO_V4L2=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -980,6 +995,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1006,14 +1022,19 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
@@ -1052,3 +1073,4 @@ CONFIG_DEBUG_LL=y
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
+CONFIG_PLIST=y
index 964faac104fb05a51b96e2de0be2137d30df6594..240c448ec31cf15a40222d2ab8e9414fc65bf7b6 100644 (file)
@@ -370,17 +370,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
                        features &= ~(PCI_COMMAND_SERR | PCI_COMMAND_PARITY);
 
                switch (dev->class >> 8) {
-#if defined(CONFIG_ISA) || defined(CONFIG_EISA)
-               case PCI_CLASS_BRIDGE_ISA:
-               case PCI_CLASS_BRIDGE_EISA:
-                       /*
-                        * If this device is an ISA bridge, set isa_bridge
-                        * to point at this device.  We will then go looking
-                        * for things like keyboard, etc.
-                        */
-                       isa_bridge = dev;
-                       break;
-#endif
                case PCI_CLASS_BRIDGE_PCI:
                        pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &status);
                        status |= PCI_BRIDGE_CTL_PARITY|PCI_BRIDGE_CTL_MASTER_ABORT;
index c3d4e94ef5bf1c41f36f199dbe806ebb50e068c5..626feeec0ade7325def132610ad99b3eb2d1dbc0 100644 (file)
@@ -167,6 +167,16 @@ void __init init_IRQ(void)
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
+
+static void route_irq(struct irqdesc *desc, unsigned int irq, unsigned int cpu)
+{
+       pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->cpu, cpu);
+
+       spin_lock_irq(&desc->lock);
+       desc->chip->set_affinity(irq, cpumask_of_cpu(cpu));
+       spin_unlock_irq(&desc->lock);
+}
+
 /*
  * The CPU has been marked offline.  Migrate IRQs off this CPU.  If
  * the affinity settings do not allow other CPUs, force them onto any
index ed1c4d62d999e4170df1de47d017da5968b1d76e..0a722e77c1438af559c9068399a3ec251862c2d8 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/console.h>
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/init.h>
 #include <linux/root_dev.h>
 #include <linux/cpu.h>
index a6bab50dab6118714ad6922aceb0877a4f6a8cfa..a0dfa390e34bd0c686e3fdf05776684cd4ee08f8 100644 (file)
@@ -83,8 +83,8 @@ static struct scoop_pcmcia_config collie_pcmcia_config = {
 
 
 static struct mcp_plat_data collie_mcp_data = {
-       .mccr0          = MCCR0_ADM,
-       .sclk_rate      = 11981000,
+       .mccr0          = MCCR0_ADM | MCCR0_ExtClk,
+       .sclk_rate      = 9216000,
 };
 
 #ifdef CONFIG_SHARP_LOCOMO
index 45b1e71f111d462472573f1c2057242aa564a56b..1e25b1d19fce7e7f537269a5df27a27584be8b3d 100644 (file)
@@ -9,6 +9,9 @@
  * Li-ion batteries are angry beasts, and they like to explode. This driver is not finished,
  * and sometimes charges them when it should not. If it makes angry lithium to come your way...
  * ...well, you have been warned.
+ *
+ * Actually, this should be quite safe, it seems sharp leaves charger enabled by default,
+ * and my collie did not explode (yet).
  */
 
 #include <linux/module.h>
@@ -40,9 +43,8 @@ static void collie_charger_init(void)
 {
        int err;
 
-       if (sharpsl_param.adadj != -1) {
+       if (sharpsl_param.adadj != -1)
                ad_revise = sharpsl_param.adadj;
-       }
 
        /* Register interrupt handler. */
        if ((err = request_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr, IRQF_DISABLED,
@@ -72,27 +74,17 @@ static void collie_measure_temp(int on)
 
 static void collie_charge(int on)
 {
-       if (on) {
-               printk("Should start charger\n");
-       } else {
-               printk("Should stop charger\n");
-       }
-#ifdef I_AM_SURE
+       extern struct platform_device colliescoop_device;
 
-       /* Zaurus seems to contain LTC1731 ; it should know when to
+       /* Zaurus seems to contain LTC1731; it should know when to
         * stop charging itself, so setting charge on should be
         * relatively harmless (as long as it is not done too often).
         */
-#define CF_BUF_CTRL_BASE 0xF0800000
-#define        SCOOP_REG(adr) (*(volatile unsigned short*)(CF_BUF_CTRL_BASE+(adr)))
-#define        SCOOP_REG_GPWR    SCOOP_REG(SCOOP_GPWR)
-
        if (on) {
                set_scoop_gpio(&colliescoop_device.dev, COLLIE_SCP_CHARGE_ON);
        } else {
                reset_scoop_gpio(&colliescoop_device.dev, COLLIE_SCP_CHARGE_ON);
        }
-#endif
 }
 
 static void collie_discharge(int on)
@@ -127,7 +119,6 @@ int collie_read_backup_battery(void)
 
        ucb1x00_adc_enable(ucb);
 
-       /* Gives 75..130 */
        ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_BBAT_ON, 0);
        voltage = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD1, UCB_SYNC);
 
@@ -146,9 +137,8 @@ int collie_read_main_battery(void)
        ucb1x00_adc_enable(ucb);
        ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_BBAT_ON);
        ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_MBAT_ON, 0);
-       /* gives values 160..255 with battery removed... and
-          145..255 with battery inserted. (on AC), goes as low as
-          80 on DC. */
+
+       mdelay(1);
        voltage = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD1, UCB_SYNC);
 
        ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_MBAT_ON);
@@ -192,7 +182,7 @@ static unsigned long read_devdata(int which)
        case SHARPSL_BATT_TEMP:
                return collie_read_temp();
        case SHARPSL_ACIN_VOLT:
-               return 0x1;
+               return 500;
        case SHARPSL_STATUS_ACIN: {
                int ret = GPLR & COLLIE_GPIO_AC_IN;
                printk("AC status = %d\n", ret);
@@ -208,10 +198,33 @@ static unsigned long read_devdata(int which)
        }
 }
 
+struct battery_thresh collie_battery_levels_acin[] = {
+       { 420, 100},
+       { 417,  95},
+       { 415,  90},
+       { 413,  80},
+       { 411,  75},
+       { 408,  70},
+       { 406,  60},
+       { 403,  50},
+       { 398,  40},
+       { 391,  25},
+       {  10,   5},
+       {   0,   0},
+};
+
 struct battery_thresh collie_battery_levels[] = {
-       { 368, 100},
-       { 358,  25},
-       { 356,   5},
+       { 394, 100},
+       { 390,  95},
+       { 380,  90},
+       { 370,  80},
+       { 368,  75},    /* From sharp code: battery high with frontlight */
+       { 366,  70},    /* 60..90 -- fake values invented by me for testing */
+       { 364,  60},
+       { 362,  50},
+       { 360,  40},
+       { 358,  25},    /* From sharp code: battery low with frontlight */
+       { 356,   5},    /* From sharp code: battery verylow with frontlight */
        {   0,   0},
 };
 
@@ -226,13 +239,21 @@ struct sharpsl_charger_machinfo collie_pm_machinfo = {
        .postsuspend      = collie_postsuspend,
        .charger_wakeup   = collie_charger_wakeup,
        .should_wakeup    = collie_should_wakeup,
-       .bat_levels       = 3,
+       .bat_levels       = 12,
        .bat_levels_noac  = collie_battery_levels,
-       .bat_levels_acin  = collie_battery_levels,
+       .bat_levels_acin  = collie_battery_levels_acin,
        .status_high_acin = 368,
        .status_low_acin  = 358,
        .status_high_noac = 368,
        .status_low_noac  = 358,
+       .charge_on_volt   = 350,        /* spitz uses 2.90V, but lets play it safe. */
+       .charge_on_temp   = 550,
+       .charge_acin_high = 550,        /* collie does not seem to have sensor for this, anyway */
+       .charge_acin_low  = 450,        /* ignored, too */
+       .fatal_acin_volt  = 356,
+       .fatal_noacin_volt = 356,
+
+       .batfull_irq = 1,               /* We do not want periodical charge restarts */
 };
 
 static int __init collie_pm_ucb_add(struct ucb1x00_dev *pdev)
index a432539cc1bd2dd9506181355b09135382df928f..86437717601512832c8f8308e0ab1df3dd686cec 100644 (file)
@@ -35,6 +35,7 @@
 #include <asm/hardware/arm_timer.h>
 #include <asm/hardware/icst307.h>
 #include <asm/hardware/vic.h>
+#include <asm/mach-types.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
@@ -352,11 +353,7 @@ static const struct icst307_params versatile_oscvco_params = {
 static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco)
 {
        void __iomem *sys_lock = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LOCK_OFFSET;
-#if defined(CONFIG_ARCH_VERSATILE_PB)
-       void __iomem *sys_osc = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSC4_OFFSET;
-#elif defined(CONFIG_MACH_VERSATILE_AB)
-       void __iomem *sys_osc = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSC1_OFFSET;
-#endif
+       void __iomem *sys_osc = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSCCLCD_OFFSET;
        u32 val;
 
        val = readl(sys_osc) & ~0x7ffff;
@@ -529,7 +526,7 @@ static void versatile_clcd_disable(struct clcd_fb *fb)
        /*
         * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light off
         */
-       if (fb->panel == &sanyo_2_5_in) {
+       if (machine_is_versatile_ab() && fb->panel == &sanyo_2_5_in) {
                void __iomem *versatile_ib2_ctrl = __io_address(VERSATILE_IB2_CTRL);
                unsigned long ctrl;
 
@@ -578,7 +575,7 @@ static void versatile_clcd_enable(struct clcd_fb *fb)
        /*
         * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light on
         */
-       if (fb->panel == &sanyo_2_5_in) {
+       if (machine_is_versatile_ab() && fb->panel == &sanyo_2_5_in) {
                void __iomem *versatile_ib2_ctrl = __io_address(VERSATILE_IB2_CTRL);
                unsigned long ctrl;
 
index e1125bc39ee49ba57eea514cd79d1078385bbd8f..0a3067452cd29767544cc4b3198d7eabc0a32b7c 100644 (file)
@@ -61,7 +61,7 @@ typedef struct {
     u16 __padding;
 #endif
     u64 low;
-} floatx80;
+}  __attribute__ ((packed,aligned(4))) floatx80;
 
 /*
 -------------------------------------------------------------------------------
index 843c29fe9af5d1aaf6f78fb55dfcec35e33c97a4..e7eb070f794fbb7d7d30fbf9f6900468998fafd8 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/console.h>
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/init.h>
 #include <linux/root_dev.h>
 
index 037582028560657a53c23cfca1d6801b220ff6d7..6e1f191a71e3f96b62744814b91b4c5c5cceffae 100644 (file)
@@ -450,9 +450,9 @@ int __init eeprom_init(void)
 static int eeprom_open(struct inode * inode, struct file * file)
 {
 
-  if(MINOR(inode->i_rdev) != EEPROM_MINOR_NR)
+  if(iminor(inode) != EEPROM_MINOR_NR)
      return -ENXIO;
-  if(MAJOR(inode->i_rdev) != EEPROM_MAJOR_NR)
+  if(imajor(inode) != EEPROM_MAJOR_NR)
      return -ENXIO;
 
   if( eeprom.size > 0 )
index 48fd801792d1dc2b79b7da8a7d9fd4744cf294d9..fcba6632ed7b72ef774f423bd3dae1012ca3104b 100644 (file)
@@ -435,7 +435,7 @@ static int
 gpio_open(struct inode *inode, struct file *filp)
 {
        struct gpio_private *priv;
-       int p = MINOR(inode->i_rdev);
+       int p = iminor(inode);
 
        if (p > GPIO_MINOR_LAST)
                return -EINVAL;
index c59ee28a35f4cbd7aa665250ece1c6f4922ab7f2..ba096ebb0b157b4d92a425ca5a983c2612d3ac9c 100644 (file)
@@ -2302,7 +2302,7 @@ static int cryptocop_job_setup(struct cryptocop_prio_job **pj, struct cryptocop_
 
 static int cryptocop_open(struct inode *inode, struct file *filp)
 {
-       int p = MINOR(inode->i_rdev);
+       int p = iminor(inode);
 
        if (p != CRYPTOCOP_MINOR) return -EINVAL;
 
index 00e9167de530911e5492afe6cdcc01e4f57792ad..c3f876b4da6b4210d1aafa814549bd626b944d04 100644 (file)
@@ -418,7 +418,7 @@ static int
 gpio_open(struct inode *inode, struct file *filp)
 {
        struct gpio_private *priv;
-       int p = MINOR(inode->i_rdev);
+       int p = iminor(inode);
 
        if (p > GPIO_MINOR_LAST)
                return -EINVAL;
index ffc6d2572f2b87d609eae01fb72a91d2084b0662..2fc7d75a35ded92fd07b22dbed11cea994892f35 100644 (file)
@@ -324,14 +324,12 @@ pcf8563_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned
 int
 pcf8563_open(struct inode *inode, struct file *filp)
 {
-       MOD_INC_USE_COUNT;
        return 0;
 }
 
 int
 pcf8563_release(struct inode *inode, struct file *filp)
 {
-       MOD_DEC_USE_COUNT;
        return 0;
 }
 
index 7c29957f5f02c77c40a2d44df824b5183e4771df..e067806b2208b67b63ad419bb25ea0dd967d9ed5 100644 (file)
@@ -340,7 +340,7 @@ static inline int sync_data_avail_to_end(struct sync_port *port)
 
 static int sync_serial_open(struct inode *inode, struct file *file)
 {
-       int dev = MINOR(inode->i_rdev);
+       int dev = iminor(inode);
        sync_port* port;
        reg_dma_rw_cfg cfg = {.en = regk_dma_yes};
        reg_dma_rw_intr_mask intr_mask = {.data = regk_dma_yes};
@@ -486,7 +486,7 @@ static int sync_serial_open(struct inode *inode, struct file *file)
 
 static int sync_serial_release(struct inode *inode, struct file *file)
 {
-       int dev = MINOR(inode->i_rdev);
+       int dev = iminor(inode);
        sync_port* port;
 
        if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled)
@@ -504,7 +504,7 @@ static int sync_serial_release(struct inode *inode, struct file *file)
 
 static unsigned int sync_serial_poll(struct file *file, poll_table *wait)
 {
-       int dev = MINOR(file->f_dentry->d_inode->i_rdev);
+       int dev = iminor(file->f_dentry->d_inode);
        unsigned int mask = 0;
        sync_port* port;
        DEBUGPOLL( static unsigned int prev_mask = 0; );
@@ -531,7 +531,7 @@ static int sync_serial_ioctl(struct inode *inode, struct file *file,
                  unsigned int cmd, unsigned long arg)
 {
        int return_val = 0;
-       int dev = MINOR(file->f_dentry->d_inode->i_rdev);
+       int dev = iminor(file->f_dentry->d_inode);
        sync_port* port;
        reg_sser_rw_tr_cfg tr_cfg;
        reg_sser_rw_rec_cfg rec_cfg;
@@ -789,7 +789,7 @@ static int sync_serial_ioctl(struct inode *inode, struct file *file,
 static ssize_t sync_serial_write(struct file * file, const char * buf,
                                  size_t count, loff_t *ppos)
 {
-       int dev = MINOR(file->f_dentry->d_inode->i_rdev);
+       int dev = iminor(file->f_dentry->d_inode);
        DECLARE_WAITQUEUE(wait, current);
        sync_port *port;
        unsigned long c, c1;
@@ -919,7 +919,7 @@ static ssize_t sync_serial_write(struct file * file, const char * buf,
 static ssize_t sync_serial_read(struct file * file, char * buf,
                                size_t count, loff_t *ppos)
 {
-       int dev = MINOR(file->f_dentry->d_inode->i_rdev);
+       int dev = iminor(file->f_dentry->d_inode);
        int avail;
        sync_port *port;
        unsigned char* start;
index 6d941fb9f37969b73ea9470f74ec371c701c20ca..7af3d5d43e43b73466212ded824b131c46ba4886 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/bootmem.h>
 #include <asm/pgtable.h>
 #include <linux/seq_file.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/utsname.h>
 #include <linux/pfn.h>
 
index 9e263112a6e2f8174a3b51002c62ec54121df146..fbb19fc1af407e83fc3d52e7422a7b370eb25f5c 100644 (file)
@@ -1 +1,115 @@
-/* Dummy asm-offsets.c file. Required by kbuild and ready to be used - hint! */
+/*
+ * Generate definitions needed by assembly language modules.
+ * This code generates raw asm output which is post-processed
+ * to extract and format the required data.
+ */
+
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/personality.h>
+#include <asm/registers.h>
+#include <asm/ucontext.h>
+#include <asm/processor.h>
+#include <asm/thread_info.h>
+#include <asm/gdb-stub.h>
+
+#define DEFINE(sym, val) \
+        asm volatile("\n->" #sym " %0 " #val : : "i" (val))
+
+#define DEF_PTREG(sym, reg) \
+        asm volatile("\n->" #sym " %0 offsetof(struct pt_regs, " #reg ")" \
+                    : : "i" (offsetof(struct pt_regs, reg)))
+
+#define DEF_IREG(sym, reg) \
+        asm volatile("\n->" #sym " %0 offsetof(struct user_context, " #reg ")" \
+                    : : "i" (offsetof(struct user_context, reg)))
+
+#define DEF_FREG(sym, reg) \
+        asm volatile("\n->" #sym " %0 offsetof(struct user_context, " #reg ")" \
+                    : : "i" (offsetof(struct user_context, reg)))
+
+#define DEF_0REG(sym, reg) \
+        asm volatile("\n->" #sym " %0 offsetof(struct frv_frame0, " #reg ")" \
+                    : : "i" (offsetof(struct frv_frame0, reg)))
+
+#define BLANK() asm volatile("\n->" : : )
+
+#define OFFSET(sym, str, mem) \
+       DEFINE(sym, offsetof(struct str, mem));
+
+void foo(void)
+{
+       /* offsets into the thread_info structure */
+       OFFSET(TI_TASK,                 thread_info, task);
+       OFFSET(TI_EXEC_DOMAIN,          thread_info, exec_domain);
+       OFFSET(TI_FLAGS,                thread_info, flags);
+       OFFSET(TI_STATUS,               thread_info, status);
+       OFFSET(TI_CPU,                  thread_info, cpu);
+       OFFSET(TI_PREEMPT_COUNT,        thread_info, preempt_count);
+       OFFSET(TI_ADDR_LIMIT,           thread_info, addr_limit);
+       OFFSET(TI_RESTART_BLOCK,        thread_info, restart_block);
+       BLANK();
+
+       /* offsets into register file storage */
+       DEF_PTREG(REG_PSR,              psr);
+       DEF_PTREG(REG_ISR,              isr);
+       DEF_PTREG(REG_CCR,              ccr);
+       DEF_PTREG(REG_CCCR,             cccr);
+       DEF_PTREG(REG_LR,               lr);
+       DEF_PTREG(REG_LCR,              lcr);
+       DEF_PTREG(REG_PC,               pc);
+       DEF_PTREG(REG__STATUS,          __status);
+       DEF_PTREG(REG_SYSCALLNO,        syscallno);
+       DEF_PTREG(REG_ORIG_GR8,         orig_gr8);
+       DEF_PTREG(REG_GNER0,            gner0);
+       DEF_PTREG(REG_GNER1,            gner1);
+       DEF_PTREG(REG_IACC0,            iacc0);
+       DEF_PTREG(REG_TBR,              tbr);
+       DEF_PTREG(REG_GR0,              tbr);
+       DEFINE(REG__END,                sizeof(struct pt_regs));
+       BLANK();
+
+       DEF_0REG(REG_DCR,               debug.dcr);
+       DEF_0REG(REG_IBAR0,             debug.ibar[0]);
+       DEF_0REG(REG_DBAR0,             debug.dbar[0]);
+       DEF_0REG(REG_DBDR00,            debug.dbdr[0][0]);
+       DEF_0REG(REG_DBMR00,            debug.dbmr[0][0]);
+       BLANK();
+
+       DEF_IREG(__INT_GR0,             i.gr[0]);
+       DEF_FREG(__USER_FPMEDIA,        f);
+       DEF_FREG(__FPMEDIA_FR0,         f.fr[0]);
+       DEF_FREG(__FPMEDIA_FNER0,       f.fner[0]);
+       DEF_FREG(__FPMEDIA_MSR0,        f.msr[0]);
+       DEF_FREG(__FPMEDIA_ACC0,        f.acc[0]);
+       DEF_FREG(__FPMEDIA_ACCG0,       f.accg[0]);
+       DEF_FREG(__FPMEDIA_FSR0,        f.fsr[0]);
+       BLANK();
+
+       DEFINE(NR_PT_REGS,              sizeof(struct pt_regs) / 4);
+       DEFINE(NR_USER_INT_REGS,        sizeof(struct user_int_regs) / 4);
+       DEFINE(NR_USER_FPMEDIA_REGS,    sizeof(struct user_fpmedia_regs) / 4);
+       DEFINE(NR_USER_CONTEXT,         sizeof(struct user_context) / 4);
+       DEFINE(FRV_FRAME0_SIZE,         sizeof(struct frv_frame0));
+       BLANK();
+
+       /* offsets into thread_struct */
+       OFFSET(__THREAD_FRAME,          thread_struct, frame);
+       OFFSET(__THREAD_CURR,           thread_struct, curr);
+       OFFSET(__THREAD_SP,             thread_struct, sp);
+       OFFSET(__THREAD_FP,             thread_struct, fp);
+       OFFSET(__THREAD_LR,             thread_struct, lr);
+       OFFSET(__THREAD_PC,             thread_struct, pc);
+       OFFSET(__THREAD_GR16,           thread_struct, gr[0]);
+       OFFSET(__THREAD_SCHED_LR,       thread_struct, sched_lr);
+       OFFSET(__THREAD_FRAME0,         thread_struct, frame0);
+       OFFSET(__THREAD_USER,           thread_struct, user);
+       BLANK();
+
+       /* offsets into frv_debug_status */
+       OFFSET(DEBUG_BPSR,              frv_debug_status, bpsr);
+       OFFSET(DEBUG_DCR,               frv_debug_status, dcr);
+       OFFSET(DEBUG_BRR,               frv_debug_status, brr);
+       OFFSET(DEBUG_NMAR,              frv_debug_status, nmar);
+       BLANK();
+}
index ea161f0ca427da1705c0d4e24275e9e7ba3ed701..dac4a5f68c2ec5f294301eb5f9108a5702f08570 100644 (file)
@@ -9,11 +9,11 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#include <linux/sys.h>
 #include <linux/linkage.h>
 #include <asm/setup.h>
 #include <asm/segment.h>
 #include <asm/ptrace.h>
+#include <asm/thread_info.h>
 #include <asm/spr-regs.h>
 
 #include <asm/errno.h>
 #
        .section        .bss.stack
        .globl          __break_user_context
-       .balign         8192
+       .balign         THREAD_SIZE
 __break_stack:
-       .space          (8192 - (USER_CONTEXT_SIZE + REG__DEBUG_XTRA)) & ~7
-__break_stack_tos:
-       .space          REG__DEBUG_XTRA
-__break_user_context:
-       .space          USER_CONTEXT_SIZE
+       .space          THREAD_SIZE - FRV_FRAME0_SIZE
+__break_frame_0:
+       .space          FRV_FRAME0_SIZE
 
 #
 # miscellaneous variables
@@ -74,8 +72,8 @@ __entry_break:
 #endif
        LEDS            0x1001,gr31
 
-       sethi.p         %hi(__break_user_context),gr31
-       setlo           %lo(__break_user_context),gr31
+       sethi.p         %hi(__break_frame_0),gr31
+       setlo           %lo(__break_frame_0),gr31
 
        stdi            gr2,@(gr31,#REG_GR(2))
        movsg           ccr,gr3
@@ -585,8 +583,8 @@ __break_continue:
        # set up the kernel stack pointer
        sti             sp,@(gr31,#REG_SP)
 
-       sethi.p         %hi(__break_stack_tos),sp
-       setlo           %lo(__break_stack_tos),sp
+       sethi.p         %hi(__break_frame_0),sp
+       setlo           %lo(__break_frame_0),sp
 
        # finish building the exception frame
        stdi            gr4 ,@(gr31,#REG_GR(4))
@@ -651,9 +649,12 @@ __break_continue:
        movsg           nmar,gr5
        movsg           dcr,gr6
 
-       stdi            gr4 ,@(gr31,#REG_BRR)
-       sti             gr19,@(gr31,#REG_BPSR)
-       sti.p           gr6 ,@(gr31,#REG_DCR)
+       sethi.p         %hi(__debug_status),gr7
+       setlo           %lo(__debug_status),gr7
+
+       stdi            gr4 ,@(gr7,#DEBUG_BRR)
+       sti             gr19,@(gr7,#DEBUG_BPSR)
+       sti.p           gr6 ,@(gr7,#DEBUG_DCR)
 
        # trap exceptions during break handling and disable h/w breakpoints/watchpoints
        sethi           %hi(DCR_EBE),gr5
@@ -698,7 +699,10 @@ __break_continue:
        lddi            @(gr31,#REG_PSR) ,gr22
        ldi             @(gr31,#REG_PC)  ,gr21
        ldi             @(gr31,#REG_TBR) ,gr20
-       ldi.p           @(gr31,#REG_DCR) ,gr6
+
+       sethi.p         %hi(__debug_status),gr6
+       setlo           %lo(__debug_status),gr6
+       ldi.p           @(gr6,#DEBUG_DCR) ,gr6
 
        andi            gr22,#PSR_S,gr19                /* rebuild BPSR */
        andi.p          gr22,#PSR_ET,gr5
index 4761cc4b4a90567059e8a69913415e92eb3ccbd0..2f6c60c921e0d4a4c20e8f23a7a71cb726d69598 100644 (file)
@@ -39,10 +39,9 @@ do {                                         \
        gdbstub_do_rx();                        \
 } while(!FLOWCTL_QUERY(LINE))
 
-static void __init debug_stub_init(void);
+struct frv_debug_status __debug_status;
 
-extern asmlinkage void __break_hijack_kernel_event(void);
-extern asmlinkage void __break_hijack_kernel_event_breaks_here(void);
+static void __init debug_stub_init(void);
 
 /*****************************************************************************/
 /*
@@ -67,7 +66,7 @@ asmlinkage void debug_stub(void)
                __set_HSR(0, hsr0 & ~HSR0_ETMD);
 
        /* disable single stepping */
-       __debug_regs->dcr &= ~DCR_SE;
+       __debug_status.dcr &= ~DCR_SE;
 
        /* kernel mode can propose an exception be handled in debug mode by jumping to a special
         * location */
@@ -76,8 +75,8 @@ asmlinkage void debug_stub(void)
                 * the top kernel context */
                *__debug_frame = *__frame;
                __frame = __debug_frame->next_frame;
-               __debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12;
-               __debug_regs->brr |= BRR_EB;
+               __debug_status.brr = (__debug_frame->tbr & TBR_TT) << 12;
+               __debug_status.brr |= BRR_EB;
        }
 
        if (__debug_frame->pc == (unsigned long) __debug_bug_trap + 4) {
@@ -124,7 +123,7 @@ static void __init debug_stub_init(void)
                __debug_frame->pc = (unsigned long) start_kernel;
 
        /* enable the debug events we want to trap */
-       __debug_regs->dcr = DCR_EBE;
+       __debug_status.dcr = DCR_EBE;
 
 #ifdef CONFIG_GDBSTUB
        gdbstub_init();
index 2a1ff1ff86926f4342e8629969e305c2f455cff8..940ac306e9a0e5b13bf54ff610ec4fc1601a769e 100644 (file)
@@ -27,7 +27,6 @@
  *
  */
 
-#include <linux/sys.h>
 #include <linux/linkage.h>
 #include <asm/thread_info.h>
 #include <asm/setup.h>
index 508601fad0791749933b5da42864d746e1984971..9550f37fb62c112b1a58d2908ab9363493acc55c 100644 (file)
 #include <linux/slab.h>
 #include <linux/nmi.h>
 
+#include <asm/asm-offsets.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
 #include <asm/gdb-stub.h>
@@ -136,7 +137,6 @@ extern void debug_to_serial(const char *p, int n);
 extern void gdbstub_console_write(struct console *co, const char *p, unsigned n);
 
 extern volatile uint32_t __break_error_detect[3]; /* ESFR1, ESR15, EAR15 */
-extern struct user_context __break_user_context;
 
 struct __debug_amr {
        unsigned long L, P;
@@ -926,6 +926,7 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign
                if (!(__debug_regs->dcr & DCR_IBE0)) {
                        //gdbstub_printk("set h/w break 0: %08lx\n", addr);
                        __debug_regs->dcr |= DCR_IBE0;
+                       __debug_regs->ibar[0] = addr;
                        asm volatile("movgs %0,ibar0" : : "r"(addr));
                        return 0;
                }
@@ -933,6 +934,7 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign
                if (!(__debug_regs->dcr & DCR_IBE1)) {
                        //gdbstub_printk("set h/w break 1: %08lx\n", addr);
                        __debug_regs->dcr |= DCR_IBE1;
+                       __debug_regs->ibar[1] = addr;
                        asm volatile("movgs %0,ibar1" : : "r"(addr));
                        return 0;
                }
@@ -940,6 +942,7 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign
                if (!(__debug_regs->dcr & DCR_IBE2)) {
                        //gdbstub_printk("set h/w break 2: %08lx\n", addr);
                        __debug_regs->dcr |= DCR_IBE2;
+                       __debug_regs->ibar[2] = addr;
                        asm volatile("movgs %0,ibar2" : : "r"(addr));
                        return 0;
                }
@@ -947,6 +950,7 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign
                if (!(__debug_regs->dcr & DCR_IBE3)) {
                        //gdbstub_printk("set h/w break 3: %08lx\n", addr);
                        __debug_regs->dcr |= DCR_IBE3;
+                       __debug_regs->ibar[3] = addr;
                        asm volatile("movgs %0,ibar3" : : "r"(addr));
                        return 0;
                }
@@ -971,7 +975,14 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign
                if (!(__debug_regs->dcr & (DCR_DRBE0|DCR_DWBE0))) {
                        //gdbstub_printk("set h/w watchpoint 0 type %ld: %08lx\n", type, addr);
                        tmp = type==2 ? DCR_DWBE0 : type==3 ? DCR_DRBE0 : DCR_DRBE0|DCR_DWBE0;
+
                        __debug_regs->dcr |= tmp;
+                       __debug_regs->dbar[0] = addr;
+                       __debug_regs->dbmr[0][0] = dbmr.mask0;
+                       __debug_regs->dbmr[0][1] = dbmr.mask1;
+                       __debug_regs->dbdr[0][0] = 0;
+                       __debug_regs->dbdr[0][1] = 0;
+
                        asm volatile("  movgs   %0,dbar0        \n"
                                     "  movgs   %1,dbmr00       \n"
                                     "  movgs   %2,dbmr01       \n"
@@ -984,7 +995,14 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign
                if (!(__debug_regs->dcr & (DCR_DRBE1|DCR_DWBE1))) {
                        //gdbstub_printk("set h/w watchpoint 1 type %ld: %08lx\n", type, addr);
                        tmp = type==2 ? DCR_DWBE1 : type==3 ? DCR_DRBE1 : DCR_DRBE1|DCR_DWBE1;
+
                        __debug_regs->dcr |= tmp;
+                       __debug_regs->dbar[1] = addr;
+                       __debug_regs->dbmr[1][0] = dbmr.mask0;
+                       __debug_regs->dbmr[1][1] = dbmr.mask1;
+                       __debug_regs->dbdr[1][0] = 0;
+                       __debug_regs->dbdr[1][1] = 0;
+
                        asm volatile("  movgs   %0,dbar1        \n"
                                     "  movgs   %1,dbmr10       \n"
                                     "  movgs   %2,dbmr11       \n"
@@ -1047,6 +1065,7 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo
                if (__debug_regs->dcr & DCR_IBE0 && __get_ibar(0) == addr) {
                        //gdbstub_printk("clear h/w break 0: %08lx\n", addr);
                        __debug_regs->dcr &= ~DCR_IBE0;
+                       __debug_regs->ibar[0] = 0;
                        asm volatile("movgs gr0,ibar0");
                        return 0;
                }
@@ -1054,6 +1073,7 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo
                if (__debug_regs->dcr & DCR_IBE1 && __get_ibar(1) == addr) {
                        //gdbstub_printk("clear h/w break 1: %08lx\n", addr);
                        __debug_regs->dcr &= ~DCR_IBE1;
+                       __debug_regs->ibar[1] = 0;
                        asm volatile("movgs gr0,ibar1");
                        return 0;
                }
@@ -1061,6 +1081,7 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo
                if (__debug_regs->dcr & DCR_IBE2 && __get_ibar(2) == addr) {
                        //gdbstub_printk("clear h/w break 2: %08lx\n", addr);
                        __debug_regs->dcr &= ~DCR_IBE2;
+                       __debug_regs->ibar[2] = 0;
                        asm volatile("movgs gr0,ibar2");
                        return 0;
                }
@@ -1068,6 +1089,7 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo
                if (__debug_regs->dcr & DCR_IBE3 && __get_ibar(3) == addr) {
                        //gdbstub_printk("clear h/w break 3: %08lx\n", addr);
                        __debug_regs->dcr &= ~DCR_IBE3;
+                       __debug_regs->ibar[3] = 0;
                        asm volatile("movgs gr0,ibar3");
                        return 0;
                }
@@ -1104,6 +1126,12 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo
 
                //gdbstub_printk("clear h/w watchpoint 0 type %ld: %08lx\n", type, addr);
                __debug_regs->dcr &= ~(DCR_DRBE0|DCR_DWBE0);
+               __debug_regs->dbar[0] = 0;
+               __debug_regs->dbmr[0][0] = 0;
+               __debug_regs->dbmr[0][1] = 0;
+               __debug_regs->dbdr[0][0] = 0;
+               __debug_regs->dbdr[0][1] = 0;
+
                asm volatile("  movgs   gr0,dbar0       \n"
                             "  movgs   gr0,dbmr00      \n"
                             "  movgs   gr0,dbmr01      \n"
@@ -1123,6 +1151,12 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo
 
                //gdbstub_printk("clear h/w watchpoint 1 type %ld: %08lx\n", type, addr);
                __debug_regs->dcr &= ~(DCR_DRBE1|DCR_DWBE1);
+               __debug_regs->dbar[1] = 0;
+               __debug_regs->dbmr[1][0] = 0;
+               __debug_regs->dbmr[1][1] = 0;
+               __debug_regs->dbdr[1][0] = 0;
+               __debug_regs->dbdr[1][1] = 0;
+
                asm volatile("  movgs   gr0,dbar1       \n"
                             "  movgs   gr0,dbmr10      \n"
                             "  movgs   gr0,dbmr11      \n"
@@ -1163,7 +1197,7 @@ static void gdbstub_check_breakpoint(void)
  */
 static void __attribute__((unused)) gdbstub_show_regs(void)
 {
-       uint32_t *reg;
+       unsigned long *reg;
        int loop;
 
        gdbstub_printk("\n");
@@ -1172,11 +1206,11 @@ static void __attribute__((unused)) gdbstub_show_regs(void)
                       __debug_frame,
                       __debug_frame->psr & PSR_S ? "kernel" : "user");
 
-       reg = (uint32_t *) __debug_frame;
-       for (loop = 0; loop < REG__END; loop++) {
-               printk("%s %08x", regnames[loop + 0], reg[loop + 0]);
+       reg = (unsigned long *) __debug_frame;
+       for (loop = 0; loop < NR_PT_REGS; loop++) {
+               printk("%s %08lx", regnames[loop + 0], reg[loop + 0]);
 
-               if (loop == REG__END - 1 || loop % 5 == 4)
+               if (loop == NR_PT_REGS - 1 || loop % 5 == 4)
                        printk("\n");
                else
                        printk(" | ");
@@ -1191,13 +1225,8 @@ static void __attribute__((unused)) gdbstub_show_regs(void)
  */
 static void __attribute__((unused)) gdbstub_dump_debugregs(void)
 {
-       unsigned long x;
-
-       x = __debug_regs->dcr;
-       gdbstub_printk("DCR    %08lx  ", x);
-
-       x = __debug_regs->brr;
-       gdbstub_printk("BRR %08lx\n", x);
+       gdbstub_printk("DCR    %08lx  ", __debug_status.dcr);
+       gdbstub_printk("BRR    %08lx\n", __debug_status.brr);
 
        gdbstub_printk("IBAR0  %08lx  ", __get_ibar(0));
        gdbstub_printk("IBAR1  %08lx  ", __get_ibar(1));
@@ -1360,7 +1389,7 @@ void gdbstub(int sigval)
 #endif
        }
 
-       save_user_regs(&__break_user_context);
+       save_user_regs(&__debug_frame0->uc);
 
 #if 0
        gdbstub_printk("--> gdbstub() %08x %p %08x %08x\n",
@@ -1389,8 +1418,8 @@ void gdbstub(int sigval)
                __debug_frame->psr &= ~PSR_S;
                if (__debug_frame->psr & PSR_PS)
                        __debug_frame->psr |= PSR_S;
-               __debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12;
-               __debug_regs->brr |= BRR_EB;
+               __debug_status.brr = (__debug_frame->tbr & TBR_TT) << 12;
+               __debug_status.brr |= BRR_EB;
                sigval = SIGINT;
        }
 
@@ -1404,15 +1433,15 @@ void gdbstub(int sigval)
                __debug_frame->psr &= ~PSR_S;
                if (__debug_frame->psr & PSR_PS)
                        __debug_frame->psr |= PSR_S;
-               __debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12;
-               __debug_regs->brr |= BRR_EB;
+               __debug_status.brr = (__debug_frame->tbr & TBR_TT) << 12;
+               __debug_status.brr |= BRR_EB;
                sigval = SIGXCPU;
        }
 
        LEDS(0x5002);
 
        /* after a BREAK insn, the PC lands on the far side of it */
-       if (__debug_regs->brr & BRR_SB)
+       if (__debug_status.brr & BRR_SB)
                gdbstub_check_breakpoint();
 
        LEDS(0x5003);
@@ -1431,7 +1460,7 @@ void gdbstub(int sigval)
        }
 
        if (!sigval)
-               sigval = gdbstub_compute_signal(__debug_regs->brr);
+               sigval = gdbstub_compute_signal(__debug_status.brr);
 
        LEDS(0x5004);
 
@@ -1441,7 +1470,7 @@ void gdbstub(int sigval)
        if (sigval != SIGINT && sigval != SIGTRAP && sigval != SIGILL) {
                static const char title[] = "Break ";
                static const char crlf[] = "\r\n";
-               unsigned long brr = __debug_regs->brr;
+               unsigned long brr = __debug_status.brr;
                char hx;
 
                ptr = output_buffer;
@@ -1565,28 +1594,24 @@ void gdbstub(int sigval)
                        ptr = mem2hex(&zero, ptr, 4, 0);
 
                        for (loop = 1; loop <= 27; loop++)
-                               ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(loop),
-                                             ptr, 4, 0);
+                               ptr = mem2hex(&__debug_user_context->i.gr[loop], ptr, 4, 0);
                        temp = (unsigned long) __frame;
                        ptr = mem2hex(&temp, ptr, 4, 0);
-                       ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(29), ptr, 4, 0);
-                       ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(30), ptr, 4, 0);
+                       ptr = mem2hex(&__debug_user_context->i.gr[29], ptr, 4, 0);
+                       ptr = mem2hex(&__debug_user_context->i.gr[30], ptr, 4, 0);
 #ifdef CONFIG_MMU
-                       ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(31), ptr, 4, 0);
+                       ptr = mem2hex(&__debug_user_context->i.gr[31], ptr, 4, 0);
 #else
                        temp = (unsigned long) __debug_frame;
                        ptr = mem2hex(&temp, ptr, 4, 0);
 #endif
 
                        for (loop = 32; loop <= 63; loop++)
-                               ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(loop),
-                                             ptr, 4, 0);
+                               ptr = mem2hex(&__debug_user_context->i.gr[loop], ptr, 4, 0);
 
                        /* deal with FR0-FR63 */
                        for (loop = 0; loop <= 63; loop++)
-                               ptr = mem2hex((unsigned long *)&__break_user_context +
-                                             __FPMEDIA_FR(loop),
-                                             ptr, 4, 0);
+                               ptr = mem2hex(&__debug_user_context->f.fr[loop], ptr, 4, 0);
 
                        /* deal with special registers */
                        ptr = mem2hex(&__debug_frame->pc,    ptr, 4, 0);
@@ -1597,7 +1622,7 @@ void gdbstub(int sigval)
                        ptr = mem2hex(&zero, ptr, 4, 0);
                        ptr = mem2hex(&zero, ptr, 4, 0);
                        ptr = mem2hex(&__debug_frame->tbr,   ptr, 4, 0);
-                       ptr = mem2hex(&__debug_regs->brr ,   ptr, 4, 0);
+                       ptr = mem2hex(&__debug_status.brr ,   ptr, 4, 0);
 
                        asm volatile("movsg dbar0,%0" : "=r"(dbar));
                        ptr = mem2hex(&dbar, ptr, 4, 0);
@@ -1622,21 +1647,21 @@ void gdbstub(int sigval)
 
                        ptr = mem2hex(&__debug_frame->iacc0, ptr, 8, 0);
 
-                       ptr = mem2hex(&__break_user_context.f.fsr[0], ptr, 4, 0);
+                       ptr = mem2hex(&__debug_user_context->f.fsr[0], ptr, 4, 0);
 
                        for (loop = 0; loop <= 7; loop++)
-                               ptr = mem2hex(&__break_user_context.f.acc[loop], ptr, 4, 0);
+                               ptr = mem2hex(&__debug_user_context->f.acc[loop], ptr, 4, 0);
 
-                       ptr = mem2hex(&__break_user_context.f.accg, ptr, 8, 0);
+                       ptr = mem2hex(&__debug_user_context->f.accg, ptr, 8, 0);
 
                        for (loop = 0; loop <= 1; loop++)
-                               ptr = mem2hex(&__break_user_context.f.msr[loop], ptr, 4, 0);
+                               ptr = mem2hex(&__debug_user_context->f.msr[loop], ptr, 4, 0);
 
                        ptr = mem2hex(&__debug_frame->gner0, ptr, 4, 0);
                        ptr = mem2hex(&__debug_frame->gner1, ptr, 4, 0);
 
-                       ptr = mem2hex(&__break_user_context.f.fner[0], ptr, 4, 0);
-                       ptr = mem2hex(&__break_user_context.f.fner[1], ptr, 4, 0);
+                       ptr = mem2hex(&__debug_user_context->f.fner[0], ptr, 4, 0);
+                       ptr = mem2hex(&__debug_user_context->f.fner[1], ptr, 4, 0);
 
                        break;
 
@@ -1648,8 +1673,7 @@ void gdbstub(int sigval)
                        ptr = hex2mem(ptr, &temp, 4);
 
                        for (loop = 1; loop <= 27; loop++)
-                               ptr = hex2mem(ptr, (unsigned long *)__debug_frame + REG_GR(loop),
-                                             4);
+                               ptr = hex2mem(ptr, &__debug_user_context->i.gr[loop], 4);
 
                        ptr = hex2mem(ptr, &temp, 4);
                        __frame = (struct pt_regs *) temp;
@@ -1662,14 +1686,11 @@ void gdbstub(int sigval)
 #endif
 
                        for (loop = 32; loop <= 63; loop++)
-                               ptr = hex2mem(ptr, (unsigned long *)__debug_frame + REG_GR(loop),
-                                             4);
+                               ptr = hex2mem(ptr, &__debug_user_context->i.gr[loop], 4);
 
                        /* deal with FR0-FR63 */
                        for (loop = 0; loop <= 63; loop++)
-                               ptr = mem2hex((unsigned long *)&__break_user_context +
-                                             __FPMEDIA_FR(loop),
-                                             ptr, 4, 0);
+                               ptr = mem2hex(&__debug_user_context->f.fr[loop], ptr, 4, 0);
 
                        /* deal with special registers */
                        ptr = hex2mem(ptr, &__debug_frame->pc,  4);
@@ -1694,21 +1715,21 @@ void gdbstub(int sigval)
 
                        ptr = hex2mem(ptr, &__debug_frame->iacc0, 8);
 
-                       ptr = hex2mem(ptr, &__break_user_context.f.fsr[0], 4);
+                       ptr = hex2mem(ptr, &__debug_user_context->f.fsr[0], 4);
 
                        for (loop = 0; loop <= 7; loop++)
-                               ptr = hex2mem(ptr, &__break_user_context.f.acc[loop], 4);
+                               ptr = hex2mem(ptr, &__debug_user_context->f.acc[loop], 4);
 
-                       ptr = hex2mem(ptr, &__break_user_context.f.accg, 8);
+                       ptr = hex2mem(ptr, &__debug_user_context->f.accg, 8);
 
                        for (loop = 0; loop <= 1; loop++)
-                               ptr = hex2mem(ptr, &__break_user_context.f.msr[loop], 4);
+                               ptr = hex2mem(ptr, &__debug_user_context->f.msr[loop], 4);
 
                        ptr = hex2mem(ptr, &__debug_frame->gner0, 4);
                        ptr = hex2mem(ptr, &__debug_frame->gner1, 4);
 
-                       ptr = hex2mem(ptr, &__break_user_context.f.fner[0], 4);
-                       ptr = hex2mem(ptr, &__break_user_context.f.fner[1], 4);
+                       ptr = hex2mem(ptr, &__debug_user_context->f.fner[0], 4);
+                       ptr = hex2mem(ptr, &__debug_user_context->f.fner[1], 4);
 
                        gdbstub_strcpy(output_buffer,"OK");
                        break;
@@ -1769,52 +1790,52 @@ void gdbstub(int sigval)
                        case GDB_REG_GR(0):
                                break;
                        case GDB_REG_GR(1) ... GDB_REG_GR(63):
-                               __break_user_context.i.gr[addr - GDB_REG_GR(0)] = temp;
+                               __debug_user_context->i.gr[addr - GDB_REG_GR(0)] = temp;
                                break;
                        case GDB_REG_FR(0) ... GDB_REG_FR(63):
-                               __break_user_context.f.fr[addr - GDB_REG_FR(0)] = temp;
+                               __debug_user_context->f.fr[addr - GDB_REG_FR(0)] = temp;
                                break;
                        case GDB_REG_PC:
-                               __break_user_context.i.pc = temp;
+                               __debug_user_context->i.pc = temp;
                                break;
                        case GDB_REG_PSR:
-                               __break_user_context.i.psr = temp;
+                               __debug_user_context->i.psr = temp;
                                break;
                        case GDB_REG_CCR:
-                               __break_user_context.i.ccr = temp;
+                               __debug_user_context->i.ccr = temp;
                                break;
                        case GDB_REG_CCCR:
-                               __break_user_context.i.cccr = temp;
+                               __debug_user_context->i.cccr = temp;
                                break;
                        case GDB_REG_BRR:
-                               __debug_regs->brr = temp;
+                               __debug_status.brr = temp;
                                break;
                        case GDB_REG_LR:
-                               __break_user_context.i.lr = temp;
+                               __debug_user_context->i.lr = temp;
                                break;
                        case GDB_REG_LCR:
-                               __break_user_context.i.lcr = temp;
+                               __debug_user_context->i.lcr = temp;
                                break;
                        case GDB_REG_FSR0:
-                               __break_user_context.f.fsr[0] = temp;
+                               __debug_user_context->f.fsr[0] = temp;
                                break;
                        case GDB_REG_ACC(0) ... GDB_REG_ACC(7):
-                               __break_user_context.f.acc[addr - GDB_REG_ACC(0)] = temp;
+                               __debug_user_context->f.acc[addr - GDB_REG_ACC(0)] = temp;
                                break;
                        case GDB_REG_ACCG(0):
-                               *(uint32_t *) &__break_user_context.f.accg[0] = temp;
+                               *(uint32_t *) &__debug_user_context->f.accg[0] = temp;
                                break;
                        case GDB_REG_ACCG(4):
-                               *(uint32_t *) &__break_user_context.f.accg[4] = temp;
+                               *(uint32_t *) &__debug_user_context->f.accg[4] = temp;
                                break;
                        case GDB_REG_MSR(0) ... GDB_REG_MSR(1):
-                               __break_user_context.f.msr[addr - GDB_REG_MSR(0)] = temp;
+                               __debug_user_context->f.msr[addr - GDB_REG_MSR(0)] = temp;
                                break;
                        case GDB_REG_GNER(0) ... GDB_REG_GNER(1):
-                               __break_user_context.i.gner[addr - GDB_REG_GNER(0)] = temp;
+                               __debug_user_context->i.gner[addr - GDB_REG_GNER(0)] = temp;
                                break;
                        case GDB_REG_FNER(0) ... GDB_REG_FNER(1):
-                               __break_user_context.f.fner[addr - GDB_REG_FNER(0)] = temp;
+                               __debug_user_context->f.fner[addr - GDB_REG_FNER(0)] = temp;
                                break;
                        default:
                                temp2 = 0;
@@ -1850,6 +1871,7 @@ void gdbstub(int sigval)
                        /* step to next instruction */
                case 's':
                        __debug_regs->dcr |= DCR_SE;
+                       __debug_status.dcr |= DCR_SE;
                        goto done;
 
                        /* set baud rate (bBB) */
@@ -1934,7 +1956,7 @@ void gdbstub(int sigval)
        }
 
  done:
-       restore_user_regs(&__break_user_context);
+       restore_user_regs(&__debug_frame0->uc);
 
        //gdbstub_dump_debugregs();
        //gdbstub_printk("<-- gdbstub() %08x\n", __debug_frame->pc);
@@ -1966,7 +1988,6 @@ void __init gdbstub_init(void)
 #endif
 
        gdbstub_printk("%s", gdbstub_banner);
-       gdbstub_printk("DCR: %x\n", __debug_regs->dcr);
 
        gdbstub_io_init();
 
index 47c990af2e06a0b9c2d28e227d02becc3a8f7614..fecf751c5cae27e25b24d7f547b34b0366d3315b 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <linux/threads.h>
 #include <linux/linkage.h>
+#include <asm/thread_info.h>
 #include <asm/ptrace.h>
 #include <asm/page.h>
 #include <asm/spr-regs.h>
index e9471761d78b8f50aef19201086f9e8819bb1bb7..76606d13b1aad1d9957fbc5a2fbef62e6cac2e16 100644 (file)
@@ -51,6 +51,9 @@ extern void (*__power_switch_wake_cleanup)(void);
 /* time.c */
 extern void time_divisor_init(void);
 
+/* cmode.S */
+extern asmlinkage void frv_change_cmode(int);
+
 
 #endif /* __ASSEMBLY__ */
 #endif /* _FRV_LOCAL_H */
index e65a9f1c0c26d56f4e5a35a2f258419d2149e6d4..c1d9fc8f1a859f8d365abbcfc6efc2949bf2e092 100644 (file)
 
 #include "local.h"
 
-void (*pm_power_off)(void);
-EXPORT_SYMBOL(pm_power_off);
-
-extern void frv_change_cmode(int);
-
 /*
  * Debug macros
  */
index eeeb1e2641d5b49e14a1f760ea90001d75273a45..515a5cea5469e1c3bb5ab53315a441246baf7902 100644 (file)
@@ -10,6 +10,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -25,6 +26,7 @@
 #include <linux/reboot.h>
 #include <linux/interrupt.h>
 
+#include <asm/asm-offsets.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
 #include <asm/setup.h>
@@ -38,6 +40,9 @@ asmlinkage void ret_from_fork(void);
 
 #include <asm/pgalloc.h>
 
+void (*pm_power_off)(void);
+EXPORT_SYMBOL(pm_power_off);
+
 struct task_struct *alloc_task_struct(void)
 {
        struct task_struct *p = kmalloc(THREAD_SIZE, GFP_KERNEL);
@@ -203,7 +208,7 @@ int copy_thread(int nr, unsigned long clone_flags,
 
        regs0 = __kernel_frame0_ptr;
        childregs0 = (struct pt_regs *)
-               (task_stack_page(p) + THREAD_SIZE - USER_CONTEXT_SIZE);
+               (task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE);
        childregs = childregs0;
 
        /* set up the userspace frame (the only place that the USP is stored) */
@@ -367,3 +372,11 @@ int elf_check_arch(const struct elf32_hdr *hdr)
 
        return 1;
 }
+
+int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs)
+{
+       memcpy(fpregs,
+              &current->thread.user->f,
+              sizeof(current->thread.user->f));
+       return 1;
+}
index 9e5a583991a3ace7e1dcf74ada8ece2f1ef1264f..b5275fa9cd0d16ddc10e2674b96161ad45ec9dd5 100644 (file)
@@ -11,6 +11,7 @@
 # 2 of the License, or (at your option) any later version.
 #
 ###############################################################################
+
 #include <linux/linkage.h>
 #include <asm/thread_info.h>
 #include <asm/processor.h>
@@ -30,7 +31,7 @@
        # address of frame 0 (userspace) on current kernel stack
        .globl          __kernel_frame0_ptr
 __kernel_frame0_ptr:
-       .long           init_thread_union + THREAD_SIZE - USER_CONTEXT_SIZE
+       .long           init_thread_union + THREAD_SIZE - FRV_FRAME0_SIZE
 
        # address of current task
        .globl          __kernel_current_task
index 98ce3628ebde54a9c9aae2fa46cd49671ac9c848..2e6098c855787de54e82953bb740110be9ed0011 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 
+#include <asm/asm-offsets.h>
 #include <asm/setup.h>
 #include <asm/fpu.h>
 #include <asm/system.h>
@@ -279,20 +280,20 @@ static const char *regnames[] = {
 
 void show_regs(struct pt_regs *regs)
 {
-       uint32_t *reg;
+       unsigned long *reg;
        int loop;
 
        printk("\n");
 
-       printk("Frame: @%08x [%s]\n",
-              (uint32_t) regs,
+       printk("Frame: @%08lx [%s]\n",
+              (unsigned long) regs,
               regs->psr & PSR_S ? "kernel" : "user");
 
-       reg = (uint32_t *) regs;
-       for (loop = 0; loop < REG__END; loop++) {
-               printk("%s %08x", regnames[loop + 0], reg[loop + 0]);
+       reg = (unsigned long *) regs;
+       for (loop = 0; loop < NR_PT_REGS; loop++) {
+               printk("%s %08lx", regnames[loop + 0], reg[loop + 0]);
 
-               if (loop == REG__END - 1 || loop % 5 == 4)
+               if (loop == NR_PT_REGS - 1 || loop % 5 == 4)
                        printk("\n");
                else
                        printk(" | ");
@@ -328,7 +329,7 @@ void die_if_kernel(const char *str, ...)
  */
 static void show_backtrace_regs(struct pt_regs *frame)
 {
-       uint32_t *reg;
+       unsigned long *reg;
        int loop;
 
        /* print the registers for this frame */
@@ -336,11 +337,11 @@ static void show_backtrace_regs(struct pt_regs *frame)
               frame->psr & PSR_S ? "Kernel Mode" : "User Mode",
               frame);
 
-       reg = (uint32_t *) frame;
-       for (loop = 0; loop < REG__END; loop++) {
-               printk("%s %08x", regnames[loop + 0], reg[loop + 0]);
+       reg = (unsigned long *) frame;
+       for (loop = 0; loop < NR_PT_REGS; loop++) {
+               printk("%s %08lx", regnames[loop + 0], reg[loop + 0]);
 
-               if (loop == REG__END - 1 || loop % 5 == 4)
+               if (loop == NR_PT_REGS - 1 || loop % 5 == 4)
                        printk("\n");
                else
                        printk(" | ");
index fb98e90c57941a4ff9141489c5d2f396ff4814d0..f7279d78995a8580157f2a77f25a124009f50ce6 100644 (file)
@@ -406,7 +406,9 @@ int __init pcibios_init(void)
        ioport_resource.end     = (__reg_MB86943_sl_pci_io_range << 9) | 0x3ff;
        ioport_resource.end     += ioport_resource.start;
 
-       printk("PCI IO window:  %08lx-%08lx\n", ioport_resource.start, ioport_resource.end);
+       printk("PCI IO window:  %08llx-%08llx\n",
+              (unsigned long long) ioport_resource.start,
+              (unsigned long long) ioport_resource.end);
 
        iomem_resource.start    = (__reg_MB86943_sl_pci_mem_base << 9) & 0xfffffc00;
 
@@ -416,8 +418,11 @@ int __init pcibios_init(void)
        iomem_resource.end      = (__reg_MB86943_sl_pci_mem_range << 9) | 0x3ff;
        iomem_resource.end      += iomem_resource.start;
 
-       printk("PCI MEM window: %08lx-%08lx\n", iomem_resource.start, iomem_resource.end);
-       printk("PCI DMA memory: %08lx-%08lx\n", dma_coherent_mem_start, dma_coherent_mem_end);
+       printk("PCI MEM window: %08llx-%08llx\n",
+              (unsigned long long) iomem_resource.start,
+              (unsigned long long) iomem_resource.end);
+       printk("PCI DMA memory: %08lx-%08lx\n",
+              dma_coherent_mem_start, dma_coherent_mem_end);
 
        if (!pci_probe)
                return -ENXIO;
index 1629c3ac9bee6bb2a0ee1853036da45df84cee2b..89ebb7a316abfc86a31bbeb83c6455efc369271d 100644 (file)
@@ -197,7 +197,7 @@ CONFIG_PM=y
 # CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION="/dev/hda2"
+CONFIG_PM_STD_PARTITION=""
 
 #
 # ACPI (Advanced Configuration and Power Interface) Support
index 48f0f62f781c98d9b82456a3bb929638cdcc7bcd..5b96f038367f4481dca597f7c32e771efbf3fcfc 100644 (file)
@@ -90,7 +90,7 @@ static void crash_save_self(struct pt_regs *regs)
        crash_save_this_cpu(regs, cpu);
 }
 
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC)
 static atomic_t waiting_for_crash_ipi;
 
 static int crash_nmi_callback(struct pt_regs *regs, int cpu)
index 79026f026b85401ee42c3e83bd55c1029e3286e8..498e8bc197d5c81cc356d917111b044ffe42393f 100644 (file)
@@ -79,6 +79,7 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
 
                memset(bitmap, 0xff, IO_BITMAP_BYTES);
                t->io_bitmap_ptr = bitmap;
+               set_thread_flag(TIF_IO_BITMAP);
        }
 
        /*
index 94e2c87edeaa31c76475e48f92e3212ac62119e2..923bb292f47fbc91ac978777ab69eafc28a2535c 100644 (file)
@@ -359,16 +359,16 @@ EXPORT_SYMBOL(kernel_thread);
  */
 void exit_thread(void)
 {
-       struct task_struct *tsk = current;
-       struct thread_struct *t = &tsk->thread;
-
        /* The process may have allocated an io port bitmap... nuke it. */
-       if (unlikely(NULL != t->io_bitmap_ptr)) {
+       if (unlikely(test_thread_flag(TIF_IO_BITMAP))) {
+               struct task_struct *tsk = current;
+               struct thread_struct *t = &tsk->thread;
                int cpu = get_cpu();
                struct tss_struct *tss = &per_cpu(init_tss, cpu);
 
                kfree(t->io_bitmap_ptr);
                t->io_bitmap_ptr = NULL;
+               clear_thread_flag(TIF_IO_BITMAP);
                /*
                 * Careful, clear this in the TSS too:
                 */
@@ -387,6 +387,7 @@ void flush_thread(void)
 
        memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
        memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));        
+       clear_tsk_thread_flag(tsk, TIF_DEBUG);
        /*
         * Forget coprocessor state..
         */
@@ -431,7 +432,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
        savesegment(gs,p->thread.gs);
 
        tsk = current;
-       if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) {
+       if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) {
                p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
                if (!p->thread.io_bitmap_ptr) {
                        p->thread.io_bitmap_max = 0;
@@ -439,6 +440,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
                }
                memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr,
                        IO_BITMAP_BYTES);
+               set_tsk_thread_flag(p, TIF_IO_BITMAP);
        }
 
        /*
@@ -533,10 +535,24 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
        return 1;
 }
 
-static inline void
-handle_io_bitmap(struct thread_struct *next, struct tss_struct *tss)
+static noinline void __switch_to_xtra(struct task_struct *next_p,
+                                   struct tss_struct *tss)
 {
-       if (!next->io_bitmap_ptr) {
+       struct thread_struct *next;
+
+       next = &next_p->thread;
+
+       if (test_tsk_thread_flag(next_p, TIF_DEBUG)) {
+               set_debugreg(next->debugreg[0], 0);
+               set_debugreg(next->debugreg[1], 1);
+               set_debugreg(next->debugreg[2], 2);
+               set_debugreg(next->debugreg[3], 3);
+               /* no 4 and 5 */
+               set_debugreg(next->debugreg[6], 6);
+               set_debugreg(next->debugreg[7], 7);
+       }
+
+       if (!test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) {
                /*
                 * Disable the bitmap via an invalid offset. We still cache
                 * the previous bitmap owner and the IO bitmap contents:
@@ -544,6 +560,7 @@ handle_io_bitmap(struct thread_struct *next, struct tss_struct *tss)
                tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
                return;
        }
+
        if (likely(next == tss->io_bitmap_owner)) {
                /*
                 * Previous owner of the bitmap (hence the bitmap content)
@@ -671,20 +688,11 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
                set_iopl_mask(next->iopl);
 
        /*
-        * Now maybe reload the debug registers
+        * Now maybe handle debug registers and/or IO bitmaps
         */
-       if (unlikely(next->debugreg[7])) {
-               set_debugreg(next->debugreg[0], 0);
-               set_debugreg(next->debugreg[1], 1);
-               set_debugreg(next->debugreg[2], 2);
-               set_debugreg(next->debugreg[3], 3);
-               /* no 4 and 5 */
-               set_debugreg(next->debugreg[6], 6);
-               set_debugreg(next->debugreg[7], 7);
-       }
-
-       if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr))
-               handle_io_bitmap(next, tss);
+       if (unlikely((task_thread_info(next_p)->flags & _TIF_WORK_CTXSW))
+           || test_tsk_thread_flag(prev_p, TIF_IO_BITMAP))
+               __switch_to_xtra(next_p, tss);
 
        disable_tsc(prev_p, next_p);
 
index fd7eaf7866e0e118cd6852ade5122e4f6ef14051..d3db03f4085d75ef607acda75e020cf0c0f10ffe 100644 (file)
@@ -468,8 +468,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                                  for(i=0; i<4; i++)
                                          if ((0x5f54 >> ((data >> (16 + 4*i)) & 0xf)) & 1)
                                                  goto out_tsk;
+                                 if (data)
+                                         set_tsk_thread_flag(child, TIF_DEBUG);
+                                 else
+                                         clear_tsk_thread_flag(child, TIF_DEBUG);
                          }
-
                          addr -= (long) &dummy->u_debugreg;
                          addr = addr >> 2;
                          child->thread.debugreg[addr] = data;
index 08c00d20f1623c738d93117747aa9a7e016f9bfd..f1682206d304d31fb650992bf8a1cb551b2c54ee 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/mmzone.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/ioport.h>
 #include <linux/acpi.h>
 #include <linux/apm_bios.h>
@@ -1327,7 +1327,10 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat
                res->start = e820.map[i].addr;
                res->end = res->start + e820.map[i].size - 1;
                res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
-               request_resource(&iomem_resource, res);
+               if (request_resource(&iomem_resource, res)) {
+                       kfree(res);
+                       continue;
+               }
                if (e820.map[i].type == E820_RAM) {
                        /*
                         *  We don't know which RAM region contains kernel data,
index 316421a7f56f6f6a1b5bfafb6a29fb27322dda14..8705c0f0578881afafb5af2e80337f347bfad5ec 100644 (file)
@@ -206,15 +206,16 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 unsigned long get_cmos_time(void)
 {
        unsigned long retval;
+       unsigned long flags;
 
-       spin_lock(&rtc_lock);
+       spin_lock_irqsave(&rtc_lock, flags);
 
        if (efi_enabled)
                retval = efi_get_time();
        else
                retval = mach_get_cmos_time();
 
-       spin_unlock(&rtc_lock);
+       spin_unlock_irqrestore(&rtc_lock, flags);
 
        return retval;
 }
index 2bf8b55b91f83795e3951a3ec04d3de75ec9f9fb..313ac1f7dc5aaf88795748554118a8d9e393f83f 100644 (file)
@@ -100,13 +100,13 @@ int register_die_notifier(struct notifier_block *nb)
        vmalloc_sync_all();
        return atomic_notifier_chain_register(&i386die_chain, nb);
 }
-EXPORT_SYMBOL(register_die_notifier);
+EXPORT_SYMBOL(register_die_notifier); /* used modular by kdb */
 
 int unregister_die_notifier(struct notifier_block *nb)
 {
        return atomic_notifier_chain_unregister(&i386die_chain, nb);
 }
-EXPORT_SYMBOL(unregister_die_notifier);
+EXPORT_SYMBOL(unregister_die_notifier); /* used modular by kdb */
 
 static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
 {
@@ -324,35 +324,35 @@ void show_registers(struct pt_regs *regs)
 
 static void handle_BUG(struct pt_regs *regs)
 {
+       unsigned long eip = regs->eip;
        unsigned short ud2;
-       unsigned short line;
-       char *file;
-       char c;
-       unsigned long eip;
-
-       eip = regs->eip;
 
        if (eip < PAGE_OFFSET)
-               goto no_bug;
+               return;
        if (__get_user(ud2, (unsigned short __user *)eip))
-               goto no_bug;
+               return;
        if (ud2 != 0x0b0f)
-               goto no_bug;
-       if (__get_user(line, (unsigned short __user *)(eip + 2)))
-               goto bug;
-       if (__get_user(file, (char * __user *)(eip + 4)) ||
-               (unsigned long)file < PAGE_OFFSET || __get_user(c, file))
-               file = "<bad filename>";
+               return;
 
        printk(KERN_EMERG "------------[ cut here ]------------\n");
-       printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line);
 
-no_bug:
-       return;
+#ifdef CONFIG_DEBUG_BUGVERBOSE
+       do {
+               unsigned short line;
+               char *file;
+               char c;
 
-       /* Here we know it was a BUG but file-n-line is unavailable */
-bug:
-       printk(KERN_EMERG "Kernel BUG\n");
+               if (__get_user(line, (unsigned short __user *)(eip + 2)))
+                       break;
+               if (__get_user(file, (char * __user *)(eip + 4)) ||
+                   (unsigned long)file < PAGE_OFFSET || __get_user(c, file))
+                       file = "<bad filename>";
+
+               printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line);
+               return;
+       } while (0);
+#endif
+       printk(KERN_EMERG "Kernel BUG at [verbose debug info unavailable]\n");
 }
 
 /* This is gone through when something in the kernel
index 4b75212ab6dd877786057eef6b2192cfadd4d6ed..efc7e7d5f4d0f518847b5232f38aad75ea9367f4 100644 (file)
@@ -843,7 +843,6 @@ unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *fr
 unsigned long
 copy_to_user(void __user *to, const void *from, unsigned long n)
 {
-       might_sleep();
        BUG_ON((long) n < 0);
        if (access_ok(VERIFY_WRITE, to, n))
                n = __copy_to_user(to, from, n);
@@ -870,7 +869,6 @@ EXPORT_SYMBOL(copy_to_user);
 unsigned long
 copy_from_user(void *to, const void __user *from, unsigned long n)
 {
-       might_sleep();
        BUG_ON((long) n < 0);
        if (access_ok(VERIFY_READ, from, n))
                n = __copy_from_user(to, from, n);
index fa8a37bcb391995e8d0de88dac0208f2d9458a52..c8c1df8ff2b479671e9733e6f382f1bfa4feae5c 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/oprofile.h>
 #include <linux/sysdev.h>
 #include <linux/slab.h>
+#include <linux/moduleparam.h>
 #include <asm/nmi.h>
 #include <asm/msr.h>
 #include <asm/apic.h>
@@ -296,12 +297,14 @@ static int nmi_create_files(struct super_block * sb, struct dentry * root)
        return 0;
 }
  
+static int p4force;
+module_param(p4force, int, 0);
  
 static int __init p4_init(char ** cpu_type)
 {
        __u8 cpu_model = boot_cpu_data.x86_model;
 
-       if (cpu_model > 4)
+       if (!p4force && (cpu_model > 6 || cpu_model == 5))
                return 0;
 
 #ifndef CONFIG_SMP
index c624b61e110455e746ac021c8f7430d1f58251cc..0a362e3aeac55aba443e5901a71bbe7e465e841a 100644 (file)
 
 #include "pci.h"
 
-#ifdef CONFIG_PCI_BIOS
-extern  void pcibios_sort(void);
-#endif
-
 unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
                                PCI_PROBE_MMCONF;
 
index 12bf3d8dda297e3f68f39dc06e996dfafedac58d..bf4e79335388b533b6149dcf403533b6ce687c7e 100644 (file)
@@ -84,4 +84,4 @@ extern int pci_conf1_read(unsigned int seg, unsigned int bus,
 extern void pci_direct_init(void);
 extern void pci_pcbios_init(void);
 extern void pci_mmcfg_init(void);
-
+extern void pcibios_sort(void);
index 5ab12b8351d020458a4da260c364cc893effd675..9196b330ff7fa917c0508ca6e5b35578b0bffc86 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/kdev_t.h>
 #include <linux/string.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/console.h>
 #include <linux/timex.h>
 #include <linux/sched.h>
index b13c0555c3ba4a57989178de6f8b7633fcd85dc7..e4bfa9dafbcebf88e2d815cd30197ee82eceeb28 100644 (file)
@@ -759,7 +759,7 @@ valid_phys_addr_range (unsigned long phys_addr, unsigned long size)
 }
 
 int
-valid_mmap_phys_addr_range (unsigned long phys_addr, unsigned long size)
+valid_mmap_phys_addr_range (unsigned long pfn, unsigned long size)
 {
        /*
         * MMIO regions are often missing from the EFI memory map.
index 6a33f414de5862835fc09c19fc9d7918118ea11d..7ad0d9cc6db65c1503cc3a69259954633c6c5991 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/seq_file.h>
 #include <linux/string.h>
 #include <linux/threads.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/dmi.h>
 #include <linux/serial.h>
 #include <linux/serial_core.h>
index 276512fd8922d33ef23c3429ce23631607dd86bb..60b45e79f080dbf11f60e7deb362c1efd37cbc0f 100644 (file)
@@ -650,7 +650,7 @@ pci_mmap_legacy_page_range(struct pci_bus *bus, struct vm_area_struct *vma)
         * Avoid attribute aliasing.  See Documentation/ia64/aliasing.txt
         * for more details.
         */
-       if (!valid_mmap_phys_addr_range(vma->vm_pgoff << PAGE_SHIFT, size))
+       if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size))
                return -EINVAL;
        prot = phys_mem_access_prot(NULL, vma->vm_pgoff, size,
                                    vma->vm_page_prot);
index dd6bcf4d58bf86b2c84836246aa285b32b3647f1..c119e8b620de6ca2e198433ca3dc7049bdbe4207 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/kdev_t.h>
 #include <linux/string.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/console.h>
 #include <linux/timex.h>
 #include <linux/sched.h>
index 0a6c6e677afe285105bacd0c38672c1f2b4f0d0b..3f35ab3d2dc28060b6030c76b37726887e8edd5f 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/root_dev.h>
 #include <linux/seq_file.h>
 #include <linux/timex.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/cpu.h>
 #include <linux/nodemask.h>
 #include <linux/pfn.h>
index 747a9c1228f247b959bd9ff11cc240c6cd4946ec..330f6abc7703c0302db441be299eafc842a3ff52 100644 (file)
@@ -480,6 +480,7 @@ config MOMENCO_OCELOT_G
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
+       select ARCH_SPARSEMEM_ENABLE
        help
          The Ocelot is a MIPS-based Single Board Computer (SBC) made by
          Momentum Computer <http://www.momenco.com/>.
@@ -556,6 +557,7 @@ config QEMU
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
+       select ARCH_SPARSEMEM_ENABLE
        help
          Qemu is a software emulator which among other architectures also
          can simulate a MIPS32 4Kc system.  This patch adds support for the
@@ -594,7 +596,6 @@ config SGI_IP22
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
-       select SYS_SUPPORTS_SMP
        help
          This are the SGI Indy, Challenge S and Indigo2, as well as certain
          OEM variants like the Tandem CMN B006S. To compile a Linux kernel
@@ -1688,6 +1689,13 @@ config ARCH_DISCONTIGMEM_ENABLE
          or have huge holes in the physical address space for other reasons.
          See <file:Documentation/vm/numa> for more.
 
+config ARCH_SPARSEMEM_ENABLE
+       bool
+
+config ARCH_SPARSEMEM_ENABLE
+       bool
+       select SPARSEMEM_STATIC
+
 config NUMA
        bool "NUMA Support"
        depends on SYS_SUPPORTS_NUMA
index 515f9e61130749d2779e09b402e78db66cf07c38..5d6afb52d904aecd6b618c86f42be901897cb7b3 100644 (file)
@@ -1,5 +1,9 @@
 menu "Kernel hacking"
 
+config TRACE_IRQFLAGS_SUPPORT
+       bool
+       default y
+
 source "lib/Kconfig.debug"
 
 config CROSSCOMPILE
index ebbb9adc0e2fb01f8113c762b79c32acb65baffc..d333ce4ba26b54dfc5b188c9cd5a856c90099da8 100644 (file)
@@ -712,16 +712,14 @@ endif
 vmlinux.bin: $(vmlinux-32)
        +@$(call makeboot,$@)
 
-vmlinux.ecoff vmlinux.rm200: $(vmlinux-32)
+vmlinux.ecoff: $(vmlinux-32)
        +@$(call makeboot,$@)
 
 vmlinux.srec: $(vmlinux-32)
        +@$(call makeboot,$@)
 
 CLEAN_FILES += vmlinux.ecoff \
-              vmlinux.srec \
-              vmlinux.rm200.tmp \
-              vmlinux.rm200
+              vmlinux.srec
 
 archclean:
        @$(MAKE) $(clean)=arch/mips/boot
index 29d6f8178badd55c4fc745cd37d2702f487ddc75..316722ee8cf504e7972722c882ae9a8e94cad3bb 100644 (file)
@@ -251,7 +251,7 @@ void restore_local_and_enable(int controller, unsigned long mask)
 }
 
 
-static struct hw_interrupt_type rise_edge_irq_type = {
+static struct irq_chip rise_edge_irq_type = {
        .typename = "Au1000 Rise Edge",
        .startup = startup_irq,
        .shutdown = shutdown_irq,
@@ -261,7 +261,7 @@ static struct hw_interrupt_type rise_edge_irq_type = {
        .end = end_irq,
 };
 
-static struct hw_interrupt_type fall_edge_irq_type = {
+static struct irq_chip fall_edge_irq_type = {
        .typename = "Au1000 Fall Edge",
        .startup = startup_irq,
        .shutdown = shutdown_irq,
@@ -271,7 +271,7 @@ static struct hw_interrupt_type fall_edge_irq_type = {
        .end = end_irq,
 };
 
-static struct hw_interrupt_type either_edge_irq_type = {
+static struct irq_chip either_edge_irq_type = {
        .typename = "Au1000 Rise or Fall Edge",
        .startup = startup_irq,
        .shutdown = shutdown_irq,
@@ -281,7 +281,7 @@ static struct hw_interrupt_type either_edge_irq_type = {
        .end = end_irq,
 };
 
-static struct hw_interrupt_type level_irq_type = {
+static struct irq_chip level_irq_type = {
        .typename = "Au1000 Level",
        .startup = startup_irq,
        .shutdown = shutdown_irq,
index ae7d8c57bf3f8d889758f02607a2ad0aec16e4c2..b4b010a2fe36d2b8947a680b903666de8b2715c2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *
  * BRIEF MODULE DESCRIPTION
- *    PROM library initialisation code, assuming YAMON is the boot loader.
+ *    PROM library initialisation code, supports YAMON and U-Boot.
  *
  * Copyright 2000, 2001, 2006 MontaVista Software Inc.
  * Author: MontaVista Software, Inc.
 extern int prom_argc;
 extern char **prom_argv, **prom_envp;
 
-typedef struct
-{
-       char *name;
-       char *val;
-} t_env_var;
-
 
 char * prom_getcmdline(void)
 {
@@ -84,13 +78,21 @@ char *prom_getenv(char *envname)
 {
        /*
         * Return a pointer to the given environment variable.
+        * YAMON uses "name", "value" pairs, while U-Boot uses "name=value".
         */
 
-       t_env_var *env = (t_env_var *)prom_envp;
-
-       while (env->name) {
-               if (strcmp(envname, env->name) == 0)
-                       return env->val;
+       char **env = prom_envp;
+       int i = strlen(envname);
+       int yamon = (*env && strchr(*env, '=') == NULL);
+
+       while (*env) {
+               if (yamon) {
+                       if (strcmp(envname, *env++) == 0)
+                               return *env;
+               } else {
+                       if (strncmp(envname, *env, i) == 0 && (*env)[i] == '=')
+                               return *env + i + 1;
+               }
                env++;
        }
        return NULL;
index cc5138ce9c955f6903628e3ad2cf088ea7970571..377ae0d8ff0037300d30a392cf5629ea2bb1950f 100644 (file)
@@ -51,7 +51,6 @@ extern void au1000_power_off(void);
 extern void au1x_time_init(void);
 extern void au1x_timer_setup(struct irqaction *irq);
 extern void au1xxx_time_init(void);
-extern void au1xxx_timer_setup(struct irqaction *irq);
 extern void set_cpuspec(void);
 
 void __init plat_mem_setup(void)
@@ -123,7 +122,6 @@ void __init plat_mem_setup(void)
        _machine_halt = au1000_halt;
        pm_power_off = au1000_power_off;
        board_time_init = au1xxx_time_init;
-       board_timer_setup = au1xxx_timer_setup;
 
        /* IO/MEM resources. */
        set_io_port_base(0);
index 7e988b0b013021880fe0a4d4433d415bcc4a0df5..7fbea1bf7b4824afb61d2bacc1c28ab40d1e9458 100644 (file)
@@ -383,7 +383,7 @@ static unsigned long do_fast_pm_gettimeoffset(void)
 }
 #endif
 
-void __init au1xxx_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        unsigned int est_freq;
 
diff --git a/arch/mips/au1000/csb250/Makefile b/arch/mips/au1000/csb250/Makefile
deleted file mode 100644 (file)
index c0c4dcd..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-#  Copyright 2002 Cogent Computer Systems
-#      dan@embeddededge.com
-#
-# Makefile for the Cogent CSB250 Au1500 board.  Copied from Pb1500.
-#
-
-obj-y := init.o board_setup.o irqmap.o
diff --git a/arch/mips/au1000/csb250/board_setup.c b/arch/mips/au1000/csb250/board_setup.c
deleted file mode 100644 (file)
index 348c302..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- *
- * BRIEF MODULE DESCRIPTION
- *     Cogent CSB250 board setup.
- *
- * Copyright 2002 Cogent Computer Systems, Inc.
- *     dan@embeddededge.com
- *
- *  This program is free software; you can redistribute  it and/or modify it
- *  under  the terms of  the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the  License, or (at your
- *  option) any later version.
- *
- *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
- *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the  GNU General Public License along
- *  with this program; if not, write  to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#include <linux/init.h>
-#include <linux/sched.h>
-#include <linux/ioport.h>
-#include <linux/mm.h>
-#include <linux/console.h>
-#include <linux/mc146818rtc.h>
-#include <linux/delay.h>
-
-#include <asm/cpu.h>
-#include <asm/bootinfo.h>
-#include <asm/irq.h>
-#include <asm/keyboard.h>
-#include <asm/mipsregs.h>
-#include <asm/reboot.h>
-#include <asm/pgtable.h>
-#include <asm/au1000.h>
-#include <asm/csb250.h>
-
-extern int (*board_pci_idsel)(unsigned int devsel, int assert);
-int    csb250_pci_idsel(unsigned int devsel, int assert);
-
-void __init board_setup(void)
-{
-       u32 pin_func, pin_val;
-       u32 sys_freqctrl, sys_clksrc;
-
-
-       // set AUX clock to 12MHz * 8 = 96 MHz
-       au_writel(8, SYS_AUXPLL);
-       au_writel(0, SYS_PINSTATERD);
-       udelay(100);
-
-#if defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
-
-       /* GPIO201 is input for PCMCIA card detect */
-       /* GPIO203 is input for PCMCIA interrupt request */
-       au_writel(au_readl(GPIO2_DIR) & (u32)(~((1<<1)|(1<<3))), GPIO2_DIR);
-
-       /* zero and disable FREQ2 */
-       sys_freqctrl = au_readl(SYS_FREQCTRL0);
-       sys_freqctrl &= ~0xFFF00000;
-       au_writel(sys_freqctrl, SYS_FREQCTRL0);
-
-       /* zero and disable USBH/USBD clocks */
-       sys_clksrc = au_readl(SYS_CLKSRC);
-       sys_clksrc &= ~0x00007FE0;
-       au_writel(sys_clksrc, SYS_CLKSRC);
-
-       sys_freqctrl = au_readl(SYS_FREQCTRL0);
-       sys_freqctrl &= ~0xFFF00000;
-
-       sys_clksrc = au_readl(SYS_CLKSRC);
-       sys_clksrc &= ~0x00007FE0;
-
-       // FREQ2 = aux/2 = 48 MHz
-       sys_freqctrl |= ((0<<22) | (1<<21) | (1<<20));
-       au_writel(sys_freqctrl, SYS_FREQCTRL0);
-
-       /*
-        * Route 48MHz FREQ2 into USB Host and/or Device
-        */
-#ifdef CONFIG_USB_OHCI
-       sys_clksrc |= ((4<<12) | (0<<11) | (0<<10));
-#endif
-#ifdef CONFIG_AU1X00_USB_DEVICE
-       sys_clksrc |= ((4<<7) | (0<<6) | (0<<5));
-#endif
-       au_writel(sys_clksrc, SYS_CLKSRC);
-
-
-       pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
-#ifndef CONFIG_AU1X00_USB_DEVICE
-       // 2nd USB port is USB host
-       pin_func |= 0x8000;
-#endif
-       au_writel(pin_func, SYS_PINFUNC);
-#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
-
-       /* Configure GPIO2....it's used by PCI among other things.
-       */
-
-       /* Make everything but GP200 (PCI RST) an input until we get
-        * the pins set correctly.
-        */
-       au_writel(0x00000001, GPIO2_DIR);
-
-       /* Set the pins used for output.
-        * A zero bit will leave PCI reset, LEDs off, power up USB,
-        * IDSEL disabled.
-        */
-       pin_val = ((3 << 30) | (7 << 19) | (1 << 17) | (1 << 16));
-       au_writel(pin_val, GPIO2_OUTPUT);
-
-       /* Set the output direction.
-       */
-       pin_val = ((3 << 14) | (7 << 3) | (1 << 1) | (1 << 0));
-       au_writel(pin_val, GPIO2_DIR);
-
-#ifdef CONFIG_PCI
-       /* Use FREQ1 for the PCI output clock.  We use the
-        * CPU clock of 384 MHz divided by 12 to get 32 MHz PCI.
-        * If Michael changes the CPU speed, we need to adjust
-        * that here as well :-).
-        */
-
-       /* zero and disable FREQ1
-       */
-       sys_freqctrl = au_readl(SYS_FREQCTRL0);
-       sys_freqctrl &= ~0x000ffc00;
-       au_writel(sys_freqctrl, SYS_FREQCTRL0);
-
-       /* zero and disable PCI clock
-       */
-       sys_clksrc = au_readl(SYS_CLKSRC);
-       sys_clksrc &= ~0x000f8000;
-       au_writel(sys_clksrc, SYS_CLKSRC);
-
-       /* Get current values (which really should match above).
-       */
-       sys_freqctrl = au_readl(SYS_FREQCTRL0);
-       sys_freqctrl &= ~0x000ffc00;
-
-       sys_clksrc = au_readl(SYS_CLKSRC);
-       sys_clksrc &= ~0x000f8000;
-
-       /* FREQ1 = cpu/12 = 32 MHz
-       */
-       sys_freqctrl |= ((5<<12) | (1<<11) | (0<<10));
-       au_writel(sys_freqctrl, SYS_FREQCTRL0);
-
-       /* Just connect the clock without further dividing.
-       */
-       sys_clksrc |= ((3<<17) | (0<<16) | (0<<15));
-       au_writel(sys_clksrc, SYS_CLKSRC);
-
-       udelay(1);
-
-       /* Now that clocks should be running, take PCI out of reset.
-       */
-       pin_val = au_readl(GPIO2_OUTPUT);
-       pin_val |= ((1 << 16) | 1);
-       au_writel(pin_val, GPIO2_OUTPUT);
-
-       // Setup PCI bus controller
-       au_writel(0, Au1500_PCI_CMEM);
-       au_writel(0x00003fff, Au1500_CFG_BASE);
-
-       /* We run big endian without any of the software byte swapping,
-        * so configure the PCI bridge to help us out.
-        */
-       au_writel(0xf | (2<<6) | (1<<5) | (1<<4), Au1500_PCI_CFG);
-
-       au_writel(0xf0000000, Au1500_PCI_MWMASK_DEV);
-       au_writel(0, Au1500_PCI_MWBASE_REV_CCL);
-       au_writel(0x02a00356, Au1500_PCI_STATCMD);
-       au_writel(0x00003c04, Au1500_PCI_HDRTYPE);
-       au_writel(0x00000008, Au1500_PCI_MBAR);
-       au_sync();
-
-       board_pci_idsel = csb250_pci_idsel;
-#endif
-
-       /* Enable sys bus clock divider when IDLE state or no bus activity. */
-       au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
-
-#ifdef CONFIG_RTC
-       // Enable the RTC if not already enabled
-       if (!(au_readl(0xac000028) & 0x20)) {
-               printk("enabling clock ...\n");
-               au_writel((au_readl(0xac000028) | 0x20), 0xac000028);
-       }
-       // Put the clock in BCD mode
-       if (readl(0xac00002C) & 0x4) { /* reg B */
-               au_writel(au_readl(0xac00002c) & ~0x4, 0xac00002c);
-               au_sync();
-       }
-#endif
-}
-
-/* The IDSEL is selected in the GPIO2 register.  We will make device
- * 12 appear in slot 0 and device 13 appear in slot 1.
- */
-int
-csb250_pci_idsel(unsigned int devsel, int assert)
-{
-       int             retval;
-       unsigned int    gpio2_pins;
-
-       retval = 1;
-
-       /* First, disable both selects, then assert the one requested.
-       */
-       au_writel(0xc000c000, GPIO2_OUTPUT);
-       au_sync();
-
-       if (assert) {
-               if (devsel == 12)
-                       gpio2_pins = 0x40000000;
-               else if (devsel == 13)
-                       gpio2_pins = 0x80000000;
-               else {
-                       gpio2_pins = 0xc000c000;
-                       retval = 0;
-               }
-               au_writel(gpio2_pins, GPIO2_OUTPUT);
-       }
-       au_sync();
-
-       return retval;
-}
diff --git a/arch/mips/au1000/csb250/init.c b/arch/mips/au1000/csb250/init.c
deleted file mode 100644 (file)
index 83f1b31..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *
- * BRIEF MODULE DESCRIPTION
- *     Cogent CSB250 board setup
- *
- * Copyright 2002 Cogent Computer Systems, Inc.
- *     dan@embeddededge.com
- *
- *  This program is free software; you can redistribute  it and/or modify it
- *  under  the terms of  the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the  License, or (at your
- *  option) any later version.
- *
- *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
- *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the  GNU General Public License along
- *  with this program; if not, write  to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <linux/init.h>
-#include <linux/mm.h>
-#include <linux/sched.h>
-#include <linux/bootmem.h>
-#include <asm/addrspace.h>
-#include <asm/bootinfo.h>
-#include <linux/string.h>
-#include <linux/kernel.h>
-
-int prom_argc;
-char **prom_argv, **prom_envp;
-extern void  __init prom_init_cmdline(void);
-extern char *prom_getenv(char *envname);
-
-/* When we get initrd working someday.........
-*/
-int    my_initrd_start, my_initrd_size;
-
-/* Start arguments and environment.
-*/
-static char    *csb_env[2];
-static char    *csb_arg[4];
-static char    *arg1 = "console=ttyS3,38400";
-static char    *arg2 = "root=/dev/nfs rw ip=any";
-static char    *env1 = "ethaddr=00:30:23:50:00:00";
-
-const char *get_system_type(void)
-{
-       return "Cogent CSB250";
-}
-
-int __init prom_init(int argc, char **argv, char **envp, int *prom_vec)
-{
-       unsigned char *memsize_str;
-       unsigned long memsize;
-
-       /* We use a0 and a1 to pass initrd start and size.
-       */
-       if (((unsigned int) argc > 0) && ((uint)argv > 0)) {
-               my_initrd_start = (unsigned int)argc;
-               my_initrd_size = (unsigned int)argv;
-       }
-
-       /* First argv is ignored.
-       */
-       prom_argc = 3;
-       prom_argv = csb_arg;
-       prom_envp = csb_env;
-       csb_arg[1] = arg1;
-       csb_arg[2] = arg2;
-       csb_env[0] = env1;
-
-       mips_machgroup = MACH_GROUP_ALCHEMY;
-       mips_machtype = MACH_CSB250;
-
-       prom_init_cmdline();
-       memsize_str = prom_getenv("memsize");
-       if (!memsize_str) {
-               memsize = 0x02000000;
-       } else {
-               memsize = simple_strtol(memsize_str, NULL, 0);
-       }
-       add_memory_region(0, memsize, BOOT_MEM_RAM);
-       return 0;
-}
diff --git a/arch/mips/au1000/csb250/irqmap.c b/arch/mips/au1000/csb250/irqmap.c
deleted file mode 100644 (file)
index 57d6040..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * BRIEF MODULE DESCRIPTION
- *     Au1xxx irq map table
- *
- * Copyright 2003 Embedded Edge, LLC
- *             dan@embeddededge.com
- *
- *  This program is free software; you can redistribute         it and/or modify it
- *  under  the terms of         the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the License, or (at your
- *  option) any later version.
- *
- *  THIS  SOFTWARE  IS PROVIDED          ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
- *  WARRANTIES,          INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED          TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA, OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN         CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the  GNU General Public License along
- *  with this program; if not, write  to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#include <linux/errno.h>
-#include <linux/init.h>
-#include <linux/irq.h>
-#include <linux/kernel_stat.h>
-#include <linux/module.h>
-#include <linux/signal.h>
-#include <linux/sched.h>
-#include <linux/types.h>
-#include <linux/interrupt.h>
-#include <linux/ioport.h>
-#include <linux/timex.h>
-#include <linux/slab.h>
-#include <linux/random.h>
-#include <linux/delay.h>
-#include <linux/bitops.h>
-
-#include <asm/bootinfo.h>
-#include <asm/io.h>
-#include <asm/mipsregs.h>
-#include <asm/system.h>
-#include <asm/au1000.h>
-
-au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
-
-       { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0},
-       { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 },
-       { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 },
-       { AU1500_GPIO_203, INTC_INT_LOW_LEVEL, 0 },
-       { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 },
-       { AU1500_GPIO_207, INTC_INT_LOW_LEVEL, 0 },
-};
-
-int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);
diff --git a/arch/mips/au1000/hydrogen3/Makefile b/arch/mips/au1000/hydrogen3/Makefile
deleted file mode 100644 (file)
index 974f792..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-#  Copyright 2000 MontaVista Software Inc.
-#  Author: MontaVista Software, Inc.
-#      ppopov@mvista.com or source@mvista.com
-#
-# Makefile for the Alchemy Semiconductor PB1000 board.
-#
-
-obj-y := init.o board_setup.o irqmap.o
diff --git a/arch/mips/au1000/hydrogen3/board_setup.c b/arch/mips/au1000/hydrogen3/board_setup.c
deleted file mode 100644 (file)
index d081640..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *
- * BRIEF MODULE DESCRIPTION
- *     Alchemy Db1x00 board setup.
- *
- * Copyright 2000 MontaVista Software Inc.
- * Author: MontaVista Software, Inc.
- *             ppopov@mvista.com or source@mvista.com
- *
- *  This program is free software; you can redistribute  it and/or modify it
- *  under  the terms of  the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the  License, or (at your
- *  option) any later version.
- *
- *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
- *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the  GNU General Public License along
- *  with this program; if not, write  to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#include <linux/init.h>
-#include <linux/sched.h>
-#include <linux/ioport.h>
-#include <linux/mm.h>
-#include <linux/console.h>
-#include <linux/mc146818rtc.h>
-#include <linux/delay.h>
-
-#include <asm/cpu.h>
-#include <asm/bootinfo.h>
-#include <asm/irq.h>
-#include <asm/keyboard.h>
-#include <asm/mipsregs.h>
-#include <asm/reboot.h>
-#include <asm/pgtable.h>
-#include <asm/au1000.h>
-
-void board_reset (void)
-{
-}
-
-void __init board_setup(void)
-{
-       u32 pin_func;
-
-#ifdef CONFIG_AU1X00_USB_DEVICE
-       // 2nd USB port is USB device
-       pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
-       au_writel(pin_func, SYS_PINFUNC);
-#endif
-
-#if defined(CONFIG_IRDA) && (defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100))
-       /* set IRFIRSEL instead of GPIO15 */
-       pin_func = au_readl(SYS_PINFUNC) | (u32)((1<<8));
-       au_writel(pin_func, SYS_PINFUNC);
-       au_sync();
-#endif
-
-    printk("AMD Alchemy Hydrogen3 Board\n");
-}
diff --git a/arch/mips/au1000/hydrogen3/init.c b/arch/mips/au1000/hydrogen3/init.c
deleted file mode 100644 (file)
index 8f02bb8..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *
- * BRIEF MODULE DESCRIPTION
- *     PB1000 board setup
- *
- * Copyright 2001 MontaVista Software Inc.
- * Author: MontaVista Software, Inc.
- *             ppopov@mvista.com or source@mvista.com
- *
- *  This program is free software; you can redistribute  it and/or modify it
- *  under  the terms of  the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the  License, or (at your
- *  option) any later version.
- *
- *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
- *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the  GNU General Public License along
- *  with this program; if not, write  to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <linux/init.h>
-#include <linux/mm.h>
-#include <linux/sched.h>
-#include <linux/bootmem.h>
-#include <asm/addrspace.h>
-#include <asm/bootinfo.h>
-#include <linux/string.h>
-#include <linux/kernel.h>
-
-int prom_argc;
-char **prom_argv, **prom_envp;
-extern void  __init prom_init_cmdline(void);
-extern char *prom_getenv(char *envname);
-
-const char *get_system_type(void)
-{
-#ifdef CONFIG_MIPS_BOSPORUS
-       return "Alchemy Bosporus Gateway Reference";
-#else
-       return "Alchemy Db1x00";
-#endif
-}
-
-int __init prom_init(int argc, char **argv, char **envp, int *prom_vec)
-{
-       unsigned char *memsize_str;
-       unsigned long memsize;
-
-       prom_argc = argc;
-       prom_argv = argv;
-       prom_envp = envp;
-
-       mips_machgroup = MACH_GROUP_ALCHEMY;
-       mips_machtype = MACH_DB1000;    /* set the platform # */
-       prom_init_cmdline();
-
-       memsize_str = prom_getenv("memsize");
-       if (!memsize_str) {
-               memsize = 0x04000000;
-       } else {
-               memsize = simple_strtol(memsize_str, NULL, 0);
-       }
-       add_memory_region(0, memsize, BOOT_MEM_RAM);
-       return 0;
-}
diff --git a/arch/mips/au1000/hydrogen3/irqmap.c b/arch/mips/au1000/hydrogen3/irqmap.c
deleted file mode 100644 (file)
index 14e1ed3..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * BRIEF MODULE DESCRIPTION
- *     Au1xxx irq map table
- *
- * Copyright 2003 Embedded Edge, LLC
- *             dan@embeddededge.com
- *
- *  This program is free software; you can redistribute         it and/or modify it
- *  under  the terms of         the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the License, or (at your
- *  option) any later version.
- *
- *  THIS  SOFTWARE  IS PROVIDED          ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
- *  WARRANTIES,          INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED          TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA, OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN         CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the  GNU General Public License along
- *  with this program; if not, write  to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#include <linux/errno.h>
-#include <linux/init.h>
-#include <linux/irq.h>
-#include <linux/kernel_stat.h>
-#include <linux/module.h>
-#include <linux/signal.h>
-#include <linux/sched.h>
-#include <linux/types.h>
-#include <linux/interrupt.h>
-#include <linux/ioport.h>
-#include <linux/timex.h>
-#include <linux/slab.h>
-#include <linux/random.h>
-#include <linux/delay.h>
-#include <linux/bitops.h>
-
-#include <asm/bootinfo.h>
-#include <asm/io.h>
-#include <asm/mipsregs.h>
-#include <asm/system.h>
-#include <asm/au1000.h>
-
-au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
-
-       /* { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, */
-       { AU1000_GPIO_21, INTC_INT_LOW_LEVEL, 0 },
-};
-
-int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);
index 2d49f32f46223a51196acd61c41fe2c60ef07a4f..f66779f0d4cdd6fb7e5b09083311d7a9481522c5 100644 (file)
@@ -148,7 +148,7 @@ static void pb1200_end_irq(unsigned int irq_nr)
        }
 }
 
-static struct hw_interrupt_type external_irq_type =
+static struct irq_chip external_irq_type =
 {
 #ifdef CONFIG_MIPS_PB1200
        "Pb1200 Ext",
index 83f6bddf578b28268986601c868f9076925d2605..c04505afa47f1894dc84481f9d440a038f8913e8 100644 (file)
@@ -17,7 +17,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
index 34ec76716fa0d820ff260f991ce582d8b0e07510..bbb4ea43da88e37bf8fff9ded7397209a0996f29 100644 (file)
@@ -17,7 +17,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
index b288151b532e7ea3fba8a2affa5f654a60701017..10bbb8cfb964453c4caa5efb64ab90c1088b402b 100644 (file)
@@ -17,7 +17,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/compiler.h>
 #include <linux/init.h>
 #include <linux/module.h>
index c62be0341fb8acedc3a6dd1dc6c55ae33d74771f..9ee67a95f6b96b57f17e34891c0c61366d48b18a 100644 (file)
@@ -19,7 +19,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/proc_fs.h>
 #include <linux/stat.h>
 #include <asm/page.h>
index 84724b270753a0f4c40a8b9f26df46052462f9c4..6ecd512b999dee1061b2f1914b5059416041591b 100644 (file)
@@ -18,7 +18,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
index 3d7670edd5cd50d996ec469875fa4dec429ab2bc..a1ce4580058dfc936cb137f82dabbce7b7cd7021 100644 (file)
@@ -19,7 +19,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -79,7 +78,7 @@ static void excite_timer_init(void)
        mips_hpt_frequency = EXCITE_CPU_EXT_CLOCK * mult / div / 2;
 }
 
-static void excite_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        /* The eXcite platform uses the alternate timer interrupt */
        set_c0_intcontrol(0x80);
@@ -263,7 +262,6 @@ void __init plat_mem_setup(void)
 
        /* Set up timer initialization hooks */
        board_time_init = excite_timer_init;
-       board_timer_setup = excite_timer_setup;
 
        /* Set up the peripheral address map */
        *(boot_ocd_base + (LKB9 / sizeof (u32))) = 0;
index c99714587ce8788031ee6f77db00a22347f89bf7..c01a0170e5903e51851d9743566ea3645988bf7f 100644 (file)
@@ -49,7 +49,7 @@ const char *get_system_type(void)
        return "MIPS Cobalt";
 }
 
-static void __init cobalt_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        /* Load timer value for 1KHz (TCLK is 50MHz) */
        GALILEO_OUTL(50*1000*1000 / 1000, GT_TC0_OFS);
@@ -129,8 +129,6 @@ void __init plat_mem_setup(void)
        _machine_halt = cobalt_machine_halt;
        pm_power_off = cobalt_machine_power_off;
 
-       board_timer_setup = cobalt_timer_setup;
-
         set_io_port_base(CKSEG1ADDR(GT64111_IO_BASE));
 
        /* I/O port resource must include UART and LCD/buttons */
index 0cc1b3c5195978f5cd395f0d33448663712a780e..54274065e9a537e66e5d8dbe47bfc922cbfe5180 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:50:55 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 09:59:39 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 CONFIG_MIPS_ATLAS=y
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_ATLAS=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_MIPS_BONITO64=y
@@ -125,7 +129,11 @@ CONFIG_PAGE_SIZE_4KB=y
 CONFIG_BOARD_SCACHE=y
 CONFIG_RM7000_CPU_SCACHE=y
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
+CONFIG_SYS_SUPPORTS_MULTITHREADING=y
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -141,6 +149,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 CONFIG_HZ_100=y
 # CONFIG_HZ_128 is not set
@@ -153,6 +162,7 @@ CONFIG_HZ=100
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -184,10 +194,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -289,6 +301,8 @@ CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
 CONFIG_INET_XFRM_TUNNEL=m
 CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -336,7 +350,10 @@ CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
 CONFIG_INET6_XFRM_TUNNEL=m
 CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
 CONFIG_IPV6_TUNNEL=m
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 CONFIG_BRIDGE_NETFILTER=y
@@ -353,6 +370,8 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
+CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
@@ -368,9 +387,11 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -380,6 +401,7 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_IP_NF_CONNTRACK=m
 CONFIG_IP_NF_CT_ACCT=y
 CONFIG_IP_NF_CONNTRACK_MARK=y
+CONFIG_IP_NF_CONNTRACK_SECMARK=y
 CONFIG_IP_NF_CONNTRACK_EVENTS=y
 CONFIG_IP_NF_CONNTRACK_NETLINK=m
 CONFIG_IP_NF_CT_PROTO_SCTP=m
@@ -390,6 +412,7 @@ CONFIG_IP_NF_TFTP=m
 CONFIG_IP_NF_AMANDA=m
 CONFIG_IP_NF_PPTP=m
 CONFIG_IP_NF_H323=m
+CONFIG_IP_NF_SIP=m
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
@@ -420,6 +443,7 @@ CONFIG_IP_NF_NAT_TFTP=m
 CONFIG_IP_NF_NAT_AMANDA=m
 CONFIG_IP_NF_NAT_PPTP=m
 CONFIG_IP_NF_NAT_H323=m
+CONFIG_IP_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
@@ -581,6 +605,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -699,6 +724,7 @@ CONFIG_ISCSI_TCP=m
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_IPS is not set
@@ -727,9 +753,8 @@ CONFIG_MD_LINEAR=m
 CONFIG_MD_RAID0=m
 CONFIG_MD_RAID1=m
 CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
+CONFIG_MD_RAID456=m
 CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_RAID6=m
 CONFIG_MD_MULTIPATH=m
 CONFIG_MD_FAULTY=m
 CONFIG_BLK_DEV_DM=m
@@ -785,6 +810,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -847,6 +874,7 @@ CONFIG_LAN_SAA9730=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -928,6 +956,7 @@ CONFIG_SERIO_RAW=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -959,6 +988,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -1007,6 +1037,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -1016,6 +1047,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -1078,6 +1110,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -1104,7 +1149,6 @@ CONFIG_JFS_SECURITY=y
 # CONFIG_JFS_STATISTICS is not set
 CONFIG_FS_POSIX_ACL=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
 CONFIG_XFS_QUOTA=y
 CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
@@ -1113,6 +1157,7 @@ CONFIG_XFS_POSIX_ACL=y
 CONFIG_MINIX_FS=m
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 CONFIG_QUOTA=y
 # CONFIG_QFMT_V1 is not set
 CONFIG_QFMT_V2=y
@@ -1170,6 +1215,8 @@ CONFIG_VXFS_FS=m
 # CONFIG_QNX4FS_FS is not set
 CONFIG_SYSV_FS=m
 CONFIG_UFS_FS=m
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_UFS_DEBUG is not set
 
 #
 # Network File Systems
@@ -1194,6 +1241,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1259,6 +1307,7 @@ CONFIG_NLS_UTF8=m
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1317,3 +1366,10 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
+CONFIG_RIO=n
+CONFIG_I2C_OCORES=n
+CONFIG_DEBUG_RT_MUTEXES=n
+CONFIG_RT_MUTEX_TESTER=n
+CONFIG_DEBUG_RWSEMS=n
+CONFIG_DEBUG_LOCKING_API_SELFTESTS=n
index dabf90a94b2103a93e09b6fc56779d5c2cfd485d..887fd959482a953d9be9ecdcc016430212010e0b 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:50:55 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:02:58 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -81,6 +84,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_COHERENT=y
 CONFIG_CPU_BIG_ENDIAN=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
@@ -128,11 +132,15 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_SIBYTE_DMA_PAGEOPS is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_IRQ_PER_CPU=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
@@ -143,6 +151,10 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
+CONFIG_SMP=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_NR_CPUS=4
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -152,12 +164,11 @@ CONFIG_HZ_1000=y
 # CONFIG_HZ_1024 is not set
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_HZ=1000
-CONFIG_SMP=y
-CONFIG_NR_CPUS=4
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_PREEMPT_BKL is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -192,10 +203,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -253,7 +266,7 @@ CONFIG_MMU=y
 #
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
-CONFIG_BUILD_ELF64=y
+# CONFIG_BUILD_ELF64 is not set
 CONFIG_MIPS32_COMPAT=y
 CONFIG_COMPAT=y
 CONFIG_MIPS32_O32=y
@@ -292,6 +305,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -299,6 +314,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -353,6 +369,7 @@ CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -505,6 +522,7 @@ CONFIG_NET_SB1250_MAC=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -572,6 +590,7 @@ CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_N_HDLC is not set
 # CONFIG_SPECIALIX is not set
 # CONFIG_SX is not set
+# CONFIG_RIO is not set
 # CONFIG_STALDRV is not set
 CONFIG_SIBYTE_SB1250_DUART=y
 CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y
@@ -598,6 +617,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 CONFIG_GEN_RTC=y
 # CONFIG_GEN_RTC_X is not set
@@ -643,6 +663,7 @@ CONFIG_I2C_ALGO_SIBYTE=y
 # CONFIG_I2C_I810 is not set
 # CONFIG_I2C_PIIX4 is not set
 # CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_OCORES is not set
 # CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_PROSAVAGE is not set
 # CONFIG_I2C_SAVAGE4 is not set
@@ -680,7 +701,6 @@ CONFIG_I2C_DEBUG_CHIP=y
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -696,6 +716,7 @@ CONFIG_I2C_DEBUG_CHIP=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -705,6 +726,7 @@ CONFIG_I2C_DEBUG_CHIP=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -761,6 +783,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -779,6 +814,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -844,6 +880,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -870,14 +907,19 @@ CONFIG_MSDOS_PARTITION=y
 #
 CONFIG_PRINTK_TIME=y
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=16
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_FS is not set
@@ -940,3 +982,4 @@ CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index aeb7be804799f06c04b14f2c5bb344faee8d3caa..a01344f3a4c2c610f1533ae202ec110dfb2a31a7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Tue Apr 25 00:08:06 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:03:24 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 CONFIG_MACH_VR41XX=y
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -73,6 +76,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -117,7 +121,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -130,6 +137,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -142,6 +150,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -173,10 +182,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -268,6 +279,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -275,6 +288,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -328,6 +342,7 @@ CONFIG_TCP_CONG_BIC=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -446,6 +461,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -512,6 +529,7 @@ CONFIG_8139TOO_PIO=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -581,6 +599,7 @@ CONFIG_INPUT=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -609,6 +628,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -658,6 +678,7 @@ CONFIG_GPIO_VR41XX=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -667,6 +688,7 @@ CONFIG_GPIO_VR41XX=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -738,13 +760,30 @@ CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
 CONFIG_RTC_INTF_SYSFS=y
 CONFIG_RTC_INTF_PROC=y
 CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
 
 #
 # RTC drivers
 #
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
 CONFIG_RTC_DRV_VR41XX=y
 # CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
@@ -761,6 +800,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -827,6 +867,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -853,6 +894,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -881,3 +923,4 @@ CONFIG_CMDLINE="mem=32M console=ttyVR0,38400"
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
index d680d3e17112f38909ab4a80375adffa30bb1bc5..c95682445a2802d7a1366ae9c4107683c341758f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:50:57 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:03:25 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 CONFIG_MIPS_COBALT=y
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_COBALT=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_COBALT=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -66,6 +69,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_I8259=y
@@ -113,7 +117,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -127,6 +134,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -139,6 +147,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -170,10 +179,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -256,6 +267,8 @@ CONFIG_IP_FIB_HASH=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -263,6 +276,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -322,6 +336,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -471,6 +486,8 @@ CONFIG_DAVICOM_PHY=y
 CONFIG_QSEMI_PHY=y
 CONFIG_LXT_PHY=y
 CONFIG_CICADA_PHY=y
+CONFIG_VITESSE_PHY=y
+CONFIG_SMSC_PHY=y
 
 #
 # Ethernet (10 or 100Mbit)
@@ -522,6 +539,7 @@ CONFIG_TULIP=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -599,6 +617,7 @@ CONFIG_SERIO_RAW=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -630,6 +649,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 CONFIG_RTC=y
 CONFIG_COBALT_LCD=y
 # CONFIG_DTLK is not set
@@ -678,6 +698,7 @@ CONFIG_COBALT_LCD=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -687,6 +708,7 @@ CONFIG_COBALT_LCD=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -749,6 +771,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -767,6 +802,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -829,6 +865,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -855,6 +892,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -896,7 +934,6 @@ CONFIG_CRYPTO_ANUBIS=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
 CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
 
 #
 # Hardware crypto devices
@@ -911,3 +948,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index 6a7aa401462fd3bc824d595625d793737c5e8bb4..c2f33d3af62c06a5d1c7d0caf92a0a5bfe7d209a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:50:57 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:03:33 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS_DB1000=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_DB1000=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_DB1000=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -112,7 +116,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_64BIT_PHYS_ADDR=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -128,6 +135,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -140,6 +148,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -171,14 +180,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -276,6 +286,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -288,6 +300,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -302,6 +315,7 @@ CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -312,8 +326,10 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -383,6 +399,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -532,7 +549,7 @@ CONFIG_NETDEVICES=y
 #
 # PHY device support
 #
-CONFIG_PHYLIB=m
+CONFIG_PHYLIB=y
 
 #
 # MII PHY device drivers
@@ -542,6 +559,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -653,6 +672,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 # CONFIG_AU1X00_GPIO is not set
 # CONFIG_TS_AU1X00_ADS7846 is not set
@@ -686,6 +706,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -739,6 +760,7 @@ CONFIG_SYNCLINK_CS=m
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -748,6 +770,7 @@ CONFIG_SYNCLINK_CS=m
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -809,6 +832,19 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -837,6 +873,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=m
@@ -906,6 +943,7 @@ CONFIG_SUNRPC=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -971,6 +1009,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1030,3 +1069,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index 5c2da563e528cbd2559d6f5d7575e4cd76302afd..8c44d16ae9a2b8f641ded987ab6bda67c6dba2ce 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:50:58 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:03:34 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS_DB1100=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_DB1100=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_DB1100=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -112,7 +116,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_64BIT_PHYS_ADDR=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -128,6 +135,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -140,6 +148,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -171,14 +180,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -265,6 +275,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -277,6 +289,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -291,6 +304,7 @@ CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -301,8 +315,10 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -372,6 +388,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -521,7 +538,7 @@ CONFIG_NETDEVICES=y
 #
 # PHY device support
 #
-CONFIG_PHYLIB=m
+CONFIG_PHYLIB=y
 
 #
 # MII PHY device drivers
@@ -531,6 +548,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -629,6 +648,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 # CONFIG_AU1X00_GPIO is not set
 # CONFIG_TS_AU1X00_ADS7846 is not set
@@ -661,6 +681,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -707,6 +728,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -716,12 +738,13 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_MACMODES is not set
-CONFIG_FB_FIRMWARE_EDID=y
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
 # CONFIG_FB_S1D13XXX is not set
@@ -809,6 +832,19 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -837,6 +873,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=m
@@ -906,6 +943,7 @@ CONFIG_SUNRPC=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -971,6 +1009,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1030,3 +1069,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index 85ef90ce0944d0d0a4d027b7641f000bb2a48f2b..c13768e75ac5742c2ce556dd6ff00237b9d4b977 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:50:58 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:03:43 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 CONFIG_MIPS_DB1200=y
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_DB1200=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_DB1200=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_COHERENT=y
 CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -112,7 +116,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_64BIT_PHYS_ADDR=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -128,6 +135,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -140,6 +148,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -172,14 +181,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -272,6 +282,8 @@ CONFIG_IP_FIB_HASH=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -284,6 +296,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -296,6 +309,7 @@ CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -306,8 +320,10 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -371,6 +387,7 @@ CONFIG_NET_CLS_ROUTE=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -451,6 +468,7 @@ CONFIG_MTD_ALCHEMY=y
 #
 CONFIG_MTD_NAND=y
 # CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
 CONFIG_MTD_NAND_IDS=y
 # CONFIG_MTD_NAND_AU1550 is not set
 # CONFIG_MTD_NAND_DISKONCHIP is not set
@@ -691,6 +709,7 @@ CONFIG_SERIO_RAW=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 # CONFIG_AU1X00_GPIO is not set
 # CONFIG_TS_AU1X00_ADS7846 is not set
@@ -724,6 +743,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -761,7 +781,6 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -777,6 +796,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -786,12 +806,13 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_MACMODES is not set
-CONFIG_FB_FIRMWARE_EDID=y
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
 # CONFIG_FB_S1D13XXX is not set
@@ -880,6 +901,19 @@ CONFIG_MMC_AU1X=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -907,6 +941,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -959,6 +994,7 @@ CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
 CONFIG_JFFS2_FS_WRITEBUFFER=y
 # CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -988,6 +1024,7 @@ CONFIG_SUNRPC=y
 CONFIG_SMB_FS=y
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1053,6 +1090,7 @@ CONFIG_NLS_UTF8=m
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1088,3 +1126,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index 6f757d8a5a6c75b3263afc298994d9c3082dc40d..8aea73fae7fb3b2220268cc06f1a59a409ad1bf4 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:50:59 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:03:56 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS_DB1500=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_DB1500=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_DB1500=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y
@@ -114,7 +118,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_64BIT_PHYS_ADDR=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -130,6 +137,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -142,6 +150,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -173,14 +182,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -283,6 +293,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -295,6 +307,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -309,6 +322,7 @@ CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -319,8 +333,10 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -390,6 +406,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -576,7 +593,7 @@ CONFIG_NETDEVICES=y
 #
 # PHY device support
 #
-CONFIG_PHYLIB=m
+CONFIG_PHYLIB=y
 
 #
 # MII PHY device drivers
@@ -586,6 +603,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -630,6 +649,7 @@ CONFIG_MIPS_AU1X00_ENET=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -753,6 +773,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -808,6 +829,7 @@ CONFIG_SYNCLINK_CS=m
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -818,6 +840,7 @@ CONFIG_SYNCLINK_CS=m
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -873,6 +896,18 @@ CONFIG_SND_MTPAV=m
 # CONFIG_SND_CMIPCI is not set
 # CONFIG_SND_CS4281 is not set
 # CONFIG_SND_CS46XX is not set
+# CONFIG_SND_DARLA20 is not set
+# CONFIG_SND_GINA20 is not set
+# CONFIG_SND_LAYLA20 is not set
+# CONFIG_SND_DARLA24 is not set
+# CONFIG_SND_GINA24 is not set
+# CONFIG_SND_LAYLA24 is not set
+# CONFIG_SND_MONA is not set
+# CONFIG_SND_MIA is not set
+# CONFIG_SND_ECHO3G is not set
+# CONFIG_SND_INDIGO is not set
+# CONFIG_SND_INDIGOIO is not set
+# CONFIG_SND_INDIGODJ is not set
 # CONFIG_SND_EMU10K1 is not set
 # CONFIG_SND_EMU10K1X is not set
 # CONFIG_SND_ENS1370 is not set
@@ -916,6 +951,8 @@ CONFIG_SND_AU1X00=m
 #
 # PCMCIA devices
 #
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
 
 #
 # Open Sound System
@@ -1030,10 +1067,12 @@ CONFIG_USB_MON=y
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
+# CONFIG_USB_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
 # CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_APPLEDISPLAY is not set
 CONFIG_USB_LD=m
 
 #
@@ -1077,6 +1116,19 @@ CONFIG_USB_LD=m
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -1105,6 +1157,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=m
@@ -1174,6 +1227,7 @@ CONFIG_SUNRPC=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1239,6 +1293,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1298,3 +1353,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index da4c7e811bef5a644ea1557fcd8559908664c48b..90ccb7359630fa7ebdac11d302555723a2f942e1 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:00 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:03:59 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 CONFIG_MIPS_DB1550=y
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_DB1550=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_DB1550=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y
@@ -113,7 +117,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_64BIT_PHYS_ADDR=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -129,6 +136,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -141,6 +149,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -172,14 +181,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -282,6 +292,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -294,6 +306,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -308,6 +321,7 @@ CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -318,8 +332,10 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -389,6 +405,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -470,6 +487,7 @@ CONFIG_MTD_ALCHEMY=y
 #
 CONFIG_MTD_NAND=m
 # CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
 CONFIG_MTD_NAND_IDS=m
 CONFIG_MTD_NAND_AU1550=m
 # CONFIG_MTD_NAND_DISKONCHIP is not set
@@ -608,7 +626,7 @@ CONFIG_NETDEVICES=y
 #
 # PHY device support
 #
-CONFIG_PHYLIB=m
+CONFIG_PHYLIB=y
 
 #
 # MII PHY device drivers
@@ -618,6 +636,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -662,6 +682,7 @@ CONFIG_MIPS_AU1X00_ENET=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -793,6 +814,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -848,6 +870,7 @@ CONFIG_SYNCLINK_CS=m
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -857,6 +880,7 @@ CONFIG_SYNCLINK_CS=m
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -913,6 +937,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -941,6 +978,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=m
@@ -1010,6 +1048,7 @@ CONFIG_SUNRPC=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1075,6 +1114,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1134,3 +1174,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index c1c6bfee970ea9f280a793c65a508377c5a2e86c..b598cf08f15637dfcd3762e73368efb09e4d3c3c 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:01 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:00 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_DDB5477=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -66,6 +69,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_I8259=y
@@ -113,7 +117,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -127,6 +134,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -139,6 +147,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -170,10 +179,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -259,6 +270,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -266,6 +279,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -325,6 +339,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -422,6 +437,8 @@ CONFIG_DAVICOM_PHY=y
 CONFIG_QSEMI_PHY=y
 CONFIG_LXT_PHY=y
 CONFIG_CICADA_PHY=y
+CONFIG_VITESSE_PHY=y
+CONFIG_SMSC_PHY=y
 
 #
 # Ethernet (10 or 100Mbit)
@@ -484,6 +501,7 @@ CONFIG_PCNET32=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -561,6 +579,7 @@ CONFIG_SERIO_RAW=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -592,6 +611,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -640,6 +660,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -649,6 +670,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -711,6 +733,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -726,6 +761,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
@@ -792,6 +828,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -818,6 +855,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -859,7 +897,6 @@ CONFIG_CRYPTO_ANUBIS=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
 CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
 
 #
 # Hardware crypto devices
@@ -874,3 +911,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index d5d0d3faae94adadedae912508d067a0cfc7e17d..597150b140771b8cd34103c65d9a5de3db344c66 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:01 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:01 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 CONFIG_MACH_DECSTATION=y
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MACH_DECSTATION=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MACH_DECSTATION=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -66,6 +69,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -112,7 +116,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_WB=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -126,6 +133,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_128=y
@@ -140,6 +148,7 @@ CONFIG_HZ=128
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -172,10 +181,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -244,6 +255,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
@@ -262,6 +275,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -269,6 +284,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -329,6 +345,7 @@ CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -448,6 +465,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -537,6 +556,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 CONFIG_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -582,6 +602,7 @@ CONFIG_RTC=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -591,12 +612,13 @@ CONFIG_RTC=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_MACMODES is not set
-CONFIG_FB_FIRMWARE_EDID=y
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
 # CONFIG_FB_S1D13XXX is not set
@@ -668,6 +690,19 @@ CONFIG_LOGO_DEC_CLUT224=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -686,6 +721,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -732,6 +768,8 @@ CONFIG_RAMFS=y
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_SYSV_FS is not set
 CONFIG_UFS_FS=y
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_UFS_DEBUG is not set
 
 #
 # Network File Systems
@@ -751,6 +789,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -792,14 +831,19 @@ CONFIG_ULTRIX_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_FS is not set
@@ -862,3 +906,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
index 439677ba751cdc1ab991da96385cd93e62783944..fa2996bb4b7c8162a319f323b984a112fead3548 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Tue Apr 25 00:08:20 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:02 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 CONFIG_MACH_VR41XX=y
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -71,6 +74,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -115,7 +119,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -128,6 +135,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -140,6 +148,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -169,10 +178,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -244,6 +255,7 @@ CONFIG_TRAD_SIGNALS=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -378,6 +390,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -418,6 +431,7 @@ CONFIG_WATCHDOG=y
 # CONFIG_PCWATCHDOG is not set
 # CONFIG_MIXCOMWD is not set
 # CONFIG_WDT is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -449,7 +463,6 @@ CONFIG_GPIO_VR41XX=y
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -465,6 +478,7 @@ CONFIG_GPIO_VR41XX=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -473,6 +487,7 @@ CONFIG_GPIO_VR41XX=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -534,6 +549,19 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -548,6 +576,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -616,6 +645,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -644,3 +674,4 @@ CONFIG_CMDLINE="console=ttyVR0,19200 mem=8M"
 # CONFIG_CRC16 is not set
 # CONFIG_CRC32 is not set
 # CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
index 01f29f44f3e85cb56d4093439ca57a98888d91a5..375b2ac24a492c3732b72053eec97f554ca77b34 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17
-# Sun Jun 18 13:46:53 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:05 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -133,6 +134,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -146,6 +148,7 @@ CONFIG_HZ=1000
 # CONFIG_PREEMPT_VOLUNTARY is not set
 CONFIG_PREEMPT=y
 CONFIG_PREEMPT_BKL=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -180,14 +183,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -283,6 +287,8 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -300,7 +306,10 @@ CONFIG_IPV6=m
 # CONFIG_INET6_IPCOMP is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
 # CONFIG_IPV6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -378,6 +387,7 @@ CONFIG_SCTP_HMAC_MD5=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -545,6 +555,7 @@ CONFIG_CHR_DEV_SG=m
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_IPS is not set
@@ -663,6 +674,7 @@ CONFIG_NATSEMI=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -770,6 +782,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 CONFIG_RTC=m
 CONFIG_GEN_RTC=m
 CONFIG_GEN_RTC_X=y
@@ -814,6 +827,7 @@ CONFIG_I2C_CHARDEV=y
 # CONFIG_I2C_I810 is not set
 # CONFIG_I2C_PIIX4 is not set
 # CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_OCORES is not set
 # CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_PROSAVAGE is not set
 # CONFIG_I2C_SAVAGE4 is not set
@@ -850,13 +864,13 @@ CONFIG_I2C_DEBUG_BUS=y
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
 #
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
 # CONFIG_SENSORS_ADM1026 is not set
@@ -885,10 +899,12 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
 # CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_VT8231 is not set
 # CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
 # CONFIG_SENSORS_W83792D is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83627HF is not set
@@ -913,6 +929,7 @@ CONFIG_VIDEO_V4L2=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -969,6 +986,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -988,7 +1018,6 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_SECURITY is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -997,6 +1026,7 @@ CONFIG_XFS_EXPORT=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 # CONFIG_DNOTIFY is not set
 # CONFIG_AUTOFS_FS is not set
@@ -1047,6 +1077,7 @@ CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
 CONFIG_JFFS2_FS_WRITEBUFFER=y
 # CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 CONFIG_JFFS2_COMPRESSION_OPTIONS=y
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -1086,6 +1117,7 @@ CONFIG_RPCSEC_GSS_KRB5=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1151,6 +1183,7 @@ CONFIG_NLS_UTF8=m
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1205,3 +1238,4 @@ CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index 5248a1d8131d45cf28313e5cb7b49a893124c7a4..b0afc118bd5c2498dc41f30a8b78d62278640b39 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:02 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:05 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 CONFIG_MIPS_EV64120=y
@@ -32,6 +33,7 @@ CONFIG_MIPS_EV64120=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_EV64120=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -66,6 +69,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_CPU_BIG_ENDIAN=y
@@ -114,7 +118,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -129,6 +136,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -141,6 +149,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -172,10 +181,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -265,6 +276,8 @@ CONFIG_IP_PNP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -272,6 +285,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -331,6 +345,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -427,6 +442,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -469,6 +486,7 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -554,6 +572,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -585,6 +604,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -633,6 +653,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -642,6 +663,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -704,6 +726,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -719,6 +754,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -782,6 +818,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -808,6 +845,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -863,3 +901,4 @@ CONFIG_CRC32=m
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
index 4858491ce669e704426f8d9578cd233dccdd9d3b..0bdc10f1161081f3311fec6deec98f274a5cec4f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:03 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:05 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_EV96100=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_EV96100=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_CPU_BIG_ENDIAN=y
@@ -117,7 +121,10 @@ CONFIG_PAGE_SIZE_4KB=y
 CONFIG_BOARD_SCACHE=y
 CONFIG_RM7000_CPU_SCACHE=y
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -133,6 +140,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -145,6 +153,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -176,10 +185,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -268,6 +279,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -275,6 +288,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -334,6 +348,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -418,6 +433,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -507,6 +524,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -536,6 +554,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -582,6 +601,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -591,6 +611,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -651,6 +672,19 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -666,6 +700,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -729,6 +764,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -755,6 +791,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -810,3 +847,4 @@ CONFIG_CRC32=m
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
index f2ce64cb41a8deea854fae5af593b688a42d2657..045ebd0898935e02abfc002622b29226ef0579d6 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16-rc4
-# Thu Feb 23 13:15:27 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:09 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,8 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+CONFIG_BASLER_EXCITE=y
+# CONFIG_BASLER_EXCITE_PROTOTYPE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +34,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -41,14 +44,11 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_XXS1500 is not set
 # CONFIG_PNX8550_V2PCI is not set
 # CONFIG_PNX8550_JBS is not set
-CONFIG_BASLER_EXCITE=y
-# CONFIG_BASLER_EXCITE_PROTOTYPE is not set
-# CONFIG_DDB5074 is not set
-# CONFIG_DDB5476 is not set
 # CONFIG_DDB5477 is not set
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -66,9 +66,11 @@ CONFIG_BASLER_EXCITE=y
 # CONFIG_TOSHIBA_RBTX4927 is not set
 # CONFIG_TOSHIBA_RBTX4938 is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_COHERENT=y
-CONFIG_SERIAL_RM9000=y
 CONFIG_CPU_BIG_ENDIAN=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
 CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
@@ -115,9 +117,11 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
-# CONFIG_CPU_ADVANCED is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -132,6 +136,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -141,11 +146,11 @@ CONFIG_HZ_1000=y
 # CONFIG_HZ_1024 is not set
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_HZ=1000
-# CONFIG_SMP is not set
 # CONFIG_PREEMPT_NONE is not set
 # CONFIG_PREEMPT_VOLUNTARY is not set
 CONFIG_PREEMPT=y
 CONFIG_PREEMPT_BKL=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -167,6 +172,7 @@ CONFIG_POSIX_MQUEUE=y
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+# CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_EMBEDDED=y
@@ -177,14 +183,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -195,7 +199,6 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
@@ -204,6 +207,8 @@ CONFIG_KMOD=y
 # Block layer
 #
 # CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
 
 #
 # IO Schedulers
@@ -223,7 +228,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
-# CONFIG_PCI_LEGACY_PROC is not set
 CONFIG_MMU=y
 
 #
@@ -255,6 +259,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
@@ -271,12 +277,18 @@ CONFIG_IP_PNP_DHCP=y
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -330,6 +342,7 @@ CONFIG_TCP_CONG_BIC=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -389,7 +402,6 @@ CONFIG_MTD_CFI_I2=y
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
 # CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_BLKMTD is not set
 # CONFIG_MTD_BLOCK2MTD is not set
 
 #
@@ -404,11 +416,9 @@ CONFIG_MTD_CFI_I2=y
 #
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
 CONFIG_MTD_NAND_IDS=y
 # CONFIG_MTD_NAND_DISKONCHIP is not set
-CONFIG_MTD_NAND_BASLER_EXCITE=y
-# CONFIG_MTD_NAND_BASLER_EXCITE_RDNBY is not set
-# CONFIG_MTD_NAND_BASLER_EXCITE_PERF is not set
 # CONFIG_MTD_NAND_NANDSIM is not set
 
 #
@@ -439,7 +449,7 @@ CONFIG_BLK_DEV_LOOP=m
 # CONFIG_BLK_DEV_SX8 is not set
 # CONFIG_BLK_DEV_UB is not set
 # CONFIG_BLK_DEV_RAM is not set
-CONFIG_BLK_DEV_RAM_COUNT=16
+# CONFIG_BLK_DEV_INITRD is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
@@ -496,6 +506,7 @@ CONFIG_BLK_DEV_SD=y
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_IPS is not set
@@ -503,7 +514,6 @@ CONFIG_BLK_DEV_SD=y
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
 # CONFIG_SCSI_QLA_FC is not set
 # CONFIG_SCSI_LPFC is not set
@@ -574,8 +584,6 @@ CONFIG_NETDEVICES=y
 # CONFIG_SK98LIN is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
-# CONFIG_TITAN_GE is not set
-CONFIG_RM9K_GE=m
 
 #
 # Ethernet (10000 Mbit)
@@ -583,6 +591,7 @@ CONFIG_RM9K_GE=m
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -656,6 +665,7 @@ CONFIG_INPUT_EVDEV=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -663,6 +673,7 @@ CONFIG_HW_CONSOLE=y
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
 CONFIG_SERIAL_8250_NR_UARTS=2
 CONFIG_SERIAL_8250_RUNTIME_UARTS=2
 CONFIG_SERIAL_8250_EXTENDED=y
@@ -695,7 +706,6 @@ CONFIG_WATCHDOG=y
 # Watchdog Device Drivers
 #
 # CONFIG_SOFT_WATCHDOG is not set
-CONFIG_WDT_RM9K_GPI=m
 
 #
 # PCI-based Watchdog Cards
@@ -707,6 +717,7 @@ CONFIG_WDT_RM9K_GPI=m
 # USB-based Watchdog Cards
 #
 # CONFIG_USBPCWATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -739,7 +750,6 @@ CONFIG_WDT_RM9K_GPI=m
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -751,28 +761,28 @@ CONFIG_WDT_RM9K_GPI=m
 # Misc devices
 #
 
-#
-# Multimedia Capabilities Port drivers
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
 #
 # CONFIG_DVB is not set
+# CONFIG_USB_DABUSB is not set
 
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_FILLRECT is not set
+# CONFIG_FB_CFB_COPYAREA is not set
+# CONFIG_FB_CFB_IMAGEBLIT is not set
 # CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
 # CONFIG_FB_CIRRUS is not set
@@ -784,7 +794,6 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_NVIDIA is not set
 # CONFIG_FB_RIVA is not set
 # CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
 # CONFIG_FB_RADEON is not set
 # CONFIG_FB_ATY128 is not set
 # CONFIG_FB_ATY is not set
@@ -797,7 +806,6 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_SMIVGX is not set
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_VIRTUAL is not set
-CONFIG_FB_DD=y
 
 #
 # Console display driver support
@@ -826,6 +834,7 @@ CONFIG_FONT_8x16=y
 #
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
 CONFIG_USB=y
 # CONFIG_USB_DEBUG is not set
 
@@ -843,6 +852,7 @@ CONFIG_USB_DEVICEFS=y
 CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
 # CONFIG_USB_ISP116X_HCD is not set
 CONFIG_USB_OHCI_HCD=y
 # CONFIG_USB_OHCI_BIG_ENDIAN is not set
@@ -895,9 +905,7 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_ACECAD is not set
 # CONFIG_USB_KBTAB is not set
 # CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_MTOUCH is not set
-# CONFIG_USB_ITMTOUCH is not set
-# CONFIG_USB_EGALAX is not set
+# CONFIG_USB_TOUCHSCREEN is not set
 # CONFIG_USB_YEALINK is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
@@ -911,15 +919,6 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
 
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-
-#
-# Video4Linux support is needed for USB Multimedia device support
-#
-
 #
 # USB Network Adapters
 #
@@ -946,15 +945,15 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_EMI26 is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
-CONFIG_USB_ARTTFT=m
-# CONFIG_USB_ARTTOUCH is not set
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
+# CONFIG_USB_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
 # CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
 # CONFIG_USB_TEST is not set
@@ -973,24 +972,45 @@ CONFIG_USB_ARTTFT=m
 #
 # CONFIG_MMC is not set
 
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
 #
 # InfiniBand support
 #
 # CONFIG_INFINIBAND is not set
 
 #
-# SN Devices
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
 #
+# CONFIG_DMA_ENGINE is not set
 
 #
-# EDAC - error detection and reporting (RAS)
+# DMA Clients
 #
 
 #
-# eXcite frame capture support
+# DMA Devices
 #
-CONFIG_EXCITE_FCAP=m
-CONFIG_EXCITE_FCAP_GPI=m
 
 #
 # File systems
@@ -1007,6 +1027,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 # CONFIG_DNOTIFY is not set
 # CONFIG_AUTOFS_FS is not set
@@ -1038,7 +1059,6 @@ CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
 # CONFIG_CONFIGFS_FS is not set
 
 #
@@ -1056,6 +1076,7 @@ CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
 CONFIG_JFFS2_FS_WRITEBUFFER=y
 # CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -1085,6 +1106,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1165,8 +1187,10 @@ CONFIG_NLS_ISO8859_1=m
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_DEBUG_FS is not set
 CONFIG_CROSSCOMPILE=y
 CONFIG_CMDLINE=""
 
@@ -1218,3 +1242,4 @@ CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index 879ba1ad99caf2076bc7c56a302c6166679d02c9..ef16d1fb50715a5b45520d6eaad7afd8bc62ed8d 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:50:54 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:10 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 CONFIG_SGI_IP22=y
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_ARC=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
@@ -119,7 +123,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_BOARD_SCACHE=y
 CONFIG_IP22_CPU_SCACHE=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -134,6 +141,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -146,6 +154,7 @@ CONFIG_HZ=1000
 # CONFIG_PREEMPT_NONE is not set
 CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -178,10 +187,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -272,6 +283,8 @@ CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
 CONFIG_INET_XFRM_TUNNEL=m
 CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -319,7 +332,10 @@ CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
 CONFIG_INET6_XFRM_TUNNEL=m
 CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
 CONFIG_IPV6_TUNNEL=m
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -335,6 +351,8 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
+CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
@@ -349,9 +367,11 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -361,6 +381,7 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_IP_NF_CONNTRACK=m
 CONFIG_IP_NF_CT_ACCT=y
 CONFIG_IP_NF_CONNTRACK_MARK=y
+CONFIG_IP_NF_CONNTRACK_SECMARK=y
 CONFIG_IP_NF_CONNTRACK_EVENTS=y
 CONFIG_IP_NF_CONNTRACK_NETLINK=m
 # CONFIG_IP_NF_CT_PROTO_SCTP is not set
@@ -371,6 +392,7 @@ CONFIG_IP_NF_TFTP=m
 CONFIG_IP_NF_AMANDA=m
 CONFIG_IP_NF_PPTP=m
 CONFIG_IP_NF_H323=m
+CONFIG_IP_NF_SIP=m
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
@@ -401,6 +423,7 @@ CONFIG_IP_NF_NAT_TFTP=m
 CONFIG_IP_NF_NAT_AMANDA=m
 CONFIG_IP_NF_NAT_PPTP=m
 CONFIG_IP_NF_NAT_H323=m
+CONFIG_IP_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
@@ -533,6 +556,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -652,6 +676,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
 
 #
 # Ethernet (10 or 100Mbit)
@@ -749,6 +775,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -781,6 +808,7 @@ CONFIG_WATCHDOG=y
 #
 # CONFIG_SOFT_WATCHDOG is not set
 CONFIG_INDYDOG=m
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 CONFIG_SGI_DS1286=m
 # CONFIG_GEN_RTC is not set
@@ -829,6 +857,7 @@ CONFIG_MAX_RAW_DEVS=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -838,6 +867,7 @@ CONFIG_MAX_RAW_DEVS=256
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
 
 #
@@ -909,6 +939,19 @@ CONFIG_LOGO_SGI_CLUT224=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -926,7 +969,6 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
 CONFIG_XFS_QUOTA=y
 CONFIG_XFS_SECURITY=y
 # CONFIG_XFS_POSIX_ACL is not set
@@ -935,6 +977,7 @@ CONFIG_XFS_SECURITY=y
 CONFIG_MINIX_FS=m
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 CONFIG_QUOTA=y
 # CONFIG_QFMT_V1 is not set
 CONFIG_QFMT_V2=m
@@ -991,6 +1034,8 @@ CONFIG_EFS_FS=m
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_SYSV_FS is not set
 CONFIG_UFS_FS=m
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_UFS_DEBUG is not set
 
 #
 # Network File Systems
@@ -1020,7 +1065,9 @@ CONFIG_SMB_NLS_DEFAULT=y
 CONFIG_SMB_NLS_REMOTE="cp437"
 CONFIG_CIFS=m
 # CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
 # CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 CONFIG_CODA_FS=m
@@ -1103,6 +1150,7 @@ CONFIG_NLS_UTF8=m
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1162,3 +1210,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index bb142680643075c64fc42ccb0b8ed74dfe86e5dd..4bf1ee7f5f0033fc0471f7b4ac69d3b91aa624e2 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:04 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:10 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 CONFIG_SGI_IP27=y
 # CONFIG_SGI_IP32 is not set
@@ -61,16 +64,17 @@ CONFIG_SGI_IP27=y
 # CONFIG_TOSHIBA_JMR3927 is not set
 # CONFIG_TOSHIBA_RBTX4927 is not set
 # CONFIG_TOSHIBA_RBTX4938 is not set
+CONFIG_SGI_SN_M_MODE=y
 # CONFIG_SGI_SN_N_MODE is not set
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
-CONFIG_NUMA=y
 # CONFIG_MAPPED_KERNEL is not set
 # CONFIG_REPLICATE_KTEXT is not set
 # CONFIG_REPLICATE_EXHANDLERS is not set
+CONFIG_EARLY_PRINTK=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_ARC=y
 CONFIG_DMA_IP27=y
 CONFIG_CPU_BIG_ENDIAN=y
@@ -117,12 +121,19 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_IRQ_PER_CPU=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_NUMA=y
+CONFIG_SYS_SUPPORTS_NUMA=y
 CONFIG_NODES_SHIFT=6
 CONFIG_SELECT_MEMORY_MODEL=y
 # CONFIG_FLATMEM_MANUAL is not set
@@ -133,6 +144,11 @@ CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_MIGRATION=y
+CONFIG_RESOURCES_64BIT=y
+CONFIG_SMP=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_NR_CPUS=64
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -142,14 +158,12 @@ CONFIG_HZ_1000=y
 # CONFIG_HZ_1024 is not set
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_HZ=1000
-CONFIG_MIGRATION=y
-CONFIG_SMP=y
-CONFIG_NR_CPUS=64
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
 # CONFIG_MIPS_INSANE_LARGE is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -183,10 +197,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -283,6 +299,8 @@ CONFIG_IP_PNP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -290,6 +308,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -387,6 +406,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -479,6 +499,7 @@ CONFIG_SCSI_SAS_ATTRS=m
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_IPS is not set
@@ -502,9 +523,8 @@ CONFIG_MD_LINEAR=m
 CONFIG_MD_RAID0=y
 CONFIG_MD_RAID1=y
 CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=y
+CONFIG_MD_RAID456=m
 CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_RAID6=m
 CONFIG_MD_MULTIPATH=m
 CONFIG_MD_FAULTY=m
 CONFIG_BLK_DEV_DM=m
@@ -560,6 +580,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -567,8 +589,6 @@ CONFIG_CICADA_PHY=m
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
 CONFIG_SGI_IOC3_ETH=y
-CONFIG_SGI_IOC3_ETH_HW_RX_CSUM=y
-CONFIG_SGI_IOC3_ETH_HW_TX_CSUM=y
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_CASSINI is not set
@@ -605,6 +625,7 @@ CONFIG_SGI_IOC3_ETH_HW_TX_CSUM=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -695,6 +716,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 CONFIG_SGI_IP27_RTC=y
 # CONFIG_GEN_RTC is not set
@@ -744,6 +766,7 @@ CONFIG_SGI_IP27_RTC=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -753,6 +776,7 @@ CONFIG_SGI_IP27_RTC=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -809,6 +833,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -836,6 +873,7 @@ CONFIG_XFS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
@@ -903,6 +941,7 @@ CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -944,6 +983,7 @@ CONFIG_SGI_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=15
 # CONFIG_DEBUG_FS is not set
@@ -999,3 +1039,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
index 31b3c92a384118afe825816e7b81b218661a0be8..f83dc09c3ca99782ca4fd6fec3ac76fdfe13f5d5 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:05 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:11 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 CONFIG_SGI_IP32=y
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_ARC=y
 CONFIG_DMA_IP32=y
 CONFIG_DMA_NONCOHERENT=y
@@ -120,7 +124,10 @@ CONFIG_PAGE_SIZE_4KB=y
 CONFIG_BOARD_SCACHE=y
 CONFIG_R5000_CPU_SCACHE=y
 CONFIG_RM7000_CPU_SCACHE=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -134,6 +141,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -146,6 +154,7 @@ CONFIG_HZ=1000
 # CONFIG_PREEMPT_NONE is not set
 CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -178,10 +187,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -270,6 +281,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -277,6 +290,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -336,6 +350,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -434,6 +449,7 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_IPS is not set
@@ -498,6 +514,8 @@ CONFIG_DAVICOM_PHY=y
 CONFIG_QSEMI_PHY=y
 CONFIG_LXT_PHY=y
 CONFIG_CICADA_PHY=y
+CONFIG_VITESSE_PHY=y
+CONFIG_SMSC_PHY=y
 
 #
 # Ethernet (10 or 100Mbit)
@@ -541,6 +559,7 @@ CONFIG_SGI_O2MACE_ETH=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -620,6 +639,7 @@ CONFIG_SERIO_RAW=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -651,6 +671,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -699,6 +720,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -708,6 +730,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -770,6 +793,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -785,6 +821,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -850,6 +887,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -887,6 +925,7 @@ CONFIG_SGI_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -928,7 +967,6 @@ CONFIG_CRYPTO_ANUBIS=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
 CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
 
 #
 # Hardware crypto devices
@@ -943,3 +981,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index 809bae9013ac6517814fd22d7396d92fb8e0e1ba..a91d72a9ca8687c940b22a7e25555d07b56fd5ec 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:05 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:11 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_ITE8172=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_ITE8172=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -66,6 +69,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -114,7 +118,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -128,6 +135,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -140,6 +148,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -172,14 +181,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -266,6 +276,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -273,6 +285,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -332,6 +345,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -513,6 +527,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -601,6 +617,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 # CONFIG_QTRONIX_KEYBOARD is not set
 # CONFIG_IT8172_SCR0 is not set
@@ -634,6 +651,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -680,6 +698,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -689,6 +708,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -762,6 +782,19 @@ CONFIG_SOUND_IT8172=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -777,6 +810,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -842,6 +876,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -868,6 +903,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -923,3 +959,4 @@ CONFIG_CRC32=m
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
index 55108fd678444aacbece191a9230561fbf2b5df1..cebc67212d0621e536f74259791e3d113b2203e3 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:06 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:12 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_IVR=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_IVR=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -111,7 +115,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -125,6 +132,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -137,6 +145,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -169,10 +178,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -263,6 +274,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -270,6 +283,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -329,6 +343,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -447,6 +462,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -489,6 +506,7 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -566,6 +584,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 CONFIG_QTRONIX_KEYBOARD=y
 CONFIG_IT8172_SCR0=y
@@ -600,6 +619,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 CONFIG_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -647,6 +667,7 @@ CONFIG_RTC=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -656,6 +677,7 @@ CONFIG_RTC=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -718,6 +740,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -733,6 +768,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -796,6 +832,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -822,6 +859,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -877,3 +915,4 @@ CONFIG_CRC32=m
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
index ef2843436057d9c351a909fff015fd4631812201..5d9eb11aba3d0d1a5f9209d7cab57d65246ec9d0 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:06 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:12 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 CONFIG_MOMENCO_JAGUAR_ATX=y
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MOMENCO_JAGUAR_ATX=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -66,6 +69,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_LIMITED_DMA=y
@@ -120,7 +124,10 @@ CONFIG_PAGE_SIZE_4KB=y
 CONFIG_BOARD_SCACHE=y
 CONFIG_RM7000_CPU_SCACHE=y
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -134,6 +141,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -143,10 +151,10 @@ CONFIG_HZ_1000=y
 # CONFIG_HZ_1024 is not set
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_HZ=1000
-# CONFIG_SMP is not set
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -177,10 +185,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -267,6 +277,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -279,7 +291,10 @@ CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
 CONFIG_INET6_XFRM_TUNNEL=m
 CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
 CONFIG_IPV6_TUNNEL=m
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_VLAN_8021Q is not set
@@ -315,6 +330,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -409,6 +425,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -430,6 +448,7 @@ CONFIG_NET_PCI=y
 # CONFIG_PCNET32 is not set
 # CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
 # CONFIG_FORCEDETH is not set
 # CONFIG_DGRS is not set
 CONFIG_EEPRO100=y
@@ -470,6 +489,7 @@ CONFIG_MV643XX_ETH_2=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -547,6 +567,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -593,6 +614,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -602,6 +624,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -657,6 +680,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # Real Time Clock
 #
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -669,6 +705,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -721,6 +758,7 @@ CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 
@@ -740,6 +778,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -795,3 +834,4 @@ CONFIG_CRC32=m
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
index 5ef5a08289a57fa51b4da033ed9b39bfa40937e7..be45a9044d06583ecd7b42b69544348de585a8f4 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:07 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:12 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_CPU_BIG_ENDIAN=y
@@ -110,7 +114,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -123,6 +130,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -136,6 +144,7 @@ CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_RTC_DS1742=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -167,10 +176,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -256,6 +267,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -263,6 +276,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -322,6 +336,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -419,6 +434,8 @@ CONFIG_DAVICOM_PHY=y
 CONFIG_QSEMI_PHY=y
 CONFIG_LXT_PHY=y
 CONFIG_CICADA_PHY=y
+CONFIG_VITESSE_PHY=y
+CONFIG_SMSC_PHY=y
 
 #
 # Ethernet (10 or 100Mbit)
@@ -461,6 +478,7 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -538,6 +556,7 @@ CONFIG_SERIO_RAW=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_COMPUTONE is not set
 # CONFIG_ROCKETPORT is not set
@@ -582,6 +601,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -630,6 +650,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -639,12 +660,13 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
 # CONFIG_FB_CFB_FILLRECT is not set
 # CONFIG_FB_CFB_COPYAREA is not set
 # CONFIG_FB_CFB_IMAGEBLIT is not set
 # CONFIG_FB_MACMODES is not set
-CONFIG_FB_FIRMWARE_EDID=y
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
 # CONFIG_FB_CIRRUS is not set
@@ -736,6 +758,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -749,6 +784,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -812,6 +848,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -838,6 +875,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -879,7 +917,6 @@ CONFIG_CRYPTO_ANUBIS=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
 CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
 
 #
 # Hardware crypto devices
@@ -894,3 +931,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index eabcff26fc0edc9b369b0eff06fdd64cf6943941..64dc9f45a19c66e2f27dd15a8b40b40e2749bd60 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:07 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:12 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_LASAT=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_LASAT=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -69,6 +72,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_MIPS_NILE4=y
@@ -117,7 +121,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_BOARD_SCACHE=y
 CONFIG_R5000_CPU_SCACHE=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -132,6 +139,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -144,6 +152,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -175,14 +184,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -266,6 +276,8 @@ CONFIG_IP_FIB_HASH=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -273,6 +285,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -332,6 +345,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -555,6 +569,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -597,6 +613,7 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -674,6 +691,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -705,6 +723,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -753,6 +772,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -762,6 +782,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -824,6 +845,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -845,6 +879,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -911,6 +946,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -937,6 +973,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -992,3 +1029,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
index b73cff0d83ca058d951f50deb19bbdcd536def38..2690baf15a857833777513dad397d3b7cdca0fc2 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:08 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:13 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 CONFIG_MIPS_MALTA=y
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_MALTA=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
@@ -126,19 +130,21 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
+CONFIG_BOARD_SCACHE=y
+CONFIG_MIPS_CPU_SCACHE=y
 CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_MIPS_MT=y
+# CONFIG_MIPS_MT_DISABLED is not set
 # CONFIG_MIPS_MT_SMTC is not set
 # CONFIG_MIPS_MT_SMP is not set
 CONFIG_MIPS_VPE_LOADER=y
+CONFIG_MIPS_MT=y
+CONFIG_SYS_SUPPORTS_MULTITHREADING=y
 CONFIG_MIPS_MT_FPAFF=y
 CONFIG_MIPS_VPE_LOADER_TOM=y
 CONFIG_MIPS_VPE_APSP_API=y
 CONFIG_MIPS_APSP_KSPD=y
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
-# CONFIG_CPU_MIPSR2_IRQ_VI is not set
-# CONFIG_CPU_MIPSR2_IRQ_EI is not set
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -152,6 +158,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 CONFIG_HZ_100=y
 # CONFIG_HZ_128 is not set
@@ -164,6 +171,7 @@ CONFIG_HZ=100
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -195,10 +203,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -300,6 +310,8 @@ CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
 CONFIG_INET_XFRM_TUNNEL=m
 CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -347,7 +359,10 @@ CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
 CONFIG_INET6_XFRM_TUNNEL=m
 CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
 CONFIG_IPV6_TUNNEL=m
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 CONFIG_BRIDGE_NETFILTER=y
@@ -364,6 +379,8 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
+# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
@@ -379,9 +396,11 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 # CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -391,6 +410,7 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_IP_NF_CONNTRACK=m
 CONFIG_IP_NF_CT_ACCT=y
 CONFIG_IP_NF_CONNTRACK_MARK=y
+CONFIG_IP_NF_CONNTRACK_SECMARK=y
 CONFIG_IP_NF_CONNTRACK_EVENTS=y
 CONFIG_IP_NF_CONNTRACK_NETLINK=m
 CONFIG_IP_NF_CT_PROTO_SCTP=m
@@ -401,6 +421,7 @@ CONFIG_IP_NF_TFTP=m
 CONFIG_IP_NF_AMANDA=m
 CONFIG_IP_NF_PPTP=m
 CONFIG_IP_NF_H323=m
+CONFIG_IP_NF_SIP=m
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
@@ -431,6 +452,7 @@ CONFIG_IP_NF_NAT_TFTP=m
 CONFIG_IP_NF_NAT_AMANDA=m
 CONFIG_IP_NF_NAT_PPTP=m
 CONFIG_IP_NF_NAT_H323=m
+CONFIG_IP_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
@@ -592,6 +614,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -746,6 +769,7 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_IPS is not set
@@ -770,9 +794,8 @@ CONFIG_MD_LINEAR=m
 CONFIG_MD_RAID0=m
 CONFIG_MD_RAID1=m
 CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
+CONFIG_MD_RAID456=m
 CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_RAID6=m
 CONFIG_MD_MULTIPATH=m
 CONFIG_MD_FAULTY=m
 CONFIG_BLK_DEV_DM=m
@@ -828,6 +851,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -890,6 +915,7 @@ CONFIG_PCNET32=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -968,6 +994,7 @@ CONFIG_SERIO_SERPORT=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -999,6 +1026,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 CONFIG_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -1046,6 +1074,7 @@ CONFIG_RTC=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -1055,6 +1084,7 @@ CONFIG_RTC=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -1117,6 +1147,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -1143,7 +1186,6 @@ CONFIG_JFS_SECURITY=y
 # CONFIG_JFS_STATISTICS is not set
 CONFIG_FS_POSIX_ACL=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
 CONFIG_XFS_QUOTA=y
 CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
@@ -1152,6 +1194,7 @@ CONFIG_XFS_POSIX_ACL=y
 CONFIG_MINIX_FS=m
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 CONFIG_QUOTA=y
 # CONFIG_QFMT_V1 is not set
 CONFIG_QFMT_V2=y
@@ -1209,6 +1252,8 @@ CONFIG_VXFS_FS=m
 # CONFIG_QNX4FS_FS is not set
 CONFIG_SYSV_FS=m
 CONFIG_UFS_FS=m
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_UFS_DEBUG is not set
 
 #
 # Network File Systems
@@ -1233,6 +1278,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1298,6 +1344,7 @@ CONFIG_NLS_UTF8=m
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1356,3 +1403,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index 8dd27b55413d7ed40e5fbfd05fcf6f43e5cb4217..c298979c18ae2be2eedab97c9d259be23b94bd24 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:09 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:13 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 CONFIG_MIPS_SIM=y
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_SIM=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -113,14 +117,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_MIPS_MT=y
+CONFIG_MIPS_MT_DISABLED=y
 # CONFIG_MIPS_MT_SMTC is not set
 # CONFIG_MIPS_MT_SMP is not set
-CONFIG_MIPS_VPE_LOADER=y
-CONFIG_MIPS_MT_FPAFF=y
-CONFIG_MIPS_VPE_LOADER_TOM=y
-CONFIG_MIPS_VPE_APSP_API=y
-CONFIG_MIPS_APSP_KSPD=y
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -136,6 +136,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -148,6 +149,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -180,10 +182,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -279,6 +283,8 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -286,6 +292,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -381,6 +388,7 @@ CONFIG_NET_ESTIMATOR=y
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -565,6 +573,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -595,7 +604,6 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -611,6 +619,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -620,6 +629,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -674,6 +684,19 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -685,7 +708,6 @@ CONFIG_EXT2_FS=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=y
 # CONFIG_INOTIFY is not set
@@ -753,6 +775,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -779,14 +802,19 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DETECT_SOFTLOCKUP is not set
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_VM is not set
@@ -844,3 +872,4 @@ CONFIG_CRYPTO_MD5=y
 CONFIG_CRC16=y
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
index 5d6ff3c352c94e84aa64155c86c856f7cbff5f97..938b38ab5239ca9c32367695cfee543ae2db986c 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:09 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:15 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 CONFIG_MACH_VR41XX=y
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -73,6 +76,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -117,7 +121,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -130,6 +137,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -142,6 +150,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -173,10 +182,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -278,6 +289,8 @@ CONFIG_IP_FIB_HASH=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -285,6 +298,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -345,6 +359,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -483,6 +498,7 @@ CONFIG_MII=m
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -531,8 +547,10 @@ CONFIG_PCMCIA_HERMES=m
 # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
 #
 # CONFIG_PRISM54 is not set
+# CONFIG_USB_ZD1201 is not set
 # CONFIG_HOSTAP is not set
 # CONFIG_BCM43XX is not set
+# CONFIG_ZD1211RW is not set
 CONFIG_NET_WIRELESS=y
 
 #
@@ -614,6 +632,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -639,6 +658,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -695,6 +715,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -705,6 +726,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -798,7 +820,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 CONFIG_USB_PEGASUS=m
 # CONFIG_USB_RTL8150 is not set
 # CONFIG_USB_USBNET is not set
-# CONFIG_USB_ZD1201 is not set
 # CONFIG_USB_MON is not set
 
 #
@@ -820,10 +841,12 @@ CONFIG_USB_PEGASUS=m
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
+# CONFIG_USB_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
 # CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_LD is not set
 # CONFIG_USB_TEST is not set
 
@@ -868,6 +891,19 @@ CONFIG_USB_PEGASUS=m
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -883,6 +919,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
@@ -945,6 +982,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -971,6 +1009,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1026,3 +1065,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
index fe5e3dd915f58ab5ee11e5cf0a5c1300fa5cfaa7..ec5758f22676a98a6f9a11c85ac28eeee459e209 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:10 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:15 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MOMENCO_OCELOT_3=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_CPU_BIG_ENDIAN=y
@@ -118,7 +122,10 @@ CONFIG_PAGE_SIZE_4KB=y
 CONFIG_BOARD_SCACHE=y
 CONFIG_RM7000_CPU_SCACHE=y
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -134,6 +141,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -143,10 +151,10 @@ CONFIG_HZ_1000=y
 # CONFIG_HZ_1024 is not set
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_HZ=1000
-# CONFIG_SMP is not set
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -179,10 +187,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -273,6 +283,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -291,7 +303,10 @@ CONFIG_IPV6_ROUTE_INFO=y
 # CONFIG_INET6_IPCOMP is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
 # CONFIG_IPV6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -306,6 +321,7 @@ CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -316,8 +332,10 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -393,6 +411,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -483,6 +502,7 @@ CONFIG_ISCSI_TCP=m
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_IPS is not set
@@ -548,6 +568,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -614,6 +636,7 @@ CONFIG_MV643XX_ETH_2=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -697,6 +720,7 @@ CONFIG_SERIO=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -728,6 +752,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 CONFIG_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -775,6 +800,7 @@ CONFIG_RTC=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -784,12 +810,13 @@ CONFIG_RTC=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
 # CONFIG_FB_CFB_FILLRECT is not set
 # CONFIG_FB_CFB_COPYAREA is not set
 # CONFIG_FB_CFB_IMAGEBLIT is not set
 # CONFIG_FB_MACMODES is not set
-CONFIG_FB_FIRMWARE_EDID=y
+# CONFIG_FB_BACKLIGHT is not set
 CONFIG_FB_MODE_HELPERS=y
 # CONFIG_FB_TILEBLITTING is not set
 # CONFIG_FB_CIRRUS is not set
@@ -888,6 +915,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -908,7 +948,6 @@ CONFIG_REISERFS_FS=m
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_SECURITY is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -917,6 +956,7 @@ CONFIG_XFS_EXPORT=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
@@ -988,6 +1028,7 @@ CONFIG_SUNRPC=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1053,6 +1094,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1111,3 +1153,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index f4a33ce47e500bdf35acc7bf7b911593ede1e687..0d33d87de1a1834fe672864cba7729de097e9d7a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:10 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:16 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MOMENCO_OCELOT_C=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_CPU_BIG_ENDIAN=y
@@ -116,7 +120,10 @@ CONFIG_PAGE_SIZE_4KB=y
 CONFIG_BOARD_SCACHE=y
 CONFIG_RM7000_CPU_SCACHE=y
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -131,6 +138,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -143,6 +151,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -174,10 +183,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -265,6 +276,8 @@ CONFIG_IP_PNP_DHCP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -272,6 +285,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -331,6 +345,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -428,6 +443,8 @@ CONFIG_DAVICOM_PHY=y
 CONFIG_QSEMI_PHY=y
 CONFIG_LXT_PHY=y
 CONFIG_CICADA_PHY=y
+CONFIG_VITESSE_PHY=y
+CONFIG_SMSC_PHY=y
 
 #
 # Ethernet (10 or 100Mbit)
@@ -471,6 +488,7 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -548,6 +566,7 @@ CONFIG_SERIO_RAW=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -579,6 +598,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -627,6 +647,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -636,6 +657,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -698,6 +720,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -713,6 +748,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -779,6 +815,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -805,6 +842,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -846,7 +884,6 @@ CONFIG_CRYPTO_ANUBIS=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
 CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
 
 #
 # Hardware crypto devices
@@ -861,3 +898,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index 21dea9549febd02f6802749273beca48544dd5ad..4b999102715eb761cc637991551c3907101db461 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:11 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:16 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 CONFIG_MOMENCO_OCELOT=y
@@ -45,6 +47,7 @@ CONFIG_MOMENCO_OCELOT=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_CPU_BIG_ENDIAN=y
@@ -119,7 +123,10 @@ CONFIG_PAGE_SIZE_4KB=y
 CONFIG_BOARD_SCACHE=y
 CONFIG_RM7000_CPU_SCACHE=y
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -135,6 +142,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -147,6 +155,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -178,10 +187,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -265,6 +276,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -272,6 +285,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -331,6 +345,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -416,6 +431,8 @@ CONFIG_DAVICOM_PHY=y
 CONFIG_QSEMI_PHY=y
 CONFIG_LXT_PHY=y
 CONFIG_CICADA_PHY=y
+CONFIG_VITESSE_PHY=y
+CONFIG_SMSC_PHY=y
 
 #
 # Ethernet (10 or 100Mbit)
@@ -504,6 +521,7 @@ CONFIG_SERIO_RAW=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -533,6 +551,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -579,6 +598,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -588,6 +608,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -648,6 +669,19 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -663,6 +697,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -729,6 +764,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -755,6 +791,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -796,7 +833,6 @@ CONFIG_CRYPTO_ANUBIS=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
 CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
 
 #
 # Hardware crypto devices
@@ -811,3 +847,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index c63b1ca8c8b3085b4adbc311d0be2b39d6c25057..827b344f60100084b424537c3e6d519964f87f4c 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:11 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:16 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MOMENCO_OCELOT_G=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_CPU_BIG_ENDIAN=y
@@ -119,7 +123,10 @@ CONFIG_PAGE_SIZE_4KB=y
 CONFIG_BOARD_SCACHE=y
 CONFIG_RM7000_CPU_SCACHE=y
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -134,6 +141,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -146,6 +154,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -177,10 +186,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -268,6 +279,8 @@ CONFIG_IP_PNP_DHCP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -275,6 +288,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -334,6 +348,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -431,6 +446,8 @@ CONFIG_DAVICOM_PHY=y
 CONFIG_QSEMI_PHY=y
 CONFIG_LXT_PHY=y
 CONFIG_CICADA_PHY=y
+CONFIG_VITESSE_PHY=y
+CONFIG_SMSC_PHY=y
 
 #
 # Ethernet (10 or 100Mbit)
@@ -474,6 +491,7 @@ CONFIG_GALILEO_64240_ETH=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -551,6 +569,7 @@ CONFIG_SERIO_RAW=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -582,6 +601,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -630,6 +650,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -639,6 +660,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -701,6 +723,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -716,6 +751,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -782,6 +818,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -808,6 +845,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -849,7 +887,6 @@ CONFIG_CRYPTO_ANUBIS=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
 CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
 
 #
 # Hardware crypto devices
@@ -864,3 +901,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index 6f5c7261e9deb709a7ed537d13b73158bfd627bd..9ed60fef69e024091e39ab5a0516b3924668e0ad 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:12 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:17 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS_PB1100=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_PB1100=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_PB1100=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -114,7 +118,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_64BIT_PHYS_ADDR=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -130,6 +137,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -142,6 +150,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -173,14 +182,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -278,6 +288,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -290,6 +302,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -304,6 +317,7 @@ CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -314,8 +328,10 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -385,6 +401,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -544,6 +561,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -647,6 +666,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 # CONFIG_AU1X00_GPIO is not set
 # CONFIG_TS_AU1X00_ADS7846 is not set
@@ -680,6 +700,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -733,6 +754,7 @@ CONFIG_SYNCLINK_CS=m
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -742,6 +764,7 @@ CONFIG_SYNCLINK_CS=m
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -803,6 +826,19 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -831,6 +867,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=m
@@ -900,6 +937,7 @@ CONFIG_SUNRPC=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -965,6 +1003,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1024,3 +1063,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index 5676f3747fd553717602356f47946f858d8d4b74..6774254b1be660cbe351428e3ed4569b544e44a2 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:13 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:17 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS_PB1500=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_PB1500=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_PB1500=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -113,7 +117,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_64BIT_PHYS_ADDR=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -129,6 +136,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -141,6 +149,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -172,14 +181,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -283,6 +293,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -295,6 +307,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -309,6 +322,7 @@ CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -319,8 +333,10 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -390,6 +406,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -604,7 +621,7 @@ CONFIG_NETDEVICES=y
 #
 # PHY device support
 #
-CONFIG_PHYLIB=m
+CONFIG_PHYLIB=y
 
 #
 # MII PHY device drivers
@@ -614,6 +631,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -658,6 +677,7 @@ CONFIG_MIPS_AU1X00_ENET=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -789,6 +809,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -844,6 +865,7 @@ CONFIG_SYNCLINK_CS=m
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -853,6 +875,7 @@ CONFIG_SYNCLINK_CS=m
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -909,6 +932,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -937,6 +973,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=m
@@ -1006,6 +1043,7 @@ CONFIG_SUNRPC=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1071,6 +1109,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1130,3 +1169,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index a1c479fa613b08692f9757a7d80aa7556d62bc05..1afe5bf6e765617fef2cdaab291d89201f5ba0ee 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:13 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:17 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS_PB1550=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS_PB1550=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_PB1550=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y
@@ -113,7 +117,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_64BIT_PHYS_ADDR=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -129,6 +136,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -141,6 +149,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -172,14 +181,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -283,6 +293,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -295,6 +307,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -309,6 +322,7 @@ CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -319,8 +333,10 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -390,6 +406,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -604,7 +621,7 @@ CONFIG_NETDEVICES=y
 #
 # PHY device support
 #
-CONFIG_PHYLIB=m
+CONFIG_PHYLIB=y
 
 #
 # MII PHY device drivers
@@ -614,6 +631,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -658,6 +677,7 @@ CONFIG_MIPS_AU1X00_ENET=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -781,6 +801,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -836,6 +857,7 @@ CONFIG_SYNCLINK_CS=m
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -845,6 +867,7 @@ CONFIG_SYNCLINK_CS=m
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -901,6 +924,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -929,6 +965,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=m
@@ -998,6 +1035,7 @@ CONFIG_SUNRPC=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1063,6 +1101,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1122,3 +1161,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index b2d991b80309a6bdb0c93b4f2658cb48d4694aed..ac616c82d348c4bc4d3aa989a951e358ef7aee01 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:14 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:18 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -40,12 +42,13 @@ CONFIG_MIPS=y
 # CONFIG_MOMENCO_OCELOT_G is not set
 # CONFIG_MIPS_XXS1500 is not set
 # CONFIG_PNX8550_V2PCI is not set
-CONFIG_PNX8550_JBS=y
+# CONFIG_PNX8550_JBS is not set
 # CONFIG_DDB5477 is not set
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
-# CONFIG_SGI_IP22 is not set
+# CONFIG_MARKEINS is not set
+CONFIG_SGI_IP22=y
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
 # CONFIG_SIBYTE_BIGSUR is not set
@@ -65,19 +68,25 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARC=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
-# CONFIG_CPU_BIG_ENDIAN is not set
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
-CONFIG_PNX8550=y
-CONFIG_SOC_PNX8550=y
+CONFIG_CPU_BIG_ENDIAN=y
+# CONFIG_CPU_LITTLE_ENDIAN is not set
+CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
+CONFIG_IRQ_CPU=y
+CONFIG_SWAP_IO_SPACE=y
+CONFIG_ARC32=y
+CONFIG_BOOT_ELF32=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
+# CONFIG_ARC_CONSOLE is not set
+CONFIG_ARC_PROMLIB=y
 
 #
 # CPU selection
 #
-CONFIG_CPU_MIPS32_R1=y
+# CONFIG_CPU_MIPS32_R1 is not set
 # CONFIG_CPU_MIPS32_R2 is not set
 # CONFIG_CPU_MIPS64_R1 is not set
 # CONFIG_CPU_MIPS64_R2 is not set
@@ -85,7 +94,7 @@ CONFIG_CPU_MIPS32_R1=y
 # CONFIG_CPU_TX39XX is not set
 # CONFIG_CPU_VR41XX is not set
 # CONFIG_CPU_R4300 is not set
-# CONFIG_CPU_R4X00 is not set
+CONFIG_CPU_R4X00=y
 # CONFIG_CPU_TX49XX is not set
 # CONFIG_CPU_R5000 is not set
 # CONFIG_CPU_R5432 is not set
@@ -96,11 +105,12 @@ CONFIG_CPU_MIPS32_R1=y
 # CONFIG_CPU_RM7000 is not set
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_CPU_MIPS32=y
-CONFIG_CPU_MIPSR1=y
+CONFIG_SYS_HAS_CPU_R4X00=y
+CONFIG_SYS_HAS_CPU_R5000=y
 CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
 
 #
 # Kernel type
@@ -111,14 +121,17 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_BOARD_SCACHE=y
+CONFIG_IP22_CPU_SCACHE=y
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
@@ -128,6 +141,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -140,6 +154,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -173,10 +188,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -213,9 +230,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
-CONFIG_HW_HAS_PCI=y
-CONFIG_PCI=y
-# CONFIG_PCI_DEBUG is not set
+CONFIG_HW_HAS_EISA=y
+# CONFIG_EISA is not set
 CONFIG_MMU=y
 
 #
@@ -226,7 +242,6 @@ CONFIG_MMU=y
 #
 # PCI Hotplug Support
 #
-# CONFIG_HOTPLUG_PCI is not set
 
 #
 # Executable file formats
@@ -247,6 +262,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
@@ -265,6 +282,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -272,6 +291,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -326,6 +346,7 @@ CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -349,16 +370,10 @@ CONFIG_FW_LOADER=y
 #
 # Block devices
 #
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=8192
@@ -388,38 +403,8 @@ CONFIG_BLK_DEV_IDESCSI=y
 # IDE chipset support/bugfixes
 #
 CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_PCI_AUTO is not set
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-# CONFIG_BLK_DEV_PIIX is not set
-# CONFIG_BLK_DEV_IT821X is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_PDC202XX_OLD is not set
-# CONFIG_BLK_DEV_PDC202XX_NEW is not set
-# CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIIMAGE is not set
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
 # CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
 
@@ -459,31 +444,8 @@ CONFIG_SCSI_ISCSI_ATTRS=m
 # SCSI low-level drivers
 #
 CONFIG_ISCSI_TCP=m
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SGIWD93_SCSI is not set
 # CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
@@ -495,19 +457,14 @@ CONFIG_ISCSI_TCP=m
 # Fusion MPT device support
 #
 # CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
-# CONFIG_FUSION_SAS is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
 
 #
 # I2O device support
 #
-# CONFIG_I2O is not set
 
 #
 # Network device support
@@ -518,11 +475,6 @@ CONFIG_NETDEVICES=y
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
 #
 # PHY device support
 #
@@ -533,71 +485,20 @@ CONFIG_NETDEVICES=y
 #
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_CASSINI is not set
-# CONFIG_NET_VENDOR_3COM is not set
 # CONFIG_DM9000 is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-# CONFIG_PCNET32 is not set
-# CONFIG_AMD8111_ETH is not set
-# CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_B44 is not set
-# CONFIG_FORCEDETH is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-# CONFIG_E100 is not set
-# CONFIG_FEALNX is not set
-# CONFIG_NATSEMI is not set
-# CONFIG_NE2K_PCI is not set
-# CONFIG_8139CP is not set
-CONFIG_8139TOO=y
-# CONFIG_8139TOO_PIO is not set
-CONFIG_8139TOO_TUNE_TWISTER=y
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_TLAN is not set
-# CONFIG_VIA_RHINE is not set
-# CONFIG_LAN_SAA9730 is not set
+# CONFIG_SGISEEQ is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_VIA_VELOCITY is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
 
 #
 # Ethernet (10000 Mbit)
 #
-# CONFIG_CHELSIO_T1 is not set
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
 
 #
 # Token Ring devices
 #
-# CONFIG_TR is not set
 
 #
 # Wireless LAN (non-hamradio)
@@ -608,11 +509,8 @@ CONFIG_8139TOO_8129=y
 # Wan interfaces
 #
 # CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
@@ -657,7 +555,6 @@ CONFIG_INPUT=y
 CONFIG_SERIO=y
 # CONFIG_SERIO_I8042 is not set
 # CONFIG_SERIO_SERPORT is not set
-# CONFIG_SERIO_PCIPS2 is not set
 CONFIG_SERIO_LIBPS2=y
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
@@ -668,6 +565,7 @@ CONFIG_SERIO_LIBPS2=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -678,8 +576,7 @@ CONFIG_HW_CONSOLE=y
 #
 # Non-8250 serial port support
 #
-# CONFIG_SERIAL_IP3106 is not set
-# CONFIG_SERIAL_JSM is not set
+# CONFIG_SERIAL_IP22_ZILOG is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -693,16 +590,16 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
+# CONFIG_SGI_DS1286 is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
 
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
@@ -725,13 +622,13 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
 #
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_F71805F is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
@@ -743,22 +640,24 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
 #
 # CONFIG_DVB is not set
-# CONFIG_USB_DABUSB is not set
 
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
 # Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_SGI_NEWPORT_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
 
 #
@@ -769,125 +668,14 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # USB support
 #
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-# CONFIG_USB_DEVICEFS is not set
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-# CONFIG_USB_EHCI_HCD is not set
-# CONFIG_USB_ISP116X_HCD is not set
-CONFIG_USB_OHCI_HCD=y
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-# CONFIG_USB_UHCI_HCD is not set
-# CONFIG_USB_SL811_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 #
 
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=y
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-# CONFIG_USB_STORAGE_ALAUDA is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-# CONFIG_USB_HID is not set
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_TOUCHSCREEN is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_LD is not set
-
-#
-# USB DSL modem support
-#
-
 #
 # USB Gadget Support
 #
@@ -914,7 +702,6 @@ CONFIG_USB_MON=y
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
 
 #
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
@@ -925,6 +712,19 @@ CONFIG_USB_MON=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -940,6 +740,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 # CONFIG_DNOTIFY is not set
 # CONFIG_AUTOFS_FS is not set
@@ -1011,6 +812,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1021,6 +823,7 @@ CONFIG_SUNRPC=y
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
+CONFIG_SGI_PARTITION=y
 
 #
 # Native Language Support
@@ -1076,15 +879,20 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # CONFIG_PRINTK_TIME is not set
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 CONFIG_DEBUG_SLAB=y
 # CONFIG_DEBUG_SLAB_LEAK is not set
-CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_FS is not set
@@ -1144,3 +952,4 @@ CONFIG_CRC_CCITT=m
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
+CONFIG_PLIST=y
index fe092ac92e894ea16150b970a2ab5c834662bdfd..a8eb51bae3f36b6a1a922d3cffad4ea153a94534 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:14 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:18 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -39,13 +41,14 @@ CONFIG_MIPS=y
 # CONFIG_MOMENCO_OCELOT_C is not set
 # CONFIG_MOMENCO_OCELOT_G is not set
 # CONFIG_MIPS_XXS1500 is not set
-CONFIG_PNX8550_V2PCI=y
+# CONFIG_PNX8550_V2PCI is not set
 # CONFIG_PNX8550_JBS is not set
 # CONFIG_DDB5477 is not set
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
-# CONFIG_SGI_IP22 is not set
+# CONFIG_MARKEINS is not set
+CONFIG_SGI_IP22=y
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
 # CONFIG_SIBYTE_BIGSUR is not set
@@ -65,19 +68,25 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARC=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
-# CONFIG_CPU_BIG_ENDIAN is not set
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
-CONFIG_PNX8550=y
-CONFIG_SOC_PNX8550=y
+CONFIG_CPU_BIG_ENDIAN=y
+# CONFIG_CPU_LITTLE_ENDIAN is not set
+CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
+CONFIG_IRQ_CPU=y
+CONFIG_SWAP_IO_SPACE=y
+CONFIG_ARC32=y
+CONFIG_BOOT_ELF32=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
+# CONFIG_ARC_CONSOLE is not set
+CONFIG_ARC_PROMLIB=y
 
 #
 # CPU selection
 #
-CONFIG_CPU_MIPS32_R1=y
+# CONFIG_CPU_MIPS32_R1 is not set
 # CONFIG_CPU_MIPS32_R2 is not set
 # CONFIG_CPU_MIPS64_R1 is not set
 # CONFIG_CPU_MIPS64_R2 is not set
@@ -85,7 +94,7 @@ CONFIG_CPU_MIPS32_R1=y
 # CONFIG_CPU_TX39XX is not set
 # CONFIG_CPU_VR41XX is not set
 # CONFIG_CPU_R4300 is not set
-# CONFIG_CPU_R4X00 is not set
+CONFIG_CPU_R4X00=y
 # CONFIG_CPU_TX49XX is not set
 # CONFIG_CPU_R5000 is not set
 # CONFIG_CPU_R5432 is not set
@@ -96,11 +105,12 @@ CONFIG_CPU_MIPS32_R1=y
 # CONFIG_CPU_RM7000 is not set
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_CPU_MIPS32=y
-CONFIG_CPU_MIPSR1=y
+CONFIG_SYS_HAS_CPU_R4X00=y
+CONFIG_SYS_HAS_CPU_R5000=y
 CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
 
 #
 # Kernel type
@@ -111,14 +121,17 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_BOARD_SCACHE=y
+CONFIG_IP22_CPU_SCACHE=y
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
@@ -128,6 +141,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -140,6 +154,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -172,10 +187,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -212,8 +229,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
-CONFIG_HW_HAS_PCI=y
-CONFIG_PCI=y
+CONFIG_HW_HAS_EISA=y
+# CONFIG_EISA is not set
 CONFIG_MMU=y
 
 #
@@ -224,7 +241,6 @@ CONFIG_MMU=y
 #
 # PCI Hotplug Support
 #
-# CONFIG_HOTPLUG_PCI is not set
 
 #
 # Executable file formats
@@ -245,6 +261,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
@@ -263,6 +281,8 @@ CONFIG_IP_PNP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -281,7 +301,10 @@ CONFIG_IPV6_ROUTE_INFO=y
 # CONFIG_INET6_IPCOMP is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
 # CONFIG_IPV6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -294,6 +317,7 @@ CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -301,10 +325,13 @@ CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -374,6 +401,7 @@ CONFIG_NET_CLS_ROUTE=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -397,16 +425,10 @@ CONFIG_FW_LOADER=y
 #
 # Block devices
 #
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=8192
@@ -436,40 +458,9 @@ CONFIG_IDEDISK_MULTI_MODE=y
 # IDE chipset support/bugfixes
 #
 CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-# CONFIG_BLK_DEV_GENERIC is not set
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-CONFIG_BLK_DEV_CMD64X=y
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_SC1200 is not set
-# CONFIG_BLK_DEV_PIIX is not set
-# CONFIG_BLK_DEV_IT821X is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_PDC202XX_OLD is not set
-# CONFIG_BLK_DEV_PDC202XX_NEW is not set
-# CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIIMAGE is not set
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
 # CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
 
 #
@@ -508,36 +499,8 @@ CONFIG_SCSI_ISCSI_ATTRS=m
 # SCSI low-level drivers
 #
 CONFIG_ISCSI_TCP=m
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SGIWD93_SCSI is not set
 # CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
@@ -549,19 +512,14 @@ CONFIG_AIC7XXX_DEBUG_MASK=0
 # Fusion MPT device support
 #
 # CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
-# CONFIG_FUSION_SAS is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
 
 #
 # I2O device support
 #
-# CONFIG_I2O is not set
 
 #
 # Network device support
@@ -572,11 +530,6 @@ CONFIG_NETDEVICES=y
 # CONFIG_EQUALIZER is not set
 CONFIG_TUN=m
 
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
 #
 # PHY device support
 #
@@ -587,71 +540,20 @@ CONFIG_TUN=m
 #
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_CASSINI is not set
-# CONFIG_NET_VENDOR_3COM is not set
 # CONFIG_DM9000 is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-# CONFIG_PCNET32 is not set
-# CONFIG_AMD8111_ETH is not set
-# CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_B44 is not set
-# CONFIG_FORCEDETH is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-# CONFIG_E100 is not set
-# CONFIG_FEALNX is not set
-CONFIG_NATSEMI=y
-# CONFIG_NE2K_PCI is not set
-# CONFIG_8139CP is not set
-CONFIG_8139TOO=y
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 is not set
-# CONFIG_8139_OLD_RX_RESET is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_TLAN is not set
-# CONFIG_VIA_RHINE is not set
-# CONFIG_LAN_SAA9730 is not set
+# CONFIG_SGISEEQ is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_VIA_VELOCITY is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
 
 #
 # Ethernet (10000 Mbit)
 #
-# CONFIG_CHELSIO_T1 is not set
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
 
 #
 # Token Ring devices
 #
-# CONFIG_TR is not set
 
 #
 # Wireless LAN (non-hamradio)
@@ -662,8 +564,6 @@ CONFIG_8139TOO=y
 # Wan interfaces
 #
 # CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
 CONFIG_PPP=m
 # CONFIG_PPP_MULTILINK is not set
 # CONFIG_PPP_FILTER is not set
@@ -674,7 +574,6 @@ CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_MPPE=m
 # CONFIG_PPPOE is not set
 # CONFIG_SLIP is not set
-# CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
@@ -730,7 +629,6 @@ CONFIG_MOUSE_PS2=y
 CONFIG_SERIO=y
 CONFIG_SERIO_I8042=y
 CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_PCIPS2 is not set
 CONFIG_SERIO_LIBPS2=y
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
@@ -741,6 +639,7 @@ CONFIG_SERIO_LIBPS2=y
 CONFIG_VT=y
 # CONFIG_VT_CONSOLE is not set
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_COMPUTONE is not set
 # CONFIG_ROCKETPORT is not set
@@ -750,7 +649,6 @@ CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_MOXA_SMARTIO is not set
 # CONFIG_ISI is not set
 # CONFIG_SYNCLINKMP is not set
-# CONFIG_SYNCLINK_GT is not set
 # CONFIG_N_HDLC is not set
 # CONFIG_RISCOM8 is not set
 # CONFIG_SPECIALIX is not set
@@ -766,8 +664,7 @@ CONFIG_SERIAL_NONSTANDARD=y
 #
 # Non-8250 serial port support
 #
-# CONFIG_SERIAL_IP3106 is not set
-# CONFIG_SERIAL_JSM is not set
+# CONFIG_SERIAL_IP22_ZILOG is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -781,16 +678,16 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
+# CONFIG_SGI_DS1286 is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
 
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
@@ -811,29 +708,14 @@ CONFIG_I2C_CHARDEV=m
 CONFIG_I2C_ALGOBIT=m
 # CONFIG_I2C_ALGOPCF is not set
 # CONFIG_I2C_ALGOPCA is not set
+# CONFIG_I2C_ALGO_SGI is not set
 
 #
 # I2C Hardware Bus support
 #
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-# CONFIG_I2C_AMD8111 is not set
-# CONFIG_I2C_I801 is not set
-# CONFIG_I2C_I810 is not set
-# CONFIG_I2C_PIIX4 is not set
-# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_OCORES is not set
 # CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
 # CONFIG_I2C_STUB is not set
-# CONFIG_I2C_VIA is not set
-# CONFIG_I2C_VIAPRO is not set
-# CONFIG_I2C_VOODOO3 is not set
 # CONFIG_I2C_PCA_ISA is not set
 
 #
@@ -860,13 +742,13 @@ CONFIG_I2C_ALGOBIT=m
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
 #
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
 # CONFIG_SENSORS_ADM1026 is not set
@@ -893,12 +775,11 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT8231 is not set
 # CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
 # CONFIG_SENSORS_W83792D is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83627HF is not set
@@ -913,50 +794,33 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
 #
 # CONFIG_DVB is not set
-# CONFIG_USB_DABUSB is not set
 
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
 # CONFIG_FB_CFB_FILLRECT is not set
 # CONFIG_FB_CFB_COPYAREA is not set
 # CONFIG_FB_CFB_IMAGEBLIT is not set
 # CONFIG_FB_MACMODES is not set
-CONFIG_FB_FIRMWARE_EDID=y
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_CIRRUS is not set
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
 # CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_NVIDIA is not set
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_SMIVGX is not set
-# CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_VIRTUAL is not set
 
 #
 # Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
+# CONFIG_SGI_NEWPORT_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
 # CONFIG_FRAMEBUFFER_CONSOLE is not set
 
@@ -974,123 +838,14 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # USB support
 #
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-# CONFIG_USB_EHCI_HCD is not set
-# CONFIG_USB_ISP116X_HCD is not set
-# CONFIG_USB_OHCI_HCD is not set
-# CONFIG_USB_UHCI_HCD is not set
-# CONFIG_USB_SL811_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 #
 
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=y
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_DPCM is not set
-# CONFIG_USB_STORAGE_USBAT is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_SDDR55 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_STORAGE_ALAUDA is not set
-# CONFIG_USB_STORAGE_ONETOUCH is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-# CONFIG_HID_FF is not set
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_TOUCHSCREEN is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
 #
 # USB Gadget Support
 #
@@ -1117,7 +872,6 @@ CONFIG_USB_MON=y
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
 
 #
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
@@ -1128,6 +882,19 @@ CONFIG_USB_MON=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -1145,7 +912,6 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_SECURITY is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -1154,6 +920,7 @@ CONFIG_XFS_EXPORT=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
@@ -1226,6 +993,7 @@ CONFIG_SUNRPC=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1236,6 +1004,7 @@ CONFIG_SMB_FS=m
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
+CONFIG_SGI_PARTITION=y
 
 #
 # Native Language Support
@@ -1291,6 +1060,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1349,3 +1119,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index db8701344cee416e33f72d072586aab46f268b82..6a63a113b7ea6a8ddc6d74711caaa82ef58d5ae9 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:15 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:18 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 CONFIG_QEMU=y
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_COHERENT=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_I8259=y
@@ -113,7 +117,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -121,11 +128,12 @@ CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_SMP is not set
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 CONFIG_HZ_100=y
 # CONFIG_HZ_128 is not set
@@ -138,6 +146,7 @@ CONFIG_HZ=100
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -171,6 +180,7 @@ CONFIG_ELF_CORE=y
 # CONFIG_EPOLL is not set
 # CONFIG_SHMEM is not set
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TINY_SHMEM=y
 CONFIG_BASE_SMALL=1
 # CONFIG_SLOB is not set
@@ -235,6 +245,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -253,6 +265,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -260,6 +274,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_VLAN_8021Q is not set
@@ -292,6 +307,7 @@ CONFIG_TCP_CONG_BIC=y
 CONFIG_STANDALONE=y
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -473,6 +489,7 @@ CONFIG_INPUT=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -502,6 +519,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -546,6 +564,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -555,6 +574,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -616,6 +636,19 @@ CONFIG_DUMMY_CONSOLE=y
 # Real Time Clock
 #
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -628,6 +661,7 @@ CONFIG_DUMMY_CONSOLE=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 # CONFIG_DNOTIFY is not set
 # CONFIG_AUTOFS_FS is not set
@@ -682,6 +716,7 @@ CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 
@@ -701,6 +736,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
index b16731f3684b9829c98b930d076ecd2d75f4bcee..6779f449bd2d8d5f45328dc3431745511b00826d 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:16 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:19 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -72,6 +75,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_GENERIC_ISA_DMA=y
@@ -122,7 +126,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -136,6 +143,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -148,6 +156,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -184,10 +193,10 @@ CONFIG_BASE_FULL=y
 # CONFIG_EPOLL is not set
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=y
 
 #
 # Loadable module support
@@ -255,6 +264,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -274,6 +285,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -292,7 +305,10 @@ CONFIG_IPV6_ROUTE_INFO=y
 # CONFIG_INET6_IPCOMP is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
 # CONFIG_IPV6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -307,6 +323,7 @@ CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -314,10 +331,13 @@ CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -394,6 +414,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -624,6 +645,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -704,6 +727,7 @@ CONFIG_NET_PCI=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -729,7 +753,7 @@ CONFIG_NET_RADIO=y
 # CONFIG_IPW2100 is not set
 CONFIG_IPW2200=m
 # CONFIG_IPW2200_MONITOR is not set
-# CONFIG_IPW_QOS is not set
+# CONFIG_IPW2200_QOS is not set
 # CONFIG_IPW2200_DEBUG is not set
 # CONFIG_HERMES is not set
 # CONFIG_ATMEL is not set
@@ -738,8 +762,10 @@ CONFIG_IPW2200=m
 # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
 #
 # CONFIG_PRISM54 is not set
+# CONFIG_USB_ZD1201 is not set
 # CONFIG_HOSTAP is not set
 # CONFIG_BCM43XX is not set
+# CONFIG_ZD1211RW is not set
 CONFIG_NET_WIRELESS=y
 
 #
@@ -827,6 +853,7 @@ CONFIG_SERIO_LIBPS2=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -856,6 +883,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -895,6 +923,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_F71805F is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
@@ -906,6 +935,7 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -916,12 +946,13 @@ CONFIG_HWMON=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_MACMODES is not set
-CONFIG_FB_FIRMWARE_EDID=y
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
 # CONFIG_FB_CIRRUS is not set
@@ -1045,7 +1076,6 @@ CONFIG_USB_YEALINK=m
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_RTL8150 is not set
 # CONFIG_USB_USBNET is not set
-# CONFIG_USB_ZD1201 is not set
 CONFIG_USB_MON=y
 
 #
@@ -1067,10 +1097,12 @@ CONFIG_USB_MON=y
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
+# CONFIG_USB_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
 # CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_LD is not set
 
 #
@@ -1114,6 +1146,19 @@ CONFIG_USB_MON=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -1134,7 +1179,6 @@ CONFIG_REISERFS_FS=m
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_SECURITY is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -1143,6 +1187,7 @@ CONFIG_XFS_EXPORT=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 # CONFIG_DNOTIFY is not set
 # CONFIG_AUTOFS_FS is not set
@@ -1193,6 +1238,7 @@ CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
 CONFIG_JFFS2_FS_WRITEBUFFER=y
 # CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -1226,6 +1272,7 @@ CONFIG_SUNRPC=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1291,6 +1338,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
index 8b0dd8651264bbdb1f504e8ac44debc4c80aeac0..b7826d3a2b77d0366d28c786dff02eb627df1f37 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:16 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:19 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_ARC=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_DMA_NONCOHERENT=y
@@ -106,6 +110,7 @@ CONFIG_CPU_R4X00=y
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 CONFIG_SYS_HAS_CPU_R4X00=y
+CONFIG_SYS_HAS_CPU_R5000=y
 CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
 CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
@@ -120,7 +125,12 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_BOARD_SCACHE=y
+CONFIG_R5000_CPU_SCACHE=y
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -136,6 +146,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -148,6 +159,7 @@ CONFIG_HZ=1000
 # CONFIG_PREEMPT_NONE is not set
 CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -181,10 +193,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -280,6 +294,8 @@ CONFIG_IP_PIMSM_V2=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -298,7 +314,10 @@ CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
 CONFIG_INET6_XFRM_TUNNEL=m
 CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
 CONFIG_IPV6_TUNNEL=m
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 CONFIG_BRIDGE_NETFILTER=y
@@ -315,6 +334,8 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
+# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
@@ -329,9 +350,11 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -341,6 +364,7 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_IP_NF_CONNTRACK=m
 # CONFIG_IP_NF_CT_ACCT is not set
 CONFIG_IP_NF_CONNTRACK_MARK=y
+CONFIG_IP_NF_CONNTRACK_SECMARK=y
 CONFIG_IP_NF_CONNTRACK_EVENTS=y
 CONFIG_IP_NF_CONNTRACK_NETLINK=m
 CONFIG_IP_NF_CT_PROTO_SCTP=m
@@ -351,6 +375,7 @@ CONFIG_IP_NF_TFTP=m
 CONFIG_IP_NF_AMANDA=m
 CONFIG_IP_NF_PPTP=m
 CONFIG_IP_NF_H323=m
+CONFIG_IP_NF_SIP=m
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
@@ -381,6 +406,7 @@ CONFIG_IP_NF_NAT_TFTP=m
 CONFIG_IP_NF_NAT_AMANDA=m
 CONFIG_IP_NF_NAT_PPTP=m
 CONFIG_IP_NF_NAT_H323=m
+CONFIG_IP_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
@@ -559,6 +585,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -580,6 +607,7 @@ CONFIG_PARPORT_SERIAL=m
 # CONFIG_PARPORT_PC_SUPERIO is not set
 CONFIG_PARPORT_NOT_PC=y
 # CONFIG_PARPORT_GSC is not set
+# CONFIG_PARPORT_AX88796 is not set
 CONFIG_PARPORT_1284=y
 
 #
@@ -699,6 +727,7 @@ CONFIG_MEGARAID_MAILBOX=m
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -745,9 +774,8 @@ CONFIG_MD_LINEAR=m
 CONFIG_MD_RAID0=m
 CONFIG_MD_RAID1=m
 CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
+CONFIG_MD_RAID456=m
 CONFIG_MD_RAID5_RESHAPE=y
-# CONFIG_MD_RAID6 is not set
 CONFIG_MD_MULTIPATH=m
 CONFIG_MD_FAULTY=m
 CONFIG_BLK_DEV_DM=m
@@ -803,6 +831,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -884,6 +914,7 @@ CONFIG_VIA_VELOCITY=m
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -975,6 +1006,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -1012,6 +1044,7 @@ CONFIG_TIPAR=m
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 CONFIG_RTC=m
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -1045,12 +1078,13 @@ CONFIG_RTC=m
 # Dallas's 1-wire bus
 #
 CONFIG_W1=m
+CONFIG_W1_CON=y
 
 #
 # 1-wire Bus Masters
 #
 # CONFIG_W1_MASTER_MATROX is not set
-# CONFIG_W1_MASTER_DS9490 is not set
+# CONFIG_W1_MASTER_DS2490 is not set
 
 #
 # 1-wire Slaves
@@ -1073,6 +1107,7 @@ CONFIG_W1=m
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -1083,6 +1118,7 @@ CONFIG_USB_DABUSB=m
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -1121,6 +1157,7 @@ CONFIG_USB_DEVICEFS=y
 CONFIG_USB_EHCI_HCD=m
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
 # CONFIG_USB_ISP116X_HCD is not set
 CONFIG_USB_OHCI_HCD=m
 # CONFIG_USB_OHCI_BIG_ENDIAN is not set
@@ -1219,6 +1256,7 @@ CONFIG_USB_SERIAL=m
 CONFIG_USB_SERIAL_GENERIC=y
 CONFIG_USB_SERIAL_AIRPRIME=m
 CONFIG_USB_SERIAL_ANYDATA=m
+# CONFIG_USB_SERIAL_ARK3116 is not set
 CONFIG_USB_SERIAL_BELKIN=m
 CONFIG_USB_SERIAL_WHITEHEAT=m
 CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
@@ -1259,6 +1297,7 @@ CONFIG_USB_SERIAL_SAFE_PADDED=y
 # CONFIG_USB_SERIAL_TI is not set
 CONFIG_USB_SERIAL_CYBERJACK=m
 CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
 CONFIG_USB_SERIAL_OMNINET=m
 CONFIG_USB_EZUSB=y
 
@@ -1272,10 +1311,12 @@ CONFIG_USB_RIO500=m
 CONFIG_USB_LEGOTOWER=m
 CONFIG_USB_LCD=m
 CONFIG_USB_LED=m
+# CONFIG_USB_CY7C63 is not set
 CONFIG_USB_CYTHERM=m
 CONFIG_USB_PHIDGETKIT=m
 CONFIG_USB_PHIDGETSERVO=m
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_APPLEDISPLAY is not set
 CONFIG_USB_SISUSBVGA=m
 # CONFIG_USB_SISUSBVGA_CON is not set
 CONFIG_USB_LD=m
@@ -1322,6 +1363,19 @@ CONFIG_USB_TEST=m
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -1344,7 +1398,6 @@ CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
 CONFIG_XFS_QUOTA=y
 CONFIG_XFS_SECURITY=y
 # CONFIG_XFS_POSIX_ACL is not set
@@ -1353,6 +1406,7 @@ CONFIG_XFS_SECURITY=y
 CONFIG_MINIX_FS=m
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
@@ -1411,6 +1465,8 @@ CONFIG_HPFS_FS=m
 CONFIG_QNX4FS_FS=m
 CONFIG_SYSV_FS=m
 CONFIG_UFS_FS=m
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_UFS_DEBUG is not set
 
 #
 # Network File Systems
@@ -1437,7 +1493,9 @@ CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 CONFIG_CIFS=m
 # CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
 # CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_CIFS_EXPERIMENTAL is not set
 CONFIG_NCP_FS=m
 CONFIG_NCPFS_PACKET_SIGNING=y
@@ -1529,6 +1587,7 @@ CONFIG_NLS_UTF8=m
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1588,3 +1647,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index ff34ed66fe6594ab0941fda18872e60939ab38d5..625c1c619b6be225f58932874f3b3990acf9b71c 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:17 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:19 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -82,6 +85,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_COHERENT=y
 CONFIG_CPU_BIG_ENDIAN=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
@@ -130,12 +134,16 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_SIBYTE_DMA_PAGEOPS is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_SB1_PASS_1_WORKAROUNDS=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_IRQ_PER_CPU=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_SYS_SUPPORTS_HIGHMEM=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -147,6 +155,10 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
+CONFIG_SMP=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_NR_CPUS=2
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -156,12 +168,11 @@ CONFIG_HZ_1000=y
 # CONFIG_HZ_1024 is not set
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_HZ=1000
-CONFIG_SMP=y
-CONFIG_NR_CPUS=2
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -194,10 +205,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -292,6 +305,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -299,6 +314,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -358,6 +374,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -479,6 +496,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -522,6 +541,7 @@ CONFIG_NET_SB1250_MAC=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -589,6 +609,7 @@ CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_N_HDLC is not set
 # CONFIG_SPECIALIX is not set
 # CONFIG_SX is not set
+# CONFIG_RIO is not set
 # CONFIG_STALDRV is not set
 CONFIG_SIBYTE_SB1250_DUART=y
 CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y
@@ -615,6 +636,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -663,6 +685,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -672,6 +695,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -728,6 +752,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -746,6 +783,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -811,6 +849,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -837,6 +876,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=15
 # CONFIG_DEBUG_FS is not set
@@ -893,3 +933,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
index 77edeae7f018d1eef71f1816c480bbd0d5ed5ea6..4401b602118f0e19a83725c1def2dfb6aade9455 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:17 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:20 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 CONFIG_MIPS_SEAD=y
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS_SEAD=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -116,7 +120,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -132,6 +139,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -144,6 +152,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -173,10 +182,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -242,6 +253,7 @@ CONFIG_TRAD_SIGNALS=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -355,6 +367,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -385,7 +398,6 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -401,6 +413,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -409,6 +422,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -463,6 +477,19 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -477,6 +504,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -556,6 +584,7 @@ CONFIG_PARTITION_ADVANCED=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -585,3 +614,4 @@ CONFIG_CMDLINE=""
 CONFIG_CRC16=y
 # CONFIG_CRC32 is not set
 # CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
index 6aa229d548510b4df6cd13b09bd44472232b0ecc..2ba4e25e8c34e8c7f63508af4ea3190ace23b035 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Tue Apr 25 00:08:41 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:20 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 CONFIG_MACH_VR41XX=y
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -75,6 +78,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -119,7 +123,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -132,6 +139,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -144,6 +152,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -175,10 +184,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -249,6 +260,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -274,6 +287,8 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -281,6 +296,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -334,6 +350,7 @@ CONFIG_TCP_CONG_BIC=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -427,6 +444,7 @@ CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_IPS is not set
@@ -492,6 +510,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -554,6 +574,7 @@ CONFIG_E100=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -624,6 +645,7 @@ CONFIG_INPUT=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -652,6 +674,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -702,6 +725,7 @@ CONFIG_GPIO_VR41XX=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -712,6 +736,7 @@ CONFIG_GPIO_VR41XX=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -748,6 +773,7 @@ CONFIG_USB_DEVICEFS=y
 CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
 # CONFIG_USB_ISP116X_HCD is not set
 CONFIG_USB_OHCI_HCD=y
 # CONFIG_USB_OHCI_BIG_ENDIAN is not set
@@ -838,10 +864,12 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
+# CONFIG_USB_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
 # CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
 # CONFIG_USB_TEST is not set
@@ -896,13 +924,30 @@ CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
 CONFIG_RTC_INTF_SYSFS=y
 CONFIG_RTC_INTF_PROC=y
 CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
 
 #
 # RTC drivers
 #
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
 CONFIG_RTC_DRV_VR41XX=y
 # CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
@@ -919,6 +964,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -989,6 +1035,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1015,6 +1062,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1044,3 +1092,4 @@ CONFIG_CMDLINE="mem=32M console=ttyVR0,115200"
 # CONFIG_CRC32 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=m
+CONFIG_PLIST=y
index a187b1f0004cec3cd94a7c5876198830e698e5c2..fc8a407c1addad2de7e925ce0310f0639b533676 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Tue Apr 25 00:08:59 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:20 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 CONFIG_MACH_VR41XX=y
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -75,6 +78,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -119,7 +123,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -132,6 +139,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -144,6 +152,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -175,10 +184,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -249,6 +260,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -275,6 +288,8 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -282,6 +297,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -335,6 +351,7 @@ CONFIG_TCP_CONG_BIC=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -433,6 +450,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -476,6 +495,7 @@ CONFIG_R8169=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -545,6 +565,7 @@ CONFIG_INPUT=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -573,6 +594,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -607,7 +629,6 @@ CONFIG_GPIO_VR41XX=y
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -623,6 +644,7 @@ CONFIG_GPIO_VR41XX=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -633,6 +655,7 @@ CONFIG_GPIO_VR41XX=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -669,6 +692,7 @@ CONFIG_USB_DEVICEFS=y
 CONFIG_USB_EHCI_HCD=m
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
 # CONFIG_USB_ISP116X_HCD is not set
 CONFIG_USB_OHCI_HCD=m
 # CONFIG_USB_OHCI_BIG_ENDIAN is not set
@@ -749,10 +773,12 @@ CONFIG_USB_MON=y
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
+# CONFIG_USB_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
 # CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
 # CONFIG_USB_TEST is not set
@@ -807,13 +833,30 @@ CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
 CONFIG_RTC_INTF_SYSFS=y
 CONFIG_RTC_INTF_PROC=y
 CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
 
 #
 # RTC drivers
 #
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
 CONFIG_RTC_DRV_VR41XX=y
 # CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
@@ -830,6 +873,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -900,6 +944,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -926,6 +971,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -955,3 +1001,4 @@ CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=m
+CONFIG_PLIST=y
index 258457fcbe11e22e595c2b4d603244a825896258..effcb63b81a327edc78c83f46c0282c780c3ad0b 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Tue Apr 25 00:09:17 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:21 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 CONFIG_MACH_VR41XX=y
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -120,7 +123,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -133,6 +139,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -145,6 +152,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -176,10 +184,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -250,6 +260,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -276,6 +288,8 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 CONFIG_TCP_CONG_ADVANCED=y
@@ -291,9 +305,13 @@ CONFIG_TCP_CONG_HTCP=m
 # CONFIG_TCP_CONG_HYBLA is not set
 # CONFIG_TCP_CONG_VEGAS is not set
 # CONFIG_TCP_CONG_SCALABLE is not set
+# CONFIG_TCP_CONG_LP is not set
+# CONFIG_TCP_CONG_VENO is not set
+# CONFIG_TCP_CONG_COMPOUND is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -347,6 +365,7 @@ CONFIG_TCP_CONG_HTCP=m
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -492,6 +511,7 @@ CONFIG_BLK_DEV_SD=y
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_IPS is not set
@@ -548,7 +568,6 @@ CONFIG_IEEE1394_OHCI1394=m
 #
 CONFIG_IEEE1394_VIDEO1394=m
 CONFIG_IEEE1394_SBP2=m
-# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
 CONFIG_IEEE1394_ETH1394=m
 CONFIG_IEEE1394_DV1394=m
 CONFIG_IEEE1394_RAWIO=m
@@ -619,6 +638,7 @@ CONFIG_R8169=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -689,6 +709,7 @@ CONFIG_INPUT=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -717,6 +738,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -751,7 +773,6 @@ CONFIG_GPIO_VR41XX=y
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -767,6 +788,7 @@ CONFIG_GPIO_VR41XX=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -777,12 +799,13 @@ CONFIG_GPIO_VR41XX=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_MACMODES is not set
-CONFIG_FB_FIRMWARE_EDID=y
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
 # CONFIG_FB_CIRRUS is not set
@@ -848,6 +871,7 @@ CONFIG_USB=m
 CONFIG_USB_EHCI_HCD=m
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
 # CONFIG_USB_ISP116X_HCD is not set
 CONFIG_USB_OHCI_HCD=m
 # CONFIG_USB_OHCI_BIG_ENDIAN is not set
@@ -943,10 +967,12 @@ CONFIG_USB_MON=y
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
+# CONFIG_USB_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
 # CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
 
@@ -991,6 +1017,19 @@ CONFIG_USB_MON=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -1016,6 +1055,7 @@ CONFIG_XFS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_QUOTACTL=y
 # CONFIG_DNOTIFY is not set
@@ -1082,6 +1122,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1108,6 +1149,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1137,3 +1179,4 @@ CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=m
+CONFIG_PLIST=y
index 68af54f746e124c72aa037acb4f727c341e5dca5..4891d02ef8caba5a7f9ede6293dbfd9ce5a9ed9d 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Tue Apr 25 00:09:33 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:21 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 CONFIG_MACH_VR41XX=y
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -71,6 +74,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 # CONFIG_CPU_BIG_ENDIAN is not set
@@ -115,7 +119,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -128,6 +135,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -140,6 +148,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -171,10 +180,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -273,6 +284,8 @@ CONFIG_IP_FIB_HASH=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -280,6 +293,7 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -334,6 +348,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -452,6 +467,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -586,6 +603,7 @@ CONFIG_INPUT=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -613,6 +631,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
@@ -667,6 +686,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -676,6 +696,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -737,6 +758,19 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -755,6 +789,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -820,6 +855,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -846,6 +882,7 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -874,3 +911,4 @@ CONFIG_CMDLINE="console=ttyVR0,19200 mem=16M"
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
index 40572a3c8cac30ada0e38113f83d223b81472747..3e4b16b39827b5961ed891f1efc1e58abfdf52bc 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16.11
-# Fri May  5 17:11:22 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:21 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -46,6 +47,7 @@ CONFIG_WR_PPMC=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -63,7 +65,10 @@ CONFIG_WR_PPMC=y
 # CONFIG_TOSHIBA_RBTX4927 is not set
 # CONFIG_TOSHIBA_RBTX4938 is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_CPU_BIG_ENDIAN=y
@@ -119,9 +124,11 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
-# CONFIG_CPU_ADVANCED is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -136,6 +143,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -148,6 +156,7 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -169,6 +178,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+# CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_EMBEDDED=y
@@ -179,14 +189,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 # CONFIG_EPOLL is not set
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -197,7 +205,6 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 # CONFIG_KMOD is not set
@@ -206,6 +213,8 @@ CONFIG_MODULE_SRCVERSION_ALL=y
 # Block layer
 #
 # CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
 
 #
 # IO Schedulers
@@ -225,7 +234,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
-CONFIG_PCI_LEGACY_PROC=y
 CONFIG_MMU=y
 
 #
@@ -260,6 +268,8 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -279,12 +289,18 @@ CONFIG_ARPD=y
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_BIC=y
 # CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 
 #
@@ -338,6 +354,7 @@ CONFIG_TCP_CONG_BIC=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -434,6 +451,8 @@ CONFIG_PHYLIB=y
 # CONFIG_QSEMI_PHY is not set
 # CONFIG_LXT_PHY is not set
 # CONFIG_CICADA_PHY is not set
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -496,6 +515,7 @@ CONFIG_E100=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -552,6 +572,7 @@ CONFIG_E100=y
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
 CONFIG_SERIAL_8250_NR_UARTS=1
 CONFIG_SERIAL_8250_RUNTIME_UARTS=1
 # CONFIG_SERIAL_8250_EXTENDED is not set
@@ -575,6 +596,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 CONFIG_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -606,13 +628,13 @@ CONFIG_RTC=y
 #
 # Dallas's 1-wire bus
 #
-# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
 #
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_F71805F is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
@@ -620,14 +642,11 @@ CONFIG_HWMON=y
 # Misc devices
 #
 
-#
-# Multimedia Capabilities Port drivers
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -637,6 +656,7 @@ CONFIG_HWMON=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -649,6 +669,7 @@ CONFIG_HWMON=y
 #
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_USB is not set
 
 #
@@ -665,6 +686,19 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 #
 # CONFIG_MMC is not set
 
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
 #
 # InfiniBand support
 #
@@ -674,6 +708,24 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
 #
 
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -687,6 +739,7 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -715,7 +768,6 @@ CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
 # CONFIG_CONFIGFS_FS is not set
 
 #
@@ -753,6 +805,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -779,8 +832,10 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_DEBUG_FS is not set
 CONFIG_CROSSCOMPILE=y
 CONFIG_CMDLINE="console=ttyS0,115200n8"
 
@@ -806,3 +861,4 @@ CONFIG_CRC_CCITT=y
 CONFIG_CRC16=y
 CONFIG_CRC32=y
 CONFIG_LIBCRC32C=y
+CONFIG_PLIST=y
index 7ece2c008e9b5644381e8e249e3ef68cbbb23cb6..3a68d8a25b661fb6506d7aede28cf383ed9d2fa4 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:51:20 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 10:04:21 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 # CONFIG_MACH_VR41XX is not set
 CONFIG_PMC_YOSEMITE=y
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -66,6 +69,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_DMA_COHERENT=y
 CONFIG_CPU_BIG_ENDIAN=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
@@ -114,12 +118,16 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_16KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_IRQ_PER_CPU=y
 CONFIG_HIGHMEM=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_SYS_SUPPORTS_HIGHMEM=y
@@ -128,6 +136,10 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_SMP=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_NR_CPUS=2
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -137,12 +149,11 @@ CONFIG_HZ_1000=y
 # CONFIG_HZ_1024 is not set
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_HZ=1000
-CONFIG_SMP=y
-CONFIG_NR_CPUS=2
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -175,10 +186,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -268,6 +281,8 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -280,7 +295,10 @@ CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
 CONFIG_INET6_XFRM_TUNNEL=m
 CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
 CONFIG_IPV6_TUNNEL=m
+CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_VLAN_8021Q is not set
@@ -317,6 +335,7 @@ CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -411,6 +430,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
 
 #
 # Ethernet (10 or 100Mbit)
@@ -452,6 +473,7 @@ CONFIG_TITAN_GE=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
 
 #
 # Token Ring devices
@@ -529,6 +551,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 CONFIG_GEN_RTC=y
 CONFIG_GEN_RTC_X=y
@@ -576,6 +599,7 @@ CONFIG_GEN_RTC_X=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -585,6 +609,7 @@ CONFIG_GEN_RTC_X=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
 
 #
@@ -640,6 +665,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # Real Time Clock
 #
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -652,6 +690,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -704,6 +743,7 @@ CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 
@@ -723,14 +763,19 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_HIGHMEM is not set
 # CONFIG_DEBUG_INFO is not set
@@ -793,3 +838,4 @@ CONFIG_CRC32=m
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
index 22fb94b7c4409bef1cd197602183c2b00c33de3f..513fc6722d8469b69601c60946270658596cac97 100644 (file)
@@ -74,7 +74,6 @@ set_pci_int_attr(u32 pci, u32 intn, u32 active, u32 trigger)
 
 extern void vrc5477_irq_init(u32 base);
 extern void mips_cpu_irq_init(u32 base);
-extern int setup_irq(unsigned int irq, struct irqaction *irqaction);
 static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL };
 
 void __init arch_init_irq(void)
index 63c3d6534b3a108bd8d87d11838d585fea80e790..ba52705a2738eda789f962c382e441ccea29cf77 100644 (file)
@@ -89,7 +89,7 @@ vrc5477_irq_end(unsigned int irq)
                ll_vrc5477_irq_enable( irq - vrc5477_irq_base);
 }
 
-hw_irq_controller vrc5477_irq_controller = {
+struct irq_chip vrc5477_irq_controller = {
        .typename = "vrc5477_irq",
        .startup = vrc5477_irq_startup,
        .shutdown = vrc5477_irq_shutdown,
index 47ba0b6f210f70961c60bf350bd64dc8f6fd52d8..f0cc0e8a8afa532338be1f3754173ddd41e3b321 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/sched.h>
 #include <linux/pci.h>
 #include <linux/ide.h>
+#include <linux/irq.h>
 #include <linux/fs.h>
 #include <linux/ioport.h>
 #include <linux/param.h>       /* for HZ */
@@ -146,9 +147,7 @@ static void __init ddb_time_init(void)
        mips_hpt_frequency = bus_frequency*(i+4)/4;
 }
 
-extern int setup_irq(unsigned int irq, struct irqaction *irqaction);
-
-static void __init ddb_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
 #if defined(USE_CPU_COUNTER_TIMER)
 
@@ -178,7 +177,6 @@ void __init plat_mem_setup(void)
        set_io_port_base(KSEG1ADDR(DDB_PCI_IO_BASE));
 
        board_time_init = ddb_time_init;
-       board_timer_setup = ddb_timer_setup;
 
        _machine_restart = ddb_machine_restart;
        _machine_halt = ddb_machine_halt;
index da2dbb42f913fc21bfd7dd0177d5ec393ae5a82c..41cd2a96148bcdf948edbe5fcec24c1c7485d110 100644 (file)
@@ -93,7 +93,7 @@ static inline void end_ioasic_irq(unsigned int irq)
                enable_ioasic_irq(irq);
 }
 
-static struct hw_interrupt_type ioasic_irq_type = {
+static struct irq_chip ioasic_irq_type = {
        .typename = "IO-ASIC",
        .startup = startup_ioasic_irq,
        .shutdown = shutdown_ioasic_irq,
@@ -121,7 +121,7 @@ static inline void end_ioasic_dma_irq(unsigned int irq)
        end_ioasic_irq(irq);
 }
 
-static struct hw_interrupt_type ioasic_dma_irq_type = {
+static struct irq_chip ioasic_dma_irq_type = {
        .typename = "IO-ASIC-DMA",
        .startup = startup_ioasic_dma_irq,
        .shutdown = shutdown_ioasic_dma_irq,
index d44c00d9e80fa973f32100d4e8c192d4d53b741c..04a367a60a5758126a6d6317cfe77add97ff984b 100644 (file)
@@ -94,7 +94,7 @@ static void end_kn02_irq(unsigned int irq)
                enable_kn02_irq(irq);
 }
 
-static struct hw_interrupt_type kn02_irq_type = {
+static struct irq_chip kn02_irq_type = {
        .typename = "KN02-CSR",
        .startup = startup_kn02_irq,
        .shutdown = shutdown_kn02_irq,
index 2684f121784b7239957baf95c0c65408853a4a11..d43241c2f5414bd94cee8eb55d7aced5e9828805 100644 (file)
@@ -145,13 +145,11 @@ static void __init dec_be_init(void)
 
 
 extern void dec_time_init(void);
-extern void dec_timer_setup(struct irqaction *);
 
 void __init plat_mem_setup(void)
 {
        board_be_init = dec_be_init;
        board_time_init = dec_time_init;
-       board_timer_setup = dec_timer_setup;
 
        wbflush_setup();
 
index 76e4d09ff4d2bc55ddd11acee8d5b25b5d28f509..57294740c2dd2bd9130a5763fdc3f195c36723ef 100644 (file)
@@ -186,7 +186,7 @@ void __init dec_time_init(void)
 
 EXPORT_SYMBOL(do_settimeofday);
 
-void __init dec_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        setup_irq(dec_interrupt[DEC_IRQ_RTC], irq);
 
index 879ba1ad99caf2076bc7c56a302c6166679d02c9..fff6fcc96212e65b9f252d1c6790b4c2aeb3d3bb 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-rc2
-# Mon Apr 24 14:50:54 2006
+# Linux kernel version: 2.6.18-rc1
+# Thu Jul  6 09:49:33 2006
 #
 CONFIG_MIPS=y
 
@@ -21,6 +21,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_DB1550 is not set
 # CONFIG_MIPS_DB1200 is not set
 # CONFIG_MIPS_MIRAGE is not set
+# CONFIG_BASLER_EXCITE is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MIPS_EV64120 is not set
@@ -32,6 +33,7 @@ CONFIG_MIPS=y
 # CONFIG_MIPS_ATLAS is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SEAD is not set
+# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
 # CONFIG_MOMENCO_OCELOT is not set
@@ -45,6 +47,7 @@ CONFIG_MIPS=y
 # CONFIG_MACH_VR41XX is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_QEMU is not set
+# CONFIG_MARKEINS is not set
 CONFIG_SGI_IP22=y
 # CONFIG_SGI_IP27 is not set
 # CONFIG_SGI_IP32 is not set
@@ -65,6 +68,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_ARC=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
@@ -119,7 +123,10 @@ CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_BOARD_SCACHE=y
 CONFIG_IP22_CPU_SCACHE=y
-# CONFIG_MIPS_MT is not set
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_VPE_LOADER is not set
 # CONFIG_64BIT_PHYS_ADDR is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
@@ -134,6 +141,7 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -146,6 +154,7 @@ CONFIG_HZ=1000
 # CONFIG_PREEMPT_NONE is not set
 CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -178,10 +187,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -272,6 +283,8 @@ CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
 CONFIG_INET_XFRM_TUNNEL=m
 CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -319,7 +332,10 @@ CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
 CONFIG_INET6_XFRM_TUNNEL=m
 CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
 CONFIG_IPV6_TUNNEL=m
+CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -335,6 +351,8 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
+CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
@@ -349,9 +367,11 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
@@ -361,6 +381,7 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_IP_NF_CONNTRACK=m
 CONFIG_IP_NF_CT_ACCT=y
 CONFIG_IP_NF_CONNTRACK_MARK=y
+CONFIG_IP_NF_CONNTRACK_SECMARK=y
 CONFIG_IP_NF_CONNTRACK_EVENTS=y
 CONFIG_IP_NF_CONNTRACK_NETLINK=m
 # CONFIG_IP_NF_CT_PROTO_SCTP is not set
@@ -371,6 +392,7 @@ CONFIG_IP_NF_TFTP=m
 CONFIG_IP_NF_AMANDA=m
 CONFIG_IP_NF_PPTP=m
 CONFIG_IP_NF_H323=m
+CONFIG_IP_NF_SIP=m
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
@@ -401,6 +423,7 @@ CONFIG_IP_NF_NAT_TFTP=m
 CONFIG_IP_NF_NAT_AMANDA=m
 CONFIG_IP_NF_NAT_PPTP=m
 CONFIG_IP_NF_NAT_H323=m
+CONFIG_IP_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
@@ -533,6 +556,7 @@ CONFIG_WIRELESS_EXT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -652,6 +676,8 @@ CONFIG_DAVICOM_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_LXT_PHY=m
 CONFIG_CICADA_PHY=m
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
 
 #
 # Ethernet (10 or 100Mbit)
@@ -749,6 +775,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -781,6 +808,7 @@ CONFIG_WATCHDOG=y
 #
 # CONFIG_SOFT_WATCHDOG is not set
 CONFIG_INDYDOG=m
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 CONFIG_SGI_DS1286=m
 # CONFIG_GEN_RTC is not set
@@ -829,6 +857,7 @@ CONFIG_MAX_RAW_DEVS=256
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -838,6 +867,7 @@ CONFIG_MAX_RAW_DEVS=256
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
 
 #
@@ -909,6 +939,19 @@ CONFIG_LOGO_SGI_CLUT224=y
 #
 # CONFIG_RTC_CLASS is not set
 
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
 #
 # File systems
 #
@@ -926,7 +969,6 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
 CONFIG_XFS_QUOTA=y
 CONFIG_XFS_SECURITY=y
 # CONFIG_XFS_POSIX_ACL is not set
@@ -935,6 +977,7 @@ CONFIG_XFS_SECURITY=y
 CONFIG_MINIX_FS=m
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 CONFIG_QUOTA=y
 # CONFIG_QFMT_V1 is not set
 CONFIG_QFMT_V2=m
@@ -991,6 +1034,8 @@ CONFIG_EFS_FS=m
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_SYSV_FS is not set
 CONFIG_UFS_FS=m
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_UFS_DEBUG is not set
 
 #
 # Network File Systems
@@ -1020,7 +1065,9 @@ CONFIG_SMB_NLS_DEFAULT=y
 CONFIG_SMB_NLS_REMOTE="cp437"
 CONFIG_CIFS=m
 # CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
 # CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 CONFIG_CODA_FS=m
@@ -1103,6 +1150,7 @@ CONFIG_NLS_UTF8=m
 #
 # CONFIG_PRINTK_TIME is not set
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_FS is not set
@@ -1162,3 +1210,4 @@ CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index b075281e50e95d53b8c291a1f72fd318eb65f66e..3af57693c84c01f167710df8c7a0ce5c102e11c7 100644 (file)
@@ -22,7 +22,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
index b886aa94ca9004758e569da91ea759b9ba09e51e..7c930860c921e14f2a086556dda04ccc2e40a498 100644 (file)
@@ -78,7 +78,7 @@ static void emma2rh_irq_end(unsigned int irq)
                ll_emma2rh_irq_enable(irq - emma2rh_irq_base);
 }
 
-hw_irq_controller emma2rh_irq_controller = {
+struct irq_chip emma2rh_irq_controller = {
        .typename = "emma2rh_irq",
        .startup = emma2rh_irq_startup,
        .shutdown = emma2rh_irq_shutdown,
index 8bba0b02a20470aa7dbef13709c44517782ca598..7433bd8e55629b3efbf813eccce53990d10aadbd 100644 (file)
@@ -22,7 +22,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
index 76dc3faeaf4e1999821d6fc8d7096c971081a979..2a736be42c8ca0fa933a4cf543fc5eba3ec88f39 100644 (file)
@@ -22,7 +22,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
index 1783fdab6459aa07b5669b0974538f0c915a2104..f23ae9fcffa0e63698c4ed23cca18fb9378b8cfc 100644 (file)
@@ -67,7 +67,7 @@ static void emma2rh_sw_irq_end(unsigned int irq)
                ll_emma2rh_sw_irq_enable(irq - emma2rh_sw_irq_base);
 }
 
-hw_irq_controller emma2rh_sw_irq_controller = {
+struct irq_chip emma2rh_sw_irq_controller = {
        .typename = "emma2rh_sw_irq",
        .startup = emma2rh_sw_irq_startup,
        .shutdown = emma2rh_sw_irq_shutdown,
@@ -147,7 +147,7 @@ static void emma2rh_gpio_irq_end(unsigned int irq)
                ll_emma2rh_gpio_irq_enable(irq - emma2rh_gpio_irq_base);
 }
 
-hw_irq_controller emma2rh_gpio_irq_controller = {
+struct irq_chip emma2rh_gpio_irq_controller = {
        .typename = "emma2rh_gpio_irq",
        .startup = emma2rh_gpio_irq_startup,
        .shutdown = emma2rh_gpio_irq_shutdown,
index 6c1eeae1a898b4bfe026292b3eaaf7cd393d23a1..15cc61df36223ba8b4a543035b363c097702bfad 100644 (file)
@@ -20,7 +20,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
index 7d98fdbf839044ed3872ab7eb26de7dcc8c7ef5b..b29a447392306056bdbe2ca877d171c39e876f94 100644 (file)
@@ -22,7 +22,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -105,7 +104,7 @@ static void __init emma2rh_time_init(void)
        mips_hpt_frequency = (bus_frequency * (4 + reg)) / 4 / 2;
 }
 
-static void __init emma2rh_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        /* we are using the cpu counter for timer interrupts */
        setup_irq(CPU_IRQ_BASE + 7, irq);
@@ -150,7 +149,6 @@ void __init plat_mem_setup(void)
        set_io_port_base(KSEG1ADDR(EMMA2RH_PCI_IO_BASE));
 
        board_time_init = emma2rh_time_init;
-       board_timer_setup = emma2rh_timer_setup;
 
        _machine_restart = markeins_machine_restart;
        _machine_halt = markeins_machine_halt;
index f489a8067a93fa46570378fd85a5345beb78226c..5d939ac58f3f3634d1e184e938fac3761f292def 100644 (file)
@@ -104,7 +104,7 @@ static void end_ev64120_irq(unsigned int irq)
                enable_ev64120_irq(irq);
 }
 
-static struct hw_interrupt_type ev64120_irq_type = {
+static struct irq_chip ev64120_irq_type = {
        .typename       = "EV64120",
        .startup        = startup_ev64120_irq,
        .shutdown       = shutdown_ev64120_irq,
@@ -138,7 +138,7 @@ void __init arch_init_irq(void)
        /*  Let's initialize our IRQ descriptors  */
        for (i = 0; i < NR_IRQS; i++) {
                irq_desc[i].status = 0;
-               irq_desc[i].chip = &no_irq_type;
+               irq_desc[i].chip = &no_irq_chip;
                irq_desc[i].action = NULL;
                irq_desc[i].depth = 0;
                spin_lock_init(&irq_desc[i].lock);
index 2db6375ef29e5bd518d1338eee1b14363be609e3..429afc400cb4ad4e7f7e071b1635a3a701a39103 100644 (file)
@@ -8,7 +8,6 @@
  * Copyright (C) 1996, 1997, 2004 by Ralf Baechle (ralf@linux-mips.org)
  * Copyright (C) 2006, Wind River System Inc. Rongkai.zhan <rongkai.zhan@windriver.com>
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
@@ -128,7 +127,6 @@ static void wrppmc_setup_serial(void)
 void __init plat_mem_setup(void)
 {
        extern void wrppmc_time_init(void);
-       extern void wrppmc_timer_setup(struct irqaction *);
        extern void wrppmc_machine_restart(char *command);
        extern void wrppmc_machine_halt(void);
        extern void wrppmc_machine_power_off(void);
@@ -139,7 +137,6 @@ void __init plat_mem_setup(void)
 
        /* Use MIPS Count/Compare Timer */
        board_time_init   = wrppmc_time_init;
-       board_timer_setup = wrppmc_timer_setup;
 
        /* This makes the operations of 'in/out[bwl]' to the
         * physical address ( < KSEG0) can work via KSEG1
index 6c24a82df0ddc0829207a28d81c3a6fe932a3255..5b440859bcee6bd9b9f32ab2605463c2b89bf854 100644 (file)
@@ -10,7 +10,6 @@
  * Copyright (C) 1996, 1997, 2004 by Ralf Baechle (ralf@linux-mips.org)
  * Copyright (C) 2006, Wind River System Inc.
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
@@ -27,7 +26,7 @@
 
 #define WRPPMC_CPU_CLK_FREQ 40000000 /* 40MHZ */
 
-void __init wrppmc_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        /* Install ISR for timer interrupt */
        setup_irq(WRPPMC_MIPS_TIMER_IRQ, irq);
index a6749c56fe38d620ea29ca4546fc6a79baf31470..cb59ca4f76f0450821d419a642eeb307320ea4cd 100644 (file)
@@ -133,7 +133,7 @@ static void end_ite_irq(unsigned int irq)
                enable_it8172_irq(irq);
 }
 
-static struct hw_interrupt_type it8172_irq_type = {
+static struct irq_chip it8172_irq_type = {
        .typename = "ITE8172",
        .startup = startup_ite_irq,
        .shutdown = shutdown_ite_irq,
@@ -153,7 +153,7 @@ static void ack_none(unsigned int irq) { }
 #define shutdown_none  disable_none
 #define end_none       enable_none
 
-static struct hw_interrupt_type cp0_irq_type = {
+static struct irq_chip cp0_irq_type = {
        .typename = "CP0 Count",
        .startup = startup_none,
        .shutdown = shutdown_none,
index a4615a5904aa043bb4964751213b27f0f50b7fc2..07faf3cacff2d5b90f98a09a8ed0f1f75043f106 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/ioport.h>
+#include <linux/irq.h>
 #include <linux/serial_reg.h>
 #include <linux/major.h>
 #include <linux/kdev_t.h>
@@ -58,10 +59,7 @@ extern void it8172_restart(char *command);
 extern void it8172_halt(void);
 extern void it8172_power_off(void);
 
-extern void (*board_time_init)(void);
-extern void (*board_timer_setup)(struct irqaction *irq);
 extern void it8172_time_init(void);
-extern void it8172_timer_setup(struct irqaction *irq);
 
 #ifdef CONFIG_IT8172_REVC
 struct {
@@ -169,7 +167,6 @@ void __init plat_mem_setup(void)
        clear_c0_status(ST0_FR);
 
        board_time_init = it8172_time_init;
-       board_timer_setup = it8172_timer_setup;
 
        _machine_restart = it8172_restart;
        _machine_halt = it8172_halt;
index dee497a91807b163a97392e4663463b6cd994869..3dc55569ff7f4c760b6a56f38b6445dc7879a2ce 100644 (file)
@@ -233,7 +233,8 @@ void __init it8172_time_init(void)
 }
 
 #define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5)
-void __init it8172_timer_setup(struct irqaction *irq)
+
+void __init plat_timer_setup(struct irqaction *irq)
 {
        puts("timer_setup\n");
        put32(NR_IRQS);
index 478be9858a1e04117eb3456e2200119a083b9f04..eef05093deb41b174a8b3e10fda4bfc85cf50d02 100644 (file)
@@ -55,7 +55,7 @@ static void end_r4030_irq(unsigned int irq)
                enable_r4030_irq(irq);
 }
 
-static struct hw_interrupt_type r4030_irq_type = {
+static struct irq_chip r4030_irq_type = {
        .typename = "R4030",
        .startup = startup_r4030_irq,
        .shutdown = shutdown_r4030_irq,
index 385413e30fddfe32ad81927d680d8f02c64ac1bd..487a9ea1ef00cd1809d9d5a5b0c57d96e3b5c1b2 100644 (file)
@@ -37,7 +37,7 @@ extern void jazz_machine_restart(char *command);
 extern void jazz_machine_halt(void);
 extern void jazz_machine_power_off(void);
 
-static void __init jazz_time_init(struct irqaction *irq)
+void __init plat_time_init(struct irqaction *irq)
 {
        /* set the clock to 100 Hz */
        r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9);
@@ -75,7 +75,6 @@ void __init plat_mem_setup(void)
        for (i = 0; i < ARRAY_SIZE(jazz_io_resources); i++)
                request_resource(&ioport_resource, jazz_io_resources + i);
 
-        board_timer_setup = jazz_time_init;
        /* The RTC is outside the port address space */
 
        _machine_restart = jazz_machine_restart;
index 9c43702e7a93828d42afd218353ff240e4e6dfa9..722174481467e96b31dd314a226f27b78bc70f54 100644 (file)
@@ -416,7 +416,7 @@ void __init arch_init_irq(void)
        set_c0_status(ST0_IM);  /* IE bit is still 0. */
 }
 
-static hw_irq_controller jmr3927_irq_controller = {
+static struct irq_chip jmr3927_irq_controller = {
        .typename = "jmr3927_irq",
        .startup = jmr3927_irq_startup,
        .shutdown = jmr3927_irq_shutdown,
index 6d4635d89d94893c075fa2a42a03daba4c085dd3..025434054ed09b947b43da4607a0fa0454a3e274 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/sched.h>
 #include <linux/pci.h>
 #include <linux/ide.h>
+#include <linux/irq.h>
 #include <linux/ioport.h>
 #include <linux/param.h>       /* for HZ */
 #include <linux/delay.h>
@@ -183,9 +184,8 @@ static void __init jmr3927_time_init(void)
 }
 
 unsigned long jmr3927_do_gettimeoffset(void);
-extern int setup_irq(unsigned int irq, struct irqaction *irqaction);
 
-static void __init jmr3927_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        do_gettimeoffset = jmr3927_do_gettimeoffset;
 
@@ -244,7 +244,6 @@ void __init plat_mem_setup(void)
        set_io_port_base(JMR3927_PORT_BASE + JMR3927_PCIIO);
 
        board_time_init = jmr3927_time_init;
-       board_timer_setup = jmr3927_timer_setup;
 
        _machine_restart = jmr3927_machine_restart;
        _machine_halt = jmr3927_machine_halt;
index 7bdbcd811b57cfea8bed7bd42242ff5c6dfea932..528e731049c123c2a77886d573a2001458405901 100644 (file)
@@ -10,7 +10,6 @@
  * [This document is available from Microsoft at:
  *    http://www.microsoft.com/hwdev/busbios/amp_12.htm]
  */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/poll.h>
 #include <linux/timer.h>
index ba08f055feb2ed1b7ad2c14b8cb772e546c8353a..aa2caa67299a45ec4b5d8950b82bf695d611855c 100644 (file)
@@ -459,7 +459,7 @@ static inline unsigned int decode_config0(struct cpuinfo_mips *c)
        isa = (config0 & MIPS_CONF_AT) >> 13;
        switch (isa) {
        case 0:
-               switch ((config0 >> 10) & 7) {
+               switch ((config0 & MIPS_CONF_AR) >> 10) {
                case 0:
                        c->isa_level = MIPS_CPU_ISA_M32R1;
                        break;
@@ -471,7 +471,7 @@ static inline unsigned int decode_config0(struct cpuinfo_mips *c)
                }
                break;
        case 2:
-               switch ((config0 >> 10) & 7) {
+               switch ((config0 & MIPS_CONF_AR) >> 10) {
                case 0:
                        c->isa_level = MIPS_CPU_ISA_M64R1;
                        break;
@@ -548,7 +548,7 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
        return config3 & MIPS_CONF_M;
 }
 
-static inline void decode_configs(struct cpuinfo_mips *c)
+static void __init decode_configs(struct cpuinfo_mips *c)
 {
        /* MIPS32 or MIPS64 compliant CPU.  */
        c->options = MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER |
index 01e7fa86aa43d588b7ed8d8e70af403067d2c9e2..766655f352508db89fa12941f614e7a84df2d7c3 100644 (file)
@@ -113,6 +113,21 @@ FEXPORT(restore_all)                       # restore full frame
        RESTORE_AT
        RESTORE_STATIC
 FEXPORT(restore_partial)               # restore partial frame
+#ifdef CONFIG_TRACE_IRQFLAGS
+       SAVE_STATIC
+       SAVE_AT
+       SAVE_TEMP
+       LONG_L  v0, PT_STATUS(sp)
+       and     v0, 1
+       beqz    v0, 1f
+       jal     trace_hardirqs_on
+       b       2f
+1:     jal     trace_hardirqs_off
+2:
+       RESTORE_TEMP
+       RESTORE_AT
+       RESTORE_STATIC
+#endif
        RESTORE_SOME
        RESTORE_SP_AND_RET
        .set    at
index 666bc9014cbd94f35cf5772f537b854098a5f9a0..2c446063636aeda90de92e07d44bbafd521255f2 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <asm/asm.h>
 #include <asm/errno.h>
+#include <asm/irqflags.h>
 #include <asm/mipsregs.h>
 #include <asm/regdef.h>
 #include <asm/stackframe.h>
                LONG_S  $31, GDB_FR_REG31(sp)
 
                CLI                             /* disable interrupts */
+               TRACE_IRQS_OFF
 
 /*
  * Followed by the floating point registers
index 5254a2222d2bc5ba5f343b3c1c141b6935876bae..37fda3dcdfc5b84bdbd57c785187ec3086b50ade 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
 #include <asm/cacheops.h>
+#include <asm/irqflags.h>
 #include <asm/regdef.h>
 #include <asm/fpregdef.h>
 #include <asm/mipsregs.h>
@@ -128,6 +129,7 @@ handle_vcei:
 NESTED(handle_int, PT_SIZE, sp)
        SAVE_ALL
        CLI
+       TRACE_IRQS_OFF
 
        PTR_LA  ra, ret_from_irq
        move    a0, sp
@@ -216,6 +218,7 @@ NESTED(except_vec_vi_handler, 0, sp)
        _ehb
 #endif /* CONFIG_MIPS_MT_SMTC */
        CLI
+       TRACE_IRQS_OFF
        move    a0, sp
        jalr    v0
        j       ret_from_irq
@@ -288,11 +291,13 @@ NESTED(nmi_handler, PT_SIZE, sp)
        .endm
 
        .macro  __build_clear_sti
+       TRACE_IRQS_ON
        STI
        .endm
 
        .macro  __build_clear_cli
        CLI
+       TRACE_IRQS_OFF
        .endm
 
        .macro  __build_clear_fpe
@@ -300,6 +305,7 @@ NESTED(nmi_handler, PT_SIZE, sp)
        li      a2, ~(0x3f << 12)
        and     a2, a1
        ctc1    a2, fcr31
+       TRACE_IRQS_ON
        STI
        .endm
 
@@ -365,7 +371,7 @@ NESTED(nmi_handler, PT_SIZE, sp)
        BUILD_HANDLER mdmx mdmx sti silent              /* #22 */
        BUILD_HANDLER watch watch sti verbose           /* #23 */
        BUILD_HANDLER mcheck mcheck cli verbose         /* #24 */
-       BUILD_HANDLER mt mt sti verbose                 /* #25 */
+       BUILD_HANDLER mt mt sti silent                  /* #25 */
        BUILD_HANDLER dsp dsp sti silent                /* #26 */
        BUILD_HANDLER reserved reserved sti verbose     /* others */
 
index 476c1eb33c945b9cf7e494c7ee7d72d968afc5f0..8c6db0fc72f0ab5cb5b326d11f9c29c737abe1e0 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 1994, 1995 Waldorf Electronics
  * Written by Ralf Baechle and Andreas Busse
- * Copyright (C) 1994, 95, 96, 97, 98, 99, 2003 Ralf Baechle
+ * Copyright (C) 1994 - 99, 2003, 06 Ralf Baechle
  * Copyright (C) 1996 Paul M. Antoine
  * Modified for DECStation and hence R3000 support by Paul M. Antoine
  * Further modifications by David S. Miller and Harald Koerfgen
@@ -18,6 +18,7 @@
 
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
+#include <asm/irqflags.h>
 #include <asm/regdef.h>
 #include <asm/page.h>
 #include <asm/mipsregs.h>
index 91ffb1233cad92cda4ce6ad163bc880798f7533a..ea36c8e8852c1b9f1b0c2c5e789e5d6e4e40ee29 100644 (file)
@@ -51,7 +51,7 @@ static unsigned int startup_8259A_irq(unsigned int irq)
        return 0; /* never anything pending */
 }
 
-static struct hw_interrupt_type i8259A_irq_type = {
+static struct irq_chip i8259A_irq_type = {
        .typename = "XT-PIC",
        .startup = startup_8259A_irq,
        .shutdown = shutdown_8259A_irq,
index 10d3644e360863b1133a07fbb85b06880cc124c3..ab12c8f0151852e74a66f781fe875ffc362b2368 100644 (file)
@@ -999,8 +999,6 @@ static inline int maydump(struct vm_area_struct *vma)
        return 1;
 }
 
-#define roundup(x, y)  ((((x)+((y)-1))/(y))*(y))
-
 /* An ELF note in memory. */
 struct memelfnote
 {
index f8cd1ac64d88314785849eec94f3d801b49943d7..63dfeb41796bdb848747192cf6186a559713172a 100644 (file)
@@ -137,7 +137,7 @@ msc_bind_eic_interrupt (unsigned int irq, unsigned int set)
 
 #define shutdown_msc_irq       disable_msc_irq
 
-struct hw_interrupt_type msc_levelirq_type = {
+struct irq_chip msc_levelirq_type = {
        .typename = "SOC-it-Level",
        .startup = startup_msc_irq,
        .shutdown = shutdown_msc_irq,
@@ -147,7 +147,7 @@ struct hw_interrupt_type msc_levelirq_type = {
        .end = end_msc_irq,
 };
 
-struct hw_interrupt_type msc_edgeirq_type = {
+struct irq_chip msc_edgeirq_type = {
        .typename = "SOC-it-Edge",
        .startup =startup_msc_irq,
        .shutdown = shutdown_msc_irq,
index f9c763a65547f0cc8760aaa8eaf61d8bdbe7d1b4..b117e64da64d855f7b22922ff7bb5547fcb387bb 100644 (file)
@@ -136,7 +136,7 @@ void ll_mv64340_irq(struct pt_regs *regs)
 
 #define shutdown_mv64340_irq   disable_mv64340_irq
 
-struct hw_interrupt_type mv64340_irq_type = {
+struct irq_chip mv64340_irq_type = {
        .typename = "MV-64340",
        .startup = startup_mv64340_irq,
        .shutdown = shutdown_mv64340_irq,
index 121da385a94d05216488abe15a20b398521e5ff4..6b54c7109e2eab5ed1fb4304d8ca39835d91d852 100644 (file)
@@ -71,7 +71,7 @@ static void rm7k_cpu_irq_end(unsigned int irq)
                unmask_rm7k_irq(irq);
 }
 
-static hw_irq_controller rm7k_irq_controller = {
+static struct irq_chip rm7k_irq_controller = {
        .typename = "RM7000",
        .startup = rm7k_cpu_irq_startup,
        .shutdown = rm7k_cpu_irq_shutdown,
index 25109c103e44dff4ed3216ce45f7f27a39bc1732..62f011ba97a25de7832ef6631ccfdac6423b0add 100644 (file)
@@ -105,7 +105,7 @@ static void rm9k_cpu_irq_end(unsigned int irq)
                unmask_rm9k_irq(irq);
 }
 
-static hw_irq_controller rm9k_irq_controller = {
+static struct irq_chip rm9k_irq_controller = {
        .typename = "RM9000",
        .startup = rm9k_cpu_irq_startup,
        .shutdown = rm9k_cpu_irq_shutdown,
@@ -115,7 +115,7 @@ static hw_irq_controller rm9k_irq_controller = {
        .end = rm9k_cpu_irq_end,
 };
 
-static hw_irq_controller rm9k_perfcounter_irq = {
+static struct irq_chip rm9k_perfcounter_irq = {
        .typename = "RM9000",
        .startup = rm9k_perfcounter_irq_startup,
        .shutdown = rm9k_perfcounter_irq_shutdown,
index cde5e5afa179173ef74377cf2a0e0add6f01992e..d955aaefbb8eb1b521872e6685e18b849ff58c56 100644 (file)
@@ -136,7 +136,7 @@ void __init init_IRQ(void)
                irq_desc[i].status  = IRQ_DISABLED;
                irq_desc[i].action  = NULL;
                irq_desc[i].depth   = 1;
-               irq_desc[i].chip = &no_irq_type;
+               irq_desc[i].chip = &no_irq_chip;
                spin_lock_init(&irq_desc[i].lock);
 #ifdef CONFIG_MIPS_MT_SMTC
                irq_hwmask[i] = 0;
index 0e455a8ad860d612fa282a775d962275cc5f589e..9bb21c7f2149e4b6d9d214bb39c657f017a12dd8 100644 (file)
@@ -94,7 +94,7 @@ static void mips_cpu_irq_end(unsigned int irq)
                unmask_mips_irq(irq);
 }
 
-static hw_irq_controller mips_cpu_irq_controller = {
+static struct irq_chip mips_cpu_irq_controller = {
        .typename       = "MIPS",
        .startup        = mips_cpu_irq_startup,
        .shutdown       = mips_cpu_irq_shutdown,
@@ -140,7 +140,7 @@ static void mips_mt_cpu_irq_ack(unsigned int irq)
 
 #define mips_mt_cpu_irq_end mips_cpu_irq_end
 
-static hw_irq_controller mips_mt_cpu_irq_controller = {
+static struct irq_chip mips_mt_cpu_irq_controller = {
        .typename       = "MIPS",
        .startup        = mips_mt_cpu_irq_startup,
        .shutdown       = mips_mt_cpu_irq_shutdown,
index 4dcc39f42951184651940c5d5d201212f0c9f2f6..c1373a6e668bec45583c7ff498e697b0a30355ca 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/sched.h>
 #include <linux/cpumask.h>
 #include <linux/interrupt.h>
+#include <linux/security.h>
 
 #include <asm/cpu.h>
 #include <asm/processor.h>
index 8f8101f878ca6e4920550b02c48526279165b758..ba1bcd83c7d3ef71587a27d272f1fa970fdfef03 100644 (file)
@@ -3,13 +3,14 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02 by Ralf Baechle
+ * Copyright (C) 1995-99, 2000- 02, 06 Ralf Baechle <ralf@linux-mips.org>
  * Copyright (C) 2001 MIPS Technologies, Inc.
  * Copyright (C) 2004 Thiemo Seufer
  */
 #include <linux/errno.h>
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
+#include <asm/irqflags.h>
 #include <asm/mipsregs.h>
 #include <asm/regdef.h>
 #include <asm/stackframe.h>
 NESTED(handle_sys, PT_SIZE, sp)
        .set    noat
        SAVE_SOME
+#ifdef CONFIG_TRACE_IRQFLAGS
+       TRACE_IRQS_ON
+#ifdef CONFIG_64BIT
+       LONG_L  $8, PT_R8(sp)
+       LONG_L  $9, PT_R9(sp)
+#endif
+       LONG_L  $7, PT_R7(sp)
+       LONG_L  $6, PT_R6(sp)
+       LONG_L  $5, PT_R5(sp)
+       LONG_L  $4, PT_R4(sp)
+       LONG_L  $2, PT_R2(sp)
+#endif
        STI
        .set    at
 
@@ -647,6 +660,8 @@ einval:     li      v0, -EINVAL
        sys     sys_splice              4
        sys     sys_sync_file_range     7       /* 4305 */
        sys     sys_tee                 4
+       sys     sys_vmsplice            4
+       sys     sys_move_pages          6
        .endm
 
        /* We pre-compute the number of _instruction_ bytes needed to
index b4a34a625a2e5cc08f006b52776ba935cebf9598..939e172db9531451c8e82df36914ba7b532ab5e2 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/errno.h>
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
+#include <asm/irqflags.h>
 #include <asm/mipsregs.h>
 #include <asm/regdef.h>
 #include <asm/stackframe.h>
@@ -33,6 +34,7 @@ NESTED(handle_sys64, PT_SIZE, sp)
         */
        .set    noat
        SAVE_SOME
+       TRACE_IRQS_ON
        STI
        .set    at
 #endif
@@ -462,3 +464,5 @@ sys_call_table:
        PTR     sys_splice
        PTR     sys_sync_file_range
        PTR     sys_tee                         /* 5265 */
+       PTR     sys_vmsplice
+       PTR     sys_move_pages
index df8c4f8ccd61039a78b5eb429566b52d73e430f8..98abbc5a9f13007d5d6f034d5fd7d0c231c5f314 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/errno.h>
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
+#include <asm/irqflags.h>
 #include <asm/mipsregs.h>
 #include <asm/regdef.h>
 #include <asm/stackframe.h>
@@ -32,6 +33,7 @@ NESTED(handle_sysn32, PT_SIZE, sp)
 #ifndef CONFIG_MIPS32_O32
        .set    noat
        SAVE_SOME
+       TRACE_IRQS_ON
        STI
        .set    at
 #endif
@@ -388,3 +390,5 @@ EXPORT(sysn32_call_table)
        PTR     sys_splice
        PTR     sys_sync_file_range
        PTR     sys_tee
+       PTR     sys_vmsplice                    /* 6271 */
+       PTR     sys_move_pages
index f04fe4f085c3461ff1a31e5dbaa6c8472ca2ab71..505c9ee540095f119b303cfcbc46e9ef86e74eca 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
+#include <asm/irqflags.h>
 #include <asm/mipsregs.h>
 #include <asm/regdef.h>
 #include <asm/stackframe.h>
@@ -27,6 +28,7 @@
 NESTED(handle_sys, PT_SIZE, sp)
        .set    noat
        SAVE_SOME
+       TRACE_IRQS_ON
        STI
        .set    at
        ld      t1, PT_EPC(sp)          # skip syscall on return
@@ -510,4 +512,6 @@ sys_call_table:
        PTR     sys_splice
        PTR     sys32_sync_file_range           /* 4305 */
        PTR     sys_tee
+       PTR     sys_vmsplice
+       PTR     compat_sys_move_pages
        .size   sys_call_table,.-sys_call_table
index 5edd8d4bb665c988f4cde96495b8643ecb7840e9..8c2b596a136f95376c45386b3fba0703d32f4991 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/user.h>
 #include <linux/utsname.h>
 #include <linux/a.out.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/bootmem.h>
 #include <linux/initrd.h>
 #include <linux/major.h>
index 9096a5ea42298d4f409ce249f7f5e4ec3d9195c8..221895802dca8eecd1be9e374173f4f1522facaa 100644 (file)
@@ -318,6 +318,32 @@ static void flush_tlb_mm_ipi(void *mm)
        local_flush_tlb_mm((struct mm_struct *)mm);
 }
 
+/*
+ * Special Variant of smp_call_function for use by TLB functions:
+ *
+ *  o No return value
+ *  o collapses to normal function call on UP kernels
+ *  o collapses to normal function call on systems with a single shared
+ *    primary cache.
+ *  o CONFIG_MIPS_MT_SMTC currently implies there is only one physical core.
+ */
+static inline void smp_on_other_tlbs(void (*func) (void *info), void *info)
+{
+#ifndef CONFIG_MIPS_MT_SMTC
+       smp_call_function(func, info, 1, 1);
+#endif
+}
+
+static inline void smp_on_each_tlb(void (*func) (void *info), void *info)
+{
+       preempt_disable();
+
+       smp_on_other_tlbs(func, info);
+       func(info);
+
+       preempt_enable();
+}
+
 /*
  * The following tlb flush calls are invoked when old translations are
  * being torn down, or pte attributes are changing. For single threaded
@@ -336,7 +362,7 @@ void flush_tlb_mm(struct mm_struct *mm)
        preempt_disable();
 
        if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) {
-               smp_call_function(flush_tlb_mm_ipi, (void *)mm, 1, 1);
+               smp_on_other_tlbs(flush_tlb_mm_ipi, (void *)mm);
        } else {
                int i;
                for (i = 0; i < num_online_cpus(); i++)
@@ -372,7 +398,7 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned l
                fd.vma = vma;
                fd.addr1 = start;
                fd.addr2 = end;
-               smp_call_function(flush_tlb_range_ipi, (void *)&fd, 1, 1);
+               smp_on_other_tlbs(flush_tlb_range_ipi, (void *)&fd);
        } else {
                int i;
                for (i = 0; i < num_online_cpus(); i++)
@@ -414,7 +440,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
 
                fd.vma = vma;
                fd.addr1 = page;
-               smp_call_function(flush_tlb_page_ipi, (void *)&fd, 1, 1);
+               smp_on_other_tlbs(flush_tlb_page_ipi, (void *)&fd);
        } else {
                int i;
                for (i = 0; i < num_online_cpus(); i++)
@@ -434,8 +460,7 @@ static void flush_tlb_one_ipi(void *info)
 
 void flush_tlb_one(unsigned long vaddr)
 {
-       smp_call_function(flush_tlb_one_ipi, (void *) vaddr, 1, 1);
-       local_flush_tlb_one(vaddr);
+       smp_on_each_tlb(flush_tlb_one_ipi, (void *) vaddr);
 }
 
 static DEFINE_PER_CPU(struct cpu, cpu_devices);
index 72c6d98f8854283cc2dad1e1dc1ac593fe4edd4c..4cc3dea36612556925aa199e2a150d5e1918b5e4 100644 (file)
@@ -96,6 +96,7 @@ FEXPORT(__smtc_ipi_vector)
        /* Save all will redundantly recompute the SP, but use it for now */
        SAVE_ALL
        CLI
+       TRACE_IRQS_OFF
        move    a0,sp
        /* Function to be invoked passed stack pad slot 5 */
        lw      t0,PT_PADSLOT5(sp)
index a48d9e553083288943fede939624473d330b43c7..604bcc5cb7c8599dcb180ac8d314fa769f1ef990 100644 (file)
@@ -127,7 +127,7 @@ static int __init stlb_disable(char *s)
 static int __init asidmask_set(char *str)
 {
        get_option(&str, &asidmask);
-       switch(asidmask) {
+       switch (asidmask) {
        case 0x1:
        case 0x3:
        case 0x7:
@@ -249,7 +249,7 @@ void smtc_configure_tlb(void)
                        /*
                         * Only count if the MMU Type indicated is TLB
                         */
-                       if(((read_vpe_c0_config() & MIPS_CONF_MT) >> 7) == 1) {
+                       if (((read_vpe_c0_config() & MIPS_CONF_MT) >> 7) == 1) {
                                config1val = read_vpe_c0_config1();
                                tlbsiz += ((config1val >> 25) & 0x3f) + 1;
                        }
@@ -500,7 +500,7 @@ void mipsmt_prepare_cpus(void)
        /* Set up coprocessor affinity CPU mask(s) */
 
        for (tc = 0; tc < ntc; tc++) {
-               if(cpu_data[tc].options & MIPS_CPU_FPU)
+               if (cpu_data[tc].options & MIPS_CPU_FPU)
                        cpu_set(tc, mt_fpu_cpumask);
        }
 
@@ -577,13 +577,13 @@ void smtc_init_secondary(void)
 {
        /*
         * Start timer on secondary VPEs if necessary.
-        * mips_timer_setup should already have been invoked by init/main
+        * plat_timer_setup has already have been invoked by init/main
         * on "boot" TC.  Like per_cpu_trap_init() hack, this assumes that
         * SMTC init code assigns TCs consdecutively and in ascending order
         * to across available VPEs.
         */
-       if(((read_c0_tcbind() & TCBIND_CURTC) != 0)
-       && ((read_c0_tcbind() & TCBIND_CURVPE)
+       if (((read_c0_tcbind() & TCBIND_CURTC) != 0) &&
+           ((read_c0_tcbind() & TCBIND_CURVPE)
            != cpu_data[smp_processor_id() - 1].vpe_id)){
                write_c0_compare (read_c0_count() + mips_hpt_frequency/HZ);
        }
@@ -757,8 +757,8 @@ void smtc_send_ipi(int cpu, int type, unsigned int action)
                        write_tc_c0_tchalt(0);
                        UNLOCK_CORE_PRA();
                        /* Try to reduce redundant timer interrupt messages */
-                       if(type == SMTC_CLOCK_TICK) {
-                           if(atomic_postincrement(&ipi_timer_latch[cpu])!=0) {
+                       if (type == SMTC_CLOCK_TICK) {
+                           if (atomic_postincrement(&ipi_timer_latch[cpu])!=0){
                                smtc_ipi_nq(&freeIPIq, pipi);
                                return;
                            }
@@ -797,7 +797,7 @@ void post_direct_ipi(int cpu, struct smtc_ipi *pipi)
         * CU bit of Status is indicator that TC was
         * already running on a kernel stack...
         */
-       if(tcstatus & ST0_CU0)  {
+       if (tcstatus & ST0_CU0)  {
                /* Note that this "- 1" is pointer arithmetic */
                kstack = ((struct pt_regs *)read_tc_gpr_sp()) - 1;
        } else {
@@ -840,31 +840,31 @@ void ipi_decode(struct pt_regs *regs, struct smtc_ipi *pipi)
 
        smtc_ipi_nq(&freeIPIq, pipi);
        switch (type_copy) {
-               case SMTC_CLOCK_TICK:
-                       /* Invoke Clock "Interrupt" */
-                       ipi_timer_latch[dest_copy] = 0;
+       case SMTC_CLOCK_TICK:
+               /* Invoke Clock "Interrupt" */
+               ipi_timer_latch[dest_copy] = 0;
 #ifdef SMTC_IDLE_HOOK_DEBUG
-                       clock_hang_reported[dest_copy] = 0;
+               clock_hang_reported[dest_copy] = 0;
 #endif /* SMTC_IDLE_HOOK_DEBUG */
-                       local_timer_interrupt(0, NULL, regs);
+               local_timer_interrupt(0, NULL, regs);
+               break;
+       case LINUX_SMP_IPI:
+               switch ((int)arg_copy) {
+               case SMP_RESCHEDULE_YOURSELF:
+                       ipi_resched_interrupt(regs);
                        break;
-               case LINUX_SMP_IPI:
-                       switch ((int)arg_copy) {
-                       case SMP_RESCHEDULE_YOURSELF:
-                               ipi_resched_interrupt(regs);
-                               break;
-                       case SMP_CALL_FUNCTION:
-                               ipi_call_interrupt(regs);
-                               break;
-                       default:
-                               printk("Impossible SMTC IPI Argument 0x%x\n",
-                                       (int)arg_copy);
-                               break;
-                       }
+               case SMP_CALL_FUNCTION:
+                       ipi_call_interrupt(regs);
                        break;
                default:
-                       printk("Impossible SMTC IPI Type 0x%x\n", type_copy);
+                       printk("Impossible SMTC IPI Argument 0x%x\n",
+                               (int)arg_copy);
                        break;
+               }
+               break;
+       default:
+               printk("Impossible SMTC IPI Type 0x%x\n", type_copy);
+               break;
        }
 }
 
@@ -879,7 +879,7 @@ void deferred_smtc_ipi(struct pt_regs *regs)
         * Test is not atomic, but much faster than a dequeue,
         * and the vast majority of invocations will have a null queue.
         */
-       if(IPIQ[q].head != NULL) {
+       if (IPIQ[q].head != NULL) {
                while((pipi = smtc_ipi_dq(&IPIQ[q])) != NULL) {
                        /* ipi_decode() should be called with interrupts off */
                        local_irq_save(flags);
@@ -1254,7 +1254,7 @@ void smtc_flush_tlb_asid(unsigned long asid)
                tlb_read();
                ehb();
                ehi = read_c0_entryhi();
-               if((ehi & ASID_MASK) == asid) {
+               if ((ehi & ASID_MASK) == asid) {
                    /*
                     * Invalidate only entries with specified ASID,
                     * makiing sure all entries differ.
index 2393c11d5a207fe530446024cce4ae17944a728c..170cb67f4ede504d67f38072a14735056daad8c2 100644 (file)
@@ -566,14 +566,13 @@ asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs)
  * 2) setup xtime based on rtc_mips_get_time().
  * 3) choose a appropriate gettimeoffset routine.
  * 4) calculate a couple of cached variables for later usage
- * 5) board_timer_setup() -
+ * 5) plat_timer_setup() -
  *     a) (optional) over-write any choices made above by time_init().
  *     b) machine specific code should setup the timer irqaction.
  *     c) enable the timer interrupt
  */
 
 void (*board_time_init)(void);
-void (*board_timer_setup)(struct irqaction *irq);
 
 unsigned int mips_hpt_frequency;
 
@@ -718,7 +717,7 @@ void __init time_init(void)
         * to be NULL function so that we are sure the high-level code
         * is not invoked accidentally.
         */
-       board_timer_setup(&timer_irqaction);
+       plat_timer_setup(&timer_irqaction);
 }
 
 #define FEBRUARY               2
index 8b95eca9ac74f85c37e9501c78f7186ce3328e17..954a198494efb4b0569c5636a415ac1c17da8373 100644 (file)
@@ -569,6 +569,8 @@ asmlinkage void do_ov(struct pt_regs *regs)
  */
 asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31)
 {
+       die_if_kernel("FP exception in kernel code", regs);
+
        if (fcr31 & FPU_CSR_UNI_X) {
                int sig;
 
@@ -847,31 +849,29 @@ asmlinkage void do_mt(struct pt_regs *regs)
 {
        int subcode;
 
-       die_if_kernel("MIPS MT Thread exception in kernel", regs);
-
        subcode = (read_vpe_c0_vpecontrol() & VPECONTROL_EXCPT)
                        >> VPECONTROL_EXCPT_SHIFT;
        switch (subcode) {
        case 0:
-               printk(KERN_ERR "Thread Underflow\n");
+               printk(KERN_DEBUG "Thread Underflow\n");
                break;
        case 1:
-               printk(KERN_ERR "Thread Overflow\n");
+               printk(KERN_DEBUG "Thread Overflow\n");
                break;
        case 2:
-               printk(KERN_ERR "Invalid YIELD Qualifier\n");
+               printk(KERN_DEBUG "Invalid YIELD Qualifier\n");
                break;
        case 3:
-               printk(KERN_ERR "Gating Storage Exception\n");
+               printk(KERN_DEBUG "Gating Storage Exception\n");
                break;
        case 4:
-               printk(KERN_ERR "YIELD Scheduler Exception\n");
+               printk(KERN_DEBUG "YIELD Scheduler Exception\n");
                break;
        case 5:
-               printk(KERN_ERR "Gating Storage Schedulier Exception\n");
+               printk(KERN_DEBUG "Gating Storage Schedulier Exception\n");
                break;
        default:
-               printk(KERN_ERR "*** UNKNOWN THREAD EXCEPTION %d ***\n",
+               printk(KERN_DEBUG "*** UNKNOWN THREAD EXCEPTION %d ***\n",
                        subcode);
                break;
        }
@@ -980,10 +980,10 @@ void ejtag_exception_handler(struct pt_regs *regs)
        unsigned long depc, old_epc;
        unsigned int debug;
 
-       printk("SDBBP EJTAG debug exception - not handled yet, just ignored!\n");
+       printk(KERN_DEBUG "SDBBP EJTAG debug exception - not handled yet, just ignored!\n");
        depc = read_c0_depc();
        debug = read_c0_debug();
-       printk("c0_depc = %0*lx, DEBUG = %08x\n", field, depc, debug);
+       printk(KERN_DEBUG "c0_depc = %0*lx, DEBUG = %08x\n", field, depc, debug);
        if (debug & 0x80000000) {
                /*
                 * In branch delay slot.
@@ -1001,7 +1001,7 @@ void ejtag_exception_handler(struct pt_regs *regs)
        write_c0_depc(depc);
 
 #if 0
-       printk("\n\n----- Enable EJTAG single stepping ----\n\n");
+       printk(KERN_DEBUG "\n\n----- Enable EJTAG single stepping ----\n\n");
        write_c0_debug(debug | 0x100);
 #endif
 }
index 85d7df7b18e1f0a05fb4813b3da1616735b2b03d..9ee0ec2cd067ccb31e787b9ba2fbe30b6b0df52b 100644 (file)
@@ -28,7 +28,6 @@
  * i.e cat spapp >/dev/vpe1.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/fs.h>
index 9316a024a8188ed8d2e92d5db266263b08e2b47a..456be8fc961a293772b2e2280280bced6ffca27d 100644 (file)
@@ -69,7 +69,7 @@ static void end_lasat_irq(unsigned int irq)
                enable_lasat_irq(irq);
 }
 
-static struct hw_interrupt_type lasat_irq_type = {
+static struct irq_chip lasat_irq_type = {
        .typename = "Lasat",
        .startup = startup_lasat_irq,
        .shutdown = shutdown_lasat_irq,
index 2187e63c6d88e97b8c77806a6dfa6066a97240a1..0ffc43c600d9a39ef3d7a55cf8ac60244458884e 100644 (file)
@@ -115,12 +115,9 @@ static void lasat_time_init(void)
        mips_hpt_frequency = lasat_board_info.li_cpu_hz / 2;
 }
 
-static void lasat_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
-
-       write_c0_compare(
-               read_c0_count() +
-               mips_hpt_frequency / HZ);
+       write_c0_compare( read_c0_count() + mips_hpt_frequency / HZ);
        change_c0_status(ST0_IM, IE_IRQ0 | IE_IRQ5);
 }
 
@@ -170,7 +167,6 @@ void __init plat_mem_setup(void)
        lasat_reboot_setup();
 
        board_time_init = lasat_time_init;
-       board_timer_setup = lasat_timer_setup;
 
 #ifdef CONFIG_DS1603
        ds1603 = &ds_defs[mips_machtype];
index 9dd6b89255818ddbf22fbcc86e4f294b834c1499..fb25e0377f11b3097d9dc46b1151083dac590eee 100644 (file)
@@ -73,7 +73,7 @@ static void end_atlas_irq(unsigned int irq)
                enable_atlas_irq(irq);
 }
 
-static struct hw_interrupt_type atlas_irq_type = {
+static struct irq_chip atlas_irq_type = {
        .typename = "Atlas",
        .startup = startup_atlas_irq,
        .shutdown = shutdown_atlas_irq,
index 3a7c3d28aa0d4d5671af23b0ac417a6396a78a35..9871a91fdb07a1da931be6d5d46ecdb83efe4354 100644 (file)
@@ -35,7 +35,6 @@
 
 extern void mips_reboot_setup(void);
 extern void mips_time_init(void);
-extern void mips_timer_setup(struct irqaction *irq);
 extern unsigned long mips_rtc_get_time(void);
 
 #ifdef CONFIG_KGDB
@@ -63,7 +62,6 @@ void __init plat_mem_setup(void)
        mips_reboot_setup();
 
        board_time_init = mips_time_init;
-       board_timer_setup = mips_timer_setup;
        rtc_mips_get_time = mips_rtc_get_time;
 }
 
index c89fcf9e9c22f51fd88c74e3a0f941a441edc168..be80c5dd4a0c2861dd058984f35d9787dd75cb57 100644 (file)
@@ -47,43 +47,45 @@ static char *mtypes[3] = {
 };
 #endif
 
+/* determined physical memory size, not overridden by command line args  */
+unsigned long physical_memsize = 0L;
+
 struct prom_pmemblock * __init prom_getmdesc(void)
 {
        char *memsize_str;
        unsigned int memsize;
        char cmdline[CL_SIZE], *ptr;
 
-       /* Check the command line first for a memsize directive */
-       strcpy(cmdline, arcs_cmdline);
-       ptr = strstr(cmdline, "memsize=");
-       if (ptr && (ptr != cmdline) && (*(ptr - 1) != ' '))
-               ptr = strstr(ptr, " memsize=");
-
-       if (ptr) {
-               memsize = memparse(ptr + 8, &ptr);
-       }
-       else {
-               /* otherwise look in the environment */
-               memsize_str = prom_getenv("memsize");
-               if (!memsize_str) {
-                       prom_printf("memsize not set in boot prom, set to default (32Mb)\n");
-                       memsize = 0x02000000;
-               } else {
+       /* otherwise look in the environment */
+       memsize_str = prom_getenv("memsize");
+       if (!memsize_str) {
+               prom_printf("memsize not set in boot prom, set to default (32Mb)\n");
+               physical_memsize = 0x02000000;
+       } else {
 #ifdef DEBUG
-                       prom_printf("prom_memsize = %s\n", memsize_str);
+               prom_printf("prom_memsize = %s\n", memsize_str);
 #endif
-                       memsize = simple_strtol(memsize_str, NULL, 0);
-               }
+               physical_memsize = simple_strtol(memsize_str, NULL, 0);
        }
 
 #ifdef CONFIG_CPU_BIG_ENDIAN
-       /*
-        * SOC-it swaps, or perhaps doesn't swap, when DMA'ing the last
-        * word of physical memory
-        */
-       memsize -= PAGE_SIZE;
+       /* SOC-it swaps, or perhaps doesn't swap, when DMA'ing the last
+          word of physical memory */
+       physical_memsize -= PAGE_SIZE;
 #endif
 
+       /* Check the command line for a memsize directive that overrides
+          the physical/default amount */
+       strcpy(cmdline, arcs_cmdline);
+       ptr = strstr(cmdline, "memsize=");
+       if (ptr && (ptr != cmdline) && (*(ptr - 1) != ' '))
+               ptr = strstr(ptr, " memsize=");
+
+       if (ptr)
+               memsize = memparse(ptr + 8, &ptr);
+       else
+               memsize = physical_memsize;
+
        memset(mdesc, 0, sizeof(mdesc));
 
        mdesc[0].type = yamon_dontuse;
index 5e207760826bd92bd2e3d6732200a07fceadfc80..557bf961f36a34ad1f4b8e9484565abefbcd37de 100644 (file)
@@ -228,9 +228,7 @@ unsigned long __init mips_rtc_get_time(void)
 
 void __init mips_time_init(void)
 {
-       unsigned int est_freq, flags;
-
-       local_irq_save(flags);
+       unsigned int est_freq;
 
         /* Set Data mode - binary. */
         CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL);
@@ -241,11 +239,9 @@ void __init mips_time_init(void)
               (est_freq%1000000)*100/1000000);
 
         cpu_khz = est_freq / 1000;
-
-       local_irq_restore(flags);
 }
 
-void __init mips_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        if (cpu_has_veic) {
                set_vi_handler (MSC01E_INT_CPUCTR, mips_timer_dispatch);
index bc4ac6f018778251c687703992bc6a988b8adbcd..ab460f805befcc57eb28a22ac63a14a80e8b7552 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/sched.h>
 #include <linux/ioport.h>
 #include <linux/pci.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 
 #ifdef CONFIG_MTD
 #include <linux/mtd/partitions.h>
@@ -44,7 +44,6 @@
 
 extern void mips_reboot_setup(void);
 extern void mips_time_init(void);
-extern void mips_timer_setup(struct irqaction *irq);
 extern unsigned long mips_rtc_get_time(void);
 
 #ifdef CONFIG_KGDB
@@ -223,6 +222,5 @@ void __init plat_mem_setup(void)
        mips_reboot_setup();
 
        board_time_init = mips_time_init;
-       board_timer_setup = mips_timer_setup;
        rtc_mips_get_time = mips_rtc_get_time;
 }
index a856bd6648798d4310c30517d2848c68287dbaca..a189dec7c7bc8603ebecce5eab41570144ca236e 100644 (file)
@@ -35,7 +35,6 @@
 
 extern void mips_reboot_setup(void);
 extern void mips_time_init(void);
-extern void mips_timer_setup(struct irqaction *irq);
 
 static void __init serial_init(void);
 
@@ -51,7 +50,6 @@ void __init plat_mem_setup(void)
        serial_init ();
 
        board_time_init = mips_time_init;
-       board_timer_setup = mips_timer_setup;
 
        mips_reboot_setup();
 }
index 5b977de4ecffe7aa9de2d0be9711e3548dce528f..a12e32aafde09476bd230a0b37aa679e914201c5 100644 (file)
@@ -15,6 +15,5 @@
 # 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
 #
 
-obj-y := sim_setup.o sim_mem.o sim_time.o sim_printf.o sim_int.o sim_irq.o \
-       sim_cmdline.o
+obj-y := sim_setup.o sim_mem.o sim_time.o sim_printf.o sim_int.o sim_cmdline.o
 obj-$(CONFIG_SMP) += sim_smp.o
diff --git a/arch/mips/mips-boards/sim/sim_IRQ.c b/arch/mips/mips-boards/sim/sim_IRQ.c
deleted file mode 100644 (file)
index ec549f3..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 1999, 2000 MIPS Technologies, Inc.  All rights reserved.
- *
- *  This program is free software; you can distribute it and/or modify it
- *  under the terms of the GNU General Public License (Version 2) as
- *  published by the Free Software Foundation.
- *
- *  This program is distributed in the hope it will be useful, but WITHOUT
- *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- *  for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Interrupt exception dispatch code.
- */
-
-#include <asm/asm.h>
-#include <asm/mipsregs.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-
-/* A lot of complication here is taken away because:
- *
- * 1) We handle one interrupt and return, sitting in a loop and moving across
- *    all the pending IRQ bits in the cause register is _NOT_ the answer, the
- *    common case is one pending IRQ so optimize in that direction.
- *
- * 2) We need not check against bits in the status register IRQ mask, that
- *    would make this routine slow as hell.
- *
- * 3) Linux only thinks in terms of all IRQs on or all IRQs off, nothing in
- *    between like BSD spl() brain-damage.
- *
- * Furthermore, the IRQs on the MIPS board look basically (barring software
- * IRQs which we don't use at all and all external interrupt sources are
- * combined together on hardware interrupt 0 (MIPS IRQ 2)) like:
- *
- *     MIPS IRQ        Source
- *      --------        ------
- *             0       Software (ignored)
- *             1        Software (ignored)
- *             2        Combined hardware interrupt (hw0)
- *             3        Hardware (ignored)
- *             4        Hardware (ignored)
- *             5        Hardware (ignored)
- *             6        Hardware (ignored)
- *             7        R4k timer (what we use)
- *
- * Note: On the SEAD board thing are a little bit different.
- *       Here IRQ 2 (hw0) is wired to the UART0 and IRQ 3 (hw1) is wired
- *       wired to UART1.
- *
- * We handle the IRQ according to _our_ priority which is:
- *
- * Highest ----     R4k Timer
- * Lowest  ----     Combined hardware interrupt
- *
- * then we just return, if multiple IRQs are pending then we will just take
- * another exception, big deal.
- */
-
-       .text
-       .set    noreorder
-       .set    noat
-       .align  5
-       NESTED(mipsIRQ, PT_SIZE, sp)
-       SAVE_ALL
-       CLI
-       .set    at
-
-       mfc0    s0, CP0_CAUSE           # get irq bits
-       mfc0    s1, CP0_STATUS          # get irq mask
-       and     s0, s1
-
-       /* First we check for r4k counter/timer IRQ. */
-       andi    a0, s0, CAUSEF_IP7
-       beq     a0, zero, 1f
-        andi   a0, s0, CAUSEF_IP2      # delay slot, check hw0 interrupt
-
-       /* Wheee, a timer interrupt. */
-       move    a0, sp
-       jal     mips_timer_interrupt
-        nop
-
-       j       ret_from_irq
-        nop
-
-1:
-#if defined(CONFIG_MIPS_SEAD)
-       beq     a0, zero, 1f
-        andi   a0, s0, CAUSEF_IP3      # delay slot, check hw1 interrupt
-#else
-       beq     a0, zero, 1f            # delay slot, check hw3 interrupt
-        andi   a0, s0, CAUSEF_IP5
-#endif
-
-       /* Wheee, combined hardware level zero interrupt. */
-#if defined(CONFIG_MIPS_ATLAS)
-       jal     atlas_hw0_irqdispatch
-#elif defined(CONFIG_MIPS_MALTA)
-       jal     malta_hw0_irqdispatch
-#elif defined(CONFIG_MIPS_SEAD)
-       jal     sead_hw0_irqdispatch
-#else
-#error "MIPS board not supported\n"
-#endif
-        move   a0, sp                  # delay slot
-
-       j       ret_from_irq
-        nop                            # delay slot
-
-1:
-#if defined(CONFIG_MIPS_SEAD)
-       beq     a0, zero, 1f
-        andi   a0, s0, CAUSEF_IP5      # delay slot, check hw3 interrupt
-       jal     sead_hw1_irqdispatch
-        move   a0, sp                  # delay slot
-       j       ret_from_irq
-        nop                            # delay slot
-1:
-#endif
-#if defined(CONFIG_MIPS_MALTA)
-       beq     a0, zero, 1f            # check hw3 (coreHI) interrupt
-        nop
-       jal     corehi_irqdispatch
-        move   a0, sp
-       j       ret_from_irq
-        nop
-1:
-#endif
-       /*
-        * Here by mistake?  This is possible, what can happen is that by the
-        * time we take the exception the IRQ pin goes low, so just leave if
-        * this is the case.
-        */
-       move    a1,s0
-       PRINT("Got interrupt: c0_cause = %08x\n")
-       mfc0    a1, CP0_EPC
-       PRINT("c0_epc = %08x\n")
-
-       j       ret_from_irq
-        nop
-       END(mipsIRQ)
diff --git a/arch/mips/mips-boards/sim/sim_irq.S b/arch/mips/mips-boards/sim/sim_irq.S
deleted file mode 100644 (file)
index b7444e7..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 1999, 2005 MIPS Technologies, Inc.  All rights reserved.
- *
- *  This program is free software; you can distribute it and/or modify it
- *  under the terms of the GNU General Public License (Version 2) as
- *  published by the Free Software Foundation.
- *
- *  This program is distributed in the hope it will be useful, but WITHOUT
- *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- *  for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Interrupt exception dispatch code.
- *
- */
-
-#include <asm/asm.h>
-#include <asm/mipsregs.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-
-#include <asm/mips-boards/simint.h>
-
-
-       .text
-       .set    noreorder
-       .set    noat
-       .align  5
-       NESTED(simIRQ, PT_SIZE, sp)
-       SAVE_ALL
-       CLI
-       .set    at
-
-       mfc0    s0, CP0_CAUSE           # get irq bits
-       mfc0    s1, CP0_STATUS          # get irq mask
-       andi    s0, ST0_IM              # CAUSE.CE may be non-zero!
-       and     s0, s1
-
-#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64)
-       .set    mips32
-       clz     a0, s0
-       .set    mips0
-       negu    a0
-       addu    a0, 31-CAUSEB_IP
-       bltz    a0, spurious
-#else
-       beqz    s0, spurious
-        li     a0, 7
-
-       and     t0, s0, 0xf000
-       sltiu   t0, t0, 1
-       sll     t0, 2
-       subu    a0, t0
-       sll     s0, t0
-
-       and     t0, s0, 0xc000
-       sltiu   t0, t0, 1
-       sll     t0, 1
-       subu    a0, t0
-       sll     s0, t0
-
-       and     t0, s0, 0x8000
-       sltiu   t0, t0, 1
-       # sll   t0, 0
-       subu    a0, t0
-       # sll   s0, t0
-#endif
-
-#ifdef CASCADE_IRQ
-        li     a1, CASCADE_IRQ
-       bne     a0, a1, 1f
-        addu   a0, MIPSCPU_INT_BASE
-
-       jal     CASCADE_DISPATCH
-        move    a0, sp
-
-       j       ret_from_irq
-        nop
-1:
-#else
-        addu   a0, MIPSCPU_INT_BASE
-#endif
-
-       jal     do_IRQ
-        move   a1, sp
-
-       j       ret_from_irq
-        nop
-
-
-spurious:
-       jal     spurious_interrupt
-        nop
-       j       ret_from_irq
-        nop
-       END(simIRQ)
index 3d4a785b565a4e17d65044c0b29df4c7521863ed..2659c1c3b78d923e6bb1e42e0fec14e2a2873b67 100644 (file)
@@ -37,7 +37,6 @@
 
 
 extern void sim_time_init(void);
-extern void sim_timer_setup(struct irqaction *irq);
 static void __init serial_init(void);
 unsigned int _isbonito = 0;
 
@@ -56,7 +55,6 @@ void __init plat_mem_setup(void)
        serial_init();
 
        board_time_init = sim_time_init;
-       board_timer_setup = sim_timer_setup;
        prom_printf("Linux started...\n");
 
 #ifdef CONFIG_MT_SMP
index e7f6003357f7f24cf9391ff10f8f9cfdc22ee638..230929ecd57f3cbd8e4fb5a7872d5beedf2a194a 100644 (file)
@@ -33,8 +33,6 @@
 
 unsigned long cpu_khz;
 
-extern asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs);
-
 irqreturn_t sim_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 #ifdef CONFIG_SMP
@@ -185,7 +183,7 @@ static void mips_timer_dispatch (struct pt_regs *regs)
 }
 
 
-void __init sim_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        if (cpu_has_veic) {
                set_vi_handler(MSC01E_INT_CPUCTR, mips_timer_dispatch);
index 857b726f4d412874c12fe069fa8920ea8162e19d..069803f58f3b2bb2c47676d49d574f15d45433cf 100644 (file)
@@ -578,7 +578,7 @@ static inline void local_r4k_flush_icache_page(void *args)
         * secondary cache will result in any entries in the primary caches
         * also getting invalidated which hopefully is a bit more economical.
         */
-       if (cpu_has_subset_pcaches) {
+       if (cpu_has_inclusive_pcaches) {
                unsigned long addr = (unsigned long) page_address(page);
 
                r4k_blast_scache_page(addr);
@@ -634,7 +634,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)
        /* Catch bad driver code */
        BUG_ON(size == 0);
 
-       if (cpu_has_subset_pcaches) {
+       if (cpu_has_inclusive_pcaches) {
                if (size >= scache_size)
                        r4k_blast_scache();
                else
@@ -662,7 +662,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)
        /* Catch bad driver code */
        BUG_ON(size == 0);
 
-       if (cpu_has_subset_pcaches) {
+       if (cpu_has_inclusive_pcaches) {
                if (size >= scache_size)
                        r4k_blast_scache();
                else
@@ -862,15 +862,18 @@ static void __init probe_pcache(void)
                break;
 
        case CPU_VR4133:
-               write_c0_config(config & ~CONF_EB);
+               write_c0_config(config & ~VR41_CONF_P4K);
        case CPU_VR4131:
                /* Workaround for cache instruction bug of VR4131 */
                if (c->processor_id == 0x0c80U || c->processor_id == 0x0c81U ||
                    c->processor_id == 0x0c82U) {
-                       config &= ~0x00000030U;
-                       config |= 0x00410000U;
+                       config |= 0x00400000U;
+                       if (c->processor_id == 0x0c80U)
+                               config |= VR41_CONF_BP;
                        write_c0_config(config);
-               }
+               } else
+                       c->options |= MIPS_CPU_CACHE_CDEX_P;
+
                icache_size = 1 << (10 + ((config & CONF_IC) >> 9));
                c->icache.linesz = 16 << ((config & CONF_IB) >> 5);
                c->icache.ways = 2;
@@ -880,8 +883,6 @@ static void __init probe_pcache(void)
                c->dcache.linesz = 16 << ((config & CONF_DB) >> 4);
                c->dcache.ways = 2;
                c->dcache.waybit = __ffs(dcache_size/2);
-
-               c->options |= MIPS_CPU_CACHE_CDEX_P;
                break;
 
        case CPU_VR41XX:
@@ -1192,7 +1193,7 @@ static void __init setup_scache(void)
        printk("Unified secondary cache %ldkB %s, linesize %d bytes.\n",
               scache_size >> 10, way_string[c->scache.ways], c->scache.linesz);
 
-       c->options |= MIPS_CPU_SUBSET_CACHES;
+       c->options |= MIPS_CPU_INCLUSIVE_CACHES;
 }
 
 void au1x00_fixup_config_od(void)
index 802bdd32aa2b17a5bda17f664d487fe92e8e9816..c52497bb102aeede27a3db0dd103ecc3d7c0a207 100644 (file)
@@ -139,10 +139,36 @@ void __init fixrange_init(unsigned long start, unsigned long end,
 #ifndef CONFIG_NEED_MULTIPLE_NODES
 extern void pagetable_init(void);
 
+static int __init page_is_ram(unsigned long pagenr)
+{
+       int i;
+
+       for (i = 0; i < boot_mem_map.nr_map; i++) {
+               unsigned long addr, end;
+
+               if (boot_mem_map.map[i].type != BOOT_MEM_RAM)
+                       /* not usable memory */
+                       continue;
+
+               addr = PFN_UP(boot_mem_map.map[i].addr);
+               end = PFN_DOWN(boot_mem_map.map[i].addr +
+                              boot_mem_map.map[i].size);
+
+               if (pagenr >= addr && pagenr < end)
+                       return 1;
+       }
+
+       return 0;
+}
+
 void __init paging_init(void)
 {
-       unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
+       unsigned long zones_size[] = { [0 ... MAX_NR_ZONES - 1] = 0 };
        unsigned long max_dma, high, low;
+#ifndef CONFIG_FLATMEM
+       unsigned long zholes_size[] = { [0 ... MAX_NR_ZONES - 1] = 0 };
+       unsigned long i, j, pfn;
+#endif
 
        pagetable_init();
 
@@ -174,29 +200,16 @@ void __init paging_init(void)
                zones_size[ZONE_HIGHMEM] = high - low;
 #endif
 
+#ifdef CONFIG_FLATMEM
        free_area_init(zones_size);
-}
-
-static inline int page_is_ram(unsigned long pagenr)
-{
-       int i;
-
-       for (i = 0; i < boot_mem_map.nr_map; i++) {
-               unsigned long addr, end;
-
-               if (boot_mem_map.map[i].type != BOOT_MEM_RAM)
-                       /* not usable memory */
-                       continue;
-
-               addr = PFN_UP(boot_mem_map.map[i].addr);
-               end = PFN_DOWN(boot_mem_map.map[i].addr +
-                              boot_mem_map.map[i].size);
-
-               if (pagenr >= addr && pagenr < end)
-                       return 1;
-       }
-
-       return 0;
+#else
+       pfn = 0;
+       for (i = 0; i < MAX_NR_ZONES; i++)
+               for (j = 0; j < zones_size[i]; j++, pfn++)
+                       if (!page_is_ram(pfn))
+                               zholes_size[i]++;
+       free_area_init_node(0, NODE_DATA(0), zones_size, 0, zholes_size);
+#endif
 }
 
 static struct kcore_list kcore_mem, kcore_vmalloc;
@@ -213,9 +226,9 @@ void __init mem_init(void)
 #ifdef CONFIG_DISCONTIGMEM
 #error "CONFIG_HIGHMEM and CONFIG_DISCONTIGMEM dont work together yet"
 #endif
-       max_mapnr = num_physpages = highend_pfn;
+       max_mapnr = highend_pfn;
 #else
-       max_mapnr = num_physpages = max_low_pfn;
+       max_mapnr = max_low_pfn;
 #endif
        high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
 
@@ -229,6 +242,7 @@ void __init mem_init(void)
                        if (PageReserved(pfn_to_page(tmp)))
                                reservedpages++;
                }
+       num_physpages = ram;
 
 #ifdef CONFIG_HIGHMEM
        for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) {
@@ -247,6 +261,7 @@ void __init mem_init(void)
                totalhigh_pages++;
        }
        totalram_pages += totalhigh_pages;
+       num_physpages += totalhigh_pages;
 #endif
 
        codesize =  (unsigned long) &_etext - (unsigned long) &_text;
index 792c6eb442326790b72759d7ca5e8cd433f838af..c93aa6cbcaca5ece41421a2a2661adb5b7e3e669 100644 (file)
@@ -15,6 +15,8 @@ void show_mem(void)
        printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
        pfn = max_mapnr;
        while (pfn-- > 0) {
+               if (!pfn_valid(pfn))
+                       continue;
                page = pfn_to_page(pfn);
                total++;
                if (PageHighMem(page))
index e1a8139fc8fb2cdb3225114163bf7e4c8e70850b..375e0991505d98d554a857b6315e7e04940be801 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Synthesize TLB refill handlers at runtime.
  *
- * Copyright (C) 2004,2005 by Thiemo Seufer
+ * Copyright (C) 2004,2005,2006 by Thiemo Seufer
  * Copyright (C) 2005  Maciej W. Rozycki
  * Copyright (C) 2006  Ralf Baechle (ralf@linux-mips.org)
  *
@@ -35,8 +35,6 @@
 #include <asm/smp.h>
 #include <asm/war.h>
 
-/* #define DEBUG_TLB */
-
 static __init int __attribute__((unused)) r45k_bvahwbug(void)
 {
        /* XXX: We should probe for the presence of this bug, but we don't. */
@@ -728,6 +726,7 @@ static void __init build_r3000_tlb_refill_handler(void)
 {
        long pgdc = (long)pgd_current;
        u32 *p;
+       int i;
 
        memset(tlb_handler, 0, sizeof(tlb_handler));
        p = tlb_handler;
@@ -753,16 +752,14 @@ static void __init build_r3000_tlb_refill_handler(void)
        if (p > tlb_handler + 32)
                panic("TLB refill handler space exceeded");
 
-       printk("Synthesized TLB refill handler (%u instructions).\n",
-              (unsigned int)(p - tlb_handler));
-#ifdef DEBUG_TLB
-       {
-               int i;
+       pr_info("Synthesized TLB refill handler (%u instructions).\n",
+               (unsigned int)(p - tlb_handler));
 
-               for (i = 0; i < (p - tlb_handler); i++)
-                       printk("%08x\n", tlb_handler[i]);
-       }
-#endif
+       pr_debug("\t.set push\n");
+       pr_debug("\t.set noreorder\n");
+       for (i = 0; i < (p - tlb_handler); i++)
+               pr_debug("\t.word 0x%08x\n", tlb_handler[i]);
+       pr_debug("\t.set pop\n");
 
        memcpy((void *)ebase, tlb_handler, 0x80);
 }
@@ -1175,6 +1172,7 @@ static void __init build_r4000_tlb_refill_handler(void)
        struct reloc *r = relocs;
        u32 *f;
        unsigned int final_len;
+       int i;
 
        memset(tlb_handler, 0, sizeof(tlb_handler));
        memset(labels, 0, sizeof(labels));
@@ -1272,24 +1270,21 @@ static void __init build_r4000_tlb_refill_handler(void)
 #endif /* CONFIG_64BIT */
 
        resolve_relocs(relocs, labels);
-       printk("Synthesized TLB refill handler (%u instructions).\n",
-              final_len);
-
-#ifdef DEBUG_TLB
-       {
-               int i;
+       pr_info("Synthesized TLB refill handler (%u instructions).\n",
+               final_len);
 
-               f = final_handler;
+       f = final_handler;
 #ifdef CONFIG_64BIT
-               if (final_len > 32)
-                       final_len = 64;
-               else
-                       f = final_handler + 32;
+       if (final_len > 32)
+               final_len = 64;
+       else
+               f = final_handler + 32;
 #endif /* CONFIG_64BIT */
-               for (i = 0; i < final_len; i++)
-                       printk("%08x\n", f[i]);
-       }
-#endif
+       pr_debug("\t.set push\n");
+       pr_debug("\t.set noreorder\n");
+       for (i = 0; i < final_len; i++)
+               pr_debug("\t.word 0x%08x\n", f[i]);
+       pr_debug("\t.set pop\n");
 
        memcpy((void *)ebase, final_handler, 0x100);
 }
@@ -1522,6 +1517,7 @@ static void __init build_r3000_tlb_load_handler(void)
        u32 *p = handle_tlbl;
        struct label *l = labels;
        struct reloc *r = relocs;
+       int i;
 
        memset(handle_tlbl, 0, sizeof(handle_tlbl));
        memset(labels, 0, sizeof(labels));
@@ -1541,17 +1537,14 @@ static void __init build_r3000_tlb_load_handler(void)
                panic("TLB load handler fastpath space exceeded");
 
        resolve_relocs(relocs, labels);
-       printk("Synthesized TLB load handler fastpath (%u instructions).\n",
-              (unsigned int)(p - handle_tlbl));
-
-#ifdef DEBUG_TLB
-       {
-               int i;
+       pr_info("Synthesized TLB load handler fastpath (%u instructions).\n",
+               (unsigned int)(p - handle_tlbl));
 
-               for (i = 0; i < (p - handle_tlbl); i++)
-                       printk("%08x\n", handle_tlbl[i]);
-       }
-#endif
+       pr_debug("\t.set push\n");
+       pr_debug("\t.set noreorder\n");
+       for (i = 0; i < (p - handle_tlbl); i++)
+               pr_debug("\t.word 0x%08x\n", handle_tlbl[i]);
+       pr_debug("\t.set pop\n");
 }
 
 static void __init build_r3000_tlb_store_handler(void)
@@ -1559,6 +1552,7 @@ static void __init build_r3000_tlb_store_handler(void)
        u32 *p = handle_tlbs;
        struct label *l = labels;
        struct reloc *r = relocs;
+       int i;
 
        memset(handle_tlbs, 0, sizeof(handle_tlbs));
        memset(labels, 0, sizeof(labels));
@@ -1578,17 +1572,14 @@ static void __init build_r3000_tlb_store_handler(void)
                panic("TLB store handler fastpath space exceeded");
 
        resolve_relocs(relocs, labels);
-       printk("Synthesized TLB store handler fastpath (%u instructions).\n",
-              (unsigned int)(p - handle_tlbs));
+       pr_info("Synthesized TLB store handler fastpath (%u instructions).\n",
+               (unsigned int)(p - handle_tlbs));
 
-#ifdef DEBUG_TLB
-       {
-               int i;
-
-               for (i = 0; i < (p - handle_tlbs); i++)
-                       printk("%08x\n", handle_tlbs[i]);
-       }
-#endif
+       pr_debug("\t.set push\n");
+       pr_debug("\t.set noreorder\n");
+       for (i = 0; i < (p - handle_tlbs); i++)
+               pr_debug("\t.word 0x%08x\n", handle_tlbs[i]);
+       pr_debug("\t.set pop\n");
 }
 
 static void __init build_r3000_tlb_modify_handler(void)
@@ -1596,6 +1587,7 @@ static void __init build_r3000_tlb_modify_handler(void)
        u32 *p = handle_tlbm;
        struct label *l = labels;
        struct reloc *r = relocs;
+       int i;
 
        memset(handle_tlbm, 0, sizeof(handle_tlbm));
        memset(labels, 0, sizeof(labels));
@@ -1615,17 +1607,14 @@ static void __init build_r3000_tlb_modify_handler(void)
                panic("TLB modify handler fastpath space exceeded");
 
        resolve_relocs(relocs, labels);
-       printk("Synthesized TLB modify handler fastpath (%u instructions).\n",
-              (unsigned int)(p - handle_tlbm));
+       pr_info("Synthesized TLB modify handler fastpath (%u instructions).\n",
+               (unsigned int)(p - handle_tlbm));
 
-#ifdef DEBUG_TLB
-       {
-               int i;
-
-               for (i = 0; i < (p - handle_tlbm); i++)
-                       printk("%08x\n", handle_tlbm[i]);
-       }
-#endif
+       pr_debug("\t.set push\n");
+       pr_debug("\t.set noreorder\n");
+       for (i = 0; i < (p - handle_tlbm); i++)
+               pr_debug("\t.word 0x%08x\n", handle_tlbm[i]);
+       pr_debug("\t.set pop\n");
 }
 
 /*
@@ -1677,6 +1666,7 @@ static void __init build_r4000_tlb_load_handler(void)
        u32 *p = handle_tlbl;
        struct label *l = labels;
        struct reloc *r = relocs;
+       int i;
 
        memset(handle_tlbl, 0, sizeof(handle_tlbl));
        memset(labels, 0, sizeof(labels));
@@ -1704,17 +1694,14 @@ static void __init build_r4000_tlb_load_handler(void)
                panic("TLB load handler fastpath space exceeded");
 
        resolve_relocs(relocs, labels);
-       printk("Synthesized TLB load handler fastpath (%u instructions).\n",
-              (unsigned int)(p - handle_tlbl));
-
-#ifdef DEBUG_TLB
-       {
-               int i;
+       pr_info("Synthesized TLB load handler fastpath (%u instructions).\n",
+               (unsigned int)(p - handle_tlbl));
 
-               for (i = 0; i < (p - handle_tlbl); i++)
-                       printk("%08x\n", handle_tlbl[i]);
-       }
-#endif
+       pr_debug("\t.set push\n");
+       pr_debug("\t.set noreorder\n");
+       for (i = 0; i < (p - handle_tlbl); i++)
+               pr_debug("\t.word 0x%08x\n", handle_tlbl[i]);
+       pr_debug("\t.set pop\n");
 }
 
 static void __init build_r4000_tlb_store_handler(void)
@@ -1722,6 +1709,7 @@ static void __init build_r4000_tlb_store_handler(void)
        u32 *p = handle_tlbs;
        struct label *l = labels;
        struct reloc *r = relocs;
+       int i;
 
        memset(handle_tlbs, 0, sizeof(handle_tlbs));
        memset(labels, 0, sizeof(labels));
@@ -1740,17 +1728,14 @@ static void __init build_r4000_tlb_store_handler(void)
                panic("TLB store handler fastpath space exceeded");
 
        resolve_relocs(relocs, labels);
-       printk("Synthesized TLB store handler fastpath (%u instructions).\n",
-              (unsigned int)(p - handle_tlbs));
-
-#ifdef DEBUG_TLB
-       {
-               int i;
+       pr_info("Synthesized TLB store handler fastpath (%u instructions).\n",
+               (unsigned int)(p - handle_tlbs));
 
-               for (i = 0; i < (p - handle_tlbs); i++)
-                       printk("%08x\n", handle_tlbs[i]);
-       }
-#endif
+       pr_debug("\t.set push\n");
+       pr_debug("\t.set noreorder\n");
+       for (i = 0; i < (p - handle_tlbs); i++)
+               pr_debug("\t.word 0x%08x\n", handle_tlbs[i]);
+       pr_debug("\t.set pop\n");
 }
 
 static void __init build_r4000_tlb_modify_handler(void)
@@ -1758,6 +1743,7 @@ static void __init build_r4000_tlb_modify_handler(void)
        u32 *p = handle_tlbm;
        struct label *l = labels;
        struct reloc *r = relocs;
+       int i;
 
        memset(handle_tlbm, 0, sizeof(handle_tlbm));
        memset(labels, 0, sizeof(labels));
@@ -1777,17 +1763,14 @@ static void __init build_r4000_tlb_modify_handler(void)
                panic("TLB modify handler fastpath space exceeded");
 
        resolve_relocs(relocs, labels);
-       printk("Synthesized TLB modify handler fastpath (%u instructions).\n",
-              (unsigned int)(p - handle_tlbm));
-
-#ifdef DEBUG_TLB
-       {
-               int i;
-
-               for (i = 0; i < (p - handle_tlbm); i++)
-                       printk("%08x\n", handle_tlbm[i]);
-       }
-#endif
+       pr_info("Synthesized TLB modify handler fastpath (%u instructions).\n",
+               (unsigned int)(p - handle_tlbm));
+
+       pr_debug("\t.set push\n");
+       pr_debug("\t.set noreorder\n");
+       for (i = 0; i < (p - handle_tlbm); i++)
+               pr_debug("\t.word 0x%08x\n", handle_tlbm[i]);
+       pr_debug("\t.set pop\n");
 }
 
 void __init build_tlb_refill_handler(void)
index b08e6a0456c1e182d1382a0bd68704c471b7d408..e6fe2992227d7b728fc7fcbaad2734444ad18dc9 100644 (file)
@@ -212,7 +212,7 @@ int m48t37y_set_time(unsigned long sec)
        return 0;
 }
 
-void momenco_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        setup_irq(8, irq);
 }
@@ -226,7 +226,6 @@ void momenco_time_init(void)
        wire_stupidity_into_tlb();
 
        mips_hpt_frequency = cpu_clock / 2;
-       board_timer_setup = momenco_timer_setup;
 
        rtc_mips_get_time = m48t37y_get_time;
        rtc_mips_set_time = m48t37y_set_time;
index 8c53490ba6f10acdb2c69a536dcacaac7f20ed29..435d0787329ebba91867c2fea4ab4b326328531e 100644 (file)
@@ -197,7 +197,7 @@ int m48t37y_set_time(unsigned long sec)
        return 0;
 }
 
-void momenco_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        setup_irq(7, irq);      /* Timer interrupt, unmask status IM7 */
 }
@@ -211,7 +211,6 @@ void momenco_time_init(void)
         * the Rm7900 and the Rm7065C
         */
        mips_hpt_frequency = cpu_clock / 2;
-       board_timer_setup = momenco_timer_setup;
 
        rtc_mips_get_time = m48t37y_get_time;
        rtc_mips_set_time = m48t37y_set_time;
index 31d179c4673fe55cf9c812bcd813963b547a8fa1..a5dc230520dffc9bdb06924c8c1dff8bc5cf7d9a 100644 (file)
@@ -128,7 +128,7 @@ void ll_cpci_irq(struct pt_regs *regs)
 
 #define shutdown_cpci_irq      disable_cpci_irq
 
-struct hw_interrupt_type cpci_irq_type = {
+struct irq_chip cpci_irq_type = {
        .typename = "CPCI/FPGA",
        .startup = startup_cpci_irq,
        .shutdown = shutdown_cpci_irq,
index 6a4519936ee97d1e2c0d6075134435ff28d55726..36f570ecc6fb70c61597ddc459062d117260f800 100644 (file)
@@ -209,7 +209,7 @@ int m48t37y_set_time(unsigned long sec)
        return 0;
 }
 
-void momenco_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        setup_irq(7, irq);
 }
@@ -224,7 +224,6 @@ void momenco_time_init(void)
 #error Unknown CPU for this board
 #endif
        printk("momenco_time_init cpu_clock=%d\n", cpu_clock);
-       board_timer_setup = momenco_timer_setup;
 
        rtc_mips_get_time = m48t37y_get_time;
        rtc_mips_set_time = m48t37y_set_time;
index 852265026fd1f5b830e3e172268c1b7a7425ab35..9f33d8f1d8268fe859fecaae7e95a390b87d7fec 100644 (file)
@@ -121,7 +121,7 @@ void ll_uart_irq(struct pt_regs *regs)
 
 #define shutdown_uart_irq      disable_uart_irq
 
-struct hw_interrupt_type uart_irq_type = {
+struct irq_chip uart_irq_type = {
        .typename = "UART/FPGA",
        .startup = startup_uart_irq,
        .shutdown = shutdown_uart_irq,
index a09c5f901233a3468c85f321250861c9cc275695..a175d673540f9af91e8b460b30e02785436cd688 100644 (file)
@@ -49,6 +49,7 @@ static inline unsigned int r_c0_ ## r ## n(void)                      \
        default:                                                        \
                BUG();                                                  \
        }                                                               \
+       return 0;                                                       \
 }                                                                      \
                                                                        \
 static inline void w_c0_ ## r ## n(unsigned int value)                 \
@@ -65,6 +66,7 @@ static inline void w_c0_ ## r ## n(unsigned int value)                        \
        default:                                                        \
                BUG();                                                  \
        }                                                               \
+       return;                                                         \
 }                                                                      \
 
 __define_perf_accessors(perfcntr, 0, 2)
index 3a34cd0efd6b0db9a9dbc48b34c32bfc5f5a8452..7abcfd175d43d3eb9f40db583b65e3a7c31ecb27 100644 (file)
@@ -23,7 +23,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
index b67ddaa47122768bd3070b0374e460fb37fc0d6e..3c9ae41f7517333bd23f7db276e64a5d7d0f4db0 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/pci.h>
 
 #include <asm/vr41xx/mpc30x.h>
-#include <asm/vr41xx/vrc4173.h>
 
 static const int internal_func_irqs[] __initdata = {
        VRC4173_CASCADE_IRQ,
index e21b11bf66bc5d4676f597718d2efadc851f9b88..38f181625e109715bc1fed265a23de95ae8d4577 100644 (file)
@@ -23,7 +23,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/pci.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
index 0f8b230057d373515cfc4521b2f58b3a3add8d82..d99591a0cdfe7abdfdeaf99a5a7218395edbfb82 100644 (file)
@@ -23,7 +23,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
index 8aca317d462423e69bc38f890b98f1acacdd2f2b..099679a9dfb9c9dbc56744499d1855ddf4799a04 100644 (file)
@@ -207,7 +207,7 @@ static void end_irq(unsigned int irq)
        }
 }
 
-static struct hw_interrupt_type level_irq_type = {
+static struct irq_chip level_irq_type = {
        .typename =     "PNX Level IRQ",
        .startup =      startup_irq,
        .shutdown =     shutdown_irq,
index 8ac81a9dc29327e743c7a9498090550b538065f0..36b0c8bc6c06197824c0ca65f5645fcbd869bfcf 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/ioport.h>
+#include <linux/irq.h>
 #include <linux/mm.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
@@ -48,10 +49,7 @@ extern void pnx8550_machine_halt(void);
 extern void pnx8550_machine_power_off(void);
 extern struct resource ioport_resource;
 extern struct resource iomem_resource;
-extern void (*board_time_init)(void);
 extern void pnx8550_time_init(void);
-extern void (*board_timer_setup)(struct irqaction *irq);
-extern void pnx8550_timer_setup(struct irqaction *irq);
 extern void rs_kgdb_hook(int tty_no);
 extern void prom_printf(char *fmt, ...);
 extern char *prom_getcmdline(void);
@@ -110,7 +108,6 @@ void __init plat_mem_setup(void)
         pm_power_off = pnx8550_machine_power_off;
 
        board_time_init = pnx8550_time_init;
-       board_timer_setup = pnx8550_timer_setup;
 
        /* Clear the Global 2 Register, PCI Inta Output Enable Registers
           Bit 1:Enable DAC Powerdown
index 70664ea96b924d5d62ba27f64a4d4e75cca0108d..0af655b1f3300367973128eea11b1626f8a65052 100644 (file)
@@ -70,16 +70,7 @@ void pnx8550_time_init(void)
        mips_hpt_frequency = 27UL * ((1000000UL * n)/(m * pow2p));
 }
 
-/*
- * pnx8550_timer_setup() - it does the following things:
- *
- * 5) board_timer_setup() -
- *     a) (optional) over-write any choices made above by time_init().
- *     b) machine specific code should setup the timer irqaction.
- *     c) enable the timer interrupt
- */
-
-void __init pnx8550_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        int configPR;
 
index aa0d6ff3c6ec83641cd17d1ac3e64fc9af0f4481..0a6ee8e5eec2d2e710fe0617769f5ceacd0f2484 100644 (file)
@@ -133,14 +133,13 @@ int m48t37y_set_time(unsigned long sec)
        return 0;
 }
 
-void yosemite_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        setup_irq(7, irq);
 }
 
 void yosemite_time_init(void)
 {
-       board_timer_setup = yosemite_timer_setup;
        mips_hpt_frequency = cpu_clock / 2;
 mips_hpt_frequency = 33000000 * 3 * 5;
 }
index c04ebcfc7843b6b751cb6a1bdf887a51312c3d4e..dbbe44ad7e890390ba4fae79c5502133ba293147 100644 (file)
@@ -1,4 +1,3 @@
-#include <linux/config.h>
 
 #include <asm/io.h>
 #include <asm/reboot.h>
index e100d6072e3100210653088bfe44d51cc25c7a74..841394336f0045d518104821de2c49c7b7aa9eb5 100644 (file)
@@ -11,7 +11,7 @@ const char *get_system_type(void)
        return "Qemu";
 }
 
-static void __init qemu_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        /* set the clock to 100 Hz */
        outb_p(0x34,0x43);              /* binary, mode 2, LSB/MSB, ch 0 */
@@ -23,7 +23,5 @@ static void __init qemu_timer_setup(struct irqaction *irq)
 void __init plat_mem_setup(void)
 {
        set_io_port_base(QEMU_PORT_BASE);
-       board_timer_setup = qemu_timer_setup;
-
        qemu_reboot_setup();
 }
index ce8e4a7869b04276477b32d26b5a8d0bdbad30dc..ee0514a2992278f80aaf03012ca8f8bc2663c169 100644 (file)
@@ -144,7 +144,7 @@ static void end_eisa1_irq(unsigned int irq)
                enable_eisa1_irq(irq);
 }
 
-static struct hw_interrupt_type ip22_eisa1_irq_type = {
+static struct irq_chip ip22_eisa1_irq_type = {
        .typename       = "IP22 EISA",
        .startup        = startup_eisa1_irq,
        .shutdown       = shutdown_eisa1_irq,
@@ -206,7 +206,7 @@ static void end_eisa2_irq(unsigned int irq)
                enable_eisa2_irq(irq);
 }
 
-static struct hw_interrupt_type ip22_eisa2_irq_type = {
+static struct irq_chip ip22_eisa2_irq_type = {
        .typename       = "IP22 EISA",
        .startup        = startup_eisa2_irq,
        .shutdown       = shutdown_eisa2_irq,
index 2d8762818d95f33a50b4073685fe77e6e6d01b9b..f66026e5d64b002f1cce34e60f451c62f674d793 100644 (file)
@@ -74,7 +74,7 @@ static void end_local0_irq (unsigned int irq)
                enable_local0_irq(irq);
 }
 
-static struct hw_interrupt_type ip22_local0_irq_type = {
+static struct irq_chip ip22_local0_irq_type = {
        .typename       = "IP22 local 0",
        .startup        = startup_local0_irq,
        .shutdown       = shutdown_local0_irq,
@@ -120,7 +120,7 @@ static void end_local1_irq (unsigned int irq)
                enable_local1_irq(irq);
 }
 
-static struct hw_interrupt_type ip22_local1_irq_type = {
+static struct irq_chip ip22_local1_irq_type = {
        .typename       = "IP22 local 1",
        .startup        = startup_local1_irq,
        .shutdown       = shutdown_local1_irq,
@@ -166,7 +166,7 @@ static void end_local2_irq (unsigned int irq)
                enable_local2_irq(irq);
 }
 
-static struct hw_interrupt_type ip22_local2_irq_type = {
+static struct irq_chip ip22_local2_irq_type = {
        .typename       = "IP22 local 2",
        .startup        = startup_local2_irq,
        .shutdown       = shutdown_local2_irq,
@@ -212,7 +212,7 @@ static void end_local3_irq (unsigned int irq)
                enable_local3_irq(irq);
 }
 
-static struct hw_interrupt_type ip22_local3_irq_type = {
+static struct irq_chip ip22_local3_irq_type = {
        .typename       = "IP22 local 3",
        .startup        = startup_local3_irq,
        .shutdown       = shutdown_local3_irq,
@@ -421,7 +421,7 @@ void __init arch_init_irq(void)
        mips_cpu_irq_init(SGINT_CPU);
 
        for (i = SGINT_LOCAL0; i < SGI_INTERRUPTS; i++) {
-               hw_irq_controller *handler;
+               struct irq_chip *handler;
 
                if (i < SGINT_LOCAL1)
                        handler         = &ip22_local0_irq_type;
index cca688ad64adaafc68d7e0a91aa1a1904f581d76..0e061890f7973fab7d33c114ae89a6820c6c44dd 100644 (file)
@@ -7,11 +7,12 @@
  * Ralf Baechle or David S. Miller (sorry guys, i'm really not sure)
  *
  * Copyright (C) 2001 by Ladislav Michl
- * Copyright (C) 2003 Ralf Baechle (ralf@linux-mips.org)
+ * Copyright (C) 2003, 06 Ralf Baechle (ralf@linux-mips.org)
  */
 #include <linux/bcd.h>
 #include <linux/ds1286.h>
 #include <linux/init.h>
+#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
@@ -76,7 +77,7 @@ static int indy_rtc_set_time(unsigned long tim)
        save_control = hpc3c0->rtcregs[RTC_CMD] & 0xff;
        hpc3c0->rtcregs[RTC_CMD] = save_control | RTC_TE;
 
-       hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_sec);
+       hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_year);
        hpc3c0->rtcregs[RTC_MONTH] = BIN2BCD(tm.tm_mon);
        hpc3c0->rtcregs[RTC_DATE] = BIN2BCD(tm.tm_mday);
        hpc3c0->rtcregs[RTC_HOURS] = BIN2BCD(tm.tm_hour);
@@ -198,9 +199,7 @@ void indy_r4k_timer_interrupt(struct pt_regs *regs)
        irq_exit();
 }
 
-extern int setup_irq(unsigned int irq, struct irqaction *irqaction);
-
-static void indy_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        /* over-write the handler, we use our own way */
        irq->handler = no_action;
@@ -216,5 +215,4 @@ void __init ip22_time_init(void)
        rtc_mips_set_time = indy_rtc_set_time;
 
        board_time_init = indy_time_init;
-       board_timer_setup = indy_timer_setup;
 }
index 597ec73359b70ebda688f6f36517827fc3d334dc..24a85372284f02351db48d4f78866c71d1092b6e 100644 (file)
@@ -296,7 +296,6 @@ static void shutdown_bridge_irq(unsigned int irq)
        struct bridge_controller *bc = IRQ_TO_BRIDGE(irq);
        struct hub_data *hub = hub_data(cpu_to_node(bc->irq_cpu));
        bridge_t *bridge = bc->base;
-       struct slice_data *si = cpu_data[bc->irq_cpu].data;
        int pin, swlevel;
        cpuid_t cpu;
 
@@ -311,7 +310,6 @@ static void shutdown_bridge_irq(unsigned int irq)
        intr_disconnect_level(cpu, swlevel);
 
        __clear_bit(swlevel, hub->irq_alloc_mask);
-       si->level_to_irq[swlevel] = -1;
 
        bridge->b_int_enable &= ~(1 << pin);
        bridge->b_wid_tflush;
@@ -347,7 +345,7 @@ static void end_bridge_irq(unsigned int irq)
                enable_bridge_irq(irq);
 }
 
-static struct hw_interrupt_type bridge_irq_type = {
+static struct irq_chip bridge_irq_type = {
        .typename       = "bridge",
        .startup        = startup_bridge_irq,
        .shutdown       = shutdown_bridge_irq,
index 3ca614a851e5ab65b1921f559d3d72dc19d3e684..b029ba79c27af0f685079ba562c3d980122cc884 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copytight (C) 1999, 2000, 05 Ralf Baechle (ralf@linux-mips.org)
+ * Copytight (C) 1999, 2000, 05, 06 Ralf Baechle (ralf@linux-mips.org)
  * Copytight (C) 1999, 2000 Silicon Graphics, Inc.
  */
 #include <linux/bcd.h>
@@ -181,8 +181,9 @@ static __init unsigned long get_m48t35_time(void)
         return mktime(year, month, date, hour, min, sec);
 }
 
-static void startup_rt_irq(unsigned int irq)
+static unsigned int startup_rt_irq(unsigned int irq)
 {
+       return 0;
 }
 
 static void shutdown_rt_irq(unsigned int irq)
@@ -205,7 +206,7 @@ static void end_rt_irq(unsigned int irq)
 {
 }
 
-static struct hw_interrupt_type rt_irq_type = {
+static struct irq_chip rt_irq_type = {
        .typename       = "SN HUB RT timer",
        .startup        = startup_rt_irq,
        .shutdown       = shutdown_rt_irq,
@@ -224,17 +225,17 @@ static struct irqaction rt_irqaction = {
 
 extern int allocate_irqno(void);
 
-static void ip27_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        int irqno  = allocate_irqno();
 
        if (irqno < 0)
                panic("Can't allocate interrupt number for timer interrupt");
 
-       irq_desc[irqno].status = IRQ_DISABLED;
-       irq_desc[irqno].action = NULL;
-       irq_desc[irqno].depth = 1;
-       irq_desc[irqno].handler = &rt_irq_type;
+       irq_desc[irqno].status  = IRQ_DISABLED;
+       irq_desc[irqno].action  = NULL;
+       irq_desc[irqno].depth   = 1;
+       irq_desc[irqno].chip    = &rt_irq_type;
 
        /* over-write the handler, we use our own way */
        irq->handler = no_action;
@@ -243,6 +244,10 @@ static void ip27_timer_setup(struct irqaction *irq)
        irq_desc[irqno].status |= IRQ_PER_CPU;
 
        rt_timer_irq = irqno;
+       /*
+        * Only needed to get /proc/interrupt to display timer irq stats
+        */
+       setup_irq(irqno, &rt_irqaction);
 }
 
 void __init ip27_time_init(void)
@@ -251,8 +256,6 @@ void __init ip27_time_init(void)
        xtime.tv_nsec = 0;
 
        do_gettimeoffset = ip27_do_gettimeoffset;
-
-       board_timer_setup = ip27_timer_setup;
 }
 
 void __init cpu_time_init(void)
index 3b7e74b6222e1803d114e73400102f8af28c2ca2..c64a820373decb5e7c1ccb61962e437b0b41a973 100644 (file)
@@ -160,7 +160,7 @@ static void end_cpu_irq(unsigned int irq)
 #define shutdown_cpu_irq disable_cpu_irq
 #define mask_and_ack_cpu_irq disable_cpu_irq
 
-static struct hw_interrupt_type ip32_cpu_interrupt = {
+static struct irq_chip ip32_cpu_interrupt = {
        .typename = "IP32 CPU",
        .startup = startup_cpu_irq,
        .shutdown = shutdown_cpu_irq,
@@ -230,7 +230,7 @@ static void end_crime_irq(unsigned int irq)
 
 #define shutdown_crime_irq disable_crime_irq
 
-static struct hw_interrupt_type ip32_crime_interrupt = {
+static struct irq_chip ip32_crime_interrupt = {
        .typename = "IP32 CRIME",
        .startup = startup_crime_irq,
        .shutdown = shutdown_crime_irq,
@@ -289,7 +289,7 @@ static void end_macepci_irq(unsigned int irq)
 #define shutdown_macepci_irq disable_macepci_irq
 #define mask_and_ack_macepci_irq disable_macepci_irq
 
-static struct hw_interrupt_type ip32_macepci_interrupt = {
+static struct irq_chip ip32_macepci_interrupt = {
        .typename = "IP32 MACE PCI",
        .startup = startup_macepci_irq,
        .shutdown = shutdown_macepci_irq,
@@ -316,9 +316,9 @@ static struct hw_interrupt_type ip32_macepci_interrupt = {
                                 MACEISA_KEYB_POLL_INT |        \
                                 MACEISA_MOUSE_INT |            \
                                 MACEISA_MOUSE_POLL_INT |       \
-                                MACEIIRQF_TIMER0_INT |         \
-                                MACEIIRQF_TIMER1_INT |         \
-                                MACEIIRQF_TIMER2_INT)
+                                MACEISA_TIMER0_INT |           \
+                                MACEISA_TIMER1_INT |           \
+                                MACEISA_TIMER2_INT)
 #define MACEISA_SUPERIO_INT    (MACEISA_PARALLEL_INT |         \
                                 MACEISA_PAR_CTXA_INT |         \
                                 MACEISA_PAR_CTXB_INT |         \
@@ -349,7 +349,7 @@ static void enable_maceisa_irq (unsigned int irq)
        case MACEISA_AUDIO_SW_IRQ ... MACEISA_AUDIO3_MERR_IRQ:
                crime_int = MACE_AUDIO_INT;
                break;
-       case MACEISA_RTC_IRQ ... MACEIIRQF_TIMER2_IRQ:
+       case MACEISA_RTC_IRQ ... MACEISA_TIMER2_IRQ:
                crime_int = MACE_MISC_INT;
                break;
        case MACEISA_PARALLEL_IRQ ... MACEISA_SERIAL2_RDMAOR_IRQ:
@@ -419,7 +419,7 @@ static void end_maceisa_irq(unsigned irq)
 
 #define shutdown_maceisa_irq disable_maceisa_irq
 
-static struct hw_interrupt_type ip32_maceisa_interrupt = {
+static struct irq_chip ip32_maceisa_interrupt = {
        .typename = "IP32 MACE ISA",
        .startup = startup_maceisa_irq,
        .shutdown = shutdown_maceisa_irq,
@@ -469,7 +469,7 @@ static void end_mace_irq(unsigned int irq)
 #define shutdown_mace_irq disable_mace_irq
 #define mask_and_ack_mace_irq disable_mace_irq
 
-static struct hw_interrupt_type ip32_mace_interrupt = {
+static struct irq_chip ip32_mace_interrupt = {
        .typename = "IP32 MACE",
        .startup = startup_mace_irq,
        .shutdown = shutdown_mace_irq,
@@ -575,7 +575,7 @@ void __init arch_init_irq(void)
        mace->perif.ctrl.imask = 0;
 
        for (irq = 0; irq <= IP32_IRQ_MAX; irq++) {
-               hw_irq_controller *controller;
+               struct irq_chip *controller;
 
                if (irq == IP32_R4K_TIMER_IRQ)
                        controller = &ip32_cpu_interrupt;
index 240a2f981d08e4f125eb5ee1daf9134b3c5ba1fc..57708fe28bd7aa573af4292d7a1669b575b9a69d 100644 (file)
@@ -7,6 +7,7 @@
  *
  * Copyright (C) 2000 Harald Koerfgen
  * Copyright (C) 2002, 2003, 2005 Ilya A. Volynets
+ * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org>
  */
 #include <linux/console.h>
 #include <linux/init.h>
@@ -80,7 +81,7 @@ void __init ip32_time_init(void)
        printk("%d MHz CPU detected\n", mips_hpt_frequency * 2 / 1000000);
 }
 
-void __init ip32_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        irq->handler = no_action;
        setup_irq(IP32_R4K_TIMER_IRQ, irq);
@@ -94,7 +95,6 @@ void __init plat_mem_setup(void)
        rtc_mips_set_mmss = mc146818_set_rtc_mmss;
 
        board_time_init = ip32_time_init;
-       board_timer_setup = ip32_timer_setup;
 
 #ifdef CONFIG_SERIAL_8250
        {
index 29d3bbb5847daf7061f7b2403fb152bafdc26173..ed325f0ab28a48be80b366feaa0317c3b0b4f496 100644 (file)
@@ -83,7 +83,7 @@ extern char sb1250_duart_present[];
 #endif
 #endif
 
-static struct hw_interrupt_type bcm1480_irq_type = {
+static struct irq_chip bcm1480_irq_type = {
        .typename = "BCM1480-IMR",
        .startup = startup_bcm1480_irq,
        .shutdown = shutdown_bcm1480_irq,
@@ -140,7 +140,7 @@ static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask)
 {
        int i = 0, old_cpu, cpu, int_on, k;
        u64 cur_ints;
-       irq_desc_t *desc = irq_desc + irq;
+       struct irq_desc *desc = irq_desc + irq;
        unsigned long flags;
        unsigned int irq_dirty;
 
@@ -278,7 +278,7 @@ void __init init_bcm1480_irqs(void)
                        irq_desc[i].chip = &bcm1480_irq_type;
                        bcm1480_irq_owner[i] = 0;
                } else {
-                       irq_desc[i].chip = &no_irq_type;
+                       irq_desc[i].chip = &no_irq_chip;
                }
        }
 }
@@ -301,7 +301,7 @@ static struct irqaction bcm1480_dummy_action = {
 
 int bcm1480_steal_irq(int irq)
 {
-       irq_desc_t *desc = irq_desc + irq;
+       struct irq_desc *desc = irq_desc + irq;
        unsigned long flags;
        int retval = 0;
 
@@ -502,22 +502,23 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
 #ifdef CONFIG_SIBYTE_BCM1480_PROF
        if (pending & CAUSEF_IP7)       /* Cpu performance counter interrupt */
                sbprof_cpu_intr(exception_epc(regs));
+       else
 #endif
 
        if (pending & CAUSEF_IP4)
                bcm1480_timer_interrupt(regs);
 
 #ifdef CONFIG_SMP
-       if (pending & CAUSEF_IP3)
+       else if (pending & CAUSEF_IP3)
                bcm1480_mailbox_interrupt(regs);
 #endif
 
 #ifdef CONFIG_KGDB
-       if (pending & CAUSEF_IP6)
+       else if (pending & CAUSEF_IP6)
                bcm1480_kgdb_interrupt(regs);           /* KGDB (uart 1) */
 #endif
 
-       if (pending & CAUSEF_IP2) {
+       else if (pending & CAUSEF_IP2) {
                unsigned long long mask_h, mask_l;
                unsigned long base;
 
@@ -533,7 +534,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
                mask_l = __raw_readq(
                        IOADDR(base + R_BCM1480_IMR_INTERRUPT_STATUS_BASE_L));
 
-               if (!mask_h) {
+               if (mask_h) {
                        if (mask_h ^ 1)
                                do_IRQ(63 - dclz(mask_h), regs);
                        else
index 1d280aabcf6a74fcb90ae2f945fdd237ed8e40b4..1de71adec6c665bebb1e47970bed5ae40ad85a93 100644 (file)
@@ -69,7 +69,7 @@ extern char sb1250_duart_present[];
 #endif
 #endif
 
-static struct hw_interrupt_type sb1250_irq_type = {
+static struct irq_chip sb1250_irq_type = {
        .typename = "SB1250-IMR",
        .startup = startup_sb1250_irq,
        .shutdown = shutdown_sb1250_irq,
@@ -120,7 +120,7 @@ static void sb1250_set_affinity(unsigned int irq, cpumask_t mask)
 {
        int i = 0, old_cpu, cpu, int_on;
        u64 cur_ints;
-       irq_desc_t *desc = irq_desc + irq;
+       struct irq_desc *desc = irq_desc + irq;
        unsigned long flags;
 
        i = first_cpu(mask);
@@ -248,7 +248,7 @@ void __init init_sb1250_irqs(void)
                        irq_desc[i].chip = &sb1250_irq_type;
                        sb1250_irq_owner[i] = 0;
                } else {
-                       irq_desc[i].chip = &no_irq_type;
+                       irq_desc[i].chip = &no_irq_chip;
                }
        }
 }
@@ -271,7 +271,7 @@ static struct irqaction sb1250_dummy_action = {
 
 int sb1250_steal_irq(int irq)
 {
-       irq_desc_t *desc = irq_desc + irq;
+       struct irq_desc *desc = irq_desc + irq;
        unsigned long flags;
        int retval = 0;
 
@@ -460,25 +460,25 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
        pending = read_c0_cause();
 
 #ifdef CONFIG_SIBYTE_SB1250_PROF
-       if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */
+       if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */
                sbprof_cpu_intr(exception_epc(regs));
-       }
+       else
 #endif
 
        if (pending & CAUSEF_IP4)
                sb1250_timer_interrupt(regs);
 
 #ifdef CONFIG_SMP
-       if (pending & CAUSEF_IP3)
+       else if (pending & CAUSEF_IP3)
                sb1250_mailbox_interrupt(regs);
 #endif
 
 #ifdef CONFIG_KGDB
-       if (pending & CAUSEF_IP6)                       /* KGDB (uart 1) */
+       else if (pending & CAUSEF_IP6)                  /* KGDB (uart 1) */
                sb1250_kgdb_interrupt(regs);
 #endif
 
-       if (pending & CAUSEF_IP2) {
+       else if (pending & CAUSEF_IP2) {
                unsigned long long mask;
 
                /*
index a9a6dbc068495aadb870275dcf0907a380cc3534..ac342f5643c9d3481d1cd921355b4959114f34e9 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/blkdev.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/initrd.h>
 
 #include <asm/irq.h>
@@ -77,7 +77,7 @@ void __init swarm_time_init(void)
 #endif
 }
 
-void __init swarm_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
         /*
          * we don't set up irqaction, because we will deliver timer
@@ -117,7 +117,6 @@ void __init plat_mem_setup(void)
        panic_timeout = 5;  /* For debug.  */
 
        board_time_init = swarm_time_init;
-       board_timer_setup = swarm_timer_setup;
        board_be_handler = swarm_be_handler;
 
        if (xicor_probe()) {
index c19e158ec402ad22dc2b6f60a7677f7102e7b72f..cda165f42b6a336e12c7ae3403a0f6c6972e7c3b 100644 (file)
@@ -55,7 +55,7 @@ static void end_pciasic_irq(unsigned int irq)
                enable_pciasic_irq(irq);
 }
 
-static struct hw_interrupt_type pciasic_irq_type = {
+static struct irq_chip pciasic_irq_type = {
        .typename = "ASIC-PCI",
        .startup = startup_pciasic_irq,
        .shutdown = shutdown_pciasic_irq,
index 870486d6cd75e3611ea73c02ed52bedc45df4ce8..4e98feb15410ea2833fd990e30419ea4b3ee38cc 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/pci.h>
 #include <linux/console.h>
 #include <linux/fb.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 
 #ifdef CONFIG_ARC
 #include <asm/arc/types.h>
@@ -41,7 +41,7 @@ extern void sni_machine_restart(char *command);
 extern void sni_machine_halt(void);
 extern void sni_machine_power_off(void);
 
-static void __init sni_rm200_pci_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        /* set the clock to 100 Hz */
        outb_p(0x34,0x43);              /* binary, mode 2, LSB/MSB, ch 0 */
@@ -270,7 +270,6 @@ void __init plat_mem_setup(void)
 #endif
 
        sni_resource_init();
-       board_timer_setup = sni_rm200_pci_timer_setup;
 
        _machine_restart = sni_machine_restart;
        _machine_halt = sni_machine_halt;
index ae9d5653a863e89a9d83f983e628bc0e873ca548..cd176f6a06c8c297c2e5bb7282b612ad552ee0f2 100644 (file)
@@ -146,7 +146,7 @@ static DEFINE_SPINLOCK(tx4927_cp0_lock);
 static DEFINE_SPINLOCK(tx4927_pic_lock);
 
 #define TX4927_CP0_NAME "TX4927-CP0"
-static struct hw_interrupt_type tx4927_irq_cp0_type = {
+static struct irq_chip tx4927_irq_cp0_type = {
        .typename       = TX4927_CP0_NAME,
        .startup        = tx4927_irq_cp0_startup,
        .shutdown       = tx4927_irq_cp0_shutdown,
@@ -158,7 +158,7 @@ static struct hw_interrupt_type tx4927_irq_cp0_type = {
 };
 
 #define TX4927_PIC_NAME "TX4927-PIC"
-static struct hw_interrupt_type tx4927_irq_pic_type = {
+static struct irq_chip tx4927_irq_pic_type = {
        .typename       = TX4927_PIC_NAME,
        .startup        = tx4927_irq_pic_startup,
        .shutdown       = tx4927_irq_pic_shutdown,
index 64a1b394b2520f10ca649b3062fd54a507b94fae..3ace4037343e0ca8734a2ed47f259e4da2fd07e4 100644 (file)
@@ -50,7 +50,6 @@
 #undef DEBUG
 
 void __init tx4927_time_init(void);
-void __init tx4927_timer_setup(struct irqaction *irq);
 void dump_cp0(char *key);
 
 
@@ -66,7 +65,6 @@ static void tx4927_write_buffer_flush(void)
 void __init plat_mem_setup(void)
 {
        board_time_init = tx4927_time_init;
-       board_timer_setup = tx4927_timer_setup;
        __wbflush = tx4927_write_buffer_flush;
 
 #ifdef CONFIG_TOSHIBA_RBTX4927
@@ -91,7 +89,7 @@ void __init tx4927_time_init(void)
 }
 
 
-void __init tx4927_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        u32 count;
        u32 c1;
index ec0a0de3083d0c2ed7e3f9e858de07e6d87ac4f2..b0f021f2a6c435ab37b932bd89ad70e269b24513 100644 (file)
@@ -251,7 +251,7 @@ static DEFINE_SPINLOCK(toshiba_rbtx4927_ioc_lock);
 
 
 #define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC"
-static struct hw_interrupt_type toshiba_rbtx4927_irq_ioc_type = {
+static struct irq_chip toshiba_rbtx4927_irq_ioc_type = {
        .typename = TOSHIBA_RBTX4927_IOC_NAME,
        .startup = toshiba_rbtx4927_irq_ioc_startup,
        .shutdown = toshiba_rbtx4927_irq_ioc_shutdown,
@@ -267,7 +267,7 @@ static struct hw_interrupt_type toshiba_rbtx4927_irq_ioc_type = {
 
 #ifdef CONFIG_TOSHIBA_FPCIB0
 #define TOSHIBA_RBTX4927_ISA_NAME "RBTX4927-ISA"
-static struct hw_interrupt_type toshiba_rbtx4927_irq_isa_type = {
+static struct irq_chip toshiba_rbtx4927_irq_isa_type = {
        .typename = TOSHIBA_RBTX4927_ISA_NAME,
        .startup = toshiba_rbtx4927_irq_isa_startup,
        .shutdown = toshiba_rbtx4927_irq_isa_shutdown,
index 0b2f8c8492181e4724b5675fdffed196ba207877..dc30d66123b6d0db892cd2ff0558cbeb2c500cb1 100644 (file)
@@ -57,7 +57,7 @@ DEFINE_SPINLOCK(tx4938_cp0_lock);
 DEFINE_SPINLOCK(tx4938_pic_lock);
 
 #define TX4938_CP0_NAME "TX4938-CP0"
-static struct hw_interrupt_type tx4938_irq_cp0_type = {
+static struct irq_chip tx4938_irq_cp0_type = {
        .typename = TX4938_CP0_NAME,
        .startup = tx4938_irq_cp0_startup,
        .shutdown = tx4938_irq_cp0_shutdown,
@@ -69,7 +69,7 @@ static struct hw_interrupt_type tx4938_irq_cp0_type = {
 };
 
 #define TX4938_PIC_NAME "TX4938-PIC"
-static struct hw_interrupt_type tx4938_irq_pic_type = {
+static struct irq_chip tx4938_irq_pic_type = {
        .typename = TX4938_PIC_NAME,
        .startup = tx4938_irq_pic_startup,
        .shutdown = tx4938_irq_pic_shutdown,
index ef59a5cffc691e9001c1a9dafb7676189ecca214..71859c4fee84779848dd4032ddf0c8500faeabeb 100644 (file)
@@ -39,7 +39,6 @@ extern void rbtx4938_time_init(void);
 
 void __init tx4938_setup(void);
 void __init tx4938_time_init(void);
-void __init tx4938_timer_setup(struct irqaction *irq);
 void dump_cp0(char *key);
 
 void (*__wbflush) (void);
@@ -64,7 +63,6 @@ void __init
 plat_mem_setup(void)
 {
        board_time_init = tx4938_time_init;
-       board_timer_setup = tx4938_timer_setup;
        __wbflush = tx4938_write_buffer_flush;
        toshiba_rbtx4938_setup();
 }
@@ -75,8 +73,7 @@ tx4938_time_init(void)
        rbtx4938_time_init();
 }
 
-void __init
-tx4938_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        u32 count;
        u32 c1;
index 3b8245dc5bd38e9b074a4e12902bae0efb1082a9..83f2750825a46864ced603eb3c1d7fb1886c3139 100644 (file)
@@ -97,7 +97,7 @@ static void toshiba_rbtx4938_irq_ioc_end(unsigned int irq);
 DEFINE_SPINLOCK(toshiba_rbtx4938_ioc_lock);
 
 #define TOSHIBA_RBTX4938_IOC_NAME "RBTX4938-IOC"
-static struct hw_interrupt_type toshiba_rbtx4938_irq_ioc_type = {
+static struct irq_chip toshiba_rbtx4938_irq_ioc_type = {
        .typename = TOSHIBA_RBTX4938_IOC_NAME,
        .startup = toshiba_rbtx4938_irq_ioc_startup,
        .shutdown = toshiba_rbtx4938_irq_ioc_shutdown,
index 6046ef23b2bf408ea8762fe48eefa4eb4db281f8..92f41f6f934a3bea38e9b9184ec68c9c4710370d 100644 (file)
@@ -86,9 +86,3 @@ config PCI_VR41XX
        depends on MACH_VR41XX && HW_HAS_PCI
        default y
        select PCI
-
-config VRC4173
-       tristate "Add NEC VRC4173 companion chip support"
-       depends on MACH_VR41XX && PCI_VR41XX
-       help
-         The NEC VRC4173 is a companion chip for NEC VR4122/VR4131.
index 814900915c28510a4173f848d6a0f8dfd6c2fc22..6d9bab8905877fe1b7b0324a4670bd424584b706 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  setup.c, Setup for the CASIO CASSIOPEIA E-11/15/55/65.
  *
- *  Copyright (C) 2002-2005  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
+ *  Copyright (C) 2002-2006  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
 #include <linux/ioport.h>
 
 #include <asm/io.h>
-#include <asm/vr41xx/e55.h>
+
+#define E55_ISA_IO_BASE                0x1400c000
+#define E55_ISA_IO_SIZE                0x03ff4000
+#define E55_ISA_IO_START       0
+#define E55_ISA_IO_END         (E55_ISA_IO_SIZE - 1)
+#define E55_IO_PORT_BASE       KSEG1ADDR(E55_ISA_IO_BASE)
 
 static int __init casio_e55_setup(void)
 {
-       set_io_port_base(IO_PORT_BASE);
-       ioport_resource.start = IO_PORT_RESOURCE_START;
-       ioport_resource.end = IO_PORT_RESOURCE_END;
+       set_io_port_base(E55_IO_PORT_BASE);
+       ioport_resource.start = E55_ISA_IO_START;
+       ioport_resource.end = E55_ISA_IO_END;
 
        return 0;
 }
index aa373974c80f44111230a81f31c560eed7683632..975d5caf9d1be0c965461e2adf781ea002e8118e 100644 (file)
@@ -2,7 +2,6 @@
 # Makefile for common code of the NEC VR4100 series.
 #
 
-obj-y                          += bcu.o cmu.o icu.o init.o irq.o pmu.o type.o
-obj-$(CONFIG_VRC4173)          += vrc4173.o
+obj-y  += bcu.o cmu.o icu.o init.o irq.o pmu.o type.o
 
 EXTRA_AFLAGS := $(CFLAGS)
index b9323302cc4e6fbf4b6312dab00b0617656ba4e3..7a5c31d58378cd0abefa03d215e71de8415bd44a 100644 (file)
@@ -38,6 +38,7 @@
 
 #include <asm/cpu.h>
 #include <asm/io.h>
+#include <asm/vr41xx/irq.h>
 #include <asm/vr41xx/vr41xx.h>
 
 static void __iomem *icu1_base;
@@ -152,7 +153,7 @@ static inline uint16_t icu2_clear(uint8_t offset, uint16_t clear)
 
 void vr41xx_enable_piuint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + PIU_IRQ;
+       struct irq_desc *desc = irq_desc + PIU_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -167,7 +168,7 @@ EXPORT_SYMBOL(vr41xx_enable_piuint);
 
 void vr41xx_disable_piuint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + PIU_IRQ;
+       struct irq_desc *desc = irq_desc + PIU_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -182,7 +183,7 @@ EXPORT_SYMBOL(vr41xx_disable_piuint);
 
 void vr41xx_enable_aiuint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + AIU_IRQ;
+       struct irq_desc *desc = irq_desc + AIU_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -197,7 +198,7 @@ EXPORT_SYMBOL(vr41xx_enable_aiuint);
 
 void vr41xx_disable_aiuint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + AIU_IRQ;
+       struct irq_desc *desc = irq_desc + AIU_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -212,7 +213,7 @@ EXPORT_SYMBOL(vr41xx_disable_aiuint);
 
 void vr41xx_enable_kiuint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + KIU_IRQ;
+       struct irq_desc *desc = irq_desc + KIU_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -227,7 +228,7 @@ EXPORT_SYMBOL(vr41xx_enable_kiuint);
 
 void vr41xx_disable_kiuint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + KIU_IRQ;
+       struct irq_desc *desc = irq_desc + KIU_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4111 ||
@@ -242,7 +243,7 @@ EXPORT_SYMBOL(vr41xx_disable_kiuint);
 
 void vr41xx_enable_dsiuint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + DSIU_IRQ;
+       struct irq_desc *desc = irq_desc + DSIU_IRQ;
        unsigned long flags;
 
        spin_lock_irqsave(&desc->lock, flags);
@@ -254,7 +255,7 @@ EXPORT_SYMBOL(vr41xx_enable_dsiuint);
 
 void vr41xx_disable_dsiuint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + DSIU_IRQ;
+       struct irq_desc *desc = irq_desc + DSIU_IRQ;
        unsigned long flags;
 
        spin_lock_irqsave(&desc->lock, flags);
@@ -266,7 +267,7 @@ EXPORT_SYMBOL(vr41xx_disable_dsiuint);
 
 void vr41xx_enable_firint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + FIR_IRQ;
+       struct irq_desc *desc = irq_desc + FIR_IRQ;
        unsigned long flags;
 
        spin_lock_irqsave(&desc->lock, flags);
@@ -278,7 +279,7 @@ EXPORT_SYMBOL(vr41xx_enable_firint);
 
 void vr41xx_disable_firint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + FIR_IRQ;
+       struct irq_desc *desc = irq_desc + FIR_IRQ;
        unsigned long flags;
 
        spin_lock_irqsave(&desc->lock, flags);
@@ -290,7 +291,7 @@ EXPORT_SYMBOL(vr41xx_disable_firint);
 
 void vr41xx_enable_pciint(void)
 {
-       irq_desc_t *desc = irq_desc + PCI_IRQ;
+       struct irq_desc *desc = irq_desc + PCI_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -306,7 +307,7 @@ EXPORT_SYMBOL(vr41xx_enable_pciint);
 
 void vr41xx_disable_pciint(void)
 {
-       irq_desc_t *desc = irq_desc + PCI_IRQ;
+       struct irq_desc *desc = irq_desc + PCI_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -322,7 +323,7 @@ EXPORT_SYMBOL(vr41xx_disable_pciint);
 
 void vr41xx_enable_scuint(void)
 {
-       irq_desc_t *desc = irq_desc + SCU_IRQ;
+       struct irq_desc *desc = irq_desc + SCU_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -338,7 +339,7 @@ EXPORT_SYMBOL(vr41xx_enable_scuint);
 
 void vr41xx_disable_scuint(void)
 {
-       irq_desc_t *desc = irq_desc + SCU_IRQ;
+       struct irq_desc *desc = irq_desc + SCU_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -354,7 +355,7 @@ EXPORT_SYMBOL(vr41xx_disable_scuint);
 
 void vr41xx_enable_csiint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + CSI_IRQ;
+       struct irq_desc *desc = irq_desc + CSI_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -370,7 +371,7 @@ EXPORT_SYMBOL(vr41xx_enable_csiint);
 
 void vr41xx_disable_csiint(uint16_t mask)
 {
-       irq_desc_t *desc = irq_desc + CSI_IRQ;
+       struct irq_desc *desc = irq_desc + CSI_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -386,7 +387,7 @@ EXPORT_SYMBOL(vr41xx_disable_csiint);
 
 void vr41xx_enable_bcuint(void)
 {
-       irq_desc_t *desc = irq_desc + BCU_IRQ;
+       struct irq_desc *desc = irq_desc + BCU_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -402,7 +403,7 @@ EXPORT_SYMBOL(vr41xx_enable_bcuint);
 
 void vr41xx_disable_bcuint(void)
 {
-       irq_desc_t *desc = irq_desc + BCU_IRQ;
+       struct irq_desc *desc = irq_desc + BCU_IRQ;
        unsigned long flags;
 
        if (current_cpu_data.cputype == CPU_VR4122 ||
@@ -442,7 +443,7 @@ static void end_sysint1_irq(unsigned int irq)
                icu1_set(MSYSINT1REG, 1 << SYSINT1_IRQ_TO_PIN(irq));
 }
 
-static struct hw_interrupt_type sysint1_irq_type = {
+static struct irq_chip sysint1_irq_type = {
        .typename       = "SYSINT1",
        .startup        = startup_sysint1_irq,
        .shutdown       = shutdown_sysint1_irq,
@@ -478,7 +479,7 @@ static void end_sysint2_irq(unsigned int irq)
                icu2_set(MSYSINT2REG, 1 << SYSINT2_IRQ_TO_PIN(irq));
 }
 
-static struct hw_interrupt_type sysint2_irq_type = {
+static struct irq_chip sysint2_irq_type = {
        .typename       = "SYSINT2",
        .startup        = startup_sysint2_irq,
        .shutdown       = shutdown_sysint2_irq,
@@ -490,7 +491,7 @@ static struct hw_interrupt_type sysint2_irq_type = {
 
 static inline int set_sysint1_assign(unsigned int irq, unsigned char assign)
 {
-       irq_desc_t *desc = irq_desc + irq;
+       struct irq_desc *desc = irq_desc + irq;
        uint16_t intassign0, intassign1;
        unsigned int pin;
 
@@ -549,7 +550,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign)
 
 static inline int set_sysint2_assign(unsigned int irq, unsigned char assign)
 {
-       irq_desc_t *desc = irq_desc + irq;
+       struct irq_desc *desc = irq_desc + irq;
        uint16_t intassign2, intassign3;
        unsigned int pin;
 
index 915bfa5c07193cc5752e2540bb70b6c829848300..a2e285c1d4d5c85f8403199681fdb3b9ce08976a 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <asm/bootinfo.h>
 #include <asm/time.h>
+#include <asm/vr41xx/irq.h>
 #include <asm/vr41xx/vr41xx.h>
 
 #define IO_MEM_RESOURCE_START  0UL
@@ -47,7 +48,7 @@ static void __init setup_timer_frequency(void)
                mips_hpt_frequency = tclock / 4;
 }
 
-static void __init setup_timer_irq(struct irqaction *irq)
+void __init plat_timer_setup(struct irqaction *irq)
 {
        setup_irq(TIMER_IRQ, irq);
 }
@@ -55,7 +56,6 @@ static void __init setup_timer_irq(struct irqaction *irq)
 static void __init timer_init(void)
 {
        board_time_init = setup_timer_frequency;
-       board_timer_setup = setup_timer_irq;
 }
 
 void __init plat_mem_setup(void)
index 66aa50802deb6fcc06dd399a90b9c86a2a4a5d5a..4733c5344467f1f0f441f9066ecc1ef684426f48 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <asm/irq_cpu.h>
 #include <asm/system.h>
-#include <asm/vr41xx/vr41xx.h>
+#include <asm/vr41xx/irq.h>
 
 typedef struct irq_cascade {
        int (*get_irq)(unsigned int, struct pt_regs *);
@@ -62,7 +62,7 @@ EXPORT_SYMBOL_GPL(cascade_irq);
 static void irq_dispatch(unsigned int irq, struct pt_regs *regs)
 {
        irq_cascade_t *cascade;
-       irq_desc_t *desc;
+       struct irq_desc *desc;
 
        if (irq >= NR_IRQS) {
                atomic_inc(&irq_err_count);
diff --git a/arch/mips/vr41xx/common/vrc4173.c b/arch/mips/vr41xx/common/vrc4173.c
deleted file mode 100644 (file)
index 2d287b8..0000000
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- *  vrc4173.c, NEC VRC4173 base driver for NEC VR4122/VR4131.
- *
- *  Copyright (C) 2001-2003  MontaVista Software Inc.
- *    Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com>
- *  Copyright (C) 2004  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
- *  Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/pci.h>
-#include <linux/spinlock.h>
-#include <linux/types.h>
-
-#include <asm/vr41xx/vr41xx.h>
-#include <asm/vr41xx/vrc4173.h>
-
-MODULE_DESCRIPTION("NEC VRC4173 base driver for NEC VR4122/4131");
-MODULE_AUTHOR("Yoichi Yuasa <yyuasa@mvista.com>");
-MODULE_LICENSE("GPL");
-
-#define VRC4173_CMUCLKMSK      0x040
- #define MSKPIU                        0x0001
- #define MSKKIU                        0x0002
- #define MSKAIU                        0x0004
- #define MSKPS2CH1             0x0008
- #define MSKPS2CH2             0x0010
- #define MSKUSB                        0x0020
- #define MSKCARD1              0x0040
- #define MSKCARD2              0x0080
- #define MSKAC97               0x0100
- #define MSK48MUSB             0x0400
- #define MSK48MPIN             0x0800
- #define MSK48MOSC             0x1000
-#define VRC4173_CMUSRST                0x042
- #define USBRST                        0x0001
- #define CARD1RST              0x0002
- #define CARD2RST              0x0004
- #define AC97RST               0x0008
-
-#define VRC4173_SYSINT1REG     0x060
-#define VRC4173_MSYSINT1REG    0x06c
-#define VRC4173_MPIUINTREG     0x06e
-#define VRC4173_MAIUINTREG     0x070
-#define VRC4173_MKIUINTREG     0x072
-
-#define VRC4173_SELECTREG      0x09e
- #define SEL3                  0x0008
- #define SEL2                  0x0004
- #define SEL1                  0x0002
- #define SEL0                  0x0001
-
-static struct pci_device_id vrc4173_id_table[] __devinitdata = {
-       {       .vendor         = PCI_VENDOR_ID_NEC,
-               .device         = PCI_DEVICE_ID_NEC_VRC4173,
-               .subvendor      = PCI_ANY_ID,
-               .subdevice      = PCI_ANY_ID,                   },
-       {       .vendor         = 0,                            },
-};
-
-unsigned long vrc4173_io_offset = 0;
-
-EXPORT_SYMBOL(vrc4173_io_offset);
-
-static int vrc4173_initialized;
-static uint16_t vrc4173_cmuclkmsk;
-static uint16_t vrc4173_selectreg;
-static DEFINE_SPINLOCK(vrc4173_cmu_lock);
-static DEFINE_SPINLOCK(vrc4173_giu_lock);
-
-static inline void set_cmusrst(uint16_t val)
-{
-       uint16_t cmusrst;
-
-       cmusrst = vrc4173_inw(VRC4173_CMUSRST);
-       cmusrst |= val;
-       vrc4173_outw(cmusrst, VRC4173_CMUSRST);
-}
-
-static inline void clear_cmusrst(uint16_t val)
-{
-       uint16_t cmusrst;
-
-       cmusrst = vrc4173_inw(VRC4173_CMUSRST);
-       cmusrst &= ~val;
-       vrc4173_outw(cmusrst, VRC4173_CMUSRST);
-}
-
-void vrc4173_supply_clock(vrc4173_clock_t clock)
-{
-       if (vrc4173_initialized) {
-               spin_lock_irq(&vrc4173_cmu_lock);
-
-               switch (clock) {
-               case VRC4173_PIU_CLOCK:
-                       vrc4173_cmuclkmsk |= MSKPIU;
-                       break;
-               case VRC4173_KIU_CLOCK:
-                       vrc4173_cmuclkmsk |= MSKKIU;
-                       break;
-               case VRC4173_AIU_CLOCK:
-                       vrc4173_cmuclkmsk |= MSKAIU;
-                       break;
-               case VRC4173_PS2_CH1_CLOCK:
-                       vrc4173_cmuclkmsk |= MSKPS2CH1;
-                       break;
-               case VRC4173_PS2_CH2_CLOCK:
-                       vrc4173_cmuclkmsk |= MSKPS2CH2;
-                       break;
-               case VRC4173_USBU_PCI_CLOCK:
-                       set_cmusrst(USBRST);
-                       vrc4173_cmuclkmsk |= MSKUSB;
-                       break;
-               case VRC4173_CARDU1_PCI_CLOCK:
-                       set_cmusrst(CARD1RST);
-                       vrc4173_cmuclkmsk |= MSKCARD1;
-                       break;
-               case VRC4173_CARDU2_PCI_CLOCK:
-                       set_cmusrst(CARD2RST);
-                       vrc4173_cmuclkmsk |= MSKCARD2;
-                       break;
-               case VRC4173_AC97U_PCI_CLOCK:
-                       set_cmusrst(AC97RST);
-                       vrc4173_cmuclkmsk |= MSKAC97;
-                       break;
-               case VRC4173_USBU_48MHz_CLOCK:
-                       set_cmusrst(USBRST);
-                       vrc4173_cmuclkmsk |= MSK48MUSB;
-                       break;
-               case VRC4173_EXT_48MHz_CLOCK:
-                       if (vrc4173_cmuclkmsk & MSK48MOSC)
-                               vrc4173_cmuclkmsk |= MSK48MPIN;
-                       else
-                               printk(KERN_WARNING
-                                      "vrc4173_supply_clock: "
-                                      "Please supply VRC4173_48MHz_CLOCK first "
-                                      "rather than VRC4173_EXT_48MHz_CLOCK.\n");
-                       break;
-               case VRC4173_48MHz_CLOCK:
-                       vrc4173_cmuclkmsk |= MSK48MOSC;
-                       break;
-               default:
-                       printk(KERN_WARNING
-                              "vrc4173_supply_clock: Invalid CLOCK value %u\n", clock);
-                       break;
-               }
-
-               vrc4173_outw(vrc4173_cmuclkmsk, VRC4173_CMUCLKMSK);
-
-               switch (clock) {
-               case VRC4173_USBU_PCI_CLOCK:
-               case VRC4173_USBU_48MHz_CLOCK:
-                       clear_cmusrst(USBRST);
-                       break;
-               case VRC4173_CARDU1_PCI_CLOCK:
-                       clear_cmusrst(CARD1RST);
-                       break;
-               case VRC4173_CARDU2_PCI_CLOCK:
-                       clear_cmusrst(CARD2RST);
-                       break;
-               case VRC4173_AC97U_PCI_CLOCK:
-                       clear_cmusrst(AC97RST);
-                       break;
-               default:
-                       break;
-               }
-
-               spin_unlock_irq(&vrc4173_cmu_lock);
-       }
-}
-
-EXPORT_SYMBOL(vrc4173_supply_clock);
-
-void vrc4173_mask_clock(vrc4173_clock_t clock)
-{
-       if (vrc4173_initialized) {
-               spin_lock_irq(&vrc4173_cmu_lock);
-
-               switch (clock) {
-               case VRC4173_PIU_CLOCK:
-                       vrc4173_cmuclkmsk &= ~MSKPIU;
-                       break;
-               case VRC4173_KIU_CLOCK:
-                       vrc4173_cmuclkmsk &= ~MSKKIU;
-                       break;
-               case VRC4173_AIU_CLOCK:
-                       vrc4173_cmuclkmsk &= ~MSKAIU;
-                       break;
-               case VRC4173_PS2_CH1_CLOCK:
-                       vrc4173_cmuclkmsk &= ~MSKPS2CH1;
-                       break;
-               case VRC4173_PS2_CH2_CLOCK:
-                       vrc4173_cmuclkmsk &= ~MSKPS2CH2;
-                       break;
-               case VRC4173_USBU_PCI_CLOCK:
-                       set_cmusrst(USBRST);
-                       vrc4173_cmuclkmsk &= ~MSKUSB;
-                       break;
-               case VRC4173_CARDU1_PCI_CLOCK:
-                       set_cmusrst(CARD1RST);
-                       vrc4173_cmuclkmsk &= ~MSKCARD1;
-                       break;
-               case VRC4173_CARDU2_PCI_CLOCK:
-                       set_cmusrst(CARD2RST);
-                       vrc4173_cmuclkmsk &= ~MSKCARD2;
-                       break;
-               case VRC4173_AC97U_PCI_CLOCK:
-                       set_cmusrst(AC97RST);
-                       vrc4173_cmuclkmsk &= ~MSKAC97;
-                       break;
-               case VRC4173_USBU_48MHz_CLOCK:
-                       set_cmusrst(USBRST);
-                       vrc4173_cmuclkmsk &= ~MSK48MUSB;
-                       break;
-               case VRC4173_EXT_48MHz_CLOCK:
-                       vrc4173_cmuclkmsk &= ~MSK48MPIN;
-                       break;
-               case VRC4173_48MHz_CLOCK:
-                       vrc4173_cmuclkmsk &= ~MSK48MOSC;
-                       break;
-               default:
-                       printk(KERN_WARNING "vrc4173_mask_clock: Invalid CLOCK value %u\n", clock);
-                       break;
-               }
-
-               vrc4173_outw(vrc4173_cmuclkmsk, VRC4173_CMUCLKMSK);
-
-               switch (clock) {
-               case VRC4173_USBU_PCI_CLOCK:
-               case VRC4173_USBU_48MHz_CLOCK:
-                       clear_cmusrst(USBRST);
-                       break;
-               case VRC4173_CARDU1_PCI_CLOCK:
-                       clear_cmusrst(CARD1RST);
-                       break;
-               case VRC4173_CARDU2_PCI_CLOCK:
-                       clear_cmusrst(CARD2RST);
-                       break;
-               case VRC4173_AC97U_PCI_CLOCK:
-                       clear_cmusrst(AC97RST);
-                       break;
-               default:
-                       break;
-               }
-
-               spin_unlock_irq(&vrc4173_cmu_lock);
-       }
-}
-
-EXPORT_SYMBOL(vrc4173_mask_clock);
-
-static inline void vrc4173_cmu_init(void)
-{
-       vrc4173_cmuclkmsk = vrc4173_inw(VRC4173_CMUCLKMSK);
-
-       spin_lock_init(&vrc4173_cmu_lock);
-}
-
-void vrc4173_select_function(vrc4173_function_t function)
-{
-       if (vrc4173_initialized) {
-               spin_lock_irq(&vrc4173_giu_lock);
-
-               switch(function) {
-               case PS2_CHANNEL1:
-                       vrc4173_selectreg |= SEL2;
-                       break;
-               case PS2_CHANNEL2:
-                       vrc4173_selectreg |= SEL1;
-                       break;
-               case TOUCHPANEL:
-                       vrc4173_selectreg &= SEL2 | SEL1 | SEL0;
-                       break;
-               case KEYBOARD_8SCANLINES:
-                       vrc4173_selectreg &= SEL3 | SEL2 | SEL1;
-                       break;
-               case KEYBOARD_10SCANLINES:
-                       vrc4173_selectreg &= SEL3 | SEL2;
-                       break;
-               case KEYBOARD_12SCANLINES:
-                       vrc4173_selectreg &= SEL3;
-                       break;
-               case GPIO_0_15PINS:
-                       vrc4173_selectreg |= SEL0;
-                       break;
-               case GPIO_16_20PINS:
-                       vrc4173_selectreg |= SEL3;
-                       break;
-               }
-
-               vrc4173_outw(vrc4173_selectreg, VRC4173_SELECTREG);
-
-               spin_unlock_irq(&vrc4173_giu_lock);
-       }
-}
-
-EXPORT_SYMBOL(vrc4173_select_function);
-
-static inline void vrc4173_giu_init(void)
-{
-       vrc4173_selectreg = vrc4173_inw(VRC4173_SELECTREG);
-
-       spin_lock_init(&vrc4173_giu_lock);
-}
-
-void vrc4173_enable_piuint(uint16_t mask)
-{
-       irq_desc_t *desc = irq_desc + VRC4173_PIU_IRQ;
-       unsigned long flags;
-       uint16_t val;
-
-       spin_lock_irqsave(&desc->lock, flags);
-       val = vrc4173_inw(VRC4173_MPIUINTREG);
-       val |= mask;
-       vrc4173_outw(val, VRC4173_MPIUINTREG);
-       spin_unlock_irqrestore(&desc->lock, flags);
-}
-
-EXPORT_SYMBOL(vrc4173_enable_piuint);
-
-void vrc4173_disable_piuint(uint16_t mask)
-{
-       irq_desc_t *desc = irq_desc + VRC4173_PIU_IRQ;
-       unsigned long flags;
-       uint16_t val;
-
-       spin_lock_irqsave(&desc->lock, flags);
-       val = vrc4173_inw(VRC4173_MPIUINTREG);
-       val &= ~mask;
-       vrc4173_outw(val, VRC4173_MPIUINTREG);
-       spin_unlock_irqrestore(&desc->lock, flags);
-}
-
-EXPORT_SYMBOL(vrc4173_disable_piuint);
-
-void vrc4173_enable_aiuint(uint16_t mask)
-{
-       irq_desc_t *desc = irq_desc + VRC4173_AIU_IRQ;
-       unsigned long flags;
-       uint16_t val;
-
-       spin_lock_irqsave(&desc->lock, flags);
-       val = vrc4173_inw(VRC4173_MAIUINTREG);
-       val |= mask;
-       vrc4173_outw(val, VRC4173_MAIUINTREG);
-       spin_unlock_irqrestore(&desc->lock, flags);
-}
-
-EXPORT_SYMBOL(vrc4173_enable_aiuint);
-
-void vrc4173_disable_aiuint(uint16_t mask)
-{
-       irq_desc_t *desc = irq_desc + VRC4173_AIU_IRQ;
-       unsigned long flags;
-       uint16_t val;
-
-       spin_lock_irqsave(&desc->lock, flags);
-       val = vrc4173_inw(VRC4173_MAIUINTREG);
-       val &= ~mask;
-       vrc4173_outw(val, VRC4173_MAIUINTREG);
-       spin_unlock_irqrestore(&desc->lock, flags);
-}
-
-EXPORT_SYMBOL(vrc4173_disable_aiuint);
-
-void vrc4173_enable_kiuint(uint16_t mask)
-{
-       irq_desc_t *desc = irq_desc + VRC4173_KIU_IRQ;
-       unsigned long flags;
-       uint16_t val;
-
-       spin_lock_irqsave(&desc->lock, flags);
-       val = vrc4173_inw(VRC4173_MKIUINTREG);
-       val |= mask;
-       vrc4173_outw(val, VRC4173_MKIUINTREG);
-       spin_unlock_irqrestore(&desc->lock, flags);
-}
-
-EXPORT_SYMBOL(vrc4173_enable_kiuint);
-
-void vrc4173_disable_kiuint(uint16_t mask)
-{
-       irq_desc_t *desc = irq_desc + VRC4173_KIU_IRQ;
-       unsigned long flags;
-       uint16_t val;
-
-       spin_lock_irqsave(&desc->lock, flags);
-       val = vrc4173_inw(VRC4173_MKIUINTREG);
-       val &= ~mask;
-       vrc4173_outw(val, VRC4173_MKIUINTREG);
-       spin_unlock_irqrestore(&desc->lock, flags);
-}
-
-EXPORT_SYMBOL(vrc4173_disable_kiuint);
-
-static void enable_vrc4173_irq(unsigned int irq)
-{
-       uint16_t val;
-
-       val = vrc4173_inw(VRC4173_MSYSINT1REG);
-       val |= (uint16_t)1 << (irq - VRC4173_IRQ_BASE);
-       vrc4173_outw(val, VRC4173_MSYSINT1REG);
-}
-
-static void disable_vrc4173_irq(unsigned int irq)
-{
-       uint16_t val;
-
-       val = vrc4173_inw(VRC4173_MSYSINT1REG);
-       val &= ~((uint16_t)1 << (irq - VRC4173_IRQ_BASE));
-       vrc4173_outw(val, VRC4173_MSYSINT1REG);
-}
-
-static unsigned int startup_vrc4173_irq(unsigned int irq)
-{
-       enable_vrc4173_irq(irq);
-       return 0; /* never anything pending */
-}
-
-#define shutdown_vrc4173_irq   disable_vrc4173_irq
-#define ack_vrc4173_irq                disable_vrc4173_irq
-
-static void end_vrc4173_irq(unsigned int irq)
-{
-       if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
-               enable_vrc4173_irq(irq);
-}
-
-static struct hw_interrupt_type vrc4173_irq_type = {
-       .typename       = "VRC4173",
-       .startup        = startup_vrc4173_irq,
-       .shutdown       = shutdown_vrc4173_irq,
-       .enable         = enable_vrc4173_irq,
-       .disable        = disable_vrc4173_irq,
-       .ack            = ack_vrc4173_irq,
-       .end            = end_vrc4173_irq,
-};
-
-static int vrc4173_get_irq_number(int irq)
-{
-       uint16_t status, mask;
-       int i;
-
-        status = vrc4173_inw(VRC4173_SYSINT1REG);
-        mask = vrc4173_inw(VRC4173_MSYSINT1REG);
-
-       status &= mask;
-       if (status) {
-               for (i = 0; i < 16; i++)
-                       if (status & (0x0001 << i))
-                               return VRC4173_IRQ(i);
-       }
-
-       return -EINVAL;
-}
-
-static inline int vrc4173_icu_init(int cascade_irq)
-{
-       int i;
-
-       if (cascade_irq < GIU_IRQ(0) || cascade_irq > GIU_IRQ(15))
-               return -EINVAL;
-
-       vrc4173_outw(0, VRC4173_MSYSINT1REG);
-
-       vr41xx_set_irq_trigger(GIU_IRQ_TO_PIN(cascade_irq), TRIGGER_LEVEL, SIGNAL_THROUGH);
-       vr41xx_set_irq_level(GIU_IRQ_TO_PIN(cascade_irq), LEVEL_LOW);
-
-       for (i = VRC4173_IRQ_BASE; i <= VRC4173_IRQ_LAST; i++)
-                irq_desc[i].chip = &vrc4173_irq_type;
-
-       return 0;
-}
-
-static int __devinit vrc4173_probe(struct pci_dev *dev,
-                                   const struct pci_device_id *id)
-{
-       unsigned long start, flags;
-       int err;
-
-       err = pci_enable_device(dev);
-       if (err < 0) {
-               printk(KERN_ERR "vrc4173: Failed to enable PCI device, aborting\n");
-               return err;
-       }
-
-       pci_set_master(dev);
-
-       start = pci_resource_start(dev, 0);
-       if (start == 0) {
-               printk(KERN_ERR "vrc4173:No such PCI I/O resource, aborting\n");
-               return -ENXIO;
-       }
-
-       flags = pci_resource_flags(dev, 0);
-       if ((flags & IORESOURCE_IO) == 0) {
-               printk(KERN_ERR "vrc4173: No such PCI I/O resource, aborting\n");
-               return -ENXIO;
-       }
-
-       err = pci_request_regions(dev, "NEC VRC4173");
-       if (err < 0) {
-               printk(KERN_ERR "vrc4173: PCI resources are busy, aborting\n");
-               return err;
-       }
-
-       set_vrc4173_io_offset(start);
-
-       vrc4173_cmu_init();
-       vrc4173_giu_init();
-
-       err = vrc4173_icu_init(dev->irq);
-       if (err < 0) {
-               printk(KERN_ERR "vrc4173: Invalid IRQ %d, aborting\n", dev->irq);
-               return err;
-       }
-
-       err = vr41xx_cascade_irq(dev->irq, vrc4173_get_irq_number);
-       if (err < 0) {
-               printk(KERN_ERR "vrc4173: IRQ resource %d is busy, aborting\n", dev->irq);
-               return err;
-       }
-
-       printk(KERN_INFO
-              "NEC VRC4173 at 0x%#08lx, IRQ is cascaded to %d\n", start, dev->irq);
-
-       return 0;
-}
-
-static void vrc4173_remove(struct pci_dev *dev)
-{
-       free_irq(dev->irq, NULL);
-
-       pci_release_regions(dev);
-}
-
-static struct pci_driver vrc4173_driver = {
-       .name           = "NEC VRC4173",
-       .probe          = vrc4173_probe,
-       .remove         = vrc4173_remove,
-       .id_table       = vrc4173_id_table,
-};
-
-static int __devinit vrc4173_init(void)
-{
-       int err;
-
-       err = pci_register_driver(&vrc4173_driver);
-       if (err < 0)
-               return err;
-
-       vrc4173_initialized = 1;
-
-       return 0;
-}
-
-static void __devexit vrc4173_exit(void)
-{
-       vrc4173_initialized = 0;
-
-       pci_unregister_driver(&vrc4173_driver);
-}
-
-module_init(vrc4173_init);
-module_exit(vrc4173_exit);
index 50fe8af4c52c8b3d57074fd9883629bd273b6a2e..9eef297eca1a9ec1d52dbe7f3cda2a5ff200a4c8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  setup.c, Setup for the IBM WorkPad z50.
  *
- *  Copyright (C) 2002-2005  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
+ *  Copyright (C) 2002-2006  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
 #include <linux/ioport.h>
 
 #include <asm/io.h>
-#include <asm/vr41xx/workpad.h>
+
+#define WORKPAD_ISA_IO_BASE    0x15000000
+#define WORKPAD_ISA_IO_SIZE    0x03000000
+#define WORKPAD_ISA_IO_START   0
+#define WORKPAD_ISA_IO_END     (WORKPAD_ISA_IO_SIZE - 1)
+#define WORKPAD_IO_PORT_BASE   KSEG1ADDR(WORKPAD_ISA_IO_BASE)
 
 static int __init ibm_workpad_setup(void)
 {
-       set_io_port_base(IO_PORT_BASE);
-       ioport_resource.start = IO_PORT_RESOURCE_START;
-       ioport_resource.end = IO_PORT_RESOURCE_END;
+       set_io_port_base(WORKPAD_IO_PORT_BASE);
+       ioport_resource.start = WORKPAD_ISA_IO_START;
+       ioport_resource.end = WORKPAD_ISA_IO_END;
 
        return 0;
 }
index 7b2511ca0a616a0c4729ba244d392fcbea0361ff..2483487344c290c67f7e57581134cb93da85f79f 100644 (file)
@@ -62,7 +62,7 @@ static void end_i8259_irq(unsigned int irq)
                enable_8259A_irq(irq - I8259_IRQ_BASE);
 }
 
-static struct hw_interrupt_type i8259_irq_type = {
+static struct irq_chip i8259_irq_type = {
        .typename       = "XT-PIC",
        .startup        = startup_i8259_irq,
        .shutdown       = shutdown_i8259_irq,
index ce78f412ff2ebff0bf95ea2a4d691903253fb179..aab05767427c66222b0393c9aa38aedef9d00944 100644 (file)
@@ -89,6 +89,8 @@ static int pdc_console_setup(struct console *co, char *options)
 }
 
 #if defined(CONFIG_PDC_CONSOLE)
+#include <linux/vt_kern.h>
+
 static struct tty_driver * pdc_console_device (struct console *c, int *index)
 {
        extern struct tty_driver console_driver;
index 97ddc02a3d42e320c672fe6ed41c53f323d1de18..68e5ab0443d23482c822d91100e6f6398c1bb870 100644 (file)
@@ -323,7 +323,7 @@ int ibmebus_request_irq(struct ibmebus_dev *dev,
                        unsigned long irq_flags, const char * devname,
                        void *dev_id)
 {
-       unsigned int irq = irq_create_mapping(NULL, ist, 0);
+       unsigned int irq = irq_create_mapping(NULL, ist);
        
        if (irq == NO_IRQ)
                return -EINVAL;
index 8cf987809c669d0c49743b163696bfffb67cb244..01bdae35cb5590ed1aff66f6f6cfcb945be99495 100644 (file)
@@ -391,15 +391,14 @@ struct irq_host *irq_alloc_host(unsigned int revmap_type,
                        irq_map[i].host = host;
                        smp_wmb();
 
-                       /* Clear some flags */
-                       get_irq_desc(i)->status
-                               &= ~(IRQ_NOREQUEST | IRQ_LEVEL);
+                       /* Clear norequest flags */
+                       get_irq_desc(i)->status &= ~IRQ_NOREQUEST;
 
                        /* Legacy flags are left to default at this point,
                         * one can then use irq_create_mapping() to
                         * explicitely change them
                         */
-                       ops->map(host, i, i, 0);
+                       ops->map(host, i, i);
                }
                break;
        case IRQ_HOST_MAP_LINEAR:
@@ -457,13 +456,11 @@ void irq_set_virq_count(unsigned int count)
 }
 
 unsigned int irq_create_mapping(struct irq_host *host,
-                               irq_hw_number_t hwirq,
-                               unsigned int flags)
+                               irq_hw_number_t hwirq)
 {
        unsigned int virq, hint;
 
-       pr_debug("irq: irq_create_mapping(0x%p, 0x%lx, 0x%x)\n",
-                host, hwirq, flags);
+       pr_debug("irq: irq_create_mapping(0x%p, 0x%lx)\n", host, hwirq);
 
        /* Look for default host if nececssary */
        if (host == NULL)
@@ -482,7 +479,6 @@ unsigned int irq_create_mapping(struct irq_host *host,
        virq = irq_find_mapping(host, hwirq);
        if (virq != IRQ_NONE) {
                pr_debug("irq: -> existing mapping on virq %d\n", virq);
-               host->ops->map(host, virq, hwirq, flags);
                return virq;
        }
 
@@ -504,18 +500,18 @@ unsigned int irq_create_mapping(struct irq_host *host,
        }
        pr_debug("irq: -> obtained virq %d\n", virq);
 
-       /* Clear some flags */
-       get_irq_desc(virq)->status &= ~(IRQ_NOREQUEST | IRQ_LEVEL);
+       /* Clear IRQ_NOREQUEST flag */
+       get_irq_desc(virq)->status &= ~IRQ_NOREQUEST;
 
        /* map it */
-       if (host->ops->map(host, virq, hwirq, flags)) {
+       smp_wmb();
+       irq_map[virq].hwirq = hwirq;
+       smp_mb();
+       if (host->ops->map(host, virq, hwirq)) {
                pr_debug("irq: -> mapping failed, freeing\n");
                irq_free_virt(virq, 1);
                return NO_IRQ;
        }
-       smp_wmb();
-       irq_map[virq].hwirq = hwirq;
-       smp_mb();
        return virq;
 }
 EXPORT_SYMBOL_GPL(irq_create_mapping);
@@ -525,25 +521,38 @@ extern unsigned int irq_create_of_mapping(struct device_node *controller,
 {
        struct irq_host *host;
        irq_hw_number_t hwirq;
-       unsigned int flags = IRQ_TYPE_NONE;
+       unsigned int type = IRQ_TYPE_NONE;
+       unsigned int virq;
 
        if (controller == NULL)
                host = irq_default_host;
        else
                host = irq_find_host(controller);
-       if (host == NULL)
+       if (host == NULL) {
+               printk(KERN_WARNING "irq: no irq host found for %s !\n",
+                      controller->full_name);
                return NO_IRQ;
+       }
 
        /* If host has no translation, then we assume interrupt line */
        if (host->ops->xlate == NULL)
                hwirq = intspec[0];
        else {
                if (host->ops->xlate(host, controller, intspec, intsize,
-                                    &hwirq, &flags))
+                                    &hwirq, &type))
                        return NO_IRQ;
        }
 
-       return irq_create_mapping(host, hwirq, flags);
+       /* Create mapping */
+       virq = irq_create_mapping(host, hwirq);
+       if (virq == NO_IRQ)
+               return virq;
+
+       /* Set type if specified and different than the current one */
+       if (type != IRQ_TYPE_NONE &&
+           type != (get_irq_desc(virq)->status & IRQF_TRIGGER_MASK))
+               set_irq_type(virq, type);
+       return virq;
 }
 EXPORT_SYMBOL_GPL(irq_create_of_mapping);
 
index 898dae8ab6d91684daae3bd6d1795b27bacc958e..09b1e1bbb29b8420d799021f42b37d997e715696 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/sched.h>
 #include <linux/errno.h>
 #include <linux/bootmem.h>
+#include <linux/irq.h>
 
 #include <asm/processor.h>
 #include <asm/io.h>
@@ -18,7 +19,6 @@
 #include <asm/sections.h>
 #include <asm/pci-bridge.h>
 #include <asm/byteorder.h>
-#include <asm/irq.h>
 #include <asm/uaccess.h>
 #include <asm/machdep.h>
 
@@ -1420,15 +1420,37 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
 
        DBG("Try to map irq for %s...\n", pci_name(pci_dev));
 
+       /* Try to get a mapping from the device-tree */
        if (of_irq_map_pci(pci_dev, &oirq)) {
-               DBG(" -> failed !\n");
-               return -1;
-       }
+               u8 line, pin;
+
+               /* If that fails, lets fallback to what is in the config
+                * space and map that through the default controller. We
+                * also set the type to level low since that's what PCI
+                * interrupts are. If your platform does differently, then
+                * either provide a proper interrupt tree or don't use this
+                * function.
+                */
+               if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &pin))
+                       return -1;
+               if (pin == 0)
+                       return -1;
+               if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
+                   line == 0xff) {
+                       return -1;
+               }
+               DBG(" -> no map ! Using irq line %d from PCI config\n", line);
 
-       DBG(" -> got one, spec %d cells (0x%08x...) on %s\n",
-           oirq.size, oirq.specifier[0], oirq.controller->full_name);
+               virq = irq_create_mapping(NULL, line);
+               if (virq != NO_IRQ)
+                       set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
+       } else {
+               DBG(" -> got one, spec %d cells (0x%08x...) on %s\n",
+                   oirq.size, oirq.specifier[0], oirq.controller->full_name);
 
-       virq = irq_create_of_mapping(oirq.controller, oirq.specifier, oirq.size);
+               virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
+                                            oirq.size);
+       }
        if(virq == NO_IRQ) {
                DBG(" -> failed to map !\n");
                return -1;
index efc0b5559ee0e79eb1874fec310eb9cdf676b880..2fce7738e9e2df1800b1bd67aaceeb2fc9eaea27 100644 (file)
 #include <linux/mm.h>
 #include <linux/list.h>
 #include <linux/syscalls.h>
+#include <linux/irq.h>
 
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/pci-bridge.h>
 #include <asm/byteorder.h>
-#include <asm/irq.h>
 #include <asm/machdep.h>
 #include <asm/ppc-pci.h>
 
@@ -1289,15 +1289,37 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
 
        DBG("Try to map irq for %s...\n", pci_name(pci_dev));
 
+       /* Try to get a mapping from the device-tree */
        if (of_irq_map_pci(pci_dev, &oirq)) {
-               DBG(" -> failed !\n");
-               return -1;
-       }
+               u8 line, pin;
+
+               /* If that fails, lets fallback to what is in the config
+                * space and map that through the default controller. We
+                * also set the type to level low since that's what PCI
+                * interrupts are. If your platform does differently, then
+                * either provide a proper interrupt tree or don't use this
+                * function.
+                */
+               if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &pin))
+                       return -1;
+               if (pin == 0)
+                       return -1;
+               if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
+                   line == 0xff) {
+                       return -1;
+               }
+               DBG(" -> no map ! Using irq line %d from PCI config\n", line);
 
-       DBG(" -> got one, spec %d cells (0x%08x...) on %s\n",
-           oirq.size, oirq.specifier[0], oirq.controller->full_name);
+               virq = irq_create_mapping(NULL, line);
+               if (virq != NO_IRQ)
+                       set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
+       } else {
+               DBG(" -> got one, spec %d cells (0x%08x...) on %s\n",
+                   oirq.size, oirq.specifier[0], oirq.controller->full_name);
 
-       virq = irq_create_of_mapping(oirq.controller, oirq.specifier, oirq.size);
+               virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
+                                            oirq.size);
+       }
        if(virq == NO_IRQ) {
                DBG(" -> failed to map !\n");
                return -1;
index e3b80f71748e96fd2cc064031d2241a25a83ee51..f6a05f090b25e4368496d1af769a1bb79925f628 100644 (file)
@@ -5,7 +5,7 @@
 #include <linux/elfcore.h>
 #include <linux/string.h>
 #include <linux/interrupt.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/vt_kern.h>
 #include <linux/nvram.h>
 #include <linux/console.h>
index 21009b1f7869808ef3f6d1befb63416a3d2452bf..6a7e997c401d8ea81cbbf5e3259927c0875000c5 100644 (file)
@@ -881,7 +881,7 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
        intsize = *tmp;
 
        /* Check index */
-       if (index * intsize >= intlen)
+       if ((index + 1) * intsize > intlen)
                return -EINVAL;
 
        /* Get new specifier and map it */
index c6d7b98af7d5b41f94cc7ccb16c8b0a85c22e3f5..499c3861074f708e39cdd2ff9509d13c6938bb9c 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/ioport.h>
 #include <linux/console.h>
 #include <linux/utsname.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/root_dev.h>
 #include <linux/notifier.h>
 #include <linux/cpu.h>
index 9d5da7896892701baa4fd85ea2b0a27b8be26c0c..d7bbb61109f9fab1c73bfa2fed73ff6d4913b91d 100644 (file)
@@ -159,7 +159,7 @@ static void iic_request_ipi(int ipi, const char *name)
                if (iic_hosts[node] == NULL)
                        continue;
                virq = irq_create_mapping(iic_hosts[node],
-                                         iic_ipi_to_irq(ipi), 0);
+                                         iic_ipi_to_irq(ipi));
                if (virq == NO_IRQ) {
                        printk(KERN_ERR
                               "iic: failed to map IPI %s on node %d\n",
@@ -197,7 +197,7 @@ static int iic_host_match(struct irq_host *h, struct device_node *node)
 }
 
 static int iic_host_map(struct irq_host *h, unsigned int virq,
-                       irq_hw_number_t hw, unsigned int flags)
+                       irq_hw_number_t hw)
 {
        if (hw < IIC_IRQ_IPI0)
                set_irq_chip_and_handler(virq, &iic_chip, handle_fasteoi_irq);
index ae7ef88f1a372fce0dcdf5c730de4ab1d5aa24e3..15217bb0402fd867d605d3c2e0827e1c53d26cc0 100644 (file)
@@ -85,9 +85,6 @@ static void spider_unmask_irq(unsigned int virq)
        struct spider_pic *pic = spider_virq_to_pic(virq);
        void __iomem *cfg = spider_get_irq_config(pic, irq_map[virq].hwirq);
 
-       /* We use no locking as we should be covered by the descriptor lock
-        * for access to invidual source configuration registers
-        */
        out_be32(cfg, in_be32(cfg) | 0x30000000u);
 }
 
@@ -96,9 +93,6 @@ static void spider_mask_irq(unsigned int virq)
        struct spider_pic *pic = spider_virq_to_pic(virq);
        void __iomem *cfg = spider_get_irq_config(pic, irq_map[virq].hwirq);
 
-       /* We use no locking as we should be covered by the descriptor lock
-        * for access to invidual source configuration registers
-        */
        out_be32(cfg, in_be32(cfg) & ~0x30000000u);
 }
 
@@ -120,26 +114,14 @@ static void spider_ack_irq(unsigned int virq)
        out_be32(pic->regs + TIR_EDC, 0x100 | (src & 0xf));
 }
 
-static struct irq_chip spider_pic = {
-       .typename = " SPIDER   ",
-       .unmask = spider_unmask_irq,
-       .mask = spider_mask_irq,
-       .ack = spider_ack_irq,
-};
-
-static int spider_host_match(struct irq_host *h, struct device_node *node)
-{
-       struct spider_pic *pic = h->host_data;
-       return node == pic->of_node;
-}
-
-static int spider_host_map(struct irq_host *h, unsigned int virq,
-                       irq_hw_number_t hw, unsigned int flags)
+static int spider_set_irq_type(unsigned int virq, unsigned int type)
 {
-       unsigned int sense = flags & IRQ_TYPE_SENSE_MASK;
-       struct spider_pic *pic = h->host_data;
+       unsigned int sense = type & IRQ_TYPE_SENSE_MASK;
+       struct spider_pic *pic = spider_virq_to_pic(virq);
+       unsigned int hw = irq_map[virq].hwirq;
        void __iomem *cfg = spider_get_irq_config(pic, hw);
-       int level = 0;
+       struct irq_desc *desc = get_irq_desc(virq);
+       u32 old_mask;
        u32 ic;
 
        /* Note that only level high is supported for most interrupts */
@@ -157,29 +139,57 @@ static int spider_host_map(struct irq_host *h, unsigned int virq,
                break;
        case IRQ_TYPE_LEVEL_LOW:
                ic = 0x0;
-               level = 1;
                break;
        case IRQ_TYPE_LEVEL_HIGH:
        case IRQ_TYPE_NONE:
                ic = 0x1;
-               level = 1;
                break;
        default:
                return -EINVAL;
        }
 
+       /* Update irq_desc */
+       desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
+       desc->status |= type & IRQ_TYPE_SENSE_MASK;
+       if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW))
+               desc->status |= IRQ_LEVEL;
+
        /* Configure the source. One gross hack that was there before and
         * that I've kept around is the priority to the BE which I set to
         * be the same as the interrupt source number. I don't know wether
         * that's supposed to make any kind of sense however, we'll have to
         * decide that, but for now, I'm not changing the behaviour.
         */
-       out_be32(cfg, (ic << 24) | (0x7 << 16) | (pic->node_id << 4) | 0xe);
+       old_mask = in_be32(cfg) & 0x30000000u;
+       out_be32(cfg, old_mask | (ic << 24) | (0x7 << 16) |
+                (pic->node_id << 4) | 0xe);
        out_be32(cfg + 4, (0x2 << 16) | (hw & 0xff));
 
-       if (level)
-               get_irq_desc(virq)->status |= IRQ_LEVEL;
+       return 0;
+}
+
+static struct irq_chip spider_pic = {
+       .typename = " SPIDER   ",
+       .unmask = spider_unmask_irq,
+       .mask = spider_mask_irq,
+       .ack = spider_ack_irq,
+       .set_type = spider_set_irq_type,
+};
+
+static int spider_host_match(struct irq_host *h, struct device_node *node)
+{
+       struct spider_pic *pic = h->host_data;
+       return node == pic->of_node;
+}
+
+static int spider_host_map(struct irq_host *h, unsigned int virq,
+                       irq_hw_number_t hw)
+{
        set_irq_chip_and_handler(virq, &spider_pic, handle_level_irq);
+
+       /* Set default irq type */
+       set_irq_type(virq, IRQ_TYPE_NONE);
+
        return 0;
 }
 
@@ -283,7 +293,7 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic)
        if (iic_host == NULL)
                return NO_IRQ;
        /* Manufacture an IIC interrupt number of class 2 */
-       virq = irq_create_mapping(iic_host, 0x20 | unit, 0);
+       virq = irq_create_mapping(iic_host, 0x20 | unit);
        if (virq == NO_IRQ)
                printk(KERN_ERR "spider_pic: failed to map cascade !");
        return virq;
index 5d2313a6c82bfafd89c22c6b0ea653aa5442919d..d06042deb0219943132eba01d3b036d780044313 100644 (file)
@@ -583,9 +583,9 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
        spu->isrc = isrc = tmp[0];
 
        /* Now map interrupts of all 3 classes */
-       spu->irqs[0] = irq_create_mapping(host, 0x00 | isrc, 0);
-       spu->irqs[1] = irq_create_mapping(host, 0x10 | isrc, 0);
-       spu->irqs[2] = irq_create_mapping(host, 0x20 | isrc, 0);
+       spu->irqs[0] = irq_create_mapping(host, 0x00 | isrc);
+       spu->irqs[1] = irq_create_mapping(host, 0x10 | isrc);
+       spu->irqs[2] = irq_create_mapping(host, 0x20 | isrc);
 
        /* Right now, we only fail if class 2 failed */
        return spu->irqs[2] == NO_IRQ ? -EINVAL : 0;
index 2275e64f3152cc53b91c5c6b5fca9d832db4ea69..e32446877e78a2edc46e7e36d7da3574d220a084 100644 (file)
@@ -300,7 +300,7 @@ int __init iSeries_allocate_IRQ(HvBusNumber bus,
        realirq = (((((sub_bus << 8) + (bus - 1)) << 3) + (idsel - 1)) << 3)
                + function;
 
-       return irq_create_mapping(NULL, realirq, IRQ_TYPE_NONE);
+       return irq_create_mapping(NULL, realirq);
 }
 
 #endif /* CONFIG_PCI */
@@ -341,7 +341,7 @@ unsigned int iSeries_get_irq(struct pt_regs *regs)
 }
 
 static int iseries_irq_host_map(struct irq_host *h, unsigned int virq,
-                               irq_hw_number_t hw, unsigned int flags)
+                               irq_hw_number_t hw)
 {
        set_irq_chip_and_handler(virq, &iseries_pic, handle_fasteoi_irq);
 
index 69f65e215a5c8baa9fe7895542f1c84b9cf83780..74eed6b74cd6dbf3a762328f9b5218b09e5f4a92 100644 (file)
 
 #define OLD_BACKLIGHT_MAX 15
 
+static void pmac_backlight_key_worker(void *data);
+static DECLARE_WORK(pmac_backlight_key_work, pmac_backlight_key_worker, NULL);
+
+/* Although this variable is used in interrupt context, it makes no sense to
+ * protect it. No user is able to produce enough key events per second and
+ * notice the errors that might happen.
+ */
+static int pmac_backlight_key_queued;
+
 /* Protect the pmac_backlight variable */
 DEFINE_MUTEX(pmac_backlight_mutex);
 
@@ -71,7 +80,7 @@ int pmac_backlight_curve_lookup(struct fb_info *info, int value)
        return level;
 }
 
-static void pmac_backlight_key(int direction)
+static void pmac_backlight_key_worker(void *data)
 {
        mutex_lock(&pmac_backlight_mutex);
        if (pmac_backlight) {
@@ -82,7 +91,8 @@ static void pmac_backlight_key(int direction)
                props = pmac_backlight->props;
 
                brightness = props->brightness +
-                       ((direction?-1:1) * (props->max_brightness / 15));
+                       ((pmac_backlight_key_queued?-1:1) *
+                        (props->max_brightness / 15));
 
                if (brightness < 0)
                        brightness = 0;
@@ -97,14 +107,13 @@ static void pmac_backlight_key(int direction)
        mutex_unlock(&pmac_backlight_mutex);
 }
 
-void pmac_backlight_key_up()
+void pmac_backlight_key(int direction)
 {
-       pmac_backlight_key(0);
-}
-
-void pmac_backlight_key_down()
-{
-       pmac_backlight_key(1);
+       /* we can receive multiple interrupts here, but the scheduled work
+        * will run only once, with the last value
+        */
+       pmac_backlight_key_queued = direction;
+       schedule_work(&pmac_backlight_key_work);
 }
 
 int pmac_backlight_set_legacy_brightness(int brightness)
@@ -157,3 +166,7 @@ int pmac_backlight_get_legacy_brightness()
 
        return result;
 }
+
+EXPORT_SYMBOL_GPL(pmac_backlight);
+EXPORT_SYMBOL_GPL(pmac_backlight_mutex);
+EXPORT_SYMBOL_GPL(pmac_has_backlight_type);
index 556b349797e850020d1b70146c14e2cdd4921929..205d04471161eba2709af1a821c6c5d0ea9aac4b 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/string.h>
 #include <linux/init.h>
 #include <linux/bootmem.h>
+#include <linux/irq.h>
 
 #include <asm/sections.h>
 #include <asm/io.h>
 #include <asm/machdep.h>
 #include <asm/pmac_feature.h>
 #include <asm/grackle.h>
-#ifdef CONFIG_PPC64
-//#include <asm/iommu.h>
 #include <asm/ppc-pci.h>
-#endif
 
 #undef DEBUG
 
@@ -46,7 +44,6 @@ static int has_uninorth;
 static struct pci_controller *u3_agp;
 static struct pci_controller *u4_pcie;
 static struct pci_controller *u3_ht;
-#define has_second_ohare 0
 #else
 static int has_second_ohare;
 #endif /* CONFIG_PPC64 */
@@ -993,6 +990,7 @@ void __init pmac_pcibios_fixup(void)
                /* Read interrupt from the device-tree */
                pci_read_irq_line(dev);
 
+#ifdef CONFIG_PPC32
                /* Fixup interrupt for the modem/ethernet combo controller.
                 * on machines with a second ohare chip.
                 * The number in the device tree (27) is bogus (correct for
@@ -1002,8 +1000,11 @@ void __init pmac_pcibios_fixup(void)
                 */
                if (has_second_ohare &&
                    dev->vendor == PCI_VENDOR_ID_DEC &&
-                   dev->device == PCI_DEVICE_ID_DEC_TULIP_PLUS)
-                       dev->irq = irq_create_mapping(NULL, 60, 0);
+                   dev->device == PCI_DEVICE_ID_DEC_TULIP_PLUS) {
+                       dev->irq = irq_create_mapping(NULL, 60);
+                       set_irq_type(dev->irq, IRQ_TYPE_LEVEL_LOW);
+               }
+#endif /* CONFIG_PPC32 */
        }
 }
 
index 3d328bc1f7e019e107bc9f7522042254d1e6201d..060789e31c6770fa9e74d1aaebbcfe8ca3f74742 100644 (file)
@@ -291,7 +291,7 @@ static int pmac_pic_host_match(struct irq_host *h, struct device_node *node)
 }
 
 static int pmac_pic_host_map(struct irq_host *h, unsigned int virq,
-                            irq_hw_number_t hw, unsigned int flags)
+                            irq_hw_number_t hw)
 {
        struct irq_desc *desc = get_irq_desc(virq);
        int level;
@@ -318,6 +318,7 @@ static int pmac_pic_host_xlate(struct irq_host *h, struct device_node *ct,
                               unsigned int *out_flags)
 
 {
+       *out_flags = IRQ_TYPE_NONE;
        *out_hwirq = *intspec;
        return 0;
 }
@@ -434,7 +435,7 @@ static void __init pmac_pic_probe_oldstyle(void)
 
        printk(KERN_INFO "irq: System has %d possible interrupts\n", max_irqs);
 #ifdef CONFIG_XMON
-       setup_irq(irq_create_mapping(NULL, 20, 0), &xmon_action);
+       setup_irq(irq_create_mapping(NULL, 20), &xmon_action);
 #endif
 }
 #endif /* CONFIG_PPC32 */
@@ -579,9 +580,10 @@ void __init pmac_pic_init(void)
                flags |= OF_IMAP_OLDWORLD_MAC;
        if (get_property(of_chosen, "linux,bootx", NULL) != NULL)
                flags |= OF_IMAP_NO_PHANDLE;
-       of_irq_map_init(flags);
 #endif /* CONFIG_PPC_32 */
 
+       of_irq_map_init(flags);
+
        /* We first try to detect Apple's new Core99 chipset, since mac-io
         * is quite different on those machines and contains an IBM MPIC2.
         */
index 9df783088b618347471e2afd7e446bd387b6f4c9..c7ffde1a614e1a93bf307311d60636182f165e50 100644 (file)
@@ -93,8 +93,7 @@ static void request_ras_irqs(struct device_node *np,
                for (i = 0; i < opicplen; i++) {
                        if (count > 15)
                                break;
-                       virqs[count] = irq_create_mapping(NULL, *(opicprop++),
-                                                        IRQ_TYPE_NONE);
+                       virqs[count] = irq_create_mapping(NULL, *(opicprop++));
                        if (virqs[count] == NO_IRQ)
                                printk(KERN_ERR "Unable to allocate interrupt "
                                       "number for %s\n", np->full_name);
index 716972aa9777298fd308ff2c1d01c27b6ea290ef..2d0da6f9e244b9fa44c4f710828fd8a5c86d19a7 100644 (file)
@@ -502,16 +502,9 @@ static int xics_host_match(struct irq_host *h, struct device_node *node)
 }
 
 static int xics_host_map_direct(struct irq_host *h, unsigned int virq,
-                               irq_hw_number_t hw, unsigned int flags)
+                               irq_hw_number_t hw)
 {
-       unsigned int sense = flags & IRQ_TYPE_SENSE_MASK;
-
-       pr_debug("xics: map_direct virq %d, hwirq 0x%lx, flags: 0x%x\n",
-                virq, hw, flags);
-
-       if (sense && sense != IRQ_TYPE_LEVEL_LOW)
-               printk(KERN_WARNING "xics: using unsupported sense 0x%x"
-                      " for irq %d (h: 0x%lx)\n", flags, virq, hw);
+       pr_debug("xics: map_direct virq %d, hwirq 0x%lx\n", virq, hw);
 
        get_irq_desc(virq)->status |= IRQ_LEVEL;
        set_irq_chip_and_handler(virq, &xics_pic_direct, handle_fasteoi_irq);
@@ -519,16 +512,9 @@ static int xics_host_map_direct(struct irq_host *h, unsigned int virq,
 }
 
 static int xics_host_map_lpar(struct irq_host *h, unsigned int virq,
-                             irq_hw_number_t hw, unsigned int flags)
+                             irq_hw_number_t hw)
 {
-       unsigned int sense = flags & IRQ_TYPE_SENSE_MASK;
-
-       pr_debug("xics: map_lpar virq %d, hwirq 0x%lx, flags: 0x%x\n",
-                virq, hw, flags);
-
-       if (sense && sense != IRQ_TYPE_LEVEL_LOW)
-               printk(KERN_WARNING "xics: using unsupported sense 0x%x"
-                      " for irq %d (h: 0x%lx)\n", flags, virq, hw);
+       pr_debug("xics: map_direct virq %d, hwirq 0x%lx\n", virq, hw);
 
        get_irq_desc(virq)->status |= IRQ_LEVEL;
        set_irq_chip_and_handler(virq, &xics_pic_lpar, handle_fasteoi_irq);
@@ -757,7 +743,7 @@ void xics_request_IPIs(void)
 {
        unsigned int ipi;
 
-       ipi = irq_create_mapping(xics_host, XICS_IPI, 0);
+       ipi = irq_create_mapping(xics_host, XICS_IPI);
        BUG_ON(ipi == NO_IRQ);
 
        /*
@@ -782,6 +768,14 @@ void xics_teardown_cpu(int secondary)
 
        xics_set_cpu_priority(cpu, 0);
 
+       /*
+        * Clear IPI
+        */
+       if (firmware_has_feature(FW_FEATURE_LPAR))
+               lpar_qirr_info(cpu, 0xff);
+       else
+               direct_qirr_info(cpu, 0xff);
+
        /*
         * we need to EOI the IPI if we got here from kexec down IPI
         *
@@ -795,7 +789,7 @@ void xics_teardown_cpu(int secondary)
                return;
        desc = get_irq_desc(ipi);
        if (desc->chip && desc->chip->eoi)
-               desc->chip->eoi(XICS_IPI);
+               desc->chip->eoi(ipi);
 
        /*
         * Some machines need to have at least one cpu in the GIQ,
index 72c73a6105cd1b66c7019ea5875c4ccf87a1dc4b..9855820b9548c8e1fb540f942b781ce13e2ef8bb 100644 (file)
@@ -169,7 +169,7 @@ static int i8259_host_match(struct irq_host *h, struct device_node *node)
 }
 
 static int i8259_host_map(struct irq_host *h, unsigned int virq,
-                         irq_hw_number_t hw, unsigned int flags)
+                         irq_hw_number_t hw)
 {
        pr_debug("i8259_host_map(%d, 0x%lx)\n", virq, hw);
 
@@ -177,7 +177,7 @@ static int i8259_host_map(struct irq_host *h, unsigned int virq,
        if (hw == 2)
                get_irq_desc(virq)->status |= IRQ_NOREQUEST;
 
-       /* We use the level stuff only for now, we might want to
+       /* We use the level handler only for now, we might want to
         * be more cautious here but that works for now
         */
        get_irq_desc(virq)->status |= IRQ_LEVEL;
index 9cecebaa03608fbf1b0f3f078212a761a323027e..6e0281afa6c373d872678cfe6c164606cbd95209 100644 (file)
@@ -204,7 +204,7 @@ static void mpic_startup_ht_interrupt(struct mpic *mpic, unsigned int source,
        if (fixup->base == NULL)
                return;
 
-       DBG("startup_ht_interrupt(%u, %u) index: %d\n",
+       DBG("startup_ht_interrupt(0x%x, 0x%x) index: %d\n",
            source, irqflags, fixup->index);
        spin_lock_irqsave(&mpic->fixup_lock, flags);
        /* Enable and configure */
@@ -227,7 +227,7 @@ static void mpic_shutdown_ht_interrupt(struct mpic *mpic, unsigned int source,
        if (fixup->base == NULL)
                return;
 
-       DBG("shutdown_ht_interrupt(%u, %u)\n", source, irqflags);
+       DBG("shutdown_ht_interrupt(0x%x, 0x%x)\n", source, irqflags);
 
        /* Disable */
        spin_lock_irqsave(&mpic->fixup_lock, flags);
@@ -337,6 +337,17 @@ static void __init mpic_scan_ht_pics(struct mpic *mpic)
        }
 }
 
+#else /* CONFIG_MPIC_BROKEN_U3 */
+
+static inline int mpic_is_ht_interrupt(struct mpic *mpic, unsigned int source)
+{
+       return 0;
+}
+
+static void __init mpic_scan_ht_pics(struct mpic *mpic)
+{
+}
+
 #endif /* CONFIG_MPIC_BROKEN_U3 */
 
 
@@ -405,11 +416,9 @@ static void mpic_unmask_irq(unsigned int irq)
        unsigned int loops = 100000;
        struct mpic *mpic = mpic_from_irq(irq);
        unsigned int src = mpic_irq_to_hw(irq);
-       unsigned long flags;
 
        DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
 
-       spin_lock_irqsave(&mpic_lock, flags);
        mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI,
                       mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) &
                       ~MPIC_VECPRI_MASK);
@@ -420,7 +429,6 @@ static void mpic_unmask_irq(unsigned int irq)
                        break;
                }
        } while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK);
-       spin_unlock_irqrestore(&mpic_lock, flags);
 }
 
 static void mpic_mask_irq(unsigned int irq)
@@ -428,11 +436,9 @@ static void mpic_mask_irq(unsigned int irq)
        unsigned int loops = 100000;
        struct mpic *mpic = mpic_from_irq(irq);
        unsigned int src = mpic_irq_to_hw(irq);
-       unsigned long flags;
 
        DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
 
-       spin_lock_irqsave(&mpic_lock, flags);
        mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI,
                       mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) |
                       MPIC_VECPRI_MASK);
@@ -444,7 +450,6 @@ static void mpic_mask_irq(unsigned int irq)
                        break;
                }
        } while(!(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK));
-       spin_unlock_irqrestore(&mpic_lock, flags);
 }
 
 static void mpic_end_irq(unsigned int irq)
@@ -512,8 +517,7 @@ static void mpic_end_ht_irq(unsigned int irq)
                mpic_ht_end_irq(mpic, src);
        mpic_eoi(mpic);
 }
-
-#endif /* CONFIG_MPIC_BROKEN_U3 */
+#endif /* !CONFIG_MPIC_BROKEN_U3 */
 
 #ifdef CONFIG_SMP
 
@@ -560,47 +564,74 @@ static void mpic_set_affinity(unsigned int irq, cpumask_t cpumask)
                       mpic_physmask(cpus_addr(tmp)[0]));       
 }
 
-static unsigned int mpic_flags_to_vecpri(unsigned int flags, int *level)
+static unsigned int mpic_type_to_vecpri(unsigned int type)
 {
-       unsigned int vecpri;
-
        /* Now convert sense value */
-       switch(flags & IRQ_TYPE_SENSE_MASK) {
+       switch(type & IRQ_TYPE_SENSE_MASK) {
        case IRQ_TYPE_EDGE_RISING:
-               vecpri = MPIC_VECPRI_SENSE_EDGE |
-                       MPIC_VECPRI_POLARITY_POSITIVE;
-               *level = 0;
-               break;
+               return MPIC_VECPRI_SENSE_EDGE | MPIC_VECPRI_POLARITY_POSITIVE;
        case IRQ_TYPE_EDGE_FALLING:
-               vecpri = MPIC_VECPRI_SENSE_EDGE |
-                       MPIC_VECPRI_POLARITY_NEGATIVE;
-               *level = 0;
-               break;
+       case IRQ_TYPE_EDGE_BOTH:
+               return MPIC_VECPRI_SENSE_EDGE | MPIC_VECPRI_POLARITY_NEGATIVE;
        case IRQ_TYPE_LEVEL_HIGH:
-               vecpri = MPIC_VECPRI_SENSE_LEVEL |
-                       MPIC_VECPRI_POLARITY_POSITIVE;
-               *level = 1;
-               break;
+               return MPIC_VECPRI_SENSE_LEVEL | MPIC_VECPRI_POLARITY_POSITIVE;
        case IRQ_TYPE_LEVEL_LOW:
        default:
-               vecpri = MPIC_VECPRI_SENSE_LEVEL |
-                       MPIC_VECPRI_POLARITY_NEGATIVE;
-               *level = 1;
+               return MPIC_VECPRI_SENSE_LEVEL | MPIC_VECPRI_POLARITY_NEGATIVE;
        }
-       return vecpri;
+}
+
+static int mpic_set_irq_type(unsigned int virq, unsigned int flow_type)
+{
+       struct mpic *mpic = mpic_from_irq(virq);
+       unsigned int src = mpic_irq_to_hw(virq);
+       struct irq_desc *desc = get_irq_desc(virq);
+       unsigned int vecpri, vold, vnew;
+
+       DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n",
+           mpic, virq, src, flow_type);
+
+       if (src >= mpic->irq_count)
+               return -EINVAL;
+
+       if (flow_type == IRQ_TYPE_NONE)
+               if (mpic->senses && src < mpic->senses_count)
+                       flow_type = mpic->senses[src];
+       if (flow_type == IRQ_TYPE_NONE)
+               flow_type = IRQ_TYPE_LEVEL_LOW;
+
+       desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
+       desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
+       if (flow_type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW))
+               desc->status |= IRQ_LEVEL;
+
+       if (mpic_is_ht_interrupt(mpic, src))
+               vecpri = MPIC_VECPRI_POLARITY_POSITIVE |
+                       MPIC_VECPRI_SENSE_EDGE;
+       else
+               vecpri = mpic_type_to_vecpri(flow_type);
+
+       vold = mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI);
+       vnew = vold & ~(MPIC_VECPRI_POLARITY_MASK | MPIC_VECPRI_SENSE_MASK);
+       vnew |= vecpri;
+       if (vold != vnew)
+               mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, vnew);
+
+       return 0;
 }
 
 static struct irq_chip mpic_irq_chip = {
-       .mask   = mpic_mask_irq,
-       .unmask = mpic_unmask_irq,
-       .eoi    = mpic_end_irq,
+       .mask           = mpic_mask_irq,
+       .unmask         = mpic_unmask_irq,
+       .eoi            = mpic_end_irq,
+       .set_type       = mpic_set_irq_type,
 };
 
 #ifdef CONFIG_SMP
 static struct irq_chip mpic_ipi_chip = {
-       .mask   = mpic_mask_ipi,
-       .unmask = mpic_unmask_ipi,
-       .eoi    = mpic_end_ipi,
+       .mask           = mpic_mask_ipi,
+       .unmask         = mpic_unmask_ipi,
+       .eoi            = mpic_end_ipi,
 };
 #endif /* CONFIG_SMP */
 
@@ -611,6 +642,7 @@ static struct irq_chip mpic_irq_ht_chip = {
        .mask           = mpic_mask_irq,
        .unmask         = mpic_unmask_ht_irq,
        .eoi            = mpic_end_ht_irq,
+       .set_type       = mpic_set_irq_type,
 };
 #endif /* CONFIG_MPIC_BROKEN_U3 */
 
@@ -624,26 +656,21 @@ static int mpic_host_match(struct irq_host *h, struct device_node *node)
 }
 
 static int mpic_host_map(struct irq_host *h, unsigned int virq,
-                        irq_hw_number_t hw, unsigned int flags)
+                        irq_hw_number_t hw)
 {
-       struct irq_desc *desc = get_irq_desc(virq);
-       struct irq_chip *chip;
        struct mpic *mpic = h->host_data;
-       u32 v, vecpri = MPIC_VECPRI_SENSE_LEVEL |
-               MPIC_VECPRI_POLARITY_NEGATIVE;
-       int level;
-       unsigned long iflags;
+       struct irq_chip *chip;
 
-       pr_debug("mpic: map virq %d, hwirq 0x%lx, flags: 0x%x\n",
-                virq, hw, flags);
+       DBG("mpic: map virq %d, hwirq 0x%lx\n", virq, hw);
 
        if (hw == MPIC_VEC_SPURRIOUS)
                return -EINVAL;
+
 #ifdef CONFIG_SMP
        else if (hw >= MPIC_VEC_IPI_0) {
                WARN_ON(!(mpic->flags & MPIC_PRIMARY));
 
-               pr_debug("mpic: mapping as IPI\n");
+               DBG("mpic: mapping as IPI\n");
                set_irq_chip_data(virq, mpic);
                set_irq_chip_and_handler(virq, &mpic->hc_ipi,
                                         handle_percpu_irq);
@@ -654,44 +681,23 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq,
        if (hw >= mpic->irq_count)
                return -EINVAL;
 
-       /* If no sense provided, check default sense array */
-       if (((flags & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_NONE) &&
-           mpic->senses && hw < mpic->senses_count)
-               flags |= mpic->senses[hw];
-
-       vecpri = mpic_flags_to_vecpri(flags, &level);
-       if (level)
-               desc->status |= IRQ_LEVEL;
+       /* Default chip */
        chip = &mpic->hc_irq;
 
 #ifdef CONFIG_MPIC_BROKEN_U3
        /* Check for HT interrupts, override vecpri */
-       if (mpic_is_ht_interrupt(mpic, hw)) {
-               vecpri &= ~(MPIC_VECPRI_SENSE_MASK |
-                           MPIC_VECPRI_POLARITY_MASK);
-               vecpri |= MPIC_VECPRI_POLARITY_POSITIVE;
+       if (mpic_is_ht_interrupt(mpic, hw))
                chip = &mpic->hc_ht_irq;
-       }
-#endif
+#endif /* CONFIG_MPIC_BROKEN_U3 */
 
-       /* Reconfigure irq. We must preserve the mask bit as we can be called
-        * while the interrupt is still active (This may change in the future
-        * but for now, it is the case).
-        */
-       spin_lock_irqsave(&mpic_lock, iflags);
-       v = mpic_irq_read(hw, MPIC_IRQ_VECTOR_PRI);
-       vecpri = (v &
-               ~(MPIC_VECPRI_POLARITY_MASK | MPIC_VECPRI_SENSE_MASK)) |
-               vecpri;
-       if (vecpri != v)
-               mpic_irq_write(hw, MPIC_IRQ_VECTOR_PRI, vecpri);
-       spin_unlock_irqrestore(&mpic_lock, iflags);
-
-       pr_debug("mpic: mapping as IRQ, vecpri = 0x%08x (was 0x%08x)\n",
-                vecpri, v);
+       DBG("mpic: mapping to irq chip @%p\n", chip);
 
        set_irq_chip_data(virq, mpic);
        set_irq_chip_and_handler(virq, chip, handle_fasteoi_irq);
+
+       /* Set default irq type */
+       set_irq_type(virq, IRQ_TYPE_NONE);
+
        return 0;
 }
 
@@ -708,11 +714,28 @@ static int mpic_host_xlate(struct irq_host *h, struct device_node *ct,
        };
 
        *out_hwirq = intspec[0];
-       if (intsize > 1 && intspec[1] < 4)
-               *out_flags = map_mpic_senses[intspec[1]];
-       else
+       if (intsize > 1) {
+               u32 mask = 0x3;
+
+               /* Apple invented a new race of encoding on machines with
+                * an HT APIC. They encode, among others, the index within
+                * the HT APIC. We don't care about it here since thankfully,
+                * it appears that they have the APIC already properly
+                * configured, and thus our current fixup code that reads the
+                * APIC config works fine. However, we still need to mask out
+                * bits in the specifier to make sure we only get bit 0 which
+                * is the level/edge bit (the only sense bit exposed by Apple),
+                * as their bit 1 means something else.
+                */
+               if (machine_is(powermac))
+                       mask = 0x1;
+               *out_flags = map_mpic_senses[intspec[1] & mask];
+       } else
                *out_flags = IRQ_TYPE_NONE;
 
+       DBG("mpic: xlate (%d cells: 0x%08x 0x%08x) to line 0x%lx sense 0x%x\n",
+           intsize, intspec[0], intspec[1], *out_hwirq, *out_flags);
+
        return 0;
 }
 
@@ -906,41 +929,16 @@ void __init mpic_init(struct mpic *mpic)
        if (mpic->irq_count == 0)
                mpic->irq_count = mpic->num_sources;
 
-#ifdef CONFIG_MPIC_BROKEN_U3
        /* Do the HT PIC fixups on U3 broken mpic */
        DBG("MPIC flags: %x\n", mpic->flags);
        if ((mpic->flags & MPIC_BROKEN_U3) && (mpic->flags & MPIC_PRIMARY))
                mpic_scan_ht_pics(mpic);
-#endif /* CONFIG_MPIC_BROKEN_U3 */
 
        for (i = 0; i < mpic->num_sources; i++) {
                /* start with vector = source number, and masked */
-               u32 vecpri = MPIC_VECPRI_MASK | i | (8 << MPIC_VECPRI_PRIORITY_SHIFT);
-               int level = 1;
+               u32 vecpri = MPIC_VECPRI_MASK | i |
+                       (8 << MPIC_VECPRI_PRIORITY_SHIFT);
                
-               /* do senses munging */
-               if (mpic->senses && i < mpic->senses_count)
-                       vecpri |= mpic_flags_to_vecpri(mpic->senses[i],
-                                                      &level);
-               else
-                       vecpri |= MPIC_VECPRI_SENSE_LEVEL;
-
-               /* deal with broken U3 */
-               if (mpic->flags & MPIC_BROKEN_U3) {
-#ifdef CONFIG_MPIC_BROKEN_U3
-                       if (mpic_is_ht_interrupt(mpic, i)) {
-                               vecpri &= ~(MPIC_VECPRI_SENSE_MASK |
-                                           MPIC_VECPRI_POLARITY_MASK);
-                               vecpri |= MPIC_VECPRI_POLARITY_POSITIVE;
-                       }
-#else
-                       printk(KERN_ERR "mpic: BROKEN_U3 set, but CONFIG doesn't match\n");
-#endif
-               }
-
-               DBG("setup source %d, vecpri: %08x, level: %d\n", i, vecpri,
-                   (level != 0));
-
                /* init hw */
                mpic_irq_write(i, MPIC_IRQ_VECTOR_PRI, vecpri);
                mpic_irq_write(i, MPIC_IRQ_DESTINATION,
@@ -1154,7 +1152,7 @@ void mpic_request_ipis(void)
 
        for (i = 0; i < 4; i++) {
                unsigned int vipi = irq_create_mapping(mpic->irqhost,
-                                                      MPIC_VEC_IPI_0 + i, 0);
+                                                      MPIC_VEC_IPI_0 + i);
                if (vipi == NO_IRQ) {
                        printk(KERN_ERR "Failed to map IPI %d\n", i);
                        break;
index 50c1b4739ca7021e5b43d28f119edf39f45faf51..d1735401384cbb6732aa19fe87d4f9b2607fe22c 100644 (file)
@@ -5,7 +5,7 @@
 #include <linux/elfcore.h>
 #include <linux/string.h>
 #include <linux/interrupt.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/vt_kern.h>
 #include <linux/nvram.h>
 #include <linux/console.h>
index faf2940300b0b79becf8bafecacb51161f5effa9..a74f46d9826fc4c6a670897b55e03c1524a15f3f 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/delay.h>
 #include <linux/initrd.h>
 #include <linux/ide.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
index 6436beffdc9688d6cd56855180957e10008963e5..1cb75a1f825e4a431589a4940772308c44381d5f 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/slab.h>
 #include <linux/user.h>
 #include <linux/a.out.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/major.h>
 #include <linux/interrupt.h>
 #include <linux/reboot.h>
index 224fbff7996970730bf449ad1d157158deadad54..ae071a11ce71aa16a657320789435a2d9a8e4779 100644 (file)
@@ -118,13 +118,6 @@ config SYSVIPC_COMPAT
        depends on COMPAT && SYSVIPC
        default y
 
-config BINFMT_ELF32
-       tristate "Kernel support for 31 bit ELF binaries"
-       depends on COMPAT
-       help
-         This allows you to run 32-bit Linux/ELF binaries on your zSeries
-         in 64 bit mode. Everybody wants this; say Y.
-
 comment "Code generation options"
 
 choice
index efa74af7f04ac1470971616e87dd8ad0cc4034be..1785bce2b9196445e89748858fe9570e2786339e 100644 (file)
@@ -403,7 +403,7 @@ static void *diag204_get_buffer(enum diag204_format fmt, int *pages)
                *pages = 1;
                return diag204_alloc_rbuf();
        } else {/* INFO_EXT */
-               *pages = diag204(SUBC_RSI | INFO_EXT, 0, 0);
+               *pages = diag204(SUBC_RSI | INFO_EXT, 0, NULL);
                if (*pages <= 0)
                        return ERR_PTR(-ENOSYS);
                else
index eabf00a6f7701a5cab6db9daead73a68c1b567ad..86601a945709ed5637f04216cddd54c393170049 100644 (file)
@@ -17,8 +17,8 @@ obj-$(CONFIG_MODULES)         += s390_ksyms.o module.o
 obj-$(CONFIG_SMP)              += smp.o
 
 obj-$(CONFIG_COMPAT)           += compat_linux.o compat_signal.o \
-                                       compat_wrapper.o compat_exec_domain.o
-obj-$(CONFIG_BINFMT_ELF32)     += binfmt_elf32.o
+                                       compat_wrapper.o compat_exec_domain.o \
+                                       binfmt_elf32.o
 
 obj-$(CONFIG_VIRT_TIMER)       += vtime.o
 obj-$(CONFIG_STACKTRACE)       += stacktrace.o
index cabb4ff54cd7d85abeba0984167a4514b623bb16..785c9f70ac980b328360560ffa8858191a60c382 100644 (file)
@@ -409,7 +409,7 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info)
        mm_segment_t old_fs = get_fs ();
        
        set_fs (KERNEL_DS);
-       ret = sys_sysinfo(&s);
+       ret = sys_sysinfo((struct sysinfo __user *) &s);
        set_fs (old_fs);
        err = put_user (s.uptime, &info->uptime);
        err |= __put_user (s.loads[0], &info->loads[0]);
@@ -438,7 +438,7 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
        mm_segment_t old_fs = get_fs ();
        
        set_fs (KERNEL_DS);
-       ret = sys_sched_rr_get_interval(pid, &t);
+       ret = sys_sched_rr_get_interval(pid, (struct timespec __user *) &t);
        set_fs (old_fs);
        if (put_compat_timespec(&t, interval))
                return -EFAULT;
@@ -464,7 +464,10 @@ asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set,
                }
        }
        set_fs (KERNEL_DS);
-       ret = sys_rt_sigprocmask(how, set ? &s : NULL, oset ? &s : NULL, sigsetsize);
+       ret = sys_rt_sigprocmask(how,
+                                set ? (sigset_t __user *) &s : NULL,
+                                oset ? (sigset_t __user *) &s : NULL,
+                                sigsetsize);
        set_fs (old_fs);
        if (ret) return ret;
        if (oset) {
@@ -489,7 +492,7 @@ asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set,
        mm_segment_t old_fs = get_fs();
                
        set_fs (KERNEL_DS);
-       ret = sys_rt_sigpending(&s, sigsetsize);
+       ret = sys_rt_sigpending((sigset_t __user *) &s, sigsetsize);
        set_fs (old_fs);
        if (!ret) {
                switch (_NSIG_WORDS) {
@@ -514,7 +517,7 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo)
        if (copy_siginfo_from_user32(&info, uinfo))
                return -EFAULT;
        set_fs (KERNEL_DS);
-       ret = sys_rt_sigqueueinfo(pid, sig, &info);
+       ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *) &info);
        set_fs (old_fs);
        return ret;
 }
@@ -674,7 +677,8 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offse
                return -EFAULT;
                
        set_fs(KERNEL_DS);
-       ret = sys_sendfile(out_fd, in_fd, offset ? &of : NULL, count);
+       ret = sys_sendfile(out_fd, in_fd,
+                          offset ? (off_t __user *) &of : NULL, count);
        set_fs(old_fs);
        
        if (offset && put_user(of, offset))
@@ -694,7 +698,8 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd,
                return -EFAULT;
                
        set_fs(KERNEL_DS);
-       ret = sys_sendfile64(out_fd, in_fd, offset ? &lof : NULL, count);
+       ret = sys_sendfile64(out_fd, in_fd,
+                            offset ? (loff_t __user *) &lof : NULL, count);
        set_fs(old_fs);
        
        if (offset && put_user(lof, offset))
index d00de17b3778ef9fde54a971de2175922ab5b03d..a4dc61f3285e3ef55e1ff7c559137ae965a59c10 100644 (file)
@@ -273,7 +273,7 @@ startup_continue:
 .Lbss_end:  .long _end
 .Lparmaddr: .long PARMAREA
 .Lsccbaddr: .long .Lsccb
-       .align  4096
+       .org    0x12000
 .Lsccb:
        .hword  0x1000                  # length, one page
        .byte   0x00,0x00,0x00
@@ -290,7 +290,7 @@ startup_continue:
 .Lscpincr2:
        .quad   0x00
        .fill   3984,1,0
-       .align  4096
+       .org    0x13000
 
 #ifdef CONFIG_SHARED_KERNEL
        .org    0x100000
index 47744fcca930d92f3e2dad3184a64be84009d3c8..9d80c5b1ef9582d79b7bd8670da36813bc0c926d 100644 (file)
@@ -268,7 +268,7 @@ startup_continue:
 .Lparmaddr:
        .quad   PARMAREA
 
-       .align 4096
+       .org    0x12000
 .Lsccb:
        .hword 0x1000                   # length, one page
        .byte 0x00,0x00,0x00
@@ -285,7 +285,7 @@ startup_continue:
 .Lscpincr2:
        .quad 0x00
        .fill 3984,1,0
-       .align 4096
+       .org    0x13000
 
 #ifdef CONFIG_SHARED_KERNEL
        .org   0x100000
index fbde6a91526481e96a9acf3b50f3c892d027e54f..60b1ea9f946beb137b33573a76483c189488cb5c 100644 (file)
@@ -63,6 +63,7 @@ NORET_TYPE void
 machine_kexec(struct kimage *image)
 {
        clear_all_subchannels();
+       cio_reset_channel_paths();
 
        /* Disable lowcore protection */
        ctl_clear_bit(0,28);
index c271cdab58e2051728c154882ee94881a3dd53fb..d989ed45a7aafedc9bb2715671d052ebd909a102 100644 (file)
@@ -119,7 +119,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
        int nrela, i, j;
 
        /* Find symbol table and string table. */
-       symtab = 0;
+       symtab = NULL;
        for (i = 0; i < hdr->e_shnum; i++)
                switch (sechdrs[i].sh_type) {
                case SHT_SYMTAB:
index 78c8e5548caf8f4117c99460d3bb8adac27ff91d..d3cbfa3005eca0017fb63ca6ddfe88d979659bcc 100644 (file)
@@ -172,7 +172,7 @@ void show_regs(struct pt_regs *regs)
        show_registers(regs);
        /* Show stack backtrace if pt_regs is from kernel mode */
        if (!(regs->psw.mask & PSW_MASK_PSTATE))
-               show_trace(0,(unsigned long *) regs->gprs[15]);
+               show_trace(NULL, (unsigned long *) regs->gprs[15]);
 }
 
 extern void kernel_thread_starter(void);
index 7ba777eec1a8d404ffd7de2793119c31f752431d..b81aa1f569ca88637635f3e86e1945af67f1350b 100644 (file)
@@ -13,7 +13,7 @@ static struct proc_dir_entry * root_irq_dir;
 void init_irq_proc(void)
 {
        /* create /proc/irq */
-       root_irq_dir = proc_mkdir("irq", 0);
+       root_irq_dir = proc_mkdir("irq", NULL);
 
        /* create /proc/irq/prof_cpu_mask */
        create_prof_cpu_mask(root_irq_dir);
index 207bc511a6e31949e9394e8d7ecf4335d15eb4cb..c1b383537fec2cbb3c0f4431c6a7faa80b83a73f 100644 (file)
@@ -24,7 +24,7 @@
  * (0x1202 external call, 0x1004 cpu timer, 0x2401 hwc console, 0x4000
  * iucv and 0x2603 pfault) this is always the first element. 
  */
-ext_int_info_t *ext_int_hash[256] = { 0, };
+ext_int_info_t *ext_int_hash[256] = { NULL, };
 
 static inline int ext_hash(__u16 code)
 {
index 1ca34f54ea8a2419e278825072ba66596efc1618..c902f059c7aab7d7e0e33d442b192f9a2650d036 100644 (file)
@@ -877,31 +877,57 @@ static struct bin_attribute ipl_scp_data_attr = {
 
 static decl_subsys(ipl, NULL, NULL);
 
+static int ipl_register_fcp_files(void)
+{
+       int rc;
+
+       rc = sysfs_create_group(&ipl_subsys.kset.kobj,
+                               &ipl_fcp_attr_group);
+       if (rc)
+               goto out;
+       rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj,
+                                  &ipl_parameter_attr);
+       if (rc)
+               goto out_ipl_parm;
+       rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj,
+                                  &ipl_scp_data_attr);
+       if (!rc)
+               goto out;
+
+       sysfs_remove_bin_file(&ipl_subsys.kset.kobj, &ipl_parameter_attr);
+
+out_ipl_parm:
+       sysfs_remove_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group);
+out:
+       return rc;
+}
+
 static int __init
 ipl_device_sysfs_register(void) {
        int rc;
 
        rc = firmware_register(&ipl_subsys);
        if (rc)
-               return rc;
+               goto out;
 
        switch (get_ipl_type()) {
        case ipl_type_ccw:
-               sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_ccw_attr_group);
+               rc = sysfs_create_group(&ipl_subsys.kset.kobj,
+                                       &ipl_ccw_attr_group);
                break;
        case ipl_type_fcp:
-               sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group);
-               sysfs_create_bin_file(&ipl_subsys.kset.kobj,
-                                     &ipl_parameter_attr);
-               sysfs_create_bin_file(&ipl_subsys.kset.kobj,
-                                     &ipl_scp_data_attr);
+               rc = ipl_register_fcp_files();
                break;
        default:
-               sysfs_create_group(&ipl_subsys.kset.kobj,
-                                  &ipl_unknown_attr_group);
+               rc = sysfs_create_group(&ipl_subsys.kset.kobj,
+                                       &ipl_unknown_attr_group);
                break;
        }
-       return 0;
+
+       if (rc)
+               firmware_unregister(&ipl_subsys);
+out:
+       return rc;
 }
 
 __initcall(ipl_device_sysfs_register);
index f7fe9bc43397414f58767132a96c261405f92b16..74e6178fbaf25c11ee55e9b320c38a5437cd571a 100644 (file)
@@ -379,7 +379,7 @@ void __init time_init(void)
                                 -xtime.tv_sec, -xtime.tv_nsec);
 
        /* request the clock comparator external interrupt */
-        if (register_early_external_interrupt(0x1004, 0,
+       if (register_early_external_interrupt(0x1004, NULL,
                                              &ext_int_info_cc) != 0)
                 panic("Couldn't request external interrupt 0x1004");
 
index 12240c03a6dd5122583ae1ff8d2acfcb176e15ab..bde1d1d598586cc483bcb84ca0211008d3a70711 100644 (file)
@@ -170,7 +170,7 @@ void show_stack(struct task_struct *task, unsigned long *sp)
  */
 void dump_stack(void)
 {
-       show_stack(0, 0);
+       show_stack(NULL, NULL);
 }
 
 EXPORT_SYMBOL(dump_stack);
@@ -331,9 +331,9 @@ static void inline do_trap(long interruption_code, int signr, char *str,
         }
 }
 
-static inline void *get_check_address(struct pt_regs *regs)
+static inline void __user *get_check_address(struct pt_regs *regs)
 {
-       return (void *)((regs->psw.addr-S390_lowcore.pgm_ilc) & PSW_ADDR_INSN);
+       return (void __user *)((regs->psw.addr-S390_lowcore.pgm_ilc) & PSW_ADDR_INSN);
 }
 
 void do_single_step(struct pt_regs *regs)
@@ -360,7 +360,7 @@ asmlinkage void name(struct pt_regs * regs, long interruption_code) \
         info.si_signo = signr; \
         info.si_errno = 0; \
         info.si_code = sicode; \
-        info.si_addr = (void *)siaddr; \
+       info.si_addr = siaddr; \
         do_trap(interruption_code, signr, str, regs, &info); \
 }
 
@@ -392,7 +392,7 @@ DO_ERROR_INFO(SIGILL,  "translation exception", translation_exception,
              ILL_ILLOPN, get_check_address(regs))
 
 static inline void
-do_fp_trap(struct pt_regs *regs, void *location,
+do_fp_trap(struct pt_regs *regs, void __user *location,
            int fpc, long interruption_code)
 {
        siginfo_t si;
@@ -424,10 +424,10 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code)
 {
        siginfo_t info;
         __u8 opcode[6];
-       __u16 *location;
+       __u16 __user *location;
        int signal = 0;
 
-       location = (__u16 *) get_check_address(regs);
+       location = get_check_address(regs);
 
        /*
         * We got all needed information from the lowcore and can
@@ -559,10 +559,10 @@ DO_ERROR_INFO(SIGILL, "specification exception", specification_exception,
 
 asmlinkage void data_exception(struct pt_regs * regs, long interruption_code)
 {
-       __u16 *location;
+       __u16 __user *location;
        int signal = 0;
 
-       location = (__u16 *) get_check_address(regs);
+       location = get_check_address(regs);
 
        /*
         * We got all needed information from the lowcore and can
index 8240cc77e06e2339694bebf40ed598026774fb18..ae5cf5d03d4165b7c98134830a8138b1b1ffe61b 100644 (file)
@@ -233,7 +233,7 @@ char * strrchr(const char * s, int c)
                       if (s[len] == (char) c)
                               return (char *) s + len;
               } while (--len > 0);
-       return 0;
+       return NULL;
 }
 EXPORT_SYMBOL(strrchr);
 
@@ -267,7 +267,7 @@ char * strstr(const char * s1,const char * s2)
                        return (char *) s1;
                s1++;
        }
-       return 0;
+       return NULL;
 }
 EXPORT_SYMBOL(strstr);
 
index 81be2fec7dc565b8f3e87518a73fa3e9eddda807..ceea51cff03befcbe4f0f537de7dee7cf83d9cdf 100644 (file)
@@ -161,7 +161,7 @@ cmm_thread(void *dummy)
 static void
 cmm_start_thread(void)
 {
-       kernel_thread(cmm_thread, 0, 0);
+       kernel_thread(cmm_thread, NULL, 0);
 }
 
 static void
index 833d5941746a12fa78f1a83357b1c21c4ff6f24c..7cd82575813d1c7be34a85b109f75e1ff787b482 100644 (file)
@@ -144,7 +144,7 @@ static void do_sigsegv(struct pt_regs *regs, unsigned long error_code,
 #endif
        si.si_signo = SIGSEGV;
        si.si_code = si_code;
-       si.si_addr = (void *) address;
+       si.si_addr = (void __user *) address;
        force_sig_info(SIGSEGV, &si, current);
 }
 
index 9af22116c9a2b3a78e02c8533e59660769d95723..e75189cb1db7ab29424da9cd40a27e462ddc6faf 100644 (file)
@@ -10,7 +10,7 @@
  * This file handles the architecture-dependent parts of initialization
  */
 
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/initrd.h>
index 0359fa647bbcdc988fb793e0638108a4e7f2b00e..ffb310e33cefbe505ba25521e7b50a2e5bb5d2d4 100644 (file)
@@ -36,7 +36,7 @@
 #include <linux/slab.h>
 #include <linux/user.h>
 #include <linux/a.out.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
 #include <linux/init.h>
index 6efdfa2c3994b5f8d7228eb9c4298b7f2a145eab..4b2df7247b59397d03628e2c3de79391dae53af7 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/in6.h>
 #include <linux/interrupt.h>
 #include <linux/smp_lock.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 
 #include <asm/semaphore.h>
 #include <asm/processor.h>
index bc956c5303764ccc1d4bdd87d271d4044aedff77..5a2faad5d043eb2f4f2fcdb3a8ebf80f484a96fc 100644 (file)
@@ -183,7 +183,7 @@ struct bus_type of_bus_type = {
 };
 EXPORT_SYMBOL(of_bus_type);
 
-static inline u64 of_read_addr(u32 *cell, int size)
+static inline u64 of_read_addr(const u32 *cell, int size)
 {
        u64 r = 0;
        while (size--)
@@ -209,8 +209,8 @@ struct of_bus {
        int             (*match)(struct device_node *parent);
        void            (*count_cells)(struct device_node *child,
                                       int *addrc, int *sizec);
-       u64             (*map)(u32 *addr, u32 *range, int na, int ns, int pna);
-       int             (*translate)(u32 *addr, u64 offset, int na);
+       int             (*map)(u32 *addr, const u32 *range,
+                              int na, int ns, int pna);
        unsigned int    (*get_flags)(u32 *addr);
 };
 
@@ -224,27 +224,49 @@ static void of_bus_default_count_cells(struct device_node *dev,
        get_cells(dev, addrc, sizec);
 }
 
-static u64 of_bus_default_map(u32 *addr, u32 *range, int na, int ns, int pna)
+/* Make sure the least significant 64-bits are in-range.  Even
+ * for 3 or 4 cell values it is a good enough approximation.
+ */
+static int of_out_of_range(const u32 *addr, const u32 *base,
+                          const u32 *size, int na, int ns)
 {
-       u64 cp, s, da;
+       u64 a = of_read_addr(addr, na);
+       u64 b = of_read_addr(base, na);
+
+       if (a < b)
+               return 1;
 
-       cp = of_read_addr(range, na);
-       s  = of_read_addr(range + na + pna, ns);
-       da = of_read_addr(addr, na);
+       b += of_read_addr(size, ns);
+       if (a >= b)
+               return 1;
 
-       if (da < cp || da >= (cp + s))
-               return OF_BAD_ADDR;
-       return da - cp;
+       return 0;
 }
 
-static int of_bus_default_translate(u32 *addr, u64 offset, int na)
+static int of_bus_default_map(u32 *addr, const u32 *range,
+                             int na, int ns, int pna)
 {
-       u64 a = of_read_addr(addr, na);
-       memset(addr, 0, na * 4);
-       a += offset;
-       if (na > 1)
-               addr[na - 2] = a >> 32;
-       addr[na - 1] = a & 0xffffffffu;
+       u32 result[OF_MAX_ADDR_CELLS];
+       int i;
+
+       if (ns > 2) {
+               printk("of_device: Cannot handle size cells (%d) > 2.", ns);
+               return -EINVAL;
+       }
+
+       if (of_out_of_range(addr, range, range + na + pna, na, ns))
+               return -EINVAL;
+
+       /* Start with the parent range base.  */
+       memcpy(result, range + na, pna * 4);
+
+       /* Add in the child address offset.  */
+       for (i = 0; i < na; i++)
+               result[pna - 1 - i] +=
+                       (addr[na - 1 - i] -
+                        range[na - 1 - i]);
+
+       memcpy(addr, result, pna * 4);
 
        return 0;
 }
@@ -254,14 +276,26 @@ static unsigned int of_bus_default_get_flags(u32 *addr)
        return IORESOURCE_MEM;
 }
 
-
 /*
  * PCI bus specific translator
  */
 
 static int of_bus_pci_match(struct device_node *np)
 {
-       return !strcmp(np->type, "pci") || !strcmp(np->type, "pciex");
+       if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) {
+               /* Do not do PCI specific frobbing if the
+                * PCI bridge lacks a ranges property.  We
+                * want to pass it through up to the next
+                * parent as-is, not with the PCI translate
+                * method which chops off the top address cell.
+                */
+               if (!of_find_property(np, "ranges", NULL))
+                       return 0;
+
+               return 1;
+       }
+
+       return 0;
 }
 
 static void of_bus_pci_count_cells(struct device_node *np,
@@ -273,27 +307,32 @@ static void of_bus_pci_count_cells(struct device_node *np,
                *sizec = 2;
 }
 
-static u64 of_bus_pci_map(u32 *addr, u32 *range, int na, int ns, int pna)
+static int of_bus_pci_map(u32 *addr, const u32 *range,
+                         int na, int ns, int pna)
 {
-       u64 cp, s, da;
+       u32 result[OF_MAX_ADDR_CELLS];
+       int i;
 
        /* Check address type match */
        if ((addr[0] ^ range[0]) & 0x03000000)
-               return OF_BAD_ADDR;
+               return -EINVAL;
 
-       /* Read address values, skipping high cell */
-       cp = of_read_addr(range + 1, na - 1);
-       s  = of_read_addr(range + na + pna, ns);
-       da = of_read_addr(addr + 1, na - 1);
+       if (of_out_of_range(addr + 1, range + 1, range + na + pna,
+                           na - 1, ns))
+               return -EINVAL;
 
-       if (da < cp || da >= (cp + s))
-               return OF_BAD_ADDR;
-       return da - cp;
-}
+       /* Start with the parent range base.  */
+       memcpy(result, range + na, pna * 4);
 
-static int of_bus_pci_translate(u32 *addr, u64 offset, int na)
-{
-       return of_bus_default_translate(addr + 1, offset, na - 1);
+       /* Add in the child address offset, skipping high cell.  */
+       for (i = 0; i < na - 1; i++)
+               result[pna - 1 - i] +=
+                       (addr[na - 1 - i] -
+                        range[na - 1 - i]);
+
+       memcpy(addr, result, pna * 4);
+
+       return 0;
 }
 
 static unsigned int of_bus_pci_get_flags(u32 *addr)
@@ -332,16 +371,11 @@ static void of_bus_sbus_count_cells(struct device_node *child,
                *sizec = 1;
 }
 
-static u64 of_bus_sbus_map(u32 *addr, u32 *range, int na, int ns, int pna)
+static int of_bus_sbus_map(u32 *addr, const u32 *range, int na, int ns, int pna)
 {
        return of_bus_default_map(addr, range, na, ns, pna);
 }
 
-static int of_bus_sbus_translate(u32 *addr, u64 offset, int na)
-{
-       return of_bus_default_translate(addr, offset, na);
-}
-
 static unsigned int of_bus_sbus_get_flags(u32 *addr)
 {
        return IORESOURCE_MEM;
@@ -360,7 +394,6 @@ static struct of_bus of_busses[] = {
                .match = of_bus_pci_match,
                .count_cells = of_bus_pci_count_cells,
                .map = of_bus_pci_map,
-               .translate = of_bus_pci_translate,
                .get_flags = of_bus_pci_get_flags,
        },
        /* SBUS */
@@ -370,7 +403,6 @@ static struct of_bus of_busses[] = {
                .match = of_bus_sbus_match,
                .count_cells = of_bus_sbus_count_cells,
                .map = of_bus_sbus_map,
-               .translate = of_bus_sbus_translate,
                .get_flags = of_bus_sbus_get_flags,
        },
        /* Default */
@@ -380,7 +412,6 @@ static struct of_bus of_busses[] = {
                .match = NULL,
                .count_cells = of_bus_default_count_cells,
                .map = of_bus_default_map,
-               .translate = of_bus_default_translate,
                .get_flags = of_bus_default_get_flags,
        },
 };
@@ -405,33 +436,34 @@ static int __init build_one_resource(struct device_node *parent,
        u32 *ranges;
        unsigned int rlen;
        int rone;
-       u64 offset = OF_BAD_ADDR;
 
        ranges = of_get_property(parent, "ranges", &rlen);
        if (ranges == NULL || rlen == 0) {
-               offset = of_read_addr(addr, na);
-               memset(addr, 0, pna * 4);
-               goto finish;
+               u32 result[OF_MAX_ADDR_CELLS];
+               int i;
+
+               memset(result, 0, pna * 4);
+               for (i = 0; i < na; i++)
+                       result[pna - 1 - i] =
+                               addr[na - 1 - i];
+
+               memcpy(addr, result, pna * 4);
+               return 0;
        }
 
        /* Now walk through the ranges */
        rlen /= 4;
        rone = na + pna + ns;
        for (; rlen >= rone; rlen -= rone, ranges += rone) {
-               offset = bus->map(addr, ranges, na, ns, pna);
-               if (offset != OF_BAD_ADDR)
-                       break;
+               if (!bus->map(addr, ranges, na, ns, pna))
+                       return 0;
        }
-       if (offset == OF_BAD_ADDR)
-               return 1;
 
-       memcpy(addr, ranges + na, 4 * pna);
-
-finish:
-       /* Translate it into parent bus space */
-       return pbus->translate(addr, offset, pna);
+       return 1;
 }
 
+static int of_resource_verbose;
+
 static void __init build_device_resources(struct of_device *op,
                                          struct device *parent)
 {
@@ -497,7 +529,8 @@ static void __init build_device_resources(struct of_device *op,
                        pbus = of_match_bus(pp);
                        pbus->count_cells(dp, &pna, &pns);
 
-                       if (build_one_resource(dp, bus, pbus, addr, dna, dns, pna))
+                       if (build_one_resource(dp, bus, pbus, addr,
+                                              dna, dns, pna))
                                break;
 
                        dna = pna;
@@ -507,6 +540,12 @@ static void __init build_device_resources(struct of_device *op,
 
        build_res:
                memset(r, 0, sizeof(*r));
+
+               if (of_resource_verbose)
+                       printk("%s reg[%d] -> %llx\n",
+                              op->node->full_name, index,
+                              result);
+
                if (result != OF_BAD_ADDR) {
                        r->start = result & 0xffffffff;
                        r->end = result + size - 1;
@@ -643,6 +682,18 @@ static int __init of_bus_driver_init(void)
 
 postcore_initcall(of_bus_driver_init);
 
+static int __init of_debug(char *str)
+{
+       int val = 0;
+
+       get_option(&str, &val);
+       if (val & 1)
+               of_resource_verbose = 1;
+       return 1;
+}
+
+__setup("of_debug=", of_debug);
+
 int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus)
 {
        /* initialize common driver fields */
@@ -695,9 +746,11 @@ int of_device_register(struct of_device *ofdev)
        if (rc)
                return rc;
 
-       device_create_file(&ofdev->dev, &dev_attr_devspec);
+       rc = device_create_file(&ofdev->dev, &dev_attr_devspec);
+       if (rc)
+               device_unregister(&ofdev->dev);
 
-       return 0;
+       return rc;
 }
 
 void of_device_unregister(struct of_device *ofdev)
index 8606ef4e52e9185d8e943cfb3fd6975011e0fa6b..35488d6c74574ff4e8a38d63480010780a9e49c7 100644 (file)
@@ -17,7 +17,7 @@
 #include <asm/smp.h>
 #include <linux/user.h>
 #include <linux/a.out.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/delay.h>
 #include <linux/fs.h>
 #include <linux/seq_file.h>
index a7a111db25b2c43daeb8b7847f92858b9e2e92fd..8a36ba8868dba1cd8dd4019c83d827865327786f 100644 (file)
@@ -334,7 +334,7 @@ config COMPAT
        default y
 
 config BINFMT_ELF32
-       tristate "Kernel support for 32-bit ELF binaries"
+       bool "Kernel support for 32-bit ELF binaries"
        depends on SPARC32_COMPAT
        help
          This allows you to run 32-bit Linux/ELF binaries on your Ultra.
index b2f41147d0e49c3a361e4ec833898031274cdf73..38353621069e03ee9f3dfe02ad7ee8a675d637dd 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17
-# Fri Jun 23 23:17:09 2006
+# Linux kernel version: 2.6.18-rc1
+# Wed Jul 12 14:00:58 2006
 #
 CONFIG_SPARC=y
 CONFIG_SPARC64=y
@@ -18,6 +18,7 @@ CONFIG_SECCOMP=y
 CONFIG_HZ_250=y
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -51,10 +52,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -127,8 +130,8 @@ CONFIG_SPARSEMEM=y
 CONFIG_HAVE_MEMORY_PRESENT=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_MEMORY_HOTPLUG=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_SBUS=y
 CONFIG_SBUSCHAR=y
@@ -203,7 +206,6 @@ CONFIG_TCP_CONG_VEGAS=m
 CONFIG_TCP_CONG_SCALABLE=m
 CONFIG_TCP_CONG_LP=m
 CONFIG_TCP_CONG_VENO=m
-CONFIG_TCP_CONG_COMPOUND=m
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -461,9 +463,8 @@ CONFIG_MD_LINEAR=m
 CONFIG_MD_RAID0=m
 CONFIG_MD_RAID1=m
 CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
+CONFIG_MD_RAID456=m
 # CONFIG_MD_RAID5_RESHAPE is not set
-CONFIG_MD_RAID6=m
 CONFIG_MD_MULTIPATH=m
 # CONFIG_MD_FAULTY is not set
 CONFIG_BLK_DEV_DM=m
@@ -663,6 +664,7 @@ CONFIG_SERIO_RAW=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -693,6 +695,7 @@ CONFIG_UNIX98_PTYS=y
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 CONFIG_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -839,12 +842,13 @@ CONFIG_VIDEO_V4L2=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_MACMODES is not set
-# CONFIG_FB_FIRMWARE_EDID is not set
+# CONFIG_FB_BACKLIGHT is not set
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_FB_TILEBLITTING=y
 # CONFIG_FB_CIRRUS is not set
@@ -954,6 +958,18 @@ CONFIG_SND_ALI5451=m
 # CONFIG_SND_CMIPCI is not set
 # CONFIG_SND_CS4281 is not set
 # CONFIG_SND_CS46XX is not set
+# CONFIG_SND_DARLA20 is not set
+# CONFIG_SND_GINA20 is not set
+# CONFIG_SND_LAYLA20 is not set
+# CONFIG_SND_DARLA24 is not set
+# CONFIG_SND_GINA24 is not set
+# CONFIG_SND_LAYLA24 is not set
+# CONFIG_SND_MONA is not set
+# CONFIG_SND_MIA is not set
+# CONFIG_SND_ECHO3G is not set
+# CONFIG_SND_INDIGO is not set
+# CONFIG_SND_INDIGOIO is not set
+# CONFIG_SND_INDIGODJ is not set
 # CONFIG_SND_EMU10K1 is not set
 # CONFIG_SND_EMU10K1X is not set
 # CONFIG_SND_ENS1370 is not set
@@ -1263,6 +1279,7 @@ CONFIG_RAMFS=y
 # CONFIG_NFSD is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1331,14 +1348,19 @@ CONFIG_KPROBES=y
 #
 CONFIG_PRINTK_TIME=y
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=18
 CONFIG_DETECT_SOFTLOCKUP=y
 CONFIG_SCHEDSTATS=y
 # CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
@@ -1402,3 +1424,4 @@ CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
index 75684b56767e099a48556ed95645a1cf35df7942..c8e9dc9d68a9758c62d8e6efc7b5e0a02d88a8e4 100644 (file)
@@ -551,9 +551,10 @@ setup_trap_table:
        save    %sp, -192, %sp
 
        /* Force interrupts to be disabled. */
-       rdpr    %pstate, %o1
-       andn    %o1, PSTATE_IE, %o1
+       rdpr    %pstate, %l0
+       andn    %l0, PSTATE_IE, %o1
        wrpr    %o1, 0x0, %pstate
+       rdpr    %pil, %l1
        wrpr    %g0, 15, %pil
 
        /* Make the firmware call to jump over to the Linux trap table.  */
@@ -622,11 +623,9 @@ setup_trap_table:
        call    init_irqwork_curcpu
         nop
 
-       /* Now we can turn interrupts back on. */
-       rdpr    %pstate, %o1
-       or      %o1, PSTATE_IE, %o1
-       wrpr    %o1, 0, %pstate
-       wrpr    %g0, 0x0, %pil
+       /* Now we can restore interrupt state. */
+       wrpr    %l0, 0, %pstate
+       wrpr    %l1, 0x0, %pil
 
        ret
         restore
index 169b017eec0b6c393f17096206db914dbff21ac2..7064cee290ae15d78b8888429660fc9caba9d399 100644 (file)
@@ -210,7 +210,7 @@ struct bus_type of_bus_type = {
 };
 EXPORT_SYMBOL(of_bus_type);
 
-static inline u64 of_read_addr(u32 *cell, int size)
+static inline u64 of_read_addr(const u32 *cell, int size)
 {
        u64 r = 0;
        while (size--)
@@ -236,8 +236,8 @@ struct of_bus {
        int             (*match)(struct device_node *parent);
        void            (*count_cells)(struct device_node *child,
                                       int *addrc, int *sizec);
-       u64             (*map)(u32 *addr, u32 *range, int na, int ns, int pna);
-       int             (*translate)(u32 *addr, u64 offset, int na);
+       int             (*map)(u32 *addr, const u32 *range,
+                              int na, int ns, int pna);
        unsigned int    (*get_flags)(u32 *addr);
 };
 
@@ -251,27 +251,49 @@ static void of_bus_default_count_cells(struct device_node *dev,
        get_cells(dev, addrc, sizec);
 }
 
-static u64 of_bus_default_map(u32 *addr, u32 *range, int na, int ns, int pna)
+/* Make sure the least significant 64-bits are in-range.  Even
+ * for 3 or 4 cell values it is a good enough approximation.
+ */
+static int of_out_of_range(const u32 *addr, const u32 *base,
+                          const u32 *size, int na, int ns)
 {
-       u64 cp, s, da;
+       u64 a = of_read_addr(addr, na);
+       u64 b = of_read_addr(base, na);
 
-       cp = of_read_addr(range, na);
-       s  = of_read_addr(range + na + pna, ns);
-       da = of_read_addr(addr, na);
+       if (a < b)
+               return 1;
 
-       if (da < cp || da >= (cp + s))
-               return OF_BAD_ADDR;
-       return da - cp;
+       b += of_read_addr(size, ns);
+       if (a >= b)
+               return 1;
+
+       return 0;
 }
 
-static int of_bus_default_translate(u32 *addr, u64 offset, int na)
+static int of_bus_default_map(u32 *addr, const u32 *range,
+                             int na, int ns, int pna)
 {
-       u64 a = of_read_addr(addr, na);
-       memset(addr, 0, na * 4);
-       a += offset;
-       if (na > 1)
-               addr[na - 2] = a >> 32;
-       addr[na - 1] = a & 0xffffffffu;
+       u32 result[OF_MAX_ADDR_CELLS];
+       int i;
+
+       if (ns > 2) {
+               printk("of_device: Cannot handle size cells (%d) > 2.", ns);
+               return -EINVAL;
+       }
+
+       if (of_out_of_range(addr, range, range + na + pna, na, ns))
+               return -EINVAL;
+
+       /* Start with the parent range base.  */
+       memcpy(result, range + na, pna * 4);
+
+       /* Add in the child address offset.  */
+       for (i = 0; i < na; i++)
+               result[pna - 1 - i] +=
+                       (addr[na - 1 - i] -
+                        range[na - 1 - i]);
+
+       memcpy(addr, result, pna * 4);
 
        return 0;
 }
@@ -287,7 +309,20 @@ static unsigned int of_bus_default_get_flags(u32 *addr)
 
 static int of_bus_pci_match(struct device_node *np)
 {
-       return !strcmp(np->type, "pci") || !strcmp(np->type, "pciex");
+       if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) {
+               /* Do not do PCI specific frobbing if the
+                * PCI bridge lacks a ranges property.  We
+                * want to pass it through up to the next
+                * parent as-is, not with the PCI translate
+                * method which chops off the top address cell.
+                */
+               if (!of_find_property(np, "ranges", NULL))
+                       return 0;
+
+               return 1;
+       }
+
+       return 0;
 }
 
 static void of_bus_pci_count_cells(struct device_node *np,
@@ -299,27 +334,32 @@ static void of_bus_pci_count_cells(struct device_node *np,
                *sizec = 2;
 }
 
-static u64 of_bus_pci_map(u32 *addr, u32 *range, int na, int ns, int pna)
+static int of_bus_pci_map(u32 *addr, const u32 *range,
+                         int na, int ns, int pna)
 {
-       u64 cp, s, da;
+       u32 result[OF_MAX_ADDR_CELLS];
+       int i;
 
        /* Check address type match */
        if ((addr[0] ^ range[0]) & 0x03000000)
-               return OF_BAD_ADDR;
+               return -EINVAL;
 
-       /* Read address values, skipping high cell */
-       cp = of_read_addr(range + 1, na - 1);
-       s  = of_read_addr(range + na + pna, ns);
-       da = of_read_addr(addr + 1, na - 1);
+       if (of_out_of_range(addr + 1, range + 1, range + na + pna,
+                           na - 1, ns))
+               return -EINVAL;
 
-       if (da < cp || da >= (cp + s))
-               return OF_BAD_ADDR;
-       return da - cp;
-}
+       /* Start with the parent range base.  */
+       memcpy(result, range + na, pna * 4);
 
-static int of_bus_pci_translate(u32 *addr, u64 offset, int na)
-{
-       return of_bus_default_translate(addr + 1, offset, na - 1);
+       /* Add in the child address offset, skipping high cell.  */
+       for (i = 0; i < na - 1; i++)
+               result[pna - 1 - i] +=
+                       (addr[na - 1 - i] -
+                        range[na - 1 - i]);
+
+       memcpy(addr, result, pna * 4);
+
+       return 0;
 }
 
 static unsigned int of_bus_pci_get_flags(u32 *addr)
@@ -339,59 +379,6 @@ static unsigned int of_bus_pci_get_flags(u32 *addr)
        return flags;
 }
 
-/*
- * ISA bus specific translator
- */
-
-static int of_bus_isa_match(struct device_node *np)
-{
-       return !strcmp(np->name, "isa");
-}
-
-static void of_bus_isa_count_cells(struct device_node *child,
-                                  int *addrc, int *sizec)
-{
-       if (addrc)
-               *addrc = 2;
-       if (sizec)
-               *sizec = 1;
-}
-
-static u64 of_bus_isa_map(u32 *addr, u32 *range, int na, int ns, int pna)
-{
-       u64 cp, s, da;
-
-       /* Check address type match */
-       if ((addr[0] ^ range[0]) & 0x00000001)
-               return OF_BAD_ADDR;
-
-       /* Read address values, skipping high cell */
-       cp = of_read_addr(range + 1, na - 1);
-       s  = of_read_addr(range + na + pna, ns);
-       da = of_read_addr(addr + 1, na - 1);
-
-       if (da < cp || da >= (cp + s))
-               return OF_BAD_ADDR;
-       return da - cp;
-}
-
-static int of_bus_isa_translate(u32 *addr, u64 offset, int na)
-{
-       return of_bus_default_translate(addr + 1, offset, na - 1);
-}
-
-static unsigned int of_bus_isa_get_flags(u32 *addr)
-{
-       unsigned int flags = 0;
-       u32 w = addr[0];
-
-       if (w & 1)
-               flags |= IORESOURCE_IO;
-       else
-               flags |= IORESOURCE_MEM;
-       return flags;
-}
-
 /*
  * SBUS bus specific translator
  */
@@ -411,16 +398,11 @@ static void of_bus_sbus_count_cells(struct device_node *child,
                *sizec = 1;
 }
 
-static u64 of_bus_sbus_map(u32 *addr, u32 *range, int na, int ns, int pna)
+static int of_bus_sbus_map(u32 *addr, const u32 *range, int na, int ns, int pna)
 {
        return of_bus_default_map(addr, range, na, ns, pna);
 }
 
-static int of_bus_sbus_translate(u32 *addr, u64 offset, int na)
-{
-       return of_bus_default_translate(addr, offset, na);
-}
-
 static unsigned int of_bus_sbus_get_flags(u32 *addr)
 {
        return IORESOURCE_MEM;
@@ -439,19 +421,8 @@ static struct of_bus of_busses[] = {
                .match = of_bus_pci_match,
                .count_cells = of_bus_pci_count_cells,
                .map = of_bus_pci_map,
-               .translate = of_bus_pci_translate,
                .get_flags = of_bus_pci_get_flags,
        },
-       /* ISA */
-       {
-               .name = "isa",
-               .addr_prop_name = "reg",
-               .match = of_bus_isa_match,
-               .count_cells = of_bus_isa_count_cells,
-               .map = of_bus_isa_map,
-               .translate = of_bus_isa_translate,
-               .get_flags = of_bus_isa_get_flags,
-       },
        /* SBUS */
        {
                .name = "sbus",
@@ -459,7 +430,6 @@ static struct of_bus of_busses[] = {
                .match = of_bus_sbus_match,
                .count_cells = of_bus_sbus_count_cells,
                .map = of_bus_sbus_map,
-               .translate = of_bus_sbus_translate,
                .get_flags = of_bus_sbus_get_flags,
        },
        /* Default */
@@ -469,7 +439,6 @@ static struct of_bus of_busses[] = {
                .match = NULL,
                .count_cells = of_bus_default_count_cells,
                .map = of_bus_default_map,
-               .translate = of_bus_default_translate,
                .get_flags = of_bus_default_get_flags,
        },
 };
@@ -494,33 +463,62 @@ static int __init build_one_resource(struct device_node *parent,
        u32 *ranges;
        unsigned int rlen;
        int rone;
-       u64 offset = OF_BAD_ADDR;
 
        ranges = of_get_property(parent, "ranges", &rlen);
        if (ranges == NULL || rlen == 0) {
-               offset = of_read_addr(addr, na);
-               memset(addr, 0, pna * 4);
-               goto finish;
+               u32 result[OF_MAX_ADDR_CELLS];
+               int i;
+
+               memset(result, 0, pna * 4);
+               for (i = 0; i < na; i++)
+                       result[pna - 1 - i] =
+                               addr[na - 1 - i];
+
+               memcpy(addr, result, pna * 4);
+               return 0;
        }
 
        /* Now walk through the ranges */
        rlen /= 4;
        rone = na + pna + ns;
        for (; rlen >= rone; rlen -= rone, ranges += rone) {
-               offset = bus->map(addr, ranges, na, ns, pna);
-               if (offset != OF_BAD_ADDR)
-                       break;
+               if (!bus->map(addr, ranges, na, ns, pna))
+                       return 0;
        }
-       if (offset == OF_BAD_ADDR)
+
+       return 1;
+}
+
+static int __init use_1to1_mapping(struct device_node *pp)
+{
+       char *model;
+
+       /* If this is on the PMU bus, don't try to translate it even
+        * if a ranges property exists.
+        */
+       if (!strcmp(pp->name, "pmu"))
                return 1;
 
-       memcpy(addr, ranges + na, 4 * pna);
+       /* If we have a ranges property in the parent, use it.  */
+       if (of_find_property(pp, "ranges", NULL) != NULL)
+               return 0;
+
+       /* If the parent is the dma node of an ISA bus, pass
+        * the translation up to the root.
+        */
+       if (!strcmp(pp->name, "dma"))
+               return 0;
+
+       /* Similarly for Simba PCI bridges.  */
+       model = of_get_property(pp, "model", NULL);
+       if (model && !strcmp(model, "SUNW,simba"))
+               return 0;
 
-finish:
-       /* Translate it into parent bus space */
-       return pbus->translate(addr, offset, pna);
+       return 1;
 }
 
+static int of_resource_verbose;
+
 static void __init build_device_resources(struct of_device *op,
                                          struct device *parent)
 {
@@ -564,15 +562,7 @@ static void __init build_device_resources(struct of_device *op,
 
                memcpy(addr, reg, na * 4);
 
-               /* If the immediate parent has no ranges property to apply,
-                * just use a 1<->1 mapping.  Unless it is the 'dma' child
-                * of an isa bus, which must be passed up towards the root.
-                *
-                * Also, don't try to translate PMU bus device registers.
-                */
-               if ((of_find_property(pp, "ranges", NULL) == NULL &&
-                    strcmp(pp->name, "dma") != 0) ||
-                   !strcmp(pp->name, "pmu")) {
+               if (use_1to1_mapping(pp)) {
                        result = of_read_addr(addr, na);
                        goto build_res;
                }
@@ -591,7 +581,8 @@ static void __init build_device_resources(struct of_device *op,
                        pbus = of_match_bus(pp);
                        pbus->count_cells(dp, &pna, &pns);
 
-                       if (build_one_resource(dp, bus, pbus, addr, dna, dns, pna))
+                       if (build_one_resource(dp, bus, pbus, addr,
+                                              dna, dns, pna))
                                break;
 
                        dna = pna;
@@ -601,6 +592,12 @@ static void __init build_device_resources(struct of_device *op,
 
        build_res:
                memset(r, 0, sizeof(*r));
+
+               if (of_resource_verbose)
+                       printk("%s reg[%d] -> %lx\n",
+                              op->node->full_name, index,
+                              result);
+
                if (result != OF_BAD_ADDR) {
                        if (tlb_type == hypervisor)
                                result &= 0x0fffffffffffffffUL;
@@ -684,6 +681,8 @@ static unsigned int __init pci_irq_swizzle(struct device_node *dp,
        return ret;
 }
 
+static int of_irq_verbose;
+
 static unsigned int __init build_one_device_irq(struct of_device *op,
                                                struct device *parent,
                                                unsigned int irq)
@@ -698,10 +697,11 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
        if (dp->irq_trans) {
                irq = dp->irq_trans->irq_build(dp, irq,
                                               dp->irq_trans->data);
-#if 1
-               printk("%s: direct translate %x --> %x\n",
-                      dp->full_name, orig_irq, irq);
-#endif
+
+               if (of_irq_verbose)
+                       printk("%s: direct translate %x --> %x\n",
+                              dp->full_name, orig_irq, irq);
+
                return irq;
        }
 
@@ -728,12 +728,13 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
                        iret = apply_interrupt_map(dp, pp,
                                                   imap, imlen, imsk,
                                                   &irq);
-#if 1
-                       printk("%s: Apply [%s:%x] imap --> [%s:%x]\n",
-                              op->node->full_name,
-                              pp->full_name, this_orig_irq,
-                              (iret ? iret->full_name : "NULL"), irq);
-#endif
+
+                       if (of_irq_verbose)
+                               printk("%s: Apply [%s:%x] imap --> [%s:%x]\n",
+                                      op->node->full_name,
+                                      pp->full_name, this_orig_irq,
+                                      (iret ? iret->full_name : "NULL"), irq);
+
                        if (!iret)
                                break;
 
@@ -747,11 +748,13 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
                                unsigned int this_orig_irq = irq;
 
                                irq = pci_irq_swizzle(dp, pp, irq);
-#if 1
-                               printk("%s: PCI swizzle [%s] %x --> %x\n",
-                                      op->node->full_name,
-                                      pp->full_name, this_orig_irq, irq);
-#endif
+                               if (of_irq_verbose)
+                                       printk("%s: PCI swizzle [%s] "
+                                              "%x --> %x\n",
+                                              op->node->full_name,
+                                              pp->full_name, this_orig_irq,
+                                              irq);
+
                        }
 
                        if (pp->irq_trans) {
@@ -767,10 +770,9 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
 
        irq = ip->irq_trans->irq_build(op->node, irq,
                                       ip->irq_trans->data);
-#if 1
-       printk("%s: Apply IRQ trans [%s] %x --> %x\n",
-              op->node->full_name, ip->full_name, orig_irq, irq);
-#endif
+       if (of_irq_verbose)
+               printk("%s: Apply IRQ trans [%s] %x --> %x\n",
+                      op->node->full_name, ip->full_name, orig_irq, irq);
 
        return irq;
 }
@@ -870,6 +872,20 @@ static int __init of_bus_driver_init(void)
 
 postcore_initcall(of_bus_driver_init);
 
+static int __init of_debug(char *str)
+{
+       int val = 0;
+
+       get_option(&str, &val);
+       if (val & 1)
+               of_resource_verbose = 1;
+       if (val & 2)
+               of_irq_verbose = 1;
+       return 1;
+}
+
+__setup("of_debug=", of_debug);
+
 int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus)
 {
        /* initialize common driver fields */
@@ -922,9 +938,11 @@ int of_device_register(struct of_device *ofdev)
        if (rc)
                return rc;
 
-       device_create_file(&ofdev->dev, &dev_attr_devspec);
+       rc = device_create_file(&ofdev->dev, &dev_attr_devspec);
+       if (rc)
+               device_unregister(&ofdev->dev);
 
-       return 0;
+       return rc;
 }
 
 void of_device_unregister(struct of_device *ofdev)
index 197a7ffd57ee32dc8635644be48e5c71fe02317b..1ec0aab68c08079d5d7204c770496c019086c416 100644 (file)
@@ -1099,9 +1099,6 @@ static void pbm_register_toplevel_resources(struct pci_controller_info *p,
 {
        char *name = pbm->name;
 
-       sprintf(name, "PSYCHO%d PBM%c",
-               p->index,
-               (pbm == &p->pbm_A ? 'A' : 'B'));
        pbm->io_space.name = pbm->mem_space.name = name;
 
        request_resource(&ioport_resource, &pbm->io_space);
@@ -1203,12 +1200,13 @@ static void psycho_pbm_init(struct pci_controller_info *p,
        pbm->io_space.flags = IORESOURCE_IO;
        pbm->mem_space.end = pbm->mem_space.start + PSYCHO_MEMSPACE_SIZE;
        pbm->mem_space.flags = IORESOURCE_MEM;
-       pbm_register_toplevel_resources(p, pbm);
 
        pbm->parent = p;
        pbm->prom_node = dp;
        pbm->name = dp->full_name;
 
+       pbm_register_toplevel_resources(p, pbm);
+
        printk("%s: PSYCHO PCI Bus Module ver[%x:%x]\n",
               pbm->name,
               pbm->chip_version, pbm->chip_revision);
index 99daeee4209d610891ad17c52bd182e431ad9955..c86007a2aa3f251493606edb38a37edea7298b0d 100644 (file)
@@ -539,6 +539,45 @@ static unsigned long __sabre_onboard_imap_off[] = {
        ((ino & 0x20) ? (SABRE_ICLR_SCSI + (((ino) & 0x1f) << 3)) :  \
                        (SABRE_ICLR_A_SLOT0 + (((ino) & 0x1f)<<3)))
 
+static int sabre_device_needs_wsync(struct device_node *dp)
+{
+       struct device_node *parent = dp->parent;
+       char *parent_model, *parent_compat;
+
+       /* This traversal up towards the root is meant to
+        * handle two cases:
+        *
+        * 1) non-PCI bus sitting under PCI, such as 'ebus'
+        * 2) the PCI controller interrupts themselves, which
+        *    will use the sabre_irq_build but do not need
+        *    the DMA synchronization handling
+        */
+       while (parent) {
+               if (!strcmp(parent->type, "pci"))
+                       break;
+               parent = parent->parent;
+       }
+
+       if (!parent)
+               return 0;
+
+       parent_model = of_get_property(parent,
+                                      "model", NULL);
+       if (parent_model &&
+           (!strcmp(parent_model, "SUNW,sabre") ||
+            !strcmp(parent_model, "SUNW,simba")))
+               return 0;
+
+       parent_compat = of_get_property(parent,
+                                       "compatible", NULL);
+       if (parent_compat &&
+           (!strcmp(parent_compat, "pci108e,a000") ||
+            !strcmp(parent_compat, "pci108e,a001")))
+               return 0;
+
+       return 1;
+}
+
 static unsigned int sabre_irq_build(struct device_node *dp,
                                    unsigned int ino,
                                    void *_data)
@@ -577,15 +616,17 @@ static unsigned int sabre_irq_build(struct device_node *dp,
 
        virt_irq = build_irq(inofixup, iclr, imap);
 
+       /* If the parent device is a PCI<->PCI bridge other than
+        * APB, we have to install a pre-handler to ensure that
+        * all pending DMA is drained before the interrupt handler
+        * is run.
+        */
        regs = of_get_property(dp, "reg", NULL);
-       if (regs &&
-           ((regs->phys_hi >> 16) & 0xff) != irq_data->pci_first_busno) {
+       if (regs && sabre_device_needs_wsync(dp)) {
                irq_install_pre_handler(virt_irq,
                                        sabre_wsync_handler,
                                        (void *) (long) regs->phys_hi,
-                                       (void *)
-                                       controller_regs +
-                                       SABRE_WRSYNC);
+                                       (void *) irq_data);
        }
 
        return virt_irq;
index a73140466e01347acd4cdd10c79a06f09840f284..958287448cfe89f1cec527fa93d15c4808bf5495 100644 (file)
@@ -16,7 +16,7 @@
 #include <asm/smp.h>
 #include <linux/user.h>
 #include <linux/a.out.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/delay.h>
 #include <linux/fs.h>
 #include <linux/seq_file.h>
index b43de647ba73187dee153f261f9cd7b136728c80..094d3e35be183ac8737ac5168a4202c563614370 100644 (file)
@@ -928,8 +928,6 @@ static void sparc64_start_timers(void)
        __asm__ __volatile__("wrpr      %0, 0x0, %%pstate"
                             : /* no outputs */
                             : "r" (pstate));
-
-       local_irq_enable();
 }
 
 struct freq_table {
index bab51d619173d8251a9529cd0c47d319e64e6cb6..09c1aca6339f94cf629a419387eff7f4f2517820 100644 (file)
@@ -47,13 +47,4 @@ config GCOV
         If you're involved in UML kernel development and want to use gcov,
         say Y.  If you're unsure, say N.
 
-config SYSCALL_DEBUG
-       bool "Enable system call debugging"
-       depends on DEBUG_INFO
-       help
-       This adds some system debugging to UML, including keeping a ring buffer
-       with recent system calls and some global and per-task statistics.
-
-       If unsure, say N
-
 endmenu
index dffd1184c956cca4314eb4c1127f30cbaf373185..9558a7cf34d599f8eda369838ffda69bba6ec646 100644 (file)
@@ -11,6 +11,7 @@ USER_CFLAGS += -fno-builtin -m64
 CHECKFLAGS  += -m64
 AFLAGS += -m64
 LDFLAGS += -m elf_x86_64
+CPPFLAGS += -m64
 
 ELF_ARCH := i386:x86-64
 ELF_FORMAT := elf64-x86-64
index 402a74dc50266e323944882cb542caa67703c77b..780cc0a4a128c2ddb3c834a1c6959a7c9b7705eb 100644 (file)
@@ -526,4 +526,3 @@ CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_GPROF is not set
 # CONFIG_GCOV is not set
-# CONFIG_SYSCALL_DEBUG is not set
index 4b109fe7fff8bac6eeee1b658c2e46cea830b42d..9bfd405c3bd82e5b891c9263d2fe339599ea0651 100644 (file)
 #include "umid.h"
 
 static struct mconsole_command commands[] = {
-       { "version", mconsole_version, MCONSOLE_INTR },
+       /* With uts namespaces, uts information becomes process-specific, so
+        * we need a process context.  If we try handling this in interrupt
+        * context, we may hit an exiting process without a valid uts
+        * namespace.
+        */
+       { "version", mconsole_version, MCONSOLE_PROC },
        { "halt", mconsole_halt, MCONSOLE_PROC },
        { "reboot", mconsole_reboot, MCONSOLE_PROC },
        { "config", mconsole_config, MCONSOLE_PROC },
index 0a7786e00cfb80da658f6474f562eca1b9d5c067..107c5e43fa00fec37d6fcf8c3b01851274a9b87e 100644 (file)
@@ -22,13 +22,14 @@ int tap_open_common(void *dev, char *gate_addr)
 {
        int tap_addr[4];
 
-       if(gate_addr == NULL) return(0);
+       if(gate_addr == NULL)
+               return 0;
        if(sscanf(gate_addr, "%d.%d.%d.%d", &tap_addr[0], 
                  &tap_addr[1], &tap_addr[2], &tap_addr[3]) != 4){
                printk("Invalid tap IP address - '%s'\n", gate_addr);
-               return(-EINVAL);
+               return -EINVAL;
        }
-       return(0);
+       return 0;
 }
 
 void tap_check_ips(char *gate_addr, unsigned char *eth_addr)
@@ -94,25 +95,25 @@ int net_read(int fd, void *buf, int len)
        n = os_read_file(fd,  buf,  len);
 
        if(n == -EAGAIN)
-               return(0);
+               return 0;
        else if(n == 0)
-               return(-ENOTCONN);
-       return(n);
+               return -ENOTCONN;
+       return n;
 }
 
 int net_recvfrom(int fd, void *buf, int len)
 {
        int n;
 
-       while(((n = recvfrom(fd,  buf,  len, 0, NULL, NULL)) < 0) && 
-             (errno == EINTR)) ;
-
+       CATCH_EINTR(n = recvfrom(fd,  buf,  len, 0, NULL, NULL));
        if(n < 0){
-               if(errno == EAGAIN) return(0);
-               return(-errno);
+               if(errno == EAGAIN)
+                       return 0;
+               return -errno;
        }
-       else if(n == 0) return(-ENOTCONN);
-       return(n);
+       else if(n == 0)
+               return -ENOTCONN;
+       return n;
 }
 
 int net_write(int fd, void *buf, int len)
@@ -122,37 +123,41 @@ int net_write(int fd, void *buf, int len)
        n = os_write_file(fd, buf, len);
 
        if(n == -EAGAIN)
-               return(0);
+               return 0;
        else if(n == 0)
-               return(-ENOTCONN);
-       return(n);
+               return -ENOTCONN;
+       return n;
 }
 
 int net_send(int fd, void *buf, int len)
 {
        int n;
 
-       while(((n = send(fd, buf, len, 0)) < 0) && (errno == EINTR)) ;
+       CATCH_EINTR(n = send(fd, buf, len, 0));
        if(n < 0){
-               if(errno == EAGAIN) return(0);
-               return(-errno);
+               if(errno == EAGAIN)
+                       return 0;
+               return -errno;
        }
-       else if(n == 0) return(-ENOTCONN);
-       return(n);      
+       else if(n == 0)
+               return -ENOTCONN;
+       return n;
 }
 
 int net_sendto(int fd, void *buf, int len, void *to, int sock_len)
 {
        int n;
 
-       while(((n = sendto(fd, buf, len, 0, (struct sockaddr *) to,
-                          sock_len)) < 0) && (errno == EINTR)) ;
+       CATCH_EINTR(n = sendto(fd, buf, len, 0, (struct sockaddr *) to,
+                              sock_len));
        if(n < 0){
-               if(errno == EAGAIN) return(0);
-               return(-errno);
+               if(errno == EAGAIN)
+                       return 0;
+               return -errno;
        }
-       else if(n == 0) return(-ENOTCONN);
-       return(n);      
+       else if(n == 0)
+               return -ENOTCONN;
+       return n;
 }
 
 struct change_pre_exec_data {
@@ -176,7 +181,7 @@ static int change_tramp(char **argv, char *output, int output_len)
        err = os_pipe(fds, 1, 0);
        if(err < 0){
                printk("change_tramp - pipe failed, err = %d\n", -err);
-               return(err);
+               return err;
        }
        pe_data.close_me = fds[0];
        pe_data.stdout = fds[1];
@@ -190,7 +195,7 @@ static int change_tramp(char **argv, char *output, int output_len)
 
        if (pid > 0)
                CATCH_EINTR(err = waitpid(pid, NULL, 0));
-       return(pid);
+       return pid;
 }
 
 static void change(char *dev, char *what, unsigned char *addr,
@@ -241,26 +246,15 @@ char *split_if_spec(char *str, ...)
        va_start(ap, str);
        while((arg = va_arg(ap, char **)) != NULL){
                if(*str == '\0')
-                       return(NULL);
+                       return NULL;
                end = strchr(str, ',');
                if(end != str)
                        *arg = str;
                if(end == NULL)
-                       return(NULL);
+                       return NULL;
                *end++ = '\0';
                str = end;
        }
        va_end(ap);
-       return(str);
+       return str;
 }
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 94c9265a4f2ca54e034f4f79c11bf48ee061bdf2..9f70edf5d8ef027c645de108ef9cd901f0f8cd27 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2001 Jeff Dike (jdike@karaya.com)
  * Licensed under the GPL
  */
@@ -25,17 +25,17 @@ static void *tty_chan_init(char *str, int device, struct chan_opts *opts)
        if(*str != ':'){
                printk("tty_init : channel type 'tty' must specify "
                       "a device\n");
-               return(NULL);
+               return NULL;
        }
        str++;
 
        data = um_kmalloc(sizeof(*data));
        if(data == NULL)
-               return(NULL);
+               return NULL;
        *data = ((struct tty_chan) { .dev       = str,
                                     .raw       = opts->raw });
-                                    
-       return(data);
+
+       return data;
 }
 
 static int tty_open(int input, int output, int primary, void *d,
@@ -45,19 +45,21 @@ static int tty_open(int input, int output, int primary, void *d,
        int fd, err;
 
        fd = os_open_file(data->dev, of_set_rw(OPENFLAGS(), input, output), 0);
-       if(fd < 0) return(fd);
+       if(fd < 0)
+               return fd;
+
        if(data->raw){
                CATCH_EINTR(err = tcgetattr(fd, &data->tt));
                if(err)
-                       return(err);
+                       return err;
 
                err = raw(fd);
                if(err)
-                       return(err);
+                       return err;
        }
 
        *dev_out = data->dev;
-       return(fd);
+       return fd;
 }
 
 struct chan_ops tty_ops = {
@@ -72,14 +74,3 @@ struct chan_ops tty_ops = {
        .free           = generic_free,
        .winch          = 0,
 };
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 602d7286b9e0e90c997d6b7065f96f41e754cfcc..34085315aa57e045232a20abeea45ec1111dda79 100644 (file)
@@ -627,7 +627,6 @@ static int ubd_new_disk(int major, u64 size, int unit,
                        
 {
        struct gendisk *disk;
-       int err;
 
        disk = alloc_disk(1 << UBD_SHIFT);
        if(disk == NULL)
index 69a93c804f0e29cc1918e3919f959a42ab0d5c67..15d311b9be9efca178d83da0994f8c813539cd18 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef __IRQ_USER_H__
 #define __IRQ_USER_H__
 
+#include "uml-config.h"
+
 struct irq_fd {
        struct irq_fd *next;
        void *id;
@@ -26,9 +28,10 @@ extern void free_irq_by_fd(int fd);
 extern void reactivate_fd(int fd, int irqnum);
 extern void deactivate_fd(int fd, int irqnum);
 extern int deactivate_all_fds(void);
-extern void forward_interrupts(int pid);
 extern int activate_ipi(int fd, int pid);
-extern unsigned long irq_lock(void);
-extern void irq_unlock(unsigned long flags);
+
+#ifdef CONFIG_MODE_TT
+extern void forward_interrupts(int pid);
+#endif
 
 #endif
index 310980b3217395a591a0eeee7a748dcb4fdf2925..b98bdd8e052a5559993ff134eab1a5aedc467889 100644 (file)
@@ -72,10 +72,8 @@ extern void init_flush_vm(void);
 extern void *syscall_sp(void *t);
 extern void syscall_trace(union uml_pt_regs *regs, int entryexit);
 extern int hz(void);
-extern void uml_idle_timer(void);
 extern unsigned int do_IRQ(int irq, union uml_pt_regs *regs);
 extern int external_pid(void *t);
-extern void boot_timer_handler(int sig);
 extern void interrupt_end(void);
 extern void initial_thread_cb(void (*proc)(void *), void *arg);
 extern int debugger_signal(int status, int pid);
index 8e7053013f7b7d11d218603487abf8c9dcd96294..1b5c0131a12ec7b321983e2bd5b1e23c93828399 100644 (file)
@@ -8,8 +8,8 @@
        longjmp(*buf, val);     \
 } while(0)
 
-#define UML_SETJMP(buf, enable) ({ \
-       int n; \
+#define UML_SETJMP(buf) ({ \
+       int n, enable;     \
        enable = get_signals(); \
        n = setjmp(*buf); \
        if(n != 0) \
index f88856c28a66eda6ea6dfe7dba4502401c3ffa5c..5316e8a4a4fdee933a96ef47c9be7416a005e269 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
  * Licensed under the GPL
  */
@@ -15,9 +15,9 @@
 #include "irq_user.h"
 #include "sysdep/tls.h"
 
-#define OS_TYPE_FILE 1 
-#define OS_TYPE_DIR 2 
-#define OS_TYPE_SYMLINK 3 
+#define OS_TYPE_FILE 1
+#define OS_TYPE_DIR 2
+#define OS_TYPE_SYMLINK 3
 #define OS_TYPE_CHARDEV 4
 #define OS_TYPE_BLOCKDEV 5
 #define OS_TYPE_FIFO 6
@@ -61,68 +61,68 @@ struct openflags {
 };
 
 #define OPENFLAGS() ((struct openflags) { .r = 0, .w = 0, .s = 0, .c = 0, \
-                                         .t = 0, .a = 0, .e = 0, .cl = 0 })
+                                         .t = 0, .a = 0, .e = 0, .cl = 0 })
 
 static inline struct openflags of_read(struct openflags flags)
 {
-       flags.r = 1; 
-       return(flags);
+       flags.r = 1;
+       return flags;
 }
 
 static inline struct openflags of_write(struct openflags flags)
 {
-       flags.w = 1; 
-       return(flags); 
+       flags.w = 1;
+       return flags;
 }
 
 static inline struct openflags of_rdwr(struct openflags flags)
 {
-       return(of_read(of_write(flags)));
+       return of_read(of_write(flags));
 }
 
 static inline struct openflags of_set_rw(struct openflags flags, int r, int w)
 {
        flags.r = r;
        flags.w = w;
-       return(flags);
+       return flags;
 }
 
 static inline struct openflags of_sync(struct openflags flags)
-{ 
-       flags.s = 1; 
-       return(flags); 
+{
+       flags.s = 1;
+       return flags;
 }
 
 static inline struct openflags of_create(struct openflags flags)
-{ 
-       flags.c = 1; 
-       return(flags); 
+{
+       flags.c = 1;
+       return flags;
 }
+
 static inline struct openflags of_trunc(struct openflags flags)
-{ 
-       flags.t = 1; 
-       return(flags); 
+{
+       flags.t = 1;
+       return flags;
 }
+
 static inline struct openflags of_append(struct openflags flags)
-{ 
-       flags.a = 1; 
-       return(flags); 
+{
+       flags.a = 1;
+       return flags;
 }
+
 static inline struct openflags of_excl(struct openflags flags)
-{ 
-       flags.e = 1; 
-       return(flags); 
+{
+       flags.e = 1;
+       return flags;
 }
 
 static inline struct openflags of_cloexec(struct openflags flags)
-{ 
-       flags.cl = 1; 
-       return(flags); 
+{
+       flags.cl = 1;
+       return flags;
 }
-  
+
 /* file.c */
 extern int os_stat_file(const char *file_name, struct uml_stat *buf);
 extern int os_stat_fd(const int fd, struct uml_stat *buf);
@@ -199,12 +199,12 @@ extern int os_getpid(void);
 extern int os_getpgrp(void);
 
 extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int));
-extern void init_new_thread_signals(int altstack);
+extern void init_new_thread_signals(void);
 extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr);
 
 extern int os_map_memory(void *virt, int fd, unsigned long long off,
                         unsigned long len, int r, int w, int x);
-extern int os_protect_memory(void *addr, unsigned long len, 
+extern int os_protect_memory(void *addr, unsigned long len,
                             int r, int w, int x);
 extern int os_unmap_memory(void *addr, int len);
 extern int os_drop_memory(void *addr, int length);
@@ -318,7 +318,6 @@ extern void reboot_skas(void);
 
 /* irq.c */
 extern int os_waiting_for_events(struct irq_fd *active_fds);
-extern int os_isatty(int fd);
 extern int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds);
 extern void os_free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg,
                struct irq_fd *active_fds, struct irq_fd ***last_irq_ptr2);
@@ -330,9 +329,8 @@ extern void os_set_ioignore(void);
 extern void init_irq_signals(int on_sigstack);
 
 /* sigio.c */
-extern void write_sigio_workaround(void);
-extern int add_sigio_fd(int fd, int read);
 extern int ignore_sigio_fd(int fd);
+extern void maybe_sigio_broken(int fd, int read);
 
 /* skas/trap */
 extern void sig_handler_common_skas(int sig, void *sc_ptr);
index 63c58739bde027baec6e1d6e68bd03d1564da22c..9cd9c6ec9a63a35ef71278730a1d752d75c7a5bd 100644 (file)
@@ -29,8 +29,7 @@ extern void flush_tlb_mm_skas(struct mm_struct *mm);
 extern void force_flush_all_skas(void);
 extern long execute_syscall_skas(void *r);
 extern void before_mem_skas(unsigned long unused);
-extern unsigned long set_task_sizes_skas(int arg, unsigned long *host_size_out,
-                                        unsigned long *task_size_out);
+extern unsigned long set_task_sizes_skas(unsigned long *task_size_out);
 extern int start_uml_skas(void);
 extern int external_pid_skas(struct task_struct *task);
 extern int thread_pid_skas(struct task_struct *task);
index efa0012550d0145a1ad4b82ea97d45d008cf45a9..a4fc63057195aaa3e0ec3260ae44e5832da7ad98 100644 (file)
@@ -30,8 +30,7 @@ extern void flush_tlb_mm_tt(struct mm_struct *mm);
 extern void force_flush_all_tt(void);
 extern long execute_syscall_tt(void *r);
 extern void before_mem_tt(unsigned long brk_start);
-extern unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out,
-                                      unsigned long *task_size_out);
+extern unsigned long set_task_sizes_tt(unsigned long *task_size_out);
 extern int start_uml_tt(void);
 extern int external_pid_tt(struct task_struct *task);
 extern int thread_pid_tt(struct task_struct *task);
index fe08971b64cf0e370813732ec031b2578b2711dd..a2d93065b2d0aa10e2b2b363b74366d60276696c 100644 (file)
@@ -6,16 +6,14 @@
 extra-y := vmlinux.lds
 clean-files :=
 
-obj-y = config.o exec_kern.o exitcode.o \
-       init_task.o irq.o ksyms.o mem.o physmem.o \
-       process_kern.o ptrace.o reboot.o resource.o sigio_kern.o \
-       signal_kern.o smp.o syscall_kern.o sysrq.o \
-       time_kern.o tlb.o trap_kern.o uaccess.o um_arch.o umid.o
+obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \
+       physmem.o process_kern.o ptrace.o reboot.o resource.o sigio.o \
+       signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o uaccess.o \
+       um_arch.o umid.o
 
 obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
 obj-$(CONFIG_GPROF)    += gprof_syms.o
 obj-$(CONFIG_GCOV)     += gmon_syms.o
-obj-$(CONFIG_SYSCALL_DEBUG) += syscall.o
 
 obj-$(CONFIG_MODE_TT) += tt/
 obj-$(CONFIG_MODE_SKAS) += skas/
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c
new file mode 100644 (file)
index 0000000..fc38a6d
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
+ * Licensed under the GPL
+ */
+
+#include "linux/slab.h"
+#include "linux/smp_lock.h"
+#include "linux/ptrace.h"
+#include "asm/ptrace.h"
+#include "asm/pgtable.h"
+#include "asm/tlbflush.h"
+#include "asm/uaccess.h"
+#include "user_util.h"
+#include "kern_util.h"
+#include "mem_user.h"
+#include "kern.h"
+#include "irq_user.h"
+#include "tlb.h"
+#include "os.h"
+#include "choose-mode.h"
+#include "mode_kern.h"
+
+void flush_thread(void)
+{
+       arch_flush_thread(&current->thread.arch);
+       CHOOSE_MODE(flush_thread_tt(), flush_thread_skas());
+}
+
+void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
+{
+       CHOOSE_MODE_PROC(start_thread_tt, start_thread_skas, regs, eip, esp);
+}
+
+#ifdef CONFIG_TTY_LOG
+extern void log_exec(char **argv, void *tty);
+#endif
+
+static long execve1(char *file, char __user * __user *argv,
+                   char __user *__user *env)
+{
+        long error;
+
+#ifdef CONFIG_TTY_LOG
+       task_lock(current);
+       log_exec(argv, current->signal->tty);
+       task_unlock(current);
+#endif
+        error = do_execve(file, argv, env, &current->thread.regs);
+        if (error == 0){
+               task_lock(current);
+                current->ptrace &= ~PT_DTRACE;
+#ifdef SUBARCH_EXECVE1
+               SUBARCH_EXECVE1(&current->thread.regs.regs);
+#endif
+               task_unlock(current);
+                set_cmdline(current_cmd());
+        }
+        return(error);
+}
+
+long um_execve(char *file, char __user *__user *argv, char __user *__user *env)
+{
+       long err;
+
+       err = execve1(file, argv, env);
+       if(!err)
+               do_longjmp(current->thread.exec_buf, 1);
+       return(err);
+}
+
+long sys_execve(char __user *file, char __user *__user *argv,
+               char __user *__user *env)
+{
+       long error;
+       char *filename;
+
+       lock_kernel();
+       filename = getname(file);
+       error = PTR_ERR(filename);
+       if (IS_ERR(filename)) goto out;
+       error = execve1(filename, argv, env);
+       putname(filename);
+ out:
+       unlock_kernel();
+       return(error);
+}
diff --git a/arch/um/kernel/exec_kern.c b/arch/um/kernel/exec_kern.c
deleted file mode 100644 (file)
index c0cb627..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/* 
- * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include "linux/slab.h"
-#include "linux/smp_lock.h"
-#include "linux/ptrace.h"
-#include "asm/ptrace.h"
-#include "asm/pgtable.h"
-#include "asm/tlbflush.h"
-#include "asm/uaccess.h"
-#include "user_util.h"
-#include "kern_util.h"
-#include "mem_user.h"
-#include "kern.h"
-#include "irq_user.h"
-#include "tlb.h"
-#include "os.h"
-#include "choose-mode.h"
-#include "mode_kern.h"
-
-void flush_thread(void)
-{
-       arch_flush_thread(&current->thread.arch);
-       CHOOSE_MODE(flush_thread_tt(), flush_thread_skas());
-}
-
-void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
-{
-       CHOOSE_MODE_PROC(start_thread_tt, start_thread_skas, regs, eip, esp);
-}
-
-static long execve1(char *file, char __user * __user *argv,
-                   char __user *__user *env)
-{
-        long error;
-
-#ifdef CONFIG_TTY_LOG
-       log_exec(argv, current->tty);
-#endif
-        error = do_execve(file, argv, env, &current->thread.regs);
-        if (error == 0){
-               task_lock(current);
-                current->ptrace &= ~PT_DTRACE;
-               task_unlock(current);
-                set_cmdline(current_cmd());
-        }
-        return(error);
-}
-
-long um_execve(char *file, char __user *__user *argv, char __user *__user *env)
-{
-       long err;
-
-       err = execve1(file, argv, env);
-       if(!err)
-               do_longjmp(current->thread.exec_buf, 1);
-       return(err);
-}
-
-long sys_execve(char __user *file, char __user *__user *argv,
-               char __user *__user *env)
-{
-       long error;
-       char *filename;
-
-       lock_kernel();
-       filename = getname(file);
-       error = PTR_ERR(filename);
-       if (IS_ERR(filename)) goto out;
-       error = execve1(filename, argv, env);
-       putname(filename);
- out:
-       unlock_kernel();
-       return(error);
-}
index bfd0bdc8cd407e2b7502425cfb73072130f63ad7..589c69a75043ab90056d3ebf983ac31edfdacef5 100644 (file)
@@ -110,18 +110,7 @@ void sigio_handler(int sig, union uml_pt_regs *regs)
        free_irqs();
 }
 
-static void maybe_sigio_broken(int fd, int type)
-{
-       if (os_isatty(fd)) {
-               if ((type == IRQ_WRITE) && !pty_output_sigio) {
-                       write_sigio_workaround();
-                       add_sigio_fd(fd, 0);
-               } else if ((type == IRQ_READ) && !pty_close_sigio) {
-                       write_sigio_workaround();
-                       add_sigio_fd(fd, 1);
-               }
-       }
-}
+static DEFINE_SPINLOCK(irq_lock);
 
 int activate_fd(int irq, int fd, int type, void *dev_id)
 {
@@ -166,7 +155,7 @@ int activate_fd(int irq, int fd, int type, void *dev_id)
         * this is called only from process context, and can be locked with
         * a semaphore.
         */
-       flags = irq_lock();
+       spin_lock_irqsave(&irq_lock, flags);
        for (irq_fd = active_fds; irq_fd != NULL; irq_fd = irq_fd->next) {
                if ((irq_fd->fd == fd) && (irq_fd->type == type)) {
                        printk("Registering fd %d twice\n", fd);
@@ -199,7 +188,7 @@ int activate_fd(int irq, int fd, int type, void *dev_id)
                 * so we will not be able to put new pollfd struct to pollfds
                 * then we free the buffer tmp_fds and try again.
                 */
-               irq_unlock(flags);
+               spin_unlock_irqrestore(&irq_lock, flags);
                kfree(tmp_pfd);
                tmp_pfd = NULL;
 
@@ -207,24 +196,24 @@ int activate_fd(int irq, int fd, int type, void *dev_id)
                if (tmp_pfd == NULL)
                        goto out_kfree;
 
-               flags = irq_lock();
+               spin_lock_irqsave(&irq_lock, flags);
        }
        /*-------------*/
 
        *last_irq_ptr = new_fd;
        last_irq_ptr = &new_fd->next;
 
-       irq_unlock(flags);
+       spin_unlock_irqrestore(&irq_lock, flags);
 
        /* This calls activate_fd, so it has to be outside the critical
         * section.
         */
-       maybe_sigio_broken(fd, type);
+       maybe_sigio_broken(fd, (type == IRQ_READ));
 
        return(0);
 
  out_unlock:
-       irq_unlock(flags);
+       spin_unlock_irqrestore(&irq_lock, flags);
  out_kfree:
        kfree(new_fd);
  out:
@@ -235,9 +224,9 @@ static void free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg)
 {
        unsigned long flags;
 
-       flags = irq_lock();
+       spin_lock_irqsave(&irq_lock, flags);
        os_free_irq_by_cb(test, arg, active_fds, &last_irq_ptr);
-       irq_unlock(flags);
+       spin_unlock_irqrestore(&irq_lock, flags);
 }
 
 struct irq_and_dev {
@@ -304,19 +293,19 @@ void reactivate_fd(int fd, int irqnum)
        unsigned long flags;
        int i;
 
-       flags = irq_lock();
+       spin_lock_irqsave(&irq_lock, flags);
        irq = find_irq_by_fd(fd, irqnum, &i);
        if (irq == NULL) {
-               irq_unlock(flags);
+               spin_unlock_irqrestore(&irq_lock, flags);
                return;
        }
        os_set_pollfd(i, irq->fd);
-       irq_unlock(flags);
+       spin_unlock_irqrestore(&irq_lock, flags);
 
        /* This calls activate_fd, so it has to be outside the critical
         * section.
         */
-       maybe_sigio_broken(fd, irq->type);
+       maybe_sigio_broken(fd, (irq->type == IRQ_READ));
 }
 
 void deactivate_fd(int fd, int irqnum)
@@ -325,13 +314,13 @@ void deactivate_fd(int fd, int irqnum)
        unsigned long flags;
        int i;
 
-       flags = irq_lock();
+       spin_lock_irqsave(&irq_lock, flags);
        irq = find_irq_by_fd(fd, irqnum, &i);
        if (irq == NULL)
                goto out;
        os_set_pollfd(i, -1);
  out:
-       irq_unlock(flags);
+       spin_unlock_irqrestore(&irq_lock, flags);
 }
 
 int deactivate_all_fds(void)
@@ -350,13 +339,14 @@ int deactivate_all_fds(void)
        return 0;
 }
 
+#ifdef CONFIG_MODE_TT
 void forward_interrupts(int pid)
 {
        struct irq_fd *irq;
        unsigned long flags;
        int err;
 
-       flags = irq_lock();
+       spin_lock_irqsave(&irq_lock, flags);
        for (irq = active_fds; irq != NULL; irq = irq->next) {
                err = os_set_owner(irq->fd, pid);
                if (err < 0) {
@@ -369,8 +359,9 @@ void forward_interrupts(int pid)
 
                irq->pid = pid;
        }
-       irq_unlock(flags);
+       spin_unlock_irqrestore(&irq_lock, flags);
 }
+#endif
 
 /*
  * do_IRQ handles all normal device IRQ's (the special
@@ -403,21 +394,6 @@ int um_request_irq(unsigned int irq, int fd, int type,
 EXPORT_SYMBOL(um_request_irq);
 EXPORT_SYMBOL(reactivate_fd);
 
-static DEFINE_SPINLOCK(irq_spinlock);
-
-unsigned long irq_lock(void)
-{
-       unsigned long flags;
-
-       spin_lock_irqsave(&irq_spinlock, flags);
-       return flags;
-}
-
-void irq_unlock(unsigned long flags)
-{
-       spin_unlock_irqrestore(&irq_spinlock, flags);
-}
-
 /* hw_interrupt_type must define (startup || enable) &&
  * (shutdown || disable) && end */
 static void dummy(unsigned int irq)
index 432cf0b97a138716b39360274a09e6d769b7fcfe..c97045d6d89f5ecf61df62886b54d67bdc42411d 100644 (file)
@@ -88,12 +88,6 @@ EXPORT_SYMBOL(dump_thread);
 EXPORT_SYMBOL(do_gettimeofday);
 EXPORT_SYMBOL(do_settimeofday);
 
-/* This is here because UML expands lseek to sys_lseek, not to a system
- * call instruction.
- */
-EXPORT_SYMBOL(sys_lseek);
-EXPORT_SYMBOL(sys_wait4);
-
 #ifdef CONFIG_SMP
 
 /* required for SMP */
index 44e41a35f000cd667c737d856d1f48af0f6bf200..61280167c560dd63411c105663f93519b5818817 100644 (file)
@@ -24,8 +24,6 @@
 #include "init.h"
 #include "kern_constants.h"
 
-extern char __binary_start;
-
 /* Changed during early boot */
 unsigned long *empty_zero_page = NULL;
 unsigned long *empty_bad_page = NULL;
@@ -65,8 +63,6 @@ static void setup_highmem(unsigned long highmem_start,
 
 void mem_init(void)
 {
-       unsigned long start;
-
        max_low_pfn = (high_physmem - uml_physmem) >> PAGE_SHIFT;
 
         /* clear the zero-page */
@@ -81,13 +77,6 @@ void mem_init(void)
        free_bootmem(__pa(brk_end), uml_reserved - brk_end);
        uml_reserved = brk_end;
 
-       /* Fill in any hole at the start of the binary */
-       start = (unsigned long) &__binary_start & PAGE_MASK;
-       if(uml_physmem != start){
-               map_memory(uml_physmem, __pa(uml_physmem), start - uml_physmem,
-                          1, 1, 0);
-       }
-
        /* this will put all low memory onto the freelists */
        totalram_pages = free_all_bootmem();
        totalhigh_pages = highmem >> PAGE_SHIFT;
index 166cb09cae4cf9f05079d84ea88ef5f7770551e4..abafa64b8727ecef4e0b35f04fbcae7d7551662a 100644 (file)
@@ -317,7 +317,7 @@ void map_memory(unsigned long virt, unsigned long phys, unsigned long len,
        }
 }
 
-extern int __syscall_stub_start, __binary_start;
+extern int __syscall_stub_start;
 
 void setup_physmem(unsigned long start, unsigned long reserve_end,
                   unsigned long len, unsigned long long highmem)
diff --git a/arch/um/kernel/sigio.c b/arch/um/kernel/sigio.c
new file mode 100644 (file)
index 0000000..0ad755c
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com)
+ * Licensed under the GPL
+ */
+
+#include "linux/kernel.h"
+#include "linux/list.h"
+#include "linux/slab.h"
+#include "linux/signal.h"
+#include "linux/interrupt.h"
+#include "init.h"
+#include "sigio.h"
+#include "irq_user.h"
+#include "irq_kern.h"
+#include "os.h"
+
+/* Protected by sigio_lock() called from write_sigio_workaround */
+static int sigio_irq_fd = -1;
+
+static irqreturn_t sigio_interrupt(int irq, void *data, struct pt_regs *unused)
+{
+       char c;
+
+       os_read_file(sigio_irq_fd, &c, sizeof(c));
+       reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ);
+       return(IRQ_HANDLED);
+}
+
+int write_sigio_irq(int fd)
+{
+       int err;
+
+       err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt,
+                            IRQF_DISABLED|IRQF_SAMPLE_RANDOM, "write sigio",
+                            NULL);
+       if(err){
+               printk("write_sigio_irq : um_request_irq failed, err = %d\n",
+                      err);
+               return(-1);
+       }
+       sigio_irq_fd = fd;
+       return(0);
+}
+
+static DEFINE_SPINLOCK(sigio_spinlock);
+
+void sigio_lock(void)
+{
+       spin_lock(&sigio_spinlock);
+}
+
+void sigio_unlock(void)
+{
+       spin_unlock(&sigio_spinlock);
+}
diff --git a/arch/um/kernel/sigio_kern.c b/arch/um/kernel/sigio_kern.c
deleted file mode 100644 (file)
index 51b6770..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com)
- * Licensed under the GPL
- */
-
-#include "linux/kernel.h"
-#include "linux/list.h"
-#include "linux/slab.h"
-#include "linux/signal.h"
-#include "linux/interrupt.h"
-#include "init.h"
-#include "sigio.h"
-#include "irq_user.h"
-#include "irq_kern.h"
-#include "os.h"
-
-/* Protected by sigio_lock() called from write_sigio_workaround */
-static int sigio_irq_fd = -1;
-
-static irqreturn_t sigio_interrupt(int irq, void *data, struct pt_regs *unused)
-{
-       char c;
-
-       os_read_file(sigio_irq_fd, &c, sizeof(c));
-       reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ);
-       return(IRQ_HANDLED);
-}
-
-int write_sigio_irq(int fd)
-{
-       int err;
-
-       err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt,
-                            IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "write sigio",
-                            NULL);
-       if(err){
-               printk("write_sigio_irq : um_request_irq failed, err = %d\n",
-                      err);
-               return(-1);
-       }
-       sigio_irq_fd = fd;
-       return(0);
-}
-
-static DEFINE_SPINLOCK(sigio_spinlock);
-
-void sigio_lock(void)
-{
-       spin_lock(&sigio_spinlock);
-}
-
-void sigio_unlock(void)
-{
-       spin_unlock(&sigio_spinlock);
-}
-
-extern void sigio_cleanup(void);
-__uml_exitcall(sigio_cleanup);
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c
new file mode 100644 (file)
index 0000000..4aa9808
--- /dev/null
@@ -0,0 +1,191 @@
+/*
+ * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
+ * Licensed under the GPL
+ */
+
+#include "linux/config.h"
+#include "linux/stddef.h"
+#include "linux/sys.h"
+#include "linux/sched.h"
+#include "linux/wait.h"
+#include "linux/kernel.h"
+#include "linux/smp_lock.h"
+#include "linux/module.h"
+#include "linux/slab.h"
+#include "linux/tty.h"
+#include "linux/binfmts.h"
+#include "linux/ptrace.h"
+#include "asm/signal.h"
+#include "asm/uaccess.h"
+#include "asm/unistd.h"
+#include "user_util.h"
+#include "asm/ucontext.h"
+#include "kern_util.h"
+#include "signal_kern.h"
+#include "kern.h"
+#include "frame_kern.h"
+#include "sigcontext.h"
+#include "mode.h"
+
+EXPORT_SYMBOL(block_signals);
+EXPORT_SYMBOL(unblock_signals);
+
+#define _S(nr) (1<<((nr)-1))
+
+#define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
+
+/*
+ * OK, we're invoking a handler
+ */
+static int handle_signal(struct pt_regs *regs, unsigned long signr,
+                        struct k_sigaction *ka, siginfo_t *info,
+                        sigset_t *oldset)
+{
+       unsigned long sp;
+       int err;
+
+       /* Always make any pending restarted system calls return -EINTR */
+       current_thread_info()->restart_block.fn = do_no_restart_syscall;
+
+       /* Did we come from a system call? */
+       if(PT_REGS_SYSCALL_NR(regs) >= 0){
+               /* If so, check system call restarting.. */
+               switch(PT_REGS_SYSCALL_RET(regs)){
+               case -ERESTART_RESTARTBLOCK:
+               case -ERESTARTNOHAND:
+                       PT_REGS_SYSCALL_RET(regs) = -EINTR;
+                       break;
+
+               case -ERESTARTSYS:
+                       if (!(ka->sa.sa_flags & SA_RESTART)) {
+                               PT_REGS_SYSCALL_RET(regs) = -EINTR;
+                               break;
+                       }
+               /* fallthrough */
+               case -ERESTARTNOINTR:
+                       PT_REGS_RESTART_SYSCALL(regs);
+                       PT_REGS_ORIG_SYSCALL(regs) = PT_REGS_SYSCALL_NR(regs);
+                       break;
+               }
+       }
+
+       sp = PT_REGS_SP(regs);
+       if((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0))
+               sp = current->sas_ss_sp + current->sas_ss_size;
+
+#ifdef CONFIG_ARCH_HAS_SC_SIGNALS
+       if(!(ka->sa.sa_flags & SA_SIGINFO))
+               err = setup_signal_stack_sc(sp, signr, ka, regs, oldset);
+       else
+#endif
+               err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset);
+
+       if(err){
+               spin_lock_irq(&current->sighand->siglock);
+               current->blocked = *oldset;
+               recalc_sigpending();
+               spin_unlock_irq(&current->sighand->siglock);
+               force_sigsegv(signr, current);
+       } else {
+               spin_lock_irq(&current->sighand->siglock);
+               sigorsets(&current->blocked, &current->blocked,
+                         &ka->sa.sa_mask);
+                if(!(ka->sa.sa_flags & SA_NODEFER))
+                       sigaddset(&current->blocked, signr);
+               recalc_sigpending();
+               spin_unlock_irq(&current->sighand->siglock);
+       }
+
+       return err;
+}
+
+static int kern_do_signal(struct pt_regs *regs)
+{
+       struct k_sigaction ka_copy;
+       siginfo_t info;
+       sigset_t *oldset;
+       int sig, handled_sig = 0;
+
+       if (test_thread_flag(TIF_RESTORE_SIGMASK))
+               oldset = &current->saved_sigmask;
+       else
+               oldset = &current->blocked;
+
+       while((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0){
+               handled_sig = 1;
+               /* Whee!  Actually deliver the signal.  */
+               if(!handle_signal(regs, sig, &ka_copy, &info, oldset)){
+                       /* a signal was successfully delivered; the saved
+                        * sigmask will have been stored in the signal frame,
+                        * and will be restored by sigreturn, so we can simply
+                        * clear the TIF_RESTORE_SIGMASK flag */
+                       if (test_thread_flag(TIF_RESTORE_SIGMASK))
+                               clear_thread_flag(TIF_RESTORE_SIGMASK);
+                       break;
+               }
+       }
+
+       /* Did we come from a system call? */
+       if(!handled_sig && (PT_REGS_SYSCALL_NR(regs) >= 0)){
+               /* Restart the system call - no handlers present */
+               switch(PT_REGS_SYSCALL_RET(regs)){
+               case -ERESTARTNOHAND:
+               case -ERESTARTSYS:
+               case -ERESTARTNOINTR:
+                       PT_REGS_ORIG_SYSCALL(regs) = PT_REGS_SYSCALL_NR(regs);
+                       PT_REGS_RESTART_SYSCALL(regs);
+                       break;
+               case -ERESTART_RESTARTBLOCK:
+                       PT_REGS_ORIG_SYSCALL(regs) = __NR_restart_syscall;
+                       PT_REGS_RESTART_SYSCALL(regs);
+                       break;
+               }
+       }
+
+       /* This closes a way to execute a system call on the host.  If
+        * you set a breakpoint on a system call instruction and singlestep
+        * from it, the tracing thread used to PTRACE_SINGLESTEP the process
+        * rather than PTRACE_SYSCALL it, allowing the system call to execute
+        * on the host.  The tracing thread will check this flag and
+        * PTRACE_SYSCALL if necessary.
+        */
+       if(current->ptrace & PT_DTRACE)
+               current->thread.singlestep_syscall =
+                       is_syscall(PT_REGS_IP(&current->thread.regs));
+
+       /* if there's no signal to deliver, we just put the saved sigmask
+        * back */
+       if (!handled_sig && test_thread_flag(TIF_RESTORE_SIGMASK)) {
+               clear_thread_flag(TIF_RESTORE_SIGMASK);
+               sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
+       }
+       return(handled_sig);
+}
+
+int do_signal(void)
+{
+       return(kern_do_signal(&current->thread.regs));
+}
+
+/*
+ * Atomically swap in the new signal mask, and wait for a signal.
+ */
+long sys_sigsuspend(int history0, int history1, old_sigset_t mask)
+{
+       mask &= _BLOCKABLE;
+       spin_lock_irq(&current->sighand->siglock);
+       current->saved_sigmask = current->blocked;
+       siginitset(&current->blocked, mask);
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
+
+       current->state = TASK_INTERRUPTIBLE;
+       schedule();
+       set_thread_flag(TIF_RESTORE_SIGMASK);
+       return -ERESTARTNOHAND;
+}
+
+long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
+{
+       return(do_sigaltstack(uss, uoss, PT_REGS_SP(&current->thread.regs)));
+}
diff --git a/arch/um/kernel/signal_kern.c b/arch/um/kernel/signal_kern.c
deleted file mode 100644 (file)
index da17b75..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/* 
- * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include "linux/config.h"
-#include "linux/stddef.h"
-#include "linux/sys.h"
-#include "linux/sched.h"
-#include "linux/wait.h"
-#include "linux/kernel.h"
-#include "linux/smp_lock.h"
-#include "linux/module.h"
-#include "linux/slab.h"
-#include "linux/tty.h"
-#include "linux/binfmts.h"
-#include "linux/ptrace.h"
-#include "asm/signal.h"
-#include "asm/uaccess.h"
-#include "asm/unistd.h"
-#include "user_util.h"
-#include "asm/ucontext.h"
-#include "kern_util.h"
-#include "signal_kern.h"
-#include "kern.h"
-#include "frame_kern.h"
-#include "sigcontext.h"
-#include "mode.h"
-
-EXPORT_SYMBOL(block_signals);
-EXPORT_SYMBOL(unblock_signals);
-
-#define _S(nr) (1<<((nr)-1))
-
-#define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
-
-/*
- * OK, we're invoking a handler
- */    
-static int handle_signal(struct pt_regs *regs, unsigned long signr,
-                        struct k_sigaction *ka, siginfo_t *info,
-                        sigset_t *oldset)
-{
-       unsigned long sp;
-       int err;
-
-       /* Always make any pending restarted system calls return -EINTR */
-       current_thread_info()->restart_block.fn = do_no_restart_syscall;
-
-       /* Did we come from a system call? */
-       if(PT_REGS_SYSCALL_NR(regs) >= 0){
-               /* If so, check system call restarting.. */
-               switch(PT_REGS_SYSCALL_RET(regs)){
-               case -ERESTART_RESTARTBLOCK:
-               case -ERESTARTNOHAND:
-                       PT_REGS_SYSCALL_RET(regs) = -EINTR;
-                       break;
-
-               case -ERESTARTSYS:
-                       if (!(ka->sa.sa_flags & SA_RESTART)) {
-                               PT_REGS_SYSCALL_RET(regs) = -EINTR;
-                               break;
-                       }
-               /* fallthrough */
-               case -ERESTARTNOINTR:
-                       PT_REGS_RESTART_SYSCALL(regs);
-                       PT_REGS_ORIG_SYSCALL(regs) = PT_REGS_SYSCALL_NR(regs);
-                       break;
-               }
-       }
-
-       sp = PT_REGS_SP(regs);
-       if((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0))
-               sp = current->sas_ss_sp + current->sas_ss_size;
-
-#ifdef CONFIG_ARCH_HAS_SC_SIGNALS
-       if(!(ka->sa.sa_flags & SA_SIGINFO))
-               err = setup_signal_stack_sc(sp, signr, ka, regs, oldset);
-       else
-#endif
-               err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset);
-
-       if(err){
-               spin_lock_irq(&current->sighand->siglock);
-               current->blocked = *oldset;
-               recalc_sigpending();
-               spin_unlock_irq(&current->sighand->siglock);
-               force_sigsegv(signr, current);
-       } else {
-               spin_lock_irq(&current->sighand->siglock);
-               sigorsets(&current->blocked, &current->blocked, 
-                         &ka->sa.sa_mask);
-                if(!(ka->sa.sa_flags & SA_NODEFER))
-                       sigaddset(&current->blocked, signr);
-               recalc_sigpending();
-               spin_unlock_irq(&current->sighand->siglock);
-       }
-
-       return err;
-}
-
-static int kern_do_signal(struct pt_regs *regs)
-{
-       struct k_sigaction ka_copy;
-       siginfo_t info;
-       sigset_t *oldset;
-       int sig, handled_sig = 0;
-
-       if (test_thread_flag(TIF_RESTORE_SIGMASK))
-               oldset = &current->saved_sigmask;
-       else
-               oldset = &current->blocked;
-
-       while((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0){
-               handled_sig = 1;
-               /* Whee!  Actually deliver the signal.  */
-               if(!handle_signal(regs, sig, &ka_copy, &info, oldset)){
-                       /* a signal was successfully delivered; the saved
-                        * sigmask will have been stored in the signal frame,
-                        * and will be restored by sigreturn, so we can simply
-                        * clear the TIF_RESTORE_SIGMASK flag */
-                       if (test_thread_flag(TIF_RESTORE_SIGMASK))
-                               clear_thread_flag(TIF_RESTORE_SIGMASK);
-                       break;
-               }
-       }
-
-       /* Did we come from a system call? */
-       if(!handled_sig && (PT_REGS_SYSCALL_NR(regs) >= 0)){
-               /* Restart the system call - no handlers present */
-               switch(PT_REGS_SYSCALL_RET(regs)){
-               case -ERESTARTNOHAND:
-               case -ERESTARTSYS:
-               case -ERESTARTNOINTR:
-                       PT_REGS_ORIG_SYSCALL(regs) = PT_REGS_SYSCALL_NR(regs);
-                       PT_REGS_RESTART_SYSCALL(regs);
-                       break;
-               case -ERESTART_RESTARTBLOCK:
-                       PT_REGS_SYSCALL_RET(regs) = __NR_restart_syscall;
-                       PT_REGS_RESTART_SYSCALL(regs);
-                       break;
-               }
-       }
-
-       /* This closes a way to execute a system call on the host.  If
-        * you set a breakpoint on a system call instruction and singlestep
-        * from it, the tracing thread used to PTRACE_SINGLESTEP the process
-        * rather than PTRACE_SYSCALL it, allowing the system call to execute
-        * on the host.  The tracing thread will check this flag and 
-        * PTRACE_SYSCALL if necessary.
-        */
-       if(current->ptrace & PT_DTRACE)
-               current->thread.singlestep_syscall =
-                       is_syscall(PT_REGS_IP(&current->thread.regs));
-
-       /* if there's no signal to deliver, we just put the saved sigmask
-        * back */
-       if (!handled_sig && test_thread_flag(TIF_RESTORE_SIGMASK)) {
-               clear_thread_flag(TIF_RESTORE_SIGMASK);
-               sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
-       }
-       return(handled_sig);
-}
-
-int do_signal(void)
-{
-       return(kern_do_signal(&current->thread.regs));
-}
-
-/*
- * Atomically swap in the new signal mask, and wait for a signal.
- */
-long sys_sigsuspend(int history0, int history1, old_sigset_t mask)
-{
-       mask &= _BLOCKABLE;
-       spin_lock_irq(&current->sighand->siglock);
-       current->saved_sigmask = current->blocked;
-       siginitset(&current->blocked, mask);
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
-
-       current->state = TASK_INTERRUPTIBLE;
-       schedule();
-       set_thread_flag(TIF_RESTORE_SIGMASK);
-       return -ERESTARTNOHAND;
-}
-
-long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
-{
-       return(do_sigaltstack(uss, uoss, PT_REGS_SP(&current->thread.regs)));
-}
index 88ab96c609cecec84b1e960a512dc7a10035d8a7..27bbf54b1e52a1b84fff2fd11f866582a95bb685 100644 (file)
@@ -9,31 +9,19 @@
 #include "mem_user.h"
 #include "skas.h"
 
-unsigned long set_task_sizes_skas(int arg, unsigned long *host_size_out, 
-                                 unsigned long *task_size_out)
+unsigned long set_task_sizes_skas(unsigned long *task_size_out)
 {
        /* Round up to the nearest 4M */
-       unsigned long top = ROUND_4M((unsigned long) &arg);
+       unsigned long host_task_size = ROUND_4M((unsigned long)
+                                               &host_task_size);
 
 #ifdef CONFIG_HOST_TASK_SIZE
-       *host_size_out = CONFIG_HOST_TASK_SIZE;
+       *host_size_out = ROUND_4M(CONFIG_HOST_TASK_SIZE);
        *task_size_out = CONFIG_HOST_TASK_SIZE;
 #else
-       *host_size_out = top;
        if (!skas_needs_stub)
-               *task_size_out = top;
+               *task_size_out = host_task_size;
        else *task_size_out = CONFIG_STUB_START & PGDIR_MASK;
 #endif
-       return(((unsigned long) set_task_sizes_skas) & ~0xffffff);
+       return host_task_size;
 }
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 2135eaf98a938122e87a269aee5f11f3cf0199de..55caeec8b25725d856db3af7a00d678277a520e5 100644 (file)
@@ -177,7 +177,7 @@ int start_uml_skas(void)
        if(proc_mm)
                userspace_pid[0] = start_userspace(0);
 
-       init_new_thread_signals(1);
+       init_new_thread_signals();
 
        init_task.thread.request.u.thread.proc = start_kernel_proc;
        init_task.thread.request.u.thread.arg = NULL;
index 51fb94076fcf92628c6e06674051bd1de232a934..0ae4eea21be41d4ee96ff536d6dd1ec75206d53f 100644 (file)
@@ -18,11 +18,7 @@ void handle_syscall(union uml_pt_regs *r)
        struct pt_regs *regs = container_of(r, struct pt_regs, regs);
        long result;
        int syscall;
-#ifdef UML_CONFIG_SYSCALL_DEBUG
-       int index;
 
-       index = record_syscall_start(UPT_SYSCALL_NR(r));
-#endif
        syscall_trace(r, 0);
 
        current->thread.nsyscalls++;
@@ -44,7 +40,4 @@ void handle_syscall(union uml_pt_regs *r)
        REGS_SET_SYSCALL_RETURN(r->skas.regs, result);
 
        syscall_trace(r, 1);
-#ifdef UML_CONFIG_SYSCALL_DEBUG
-       record_syscall_end(index, result);
-#endif
 }
index 1731d90e68507e1316cfa4a3c6c3d15f510f316b..48cf88dd02d4daaf94c0aca862065eb9abeb8388 100644 (file)
 /*
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
+ * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
  * Licensed under the GPL
  */
 
+#include "linux/sched.h"
+#include "linux/file.h"
+#include "linux/smp_lock.h"
+#include "linux/mm.h"
+#include "linux/utsname.h"
+#include "linux/msg.h"
+#include "linux/shm.h"
+#include "linux/sys.h"
+#include "linux/syscalls.h"
+#include "linux/unistd.h"
+#include "linux/slab.h"
+#include "linux/utime.h"
+#include "asm/mman.h"
+#include "asm/uaccess.h"
 #include "kern_util.h"
-#include "syscall.h"
-#include "os.h"
+#include "user_util.h"
+#include "sysdep/syscalls.h"
+#include "mode_kern.h"
+#include "choose-mode.h"
 
-struct {
-       int syscall;
-       int pid;
-       long result;
-       unsigned long long start;
-       unsigned long long end;
-} syscall_record[1024];
+/*  Unlocked, I don't care if this is a bit off */
+int nsyscalls = 0;
 
-int record_syscall_start(int syscall)
+long sys_fork(void)
 {
-       int max, index;
+       long ret;
 
-       max = sizeof(syscall_record)/sizeof(syscall_record[0]);
-       index = next_syscall_index(max);
+       current->thread.forking = 1;
+       ret = do_fork(SIGCHLD, UPT_SP(&current->thread.regs.regs),
+                     &current->thread.regs, 0, NULL, NULL);
+       current->thread.forking = 0;
+       return(ret);
+}
+
+long sys_vfork(void)
+{
+       long ret;
+
+       current->thread.forking = 1;
+       ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
+                     UPT_SP(&current->thread.regs.regs),
+                     &current->thread.regs, 0, NULL, NULL);
+       current->thread.forking = 0;
+       return(ret);
+}
+
+/* common code for old and new mmaps */
+long sys_mmap2(unsigned long addr, unsigned long len,
+              unsigned long prot, unsigned long flags,
+              unsigned long fd, unsigned long pgoff)
+{
+       long error = -EBADF;
+       struct file * file = NULL;
+
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       if (!(flags & MAP_ANONYMOUS)) {
+               file = fget(fd);
+               if (!file)
+                       goto out;
+       }
+
+       down_write(&current->mm->mmap_sem);
+       error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
+       up_write(&current->mm->mmap_sem);
+
+       if (file)
+               fput(file);
+ out:
+       return error;
+}
+
+long old_mmap(unsigned long addr, unsigned long len,
+             unsigned long prot, unsigned long flags,
+             unsigned long fd, unsigned long offset)
+{
+       long err = -EINVAL;
+       if (offset & ~PAGE_MASK)
+               goto out;
+
+       err = sys_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
+ out:
+       return err;
+}
+/*
+ * sys_pipe() is the normal C calling standard for creating
+ * a pipe. It's not the way unix traditionally does this, though.
+ */
+long sys_pipe(unsigned long __user * fildes)
+{
+        int fd[2];
+        long error;
+
+        error = do_pipe(fd);
+        if (!error) {
+               if (copy_to_user(fildes, fd, sizeof(fd)))
+                        error = -EFAULT;
+        }
+        return error;
+}
 
-       syscall_record[index].syscall = syscall;
-       syscall_record[index].pid = current_pid();
-       syscall_record[index].result = 0xdeadbeef;
-       syscall_record[index].start = os_nsecs();
-       return(index);
+
+long sys_uname(struct old_utsname __user * name)
+{
+       long err;
+       if (!name)
+               return -EFAULT;
+       down_read(&uts_sem);
+       err = copy_to_user(name, &system_utsname, sizeof (*name));
+       up_read(&uts_sem);
+       return err?-EFAULT:0;
 }
 
-void record_syscall_end(int index, long result)
+long sys_olduname(struct oldold_utsname __user * name)
 {
-       syscall_record[index].result = result;
-       syscall_record[index].end = os_nsecs();
+       long error;
+
+       if (!name)
+               return -EFAULT;
+       if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
+               return -EFAULT;
+
+       down_read(&uts_sem);
+
+       error = __copy_to_user(&name->sysname,&system_utsname.sysname,
+                              __OLD_UTS_LEN);
+       error |= __put_user(0,name->sysname+__OLD_UTS_LEN);
+       error |= __copy_to_user(&name->nodename,&system_utsname.nodename,
+                               __OLD_UTS_LEN);
+       error |= __put_user(0,name->nodename+__OLD_UTS_LEN);
+       error |= __copy_to_user(&name->release,&system_utsname.release,
+                               __OLD_UTS_LEN);
+       error |= __put_user(0,name->release+__OLD_UTS_LEN);
+       error |= __copy_to_user(&name->version,&system_utsname.version,
+                               __OLD_UTS_LEN);
+       error |= __put_user(0,name->version+__OLD_UTS_LEN);
+       error |= __copy_to_user(&name->machine,&system_utsname.machine,
+                               __OLD_UTS_LEN);
+       error |= __put_user(0,name->machine+__OLD_UTS_LEN);
+
+       up_read(&uts_sem);
+
+       error = error ? -EFAULT : 0;
+
+       return error;
+}
+
+DEFINE_SPINLOCK(syscall_lock);
+
+static int syscall_index = 0;
+
+int next_syscall_index(int limit)
+{
+       int ret;
+
+       spin_lock(&syscall_lock);
+       ret = syscall_index;
+       if(++syscall_index == limit)
+               syscall_index = 0;
+       spin_unlock(&syscall_lock);
+       return(ret);
 }
diff --git a/arch/um/kernel/syscall_kern.c b/arch/um/kernel/syscall_kern.c
deleted file mode 100644 (file)
index 37d3978..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/* 
- * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
- * Licensed under the GPL
- */
-
-#include "linux/sched.h"
-#include "linux/file.h"
-#include "linux/smp_lock.h"
-#include "linux/mm.h"
-#include "linux/utsname.h"
-#include "linux/msg.h"
-#include "linux/shm.h"
-#include "linux/sys.h"
-#include "linux/syscalls.h"
-#include "linux/unistd.h"
-#include "linux/slab.h"
-#include "linux/utime.h"
-#include "asm/mman.h"
-#include "asm/uaccess.h"
-#include "kern_util.h"
-#include "user_util.h"
-#include "sysdep/syscalls.h"
-#include "mode_kern.h"
-#include "choose-mode.h"
-
-/*  Unlocked, I don't care if this is a bit off */
-int nsyscalls = 0;
-
-long sys_fork(void)
-{
-       long ret;
-
-       current->thread.forking = 1;
-       ret = do_fork(SIGCHLD, UPT_SP(&current->thread.regs.regs),
-                     &current->thread.regs, 0, NULL, NULL);
-       current->thread.forking = 0;
-       return(ret);
-}
-
-long sys_vfork(void)
-{
-       long ret;
-
-       current->thread.forking = 1;
-       ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
-                     UPT_SP(&current->thread.regs.regs),
-                     &current->thread.regs, 0, NULL, NULL);
-       current->thread.forking = 0;
-       return(ret);
-}
-
-/* common code for old and new mmaps */
-long sys_mmap2(unsigned long addr, unsigned long len,
-              unsigned long prot, unsigned long flags,
-              unsigned long fd, unsigned long pgoff)
-{
-       long error = -EBADF;
-       struct file * file = NULL;
-
-       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
-       if (!(flags & MAP_ANONYMOUS)) {
-               file = fget(fd);
-               if (!file)
-                       goto out;
-       }
-
-       down_write(&current->mm->mmap_sem);
-       error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
-       up_write(&current->mm->mmap_sem);
-
-       if (file)
-               fput(file);
- out:
-       return error;
-}
-
-long old_mmap(unsigned long addr, unsigned long len,
-             unsigned long prot, unsigned long flags,
-             unsigned long fd, unsigned long offset)
-{
-       long err = -EINVAL;
-       if (offset & ~PAGE_MASK)
-               goto out;
-
-       err = sys_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
- out:
-       return err;
-}
-/*
- * sys_pipe() is the normal C calling standard for creating
- * a pipe. It's not the way unix traditionally does this, though.
- */
-long sys_pipe(unsigned long __user * fildes)
-{
-        int fd[2];
-        long error;
-
-        error = do_pipe(fd);
-        if (!error) {
-               if (copy_to_user(fildes, fd, sizeof(fd)))
-                        error = -EFAULT;
-        }
-        return error;
-}
-
-
-long sys_uname(struct old_utsname __user * name)
-{
-       long err;
-       if (!name)
-               return -EFAULT;
-       down_read(&uts_sem);
-       err=copy_to_user(name, &system_utsname, sizeof (*name));
-       up_read(&uts_sem);
-       return err?-EFAULT:0;
-}
-
-long sys_olduname(struct oldold_utsname __user * name)
-{
-       long error;
-
-       if (!name)
-               return -EFAULT;
-       if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
-               return -EFAULT;
-  
-       down_read(&uts_sem);
-       
-       error = __copy_to_user(&name->sysname,&system_utsname.sysname,
-                              __OLD_UTS_LEN);
-       error |= __put_user(0,name->sysname+__OLD_UTS_LEN);
-       error |= __copy_to_user(&name->nodename,&system_utsname.nodename,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0,name->nodename+__OLD_UTS_LEN);
-       error |= __copy_to_user(&name->release,&system_utsname.release,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0,name->release+__OLD_UTS_LEN);
-       error |= __copy_to_user(&name->version,&system_utsname.version,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0,name->version+__OLD_UTS_LEN);
-       error |= __copy_to_user(&name->machine,&system_utsname.machine,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0,name->machine+__OLD_UTS_LEN);
-       
-       up_read(&uts_sem);
-       
-       error = error ? -EFAULT : 0;
-
-       return error;
-}
-
-DEFINE_SPINLOCK(syscall_lock);
-
-static int syscall_index = 0;
-
-int next_syscall_index(int limit)
-{
-       int ret;
-
-       spin_lock(&syscall_lock);
-       ret = syscall_index;
-       if(++syscall_index == limit)
-               syscall_index = 0;
-       spin_unlock(&syscall_lock);
-       return(ret);
-}
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
new file mode 100644 (file)
index 0000000..552ca1c
--- /dev/null
@@ -0,0 +1,182 @@
+/*
+ * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
+ * Licensed under the GPL
+ */
+
+#include "linux/kernel.h"
+#include "linux/module.h"
+#include "linux/unistd.h"
+#include "linux/stddef.h"
+#include "linux/spinlock.h"
+#include "linux/time.h"
+#include "linux/sched.h"
+#include "linux/interrupt.h"
+#include "linux/init.h"
+#include "linux/delay.h"
+#include "linux/hrtimer.h"
+#include "asm/irq.h"
+#include "asm/param.h"
+#include "asm/current.h"
+#include "kern_util.h"
+#include "user_util.h"
+#include "mode.h"
+#include "os.h"
+
+int hz(void)
+{
+       return(HZ);
+}
+
+/*
+ * Scheduler clock - returns current time in nanosec units.
+ */
+unsigned long long sched_clock(void)
+{
+       return (unsigned long long)jiffies_64 * (1000000000 / HZ);
+}
+
+/* Changed at early boot */
+int timer_irq_inited = 0;
+
+static unsigned long long prev_nsecs;
+#ifdef CONFIG_UML_REAL_TIME_CLOCK
+static long long delta;                /* Deviation per interval */
+#endif
+
+void timer_irq(union uml_pt_regs *regs)
+{
+       unsigned long long ticks = 0;
+
+#ifdef CONFIG_UML_REAL_TIME_CLOCK
+       if(prev_nsecs){
+               /* We've had 1 tick */
+               unsigned long long nsecs = os_nsecs();
+
+               delta += nsecs - prev_nsecs;
+               prev_nsecs = nsecs;
+
+               /* Protect against the host clock being set backwards */
+               if(delta < 0)
+                       delta = 0;
+
+               ticks += (delta * HZ) / BILLION;
+               delta -= (ticks * BILLION) / HZ;
+       }
+       else prev_nsecs = os_nsecs();
+#else
+       ticks = 1;
+#endif
+       while(ticks > 0){
+               do_IRQ(TIMER_IRQ, regs);
+               ticks--;
+       }
+}
+
+static DEFINE_SPINLOCK(timer_spinlock);
+
+static unsigned long long local_offset = 0;
+
+static inline unsigned long long get_time(void)
+{
+       unsigned long long nsecs;
+       unsigned long flags;
+
+       spin_lock_irqsave(&timer_spinlock, flags);
+       nsecs = os_nsecs();
+       nsecs += local_offset;
+       spin_unlock_irqrestore(&timer_spinlock, flags);
+
+       return nsecs;
+}
+
+irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs)
+{
+       unsigned long long nsecs;
+       unsigned long flags;
+
+       write_seqlock_irqsave(&xtime_lock, flags);
+
+       do_timer(regs);
+
+       nsecs = get_time() + local_offset;
+       xtime.tv_sec = nsecs / NSEC_PER_SEC;
+       xtime.tv_nsec = nsecs - xtime.tv_sec * NSEC_PER_SEC;
+
+       write_sequnlock_irqrestore(&xtime_lock, flags);
+
+       return IRQ_HANDLED;
+}
+
+static void register_timer(void)
+{
+       int err;
+
+       err = request_irq(TIMER_IRQ, um_timer, IRQF_DISABLED, "timer", NULL);
+       if(err != 0)
+               printk(KERN_ERR "timer_init : request_irq failed - "
+                      "errno = %d\n", -err);
+
+       timer_irq_inited = 1;
+
+       user_time_init();
+}
+
+extern void (*late_time_init)(void);
+
+void time_init(void)
+{
+       long long nsecs;
+
+       nsecs = os_nsecs();
+       set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION,
+                               -nsecs % BILLION);
+       late_time_init = register_timer;
+}
+
+void do_gettimeofday(struct timeval *tv)
+{
+       unsigned long long nsecs = get_time();
+
+       tv->tv_sec = nsecs / NSEC_PER_SEC;
+       /* Careful about calculations here - this was originally done as
+        * (nsecs - tv->tv_sec * NSEC_PER_SEC) / NSEC_PER_USEC
+        * which gave bogus (> 1000000) values.  Dunno why, suspect gcc
+        * (4.0.0) miscompiled it, or there's a subtle 64/32-bit conversion
+        * problem that I missed.
+        */
+       nsecs -= tv->tv_sec * NSEC_PER_SEC;
+       tv->tv_usec = (unsigned long) nsecs / NSEC_PER_USEC;
+}
+
+static inline void set_time(unsigned long long nsecs)
+{
+       unsigned long long now;
+       unsigned long flags;
+
+       spin_lock_irqsave(&timer_spinlock, flags);
+       now = os_nsecs();
+       local_offset = nsecs - now;
+       spin_unlock_irqrestore(&timer_spinlock, flags);
+
+       clock_was_set();
+}
+
+int do_settimeofday(struct timespec *tv)
+{
+       set_time((unsigned long long) tv->tv_sec * NSEC_PER_SEC + tv->tv_nsec);
+
+       return 0;
+}
+
+void timer_handler(int sig, union uml_pt_regs *regs)
+{
+       local_irq_disable();
+       irq_enter();
+       update_process_times(CHOOSE_MODE(
+                            (UPT_SC(regs) && user_context(UPT_SP(regs))),
+                            (regs)->skas.is_user));
+       irq_exit();
+       local_irq_enable();
+       if(current_thread->cpu == 0)
+               timer_irq(regs);
+}
diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c
deleted file mode 100644 (file)
index d7e044b..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include "linux/kernel.h"
-#include "linux/module.h"
-#include "linux/unistd.h"
-#include "linux/stddef.h"
-#include "linux/spinlock.h"
-#include "linux/time.h"
-#include "linux/sched.h"
-#include "linux/interrupt.h"
-#include "linux/init.h"
-#include "linux/delay.h"
-#include "linux/hrtimer.h"
-#include "asm/irq.h"
-#include "asm/param.h"
-#include "asm/current.h"
-#include "kern_util.h"
-#include "user_util.h"
-#include "mode.h"
-#include "os.h"
-
-int hz(void)
-{
-       return(HZ);
-}
-
-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies_64 * (1000000000 / HZ);
-}
-
-/* Changed at early boot */
-int timer_irq_inited = 0;
-
-static int first_tick;
-static unsigned long long prev_nsecs;
-#ifdef CONFIG_UML_REAL_TIME_CLOCK
-static long long delta;                /* Deviation per interval */
-#endif
-
-void timer_irq(union uml_pt_regs *regs)
-{
-       unsigned long long ticks = 0;
-
-       if(!timer_irq_inited){
-               /* This is to ensure that ticks don't pile up when
-                * the timer handler is suspended */
-               first_tick = 0;
-               return;
-       }
-
-       if(first_tick){
-#ifdef CONFIG_UML_REAL_TIME_CLOCK
-               /* We've had 1 tick */
-               unsigned long long nsecs = os_nsecs();
-
-               delta += nsecs - prev_nsecs;
-               prev_nsecs = nsecs;
-
-               /* Protect against the host clock being set backwards */
-               if(delta < 0)
-                       delta = 0;
-
-               ticks += (delta * HZ) / BILLION;
-               delta -= (ticks * BILLION) / HZ;
-#else
-               ticks = 1;
-#endif
-       }
-       else {
-               prev_nsecs = os_nsecs();
-               first_tick = 1;
-       }
-
-       while(ticks > 0){
-               do_IRQ(TIMER_IRQ, regs);
-               ticks--;
-       }
-}
-
-
-void time_init_kern(void)
-{
-       long long nsecs;
-
-       nsecs = os_nsecs();
-       set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION,
-                               -nsecs % BILLION);
-}
-
-void do_boot_timer_handler(struct sigcontext * sc)
-{
-       unsigned long flags;
-       struct pt_regs regs;
-
-       CHOOSE_MODE((void) (UPT_SC(&regs.regs) = sc),
-                   (void) (regs.regs.skas.is_user = 0));
-
-       write_seqlock_irqsave(&xtime_lock, flags);
-       do_timer(&regs);
-       write_sequnlock_irqrestore(&xtime_lock, flags);
-}
-
-static DEFINE_SPINLOCK(timer_spinlock);
-
-static unsigned long long local_offset = 0;
-
-static inline unsigned long long get_time(void)
-{
-       unsigned long long nsecs;
-       unsigned long flags;
-
-       spin_lock_irqsave(&timer_spinlock, flags);
-       nsecs = os_nsecs();
-       nsecs += local_offset;
-       spin_unlock_irqrestore(&timer_spinlock, flags);
-
-       return nsecs;
-}
-
-irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs)
-{
-       unsigned long long nsecs;
-       unsigned long flags;
-
-       write_seqlock_irqsave(&xtime_lock, flags);
-
-       do_timer(regs);
-
-       nsecs = get_time() + local_offset;
-       xtime.tv_sec = nsecs / NSEC_PER_SEC;
-       xtime.tv_nsec = nsecs - xtime.tv_sec * NSEC_PER_SEC;
-
-       write_sequnlock_irqrestore(&xtime_lock, flags);
-
-       return IRQ_HANDLED;
-}
-
-void do_gettimeofday(struct timeval *tv)
-{
-       unsigned long long nsecs = get_time();
-
-       tv->tv_sec = nsecs / NSEC_PER_SEC;
-       /* Careful about calculations here - this was originally done as
-        * (nsecs - tv->tv_sec * NSEC_PER_SEC) / NSEC_PER_USEC
-        * which gave bogus (> 1000000) values.  Dunno why, suspect gcc
-        * (4.0.0) miscompiled it, or there's a subtle 64/32-bit conversion
-        * problem that I missed.
-        */
-       nsecs -= tv->tv_sec * NSEC_PER_SEC;
-       tv->tv_usec = (unsigned long) nsecs / NSEC_PER_USEC;
-}
-
-static inline void set_time(unsigned long long nsecs)
-{
-       unsigned long long now;
-       unsigned long flags;
-
-       spin_lock_irqsave(&timer_spinlock, flags);
-       now = os_nsecs();
-       local_offset = nsecs - now;
-       spin_unlock_irqrestore(&timer_spinlock, flags);
-
-       clock_was_set();
-}
-
-int do_settimeofday(struct timespec *tv)
-{
-       set_time((unsigned long long) tv->tv_sec * NSEC_PER_SEC + tv->tv_nsec);
-
-       return 0;
-}
-
-void timer_handler(int sig, union uml_pt_regs *regs)
-{
-       local_irq_disable();
-       irq_enter();
-       update_process_times(CHOOSE_MODE(
-                            (UPT_SC(regs) && user_context(UPT_SP(regs))),
-                            (regs)->skas.is_user));
-       irq_exit();
-       local_irq_enable();
-       if(current_thread->cpu == 0)
-               timer_irq(regs);
-}
-
-int __init timer_init(void)
-{
-       int err;
-
-       user_time_init();
-       err = request_irq(TIMER_IRQ, um_timer, IRQF_DISABLED, "timer", NULL);
-       if(err != 0)
-               printk(KERN_ERR "timer_init : request_irq failed - "
-                      "errno = %d\n", -err);
-       timer_irq_inited = 1;
-       return(0);
-}
-
-arch_initcall(timer_init);
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c
new file mode 100644 (file)
index 0000000..ac70fa5
--- /dev/null
@@ -0,0 +1,251 @@
+/*
+ * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
+ * Licensed under the GPL
+ */
+
+#include "linux/kernel.h"
+#include "asm/errno.h"
+#include "linux/sched.h"
+#include "linux/mm.h"
+#include "linux/spinlock.h"
+#include "linux/config.h"
+#include "linux/init.h"
+#include "linux/ptrace.h"
+#include "asm/semaphore.h"
+#include "asm/pgtable.h"
+#include "asm/pgalloc.h"
+#include "asm/tlbflush.h"
+#include "asm/a.out.h"
+#include "asm/current.h"
+#include "asm/irq.h"
+#include "sysdep/sigcontext.h"
+#include "user_util.h"
+#include "kern_util.h"
+#include "kern.h"
+#include "chan_kern.h"
+#include "mconsole_kern.h"
+#include "mem.h"
+#include "mem_kern.h"
+#include "sysdep/sigcontext.h"
+#include "sysdep/ptrace.h"
+#include "os.h"
+#ifdef CONFIG_MODE_SKAS
+#include "skas.h"
+#endif
+#include "os.h"
+
+/* Note this is constrained to return 0, -EFAULT, -EACCESS, -ENOMEM by segv(). */
+int handle_page_fault(unsigned long address, unsigned long ip,
+                     int is_write, int is_user, int *code_out)
+{
+       struct mm_struct *mm = current->mm;
+       struct vm_area_struct *vma;
+       pgd_t *pgd;
+       pud_t *pud;
+       pmd_t *pmd;
+       pte_t *pte;
+       int err = -EFAULT;
+
+       *code_out = SEGV_MAPERR;
+
+       /* If the fault was during atomic operation, don't take the fault, just
+        * fail. */
+       if (in_atomic())
+               goto out_nosemaphore;
+
+       down_read(&mm->mmap_sem);
+       vma = find_vma(mm, address);
+       if(!vma)
+               goto out;
+       else if(vma->vm_start <= address)
+               goto good_area;
+       else if(!(vma->vm_flags & VM_GROWSDOWN))
+               goto out;
+       else if(is_user && !ARCH_IS_STACKGROW(address))
+               goto out;
+       else if(expand_stack(vma, address))
+               goto out;
+
+good_area:
+       *code_out = SEGV_ACCERR;
+       if(is_write && !(vma->vm_flags & VM_WRITE))
+               goto out;
+
+       /* Don't require VM_READ|VM_EXEC for write faults! */
+        if(!is_write && !(vma->vm_flags & (VM_READ | VM_EXEC)))
+                goto out;
+
+       do {
+survive:
+               switch (handle_mm_fault(mm, vma, address, is_write)){
+               case VM_FAULT_MINOR:
+                       current->min_flt++;
+                       break;
+               case VM_FAULT_MAJOR:
+                       current->maj_flt++;
+                       break;
+               case VM_FAULT_SIGBUS:
+                       err = -EACCES;
+                       goto out;
+               case VM_FAULT_OOM:
+                       err = -ENOMEM;
+                       goto out_of_memory;
+               default:
+                       BUG();
+               }
+               pgd = pgd_offset(mm, address);
+               pud = pud_offset(pgd, address);
+               pmd = pmd_offset(pud, address);
+               pte = pte_offset_kernel(pmd, address);
+       } while(!pte_present(*pte));
+       err = 0;
+       /* The below warning was added in place of
+        *      pte_mkyoung(); if (is_write) pte_mkdirty();
+        * If it's triggered, we'd see normally a hang here (a clean pte is
+        * marked read-only to emulate the dirty bit).
+        * However, the generic code can mark a PTE writable but clean on a
+        * concurrent read fault, triggering this harmlessly. So comment it out.
+        */
+#if 0
+       WARN_ON(!pte_young(*pte) || (is_write && !pte_dirty(*pte)));
+#endif
+       flush_tlb_page(vma, address);
+out:
+       up_read(&mm->mmap_sem);
+out_nosemaphore:
+       return(err);
+
+/*
+ * We ran out of memory, or some other thing happened to us that made
+ * us unable to handle the page fault gracefully.
+ */
+out_of_memory:
+       if (current->pid == 1) {
+               up_read(&mm->mmap_sem);
+               yield();
+               down_read(&mm->mmap_sem);
+               goto survive;
+       }
+       goto out;
+}
+
+void segv_handler(int sig, union uml_pt_regs *regs)
+{
+       struct faultinfo * fi = UPT_FAULTINFO(regs);
+
+       if(UPT_IS_USER(regs) && !SEGV_IS_FIXABLE(fi)){
+               bad_segv(*fi, UPT_IP(regs));
+               return;
+       }
+       segv(*fi, UPT_IP(regs), UPT_IS_USER(regs), regs);
+}
+
+struct kern_handlers handlinfo_kern = {
+       .relay_signal = relay_signal,
+       .winch = winch,
+       .bus_handler = relay_signal,
+       .page_fault = segv_handler,
+       .sigio_handler = sigio_handler,
+       .timer_handler = timer_handler
+};
+/*
+ * We give a *copy* of the faultinfo in the regs to segv.
+ * This must be done, since nesting SEGVs could overwrite
+ * the info in the regs. A pointer to the info then would
+ * give us bad data!
+ */
+unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, void *sc)
+{
+       struct siginfo si;
+       void *catcher;
+       int err;
+        int is_write = FAULT_WRITE(fi);
+        unsigned long address = FAULT_ADDRESS(fi);
+
+        if(!is_user && (address >= start_vm) && (address < end_vm)){
+                flush_tlb_kernel_vm();
+                return(0);
+        }
+       else if(current->mm == NULL)
+               panic("Segfault with no mm");
+
+       if (SEGV_IS_FIXABLE(&fi) || SEGV_MAYBE_FIXABLE(&fi))
+               err = handle_page_fault(address, ip, is_write, is_user, &si.si_code);
+       else {
+               err = -EFAULT;
+               /* A thread accessed NULL, we get a fault, but CR2 is invalid.
+                * This code is used in __do_copy_from_user() of TT mode. */
+               address = 0;
+       }
+
+       catcher = current->thread.fault_catcher;
+       if(!err)
+               return(0);
+       else if(catcher != NULL){
+               current->thread.fault_addr = (void *) address;
+               do_longjmp(catcher, 1);
+       }
+       else if(current->thread.fault_addr != NULL)
+               panic("fault_addr set but no fault catcher");
+        else if(!is_user && arch_fixup(ip, sc))
+               return(0);
+
+       if(!is_user)
+               panic("Kernel mode fault at addr 0x%lx, ip 0x%lx",
+                     address, ip);
+
+       if (err == -EACCES) {
+               si.si_signo = SIGBUS;
+               si.si_errno = 0;
+               si.si_code = BUS_ADRERR;
+               si.si_addr = (void __user *)address;
+                current->thread.arch.faultinfo = fi;
+               force_sig_info(SIGBUS, &si, current);
+       } else if (err == -ENOMEM) {
+               printk("VM: killing process %s\n", current->comm);
+               do_exit(SIGKILL);
+       } else {
+               BUG_ON(err != -EFAULT);
+               si.si_signo = SIGSEGV;
+               si.si_addr = (void __user *) address;
+                current->thread.arch.faultinfo = fi;
+               force_sig_info(SIGSEGV, &si, current);
+       }
+       return(0);
+}
+
+void bad_segv(struct faultinfo fi, unsigned long ip)
+{
+       struct siginfo si;
+
+       si.si_signo = SIGSEGV;
+       si.si_code = SEGV_ACCERR;
+       si.si_addr = (void __user *) FAULT_ADDRESS(fi);
+       current->thread.arch.faultinfo = fi;
+       force_sig_info(SIGSEGV, &si, current);
+}
+
+void relay_signal(int sig, union uml_pt_regs *regs)
+{
+       if(arch_handle_signal(sig, regs)) return;
+       if(!UPT_IS_USER(regs))
+               panic("Kernel mode signal %d", sig);
+        current->thread.arch.faultinfo = *UPT_FAULTINFO(regs);
+       force_sig(sig, current);
+}
+
+void bus_handler(int sig, union uml_pt_regs *regs)
+{
+       if(current->thread.fault_catcher != NULL)
+               do_longjmp(current->thread.fault_catcher, 1);
+       else relay_signal(sig, regs);
+}
+
+void winch(int sig, union uml_pt_regs *regs)
+{
+       do_IRQ(WINCH_IRQ, regs);
+}
+
+void trap_init(void)
+{
+}
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c
deleted file mode 100644 (file)
index 02f6d4d..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include "linux/kernel.h"
-#include "asm/errno.h"
-#include "linux/sched.h"
-#include "linux/mm.h"
-#include "linux/spinlock.h"
-#include "linux/config.h"
-#include "linux/init.h"
-#include "linux/ptrace.h"
-#include "asm/semaphore.h"
-#include "asm/pgtable.h"
-#include "asm/pgalloc.h"
-#include "asm/tlbflush.h"
-#include "asm/a.out.h"
-#include "asm/current.h"
-#include "asm/irq.h"
-#include "sysdep/sigcontext.h"
-#include "user_util.h"
-#include "kern_util.h"
-#include "kern.h"
-#include "chan_kern.h"
-#include "mconsole_kern.h"
-#include "mem.h"
-#include "mem_kern.h"
-#include "sysdep/sigcontext.h"
-#include "sysdep/ptrace.h"
-#include "os.h"
-#ifdef CONFIG_MODE_SKAS
-#include "skas.h"
-#endif
-#include "os.h"
-
-/* Note this is constrained to return 0, -EFAULT, -EACCESS, -ENOMEM by segv(). */
-int handle_page_fault(unsigned long address, unsigned long ip, 
-                     int is_write, int is_user, int *code_out)
-{
-       struct mm_struct *mm = current->mm;
-       struct vm_area_struct *vma;
-       pgd_t *pgd;
-       pud_t *pud;
-       pmd_t *pmd;
-       pte_t *pte;
-       int err = -EFAULT;
-
-       *code_out = SEGV_MAPERR;
-
-       /* If the fault was during atomic operation, don't take the fault, just
-        * fail. */
-       if (in_atomic())
-               goto out_nosemaphore;
-
-       down_read(&mm->mmap_sem);
-       vma = find_vma(mm, address);
-       if(!vma) 
-               goto out;
-       else if(vma->vm_start <= address) 
-               goto good_area;
-       else if(!(vma->vm_flags & VM_GROWSDOWN)) 
-               goto out;
-       else if(is_user && !ARCH_IS_STACKGROW(address))
-               goto out;
-       else if(expand_stack(vma, address)) 
-               goto out;
-
-good_area:
-       *code_out = SEGV_ACCERR;
-       if(is_write && !(vma->vm_flags & VM_WRITE)) 
-               goto out;
-
-       /* Don't require VM_READ|VM_EXEC for write faults! */
-        if(!is_write && !(vma->vm_flags & (VM_READ | VM_EXEC)))
-                goto out;
-
-       do {
-survive:
-               switch (handle_mm_fault(mm, vma, address, is_write)){
-               case VM_FAULT_MINOR:
-                       current->min_flt++;
-                       break;
-               case VM_FAULT_MAJOR:
-                       current->maj_flt++;
-                       break;
-               case VM_FAULT_SIGBUS:
-                       err = -EACCES;
-                       goto out;
-               case VM_FAULT_OOM:
-                       err = -ENOMEM;
-                       goto out_of_memory;
-               default:
-                       BUG();
-               }
-               pgd = pgd_offset(mm, address);
-               pud = pud_offset(pgd, address);
-               pmd = pmd_offset(pud, address);
-               pte = pte_offset_kernel(pmd, address);
-       } while(!pte_present(*pte));
-       err = 0;
-       /* The below warning was added in place of
-        *      pte_mkyoung(); if (is_write) pte_mkdirty();
-        * If it's triggered, we'd see normally a hang here (a clean pte is
-        * marked read-only to emulate the dirty bit).
-        * However, the generic code can mark a PTE writable but clean on a
-        * concurrent read fault, triggering this harmlessly. So comment it out.
-        */
-#if 0
-       WARN_ON(!pte_young(*pte) || (is_write && !pte_dirty(*pte)));
-#endif
-       flush_tlb_page(vma, address);
-out:
-       up_read(&mm->mmap_sem);
-out_nosemaphore:
-       return(err);
-
-/*
- * We ran out of memory, or some other thing happened to us that made
- * us unable to handle the page fault gracefully.
- */
-out_of_memory:
-       if (current->pid == 1) {
-               up_read(&mm->mmap_sem);
-               yield();
-               down_read(&mm->mmap_sem);
-               goto survive;
-       }
-       goto out;
-}
-
-void segv_handler(int sig, union uml_pt_regs *regs)
-{
-       struct faultinfo * fi = UPT_FAULTINFO(regs);
-
-       if(UPT_IS_USER(regs) && !SEGV_IS_FIXABLE(fi)){
-               bad_segv(*fi, UPT_IP(regs));
-               return;
-       }
-       segv(*fi, UPT_IP(regs), UPT_IS_USER(regs), regs);
-}
-
-struct kern_handlers handlinfo_kern = {
-       .relay_signal = relay_signal,
-       .winch = winch,
-       .bus_handler = relay_signal,
-       .page_fault = segv_handler,
-       .sigio_handler = sigio_handler,
-       .timer_handler = timer_handler
-};
-/*
- * We give a *copy* of the faultinfo in the regs to segv.
- * This must be done, since nesting SEGVs could overwrite
- * the info in the regs. A pointer to the info then would
- * give us bad data!
- */
-unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, void *sc)
-{
-       struct siginfo si;
-       void *catcher;
-       int err;
-        int is_write = FAULT_WRITE(fi);
-        unsigned long address = FAULT_ADDRESS(fi);
-
-        if(!is_user && (address >= start_vm) && (address < end_vm)){
-                flush_tlb_kernel_vm();
-                return(0);
-        }
-       else if(current->mm == NULL)
-               panic("Segfault with no mm");
-
-       if (SEGV_IS_FIXABLE(&fi) || SEGV_MAYBE_FIXABLE(&fi))
-               err = handle_page_fault(address, ip, is_write, is_user, &si.si_code);
-       else {
-               err = -EFAULT;
-               /* A thread accessed NULL, we get a fault, but CR2 is invalid.
-                * This code is used in __do_copy_from_user() of TT mode. */
-               address = 0;
-       }
-
-       catcher = current->thread.fault_catcher;
-       if(!err)
-               return(0);
-       else if(catcher != NULL){
-               current->thread.fault_addr = (void *) address;
-               do_longjmp(catcher, 1);
-       } 
-       else if(current->thread.fault_addr != NULL)
-               panic("fault_addr set but no fault catcher");
-        else if(!is_user && arch_fixup(ip, sc))
-               return(0);
-
-       if(!is_user) 
-               panic("Kernel mode fault at addr 0x%lx, ip 0x%lx", 
-                     address, ip);
-
-       if (err == -EACCES) {
-               si.si_signo = SIGBUS;
-               si.si_errno = 0;
-               si.si_code = BUS_ADRERR;
-               si.si_addr = (void __user *)address;
-                current->thread.arch.faultinfo = fi;
-               force_sig_info(SIGBUS, &si, current);
-       } else if (err == -ENOMEM) {
-               printk("VM: killing process %s\n", current->comm);
-               do_exit(SIGKILL);
-       } else {
-               BUG_ON(err != -EFAULT);
-               si.si_signo = SIGSEGV;
-               si.si_addr = (void __user *) address;
-                current->thread.arch.faultinfo = fi;
-               force_sig_info(SIGSEGV, &si, current);
-       }
-       return(0);
-}
-
-void bad_segv(struct faultinfo fi, unsigned long ip)
-{
-       struct siginfo si;
-
-       si.si_signo = SIGSEGV;
-       si.si_code = SEGV_ACCERR;
-       si.si_addr = (void __user *) FAULT_ADDRESS(fi);
-       current->thread.arch.faultinfo = fi;
-       force_sig_info(SIGSEGV, &si, current);
-}
-
-void relay_signal(int sig, union uml_pt_regs *regs)
-{
-       if(arch_handle_signal(sig, regs)) return;
-       if(!UPT_IS_USER(regs))
-               panic("Kernel mode signal %d", sig);
-        current->thread.arch.faultinfo = *UPT_FAULTINFO(regs);
-       force_sig(sig, current);
-}
-
-void bus_handler(int sig, union uml_pt_regs *regs)
-{
-       if(current->thread.fault_catcher != NULL)
-               do_longjmp(current->thread.fault_catcher, 1);
-       else relay_signal(sig, regs);
-}
-
-void winch(int sig, union uml_pt_regs *regs)
-{
-       do_IRQ(WINCH_IRQ, regs);
-}
-
-void trap_init(void)
-{
-}
index 5c1e4cc1c0493aa85bd86e7e1bc41dff1ea2c086..ad66df17d9d75b8a22bd147b8fac97286ccd16f9 100644 (file)
@@ -21,7 +21,7 @@
 static int exec_tramp(void *sig_stack)
 {
        init_new_thread_stack(sig_stack, NULL);
-       init_new_thread_signals(1);
+       init_new_thread_signals();
        os_stop_process(os_getpid());
        return(0);
 }
index bcb8796c3cb15386e03d424109807ac1bca31e1e..84a23b14f770b308dca9b06a982dc264706af5a9 100644 (file)
@@ -24,22 +24,13 @@ void before_mem_tt(unsigned long brk_start)
 #define SIZE ((CONFIG_NEST_LEVEL + CONFIG_KERNEL_HALF_GIGS) * 0x20000000)
 #define START (CONFIG_TOP_ADDR - SIZE)
 
-unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out, 
-                               unsigned long *task_size_out)
+unsigned long set_task_sizes_tt(unsigned long *task_size_out)
 {
+       unsigned long host_task_size;
+
        /* Round up to the nearest 4M */
-       *host_size_out = ROUND_4M((unsigned long) &arg);
+       host_task_size = ROUND_4M((unsigned long) &host_task_size);
        *task_size_out = START;
-       return(START);
-}
 
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
+       return host_task_size;
+}
index 8368c2dbe635c7727fe4578a8c804d5057541121..1e86f0bfef72b3368eacf491db28166293051bcb 100644 (file)
@@ -142,7 +142,7 @@ static void new_thread_handler(int sig)
                schedule_tail(current->thread.prev_sched);
        current->thread.prev_sched = NULL;
 
-       init_new_thread_signals(1);
+       init_new_thread_signals();
        enable_timer();
        free_page(current->thread.temp_stack);
        set_cmdline("(kernel thread)");
index 3fda9a03c59aa5d0d767df04fe542d488e811171..293caa6d0c2dd7bc84e839d57ed214d12a83994b 100644 (file)
@@ -21,18 +21,11 @@ void syscall_handler_tt(int sig, struct pt_regs *regs)
        void *sc;
        long result;
        int syscall;
-#ifdef CONFIG_SYSCALL_DEBUG
-       int index;
-#endif
+
        sc = UPT_SC(&regs->regs);
        SC_START_SYSCALL(sc);
 
        syscall = UPT_SYSCALL_NR(&regs->regs);
-
-#ifdef CONFIG_SYSCALL_DEBUG
-       index = record_syscall_start(syscall);
-#endif
-
        syscall_trace(&regs->regs, 0);
 
        current->thread.nsyscalls++;
@@ -50,7 +43,4 @@ void syscall_handler_tt(int sig, struct pt_regs *regs)
        SC_SET_SYSCALL_RETURN(sc, result);
 
        syscall_trace(&regs->regs, 1);
-#ifdef CONFIG_SYSCALL_DEBUG
-       record_syscall_end(index, result);
-#endif
 }
index 71daae24e48a8b8125b203fafc74ee40ea39c81d..9882342206ecf7a1a78a4661e530b3511af39ee2 100644 (file)
@@ -188,10 +188,7 @@ int tracer(int (*init_proc)(void *), void *sp)
        int status, pid = 0, sig = 0, cont_type, tracing = 0, op = 0;
        int proc_id = 0, n, err, old_tracing = 0, strace = 0;
        int local_using_sysemu = 0;
-#ifdef UML_CONFIG_SYSCALL_DEBUG
-       unsigned long eip = 0;
-       int last_index;
-#endif
+
        signal(SIGPIPE, SIG_IGN);
        setup_tracer_winch();
        tracing_pid = os_getpid();
@@ -282,23 +279,6 @@ int tracer(int (*init_proc)(void *), void *sp)
                else if(WIFSTOPPED(status)){
                        proc_id = pid_to_processor_id(pid);
                        sig = WSTOPSIG(status);
-#ifdef UML_CONFIG_SYSCALL_DEBUG
-                       if(signal_index[proc_id] == 1024){
-                               signal_index[proc_id] = 0;
-                               last_index = 1023;
-                       }
-                       else last_index = signal_index[proc_id] - 1;
-                       if(((sig == SIGPROF) || (sig == SIGVTALRM) ||
-                           (sig == SIGALRM)) &&
-                          (signal_record[proc_id][last_index].signal == sig)&&
-                          (signal_record[proc_id][last_index].pid == pid))
-                               signal_index[proc_id] = last_index;
-                       signal_record[proc_id][signal_index[proc_id]].pid = pid;
-                       gettimeofday(&signal_record[proc_id][signal_index[proc_id]].time, NULL);
-                       eip = ptrace(PTRACE_PEEKUSR, pid, PT_IP_OFFSET, 0);
-                       signal_record[proc_id][signal_index[proc_id]].addr = eip;
-                       signal_record[proc_id][signal_index[proc_id]++].signal = sig;
-#endif
                        if(proc_id == -1){
                                sleeping_process_signal(pid, sig);
                                continue;
index 37cfe7701f063a96c60d86126c96c07dec306fa8..7896cf98232df1a06c6593957e24597b8dbb7e04 100644 (file)
@@ -330,6 +330,8 @@ EXPORT_SYMBOL(end_iomem);
 
 #define MIN_VMALLOC (32 * 1024 * 1024)
 
+extern char __binary_start;
+
 int linux_main(int argc, char **argv)
 {
        unsigned long avail, diff;
@@ -374,8 +376,9 @@ int linux_main(int argc, char **argv)
 
        printf("UML running in %s mode\n", mode);
 
-       uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0,
-                                    &host_task_size, &task_size);
+       uml_start = (unsigned long) &__binary_start;
+       host_task_size = CHOOSE_MODE_PROC(set_task_sizes_tt,
+                                         set_task_sizes_skas, &task_size);
 
        /*
         * Setting up handlers to 'sig_info' struct
@@ -395,7 +398,7 @@ int linux_main(int argc, char **argv)
                physmem_size += UML_ROUND_UP(brk_start) - UML_ROUND_UP(&_end);
        }
 
-       uml_physmem = uml_start;
+       uml_physmem = uml_start & PAGE_MASK;
 
        /* Reserve up to 4M after the current brk */
        uml_reserved = ROUND_4M(brk_start) + (1 << 22);
index af11915ce0a8ca5155dad601c853b138f250277a..8eca47a6ff082f171d76777ebb46d2601c282dcf 100644 (file)
@@ -7,13 +7,16 @@ jiffies = jiffies_64;
 
 SECTIONS
 {
-  /*This must contain the right address - not quite the default ELF one.*/
+  /* This must contain the right address - not quite the default ELF one.*/
   PROVIDE (__executable_start = START);
-  . = START + SIZEOF_HEADERS;
+  /* Static binaries stick stuff here, like the sigreturn trampoline,
+   * invisibly to objdump.  So, just make __binary_start equal to the very
+   * beginning of the executable, and if there are unmapped pages after this,
+   * they are forever unusable.
+   */
+  __binary_start = START;
 
-  /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
-   * is remapped.*/
-  __binary_start = .;
+  . = START + SIZEOF_HEADERS;
 
 #ifdef MODE_TT
   .remap_data : { UNMAP_PATH (.data .bss) }
index 72acdce205e0a3eff5d6ae6cdbdd73a20c22a952..f8aeb448aab62ba76584f9c0e497e1897e490c6b 100644 (file)
@@ -1,5 +1,3 @@
-/* in case the preprocessor is a 32bit one */
-#undef i386
 #ifdef CONFIG_LD_SCRIPT_STATIC
 #include "uml.lds.S"
 #else
index 09251338d99ec969731afd73ddaaabb403d46fa0..189fa677085a7880d9d8c7bdbcd4593de04a3ea1 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
  * Licensed under the GPL
  */
@@ -18,6 +18,7 @@
 #include "os.h"
 #include "user.h"
 #include "kern_util.h"
+#include "user_util.h"
 
 static void copy_stat(struct uml_stat *dst, struct stat64 *src)
 {
@@ -42,16 +43,13 @@ int os_stat_fd(const int fd, struct uml_stat *ubuf)
        struct stat64 sbuf;
        int err;
 
-       do {
-               err = fstat64(fd, &sbuf);
-       } while((err < 0) && (errno == EINTR)) ;
-
+       CATCH_EINTR(err = fstat64(fd, &sbuf));
        if(err < 0)
-               return(-errno);
+               return -errno;
 
        if(ubuf != NULL)
                copy_stat(ubuf, &sbuf);
-       return(err);
+       return err;
 }
 
 int os_stat_file(const char *file_name, struct uml_stat *ubuf)
@@ -64,11 +62,11 @@ int os_stat_file(const char *file_name, struct uml_stat *ubuf)
        } while((err < 0) && (errno == EINTR)) ;
 
        if(err < 0)
-               return(-errno);
+               return -errno;
 
        if(ubuf != NULL)
                copy_stat(ubuf, &sbuf);
-       return(err);
+       return err;
 }
 
 int os_access(const char* file, int mode)
@@ -80,9 +78,9 @@ int os_access(const char* file, int mode)
 
        err = access(file, amode);
        if(err < 0)
-               return(-errno);
+               return -errno;
 
-       return(0);
+       return 0;
 }
 
 void os_print_error(int error, const char* str)
@@ -99,9 +97,9 @@ int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg)
 
        err = ioctl(fd, cmd, arg);
        if(err < 0)
-               return(-errno);
+               return -errno;
 
-       return(err);
+       return err;
 }
 
 int os_window_size(int fd, int *rows, int *cols)
@@ -109,12 +107,12 @@ int os_window_size(int fd, int *rows, int *cols)
        struct winsize size;
 
        if(ioctl(fd, TIOCGWINSZ, &size) < 0)
-               return(-errno);
+               return -errno;
 
        *rows = size.ws_row;
        *cols = size.ws_col;
 
-       return(0);
+       return 0;
 }
 
 int os_new_tty_pgrp(int fd, int pid)
@@ -125,16 +123,16 @@ int os_new_tty_pgrp(int fd, int pid)
        if(tcsetpgrp(fd, pid) < 0)
                return -errno;
 
-       return(0);
+       return 0;
 }
 
 /* FIXME: ensure namebuf in os_get_if_name is big enough */
 int os_get_ifname(int fd, char* namebuf)
 {
        if(ioctl(fd, SIOCGIFNAME, namebuf) < 0)
-               return(-errno);
+               return -errno;
 
-       return(0);
+       return 0;
 }
 
 int os_set_slip(int fd)
@@ -149,7 +147,7 @@ int os_set_slip(int fd)
        if(ioctl(fd, SIOCSIFENCAP, &sencap) < 0)
                return -errno;
 
-       return(0);
+       return 0;
 }
 
 int os_set_owner(int fd, int pid)
@@ -158,10 +156,10 @@ int os_set_owner(int fd, int pid)
                int save_errno = errno;
 
                if(fcntl(fd, F_GETOWN, 0) != pid)
-                       return(-save_errno);
+                       return -save_errno;
        }
 
-       return(0);
+       return 0;
 }
 
 /* FIXME? moved wholesale from sigio_user.c to get fcntls out of that file */
@@ -192,9 +190,9 @@ int os_mode_fd(int fd, int mode)
        } while((err < 0) && (errno==EINTR)) ;
 
        if(err < 0)
-               return(-errno);
+               return -errno;
 
-       return(0);
+       return 0;
 }
 
 int os_file_type(char *file)
@@ -204,15 +202,21 @@ int os_file_type(char *file)
 
        err = os_stat_file(file, &buf);
        if(err < 0)
-               return(err);
+               return err;
 
-       if(S_ISDIR(buf.ust_mode)) return(OS_TYPE_DIR);
-       else if(S_ISLNK(buf.ust_mode)) return(OS_TYPE_SYMLINK);
-       else if(S_ISCHR(buf.ust_mode)) return(OS_TYPE_CHARDEV);
-       else if(S_ISBLK(buf.ust_mode)) return(OS_TYPE_BLOCKDEV);
-       else if(S_ISFIFO(buf.ust_mode)) return(OS_TYPE_FIFO);
-       else if(S_ISSOCK(buf.ust_mode)) return(OS_TYPE_SOCK);
-       else return(OS_TYPE_FILE);
+       if(S_ISDIR(buf.ust_mode))
+               return OS_TYPE_DIR;
+       else if(S_ISLNK(buf.ust_mode))
+               return OS_TYPE_SYMLINK;
+       else if(S_ISCHR(buf.ust_mode))
+               return OS_TYPE_CHARDEV;
+       else if(S_ISBLK(buf.ust_mode))
+               return OS_TYPE_BLOCKDEV;
+       else if(S_ISFIFO(buf.ust_mode))
+               return OS_TYPE_FIFO;
+       else if(S_ISSOCK(buf.ust_mode))
+               return OS_TYPE_SOCK;
+       else return OS_TYPE_FILE;
 }
 
 int os_file_mode(char *file, struct openflags *mode_out)
@@ -302,8 +306,8 @@ int os_seek_file(int fd, __u64 offset)
 
        actual = lseek64(fd, offset, SEEK_SET);
        if(actual != offset)
-               return(-errno);
-       return(0);
+               return -errno;
+       return 0;
 }
 
 static int fault_buffer(void *start, int len,
@@ -314,13 +318,13 @@ static int fault_buffer(void *start, int len,
 
        for(i = 0; i < len; i += page){
                if((*copy_proc)(start + i, &c, sizeof(c)))
-                       return(-EFAULT);
+                       return -EFAULT;
        }
        if((len % page) != 0){
                if((*copy_proc)(start + len - 1, &c, sizeof(c)))
-                       return(-EFAULT);
+                       return -EFAULT;
        }
-       return(0);
+       return 0;
 }
 
 static int file_io(int fd, void *buf, int len,
@@ -334,26 +338,26 @@ static int file_io(int fd, void *buf, int len,
                if((n < 0) && (errno == EFAULT)){
                        err = fault_buffer(buf, len, copy_user_proc);
                        if(err)
-                               return(err);
+                               return err;
                        n = (*io_proc)(fd, buf, len);
                }
        } while((n < 0) && (errno == EINTR));
 
        if(n < 0)
-               return(-errno);
-       return(n);
+               return -errno;
+       return n;
 }
 
 int os_read_file(int fd, void *buf, int len)
 {
-       return(file_io(fd, buf, len, (int (*)(int, void *, int)) read,
-                      copy_from_user_proc));
+       return file_io(fd, buf, len, (int (*)(int, void *, int)) read,
+                      copy_from_user_proc);
 }
 
 int os_write_file(int fd, const void *buf, int len)
 {
-       return(file_io(fd, (void *) buf, len,
-                      (int (*)(int, void *, int)) write, copy_to_user_proc));
+       return file_io(fd, (void *) buf, len,
+                      (int (*)(int, void *, int)) write, copy_to_user_proc);
 }
 
 int os_file_size(char *file, unsigned long long *size_out)
@@ -398,11 +402,11 @@ int os_file_modtime(char *file, unsigned long *modtime)
        err = os_stat_file(file, &buf);
        if(err < 0){
                printk("Couldn't stat \"%s\" : err = %d\n", file, -err);
-               return(err);
+               return err;
        }
 
        *modtime = buf.ust_mtime;
-       return(0);
+       return 0;
 }
 
 int os_get_exec_close(int fd, int* close_on_exec)
@@ -455,7 +459,7 @@ int os_pipe(int *fds, int stream, int close_on_exec)
        if(err < 0)
                goto error;
 
-       return(0);
+       return 0;
 
  error:
        printk("os_pipe : Setting FD_CLOEXEC failed, err = %d\n", -err);
@@ -486,12 +490,12 @@ int os_set_fd_async(int fd, int owner)
           (fcntl(fd, F_SETOWN, owner) < 0)){
                err = -errno;
                printk("os_set_fd_async : Failed to fcntl F_SETOWN "
-                      "(or F_SETSIG) fd %d to pid %d, errno = %d\n", fd, 
+                      "(or F_SETSIG) fd %d to pid %d, errno = %d\n", fd,
                       owner, errno);
                return err;
        }
 
-       return(0);
+       return 0;
 }
 
 int os_clear_fd_async(int fd)
@@ -500,8 +504,8 @@ int os_clear_fd_async(int fd)
 
        flags &= ~(O_ASYNC | O_NONBLOCK);
        if(fcntl(fd, F_SETFL, flags) < 0)
-               return(-errno);
-       return(0);
+               return -errno;
+       return 0;
 }
 
 int os_set_fd_block(int fd, int blocking)
@@ -516,7 +520,7 @@ int os_set_fd_block(int fd, int blocking)
        if(fcntl(fd, F_SETFL, flags) < 0)
                return -errno;
 
-       return(0);
+       return 0;
 }
 
 int os_accept_connection(int fd)
@@ -524,9 +528,9 @@ int os_accept_connection(int fd)
        int new;
 
        new = accept(fd, NULL, 0);
-       if(new < 0) 
-               return(-errno);
-       return(new);
+       if(new < 0)
+               return -errno;
+       return new;
 }
 
 #ifndef SHUT_RD
@@ -550,12 +554,12 @@ int os_shutdown_socket(int fd, int r, int w)
        else if(w) what = SHUT_WR;
        else {
                printk("os_shutdown_socket : neither r or w was set\n");
-               return(-EINVAL);
+               return -EINVAL;
        }
        err = shutdown(fd, what);
        if(err < 0)
-               return(-errno);
-       return(0);
+               return -errno;
+       return 0;
 }
 
 int os_rcv_fd(int fd, int *helper_pid_out)
@@ -578,7 +582,7 @@ int os_rcv_fd(int fd, int *helper_pid_out)
 
        n = recvmsg(fd, &msg, 0);
        if(n < 0)
-               return(-errno);
+               return -errno;
 
        else if(n != sizeof(iov.iov_len))
                *helper_pid_out = -1;
@@ -586,16 +590,16 @@ int os_rcv_fd(int fd, int *helper_pid_out)
        cmsg = CMSG_FIRSTHDR(&msg);
        if(cmsg == NULL){
                printk("rcv_fd didn't receive anything, error = %d\n", errno);
-               return(-1);
+               return -1;
        }
-       if((cmsg->cmsg_level != SOL_SOCKET) || 
+       if((cmsg->cmsg_level != SOL_SOCKET) ||
           (cmsg->cmsg_type != SCM_RIGHTS)){
                printk("rcv_fd didn't receive a descriptor\n");
-               return(-1);
+               return -1;
        }
 
        new = ((int *) CMSG_DATA(cmsg))[0];
-       return(new);
+       return new;
 }
 
 int os_create_unix_socket(char *file, int len, int close_on_exec)
@@ -623,7 +627,7 @@ int os_create_unix_socket(char *file, int len, int close_on_exec)
        if(err < 0)
                return -errno;
 
-       return(sock);
+       return sock;
 }
 
 void os_flush_stdout(void)
@@ -654,16 +658,5 @@ int os_lock_file(int fd, int excl)
        printk("F_SETLK failed, file already locked by pid %d\n", lock.l_pid);
        err = save;
  out:
-       return(err);
+       return err;
 }
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 3788d4568d3329008aa6706d3dce3acc5eb81b4f..7555bf9c33d90670bf11deaf2046e034e4ef882f 100644 (file)
@@ -52,11 +52,6 @@ int os_waiting_for_events(struct irq_fd *active_fds)
        return n;
 }
 
-int os_isatty(int fd)
-{
-       return isatty(fd);
-}
-
 int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds)
 {
        if (pollfds_num == pollfds_size) {
@@ -142,17 +137,14 @@ void os_set_ioignore(void)
 
 void init_irq_signals(int on_sigstack)
 {
-       __sighandler_t h;
        int flags;
 
        flags = on_sigstack ? SA_ONSTACK : 0;
-       if (timer_irq_inited)
-               h = (__sighandler_t)alarm_handler;
-       else
-               h = boot_timer_handler;
 
-       set_handler(SIGVTALRM, h, flags | SA_RESTART,
-                   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1);
+       set_handler(SIGVTALRM, (__sighandler_t) alarm_handler,
+                   flags | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1);
+       set_handler(SIGALRM, (__sighandler_t) alarm_handler,
+                   flags | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1);
        set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART,
                    SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
        signal(SIGWINCH, SIG_IGN);
index 233be2f4f8cb96726f270d47e23da0a35a7658c0..b98d3ca2cd1bdb5dba29e45aa6682c729f3425fc 100644 (file)
@@ -250,36 +250,35 @@ void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int))
        if(usr1_handler) set_handler(SIGUSR1, usr1_handler, flags, -1);
 }
 
-void init_new_thread_signals(int altstack)
+void init_new_thread_signals(void)
 {
-       int flags = altstack ? SA_ONSTACK : 0;
-
-       set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags,
+       set_handler(SIGSEGV, (__sighandler_t) sig_handler, SA_ONSTACK,
                    SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
-       set_handler(SIGTRAP, (__sighandler_t) sig_handler, flags,
+       set_handler(SIGTRAP, (__sighandler_t) sig_handler, SA_ONSTACK,
                    SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
-       set_handler(SIGFPE, (__sighandler_t) sig_handler, flags,
+       set_handler(SIGFPE, (__sighandler_t) sig_handler, SA_ONSTACK,
                    SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
-       set_handler(SIGILL, (__sighandler_t) sig_handler, flags,
+       set_handler(SIGILL, (__sighandler_t) sig_handler, SA_ONSTACK,
                    SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
-       set_handler(SIGBUS, (__sighandler_t) sig_handler, flags,
+       set_handler(SIGBUS, (__sighandler_t) sig_handler, SA_ONSTACK,
                    SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
        set_handler(SIGUSR2, (__sighandler_t) sig_handler,
-                   flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+                   SA_ONSTACK, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM,
+                   -1);
        signal(SIGHUP, SIG_IGN);
 
-       init_irq_signals(altstack);
+       init_irq_signals(1);
 }
 
 int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr)
 {
        jmp_buf buf;
-       int n, enable;
+       int n;
 
        *jmp_ptr = &buf;
-       n = UML_SETJMP(&buf, enable);
+       n = UML_SETJMP(&buf);
        if(n != 0)
-               return(n);
+               return n;
        (*fn)(arg);
-       return(0);
+       return 0;
 }
index 00e9388e947af4fa59442a3fdad627a82b7384e2..0ecac563c7b32fccc6cb58ba734b3d794f18b1ab 100644 (file)
@@ -43,13 +43,13 @@ struct pollfds {
 /* Protected by sigio_lock().  Used by the sigio thread, but the UML thread
  * synchronizes with it.
  */
-struct pollfds current_poll = {
+static struct pollfds current_poll = {
        .poll           = NULL,
        .size           = 0,
        .used           = 0
 };
 
-struct pollfds next_poll = {
+static struct pollfds next_poll = {
        .poll           = NULL,
        .size           = 0,
        .used           = 0
@@ -156,7 +156,7 @@ static void update_thread(void)
        set_signals(flags);
 }
 
-int add_sigio_fd(int fd, int read)
+static int add_sigio_fd(int fd, int read)
 {
        int err = 0, i, n, events;
 
@@ -191,6 +191,13 @@ int ignore_sigio_fd(int fd)
        struct pollfd *p;
        int err = 0, i, n = 0;
 
+       /* This is called from exitcalls elsewhere in UML - if
+        * sigio_cleanup has already run, then update_thread will hang
+        * or fail because the thread is no longer running.
+        */
+       if(write_sigio_pid == -1)
+               return -EIO;
+
        sigio_lock();
        for(i = 0; i < current_poll.used; i++){
                if(current_poll.poll[i].fd == fd) break;
@@ -215,7 +222,7 @@ int ignore_sigio_fd(int fd)
        update_thread();
  out:
        sigio_unlock();
-       return(err);
+       return err;
 }
 
 static struct pollfd *setup_initial_poll(int fd)
@@ -233,7 +240,7 @@ static struct pollfd *setup_initial_poll(int fd)
        return p;
 }
 
-void write_sigio_workaround(void)
+static void write_sigio_workaround(void)
 {
        unsigned long stack;
        struct pollfd *p;
@@ -314,10 +321,24 @@ out_close1:
        close(l_write_sigio_fds[1]);
 }
 
-void sigio_cleanup(void)
+void maybe_sigio_broken(int fd, int read)
+{
+       if(!isatty(fd))
+               return;
+
+       if((read || pty_output_sigio) && (!read || pty_close_sigio))
+               return;
+
+       write_sigio_workaround();
+       add_sigio_fd(fd, read);
+}
+
+static void sigio_cleanup(void)
 {
        if(write_sigio_pid != -1){
                os_kill_process(write_sigio_pid, 1);
                write_sigio_pid = -1;
        }
 }
+
+__uml_exitcall(sigio_cleanup);
index f11b3124a0c86cd22850e178e7c234fe20f9ad7e..60e4faedf2542c6cd205cdc5a764b79bae284f62 100644 (file)
@@ -106,29 +106,6 @@ void alarm_handler(ARCH_SIGHDLR_PARAM)
        set_signals(enabled);
 }
 
-extern void do_boot_timer_handler(struct sigcontext * sc);
-
-void boot_timer_handler(ARCH_SIGHDLR_PARAM)
-{
-       struct sigcontext *sc;
-       int enabled;
-
-       ARCH_GET_SIGCONTEXT(sc, sig);
-
-       enabled = signals_enabled;
-       if(!enabled){
-               if(sig == SIGVTALRM)
-                       pending |= SIGVTALRM_MASK;
-               else pending |= SIGALRM_MASK;
-               return;
-       }
-
-       block_signals();
-
-       do_boot_timer_handler(sc);
-       set_signals(enabled);
-}
-
 void set_sigstack(void *sig_stack, int size)
 {
        stack_t stack = ((stack_t) { .ss_flags  = 0,
index bd89c6b99d5dcf6d58b55eefe68fb280331bea61..7baf90fda58b971115a3becea1aef4e45e427ffd 100644 (file)
@@ -159,7 +159,7 @@ static int userspace_tramp(void *stack)
 
        ptrace(PTRACE_TRACEME, 0, 0, 0);
 
-       init_new_thread_signals(1);
+       init_new_thread_signals();
        enable_timer();
 
        if(!proc_mm){
@@ -435,7 +435,6 @@ void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr,
 {
        unsigned long flags;
        jmp_buf switch_buf, fork_buf;
-       int enable;
 
        *switch_buf_ptr = &switch_buf;
        *fork_buf_ptr = &fork_buf;
@@ -450,7 +449,7 @@ void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr,
         */
        flags = get_signals();
        block_signals();
-       if(UML_SETJMP(&fork_buf, enable) == 0)
+       if(UML_SETJMP(&fork_buf) == 0)
                new_thread_proc(stack, handler);
 
        remove_sigstack();
@@ -467,21 +466,19 @@ void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr,
 void thread_wait(void *sw, void *fb)
 {
        jmp_buf buf, **switch_buf = sw, *fork_buf;
-       int enable;
 
        *switch_buf = &buf;
        fork_buf = fb;
-       if(UML_SETJMP(&buf, enable) == 0)
+       if(UML_SETJMP(&buf) == 0)
                siglongjmp(*fork_buf, INIT_JMP_REMOVE_SIGSTACK);
 }
 
 void switch_threads(void *me, void *next)
 {
        jmp_buf my_buf, **me_ptr = me, *next_buf = next;
-       int enable;
 
        *me_ptr = &my_buf;
-       if(UML_SETJMP(&my_buf, enable) == 0)
+       if(UML_SETJMP(&my_buf) == 0)
                UML_LONGJMP(next_buf, 1);
 }
 
@@ -495,14 +492,14 @@ static jmp_buf *cb_back;
 int start_idle_thread(void *stack, void *switch_buf_ptr, void **fork_buf_ptr)
 {
        jmp_buf **switch_buf = switch_buf_ptr;
-       int n, enable;
+       int n;
 
        set_handler(SIGWINCH, (__sighandler_t) sig_handler,
                    SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGALRM,
                    SIGVTALRM, -1);
 
        *fork_buf_ptr = &initial_jmpbuf;
-       n = UML_SETJMP(&initial_jmpbuf, enable);
+       n = UML_SETJMP(&initial_jmpbuf);
        switch(n){
        case INIT_JMP_NEW_THREAD:
                new_thread_proc((void *) stack, new_thread_handler);
@@ -529,14 +526,13 @@ int start_idle_thread(void *stack, void *switch_buf_ptr, void **fork_buf_ptr)
 void initial_thread_cb_skas(void (*proc)(void *), void *arg)
 {
        jmp_buf here;
-       int enable;
 
        cb_proc = proc;
        cb_arg = arg;
        cb_back = &here;
 
        block_signals();
-       if(UML_SETJMP(&here, enable) == 0)
+       if(UML_SETJMP(&here) == 0)
                UML_LONGJMP(&initial_jmpbuf, INIT_JMP_CALLBACK);
        unblock_signals();
 
index 280c4fb9b585a15813e4cf9669a0b3b258181623..4ae73c0e54850c4068e1ddf0cf9afc33f6e96239 100644 (file)
 #include "kern_constants.h"
 #include "os.h"
 
-/* XXX This really needs to be declared and initialized in a kernel file since
- * it's in <linux/time.h>
- */
-extern struct timespec wall_to_monotonic;
-
 static void set_interval(int timer_type)
 {
        int usec = 1000000/hz();
@@ -71,6 +66,7 @@ void switch_timers(int to_real)
                       errno);
 }
 
+#ifdef UML_CONFIG_MODE_TT
 void uml_idle_timer(void)
 {
        if(signal(SIGVTALRM, SIG_IGN) == SIG_ERR)
@@ -80,14 +76,7 @@ void uml_idle_timer(void)
                    SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
        set_interval(ITIMER_REAL);
 }
-
-void time_init(void)
-{
-       if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR)
-               panic("Couldn't set SIGVTALRM handler");
-       set_interval(ITIMER_VIRTUAL);
-       time_init_kern();
-}
+#endif
 
 unsigned long long os_nsecs(void)
 {
@@ -106,15 +95,7 @@ void idle_sleep(int secs)
        nanosleep(&ts, NULL);
 }
 
-/* XXX This partly duplicates init_irq_signals */
-
 void user_time_init(void)
 {
-       set_handler(SIGVTALRM, (__sighandler_t) alarm_handler,
-                   SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH,
-                   SIGALRM, SIGUSR2, -1);
-       set_handler(SIGALRM, (__sighandler_t) alarm_handler,
-                   SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH,
-                   SIGVTALRM, SIGUSR2, -1);
        set_interval(ITIMER_VIRTUAL);
 }
index e523719330b27cb2b0a29bd1dacbf15bc8b1ca05..865f6a6a25905924d3f17ab6a449451cd73ebb9c 100644 (file)
@@ -14,11 +14,10 @@ unsigned long __do_user_copy(void *to, const void *from, int n,
                                        int n), int *faulted_out)
 {
        unsigned long *faddrp = (unsigned long *) fault_addr, ret;
-       int enable;
 
        jmp_buf jbuf;
        *fault_catcher = &jbuf;
-       if(UML_SETJMP(&jbuf, enable) == 0){
+       if(UML_SETJMP(&jbuf) == 0){
                (*op)(to, from, n);
                ret = 0;
                *faulted_out = 0;
index e69d403949c872767c6e0ae45db1d2951259b444..83d389b8ebd80f8f3eddb23a2b5cc802f6284136 100644 (file)
@@ -1,11 +1,13 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17-git6
-# Sat Jun 24 00:52:28 2006
+# Linux kernel version: 2.6.17-git22
+# Tue Jul  4 14:24:40 2006
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
 CONFIG_X86=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_SEMAPHORE_SLEEPERS=y
 CONFIG_MMU=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -17,6 +19,7 @@ CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_DMI=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
@@ -52,10 +55,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
+CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -136,10 +141,12 @@ CONFIG_NEED_MULTIPLE_NODES=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
+CONFIG_RESOURCES_64BIT=y
 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_OUT_OF_LINE_PFN_TO_PAGE=y
 CONFIG_NR_CPUS=32
 CONFIG_HOTPLUG_CPU=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_HPET_TIMER=y
 CONFIG_HPET_EMULATE_RTC=y
 CONFIG_IOMMU=y
@@ -186,6 +193,7 @@ CONFIG_ACPI_BUTTON=y
 # CONFIG_ACPI_VIDEO is not set
 # CONFIG_ACPI_HOTKEY is not set
 CONFIG_ACPI_FAN=y
+# CONFIG_ACPI_DOCK is not set
 CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=y
@@ -200,7 +208,7 @@ CONFIG_ACPI_POWER=y
 CONFIG_ACPI_SYSTEM=y
 CONFIG_X86_PM_TIMER=y
 CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_HOTPLUG_MEMORY=y
+# CONFIG_ACPI_SBS is not set
 
 #
 # CPU Frequency scaling
@@ -801,6 +809,7 @@ CONFIG_SERIO_LIBPS2=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -870,6 +879,9 @@ CONFIG_SOFT_WATCHDOG=y
 #
 # CONFIG_USBPCWATCHDOG is not set
 CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_INTEL=y
+CONFIG_HW_RANDOM_AMD=y
+# CONFIG_HW_RANDOM_GEODE is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
 # CONFIG_DTLK is not set
@@ -886,6 +898,7 @@ CONFIG_AGP_INTEL=y
 # CONFIG_AGP_VIA is not set
 # CONFIG_DRM is not set
 # CONFIG_MWAVE is not set
+# CONFIG_PC8736x_GPIO is not set
 CONFIG_RAW_DRIVER=y
 CONFIG_MAX_RAW_DEVS=256
 CONFIG_HPET=y
@@ -1030,8 +1043,8 @@ CONFIG_VIDEO_V4L2=y
 #
 # Graphics support
 #
+# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
-CONFIG_VIDEO_SELECT=y
 
 #
 # Console display driver support
@@ -1039,6 +1052,7 @@ CONFIG_VIDEO_SELECT=y
 CONFIG_VGA_CONSOLE=y
 CONFIG_VGACON_SOFT_SCROLLBACK=y
 CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256
+CONFIG_VIDEO_SELECT=y
 CONFIG_DUMMY_CONSOLE=y
 
 #
@@ -1359,6 +1373,7 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1424,16 +1439,24 @@ CONFIG_KPROBES=y
 #
 # Kernel hacking
 #
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_UNUSED_SYMBOLS=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=18
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RWSEMS is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 CONFIG_DEBUG_FS=y
@@ -1445,6 +1468,8 @@ CONFIG_STACK_UNWIND=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUG_RODATA is not set
 # CONFIG_IOMMU_DEBUG is not set
+CONFIG_DEBUG_STACKOVERFLOW=y
+# CONFIG_DEBUG_STACK_USAGE is not set
 
 #
 # Security options
@@ -1468,3 +1493,4 @@ CONFIG_STACK_UNWIND=y
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
index 926c4743d13b27220cd00494a99f3eb2d74a1ff1..a9dc0f3b5b519dd711edb118393a2000c9ab7d6b 100644 (file)
@@ -182,7 +182,7 @@ struct elf_prpsinfo
 #define user user32
 
 #define __ASM_X86_64_ELF_H 1
-#define elf_read_implies_exec(ex, have_pt_gnu_stack)   (!(have_pt_gnu_stack))
+#define elf_read_implies_exec(ex, executable_stack)     (executable_stack != EXSTACK_DISABLE_X)
 //#include <asm/ia32.h>
 #include <linux/elf.h>
 
index a590b7a0d92d46f009b1eab519fa5effe7185279..659c0722f6b825c75ca7d86743a872630cd9c45f 100644 (file)
@@ -202,17 +202,24 @@ static long ptrace32_siginfo(unsigned request, u32 pid, u32 addr, u32 data)
 {
        int ret;
        compat_siginfo_t *si32 = (compat_siginfo_t *)compat_ptr(data);
+       siginfo_t ssi; 
        siginfo_t *si = compat_alloc_user_space(sizeof(siginfo_t));
        if (request == PTRACE_SETSIGINFO) {
-               ret = copy_siginfo_from_user32(si, si32);
+               memset(&ssi, 0, sizeof(siginfo_t));
+               ret = copy_siginfo_from_user32(&ssi, si32);
                if (ret)
                        return ret;
+               if (copy_to_user(si, &ssi, sizeof(siginfo_t)))
+                       return -EFAULT;
        }
        ret = sys_ptrace(request, pid, addr, (unsigned long)si);
        if (ret)
                return ret;
-       if (request == PTRACE_GETSIGINFO)
-               ret = copy_siginfo_to_user32(si32, si);
+       if (request == PTRACE_GETSIGINFO) {
+               if (copy_from_user(&ssi, si, sizeof(siginfo_t)))
+                       return -EFAULT;
+               ret = copy_siginfo_to_user32(si32, &ssi);
+       }
        return ret;
 }
 
index b8eee4c7888b596753660ef56e7cdb39c29391cc..e56c2adf57a4f2ab2265ccdff5c55f08aa431f1d 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/kexec.h>
 #include <linux/module.h>
 
+#include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/e820.h>
 #include <asm/proto.h>
index b93ef5b5198062a7abc10dd351d29aa9162fd545..140051e07fa64c7f07e2fd8b5e099ceaf15c3860 100644 (file)
@@ -2,7 +2,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/string.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <asm/fcntl.h>
index 335200aa27379a269d8cd3ac1661b351d8cff92e..db2acbf7ad288b4621a7e4bcb7f79d86d13eef43 100644 (file)
@@ -597,7 +597,7 @@ static __cpuinit void threshold_remove_bank(unsigned int cpu, int bank)
        /* sibling symlink */
        if (shared_bank[bank] && b->blocks->cpu != cpu) {
                sysfs_remove_link(&per_cpu(device_mce, cpu).kobj, name);
-               per_cpu(threshold_banks, i)[bank] = NULL;
+               per_cpu(threshold_banks, cpu)[bank] = NULL;
                return;
        }
 
index d91cb843f54d9d2c28cf9db1fac65690bfdd8204..e71ed53b08fb7bad84aa3f852504d1291237f249 100644 (file)
@@ -1,9 +1,11 @@
 /*
  * Derived from arch/powerpc/kernel/iommu.c
  *
- * Copyright (C) 2006 Jon Mason <jdmason@us.ibm.com>, IBM Corporation
- * Copyright (C) 2006 Muli Ben-Yehuda <muli@il.ibm.com>, IBM Corporation
+ * Copyright (C) IBM Corporation, 2006
  *
+ * Author: Jon Mason <jdmason@us.ibm.com>
+ * Author: Muli Ben-Yehuda <muli@il.ibm.com>
+
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
index 0925518b58d06c436e794e576a35ef474d5df5aa..8a099ff1f8bc151cc4968ed63991258fcf00241e 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/slab.h>
 #include <linux/user.h>
 #include <linux/a.out.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
 #include <linux/init.h>
index b7c70596979143f5ec70af8b38a2de656b424dcd..975380207b46c58ea1f109d8ef3b3bfe9de4cf4b 100644 (file)
@@ -771,12 +771,10 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid)
        unsigned long start_rip;
        struct create_idle c_idle = {
                .cpu = cpu,
-               .done = COMPLETION_INITIALIZER(c_idle.done),
+               .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done),
        };
        DECLARE_WORK(work, do_fork_idle, &c_idle);
 
-       lockdep_set_class(&c_idle.done.wait.lock, &waitqueue_lock_key);
-
        /* allocate memory for gdts of secondary cpus. Hotplug is considered */
        if (!cpu_gdt_descr[cpu].address &&
                !(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) {
index 8d4c67f61b8e6d2d648ac9ae546e58c57123fc41..d3a9e79e954c43aaf8bd873be430a57448382c61 100644 (file)
@@ -1,8 +1,10 @@
 /*
  * Derived from arch/powerpc/platforms/pseries/iommu.c
  *
- * Copyright (C) 2006 Jon Mason <jdmason@us.ibm.com>, IBM Corporation
- * Copyright (C) 2006 Muli Ben-Yehuda <muli@il.ibm.com>, IBM Corporation
+ * Copyright (C) IBM Corporation, 2006
+ *
+ * Author: Jon Mason <jdmason@us.ibm.com>
+ * Author: Muli Ben-Yehuda <muli@il.ibm.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 79d05c4820720f492578c8cb0f1b6ef1feb8f21d..eb39a2775236428a405aeda04227d15be93b8b27 100644 (file)
@@ -76,13 +76,13 @@ int register_die_notifier(struct notifier_block *nb)
        vmalloc_sync_all();
        return atomic_notifier_chain_register(&die_chain, nb);
 }
-EXPORT_SYMBOL(register_die_notifier);
+EXPORT_SYMBOL(register_die_notifier); /* used modular by kdb */
 
 int unregister_die_notifier(struct notifier_block *nb)
 {
        return atomic_notifier_chain_unregister(&die_chain, nb);
 }
-EXPORT_SYMBOL(unregister_die_notifier);
+EXPORT_SYMBOL(unregister_die_notifier); /* used modular by kdb */
 
 static inline void conditional_sti(struct pt_regs *regs)
 {
index edb29410d9530b791816ef129337c9b0f510cf54..82684d05910a9aebd6efd61955f790f17ea7c8a5 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/proc_fs.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/bootmem.h>
 #include <linux/kernel.h>
 
index 92925e7d9e6cb98af23ac11f6b1dfc1d3f4244f9..b8c0702777ff4e1bb2557567a7aa7f6d987bb6eb 100644 (file)
@@ -69,7 +69,7 @@ static u32 ddir_act[2] __read_mostly = { BLK_TC_ACT(BLK_TC_READ), BLK_TC_ACT(BLK
 /*
  * Bio action bits of interest
  */
-static u32 bio_act[3] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_ACT(BLK_TC_SYNC) };
+static u32 bio_act[5] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_ACT(BLK_TC_SYNC), 0, BLK_TC_ACT(BLK_TC_AHEAD) };
 
 /*
  * More could be added as needed, taking care to increment the decrementer
@@ -79,6 +79,8 @@ static u32 bio_act[3] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_AC
        (((rw) & (1 << BIO_RW_BARRIER)) >> (BIO_RW_BARRIER - 0))
 #define trace_sync_bit(rw)     \
        (((rw) & (1 << BIO_RW_SYNC)) >> (BIO_RW_SYNC - 1))
+#define trace_ahead_bit(rw)    \
+       (((rw) & (1 << BIO_RW_AHEAD)) << (BIO_RW_AHEAD - 0))
 
 /*
  * The worker for the various blk_add_trace*() types. Fills out a
@@ -100,6 +102,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
        what |= ddir_act[rw & WRITE];
        what |= bio_act[trace_barrier_bit(rw)];
        what |= bio_act[trace_sync_bit(rw)];
+       what |= bio_act[trace_ahead_bit(rw)];
 
        pid = tsk->pid;
        if (unlikely(act_log_check(bt, what, sector, pid)))
index 9cfa2e1ecb24c2568e020222026271f68631deb7..309760b7e37f0c9a7d08ddcf047196dc1eb70875 100644 (file)
@@ -72,7 +72,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
                        bdevp = bdget_disk(disk, part);
                        if (!bdevp)
                                return -ENOMEM;
-                       mutex_lock(&bdevp->bd_mutex);
+                       mutex_lock_nested(&bdevp->bd_mutex, BD_MUTEX_PARTITION);
                        if (bdevp->bd_openers) {
                                mutex_unlock(&bdevp->bd_mutex);
                                bdput(bdevp);
@@ -82,7 +82,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
                        fsync_bdev(bdevp);
                        invalidate_bdev(bdevp, 0);
 
-                       mutex_lock(&bdev->bd_mutex);
+                       mutex_lock_nested(&bdev->bd_mutex, BD_MUTEX_WHOLE);
                        delete_partition(disk, part);
                        mutex_unlock(&bdev->bd_mutex);
                        mutex_unlock(&bdevp->bd_mutex);
index ab17c7224bb67677325196c2dd2724aa55508619..61d6b3c65b6697105a432378ba452a86ebc346bf 100644 (file)
@@ -3491,8 +3491,8 @@ EXPORT_SYMBOL(end_request);
 
 void blk_rq_bio_prep(request_queue_t *q, struct request *rq, struct bio *bio)
 {
-       /* first three bits are identical in rq->flags and bio->bi_rw */
-       rq->flags |= (bio->bi_rw & 7);
+       /* first two bits are identical in rq->flags and bio->bi_rw */
+       rq->flags |= (bio->bi_rw & 3);
 
        rq->nr_phys_segments = bio_phys_segments(q, bio);
        rq->nr_hw_segments = bio_hw_segments(q, bio);
index fef7bab122447c5d18d437716eee3a61ce1f233e..56c5ba874623015d499b0d022445b409c34bd904 100644 (file)
@@ -107,7 +107,6 @@ config ACPI_BUTTON
 config ACPI_VIDEO
        tristate "Video"
        depends on X86
-       default y
        help
          This driver implement the ACPI Extensions For Display Adapters
          for integrated graphics devices on motherboard, as specified in
@@ -135,8 +134,7 @@ config ACPI_FAN
 
 config ACPI_DOCK
        tristate "Dock"
-       depends on !ACPI_IBM_DOCK
-       default y
+       depends on EXPERIMENTAL
        help
          This driver adds support for ACPI controlled docking stations
 
@@ -214,6 +212,7 @@ config ACPI_IBM
 config ACPI_IBM_DOCK
        bool "Legacy Docking Station Support"
        depends on ACPI_IBM
+       depends on ACPI_DOCK=n
        default n
        ---help---
          Allows the ibm_acpi driver to handle docking station events.
@@ -357,7 +356,6 @@ config ACPI_SBS
        tristate "Smart Battery System (EXPERIMENTAL)"
        depends on X86 && I2C
        depends on EXPERIMENTAL
-       default y
        help
          This driver adds support for the Smart Battery System.
          Depends on I2C (Device Drivers ---> I2C support)
index 24ccf81d135f9d1ccf440b426277b7d7a36ec71c..96309b9660da886434d6ee44ae3581564a05a0ea 100644 (file)
@@ -72,7 +72,7 @@ struct acpi_ac {
        unsigned long state;
 };
 
-static struct file_operations acpi_ac_fops = {
+static const struct file_operations acpi_ac_fops = {
        .open = acpi_ac_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
index 24bf4dca88cc75936e275f2585a375eeec8b4722..6e5221707d9757de15030edb0a08f1d8caa7c89f 100644 (file)
@@ -557,7 +557,7 @@ static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file)
        return single_open(file, acpi_battery_read_alarm, PDE(inode)->data);
 }
 
-static struct file_operations acpi_battery_info_ops = {
+static const struct file_operations acpi_battery_info_ops = {
        .open = acpi_battery_info_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -565,7 +565,7 @@ static struct file_operations acpi_battery_info_ops = {
        .owner = THIS_MODULE,
 };
 
-static struct file_operations acpi_battery_state_ops = {
+static const struct file_operations acpi_battery_state_ops = {
        .open = acpi_battery_state_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -573,7 +573,7 @@ static struct file_operations acpi_battery_state_ops = {
        .owner = THIS_MODULE,
 };
 
-static struct file_operations acpi_battery_alarm_ops = {
+static const struct file_operations acpi_battery_alarm_ops = {
        .open = acpi_battery_alarm_open_fs,
        .read = seq_read,
        .write = acpi_battery_write_alarm,
index ea5a0496a4fd9a63531dd1665975b44d810b0dbb..b2977695e12091ab6e945b20432178a953a81114 100644 (file)
@@ -192,8 +192,8 @@ int acpi_bus_set_power(acpi_handle handle, int state)
        /* Make sure this is a valid target state */
 
        if (!device->flags.power_manageable) {
-               printk(KERN_DEBUG "Device `[%s]' is not power manageable",
-                               device->kobj.name);
+               ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device `[%s]' is not power manageable",
+                               device->kobj.name));
                return -ENODEV;
        }
        /*
index fd1ba05eab688fb409d259d97848b88cec6c325c..5ef885e82c78a94b7352307307ac4b5e35e0b08f 100644 (file)
@@ -87,14 +87,14 @@ struct acpi_button {
        unsigned long pushed;
 };
 
-static struct file_operations acpi_button_info_fops = {
+static const struct file_operations acpi_button_info_fops = {
        .open = acpi_button_info_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
        .release = single_release,
 };
 
-static struct file_operations acpi_button_state_fops = {
+static const struct file_operations acpi_button_state_fops = {
        .open = acpi_button_state_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
index 574a75a166c54730228e7bcef28f2db097cede3a..a01ce6700bfeb6809e24b5b4936963d4e8b06c59 100644 (file)
@@ -39,50 +39,43 @@ ACPI_MODULE_NAME("cm_sbs")
 static struct proc_dir_entry *acpi_ac_dir;
 static struct proc_dir_entry *acpi_battery_dir;
 
-static struct semaphore cm_sbs_sem;
+static DEFINE_MUTEX(cm_sbs_mutex);
 
-static int lock_ac_dir_cnt = 0;
-static int lock_battery_dir_cnt = 0;
+static int lock_ac_dir_cnt;
+static int lock_battery_dir_cnt;
 
 struct proc_dir_entry *acpi_lock_ac_dir(void)
 {
-
-       down(&cm_sbs_sem);
-       if (!acpi_ac_dir) {
+       mutex_lock(&cm_sbs_mutex);
+       if (!acpi_ac_dir)
                acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir);
-       }
        if (acpi_ac_dir) {
                lock_ac_dir_cnt++;
        } else {
                ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
                                  "Cannot create %s\n", ACPI_AC_CLASS));
        }
-       up(&cm_sbs_sem);
+       mutex_unlock(&cm_sbs_mutex);
        return acpi_ac_dir;
 }
-
 EXPORT_SYMBOL(acpi_lock_ac_dir);
 
 void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir_param)
 {
-
-       down(&cm_sbs_sem);
-       if (acpi_ac_dir_param) {
+       mutex_lock(&cm_sbs_mutex);
+       if (acpi_ac_dir_param)
                lock_ac_dir_cnt--;
-       }
        if (lock_ac_dir_cnt == 0 && acpi_ac_dir_param && acpi_ac_dir) {
                remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir);
                acpi_ac_dir = 0;
        }
-       up(&cm_sbs_sem);
+       mutex_unlock(&cm_sbs_mutex);
 }
-
 EXPORT_SYMBOL(acpi_unlock_ac_dir);
 
 struct proc_dir_entry *acpi_lock_battery_dir(void)
 {
-
-       down(&cm_sbs_sem);
+       mutex_lock(&cm_sbs_mutex);
        if (!acpi_battery_dir) {
                acpi_battery_dir =
                    proc_mkdir(ACPI_BATTERY_CLASS, acpi_root_dir);
@@ -93,39 +86,28 @@ struct proc_dir_entry *acpi_lock_battery_dir(void)
                ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
                                  "Cannot create %s\n", ACPI_BATTERY_CLASS));
        }
-       up(&cm_sbs_sem);
+       mutex_unlock(&cm_sbs_mutex);
        return acpi_battery_dir;
 }
-
 EXPORT_SYMBOL(acpi_lock_battery_dir);
 
 void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir_param)
 {
-
-       down(&cm_sbs_sem);
-       if (acpi_battery_dir_param) {
+       mutex_lock(&cm_sbs_mutex);
+       if (acpi_battery_dir_param)
                lock_battery_dir_cnt--;
-       }
        if (lock_battery_dir_cnt == 0 && acpi_battery_dir_param
            && acpi_battery_dir) {
                remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir);
                acpi_battery_dir = 0;
        }
-       up(&cm_sbs_sem);
+       mutex_unlock(&cm_sbs_mutex);
        return;
 }
-
 EXPORT_SYMBOL(acpi_unlock_battery_dir);
 
 static int __init acpi_cm_sbs_init(void)
 {
-
-       if (acpi_disabled)
-               return 0;
-
-       init_MUTEX(&cm_sbs_sem);
-
        return 0;
 }
-
 subsys_initcall(acpi_cm_sbs_init);
index daf51b5b5875fd4978b8926d80931a19134c9806..1888c055d10f47f73fbbc1cbb175864121eb5970 100644 (file)
@@ -116,16 +116,6 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
 
        case ACPI_TYPE_METHOD:
 
-               /*
-                * Set the execution data width (32 or 64) based upon the
-                * revision number of the parent ACPI table.
-                * TBD: This is really for possible future support of integer width
-                * on a per-table basis. Currently, we just use a global for the width.
-                */
-               if (info->table_desc->pointer->revision == 1) {
-                       node->flags |= ANOBJ_DATA_WIDTH_32;
-               }
-
                info->method_count++;
                break;
 
index a39a33f4847aac07ff519dc5f89f6e2afebe7994..cf888add31917aa25a68429e46f700ebe0e462fa 100644 (file)
@@ -134,7 +134,7 @@ acpi_ds_create_method_mutex(union acpi_operand_object *method_desc)
        union acpi_operand_object *mutex_desc;
        acpi_status status;
 
-       ACPI_FUNCTION_NAME(ds_create_method_mutex);
+       ACPI_FUNCTION_TRACE(ds_create_method_mutex);
 
        /* Create the new mutex object */
 
@@ -493,7 +493,7 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
 
        ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
                          "****Restart [%4.4s] Op %p ReturnValueFromCallee %p\n",
-                         (char *)&walk_state->method_node->name,
+                         acpi_ut_get_node_name(walk_state->method_node),
                          walk_state->method_call_op, return_desc));
 
        ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
@@ -610,6 +610,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
 
                        acpi_os_release_mutex(method_desc->method.mutex->mutex.
                                              os_mutex);
+                       method_desc->method.mutex->mutex.owner_thread = NULL;
                }
        }
 
@@ -620,27 +621,11 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
                 */
                method_node = walk_state->method_node;
 
-               /* Lock namespace for possible update */
-
-               status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
-               if (ACPI_FAILURE(status)) {
-                       return_VOID;
-               }
-
-               /*
-                * Delete any namespace entries created immediately underneath
-                * the method
-                */
-               if (method_node && method_node->child) {
-                       acpi_ns_delete_namespace_subtree(method_node);
-               }
-
                /*
-                * Delete any namespace entries created anywhere else within
+                * Delete any namespace objects created anywhere within
                 * the namespace by the execution of this method
                 */
                acpi_ns_delete_namespace_by_owner(method_desc->method.owner_id);
-               status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
        }
 
        /* Decrement the thread count on the method */
index b1ded62d0df1d343ffb1f3da6422fc66d712d8d1..d7a616c3104e9b8fe87394512b46f2c0ed0fac9c 100644 (file)
@@ -313,10 +313,10 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
        case AML_CLASS_EXECUTE:
        case AML_CLASS_CREATE:
                /*
-                * Most operators with arguments.
+                * Most operators with arguments (except create_xxx_field operators)
                 * Start a new result/operand state
                 */
-               if (walk_state->opcode != AML_CREATE_FIELD_OP) {
+               if (walk_state->op_info->object_type != ACPI_TYPE_BUFFER_FIELD) {
                        status = acpi_ds_result_stack_push(walk_state);
                }
                break;
index 510a9452429848d20abae91b47a9005aa95c4b8f..1c0a39d8b04e5de9474cf2b0ec967a8633fca3fe 100644 (file)
@@ -627,6 +627,7 @@ static int dock_add(acpi_handle handle)
        INIT_LIST_HEAD(&dock_station->hotplug_devices);
        spin_lock_init(&dock_station->dd_lock);
        spin_lock_init(&dock_station->hp_lock);
+       ATOMIC_INIT_NOTIFIER_HEAD(&dock_notifier_list);
 
        /* Find dependent devices */
        acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
index 8c5d7df7d34310aacf61fb7632392de376fb61c0..e5d7963628543edd9eb6d91042d795df11433e19 100644 (file)
@@ -929,7 +929,7 @@ static int acpi_ec_info_open_fs(struct inode *inode, struct file *file)
        return single_open(file, acpi_ec_read_info, PDE(inode)->data);
 }
 
-static struct file_operations acpi_ec_info_ops = {
+static const struct file_operations acpi_ec_info_ops = {
        .open = acpi_ec_info_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
index a901b23e95e7b38e53378e5af4140182ab6cd86f..959a893c8d1fdbd45d415c4a8a50c954ac498050 100644 (file)
@@ -99,7 +99,7 @@ static unsigned int acpi_system_poll_event(struct file *file, poll_table * wait)
        return 0;
 }
 
-static struct file_operations acpi_system_event_ops = {
+static const struct file_operations acpi_system_event_ops = {
        .open = acpi_system_open_event,
        .read = acpi_system_read_event,
        .release = acpi_system_close_event,
index 094a17e4c86deec03416cd71cd39fd075e660751..21caae04fe85f868bcedddfc3e8ebc6a5b2f5c68 100644 (file)
@@ -528,34 +528,40 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
                                }
                        }
 
-                       /* Call the setup handler with the deactivate notification */
+                       /*
+                        * If the region has been activated, call the setup handler
+                        * with the deactivate notification
+                        */
+                       if (region_obj->region.flags & AOPOBJ_SETUP_COMPLETE) {
+                               region_setup = handler_obj->address_space.setup;
+                               status =
+                                   region_setup(region_obj,
+                                                ACPI_REGION_DEACTIVATE,
+                                                handler_obj->address_space.
+                                                context, region_context);
 
-                       region_setup = handler_obj->address_space.setup;
-                       status =
-                           region_setup(region_obj, ACPI_REGION_DEACTIVATE,
-                                        handler_obj->address_space.context,
-                                        region_context);
+                               /* Init routine may fail, Just ignore errors */
 
-                       /* Init routine may fail, Just ignore errors */
+                               if (ACPI_FAILURE(status)) {
+                                       ACPI_EXCEPTION((AE_INFO, status,
+                                                       "from region handler - deactivate, [%s]",
+                                                       acpi_ut_get_region_name
+                                                       (region_obj->region.
+                                                        space_id)));
+                               }
 
-                       if (ACPI_FAILURE(status)) {
-                               ACPI_EXCEPTION((AE_INFO, status,
-                                               "from region init, [%s]",
-                                               acpi_ut_get_region_name
-                                               (region_obj->region.space_id)));
+                               region_obj->region.flags &=
+                                   ~(AOPOBJ_SETUP_COMPLETE);
                        }
 
-                       region_obj->region.flags &= ~(AOPOBJ_SETUP_COMPLETE);
-
                        /*
                         * Remove handler reference in the region
                         *
-                        * NOTE: this doesn't mean that the region goes away
-                        * The region is just inaccessible as indicated to
-                        * the _REG method
+                        * NOTE: this doesn't mean that the region goes away, the region
+                        * is just inaccessible as indicated to the _REG method
                         *
-                        * If the region is on the handler's list
-                        * this better be the region's handler
+                        * If the region is on the handler's list, this must be the
+                        * region's handler
                         */
                        region_obj->region.handler = NULL;
                        acpi_ut_remove_reference(handler_obj);
index 4f948df17ab975f15cc6a5d22c842a10332d55e1..923fd2b46955284a99a2baaa29eeec9c8086e45d 100644 (file)
@@ -428,7 +428,7 @@ acpi_remove_notify_handler(acpi_handle device,
        node = acpi_ns_map_handle_to_node(device);
        if (!node) {
                status = AE_BAD_PARAMETER;
-               goto unlock;
+               goto unlock_and_exit;
        }
 
        /* Root Object */
@@ -442,7 +442,7 @@ acpi_remove_notify_handler(acpi_handle device,
                    ((handler_type & ACPI_DEVICE_NOTIFY) &&
                     !acpi_gbl_device_notify.handler)) {
                        status = AE_NOT_EXIST;
-                       goto unlock;
+                       goto unlock_and_exit;
                }
 
                /* Make sure all deferred tasks are completed */
@@ -474,7 +474,7 @@ acpi_remove_notify_handler(acpi_handle device,
 
                if (!acpi_ev_is_notify_object(node)) {
                        status = AE_TYPE;
-                       goto unlock;
+                       goto unlock_and_exit;
                }
 
                /* Check for an existing internal object */
@@ -482,17 +482,21 @@ acpi_remove_notify_handler(acpi_handle device,
                obj_desc = acpi_ns_get_attached_object(node);
                if (!obj_desc) {
                        status = AE_NOT_EXIST;
-                       goto unlock;
+                       goto unlock_and_exit;
                }
 
                /* Object exists - make sure there's an existing handler */
 
                if (handler_type & ACPI_SYSTEM_NOTIFY) {
                        notify_obj = obj_desc->common_notify.system_notify;
-                       if ((!notify_obj) ||
-                           (notify_obj->notify.handler != handler)) {
+                       if (!notify_obj) {
+                               status = AE_NOT_EXIST;
+                               goto unlock_and_exit;
+                       }
+
+                       if (notify_obj->notify.handler != handler) {
                                status = AE_BAD_PARAMETER;
-                               goto unlock;
+                               goto unlock_and_exit;
                        }
                        /* Make sure all deferred tasks are completed */
 
@@ -510,10 +514,14 @@ acpi_remove_notify_handler(acpi_handle device,
 
                if (handler_type & ACPI_DEVICE_NOTIFY) {
                        notify_obj = obj_desc->common_notify.device_notify;
-                       if ((!notify_obj) ||
-                           (notify_obj->notify.handler != handler)) {
+                       if (!notify_obj) {
+                               status = AE_NOT_EXIST;
+                               goto unlock_and_exit;
+                       }
+
+                       if (notify_obj->notify.handler != handler) {
                                status = AE_BAD_PARAMETER;
-                               goto unlock;
+                               goto unlock_and_exit;
                        }
                        /* Make sure all deferred tasks are completed */
 
@@ -530,9 +538,9 @@ acpi_remove_notify_handler(acpi_handle device,
                }
        }
 
-unlock:
+      unlock_and_exit:
        (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
-exit:
+      exit:
        if (ACPI_FAILURE(status))
                ACPI_EXCEPTION((AE_INFO, status, "Removing notify handler"));
        return_ACPI_STATUS(status);
@@ -586,7 +594,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
        gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
        if (!gpe_event_info) {
                status = AE_BAD_PARAMETER;
-               goto unlock;
+               goto unlock_and_exit;
        }
 
        /* Make sure that there isn't a handler there already */
@@ -594,7 +602,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
        if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
            ACPI_GPE_DISPATCH_HANDLER) {
                status = AE_ALREADY_EXISTS;
-               goto unlock;
+               goto unlock_and_exit;
        }
 
        /* Allocate and init handler object */
@@ -602,7 +610,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
        handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_handler_info));
        if (!handler) {
                status = AE_NO_MEMORY;
-               goto unlock;
+               goto unlock_and_exit;
        }
 
        handler->address = address;
@@ -613,7 +621,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
 
        status = acpi_ev_disable_gpe(gpe_event_info);
        if (ACPI_FAILURE(status)) {
-               goto unlock;
+               goto unlock_and_exit;
        }
 
        /* Install the handler */
@@ -628,9 +636,9 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
 
        acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
 
-unlock:
+      unlock_and_exit:
        (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
-exit:
+      exit:
        if (ACPI_FAILURE(status))
                ACPI_EXCEPTION((AE_INFO, status,
                                "Installing notify handler failed"));
index e8b86a0baad01f710121fe977d1d920d0606dcf9..83b12a9afa325827fe6148588bc5034efa3ce860 100644 (file)
@@ -155,7 +155,11 @@ acpi_remove_address_space_handler(acpi_handle device,
        /* Convert and validate the device handle */
 
        node = acpi_ns_map_handle_to_node(device);
-       if (!node) {
+       if (!node ||
+           ((node->type != ACPI_TYPE_DEVICE) &&
+            (node->type != ACPI_TYPE_PROCESSOR) &&
+            (node->type != ACPI_TYPE_THERMAL) &&
+            (node != acpi_gbl_root_node))) {
                status = AE_BAD_PARAMETER;
                goto unlock_and_exit;
        }
@@ -178,6 +182,13 @@ acpi_remove_address_space_handler(acpi_handle device,
 
                if (handler_obj->address_space.space_id == space_id) {
 
+                       /* Handler must be the same as the installed handler */
+
+                       if (handler_obj->address_space.handler != handler) {
+                               status = AE_BAD_PARAMETER;
+                               goto unlock_and_exit;
+                       }
+
                        /* Matched space_id, first dereference this in the Regions */
 
                        ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
index 83fed079a276d02051fbb53751da2f98621e9bc2..c8341fa5fe01b87b785432d8ee210392b121e105 100644 (file)
@@ -502,7 +502,6 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle)
         * (Offset contains the table_id)
         */
        acpi_ns_delete_namespace_by_owner(table_info->owner_id);
-       acpi_ut_release_owner_id(&table_info->owner_id);
 
        /* Delete the table itself */
 
index b732e399b1eff86abb6439ef0657ff9a5fda0272..544e81a6a438a349212a61930faa7dc3f92077d4 100644 (file)
@@ -170,6 +170,9 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
                return_ACPI_STATUS(AE_NO_MEMORY);
        }
 
+       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Converted value: %8.8X%8.8X\n",
+                         ACPI_FORMAT_UINT64(result)));
+
        /* Save the Result */
 
        return_desc->integer.value = result;
index d8ac2877cf05039574019ca20fd39cedec4ffc04..3a39c2e8e104a001c22f3cc18adab681b598497d 100644 (file)
@@ -267,9 +267,9 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
            && (obj_desc->mutex.os_mutex != ACPI_GLOBAL_LOCK)) {
                ACPI_ERROR((AE_INFO,
                            "Thread %X cannot release Mutex [%4.4s] acquired by thread %X",
-                           walk_state->thread->thread_id,
+                           (u32) walk_state->thread->thread_id,
                            acpi_ut_get_node_name(obj_desc->mutex.node),
-                           obj_desc->mutex.owner_thread->thread_id));
+                           (u32) obj_desc->mutex.owner_thread->thread_id));
                return_ACPI_STATUS(AE_AML_NOT_OWNER);
        }
 
index 6b5d1e6ce94b1b823d9ff3634608254293d884bb..28aef3e69ecceeff2a2855854d3f59167ea905c5 100644 (file)
@@ -60,7 +60,7 @@ ACPI_MODULE_NAME("exsystem")
  *
  * DESCRIPTION: Implements a semaphore wait with a check to see if the
  *              semaphore is available immediately.  If it is not, the
- *              interpreter is released.
+ *              interpreter is released before waiting.
  *
  ******************************************************************************/
 acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout)
@@ -110,9 +110,9 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout)
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Implements a semaphore wait with a check to see if the
- *              semaphore is available immediately.  If it is not, the
- *              interpreter is released.
+ * DESCRIPTION: Implements a mutex wait with a check to see if the
+ *              mutex is available immediately.  If it is not, the
+ *              interpreter is released before waiting.
  *
  ******************************************************************************/
 
index daed2460924d8235552df6fc00882fa9c240af2a..045c89477e59b2929f125ac536226928e949a73a 100644 (file)
@@ -120,7 +120,7 @@ acpi_fan_write_state(struct file *file, const char __user * buffer,
        return count;
 }
 
-static struct file_operations acpi_fan_state_ops = {
+static const struct file_operations acpi_fan_state_ops = {
        .open = acpi_fan_state_open_fs,
        .read = seq_read,
        .write = acpi_fan_write_state,
index fd81a0f5222f3c3f7f3173c66539a8b15111eca0..32c9d88fd19655d6545644da6a23381012ccb079 100644 (file)
@@ -184,7 +184,7 @@ static union acpi_hotkey *get_hotkey_by_event(struct
                                              *hotkey_list, int event);
 
 /* event based config */
-static struct file_operations hotkey_config_fops = {
+static const struct file_operations hotkey_config_fops = {
        .open = hotkey_open_config,
        .read = seq_read,
        .write = hotkey_write_config,
@@ -193,7 +193,7 @@ static struct file_operations hotkey_config_fops = {
 };
 
 /* polling based config */
-static struct file_operations hotkey_poll_config_fops = {
+static const struct file_operations hotkey_poll_config_fops = {
        .open = hotkey_poll_open_config,
        .read = seq_read,
        .write = hotkey_write_config,
@@ -202,7 +202,7 @@ static struct file_operations hotkey_poll_config_fops = {
 };
 
 /* hotkey driver info */
-static struct file_operations hotkey_info_fops = {
+static const struct file_operations hotkey_info_fops = {
        .open = hotkey_info_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -210,7 +210,7 @@ static struct file_operations hotkey_info_fops = {
 };
 
 /* action */
-static struct file_operations hotkey_action_fops = {
+static const struct file_operations hotkey_action_fops = {
        .open = hotkey_action_open_fs,
        .read = seq_read,
        .write = hotkey_execute_aml_method,
@@ -219,7 +219,7 @@ static struct file_operations hotkey_action_fops = {
 };
 
 /* polling results */
-static struct file_operations hotkey_polling_fops = {
+static const struct file_operations hotkey_polling_fops = {
        .open = hotkey_polling_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
index dc3f0739a46b3aee1c4208cb7f9e46a57ff82a89..55b407aae26612372d52f61867d50226f129e673 100644 (file)
@@ -386,14 +386,17 @@ void acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_node)
  *              specific ID.  Used to delete entire ACPI tables.  All
  *              reference counts are updated.
  *
+ * MUTEX:       Locks namespace during deletion walk.
+ *
  ******************************************************************************/
 
 void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id)
 {
        struct acpi_namespace_node *child_node;
        struct acpi_namespace_node *deletion_node;
-       u32 level;
        struct acpi_namespace_node *parent_node;
+       u32 level;
+       acpi_status status;
 
        ACPI_FUNCTION_TRACE_U32(ns_delete_namespace_by_owner, owner_id);
 
@@ -401,6 +404,13 @@ void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id)
                return_VOID;
        }
 
+       /* Lock namespace for possible update */
+
+       status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
+       if (ACPI_FAILURE(status)) {
+               return_VOID;
+       }
+
        deletion_node = NULL;
        parent_node = acpi_gbl_root_node;
        child_node = NULL;
@@ -469,5 +479,6 @@ void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id)
                }
        }
 
+       (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
        return_VOID;
 }
index eedb05c6dc7b6d14e901f0c68abb021c4426b097..b7d1514cd199c834558a416f74dc29a0ab2d88eb 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/delay.h>
 #include <linux/workqueue.h>
 #include <linux/nmi.h>
-#include <linux/kthread.h>
 #include <acpi/acpi.h>
 #include <asm/io.h>
 #include <acpi/acpi_bus.h>
@@ -136,16 +135,6 @@ void acpi_os_vprintf(const char *fmt, va_list args)
 #endif
 }
 
-
-extern int acpi_in_resume;
-void *acpi_os_allocate(acpi_size size)
-{
-       if (acpi_in_resume)
-               return kmalloc(size, GFP_ATOMIC);
-       else
-               return kmalloc(size, GFP_KERNEL);
-}
-
 acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
 {
        if (efi_enabled) {
@@ -593,16 +582,6 @@ static void acpi_os_execute_deferred(void *context)
        return;
 }
 
-static int acpi_os_execute_thread(void *context)
-{
-       struct acpi_os_dpc *dpc = (struct acpi_os_dpc *)context;
-       if (dpc) {
-               dpc->function(dpc->context);
-               kfree(dpc);
-       }
-       do_exit(0);
-}
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_os_execute
@@ -624,10 +603,16 @@ acpi_status acpi_os_execute(acpi_execute_type type,
        acpi_status status = AE_OK;
        struct acpi_os_dpc *dpc;
        struct work_struct *task;
-       struct task_struct *p;
+
+       ACPI_FUNCTION_TRACE("os_queue_for_execution");
+
+       ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
+                         "Scheduling function [%p(%p)] for deferred execution.\n",
+                         function, context));
 
        if (!function)
-               return AE_BAD_PARAMETER;
+               return_ACPI_STATUS(AE_BAD_PARAMETER);
+
        /*
         * Allocate/initialize DPC structure.  Note that this memory will be
         * freed by the callee.  The kernel handles the tq_struct list  in a
@@ -638,34 +623,27 @@ acpi_status acpi_os_execute(acpi_execute_type type,
         * We can save time and code by allocating the DPC and tq_structs
         * from the same memory.
         */
-       if (type == OSL_NOTIFY_HANDLER) {
-               dpc = kmalloc(sizeof(struct acpi_os_dpc), GFP_KERNEL);
-       } else {
-               dpc = kmalloc(sizeof(struct acpi_os_dpc) +
-                               sizeof(struct work_struct), GFP_ATOMIC);
-       }
+
+       dpc =
+           kmalloc(sizeof(struct acpi_os_dpc) + sizeof(struct work_struct),
+                   GFP_ATOMIC);
        if (!dpc)
-               return AE_NO_MEMORY;
+               return_ACPI_STATUS(AE_NO_MEMORY);
+
        dpc->function = function;
        dpc->context = context;
 
-       if (type == OSL_NOTIFY_HANDLER) {
-               p = kthread_create(acpi_os_execute_thread, dpc, "kacpid_notify");
-               if (!IS_ERR(p)) {
-                       wake_up_process(p);
-               } else {
-                       status = AE_NO_MEMORY;
-                       kfree(dpc);
-               }
-       } else {
-               task = (void *)(dpc + 1);
-               INIT_WORK(task, acpi_os_execute_deferred, (void *)dpc);
-               if (!queue_work(kacpid_wq, task)) {
-                       status = AE_ERROR;
-                       kfree(dpc);
-               }
+       task = (void *)(dpc + 1);
+       INIT_WORK(task, acpi_os_execute_deferred, (void *)dpc);
+
+       if (!queue_work(kacpid_wq, task)) {
+               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+                                 "Call to queue_work() failed.\n"));
+               kfree(dpc);
+               status = AE_ERROR;
        }
-       return status;
+
+       return_ACPI_STATUS(status);
 }
 
 EXPORT_SYMBOL(acpi_os_execute);
@@ -1115,26 +1093,6 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
        return (AE_OK);
 }
 
-/*******************************************************************************
- *
- * FUNCTION:    acpi_os_acquire_object
- *
- * PARAMETERS:  Cache           - Handle to cache object
- *              ReturnObject    - Where the object is returned
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Return a zero-filled object.
- *
- ******************************************************************************/
-
-void *acpi_os_acquire_object(acpi_cache_t * cache)
-{
-       void *object = kmem_cache_zalloc(cache, GFP_KERNEL);
-       WARN_ON(!object);
-       return object;
-}
-
 /******************************************************************************
  *
  * FUNCTION:    acpi_os_validate_interface
index 182474ae8ce9ed4f00e649b9781ad19477646722..d405387b74146790fe3ba2f671fb0ef681cb1643 100644 (file)
@@ -139,12 +139,10 @@ union acpi_parse_object *acpi_ps_alloc_op(u16 opcode)
                /* The generic op (default) is by far the most common (16 to 1) */
 
                op = acpi_os_acquire_object(acpi_gbl_ps_node_cache);
-               memset(op, 0, sizeof(struct acpi_parse_obj_common));
        } else {
                /* Extended parseop */
 
                op = acpi_os_acquire_object(acpi_gbl_ps_node_ext_cache);
-               memset(op, 0, sizeof(struct acpi_parse_obj_named));
        }
 
        /* Initialize the Op */
index 8197c0e40769f68785559c58ce0002058ed6aa25..7f3e7e77e79436e9984c52a4d6c80345f3f3265d 100644 (file)
@@ -780,11 +780,6 @@ static int acpi_pci_link_resume(struct acpi_pci_link *link)
                return 0;
 }
 
-/*
- * FIXME: this is a workaround to avoid nasty warning.  It will be removed
- * after every device calls pci_disable_device in .resume.
- */
-int acpi_in_resume;
 static int irqrouter_resume(struct sys_device *dev)
 {
        struct list_head *node = NULL;
@@ -794,7 +789,6 @@ static int irqrouter_resume(struct sys_device *dev)
        /* Make sure SCI is enabled again (Apple firmware bug?) */
        acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1, ACPI_MTX_DO_NOT_LOCK);
 
-       acpi_in_resume = 1;
        list_for_each(node, &acpi_link.entries) {
                link = list_entry(node, struct acpi_pci_link, node);
                if (!link) {
@@ -803,7 +797,6 @@ static int irqrouter_resume(struct sys_device *dev)
                }
                acpi_pci_link_resume(link);
        }
-       acpi_in_resume = 0;
        return 0;
 }
 
index 5d3447f4582ce797b2439b5a347e1ede7041066c..fec225d1b6b74520f6b132c2bcefd5dcb600b484 100644 (file)
@@ -80,7 +80,7 @@ struct acpi_power_resource {
 
 static struct list_head acpi_power_resource_list;
 
-static struct file_operations acpi_power_fops = {
+static const struct file_operations acpi_power_fops = {
        .open = acpi_power_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
index 52674323b14da5724bfdc4ffee830609f116d248..b13d64415b7ab651fc42be5b13351427d9dad6a3 100644 (file)
@@ -102,7 +102,7 @@ static struct acpi_driver acpi_processor_driver = {
 #define INSTALL_NOTIFY_HANDLER         1
 #define UNINSTALL_NOTIFY_HANDLER       2
 
-static struct file_operations acpi_processor_info_fops = {
+static const struct file_operations acpi_processor_info_fops = {
        .open = acpi_processor_info_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
index 8e9c26aae8fed13b69875c211612c7d2cb01b820..71066066d626b82f8b0bc656e253bb925761ee8c 100644 (file)
@@ -1070,7 +1070,7 @@ static int acpi_processor_power_open_fs(struct inode *inode, struct file *file)
                           PDE(inode)->data);
 }
 
-static struct file_operations acpi_processor_power_fops = {
+static const struct file_operations acpi_processor_power_fops = {
        .open = acpi_processor_power_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
index 4696a85a98b92b34c2789e52fae6a6122039b447..34962578039d9a69c40b4ccca113617105456690 100644 (file)
@@ -434,7 +434,7 @@ acpi_system_wakeup_device_open_fs(struct inode *inode, struct file *file)
                           PDE(inode)->data);
 }
 
-static struct file_operations acpi_system_wakeup_device_fops = {
+static const struct file_operations acpi_system_wakeup_device_fops = {
        .open = acpi_system_wakeup_device_open_fs,
        .read = seq_read,
        .write = acpi_system_write_wakeup_device,
@@ -443,7 +443,7 @@ static struct file_operations acpi_system_wakeup_device_fops = {
 };
 
 #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
-static struct file_operations acpi_system_sleep_fops = {
+static const struct file_operations acpi_system_sleep_fops = {
        .open = acpi_system_sleep_open_fs,
        .read = seq_read,
        .write = acpi_system_write_sleep,
@@ -452,7 +452,7 @@ static struct file_operations acpi_system_sleep_fops = {
 };
 #endif                         /* CONFIG_ACPI_SLEEP_PROC_SLEEP */
 
-static struct file_operations acpi_system_alarm_fops = {
+static const struct file_operations acpi_system_alarm_fops = {
        .open = acpi_system_alarm_open_fs,
        .read = seq_read,
        .write = acpi_system_write_alarm,
index c3bb7faad75ee59e613c2d93bf2280051c64b344..d86dcb3c236601347689ee5307a7da42bc4bed38 100644 (file)
@@ -57,7 +57,7 @@ static int acpi_system_info_open_fs(struct inode *inode, struct file *file)
        return single_open(file, acpi_system_read_info, PDE(inode)->data);
 }
 
-static struct file_operations acpi_system_info_ops = {
+static const struct file_operations acpi_system_info_ops = {
        .open = acpi_system_info_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -67,7 +67,7 @@ static struct file_operations acpi_system_info_ops = {
 static ssize_t acpi_system_read_dsdt(struct file *, char __user *, size_t,
                                     loff_t *);
 
-static struct file_operations acpi_system_dsdt_ops = {
+static const struct file_operations acpi_system_dsdt_ops = {
        .read = acpi_system_read_dsdt,
 };
 
@@ -94,7 +94,7 @@ acpi_system_read_dsdt(struct file *file,
 static ssize_t acpi_system_read_fadt(struct file *, char __user *, size_t,
                                     loff_t *);
 
-static struct file_operations acpi_system_fadt_ops = {
+static const struct file_operations acpi_system_fadt_ops = {
        .read = acpi_system_read_fadt,
 };
 
index 99eacceff56384c83710e848c8715e3d242953fe..7856db759af0be7579abcd1733e74d1782455dbe 100644 (file)
@@ -320,6 +320,16 @@ acpi_tb_get_this_table(struct acpi_pointer *address,
 
        ACPI_FUNCTION_TRACE(tb_get_this_table);
 
+       /* Validate minimum length */
+
+       if (header->length < sizeof(struct acpi_table_header)) {
+               ACPI_ERROR((AE_INFO,
+                           "Table length (%X) is smaller than minimum (%X)",
+                           header->length, sizeof(struct acpi_table_header)));
+
+               return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
+       }
+
        /*
         * Flags contains the current processor mode (Virtual or Physical
         * addressing) The pointer_type is either Logical or Physical
@@ -356,7 +366,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address,
                 */
                status = acpi_os_map_memory(address->pointer.physical,
                                            (acpi_size) header->length,
-                                           (void *)&full_table);
+                                           ACPI_CAST_PTR(void, &full_table));
                if (ACPI_FAILURE(status)) {
                        ACPI_ERROR((AE_INFO,
                                    "Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X",
index 7ca2df75bb11909522f6388628f8a1fb8febefdc..1668a232fb6754fb3a0d571cf32cb443863cefa0 100644 (file)
@@ -256,7 +256,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type,
 
        status = acpi_ut_allocate_owner_id(&table_desc->owner_id);
        if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
+               goto error_exit1;
        }
 
        /* Install the table into the global data structure */
@@ -274,8 +274,8 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type,
                 * at this location, so return an error.
                 */
                if (list_head->next) {
-                       ACPI_FREE(table_desc);
-                       return_ACPI_STATUS(AE_ALREADY_EXISTS);
+                       status = AE_ALREADY_EXISTS;
+                       goto error_exit2;
                }
 
                table_desc->next = list_head->next;
@@ -335,6 +335,17 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type,
        table_info->owner_id = table_desc->owner_id;
        table_info->installed_desc = table_desc;
        return_ACPI_STATUS(AE_OK);
+
+       /* Error exit with cleanup */
+
+      error_exit2:
+
+       acpi_ut_release_owner_id(&table_desc->owner_id);
+
+      error_exit1:
+
+       ACPI_FREE(table_desc);
+       return_ACPI_STATUS(status);
 }
 
 /*******************************************************************************
@@ -525,6 +536,10 @@ struct acpi_table_desc *acpi_tb_uninstall_table(struct acpi_table_desc
 
        acpi_tb_delete_single_table(table_desc);
 
+       /* Free the owner ID associated with this table */
+
+       acpi_ut_release_owner_id(&table_desc->owner_id);
+
        /* Free the table descriptor */
 
        next_desc = table_desc->next;
index abcb08c2592ae3f5ca128dfb4d60debd6f76ac9a..0ad3dbb9ebca377563a6a177ab092704f63545f8 100644 (file)
@@ -183,6 +183,17 @@ acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr)
 
        ACPI_FUNCTION_ENTRY();
 
+       /* Validate minimum length */
+
+       if (table_ptr->length < sizeof(struct acpi_table_header)) {
+               ACPI_ERROR((AE_INFO,
+                           "RSDT/XSDT length (%X) is smaller than minimum (%X)",
+                           table_ptr->length,
+                           sizeof(struct acpi_table_header)));
+
+               return (AE_INVALID_TABLE_LENGTH);
+       }
+
        /* Search for appropriate signature, RSDT or XSDT */
 
        if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) {
@@ -210,7 +221,7 @@ acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr)
                        ACPI_ERROR((AE_INFO, "Looking for XSDT"));
                }
 
-               ACPI_DUMP_BUFFER((char *)table_ptr, 48);
+               ACPI_DUMP_BUFFER(ACPI_CAST_PTR(char, table_ptr), 48);
                return (AE_BAD_SIGNATURE);
        }
 
@@ -258,7 +269,7 @@ acpi_status acpi_tb_get_table_rsdt(void)
 
        status = acpi_tb_validate_rsdt(table_info.pointer);
        if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
+               goto error_cleanup;
        }
 
        /* Get the number of tables defined in the RSDT or XSDT */
@@ -270,14 +281,14 @@ acpi_status acpi_tb_get_table_rsdt(void)
 
        status = acpi_tb_convert_to_xsdt(&table_info);
        if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
+               goto error_cleanup;
        }
 
        /* Save the table pointers and allocation info */
 
        status = acpi_tb_init_table_descriptor(ACPI_TABLE_ID_XSDT, &table_info);
        if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
+               goto error_cleanup;
        }
 
        acpi_gbl_XSDT =
@@ -285,4 +296,12 @@ acpi_status acpi_tb_get_table_rsdt(void)
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "XSDT located at %p\n", acpi_gbl_XSDT));
        return_ACPI_STATUS(status);
+
+      error_cleanup:
+
+       /* Free table allocated by acpi_tb_get_table */
+
+       acpi_tb_delete_single_table(&table_info);
+
+       return_ACPI_STATUS(status);
 }
index 4e91f29848156d56ce70ac69dce507036bb746ed..7767987be15a0d517acf10fa5b6327b203e08f23 100644 (file)
@@ -134,8 +134,8 @@ ACPI_EXPORT_SYMBOL(acpi_load_tables)
  * RETURN:      Status
  *
  * DESCRIPTION: This function is called to load a table from the caller's
- *              buffer.  The buffer must contain an entire ACPI Table including
- *              a valid header.  The header fields will be verified, and if it
+ *              buffer. The buffer must contain an entire ACPI Table including
+ *              a valid header. The header fields will be verified, and if it
  *              is determined that the table is invalid, the call will fail.
  *
  ******************************************************************************/
@@ -245,15 +245,18 @@ acpi_status acpi_unload_table(acpi_table_type table_type)
        /* Find all tables of the requested type */
 
        table_desc = acpi_gbl_table_lists[table_type].next;
+       if (!table_desc) {
+               return_ACPI_STATUS(AE_NOT_EXIST);
+       }
+
        while (table_desc) {
                /*
-                * Delete all namespace entries owned by this table.  Note that these
-                * entries can appear anywhere in the namespace by virtue of the AML
-                * "Scope" operator.  Thus, we need to track ownership by an ID, not
+                * Delete all namespace objects owned by this table. Note that these
+                * objects can appear anywhere in the namespace by virtue of the AML
+                * "Scope" operator. Thus, we need to track ownership by an ID, not
                 * simply a position within the hierarchy
                 */
                acpi_ns_delete_namespace_by_owner(table_desc->owner_id);
-               acpi_ut_release_owner_id(&table_desc->owner_id);
                table_desc = table_desc->next;
        }
 
@@ -275,12 +278,12 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table)
  *                                see acpi_gbl_acpi_table_flag
  *              out_table_header - pointer to the struct acpi_table_header if successful
  *
- * DESCRIPTION: This function is called to get an ACPI table header.  The caller
+ * DESCRIPTION: This function is called to get an ACPI table header. The caller
  *              supplies an pointer to a data area sufficient to contain an ACPI
  *              struct acpi_table_header structure.
  *
  *              The header contains a length field that can be used to determine
- *              the size of the buffer needed to contain the entire table.  This
+ *              the size of the buffer needed to contain the entire table. This
  *              function is not valid for the RSD PTR table since it does not
  *              have a standard header and is fixed length.
  *
@@ -322,7 +325,8 @@ acpi_get_table_header(acpi_table_type table_type,
 
        /* Copy the header to the caller's buffer */
 
-       ACPI_MEMCPY((void *)out_table_header, (void *)tbl_ptr,
+       ACPI_MEMCPY(ACPI_CAST_PTR(void, out_table_header),
+                   ACPI_CAST_PTR(void, tbl_ptr),
                    sizeof(struct acpi_table_header));
 
        return_ACPI_STATUS(status);
@@ -344,10 +348,10 @@ ACPI_EXPORT_SYMBOL(acpi_get_table_header)
  *
  * RETURN:      Status
  *
- * DESCRIPTION: This function is called to get an ACPI table.  The caller
+ * DESCRIPTION: This function is called to get an ACPI table. The caller
  *              supplies an out_buffer large enough to contain the entire ACPI
- *              table.  The caller should call the acpi_get_table_header function
- *              first to determine the buffer size needed.  Upon completion
+ *              table. The caller should call the acpi_get_table_header function
+ *              first to determine the buffer size needed. Upon completion
  *              the out_buffer->Length field will indicate the number of bytes
  *              copied into the out_buffer->buf_ptr buffer. This table will be
  *              a complete table including the header.
@@ -417,7 +421,9 @@ acpi_get_table(acpi_table_type table_type,
 
        /* Copy the table to the buffer */
 
-       ACPI_MEMCPY((void *)ret_buffer->pointer, (void *)tbl_ptr, table_length);
+       ACPI_MEMCPY(ACPI_CAST_PTR(void, ret_buffer->pointer),
+                   ACPI_CAST_PTR(void, tbl_ptr), table_length);
+
        return_ACPI_STATUS(AE_OK);
 }
 
index 503c0b99db122814e9c30767e5358ab226d9cdac..5753d06b786021e0434a221cd79b6c46875c8b36 100644 (file)
@@ -176,21 +176,21 @@ struct acpi_thermal {
        struct timer_list timer;
 };
 
-static struct file_operations acpi_thermal_state_fops = {
+static const struct file_operations acpi_thermal_state_fops = {
        .open = acpi_thermal_state_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
        .release = single_release,
 };
 
-static struct file_operations acpi_thermal_temp_fops = {
+static const struct file_operations acpi_thermal_temp_fops = {
        .open = acpi_thermal_temp_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
        .release = single_release,
 };
 
-static struct file_operations acpi_thermal_trip_fops = {
+static const struct file_operations acpi_thermal_trip_fops = {
        .open = acpi_thermal_trip_open_fs,
        .read = seq_read,
        .write = acpi_thermal_write_trip_points,
@@ -198,7 +198,7 @@ static struct file_operations acpi_thermal_trip_fops = {
        .release = single_release,
 };
 
-static struct file_operations acpi_thermal_cooling_fops = {
+static const struct file_operations acpi_thermal_cooling_fops = {
        .open = acpi_thermal_cooling_open_fs,
        .read = seq_read,
        .write = acpi_thermal_write_cooling_mode,
@@ -206,7 +206,7 @@ static struct file_operations acpi_thermal_cooling_fops = {
        .release = single_release,
 };
 
-static struct file_operations acpi_thermal_polling_fops = {
+static const struct file_operations acpi_thermal_polling_fops = {
        .open = acpi_thermal_polling_open_fs,
        .read = seq_read,
        .write = acpi_thermal_write_polling,
@@ -1359,13 +1359,28 @@ static int acpi_thermal_remove(struct acpi_device *device, int type)
 static int acpi_thermal_resume(struct acpi_device *device, int state)
 {
        struct acpi_thermal *tz = NULL;
+       int i;
 
        if (!device || !acpi_driver_data(device))
                return -EINVAL;
 
        tz = (struct acpi_thermal *)acpi_driver_data(device);
 
-       acpi_thermal_check(tz);
+       acpi_thermal_get_temperature(tz);
+
+       for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
+               if (tz->trips.active[i].flags.valid) {
+                       tz->temperature = tz->trips.active[i].temperature;
+                       tz->trips.active[i].flags.enabled = 0;
+
+                       acpi_thermal_active(tz);
+
+                       tz->state.active |= tz->trips.active[i].flags.enabled;
+                       tz->state.active_index = i;
+               }
+       }
+
+       acpi_thermal_check(tz);
 
        return AE_OK;
 }
index 5cff17dc78b331855b143ebffa7d95b749dcab68..f6cbc0b1bfd057f3d51257b7c1c35b12564ce708 100644 (file)
@@ -285,6 +285,7 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer,
        return (status);
 }
 
+#ifdef NOT_USED_BY_LINUX
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ut_allocate
@@ -360,3 +361,4 @@ void *acpi_ut_allocate_zeroed(acpi_size size,
 
        return (allocation);
 }
+#endif
index 5ec1cfcc611d2bc2203d2ccc9b1dc7f7dfc36442..bb1eaf9aa65370e4b30889159178713ad2fa346e 100644 (file)
@@ -47,7 +47,7 @@
 ACPI_MODULE_NAME("utdebug")
 
 #ifdef ACPI_DEBUG_OUTPUT
-static u32 acpi_gbl_prev_thread_id = 0xFFFFFFFF;
+static acpi_thread_id acpi_gbl_prev_thread_id;
 static char *acpi_gbl_fn_entry_str = "----Entry";
 static char *acpi_gbl_fn_exit_str = "----Exit-";
 
@@ -181,7 +181,7 @@ acpi_ut_debug_print(u32 requested_debug_level,
                if (ACPI_LV_THREADS & acpi_dbg_level) {
                        acpi_os_printf
                            ("\n**** Context Switch from TID %X to TID %X ****\n\n",
-                            acpi_gbl_prev_thread_id, thread_id);
+                            (u32) acpi_gbl_prev_thread_id, (u32) thread_id);
                }
 
                acpi_gbl_prev_thread_id = thread_id;
index 38ebe1c543304e9258fb01fca4fc294240666b8e..9d3f1149ba217736e5ff8b376445e522f6f8a79f 100644 (file)
@@ -447,11 +447,16 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
                 */
                switch (ACPI_GET_OBJECT_TYPE(object)) {
                case ACPI_TYPE_DEVICE:
+               case ACPI_TYPE_PROCESSOR:
+               case ACPI_TYPE_POWER:
+               case ACPI_TYPE_THERMAL:
 
-                       acpi_ut_update_ref_count(object->device.system_notify,
-                                                action);
-                       acpi_ut_update_ref_count(object->device.device_notify,
-                                                action);
+                       /* Update the notify objects for these types (if present) */
+
+                       acpi_ut_update_ref_count(object->common_notify.
+                                                system_notify, action);
+                       acpi_ut_update_ref_count(object->common_notify.
+                                                device_notify, action);
                        break;
 
                case ACPI_TYPE_PACKAGE:
index 33268310c73804be4249cfc258b80f788985c4db..6d8a8211be90a4f84abf2ad8efb62c8a3c9cabfa 100644 (file)
@@ -65,7 +65,7 @@ ACPI_MODULE_NAME("utmisc")
 u8 acpi_ut_is_aml_table(struct acpi_table_header *table)
 {
 
-       /* Ignore tables that contain AML */
+       /* These are the only tables that contain executable AML */
 
        if (ACPI_COMPARE_NAME(table->signature, DSDT_SIG) ||
            ACPI_COMPARE_NAME(table->signature, PSDT_SIG) ||
@@ -419,10 +419,15 @@ void acpi_ut_set_integer_width(u8 revision)
 {
 
        if (revision <= 1) {
+
+               /* 32-bit case */
+
                acpi_gbl_integer_bit_width = 32;
                acpi_gbl_integer_nybble_width = 8;
                acpi_gbl_integer_byte_width = 4;
        } else {
+               /* 64-bit case (ACPI 2.0+) */
+
                acpi_gbl_integer_bit_width = 64;
                acpi_gbl_integer_nybble_width = 16;
                acpi_gbl_integer_byte_width = 8;
@@ -502,6 +507,7 @@ acpi_ut_display_init_pathname(u8 type,
  * FUNCTION:    acpi_ut_valid_acpi_char
  *
  * PARAMETERS:  Char            - The character to be examined
+ *              Position        - Byte position (0-3)
  *
  * RETURN:      TRUE if the character is valid, FALSE otherwise
  *
@@ -609,7 +615,9 @@ acpi_name acpi_ut_repair_name(acpi_name name)
  *
  * RETURN:      Status and Converted value
  *
- * DESCRIPTION: Convert a string into an unsigned value.
+ * DESCRIPTION: Convert a string into an unsigned value. Performs either a
+ *              32-bit or 64-bit conversion, depending on the current mode
+ *              of the interpreter.
  *              NOTE: Does not support Octal strings, not needed.
  *
  ******************************************************************************/
@@ -627,7 +635,7 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer)
        u8 sign_of0x = 0;
        u8 term = 0;
 
-       ACPI_FUNCTION_TRACE(ut_stroul64);
+       ACPI_FUNCTION_TRACE_STR(ut_stroul64, string);
 
        switch (base) {
        case ACPI_ANY_BASE:
@@ -675,11 +683,13 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer)
                }
        }
 
+       /*
+        * Perform a 32-bit or 64-bit conversion, depending upon the current
+        * execution mode of the interpreter
+        */
        dividend = (mode32) ? ACPI_UINT32_MAX : ACPI_UINT64_MAX;
 
-       /* At least one character in the string here */
-
-       /* Main loop: convert the string to a 64-bit integer */
+       /* Main loop: convert the string to a 32- or 64-bit integer */
 
        while (*string) {
                if (ACPI_IS_DIGIT(*string)) {
@@ -754,6 +764,9 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer)
 
       all_done:
 
+       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Converted value: %8.8X%8.8X\n",
+                         ACPI_FORMAT_UINT64(return_value)));
+
        *ret_integer = return_value;
        return_ACPI_STATUS(AE_OK);
 
index dfc8f30ca892d13255a78d1cbaa622de4a2dbb38..c39062a047cd5c65b86aef83b9a11174e9e93a4e 100644 (file)
@@ -244,14 +244,14 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
 
        ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
                          "Thread %X attempting to acquire Mutex [%s]\n",
-                         this_thread_id, acpi_ut_get_mutex_name(mutex_id)));
+                         (u32) this_thread_id, acpi_ut_get_mutex_name(mutex_id)));
 
        status = acpi_os_acquire_mutex(acpi_gbl_mutex_info[mutex_id].mutex,
                                       ACPI_WAIT_FOREVER);
        if (ACPI_SUCCESS(status)) {
                ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
                                  "Thread %X acquired Mutex [%s]\n",
-                                 this_thread_id,
+                                 (u32) this_thread_id,
                                  acpi_ut_get_mutex_name(mutex_id)));
 
                acpi_gbl_mutex_info[mutex_id].use_count++;
@@ -259,7 +259,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
        } else {
                ACPI_EXCEPTION((AE_INFO, status,
                                "Thread %X could not acquire Mutex [%X]",
-                               this_thread_id, mutex_id));
+                               (u32) this_thread_id, mutex_id));
        }
 
        return (status);
@@ -285,7 +285,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
 
        this_thread_id = acpi_os_get_thread_id();
        ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
-                         "Thread %X releasing Mutex [%s]\n", this_thread_id,
+                         "Thread %X releasing Mutex [%s]\n", (u32) this_thread_id,
                          acpi_ut_get_mutex_name(mutex_id)));
 
        if (mutex_id > ACPI_MAX_MUTEX) {
index 0f5c5bb5deff29dd1e53a23153a8fa03f81055d5..eaa13d05c859cd0ec20ba6543984ada6da747ff3 100644 (file)
@@ -199,6 +199,13 @@ struct acpi_thread_state *acpi_ut_create_thread_state(void)
        state->common.descriptor_type = ACPI_DESC_TYPE_STATE_THREAD;
        state->thread.thread_id = acpi_os_get_thread_id();
 
+       /* Check for invalid thread ID - zero is very bad, it will break things */
+
+       if (!state->thread.thread_id) {
+               ACPI_ERROR((AE_INFO, "Invalid zero ID from AcpiOsGetThreadId"));
+               state->thread.thread_id = (acpi_thread_id) 1;
+       }
+
        return_PTR((struct acpi_thread_state *)state);
 }
 
index 01a9f1cb77438eeff822a5ac3a825179a72e8028..cfa5af883e1357a687df2168d6a706b20f8cbb8f 100644 (file)
@@ -398,7 +398,7 @@ config ATM_FORE200E_USE_TASKLET
        default n
        help
          This defers work to be done by the interrupt handler to a
-         tasklet instead of hanlding everything at interrupt time.  This
+         tasklet instead of handling everything at interrupt time.  This
          may improve the responsive of the host.
 
 config ATM_FORE200E_TX_RETRY
index 80502dc6ed668dbee5bc388520e1a819d8449959..0b4e22436935d8c4403a5d0dafa8090780cbca3e 100644 (file)
@@ -20,7 +20,7 @@ config PREVENT_FIRMWARE_BUILD
 
 config FW_LOADER
        tristate "Userspace firmware loading support"
-       select HOTPLUG
+       depends on HOTPLUG
        ---help---
          This option is provided for the case where no in-kernel-tree modules
          require userspace firmware loading support, but a module built outside
index 83fa8b291a59ebdbcdf036cb331d86a9fe564a85..2e954d07175a5c6d067531ac23d155c1a24d2d8d 100644 (file)
@@ -129,7 +129,7 @@ static struct kobj_type ktype_bus = {
 
 };
 
-decl_subsys(bus, &ktype_bus, NULL);
+static decl_subsys(bus, &ktype_bus, NULL);
 
 
 #ifdef CONFIG_HOTPLUG
@@ -598,12 +598,13 @@ void put_bus(struct bus_type * bus)
  *
  *     Note that kset_find_obj increments bus' reference count.
  */
-
+#if 0
 struct bus_type * find_bus(char * name)
 {
        struct kobject * k = kset_find_obj(&bus_subsys.kset, name);
        return k ? to_bus(k) : NULL;
 }
+#endif  /*  0  */
 
 
 /**
index b21f864c9ce8810a6c16f0e091395dfffb1e545a..be6b5bc0677d545c0f79efd659f98d268fffb200 100644 (file)
@@ -559,20 +559,20 @@ static void device_create_release(struct device *dev)
 
 /**
  * device_create - creates a device and registers it with sysfs
- * @cs: pointer to the struct class that this device should be registered to.
- * @parent: pointer to the parent struct device of this new device, if any.
- * @dev: the dev_t for the char device to be added.
- * @fmt: string for the class device's name
+ * @class: pointer to the struct class that this device should be registered to
+ * @parent: pointer to the parent struct device of this new device, if any
+ * @devt: the dev_t for the char device to be added
+ * @fmt: string for the device's name
+ *
+ * This function can be used by char device classes.  A struct device
+ * will be created in sysfs, registered to the specified class.
  *
- * This function can be used by char device classes.  A struct
- * device will be created in sysfs, registered to the specified
- * class.
  * A "dev" file will be created, showing the dev_t for the device, if
  * the dev_t is not 0,0.
- * If a pointer to a parent struct device is passed in, the newly
- * created struct device will be a child of that device in sysfs.  The
- * pointer to the struct device will be returned from the call.  Any
- * further sysfs files that might be required can be created using this
+ * If a pointer to a parent struct device is passed in, the newly created
+ * struct device will be a child of that device in sysfs.
+ * The pointer to the struct device will be returned from the call.
+ * Any further sysfs files that might be required can be created using this
  * pointer.
  *
  * Note: the struct class passed to this function must have previously
@@ -620,11 +620,11 @@ EXPORT_SYMBOL_GPL(device_create);
 
 /**
  * device_destroy - removes a device that was created with device_create()
- * @class: the pointer to the struct class that this device was registered * with.
- * @dev: the dev_t of the device that was previously registered.
+ * @class: pointer to the struct class that this device was registered with
+ * @devt: the dev_t of the device that was previously registered
  *
- * This call unregisters and cleans up a class device that was created with a
- * call to class_device_create()
+ * This call unregisters and cleans up a device that was created with a
+ * call to device_create().
  */
 void device_destroy(struct class *class, dev_t devt)
 {
index 93d94749310bdc6c15beaec61f1f30ccea278ad9..b5382cedf0c09cad0376df575c32b194d5ba7c0d 100644 (file)
@@ -400,6 +400,16 @@ config BLK_DEV_RAM_SIZE
          what are you doing. If you are using IBM S/390, then set this to
          8192.
 
+config BLK_DEV_RAM_BLOCKSIZE
+       int "Default RAM disk block size (bytes)"
+       depends on BLK_DEV_RAM
+       default "1024"
+       help
+         The default value is 1024 kilobytes.  PAGE_SIZE is a much more
+         efficient choice however.  The default is kept to ensure initrd
+         setups function - apparently needed by the rd_load_image routine
+         that supposes the filesystem in the image uses a 1024 blocksize.
+
 config BLK_DEV_INITRD
        bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
        depends on BROKEN || !FRV
index 5327f553b4f59e13db2098b264e1628513c5c023..1bc1cf9603f19c4e4975bb63c1ff5ccbeb09a7cb 100644 (file)
@@ -162,7 +162,7 @@ aoechr_open(struct inode *inode, struct file *filp)
 {
        int n, i;
 
-       n = MINOR(inode->i_rdev);
+       n = iminor(inode);
        filp->private_data = (void *) (unsigned long) n;
 
        for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
index 757f42dd8e86683bf4afdbc9312f37a9237dbff8..78082edc14b4f6fdaec8652f12b45e3a921c3223 100644 (file)
@@ -1739,8 +1739,6 @@ static void getgeometry(int ctlr)
             (log_index < id_ctlr_buf->nr_drvs)
             && (log_unit < NWD);
             log_unit++) {
-               struct gendisk *disk = ida_gendisk[ctlr][log_unit];
-
                size = sizeof(sense_log_drv_stat_t);
 
                /*
index 3cf246abb5ecd09ccc4de255a60f4982cc7e1e8e..a3f64bfe6b5870eb52229cdd9e9dd36fd6289aaf 100644 (file)
@@ -84,7 +84,7 @@ int rd_size = CONFIG_BLK_DEV_RAM_SIZE;                /* Size of the RAM disks */
  * behaviour. The default is still BLOCK_SIZE (needed by rd_load_image that
  * supposes the filesystem in the image uses a BLOCK_SIZE blocksize).
  */
-static int rd_blocksize = BLOCK_SIZE;          /* blocksize of the RAM disks */
+static int rd_blocksize = CONFIG_BLK_DEV_RAM_BLOCKSIZE;
 
 /*
  * Copyright (C) 2000 Linus Torvalds.
index 6f67141f4de0fbcc3b0d5461fb0a7766b7e627ff..13ba729cdd57445821dbe4bb5bf92f1dd1d4ac07 100644 (file)
@@ -234,6 +234,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
        data->fw_data = kmalloc(firmware->size, GFP_KERNEL);
        if (!data->fw_data) {
                BT_ERR("Can't allocate memory for firmware image");
+               release_firmware(firmware);
                usb_free_urb(data->urb);
                kfree(data->buffer);
                kfree(data);
index 1994270c16e1992536380b620ef70afcf33c28bb..93ba25b7ea328303fad462372ddb575e69ea207e 100644 (file)
@@ -191,7 +191,7 @@ static int hci_uart_flush(struct hci_dev *hdev)
 
        /* Flush any pending characters in the driver and discipline. */
        tty_ldisc_flush(tty);
-       if (tty->driver->flush_buffer)
+       if (tty->driver && tty->driver->flush_buffer)
                tty->driver->flush_buffer(tty);
 
        if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
@@ -290,7 +290,7 @@ static int hci_uart_tty_open(struct tty_struct *tty)
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
 
-       if (tty->driver->flush_buffer)
+       if (tty->driver && tty->driver->flush_buffer)
                tty->driver->flush_buffer(tty);
 
        return 0;
index ca27ee89240babcc1fac21f505973670e2e96855..d239cf8b20bd1e769a84612959e55eccfe8e1510 100644 (file)
@@ -1837,7 +1837,7 @@ static int dvd_read_bca(struct cdrom_device_info *cdi, dvd_struct *s)
        init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_READ);
        cgc.cmd[0] = GPCMD_READ_DVD_STRUCTURE;
        cgc.cmd[7] = s->type;
-       cgc.cmd[9] = cgc.buflen = 0xff;
+       cgc.cmd[9] = cgc.buflen & 0xff;
 
        if ((ret = cdo->generic_packet(cdi, &cgc)))
                return ret;
index 56612a2dca6be14d2cf05d84552f6a1f2a1c538c..41db8060e8f791502c51bb559ffbfa4881327e5c 100644 (file)
@@ -1299,7 +1299,7 @@ static int __init hvsi_console_init(void)
                hp->inbuf_end = hp->inbuf;
                hp->state = HVSI_CLOSED;
                hp->vtermno = *vtermno;
-               hp->virq = irq_create_mapping(NULL, irq[0], 0);
+               hp->virq = irq_create_mapping(NULL, irq[0]);
                if (hp->virq == NO_IRQ) {
                        printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n",
                                __FUNCTION__, irq[0]);
index 518ece7ac656789be460a987d097243ea4565dda..7907ae88c2f4df48cdecccd87d0c20f6e7f2b8e2 100644 (file)
@@ -3186,3 +3186,10 @@ ip2trace (unsigned short pn, unsigned char cat, unsigned char label, unsigned lo
 
 
 MODULE_LICENSE("GPL");
+
+static struct pci_device_id ip2main_pci_tbl[] __devinitdata = {
+       { PCI_DEVICE(PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_IP2EX) },
+       { }
+};
+
+MODULE_DEVICE_TABLE(pci, ip2main_pci_tbl);
index e97c32ceb7962b745d3ea6d164a353f930686c74..917b20402664aad5ccf970255f65f15974f06eab 100644 (file)
@@ -95,7 +95,7 @@ static inline int valid_phys_addr_range(unsigned long addr, size_t count)
        return 1;
 }
 
-static inline int valid_mmap_phys_addr_range(unsigned long addr, size_t size)
+static inline int valid_mmap_phys_addr_range(unsigned long pfn, size_t size)
 {
        return 1;
 }
@@ -242,7 +242,7 @@ static int mmap_mem(struct file * file, struct vm_area_struct * vma)
 {
        size_t size = vma->vm_end - vma->vm_start;
 
-       if (!valid_mmap_phys_addr_range(vma->vm_pgoff << PAGE_SHIFT, size))
+       if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size))
                return -EINVAL;
 
        vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff,
index 5b91e4e25641d281916ea16b1e1a57371ff0bebd..7719bd75810b2d561a9f9ef0f703573b56e8998b 100644 (file)
@@ -68,13 +68,11 @@ ssize_t nsc_gpio_write(struct file *file, const char __user *data,
                        amp->gpio_config(m, ~1, 0);
                        break;
                case 'T':
-                       dev_dbg(dev, "GPIO%d output is push pull\n",
-                              m);
+                       dev_dbg(dev, "GPIO%d output is push pull\n", m);
                        amp->gpio_config(m, ~2, 2);
                        break;
                case 't':
-                       dev_dbg(dev, "GPIO%d output is open drain\n",
-                              m);
+                       dev_dbg(dev, "GPIO%d output is open drain\n", m);
                        amp->gpio_config(m, ~2, 0);
                        break;
                case 'P':
index 4005ee0aa11ed5a9a2bc02ccc1f069c2c2d05ff6..645eb81cb5a9d6be636fe4eef7dfb6a618ea672f 100644 (file)
@@ -3,18 +3,18 @@
    National Semiconductor PC8736x GPIO driver.  Allows a user space
    process to play with the GPIO pins.
 
-   Copyright (c) 2005 Jim Cromie <jim.cromie@gmail.com>
+   Copyright (c) 2005,2006 Jim Cromie <jim.cromie@gmail.com>
 
    adapted from linux/drivers/char/scx200_gpio.c
    Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com>,
 */
 
-#include <linux/config.h>
 #include <linux/fs.h>
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/cdev.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
 #include <linux/mutex.h>
@@ -25,7 +25,7 @@
 #define DEVNAME "pc8736x_gpio"
 
 MODULE_AUTHOR("Jim Cromie <jim.cromie@gmail.com>");
-MODULE_DESCRIPTION("NatSemi PC-8736x GPIO Pin Driver");
+MODULE_DESCRIPTION("NatSemi/Winbond PC-8736x GPIO Pin Driver");
 MODULE_LICENSE("GPL");
 
 static int major;              /* default to dynamic major */
@@ -38,14 +38,14 @@ static u8 pc8736x_gpio_shadow[4];
 
 #define SIO_BASE1       0x2E   /* 1st command-reg to check */
 #define SIO_BASE2       0x4E   /* alt command-reg to check */
-#define SIO_BASE_OFFSET 0x20
 
 #define SIO_SID                0x20    /* SuperI/O ID Register */
 #define SIO_SID_VALUE  0xe9    /* Expected value in SuperI/O ID Register */
 
 #define SIO_CF1                0x21    /* chip config, bit0 is chip enable */
 
-#define PC8736X_GPIO_SIZE      16
+#define PC8736X_GPIO_RANGE     16 /* ioaddr range */
+#define PC8736X_GPIO_CT                32 /* minors matching 4 8 bit ports */
 
 #define SIO_UNIT_SEL   0x7     /* unit select reg */
 #define SIO_UNIT_ACT   0x30    /* unit enable */
@@ -212,31 +212,30 @@ static void pc8736x_gpio_change(unsigned index)
        pc8736x_gpio_set(index, !pc8736x_gpio_current(index));
 }
 
-static struct nsc_gpio_ops pc8736x_access = {
+static struct nsc_gpio_ops pc8736x_gpio_ops = {
        .owner          = THIS_MODULE,
        .gpio_config    = pc8736x_gpio_configure,
        .gpio_dump      = nsc_gpio_dump,
        .gpio_get       = pc8736x_gpio_get,
        .gpio_set       = pc8736x_gpio_set,
-       .gpio_set_high  = pc8736x_gpio_set_high,
-       .gpio_set_low   = pc8736x_gpio_set_low,
        .gpio_change    = pc8736x_gpio_change,
        .gpio_current   = pc8736x_gpio_current
 };
+EXPORT_SYMBOL(pc8736x_gpio_ops);
 
 static int pc8736x_gpio_open(struct inode *inode, struct file *file)
 {
        unsigned m = iminor(inode);
-       file->private_data = &pc8736x_access;
+       file->private_data = &pc8736x_gpio_ops;
 
        dev_dbg(&pdev->dev, "open %d\n", m);
 
-       if (m > 63)
+       if (m >= PC8736X_GPIO_CT)
                return -EINVAL;
        return nonseekable_open(inode, file);
 }
 
-static const struct file_operations pc8736x_gpio_fops = {
+static const struct file_operations pc8736x_gpio_fileops = {
        .owner  = THIS_MODULE,
        .open   = pc8736x_gpio_open,
        .write  = nsc_gpio_write,
@@ -255,9 +254,12 @@ static void __init pc8736x_init_shadow(void)
 
 }
 
+static struct cdev pc8736x_gpio_cdev;
+
 static int __init pc8736x_gpio_init(void)
 {
-       int rc = 0;
+       int rc;
+       dev_t devid;
 
        pdev = platform_device_alloc(DEVNAME, 0);
        if (!pdev)
@@ -275,7 +277,7 @@ static int __init pc8736x_gpio_init(void)
                dev_err(&pdev->dev, "no device found\n");
                goto undo_platform_dev_add;
        }
-       pc8736x_access.dev = &pdev->dev;
+       pc8736x_gpio_ops.dev = &pdev->dev;
 
        /* Verify that chip and it's GPIO unit are both enabled.
           My BIOS does this, so I take minimum action here
@@ -297,7 +299,7 @@ static int __init pc8736x_gpio_init(void)
        pc8736x_gpio_base = (superio_inb(SIO_BASE_HADDR) << 8
                             | superio_inb(SIO_BASE_LADDR));
 
-       if (!request_region(pc8736x_gpio_base, 16, DEVNAME)) {
+       if (!request_region(pc8736x_gpio_base, PC8736X_GPIO_RANGE, DEVNAME)) {
                rc = -ENODEV;
                dev_err(&pdev->dev, "GPIO ioport %x busy\n",
                        pc8736x_gpio_base);
@@ -305,10 +307,17 @@ static int __init pc8736x_gpio_init(void)
        }
        dev_info(&pdev->dev, "GPIO ioport %x reserved\n", pc8736x_gpio_base);
 
-       rc = register_chrdev(major, DEVNAME, &pc8736x_gpio_fops);
+       if (major) {
+               devid = MKDEV(major, 0);
+               rc = register_chrdev_region(devid, PC8736X_GPIO_CT, DEVNAME);
+       } else {
+               rc = alloc_chrdev_region(&devid, 0, PC8736X_GPIO_CT, DEVNAME);
+               major = MAJOR(devid);
+       }
+
        if (rc < 0) {
                dev_err(&pdev->dev, "register-chrdev failed: %d\n", rc);
-               goto undo_platform_dev_add;
+               goto undo_request_region;
        }
        if (!major) {
                major = rc;
@@ -316,8 +325,15 @@ static int __init pc8736x_gpio_init(void)
        }
 
        pc8736x_init_shadow();
+
+       /* ignore minor errs, and succeed */
+       cdev_init(&pc8736x_gpio_cdev, &pc8736x_gpio_fileops);
+       cdev_add(&pc8736x_gpio_cdev, devid, PC8736X_GPIO_CT);
+
        return 0;
 
+undo_request_region:
+       release_region(pc8736x_gpio_base, PC8736X_GPIO_RANGE);
 undo_platform_dev_add:
        platform_device_del(pdev);
 undo_platform_dev_alloc:
@@ -328,14 +344,15 @@ undo_platform_dev_alloc:
 
 static void __exit pc8736x_gpio_cleanup(void)
 {
-       dev_dbg(&pdev->dev, " cleanup\n");
+       dev_dbg(&pdev->dev, "cleanup\n");
 
-       release_region(pc8736x_gpio_base, 16);
+       cdev_del(&pc8736x_gpio_cdev);
+       unregister_chrdev_region(MKDEV(major,0), PC8736X_GPIO_CT);
+       release_region(pc8736x_gpio_base, PC8736X_GPIO_RANGE);
 
-       unregister_chrdev(major, DEVNAME);
+       platform_device_del(pdev);
+       platform_device_put(pdev);
 }
 
-EXPORT_SYMBOL(pc8736x_access);
-
 module_init(pc8736x_gpio_init);
 module_exit(pc8736x_gpio_cleanup);
index cc7bd1a3095b799fba093bee386bcdfe805529fb..6e6a7c7a7eff191bc56f1d634afed8bdd85f9304 100644 (file)
  *      1.11a   Daniele Bellucci: Audit create_proc_read_entry in rtc_init
  *     1.12    Venkatesh Pallipadi: Hooks for emulating rtc on HPET base-timer
  *             CONFIG_HPET_EMULATE_RTC
+ *     1.12a   Maciej W. Rozycki: Handle memory-mapped chips properly.
  *     1.12ac  Alan Cox: Allow read access to the day of week register
  */
 
 #define RTC_VERSION            "1.12ac"
 
-#define RTC_IO_EXTENT  0x8
-
 /*
  *     Note that *all* calls to CMOS_READ and CMOS_WRITE are done with
  *     interrupts disabled. Due to the index-port/data-port (0x70/0x71)
@@ -337,7 +336,15 @@ static ssize_t rtc_read(struct file *file, char __user *buf,
        if (rtc_has_irq == 0)
                return -EIO;
 
-       if (count < sizeof(unsigned))
+       /*
+        * Historically this function used to assume that sizeof(unsigned long)
+        * is the same in userspace and kernelspace.  This lead to problems
+        * for configurations with multiple ABIs such a the MIPS o32 and 64
+        * ABIs supported on the same kernel.  So now we support read of both
+        * 4 and 8 bytes and assume that's the sizeof(unsigned long) in the
+        * userspace ABI.
+        */
+       if (count != sizeof(unsigned int) && count !=  sizeof(unsigned long))
                return -EINVAL;
 
        add_wait_queue(&rtc_wait, &wait);
@@ -368,10 +375,12 @@ static ssize_t rtc_read(struct file *file, char __user *buf,
                schedule();
        } while (1);
 
-       if (count < sizeof(unsigned long))
-               retval = put_user(data, (unsigned int __user *)buf) ?: sizeof(int); 
+       if (count == sizeof(unsigned int))
+               retval = put_user(data, (unsigned int __user *)buf) ?: sizeof(int);
        else
                retval = put_user(data, (unsigned long __user *)buf) ?: sizeof(long);
+       if (!retval)
+               retval = count;
  out:
        current->state = TASK_RUNNING;
        remove_wait_queue(&rtc_wait, &wait);
@@ -923,6 +932,9 @@ static int __init rtc_init(void)
        struct sparc_isa_device *isa_dev;
 #endif
 #endif
+#ifndef __sparc__
+       void *r;
+#endif
 
 #ifdef __sparc__
        for_each_ebus(ebus) {
@@ -964,8 +976,13 @@ found:
        }
 no_irq:
 #else
-       if (!request_region(RTC_PORT(0), RTC_IO_EXTENT, "rtc")) {
-               printk(KERN_ERR "rtc: I/O port %d is not free.\n", RTC_PORT (0));
+       if (RTC_IOMAPPED)
+               r = request_region(RTC_PORT(0), RTC_IO_EXTENT, "rtc");
+       else
+               r = request_mem_region(RTC_PORT(0), RTC_IO_EXTENT, "rtc");
+       if (!r) {
+               printk(KERN_ERR "rtc: I/O resource %lx is not free.\n",
+                      (long)(RTC_PORT(0)));
                return -EIO;
        }
 
@@ -979,7 +996,10 @@ no_irq:
        if(request_irq(RTC_IRQ, rtc_int_handler_ptr, IRQF_DISABLED, "rtc", NULL)) {
                /* Yeah right, seeing as irq 8 doesn't even hit the bus. */
                printk(KERN_ERR "rtc: IRQ %d is not free.\n", RTC_IRQ);
-               release_region(RTC_PORT(0), RTC_IO_EXTENT);
+               if (RTC_IOMAPPED)
+                       release_region(RTC_PORT(0), RTC_IO_EXTENT);
+               else
+                       release_mem_region(RTC_PORT(0), RTC_IO_EXTENT);
                return -EIO;
        }
        hpet_rtc_timer_init();
@@ -1079,7 +1099,10 @@ static void __exit rtc_exit (void)
        if (rtc_has_irq)
                free_irq (rtc_irq, &rtc_port);
 #else
-       release_region (RTC_PORT (0), RTC_IO_EXTENT);
+       if (RTC_IOMAPPED)
+               release_region(RTC_PORT(0), RTC_IO_EXTENT);
+       else
+               release_mem_region(RTC_PORT(0), RTC_IO_EXTENT);
 #ifdef RTC_IRQ
        if (rtc_has_irq)
                free_irq (RTC_IRQ, NULL);
@@ -1222,7 +1245,7 @@ static int rtc_proc_open(struct inode *inode, struct file *file)
 
 void rtc_get_rtc_time(struct rtc_time *rtc_tm)
 {
-       unsigned long uip_watchdog = jiffies;
+       unsigned long uip_watchdog = jiffies, flags;
        unsigned char ctrl;
 #ifdef CONFIG_MACH_DECSTATION
        unsigned int real_year;
@@ -1249,7 +1272,7 @@ void rtc_get_rtc_time(struct rtc_time *rtc_tm)
         * RTC has RTC_DAY_OF_WEEK, we should usually ignore it, as it is
         * only updated by the RTC when initially set to a non-zero value.
         */
-       spin_lock_irq(&rtc_lock);
+       spin_lock_irqsave(&rtc_lock, flags);
        rtc_tm->tm_sec = CMOS_READ(RTC_SECONDS);
        rtc_tm->tm_min = CMOS_READ(RTC_MINUTES);
        rtc_tm->tm_hour = CMOS_READ(RTC_HOURS);
@@ -1263,7 +1286,7 @@ void rtc_get_rtc_time(struct rtc_time *rtc_tm)
        real_year = CMOS_READ(RTC_DEC_YEAR);
 #endif
        ctrl = CMOS_READ(RTC_CONTROL);
-       spin_unlock_irq(&rtc_lock);
+       spin_unlock_irqrestore(&rtc_lock, flags);
 
        if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
        {
index 425c58719db6a6af14c5dc12a68e2e53642087bc..b956c7babd18a8a4933d6a99e74bd86ceb63c62d 100644 (file)
@@ -5,7 +5,6 @@
 
    Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com> */
 
-#include <linux/config.h>
 #include <linux/device.h>
 #include <linux/fs.h>
 #include <linux/module.h>
 #include <linux/scx200_gpio.h>
 #include <linux/nsc_gpio.h>
 
-#define NAME "scx200_gpio"
-#define DEVNAME NAME
+#define DRVNAME "scx200_gpio"
 
 static struct platform_device *pdev;
 
 MODULE_AUTHOR("Christer Weinigel <wingel@nano-system.com>");
-MODULE_DESCRIPTION("NatSemi SCx200 GPIO Pin Driver");
+MODULE_DESCRIPTION("NatSemi/AMD SCx200 GPIO Pin Driver");
 MODULE_LICENSE("GPL");
 
 static int major = 0;          /* default to dynamic major */
 module_param(major, int, 0);
 MODULE_PARM_DESC(major, "Major device number");
 
-struct nsc_gpio_ops scx200_access = {
+#define MAX_PINS 32            /* 64 later, when known ok */
+
+struct nsc_gpio_ops scx200_gpio_ops = {
        .owner          = THIS_MODULE,
        .gpio_config    = scx200_gpio_configure,
        .gpio_dump      = nsc_gpio_dump,
        .gpio_get       = scx200_gpio_get,
        .gpio_set       = scx200_gpio_set,
-       .gpio_set_high  = scx200_gpio_set_high,
-       .gpio_set_low   = scx200_gpio_set_low,
        .gpio_change    = scx200_gpio_change,
        .gpio_current   = scx200_gpio_current
 };
+EXPORT_SYMBOL(scx200_gpio_ops);
 
 static int scx200_gpio_open(struct inode *inode, struct file *file)
 {
        unsigned m = iminor(inode);
-       file->private_data = &scx200_access;
+       file->private_data = &scx200_gpio_ops;
 
-       if (m > 63)
+       if (m >= MAX_PINS)
                return -EINVAL;
        return nonseekable_open(inode, file);
 }
@@ -62,8 +61,7 @@ static int scx200_gpio_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-
-static const struct file_operations scx200_gpio_fops = {
+static const struct file_operations scx200_gpio_fileops = {
        .owner   = THIS_MODULE,
        .write   = nsc_gpio_write,
        .read    = nsc_gpio_read,
@@ -71,21 +69,20 @@ static const struct file_operations scx200_gpio_fops = {
        .release = scx200_gpio_release,
 };
 
-struct cdev *scx200_devices;
-static int num_pins = 32;
+struct cdev scx200_gpio_cdev;  /* use 1 cdev for all pins */
 
 static int __init scx200_gpio_init(void)
 {
-       int rc, i;
-       dev_t dev = MKDEV(major, 0);
+       int rc;
+       dev_t devid;
 
        if (!scx200_gpio_present()) {
-               printk(KERN_ERR NAME ": no SCx200 gpio present\n");
+               printk(KERN_ERR DRVNAME ": no SCx200 gpio present\n");
                return -ENODEV;
        }
 
        /* support dev_dbg() with pdev->dev */
-       pdev = platform_device_alloc(DEVNAME, 0);
+       pdev = platform_device_alloc(DRVNAME, 0);
        if (!pdev)
                return -ENOMEM;
 
@@ -94,37 +91,25 @@ static int __init scx200_gpio_init(void)
                goto undo_malloc;
 
        /* nsc_gpio uses dev_dbg(), so needs this */
-       scx200_access.dev = &pdev->dev;
-
-       if (major)
-               rc = register_chrdev_region(dev, num_pins, "scx200_gpio");
-       else {
-               rc = alloc_chrdev_region(&dev, 0, num_pins, "scx200_gpio");
-               major = MAJOR(dev);
+       scx200_gpio_ops.dev = &pdev->dev;
+
+       if (major) {
+               devid = MKDEV(major, 0);
+               rc = register_chrdev_region(devid, MAX_PINS, "scx200_gpio");
+       } else {
+               rc = alloc_chrdev_region(&devid, 0, MAX_PINS, "scx200_gpio");
+               major = MAJOR(devid);
        }
        if (rc < 0) {
                dev_err(&pdev->dev, "SCx200 chrdev_region err: %d\n", rc);
                goto undo_platform_device_add;
        }
-       scx200_devices = kzalloc(num_pins * sizeof(struct cdev), GFP_KERNEL);
-       if (!scx200_devices) {
-               rc = -ENOMEM;
-               goto undo_chrdev_region;
-       }
-       for (i = 0; i < num_pins; i++) {
-               struct cdev *cdev = &scx200_devices[i];
-               cdev_init(cdev, &scx200_gpio_fops);
-               cdev->owner = THIS_MODULE;
-               rc = cdev_add(cdev, MKDEV(major, i), 1);
-               /* tolerate 'minor' errors */
-               if (rc)
-                       dev_err(&pdev->dev, "Error %d on minor %d", rc, i);
-       }
+
+       cdev_init(&scx200_gpio_cdev, &scx200_gpio_fileops);
+       cdev_add(&scx200_gpio_cdev, devid, MAX_PINS);
 
        return 0; /* succeed */
 
-undo_chrdev_region:
-       unregister_chrdev_region(dev, num_pins);
 undo_platform_device_add:
        platform_device_del(pdev);
 undo_malloc:
@@ -135,10 +120,11 @@ undo_malloc:
 
 static void __exit scx200_gpio_cleanup(void)
 {
-       kfree(scx200_devices);
-       unregister_chrdev_region(MKDEV(major, 0), num_pins);
+       cdev_del(&scx200_gpio_cdev);
+       /* cdev_put(&scx200_gpio_cdev); */
+
+       unregister_chrdev_region(MKDEV(major, 0), MAX_PINS);
        platform_device_unregister(pdev);
-       /* kfree(pdev); */
 }
 
 module_init(scx200_gpio_init);
index 8b2210b633dfc2845396451d573507d69f566fd2..d12d4f629cec80ca1137fc4e0fc8ad0351f8bfa2 100644 (file)
@@ -220,20 +220,7 @@ scdrv_dispatch_event(char *event, int len)
                               " Sending SIGPWR to init...\n");
 
                /* give a SIGPWR signal to init proc */
-
-               /* first find init's task */
-               read_lock(&tasklist_lock);
-               for_each_process(p) {
-                       if (p->pid == 1)
-                               break;
-               }
-               if (p) {
-                       force_sig(SIGPWR, p);
-               } else {
-                       printk(KERN_ERR "Failed to signal init!\n");
-                       snsc_shutting_down = 0; /* so can try again (?) */
-               }
-               read_unlock(&tasklist_lock);
+               kill_proc(1, SIGPWR, 0);
        } else {
                /* print to system log */
                printk("%s|$(0x%x)%s\n", severity, esp_code, desc);
index cb2859249d49a9171899db66f9661f36fdcfdb90..a1d303f9a33dd30fa2260b82cacf4fdf1fa78308 100644 (file)
@@ -2584,6 +2584,12 @@ static void __exit specialix_exit_module(void)
        func_exit();
 }
 
+static struct pci_device_id specialx_pci_tbl[] __devinitdata = {
+       { PCI_DEVICE(PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_SPECIALIX_IO8) },
+       { }
+};
+MODULE_DEVICE_TABLE(pci, specialx_pci_tbl);
+
 module_init(specialix_init_module);
 module_exit(specialix_exit_module);
 
index 6889e7db3aff5285dd7824317c3f6469fc2e00c2..a082a2e342522a78edfd642f272784bd1fbee276 100644 (file)
@@ -1141,6 +1141,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, const struct tpm_vend
                put_device(dev);
                clear_bit(chip->dev_num, dev_mask);
                kfree(chip);
+               kfree(devname);
                return NULL;
        }
 
index 3232b1932597e88989366a445d59c0de420728f7..ee7ac6f43c653bd49d7f4f3ac8649b54c092c24a 100644 (file)
@@ -424,6 +424,7 @@ static irqreturn_t tis_int_handler(int irq, void *dev_id, struct pt_regs *regs)
        iowrite32(interrupt,
                  chip->vendor.iobase +
                  TPM_INT_STATUS(chip->vendor.locality));
+       ioread32(chip->vendor.iobase + TPM_INT_STATUS(chip->vendor.locality));
        return IRQ_HANDLED;
 }
 
@@ -431,23 +432,19 @@ static int interrupts = 1;
 module_param(interrupts, bool, 0444);
 MODULE_PARM_DESC(interrupts, "Enable interrupts");
 
-static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
-                                     const struct pnp_device_id *pnp_id)
+static int tpm_tis_init(struct device *dev, resource_size_t start,
+                       resource_size_t len)
 {
        u32 vendor, intfcaps, intmask;
        int rc, i;
-       unsigned long start, len;
        struct tpm_chip *chip;
 
-       start = pnp_mem_start(pnp_dev, 0);
-       len = pnp_mem_len(pnp_dev, 0);
-
        if (!start)
                start = TIS_MEM_BASE;
        if (!len)
                len = TIS_MEM_LEN;
 
-       if (!(chip = tpm_register_hardware(&pnp_dev->dev, &tpm_tis)))
+       if (!(chip = tpm_register_hardware(dev, &tpm_tis)))
                return -ENODEV;
 
        chip->vendor.iobase = ioremap(start, len);
@@ -464,7 +461,7 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
        chip->vendor.timeout_c = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
        chip->vendor.timeout_d = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
 
-       dev_info(&pnp_dev->dev,
+       dev_info(dev,
                 "1.2 TPM (device-id 0x%X, rev-id %d)\n",
                 vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0)));
 
@@ -472,26 +469,26 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
        intfcaps =
            ioread32(chip->vendor.iobase +
                     TPM_INTF_CAPS(chip->vendor.locality));
-       dev_dbg(&pnp_dev->dev, "TPM interface capabilities (0x%x):\n",
+       dev_dbg(dev, "TPM interface capabilities (0x%x):\n",
                intfcaps);
        if (intfcaps & TPM_INTF_BURST_COUNT_STATIC)
-               dev_dbg(&pnp_dev->dev, "\tBurst Count Static\n");
+               dev_dbg(dev, "\tBurst Count Static\n");
        if (intfcaps & TPM_INTF_CMD_READY_INT)
-               dev_dbg(&pnp_dev->dev, "\tCommand Ready Int Support\n");
+               dev_dbg(dev, "\tCommand Ready Int Support\n");
        if (intfcaps & TPM_INTF_INT_EDGE_FALLING)
-               dev_dbg(&pnp_dev->dev, "\tInterrupt Edge Falling\n");
+               dev_dbg(dev, "\tInterrupt Edge Falling\n");
        if (intfcaps & TPM_INTF_INT_EDGE_RISING)
-               dev_dbg(&pnp_dev->dev, "\tInterrupt Edge Rising\n");
+               dev_dbg(dev, "\tInterrupt Edge Rising\n");
        if (intfcaps & TPM_INTF_INT_LEVEL_LOW)
-               dev_dbg(&pnp_dev->dev, "\tInterrupt Level Low\n");
+               dev_dbg(dev, "\tInterrupt Level Low\n");
        if (intfcaps & TPM_INTF_INT_LEVEL_HIGH)
-               dev_dbg(&pnp_dev->dev, "\tInterrupt Level High\n");
+               dev_dbg(dev, "\tInterrupt Level High\n");
        if (intfcaps & TPM_INTF_LOCALITY_CHANGE_INT)
-               dev_dbg(&pnp_dev->dev, "\tLocality Change Int Support\n");
+               dev_dbg(dev, "\tLocality Change Int Support\n");
        if (intfcaps & TPM_INTF_STS_VALID_INT)
-               dev_dbg(&pnp_dev->dev, "\tSts Valid Int Support\n");
+               dev_dbg(dev, "\tSts Valid Int Support\n");
        if (intfcaps & TPM_INTF_DATA_AVAIL_INT)
-               dev_dbg(&pnp_dev->dev, "\tData Avail Int Support\n");
+               dev_dbg(dev, "\tData Avail Int Support\n");
 
        if (request_locality(chip, 0) != 0) {
                rc = -ENODEV;
@@ -594,6 +591,16 @@ out_err:
        return rc;
 }
 
+static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
+                                     const struct pnp_device_id *pnp_id)
+{
+       resource_size_t start, len;
+       start = pnp_mem_start(pnp_dev, 0);
+       len = pnp_mem_len(pnp_dev, 0);
+
+       return tpm_tis_init(&pnp_dev->dev, start, len);
+}
+
 static int tpm_tis_pnp_suspend(struct pnp_dev *dev, pm_message_t msg)
 {
        return tpm_pm_suspend(&dev->dev, msg);
@@ -628,8 +635,36 @@ module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id,
                    sizeof(tpm_pnp_tbl[TIS_HID_USR_IDX].id), 0444);
 MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe");
 
+static struct device_driver tis_drv = {
+       .name = "tpm_tis",
+       .bus = &platform_bus_type,
+       .owner = THIS_MODULE,
+       .suspend = tpm_pm_suspend,
+       .resume = tpm_pm_resume,
+};
+
+static struct platform_device *pdev;
+
+static int force;
+module_param(force, bool, 0444);
+MODULE_PARM_DESC(force, "Force device probe rather than using ACPI entry");
 static int __init init_tis(void)
 {
+       int rc;
+
+       if (force) {
+               rc = driver_register(&tis_drv);
+               if (rc < 0)
+                       return rc;
+               if (IS_ERR(pdev=platform_device_register_simple("tpm_tis", -1, NULL, 0)))
+                       return PTR_ERR(pdev);
+               if((rc=tpm_tis_init(&pdev->dev, 0, 0)) != 0) {
+                       platform_device_unregister(pdev);
+                       driver_unregister(&tis_drv);
+               }
+               return rc;
+       }
+
        return pnp_register_driver(&tis_pnp_driver);
 }
 
@@ -654,7 +689,11 @@ static void __exit cleanup_tis(void)
                tpm_remove_hardware(chip->dev);
        }
        spin_unlock(&tis_lock);
-       pnp_unregister_driver(&tis_pnp_driver);
+       if (force) {
+               platform_device_unregister(pdev);
+               driver_unregister(&tis_drv);
+       } else
+               pnp_unregister_driver(&tis_pnp_driver);
 }
 
 module_init(init_tis);
index 1b9b1f1d4c490b0db1cafa32c13b6b60388d18e7..8116a47b80f4c4e757b49286bff58d98390ff9a0 100644 (file)
@@ -33,6 +33,7 @@
 #include <asm/cpu.h>
 #include <asm/io.h>
 #include <asm/vr41xx/giu.h>
+#include <asm/vr41xx/irq.h>
 #include <asm/vr41xx/vr41xx.h>
 
 MODULE_AUTHOR("Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>");
index 17ee684144f9d2d54aae8ff95b16f77bdd091965..b643d71298a911807d4e65f71e2924174cbd74e6 100644 (file)
@@ -59,6 +59,9 @@
 #define AES_EXTENDED_KEY_SIZE  64      /* in uint32_t units */
 #define AES_EXTENDED_KEY_SIZE_B        (AES_EXTENDED_KEY_SIZE * sizeof(uint32_t))
 
+/* Whenever making any changes to the following
+ * structure *make sure* you keep E, d_data
+ * and cword aligned on 16 Bytes boundaries!!! */
 struct aes_ctx {
        struct {
                struct cword encrypt;
@@ -66,8 +69,10 @@ struct aes_ctx {
        } cword;
        u32 *D;
        int key_length;
-       u32 E[AES_EXTENDED_KEY_SIZE];
-       u32 d_data[AES_EXTENDED_KEY_SIZE];
+       u32 E[AES_EXTENDED_KEY_SIZE]
+               __attribute__ ((__aligned__(PADLOCK_ALIGNMENT)));
+       u32 d_data[AES_EXTENDED_KEY_SIZE]
+               __attribute__ ((__aligned__(PADLOCK_ALIGNMENT)));
 };
 
 /* ====== Key management routines ====== */
index 3a7cfe88b16972f52672102cfe4a1a7609a5f66b..4bde30bb3be70c48e16923405bd1609386be9f62 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * edac_mc kernel module
- * (C) 2005 Linux Networx (http://lnxi.com)
+ * (C) 2005, 2006 Linux Networx (http://lnxi.com)
  * This file may be distributed under the terms of the
  * GNU General Public License.
  *
 #include <asm/edac.h>
 #include "edac_mc.h"
 
-#define EDAC_MC_VERSION "Ver: 2.0.0 " __DATE__
+#define EDAC_MC_VERSION "Ver: 2.0.1 " __DATE__
 
-/* For now, disable the EDAC sysfs code.  The sysfs interface that EDAC
- * presents to user space needs more thought, and is likely to change
- * substantially.
- */
-#define DISABLE_EDAC_SYSFS
 
 #ifdef CONFIG_EDAC_DEBUG
 /* Values of 0 to 4 will generate output */
@@ -64,31 +59,12 @@ static int check_pci_parity = 0;    /* default YES check PCI parity */
 static int panic_on_pci_parity;                /* default no panic on PCI Parity */
 static atomic_t pci_parity_count = ATOMIC_INIT(0);
 
-/* Structure of the whitelist and blacklist arrays */
-struct edac_pci_device_list {
-       unsigned int  vendor;           /* Vendor ID */
-       unsigned int  device;           /* Deviice ID */
-};
-
-#define MAX_LISTED_PCI_DEVICES         32
-
-/* List of PCI devices (vendor-id:device-id) that should be skipped */
-static struct edac_pci_device_list pci_blacklist[MAX_LISTED_PCI_DEVICES];
-static int pci_blacklist_count;
-
-/* List of PCI devices (vendor-id:device-id) that should be scanned */
-static struct edac_pci_device_list pci_whitelist[MAX_LISTED_PCI_DEVICES];
-static int pci_whitelist_count ;
-
-#ifndef DISABLE_EDAC_SYSFS
 static struct kobject edac_pci_kobj; /* /sys/devices/system/edac/pci */
 static struct completion edac_pci_kobj_complete;
-#endif /* DISABLE_EDAC_SYSFS */
 #endif /* CONFIG_PCI */
 
 /*  START sysfs data and methods */
 
-#ifndef DISABLE_EDAC_SYSFS
 
 static const char *mem_types[] = {
        [MEM_EMPTY] = "Empty",
@@ -147,18 +123,10 @@ static struct completion edac_memctrl_kobj_complete;
  * /sys/devices/system/edac/mc;
  *     data structures and methods
  */
-#if 0
-static ssize_t memctrl_string_show(void *ptr, char *buffer)
-{
-       char *value = (char*) ptr;
-       return sprintf(buffer, "%s\n", value);
-}
-#endif
-
 static ssize_t memctrl_int_show(void *ptr, char *buffer)
 {
        int *value = (int*) ptr;
-       return sprintf(buffer, "%d\n", *value);
+       return sprintf(buffer, "%u\n", *value);
 }
 
 static ssize_t memctrl_int_store(void *ptr, const char *buffer, size_t count)
@@ -224,11 +192,6 @@ struct memctrl_dev_attribute attr_##_name = {                      \
        .store  = _store,                                       \
 };
 
-/* cwrow<id> attribute f*/
-#if 0
-MEMCTRL_STRING_ATTR(mc_version,EDAC_MC_VERSION,S_IRUGO,memctrl_string_show,NULL);
-#endif
-
 /* csrow<id> control files */
 MEMCTRL_ATTR(panic_on_ue,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store);
 MEMCTRL_ATTR(log_ue,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store);
@@ -257,8 +220,6 @@ static struct kobj_type ktype_memctrl = {
        .default_attrs = (struct attribute **) memctrl_attr,
 };
 
-#endif  /* DISABLE_EDAC_SYSFS */
-
 /* Initialize the main sysfs entries for edac:
  *   /sys/devices/system/edac
  *
@@ -268,11 +229,6 @@ static struct kobj_type ktype_memctrl = {
  *         !0 FAILURE
  */
 static int edac_sysfs_memctrl_setup(void)
-#ifdef DISABLE_EDAC_SYSFS
-{
-       return 0;
-}
-#else
 {
        int err=0;
 
@@ -304,7 +260,6 @@ static int edac_sysfs_memctrl_setup(void)
 
        return err;
 }
-#endif  /* DISABLE_EDAC_SYSFS */
 
 /*
  * MC teardown:
@@ -312,7 +267,6 @@ static int edac_sysfs_memctrl_setup(void)
  */
 static void edac_sysfs_memctrl_teardown(void)
 {
-#ifndef DISABLE_EDAC_SYSFS
        debugf0("MC: " __FILE__ ": %s()\n", __func__);
 
        /* Unregister the MC's kobject and wait for reference count to reach
@@ -324,144 +278,9 @@ static void edac_sysfs_memctrl_teardown(void)
 
        /* Unregister the 'edac' object */
        sysdev_class_unregister(&edac_class);
-#endif  /* DISABLE_EDAC_SYSFS */
 }
 
 #ifdef CONFIG_PCI
-
-#ifndef DISABLE_EDAC_SYSFS
-
-/*
- * /sys/devices/system/edac/pci;
- *     data structures and methods
- */
-
-struct list_control {
-       struct edac_pci_device_list *list;
-       int *count;
-};
-
-#if 0
-/* Output the list as:  vendor_id:device:id<,vendor_id:device_id> */
-static ssize_t edac_pci_list_string_show(void *ptr, char *buffer)
-{
-       struct list_control *listctl;
-       struct edac_pci_device_list *list;
-       char *p = buffer;
-       int len=0;
-       int i;
-
-       listctl = ptr;
-       list = listctl->list;
-
-       for (i = 0; i < *(listctl->count); i++, list++ ) {
-               if (len > 0)
-                       len += snprintf(p + len, (PAGE_SIZE-len), ",");
-
-               len += snprintf(p + len,
-                               (PAGE_SIZE-len),
-                               "%x:%x",
-                               list->vendor,list->device);
-       }
-
-       len += snprintf(p + len,(PAGE_SIZE-len), "\n");
-       return (ssize_t) len;
-}
-
-/**
- *
- * Scan string from **s to **e looking for one 'vendor:device' tuple
- * where each field is a hex value
- *
- * return 0 if an entry is NOT found
- * return 1 if an entry is found
- *     fill in *vendor_id and *device_id with values found
- *
- * In both cases, make sure *s has been moved forward toward *e
- */
-static int parse_one_device(const char **s,const char **e,
-       unsigned int *vendor_id, unsigned int *device_id)
-{
-       const char *runner, *p;
-
-       /* if null byte, we are done */
-       if (!**s) {
-               (*s)++;  /* keep *s moving */
-               return 0;
-       }
-
-       /* skip over newlines & whitespace */
-       if ((**s == '\n') || isspace(**s)) {
-               (*s)++;
-               return 0;
-       }
-
-       if (!isxdigit(**s)) {
-               (*s)++;
-               return 0;
-       }
-
-       /* parse vendor_id */
-       runner = *s;
-
-       while (runner < *e) {
-               /* scan for vendor:device delimiter */
-               if (*runner == ':') {
-                       *vendor_id = simple_strtol((char*) *s, (char**) &p, 16);
-                       runner = p + 1;
-                       break;
-               }
-
-               runner++;
-       }
-
-       if (!isxdigit(*runner)) {
-               *s = ++runner;
-               return 0;
-       }
-
-       /* parse device_id */
-       if (runner < *e) {
-               *device_id = simple_strtol((char*)runner, (char**)&p, 16);
-               runner = p;
-       }
-
-       *s = runner;
-       return 1;
-}
-
-static ssize_t edac_pci_list_string_store(void *ptr, const char *buffer,
-               size_t count)
-{
-       struct list_control *listctl;
-       struct edac_pci_device_list *list;
-       unsigned int vendor_id, device_id;
-       const char *s, *e;
-       int *index;
-
-       s = (char*)buffer;
-       e = s + count;
-       listctl = ptr;
-       list = listctl->list;
-       index = listctl->count;
-       *index = 0;
-
-       while (*index < MAX_LISTED_PCI_DEVICES) {
-               if (parse_one_device(&s,&e,&vendor_id,&device_id)) {
-                       list[ *index ].vendor = vendor_id;
-                       list[ *index ].device = device_id;
-                       (*index)++;
-               }
-
-               /* check for all data consume */
-               if (s >= e)
-                       break;
-       }
-
-       return count;
-}
-
-#endif
 static ssize_t edac_pci_int_show(void *ptr, char *buffer)
 {
        int *value = ptr;
@@ -529,31 +348,6 @@ struct edac_pci_dev_attribute edac_pci_attr_##_name = {            \
        .store  = _store,                                       \
 };
 
-#if 0
-static struct list_control pci_whitelist_control = {
-       .list = pci_whitelist,
-       .count = &pci_whitelist_count
-};
-
-static struct list_control pci_blacklist_control = {
-       .list = pci_blacklist,
-       .count = &pci_blacklist_count
-};
-
-/* whitelist attribute */
-EDAC_PCI_STRING_ATTR(pci_parity_whitelist,
-       &pci_whitelist_control,
-       S_IRUGO|S_IWUSR,
-       edac_pci_list_string_show,
-       edac_pci_list_string_store);
-
-EDAC_PCI_STRING_ATTR(pci_parity_blacklist,
-       &pci_blacklist_control,
-       S_IRUGO|S_IWUSR,
-       edac_pci_list_string_show,
-       edac_pci_list_string_store);
-#endif
-
 /* PCI Parity control files */
 EDAC_PCI_ATTR(check_pci_parity, S_IRUGO|S_IWUSR, edac_pci_int_show,
        edac_pci_int_store);
@@ -582,18 +376,11 @@ static struct kobj_type ktype_edac_pci = {
        .default_attrs = (struct attribute **) edac_pci_attr,
 };
 
-#endif  /* DISABLE_EDAC_SYSFS */
-
 /**
  * edac_sysfs_pci_setup()
  *
  */
 static int edac_sysfs_pci_setup(void)
-#ifdef DISABLE_EDAC_SYSFS
-{
-       return 0;
-}
-#else
 {
        int err;
 
@@ -617,16 +404,13 @@ static int edac_sysfs_pci_setup(void)
 
        return err;
 }
-#endif  /* DISABLE_EDAC_SYSFS */
 
 static void edac_sysfs_pci_teardown(void)
 {
-#ifndef DISABLE_EDAC_SYSFS
        debugf0("%s()\n", __func__);
        init_completion(&edac_pci_kobj_complete);
        kobject_unregister(&edac_pci_kobj);
        wait_for_completion(&edac_pci_kobj_complete);
-#endif
 }
 
 
@@ -755,36 +539,6 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
        }
 }
 
-/*
- * check_dev_on_list: Scan for a PCI device on a white/black list
- * @list:      an EDAC  &edac_pci_device_list  white/black list pointer
- * @free_index:        index of next free entry on the list
- * @pci_dev:   PCI Device pointer
- *
- * see if list contains the device.
- *
- * Returns:    0 not found
- *             1 found on list
- */
-static int check_dev_on_list(struct edac_pci_device_list *list,
-               int free_index, struct pci_dev *dev)
-{
-       int i;
-       int rc = 0;     /* Assume not found */
-       unsigned short vendor=dev->vendor;
-       unsigned short device=dev->device;
-
-       /* Scan the list, looking for a vendor/device match */
-       for (i = 0; i < free_index; i++, list++ ) {
-               if ((list->vendor == vendor ) && (list->device == device )) {
-                       rc = 1;
-                       break;
-               }
-       }
-
-       return rc;
-}
-
 /*
  * pci_dev parity list iterator
  *     Scan the PCI device list for one iteration, looking for SERRORs
@@ -799,22 +553,7 @@ static inline void edac_pci_dev_parity_iterator(pci_parity_check_fn_t fn)
         * bumped until we are done with it
         */
        while((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
-               /* if whitelist exists then it has priority, so only scan
-                * those devices on the whitelist
-                */
-               if (pci_whitelist_count > 0 ) {
-                       if (check_dev_on_list(pci_whitelist,
-                                       pci_whitelist_count, dev))
-                               fn(dev);
-               } else {
-                       /*
-                        * if no whitelist, then check if this devices is
-                        * blacklisted
-                        */
-                       if (!check_dev_on_list(pci_blacklist,
-                                       pci_blacklist_count, dev))
-                               fn(dev);
-               }
+               fn(dev);
        }
 }
 
@@ -855,154 +594,101 @@ static inline void clear_pci_parity_errors(void)
 
 #else  /* CONFIG_PCI */
 
-static inline void do_pci_parity_check(void)
-{
-       /* no-op */
-}
-
-static inline void clear_pci_parity_errors(void)
-{
-       /* no-op */
-}
-
-static void edac_sysfs_pci_teardown(void)
-{
-}
+/* pre-process these away */
+#define        do_pci_parity_check()
+#define        clear_pci_parity_errors()
+#define        edac_sysfs_pci_teardown()
+#define        edac_sysfs_pci_setup()  (0)
 
-static int edac_sysfs_pci_setup(void)
-{
-       return 0;
-}
 #endif /* CONFIG_PCI */
 
-#ifndef DISABLE_EDAC_SYSFS
-
-/* EDAC sysfs CSROW data structures and methods */
-
-/* Set of more detailed csrow<id> attribute show/store functions */
-static ssize_t csrow_ch0_dimm_label_show(struct csrow_info *csrow, char *data)
-{
-       ssize_t size = 0;
-
-       if (csrow->nr_channels > 0) {
-               size = snprintf(data, EDAC_MC_LABEL_LEN,"%s\n",
-                       csrow->channels[0].label);
-       }
-
-       return size;
-}
+/* EDAC sysfs CSROW data structures and methods
+ */
 
-static ssize_t csrow_ch1_dimm_label_show(struct csrow_info *csrow, char *data)
+/* Set of more default csrow<id> attribute show/store functions */
+static ssize_t csrow_ue_count_show(struct csrow_info *csrow, char *data, int private)
 {
-       ssize_t size = 0;
-
-       if (csrow->nr_channels > 0) {
-               size = snprintf(data, EDAC_MC_LABEL_LEN, "%s\n",
-                       csrow->channels[1].label);
-       }
-
-       return size;
+       return sprintf(data,"%u\n", csrow->ue_count);
 }
 
-static ssize_t csrow_ch0_dimm_label_store(struct csrow_info *csrow,
-               const char *data, size_t size)
+static ssize_t csrow_ce_count_show(struct csrow_info *csrow, char *data, int private)
 {
-       ssize_t max_size = 0;
-
-       if (csrow->nr_channels > 0) {
-               max_size = min((ssize_t)size,(ssize_t)EDAC_MC_LABEL_LEN-1);
-               strncpy(csrow->channels[0].label, data, max_size);
-               csrow->channels[0].label[max_size] = '\0';
-       }
-
-       return size;
+       return sprintf(data,"%u\n", csrow->ce_count);
 }
 
-static ssize_t csrow_ch1_dimm_label_store(struct csrow_info *csrow,
-               const char *data, size_t size)
+static ssize_t csrow_size_show(struct csrow_info *csrow, char *data, int private)
 {
-       ssize_t max_size = 0;
-
-       if (csrow->nr_channels > 1) {
-               max_size = min((ssize_t)size,(ssize_t)EDAC_MC_LABEL_LEN-1);
-               strncpy(csrow->channels[1].label, data, max_size);
-               csrow->channels[1].label[max_size] = '\0';
-       }
-
-       return max_size;
+       return sprintf(data,"%u\n", PAGES_TO_MiB(csrow->nr_pages));
 }
 
-static ssize_t csrow_ue_count_show(struct csrow_info *csrow, char *data)
+static ssize_t csrow_mem_type_show(struct csrow_info *csrow, char *data, int private)
 {
-       return sprintf(data,"%u\n", csrow->ue_count);
+       return sprintf(data,"%s\n", mem_types[csrow->mtype]);
 }
 
-static ssize_t csrow_ce_count_show(struct csrow_info *csrow, char *data)
+static ssize_t csrow_dev_type_show(struct csrow_info *csrow, char *data, int private)
 {
-       return sprintf(data,"%u\n", csrow->ce_count);
+       return sprintf(data,"%s\n", dev_types[csrow->dtype]);
 }
 
-static ssize_t csrow_ch0_ce_count_show(struct csrow_info *csrow, char *data)
+static ssize_t csrow_edac_mode_show(struct csrow_info *csrow, char *data, int private)
 {
-       ssize_t size = 0;
-
-       if (csrow->nr_channels > 0) {
-               size = sprintf(data,"%u\n", csrow->channels[0].ce_count);
-       }
-
-       return size;
+       return sprintf(data,"%s\n", edac_caps[csrow->edac_mode]);
 }
 
-static ssize_t csrow_ch1_ce_count_show(struct csrow_info *csrow, char *data)
+/* show/store functions for DIMM Label attributes */
+static ssize_t channel_dimm_label_show(struct csrow_info *csrow,
+               char *data, int channel)
 {
-       ssize_t size = 0;
-
-       if (csrow->nr_channels > 1) {
-               size = sprintf(data,"%u\n", csrow->channels[1].ce_count);
-       }
-
-       return size;
+       return snprintf(data, EDAC_MC_LABEL_LEN,"%s",
+                       csrow->channels[channel].label);
 }
 
-static ssize_t csrow_size_show(struct csrow_info *csrow, char *data)
+static ssize_t channel_dimm_label_store(struct csrow_info *csrow,
+                               const char *data,
+                               size_t count,
+                               int channel)
 {
-       return sprintf(data,"%u\n", PAGES_TO_MiB(csrow->nr_pages));
-}
+       ssize_t max_size = 0;
 
-static ssize_t csrow_mem_type_show(struct csrow_info *csrow, char *data)
-{
-       return sprintf(data,"%s\n", mem_types[csrow->mtype]);
-}
+       max_size = min((ssize_t)count,(ssize_t)EDAC_MC_LABEL_LEN-1);
+       strncpy(csrow->channels[channel].label, data, max_size);
+       csrow->channels[channel].label[max_size] = '\0';
 
-static ssize_t csrow_dev_type_show(struct csrow_info *csrow, char *data)
-{
-       return sprintf(data,"%s\n", dev_types[csrow->dtype]);
+       return max_size;
 }
 
-static ssize_t csrow_edac_mode_show(struct csrow_info *csrow, char *data)
+/* show function for dynamic chX_ce_count attribute */
+static ssize_t channel_ce_count_show(struct csrow_info *csrow,
+                               char *data,
+                               int channel)
 {
-       return sprintf(data,"%s\n", edac_caps[csrow->edac_mode]);
+       return sprintf(data, "%u\n", csrow->channels[channel].ce_count);
 }
 
+/* csrow specific attribute structure */
 struct csrowdev_attribute {
        struct attribute attr;
-       ssize_t (*show)(struct csrow_info *,char *);
-       ssize_t (*store)(struct csrow_info *, const char *,size_t);
+       ssize_t (*show)(struct csrow_info *,char *,int);
+       ssize_t (*store)(struct csrow_info *, const char *,size_t,int);
+       int    private;
 };
 
 #define to_csrow(k) container_of(k, struct csrow_info, kobj)
 #define to_csrowdev_attr(a) container_of(a, struct csrowdev_attribute, attr)
 
-/* Set of show/store higher level functions for csrow objects */
-static ssize_t csrowdev_show(struct kobject *kobj, struct attribute *attr,
-               char *buffer)
+/* Set of show/store higher level functions for default csrow attributes */
+static ssize_t csrowdev_show(struct kobject *kobj,
+                       struct attribute *attr,
+                       char *buffer)
 {
        struct csrow_info *csrow = to_csrow(kobj);
        struct csrowdev_attribute *csrowdev_attr = to_csrowdev_attr(attr);
 
        if (csrowdev_attr->show)
-               return csrowdev_attr->show(csrow, buffer);
-
+               return csrowdev_attr->show(csrow,
+                                       buffer,
+                                       csrowdev_attr->private);
        return -EIO;
 }
 
@@ -1013,8 +699,10 @@ static ssize_t csrowdev_store(struct kobject *kobj, struct attribute *attr,
        struct csrowdev_attribute * csrowdev_attr = to_csrowdev_attr(attr);
 
        if (csrowdev_attr->store)
-               return csrowdev_attr->store(csrow, buffer, count);
-
+               return csrowdev_attr->store(csrow,
+                                       buffer,
+                                       count,
+                                       csrowdev_attr->private);
        return -EIO;
 }
 
@@ -1023,69 +711,157 @@ static struct sysfs_ops csrowfs_ops = {
        .store  = csrowdev_store
 };
 
-#define CSROWDEV_ATTR(_name,_mode,_show,_store)                        \
+#define CSROWDEV_ATTR(_name,_mode,_show,_store,_private)       \
 struct csrowdev_attribute attr_##_name = {                     \
        .attr = {.name = __stringify(_name), .mode = _mode },   \
        .show   = _show,                                        \
        .store  = _store,                                       \
+       .private = _private,                                    \
 };
 
-/* cwrow<id>/attribute files */
-CSROWDEV_ATTR(size_mb,S_IRUGO,csrow_size_show,NULL);
-CSROWDEV_ATTR(dev_type,S_IRUGO,csrow_dev_type_show,NULL);
-CSROWDEV_ATTR(mem_type,S_IRUGO,csrow_mem_type_show,NULL);
-CSROWDEV_ATTR(edac_mode,S_IRUGO,csrow_edac_mode_show,NULL);
-CSROWDEV_ATTR(ue_count,S_IRUGO,csrow_ue_count_show,NULL);
-CSROWDEV_ATTR(ce_count,S_IRUGO,csrow_ce_count_show,NULL);
-CSROWDEV_ATTR(ch0_ce_count,S_IRUGO,csrow_ch0_ce_count_show,NULL);
-CSROWDEV_ATTR(ch1_ce_count,S_IRUGO,csrow_ch1_ce_count_show,NULL);
-
-/* control/attribute files */
-CSROWDEV_ATTR(ch0_dimm_label,S_IRUGO|S_IWUSR,
-               csrow_ch0_dimm_label_show,
-               csrow_ch0_dimm_label_store);
-CSROWDEV_ATTR(ch1_dimm_label,S_IRUGO|S_IWUSR,
-               csrow_ch1_dimm_label_show,
-               csrow_ch1_dimm_label_store);
+/* default cwrow<id>/attribute files */
+CSROWDEV_ATTR(size_mb,S_IRUGO,csrow_size_show,NULL,0);
+CSROWDEV_ATTR(dev_type,S_IRUGO,csrow_dev_type_show,NULL,0);
+CSROWDEV_ATTR(mem_type,S_IRUGO,csrow_mem_type_show,NULL,0);
+CSROWDEV_ATTR(edac_mode,S_IRUGO,csrow_edac_mode_show,NULL,0);
+CSROWDEV_ATTR(ue_count,S_IRUGO,csrow_ue_count_show,NULL,0);
+CSROWDEV_ATTR(ce_count,S_IRUGO,csrow_ce_count_show,NULL,0);
 
-/* Attributes of the CSROW<id> object */
-static struct csrowdev_attribute *csrow_attr[] = {
+/* default attributes of the CSROW<id> object */
+static struct csrowdev_attribute *default_csrow_attr[] = {
        &attr_dev_type,
        &attr_mem_type,
        &attr_edac_mode,
        &attr_size_mb,
        &attr_ue_count,
        &attr_ce_count,
-       &attr_ch0_ce_count,
-       &attr_ch1_ce_count,
-       &attr_ch0_dimm_label,
-       &attr_ch1_dimm_label,
        NULL,
 };
 
-/* No memory to release */
+
+/* possible dynamic channel DIMM Label attribute files */
+CSROWDEV_ATTR(ch0_dimm_label,S_IRUGO|S_IWUSR,
+               channel_dimm_label_show,
+               channel_dimm_label_store,
+               0 );
+CSROWDEV_ATTR(ch1_dimm_label,S_IRUGO|S_IWUSR,
+               channel_dimm_label_show,
+               channel_dimm_label_store,
+               1 );
+CSROWDEV_ATTR(ch2_dimm_label,S_IRUGO|S_IWUSR,
+               channel_dimm_label_show,
+               channel_dimm_label_store,
+               2 );
+CSROWDEV_ATTR(ch3_dimm_label,S_IRUGO|S_IWUSR,
+               channel_dimm_label_show,
+               channel_dimm_label_store,
+               3 );
+CSROWDEV_ATTR(ch4_dimm_label,S_IRUGO|S_IWUSR,
+               channel_dimm_label_show,
+               channel_dimm_label_store,
+               4 );
+CSROWDEV_ATTR(ch5_dimm_label,S_IRUGO|S_IWUSR,
+               channel_dimm_label_show,
+               channel_dimm_label_store,
+               5 );
+
+/* Total possible dynamic DIMM Label attribute file table */
+static struct csrowdev_attribute *dynamic_csrow_dimm_attr[] = {
+               &attr_ch0_dimm_label,
+               &attr_ch1_dimm_label,
+               &attr_ch2_dimm_label,
+               &attr_ch3_dimm_label,
+               &attr_ch4_dimm_label,
+               &attr_ch5_dimm_label
+};
+
+/* possible dynamic channel ce_count attribute files */
+CSROWDEV_ATTR(ch0_ce_count,S_IRUGO|S_IWUSR,
+               channel_ce_count_show,
+               NULL,
+               0 );
+CSROWDEV_ATTR(ch1_ce_count,S_IRUGO|S_IWUSR,
+               channel_ce_count_show,
+               NULL,
+               1 );
+CSROWDEV_ATTR(ch2_ce_count,S_IRUGO|S_IWUSR,
+               channel_ce_count_show,
+               NULL,
+               2 );
+CSROWDEV_ATTR(ch3_ce_count,S_IRUGO|S_IWUSR,
+               channel_ce_count_show,
+               NULL,
+               3 );
+CSROWDEV_ATTR(ch4_ce_count,S_IRUGO|S_IWUSR,
+               channel_ce_count_show,
+               NULL,
+               4 );
+CSROWDEV_ATTR(ch5_ce_count,S_IRUGO|S_IWUSR,
+               channel_ce_count_show,
+               NULL,
+               5 );
+
+/* Total possible dynamic ce_count attribute file table */
+static struct csrowdev_attribute *dynamic_csrow_ce_count_attr[] = {
+               &attr_ch0_ce_count,
+               &attr_ch1_ce_count,
+               &attr_ch2_ce_count,
+               &attr_ch3_ce_count,
+               &attr_ch4_ce_count,
+               &attr_ch5_ce_count
+};
+
+
+#define EDAC_NR_CHANNELS       6
+
+/* Create dynamic CHANNEL files, indexed by 'chan',  under specifed CSROW */
+static int edac_create_channel_files(struct kobject *kobj, int chan)
+{
+       int err=-ENODEV;
+
+       if (chan >= EDAC_NR_CHANNELS)
+               return err;
+
+       /* create the DIMM label attribute file */
+       err = sysfs_create_file(kobj,
+                       (struct attribute *) dynamic_csrow_dimm_attr[chan]);
+
+       if (!err) {
+               /* create the CE Count attribute file */
+               err = sysfs_create_file(kobj,
+                       (struct attribute *) dynamic_csrow_ce_count_attr[chan]);
+       } else {
+               debugf1("%s()  dimm labels and ce_count files created", __func__);
+       }
+
+       return err;
+}
+
+/* No memory to release for this kobj */
 static void edac_csrow_instance_release(struct kobject *kobj)
 {
        struct csrow_info *cs;
 
-       debugf1("%s()\n", __func__);
        cs = container_of(kobj, struct csrow_info, kobj);
        complete(&cs->kobj_complete);
 }
 
+/* the kobj_type instance for a CSROW */
 static struct kobj_type ktype_csrow = {
        .release = edac_csrow_instance_release,
        .sysfs_ops = &csrowfs_ops,
-       .default_attrs = (struct attribute **) csrow_attr,
+       .default_attrs = (struct attribute **) default_csrow_attr,
 };
 
 /* Create a CSROW object under specifed edac_mc_device */
-static int edac_create_csrow_object(struct kobject *edac_mci_kobj,
-               struct csrow_info *csrow, int index)
+static int edac_create_csrow_object(
+               struct kobject *edac_mci_kobj,
+               struct csrow_info *csrow,
+               int index)
 {
        int err = 0;
+       int chan;
 
-       debugf0("%s()\n", __func__);
        memset(&csrow->kobj, 0, sizeof(csrow->kobj));
 
        /* generate ..../edac/mc/mc<id>/csrow<index>   */
@@ -1095,21 +871,27 @@ static int edac_create_csrow_object(struct kobject *edac_mci_kobj,
 
        /* name this instance of csrow<id> */
        err = kobject_set_name(&csrow->kobj,"csrow%d",index);
+       if (err)
+               goto error_exit;
 
+       /* Instanstiate the csrow object */
+       err = kobject_register(&csrow->kobj);
        if (!err) {
-               /* Instanstiate the csrow object */
-               err = kobject_register(&csrow->kobj);
-
-               if (err)
-                       debugf0("Failed to register CSROW%d\n",index);
-               else
-                       debugf0("Registered CSROW%d\n",index);
+               /* Create the dyanmic attribute files on this csrow,
+                * namely, the DIMM labels and the channel ce_count
+                */
+               for (chan = 0; chan < csrow->nr_channels; chan++) {
+                       err = edac_create_channel_files(&csrow->kobj,chan);
+                       if (err)
+                               break;
+               }
        }
 
+error_exit:
        return err;
 }
 
-/* sysfs data structures and methods for the MCI kobjects */
+/* default sysfs methods and data structures for the main MCI kobject */
 
 static ssize_t mci_reset_counters_store(struct mem_ctl_info *mci,
                const char *data, size_t count)
@@ -1135,6 +917,7 @@ static ssize_t mci_reset_counters_store(struct mem_ctl_info *mci,
        return count;
 }
 
+/* default attribute files for the MCI object */
 static ssize_t mci_ue_count_show(struct mem_ctl_info *mci, char *data)
 {
        return sprintf(data,"%d\n", mci->ue_count);
@@ -1160,71 +943,11 @@ static ssize_t mci_seconds_show(struct mem_ctl_info *mci, char *data)
        return sprintf(data,"%ld\n", (jiffies - mci->start_time) / HZ);
 }
 
-static ssize_t mci_mod_name_show(struct mem_ctl_info *mci, char *data)
-{
-       return sprintf(data,"%s %s\n", mci->mod_name, mci->mod_ver);
-}
-
 static ssize_t mci_ctl_name_show(struct mem_ctl_info *mci, char *data)
 {
        return sprintf(data,"%s\n", mci->ctl_name);
 }
 
-static int mci_output_edac_cap(char *buf, unsigned long edac_cap)
-{
-       char *p = buf;
-       int bit_idx;
-
-       for (bit_idx = 0; bit_idx < 8 * sizeof(edac_cap); bit_idx++) {
-               if ((edac_cap >> bit_idx) & 0x1)
-                       p += sprintf(p, "%s ", edac_caps[bit_idx]);
-       }
-
-       return p - buf;
-}
-
-static ssize_t mci_edac_capability_show(struct mem_ctl_info *mci, char *data)
-{
-       char *p = data;
-
-       p += mci_output_edac_cap(p,mci->edac_ctl_cap);
-       p += sprintf(p, "\n");
-       return p - data;
-}
-
-static ssize_t mci_edac_current_capability_show(struct mem_ctl_info *mci,
-               char *data)
-{
-       char *p = data;
-
-       p += mci_output_edac_cap(p,mci->edac_cap);
-       p += sprintf(p, "\n");
-       return p - data;
-}
-
-static int mci_output_mtype_cap(char *buf, unsigned long mtype_cap)
-{
-       char *p = buf;
-       int bit_idx;
-
-       for (bit_idx = 0; bit_idx < 8 * sizeof(mtype_cap); bit_idx++) {
-               if ((mtype_cap >> bit_idx) & 0x1)
-                       p += sprintf(p, "%s ", mem_types[bit_idx]);
-       }
-
-       return p - buf;
-}
-
-static ssize_t mci_supported_mem_type_show(struct mem_ctl_info *mci,
-               char *data)
-{
-       char *p = data;
-
-       p += mci_output_mtype_cap(p,mci->mtype_cap);
-       p += sprintf(p, "\n");
-       return p - data;
-}
-
 static ssize_t mci_size_mb_show(struct mem_ctl_info *mci, char *data)
 {
        int total_pages, csrow_idx;
@@ -1251,6 +974,7 @@ struct mcidev_attribute {
 #define to_mci(k) container_of(k, struct mem_ctl_info, edac_mci_kobj)
 #define to_mcidev_attr(a) container_of(a, struct mcidev_attribute, attr)
 
+/* MCI show/store functions for top most object */
 static ssize_t mcidev_show(struct kobject *kobj, struct attribute *attr,
                char *buffer)
 {
@@ -1287,31 +1011,21 @@ struct mcidev_attribute mci_attr_##_name = {                    \
        .store  = _store,                                       \
 };
 
-/* Control file */
+/* default Control file */
 MCIDEV_ATTR(reset_counters,S_IWUSR,NULL,mci_reset_counters_store);
 
-/* Attribute files */
+/* default Attribute files */
 MCIDEV_ATTR(mc_name,S_IRUGO,mci_ctl_name_show,NULL);
-MCIDEV_ATTR(module_name,S_IRUGO,mci_mod_name_show,NULL);
-MCIDEV_ATTR(edac_capability,S_IRUGO,mci_edac_capability_show,NULL);
 MCIDEV_ATTR(size_mb,S_IRUGO,mci_size_mb_show,NULL);
 MCIDEV_ATTR(seconds_since_reset,S_IRUGO,mci_seconds_show,NULL);
 MCIDEV_ATTR(ue_noinfo_count,S_IRUGO,mci_ue_noinfo_show,NULL);
 MCIDEV_ATTR(ce_noinfo_count,S_IRUGO,mci_ce_noinfo_show,NULL);
 MCIDEV_ATTR(ue_count,S_IRUGO,mci_ue_count_show,NULL);
 MCIDEV_ATTR(ce_count,S_IRUGO,mci_ce_count_show,NULL);
-MCIDEV_ATTR(edac_current_capability,S_IRUGO,
-       mci_edac_current_capability_show,NULL);
-MCIDEV_ATTR(supported_mem_type,S_IRUGO,
-       mci_supported_mem_type_show,NULL);
 
 static struct mcidev_attribute *mci_attr[] = {
        &mci_attr_reset_counters,
-       &mci_attr_module_name,
        &mci_attr_mc_name,
-       &mci_attr_edac_capability,
-       &mci_attr_edac_current_capability,
-       &mci_attr_supported_mem_type,
        &mci_attr_size_mb,
        &mci_attr_seconds_since_reset,
        &mci_attr_ue_noinfo_count,
@@ -1339,7 +1053,6 @@ static struct kobj_type ktype_mci = {
        .default_attrs = (struct attribute **) mci_attr,
 };
 
-#endif  /* DISABLE_EDAC_SYSFS */
 
 #define EDAC_DEVICE_SYMLINK    "device"
 
@@ -1352,11 +1065,6 @@ static struct kobj_type ktype_mci = {
  *     !0      Failure
  */
 static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
-#ifdef DISABLE_EDAC_SYSFS
-{
-       return 0;
-}
-#else
 {
        int i;
        int err;
@@ -1368,7 +1076,6 @@ static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
 
        /* set the name of the mc<id> object */
        err = kobject_set_name(edac_mci_kobj,"mc%d",mci->mc_idx);
-
        if (err)
                return err;
 
@@ -1378,14 +1085,12 @@ static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
 
        /* register the mc<id> kobject */
        err = kobject_register(edac_mci_kobj);
-
        if (err)
                return err;
 
        /* create a symlink for the device */
        err = sysfs_create_link(edac_mci_kobj, &mci->dev->kobj,
                                EDAC_DEVICE_SYMLINK);
-
        if (err)
                goto fail0;
 
@@ -1398,7 +1103,6 @@ static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
                /* Only expose populated CSROWs */
                if (csrow->nr_pages > 0) {
                        err = edac_create_csrow_object(edac_mci_kobj,csrow,i);
-
                        if (err)
                                goto fail1;
                }
@@ -1422,14 +1126,12 @@ fail0:
        wait_for_completion(&mci->kobj_complete);
        return err;
 }
-#endif  /* DISABLE_EDAC_SYSFS */
 
 /*
  * remove a Memory Controller instance
  */
 static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
 {
-#ifndef DISABLE_EDAC_SYSFS
        int i;
 
        debugf0("%s()\n", __func__);
@@ -1447,7 +1149,6 @@ static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
        init_completion(&mci->kobj_complete);
        kobject_unregister(&mci->edac_mci_kobj);
        wait_for_completion(&mci->kobj_complete);
-#endif  /* DISABLE_EDAC_SYSFS */
 }
 
 /* END OF sysfs data and methods */
index 59122cc0a50a1b39740970ab00adfb840a08c01d..cc15c4f2e9ecd28595e5f80c4bc5712e46d7f817 100644 (file)
@@ -142,6 +142,14 @@ static const u8 abituguru_pwm_max[5] = { 0, 255, 255, 75, 75 };
 static int force;
 module_param(force, bool, 0);
 MODULE_PARM_DESC(force, "Set to one to force detection.");
+static int bank1_types[ABIT_UGURU_MAX_BANK1_SENSORS] = { -1, -1, -1, -1, -1,
+       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
+module_param_array(bank1_types, int, NULL, 0);
+MODULE_PARM_DESC(bank1_types, "Bank1 sensortype autodetection override:\n"
+       "   -1 autodetect\n"
+       "    0 volt sensor\n"
+       "    1 temp sensor\n"
+       "    2 not connected");
 static int fan_sensors;
 module_param(fan_sensors, int, 0);
 MODULE_PARM_DESC(fan_sensors, "Number of fan sensors on the uGuru "
@@ -397,6 +405,15 @@ abituguru_detect_bank1_sensor_type(struct abituguru_data *data,
        u8 val, buf[3];
        int ret = ABIT_UGURU_NC;
 
+       /* If overriden by the user return the user selected type */
+       if (bank1_types[sensor_addr] >= ABIT_UGURU_IN_SENSOR &&
+                       bank1_types[sensor_addr] <= ABIT_UGURU_NC) {
+               ABIT_UGURU_DEBUG(2, "assuming sensor type %d for bank1 sensor "
+                       "%d because of \"bank1_types\" module param\n",
+                       bank1_types[sensor_addr], (int)sensor_addr);
+               return bank1_types[sensor_addr];
+       }
+
        /* First read the sensor and the current settings */
        if (abituguru_read(data, ABIT_UGURU_SENSOR_BANK1, sensor_addr, &val,
                        1, ABIT_UGURU_MAX_RETRIES) != 1)
@@ -514,7 +531,7 @@ abituguru_detect_no_bank2_sensors(struct abituguru_data *data)
 {
        int i;
 
-       if (fan_sensors) {
+       if (fan_sensors > 0 && fan_sensors <= ABIT_UGURU_MAX_BANK2_SENSORS) {
                data->bank2_sensors = fan_sensors;
                ABIT_UGURU_DEBUG(2, "assuming %d fan sensors because of "
                        "\"fan_sensors\" module param\n",
@@ -568,7 +585,7 @@ abituguru_detect_no_pwms(struct abituguru_data *data)
 {
        int i, j;
 
-       if (pwms) {
+       if (pwms > 0 && pwms <= ABIT_UGURU_MAX_PWMS) {
                data->pwms = pwms;
                ABIT_UGURU_DEBUG(2, "assuming %d PWM outputs because of "
                        "\"pwms\" module param\n", (int)data->pwms);
index df05df1a0ef61f20de8239e36bb3202ac7ae6ae5..ab230c033f9930ce293cf7ae1057db559f60b80e 100644 (file)
@@ -372,7 +372,6 @@ static inline int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
 
        while (count > 0) {
                inval = i2c_inb(i2c_adap);
-/*printk("%#02x ",inval); if ( ! (count % 16) ) printk("\n"); */
                if (inval>=0) {
                        *temp = inval;
                        rdcount++;
@@ -544,8 +543,7 @@ int i2c_bit_add_bus(struct i2c_adapter *adap)
        adap->timeout = 100;    /* default values, should       */
        adap->retries = 3;      /* be replaced by defines       */
 
-       i2c_add_adapter(adap);
-       return 0;
+       return i2c_add_adapter(adap);
 }
 
 
index 2db7bfc852252dbf1b74c29ede26071b522a92e1..70d8eefb5efcc44639b86bda6525fb084b76f04f 100644 (file)
@@ -742,10 +742,8 @@ int i2c_iic_add_bus(struct i2c_adapter *adap)
        adap->retries = 3;              /* be replaced by defines       */
        adap->flags = 0;
 
-       i2c_add_adapter(adap);
        iic_init(iic_adap);
-
-       return 0;
+       return i2c_add_adapter(adap);
 }
 
 
index 82946acab4c759ddeac4e2b235dd56eacf39fa3a..b88a6fcf7bd094abf75c67ba940cefe0fbd9ce58 100644 (file)
@@ -374,10 +374,10 @@ int i2c_pca_add_bus(struct i2c_adapter *adap)
        adap->timeout = 100;            /* default values, should       */
        adap->retries = 3;              /* be replaced by defines       */
 
-       rval = pca_init(pca_adap);
+       if ((rval = pca_init(pca_adap)))
+               return rval;
 
-       if (!rval)
-               i2c_add_adapter(adap);
+       rval = i2c_add_adapter(adap);
 
        return rval;
 }
index 6e498df1f717aea6f238b6ce91d990b9a7cbedfa..5b24930adb5a7b9e23721f47aca79daa7b450d04 100644 (file)
@@ -479,9 +479,11 @@ int i2c_pcf_add_bus(struct i2c_adapter *adap)
        adap->timeout = 100;            /* default values, should       */
        adap->retries = 3;              /* be replaced by defines       */
 
-       rval = pcf_init_8584(pcf_adap);
-       if (!rval)
-               i2c_add_adapter(adap);
+       if ((rval = pcf_init_8584(pcf_adap)))
+               return rval;
+
+       rval = i2c_add_adapter(adap);
+
        return rval;
 }
 
index 3df3f09995c254806ed8c265eb3dfcb4c8cd08df..32d41c6fac0fccf0583bd53cb60b40b72c47632b 100644 (file)
@@ -173,9 +173,7 @@ int i2c_sibyte_add_bus(struct i2c_adapter *i2c_adap, int speed)
                printk("\n");
        }
 
-       i2c_add_adapter(i2c_adap);
-
-       return 0;
+       return i2c_add_adapter(i2c_adap);
 }
 
 
index aca7e166860546174c59557aead82d7d90c25428..48c56939c8619abaae4e6289fb86cd2856d03921 100644 (file)
@@ -21,6 +21,9 @@
  * - Make it work with IXP46x chips
  * - Cleanup function names, coding style, etc
  *
+ * - writing to slave address causes latchup on iop331.
+ *     fix: driver refuses to address self.
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, version 2.
@@ -72,12 +75,6 @@ iop3xx_i2c_reset(struct i2c_algo_iop3xx_data *iop3xx_adap)
        __raw_writel(0, iop3xx_adap->ioaddr + CR_OFFSET);
 } 
 
-static void 
-iop3xx_i2c_set_slave_addr(struct i2c_algo_iop3xx_data *iop3xx_adap)
-{
-       __raw_writel(MYSAR, iop3xx_adap->ioaddr + SAR_OFFSET);
-}
-
 static void 
 iop3xx_i2c_enable(struct i2c_algo_iop3xx_data *iop3xx_adap)
 {
@@ -248,6 +245,13 @@ iop3xx_i2c_send_target_addr(struct i2c_algo_iop3xx_data *iop3xx_adap,
        int status;
        int rc;
 
+       /* avoid writing to my slave address (hangs on 80331),
+        * forbidden in Intel developer manual
+        */
+       if (msg->addr == MYSAR) {
+               return -EBUSY;
+       }
+
        __raw_writel(iic_cook_addr(msg), iop3xx_adap->ioaddr + DBR_OFFSET);
        
        cr &= ~(IOP3XX_ICR_MSTOP | IOP3XX_ICR_NACK);
@@ -498,7 +502,6 @@ iop3xx_i2c_probe(struct platform_device *pdev)
        spin_lock_init(&adapter_data->lock);
 
        iop3xx_i2c_reset(adapter_data);
-       iop3xx_i2c_set_slave_addr(adapter_data);
        iop3xx_i2c_enable(adapter_data);
 
        platform_set_drvdata(pdev, new_adapter);
index e46ebaea7b1edba4cfa6f8a0e904977cd7cc320c..8485861f6a36dd01a9d30c86d1414fe1def11dbc 100644 (file)
@@ -80,7 +80,7 @@
 #define IOP3XX_GPOD_I2C0       0x00c0  /* clear these bits to enable ch0 */
 #define IOP3XX_GPOD_I2C1       0x0030  /* clear these bits to enable ch1 */
 
-#define MYSAR                  0x02    /* SWAG a suitable slave address */
+#define MYSAR                  0       /* default slave address */
 
 #define I2C_ERR                        321
 #define I2C_ERR_BERR           (I2C_ERR+0)
index 2a0b3be7cdd0824d910d90f5ddec5e312202abf9..53bb4359386399149ca6d130aad56459846749ed 100644 (file)
@@ -148,8 +148,6 @@ static int i2c_powermac_master_xfer(        struct i2c_adapter *adap,
        int                     read;
        int                     addrdir;
 
-       if (num != 1)
-               return -EINVAL;
        if (msgs->flags & I2C_M_TEN)
                return -EINVAL;
        read = (msgs->flags & I2C_M_RD) != 0;
@@ -166,7 +164,7 @@ static int i2c_powermac_master_xfer(        struct i2c_adapter *adap,
        rc = pmac_i2c_xfer(bus, addrdir, 0, 0, msgs->buf, msgs->len);
  bail:
        pmac_i2c_close(bus);
-       return rc < 0 ? rc : msgs->len;
+       return rc < 0 ? rc : 1;
 }
 
 static u32 i2c_powermac_func(struct i2c_adapter * adapter)
index 22a3eda04166e3b7841d0fd5c897aa16851b20fa..ced309ff056fa123d3a0022dfcc7d7530b60d491 100644 (file)
@@ -184,21 +184,21 @@ static void scx200_acb_machine(struct scx200_acb_iface *iface, u8 status)
                break;
 
        case state_read:
-               /* Set ACK if receiving the last byte */
-               if (iface->len == 1)
+               /* Set ACK if _next_ byte will be the last one */
+               if (iface->len == 2)
                        outb(inb(ACBCTL1) | ACBCTL1_ACK, ACBCTL1);
                else
                        outb(inb(ACBCTL1) & ~ACBCTL1_ACK, ACBCTL1);
 
-               *iface->ptr++ = inb(ACBSDA);
-               --iface->len;
-
-               if (iface->len == 0) {
+               if (iface->len == 1) {
                        iface->result = 0;
                        iface->state = state_idle;
                        outb(inb(ACBCTL1) | ACBCTL1_STOP, ACBCTL1);
                }
 
+               *iface->ptr++ = inb(ACBSDA);
+               --iface->len;
+
                break;
 
        case state_write:
@@ -307,8 +307,12 @@ static s32 scx200_acb_smbus_xfer(struct i2c_adapter *adapter,
                buffer = (u8 *)&cur_word;
                break;
 
-       case I2C_SMBUS_BLOCK_DATA:
+       case I2C_SMBUS_I2C_BLOCK_DATA:
+               if (rw == I2C_SMBUS_READ)
+                       data->block[0] = I2C_SMBUS_BLOCK_MAX; /* For now */
                len = data->block[0];
+               if (len == 0 || len > I2C_SMBUS_BLOCK_MAX)
+                       return -EINVAL;
                buffer = &data->block[1];
                break;
 
@@ -372,7 +376,7 @@ static u32 scx200_acb_func(struct i2c_adapter *adapter)
 {
        return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
               I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
-              I2C_FUNC_SMBUS_BLOCK_DATA;
+              I2C_FUNC_SMBUS_I2C_BLOCK;
 }
 
 /* For now, we only handle combined mode (smbus) */
index 54b6e6a4beedcd5c9e8288caab01acfb90f8c0bb..cb22280cdd277cb08c738abcc4064588413226a8 100644 (file)
@@ -134,11 +134,13 @@ static int pca9539_detect(struct i2c_adapter *adapter, int address, int kind)
        new_client->driver = &pca9539_driver;
        new_client->flags = 0;
 
-       /* Detection: the pca9539 only has 8 registers (0-7).
-          A read of 7 should succeed, but a read of 8 should fail. */
-       if ((i2c_smbus_read_byte_data(new_client, 7) < 0) ||
-           (i2c_smbus_read_byte_data(new_client, 8) >= 0))
-               goto exit_kfree;
+       if (kind < 0) {
+               /* Detection: the pca9539 only has 8 registers (0-7).
+                  A read of 7 should succeed, but a read of 8 should fail. */
+               if ((i2c_smbus_read_byte_data(new_client, 7) < 0) ||
+                   (i2c_smbus_read_byte_data(new_client, 8) >= 0))
+                       goto exit_kfree;
+       }
 
        strlcpy(new_client->name, "pca9539", I2C_NAME_SIZE);
 
index a45155f799d4405dae2d67ca06d7168f64fe9d3d..9cb277d6aa48bbff97dc6582051e5ab03e912850 100644 (file)
@@ -756,9 +756,9 @@ int i2c_probe(struct i2c_adapter *adapter,
                                        "parameter for adapter %d, "
                                        "addr 0x%02x\n", adap_id,
                                        address_data->ignore[j + 1]);
+                               ignore = 1;
+                               break;
                        }
-                       ignore = 1;
-                       break;
                }
                if (ignore)
                        continue;
index b7e459e4f284af88a00b26a50b40ffed734f531d..602797a4420877f6fc74e659a05b4c50be8d54d6 100644 (file)
@@ -146,16 +146,7 @@ static void ide_detach(struct pcmcia_device *link)
     kfree(link->priv);
 } /* ide_detach */
 
-static void idecs_mmio_fixup(ide_hwif_t *hwif)
-{
-       default_hwif_mmiops(hwif);
-       hwif->mmio = 2;
-
-       ide_undecoded_slave(hwif);
-}
-
-static int idecs_register(unsigned long io, unsigned long ctl,
-       unsigned long irq, struct pcmcia_device *handle, int is_mmio)
+static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq, struct pcmcia_device *handle)
 {
     hw_regs_t hw;
     memset(&hw, 0, sizeof(hw));
@@ -163,19 +154,7 @@ static int idecs_register(unsigned long io, unsigned long ctl,
     hw.irq = irq;
     hw.chipset = ide_pci;
     hw.dev = &handle->dev;
-
-    if(is_mmio)
-       return ide_register_hw_with_fixup(&hw, NULL, idecs_mmio_fixup);
-    else
-        return ide_register_hw_with_fixup(&hw, NULL, ide_undecoded_slave);
-}
-
-void outb_io(unsigned char value, unsigned long port) {
-       outb(value, port);
-}
-
-void outb_mem(unsigned char value, unsigned long port) {
-       writeb(value, (void __iomem *) port);
+    return ide_register_hw_with_fixup(&hw, NULL, ide_undecoded_slave);
 }
 
 /*======================================================================
@@ -201,8 +180,7 @@ static int ide_config(struct pcmcia_device *link)
     } *stk = NULL;
     cistpl_cftable_entry_t *cfg;
     int i, pass, last_ret = 0, last_fn = 0, hd, is_kme = 0;
-    unsigned long io_base, ctl_base, is_mmio, try_slave;
-    void (*my_outb)(unsigned char, unsigned long);
+    unsigned long io_base, ctl_base;
 
     DEBUG(0, "ide_config(0x%p)\n", link);
 
@@ -232,7 +210,7 @@ static int ide_config(struct pcmcia_device *link)
     /* Not sure if this is right... look up the current Vcc */
     CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &stk->conf));
 
-    pass = io_base = ctl_base = is_mmio = try_slave = 0;
+    pass = io_base = ctl_base = 0;
     tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
     tuple.Attributes = 0;
     CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
@@ -280,45 +258,11 @@ static int ide_config(struct pcmcia_device *link)
                        goto next_entry;
                io_base = link->io.BasePort1;
                ctl_base = link->io.BasePort1 + 0x0e;
-
-               if (io->win[0].len >= 0x20)
-                       try_slave = 1;
-
            } else goto next_entry;
            /* If we've got this far, we're done */
            break;
        }
 
-       if ((cfg->mem.nwin > 0) || (stk->dflt.mem.nwin > 0)) {
-           win_req_t req;
-           memreq_t map;
-           cistpl_mem_t *mem = (cfg->mem.nwin) ? &cfg->mem : &stk->dflt.mem;
-
-           if (mem->win[0].len < 16)
-               goto next_entry;
-
-           req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM;
-           req.Attributes |= WIN_ENABLE;
-           req.Base = mem->win[0].host_addr;
-           req.Size = 0;
-
-           req.AccessSpeed = 0;
-           if (pcmcia_request_window(&link, &req, &link->win) != 0)
-               goto next_entry;
-           map.Page = 0; map.CardOffset = mem->win[0].card_addr;
-           if (pcmcia_map_mem_page(link->win, &map) != 0)
-               goto next_entry;
-
-           io_base = (unsigned long) ioremap(req.Base, req.Size);
-           ctl_base = io_base + 0x0e;
-           is_mmio = 1;
-
-           if (mem->win[0].len >= 0x20)
-               try_slave = 1;
-
-           break;
-       }
-
     next_entry:
        if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
            memcpy(&stk->dflt, cfg, sizeof(stk->dflt));
@@ -334,26 +278,21 @@ static int ide_config(struct pcmcia_device *link)
     CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
     CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
 
-    if(is_mmio)
-       my_outb = outb_mem;
-    else
-       my_outb = outb_io;
-
     /* disable drive interrupts during IDE probe */
-    my_outb(0x02, ctl_base);
+    outb(0x02, ctl_base);
 
     /* special setup for KXLC005 card */
     if (is_kme)
-       my_outb(0x81, ctl_base+1);
+       outb(0x81, ctl_base+1);
 
     /* retry registration in case device is still spinning up */
     for (hd = -1, i = 0; i < 10; i++) {
-       hd = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link, is_mmio);
+       hd = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link);
        if (hd >= 0) break;
-       if (try_slave) {
-           my_outb(0x02, ctl_base + 0x10);
+       if (link->io.NumPorts1 == 0x20) {
+           outb(0x02, ctl_base + 0x10);
            hd = idecs_register(io_base + 0x10, ctl_base + 0x10,
-                               link->irq.AssignedIRQ, link, is_mmio);
+                               link->irq.AssignedIRQ, link);
            if (hd >= 0) {
                io_base += 0x10;
                ctl_base += 0x10;
index f82e82109728fa0e79a5fa31987266406120d19c..2f962cfa3f7f0f2e4a38af238cce287bd6d19f9a 100644 (file)
@@ -212,6 +212,9 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
            (!(PCI_FUNC(dev->devfn) & 1)))
                goto out;
 
+       if (dev->vendor == PCI_VENDOR_ID_JMICRON && PCI_FUNC(dev->devfn) != 1)
+               goto out;
+
        pci_read_config_word(dev, PCI_COMMAND, &command);
        if (!(command & PCI_COMMAND_IO)) {
                printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name);
@@ -239,6 +242,11 @@ static struct pci_device_id generic_pci_tbl[] = {
        { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12},
        { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13},
        { PCI_VENDOR_ID_NETCELL,PCI_DEVICE_ID_REVOLUTION,          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14},
+       { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15},
+       { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16},
+       { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17},
+       { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18},
+       { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19},
        /* Must come last. If you add entries adjust this table appropriately and the init_one code */
        { PCI_ANY_ID,           PCI_ANY_ID,                        PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0},
        { 0, },
index 3f6705f3083ac65e7e501e9b7fa8b9cd403c587b..f85c97f7500a844d41bd5e7b5243e6cd10bd44db 100644 (file)
@@ -701,7 +701,7 @@ static void cm_reset_to_idle(struct cm_id_private *cm_id_priv)
        }
 }
 
-void ib_destroy_cm_id(struct ib_cm_id *cm_id)
+static void cm_destroy_id(struct ib_cm_id *cm_id, int err)
 {
        struct cm_id_private *cm_id_priv;
        struct cm_work *work;
@@ -735,12 +735,22 @@ retest:
                               sizeof cm_id_priv->av.port->cm_dev->ca_guid,
                               NULL, 0);
                break;
+       case IB_CM_REQ_RCVD:
+               if (err == -ENOMEM) {
+                       /* Do not reject to allow future retries. */
+                       cm_reset_to_idle(cm_id_priv);
+                       spin_unlock_irqrestore(&cm_id_priv->lock, flags);
+               } else {
+                       spin_unlock_irqrestore(&cm_id_priv->lock, flags);
+                       ib_send_cm_rej(cm_id, IB_CM_REJ_CONSUMER_DEFINED,
+                                      NULL, 0, NULL, 0);
+               }
+               break;
        case IB_CM_MRA_REQ_RCVD:
        case IB_CM_REP_SENT:
        case IB_CM_MRA_REP_RCVD:
                ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
                /* Fall through */
-       case IB_CM_REQ_RCVD:
        case IB_CM_MRA_REQ_SENT:
        case IB_CM_REP_RCVD:
        case IB_CM_MRA_REP_SENT:
@@ -775,6 +785,11 @@ retest:
        kfree(cm_id_priv->private_data);
        kfree(cm_id_priv);
 }
+
+void ib_destroy_cm_id(struct ib_cm_id *cm_id)
+{
+       cm_destroy_id(cm_id, 0);
+}
 EXPORT_SYMBOL(ib_destroy_cm_id);
 
 int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask,
@@ -1163,7 +1178,7 @@ static void cm_process_work(struct cm_id_private *cm_id_priv,
        }
        cm_deref_id(cm_id_priv);
        if (ret)
-               ib_destroy_cm_id(&cm_id_priv->id);
+               cm_destroy_id(&cm_id_priv->id, ret);
 }
 
 static void cm_format_mra(struct cm_mra_msg *mra_msg,
index 863f64befc7c5d5703fc8fc06adf9001642b660d..d6f99d5720fcf2b12051898fc336a2e1691e882a 100644 (file)
@@ -262,14 +262,14 @@ static void cma_detach_from_dev(struct rdma_id_private *id_priv)
 static int cma_acquire_ib_dev(struct rdma_id_private *id_priv)
 {
        struct cma_device *cma_dev;
-       union ib_gid *gid;
+       union ib_gid gid;
        int ret = -ENODEV;
 
-       gid = ib_addr_get_sgid(&id_priv->id.route.addr.dev_addr);
+       ib_addr_get_sgid(&id_priv->id.route.addr.dev_addr, &gid),
 
        mutex_lock(&lock);
        list_for_each_entry(cma_dev, &dev_list, list) {
-               ret = ib_find_cached_gid(cma_dev->device, gid,
+               ret = ib_find_cached_gid(cma_dev->device, &gid,
                                         &id_priv->id.port_num, NULL);
                if (!ret) {
                        cma_attach_to_dev(id_priv, cma_dev);
@@ -812,6 +812,7 @@ static int cma_ib_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event)
                cma_modify_qp_err(&id_priv->id);
                status = ib_event->param.rej_rcvd.reason;
                event = RDMA_CM_EVENT_REJECTED;
+               private_data_len = IB_CM_REJ_PRIVATE_DATA_SIZE;
                break;
        default:
                printk(KERN_ERR "RDMA CMA: unexpected IB CM event: %d",
@@ -1134,8 +1135,8 @@ static int cma_query_ib_route(struct rdma_id_private *id_priv, int timeout_ms,
        struct ib_sa_path_rec path_rec;
 
        memset(&path_rec, 0, sizeof path_rec);
-       path_rec.sgid = *ib_addr_get_sgid(addr);
-       path_rec.dgid = *ib_addr_get_dgid(addr);
+       ib_addr_get_sgid(addr, &path_rec.sgid);
+       ib_addr_get_dgid(addr, &path_rec.dgid);
        path_rec.pkey = cpu_to_be16(ib_addr_get_pkey(addr));
        path_rec.numb_path = 1;
 
@@ -1263,7 +1264,7 @@ static int cma_bind_loopback(struct rdma_id_private *id_priv)
 {
        struct cma_device *cma_dev;
        struct ib_port_attr port_attr;
-       union ib_gid *gid;
+       union ib_gid gid;
        u16 pkey;
        int ret;
        u8 p;
@@ -1284,8 +1285,7 @@ static int cma_bind_loopback(struct rdma_id_private *id_priv)
        }
 
 port_found:
-       gid = ib_addr_get_sgid(&id_priv->id.route.addr.dev_addr);
-       ret = ib_get_cached_gid(cma_dev->device, p, 0, gid);
+       ret = ib_get_cached_gid(cma_dev->device, p, 0, &gid);
        if (ret)
                goto out;
 
@@ -1293,6 +1293,7 @@ port_found:
        if (ret)
                goto out;
 
+       ib_addr_set_sgid(&id_priv->id.route.addr.dev_addr, &gid);
        ib_addr_set_pkey(&id_priv->id.route.addr.dev_addr, pkey);
        id_priv->id.port_num = p;
        cma_attach_to_dev(id_priv, cma_dev);
@@ -1339,6 +1340,7 @@ static int cma_resolve_loopback(struct rdma_id_private *id_priv)
 {
        struct cma_work *work;
        struct sockaddr_in *src_in, *dst_in;
+       union ib_gid gid;
        int ret;
 
        work = kzalloc(sizeof *work, GFP_KERNEL);
@@ -1351,8 +1353,8 @@ static int cma_resolve_loopback(struct rdma_id_private *id_priv)
                        goto err;
        }
 
-       ib_addr_set_dgid(&id_priv->id.route.addr.dev_addr,
-                        ib_addr_get_sgid(&id_priv->id.route.addr.dev_addr));
+       ib_addr_get_sgid(&id_priv->id.route.addr.dev_addr, &gid);
+       ib_addr_set_dgid(&id_priv->id.route.addr.dev_addr, &gid);
 
        if (cma_zero_addr(&id_priv->id.route.addr.src_addr)) {
                src_in = (struct sockaddr_in *)&id_priv->id.route.addr.src_addr;
index 615fe9cc6c568fe9b42dffdf007fda3254c81e1e..86a3b2d401dbaf72bdaadd3533fc9594f67fda03 100644 (file)
@@ -426,7 +426,7 @@ EXPORT_SYMBOL(ib_flush_fmr_pool);
 struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle,
                                         u64                *page_list,
                                         int                 list_len,
-                                        u64                *io_virtual_address)
+                                        u64                 io_virtual_address)
 {
        struct ib_fmr_pool *pool = pool_handle;
        struct ib_pool_fmr *fmr;
@@ -440,7 +440,7 @@ struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle,
        fmr = ib_fmr_cache_lookup(pool,
                                  page_list,
                                  list_len,
-                                 *io_virtual_address);
+                                 io_virtual_address);
        if (fmr) {
                /* found in cache */
                ++fmr->ref_count;
@@ -464,7 +464,7 @@ struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle,
        spin_unlock_irqrestore(&pool->pool_lock, flags);
 
        result = ib_map_phys_fmr(fmr->fmr, page_list, list_len,
-                                *io_virtual_address);
+                                io_virtual_address);
 
        if (result) {
                spin_lock_irqsave(&pool->pool_lock, flags);
@@ -481,7 +481,7 @@ struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle,
        fmr->ref_count = 1;
 
        if (pool->cache_bucket) {
-               fmr->io_virtual_address = *io_virtual_address;
+               fmr->io_virtual_address = io_virtual_address;
                fmr->page_list_len      = list_len;
                memcpy(fmr->page_list, page_list, list_len * sizeof(*page_list));
 
index e911c99ff8437987d0e12535a8f80bda02e8327f..aeda484ffd820605b54602aff002268bcc8be63d 100644 (file)
@@ -488,13 +488,13 @@ static void init_mad(struct ib_sa_mad *mad, struct ib_mad_agent *agent)
        spin_unlock_irqrestore(&tid_lock, flags);
 }
 
-static int send_mad(struct ib_sa_query *query, int timeout_ms)
+static int send_mad(struct ib_sa_query *query, int timeout_ms, gfp_t gfp_mask)
 {
        unsigned long flags;
        int ret, id;
 
 retry:
-       if (!idr_pre_get(&query_idr, GFP_ATOMIC))
+       if (!idr_pre_get(&query_idr, gfp_mask))
                return -ENOMEM;
        spin_lock_irqsave(&idr_lock, flags);
        ret = idr_get_new(&query_idr, query, &id);
@@ -630,7 +630,7 @@ int ib_sa_path_rec_get(struct ib_device *device, u8 port_num,
 
        *sa_query = &query->sa_query;
 
-       ret = send_mad(&query->sa_query, timeout_ms);
+       ret = send_mad(&query->sa_query, timeout_ms, gfp_mask);
        if (ret < 0)
                goto err2;
 
@@ -752,7 +752,7 @@ int ib_sa_service_rec_query(struct ib_device *device, u8 port_num, u8 method,
 
        *sa_query = &query->sa_query;
 
-       ret = send_mad(&query->sa_query, timeout_ms);
+       ret = send_mad(&query->sa_query, timeout_ms, gfp_mask);
        if (ret < 0)
                goto err2;
 
@@ -844,7 +844,7 @@ int ib_sa_mcmember_rec_query(struct ib_device *device, u8 port_num,
 
        *sa_query = &query->sa_query;
 
-       ret = send_mad(&query->sa_query, timeout_ms);
+       ret = send_mad(&query->sa_query, timeout_ms, gfp_mask);
        if (ret < 0)
                goto err2;
 
index b12aa03be25115a1198e7178ffb5720066e20f27..e215041b2db9cb7cedd3f4616370659cf1a0dd28 100644 (file)
@@ -303,9 +303,10 @@ int mthca_ah_query(struct ib_ah *ibah, struct ib_ah_attr *attr)
        memset(attr, 0, sizeof *attr);
        attr->dlid          = be16_to_cpu(ah->av->dlid);
        attr->sl            = be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 28;
-       attr->static_rate   = ah->av->msg_sr & 0x7;
-       attr->src_path_bits = ah->av->g_slid & 0x7F;
        attr->port_num      = be32_to_cpu(ah->av->port_pd) >> 24;
+       attr->static_rate   = mthca_rate_to_ib(dev, ah->av->msg_sr & 0x7,
+                                              attr->port_num);
+       attr->src_path_bits = ah->av->g_slid & 0x7F;
        attr->ah_flags      = mthca_ah_grh_present(ah) ? IB_AH_GRH : 0;
 
        if (attr->ah_flags) {
index 490fc783bb0c899709488f7f83fbeaf261b36a0c..cd8b6721ac9c1b5d8401dbbdae77cee064f39356 100644 (file)
@@ -222,9 +222,8 @@ static void *get_send_wqe(struct mthca_qp *qp, int n)
                         (PAGE_SIZE - 1));
 }
 
-static void mthca_wq_init(struct mthca_wq *wq)
+static void mthca_wq_reset(struct mthca_wq *wq)
 {
-       /* mthca_alloc_qp_common() initializes the locks */
        wq->next_ind  = 0;
        wq->last_comp = wq->max - 1;
        wq->head      = 0;
@@ -845,10 +844,10 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
                        mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq), qp->qpn,
                                       qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL);
 
-               mthca_wq_init(&qp->sq);
+               mthca_wq_reset(&qp->sq);
                qp->sq.last = get_send_wqe(qp, qp->sq.max - 1);
 
-               mthca_wq_init(&qp->rq);
+               mthca_wq_reset(&qp->rq);
                qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1);
 
                if (mthca_is_memfree(dev)) {
@@ -1112,9 +1111,9 @@ static int mthca_alloc_qp_common(struct mthca_dev *dev,
        qp->atomic_rd_en = 0;
        qp->resp_depth   = 0;
        qp->sq_policy    = send_policy;
-       mthca_wq_init(&qp->sq);
-       mthca_wq_init(&qp->rq);
-       /* these are initialized separately so lockdep can tell them apart */
+       mthca_wq_reset(&qp->sq);
+       mthca_wq_reset(&qp->rq);
+
        spin_lock_init(&qp->sq.lock);
        spin_lock_init(&qp->rq.lock);
 
index ff117bbf81b40baee27782f123eb66a5161c1f7a..72febf1f8ff8d74b974d12333fe4e7e4a81ef50e 100644 (file)
@@ -594,7 +594,7 @@ int iser_reg_page_vec(struct iser_conn     *ib_conn,
        mem  = ib_fmr_pool_map_phys(ib_conn->fmr_pool,
                                    page_list,
                                    page_vec->length,
-                                   &io_addr);
+                                   io_addr);
 
        if (IS_ERR(mem)) {
                status = (int)PTR_ERR(mem);
index 4e22afef72062571c12b3489bc9e26fa998fce43..8f472e7113b41afcd4b35f35a0ea7ae0f55d93fe 100644 (file)
@@ -615,9 +615,10 @@ static int srp_map_fmr(struct srp_device *dev, struct scatterlist *scat,
                                (sg_dma_address(&scat[i]) & dev->fmr_page_mask) + j;
 
        req->fmr = ib_fmr_pool_map_phys(dev->fmr_pool,
-                                       dma_pages, page_cnt, &io_addr);
+                                       dma_pages, page_cnt, io_addr);
        if (IS_ERR(req->fmr)) {
                ret = PTR_ERR(req->fmr);
+               req->fmr = NULL;
                goto out;
        }
 
index a98c5e38bbbc527ac512028887f3f4a645ee509b..93ff941c48f1f74023b0ab664e48f1c5527cd617 100644 (file)
@@ -297,7 +297,7 @@ Asus_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 }
 
 #ifdef __ISAPNP__
-static struct isapnp_device_id asus_ids[] __initdata = {
+static struct isapnp_device_id asus_ids[] __devinitdata = {
        { ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688),
          ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688), 
          (unsigned long) "Asus1688 PnP" },
@@ -313,11 +313,11 @@ static struct isapnp_device_id asus_ids[] __initdata = {
        { 0, }
 };
 
-static struct isapnp_device_id *ipid __initdata = &asus_ids[0];
+static struct isapnp_device_id *ipid __devinitdata = &asus_ids[0];
 static struct pnp_card *pnp_c __devinitdata = NULL;
 #endif
 
-int __init
+int __devinit
 setup_asuscom(struct IsdnCard *card)
 {
        int bytecnt;
index 9a8b02557ff9030b9d1984d3e872170776226ba8..729e906bdc61265596008a1b3a30043fd67525f1 100644 (file)
@@ -178,7 +178,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return(0);
 }
 
-int __init
+int __devinit
 setup_avm_a1(struct IsdnCard *card)
 {
        u_char val;
index 04f5917bf5a14f7c58328c3fec48edf7a5f93f15..369afd3a3a4b42c2196a1b52ec34ed25bb37ec17 100644 (file)
@@ -639,7 +639,7 @@ clear_pending_hdlc_ints(struct IsdnCardState *cs)
 }
 #endif  /*  0  */
 
-static void __init
+static void
 inithdlc(struct IsdnCardState *cs)
 {
        cs->bcs[0].BC_SetStack = setstack_hdlc;
@@ -727,13 +727,13 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 }
 
 #ifdef CONFIG_PCI
-static struct pci_dev *dev_avm __initdata = NULL;
+static struct pci_dev *dev_avm __devinitdata = NULL;
 #endif
 #ifdef __ISAPNP__
-static struct pnp_card *pnp_avm_c __initdata = NULL;
+static struct pnp_card *pnp_avm_c __devinitdata = NULL;
 #endif
 
-int __init
+int __devinit
 setup_avm_pcipnp(struct IsdnCard *card)
 {
        u_int val, ver;
index 3cf1f2421789357caf588d3b3a4c882f2f0eacdc..87a630128a6cd8a1190dcc39ebfc571572dffbd6 100644 (file)
@@ -255,9 +255,9 @@ BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return (0);
 }
 
-static struct pci_dev *dev_a4t __initdata = NULL;
+static struct pci_dev *dev_a4t __devinitdata = NULL;
 
-int __init
+int __devinit
 setup_bkm_a4t(struct IsdnCard *card)
 {
        struct IsdnCardState *cs = card->cs;
index 15681f3e73b8b0b40a950d59e27d912afa69944d..dae090a9a489bad7abdc2b3edfa2fd130bee1e58 100644 (file)
@@ -260,7 +260,7 @@ BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return (0);
 }
 
-static int __init
+static int __devinit
 sct_alloc_io(u_int adr, u_int len)
 {
        if (!request_region(adr, len, "scitel")) {
@@ -272,16 +272,16 @@ sct_alloc_io(u_int adr, u_int len)
        return(0);
 }
 
-static struct pci_dev *dev_a8 __initdata = NULL;
-static u16  sub_vendor_id __initdata = 0;
-static u16  sub_sys_id __initdata = 0;
-static u_char pci_bus __initdata = 0;
-static u_char pci_device_fn __initdata = 0;
-static u_char pci_irq __initdata = 0;
+static struct pci_dev *dev_a8 __devinitdata = NULL;
+static u16  sub_vendor_id __devinitdata = 0;
+static u16  sub_sys_id __devinitdata = 0;
+static u_char pci_bus __devinitdata = 0;
+static u_char pci_device_fn __devinitdata = 0;
+static u_char pci_irq __devinitdata = 0;
 
 #endif /* CONFIG_PCI */
 
-int __init
+int __devinit
 setup_sct_quadro(struct IsdnCard *card)
 {
 #ifdef CONFIG_PCI
index 5333be5d2c4740fff12a38e52b9bb9f5583e9622..e10350360f2ff27c5158fbebe732fa0991bf44bd 100644 (file)
@@ -1875,7 +1875,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if)
 #ifdef CONFIG_PCI
 #include <linux/pci.h>
 
-static struct pci_device_id hisax_pci_tbl[] __initdata = {
+static struct pci_device_id hisax_pci_tbl[] __devinitdata = {
 #ifdef CONFIG_HISAX_FRITZPCI
        {PCI_VENDOR_ID_AVM,      PCI_DEVICE_ID_AVM_A1,           PCI_ANY_ID, PCI_ANY_ID},
 #endif
index 323a02ef38441b8a1f3c57a77183b6aca258f30e..e294fa3918f3799dbbf5adbe266e1d77f1d8bbff 100644 (file)
@@ -887,13 +887,13 @@ Diva_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return(0);
 }
 
-static struct pci_dev *dev_diva __initdata = NULL;
-static struct pci_dev *dev_diva_u __initdata = NULL;
-static struct pci_dev *dev_diva201 __initdata = NULL;
-static struct pci_dev *dev_diva202 __initdata = NULL;
+static struct pci_dev *dev_diva __devinitdata = NULL;
+static struct pci_dev *dev_diva_u __devinitdata = NULL;
+static struct pci_dev *dev_diva201 __devinitdata = NULL;
+static struct pci_dev *dev_diva202 __devinitdata = NULL;
 
 #ifdef __ISAPNP__
-static struct isapnp_device_id diva_ids[] __initdata = {
+static struct isapnp_device_id diva_ids[] __devinitdata = {
        { ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51),
          ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51), 
          (unsigned long) "Diva picola" },
@@ -915,12 +915,12 @@ static struct isapnp_device_id diva_ids[] __initdata = {
        { 0, }
 };
 
-static struct isapnp_device_id *ipid __initdata = &diva_ids[0];
+static struct isapnp_device_id *ipid __devinitdata = &diva_ids[0];
 static struct pnp_card *pnp_c __devinitdata = NULL;
 #endif
 
 
-int __init
+int __devinit
 setup_diva(struct IsdnCard *card)
 {
        int bytecnt = 8;
index 8fcbe2e7d765bb3b47a053eec74ddb8aa96d7072..76c7d29d1b2fb43461fb67b8f0ee74d9e409171d 100644 (file)
@@ -301,10 +301,10 @@ enpci_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 }
 
 
-static struct pci_dev *dev_netjet __initdata = NULL;
+static struct pci_dev *dev_netjet __devinitdata = NULL;
 
 /* called by config.c */
-int __init
+int __devinit
 setup_enternow_pci(struct IsdnCard *card)
 {
        int bytecnt;
index 3e7d923035824bd8b7f01aed7343ef807cb8211d..fe29372677777f99e6c3835f35bdcb2977703fee 100644 (file)
@@ -484,7 +484,7 @@ reserve_regions(struct IsdnCard *card, struct IsdnCardState *cs)
        return 1;
 }
 
-static int __init
+static int __devinit
 setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs)
 {
        printk(KERN_INFO "Gazel: ISA PnP card automatic recognition\n");
@@ -532,9 +532,9 @@ setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs)
        return (0);
 }
 
-static struct pci_dev *dev_tel __initdata = NULL;
+static struct pci_dev *dev_tel __devinitdata = NULL;
 
-static int __init
+static int __devinit
 setup_gazelpci(struct IsdnCardState *cs)
 {
        u_int pci_ioaddr0 = 0, pci_ioaddr1 = 0;
@@ -621,7 +621,7 @@ setup_gazelpci(struct IsdnCardState *cs)
        return (0);
 }
 
-int __init
+int __devinit
 setup_gazel(struct IsdnCard *card)
 {
        struct IsdnCardState *cs = card->cs;
index 0f967b3df79dac9083d0f7634d2022bbfd471692..3a5ca8a68fc42fb512d64542aa707c819b5c997b 100644 (file)
@@ -1703,7 +1703,7 @@ hfc4s8s_module_init(void)
 /* driver module exit :              */
 /* release the HFC-4s/8s hardware    */
 /*************************************/
-static void
+static void __exit
 hfc4s8s_module_exit(void)
 {
        pci_unregister_driver(&hfc4s8s_driver);
index 637a261c93122a5929d3459e6d4a9e346b32b16e..6360e82147205b0aadd5120a2961bb2a8f58d57b 100644 (file)
@@ -1015,7 +1015,7 @@ hfc_dbusy_timer(struct IsdnCardState *cs)
 {
 }
 
-static unsigned int __init
+static unsigned int
 *init_send_hfcd(int cnt)
 {
        int i, *send;
@@ -1030,7 +1030,7 @@ static unsigned int __init
        return(send);
 }
 
-void __init
+void
 init2bds0(struct IsdnCardState *cs)
 {
        cs->setstack_d = setstack_hfcd;
index c964539cc43e537daa1fe135dbd66afa22da2117..d0520ad306775a773f338a429a31936c9a97fc93 100644 (file)
@@ -551,7 +551,7 @@ setstack_hfc(struct PStack *st, struct BCState *bcs)
        return (0);
 }
 
-static void __init
+static void
 init_send(struct BCState *bcs)
 {
        int i;
@@ -565,7 +565,7 @@ init_send(struct BCState *bcs)
                bcs->hw.hfc.send[i] = 0x1fff;
 }
 
-void __init
+void
 inithfc(struct IsdnCardState *cs)
 {
        init_send(&cs->bcs[0]);
index 7241e73879ba197d31ee130787189b8f89899a33..1df60ca9481f0b557010b158549b4dd3f37eb872 100644 (file)
@@ -1581,7 +1581,7 @@ hfcpci_bh(struct IsdnCardState *cs)
 /********************************/
 /* called for card init message */
 /********************************/
-static void __init
+static void
 inithfcpci(struct IsdnCardState *cs)
 {
        cs->bcs[0].BC_SetStack = setstack_2b;
@@ -1638,11 +1638,11 @@ hfcpci_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 
 
 /* this variable is used as card index when more than one cards are present */
-static struct pci_dev *dev_hfcpci __initdata = NULL;
+static struct pci_dev *dev_hfcpci __devinitdata = NULL;
 
 #endif                         /* CONFIG_PCI */
 
-int __init
+int __devinit
 setup_hfcpci(struct IsdnCard *card)
 {
        u_long flags;
index 86ab1c13f6b15e7ab56f11aed977247809fd2f85..4e7f472877e9ddea4b14bedbea3cda06dab4c18a 100644 (file)
@@ -139,7 +139,7 @@ hfcs_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 }
 
 #ifdef __ISAPNP__
-static struct isapnp_device_id hfc_ids[] __initdata = {
+static struct isapnp_device_id hfc_ids[] __devinitdata = {
        { ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114),
          ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114), 
          (unsigned long) "Acer P10" },
@@ -164,11 +164,11 @@ static struct isapnp_device_id hfc_ids[] __initdata = {
        { 0, }
 };
 
-static struct isapnp_device_id *ipid __initdata = &hfc_ids[0];
+static struct isapnp_device_id *ipid __devinitdata = &hfc_ids[0];
 static struct pnp_card *pnp_c __devinitdata = NULL;
 #endif
 
-int __init
+int __devinit
 setup_hfcs(struct IsdnCard *card)
 {
        struct IsdnCardState *cs = card->cs;
index c615752b96aa21b3fb55db5be71e4df42963b3d9..2cf7b665609e5804824863c64b8d4caeda6f7940 100644 (file)
 #define DBUSY_TIMER_VALUE 80
 #define ARCOFI_USE 0
 
-static char *ICCVer[] __initdata =
+static char *ICCVer[] =
 {"2070 A1/A3", "2070 B1", "2070 B2/B3", "2070 V2.4"};
 
-void __init
+void
 ICCVersion(struct IsdnCardState *cs, char *s)
 {
        int val;
@@ -613,7 +613,7 @@ dbusy_timer_handler(struct IsdnCardState *cs)
        }
 }
 
-void __init
+void
 initicc(struct IsdnCardState *cs)
 {
        cs->setstack_d = setstack_icc;
@@ -646,7 +646,7 @@ initicc(struct IsdnCardState *cs)
        ph_command(cs, ICC_CMD_DI);
 }
 
-void __init
+void
 clear_pending_icc_ints(struct IsdnCardState *cs)
 {
        int val, eval;
index b3bb3d5de53214e291f9d54d77b7f28cb7287bab..e7f593967e43ab9b9fb975992c36cbb2e066df1a 100644 (file)
@@ -65,7 +65,7 @@
 #define ICC_IND_AIL    0xE
 #define ICC_IND_DC     0xF
 
-extern void __init ICCVersion(struct IsdnCardState *cs, char *s);
+extern void ICCVersion(struct IsdnCardState *cs, char *s);
 extern void initicc(struct IsdnCardState *cs);
 extern void icc_interrupt(struct IsdnCardState *cs, u_char val);
 extern void clear_pending_icc_ints(struct IsdnCardState *cs);
index df5fc92a89b221a2f9853e4918f4e758eb2dc55f..00afd553890925b21d224956646916250185ac62 100644 (file)
@@ -38,8 +38,8 @@ static void dbusy_timer_handler(struct IsdnCardState *cs);
 static void dch_empty_fifo(struct IsdnCardState *cs, int count);
 static void dch_fill_fifo(struct IsdnCardState *cs);
 static inline void dch_int(struct IsdnCardState *cs);
-static void __devinit dch_setstack(struct PStack *st, struct IsdnCardState *cs);
-static void __devinit dch_init(struct IsdnCardState *cs);
+static void dch_setstack(struct PStack *st, struct IsdnCardState *cs);
+static void dch_init(struct IsdnCardState *cs);
 static void bch_l2l1(struct PStack *st, int pr, void *arg);
 static void bch_empty_fifo(struct BCState *bcs, int count);
 static void bch_fill_fifo(struct BCState *bcs);
@@ -48,8 +48,8 @@ static void bch_mode(struct BCState *bcs, int mode, int bc);
 static void bch_close_state(struct BCState *bcs);
 static int bch_open_state(struct IsdnCardState *cs, struct BCState *bcs);
 static int bch_setstack(struct PStack *st, struct BCState *bcs);
-static void __devinit bch_init(struct IsdnCardState *cs, int hscx);
-static void __init clear_pending_ints(struct IsdnCardState *cs);
+static void bch_init(struct IsdnCardState *cs, int hscx);
+static void clear_pending_ints(struct IsdnCardState *cs);
 
 //----------------------------------------------------------
 // Issue Layer 1 command to chip
@@ -408,7 +408,7 @@ dch_int(struct IsdnCardState *cs)
 
 //----------------------------------------------------------
 //----------------------------------------------------------
-static void __devinit
+static void
 dch_setstack(struct PStack *st, struct IsdnCardState *cs)
 {
        st->l1.l1hw = dch_l2l1;
@@ -416,7 +416,7 @@ dch_setstack(struct PStack *st, struct IsdnCardState *cs)
 
 //----------------------------------------------------------
 //----------------------------------------------------------
-static void __devinit
+static void
 dch_init(struct IsdnCardState *cs)
 {
        printk(KERN_INFO "HiSax: IPACX ISDN driver v0.1.0\n");
@@ -823,7 +823,7 @@ bch_setstack(struct PStack *st, struct BCState *bcs)
 
 //----------------------------------------------------------
 //----------------------------------------------------------
-static void __devinit
+static void
 bch_init(struct IsdnCardState *cs, int hscx)
 {
        cs->bcs[hscx].BC_SetStack   = bch_setstack;
@@ -861,7 +861,7 @@ interrupt_ipacx(struct IsdnCardState *cs)
 //----------------------------------------------------------
 // Clears chip interrupt status
 //----------------------------------------------------------
-static void __init
+static void
 clear_pending_ints(struct IsdnCardState *cs)
 {
        int ista;
@@ -883,7 +883,7 @@ clear_pending_ints(struct IsdnCardState *cs)
 // Does chip configuration work
 // Work to do depends on bit mask in part
 //----------------------------------------------------------
-void __init
+void
 init_ipacx(struct IsdnCardState *cs, int part)
 {
        if (part &1) {  // initialise chip
index 33747afc984db717dbb1601031f06dd1ffc69bae..715a1a8cd6944a4ab12851a9cbcedeebfc99ae9a 100644 (file)
@@ -196,10 +196,10 @@ isurf_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) {
 }
 
 #ifdef __ISAPNP__
-static struct pnp_card *pnp_c __initdata = NULL;
+static struct pnp_card *pnp_c __devinitdata = NULL;
 #endif
 
-int __init
+int __devinit
 setup_isurf(struct IsdnCard *card)
 {
        int ver;
index 908a7e14442179dba17794a886949edc22ff044a..39717506c678a778e32807fbb0253543ba4a9716 100644 (file)
@@ -210,7 +210,7 @@ ix1_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 }
 
 #ifdef __ISAPNP__
-static struct isapnp_device_id itk_ids[] __initdata = {
+static struct isapnp_device_id itk_ids[] __devinitdata = {
        { ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25),
          ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), 
          (unsigned long) "ITK micro 2" },
@@ -220,12 +220,12 @@ static struct isapnp_device_id itk_ids[] __initdata = {
        { 0, }
 };
 
-static struct isapnp_device_id *ipid __initdata = &itk_ids[0];
+static struct isapnp_device_id *ipid __devinitdata = &itk_ids[0];
 static struct pnp_card *pnp_c __devinitdata = NULL;
 #endif
 
 
-int __init
+int __devinit
 setup_ix1micro(struct IsdnCard *card)
 {
        struct IsdnCardState *cs = card->cs;
index 2659fecc26747a470ef2f099c1a98aab84dd23a0..43d61d1bc5b629103e365a5eb2405aff9743e14f 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/interrupt.h>
 
 
-int __init
+int
 JadeVersion(struct IsdnCardState *cs, char *s)
 {
     int ver,i;
@@ -253,7 +253,7 @@ setstack_jade(struct PStack *st, struct BCState *bcs)
        return (0);
 }
 
-void __init
+void
 clear_pending_jade_ints(struct IsdnCardState *cs)
 {
        int val;
@@ -279,7 +279,7 @@ clear_pending_jade_ints(struct IsdnCardState *cs)
        cs->BC_Write_Reg(cs, 1, jade_HDLC_IMR, 0xF8);
 }
 
-void __init
+void
 initjade(struct IsdnCardState *cs)
 {
        cs->bcs[0].BC_SetStack = setstack_jade;
index fe11f226b28539b5a0c4c40920ce8ee8f4e98821..8c82519593a8df7b1e342d483d2fd1f545e49199 100644 (file)
@@ -189,7 +189,7 @@ mic_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return(0);
 }
 
-int __init
+int __devinit
 setup_mic(struct IsdnCard *card)
 {
        int bytecnt;
index 47a47ef0968bf3d0abaf612fdfd58598187b94c8..38f648f9b0ede5fd62304f17ea0dfd80ef732613 100644 (file)
@@ -909,7 +909,7 @@ setstack_tiger(struct PStack *st, struct BCState *bcs)
 }
 
  
-void __init
+void
 inittiger(struct IsdnCardState *cs)
 {
        if (!(cs->bcs[0].hw.tiger.send = kmalloc(NETJET_DMA_TXSIZE * sizeof(unsigned int),
index 79a97b1c381263d7ebc75602a3386ed8c422c765..489022bdef7b5737af85b5a5b1da79c5f1288812 100644 (file)
@@ -232,12 +232,12 @@ niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return(0);
 }
 
-static struct pci_dev *niccy_dev __initdata = NULL;
+static struct pci_dev *niccy_dev __devinitdata = NULL;
 #ifdef __ISAPNP__
 static struct pnp_card *pnp_c __devinitdata = NULL;
 #endif
 
-int __init
+int __devinit
 setup_niccy(struct IsdnCard *card)
 {
        struct IsdnCardState *cs = card->cs;
index e5b900a6fa0b543db5da141037fe680657d46e0e..80025fd890f4db070d7e894af4ff1ee5f4b38ed5 100644 (file)
@@ -148,9 +148,9 @@ NETjet_S_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return(0);
 }
 
-static struct pci_dev *dev_netjet __initdata = NULL;
+static struct pci_dev *dev_netjet __devinitdata = NULL;
 
-int __init
+int __devinit
 setup_netjet_s(struct IsdnCard *card)
 {
        int bytecnt,cfg;
index 7002b09936d4efc848f2cb01596e8c245b88913c..37497162d53952d94e47ded94262b030aa59030d 100644 (file)
@@ -128,9 +128,9 @@ NETjet_U_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return(0);
 }
 
-static struct pci_dev *dev_netjet __initdata = NULL;
+static struct pci_dev *dev_netjet __devinitdata = NULL;
 
-int __init
+int __devinit
 setup_netjet_u(struct IsdnCard *card)
 {
        int bytecnt;
index 7b63085ea6e51107c939e8011d86f03607f4f8f9..e76042d323ea8416d243db874d2b135e26aea4fc 100644 (file)
@@ -211,7 +211,7 @@ S0Box_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return(0);
 }
 
-int __init
+int __devinit
 setup_s0box(struct IsdnCard *card)
 {
        struct IsdnCardState *cs = card->cs;
index 821776e1561acb63ad9b5ad1c062c97bce6298de..d943d365890b27995ea92364b3b9a6ab085d6d6c 100644 (file)
@@ -241,7 +241,7 @@ saphir_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 }
 
 
-int __init
+int __devinit
 setup_saphir(struct IsdnCard *card)
 {
        struct IsdnCardState *cs = card->cs;
index cdf35dc564c41d90c910abb53a1fa5923b43005c..a49b694eb7309f6653b7966a84f6edde130354da 100644 (file)
@@ -184,7 +184,7 @@ Sportster_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return(0);
 }
 
-static int __init
+static int __devinit
 get_io_range(struct IsdnCardState *cs)
 {
        int i, j, adr;
@@ -209,7 +209,7 @@ get_io_range(struct IsdnCardState *cs)
        }
 }
 
-int __init
+int __devinit
 setup_sportster(struct IsdnCard *card)
 {
        struct IsdnCardState *cs = card->cs;
index a2b1816af37a8b67b4dfb1832a36e4a0a802fc42..e94dc6f5bd62b7711027e9e91bf49327fda015af 100644 (file)
@@ -261,7 +261,7 @@ TeleInt_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return(0);
 }
 
-int __init
+int __devinit
 setup_TeleInt(struct IsdnCard *card)
 {
        struct IsdnCardState *cs = card->cs;
index 2b7df8f9823327acd590b3fd138ab45daeb507ff..f94af0930a1731824a599747764ab1d5727c6216 100644 (file)
@@ -265,7 +265,7 @@ Teles_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return(0);
 }
 
-int __init
+int __devinit
 setup_teles0(struct IsdnCard *card)
 {
        u_char val;
index 9382cdf04d8d94029ba1448821acd47485404614..dca446865f24b8de70d7afb5f4b9052505ad1652 100644 (file)
@@ -284,9 +284,9 @@ TelesPCI_card_msg(struct IsdnCardState *cs, int mt, void *arg)
        return(0);
 }
 
-static struct pci_dev *dev_tel __initdata = NULL;
+static struct pci_dev *dev_tel __devinitdata = NULL;
 
-int __init
+int __devinit
 setup_telespci(struct IsdnCard *card)
 {
        struct IsdnCardState *cs = card->cs;
index 6c68419c05ff928530bf631c47411698d8299c87..0595293b8659be94a5235cfc3aea12bac02423b7 100644 (file)
@@ -44,11 +44,11 @@ static const char *w6692_revision = "$Revision: 1.18.2.4 $";
 
 #define DBUSY_TIMER_VALUE 80
 
-static char *W6692Ver[] __initdata =
+static char *W6692Ver[] =
 {"W6692 V00", "W6692 V01", "W6692 V10",
  "W6692 V11"};
 
-static void __init
+static void
 W6692Version(struct IsdnCardState *cs, char *s)
 {
        int val;
@@ -897,7 +897,7 @@ static void resetW6692(struct IsdnCardState *cs)
        }
 }
 
-static void __init initW6692(struct IsdnCardState *cs, int part)
+static void initW6692(struct IsdnCardState *cs, int part)
 {
        if (part & 1) {
                cs->setstack_d = setstack_W6692;
@@ -992,9 +992,9 @@ w6692_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 
 static int id_idx ;
 
-static struct pci_dev *dev_w6692 __initdata = NULL;
+static struct pci_dev *dev_w6692 __devinitdata = NULL;
 
-int __init 
+int __devinit
 setup_w6692(struct IsdnCard *card)
 {
        struct IsdnCardState *cs = card->cs;
index 9f6c6375ff75014f3a441c0056e2d007b9de354e..c3d79eef9e3245ef0f8e8a28b015dd2bb8db39d7 100644 (file)
@@ -1059,7 +1059,7 @@ isdn_info_update(void)
 static ssize_t
 isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off)
 {
-       uint minor = MINOR(file->f_dentry->d_inode->i_rdev);
+       uint minor = iminor(file->f_dentry->d_inode);
        int len = 0;
        int drvidx;
        int chidx;
@@ -1163,7 +1163,7 @@ isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off)
 static ssize_t
 isdn_write(struct file *file, const char __user *buf, size_t count, loff_t * off)
 {
-       uint minor = MINOR(file->f_dentry->d_inode->i_rdev);
+       uint minor = iminor(file->f_dentry->d_inode);
        int drvidx;
        int chidx;
        int retval;
@@ -1225,7 +1225,7 @@ static unsigned int
 isdn_poll(struct file *file, poll_table * wait)
 {
        unsigned int mask = 0;
-       unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev);
+       unsigned int minor = iminor(file->f_dentry->d_inode);
        int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
 
        lock_kernel();
@@ -1266,7 +1266,7 @@ isdn_poll(struct file *file, poll_table * wait)
 static int
 isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
 {
-       uint minor = MINOR(inode->i_rdev);
+       uint minor = iminor(inode);
        isdn_ctrl c;
        int drvidx;
        int chidx;
@@ -1717,7 +1717,7 @@ isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
 static int
 isdn_open(struct inode *ino, struct file *filep)
 {
-       uint minor = MINOR(ino->i_rdev);
+       uint minor = iminor(ino);
        int drvidx;
        int chidx;
        int retval = -ENODEV;
@@ -1779,7 +1779,7 @@ isdn_open(struct inode *ino, struct file *filep)
 static int
 isdn_close(struct inode *ino, struct file *filep)
 {
-       uint minor = MINOR(ino->i_rdev);
+       uint minor = iminor(ino);
 
        lock_kernel();
        if (minor == ISDN_MINOR_STATUS) {
index 29e7667ec962e5dbd35abc5b9d61dc5dbd81fe20..119412d6bd15d05d253504bada35acbde7b3fc54 100644 (file)
@@ -667,7 +667,7 @@ isdn_ppp_poll(struct file *file, poll_table * wait)
 
        if (is->debug & 0x2)
                printk(KERN_DEBUG "isdn_ppp_poll: minor: %d\n",
-                               MINOR(file->f_dentry->d_inode->i_rdev));
+                               iminor(file->f_dentry->d_inode));
 
        /* just registers wait_queue hook. This doesn't really wait. */
        poll_wait(file, &is->wq, wait);
index 96509989e9212d8e189d3967d42c007f41dfc8c2..9c39b98d5a5b2a6f2689e1fbb0a04c8395e874db 100644 (file)
@@ -69,6 +69,13 @@ config LEDS_AMS_DELTA
        help
          This option enables support for the LEDs on Amstrad Delta (E3).
 
+config LEDS_NET48XX
+       tristate "LED Support for Soekris net48xx series Error LED"
+       depends on LEDS_CLASS && SCx200_GPIO
+       help
+         This option enables support for the Soekris net4801 and net4826 error
+         LED.
+
 comment "LED Triggers"
 
 config LEDS_TRIGGERS
index 88d3b6eaa6a203182b6b2db13743acfc1ad148d4..6aa2aed7539de65135000203e46dab3c0e28a454 100644 (file)
@@ -12,6 +12,7 @@ obj-$(CONFIG_LEDS_IXP4XX)             += leds-ixp4xx-gpio.o
 obj-$(CONFIG_LEDS_TOSA)                        += leds-tosa.o
 obj-$(CONFIG_LEDS_S3C24XX)             += leds-s3c24xx.o
 obj-$(CONFIG_LEDS_AMS_DELTA)           += leds-ams-delta.o
+obj-$(CONFIG_LEDS_NET48XX)             += leds-net48xx.o
 
 # LED Triggers
 obj-$(CONFIG_LEDS_TRIGGER_TIMER)       += ledtrig-timer.o
diff --git a/drivers/leds/leds-net48xx.c b/drivers/leds/leds-net48xx.c
new file mode 100644 (file)
index 0000000..713c4a8
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * LEDs driver for Soekris net48xx
+ *
+ * Copyright (C) 2006 Chris Boot <bootc@bootc.net>
+ *
+ * Based on leds-ams-delta.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/leds.h>
+#include <linux/err.h>
+#include <asm/io.h>
+#include <linux/scx200_gpio.h>
+
+#define DRVNAME "net48xx-led"
+#define NET48XX_ERROR_LED_GPIO 20
+
+static struct platform_device *pdev;
+
+static void net48xx_error_led_set(struct led_classdev *led_cdev,
+               enum led_brightness value)
+{
+       if (value)
+               scx200_gpio_set_high(NET48XX_ERROR_LED_GPIO);
+       else
+               scx200_gpio_set_low(NET48XX_ERROR_LED_GPIO);
+}
+
+static struct led_classdev net48xx_error_led = {
+       .name           = "net48xx:error",
+       .brightness_set = net48xx_error_led_set,
+};
+
+#ifdef CONFIG_PM
+static int net48xx_led_suspend(struct platform_device *dev,
+               pm_message_t state)
+{
+       led_classdev_suspend(&net48xx_error_led);
+       return 0;
+}
+
+static int net48xx_led_resume(struct platform_device *dev)
+{
+       led_classdev_resume(&net48xx_error_led);
+       return 0;
+}
+#else
+#define net48xx_led_suspend NULL
+#define net48xx_led_resume NULL
+#endif
+
+static int net48xx_led_probe(struct platform_device *pdev)
+{
+       return led_classdev_register(&pdev->dev, &net48xx_error_led);
+}
+
+static int net48xx_led_remove(struct platform_device *pdev)
+{
+       led_classdev_unregister(&net48xx_error_led);
+       return 0;
+}
+
+static struct platform_driver net48xx_led_driver = {
+       .probe          = net48xx_led_probe,
+       .remove         = net48xx_led_remove,
+       .suspend        = net48xx_led_suspend,
+       .resume         = net48xx_led_resume,
+       .driver         = {
+               .name           = DRVNAME,
+               .owner          = THIS_MODULE,
+       },
+};
+
+static int __init net48xx_led_init(void)
+{
+       int ret;
+
+       if (!scx200_gpio_present()) {
+               ret = -ENODEV;
+               goto out;
+       }
+
+       ret = platform_driver_register(&net48xx_led_driver);
+       if (ret < 0)
+               goto out;
+
+       pdev = platform_device_register_simple(DRVNAME, -1, NULL, 0);
+       if (IS_ERR(pdev)) {
+               ret = PTR_ERR(pdev);
+               platform_driver_unregister(&net48xx_led_driver);
+               goto out;
+       }
+
+out:
+       return ret;
+}
+
+static void __exit net48xx_led_exit(void)
+{
+       platform_device_unregister(pdev);
+       platform_driver_unregister(&net48xx_led_driver);
+}
+
+module_init(net48xx_led_init);
+module_exit(net48xx_led_exit);
+
+MODULE_AUTHOR("Chris Boot <bootc@bootc.net>");
+MODULE_DESCRIPTION("Soekris net48xx LED driver");
+MODULE_LICENSE("GPL");
+
index 54f3f6b94efc1e4ac9a2a3bfdff4a70dbf6b2863..f5fe7fb4b3ad352c96e1c04582bd2e3e3268af4a 100644 (file)
@@ -113,7 +113,10 @@ config PMAC_MEDIABAY
 
 config PMAC_BACKLIGHT
        bool "Backlight control for LCD screens"
-       depends on ADB_PMU && (BROKEN || !PPC64)
+       depends on ADB_PMU && FB = y && (BROKEN || !PPC64)
+       select FB_BACKLIGHT
+       select BACKLIGHT_CLASS_DEVICE
+       select BACKLIGHT_LCD_SUPPORT
        help
          Say Y here to enable Macintosh specific extensions of the generic
          backlight code. With this enabled, the brightness keys on older
index 80c0c665b5f6be34c103fc7759f05054652de616..82657bc86d19032f7b5ccec6e79c1b28fbd47aa9 100644 (file)
@@ -330,7 +330,7 @@ static void macio_create_fixup_irq(struct macio_dev *dev, int index,
 {
        unsigned int irq;
 
-       irq = irq_create_mapping(NULL, line, 0);
+       irq = irq_create_mapping(NULL, line);
        if (irq != NO_IRQ) {
                dev->interrupt[index].start = irq;
                dev->interrupt[index].flags = IORESOURCE_IRQ;
index f139a74696fe85a39ab96aa3b7e93902e6a90dee..00ef46898147524bfb11f4b8433eac19c712a742 100644 (file)
@@ -75,9 +75,11 @@ struct smu_device {
        struct of_device        *of_dev;
        int                     doorbell;       /* doorbell gpio */
        u32 __iomem             *db_buf;        /* doorbell buffer */
-       int                     db_irq;
+       struct device_node      *db_node;
+       unsigned int            db_irq;
        int                     msg;
-       int                     msg_irq;
+       struct device_node      *msg_node;
+       unsigned int            msg_irq;
        struct smu_cmd_buf      *cmd_buf;       /* command buffer virtual */
        u32                     cmd_buf_abs;    /* command buffer absolute */
        struct list_head        cmd_list;
@@ -93,6 +95,7 @@ struct smu_device {
  */
 static struct smu_device       *smu;
 static DEFINE_MUTEX(smu_part_access);
+static int smu_irq_inited;
 
 static void smu_i2c_retry(unsigned long data);
 
@@ -257,6 +260,10 @@ int smu_queue_cmd(struct smu_cmd *cmd)
                smu_start_cmd();
        spin_unlock_irqrestore(&smu->lock, flags);
 
+       /* Workaround for early calls when irq isn't available */
+       if (!smu_irq_inited || smu->db_irq == NO_IRQ)
+               smu_spinwait_cmd(cmd);
+
        return 0;
 }
 EXPORT_SYMBOL(smu_queue_cmd);
@@ -478,14 +485,15 @@ int __init smu_init (void)
        smu->cmd_buf_abs = (u32)smu_cmdbuf_abs;
        smu->cmd_buf = (struct smu_cmd_buf *)abs_to_virt(smu_cmdbuf_abs);
 
-       np = of_find_node_by_name(NULL, "smu-doorbell");
-       if (np == NULL) {
+       smu->db_node = of_find_node_by_name(NULL, "smu-doorbell");
+       if (smu->db_node == NULL) {
                printk(KERN_ERR "SMU: Can't find doorbell GPIO !\n");
                goto fail;
        }
-       data = (u32 *)get_property(np, "reg", NULL);
+       data = (u32 *)get_property(smu->db_node, "reg", NULL);
        if (data == NULL) {
-               of_node_put(np);
+               of_node_put(smu->db_node);
+               smu->db_node = NULL;
                printk(KERN_ERR "SMU: Can't find doorbell GPIO address !\n");
                goto fail;
        }
@@ -497,25 +505,21 @@ int __init smu_init (void)
        smu->doorbell = *data;
        if (smu->doorbell < 0x50)
                smu->doorbell += 0x50;
-       smu->db_irq = irq_of_parse_and_map(np, 0);
-
-       of_node_put(np);
 
        /* Now look for the smu-interrupt GPIO */
        do {
-               np = of_find_node_by_name(NULL, "smu-interrupt");
-               if (np == NULL)
+               smu->msg_node = of_find_node_by_name(NULL, "smu-interrupt");
+               if (smu->msg_node == NULL)
                        break;
-               data = (u32 *)get_property(np, "reg", NULL);
+               data = (u32 *)get_property(smu->msg_node, "reg", NULL);
                if (data == NULL) {
-                       of_node_put(np);
+                       of_node_put(smu->msg_node);
+                       smu->msg_node = NULL;
                        break;
                }
                smu->msg = *data;
                if (smu->msg < 0x50)
                        smu->msg += 0x50;
-               smu->msg_irq = irq_of_parse_and_map(np, 0);
-               of_node_put(np);
        } while(0);
 
        /* Doorbell buffer is currently hard-coded, I didn't find a proper
@@ -547,6 +551,19 @@ static int smu_late_init(void)
        smu->i2c_timer.function = smu_i2c_retry;
        smu->i2c_timer.data = (unsigned long)smu;
 
+       if (smu->db_node) {
+               smu->db_irq = irq_of_parse_and_map(smu->db_node, 0);
+               if (smu->db_irq == NO_IRQ)
+                       printk(KERN_ERR "smu: failed to map irq for node %s\n",
+                              smu->db_node->full_name);
+       }
+       if (smu->msg_node) {
+               smu->msg_irq = irq_of_parse_and_map(smu->msg_node, 0);
+               if (smu->msg_irq == NO_IRQ)
+                       printk(KERN_ERR "smu: failed to map irq for node %s\n",
+                              smu->msg_node->full_name);
+       }
+
        /*
         * Try to request the interrupts
         */
@@ -571,6 +588,7 @@ static int smu_late_init(void)
                }
        }
 
+       smu_irq_inited = 1;
        return 0;
 }
 /* This has to be before arch_initcall as the low i2c stuff relies on the
@@ -742,6 +760,11 @@ static void smu_i2c_low_completion(struct smu_cmd *scmd, void *misc)
        if (fail && --cmd->retries > 0) {
                DPRINTK("SMU: i2c failure, starting timer...\n");
                BUG_ON(cmd != smu->cmd_i2c_cur);
+               if (!smu_irq_inited) {
+                       mdelay(5);
+                       smu_i2c_retry(0);
+                       return;
+               }
                mod_timer(&smu->i2c_timer, jiffies + msecs_to_jiffies(5));
                return;
        }
index e4e161372a3e431ba8cfb0bd0736f5efc4ecdf72..b6d16022a53e15e25006814459b9159c10611bad 100644 (file)
@@ -110,7 +110,7 @@ static ctl_table raid_table[] = {
                .procname       = "speed_limit_min",
                .data           = &sysctl_speed_limit_min,
                .maxlen         = sizeof(int),
-               .mode           = 0644,
+               .mode           = S_IRUGO|S_IWUSR,
                .proc_handler   = &proc_dointvec,
        },
        {
@@ -118,7 +118,7 @@ static ctl_table raid_table[] = {
                .procname       = "speed_limit_max",
                .data           = &sysctl_speed_limit_max,
                .maxlen         = sizeof(int),
-               .mode           = 0644,
+               .mode           = S_IRUGO|S_IWUSR,
                .proc_handler   = &proc_dointvec,
        },
        { .ctl_name = 0 }
@@ -129,7 +129,7 @@ static ctl_table raid_dir_table[] = {
                .ctl_name       = DEV_RAID,
                .procname       = "raid",
                .maxlen         = 0,
-               .mode           = 0555,
+               .mode           = S_IRUGO|S_IXUGO,
                .child          = raid_table,
        },
        { .ctl_name = 0 }
@@ -1062,6 +1062,11 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version)
        if (rdev->sb_size & bmask)
                rdev-> sb_size = (rdev->sb_size | bmask)+1;
 
+       if (sb->level == cpu_to_le32(LEVEL_MULTIPATH))
+               rdev->desc_nr = -1;
+       else
+               rdev->desc_nr = le32_to_cpu(sb->dev_number);
+
        if (refdev == 0)
                ret = 1;
        else {
@@ -1171,7 +1176,6 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)
        }
        if (mddev->level != LEVEL_MULTIPATH) {
                int role;
-               rdev->desc_nr = le32_to_cpu(sb->dev_number);
                role = le16_to_cpu(sb->dev_roles[rdev->desc_nr]);
                switch(role) {
                case 0xffff: /* spare */
@@ -1779,8 +1783,8 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len)
        }
        return err ? err : len;
 }
-static struct rdev_sysfs_entry
-rdev_state = __ATTR(state, 0644, state_show, state_store);
+static struct rdev_sysfs_entry rdev_state =
+__ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store);
 
 static ssize_t
 super_show(mdk_rdev_t *rdev, char *page)
@@ -1811,7 +1815,7 @@ errors_store(mdk_rdev_t *rdev, const char *buf, size_t len)
        return -EINVAL;
 }
 static struct rdev_sysfs_entry rdev_errors =
-__ATTR(errors, 0644, errors_show, errors_store);
+__ATTR(errors, S_IRUGO|S_IWUSR, errors_show, errors_store);
 
 static ssize_t
 slot_show(mdk_rdev_t *rdev, char *page)
@@ -1845,7 +1849,7 @@ slot_store(mdk_rdev_t *rdev, const char *buf, size_t len)
 
 
 static struct rdev_sysfs_entry rdev_slot =
-__ATTR(slot, 0644, slot_show, slot_store);
+__ATTR(slot, S_IRUGO|S_IWUSR, slot_show, slot_store);
 
 static ssize_t
 offset_show(mdk_rdev_t *rdev, char *page)
@@ -1867,7 +1871,7 @@ offset_store(mdk_rdev_t *rdev, const char *buf, size_t len)
 }
 
 static struct rdev_sysfs_entry rdev_offset =
-__ATTR(offset, 0644, offset_show, offset_store);
+__ATTR(offset, S_IRUGO|S_IWUSR, offset_show, offset_store);
 
 static ssize_t
 rdev_size_show(mdk_rdev_t *rdev, char *page)
@@ -1891,7 +1895,7 @@ rdev_size_store(mdk_rdev_t *rdev, const char *buf, size_t len)
 }
 
 static struct rdev_sysfs_entry rdev_size =
-__ATTR(size, 0644, rdev_size_show, rdev_size_store);
+__ATTR(size, S_IRUGO|S_IWUSR, rdev_size_show, rdev_size_store);
 
 static struct attribute *rdev_default_attrs[] = {
        &rdev_state.attr,
@@ -1922,6 +1926,8 @@ rdev_attr_store(struct kobject *kobj, struct attribute *attr,
 
        if (!entry->store)
                return -EIO;
+       if (!capable(CAP_SYS_ADMIN))
+               return -EACCES;
        return entry->store(rdev, page, length);
 }
 
@@ -2128,7 +2134,7 @@ safe_delay_store(mddev_t *mddev, const char *cbuf, size_t len)
        return len;
 }
 static struct md_sysfs_entry md_safe_delay =
-__ATTR(safe_mode_delay, 0644,safe_delay_show, safe_delay_store);
+__ATTR(safe_mode_delay, S_IRUGO|S_IWUSR,safe_delay_show, safe_delay_store);
 
 static ssize_t
 level_show(mddev_t *mddev, char *page)
@@ -2163,7 +2169,7 @@ level_store(mddev_t *mddev, const char *buf, size_t len)
 }
 
 static struct md_sysfs_entry md_level =
-__ATTR(level, 0644, level_show, level_store);
+__ATTR(level, S_IRUGO|S_IWUSR, level_show, level_store);
 
 
 static ssize_t
@@ -2188,7 +2194,7 @@ layout_store(mddev_t *mddev, const char *buf, size_t len)
        return len;
 }
 static struct md_sysfs_entry md_layout =
-__ATTR(layout, 0655, layout_show, layout_store);
+__ATTR(layout, S_IRUGO|S_IWUSR, layout_show, layout_store);
 
 
 static ssize_t
@@ -2219,7 +2225,7 @@ raid_disks_store(mddev_t *mddev, const char *buf, size_t len)
        return rv ? rv : len;
 }
 static struct md_sysfs_entry md_raid_disks =
-__ATTR(raid_disks, 0644, raid_disks_show, raid_disks_store);
+__ATTR(raid_disks, S_IRUGO|S_IWUSR, raid_disks_show, raid_disks_store);
 
 static ssize_t
 chunk_size_show(mddev_t *mddev, char *page)
@@ -2243,7 +2249,7 @@ chunk_size_store(mddev_t *mddev, const char *buf, size_t len)
        return len;
 }
 static struct md_sysfs_entry md_chunk_size =
-__ATTR(chunk_size, 0644, chunk_size_show, chunk_size_store);
+__ATTR(chunk_size, S_IRUGO|S_IWUSR, chunk_size_show, chunk_size_store);
 
 static ssize_t
 resync_start_show(mddev_t *mddev, char *page)
@@ -2267,7 +2273,7 @@ resync_start_store(mddev_t *mddev, const char *buf, size_t len)
        return len;
 }
 static struct md_sysfs_entry md_resync_start =
-__ATTR(resync_start, 0644, resync_start_show, resync_start_store);
+__ATTR(resync_start, S_IRUGO|S_IWUSR, resync_start_show, resync_start_store);
 
 /*
  * The array state can be:
@@ -2437,7 +2443,8 @@ array_state_store(mddev_t *mddev, const char *buf, size_t len)
        else
                return len;
 }
-static struct md_sysfs_entry md_array_state = __ATTR(array_state, 0644, array_state_show, array_state_store);
+static struct md_sysfs_entry md_array_state =
+__ATTR(array_state, S_IRUGO|S_IWUSR, array_state_show, array_state_store);
 
 static ssize_t
 null_show(mddev_t *mddev, char *page)
@@ -2497,7 +2504,7 @@ new_dev_store(mddev_t *mddev, const char *buf, size_t len)
 }
 
 static struct md_sysfs_entry md_new_device =
-__ATTR(new_dev, 0200, null_show, new_dev_store);
+__ATTR(new_dev, S_IWUSR, null_show, new_dev_store);
 
 static ssize_t
 size_show(mddev_t *mddev, char *page)
@@ -2535,7 +2542,7 @@ size_store(mddev_t *mddev, const char *buf, size_t len)
 }
 
 static struct md_sysfs_entry md_size =
-__ATTR(component_size, 0644, size_show, size_store);
+__ATTR(component_size, S_IRUGO|S_IWUSR, size_show, size_store);
 
 
 /* Metdata version.
@@ -2583,7 +2590,7 @@ metadata_store(mddev_t *mddev, const char *buf, size_t len)
 }
 
 static struct md_sysfs_entry md_metadata =
-__ATTR(metadata_version, 0644, metadata_show, metadata_store);
+__ATTR(metadata_version, S_IRUGO|S_IWUSR, metadata_show, metadata_store);
 
 static ssize_t
 action_show(mddev_t *mddev, char *page)
@@ -2651,12 +2658,11 @@ mismatch_cnt_show(mddev_t *mddev, char *page)
                       (unsigned long long) mddev->resync_mismatches);
 }
 
-static struct md_sysfs_entry
-md_scan_mode = __ATTR(sync_action, S_IRUGO|S_IWUSR, action_show, action_store);
+static struct md_sysfs_entry md_scan_mode =
+__ATTR(sync_action, S_IRUGO|S_IWUSR, action_show, action_store);
 
 
-static struct md_sysfs_entry
-md_mismatches = __ATTR_RO(mismatch_cnt);
+static struct md_sysfs_entry md_mismatches = __ATTR_RO(mismatch_cnt);
 
 static ssize_t
 sync_min_show(mddev_t *mddev, char *page)
@@ -2715,15 +2721,14 @@ static ssize_t
 sync_speed_show(mddev_t *mddev, char *page)
 {
        unsigned long resync, dt, db;
-       resync = (mddev->curr_resync - atomic_read(&mddev->recovery_active));
+       resync = (mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active));
        dt = ((jiffies - mddev->resync_mark) / HZ);
        if (!dt) dt++;
        db = resync - (mddev->resync_mark_cnt);
        return sprintf(page, "%ld\n", db/dt/2); /* K/sec */
 }
 
-static struct md_sysfs_entry
-md_sync_speed = __ATTR_RO(sync_speed);
+static struct md_sysfs_entry md_sync_speed = __ATTR_RO(sync_speed);
 
 static ssize_t
 sync_completed_show(mddev_t *mddev, char *page)
@@ -2739,8 +2744,7 @@ sync_completed_show(mddev_t *mddev, char *page)
        return sprintf(page, "%lu / %lu\n", resync, max_blocks);
 }
 
-static struct md_sysfs_entry
-md_sync_completed = __ATTR_RO(sync_completed);
+static struct md_sysfs_entry md_sync_completed = __ATTR_RO(sync_completed);
 
 static ssize_t
 suspend_lo_show(mddev_t *mddev, char *page)
@@ -2857,6 +2861,8 @@ md_attr_store(struct kobject *kobj, struct attribute *attr,
 
        if (!entry->store)
                return -EIO;
+       if (!capable(CAP_SYS_ADMIN))
+               return -EACCES;
        rv = mddev_lock(mddev);
        if (!rv) {
                rv = entry->store(mddev, page, length);
@@ -3091,7 +3097,6 @@ static int do_md_run(mddev_t * mddev)
                }
        
        set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
-       md_wakeup_thread(mddev->thread);
        
        if (mddev->sb_dirty)
                md_update_sb(mddev);
@@ -3112,7 +3117,7 @@ static int do_md_run(mddev_t * mddev)
         * start recovery here.  If we leave it to md_check_recovery,
         * it will remove the drives and not do the right thing
         */
-       if (mddev->degraded) {
+       if (mddev->degraded && !mddev->sync_thread) {
                struct list_head *rtmp;
                int spares = 0;
                ITERATE_RDEV(mddev,rdev,rtmp)
@@ -3133,10 +3138,11 @@ static int do_md_run(mddev_t * mddev)
                                       mdname(mddev));
                                /* leave the spares where they are, it shouldn't hurt */
                                mddev->recovery = 0;
-                       } else
-                               md_wakeup_thread(mddev->sync_thread);
+                       }
                }
        }
+       md_wakeup_thread(mddev->thread);
+       md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */
 
        mddev->changed = 1;
        md_new_event(mddev);
@@ -4586,6 +4592,8 @@ void md_error(mddev_t *mddev, mdk_rdev_t *rdev)
                __builtin_return_address(0),__builtin_return_address(1),
                __builtin_return_address(2),__builtin_return_address(3));
 */
+       if (!mddev->pers)
+               return;
        if (!mddev->pers->error_handler)
                return;
        mddev->pers->error_handler(mddev,rdev);
@@ -4683,12 +4691,13 @@ static void status_resync(struct seq_file *seq, mddev_t * mddev)
         */
        dt = ((jiffies - mddev->resync_mark) / HZ);
        if (!dt) dt++;
-       db = resync - (mddev->resync_mark_cnt/2);
-       rt = (dt * ((unsigned long)(max_blocks-resync) / (db/100+1)))/100;
+       db = (mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active))
+               - mddev->resync_mark_cnt;
+       rt = (dt * ((unsigned long)(max_blocks-resync) / (db/2/100+1)))/100;
 
        seq_printf(seq, " finish=%lu.%lumin", rt / 60, (rt % 60)/6);
 
-       seq_printf(seq, " speed=%ldK/sec", db/dt);
+       seq_printf(seq, " speed=%ldK/sec", db/2/dt);
 }
 
 static void *md_seq_start(struct seq_file *seq, loff_t *pos)
@@ -5199,6 +5208,7 @@ void md_do_sync(mddev_t *mddev)
 
                j += sectors;
                if (j>1) mddev->curr_resync = j;
+               mddev->curr_mark_cnt = io_sectors;
                if (last_check == 0)
                        /* this is the earliers that rebuilt will be
                         * visible in /proc/mdstat
@@ -5645,8 +5655,8 @@ static int set_ro(const char *val, struct kernel_param *kp)
        return -EINVAL;
 }
 
-module_param_call(start_ro, set_ro, get_ro, NULL, 0600);
-module_param(start_dirty_degraded, int, 0644);
+module_param_call(start_ro, set_ro, get_ro, NULL, S_IRUSR|S_IWUSR);
+module_param(start_dirty_degraded, int, S_IRUGO|S_IWUSR);
 
 
 EXPORT_SYMBOL(register_md_personality);
index cead918578a7dc6e8ebbe212eb46aec9fdd82c22..1efe22a2d0410f2abb6a5704ac24d015407fd6cc 100644 (file)
@@ -1145,7 +1145,7 @@ static int end_sync_write(struct bio *bio, unsigned int bytes_done, int error)
                long sectors_to_go = r1_bio->sectors;
                /* make sure these bits doesn't get cleared. */
                do {
-                       bitmap_end_sync(mddev->bitmap, r1_bio->sector,
+                       bitmap_end_sync(mddev->bitmap, s,
                                        &sync_blocks, 1);
                        s += sync_blocks;
                        sectors_to_go -= sync_blocks;
@@ -1509,6 +1509,9 @@ static void raid1d(mddev_t *mddev)
                                                                         s<<9, conf->tmppage, READ) == 0)
                                                                /* Well, this device is dead */
                                                                md_error(mddev, rdev);
+                                                       else
+                                                               printk(KERN_INFO "raid1:%s: read error corrected (%d sectors at %llu on %s)\n",
+                                                                      mdname(mddev), s, (unsigned long long)(sect + rdev->data_offset), bdevname(rdev->bdev, b));
                                                }
                                        }
                                } else {
index 7f636283a1ba3dfcb78aa52f925fbc65fc9525a7..016ddb831c9b393dfb44c52076dbcbc4f4750b96 100644 (file)
@@ -1492,6 +1492,10 @@ static void raid10d(mddev_t *mddev)
                                                                         s<<9, conf->tmppage, READ) == 0)
                                                                /* Well, this device is dead */
                                                                md_error(mddev, rdev);
+                                                       else
+                                                               printk(KERN_INFO "raid10:%s: read error corrected (%d sectors at %llu on %s)\n",
+                                                                      mdname(mddev), s, (unsigned long long)(sect+rdev->data_offset), bdevname(rdev->bdev, b));
+
                                                        rdev_dec_pending(rdev, mddev);
                                                        rcu_read_lock();
                                                }
index 7433871f4b3a45e866c6a7d2508bfdaaa28f30e4..450066007160ca04d1a8956abe870bc1b363210a 100644 (file)
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+/*
+ * BITMAP UNPLUGGING:
+ *
+ * The sequencing for updating the bitmap reliably is a little
+ * subtle (and I got it wrong the first time) so it deserves some
+ * explanation.
+ *
+ * We group bitmap updates into batches.  Each batch has a number.
+ * We may write out several batches at once, but that isn't very important.
+ * conf->bm_write is the number of the last batch successfully written.
+ * conf->bm_flush is the number of the last batch that was closed to
+ *    new additions.
+ * When we discover that we will need to write to any block in a stripe
+ * (in add_stripe_bio) we update the in-memory bitmap and record in sh->bm_seq
+ * the number of the batch it will be in. This is bm_flush+1.
+ * When we are ready to do a write, if that batch hasn't been written yet,
+ *   we plug the array and queue the stripe for later.
+ * When an unplug happens, we increment bm_flush, thus closing the current
+ *   batch.
+ * When we notice that bm_flush > bm_write, we write out all pending updates
+ * to the bitmap, and advance bm_write to where bm_flush was.
+ * This may occasionally write a bit out twice, but is sure never to
+ * miss any bits.
+ */
 
 #include <linux/module.h>
 #include <linux/slab.h>
@@ -88,12 +112,14 @@ static void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh)
                BUG_ON(!list_empty(&sh->lru));
                BUG_ON(atomic_read(&conf->active_stripes)==0);
                if (test_bit(STRIPE_HANDLE, &sh->state)) {
-                       if (test_bit(STRIPE_DELAYED, &sh->state))
+                       if (test_bit(STRIPE_DELAYED, &sh->state)) {
                                list_add_tail(&sh->lru, &conf->delayed_list);
-                       else if (test_bit(STRIPE_BIT_DELAY, &sh->state) &&
-                                conf->seq_write == sh->bm_seq)
+                               blk_plug_device(conf->mddev->queue);
+                       } else if (test_bit(STRIPE_BIT_DELAY, &sh->state) &&
+                                  sh->bm_seq - conf->seq_write > 0) {
                                list_add_tail(&sh->lru, &conf->bitmap_list);
-                       else {
+                               blk_plug_device(conf->mddev->queue);
+                       } else {
                                clear_bit(STRIPE_BIT_DELAY, &sh->state);
                                list_add_tail(&sh->lru, &conf->handle_list);
                        }
@@ -270,7 +296,7 @@ static struct stripe_head *get_active_stripe(raid5_conf_t *conf, sector_t sector
                                                     < (conf->max_nr_stripes *3/4)
                                                     || !conf->inactive_blocked),
                                                    conf->device_lock,
-                                                   unplug_slaves(conf->mddev)
+                                                   raid5_unplug_device(conf->mddev->queue)
                                        );
                                conf->inactive_blocked = 0;
                        } else
@@ -281,7 +307,8 @@ static struct stripe_head *get_active_stripe(raid5_conf_t *conf, sector_t sector
                        } else {
                                if (!test_bit(STRIPE_HANDLE, &sh->state))
                                        atomic_inc(&conf->active_stripes);
-                               if (list_empty(&sh->lru))
+                               if (list_empty(&sh->lru) &&
+                                   !test_bit(STRIPE_EXPANDING, &sh->state))
                                        BUG();
                                list_del_init(&sh->lru);
                        }
@@ -496,6 +523,8 @@ static int raid5_end_read_request(struct bio * bi, unsigned int bytes_done,
        raid5_conf_t *conf = sh->raid_conf;
        int disks = sh->disks, i;
        int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags);
+       char b[BDEVNAME_SIZE];
+       mdk_rdev_t *rdev;
 
        if (bi->bi_size)
                return 1;
@@ -543,25 +572,39 @@ static int raid5_end_read_request(struct bio * bi, unsigned int bytes_done,
                set_bit(R5_UPTODATE, &sh->dev[i].flags);
 #endif
                if (test_bit(R5_ReadError, &sh->dev[i].flags)) {
-                       printk(KERN_INFO "raid5: read error corrected!!\n");
+                       rdev = conf->disks[i].rdev;
+                       printk(KERN_INFO "raid5:%s: read error corrected (%lu sectors at %llu on %s)\n",
+                              mdname(conf->mddev), STRIPE_SECTORS,
+                              (unsigned long long)sh->sector + rdev->data_offset,
+                              bdevname(rdev->bdev, b));
                        clear_bit(R5_ReadError, &sh->dev[i].flags);
                        clear_bit(R5_ReWrite, &sh->dev[i].flags);
                }
                if (atomic_read(&conf->disks[i].rdev->read_errors))
                        atomic_set(&conf->disks[i].rdev->read_errors, 0);
        } else {
+               const char *bdn = bdevname(conf->disks[i].rdev->bdev, b);
                int retry = 0;
+               rdev = conf->disks[i].rdev;
+
                clear_bit(R5_UPTODATE, &sh->dev[i].flags);
-               atomic_inc(&conf->disks[i].rdev->read_errors);
+               atomic_inc(&rdev->read_errors);
                if (conf->mddev->degraded)
-                       printk(KERN_WARNING "raid5: read error not correctable.\n");
+                       printk(KERN_WARNING "raid5:%s: read error not correctable (sector %llu on %s).\n",
+                              mdname(conf->mddev),
+                              (unsigned long long)sh->sector + rdev->data_offset,
+                              bdn);
                else if (test_bit(R5_ReWrite, &sh->dev[i].flags))
                        /* Oh, no!!! */
-                       printk(KERN_WARNING "raid5: read error NOT corrected!!\n");
-               else if (atomic_read(&conf->disks[i].rdev->read_errors)
+                       printk(KERN_WARNING "raid5:%s: read error NOT corrected!! (sector %llu on %s).\n",
+                              mdname(conf->mddev),
+                              (unsigned long long)sh->sector + rdev->data_offset,
+                              bdn);
+               else if (atomic_read(&rdev->read_errors)
                         > conf->max_nr_stripes)
                        printk(KERN_WARNING
-                              "raid5: Too many read errors, failing device.\n");
+                              "raid5:%s: Too many read errors, failing device %s.\n",
+                              mdname(conf->mddev), bdn);
                else
                        retry = 1;
                if (retry)
@@ -569,7 +612,7 @@ static int raid5_end_read_request(struct bio * bi, unsigned int bytes_done,
                else {
                        clear_bit(R5_ReadError, &sh->dev[i].flags);
                        clear_bit(R5_ReWrite, &sh->dev[i].flags);
-                       md_error(conf->mddev, conf->disks[i].rdev);
+                       md_error(conf->mddev, rdev);
                }
        }
        rdev_dec_pending(conf->disks[i].rdev, conf->mddev);
@@ -1270,9 +1313,9 @@ static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, in
                (unsigned long long)sh->sector, dd_idx);
 
        if (conf->mddev->bitmap && firstwrite) {
-               sh->bm_seq = conf->seq_write;
                bitmap_startwrite(conf->mddev->bitmap, sh->sector,
                                  STRIPE_SECTORS, 0);
+               sh->bm_seq = conf->seq_flush+1;
                set_bit(STRIPE_BIT_DELAY, &sh->state);
        }
 
@@ -2554,13 +2597,6 @@ static int raid5_issue_flush(request_queue_t *q, struct gendisk *disk,
        return ret;
 }
 
-static inline void raid5_plug_device(raid5_conf_t *conf)
-{
-       spin_lock_irq(&conf->device_lock);
-       blk_plug_device(conf->mddev->queue);
-       spin_unlock_irq(&conf->device_lock);
-}
-
 static int make_request(request_queue_t *q, struct bio * bi)
 {
        mddev_t *mddev = q->queuedata;
@@ -2670,7 +2706,6 @@ static int make_request(request_queue_t *q, struct bio * bi)
                                goto retry;
                        }
                        finish_wait(&conf->wait_for_overlap, &w);
-                       raid5_plug_device(conf);
                        handle_stripe(sh, NULL);
                        release_stripe(sh);
                } else {
@@ -2923,7 +2958,7 @@ static void raid5d (mddev_t *mddev)
        while (1) {
                struct list_head *first;
 
-               if (conf->seq_flush - conf->seq_write > 0) {
+               if (conf->seq_flush != conf->seq_write) {
                        int seq = conf->seq_flush;
                        spin_unlock_irq(&conf->device_lock);
                        bitmap_unplug(mddev->bitmap);
@@ -3246,9 +3281,6 @@ static int run(mddev_t *mddev)
                set_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
                mddev->sync_thread = md_register_thread(md_do_sync, mddev,
                                                        "%s_reshape");
-               /* FIXME if md_register_thread fails?? */
-               md_wakeup_thread(mddev->sync_thread);
-
        }
 
        /* read-ahead size must cover two whole stripes, which is
index 55671cb5255e0aa6972560638cfff7e55552334d..87c286ee6a00a2dbef8094ad1174a45debb1b320 100644 (file)
@@ -896,9 +896,9 @@ static int nxt2002_init(struct dvb_frontend* fe)
        }
 
        ret = nxt2002_load_firmware(fe, fw);
+       release_firmware(fw);
        if (ret) {
                printk("nxt2002: Writing firmware to device failed\n");
-               release_firmware(fw);
                return ret;
        }
        printk("nxt2002: Firmware upload complete\n");
@@ -960,9 +960,9 @@ static int nxt2004_init(struct dvb_frontend* fe)
        }
 
        ret = nxt2004_load_firmware(fe, fw);
+       release_firmware(fw);
        if (ret) {
                printk("nxt2004: Writing firmware to device failed\n");
-               release_firmware(fw);
                return ret;
        }
        printk("nxt2004: Firmware upload complete\n");
index 26bed616fabec1c1293e10b7ade29940ee443ad5..2bf124b5368931da77a2320acd4c471e337a3087 100644 (file)
@@ -437,10 +437,10 @@ static int or51211_init(struct dvb_frontend* fe)
                }
 
                ret = or51211_load_firmware(fe, fw);
+               release_firmware(fw);
                if (ret) {
                        printk(KERN_WARNING "or51211: Writing firmware to "
                               "device failed!\n");
-                       release_firmware(fw);
                        return ret;
                }
                printk(KERN_INFO "or51211: Firmware upload complete.\n");
index 44ec5b9a469580b943c3f92ca1bcbfd6163f6171..d98fd5c2e13e12e6a1dc1f17253e4f4d7de71143 100644 (file)
@@ -318,7 +318,6 @@ static int sp8870_init (struct dvb_frontend* fe)
        printk("sp8870: waiting for firmware upload (%s)...\n", SP8870_DEFAULT_FIRMWARE);
        if (state->config->request_firmware(fe, &fw, SP8870_DEFAULT_FIRMWARE)) {
                printk("sp8870: no firmware upload (timeout or file not found?)\n");
-               release_firmware(fw);
                return -EIO;
        }
 
@@ -327,6 +326,7 @@ static int sp8870_init (struct dvb_frontend* fe)
                release_firmware(fw);
                return -EIO;
        }
+       release_firmware(fw);
        printk("sp8870: firmware upload complete\n");
 
        /* enable TS output and interface pins */
index b0a2b02f660869f2724aedb46e45c0b3e8e08a22..5c2f8f4e0ae554873a9ba9b8f1443070422b72d7 100644 (file)
@@ -520,9 +520,9 @@ static int sp887x_init(struct dvb_frontend* fe)
                }
 
                ret = sp887x_initial_setup(fe, fw);
+               release_firmware(fw);
                if (ret) {
                        printk("sp887x: writing firmware to device failed\n");
-                       release_firmware(fw);
                        return ret;
                }
                printk("sp887x: firmware upload complete\n");
index 349632b48e931a2dff360965703754ba0a3b1d19..b60177f173c3c1162726ca3da7eaa105781c8043 100644 (file)
@@ -453,11 +453,13 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
        if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) {
                dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d)\n",
                        firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE);
+               release_firmware(firmware);
                return -1;
        }
 
        if (0 != memcmp(firmware->data, magic, 8)) {
                dprintk(0, "ERROR: Firmware magic mismatch, wrong file?\n");
+               release_firmware(firmware);
                return -1;
        }
 
@@ -478,6 +480,7 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
        }
        if (checksum) {
                dprintk(0, "ERROR: Firmware load failed (checksum mismatch).\n");
+               release_firmware(firmware);
                return -1;
        }
        release_firmware(firmware);
index 184974cc734de25f852d971d0983fcbc20219c10..dc388a3ff5e0f34752789c4e8e56325344ebea77 100644 (file)
@@ -38,6 +38,9 @@ extern struct device_attribute i2o_device_attrs[];
 extern void i2o_device_remove(struct i2o_device *);
 extern int i2o_device_parse_lct(struct i2o_controller *);
 
+int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist,
+                  int oplen, void *reslist, int reslen);
+
 /* IOP */
 extern struct i2o_controller *i2o_iop_alloc(void);
 
index 89daf67b764dc6006066c15dad4bde7d09f0edb1..7d23e082bf26712ef886e401ed89ed2fd56c0f50 100644 (file)
@@ -36,9 +36,9 @@
 
 #include <asm/uaccess.h>
 
-#define SG_TABLESIZE           30
+#include "core.h"
 
-extern int i2o_parm_issue(struct i2o_device *, int, void *, int, void *, int);
+#define SG_TABLESIZE           30
 
 static int i2o_cfg_ioctl(struct inode *, struct file *, unsigned int,
                         unsigned long);
index 632bc218c86a0388328ff07c7b27ea336d892ff9..2bf32721eb5359163074fd861887e77860f4eea7 100644 (file)
@@ -479,7 +479,7 @@ static int ucb1x00_probe(struct mcp *mcp)
        mcp_enable(mcp);
        id = mcp_reg_read(mcp, UCB_ID);
 
-       if (id != UCB_ID_1200 && id != UCB_ID_1300) {
+       if (id != UCB_ID_1200 && id != UCB_ID_1300 && id != UCB_ID_TC35143) {
                printk(KERN_WARNING "UCB1x00 ID not found: %04x\n", id);
                goto err_disable;
        }
index 9c9a647d8b7b696fb114786c1b08716727659a54..ca8df8072d433ff77b04218dbb81c00f1e0e029d 100644 (file)
@@ -94,6 +94,7 @@
 #define UCB_ID         0x0c
 #define UCB_ID_1200            0x1004
 #define UCB_ID_1300            0x1005
+#define UCB_ID_TC35143          0x9712
 
 #define UCB_MODE       0x0d
 #define UCB_MODE_DYN_VFLAG_ENA (1 << 12)
index 893319108ba4fc1abb707db60b33983c2daa69d4..4e21b3b9d330e4abf9834c22951cb18f8062828d 100644 (file)
@@ -565,7 +565,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
        if (cmd->data)
                flags |= SDHCI_CMD_DATA;
 
-       writel(SDHCI_MAKE_CMD(cmd->opcode, flags),
+       writew(SDHCI_MAKE_CMD(cmd->opcode, flags),
                host->ioaddr + SDHCI_COMMAND);
 }
 
@@ -1193,10 +1193,8 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
        version = (version & SDHCI_SPEC_VER_MASK) >> SDHCI_SPEC_VER_SHIFT;
        if (version != 0) {
                printk(KERN_ERR "%s: Unknown controller version (%d). "
-                       "Cowardly refusing to continue.\n", host->slot_descr,
+                       "You may experience problems.\n", host->slot_descr,
                        version);
-               ret = -ENODEV;
-               goto unmap;
        }
 
        caps = readl(host->ioaddr + SDHCI_CAPABILITIES);
index 2819de79442cb9a864cc231564d0106077e5559f..80e8ca013e448a96e54af66220810e80b3c794fb 100644 (file)
        410 Severn Ave., Suite 210
        Annapolis MD 21403
 
-       Linux Kernel Additions:
-       
-       0.99H+lk0.9 - David S. Miller - softnet, PCI DMA updates
-       0.99H+lk1.0 - Jeff Garzik <jgarzik@pobox.com>
-               Remove compatibility defines for kernel versions < 2.2.x.
-               Update for new 2.3.x module interface
-       LK1.1.2 (March 19, 2000)
-       * New PCI interface (jgarzik)
-
-    LK1.1.3 25 April 2000, Andrew Morton <andrewm@uow.edu.au>
-    - Merged with 3c575_cb.c
-    - Don't set RxComplete in boomerang interrupt enable reg
-    - spinlock in vortex_timer to protect mdio functions
-    - disable local interrupts around call to vortex_interrupt in
-      vortex_tx_timeout() (So vortex_interrupt can use spin_lock())
-    - Select window 3 in vortex_timer()'s write to Wn3_MAC_Ctrl
-    - In vortex_start_xmit(), move the lock to _after_ we've altered
-      vp->cur_tx and vp->tx_full.  This defeats the race between
-      vortex_start_xmit() and vortex_interrupt which was identified
-      by Bogdan Costescu.
-    - Merged back support for six new cards from various sources
-    - Set vortex_have_pci if pci_module_init returns zero (fixes cardbus
-      insertion oops)
-    - Tell it that 3c905C has NWAY for 100bT autoneg
-    - Fix handling of SetStatusEnd in 'Too much work..' code, as
-      per 2.3.99's 3c575_cb (Dave Hinds).
-    - Split ISR into two for vortex & boomerang
-    - Fix MOD_INC/DEC races
-    - Handle resource allocation failures.
-    - Fix 3CCFE575CT LED polarity
-    - Make tx_interrupt_mitigation the default
-
-    LK1.1.4 25 April 2000, Andrew Morton <andrewm@uow.edu.au>    
-    - Add extra TxReset to vortex_up() to fix 575_cb hotplug initialisation probs.
-    - Put vortex_info_tbl into __devinitdata
-    - In the vortex_error StatsFull HACK, disable stats in vp->intr_enable as well
-      as in the hardware.
-    - Increased the loop counter in issue_and_wait from 2,000 to 4,000.
-
-    LK1.1.5 28 April 2000, andrewm
-    - Added powerpc defines (John Daniel <jdaniel@etresoft.com> said these work...)
-    - Some extra diagnostics
-    - In vortex_error(), reset the Tx on maxCollisions.  Otherwise most
-      chips usually get a Tx timeout.
-    - Added extra_reset module parm
-    - Replaced some inline timer manip with mod_timer
-      (Franois romieu <Francois.Romieu@nic.fr>)
-    - In vortex_up(), don't make Wn3_config initialisation dependent upon has_nway
-      (this came across from 3c575_cb).
-
-    LK1.1.6 06 Jun 2000, andrewm
-    - Backed out the PPC defines.
-    - Use del_timer_sync(), mod_timer().
-    - Fix wrapped ulong comparison in boomerang_rx()
-    - Add IS_TORNADO, use it to suppress 3c905C checksum error msg
-      (Donald Becker, I Lee Hetherington <ilh@sls.lcs.mit.edu>)
-    - Replace union wn3_config with BFINS/BFEXT manipulation for
-      sparc64 (Pete Zaitcev, Peter Jones)
-    - In vortex_error, do_tx_reset and vortex_tx_timeout(Vortex):
-      do a netif_wake_queue() to better recover from errors. (Anders Pedersen,
-      Donald Becker)
-    - Print a warning on out-of-memory (rate limited to 1 per 10 secs)
-    - Added two more Cardbus 575 NICs: 5b57 and 6564 (Paul Wagland)
-
-    LK1.1.7 2 Jul 2000 andrewm
-    - Better handling of shared IRQs
-    - Reset the transmitter on a Tx reclaim error
-    - Fixed crash under OOM during vortex_open() (Mark Hemment)
-    - Fix Rx cessation problem during OOM (help from Mark Hemment)
-    - The spinlocks around the mdio access were blocking interrupts for 300uS.
-      Fix all this to use spin_lock_bh() within mdio_read/write
-    - Only write to TxFreeThreshold if it's a boomerang - other NICs don't
-      have one.
-    - Added 802.3x MAC-layer flow control support
-
-   LK1.1.8 13 Aug 2000 andrewm
-    - Ignore request_region() return value - already reserved if Cardbus.
-    - Merged some additional Cardbus flags from Don's 0.99Qk
-    - Some fixes for 3c556 (Fred Maciel)
-    - Fix for EISA initialisation (Jan Rekorajski)
-    - Renamed MII_XCVR_PWR and EEPROM_230 to align with 3c575_cb and D. Becker's drivers
-    - Fixed MII_XCVR_PWR for 3CCFE575CT
-    - Added INVERT_LED_PWR, used it.
-    - Backed out the extra_reset stuff
-
-   LK1.1.9 12 Sep 2000 andrewm
-    - Backed out the tx_reset_resume flags.  It was a no-op.
-    - In vortex_error, don't reset the Tx on txReclaim errors
-    - In vortex_error, don't reset the Tx on maxCollisions errors.
-      Hence backed out all the DownListPtr logic here.
-    - In vortex_error, give Tornado cards a partial TxReset on
-      maxCollisions (David Hinds).  Defined MAX_COLLISION_RESET for this.
-    - Redid some driver flags and device names based on pcmcia_cs-3.1.20.
-    - Fixed a bug where, if vp->tx_full is set when the interface
-      is downed, it remains set when the interface is upped.  Bad
-      things happen.
-
-   LK1.1.10 17 Sep 2000 andrewm
-    - Added EEPROM_8BIT for 3c555 (Fred Maciel)
-    - Added experimental support for the 3c556B Laptop Hurricane (Louis Gerbarg)
-    - Add HAS_NWAY to "3c900 Cyclone 10Mbps TPO"
-
-   LK1.1.11 13 Nov 2000 andrewm
-    - Dump MOD_INC/DEC_USE_COUNT, use SET_MODULE_OWNER
-
-   LK1.1.12 1 Jan 2001 andrewm (2.4.0-pre1)
-    - Call pci_enable_device before we request our IRQ (Tobias Ringstrom)
-    - Add 3c590 PCI latency timer hack to vortex_probe1 (from 0.99Ra)
-    - Added extended issue_and_wait for the 3c905CX.
-    - Look for an MII on PHY index 24 first (3c905CX oddity).
-    - Add HAS_NWAY to 3cSOHO100-TX (Brett Frankenberger)
-    - Don't free skbs we don't own on oom path in vortex_open().
-
-   LK1.1.13 27 Jan 2001
-    - Added explicit `medialock' flag so we can truly
-      lock the media type down with `options'.
-    - "check ioremap return and some tidbits" (Arnaldo Carvalho de Melo <acme@conectiva.com.br>)
-    - Added and used EEPROM_NORESET for 3c556B PM resumes.
-    - Fixed leakage of vp->rx_ring.
-    - Break out separate HAS_HWCKSM device capability flag.
-    - Kill vp->tx_full (ANK)
-    - Merge zerocopy fragment handling (ANK?)
-
-   LK1.1.14 15 Feb 2001
-    - Enable WOL.  Can be turned on with `enable_wol' module option.
-    - EISA and PCI initialisation fixes (jgarzik, Manfred Spraul)
-    - If a device's internalconfig register reports it has NWAY,
-      use it, even if autoselect is enabled.
-
-   LK1.1.15 6 June 2001 akpm
-    - Prevent double counting of received bytes (Lars Christensen)
-    - Add ethtool support (jgarzik)
-    - Add module parm descriptions (Andrzej M. Krzysztofowicz)
-    - Implemented alloc_etherdev() API
-    - Special-case the 'Tx error 82' message.
-
-   LK1.1.16 18 July 2001 akpm
-    - Make NETIF_F_SG dependent upon nr_free_highpages(), not on CONFIG_HIGHMEM
-    - Lessen verbosity of bootup messages
-    - Fix WOL - use new PM API functions.
-    - Use netif_running() instead of vp->open in suspend/resume.
-    - Don't reset the interface logic on open/close/rmmod.  It upsets
-      autonegotiation, and hence DHCP (from 0.99T).
-    - Back out EEPROM_NORESET flag because of the above (we do it for all
-      NICs).
-    - Correct 3c982 identification string
-    - Rename wait_for_completion() to issue_and_wait() to avoid completion.h
-      clash.
-
-   LK1.1.17 18Dec01 akpm
-    - PCI ID 9805 is a Python-T, not a dual-port Cyclone.  Apparently.
-      And it has NWAY.
-    - Mask our advertised modes (vp->advertising) with our capabilities
-         (MII reg5) when deciding which duplex mode to use.
-    - Add `global_options' as default for options[].  Ditto global_enable_wol,
-      global_full_duplex.
-
-   LK1.1.18 01Jul02 akpm
-    - Fix for undocumented transceiver power-up bit on some 3c566B's
-      (Donald Becker, Rahul Karnik)
-
-    - See http://www.zip.com.au/~akpm/linux/#3c59x-2.3 for more details.
-    - Also see Documentation/networking/vortex.txt
-
-   LK1.1.19 10Nov02 Marc Zyngier <maz@wild-wind.fr.eu.org>
-    - EISA sysfs integration.
 */
 
 /*
index d2150baa7e351eb48ffc5a86c54d62c060a06161..1428bb7715afd16a04fb6132cd560b420636d111 100644 (file)
@@ -1916,7 +1916,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        regs = ioremap(pciaddr, CP_REGS_SIZE);
        if (!regs) {
                rc = -EIO;
-               dev_err(&pdev->dev, "Cannot map PCI MMIO (%lx@%lx)\n",
+               dev_err(&pdev->dev, "Cannot map PCI MMIO (%Lx@%Lx)\n",
                       (unsigned long long)pci_resource_len(pdev, 1),
                       (unsigned long long)pciaddr);
                goto err_out_res;
index cd9718512d1c548e293f77b900b69b702f6b8572..e4f4eaff76792292abe07865d7fcdbae34ac59de 100644 (file)
@@ -1709,6 +1709,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
        void __iomem *ioaddr = tp->mmio_addr;
        unsigned int entry;
        unsigned int len = skb->len;
+       unsigned long flags;
 
        /* Calculate the next Tx descriptor entry. */
        entry = tp->cur_tx % NUM_TX_DESC;
@@ -1725,7 +1726,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
                return 0;
        }
 
-       spin_lock_irq(&tp->lock);
+       spin_lock_irqsave(&tp->lock, flags);
        RTL_W32_F (TxStatus0 + (entry * sizeof (u32)),
                   tp->tx_flag | max(len, (unsigned int)ETH_ZLEN));
 
@@ -1736,7 +1737,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
 
        if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx)
                netif_stop_queue (dev);
-       spin_unlock_irq(&tp->lock);
+       spin_unlock_irqrestore(&tp->lock, flags);
 
        if (netif_msg_tx_queued(tp))
                printk (KERN_DEBUG "%s: Queued Tx packet size %u to slot %d.\n",
index 64b6a72b4f6a9590364c9c19ddc4c8bb5c5280aa..db73de0d25117339ede7074548003cec7986bddf 100644 (file)
@@ -1639,7 +1639,7 @@ bnx2_tx_int(struct bnx2 *bp)
                skb = tx_buf->skb;
 #ifdef BCM_TSO 
                /* partial BD completions possible with TSO packets */
-               if (skb_shinfo(skb)->gso_size) {
+               if (skb_is_gso(skb)) {
                        u16 last_idx, last_ring_idx;
 
                        last_idx = sw_cons +
index 87f94d939ff832a198a98bd9d26fc285238e8b2e..61b3754f50ff6645a16b7f8352dcb57b699b1dcc 100644 (file)
@@ -1417,7 +1417,7 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
        struct cpl_tx_pkt *cpl;
 
 #ifdef NETIF_F_TSO
-       if (skb_shinfo(skb)->gso_size) {
+       if (skb_is_gso(skb)) {
                int eth_type;
                struct cpl_tx_pkt_lso *hdr;
 
index 3042d33e2d4d9458dbd6ab6ab869063c6eded0bd..d304297c496c84681f0b0338c72d429c6cd38b39 100644 (file)
@@ -68,7 +68,6 @@
 #ifdef NETIF_F_TSO
 #include <net/checksum.h>
 #endif
-#include <linux/workqueue.h>
 #include <linux/mii.h>
 #include <linux/ethtool.h>
 #include <linux/if_vlan.h>
@@ -111,6 +110,9 @@ struct e1000_adapter;
 #define E1000_MIN_RXD                       80
 #define E1000_MAX_82544_RXD               4096
 
+/* this is the size past which hardware will drop packets when setting LPE=0 */
+#define MAXIMUM_ETHERNET_VLAN_SIZE 1522
+
 /* Supported Rx Buffer Sizes */
 #define E1000_RXBUFFER_128   128    /* Used for packet split */
 #define E1000_RXBUFFER_256   256    /* Used for packet split */
@@ -143,6 +145,7 @@ struct e1000_adapter;
 
 #define AUTO_ALL_MODES            0
 #define E1000_EEPROM_82544_APM    0x0004
+#define E1000_EEPROM_ICH8_APME    0x0004
 #define E1000_EEPROM_APME         0x0400
 
 #ifndef E1000_MASTER_SLAVE
@@ -254,7 +257,6 @@ struct e1000_adapter {
        spinlock_t tx_queue_lock;
 #endif
        atomic_t irq_sem;
-       struct work_struct watchdog_task;
        struct work_struct reset_task;
        uint8_t fc_autoneg;
 
@@ -339,8 +341,14 @@ struct e1000_adapter {
 #ifdef NETIF_F_TSO
        boolean_t tso_force;
 #endif
+       boolean_t smart_power_down;     /* phy smart power down */
+       unsigned long flags;
 };
 
+enum e1000_state_t {
+       __E1000_DRIVER_TESTING,
+       __E1000_RESETTING,
+};
 
 /*  e1000_main.c  */
 extern char e1000_driver_name[];
@@ -348,6 +356,7 @@ extern char e1000_driver_version[];
 int e1000_up(struct e1000_adapter *adapter);
 void e1000_down(struct e1000_adapter *adapter);
 void e1000_reset(struct e1000_adapter *adapter);
+void e1000_reinit_locked(struct e1000_adapter *adapter);
 int e1000_setup_all_tx_resources(struct e1000_adapter *adapter);
 void e1000_free_all_tx_resources(struct e1000_adapter *adapter);
 int e1000_setup_all_rx_resources(struct e1000_adapter *adapter);
index d19664891768799690fbbc624d9a589a3c26e707..88a82ba88f578b0216f213ca6ca1b4d525e741e7 100644 (file)
@@ -109,7 +109,8 @@ e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
                                   SUPPORTED_1000baseT_Full|
                                   SUPPORTED_Autoneg |
                                   SUPPORTED_TP);
-
+               if (hw->phy_type == e1000_phy_ife)
+                       ecmd->supported &= ~SUPPORTED_1000baseT_Full;
                ecmd->advertising = ADVERTISED_TP;
 
                if (hw->autoneg == 1) {
@@ -203,11 +204,9 @@ e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
 
        /* reset the link */
 
-       if (netif_running(adapter->netdev)) {
-               e1000_down(adapter);
-               e1000_reset(adapter);
-               e1000_up(adapter);
-       } else
+       if (netif_running(adapter->netdev))
+               e1000_reinit_locked(adapter);
+       else
                e1000_reset(adapter);
 
        return 0;
@@ -254,10 +253,9 @@ e1000_set_pauseparam(struct net_device *netdev,
        hw->original_fc = hw->fc;
 
        if (adapter->fc_autoneg == AUTONEG_ENABLE) {
-               if (netif_running(adapter->netdev)) {
-                       e1000_down(adapter);
-                       e1000_up(adapter);
-               } else
+               if (netif_running(adapter->netdev))
+                       e1000_reinit_locked(adapter);
+               else
                        e1000_reset(adapter);
        } else
                return ((hw->media_type == e1000_media_type_fiber) ?
@@ -279,10 +277,9 @@ e1000_set_rx_csum(struct net_device *netdev, uint32_t data)
        struct e1000_adapter *adapter = netdev_priv(netdev);
        adapter->rx_csum = data;
 
-       if (netif_running(netdev)) {
-               e1000_down(adapter);
-               e1000_up(adapter);
-       } else
+       if (netif_running(netdev))
+               e1000_reinit_locked(adapter);
+       else
                e1000_reset(adapter);
        return 0;
 }
@@ -577,6 +574,7 @@ e1000_get_drvinfo(struct net_device *netdev,
        case e1000_82572:
        case e1000_82573:
        case e1000_80003es2lan:
+       case e1000_ich8lan:
                sprintf(firmware_version, "%d.%d-%d",
                        (eeprom_data & 0xF000) >> 12,
                        (eeprom_data & 0x0FF0) >> 4,
@@ -631,6 +629,9 @@ e1000_set_ringparam(struct net_device *netdev,
        tx_ring_size = sizeof(struct e1000_tx_ring) * adapter->num_tx_queues;
        rx_ring_size = sizeof(struct e1000_rx_ring) * adapter->num_rx_queues;
 
+       while (test_and_set_bit(__E1000_RESETTING, &adapter->flags))
+               msleep(1);
+
        if (netif_running(adapter->netdev))
                e1000_down(adapter);
 
@@ -691,9 +692,11 @@ e1000_set_ringparam(struct net_device *netdev,
                adapter->rx_ring = rx_new;
                adapter->tx_ring = tx_new;
                if ((err = e1000_up(adapter)))
-                       return err;
+                       goto err_setup;
        }
 
+       clear_bit(__E1000_RESETTING, &adapter->flags);
+
        return 0;
 err_setup_tx:
        e1000_free_all_rx_resources(adapter);
@@ -701,6 +704,8 @@ err_setup_rx:
        adapter->rx_ring = rx_old;
        adapter->tx_ring = tx_old;
        e1000_up(adapter);
+err_setup:
+       clear_bit(__E1000_RESETTING, &adapter->flags);
        return err;
 }
 
@@ -754,6 +759,7 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data)
                toggle = 0x7FFFF3FF;
                break;
        case e1000_82573:
+       case e1000_ich8lan:
                toggle = 0x7FFFF033;
                break;
        default:
@@ -773,11 +779,12 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data)
        }
        /* restore previous status */
        E1000_WRITE_REG(&adapter->hw, STATUS, before);
-
-       REG_PATTERN_TEST(FCAL, 0xFFFFFFFF, 0xFFFFFFFF);
-       REG_PATTERN_TEST(FCAH, 0x0000FFFF, 0xFFFFFFFF);
-       REG_PATTERN_TEST(FCT, 0x0000FFFF, 0xFFFFFFFF);
-       REG_PATTERN_TEST(VET, 0x0000FFFF, 0xFFFFFFFF);
+       if (adapter->hw.mac_type != e1000_ich8lan) {
+               REG_PATTERN_TEST(FCAL, 0xFFFFFFFF, 0xFFFFFFFF);
+               REG_PATTERN_TEST(FCAH, 0x0000FFFF, 0xFFFFFFFF);
+               REG_PATTERN_TEST(FCT, 0x0000FFFF, 0xFFFFFFFF);
+               REG_PATTERN_TEST(VET, 0x0000FFFF, 0xFFFFFFFF);
+       }
        REG_PATTERN_TEST(RDTR, 0x0000FFFF, 0xFFFFFFFF);
        REG_PATTERN_TEST(RDBAH, 0xFFFFFFFF, 0xFFFFFFFF);
        REG_PATTERN_TEST(RDLEN, 0x000FFF80, 0x000FFFFF);
@@ -790,20 +797,22 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data)
        REG_PATTERN_TEST(TDLEN, 0x000FFF80, 0x000FFFFF);
 
        REG_SET_AND_CHECK(RCTL, 0xFFFFFFFF, 0x00000000);
-       REG_SET_AND_CHECK(RCTL, 0x06DFB3FE, 0x003FFFFB);
+       before = (adapter->hw.mac_type == e1000_ich8lan ?
+                       0x06C3B33E : 0x06DFB3FE);
+       REG_SET_AND_CHECK(RCTL, before, 0x003FFFFB);
        REG_SET_AND_CHECK(TCTL, 0xFFFFFFFF, 0x00000000);
 
        if (adapter->hw.mac_type >= e1000_82543) {
 
-               REG_SET_AND_CHECK(RCTL, 0x06DFB3FE, 0xFFFFFFFF);
+               REG_SET_AND_CHECK(RCTL, before, 0xFFFFFFFF);
                REG_PATTERN_TEST(RDBAL, 0xFFFFFFF0, 0xFFFFFFFF);
-               REG_PATTERN_TEST(TXCW, 0xC000FFFF, 0x0000FFFF);
+               if (adapter->hw.mac_type != e1000_ich8lan)
+                       REG_PATTERN_TEST(TXCW, 0xC000FFFF, 0x0000FFFF);
                REG_PATTERN_TEST(TDBAL, 0xFFFFFFF0, 0xFFFFFFFF);
                REG_PATTERN_TEST(TIDV, 0x0000FFFF, 0x0000FFFF);
-
-               for (i = 0; i < E1000_RAR_ENTRIES; i++) {
-                       REG_PATTERN_TEST(RA + ((i << 1) << 2), 0xFFFFFFFF,
-                                        0xFFFFFFFF);
+               value = (adapter->hw.mac_type == e1000_ich8lan ?
+                               E1000_RAR_ENTRIES_ICH8LAN : E1000_RAR_ENTRIES);
+               for (i = 0; i < value; i++) {
                        REG_PATTERN_TEST(RA + (((i << 1) + 1) << 2), 0x8003FFFF,
                                         0xFFFFFFFF);
                }
@@ -817,7 +826,9 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data)
 
        }
 
-       for (i = 0; i < E1000_MC_TBL_SIZE; i++)
+       value = (adapter->hw.mac_type == e1000_ich8lan ?
+                       E1000_MC_TBL_SIZE_ICH8LAN : E1000_MC_TBL_SIZE);
+       for (i = 0; i < value; i++)
                REG_PATTERN_TEST(MTA + (i << 2), 0xFFFFFFFF, 0xFFFFFFFF);
 
        *data = 0;
@@ -889,6 +900,8 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
        /* Test each interrupt */
        for (; i < 10; i++) {
 
+               if (adapter->hw.mac_type == e1000_ich8lan && i == 8)
+                       continue;
                /* Interrupt to test */
                mask = 1 << i;
 
@@ -1246,18 +1259,33 @@ e1000_integrated_phy_loopback(struct e1000_adapter *adapter)
        } else if (adapter->hw.phy_type == e1000_phy_gg82563) {
                e1000_write_phy_reg(&adapter->hw,
                                    GG82563_PHY_KMRN_MODE_CTRL,
-                                   0x1CE);
+                                   0x1CC);
        }
-       /* force 1000, set loopback */
-       e1000_write_phy_reg(&adapter->hw, PHY_CTRL, 0x4140);
 
-       /* Now set up the MAC to the same speed/duplex as the PHY. */
        ctrl_reg = E1000_READ_REG(&adapter->hw, CTRL);
-       ctrl_reg &= ~E1000_CTRL_SPD_SEL; /* Clear the speed sel bits */
-       ctrl_reg |= (E1000_CTRL_FRCSPD | /* Set the Force Speed Bit */
-                    E1000_CTRL_FRCDPX | /* Set the Force Duplex Bit */
-                    E1000_CTRL_SPD_1000 |/* Force Speed to 1000 */
-                    E1000_CTRL_FD);     /* Force Duplex to FULL */
+
+       if (adapter->hw.phy_type == e1000_phy_ife) {
+               /* force 100, set loopback */
+               e1000_write_phy_reg(&adapter->hw, PHY_CTRL, 0x6100);
+
+               /* Now set up the MAC to the same speed/duplex as the PHY. */
+               ctrl_reg &= ~E1000_CTRL_SPD_SEL; /* Clear the speed sel bits */
+               ctrl_reg |= (E1000_CTRL_FRCSPD | /* Set the Force Speed Bit */
+                            E1000_CTRL_FRCDPX | /* Set the Force Duplex Bit */
+                            E1000_CTRL_SPD_100 |/* Force Speed to 100 */
+                            E1000_CTRL_FD);     /* Force Duplex to FULL */
+       } else {
+               /* force 1000, set loopback */
+               e1000_write_phy_reg(&adapter->hw, PHY_CTRL, 0x4140);
+
+               /* Now set up the MAC to the same speed/duplex as the PHY. */
+               ctrl_reg = E1000_READ_REG(&adapter->hw, CTRL);
+               ctrl_reg &= ~E1000_CTRL_SPD_SEL; /* Clear the speed sel bits */
+               ctrl_reg |= (E1000_CTRL_FRCSPD | /* Set the Force Speed Bit */
+                            E1000_CTRL_FRCDPX | /* Set the Force Duplex Bit */
+                            E1000_CTRL_SPD_1000 |/* Force Speed to 1000 */
+                            E1000_CTRL_FD);     /* Force Duplex to FULL */
+       }
 
        if (adapter->hw.media_type == e1000_media_type_copper &&
           adapter->hw.phy_type == e1000_phy_m88) {
@@ -1317,6 +1345,7 @@ e1000_set_phy_loopback(struct e1000_adapter *adapter)
        case e1000_82572:
        case e1000_82573:
        case e1000_80003es2lan:
+       case e1000_ich8lan:
                return e1000_integrated_phy_loopback(adapter);
                break;
 
@@ -1568,6 +1597,7 @@ e1000_diag_test(struct net_device *netdev,
        struct e1000_adapter *adapter = netdev_priv(netdev);
        boolean_t if_running = netif_running(netdev);
 
+       set_bit(__E1000_DRIVER_TESTING, &adapter->flags);
        if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
                /* Offline tests */
 
@@ -1582,7 +1612,8 @@ e1000_diag_test(struct net_device *netdev,
                        eth_test->flags |= ETH_TEST_FL_FAILED;
 
                if (if_running)
-                       e1000_down(adapter);
+                       /* indicate we're in test mode */
+                       dev_close(netdev);
                else
                        e1000_reset(adapter);
 
@@ -1607,8 +1638,9 @@ e1000_diag_test(struct net_device *netdev,
                adapter->hw.autoneg = autoneg;
 
                e1000_reset(adapter);
+               clear_bit(__E1000_DRIVER_TESTING, &adapter->flags);
                if (if_running)
-                       e1000_up(adapter);
+                       dev_open(netdev);
        } else {
                /* Online tests */
                if (e1000_link_test(adapter, &data[4]))
@@ -1619,6 +1651,8 @@ e1000_diag_test(struct net_device *netdev,
                data[1] = 0;
                data[2] = 0;
                data[3] = 0;
+
+               clear_bit(__E1000_DRIVER_TESTING, &adapter->flags);
        }
        msleep_interruptible(4 * 1000);
 }
@@ -1778,21 +1812,18 @@ e1000_phys_id(struct net_device *netdev, uint32_t data)
                mod_timer(&adapter->blink_timer, jiffies);
                msleep_interruptible(data * 1000);
                del_timer_sync(&adapter->blink_timer);
-       } else if (adapter->hw.mac_type < e1000_82573) {
-               E1000_WRITE_REG(&adapter->hw, LEDCTL,
-                       (E1000_LEDCTL_LED2_BLINK_RATE |
-                        E1000_LEDCTL_LED0_BLINK | E1000_LEDCTL_LED2_BLINK |
-                        (E1000_LEDCTL_MODE_LED_ON << E1000_LEDCTL_LED2_MODE_SHIFT) |
-                        (E1000_LEDCTL_MODE_LINK_ACTIVITY << E1000_LEDCTL_LED0_MODE_SHIFT) |
-                        (E1000_LEDCTL_MODE_LED_OFF << E1000_LEDCTL_LED1_MODE_SHIFT)));
+       } else if (adapter->hw.phy_type == e1000_phy_ife) {
+               if (!adapter->blink_timer.function) {
+                       init_timer(&adapter->blink_timer);
+                       adapter->blink_timer.function = e1000_led_blink_callback;
+                       adapter->blink_timer.data = (unsigned long) adapter;
+               }
+               mod_timer(&adapter->blink_timer, jiffies);
                msleep_interruptible(data * 1000);
+               del_timer_sync(&adapter->blink_timer);
+               e1000_write_phy_reg(&(adapter->hw), IFE_PHY_SPECIAL_CONTROL_LED, 0);
        } else {
-               E1000_WRITE_REG(&adapter->hw, LEDCTL,
-                       (E1000_LEDCTL_LED2_BLINK_RATE |
-                        E1000_LEDCTL_LED1_BLINK | E1000_LEDCTL_LED2_BLINK |
-                        (E1000_LEDCTL_MODE_LED_ON << E1000_LEDCTL_LED2_MODE_SHIFT) |
-                        (E1000_LEDCTL_MODE_LINK_ACTIVITY << E1000_LEDCTL_LED1_MODE_SHIFT) |
-                        (E1000_LEDCTL_MODE_LED_OFF << E1000_LEDCTL_LED0_MODE_SHIFT)));
+               e1000_blink_led_start(&adapter->hw);
                msleep_interruptible(data * 1000);
        }
 
@@ -1807,10 +1838,8 @@ static int
 e1000_nway_reset(struct net_device *netdev)
 {
        struct e1000_adapter *adapter = netdev_priv(netdev);
-       if (netif_running(netdev)) {
-               e1000_down(adapter);
-               e1000_up(adapter);
-       }
+       if (netif_running(netdev))
+               e1000_reinit_locked(adapter);
        return 0;
 }
 
index 3959039b16ec375e9fcd798666494082ac5fa506..583518ae49ce930e5869866237380931b71d268a 100644 (file)
@@ -101,7 +101,8 @@ static void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset,
 
 #define E1000_WRITE_REG_IO(a, reg, val) \
            e1000_write_reg_io((a), E1000_##reg, val)
-static int32_t e1000_configure_kmrn_for_10_100(struct e1000_hw *hw);
+static int32_t e1000_configure_kmrn_for_10_100(struct e1000_hw *hw,
+                                               uint16_t duplex);
 static int32_t e1000_configure_kmrn_for_1000(struct e1000_hw *hw);
 
 /* IGP cable length table */
@@ -156,6 +157,14 @@ e1000_set_phy_type(struct e1000_hw *hw)
             hw->phy_type = e1000_phy_igp;
             break;
         }
+    case IGP03E1000_E_PHY_ID:
+        hw->phy_type = e1000_phy_igp_3;
+        break;
+    case IFE_E_PHY_ID:
+    case IFE_PLUS_E_PHY_ID:
+    case IFE_C_E_PHY_ID:
+        hw->phy_type = e1000_phy_ife;
+        break;
     case GG82563_E_PHY_ID:
         if (hw->mac_type == e1000_80003es2lan) {
             hw->phy_type = e1000_phy_gg82563;
@@ -332,6 +341,7 @@ e1000_set_mac_type(struct e1000_hw *hw)
         break;
     case E1000_DEV_ID_82541EI:
     case E1000_DEV_ID_82541EI_MOBILE:
+    case E1000_DEV_ID_82541ER_LOM:
         hw->mac_type = e1000_82541;
         break;
     case E1000_DEV_ID_82541ER:
@@ -341,6 +351,7 @@ e1000_set_mac_type(struct e1000_hw *hw)
         hw->mac_type = e1000_82541_rev_2;
         break;
     case E1000_DEV_ID_82547EI:
+    case E1000_DEV_ID_82547EI_MOBILE:
         hw->mac_type = e1000_82547;
         break;
     case E1000_DEV_ID_82547GI:
@@ -354,6 +365,7 @@ e1000_set_mac_type(struct e1000_hw *hw)
     case E1000_DEV_ID_82572EI_COPPER:
     case E1000_DEV_ID_82572EI_FIBER:
     case E1000_DEV_ID_82572EI_SERDES:
+    case E1000_DEV_ID_82572EI:
         hw->mac_type = e1000_82572;
         break;
     case E1000_DEV_ID_82573E:
@@ -361,16 +373,29 @@ e1000_set_mac_type(struct e1000_hw *hw)
     case E1000_DEV_ID_82573L:
         hw->mac_type = e1000_82573;
         break;
+    case E1000_DEV_ID_80003ES2LAN_COPPER_SPT:
+    case E1000_DEV_ID_80003ES2LAN_SERDES_SPT:
     case E1000_DEV_ID_80003ES2LAN_COPPER_DPT:
     case E1000_DEV_ID_80003ES2LAN_SERDES_DPT:
         hw->mac_type = e1000_80003es2lan;
         break;
+    case E1000_DEV_ID_ICH8_IGP_M_AMT:
+    case E1000_DEV_ID_ICH8_IGP_AMT:
+    case E1000_DEV_ID_ICH8_IGP_C:
+    case E1000_DEV_ID_ICH8_IFE:
+    case E1000_DEV_ID_ICH8_IGP_M:
+        hw->mac_type = e1000_ich8lan;
+        break;
     default:
         /* Should never have loaded on this device */
         return -E1000_ERR_MAC_TYPE;
     }
 
     switch(hw->mac_type) {
+    case e1000_ich8lan:
+        hw->swfwhw_semaphore_present = TRUE;
+        hw->asf_firmware_present = TRUE;
+        break;
     case e1000_80003es2lan:
         hw->swfw_sync_present = TRUE;
         /* fall through */
@@ -423,6 +448,7 @@ e1000_set_media_type(struct e1000_hw *hw)
         case e1000_82542_rev2_1:
             hw->media_type = e1000_media_type_fiber;
             break;
+        case e1000_ich8lan:
         case e1000_82573:
             /* The STATUS_TBIMODE bit is reserved or reused for the this
              * device.
@@ -527,6 +553,14 @@ e1000_reset_hw(struct e1000_hw *hw)
         } while(timeout);
     }
 
+    /* Workaround for ICH8 bit corruption issue in FIFO memory */
+    if (hw->mac_type == e1000_ich8lan) {
+        /* Set Tx and Rx buffer allocation to 8k apiece. */
+        E1000_WRITE_REG(hw, PBA, E1000_PBA_8K);
+        /* Set Packet Buffer Size to 16k. */
+        E1000_WRITE_REG(hw, PBS, E1000_PBS_16K);
+    }
+
     /* Issue a global reset to the MAC.  This will reset the chip's
      * transmit, receive, DMA, and link units.  It will not effect
      * the current PCI configuration.  The global reset bit is self-
@@ -550,6 +584,20 @@ e1000_reset_hw(struct e1000_hw *hw)
             /* Reset is performed on a shadow of the control register */
             E1000_WRITE_REG(hw, CTRL_DUP, (ctrl | E1000_CTRL_RST));
             break;
+        case e1000_ich8lan:
+            if (!hw->phy_reset_disable &&
+                e1000_check_phy_reset_block(hw) == E1000_SUCCESS) {
+                /* e1000_ich8lan PHY HW reset requires MAC CORE reset
+                 * at the same time to make sure the interface between
+                 * MAC and the external PHY is reset.
+                 */
+                ctrl |= E1000_CTRL_PHY_RST;
+            }
+
+            e1000_get_software_flag(hw);
+            E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST));
+            msec_delay(5);
+            break;
         default:
             E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST));
             break;
@@ -591,6 +639,7 @@ e1000_reset_hw(struct e1000_hw *hw)
             /* fall through */
         case e1000_82571:
         case e1000_82572:
+        case e1000_ich8lan:
         case e1000_80003es2lan:
             ret_val = e1000_get_auto_rd_done(hw);
             if(ret_val)
@@ -633,6 +682,12 @@ e1000_reset_hw(struct e1000_hw *hw)
             e1000_pci_set_mwi(hw);
     }
 
+    if (hw->mac_type == e1000_ich8lan) {
+        uint32_t kab = E1000_READ_REG(hw, KABGTXD);
+        kab |= E1000_KABGTXD_BGSQLBIAS;
+        E1000_WRITE_REG(hw, KABGTXD, kab);
+    }
+
     return E1000_SUCCESS;
 }
 
@@ -675,9 +730,12 @@ e1000_init_hw(struct e1000_hw *hw)
 
     /* Disabling VLAN filtering. */
     DEBUGOUT("Initializing the IEEE VLAN\n");
-    if (hw->mac_type < e1000_82545_rev_3)
-        E1000_WRITE_REG(hw, VET, 0);
-    e1000_clear_vfta(hw);
+    /* VET hardcoded to standard value and VFTA removed in ICH8 LAN */
+    if (hw->mac_type != e1000_ich8lan) {
+        if (hw->mac_type < e1000_82545_rev_3)
+            E1000_WRITE_REG(hw, VET, 0);
+        e1000_clear_vfta(hw);
+    }
 
     /* For 82542 (rev 2.0), disable MWI and put the receiver into reset */
     if(hw->mac_type == e1000_82542_rev2_0) {
@@ -705,8 +763,14 @@ e1000_init_hw(struct e1000_hw *hw)
     /* Zero out the Multicast HASH table */
     DEBUGOUT("Zeroing the MTA\n");
     mta_size = E1000_MC_TBL_SIZE;
-    for(i = 0; i < mta_size; i++)
+    if (hw->mac_type == e1000_ich8lan)
+        mta_size = E1000_MC_TBL_SIZE_ICH8LAN;
+    for(i = 0; i < mta_size; i++) {
         E1000_WRITE_REG_ARRAY(hw, MTA, i, 0);
+        /* use write flush to prevent Memory Write Block (MWB) from
+         * occuring when accessing our register space */
+        E1000_WRITE_FLUSH(hw);
+    }
 
     /* Set the PCI priority bit correctly in the CTRL register.  This
      * determines if the adapter gives priority to receives, or if it
@@ -744,6 +808,10 @@ e1000_init_hw(struct e1000_hw *hw)
         break;
     }
 
+    /* More time needed for PHY to initialize */
+    if (hw->mac_type == e1000_ich8lan)
+        msec_delay(15);
+
     /* Call a subroutine to configure the link and setup flow control. */
     ret_val = e1000_setup_link(hw);
 
@@ -757,6 +825,7 @@ e1000_init_hw(struct e1000_hw *hw)
         case e1000_82571:
         case e1000_82572:
         case e1000_82573:
+        case e1000_ich8lan:
         case e1000_80003es2lan:
             ctrl |= E1000_TXDCTL_COUNT_DESC;
             break;
@@ -795,6 +864,7 @@ e1000_init_hw(struct e1000_hw *hw)
         /* Fall through */
     case e1000_82571:
     case e1000_82572:
+    case e1000_ich8lan:
         ctrl = E1000_READ_REG(hw, TXDCTL1);
         ctrl = (ctrl & ~E1000_TXDCTL_WTHRESH) | E1000_TXDCTL_FULL_TX_DESC_WB;
         if(hw->mac_type >= e1000_82571)
@@ -818,6 +888,11 @@ e1000_init_hw(struct e1000_hw *hw)
      */
     e1000_clear_hw_cntrs(hw);
 
+    /* ICH8 No-snoop bits are opposite polarity.
+     * Set to snoop by default after reset. */
+    if (hw->mac_type == e1000_ich8lan)
+        e1000_set_pci_ex_no_snoop(hw, PCI_EX_82566_SNOOP_ALL);
+
     if (hw->device_id == E1000_DEV_ID_82546GB_QUAD_COPPER ||
         hw->device_id == E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3) {
         ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);
@@ -905,6 +980,7 @@ e1000_setup_link(struct e1000_hw *hw)
      */
     if (hw->fc == e1000_fc_default) {
         switch (hw->mac_type) {
+        case e1000_ich8lan:
         case e1000_82573:
             hw->fc = e1000_fc_full;
             break;
@@ -971,9 +1047,12 @@ e1000_setup_link(struct e1000_hw *hw)
      */
     DEBUGOUT("Initializing the Flow Control address, type and timer regs\n");
 
-    E1000_WRITE_REG(hw, FCAL, FLOW_CONTROL_ADDRESS_LOW);
-    E1000_WRITE_REG(hw, FCAH, FLOW_CONTROL_ADDRESS_HIGH);
-    E1000_WRITE_REG(hw, FCT, FLOW_CONTROL_TYPE);
+    /* FCAL/H and FCT are hardcoded to standard values in e1000_ich8lan. */
+    if (hw->mac_type != e1000_ich8lan) {
+        E1000_WRITE_REG(hw, FCT, FLOW_CONTROL_TYPE);
+        E1000_WRITE_REG(hw, FCAH, FLOW_CONTROL_ADDRESS_HIGH);
+        E1000_WRITE_REG(hw, FCAL, FLOW_CONTROL_ADDRESS_LOW);
+    }
 
     E1000_WRITE_REG(hw, FCTTV, hw->fc_pause_time);
 
@@ -1237,12 +1316,13 @@ e1000_copper_link_igp_setup(struct e1000_hw *hw)
 
     /* Wait 10ms for MAC to configure PHY from eeprom settings */
     msec_delay(15);
-
+    if (hw->mac_type != e1000_ich8lan) {
     /* Configure activity LED after PHY reset */
     led_ctrl = E1000_READ_REG(hw, LEDCTL);
     led_ctrl &= IGP_ACTIVITY_LED_MASK;
     led_ctrl |= (IGP_ACTIVITY_LED_ENABLE | IGP_LED3_MODE);
     E1000_WRITE_REG(hw, LEDCTL, led_ctrl);
+    }
 
     /* disable lplu d3 during driver init */
     ret_val = e1000_set_d3_lplu_state(hw, FALSE);
@@ -1478,8 +1558,7 @@ e1000_copper_link_ggp_setup(struct e1000_hw *hw)
             if (ret_val)
                 return ret_val;
 
-            /* Enable Pass False Carrier on the PHY */
-            phy_data |= GG82563_KMCR_PASS_FALSE_CARRIER;
+            phy_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER;
 
             ret_val = e1000_write_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL,
                                           phy_data);
@@ -1561,28 +1640,40 @@ e1000_copper_link_mgp_setup(struct e1000_hw *hw)
     phy_data &= ~M88E1000_PSCR_POLARITY_REVERSAL;
     if(hw->disable_polarity_correction == 1)
         phy_data |= M88E1000_PSCR_POLARITY_REVERSAL;
-        ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
-        if(ret_val)
-            return ret_val;
-
-    /* Force TX_CLK in the Extended PHY Specific Control Register
-     * to 25MHz clock.
-     */
-    ret_val = e1000_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_data);
-    if(ret_val)
+    ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
+    if (ret_val)
         return ret_val;
 
-    phy_data |= M88E1000_EPSCR_TX_CLK_25;
-
     if (hw->phy_revision < M88E1011_I_REV_4) {
-        /* Configure Master and Slave downshift values */
-        phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK |
+        /* Force TX_CLK in the Extended PHY Specific Control Register
+         * to 25MHz clock.
+         */
+        ret_val = e1000_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_data);
+        if (ret_val)
+            return ret_val;
+
+        phy_data |= M88E1000_EPSCR_TX_CLK_25;
+
+        if ((hw->phy_revision == E1000_REVISION_2) &&
+            (hw->phy_id == M88E1111_I_PHY_ID)) {
+            /* Vidalia Phy, set the downshift counter to 5x */
+            phy_data &= ~(M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK);
+            phy_data |= M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X;
+            ret_val = e1000_write_phy_reg(hw,
+                                        M88E1000_EXT_PHY_SPEC_CTRL, phy_data);
+            if (ret_val)
+                return ret_val;
+        } else {
+            /* Configure Master and Slave downshift values */
+            phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK |
                               M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK);
-        phy_data |= (M88E1000_EPSCR_MASTER_DOWNSHIFT_1X |
+            phy_data |= (M88E1000_EPSCR_MASTER_DOWNSHIFT_1X |
                              M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X);
-        ret_val = e1000_write_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_data);
-        if(ret_val)
-            return ret_val;
+            ret_val = e1000_write_phy_reg(hw,
+                                        M88E1000_EXT_PHY_SPEC_CTRL, phy_data);
+            if (ret_val)
+               return ret_val;
+        }
     }
 
     /* SW Reset the PHY so all changes take effect */
@@ -1620,6 +1711,10 @@ e1000_copper_link_autoneg(struct e1000_hw *hw)
     if(hw->autoneg_advertised == 0)
         hw->autoneg_advertised = AUTONEG_ADVERTISE_SPEED_DEFAULT;
 
+    /* IFE phy only supports 10/100 */
+    if (hw->phy_type == e1000_phy_ife)
+        hw->autoneg_advertised &= AUTONEG_ADVERTISE_10_100_ALL;
+
     DEBUGOUT("Reconfiguring auto-neg advertisement params\n");
     ret_val = e1000_phy_setup_autoneg(hw);
     if(ret_val) {
@@ -1717,6 +1812,26 @@ e1000_setup_copper_link(struct e1000_hw *hw)
 
     DEBUGFUNC("e1000_setup_copper_link");
 
+    switch (hw->mac_type) {
+    case e1000_80003es2lan:
+    case e1000_ich8lan:
+        /* Set the mac to wait the maximum time between each
+         * iteration and increase the max iterations when
+         * polling the phy; this fixes erroneous timeouts at 10Mbps. */
+        ret_val = e1000_write_kmrn_reg(hw, GG82563_REG(0x34, 4), 0xFFFF);
+        if (ret_val)
+            return ret_val;
+        ret_val = e1000_read_kmrn_reg(hw, GG82563_REG(0x34, 9), &reg_data);
+        if (ret_val)
+            return ret_val;
+        reg_data |= 0x3F;
+        ret_val = e1000_write_kmrn_reg(hw, GG82563_REG(0x34, 9), reg_data);
+        if (ret_val)
+            return ret_val;
+    default:
+        break;
+    }
+
     /* Check if it is a valid PHY and set PHY mode if necessary. */
     ret_val = e1000_copper_link_preconfig(hw);
     if(ret_val)
@@ -1724,10 +1839,8 @@ e1000_setup_copper_link(struct e1000_hw *hw)
 
     switch (hw->mac_type) {
     case e1000_80003es2lan:
-        ret_val = e1000_read_kmrn_reg(hw, E1000_KUMCTRLSTA_OFFSET_INB_CTRL,
-                                      &reg_data);
-        if (ret_val)
-            return ret_val;
+        /* Kumeran registers are written-only */
+        reg_data = E1000_KUMCTRLSTA_INB_CTRL_LINK_STATUS_TX_TIMEOUT_DEFAULT;
         reg_data |= E1000_KUMCTRLSTA_INB_CTRL_DIS_PADDING;
         ret_val = e1000_write_kmrn_reg(hw, E1000_KUMCTRLSTA_OFFSET_INB_CTRL,
                                        reg_data);
@@ -1739,6 +1852,7 @@ e1000_setup_copper_link(struct e1000_hw *hw)
     }
 
     if (hw->phy_type == e1000_phy_igp ||
+        hw->phy_type == e1000_phy_igp_3 ||
         hw->phy_type == e1000_phy_igp_2) {
         ret_val = e1000_copper_link_igp_setup(hw);
         if(ret_val)
@@ -1803,7 +1917,7 @@ e1000_setup_copper_link(struct e1000_hw *hw)
 * hw - Struct containing variables accessed by shared code
 ******************************************************************************/
 static int32_t
-e1000_configure_kmrn_for_10_100(struct e1000_hw *hw)
+e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, uint16_t duplex)
 {
     int32_t ret_val = E1000_SUCCESS;
     uint32_t tipg;
@@ -1823,6 +1937,18 @@ e1000_configure_kmrn_for_10_100(struct e1000_hw *hw)
     tipg |= DEFAULT_80003ES2LAN_TIPG_IPGT_10_100;
     E1000_WRITE_REG(hw, TIPG, tipg);
 
+    ret_val = e1000_read_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, &reg_data);
+
+    if (ret_val)
+        return ret_val;
+
+    if (duplex == HALF_DUPLEX)
+        reg_data |= GG82563_KMCR_PASS_FALSE_CARRIER;
+    else
+        reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER;
+
+    ret_val = e1000_write_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data);
+
     return ret_val;
 }
 
@@ -1847,6 +1973,14 @@ e1000_configure_kmrn_for_1000(struct e1000_hw *hw)
     tipg |= DEFAULT_80003ES2LAN_TIPG_IPGT_1000;
     E1000_WRITE_REG(hw, TIPG, tipg);
 
+    ret_val = e1000_read_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, &reg_data);
+
+    if (ret_val)
+        return ret_val;
+
+    reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER;
+    ret_val = e1000_write_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data);
+
     return ret_val;
 }
 
@@ -1869,10 +2003,13 @@ e1000_phy_setup_autoneg(struct e1000_hw *hw)
     if(ret_val)
         return ret_val;
 
-    /* Read the MII 1000Base-T Control Register (Address 9). */
-    ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, &mii_1000t_ctrl_reg);
-    if(ret_val)
-        return ret_val;
+    if (hw->phy_type != e1000_phy_ife) {
+        /* Read the MII 1000Base-T Control Register (Address 9). */
+        ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, &mii_1000t_ctrl_reg);
+        if (ret_val)
+            return ret_val;
+    } else
+        mii_1000t_ctrl_reg=0;
 
     /* Need to parse both autoneg_advertised and fc and set up
      * the appropriate PHY registers.  First we will parse for
@@ -1923,6 +2060,9 @@ e1000_phy_setup_autoneg(struct e1000_hw *hw)
     if(hw->autoneg_advertised & ADVERTISE_1000_FULL) {
         DEBUGOUT("Advertise 1000mb Full duplex\n");
         mii_1000t_ctrl_reg |= CR_1000T_FD_CAPS;
+        if (hw->phy_type == e1000_phy_ife) {
+            DEBUGOUT("e1000_phy_ife is a 10/100 PHY. Gigabit speed is not supported.\n");
+        }
     }
 
     /* Check for a software override of the flow control settings, and
@@ -1984,9 +2124,11 @@ e1000_phy_setup_autoneg(struct e1000_hw *hw)
 
     DEBUGOUT1("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg);
 
-    ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg);
-    if(ret_val)
-        return ret_val;
+    if (hw->phy_type != e1000_phy_ife) {
+        ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg);
+        if (ret_val)
+            return ret_val;
+    }
 
     return E1000_SUCCESS;
 }
@@ -2089,6 +2231,18 @@ e1000_phy_force_speed_duplex(struct e1000_hw *hw)
 
         /* Need to reset the PHY or these changes will be ignored */
         mii_ctrl_reg |= MII_CR_RESET;
+    /* Disable MDI-X support for 10/100 */
+    } else if (hw->phy_type == e1000_phy_ife) {
+        ret_val = e1000_read_phy_reg(hw, IFE_PHY_MDIX_CONTROL, &phy_data);
+        if (ret_val)
+            return ret_val;
+
+        phy_data &= ~IFE_PMC_AUTO_MDIX;
+        phy_data &= ~IFE_PMC_FORCE_MDIX;
+
+        ret_val = e1000_write_phy_reg(hw, IFE_PHY_MDIX_CONTROL, phy_data);
+        if (ret_val)
+            return ret_val;
     } else {
         /* Clear Auto-Crossover to force MDI manually.  IGP requires MDI
          * forced whenever speed or duplex are forced.
@@ -2721,8 +2875,12 @@ e1000_check_for_link(struct e1000_hw *hw)
          */
         if(hw->tbi_compatibility_en) {
             uint16_t speed, duplex;
-            e1000_get_speed_and_duplex(hw, &speed, &duplex);
-            if(speed != SPEED_1000) {
+            ret_val = e1000_get_speed_and_duplex(hw, &speed, &duplex);
+            if (ret_val) {
+                DEBUGOUT("Error getting link speed and duplex\n");
+                return ret_val;
+            }
+            if (speed != SPEED_1000) {
                 /* If link speed is not set to gigabit speed, we do not need
                  * to enable TBI compatibility.
                  */
@@ -2889,7 +3047,13 @@ e1000_get_speed_and_duplex(struct e1000_hw *hw,
         if (*speed == SPEED_1000)
             ret_val = e1000_configure_kmrn_for_1000(hw);
         else
-            ret_val = e1000_configure_kmrn_for_10_100(hw);
+            ret_val = e1000_configure_kmrn_for_10_100(hw, *duplex);
+        if (ret_val)
+            return ret_val;
+    }
+
+    if ((hw->phy_type == e1000_phy_igp_3) && (*speed == SPEED_1000)) {
+        ret_val = e1000_kumeran_lock_loss_workaround(hw);
         if (ret_val)
             return ret_val;
     }
@@ -3079,6 +3243,9 @@ e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask)
 
     DEBUGFUNC("e1000_swfw_sync_acquire");
 
+    if (hw->swfwhw_semaphore_present)
+        return e1000_get_software_flag(hw);
+
     if (!hw->swfw_sync_present)
         return e1000_get_hw_eeprom_semaphore(hw);
 
@@ -3118,6 +3285,11 @@ e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask)
 
     DEBUGFUNC("e1000_swfw_sync_release");
 
+    if (hw->swfwhw_semaphore_present) {
+        e1000_release_software_flag(hw);
+        return;
+    }
+
     if (!hw->swfw_sync_present) {
         e1000_put_hw_eeprom_semaphore(hw);
         return;
@@ -3160,7 +3332,8 @@ e1000_read_phy_reg(struct e1000_hw *hw,
     if (e1000_swfw_sync_acquire(hw, swfw))
         return -E1000_ERR_SWFW_SYNC;
 
-    if((hw->phy_type == e1000_phy_igp ||
+    if ((hw->phy_type == e1000_phy_igp ||
+        hw->phy_type == e1000_phy_igp_3 ||
         hw->phy_type == e1000_phy_igp_2) &&
        (reg_addr > MAX_PHY_MULTI_PAGE_REG)) {
         ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT,
@@ -3299,7 +3472,8 @@ e1000_write_phy_reg(struct e1000_hw *hw,
     if (e1000_swfw_sync_acquire(hw, swfw))
         return -E1000_ERR_SWFW_SYNC;
 
-    if((hw->phy_type == e1000_phy_igp ||
+    if ((hw->phy_type == e1000_phy_igp ||
+        hw->phy_type == e1000_phy_igp_3 ||
         hw->phy_type == e1000_phy_igp_2) &&
        (reg_addr > MAX_PHY_MULTI_PAGE_REG)) {
         ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT,
@@ -3514,7 +3688,7 @@ e1000_phy_hw_reset(struct e1000_hw *hw)
         E1000_WRITE_FLUSH(hw);
 
         if (hw->mac_type >= e1000_82571)
-            msec_delay(10);
+            msec_delay_irq(10);
         e1000_swfw_sync_release(hw, swfw);
     } else {
         /* Read the Extended Device Control Register, assert the PHY_RESET_DIR
@@ -3544,6 +3718,12 @@ e1000_phy_hw_reset(struct e1000_hw *hw)
     ret_val = e1000_get_phy_cfg_done(hw);
     e1000_release_software_semaphore(hw);
 
+        if ((hw->mac_type == e1000_ich8lan) &&
+            (hw->phy_type == e1000_phy_igp_3)) {
+            ret_val = e1000_init_lcd_from_nvm(hw);
+            if (ret_val)
+                return ret_val;
+        }
     return ret_val;
 }
 
@@ -3572,9 +3752,11 @@ e1000_phy_reset(struct e1000_hw *hw)
     case e1000_82541_rev_2:
     case e1000_82571:
     case e1000_82572:
+    case e1000_ich8lan:
         ret_val = e1000_phy_hw_reset(hw);
         if(ret_val)
             return ret_val;
+
         break;
     default:
         ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data);
@@ -3596,12 +3778,121 @@ e1000_phy_reset(struct e1000_hw *hw)
     return E1000_SUCCESS;
 }
 
+/******************************************************************************
+* Work-around for 82566 power-down: on D3 entry-
+* 1) disable gigabit link
+* 2) write VR power-down enable
+* 3) read it back
+* if successful continue, else issue LCD reset and repeat
+*
+* hw - struct containing variables accessed by shared code
+******************************************************************************/
+void
+e1000_phy_powerdown_workaround(struct e1000_hw *hw)
+{
+    int32_t reg;
+    uint16_t phy_data;
+    int32_t retry = 0;
+
+    DEBUGFUNC("e1000_phy_powerdown_workaround");
+
+    if (hw->phy_type != e1000_phy_igp_3)
+        return;
+
+    do {
+        /* Disable link */
+        reg = E1000_READ_REG(hw, PHY_CTRL);
+        E1000_WRITE_REG(hw, PHY_CTRL, reg | E1000_PHY_CTRL_GBE_DISABLE |
+                        E1000_PHY_CTRL_NOND0A_GBE_DISABLE);
+
+        /* Write VR power-down enable */
+        e1000_read_phy_reg(hw, IGP3_VR_CTRL, &phy_data);
+        e1000_write_phy_reg(hw, IGP3_VR_CTRL, phy_data |
+                            IGP3_VR_CTRL_MODE_SHUT);
+
+        /* Read it back and test */
+        e1000_read_phy_reg(hw, IGP3_VR_CTRL, &phy_data);
+        if ((phy_data & IGP3_VR_CTRL_MODE_SHUT) || retry)
+            break;
+
+        /* Issue PHY reset and repeat at most one more time */
+        reg = E1000_READ_REG(hw, CTRL);
+        E1000_WRITE_REG(hw, CTRL, reg | E1000_CTRL_PHY_RST);
+        retry++;
+    } while (retry);
+
+    return;
+
+}
+
+/******************************************************************************
+* Work-around for 82566 Kumeran PCS lock loss:
+* On link status change (i.e. PCI reset, speed change) and link is up and
+* speed is gigabit-
+* 0) if workaround is optionally disabled do nothing
+* 1) wait 1ms for Kumeran link to come up
+* 2) check Kumeran Diagnostic register PCS lock loss bit
+* 3) if not set the link is locked (all is good), otherwise...
+* 4) reset the PHY
+* 5) repeat up to 10 times
+* Note: this is only called for IGP3 copper when speed is 1gb.
+*
+* hw - struct containing variables accessed by shared code
+******************************************************************************/
+int32_t
+e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw)
+{
+    int32_t ret_val;
+    int32_t reg;
+    int32_t cnt;
+    uint16_t phy_data;
+
+    if (hw->kmrn_lock_loss_workaround_disabled)
+        return E1000_SUCCESS;
+
+    /* Make sure link is up before proceeding. If not just return.
+     * Attempting this while link is negotiating fouls up link
+     * stability */
+    ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data);
+    ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data);
+
+    if (phy_data & MII_SR_LINK_STATUS) {
+        for (cnt = 0; cnt < 10; cnt++) {
+            /* read once to clear */
+            ret_val = e1000_read_phy_reg(hw, IGP3_KMRN_DIAG, &phy_data);
+            if (ret_val)
+                return ret_val;
+            /* and again to get new status */
+            ret_val = e1000_read_phy_reg(hw, IGP3_KMRN_DIAG, &phy_data);
+            if (ret_val)
+                return ret_val;
+
+            /* check for PCS lock */
+            if (!(phy_data & IGP3_KMRN_DIAG_PCS_LOCK_LOSS))
+                return E1000_SUCCESS;
+
+            /* Issue PHY reset */
+            e1000_phy_hw_reset(hw);
+            msec_delay_irq(5);
+        }
+        /* Disable GigE link negotiation */
+        reg = E1000_READ_REG(hw, PHY_CTRL);
+        E1000_WRITE_REG(hw, PHY_CTRL, reg | E1000_PHY_CTRL_GBE_DISABLE |
+                        E1000_PHY_CTRL_NOND0A_GBE_DISABLE);
+
+        /* unable to acquire PCS lock */
+        return E1000_ERR_PHY;
+    }
+
+    return E1000_SUCCESS;
+}
+
 /******************************************************************************
 * Probes the expected PHY address for known PHY IDs
 *
 * hw - Struct containing variables accessed by shared code
 ******************************************************************************/
-static int32_t
+int32_t
 e1000_detect_gig_phy(struct e1000_hw *hw)
 {
     int32_t phy_init_status, ret_val;
@@ -3613,8 +3904,8 @@ e1000_detect_gig_phy(struct e1000_hw *hw)
     /* The 82571 firmware may still be configuring the PHY.  In this
      * case, we cannot access the PHY until the configuration is done.  So
      * we explicitly set the PHY values. */
-    if(hw->mac_type == e1000_82571 ||
-       hw->mac_type == e1000_82572) {
+    if (hw->mac_type == e1000_82571 ||
+        hw->mac_type == e1000_82572) {
         hw->phy_id = IGP01E1000_I_PHY_ID;
         hw->phy_type = e1000_phy_igp_2;
         return E1000_SUCCESS;
@@ -3631,7 +3922,7 @@ e1000_detect_gig_phy(struct e1000_hw *hw)
 
     /* Read the PHY ID Registers to identify which PHY is onboard. */
     ret_val = e1000_read_phy_reg(hw, PHY_ID1, &phy_id_high);
-    if(ret_val)
+    if (ret_val)
         return ret_val;
 
     hw->phy_id = (uint32_t) (phy_id_high << 16);
@@ -3669,6 +3960,12 @@ e1000_detect_gig_phy(struct e1000_hw *hw)
     case e1000_80003es2lan:
         if (hw->phy_id == GG82563_E_PHY_ID) match = TRUE;
         break;
+    case e1000_ich8lan:
+        if (hw->phy_id == IGP03E1000_E_PHY_ID) match = TRUE;
+        if (hw->phy_id == IFE_E_PHY_ID) match = TRUE;
+        if (hw->phy_id == IFE_PLUS_E_PHY_ID) match = TRUE;
+        if (hw->phy_id == IFE_C_E_PHY_ID) match = TRUE;
+        break;
     default:
         DEBUGOUT1("Invalid MAC type %d\n", hw->mac_type);
         return -E1000_ERR_CONFIG;
@@ -3783,6 +4080,53 @@ e1000_phy_igp_get_info(struct e1000_hw *hw,
     return E1000_SUCCESS;
 }
 
+/******************************************************************************
+* Get PHY information from various PHY registers for ife PHY only.
+*
+* hw - Struct containing variables accessed by shared code
+* phy_info - PHY information structure
+******************************************************************************/
+int32_t
+e1000_phy_ife_get_info(struct e1000_hw *hw,
+                       struct e1000_phy_info *phy_info)
+{
+    int32_t ret_val;
+    uint16_t phy_data, polarity;
+
+    DEBUGFUNC("e1000_phy_ife_get_info");
+
+    phy_info->downshift = (e1000_downshift)hw->speed_downgraded;
+    phy_info->extended_10bt_distance = e1000_10bt_ext_dist_enable_normal;
+
+    ret_val = e1000_read_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL, &phy_data);
+    if (ret_val)
+        return ret_val;
+    phy_info->polarity_correction =
+                        (phy_data & IFE_PSC_AUTO_POLARITY_DISABLE) >>
+                        IFE_PSC_AUTO_POLARITY_DISABLE_SHIFT;
+
+    if (phy_info->polarity_correction == e1000_polarity_reversal_enabled) {
+        ret_val = e1000_check_polarity(hw, &polarity);
+        if (ret_val)
+            return ret_val;
+    } else {
+        /* Polarity is forced. */
+        polarity = (phy_data & IFE_PSC_FORCE_POLARITY) >>
+                       IFE_PSC_FORCE_POLARITY_SHIFT;
+    }
+    phy_info->cable_polarity = polarity;
+
+    ret_val = e1000_read_phy_reg(hw, IFE_PHY_MDIX_CONTROL, &phy_data);
+    if (ret_val)
+        return ret_val;
+
+    phy_info->mdix_mode =
+                     (phy_data & (IFE_PMC_AUTO_MDIX | IFE_PMC_FORCE_MDIX)) >>
+                     IFE_PMC_MDIX_MODE_SHIFT;
+
+    return E1000_SUCCESS;
+}
+
 /******************************************************************************
 * Get PHY information from various PHY registers fot m88 PHY only.
 *
@@ -3898,9 +4242,12 @@ e1000_phy_get_info(struct e1000_hw *hw,
         return -E1000_ERR_CONFIG;
     }
 
-    if(hw->phy_type == e1000_phy_igp ||
+    if (hw->phy_type == e1000_phy_igp ||
+        hw->phy_type == e1000_phy_igp_3 ||
         hw->phy_type == e1000_phy_igp_2)
         return e1000_phy_igp_get_info(hw, phy_info);
+    else if (hw->phy_type == e1000_phy_ife)
+        return e1000_phy_ife_get_info(hw, phy_info);
     else
         return e1000_phy_m88_get_info(hw, phy_info);
 }
@@ -4049,6 +4396,35 @@ e1000_init_eeprom_params(struct e1000_hw *hw)
         eeprom->use_eerd = TRUE;
         eeprom->use_eewr = FALSE;
         break;
+    case e1000_ich8lan:
+    {
+        int32_t  i = 0;
+        uint32_t flash_size = E1000_READ_ICH8_REG(hw, ICH8_FLASH_GFPREG);
+
+        eeprom->type = e1000_eeprom_ich8;
+        eeprom->use_eerd = FALSE;
+        eeprom->use_eewr = FALSE;
+        eeprom->word_size = E1000_SHADOW_RAM_WORDS;
+
+        /* Zero the shadow RAM structure. But don't load it from NVM
+         * so as to save time for driver init */
+        if (hw->eeprom_shadow_ram != NULL) {
+            for (i = 0; i < E1000_SHADOW_RAM_WORDS; i++) {
+                hw->eeprom_shadow_ram[i].modified = FALSE;
+                hw->eeprom_shadow_ram[i].eeprom_word = 0xFFFF;
+            }
+        }
+
+        hw->flash_base_addr = (flash_size & ICH8_GFPREG_BASE_MASK) *
+                              ICH8_FLASH_SECTOR_SIZE;
+
+        hw->flash_bank_size = ((flash_size >> 16) & ICH8_GFPREG_BASE_MASK) + 1;
+        hw->flash_bank_size -= (flash_size & ICH8_GFPREG_BASE_MASK);
+        hw->flash_bank_size *= ICH8_FLASH_SECTOR_SIZE;
+        hw->flash_bank_size /= 2 * sizeof(uint16_t);
+
+        break;
+    }
     default:
         break;
     }
@@ -4469,7 +4845,10 @@ e1000_read_eeprom(struct e1000_hw *hw,
         return ret_val;
     }
 
-    if(eeprom->type == e1000_eeprom_spi) {
+    if (eeprom->type == e1000_eeprom_ich8)
+        return e1000_read_eeprom_ich8(hw, offset, words, data);
+
+    if (eeprom->type == e1000_eeprom_spi) {
         uint16_t word_in;
         uint8_t read_opcode = EEPROM_READ_OPCODE_SPI;
 
@@ -4636,7 +5015,10 @@ e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw)
 
     DEBUGFUNC("e1000_is_onboard_nvm_eeprom");
 
-    if(hw->mac_type == e1000_82573) {
+    if (hw->mac_type == e1000_ich8lan)
+        return FALSE;
+
+    if (hw->mac_type == e1000_82573) {
         eecd = E1000_READ_REG(hw, EECD);
 
         /* Isolate bits 15 & 16 */
@@ -4686,8 +5068,22 @@ e1000_validate_eeprom_checksum(struct e1000_hw *hw)
         }
     }
 
-    for(i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) {
-        if(e1000_read_eeprom(hw, i, 1, &eeprom_data) < 0) {
+    if (hw->mac_type == e1000_ich8lan) {
+        /* Drivers must allocate the shadow ram structure for the
+         * EEPROM checksum to be updated.  Otherwise, this bit as well
+         * as the checksum must both be set correctly for this
+         * validation to pass.
+         */
+        e1000_read_eeprom(hw, 0x19, 1, &eeprom_data);
+        if ((eeprom_data & 0x40) == 0) {
+            eeprom_data |= 0x40;
+            e1000_write_eeprom(hw, 0x19, 1, &eeprom_data);
+            e1000_update_eeprom_checksum(hw);
+        }
+    }
+
+    for (i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) {
+        if (e1000_read_eeprom(hw, i, 1, &eeprom_data) < 0) {
             DEBUGOUT("EEPROM Read Error\n");
             return -E1000_ERR_EEPROM;
         }
@@ -4713,6 +5109,7 @@ e1000_validate_eeprom_checksum(struct e1000_hw *hw)
 int32_t
 e1000_update_eeprom_checksum(struct e1000_hw *hw)
 {
+    uint32_t ctrl_ext;
     uint16_t checksum = 0;
     uint16_t i, eeprom_data;
 
@@ -4731,6 +5128,14 @@ e1000_update_eeprom_checksum(struct e1000_hw *hw)
         return -E1000_ERR_EEPROM;
     } else if (hw->eeprom.type == e1000_eeprom_flash) {
         e1000_commit_shadow_ram(hw);
+    } else if (hw->eeprom.type == e1000_eeprom_ich8) {
+        e1000_commit_shadow_ram(hw);
+        /* Reload the EEPROM, or else modifications will not appear
+         * until after next adapter reset. */
+        ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);
+        ctrl_ext |= E1000_CTRL_EXT_EE_RST;
+        E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext);
+        msec_delay(10);
     }
     return E1000_SUCCESS;
 }
@@ -4770,6 +5175,9 @@ e1000_write_eeprom(struct e1000_hw *hw,
     if(eeprom->use_eewr == TRUE)
         return e1000_write_eeprom_eewr(hw, offset, words, data);
 
+    if (eeprom->type == e1000_eeprom_ich8)
+        return e1000_write_eeprom_ich8(hw, offset, words, data);
+
     /* Prepare the EEPROM for writing  */
     if (e1000_acquire_eeprom(hw) != E1000_SUCCESS)
         return -E1000_ERR_EEPROM;
@@ -4957,11 +5365,17 @@ e1000_commit_shadow_ram(struct e1000_hw *hw)
     uint32_t flop = 0;
     uint32_t i = 0;
     int32_t error = E1000_SUCCESS;
-
-    /* The flop register will be used to determine if flash type is STM */
-    flop = E1000_READ_REG(hw, FLOP);
+    uint32_t old_bank_offset = 0;
+    uint32_t new_bank_offset = 0;
+    uint32_t sector_retries = 0;
+    uint8_t low_byte = 0;
+    uint8_t high_byte = 0;
+    uint8_t temp_byte = 0;
+    boolean_t sector_write_failed = FALSE;
 
     if (hw->mac_type == e1000_82573) {
+        /* The flop register will be used to determine if flash type is STM */
+        flop = E1000_READ_REG(hw, FLOP);
         for (i=0; i < attempts; i++) {
             eecd = E1000_READ_REG(hw, EECD);
             if ((eecd & E1000_EECD_FLUPD) == 0) {
@@ -4995,6 +5409,106 @@ e1000_commit_shadow_ram(struct e1000_hw *hw)
         }
     }
 
+    if (hw->mac_type == e1000_ich8lan && hw->eeprom_shadow_ram != NULL) {
+        /* We're writing to the opposite bank so if we're on bank 1,
+         * write to bank 0 etc.  We also need to erase the segment that
+         * is going to be written */
+        if (!(E1000_READ_REG(hw, EECD) & E1000_EECD_SEC1VAL)) {
+            new_bank_offset = hw->flash_bank_size * 2;
+            old_bank_offset = 0;
+            e1000_erase_ich8_4k_segment(hw, 1);
+        } else {
+            old_bank_offset = hw->flash_bank_size * 2;
+            new_bank_offset = 0;
+            e1000_erase_ich8_4k_segment(hw, 0);
+        }
+
+        do {
+            sector_write_failed = FALSE;
+            /* Loop for every byte in the shadow RAM,
+             * which is in units of words. */
+            for (i = 0; i < E1000_SHADOW_RAM_WORDS; i++) {
+                /* Determine whether to write the value stored
+                 * in the other NVM bank or a modified value stored
+                 * in the shadow RAM */
+                if (hw->eeprom_shadow_ram[i].modified == TRUE) {
+                    low_byte = (uint8_t)hw->eeprom_shadow_ram[i].eeprom_word;
+                    e1000_read_ich8_byte(hw, (i << 1) + old_bank_offset,
+                                         &temp_byte);
+                    udelay(100);
+                    error = e1000_verify_write_ich8_byte(hw,
+                                                 (i << 1) + new_bank_offset,
+                                                 low_byte);
+                    if (error != E1000_SUCCESS)
+                        sector_write_failed = TRUE;
+                    high_byte =
+                        (uint8_t)(hw->eeprom_shadow_ram[i].eeprom_word >> 8);
+                    e1000_read_ich8_byte(hw, (i << 1) + old_bank_offset + 1,
+                                         &temp_byte);
+                    udelay(100);
+                } else {
+                    e1000_read_ich8_byte(hw, (i << 1) + old_bank_offset,
+                                         &low_byte);
+                    udelay(100);
+                    error = e1000_verify_write_ich8_byte(hw,
+                                 (i << 1) + new_bank_offset, low_byte);
+                    if (error != E1000_SUCCESS)
+                        sector_write_failed = TRUE;
+                    e1000_read_ich8_byte(hw, (i << 1) + old_bank_offset + 1,
+                                         &high_byte);
+                }
+
+                /* If the word is 0x13, then make sure the signature bits
+                 * (15:14) are 11b until the commit has completed.
+                 * This will allow us to write 10b which indicates the
+                 * signature is valid.  We want to do this after the write
+                 * has completed so that we don't mark the segment valid
+                 * while the write is still in progress */
+                if (i == E1000_ICH8_NVM_SIG_WORD)
+                    high_byte = E1000_ICH8_NVM_SIG_MASK | high_byte;
+
+                error = e1000_verify_write_ich8_byte(hw,
+                             (i << 1) + new_bank_offset + 1, high_byte);
+                if (error != E1000_SUCCESS)
+                    sector_write_failed = TRUE;
+
+                if (sector_write_failed == FALSE) {
+                    /* Clear the now not used entry in the cache */
+                    hw->eeprom_shadow_ram[i].modified = FALSE;
+                    hw->eeprom_shadow_ram[i].eeprom_word = 0xFFFF;
+                }
+            }
+
+            /* Don't bother writing the segment valid bits if sector
+             * programming failed. */
+            if (sector_write_failed == FALSE) {
+                /* Finally validate the new segment by setting bit 15:14
+                 * to 10b in word 0x13 , this can be done without an
+                 * erase as well since these bits are 11 to start with
+                 * and we need to change bit 14 to 0b */
+                e1000_read_ich8_byte(hw,
+                    E1000_ICH8_NVM_SIG_WORD * 2 + 1 + new_bank_offset,
+                    &high_byte);
+                high_byte &= 0xBF;
+                error = e1000_verify_write_ich8_byte(hw,
+                            E1000_ICH8_NVM_SIG_WORD * 2 + 1 + new_bank_offset,
+                            high_byte);
+                if (error != E1000_SUCCESS)
+                    sector_write_failed = TRUE;
+
+                /* And invalidate the previously valid segment by setting
+                 * its signature word (0x13) high_byte to 0b. This can be
+                 * done without an erase because flash erase sets all bits
+                 * to 1's. We can write 1's to 0's without an erase */
+                error = e1000_verify_write_ich8_byte(hw,
+                            E1000_ICH8_NVM_SIG_WORD * 2 + 1 + old_bank_offset,
+                            0);
+                if (error != E1000_SUCCESS)
+                    sector_write_failed = TRUE;
+            }
+        } while (++sector_retries < 10 && sector_write_failed == TRUE);
+    }
+
     return error;
 }
 
@@ -5102,15 +5616,19 @@ e1000_init_rx_addrs(struct e1000_hw *hw)
      * the other port. */
     if ((hw->mac_type == e1000_82571) && (hw->laa_is_present == TRUE))
         rar_num -= 1;
+    if (hw->mac_type == e1000_ich8lan)
+        rar_num = E1000_RAR_ENTRIES_ICH8LAN;
+
     /* Zero out the other 15 receive addresses. */
     DEBUGOUT("Clearing RAR[1-15]\n");
     for(i = 1; i < rar_num; i++) {
         E1000_WRITE_REG_ARRAY(hw, RA, (i << 1), 0);
+        E1000_WRITE_FLUSH(hw);
         E1000_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0);
+        E1000_WRITE_FLUSH(hw);
     }
 }
 
-#if 0
 /******************************************************************************
  * Updates the MAC's list of multicast addresses.
  *
@@ -5145,6 +5663,8 @@ e1000_mc_addr_list_update(struct e1000_hw *hw,
     /* Clear RAR[1-15] */
     DEBUGOUT(" Clearing RAR[1-15]\n");
     num_rar_entry = E1000_RAR_ENTRIES;
+    if (hw->mac_type == e1000_ich8lan)
+        num_rar_entry = E1000_RAR_ENTRIES_ICH8LAN;
     /* Reserve a spot for the Locally Administered Address to work around
      * an 82571 issue in which a reset on one port will reload the MAC on
      * the other port. */
@@ -5153,14 +5673,19 @@ e1000_mc_addr_list_update(struct e1000_hw *hw,
 
     for(i = rar_used_count; i < num_rar_entry; i++) {
         E1000_WRITE_REG_ARRAY(hw, RA, (i << 1), 0);
+        E1000_WRITE_FLUSH(hw);
         E1000_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0);
+        E1000_WRITE_FLUSH(hw);
     }
 
     /* Clear the MTA */
     DEBUGOUT(" Clearing MTA\n");
     num_mta_entry = E1000_NUM_MTA_REGISTERS;
+    if (hw->mac_type == e1000_ich8lan)
+        num_mta_entry = E1000_NUM_MTA_REGISTERS_ICH8LAN;
     for(i = 0; i < num_mta_entry; i++) {
         E1000_WRITE_REG_ARRAY(hw, MTA, i, 0);
+        E1000_WRITE_FLUSH(hw);
     }
 
     /* Add the new addresses */
@@ -5194,7 +5719,6 @@ e1000_mc_addr_list_update(struct e1000_hw *hw,
     }
     DEBUGOUT("MC Update Complete\n");
 }
-#endif  /*  0  */
 
 /******************************************************************************
  * Hashes an address to determine its location in the multicast table
@@ -5217,24 +5741,46 @@ e1000_hash_mc_addr(struct e1000_hw *hw,
      * LSB                 MSB
      */
     case 0:
-        /* [47:36] i.e. 0x563 for above example address */
-        hash_value = ((mc_addr[4] >> 4) | (((uint16_t) mc_addr[5]) << 4));
+        if (hw->mac_type == e1000_ich8lan) {
+            /* [47:38] i.e. 0x158 for above example address */
+            hash_value = ((mc_addr[4] >> 6) | (((uint16_t) mc_addr[5]) << 2));
+        } else {
+            /* [47:36] i.e. 0x563 for above example address */
+            hash_value = ((mc_addr[4] >> 4) | (((uint16_t) mc_addr[5]) << 4));
+        }
         break;
     case 1:
-        /* [46:35] i.e. 0xAC6 for above example address */
-        hash_value = ((mc_addr[4] >> 3) | (((uint16_t) mc_addr[5]) << 5));
+        if (hw->mac_type == e1000_ich8lan) {
+            /* [46:37] i.e. 0x2B1 for above example address */
+            hash_value = ((mc_addr[4] >> 5) | (((uint16_t) mc_addr[5]) << 3));
+        } else {
+            /* [46:35] i.e. 0xAC6 for above example address */
+            hash_value = ((mc_addr[4] >> 3) | (((uint16_t) mc_addr[5]) << 5));
+        }
         break;
     case 2:
-        /* [45:34] i.e. 0x5D8 for above example address */
-        hash_value = ((mc_addr[4] >> 2) | (((uint16_t) mc_addr[5]) << 6));
+        if (hw->mac_type == e1000_ich8lan) {
+            /*[45:36] i.e. 0x163 for above example address */
+            hash_value = ((mc_addr[4] >> 4) | (((uint16_t) mc_addr[5]) << 4));
+        } else {
+            /* [45:34] i.e. 0x5D8 for above example address */
+            hash_value = ((mc_addr[4] >> 2) | (((uint16_t) mc_addr[5]) << 6));
+        }
         break;
     case 3:
-        /* [43:32] i.e. 0x634 for above example address */
-        hash_value = ((mc_addr[4]) | (((uint16_t) mc_addr[5]) << 8));
+        if (hw->mac_type == e1000_ich8lan) {
+            /* [43:34] i.e. 0x18D for above example address */
+            hash_value = ((mc_addr[4] >> 2) | (((uint16_t) mc_addr[5]) << 6));
+        } else {
+            /* [43:32] i.e. 0x634 for above example address */
+            hash_value = ((mc_addr[4]) | (((uint16_t) mc_addr[5]) << 8));
+        }
         break;
     }
 
     hash_value &= 0xFFF;
+    if (hw->mac_type == e1000_ich8lan)
+        hash_value &= 0x3FF;
 
     return hash_value;
 }
@@ -5262,6 +5808,8 @@ e1000_mta_set(struct e1000_hw *hw,
      * register are determined by the lower 5 bits of the value.
      */
     hash_reg = (hash_value >> 5) & 0x7F;
+    if (hw->mac_type == e1000_ich8lan)
+        hash_reg &= 0x1F;
     hash_bit = hash_value & 0x1F;
 
     mta = E1000_READ_REG_ARRAY(hw, MTA, hash_reg);
@@ -5275,9 +5823,12 @@ e1000_mta_set(struct e1000_hw *hw,
     if((hw->mac_type == e1000_82544) && ((hash_reg & 0x1) == 1)) {
         temp = E1000_READ_REG_ARRAY(hw, MTA, (hash_reg - 1));
         E1000_WRITE_REG_ARRAY(hw, MTA, hash_reg, mta);
+        E1000_WRITE_FLUSH(hw);
         E1000_WRITE_REG_ARRAY(hw, MTA, (hash_reg - 1), temp);
+        E1000_WRITE_FLUSH(hw);
     } else {
         E1000_WRITE_REG_ARRAY(hw, MTA, hash_reg, mta);
+        E1000_WRITE_FLUSH(hw);
     }
 }
 
@@ -5334,7 +5885,9 @@ e1000_rar_set(struct e1000_hw *hw,
     }
 
     E1000_WRITE_REG_ARRAY(hw, RA, (index << 1), rar_low);
+    E1000_WRITE_FLUSH(hw);
     E1000_WRITE_REG_ARRAY(hw, RA, ((index << 1) + 1), rar_high);
+    E1000_WRITE_FLUSH(hw);
 }
 
 /******************************************************************************
@@ -5351,12 +5904,18 @@ e1000_write_vfta(struct e1000_hw *hw,
 {
     uint32_t temp;
 
-    if((hw->mac_type == e1000_82544) && ((offset & 0x1) == 1)) {
+    if (hw->mac_type == e1000_ich8lan)
+        return;
+
+    if ((hw->mac_type == e1000_82544) && ((offset & 0x1) == 1)) {
         temp = E1000_READ_REG_ARRAY(hw, VFTA, (offset - 1));
         E1000_WRITE_REG_ARRAY(hw, VFTA, offset, value);
+        E1000_WRITE_FLUSH(hw);
         E1000_WRITE_REG_ARRAY(hw, VFTA, (offset - 1), temp);
+        E1000_WRITE_FLUSH(hw);
     } else {
         E1000_WRITE_REG_ARRAY(hw, VFTA, offset, value);
+        E1000_WRITE_FLUSH(hw);
     }
 }
 
@@ -5373,6 +5932,9 @@ e1000_clear_vfta(struct e1000_hw *hw)
     uint32_t vfta_offset = 0;
     uint32_t vfta_bit_in_reg = 0;
 
+    if (hw->mac_type == e1000_ich8lan)
+        return;
+
     if (hw->mac_type == e1000_82573) {
         if (hw->mng_cookie.vlan_id != 0) {
             /* The VFTA is a 4096b bit-field, each identifying a single VLAN
@@ -5392,6 +5954,7 @@ e1000_clear_vfta(struct e1000_hw *hw)
          * manageability unit */
         vfta_value = (offset == vfta_offset) ? vfta_bit_in_reg : 0;
         E1000_WRITE_REG_ARRAY(hw, VFTA, offset, vfta_value);
+        E1000_WRITE_FLUSH(hw);
     }
 }
 
@@ -5421,9 +5984,18 @@ e1000_id_led_init(struct e1000_hw * hw)
         DEBUGOUT("EEPROM Read Error\n");
         return -E1000_ERR_EEPROM;
     }
-    if((eeprom_data== ID_LED_RESERVED_0000) ||
-       (eeprom_data == ID_LED_RESERVED_FFFF)) eeprom_data = ID_LED_DEFAULT;
-    for(i = 0; i < 4; i++) {
+
+    if ((hw->mac_type == e1000_82573) &&
+        (eeprom_data == ID_LED_RESERVED_82573))
+        eeprom_data = ID_LED_DEFAULT_82573;
+    else if ((eeprom_data == ID_LED_RESERVED_0000) ||
+            (eeprom_data == ID_LED_RESERVED_FFFF)) {
+        if (hw->mac_type == e1000_ich8lan)
+            eeprom_data = ID_LED_DEFAULT_ICH8LAN;
+        else
+            eeprom_data = ID_LED_DEFAULT;
+    }
+    for (i = 0; i < 4; i++) {
         temp = (eeprom_data >> (i << 2)) & led_mask;
         switch(temp) {
         case ID_LED_ON1_DEF2:
@@ -5518,6 +6090,44 @@ e1000_setup_led(struct e1000_hw *hw)
     return E1000_SUCCESS;
 }
 
+/******************************************************************************
+ * Used on 82571 and later Si that has LED blink bits.
+ * Callers must use their own timer and should have already called
+ * e1000_id_led_init()
+ * Call e1000_cleanup led() to stop blinking
+ *
+ * hw - Struct containing variables accessed by shared code
+ *****************************************************************************/
+int32_t
+e1000_blink_led_start(struct e1000_hw *hw)
+{
+    int16_t  i;
+    uint32_t ledctl_blink = 0;
+
+    DEBUGFUNC("e1000_id_led_blink_on");
+
+    if (hw->mac_type < e1000_82571) {
+        /* Nothing to do */
+        return E1000_SUCCESS;
+    }
+    if (hw->media_type == e1000_media_type_fiber) {
+        /* always blink LED0 for PCI-E fiber */
+        ledctl_blink = E1000_LEDCTL_LED0_BLINK |
+                     (E1000_LEDCTL_MODE_LED_ON << E1000_LEDCTL_LED0_MODE_SHIFT);
+    } else {
+        /* set the blink bit for each LED that's "on" (0x0E) in ledctl_mode2 */
+        ledctl_blink = hw->ledctl_mode2;
+        for (i=0; i < 4; i++)
+            if (((hw->ledctl_mode2 >> (i * 8)) & 0xFF) ==
+                E1000_LEDCTL_MODE_LED_ON)
+                ledctl_blink |= (E1000_LEDCTL_LED0_BLINK << (i * 8));
+    }
+
+    E1000_WRITE_REG(hw, LEDCTL, ledctl_blink);
+
+    return E1000_SUCCESS;
+}
+
 /******************************************************************************
  * Restores the saved state of the SW controlable LED.
  *
@@ -5548,6 +6158,10 @@ e1000_cleanup_led(struct e1000_hw *hw)
             return ret_val;
         /* Fall Through */
     default:
+        if (hw->phy_type == e1000_phy_ife) {
+            e1000_write_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL_LED, 0);
+            break;
+        }
         /* Restore LEDCTL settings */
         E1000_WRITE_REG(hw, LEDCTL, hw->ledctl_default);
         break;
@@ -5592,7 +6206,10 @@ e1000_led_on(struct e1000_hw *hw)
             /* Clear SW Defineable Pin 0 to turn on the LED */
             ctrl &= ~E1000_CTRL_SWDPIN0;
             ctrl |= E1000_CTRL_SWDPIO0;
-        } else if(hw->media_type == e1000_media_type_copper) {
+        } else if (hw->phy_type == e1000_phy_ife) {
+            e1000_write_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL_LED,
+                 (IFE_PSCL_PROBE_MODE | IFE_PSCL_PROBE_LEDS_ON));
+        } else if (hw->media_type == e1000_media_type_copper) {
             E1000_WRITE_REG(hw, LEDCTL, hw->ledctl_mode2);
             return E1000_SUCCESS;
         }
@@ -5640,7 +6257,10 @@ e1000_led_off(struct e1000_hw *hw)
             /* Set SW Defineable Pin 0 to turn off the LED */
             ctrl |= E1000_CTRL_SWDPIN0;
             ctrl |= E1000_CTRL_SWDPIO0;
-        } else if(hw->media_type == e1000_media_type_copper) {
+        } else if (hw->phy_type == e1000_phy_ife) {
+            e1000_write_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL_LED,
+                 (IFE_PSCL_PROBE_MODE | IFE_PSCL_PROBE_LEDS_OFF));
+        } else if (hw->media_type == e1000_media_type_copper) {
             E1000_WRITE_REG(hw, LEDCTL, hw->ledctl_mode1);
             return E1000_SUCCESS;
         }
@@ -5678,12 +6298,16 @@ e1000_clear_hw_cntrs(struct e1000_hw *hw)
     temp = E1000_READ_REG(hw, XOFFRXC);
     temp = E1000_READ_REG(hw, XOFFTXC);
     temp = E1000_READ_REG(hw, FCRUC);
+
+    if (hw->mac_type != e1000_ich8lan) {
     temp = E1000_READ_REG(hw, PRC64);
     temp = E1000_READ_REG(hw, PRC127);
     temp = E1000_READ_REG(hw, PRC255);
     temp = E1000_READ_REG(hw, PRC511);
     temp = E1000_READ_REG(hw, PRC1023);
     temp = E1000_READ_REG(hw, PRC1522);
+    }
+
     temp = E1000_READ_REG(hw, GPRC);
     temp = E1000_READ_REG(hw, BPRC);
     temp = E1000_READ_REG(hw, MPRC);
@@ -5703,12 +6327,16 @@ e1000_clear_hw_cntrs(struct e1000_hw *hw)
     temp = E1000_READ_REG(hw, TOTH);
     temp = E1000_READ_REG(hw, TPR);
     temp = E1000_READ_REG(hw, TPT);
+
+    if (hw->mac_type != e1000_ich8lan) {
     temp = E1000_READ_REG(hw, PTC64);
     temp = E1000_READ_REG(hw, PTC127);
     temp = E1000_READ_REG(hw, PTC255);
     temp = E1000_READ_REG(hw, PTC511);
     temp = E1000_READ_REG(hw, PTC1023);
     temp = E1000_READ_REG(hw, PTC1522);
+    }
+
     temp = E1000_READ_REG(hw, MPTC);
     temp = E1000_READ_REG(hw, BPTC);
 
@@ -5731,6 +6359,9 @@ e1000_clear_hw_cntrs(struct e1000_hw *hw)
 
     temp = E1000_READ_REG(hw, IAC);
     temp = E1000_READ_REG(hw, ICRXOC);
+
+    if (hw->mac_type == e1000_ich8lan) return;
+
     temp = E1000_READ_REG(hw, ICRXPTC);
     temp = E1000_READ_REG(hw, ICRXATC);
     temp = E1000_READ_REG(hw, ICTXPTC);
@@ -5911,6 +6542,7 @@ e1000_get_bus_info(struct e1000_hw *hw)
         hw->bus_width = e1000_bus_width_pciex_1;
         break;
     case e1000_82571:
+    case e1000_ich8lan:
     case e1000_80003es2lan:
         hw->bus_type = e1000_bus_type_pci_express;
         hw->bus_speed = e1000_bus_speed_2500;
@@ -5948,8 +6580,6 @@ e1000_get_bus_info(struct e1000_hw *hw)
         break;
     }
 }
-
-#if 0
 /******************************************************************************
  * Reads a value from one of the devices registers using port I/O (as opposed
  * memory mapped I/O). Only 82544 and newer devices support port I/O.
@@ -5967,7 +6597,6 @@ e1000_read_reg_io(struct e1000_hw *hw,
     e1000_io_write(hw, io_addr, offset);
     return e1000_io_read(hw, io_data);
 }
-#endif  /*  0  */
 
 /******************************************************************************
  * Writes a value to one of the devices registers using port I/O (as opposed to
@@ -6012,8 +6641,6 @@ e1000_get_cable_length(struct e1000_hw *hw,
 {
     int32_t ret_val;
     uint16_t agc_value = 0;
-    uint16_t cur_agc, min_agc = IGP01E1000_AGC_LENGTH_TABLE_SIZE;
-    uint16_t max_agc = 0;
     uint16_t i, phy_data;
     uint16_t cable_length;
 
@@ -6086,6 +6713,8 @@ e1000_get_cable_length(struct e1000_hw *hw,
             break;
         }
     } else if(hw->phy_type == e1000_phy_igp) { /* For IGP PHY */
+        uint16_t cur_agc_value;
+        uint16_t min_agc_value = IGP01E1000_AGC_LENGTH_TABLE_SIZE;
         uint16_t agc_reg_array[IGP01E1000_PHY_CHANNEL_NUM] =
                                                          {IGP01E1000_PHY_AGC_A,
                                                           IGP01E1000_PHY_AGC_B,
@@ -6098,23 +6727,23 @@ e1000_get_cable_length(struct e1000_hw *hw,
             if(ret_val)
                 return ret_val;
 
-            cur_agc = phy_data >> IGP01E1000_AGC_LENGTH_SHIFT;
+            cur_agc_value = phy_data >> IGP01E1000_AGC_LENGTH_SHIFT;
 
-            /* Array bound check. */
-            if((cur_agc >= IGP01E1000_AGC_LENGTH_TABLE_SIZE - 1) ||
-               (cur_agc == 0))
+            /* Value bound check. */
+            if ((cur_agc_value >= IGP01E1000_AGC_LENGTH_TABLE_SIZE - 1) ||
+                (cur_agc_value == 0))
                 return -E1000_ERR_PHY;
 
-            agc_value += cur_agc;
+            agc_value += cur_agc_value;
 
             /* Update minimal AGC value. */
-            if(min_agc > cur_agc)
-                min_agc = cur_agc;
+            if (min_agc_value > cur_agc_value)
+                min_agc_value = cur_agc_value;
         }
 
         /* Remove the minimal AGC result for length < 50m */
-        if(agc_value < IGP01E1000_PHY_CHANNEL_NUM * e1000_igp_cable_length_50) {
-            agc_value -= min_agc;
+        if (agc_value < IGP01E1000_PHY_CHANNEL_NUM * e1000_igp_cable_length_50) {
+            agc_value -= min_agc_value;
 
             /* Get the average length of the remaining 3 channels */
             agc_value /= (IGP01E1000_PHY_CHANNEL_NUM - 1);
@@ -6130,7 +6759,10 @@ e1000_get_cable_length(struct e1000_hw *hw,
                        IGP01E1000_AGC_RANGE) : 0;
         *max_length = e1000_igp_cable_length_table[agc_value] +
                       IGP01E1000_AGC_RANGE;
-    } else if (hw->phy_type == e1000_phy_igp_2) {
+    } else if (hw->phy_type == e1000_phy_igp_2 ||
+               hw->phy_type == e1000_phy_igp_3) {
+        uint16_t cur_agc_index, max_agc_index = 0;
+        uint16_t min_agc_index = IGP02E1000_AGC_LENGTH_TABLE_SIZE - 1;
         uint16_t agc_reg_array[IGP02E1000_PHY_CHANNEL_NUM] =
                                                          {IGP02E1000_PHY_AGC_A,
                                                           IGP02E1000_PHY_AGC_B,
@@ -6145,19 +6777,27 @@ e1000_get_cable_length(struct e1000_hw *hw,
            /* Getting bits 15:9, which represent the combination of course and
              * fine gain values.  The result is a number that can be put into
              * the lookup table to obtain the approximate cable length. */
-            cur_agc = (phy_data >> IGP02E1000_AGC_LENGTH_SHIFT) &
-                      IGP02E1000_AGC_LENGTH_MASK;
+            cur_agc_index = (phy_data >> IGP02E1000_AGC_LENGTH_SHIFT) &
+                            IGP02E1000_AGC_LENGTH_MASK;
 
-            /* Remove min & max AGC values from calculation. */
-            if (e1000_igp_2_cable_length_table[min_agc] > e1000_igp_2_cable_length_table[cur_agc])
-                min_agc = cur_agc;
-           if (e1000_igp_2_cable_length_table[max_agc] < e1000_igp_2_cable_length_table[cur_agc])
-                max_agc = cur_agc;
+            /* Array index bound check. */
+            if ((cur_agc_index >= IGP02E1000_AGC_LENGTH_TABLE_SIZE) ||
+                (cur_agc_index == 0))
+                return -E1000_ERR_PHY;
 
-            agc_value += e1000_igp_2_cable_length_table[cur_agc];
+            /* Remove min & max AGC values from calculation. */
+            if (e1000_igp_2_cable_length_table[min_agc_index] >
+                e1000_igp_2_cable_length_table[cur_agc_index])
+                min_agc_index = cur_agc_index;
+            if (e1000_igp_2_cable_length_table[max_agc_index] <
+                e1000_igp_2_cable_length_table[cur_agc_index])
+                max_agc_index = cur_agc_index;
+
+            agc_value += e1000_igp_2_cable_length_table[cur_agc_index];
         }
 
-        agc_value -= (e1000_igp_2_cable_length_table[min_agc] + e1000_igp_2_cable_length_table[max_agc]);
+        agc_value -= (e1000_igp_2_cable_length_table[min_agc_index] +
+                      e1000_igp_2_cable_length_table[max_agc_index]);
         agc_value /= (IGP02E1000_PHY_CHANNEL_NUM - 2);
 
         /* Calculate cable length with the error range of +/- 10 meters. */
@@ -6203,7 +6843,8 @@ e1000_check_polarity(struct e1000_hw *hw,
             return ret_val;
         *polarity = (phy_data & M88E1000_PSSR_REV_POLARITY) >>
                     M88E1000_PSSR_REV_POLARITY_SHIFT;
-    } else if(hw->phy_type == e1000_phy_igp ||
+    } else if (hw->phy_type == e1000_phy_igp ||
+              hw->phy_type == e1000_phy_igp_3 ||
               hw->phy_type == e1000_phy_igp_2) {
         /* Read the Status register to check the speed */
         ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_STATUS,
@@ -6229,6 +6870,13 @@ e1000_check_polarity(struct e1000_hw *hw,
              * 100 Mbps this bit is always 0) */
             *polarity = phy_data & IGP01E1000_PSSR_POLARITY_REVERSED;
         }
+    } else if (hw->phy_type == e1000_phy_ife) {
+        ret_val = e1000_read_phy_reg(hw, IFE_PHY_EXTENDED_STATUS_CONTROL,
+                                     &phy_data);
+        if (ret_val)
+            return ret_val;
+        *polarity = (phy_data & IFE_PESC_POLARITY_REVERSED) >>
+                           IFE_PESC_POLARITY_REVERSED_SHIFT;
     }
     return E1000_SUCCESS;
 }
@@ -6256,7 +6904,8 @@ e1000_check_downshift(struct e1000_hw *hw)
 
     DEBUGFUNC("e1000_check_downshift");
 
-    if(hw->phy_type == e1000_phy_igp ||
+    if (hw->phy_type == e1000_phy_igp ||
+        hw->phy_type == e1000_phy_igp_3 ||
         hw->phy_type == e1000_phy_igp_2) {
         ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_LINK_HEALTH,
                                      &phy_data);
@@ -6273,6 +6922,9 @@ e1000_check_downshift(struct e1000_hw *hw)
 
         hw->speed_downgraded = (phy_data & M88E1000_PSSR_DOWNSHIFT) >>
                                M88E1000_PSSR_DOWNSHIFT_SHIFT;
+    } else if (hw->phy_type == e1000_phy_ife) {
+        /* e1000_phy_ife supports 10/100 speed only */
+        hw->speed_downgraded = FALSE;
     }
 
     return E1000_SUCCESS;
@@ -6317,7 +6969,9 @@ e1000_config_dsp_after_link_change(struct e1000_hw *hw,
 
         if(speed == SPEED_1000) {
 
-            e1000_get_cable_length(hw, &min_length, &max_length);
+            ret_val = e1000_get_cable_length(hw, &min_length, &max_length);
+            if (ret_val)
+                return ret_val;
 
             if((hw->dsp_config_state == e1000_dsp_config_enabled) &&
                 min_length >= e1000_igp_cable_length_50) {
@@ -6525,20 +7179,27 @@ static int32_t
 e1000_set_d3_lplu_state(struct e1000_hw *hw,
                         boolean_t active)
 {
+    uint32_t phy_ctrl = 0;
     int32_t ret_val;
     uint16_t phy_data;
     DEBUGFUNC("e1000_set_d3_lplu_state");
 
-    if(hw->phy_type != e1000_phy_igp && hw->phy_type != e1000_phy_igp_2)
+    if (hw->phy_type != e1000_phy_igp && hw->phy_type != e1000_phy_igp_2
+        && hw->phy_type != e1000_phy_igp_3)
         return E1000_SUCCESS;
 
     /* During driver activity LPLU should not be used or it will attain link
      * from the lowest speeds starting from 10Mbps. The capability is used for
      * Dx transitions and states */
-    if(hw->mac_type == e1000_82541_rev_2 || hw->mac_type == e1000_82547_rev_2) {
+    if (hw->mac_type == e1000_82541_rev_2 || hw->mac_type == e1000_82547_rev_2) {
         ret_val = e1000_read_phy_reg(hw, IGP01E1000_GMII_FIFO, &phy_data);
-        if(ret_val)
+        if (ret_val)
             return ret_val;
+    } else if (hw->mac_type == e1000_ich8lan) {
+        /* MAC writes into PHY register based on the state transition
+         * and start auto-negotiation. SW driver can overwrite the settings
+         * in CSR PHY power control E1000_PHY_CTRL register. */
+        phy_ctrl = E1000_READ_REG(hw, PHY_CTRL);
     } else {
         ret_val = e1000_read_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, &phy_data);
         if(ret_val)
@@ -6553,11 +7214,16 @@ e1000_set_d3_lplu_state(struct e1000_hw *hw,
             if(ret_val)
                 return ret_val;
         } else {
+            if (hw->mac_type == e1000_ich8lan) {
+                phy_ctrl &= ~E1000_PHY_CTRL_NOND0A_LPLU;
+                E1000_WRITE_REG(hw, PHY_CTRL, phy_ctrl);
+            } else {
                 phy_data &= ~IGP02E1000_PM_D3_LPLU;
                 ret_val = e1000_write_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT,
                                               phy_data);
                 if (ret_val)
                     return ret_val;
+            }
         }
 
         /* LPLU and SmartSpeed are mutually exclusive.  LPLU is used during
@@ -6593,17 +7259,22 @@ e1000_set_d3_lplu_state(struct e1000_hw *hw,
               (hw->autoneg_advertised == AUTONEG_ADVERTISE_10_100_ALL)) {
 
         if(hw->mac_type == e1000_82541_rev_2 ||
-           hw->mac_type == e1000_82547_rev_2) {
+            hw->mac_type == e1000_82547_rev_2) {
             phy_data |= IGP01E1000_GMII_FLEX_SPD;
             ret_val = e1000_write_phy_reg(hw, IGP01E1000_GMII_FIFO, phy_data);
             if(ret_val)
                 return ret_val;
         } else {
+            if (hw->mac_type == e1000_ich8lan) {
+                phy_ctrl |= E1000_PHY_CTRL_NOND0A_LPLU;
+                E1000_WRITE_REG(hw, PHY_CTRL, phy_ctrl);
+            } else {
                 phy_data |= IGP02E1000_PM_D3_LPLU;
                 ret_val = e1000_write_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT,
                                               phy_data);
                 if (ret_val)
                     return ret_val;
+            }
         }
 
         /* When LPLU is enabled we should disable SmartSpeed */
@@ -6638,6 +7309,7 @@ static int32_t
 e1000_set_d0_lplu_state(struct e1000_hw *hw,
                         boolean_t active)
 {
+    uint32_t phy_ctrl = 0;
     int32_t ret_val;
     uint16_t phy_data;
     DEBUGFUNC("e1000_set_d0_lplu_state");
@@ -6645,15 +7317,24 @@ e1000_set_d0_lplu_state(struct e1000_hw *hw,
     if(hw->mac_type <= e1000_82547_rev_2)
         return E1000_SUCCESS;
 
+    if (hw->mac_type == e1000_ich8lan) {
+        phy_ctrl = E1000_READ_REG(hw, PHY_CTRL);
+    } else {
         ret_val = e1000_read_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, &phy_data);
         if(ret_val)
             return ret_val;
+    }
 
     if (!active) {
+        if (hw->mac_type == e1000_ich8lan) {
+            phy_ctrl &= ~E1000_PHY_CTRL_D0A_LPLU;
+            E1000_WRITE_REG(hw, PHY_CTRL, phy_ctrl);
+        } else {
             phy_data &= ~IGP02E1000_PM_D0_LPLU;
             ret_val = e1000_write_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, phy_data);
             if (ret_val)
                 return ret_val;
+        }
 
         /* LPLU and SmartSpeed are mutually exclusive.  LPLU is used during
          * Dx states where the power conservation is most important.  During
@@ -6686,10 +7367,15 @@ e1000_set_d0_lplu_state(struct e1000_hw *hw,
 
     } else {
 
+        if (hw->mac_type == e1000_ich8lan) {
+            phy_ctrl |= E1000_PHY_CTRL_D0A_LPLU;
+            E1000_WRITE_REG(hw, PHY_CTRL, phy_ctrl);
+        } else {
             phy_data |= IGP02E1000_PM_D0_LPLU;
             ret_val = e1000_write_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, phy_data);
             if (ret_val)
                 return ret_val;
+        }
 
         /* When LPLU is enabled we should disable SmartSpeed */
         ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG, &phy_data);
@@ -6928,8 +7614,10 @@ e1000_mng_write_cmd_header(struct e1000_hw * hw,
 
     length >>= 2;
     /* The device driver writes the relevant command block into the ram area. */
-    for (i = 0; i < length; i++)
+    for (i = 0; i < length; i++) {
         E1000_WRITE_REG_ARRAY_DWORD(hw, HOST_IF, i, *((uint32_t *) hdr + i));
+        E1000_WRITE_FLUSH(hw);
+    }
 
     return E1000_SUCCESS;
 }
@@ -6961,15 +7649,18 @@ e1000_mng_write_commit(
  * returns  - TRUE when the mode is IAMT or FALSE.
  ****************************************************************************/
 boolean_t
-e1000_check_mng_mode(
-    struct e1000_hw *hw)
+e1000_check_mng_mode(struct e1000_hw *hw)
 {
     uint32_t fwsm;
 
     fwsm = E1000_READ_REG(hw, FWSM);
 
-    if((fwsm & E1000_FWSM_MODE_MASK) ==
-        (E1000_MNG_IAMT_MODE << E1000_FWSM_MODE_SHIFT))
+    if (hw->mac_type == e1000_ich8lan) {
+        if ((fwsm & E1000_FWSM_MODE_MASK) ==
+            (E1000_MNG_ICH_IAMT_MODE << E1000_FWSM_MODE_SHIFT))
+            return TRUE;
+    } else if ((fwsm & E1000_FWSM_MODE_MASK) ==
+               (E1000_MNG_IAMT_MODE << E1000_FWSM_MODE_SHIFT))
         return TRUE;
 
     return FALSE;
@@ -7209,7 +7900,6 @@ e1000_set_pci_express_master_disable(struct e1000_hw *hw)
     E1000_WRITE_REG(hw, CTRL, ctrl);
 }
 
-#if 0
 /***************************************************************************
  *
  * Enables PCI-Express master access.
@@ -7233,7 +7923,6 @@ e1000_enable_pciex_master(struct e1000_hw *hw)
     ctrl &= ~E1000_CTRL_GIO_MASTER_DISABLE;
     E1000_WRITE_REG(hw, CTRL, ctrl);
 }
-#endif  /*  0  */
 
 /*******************************************************************************
  *
@@ -7299,8 +7988,10 @@ e1000_get_auto_rd_done(struct e1000_hw *hw)
     case e1000_82572:
     case e1000_82573:
     case e1000_80003es2lan:
-        while(timeout) {
-            if (E1000_READ_REG(hw, EECD) & E1000_EECD_AUTO_RD) break;
+    case e1000_ich8lan:
+        while (timeout) {
+            if (E1000_READ_REG(hw, EECD) & E1000_EECD_AUTO_RD)
+                break;
             else msec_delay(1);
             timeout--;
         }
@@ -7340,7 +8031,7 @@ e1000_get_phy_cfg_done(struct e1000_hw *hw)
 
     switch (hw->mac_type) {
     default:
-        msec_delay(10);
+        msec_delay_irq(10);
         break;
     case e1000_80003es2lan:
         /* Separate *_CFG_DONE_* bit for each port */
@@ -7523,6 +8214,13 @@ int32_t
 e1000_check_phy_reset_block(struct e1000_hw *hw)
 {
     uint32_t manc = 0;
+    uint32_t fwsm = 0;
+
+    if (hw->mac_type == e1000_ich8lan) {
+        fwsm = E1000_READ_REG(hw, FWSM);
+        return (fwsm & E1000_FWSM_RSPCIPHY) ? E1000_SUCCESS
+                                            : E1000_BLK_PHY_RESET;
+    }
 
     if (hw->mac_type > e1000_82547_rev_2)
         manc = E1000_READ_REG(hw, MANC);
@@ -7549,6 +8247,8 @@ e1000_arc_subsystem_valid(struct e1000_hw *hw)
         if((fwsm & E1000_FWSM_MODE_MASK) != 0)
             return TRUE;
         break;
+    case e1000_ich8lan:
+        return TRUE;
     default:
         break;
     }
@@ -7556,4 +8256,846 @@ e1000_arc_subsystem_valid(struct e1000_hw *hw)
 }
 
 
+/******************************************************************************
+ * Configure PCI-Ex no-snoop
+ *
+ * hw - Struct containing variables accessed by shared code.
+ * no_snoop - Bitmap of no-snoop events.
+ *
+ * returns: E1000_SUCCESS
+ *
+ *****************************************************************************/
+int32_t
+e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, uint32_t no_snoop)
+{
+    uint32_t gcr_reg = 0;
+
+    DEBUGFUNC("e1000_set_pci_ex_no_snoop");
+
+    if (hw->bus_type == e1000_bus_type_unknown)
+        e1000_get_bus_info(hw);
+
+    if (hw->bus_type != e1000_bus_type_pci_express)
+        return E1000_SUCCESS;
+
+    if (no_snoop) {
+        gcr_reg = E1000_READ_REG(hw, GCR);
+        gcr_reg &= ~(PCI_EX_NO_SNOOP_ALL);
+        gcr_reg |= no_snoop;
+        E1000_WRITE_REG(hw, GCR, gcr_reg);
+    }
+    if (hw->mac_type == e1000_ich8lan) {
+        uint32_t ctrl_ext;
+
+        E1000_WRITE_REG(hw, GCR, PCI_EX_82566_SNOOP_ALL);
+
+        ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);
+        ctrl_ext |= E1000_CTRL_EXT_RO_DIS;
+        E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext);
+    }
+
+    return E1000_SUCCESS;
+}
+
+/***************************************************************************
+ *
+ * Get software semaphore FLAG bit (SWFLAG).
+ * SWFLAG is used to synchronize the access to all shared resource between
+ * SW, FW and HW.
+ *
+ * hw: Struct containing variables accessed by shared code
+ *
+ ***************************************************************************/
+int32_t
+e1000_get_software_flag(struct e1000_hw *hw)
+{
+    int32_t timeout = PHY_CFG_TIMEOUT;
+    uint32_t extcnf_ctrl;
+
+    DEBUGFUNC("e1000_get_software_flag");
+
+    if (hw->mac_type == e1000_ich8lan) {
+        while (timeout) {
+            extcnf_ctrl = E1000_READ_REG(hw, EXTCNF_CTRL);
+            extcnf_ctrl |= E1000_EXTCNF_CTRL_SWFLAG;
+            E1000_WRITE_REG(hw, EXTCNF_CTRL, extcnf_ctrl);
+
+            extcnf_ctrl = E1000_READ_REG(hw, EXTCNF_CTRL);
+            if (extcnf_ctrl & E1000_EXTCNF_CTRL_SWFLAG)
+                break;
+            msec_delay_irq(1);
+            timeout--;
+        }
+
+        if (!timeout) {
+            DEBUGOUT("FW or HW locks the resource too long.\n");
+            return -E1000_ERR_CONFIG;
+        }
+    }
+
+    return E1000_SUCCESS;
+}
+
+/***************************************************************************
+ *
+ * Release software semaphore FLAG bit (SWFLAG).
+ * SWFLAG is used to synchronize the access to all shared resource between
+ * SW, FW and HW.
+ *
+ * hw: Struct containing variables accessed by shared code
+ *
+ ***************************************************************************/
+void
+e1000_release_software_flag(struct e1000_hw *hw)
+{
+    uint32_t extcnf_ctrl;
+
+    DEBUGFUNC("e1000_release_software_flag");
+
+    if (hw->mac_type == e1000_ich8lan) {
+        extcnf_ctrl= E1000_READ_REG(hw, EXTCNF_CTRL);
+        extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG;
+        E1000_WRITE_REG(hw, EXTCNF_CTRL, extcnf_ctrl);
+    }
+
+    return;
+}
+
+/***************************************************************************
+ *
+ * Disable dynamic power down mode in ife PHY.
+ * It can be used to workaround band-gap problem.
+ *
+ * hw: Struct containing variables accessed by shared code
+ *
+ ***************************************************************************/
+int32_t
+e1000_ife_disable_dynamic_power_down(struct e1000_hw *hw)
+{
+    uint16_t phy_data;
+    int32_t ret_val = E1000_SUCCESS;
+
+    DEBUGFUNC("e1000_ife_disable_dynamic_power_down");
+
+    if (hw->phy_type == e1000_phy_ife) {
+        ret_val = e1000_read_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL, &phy_data);
+        if (ret_val)
+            return ret_val;
+
+        phy_data |=  IFE_PSC_DISABLE_DYNAMIC_POWER_DOWN;
+        ret_val = e1000_write_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL, phy_data);
+    }
+
+    return ret_val;
+}
+
+/***************************************************************************
+ *
+ * Enable dynamic power down mode in ife PHY.
+ * It can be used to workaround band-gap problem.
+ *
+ * hw: Struct containing variables accessed by shared code
+ *
+ ***************************************************************************/
+int32_t
+e1000_ife_enable_dynamic_power_down(struct e1000_hw *hw)
+{
+    uint16_t phy_data;
+    int32_t ret_val = E1000_SUCCESS;
+
+    DEBUGFUNC("e1000_ife_enable_dynamic_power_down");
+
+    if (hw->phy_type == e1000_phy_ife) {
+        ret_val = e1000_read_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL, &phy_data);
+        if (ret_val)
+            return ret_val;
+
+        phy_data &=  ~IFE_PSC_DISABLE_DYNAMIC_POWER_DOWN;
+        ret_val = e1000_write_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL, phy_data);
+    }
+
+    return ret_val;
+}
+
+/******************************************************************************
+ * Reads a 16 bit word or words from the EEPROM using the ICH8's flash access
+ * register.
+ *
+ * hw - Struct containing variables accessed by shared code
+ * offset - offset of word in the EEPROM to read
+ * data - word read from the EEPROM
+ * words - number of words to read
+ *****************************************************************************/
+int32_t
+e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words,
+                       uint16_t *data)
+{
+    int32_t  error = E1000_SUCCESS;
+    uint32_t flash_bank = 0;
+    uint32_t act_offset = 0;
+    uint32_t bank_offset = 0;
+    uint16_t word = 0;
+    uint16_t i = 0;
+
+    /* We need to know which is the valid flash bank.  In the event
+     * that we didn't allocate eeprom_shadow_ram, we may not be
+     * managing flash_bank.  So it cannot be trusted and needs
+     * to be updated with each read.
+     */
+    /* Value of bit 22 corresponds to the flash bank we're on. */
+    flash_bank = (E1000_READ_REG(hw, EECD) & E1000_EECD_SEC1VAL) ? 1 : 0;
+
+    /* Adjust offset appropriately if we're on bank 1 - adjust for word size */
+    bank_offset = flash_bank * (hw->flash_bank_size * 2);
+
+    error = e1000_get_software_flag(hw);
+    if (error != E1000_SUCCESS)
+        return error;
+
+    for (i = 0; i < words; i++) {
+        if (hw->eeprom_shadow_ram != NULL &&
+            hw->eeprom_shadow_ram[offset+i].modified == TRUE) {
+            data[i] = hw->eeprom_shadow_ram[offset+i].eeprom_word;
+        } else {
+            /* The NVM part needs a byte offset, hence * 2 */
+            act_offset = bank_offset + ((offset + i) * 2);
+            error = e1000_read_ich8_word(hw, act_offset, &word);
+            if (error != E1000_SUCCESS)
+                break;
+            data[i] = word;
+        }
+    }
+
+    e1000_release_software_flag(hw);
+
+    return error;
+}
+
+/******************************************************************************
+ * Writes a 16 bit word or words to the EEPROM using the ICH8's flash access
+ * register.  Actually, writes are written to the shadow ram cache in the hw
+ * structure hw->e1000_shadow_ram.  e1000_commit_shadow_ram flushes this to
+ * the NVM, which occurs when the NVM checksum is updated.
+ *
+ * hw - Struct containing variables accessed by shared code
+ * offset - offset of word in the EEPROM to write
+ * words - number of words to write
+ * data - words to write to the EEPROM
+ *****************************************************************************/
+int32_t
+e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words,
+                        uint16_t *data)
+{
+    uint32_t i = 0;
+    int32_t error = E1000_SUCCESS;
+
+    error = e1000_get_software_flag(hw);
+    if (error != E1000_SUCCESS)
+        return error;
+
+    /* A driver can write to the NVM only if it has eeprom_shadow_ram
+     * allocated.  Subsequent reads to the modified words are read from
+     * this cached structure as well.  Writes will only go into this
+     * cached structure unless it's followed by a call to
+     * e1000_update_eeprom_checksum() where it will commit the changes
+     * and clear the "modified" field.
+     */
+    if (hw->eeprom_shadow_ram != NULL) {
+        for (i = 0; i < words; i++) {
+            if ((offset + i) < E1000_SHADOW_RAM_WORDS) {
+                hw->eeprom_shadow_ram[offset+i].modified = TRUE;
+                hw->eeprom_shadow_ram[offset+i].eeprom_word = data[i];
+            } else {
+                error = -E1000_ERR_EEPROM;
+                break;
+            }
+        }
+    } else {
+        /* Drivers have the option to not allocate eeprom_shadow_ram as long
+         * as they don't perform any NVM writes.  An attempt in doing so
+         * will result in this error.
+         */
+        error = -E1000_ERR_EEPROM;
+    }
+
+    e1000_release_software_flag(hw);
+
+    return error;
+}
+
+/******************************************************************************
+ * This function does initial flash setup so that a new read/write/erase cycle
+ * can be started.
+ *
+ * hw - The pointer to the hw structure
+ ****************************************************************************/
+int32_t
+e1000_ich8_cycle_init(struct e1000_hw *hw)
+{
+    union ich8_hws_flash_status hsfsts;
+    int32_t error = E1000_ERR_EEPROM;
+    int32_t i     = 0;
+
+    DEBUGFUNC("e1000_ich8_cycle_init");
+
+    hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS);
+
+    /* May be check the Flash Des Valid bit in Hw status */
+    if (hsfsts.hsf_status.fldesvalid == 0) {
+        DEBUGOUT("Flash descriptor invalid.  SW Sequencing must be used.");
+        return error;
+    }
+
+    /* Clear FCERR in Hw status by writing 1 */
+    /* Clear DAEL in Hw status by writing a 1 */
+    hsfsts.hsf_status.flcerr = 1;
+    hsfsts.hsf_status.dael = 1;
+
+    E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFSTS, hsfsts.regval);
+
+    /* Either we should have a hardware SPI cycle in progress bit to check
+     * against, in order to start a new cycle or FDONE bit should be changed
+     * in the hardware so that it is 1 after harware reset, which can then be
+     * used as an indication whether a cycle is in progress or has been
+     * completed .. we should also have some software semaphore mechanism to
+     * guard FDONE or the cycle in progress bit so that two threads access to
+     * those bits can be sequentiallized or a way so that 2 threads dont
+     * start the cycle at the same time */
+
+    if (hsfsts.hsf_status.flcinprog == 0) {
+        /* There is no cycle running at present, so we can start a cycle */
+        /* Begin by setting Flash Cycle Done. */
+        hsfsts.hsf_status.flcdone = 1;
+        E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFSTS, hsfsts.regval);
+        error = E1000_SUCCESS;
+    } else {
+        /* otherwise poll for sometime so the current cycle has a chance
+         * to end before giving up. */
+        for (i = 0; i < ICH8_FLASH_COMMAND_TIMEOUT; i++) {
+            hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS);
+            if (hsfsts.hsf_status.flcinprog == 0) {
+                error = E1000_SUCCESS;
+                break;
+            }
+            udelay(1);
+        }
+        if (error == E1000_SUCCESS) {
+            /* Successful in waiting for previous cycle to timeout,
+             * now set the Flash Cycle Done. */
+            hsfsts.hsf_status.flcdone = 1;
+            E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFSTS, hsfsts.regval);
+        } else {
+            DEBUGOUT("Flash controller busy, cannot get access");
+        }
+    }
+    return error;
+}
+
+/******************************************************************************
+ * This function starts a flash cycle and waits for its completion
+ *
+ * hw - The pointer to the hw structure
+ ****************************************************************************/
+int32_t
+e1000_ich8_flash_cycle(struct e1000_hw *hw, uint32_t timeout)
+{
+    union ich8_hws_flash_ctrl hsflctl;
+    union ich8_hws_flash_status hsfsts;
+    int32_t error = E1000_ERR_EEPROM;
+    uint32_t i = 0;
+
+    /* Start a cycle by writing 1 in Flash Cycle Go in Hw Flash Control */
+    hsflctl.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFCTL);
+    hsflctl.hsf_ctrl.flcgo = 1;
+    E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFCTL, hsflctl.regval);
+
+    /* wait till FDONE bit is set to 1 */
+    do {
+        hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS);
+        if (hsfsts.hsf_status.flcdone == 1)
+            break;
+        udelay(1);
+        i++;
+    } while (i < timeout);
+    if (hsfsts.hsf_status.flcdone == 1 && hsfsts.hsf_status.flcerr == 0) {
+        error = E1000_SUCCESS;
+    }
+    return error;
+}
+
+/******************************************************************************
+ * Reads a byte or word from the NVM using the ICH8 flash access registers.
+ *
+ * hw - The pointer to the hw structure
+ * index - The index of the byte or word to read.
+ * size - Size of data to read, 1=byte 2=word
+ * data - Pointer to the word to store the value read.
+ *****************************************************************************/
+int32_t
+e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index,
+                     uint32_t size, uint16_t* data)
+{
+    union ich8_hws_flash_status hsfsts;
+    union ich8_hws_flash_ctrl hsflctl;
+    uint32_t flash_linear_address;
+    uint32_t flash_data = 0;
+    int32_t error = -E1000_ERR_EEPROM;
+    int32_t count = 0;
+
+    DEBUGFUNC("e1000_read_ich8_data");
+
+    if (size < 1  || size > 2 || data == 0x0 ||
+        index > ICH8_FLASH_LINEAR_ADDR_MASK)
+        return error;
+
+    flash_linear_address = (ICH8_FLASH_LINEAR_ADDR_MASK & index) +
+                           hw->flash_base_addr;
+
+    do {
+        udelay(1);
+        /* Steps */
+        error = e1000_ich8_cycle_init(hw);
+        if (error != E1000_SUCCESS)
+            break;
+
+        hsflctl.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFCTL);
+        /* 0b/1b corresponds to 1 or 2 byte size, respectively. */
+        hsflctl.hsf_ctrl.fldbcount = size - 1;
+        hsflctl.hsf_ctrl.flcycle = ICH8_CYCLE_READ;
+        E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFCTL, hsflctl.regval);
+
+        /* Write the last 24 bits of index into Flash Linear address field in
+         * Flash Address */
+        /* TODO: TBD maybe check the index against the size of flash */
+
+        E1000_WRITE_ICH8_REG(hw, ICH8_FLASH_FADDR, flash_linear_address);
+
+        error = e1000_ich8_flash_cycle(hw, ICH8_FLASH_COMMAND_TIMEOUT);
+
+        /* Check if FCERR is set to 1, if set to 1, clear it and try the whole
+         * sequence a few more times, else read in (shift in) the Flash Data0,
+         * the order is least significant byte first msb to lsb */
+        if (error == E1000_SUCCESS) {
+            flash_data = E1000_READ_ICH8_REG(hw, ICH8_FLASH_FDATA0);
+            if (size == 1) {
+                *data = (uint8_t)(flash_data & 0x000000FF);
+            } else if (size == 2) {
+                *data = (uint16_t)(flash_data & 0x0000FFFF);
+            }
+            break;
+        } else {
+            /* If we've gotten here, then things are probably completely hosed,
+             * but if the error condition is detected, it won't hurt to give
+             * it another try...ICH8_FLASH_CYCLE_REPEAT_COUNT times.
+             */
+            hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS);
+            if (hsfsts.hsf_status.flcerr == 1) {
+                /* Repeat for some time before giving up. */
+                continue;
+            } else if (hsfsts.hsf_status.flcdone == 0) {
+                DEBUGOUT("Timeout error - flash cycle did not complete.");
+                break;
+            }
+        }
+    } while (count++ < ICH8_FLASH_CYCLE_REPEAT_COUNT);
+
+    return error;
+}
+
+/******************************************************************************
+ * Writes One /two bytes to the NVM using the ICH8 flash access registers.
+ *
+ * hw - The pointer to the hw structure
+ * index - The index of the byte/word to read.
+ * size - Size of data to read, 1=byte 2=word
+ * data - The byte(s) to write to the NVM.
+ *****************************************************************************/
+int32_t
+e1000_write_ich8_data(struct e1000_hw *hw, uint32_t index, uint32_t size,
+                      uint16_t data)
+{
+    union ich8_hws_flash_status hsfsts;
+    union ich8_hws_flash_ctrl hsflctl;
+    uint32_t flash_linear_address;
+    uint32_t flash_data = 0;
+    int32_t error = -E1000_ERR_EEPROM;
+    int32_t count = 0;
+
+    DEBUGFUNC("e1000_write_ich8_data");
+
+    if (size < 1  || size > 2 || data > size * 0xff ||
+        index > ICH8_FLASH_LINEAR_ADDR_MASK)
+        return error;
+
+    flash_linear_address = (ICH8_FLASH_LINEAR_ADDR_MASK & index) +
+                           hw->flash_base_addr;
+
+    do {
+        udelay(1);
+        /* Steps */
+        error = e1000_ich8_cycle_init(hw);
+        if (error != E1000_SUCCESS)
+            break;
+
+        hsflctl.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFCTL);
+        /* 0b/1b corresponds to 1 or 2 byte size, respectively. */
+        hsflctl.hsf_ctrl.fldbcount = size -1;
+        hsflctl.hsf_ctrl.flcycle = ICH8_CYCLE_WRITE;
+        E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFCTL, hsflctl.regval);
+
+        /* Write the last 24 bits of index into Flash Linear address field in
+         * Flash Address */
+        E1000_WRITE_ICH8_REG(hw, ICH8_FLASH_FADDR, flash_linear_address);
+
+        if (size == 1)
+            flash_data = (uint32_t)data & 0x00FF;
+        else
+            flash_data = (uint32_t)data;
+
+        E1000_WRITE_ICH8_REG(hw, ICH8_FLASH_FDATA0, flash_data);
+
+        /* check if FCERR is set to 1 , if set to 1, clear it and try the whole
+         * sequence a few more times else done */
+        error = e1000_ich8_flash_cycle(hw, ICH8_FLASH_COMMAND_TIMEOUT);
+        if (error == E1000_SUCCESS) {
+            break;
+        } else {
+            /* If we're here, then things are most likely completely hosed,
+             * but if the error condition is detected, it won't hurt to give
+             * it another try...ICH8_FLASH_CYCLE_REPEAT_COUNT times.
+             */
+            hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS);
+            if (hsfsts.hsf_status.flcerr == 1) {
+                /* Repeat for some time before giving up. */
+                continue;
+            } else if (hsfsts.hsf_status.flcdone == 0) {
+                DEBUGOUT("Timeout error - flash cycle did not complete.");
+                break;
+            }
+        }
+    } while (count++ < ICH8_FLASH_CYCLE_REPEAT_COUNT);
+
+    return error;
+}
+
+/******************************************************************************
+ * Reads a single byte from the NVM using the ICH8 flash access registers.
+ *
+ * hw - pointer to e1000_hw structure
+ * index - The index of the byte to read.
+ * data - Pointer to a byte to store the value read.
+ *****************************************************************************/
+int32_t
+e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t* data)
+{
+    int32_t status = E1000_SUCCESS;
+    uint16_t word = 0;
+
+    status = e1000_read_ich8_data(hw, index, 1, &word);
+    if (status == E1000_SUCCESS) {
+        *data = (uint8_t)word;
+    }
+
+    return status;
+}
+
+/******************************************************************************
+ * Writes a single byte to the NVM using the ICH8 flash access registers.
+ * Performs verification by reading back the value and then going through
+ * a retry algorithm before giving up.
+ *
+ * hw - pointer to e1000_hw structure
+ * index - The index of the byte to write.
+ * byte - The byte to write to the NVM.
+ *****************************************************************************/
+int32_t
+e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t byte)
+{
+    int32_t error = E1000_SUCCESS;
+    int32_t program_retries;
+    uint8_t temp_byte;
+
+    e1000_write_ich8_byte(hw, index, byte);
+    udelay(100);
+
+    for (program_retries = 0; program_retries < 100; program_retries++) {
+        e1000_read_ich8_byte(hw, index, &temp_byte);
+        if (temp_byte == byte)
+            break;
+        udelay(10);
+        e1000_write_ich8_byte(hw, index, byte);
+        udelay(100);
+    }
+    if (program_retries == 100)
+        error = E1000_ERR_EEPROM;
+
+    return error;
+}
+
+/******************************************************************************
+ * Writes a single byte to the NVM using the ICH8 flash access registers.
+ *
+ * hw - pointer to e1000_hw structure
+ * index - The index of the byte to read.
+ * data - The byte to write to the NVM.
+ *****************************************************************************/
+int32_t
+e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t data)
+{
+    int32_t status = E1000_SUCCESS;
+    uint16_t word = (uint16_t)data;
+
+    status = e1000_write_ich8_data(hw, index, 1, word);
+
+    return status;
+}
+
+/******************************************************************************
+ * Reads a word from the NVM using the ICH8 flash access registers.
+ *
+ * hw - pointer to e1000_hw structure
+ * index - The starting byte index of the word to read.
+ * data - Pointer to a word to store the value read.
+ *****************************************************************************/
+int32_t
+e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t *data)
+{
+    int32_t status = E1000_SUCCESS;
+    status = e1000_read_ich8_data(hw, index, 2, data);
+    return status;
+}
+
+/******************************************************************************
+ * Writes a word to the NVM using the ICH8 flash access registers.
+ *
+ * hw - pointer to e1000_hw structure
+ * index - The starting byte index of the word to read.
+ * data - The word to write to the NVM.
+ *****************************************************************************/
+int32_t
+e1000_write_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t data)
+{
+    int32_t status = E1000_SUCCESS;
+    status = e1000_write_ich8_data(hw, index, 2, data);
+    return status;
+}
+
+/******************************************************************************
+ * Erases the bank specified. Each bank is a 4k block. Segments are 0 based.
+ * segment N is 4096 * N + flash_reg_addr.
+ *
+ * hw - pointer to e1000_hw structure
+ * segment - 0 for first segment, 1 for second segment, etc.
+ *****************************************************************************/
+int32_t
+e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t segment)
+{
+    union ich8_hws_flash_status hsfsts;
+    union ich8_hws_flash_ctrl hsflctl;
+    uint32_t flash_linear_address;
+    int32_t  count = 0;
+    int32_t  error = E1000_ERR_EEPROM;
+    int32_t  iteration, seg_size;
+    int32_t  sector_size;
+    int32_t  j = 0;
+    int32_t  error_flag = 0;
+
+    hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS);
+
+    /* Determine HW Sector size: Read BERASE bits of Hw flash Status register */
+    /* 00: The Hw sector is 256 bytes, hence we need to erase 16
+     *     consecutive sectors.  The start index for the nth Hw sector can be
+     *     calculated as = segment * 4096 + n * 256
+     * 01: The Hw sector is 4K bytes, hence we need to erase 1 sector.
+     *     The start index for the nth Hw sector can be calculated
+     *     as = segment * 4096
+     * 10: Error condition
+     * 11: The Hw sector size is much bigger than the size asked to
+     *     erase...error condition */
+    if (hsfsts.hsf_status.berasesz == 0x0) {
+        /* Hw sector size 256 */
+        sector_size = seg_size = ICH8_FLASH_SEG_SIZE_256;
+        iteration = ICH8_FLASH_SECTOR_SIZE / ICH8_FLASH_SEG_SIZE_256;
+    } else if (hsfsts.hsf_status.berasesz == 0x1) {
+        sector_size = seg_size = ICH8_FLASH_SEG_SIZE_4K;
+        iteration = 1;
+    } else if (hsfsts.hsf_status.berasesz == 0x3) {
+        sector_size = seg_size = ICH8_FLASH_SEG_SIZE_64K;
+        iteration = 1;
+    } else {
+        return error;
+    }
+
+    for (j = 0; j < iteration ; j++) {
+        do {
+            count++;
+            /* Steps */
+            error = e1000_ich8_cycle_init(hw);
+            if (error != E1000_SUCCESS) {
+                error_flag = 1;
+                break;
+            }
+
+            /* Write a value 11 (block Erase) in Flash Cycle field in Hw flash
+             * Control */
+            hsflctl.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFCTL);
+            hsflctl.hsf_ctrl.flcycle = ICH8_CYCLE_ERASE;
+            E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFCTL, hsflctl.regval);
+
+            /* Write the last 24 bits of an index within the block into Flash
+             * Linear address field in Flash Address.  This probably needs to
+             * be calculated here based off the on-chip segment size and the
+             * software segment size assumed (4K) */
+            /* TBD */
+            flash_linear_address = segment * sector_size + j * seg_size;
+            flash_linear_address &= ICH8_FLASH_LINEAR_ADDR_MASK;
+            flash_linear_address += hw->flash_base_addr;
+
+            E1000_WRITE_ICH8_REG(hw, ICH8_FLASH_FADDR, flash_linear_address);
+
+            error = e1000_ich8_flash_cycle(hw, 1000000);
+            /* Check if FCERR is set to 1.  If 1, clear it and try the whole
+             * sequence a few more times else Done */
+            if (error == E1000_SUCCESS) {
+                break;
+            } else {
+                hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS);
+                if (hsfsts.hsf_status.flcerr == 1) {
+                    /* repeat for some time before giving up */
+                    continue;
+                } else if (hsfsts.hsf_status.flcdone == 0) {
+                    error_flag = 1;
+                    break;
+                }
+            }
+        } while ((count < ICH8_FLASH_CYCLE_REPEAT_COUNT) && !error_flag);
+        if (error_flag == 1)
+            break;
+    }
+    if (error_flag != 1)
+        error = E1000_SUCCESS;
+    return error;
+}
+
+/******************************************************************************
+ *
+ * Reverse duplex setting without breaking the link.
+ *
+ * hw: Struct containing variables accessed by shared code
+ *
+ *****************************************************************************/
+int32_t
+e1000_duplex_reversal(struct e1000_hw *hw)
+{
+    int32_t ret_val;
+    uint16_t phy_data;
+
+    if (hw->phy_type != e1000_phy_igp_3)
+        return E1000_SUCCESS;
+
+    ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data);
+    if (ret_val)
+        return ret_val;
+
+    phy_data ^= MII_CR_FULL_DUPLEX;
+
+    ret_val = e1000_write_phy_reg(hw, PHY_CTRL, phy_data);
+    if (ret_val)
+        return ret_val;
+
+    ret_val = e1000_read_phy_reg(hw, IGP3E1000_PHY_MISC_CTRL, &phy_data);
+    if (ret_val)
+        return ret_val;
+
+    phy_data |= IGP3_PHY_MISC_DUPLEX_MANUAL_SET;
+    ret_val = e1000_write_phy_reg(hw, IGP3E1000_PHY_MISC_CTRL, phy_data);
+
+    return ret_val;
+}
+
+int32_t
+e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw,
+                                      uint32_t cnf_base_addr, uint32_t cnf_size)
+{
+    uint32_t ret_val = E1000_SUCCESS;
+    uint16_t word_addr, reg_data, reg_addr;
+    uint16_t i;
+
+    /* cnf_base_addr is in DWORD */
+    word_addr = (uint16_t)(cnf_base_addr << 1);
+
+    /* cnf_size is returned in size of dwords */
+    for (i = 0; i < cnf_size; i++) {
+        ret_val = e1000_read_eeprom(hw, (word_addr + i*2), 1, &reg_data);
+        if (ret_val)
+            return ret_val;
+
+        ret_val = e1000_read_eeprom(hw, (word_addr + i*2 + 1), 1, &reg_addr);
+        if (ret_val)
+            return ret_val;
+
+        ret_val = e1000_get_software_flag(hw);
+        if (ret_val != E1000_SUCCESS)
+            return ret_val;
+
+        ret_val = e1000_write_phy_reg_ex(hw, (uint32_t)reg_addr, reg_data);
+
+        e1000_release_software_flag(hw);
+    }
+
+    return ret_val;
+}
+
+
+int32_t
+e1000_init_lcd_from_nvm(struct e1000_hw *hw)
+{
+    uint32_t reg_data, cnf_base_addr, cnf_size, ret_val, loop;
+
+    if (hw->phy_type != e1000_phy_igp_3)
+          return E1000_SUCCESS;
+
+    /* Check if SW needs configure the PHY */
+    reg_data = E1000_READ_REG(hw, FEXTNVM);
+    if (!(reg_data & FEXTNVM_SW_CONFIG))
+        return E1000_SUCCESS;
+
+    /* Wait for basic configuration completes before proceeding*/
+    loop = 0;
+    do {
+        reg_data = E1000_READ_REG(hw, STATUS) & E1000_STATUS_LAN_INIT_DONE;
+        udelay(100);
+        loop++;
+    } while ((!reg_data) && (loop < 50));
+
+    /* Clear the Init Done bit for the next init event */
+    reg_data = E1000_READ_REG(hw, STATUS);
+    reg_data &= ~E1000_STATUS_LAN_INIT_DONE;
+    E1000_WRITE_REG(hw, STATUS, reg_data);
+
+    /* Make sure HW does not configure LCD from PHY extended configuration
+       before SW configuration */
+    reg_data = E1000_READ_REG(hw, EXTCNF_CTRL);
+    if ((reg_data & E1000_EXTCNF_CTRL_LCD_WRITE_ENABLE) == 0x0000) {
+        reg_data = E1000_READ_REG(hw, EXTCNF_SIZE);
+        cnf_size = reg_data & E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH;
+        cnf_size >>= 16;
+        if (cnf_size) {
+            reg_data = E1000_READ_REG(hw, EXTCNF_CTRL);
+            cnf_base_addr = reg_data & E1000_EXTCNF_CTRL_EXT_CNF_POINTER;
+            /* cnf_base_addr is in DWORD */
+            cnf_base_addr >>= 16;
+
+            /* Configure LCD from extended configuration region. */
+            ret_val = e1000_init_lcd_from_nvm_config_region(hw, cnf_base_addr,
+                                                            cnf_size);
+            if (ret_val)
+                return ret_val;
+        }
+    }
+
+    return E1000_SUCCESS;
+}
+
+
 
index 467c9ed944f84a935aeeec20ebe8d52ec1222326..f9341e3276b314e324be6720c359f98dd6590d8c 100644 (file)
@@ -62,6 +62,7 @@ typedef enum {
     e1000_82572,
     e1000_82573,
     e1000_80003es2lan,
+    e1000_ich8lan,
     e1000_num_macs
 } e1000_mac_type;
 
@@ -70,6 +71,7 @@ typedef enum {
     e1000_eeprom_spi,
     e1000_eeprom_microwire,
     e1000_eeprom_flash,
+    e1000_eeprom_ich8,
     e1000_eeprom_none, /* No NVM support */
     e1000_num_eeprom_types
 } e1000_eeprom_type;
@@ -98,6 +100,11 @@ typedef enum {
     e1000_fc_default = 0xFF
 } e1000_fc_type;
 
+struct e1000_shadow_ram {
+    uint16_t    eeprom_word;
+    boolean_t   modified;
+};
+
 /* PCI bus types */
 typedef enum {
     e1000_bus_type_unknown = 0,
@@ -218,6 +225,8 @@ typedef enum {
     e1000_phy_igp,
     e1000_phy_igp_2,
     e1000_phy_gg82563,
+    e1000_phy_igp_3,
+    e1000_phy_ife,
     e1000_phy_undefined = 0xFF
 } e1000_phy_type;
 
@@ -313,6 +322,10 @@ int32_t e1000_read_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy
 int32_t e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data);
 int32_t e1000_phy_hw_reset(struct e1000_hw *hw);
 int32_t e1000_phy_reset(struct e1000_hw *hw);
+void e1000_phy_powerdown_workaround(struct e1000_hw *hw);
+int32_t e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw);
+int32_t e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, uint32_t cnf_base_addr, uint32_t cnf_size);
+int32_t e1000_init_lcd_from_nvm(struct e1000_hw *hw);
 int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info);
 int32_t e1000_validate_mdi_setting(struct e1000_hw *hw);
 int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *data);
@@ -331,6 +344,7 @@ uint32_t e1000_enable_mng_pass_thru(struct e1000_hw *hw);
 #define E1000_MNG_DHCP_COOKIE_OFFSET   0x6F0   /* Cookie offset */
 #define E1000_MNG_DHCP_COOKIE_LENGTH   0x10    /* Cookie length */
 #define E1000_MNG_IAMT_MODE            0x3
+#define E1000_MNG_ICH_IAMT_MODE         0x2
 #define E1000_IAMT_SIGNATURE            0x544D4149 /* Intel(R) Active Management Technology signature */
 
 #define E1000_MNG_DHCP_COOKIE_STATUS_PARSING_SUPPORT 0x1 /* DHCP parsing enabled */
@@ -388,6 +402,8 @@ int32_t e1000_read_part_num(struct e1000_hw *hw, uint32_t * part_num);
 int32_t e1000_read_mac_addr(struct e1000_hw * hw);
 int32_t e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask);
 void e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask);
+void e1000_release_software_flag(struct e1000_hw *hw);
+int32_t e1000_get_software_flag(struct e1000_hw *hw);
 
 /* Filters (multicast, vlan, receive) */
 void e1000_mc_addr_list_update(struct e1000_hw *hw, uint8_t * mc_addr_list, uint32_t mc_addr_count, uint32_t pad, uint32_t rar_used_count);
@@ -401,6 +417,7 @@ int32_t e1000_setup_led(struct e1000_hw *hw);
 int32_t e1000_cleanup_led(struct e1000_hw *hw);
 int32_t e1000_led_on(struct e1000_hw *hw);
 int32_t e1000_led_off(struct e1000_hw *hw);
+int32_t e1000_blink_led_start(struct e1000_hw *hw);
 
 /* Adaptive IFS Functions */
 
@@ -422,6 +439,29 @@ int32_t e1000_disable_pciex_master(struct e1000_hw *hw);
 int32_t e1000_get_software_semaphore(struct e1000_hw *hw);
 void e1000_release_software_semaphore(struct e1000_hw *hw);
 int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
+int32_t e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, uint32_t no_snoop);
+
+int32_t e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index,
+                             uint8_t *data);
+int32_t e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index,
+                                     uint8_t byte);
+int32_t e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index,
+                              uint8_t byte);
+int32_t e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index,
+                             uint16_t *data);
+int32_t e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index,
+                             uint32_t size, uint16_t *data);
+int32_t e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset,
+                               uint16_t words, uint16_t *data);
+int32_t e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset,
+                                uint16_t words, uint16_t *data);
+int32_t e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t segment);
+
+
+#define E1000_READ_REG_IO(a, reg) \
+    e1000_read_reg_io((a), E1000_##reg)
+#define E1000_WRITE_REG_IO(a, reg, val) \
+    e1000_write_reg_io((a), E1000_##reg, val)
 
 /* PCI Device IDs */
 #define E1000_DEV_ID_82542               0x1000
@@ -446,6 +486,7 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
 #define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D
 #define E1000_DEV_ID_82541EI             0x1013
 #define E1000_DEV_ID_82541EI_MOBILE      0x1018
+#define E1000_DEV_ID_82541ER_LOM         0x1014
 #define E1000_DEV_ID_82541ER             0x1078
 #define E1000_DEV_ID_82547GI             0x1075
 #define E1000_DEV_ID_82541GI             0x1076
@@ -457,18 +498,28 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
 #define E1000_DEV_ID_82546GB_PCIE        0x108A
 #define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099
 #define E1000_DEV_ID_82547EI             0x1019
+#define E1000_DEV_ID_82547EI_MOBILE      0x101A
 #define E1000_DEV_ID_82571EB_COPPER      0x105E
 #define E1000_DEV_ID_82571EB_FIBER       0x105F
 #define E1000_DEV_ID_82571EB_SERDES      0x1060
 #define E1000_DEV_ID_82572EI_COPPER      0x107D
 #define E1000_DEV_ID_82572EI_FIBER       0x107E
 #define E1000_DEV_ID_82572EI_SERDES      0x107F
+#define E1000_DEV_ID_82572EI             0x10B9
 #define E1000_DEV_ID_82573E              0x108B
 #define E1000_DEV_ID_82573E_IAMT         0x108C
 #define E1000_DEV_ID_82573L              0x109A
 #define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5
 #define E1000_DEV_ID_80003ES2LAN_COPPER_DPT     0x1096
 #define E1000_DEV_ID_80003ES2LAN_SERDES_DPT     0x1098
+#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT     0x10BA
+#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT     0x10BB
+
+#define E1000_DEV_ID_ICH8_IGP_M_AMT      0x1049
+#define E1000_DEV_ID_ICH8_IGP_AMT        0x104A
+#define E1000_DEV_ID_ICH8_IGP_C          0x104B
+#define E1000_DEV_ID_ICH8_IFE            0x104C
+#define E1000_DEV_ID_ICH8_IGP_M          0x104D
 
 
 #define NODE_ADDRESS_SIZE 6
@@ -539,6 +590,14 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
     E1000_IMS_RXSEQ  |    \
     E1000_IMS_LSC)
 
+/* Additional interrupts need to be handled for e1000_ich8lan:
+    DSW = The FW changed the status of the DISSW bit in FWSM
+    PHYINT = The LAN connected device generates an interrupt
+    EPRST = Manageability reset event */
+#define IMS_ICH8LAN_ENABLE_MASK (\
+    E1000_IMS_DSW   | \
+    E1000_IMS_PHYINT | \
+    E1000_IMS_EPRST)
 
 /* Number of high/low register pairs in the RAR. The RAR (Receive Address
  * Registers) holds the directed and multicast addresses that we monitor. We
@@ -546,6 +605,7 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
  * E1000_RAR_ENTRIES - 1 multicast addresses.
  */
 #define E1000_RAR_ENTRIES 15
+#define E1000_RAR_ENTRIES_ICH8LAN  7
 
 #define MIN_NUMBER_OF_DESCRIPTORS 8
 #define MAX_NUMBER_OF_DESCRIPTORS 0xFFF8
@@ -767,6 +827,9 @@ struct e1000_data_desc {
 #define E1000_MC_TBL_SIZE          128  /* Multicast Filter Table (4096 bits) */
 #define E1000_VLAN_FILTER_TBL_SIZE 128  /* VLAN Filter Table (4096 bits) */
 
+#define E1000_NUM_UNICAST_ICH8LAN  7
+#define E1000_MC_TBL_SIZE_ICH8LAN  32
+
 
 /* Receive Address Register */
 struct e1000_rar {
@@ -776,6 +839,7 @@ struct e1000_rar {
 
 /* Number of entries in the Multicast Table Array (MTA). */
 #define E1000_NUM_MTA_REGISTERS 128
+#define E1000_NUM_MTA_REGISTERS_ICH8LAN 32
 
 /* IPv4 Address Table Entry */
 struct e1000_ipv4_at_entry {
@@ -786,6 +850,7 @@ struct e1000_ipv4_at_entry {
 /* Four wakeup IP addresses are supported */
 #define E1000_WAKEUP_IP_ADDRESS_COUNT_MAX 4
 #define E1000_IP4AT_SIZE                  E1000_WAKEUP_IP_ADDRESS_COUNT_MAX
+#define E1000_IP4AT_SIZE_ICH8LAN          3
 #define E1000_IP6AT_SIZE                  1
 
 /* IPv6 Address Table Entry */
@@ -844,6 +909,7 @@ struct e1000_ffvt_entry {
 #define E1000_FLA      0x0001C  /* Flash Access - RW */
 #define E1000_MDIC     0x00020  /* MDI Control - RW */
 #define E1000_SCTL     0x00024  /* SerDes Control - RW */
+#define E1000_FEXTNVM  0x00028  /* Future Extended NVM register */
 #define E1000_FCAL     0x00028  /* Flow Control Address Low - RW */
 #define E1000_FCAH     0x0002C  /* Flow Control Address High -RW */
 #define E1000_FCT      0x00030  /* Flow Control Type - RW */
@@ -872,6 +938,8 @@ struct e1000_ffvt_entry {
 #define E1000_LEDCTL   0x00E00  /* LED Control - RW */
 #define E1000_EXTCNF_CTRL  0x00F00  /* Extended Configuration Control */
 #define E1000_EXTCNF_SIZE  0x00F08  /* Extended Configuration Size */
+#define E1000_PHY_CTRL     0x00F10  /* PHY Control Register in CSR */
+#define FEXTNVM_SW_CONFIG  0x0001
 #define E1000_PBA      0x01000  /* Packet Buffer Allocation - RW */
 #define E1000_PBS      0x01008  /* Packet Buffer Size */
 #define E1000_EEMNGCTL 0x01010  /* MNG EEprom Control */
@@ -899,11 +967,13 @@ struct e1000_ffvt_entry {
 #define E1000_RDH0     E1000_RDH   /* RX Desc Head (0) - RW */
 #define E1000_RDT0     E1000_RDT   /* RX Desc Tail (0) - RW */
 #define E1000_RDTR0    E1000_RDTR  /* RX Delay Timer (0) - RW */
-#define E1000_RXDCTL   0x02828  /* RX Descriptor Control - RW */
+#define E1000_RXDCTL   0x02828  /* RX Descriptor Control queue 0 - RW */
+#define E1000_RXDCTL1  0x02928  /* RX Descriptor Control queue 1 - RW */
 #define E1000_RADV     0x0282C  /* RX Interrupt Absolute Delay Timer - RW */
 #define E1000_RSRPD    0x02C00  /* RX Small Packet Detect - RW */
 #define E1000_RAID     0x02C08  /* Receive Ack Interrupt Delay - RW */
 #define E1000_TXDMAC   0x03000  /* TX DMA Control - RW */
+#define E1000_KABGTXD  0x03004  /* AFE Band Gap Transmit Ref Data */
 #define E1000_TDFH     0x03410  /* TX Data FIFO Head - RW */
 #define E1000_TDFT     0x03418  /* TX Data FIFO Tail - RW */
 #define E1000_TDFHS    0x03420  /* TX Data FIFO Head Saved - RW */
@@ -1050,6 +1120,7 @@ struct e1000_ffvt_entry {
 #define E1000_82542_FLA      E1000_FLA
 #define E1000_82542_MDIC     E1000_MDIC
 #define E1000_82542_SCTL     E1000_SCTL
+#define E1000_82542_FEXTNVM  E1000_FEXTNVM
 #define E1000_82542_FCAL     E1000_FCAL
 #define E1000_82542_FCAH     E1000_FCAH
 #define E1000_82542_FCT      E1000_FCT
@@ -1073,6 +1144,19 @@ struct e1000_ffvt_entry {
 #define E1000_82542_RDLEN0   E1000_82542_RDLEN
 #define E1000_82542_RDH0     E1000_82542_RDH
 #define E1000_82542_RDT0     E1000_82542_RDT
+#define E1000_82542_SRRCTL(_n) (0x280C + ((_n) << 8)) /* Split and Replication
+                                                       * RX Control - RW */
+#define E1000_82542_DCA_RXCTRL(_n) (0x02814 + ((_n) << 8))
+#define E1000_82542_RDBAH3   0x02B04 /* RX Desc Base High Queue 3 - RW */
+#define E1000_82542_RDBAL3   0x02B00 /* RX Desc Low Queue 3 - RW */
+#define E1000_82542_RDLEN3   0x02B08 /* RX Desc Length Queue 3 - RW */
+#define E1000_82542_RDH3     0x02B10 /* RX Desc Head Queue 3 - RW */
+#define E1000_82542_RDT3     0x02B18 /* RX Desc Tail Queue 3 - RW */
+#define E1000_82542_RDBAL2   0x02A00 /* RX Desc Base Low Queue 2 - RW */
+#define E1000_82542_RDBAH2   0x02A04 /* RX Desc Base High Queue 2 - RW */
+#define E1000_82542_RDLEN2   0x02A08 /* RX Desc Length Queue 2 - RW */
+#define E1000_82542_RDH2     0x02A10 /* RX Desc Head Queue 2 - RW */
+#define E1000_82542_RDT2     0x02A18 /* RX Desc Tail Queue 2 - RW */
 #define E1000_82542_RDTR1    0x00130
 #define E1000_82542_RDBAL1   0x00138
 #define E1000_82542_RDBAH1   0x0013C
@@ -1110,11 +1194,14 @@ struct e1000_ffvt_entry {
 #define E1000_82542_FLOP     E1000_FLOP
 #define E1000_82542_EXTCNF_CTRL  E1000_EXTCNF_CTRL
 #define E1000_82542_EXTCNF_SIZE  E1000_EXTCNF_SIZE
+#define E1000_82542_PHY_CTRL E1000_PHY_CTRL
 #define E1000_82542_ERT      E1000_ERT
 #define E1000_82542_RXDCTL   E1000_RXDCTL
+#define E1000_82542_RXDCTL1  E1000_RXDCTL1
 #define E1000_82542_RADV     E1000_RADV
 #define E1000_82542_RSRPD    E1000_RSRPD
 #define E1000_82542_TXDMAC   E1000_TXDMAC
+#define E1000_82542_KABGTXD  E1000_KABGTXD
 #define E1000_82542_TDFHS    E1000_TDFHS
 #define E1000_82542_TDFTS    E1000_TDFTS
 #define E1000_82542_TDFPC    E1000_TDFPC
@@ -1310,13 +1397,16 @@ struct e1000_hw_stats {
 
 /* Structure containing variables used by the shared code (e1000_hw.c) */
 struct e1000_hw {
-    uint8_t __iomem *hw_addr;
+    uint8_t *hw_addr;
     uint8_t *flash_address;
     e1000_mac_type mac_type;
     e1000_phy_type phy_type;
     uint32_t phy_init_script;
     e1000_media_type media_type;
     void *back;
+    struct e1000_shadow_ram *eeprom_shadow_ram;
+    uint32_t flash_bank_size;
+    uint32_t flash_base_addr;
     e1000_fc_type fc;
     e1000_bus_speed bus_speed;
     e1000_bus_width bus_width;
@@ -1328,6 +1418,7 @@ struct e1000_hw {
     uint32_t asf_firmware_present;
     uint32_t eeprom_semaphore_present;
     uint32_t swfw_sync_present;
+    uint32_t swfwhw_semaphore_present;
     unsigned long io_base;
     uint32_t phy_id;
     uint32_t phy_revision;
@@ -1387,6 +1478,7 @@ struct e1000_hw {
     boolean_t in_ifs_mode;
     boolean_t mng_reg_access_disabled;
     boolean_t leave_av_bit_off;
+    boolean_t kmrn_lock_loss_workaround_disabled;
 };
 
 
@@ -1435,6 +1527,7 @@ struct e1000_hw {
 #define E1000_CTRL_RTE      0x20000000  /* Routing tag enable */
 #define E1000_CTRL_VME      0x40000000  /* IEEE VLAN mode enable */
 #define E1000_CTRL_PHY_RST  0x80000000  /* PHY Reset */
+#define E1000_CTRL_SW2FW_INT 0x02000000  /* Initiate an interrupt to manageability engine */
 
 /* Device Status */
 #define E1000_STATUS_FD         0x00000001      /* Full duplex.0=half,1=full */
@@ -1449,6 +1542,8 @@ struct e1000_hw {
 #define E1000_STATUS_SPEED_10   0x00000000      /* Speed 10Mb/s */
 #define E1000_STATUS_SPEED_100  0x00000040      /* Speed 100Mb/s */
 #define E1000_STATUS_SPEED_1000 0x00000080      /* Speed 1000Mb/s */
+#define E1000_STATUS_LAN_INIT_DONE 0x00000200   /* Lan Init Completion
+                                                   by EEPROM/Flash */
 #define E1000_STATUS_ASDV       0x00000300      /* Auto speed detect value */
 #define E1000_STATUS_DOCK_CI    0x00000800      /* Change in Dock/Undock state. Clear on write '0'. */
 #define E1000_STATUS_GIO_MASTER_ENABLE 0x00080000 /* Status of Master requests. */
@@ -1506,6 +1601,10 @@ struct e1000_hw {
 #define E1000_STM_OPCODE     0xDB00
 #define E1000_HICR_FW_RESET  0xC0
 
+#define E1000_SHADOW_RAM_WORDS     2048
+#define E1000_ICH8_NVM_SIG_WORD    0x13
+#define E1000_ICH8_NVM_SIG_MASK    0xC0
+
 /* EEPROM Read */
 #define E1000_EERD_START      0x00000001 /* Start Read */
 #define E1000_EERD_DONE       0x00000010 /* Read Done */
@@ -1551,7 +1650,6 @@ struct e1000_hw {
 #define E1000_CTRL_EXT_WR_WMARK_320   0x01000000
 #define E1000_CTRL_EXT_WR_WMARK_384   0x02000000
 #define E1000_CTRL_EXT_WR_WMARK_448   0x03000000
-#define E1000_CTRL_EXT_CANC           0x04000000  /* Interrupt delay cancellation */
 #define E1000_CTRL_EXT_DRV_LOAD       0x10000000  /* Driver loaded bit for FW */
 #define E1000_CTRL_EXT_IAME           0x08000000  /* Interrupt acknowledge Auto-mask */
 #define E1000_CTRL_EXT_INT_TIMER_CLR  0x20000000  /* Clear Interrupt timers after IMS clear */
@@ -1591,12 +1689,31 @@ struct e1000_hw {
 #define E1000_KUMCTRLSTA_FIFO_CTRL_TX_BYPASS   0x00000800
 
 /* In-Band Control */
+#define E1000_KUMCTRLSTA_INB_CTRL_LINK_STATUS_TX_TIMEOUT_DEFAULT    0x00000500
 #define E1000_KUMCTRLSTA_INB_CTRL_DIS_PADDING  0x00000010
 
 /* Half-Duplex Control */
 #define E1000_KUMCTRLSTA_HD_CTRL_10_100_DEFAULT 0x00000004
 #define E1000_KUMCTRLSTA_HD_CTRL_1000_DEFAULT  0x00000000
 
+#define E1000_KUMCTRLSTA_OFFSET_K0S_CTRL       0x0000001E
+
+#define E1000_KUMCTRLSTA_DIAG_FELPBK           0x2000
+#define E1000_KUMCTRLSTA_DIAG_NELPBK           0x1000
+
+#define E1000_KUMCTRLSTA_K0S_100_EN            0x2000
+#define E1000_KUMCTRLSTA_K0S_GBE_EN            0x1000
+#define E1000_KUMCTRLSTA_K0S_ENTRY_LATENCY_MASK   0x0003
+
+#define E1000_KABGTXD_BGSQLBIAS                0x00050000
+
+#define E1000_PHY_CTRL_SPD_EN                  0x00000001
+#define E1000_PHY_CTRL_D0A_LPLU                0x00000002
+#define E1000_PHY_CTRL_NOND0A_LPLU             0x00000004
+#define E1000_PHY_CTRL_NOND0A_GBE_DISABLE      0x00000008
+#define E1000_PHY_CTRL_GBE_DISABLE             0x00000040
+#define E1000_PHY_CTRL_B2B_EN                  0x00000080
+
 /* LED Control */
 #define E1000_LEDCTL_LED0_MODE_MASK       0x0000000F
 #define E1000_LEDCTL_LED0_MODE_SHIFT      0
@@ -1666,6 +1783,9 @@ struct e1000_hw {
 #define E1000_ICR_RXD_FIFO_PAR1 0x01000000 /* queue 1 Rx descriptor FIFO parity error */
 #define E1000_ICR_TXD_FIFO_PAR1 0x02000000 /* queue 1 Tx descriptor FIFO parity error */
 #define E1000_ICR_ALL_PARITY    0x03F00000 /* all parity error bits */
+#define E1000_ICR_DSW           0x00000020 /* FW changed the status of DISSW bit in the FWSM */
+#define E1000_ICR_PHYINT        0x00001000 /* LAN connected device generates an interrupt */
+#define E1000_ICR_EPRST         0x00100000 /* ME handware reset occurs */
 
 /* Interrupt Cause Set */
 #define E1000_ICS_TXDW      E1000_ICR_TXDW      /* Transmit desc written back */
@@ -1692,6 +1812,9 @@ struct e1000_hw {
 #define E1000_ICS_PB_PAR        E1000_ICR_PB_PAR        /* packet buffer parity error */
 #define E1000_ICS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */
 #define E1000_ICS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */
+#define E1000_ICS_DSW       E1000_ICR_DSW
+#define E1000_ICS_PHYINT    E1000_ICR_PHYINT
+#define E1000_ICS_EPRST     E1000_ICR_EPRST
 
 /* Interrupt Mask Set */
 #define E1000_IMS_TXDW      E1000_ICR_TXDW      /* Transmit desc written back */
@@ -1718,6 +1841,9 @@ struct e1000_hw {
 #define E1000_IMS_PB_PAR        E1000_ICR_PB_PAR        /* packet buffer parity error */
 #define E1000_IMS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */
 #define E1000_IMS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */
+#define E1000_IMS_DSW       E1000_ICR_DSW
+#define E1000_IMS_PHYINT    E1000_ICR_PHYINT
+#define E1000_IMS_EPRST     E1000_ICR_EPRST
 
 /* Interrupt Mask Clear */
 #define E1000_IMC_TXDW      E1000_ICR_TXDW      /* Transmit desc written back */
@@ -1744,6 +1870,9 @@ struct e1000_hw {
 #define E1000_IMC_PB_PAR        E1000_ICR_PB_PAR        /* packet buffer parity error */
 #define E1000_IMC_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */
 #define E1000_IMC_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */
+#define E1000_IMC_DSW       E1000_ICR_DSW
+#define E1000_IMC_PHYINT    E1000_ICR_PHYINT
+#define E1000_IMC_EPRST     E1000_ICR_EPRST
 
 /* Receive Control */
 #define E1000_RCTL_RST            0x00000001    /* Software reset */
@@ -1918,9 +2047,10 @@ struct e1000_hw {
 #define E1000_MRQC_RSS_FIELD_MASK           0xFFFF0000
 #define E1000_MRQC_RSS_FIELD_IPV4_TCP       0x00010000
 #define E1000_MRQC_RSS_FIELD_IPV4           0x00020000
-#define E1000_MRQC_RSS_FIELD_IPV6_TCP       0x00040000
+#define E1000_MRQC_RSS_FIELD_IPV6_TCP_EX    0x00040000
 #define E1000_MRQC_RSS_FIELD_IPV6_EX        0x00080000
 #define E1000_MRQC_RSS_FIELD_IPV6           0x00100000
+#define E1000_MRQC_RSS_FIELD_IPV6_TCP       0x00200000
 
 /* Definitions for power management and wakeup registers */
 /* Wake Up Control */
@@ -2010,6 +2140,15 @@ struct e1000_hw {
 #define E1000_FWSM_MODE_SHIFT            1
 #define E1000_FWSM_FW_VALID     0x00008000 /* FW established a valid mode */
 
+#define E1000_FWSM_RSPCIPHY        0x00000040 /* Reset PHY on PCI reset */
+#define E1000_FWSM_DISSW           0x10000000 /* FW disable SW Write Access */
+#define E1000_FWSM_SKUSEL_MASK     0x60000000 /* LAN SKU select */
+#define E1000_FWSM_SKUEL_SHIFT     29
+#define E1000_FWSM_SKUSEL_EMB      0x0 /* Embedded SKU */
+#define E1000_FWSM_SKUSEL_CONS     0x1 /* Consumer SKU */
+#define E1000_FWSM_SKUSEL_PERF_100 0x2 /* Perf & Corp 10/100 SKU */
+#define E1000_FWSM_SKUSEL_PERF_GBE 0x3 /* Perf & Copr GbE SKU */
+
 /* FFLT Debug Register */
 #define E1000_FFLT_DBG_INVC     0x00100000 /* Invalid /C/ code handling */
 
@@ -2082,6 +2221,8 @@ struct e1000_host_command_info {
                              E1000_GCR_TXDSCW_NO_SNOOP      | \
                              E1000_GCR_TXDSCR_NO_SNOOP)
 
+#define PCI_EX_82566_SNOOP_ALL PCI_EX_NO_SNOOP_ALL
+
 #define E1000_GCR_L1_ACT_WITHOUT_L0S_RX 0x08000000
 /* Function Active and Power State to MNG */
 #define E1000_FACTPS_FUNC0_POWER_STATE_MASK         0x00000003
@@ -2140,8 +2281,10 @@ struct e1000_host_command_info {
 #define EEPROM_PHY_CLASS_WORD         0x0007
 #define EEPROM_INIT_CONTROL1_REG      0x000A
 #define EEPROM_INIT_CONTROL2_REG      0x000F
+#define EEPROM_SWDEF_PINS_CTRL_PORT_1 0x0010
 #define EEPROM_INIT_CONTROL3_PORT_B   0x0014
 #define EEPROM_INIT_3GIO_3            0x001A
+#define EEPROM_SWDEF_PINS_CTRL_PORT_0 0x0020
 #define EEPROM_INIT_CONTROL3_PORT_A   0x0024
 #define EEPROM_CFG                    0x0012
 #define EEPROM_FLASH_VERSION          0x0032
@@ -2153,10 +2296,16 @@ struct e1000_host_command_info {
 /* Word definitions for ID LED Settings */
 #define ID_LED_RESERVED_0000 0x0000
 #define ID_LED_RESERVED_FFFF 0xFFFF
+#define ID_LED_RESERVED_82573  0xF746
+#define ID_LED_DEFAULT_82573   0x1811
 #define ID_LED_DEFAULT       ((ID_LED_OFF1_ON2 << 12) | \
                               (ID_LED_OFF1_OFF2 << 8) | \
                               (ID_LED_DEF1_DEF2 << 4) | \
                               (ID_LED_DEF1_DEF2))
+#define ID_LED_DEFAULT_ICH8LAN  ((ID_LED_DEF1_DEF2 << 12) | \
+                                 (ID_LED_DEF1_OFF2 <<  8) | \
+                                 (ID_LED_DEF1_ON2  <<  4) | \
+                                 (ID_LED_DEF1_DEF2))
 #define ID_LED_DEF1_DEF2     0x1
 #define ID_LED_DEF1_ON2      0x2
 #define ID_LED_DEF1_OFF2     0x3
@@ -2191,6 +2340,11 @@ struct e1000_host_command_info {
 #define EEPROM_WORD0F_ASM_DIR    0x2000
 #define EEPROM_WORD0F_ANE        0x0800
 #define EEPROM_WORD0F_SWPDIO_EXT 0x00F0
+#define EEPROM_WORD0F_LPLU       0x0001
+
+/* Mask bits for fields in Word 0x10/0x20 of the EEPROM */
+#define EEPROM_WORD1020_GIGA_DISABLE         0x0010
+#define EEPROM_WORD1020_GIGA_DISABLE_NON_D0A 0x0008
 
 /* Mask bits for fields in Word 0x1a of the EEPROM */
 #define EEPROM_WORD1A_ASPM_MASK  0x000C
@@ -2265,23 +2419,29 @@ struct e1000_host_command_info {
 #define E1000_EXTCNF_CTRL_D_UD_OWNER        0x00000010
 #define E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP 0x00000020
 #define E1000_EXTCNF_CTRL_MDIO_HW_OWNERSHIP 0x00000040
-#define E1000_EXTCNF_CTRL_EXT_CNF_POINTER   0x1FFF0000
+#define E1000_EXTCNF_CTRL_EXT_CNF_POINTER   0x0FFF0000
 
 #define E1000_EXTCNF_SIZE_EXT_PHY_LENGTH    0x000000FF
 #define E1000_EXTCNF_SIZE_EXT_DOCK_LENGTH   0x0000FF00
 #define E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH   0x00FF0000
+#define E1000_EXTCNF_CTRL_LCD_WRITE_ENABLE  0x00000001
+#define E1000_EXTCNF_CTRL_SWFLAG            0x00000020
 
 /* PBA constants */
+#define E1000_PBA_8K 0x0008    /* 8KB, default Rx allocation */
 #define E1000_PBA_12K 0x000C    /* 12KB, default Rx allocation */
 #define E1000_PBA_16K 0x0010    /* 16KB, default TX allocation */
 #define E1000_PBA_22K 0x0016
 #define E1000_PBA_24K 0x0018
 #define E1000_PBA_30K 0x001E
 #define E1000_PBA_32K 0x0020
+#define E1000_PBA_34K 0x0022
 #define E1000_PBA_38K 0x0026
 #define E1000_PBA_40K 0x0028
 #define E1000_PBA_48K 0x0030    /* 48KB, default RX allocation */
 
+#define E1000_PBS_16K E1000_PBA_16K
+
 /* Flow Control Constants */
 #define FLOW_CONTROL_ADDRESS_LOW  0x00C28001
 #define FLOW_CONTROL_ADDRESS_HIGH 0x00000100
@@ -2336,7 +2496,7 @@ struct e1000_host_command_info {
 /* Number of milliseconds we wait for Eeprom auto read bit done after MAC reset */
 #define AUTO_READ_DONE_TIMEOUT      10
 /* Number of milliseconds we wait for PHY configuration done after MAC reset */
-#define PHY_CFG_TIMEOUT             40
+#define PHY_CFG_TIMEOUT             100
 
 #define E1000_TX_BUFFER_SIZE ((uint32_t)1514)
 
@@ -2764,6 +2924,17 @@ struct e1000_host_command_info {
 #define M88E1000_EPSCR_TX_CLK_25      0x0070 /* 25  MHz TX_CLK */
 #define M88E1000_EPSCR_TX_CLK_0       0x0000 /* NO  TX_CLK */
 
+/* M88EC018 Rev 2 specific DownShift settings */
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK  0x0E00
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_1X    0x0000
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_2X    0x0200
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_3X    0x0400
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_4X    0x0600
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X    0x0800
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_6X    0x0A00
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_7X    0x0C00
+#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_8X    0x0E00
+
 /* IGP01E1000 Specific Port Config Register - R/W */
 #define IGP01E1000_PSCFR_AUTO_MDIX_PAR_DETECT  0x0010
 #define IGP01E1000_PSCFR_PRE_EN                0x0020
@@ -2990,6 +3161,221 @@ struct e1000_host_command_info {
 #define L1LXT971A_PHY_ID   0x001378E0
 #define GG82563_E_PHY_ID   0x01410CA0
 
+
+/* Bits...
+ * 15-5: page
+ * 4-0: register offset
+ */
+#define PHY_PAGE_SHIFT        5
+#define PHY_REG(page, reg)    \
+        (((page) << PHY_PAGE_SHIFT) | ((reg) & MAX_PHY_REG_ADDRESS))
+
+#define IGP3_PHY_PORT_CTRL           \
+        PHY_REG(769, 17) /* Port General Configuration */
+#define IGP3_PHY_RATE_ADAPT_CTRL \
+        PHY_REG(769, 25) /* Rate Adapter Control Register */
+
+#define IGP3_KMRN_FIFO_CTRL_STATS \
+        PHY_REG(770, 16) /* KMRN FIFO's control/status register */
+#define IGP3_KMRN_POWER_MNG_CTRL \
+        PHY_REG(770, 17) /* KMRN Power Management Control Register */
+#define IGP3_KMRN_INBAND_CTRL \
+        PHY_REG(770, 18) /* KMRN Inband Control Register */
+#define IGP3_KMRN_DIAG \
+        PHY_REG(770, 19) /* KMRN Diagnostic register */
+#define IGP3_KMRN_DIAG_PCS_LOCK_LOSS 0x0002 /* RX PCS is not synced */
+#define IGP3_KMRN_ACK_TIMEOUT \
+        PHY_REG(770, 20) /* KMRN Acknowledge Timeouts register */
+
+#define IGP3_VR_CTRL \
+        PHY_REG(776, 18) /* Voltage regulator control register */
+#define IGP3_VR_CTRL_MODE_SHUT       0x0200 /* Enter powerdown, shutdown VRs */
+
+#define IGP3_CAPABILITY \
+        PHY_REG(776, 19) /* IGP3 Capability Register */
+
+/* Capabilities for SKU Control  */
+#define IGP3_CAP_INITIATE_TEAM       0x0001 /* Able to initiate a team */
+#define IGP3_CAP_WFM                 0x0002 /* Support WoL and PXE */
+#define IGP3_CAP_ASF                 0x0004 /* Support ASF */
+#define IGP3_CAP_LPLU                0x0008 /* Support Low Power Link Up */
+#define IGP3_CAP_DC_AUTO_SPEED       0x0010 /* Support AC/DC Auto Link Speed */
+#define IGP3_CAP_SPD                 0x0020 /* Support Smart Power Down */
+#define IGP3_CAP_MULT_QUEUE          0x0040 /* Support 2 tx & 2 rx queues */
+#define IGP3_CAP_RSS                 0x0080 /* Support RSS */
+#define IGP3_CAP_8021PQ              0x0100 /* Support 802.1Q & 802.1p */
+#define IGP3_CAP_AMT_CB              0x0200 /* Support active manageability and circuit breaker */
+
+#define IGP3_PPC_JORDAN_EN           0x0001
+#define IGP3_PPC_JORDAN_GIGA_SPEED   0x0002
+
+#define IGP3_KMRN_PMC_EE_IDLE_LINK_DIS         0x0001
+#define IGP3_KMRN_PMC_K0S_ENTRY_LATENCY_MASK   0x001E
+#define IGP3_KMRN_PMC_K0S_MODE1_EN_GIGA        0x0020
+#define IGP3_KMRN_PMC_K0S_MODE1_EN_100         0x0040
+
+#define IGP3E1000_PHY_MISC_CTRL                0x1B   /* Misc. Ctrl register */
+#define IGP3_PHY_MISC_DUPLEX_MANUAL_SET        0x1000 /* Duplex Manual Set */
+
+#define IGP3_KMRN_EXT_CTRL  PHY_REG(770, 18)
+#define IGP3_KMRN_EC_DIS_INBAND    0x0080
+
+#define IGP03E1000_E_PHY_ID  0x02A80390
+#define IFE_E_PHY_ID         0x02A80330 /* 10/100 PHY */
+#define IFE_PLUS_E_PHY_ID    0x02A80320
+#define IFE_C_E_PHY_ID       0x02A80310
+
+#define IFE_PHY_EXTENDED_STATUS_CONTROL   0x10  /* 100BaseTx Extended Status, Control and Address */
+#define IFE_PHY_SPECIAL_CONTROL           0x11  /* 100BaseTx PHY special control register */
+#define IFE_PHY_RCV_FALSE_CARRIER         0x13  /* 100BaseTx Receive False Carrier Counter */
+#define IFE_PHY_RCV_DISCONNECT            0x14  /* 100BaseTx Receive Disconnet Counter */
+#define IFE_PHY_RCV_ERROT_FRAME           0x15  /* 100BaseTx Receive Error Frame Counter */
+#define IFE_PHY_RCV_SYMBOL_ERR            0x16  /* Receive Symbol Error Counter */
+#define IFE_PHY_PREM_EOF_ERR              0x17  /* 100BaseTx Receive Premature End Of Frame Error Counter */
+#define IFE_PHY_RCV_EOF_ERR               0x18  /* 10BaseT Receive End Of Frame Error Counter */
+#define IFE_PHY_TX_JABBER_DETECT          0x19  /* 10BaseT Transmit Jabber Detect Counter */
+#define IFE_PHY_EQUALIZER                 0x1A  /* PHY Equalizer Control and Status */
+#define IFE_PHY_SPECIAL_CONTROL_LED       0x1B  /* PHY special control and LED configuration */
+#define IFE_PHY_MDIX_CONTROL              0x1C  /* MDI/MDI-X Control register */
+#define IFE_PHY_HWI_CONTROL               0x1D  /* Hardware Integrity Control (HWI) */
+
+#define IFE_PESC_REDUCED_POWER_DOWN_DISABLE  0x2000  /* Defaut 1 = Disable auto reduced power down */
+#define IFE_PESC_100BTX_POWER_DOWN           0x0400  /* Indicates the power state of 100BASE-TX */
+#define IFE_PESC_10BTX_POWER_DOWN            0x0200  /* Indicates the power state of 10BASE-T */
+#define IFE_PESC_POLARITY_REVERSED           0x0100  /* Indicates 10BASE-T polarity */
+#define IFE_PESC_PHY_ADDR_MASK               0x007C  /* Bit 6:2 for sampled PHY address */
+#define IFE_PESC_SPEED                       0x0002  /* Auto-negotiation speed result 1=100Mbs, 0=10Mbs */
+#define IFE_PESC_DUPLEX                      0x0001  /* Auto-negotiation duplex result 1=Full, 0=Half */
+#define IFE_PESC_POLARITY_REVERSED_SHIFT     8
+
+#define IFE_PSC_DISABLE_DYNAMIC_POWER_DOWN   0x0100  /* 1 = Dyanmic Power Down disabled */
+#define IFE_PSC_FORCE_POLARITY               0x0020  /* 1=Reversed Polarity, 0=Normal */
+#define IFE_PSC_AUTO_POLARITY_DISABLE        0x0010  /* 1=Auto Polarity Disabled, 0=Enabled */
+#define IFE_PSC_JABBER_FUNC_DISABLE          0x0001  /* 1=Jabber Disabled, 0=Normal Jabber Operation */
+#define IFE_PSC_FORCE_POLARITY_SHIFT         5
+#define IFE_PSC_AUTO_POLARITY_DISABLE_SHIFT  4
+
+#define IFE_PMC_AUTO_MDIX                    0x0080  /* 1=enable MDI/MDI-X feature, default 0=disabled */
+#define IFE_PMC_FORCE_MDIX                   0x0040  /* 1=force MDIX-X, 0=force MDI */
+#define IFE_PMC_MDIX_STATUS                  0x0020  /* 1=MDI-X, 0=MDI */
+#define IFE_PMC_AUTO_MDIX_COMPLETE           0x0010  /* Resolution algorthm is completed */
+#define IFE_PMC_MDIX_MODE_SHIFT              6
+#define IFE_PHC_MDIX_RESET_ALL_MASK          0x0000  /* Disable auto MDI-X */
+
+#define IFE_PHC_HWI_ENABLE                   0x8000  /* Enable the HWI feature */
+#define IFE_PHC_ABILITY_CHECK                0x4000  /* 1= Test Passed, 0=failed */
+#define IFE_PHC_TEST_EXEC                    0x2000  /* PHY launch test pulses on the wire */
+#define IFE_PHC_HIGHZ                        0x0200  /* 1 = Open Circuit */
+#define IFE_PHC_LOWZ                         0x0400  /* 1 = Short Circuit */
+#define IFE_PHC_LOW_HIGH_Z_MASK              0x0600  /* Mask for indication type of problem on the line */
+#define IFE_PHC_DISTANCE_MASK                0x01FF  /* Mask for distance to the cable problem, in 80cm granularity */
+#define IFE_PHC_RESET_ALL_MASK               0x0000  /* Disable HWI */
+#define IFE_PSCL_PROBE_MODE                  0x0020  /* LED Probe mode */
+#define IFE_PSCL_PROBE_LEDS_OFF              0x0006  /* Force LEDs 0 and 2 off */
+#define IFE_PSCL_PROBE_LEDS_ON               0x0007  /* Force LEDs 0 and 2 on */
+
+#define ICH8_FLASH_COMMAND_TIMEOUT           500   /* 500 ms , should be adjusted */
+#define ICH8_FLASH_CYCLE_REPEAT_COUNT        10    /* 10 cycles , should be adjusted */
+#define ICH8_FLASH_SEG_SIZE_256              256
+#define ICH8_FLASH_SEG_SIZE_4K               4096
+#define ICH8_FLASH_SEG_SIZE_64K              65536
+
+#define ICH8_CYCLE_READ                      0x0
+#define ICH8_CYCLE_RESERVED                  0x1
+#define ICH8_CYCLE_WRITE                     0x2
+#define ICH8_CYCLE_ERASE                     0x3
+
+#define ICH8_FLASH_GFPREG   0x0000
+#define ICH8_FLASH_HSFSTS   0x0004
+#define ICH8_FLASH_HSFCTL   0x0006
+#define ICH8_FLASH_FADDR    0x0008
+#define ICH8_FLASH_FDATA0   0x0010
+#define ICH8_FLASH_FRACC    0x0050
+#define ICH8_FLASH_FREG0    0x0054
+#define ICH8_FLASH_FREG1    0x0058
+#define ICH8_FLASH_FREG2    0x005C
+#define ICH8_FLASH_FREG3    0x0060
+#define ICH8_FLASH_FPR0     0x0074
+#define ICH8_FLASH_FPR1     0x0078
+#define ICH8_FLASH_SSFSTS   0x0090
+#define ICH8_FLASH_SSFCTL   0x0092
+#define ICH8_FLASH_PREOP    0x0094
+#define ICH8_FLASH_OPTYPE   0x0096
+#define ICH8_FLASH_OPMENU   0x0098
+
+#define ICH8_FLASH_REG_MAPSIZE      0x00A0
+#define ICH8_FLASH_SECTOR_SIZE      4096
+#define ICH8_GFPREG_BASE_MASK       0x1FFF
+#define ICH8_FLASH_LINEAR_ADDR_MASK 0x00FFFFFF
+
+/* ICH8 GbE Flash Hardware Sequencing Flash Status Register bit breakdown */
+/* Offset 04h HSFSTS */
+union ich8_hws_flash_status {
+    struct ich8_hsfsts {
+#ifdef E1000_BIG_ENDIAN
+        uint16_t reserved2      :6;
+        uint16_t fldesvalid     :1;
+        uint16_t flockdn        :1;
+        uint16_t flcdone        :1;
+        uint16_t flcerr         :1;
+        uint16_t dael           :1;
+        uint16_t berasesz       :2;
+        uint16_t flcinprog      :1;
+        uint16_t reserved1      :2;
+#else
+        uint16_t flcdone        :1;   /* bit 0 Flash Cycle Done */
+        uint16_t flcerr         :1;   /* bit 1 Flash Cycle Error */
+        uint16_t dael           :1;   /* bit 2 Direct Access error Log */
+        uint16_t berasesz       :2;   /* bit 4:3 Block/Sector Erase Size */
+        uint16_t flcinprog      :1;   /* bit 5 flash SPI cycle in Progress */
+        uint16_t reserved1      :2;   /* bit 13:6 Reserved */
+        uint16_t reserved2      :6;   /* bit 13:6 Reserved */
+        uint16_t fldesvalid     :1;   /* bit 14 Flash Descriptor Valid */
+        uint16_t flockdn        :1;   /* bit 15 Flash Configuration Lock-Down */
+#endif
+    } hsf_status;
+    uint16_t regval;
+};
+
+/* ICH8 GbE Flash Hardware Sequencing Flash control Register bit breakdown */
+/* Offset 06h FLCTL */
+union ich8_hws_flash_ctrl {
+    struct ich8_hsflctl {
+#ifdef E1000_BIG_ENDIAN
+        uint16_t fldbcount      :2;
+        uint16_t flockdn        :6;
+        uint16_t flcgo          :1;
+        uint16_t flcycle        :2;
+        uint16_t reserved       :5;
+#else
+        uint16_t flcgo          :1;   /* 0 Flash Cycle Go */
+        uint16_t flcycle        :2;   /* 2:1 Flash Cycle */
+        uint16_t reserved       :5;   /* 7:3 Reserved  */
+        uint16_t fldbcount      :2;   /* 9:8 Flash Data Byte Count */
+        uint16_t flockdn        :6;   /* 15:10 Reserved */
+#endif
+    } hsf_ctrl;
+    uint16_t regval;
+};
+
+/* ICH8 Flash Region Access Permissions */
+union ich8_hws_flash_regacc {
+    struct ich8_flracc {
+#ifdef E1000_BIG_ENDIAN
+        uint32_t gmwag          :8;
+        uint32_t gmrag          :8;
+        uint32_t grwa           :8;
+        uint32_t grra           :8;
+#else
+        uint32_t grra           :8;   /* 0:7 GbE region Read Access */
+        uint32_t grwa           :8;   /* 8:15 GbE region Write Access */
+        uint32_t gmrag          :8;   /* 23:16 GbE Master Read Access Grant  */
+        uint32_t gmwag          :8;   /* 31:24 GbE Master Write Access Grant */
+#endif
+    } hsf_flregacc;
+    uint16_t regval;
+};
+
 /* Miscellaneous PHY bit definitions. */
 #define PHY_PREAMBLE        0xFFFFFFFF
 #define PHY_SOF             0x01
index f77624f5f17bf33b0b23c3e2b6d31a25c795f0b2..da62db8974265229fa4a1729efdabe30ec77e902 100644 (file)
@@ -36,7 +36,7 @@ static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
 #else
 #define DRIVERNAPI "-NAPI"
 #endif
-#define DRV_VERSION "7.0.38-k4"DRIVERNAPI
+#define DRV_VERSION "7.1.9-k4"DRIVERNAPI
 char e1000_driver_version[] = DRV_VERSION;
 static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
 
@@ -73,6 +73,11 @@ static struct pci_device_id e1000_pci_tbl[] = {
        INTEL_E1000_ETHERNET_DEVICE(0x1026),
        INTEL_E1000_ETHERNET_DEVICE(0x1027),
        INTEL_E1000_ETHERNET_DEVICE(0x1028),
+       INTEL_E1000_ETHERNET_DEVICE(0x1049),
+       INTEL_E1000_ETHERNET_DEVICE(0x104A),
+       INTEL_E1000_ETHERNET_DEVICE(0x104B),
+       INTEL_E1000_ETHERNET_DEVICE(0x104C),
+       INTEL_E1000_ETHERNET_DEVICE(0x104D),
        INTEL_E1000_ETHERNET_DEVICE(0x105E),
        INTEL_E1000_ETHERNET_DEVICE(0x105F),
        INTEL_E1000_ETHERNET_DEVICE(0x1060),
@@ -96,6 +101,8 @@ static struct pci_device_id e1000_pci_tbl[] = {
        INTEL_E1000_ETHERNET_DEVICE(0x109A),
        INTEL_E1000_ETHERNET_DEVICE(0x10B5),
        INTEL_E1000_ETHERNET_DEVICE(0x10B9),
+       INTEL_E1000_ETHERNET_DEVICE(0x10BA),
+       INTEL_E1000_ETHERNET_DEVICE(0x10BB),
        /* required last entry */
        {0,}
 };
@@ -133,7 +140,6 @@ static void e1000_clean_rx_ring(struct e1000_adapter *adapter,
 static void e1000_set_multi(struct net_device *netdev);
 static void e1000_update_phy_info(unsigned long data);
 static void e1000_watchdog(unsigned long data);
-static void e1000_watchdog_task(struct e1000_adapter *adapter);
 static void e1000_82547_tx_fifo_stall(unsigned long data);
 static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev);
 static struct net_device_stats * e1000_get_stats(struct net_device *netdev);
@@ -178,8 +184,8 @@ static void e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid);
 static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
 static void e1000_restore_vlan(struct e1000_adapter *adapter);
 
-#ifdef CONFIG_PM
 static int e1000_suspend(struct pci_dev *pdev, pm_message_t state);
+#ifdef CONFIG_PM
 static int e1000_resume(struct pci_dev *pdev);
 #endif
 static void e1000_shutdown(struct pci_dev *pdev);
@@ -206,8 +212,8 @@ static struct pci_driver e1000_driver = {
        .probe    = e1000_probe,
        .remove   = __devexit_p(e1000_remove),
        /* Power Managment Hooks */
-#ifdef CONFIG_PM
        .suspend  = e1000_suspend,
+#ifdef CONFIG_PM
        .resume   = e1000_resume,
 #endif
        .shutdown = e1000_shutdown,
@@ -261,6 +267,44 @@ e1000_exit_module(void)
 
 module_exit(e1000_exit_module);
 
+static int e1000_request_irq(struct e1000_adapter *adapter)
+{
+       struct net_device *netdev = adapter->netdev;
+       int flags, err = 0;
+
+       flags = IRQF_SHARED;
+#ifdef CONFIG_PCI_MSI
+       if (adapter->hw.mac_type > e1000_82547_rev_2) {
+               adapter->have_msi = TRUE;
+               if ((err = pci_enable_msi(adapter->pdev))) {
+                       DPRINTK(PROBE, ERR,
+                        "Unable to allocate MSI interrupt Error: %d\n", err);
+                       adapter->have_msi = FALSE;
+               }
+       }
+       if (adapter->have_msi)
+               flags &= ~IRQF_SHARED;
+#endif
+       if ((err = request_irq(adapter->pdev->irq, &e1000_intr, flags,
+                              netdev->name, netdev)))
+               DPRINTK(PROBE, ERR,
+                       "Unable to allocate interrupt Error: %d\n", err);
+
+       return err;
+}
+
+static void e1000_free_irq(struct e1000_adapter *adapter)
+{
+       struct net_device *netdev = adapter->netdev;
+
+       free_irq(adapter->pdev->irq, netdev);
+
+#ifdef CONFIG_PCI_MSI
+       if (adapter->have_msi)
+               pci_disable_msi(adapter->pdev);
+#endif
+}
+
 /**
  * e1000_irq_disable - Mask off interrupt generation on the NIC
  * @adapter: board private structure
@@ -329,6 +373,7 @@ e1000_release_hw_control(struct e1000_adapter *adapter)
 {
        uint32_t ctrl_ext;
        uint32_t swsm;
+       uint32_t extcnf;
 
        /* Let firmware taken over control of h/w */
        switch (adapter->hw.mac_type) {
@@ -343,6 +388,11 @@ e1000_release_hw_control(struct e1000_adapter *adapter)
                swsm = E1000_READ_REG(&adapter->hw, SWSM);
                E1000_WRITE_REG(&adapter->hw, SWSM,
                                swsm & ~E1000_SWSM_DRV_LOAD);
+       case e1000_ich8lan:
+               extcnf = E1000_READ_REG(&adapter->hw, CTRL_EXT);
+               E1000_WRITE_REG(&adapter->hw, CTRL_EXT,
+                               extcnf & ~E1000_CTRL_EXT_DRV_LOAD);
+               break;
        default:
                break;
        }
@@ -364,6 +414,7 @@ e1000_get_hw_control(struct e1000_adapter *adapter)
 {
        uint32_t ctrl_ext;
        uint32_t swsm;
+       uint32_t extcnf;
        /* Let firmware know the driver has taken over */
        switch (adapter->hw.mac_type) {
        case e1000_82571:
@@ -378,6 +429,11 @@ e1000_get_hw_control(struct e1000_adapter *adapter)
                E1000_WRITE_REG(&adapter->hw, SWSM,
                                swsm | E1000_SWSM_DRV_LOAD);
                break;
+       case e1000_ich8lan:
+               extcnf = E1000_READ_REG(&adapter->hw, EXTCNF_CTRL);
+               E1000_WRITE_REG(&adapter->hw, EXTCNF_CTRL,
+                               extcnf | E1000_EXTCNF_CTRL_SWFLAG);
+               break;
        default:
                break;
        }
@@ -387,18 +443,10 @@ int
 e1000_up(struct e1000_adapter *adapter)
 {
        struct net_device *netdev = adapter->netdev;
-       int i, err;
+       int i;
 
        /* hardware has been reset, we need to reload some things */
 
-       /* Reset the PHY if it was previously powered down */
-       if (adapter->hw.media_type == e1000_media_type_copper) {
-               uint16_t mii_reg;
-               e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg);
-               if (mii_reg & MII_CR_POWER_DOWN)
-                       e1000_phy_hw_reset(&adapter->hw);
-       }
-
        e1000_set_multi(netdev);
 
        e1000_restore_vlan(adapter);
@@ -415,24 +463,6 @@ e1000_up(struct e1000_adapter *adapter)
                                      E1000_DESC_UNUSED(ring));
        }
 
-#ifdef CONFIG_PCI_MSI
-       if (adapter->hw.mac_type > e1000_82547_rev_2) {
-               adapter->have_msi = TRUE;
-               if ((err = pci_enable_msi(adapter->pdev))) {
-                       DPRINTK(PROBE, ERR,
-                        "Unable to allocate MSI interrupt Error: %d\n", err);
-                       adapter->have_msi = FALSE;
-               }
-       }
-#endif
-       if ((err = request_irq(adapter->pdev->irq, &e1000_intr,
-                             IRQF_SHARED | IRQF_SAMPLE_RANDOM,
-                             netdev->name, netdev))) {
-               DPRINTK(PROBE, ERR,
-                   "Unable to allocate interrupt Error: %d\n", err);
-               return err;
-       }
-
        adapter->tx_queue_len = netdev->tx_queue_len;
 
        mod_timer(&adapter->watchdog_timer, jiffies);
@@ -445,21 +475,60 @@ e1000_up(struct e1000_adapter *adapter)
        return 0;
 }
 
+/**
+ * e1000_power_up_phy - restore link in case the phy was powered down
+ * @adapter: address of board private structure
+ *
+ * The phy may be powered down to save power and turn off link when the
+ * driver is unloaded and wake on lan is not enabled (among others)
+ * *** this routine MUST be followed by a call to e1000_reset ***
+ *
+ **/
+
+static void e1000_power_up_phy(struct e1000_adapter *adapter)
+{
+       uint16_t mii_reg = 0;
+
+       /* Just clear the power down bit to wake the phy back up */
+       if (adapter->hw.media_type == e1000_media_type_copper) {
+               /* according to the manual, the phy will retain its
+                * settings across a power-down/up cycle */
+               e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg);
+               mii_reg &= ~MII_CR_POWER_DOWN;
+               e1000_write_phy_reg(&adapter->hw, PHY_CTRL, mii_reg);
+       }
+}
+
+static void e1000_power_down_phy(struct e1000_adapter *adapter)
+{
+       boolean_t mng_mode_enabled = (adapter->hw.mac_type >= e1000_82571) &&
+                                     e1000_check_mng_mode(&adapter->hw);
+       /* Power down the PHY so no link is implied when interface is down
+        * The PHY cannot be powered down if any of the following is TRUE
+        * (a) WoL is enabled
+        * (b) AMT is active
+        * (c) SoL/IDER session is active */
+       if (!adapter->wol && adapter->hw.mac_type >= e1000_82540 &&
+           adapter->hw.mac_type != e1000_ich8lan &&
+           adapter->hw.media_type == e1000_media_type_copper &&
+           !(E1000_READ_REG(&adapter->hw, MANC) & E1000_MANC_SMBUS_EN) &&
+           !mng_mode_enabled &&
+           !e1000_check_phy_reset_block(&adapter->hw)) {
+               uint16_t mii_reg = 0;
+               e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg);
+               mii_reg |= MII_CR_POWER_DOWN;
+               e1000_write_phy_reg(&adapter->hw, PHY_CTRL, mii_reg);
+               mdelay(1);
+       }
+}
+
 void
 e1000_down(struct e1000_adapter *adapter)
 {
        struct net_device *netdev = adapter->netdev;
-       boolean_t mng_mode_enabled = (adapter->hw.mac_type >= e1000_82571) &&
-                                    e1000_check_mng_mode(&adapter->hw);
 
        e1000_irq_disable(adapter);
 
-       free_irq(adapter->pdev->irq, netdev);
-#ifdef CONFIG_PCI_MSI
-       if (adapter->hw.mac_type > e1000_82547_rev_2 &&
-          adapter->have_msi == TRUE)
-               pci_disable_msi(adapter->pdev);
-#endif
        del_timer_sync(&adapter->tx_fifo_stall_timer);
        del_timer_sync(&adapter->watchdog_timer);
        del_timer_sync(&adapter->phy_info_timer);
@@ -476,23 +545,17 @@ e1000_down(struct e1000_adapter *adapter)
        e1000_reset(adapter);
        e1000_clean_all_tx_rings(adapter);
        e1000_clean_all_rx_rings(adapter);
+}
 
-       /* Power down the PHY so no link is implied when interface is down *
-        * The PHY cannot be powered down if any of the following is TRUE *
-        * (a) WoL is enabled
-        * (b) AMT is active
-        * (c) SoL/IDER session is active */
-       if (!adapter->wol && adapter->hw.mac_type >= e1000_82540 &&
-          adapter->hw.media_type == e1000_media_type_copper &&
-          !(E1000_READ_REG(&adapter->hw, MANC) & E1000_MANC_SMBUS_EN) &&
-          !mng_mode_enabled &&
-          !e1000_check_phy_reset_block(&adapter->hw)) {
-               uint16_t mii_reg;
-               e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg);
-               mii_reg |= MII_CR_POWER_DOWN;
-               e1000_write_phy_reg(&adapter->hw, PHY_CTRL, mii_reg);
-               mdelay(1);
-       }
+void
+e1000_reinit_locked(struct e1000_adapter *adapter)
+{
+       WARN_ON(in_interrupt());
+       while (test_and_set_bit(__E1000_RESETTING, &adapter->flags))
+               msleep(1);
+       e1000_down(adapter);
+       e1000_up(adapter);
+       clear_bit(__E1000_RESETTING, &adapter->flags);
 }
 
 void
@@ -518,6 +581,9 @@ e1000_reset(struct e1000_adapter *adapter)
        case e1000_82573:
                pba = E1000_PBA_12K;
                break;
+       case e1000_ich8lan:
+               pba = E1000_PBA_8K;
+               break;
        default:
                pba = E1000_PBA_48K;
                break;
@@ -542,6 +608,12 @@ e1000_reset(struct e1000_adapter *adapter)
        /* Set the FC high water mark to 90% of the FIFO size.
         * Required to clear last 3 LSB */
        fc_high_water_mark = ((pba * 9216)/10) & 0xFFF8;
+       /* We can't use 90% on small FIFOs because the remainder
+        * would be less than 1 full frame.  In this case, we size
+        * it to allow at least a full frame above the high water
+        *  mark. */
+       if (pba < E1000_PBA_16K)
+               fc_high_water_mark = (pba * 1024) - 1600;
 
        adapter->hw.fc_high_water = fc_high_water_mark;
        adapter->hw.fc_low_water = fc_high_water_mark - 8;
@@ -564,6 +636,23 @@ e1000_reset(struct e1000_adapter *adapter)
 
        e1000_reset_adaptive(&adapter->hw);
        e1000_phy_get_info(&adapter->hw, &adapter->phy_info);
+
+       if (!adapter->smart_power_down &&
+           (adapter->hw.mac_type == e1000_82571 ||
+            adapter->hw.mac_type == e1000_82572)) {
+               uint16_t phy_data = 0;
+               /* speed up time to link by disabling smart power down, ignore
+                * the return value of this function because there is nothing
+                * different we would do if it failed */
+               e1000_read_phy_reg(&adapter->hw, IGP02E1000_PHY_POWER_MGMT,
+                                  &phy_data);
+               phy_data &= ~IGP02E1000_PM_SPD;
+               e1000_write_phy_reg(&adapter->hw, IGP02E1000_PHY_POWER_MGMT,
+                                   phy_data);
+       }
+
+       if (adapter->hw.mac_type < e1000_ich8lan)
+       /* FIXME: this code is duplicate and wrong for PCI Express */
        if (adapter->en_mng_pt) {
                manc = E1000_READ_REG(&adapter->hw, MANC);
                manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST);
@@ -590,6 +679,7 @@ e1000_probe(struct pci_dev *pdev,
        struct net_device *netdev;
        struct e1000_adapter *adapter;
        unsigned long mmio_start, mmio_len;
+       unsigned long flash_start, flash_len;
 
        static int cards_found = 0;
        static int e1000_ksp3_port_a = 0; /* global ksp3 port a indication */
@@ -599,10 +689,12 @@ e1000_probe(struct pci_dev *pdev,
        if ((err = pci_enable_device(pdev)))
                return err;
 
-       if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
+       if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) &&
+           !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) {
                pci_using_dac = 1;
        } else {
-               if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {
+               if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) &&
+                   (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) {
                        E1000_ERR("No usable DMA configuration, aborting\n");
                        return err;
                }
@@ -682,6 +774,19 @@ e1000_probe(struct pci_dev *pdev,
        if ((err = e1000_sw_init(adapter)))
                goto err_sw_init;
 
+       /* Flash BAR mapping must happen after e1000_sw_init
+        * because it depends on mac_type */
+       if ((adapter->hw.mac_type == e1000_ich8lan) &&
+          (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
+               flash_start = pci_resource_start(pdev, 1);
+               flash_len = pci_resource_len(pdev, 1);
+               adapter->hw.flash_address = ioremap(flash_start, flash_len);
+               if (!adapter->hw.flash_address) {
+                       err = -EIO;
+                       goto err_flashmap;
+               }
+       }
+
        if ((err = e1000_check_phy_reset_block(&adapter->hw)))
                DPRINTK(PROBE, INFO, "PHY reset is blocked due to SOL/IDER session.\n");
 
@@ -700,6 +805,8 @@ e1000_probe(struct pci_dev *pdev,
                                   NETIF_F_HW_VLAN_TX |
                                   NETIF_F_HW_VLAN_RX |
                                   NETIF_F_HW_VLAN_FILTER;
+               if (adapter->hw.mac_type == e1000_ich8lan)
+                       netdev->features &= ~NETIF_F_HW_VLAN_FILTER;
        }
 
 #ifdef NETIF_F_TSO
@@ -715,11 +822,17 @@ e1000_probe(struct pci_dev *pdev,
        if (pci_using_dac)
                netdev->features |= NETIF_F_HIGHDMA;
 
-       /* hard_start_xmit is safe against parallel locking */
        netdev->features |= NETIF_F_LLTX;
 
        adapter->en_mng_pt = e1000_enable_mng_pass_thru(&adapter->hw);
 
+       /* initialize eeprom parameters */
+
+       if (e1000_init_eeprom_params(&adapter->hw)) {
+               E1000_ERR("EEPROM initialization failed\n");
+               return -EIO;
+       }
+
        /* before reading the EEPROM, reset the controller to
         * put the device in a known good starting state */
 
@@ -758,9 +871,6 @@ e1000_probe(struct pci_dev *pdev,
        adapter->watchdog_timer.function = &e1000_watchdog;
        adapter->watchdog_timer.data = (unsigned long) adapter;
 
-       INIT_WORK(&adapter->watchdog_task,
-               (void (*)(void *))e1000_watchdog_task, adapter);
-
        init_timer(&adapter->phy_info_timer);
        adapter->phy_info_timer.function = &e1000_update_phy_info;
        adapter->phy_info_timer.data = (unsigned long) adapter;
@@ -790,6 +900,11 @@ e1000_probe(struct pci_dev *pdev,
                        EEPROM_INIT_CONTROL2_REG, 1, &eeprom_data);
                eeprom_apme_mask = E1000_EEPROM_82544_APM;
                break;
+       case e1000_ich8lan:
+               e1000_read_eeprom(&adapter->hw,
+                       EEPROM_INIT_CONTROL1_REG, 1, &eeprom_data);
+               eeprom_apme_mask = E1000_EEPROM_ICH8_APME;
+               break;
        case e1000_82546:
        case e1000_82546_rev_3:
        case e1000_82571:
@@ -849,6 +964,9 @@ e1000_probe(struct pci_dev *pdev,
        return 0;
 
 err_register:
+       if (adapter->hw.flash_address)
+               iounmap(adapter->hw.flash_address);
+err_flashmap:
 err_sw_init:
 err_eeprom:
        iounmap(adapter->hw.hw_addr);
@@ -882,6 +1000,7 @@ e1000_remove(struct pci_dev *pdev)
        flush_scheduled_work();
 
        if (adapter->hw.mac_type >= e1000_82540 &&
+          adapter->hw.mac_type != e1000_ich8lan &&
           adapter->hw.media_type == e1000_media_type_copper) {
                manc = E1000_READ_REG(&adapter->hw, MANC);
                if (manc & E1000_MANC_SMBUS_EN) {
@@ -910,6 +1029,8 @@ e1000_remove(struct pci_dev *pdev)
 #endif
 
        iounmap(adapter->hw.hw_addr);
+       if (adapter->hw.flash_address)
+               iounmap(adapter->hw.flash_address);
        pci_release_regions(pdev);
 
        free_netdev(netdev);
@@ -947,7 +1068,7 @@ e1000_sw_init(struct e1000_adapter *adapter)
 
        pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word);
 
-       adapter->rx_buffer_len = MAXIMUM_ETHERNET_FRAME_SIZE;
+       adapter->rx_buffer_len = MAXIMUM_ETHERNET_VLAN_SIZE;
        adapter->rx_ps_bsize0 = E1000_RXBUFFER_128;
        hw->max_frame_size = netdev->mtu +
                             ENET_HEADER_SIZE + ETHERNET_FCS_SIZE;
@@ -960,13 +1081,6 @@ e1000_sw_init(struct e1000_adapter *adapter)
                return -EIO;
        }
 
-       /* initialize eeprom parameters */
-
-       if (e1000_init_eeprom_params(hw)) {
-               E1000_ERR("EEPROM initialization failed\n");
-               return -EIO;
-       }
-
        switch (hw->mac_type) {
        default:
                break;
@@ -1078,6 +1192,10 @@ e1000_open(struct net_device *netdev)
        struct e1000_adapter *adapter = netdev_priv(netdev);
        int err;
 
+       /* disallow open during test */
+       if (test_bit(__E1000_DRIVER_TESTING, &adapter->flags))
+               return -EBUSY;
+
        /* allocate transmit descriptors */
 
        if ((err = e1000_setup_all_tx_resources(adapter)))
@@ -1088,6 +1206,12 @@ e1000_open(struct net_device *netdev)
        if ((err = e1000_setup_all_rx_resources(adapter)))
                goto err_setup_rx;
 
+       err = e1000_request_irq(adapter);
+       if (err)
+               goto err_up;
+
+       e1000_power_up_phy(adapter);
+
        if ((err = e1000_up(adapter)))
                goto err_up;
        adapter->mng_vlan_id = E1000_MNG_VLAN_NONE;
@@ -1131,7 +1255,10 @@ e1000_close(struct net_device *netdev)
 {
        struct e1000_adapter *adapter = netdev_priv(netdev);
 
+       WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
        e1000_down(adapter);
+       e1000_power_down_phy(adapter);
+       e1000_free_irq(adapter);
 
        e1000_free_all_tx_resources(adapter);
        e1000_free_all_rx_resources(adapter);
@@ -1189,8 +1316,7 @@ e1000_setup_tx_resources(struct e1000_adapter *adapter,
        int size;
 
        size = sizeof(struct e1000_buffer) * txdr->count;
-
-       txdr->buffer_info = vmalloc_node(size, pcibus_to_node(pdev->bus));
+       txdr->buffer_info = vmalloc(size);
        if (!txdr->buffer_info) {
                DPRINTK(PROBE, ERR,
                "Unable to allocate memory for the transmit descriptor ring\n");
@@ -1302,11 +1428,11 @@ e1000_configure_tx(struct e1000_adapter *adapter)
                tdba = adapter->tx_ring[0].dma;
                tdlen = adapter->tx_ring[0].count *
                        sizeof(struct e1000_tx_desc);
-               E1000_WRITE_REG(hw, TDBAL, (tdba & 0x00000000ffffffffULL));
-               E1000_WRITE_REG(hw, TDBAH, (tdba >> 32));
                E1000_WRITE_REG(hw, TDLEN, tdlen);
-               E1000_WRITE_REG(hw, TDH, 0);
+               E1000_WRITE_REG(hw, TDBAH, (tdba >> 32));
+               E1000_WRITE_REG(hw, TDBAL, (tdba & 0x00000000ffffffffULL));
                E1000_WRITE_REG(hw, TDT, 0);
+               E1000_WRITE_REG(hw, TDH, 0);
                adapter->tx_ring[0].tdh = E1000_TDH;
                adapter->tx_ring[0].tdt = E1000_TDT;
                break;
@@ -1418,7 +1544,7 @@ e1000_setup_rx_resources(struct e1000_adapter *adapter,
        int size, desc_len;
 
        size = sizeof(struct e1000_buffer) * rxdr->count;
-       rxdr->buffer_info = vmalloc_node(size, pcibus_to_node(pdev->bus));
+       rxdr->buffer_info = vmalloc(size);
        if (!rxdr->buffer_info) {
                DPRINTK(PROBE, ERR,
                "Unable to allocate memory for the receive descriptor ring\n");
@@ -1560,9 +1686,6 @@ e1000_setup_rctl(struct e1000_adapter *adapter)
                E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF |
                (adapter->hw.mc_filter_type << E1000_RCTL_MO_SHIFT);
 
-       if (adapter->hw.mac_type > e1000_82543)
-               rctl |= E1000_RCTL_SECRC;
-
        if (adapter->hw.tbi_compatibility_on == 1)
                rctl |= E1000_RCTL_SBP;
        else
@@ -1628,7 +1751,7 @@ e1000_setup_rctl(struct e1000_adapter *adapter)
                rfctl |= E1000_RFCTL_IPV6_DIS;
                E1000_WRITE_REG(&adapter->hw, RFCTL, rfctl);
 
-               rctl |= E1000_RCTL_DTYP_PS | E1000_RCTL_SECRC;
+               rctl |= E1000_RCTL_DTYP_PS;
 
                psrctl |= adapter->rx_ps_bsize0 >>
                        E1000_PSRCTL_BSIZE0_SHIFT;
@@ -1712,11 +1835,11 @@ e1000_configure_rx(struct e1000_adapter *adapter)
        case 1:
        default:
                rdba = adapter->rx_ring[0].dma;
-               E1000_WRITE_REG(hw, RDBAL, (rdba & 0x00000000ffffffffULL));
-               E1000_WRITE_REG(hw, RDBAH, (rdba >> 32));
                E1000_WRITE_REG(hw, RDLEN, rdlen);
-               E1000_WRITE_REG(hw, RDH, 0);
+               E1000_WRITE_REG(hw, RDBAH, (rdba >> 32));
+               E1000_WRITE_REG(hw, RDBAL, (rdba & 0x00000000ffffffffULL));
                E1000_WRITE_REG(hw, RDT, 0);
+               E1000_WRITE_REG(hw, RDH, 0);
                adapter->rx_ring[0].rdh = E1000_RDH;
                adapter->rx_ring[0].rdt = E1000_RDT;
                break;
@@ -1741,9 +1864,6 @@ e1000_configure_rx(struct e1000_adapter *adapter)
                E1000_WRITE_REG(hw, RXCSUM, rxcsum);
        }
 
-       if (hw->mac_type == e1000_82573)
-               E1000_WRITE_REG(hw, ERT, 0x0100);
-
        /* Enable Receives */
        E1000_WRITE_REG(hw, RCTL, rctl);
 }
@@ -2083,6 +2203,12 @@ e1000_set_multi(struct net_device *netdev)
        uint32_t rctl;
        uint32_t hash_value;
        int i, rar_entries = E1000_RAR_ENTRIES;
+       int mta_reg_count = (hw->mac_type == e1000_ich8lan) ?
+                               E1000_NUM_MTA_REGISTERS_ICH8LAN :
+                               E1000_NUM_MTA_REGISTERS;
+
+       if (adapter->hw.mac_type == e1000_ich8lan)
+               rar_entries = E1000_RAR_ENTRIES_ICH8LAN;
 
        /* reserve RAR[14] for LAA over-write work-around */
        if (adapter->hw.mac_type == e1000_82571)
@@ -2121,14 +2247,18 @@ e1000_set_multi(struct net_device *netdev)
                        mc_ptr = mc_ptr->next;
                } else {
                        E1000_WRITE_REG_ARRAY(hw, RA, i << 1, 0);
+                       E1000_WRITE_FLUSH(hw);
                        E1000_WRITE_REG_ARRAY(hw, RA, (i << 1) + 1, 0);
+                       E1000_WRITE_FLUSH(hw);
                }
        }
 
        /* clear the old settings from the multicast hash table */
 
-       for (i = 0; i < E1000_NUM_MTA_REGISTERS; i++)
+       for (i = 0; i < mta_reg_count; i++) {
                E1000_WRITE_REG_ARRAY(hw, MTA, i, 0);
+               E1000_WRITE_FLUSH(hw);
+       }
 
        /* load any remaining addresses into the hash table */
 
@@ -2201,19 +2331,19 @@ static void
 e1000_watchdog(unsigned long data)
 {
        struct e1000_adapter *adapter = (struct e1000_adapter *) data;
-
-       /* Do the rest outside of interrupt context */
-       schedule_work(&adapter->watchdog_task);
-}
-
-static void
-e1000_watchdog_task(struct e1000_adapter *adapter)
-{
        struct net_device *netdev = adapter->netdev;
        struct e1000_tx_ring *txdr = adapter->tx_ring;
        uint32_t link, tctl;
-
-       e1000_check_for_link(&adapter->hw);
+       int32_t ret_val;
+
+       ret_val = e1000_check_for_link(&adapter->hw);
+       if ((ret_val == E1000_ERR_PHY) &&
+           (adapter->hw.phy_type == e1000_phy_igp_3) &&
+           (E1000_READ_REG(&adapter->hw, CTRL) & E1000_PHY_CTRL_GBE_DISABLE)) {
+               /* See e1000_kumeran_lock_loss_workaround() */
+               DPRINTK(LINK, INFO,
+                       "Gigabit has been disabled, downgrading speed\n");
+       }
        if (adapter->hw.mac_type == e1000_82573) {
                e1000_enable_tx_pkt_filtering(&adapter->hw);
                if (adapter->mng_vlan_id != adapter->hw.mng_cookie.vlan_id)
@@ -2394,7 +2524,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
        uint8_t ipcss, ipcso, tucss, tucso, hdr_len;
        int err;
 
-       if (skb_shinfo(skb)->gso_size) {
+       if (skb_is_gso(skb)) {
                if (skb_header_cloned(skb)) {
                        err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
                        if (err)
@@ -2519,7 +2649,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
                 * tso gets written back prematurely before the data is fully
                 * DMA'd to the controller */
                if (!skb->data_len && tx_ring->last_tx_tso &&
-                   !skb_shinfo(skb)->gso_size) {
+                   !skb_is_gso(skb)) {
                        tx_ring->last_tx_tso = 0;
                        size -= 4;
                }
@@ -2779,9 +2909,10 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
                        case e1000_82571:
                        case e1000_82572:
                        case e1000_82573:
+                       case e1000_ich8lan:
                                pull_size = min((unsigned int)4, skb->data_len);
                                if (!__pskb_pull_tail(skb, pull_size)) {
-                                       printk(KERN_ERR
+                                       DPRINTK(DRV, ERR,
                                                "__pskb_pull_tail failed.\n");
                                        dev_kfree_skb_any(skb);
                                        return NETDEV_TX_OK;
@@ -2806,8 +2937,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
 
 #ifdef NETIF_F_TSO
        /* Controller Erratum workaround */
-       if (!skb->data_len && tx_ring->last_tx_tso &&
-           !skb_shinfo(skb)->gso_size)
+       if (!skb->data_len && tx_ring->last_tx_tso && !skb_is_gso(skb))
                count++;
 #endif
 
@@ -2919,8 +3049,7 @@ e1000_reset_task(struct net_device *netdev)
 {
        struct e1000_adapter *adapter = netdev_priv(netdev);
 
-       e1000_down(adapter);
-       e1000_up(adapter);
+       e1000_reinit_locked(adapter);
 }
 
 /**
@@ -2964,6 +3093,7 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu)
        /* Adapter-specific max frame size limits. */
        switch (adapter->hw.mac_type) {
        case e1000_undefined ... e1000_82542_rev2_1:
+       case e1000_ich8lan:
                if (max_frame > MAXIMUM_ETHERNET_FRAME_SIZE) {
                        DPRINTK(PROBE, ERR, "Jumbo Frames not supported.\n");
                        return -EINVAL;
@@ -3018,7 +3148,6 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu)
                adapter->rx_buffer_len = E1000_RXBUFFER_16384;
 
        /* adjust allocation if LPE protects us, and we aren't using SBP */
-#define MAXIMUM_ETHERNET_VLAN_SIZE 1522
        if (!adapter->hw.tbi_compatibility_on &&
            ((max_frame == MAXIMUM_ETHERNET_FRAME_SIZE) ||
             (max_frame == MAXIMUM_ETHERNET_VLAN_SIZE)))
@@ -3026,10 +3155,8 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu)
 
        netdev->mtu = new_mtu;
 
-       if (netif_running(netdev)) {
-               e1000_down(adapter);
-               e1000_up(adapter);
-       }
+       if (netif_running(netdev))
+               e1000_reinit_locked(adapter);
 
        adapter->hw.max_frame_size = max_frame;
 
@@ -3074,12 +3201,15 @@ e1000_update_stats(struct e1000_adapter *adapter)
        adapter->stats.bprc += E1000_READ_REG(hw, BPRC);
        adapter->stats.mprc += E1000_READ_REG(hw, MPRC);
        adapter->stats.roc += E1000_READ_REG(hw, ROC);
+
+       if (adapter->hw.mac_type != e1000_ich8lan) {
        adapter->stats.prc64 += E1000_READ_REG(hw, PRC64);
        adapter->stats.prc127 += E1000_READ_REG(hw, PRC127);
        adapter->stats.prc255 += E1000_READ_REG(hw, PRC255);
        adapter->stats.prc511 += E1000_READ_REG(hw, PRC511);
        adapter->stats.prc1023 += E1000_READ_REG(hw, PRC1023);
        adapter->stats.prc1522 += E1000_READ_REG(hw, PRC1522);
+       }
 
        adapter->stats.symerrs += E1000_READ_REG(hw, SYMERRS);
        adapter->stats.mpc += E1000_READ_REG(hw, MPC);
@@ -3107,12 +3237,16 @@ e1000_update_stats(struct e1000_adapter *adapter)
        adapter->stats.totl += E1000_READ_REG(hw, TOTL);
        adapter->stats.toth += E1000_READ_REG(hw, TOTH);
        adapter->stats.tpr += E1000_READ_REG(hw, TPR);
+
+       if (adapter->hw.mac_type != e1000_ich8lan) {
        adapter->stats.ptc64 += E1000_READ_REG(hw, PTC64);
        adapter->stats.ptc127 += E1000_READ_REG(hw, PTC127);
        adapter->stats.ptc255 += E1000_READ_REG(hw, PTC255);
        adapter->stats.ptc511 += E1000_READ_REG(hw, PTC511);
        adapter->stats.ptc1023 += E1000_READ_REG(hw, PTC1023);
        adapter->stats.ptc1522 += E1000_READ_REG(hw, PTC1522);
+       }
+
        adapter->stats.mptc += E1000_READ_REG(hw, MPTC);
        adapter->stats.bptc += E1000_READ_REG(hw, BPTC);
 
@@ -3134,6 +3268,8 @@ e1000_update_stats(struct e1000_adapter *adapter)
        if (hw->mac_type > e1000_82547_rev_2) {
                adapter->stats.iac += E1000_READ_REG(hw, IAC);
                adapter->stats.icrxoc += E1000_READ_REG(hw, ICRXOC);
+
+               if (adapter->hw.mac_type != e1000_ich8lan) {
                adapter->stats.icrxptc += E1000_READ_REG(hw, ICRXPTC);
                adapter->stats.icrxatc += E1000_READ_REG(hw, ICRXATC);
                adapter->stats.ictxptc += E1000_READ_REG(hw, ICTXPTC);
@@ -3141,6 +3277,7 @@ e1000_update_stats(struct e1000_adapter *adapter)
                adapter->stats.ictxqec += E1000_READ_REG(hw, ICTXQEC);
                adapter->stats.ictxqmtc += E1000_READ_REG(hw, ICTXQMTC);
                adapter->stats.icrxdmtc += E1000_READ_REG(hw, ICRXDMTC);
+               }
        }
 
        /* Fill out the OS statistics structure */
@@ -3249,8 +3386,8 @@ e1000_intr(int irq, void *data, struct pt_regs *regs)
                E1000_WRITE_REG(hw, IMC, ~0);
                E1000_WRITE_FLUSH(hw);
        }
-       if (likely(netif_rx_schedule_prep(&adapter->polling_netdev[0])))
-               __netif_rx_schedule(&adapter->polling_netdev[0]);
+       if (likely(netif_rx_schedule_prep(netdev)))
+               __netif_rx_schedule(netdev);
        else
                e1000_irq_enable(adapter);
 #else
@@ -3293,34 +3430,26 @@ e1000_clean(struct net_device *poll_dev, int *budget)
 {
        struct e1000_adapter *adapter;
        int work_to_do = min(*budget, poll_dev->quota);
-       int tx_cleaned = 0, i = 0, work_done = 0;
+       int tx_cleaned = 0, work_done = 0;
 
        /* Must NOT use netdev_priv macro here. */
        adapter = poll_dev->priv;
 
        /* Keep link state information with original netdev */
-       if (!netif_carrier_ok(adapter->netdev))
+       if (!netif_carrier_ok(poll_dev))
                goto quit_polling;
 
-       while (poll_dev != &adapter->polling_netdev[i]) {
-               i++;
-               BUG_ON(i == adapter->num_rx_queues);
+       /* e1000_clean is called per-cpu.  This lock protects
+        * tx_ring[0] from being cleaned by multiple cpus
+        * simultaneously.  A failure obtaining the lock means
+        * tx_ring[0] is currently being cleaned anyway. */
+       if (spin_trylock(&adapter->tx_queue_lock)) {
+               tx_cleaned = e1000_clean_tx_irq(adapter,
+                                               &adapter->tx_ring[0]);
+               spin_unlock(&adapter->tx_queue_lock);
        }
 
-       if (likely(adapter->num_tx_queues == 1)) {
-               /* e1000_clean is called per-cpu.  This lock protects
-                * tx_ring[0] from being cleaned by multiple cpus
-                * simultaneously.  A failure obtaining the lock means
-                * tx_ring[0] is currently being cleaned anyway. */
-               if (spin_trylock(&adapter->tx_queue_lock)) {
-                       tx_cleaned = e1000_clean_tx_irq(adapter,
-                                                       &adapter->tx_ring[0]);
-                       spin_unlock(&adapter->tx_queue_lock);
-               }
-       } else
-               tx_cleaned = e1000_clean_tx_irq(adapter, &adapter->tx_ring[i]);
-
-       adapter->clean_rx(adapter, &adapter->rx_ring[i],
+       adapter->clean_rx(adapter, &adapter->rx_ring[0],
                          &work_done, work_to_do);
 
        *budget -= work_done;
@@ -3328,7 +3457,7 @@ e1000_clean(struct net_device *poll_dev, int *budget)
 
        /* If no Tx and not enough Rx work done, exit the polling mode */
        if ((!tx_cleaned && (work_done == 0)) ||
-          !netif_running(adapter->netdev)) {
+          !netif_running(poll_dev)) {
 quit_polling:
                netif_rx_complete(poll_dev);
                e1000_irq_enable(adapter);
@@ -3543,11 +3672,15 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
 
                length = le16_to_cpu(rx_desc->length);
 
+               /* adjust length to remove Ethernet CRC */
+               length -= 4;
+
                if (unlikely(!(status & E1000_RXD_STAT_EOP))) {
                        /* All receives must fit into a single buffer */
                        E1000_DBG("%s: Receive packet consumed multiple"
                                  " buffers\n", netdev->name);
-                       dev_kfree_skb_irq(skb);
+                       /* recycle */
+                       buffer_info-> skb = skb;
                        goto next_desc;
                }
 
@@ -3675,7 +3808,6 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
        buffer_info = &rx_ring->buffer_info[i];
 
        while (staterr & E1000_RXD_STAT_DD) {
-               buffer_info = &rx_ring->buffer_info[i];
                ps_page = &rx_ring->ps_page[i];
                ps_page_dma = &rx_ring->ps_page_dma[i];
 #ifdef CONFIG_E1000_NAPI
@@ -3747,8 +3879,9 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
                        pci_dma_sync_single_for_device(pdev,
                                ps_page_dma->ps_page_dma[0],
                                PAGE_SIZE, PCI_DMA_FROMDEVICE);
+                       /* remove the CRC */
+                       l1 -= 4;
                        skb_put(skb, l1);
-                       length += l1;
                        goto copydone;
                } /* if */
                }
@@ -3767,6 +3900,10 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
                        skb->truesize += length;
                }
 
+               /* strip the ethernet crc, problem is we're using pages now so
+                * this whole operation can get a little cpu intensive */
+               pskb_trim(skb, skb->len - 4);
+
 copydone:
                e1000_rx_checksum(adapter, staterr,
                                  le16_to_cpu(rx_desc->wb.lower.hi_dword.csum_ip.csum), skb);
@@ -4180,10 +4317,9 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
                                                return retval;
                                        }
                                }
-                               if (netif_running(adapter->netdev)) {
-                                       e1000_down(adapter);
-                                       e1000_up(adapter);
-                               } else
+                               if (netif_running(adapter->netdev))
+                                       e1000_reinit_locked(adapter);
+                               else
                                        e1000_reset(adapter);
                                break;
                        case M88E1000_PHY_SPEC_CTRL:
@@ -4200,10 +4336,9 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
                        case PHY_CTRL:
                                if (mii_reg & MII_CR_POWER_DOWN)
                                        break;
-                               if (netif_running(adapter->netdev)) {
-                                       e1000_down(adapter);
-                                       e1000_up(adapter);
-                               } else
+                               if (netif_running(adapter->netdev))
+                                       e1000_reinit_locked(adapter);
+                               else
                                        e1000_reset(adapter);
                                break;
                        }
@@ -4277,18 +4412,21 @@ e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
                ctrl |= E1000_CTRL_VME;
                E1000_WRITE_REG(&adapter->hw, CTRL, ctrl);
 
+               if (adapter->hw.mac_type != e1000_ich8lan) {
                /* enable VLAN receive filtering */
                rctl = E1000_READ_REG(&adapter->hw, RCTL);
                rctl |= E1000_RCTL_VFE;
                rctl &= ~E1000_RCTL_CFIEN;
                E1000_WRITE_REG(&adapter->hw, RCTL, rctl);
                e1000_update_mng_vlan(adapter);
+               }
        } else {
                /* disable VLAN tag insert/strip */
                ctrl = E1000_READ_REG(&adapter->hw, CTRL);
                ctrl &= ~E1000_CTRL_VME;
                E1000_WRITE_REG(&adapter->hw, CTRL, ctrl);
 
+               if (adapter->hw.mac_type != e1000_ich8lan) {
                /* disable VLAN filtering */
                rctl = E1000_READ_REG(&adapter->hw, RCTL);
                rctl &= ~E1000_RCTL_VFE;
@@ -4297,6 +4435,7 @@ e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
                        e1000_vlan_rx_kill_vid(netdev, adapter->mng_vlan_id);
                        adapter->mng_vlan_id = E1000_MNG_VLAN_NONE;
                }
+               }
        }
 
        e1000_irq_enable(adapter);
@@ -4458,12 +4597,16 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state)
        struct e1000_adapter *adapter = netdev_priv(netdev);
        uint32_t ctrl, ctrl_ext, rctl, manc, status;
        uint32_t wufc = adapter->wol;
+#ifdef CONFIG_PM
        int retval = 0;
+#endif
 
        netif_device_detach(netdev);
 
-       if (netif_running(netdev))
+       if (netif_running(netdev)) {
+               WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
                e1000_down(adapter);
+       }
 
 #ifdef CONFIG_PM
        /* Implement our own version of pci_save_state(pdev) because pci-
@@ -4521,7 +4664,9 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state)
                pci_enable_wake(pdev, PCI_D3cold, 0);
        }
 
+       /* FIXME: this code is incorrect for PCI Express */
        if (adapter->hw.mac_type >= e1000_82540 &&
+          adapter->hw.mac_type != e1000_ich8lan &&
           adapter->hw.media_type == e1000_media_type_copper) {
                manc = E1000_READ_REG(&adapter->hw, MANC);
                if (manc & E1000_MANC_SMBUS_EN) {
@@ -4532,6 +4677,9 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state)
                }
        }
 
+       if (adapter->hw.phy_type == e1000_phy_igp_3)
+               e1000_phy_powerdown_workaround(&adapter->hw);
+
        /* Release control of h/w to f/w.  If f/w is AMT enabled, this
         * would have already happened in close and is redundant. */
        e1000_release_hw_control(adapter);
@@ -4567,7 +4715,9 @@ e1000_resume(struct pci_dev *pdev)
 
        netif_device_attach(netdev);
 
+       /* FIXME: this code is incorrect for PCI Express */
        if (adapter->hw.mac_type >= e1000_82540 &&
+          adapter->hw.mac_type != e1000_ich8lan &&
           adapter->hw.media_type == e1000_media_type_copper) {
                manc = E1000_READ_REG(&adapter->hw, MANC);
                manc &= ~(E1000_MANC_ARP_EN);
@@ -4601,6 +4751,7 @@ static void
 e1000_netpoll(struct net_device *netdev)
 {
        struct e1000_adapter *adapter = netdev_priv(netdev);
+
        disable_irq(adapter->pdev->irq);
        e1000_intr(adapter->pdev->irq, netdev, NULL);
        e1000_clean_tx_irq(adapter, adapter->tx_ring);
index 048d052be29d6a6d9a27856e2e3b7af3c142c95a..2d3e8b06cab03f7d2478c6a001a4eb0a85838f3e 100644 (file)
@@ -127,4 +127,17 @@ typedef enum {
 
 #define E1000_WRITE_FLUSH(a) E1000_READ_REG(a, STATUS)
 
+#define E1000_WRITE_ICH8_REG(a, reg, value) ( \
+    writel((value), ((a)->flash_address + reg)))
+
+#define E1000_READ_ICH8_REG(a, reg) ( \
+    readl((a)->flash_address + reg))
+
+#define E1000_WRITE_ICH8_REG16(a, reg, value) ( \
+    writew((value), ((a)->flash_address + reg)))
+
+#define E1000_READ_ICH8_REG16(a, reg) ( \
+    readw((a)->flash_address + reg))
+
+
 #endif /* _E1000_OSDEP_H_ */
index e55f8969a0fb0ca85f46f43ad2f9708e5bf55622..0ef413172c68798562bd467c12e577e3479139c6 100644 (file)
  */
 
 #define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET }
+/* Module Parameters are always initialized to -1, so that the driver
+ * can tell the difference between no user specified value or the
+ * user asking for the default value.
+ * The true default values are loaded in when e1000_check_options is called.
+ *
+ * This is a GCC extension to ANSI C.
+ * See the item "Labeled Elements in Initializers" in the section
+ * "Extensions to the C Language Family" of the GCC documentation.
+ */
+
 #define E1000_PARAM(X, desc) \
        static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \
        static int num_##X = 0; \
@@ -183,6 +193,24 @@ E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay");
 
 E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");
 
+/* Enable Smart Power Down of the PHY
+ *
+ * Valid Range: 0, 1
+ *
+ * Default Value: 0 (disabled)
+ */
+
+E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down");
+
+/* Enable Kumeran Lock Loss workaround
+ *
+ * Valid Range: 0, 1
+ *
+ * Default Value: 1 (enabled)
+ */
+
+E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");
+
 #define AUTONEG_ADV_DEFAULT  0x2F
 #define AUTONEG_ADV_MASK     0x2F
 #define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL
@@ -296,6 +324,7 @@ e1000_check_options(struct e1000_adapter *adapter)
                DPRINTK(PROBE, NOTICE,
                       "Warning: no configuration for board #%i\n", bd);
                DPRINTK(PROBE, NOTICE, "Using defaults for all values\n");
+               bd = E1000_MAX_NIC;
        }
 
        { /* Transmit Descriptor Count */
@@ -313,14 +342,9 @@ e1000_check_options(struct e1000_adapter *adapter)
                opt.arg.r.max = mac_type < e1000_82544 ?
                        E1000_MAX_TXD : E1000_MAX_82544_TXD;
 
-               if (num_TxDescriptors > bd) {
-                       tx_ring->count = TxDescriptors[bd];
-                       e1000_validate_option(&tx_ring->count, &opt, adapter);
-                       E1000_ROUNDUP(tx_ring->count,
-                                               REQ_TX_DESCRIPTOR_MULTIPLE);
-               } else {
-                       tx_ring->count = opt.def;
-               }
+               tx_ring->count = TxDescriptors[bd];
+               e1000_validate_option(&tx_ring->count, &opt, adapter);
+               E1000_ROUNDUP(tx_ring->count, REQ_TX_DESCRIPTOR_MULTIPLE);
                for (i = 0; i < adapter->num_tx_queues; i++)
                        tx_ring[i].count = tx_ring->count;
        }
@@ -339,14 +363,9 @@ e1000_check_options(struct e1000_adapter *adapter)
                opt.arg.r.max = mac_type < e1000_82544 ? E1000_MAX_RXD :
                        E1000_MAX_82544_RXD;
 
-               if (num_RxDescriptors > bd) {
-                       rx_ring->count = RxDescriptors[bd];
-                       e1000_validate_option(&rx_ring->count, &opt, adapter);
-                       E1000_ROUNDUP(rx_ring->count,
-                                               REQ_RX_DESCRIPTOR_MULTIPLE);
-               } else {
-                       rx_ring->count = opt.def;
-               }
+               rx_ring->count = RxDescriptors[bd];
+               e1000_validate_option(&rx_ring->count, &opt, adapter);
+               E1000_ROUNDUP(rx_ring->count, REQ_RX_DESCRIPTOR_MULTIPLE);
                for (i = 0; i < adapter->num_rx_queues; i++)
                        rx_ring[i].count = rx_ring->count;
        }
@@ -358,13 +377,9 @@ e1000_check_options(struct e1000_adapter *adapter)
                        .def  = OPTION_ENABLED
                };
 
-               if (num_XsumRX > bd) {
-                       int rx_csum = XsumRX[bd];
-                       e1000_validate_option(&rx_csum, &opt, adapter);
-                       adapter->rx_csum = rx_csum;
-               } else {
-                       adapter->rx_csum = opt.def;
-               }
+               int rx_csum = XsumRX[bd];
+               e1000_validate_option(&rx_csum, &opt, adapter);
+               adapter->rx_csum = rx_csum;
        }
        { /* Flow Control */
 
@@ -384,13 +399,9 @@ e1000_check_options(struct e1000_adapter *adapter)
                                         .p = fc_list }}
                };
 
-               if (num_FlowControl > bd) {
-                       int fc = FlowControl[bd];
-                       e1000_validate_option(&fc, &opt, adapter);
-                       adapter->hw.fc = adapter->hw.original_fc = fc;
-               } else {
-                       adapter->hw.fc = adapter->hw.original_fc = opt.def;
-               }
+               int fc = FlowControl[bd];
+               e1000_validate_option(&fc, &opt, adapter);
+               adapter->hw.fc = adapter->hw.original_fc = fc;
        }
        { /* Transmit Interrupt Delay */
                struct e1000_option opt = {
@@ -402,13 +413,8 @@ e1000_check_options(struct e1000_adapter *adapter)
                                         .max = MAX_TXDELAY }}
                };
 
-               if (num_TxIntDelay > bd) {
-                       adapter->tx_int_delay = TxIntDelay[bd];
-                       e1000_validate_option(&adapter->tx_int_delay, &opt,
-                                                               adapter);
-               } else {
-                       adapter->tx_int_delay = opt.def;
-               }
+               adapter->tx_int_delay = TxIntDelay[bd];
+               e1000_validate_option(&adapter->tx_int_delay, &opt, adapter);
        }
        { /* Transmit Absolute Interrupt Delay */
                struct e1000_option opt = {
@@ -420,13 +426,9 @@ e1000_check_options(struct e1000_adapter *adapter)
                                         .max = MAX_TXABSDELAY }}
                };
 
-               if (num_TxAbsIntDelay > bd) {
-                       adapter->tx_abs_int_delay = TxAbsIntDelay[bd];
-                       e1000_validate_option(&adapter->tx_abs_int_delay, &opt,
-                                                               adapter);
-               } else {
-                       adapter->tx_abs_int_delay = opt.def;
-               }
+               adapter->tx_abs_int_delay = TxAbsIntDelay[bd];
+               e1000_validate_option(&adapter->tx_abs_int_delay, &opt,
+                                     adapter);
        }
        { /* Receive Interrupt Delay */
                struct e1000_option opt = {
@@ -438,13 +440,8 @@ e1000_check_options(struct e1000_adapter *adapter)
                                         .max = MAX_RXDELAY }}
                };
 
-               if (num_RxIntDelay > bd) {
-                       adapter->rx_int_delay = RxIntDelay[bd];
-                       e1000_validate_option(&adapter->rx_int_delay, &opt,
-                                                               adapter);
-               } else {
-                       adapter->rx_int_delay = opt.def;
-               }
+               adapter->rx_int_delay = RxIntDelay[bd];
+               e1000_validate_option(&adapter->rx_int_delay, &opt, adapter);
        }
        { /* Receive Absolute Interrupt Delay */
                struct e1000_option opt = {
@@ -456,13 +453,9 @@ e1000_check_options(struct e1000_adapter *adapter)
                                         .max = MAX_RXABSDELAY }}
                };
 
-               if (num_RxAbsIntDelay > bd) {
-                       adapter->rx_abs_int_delay = RxAbsIntDelay[bd];
-                       e1000_validate_option(&adapter->rx_abs_int_delay, &opt,
-                                                               adapter);
-               } else {
-                       adapter->rx_abs_int_delay = opt.def;
-               }
+               adapter->rx_abs_int_delay = RxAbsIntDelay[bd];
+               e1000_validate_option(&adapter->rx_abs_int_delay, &opt,
+                                     adapter);
        }
        { /* Interrupt Throttling Rate */
                struct e1000_option opt = {
@@ -474,26 +467,44 @@ e1000_check_options(struct e1000_adapter *adapter)
                                         .max = MAX_ITR }}
                };
 
-               if (num_InterruptThrottleRate > bd) {
-                       adapter->itr = InterruptThrottleRate[bd];
-                       switch (adapter->itr) {
-                       case 0:
-                               DPRINTK(PROBE, INFO, "%s turned off\n",
-                                       opt.name);
-                               break;
-                       case 1:
-                               DPRINTK(PROBE, INFO, "%s set to dynamic mode\n",
-                                       opt.name);
-                               break;
-                       default:
-                               e1000_validate_option(&adapter->itr, &opt,
-                                       adapter);
-                               break;
-                       }
-               } else {
-                       adapter->itr = opt.def;
+               adapter->itr = InterruptThrottleRate[bd];
+               switch (adapter->itr) {
+               case 0:
+                       DPRINTK(PROBE, INFO, "%s turned off\n", opt.name);
+                       break;
+               case 1:
+                       DPRINTK(PROBE, INFO, "%s set to dynamic mode\n",
+                               opt.name);
+                       break;
+               default:
+                       e1000_validate_option(&adapter->itr, &opt, adapter);
+                       break;
                }
        }
+       { /* Smart Power Down */
+               struct e1000_option opt = {
+                       .type = enable_option,
+                       .name = "PHY Smart Power Down",
+                       .err  = "defaulting to Disabled",
+                       .def  = OPTION_DISABLED
+               };
+
+               int spd = SmartPowerDownEnable[bd];
+               e1000_validate_option(&spd, &opt, adapter);
+               adapter->smart_power_down = spd;
+       }
+       { /* Kumeran Lock Loss Workaround */
+               struct e1000_option opt = {
+                       .type = enable_option,
+                       .name = "Kumeran Lock Loss Workaround",
+                       .err  = "defaulting to Enabled",
+                       .def  = OPTION_ENABLED
+               };
+
+                       int kmrn_lock_loss = KumeranLockLoss[bd];
+                       e1000_validate_option(&kmrn_lock_loss, &opt, adapter);
+                       adapter->hw.kmrn_lock_loss_workaround_disabled = !kmrn_lock_loss;
+       }
 
        switch (adapter->hw.media_type) {
        case e1000_media_type_fiber:
@@ -519,17 +530,18 @@ static void __devinit
 e1000_check_fiber_options(struct e1000_adapter *adapter)
 {
        int bd = adapter->bd_number;
-       if (num_Speed > bd) {
+       bd = bd > E1000_MAX_NIC ? E1000_MAX_NIC : bd;
+       if ((Speed[bd] != OPTION_UNSET)) {
                DPRINTK(PROBE, INFO, "Speed not valid for fiber adapters, "
                       "parameter ignored\n");
        }
 
-       if (num_Duplex > bd) {
+       if ((Duplex[bd] != OPTION_UNSET)) {
                DPRINTK(PROBE, INFO, "Duplex not valid for fiber adapters, "
                       "parameter ignored\n");
        }
 
-       if ((num_AutoNeg > bd) && (AutoNeg[bd] != 0x20)) {
+       if ((AutoNeg[bd] != OPTION_UNSET) && (AutoNeg[bd] != 0x20)) {
                DPRINTK(PROBE, INFO, "AutoNeg other than 1000/Full is "
                                 "not valid for fiber adapters, "
                                 "parameter ignored\n");
@@ -548,6 +560,7 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
 {
        int speed, dplx, an;
        int bd = adapter->bd_number;
+       bd = bd > E1000_MAX_NIC ? E1000_MAX_NIC : bd;
 
        { /* Speed */
                struct e1000_opt_list speed_list[] = {{          0, "" },
@@ -564,12 +577,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
                                         .p = speed_list }}
                };
 
-               if (num_Speed > bd) {
-                       speed = Speed[bd];
-                       e1000_validate_option(&speed, &opt, adapter);
-               } else {
-                       speed = opt.def;
-               }
+               speed = Speed[bd];
+               e1000_validate_option(&speed, &opt, adapter);
        }
        { /* Duplex */
                struct e1000_opt_list dplx_list[] = {{           0, "" },
@@ -591,15 +600,11 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
                                "Speed/Duplex/AutoNeg parameter ignored.\n");
                        return;
                }
-               if (num_Duplex > bd) {
-                       dplx = Duplex[bd];
-                       e1000_validate_option(&dplx, &opt, adapter);
-               } else {
-                       dplx = opt.def;
-               }
+               dplx = Duplex[bd];
+               e1000_validate_option(&dplx, &opt, adapter);
        }
 
-       if ((num_AutoNeg > bd) && (speed != 0 || dplx != 0)) {
+       if (AutoNeg[bd] != OPTION_UNSET && (speed != 0 || dplx != 0)) {
                DPRINTK(PROBE, INFO,
                       "AutoNeg specified along with Speed or Duplex, "
                       "parameter ignored\n");
@@ -648,19 +653,15 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
                                         .p = an_list }}
                };
 
-               if (num_AutoNeg > bd) {
-                       an = AutoNeg[bd];
-                       e1000_validate_option(&an, &opt, adapter);
-               } else {
-                       an = opt.def;
-               }
+               an = AutoNeg[bd];
+               e1000_validate_option(&an, &opt, adapter);
                adapter->hw.autoneg_advertised = an;
        }
 
        switch (speed + dplx) {
        case 0:
                adapter->hw.autoneg = adapter->fc_autoneg = 1;
-               if ((num_Speed > bd) && (speed != 0 || dplx != 0))
+               if (Speed[bd] != OPTION_UNSET || Duplex[bd] != OPTION_UNSET)
                        DPRINTK(PROBE, INFO,
                               "Speed and duplex autonegotiation enabled\n");
                break;
index 037d870712ff645510328bb2708e0926ff31d744..11b8f1b43dd5994a255c1b6613d0cfa868a4bdeb 100644 (file)
@@ -240,10 +240,12 @@ enum {
 #define NVREG_RNDSEED_FORCE2   0x2d00
 #define NVREG_RNDSEED_FORCE3   0x7400
 
-       NvRegUnknownSetupReg1 = 0xA0,
-#define NVREG_UNKSETUP1_VAL    0x16070f
-       NvRegUnknownSetupReg2 = 0xA4,
-#define NVREG_UNKSETUP2_VAL    0x16
+       NvRegTxDeferral = 0xA0,
+#define NVREG_TX_DEFERRAL_DEFAULT      0x15050f
+#define NVREG_TX_DEFERRAL_RGMII_10_100 0x16070f
+#define NVREG_TX_DEFERRAL_RGMII_1000   0x14050f
+       NvRegRxDeferral = 0xA4,
+#define NVREG_RX_DEFERRAL_DEFAULT      0x16
        NvRegMacAddrA = 0xA8,
        NvRegMacAddrB = 0xAC,
        NvRegMulticastAddrA = 0xB0,
@@ -269,8 +271,10 @@ enum {
 #define NVREG_LINKSPEED_MASK   (0xFFF)
        NvRegUnknownSetupReg5 = 0x130,
 #define NVREG_UNKSETUP5_BIT31  (1<<31)
-       NvRegUnknownSetupReg3 = 0x13c,
-#define NVREG_UNKSETUP3_VAL1   0x200010
+       NvRegTxWatermark = 0x13c,
+#define NVREG_TX_WM_DESC1_DEFAULT      0x0200010
+#define NVREG_TX_WM_DESC2_3_DEFAULT    0x1e08000
+#define NVREG_TX_WM_DESC2_3_1000       0xfe08000
        NvRegTxRxControl = 0x144,
 #define NVREG_TXRXCTL_KICK     0x0001
 #define NVREG_TXRXCTL_BIT1     0x0002
@@ -658,7 +662,7 @@ static const struct register_test nv_registers_test[] = {
        { NvRegMisc1, 0x03c },
        { NvRegOffloadConfig, 0x03ff },
        { NvRegMulticastAddrA, 0xffffffff },
-       { NvRegUnknownSetupReg3, 0x0ff },
+       { NvRegTxWatermark, 0x0ff },
        { NvRegWakeUpFlags, 0x07777 },
        { 0,0 }
 };
@@ -1495,7 +1499,7 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
        np->tx_skbuff[nr] = skb;
 
 #ifdef NETIF_F_TSO
-       if (skb_shinfo(skb)->gso_size)
+       if (skb_is_gso(skb))
                tx_flags_extra = NV_TX2_TSO | (skb_shinfo(skb)->gso_size << NV_TX2_TSO_SHIFT);
        else
 #endif
@@ -2127,7 +2131,7 @@ static int nv_update_linkspeed(struct net_device *dev)
        int newdup = np->duplex;
        int mii_status;
        int retval = 0;
-       u32 control_1000, status_1000, phyreg, pause_flags;
+       u32 control_1000, status_1000, phyreg, pause_flags, txreg;
 
        /* BMSR_LSTATUS is latched, read it twice:
         * we want the current value.
@@ -2245,6 +2249,26 @@ set_speed:
                phyreg |= PHY_1000;
        writel(phyreg, base + NvRegPhyInterface);
 
+       if (phyreg & PHY_RGMII) {
+               if ((np->linkspeed & NVREG_LINKSPEED_MASK) == NVREG_LINKSPEED_1000)
+                       txreg = NVREG_TX_DEFERRAL_RGMII_1000;
+               else
+                       txreg = NVREG_TX_DEFERRAL_RGMII_10_100;
+       } else {
+               txreg = NVREG_TX_DEFERRAL_DEFAULT;
+       }
+       writel(txreg, base + NvRegTxDeferral);
+
+       if (np->desc_ver == DESC_VER_1) {
+               txreg = NVREG_TX_WM_DESC1_DEFAULT;
+       } else {
+               if ((np->linkspeed & NVREG_LINKSPEED_MASK) == NVREG_LINKSPEED_1000)
+                       txreg = NVREG_TX_WM_DESC2_3_1000;
+               else
+                       txreg = NVREG_TX_WM_DESC2_3_DEFAULT;
+       }
+       writel(txreg, base + NvRegTxWatermark);
+
        writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD),
                base + NvRegMisc1);
        pci_push(base);
@@ -3910,7 +3934,10 @@ static int nv_open(struct net_device *dev)
 
        /* 5) continue setup */
        writel(np->linkspeed, base + NvRegLinkSpeed);
-       writel(NVREG_UNKSETUP3_VAL1, base + NvRegUnknownSetupReg3);
+       if (np->desc_ver == DESC_VER_1)
+               writel(NVREG_TX_WM_DESC1_DEFAULT, base + NvRegTxWatermark);
+       else
+               writel(NVREG_TX_WM_DESC2_3_DEFAULT, base + NvRegTxWatermark);
        writel(np->txrxctl_bits, base + NvRegTxRxControl);
        writel(np->vlanctl_bits, base + NvRegVlanControl);
        pci_push(base);
@@ -3932,8 +3959,8 @@ static int nv_open(struct net_device *dev)
        writel(readl(base + NvRegReceiverStatus), base + NvRegReceiverStatus);
        get_random_bytes(&i, sizeof(i));
        writel(NVREG_RNDSEED_FORCE | (i&NVREG_RNDSEED_MASK), base + NvRegRandomSeed);
-       writel(NVREG_UNKSETUP1_VAL, base + NvRegUnknownSetupReg1);
-       writel(NVREG_UNKSETUP2_VAL, base + NvRegUnknownSetupReg2);
+       writel(NVREG_TX_DEFERRAL_DEFAULT, base + NvRegTxDeferral);
+       writel(NVREG_RX_DEFERRAL_DEFAULT, base + NvRegRxDeferral);
        if (poll_interval == -1) {
                if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT)
                        writel(NVREG_POLL_DEFAULT_THROUGHPUT, base + NvRegPollingInterval);
index 0641f54fc6389d622c4e971a4da0a4083943928e..889f338132fa2aef212d5aa1434682a0b33bb99c 100644 (file)
@@ -122,6 +122,12 @@ struct bpqdev {
 
 static LIST_HEAD(bpq_devices);
 
+/*
+ * bpqether network devices are paired with ethernet devices below them, so
+ * form a special "super class" of normal ethernet devices; split their locks
+ * off into a separate class since they always nest.
+ */
+static struct lock_class_key bpq_netdev_xmit_lock_key;
 
 /* ------------------------------------------------------------------------ */
 
@@ -528,6 +534,7 @@ static int bpq_new_device(struct net_device *edev)
        err = register_netdevice(ndev);
        if (err)
                goto error;
+       lockdep_set_class(&ndev->_xmit_lock, &bpq_netdev_xmit_lock_key);
 
        /* List protected by RTNL */
        list_add_rcu(&bpq->bpq_list, &bpq_devices);
index bf1fca5a3fa056b3298be53d8119c27c45dd787b..e3c8cd5eca676c8b126b5624607ea8577c12c702 100644 (file)
@@ -146,7 +146,7 @@ static int __init ali_ircc_init(void)
 {
        ali_chip_t *chip;
        chipio_t info;
-       int ret = -ENODEV;
+       int ret;
        int cfg, cfg_base;
        int reg, revision;
        int i = 0;
@@ -160,6 +160,7 @@ static int __init ali_ircc_init(void)
                 return ret;
         }
 
+       ret = -ENODEV;
        
        /* Probe for all the ALi chipsets we know about */
        for (chip= chips; chip->name; chip++, i++) 
index a4674044bd6f3c536b7abf195c7d4b480268ec97..2eff45bedc7cbc28a0f819fe44e43feece707bfe 100644 (file)
@@ -2353,7 +2353,7 @@ static int __init smsc_superio_lpc(unsigned short cfg_base)
 #ifdef CONFIG_PCI
 #define PCIID_VENDOR_INTEL 0x8086
 #define PCIID_VENDOR_ALI 0x10b9
-static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __devinitdata = {
+static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __initdata = {
        {
                .vendor = PCIID_VENDOR_INTEL, /* Intel 82801DBM LPC bridge */
                .device = 0x24cc,
index b91e082483f63067a976b207f39ff806eeeb2172..7bbd447289b58df7906c396d6948701770ff2c6e 100644 (file)
@@ -1173,7 +1173,7 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb)
        uint16_t ipcse, tucse, mss;
        int err;
 
-       if(likely(skb_shinfo(skb)->gso_size)) {
+       if (likely(skb_is_gso(skb))) {
                if (skb_header_cloned(skb)) {
                        err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
                        if (err)
@@ -1281,7 +1281,7 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb,
 
        while(len) {
                buffer_info = &tx_ring->buffer_info[i];
-               size = min(len, IXGB_MAX_JUMBO_FRAME_SIZE);
+               size = min(len, IXGB_MAX_DATA_PER_TXD);
                buffer_info->length = size;
                buffer_info->dma =
                        pci_map_single(adapter->pdev,
@@ -1306,7 +1306,7 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb,
 
                while(len) {
                        buffer_info = &tx_ring->buffer_info[i];
-                       size = min(len, IXGB_MAX_JUMBO_FRAME_SIZE);
+                       size = min(len, IXGB_MAX_DATA_PER_TXD);
                        buffer_info->length = size;
                        buffer_info->dma =
                                pci_map_page(adapter->pdev,
index 43fef7de8cb9b612789cdbbc2dae5300bc92196d..997cbce9af6e0b0fa9e203ac31da8816ccafb4f4 100644 (file)
@@ -139,7 +139,7 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
 #endif
 
 #ifdef LOOPBACK_TSO
-       if (skb_shinfo(skb)->gso_size) {
+       if (skb_is_gso(skb)) {
                BUG_ON(skb->protocol != htons(ETH_P_IP));
                BUG_ON(skb->nh.iph->protocol != IPPROTO_TCP);
 
index f4c8fd373b9b3e5e1956d44d59391ce91e0ded72..07ca9480a6fe7fc892b32b87e49d9065aac9a695 100644 (file)
@@ -2116,7 +2116,7 @@ abort_linearize:
                }
                idx = (idx + 1) & tx->mask;
        } while (idx != last_idx);
-       if (skb_shinfo(skb)->gso_size) {
+       if (skb_is_gso(skb)) {
                printk(KERN_ERR
                       "myri10ge: %s: TSO but wanted to linearize?!?!?\n",
                       mgp->dev->name);
@@ -2412,14 +2412,20 @@ static int myri10ge_resume(struct pci_dev *pdev)
                return -EIO;
        }
        myri10ge_restore_state(mgp);
-       pci_enable_device(pdev);
+
+       status = pci_enable_device(pdev);
+       if (status < 0) {
+               dev_err(&pdev->dev, "failed to enable device\n");
+               return -EIO;
+       }
+
        pci_set_master(pdev);
 
        status = request_irq(pdev->irq, myri10ge_intr, IRQF_SHARED,
                             netdev->name, mgp);
        if (status != 0) {
                dev_err(&pdev->dev, "failed to allocate IRQ\n");
-               goto abort_with_msi;
+               goto abort_with_enabled;
        }
 
        myri10ge_reset(mgp);
@@ -2438,7 +2444,8 @@ static int myri10ge_resume(struct pci_dev *pdev)
 
        return 0;
 
-abort_with_msi:
+abort_with_enabled:
+       pci_disable_device(pdev);
        return -EIO;
 
 }
index c6b77acb35ef88ace82eb594e96adc6394cb1b4e..e1fe3a0a7b0be740237491f4a5eaf523793c5683 100644 (file)
@@ -1976,7 +1976,6 @@ static int start_nic(struct s2io_nic *nic)
        XENA_dev_config_t __iomem *bar0 = nic->bar0;
        struct net_device *dev = nic->dev;
        register u64 val64 = 0;
-       u16 interruptible;
        u16 subid, i;
        mac_info_t *mac_control;
        struct config_param *config;
@@ -2047,16 +2046,6 @@ static int start_nic(struct s2io_nic *nic)
                return FAILURE;
        }
 
-       /*  Enable select interrupts */
-       if (nic->intr_type != INTA)
-               en_dis_able_nic_intrs(nic, ENA_ALL_INTRS, DISABLE_INTRS);
-       else {
-               interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR;
-               interruptible |= TX_PIC_INTR | RX_PIC_INTR;
-               interruptible |= TX_MAC_INTR | RX_MAC_INTR;
-               en_dis_able_nic_intrs(nic, interruptible, ENABLE_INTRS);
-       }
-
        /*
         * With some switches, link might be already up at this point.
         * Because of this weird behavior, when we enable laser,
@@ -3749,101 +3738,19 @@ static int s2io_open(struct net_device *dev)
        if (err) {
                DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n",
                          dev->name);
-               if (err == -ENODEV)
-                       goto hw_init_failed;
-               else
-                       goto hw_enable_failed;
-       }
-
-       /* Store the values of the MSIX table in the nic_t structure */
-       store_xmsi_data(sp);
-
-       /* After proper initialization of H/W, register ISR */
-       if (sp->intr_type == MSI) {
-               err = request_irq((int) sp->pdev->irq, s2io_msi_handle, 
-                       IRQF_SHARED, sp->name, dev);
-               if (err) {
-                       DBG_PRINT(ERR_DBG, "%s: MSI registration \
-failed\n", dev->name);
-                       goto isr_registration_failed;
-               }
-       }
-       if (sp->intr_type == MSI_X) {
-               int i;
-
-               for (i=1; (sp->s2io_entries[i].in_use == MSIX_FLG); i++) {
-                       if (sp->s2io_entries[i].type == MSIX_FIFO_TYPE) {
-                               sprintf(sp->desc1, "%s:MSI-X-%d-TX",
-                                       dev->name, i);
-                               err = request_irq(sp->entries[i].vector,
-                                         s2io_msix_fifo_handle, 0, sp->desc1,
-                                         sp->s2io_entries[i].arg);
-                               DBG_PRINT(ERR_DBG, "%s @ 0x%llx\n", sp->desc1, 
-                                   (unsigned long long)sp->msix_info[i].addr);
-                       } else {
-                               sprintf(sp->desc2, "%s:MSI-X-%d-RX",
-                                       dev->name, i);
-                               err = request_irq(sp->entries[i].vector,
-                                         s2io_msix_ring_handle, 0, sp->desc2,
-                                         sp->s2io_entries[i].arg);
-                               DBG_PRINT(ERR_DBG, "%s @ 0x%llx\n", sp->desc2, 
-                                    (unsigned long long)sp->msix_info[i].addr);
-                       }
-                       if (err) {
-                               DBG_PRINT(ERR_DBG, "%s: MSI-X-%d registration \
-failed\n", dev->name, i);
-                               DBG_PRINT(ERR_DBG, "Returned: %d\n", err);
-                               goto isr_registration_failed;
-                       }
-                       sp->s2io_entries[i].in_use = MSIX_REGISTERED_SUCCESS;
-               }
-       }
-       if (sp->intr_type == INTA) {
-               err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED,
-                               sp->name, dev);
-               if (err) {
-                       DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n",
-                                 dev->name);
-                       goto isr_registration_failed;
-               }
+               goto hw_init_failed;
        }
 
        if (s2io_set_mac_addr(dev, dev->dev_addr) == FAILURE) {
                DBG_PRINT(ERR_DBG, "Set Mac Address Failed\n");
+               s2io_card_down(sp);
                err = -ENODEV;
-               goto setting_mac_address_failed;
+               goto hw_init_failed;
        }
 
        netif_start_queue(dev);
        return 0;
 
-setting_mac_address_failed:
-       if (sp->intr_type != MSI_X)
-               free_irq(sp->pdev->irq, dev);
-isr_registration_failed:
-       del_timer_sync(&sp->alarm_timer);
-       if (sp->intr_type == MSI_X) {
-               int i;
-               u16 msi_control; /* Temp variable */
-
-               for (i=1; (sp->s2io_entries[i].in_use == 
-                               MSIX_REGISTERED_SUCCESS); i++) {
-                       int vector = sp->entries[i].vector;
-                       void *arg = sp->s2io_entries[i].arg;
-
-                       free_irq(vector, arg);
-               }
-               pci_disable_msix(sp->pdev);
-
-               /* Temp */
-               pci_read_config_word(sp->pdev, 0x42, &msi_control);
-               msi_control &= 0xFFFE; /* Disable MSI */
-               pci_write_config_word(sp->pdev, 0x42, msi_control);
-       }
-       else if (sp->intr_type == MSI)
-               pci_disable_msi(sp->pdev);
-hw_enable_failed:
-       s2io_reset(sp);
 hw_init_failed:
        if (sp->intr_type == MSI_X) {
                if (sp->entries)
@@ -3874,7 +3781,7 @@ static int s2io_close(struct net_device *dev)
        flush_scheduled_work();
        netif_stop_queue(dev);
        /* Reset card, kill tasklet and free Tx and Rx buffers. */
-       s2io_card_down(sp, 1);
+       s2io_card_down(sp);
 
        sp->device_close_flag = TRUE;   /* Device is shut down. */
        return 0;
@@ -5919,7 +5826,7 @@ static int s2io_change_mtu(struct net_device *dev, int new_mtu)
 
        dev->mtu = new_mtu;
        if (netif_running(dev)) {
-               s2io_card_down(sp, 0);
+               s2io_card_down(sp);
                netif_stop_queue(dev);
                if (s2io_card_up(sp)) {
                        DBG_PRINT(ERR_DBG, "%s: Device bring up failed\n",
@@ -6216,43 +6123,106 @@ static  int rxd_owner_bit_reset(nic_t *sp)
 
 }
 
-static void s2io_card_down(nic_t * sp, int flag)
+static int s2io_add_isr(nic_t * sp)
 {
-       int cnt = 0;
-       XENA_dev_config_t __iomem *bar0 = sp->bar0;
-       unsigned long flags;
-       register u64 val64 = 0;
+       int ret = 0;
        struct net_device *dev = sp->dev;
+       int err = 0;
 
-       del_timer_sync(&sp->alarm_timer);
-       /* If s2io_set_link task is executing, wait till it completes. */
-       while (test_and_set_bit(0, &(sp->link_state))) {
-               msleep(50);
+       if (sp->intr_type == MSI)
+               ret = s2io_enable_msi(sp);
+       else if (sp->intr_type == MSI_X)
+               ret = s2io_enable_msi_x(sp);
+       if (ret) {
+               DBG_PRINT(ERR_DBG, "%s: Defaulting to INTA\n", dev->name);
+               sp->intr_type = INTA;
        }
-       atomic_set(&sp->card_state, CARD_DOWN);
 
-       /* disable Tx and Rx traffic on the NIC */
-       stop_nic(sp);
-       if (flag) {
-               if (sp->intr_type == MSI_X) {
-                       int i;
-                       u16 msi_control;
+       /* Store the values of the MSIX table in the nic_t structure */
+       store_xmsi_data(sp);
 
-                       for (i=1; (sp->s2io_entries[i].in_use ==
-                               MSIX_REGISTERED_SUCCESS); i++) {
-                               int vector = sp->entries[i].vector;
-                               void *arg = sp->s2io_entries[i].arg;
+       /* After proper initialization of H/W, register ISR */
+       if (sp->intr_type == MSI) {
+               err = request_irq((int) sp->pdev->irq, s2io_msi_handle,
+                       IRQF_SHARED, sp->name, dev);
+               if (err) {
+                       pci_disable_msi(sp->pdev);
+                       DBG_PRINT(ERR_DBG, "%s: MSI registration failed\n",
+                                 dev->name);
+                       return -1;
+               }
+       }
+       if (sp->intr_type == MSI_X) {
+               int i;
 
-                               free_irq(vector, arg);
+               for (i=1; (sp->s2io_entries[i].in_use == MSIX_FLG); i++) {
+                       if (sp->s2io_entries[i].type == MSIX_FIFO_TYPE) {
+                               sprintf(sp->desc[i], "%s:MSI-X-%d-TX",
+                                       dev->name, i);
+                               err = request_irq(sp->entries[i].vector,
+                                         s2io_msix_fifo_handle, 0, sp->desc[i],
+                                                 sp->s2io_entries[i].arg);
+                               DBG_PRINT(ERR_DBG, "%s @ 0x%llx\n", sp->desc[i],
+                               (unsigned long long)sp->msix_info[i].addr);
+                       } else {
+                               sprintf(sp->desc[i], "%s:MSI-X-%d-RX",
+                                       dev->name, i);
+                               err = request_irq(sp->entries[i].vector,
+                                         s2io_msix_ring_handle, 0, sp->desc[i],
+                                                 sp->s2io_entries[i].arg);
+                               DBG_PRINT(ERR_DBG, "%s @ 0x%llx\n", sp->desc[i],
+                               (unsigned long long)sp->msix_info[i].addr);
                        }
-                       pci_read_config_word(sp->pdev, 0x42, &msi_control);
-                       msi_control &= 0xFFFE; /* Disable MSI */
-                       pci_write_config_word(sp->pdev, 0x42, msi_control);
-                       pci_disable_msix(sp->pdev);
-               } else {
-                       free_irq(sp->pdev->irq, dev);
-                       if (sp->intr_type == MSI)
-                               pci_disable_msi(sp->pdev);
+                       if (err) {
+                               DBG_PRINT(ERR_DBG,"%s:MSI-X-%d registration "
+                                         "failed\n", dev->name, i);
+                               DBG_PRINT(ERR_DBG, "Returned: %d\n", err);
+                               return -1;
+                       }
+                       sp->s2io_entries[i].in_use = MSIX_REGISTERED_SUCCESS;
+               }
+       }
+       if (sp->intr_type == INTA) {
+               err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED,
+                               sp->name, dev);
+               if (err) {
+                       DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n",
+                                 dev->name);
+                       return -1;
+               }
+       }
+       return 0;
+}
+static void s2io_rem_isr(nic_t * sp)
+{
+       int cnt = 0;
+       struct net_device *dev = sp->dev;
+
+       if (sp->intr_type == MSI_X) {
+               int i;
+               u16 msi_control;
+
+               for (i=1; (sp->s2io_entries[i].in_use ==
+                       MSIX_REGISTERED_SUCCESS); i++) {
+                       int vector = sp->entries[i].vector;
+                       void *arg = sp->s2io_entries[i].arg;
+
+                       free_irq(vector, arg);
+               }
+               pci_read_config_word(sp->pdev, 0x42, &msi_control);
+               msi_control &= 0xFFFE; /* Disable MSI */
+               pci_write_config_word(sp->pdev, 0x42, msi_control);
+
+               pci_disable_msix(sp->pdev);
+       } else {
+               free_irq(sp->pdev->irq, dev);
+               if (sp->intr_type == MSI) {
+                       u16 val;
+
+                       pci_disable_msi(sp->pdev);
+                       pci_read_config_word(sp->pdev, 0x4c, &val);
+                       val ^= 0x1;
+                       pci_write_config_word(sp->pdev, 0x4c, val);
                }
        }
        /* Waiting till all Interrupt handlers are complete */
@@ -6263,6 +6233,26 @@ static void s2io_card_down(nic_t * sp, int flag)
                        break;
                cnt++;
        } while(cnt < 5);
+}
+
+static void s2io_card_down(nic_t * sp)
+{
+       int cnt = 0;
+       XENA_dev_config_t __iomem *bar0 = sp->bar0;
+       unsigned long flags;
+       register u64 val64 = 0;
+
+       del_timer_sync(&sp->alarm_timer);
+       /* If s2io_set_link task is executing, wait till it completes. */
+       while (test_and_set_bit(0, &(sp->link_state))) {
+               msleep(50);
+       }
+       atomic_set(&sp->card_state, CARD_DOWN);
+
+       /* disable Tx and Rx traffic on the NIC */
+       stop_nic(sp);
+
+       s2io_rem_isr(sp);
 
        /* Kill tasklet. */
        tasklet_kill(&sp->task);
@@ -6314,23 +6304,16 @@ static int s2io_card_up(nic_t * sp)
        mac_info_t *mac_control;
        struct config_param *config;
        struct net_device *dev = (struct net_device *) sp->dev;
+       u16 interruptible;
 
        /* Initialize the H/W I/O registers */
        if (init_nic(sp) != 0) {
                DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n",
                          dev->name);
+               s2io_reset(sp);
                return -ENODEV;
        }
 
-       if (sp->intr_type == MSI)
-               ret = s2io_enable_msi(sp);
-       else if (sp->intr_type == MSI_X)
-               ret = s2io_enable_msi_x(sp);
-       if (ret) {
-               DBG_PRINT(ERR_DBG, "%s: Defaulting to INTA\n", dev->name);
-               sp->intr_type = INTA;
-       }
-
        /*
         * Initializing the Rx buffers. For now we are considering only 1
         * Rx ring and initializing buffers into 30 Rx blocks
@@ -6361,21 +6344,39 @@ static int s2io_card_up(nic_t * sp)
                        sp->lro_max_aggr_per_sess = lro_max_pkts;
        }
 
-       /* Enable tasklet for the device */
-       tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev);
-
        /* Enable Rx Traffic and interrupts on the NIC */
        if (start_nic(sp)) {
                DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name);
-               tasklet_kill(&sp->task);
                s2io_reset(sp);
-               free_irq(dev->irq, dev);
+               free_rx_buffers(sp);
+               return -ENODEV;
+       }
+
+       /* Add interrupt service routine */
+       if (s2io_add_isr(sp) != 0) {
+               if (sp->intr_type == MSI_X)
+                       s2io_rem_isr(sp);
+               s2io_reset(sp);
                free_rx_buffers(sp);
                return -ENODEV;
        }
 
        S2IO_TIMER_CONF(sp->alarm_timer, s2io_alarm_handle, sp, (HZ/2));
 
+       /* Enable tasklet for the device */
+       tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev);
+
+       /*  Enable select interrupts */
+       if (sp->intr_type != INTA)
+               en_dis_able_nic_intrs(sp, ENA_ALL_INTRS, DISABLE_INTRS);
+       else {
+               interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR;
+               interruptible |= TX_PIC_INTR | RX_PIC_INTR;
+               interruptible |= TX_MAC_INTR | RX_MAC_INTR;
+               en_dis_able_nic_intrs(sp, interruptible, ENABLE_INTRS);
+       }
+
+
        atomic_set(&sp->card_state, CARD_UP);
        return 0;
 }
@@ -6395,7 +6396,7 @@ static void s2io_restart_nic(unsigned long data)
        struct net_device *dev = (struct net_device *) data;
        nic_t *sp = dev->priv;
 
-       s2io_card_down(sp, 0);
+       s2io_card_down(sp);
        if (s2io_card_up(sp)) {
                DBG_PRINT(ERR_DBG, "%s: Device bring up failed\n",
                          dev->name);
index c43f5217970833278ce36f80894fff52cf6cd2c3..217097bc22f159970e3a24fc05b3b43f1fd35374 100644 (file)
@@ -829,8 +829,7 @@ struct s2io_nic {
 #define MSIX_FLG                0xA5
        struct msix_entry *entries;
        struct s2io_msix_entry *s2io_entries;
-       char desc1[35];
-       char desc2[35];
+       char desc[MAX_REQUESTED_MSI_X][25];
 
        int avail_msix_vectors; /* No. of MSI-X vectors granted by system */
 
@@ -1002,7 +1001,7 @@ static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag);
 static struct ethtool_ops netdev_ethtool_ops;
 static void s2io_set_link(unsigned long data);
 static int s2io_set_swapper(nic_t * sp);
-static void s2io_card_down(nic_t *nic, int flag);
+static void s2io_card_down(nic_t *nic);
 static int s2io_card_up(nic_t *nic);
 static int get_xena_rev_id(struct pci_dev *pdev);
 static void restore_xmsi_data(nic_t *nic);
index 2b19f8ad03185919e5478d1ee049a7f1d2da8701..7f8e6d0084c7a1b7503ad40f2c160af954d5a902 100644 (file)
@@ -1473,7 +1473,7 @@ extern "C" {
 #define GM_TXCR_FORCE_JAM      (1<<15) /* Bit 15:      Force Jam / Flow-Control */
 #define GM_TXCR_CRC_DIS                (1<<14) /* Bit 14:      Disable insertion of CRC */
 #define GM_TXCR_PAD_DIS                (1<<13) /* Bit 13:      Disable padding of packets */
-#define GM_TXCR_COL_THR_MSK    (1<<10) /* Bit 12..10:  Collision Threshold */
+#define GM_TXCR_COL_THR_MSK    (7<<10) /* Bit 12..10:  Collision Threshold */
 
 #define TX_COL_THR(x)          (SHIFT10(x) & GM_TXCR_COL_THR_MSK)
 
index ed19ff47ce1108dc0f6a3ac89935391f7c7fa961..593387b3c0dd039d9c44c33e29d5a471ce7769c6 100644 (file)
@@ -1734,11 +1734,11 @@ enum {
        GM_TXCR_FORCE_JAM       = 1<<15, /* Bit 15:     Force Jam / Flow-Control */
        GM_TXCR_CRC_DIS         = 1<<14, /* Bit 14:     Disable insertion of CRC */
        GM_TXCR_PAD_DIS         = 1<<13, /* Bit 13:     Disable padding of packets */
-       GM_TXCR_COL_THR_MSK     = 1<<10, /* Bit 12..10: Collision Threshold */
+       GM_TXCR_COL_THR_MSK     = 7<<10, /* Bit 12..10: Collision Threshold */
 };
 
 #define TX_COL_THR(x)          (((x)<<10) & GM_TXCR_COL_THR_MSK)
-#define TX_COL_DEF             0x04
+#define TX_COL_DEF             0x04    /* late collision after 64 byte */
 
 /*     GM_RX_CTRL                      16 bit r/w      Receive Control Register */
 enum {
index 418f169a6a31e9f964964467b142e7691e7985ec..de91609ca11230deb09a772268727c41a9f21aff 100644 (file)
@@ -50,7 +50,7 @@
 #include "sky2.h"
 
 #define DRV_NAME               "sky2"
-#define DRV_VERSION            "1.4"
+#define DRV_VERSION            "1.5"
 #define PFX                    DRV_NAME " "
 
 /*
@@ -65,6 +65,7 @@
 #define RX_MAX_PENDING         (RX_LE_SIZE/2 - 2)
 #define RX_DEF_PENDING         RX_MAX_PENDING
 #define RX_SKB_ALIGN           8
+#define RX_BUF_WRITE           16
 
 #define TX_RING_SIZE           512
 #define TX_DEF_PENDING         (TX_RING_SIZE - 1)
@@ -234,7 +235,6 @@ static void sky2_set_power_state(struct sky2_hw *hw, pci_power_t state)
                }
 
                if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
-                       sky2_write16(hw, B0_CTST, Y2_HW_WOL_ON);
                        sky2_pci_write32(hw, PCI_DEV_REG3, 0);
                        reg1 = sky2_pci_read32(hw, PCI_DEV_REG4);
                        reg1 &= P_ASPM_CONTROL_MSK;
@@ -243,6 +243,7 @@ static void sky2_set_power_state(struct sky2_hw *hw, pci_power_t state)
                }
 
                sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
+               udelay(100);
 
                break;
 
@@ -255,6 +256,7 @@ static void sky2_set_power_state(struct sky2_hw *hw, pci_power_t state)
                else
                        reg1 |= (PCI_Y2_PHY1_POWD | PCI_Y2_PHY2_POWD);
                sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
+               udelay(100);
 
                if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
                        sky2_write8(hw, B2_Y2_CLK_GATE, 0);
@@ -1159,7 +1161,7 @@ static unsigned tx_le_req(const struct sk_buff *skb)
        count = sizeof(dma_addr_t) / sizeof(u32);
        count += skb_shinfo(skb)->nr_frags * count;
 
-       if (skb_shinfo(skb)->gso_size)
+       if (skb_is_gso(skb))
                ++count;
 
        if (skb->ip_summed == CHECKSUM_HW)
@@ -1389,7 +1391,7 @@ static void sky2_tx_complete(struct sky2_port *sky2, u16 done)
        }
 
        sky2->tx_cons = put;
-       if (tx_avail(sky2) > MAX_SKB_TX_LE)
+       if (tx_avail(sky2) > MAX_SKB_TX_LE + 4)
                netif_wake_queue(dev);
 }
 
@@ -1888,9 +1890,6 @@ resubmit:
        re->skb->ip_summed = CHECKSUM_NONE;
        sky2_rx_add(sky2, re->mapaddr);
 
-       /* Tell receiver about new buffers. */
-       sky2_put_idx(sky2->hw, rxqaddr[sky2->port], sky2->rx_put);
-
        return skb;
 
 oversize:
@@ -1937,7 +1936,9 @@ static inline int sky2_more_work(const struct sky2_hw *hw)
 /* Process status response ring */
 static int sky2_status_intr(struct sky2_hw *hw, int to_do)
 {
+       struct sky2_port *sky2;
        int work_done = 0;
+       unsigned buf_write[2] = { 0, 0 };
        u16 hwidx = sky2_read16(hw, STAT_PUT_IDX);
 
        rmb();
@@ -1945,7 +1946,6 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
        while (hw->st_idx != hwidx) {
                struct sky2_status_le *le  = hw->st_le + hw->st_idx;
                struct net_device *dev;
-               struct sky2_port *sky2;
                struct sk_buff *skb;
                u32 status;
                u16 length;
@@ -1978,6 +1978,14 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
 #endif
                                netif_receive_skb(skb);
 
+                       /* Update receiver after 16 frames */
+                       if (++buf_write[le->link] == RX_BUF_WRITE) {
+                               sky2_put_idx(hw, rxqaddr[le->link],
+                                            sky2->rx_put);
+                               buf_write[le->link] = 0;
+                       }
+
+                       /* Stop after net poll weight */
                        if (++work_done >= to_do)
                                goto exit_loop;
                        break;
@@ -2016,6 +2024,16 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
        }
 
 exit_loop:
+       if (buf_write[0]) {
+               sky2 = netdev_priv(hw->dev[0]);
+               sky2_put_idx(hw, Q_R1, sky2->rx_put);
+       }
+
+       if (buf_write[1]) {
+               sky2 = netdev_priv(hw->dev[1]);
+               sky2_put_idx(hw, Q_R2, sky2->rx_put);
+       }
+
        return work_done;
 }
 
@@ -2186,9 +2204,6 @@ static int sky2_poll(struct net_device *dev0, int *budget)
        int work_done = 0;
        u32 status = sky2_read32(hw, B0_Y2_SP_EISR);
 
-       if (!~status)
-               goto out;
-
        if (status & Y2_IS_HW_ERR)
                sky2_hw_intr(hw);
 
@@ -2225,7 +2240,7 @@ static int sky2_poll(struct net_device *dev0, int *budget)
 
        if (sky2_more_work(hw))
                return 1;
-out:
+
        netif_rx_complete(dev0);
 
        sky2_read32(hw, B0_Y2_SP_LISR);
@@ -2286,7 +2301,7 @@ static inline u32 sky2_clk2us(const struct sky2_hw *hw, u32 clk)
 }
 
 
-static int __devinit sky2_reset(struct sky2_hw *hw)
+static int sky2_reset(struct sky2_hw *hw)
 {
        u16 status;
        u8 t8, pmd_type;
@@ -3437,17 +3452,14 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state)
                return -EINVAL;
 
        del_timer_sync(&hw->idle_timer);
+       netif_poll_disable(hw->dev[0]);
 
        for (i = 0; i < hw->ports; i++) {
                struct net_device *dev = hw->dev[i];
 
-               if (dev) {
-                       if (!netif_running(dev))
-                               continue;
-
+               if (netif_running(dev)) {
                        sky2_down(dev);
                        netif_device_detach(dev);
-                       netif_poll_disable(dev);
                }
        }
 
@@ -3474,9 +3486,8 @@ static int sky2_resume(struct pci_dev *pdev)
 
        for (i = 0; i < hw->ports; i++) {
                struct net_device *dev = hw->dev[i];
-               if (dev && netif_running(dev)) {
+               if (netif_running(dev)) {
                        netif_device_attach(dev);
-                       netif_poll_enable(dev);
 
                        err = sky2_up(dev);
                        if (err) {
@@ -3488,6 +3499,7 @@ static int sky2_resume(struct pci_dev *pdev)
                }
        }
 
+       netif_poll_enable(hw->dev[0]);
        sky2_idle_start(hw);
 out:
        return err;
index 8a0bc5525f0a64e8024b58d550ed29c4357fc6f4..2db8d19b22d10e25ac33dc53a7b52dacb84cbe44 100644 (file)
@@ -1480,7 +1480,7 @@ enum {
        GM_TXCR_FORCE_JAM       = 1<<15, /* Bit 15:     Force Jam / Flow-Control */
        GM_TXCR_CRC_DIS         = 1<<14, /* Bit 14:     Disable insertion of CRC */
        GM_TXCR_PAD_DIS         = 1<<13, /* Bit 13:     Disable padding of packets */
-       GM_TXCR_COL_THR_MSK     = 1<<10, /* Bit 12..10: Collision Threshold */
+       GM_TXCR_COL_THR_MSK     = 7<<10, /* Bit 12..10: Collision Threshold */
 };
 
 #define TX_COL_THR(x)          (((x)<<10) & GM_TXCR_COL_THR_MSK)
index b4028049ed764215b07255f40d111e61ae49f6c4..4ec4b4d23ae5edc867113b8d27e4e638e1db25d4 100644 (file)
@@ -354,6 +354,24 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r,
 
 #define SMC_IRQ_FLAGS          (0)
 
+#elif  defined(CONFIG_ARCH_VERSATILE)
+
+#define SMC_CAN_USE_8BIT       1
+#define SMC_CAN_USE_16BIT      1
+#define SMC_CAN_USE_32BIT      1
+#define SMC_NOWAIT             1
+
+#define SMC_inb(a, r)          readb((a) + (r))
+#define SMC_inw(a, r)          readw((a) + (r))
+#define SMC_inl(a, r)          readl((a) + (r))
+#define SMC_outb(v, a, r)      writeb(v, (a) + (r))
+#define SMC_outw(v, a, r)      writew(v, (a) + (r))
+#define SMC_outl(v, a, r)      writel(v, (a) + (r))
+#define SMC_insl(a, r, p, l)   readsl((a) + (r), p, l)
+#define SMC_outsl(a, r, p, l)  writesl((a) + (r), p, l)
+
+#define SMC_IRQ_FLAGS          (0)
+
 #else
 
 #define SMC_CAN_USE_8BIT       1
index fb1d5a8a45cf996c47623402b9a406dd7df8fa56..647f62e9707dd3ac701bdf3f7c2c31e99765452f 100644 (file)
@@ -84,7 +84,7 @@ MODULE_DEVICE_TABLE(pci, spider_net_pci_tbl);
  *
  * returns the content of the specified SMMIO register.
  */
-static u32
+static inline u32
 spider_net_read_reg(struct spider_net_card *card, u32 reg)
 {
        u32 value;
@@ -101,7 +101,7 @@ spider_net_read_reg(struct spider_net_card *card, u32 reg)
  * @reg: register to write to
  * @value: value to write into the specified SMMIO register
  */
-static void
+static inline void
 spider_net_write_reg(struct spider_net_card *card, u32 reg, u32 value)
 {
        value = cpu_to_le32(value);
@@ -259,39 +259,10 @@ spider_net_get_mac_address(struct net_device *netdev)
  *
  * returns the status as in the dmac_cmd_status field of the descriptor
  */
-static enum spider_net_descr_status
+static inline int
 spider_net_get_descr_status(struct spider_net_descr *descr)
 {
-       u32 cmd_status;
-
-       cmd_status = descr->dmac_cmd_status;
-       cmd_status >>= SPIDER_NET_DESCR_IND_PROC_SHIFT;
-       /* no need to mask out any bits, as cmd_status is 32 bits wide only
-        * (and unsigned) */
-       return cmd_status;
-}
-
-/**
- * spider_net_set_descr_status -- sets the status of a descriptor
- * @descr: descriptor to change
- * @status: status to set in the descriptor
- *
- * changes the status to the specified value. Doesn't change other bits
- * in the status
- */
-static void
-spider_net_set_descr_status(struct spider_net_descr *descr,
-                           enum spider_net_descr_status status)
-{
-       u32 cmd_status;
-       /* read the status */
-       cmd_status = descr->dmac_cmd_status;
-       /* clean the upper 4 bits */
-       cmd_status &= SPIDER_NET_DESCR_IND_PROC_MASKO;
-       /* add the status to it */
-       cmd_status |= ((u32)status)<<SPIDER_NET_DESCR_IND_PROC_SHIFT;
-       /* and write it back */
-       descr->dmac_cmd_status = cmd_status;
+       return descr->dmac_cmd_status & SPIDER_NET_DESCR_IND_PROC_MASK;
 }
 
 /**
@@ -328,24 +299,23 @@ spider_net_free_chain(struct spider_net_card *card,
 static int
 spider_net_init_chain(struct spider_net_card *card,
                       struct spider_net_descr_chain *chain,
-                      struct spider_net_descr *start_descr, int no)
+                      struct spider_net_descr *start_descr,
+                      int direction, int no)
 {
        int i;
        struct spider_net_descr *descr;
        dma_addr_t buf;
 
-       atomic_set(&card->rx_chain_refill,0);
-
        descr = start_descr;
        memset(descr, 0, sizeof(*descr) * no);
 
        /* set up the hardware pointers in each descriptor */
        for (i=0; i<no; i++, descr++) {
-               spider_net_set_descr_status(descr, SPIDER_NET_DESCR_NOT_IN_USE);
+               descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE;
 
                buf = pci_map_single(card->pdev, descr,
                                     SPIDER_NET_DESCR_SIZE,
-                                    PCI_DMA_BIDIRECTIONAL);
+                                    direction);
 
                if (buf == DMA_ERROR_CODE)
                        goto iommu_error;
@@ -360,10 +330,11 @@ spider_net_init_chain(struct spider_net_card *card,
        start_descr->prev = descr-1;
 
        descr = start_descr;
-       for (i=0; i < no; i++, descr++) {
-               descr->next_descr_addr = descr->next->bus_addr;
-       }
+       if (direction == PCI_DMA_FROMDEVICE)
+               for (i=0; i < no; i++, descr++)
+                       descr->next_descr_addr = descr->next->bus_addr;
 
+       spin_lock_init(&chain->lock);
        chain->head = start_descr;
        chain->tail = start_descr;
 
@@ -375,7 +346,7 @@ iommu_error:
                if (descr->bus_addr)
                        pci_unmap_single(card->pdev, descr->bus_addr,
                                         SPIDER_NET_DESCR_SIZE,
-                                        PCI_DMA_BIDIRECTIONAL);
+                                        direction);
        return -ENOMEM;
 }
 
@@ -396,7 +367,7 @@ spider_net_free_rx_chain_contents(struct spider_net_card *card)
                        dev_kfree_skb(descr->skb);
                        pci_unmap_single(card->pdev, descr->buf_addr,
                                         SPIDER_NET_MAX_FRAME,
-                                        PCI_DMA_BIDIRECTIONAL);
+                                        PCI_DMA_FROMDEVICE);
                }
                descr = descr->next;
        }
@@ -446,15 +417,16 @@ spider_net_prepare_rx_descr(struct spider_net_card *card,
                skb_reserve(descr->skb, SPIDER_NET_RXBUF_ALIGN - offset);
        /* io-mmu-map the skb */
        buf = pci_map_single(card->pdev, descr->skb->data,
-                            SPIDER_NET_MAX_FRAME, PCI_DMA_BIDIRECTIONAL);
+                       SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE);
        descr->buf_addr = buf;
        if (buf == DMA_ERROR_CODE) {
                dev_kfree_skb_any(descr->skb);
                if (netif_msg_rx_err(card) && net_ratelimit())
                        pr_err("Could not iommu-map rx buffer\n");
-               spider_net_set_descr_status(descr, SPIDER_NET_DESCR_NOT_IN_USE);
+               descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE;
        } else {
-               descr->dmac_cmd_status = SPIDER_NET_DMAC_RX_CARDOWNED;
+               descr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED |
+                                        SPIDER_NET_DMAC_NOINTR_COMPLETE;
        }
 
        return error;
@@ -468,7 +440,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card,
  * chip by writing to the appropriate register. DMA is enabled in
  * spider_net_enable_rxdmac.
  */
-static void
+static inline void
 spider_net_enable_rxchtails(struct spider_net_card *card)
 {
        /* assume chain is aligned correctly */
@@ -483,7 +455,7 @@ spider_net_enable_rxchtails(struct spider_net_card *card)
  * spider_net_enable_rxdmac enables the DMA controller by setting RX_DMA_EN
  * in the GDADMACCNTR register
  */
-static void
+static inline void
 spider_net_enable_rxdmac(struct spider_net_card *card)
 {
        wmb();
@@ -500,23 +472,24 @@ spider_net_enable_rxdmac(struct spider_net_card *card)
 static void
 spider_net_refill_rx_chain(struct spider_net_card *card)
 {
-       struct spider_net_descr_chain *chain;
-
-       chain = &card->rx_chain;
+       struct spider_net_descr_chain *chain = &card->rx_chain;
+       unsigned long flags;
 
        /* one context doing the refill (and a second context seeing that
         * and omitting it) is ok. If called by NAPI, we'll be called again
         * as spider_net_decode_one_descr is called several times. If some
         * interrupt calls us, the NAPI is about to clean up anyway. */
-       if (atomic_inc_return(&card->rx_chain_refill) == 1)
-               while (spider_net_get_descr_status(chain->head) ==
-                      SPIDER_NET_DESCR_NOT_IN_USE) {
-                       if (spider_net_prepare_rx_descr(card, chain->head))
-                               break;
-                       chain->head = chain->head->next;
-               }
+       if (!spin_trylock_irqsave(&chain->lock, flags))
+               return;
+
+       while (spider_net_get_descr_status(chain->head) ==
+                       SPIDER_NET_DESCR_NOT_IN_USE) {
+               if (spider_net_prepare_rx_descr(card, chain->head))
+                       break;
+               chain->head = chain->head->next;
+       }
 
-       atomic_dec(&card->rx_chain_refill);
+       spin_unlock_irqrestore(&chain->lock, flags);
 }
 
 /**
@@ -553,111 +526,6 @@ error:
        return result;
 }
 
-/**
- * spider_net_release_tx_descr - processes a used tx descriptor
- * @card: card structure
- * @descr: descriptor to release
- *
- * releases a used tx descriptor (unmapping, freeing of skb)
- */
-static void
-spider_net_release_tx_descr(struct spider_net_card *card,
-                           struct spider_net_descr *descr)
-{
-       struct sk_buff *skb;
-
-       /* unmap the skb */
-       skb = descr->skb;
-       pci_unmap_single(card->pdev, descr->buf_addr, skb->len,
-                        PCI_DMA_BIDIRECTIONAL);
-
-       dev_kfree_skb_any(skb);
-
-       /* set status to not used */
-       spider_net_set_descr_status(descr, SPIDER_NET_DESCR_NOT_IN_USE);
-}
-
-/**
- * spider_net_release_tx_chain - processes sent tx descriptors
- * @card: adapter structure
- * @brutal: if set, don't care about whether descriptor seems to be in use
- *
- * returns 0 if the tx ring is empty, otherwise 1.
- *
- * spider_net_release_tx_chain releases the tx descriptors that spider has
- * finished with (if non-brutal) or simply release tx descriptors (if brutal).
- * If some other context is calling this function, we return 1 so that we're
- * scheduled again (if we were scheduled) and will not loose initiative.
- */
-static int
-spider_net_release_tx_chain(struct spider_net_card *card, int brutal)
-{
-       struct spider_net_descr_chain *tx_chain = &card->tx_chain;
-       enum spider_net_descr_status status;
-
-       if (atomic_inc_return(&card->tx_chain_release) != 1) {
-               atomic_dec(&card->tx_chain_release);
-               return 1;
-       }
-
-       for (;;) {
-               status = spider_net_get_descr_status(tx_chain->tail);
-               switch (status) {
-               case SPIDER_NET_DESCR_CARDOWNED:
-                       if (!brutal)
-                               goto out;
-                       /* fallthrough, if we release the descriptors
-                        * brutally (then we don't care about
-                        * SPIDER_NET_DESCR_CARDOWNED) */
-               case SPIDER_NET_DESCR_RESPONSE_ERROR:
-               case SPIDER_NET_DESCR_PROTECTION_ERROR:
-               case SPIDER_NET_DESCR_FORCE_END:
-                       if (netif_msg_tx_err(card))
-                               pr_err("%s: forcing end of tx descriptor "
-                                      "with status x%02x\n",
-                                      card->netdev->name, status);
-                       card->netdev_stats.tx_dropped++;
-                       break;
-
-               case SPIDER_NET_DESCR_COMPLETE:
-                       card->netdev_stats.tx_packets++;
-                       card->netdev_stats.tx_bytes +=
-                               tx_chain->tail->skb->len;
-                       break;
-
-               default: /* any other value (== SPIDER_NET_DESCR_NOT_IN_USE) */
-                       goto out;
-               }
-               spider_net_release_tx_descr(card, tx_chain->tail);
-               tx_chain->tail = tx_chain->tail->next;
-       }
-out:
-       atomic_dec(&card->tx_chain_release);
-
-       netif_wake_queue(card->netdev);
-
-       if (status == SPIDER_NET_DESCR_CARDOWNED)
-               return 1;
-       return 0;
-}
-
-/**
- * spider_net_cleanup_tx_ring - cleans up the TX ring
- * @card: card structure
- *
- * spider_net_cleanup_tx_ring is called by the tx_timer (as we don't use
- * interrupts to cleanup our TX ring) and returns sent packets to the stack
- * by freeing them
- */
-static void
-spider_net_cleanup_tx_ring(struct spider_net_card *card)
-{
-       if ( (spider_net_release_tx_chain(card, 0)) &&
-             (card->netdev->flags & IFF_UP) ) {
-               mod_timer(&card->tx_timer, jiffies + SPIDER_NET_TX_TIMER);
-       }
-}
-
 /**
  * spider_net_get_multicast_hash - generates hash for multicast filter table
  * @addr: multicast address
@@ -760,97 +628,6 @@ spider_net_disable_rxdmac(struct spider_net_card *card)
                             SPIDER_NET_DMA_RX_FEND_VALUE);
 }
 
-/**
- * spider_net_stop - called upon ifconfig down
- * @netdev: interface device structure
- *
- * always returns 0
- */
-int
-spider_net_stop(struct net_device *netdev)
-{
-       struct spider_net_card *card = netdev_priv(netdev);
-
-       tasklet_kill(&card->rxram_full_tl);
-       netif_poll_disable(netdev);
-       netif_carrier_off(netdev);
-       netif_stop_queue(netdev);
-       del_timer_sync(&card->tx_timer);
-
-       /* disable/mask all interrupts */
-       spider_net_write_reg(card, SPIDER_NET_GHIINT0MSK, 0);
-       spider_net_write_reg(card, SPIDER_NET_GHIINT1MSK, 0);
-       spider_net_write_reg(card, SPIDER_NET_GHIINT2MSK, 0);
-
-       /* free_irq(netdev->irq, netdev);*/
-       free_irq(to_pci_dev(netdev->class_dev.dev)->irq, netdev);
-
-       spider_net_write_reg(card, SPIDER_NET_GDTDMACCNTR,
-                            SPIDER_NET_DMA_TX_FEND_VALUE);
-
-       /* turn off DMA, force end */
-       spider_net_disable_rxdmac(card);
-
-       /* release chains */
-       spider_net_release_tx_chain(card, 1);
-
-       spider_net_free_chain(card, &card->tx_chain);
-       spider_net_free_chain(card, &card->rx_chain);
-
-       return 0;
-}
-
-/**
- * spider_net_get_next_tx_descr - returns the next available tx descriptor
- * @card: device structure to get descriptor from
- *
- * returns the address of the next descriptor, or NULL if not available.
- */
-static struct spider_net_descr *
-spider_net_get_next_tx_descr(struct spider_net_card *card)
-{
-       /* check, if head points to not-in-use descr */
-       if ( spider_net_get_descr_status(card->tx_chain.head) ==
-            SPIDER_NET_DESCR_NOT_IN_USE ) {
-               return card->tx_chain.head;
-       } else {
-               return NULL;
-       }
-}
-
-/**
- * spider_net_set_txdescr_cmdstat - sets the tx descriptor command field
- * @descr: descriptor structure to fill out
- * @skb: packet to consider
- *
- * fills out the command and status field of the descriptor structure,
- * depending on hardware checksum settings.
- */
-static void
-spider_net_set_txdescr_cmdstat(struct spider_net_descr *descr,
-                              struct sk_buff *skb)
-{
-       /* make sure the other fields in the descriptor are written */
-       wmb();
-
-       if (skb->ip_summed != CHECKSUM_HW) {
-               descr->dmac_cmd_status = SPIDER_NET_DMAC_CMDSTAT_NOCS;
-               return;
-       }
-
-       /* is packet ip?
-        * if yes: tcp? udp? */
-       if (skb->protocol == htons(ETH_P_IP)) {
-               if (skb->nh.iph->protocol == IPPROTO_TCP)
-                       descr->dmac_cmd_status = SPIDER_NET_DMAC_CMDSTAT_TCPCS;
-               else if (skb->nh.iph->protocol == IPPROTO_UDP)
-                       descr->dmac_cmd_status = SPIDER_NET_DMAC_CMDSTAT_UDPCS;
-               else /* the stack should checksum non-tcp and non-udp
-                       packets on his own: NETIF_F_IP_CSUM */
-                       descr->dmac_cmd_status = SPIDER_NET_DMAC_CMDSTAT_NOCS;
-       }
-}
-
 /**
  * spider_net_prepare_tx_descr - fill tx descriptor with skb data
  * @card: card structure
@@ -864,13 +641,12 @@ spider_net_set_txdescr_cmdstat(struct spider_net_descr *descr,
  */
 static int
 spider_net_prepare_tx_descr(struct spider_net_card *card,
-                           struct spider_net_descr *descr,
                            struct sk_buff *skb)
 {
+       struct spider_net_descr *descr = card->tx_chain.head;
        dma_addr_t buf;
 
-       buf = pci_map_single(card->pdev, skb->data,
-                            skb->len, PCI_DMA_BIDIRECTIONAL);
+       buf = pci_map_single(card->pdev, skb->data, skb->len, PCI_DMA_TODEVICE);
        if (buf == DMA_ERROR_CODE) {
                if (netif_msg_tx_err(card) && net_ratelimit())
                        pr_err("could not iommu-map packet (%p, %i). "
@@ -880,10 +656,101 @@ spider_net_prepare_tx_descr(struct spider_net_card *card,
 
        descr->buf_addr = buf;
        descr->buf_size = skb->len;
+       descr->next_descr_addr = 0;
        descr->skb = skb;
        descr->data_status = 0;
 
-       spider_net_set_txdescr_cmdstat(descr,skb);
+       descr->dmac_cmd_status =
+                       SPIDER_NET_DESCR_CARDOWNED | SPIDER_NET_DMAC_NOCS;
+       if (skb->protocol == htons(ETH_P_IP))
+               switch (skb->nh.iph->protocol) {
+               case IPPROTO_TCP:
+                       descr->dmac_cmd_status |= SPIDER_NET_DMAC_TCP;
+                       break;
+               case IPPROTO_UDP:
+                       descr->dmac_cmd_status |= SPIDER_NET_DMAC_UDP;
+                       break;
+               }
+
+       descr->prev->next_descr_addr = descr->bus_addr;
+
+       return 0;
+}
+
+/**
+ * spider_net_release_tx_descr - processes a used tx descriptor
+ * @card: card structure
+ * @descr: descriptor to release
+ *
+ * releases a used tx descriptor (unmapping, freeing of skb)
+ */
+static inline void
+spider_net_release_tx_descr(struct spider_net_card *card)
+{
+       struct spider_net_descr *descr = card->tx_chain.tail;
+       struct sk_buff *skb;
+
+       card->tx_chain.tail = card->tx_chain.tail->next;
+       descr->dmac_cmd_status |= SPIDER_NET_DESCR_NOT_IN_USE;
+
+       /* unmap the skb */
+       skb = descr->skb;
+       pci_unmap_single(card->pdev, descr->buf_addr, skb->len,
+                       PCI_DMA_TODEVICE);
+       dev_kfree_skb_any(skb);
+}
+
+/**
+ * spider_net_release_tx_chain - processes sent tx descriptors
+ * @card: adapter structure
+ * @brutal: if set, don't care about whether descriptor seems to be in use
+ *
+ * returns 0 if the tx ring is empty, otherwise 1.
+ *
+ * spider_net_release_tx_chain releases the tx descriptors that spider has
+ * finished with (if non-brutal) or simply release tx descriptors (if brutal).
+ * If some other context is calling this function, we return 1 so that we're
+ * scheduled again (if we were scheduled) and will not loose initiative.
+ */
+static int
+spider_net_release_tx_chain(struct spider_net_card *card, int brutal)
+{
+       struct spider_net_descr_chain *chain = &card->tx_chain;
+       int status;
+
+       spider_net_read_reg(card, SPIDER_NET_GDTDMACCNTR);
+
+       while (chain->tail != chain->head) {
+               status = spider_net_get_descr_status(chain->tail);
+               switch (status) {
+               case SPIDER_NET_DESCR_COMPLETE:
+                       card->netdev_stats.tx_packets++;
+                       card->netdev_stats.tx_bytes += chain->tail->skb->len;
+                       break;
+
+               case SPIDER_NET_DESCR_CARDOWNED:
+                       if (!brutal)
+                               return 1;
+                       /* fallthrough, if we release the descriptors
+                        * brutally (then we don't care about
+                        * SPIDER_NET_DESCR_CARDOWNED) */
+
+               case SPIDER_NET_DESCR_RESPONSE_ERROR:
+               case SPIDER_NET_DESCR_PROTECTION_ERROR:
+               case SPIDER_NET_DESCR_FORCE_END:
+                       if (netif_msg_tx_err(card))
+                               pr_err("%s: forcing end of tx descriptor "
+                                      "with status x%02x\n",
+                                      card->netdev->name, status);
+                       card->netdev_stats.tx_errors++;
+                       break;
+
+               default:
+                       card->netdev_stats.tx_dropped++;
+                       return 1;
+               }
+               spider_net_release_tx_descr(card);
+       }
 
        return 0;
 }
@@ -896,18 +763,32 @@ spider_net_prepare_tx_descr(struct spider_net_card *card,
  * spider_net_kick_tx_dma writes the current tx chain head as start address
  * of the tx descriptor chain and enables the transmission DMA engine
  */
-static void
-spider_net_kick_tx_dma(struct spider_net_card *card,
-                      struct spider_net_descr *descr)
+static inline void
+spider_net_kick_tx_dma(struct spider_net_card *card)
 {
-       /* this is the only descriptor in the output chain.
-        * Enable TX DMA */
+       struct spider_net_descr *descr;
 
-       spider_net_write_reg(card, SPIDER_NET_GDTDCHA,
-                            descr->bus_addr);
+       if (spider_net_read_reg(card, SPIDER_NET_GDTDMACCNTR) &
+                       SPIDER_NET_TX_DMA_EN)
+               goto out;
 
-       spider_net_write_reg(card, SPIDER_NET_GDTDMACCNTR,
-                            SPIDER_NET_DMA_TX_VALUE);
+       descr = card->tx_chain.tail;
+       for (;;) {
+               if (spider_net_get_descr_status(descr) ==
+                               SPIDER_NET_DESCR_CARDOWNED) {
+                       spider_net_write_reg(card, SPIDER_NET_GDTDCHA,
+                                       descr->bus_addr);
+                       spider_net_write_reg(card, SPIDER_NET_GDTDMACCNTR,
+                                       SPIDER_NET_DMA_TX_VALUE);
+                       break;
+               }
+               if (descr == card->tx_chain.head)
+                       break;
+               descr = descr->next;
+       }
+
+out:
+       mod_timer(&card->tx_timer, jiffies + SPIDER_NET_TX_TIMER);
 }
 
 /**
@@ -915,47 +796,69 @@ spider_net_kick_tx_dma(struct spider_net_card *card,
  * @skb: packet to send out
  * @netdev: interface device structure
  *
- * returns 0 on success, <0 on failure
+ * returns 0 on success, !0 on failure
  */
 static int
 spider_net_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
        struct spider_net_card *card = netdev_priv(netdev);
-       struct spider_net_descr *descr;
+       struct spider_net_descr_chain *chain = &card->tx_chain;
+       struct spider_net_descr *descr = chain->head;
+       unsigned long flags;
        int result;
 
+       spin_lock_irqsave(&chain->lock, flags);
+
        spider_net_release_tx_chain(card, 0);
 
-       descr = spider_net_get_next_tx_descr(card);
+       if (chain->head->next == chain->tail->prev) {
+               card->netdev_stats.tx_dropped++;
+               result = NETDEV_TX_LOCKED;
+               goto out;
+       }
 
-       if (!descr)
-               goto error;
+       if (spider_net_get_descr_status(descr) != SPIDER_NET_DESCR_NOT_IN_USE) {
+               result = NETDEV_TX_LOCKED;
+               goto out;
+       }
 
-       result = spider_net_prepare_tx_descr(card, descr, skb);
-       if (result)
-               goto error;
+       if (spider_net_prepare_tx_descr(card, skb) != 0) {
+               card->netdev_stats.tx_dropped++;
+               result = NETDEV_TX_BUSY;
+               goto out;
+       }
+
+       result = NETDEV_TX_OK;
 
+       spider_net_kick_tx_dma(card);
        card->tx_chain.head = card->tx_chain.head->next;
 
-       if (spider_net_get_descr_status(descr->prev) !=
-           SPIDER_NET_DESCR_CARDOWNED) {
-               /* make sure the current descriptor is in memory. Then
-                * kicking it on again makes sense, if the previous is not
-                * card-owned anymore. Check the previous descriptor twice
-                * to omit an mb() in heavy traffic cases */
-               mb();
-               if (spider_net_get_descr_status(descr->prev) !=
-                   SPIDER_NET_DESCR_CARDOWNED)
-                       spider_net_kick_tx_dma(card, descr);
-       }
+out:
+       spin_unlock_irqrestore(&chain->lock, flags);
+       netif_wake_queue(netdev);
+       return result;
+}
 
-       mod_timer(&card->tx_timer, jiffies + SPIDER_NET_TX_TIMER);
+/**
+ * spider_net_cleanup_tx_ring - cleans up the TX ring
+ * @card: card structure
+ *
+ * spider_net_cleanup_tx_ring is called by the tx_timer (as we don't use
+ * interrupts to cleanup our TX ring) and returns sent packets to the stack
+ * by freeing them
+ */
+static void
+spider_net_cleanup_tx_ring(struct spider_net_card *card)
+{
+       unsigned long flags;
 
-       return NETDEV_TX_OK;
+       spin_lock_irqsave(&card->tx_chain.lock, flags);
 
-error:
-       card->netdev_stats.tx_dropped++;
-       return NETDEV_TX_BUSY;
+       if ((spider_net_release_tx_chain(card, 0) != 0) &&
+           (card->netdev->flags & IFF_UP))
+               spider_net_kick_tx_dma(card);
+
+       spin_unlock_irqrestore(&card->tx_chain.lock, flags);
 }
 
 /**
@@ -1002,7 +905,7 @@ spider_net_pass_skb_up(struct spider_net_descr *descr,
 
        /* unmap descriptor */
        pci_unmap_single(card->pdev, descr->buf_addr, SPIDER_NET_MAX_FRAME,
-                        PCI_DMA_BIDIRECTIONAL);
+                       PCI_DMA_FROMDEVICE);
 
        /* the cases we'll throw away the packet immediately */
        if (data_error & SPIDER_NET_DESTROY_RX_FLAGS) {
@@ -1067,14 +970,11 @@ spider_net_pass_skb_up(struct spider_net_descr *descr,
 static int
 spider_net_decode_one_descr(struct spider_net_card *card, int napi)
 {
-       enum spider_net_descr_status status;
-       struct spider_net_descr *descr;
-       struct spider_net_descr_chain *chain;
+       struct spider_net_descr_chain *chain = &card->rx_chain;
+       struct spider_net_descr *descr = chain->tail;
+       int status;
        int result;
 
-       chain = &card->rx_chain;
-       descr = chain->tail;
-
        status = spider_net_get_descr_status(descr);
 
        if (status == SPIDER_NET_DESCR_CARDOWNED) {
@@ -1103,7 +1003,7 @@ spider_net_decode_one_descr(struct spider_net_card *card, int napi)
                               card->netdev->name, status);
                card->netdev_stats.rx_dropped++;
                pci_unmap_single(card->pdev, descr->buf_addr,
-                                SPIDER_NET_MAX_FRAME, PCI_DMA_BIDIRECTIONAL);
+                               SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE);
                dev_kfree_skb_irq(descr->skb);
                goto refill;
        }
@@ -1119,7 +1019,7 @@ spider_net_decode_one_descr(struct spider_net_card *card, int napi)
        /* ok, we've got a packet in descr */
        result = spider_net_pass_skb_up(descr, card, napi);
 refill:
-       spider_net_set_descr_status(descr, SPIDER_NET_DESCR_NOT_IN_USE);
+       descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE;
        /* change the descriptor state: */
        if (!napi)
                spider_net_refill_rx_chain(card);
@@ -1290,21 +1190,6 @@ spider_net_set_mac(struct net_device *netdev, void *p)
        return 0;
 }
 
-/**
- * spider_net_enable_txdmac - enables a TX DMA controller
- * @card: card structure
- *
- * spider_net_enable_txdmac enables the TX DMA controller by setting the
- * descriptor chain tail address
- */
-static void
-spider_net_enable_txdmac(struct spider_net_card *card)
-{
-       /* assume chain is aligned correctly */
-       spider_net_write_reg(card, SPIDER_NET_GDTDCHA,
-                            card->tx_chain.tail->bus_addr);
-}
-
 /**
  * spider_net_handle_rxram_full - cleans up RX ring upon RX RAM full interrupt
  * @card: card structure
@@ -1653,7 +1538,6 @@ spider_net_enable_card(struct spider_net_card *card)
                { SPIDER_NET_GMRWOLCTRL, 0 },
                { SPIDER_NET_GTESTMD, 0x10000000 },
                { SPIDER_NET_GTTQMSK, 0x00400040 },
-               { SPIDER_NET_GTESTMD, 0 },
 
                { SPIDER_NET_GMACINTEN, 0 },
 
@@ -1692,9 +1576,6 @@ spider_net_enable_card(struct spider_net_card *card)
 
        spider_net_write_reg(card, SPIDER_NET_GRXDMAEN, SPIDER_NET_WOL_VALUE);
 
-       /* set chain tail adress for TX chain */
-       spider_net_enable_txdmac(card);
-
        spider_net_write_reg(card, SPIDER_NET_GMACLENLMT,
                             SPIDER_NET_LENLMT_VALUE);
        spider_net_write_reg(card, SPIDER_NET_GMACMODE,
@@ -1709,6 +1590,9 @@ spider_net_enable_card(struct spider_net_card *card)
                             SPIDER_NET_INT1_MASK_VALUE);
        spider_net_write_reg(card, SPIDER_NET_GHIINT2MSK,
                             SPIDER_NET_INT2_MASK_VALUE);
+
+       spider_net_write_reg(card, SPIDER_NET_GDTDMACCNTR,
+                            SPIDER_NET_GDTDCEIDIS);
 }
 
 /**
@@ -1728,10 +1612,12 @@ spider_net_open(struct net_device *netdev)
 
        result = -ENOMEM;
        if (spider_net_init_chain(card, &card->tx_chain,
-                         card->descr, tx_descriptors))
+                       card->descr,
+                       PCI_DMA_TODEVICE, tx_descriptors))
                goto alloc_tx_failed;
        if (spider_net_init_chain(card, &card->rx_chain,
-                         card->descr + tx_descriptors, rx_descriptors))
+                       card->descr + tx_descriptors,
+                       PCI_DMA_FROMDEVICE, rx_descriptors))
                goto alloc_rx_failed;
 
        /* allocate rx skbs */
@@ -1938,7 +1824,7 @@ spider_net_workaround_rxramfull(struct spider_net_card *card)
        /* empty sequencer data */
        for (sequencer = 0; sequencer < SPIDER_NET_FIRMWARE_SEQS;
             sequencer++) {
-               spider_net_write_reg(card, SPIDER_NET_GSnPRGDAT +
+               spider_net_write_reg(card, SPIDER_NET_GSnPRGADR +
                                     sequencer * 8, 0x0);
                for (i = 0; i < SPIDER_NET_FIRMWARE_SEQWORDS; i++) {
                        spider_net_write_reg(card, SPIDER_NET_GSnPRGDAT +
@@ -1954,6 +1840,49 @@ spider_net_workaround_rxramfull(struct spider_net_card *card)
                             SPIDER_NET_CKRCTRL_STOP_VALUE);
 }
 
+/**
+ * spider_net_stop - called upon ifconfig down
+ * @netdev: interface device structure
+ *
+ * always returns 0
+ */
+int
+spider_net_stop(struct net_device *netdev)
+{
+       struct spider_net_card *card = netdev_priv(netdev);
+
+       tasklet_kill(&card->rxram_full_tl);
+       netif_poll_disable(netdev);
+       netif_carrier_off(netdev);
+       netif_stop_queue(netdev);
+       del_timer_sync(&card->tx_timer);
+
+       /* disable/mask all interrupts */
+       spider_net_write_reg(card, SPIDER_NET_GHIINT0MSK, 0);
+       spider_net_write_reg(card, SPIDER_NET_GHIINT1MSK, 0);
+       spider_net_write_reg(card, SPIDER_NET_GHIINT2MSK, 0);
+
+       /* free_irq(netdev->irq, netdev);*/
+       free_irq(to_pci_dev(netdev->class_dev.dev)->irq, netdev);
+
+       spider_net_write_reg(card, SPIDER_NET_GDTDMACCNTR,
+                            SPIDER_NET_DMA_TX_FEND_VALUE);
+
+       /* turn off DMA, force end */
+       spider_net_disable_rxdmac(card);
+
+       /* release chains */
+       if (spin_trylock(&card->tx_chain.lock)) {
+               spider_net_release_tx_chain(card, 1);
+               spin_unlock(&card->tx_chain.lock);
+       }
+
+       spider_net_free_chain(card, &card->tx_chain);
+       spider_net_free_chain(card, &card->rx_chain);
+
+       return 0;
+}
+
 /**
  * spider_net_tx_timeout_task - task scheduled by the watchdog timeout
  * function (to be called not under interrupt status)
@@ -1982,7 +1911,7 @@ spider_net_tx_timeout_task(void *data)
                goto out;
 
        spider_net_open(netdev);
-       spider_net_kick_tx_dma(card, card->tx_chain.head);
+       spider_net_kick_tx_dma(card);
        netif_device_attach(netdev);
 
 out:
@@ -2065,7 +1994,6 @@ spider_net_setup_netdev(struct spider_net_card *card)
 
        pci_set_drvdata(card->pdev, netdev);
 
-       atomic_set(&card->tx_chain_release,0);
        card->rxram_full_tl.data = (unsigned long) card;
        card->rxram_full_tl.func =
                (void (*)(unsigned long)) spider_net_handle_rxram_full;
@@ -2079,7 +2007,7 @@ spider_net_setup_netdev(struct spider_net_card *card)
 
        spider_net_setup_netdev_ops(netdev);
 
-       netdev->features = NETIF_F_HW_CSUM;
+       netdev->features = NETIF_F_HW_CSUM | NETIF_F_LLTX;
        /* some time: NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX |
         *              NETIF_F_HW_VLAN_FILTER */
 
index 3b8d951cf73c62c641fec8372e8ed9e21b2821c3..f6dcf180ae3d280b49c0d434fcdf503b4fc8321b 100644 (file)
@@ -208,7 +208,10 @@ extern char spider_net_driver_name[];
 #define SPIDER_NET_DMA_RX_VALUE                0x80000000
 #define SPIDER_NET_DMA_RX_FEND_VALUE   0x00030003
 /* to set TX_DMA_EN */
-#define SPIDER_NET_DMA_TX_VALUE                0x80000000
+#define SPIDER_NET_TX_DMA_EN           0x80000000
+#define SPIDER_NET_GDTDCEIDIS          0x00000002
+#define SPIDER_NET_DMA_TX_VALUE                SPIDER_NET_TX_DMA_EN | \
+                                       SPIDER_NET_GDTDCEIDIS
 #define SPIDER_NET_DMA_TX_FEND_VALUE   0x00030003
 
 /* SPIDER_NET_UA_DESCR_VALUE is OR'ed with the unicast address */
@@ -329,55 +332,23 @@ enum spider_net_int2_status {
                                  (~SPIDER_NET_TXINT) & \
                                  (~SPIDER_NET_RXINT) )
 
-#define SPIDER_NET_GPREXEC             0x80000000
-#define SPIDER_NET_GPRDAT_MASK         0x0000ffff
+#define SPIDER_NET_GPREXEC                     0x80000000
+#define SPIDER_NET_GPRDAT_MASK                 0x0000ffff
 
-/* descriptor bits
- *
- * 1010                                        descriptor ready
- *     0                               descr in middle of chain
- *      000                            fixed to 0
- *
- *         0                           no interrupt on completion
- *          000                                fixed to 0
- *             1                       no ipsec processing
- *              1                      last descriptor for this frame
- *               00                    no checksum
- *               10                    tcp checksum
- *               11                    udp checksum
- *
- *                 00                  fixed to 0
- *                   0                 fixed to 0
- *                    0                        no interrupt on response errors
- *                     0               no interrupt on invalid descr
- *                      0              no interrupt on dma process termination
- *                       0             no interrupt on descr chain end
- *                        0            no interrupt on descr complete
- *
- *                         000         fixed to 0
- *                            0                response error interrupt status
- *                             0       invalid descr status
- *                              0      dma termination status
- *                               0     descr chain end status
- *                                0    descr complete status */
-#define SPIDER_NET_DMAC_CMDSTAT_NOCS   0xa00c0000
-#define SPIDER_NET_DMAC_CMDSTAT_TCPCS  0xa00e0000
-#define SPIDER_NET_DMAC_CMDSTAT_UDPCS  0xa00f0000
-#define SPIDER_NET_DESCR_IND_PROC_SHIFT        28
-#define SPIDER_NET_DESCR_IND_PROC_MASKO        0x0fffffff
-
-/* descr ready, descr is in middle of chain, get interrupt on completion */
-#define SPIDER_NET_DMAC_RX_CARDOWNED   0xa0800000
-
-enum spider_net_descr_status {
-       SPIDER_NET_DESCR_COMPLETE               = 0x00, /* used in rx and tx */
-       SPIDER_NET_DESCR_RESPONSE_ERROR         = 0x01, /* used in rx and tx */
-       SPIDER_NET_DESCR_PROTECTION_ERROR       = 0x02, /* used in rx and tx */
-       SPIDER_NET_DESCR_FRAME_END              = 0x04, /* used in rx */
-       SPIDER_NET_DESCR_FORCE_END              = 0x05, /* used in rx and tx */
-       SPIDER_NET_DESCR_CARDOWNED              = 0x0a, /* used in rx and tx */
-       SPIDER_NET_DESCR_NOT_IN_USE /* any other value */
-};
+#define SPIDER_NET_DMAC_NOINTR_COMPLETE                0x00800000
+#define SPIDER_NET_DMAC_NOCS                   0x00040000
+#define SPIDER_NET_DMAC_TCP                    0x00020000
+#define SPIDER_NET_DMAC_UDP                    0x00030000
+#define SPIDER_NET_TXDCEST                     0x08000000
+
+#define SPIDER_NET_DESCR_IND_PROC_MASK         0xF0000000
+#define SPIDER_NET_DESCR_COMPLETE              0x00000000 /* used in rx and tx */
+#define SPIDER_NET_DESCR_RESPONSE_ERROR                0x10000000 /* used in rx and tx */
+#define SPIDER_NET_DESCR_PROTECTION_ERROR      0x20000000 /* used in rx and tx */
+#define SPIDER_NET_DESCR_FRAME_END             0x40000000 /* used in rx */
+#define SPIDER_NET_DESCR_FORCE_END             0x50000000 /* used in rx and tx */
+#define SPIDER_NET_DESCR_CARDOWNED             0xA0000000 /* used in rx and tx */
+#define SPIDER_NET_DESCR_NOT_IN_USE            0xF0000000
 
 struct spider_net_descr {
        /* as defined by the hardware */
@@ -398,7 +369,7 @@ struct spider_net_descr {
 } __attribute__((aligned(32)));
 
 struct spider_net_descr_chain {
-       /* we walk from tail to head */
+       spinlock_t lock;
        struct spider_net_descr *head;
        struct spider_net_descr *tail;
 };
@@ -453,8 +424,6 @@ struct spider_net_card {
 
        struct spider_net_descr_chain tx_chain;
        struct spider_net_descr_chain rx_chain;
-       atomic_t rx_chain_refill;
-       atomic_t tx_chain_release;
 
        struct net_device_stats netdev_stats;
 
index f645921aff8bac752fb476291ed660ee59dcab4e..ce6f3be86da00b77e363d426eb7562c962c35121 100644 (file)
@@ -10078,6 +10078,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
        static struct pci_device_id write_reorder_chipsets[] = {
                { PCI_DEVICE(PCI_VENDOR_ID_AMD,
                             PCI_DEVICE_ID_AMD_FE_GATE_700C) },
+               { PCI_DEVICE(PCI_VENDOR_ID_AMD,
+                            PCI_DEVICE_ID_AMD_8131_BRIDGE) },
                { PCI_DEVICE(PCI_VENDOR_ID_VIA,
                             PCI_DEVICE_ID_VIA_8385_0) },
                { },
index 063816f2b11ecf8de32f779c2dfb7ac3b192afdd..4103c37172f9b154804f882ebf87be6ae3e26e29 100644 (file)
@@ -805,7 +805,7 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
         * If problems develop with TSO, check this first.
         */
        numDesc = skb_shinfo(skb)->nr_frags + 1;
-       if(skb_tso_size(skb))
+       if (skb_is_gso(skb))
                numDesc++;
 
        /* When checking for free space in the ring, we need to also
@@ -845,7 +845,7 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
                                TYPHOON_TX_PF_VLAN_TAG_SHIFT);
        }
 
-       if(skb_tso_size(skb)) {
+       if (skb_is_gso(skb)) {
                first_txd->processFlags |= TYPHOON_TX_PF_TCP_SEGMENT;
                first_txd->numDesc++;
 
index c92ac9fde0831ff6175f17bc45bfdb1876c158e3..2c09ec908a3fa94390df7db514cd9fa05a0ef593 100644 (file)
@@ -116,27 +116,33 @@ static inline void openwin(card_t *card, u8 page)
 #include "hd6457x.c"
 
 
+static inline void set_carrier(port_t *port)
+{
+       if (!sca_in(MSCI1_OFFSET + ST3, port) & ST3_DCD)
+               netif_carrier_on(port_to_dev(port));
+       else
+               netif_carrier_off(port_to_dev(port));
+}
+
+
 static void sca_msci_intr(port_t *port)
 {
-       struct net_device *dev = port_to_dev(port);
-       card_t* card = port_to_card(port);
-       u8 stat = sca_in(MSCI1_OFFSET + ST1, card); /* read MSCI ST1 status */
+       u8 stat = sca_in(MSCI1_OFFSET + ST1, port); /* read MSCI ST1 status */
 
        /* Reset MSCI TX underrun status bit */
-       sca_out(stat & ST1_UDRN, MSCI0_OFFSET + ST1, card);
+       sca_out(stat & ST1_UDRN, MSCI0_OFFSET + ST1, port);
 
        if (stat & ST1_UDRN) {
-               struct net_device_stats *stats = hdlc_stats(dev);
+               struct net_device_stats *stats = hdlc_stats(port_to_dev(port));
                stats->tx_errors++; /* TX Underrun error detected */
                stats->tx_fifo_errors++;
        }
 
        /* Reset MSCI CDCD status bit - uses ch#2 DCD input */
-       sca_out(stat & ST1_CDCD, MSCI1_OFFSET + ST1, card);
+       sca_out(stat & ST1_CDCD, MSCI1_OFFSET + ST1, port);
 
        if (stat & ST1_CDCD)
-               hdlc_set_carrier(!(sca_in(MSCI1_OFFSET + ST3, card) & ST3_DCD),
-                                dev);
+               set_carrier(port);
 }
 
 
@@ -190,7 +196,7 @@ static int c101_open(struct net_device *dev)
        sca_out(IE1_UDRN, MSCI0_OFFSET + IE1, port);
        sca_out(IE0_TXINT, MSCI0_OFFSET + IE0, port);
 
-       hdlc_set_carrier(!(sca_in(MSCI1_OFFSET + ST3, port) & ST3_DCD), dev);
+       set_carrier(port);
        printk(KERN_DEBUG "0x%X\n", sca_in(MSCI1_OFFSET + ST3, port));
 
        /* enable MSCI1 CDCD interrupt */
@@ -378,7 +384,7 @@ static int __init c101_run(unsigned long irq, unsigned long winbase)
        }
 
        sca_init_sync_port(card); /* Set up C101 memory */
-       hdlc_set_carrier(!(sca_in(MSCI1_OFFSET + ST3, card) & ST3_DCD), dev);
+       set_carrier(card);
 
        printk(KERN_INFO "%s: Moxa C101 on IRQ%u,"
               " using %u TX + %u RX packets rings\n",
index d3743321a9777ccf7e4d50aa09db9bc2d1d36f00..dce2bb317b82bad854f880996c74345d3076a853 100644 (file)
@@ -168,6 +168,23 @@ static inline u32 buffer_offset(port_t *port, u16 desc, int transmit)
 }
 
 
+static inline void sca_set_carrier(port_t *port)
+{
+       if (!(sca_in(get_msci(port) + ST3, port_to_card(port)) & ST3_DCD)) {
+#ifdef DEBUG_LINK
+               printk(KERN_DEBUG "%s: sca_set_carrier on\n",
+                      port_to_dev(port)->name);
+#endif
+               netif_carrier_on(port_to_dev(port));
+       } else {
+#ifdef DEBUG_LINK
+               printk(KERN_DEBUG "%s: sca_set_carrier off\n",
+                      port_to_dev(port)->name);
+#endif
+               netif_carrier_off(port_to_dev(port));
+       }
+}
+
 
 static void sca_init_sync_port(port_t *port)
 {
@@ -237,9 +254,7 @@ static void sca_init_sync_port(port_t *port)
                        sca_out(DIR_BOFE, DIR_TX(phy_node(port)), card);
                }
        }
-
-       hdlc_set_carrier(!(sca_in(get_msci(port) + ST3, card) & ST3_DCD),
-                        port_to_dev(port));
+       sca_set_carrier(port);
 }
 
 
@@ -262,8 +277,7 @@ static inline void sca_msci_intr(port_t *port)
        }
 
        if (stat & ST1_CDCD)
-               hdlc_set_carrier(!(sca_in(msci + ST3, card) & ST3_DCD),
-                                port_to_dev(port));
+               sca_set_carrier(port);
 }
 #endif
 
@@ -566,7 +580,7 @@ static void sca_open(struct net_device *dev)
    - all DMA interrupts
 */
 
-       hdlc_set_carrier(!(sca_in(msci + ST3, card) & ST3_DCD), dev);
+       sca_set_carrier(port);
 
 #ifdef __HD64570_H
        /* MSCI TX INT and RX INT A IRQ enable */
index 1fd04662c4fce290534991bee6c8476dc8a7efcd..f289daba0c7b308408d84ea209054859973e5773 100644 (file)
@@ -192,9 +192,7 @@ static int cisco_rx(struct sk_buff *skb)
                                               "uptime %ud%uh%um%us)\n",
                                               dev->name, days, hrs,
                                               min, sec);
-#if 0
-                                       netif_carrier_on(dev);
-#endif
+                                       netif_dormant_off(dev);
                                        hdlc->state.cisco.up = 1;
                                }
                        }
@@ -227,9 +225,7 @@ static void cisco_timer(unsigned long arg)
                       hdlc->state.cisco.settings.timeout * HZ)) {
                hdlc->state.cisco.up = 0;
                printk(KERN_INFO "%s: Link down\n", dev->name);
-#if 0
-               netif_carrier_off(dev);
-#endif
+               netif_dormant_on(dev);
        }
 
        cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ,
@@ -265,10 +261,7 @@ static void cisco_stop(struct net_device *dev)
 {
        hdlc_device *hdlc = dev_to_hdlc(dev);
        del_timer_sync(&hdlc->state.cisco.timer);
-#if 0
-       if (netif_carrier_ok(dev))
-               netif_carrier_off(dev);
-#endif
+       netif_dormant_on(dev);
        hdlc->state.cisco.up = 0;
        hdlc->state.cisco.request_sent = 0;
 }
@@ -328,6 +321,7 @@ int hdlc_cisco_ioctl(struct net_device *dev, struct ifreq *ifr)
                dev->type = ARPHRD_CISCO;
                dev->flags = IFF_POINTOPOINT | IFF_NOARP;
                dev->addr_len = 0;
+               netif_dormant_on(dev);
                return 0;
        }
 
index 523afe17564e20f1c728b98a9d148ec9d309aced..7bb737bbdeb96cf09b1628e31b51c50c58f25372 100644 (file)
@@ -301,7 +301,7 @@ static int pvc_open(struct net_device *dev)
        if (pvc->open_count++ == 0) {
                hdlc_device *hdlc = dev_to_hdlc(pvc->master);
                if (hdlc->state.fr.settings.lmi == LMI_NONE)
-                       pvc->state.active = hdlc->carrier;
+                       pvc->state.active = netif_carrier_ok(pvc->master);
 
                pvc_carrier(pvc->state.active, pvc);
                hdlc->state.fr.dce_changed = 1;
@@ -545,11 +545,7 @@ static void fr_set_link_state(int reliable, struct net_device *dev)
 
        hdlc->state.fr.reliable = reliable;
        if (reliable) {
-#if 0
-               if (!netif_carrier_ok(dev))
-                       netif_carrier_on(dev);
-#endif
-
+               netif_dormant_off(dev);
                hdlc->state.fr.n391cnt = 0; /* Request full status */
                hdlc->state.fr.dce_changed = 1;
 
@@ -562,11 +558,7 @@ static void fr_set_link_state(int reliable, struct net_device *dev)
                        }
                }
        } else {
-#if 0
-               if (netif_carrier_ok(dev))
-                       netif_carrier_off(dev);
-#endif
-
+               netif_dormant_on(dev);
                while (pvc) {           /* Deactivate all PVCs */
                        pvc_carrier(0, pvc);
                        pvc->state.exist = pvc->state.active = 0;
index b7da55140fbd854b54568cb84add8c1420fd7e8a..04ca1f7b64247c2a2b2c09c9182ba6ab728a88cc 100644 (file)
 #include <linux/inetdevice.h>
 #include <linux/lapb.h>
 #include <linux/rtnetlink.h>
+#include <linux/notifier.h>
 #include <linux/hdlc.h>
 
 
-static const char* version = "HDLC support module revision 1.18";
+static const char* version = "HDLC support module revision 1.19";
 
 #undef DEBUG_LINK
 
@@ -73,57 +74,51 @@ static int hdlc_rcv(struct sk_buff *skb, struct net_device *dev,
 
 
 
-static void __hdlc_set_carrier_on(struct net_device *dev)
+static inline void hdlc_proto_start(struct net_device *dev)
 {
        hdlc_device *hdlc = dev_to_hdlc(dev);
        if (hdlc->proto.start)
                return hdlc->proto.start(dev);
-#if 0
-#ifdef DEBUG_LINK
-       if (netif_carrier_ok(dev))
-               printk(KERN_ERR "hdlc_set_carrier_on(): already on\n");
-#endif
-       netif_carrier_on(dev);
-#endif
 }
 
 
 
-static void __hdlc_set_carrier_off(struct net_device *dev)
+static inline void hdlc_proto_stop(struct net_device *dev)
 {
        hdlc_device *hdlc = dev_to_hdlc(dev);
        if (hdlc->proto.stop)
                return hdlc->proto.stop(dev);
-
-#if 0
-#ifdef DEBUG_LINK
-       if (!netif_carrier_ok(dev))
-               printk(KERN_ERR "hdlc_set_carrier_off(): already off\n");
-#endif
-       netif_carrier_off(dev);
-#endif
 }
 
 
 
-void hdlc_set_carrier(int on, struct net_device *dev)
+static int hdlc_device_event(struct notifier_block *this, unsigned long event,
+                            void *ptr)
 {
-       hdlc_device *hdlc = dev_to_hdlc(dev);
+       struct net_device *dev = ptr;
+       hdlc_device *hdlc;
        unsigned long flags;
-       on = on ? 1 : 0;
+       int on;
+       if (dev->get_stats != hdlc_get_stats)
+               return NOTIFY_DONE; /* not an HDLC device */
+       if (event != NETDEV_CHANGE)
+               return NOTIFY_DONE; /* Only interrested in carrier changes */
+
+       on = netif_carrier_ok(dev);
 
 #ifdef DEBUG_LINK
-       printk(KERN_DEBUG "hdlc_set_carrier %i\n", on);
+       printk(KERN_DEBUG "%s: hdlc_device_event NETDEV_CHANGE, carrier %i\n",
+              dev->name, on);
 #endif
 
+       hdlc = dev_to_hdlc(dev);
        spin_lock_irqsave(&hdlc->state_lock, flags);
 
        if (hdlc->carrier == on)
                goto carrier_exit; /* no change in DCD line level */
 
-#ifdef DEBUG_LINK
-       printk(KERN_INFO "%s: carrier %s\n", dev->name, on ? "ON" : "off");
-#endif
        hdlc->carrier = on;
 
        if (!hdlc->open)
@@ -131,14 +126,15 @@ void hdlc_set_carrier(int on, struct net_device *dev)
 
        if (hdlc->carrier) {
                printk(KERN_INFO "%s: Carrier detected\n", dev->name);
-               __hdlc_set_carrier_on(dev);
+               hdlc_proto_start(dev);
        } else {
                printk(KERN_INFO "%s: Carrier lost\n", dev->name);
-               __hdlc_set_carrier_off(dev);
+               hdlc_proto_stop(dev);
        }
 
 carrier_exit:
        spin_unlock_irqrestore(&hdlc->state_lock, flags);
+       return NOTIFY_DONE;
 }
 
 
@@ -165,7 +161,7 @@ int hdlc_open(struct net_device *dev)
 
        if (hdlc->carrier) {
                printk(KERN_INFO "%s: Carrier detected\n", dev->name);
-               __hdlc_set_carrier_on(dev);
+               hdlc_proto_start(dev);
        } else
                printk(KERN_INFO "%s: No carrier\n", dev->name);
 
@@ -190,7 +186,7 @@ void hdlc_close(struct net_device *dev)
 
        hdlc->open = 0;
        if (hdlc->carrier)
-               __hdlc_set_carrier_off(dev);
+               hdlc_proto_stop(dev);
 
        spin_unlock_irq(&hdlc->state_lock);
 
@@ -303,7 +299,6 @@ MODULE_LICENSE("GPL v2");
 
 EXPORT_SYMBOL(hdlc_open);
 EXPORT_SYMBOL(hdlc_close);
-EXPORT_SYMBOL(hdlc_set_carrier);
 EXPORT_SYMBOL(hdlc_ioctl);
 EXPORT_SYMBOL(hdlc_setup);
 EXPORT_SYMBOL(alloc_hdlcdev);
@@ -315,9 +310,18 @@ static struct packet_type hdlc_packet_type = {
 };
 
 
+static struct notifier_block hdlc_notifier = {
+        .notifier_call = hdlc_device_event,
+};
+
+
 static int __init hdlc_module_init(void)
 {
+       int result;
+
        printk(KERN_INFO "%s\n", version);
+       if ((result = register_netdevice_notifier(&hdlc_notifier)) != 0)
+                return result;
         dev_add_pack(&hdlc_packet_type);
        return 0;
 }
@@ -327,6 +331,7 @@ static int __init hdlc_module_init(void)
 static void __exit hdlc_module_exit(void)
 {
        dev_remove_pack(&hdlc_packet_type);
+       unregister_netdevice_notifier(&hdlc_notifier);
 }
 
 
index d564224cdca90494046fda6e51a95a9f6c99e25c..b2031dfc4bb1076426d9c0d45ebc1472eda449b3 100644 (file)
@@ -149,7 +149,10 @@ static inline void wanxl_cable_intr(port_t *port)
        printk(KERN_INFO "%s: %s%s module, %s cable%s%s\n",
               port->dev->name, pm, dte, cable, dsr, dcd);
 
-       hdlc_set_carrier(value & STATUS_CABLE_DCD, port->dev);
+       if (value & STATUS_CABLE_DCD)
+               netif_carrier_on(port->dev);
+       else
+               netif_carrier_off(port->dev);
 }
 
 
index e1c5a939bca40cef9e54d9d51ac447c612b41937..3889f79e7128b1e5ab0bc1566d3d936c9c394395 100644 (file)
@@ -1547,7 +1547,7 @@ static void handle_irq_noise(struct bcm43xx_private *bcm)
                goto generate_new;
 
        /* Get the noise samples. */
-       assert(bcm->noisecalc.nr_samples <= 8);
+       assert(bcm->noisecalc.nr_samples < 8);
        i = bcm->noisecalc.nr_samples;
        noise[0] = limit_value(noise[0], 0, ARRAY_SIZE(radio->nrssi_lt) - 1);
        noise[1] = limit_value(noise[1], 0, ARRAY_SIZE(radio->nrssi_lt) - 1);
index 15465278c789ed607e154775ccb55a3dcbc20f1e..7f78b7801fb3de996a2ad1dff87cce905904efd7 100644 (file)
@@ -34,8 +34,6 @@
 
 #include "orinoco.h"
 
-static unsigned char *primsym;
-static unsigned char *secsym;
 static const char primary_fw_name[] = "symbol_sp24t_prim_fw";
 static const char secondary_fw_name[] = "symbol_sp24t_sec_fw";
 
@@ -440,7 +438,7 @@ spectrum_load_blocks(hermes_t *hw, const struct dblock *first_block)
  */
 static int
 spectrum_dl_image(hermes_t *hw, struct pcmcia_device *link,
-                 const unsigned char *image)
+                 const unsigned char *image, int secondary)
 {
        int ret;
        const unsigned char *ptr;
@@ -455,7 +453,7 @@ spectrum_dl_image(hermes_t *hw, struct pcmcia_device *link,
        first_block = (const struct dblock *) ptr;
 
        /* Read the PDA */
-       if (image != primsym) {
+       if (secondary) {
                ret = spectrum_read_pda(hw, pda, sizeof(pda));
                if (ret)
                        return ret;
@@ -472,7 +470,7 @@ spectrum_dl_image(hermes_t *hw, struct pcmcia_device *link,
                return ret;
 
        /* Write the PDA to the adapter */
-       if (image != primsym) {
+       if (secondary) {
                ret = spectrum_apply_pda(hw, first_block, pda);
                if (ret)
                        return ret;
@@ -487,7 +485,7 @@ spectrum_dl_image(hermes_t *hw, struct pcmcia_device *link,
        ret = hermes_init(hw);
 
        /* hermes_reset() should return 0 with the secondary firmware */
-       if (image != primsym && ret != 0)
+       if (secondary && ret != 0)
                return -ENODEV;
 
        /* And this should work with any firmware */
@@ -509,33 +507,30 @@ spectrum_dl_firmware(hermes_t *hw, struct pcmcia_device *link)
        const struct firmware *fw_entry;
 
        if (request_firmware(&fw_entry, primary_fw_name,
-                            &handle_to_dev(link)) == 0) {
-               primsym = fw_entry->data;
-       } else {
+                            &handle_to_dev(link)) != 0) {
                printk(KERN_ERR PFX "Cannot find firmware: %s\n",
                       primary_fw_name);
                return -ENOENT;
        }
 
-       if (request_firmware(&fw_entry, secondary_fw_name,
-                            &handle_to_dev(link)) == 0) {
-               secsym = fw_entry->data;
-       } else {
-               printk(KERN_ERR PFX "Cannot find firmware: %s\n",
-                      secondary_fw_name);
-               return -ENOENT;
-       }
-
        /* Load primary firmware */
-       ret = spectrum_dl_image(hw, link, primsym);
+       ret = spectrum_dl_image(hw, link, fw_entry->data, 0);
+       release_firmware(fw_entry);
        if (ret) {
                printk(KERN_ERR PFX "Primary firmware download failed\n");
                return ret;
        }
 
-       /* Load secondary firmware */
-       ret = spectrum_dl_image(hw, link, secsym);
+       if (request_firmware(&fw_entry, secondary_fw_name,
+                            &handle_to_dev(link)) != 0) {
+               printk(KERN_ERR PFX "Cannot find firmware: %s\n",
+                      secondary_fw_name);
+               return -ENOENT;
+       }
 
+       /* Load secondary firmware */
+       ret = spectrum_dl_image(hw, link, fw_entry->data, 1);
+       release_firmware(fw_entry);
        if (ret) {
                printk(KERN_ERR PFX "Secondary firmware download failed\n");
        }
index ce1cb2c6aa8d3833567593860b22c6598f879feb..72f90525bf681a00b724ed171ee0ba708dc2e9c9 100644 (file)
@@ -375,10 +375,8 @@ static void int_urb_complete(struct urb *urb, struct pt_regs *pt_regs)
        case -ENODEV:
        case -ENOENT:
        case -ECONNRESET:
-               goto kfree;
        case -EPIPE:
-               usb_clear_halt(urb->dev, EP_INT_IN);
-               /* FALL-THROUGH */
+               goto kfree;
        default:
                goto resubmit;
        }
@@ -580,10 +578,8 @@ static void rx_urb_complete(struct urb *urb, struct pt_regs *pt_regs)
        case -ENODEV:
        case -ENOENT:
        case -ECONNRESET:
-               return;
        case -EPIPE:
-               usb_clear_halt(urb->dev, EP_DATA_IN);
-               /* FALL-THROUGH */
+               return;
        default:
                dev_dbg_f(urb_dev(urb), "urb %p error %d\n", urb, urb->status);
                goto resubmit;
@@ -749,11 +745,9 @@ static void tx_urb_complete(struct urb *urb, struct pt_regs *pt_regs)
        case -ENODEV:
        case -ENOENT:
        case -ECONNRESET:
+       case -EPIPE:
                dev_dbg_f(urb_dev(urb), "urb %p error %d\n", urb, urb->status);
                break;
-       case -EPIPE:
-               usb_clear_halt(urb->dev, EP_DATA_OUT);
-               /* FALL-THROUGH */
        default:
                dev_dbg_f(urb_dev(urb), "urb %p error %d\n", urb, urb->status);
                goto resubmit;
index 222a1cc4aa28814a118c9424dbe2e2cb8deb5fa9..3fae77ffb2fac79d0029ed062114d0293c8dbaf5 100644 (file)
@@ -6,8 +6,7 @@ menu "PCI Hotplug Support"
 
 config HOTPLUG_PCI
        tristate "Support for PCI Hotplug (EXPERIMENTAL)"
-       depends on PCI && EXPERIMENTAL
-       select HOTPLUG
+       depends on PCI && EXPERIMENTAL && HOTPLUG
        ---help---
          Say Y here if you have a motherboard with a PCI Hotplug controller.
          This allows you to add and remove PCI cards while the machine is
@@ -77,7 +76,7 @@ config HOTPLUG_PCI_IBM
 
 config HOTPLUG_PCI_ACPI
        tristate "ACPI PCI Hotplug driver"
-       depends on ACPI && HOTPLUG_PCI
+       depends on ACPI_DOCK && HOTPLUG_PCI
        help
          Say Y here if you have a system that supports PCI Hotplug using
          ACPI.
index 36bc7c415af7a8dfe8b0d394dc64913577d6ad96..a83c1f5735d69bc05418e5963dbbcbc975a06a11 100644 (file)
@@ -47,13 +47,13 @@ msi_register(struct msi_ops *ops)
 
 static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags)
 {
-       memset(p, 0, NR_IRQS * sizeof(struct msi_desc));
+       memset(p, 0, sizeof(struct msi_desc));
 }
 
 static int msi_cache_init(void)
 {
        msi_cachep = kmem_cache_create("msi_cache",
-                       NR_IRQS * sizeof(struct msi_desc),
+                       sizeof(struct msi_desc),
                        0, SLAB_HWCACHE_ALIGN, msi_cache_ctor, NULL);
        if (!msi_cachep)
                return -ENOMEM;
index cf57d7de3765fcceb37216501c0ace480cc95fa2..9f79dd6d51ab7b8b0fbe18ab77f20fd0630e81ee 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/dma.h>   /* isa_dma_bridge_buggy */
 #include "pci.h"
 
+unsigned int pci_pm_d3_delay = 10;
 
 /**
  * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children
@@ -313,6 +314,14 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
        } else if (dev->current_state == state)
                return 0;        /* we're already there */
 
+       /*
+        * If the device or the parent bridge can't support PCI PM, ignore
+        * the request if we're doing anything besides putting it into D0
+        * (which would only happen on boot).
+        */
+       if ((state == PCI_D1 || state == PCI_D2) && pci_no_d1d2(dev))
+               return 0;
+
        /* find PCI PM capability in list */
        pm = pci_find_capability(dev, PCI_CAP_ID_PM);
        
@@ -363,7 +372,7 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
        /* Mandatory power management transition delays */
        /* see PCI PM 1.1 5.6.1 table 18 */
        if (state == PCI_D3hot || dev->current_state == PCI_D3hot)
-               msleep(10);
+               msleep(pci_pm_d3_delay);
        else if (state == PCI_D2 || dev->current_state == PCI_D2)
                udelay(200);
 
index 9cc842b666eb1d1d43fc24f9b06b2a3dd3a2f491..08d58fc78ee1cafc522702fd26618e4b43d66a4f 100644 (file)
@@ -47,7 +47,7 @@ extern int pci_msi_quirk;
 #else
 #define pci_msi_quirk 0
 #endif
-
+extern unsigned int pci_pm_d3_delay;
 #ifdef CONFIG_PCI_MSI
 void disable_msi_mode(struct pci_dev *dev, int pos, int type);
 void pci_no_msi(void);
@@ -66,7 +66,15 @@ static inline int pci_save_msix_state(struct pci_dev *dev) { return 0; }
 static inline void pci_restore_msi_state(struct pci_dev *dev) {}
 static inline void pci_restore_msix_state(struct pci_dev *dev) {}
 #endif
+static inline int pci_no_d1d2(struct pci_dev *dev)
+{
+       unsigned int parent_dstates = 0;
 
+       if (dev->bus->self)
+               parent_dstates = dev->bus->self->no_d1d2;
+       return (dev->no_d1d2 || parent_dstates);
+
+}
 extern int pcie_mch_quirk;
 extern struct device_attribute pci_dev_attrs[];
 extern struct class_device_attribute class_device_attr_cpuaffinity;
index f89dbc3738b7d73f54142e12d598c5759fa368d7..c5a58d1c6c1c14f266d5d45d8f980e9531f37db0 100644 (file)
@@ -815,6 +815,7 @@ pci_scan_device(struct pci_bus *bus, int devfn)
        dev->vendor = l & 0xffff;
        dev->device = (l >> 16) & 0xffff;
        dev->cfg_size = pci_cfg_space_size(dev);
+       dev->error_state = pci_channel_io_normal;
 
        /* Assume 32-bit PCI; let 64-bit PCI cards (which are far rarer)
           set this higher, assuming the system even supports it.  */
index d1d7333bb71bf17502c0ffd9f0aa2491f2f504ec..e3c78c39b7e49236377bc6b3f25dde5413731d9d 100644 (file)
@@ -400,6 +400,7 @@ static void __devinit quirk_piix4_acpi(struct pci_dev *dev)
        piix4_io_quirk(dev, "PIIX4 devres J", 0x7c, 1 << 20);
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82371AB_3,  quirk_piix4_acpi );
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82443MX_3,  quirk_piix4_acpi );
 
 /*
  * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at
@@ -682,6 +683,33 @@ static void __devinit quirk_vt82c598_id(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_82C597_0,     quirk_vt82c598_id );
 
+#ifdef CONFIG_ACPI_SLEEP
+
+/*
+ * Some VIA systems boot with the abnormal status flag set. This can cause
+ * the BIOS to re-POST the system on resume rather than passing control
+ * back to the OS.  Clear the flag on boot
+ */
+static void __devinit quirk_via_abnormal_poweroff(struct pci_dev *dev)
+{
+       u32 reg;
+
+       acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS,
+                               &reg);
+
+       if (reg & 0x800) {
+               printk("Clearing abnormal poweroff flag\n");
+               acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK,
+                                       ACPI_REGISTER_PM1_STATUS,
+                                       (u16)0x800);
+       }
+}
+
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, quirk_via_abnormal_poweroff);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, quirk_via_abnormal_poweroff);
+
+#endif
+
 /*
  * CardBus controllers have a legacy base address that enables them
  * to respond as i82365 pcmcia controllers.  We don't want them to
@@ -1174,6 +1202,55 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,       PCI_DEVICE_ID_SI_962,           quirk_sis_96x_
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_963,           quirk_sis_96x_smbus );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_LPC,           quirk_sis_96x_smbus );
 
+#if defined(CONFIG_SCSI_SATA) || defined(CONFIG_SCSI_SATA_MODULE)
+
+/*
+ *     If we are using libata we can drive this chip properly but must
+ *     do this early on to make the additional device appear during
+ *     the PCI scanning.
+ */
+
+static void __devinit quirk_jmicron_dualfn(struct pci_dev *pdev)
+{
+       u32 conf;
+       u8 hdr;
+
+       /* Only poke fn 0 */
+       if (PCI_FUNC(pdev->devfn))
+               return;
+
+       switch(pdev->device) {
+               case PCI_DEVICE_ID_JMICRON_JMB365:
+               case PCI_DEVICE_ID_JMICRON_JMB366:
+                       /* Redirect IDE second PATA port to the right spot */
+                       pci_read_config_dword(pdev, 0x80, &conf);
+                       conf |= (1 << 24);
+                       /* Fall through */
+                       pci_write_config_dword(pdev, 0x80, conf);
+               case PCI_DEVICE_ID_JMICRON_JMB361:
+               case PCI_DEVICE_ID_JMICRON_JMB363:
+                       pci_read_config_dword(pdev, 0x40, &conf);
+                       /* Enable dual function mode, AHCI on fn 0, IDE fn1 */
+                       /* Set the class codes correctly and then direct IDE 0 */
+                       conf &= ~0x000F0200;    /* Clear bit 9 and 16-19 */
+                       conf |=  0x00C20002;    /* Set bit 1, 17, 22, 23 */
+                       pci_write_config_dword(pdev, 0x40, conf);
+
+                       /* Reconfigure so that the PCI scanner discovers the
+                          device is now multifunction */
+
+                       pci_read_config_byte(pdev, PCI_HEADER_TYPE, &hdr);
+                       pdev->hdr_type = hdr & 0x7f;
+                       pdev->multifunction = !!(hdr & 0x80);
+
+                       break;
+       }
+}
+
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn);
+
+#endif
+
 #ifdef CONFIG_X86_IO_APIC
 static void __init quirk_alder_ioapic(struct pci_dev *pdev)
 {
@@ -1341,6 +1418,37 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,     PCI_DEVICE_ID_INTEL_PXH_0,      quirk_pc
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_1,      quirk_pcie_pxh);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHV,       quirk_pcie_pxh);
 
+/*
+ * Some Intel PCI Express chipsets have trouble with downstream
+ * device power management.
+ */
+static void quirk_intel_pcie_pm(struct pci_dev * dev)
+{
+       pci_pm_d3_delay = 120;
+       dev->no_d1d2 = 1;
+}
+
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x25e2, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x25e3, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x25e4, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x25e5, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x25e6, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x25e7, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x25f7, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x25f8, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x25f9, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x25fa, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x2601, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x2602, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x2603, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x2604, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x2605, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x2606, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x2607, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x2608, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x2609, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x260a, quirk_intel_pcie_pm);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x260b, quirk_intel_pcie_pm);
 
 /*
  * Fixup the cardbus bridges on the IBM Dock II docking station
index 61cb4b29f55c447293cad3c8c539c1642d3f759b..35f88649d3b7424b5809386c63915c1d44f0a4e5 100644 (file)
@@ -6,7 +6,7 @@ menu "PCCARD (PCMCIA/CardBus) support"
 
 config PCCARD
        tristate "PCCard (PCMCIA/CardBus) support"
-       select HOTPLUG
+       depends on HOTPLUG
        ---help---
          Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
          computer.  These are credit-card size devices such as network cards,
index f5b9f187a9300bcac74143cd0b5c999c406608ed..7ff1d88094b683b16827ea20b61804223ac5e85e 100644 (file)
@@ -121,6 +121,16 @@ config RTC_DRV_DS1553
          This driver can also be built as a module. If so, the module
          will be called rtc-ds1553.
 
+config RTC_DRV_ISL1208
+       tristate "Intersil 1208"
+       depends on RTC_CLASS && I2C
+       help
+         If you say yes here you get support for the
+         Intersil 1208 RTC chip.
+
+         This driver can also be built as a module. If so, the module
+         will be called rtc-isl1208.
+
 config RTC_DRV_DS1672
        tristate "Dallas/Maxim DS1672"
        depends on RTC_CLASS && I2C
index 54220714ff49b348ee68edfc56a5a2368efbb9a0..bbcfb09d81d90398460a5316ce80817c67af186f 100644 (file)
@@ -12,6 +12,7 @@ obj-$(CONFIG_RTC_INTF_PROC)   += rtc-proc.o
 obj-$(CONFIG_RTC_INTF_DEV)     += rtc-dev.o
 
 obj-$(CONFIG_RTC_DRV_X1205)    += rtc-x1205.o
+obj-$(CONFIG_RTC_DRV_ISL1208)  += rtc-isl1208.o
 obj-$(CONFIG_RTC_DRV_TEST)     += rtc-test.o
 obj-$(CONFIG_RTC_DRV_DS1307)   += rtc-ds1307.o
 obj-$(CONFIG_RTC_DRV_DS1672)   += rtc-ds1672.o
diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c
new file mode 100644 (file)
index 0000000..f324d0a
--- /dev/null
@@ -0,0 +1,591 @@
+/*
+ * Intersil ISL1208 rtc class driver
+ *
+ * Copyright 2005,2006 Hebert Valerio Riedel <hvr@gnu.org>
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/bcd.h>
+#include <linux/rtc.h>
+
+#define DRV_NAME "isl1208"
+#define DRV_VERSION "0.2"
+
+/* Register map */
+/* rtc section */
+#define ISL1208_REG_SC  0x00
+#define ISL1208_REG_MN  0x01
+#define ISL1208_REG_HR  0x02
+#define ISL1208_REG_HR_MIL     (1<<7) /* 24h/12h mode */
+#define ISL1208_REG_HR_PM      (1<<5) /* PM/AM bit in 12h mode */
+#define ISL1208_REG_DT  0x03
+#define ISL1208_REG_MO  0x04
+#define ISL1208_REG_YR  0x05
+#define ISL1208_REG_DW  0x06
+#define ISL1208_RTC_SECTION_LEN 7
+
+/* control/status section */
+#define ISL1208_REG_SR  0x07
+#define ISL1208_REG_SR_ARST    (1<<7) /* auto reset */
+#define ISL1208_REG_SR_XTOSCB  (1<<6) /* crystal oscillator */
+#define ISL1208_REG_SR_WRTC    (1<<4) /* write rtc */
+#define ISL1208_REG_SR_ALM     (1<<2) /* alarm */
+#define ISL1208_REG_SR_BAT     (1<<1) /* battery */
+#define ISL1208_REG_SR_RTCF    (1<<0) /* rtc fail */
+#define ISL1208_REG_INT 0x08
+#define ISL1208_REG_09  0x09 /* reserved */
+#define ISL1208_REG_ATR 0x0a
+#define ISL1208_REG_DTR 0x0b
+
+/* alarm section */
+#define ISL1208_REG_SCA 0x0c
+#define ISL1208_REG_MNA 0x0d
+#define ISL1208_REG_HRA 0x0e
+#define ISL1208_REG_DTA 0x0f
+#define ISL1208_REG_MOA 0x10
+#define ISL1208_REG_DWA 0x11
+#define ISL1208_ALARM_SECTION_LEN 6
+
+/* user section */
+#define ISL1208_REG_USR1 0x12
+#define ISL1208_REG_USR2 0x13
+#define ISL1208_USR_SECTION_LEN 2
+
+/* i2c configuration */
+#define ISL1208_I2C_ADDR 0xde
+
+static unsigned short normal_i2c[] = {
+       ISL1208_I2C_ADDR>>1, I2C_CLIENT_END
+};
+I2C_CLIENT_INSMOD; /* defines addr_data */
+
+static int isl1208_attach_adapter(struct i2c_adapter *adapter);
+static int isl1208_detach_client(struct i2c_client *client);
+
+static struct i2c_driver isl1208_driver = {
+       .driver         = {
+               .name   = DRV_NAME,
+       },
+       .id             = I2C_DRIVERID_ISL1208,
+       .attach_adapter = &isl1208_attach_adapter,
+       .detach_client  = &isl1208_detach_client,
+};
+
+/* block read */
+static int
+isl1208_i2c_read_regs(struct i2c_client *client, u8 reg, u8 buf[],
+                      unsigned len)
+{
+       u8 reg_addr[1] = { reg };
+       struct i2c_msg msgs[2] = {
+               { client->addr, client->flags, sizeof(reg_addr), reg_addr },
+               { client->addr, client->flags | I2C_M_RD, len, buf }
+       };
+       int ret;
+
+       BUG_ON(len == 0);
+       BUG_ON(reg > ISL1208_REG_USR2);
+       BUG_ON(reg + len > ISL1208_REG_USR2 + 1);
+
+       ret = i2c_transfer(client->adapter, msgs, 2);
+       if (ret > 0)
+               ret = 0;
+       return ret;
+}
+
+/* block write */
+static int
+isl1208_i2c_set_regs(struct i2c_client *client, u8 reg, u8 const buf[],
+                      unsigned len)
+{
+       u8 i2c_buf[ISL1208_REG_USR2 + 2];
+       struct i2c_msg msgs[1] = {
+               { client->addr, client->flags, len + 1, i2c_buf }
+       };
+       int ret;
+
+       BUG_ON(len == 0);
+       BUG_ON(reg > ISL1208_REG_USR2);
+       BUG_ON(reg + len > ISL1208_REG_USR2 + 1);
+
+       i2c_buf[0] = reg;
+       memcpy(&i2c_buf[1], &buf[0], len);
+
+       ret = i2c_transfer(client->adapter, msgs, 1);
+       if (ret > 0)
+               ret = 0;
+       return ret;
+}
+
+/* simple check to see wether we have a isl1208 */
+static int isl1208_i2c_validate_client(struct i2c_client *client)
+{
+       u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, };
+       u8 zero_mask[ISL1208_RTC_SECTION_LEN] = {
+               0x80, 0x80, 0x40, 0xc0, 0xe0, 0x00, 0xf8
+       };
+       int i;
+       int ret;
+
+       ret = isl1208_i2c_read_regs(client, 0, regs, ISL1208_RTC_SECTION_LEN);
+       if (ret < 0)
+               return ret;
+
+       for (i = 0; i < ISL1208_RTC_SECTION_LEN; ++i) {
+               if (regs[i] & zero_mask[i]) /* check if bits are cleared */
+                       return -ENODEV;
+       }
+
+       return 0;
+}
+
+static int isl1208_i2c_get_sr(struct i2c_client *client)
+{
+       return i2c_smbus_read_byte_data(client, ISL1208_REG_SR) == -1 ? -EIO:0;
+}
+
+static int isl1208_i2c_get_atr(struct i2c_client *client)
+{
+       int atr = i2c_smbus_read_byte_data(client, ISL1208_REG_ATR);
+
+       if (atr < 0)
+               return -EIO;
+
+       /* The 6bit value in the ATR register controls the load
+        * capacitance C_load * in steps of 0.25pF
+        *
+        * bit (1<<5) of the ATR register is inverted
+        *
+        * C_load(ATR=0x20) =  4.50pF
+        * C_load(ATR=0x00) = 12.50pF
+        * C_load(ATR=0x1f) = 20.25pF
+        *
+        */
+
+       atr &= 0x3f; /* mask out lsb */
+       atr ^= 1<<5; /* invert 6th bit */
+       atr += 2*9; /* add offset of 4.5pF; unit[atr] = 0.25pF */
+
+       return atr;
+}
+
+static int isl1208_i2c_get_dtr(struct i2c_client *client)
+{
+       int dtr = i2c_smbus_read_byte_data(client, ISL1208_REG_DTR);
+
+       if (dtr < 0)
+               return -EIO;
+
+       /* dtr encodes adjustments of {-60,-40,-20,0,20,40,60} ppm */
+       dtr = ((dtr & 0x3) * 20) * (dtr & (1<<2) ? -1 : 1);
+
+       return dtr;
+}
+
+static int isl1208_i2c_get_usr(struct i2c_client *client)
+{
+       u8 buf[ISL1208_USR_SECTION_LEN] = { 0, };
+       int ret;
+
+       ret = isl1208_i2c_read_regs (client, ISL1208_REG_USR1, buf,
+                                  ISL1208_USR_SECTION_LEN);
+       if (ret < 0)
+               return ret;
+
+       return (buf[1] << 8) | buf[0];
+}
+
+static int isl1208_i2c_set_usr(struct i2c_client *client, u16 usr)
+{
+       u8 buf[ISL1208_USR_SECTION_LEN];
+
+       buf[0] = usr & 0xff;
+       buf[1] = (usr >> 8) & 0xff;
+
+       return isl1208_i2c_set_regs (client, ISL1208_REG_USR1, buf,
+                                    ISL1208_USR_SECTION_LEN);
+}
+
+static int isl1208_rtc_proc(struct device *dev, struct seq_file *seq)
+{
+       struct i2c_client *const client = to_i2c_client(dev);
+       int sr, dtr, atr, usr;
+
+       sr = isl1208_i2c_get_sr(client);
+       if (sr < 0) {
+               dev_err(&client->dev, "%s: reading SR failed\n", __func__);
+               return sr;
+       }
+
+       seq_printf(seq, "status_reg\t:%s%s%s%s%s%s (0x%.2x)\n",
+                  (sr & ISL1208_REG_SR_RTCF) ? " RTCF" : "",
+                  (sr & ISL1208_REG_SR_BAT) ? " BAT" : "",
+                  (sr & ISL1208_REG_SR_ALM) ? " ALM" : "",
+                  (sr & ISL1208_REG_SR_WRTC) ? " WRTC" : "",
+                  (sr & ISL1208_REG_SR_XTOSCB) ? " XTOSCB" : "",
+                  (sr & ISL1208_REG_SR_ARST) ? " ARST" : "",
+                  sr);
+
+       seq_printf(seq, "batt_status\t: %s\n",
+                  (sr & ISL1208_REG_SR_RTCF) ? "bad" : "okay");
+
+       dtr = isl1208_i2c_get_dtr(client);
+       if (dtr >= 0 -1)
+               seq_printf(seq, "digital_trim\t: %d ppm\n", dtr);
+
+       atr = isl1208_i2c_get_atr(client);
+       if (atr >= 0)
+               seq_printf(seq, "analog_trim\t: %d.%.2d pF\n",
+                          atr>>2, (atr&0x3)*25);
+
+       usr = isl1208_i2c_get_usr(client);
+       if (usr >= 0)
+               seq_printf(seq, "user_data\t: 0x%.4x\n", usr);
+
+       return 0;
+}
+
+
+static int isl1208_i2c_read_time(struct i2c_client *client,
+                                struct rtc_time *tm)
+{
+       int sr;
+       u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, };
+
+       sr = isl1208_i2c_get_sr(client);
+       if (sr < 0) {
+               dev_err(&client->dev, "%s: reading SR failed\n", __func__);
+               return -EIO;
+       }
+
+       sr = isl1208_i2c_read_regs(client, 0, regs, ISL1208_RTC_SECTION_LEN);
+       if (sr < 0) {
+               dev_err(&client->dev, "%s: reading RTC section failed\n",
+                       __func__);
+               return sr;
+       }
+
+       tm->tm_sec = BCD2BIN(regs[ISL1208_REG_SC]);
+       tm->tm_min = BCD2BIN(regs[ISL1208_REG_MN]);
+       { /* HR field has a more complex interpretation */
+               const u8 _hr = regs[ISL1208_REG_HR];
+               if (_hr & ISL1208_REG_HR_MIL) /* 24h format */
+                       tm->tm_hour = BCD2BIN(_hr & 0x3f);
+               else { // 12h format
+                       tm->tm_hour = BCD2BIN(_hr & 0x1f);
+                       if (_hr & ISL1208_REG_HR_PM) /* PM flag set */
+                               tm->tm_hour += 12;
+               }
+       }
+
+       tm->tm_mday = BCD2BIN(regs[ISL1208_REG_DT]);
+       tm->tm_mon = BCD2BIN(regs[ISL1208_REG_MO]) - 1; /* rtc starts at 1 */
+       tm->tm_year = BCD2BIN(regs[ISL1208_REG_YR]) + 100;
+       tm->tm_wday = BCD2BIN(regs[ISL1208_REG_DW]);
+
+       return 0;
+}
+
+static int isl1208_i2c_read_alarm(struct i2c_client *client,
+                                 struct rtc_wkalrm *alarm)
+{
+       struct rtc_time *const tm = &alarm->time;
+       u8 regs[ISL1208_ALARM_SECTION_LEN] = { 0, };
+       int sr;
+
+       sr = isl1208_i2c_get_sr(client);
+       if (sr < 0) {
+               dev_err(&client->dev, "%s: reading SR failed\n", __func__);
+               return sr;
+       }
+
+       sr = isl1208_i2c_read_regs(client, ISL1208_REG_SCA, regs,
+                                 ISL1208_ALARM_SECTION_LEN);
+       if (sr < 0) {
+               dev_err(&client->dev, "%s: reading alarm section failed\n",
+                       __func__);
+               return sr;
+       }
+
+       /* MSB of each alarm register is an enable bit */
+       tm->tm_sec  = BCD2BIN(regs[ISL1208_REG_SCA-ISL1208_REG_SCA] & 0x7f);
+       tm->tm_min  = BCD2BIN(regs[ISL1208_REG_MNA-ISL1208_REG_SCA] & 0x7f);
+       tm->tm_hour = BCD2BIN(regs[ISL1208_REG_HRA-ISL1208_REG_SCA] & 0x3f);
+       tm->tm_mday = BCD2BIN(regs[ISL1208_REG_DTA-ISL1208_REG_SCA] & 0x3f);
+       tm->tm_mon  = BCD2BIN(regs[ISL1208_REG_MOA-ISL1208_REG_SCA] & 0x1f)-1;
+       tm->tm_wday = BCD2BIN(regs[ISL1208_REG_DWA-ISL1208_REG_SCA] & 0x03);
+
+       return 0;
+}
+
+static int isl1208_rtc_read_time(struct device *dev, struct rtc_time *tm)
+{
+       return isl1208_i2c_read_time(to_i2c_client(dev), tm);
+}
+
+static int isl1208_i2c_set_time(struct i2c_client *client,
+                               struct rtc_time const *tm)
+{
+       int sr;
+       u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, };
+
+       regs[ISL1208_REG_SC] = BIN2BCD(tm->tm_sec);
+       regs[ISL1208_REG_MN] = BIN2BCD(tm->tm_min);
+       regs[ISL1208_REG_HR] = BIN2BCD(tm->tm_hour) | ISL1208_REG_HR_MIL;
+
+       regs[ISL1208_REG_DT] = BIN2BCD(tm->tm_mday);
+       regs[ISL1208_REG_MO] = BIN2BCD(tm->tm_mon + 1);
+       regs[ISL1208_REG_YR] = BIN2BCD(tm->tm_year - 100);
+
+       regs[ISL1208_REG_DW] = BIN2BCD(tm->tm_wday & 7);
+
+       sr = isl1208_i2c_get_sr(client);
+       if (sr < 0) {
+               dev_err(&client->dev, "%s: reading SR failed\n", __func__);
+               return sr;
+       }
+
+       /* set WRTC */
+       sr = i2c_smbus_write_byte_data (client, ISL1208_REG_SR,
+                                      sr | ISL1208_REG_SR_WRTC);
+       if (sr < 0) {
+               dev_err(&client->dev, "%s: writing SR failed\n", __func__);
+               return sr;
+       }
+
+       /* write RTC registers */
+       sr = isl1208_i2c_set_regs(client, 0, regs, ISL1208_RTC_SECTION_LEN);
+       if (sr < 0) {
+               dev_err(&client->dev, "%s: writing RTC section failed\n",
+                       __func__);
+               return sr;
+       }
+
+       /* clear WRTC again */
+       sr = i2c_smbus_write_byte_data (client, ISL1208_REG_SR,
+                                      sr & ~ISL1208_REG_SR_WRTC);
+       if (sr < 0) {
+               dev_err(&client->dev, "%s: writing SR failed\n", __func__);
+               return sr;
+       }
+
+       return 0;
+}
+
+
+static int isl1208_rtc_set_time(struct device *dev, struct rtc_time *tm)
+{
+       return isl1208_i2c_set_time(to_i2c_client(dev), tm);
+}
+
+static int isl1208_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
+{
+       return isl1208_i2c_read_alarm(to_i2c_client(dev), alarm);
+}
+
+static struct rtc_class_ops isl1208_rtc_ops = {
+       .proc           = isl1208_rtc_proc,
+       .read_time      = isl1208_rtc_read_time,
+       .set_time       = isl1208_rtc_set_time,
+       .read_alarm     = isl1208_rtc_read_alarm,
+       //.set_alarm    = isl1208_rtc_set_alarm,
+};
+
+/* sysfs interface */
+
+static ssize_t isl1208_sysfs_show_atrim(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf)
+{
+       int atr;
+
+       atr = isl1208_i2c_get_atr(to_i2c_client(dev));
+       if (atr < 0)
+               return atr;
+
+       return sprintf(buf, "%d.%.2d pF\n", atr>>2, (atr&0x3)*25);
+}
+static DEVICE_ATTR(atrim, S_IRUGO, isl1208_sysfs_show_atrim, NULL);
+
+static ssize_t isl1208_sysfs_show_dtrim(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf)
+{
+       int dtr;
+
+       dtr = isl1208_i2c_get_dtr(to_i2c_client(dev));
+       if (dtr < 0)
+               return dtr;
+
+       return sprintf(buf, "%d ppm\n", dtr);
+}
+static DEVICE_ATTR(dtrim, S_IRUGO, isl1208_sysfs_show_dtrim, NULL);
+
+static ssize_t isl1208_sysfs_show_usr(struct device *dev,
+                                      struct device_attribute *attr,
+                                      char *buf)
+{
+       int usr;
+
+       usr = isl1208_i2c_get_usr(to_i2c_client(dev));
+       if (usr < 0)
+               return usr;
+
+       return sprintf(buf, "0x%.4x\n", usr);
+}
+
+static ssize_t isl1208_sysfs_store_usr(struct device *dev,
+                                      struct device_attribute *attr,
+                                      const char *buf, size_t count)
+{
+       int usr = -1;
+
+       if (buf[0] == '0' && (buf[1] == 'x' || buf[1] == 'X')) {
+               if (sscanf(buf, "%x", &usr) != 1)
+                       return -EINVAL;
+       } else {
+               if (sscanf(buf, "%d", &usr) != 1)
+                       return -EINVAL;
+       }
+
+       if (usr < 0 || usr > 0xffff)
+               return -EINVAL;
+
+       return isl1208_i2c_set_usr(to_i2c_client(dev), usr) ? -EIO : count;
+}
+static DEVICE_ATTR(usr, S_IRUGO | S_IWUSR, isl1208_sysfs_show_usr,
+                  isl1208_sysfs_store_usr);
+
+static int
+isl1208_probe(struct i2c_adapter *adapter, int addr, int kind)
+{
+       int rc = 0;
+       struct i2c_client *new_client = NULL;
+       struct rtc_device *rtc = NULL;
+
+       if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
+               rc = -ENODEV;
+               goto failout;
+       }
+
+       new_client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
+       if (new_client == NULL) {
+               rc = -ENOMEM;
+               goto failout;
+       }
+
+       new_client->addr = addr;
+       new_client->adapter = adapter;
+       new_client->driver = &isl1208_driver;
+       new_client->flags = 0;
+       strcpy(new_client->name, DRV_NAME);
+
+       if (kind < 0) {
+               rc = isl1208_i2c_validate_client(new_client);
+               if (rc < 0)
+                       goto failout;
+       }
+
+       rc = i2c_attach_client(new_client);
+       if (rc < 0)
+               goto failout;
+
+       dev_info(&new_client->dev,
+                "chip found, driver version " DRV_VERSION "\n");
+
+       rtc = rtc_device_register(isl1208_driver.driver.name,
+                                 &new_client->dev,
+                                 &isl1208_rtc_ops, THIS_MODULE);
+
+       if (IS_ERR(rtc)) {
+               rc = PTR_ERR(rtc);
+               goto failout_detach;
+       }
+
+       i2c_set_clientdata(new_client, rtc);
+
+       rc = isl1208_i2c_get_sr(new_client);
+       if (rc < 0) {
+               dev_err(&new_client->dev, "reading status failed\n");
+               goto failout_unregister;
+       }
+
+       if (rc & ISL1208_REG_SR_RTCF)
+               dev_warn(&new_client->dev, "rtc power failure detected, "
+                        "please set clock.\n");
+
+       rc = device_create_file(&new_client->dev, &dev_attr_atrim);
+       if (rc < 0)
+               goto failout_unregister;
+       rc = device_create_file(&new_client->dev, &dev_attr_dtrim);
+       if (rc < 0)
+               goto failout_atrim;
+       rc = device_create_file(&new_client->dev, &dev_attr_usr);
+       if (rc < 0)
+               goto failout_dtrim;
+
+       return 0;
+
+ failout_dtrim:
+       device_remove_file(&new_client->dev, &dev_attr_dtrim);
+ failout_atrim:
+       device_remove_file(&new_client->dev, &dev_attr_atrim);
+ failout_unregister:
+       rtc_device_unregister(rtc);
+ failout_detach:
+       i2c_detach_client(new_client);
+ failout:
+       kfree(new_client);
+       return rc;
+}
+
+static int
+isl1208_attach_adapter (struct i2c_adapter *adapter)
+{
+       return i2c_probe(adapter, &addr_data, isl1208_probe);
+}
+
+static int
+isl1208_detach_client(struct i2c_client *client)
+{
+       int rc;
+       struct rtc_device *const rtc = i2c_get_clientdata(client);
+
+       if (rtc)
+               rtc_device_unregister(rtc); /* do we need to kfree? */
+
+       rc = i2c_detach_client(client);
+       if (rc)
+               return rc;
+
+       kfree(client);
+
+       return 0;
+}
+
+/* module management */
+
+static int __init isl1208_init(void)
+{
+       return i2c_add_driver(&isl1208_driver);
+}
+
+static void __exit isl1208_exit(void)
+{
+       i2c_del_driver(&isl1208_driver);
+}
+
+MODULE_AUTHOR("Herbert Valerio Riedel <hvr@gnu.org>");
+MODULE_DESCRIPTION("Intersil ISL1208 RTC driver");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
+
+module_init(isl1208_init);
+module_exit(isl1208_exit);
index bb6d5ff24fd0a3ee254c7f23c140420b5d6e322e..596764fd29f5a320cfeb89a4fb0823cac3972720 100644 (file)
@@ -30,7 +30,7 @@
 #include <asm/div64.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-#include <asm/vr41xx/vr41xx.h>
+#include <asm/vr41xx/irq.h>
 
 MODULE_AUTHOR("Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>");
 MODULE_DESCRIPTION("NEC VR4100 series RTC driver");
index d7295386821cb39884811519a1262c47c9b1c345..7f6fdac747068c84a22014b34ffa619643041d4e 100644 (file)
@@ -394,7 +394,7 @@ dasd_add_busid(char *bus_id, int features)
        if (!new)
                return ERR_PTR(-ENOMEM);
        spin_lock(&dasd_devmap_lock);
-       devmap = 0;
+       devmap = NULL;
        hash = dasd_hash_busid(bus_id);
        list_for_each_entry(tmp, &dasd_hashlists[hash], list)
                if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) {
@@ -406,10 +406,10 @@ dasd_add_busid(char *bus_id, int features)
                new->devindex = dasd_max_devindex++;
                strncpy(new->bus_id, bus_id, BUS_ID_SIZE);
                new->features = features;
-               new->device = 0;
+               new->device = NULL;
                list_add(&new->list, &dasd_hashlists[hash]);
                devmap = new;
-               new = 0;
+               new = NULL;
        }
        spin_unlock(&dasd_devmap_lock);
        kfree(new);
@@ -479,7 +479,7 @@ dasd_device_from_devindex(int devindex)
        int i;
 
        spin_lock(&dasd_devmap_lock);
-       devmap = 0;
+       devmap = NULL;
        for (i = 0; (i < 256) && !devmap; i++)
                list_for_each_entry(tmp, &dasd_hashlists[i], list)
                        if (tmp->devindex == devindex) {
index 2e655f466743e32c5f7f1b72f6e48a016215440d..39c2281371b5e75a1d7f15272e1de9ecf89f9a18 100644 (file)
@@ -65,16 +65,16 @@ struct dasd_eckd_private {
 /* The ccw bus type uses this table to find devices that it sends to
  * dasd_eckd_probe */
 static struct ccw_device_id dasd_eckd_ids[] = {
-       { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3390, 0), driver_info: 0x1},
-       { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3390, 0), driver_info: 0x2},
-       { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3390, 0), driver_info: 0x3},
-       { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3380, 0), driver_info: 0x4},
-       { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3380, 0), driver_info: 0x5},
-       { CCW_DEVICE_DEVTYPE (0x9343, 0, 0x9345, 0), driver_info: 0x6},
-       { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3390, 0), driver_info: 0x7},
-       { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3380, 0), driver_info: 0x8},
-       { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3390, 0), driver_info: 0x9},
-       { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3380, 0), driver_info: 0xa},
+       { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3390, 0), .driver_info = 0x1},
+       { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3390, 0), .driver_info = 0x2},
+       { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3390, 0), .driver_info = 0x3},
+       { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3380, 0), .driver_info = 0x4},
+       { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3380, 0), .driver_info = 0x5},
+       { CCW_DEVICE_DEVTYPE (0x9343, 0, 0x9345, 0), .driver_info = 0x6},
+       { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3390, 0), .driver_info = 0x7},
+       { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3380, 0), .driver_info = 0x8},
+       { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3390, 0), .driver_info = 0x9},
+       { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3380, 0), .driver_info = 0xa},
        { /* end of list */ },
 };
 
index 808434d38526a6b30504ee48ff060b6defdb08f1..e85015be109bb918366a62c83fec616512a6bb30 100644 (file)
@@ -44,8 +44,8 @@ struct dasd_fba_private {
 };
 
 static struct ccw_device_id dasd_fba_ids[] = {
-       { CCW_DEVICE_DEVTYPE (0x6310, 0, 0x9336, 0), driver_info: 0x1},
-       { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3370, 0), driver_info: 0x2},
+       { CCW_DEVICE_DEVTYPE (0x6310, 0, 0x9336, 0), .driver_info = 0x1},
+       { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3370, 0), .driver_info = 0x2},
        { /* end of list */ },
 };
 
index 12c7d296eaa8a6bcbb9268d4b38494e1e5a68535..4c272b70f41a130ba1325511c309c44dc2dd1921 100644 (file)
@@ -84,9 +84,9 @@ void
 dasd_gendisk_free(struct dasd_device *device)
 {
        del_gendisk(device->gdp);
-       device->gdp->queue = 0;
+       device->gdp->queue = NULL;
        put_disk(device->gdp);
-       device->gdp = 0;
+       device->gdp = NULL;
 }
 
 /*
@@ -136,7 +136,7 @@ dasd_destroy_partitions(struct dasd_device * device)
         * device->bdev to lower the offline open_count limit again.
         */
        bdev = device->bdev;
-       device->bdev = 0;
+       device->bdev = NULL;
 
        /*
         * See fs/partition/check.c:delete_partition
@@ -145,7 +145,7 @@ dasd_destroy_partitions(struct dasd_device * device)
         */
        memset(&bpart, 0, sizeof(struct blkpg_partition));
        memset(&barg, 0, sizeof(struct blkpg_ioctl_arg));
-       barg.data = &bpart;
+       barg.data = (void __user *) &bpart;
        barg.op = BLKPG_DEL_PARTITION;
        for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--)
                ioctl_by_bdev(bdev, BLKPG, (unsigned long) &barg);
index e97f5316ad2d5629c7986c87bd17051d9c0d0d2b..8fed3603e9eac2afe7163b76011e3e18b0084855 100644 (file)
@@ -345,7 +345,7 @@ dasd_ioctl_set_ro(struct block_device *bdev, void __user *argp)
        if (bdev != bdev->bd_contains)
                // ro setting is not allowed for partitions
                return -EINVAL;
-       if (get_user(intval, (int *)argp))
+       if (get_user(intval, (int __user *)argp))
                return -EFAULT;
 
        set_disk_ro(bdev->bd_disk, intval);
index 4c1e56b9b98dbaafa5b85cc6d74138489112248f..1140302ff11d852de1c1d20ba29069db84593dd6 100644 (file)
@@ -71,11 +71,11 @@ static int xpram_devs;
 /*
  * Parameter parsing functions.
  */
-static int devs = XPRAM_DEVS;
-static unsigned int sizes[XPRAM_MAX_DEVS];
+static int __initdata devs = XPRAM_DEVS;
+static char __initdata *sizes[XPRAM_MAX_DEVS];
 
 module_param(devs, int, 0);
-module_param_array(sizes, int, NULL, 0);
+module_param_array(sizes, charp, NULL, 0);
 
 MODULE_PARM_DESC(devs, "number of devices (\"partitions\"), " \
                 "the default is " __MODULE_STRING(XPRAM_DEVS) "\n");
@@ -86,59 +86,6 @@ MODULE_PARM_DESC(sizes, "list of device (partition) sizes " \
                 "claimed by explicit sizes\n");
 MODULE_LICENSE("GPL");
 
-#ifndef MODULE
-/*
- * Parses the kernel parameters given in the kernel parameter line.
- * The expected format is
- *           <number_of_partitions>[","<partition_size>]*
- * where
- *           devices is a positive integer that initializes xpram_devs
- *           each size is a non-negative integer possibly followed by a
- *           magnitude (k,K,m,M,g,G), the list of sizes initialises
- *           xpram_sizes
- *
- * Arguments
- *           str: substring of kernel parameter line that contains xprams
- *                kernel parameters.
- *
- * Result    0 on success, -EINVAL else -- only for Version > 2.3
- *
- * Side effects
- *           the global variabls devs is set to the value of
- *           <number_of_partitions> and sizes[i] is set to the i-th
- *           partition size (if provided). A parsing error of a value
- *           results in this value being set to -EINVAL.
- */
-static int __init xpram_setup (char *str)
-{
-       char *cp;
-       int i;
-
-       devs = simple_strtoul(str, &cp, 10);
-       if (cp <= str || devs > XPRAM_MAX_DEVS)
-               return 0;
-       for (i = 0; (i < devs) && (*cp++ == ','); i++) {
-               sizes[i] = simple_strtoul(cp, &cp, 10);
-               if (*cp == 'g' || *cp == 'G') {
-                       sizes[i] <<= 20;
-                       cp++;
-               } else if (*cp == 'm' || *cp == 'M') {
-                       sizes[i] <<= 10;
-                       cp++;
-               } else if (*cp == 'k' || *cp == 'K')
-                       cp++;
-               while (isspace(*cp)) cp++;
-       }
-       if (*cp == ',' && i >= devs)
-               PRINT_WARN("partition sizes list has too many entries.\n");
-       else if (*cp != 0)
-               PRINT_WARN("ignored '%s' at end of parameter string.\n", cp);
-       return 1;
-}
-
-__setup("xpram_parts=", xpram_setup);
-#endif
-
 /*
  * Copy expanded memory page (4kB) into main memory                  
  * Arguments                                                         
@@ -357,6 +304,7 @@ static int __init xpram_setup_sizes(unsigned long pages)
 {
        unsigned long mem_needed;
        unsigned long mem_auto;
+       unsigned long long size;
        int mem_auto_no;
        int i;
 
@@ -374,7 +322,19 @@ static int __init xpram_setup_sizes(unsigned long pages)
        mem_needed = 0;
        mem_auto_no = 0;
        for (i = 0; i < xpram_devs; i++) {
-               xpram_sizes[i] = (sizes[i] + 3) & -4UL;
+               if (sizes[i]) {
+                       size = simple_strtoull(sizes[i], &sizes[i], 0);
+                       switch (sizes[i][0]) {
+                       case 'g':
+                       case 'G':
+                               size <<= 20;
+                               break;
+                       case 'm':
+                       case 'M':
+                               size <<= 10;
+                       }
+                       xpram_sizes[i] = (size + 3) & -4UL;
+               }
                if (xpram_sizes[i])
                        mem_needed += xpram_sizes[i];
                else
index f25c6d116f6f6f8a130d84501c5e4ea348e560f2..2fa566fa6da4e287488fda979f2d3b72fe552f38 100644 (file)
@@ -693,7 +693,7 @@ raw3215_probe (struct ccw_device *cdev)
                                       GFP_KERNEL|GFP_DMA);
        if (raw->buffer == NULL) {
                spin_lock(&raw3215_device_lock);
-               raw3215[line] = 0;
+               raw3215[line] = NULL;
                spin_unlock(&raw3215_device_lock);
                kfree(raw);
                return -ENOMEM;
index 0ea6f36a25277862234b3045f35fa6d70689baa6..d83eb6358bac503f6a12d30ec533e9023dc458ba 100644 (file)
@@ -23,7 +23,7 @@ ctrlchar_handle_sysrq(void *tty)
        handle_sysrq(ctrlchar_sysrq_key, NULL, (struct tty_struct *) tty);
 }
 
-static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, 0);
+static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, NULL);
 #endif
 
 
index ca15adb140d1a3752b063eddfd07a4dbf95f3cda..17027d918cf78e435821b3fe56f5ebb4d002f9ab 100644 (file)
@@ -83,8 +83,8 @@ static u_short shift_ctrl_map[NR_KEYS] = {
 };
 
 ushort *key_maps[MAX_NR_KEYMAPS] = {
-       plain_map, shift_map, 0, 0,
-       ctrl_map, shift_ctrl_map,       0
+       plain_map, shift_map, NULL, NULL,
+       ctrl_map, shift_ctrl_map, NULL,
 };
 
 unsigned int keymap_count = 4;
@@ -145,7 +145,7 @@ char *func_table[MAX_NR_FUNC] = {
        func_buf + 97,
        func_buf + 103,
        func_buf + 109,
-       0,
+       NULL,
 };
 
 struct kbdiacr accent_table[MAX_DIACR] = {
index 6099c14de42910319141ec492b6ada8bc1b8da9f..ef004d089712bc8a0420e204fc3d597fbfb05343 100644 (file)
@@ -236,7 +236,7 @@ fs3270_irq(struct fs3270 *fp, struct raw3270_request *rq, struct irb *irb)
  * Process reads from fullscreen 3270.
  */
 static ssize_t
-fs3270_read(struct file *filp, char *data, size_t count, loff_t *off)
+fs3270_read(struct file *filp, char __user *data, size_t count, loff_t *off)
 {
        struct fs3270 *fp;
        struct raw3270_request *rq;
@@ -281,7 +281,7 @@ fs3270_read(struct file *filp, char *data, size_t count, loff_t *off)
  * Process writes to fullscreen 3270.
  */
 static ssize_t
-fs3270_write(struct file *filp, const char *data, size_t count, loff_t *off)
+fs3270_write(struct file *filp, const char __user *data, size_t count, loff_t *off)
 {
        struct fs3270 *fp;
        struct raw3270_request *rq;
@@ -338,10 +338,10 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
                fp->write_command = arg;
                break;
        case TUBGETI:
-               rc = put_user(fp->read_command, (char *) arg);
+               rc = put_user(fp->read_command, (char __user *) arg);
                break;
        case TUBGETO:
-               rc = put_user(fp->write_command,(char *) arg);
+               rc = put_user(fp->write_command,(char __user *) arg);
                break;
        case TUBGETMOD:
                iocb.model = fp->view.model;
@@ -350,7 +350,7 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
                iocb.pf_cnt = 24;
                iocb.re_cnt = 20;
                iocb.map = 0;
-               if (copy_to_user((char *) arg, &iocb,
+               if (copy_to_user((char __user *) arg, &iocb,
                                 sizeof(struct raw3270_iocb)))
                        rc = -EFAULT;
                break;
@@ -479,7 +479,7 @@ fs3270_close(struct inode *inode, struct file *filp)
        struct fs3270 *fp;
 
        fp = filp->private_data;
-       filp->private_data = 0;
+       filp->private_data = NULL;
        if (fp) {
                fp->fs_pid = 0;
                raw3270_reset(&fp->view);
index 547ef906ae2c7839c7751c4d54ed3317b6f2880e..3be06569180de398d936796111a07d49753a48ca 100644 (file)
@@ -103,7 +103,7 @@ out_maps:
 out_kbd:
        kfree(kbd);
 out:
-       return 0;
+       return NULL;
 }
 
 void
@@ -304,7 +304,7 @@ kbd_keycode(struct kbd_data *kbd, unsigned int keycode)
                if (kbd->sysrq) {
                        if (kbd->sysrq == K(KT_LATIN, '-')) {
                                kbd->sysrq = 0;
-                               handle_sysrq(value, 0, kbd->tty);
+                               handle_sysrq(value, NULL, kbd->tty);
                                return;
                        }
                        if (value == '-') {
@@ -363,7 +363,7 @@ do_kdsk_ioctl(struct kbd_data *kbd, struct kbentry __user *user_kbe,
                        /* disallocate map */
                        key_map = kbd->key_maps[tmp.kb_table];
                        if (key_map) {
-                           kbd->key_maps[tmp.kb_table] = 0;
+                           kbd->key_maps[tmp.kb_table] = NULL;
                            kfree(key_map);
                        }
                        break;
index e95b56f810dbb25e1e4aea8730e6fa271c1bbcd3..7a84014f2037f49a6e558e2ef4b6feed86e0868d 100644 (file)
@@ -555,7 +555,7 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view,
 #ifdef CONFIG_TN3270_CONSOLE
        if (raw3270_registered == 0) {
                spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags);
-               rq->callback = 0;
+               rq->callback = NULL;
                rc = __raw3270_start(rp, view, rq);
                if (rc == 0)
                        while (!raw3270_request_final(rq)) {
@@ -719,8 +719,8 @@ raw3270_size_device(struct raw3270 *rp)
                rc = __raw3270_size_device_vm(rp);
        else
                rc = __raw3270_size_device(rp);
-       raw3270_init_view.dev = 0;
-       rp->view = 0;
+       raw3270_init_view.dev = NULL;
+       rp->view = NULL;
        up(&raw3270_init_sem);
        if (rc == 0) {  /* Found something. */
                /* Try to find a model. */
@@ -761,8 +761,8 @@ raw3270_reset_device(struct raw3270 *rp)
        rp->view = &raw3270_init_view;
        raw3270_init_view.dev = rp;
        rc = raw3270_start_init(rp, &raw3270_init_view, &rp->init_request);
-       raw3270_init_view.dev = 0;
-       rp->view = 0;
+       raw3270_init_view.dev = NULL;
+       rp->view = NULL;
        up(&raw3270_init_sem);
        return rc;
 }
@@ -934,7 +934,7 @@ raw3270_activate_view(struct raw3270_view *view)
        else if (!test_bit(RAW3270_FLAGS_READY, &rp->flags))
                rc = -ENODEV;
        else {
-               oldview = 0;
+               oldview = NULL;
                if (rp->view) {
                        oldview = rp->view;
                        oldview->fn->deactivate(oldview);
@@ -951,7 +951,7 @@ raw3270_activate_view(struct raw3270_view *view)
                                                rp->view = nv;
                                                if (nv->fn->activate(nv) == 0)
                                                        break;
-                                               rp->view = 0;
+                                               rp->view = NULL;
                                        }
                        }
                }
@@ -975,7 +975,7 @@ raw3270_deactivate_view(struct raw3270_view *view)
        spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags);
        if (rp->view == view) {
                view->fn->deactivate(view);
-               rp->view = 0;
+               rp->view = NULL;
                /* Move deactivated view to end of list. */
                list_del_init(&view->list);
                list_add_tail(&view->list, &rp->view_list);
@@ -985,7 +985,7 @@ raw3270_deactivate_view(struct raw3270_view *view)
                                rp->view = view;
                                if (view->fn->activate(view) == 0)
                                        break;
-                               rp->view = 0;
+                               rp->view = NULL;
                        }
                }
        }
@@ -1076,7 +1076,7 @@ raw3270_del_view(struct raw3270_view *view)
        spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags);
        if (rp->view == view) {
                view->fn->deactivate(view);
-               rp->view = 0;
+               rp->view = NULL;
        }
        list_del_init(&view->list);
        if (!rp->view && test_bit(RAW3270_FLAGS_READY, &rp->flags)) {
@@ -1106,10 +1106,10 @@ raw3270_delete_device(struct raw3270 *rp)
 
        /* Remove from device chain. */
        mutex_lock(&raw3270_mutex);
-       if (rp->clttydev)
+       if (rp->clttydev && !IS_ERR(rp->clttydev))
                class_device_destroy(class3270,
                                     MKDEV(IBM_TTY3270_MAJOR, rp->minor));
-       if (rp->cltubdev)
+       if (rp->cltubdev && !IS_ERR(rp->cltubdev))
                class_device_destroy(class3270,
                                     MKDEV(IBM_FS3270_MAJOR, rp->minor));
        list_del_init(&rp->list);
@@ -1117,9 +1117,9 @@ raw3270_delete_device(struct raw3270 *rp)
 
        /* Disconnect from ccw_device. */
        cdev = rp->cdev;
-       rp->cdev = 0;
-       cdev->dev.driver_data = 0;
-       cdev->handler = 0;
+       rp->cdev = NULL;
+       cdev->dev.driver_data = NULL;
+       cdev->handler = NULL;
 
        /* Put ccw_device structure. */
        put_device(&cdev->dev);
@@ -1144,7 +1144,7 @@ raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf)
        return snprintf(buf, PAGE_SIZE, "%i\n",
                        ((struct raw3270 *) dev->driver_data)->model);
 }
-static DEVICE_ATTR(model, 0444, raw3270_model_show, 0);
+static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL);
 
 static ssize_t
 raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf)
@@ -1152,7 +1152,7 @@ raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf)
        return snprintf(buf, PAGE_SIZE, "%i\n",
                        ((struct raw3270 *) dev->driver_data)->rows);
 }
-static DEVICE_ATTR(rows, 0444, raw3270_rows_show, 0);
+static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL);
 
 static ssize_t
 raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf)
@@ -1160,7 +1160,7 @@ raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *bu
        return snprintf(buf, PAGE_SIZE, "%i\n",
                        ((struct raw3270 *) dev->driver_data)->cols);
 }
-static DEVICE_ATTR(columns, 0444, raw3270_columns_show, 0);
+static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL);
 
 static struct attribute * raw3270_attrs[] = {
        &dev_attr_model.attr,
@@ -1173,21 +1173,37 @@ static struct attribute_group raw3270_attr_group = {
        .attrs = raw3270_attrs,
 };
 
-static void
-raw3270_create_attributes(struct raw3270 *rp)
+static int raw3270_create_attributes(struct raw3270 *rp)
 {
-       //FIXME: check return code
-       sysfs_create_group(&rp->cdev->dev.kobj, &raw3270_attr_group);
-       rp->clttydev =
-               class_device_create(class3270, NULL,
-                                   MKDEV(IBM_TTY3270_MAJOR, rp->minor),
-                                   &rp->cdev->dev, "tty%s",
-                                   rp->cdev->dev.bus_id);
-       rp->cltubdev =
-               class_device_create(class3270, NULL,
-                                   MKDEV(IBM_FS3270_MAJOR, rp->minor),
-                                   &rp->cdev->dev, "tub%s",
-                                   rp->cdev->dev.bus_id);
+       int rc;
+
+       rc = sysfs_create_group(&rp->cdev->dev.kobj, &raw3270_attr_group);
+       if (rc)
+               goto out;
+
+       rp->clttydev = class_device_create(class3270, NULL,
+                                          MKDEV(IBM_TTY3270_MAJOR, rp->minor),
+                                          &rp->cdev->dev, "tty%s",
+                                          rp->cdev->dev.bus_id);
+       if (IS_ERR(rp->clttydev)) {
+               rc = PTR_ERR(rp->clttydev);
+               goto out_ttydev;
+       }
+
+       rp->cltubdev = class_device_create(class3270, NULL,
+                                          MKDEV(IBM_FS3270_MAJOR, rp->minor),
+                                          &rp->cdev->dev, "tub%s",
+                                          rp->cdev->dev.bus_id);
+       if (!IS_ERR(rp->cltubdev))
+               goto out;
+
+       rc = PTR_ERR(rp->cltubdev);
+       class_device_destroy(class3270, MKDEV(IBM_TTY3270_MAJOR, rp->minor));
+
+out_ttydev:
+       sysfs_remove_group(&rp->cdev->dev.kobj, &raw3270_attr_group);
+out:
+       return rc;
 }
 
 /*
@@ -1255,7 +1271,9 @@ raw3270_set_online (struct ccw_device *cdev)
        rc = raw3270_reset_device(rp);
        if (rc)
                goto failure;
-       raw3270_create_attributes(rp);
+       rc = raw3270_create_attributes(rp);
+       if (rc)
+               goto failure;
        set_bit(RAW3270_FLAGS_READY, &rp->flags);
        mutex_lock(&raw3270_mutex);
        list_for_each_entry(np, &raw3270_notifier, list)
@@ -1296,7 +1314,7 @@ raw3270_remove (struct ccw_device *cdev)
        spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
        if (rp->view) {
                rp->view->fn->deactivate(rp->view);
-               rp->view = 0;
+               rp->view = NULL;
        }
        while (!list_empty(&rp->view_list)) {
                v = list_entry(rp->view_list.next, struct raw3270_view, list);
index b635bf8e777524525c38df6032cb41d2b2e1a627..90beaa80a78229d94368e3e170274158bf2a9f55 100644 (file)
@@ -231,7 +231,7 @@ alloc_string(struct list_head *free_list, unsigned long len)
                INIT_LIST_HEAD(&cs->update);
                return cs;
        }
-       return 0;
+       return NULL;
 }
 
 static inline unsigned long
index 48b4d30a725612fedef6af60ba58d0bff4a792cf..7b95dab913d0240847abe36830373595ba551aa8 100644 (file)
@@ -1309,9 +1309,9 @@ static struct tape_discipline tape_discipline_34xx = {
 };
 
 static struct ccw_device_id tape_34xx_ids[] = {
-       { CCW_DEVICE_DEVTYPE(0x3480, 0, 0x3480, 0), driver_info: tape_3480},
-       { CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), driver_info: tape_3490},
-       { /* end of list */ }
+       { CCW_DEVICE_DEVTYPE(0x3480, 0, 0x3480, 0), .driver_info = tape_3480},
+       { CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), .driver_info = tape_3490},
+       { /* end of list */ },
 };
 
 static int
index a5c68e60fcf4e64a3285e5941699e21c924db02e..643b6d0785636783538d7d504c129c588bee3a2f 100644 (file)
@@ -76,14 +76,22 @@ struct tape_class_device *register_tape_dev(
                                device,
                                "%s", tcd->device_name
                        );
-       sysfs_create_link(
+       rc = PTR_ERR(tcd->class_device);
+       if (rc)
+               goto fail_with_cdev;
+       rc = sysfs_create_link(
                &device->kobj,
                &tcd->class_device->kobj,
                tcd->mode_name
        );
+       if (rc)
+               goto fail_with_class_device;
 
        return tcd;
 
+fail_with_class_device:
+       class_device_destroy(tape_class, tcd->char_device->dev);
+
 fail_with_cdev:
        cdev_del(tcd->char_device);
 
index 122b4d8965c36028ccb2d2e657104eb14c9a6f04..2826aed910432d948eb7bbd82ca2ac8239686128 100644 (file)
@@ -543,20 +543,24 @@ int
 tape_generic_probe(struct ccw_device *cdev)
 {
        struct tape_device *device;
+       int ret;
 
        device = tape_alloc_device();
        if (IS_ERR(device))
                return -ENODEV;
-       PRINT_INFO("tape device %s found\n", cdev->dev.bus_id);
+       ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP);
+       ret = sysfs_create_group(&cdev->dev.kobj, &tape_attr_group);
+       if (ret) {
+               tape_put_device(device);
+               PRINT_ERR("probe failed for tape device %s\n", cdev->dev.bus_id);
+               return ret;
+       }
        cdev->dev.driver_data = device;
+       cdev->handler = __tape_do_irq;
        device->cdev = cdev;
        device->cdev_id = busid_to_int(cdev->dev.bus_id);
-       cdev->handler = __tape_do_irq;
-
-       ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP);
-       sysfs_create_group(&cdev->dev.kobj, &tape_attr_group);
-
-       return 0;
+       PRINT_INFO("tape device %s found\n", cdev->dev.bus_id);
+       return ret;
 }
 
 static inline void
index f496f236b9c06c3954ea9e885f49ed0c6c5b9ed1..29718042c6c9a669da34d828e046fb636a6f64d1 100644 (file)
@@ -437,7 +437,7 @@ tty3270_rcl_add(struct tty3270 *tp, char *input, int len)
 {
        struct string *s;
 
-       tp->rcl_walk = 0;
+       tp->rcl_walk = NULL;
        if (len <= 0)
                return;
        if (tp->rcl_nr >= tp->rcl_max) {
@@ -466,12 +466,12 @@ tty3270_rcl_backward(struct kbd_data *kbd)
                else if (!list_empty(&tp->rcl_lines))
                        tp->rcl_walk = tp->rcl_lines.prev;
                s = tp->rcl_walk ? 
-                       list_entry(tp->rcl_walk, struct string, list) : 0;
+                       list_entry(tp->rcl_walk, struct string, list) : NULL;
                if (tp->rcl_walk) {
                        s = list_entry(tp->rcl_walk, struct string, list);
                        tty3270_update_prompt(tp, s->string, s->len);
                } else
-                       tty3270_update_prompt(tp, 0, 0);
+                       tty3270_update_prompt(tp, NULL, 0);
                tty3270_set_timer(tp, 1);
        }
        spin_unlock_bh(&tp->view.lock);
@@ -553,7 +553,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq)
         * has to be emitted to the tty and for 0x6d the screen
         * needs to be redrawn.
         */
-       input = 0;
+       input = NULL;
        len = 0;
        if (tp->input->string[0] == 0x7d) {
                /* Enter: write input to tty. */
@@ -567,7 +567,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq)
                        tty3270_update_status(tp);
                }
                /* Clear input area. */
-               tty3270_update_prompt(tp, 0, 0);
+               tty3270_update_prompt(tp, NULL, 0);
                tty3270_set_timer(tp, 1);
        } else if (tp->input->string[0] == 0x6d) {
                /* Display has been cleared. Redraw. */
@@ -808,8 +808,8 @@ tty3270_release(struct raw3270_view *view)
        tp = (struct tty3270 *) view;
        tty = tp->tty;
        if (tty) {
-               tty->driver_data = 0;
-               tp->tty = tp->kbd->tty = 0;
+               tty->driver_data = NULL;
+               tp->tty = tp->kbd->tty = NULL;
                tty_hangup(tty);
                raw3270_put_view(&tp->view);
        }
@@ -948,8 +948,8 @@ tty3270_close(struct tty_struct *tty, struct file * filp)
                return;
        tp = (struct tty3270 *) tty->driver_data;
        if (tp) {
-               tty->driver_data = 0;
-               tp->tty = tp->kbd->tty = 0;
+               tty->driver_data = NULL;
+               tp->tty = tp->kbd->tty = NULL;
                raw3270_put_view(&tp->view);
        }
 }
@@ -1673,7 +1673,7 @@ tty3270_set_termios(struct tty_struct *tty, struct termios *old)
                new = L_ECHO(tty) ? TF_INPUT: TF_INPUTN;
                if (new != tp->inattr) {
                        tp->inattr = new;
-                       tty3270_update_prompt(tp, 0, 0);
+                       tty3270_update_prompt(tp, NULL, 0);
                        tty3270_set_timer(tp, 1);
                }
        }
@@ -1759,7 +1759,7 @@ void
 tty3270_notifier(int index, int active)
 {
        if (active)
-               tty_register_device(tty3270_driver, index, 0);
+               tty_register_device(tty3270_driver, index, NULL);
        else
                tty_unregister_device(tty3270_driver, index);
 }
@@ -1818,7 +1818,7 @@ tty3270_exit(void)
 
        raw3270_unregister_notifier(tty3270_notifier);
        driver = tty3270_driver;
-       tty3270_driver = 0;
+       tty3270_driver = NULL;
        tty_unregister_driver(driver);
        tty3270_del_views();
 }
index c625b69ebd1983b7ab7216c0a68b3fe79c83cc98..6cb23040954b4778de47f299a0ffc8c6d50cb9ce 100644 (file)
@@ -86,8 +86,8 @@ struct vmlogrdr_priv_t {
  */
 static int vmlogrdr_open(struct inode *, struct file *);
 static int vmlogrdr_release(struct inode *, struct file *);
-static ssize_t vmlogrdr_read (struct file *filp, char *data, size_t count,
-                              loff_t * ppos);
+static ssize_t vmlogrdr_read (struct file *filp, char __user *data,
+                             size_t count, loff_t * ppos);
 
 static struct file_operations vmlogrdr_fops = {
        .owner   = THIS_MODULE,
@@ -515,7 +515,7 @@ vmlogrdr_receive_data(struct vmlogrdr_priv_t *priv) {
 
 
 static ssize_t
-vmlogrdr_read (struct file *filp, char *data, size_t count, loff_t * ppos)
+vmlogrdr_read(struct file *filp, char __user *data, size_t count, loff_t * ppos)
 {
        int rc;
        struct vmlogrdr_priv_t * priv = filp->private_data;
index 5acc0ace3d7d571f5a0a14ad994a7a7f191f2dad..807320a41fa40f5ab1ed0b426e9831d2bb109b97 100644 (file)
@@ -193,7 +193,7 @@ static int vmwdt_ioctl(struct inode *i, struct file *f,
                return 0;
        case WDIOC_GETSTATUS:
        case WDIOC_GETBOOTSTATUS:
-               return put_user(0, (int *)arg);
+               return put_user(0, (int __user *)arg);
        case WDIOC_GETTEMP:
                return -EINVAL;
        case WDIOC_SETOPTIONS:
index c7319a07ba35161fde79dac21de10332d0387736..f26a2ee3aad8de4a3fe7d94daf23e3e42cdc8ca7 100644 (file)
@@ -319,7 +319,7 @@ ccwgroup_online_store (struct device *dev, struct device_attribute *attr, const
        if (!try_module_get(gdrv->owner))
                return -EINVAL;
 
-       value = simple_strtoul(buf, 0, 0);
+       value = simple_strtoul(buf, NULL, 0);
        ret = count;
        if (value == 1)
                ccwgroup_set_online(gdev);
index a01f3bba4a7b094d81edf8d128371e350e666093..61ce3f1d522852adc7d0b0b2cc5ec795590865f7 100644 (file)
@@ -1464,6 +1464,40 @@ chsc_get_chp_desc(struct subchannel *sch, int chp_no)
        return desc;
 }
 
+static int reset_channel_path(struct channel_path *chp)
+{
+       int cc;
+
+       cc = rchp(chp->id);
+       switch (cc) {
+       case 0:
+               return 0;
+       case 2:
+               return -EBUSY;
+       default:
+               return -ENODEV;
+       }
+}
+
+static void reset_channel_paths_css(struct channel_subsystem *css)
+{
+       int i;
+
+       for (i = 0; i <= __MAX_CHPID; i++) {
+               if (css->chps[i])
+                       reset_channel_path(css->chps[i]);
+       }
+}
+
+void cio_reset_channel_paths(void)
+{
+       int i;
+
+       for (i = 0; i <= __MAX_CSSID; i++) {
+               if (css[i] && css[i]->valid)
+                       reset_channel_paths_css(css[i]);
+       }
+}
 
 static int __init
 chsc_alloc_sei_area(void)
index 6fec90eab00e82031b9634897c148080b62f5fd1..89320c1ad8251b575ec4530718e145b69e4f9017 100644 (file)
@@ -519,6 +519,7 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid)
        memset(sch, 0, sizeof(struct subchannel));
 
        spin_lock_init(&sch->lock);
+       mutex_init(&sch->reg_mutex);
 
        /* Set a name for the subchannel */
        snprintf (sch->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", schid.ssid,
@@ -797,7 +798,7 @@ struct subchannel *
 cio_get_console_subchannel(void)
 {
        if (!console_subchannel_in_use)
-               return 0;
+               return NULL;
        return &console_subchannel;
 }
 
@@ -875,5 +876,6 @@ void
 reipl(unsigned long devno)
 {
        clear_all_subchannels();
+       cio_reset_channel_paths();
        do_reipl(devno);
 }
index 0ca987344e07183f6b1d9bbbae5c040dc924bed9..4541c1af4b666aac7152bcbf9ef593a46074a0ef 100644 (file)
@@ -2,6 +2,7 @@
 #define S390_CIO_H
 
 #include "schid.h"
+#include <linux/mutex.h>
 
 /*
  * where we put the ssd info
@@ -87,7 +88,7 @@ struct orb {
 struct subchannel {
        struct subchannel_id schid;
        spinlock_t lock;        /* subchannel lock */
-
+       struct mutex reg_mutex;
        enum {
                SUBCHANNEL_TYPE_IO = 0,
                SUBCHANNEL_TYPE_CHSC = 1,
index 1c3e8e9012b08c3553c1b5b7de806a87598f2fc0..828b2d334f0a30fde8a687b7ac5587927151aa6f 100644 (file)
@@ -1068,6 +1068,7 @@ cmb_show_avg_sample_interval(struct device *dev, struct device_attribute *attr,
        if (count) {
                interval = cmb_data->last_update -
                        cdev->private->cmb_start_time;
+               interval = (interval * 1000) >> 12;
                interval /= count;
        } else
                interval = -1;
@@ -1140,7 +1141,7 @@ static struct attribute *cmf_attributes[] = {
        &dev_attr_avg_device_disconnect_time.attr,
        &dev_attr_avg_control_unit_queuing_time.attr,
        &dev_attr_avg_device_active_only_time.attr,
-       0,
+       NULL,
 };
 
 static struct attribute_group cmf_attr_group = {
@@ -1160,7 +1161,7 @@ static struct attribute *cmf_attributes_ext[] = {
        &dev_attr_avg_device_active_only_time.attr,
        &dev_attr_avg_device_busy_time.attr,
        &dev_attr_avg_initial_command_response_time.attr,
-       0,
+       NULL,
 };
 
 static struct attribute_group cmf_attr_group_ext = {
index 1d3be80797f81e1ed119a08394f872cc20700236..13eeea3d547f2be83a1c8b9e8ca6139d6c858c9f 100644 (file)
@@ -108,6 +108,24 @@ css_subchannel_release(struct device *dev)
 
 extern int css_get_ssd_info(struct subchannel *sch);
 
+
+int css_sch_device_register(struct subchannel *sch)
+{
+       int ret;
+
+       mutex_lock(&sch->reg_mutex);
+       ret = device_register(&sch->dev);
+       mutex_unlock(&sch->reg_mutex);
+       return ret;
+}
+
+void css_sch_device_unregister(struct subchannel *sch)
+{
+       mutex_lock(&sch->reg_mutex);
+       device_unregister(&sch->dev);
+       mutex_unlock(&sch->reg_mutex);
+}
+
 static int
 css_register_subchannel(struct subchannel *sch)
 {
@@ -119,7 +137,7 @@ css_register_subchannel(struct subchannel *sch)
        sch->dev.release = &css_subchannel_release;
        
        /* make it known to the system */
-       ret = device_register(&sch->dev);
+       ret = css_sch_device_register(sch);
        if (ret)
                printk (KERN_WARNING "%s: could not register %s\n",
                        __func__, sch->dev.bus_id);
@@ -250,7 +268,7 @@ css_evaluate_subchannel(struct subchannel_id schid, int slow)
                 * The device will be killed automatically.
                 */
                cio_disable_subchannel(sch);
-               device_unregister(&sch->dev);
+               css_sch_device_unregister(sch);
                /* Reset intparm to zeroes. */
                sch->schib.pmcw.intparm = 0;
                cio_modify(sch);
@@ -264,7 +282,7 @@ css_evaluate_subchannel(struct subchannel_id schid, int slow)
                 * away in any case.
                 */
                if (!disc) {
-                       device_unregister(&sch->dev);
+                       css_sch_device_unregister(sch);
                        /* Reset intparm to zeroes. */
                        sch->schib.pmcw.intparm = 0;
                        cio_modify(sch);
@@ -605,9 +623,13 @@ init_channel_subsystem (void)
                ret = device_register(&css[i]->device);
                if (ret)
                        goto out_free;
-               if (css_characteristics_avail && css_chsc_characteristics.secm)
-                       device_create_file(&css[i]->device,
-                                          &dev_attr_cm_enable);
+               if (css_characteristics_avail &&
+                   css_chsc_characteristics.secm) {
+                       ret = device_create_file(&css[i]->device,
+                                                &dev_attr_cm_enable);
+                       if (ret)
+                               goto out_device;
+               }
        }
        css_init_done = 1;
 
@@ -615,6 +637,8 @@ init_channel_subsystem (void)
 
        for_each_subchannel(__init_channel_subsystem, NULL);
        return 0;
+out_device:
+       device_unregister(&css[i]->device);
 out_free:
        kfree(css[i]);
 out_unregister:
index e210f89a24499c65f9bedea44df54d3e299c96d4..8aabb4adeb5f08eb79ad7642005985f257e78815 100644 (file)
@@ -100,7 +100,7 @@ struct ccw_device_private {
        struct qdio_irq *qdio_data;
        struct irb irb;         /* device status */
        struct senseid senseid; /* SenseID info */
-       struct pgid pgid;       /* path group ID */
+       struct pgid pgid[8];    /* path group IDs per chpid*/
        struct ccw1 iccws[2];   /* ccws for SNID/SID/SPGID commands */
        struct work_struct kick_work;
        wait_queue_head_t wait_q;
@@ -136,6 +136,8 @@ extern struct bus_type css_bus_type;
 extern struct css_driver io_subchannel_driver;
 
 extern int css_probe_device(struct subchannel_id);
+extern int css_sch_device_register(struct subchannel *);
+extern void css_sch_device_unregister(struct subchannel *);
 extern struct subchannel * get_subchannel_by_schid(struct subchannel_id);
 extern int css_init_done;
 extern int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *);
index 67f0de6aed33942ba078887e272287cdfca9ae7d..585fa04233c34f0325c064af7dc55ce183f696be 100644 (file)
@@ -100,7 +100,7 @@ ccw_uevent (struct device *dev, char **envp, int num_envp,
        if ((buffer_size - length <= 0) || (i >= num_envp))
                return -ENOMEM;
 
-       envp[i] = 0;
+       envp[i] = NULL;
 
        return 0;
 }
@@ -280,7 +280,7 @@ ccw_device_remove_disconnected(struct ccw_device *cdev)
         * 'throw away device'.
         */
        sch = to_subchannel(cdev->dev.parent);
-       device_unregister(&sch->dev);
+       css_sch_device_unregister(sch);
        /* Reset intparm to zeroes. */
        sch->schib.pmcw.intparm = 0;
        cio_modify(sch);
@@ -625,7 +625,7 @@ ccw_device_do_unreg_rereg(void *data)
                                        other_sch->schib.pmcw.intparm = 0;
                                        cio_modify(other_sch);
                                }
-                               device_unregister(&other_sch->dev);
+                               css_sch_device_unregister(other_sch);
                        }
                }
                /* Update ssd info here. */
@@ -709,7 +709,7 @@ ccw_device_call_sch_unregister(void *data)
        struct subchannel *sch;
 
        sch = to_subchannel(cdev->dev.parent);
-       device_unregister(&sch->dev);
+       css_sch_device_unregister(sch);
        /* Reset intparm to zeroes. */
        sch->schib.pmcw.intparm = 0;
        cio_modify(sch);
@@ -1057,7 +1057,7 @@ get_ccwdev_by_busid(struct ccw_driver *cdrv, const char *bus_id)
                                 __ccwdev_check_busid);
        put_driver(drv);
 
-       return dev ? to_ccwdev(dev) : 0;
+       return dev ? to_ccwdev(dev) : NULL;
 }
 
 /************************** device driver handling ************************/
@@ -1082,7 +1082,7 @@ ccw_device_probe (struct device *dev)
        ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV;
 
        if (ret) {
-               cdev->drv = 0;
+               cdev->drv = NULL;
                return ret;
        }
 
@@ -1113,7 +1113,7 @@ ccw_device_remove (struct device *dev)
                                 ret, cdev->dev.bus_id);
        }
        ccw_device_set_timeout(cdev, 0);
-       cdev->drv = 0;
+       cdev->drv = NULL;
        return 0;
 }
 
index cb1af0b6f033c4b43e057f29e9ddf2ef2d4596b0..ac6e0c7e43d9587805e820e8d2e6eb633989d58d 100644 (file)
@@ -378,6 +378,56 @@ ccw_device_done(struct ccw_device *cdev, int state)
                put_device (&cdev->dev);
 }
 
+static inline int cmp_pgid(struct pgid *p1, struct pgid *p2)
+{
+       char *c1;
+       char *c2;
+
+       c1 = (char *)p1;
+       c2 = (char *)p2;
+
+       return memcmp(c1 + 1, c2 + 1, sizeof(struct pgid) - 1);
+}
+
+static void __ccw_device_get_common_pgid(struct ccw_device *cdev)
+{
+       int i;
+       int last;
+
+       last = 0;
+       for (i = 0; i < 8; i++) {
+               if (cdev->private->pgid[i].inf.ps.state1 == SNID_STATE1_RESET)
+                       /* No PGID yet */
+                       continue;
+               if (cdev->private->pgid[last].inf.ps.state1 ==
+                   SNID_STATE1_RESET) {
+                       /* First non-zero PGID */
+                       last = i;
+                       continue;
+               }
+               if (cmp_pgid(&cdev->private->pgid[i],
+                            &cdev->private->pgid[last]) == 0)
+                       /* Non-conflicting PGIDs */
+                       continue;
+
+               /* PGID mismatch, can't pathgroup. */
+               CIO_MSG_EVENT(0, "SNID - pgid mismatch for device "
+                             "0.%x.%04x, can't pathgroup\n",
+                             cdev->private->ssid, cdev->private->devno);
+               cdev->private->options.pgroup = 0;
+               return;
+       }
+       if (cdev->private->pgid[last].inf.ps.state1 ==
+           SNID_STATE1_RESET)
+               /* No previous pgid found */
+               memcpy(&cdev->private->pgid[0], &css[0]->global_pgid,
+                      sizeof(struct pgid));
+       else
+               /* Use existing pgid */
+               memcpy(&cdev->private->pgid[0], &cdev->private->pgid[last],
+                      sizeof(struct pgid));
+}
+
 /*
  * Function called from device_pgid.c after sense path ground has completed.
  */
@@ -388,24 +438,26 @@ ccw_device_sense_pgid_done(struct ccw_device *cdev, int err)
 
        sch = to_subchannel(cdev->dev.parent);
        switch (err) {
-       case 0:
-               /* Start Path Group verification. */
-               sch->vpm = 0;   /* Start with no path groups set. */
-               cdev->private->state = DEV_STATE_VERIFY;
-               ccw_device_verify_start(cdev);
+       case -EOPNOTSUPP: /* path grouping not supported, use nop instead. */
+               cdev->private->options.pgroup = 0;
+               break;
+       case 0: /* success */
+       case -EACCES: /* partial success, some paths not operational */
+               /* Check if all pgids are equal or 0. */
+               __ccw_device_get_common_pgid(cdev);
                break;
        case -ETIME:            /* Sense path group id stopped by timeout. */
        case -EUSERS:           /* device is reserved for someone else. */
                ccw_device_done(cdev, DEV_STATE_BOXED);
-               break;
-       case -EOPNOTSUPP: /* path grouping not supported, just set online. */
-               cdev->private->options.pgroup = 0;
-               ccw_device_done(cdev, DEV_STATE_ONLINE);
-               break;
+               return;
        default:
                ccw_device_done(cdev, DEV_STATE_NOT_OPER);
-               break;
+               return;
        }
+       /* Start Path Group verification. */
+       sch->vpm = 0;   /* Start with no path groups set. */
+       cdev->private->state = DEV_STATE_VERIFY;
+       ccw_device_verify_start(cdev);
 }
 
 /*
@@ -562,8 +614,9 @@ ccw_device_online(struct ccw_device *cdev)
        }
        /* Do we want to do path grouping? */
        if (!cdev->private->options.pgroup) {
-               /* No, set state online immediately. */
-               ccw_device_done(cdev, DEV_STATE_ONLINE);
+               /* Start initial path verification. */
+               cdev->private->state = DEV_STATE_VERIFY;
+               ccw_device_verify_start(cdev);
                return 0;
        }
        /* Do a SensePGID first. */
@@ -609,6 +662,7 @@ ccw_device_offline(struct ccw_device *cdev)
        /* Are we doing path grouping? */
        if (!cdev->private->options.pgroup) {
                /* No, set state offline immediately. */
+               sch->vpm = 0;
                ccw_device_done(cdev, DEV_STATE_OFFLINE);
                return 0;
        }
@@ -705,8 +759,6 @@ ccw_device_online_verify(struct ccw_device *cdev, enum dev_event dev_event)
 {
        struct subchannel *sch;
 
-       if (!cdev->private->options.pgroup)
-               return;
        if (cdev->private->state == DEV_STATE_W4SENSE) {
                cdev->private->flags.doverify = 1;
                return;
@@ -995,8 +1047,7 @@ static void
 ccw_device_wait4io_verify(struct ccw_device *cdev, enum dev_event dev_event)
 {
        /* When the I/O has terminated, we have to start verification. */
-       if (cdev->private->options.pgroup)
-               cdev->private->flags.doverify = 1;
+       cdev->private->flags.doverify = 1;
 }
 
 static void
index 54cb64ed0786dc469957f7b2089bff7f6402d40e..32610fd8868e97b6978a0d15160bad466eb31a89 100644 (file)
@@ -33,12 +33,17 @@ __ccw_device_sense_pgid_start(struct ccw_device *cdev)
        struct subchannel *sch;
        struct ccw1 *ccw;
        int ret;
+       int i;
 
        sch = to_subchannel(cdev->dev.parent);
+       /* Return if we already checked on all paths. */
+       if (cdev->private->imask == 0)
+               return (sch->lpm == 0) ? -ENODEV : -EACCES;
+       i = 8 - ffs(cdev->private->imask);
+
        /* Setup sense path group id channel program. */
        ccw = cdev->private->iccws;
        ccw->cmd_code = CCW_CMD_SENSE_PGID;
-       ccw->cda = (__u32) __pa (&cdev->private->pgid);
        ccw->count = sizeof (struct pgid);
        ccw->flags = CCW_FLAG_SLI;
 
@@ -48,6 +53,7 @@ __ccw_device_sense_pgid_start(struct ccw_device *cdev)
        ret = -ENODEV;
        while (cdev->private->imask != 0) {
                /* Try every path multiple times. */
+               ccw->cda = (__u32) __pa (&cdev->private->pgid[i]);
                if (cdev->private->iretry > 0) {
                        cdev->private->iretry--;
                        ret = cio_start (sch, cdev->private->iccws, 
@@ -64,7 +70,9 @@ __ccw_device_sense_pgid_start(struct ccw_device *cdev)
                }
                cdev->private->imask >>= 1;
                cdev->private->iretry = 5;
+               i++;
        }
+
        return ret;
 }
 
@@ -76,7 +84,7 @@ ccw_device_sense_pgid_start(struct ccw_device *cdev)
        cdev->private->state = DEV_STATE_SENSE_PGID;
        cdev->private->imask = 0x80;
        cdev->private->iretry = 5;
-       memset (&cdev->private->pgid, 0, sizeof (struct pgid));
+       memset (&cdev->private->pgid, 0, sizeof (cdev->private->pgid));
        ret = __ccw_device_sense_pgid_start(cdev);
        if (ret && ret != -EBUSY)
                ccw_device_sense_pgid_done(cdev, ret);
@@ -91,6 +99,7 @@ __ccw_device_check_sense_pgid(struct ccw_device *cdev)
 {
        struct subchannel *sch;
        struct irb *irb;
+       int i;
 
        sch = to_subchannel(cdev->dev.parent);
        irb = &cdev->private->irb;
@@ -124,7 +133,8 @@ __ccw_device_check_sense_pgid(struct ccw_device *cdev)
                              sch->schid.sch_no, sch->orb.lpm);
                return -EACCES;
        }
-       if (cdev->private->pgid.inf.ps.state2 == SNID_STATE2_RESVD_ELSE) {
+       i = 8 - ffs(cdev->private->imask);
+       if (cdev->private->pgid[i].inf.ps.state2 == SNID_STATE2_RESVD_ELSE) {
                CIO_MSG_EVENT(2, "SNID - Device %04x on Subchannel 0.%x.%04x "
                              "is reserved by someone else\n",
                              cdev->private->devno, sch->schid.ssid,
@@ -162,12 +172,6 @@ ccw_device_sense_pgid_irq(struct ccw_device *cdev, enum dev_event dev_event)
        memset(&cdev->private->irb, 0, sizeof(struct irb));
        switch (ret) {
        /* 0, -ETIME, -EOPNOTSUPP, -EAGAIN, -EACCES or -EUSERS */
-       case 0:                 /* Sense Path Group ID successful. */
-               if (cdev->private->pgid.inf.ps.state1 == SNID_STATE1_RESET)
-                       memcpy(&cdev->private->pgid, &css[0]->global_pgid,
-                              sizeof(struct pgid));
-               ccw_device_sense_pgid_done(cdev, 0);
-               break;
        case -EOPNOTSUPP:       /* Sense Path Group ID not supported */
                ccw_device_sense_pgid_done(cdev, -EOPNOTSUPP);
                break;
@@ -176,13 +180,15 @@ ccw_device_sense_pgid_irq(struct ccw_device *cdev, enum dev_event dev_event)
                break;
        case -EACCES:           /* channel is not operational. */
                sch->lpm &= ~cdev->private->imask;
+               /* Fall through. */
+       case 0:                 /* Sense Path Group ID successful. */
                cdev->private->imask >>= 1;
                cdev->private->iretry = 5;
                /* Fall through. */
        case -EAGAIN:           /* Try again. */
                ret = __ccw_device_sense_pgid_start(cdev);
                if (ret != 0 && ret != -EBUSY)
-                       ccw_device_sense_pgid_done(cdev, -ENODEV);
+                       ccw_device_sense_pgid_done(cdev, ret);
                break;
        case -EUSERS:           /* device is reserved for someone else. */
                ccw_device_sense_pgid_done(cdev, -EUSERS);
@@ -203,20 +209,20 @@ __ccw_device_do_pgid(struct ccw_device *cdev, __u8 func)
        sch = to_subchannel(cdev->dev.parent);
 
        /* Setup sense path group id channel program. */
-       cdev->private->pgid.inf.fc = func;
+       cdev->private->pgid[0].inf.fc = func;
        ccw = cdev->private->iccws;
        if (!cdev->private->flags.pgid_single) {
-               cdev->private->pgid.inf.fc |= SPID_FUNC_MULTI_PATH;
+               cdev->private->pgid[0].inf.fc |= SPID_FUNC_MULTI_PATH;
                ccw->cmd_code = CCW_CMD_SUSPEND_RECONN;
                ccw->cda = 0;
                ccw->count = 0;
                ccw->flags = CCW_FLAG_SLI | CCW_FLAG_CC;
                ccw++;
        } else
-               cdev->private->pgid.inf.fc |= SPID_FUNC_SINGLE_PATH;
+               cdev->private->pgid[0].inf.fc |= SPID_FUNC_SINGLE_PATH;
 
        ccw->cmd_code = CCW_CMD_SET_PGID;
-       ccw->cda = (__u32) __pa (&cdev->private->pgid);
+       ccw->cda = (__u32) __pa (&cdev->private->pgid[0]);
        ccw->count = sizeof (struct pgid);
        ccw->flags = CCW_FLAG_SLI;
 
@@ -243,6 +249,48 @@ __ccw_device_do_pgid(struct ccw_device *cdev, __u8 func)
        return ret;
 }
 
+/*
+ * Helper function to send a nop ccw down a path.
+ */
+static int __ccw_device_do_nop(struct ccw_device *cdev)
+{
+       struct subchannel *sch;
+       struct ccw1 *ccw;
+       int ret;
+
+       sch = to_subchannel(cdev->dev.parent);
+
+       /* Setup nop channel program. */
+       ccw = cdev->private->iccws;
+       ccw->cmd_code = CCW_CMD_NOOP;
+       ccw->cda = 0;
+       ccw->count = 0;
+       ccw->flags = CCW_FLAG_SLI;
+
+       /* Reset device status. */
+       memset(&cdev->private->irb, 0, sizeof(struct irb));
+
+       /* Try multiple times. */
+       ret = -ENODEV;
+       if (cdev->private->iretry > 0) {
+               cdev->private->iretry--;
+               ret = cio_start (sch, cdev->private->iccws,
+                                cdev->private->imask);
+               /* ret is 0, -EBUSY, -EACCES or -ENODEV */
+               if ((ret != -EACCES) && (ret != -ENODEV))
+                       return ret;
+       }
+       /* nop command failed on this path. Switch it off. */
+       sch->lpm &= ~cdev->private->imask;
+       sch->vpm &= ~cdev->private->imask;
+       CIO_MSG_EVENT(2, "NOP - Device %04x on Subchannel "
+                     "0.%x.%04x, lpm %02X, became 'not operational'\n",
+                     cdev->private->devno, sch->schid.ssid,
+                     sch->schid.sch_no, cdev->private->imask);
+       return ret;
+}
+
+
 /*
  * Called from interrupt context to check if a valid answer
  * to Set Path Group ID was received.
@@ -282,6 +330,29 @@ __ccw_device_check_pgid(struct ccw_device *cdev)
        return 0;
 }
 
+/*
+ * Called from interrupt context to check the path status after a nop has
+ * been send.
+ */
+static int __ccw_device_check_nop(struct ccw_device *cdev)
+{
+       struct subchannel *sch;
+       struct irb *irb;
+
+       sch = to_subchannel(cdev->dev.parent);
+       irb = &cdev->private->irb;
+       if (irb->scsw.fctl & (SCSW_FCTL_HALT_FUNC | SCSW_FCTL_CLEAR_FUNC))
+               return -ETIME;
+       if (irb->scsw.cc == 3) {
+               CIO_MSG_EVENT(2, "NOP - Device %04x on Subchannel 0.%x.%04x,"
+                             " lpm %02X, became 'not operational'\n",
+                             cdev->private->devno, sch->schid.ssid,
+                             sch->schid.sch_no, cdev->private->imask);
+               return -EACCES;
+       }
+       return 0;
+}
+
 static void
 __ccw_device_verify_start(struct ccw_device *cdev)
 {
@@ -296,9 +367,12 @@ __ccw_device_verify_start(struct ccw_device *cdev)
                        if ((sch->vpm & imask) != (sch->lpm & imask))
                                break;
                cdev->private->imask = imask;
-               func = (sch->vpm & imask) ?
-                       SPID_FUNC_RESIGN : SPID_FUNC_ESTABLISH;
-               ret = __ccw_device_do_pgid(cdev, func);
+               if (cdev->private->options.pgroup) {
+                       func = (sch->vpm & imask) ?
+                               SPID_FUNC_RESIGN : SPID_FUNC_ESTABLISH;
+                       ret = __ccw_device_do_pgid(cdev, func);
+               } else
+                       ret = __ccw_device_do_nop(cdev);
                if (ret == 0 || ret == -EBUSY)
                        return;
                cdev->private->iretry = 5;
@@ -327,7 +401,10 @@ ccw_device_verify_irq(struct ccw_device *cdev, enum dev_event dev_event)
        if (ccw_device_accumulate_and_sense(cdev, irb) != 0)
                return;
        sch = to_subchannel(cdev->dev.parent);
-       ret = __ccw_device_check_pgid(cdev);
+       if (cdev->private->options.pgroup)
+               ret = __ccw_device_check_pgid(cdev);
+       else
+               ret = __ccw_device_check_nop(cdev);
        memset(&cdev->private->irb, 0, sizeof(struct irb));
        switch (ret) {
        /* 0, -ETIME, -EAGAIN, -EOPNOTSUPP or -EACCES */
@@ -345,11 +422,10 @@ ccw_device_verify_irq(struct ccw_device *cdev, enum dev_event dev_event)
                 * One of those strange devices which claim to be able
                 * to do multipathing but not for Set Path Group ID.
                 */
-               if (cdev->private->flags.pgid_single) {
-                       ccw_device_verify_done(cdev, -EOPNOTSUPP);
-                       break;
-               }
-               cdev->private->flags.pgid_single = 1;
+               if (cdev->private->flags.pgid_single)
+                       cdev->private->options.pgroup = 0;
+               else
+                       cdev->private->flags.pgid_single = 1;
                /* fall through. */
        case -EAGAIN:           /* Try again. */
                __ccw_device_verify_start(cdev);
index 14bef2c179bf383f7eecb4f1506710b6bb0991ad..caf148d5caadb55ec6eab663168ebc8180b908ea 100644 (file)
@@ -67,8 +67,7 @@ ccw_device_path_notoper(struct ccw_device *cdev)
                      sch->schib.pmcw.pnom);
 
        sch->lpm &= ~sch->schib.pmcw.pnom;
-       if (cdev->private->options.pgroup)
-               cdev->private->flags.doverify = 1;
+       cdev->private->flags.doverify = 1;
 }
 
 /*
@@ -180,7 +179,7 @@ ccw_device_accumulate_esw(struct ccw_device *cdev, struct irb *irb)
        cdev_irb->esw.esw0.erw.auth = irb->esw.esw0.erw.auth;
        /* Copy path verification required flag. */
        cdev_irb->esw.esw0.erw.pvrf = irb->esw.esw0.erw.pvrf;
-       if (irb->esw.esw0.erw.pvrf && cdev->private->options.pgroup)
+       if (irb->esw.esw0.erw.pvrf)
                cdev->private->flags.doverify = 1;
        /* Copy concurrent sense bit. */
        cdev_irb->esw.esw0.erw.cons = irb->esw.esw0.erw.cons;
@@ -354,7 +353,7 @@ ccw_device_accumulate_basic_sense(struct ccw_device *cdev, struct irb *irb)
        }
        /* Check if path verification is required. */
        if (ccw_device_accumulate_esw_valid(irb) &&
-           irb->esw.esw0.erw.pvrf && cdev->private->options.pgroup) 
+           irb->esw.esw0.erw.pvrf)
                cdev->private->flags.doverify = 1;
 }
 
index b70039af70d6204062850f8b3089f6e9765084e5..7c93a8798d234c89160138571489562c7ef14bd5 100644 (file)
@@ -2735,7 +2735,7 @@ qdio_free(struct ccw_device *cdev)
        QDIO_DBF_TEXT1(0,trace,dbf_text);
        QDIO_DBF_TEXT0(0,setup,dbf_text);
 
-       cdev->private->qdio_data = 0;
+       cdev->private->qdio_data = NULL;
 
        up(&irq_ptr->setting_up_sema);
 
index 23d53bf9daf1f236aa489bab73570a2d3398cdb6..95f4e105cb969293934538df62228665a7e40d7a 100644 (file)
@@ -529,7 +529,7 @@ claw_open(struct net_device *dev)
         printk(KERN_INFO "%s:%s Enter  \n",dev->name,__FUNCTION__);
 #endif
        CLAW_DBF_TEXT(4,trace,"open");
-       if (!dev | (dev->name[0] == 0x00)) {
+       if (!dev || (dev->name[0] == 0x00)) {
                CLAW_DBF_TEXT(2,trace,"BadDev");
                printk(KERN_WARNING "claw: Bad device at open failing \n");
                return -ENODEV;
index 20c8eb16f4646ace31a883144947c14179353eb3..8a4b581201464057d51b67619c72798401f89dbd 100644 (file)
@@ -2686,9 +2686,17 @@ static struct attribute_group ctc_attr_group = {
 static int
 ctc_add_attributes(struct device *dev)
 {
-       device_create_file(dev, &dev_attr_loglevel);
-       device_create_file(dev, &dev_attr_stats);
-       return 0;
+       int rc;
+
+       rc = device_create_file(dev, &dev_attr_loglevel);
+       if (rc)
+               goto out;
+       rc = device_create_file(dev, &dev_attr_stats);
+       if (!rc)
+               goto out;
+       device_remove_file(dev, &dev_attr_loglevel);
+out:
+       return rc;
 }
 
 static void
@@ -2901,7 +2909,12 @@ ctc_new_device(struct ccwgroup_device *cgdev)
                goto out;
        }
 
-       ctc_add_attributes(&cgdev->dev);
+       if (ctc_add_attributes(&cgdev->dev)) {
+               ctc_netdev_unregister(dev);
+               dev->priv = NULL;
+               ctc_free_netdevice(dev, 1);
+               goto out;
+       }
 
        strlcpy(privptr->fsm->name, dev->name, sizeof (privptr->fsm->name));
 
index 189a49275433879f1935685c8a51b05d8ab6158e..0e863df4027a2d18cfaabd576ee9aa61df4194a6 100644 (file)
@@ -692,7 +692,7 @@ iucv_retrieve_buffer (void)
        iucv_debug(1, "entering");
        if (iucv_cpuid != -1) {
                smp_call_function_on(iucv_retrieve_buffer_cpuid,
-                                    0, 0, 1, iucv_cpuid);
+                                    NULL, 0, 1, iucv_cpuid);
                /* Release the cpu reserved by iucv_declare_buffer. */
                smp_put_cpu(iucv_cpuid);
                iucv_cpuid = -1;
index b452cc1afd550a5c7c24ed4bde87db498539952c..5d6e6cbfa360375cabfa6bcbc87650eddab50ec5 100644 (file)
@@ -2029,7 +2029,7 @@ remove_write (struct device_driver *drv, const char *buf, size_t count)
                 count = IFNAMSIZ-1;
 
         for (i=0, p=(char *)buf; i<count && *p; i++, p++) {
-                if ((*p == '\n') | (*p == ' ')) {
+                if ((*p == '\n') || (*p == ' ')) {
                         /* trailing lf, grr */
                         break;
                 } else {
index 8e8963f1573173a41fb8995dd3d9866605fdc714..5fff1f93973ac26c85d746b6e045392de945f189 100644 (file)
@@ -4420,8 +4420,10 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
        enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
        struct qeth_eddp_context *ctx = NULL;
        int tx_bytes = skb->len;
+#ifdef CONFIG_QETH_PERF_STATS
        unsigned short nr_frags = skb_shinfo(skb)->nr_frags;
        unsigned short tso_size = skb_shinfo(skb)->gso_size;
+#endif
        int rc;
 
        QETH_DBF_TEXT(trace, 6, "sendpkt");
@@ -4457,7 +4459,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
        queue = card->qdio.out_qs
                [qeth_get_priority_queue(card, skb, ipv, cast_type)];
 
-       if (skb_shinfo(skb)->gso_size)
+       if (skb_is_gso(skb))
                large_send = card->options.large_send;
 
        /*are we able to do TSO ? If so ,prepare and send it from here */
@@ -4802,7 +4804,7 @@ static struct qeth_cmd_buffer *
 qeth_get_setassparms_cmd(struct qeth_card *, enum qeth_ipa_funcs,
                         __u16, __u16, enum qeth_prot_versions);
 static int
-qeth_arp_query(struct qeth_card *card, char *udata)
+qeth_arp_query(struct qeth_card *card, char __user *udata)
 {
        struct qeth_cmd_buffer *iob;
        struct qeth_arp_query_info qinfo = {0, };
@@ -4935,7 +4937,7 @@ qeth_get_adapter_cmd(struct qeth_card *card, __u32 command, __u32 cmdlen)
  * function to send SNMP commands to OSA-E card
  */
 static int
-qeth_snmp_command(struct qeth_card *card, char *udata)
+qeth_snmp_command(struct qeth_card *card, char __user *udata)
 {
        struct qeth_cmd_buffer *iob;
        struct qeth_ipa_cmd *cmd;
@@ -7907,9 +7909,9 @@ qeth_set_online(struct ccwgroup_device *gdev)
 }
 
 static struct ccw_device_id qeth_ids[] = {
-       {CCW_DEVICE(0x1731, 0x01), driver_info:QETH_CARD_TYPE_OSAE},
-       {CCW_DEVICE(0x1731, 0x05), driver_info:QETH_CARD_TYPE_IQD},
-       {CCW_DEVICE(0x1731, 0x06), driver_info:QETH_CARD_TYPE_OSN},
+       {CCW_DEVICE(0x1731, 0x01), .driver_info = QETH_CARD_TYPE_OSAE},
+       {CCW_DEVICE(0x1731, 0x05), .driver_info = QETH_CARD_TYPE_IQD},
+       {CCW_DEVICE(0x1731, 0x06), .driver_info = QETH_CARD_TYPE_OSN},
        {},
 };
 MODULE_DEVICE_TABLE(ccw, qeth_ids);
@@ -8378,7 +8380,7 @@ out:
 
 static struct notifier_block qeth_ip_notifier = {
        qeth_ip_event,
-       0
+       NULL,
 };
 
 #ifdef CONFIG_QETH_IPV6
@@ -8431,7 +8433,7 @@ out:
 
 static struct notifier_block qeth_ip6_notifier = {
        qeth_ip6_event,
-       0
+       NULL,
 };
 #endif
 
@@ -8449,16 +8451,17 @@ __qeth_reboot_event_card(struct device *dev, void *data)
 static int
 qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
+       int ret;
 
-       driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
-                              __qeth_reboot_event_card);
-       return NOTIFY_DONE;
+       ret = driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
+                                    __qeth_reboot_event_card);
+       return ret ? NOTIFY_BAD : NOTIFY_DONE;
 }
 
 
 static struct notifier_block qeth_reboot_notifier = {
        qeth_reboot_event,
-       0
+       NULL,
 };
 
 static int
index 185a9cfbcbdc76cff6128a60f1be96fb4bf6d743..001497bbea167c7b70e51bf4c3e80d1c4ce021a9 100644 (file)
@@ -1755,7 +1755,7 @@ qeth_driver_group_store(struct device_driver *ddrv, const char *buf,
 }
 
 
-static DRIVER_ATTR(group, 0200, 0, qeth_driver_group_store);
+static DRIVER_ATTR(group, 0200, NULL, qeth_driver_group_store);
 
 static ssize_t
 qeth_driver_notifier_register_store(struct device_driver *ddrv, const char *buf,
@@ -1783,7 +1783,7 @@ qeth_driver_notifier_register_store(struct device_driver *ddrv, const char *buf,
        return count;
 }
 
-static DRIVER_ATTR(notifier_register, 0200, 0,
+static DRIVER_ATTR(notifier_register, 0200, NULL,
                   qeth_driver_notifier_register_store);
 
 int
index 72118ee689549a3bdb499fcfc9b11d3feda2e753..b8179c27ceb6e1971bb78568ef82707cec64c8a1 100644 (file)
@@ -66,7 +66,7 @@ smsg_message_pending(iucv_MessagePending *eib, void *pgm_data)
                return;
        }
        rc = iucv_receive(eib->ippathid, eib->ipmsgid, eib->iptrgcls,
-                         msg, len, 0, 0, 0);
+                         msg, len, NULL, NULL, NULL);
        if (rc == 0) {
                msg[len] = 0;
                EBCASC(msg, len);
@@ -122,7 +122,7 @@ smsg_unregister_callback(char *prefix, void (*callback)(char *from, char *str))
        struct smsg_callback *cb, *tmp;
 
        spin_lock(&smsg_list_lock);
-       cb = 0;
+       cb = NULL;
        list_for_each_entry(tmp, &smsg_list, list)
                if (tmp->callback == callback &&
                    strcmp(tmp->prefix, prefix) == 0) {
@@ -139,7 +139,7 @@ smsg_exit(void)
 {
        if (smsg_handle > 0) {
                cpcmd("SET SMSG OFF", NULL, 0, NULL);
-               iucv_sever(smsg_pathid, 0);
+               iucv_sever(smsg_pathid, NULL);
                iucv_unregister_program(smsg_handle);
                driver_unregister(&smsg_driver);
        }
@@ -162,19 +162,19 @@ smsg_init(void)
                return rc;
        }
        smsg_handle = iucv_register_program("SMSGIUCV        ", "*MSG    ",
-                                           pgmmask, &smsg_ops, 0);
+                                           pgmmask, &smsg_ops, NULL);
        if (!smsg_handle) {
                printk(KERN_ERR "SMSGIUCV: failed to register to iucv");
                driver_unregister(&smsg_driver);
                return -EIO;    /* better errno ? */
        }
-       rc = iucv_connect (&smsg_pathid, 255, 0, "*MSG    ", 0, 0, 0, 0,
-                          smsg_handle, 0);
+       rc = iucv_connect (&smsg_pathid, 255, NULL, "*MSG    ", NULL, 0,
+                          NULL, NULL, smsg_handle, NULL);
        if (rc) {
                printk(KERN_ERR "SMSGIUCV: failed to connect to *MSG");
                iucv_unregister_program(smsg_handle);
                driver_unregister(&smsg_driver);
-               smsg_handle = 0;
+               smsg_handle = NULL;
                return -EIO;
        }
        cpcmd("SET SMSG IUCV", NULL, 0, NULL);
index ffb3677e354fe9c1a7d0848453d91353fb33cc7e..5399c5d99b81e0b5bc8f56949d4ec937711b6e67 100644 (file)
@@ -111,6 +111,16 @@ repeat:
                        break;
                case CRW_RSC_CPATH:
                        pr_debug("source is channel path %02X\n", crw[0].rsid);
+                       /*
+                        * Check for solicited machine checks. These are
+                        * created by reset channel path and need not be
+                        * reported to the common I/O layer.
+                        */
+                       if (crw[chain].slct) {
+                               DBG(KERN_INFO"solicited machine check for "
+                                   "channel path %02X\n", crw[0].rsid);
+                               break;
+                       }
                        switch (crw[0].erc) {
                        case CRW_ERC_IPARM: /* Path has come. */
                                ret = chp_process_crw(crw[0].rsid, 1);
index 6335f9229184004d1fd92194af65addb6e746355..31db2b06faba2922bc28130e937848de6c8ebf8b 100644 (file)
@@ -2227,7 +2227,7 @@ zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action,
        /* setup new FSF request */
        retval = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA,
                                     erp_action ? ZFCP_REQ_AUTO_CLEANUP : 0,
-                                    0, &lock_flags, &fsf_req);
+                                    NULL, &lock_flags, &fsf_req);
        if (retval < 0) {
                ZFCP_LOG_INFO("error: Out of resources. Could not create an "
                               "exchange port data request for"
index 46e14f22ec18fd004b2af2aece837cdba54e73e8..671f4a6a5d181cea8c5f73ebf8f6758072f186ec 100644 (file)
@@ -44,30 +44,29 @@ struct scsi_transport_template *zfcp_transport_template;
 
 struct zfcp_data zfcp_data = {
        .scsi_host_template = {
-             name:                    ZFCP_NAME,
-             proc_name:               "zfcp",
-             proc_info:               NULL,
-             detect:                  NULL,
-             slave_alloc:             zfcp_scsi_slave_alloc,
-             slave_configure:         zfcp_scsi_slave_configure,
-             slave_destroy:           zfcp_scsi_slave_destroy,
-             queuecommand:            zfcp_scsi_queuecommand,
-             eh_abort_handler:        zfcp_scsi_eh_abort_handler,
-             eh_device_reset_handler: zfcp_scsi_eh_device_reset_handler,
-             eh_bus_reset_handler:    zfcp_scsi_eh_bus_reset_handler,
-             eh_host_reset_handler:   zfcp_scsi_eh_host_reset_handler,
-                                      /* FIXME(openfcp): Tune */
-             can_queue:               4096,
-             this_id:                 -1,
-             /*
-              * FIXME:
-              * one less? can zfcp_create_sbale cope with it?
-              */
-             sg_tablesize:            ZFCP_MAX_SBALES_PER_REQ,
-             cmd_per_lun:             1,
-             unchecked_isa_dma:       0,
-             use_clustering:          1,
-             sdev_attrs:              zfcp_sysfs_sdev_attrs,
+               .name                   = ZFCP_NAME,
+               .proc_name              = "zfcp",
+               .proc_info              = NULL,
+               .detect                 = NULL,
+               .slave_alloc            = zfcp_scsi_slave_alloc,
+               .slave_configure        = zfcp_scsi_slave_configure,
+               .slave_destroy          = zfcp_scsi_slave_destroy,
+               .queuecommand           = zfcp_scsi_queuecommand,
+               .eh_abort_handler       = zfcp_scsi_eh_abort_handler,
+               .eh_device_reset_handler = zfcp_scsi_eh_device_reset_handler,
+               .eh_bus_reset_handler   = zfcp_scsi_eh_bus_reset_handler,
+               .eh_host_reset_handler  = zfcp_scsi_eh_host_reset_handler,
+               .can_queue              = 4096,
+               .this_id                = -1,
+               /*
+                * FIXME:
+                * one less? can zfcp_create_sbale cope with it?
+                */
+               .sg_tablesize           = ZFCP_MAX_SBALES_PER_REQ,
+               .cmd_per_lun            = 1,
+               .unchecked_isa_dma      = 0,
+               .use_clustering         = 1,
+               .sdev_attrs             = zfcp_sysfs_sdev_attrs,
        },
        .driver_version = ZFCP_VERSION,
        /* rest initialised with zeros */
index 9e871de2383564816c7ac703966b4d8ecf24600c..601340d84410a04ee6e25f615d523eae1a457f5a 100644 (file)
@@ -93,7 +93,6 @@
 #endif
 
 /********************************** Misc Macros *******************************/
-#define        roundup(x, y)   ((((x)+((y)-1))/(y))*(y))
 #define        powerof2(x)     ((((x)-1)&(x))==0)
 
 /************************* Forward Declarations *******************************/
index 94b1261a259d934d5a5506e22f215fa3af0854e0..19745a31072b17e2be64a3e432fe0940effb004a 100644 (file)
@@ -105,9 +105,6 @@ enum {
        PIIX_FLAG_SCR           = (1 << 26), /* SCR available */
        PIIX_FLAG_AHCI          = (1 << 27), /* AHCI possible */
        PIIX_FLAG_CHECKINTR     = (1 << 28), /* make sure PCI INTx enabled */
-       PIIX_FLAG_COMBINED      = (1 << 29), /* combined mode possible */
-       /* ICH6/7 use different scheme for map value */
-       PIIX_FLAG_COMBINED_ICH6 = PIIX_FLAG_COMBINED | (1 << 30),
 
        /* combined mode.  if set, PATA is channel 0.
         * if clear, PATA is channel 1.
@@ -126,6 +123,7 @@ enum {
        ich6_sata               = 4,
        ich6_sata_ahci          = 5,
        ich6m_sata_ahci         = 6,
+       ich8_sata_ahci          = 7,
 
        /* constants for mapping table */
        P0                      = 0,  /* port 0 */
@@ -141,11 +139,19 @@ enum {
 
 struct piix_map_db {
        const u32 mask;
+       const u16 port_enable;
+       const int present_shift;
        const int map[][4];
 };
 
+struct piix_host_priv {
+       const int *map;
+       const struct piix_map_db *map_db;
+};
+
 static int piix_init_one (struct pci_dev *pdev,
                                    const struct pci_device_id *ent);
+static void piix_host_stop(struct ata_host_set *host_set);
 static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev);
 static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev);
 static void piix_pata_error_handler(struct ata_port *ap);
@@ -186,11 +192,11 @@ static const struct pci_device_id piix_pci_tbl[] = {
        /* Enterprise Southbridge 2 (where's the datasheet?) */
        { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
        /* SATA Controller 1 IDE (ICH8, no datasheet yet) */
-       { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
+       { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
        /* SATA Controller 2 IDE (ICH8, ditto) */
-       { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
+       { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
        /* Mobile SATA Controller IDE (ICH8M, ditto) */
-       { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci },
+       { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
 
        { }     /* terminate list */
 };
@@ -254,7 +260,7 @@ static const struct ata_port_operations piix_pata_ops = {
 
        .port_start             = ata_port_start,
        .port_stop              = ata_port_stop,
-       .host_stop              = ata_host_stop,
+       .host_stop              = piix_host_stop,
 };
 
 static const struct ata_port_operations piix_sata_ops = {
@@ -284,11 +290,13 @@ static const struct ata_port_operations piix_sata_ops = {
 
        .port_start             = ata_port_start,
        .port_stop              = ata_port_stop,
-       .host_stop              = ata_host_stop,
+       .host_stop              = piix_host_stop,
 };
 
-static struct piix_map_db ich5_map_db = {
+static const struct piix_map_db ich5_map_db = {
        .mask = 0x7,
+       .port_enable = 0x3,
+       .present_shift = 4,
        .map = {
                /* PM   PS   SM   SS       MAP  */
                {  P0,  NA,  P1,  NA }, /* 000b */
@@ -302,8 +310,10 @@ static struct piix_map_db ich5_map_db = {
        },
 };
 
-static struct piix_map_db ich6_map_db = {
+static const struct piix_map_db ich6_map_db = {
        .mask = 0x3,
+       .port_enable = 0xf,
+       .present_shift = 4,
        .map = {
                /* PM   PS   SM   SS       MAP */
                {  P0,  P2,  P1,  P3 }, /* 00b */
@@ -313,8 +323,10 @@ static struct piix_map_db ich6_map_db = {
        },
 };
 
-static struct piix_map_db ich6m_map_db = {
+static const struct piix_map_db ich6m_map_db = {
        .mask = 0x3,
+       .port_enable = 0x5,
+       .present_shift = 4,
        .map = {
                /* PM   PS   SM   SS       MAP */
                {  P0,  P2,  RV,  RV }, /* 00b */
@@ -324,6 +336,28 @@ static struct piix_map_db ich6m_map_db = {
        },
 };
 
+static const struct piix_map_db ich8_map_db = {
+       .mask = 0x3,
+       .port_enable = 0x3,
+       .present_shift = 8,
+       .map = {
+               /* PM   PS   SM   SS       MAP */
+               {  P0,  NA,  P1,  NA }, /* 00b (hardwired) */
+               {  RV,  RV,  RV,  RV },
+               {  RV,  RV,  RV,  RV }, /* 10b (never) */
+               {  RV,  RV,  RV,  RV },
+       },
+};
+
+static const struct piix_map_db *piix_map_db_table[] = {
+       [ich5_sata]             = &ich5_map_db,
+       [esb_sata]              = &ich5_map_db,
+       [ich6_sata]             = &ich6_map_db,
+       [ich6_sata_ahci]        = &ich6_map_db,
+       [ich6m_sata_ahci]       = &ich6m_map_db,
+       [ich8_sata_ahci]        = &ich8_map_db,
+};
+
 static struct ata_port_info piix_port_info[] = {
        /* piix4_pata */
        {
@@ -356,63 +390,69 @@ static struct ata_port_info piix_port_info[] = {
        /* ich5_sata */
        {
                .sht            = &piix_sht,
-               .host_flags     = ATA_FLAG_SATA | PIIX_FLAG_COMBINED |
-                                 PIIX_FLAG_CHECKINTR,
+               .host_flags     = ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR,
                .pio_mask       = 0x1f, /* pio0-4 */
                .mwdma_mask     = 0x07, /* mwdma0-2 */
                .udma_mask      = 0x7f, /* udma0-6 */
                .port_ops       = &piix_sata_ops,
-               .private_data   = &ich5_map_db,
        },
 
        /* i6300esb_sata */
        {
                .sht            = &piix_sht,
-               .host_flags     = ATA_FLAG_SATA | PIIX_FLAG_COMBINED |
+               .host_flags     = ATA_FLAG_SATA |
                                  PIIX_FLAG_CHECKINTR | PIIX_FLAG_IGNORE_PCS,
                .pio_mask       = 0x1f, /* pio0-4 */
                .mwdma_mask     = 0x07, /* mwdma0-2 */
                .udma_mask      = 0x7f, /* udma0-6 */
                .port_ops       = &piix_sata_ops,
-               .private_data   = &ich5_map_db,
        },
 
        /* ich6_sata */
        {
                .sht            = &piix_sht,
-               .host_flags     = ATA_FLAG_SATA | PIIX_FLAG_COMBINED_ICH6 |
+               .host_flags     = ATA_FLAG_SATA |
                                  PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR,
                .pio_mask       = 0x1f, /* pio0-4 */
                .mwdma_mask     = 0x07, /* mwdma0-2 */
                .udma_mask      = 0x7f, /* udma0-6 */
                .port_ops       = &piix_sata_ops,
-               .private_data   = &ich6_map_db,
        },
 
        /* ich6_sata_ahci */
        {
                .sht            = &piix_sht,
-               .host_flags     = ATA_FLAG_SATA | PIIX_FLAG_COMBINED_ICH6 |
+               .host_flags     = ATA_FLAG_SATA |
                                  PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR |
                                  PIIX_FLAG_AHCI,
                .pio_mask       = 0x1f, /* pio0-4 */
                .mwdma_mask     = 0x07, /* mwdma0-2 */
                .udma_mask      = 0x7f, /* udma0-6 */
                .port_ops       = &piix_sata_ops,
-               .private_data   = &ich6_map_db,
        },
 
        /* ich6m_sata_ahci */
        {
                .sht            = &piix_sht,
-               .host_flags     = ATA_FLAG_SATA | PIIX_FLAG_COMBINED_ICH6 |
+               .host_flags     = ATA_FLAG_SATA |
+                                 PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR |
+                                 PIIX_FLAG_AHCI,
+               .pio_mask       = 0x1f, /* pio0-4 */
+               .mwdma_mask     = 0x07, /* mwdma0-2 */
+               .udma_mask      = 0x7f, /* udma0-6 */
+               .port_ops       = &piix_sata_ops,
+       },
+
+       /* ich8_sata_ahci */
+       {
+               .sht            = &piix_sht,
+               .host_flags     = ATA_FLAG_SATA |
                                  PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR |
                                  PIIX_FLAG_AHCI,
                .pio_mask       = 0x1f, /* pio0-4 */
                .mwdma_mask     = 0x07, /* mwdma0-2 */
                .udma_mask      = 0x7f, /* udma0-6 */
                .port_ops       = &piix_sata_ops,
-               .private_data   = &ich6m_map_db,
        },
 };
 
@@ -508,46 +548,29 @@ static void piix_pata_error_handler(struct ata_port *ap)
 static int piix_sata_prereset(struct ata_port *ap)
 {
        struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
-       const unsigned int *map = ap->host_set->private_data;
+       struct piix_host_priv *hpriv = ap->host_set->private_data;
+       const unsigned int *map = hpriv->map;
        int base = 2 * ap->hard_port_no;
-       unsigned int present_mask = 0;
+       unsigned int present = 0;
        int port, i;
-       u8 pcs;
+       u16 pcs;
 
-       pci_read_config_byte(pdev, ICH5_PCS, &pcs);
+       pci_read_config_word(pdev, ICH5_PCS, &pcs);
        DPRINTK("ata%u: ENTER, pcs=0x%x base=%d\n", ap->id, pcs, base);
 
-       /* enable all ports on this ap and wait for them to settle */
-       for (i = 0; i < 2; i++) {
-               port = map[base + i];
-               if (port >= 0)
-                       pcs |= 1 << port;
-       }
-
-       pci_write_config_byte(pdev, ICH5_PCS, pcs);
-       msleep(100);
-
-       /* let's see which devices are present */
-       pci_read_config_byte(pdev, ICH5_PCS, &pcs);
-
        for (i = 0; i < 2; i++) {
                port = map[base + i];
                if (port < 0)
                        continue;
-               if (ap->flags & PIIX_FLAG_IGNORE_PCS || pcs & 1 << (4 + port))
-                       present_mask |= 1 << i;
-               else
-                       pcs &= ~(1 << port);
+               if ((ap->flags & PIIX_FLAG_IGNORE_PCS) ||
+                   (pcs & 1 << (hpriv->map_db->present_shift + port)))
+                       present = 1;
        }
 
-       /* disable offline ports on non-AHCI controllers */
-       if (!(ap->flags & PIIX_FLAG_AHCI))
-               pci_write_config_byte(pdev, ICH5_PCS, pcs);
-
        DPRINTK("ata%u: LEAVE, pcs=0x%x present_mask=0x%x\n",
                ap->id, pcs, present_mask);
 
-       if (!present_mask) {
+       if (!present) {
                ata_port_printk(ap, KERN_INFO, "SATA port has no device.\n");
                ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
                return 0;
@@ -761,10 +784,27 @@ static int __devinit piix_check_450nx_errata(struct pci_dev *ata_dev)
        return no_piix_dma;
 }
 
+static void __devinit piix_init_pcs(struct pci_dev *pdev,
+                                   const struct piix_map_db *map_db)
+{
+       u16 pcs, new_pcs;
+
+       pci_read_config_word(pdev, ICH5_PCS, &pcs);
+
+       new_pcs = pcs | map_db->port_enable;
+
+       if (new_pcs != pcs) {
+               DPRINTK("updating PCS from 0x%x to 0x%x\n", pcs, new_pcs);
+               pci_write_config_word(pdev, ICH5_PCS, new_pcs);
+               msleep(150);
+       }
+}
+
 static void __devinit piix_init_sata_map(struct pci_dev *pdev,
-                                        struct ata_port_info *pinfo)
+                                        struct ata_port_info *pinfo,
+                                        const struct piix_map_db *map_db)
 {
-       struct piix_map_db *map_db = pinfo[0].private_data;
+       struct piix_host_priv *hpriv = pinfo[0].private_data;
        const unsigned int *map;
        int i, invalid_map = 0;
        u8 map_value;
@@ -805,8 +845,8 @@ static void __devinit piix_init_sata_map(struct pci_dev *pdev,
                dev_printk(KERN_ERR, &pdev->dev,
                           "invalid MAP value %u\n", map_value);
 
-       pinfo[0].private_data = (void *)map;
-       pinfo[1].private_data = (void *)map;
+       hpriv->map = map;
+       hpriv->map_db = map_db;
 }
 
 /**
@@ -829,6 +869,7 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        static int printed_version;
        struct ata_port_info port_info[2];
        struct ata_port_info *ppinfo[2] = { &port_info[0], &port_info[1] };
+       struct piix_host_priv *hpriv;
        unsigned long host_flags;
 
        if (!printed_version++)
@@ -839,8 +880,14 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        if (!in_module_init)
                return -ENODEV;
 
+       hpriv = kzalloc(sizeof(*hpriv), GFP_KERNEL);
+       if (!hpriv)
+               return -ENOMEM;
+
        port_info[0] = piix_port_info[ent->driver_data];
        port_info[1] = piix_port_info[ent->driver_data];
+       port_info[0].private_data = hpriv;
+       port_info[1].private_data = hpriv;
 
        host_flags = port_info[0].host_flags;
 
@@ -855,8 +902,11 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        /* Initialize SATA map */
-       if (host_flags & ATA_FLAG_SATA)
-               piix_init_sata_map(pdev, port_info);
+       if (host_flags & ATA_FLAG_SATA) {
+               piix_init_sata_map(pdev, port_info,
+                                  piix_map_db_table[ent->driver_data]);
+               piix_init_pcs(pdev, piix_map_db_table[ent->driver_data]);
+       }
 
        /* On ICH5, some BIOSen disable the interrupt using the
         * PCI_COMMAND_INTX_DISABLE bit added in PCI 2.3.
@@ -879,6 +929,13 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        return ata_pci_init_one(pdev, ppinfo, 2);
 }
 
+static void piix_host_stop(struct ata_host_set *host_set)
+{
+       if (host_set->next == NULL)
+               kfree(host_set->private_data);
+       ata_host_stop(host_set);
+}
+
 static int __init piix_init(void)
 {
        int rc;
index 0995430e4cf1ca3d4f5927856d0cb64739e0f7ac..0ae9ced00ed4db899c591528a848f68a51c144a8 100644 (file)
@@ -299,6 +299,7 @@ static inline int map_8250_out_reg(struct uart_8250_port *up, int offset)
 
 static unsigned int serial_in(struct uart_8250_port *up, int offset)
 {
+       unsigned int tmp;
        offset = map_8250_in_reg(up, offset) << up->port.regshift;
 
        switch (up->port.iotype) {
@@ -317,6 +318,13 @@ static unsigned int serial_in(struct uart_8250_port *up, int offset)
                return __raw_readl(up->port.membase + offset);
 #endif
 
+       case UPIO_TSI:
+               if (offset == UART_IIR) {
+                       tmp = readl((u32 *)(up->port.membase + UART_RX));
+                       return (cpu_to_le32(tmp) >> 8) & 0xff;
+               } else
+                       return readb(up->port.membase + offset);
+
        default:
                return inb(up->port.iobase + offset);
        }
@@ -346,6 +354,10 @@ serial_out(struct uart_8250_port *up, int offset, int value)
                __raw_writel(value, up->port.membase + offset);
                break;
 #endif
+       case UPIO_TSI:
+               if (!((offset == UART_IER) && (value & UART_IER_UUE)))
+                       writeb(value, up->port.membase + offset);
+               break;
 
        default:
                outb(value, up->port.iobase + offset);
@@ -2240,10 +2252,14 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
 
        touch_nmi_watchdog();
 
-       if (oops_in_progress) {
-               locked = spin_trylock_irqsave(&up->port.lock, flags);
+       local_irq_save(flags);
+       if (up->port.sysrq) {
+               /* serial8250_handle_port() already took the lock */
+               locked = 0;
+       } else if (oops_in_progress) {
+               locked = spin_trylock(&up->port.lock);
        } else
-               spin_lock_irqsave(&up->port.lock, flags);
+               spin_lock(&up->port.lock);
 
        /*
         *      First save the IER then disable the interrupts
@@ -2265,7 +2281,8 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
        serial_out(up, UART_IER, ier);
 
        if (locked)
-               spin_unlock_irqrestore(&up->port.lock, flags);
+               spin_unlock(&up->port.lock);
+       local_irq_restore(flags);
 }
 
 static int serial8250_console_setup(struct console *co, char *options)
index d119c8296a78a96d69e697a61b7c60ebb96670d9..8a98aae80e228ffd8afc2c57b868b8394aa7d765 100644 (file)
@@ -673,7 +673,7 @@ static void dz_reset(struct dz_port *dport)
 }
 
 #ifdef CONFIG_SERIAL_DZ_CONSOLE
-static void dz_console_putchar(struct uart_port *port, int ch)
+static void dz_console_putchar(struct uart_port *uport, int ch)
 {
        struct dz_port *dport = (struct dz_port *)uport;
        unsigned long flags;
index 342042889f6e1c3000d9f5dc64f3f14a20c36f69..5ff269fb604c051212449d18a1270e2da174c855 100644 (file)
@@ -1143,9 +1143,8 @@ static void __init ip22zilog_prepare(void)
                up[(chip * 2) + 1].port.fifosize = 1;
                up[(chip * 2) + 1].port.ops = &ip22zilog_pops;
                up[(chip * 2) + 1].port.type = PORT_IP22ZILOG;
-               up[(chip * 2) + 1].port.flags |= IP22ZILOG_FLAG_IS_CHANNEL_A;
                up[(chip * 2) + 1].port.line = (chip * 2) + 1;
-               up[(chip * 2) + 1].flags = 0;
+               up[(chip * 2) + 1].flags |= IP22ZILOG_FLAG_IS_CHANNEL_A;
        }
 }
 
index d5f636fbf29a727b751c0e6a933f4b41137517fa..80ef7d482756a3c9fec9b70b0646b4c25919472d 100644 (file)
@@ -2036,6 +2036,7 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port)
        case UPIO_MEM:
        case UPIO_MEM32:
        case UPIO_AU:
+       case UPIO_TSI:
                snprintf(address, sizeof(address),
                         "MMIO 0x%lx", port->mapbase);
                break;
index 0dbd4df44c05140499f03bbcb8e2d33be236d3fa..979497f108c8678511dd44a7112664d3a8f817d0 100644 (file)
@@ -1052,7 +1052,7 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id *
        if (err)
                return err;
 
-       err = sunsab_init_one(&up[0], op, 0,
+       err = sunsab_init_one(&up[1], op, 0,
                              (inst * 2) + 1);
        if (err) {
                of_iounmap(up[0].port.membase,
index f9013baba05b4f09f6bb1b06e038e9db9b39f907..d3a5aeee73a34b33bb4736b751a2aacab8ec5e8a 100644 (file)
@@ -1200,6 +1200,11 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up)
        if (up->port.type == PORT_UNKNOWN)
                return -ENODEV;
 
+       printk("%s: %s port at %lx, irq %u\n",
+              to_of_device(up->port.dev)->node->full_name,
+              (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse",
+              up->port.mapbase, up->port.irq);
+
 #ifdef CONFIG_SERIO
        serio = &up->serio;
        serio->port_data = up;
@@ -1406,25 +1411,35 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m
        struct device_node *dp = op->node;
        struct uart_sunsu_port *up;
        struct resource *rp;
+       enum su_type type;
        int err;
 
-       if (inst >= UART_NR)
-               return -EINVAL;
+       type = su_get_type(dp);
+       if (type == SU_PORT_PORT) {
+               if (inst >= UART_NR)
+                       return -EINVAL;
+               up = &sunsu_ports[inst];
+       } else {
+               up = kzalloc(sizeof(*up), GFP_KERNEL);
+               if (!up)
+                       return -ENOMEM;
+       }
 
-       up = &sunsu_ports[inst];
        up->port.line = inst;
 
        spin_lock_init(&up->port.lock);
 
-       up->su_type = su_get_type(dp);
+       up->su_type = type;
 
        rp = &op->resource[0];
-       up->port.mapbase = op->resource[0].start;
-
+       up->port.mapbase = rp->start;
        up->reg_size = (rp->end - rp->start) + 1;
        up->port.membase = of_ioremap(rp, 0, up->reg_size, "su");
-       if (!up->port.membase)
+       if (!up->port.membase) {
+               if (type != SU_PORT_PORT)
+                       kfree(up);
                return -ENOMEM;
+       }
 
        up->port.irq = op->irqs[0];
 
@@ -1436,8 +1451,11 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m
        err = 0;
        if (up->su_type == SU_PORT_KBD || up->su_type == SU_PORT_MS) {
                err = sunsu_kbd_ms_init(up);
-               if (err)
+               if (err) {
+                       kfree(up);
                        goto out_unmap;
+               }
+               dev_set_drvdata(&op->dev, up);
 
                return 0;
        }
@@ -1476,8 +1494,12 @@ static int __devexit su_remove(struct of_device *dev)
 #ifdef CONFIG_SERIO
                serio_unregister_port(&up->serio);
 #endif
-       } else if (up->port.type != PORT_UNKNOWN)
+               kfree(up);
+       } else if (up->port.type != PORT_UNKNOWN) {
                uart_remove_one_port(&sunsu_reg, &up->port);
+       }
+
+       dev_set_drvdata(&dev->dev, NULL);
 
        return 0;
 }
index e93d0edc2e0890b79accfcb488abbe7980d8620e..6c8b0ea83c3c5b0318637526747c3dfee62a53f6 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/tty_flip.h>
 
 #include <asm/io.h>
+#include <asm/vr41xx/irq.h>
 #include <asm/vr41xx/siu.h>
 #include <asm/vr41xx/vr41xx.h>
 
index 7fdbc5dad5fd9d364a62fa95793c93b8a73734cf..2ee742d40c43e3708ea7c8fbce9e4096f6181a77 100644 (file)
@@ -23,6 +23,7 @@ config USB_ARCH_HAS_OHCI
        default y if ARCH_LH7A404
        default y if ARCH_S3C2410
        default y if PXA27x
+       default y if ARCH_EP93XX
        default y if ARCH_AT91RM9200
        # PPC:
        default y if STB03xxx
index c7123bf71c582bb1627ddc5116ce7723cab4eb1a..4710eb02ed640b7b572c223e2792759e2ff0a76d 100644 (file)
@@ -48,7 +48,7 @@ obj-$(CONFIG_USB_MICROTEK)    += image/
 obj-$(CONFIG_USB_SERIAL)       += serial/
 
 obj-$(CONFIG_USB_AUERSWALD)    += misc/
-obj-$(CONFIG_USB_CY7C63)       += misc/
+obj-$(CONFIG_USB_CYPRESS_CY7C63)+= misc/
 obj-$(CONFIG_USB_CYTHERM)      += misc/
 obj-$(CONFIG_USB_EMI26)                += misc/
 obj-$(CONFIG_USB_EMI62)                += misc/
index 3670d77e912ca4a068a3dc46e93ae8696aeca242..ca90326f2f5c6983ad6a6cd44f6980251ea11ca9 100644 (file)
@@ -291,13 +291,13 @@ static void acm_read_bulk(struct urb *urb, struct pt_regs *regs)
        struct acm_ru *rcv = urb->context;
        struct acm *acm = rcv->instance;
        int status = urb->status;
-       dbg("Entering acm_read_bulk with status %d\n", urb->status);
+       dbg("Entering acm_read_bulk with status %d", urb->status);
 
        if (!ACM_READY(acm))
                return;
 
        if (status)
-               dev_dbg(&acm->data->dev, "bulk rx status %d\n", status);
+               dev_dbg(&acm->data->dev, "bulk rx status %d", status);
 
        buf = rcv->buffer;
        buf->size = urb->actual_length;
@@ -343,7 +343,7 @@ next_buffer:
        list_del(&buf->list);
        spin_unlock(&acm->read_lock);
 
-       dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d\n", buf, buf->size);
+       dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size);
 
        tty_buffer_request_room(tty, buf->size);
        if (!acm->throttle)
@@ -394,7 +394,7 @@ urbs:
                rcv->urb->transfer_dma = buf->dma;
                rcv->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
 
-               dbg("acm_rx_tasklet: sending urb 0x%p, rcv 0x%p, buf 0x%p\n", rcv->urb, rcv, buf);
+               dbg("acm_rx_tasklet: sending urb 0x%p, rcv 0x%p, buf 0x%p", rcv->urb, rcv, buf);
 
                /* This shouldn't kill the driver as unsuccessful URBs are returned to the
                   free-urbs-pool and resubmited ASAP */
@@ -413,7 +413,7 @@ static void acm_write_bulk(struct urb *urb, struct pt_regs *regs)
 {
        struct acm *acm = (struct acm *)urb->context;
 
-       dbg("Entering acm_write_bulk with status %d\n", urb->status);
+       dbg("Entering acm_write_bulk with status %d", urb->status);
 
        acm_write_done(acm);
        acm_write_start(acm);
@@ -424,7 +424,7 @@ static void acm_write_bulk(struct urb *urb, struct pt_regs *regs)
 static void acm_softint(void *private)
 {
        struct acm *acm = private;
-       dbg("Entering acm_softint.\n");
+       dbg("Entering acm_softint.");
        
        if (!ACM_READY(acm))
                return;
@@ -440,7 +440,7 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
        struct acm *acm;
        int rv = -EINVAL;
        int i;
-       dbg("Entering acm_tty_open.\n");
+       dbg("Entering acm_tty_open.");
 
        mutex_lock(&open_mutex);
 
@@ -541,7 +541,7 @@ static int acm_tty_write(struct tty_struct *tty, const unsigned char *buf, int c
        int wbn;
        struct acm_wb *wb;
 
-       dbg("Entering acm_tty_write to write %d bytes,\n", count);
+       dbg("Entering acm_tty_write to write %d bytes,", count);
 
        if (!ACM_READY(acm))
                return -EINVAL;
@@ -793,7 +793,7 @@ static int acm_probe (struct usb_interface *intf,
 
        if (!buflen) {
                if (intf->cur_altsetting->endpoint->extralen && intf->cur_altsetting->endpoint->extra) {
-                       dev_dbg(&intf->dev,"Seeking extra descriptors on endpoint\n");
+                       dev_dbg(&intf->dev,"Seeking extra descriptors on endpoint");
                        buflen = intf->cur_altsetting->endpoint->extralen;
                        buffer = intf->cur_altsetting->endpoint->extra;
                } else {
@@ -842,24 +842,24 @@ next_desc:
 
        if (!union_header) {
                if (call_interface_num > 0) {
-                       dev_dbg(&intf->dev,"No union descriptor, using call management descriptor\n");
+                       dev_dbg(&intf->dev,"No union descriptor, using call management descriptor");
                        data_interface = usb_ifnum_to_if(usb_dev, (data_interface_num = call_interface_num));
                        control_interface = intf;
                } else {
-                       dev_dbg(&intf->dev,"No union descriptor, giving up\n");
+                       dev_dbg(&intf->dev,"No union descriptor, giving up");
                        return -ENODEV;
                }
        } else {
                control_interface = usb_ifnum_to_if(usb_dev, union_header->bMasterInterface0);
                data_interface = usb_ifnum_to_if(usb_dev, (data_interface_num = union_header->bSlaveInterface0));
                if (!control_interface || !data_interface) {
-                       dev_dbg(&intf->dev,"no interfaces\n");
+                       dev_dbg(&intf->dev,"no interfaces");
                        return -ENODEV;
                }
        }
        
        if (data_interface_num != call_interface_num)
-               dev_dbg(&intf->dev,"Seperate call control interface. That is not fully supported.\n");
+               dev_dbg(&intf->dev,"Seperate call control interface. That is not fully supported.");
 
 skip_normal_probe:
 
@@ -867,7 +867,7 @@ skip_normal_probe:
        if (data_interface->cur_altsetting->desc.bInterfaceClass != CDC_DATA_INTERFACE_TYPE) {
                if (control_interface->cur_altsetting->desc.bInterfaceClass == CDC_DATA_INTERFACE_TYPE) {
                        struct usb_interface *t;
-                       dev_dbg(&intf->dev,"Your device has switched interfaces.\n");
+                       dev_dbg(&intf->dev,"Your device has switched interfaces.");
 
                        t = control_interface;
                        control_interface = data_interface;
@@ -878,7 +878,7 @@ skip_normal_probe:
        }
        
        if (usb_interface_claimed(data_interface)) { /* valid in this context */
-               dev_dbg(&intf->dev,"The data interface isn't available\n");
+               dev_dbg(&intf->dev,"The data interface isn't available");
                return -EBUSY;
        }
 
@@ -895,7 +895,7 @@ skip_normal_probe:
        if ((epread->bEndpointAddress & USB_DIR_IN) != USB_DIR_IN) {
                /* descriptors are swapped */
                struct usb_endpoint_descriptor *t;
-               dev_dbg(&intf->dev,"The data interface has switched endpoints\n");
+               dev_dbg(&intf->dev,"The data interface has switched endpoints");
                
                t = epread;
                epread = epwrite;
@@ -910,7 +910,7 @@ skip_normal_probe:
        }
 
        if (!(acm = kzalloc(sizeof(struct acm), GFP_KERNEL))) {
-               dev_dbg(&intf->dev, "out of memory (acm kzalloc)\n");
+               dev_dbg(&intf->dev, "out of memory (acm kzalloc)");
                goto alloc_fail;
        }
 
@@ -936,26 +936,26 @@ skip_normal_probe:
 
        buf = usb_buffer_alloc(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma);
        if (!buf) {
-               dev_dbg(&intf->dev, "out of memory (ctrl buffer alloc)\n");
+               dev_dbg(&intf->dev, "out of memory (ctrl buffer alloc)");
                goto alloc_fail2;
        }
        acm->ctrl_buffer = buf;
 
        if (acm_write_buffers_alloc(acm) < 0) {
-               dev_dbg(&intf->dev, "out of memory (write buffer alloc)\n");
+               dev_dbg(&intf->dev, "out of memory (write buffer alloc)");
                goto alloc_fail4;
        }
 
        acm->ctrlurb = usb_alloc_urb(0, GFP_KERNEL);
        if (!acm->ctrlurb) {
-               dev_dbg(&intf->dev, "out of memory (ctrlurb kmalloc)\n");
+               dev_dbg(&intf->dev, "out of memory (ctrlurb kmalloc)");
                goto alloc_fail5;
        }
        for (i = 0; i < num_rx_buf; i++) {
                struct acm_ru *rcv = &(acm->ru[i]);
 
                if (!(rcv->urb = usb_alloc_urb(0, GFP_KERNEL))) {
-                       dev_dbg(&intf->dev, "out of memory (read urbs usb_alloc_urb)\n");
+                       dev_dbg(&intf->dev, "out of memory (read urbs usb_alloc_urb)");
                        goto alloc_fail7;
                }
 
@@ -966,13 +966,13 @@ skip_normal_probe:
                struct acm_rb *buf = &(acm->rb[i]);
 
                if (!(buf->base = usb_buffer_alloc(acm->dev, readsize, GFP_KERNEL, &buf->dma))) {
-                       dev_dbg(&intf->dev, "out of memory (read bufs usb_buffer_alloc)\n");
+                       dev_dbg(&intf->dev, "out of memory (read bufs usb_buffer_alloc)");
                        goto alloc_fail7;
                }
        }
        acm->writeurb = usb_alloc_urb(0, GFP_KERNEL);
        if (!acm->writeurb) {
-               dev_dbg(&intf->dev, "out of memory (writeurb kmalloc)\n");
+               dev_dbg(&intf->dev, "out of memory (writeurb kmalloc)");
                goto alloc_fail7;
        }
 
@@ -1086,6 +1086,9 @@ static struct usb_device_id acm_ids[] = {
        { USB_DEVICE(0x0ace, 0x1608), /* ZyDAS 56K USB MODEM */
        .driver_info = SINGLE_RX_URB, /* firmware bug */
        },
+       { USB_DEVICE(0x0ace, 0x1611), /* ZyDAS 56K USB MODEM - new version */
+       .driver_info = SINGLE_RX_URB, /* firmware bug */
+       },
        /* control interfaces with various AT-command sets */
        { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
                USB_CDC_ACM_PROTO_AT_V25TER) },
index a08787e253aaa17176cf786621765a39fced7c4e..6e3b5358a760453338ce796e6dd07fb0c3981263 100644 (file)
@@ -31,9 +31,6 @@ config USB_DEVICEFS
          For the format of the various /proc/bus/usb/ files, please read
          <file:Documentation/usb/proc_usb_info.txt>.
 
-         Please note that this code is completely unrelated to devfs, the
-         "/dev file system support".
-
          Most users want to say Y here.
 
 config USB_BANDWIDTH
index 875596e98e422de1c18bbdadf37db2886193d0f4..26c8cb5f3e6722467379204762fb5d8a89b938a0 100644 (file)
@@ -1790,7 +1790,10 @@ static int finish_device_resume(struct usb_device *udev)
         * and device drivers will know about any resume quirks.
         */
        status = usb_get_status(udev, USB_RECIP_DEVICE, 0, &devstatus);
-       if (status < 2)
+       if (status >= 0)
+               status = (status == 2 ? 0 : -ENODEV);
+
+       if (status)
                dev_dbg(&udev->dev,
                        "gone after usb resume? status %d\n",
                        status);
@@ -1879,7 +1882,12 @@ hub_port_resume(struct usb_hub *hub, int port1, struct usb_device *udev)
                        dev_dbg(hub->intfdev,
                                "port %d status %04x.%04x after resume, %d\n",
                                port1, portchange, devstatus, status);
+                       if (status >= 0)
+                               status = -ENODEV;
                } else {
+                       if (portchange & USB_PORT_STAT_C_SUSPEND)
+                               clear_port_feature(hub->hdev, port1,
+                                               USB_PORT_FEAT_C_SUSPEND);
                        /* TRSMRCY = 10 msec */
                        msleep(10);
                        if (udev)
index f48c3dbc367ae4e97aa7919c15439a5c0207a9ed..3182c2224ba24f79c428242e431eaff03bbeba51 100644 (file)
@@ -695,7 +695,7 @@ static void usbfs_remove_device(struct usb_device *dev)
                wake_up_all(&ds->wait);
                list_del_init(&ds->list);
                if (ds->discsignr) {
-                       sinfo.si_signo = SIGPIPE;
+                       sinfo.si_signo = ds->discsignr;
                        sinfo.si_errno = EPIPE;
                        sinfo.si_code = SI_ASYNCIO;
                        sinfo.si_addr = ds->disccontext;
index f7c6d758e1b00d0cfb953991ca745bdf53fc8727..53d584589c267abe0519b5c57f177ab20b7d758d 100644 (file)
 
 
 /* we must assign addresses for configurable endpoints (like net2280) */
-static __initdata unsigned epnum;
+static __devinitdata unsigned epnum;
 
 // #define MANY_ENDPOINTS
 #ifdef MANY_ENDPOINTS
 /* more than 15 configurable endpoints */
-static __initdata unsigned in_epnum;
+static __devinitdata unsigned in_epnum;
 #endif
 
 
@@ -59,7 +59,7 @@ static __initdata unsigned in_epnum;
  * NOTE:  each endpoint is unidirectional, as specified by its USB
  * descriptor; and isn't specific to a configuration or altsetting.
  */
-static int __init
+static int __devinit
 ep_matches (
        struct usb_gadget               *gadget,
        struct usb_ep                   *ep,
@@ -73,7 +73,7 @@ ep_matches (
        /* endpoint already claimed? */
        if (0 != ep->driver_data)
                return 0;
-               
+
        /* only support ep0 for portable CONTROL traffic */
        type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
        if (USB_ENDPOINT_XFER_CONTROL == type)
@@ -186,7 +186,7 @@ ep_matches (
        return 1;
 }
 
-static struct usb_ep * __init
+static struct usb_ep * __devinit
 find_ep (struct usb_gadget *gadget, const char *name)
 {
        struct usb_ep   *ep;
@@ -228,7 +228,7 @@ find_ep (struct usb_gadget *gadget, const char *name)
  *
  * On failure, this returns a null endpoint descriptor.
  */
-struct usb_ep * __init usb_ep_autoconfig (
+struct usb_ep * __devinit usb_ep_autoconfig (
        struct usb_gadget               *gadget,
        struct usb_endpoint_descriptor  *desc
 )
@@ -276,7 +276,7 @@ struct usb_ep * __init usb_ep_autoconfig (
                        return ep;
        }
 
-       /* Second, look at endpoints until an unclaimed one looks usable */ 
+       /* Second, look at endpoints until an unclaimed one looks usable */
        list_for_each_entry (ep, &gadget->ep_list, ep_list) {
                if (ep_matches (gadget, ep, desc))
                        return ep;
@@ -295,7 +295,7 @@ struct usb_ep * __init usb_ep_autoconfig (
  * state such as ep->driver_data and the record of assigned endpoints
  * used by usb_ep_autoconfig().
  */
-void __init usb_ep_autoconfig_reset (struct usb_gadget *gadget)
+void __devinit usb_ep_autoconfig_reset (struct usb_gadget *gadget)
 {
        struct usb_ep   *ep;
 
index 8320fcef04256f642cfa3830bfe8ba20043dcd9d..4fe1bec1c25559127e0570cb9ad60e65cf986869 100644 (file)
@@ -2131,7 +2131,7 @@ eth_req_free (struct usb_ep *ep, struct usb_request *req)
 }
 
 
-static void __exit
+static void /* __init_or_exit */
 eth_unbind (struct usb_gadget *gadget)
 {
        struct eth_dev          *dev = get_gadget_data (gadget);
@@ -2158,7 +2158,7 @@ eth_unbind (struct usb_gadget *gadget)
        set_gadget_data (gadget, NULL);
 }
 
-static u8 __init nibble (unsigned char c)
+static u8 __devinit nibble (unsigned char c)
 {
        if (likely (isdigit (c)))
                return c - '0';
@@ -2168,7 +2168,7 @@ static u8 __init nibble (unsigned char c)
        return 0;
 }
 
-static int __init get_ether_addr(const char *str, u8 *dev_addr)
+static int __devinit get_ether_addr(const char *str, u8 *dev_addr)
 {
        if (str) {
                unsigned        i;
@@ -2189,7 +2189,7 @@ static int __init get_ether_addr(const char *str, u8 *dev_addr)
        return 1;
 }
 
-static int __init
+static int __devinit
 eth_bind (struct usb_gadget *gadget)
 {
        struct eth_dev          *dev;
index b1a9cf06f3e67efe3f0baf87d7dd834d265aaa8d..8d7f1e84cd7b048eadc36df840c383ff7c7bfab8 100644 (file)
@@ -3691,7 +3691,7 @@ static void lun_release(struct device *dev)
        kref_put(&fsg->ref, fsg_release);
 }
 
-static void __exit fsg_unbind(struct usb_gadget *gadget)
+static void /* __init_or_exit */ fsg_unbind(struct usb_gadget *gadget)
 {
        struct fsg_dev          *fsg = get_gadget_data(gadget);
        int                     i;
index 354670d123080c4f244e387409feeb8e0f847cb2..408c3380d60203254b510c43a728da6214a42c7c 100644 (file)
@@ -1398,7 +1398,7 @@ static struct proc_dir_entry *rndis_connect_state [RNDIS_MAX_CONFIGS];
 #endif /* CONFIG_USB_GADGET_DEBUG_FILES */
 
 
-int __init rndis_init (void)
+int __devinit rndis_init (void)
 {
        u8 i;
 
index 2956608be751f70095bfb8ff8d2890b05060ecee..4c3c7259f019bd072c3d205db4d563157b6a576c 100644 (file)
@@ -264,7 +264,7 @@ int  rndis_signal_disconnect (int configNr);
 int  rndis_state (int configNr);
 extern void rndis_set_host_mac (int configNr, const u8 *addr);
 
-int __init rndis_init (void);
+int __devinit rndis_init (void);
 void rndis_exit (void);
 
 #endif  /* _LINUX_RNDIS_H */
index 30d7664d449d7d34340efbd06813461f517d4fa0..e762aa19ab0a1c9fef4a87a105b0221b95e3ddad 100644 (file)
@@ -1473,7 +1473,7 @@ autoconf_fail:
  * Called on module unload.  Frees the control request and device
  * structure.
  */
-static void __exit gs_unbind(struct usb_gadget *gadget)
+static void /* __init_or_exit */ gs_unbind(struct usb_gadget *gadget)
 {
        struct gs_dev *dev = get_gadget_data(gadget);
 
index 3a08a7ab4ce062b83039b98b94c121a955b4dc60..b7018ee487ea51fbe60ed42455410a4cb40feeaf 100644 (file)
@@ -1121,7 +1121,7 @@ zero_autoresume (unsigned long _dev)
 
 /*-------------------------------------------------------------------------*/
 
-static void __exit
+static void /* __init_or_exit */
 zero_unbind (struct usb_gadget *gadget)
 {
        struct zero_dev         *dev = get_gadget_data (gadget);
index d66867aa527e5630144cd879d40717fe68778a62..26ed757d22a66139ea500eaddc1130f4eeb2baf4 100644 (file)
@@ -41,8 +41,6 @@
 #endif
 #define USBH_DISABLE      (USB_MCFG_EBMEN | USB_MCFG_EMEMEN)
 
-#endif                         /* Au1200 */
-
 extern int usb_disabled(void);
 
 /*-------------------------------------------------------------------------*/
@@ -107,9 +105,9 @@ int usb_ehci_au1xxx_probe(const struct hc_driver *driver,
 
        /* Au1200 AB USB does not support coherent memory */
        if (!(read_c0_prid() & 0xff)) {
-               pr_info("%s: this is chip revision AB!\n", dev->dev.name);
+               pr_info("%s: this is chip revision AB!\n", dev->name);
                pr_info("%s: update your board or re-configure the kernel\n",
-                       dev->dev.name);
+                       dev->name);
                return -ENODEV;
        }
 #endif
@@ -228,9 +226,8 @@ static const struct hc_driver ehci_au1xxx_hc_driver = {
 
 /*-------------------------------------------------------------------------*/
 
-static int ehci_hcd_au1xxx_drv_probe(struct device *dev)
+static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
        struct usb_hcd *hcd = NULL;
        int ret;
 
@@ -243,10 +240,9 @@ static int ehci_hcd_au1xxx_drv_probe(struct device *dev)
        return ret;
 }
 
-static int ehci_hcd_au1xxx_drv_remove(struct device *dev)
+static int ehci_hcd_au1xxx_drv_remove(struct platform_device *pdev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       struct usb_hcd *hcd = dev_get_drvdata(dev);
+       struct usb_hcd *hcd = platform_get_drvdata(pdev);
 
        usb_ehci_au1xxx_remove(hcd, pdev);
        return 0;
@@ -269,12 +265,13 @@ static int ehci_hcd_au1xxx_drv_resume(struct device *dev)
 }
 */
 MODULE_ALIAS("au1xxx-ehci");
-/* FIXME use "struct platform_driver" */
-static struct device_driver ehci_hcd_au1xxx_driver = {
-       .name = "au1xxx-ehci",
-       .bus = &platform_bus_type,
+static struct platform_driver ehci_hcd_au1xxx_driver = {
        .probe = ehci_hcd_au1xxx_drv_probe,
        .remove = ehci_hcd_au1xxx_drv_remove,
        /*.suspend      = ehci_hcd_au1xxx_drv_suspend, */
        /*.resume       = ehci_hcd_au1xxx_drv_resume, */
+       .driver = {
+               .name = "au1xxx-ehci",
+               .bus = &platform_bus_type
+       }
 };
index cee6f538de0a2760abc086edbe5eb549003fd5d2..85b0b4ad4c16ec58de1ebf8016ad25f6b3829e1a 100644 (file)
@@ -625,10 +625,11 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs)
                        writel (status | CMD_RUN, &ehci->regs->command);
 
                while (i--) {
-                       status = readl (&ehci->regs->port_status [i]);
-                       if (status & PORT_OWNER)
+                       int pstatus = readl (&ehci->regs->port_status [i]);
+
+                       if (pstatus & PORT_OWNER)
                                continue;
-                       if (!(status & PORT_RESUME)
+                       if (!(pstatus & PORT_RESUME)
                                        || ehci->reset_done [i] != 0)
                                continue;
 
index 689261e44018e128566569498556687ce68a2360..822914e2f43bbbe80a31616da47f40d3dfc06a4a 100644 (file)
@@ -101,13 +101,16 @@ static void au1xxx_start_ohc(struct platform_device *dev)
 
 #endif  /* Au1200 */
 
+#ifndef CONFIG_SOC_AU1200
        /* wait for reset complete (read register twice; see au1500 errata) */
        while (au_readl(USB_HOST_CONFIG),
                !(au_readl(USB_HOST_CONFIG) & USBH_ENABLE_RD))
+#endif
                udelay(1000);
 
        printk(KERN_DEBUG __FILE__
        ": Clock to USB host has been enabled \n");
+#endif
 }
 
 static void au1xxx_stop_ohc(struct platform_device *dev)
@@ -157,9 +160,9 @@ static int usb_ohci_au1xxx_probe(const struct hc_driver *driver,
        /* Au1200 AB USB does not support coherent memory */
        if (!(read_c0_prid() & 0xff)) {
                pr_info("%s: this is chip revision AB !!\n",
-                       dev->dev.name);
+                       dev->name);
                pr_info("%s: update your board or re-configure the kernel\n",
-                       dev->dev.name);
+                       dev->name);
                return -ENODEV;
        }
 #endif
diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c
new file mode 100644 (file)
index 0000000..6531c4d
--- /dev/null
@@ -0,0 +1,225 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ * (C) Copyright 2002 Hewlett-Packard Company
+ *
+ * Bus Glue for ep93xx.
+ *
+ * Written by Christopher Hoover <ch@hpl.hp.com>
+ * Based on fragments of previous driver by Russell King et al.
+ *
+ * Modified for LH7A404 from ohci-sa1111.c
+ *  by Durgesh Pattamatta <pattamattad@sharpsec.com>
+ *
+ * Modified for pxa27x from ohci-lh7a404.c
+ *  by Nick Bane <nick@cecomputing.co.uk> 26-8-2004
+ *
+ * Modified for ep93xx from ohci-pxa27x.c
+ *  by Lennert Buytenhek <buytenh@wantstofly.org> 28-2-2006
+ *  Based on an earlier driver by Ray Lehtiniemi
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include <linux/clk.h>
+#include <linux/device.h>
+#include <linux/signal.h>
+#include <linux/platform_device.h>
+
+#include <asm/mach-types.h>
+#include <asm/hardware.h>
+
+static struct clk *usb_host_clock;
+
+static void ep93xx_start_hc(struct device *dev)
+{
+       clk_enable(usb_host_clock);
+}
+
+static void ep93xx_stop_hc(struct device *dev)
+{
+       clk_disable(usb_host_clock);
+}
+
+static int usb_hcd_ep93xx_probe(const struct hc_driver *driver,
+                        struct platform_device *pdev)
+{
+       int retval;
+       struct usb_hcd *hcd;
+
+       if (pdev->resource[1].flags != IORESOURCE_IRQ) {
+               pr_debug("resource[1] is not IORESOURCE_IRQ");
+               return -ENOMEM;
+       }
+
+       hcd = usb_create_hcd(driver, &pdev->dev, "ep93xx");
+       if (hcd == NULL)
+               return -ENOMEM;
+
+       hcd->rsrc_start = pdev->resource[0].start;
+       hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1;
+       if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
+               usb_put_hcd(hcd);
+               retval = -EBUSY;
+               goto err1;
+       }
+
+       hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
+       if (hcd->regs == NULL) {
+               pr_debug("ioremap failed");
+               retval = -ENOMEM;
+               goto err2;
+       }
+
+       usb_host_clock = clk_get(&pdev->dev, "usb_host");
+       ep93xx_start_hc(&pdev->dev);
+
+       ohci_hcd_init(hcd_to_ohci(hcd));
+
+       retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT);
+       if (retval == 0)
+               return retval;
+
+       ep93xx_stop_hc(&pdev->dev);
+       iounmap(hcd->regs);
+err2:
+       release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+err1:
+       usb_put_hcd(hcd);
+
+       return retval;
+}
+
+static void usb_hcd_ep93xx_remove(struct usb_hcd *hcd,
+                       struct platform_device *pdev)
+{
+       usb_remove_hcd(hcd);
+       ep93xx_stop_hc(&pdev->dev);
+       clk_put(usb_host_clock);
+       iounmap(hcd->regs);
+       release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+       usb_put_hcd(hcd);
+}
+
+static int __devinit ohci_ep93xx_start(struct usb_hcd *hcd)
+{
+       struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+       int ret;
+
+       if ((ret = ohci_init(ohci)) < 0)
+               return ret;
+
+       if ((ret = ohci_run(ohci)) < 0) {
+               err("can't start %s", hcd->self.bus_name);
+               ohci_stop(hcd);
+               return ret;
+       }
+
+       return 0;
+}
+
+static struct hc_driver ohci_ep93xx_hc_driver = {
+       .description            = hcd_name,
+       .product_desc           = "EP93xx OHCI",
+       .hcd_priv_size          = sizeof(struct ohci_hcd),
+       .irq                    = ohci_irq,
+       .flags                  = HCD_USB11 | HCD_MEMORY,
+       .start                  = ohci_ep93xx_start,
+       .stop                   = ohci_stop,
+       .urb_enqueue            = ohci_urb_enqueue,
+       .urb_dequeue            = ohci_urb_dequeue,
+       .endpoint_disable       = ohci_endpoint_disable,
+       .get_frame_number       = ohci_get_frame,
+       .hub_status_data        = ohci_hub_status_data,
+       .hub_control            = ohci_hub_control,
+#ifdef CONFIG_PM
+       .bus_suspend            = ohci_bus_suspend,
+       .bus_resume             = ohci_bus_resume,
+#endif
+       .start_port_reset       = ohci_start_port_reset,
+};
+
+extern int usb_disabled(void);
+
+static int ohci_hcd_ep93xx_drv_probe(struct platform_device *pdev)
+{
+       int ret;
+
+       ret = -ENODEV;
+       if (!usb_disabled())
+               ret = usb_hcd_ep93xx_probe(&ohci_ep93xx_hc_driver, pdev);
+
+       return ret;
+}
+
+static int ohci_hcd_ep93xx_drv_remove(struct platform_device *pdev)
+{
+       struct usb_hcd *hcd = platform_get_drvdata(pdev);
+
+       usb_hcd_ep93xx_remove(hcd, pdev);
+
+       return 0;
+}
+
+#ifdef CONFIG_PM
+static int ohci_hcd_ep93xx_drv_suspend(struct platform_device *pdev, pm_message_t state)
+{
+       struct usb_hcd *hcd = platform_get_drvdata(pdev);
+       struct ochi_hcd *ohci = hcd_to_ohci(hcd);
+
+       if (time_before(jiffies, ohci->next_statechange))
+               msleep(5);
+       ohci->next_statechange = jiffies;
+
+       ep93xx_stop_hc(&pdev->dev);
+       hcd->state = HC_STATE_SUSPENDED;
+       pdev->dev.power.power_state = PMSG_SUSPEND;
+
+       return 0;
+}
+
+static int ohci_hcd_ep93xx_drv_resume(struct platform_device *pdev)
+{
+       struct usb_hcd *hcd = platform_get_drvdata(pdev);
+       struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+       int status;
+
+       if (time_before(jiffies, ohci->next_statechange))
+               msleep(5);
+       ohci->next_statechange = jiffies;
+
+       ep93xx_start_hc(&pdev->dev);
+       pdev->dev.power.power_state = PMSG_ON;
+       usb_hcd_resume_root_hub(hcd);
+
+       return 0;
+}
+#endif
+
+
+static struct platform_driver ohci_hcd_ep93xx_driver = {
+       .probe          = ohci_hcd_ep93xx_drv_probe,
+       .remove         = ohci_hcd_ep93xx_drv_remove,
+#ifdef CONFIG_PM
+       .suspend        = ohci_hcd_ep93xx_drv_suspend,
+       .resume         = ohci_hcd_ep93xx_drv_resume,
+#endif
+       .driver         = {
+               .name   = "ep93xx-ohci",
+       },
+};
+
+static int __init ohci_hcd_ep93xx_init(void)
+{
+       return platform_driver_register(&ohci_hcd_ep93xx_driver);
+}
+
+static void __exit ohci_hcd_ep93xx_cleanup(void)
+{
+       platform_driver_unregister(&ohci_hcd_ep93xx_driver);
+}
+
+module_init(ohci_hcd_ep93xx_init);
+module_exit(ohci_hcd_ep93xx_cleanup);
index 8fb842ed5f6e1ef0f58d8e3d0a4b953f94fdee33..afef5ac35b4af79d3137532898930a8bbea40c86 100644 (file)
@@ -901,6 +901,10 @@ MODULE_LICENSE ("GPL");
 #include "ohci-pxa27x.c"
 #endif
 
+#ifdef CONFIG_ARCH_EP93XX
+#include "ohci-ep93xx.c"
+#endif
+
 #ifdef CONFIG_SOC_AU1X00
 #include "ohci-au1xxx.c"
 #endif
@@ -919,6 +923,7 @@ MODULE_LICENSE ("GPL");
       || defined(CONFIG_ARCH_OMAP) \
       || defined (CONFIG_ARCH_LH7A404) \
       || defined (CONFIG_PXA27x) \
+      || defined (CONFIG_ARCH_EP93XX) \
       || defined (CONFIG_SOC_AU1X00) \
       || defined (CONFIG_USB_OHCI_HCD_PPC_SOC) \
       || defined (CONFIG_ARCH_AT91RM9200) \
index 0bb972b58336c5f01ad1fbe18f99a3dafb640a82..5b0a23fd798bb46294885432878e4c6429a660ed 100644 (file)
@@ -581,14 +581,14 @@ static int ohci_hub_control (
                break;
        case GetHubStatus:
                temp = roothub_status (ohci) & ~(RH_HS_CRWE | RH_HS_DRWE);
-               *(__le32 *) buf = cpu_to_le32 (temp);
+               put_unaligned(cpu_to_le32 (temp), (__le32 *) buf);
                break;
        case GetPortStatus:
                if (!wIndex || wIndex > ports)
                        goto error;
                wIndex--;
                temp = roothub_portstatus (ohci, wIndex);
-               *(__le32 *) buf = cpu_to_le32 (temp);
+               put_unaligned(cpu_to_le32 (temp), (__le32 *) buf);
 
 #ifndef        OHCI_VERBOSE_DEBUG
        if (*(u16*)(buf+2))     /* only if wPortChange is interesting */
index dff60568b4a147cb2e1875c4659bf8cb3a2db164..20861650905e63606955056b5169581a0b92463c 100644 (file)
@@ -167,8 +167,6 @@ static int __devinit mmio_resource_enabled(struct pci_dev *pdev, int idx)
 static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
 {
        void __iomem *base;
-       int wait_time;
-       u32 control;
 
        if (!mmio_resource_enabled(pdev, 0))
                return;
@@ -179,9 +177,10 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
 
 /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */
 #ifndef __hppa__
-       control = readl(base + OHCI_CONTROL);
+{
+       u32 control = readl(base + OHCI_CONTROL);
        if (control & OHCI_CTRL_IR) {
-               wait_time = 500; /* arbitrary; 5 seconds */
+               int wait_time = 500; /* arbitrary; 5 seconds */
                writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
                writel(OHCI_OCR, base + OHCI_CMDSTATUS);
                while (wait_time > 0 &&
@@ -198,6 +197,7 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
                /* reset controller, preserving RWC */
                writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL);
        }
+}
 #endif
 
        /*
index b9fb9687f9266f287addecae037dd5045b7034a6..8ea9c915fbf9722eea1e6b74a6ba3c4384d5801b 100644 (file)
@@ -1507,6 +1507,9 @@ void hid_init_reports(struct hid_device *hid)
 #define USB_DEVICE_ID_4_PHIDGETSERVO_20        0x8104
 #define USB_DEVICE_ID_DUAL_USB_JOYPAD   0x8866
 
+#define USB_VENDOR_ID_WISEGROUP_LTD    0x6677
+#define USB_DEVICE_ID_SMARTJOY_DUAL_PLUS 0x8802
+
 #define USB_VENDOR_ID_CODEMERCS                0x07c0
 #define USB_DEVICE_ID_CODEMERCS_IOW40  0x1500
 #define USB_DEVICE_ID_CODEMERCS_IOW24  0x1501
@@ -1670,6 +1673,7 @@ static const struct hid_blacklist {
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
+       { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
 
        { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },
        { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 },
index daa486dde8cfe665ef1bed16d2dae0ea1ed07f1c..88928a4be8057e9c286218ecacfecb17334db45e 100644 (file)
@@ -88,19 +88,19 @@ config USB_LED
          To compile this driver as a module, choose M here: the
          module will be called usbled.
 
-config USB_CY7C63
+config USB_CYPRESS_CY7C63
        tristate "Cypress CY7C63xxx USB driver support"
        depends on USB
        help
          Say Y here if you want to connect a Cypress CY7C63xxx
-         micro controller to your computer's USB port. This driver
-         supports the pre-programmed devices (incl. firmware) by
-         AK Modul-Bus Computer GmbH.
+         micro controller to your computer's USB port. Currently this
+         driver supports the pre-programmed devices (incl. firmware)
+         by AK Modul-Bus Computer GmbH.
 
          Please see: http://www.ak-modul-bus.de/stat/mikrocontroller.html
 
          To compile this driver as a module, choose M here: the
-         module will be called cy7c63.
+         module will be called cypress_cy7c63.
 
 config USB_CYTHERM
        tristate "Cypress USB thermometer driver support"
index f25a972272973b563ccc5677171e45d06d5467df..2927260c5812eed54c2ad21cb001762430d3f4cf 100644 (file)
@@ -4,7 +4,7 @@
 #
 
 obj-$(CONFIG_USB_AUERSWALD)    += auerswald.o
-obj-$(CONFIG_USB_CY7C63)       += cy7c63.o
+obj-$(CONFIG_USB_CYPRESS_CY7C63)+= cypress_cy7c63.o
 obj-$(CONFIG_USB_CYTHERM)      += cytherm.o
 obj-$(CONFIG_USB_EMI26)                += emi26.o
 obj-$(CONFIG_USB_EMI62)                += emi62.o
diff --git a/drivers/usb/misc/cy7c63.c b/drivers/usb/misc/cy7c63.c
deleted file mode 100644 (file)
index 8a1c10b..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
-* cy7c63.c
-*
-* Copyright (c) 2006 Oliver Bock (bock@fh-wolfenbuettel.de)
-*
-*      This driver is based on the Cypress Thermometer USB Driver by
-*      Marcus Maul and the 2.0 version of Greg Kroah-Hartman's
-*      USB Skeleton driver.
-*
-*      Is is a generic driver for the Cypress CY7C63000 family.
-*      For the time being it enables you to toggle the single I/O ports
-*      of the device.
-*
-*      Supported vendors:      AK Modul-Bus Computer GmbH
-*      Supported devices:      CY7C63001A-PC (to be continued...)
-*      Supported functions:    Read/Write Ports (to be continued...)
-*
-*      Chipsets families:      CY7C63000, CY7C63001, CY7C63100, CY7C63101
-*
-*
-*      This program is free software; you can redistribute it and/or
-*      modify it under the terms of the GNU General Public License as
-*      published by the Free Software Foundation, version 2.
-*/
-
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/usb.h>
-
-#define DRIVER_AUTHOR          "Oliver Bock (bock@fh-wolfenbuettel.de)"
-#define DRIVER_DESC            "Cypress CY7C63xxx USB driver"
-
-#define CY7C63_VENDOR_ID       0xa2c
-#define CY7C63_PRODUCT_ID      0x8
-
-#define CY7C63_READ_PORT       0x4
-#define CY7C63_WRITE_PORT      0x5
-#define CY7C63_READ_RAM                0x2
-#define CY7C63_WRITE_RAM       0x3
-#define CY7C63_READ_ROM                0x1
-
-#define CY7C63_READ_PORT_ID0   0
-#define CY7C63_WRITE_PORT_ID0  0
-#define CY7C63_READ_PORT_ID1   0x2
-#define CY7C63_WRITE_PORT_ID1  1
-
-#define CY7C63_MAX_REQSIZE     8
-
-
-/* table of devices that work with this driver */
-static struct usb_device_id cy7c63_table [] = {
-       { USB_DEVICE(CY7C63_VENDOR_ID, CY7C63_PRODUCT_ID) },
-       { }
-};
-MODULE_DEVICE_TABLE(usb, cy7c63_table);
-
-/* structure to hold all of our device specific stuff */
-struct cy7c63 {
-       struct usb_device *     udev;
-       char                    port0;
-       char                    port1;
-};
-
-/* used to send usb control messages to device */
-int vendor_command(struct cy7c63 *dev, unsigned char request,
-                        unsigned char address, unsigned char data) {
-
-       int retval = 0;
-       unsigned int pipe;
-       unsigned char *iobuf;
-
-       /* allocate some memory for the i/o buffer*/
-       iobuf = kzalloc(CY7C63_MAX_REQSIZE, GFP_KERNEL);
-       if (!iobuf) {
-               dev_err(&dev->udev->dev, "Out of memory!\n");
-               retval = -ENOMEM;
-               goto error;
-       }
-
-       dev_dbg(&dev->udev->dev, "Sending usb_control_msg (data: %d)\n", data);
-
-       /* prepare usb control message and send it upstream */
-       pipe = usb_rcvctrlpipe(dev->udev, 0);
-       retval = usb_control_msg(dev->udev, pipe, request,
-                               USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER,
-                               address, data, iobuf, CY7C63_MAX_REQSIZE,
-                               USB_CTRL_GET_TIMEOUT);
-
-       /* store returned data (more READs to be added!) */
-       switch (request) {
-               case CY7C63_READ_PORT:
-                       if (address == CY7C63_READ_PORT_ID0) {
-                               dev->port0 = iobuf[1];
-                               dev_dbg(&dev->udev->dev,
-                                       "READ_PORT0 returned: %d\n",dev->port0);
-                       }
-                       else if (address == CY7C63_READ_PORT_ID1) {
-                               dev->port1 = iobuf[1];
-                               dev_dbg(&dev->udev->dev,
-                                       "READ_PORT1 returned: %d\n",dev->port1);
-                       }
-                       break;
-       }
-
-       kfree(iobuf);
-error:
-       return retval;
-}
-
-#define get_set_port(num,read_id,write_id) \
-static ssize_t set_port##num(struct device *dev, struct device_attribute *attr,        \
-                                       const char *buf, size_t count) {        \
-                                                                               \
-       int value;                                                              \
-       int result = 0;                                                         \
-                                                                               \
-       struct usb_interface *intf = to_usb_interface(dev);                     \
-       struct cy7c63 *cyp = usb_get_intfdata(intf);                            \
-                                                                               \
-       dev_dbg(&cyp->udev->dev, "WRITE_PORT%d called\n", num);                 \
-                                                                               \
-       /* validate input data */                                               \
-       if (sscanf(buf, "%d", &value) < 1) {                                    \
-               result = -EINVAL;                                               \
-               goto error;                                                     \
-       }                                                                       \
-       if (value>255 || value<0) {                                             \
-               result = -EINVAL;                                               \
-               goto error;                                                     \
-       }                                                                       \
-                                                                               \
-       result = vendor_command(cyp, CY7C63_WRITE_PORT, write_id,               \
-                                        (unsigned char)value);                 \
-                                                                               \
-       dev_dbg(&cyp->udev->dev, "Result of vendor_command: %d\n\n",result);    \
-error:                                                                         \
-       return result < 0 ? result : count;                                     \
-}                                                                              \
-                                                                               \
-static ssize_t get_port##num(struct device *dev,                               \
-                                struct device_attribute *attr, char *buf) {    \
-                                                                               \
-       int result = 0;                                                         \
-                                                                               \
-       struct usb_interface *intf = to_usb_interface(dev);                     \
-       struct cy7c63 *cyp = usb_get_intfdata(intf);                            \
-                                                                               \
-       dev_dbg(&cyp->udev->dev, "READ_PORT%d called\n", num);                  \
-                                                                               \
-       result = vendor_command(cyp, CY7C63_READ_PORT, read_id, 0);             \
-                                                                               \
-       dev_dbg(&cyp->udev->dev, "Result of vendor_command: %d\n\n", result);   \
-                                                                               \
-       return sprintf(buf, "%d", cyp->port##num);                              \
-}                                                                              \
-static DEVICE_ATTR(port##num, S_IWUGO | S_IRUGO, get_port##num, set_port##num);
-
-get_set_port(0, CY7C63_READ_PORT_ID0, CY7C63_WRITE_PORT_ID0);
-get_set_port(1, CY7C63_READ_PORT_ID1, CY7C63_WRITE_PORT_ID1);
-
-static int cy7c63_probe(struct usb_interface *interface,
-                       const struct usb_device_id *id) {
-
-       struct cy7c63 *dev = NULL;
-       int retval = -ENOMEM;
-
-       /* allocate memory for our device state and initialize it */
-       dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-       if (dev == NULL) {
-               dev_err(&dev->udev->dev, "Out of memory!\n");
-               goto error;
-       }
-
-       dev->udev = usb_get_dev(interface_to_usbdev(interface));
-
-       /* save our data pointer in this interface device */
-       usb_set_intfdata(interface, dev);
-
-       /* create device attribute files */
-       device_create_file(&interface->dev, &dev_attr_port0);
-       device_create_file(&interface->dev, &dev_attr_port1);
-
-       /* let the user know what node this device is now attached to */
-       dev_info(&interface->dev,
-               "Cypress CY7C63xxx device now attached\n");
-
-       retval = 0;
-error:
-       return retval;
-}
-
-static void cy7c63_disconnect(struct usb_interface *interface) {
-
-       struct cy7c63 *dev;
-
-       dev = usb_get_intfdata(interface);
-       usb_set_intfdata(interface, NULL);
-
-       /* remove device attribute files */
-       device_remove_file(&interface->dev, &dev_attr_port0);
-       device_remove_file(&interface->dev, &dev_attr_port1);
-
-       usb_put_dev(dev->udev);
-
-       dev_info(&interface->dev,
-               "Cypress CY7C63xxx device now disconnected\n");
-
-       kfree(dev);
-}
-
-static struct usb_driver cy7c63_driver = {
-       .name = "cy7c63",
-       .probe = cy7c63_probe,
-       .disconnect = cy7c63_disconnect,
-       .id_table = cy7c63_table,
-};
-
-static int __init cy7c63_init(void) {
-
-       int result;
-
-       /* register this driver with the USB subsystem */
-       result = usb_register(&cy7c63_driver);
-       if (result) {
-               err("Function usb_register failed! Error number: %d\n", result);
-       }
-
-       return result;
-}
-
-static void __exit cy7c63_exit(void) {
-
-       /* deregister this driver with the USB subsystem */
-       usb_deregister(&cy7c63_driver);
-}
-
-module_init(cy7c63_init);
-module_exit(cy7c63_exit);
-
-MODULE_AUTHOR(DRIVER_AUTHOR);
-MODULE_DESCRIPTION(DRIVER_DESC);
-
-MODULE_LICENSE("GPL");
diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c
new file mode 100644 (file)
index 0000000..e091d32
--- /dev/null
@@ -0,0 +1,279 @@
+/*
+* cypress_cy7c63.c
+*
+* Copyright (c) 2006 Oliver Bock (o.bock@fh-wolfenbuettel.de)
+*
+*      This driver is based on the Cypress USB Driver by Marcus Maul
+*      (cyport) and the 2.0 version of Greg Kroah-Hartman's
+*      USB Skeleton driver.
+*
+*      This is a generic driver for the Cypress CY7C63xxx family.
+*      For the time being it enables you to read from and write to
+*      the single I/O ports of the device.
+*
+*      Supported vendors:      AK Modul-Bus Computer GmbH
+*      Supported devices:      CY7C63001A-PC (to be continued...)
+*      Supported functions:    Read/Write Ports (to be continued...)
+*
+*
+*      This program is free software; you can redistribute it and/or
+*      modify it under the terms of the GNU General Public License as
+*      published by the Free Software Foundation, version 2.
+*/
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/usb.h>
+
+#define DRIVER_AUTHOR          "Oliver Bock (o.bock@fh-wolfenbuettel.de)"
+#define DRIVER_DESC            "Cypress CY7C63xxx USB driver"
+
+#define CYPRESS_VENDOR_ID      0xa2c
+#define CYPRESS_PRODUCT_ID     0x8
+
+#define CYPRESS_READ_PORT      0x4
+#define CYPRESS_WRITE_PORT     0x5
+
+#define CYPRESS_READ_RAM       0x2
+#define CYPRESS_WRITE_RAM      0x3
+#define CYPRESS_READ_ROM       0x1
+
+#define CYPRESS_READ_PORT_ID0  0
+#define CYPRESS_WRITE_PORT_ID0 0
+#define CYPRESS_READ_PORT_ID1  0x2
+#define CYPRESS_WRITE_PORT_ID1 1
+
+#define CYPRESS_MAX_REQSIZE    8
+
+
+/* table of devices that work with this driver */
+static struct usb_device_id cypress_table [] = {
+       { USB_DEVICE(CYPRESS_VENDOR_ID, CYPRESS_PRODUCT_ID) },
+       { }
+};
+MODULE_DEVICE_TABLE(usb, cypress_table);
+
+/* structure to hold all of our device specific stuff */
+struct cypress {
+       struct usb_device *     udev;
+       unsigned char           port[2];
+};
+
+/* used to send usb control messages to device */
+static int vendor_command(struct cypress *dev, unsigned char request,
+                         unsigned char address, unsigned char data)
+{
+       int retval = 0;
+       unsigned int pipe;
+       unsigned char *iobuf;
+
+       /* allocate some memory for the i/o buffer*/
+       iobuf = kzalloc(CYPRESS_MAX_REQSIZE, GFP_KERNEL);
+       if (!iobuf) {
+               dev_err(&dev->udev->dev, "Out of memory!\n");
+               retval = -ENOMEM;
+               goto error;
+       }
+
+       dev_dbg(&dev->udev->dev, "Sending usb_control_msg (data: %d)\n", data);
+
+       /* prepare usb control message and send it upstream */
+       pipe = usb_rcvctrlpipe(dev->udev, 0);
+       retval = usb_control_msg(dev->udev, pipe, request,
+                                USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER,
+                                address, data, iobuf, CYPRESS_MAX_REQSIZE,
+                                USB_CTRL_GET_TIMEOUT);
+
+       /* store returned data (more READs to be added) */
+       switch (request) {
+               case CYPRESS_READ_PORT:
+                       if (address == CYPRESS_READ_PORT_ID0) {
+                               dev->port[0] = iobuf[1];
+                               dev_dbg(&dev->udev->dev,
+                                       "READ_PORT0 returned: %d\n",
+                                       dev->port[0]);
+                       }
+                       else if (address == CYPRESS_READ_PORT_ID1) {
+                               dev->port[1] = iobuf[1];
+                               dev_dbg(&dev->udev->dev,
+                                       "READ_PORT1 returned: %d\n",
+                                       dev->port[1]);
+                       }
+                       break;
+       }
+
+       kfree(iobuf);
+error:
+       return retval;
+}
+
+/* write port value */
+static ssize_t write_port(struct device *dev, struct device_attribute *attr,
+                         const char *buf, size_t count,
+                         int port_num, int write_id)
+{
+       int value = -1;
+       int result = 0;
+
+       struct usb_interface *intf = to_usb_interface(dev);
+       struct cypress *cyp = usb_get_intfdata(intf);
+
+       dev_dbg(&cyp->udev->dev, "WRITE_PORT%d called\n", port_num);
+
+       /* validate input data */
+       if (sscanf(buf, "%d", &value) < 1) {
+               result = -EINVAL;
+               goto error;
+       }
+       if (value < 0 || value > 255) {
+               result = -EINVAL;
+               goto error;
+       }
+
+       result = vendor_command(cyp, CYPRESS_WRITE_PORT, write_id,
+                               (unsigned char)value);
+
+       dev_dbg(&cyp->udev->dev, "Result of vendor_command: %d\n\n", result);
+error:
+       return result < 0 ? result : count;
+}
+
+/* attribute callback handler (write) */
+static ssize_t set_port0_handler(struct device *dev,
+                                struct device_attribute *attr,
+                                const char *buf, size_t count)
+{
+       return write_port(dev, attr, buf, count, 0, CYPRESS_WRITE_PORT_ID0);
+}
+
+/* attribute callback handler (write) */
+static ssize_t set_port1_handler(struct device *dev,
+                                struct device_attribute *attr,
+                                const char *buf, size_t count)
+{
+       return write_port(dev, attr, buf, count, 1, CYPRESS_WRITE_PORT_ID1);
+}
+
+/* read port value */
+static ssize_t read_port(struct device *dev, struct device_attribute *attr,
+                        char *buf, int port_num, int read_id)
+{
+       int result = 0;
+
+       struct usb_interface *intf = to_usb_interface(dev);
+       struct cypress *cyp = usb_get_intfdata(intf);
+
+       dev_dbg(&cyp->udev->dev, "READ_PORT%d called\n", port_num);
+
+       result = vendor_command(cyp, CYPRESS_READ_PORT, read_id, 0);
+
+       dev_dbg(&cyp->udev->dev, "Result of vendor_command: %d\n\n", result);
+
+       return sprintf(buf, "%d", cyp->port[port_num]);
+}
+
+/* attribute callback handler (read) */
+static ssize_t get_port0_handler(struct device *dev,
+                                struct device_attribute *attr, char *buf)
+{
+       return read_port(dev, attr, buf, 0, CYPRESS_READ_PORT_ID0);
+}
+
+/* attribute callback handler (read) */
+static ssize_t get_port1_handler(struct device *dev,
+                                struct device_attribute *attr, char *buf)
+{
+       return read_port(dev, attr, buf, 1, CYPRESS_READ_PORT_ID1);
+}
+
+static DEVICE_ATTR(port0, S_IWUGO | S_IRUGO,
+                  get_port0_handler, set_port0_handler);
+
+static DEVICE_ATTR(port1, S_IWUGO | S_IRUGO,
+                  get_port1_handler, set_port1_handler);
+
+
+static int cypress_probe(struct usb_interface *interface,
+                        const struct usb_device_id *id)
+{
+       struct cypress *dev = NULL;
+       int retval = -ENOMEM;
+
+       /* allocate memory for our device state and initialize it */
+       dev = kzalloc(sizeof(*dev), GFP_KERNEL);
+       if (dev == NULL) {
+               dev_err(&dev->udev->dev, "Out of memory!\n");
+               goto error;
+       }
+
+       dev->udev = usb_get_dev(interface_to_usbdev(interface));
+
+       /* save our data pointer in this interface device */
+       usb_set_intfdata(interface, dev);
+
+       /* create device attribute files */
+       device_create_file(&interface->dev, &dev_attr_port0);
+       device_create_file(&interface->dev, &dev_attr_port1);
+
+       /* let the user know that the device is now attached */
+       dev_info(&interface->dev,
+                "Cypress CY7C63xxx device now attached\n");
+
+       retval = 0;
+error:
+       return retval;
+}
+
+static void cypress_disconnect(struct usb_interface *interface)
+{
+       struct cypress *dev;
+
+       dev = usb_get_intfdata(interface);
+       usb_set_intfdata(interface, NULL);
+
+       /* remove device attribute files */
+       device_remove_file(&interface->dev, &dev_attr_port0);
+       device_remove_file(&interface->dev, &dev_attr_port1);
+
+       usb_put_dev(dev->udev);
+
+       dev_info(&interface->dev,
+                "Cypress CY7C63xxx device now disconnected\n");
+
+       kfree(dev);
+}
+
+static struct usb_driver cypress_driver = {
+       .name = "cypress_cy7c63",
+       .probe = cypress_probe,
+       .disconnect = cypress_disconnect,
+       .id_table = cypress_table,
+};
+
+static int __init cypress_init(void)
+{
+       int result;
+
+       /* register this driver with the USB subsystem */
+       result = usb_register(&cypress_driver);
+       if (result) {
+               err("Function usb_register failed! Error number: %d\n", result);
+       }
+
+       return result;
+}
+
+static void __exit cypress_exit(void)
+{
+       /* deregister this driver with the USB subsystem */
+       usb_deregister(&cypress_driver);
+}
+
+module_init(cypress_init);
+module_exit(cypress_exit);
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+
+MODULE_LICENSE("GPL");
index c82c402285a0d42ced463dcd87084ca5f4d540cf..e095772dd8e9eebc2887afc835b105d72af09d03 100644 (file)
@@ -200,10 +200,8 @@ static ssize_t lcd_write(struct file *file, const char __user * user_buffer, siz
 
        /* create a urb, and a buffer for it, and copy the data to the urb */
        urb = usb_alloc_urb(0, GFP_KERNEL);
-       if (!urb) {
-               retval = -ENOMEM;
-               goto error;
-       }
+       if (!urb)
+               return -ENOMEM;
        
        buf = usb_buffer_alloc(dev->udev, count, GFP_KERNEL, &urb->transfer_dma);
        if (!buf) {
index e02c1a30c4cd4d65d852ce010d522c05e594c256..f961a770cee2ea2a24d2ef01e39fd7d73fc99b0e 100644 (file)
@@ -64,7 +64,6 @@ struct mon_reader_text {
 };
 
 static void mon_text_ctor(void *, kmem_cache_t *, unsigned long);
-static void mon_text_dtor(void *, kmem_cache_t *, unsigned long);
 
 /*
  * mon_text_submit
@@ -268,7 +267,7 @@ static int mon_text_open(struct inode *inode, struct file *file)
            (long)rp);
        rp->e_slab = kmem_cache_create(rp->slab_name,
            sizeof(struct mon_event_text), sizeof(long), 0,
-           mon_text_ctor, mon_text_dtor);
+           mon_text_ctor, NULL);
        if (rp->e_slab == NULL) {
                rc = -ENOMEM;
                goto err_slab;
@@ -459,7 +458,3 @@ static void mon_text_ctor(void *mem, kmem_cache_t *slab, unsigned long sflags)
        memset(mem, 0xe5, sizeof(struct mon_event_text));
 }
 
-static void mon_text_dtor(void *mem, kmem_cache_t *slab, unsigned long sflags)
-{
-       ;
-}
index 718f8e2b552b008d8c5285e147eca5c364d2ba96..e5e6e4f3ef874e5128bfd52f8202e78d7d4edc54 100644 (file)
 #define        VENDOR_ID_MELCO                 0x0411
 #define VENDOR_ID_MICRONET             0x3980
 #define        VENDOR_ID_LONGSHINE             0x07b8
+#define        VENDOR_ID_ZYXEL                 0x0586
 
 #define PRODUCT_ID_RTL8150             0x8150
 #define        PRODUCT_ID_LUAKTX               0x0012
 #define        PRODUCT_ID_LCS8138TX            0x401a
 #define PRODUCT_ID_SP128AR             0x0003
+#define        PRODUCT_ID_PRESTIGE             0x401a
 
 #undef EEPROM_WRITE
 
@@ -142,6 +144,7 @@ static struct usb_device_id rtl8150_table[] = {
        {USB_DEVICE(VENDOR_ID_MELCO, PRODUCT_ID_LUAKTX)},
        {USB_DEVICE(VENDOR_ID_MICRONET, PRODUCT_ID_SP128AR)},
        {USB_DEVICE(VENDOR_ID_LONGSHINE, PRODUCT_ID_LCS8138TX)},
+       {USB_DEVICE(VENDOR_ID_ZYXEL, PRODUCT_ID_PRESTIGE)},
        {}
 };
 
index 8bd44fda5eafb18a16dab40885cefa4ae900385c..ac33bd47cfce8746ac009e8fa64927538ec68612 100644 (file)
@@ -456,6 +456,17 @@ config USB_SERIAL_SAFE_PADDED
        bool "USB Secure Encapsulated Driver - Padded"
        depends on USB_SERIAL_SAFE
 
+config USB_SERIAL_SIERRAWIRELESS
+       tristate "USB Sierra Wireless Driver"
+       depends on USB_SERIAL
+       help
+         Say M here if you want to use a Sierra Wireless device (if
+         using an PC 5220 or AC580 please use the Airprime driver
+         instead).
+
+         To compile this driver as a module, choose M here: the
+         module will be called sierra.
+
 config USB_SERIAL_TI
        tristate "USB TI 3410/5052 Serial Driver"
        depends on USB_SERIAL
index 5a0960fc9d3e3facbfce9e90a0175e0fa25e4e46..35d4acc7f1d3276d9eea7ef119ef372aaae60c0c 100644 (file)
@@ -39,6 +39,7 @@ obj-$(CONFIG_USB_SERIAL_OMNINET)              += omninet.o
 obj-$(CONFIG_USB_SERIAL_OPTION)                        += option.o
 obj-$(CONFIG_USB_SERIAL_PL2303)                        += pl2303.o
 obj-$(CONFIG_USB_SERIAL_SAFE)                  += safe_serial.o
+obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS)                += sierra.o
 obj-$(CONFIG_USB_SERIAL_TI)                    += ti_usb_3410_5052.o
 obj-$(CONFIG_USB_SERIAL_VISOR)                 += visor.o
 obj-$(CONFIG_USB_SERIAL_WHITEHEAT)             += whiteheat.o
index 94b9ba0ff8755f479192573d7971af8462cc8ecd..62082532a8b346359899b2291c59a69a3b7bcfad 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/tty.h>
 #include <linux/module.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */
index 343f6f22822043c954cdeca1915d0b746152049a..01843ef8c11edbc57dd42c729f9844566e59510a 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/tty.h>
 #include <linux/module.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x16d5, 0x6501) }, /* AirData CDMA device */
@@ -71,7 +71,7 @@ static int anydata_open(struct usb_serial_port *port, struct file *filp)
                                          port->bulk_in_endpointAddress),
                          port->read_urb->transfer_buffer,
                          port->read_urb->transfer_buffer_length,
-                         usb_serial_generic_write_bulk_callback, port);
+                         usb_serial_generic_read_bulk_callback, port);
        result = usb_submit_urb(port->read_urb, GFP_KERNEL);
        if (result)
                dev_err(&port->dev,
index 8dec796222a0ac8fe8210b125a45227dc9ead4ad..970d9ef0a7a5cce77eadc5b9d09a5ec6c2cc798f 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/tty.h>
 #include <linux/module.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 
 static int debug;
index 3faa7aa0111afa4826f2f551312fb171b243ead8..70ece9e01ce4a9372f48947889237a0e42891468 100644 (file)
@@ -74,7 +74,7 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 #include "belkin_sa.h"
 
 static int debug;
index f2d993b70c18250cf51a8e87f7dfe4670f8d900b..6542f220468f7d0e1207caeb883f8f8c06fa3a7f 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/tty.h>
 #include <linux/module.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 static int usb_serial_device_match (struct device *dev, struct device_driver *drv)
 {
index 3d456b32c3166e5e02d756b64c8564f8b713eb9e..3a9073dbfe6a40c4363f792a8534787e0495bdda 100644 (file)
 #include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/usb.h>
+#include <linux/usb/serial.h>
 
 static int debug;
 
-#include "usb-serial.h"
-
 struct usbcons_info {
        int                     magic;
        int                     break_flag;
index df0a4f98b4ae6487ede58b83eb14d17b6927a3b1..486c7411b9a7572f3e573e494d2f903cd935e342 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/moduleparam.h>
 #include <linux/usb.h>
 #include <asm/uaccess.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 /*
  * Version Information
index 49b51ab0d4cbae9f8d3a2ab5c36885885b0eb612..6286aba86fae2340beaed87c5f2a970050053939 100644 (file)
@@ -39,7 +39,7 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 #define CYBERJACK_LOCAL_BUF_SIZE 32
 
index 4ff2dfb299bd9a1281b8fb70179ecf13a76f5984..ee70fddcab6031a8f1c045da4e71c09b3c4d1f9b 100644 (file)
 #include <linux/moduleparam.h>
 #include <linux/spinlock.h>
 #include <linux/usb.h>
+#include <linux/usb/serial.h>
 #include <linux/serial.h>
 #include <linux/delay.h>
 #include <asm/uaccess.h>
 
-#include "usb-serial.h"
 #include "cypress_m8.h"
 
 
index 6953d3ef5738069aea3ab3ae35caabab0c549b0b..9b225183fc7a4ccc091b2b463a514b4a3b89baf7 100644 (file)
 #include <asm/uaccess.h>
 #include <linux/usb.h>
 #include <linux/wait.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 /* Defines */
 
index 1e2b31eeb4973fc9433d51519cd215769d4766ef..daafe405d86d628a956836c288b4bf8bd67f2c37 100644 (file)
@@ -62,7 +62,7 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 static int debug;
 
index debc3b0f96629c28c6eb9ed05f09f04215d116c5..5169c2d154abff4e3fd1dc5438a65980df1919a3 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/tty.h>
 #include <linux/module.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 /* EZ-USB Control and Status Register.  Bit 0 controls 8051 reset */
 #define CPUCS_REG    0x7F92
index 8a74b19f1283f08860c49f0a75d521eb2dfdc322..b458aedc5fb6ae541166fc8f66da7cc91f5cb22f 100644 (file)
 #include <asm/uaccess.h>
 #include <linux/usb.h>
 #include <linux/serial.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 #include "ftdi_sio.h"
 
 /*
@@ -313,6 +313,7 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },
        { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
        { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
@@ -500,6 +501,8 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(PAPOUCH_VID, PAPOUCH_TMU_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_ACG_HFDUAL_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) },
+       { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) },
        { },                                    /* Optional parameter entry */
        { }                                     /* Terminating entry */
 };
@@ -548,11 +551,17 @@ struct ftdi_private {
        spinlock_t rx_lock;     /* spinlock for receive state */
        struct work_struct rx_work;
        int rx_processed;
+       unsigned long rx_bytes;
 
        __u16 interface;        /* FT2232C port interface (0 for FT232/245) */
 
        int force_baud;         /* if non-zero, force the baud rate to this value */
        int force_rtscts;       /* if non-zero, force RTS-CTS to always be enabled */
+
+       spinlock_t tx_lock;     /* spinlock for transmit state */
+       unsigned long tx_bytes;
+       unsigned long tx_outstanding_bytes;
+       unsigned long tx_outstanding_urbs;
 };
 
 /* Used for TIOCMIWAIT */
@@ -626,6 +635,9 @@ static struct usb_serial_driver ftdi_sio_device = {
 #define HIGH 1
 #define LOW 0
 
+/* number of outstanding urbs to prevent userspace DoS from happening */
+#define URB_UPPER_LIMIT        42
+
 /*
  * ***************************************************************************
  * Utlity functions
@@ -1156,6 +1168,7 @@ static int ftdi_sio_attach (struct usb_serial *serial)
        }
 
        spin_lock_init(&priv->rx_lock);
+       spin_lock_init(&priv->tx_lock);
         init_waitqueue_head(&priv->delta_msr_wait);
        /* This will push the characters through immediately rather
           than queue a task to deliver them */
@@ -1270,6 +1283,13 @@ static int  ftdi_open (struct usb_serial_port *port, struct file *filp)
 
        dbg("%s", __FUNCTION__);
 
+       spin_lock_irqsave(&priv->tx_lock, flags);
+       priv->tx_bytes = 0;
+       spin_unlock_irqrestore(&priv->tx_lock, flags);
+       spin_lock_irqsave(&priv->rx_lock, flags);
+       priv->rx_bytes = 0;
+       spin_unlock_irqrestore(&priv->rx_lock, flags);
+
        if (port->tty)
                port->tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
 
@@ -1372,6 +1392,7 @@ static int ftdi_write (struct usb_serial_port *port,
        int data_offset ;       /* will be 1 for the SIO and 0 otherwise */
        int status;
        int transfer_size;
+       unsigned long flags;
 
        dbg("%s port %d, %d bytes", __FUNCTION__, port->number, count);
 
@@ -1379,6 +1400,13 @@ static int ftdi_write (struct usb_serial_port *port,
                dbg("write request of 0 bytes");
                return 0;
        }
+       spin_lock_irqsave(&priv->tx_lock, flags);
+       if (priv->tx_outstanding_urbs > URB_UPPER_LIMIT) {
+               spin_unlock_irqrestore(&priv->tx_lock, flags);
+               dbg("%s - write limit hit\n", __FUNCTION__);
+               return 0;
+       }
+       spin_unlock_irqrestore(&priv->tx_lock, flags);
        
        data_offset = priv->write_offset;
         dbg("data_offset set to %d",data_offset);
@@ -1445,6 +1473,12 @@ static int ftdi_write (struct usb_serial_port *port,
                err("%s - failed submitting write urb, error %d", __FUNCTION__, status);
                count = status;
                kfree (buffer);
+       } else {
+               spin_lock_irqsave(&priv->tx_lock, flags);
+               ++priv->tx_outstanding_urbs;
+               priv->tx_outstanding_bytes += count;
+               priv->tx_bytes += count;
+               spin_unlock_irqrestore(&priv->tx_lock, flags);
        }
 
        /* we are done with this urb, so let the host driver
@@ -1460,7 +1494,11 @@ static int ftdi_write (struct usb_serial_port *port,
 
 static void ftdi_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
 {
+       unsigned long flags;
        struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+       struct ftdi_private *priv;
+       int data_offset;       /* will be 1 for the SIO and 0 otherwise */
+       unsigned long countback;
 
        /* free up the transfer buffer, as usb_free_urb() does not do this */
        kfree (urb->transfer_buffer);
@@ -1472,34 +1510,67 @@ static void ftdi_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
                return;
        }
 
+       priv = usb_get_serial_port_data(port);
+       if (!priv) {
+               dbg("%s - bad port private data pointer - exiting", __FUNCTION__);
+               return;
+       }
+       /* account for transferred data */
+       countback = urb->actual_length;
+       data_offset = priv->write_offset;
+       if (data_offset > 0) {
+               /* Subtract the control bytes */
+               countback -= (data_offset * ((countback + (PKTSZ - 1)) / PKTSZ));
+       }
+       spin_lock_irqsave(&priv->tx_lock, flags);
+       --priv->tx_outstanding_urbs;
+       priv->tx_outstanding_bytes -= countback;
+       spin_unlock_irqrestore(&priv->tx_lock, flags);
+
        usb_serial_port_softint(port);
 } /* ftdi_write_bulk_callback */
 
 
 static int ftdi_write_room( struct usb_serial_port *port )
 {
+       struct ftdi_private *priv = usb_get_serial_port_data(port);
+       int room;
+       unsigned long flags;
+
        dbg("%s - port %d", __FUNCTION__, port->number);
 
-       /*
-        * We really can take anything the user throws at us
-        * but let's pick a nice big number to tell the tty
-        * layer that we have lots of free space
-        */
-       return 2048;
+       spin_lock_irqsave(&priv->tx_lock, flags);
+       if (priv->tx_outstanding_urbs < URB_UPPER_LIMIT) {
+               /*
+                * We really can take anything the user throws at us
+                * but let's pick a nice big number to tell the tty
+                * layer that we have lots of free space
+                */
+               room = 2048;
+       } else {
+               room = 0;
+       }
+       spin_unlock_irqrestore(&priv->tx_lock, flags);
+       return room;
 } /* ftdi_write_room */
 
 
 static int ftdi_chars_in_buffer (struct usb_serial_port *port)
 { /* ftdi_chars_in_buffer */
+       struct ftdi_private *priv = usb_get_serial_port_data(port);
+       int buffered;
+       unsigned long flags;
+
        dbg("%s - port %d", __FUNCTION__, port->number);
 
-       /* 
-        * We can't really account for how much data we
-        * have sent out, but hasn't made it through to the
-        * device, so just tell the tty layer that everything
-        * is flushed.
-        */
-       return 0;
+       spin_lock_irqsave(&priv->tx_lock, flags);
+       buffered = (int)priv->tx_outstanding_bytes;
+       spin_unlock_irqrestore(&priv->tx_lock, flags);
+       if (buffered < 0) {
+               err("%s outstanding tx bytes is negative!", __FUNCTION__);
+               buffered = 0;
+       }
+       return buffered;
 } /* ftdi_chars_in_buffer */
 
 
@@ -1509,6 +1580,8 @@ static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
        struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
        struct tty_struct *tty;
        struct ftdi_private *priv;
+       unsigned long countread;
+       unsigned long flags;
 
        if (urb->number_of_packets > 0) {
                err("%s transfer_buffer_length %d actual_length %d number of packets %d",__FUNCTION__,
@@ -1543,6 +1616,13 @@ static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
                return;
        }
 
+       /* count data bytes, but not status bytes */
+       countread = urb->actual_length;
+       countread -= 2 * ((countread + (PKTSZ - 1)) / PKTSZ);
+       spin_lock_irqsave(&priv->rx_lock, flags);
+       priv->rx_bytes += countread;
+       spin_unlock_irqrestore(&priv->rx_lock, flags);
+
        ftdi_process_read(port);
 
 } /* ftdi_read_bulk_callback */
index 6ab2ac845bd7a861c7d456ab94607160fe692030..04ef90fcb8766d3adffa2f345a178e55a5f7c12b 100644 (file)
@@ -36,6 +36,9 @@
 #define FTDI_ACTZWAVE_PID      0xF2D0
 
 
+/* www.starting-point-systems.com ÂµChameleon device */
+#define FTDI_MICRO_CHAMELEON_PID       0xCAA0  /* Product Id */
+
 /* www.irtrans.de device */
 #define FTDI_IRTRANS_PID 0xFC60 /* Product Id */
 
  */
 #define FTDI_YEI_SERVOCENTER31_PID     0xE050  /* YEI ServoCenter3.1 USB */
 
+/*
+ * ThorLabs USB motor drivers
+ */
+#define FTDI_THORLABS_PID              0xfaf0 /* ThorLabs USB motor drivers */
+
+/*
+ * Testo products (http://www.testo.com/)
+ * Submitted by Colin Leroy
+ */
+#define TESTO_VID                      0x128D
+#define TESTO_USB_INTERFACE_PID                0x0001
+
 /* Commands */
 #define FTDI_SIO_RESET                 0 /* Reset the port */
 #define FTDI_SIO_MODEM_CTRL    1 /* Set the modem control register */
index 803721b97e2e0746079b87f2536f66d3d2e902b2..77b977206a8c09186d1d8e42203e40c4774ad790 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/tty.h>
 #include <linux/module.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x1404, 0xcddc) },
index 1f5d1620baa12180b55d1ddea0131333ec2c8cce..727852634be9c91526419fe243b6b009382d69fc 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
+#include <linux/usb/serial.h>
 
 /* the mode to be set when the port ist opened */
 static int initial_mode = 1;
@@ -42,8 +43,6 @@ static int initial_mode = 1;
 /* debug flag */
 static int debug = 0;
 
-#include "usb-serial.h"
-
 #define GARMIN_VENDOR_ID             0x091E
 
 /*
index 945b8bb38c92ec4f422d645644dca8adfff292fd..17271355639397be219a44c2e3c4fe75f13bd7f2 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/usb.h>
+#include <linux/usb/serial.h>
 #include <asm/uaccess.h>
-#include "usb-serial.h"
 
 static int debug;
 
@@ -285,6 +285,7 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *reg
        if (result)
                dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
 }
+EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback);
 
 void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
 {
index 7e06358b03109015baf2adb080aff6ad0623521d..ebcac701b069a36bb94558379f8d8c390bba78b0 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/tty.h>
 #include <linux/module.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 /*
  * Version Information
index bd2c05dac2a92953884644dc2717536093213f1d..c49976c3ad52cf7924aaf07ac3f208a5005dfc98 100644 (file)
@@ -44,7 +44,7 @@
 #include <linux/wait.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 #include "io_edgeport.h"
 #include "io_ionsp.h"          /* info for the iosp messages */
 #include "io_16654.h"          /* 16654 UART defines */
index 723a12ae87b5db65e048d36c6efce4826897bd6d..17c5b1d2311a83e22cc09f30ef4d5b60d3c25244 100644 (file)
@@ -39,8 +39,8 @@
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>
 #include <linux/usb.h>
+#include <linux/usb/serial.h>
 
-#include "usb-serial.h"
 #include "io_16654.h"
 #include "io_usbvend.h"
 #include "io_ti.h"
index dbcfe172a5cc954ac406abf3fbdb63feaed6cfa4..59c5d999009abfbbe31b2c58d3715355c9066d71 100644 (file)
@@ -55,7 +55,7 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 #include "ipaq.h"
 
 #define KP_RETRIES     100
@@ -70,6 +70,8 @@
 
 static __u16 product, vendor;
 static int debug;
+static int connect_retries = KP_RETRIES;
+static int initial_wait;
 
 /* Function prototypes for an ipaq */
 static int  ipaq_open (struct usb_serial_port *port, struct file *filp);
@@ -582,7 +584,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
        struct ipaq_private     *priv;
        struct ipaq_packet      *pkt;
        int                     i, result = 0;
-       int                     retries = KP_RETRIES;
+       int                     retries = connect_retries;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
@@ -646,16 +648,12 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
        port->read_urb->transfer_buffer_length = URBDATA_SIZE;
        port->bulk_out_size = port->write_urb->transfer_buffer_length = URBDATA_SIZE;
        
+       msleep(1000*initial_wait);
        /* Start reading from the device */
        usb_fill_bulk_urb(port->read_urb, serial->dev, 
                      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
                      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
                      ipaq_read_bulk_callback, port);
-       result = usb_submit_urb(port->read_urb, GFP_KERNEL);
-       if (result) {
-               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
-               goto error;
-       }
 
        /*
         * Send out control message observed in win98 sniffs. Not sure what
@@ -670,8 +668,14 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
                                usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
                                0x1, 0, NULL, 0, 100);
                if (result == 0) {
+                       result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+                       if (result) {
+                               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
+                               goto error;
+                       }
                        return 0;
                }
+               msleep(1000);
        }
        err("%s - failed doing control urb, error %d", __FUNCTION__, result);
        goto error;
@@ -854,6 +858,7 @@ static void ipaq_write_bulk_callback(struct urb *urb, struct pt_regs *regs)
        
        if (urb->status) {
                dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+               return;
        }
 
        spin_lock_irqsave(&write_list_lock, flags);
@@ -966,3 +971,9 @@ MODULE_PARM_DESC(vendor, "User specified USB idVendor");
 
 module_param(product, ushort, 0);
 MODULE_PARM_DESC(product, "User specified USB idProduct");
+
+module_param(connect_retries, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(connect_retries, "Maximum number of connect retries (one second each)");
+
+module_param(initial_wait, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(initial_wait, "Time to wait before attempting a connection (in seconds)");
index a4a0bfeaab00ba88a4f31d35da5dd4d5cb566c56..87306cb6f9f5a065c6ead79b10e60b77b76a6f2a 100644 (file)
@@ -46,8 +46,8 @@
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/usb.h>
+#include <linux/usb/serial.h>
 #include <asm/uaccess.h>
-#include "usb-serial.h"
 
 /*
  * Version Information
@@ -373,6 +373,8 @@ static void ipw_write_bulk_callback(struct urb *urb, struct pt_regs *regs)
 
        dbg("%s", __FUNCTION__);
 
+       port->write_urb_busy = 0;
+
        if (urb->status)
                dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
 
index 2cf1fed3de43eb8a48d594e71624d4cd14d63692..1738b0b6a376dd90e41a1fadf8a3486eff6f0fac 100644 (file)
@@ -57,7 +57,7 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 /*
  * Version Information
index d7c58f1bc960ddb364b8a967bc7f47dbaecea726..015ad6cc1bbb6418613d8fed60992bf49e8157c4 100644 (file)
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 #include "keyspan.h"
 
 static int debug;
index 03ab3c0f3cce26e3f70293d37ab1ba123ff3bcfd..49b8dc039d1fef8f68aca71fee6efdb02082f458 100644 (file)
@@ -78,6 +78,7 @@
 #include <linux/workqueue.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
+#include <linux/usb/serial.h>
 
 static int debug;
 
@@ -107,8 +108,6 @@ struct ezusb_hex_record {
 #include "xircom_pgs_fw.h"
 #endif
 
-#include "usb-serial.h"
-
 /*
  * Version Information
  */
index b45ff3e7ab40f9fcca0d7216d033984ed91787aa..2a2f3e2da0553a3b3488fcb0a196a3a13953efb8 100644 (file)
@@ -55,7 +55,7 @@
 #include <linux/module.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 #include "kl5kusb105.h"
 
 static int debug;
index 4577333747729576672ac2028216bc46f6f30671..d50dce03495819f4280f815285a89214be2a3e88 100644 (file)
@@ -46,8 +46,8 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
+#include <linux/usb/serial.h>
 #include <linux/ioctl.h>
-#include "usb-serial.h"
 #include "kobil_sct.h"
 
 static int debug;
index ca05d3275f3e01170692dd18736c99bcf98d52c3..f4d4305c2c026fa2099faaef26c5ae80d30a8884 100644 (file)
@@ -75,7 +75,7 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 #include "mct_u232.h"
 
 /*
index 7f544081032e8832de68109613ed9386ad21a4fd..ac3f8b5d2c495f931739eee3ee9d3509c694f44a 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/tty_flip.h>
 #include <linux/module.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 static int debug;
 
index cfb711a21a45e61f0bae25c4223ac88d26b7f6e2..e49f40913c27550e0c121c8d01bdf8ef909d0ae7 100644 (file)
@@ -46,7 +46,7 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 static int debug;
 
index 78ad4b3126a646a7311a8255bac4d9d821c050e5..f0530c1d7b7a274ca7a2c69bc8a33df199a9f6c1 100644 (file)
@@ -35,6 +35,7 @@
   2006-06-01  v0.6.2 add backwards-compatibility stuff
   2006-06-01  v0.6.3 add Novatel Wireless
   2006-06-01  v0.7   Option => GSM
+  2006-06-01  v0.7.1 add COBRA2
 
   Work sponsored by: Sigos GmbH, Germany <info@sigos.de>
 
@@ -53,7 +54,7 @@
   device features.
 */
 
-#define DRIVER_VERSION "v0.7.0"
+#define DRIVER_VERSION "v0.7.1"
 #define DRIVER_AUTHOR "Matthias Urlichs <smurf@smurf.noris.de>"
 #define DRIVER_DESC "USB Driver for GSM modems"
 
@@ -64,7 +65,7 @@
 #include <linux/tty_flip.h>
 #include <linux/module.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 /* Function prototypes */
 static int  option_open(struct usb_serial_port *port, struct file *filp);
@@ -102,6 +103,7 @@ static int  option_send_setup(struct usb_serial_port *port);
 #define OPTION_PRODUCT_FUSION           0x6000
 #define OPTION_PRODUCT_FUSION2          0x6300
 #define OPTION_PRODUCT_COBRA            0x6500
+#define OPTION_PRODUCT_COBRA2           0x6600
 #define HUAWEI_PRODUCT_E600             0x1001
 #define AUDIOVOX_PRODUCT_AIRCARD        0x0112
 #define SIERRAWIRELESS_PRODUCT_MC8755   0x6802
@@ -112,6 +114,7 @@ static struct usb_device_id option_ids[] = {
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION2) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA) },
+       { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA2) },
        { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
        { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) },
        { USB_DEVICE(SIERRAWIRELESS_VENDOR_ID, SIERRAWIRELESS_PRODUCT_MC8755) },
@@ -124,6 +127,7 @@ static struct usb_device_id option_ids1[] = {
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION2) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA) },
+       { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA2) },
        { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
        { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) },
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) },
index de93a2b909e78b72fb303fa4ff0702a1c206115d..259db31b65c194b6a2e4a19d76fdb47845b3e517 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 #include "pl2303.h"
 
 /*
@@ -52,6 +52,7 @@ struct pl2303_buf {
 static struct usb_device_id id_table [] = {
        { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) },
        { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) },
+       { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_DCU11) },
        { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) },
        { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) },
        { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
@@ -79,6 +80,7 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(LEADTEK_VENDOR_ID, LEADTEK_9531_PRODUCT_ID) },
        { USB_DEVICE(SPEEDDRAGON_VENDOR_ID, SPEEDDRAGON_PRODUCT_ID) },
        { USB_DEVICE(OTI_VENDOR_ID, OTI_PRODUCT_ID) },
+       { USB_DEVICE(DATAPILOT_U2_VENDOR_ID, DATAPILOT_U2_PRODUCT_ID) },
        { }                                     /* Terminating entry */
 };
 
index 7f29e81d3e35fdd5ba99b0eeb319997d332eda59..d9c1e6e0b4b3427c926983e4ad8bf8c47257ac0d 100644 (file)
@@ -10,6 +10,7 @@
 #define PL2303_VENDOR_ID       0x067b
 #define PL2303_PRODUCT_ID      0x2303
 #define PL2303_PRODUCT_ID_RSAQ2                0x04bb
+#define PL2303_PRODUCT_ID_DCU11                0x1234
 #define PL2303_PRODUCT_ID_PHAROS       0xaaa0
 #define PL2303_PRODUCT_ID_RSAQ3                0xaaa2
 
@@ -84,3 +85,7 @@
 /* Ours Technology Inc DKU-5 clone, chipset: Prolific Technology Inc */
 #define OTI_VENDOR_ID  0x0ea0
 #define OTI_PRODUCT_ID 0x6858
+
+/* DATAPILOT Universal-2 Phone Cable */
+#define DATAPILOT_U2_VENDOR_ID 0x0731
+#define DATAPILOT_U2_PRODUCT_ID        0x2003
index 897d8447252b522c77c8dc741a02f191d3b2ad38..789771ecdb11013a168ffc5fa0157474ab4538dc 100644 (file)
@@ -71,7 +71,7 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 
 
 #ifndef CONFIG_USB_SAFE_PADDED
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
new file mode 100644 (file)
index 0000000..d29638d
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Sierra Wireless CDMA Wireless Serial USB driver
+ *
+ * Current Copy modified by: Kevin Lloyd <linux@sierrawireless.com>
+ * Original Copyright (C) 2005-2006 Greg Kroah-Hartman <gregkh@suse.de>
+ *
+ *     This program is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License version
+ *     2 as published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/tty.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+#include <linux/usb/serial.h>
+
+static struct usb_device_id id_table [] = {
+       { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */
+       { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */
+       { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */
+       { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */
+       { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */
+       { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */
+       { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */
+       { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */
+       /* Following devices are supported in the airprime.c driver */
+       /* { USB_DEVICE(0x1199, 0x0112) }, */   /* Sierra Wireless AirCard 580 */
+       /* { USB_DEVICE(0x0F3D, 0x0112) }, */   /* AirPrime/Sierra PC 5220 */
+       { }
+};
+MODULE_DEVICE_TABLE(usb, id_table);
+
+static struct usb_driver sierra_driver = {
+       .name =         "sierra_wireless",
+       .probe =        usb_serial_probe,
+       .disconnect =   usb_serial_disconnect,
+       .id_table =     id_table,
+};
+
+static struct usb_serial_driver sierra_device = {
+       .driver = {
+       .owner =                THIS_MODULE,
+       .name =                 "Sierra_Wireless",
+       },
+       .id_table =             id_table,
+       .num_interrupt_in =     NUM_DONT_CARE,
+       .num_bulk_in =          NUM_DONT_CARE,
+       .num_bulk_out =         NUM_DONT_CARE,
+       .num_ports =            3,
+};
+
+static int __init sierra_init(void)
+{
+       int retval;
+
+       retval = usb_serial_register(&sierra_device);
+       if (retval)
+               return retval;
+       retval = usb_register(&sierra_driver);
+       if (retval)
+               usb_serial_deregister(&sierra_device);
+       return retval;
+}
+
+static void __exit sierra_exit(void)
+{
+       usb_deregister(&sierra_driver);
+       usb_serial_deregister(&sierra_device);
+}
+
+module_init(sierra_init);
+module_exit(sierra_exit);
+MODULE_LICENSE("GPL");
index a9afff31a9210b2dd6e8c512c0f485a130e30d7c..ac9b8ee52d4406b67761be94bff26efaa9d4ab87 100644 (file)
@@ -83,8 +83,8 @@
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>
 #include <linux/usb.h>
+#include <linux/usb/serial.h>
 
-#include "usb-serial.h"
 #include "ti_usb_3410_5052.h"
 #include "ti_fw_3410.h"                /* firmware image for 3410 */
 #include "ti_fw_5052.h"                /* firmware image for 5052 */
index b59a0536ea5c98a2952ef9c4075986dc43445ba7..12c1694d322ef3fa55650a0950c97779df1f68d4 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/smp_lock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 #include "pl2303.h"
 
 /*
@@ -40,6 +40,8 @@
 #define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/"
 #define DRIVER_DESC "USB Serial Driver core"
 
+static void port_free(struct usb_serial_port *port);
+
 /* Driver structure we register with the USB core */
 static struct usb_driver usb_serial_driver = {
        .name =         "usbserial",
@@ -146,23 +148,10 @@ static void destroy_serial(struct kref *kref)
                        port = serial->port[i];
                        if (!port)
                                continue;
-                       usb_kill_urb(port->read_urb);
-                       usb_free_urb(port->read_urb);
-                       usb_kill_urb(port->write_urb);
-                       usb_free_urb(port->write_urb);
-                       usb_kill_urb(port->interrupt_in_urb);
-                       usb_free_urb(port->interrupt_in_urb);
-                       usb_kill_urb(port->interrupt_out_urb);
-                       usb_free_urb(port->interrupt_out_urb);
-                       kfree(port->bulk_in_buffer);
-                       kfree(port->bulk_out_buffer);
-                       kfree(port->interrupt_in_buffer);
-                       kfree(port->interrupt_out_buffer);
+                       port_free(port);
                }
        }
 
-       flush_scheduled_work();         /* port->work */
-
        usb_put_dev(serial->dev);
 
        /* free up any memory that we allocated */
@@ -564,6 +553,11 @@ static void port_release(struct device *dev)
        struct usb_serial_port *port = to_usb_serial_port(dev);
 
        dbg ("%s - %s", __FUNCTION__, dev->bus_id);
+       port_free(port);
+}
+
+static void port_free(struct usb_serial_port *port)
+{
        usb_kill_urb(port->read_urb);
        usb_free_urb(port->read_urb);
        usb_kill_urb(port->write_urb);
@@ -576,6 +570,7 @@ static void port_release(struct device *dev)
        kfree(port->bulk_out_buffer);
        kfree(port->interrupt_in_buffer);
        kfree(port->interrupt_out_buffer);
+       flush_scheduled_work();         /* port->work */
        kfree(port);
 }
 
diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
deleted file mode 100644 (file)
index 0f2802a..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * USB Serial Converter driver
- *
- *     Copyright (C) 1999 - 2005
- *         Greg Kroah-Hartman (greg@kroah.com)
- *
- *     This program is free software; you can redistribute it and/or modify
- *     it under the terms of the GNU General Public License as published by
- *     the Free Software Foundation; either version 2 of the License.
- *
- */
-
-
-#ifndef __LINUX_USB_SERIAL_H
-#define __LINUX_USB_SERIAL_H
-
-#include <linux/kref.h>
-#include <linux/mutex.h>
-
-#define SERIAL_TTY_MAJOR       188     /* Nice legal number now */
-#define SERIAL_TTY_MINORS      255     /* loads of devices :) */
-
-#define MAX_NUM_PORTS          8       /* The maximum number of ports one device can grab at once */
-
-/* parity check flag */
-#define RELEVANT_IFLAG(iflag)  (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
-
-/**
- * usb_serial_port: structure for the specific ports of a device.
- * @serial: pointer back to the struct usb_serial owner of this port.
- * @tty: pointer to the corresponding tty for this port.
- * @lock: spinlock to grab when updating portions of this structure.
- * @mutex: mutex used to synchronize serial_open() and serial_close()
- *     access for this port.
- * @number: the number of the port (the minor number).
- * @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
- * @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
- * @interrupt_in_endpointAddress: endpoint address for the interrupt in pipe
- *     for this port.
- * @interrupt_out_buffer: pointer to the interrupt out buffer for this port.
- * @interrupt_out_size: the size of the interrupt_out_buffer, in bytes.
- * @interrupt_out_urb: pointer to the interrupt out struct urb for this port.
- * @interrupt_out_endpointAddress: endpoint address for the interrupt out pipe
- *     for this port.
- * @bulk_in_buffer: pointer to the bulk in buffer for this port.
- * @read_urb: pointer to the bulk in struct urb for this port.
- * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this
- *     port.
- * @bulk_out_buffer: pointer to the bulk out buffer for this port.
- * @bulk_out_size: the size of the bulk_out_buffer, in bytes.
- * @write_urb: pointer to the bulk out struct urb for this port.
- * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this
- *     port.
- * @write_wait: a wait_queue_head_t used by the port.
- * @work: work queue entry for the line discipline waking up.
- * @open_count: number of times this port has been opened.
- *
- * This structure is used by the usb-serial core and drivers for the specific
- * ports of a device.
- */
-struct usb_serial_port {
-       struct usb_serial *     serial;
-       struct tty_struct *     tty;
-       spinlock_t              lock;
-       struct mutex            mutex;
-       unsigned char           number;
-
-       unsigned char *         interrupt_in_buffer;
-       struct urb *            interrupt_in_urb;
-       __u8                    interrupt_in_endpointAddress;
-
-       unsigned char *         interrupt_out_buffer;
-       int                     interrupt_out_size;
-       struct urb *            interrupt_out_urb;
-       __u8                    interrupt_out_endpointAddress;
-
-       unsigned char *         bulk_in_buffer;
-       int                     bulk_in_size;
-       struct urb *            read_urb;
-       __u8                    bulk_in_endpointAddress;
-
-       unsigned char *         bulk_out_buffer;
-       int                     bulk_out_size;
-       struct urb *            write_urb;
-       int                     write_urb_busy;
-       __u8                    bulk_out_endpointAddress;
-
-       wait_queue_head_t       write_wait;
-       struct work_struct      work;
-       int                     open_count;
-       struct device           dev;
-};
-#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
-
-/* get and set the port private data pointer helper functions */
-static inline void *usb_get_serial_port_data (struct usb_serial_port *port)
-{
-       return dev_get_drvdata(&port->dev);
-}
-
-static inline void usb_set_serial_port_data (struct usb_serial_port *port, void *data)
-{
-       dev_set_drvdata(&port->dev, data);
-}
-
-/**
- * usb_serial - structure used by the usb-serial core for a device
- * @dev: pointer to the struct usb_device for this device
- * @type: pointer to the struct usb_serial_driver for this device
- * @interface: pointer to the struct usb_interface for this device
- * @minor: the starting minor number for this device
- * @num_ports: the number of ports this device has
- * @num_interrupt_in: number of interrupt in endpoints we have
- * @num_interrupt_out: number of interrupt out endpoints we have
- * @num_bulk_in: number of bulk in endpoints we have
- * @num_bulk_out: number of bulk out endpoints we have
- * @port: array of struct usb_serial_port structures for the different ports.
- * @private: place to put any driver specific information that is needed.  The
- *     usb-serial driver is required to manage this data, the usb-serial core
- *     will not touch this.  Use usb_get_serial_data() and
- *     usb_set_serial_data() to access this.
- */
-struct usb_serial {
-       struct usb_device *             dev;
-       struct usb_serial_driver *      type;
-       struct usb_interface *          interface;
-       unsigned char                   minor;
-       unsigned char                   num_ports;
-       unsigned char                   num_port_pointers;
-       char                            num_interrupt_in;
-       char                            num_interrupt_out;
-       char                            num_bulk_in;
-       char                            num_bulk_out;
-       struct usb_serial_port *        port[MAX_NUM_PORTS];
-       struct kref                     kref;
-       void *                          private;
-};
-#define to_usb_serial(d) container_of(d, struct usb_serial, kref)
-
-#define NUM_DONT_CARE  (-1)
-
-/* get and set the serial private data pointer helper functions */
-static inline void *usb_get_serial_data (struct usb_serial *serial)
-{
-       return serial->private;
-}
-
-static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
-{
-       serial->private = data;
-}
-
-/**
- * usb_serial_driver - describes a usb serial driver
- * @description: pointer to a string that describes this driver.  This string used
- *     in the syslog messages when a device is inserted or removed.
- * @id_table: pointer to a list of usb_device_id structures that define all
- *     of the devices this structure can support.
- * @num_interrupt_in: the number of interrupt in endpoints this device will
- *     have.
- * @num_interrupt_out: the number of interrupt out endpoints this device will
- *     have.
- * @num_bulk_in: the number of bulk in endpoints this device will have.
- * @num_bulk_out: the number of bulk out endpoints this device will have.
- * @num_ports: the number of different ports this device will have.
- * @calc_num_ports: pointer to a function to determine how many ports this
- *     device has dynamically.  It will be called after the probe()
- *     callback is called, but before attach()
- * @probe: pointer to the driver's probe function.
- *     This will be called when the device is inserted into the system,
- *     but before the device has been fully initialized by the usb_serial
- *     subsystem.  Use this function to download any firmware to the device,
- *     or any other early initialization that might be needed.
- *     Return 0 to continue on with the initialization sequence.  Anything 
- *     else will abort it.
- * @attach: pointer to the driver's attach function.
- *     This will be called when the struct usb_serial structure is fully set
- *     set up.  Do any local initialization of the device, or any private
- *     memory structure allocation at this point in time.
- * @shutdown: pointer to the driver's shutdown function.  This will be
- *     called when the device is removed from the system.
- *
- * This structure is defines a USB Serial driver.  It provides all of
- * the information that the USB serial core code needs.  If the function
- * pointers are defined, then the USB serial core code will call them when
- * the corresponding tty port functions are called.  If they are not
- * called, the generic serial function will be used instead.
- *
- * The driver.owner field should be set to the module owner of this driver.
- * The driver.name field should be set to the name of this driver (remember
- * it will show up in sysfs, so it needs to be short and to the point.
- * Useing the module name is a good idea.)
- */
-struct usb_serial_driver {
-       const char *description;
-       const struct usb_device_id *id_table;
-       char    num_interrupt_in;
-       char    num_interrupt_out;
-       char    num_bulk_in;
-       char    num_bulk_out;
-       char    num_ports;
-
-       struct list_head        driver_list;
-       struct device_driver    driver;
-
-       int (*probe) (struct usb_serial *serial, const struct usb_device_id *id);
-       int (*attach) (struct usb_serial *serial);
-       int (*calc_num_ports) (struct usb_serial *serial);
-
-       void (*shutdown) (struct usb_serial *serial);
-
-       int (*port_probe) (struct usb_serial_port *port);
-       int (*port_remove) (struct usb_serial_port *port);
-
-       /* serial function calls */
-       int  (*open)            (struct usb_serial_port *port, struct file * filp);
-       void (*close)           (struct usb_serial_port *port, struct file * filp);
-       int  (*write)           (struct usb_serial_port *port, const unsigned char *buf, int count);
-       int  (*write_room)      (struct usb_serial_port *port);
-       int  (*ioctl)           (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
-       void (*set_termios)     (struct usb_serial_port *port, struct termios * old);
-       void (*break_ctl)       (struct usb_serial_port *port, int break_state);
-       int  (*chars_in_buffer) (struct usb_serial_port *port);
-       void (*throttle)        (struct usb_serial_port *port);
-       void (*unthrottle)      (struct usb_serial_port *port);
-       int  (*tiocmget)        (struct usb_serial_port *port, struct file *file);
-       int  (*tiocmset)        (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
-
-       void (*read_int_callback)(struct urb *urb, struct pt_regs *regs);
-       void (*write_int_callback)(struct urb *urb, struct pt_regs *regs);
-       void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs);
-       void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs);
-};
-#define to_usb_serial_driver(d) container_of(d, struct usb_serial_driver, driver)
-
-extern int  usb_serial_register(struct usb_serial_driver *driver);
-extern void usb_serial_deregister(struct usb_serial_driver *driver);
-extern void usb_serial_port_softint(struct usb_serial_port *port);
-
-extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id);
-extern void usb_serial_disconnect(struct usb_interface *iface);
-
-extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest);
-extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit);
-
-/* USB Serial console functions */
-#ifdef CONFIG_USB_SERIAL_CONSOLE
-extern void usb_serial_console_init (int debug, int minor);
-extern void usb_serial_console_exit (void);
-extern void usb_serial_console_disconnect(struct usb_serial *serial);
-#else
-static inline void usb_serial_console_init (int debug, int minor) { }
-static inline void usb_serial_console_exit (void) { }
-static inline void usb_serial_console_disconnect(struct usb_serial *serial) {}
-#endif
-
-/* Functions needed by other parts of the usbserial core */
-extern struct usb_serial *usb_serial_get_by_index (unsigned int minor);
-extern void usb_serial_put(struct usb_serial *serial);
-extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp);
-extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count);
-extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp);
-extern int usb_serial_generic_write_room (struct usb_serial_port *port);
-extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port);
-extern void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
-extern void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
-extern void usb_serial_generic_shutdown (struct usb_serial *serial);
-extern int usb_serial_generic_register (int debug);
-extern void usb_serial_generic_deregister (void);
-
-extern int usb_serial_bus_register (struct usb_serial_driver *device);
-extern void usb_serial_bus_deregister (struct usb_serial_driver *device);
-
-extern struct usb_serial_driver usb_serial_generic_device;
-extern struct bus_type usb_serial_bus_type;
-extern struct tty_driver *usb_serial_tty_driver;
-
-static inline void usb_serial_debug_data(int debug,
-                                        struct device *dev,
-                                        const char *function, int size,
-                                        const unsigned char *data)
-{
-       int i;
-
-       if (debug) {
-               dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = ", function, size);
-               for (i = 0; i < size; ++i)
-                       printk ("%.2x ", data[i]);
-               printk ("\n");
-       }
-}
-
-/* Use our own dbg macro */
-#undef dbg
-#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg); } while (0)
-
-
-
-#endif /* ifdef __LINUX_USB_SERIAL_H */
-
index 95a2936e902e22a00c4360ec819292d0c531e73d..88949f7884ca112ded81315d1e11cda8dcb261f2 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <linux/usb.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 #include "visor.h"
 
 /*
@@ -302,7 +302,6 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
        spin_lock_irqsave(&priv->lock, flags);
        priv->bytes_in = 0;
        priv->bytes_out = 0;
-       priv->outstanding_urbs = 0;
        priv->throttled = 0;
        spin_unlock_irqrestore(&priv->lock, flags);
 
@@ -435,13 +434,25 @@ static int visor_write (struct usb_serial_port *port, const unsigned char *buf,
 
 static int visor_write_room (struct usb_serial_port *port)
 {
+       struct visor_private *priv = usb_get_serial_port_data(port);
+       unsigned long flags;
+
        dbg("%s - port %d", __FUNCTION__, port->number);
 
        /*
         * We really can take anything the user throws at us
         * but let's pick a nice big number to tell the tty
-        * layer that we have lots of free space
+        * layer that we have lots of free space, unless we don't.
         */
+
+       spin_lock_irqsave(&priv->lock, flags);
+       if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) {
+               spin_unlock_irqrestore(&priv->lock, flags);
+               dbg("%s - write limit hit\n", __FUNCTION__);
+               return 0;
+       }
+       spin_unlock_irqrestore(&priv->lock, flags);
+
        return 2048;
 }
 
@@ -758,15 +769,22 @@ static int visor_calc_num_ports (struct usb_serial *serial)
 
 static int generic_startup(struct usb_serial *serial)
 {
+       struct usb_serial_port **ports = serial->port;
        struct visor_private *priv;
        int i;
 
        for (i = 0; i < serial->num_ports; ++i) {
                priv = kzalloc (sizeof(*priv), GFP_KERNEL);
-               if (!priv)
+               if (!priv) {
+                       while (i-- != 0) {
+                               priv = usb_get_serial_port_data(ports[i]);
+                               usb_set_serial_port_data(ports[i], NULL);
+                               kfree(priv);
+                       }
                        return -ENOMEM;
+               }
                spin_lock_init(&priv->lock);
-               usb_set_serial_port_data(serial->port[i], priv);
+               usb_set_serial_port_data(ports[i], priv);
        }
        return 0;
 }
@@ -876,7 +894,18 @@ static int clie_5_attach (struct usb_serial *serial)
 
 static void visor_shutdown (struct usb_serial *serial)
 {
+       struct visor_private *priv;
+       int i;
+
        dbg("%s", __FUNCTION__);
+
+       for (i = 0; i < serial->num_ports; i++) {
+               priv = usb_get_serial_port_data(serial->port[i]);
+               if (priv) {
+                       usb_set_serial_port_data(serial->port[i], NULL);
+                       kfree(priv);
+               }
+       }
 }
 
 static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
index 540438c3f381ad7d69ae2f5044150277ae86a73e..6e6c7934be32f819a08286e474e5ec31bd98fd4e 100644 (file)
@@ -79,7 +79,7 @@
 #include <linux/usb.h>
 #include <linux/serial_reg.h>
 #include <linux/serial.h>
-#include "usb-serial.h"
+#include <linux/usb/serial.h>
 #include "whiteheat_fw.h"              /* firmware for the ConnectTech WhiteHEAT device */
 #include "whiteheat.h"                 /* WhiteHEAT specific commands */
 
index 5715291ba5400d784ccb59841ef956a881dfb1e0..a4b7df9ff8c165fd3067f7c8e8ff5ead4becf2a4 100644 (file)
@@ -112,13 +112,11 @@ static int slave_configure(struct scsi_device *sdev)
        if (sdev->scsi_level < SCSI_2)
                sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2;
 
-       /* According to the technical support people at Genesys Logic,
-        * devices using their chips have problems transferring more than
-        * 32 KB at a time.  In practice people have found that 64 KB
-        * works okay and that's what Windows does.  But we'll be
-        * conservative; people can always use the sysfs interface to
-        * increase max_sectors. */
-       if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) == USB_VENDOR_ID_GENESYS &&
+       /* Many devices have trouble transfering more than 32KB at a time,
+        * while others have trouble with more than 64K. At this time we
+        * are limiting both to 32K (64 sectores).
+        */
+       if ((us->flags & US_FL_MAX_SECTORS_64) &&
                        sdev->request_queue->max_sectors > 64)
                blk_queue_max_sectors(sdev->request_queue, 64);
 
index eb7188b3565c840622e05c2663517de512fb0549..d6acc92a4ae36ac66757450f9522f7cb667128f6 100644 (file)
@@ -180,7 +180,7 @@ static int usb_stor_msg_common(struct us_data *us, int timeout)
        if (timeleft <= 0) {
                US_DEBUGP("%s -- cancelling URB\n",
                          timeleft == 0 ? "Timeout" : "Signal");
-               usb_unlink_urb(us->current_urb);
+               usb_kill_urb(us->current_urb);
        }
 
        /* return the URB status */
index c7e84e653df9a38a548b954cf4d3a2fc51703577..a5ca449f6e645e811022371cdbca9125f4cf18d7 100644 (file)
@@ -112,6 +112,19 @@ UNUSUAL_DEV(  0x0411, 0x001c, 0x0113, 0x0113,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_INQUIRY ),
 
+/* Submitted by Ernestas Vaiciukevicius <ernisv@gmail.com> */
+UNUSUAL_DEV(  0x0419, 0x0100, 0x0100, 0x0100,
+                "Samsung Info. Systems America, Inc.",
+                "MP3 Player",
+                US_SC_DEVICE, US_PR_DEVICE, NULL,
+                US_FL_IGNORE_RESIDUE ),
+
+/* Reported by Orgad Shaneh <orgads@gmail.com> */
+UNUSUAL_DEV(  0x0419, 0xaace, 0x0100, 0x0100,
+               "Samsung", "MP3 Player",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_IGNORE_RESIDUE ),
+
 /* Reported by Christian Leber <christian@leber.de> */
 UNUSUAL_DEV(  0x0419, 0xaaf5, 0x0100, 0x0100,
                "TrekStor",
@@ -132,6 +145,14 @@ UNUSUAL_DEV(  0x0420, 0x0001, 0x0100, 0x0100,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_IGNORE_RESIDUE ),
 
+/* Reported by Sumedha Swamy <sumedhaswamy@gmail.com> and
+ * Einar Th. Einarsson <einarthered@gmail.com> */
+UNUSUAL_DEV(  0x0421, 0x0444, 0x0100, 0x0100,
+               "Nokia",
+               "N91",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
+
 /* Reported by Jiri Slaby <jirislaby@gmail.com> and
  * Rene C. Castberg <Rene@Castberg.org> */
 UNUSUAL_DEV(  0x0421, 0x0446, 0x0100, 0x0100,
@@ -140,6 +161,13 @@ UNUSUAL_DEV(  0x0421, 0x0446, 0x0100, 0x0100,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
 
+/* Reported by Matthew Bloch <matthew@bytemark.co.uk> */
+UNUSUAL_DEV(  0x0421, 0x044e, 0x0100, 0x0100,
+               "Nokia",
+               "E61",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
+
 /* Reported by Olaf Hering <olh@suse.de> from novell bug #105878 */
 UNUSUAL_DEV(  0x0424, 0x0fdc, 0x0210, 0x0210,
                "SMSC",
@@ -473,10 +501,11 @@ UNUSUAL_DEV(  0x054c, 0x0010, 0x0106, 0x0450,
                US_SC_SCSI, US_PR_DEVICE, NULL,
                US_FL_SINGLE_LUN | US_FL_NOT_LOCKABLE | US_FL_NO_WP_DETECT ),
 
-/* This entry is needed because the device reports Sub=ff */
-UNUSUAL_DEV(  0x054c, 0x0010, 0x0500, 0x0600,
+/* Submitted by Lars Jacob <jacob.lars@googlemail.com>
+ * This entry is needed because the device reports Sub=ff */
+UNUSUAL_DEV(  0x054c, 0x0010, 0x0500, 0x0610,
                "Sony",
-               "DSC-T1/T5",
+               "DSC-T1/T5/H5",
                US_SC_8070, US_PR_DEVICE, NULL,
                US_FL_SINGLE_LUN ),
 
@@ -708,18 +737,22 @@ UNUSUAL_DEV(  0x05dc, 0xb002, 0x0000, 0x0113,
  * They were originally reported by Alexander Oltu
  * <alexander@all-2.com> and Peter Marks <peter.marks@turner.com>
  * respectively.
+ *
+ * US_FL_GO_SLOW and US_FL_MAX_SECTORS_64 added by Phil Dibowitz
+ * <phil@ipom.com> as these flags were made and hard-coded
+ * special-cases were pulled from scsiglue.c.
  */
 UNUSUAL_DEV(  0x05e3, 0x0701, 0x0000, 0xffff,
                "Genesys Logic",
                "USB to IDE Optical",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
-               US_FL_GO_SLOW ),
+               US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 ),
 
 UNUSUAL_DEV(  0x05e3, 0x0702, 0x0000, 0xffff,
                "Genesys Logic",
                "USB to IDE Disk",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
-               US_FL_GO_SLOW ),
+               US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 ),
 
 /* Reported by Hanno Boeck <hanno@gmx.de>
  * Taken from the Lycoris Kernel */
@@ -1196,6 +1229,14 @@ UNUSUAL_DEV(  0x0ea0, 0x6828, 0x0110, 0x0110,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_IGNORE_RESIDUE ),
 
+/* Reported by Benjamin Schiller <sbenni@gmx.de>
+ * It is also sold by Easylite as DJ 20 */
+UNUSUAL_DEV(  0x0ed1, 0x7636, 0x0103, 0x0103,
+               "Typhoon",
+               "My DJ 1820",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64),
+
 /* Reported by Michael Stattmann <michael@stattmann.com> */
 UNUSUAL_DEV(  0x0fce, 0xd008, 0x0000, 0x0000,
                "Sony Ericsson",
@@ -1227,6 +1268,15 @@ UNUSUAL_DEV(  0x1370, 0x6828, 0x0110, 0x0110,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_IGNORE_RESIDUE ),
 
+/* patch submitted by Davide Perini <perini.davide@dpsoftware.org>
+ * and Renato Perini <rperini@email.it>
+ */
+UNUSUAL_DEV(  0x22b8, 0x3010, 0x0001, 0x0001,
+               "Motorola",
+               "RAZR V3x",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ),
+
 /* Reported by Radovan Garabik <garabik@kassiopeia.juls.savba.sk> */
 UNUSUAL_DEV(  0x2735, 0x100b, 0x0000, 0x9999,
                "MPIO",
index 1185acac4b216ec9fb1e2a59967474d0bcb07a74..5ee19be52f6510bd2efea0ca6ac81d0f70082b38 100644 (file)
@@ -55,6 +55,7 @@
 #include <linux/slab.h>
 #include <linux/kthread.h>
 #include <linux/mutex.h>
+#include <linux/utsrelease.h>
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_cmnd.h>
@@ -373,8 +374,12 @@ static int usb_stor_control_thread(void * __us)
                /* lock access to the state */
                scsi_lock(host);
 
+               /* did the command already complete because of a disconnect? */
+               if (!us->srb)
+                       ;               /* nothing to do */
+
                /* indicate that the command is done */
-               if (us->srb->result != DID_ABORT << 16) {
+               else if (us->srb->result != DID_ABORT << 16) {
                        US_DEBUGP("scsi cmd done, result=0x%x\n", 
                                   us->srb->result);
                        us->srb->scsi_done(us->srb);
@@ -524,7 +529,8 @@ static void get_device_info(struct us_data *us, const struct usb_device_id *id)
                if (msg >= 0 && !(us->flags & US_FL_NEED_OVERRIDE))
                        printk(KERN_NOTICE USB_STORAGE "This device "
                                "(%04x,%04x,%04x S %02x P %02x)"
-                               " has %s in unusual_devs.h\n"
+                               " has %s in unusual_devs.h (kernel"
+                               " %s)\n"
                                "   Please send a copy of this message to "
                                "<linux-usb-devel@lists.sourceforge.net>\n",
                                le16_to_cpu(ddesc->idVendor),
@@ -532,7 +538,8 @@ static void get_device_info(struct us_data *us, const struct usb_device_id *id)
                                le16_to_cpu(ddesc->bcdDevice),
                                idesc->bInterfaceSubClass,
                                idesc->bInterfaceProtocol,
-                               msgs[msg]);
+                               msgs[msg],
+                               UTS_RELEASE);
        }
 }
 
@@ -836,32 +843,34 @@ static void dissociate_dev(struct us_data *us)
  * the host */
 static void quiesce_and_remove_host(struct us_data *us)
 {
+       struct Scsi_Host *host = us_to_host(us);
+
        /* Prevent new USB transfers, stop the current command, and
         * interrupt a SCSI-scan or device-reset delay */
+       scsi_lock(host);
        set_bit(US_FLIDX_DISCONNECTING, &us->flags);
+       scsi_unlock(host);
        usb_stor_stop_transport(us);
        wake_up(&us->delay_wait);
 
        /* It doesn't matter if the SCSI-scanning thread is still running.
         * The thread will exit when it sees the DISCONNECTING flag. */
 
-       /* Wait for the current command to finish, then remove the host */
-       mutex_lock(&us->dev_mutex);
-       mutex_unlock(&us->dev_mutex);
-
        /* queuecommand won't accept any new commands and the control
         * thread won't execute a previously-queued command.  If there
         * is such a command pending, complete it with an error. */
+       mutex_lock(&us->dev_mutex);
        if (us->srb) {
                us->srb->result = DID_NO_CONNECT << 16;
-               scsi_lock(us_to_host(us));
+               scsi_lock(host);
                us->srb->scsi_done(us->srb);
                us->srb = NULL;
-               scsi_unlock(us_to_host(us));
+               scsi_unlock(host);
        }
+       mutex_unlock(&us->dev_mutex);
 
        /* Now we own no commands so it's safe to remove the SCSI host */
-       scsi_remove_host(us_to_host(us));
+       scsi_remove_host(host);
 }
 
 /* Second stage of disconnect processing: deallocate all resources */
index 5284abe1b5eb02528635463f59a345d30e8d9deb..21f3ddbc90805ca6f93f58c514d00fc49e63e320 100644 (file)
@@ -176,8 +176,4 @@ extern void fill_inquiry_response(struct us_data *us,
 #define scsi_unlock(host)      spin_unlock_irq(host->host_lock)
 #define scsi_lock(host)                spin_lock_irq(host->host_lock)
 
-
-/* Vendor ID list for devices that require special handling */
-#define USB_VENDOR_ID_GENESYS          0x05e3  /* Genesys Logic */
-
 #endif
index 78488bb41aeb1d984ba6f2a32f485378c07f883f..0dda73da862843d386402333e9eb663fe9d4ea6f 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index 3badb48d662b09d1e3c99c35b8d6b4563b0398ca..6533b0f3923133e355284df03934a3b1de60c202 100644 (file)
@@ -1518,6 +1518,26 @@ config FB_PXA_PARAMETERS
 
          <file:Documentation/fb/pxafb.txt> describes the available parameters.
 
+config FB_MBX
+       tristate "2700G LCD framebuffer support"
+       depends on FB && ARCH_PXA
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+       select FB_CFB_IMAGEBLIT
+       ---help---
+         Framebuffer driver for the Intel 2700G (Marathon) Graphics
+         Accelerator
+
+config FB_MBX_DEBUG
+       bool "Enable debugging info via debugfs"
+       depends on FB_MBX && DEBUG_FS
+       default n
+       ---help---
+         Enable this if you want debugging information using the debug
+         filesystem (debugfs)
+
+         If unsure, say N.
+
 config FB_W100
        tristate "W100 frame buffer support"
        depends on FB && PXA_SHARPSL
index 6283d015f8f53b02056437dde71853ade2bee1fe..95563c9c6b9c7498fdc0d5f2d34e475df1d22882 100644 (file)
@@ -38,6 +38,7 @@ obj-$(CONFIG_FB_SIS)            += sis/
 obj-$(CONFIG_FB_KYRO)             += kyro/
 obj-$(CONFIG_FB_SAVAGE)                  += savage/
 obj-$(CONFIG_FB_GEODE)           += geode/
+obj-$(CONFIG_FB_MBX)             += mbx/
 obj-$(CONFIG_FB_I810)             += vgastate.o
 obj-$(CONFIG_FB_NEOMAGIC)         += neofb.o vgastate.o
 obj-$(CONFIG_FB_VIRGE)            += virgefb.o
index e714e8449c1d1bd844485773f06ce9fdd5d3060c..afd146f5f683fed27c6df1cb7b5f17689674ec07 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index f9bc9f777e75e61b2bd895dae2eabaafdea3d8fc..f1ba54f4fc3921ee1ee4816048bcd97c56e54be0 100644 (file)
@@ -45,7 +45,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
index fd95c2dbd4f76d93d44f52a616929f8923a5b32f..70dd8115a4d8883d47a23120189620f8f8fb29a7 100644 (file)
@@ -39,7 +39,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index eaeaf4d1a094e777c8fbffc887c997ba7d336921..1fd22f460b0fa23e990cced9abe9c26f66b04791 100644 (file)
@@ -34,7 +34,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index e69ab65f7843b99c6ee37f3284d8a3fa47777b27..5831893bf7a0d3256cf2e620fcd783102a0a0d2d 100644 (file)
@@ -53,7 +53,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/init.h>
index 72c5891094710d09451ea42e0296909d364145ef..c64a717e2d4b1c4711dd8c32618bddd470f7fc2f 100644 (file)
@@ -52,7 +52,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
@@ -456,6 +455,7 @@ static void do_wait_for_fifo(u16 entries, struct aty128fb_par *par);
 static void wait_for_fifo(u16 entries, struct aty128fb_par *par);
 static void wait_for_idle(struct aty128fb_par *par);
 static u32 depth_to_dst(u32 depth);
+static void aty128_bl_set_power(struct fb_info *info, int power);
 
 #define BIOS_IN8(v)    (readb(bios + (v)))
 #define BIOS_IN16(v)   (readb(bios + (v)) | \
@@ -1258,25 +1258,11 @@ static void aty128_set_lcd_enable(struct aty128fb_par *par, int on)
                reg &= ~LVDS_DISPLAY_DIS;
                aty_st_le32(LVDS_GEN_CNTL, reg);
 #ifdef CONFIG_FB_ATY128_BACKLIGHT
-               mutex_lock(&info->bl_mutex);
-               if (info->bl_dev) {
-                       down(&info->bl_dev->sem);
-                       info->bl_dev->props->update_status(info->bl_dev);
-                       up(&info->bl_dev->sem);
-               }
-               mutex_unlock(&info->bl_mutex);
+               aty128_bl_set_power(info, FB_BLANK_UNBLANK);
 #endif 
        } else {
 #ifdef CONFIG_FB_ATY128_BACKLIGHT
-               mutex_lock(&info->bl_mutex);
-               if (info->bl_dev) {
-                       down(&info->bl_dev->sem);
-                       info->bl_dev->props->brightness = 0;
-                       info->bl_dev->props->power = FB_BLANK_POWERDOWN;
-                       info->bl_dev->props->update_status(info->bl_dev);
-                       up(&info->bl_dev->sem);
-               }
-               mutex_unlock(&info->bl_mutex);
+               aty128_bl_set_power(info, FB_BLANK_POWERDOWN);
 #endif 
                reg = aty_ld_le32(LVDS_GEN_CNTL);
                reg |= LVDS_DISPLAY_DIS;
@@ -1703,6 +1689,7 @@ static int __devinit aty128fb_setup(char *options)
 
 static struct backlight_properties aty128_bl_data;
 
+/* Call with fb_info->bl_mutex held */
 static int aty128_bl_get_level_brightness(struct aty128fb_par *par,
                int level)
 {
@@ -1710,10 +1697,8 @@ static int aty128_bl_get_level_brightness(struct aty128fb_par *par,
        int atylevel;
 
        /* Get and convert the value */
-       mutex_lock(&info->bl_mutex);
        atylevel = MAX_LEVEL -
                (info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL);
-       mutex_unlock(&info->bl_mutex);
 
        if (atylevel < 0)
                atylevel = 0;
@@ -1731,7 +1716,8 @@ static int aty128_bl_get_level_brightness(struct aty128fb_par *par,
 /* That one prevents proper CRT output with LCD off */
 #undef BACKLIGHT_DAC_OFF
 
-static int aty128_bl_update_status(struct backlight_device *bd)
+/* Call with fb_info->bl_mutex held */
+static int __aty128_bl_update_status(struct backlight_device *bd)
 {
        struct aty128fb_par *par = class_get_devdata(&bd->class_dev);
        unsigned int reg = aty_ld_le32(LVDS_GEN_CNTL);
@@ -1784,6 +1770,19 @@ static int aty128_bl_update_status(struct backlight_device *bd)
        return 0;
 }
 
+static int aty128_bl_update_status(struct backlight_device *bd)
+{
+       struct aty128fb_par *par = class_get_devdata(&bd->class_dev);
+       struct fb_info *info = pci_get_drvdata(par->pdev);
+       int ret;
+
+       mutex_lock(&info->bl_mutex);
+       ret = __aty128_bl_update_status(bd);
+       mutex_unlock(&info->bl_mutex);
+
+       return ret;
+}
+
 static int aty128_bl_get_brightness(struct backlight_device *bd)
 {
        return bd->props->brightness;
@@ -1796,6 +1795,16 @@ static struct backlight_properties aty128_bl_data = {
        .max_brightness = (FB_BACKLIGHT_LEVELS - 1),
 };
 
+static void aty128_bl_set_power(struct fb_info *info, int power)
+{
+       mutex_lock(&info->bl_mutex);
+       up(&info->bl_dev->sem);
+       info->bl_dev->props->power = power;
+       __aty128_bl_update_status(info->bl_dev);
+       down(&info->bl_dev->sem);
+       mutex_unlock(&info->bl_mutex);
+}
+
 static void aty128_bl_init(struct aty128fb_par *par)
 {
        struct fb_info *info = pci_get_drvdata(par->pdev);
@@ -2198,12 +2207,8 @@ static int aty128fb_blank(int blank, struct fb_info *fb)
                return 0;
 
 #ifdef CONFIG_FB_ATY128_BACKLIGHT
-       if (machine_is(powermac) && blank) {
-               down(&fb->bl_dev->sem);
-               fb->bl_dev->props->power = FB_BLANK_POWERDOWN;
-               fb->bl_dev->props->update_status(fb->bl_dev);
-               up(&fb->bl_dev->sem);
-       }
+       if (machine_is(powermac) && blank)
+               aty128_bl_set_power(fb, FB_BLANK_POWERDOWN);
 #endif
 
        if (blank & FB_BLANK_VSYNC_SUSPEND)
@@ -2219,14 +2224,12 @@ static int aty128fb_blank(int blank, struct fb_info *fb)
                aty128_set_crt_enable(par, par->crt_on && !blank);
                aty128_set_lcd_enable(par, par->lcd_on && !blank);
        }
+
 #ifdef CONFIG_FB_ATY128_BACKLIGHT
-       if (machine_is(powermac) && !blank) {
-               down(&fb->bl_dev->sem);
-               fb->bl_dev->props->power = FB_BLANK_UNBLANK;
-               fb->bl_dev->props->update_status(fb->bl_dev);
-               up(&fb->bl_dev->sem);
-       }
+       if (machine_is(powermac) && !blank)
+               aty128_bl_set_power(fb, FB_BLANK_UNBLANK);
 #endif
+
        return 0;
 }
 
index 0c9706746d7955393b13c21b02833dc6c3cced76..1507d19f481f8ebe84904a152a4f94333fc8f19e 100644 (file)
@@ -2129,15 +2129,14 @@ static int atyfb_pci_resume(struct pci_dev *pdev)
 
 static struct backlight_properties aty_bl_data;
 
+/* Call with fb_info->bl_mutex held */
 static int aty_bl_get_level_brightness(struct atyfb_par *par, int level)
 {
        struct fb_info *info = pci_get_drvdata(par->pdev);
        int atylevel;
 
        /* Get and convert the value */
-       mutex_lock(&info->bl_mutex);
        atylevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL;
-       mutex_unlock(&info->bl_mutex);
 
        if (atylevel < 0)
                atylevel = 0;
@@ -2147,7 +2146,8 @@ static int aty_bl_get_level_brightness(struct atyfb_par *par, int level)
        return atylevel;
 }
 
-static int aty_bl_update_status(struct backlight_device *bd)
+/* Call with fb_info->bl_mutex held */
+static int __aty_bl_update_status(struct backlight_device *bd)
 {
        struct atyfb_par *par = class_get_devdata(&bd->class_dev);
        unsigned int reg = aty_ld_lcd(LCD_MISC_CNTL, par);
@@ -2172,6 +2172,19 @@ static int aty_bl_update_status(struct backlight_device *bd)
        return 0;
 }
 
+static int aty_bl_update_status(struct backlight_device *bd)
+{
+       struct atyfb_par *par = class_get_devdata(&bd->class_dev);
+       struct fb_info *info = pci_get_drvdata(par->pdev);
+       int ret;
+
+       mutex_lock(&info->bl_mutex);
+       ret = __aty_bl_update_status(bd);
+       mutex_unlock(&info->bl_mutex);
+
+       return ret;
+}
+
 static int aty_bl_get_brightness(struct backlight_device *bd)
 {
        return bd->props->brightness;
@@ -2184,6 +2197,16 @@ static struct backlight_properties aty_bl_data = {
        .max_brightness = (FB_BACKLIGHT_LEVELS - 1),
 };
 
+static void aty_bl_set_power(struct fb_info *info, int power)
+{
+       mutex_lock(&info->bl_mutex);
+       up(&info->bl_dev->sem);
+       info->bl_dev->props->power = power;
+       __aty_bl_update_status(info->bl_dev);
+       down(&info->bl_dev->sem);
+       mutex_unlock(&info->bl_mutex);
+}
+
 static void aty_bl_init(struct atyfb_par *par)
 {
        struct fb_info *info = pci_get_drvdata(par->pdev);
@@ -2790,16 +2813,8 @@ static int atyfb_blank(int blank, struct fb_info *info)
                return 0;
 
 #ifdef CONFIG_PMAC_BACKLIGHT
-       if (machine_is(powermac) && blank > FB_BLANK_NORMAL) {
-               mutex_lock(&info->bl_mutex);
-               if (info->bl_dev) {
-                       down(&info->bl_dev->sem);
-                       info->bl_dev->props->power = FB_BLANK_POWERDOWN;
-                       info->bl_dev->props->update_status(info->bl_dev);
-                       up(&info->bl_dev->sem);
-               }
-               mutex_unlock(&info->bl_mutex);
-       }
+       if (machine_is(powermac) && blank > FB_BLANK_NORMAL)
+               aty_bl_set_power(info, FB_BLANK_POWERDOWN);
 #elif defined(CONFIG_FB_ATY_GENERIC_LCD)
        if (par->lcd_table && blank > FB_BLANK_NORMAL &&
            (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) {
@@ -2830,16 +2845,8 @@ static int atyfb_blank(int blank, struct fb_info *info)
        aty_st_le32(CRTC_GEN_CNTL, gen_cntl, par);
 
 #ifdef CONFIG_PMAC_BACKLIGHT
-       if (machine_is(powermac) && blank <= FB_BLANK_NORMAL) {
-               mutex_lock(&info->bl_mutex);
-               if (info->bl_dev) {
-                       down(&info->bl_dev->sem);
-                       info->bl_dev->props->power = FB_BLANK_UNBLANK;
-                       info->bl_dev->props->update_status(info->bl_dev);
-                       up(&info->bl_dev->sem);
-               }
-               mutex_unlock(&info->bl_mutex);
-       }
+       if (machine_is(powermac) && blank <= FB_BLANK_NORMAL)
+               aty_bl_set_power(info, FB_BLANK_UNBLANK);
 #elif defined(CONFIG_FB_ATY_GENERIC_LCD)
        if (par->lcd_table && blank <= FB_BLANK_NORMAL &&
            (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) {
index 51b78f8de949aac8dfe31e999013eb786b093025..8d85fc58142e62861f5481ff711aabe206bd5f0f 100644 (file)
@@ -58,7 +58,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/time.h>
index 0e465c80ef241f261e7948425eca67c82d1a60a4..73cb426bf2d7db5428ecb348da4b3fc112d2704c 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
@@ -150,12 +149,11 @@ static int chipsfb_blank(int blank, struct fb_info *info)
        mutex_lock(&pmac_backlight_mutex);
 
        if (pmac_backlight) {
-               down(&pmac_backlight->sem);
-
                /* used to disable backlight only for blank > 1, but it seems
                 * useful at blank = 1 too (saves battery, extends backlight
                 * life)
                 */
+               down(&pmac_backlight->sem);
                if (blank)
                        pmac_backlight->props->power = FB_BLANK_POWERDOWN;
                else
index 7355da09c721bc8fa7ad1fee66f51d4356abe7c3..daf43f535a0b971540ed274706cd747a0e30d81e 100644 (file)
@@ -41,7 +41,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index 878707a0439824488cbdd7ae5d81b214e6dd2129..d9315d99445fe79c21d588d7d0e03d4821fc86a8 100644 (file)
@@ -7,9 +7,9 @@
 
 #include <linux/types.h>
 #include <linux/kdev_t.h>
-#include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/vt_kern.h>
+#include <linux/screen_info.h>
 #include <linux/init.h>
 #include <linux/module.h>
 
index 94e9f7069bef085cfa37707e0875b63ffe161801..390439b3d899e54ea31fb96bd21cd3128ac85bff 100644 (file)
@@ -64,7 +64,6 @@
 #include <linux/fs.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>       /* MSch: for IRQ probe */
-#include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/string.h>
 #include <linux/kd.h>
index c89f90edf8ac3cfc4bd3e15e8ed990ec57da0490..52ed12b12acc15b0a4f90e1d4e4fe027112ac6af 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/fs.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/string.h>
 #include <linux/kd.h>
index 03041311711b374a40a4a1194ffd4798db4d5d13..7fa1afeae8dc6d413c86af1741925823fc729960 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
-#include <linux/tty.h>
 #include <linux/kd.h>
 #include <linux/selection.h>
 #include <linux/console.h>
index 5cd5e114d1e67cb9e1f4be2fe9302e6f8ae8d70a..b78eac63459f09d18c928f88f33f6b86cc8155aa 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/console.h>
index 3957fc7523e2495ab397696e21dc8129eb3e39ff..557c563e4aed2033a9ce33ea850a85b87ff35d04 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <linux/module.h>
 #include <linux/string.h>
-#include <linux/tty.h>
 #include <linux/fb.h>
 #include <linux/slab.h>
 
index 45c4f227e56e2a73aaff199979fc62aadbb21531..45586aaabd1e9ab41eec1214606f91caeb596979 100644 (file)
@@ -37,7 +37,6 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/errno.h>
 #include <linux/vt_kern.h>
index 05735ff4e9c5205d311c7cf39e20ff62dcececc9..0a2c10a1abf88cff76baf460d9cfdf96dbd6cc41 100644 (file)
@@ -38,7 +38,6 @@
 #include <linux/sched.h>
 #include <linux/fs.h>
 #include <linux/kernel.h>
-#include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/string.h>
 #include <linux/kd.h>
@@ -48,6 +47,7 @@
 #include <linux/spinlock.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
+#include <linux/screen_info.h>
 #include <linux/smp_lock.h>
 #include <video/vga.h>
 #include <asm/io.h>
index acdd6a103dbb49d97c881274c0314e691382f1e0..8cc6c0e2d27aa74935776168562aa5b1f0d26f1c 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index 2e2924957d8f81a00d335957ada78df74e35eff4..aae6d9c26e8818646c4a44499f4224b0bd91ab5f 100644 (file)
@@ -41,7 +41,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index a3e189f90a7defed0588b66c5896df373813e954..c40e72dafb0e99e8ae8edd877bca9a49e86c66ef 100644 (file)
@@ -81,7 +81,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/zorro.h>
index 5abd3cb006719447792760cfa822213605f4a664..b083ea7e9c69e6c1ea45e0ce84f34c75958678ab 100644 (file)
@@ -2,7 +2,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
index f0a621ecc28801fe7d9b3f192b785e84f955c35a..737257d278f0a05ee5257fb4ba2d48f2ea0723c5 100644 (file)
@@ -48,7 +48,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index 1f98392a43b3c2746b8b51818bac745e09d4b8de..e8b135f3d80d1590bf59cd905f213b701fe83a5a 100644 (file)
@@ -13,7 +13,6 @@
 
 #include <linux/string.h>
 #include <linux/module.h>
-#include <linux/tty.h>
 #include <linux/fb.h>
 #include <linux/slab.h>
 
index 33034f81114d48e64b860528db1cc5c70ab269e0..4fc9df426c1af5fc7fb30c4ee0b96228d0eb03fe 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/slab.h>
 #include <linux/mm.h>
 #include <linux/mman.h>
-#include <linux/tty.h>
+#include <linux/vt.h>
 #include <linux/init.h>
 #include <linux/linux_logo.h>
 #include <linux/proc_fs.h>
index 3ccfff715a5147c18b266b512c9bfbd4342efe96..de93139ccbb5a5cb265eee0706200b12cde5c551 100644 (file)
@@ -26,7 +26,6 @@
  * for more details.
  *
  */
-#include <linux/tty.h>
 #include <linux/fb.h>
 #include <linux/module.h>
 #include <linux/pci.h>
index 605d1a13202098542f9c72f873adc8a0f70c22a7..1b981b6356757a7cf9b26ea5f179ddeb6febf559 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index 4d3a8871d3d108a739db167b0f4745478a7abf3a..bcf9cea54d8ba7448ad298dd75c13648c48d5047 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index 5ef12a3dfa50afc5272da1b33914369ca8629d90..0d3643fc6293ba76880b371779288f99d46306c4 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index 4e39035cf335621481966593d7797ea77e4df965..fb9e67228543b05a1cb6cd7f62703fbd4f032596 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/spinlock.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index 01864767450dbd3e70e47f8060e038d18380854f..4cc6b454265ee8b7ccdd60d439856365bc1ab867 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/init.h>
index abd920a663a04a2fbbfd8446c1183af83ebf7228..91cf3b577d156c4b78dea835d24b80b61461634f 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/init.h>
index fbe8a2c4b04c158b9df60d7f3770f5e934b5098c..a6ca02f2156a810b03cc91161e1aba4644a7531e 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/fb.h>
 #include <linux/init.h>
index 8a0c2d3d3805623ea891d4cc4dea6fa589e1c35d..67f384f867580d638e2c17501f344d803a9a19f7 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index cdbae173d69a4ef393eb7ecd84545204478503f8..ff233b84dec4fc1a3c900b1896459e87446a623f 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/screen_info.h>
 #include <linux/slab.h>
 #include <linux/string.h>
-#include <linux/tty.h>
 
 #include <asm/io.h>
 
index 5f393d985b11270f800cdd84c3f500d04bd9bef7..5715b8ad0ddc87ae0c301c3b432df4d268541446 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index 3f39d84015f1bccb7c96d057fcd71de7806ba55a..06af89d44a0ddc90e06ab7db005de0843d96014a 100644 (file)
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
 #include <linux/pagemap.h>
+#include <linux/screen_info.h>
 
 #include <asm/io.h>
 
index 3b78a57924f0483135fdaffa04af1e017d98d8ca..2a9322f9cfdc3f220c35afac745f648b8f8c764f 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index 2fdbe9b2b04bfcf5dfd68355fdad1037959f5805..f0d614a80f1f797dd394dd1c9d3e7a52406cb5c8 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/mm.h>
 #include <linux/errno.h>
 #include <linux/string.h>
-#include <linux/tty.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
 #include <linux/ioctl.h>
index e6cbd9de944acdaa0ab28f9bc88a76263289fd11..80a043807161fbae1f0e908b6a1f2d2ff56a8355 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/nubus.h>
index b95779b57c0650e69070ebf028aefa9fd96f8651..9c25c2f7966b3c14e755e057b675e3f7b4ce7301 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index f85421bf7cb5365319d8de5076a5dbed38fe4cfb..38c8d38de4fdd5566d065c6e697aa8c6c57637ca 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/init.h>
diff --git a/drivers/video/mbx/Makefile b/drivers/video/mbx/Makefile
new file mode 100644 (file)
index 0000000..16c1165
--- /dev/null
@@ -0,0 +1,4 @@
+# Makefile for the 2700G controller driver.
+
+obj-$(CONFIG_FB_MBX)      += mbxfb.o
+obj-$(CONFIG_FB_MBX_DEBUG) += mbxfbdebugfs.o
diff --git a/drivers/video/mbx/mbxdebugfs.c b/drivers/video/mbx/mbxdebugfs.c
new file mode 100644 (file)
index 0000000..84aab3a
--- /dev/null
@@ -0,0 +1,188 @@
+#include <linux/debugfs.h>
+
+#define BIG_BUFFER_SIZE        (1024)
+
+static char big_buffer[BIG_BUFFER_SIZE];
+
+struct mbxfb_debugfs_data {
+       struct dentry *dir;
+       struct dentry *sysconf;
+       struct dentry *clock;
+       struct dentry *display;
+       struct dentry *gsctl;
+};
+
+static int open_file_generic(struct inode *inode, struct file *file)
+{
+       file->private_data = inode->u.generic_ip;
+       return 0;
+}
+
+static ssize_t write_file_dummy(struct file *file, const char __user *buf,
+                               size_t count, loff_t *ppos)
+{
+       return count;
+}
+
+static ssize_t sysconf_read_file(struct file *file, char __user *userbuf,
+                                size_t count, loff_t *ppos)
+{
+       char * s = big_buffer;
+
+       s += sprintf(s, "SYSCFG = %08lx\n", SYSCFG);
+       s += sprintf(s, "PFBASE = %08lx\n", PFBASE);
+       s += sprintf(s, "PFCEIL = %08lx\n", PFCEIL);
+       s += sprintf(s, "POLLFLAG = %08lx\n", POLLFLAG);
+       s += sprintf(s, "SYSRST = %08lx\n", SYSRST);
+
+       return  simple_read_from_buffer(userbuf, count, ppos,
+                                       big_buffer, s-big_buffer);
+}
+
+
+static ssize_t gsctl_read_file(struct file *file, char __user *userbuf,
+                              size_t count, loff_t *ppos)
+{
+       char * s = big_buffer;
+
+       s += sprintf(s, "GSCTRL = %08lx\n", GSCTRL);
+       s += sprintf(s, "VSCTRL = %08lx\n", VSCTRL);
+       s += sprintf(s, "GBBASE = %08lx\n", GBBASE);
+       s += sprintf(s, "VBBASE = %08lx\n", VBBASE);
+       s += sprintf(s, "GDRCTRL = %08lx\n", GDRCTRL);
+       s += sprintf(s, "VCMSK = %08lx\n", VCMSK);
+       s += sprintf(s, "GSCADR = %08lx\n", GSCADR);
+       s += sprintf(s, "VSCADR = %08lx\n", VSCADR);
+       s += sprintf(s, "VUBASE = %08lx\n", VUBASE);
+       s += sprintf(s, "VVBASE = %08lx\n", VVBASE);
+       s += sprintf(s, "GSADR = %08lx\n", GSADR);
+       s += sprintf(s, "VSADR = %08lx\n", VSADR);
+       s += sprintf(s, "HCCTRL = %08lx\n", HCCTRL);
+       s += sprintf(s, "HCSIZE = %08lx\n", HCSIZE);
+       s += sprintf(s, "HCPOS = %08lx\n", HCPOS);
+       s += sprintf(s, "HCBADR = %08lx\n", HCBADR);
+       s += sprintf(s, "HCCKMSK = %08lx\n", HCCKMSK);
+       s += sprintf(s, "GPLUT = %08lx\n", GPLUT);
+
+       return  simple_read_from_buffer(userbuf, count, ppos,
+                                       big_buffer, s-big_buffer);
+}
+
+static ssize_t display_read_file(struct file *file, char __user *userbuf,
+                                size_t count, loff_t *ppos)
+{
+       char * s = big_buffer;
+
+       s += sprintf(s, "DSCTRL = %08lx\n", DSCTRL);
+       s += sprintf(s, "DHT01 = %08lx\n", DHT01);
+       s += sprintf(s, "DHT02 = %08lx\n", DHT02);
+       s += sprintf(s, "DHT03 = %08lx\n", DHT03);
+       s += sprintf(s, "DVT01 = %08lx\n", DVT01);
+       s += sprintf(s, "DVT02 = %08lx\n", DVT02);
+       s += sprintf(s, "DVT03 = %08lx\n", DVT03);
+       s += sprintf(s, "DBCOL = %08lx\n", DBCOL);
+       s += sprintf(s, "BGCOLOR = %08lx\n", BGCOLOR);
+       s += sprintf(s, "DINTRS = %08lx\n", DINTRS);
+       s += sprintf(s, "DINTRE = %08lx\n", DINTRE);
+       s += sprintf(s, "DINTRCNT = %08lx\n", DINTRCNT);
+       s += sprintf(s, "DSIG = %08lx\n", DSIG);
+       s += sprintf(s, "DMCTRL = %08lx\n", DMCTRL);
+       s += sprintf(s, "CLIPCTRL = %08lx\n", CLIPCTRL);
+       s += sprintf(s, "SPOCTRL = %08lx\n", SPOCTRL);
+       s += sprintf(s, "SVCTRL = %08lx\n", SVCTRL);
+       s += sprintf(s, "DLSTS = %08lx\n", DLSTS);
+       s += sprintf(s, "DLLCTRL = %08lx\n", DLLCTRL);
+       s += sprintf(s, "DVLNUM = %08lx\n", DVLNUM);
+       s += sprintf(s, "DUCTRL = %08lx\n", DUCTRL);
+       s += sprintf(s, "DVECTRL = %08lx\n", DVECTRL);
+       s += sprintf(s, "DHDET = %08lx\n", DHDET);
+       s += sprintf(s, "DVDET = %08lx\n", DVDET);
+       s += sprintf(s, "DODMSK = %08lx\n", DODMSK);
+       s += sprintf(s, "CSC01 = %08lx\n", CSC01);
+       s += sprintf(s, "CSC02 = %08lx\n", CSC02);
+       s += sprintf(s, "CSC03 = %08lx\n", CSC03);
+       s += sprintf(s, "CSC04 = %08lx\n", CSC04);
+       s += sprintf(s, "CSC05 = %08lx\n", CSC05);
+
+       return  simple_read_from_buffer(userbuf, count, ppos,
+                                       big_buffer, s-big_buffer);
+}
+
+static ssize_t clock_read_file(struct file *file, char __user *userbuf,
+                              size_t count, loff_t *ppos)
+{
+       char * s = big_buffer;
+
+       s += sprintf(s, "SYSCLKSRC = %08lx\n", SYSCLKSRC);
+       s += sprintf(s, "PIXCLKSRC = %08lx\n", PIXCLKSRC);
+       s += sprintf(s, "CLKSLEEP = %08lx\n", CLKSLEEP);
+       s += sprintf(s, "COREPLL = %08lx\n", COREPLL);
+       s += sprintf(s, "DISPPLL = %08lx\n", DISPPLL);
+       s += sprintf(s, "PLLSTAT = %08lx\n", PLLSTAT);
+       s += sprintf(s, "VOVRCLK = %08lx\n", VOVRCLK);
+       s += sprintf(s, "PIXCLK = %08lx\n", PIXCLK);
+       s += sprintf(s, "MEMCLK = %08lx\n", MEMCLK);
+       s += sprintf(s, "M24CLK = %08lx\n", M24CLK);
+       s += sprintf(s, "MBXCLK = %08lx\n", MBXCLK);
+       s += sprintf(s, "SDCLK = %08lx\n", SDCLK);
+       s += sprintf(s, "PIXCLKDIV = %08lx\n", PIXCLKDIV);
+
+       return  simple_read_from_buffer(userbuf, count, ppos,
+                                       big_buffer, s-big_buffer);
+}
+
+static struct file_operations sysconf_fops = {
+       .read = sysconf_read_file,
+       .write = write_file_dummy,
+       .open = open_file_generic,
+};
+
+static struct file_operations clock_fops = {
+       .read = clock_read_file,
+       .write = write_file_dummy,
+       .open = open_file_generic,
+};
+
+static struct file_operations display_fops = {
+       .read = display_read_file,
+       .write = write_file_dummy,
+       .open = open_file_generic,
+};
+
+static struct file_operations gsctl_fops = {
+       .read = gsctl_read_file,
+       .write = write_file_dummy,
+       .open = open_file_generic,
+};
+
+
+static void __devinit mbxfb_debugfs_init(struct fb_info *fbi)
+{
+       struct mbxfb_info *mfbi = fbi->par;
+       struct mbxfb_debugfs_data *dbg;
+
+       dbg = kzalloc(sizeof(struct mbxfb_debugfs_data), GFP_KERNEL);
+       mfbi->debugfs_data = dbg;
+
+       dbg->dir = debugfs_create_dir("mbxfb", NULL);
+       dbg->sysconf = debugfs_create_file("sysconf", 0444, dbg->dir,
+                                     fbi, &sysconf_fops);
+       dbg->clock = debugfs_create_file("clock", 0444, dbg->dir,
+                                   fbi, &clock_fops);
+       dbg->display = debugfs_create_file("display", 0444, dbg->dir,
+                                     fbi, &display_fops);
+       dbg->gsctl = debugfs_create_file("gsctl", 0444, dbg->dir,
+                                   fbi, &gsctl_fops);
+}
+
+static void __devexit mbxfb_debugfs_remove(struct fb_info *fbi)
+{
+       struct mbxfb_info *mfbi = fbi->par;
+       struct mbxfb_debugfs_data *dbg = mfbi->debugfs_data;
+
+       debugfs_remove(dbg->gsctl);
+       debugfs_remove(dbg->display);
+       debugfs_remove(dbg->clock);
+       debugfs_remove(dbg->sysconf);
+       debugfs_remove(dbg->dir);
+}
diff --git a/drivers/video/mbx/mbxfb.c b/drivers/video/mbx/mbxfb.c
new file mode 100644 (file)
index 0000000..6849ab7
--- /dev/null
@@ -0,0 +1,683 @@
+/*
+ *  linux/drivers/video/mbx/mbxfb.c
+ *
+ *  Copyright (C) 2006 Compulab, Ltd.
+ *  Mike Rapoport <mike@compulab.co.il>
+ *
+ *   Based on pxafb.c
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file COPYING in the main directory of this archive for
+ * more details.
+ *
+ *   Intel 2700G (Marathon) Graphics Accelerator Frame Buffer Driver
+ *
+ */
+
+#include <linux/delay.h>
+#include <linux/fb.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+
+#include <asm/io.h>
+
+#include <video/mbxfb.h>
+
+#include "regs.h"
+#include "reg_bits.h"
+
+static unsigned long virt_base_2700;
+
+#define MIN_XRES       16
+#define MIN_YRES       16
+#define MAX_XRES       2048
+#define MAX_YRES       2048
+
+#define MAX_PALETTES   16
+
+/* FIXME: take care of different chip revisions with different sizes
+   of ODFB */
+#define MEMORY_OFFSET  0x60000
+
+struct mbxfb_info {
+       struct device *dev;
+
+       struct resource *fb_res;
+       struct resource *fb_req;
+
+       struct resource *reg_res;
+       struct resource *reg_req;
+
+       void __iomem *fb_virt_addr;
+       unsigned long fb_phys_addr;
+
+       void __iomem *reg_virt_addr;
+       unsigned long reg_phys_addr;
+
+       int (*platform_probe) (struct fb_info * fb);
+       int (*platform_remove) (struct fb_info * fb);
+
+       u32 pseudo_palette[MAX_PALETTES];
+#ifdef CONFIG_FB_MBX_DEBUG
+       void *debugfs_data;
+#endif
+
+};
+
+static struct fb_var_screeninfo mbxfb_default __devinitdata = {
+       .xres = 640,
+       .yres = 480,
+       .xres_virtual = 640,
+       .yres_virtual = 480,
+       .bits_per_pixel = 16,
+       .red = {11, 5, 0},
+       .green = {5, 6, 0},
+       .blue = {0, 5, 0},
+       .activate = FB_ACTIVATE_TEST,
+       .height = -1,
+       .width = -1,
+       .pixclock = 40000,
+       .left_margin = 48,
+       .right_margin = 16,
+       .upper_margin = 33,
+       .lower_margin = 10,
+       .hsync_len = 96,
+       .vsync_len = 2,
+       .vmode = FB_VMODE_NONINTERLACED,
+       .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
+
+static struct fb_fix_screeninfo mbxfb_fix  __devinitdata = {
+       .id = "MBX",
+       .type = FB_TYPE_PACKED_PIXELS,
+       .visual = FB_VISUAL_TRUECOLOR,
+       .xpanstep = 0,
+       .ypanstep = 0,
+       .ywrapstep = 0,
+       .accel = FB_ACCEL_NONE,
+};
+
+struct pixclock_div {
+       u8 m;
+       u8 n;
+       u8 p;
+};
+
+static unsigned int mbxfb_get_pixclock(unsigned int pixclock_ps,
+                                      struct pixclock_div *div)
+{
+       u8 m, n, p;
+       unsigned int err = 0;
+       unsigned int min_err = ~0x0;
+       unsigned int clk;
+       unsigned int best_clk = 0;
+       unsigned int ref_clk = 13000;   /* FIXME: take from platform data */
+       unsigned int pixclock;
+
+       /* convert pixclock to KHz */
+       pixclock = PICOS2KHZ(pixclock_ps);
+
+       for (m = 1; m < 64; m++) {
+               for (n = 1; n < 8; n++) {
+                       for (p = 0; p < 8; p++) {
+                               clk = (ref_clk * m) / (n * (1 << p));
+                               err = (clk > pixclock) ? (clk - pixclock) :
+                                       (pixclock - clk);
+                               if (err < min_err) {
+                                       min_err = err;
+                                       best_clk = clk;
+                                       div->m = m;
+                                       div->n = n;
+                                       div->p = p;
+                               }
+                       }
+               }
+       }
+       return KHZ2PICOS(best_clk);
+}
+
+static int mbxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+                          u_int trans, struct fb_info *info)
+{
+       u32 val, ret = 1;
+
+       if (regno < MAX_PALETTES) {
+               u32 *pal = info->pseudo_palette;
+
+               val = (red & 0xf800) | ((green & 0xfc00) >> 5) |
+                       ((blue & 0xf800) >> 11);
+               pal[regno] = val;
+               ret = 0;
+       }
+
+       return ret;
+}
+
+static int mbxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
+{
+       struct pixclock_div div;
+
+       var->pixclock = mbxfb_get_pixclock(var->pixclock, &div);
+
+       if (var->xres < MIN_XRES)
+               var->xres = MIN_XRES;
+       if (var->yres < MIN_YRES)
+               var->yres = MIN_YRES;
+       if (var->xres > MAX_XRES)
+               return -EINVAL;
+       if (var->yres > MAX_YRES)
+               return -EINVAL;
+       var->xres_virtual = max(var->xres_virtual, var->xres);
+       var->yres_virtual = max(var->yres_virtual, var->yres);
+
+       switch (var->bits_per_pixel) {
+               /* 8 bits-per-pixel is not supported yet */
+       case 8:
+               return -EINVAL;
+       case 16:
+               var->green.length = (var->green.length == 5) ? 5 : 6;
+               var->red.length = 5;
+               var->blue.length = 5;
+               var->transp.length = 6 - var->green.length;
+               var->blue.offset = 0;
+               var->green.offset = 5;
+               var->red.offset = 5 + var->green.length;
+               var->transp.offset = (5 + var->red.offset) & 15;
+               break;
+       case 24:                /* RGB 888   */
+       case 32:                /* RGBA 8888 */
+               var->red.offset = 16;
+               var->red.length = 8;
+               var->green.offset = 8;
+               var->green.length = 8;
+               var->blue.offset = 0;
+               var->blue.length = 8;
+               var->transp.length = var->bits_per_pixel - 24;
+               var->transp.offset = (var->transp.length) ? 24 : 0;
+               break;
+       }
+       var->red.msb_right = 0;
+       var->green.msb_right = 0;
+       var->blue.msb_right = 0;
+       var->transp.msb_right = 0;
+
+       return 0;
+}
+
+static int mbxfb_set_par(struct fb_info *info)
+{
+       struct fb_var_screeninfo *var = &info->var;
+       struct pixclock_div div;
+       ushort hbps, ht, hfps, has;
+       ushort vbps, vt, vfps, vas;
+       u32 gsctrl = readl(GSCTRL);
+       u32 gsadr = readl(GSADR);
+
+       info->fix.line_length = var->xres_virtual * var->bits_per_pixel / 8;
+
+       /* setup color mode */
+       gsctrl &= ~(FMsk(GSCTRL_GPIXFMT));
+       /* FIXME: add *WORKING* support for 8-bits per color */
+       if (info->var.bits_per_pixel == 8) {
+               return -EINVAL;
+       } else {
+               fb_dealloc_cmap(&info->cmap);
+               gsctrl &= ~GSCTRL_LUT_EN;
+
+               info->fix.visual = FB_VISUAL_TRUECOLOR;
+               switch (info->var.bits_per_pixel) {
+               case 16:
+                       if (info->var.green.length == 5)
+                               gsctrl |= GSCTRL_GPIXFMT_ARGB1555;
+                       else
+                               gsctrl |= GSCTRL_GPIXFMT_RGB565;
+                       break;
+               case 24:
+                       gsctrl |= GSCTRL_GPIXFMT_RGB888;
+                       break;
+               case 32:
+                       gsctrl |= GSCTRL_GPIXFMT_ARGB8888;
+                       break;
+               }
+       }
+
+       /* setup resolution */
+       gsctrl &= ~(FMsk(GSCTRL_GSWIDTH) | FMsk(GSCTRL_GSHEIGHT));
+       gsctrl |= Gsctrl_Width(info->var.xres - 1) |
+               Gsctrl_Height(info->var.yres - 1);
+       writel(gsctrl, GSCTRL);
+       udelay(1000);
+
+       gsadr &= ~(FMsk(GSADR_SRCSTRIDE));
+       gsadr |= Gsadr_Srcstride(info->var.xres * info->var.bits_per_pixel /
+                                (8 * 16) - 1);
+       writel(gsadr, GSADR);
+       udelay(1000);
+
+       /* setup timings */
+       var->pixclock = mbxfb_get_pixclock(info->var.pixclock, &div);
+
+       writel((Disp_Pll_M(div.m) | Disp_Pll_N(div.n) |
+               Disp_Pll_P(div.p) | DISP_PLL_EN), DISPPLL);
+
+       hbps = var->hsync_len;
+       has = hbps + var->left_margin;
+       hfps = has + var->xres;
+       ht = hfps + var->right_margin;
+
+       vbps = var->vsync_len;
+       vas = vbps + var->upper_margin;
+       vfps = vas + var->yres;
+       vt = vfps + var->lower_margin;
+
+       writel((Dht01_Hbps(hbps) | Dht01_Ht(ht)), DHT01);
+       writel((Dht02_Hlbs(has) | Dht02_Has(has)), DHT02);
+       writel((Dht03_Hfps(hfps) | Dht03_Hrbs(hfps)), DHT03);
+       writel((Dhdet_Hdes(has) | Dhdet_Hdef(hfps)), DHDET);
+
+       writel((Dvt01_Vbps(vbps) | Dvt01_Vt(vt)), DVT01);
+       writel((Dvt02_Vtbs(vas) | Dvt02_Vas(vas)), DVT02);
+       writel((Dvt03_Vfps(vfps) | Dvt03_Vbbs(vfps)), DVT03);
+       writel((Dvdet_Vdes(vas) | Dvdet_Vdef(vfps)), DVDET);
+       writel((Dvectrl_Vevent(vfps) | Dvectrl_Vfetch(vbps)), DVECTRL);
+
+       writel((readl(DSCTRL) | DSCTRL_SYNCGEN_EN), DSCTRL);
+
+       return 0;
+}
+
+static int mbxfb_blank(int blank, struct fb_info *info)
+{
+       switch (blank) {
+       case FB_BLANK_POWERDOWN:
+       case FB_BLANK_VSYNC_SUSPEND:
+       case FB_BLANK_HSYNC_SUSPEND:
+       case FB_BLANK_NORMAL:
+               writel((readl(DSCTRL) & ~DSCTRL_SYNCGEN_EN), DSCTRL);
+               udelay(1000);
+               writel((readl(PIXCLK) & ~PIXCLK_EN), PIXCLK);
+               udelay(1000);
+               writel((readl(VOVRCLK) & ~VOVRCLK_EN), VOVRCLK);
+               udelay(1000);
+               break;
+       case FB_BLANK_UNBLANK:
+               writel((readl(DSCTRL) | DSCTRL_SYNCGEN_EN), DSCTRL);
+               udelay(1000);
+               writel((readl(PIXCLK) | PIXCLK_EN), PIXCLK);
+               udelay(1000);
+               break;
+       }
+       return 0;
+}
+
+static struct fb_ops mbxfb_ops = {
+       .owner = THIS_MODULE,
+       .fb_check_var = mbxfb_check_var,
+       .fb_set_par = mbxfb_set_par,
+       .fb_setcolreg = mbxfb_setcolreg,
+       .fb_fillrect = cfb_fillrect,
+       .fb_copyarea = cfb_copyarea,
+       .fb_imageblit = cfb_imageblit,
+       .fb_blank = mbxfb_blank,
+};
+
+/*
+  Enable external SDRAM controller. Assume that all clocks are active
+  by now.
+*/
+static void __devinit setup_memc(struct fb_info *fbi)
+{
+       struct mbxfb_info *mfbi = fbi->par;
+       unsigned long tmp;
+       int i;
+
+       /* FIXME: use platfrom specific parameters */
+       /* setup SDRAM controller */
+       writel((LMCFG_LMC_DS | LMCFG_LMC_TS | LMCFG_LMD_TS |
+               LMCFG_LMA_TS),
+              LMCFG);
+       udelay(1000);
+
+       writel(LMPWR_MC_PWR_ACT, LMPWR);
+       udelay(1000);
+
+       /* setup SDRAM timings */
+       writel((Lmtim_Tras(7) | Lmtim_Trp(3) | Lmtim_Trcd(3) |
+               Lmtim_Trc(9) | Lmtim_Tdpl(2)),
+              LMTIM);
+       udelay(1000);
+       /* setup SDRAM refresh rate */
+       writel(0xc2b, LMREFRESH);
+       udelay(1000);
+       /* setup SDRAM type parameters */
+       writel((LMTYPE_CASLAT_3 | LMTYPE_BKSZ_2 | LMTYPE_ROWSZ_11 |
+               LMTYPE_COLSZ_8),
+              LMTYPE);
+       udelay(1000);
+       /* enable memory controller */
+       writel(LMPWR_MC_PWR_ACT, LMPWR);
+       udelay(1000);
+
+       /* perform dummy reads */
+       for ( i = 0; i < 16; i++ ) {
+               tmp = readl(fbi->screen_base);
+       }
+}
+
+static void enable_clocks(struct fb_info *fbi)
+{
+       /* enable clocks */
+       writel(SYSCLKSRC_PLL_2, SYSCLKSRC);
+       udelay(1000);
+       writel(PIXCLKSRC_PLL_1, PIXCLKSRC);
+       udelay(1000);
+       writel(0x00000000, CLKSLEEP);
+       udelay(1000);
+       writel((Core_Pll_M(0x17) | Core_Pll_N(0x3) | Core_Pll_P(0x0) |
+               CORE_PLL_EN),
+              COREPLL);
+       udelay(1000);
+       writel((Disp_Pll_M(0x1b) | Disp_Pll_N(0x7) | Disp_Pll_P(0x1) |
+               DISP_PLL_EN),
+              DISPPLL);
+
+       writel(0x00000000, VOVRCLK);
+       udelay(1000);
+       writel(PIXCLK_EN, PIXCLK);
+       udelay(1000);
+       writel(MEMCLK_EN, MEMCLK);
+       udelay(1000);
+       writel(0x00000006, M24CLK);
+       udelay(1000);
+       writel(0x00000006, MBXCLK);
+       udelay(1000);
+       writel(SDCLK_EN, SDCLK);
+       udelay(1000);
+       writel(0x00000001, PIXCLKDIV);
+       udelay(1000);
+}
+
+static void __devinit setup_graphics(struct fb_info *fbi)
+{
+       unsigned long gsctrl;
+
+       gsctrl = GSCTRL_GAMMA_EN | Gsctrl_Width(fbi->var.xres - 1) |
+               Gsctrl_Height(fbi->var.yres - 1);
+       switch (fbi->var.bits_per_pixel) {
+       case 16:
+               if (fbi->var.green.length == 5)
+                       gsctrl |= GSCTRL_GPIXFMT_ARGB1555;
+               else
+                       gsctrl |= GSCTRL_GPIXFMT_RGB565;
+               break;
+       case 24:
+               gsctrl |= GSCTRL_GPIXFMT_RGB888;
+               break;
+       case 32:
+               gsctrl |= GSCTRL_GPIXFMT_ARGB8888;
+               break;
+       }
+
+       writel(gsctrl, GSCTRL);
+       udelay(1000);
+       writel(0x00000000, GBBASE);
+       udelay(1000);
+       writel(0x00ffffff, GDRCTRL);
+       udelay(1000);
+       writel((GSCADR_STR_EN | Gscadr_Gbase_Adr(0x6000)), GSCADR);
+       udelay(1000);
+       writel(0x00000000, GPLUT);
+       udelay(1000);
+}
+
+static void __devinit setup_display(struct fb_info *fbi)
+{
+       unsigned long dsctrl = 0;
+
+       dsctrl = DSCTRL_BLNK_POL;
+       if (fbi->var.sync & FB_SYNC_HOR_HIGH_ACT)
+               dsctrl |= DSCTRL_HS_POL;
+       if (fbi->var.sync & FB_SYNC_VERT_HIGH_ACT)
+               dsctrl |= DSCTRL_VS_POL;
+       writel(dsctrl, DSCTRL);
+       udelay(1000);
+       writel(0xd0303010, DMCTRL);
+       udelay(1000);
+       writel((readl(DSCTRL) | DSCTRL_SYNCGEN_EN), DSCTRL);
+}
+
+static void __devinit enable_controller(struct fb_info *fbi)
+{
+       writel(SYSRST_RST, SYSRST);
+       udelay(1000);
+
+
+       enable_clocks(fbi);
+       setup_memc(fbi);
+       setup_graphics(fbi);
+       setup_display(fbi);
+}
+
+#ifdef CONFIG_PM
+/*
+ * Power management hooks.  Note that we won't be called from IRQ context,
+ * unlike the blank functions above, so we may sleep.
+ */
+static int mbxfb_suspend(struct platform_device *dev, pm_message_t state)
+{
+       /* make frame buffer memory enter self-refresh mode */
+       writel(LMPWR_MC_PWR_SRM, LMPWR);
+       while (LMPWRSTAT != LMPWRSTAT_MC_PWR_SRM)
+               ; /* empty statement */
+
+       /* reset the device, since it's initial state is 'mostly sleeping' */
+       writel(SYSRST_RST, SYSRST);
+       return 0;
+}
+
+static int mbxfb_resume(struct platform_device *dev)
+{
+       struct fb_info *fbi = platform_get_drvdata(dev);
+
+       enable_clocks(fbi);
+/*     setup_graphics(fbi); */
+/*     setup_display(fbi); */
+
+       writel((readl(DSCTRL) | DSCTRL_SYNCGEN_EN), DSCTRL);
+       return 0;
+}
+#else
+#define mbxfb_suspend  NULL
+#define mbxfb_resume   NULL
+#endif
+
+/* debugfs entries */
+#ifndef CONFIG_FB_MBX_DEBUG
+#define mbxfb_debugfs_init(x)  do {} while(0)
+#define mbxfb_debugfs_remove(x)        do {} while(0)
+#endif
+
+#define res_size(_r) (((_r)->end - (_r)->start) + 1)
+
+static int __devinit mbxfb_probe(struct platform_device *dev)
+{
+       int ret;
+       struct fb_info *fbi;
+       struct mbxfb_info *mfbi;
+       struct mbxfb_platform_data *pdata;
+
+       dev_dbg(dev, "mbxfb_probe\n");
+
+       fbi = framebuffer_alloc(sizeof(struct mbxfb_info), &dev->dev);
+       if (fbi == NULL) {
+               dev_err(&dev->dev, "framebuffer_alloc failed\n");
+               return -ENOMEM;
+       }
+
+       mfbi = fbi->par;
+       fbi->pseudo_palette = mfbi->pseudo_palette;
+       pdata = dev->dev.platform_data;
+       if (pdata->probe)
+               mfbi->platform_probe = pdata->probe;
+       if (pdata->remove)
+               mfbi->platform_remove = pdata->remove;
+
+       mfbi->fb_res = platform_get_resource(dev, IORESOURCE_MEM, 0);
+       mfbi->reg_res = platform_get_resource(dev, IORESOURCE_MEM, 1);
+
+       if (!mfbi->fb_res || !mfbi->reg_res) {
+               dev_err(&dev->dev, "no resources found\n");
+               ret = -ENODEV;
+               goto err1;
+       }
+
+       mfbi->fb_req = request_mem_region(mfbi->fb_res->start,
+                                         res_size(mfbi->fb_res), dev->name);
+       if (mfbi->fb_req == NULL) {
+               dev_err(&dev->dev, "failed to claim framebuffer memory\n");
+               ret = -EINVAL;
+               goto err1;
+       }
+       mfbi->fb_phys_addr = mfbi->fb_res->start;
+
+       mfbi->reg_req = request_mem_region(mfbi->reg_res->start,
+                                          res_size(mfbi->reg_res), dev->name);
+       if (mfbi->reg_req == NULL) {
+               dev_err(&dev->dev, "failed to claim Marathon registers\n");
+               ret = -EINVAL;
+               goto err2;
+       }
+       mfbi->reg_phys_addr = mfbi->reg_res->start;
+
+       mfbi->reg_virt_addr = ioremap_nocache(mfbi->reg_phys_addr,
+                                             res_size(mfbi->reg_req));
+       if (!mfbi->reg_virt_addr) {
+               dev_err(&dev->dev, "failed to ioremap Marathon registers\n");
+               ret = -EINVAL;
+               goto err3;
+       }
+       virt_base_2700 = (unsigned long)mfbi->reg_virt_addr;
+
+       mfbi->fb_virt_addr = ioremap_nocache(mfbi->fb_phys_addr,
+                                            res_size(mfbi->fb_req));
+       if (!mfbi->reg_virt_addr) {
+               dev_err(&dev->dev, "failed to ioremap frame buffer\n");
+               ret = -EINVAL;
+               goto err4;
+       }
+
+       /* FIXME: get from platform */
+       fbi->screen_base = (char __iomem *)(mfbi->fb_virt_addr + 0x60000);
+       fbi->screen_size = 8 * 1024 * 1024;     /* 8 Megs */
+       fbi->fbops = &mbxfb_ops;
+
+       fbi->var = mbxfb_default;
+       fbi->fix = mbxfb_fix;
+       fbi->fix.smem_start = mfbi->fb_phys_addr + 0x60000;
+       fbi->fix.smem_len = 8 * 1024 * 1024;
+       fbi->fix.line_length = 640 * 2;
+
+       ret = fb_alloc_cmap(&fbi->cmap, 256, 0);
+       if (ret < 0) {
+               dev_err(&dev->dev, "fb_alloc_cmap failed\n");
+               ret = -EINVAL;
+               goto err5;
+       }
+
+       platform_set_drvdata(dev, fbi);
+
+       printk(KERN_INFO "fb%d: mbx frame buffer device\n", fbi->node);
+
+       if (mfbi->platform_probe)
+               mfbi->platform_probe(fbi);
+
+       enable_controller(fbi);
+
+       mbxfb_debugfs_init(fbi);
+
+       ret = register_framebuffer(fbi);
+       if (ret < 0) {
+               dev_err(&dev->dev, "register_framebuffer failed\n");
+               ret = -EINVAL;
+               goto err6;
+       }
+
+       return 0;
+
+err6:
+       fb_dealloc_cmap(&fbi->cmap);
+err5:
+       iounmap(mfbi->fb_virt_addr);
+err4:
+       iounmap(mfbi->reg_virt_addr);
+err3:
+       release_mem_region(mfbi->reg_res->start, res_size(mfbi->reg_res));
+err2:
+       release_mem_region(mfbi->fb_res->start, res_size(mfbi->fb_res));
+err1:
+       framebuffer_release(fbi);
+
+       return ret;
+}
+
+static int __devexit mbxfb_remove(struct platform_device *dev)
+{
+       struct fb_info *fbi = platform_get_drvdata(dev);
+
+       writel(SYSRST_RST, SYSRST);
+       udelay(1000);
+
+       mbxfb_debugfs_remove(fbi);
+
+       if (fbi) {
+               struct mbxfb_info *mfbi = fbi->par;
+
+               unregister_framebuffer(fbi);
+               if (mfbi) {
+                       if (mfbi->platform_remove)
+                               mfbi->platform_remove(fbi);
+
+                       if (mfbi->fb_virt_addr)
+                               iounmap(mfbi->fb_virt_addr);
+                       if (mfbi->reg_virt_addr)
+                               iounmap(mfbi->reg_virt_addr);
+                       if (mfbi->reg_req)
+                               release_mem_region(mfbi->reg_req->start,
+                                                  res_size(mfbi->reg_req));
+                       if (mfbi->fb_req)
+                               release_mem_region(mfbi->fb_req->start,
+                                                  res_size(mfbi->fb_req));
+               }
+               framebuffer_release(fbi);
+       }
+
+       return 0;
+}
+
+static struct platform_driver mbxfb_driver = {
+       .probe = mbxfb_probe,
+       .remove = mbxfb_remove,
+       .suspend = mbxfb_suspend,
+       .resume = mbxfb_resume,
+       .driver = {
+               .name = "mbx-fb",
+       },
+};
+
+int __devinit mbxfb_init(void)
+{
+       return platform_driver_register(&mbxfb_driver);
+}
+
+static void __devexit mbxfb_exit(void)
+{
+       platform_driver_unregister(&mbxfb_driver);
+}
+
+module_init(mbxfb_init);
+module_exit(mbxfb_exit);
+
+MODULE_DESCRIPTION("loadable framebuffer driver for Marathon device");
+MODULE_AUTHOR("Mike Rapoport, Compulab");
+MODULE_LICENSE("GPL");
diff --git a/drivers/video/mbx/reg_bits.h b/drivers/video/mbx/reg_bits.h
new file mode 100644 (file)
index 0000000..c226a8e
--- /dev/null
@@ -0,0 +1,418 @@
+#ifndef __REG_BITS_2700G_
+#define __REG_BITS_2700G_
+
+/* use defines from asm-arm/arch-pxa/bitfields.h for bit fields access */
+#define UData(Data)    ((unsigned long) (Data))
+#define Fld(Size, Shft)        (((Size) << 16) + (Shft))
+#define FSize(Field)   ((Field) >> 16)
+#define FShft(Field)   ((Field) & 0x0000FFFF)
+#define FMsk(Field)    (((UData (1) << FSize (Field)) - 1) << FShft (Field))
+#define FAlnMsk(Field) ((UData (1) << FSize (Field)) - 1)
+#define F1stBit(Field) (UData (1) << FShft (Field))
+
+#define SYSRST_RST     (1 << 0)
+
+/* SYSCLKSRC - SYSCLK Source Control Register */
+#define SYSCLKSRC_SEL  Fld(2,0)
+#define SYSCLKSRC_REF  ((0x0) << FShft(SYSCLKSRC_SEL))
+#define SYSCLKSRC_PLL_1        ((0x1) << FShft(SYSCLKSRC_SEL))
+#define SYSCLKSRC_PLL_2        ((0x2) << FShft(SYSCLKSRC_SEL))
+
+/* PIXCLKSRC - PIXCLK Source Control Register */
+#define PIXCLKSRC_SEL  Fld(2,0)
+#define PIXCLKSRC_REF  ((0x0) << FShft(PIXCLKSRC_SEL))
+#define PIXCLKSRC_PLL_1        ((0x1) << FShft(PIXCLKSRC_SEL))
+#define PIXCLKSRC_PLL_2        ((0x2) << FShft(PIXCLKSRC_SEL))
+
+/* Clock Disable Register */
+#define CLKSLEEP_SLP   (1 << 0)
+
+/* Core PLL Control Register */
+#define CORE_PLL_M     Fld(6,7)
+#define Core_Pll_M(x)  ((x) << FShft(CORE_PLL_M))
+#define CORE_PLL_N     Fld(3,4)
+#define Core_Pll_N(x)  ((x) << FShft(CORE_PLL_N))
+#define CORE_PLL_P     Fld(3,1)
+#define Core_Pll_P(x)  ((x) << FShft(CORE_PLL_P))
+#define CORE_PLL_EN    (1 << 0)
+
+/* Display PLL Control Register */
+#define DISP_PLL_M     Fld(6,7)
+#define Disp_Pll_M(x)  ((x) << FShft(DISP_PLL_M))
+#define DISP_PLL_N     Fld(3,4)
+#define Disp_Pll_N(x)  ((x) << FShft(DISP_PLL_N))
+#define DISP_PLL_P     Fld(3,1)
+#define Disp_Pll_P(x)  ((x) << FShft(DISP_PLL_P))
+#define DISP_PLL_EN    (1 << 0)
+
+/* PLL status register */
+#define PLLSTAT_CORE_PLL_LOST_L        (1 << 3)
+#define PLLSTAT_CORE_PLL_LSTS  (1 << 2)
+#define PLLSTAT_DISP_PLL_LOST_L        (1 << 1)
+#define PLLSTAT_DISP_PLL_LSTS  (1 << 0)
+
+/* Video and scale clock control register */
+#define VOVRCLK_EN     (1 << 0)
+
+/* Pixel clock control register */
+#define PIXCLK_EN      (1 << 0)
+
+/* Memory clock control register */
+#define MEMCLK_EN      (1 << 0)
+
+/* MBX clock control register */
+#define MBXCLK_DIV     Fld(2,2)
+#define MBXCLK_DIV_1   ((0x0) << FShft(MBXCLK_DIV))
+#define MBXCLK_DIV_2   ((0x1) << FShft(MBXCLK_DIV))
+#define MBXCLK_DIV_3   ((0x2) << FShft(MBXCLK_DIV))
+#define MBXCLK_DIV_4   ((0x3) << FShft(MBXCLK_DIV))
+#define MBXCLK_EN      Fld(2,0)
+#define MBXCLK_EN_NONE ((0x0) << FShft(MBXCLK_EN))
+#define MBXCLK_EN_2D   ((0x1) << FShft(MBXCLK_EN))
+#define MBXCLK_EN_BOTH ((0x2) << FShft(MBXCLK_EN))
+
+/* M24 clock control register */
+#define M24CLK_DIV     Fld(2,1)
+#define M24CLK_DIV_1   ((0x0) << FShft(M24CLK_DIV))
+#define M24CLK_DIV_2   ((0x1) << FShft(M24CLK_DIV))
+#define M24CLK_DIV_3   ((0x2) << FShft(M24CLK_DIV))
+#define M24CLK_DIV_4   ((0x3) << FShft(M24CLK_DIV))
+#define M24CLK_EN      (1 << 0)
+
+/* SDRAM clock control register */
+#define SDCLK_EN       (1 << 0)
+
+/* PixClk Divisor Register */
+#define PIXCLKDIV_PD   Fld(9,0)
+#define Pixclkdiv_Pd(x)        ((x) << FShft(PIXCLKDIV_PD))
+
+/* LCD Config control register */
+#define LCDCFG_IN_FMT  Fld(3,28)
+#define Lcdcfg_In_Fmt(x)       ((x) << FShft(LCDCFG_IN_FMT))
+#define LCDCFG_LCD1DEN_POL     (1 << 27)
+#define LCDCFG_LCD1FCLK_POL    (1 << 26)
+#define LCDCFG_LCD1LCLK_POL    (1 << 25)
+#define LCDCFG_LCD1D_POL       (1 << 24)
+#define LCDCFG_LCD2DEN_POL     (1 << 23)
+#define LCDCFG_LCD2FCLK_POL    (1 << 22)
+#define LCDCFG_LCD2LCLK_POL    (1 << 21)
+#define LCDCFG_LCD2D_POL       (1 << 20)
+#define LCDCFG_LCD1_TS         (1 << 19)
+#define LCDCFG_LCD1D_DS                (1 << 18)
+#define LCDCFG_LCD1C_DS                (1 << 17)
+#define LCDCFG_LCD1_IS_IN      (1 << 16)
+#define LCDCFG_LCD2_TS         (1 << 3)
+#define LCDCFG_LCD2D_DS                (1 << 2)
+#define LCDCFG_LCD2C_DS                (1 << 1)
+#define LCDCFG_LCD2_IS_IN      (1 << 0)
+
+/* On-Die Frame Buffer Power Control Register */
+#define ODFBPWR_SLOW   (1 << 2)
+#define ODFBPWR_MODE   Fld(2,0)
+#define ODFBPWR_MODE_ACT       ((0x0) << FShft(ODFBPWR_MODE))
+#define ODFBPWR_MODE_ACT_LP    ((0x1) << FShft(ODFBPWR_MODE))
+#define ODFBPWR_MODE_SLEEP     ((0x2) << FShft(ODFBPWR_MODE))
+#define ODFBPWR_MODE_SHUTD     ((0x3) << FShft(ODFBPWR_MODE))
+
+/* On-Die Frame Buffer Power State Status Register */
+#define ODFBSTAT_ACT   (1 << 2)
+#define ODFBSTAT_SLP   (1 << 1)
+#define ODFBSTAT_SDN   (1 << 0)
+
+/* LMRST - Local Memory (SDRAM) Reset */
+#define LMRST_MC_RST   (1 << 0)
+
+/* LMCFG - Local Memory (SDRAM) Configuration Register */
+#define LMCFG_LMC_DS   (1 << 5)
+#define LMCFG_LMD_DS   (1 << 4)
+#define LMCFG_LMA_DS   (1 << 3)
+#define LMCFG_LMC_TS   (1 << 2)
+#define LMCFG_LMD_TS   (1 << 1)
+#define LMCFG_LMA_TS   (1 << 0)
+
+/* LMPWR - Local Memory (SDRAM) Power Control Register */
+#define LMPWR_MC_PWR_CNT       Fld(2,0)
+#define LMPWR_MC_PWR_ACT       ((0x0) << FShft(LMPWR_MC_PWR_CNT)) /* Active */
+#define LMPWR_MC_PWR_SRM       ((0x1) << FShft(LMPWR_MC_PWR_CNT)) /* Self-refresh */
+#define LMPWR_MC_PWR_DPD       ((0x3) << FShft(LMPWR_MC_PWR_CNT)) /* deep power down */
+
+/* LMPWRSTAT - Local Memory (SDRAM) Power Status Register */
+#define LMPWRSTAT_MC_PWR_CNT   Fld(2,0)
+#define LMPWRSTAT_MC_PWR_ACT   ((0x0) << FShft(LMPWRSTAT_MC_PWR_CNT)) /* Active */
+#define LMPWRSTAT_MC_PWR_SRM   ((0x1) << FShft(LMPWRSTAT_MC_PWR_CNT)) /* Self-refresh */
+#define LMPWRSTAT_MC_PWR_DPD   ((0x3) << FShft(LMPWRSTAT_MC_PWR_CNT)) /* deep power down */
+
+/* LMTYPE - Local Memory (SDRAM) Type Register */
+#define LMTYPE_CASLAT  Fld(3,10)
+#define LMTYPE_CASLAT_1        ((0x1) << FShft(LMTYPE_CASLAT))
+#define LMTYPE_CASLAT_2        ((0x2) << FShft(LMTYPE_CASLAT))
+#define LMTYPE_CASLAT_3        ((0x3) << FShft(LMTYPE_CASLAT))
+#define LMTYPE_BKSZ    Fld(2,8)
+#define LMTYPE_BKSZ_1  ((0x1) << FShft(LMTYPE_BKSZ))
+#define LMTYPE_BKSZ_2  ((0x2) << FShft(LMTYPE_BKSZ))
+#define LMTYPE_ROWSZ   Fld(4,4)
+#define LMTYPE_ROWSZ_11        ((0xb) << FShft(LMTYPE_ROWSZ))
+#define LMTYPE_ROWSZ_12        ((0xc) << FShft(LMTYPE_ROWSZ))
+#define LMTYPE_ROWSZ_13        ((0xd) << FShft(LMTYPE_ROWSZ))
+#define LMTYPE_COLSZ   Fld(4,0)
+#define LMTYPE_COLSZ_7 ((0x7) << FShft(LMTYPE_COLSZ))
+#define LMTYPE_COLSZ_8 ((0x8) << FShft(LMTYPE_COLSZ))
+#define LMTYPE_COLSZ_9 ((0x9) << FShft(LMTYPE_COLSZ))
+#define LMTYPE_COLSZ_10        ((0xa) << FShft(LMTYPE_COLSZ))
+#define LMTYPE_COLSZ_11        ((0xb) << FShft(LMTYPE_COLSZ))
+#define LMTYPE_COLSZ_12        ((0xc) << FShft(LMTYPE_COLSZ))
+
+/* LMTIM - Local Memory (SDRAM) Timing Register */
+#define LMTIM_TRAS     Fld(4,16)
+#define Lmtim_Tras(x)  ((x) << FShft(LMTIM_TRAS))
+#define LMTIM_TRP      Fld(4,12)
+#define Lmtim_Trp(x)   ((x) << FShft(LMTIM_TRP))
+#define LMTIM_TRCD     Fld(4,8)
+#define Lmtim_Trcd(x)  ((x) << FShft(LMTIM_TRCD))
+#define LMTIM_TRC      Fld(4,4)
+#define Lmtim_Trc(x)   ((x) << FShft(LMTIM_TRC))
+#define LMTIM_TDPL     Fld(4,0)
+#define Lmtim_Tdpl(x)  ((x) << FShft(LMTIM_TDPL))
+
+/* LMREFRESH - Local Memory (SDRAM) tREF Control Register */
+#define LMREFRESH_TREF Fld(2,0)
+#define Lmrefresh_Tref(x)      ((x) << FShft(LMREFRESH_TREF))
+
+/* GSCTRL - Graphics surface control register */
+#define GSCTRL_LUT_EN  (1 << 31)
+#define GSCTRL_GPIXFMT Fld(4,27)
+#define GSCTRL_GPIXFMT_INDEXED ((0x0) << FShft(GSCTRL_GPIXFMT))
+#define GSCTRL_GPIXFMT_ARGB4444        ((0x4) << FShft(GSCTRL_GPIXFMT))
+#define GSCTRL_GPIXFMT_ARGB1555        ((0x5) << FShft(GSCTRL_GPIXFMT))
+#define GSCTRL_GPIXFMT_RGB888  ((0x6) << FShft(GSCTRL_GPIXFMT))
+#define GSCTRL_GPIXFMT_RGB565  ((0x7) << FShft(GSCTRL_GPIXFMT))
+#define GSCTRL_GPIXFMT_ARGB8888        ((0x8) << FShft(GSCTRL_GPIXFMT))
+#define GSCTRL_GAMMA_EN        (1 << 26)
+
+#define GSCTRL_GSWIDTH Fld(11,11)
+#define Gsctrl_Width(Pixel)    /* Display Width [1..2048 pix.]  */ \
+                        (((Pixel) - 1) << FShft(GSCTRL_GSWIDTH))
+
+#define GSCTRL_GSHEIGHT Fld(11,0)
+#define Gsctrl_Height(Pixel)   /* Display Height [1..2048 pix.]  */ \
+                        (((Pixel) - 1) << FShft(GSCTRL_GSHEIGHT))
+
+/* GBBASE fileds */
+#define GBBASE_GLALPHA Fld(8,24)
+#define Gbbase_Glalpha(x)      ((x) << FShft(GBBASE_GLALPHA))
+
+#define GBBASE_COLKEY Fld(24,0)
+#define Gbbase_Colkey(x)       ((x) << FShft(GBBASE_COLKEY))
+
+/* GDRCTRL fields */
+#define GDRCTRL_PIXDBL (1 << 31)
+#define GDRCTRL_PIXHLV (1 << 30)
+#define GDRCTRL_LNDBL  (1 << 29)
+#define GDRCTRL_LNHLV  (1 << 28)
+#define GDRCTRL_COLKEYM        Fld(24,0)
+#define Gdrctrl_Colkeym(x)     ((x) << FShft(GDRCTRL_COLKEYM))
+
+/* GSCADR graphics stream control address register fields */
+#define GSCADR_STR_EN  (1 << 31)
+#define GSCADR_COLKEY_EN       (1 << 30)
+#define GSCADR_COLKEYSCR       (1 << 29)
+#define GSCADR_BLEND_M Fld(2,27)
+#define GSCADR_BLEND_NONE      ((0x0) << FShft(GSCADR_BLEND_M))
+#define GSCADR_BLEND_INV       ((0x1) << FShft(GSCADR_BLEND_M))
+#define GSCADR_BLEND_GLOB      ((0x2) << FShft(GSCADR_BLEND_M))
+#define GSCADR_BLEND_PIX       ((0x3) << FShft(GSCADR_BLEND_M))
+#define GSCADR_BLEND_POS       Fld(2,24)
+#define GSCADR_BLEND_GFX       ((0x0) << FShft(GSCADR_BLEND_POS))
+#define GSCADR_BLEND_VID       ((0x1) << FShft(GSCADR_BLEND_POS))
+#define GSCADR_BLEND_CUR       ((0x2) << FShft(GSCADR_BLEND_POS))
+#define GSCADR_GBASE_ADR       Fld(23,0)
+#define Gscadr_Gbase_Adr(x)    ((x) << FShft(GSCADR_GBASE_ADR))
+
+/* GSADR graphics stride address register fields */
+#define GSADR_SRCSTRIDE        Fld(10,22)
+#define Gsadr_Srcstride(x)     ((x) << FShft(GSADR_SRCSTRIDE))
+#define GSADR_XSTART   Fld(11,11)
+#define Gsadr_Xstart(x)                ((x) << FShft(GSADR_XSTART))
+#define GSADR_YSTART   Fld(11,0)
+#define Gsadr_Ystart(y)                ((y) << FShft(GSADR_YSTART))
+
+/* GPLUT graphics palette register fields */
+#define GPLUT_LUTADR   Fld(8,24)
+#define Gplut_Lutadr(x)        ((x) << FShft(GPLUT_LUTADR))
+#define GPLUT_LUTDATA  Fld(24,0)
+#define Gplut_Lutdata(x)       ((x) << FShft(GPLUT_LUTDATA))
+
+/* HCCTRL - Hardware Cursor Register fields */
+#define HCCTRL_CUR_EN  (1 << 31)
+#define HCCTRL_COLKEY_EN       (1 << 29)
+#define HCCTRL_COLKEYSRC       (1 << 28)
+#define HCCTRL_BLEND_M Fld(2,26)
+#define HCCTRL_BLEND_NONE      ((0x0) << FShft(HCCTRL_BLEND_M))
+#define HCCTRL_BLEND_INV       ((0x1) << FShft(HCCTRL_BLEND_M))
+#define HCCTRL_BLEND_GLOB      ((0x2) << FShft(HCCTRL_BLEND_M))
+#define HCCTRL_BLEND_PIX       ((0x3) << FShft(HCCTRL_BLEND_M))
+#define HCCTRL_CPIXFMT Fld(3,23)
+#define HCCTRL_CPIXFMT_RGB332  ((0x3) << FShft(HCCTRL_CPIXFMT))
+#define HCCTRL_CPIXFMT_ARGB4444        ((0x4) << FShft(HCCTRL_CPIXFMT))
+#define HCCTRL_CPIXFMT_ARGB1555        ((0x5) << FShft(HCCTRL_CPIXFMT))
+#define HCCTRL_CBASE_ADR       Fld(23,0)
+#define Hcctrl_Cbase_Adr(x)    ((x) << FShft(HCCTRL_CBASE_ADR))
+
+/* HCSIZE Hardware Cursor Size Register fields */
+#define HCSIZE_BLEND_POS       Fld(2,29)
+#define HCSIZE_BLEND_GFX       ((0x0) << FShft(HCSIZE_BLEND_POS))
+#define HCSIZE_BLEND_VID       ((0x1) << FShft(HCSIZE_BLEND_POS))
+#define HCSIZE_BLEND_CUR       ((0x2) << FShft(HCSIZE_BLEND_POS))
+#define HCSIZE_CWIDTH  Fld(3,16)
+#define Hcsize_Cwidth(x)       ((x) << FShft(HCSIZE_CWIDTH))
+#define HCSIZE_CHEIGHT Fld(3,0)
+#define Hcsize_Cheight(x)      ((x) << FShft(HCSIZE_CHEIGHT))
+
+/* HCPOS Hardware Cursor Position Register fields */
+#define HCPOS_SWITCHSRC        (1 << 30)
+#define HCPOS_CURBLINK Fld(6,24)
+#define Hcpos_Curblink(x)      ((x) << FShft(HCPOS_CURBLINK))
+#define HCPOS_XSTART   Fld(12,12)
+#define Hcpos_Xstart(x)        ((x) << FShft(HCPOS_XSTART))
+#define HCPOS_YSTART   Fld(12,0)
+#define Hcpos_Ystart(y)        ((y) << FShft(HCPOS_YSTART))
+
+/* HCBADR Hardware Cursor Blend Address Register */
+#define HCBADR_GLALPHA Fld(8,24)
+#define Hcbadr_Glalpha(x)      ((x) << FShft(HCBADR_GLALPHA))
+#define HCBADR_COLKEY  Fld(24,0)
+#define Hcbadr_Colkey(x)       ((x) << FShft(HCBADR_COLKEY))
+
+/* HCCKMSK - Hardware Cursor Color Key Mask Register */
+#define HCCKMSK_COLKEY_M       Fld(24,0)
+#define Hcckmsk_Colkey_M(x)    ((x) << FShft(HCCKMSK_COLKEY_M))
+
+/* DSCTRL - Display sync control register */
+#define DSCTRL_SYNCGEN_EN      (1 << 31)
+#define DSCTRL_DPL_RST         (1 << 29)
+#define DSCTRL_PWRDN_M         (1 << 28)
+#define DSCTRL_UPDSYNCCNT      (1 << 26)
+#define DSCTRL_UPDINTCNT       (1 << 25)
+#define DSCTRL_UPDCNT          (1 << 24)
+#define DSCTRL_UPDWAIT Fld(4,16)
+#define Dsctrl_Updwait(x)      ((x) << FShft(DSCTRL_UPDWAIT))
+#define DSCTRL_CLKPOL          (1 << 11)
+#define DSCTRL_CSYNC_EN                (1 << 10)
+#define DSCTRL_VS_SLAVE                (1 << 7)
+#define DSCTRL_HS_SLAVE                (1 << 6)
+#define DSCTRL_BLNK_POL                (1 << 5)
+#define DSCTRL_BLNK_DIS                (1 << 4)
+#define DSCTRL_VS_POL          (1 << 3)
+#define DSCTRL_VS_DIS          (1 << 2)
+#define DSCTRL_HS_POL          (1 << 1)
+#define DSCTRL_HS_DIS          (1 << 0)
+
+/* DHT01 - Display horizontal timing register 01 */
+#define DHT01_HBPS     Fld(12,16)
+#define Dht01_Hbps(x)  ((x) << FShft(DHT01_HBPS))
+#define DHT01_HT       Fld(12,0)
+#define Dht01_Ht(x)    ((x) << FShft(DHT01_HT))
+
+/* DHT02 - Display horizontal timing register 02 */
+#define DHT02_HAS      Fld(12,16)
+#define Dht02_Has(x)   ((x) << FShft(DHT02_HAS))
+#define DHT02_HLBS     Fld(12,0)
+#define Dht02_Hlbs(x)  ((x) << FShft(DHT02_HLBS))
+
+/* DHT03 - Display horizontal timing register 03 */
+#define DHT03_HFPS     Fld(12,16)
+#define Dht03_Hfps(x)  ((x) << FShft(DHT03_HFPS))
+#define DHT03_HRBS     Fld(12,0)
+#define Dht03_Hrbs(x)  ((x) << FShft(DHT03_HRBS))
+
+/* DVT01 - Display vertical timing register 01 */
+#define DVT01_VBPS     Fld(12,16)
+#define Dvt01_Vbps(x)  ((x) << FShft(DVT01_VBPS))
+#define DVT01_VT       Fld(12,0)
+#define Dvt01_Vt(x)    ((x) << FShft(DVT01_VT))
+
+/* DVT02 - Display vertical timing register 02 */
+#define DVT02_VAS      Fld(12,16)
+#define Dvt02_Vas(x)   ((x) << FShft(DVT02_VAS))
+#define DVT02_VTBS     Fld(12,0)
+#define Dvt02_Vtbs(x)  ((x) << FShft(DVT02_VTBS))
+
+/* DVT03 - Display vertical timing register 03 */
+#define DVT03_VFPS     Fld(12,16)
+#define Dvt03_Vfps(x)  ((x) << FShft(DVT03_VFPS))
+#define DVT03_VBBS     Fld(12,0)
+#define Dvt03_Vbbs(x)  ((x) << FShft(DVT03_VBBS))
+
+/* DVECTRL - display vertical event control register */
+#define DVECTRL_VEVENT Fld(12,16)
+#define Dvectrl_Vevent(x)      ((x) << FShft(DVECTRL_VEVENT))
+#define DVECTRL_VFETCH Fld(12,0)
+#define Dvectrl_Vfetch(x)      ((x) << FShft(DVECTRL_VFETCH))
+
+/* DHDET - display horizontal DE timing register */
+#define DHDET_HDES     Fld(12,16)
+#define Dhdet_Hdes(x)  ((x) << FShft(DHDET_HDES))
+#define DHDET_HDEF     Fld(12,0)
+#define Dhdet_Hdef(x)  ((x) << FShft(DHDET_HDEF))
+
+/* DVDET - display vertical DE timing register */
+#define DVDET_VDES     Fld(12,16)
+#define Dvdet_Vdes(x)  ((x) << FShft(DVDET_VDES))
+#define DVDET_VDEF     Fld(12,0)
+#define Dvdet_Vdef(x)  ((x) << FShft(DVDET_VDEF))
+
+/* DODMSK - display output data mask register */
+#define DODMSK_MASK_LVL        (1 << 31)
+#define DODMSK_BLNK_LVL        (1 << 30)
+#define DODMSK_MASK_B  Fld(8,16)
+#define Dodmsk_Mask_B(x)       ((x) << FShft(DODMSK_MASK_B))
+#define DODMSK_MASK_G  Fld(8,8)
+#define Dodmsk_Mask_G(x)       ((x) << FShft(DODMSK_MASK_G))
+#define DODMSK_MASK_R  Fld(8,0)
+#define Dodmsk_Mask_R(x)       ((x) << FShft(DODMSK_MASK_R))
+
+/* DBCOL - display border color control register */
+#define DBCOL_BORDCOL  Fld(24,0)
+#define Dbcol_Bordcol(x)       ((x) << FShft(DBCOL_BORDCOL))
+
+/* DVLNUM - display vertical line number register */
+#define DVLNUM_VLINE   Fld(12,0)
+#define Dvlnum_Vline(x)        ((x) << FShft(DVLNUM_VLINE))
+
+/* DMCTRL - Display Memory Control Register */
+#define DMCTRL_MEM_REF Fld(2,30)
+#define DMCTRL_MEM_REF_ACT     ((0x0) << FShft(DMCTRL_MEM_REF))
+#define DMCTRL_MEM_REF_HB      ((0x1) << FShft(DMCTRL_MEM_REF))
+#define DMCTRL_MEM_REF_VB      ((0x2) << FShft(DMCTRL_MEM_REF))
+#define DMCTRL_MEM_REF_BOTH    ((0x3) << FShft(DMCTRL_MEM_REF))
+#define DMCTRL_UV_THRHLD       Fld(6,24)
+#define Dmctrl_Uv_Thrhld(x)    ((x) << FShft(DMCTRL_UV_THRHLD))
+#define DMCTRL_V_THRHLD                Fld(7,16)
+#define Dmctrl_V_Thrhld(x)     ((x) << FShft(DMCTRL_V_THRHLD))
+#define DMCTRL_D_THRHLD                Fld(7,8)
+#define Dmctrl_D_Thrhld(x)     ((x) << FShft(DMCTRL_D_THRHLD))
+#define DMCTRL_BURSTLEN        Fld(6,0)
+#define Dmctrl_Burstlen(x)     ((x) << FShft(DMCTRL_BURSTLEN))
+
+
+/* DLSTS - display load status register */
+#define DLSTS_RLD_ADONE        (1 << 23)
+/* #define DLSTS_RLD_ADOUT     Fld(23,0) */
+
+/* DLLCTRL - display list load control register */
+#define DLLCTRL_RLD_ADRLN      Fld(8,24)
+#define Dllctrl_Rld_Adrln(x)   ((x) << FShft(DLLCTRL_RLD_ADRLN))
+
+/* SPOCTRL - Scale Pitch/Order Control Register */
+#define SPOCTRL_H_SC_BP                (1 << 31)
+#define SPOCTRL_V_SC_BP                (1 << 30)
+#define SPOCTRL_HV_SC_OR       (1 << 29)
+#define SPOCTRL_VS_UR_C                (1 << 27)
+#define SPOCTRL_VORDER Fld(2,16)
+#define SPOCTRL_VORDER_1TAP    ((0x0) << FShft(SPOCTRL_VORDER))
+#define SPOCTRL_VORDER_2TAP    ((0x1) << FShft(SPOCTRL_VORDER))
+#define SPOCTRL_VORDER_4TAP    ((0x3) << FShft(SPOCTRL_VORDER))
+#define SPOCTRL_VPITCH Fld(16,0)
+#define Spoctrl_Vpitch(x)      ((x) << FShft(SPOCTRL_VPITCH))
+
+#endif /* __REG_BITS_2700G_ */
diff --git a/drivers/video/mbx/regs.h b/drivers/video/mbx/regs.h
new file mode 100644 (file)
index 0000000..ad20be0
--- /dev/null
@@ -0,0 +1,195 @@
+#ifndef __REGS_2700G_
+#define __REGS_2700G_
+
+/* extern unsigned long virt_base_2700; */
+/* #define __REG_2700G(x)      (*(volatile unsigned long*)((x)+virt_base_2700)) */
+#define __REG_2700G(x) ((x)+virt_base_2700)
+
+/* System Configuration Registers (0x0000_0000  0x0000_0010) */
+#define SYSCFG         __REG_2700G(0x00000000)
+#define PFBASE         __REG_2700G(0x00000004)
+#define PFCEIL         __REG_2700G(0x00000008)
+#define POLLFLAG       __REG_2700G(0x0000000c)
+#define SYSRST         __REG_2700G(0x00000010)
+
+/* Interrupt Control Registers (0x0000_0014  0x0000_002F) */
+#define NINTPW         __REG_2700G(0x00000014)
+#define MINTENABLE     __REG_2700G(0x00000018)
+#define MINTSTAT       __REG_2700G(0x0000001c)
+#define SINTENABLE     __REG_2700G(0x00000020)
+#define SINTSTAT       __REG_2700G(0x00000024)
+#define SINTCLR                __REG_2700G(0x00000028)
+
+/* Clock Control Registers (0x0000_002C  0x0000_005F) */
+#define SYSCLKSRC      __REG_2700G(0x0000002c)
+#define PIXCLKSRC      __REG_2700G(0x00000030)
+#define CLKSLEEP       __REG_2700G(0x00000034)
+#define COREPLL                __REG_2700G(0x00000038)
+#define DISPPLL                __REG_2700G(0x0000003c)
+#define PLLSTAT                __REG_2700G(0x00000040)
+#define VOVRCLK                __REG_2700G(0x00000044)
+#define PIXCLK         __REG_2700G(0x00000048)
+#define MEMCLK         __REG_2700G(0x0000004c)
+#define M24CLK         __REG_2700G(0x00000054)
+#define MBXCLK         __REG_2700G(0x00000054)
+#define SDCLK          __REG_2700G(0x00000058)
+#define PIXCLKDIV      __REG_2700G(0x0000005c)
+
+/* LCD Port Control Register (0x0000_0060  0x0000_006F) */
+#define LCD_CONFIG     __REG_2700G(0x00000060)
+
+/* On-Die Frame Buffer Registers (0x0000_0064  0x0000_006B) */
+#define ODFBPWR                __REG_2700G(0x00000064)
+#define ODFBSTAT       __REG_2700G(0x00000068)
+
+/* GPIO Registers (0x0000_006C  0x0000_007F) */
+#define GPIOCGF                __REG_2700G(0x0000006c)
+#define GPIOHI         __REG_2700G(0x00000070)
+#define GPIOLO         __REG_2700G(0x00000074)
+#define GPIOSTAT       __REG_2700G(0x00000078)
+
+/* Pulse Width Modulator (PWM) Registers (0x0000_0200  0x0000_02FF) */
+#define PWMRST         __REG_2700G(0x00000200)
+#define PWMCFG         __REG_2700G(0x00000204)
+#define PWM0DIV                __REG_2700G(0x00000210)
+#define PWM0DUTY       __REG_2700G(0x00000214)
+#define PWM0PER                __REG_2700G(0x00000218)
+#define PWM1DIV                __REG_2700G(0x00000220)
+#define PWM1DUTY       __REG_2700G(0x00000224)
+#define PWM1PER                __REG_2700G(0x00000228)
+
+/* Identification (ID) Registers (0x0000_0300  0x0000_0FFF) */
+#define ID             __REG_2700G(0x00000FF0)
+
+/* Local Memory (SDRAM) Interface Registers (0x0000_1000  0x0000_1FFF) */
+#define LMRST          __REG_2700G(0x00001000)
+#define LMCFG          __REG_2700G(0x00001004)
+#define LMPWR          __REG_2700G(0x00001008)
+#define LMPWRSTAT      __REG_2700G(0x0000100c)
+#define LMCEMR         __REG_2700G(0x00001010)
+#define LMTYPE         __REG_2700G(0x00001014)
+#define LMTIM          __REG_2700G(0x00001018)
+#define LMREFRESH      __REG_2700G(0x0000101c)
+#define LMPROTMIN      __REG_2700G(0x00001020)
+#define LMPROTMAX      __REG_2700G(0x00001024)
+#define LMPROTCFG      __REG_2700G(0x00001028)
+#define LMPROTERR      __REG_2700G(0x0000102c)
+
+/* Plane Controller Registers (0x0000_2000  0x0000_2FFF) */
+#define GSCTRL         __REG_2700G(0x00002000)
+#define VSCTRL         __REG_2700G(0x00002004)
+#define GBBASE         __REG_2700G(0x00002020)
+#define VBBASE         __REG_2700G(0x00002024)
+#define GDRCTRL                __REG_2700G(0x00002040)
+#define VCMSK          __REG_2700G(0x00002044)
+#define GSCADR         __REG_2700G(0x00002060)
+#define VSCADR         __REG_2700G(0x00002064)
+#define VUBASE         __REG_2700G(0x00002084)
+#define VVBASE         __REG_2700G(0x000020a4)
+#define GSADR          __REG_2700G(0x000020c0)
+#define VSADR          __REG_2700G(0x000020c4)
+#define HCCTRL         __REG_2700G(0x00002100)
+#define HCSIZE         __REG_2700G(0x00002110)
+#define HCPOS          __REG_2700G(0x00002120)
+#define HCBADR         __REG_2700G(0x00002130)
+#define HCCKMSK                __REG_2700G(0x00002140)
+#define GPLUT          __REG_2700G(0x00002150)
+#define DSCTRL         __REG_2700G(0x00002154)
+#define DHT01          __REG_2700G(0x00002158)
+#define DHT02          __REG_2700G(0x0000215c)
+#define DHT03          __REG_2700G(0x00002160)
+#define DVT01          __REG_2700G(0x00002164)
+#define DVT02          __REG_2700G(0x00002168)
+#define DVT03          __REG_2700G(0x0000216c)
+#define DBCOL          __REG_2700G(0x00002170)
+#define BGCOLOR                __REG_2700G(0x00002174)
+#define DINTRS         __REG_2700G(0x00002178)
+#define DINTRE         __REG_2700G(0x0000217c)
+#define DINTRCNT       __REG_2700G(0x00002180)
+#define DSIG           __REG_2700G(0x00002184)
+#define DMCTRL         __REG_2700G(0x00002188)
+#define CLIPCTRL       __REG_2700G(0x0000218c)
+#define SPOCTRL                __REG_2700G(0x00002190)
+#define SVCTRL         __REG_2700G(0x00002194)
+
+/* 0x0000_2198 */
+/* 0x0000_21A8 VSCOEFF[0:4] Video Scalar Vertical Coefficient [0:4] 4.14.5 */
+#define VSCOEFF0       __REG_2700G(0x00002198)
+#define VSCOEFF1       __REG_2700G(0x0000219c)
+#define VSCOEFF2       __REG_2700G(0x000021a0)
+#define VSCOEFF3       __REG_2700G(0x000021a4)
+#define VSCOEFF4       __REG_2700G(0x000021a8)
+
+#define SHCTRL         __REG_2700G(0x000021b0)
+
+/* 0x0000_21B4 */
+/* 0x0000_21D4 HSCOEFF[0:8] Video Scalar Horizontal Coefficient [0:8] 4.14.7 */
+#define HSCOEFF0       __REG_2700G(0x000021b4)
+#define HSCOEFF1       __REG_2700G(0x000021b8)
+#define HSCOEFF2       __REG_2700G(0x000021bc)
+#define HSCOEFF3       __REG_2700G(0x000021b0)
+#define HSCOEFF4       __REG_2700G(0x000021c4)
+#define HSCOEFF5       __REG_2700G(0x000021c8)
+#define HSCOEFF6       __REG_2700G(0x000021cc)
+#define HSCOEFF7       __REG_2700G(0x000021d0)
+#define HSCOEFF8       __REG_2700G(0x000021d4)
+
+#define SSSIZE         __REG_2700G(0x000021D8)
+
+/* 0x0000_2200 */
+/* 0x0000_2240 VIDGAM[0:16] Video Gamma LUT Index [0:16] 4.15.2 */
+#define VIDGAM0                __REG_2700G(0x00002200)
+#define VIDGAM1                __REG_2700G(0x00002204)
+#define VIDGAM2                __REG_2700G(0x00002208)
+#define VIDGAM3                __REG_2700G(0x0000220c)
+#define VIDGAM4                __REG_2700G(0x00002210)
+#define VIDGAM5                __REG_2700G(0x00002214)
+#define VIDGAM6                __REG_2700G(0x00002218)
+#define VIDGAM7                __REG_2700G(0x0000221c)
+#define VIDGAM8                __REG_2700G(0x00002220)
+#define VIDGAM9                __REG_2700G(0x00002224)
+#define VIDGAM10       __REG_2700G(0x00002228)
+#define VIDGAM11       __REG_2700G(0x0000222c)
+#define VIDGAM12       __REG_2700G(0x00002230)
+#define VIDGAM13       __REG_2700G(0x00002234)
+#define VIDGAM14       __REG_2700G(0x00002238)
+#define VIDGAM15       __REG_2700G(0x0000223c)
+#define VIDGAM16       __REG_2700G(0x00002240)
+
+/* 0x0000_2250 */
+/* 0x0000_2290 GFXGAM[0:16] Graphics Gamma LUT Index [0:16] 4.15.3 */
+#define GFXGAM0                __REG_2700G(0x00002250)
+#define GFXGAM1                __REG_2700G(0x00002254)
+#define GFXGAM2                __REG_2700G(0x00002258)
+#define GFXGAM3                __REG_2700G(0x0000225c)
+#define GFXGAM4                __REG_2700G(0x00002260)
+#define GFXGAM5                __REG_2700G(0x00002264)
+#define GFXGAM6                __REG_2700G(0x00002268)
+#define GFXGAM7                __REG_2700G(0x0000226c)
+#define GFXGAM8                __REG_2700G(0x00002270)
+#define GFXGAM9                __REG_2700G(0x00002274)
+#define GFXGAM10       __REG_2700G(0x00002278)
+#define GFXGAM11       __REG_2700G(0x0000227c)
+#define GFXGAM12       __REG_2700G(0x00002280)
+#define GFXGAM13       __REG_2700G(0x00002284)
+#define GFXGAM14       __REG_2700G(0x00002288)
+#define GFXGAM15       __REG_2700G(0x0000228c)
+#define GFXGAM16       __REG_2700G(0x00002290)
+
+#define DLSTS          __REG_2700G(0x00002300)
+#define DLLCTRL                __REG_2700G(0x00002304)
+#define DVLNUM         __REG_2700G(0x00002308)
+#define DUCTRL         __REG_2700G(0x0000230c)
+#define DVECTRL                __REG_2700G(0x00002310)
+#define DHDET          __REG_2700G(0x00002314)
+#define DVDET          __REG_2700G(0x00002318)
+#define DODMSK         __REG_2700G(0x0000231c)
+#define CSC01          __REG_2700G(0x00002330)
+#define CSC02          __REG_2700G(0x00002334)
+#define CSC03          __REG_2700G(0x00002338)
+#define CSC04          __REG_2700G(0x0000233c)
+#define CSC05          __REG_2700G(0x00002340)
+
+#define FB_MEMORY_START        __REG_2700G(0x00060000)
+
+#endif /* __REGS_2700G_ */
index ff5454601e220822cb01fae6683661f4a7204e04..d1267904c280947aaac3916a659233f11fbe967d 100644 (file)
@@ -12,7 +12,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/tty.h>
 #include <linux/fb.h>
 #include <linux/sched.h>
 
index 773855a311e83d7b1e51c7fb1cad1b6a73fe79b4..59a6f5fa5ae64992a25dee1357917ccfe8785d2c 100644 (file)
@@ -59,7 +59,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index 1c1c10c699c533be8fb81bb4a3bbfc7f23133b3b..b45f577094ac8bbf189c3ec2b4e8b83ad1f3c322 100644 (file)
  */
 #define MIN_LEVEL 0x158
 #define MAX_LEVEL 0x534
+#define LEVEL_STEP ((MAX_LEVEL - MIN_LEVEL) / FB_BACKLIGHT_MAX)
 
 static struct backlight_properties nvidia_bl_data;
 
+/* Call with fb_info->bl_mutex held */
 static int nvidia_bl_get_level_brightness(struct nvidia_par *par,
                int level)
 {
@@ -36,9 +38,7 @@ static int nvidia_bl_get_level_brightness(struct nvidia_par *par,
        int nlevel;
 
        /* Get and convert the value */
-       mutex_lock(&info->bl_mutex);
-       nlevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL;
-       mutex_unlock(&info->bl_mutex);
+       nlevel = MIN_LEVEL + info->bl_curve[level] * LEVEL_STEP;
 
        if (nlevel < 0)
                nlevel = 0;
@@ -50,7 +50,8 @@ static int nvidia_bl_get_level_brightness(struct nvidia_par *par,
        return nlevel;
 }
 
-static int nvidia_bl_update_status(struct backlight_device *bd)
+/* Call with fb_info->bl_mutex held */
+static int __nvidia_bl_update_status(struct backlight_device *bd)
 {
        struct nvidia_par *par = class_get_devdata(&bd->class_dev);
        u32 tmp_pcrt, tmp_pmc, fpcontrol;
@@ -84,6 +85,19 @@ static int nvidia_bl_update_status(struct backlight_device *bd)
        return 0;
 }
 
+static int nvidia_bl_update_status(struct backlight_device *bd)
+{
+       struct nvidia_par *par = class_get_devdata(&bd->class_dev);
+       struct fb_info *info = pci_get_drvdata(par->pci_dev);
+       int ret;
+
+       mutex_lock(&info->bl_mutex);
+       ret = __nvidia_bl_update_status(bd);
+       mutex_unlock(&info->bl_mutex);
+
+       return ret;
+}
+
 static int nvidia_bl_get_brightness(struct backlight_device *bd)
 {
        return bd->props->brightness;
@@ -96,6 +110,16 @@ static struct backlight_properties nvidia_bl_data = {
        .max_brightness = (FB_BACKLIGHT_LEVELS - 1),
 };
 
+void nvidia_bl_set_power(struct fb_info *info, int power)
+{
+       mutex_lock(&info->bl_mutex);
+       up(&info->bl_dev->sem);
+       info->bl_dev->props->power = power;
+       __nvidia_bl_update_status(info->bl_dev);
+       down(&info->bl_dev->sem);
+       mutex_unlock(&info->bl_mutex);
+}
+
 void nvidia_bl_init(struct nvidia_par *par)
 {
        struct fb_info *info = pci_get_drvdata(par->pci_dev);
index 6fba656cd56b0d29537209082ce6fdf08872301b..861271017655cd8694715047394100a684d94d42 100644 (file)
@@ -68,9 +68,11 @@ extern u8 byte_rev[256];
 #ifdef CONFIG_FB_NVIDIA_BACKLIGHT
 extern void nvidia_bl_init(struct nvidia_par *par);
 extern void nvidia_bl_exit(struct nvidia_par *par);
+extern void nvidia_bl_set_power(struct fb_info *info, int power);
 #else
 static inline void nvidia_bl_init(struct nvidia_par *par) {}
 static inline void nvidia_bl_exit(struct nvidia_par *par) {}
+static inline void nvidia_bl_set_power(struct fb_info *info, int power) {}
 #endif
 
 #endif                         /* __NV_PROTO_H__ */
index b02d6033cc0c021740c539269c0b35f878fc4eca..9f2066f0745adbd62921e2cebb284dcc7a99869f 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
@@ -933,16 +932,7 @@ static int nvidiafb_blank(int blank, struct fb_info *info)
        NVWriteSeq(par, 0x01, tmp);
        NVWriteCrtc(par, 0x1a, vesa);
 
-#ifdef CONFIG_FB_NVIDIA_BACKLIGHT
-       mutex_lock(&info->bl_mutex);
-       if (info->bl_dev) {
-               down(&info->bl_dev->sem);
-               info->bl_dev->props->power = blank;
-               info->bl_dev->props->update_status(info->bl_dev);
-               up(&info->bl_dev->sem);
-       }
-       mutex_unlock(&info->bl_mutex);
-#endif
+       nvidia_bl_set_power(info, blank);
 
        NVTRACE_LEAVE();
 
index 71ce1fa45cf4da03eb4c8d36bed2d2edfcfbe4b0..ce5f3031b99b07b16f32dd899f58374d8bd03dfd 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index 450e802e0aa8fb55f30a9d953016ed1209e128dc..983be3ec23459affb6ce021dc644ceca48138776 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index 49a203e1591c748f1233d6afbaa36aaa11efd572..a560a2223825ae74ba600b75f8853a6f5c8fb716 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index 0e0f977b05ee29a466fb7b07054e846750a76cf3..1d81ef47efd336a1f66536d9190e0b190963b876 100644 (file)
@@ -57,7 +57,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index d92f352211efcdce0340ba94907b60d51d995d3d..68ca3cc40770ccda101cd79097f28a6d6952f980 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/string.h>
 #include <linux/timer.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/init.h>
index 4a1e0e8569200e39d7e6de0ec7f0f9d88014949a..940ba2be55e9eddc0abd875320bfcc25ee5bdeb3 100644 (file)
@@ -53,7 +53,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
index fc91dbf896d2697b305b95fb6ad03c43852e34a0..48536c3e58a41afec3f6eb7bf7d7c6f17e22229c 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
index 5e2c64f622cb2b9869f726e5dbf495506e88cc8c..cf41ff177644c3d9ecdb843a2f1790f5d73fb314 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index 2788655e6e7de76c93e96d2c2ba5850565c69b19..33dddbae54208a12df34d3128bd58e2261f6d73f 100644 (file)
@@ -34,7 +34,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
@@ -278,9 +277,11 @@ static const struct riva_regs reg_template = {
  */
 #define MIN_LEVEL 0x158
 #define MAX_LEVEL 0x534
+#define LEVEL_STEP ((MAX_LEVEL - MIN_LEVEL) / FB_BACKLIGHT_MAX)
 
 static struct backlight_properties riva_bl_data;
 
+/* Call with fb_info->bl_mutex held */
 static int riva_bl_get_level_brightness(struct riva_par *par,
                int level)
 {
@@ -288,9 +289,7 @@ static int riva_bl_get_level_brightness(struct riva_par *par,
        int nlevel;
 
        /* Get and convert the value */
-       mutex_lock(&info->bl_mutex);
-       nlevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL;
-       mutex_unlock(&info->bl_mutex);
+       nlevel = MIN_LEVEL + info->bl_curve[level] * LEVEL_STEP;
 
        if (nlevel < 0)
                nlevel = 0;
@@ -302,7 +301,8 @@ static int riva_bl_get_level_brightness(struct riva_par *par,
        return nlevel;
 }
 
-static int riva_bl_update_status(struct backlight_device *bd)
+/* Call with fb_info->bl_mutex held */
+static int __riva_bl_update_status(struct backlight_device *bd)
 {
        struct riva_par *par = class_get_devdata(&bd->class_dev);
        U032 tmp_pcrt, tmp_pmc;
@@ -327,6 +327,19 @@ static int riva_bl_update_status(struct backlight_device *bd)
        return 0;
 }
 
+static int riva_bl_update_status(struct backlight_device *bd)
+{
+       struct riva_par *par = class_get_devdata(&bd->class_dev);
+       struct fb_info *info = pci_get_drvdata(par->pdev);
+       int ret;
+
+       mutex_lock(&info->bl_mutex);
+       ret = __riva_bl_update_status(bd);
+       mutex_unlock(&info->bl_mutex);
+
+       return ret;
+}
+
 static int riva_bl_get_brightness(struct backlight_device *bd)
 {
        return bd->props->brightness;
@@ -339,6 +352,16 @@ static struct backlight_properties riva_bl_data = {
        .max_brightness = (FB_BACKLIGHT_LEVELS - 1),
 };
 
+static void riva_bl_set_power(struct fb_info *info, int power)
+{
+       mutex_lock(&info->bl_mutex);
+       up(&info->bl_dev->sem);
+       info->bl_dev->props->power = power;
+       __riva_bl_update_status(info->bl_dev);
+       down(&info->bl_dev->sem);
+       mutex_unlock(&info->bl_mutex);
+}
+
 static void riva_bl_init(struct riva_par *par)
 {
        struct fb_info *info = pci_get_drvdata(par->pdev);
@@ -419,6 +442,7 @@ static void riva_bl_exit(struct riva_par *par)
 #else
 static inline void riva_bl_init(struct riva_par *par) {}
 static inline void riva_bl_exit(struct riva_par *par) {}
+static inline void riva_bl_set_power(struct fb_info *info, int power) {}
 #endif /* CONFIG_FB_RIVA_BACKLIGHT */
 
 /* ------------------------------------------------------------------------- *
@@ -1337,16 +1361,7 @@ static int rivafb_blank(int blank, struct fb_info *info)
        SEQout(par, 0x01, tmp);
        CRTCout(par, 0x1a, vesa);
 
-#ifdef CONFIG_FB_RIVA_BACKLIGHT
-       mutex_lock(&info->bl_mutex);
-       if (info->bl_dev) {
-               down(&info->bl_dev->sem);
-               info->bl_dev->props->power = blank;
-               info->bl_dev->props->update_status(info->bl_dev);
-               up(&info->bl_dev->sem);
-       }
-       mutex_unlock(&info->bl_mutex);
-#endif
+       riva_bl_set_power(info, blank);
 
        NVTRACE_LEAVE();
 
index f461eb10cc798fcf5df30a6a3d6d946e64bf87ae..ad3bdd6f1ac1fa39ca03896b9873cc1b56dd6639 100644 (file)
@@ -76,7 +76,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index 4729af477fbf0300af93400eb1de4e279f294339..461e094e7b45de0a15829310a45e78163b66956b 100644 (file)
@@ -46,7 +46,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index b848ca7db7f9798c7d94d530775cc6be279885b2..895ebda7d9e3547443785aa6e465589acd2457cf 100644 (file)
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)
 #include <linux/tty.h>
+#else
+#include <linux/screen_info.h>
+#endif
+
 #include <linux/slab.h>
 #include <linux/fb.h>
 #include <linux/selection.h>
index 67f429e931899178ba25ac8b5eacfc3b09f9f085..bb96cb65fdaa554204e104d7cb8fb12fd4e33e0f 100644 (file)
@@ -47,7 +47,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
index e046e20f02b91aead446abd4b62afa1117aaff7a..f80356dfa8e810e479a91ef485bb29bec78b7ff4 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index 239b1496874b826a444e3bb49c9ebc8542a50a62..689ce0270b81adc8108c0db78d34f9be37a2cbc3 100644 (file)
@@ -63,7 +63,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
index 6c2c78ab9827c71236cbe1ea0db522b0b15b3b6d..94fde625a6c070b61a96b786720e4c3be2ac060e 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/init.h>
index d904da44e1aacf280497bb174f4caccaf7bf4cb8..07389ba01effa51407d44a022d8a224a99c89b22 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/string.h>
-#include <linux/tty.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
index 1d76c035050ea2297bbb45139c18412b1725a8e3..47f27924a7d75728424281b8f9255323b0c16832 100644 (file)
@@ -44,7 +44,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index 5718924b677f1cd03dca6cdaec6fe8ee22674cdd..2196448396ec3b90e4f127d4a5179e5cfd35befe 100644 (file)
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/screen_info.h>
 
 #include <video/vga.h>
 #include <asm/io.h>
index d073ffb6e1f9f0d600c585f46ffa802fca4b0286..a9b99b01bd8e377f2656058bd29b09accb7ef6ea 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
index 3c404c9bd36c61f2bd73ad9411c5019421c15743..43d5a6d9c4a63880a7aecfe590cf5ec4104a1ac6 100644 (file)
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/screen_info.h>
 
 #include <asm/io.h>
 #include <video/vga.h>
index 5ea2345dab993e8cb3aa3c28d6451f426d277737..64378959dd7b09fdcd23f1d4da13e5b2dbc5c7ff 100644 (file)
@@ -39,7 +39,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/zorro.h>
index af492cc48db2ced37cc1cd3432feb070b35fa408..d93eb626b2f0ecbb070e5a0302d8c7a774690c3c 100644 (file)
@@ -218,7 +218,7 @@ static int ds2482_wait_1wire_idle(struct ds2482_data *pdev)
                do {
                        temp = i2c_smbus_read_byte(&pdev->client);
                } while ((temp >= 0) && (temp & DS2482_REG_STS_1WB) &&
-                        (++retries > DS2482_WAIT_IDLE_TIMEOUT));
+                        (++retries < DS2482_WAIT_IDLE_TIMEOUT));
        }
 
        if (retries > DS2482_WAIT_IDLE_TIMEOUT)
diff --git a/drivers/w1/w1_io.h b/drivers/w1/w1_io.h
deleted file mode 100644 (file)
index 9a76d2a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *     w1_io.h
- *
- * Copyright (c) 2004 Evgeniy Polyakov <johnpol@2ka.mipt.ru>
- *
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __W1_IO_H
-#define __W1_IO_H
-
-#include "w1.h"
-
-u8 w1_triplet(struct w1_master *dev, int bdir);
-void w1_write_8(struct w1_master *, u8);
-int w1_reset_bus(struct w1_master *);
-u8 w1_calc_crc8(u8 *, int);
-void w1_write_block(struct w1_master *, const u8 *, int);
-u8 w1_read_block(struct w1_master *, u8 *, int);
-void w1_search_devices(struct w1_master *dev, w1_slave_found_callback cb);
-int w1_reset_select_slave(struct w1_slave *sl);
-
-#endif /* __W1_IO_H */
index 53f5c6d6112127661e13703e51b6a8b1e17b95ca..3f00a9faabcb6314e2ddfb6fd56b013d95059436 100644 (file)
@@ -1801,6 +1801,7 @@ config CIFS_POSIX
 
 config CIFS_DEBUG2
        bool "Enable additional CIFS debugging routines"
+       depends on CIFS
        help
           Enabling this option adds a few more debugging routines
           to the cifs code which slightly increases the size of
index f42e64210ee5de985d976507cd0d9acbd42fa86d..672a3b90bc556628874d5ab1494b654dc486a74b 100644 (file)
@@ -1185,8 +1185,6 @@ static int maydump(struct vm_area_struct *vma)
        return 1;
 }
 
-#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
-
 /* An ELF note in memory */
 struct memelfnote
 {
index eba4e23b9ca03cf5b59361f39cb6e6febebb7410..2f336582922940ffb9160d664f39acff70fe3ad1 100644 (file)
@@ -1,6 +1,6 @@
 /* binfmt_elf_fdpic.c: FDPIC ELF binary format
  *
- * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved.
+ * Copyright (C) 2003, 2004, 2006 Red Hat, Inc. All Rights Reserved.
  * Written by David Howells (dhowells@redhat.com)
  * Derived from binfmt_elf.c
  *
@@ -24,7 +24,9 @@
 #include <linux/file.h>
 #include <linux/fcntl.h>
 #include <linux/slab.h>
+#include <linux/pagemap.h>
 #include <linux/highmem.h>
+#include <linux/highuid.h>
 #include <linux/personality.h>
 #include <linux/ptrace.h>
 #include <linux/init.h>
@@ -48,45 +50,59 @@ typedef char *elf_caddr_t;
 #define kdebug(fmt, ...) do {} while(0)
 #endif
 
+#if 0
+#define kdcore(fmt, ...) printk("FDPIC "fmt"\n" ,##__VA_ARGS__ )
+#else
+#define kdcore(fmt, ...) do {} while(0)
+#endif
+
 MODULE_LICENSE("GPL");
 
-static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs);
-//static int load_elf_fdpic_library(struct file *);
-static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *params, struct file *file);
-static int elf_fdpic_map_file(struct elf_fdpic_params *params,
-                             struct file *file,
-                             struct mm_struct *mm,
-                             const char *what);
+static int load_elf_fdpic_binary(struct linux_binprm *, struct pt_regs *);
+static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *, struct file *);
+static int elf_fdpic_map_file(struct elf_fdpic_params *, struct file *,
+                             struct mm_struct *, const char *);
 
-static int create_elf_fdpic_tables(struct linux_binprm *bprm,
-                                  struct mm_struct *mm,
-                                  struct elf_fdpic_params *exec_params,
-                                  struct elf_fdpic_params *interp_params);
+static int create_elf_fdpic_tables(struct linux_binprm *, struct mm_struct *,
+                                  struct elf_fdpic_params *,
+                                  struct elf_fdpic_params *);
 
 #ifndef CONFIG_MMU
-static int elf_fdpic_transfer_args_to_stack(struct linux_binprm *bprm, unsigned long *_sp);
-static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *params,
-                                                  struct file *file,
-                                                  struct mm_struct *mm);
+static int elf_fdpic_transfer_args_to_stack(struct linux_binprm *,
+                                           unsigned long *);
+static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *,
+                                                  struct file *,
+                                                  struct mm_struct *);
 #endif
 
-static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
-                                            struct file *file,
-                                            struct mm_struct *mm);
+static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *,
+                                            struct file *, struct mm_struct *);
+
+#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
+static int elf_fdpic_core_dump(long, struct pt_regs *, struct file *);
+#endif
 
 static struct linux_binfmt elf_fdpic_format = {
        .module         = THIS_MODULE,
        .load_binary    = load_elf_fdpic_binary,
-//     .load_shlib     = load_elf_fdpic_library,
-//     .core_dump      = elf_fdpic_core_dump,
+#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
+       .core_dump      = elf_fdpic_core_dump,
+#endif
        .min_coredump   = ELF_EXEC_PAGESIZE,
 };
 
-static int __init init_elf_fdpic_binfmt(void)  { return register_binfmt(&elf_fdpic_format); }
-static void __exit exit_elf_fdpic_binfmt(void) { unregister_binfmt(&elf_fdpic_format); }
+static int __init init_elf_fdpic_binfmt(void)
+{
+       return register_binfmt(&elf_fdpic_format);
+}
+
+static void __exit exit_elf_fdpic_binfmt(void)
+{
+       unregister_binfmt(&elf_fdpic_format);
+}
 
-module_init(init_elf_fdpic_binfmt)
-module_exit(exit_elf_fdpic_binfmt)
+core_initcall(init_elf_fdpic_binfmt);
+module_exit(exit_elf_fdpic_binfmt);
 
 static int is_elf_fdpic(struct elfhdr *hdr, struct file *file)
 {
@@ -105,7 +121,8 @@ static int is_elf_fdpic(struct elfhdr *hdr, struct file *file)
 /*
  * read the program headers table into memory
  */
-static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *params, struct file *file)
+static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *params,
+                                struct file *file)
 {
        struct elf32_phdr *phdr;
        unsigned long size;
@@ -121,7 +138,8 @@ static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *params, struct file *f
        if (!params->phdrs)
                return -ENOMEM;
 
-       retval = kernel_read(file, params->hdr.e_phoff, (char *) params->phdrs, size);
+       retval = kernel_read(file, params->hdr.e_phoff,
+                            (char *) params->phdrs, size);
        if (retval < 0)
                return retval;
 
@@ -141,17 +159,24 @@ static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *params, struct file *f
        }
 
        return 0;
-} /* end elf_fdpic_fetch_phdrs() */
+}
 
 /*****************************************************************************/
 /*
  * load an fdpic binary into various bits of memory
  */
-static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs)
+static int load_elf_fdpic_binary(struct linux_binprm *bprm,
+                                struct pt_regs *regs)
 {
        struct elf_fdpic_params exec_params, interp_params;
        struct elf_phdr *phdr;
-       unsigned long stack_size;
+       unsigned long stack_size, entryaddr;
+#ifndef CONFIG_MMU
+       unsigned long fullsize;
+#endif
+#ifdef ELF_FDPIC_PLAT_INIT
+       unsigned long dynaddr;
+#endif
        struct file *interpreter = NULL; /* to shut gcc up */
        char *interpreter_name = NULL;
        int executable_stack;
@@ -212,7 +237,8 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs
                                goto error;
                        }
 
-                       retval = kernel_read(interpreter, 0, bprm->buf, BINPRM_BUF_SIZE);
+                       retval = kernel_read(interpreter, 0, bprm->buf,
+                                            BINPRM_BUF_SIZE);
                        if (retval < 0)
                                goto error;
 
@@ -295,7 +321,8 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs
                                  &current->mm->start_stack,
                                  &current->mm->start_brk);
 
-       retval = setup_arg_pages(bprm, current->mm->start_stack, executable_stack);
+       retval = setup_arg_pages(bprm, current->mm->start_stack,
+                                executable_stack);
        if (retval < 0) {
                send_sig(SIGKILL, current, 0);
                goto error_kill;
@@ -303,7 +330,8 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs
 #endif
 
        /* load the executable and interpreter into memory */
-       retval = elf_fdpic_map_file(&exec_params, bprm->file, current->mm, "executable");
+       retval = elf_fdpic_map_file(&exec_params, bprm->file, current->mm,
+                                   "executable");
        if (retval < 0)
                goto error_kill;
 
@@ -324,7 +352,8 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs
        if (!current->mm->start_brk)
                current->mm->start_brk = current->mm->end_data;
 
-       current->mm->brk = current->mm->start_brk = PAGE_ALIGN(current->mm->start_brk);
+       current->mm->brk = current->mm->start_brk =
+               PAGE_ALIGN(current->mm->start_brk);
 
 #else
        /* create a stack and brk area big enough for everyone
@@ -336,47 +365,45 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs
                stack_size = PAGE_SIZE * 2;
 
        down_write(&current->mm->mmap_sem);
-       current->mm->start_brk = do_mmap(NULL,
-                                        0,
-                                        stack_size,
+       current->mm->start_brk = do_mmap(NULL, 0, stack_size,
                                         PROT_READ | PROT_WRITE | PROT_EXEC,
                                         MAP_PRIVATE | MAP_ANON | MAP_GROWSDOWN,
                                         0);
 
-       if (IS_ERR((void *) current->mm->start_brk)) {
+       if (IS_ERR_VALUE(current->mm->start_brk)) {
                up_write(&current->mm->mmap_sem);
                retval = current->mm->start_brk;
                current->mm->start_brk = 0;
                goto error_kill;
        }
 
-       if (do_mremap(current->mm->start_brk,
-                     stack_size,
-                     ksize((char *) current->mm->start_brk),
-                     0, 0
-                     ) == current->mm->start_brk
-           )
-               stack_size = ksize((char *) current->mm->start_brk);
+       /* expand the stack mapping to use up the entire allocation granule */
+       fullsize = ksize((char *) current->mm->start_brk);
+       if (!IS_ERR_VALUE(do_mremap(current->mm->start_brk, stack_size,
+                                   fullsize, 0, 0)))
+               stack_size = fullsize;
        up_write(&current->mm->mmap_sem);
 
        current->mm->brk = current->mm->start_brk;
        current->mm->context.end_brk = current->mm->start_brk;
-       current->mm->context.end_brk += (stack_size > PAGE_SIZE) ? (stack_size - PAGE_SIZE) : 0;
+       current->mm->context.end_brk +=
+               (stack_size > PAGE_SIZE) ? (stack_size - PAGE_SIZE) : 0;
        current->mm->start_stack = current->mm->start_brk + stack_size;
 #endif
 
        compute_creds(bprm);
        current->flags &= ~PF_FORKNOEXEC;
-       if (create_elf_fdpic_tables(bprm, current->mm, &exec_params, &interp_params) < 0)
+       if (create_elf_fdpic_tables(bprm, current->mm,
+                                   &exec_params, &interp_params) < 0)
                goto error_kill;
 
-       kdebug("- start_code  %lx",     (long) current->mm->start_code);
-       kdebug("- end_code    %lx",     (long) current->mm->end_code);
-       kdebug("- start_data  %lx",     (long) current->mm->start_data);
-       kdebug("- end_data    %lx",     (long) current->mm->end_data);
-       kdebug("- start_brk   %lx",     (long) current->mm->start_brk);
-       kdebug("- brk         %lx",     (long) current->mm->brk);
-       kdebug("- start_stack %lx",     (long) current->mm->start_stack);
+       kdebug("- start_code  %lx", current->mm->start_code);
+       kdebug("- end_code    %lx", current->mm->end_code);
+       kdebug("- start_data  %lx", current->mm->start_data);
+       kdebug("- end_data    %lx", current->mm->end_data);
+       kdebug("- start_brk   %lx", current->mm->start_brk);
+       kdebug("- brk         %lx", current->mm->brk);
+       kdebug("- start_stack %lx", current->mm->start_stack);
 
 #ifdef ELF_FDPIC_PLAT_INIT
        /*
@@ -385,21 +412,18 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs
         * example.  This macro performs whatever initialization to
         * the regs structure is required.
         */
-       ELF_FDPIC_PLAT_INIT(regs,
-                           exec_params.map_addr,
-                           interp_params.map_addr,
-                           interp_params.dynamic_addr ?: exec_params.dynamic_addr
-                           );
+       dynaddr = interp_params.dynamic_addr ?: exec_params.dynamic_addr;
+       ELF_FDPIC_PLAT_INIT(regs, exec_params.map_addr, interp_params.map_addr,
+                           dynaddr);
 #endif
 
        /* everything is now ready... get the userspace context ready to roll */
-       start_thread(regs,
-                    interp_params.entry_addr ?: exec_params.entry_addr,
-                    current->mm->start_stack);
+       entryaddr = interp_params.entry_addr ?: exec_params.entry_addr;
+       start_thread(regs, entryaddr, current->mm->start_stack);
 
        if (unlikely(current->ptrace & PT_PTRACED)) {
                if (current->ptrace & PT_TRACE_EXEC)
-                       ptrace_notify ((PTRACE_EVENT_EXEC << 8) | SIGTRAP);
+                       ptrace_notify((PTRACE_EVENT_EXEC << 8) | SIGTRAP);
                else
                        send_sig(SIGTRAP, current, 0);
        }
@@ -419,11 +443,11 @@ error:
        return retval;
 
        /* unrecoverable error - kill the process */
- error_kill:
+error_kill:
        send_sig(SIGSEGV, current, 0);
        goto error;
 
-} /* end load_elf_fdpic_binary() */
+}
 
 /*****************************************************************************/
 /*
@@ -459,6 +483,7 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
         */
        hwcap = ELF_HWCAP;
        k_platform = ELF_PLATFORM;
+       u_platform = NULL;
 
        if (k_platform) {
                platform_len = strlen(k_platform) + 1;
@@ -470,11 +495,11 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
 
 #if defined(__i386__) && defined(CONFIG_SMP)
        /* in some cases (e.g. Hyper-Threading), we want to avoid L1 evictions
-        * by the processes running on the same package. One thing we can do
-        * is to shuffle the initial stack for them.
+        * by the processes running on the same package. One thing we can do is
+        * to shuffle the initial stack for them.
         *
-        * the conditionals here are unneeded, but kept in to make the
-        * code behaviour the same as pre change unless we have hyperthreaded
+        * the conditionals here are unneeded, but kept in to make the code
+        * behaviour the same as pre change unless we have hyperthreaded
         * processors. This keeps Mr Marcelo Person happier but should be
         * removed for 2.5
         */
@@ -497,11 +522,13 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
 
        if (interp_params->loadmap) {
                len = sizeof(struct elf32_fdpic_loadmap);
-               len += sizeof(struct elf32_fdpic_loadseg) * interp_params->loadmap->nsegs;
+               len += sizeof(struct elf32_fdpic_loadseg) *
+                       interp_params->loadmap->nsegs;
                sp = (sp - len) & ~7UL;
                interp_params->map_addr = sp;
 
-               if (copy_to_user((void __user *) sp, interp_params->loadmap, len) != 0)
+               if (copy_to_user((void __user *) sp, interp_params->loadmap,
+                                len) != 0)
                        return -EFAULT;
 
                current->mm->context.interp_fdpic_loadmap = (unsigned long) sp;
@@ -525,34 +552,37 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
        sp -= sp & 15UL;
 
        /* put the ELF interpreter info on the stack */
-#define NEW_AUX_ENT(nr, id, val)                                               \
-       do {                                                                    \
-               struct { unsigned long _id, _val; } __user *ent = (void __user *) csp;  \
-               __put_user((id), &ent[nr]._id);                                 \
-               __put_user((val), &ent[nr]._val);                               \
+#define NEW_AUX_ENT(nr, id, val)                                       \
+       do {                                                            \
+               struct { unsigned long _id, _val; } __user *ent;        \
+                                                                       \
+               ent = (void __user *) csp;                              \
+               __put_user((id), &ent[nr]._id);                         \
+               __put_user((val), &ent[nr]._val);                       \
        } while (0)
 
        csp -= 2 * sizeof(unsigned long);
        NEW_AUX_ENT(0, AT_NULL, 0);
        if (k_platform) {
                csp -= 2 * sizeof(unsigned long);
-               NEW_AUX_ENT(0, AT_PLATFORM, (elf_addr_t)(unsigned long) u_platform);
+               NEW_AUX_ENT(0, AT_PLATFORM,
+                           (elf_addr_t) (unsigned long) u_platform);
        }
 
        csp -= DLINFO_ITEMS * 2 * sizeof(unsigned long);
-       NEW_AUX_ENT( 0, AT_HWCAP,               hwcap);
-       NEW_AUX_ENT( 1, AT_PAGESZ,              PAGE_SIZE);
-       NEW_AUX_ENT( 2, AT_CLKTCK,              CLOCKS_PER_SEC);
-       NEW_AUX_ENT( 3, AT_PHDR,                exec_params->ph_addr);
-       NEW_AUX_ENT( 4, AT_PHENT,               sizeof(struct elf_phdr));
-       NEW_AUX_ENT( 5, AT_PHNUM,               exec_params->hdr.e_phnum);
-       NEW_AUX_ENT( 6, AT_BASE,                interp_params->elfhdr_addr);
-       NEW_AUX_ENT( 7, AT_FLAGS,               0);
-       NEW_AUX_ENT( 8, AT_ENTRY,               exec_params->entry_addr);
-       NEW_AUX_ENT( 9, AT_UID,                 (elf_addr_t) current->uid);
-       NEW_AUX_ENT(10, AT_EUID,                (elf_addr_t) current->euid);
-       NEW_AUX_ENT(11, AT_GID,                 (elf_addr_t) current->gid);
-       NEW_AUX_ENT(12, AT_EGID,                (elf_addr_t) current->egid);
+       NEW_AUX_ENT( 0, AT_HWCAP,       hwcap);
+       NEW_AUX_ENT( 1, AT_PAGESZ,      PAGE_SIZE);
+       NEW_AUX_ENT( 2, AT_CLKTCK,      CLOCKS_PER_SEC);
+       NEW_AUX_ENT( 3, AT_PHDR,        exec_params->ph_addr);
+       NEW_AUX_ENT( 4, AT_PHENT,       sizeof(struct elf_phdr));
+       NEW_AUX_ENT( 5, AT_PHNUM,       exec_params->hdr.e_phnum);
+       NEW_AUX_ENT( 6, AT_BASE,        interp_params->elfhdr_addr);
+       NEW_AUX_ENT( 7, AT_FLAGS,       0);
+       NEW_AUX_ENT( 8, AT_ENTRY,       exec_params->entry_addr);
+       NEW_AUX_ENT( 9, AT_UID,         (elf_addr_t) current->uid);
+       NEW_AUX_ENT(10, AT_EUID,        (elf_addr_t) current->euid);
+       NEW_AUX_ENT(11, AT_GID,         (elf_addr_t) current->gid);
+       NEW_AUX_ENT(12, AT_EGID,        (elf_addr_t) current->egid);
 
 #ifdef ARCH_DLINFO
        /* ARCH_DLINFO must come last so platform specific code can enforce
@@ -578,7 +608,8 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
 #ifdef CONFIG_MMU
        current->mm->arg_start = bprm->p;
 #else
-       current->mm->arg_start = current->mm->start_stack - (MAX_ARG_PAGES * PAGE_SIZE - bprm->p);
+       current->mm->arg_start = current->mm->start_stack -
+               (MAX_ARG_PAGES * PAGE_SIZE - bprm->p);
 #endif
 
        p = (char __user *) current->mm->arg_start;
@@ -606,7 +637,7 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
 
        mm->start_stack = (unsigned long) sp;
        return 0;
-} /* end create_elf_fdpic_tables() */
+}
 
 /*****************************************************************************/
 /*
@@ -614,7 +645,8 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
  * the stack
  */
 #ifndef CONFIG_MMU
-static int elf_fdpic_transfer_args_to_stack(struct linux_binprm *bprm, unsigned long *_sp)
+static int elf_fdpic_transfer_args_to_stack(struct linux_binprm *bprm,
+                                           unsigned long *_sp)
 {
        unsigned long index, stop, sp;
        char *src;
@@ -635,9 +667,9 @@ static int elf_fdpic_transfer_args_to_stack(struct linux_binprm *bprm, unsigned
 
        *_sp = (*_sp - (MAX_ARG_PAGES * PAGE_SIZE - bprm->p)) & ~15;
 
- out:
+out:
        return ret;
-} /* end elf_fdpic_transfer_args_to_stack() */
+}
 #endif
 
 /*****************************************************************************/
@@ -712,17 +744,18 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params,
                seg = loadmap->segs;
                for (loop = loadmap->nsegs; loop > 0; loop--, seg++) {
                        if (params->hdr.e_entry >= seg->p_vaddr &&
-                           params->hdr.e_entry < seg->p_vaddr + seg->p_memsz
-                           ) {
+                           params->hdr.e_entry < seg->p_vaddr + seg->p_memsz) {
                                params->entry_addr =
-                                       (params->hdr.e_entry - seg->p_vaddr) + seg->addr;
+                                       (params->hdr.e_entry - seg->p_vaddr) +
+                                       seg->addr;
                                break;
                        }
                }
        }
 
        /* determine where the program header table has wound up if mapped */
-       stop = params->hdr.e_phoff + params->hdr.e_phnum * sizeof (struct elf_phdr);
+       stop = params->hdr.e_phoff;
+       stop += params->hdr.e_phnum * sizeof (struct elf_phdr);
        phdr = params->phdrs;
 
        for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) {
@@ -736,9 +769,11 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params,
                seg = loadmap->segs;
                for (loop = loadmap->nsegs; loop > 0; loop--, seg++) {
                        if (phdr->p_vaddr >= seg->p_vaddr &&
-                           phdr->p_vaddr + phdr->p_filesz <= seg->p_vaddr + seg->p_memsz
-                           ) {
-                               params->ph_addr = (phdr->p_vaddr - seg->p_vaddr) + seg->addr +
+                           phdr->p_vaddr + phdr->p_filesz <=
+                           seg->p_vaddr + seg->p_memsz) {
+                               params->ph_addr =
+                                       (phdr->p_vaddr - seg->p_vaddr) +
+                                       seg->addr +
                                        params->hdr.e_phoff - phdr->p_offset;
                                break;
                        }
@@ -755,18 +790,22 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params,
                seg = loadmap->segs;
                for (loop = loadmap->nsegs; loop > 0; loop--, seg++) {
                        if (phdr->p_vaddr >= seg->p_vaddr &&
-                           phdr->p_vaddr + phdr->p_memsz <= seg->p_vaddr + seg->p_memsz
-                           ) {
-                               params->dynamic_addr = (phdr->p_vaddr - seg->p_vaddr) + seg->addr;
-
-                               /* check the dynamic section contains at least one item, and that
-                                * the last item is a NULL entry */
+                           phdr->p_vaddr + phdr->p_memsz <=
+                           seg->p_vaddr + seg->p_memsz) {
+                               params->dynamic_addr =
+                                       (phdr->p_vaddr - seg->p_vaddr) +
+                                       seg->addr;
+
+                               /* check the dynamic section contains at least
+                                * one item, and that the last item is a NULL
+                                * entry */
                                if (phdr->p_memsz == 0 ||
                                    phdr->p_memsz % sizeof(Elf32_Dyn) != 0)
                                        goto dynamic_error;
 
                                tmp = phdr->p_memsz / sizeof(Elf32_Dyn);
-                               if (((Elf32_Dyn *) params->dynamic_addr)[tmp - 1].d_tag != 0)
+                               if (((Elf32_Dyn *)
+                                    params->dynamic_addr)[tmp - 1].d_tag != 0)
                                        goto dynamic_error;
                                break;
                        }
@@ -775,8 +814,8 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params,
        }
 
        /* now elide adjacent segments in the load map on MMU linux
-        * - on uClinux the holes between may actually be filled with system stuff or stuff from
-        *   other processes
+        * - on uClinux the holes between may actually be filled with system
+        *   stuff or stuff from other processes
         */
 #ifdef CONFIG_MMU
        nloads = loadmap->nsegs;
@@ -787,7 +826,9 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params,
                if (seg->p_vaddr - mseg->p_vaddr == seg->addr - mseg->addr) {
                        load_addr = PAGE_ALIGN(mseg->addr + mseg->p_memsz);
                        if (load_addr == (seg->addr & PAGE_MASK)) {
-                               mseg->p_memsz += load_addr - (mseg->addr + mseg->p_memsz);
+                               mseg->p_memsz +=
+                                       load_addr -
+                                       (mseg->addr + mseg->p_memsz);
                                mseg->p_memsz += seg->addr & ~PAGE_MASK;
                                mseg->p_memsz += seg->p_memsz;
                                loadmap->nsegs--;
@@ -815,20 +856,21 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params,
 
        return 0;
 
- dynamic_error:
+dynamic_error:
        printk("ELF FDPIC %s with invalid DYNAMIC section (inode=%lu)\n",
               what, file->f_dentry->d_inode->i_ino);
        return -ELIBBAD;
-} /* end elf_fdpic_map_file() */
+}
 
 /*****************************************************************************/
 /*
  * map a file with constant displacement under uClinux
  */
 #ifndef CONFIG_MMU
-static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *params,
-                                                  struct file *file,
-                                                  struct mm_struct *mm)
+static int elf_fdpic_map_file_constdisp_on_uclinux(
+       struct elf_fdpic_params *params,
+       struct file *file,
+       struct mm_struct *mm)
 {
        struct elf32_fdpic_loadseg *seg;
        struct elf32_phdr *phdr;
@@ -839,7 +881,8 @@ static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *para
        load_addr = params->load_addr;
        seg = params->loadmap->segs;
 
-       /* determine the bounds of the contiguous overall allocation we must make */
+       /* determine the bounds of the contiguous overall allocation we must
+        * make */
        phdr = params->phdrs;
        for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) {
                if (params->phdrs[loop].p_type != PT_LOAD)
@@ -860,7 +903,7 @@ static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *para
        maddr = do_mmap(NULL, load_addr, top - base,
                        PROT_READ | PROT_WRITE | PROT_EXEC, mflags, 0);
        up_write(&mm->mmap_sem);
-       if (IS_ERR((void *) maddr))
+       if (IS_ERR_VALUE(maddr))
                return (int) maddr;
 
        if (load_addr != 0)
@@ -878,7 +921,8 @@ static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *para
                seg->p_vaddr = phdr->p_vaddr;
                seg->p_memsz = phdr->p_memsz;
 
-               ret = file->f_op->read(file, (void *) seg->addr, phdr->p_filesz, &fpos);
+               ret = file->f_op->read(file, (void *) seg->addr,
+                                      phdr->p_filesz, &fpos);
                if (ret < 0)
                        return ret;
 
@@ -895,8 +939,7 @@ static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *para
                        if (phdr->p_flags & PF_X) {
                                mm->start_code = seg->addr;
                                mm->end_code = seg->addr + phdr->p_memsz;
-                       }
-                       else if (!mm->start_data) {
+                       } else if (!mm->start_data) {
                                mm->start_data = seg->addr;
 #ifndef CONFIG_MMU
                                mm->end_data = seg->addr + phdr->p_memsz;
@@ -913,7 +956,7 @@ static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *para
        }
 
        return 0;
-} /* end elf_fdpic_map_file_constdisp_on_uclinux() */
+}
 #endif
 
 /*****************************************************************************/
@@ -974,14 +1017,14 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
 
                case ELF_FDPIC_FLAG_CONSTDISP:
                        /* constant displacement
-                        * - can be mapped anywhere, but must be mapped as a unit
+                        * - can be mapped anywhere, but must be mapped as a
+                        *   unit
                         */
                        if (!dvset) {
                                maddr = load_addr;
                                delta_vaddr = phdr->p_vaddr;
                                dvset = 1;
-                       }
-                       else {
+                       } else {
                                maddr = load_addr + phdr->p_vaddr - delta_vaddr;
                                flags |= MAP_FIXED;
                        }
@@ -1005,13 +1048,14 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
                up_write(&mm->mmap_sem);
 
                kdebug("mmap[%d] <file> sz=%lx pr=%x fl=%x of=%lx --> %08lx",
-                      loop, phdr->p_memsz + disp, prot, flags, phdr->p_offset - disp,
-                      maddr);
+                      loop, phdr->p_memsz + disp, prot, flags,
+                      phdr->p_offset - disp, maddr);
 
-               if (IS_ERR((void *) maddr))
+               if (IS_ERR_VALUE(maddr))
                        return (int) maddr;
 
-               if ((params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) == ELF_FDPIC_FLAG_CONTIGUOUS)
+               if ((params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) ==
+                   ELF_FDPIC_FLAG_CONTIGUOUS)
                        load_addr += PAGE_ALIGN(phdr->p_memsz + disp);
 
                seg->addr = maddr + disp;
@@ -1022,7 +1066,8 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
                if (phdr->p_offset == 0)
                        params->elfhdr_addr = seg->addr;
 
-               /* clear the bit between beginning of mapping and beginning of PT_LOAD */
+               /* clear the bit between beginning of mapping and beginning of
+                * PT_LOAD */
                if (prot & PROT_WRITE && disp > 0) {
                        kdebug("clear[%d] ad=%lx sz=%lx", loop, maddr, disp);
                        clear_user((void __user *) maddr, disp);
@@ -1038,19 +1083,20 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
                excess1 = PAGE_SIZE - ((maddr + phdr->p_filesz) & ~PAGE_MASK);
 
 #ifdef CONFIG_MMU
-
                if (excess > excess1) {
                        unsigned long xaddr = maddr + phdr->p_filesz + excess1;
                        unsigned long xmaddr;
 
                        flags |= MAP_FIXED | MAP_ANONYMOUS;
                        down_write(&mm->mmap_sem);
-                       xmaddr = do_mmap(NULL, xaddr, excess - excess1, prot, flags, 0);
+                       xmaddr = do_mmap(NULL, xaddr, excess - excess1,
+                                        prot, flags, 0);
                        up_write(&mm->mmap_sem);
 
                        kdebug("mmap[%d] <anon>"
                               " ad=%lx sz=%lx pr=%x fl=%x of=0 --> %08lx",
-                              loop, xaddr, excess - excess1, prot, flags, xmaddr);
+                              loop, xaddr, excess - excess1, prot, flags,
+                              xmaddr);
 
                        if (xmaddr != xaddr)
                                return -ENOMEM;
@@ -1059,7 +1105,8 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
                if (prot & PROT_WRITE && excess1 > 0) {
                        kdebug("clear[%d] ad=%lx sz=%lx",
                               loop, maddr + phdr->p_filesz, excess1);
-                       clear_user((void __user *) maddr + phdr->p_filesz, excess1);
+                       clear_user((void __user *) maddr + phdr->p_filesz,
+                                  excess1);
                }
 
 #else
@@ -1074,8 +1121,7 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
                        if (phdr->p_flags & PF_X) {
                                mm->start_code = maddr;
                                mm->end_code = maddr + phdr->p_memsz;
-                       }
-                       else if (!mm->start_data) {
+                       } else if (!mm->start_data) {
                                mm->start_data = maddr;
                                mm->end_data = maddr + phdr->p_memsz;
                        }
@@ -1085,4 +1131,662 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
        }
 
        return 0;
-} /* end elf_fdpic_map_file_by_direct_mmap() */
+}
+
+/*****************************************************************************/
+/*
+ * ELF-FDPIC core dumper
+ *
+ * Modelled on fs/exec.c:aout_core_dump()
+ * Jeremy Fitzhardinge <jeremy@sw.oz.au>
+ *
+ * Modelled on fs/binfmt_elf.c core dumper
+ */
+#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
+
+/*
+ * These are the only things you should do on a core-file: use only these
+ * functions to write out all the necessary info.
+ */
+static int dump_write(struct file *file, const void *addr, int nr)
+{
+       return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
+}
+
+static int dump_seek(struct file *file, loff_t off)
+{
+       if (file->f_op->llseek) {
+               if (file->f_op->llseek(file, off, SEEK_SET) != off)
+                       return 0;
+       } else {
+               file->f_pos = off;
+       }
+       return 1;
+}
+
+/*
+ * Decide whether a segment is worth dumping; default is yes to be
+ * sure (missing info is worse than too much; etc).
+ * Personally I'd include everything, and use the coredump limit...
+ *
+ * I think we should skip something. But I am not sure how. H.J.
+ */
+static int maydump(struct vm_area_struct *vma)
+{
+       /* Do not dump I/O mapped devices or special mappings */
+       if (vma->vm_flags & (VM_IO | VM_RESERVED)) {
+               kdcore("%08lx: %08lx: no (IO)", vma->vm_start, vma->vm_flags);
+               return 0;
+       }
+
+       /* If we may not read the contents, don't allow us to dump
+        * them either. "dump_write()" can't handle it anyway.
+        */
+       if (!(vma->vm_flags & VM_READ)) {
+               kdcore("%08lx: %08lx: no (!read)", vma->vm_start, vma->vm_flags);
+               return 0;
+       }
+
+       /* Dump shared memory only if mapped from an anonymous file. */
+       if (vma->vm_flags & VM_SHARED) {
+               if (vma->vm_file->f_dentry->d_inode->i_nlink == 0) {
+                       kdcore("%08lx: %08lx: no (share)", vma->vm_start, vma->vm_flags);
+                       return 1;
+               }
+
+               kdcore("%08lx: %08lx: no (share)", vma->vm_start, vma->vm_flags);
+               return 0;
+       }
+
+#ifdef CONFIG_MMU
+       /* If it hasn't been written to, don't write it out */
+       if (!vma->anon_vma) {
+               kdcore("%08lx: %08lx: no (!anon)", vma->vm_start, vma->vm_flags);
+               return 0;
+       }
+#endif
+
+       kdcore("%08lx: %08lx: yes", vma->vm_start, vma->vm_flags);
+       return 1;
+}
+
+/* An ELF note in memory */
+struct memelfnote
+{
+       const char *name;
+       int type;
+       unsigned int datasz;
+       void *data;
+};
+
+static int notesize(struct memelfnote *en)
+{
+       int sz;
+
+       sz = sizeof(struct elf_note);
+       sz += roundup(strlen(en->name) + 1, 4);
+       sz += roundup(en->datasz, 4);
+
+       return sz;
+}
+
+/* #define DEBUG */
+
+#define DUMP_WRITE(addr, nr)   \
+       do { if (!dump_write(file, (addr), (nr))) return 0; } while(0)
+#define DUMP_SEEK(off) \
+       do { if (!dump_seek(file, (off))) return 0; } while(0)
+
+static int writenote(struct memelfnote *men, struct file *file)
+{
+       struct elf_note en;
+
+       en.n_namesz = strlen(men->name) + 1;
+       en.n_descsz = men->datasz;
+       en.n_type = men->type;
+
+       DUMP_WRITE(&en, sizeof(en));
+       DUMP_WRITE(men->name, en.n_namesz);
+       /* XXX - cast from long long to long to avoid need for libgcc.a */
+       DUMP_SEEK(roundup((unsigned long)file->f_pos, 4));      /* XXX */
+       DUMP_WRITE(men->data, men->datasz);
+       DUMP_SEEK(roundup((unsigned long)file->f_pos, 4));      /* XXX */
+
+       return 1;
+}
+#undef DUMP_WRITE
+#undef DUMP_SEEK
+
+#define DUMP_WRITE(addr, nr)   \
+       if ((size += (nr)) > limit || !dump_write(file, (addr), (nr))) \
+               goto end_coredump;
+#define DUMP_SEEK(off) \
+       if (!dump_seek(file, (off))) \
+               goto end_coredump;
+
+static inline void fill_elf_fdpic_header(struct elfhdr *elf, int segs)
+{
+       memcpy(elf->e_ident, ELFMAG, SELFMAG);
+       elf->e_ident[EI_CLASS] = ELF_CLASS;
+       elf->e_ident[EI_DATA] = ELF_DATA;
+       elf->e_ident[EI_VERSION] = EV_CURRENT;
+       elf->e_ident[EI_OSABI] = ELF_OSABI;
+       memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD);
+
+       elf->e_type = ET_CORE;
+       elf->e_machine = ELF_ARCH;
+       elf->e_version = EV_CURRENT;
+       elf->e_entry = 0;
+       elf->e_phoff = sizeof(struct elfhdr);
+       elf->e_shoff = 0;
+       elf->e_flags = ELF_FDPIC_CORE_EFLAGS;
+       elf->e_ehsize = sizeof(struct elfhdr);
+       elf->e_phentsize = sizeof(struct elf_phdr);
+       elf->e_phnum = segs;
+       elf->e_shentsize = 0;
+       elf->e_shnum = 0;
+       elf->e_shstrndx = 0;
+       return;
+}
+
+static inline void fill_elf_note_phdr(struct elf_phdr *phdr, int sz, loff_t offset)
+{
+       phdr->p_type = PT_NOTE;
+       phdr->p_offset = offset;
+       phdr->p_vaddr = 0;
+       phdr->p_paddr = 0;
+       phdr->p_filesz = sz;
+       phdr->p_memsz = 0;
+       phdr->p_flags = 0;
+       phdr->p_align = 0;
+       return;
+}
+
+static inline void fill_note(struct memelfnote *note, const char *name, int type,
+               unsigned int sz, void *data)
+{
+       note->name = name;
+       note->type = type;
+       note->datasz = sz;
+       note->data = data;
+       return;
+}
+
+/*
+ * fill up all the fields in prstatus from the given task struct, except
+ * registers which need to be filled up seperately.
+ */
+static void fill_prstatus(struct elf_prstatus *prstatus,
+                         struct task_struct *p, long signr)
+{
+       prstatus->pr_info.si_signo = prstatus->pr_cursig = signr;
+       prstatus->pr_sigpend = p->pending.signal.sig[0];
+       prstatus->pr_sighold = p->blocked.sig[0];
+       prstatus->pr_pid = p->pid;
+       prstatus->pr_ppid = p->parent->pid;
+       prstatus->pr_pgrp = process_group(p);
+       prstatus->pr_sid = p->signal->session;
+       if (thread_group_leader(p)) {
+               /*
+                * This is the record for the group leader.  Add in the
+                * cumulative times of previous dead threads.  This total
+                * won't include the time of each live thread whose state
+                * is included in the core dump.  The final total reported
+                * to our parent process when it calls wait4 will include
+                * those sums as well as the little bit more time it takes
+                * this and each other thread to finish dying after the
+                * core dump synchronization phase.
+                */
+               cputime_to_timeval(cputime_add(p->utime, p->signal->utime),
+                                  &prstatus->pr_utime);
+               cputime_to_timeval(cputime_add(p->stime, p->signal->stime),
+                                  &prstatus->pr_stime);
+       } else {
+               cputime_to_timeval(p->utime, &prstatus->pr_utime);
+               cputime_to_timeval(p->stime, &prstatus->pr_stime);
+       }
+       cputime_to_timeval(p->signal->cutime, &prstatus->pr_cutime);
+       cputime_to_timeval(p->signal->cstime, &prstatus->pr_cstime);
+
+       prstatus->pr_exec_fdpic_loadmap = p->mm->context.exec_fdpic_loadmap;
+       prstatus->pr_interp_fdpic_loadmap = p->mm->context.interp_fdpic_loadmap;
+}
+
+static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p,
+                      struct mm_struct *mm)
+{
+       unsigned int i, len;
+
+       /* first copy the parameters from user space */
+       memset(psinfo, 0, sizeof(struct elf_prpsinfo));
+
+       len = mm->arg_end - mm->arg_start;
+       if (len >= ELF_PRARGSZ)
+               len = ELF_PRARGSZ - 1;
+       if (copy_from_user(&psinfo->pr_psargs,
+                          (const char __user *) mm->arg_start, len))
+               return -EFAULT;
+       for (i = 0; i < len; i++)
+               if (psinfo->pr_psargs[i] == 0)
+                       psinfo->pr_psargs[i] = ' ';
+       psinfo->pr_psargs[len] = 0;
+
+       psinfo->pr_pid = p->pid;
+       psinfo->pr_ppid = p->parent->pid;
+       psinfo->pr_pgrp = process_group(p);
+       psinfo->pr_sid = p->signal->session;
+
+       i = p->state ? ffz(~p->state) + 1 : 0;
+       psinfo->pr_state = i;
+       psinfo->pr_sname = (i > 5) ? '.' : "RSDTZW"[i];
+       psinfo->pr_zomb = psinfo->pr_sname == 'Z';
+       psinfo->pr_nice = task_nice(p);
+       psinfo->pr_flag = p->flags;
+       SET_UID(psinfo->pr_uid, p->uid);
+       SET_GID(psinfo->pr_gid, p->gid);
+       strncpy(psinfo->pr_fname, p->comm, sizeof(psinfo->pr_fname));
+
+       return 0;
+}
+
+/* Here is the structure in which status of each thread is captured. */
+struct elf_thread_status
+{
+       struct list_head list;
+       struct elf_prstatus prstatus;   /* NT_PRSTATUS */
+       elf_fpregset_t fpu;             /* NT_PRFPREG */
+       struct task_struct *thread;
+#ifdef ELF_CORE_COPY_XFPREGS
+       elf_fpxregset_t xfpu;           /* NT_PRXFPREG */
+#endif
+       struct memelfnote notes[3];
+       int num_notes;
+};
+
+/*
+ * In order to add the specific thread information for the elf file format,
+ * we need to keep a linked list of every thread's pr_status and then create
+ * a single section for them in the final core file.
+ */
+static int elf_dump_thread_status(long signr, struct elf_thread_status *t)
+{
+       struct task_struct *p = t->thread;
+       int sz = 0;
+
+       t->num_notes = 0;
+
+       fill_prstatus(&t->prstatus, p, signr);
+       elf_core_copy_task_regs(p, &t->prstatus.pr_reg);
+
+       fill_note(&t->notes[0], "CORE", NT_PRSTATUS, sizeof(t->prstatus),
+                 &t->prstatus);
+       t->num_notes++;
+       sz += notesize(&t->notes[0]);
+
+       t->prstatus.pr_fpvalid = elf_core_copy_task_fpregs(p, NULL, &t->fpu);
+       if (t->prstatus.pr_fpvalid) {
+               fill_note(&t->notes[1], "CORE", NT_PRFPREG, sizeof(t->fpu),
+                         &t->fpu);
+               t->num_notes++;
+               sz += notesize(&t->notes[1]);
+       }
+
+#ifdef ELF_CORE_COPY_XFPREGS
+       if (elf_core_copy_task_xfpregs(p, &t->xfpu)) {
+               fill_note(&t->notes[2], "LINUX", NT_PRXFPREG, sizeof(t->xfpu),
+                         &t->xfpu);
+               t->num_notes++;
+               sz += notesize(&t->notes[2]);
+       }
+#endif
+       return sz;
+}
+
+/*
+ * dump the segments for an MMU process
+ */
+#ifdef CONFIG_MMU
+static int elf_fdpic_dump_segments(struct file *file, struct mm_struct *mm,
+                                  size_t *size, unsigned long *limit)
+{
+       struct vm_area_struct *vma;
+
+       for (vma = current->mm->mmap; vma; vma = vma->vm_next) {
+               unsigned long addr;
+
+               if (!maydump(vma))
+                       continue;
+
+               for (addr = vma->vm_start;
+                    addr < vma->vm_end;
+                    addr += PAGE_SIZE
+                    ) {
+                       struct vm_area_struct *vma;
+                       struct page *page;
+
+                       if (get_user_pages(current, current->mm, addr, 1, 0, 1,
+                                          &page, &vma) <= 0) {
+                               DUMP_SEEK(file->f_pos + PAGE_SIZE);
+                       }
+                       else if (page == ZERO_PAGE(addr)) {
+                               DUMP_SEEK(file->f_pos + PAGE_SIZE);
+                               page_cache_release(page);
+                       }
+                       else {
+                               void *kaddr;
+
+                               flush_cache_page(vma, addr, page_to_pfn(page));
+                               kaddr = kmap(page);
+                               if ((*size += PAGE_SIZE) > *limit ||
+                                   !dump_write(file, kaddr, PAGE_SIZE)
+                                   ) {
+                                       kunmap(page);
+                                       page_cache_release(page);
+                                       return -EIO;
+                               }
+                               kunmap(page);
+                               page_cache_release(page);
+                       }
+               }
+       }
+
+       return 0;
+
+end_coredump:
+       return -EFBIG;
+}
+#endif
+
+/*
+ * dump the segments for a NOMMU process
+ */
+#ifndef CONFIG_MMU
+static int elf_fdpic_dump_segments(struct file *file, struct mm_struct *mm,
+                                  size_t *size, unsigned long *limit)
+{
+       struct vm_list_struct *vml;
+
+       for (vml = current->mm->context.vmlist; vml; vml = vml->next) {
+       struct vm_area_struct *vma = vml->vma;
+
+               if (!maydump(vma))
+                       continue;
+
+               if ((*size += PAGE_SIZE) > *limit)
+                       return -EFBIG;
+
+               if (!dump_write(file, (void *) vma->vm_start,
+                               vma->vm_end - vma->vm_start))
+                       return -EIO;
+       }
+
+       return 0;
+}
+#endif
+
+/*
+ * Actual dumper
+ *
+ * This is a two-pass process; first we find the offsets of the bits,
+ * and then they are actually written out.  If we run out of core limit
+ * we just truncate.
+ */
+static int elf_fdpic_core_dump(long signr, struct pt_regs *regs,
+                              struct file *file)
+{
+#define        NUM_NOTES       6
+       int has_dumped = 0;
+       mm_segment_t fs;
+       int segs;
+       size_t size = 0;
+       int i;
+       struct vm_area_struct *vma;
+       struct elfhdr *elf = NULL;
+       loff_t offset = 0, dataoff;
+       unsigned long limit = current->signal->rlim[RLIMIT_CORE].rlim_cur;
+       int numnote;
+       struct memelfnote *notes = NULL;
+       struct elf_prstatus *prstatus = NULL;   /* NT_PRSTATUS */
+       struct elf_prpsinfo *psinfo = NULL;     /* NT_PRPSINFO */
+       struct task_struct *g, *p;
+       LIST_HEAD(thread_list);
+       struct list_head *t;
+       elf_fpregset_t *fpu = NULL;
+#ifdef ELF_CORE_COPY_XFPREGS
+       elf_fpxregset_t *xfpu = NULL;
+#endif
+       int thread_status_size = 0;
+#ifndef CONFIG_MMU
+       struct vm_list_struct *vml;
+#endif
+       elf_addr_t *auxv;
+
+       /*
+        * We no longer stop all VM operations.
+        *
+        * This is because those proceses that could possibly change map_count
+        * or the mmap / vma pages are now blocked in do_exit on current
+        * finishing this core dump.
+        *
+        * Only ptrace can touch these memory addresses, but it doesn't change
+        * the map_count or the pages allocated. So no possibility of crashing
+        * exists while dumping the mm->vm_next areas to the core file.
+        */
+
+       /* alloc memory for large data structures: too large to be on stack */
+       elf = kmalloc(sizeof(*elf), GFP_KERNEL);
+       if (!elf)
+               goto cleanup;
+       prstatus = kzalloc(sizeof(*prstatus), GFP_KERNEL);
+       if (!prstatus)
+               goto cleanup;
+       psinfo = kmalloc(sizeof(*psinfo), GFP_KERNEL);
+       if (!psinfo)
+               goto cleanup;
+       notes = kmalloc(NUM_NOTES * sizeof(struct memelfnote), GFP_KERNEL);
+       if (!notes)
+               goto cleanup;
+       fpu = kmalloc(sizeof(*fpu), GFP_KERNEL);
+       if (!fpu)
+               goto cleanup;
+#ifdef ELF_CORE_COPY_XFPREGS
+       xfpu = kmalloc(sizeof(*xfpu), GFP_KERNEL);
+       if (!xfpu)
+               goto cleanup;
+#endif
+
+       if (signr) {
+               struct elf_thread_status *tmp;
+               read_lock(&tasklist_lock);
+               do_each_thread(g,p)
+                       if (current->mm == p->mm && current != p) {
+                               tmp = kzalloc(sizeof(*tmp), GFP_ATOMIC);
+                               if (!tmp) {
+                                       read_unlock(&tasklist_lock);
+                                       goto cleanup;
+                               }
+                               INIT_LIST_HEAD(&tmp->list);
+                               tmp->thread = p;
+                               list_add(&tmp->list, &thread_list);
+                       }
+               while_each_thread(g,p);
+               read_unlock(&tasklist_lock);
+               list_for_each(t, &thread_list) {
+                       struct elf_thread_status *tmp;
+                       int sz;
+
+                       tmp = list_entry(t, struct elf_thread_status, list);
+                       sz = elf_dump_thread_status(signr, tmp);
+                       thread_status_size += sz;
+               }
+       }
+
+       /* now collect the dump for the current */
+       fill_prstatus(prstatus, current, signr);
+       elf_core_copy_regs(&prstatus->pr_reg, regs);
+
+#ifdef CONFIG_MMU
+       segs = current->mm->map_count;
+#else
+       segs = 0;
+       for (vml = current->mm->context.vmlist; vml; vml = vml->next)
+           segs++;
+#endif
+#ifdef ELF_CORE_EXTRA_PHDRS
+       segs += ELF_CORE_EXTRA_PHDRS;
+#endif
+
+       /* Set up header */
+       fill_elf_fdpic_header(elf, segs + 1);   /* including notes section */
+
+       has_dumped = 1;
+       current->flags |= PF_DUMPCORE;
+
+       /*
+        * Set up the notes in similar form to SVR4 core dumps made
+        * with info from their /proc.
+        */
+
+       fill_note(notes + 0, "CORE", NT_PRSTATUS, sizeof(*prstatus), prstatus);
+       fill_psinfo(psinfo, current->group_leader, current->mm);
+       fill_note(notes + 1, "CORE", NT_PRPSINFO, sizeof(*psinfo), psinfo);
+
+       numnote = 2;
+
+       auxv = (elf_addr_t *) current->mm->saved_auxv;
+
+       i = 0;
+       do
+               i += 2;
+       while (auxv[i - 2] != AT_NULL);
+       fill_note(&notes[numnote++], "CORE", NT_AUXV,
+                 i * sizeof(elf_addr_t), auxv);
+
+       /* Try to dump the FPU. */
+       if ((prstatus->pr_fpvalid =
+            elf_core_copy_task_fpregs(current, regs, fpu)))
+               fill_note(notes + numnote++,
+                         "CORE", NT_PRFPREG, sizeof(*fpu), fpu);
+#ifdef ELF_CORE_COPY_XFPREGS
+       if (elf_core_copy_task_xfpregs(current, xfpu))
+               fill_note(notes + numnote++,
+                         "LINUX", NT_PRXFPREG, sizeof(*xfpu), xfpu);
+#endif
+
+       fs = get_fs();
+       set_fs(KERNEL_DS);
+
+       DUMP_WRITE(elf, sizeof(*elf));
+       offset += sizeof(*elf);                         /* Elf header */
+       offset += (segs+1) * sizeof(struct elf_phdr);   /* Program headers */
+
+       /* Write notes phdr entry */
+       {
+               struct elf_phdr phdr;
+               int sz = 0;
+
+               for (i = 0; i < numnote; i++)
+                       sz += notesize(notes + i);
+
+               sz += thread_status_size;
+
+               fill_elf_note_phdr(&phdr, sz, offset);
+               offset += sz;
+               DUMP_WRITE(&phdr, sizeof(phdr));
+       }
+
+       /* Page-align dumped data */
+       dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE);
+
+       /* write program headers for segments dump */
+       for (
+#ifdef CONFIG_MMU
+               vma = current->mm->mmap; vma; vma = vma->vm_next
+#else
+                       vml = current->mm->context.vmlist; vml; vml = vml->next
+#endif
+            ) {
+               struct elf_phdr phdr;
+               size_t sz;
+
+#ifndef CONFIG_MMU
+               vma = vml->vma;
+#endif
+
+               sz = vma->vm_end - vma->vm_start;
+
+               phdr.p_type = PT_LOAD;
+               phdr.p_offset = offset;
+               phdr.p_vaddr = vma->vm_start;
+               phdr.p_paddr = 0;
+               phdr.p_filesz = maydump(vma) ? sz : 0;
+               phdr.p_memsz = sz;
+               offset += phdr.p_filesz;
+               phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
+               if (vma->vm_flags & VM_WRITE)
+                       phdr.p_flags |= PF_W;
+               if (vma->vm_flags & VM_EXEC)
+                       phdr.p_flags |= PF_X;
+               phdr.p_align = ELF_EXEC_PAGESIZE;
+
+               DUMP_WRITE(&phdr, sizeof(phdr));
+       }
+
+#ifdef ELF_CORE_WRITE_EXTRA_PHDRS
+       ELF_CORE_WRITE_EXTRA_PHDRS;
+#endif
+
+       /* write out the notes section */
+       for (i = 0; i < numnote; i++)
+               if (!writenote(notes + i, file))
+                       goto end_coredump;
+
+       /* write out the thread status notes section */
+       list_for_each(t, &thread_list) {
+               struct elf_thread_status *tmp =
+                               list_entry(t, struct elf_thread_status, list);
+
+               for (i = 0; i < tmp->num_notes; i++)
+                       if (!writenote(&tmp->notes[i], file))
+                               goto end_coredump;
+       }
+
+       DUMP_SEEK(dataoff);
+
+       if (elf_fdpic_dump_segments(file, current->mm, &size, &limit) < 0)
+               goto end_coredump;
+
+#ifdef ELF_CORE_WRITE_EXTRA_DATA
+       ELF_CORE_WRITE_EXTRA_DATA;
+#endif
+
+       if (file->f_pos != offset) {
+               /* Sanity check */
+               printk(KERN_WARNING
+                      "elf_core_dump: file->f_pos (%lld) != offset (%lld)\n",
+                      file->f_pos, offset);
+       }
+
+end_coredump:
+       set_fs(fs);
+
+cleanup:
+       while (!list_empty(&thread_list)) {
+               struct list_head *tmp = thread_list.next;
+               list_del(tmp);
+               kfree(list_entry(tmp, struct elf_thread_status, list));
+       }
+
+       kfree(elf);
+       kfree(prstatus);
+       kfree(psinfo);
+       kfree(notes);
+       kfree(fpu);
+#ifdef ELF_CORE_COPY_XFPREGS
+       kfree(xfpu);
+#endif
+       return has_dumped;
+#undef NUM_NOTES
+}
+
+#endif         /* USE_ELF_CORE_DUMP */
index a4cbc6706ef0062343ca8ef6d2db18c429bd8f2e..3483d3cf80873432d7696f6f3f68b4adef928b01 100644 (file)
@@ -182,6 +182,28 @@ int alloc_chrdev_region(dev_t *dev, unsigned baseminor, unsigned count,
        return 0;
 }
 
+/**
+ * register_chrdev() - Register a major number for character devices.
+ * @major: major device number or 0 for dynamic allocation
+ * @name: name of this range of devices
+ * @fops: file operations associated with this devices
+ *
+ * If @major == 0 this functions will dynamically allocate a major and return
+ * its number.
+ *
+ * If @major > 0 this function will attempt to reserve a device with the given
+ * major number and will return zero on success.
+ *
+ * Returns a -ve errno on failure.
+ *
+ * The name of this device has nothing to do with the name of the device in
+ * /dev. It only helps to keep track of the different owners of devices. If
+ * your module name has only one type of devices it's ok to use e.g. the name
+ * of the module here.
+ *
+ * This function registers a range of 256 minor numbers. The first minor number
+ * is 0.
+ */
 int register_chrdev(unsigned int major, const char *name,
                    const struct file_operations *fops)
 {
index 92d50b53a9338f8b5759b80702ccb9e97ddcfe2c..0d1e6279cbfd5799a11f27f774fbcdaf8bd397fb 100644 (file)
@@ -62,9 +62,6 @@ extern int ext3_permission (struct inode *, int, struct nameidata *);
 extern int ext3_acl_chmod (struct inode *);
 extern int ext3_init_acl (handle_t *, struct inode *, struct inode *);
 
-extern int init_ext3_acl(void);
-extern void exit_ext3_acl(void);
-
 #else  /* CONFIG_EXT3_FS_POSIX_ACL */
 #include <linux/sched.h>
 #define ext3_permission NULL
index 55f4e70225631b275f85215ee543b104507caacc..b3c6b82e6a9d8629446e77268a83a2c5c4eb1b62 100644 (file)
--- a/fs/file.c
+++ b/fs/file.c
@@ -240,13 +240,9 @@ static struct fdtable *alloc_fdtable(int nr)
        if (!fdt)
                goto out;
 
-       nfds = 8 * L1_CACHE_BYTES;
-       /* Expand to the max in easy steps */
-       while (nfds <= nr) {
-               nfds = nfds * 2;
-               if (nfds > NR_OPEN)
-                       nfds = NR_OPEN;
-       }
+       nfds = max_t(int, 8 * L1_CACHE_BYTES, roundup_pow_of_two(nr + 1));
+       if (nfds > NR_OPEN)
+               nfds = NR_OPEN;
 
        new_openset = alloc_fdset(nfds);
        new_execset = alloc_fdset(nfds);
@@ -277,11 +273,13 @@ static struct fdtable *alloc_fdtable(int nr)
        } while (nfds <= nr);
        new_fds = alloc_fd_array(nfds);
        if (!new_fds)
-               goto out;
+               goto out2;
        fdt->fd = new_fds;
        fdt->max_fds = nfds;
        fdt->free_files = NULL;
        return fdt;
+out2:
+       nfds = fdt->max_fdset;
 out:
        if (new_openset)
                free_fdset(new_openset, nfds);
index 6449cb697967d28818016b9ee4fbbc7519202203..c3920c96dadf2f854ab77dcb9741580859f06c95 100644 (file)
@@ -83,8 +83,6 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma)
 
        ret = -ENOMEM;
        len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT);
-       if (!(vma->vm_flags & VM_WRITE) && len > inode->i_size)
-               goto out;
 
        if (vma->vm_flags & VM_MAYSHARE &&
            hugetlb_reserve_pages(inode, vma->vm_pgoff >> (HPAGE_SHIFT-PAGE_SHIFT),
@@ -93,7 +91,7 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma)
 
        ret = 0;
        hugetlb_prefault_arch_hook(vma->vm_mm);
-       if (inode->i_size < len)
+       if (vma->vm_flags & VM_WRITE && inode->i_size < len)
                inode->i_size = len;
 out:
        mutex_unlock(&inode->i_mutex);
index 10c46231ce15c86bd2832c8fb838610368d558c2..efbb586bed4bcc25db3e8b270bae3720fe7d5ab1 100644 (file)
@@ -2944,7 +2944,7 @@ int jfs_sync(void *arg)
                                 * Inode is being freed
                                 */
                                list_del_init(&jfs_ip->anon_inode_list);
-                       } else if (! !mutex_trylock(&jfs_ip->commit_mutex)) {
+                       } else if (mutex_trylock(&jfs_ip->commit_mutex)) {
                                /*
                                 * inode will be removed from anonymous list
                                 * when it is committed
index 09ea03f622778a0d5c568db9192eec9e2ea5ceb9..295268ad231b5ec1f26c78cb43489d434122c907 100644 (file)
@@ -165,8 +165,8 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
 
       out3:
        txEnd(tid);
-       mutex_unlock(&JFS_IP(dip)->commit_mutex);
        mutex_unlock(&JFS_IP(ip)->commit_mutex);
+       mutex_unlock(&JFS_IP(dip)->commit_mutex);
        if (rc) {
                free_ea_wmap(ip);
                ip->i_nlink = 0;
@@ -300,8 +300,8 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
 
       out3:
        txEnd(tid);
-       mutex_unlock(&JFS_IP(dip)->commit_mutex);
        mutex_unlock(&JFS_IP(ip)->commit_mutex);
+       mutex_unlock(&JFS_IP(dip)->commit_mutex);
        if (rc) {
                free_ea_wmap(ip);
                ip->i_nlink = 0;
@@ -384,8 +384,8 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
                if (rc == -EIO)
                        txAbort(tid, 1);
                txEnd(tid);
-               mutex_unlock(&JFS_IP(dip)->commit_mutex);
                mutex_unlock(&JFS_IP(ip)->commit_mutex);
+               mutex_unlock(&JFS_IP(dip)->commit_mutex);
 
                goto out2;
        }
@@ -422,8 +422,8 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
 
        txEnd(tid);
 
-       mutex_unlock(&JFS_IP(dip)->commit_mutex);
        mutex_unlock(&JFS_IP(ip)->commit_mutex);
+       mutex_unlock(&JFS_IP(dip)->commit_mutex);
 
        /*
         * Truncating the directory index table is not guaranteed.  It
@@ -503,8 +503,8 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry)
                if (rc == -EIO)
                        txAbort(tid, 1);        /* Marks FS Dirty */
                txEnd(tid);
-               mutex_unlock(&JFS_IP(dip)->commit_mutex);
                mutex_unlock(&JFS_IP(ip)->commit_mutex);
+               mutex_unlock(&JFS_IP(dip)->commit_mutex);
                IWRITE_UNLOCK(ip);
                goto out1;
        }
@@ -527,8 +527,8 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry)
                if ((new_size = commitZeroLink(tid, ip)) < 0) {
                        txAbort(tid, 1);        /* Marks FS Dirty */
                        txEnd(tid);
-                       mutex_unlock(&JFS_IP(dip)->commit_mutex);
                        mutex_unlock(&JFS_IP(ip)->commit_mutex);
+                       mutex_unlock(&JFS_IP(dip)->commit_mutex);
                        IWRITE_UNLOCK(ip);
                        rc = new_size;
                        goto out1;
@@ -556,9 +556,8 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry)
 
        txEnd(tid);
 
-       mutex_unlock(&JFS_IP(dip)->commit_mutex);
        mutex_unlock(&JFS_IP(ip)->commit_mutex);
-
+       mutex_unlock(&JFS_IP(dip)->commit_mutex);
 
        while (new_size && (rc == 0)) {
                tid = txBegin(dip->i_sb, 0);
@@ -847,8 +846,8 @@ static int jfs_link(struct dentry *old_dentry,
       out:
        txEnd(tid);
 
-       mutex_unlock(&JFS_IP(dir)->commit_mutex);
        mutex_unlock(&JFS_IP(ip)->commit_mutex);
+       mutex_unlock(&JFS_IP(dir)->commit_mutex);
 
        jfs_info("jfs_link: rc:%d", rc);
        return rc;
@@ -1037,8 +1036,8 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
 
       out3:
        txEnd(tid);
-       mutex_unlock(&JFS_IP(dip)->commit_mutex);
        mutex_unlock(&JFS_IP(ip)->commit_mutex);
+       mutex_unlock(&JFS_IP(dip)->commit_mutex);
        if (rc) {
                free_ea_wmap(ip);
                ip->i_nlink = 0;
@@ -1160,10 +1159,11 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                if (S_ISDIR(new_ip->i_mode)) {
                        new_ip->i_nlink--;
                        if (new_ip->i_nlink) {
-                               mutex_unlock(&JFS_IP(new_dir)->commit_mutex);
-                               mutex_unlock(&JFS_IP(old_ip)->commit_mutex);
+                               mutex_unlock(&JFS_IP(new_ip)->commit_mutex);
                                if (old_dir != new_dir)
                                        mutex_unlock(&JFS_IP(old_dir)->commit_mutex);
+                               mutex_unlock(&JFS_IP(old_ip)->commit_mutex);
+                               mutex_unlock(&JFS_IP(new_dir)->commit_mutex);
                                if (!S_ISDIR(old_ip->i_mode) && new_ip)
                                        IWRITE_UNLOCK(new_ip);
                                jfs_error(new_ip->i_sb,
@@ -1281,13 +1281,12 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 
       out4:
        txEnd(tid);
-
-       mutex_unlock(&JFS_IP(new_dir)->commit_mutex);
-       mutex_unlock(&JFS_IP(old_ip)->commit_mutex);
-       if (old_dir != new_dir)
-               mutex_unlock(&JFS_IP(old_dir)->commit_mutex);
        if (new_ip)
                mutex_unlock(&JFS_IP(new_ip)->commit_mutex);
+       if (old_dir != new_dir)
+               mutex_unlock(&JFS_IP(old_dir)->commit_mutex);
+       mutex_unlock(&JFS_IP(old_ip)->commit_mutex);
+       mutex_unlock(&JFS_IP(new_dir)->commit_mutex);
 
        while (new_size && (rc == 0)) {
                tid = txBegin(new_ip->i_sb, 0);
index c9750d755aff63e8d4b5e3774998c5ff93cd22e7..e01070d7bf58a39e27a50ade9fcfd598574f43aa 100644 (file)
@@ -1712,8 +1712,14 @@ do_link:
        if (error)
                goto exit_dput;
        error = __do_follow_link(&path, nd);
-       if (error)
+       if (error) {
+               /* Does someone understand code flow here? Or it is only
+                * me so stupid? Anathema to whoever designed this non-sense
+                * with "intent.open".
+                */
+               release_open_intent(nd);
                return error;
+       }
        nd->flags &= ~LOOKUP_PARENT;
        if (nd->last_type == LAST_BIND)
                goto ok;
index b0e095ea0c03c2111f331613b8749d5eebf8dc76..ee4eff27aedc80d9faac58a7dc208929551d36ef 100644 (file)
@@ -721,6 +721,12 @@ nfsd4_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
        return nfs_ok;
 }
 
+static inline void nfsd4_increment_op_stats(u32 opnum)
+{
+       if (opnum >= FIRST_NFS4_OP && opnum <= LAST_NFS4_OP)
+               nfsdstats.nfs4_opcount[opnum]++;
+}
+
 
 /*
  * COMPOUND call.
@@ -930,6 +936,8 @@ encode_op:
                /* XXX Ugh, we need to get rid of this kind of special case: */
                if (op->opnum == OP_READ && op->u.read.rd_filp)
                        fput(op->u.read.rd_filp);
+
+               nfsd4_increment_op_stats(op->opnum);
        }
 
 out:
index 57265d56380453750310a39c5305a39178a1c35c..71944cddf680993773475402aced0a8c6892643b 100644 (file)
@@ -72,6 +72,16 @@ static int nfsd_proc_show(struct seq_file *seq, void *v)
        /* show my rpc info */
        svc_seq_show(seq, &nfsd_svcstats);
 
+#ifdef CONFIG_NFSD_V4
+       /* Show count for individual nfsv4 operations */
+       /* Writing operation numbers 0 1 2 also for maintaining uniformity */
+       seq_printf(seq,"proc4ops %u", LAST_NFS4_OP + 1);
+       for (i = 0; i <= LAST_NFS4_OP; i++)
+               seq_printf(seq, " %u", nfsdstats.nfs4_opcount[i]);
+
+       seq_putc(seq, '\n');
+#endif
+
        return 0;
 }
 
index 839634026eb5206e934e34a78ec5a5998248569e..51c6a748df4921947659abb114fc189f2508fa95 100644 (file)
@@ -339,6 +339,7 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len)
        p->start_sect = start;
        p->nr_sects = len;
        p->partno = part;
+       p->policy = disk->policy;
 
        if (isdigit(disk->kobj.name[strlen(disk->kobj.name)-1]))
                snprintf(p->kobj.name,KOBJ_NAME_LEN,"%sp%d",disk->kobj.name,part);
index 7495d3e207757ab29ef9ef2a3dd717187ec5c228..0b615d62a159b16eb8da4a593b52f4a469f46cc4 100644 (file)
@@ -74,6 +74,7 @@
 #include <linux/times.h>
 #include <linux/cpuset.h>
 #include <linux/rcupdate.h>
+#include <linux/delayacct.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -411,7 +412,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
 
        res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
 %lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
+%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu %llu\n",
                task->pid,
                tcomm,
                state,
@@ -455,7 +456,8 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
                task->exit_signal,
                task_cpu(task),
                task->rt_priority,
-               task->policy);
+               task->policy,
+               (unsigned long long)delayacct_blkio_ticks(task));
        if(mm)
                mmput(mm);
        return res;
index 243a94af0427b2630fb85f489a5419410dac3bfc..fe8d55fb17cc37da251cfd524dfc14dfb1711c72 100644 (file)
@@ -551,6 +551,27 @@ static int proc_fd_access_allowed(struct inode *inode)
        return allowed;
 }
 
+static int proc_setattr(struct dentry *dentry, struct iattr *attr)
+{
+       int error;
+       struct inode *inode = dentry->d_inode;
+
+       if (attr->ia_valid & ATTR_MODE)
+               return -EPERM;
+
+       error = inode_change_ok(inode, attr);
+       if (!error) {
+               error = security_inode_setattr(dentry, attr);
+               if (!error)
+                       error = inode_setattr(inode, attr);
+       }
+       return error;
+}
+
+static struct inode_operations proc_def_inode_operations = {
+       .setattr        = proc_setattr,
+};
+
 extern struct seq_operations mounts_op;
 struct proc_mounts {
        struct seq_file m;
@@ -1111,7 +1132,8 @@ out:
 
 static struct inode_operations proc_pid_link_inode_operations = {
        .readlink       = proc_pid_readlink,
-       .follow_link    = proc_pid_follow_link
+       .follow_link    = proc_pid_follow_link,
+       .setattr        = proc_setattr,
 };
 
 static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir)
@@ -1285,6 +1307,7 @@ static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_st
        ei = PROC_I(inode);
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
        inode->i_ino = fake_ino(task->pid, ino);
+       inode->i_op = &proc_def_inode_operations;
 
        /*
         * grab the reference to task.
@@ -1339,6 +1362,7 @@ static int pid_revalidate(struct dentry *dentry, struct nameidata *nd)
                        inode->i_uid = 0;
                        inode->i_gid = 0;
                }
+               inode->i_mode &= ~(S_ISUID | S_ISGID);
                security_task_to_inode(task, inode);
                put_task_struct(task);
                return 1;
@@ -1389,6 +1413,7 @@ static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
                                        inode->i_uid = 0;
                                        inode->i_gid = 0;
                                }
+                               inode->i_mode &= ~(S_ISUID | S_ISGID);
                                security_task_to_inode(task, inode);
                                put_task_struct(task);
                                return 1;
@@ -1527,11 +1552,13 @@ static struct file_operations proc_task_operations = {
  */
 static struct inode_operations proc_fd_inode_operations = {
        .lookup         = proc_lookupfd,
+       .setattr        = proc_setattr,
 };
 
 static struct inode_operations proc_task_inode_operations = {
        .lookup         = proc_task_lookup,
        .getattr        = proc_task_getattr,
+       .setattr        = proc_setattr,
 };
 
 #ifdef CONFIG_SECURITY
@@ -1845,11 +1872,13 @@ static struct file_operations proc_tid_base_operations = {
 static struct inode_operations proc_tgid_base_inode_operations = {
        .lookup         = proc_tgid_base_lookup,
        .getattr        = pid_getattr,
+       .setattr        = proc_setattr,
 };
 
 static struct inode_operations proc_tid_base_inode_operations = {
        .lookup         = proc_tid_base_lookup,
        .getattr        = pid_getattr,
+       .setattr        = proc_setattr,
 };
 
 #ifdef CONFIG_SECURITY
@@ -1892,11 +1921,13 @@ static struct dentry *proc_tid_attr_lookup(struct inode *dir,
 static struct inode_operations proc_tgid_attr_inode_operations = {
        .lookup         = proc_tgid_attr_lookup,
        .getattr        = pid_getattr,
+       .setattr        = proc_setattr,
 };
 
 static struct inode_operations proc_tid_attr_inode_operations = {
        .lookup         = proc_tid_attr_lookup,
        .getattr        = pid_getattr,
+       .setattr        = proc_setattr,
 };
 #endif
 
index 6dcef089e18e715f0b38d5ad7de1c05f0845fc13..49dfb2ab783e6f921fdd344f1b6c39ee29cd1935 100644 (file)
@@ -192,7 +192,7 @@ int proc_fill_super(struct super_block *s, void *data, int silent)
 {
        struct inode * root_inode;
 
-       s->s_flags |= MS_NODIRATIME;
+       s->s_flags |= MS_NODIRATIME | MS_NOSUID | MS_NOEXEC;
        s->s_blocksize = 1024;
        s->s_blocksize_bits = 10;
        s->s_magic = PROC_SUPER_MAGIC;
index 036d14d836271b9cba65ca044988614c091e6019..6a984f64edd7179893887528f07a63f90bf7b15c 100644 (file)
@@ -42,8 +42,6 @@ const struct file_operations proc_kcore_operations = {
 #define        kc_offset_to_vaddr(o) ((o) + PAGE_OFFSET)
 #endif
 
-#define roundup(x, y)  ((((x)+((y)-1))/(y))*(y))
-
 /* An ELF note in memory */
 struct memelfnote
 {
@@ -384,7 +382,7 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
                                 */
                                if (n) { 
                                        if (clear_user(buffer + tsz - n,
-                                                               tsz - n))
+                                                               n))
                                                return -EFAULT;
                                }
                        } else {
index 99fffc9e1bfd6ebf4959ac6415d8e80e19deff56..677139b48e000d0d98100122c851eff5572aa14a 100644 (file)
@@ -283,9 +283,9 @@ unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
 
 /*****************************************************************************/
 /*
- * set up a mapping
+ * set up a mapping for shared memory segments
  */
 int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma)
 {
-       return 0;
+       return vma->vm_flags & VM_SHARED ? 0 : -ENOSYS;
 }
index 5bc0e9234f9d7c5dd21b1e244127fece7bfa905c..d4cb3183c99cb9c89ccb5b1bc2f98c4e976087d8 100644 (file)
@@ -436,7 +436,7 @@ unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to)
        return seg;
 }
 
-EXPORT_SYMBOL(iov_shorten);
+EXPORT_UNUSED_SYMBOL(iov_shorten);  /*  June 2006  */
 
 /* A write operation does a read from user space and vice versa */
 #define vrfy_dir(type) ((type) == READ ? VERIFY_WRITE : VERIFY_READ)
index 752cea12e30fcdf0e5040feecb6b75b5ab97449e..f318b58510fd896b2b68c04fadb5ca6af5daa3fc 100644 (file)
@@ -860,8 +860,12 @@ static int reiserfs_submit_file_region_for_write(struct reiserfs_transaction_han
                        // this sets the proper flags for O_SYNC to trigger a commit
                        mark_inode_dirty(inode);
                        reiserfs_write_unlock(inode->i_sb);
-               } else
+               } else {
+                       reiserfs_write_lock(inode->i_sb);
+                       reiserfs_update_inode_transaction(inode);
                        mark_inode_dirty(inode);
+                       reiserfs_write_unlock(inode->i_sb);
+               }
 
                sd_update = 1;
        }
index 5d8a8cfebc7042282cc5e589021e86361dd0d66d..c533ec1bcaec3461a8c7e7cee9d3451a12258d93 100644 (file)
@@ -492,9 +492,17 @@ static void add_file(struct super_block *sb, char *name,
 
 int reiserfs_proc_info_init(struct super_block *sb)
 {
+       char b[BDEVNAME_SIZE];
+       char *s;
+
+       /* Some block devices use /'s */
+       strlcpy(b, reiserfs_bdevname(sb), BDEVNAME_SIZE);
+       s = strchr(b, '/');
+       if (s)
+               *s = '!';
+
        spin_lock_init(&__PINFO(sb).lock);
-       REISERFS_SB(sb)->procdir =
-           proc_mkdir(reiserfs_bdevname(sb), proc_info_root);
+       REISERFS_SB(sb)->procdir = proc_mkdir(b, proc_info_root);
        if (REISERFS_SB(sb)->procdir) {
                REISERFS_SB(sb)->procdir->owner = THIS_MODULE;
                REISERFS_SB(sb)->procdir->data = sb;
@@ -508,13 +516,22 @@ int reiserfs_proc_info_init(struct super_block *sb)
                return 0;
        }
        reiserfs_warning(sb, "reiserfs: cannot create /proc/%s/%s",
-                        proc_info_root_name, reiserfs_bdevname(sb));
+                        proc_info_root_name, b);
        return 1;
 }
 
 int reiserfs_proc_info_done(struct super_block *sb)
 {
        struct proc_dir_entry *de = REISERFS_SB(sb)->procdir;
+       char b[BDEVNAME_SIZE];
+       char *s;
+
+       /* Some block devices use /'s */
+       strlcpy(b, reiserfs_bdevname(sb), BDEVNAME_SIZE);
+       s = strchr(b, '/');
+       if (s)
+               *s = '!';
+
        if (de) {
                remove_proc_entry("journal", de);
                remove_proc_entry("oidmap", de);
@@ -528,7 +545,7 @@ int reiserfs_proc_info_done(struct super_block *sb)
        __PINFO(sb).exiting = 1;
        spin_unlock(&__PINFO(sb).lock);
        if (proc_info_root) {
-               remove_proc_entry(reiserfs_bdevname(sb), proc_info_root);
+               remove_proc_entry(b, proc_info_root);
                REISERFS_SB(sb)->procdir = NULL;
        }
        return 0;
index 05fd2787be989831e25c61dcce966360f534c544..684bca3d3a107c021715f8394a1f1d23a1913aaa 100644 (file)
@@ -1306,6 +1306,85 @@ asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
        return error;
 }
 
+/*
+ * Make sure there's data to read. Wait for input if we can, otherwise
+ * return an appropriate error.
+ */
+static int link_ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
+{
+       int ret;
+
+       /*
+        * Check ->nrbufs without the inode lock first. This function
+        * is speculative anyways, so missing one is ok.
+        */
+       if (pipe->nrbufs)
+               return 0;
+
+       ret = 0;
+       mutex_lock(&pipe->inode->i_mutex);
+
+       while (!pipe->nrbufs) {
+               if (signal_pending(current)) {
+                       ret = -ERESTARTSYS;
+                       break;
+               }
+               if (!pipe->writers)
+                       break;
+               if (!pipe->waiting_writers) {
+                       if (flags & SPLICE_F_NONBLOCK) {
+                               ret = -EAGAIN;
+                               break;
+                       }
+               }
+               pipe_wait(pipe);
+       }
+
+       mutex_unlock(&pipe->inode->i_mutex);
+       return ret;
+}
+
+/*
+ * Make sure there's writeable room. Wait for room if we can, otherwise
+ * return an appropriate error.
+ */
+static int link_opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
+{
+       int ret;
+
+       /*
+        * Check ->nrbufs without the inode lock first. This function
+        * is speculative anyways, so missing one is ok.
+        */
+       if (pipe->nrbufs < PIPE_BUFFERS)
+               return 0;
+
+       ret = 0;
+       mutex_lock(&pipe->inode->i_mutex);
+
+       while (pipe->nrbufs >= PIPE_BUFFERS) {
+               if (!pipe->readers) {
+                       send_sig(SIGPIPE, current, 0);
+                       ret = -EPIPE;
+                       break;
+               }
+               if (flags & SPLICE_F_NONBLOCK) {
+                       ret = -EAGAIN;
+                       break;
+               }
+               if (signal_pending(current)) {
+                       ret = -ERESTARTSYS;
+                       break;
+               }
+               pipe->waiting_writers++;
+               pipe_wait(pipe);
+               pipe->waiting_writers--;
+       }
+
+       mutex_unlock(&pipe->inode->i_mutex);
+       return ret;
+}
+
 /*
  * Link contents of ipipe to opipe.
  */
@@ -1314,9 +1393,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
                     size_t len, unsigned int flags)
 {
        struct pipe_buffer *ibuf, *obuf;
-       int ret, do_wakeup, i, ipipe_first;
-
-       ret = do_wakeup = ipipe_first = 0;
+       int ret = 0, i = 0, nbuf;
 
        /*
         * Potential ABBA deadlock, work around it by ordering lock
@@ -1324,126 +1401,62 @@ static int link_pipe(struct pipe_inode_info *ipipe,
         * could deadlock (one doing tee from A -> B, the other from B -> A).
         */
        if (ipipe->inode < opipe->inode) {
-               ipipe_first = 1;
-               mutex_lock(&ipipe->inode->i_mutex);
-               mutex_lock(&opipe->inode->i_mutex);
+               mutex_lock_nested(&ipipe->inode->i_mutex, I_MUTEX_PARENT);
+               mutex_lock_nested(&opipe->inode->i_mutex, I_MUTEX_CHILD);
        } else {
-               mutex_lock(&opipe->inode->i_mutex);
-               mutex_lock(&ipipe->inode->i_mutex);
+               mutex_lock_nested(&opipe->inode->i_mutex, I_MUTEX_PARENT);
+               mutex_lock_nested(&ipipe->inode->i_mutex, I_MUTEX_CHILD);
        }
 
-       for (i = 0;; i++) {
+       do {
                if (!opipe->readers) {
                        send_sig(SIGPIPE, current, 0);
                        if (!ret)
                                ret = -EPIPE;
                        break;
                }
-               if (ipipe->nrbufs - i) {
-                       ibuf = ipipe->bufs + ((ipipe->curbuf + i) & (PIPE_BUFFERS - 1));
 
-                       /*
-                        * If we have room, fill this buffer
-                        */
-                       if (opipe->nrbufs < PIPE_BUFFERS) {
-                               int nbuf = (opipe->curbuf + opipe->nrbufs) & (PIPE_BUFFERS - 1);
-
-                               /*
-                                * Get a reference to this pipe buffer,
-                                * so we can copy the contents over.
-                                */
-                               ibuf->ops->get(ipipe, ibuf);
-
-                               obuf = opipe->bufs + nbuf;
-                               *obuf = *ibuf;
-
-                               /*
-                                * Don't inherit the gift flag, we need to
-                                * prevent multiple steals of this page.
-                                */
-                               obuf->flags &= ~PIPE_BUF_FLAG_GIFT;
-
-                               if (obuf->len > len)
-                                       obuf->len = len;
-
-                               opipe->nrbufs++;
-                               do_wakeup = 1;
-                               ret += obuf->len;
-                               len -= obuf->len;
-
-                               if (!len)
-                                       break;
-                               if (opipe->nrbufs < PIPE_BUFFERS)
-                                       continue;
-                       }
-
-                       /*
-                        * We have input available, but no output room.
-                        * If we already copied data, return that. If we
-                        * need to drop the opipe lock, it must be ordered
-                        * last to avoid deadlocks.
-                        */
-                       if ((flags & SPLICE_F_NONBLOCK) || !ipipe_first) {
-                               if (!ret)
-                                       ret = -EAGAIN;
-                               break;
-                       }
-                       if (signal_pending(current)) {
-                               if (!ret)
-                                       ret = -ERESTARTSYS;
-                               break;
-                       }
-                       if (do_wakeup) {
-                               smp_mb();
-                               if (waitqueue_active(&opipe->wait))
-                                       wake_up_interruptible(&opipe->wait);
-                               kill_fasync(&opipe->fasync_readers, SIGIO, POLL_IN);
-                               do_wakeup = 0;
-                       }
+               /*
+                * If we have iterated all input buffers or ran out of
+                * output room, break.
+                */
+               if (i >= ipipe->nrbufs || opipe->nrbufs >= PIPE_BUFFERS)
+                       break;
 
-                       opipe->waiting_writers++;
-                       pipe_wait(opipe);
-                       opipe->waiting_writers--;
-                       continue;
-               }
+               ibuf = ipipe->bufs + ((ipipe->curbuf + i) & (PIPE_BUFFERS - 1));
+               nbuf = (opipe->curbuf + opipe->nrbufs) & (PIPE_BUFFERS - 1);
 
                /*
-                * No input buffers, do the usual checks for available
-                * writers and blocking and wait if necessary
+                * Get a reference to this pipe buffer,
+                * so we can copy the contents over.
                 */
-               if (!ipipe->writers)
-                       break;
-               if (!ipipe->waiting_writers) {
-                       if (ret)
-                               break;
-               }
+               ibuf->ops->get(ipipe, ibuf);
+
+               obuf = opipe->bufs + nbuf;
+               *obuf = *ibuf;
+
                /*
-                * pipe_wait() drops the ipipe mutex. To avoid deadlocks
-                * with another process, we can only safely do that if
-                * the ipipe lock is ordered last.
+                * Don't inherit the gift flag, we need to
+                * prevent multiple steals of this page.
                 */
-               if ((flags & SPLICE_F_NONBLOCK) || ipipe_first) {
-                       if (!ret)
-                               ret = -EAGAIN;
-                       break;
-               }
-               if (signal_pending(current)) {
-                       if (!ret)
-                               ret = -ERESTARTSYS;
-                       break;
-               }
+               obuf->flags &= ~PIPE_BUF_FLAG_GIFT;
 
-               if (waitqueue_active(&ipipe->wait))
-                       wake_up_interruptible_sync(&ipipe->wait);
-               kill_fasync(&ipipe->fasync_writers, SIGIO, POLL_OUT);
+               if (obuf->len > len)
+                       obuf->len = len;
 
-               pipe_wait(ipipe);
-       }
+               opipe->nrbufs++;
+               ret += obuf->len;
+               len -= obuf->len;
+               i++;
+       } while (len);
 
        mutex_unlock(&ipipe->inode->i_mutex);
        mutex_unlock(&opipe->inode->i_mutex);
 
-       if (do_wakeup) {
+       /*
+        * If we put data in the output pipe, wakeup any potential readers.
+        */
+       if (ret > 0) {
                smp_mb();
                if (waitqueue_active(&opipe->wait))
                        wake_up_interruptible(&opipe->wait);
@@ -1464,14 +1477,29 @@ static long do_tee(struct file *in, struct file *out, size_t len,
 {
        struct pipe_inode_info *ipipe = in->f_dentry->d_inode->i_pipe;
        struct pipe_inode_info *opipe = out->f_dentry->d_inode->i_pipe;
+       int ret = -EINVAL;
 
        /*
-        * Link ipipe to the two output pipes, consuming as we go along.
+        * Duplicate the contents of ipipe to opipe without actually
+        * copying the data.
         */
-       if (ipipe && opipe)
-               return link_pipe(ipipe, opipe, len, flags);
+       if (ipipe && opipe && ipipe != opipe) {
+               /*
+                * Keep going, unless we encounter an error. The ipipe/opipe
+                * ordering doesn't really matter.
+                */
+               ret = link_ipipe_prep(ipipe, flags);
+               if (!ret) {
+                       ret = link_opipe_prep(opipe, flags);
+                       if (!ret) {
+                               ret = link_pipe(ipipe, opipe, len, flags);
+                               if (!ret && (flags & SPLICE_F_NONBLOCK))
+                                       ret = -EAGAIN;
+                       }
+               }
+       }
 
-       return -EINVAL;
+       return ret;
 }
 
 asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags)
index 5e0e31cc46f5e269ebb8ed5c2fddec10f240e512..9889e54e1f13632e967423458cb83b4d5d590047 100644 (file)
@@ -109,6 +109,17 @@ static inline void set_inode_attr(struct inode * inode, struct iattr * iattr)
        inode->i_ctime = iattr->ia_ctime;
 }
 
+
+/*
+ * sysfs has a different i_mutex lock order behavior for i_mutex than other
+ * filesystems; sysfs i_mutex is called in many places with subsystem locks
+ * held. At the same time, many of the VFS locking rules do not apply to
+ * sysfs at all (cross directory rename for example). To untangle this mess
+ * (which gives false positives in lockdep), we're giving sysfs inodes their
+ * own class for i_mutex.
+ */
+static struct lock_class_key sysfs_inode_imutex_key;
+
 struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent * sd)
 {
        struct inode * inode = new_inode(sysfs_sb);
@@ -118,6 +129,7 @@ struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent * sd)
                inode->i_mapping->a_ops = &sysfs_aops;
                inode->i_mapping->backing_dev_info = &sysfs_backing_dev_info;
                inode->i_op = &sysfs_inode_operations;
+               lockdep_set_class(&inode->i_mutex, &sysfs_inode_imutex_key);
 
                if (sd->s_iattr) {
                        /* sysfs_dirent has non-default attributes
index 8c021dc57d1f80552df7ea2229558da053312be5..a13f75c1a936a7f2c0b3ab1d74fc75fc2a146b51 100644 (file)
@@ -215,7 +215,6 @@ BUFFER_FNS(PrivateStart, unwritten);
 #define MIN(a,b)       (min(a,b))
 #define MAX(a,b)       (max(a,b))
 #define howmany(x, y)  (((x)+((y)-1))/(y))
-#define roundup(x, y)  ((((x)+((y)-1))/(y))*(y))
 
 /*
  * Various platform dependent calls that don't fit anywhere else
index b492857fe7213e51cf3262605f7e0ea11b009f4e..9e6c23c360b2c0076688abc3ffe2c7bfca4d72f0 100644 (file)
@@ -63,7 +63,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20060623
+#define ACPI_CA_VERSION                 0x20060707
 
 /*
  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
index 216339a8f1f662114856c8448c50ebb069490beb..91586d0d5bb57f8d4ea26602bcd31aafbce391e3 100644 (file)
 #define ACPI_EXD_TABLE_SIZE(name)   (sizeof(name) / sizeof (struct acpi_exdump_info))
 
 /*
- * If possible, pack the following structure to byte alignment, since we
- * don't care about performance for debug output
+ * If possible, pack the following structures to byte alignment, since we
+ * don't care about performance for debug output. Two cases where we cannot
+ * pack the structures:
+ *
+ * 1) Hardware does not support misaligned memory transfers
+ * 2) Compiler does not support pointers within packed structures
  */
-#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
+#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED))
 #pragma pack(1)
 #endif
 
index 56b8024861611ed6d77a8705801b260a07cfeda9..a4d0e73d5acac5084e3a0671651cac13edb6b583 100644 (file)
@@ -127,7 +127,7 @@ typedef u8 acpi_owner_id;
 
 /* This Thread ID means that the mutex is not in use (unlocked) */
 
-#define ACPI_MUTEX_NOT_ACQUIRED         (u32) -1
+#define ACPI_MUTEX_NOT_ACQUIRED         (acpi_thread_id) 0
 
 /* Table for the global mutexes */
 
@@ -204,7 +204,7 @@ struct acpi_namespace_node {
 /* Namespace Node flags */
 
 #define ANOBJ_END_OF_PEER_LIST          0x01   /* End-of-list, Peer field points to parent */
-#define ANOBJ_DATA_WIDTH_32             0x02   /* Parent table uses 32-bit math */
+#define ANOBJ_RESERVED                  0x02   /* Available for future use */
 #define ANOBJ_METHOD_ARG                0x04   /* Node is a method argument */
 #define ANOBJ_METHOD_LOCAL              0x08   /* Node is a method local */
 #define ANOBJ_SUBTREE_HAS_INI           0x10   /* Used to optimize device initialization */
index f1ac6109556e8d69fa53d3157bfbff877dbafb37..192fa095a51583ab6df2bff319ed842c0597ace1 100644 (file)
 
 /* Memory allocation */
 
+#ifndef ACPI_ALLOCATE
 #define ACPI_ALLOCATE(a)            acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
+#endif
+#ifndef ACPI_ALLOCATE_ZEROED
 #define ACPI_ALLOCATE_ZEROED(a)     acpi_ut_allocate_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
-#define ACPI_FREE(a)                kfree(a)
+#endif
+#ifndef ACPI_FREE
+#define ACPI_FREE(a)                acpio_os_free(a)
+#endif
 #define ACPI_MEM_TRACKING(a)
 
 #else
index ad11fc13fbefc933c7184c9a1b970682ee8c8559..80a3b33571b4c44df62457225e64d56f65a84fea 100644 (file)
 
 /*
  * If possible, pack the following structures to byte alignment, since we
- * don't care about performance for debug output
+ * don't care about performance for debug output. Two cases where we cannot
+ * pack the structures:
+ *
+ * 1) Hardware does not support misaligned memory transfers
+ * 2) Compiler does not support pointers within packed structures
  */
-#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
+#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED))
 #pragma pack(1)
 #endif
 
index 3f853cabbd4159d7e905e8955864171cabdd70d3..47faf27913a576ccf930d8cbcad1f8a3fc8f2215 100644 (file)
@@ -59,6 +59,7 @@
 #include <asm/acpi.h>
 #include <linux/slab.h>
 #include <linux/spinlock_types.h>
+#include <asm/current.h>
 
 /* Host-dependent types and defines */
 
 
 #define acpi_cpu_flags unsigned long
 
-#define acpi_thread_id u32
+#define acpi_thread_id struct task_struct *
 
-static inline acpi_thread_id acpi_os_get_thread_id(void) { return 0; }
+static inline acpi_thread_id acpi_os_get_thread_id(void) { return current; }
+
+/*
+ * The irqs_disabled() check is for resume from RAM.
+ * Interrupts are off during resume, just like they are for boot.
+ * However, boot has  (system_state != SYSTEM_RUNNING)
+ * to quiet __might_sleep() in kmalloc() and resume does not.
+ */
+#include <acpi/actypes.h>
+static inline void *acpi_os_allocate(acpi_size size) {
+       return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
+}
+static inline void *acpi_os_allocate_zeroed(acpi_size size) {
+       return kzalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
+}
+
+static inline void *acpi_os_acquire_object(acpi_cache_t * cache) {
+        return kmem_cache_zalloc(cache, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
+}
+
+#define ACPI_ALLOCATE(a)       acpi_os_allocate(a)
+#define ACPI_ALLOCATE_ZEROED(a)        acpi_os_allocate_zeroed(a)
+#define ACPI_FREE(a)           kfree(a)
 
 #endif                         /* __ACLINUX_H__ */
index 681ff581afa574a404e19038abbda9d1f194489c..384dc08d6f53d26974b87511e498719a1fe84c4f 100644 (file)
@@ -30,7 +30,4 @@ __asm__ __volatile__("mb": : :"memory")
 #define set_mb(var, value) \
 do { var = value; mb(); } while (0)
 
-#define set_wmb(var, value) \
-do { var = value; wmb(); } while (0)
-
 #endif         /* __BARRIER_H */
index 72ef874567d57b2cb6ad0919e457af6830c4fef9..2af9d7c9c63c32d6dea9f109b1241ff49316d7cf 100644 (file)
@@ -65,6 +65,8 @@
 #define VERSATILE_SYS_OSC1_OFFSET             0x1C
 #endif
 
+#define VERSATILE_SYS_OSCCLCD_OFFSET          0x1c
+
 #define VERSATILE_SYS_LOCK_OFFSET             0x20
 #define VERSATILE_SYS_100HZ_OFFSET            0x24
 #define VERSATILE_SYS_CFGDATA1_OFFSET         0x28
index 6001febfe63bcf0fdf4fb61d2b991a19f67ec057..0947cbf9b69a3394bd3cba0803a112ece0c183c1 100644 (file)
@@ -176,7 +176,6 @@ extern unsigned int user_debug;
 #define wmb() mb()
 #define read_barrier_depends() do { } while(0)
 #define set_mb(var, value)  do { var = value; mb(); } while (0)
-#define set_wmb(var, value) do { var = value; wmb(); } while (0)
 #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
 
 /*
index d1f69d7061986b4f6ce2588e949205dade591a9d..00ae32aa1dbaf2f1ad0ac3e86d66b55d09581b1b 100644 (file)
@@ -90,7 +90,6 @@ extern unsigned int user_debug;
 
 #define read_barrier_depends() do { } while(0)
 #define set_mb(var, value)  do { var = value; mb(); } while (0)
-#define set_wmb(var, value) do { var = value; wmb(); } while (0)
 
 /*
  * We assume knowledge of how
index b1c593b6dbff163df5118bc6ba8c5841148fd43a..b869f6161aaa1c73e770fb2f238eecc7894654d9 100644 (file)
@@ -17,7 +17,6 @@ extern struct task_struct *resume(struct task_struct *prev, struct task_struct *
 #define wmb() mb()
 #define read_barrier_depends() do { } while(0)
 #define set_mb(var, value)  do { var = value; mb(); } while (0)
-#define set_wmb(var, value) do { var = value; wmb(); } while (0)
 
 #ifdef CONFIG_SMP
 #define smp_mb()        mb()
index 38656da00e4005ffe1f26647195595cf5fdd22cc..7df58a3e6e4a5537e69ea2fb97cc1be4c16c7368 100644 (file)
@@ -64,7 +64,7 @@ typedef unsigned long elf_greg_t;
 #define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))
 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
 
-typedef struct fpmedia_struct elf_fpregset_t;
+typedef struct user_fpmedia_regs elf_fpregset_t;
 
 /*
  * This is used to ensure we don't load something for the wrong architecture.
@@ -116,6 +116,7 @@ do {                                                                                        \
 } while(0)
 
 #define USE_ELF_CORE_DUMP
+#define ELF_FDPIC_CORE_EFLAGS  EF_FRV_FDPIC
 #define ELF_EXEC_PAGESIZE      16384
 
 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
@@ -125,9 +126,6 @@ do {                                                                                        \
 
 #define ELF_ET_DYN_BASE         0x08000000UL
 
-#define ELF_CORE_COPY_REGS(pr_reg, regs)                               \
-       memcpy(&pr_reg[0], &regs->sp, 31 * sizeof(uint32_t));
-
 /* This yields a mask that user programs can use to figure out what
    instruction set this cpu supports.  */
 
index c58479a4be996c9578889ba9f5eba8f4bd32ce65..24f9738670bd44b94ed916e8cbe82dfbbc74233c 100644 (file)
@@ -89,6 +89,7 @@ extern void gdbstub_do_rx(void);
 
 extern asmlinkage void __debug_stub_init_break(void);
 extern asmlinkage void __break_hijack_kernel_event(void);
+extern asmlinkage void __break_hijack_kernel_event_breaks_here(void);
 extern asmlinkage void start_kernel(void);
 
 extern asmlinkage void gdbstub_rx_handler(void);
@@ -114,5 +115,26 @@ extern void console_set_baud(unsigned baud);
 #define gdbstub_proto(FMT,...) ({ 0; })
 #endif
 
+/*
+ * we dedicate GR31 to keeping a pointer to the gdbstub exception frame
+ * - gr31 is destroyed on entry to the gdbstub if !MMU
+ * - gr31 is saved in scr3 on entry to the gdbstub if in !MMU
+ */
+register struct frv_frame0 *__debug_frame0 asm("gr31");
+
+#define __debug_frame          (&__debug_frame0->regs)
+#define __debug_user_context   (&__debug_frame0->uc)
+#define __debug_regs           (&__debug_frame0->debug)
+#define __debug_reg(X)         ((unsigned long *) ((unsigned long) &__debug_frame0 + (X)))
+
+struct frv_debug_status {
+       unsigned long           bpsr;
+       unsigned long           dcr;
+       unsigned long           brr;
+       unsigned long           nmar;
+};
+
+extern struct frv_debug_status __debug_status;
+
 #endif /* _LANGUAGE_ASSEMBLY */
 #endif /* __ASM_GDB_STUB_H */
index 1c4dba1c5f57168eb70954b0bc75138485d71a0c..3744f2e47f48fcd92fe03e9e89b550b841736e6d 100644 (file)
@@ -21,6 +21,7 @@
  */
 #define current_text_addr() ({ __label__ _l; _l: &&_l;})
 
+#include <linux/compiler.h>
 #include <linux/linkage.h>
 #include <asm/sections.h>
 #include <asm/segment.h>
@@ -139,7 +140,7 @@ unsigned long get_wchan(struct task_struct *p);
 extern struct task_struct *alloc_task_struct(void);
 extern void free_task_struct(struct task_struct *p);
 
-#define cpu_relax()    do { } while (0)
+#define cpu_relax()    barrier()
 
 /* data cache prefetch */
 #define ARCH_HAS_PREFETCH
index b2cce0718e57051dee812347a956c5608a5d06f7..7ff525162a723b8a2549db3534289a355ed54df8 100644 (file)
 #ifndef __ASSEMBLY__
 
 /*
- * dedicate GR28; to keeping the a pointer to the current exception frame
+ * we dedicate GR28 to keeping a pointer to the current exception frame
+ * - gr28 is destroyed on entry to the kernel from userspace
  */
 register struct pt_regs *__frame asm("gr28");
-register struct pt_regs *__debug_frame asm("gr31");
-
-#ifndef container_of
-#define container_of(ptr, type, member) ({                     \
-        const typeof( ((type *)0)->member ) *__mptr = (ptr);   \
-        (type *)( (char *)__mptr - offsetof(type,member) );})
-#endif
-
-#define __debug_regs container_of(__debug_frame, struct pt_debug_regs, normal_regs)
 
 #define user_mode(regs)                        (!((regs)->psr & PSR_S))
 #define instruction_pointer(regs)      ((regs)->pc)
index fccfd95cff684611a923380ad23f97b5d06a2689..9666119fcf6e2429ee6849a062d12cdbe3e83d94 100644 (file)
  *
  *     +0x2000 +----------------------
  *             | union {
- *             |       struct user_context
+ *             |       struct frv_frame0 {
+ *             |               struct user_context {
+ *             |                       struct user_int_regs
+ *             |                       struct user_fpmedia_regs
+ *             |               }
+ *             |               struct frv_debug_regs
+ *             |       }
  *             |       struct pt_regs [user exception]
  *             | }
  *             +---------------------- <-- __kernel_frame0_ptr (maybe GR28)
 #define _ASM_REGISTERS_H
 
 #ifndef __ASSEMBLY__
-#define __OFFSET(X)    (X)
+#define __OFFSET(X,N)  ((X)+(N)*4)
 #define __OFFSETC(X,N) xxxxxxxxxxxxxxxxxxxxxxxx
 #else
-#define __OFFSET(X)    ((X)*4)
-#define __OFFSETC(X,N) ((X)*4+(N))
+#define __OFFSET(X,N)  ((X)+(N)*4)
+#define __OFFSETC(X,N) ((X)+(N))
 #endif
 
 /*****************************************************************************/
@@ -117,30 +123,13 @@ struct pt_regs {
 
 #endif
 
-#define REG_PSR                __OFFSET( 0)    /* Processor Status Register */
-#define REG_ISR                __OFFSET( 1)    /* Integer Status Register */
-#define REG_CCR                __OFFSET( 2)    /* Condition Code Register */
-#define REG_CCCR       __OFFSET( 3)    /* Condition Code for Conditional Insns Register */
-#define REG_LR         __OFFSET( 4)    /* Link Register */
-#define REG_LCR                __OFFSET( 5)    /* Loop Count Register */
-#define REG_PC         __OFFSET( 6)    /* Program Counter */
-
-#define REG__STATUS    __OFFSET( 7)    /* exception status */
 #define REG__STATUS_STEP       0x00000001      /* - reenable single stepping on return */
 #define REG__STATUS_STEPPED    0x00000002      /* - single step caused exception */
 #define REG__STATUS_BROKE      0x00000004      /* - BREAK insn caused exception */
 #define REG__STATUS_SYSC_ENTRY 0x40000000      /* - T on syscall entry (ptrace.c only) */
 #define REG__STATUS_SYSC_EXIT  0x80000000      /* - T on syscall exit (ptrace.c only) */
 
-#define REG_SYSCALLNO  __OFFSET( 8)    /* syscall number or -1 */
-#define REG_ORIG_GR8   __OFFSET( 9)    /* saved GR8 for signal handling */
-#define REG_GNER0      __OFFSET(10)
-#define REG_GNER1      __OFFSET(11)
-#define REG_IACC0      __OFFSET(12)
-
-#define REG_TBR                __OFFSET(14)    /* Trap Vector Register */
-#define REG_GR(R)      __OFFSET((14+(R)))
-#define REG__END       REG_GR(32)
+#define REG_GR(R)      __OFFSET(REG_GR0, (R))
 
 #define REG_SP         REG_GR(1)
 #define REG_FP         REG_GR(2)
@@ -149,27 +138,21 @@ struct pt_regs {
 
 /*****************************************************************************/
 /*
- * extension tacked in front of the exception frame in debug mode
+ * debugging registers
  */
 #ifndef __ASSEMBLY__
 
-struct pt_debug_regs
+struct frv_debug_regs
 {
-       unsigned long           bpsr;
        unsigned long           dcr;
-       unsigned long           brr;
-       unsigned long           nmar;
-       struct pt_regs          normal_regs;
+       unsigned long           ibar[4] __attribute__((aligned(8)));
+       unsigned long           dbar[4] __attribute__((aligned(8)));
+       unsigned long           dbdr[4][4] __attribute__((aligned(8)));
+       unsigned long           dbmr[4][4] __attribute__((aligned(8)));
 } __attribute__((aligned(8)));
 
 #endif
 
-#define REG_NMAR               __OFFSET(-1)
-#define REG_BRR                        __OFFSET(-2)
-#define REG_DCR                        __OFFSET(-3)
-#define REG_BPSR               __OFFSET(-4)
-#define REG__DEBUG_XTRA                __OFFSET(4)
-
 /*****************************************************************************/
 /*
  * userspace registers
@@ -223,33 +206,27 @@ struct user_context
        void *extension;
 } __attribute__((aligned(8)));
 
+struct frv_frame0 {
+       union {
+               struct pt_regs          regs;
+               struct user_context     uc;
+       };
+
+       struct frv_debug_regs           debug;
+
+} __attribute__((aligned(32)));
+
 #endif
 
-#define NR_USER_INT_REGS       (14 + 64)
-#define NR_USER_FPMEDIA_REGS   (64 + 2 + 2 + 8 + 8/4 + 1)
-#define NR_USER_CONTEXT                (NR_USER_INT_REGS + NR_USER_FPMEDIA_REGS + 1)
-
-#define USER_CONTEXT_SIZE      (((NR_USER_CONTEXT + 1) & ~1) * 4)
-
-#define __THREAD_FRAME         __OFFSET(0)
-#define __THREAD_CURR          __OFFSET(1)
-#define __THREAD_SP            __OFFSET(2)
-#define __THREAD_FP            __OFFSET(3)
-#define __THREAD_LR            __OFFSET(4)
-#define __THREAD_PC            __OFFSET(5)
-#define __THREAD_GR(R)         __OFFSET(6 + (R) - 16)
-#define __THREAD_FRAME0                __OFFSET(19)
-#define __THREAD_USER          __OFFSET(19)
-
-#define __USER_INT             __OFFSET(0)
-#define __INT_GR(R)            __OFFSET(14 + (R))
-
-#define __USER_FPMEDIA         __OFFSET(NR_USER_INT_REGS)
-#define __FPMEDIA_FR(R)                __OFFSET(NR_USER_INT_REGS + (R))
-#define __FPMEDIA_FNER(R)      __OFFSET(NR_USER_INT_REGS + 64 + (R))
-#define __FPMEDIA_MSR(R)       __OFFSET(NR_USER_INT_REGS + 66 + (R))
-#define __FPMEDIA_ACC(R)       __OFFSET(NR_USER_INT_REGS + 68 + (R))
-#define __FPMEDIA_ACCG(R)      __OFFSETC(NR_USER_INT_REGS + 76, (R))
-#define __FPMEDIA_FSR(R)       __OFFSET(NR_USER_INT_REGS + 78 + (R))
+#define __INT_GR(R)            __OFFSET(__INT_GR0,             (R))
+
+#define __FPMEDIA_FR(R)                __OFFSET(__FPMEDIA_FR0,         (R))
+#define __FPMEDIA_FNER(R)      __OFFSET(__FPMEDIA_FNER0,       (R))
+#define __FPMEDIA_MSR(R)       __OFFSET(__FPMEDIA_MSR0,        (R))
+#define __FPMEDIA_ACC(R)       __OFFSET(__FPMEDIA_ACC0,        (R))
+#define __FPMEDIA_ACCG(R)      __OFFSETC(__FPMEDIA_ACCG0,      (R))
+#define __FPMEDIA_FSR(R)       __OFFSET(__FPMEDIA_FSR0,        (R))
+
+#define __THREAD_GR(R)         __OFFSET(__THREAD_GR16,         (R) - 16)
 
 #endif /* _ASM_REGISTERS_H */
index 351863dfd06e14528b6237bd01fe1f124d0ff64c..1166899317d78a8ca248d798216d3391e0484b8e 100644 (file)
@@ -179,7 +179,6 @@ do {                                                        \
 #define rmb()                  asm volatile ("membar" : : :"memory")
 #define wmb()                  asm volatile ("membar" : : :"memory")
 #define set_mb(var, value)     do { var = value; mb(); } while (0)
-#define set_wmb(var, value)    do { var = value; wmb(); } while (0)
 
 #define smp_mb()               mb()
 #define smp_rmb()              rmb()
index ea426abf01d39449d58d3356ab53d4e5dec9ed3c..d66c48e6ef144dcaf0259bcf3428ebfae224f28b 100644 (file)
@@ -19,6 +19,8 @@
 #include <asm/processor.h>
 #endif
 
+#define THREAD_SIZE            8192
+
 /*
  * low level task data that entry.S needs immediate access to
  * - this struct should fit entirely inside of one cache line
@@ -46,15 +48,7 @@ struct thread_info {
 
 #else /* !__ASSEMBLY__ */
 
-/* offsets into the thread_info struct for assembly code access */
-#define TI_TASK                        0x00000000
-#define TI_EXEC_DOMAIN         0x00000004
-#define TI_FLAGS               0x00000008
-#define TI_STATUS              0x0000000C
-#define TI_CPU                 0x00000010
-#define TI_PRE_COUNT           0x00000014
-#define TI_ADDR_LIMIT          0x00000018
-#define TI_RESTART_BLOCK       0x0000001C
+#include <asm/asm-offsets.h>
 
 #endif
 
@@ -83,12 +77,6 @@ struct thread_info {
 #define init_thread_info       (init_thread_union.thread_info)
 #define init_stack             (init_thread_union.stack)
 
-#ifdef CONFIG_SMALL_TASKS
-#define THREAD_SIZE            4096
-#else
-#define THREAD_SIZE            8192
-#endif
-
 /* how to get the thread information struct from C */
 register struct thread_info *__current_thread_info asm("gr15");
 
@@ -111,11 +99,7 @@ register struct thread_info *__current_thread_info asm("gr15");
 
 #define free_thread_info(info) kfree(info)
 
-#else /* !__ASSEMBLY__ */
-
-#define THREAD_SIZE    8192
-
-#endif
+#endif /* __ASSEMBLY__ */
 
 /*
  * thread information flags
index d8d0bcecd23f46372ab1dddfee0cd030da1b19ad..6b16dda18115a6a8de2fde2a573107297c24cffb 100644 (file)
@@ -1,11 +1,8 @@
 unifdef-y += a.out.h auxvec.h byteorder.h errno.h fcntl.h ioctl.h      \
-       ioctls.h ipcbuf.h irq.h mman.h msgbuf.h param.h poll.h          \
+       ioctls.h ipcbuf.h mman.h msgbuf.h param.h poll.h                \
        posix_types.h ptrace.h resource.h sembuf.h shmbuf.h shmparam.h  \
        sigcontext.h siginfo.h signal.h socket.h sockios.h stat.h       \
        statfs.h termbits.h termios.h timex.h types.h unistd.h user.h
 
-# These really shouldn't be exported
-unifdef-y += atomic.h io.h
-
 # These probably shouldn't be exported
 unifdef-y += elf.h page.h
index f9f9d3eea8ed2fd3e9e9349c26dcfb5e1570df3b..d673077d2fd6258505fb1bbc251f78db8b7f9f94 100644 (file)
@@ -66,7 +66,6 @@ extern unsigned long memory_end;
 
 #define MAP_NR(addr)           (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
 #define virt_to_page(addr)     (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
-#define virt_to_page(addr)     (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
 #define page_to_virt(page)     ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
 #define pfn_valid(page)                (page < max_mapnr)
 
index c7e2f454b83a570b5a445b061f028705166637bb..99b664aa20837e3f1d674800bc9377932267802e 100644 (file)
@@ -17,6 +17,7 @@
  */
 #define current_text_addr() ({ __label__ _l; _l: &&_l;})
 
+#include <linux/compiler.h>
 #include <asm/segment.h>
 #include <asm/fpu.h>
 #include <asm/ptrace.h>
@@ -129,6 +130,6 @@ unsigned long get_wchan(struct task_struct *p);
        eip; })
 #define        KSTK_ESP(tsk)   ((tsk) == current ? rdusp() : (tsk)->thread.usp)
 
-#define cpu_relax()    do { } while (0)
+#define cpu_relax()    barrier()
 
 #endif
index 134e0929fce5500939b4d4bee7d34bd03d400890..5084a9d4292254f28a638302cc3bc0eb9b609069 100644 (file)
@@ -84,7 +84,6 @@ asmlinkage void resume(void);
 #define wmb()  asm volatile (""   : : :"memory")
 #define set_rmb(var, value)    do { xchg(&var, value); } while (0)
 #define set_mb(var, value)     set_rmb(var, value)
-#define set_wmb(var, value)    do { var = value; wmb(); } while (0)
 
 #ifdef CONFIG_SMP
 #define smp_mb()       mb()
index db398d88b1d950eaad4ae4296dd14169b4faf826..49928eb33f8bbd830ac1937a7ff5b50de1adec5d 100644 (file)
@@ -82,10 +82,6 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \
 #define savesegment(seg, value) \
        asm volatile("mov %%" #seg ",%0":"=rm" (value))
 
-/*
- * Clear and set 'TS' bit respectively
- */
-#define clts() __asm__ __volatile__ ("clts")
 #define read_cr0() ({ \
        unsigned int __dummy; \
        __asm__ __volatile__( \
@@ -94,7 +90,7 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \
        __dummy; \
 })
 #define write_cr0(x) \
-       __asm__ __volatile__("movl %0,%%cr0": :"r" (x));
+       __asm__ __volatile__("movl %0,%%cr0": :"r" (x))
 
 #define read_cr2() ({ \
        unsigned int __dummy; \
@@ -104,7 +100,7 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \
        __dummy; \
 })
 #define write_cr2(x) \
-       __asm__ __volatile__("movl %0,%%cr2": :"r" (x));
+       __asm__ __volatile__("movl %0,%%cr2": :"r" (x))
 
 #define read_cr3() ({ \
        unsigned int __dummy; \
@@ -114,7 +110,7 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \
        __dummy; \
 })
 #define write_cr3(x) \
-       __asm__ __volatile__("movl %0,%%cr3": :"r" (x));
+       __asm__ __volatile__("movl %0,%%cr3": :"r" (x))
 
 #define read_cr4() ({ \
        unsigned int __dummy; \
@@ -123,7 +119,6 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \
                :"=r" (__dummy)); \
        __dummy; \
 })
-
 #define read_cr4_safe() ({                           \
        unsigned int __dummy;                         \
        /* This could fault if %cr4 does not exist */ \
@@ -135,15 +130,19 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \
                : "=r" (__dummy): "0" (0));           \
        __dummy;                                      \
 })
-
 #define write_cr4(x) \
-       __asm__ __volatile__("movl %0,%%cr4": :"r" (x));
+       __asm__ __volatile__("movl %0,%%cr4": :"r" (x))
+
+/*
+ * Clear and set 'TS' bit respectively
+ */
+#define clts() __asm__ __volatile__ ("clts")
 #define stts() write_cr0(8 | read_cr0())
 
 #endif /* __KERNEL__ */
 
 #define wbinvd() \
-       __asm__ __volatile__ ("wbinvd": : :"memory");
+       __asm__ __volatile__ ("wbinvd": : :"memory")
 
 static inline unsigned long get_limit(unsigned long segment)
 {
@@ -454,8 +453,6 @@ static inline unsigned long long __cmpxchg64(volatile void *ptr, unsigned long l
 #define set_mb(var, value) do { var = value; barrier(); } while (0)
 #endif
 
-#define set_wmb(var, value) do { var = value; wmb(); } while (0)
-
 #include <linux/irqflags.h>
 
 /*
index 2833fa2c0dd0e6d5a54b5b6539123533f9c04855..54d6d7aea938cf4fb1d8266418f9df1f790274c0 100644 (file)
@@ -140,6 +140,8 @@ static inline struct thread_info *current_thread_info(void)
 #define TIF_SECCOMP            8       /* secure computing */
 #define TIF_RESTORE_SIGMASK    9       /* restore signal mask in do_signal() */
 #define TIF_MEMDIE             16
+#define TIF_DEBUG              17      /* uses debug registers */
+#define TIF_IO_BITMAP          18      /* uses I/O bitmap */
 
 #define _TIF_SYSCALL_TRACE     (1<<TIF_SYSCALL_TRACE)
 #define _TIF_NOTIFY_RESUME     (1<<TIF_NOTIFY_RESUME)
@@ -151,6 +153,8 @@ static inline struct thread_info *current_thread_info(void)
 #define _TIF_SYSCALL_AUDIT     (1<<TIF_SYSCALL_AUDIT)
 #define _TIF_SECCOMP           (1<<TIF_SECCOMP)
 #define _TIF_RESTORE_SIGMASK   (1<<TIF_RESTORE_SIGMASK)
+#define _TIF_DEBUG             (1<<TIF_DEBUG)
+#define _TIF_IO_BITMAP         (1<<TIF_IO_BITMAP)
 
 /* work to do on interrupt/exception return */
 #define _TIF_WORK_MASK \
@@ -159,6 +163,9 @@ static inline struct thread_info *current_thread_info(void)
 /* work to do on any return to u-space */
 #define _TIF_ALLWORK_MASK      (0x0000FFFF & ~_TIF_SECCOMP)
 
+/* flags to check in __switch_to() */
+#define _TIF_WORK_CTXSW (_TIF_DEBUG|_TIF_IO_BITMAP)
+
 /*
  * Thread-synchronous status.
  *
index 781ee2c7e8c3aa37b9bfd7ea9046df96e9b3f02b..43bfff6c6b87fffbc6e36cac2aea43e7cebf7351 100644 (file)
@@ -90,7 +90,7 @@ phys_to_virt (unsigned long address)
 #define ARCH_HAS_VALID_PHYS_ADDR_RANGE
 extern u64 kern_mem_attribute (unsigned long phys_addr, unsigned long size);
 extern int valid_phys_addr_range (unsigned long addr, size_t count); /* efi.c */
-extern int valid_mmap_phys_addr_range (unsigned long addr, size_t count);
+extern int valid_mmap_phys_addr_range (unsigned long pfn, size_t count);
 
 /*
  * The following two macros are deprecated and scheduled for removal.
index 65db43ce4de6e533a89a81d2df70ec6e799d8962..fc9677bc87ee8f1e1a0b4d9d501da8ea798a6482 100644 (file)
@@ -98,12 +98,11 @@ extern struct ia64_boot_param {
 #endif
 
 /*
- * XXX check on these---I suspect what Linus really wants here is
+ * XXX check on this ---I suspect what Linus really wants here is
  * acquire vs release semantics but we can't discuss this stuff with
  * Linus just yet.  Grrr...
  */
 #define set_mb(var, value)     do { (var) = (value); mb(); } while (0)
-#define set_wmb(var, value)    do { (var) = (value); mb(); } while (0)
 
 #define safe_halt()         ia64_pal_halt_light()    /* PAL_HALT_LIGHT */
 
index 311cebf44eff76ecf96ca6e69ffcd7b72be77123..9e618afec6ed7bd6480962dfa85abb2931c61e7a 100644 (file)
@@ -336,7 +336,6 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
 #endif
 
 #define set_mb(var, value) do { xchg(&var, value); } while (0)
-#define set_wmb(var, value) do { var = value; wmb(); } while (0)
 
 #define arch_align_stack(x) (x)
 
index d6dd8052cd6f199f5775486ba416c7c2075c2d74..131a0cb0f491833f8fc3413a024aecfc5c3404d1 100644 (file)
@@ -80,7 +80,6 @@ static inline int irqs_disabled(void)
 #define wmb()          barrier()
 #define read_barrier_depends() do { } while(0)
 #define set_mb(var, value)    do { xchg(&var, value); } while (0)
-#define set_wmb(var, value)    do { var = value; wmb(); } while (0)
 
 #define smp_mb()       barrier()
 #define smp_rmb()      barrier()
index 0ee158e09abb3f259f7fb9f6572893748850ac62..9d3a1bf412312b1f09847c515b485b179f6ccafe 100644 (file)
@@ -13,6 +13,7 @@
  */
 #define current_text_addr() ({ __label__ _l; _l: &&_l;})
 
+#include <linux/compiler.h>
 #include <linux/threads.h>
 #include <asm/types.h>
 #include <asm/segment.h>
@@ -137,6 +138,6 @@ unsigned long get_wchan(struct task_struct *p);
        eip; })
 #define        KSTK_ESP(tsk)   ((tsk) == current ? rdusp() : (tsk)->thread.usp)
 
-#define cpu_relax()    do { } while (0)
+#define cpu_relax()    barrier()
 
 #endif
index 2bbe2db00a22a7a3c1731ea0b574558580027fc0..2a814498672d72408c149f4d64580232f697c5df 100644 (file)
@@ -106,7 +106,6 @@ asmlinkage void resume(void);
 #define wmb()  asm volatile (""   : : :"memory")
 #define set_rmb(var, value)    do { xchg(&var, value); } while (0)
 #define set_mb(var, value)     set_rmb(var, value)
-#define set_wmb(var, value)    do { var = value; wmb(); } while (0)
 
 #ifdef CONFIG_SMP
 #define smp_mb()       mb()
index 05be9515a2d2e8509cdac90753c3903435b24b70..62b29b10bc6dbca19ba2635bdb3dd247db82c120 100644 (file)
@@ -93,7 +93,7 @@ extern int __put_user_bad(void);
 #define get_user(x, ptr)                                       \
 ({                                                             \
     int __gu_err = 0;                                          \
-    typeof(*(ptr)) __gu_val = 0;                               \
+    typeof(x) __gu_val = 0;                                    \
     switch (sizeof(*(ptr))) {                                  \
     case 1:                                                    \
        __get_user_asm(__gu_err, __gu_val, ptr, b, "=d");       \
@@ -105,23 +105,23 @@ extern int __put_user_bad(void);
        __get_user_asm(__gu_err, __gu_val, ptr, l, "=r");       \
        break;                                                  \
     case 8:                                                    \
-       memcpy(&__gu_val, ptr, sizeof (*(ptr))); \
+       memcpy((void *) &__gu_val, ptr, sizeof (*(ptr)));       \
        break;                                                  \
     default:                                                   \
        __gu_val = 0;                                           \
        __gu_err = __get_user_bad();                            \
        break;                                                  \
     }                                                          \
-    (x) = __gu_val;                                            \
+    (x) = (typeof(*(ptr))) __gu_val;                           \
     __gu_err;                                                  \
 })
 #define __get_user(x, ptr) get_user(x, ptr)
 
 extern int __get_user_bad(void);
 
-#define __get_user_asm(err,x,ptr,bwl,reg)      \
-       __asm__ ("move" #bwl " %1,%0"                   \
-                : "=d" (x)                                                     \
+#define __get_user_asm(err,x,ptr,bwl,reg)                      \
+       __asm__ ("move" #bwl " %1,%0"                           \
+                : "=d" (x)                                     \
                 : "m" (*__ptr(ptr)))
 
 #define copy_from_user(to, from, n)            (memcpy(to, from, n), 0)
index e8c69208f63a46d61ab40420d51c49b6c5db2a3c..4b99ffc115294bf31f0e0784ddbb7464beba295e 100644 (file)
@@ -13,7 +13,6 @@
 #ifndef MIPS_ASM_SA1100_APM_H
 #define MIPS_ASM_SA1100_APM_H
 
-#include <linux/config.h>
 #include <linux/apm_bios.h>
 
 /*
index 13d44e14025ac873ce8921bb7dc25d52ca47997d..e64abc0d82217068d4e73fce05a31afe5009e9da 100644 (file)
@@ -22,8 +22,8 @@
 #ifndef _ASM_ATOMIC_H
 #define _ASM_ATOMIC_H
 
+#include <linux/irqflags.h>
 #include <asm/cpu-features.h>
-#include <asm/interrupt.h>
 #include <asm/war.h>
 
 typedef struct { volatile int counter; } atomic_t;
index 098cec263681b47cb925266cdef2bc2034482253..1bb89c5a10ee65d52dc34f4b2e40763fd6c42537 100644 (file)
@@ -31,7 +31,7 @@
 
 #ifdef __KERNEL__
 
-#include <asm/interrupt.h>
+#include <linux/irqflags.h>
 #include <asm/sgidefs.h>
 #include <asm/war.h>
 
index 44285a9d55204c767fc63d0e972fe6fff94cdca8..eadca266f159bcaae8d1fd5644e4bc191e026b40 100644 (file)
 #define cpu_has_dsp            (cpu_data[0].ases & MIPS_ASE_DSP)
 #endif
 
-#ifdef CONFIG_MIPS_MT
 #ifndef cpu_has_mipsmt
-# define cpu_has_mipsmt                (cpu_data[0].ases & MIPS_ASE_MIPSMT)
-#endif
-#else
-# define cpu_has_mipsmt                0
+#define cpu_has_mipsmt         (cpu_data[0].ases & MIPS_ASE_MIPSMT)
 #endif
 
 #ifdef CONFIG_32BIT
 # define cpu_has_veic                  0
 #endif
 
-#ifndef cpu_has_subset_pcaches
-#define cpu_has_subset_pcaches (cpu_data[0].options & MIPS_CPU_SUBSET_CACHES)
+#ifndef cpu_has_inclusive_pcaches
+#define cpu_has_inclusive_pcaches      (cpu_data[0].options & MIPS_CPU_INCLUSIVE_CACHES)
 #endif
 
 #ifndef cpu_dcache_line_size
index dff2a0a52f8f300e6979b79a2848c88c71b42cd6..d38fdbf845b2612354a45c4fdfa6273f13aff156 100644 (file)
 #define MIPS_CPU_EJTAG         0x00008000 /* EJTAG exception */
 #define MIPS_CPU_NOFPUEX       0x00010000 /* no FPU exception */
 #define MIPS_CPU_LLSC          0x00020000 /* CPU has ll/sc instructions */
-#define MIPS_CPU_SUBSET_CACHES 0x00040000 /* P-cache subset enforced */
+#define MIPS_CPU_INCLUSIVE_CACHES      0x00040000 /* P-cache subset enforced */
 #define MIPS_CPU_PREFETCH      0x00080000 /* CPU has usable prefetch */
 #define MIPS_CPU_VINT          0x00100000 /* CPU supports MIPSR2 vectored interrupts */
 #define MIPS_CPU_VEIC          0x00200000 /* CPU supports MIPSR2 external interrupt controller mode */
index 1ed8d0f62577d4e01246d2834e2da4fed935ac85..6489f00731caad3e904850dbbcf8d97f30afcd10 100644 (file)
@@ -74,7 +74,7 @@ enum spec3_op {
        ins_op, dinsm_op, dinsu_op, dins_op,
        bshfl_op = 0x20,
        dbshfl_op = 0x24,
-       rdhwr_op = 0x3f
+       rdhwr_op = 0x3b
 };
 
 /*
diff --git a/include/asm-mips/interrupt.h b/include/asm-mips/interrupt.h
deleted file mode 100644 (file)
index a99d686..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1994, 95, 96, 97, 98, 99, 2003 by Ralf Baechle
- * Copyright (C) 1996 by Paul M. Antoine
- * Copyright (C) 1999 Silicon Graphics
- * Copyright (C) 2000 MIPS Technologies, Inc.
- */
-#ifndef _ASM_INTERRUPT_H
-#define _ASM_INTERRUPT_H
-
-#include <asm/hazards.h>
-
-__asm__ (
-       "       .macro  local_irq_enable                                \n"
-       "       .set    push                                            \n"
-       "       .set    reorder                                         \n"
-       "       .set    noat                                            \n"
-#ifdef CONFIG_MIPS_MT_SMTC
-       "       mfc0    $1, $2, 1       # SMTC - clear TCStatus.IXMT    \n"
-       "       ori     $1, 0x400                                       \n"
-       "       xori    $1, 0x400                                       \n"
-       "       mtc0    $1, $2, 1                                       \n"
-#elif defined(CONFIG_CPU_MIPSR2)
-       "       ei                                                      \n"
-#else
-       "       mfc0    $1,$12                                          \n"
-       "       ori     $1,0x1f                                         \n"
-       "       xori    $1,0x1e                                         \n"
-       "       mtc0    $1,$12                                          \n"
-#endif
-       "       irq_enable_hazard                                       \n"
-       "       .set    pop                                             \n"
-       "       .endm");
-
-static inline void local_irq_enable(void)
-{
-       __asm__ __volatile__(
-               "local_irq_enable"
-               : /* no outputs */
-               : /* no inputs */
-               : "memory");
-}
-
-/*
- * For cli() we have to insert nops to make sure that the new value
- * has actually arrived in the status register before the end of this
- * macro.
- * R4000/R4400 need three nops, the R4600 two nops and the R10000 needs
- * no nops at all.
- */
-/*
- * For TX49, operating only IE bit is not enough.
- *
- * If mfc0 $12 follows store and the mfc0 is last instruction of a
- * page and fetching the next instruction causes TLB miss, the result
- * of the mfc0 might wrongly contain EXL bit.
- *
- * ERT-TX49H2-027, ERT-TX49H3-012, ERT-TX49HL3-006, ERT-TX49H4-008
- *
- * Workaround: mask EXL bit of the result or place a nop before mfc0.
- */
-__asm__ (
-       "       .macro  local_irq_disable\n"
-       "       .set    push                                            \n"
-       "       .set    noat                                            \n"
-#ifdef CONFIG_MIPS_MT_SMTC
-       "       mfc0    $1, $2, 1                                       \n"
-       "       ori     $1, 0x400                                       \n"
-       "       .set    noreorder                                       \n"
-       "       mtc0    $1, $2, 1                                       \n"
-#elif defined(CONFIG_CPU_MIPSR2)
-       "       di                                                      \n"
-#else
-       "       mfc0    $1,$12                                          \n"
-       "       ori     $1,0x1f                                         \n"
-       "       xori    $1,0x1f                                         \n"
-       "       .set    noreorder                                       \n"
-       "       mtc0    $1,$12                                          \n"
-#endif
-       "       irq_disable_hazard                                      \n"
-       "       .set    pop                                             \n"
-       "       .endm                                                   \n");
-
-static inline void local_irq_disable(void)
-{
-       __asm__ __volatile__(
-               "local_irq_disable"
-               : /* no outputs */
-               : /* no inputs */
-               : "memory");
-}
-
-__asm__ (
-       "       .macro  local_save_flags flags                          \n"
-       "       .set    push                                            \n"
-       "       .set    reorder                                         \n"
-#ifdef CONFIG_MIPS_MT_SMTC
-       "       mfc0    \\flags, $2, 1                                  \n"
-#else
-       "       mfc0    \\flags, $12                                    \n"
-#endif
-       "       .set    pop                                             \n"
-       "       .endm                                                   \n");
-
-#define local_save_flags(x)                                            \
-__asm__ __volatile__(                                                  \
-       "local_save_flags %0"                                           \
-       : "=r" (x))
-
-__asm__ (
-       "       .macro  local_irq_save result                           \n"
-       "       .set    push                                            \n"
-       "       .set    reorder                                         \n"
-       "       .set    noat                                            \n"
-#ifdef CONFIG_MIPS_MT_SMTC
-       "       mfc0    \\result, $2, 1                                 \n"
-       "       ori     $1, \\result, 0x400                             \n"
-       "       .set    noreorder                                       \n"
-       "       mtc0    $1, $2, 1                                       \n"
-       "       andi    \\result, \\result, 0x400                       \n"
-#elif defined(CONFIG_CPU_MIPSR2)
-       "       di      \\result                                        \n"
-       "       andi    \\result, 1                                     \n"
-#else
-       "       mfc0    \\result, $12                                   \n"
-       "       ori     $1, \\result, 0x1f                              \n"
-       "       xori    $1, 0x1f                                        \n"
-       "       .set    noreorder                                       \n"
-       "       mtc0    $1, $12                                         \n"
-#endif
-       "       irq_disable_hazard                                      \n"
-       "       .set    pop                                             \n"
-       "       .endm                                                   \n");
-
-#define local_irq_save(x)                                              \
-__asm__ __volatile__(                                                  \
-       "local_irq_save\t%0"                                            \
-       : "=r" (x)                                                      \
-       : /* no inputs */                                               \
-       : "memory")
-
-__asm__ (
-       "       .macro  local_irq_restore flags                         \n"
-       "       .set    push                                            \n"
-       "       .set    noreorder                                       \n"
-       "       .set    noat                                            \n"
-#ifdef CONFIG_MIPS_MT_SMTC
-       "mfc0   $1, $2, 1                                               \n"
-       "andi   \\flags, 0x400                                          \n"
-       "ori    $1, 0x400                                               \n"
-       "xori   $1, 0x400                                               \n"
-       "or     \\flags, $1                                             \n"
-       "mtc0   \\flags, $2, 1                                          \n"
-#elif defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU)
-       /*
-        * Slow, but doesn't suffer from a relativly unlikely race
-        * condition we're having since days 1.
-        */
-       "       beqz    \\flags, 1f                                     \n"
-       "        di                                                     \n"
-       "       ei                                                      \n"
-       "1:                                                             \n"
-#elif defined(CONFIG_CPU_MIPSR2)
-       /*
-        * Fast, dangerous.  Life is fun, life is good.
-        */
-       "       mfc0    $1, $12                                         \n"
-       "       ins     $1, \\flags, 0, 1                               \n"
-       "       mtc0    $1, $12                                         \n"
-#else
-       "       mfc0    $1, $12                                         \n"
-       "       andi    \\flags, 1                                      \n"
-       "       ori     $1, 0x1f                                        \n"
-       "       xori    $1, 0x1f                                        \n"
-       "       or      \\flags, $1                                     \n"
-       "       mtc0    \\flags, $12                                    \n"
-#endif
-       "       irq_disable_hazard                                      \n"
-       "       .set    pop                                             \n"
-       "       .endm                                                   \n");
-
-#define local_irq_restore(flags)                                       \
-do {                                                                   \
-       unsigned long __tmp1;                                           \
-                                                                       \
-       __asm__ __volatile__(                                           \
-               "local_irq_restore\t%0"                                 \
-               : "=r" (__tmp1)                                         \
-               : "0" (flags)                                           \
-               : "memory");                                            \
-} while(0)
-
-static inline int irqs_disabled(void)
-{
-#ifdef CONFIG_MIPS_MT_SMTC
-       /*
-        * SMTC model uses TCStatus.IXMT to disable interrupts for a thread/CPU
-        */
-       unsigned long __result;
-
-       __asm__ __volatile__(
-       "       .set    noreorder                                       \n"
-       "       mfc0    %0, $2, 1                                       \n"
-       "       andi    %0, 0x400                                       \n"
-       "       slt     %0, $0, %0                                      \n"
-       "       .set    reorder                                         \n"
-       : "=r" (__result));
-
-       return __result;
-#else
-       unsigned long flags;
-       local_save_flags(flags);
-
-       return !(flags & 1);
-#endif
-}
-
-#endif /* _ASM_INTERRUPT_H */
diff --git a/include/asm-mips/irqflags.h b/include/asm-mips/irqflags.h
new file mode 100644 (file)
index 0000000..43ca09a
--- /dev/null
@@ -0,0 +1,225 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1994, 95, 96, 97, 98, 99, 2003 by Ralf Baechle
+ * Copyright (C) 1996 by Paul M. Antoine
+ * Copyright (C) 1999 Silicon Graphics
+ * Copyright (C) 2000 MIPS Technologies, Inc.
+ */
+#ifndef _ASM_IRQFLAGS_H
+#define _ASM_IRQFLAGS_H
+
+#ifndef __ASSEMBLY__
+
+#include <asm/hazards.h>
+
+__asm__ (
+       "       .macro  raw_local_irq_enable                            \n"
+       "       .set    push                                            \n"
+       "       .set    reorder                                         \n"
+       "       .set    noat                                            \n"
+#ifdef CONFIG_MIPS_MT_SMTC
+       "       mfc0    $1, $2, 1       # SMTC - clear TCStatus.IXMT    \n"
+       "       ori     $1, 0x400                                       \n"
+       "       xori    $1, 0x400                                       \n"
+       "       mtc0    $1, $2, 1                                       \n"
+#elif defined(CONFIG_CPU_MIPSR2)
+       "       ei                                                      \n"
+#else
+       "       mfc0    $1,$12                                          \n"
+       "       ori     $1,0x1f                                         \n"
+       "       xori    $1,0x1e                                         \n"
+       "       mtc0    $1,$12                                          \n"
+#endif
+       "       irq_enable_hazard                                       \n"
+       "       .set    pop                                             \n"
+       "       .endm");
+
+static inline void raw_local_irq_enable(void)
+{
+       __asm__ __volatile__(
+               "raw_local_irq_enable"
+               : /* no outputs */
+               : /* no inputs */
+               : "memory");
+}
+
+/*
+ * For cli() we have to insert nops to make sure that the new value
+ * has actually arrived in the status register before the end of this
+ * macro.
+ * R4000/R4400 need three nops, the R4600 two nops and the R10000 needs
+ * no nops at all.
+ */
+/*
+ * For TX49, operating only IE bit is not enough.
+ *
+ * If mfc0 $12 follows store and the mfc0 is last instruction of a
+ * page and fetching the next instruction causes TLB miss, the result
+ * of the mfc0 might wrongly contain EXL bit.
+ *
+ * ERT-TX49H2-027, ERT-TX49H3-012, ERT-TX49HL3-006, ERT-TX49H4-008
+ *
+ * Workaround: mask EXL bit of the result or place a nop before mfc0.
+ */
+__asm__ (
+       "       .macro  raw_local_irq_disable\n"
+       "       .set    push                                            \n"
+       "       .set    noat                                            \n"
+#ifdef CONFIG_MIPS_MT_SMTC
+       "       mfc0    $1, $2, 1                                       \n"
+       "       ori     $1, 0x400                                       \n"
+       "       .set    noreorder                                       \n"
+       "       mtc0    $1, $2, 1                                       \n"
+#elif defined(CONFIG_CPU_MIPSR2)
+       "       di                                                      \n"
+#else
+       "       mfc0    $1,$12                                          \n"
+       "       ori     $1,0x1f                                         \n"
+       "       xori    $1,0x1f                                         \n"
+       "       .set    noreorder                                       \n"
+       "       mtc0    $1,$12                                          \n"
+#endif
+       "       irq_disable_hazard                                      \n"
+       "       .set    pop                                             \n"
+       "       .endm                                                   \n");
+
+static inline void raw_local_irq_disable(void)
+{
+       __asm__ __volatile__(
+               "raw_local_irq_disable"
+               : /* no outputs */
+               : /* no inputs */
+               : "memory");
+}
+
+__asm__ (
+       "       .macro  raw_local_save_flags flags                      \n"
+       "       .set    push                                            \n"
+       "       .set    reorder                                         \n"
+#ifdef CONFIG_MIPS_MT_SMTC
+       "       mfc0    \\flags, $2, 1                                  \n"
+#else
+       "       mfc0    \\flags, $12                                    \n"
+#endif
+       "       .set    pop                                             \n"
+       "       .endm                                                   \n");
+
+#define raw_local_save_flags(x)                                                \
+__asm__ __volatile__(                                                  \
+       "raw_local_save_flags %0"                                       \
+       : "=r" (x))
+
+__asm__ (
+       "       .macro  raw_local_irq_save result                       \n"
+       "       .set    push                                            \n"
+       "       .set    reorder                                         \n"
+       "       .set    noat                                            \n"
+#ifdef CONFIG_MIPS_MT_SMTC
+       "       mfc0    \\result, $2, 1                                 \n"
+       "       ori     $1, \\result, 0x400                             \n"
+       "       .set    noreorder                                       \n"
+       "       mtc0    $1, $2, 1                                       \n"
+       "       andi    \\result, \\result, 0x400                       \n"
+#elif defined(CONFIG_CPU_MIPSR2)
+       "       di      \\result                                        \n"
+       "       andi    \\result, 1                                     \n"
+#else
+       "       mfc0    \\result, $12                                   \n"
+       "       ori     $1, \\result, 0x1f                              \n"
+       "       xori    $1, 0x1f                                        \n"
+       "       .set    noreorder                                       \n"
+       "       mtc0    $1, $12                                         \n"
+#endif
+       "       irq_disable_hazard                                      \n"
+       "       .set    pop                                             \n"
+       "       .endm                                                   \n");
+
+#define raw_local_irq_save(x)                                          \
+__asm__ __volatile__(                                                  \
+       "raw_local_irq_save\t%0"                                        \
+       : "=r" (x)                                                      \
+       : /* no inputs */                                               \
+       : "memory")
+
+__asm__ (
+       "       .macro  raw_local_irq_restore flags                     \n"
+       "       .set    push                                            \n"
+       "       .set    noreorder                                       \n"
+       "       .set    noat                                            \n"
+#ifdef CONFIG_MIPS_MT_SMTC
+       "mfc0   $1, $2, 1                                               \n"
+       "andi   \\flags, 0x400                                          \n"
+       "ori    $1, 0x400                                               \n"
+       "xori   $1, 0x400                                               \n"
+       "or     \\flags, $1                                             \n"
+       "mtc0   \\flags, $2, 1                                          \n"
+#elif defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU)
+       /*
+        * Slow, but doesn't suffer from a relativly unlikely race
+        * condition we're having since days 1.
+        */
+       "       beqz    \\flags, 1f                                     \n"
+       "        di                                                     \n"
+       "       ei                                                      \n"
+       "1:                                                             \n"
+#elif defined(CONFIG_CPU_MIPSR2)
+       /*
+        * Fast, dangerous.  Life is fun, life is good.
+        */
+       "       mfc0    $1, $12                                         \n"
+       "       ins     $1, \\flags, 0, 1                               \n"
+       "       mtc0    $1, $12                                         \n"
+#else
+       "       mfc0    $1, $12                                         \n"
+       "       andi    \\flags, 1                                      \n"
+       "       ori     $1, 0x1f                                        \n"
+       "       xori    $1, 0x1f                                        \n"
+       "       or      \\flags, $1                                     \n"
+       "       mtc0    \\flags, $12                                    \n"
+#endif
+       "       irq_disable_hazard                                      \n"
+       "       .set    pop                                             \n"
+       "       .endm                                                   \n");
+
+#define raw_local_irq_restore(flags)                                   \
+do {                                                                   \
+       unsigned long __tmp1;                                           \
+                                                                       \
+       __asm__ __volatile__(                                           \
+               "raw_local_irq_restore\t%0"                             \
+               : "=r" (__tmp1)                                         \
+               : "0" (flags)                                           \
+               : "memory");                                            \
+} while(0)
+
+static inline int raw_irqs_disabled_flags(unsigned long flags)
+{
+#ifdef CONFIG_MIPS_MT_SMTC
+       /*
+        * SMTC model uses TCStatus.IXMT to disable interrupts for a thread/CPU
+        */
+       return flags & 0x400;
+#else
+       return !(flags & 1);
+#endif
+}
+
+#endif
+
+/*
+ * Do the CPU's IRQ-state tracing from assembly code.
+ */
+#ifdef CONFIG_TRACE_IRQFLAGS
+# define TRACE_IRQS_ON                                                 \
+       jal     trace_hardirqs_on
+# define TRACE_IRQS_OFF                                                        \
+       jal     trace_hardirqs_off
+#else
+# define TRACE_IRQS_ON
+# define TRACE_IRQS_OFF
+#endif
+
+#endif /* _ASM_IRQFLAGS_H */
index e0e08fc5d7f726c6efd9053409b75c4f9fe007eb..c6dfa59d1986d95da18d3b9a88c3c3716f4ffb27 100644 (file)
@@ -27,7 +27,7 @@
 #define cpu_has_mcheck         0
 #define cpu_has_ejtag          0
 
-#define cpu_has_subset_pcaches 0
+#define cpu_has_inclusive_pcaches      0
 #define cpu_dcache_line_size() 32
 #define cpu_icache_line_size() 32
 #define cpu_scache_line_size() 0
index 6d37a5675803172091bda06d505a7718d3ddcede..6724e99e43e1f293a6fe6ae053abd58c5bd2412b 100644 (file)
@@ -19,6 +19,8 @@
 
 extern volatile u8 *dec_rtc_base;
 
+#define ARCH_RTC_LOCATION
+
 #define RTC_PORT(x)    CPHYSADDR((long)dec_rtc_base)
 #define RTC_IO_EXTENT  dec_kn_slot_size
 #define RTC_IOMAPPED   0
index abb76b2fd8658e6c56ecb15858781883611fc5f4..0d31854222f90a96af8c860c7a74d38c340848bc 100644 (file)
@@ -31,7 +31,7 @@
 #define cpu_has_nofpuex                0
 #define cpu_has_64bits         1
 
-#define cpu_has_subset_pcaches 0
+#define cpu_has_inclusive_pcaches      0
 
 #define cpu_dcache_line_size() 32
 #define cpu_icache_line_size() 32
index c52610de2b3a998a878131da85d115f891fab8f0..130bd4b8edcea3210b703a9e441a09826ecb3587 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef __EXCITE_H__
 #define __EXCITE_H__
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
index 19c2d135985bd9f89ecdc4bcb0da44dba59dac4f..a071974b67bb7e8f69f3492a8f881462151a4e7d 100644 (file)
@@ -34,7 +34,7 @@
 #define cpu_has_4kex           1
 #define cpu_has_4k_cache       1
 
-#define cpu_has_subset_pcaches 1
+#define cpu_has_inclusive_pcaches      1
 
 #define cpu_dcache_line_size() 32
 #define cpu_icache_line_size() 64
index 90ff087083b95b31d72b700206a2a5dd69d3964a..84b6dead0e8a29381d4a44afaa9db281ca716864 100644 (file)
@@ -31,7 +31,7 @@
 #define cpu_has_nofpuex                0
 #define cpu_has_64bits         1
 
-#define cpu_has_subset_pcaches 0
+#define cpu_has_inclusive_pcaches      0
 
 #define cpu_dcache_line_size() 32
 #define cpu_icache_line_size() 32
index e960679f54ba8fc2e08db47f24cf0b5c023b909f..7f3e3f9bd23a0cb8a37d40827d7d918d017aa2fd 100644 (file)
@@ -39,7 +39,7 @@
 #define cpu_has_nofpuex                0
 /* #define cpu_has_64bits      ? */
 /* #define cpu_has_64bit_zero_reg ? */
-/* #define cpu_has_subset_pcaches ? */
+/* #define cpu_has_inclusive_pcaches ? */
 #define cpu_icache_snoops_remote_store 1
 #endif
 
@@ -65,7 +65,7 @@
 #define cpu_has_nofpuex                0
 /* #define cpu_has_64bits      ? */
 /* #define cpu_has_64bit_zero_reg ? */
-/* #define cpu_has_subset_pcaches ? */
+/* #define cpu_has_inclusive_pcaches ? */
 #define cpu_icache_snoops_remote_store 1
 #endif
 
index 782b986241ddce2e50e8867b12ab2ff98de57738..57a12ded0613c0d86182898b58e2e725d91569c8 100644 (file)
@@ -34,7 +34,7 @@
 #define cpu_has_nofpuex        0
 #define cpu_has_64bits         1
 
-#define cpu_has_subset_pcaches 0
+#define cpu_has_inclusive_pcaches      0
 
 #define cpu_dcache_line_size() 32
 #define cpu_icache_line_size() 32
index 193a666cd131328791d0bac5ea7d58c98a34b4aa..a25968f277a2ff0b82dff1b1198baf280aa47428 100644 (file)
@@ -31,7 +31,7 @@
 #define cpu_has_nofpuex                0
 #define cpu_has_64bits         1
 
-#define cpu_has_subset_pcaches 0
+#define cpu_has_inclusive_pcaches      0
 
 #define cpu_dcache_line_size() 32
 #define cpu_icache_line_size() 32
index d736bdadb6df3930d6a7fcc3304b533dc530056c..779b02205737598c5230eea76cae0eaea42b66ed 100644 (file)
@@ -34,7 +34,7 @@
 #define cpu_has_nofpuex                0
 /* #define cpu_has_64bits      ? */
 /* #define cpu_has_64bit_zero_reg ? */
-/* #define cpu_has_subset_pcaches ? */
+/* #define cpu_has_inclusive_pcaches ? */
 #endif
 
 #ifdef CONFIG_CPU_MIPS64
@@ -59,7 +59,7 @@
 #define cpu_has_nofpuex                0
 /* #define cpu_has_64bits      ? */
 /* #define cpu_has_64bit_zero_reg ? */
-/* #define cpu_has_subset_pcaches ? */
+/* #define cpu_has_inclusive_pcaches ? */
 #endif
 
 #endif /* __ASM_MACH_MIPS_CPU_FEATURE_OVERRIDES_H */
index 3073542c93c74010834f20c9c4b27201a6712582..42cebb7ce7a630d9c18f725a3b7692f237c87b53 100644 (file)
@@ -31,7 +31,7 @@
 #define cpu_has_nofpuex                0
 #define cpu_has_64bits         1
 
-#define cpu_has_subset_pcaches 0
+#define cpu_has_inclusive_pcaches      0
 
 #define cpu_dcache_line_size() 32
 #define cpu_icache_line_size() 32
index 9192d76c133dc444d49148a3ebb1d5bfd3eade74..1f318d7079983b378d1ee2a82ef3cf7eb378823c 100644 (file)
 
 /* Bits specific to the VR41xx.  */
 #define VR41_CONF_CS           (_ULCAST_(1) << 12)
+#define VR41_CONF_P4K          (_ULCAST_(1) << 13)
+#define VR41_CONF_BP           (_ULCAST_(1) << 16)
 #define VR41_CONF_M16          (_ULCAST_(1) << 20)
 #define VR41_CONF_AD           (_ULCAST_(1) << 23)
 
@@ -1416,7 +1418,7 @@ change_c0_##name(unsigned int change, unsigned int new)           \
 
 #else /* SMTC versions that manage MT scheduling */
 
-#include <asm/interrupt.h>
+#include <linux/irqflags.h>
 
 /*
  * This is a duplicate of dmt() in mipsmtregs.h to avoid problems with
index 6b97744f00cd7a79bf015daa06a060219dea5bc2..6ed1151a05a36115a9dcb4014cb4b2e21f410b74 100644 (file)
@@ -138,16 +138,14 @@ typedef struct { unsigned long pgprot; } pgprot_t;
 
 #define pfn_to_kaddr(pfn)      __va((pfn) << PAGE_SHIFT)
 
-#ifndef CONFIG_SPARSEMEM
-#ifndef CONFIG_NEED_MULTIPLE_NODES
-#define pfn_valid(pfn)         ((pfn) < max_mapnr)
-#endif
-#endif
-
 #ifdef CONFIG_FLATMEM
 
 #define pfn_valid(pfn)         ((pfn) < max_mapnr)
 
+#elif defined(CONFIG_SPARSEMEM)
+
+/* pfn_valid is defined in linux/mmzone.h */
+
 #elif defined(CONFIG_NEED_MULTIPLE_NODES)
 
 #define pfn_valid(pfn)                                                 \
@@ -159,8 +157,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
                    : 0);                                               \
 })
 
-#else
-#error Provide a definition of pfn_valid
 #endif
 
 #define virt_to_page(kaddr)    pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
index 130333d7c4ee8021ff3736210443963e921d3598..dcb4701d572831fe8e7f781d364bd4a524f2b39c 100644 (file)
 #define _ASM_SYSTEM_H
 
 #include <linux/types.h>
+#include <linux/irqflags.h>
 
 #include <asm/addrspace.h>
 #include <asm/cpu-features.h>
 #include <asm/dsp.h>
 #include <asm/ptrace.h>
 #include <asm/war.h>
-#include <asm/interrupt.h>
 
 /*
  * read_barrier_depends - Flush all pending reads that subsequents reads
 #define set_mb(var, value) \
 do { var = value; mb(); } while (0)
 
-#define set_wmb(var, value) \
-do { var = value; wmb(); } while (0)
-
 /*
  * switch_to(n) should switch tasks to task nr n, first
  * checking that n isn't the current task, in which case it does nothing.
index d897c8bb554d8e1792a4ed3a3588fdc92069517a..2d543735668b9b80bb29a80d5e1f3a2514739e86 100644 (file)
@@ -83,11 +83,11 @@ extern asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs);
 /*
  * board specific routines required by time_init().
  * board_time_init is defaulted to NULL and can remain so.
- * board_timer_setup must be setup properly in machine setup routine.
+ * plat_timer_setup must be setup properly in machine setup routine.
  */
 struct irqaction;
 extern void (*board_time_init)(void);
-extern void (*board_timer_setup)(struct irqaction *irq);
+extern void plat_timer_setup(struct irqaction *irq);
 
 /*
  * mips_hpt_frequency - must be set if you intend to use an R4k-compatible
index 809f9f55bacb8f5f4b966abed542b440027f2bc2..610ccb8a50b3a6fc1fe427de0c50be79edae646b 100644 (file)
 #define __NR_splice                    (__NR_Linux + 304)
 #define __NR_sync_file_range           (__NR_Linux + 305)
 #define __NR_tee                       (__NR_Linux + 306)
+#define __NR_vmsplice                  (__NR_Linux + 307)
+#define __NR_move_pages                        (__NR_Linux + 308)
 
 /*
  * Offset of the last Linux o32 flavoured syscall
  */
-#define __NR_Linux_syscalls            306
+#define __NR_Linux_syscalls            308
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
 
 #define __NR_O32_Linux                 4000
-#define __NR_O32_Linux_syscalls                306
+#define __NR_O32_Linux_syscalls                308
 
 #if _MIPS_SIM == _MIPS_SIM_ABI64
 
 #define __NR_splice                    (__NR_Linux + 263)
 #define __NR_sync_file_range           (__NR_Linux + 264)
 #define __NR_tee                       (__NR_Linux + 265)
+#define __NR_vmsplice                  (__NR_Linux + 266)
+#define __NR_move_pages                        (__NR_Linux + 267)
 
 /*
  * Offset of the last Linux 64-bit flavoured syscall
  */
-#define __NR_Linux_syscalls            265
+#define __NR_Linux_syscalls            267
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
 
 #define __NR_64_Linux                  5000
-#define __NR_64_Linux_syscalls         265
+#define __NR_64_Linux_syscalls         267
 
 #if _MIPS_SIM == _MIPS_SIM_NABI32
 
 #define __NR_splice                    (__NR_Linux + 267)
 #define __NR_sync_file_range           (__NR_Linux + 268)
 #define __NR_tee                       (__NR_Linux + 269)
+#define __NR_vmsplice                  (__NR_Linux + 270)
+#define __NR_move_pages                        (__NR_Linux + 271)
 
 /*
  * Offset of the last N32 flavoured syscall
  */
-#define __NR_Linux_syscalls            269
+#define __NR_Linux_syscalls            271
 
 #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
 
 #define __NR_N32_Linux                 6000
-#define __NR_N32_Linux_syscalls                269
+#define __NR_N32_Linux_syscalls                271
 
 #ifdef __KERNEL__
 
index d10ffda50de76d07bc329bc796b16f9b5f16c796..e0ee05a3dfcccfd3c1bc13e1d843793bfb78f8ba 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __ZAO_CAPCELLA_H
 #define __ZAO_CAPCELLA_H
 
-#include <asm/vr41xx/vr41xx.h>
+#include <asm/vr41xx/irq.h>
 
 /*
  * General-Purpose I/O Pin Number
index 42af389019ea1ddcacdcf75ef1a5475144585ede..9490ade58b4689f47868d3aa777d84101f9fbd68 100644 (file)
@@ -15,8 +15,7 @@
 #ifndef __NEC_CMBVR4133_H
 #define __NEC_CMBVR4133_H
 
-#include <asm/addrspace.h>
-#include <asm/vr41xx/vr41xx.h>
+#include <asm/vr41xx/irq.h>
 
 /*
  * General-Purpose I/O Pin Number
@@ -55,7 +54,4 @@
 #define IDE_SECONDARY_IRQ              I8259_IRQ(15)
 #define I8259_IRQ_LAST                 IDE_SECONDARY_IRQ
 
-#define RTC_PORT(x)    (0xaf000100 + (x))
-#define RTC_IO_EXTENT  0x140
-
 #endif /* __NEC_CMBVR4133_H */
diff --git a/include/asm-mips/vr41xx/e55.h b/include/asm-mips/vr41xx/e55.h
deleted file mode 100644 (file)
index 558f226..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *  e55.h, Include file for CASIO CASSIOPEIA E-10/15/55/65.
- *
- *  Copyright (C) 2002-2004  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __CASIO_E55_H
-#define __CASIO_E55_H
-
-#include <asm/addrspace.h>
-#include <asm/vr41xx/vr41xx.h>
-
-/*
- * Board specific address mapping
- */
-#define VR41XX_ISA_MEM_BASE            0x10000000
-#define VR41XX_ISA_MEM_SIZE            0x04000000
-
-/* VR41XX_ISA_IO_BASE includes offset from real base. */
-#define VR41XX_ISA_IO_BASE             0x1400c000
-#define VR41XX_ISA_IO_SIZE             0x03ff4000
-
-#define ISA_BUS_IO_BASE                        0
-#define ISA_BUS_IO_SIZE                        VR41XX_ISA_IO_SIZE
-
-#define IO_PORT_BASE                   KSEG1ADDR(VR41XX_ISA_IO_BASE)
-#define IO_PORT_RESOURCE_START         ISA_BUS_IO_BASE
-#define IO_PORT_RESOURCE_END           (ISA_BUS_IO_BASE + ISA_BUS_IO_SIZE - 1)
-
-#endif /* __CASIO_E55_H */
diff --git a/include/asm-mips/vr41xx/irq.h b/include/asm-mips/vr41xx/irq.h
new file mode 100644 (file)
index 0000000..d315dfb
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * include/asm-mips/vr41xx/irq.h
+ *
+ * Interrupt numbers for NEC VR4100 series.
+ *
+ * Copyright (C) 1999 Michael Klar
+ * Copyright (C) 2001, 2002 Paul Mundt
+ * Copyright (C) 2002 MontaVista Software, Inc.
+ * Copyright (C) 2002 TimeSys Corp.
+ * Copyright (C) 2003-2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+#ifndef __NEC_VR41XX_IRQ_H
+#define __NEC_VR41XX_IRQ_H
+
+/*
+ * CPU core Interrupt Numbers
+ */
+#define MIPS_CPU_IRQ_BASE      0
+#define MIPS_CPU_IRQ(x)                (MIPS_CPU_IRQ_BASE + (x))
+#define MIPS_SOFTINT0_IRQ      MIPS_CPU_IRQ(0)
+#define MIPS_SOFTINT1_IRQ      MIPS_CPU_IRQ(1)
+#define INT0_IRQ               MIPS_CPU_IRQ(2)
+#define INT1_IRQ               MIPS_CPU_IRQ(3)
+#define INT2_IRQ               MIPS_CPU_IRQ(4)
+#define INT3_IRQ               MIPS_CPU_IRQ(5)
+#define INT4_IRQ               MIPS_CPU_IRQ(6)
+#define TIMER_IRQ              MIPS_CPU_IRQ(7)
+
+/*
+ * SYINT1 Interrupt Numbers
+ */
+#define SYSINT1_IRQ_BASE       8
+#define SYSINT1_IRQ(x)         (SYSINT1_IRQ_BASE + (x))
+#define BATTRY_IRQ             SYSINT1_IRQ(0)
+#define POWER_IRQ              SYSINT1_IRQ(1)
+#define RTCLONG1_IRQ           SYSINT1_IRQ(2)
+#define ELAPSEDTIME_IRQ                SYSINT1_IRQ(3)
+/* RFU */
+#define PIU_IRQ                        SYSINT1_IRQ(5)
+#define AIU_IRQ                        SYSINT1_IRQ(6)
+#define KIU_IRQ                        SYSINT1_IRQ(7)
+#define GIUINT_IRQ             SYSINT1_IRQ(8)
+#define SIU_IRQ                        SYSINT1_IRQ(9)
+#define BUSERR_IRQ             SYSINT1_IRQ(10)
+#define SOFTINT_IRQ            SYSINT1_IRQ(11)
+#define CLKRUN_IRQ             SYSINT1_IRQ(12)
+#define DOZEPIU_IRQ            SYSINT1_IRQ(13)
+#define SYSINT1_IRQ_LAST       DOZEPIU_IRQ
+
+/*
+ * SYSINT2 Interrupt Numbers
+ */
+#define SYSINT2_IRQ_BASE       24
+#define SYSINT2_IRQ(x)         (SYSINT2_IRQ_BASE + (x))
+#define RTCLONG2_IRQ           SYSINT2_IRQ(0)
+#define LED_IRQ                        SYSINT2_IRQ(1)
+#define HSP_IRQ                        SYSINT2_IRQ(2)
+#define TCLOCK_IRQ             SYSINT2_IRQ(3)
+#define FIR_IRQ                        SYSINT2_IRQ(4)
+#define CEU_IRQ                        SYSINT2_IRQ(4)  /* same number as FIR_IRQ */
+#define DSIU_IRQ               SYSINT2_IRQ(5)
+#define PCI_IRQ                        SYSINT2_IRQ(6)
+#define SCU_IRQ                        SYSINT2_IRQ(7)
+#define CSI_IRQ                        SYSINT2_IRQ(8)
+#define BCU_IRQ                        SYSINT2_IRQ(9)
+#define ETHERNET_IRQ           SYSINT2_IRQ(10)
+#define SYSINT2_IRQ_LAST       ETHERNET_IRQ
+
+/*
+ * GIU Interrupt Numbers
+ */
+#define GIU_IRQ_BASE           40
+#define GIU_IRQ(x)             (GIU_IRQ_BASE + (x))    /* IRQ 40-71 */
+#define GIU_IRQ_LAST           GIU_IRQ(31)
+
+/*
+ * VRC4173 Interrupt Numbers
+ */
+#define VRC4173_IRQ_BASE       72
+#define VRC4173_IRQ(x)         (VRC4173_IRQ_BASE + (x))
+#define VRC4173_USB_IRQ                VRC4173_IRQ(0)
+#define VRC4173_PCMCIA2_IRQ    VRC4173_IRQ(1)
+#define VRC4173_PCMCIA1_IRQ    VRC4173_IRQ(2)
+#define VRC4173_PS2CH2_IRQ     VRC4173_IRQ(3)
+#define VRC4173_PS2CH1_IRQ     VRC4173_IRQ(4)
+#define VRC4173_PIU_IRQ                VRC4173_IRQ(5)
+#define VRC4173_AIU_IRQ                VRC4173_IRQ(6)
+#define VRC4173_KIU_IRQ                VRC4173_IRQ(7)
+#define VRC4173_GIU_IRQ                VRC4173_IRQ(8)
+#define VRC4173_AC97_IRQ       VRC4173_IRQ(9)
+#define VRC4173_AC97INT1_IRQ   VRC4173_IRQ(10)
+/* RFU */
+#define VRC4173_DOZEPIU_IRQ    VRC4173_IRQ(13)
+#define VRC4173_IRQ_LAST       VRC4173_DOZEPIU_IRQ
+
+#endif /* __NEC_VR41XX_IRQ_H */
index a6cbe4da6667b77f3a321357933a01e11112e142..1d67df843dc32d93f9feada3ab2a3d0df5fe0454 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __VICTOR_MPC30X_H
 #define __VICTOR_MPC30X_H
 
-#include <asm/vr41xx/vr41xx.h>
+#include <asm/vr41xx/irq.h>
 
 /*
  * General-Purpose I/O Pin Number
index b318b9612a837cb389b82374ccc1e574f7099963..dc981b4be0a404bd0ff3090baccbcd22be8d20ed 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef __TANBAC_TB0219_H
 #define __TANBAC_TB0219_H
 
-#include <asm/vr41xx/vr41xx.h>
+#include <asm/vr41xx/irq.h>
 
 /*
  * General-Purpose I/O Pin Number
index 2513f450e2d65bc1f0cf03e05a0336a15bce1b76..de527dcfa5f31b0301430c170aa36cc0afba32bf 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __TANBAC_TB0226_H
 #define __TANBAC_TB0226_H
 
-#include <asm/vr41xx/vr41xx.h>
+#include <asm/vr41xx/irq.h>
 
 /*
  * General-Purpose I/O Pin Number
index dd9832313afe381cb5b94a087756e28f778b10a5..61bead68abf0dd6638b5684158af4479e7f4670a 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __TANBAC_TB0287_H
 #define __TANBAC_TB0287_H
 
-#include <asm/vr41xx/vr41xx.h>
+#include <asm/vr41xx/irq.h>
 
 /*
  * General-Purpose I/O Pin Number
index 70828d5fae9c999e473262990e352e2df7ea6918..dd3eb3dc5886691f73376a314df85369046c9484 100644 (file)
@@ -74,59 +74,6 @@ extern void vr41xx_mask_clock(vr41xx_clock_t clock);
 /*
  * Interrupt Control Unit
  */
-/* CPU core Interrupt Numbers */
-#define MIPS_CPU_IRQ_BASE      0
-#define MIPS_CPU_IRQ(x)                (MIPS_CPU_IRQ_BASE + (x))
-#define MIPS_SOFTINT0_IRQ      MIPS_CPU_IRQ(0)
-#define MIPS_SOFTINT1_IRQ      MIPS_CPU_IRQ(1)
-#define INT0_IRQ               MIPS_CPU_IRQ(2)
-#define INT1_IRQ               MIPS_CPU_IRQ(3)
-#define INT2_IRQ               MIPS_CPU_IRQ(4)
-#define INT3_IRQ               MIPS_CPU_IRQ(5)
-#define INT4_IRQ               MIPS_CPU_IRQ(6)
-#define TIMER_IRQ              MIPS_CPU_IRQ(7)
-
-/* SYINT1 Interrupt Numbers */
-#define SYSINT1_IRQ_BASE       8
-#define SYSINT1_IRQ(x)         (SYSINT1_IRQ_BASE + (x))
-#define BATTRY_IRQ             SYSINT1_IRQ(0)
-#define POWER_IRQ              SYSINT1_IRQ(1)
-#define RTCLONG1_IRQ           SYSINT1_IRQ(2)
-#define ELAPSEDTIME_IRQ                SYSINT1_IRQ(3)
-/* RFU */
-#define PIU_IRQ                        SYSINT1_IRQ(5)
-#define AIU_IRQ                        SYSINT1_IRQ(6)
-#define KIU_IRQ                        SYSINT1_IRQ(7)
-#define GIUINT_IRQ             SYSINT1_IRQ(8)
-#define SIU_IRQ                        SYSINT1_IRQ(9)
-#define BUSERR_IRQ             SYSINT1_IRQ(10)
-#define SOFTINT_IRQ            SYSINT1_IRQ(11)
-#define CLKRUN_IRQ             SYSINT1_IRQ(12)
-#define DOZEPIU_IRQ            SYSINT1_IRQ(13)
-#define SYSINT1_IRQ_LAST       DOZEPIU_IRQ
-
-/* SYSINT2 Interrupt Numbers */
-#define SYSINT2_IRQ_BASE       24
-#define SYSINT2_IRQ(x)         (SYSINT2_IRQ_BASE + (x))
-#define RTCLONG2_IRQ           SYSINT2_IRQ(0)
-#define LED_IRQ                        SYSINT2_IRQ(1)
-#define HSP_IRQ                        SYSINT2_IRQ(2)
-#define TCLOCK_IRQ             SYSINT2_IRQ(3)
-#define FIR_IRQ                        SYSINT2_IRQ(4)
-#define CEU_IRQ                        SYSINT2_IRQ(4)  /* same number as FIR_IRQ */
-#define DSIU_IRQ               SYSINT2_IRQ(5)
-#define PCI_IRQ                        SYSINT2_IRQ(6)
-#define SCU_IRQ                        SYSINT2_IRQ(7)
-#define CSI_IRQ                        SYSINT2_IRQ(8)
-#define BCU_IRQ                        SYSINT2_IRQ(9)
-#define ETHERNET_IRQ           SYSINT2_IRQ(10)
-#define SYSINT2_IRQ_LAST       ETHERNET_IRQ
-
-/* GIU Interrupt Numbers */
-#define GIU_IRQ_BASE           40
-#define GIU_IRQ(x)             (GIU_IRQ_BASE + (x))    /* IRQ 40-71 */
-#define GIU_IRQ_LAST           GIU_IRQ(31)
-
 extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign);
 extern int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int, struct pt_regs *));
 
diff --git a/include/asm-mips/vr41xx/vrc4173.h b/include/asm-mips/vr41xx/vrc4173.h
deleted file mode 100644 (file)
index 96fdcd5..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- *  vrc4173.h, Include file for NEC VRC4173.
- *
- *  Copyright (C) 2000  Michael R. McDonald
- *  Copyright (C) 2001-2003 Montavista Software Inc.
- *    Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com>
- *  Copyright (C) 2004  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
- *  Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __NEC_VRC4173_H
-#define __NEC_VRC4173_H
-
-#include <asm/io.h>
-
-/*
- * Interrupt Number
- */
-#define VRC4173_IRQ_BASE       72
-#define VRC4173_IRQ(x)         (VRC4173_IRQ_BASE + (x))
-#define VRC4173_USB_IRQ                VRC4173_IRQ(0)
-#define VRC4173_PCMCIA2_IRQ    VRC4173_IRQ(1)
-#define VRC4173_PCMCIA1_IRQ    VRC4173_IRQ(2)
-#define VRC4173_PS2CH2_IRQ     VRC4173_IRQ(3)
-#define VRC4173_PS2CH1_IRQ     VRC4173_IRQ(4)
-#define VRC4173_PIU_IRQ                VRC4173_IRQ(5)
-#define VRC4173_AIU_IRQ                VRC4173_IRQ(6)
-#define VRC4173_KIU_IRQ                VRC4173_IRQ(7)
-#define VRC4173_GIU_IRQ                VRC4173_IRQ(8)
-#define VRC4173_AC97_IRQ       VRC4173_IRQ(9)
-#define VRC4173_AC97INT1_IRQ   VRC4173_IRQ(10)
-/* RFU */
-#define VRC4173_DOZEPIU_IRQ    VRC4173_IRQ(13)
-#define VRC4173_IRQ_LAST       VRC4173_DOZEPIU_IRQ
-
-/*
- * PCI I/O accesses
- */
-#ifdef CONFIG_VRC4173
-
-extern unsigned long vrc4173_io_offset;
-
-#define set_vrc4173_io_offset(offset)  do { vrc4173_io_offset = (offset); } while (0)
-
-#define vrc4173_outb(val,port)         outb((val), vrc4173_io_offset+(port))
-#define vrc4173_outw(val,port)         outw((val), vrc4173_io_offset+(port))
-#define vrc4173_outl(val,port)         outl((val), vrc4173_io_offset+(port))
-#define vrc4173_outb_p(val,port)       outb_p((val), vrc4173_io_offset+(port))
-#define vrc4173_outw_p(val,port)       outw_p((val), vrc4173_io_offset+(port))
-#define vrc4173_outl_p(val,port)       outl_p((val), vrc4173_io_offset+(port))
-
-#define vrc4173_inb(port)              inb(vrc4173_io_offset+(port))
-#define vrc4173_inw(port)              inw(vrc4173_io_offset+(port))
-#define vrc4173_inl(port)              inl(vrc4173_io_offset+(port))
-#define vrc4173_inb_p(port)            inb_p(vrc4173_io_offset+(port))
-#define vrc4173_inw_p(port)            inw_p(vrc4173_io_offset+(port))
-#define vrc4173_inl_p(port)            inl_p(vrc4173_io_offset+(port))
-
-#define vrc4173_outsb(port,addr,count) outsb(vrc4173_io_offset+(port),(addr),(count))
-#define vrc4173_outsw(port,addr,count) outsw(vrc4173_io_offset+(port),(addr),(count))
-#define vrc4173_outsl(port,addr,count) outsl(vrc4173_io_offset+(port),(addr),(count))
-
-#define vrc4173_insb(port,addr,count)  insb(vrc4173_io_offset+(port),(addr),(count))
-#define vrc4173_insw(port,addr,count)  insw(vrc4173_io_offset+(port),(addr),(count))
-#define vrc4173_insl(port,addr,count)  insl(vrc4173_io_offset+(port),(addr),(count))
-
-#else
-
-#define set_vrc4173_io_offset(offset)  do {} while (0)
-
-#define vrc4173_outb(val,port)         do {} while (0)
-#define vrc4173_outw(val,port)         do {} while (0)
-#define vrc4173_outl(val,port)         do {} while (0)
-#define vrc4173_outb_p(val,port)       do {} while (0)
-#define vrc4173_outw_p(val,port)       do {} while (0)
-#define vrc4173_outl_p(val,port)       do {} while (0)
-
-#define vrc4173_inb(port)              0
-#define vrc4173_inw(port)              0
-#define vrc4173_inl(port)              0
-#define vrc4173_inb_p(port)            0
-#define vrc4173_inw_p(port)            0
-#define vrc4173_inl_p(port)            0
-
-#define vrc4173_outsb(port,addr,count) do {} while (0)
-#define vrc4173_outsw(port,addr,count) do {} while (0)
-#define vrc4173_outsl(port,addr,count) do {} while (0)
-
-#define vrc4173_insb(port,addr,count)  do {} while (0)
-#define vrc4173_insw(port,addr,count)  do {} while (0)
-#define vrc4173_insl(port,addr,count)  do {} while (0)
-
-#endif
-
-/*
- * Clock Mask Unit
- */
-typedef enum vrc4173_clock {
-       VRC4173_PIU_CLOCK,
-       VRC4173_KIU_CLOCK,
-       VRC4173_AIU_CLOCK,
-       VRC4173_PS2_CH1_CLOCK,
-       VRC4173_PS2_CH2_CLOCK,
-       VRC4173_USBU_PCI_CLOCK,
-       VRC4173_CARDU1_PCI_CLOCK,
-       VRC4173_CARDU2_PCI_CLOCK,
-       VRC4173_AC97U_PCI_CLOCK,
-       VRC4173_USBU_48MHz_CLOCK,
-       VRC4173_EXT_48MHz_CLOCK,
-       VRC4173_48MHz_CLOCK,
-} vrc4173_clock_t;
-
-#ifdef CONFIG_VRC4173
-
-extern void vrc4173_supply_clock(vrc4173_clock_t clock);
-extern void vrc4173_mask_clock(vrc4173_clock_t clock);
-
-#else
-
-static inline void vrc4173_supply_clock(vrc4173_clock_t clock) {}
-static inline void vrc4173_mask_clock(vrc4173_clock_t clock) {}
-
-#endif
-
-/*
- * Interupt Control Unit
- */
-
-#define VRC4173_PIUINT_COMMAND         0x0040
-#define VRC4173_PIUINT_DATA            0x0020
-#define VRC4173_PIUINT_PAGE1           0x0010
-#define VRC4173_PIUINT_PAGE0           0x0008
-#define VRC4173_PIUINT_DATALOST                0x0004
-#define VRC4173_PIUINT_STATUSCHANGE    0x0001
-
-#ifdef CONFIG_VRC4173
-
-extern void vrc4173_enable_piuint(uint16_t mask);
-extern void vrc4173_disable_piuint(uint16_t mask);
-
-#else
-
-static inline void vrc4173_enable_piuint(uint16_t mask) {}
-static inline void vrc4173_disable_piuint(uint16_t mask) {}
-
-#endif
-
-#define VRC4173_AIUINT_INPUT_DMAEND    0x0800
-#define VRC4173_AIUINT_INPUT_DMAHALT   0x0400
-#define VRC4173_AIUINT_INPUT_DATALOST  0x0200
-#define VRC4173_AIUINT_INPUT_DATA      0x0100
-#define VRC4173_AIUINT_OUTPUT_DMAEND   0x0008
-#define VRC4173_AIUINT_OUTPUT_DMAHALT  0x0004
-#define VRC4173_AIUINT_OUTPUT_NODATA   0x0002
-
-#ifdef CONFIG_VRC4173
-
-extern void vrc4173_enable_aiuint(uint16_t mask);
-extern void vrc4173_disable_aiuint(uint16_t mask);
-
-#else
-
-static inline void vrc4173_enable_aiuint(uint16_t mask) {}
-static inline void vrc4173_disable_aiuint(uint16_t mask) {}
-
-#endif
-
-#define VRC4173_KIUINT_DATALOST                0x0004
-#define VRC4173_KIUINT_DATAREADY       0x0002
-#define VRC4173_KIUINT_SCAN            0x0001
-
-#ifdef CONFIG_VRC4173
-
-extern void vrc4173_enable_kiuint(uint16_t mask);
-extern void vrc4173_disable_kiuint(uint16_t mask);
-
-#else
-
-static inline void vrc4173_enable_kiuint(uint16_t mask) {}
-static inline void vrc4173_disable_kiuint(uint16_t mask) {}
-
-#endif
-
-/*
- * General-Purpose I/O Unit
- */
-typedef enum vrc4173_function {
-       PS2_CHANNEL1,
-       PS2_CHANNEL2,
-       TOUCHPANEL,
-       KEYBOARD_8SCANLINES,
-       KEYBOARD_10SCANLINES,
-       KEYBOARD_12SCANLINES,
-       GPIO_0_15PINS,
-       GPIO_16_20PINS,
-} vrc4173_function_t;
-
-#ifdef CONFIG_VRC4173
-
-extern void vrc4173_select_function(vrc4173_function_t function);
-
-#else
-
-static inline void vrc4173_select_function(vrc4173_function_t function) {}
-
-#endif
-
-#endif /* __NEC_VRC4173_H */
diff --git a/include/asm-mips/vr41xx/workpad.h b/include/asm-mips/vr41xx/workpad.h
deleted file mode 100644 (file)
index 6bfa9c0..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *  workpad.h, Include file for IBM WorkPad z50.
- *
- *  Copyright (C) 2002-2004  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __IBM_WORKPAD_H
-#define __IBM_WORKPAD_H
-
-#include <asm/addrspace.h>
-#include <asm/vr41xx/vr41xx.h>
-
-/*
- * Board specific address mapping
- */
-#define VR41XX_ISA_MEM_BASE            0x10000000
-#define VR41XX_ISA_MEM_SIZE            0x04000000
-
-/* VR41XX_ISA_IO_BASE includes offset from real base. */
-#define VR41XX_ISA_IO_BASE             0x15000000
-#define VR41XX_ISA_IO_SIZE             0x03000000
-
-#define ISA_BUS_IO_BASE                        0
-#define ISA_BUS_IO_SIZE                        VR41XX_ISA_IO_SIZE
-
-#define IO_PORT_BASE                   KSEG1ADDR(VR41XX_ISA_IO_BASE)
-#define IO_PORT_RESOURCE_START         ISA_BUS_IO_BASE
-#define IO_PORT_RESOURCE_END           (ISA_BUS_IO_BASE + ISA_BUS_IO_SIZE - 1)
-
-#endif /* __IBM_WORKPAD_H */
index 5fe2d2329ab5e7c7dbd8121351b1ea7fcef54dbc..74f037a39e6f032ce6a76ae974d521f6357d1f6e 100644 (file)
@@ -143,8 +143,6 @@ static inline void set_eiem(unsigned long val)
 #define read_barrier_depends()         do { } while(0)
 
 #define set_mb(var, value)             do { var = value; mb(); } while (0)
-#define set_wmb(var, value)            do { var = value; wmb(); } while (0)
-
 
 #ifndef CONFIG_PA20
 /* Because kmalloc only guarantees 8-byte alignment for kmalloc'd data,
index a5e9e656e33267dde3e62a1e4da4ceb94853e676..58d4b6f8d8270e7d39b8962d3688ffd602218267 100644 (file)
 extern struct backlight_device *pmac_backlight;
 extern struct mutex pmac_backlight_mutex;
 
-extern void pmac_backlight_calc_curve(struct fb_info*);
 extern int pmac_backlight_curve_lookup(struct fb_info *info, int value);
 
 extern int pmac_has_backlight_type(const char *type);
 
-extern void pmac_backlight_key_up(void);
-extern void pmac_backlight_key_down(void);
+extern void pmac_backlight_key(int direction);
+static inline void pmac_backlight_key_up(void)
+{
+       pmac_backlight_key(0);
+}
+static inline void pmac_backlight_key_down(void)
+{
+       pmac_backlight_key(1);
+}
 
 extern int pmac_backlight_set_legacy_brightness(int brightness);
 extern int pmac_backlight_get_legacy_brightness(void);
index e057547520289ce2fff960c48ac7b070bc15a9d6..d903a62959dabf71b52c9296db47b9674105cc8c 100644 (file)
@@ -83,25 +83,24 @@ struct irq_host_ops {
        int (*match)(struct irq_host *h, struct device_node *node);
 
        /* Create or update a mapping between a virtual irq number and a hw
-        * irq number. This can be called several times for the same mapping
-        * but with different flags, though unmap shall always be called
-        * before the virq->hw mapping is changed.
+        * irq number. This is called only once for a given mapping.
         */
-       int (*map)(struct irq_host *h, unsigned int virq,
-                  irq_hw_number_t hw, unsigned int flags);
+       int (*map)(struct irq_host *h, unsigned int virq, irq_hw_number_t hw);
 
        /* Dispose of such a mapping */
        void (*unmap)(struct irq_host *h, unsigned int virq);
 
        /* Translate device-tree interrupt specifier from raw format coming
         * from the firmware to a irq_hw_number_t (interrupt line number) and
-        * trigger flags that can be passed to irq_create_mapping().
-        * If no translation is provided, raw format is assumed to be one cell
-        * for interrupt line and default sense.
+        * type (sense) that can be passed to set_irq_type(). In the absence
+        * of this callback, irq_create_of_mapping() and irq_of_parse_and_map()
+        * will return the hw number in the first cell and IRQ_TYPE_NONE for
+        * the type (which amount to keeping whatever default value the
+        * interrupt controller has for that line)
         */
        int (*xlate)(struct irq_host *h, struct device_node *ctrler,
                     u32 *intspec, unsigned int intsize,
-                    irq_hw_number_t *out_hwirq, unsigned int *out_flags);
+                    irq_hw_number_t *out_hwirq, unsigned int *out_type);
 };
 
 struct irq_host {
@@ -193,25 +192,14 @@ extern void irq_set_virq_count(unsigned int count);
  * irq_create_mapping - Map a hardware interrupt into linux virq space
  * @host: host owning this hardware interrupt or NULL for default host
  * @hwirq: hardware irq number in that host space
- * @flags: flags passed to the controller. contains the trigger type among
- *         others. Use IRQ_TYPE_* defined in include/linux/irq.h
  *
  * Only one mapping per hardware interrupt is permitted. Returns a linux
- * virq number. The flags can be used to provide sense information to the
- * controller (typically extracted from the device-tree). If no information
- * is passed, the controller defaults will apply (for example, xics can only
- * do edge so flags are irrelevant for some pseries specific irqs).
- *
- * The device-tree generally contains the trigger info in an encoding that is
- * specific to a given type of controller. In that case, you can directly use
- * host->ops->trigger_xlate() to translate that.
- *
- * It is recommended that new PICs that don't have existing OF bindings chose
- * to use a representation of triggers identical to linux.
+ * virq number.
+ * If the sense/trigger is to be specified, set_irq_type() should be called
+ * on the number returned from that call.
  */
 extern unsigned int irq_create_mapping(struct irq_host *host,
-                                      irq_hw_number_t hwirq,
-                                      unsigned int flags);
+                                      irq_hw_number_t hwirq);
 
 
 /***
@@ -295,7 +283,7 @@ extern void irq_free_virt(unsigned int virq, unsigned int count);
  *
  * This function is identical to irq_create_mapping except that it takes
  * as input informations straight from the device-tree (typically the results
- * of the of_irq_map_*() functions
+ * of the of_irq_map_*() functions.
  */
 extern unsigned int irq_create_of_mapping(struct device_node *controller,
                                          u32 *intspec, unsigned int intsize);
index c6569516ba3536269d03a38c5a18ae4029eaf480..7307aa775671e415c69829cdbb5aaac35f8dca5d 100644 (file)
@@ -39,7 +39,6 @@
 #define read_barrier_depends()  do { } while(0)
 
 #define set_mb(var, value)     do { var = value; mb(); } while (0)
-#define set_wmb(var, value)    do { var = value; wmb(); } while (0)
 
 #ifdef __KERNEL__
 #ifdef CONFIG_SMP
index fb49c0c49ea1078fdea6df52b55dd09a71c302dd..738943584c017547b765998214cdecb4db235397 100644 (file)
@@ -33,7 +33,6 @@
 #define read_barrier_depends()  do { } while(0)
 
 #define set_mb(var, value)     do { var = value; mb(); } while (0)
-#define set_wmb(var, value)    do { var = value; wmb(); } while (0)
 
 #ifdef CONFIG_SMP
 #define smp_mb()       mb()
index 7ddaa05b98d8406b9988921b5275179083bd8e94..87689836394442804ce094da6358dd898c272081 100644 (file)
@@ -5,9 +5,18 @@
 
 #ifdef CONFIG_BUG
 
+static inline __attribute__((noreturn)) void __do_illegal_op(void)
+{
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
+       __builtin_trap();
+#else
+       asm volatile(".long 0");
+#endif
+}
+
 #define BUG() do { \
        printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
-       __builtin_trap(); \
+       __do_illegal_op(); \
 } while (0)
 
 #define HAVE_ARCH_BUG
index 12456cb2f882c10f95f77b97740c4bc32c532e4a..58c70acffc73cc91dc24c8532a3d320ace6d9708 100644 (file)
@@ -63,7 +63,7 @@ ccw_device_id_match(const struct ccw_device_id *array,
                return id;
        }
 
-       return 0;
+       return NULL;
 }
 
 /* The struct ccw device is our replacement for the globally accessible
index 2b16193063513003e49e7327e8e5add0690f48a9..28fdd6e2b8badf73baa7b53c502f1d2b12e30c51 100644 (file)
@@ -276,6 +276,8 @@ extern void wait_cons_dev(void);
 
 extern void clear_all_subchannels(void);
 
+extern void cio_reset_channel_paths(void);
+
 extern void css_schedule_reprobe(void);
 
 #endif
index 1802775568b9904a6c8b5eddd811b908d3f4f0a3..ffedf14f89f68077696c29cffe1df2dc43ec15db 100644 (file)
@@ -98,9 +98,10 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
 
        if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
                return -EFAULT;
-       asm volatile("   cs   %1,%4,0(%5)\n"
+       asm volatile("   sacf 256\n"
+                    "   cs   %1,%4,0(%5)\n"
                     "0: lr   %0,%1\n"
-                    "1:\n"
+                    "1: sacf 0\n"
 #ifndef __s390x__
                     ".section __ex_table,\"a\"\n"
                     "   .align 4\n"
index 65f4db627e7a21def4574b3afdccd90c539d6be2..3b566a5b3cc73e19d2487931283da12a0b008d65 100644 (file)
        __flags; \
        })
 
-#define raw_local_save_flags(x) \
-       __asm__ __volatile__("stosm 0(%1),0" : "=m" (x) : "a" (&x), "m" (x) )
-
-#define raw_local_irq_restore(x) \
-       __asm__ __volatile__("ssm   0(%0)" : : "a" (&x), "m" (x) : "memory")
+#define raw_local_save_flags(x)                                                        \
+do {                                                                           \
+       typecheck(unsigned long, x);                                            \
+       __asm__ __volatile__("stosm 0(%1),0" : "=m" (x) : "a" (&x), "m" (x) );  \
+} while (0)
+
+#define raw_local_irq_restore(x)                                               \
+do {                                                                           \
+       typecheck(unsigned long, x);                                            \
+       __asm__ __volatile__("ssm   0(%0)" : : "a" (&x), "m" (x) : "memory");   \
+} while (0)
 
 #define raw_irqs_disabled()            \
 ({                                     \
        unsigned long flags;            \
-       local_save_flags(flags);        \
+       raw_local_save_flags(flags);    \
        !((flags >> __FLAG_SHIFT) & 3); \
 })
 
index 3002fda89d33272e6b7f4f2c9f24e7091efa3f90..a78e853e0dd521097f978dc1db725450d2dea86f 100644 (file)
@@ -142,7 +142,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long vmaddr)
        pte_t *pte = pte_alloc_one_kernel(mm, vmaddr);
        if (pte)
                return virt_to_page(pte);
-       return 0;
+       return NULL;
 }
 
 static inline void pte_free_kernel(pte_t *pte)
index c5cbc4bd8414e12c571982cb5c5d0f85bec31406..5b71d37317239b94c38eef11eae89a34048b79d6 100644 (file)
@@ -199,15 +199,13 @@ unsigned long get_wchan(struct task_struct *p);
 /*
  * Give up the time slice of the virtual PU.
  */
-#ifndef __s390x__
-# define cpu_relax()   asm volatile ("diag 0,0,68" : : : "memory")
-#else /* __s390x__ */
-# define cpu_relax() \
-       do { \
-               if (MACHINE_HAS_DIAG44) \
-                       asm volatile ("diag 0,0,68" : : : "memory"); \
-       } while (0)
-#endif /* __s390x__ */
+static inline void cpu_relax(void)
+{
+       if (MACHINE_HAS_DIAG44)
+               asm volatile ("diag 0,0,68" : : : "memory");
+       else
+               barrier();
+}
 
 /*
  * Set PSW to specified value.
index da3fd4a7bb3257f75b0e6be92d7c13c1879b7c4d..19e31979309a14ce713333b540127cedefeb4ce9 100644 (file)
@@ -40,15 +40,16 @@ extern unsigned long machine_flags;
 #define MACHINE_IS_VM          (machine_flags & 1)
 #define MACHINE_IS_P390                (machine_flags & 4)
 #define MACHINE_HAS_MVPG       (machine_flags & 16)
-#define MACHINE_HAS_DIAG44     (machine_flags & 32)
 #define MACHINE_HAS_IDTE       (machine_flags & 128)
 
 #ifndef __s390x__
 #define MACHINE_HAS_IEEE       (machine_flags & 2)
 #define MACHINE_HAS_CSP                (machine_flags & 8)
+#define MACHINE_HAS_DIAG44     (1)
 #else /* __s390x__ */
 #define MACHINE_HAS_IEEE       (1)
 #define MACHINE_HAS_CSP                (1)
+#define MACHINE_HAS_DIAG44     (machine_flags & 32)
 #endif /* __s390x__ */
 
 
index 9ab186ffde23e2009511bb132cd96909df1a0457..16040048cd1b3498ba48761adb7daa11cddb6d76 100644 (file)
@@ -128,8 +128,13 @@ extern void account_system_vtime(struct task_struct *);
 
 #define nop() __asm__ __volatile__ ("nop")
 
-#define xchg(ptr,x) \
-  ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(void *)(ptr),sizeof(*(ptr))))
+#define xchg(ptr,x)                                                      \
+({                                                                       \
+       __typeof__(*(ptr)) __ret;                                         \
+       __ret = (__typeof__(*(ptr)))                                      \
+               __xchg((unsigned long)(x), (void *)(ptr),sizeof(*(ptr))); \
+       __ret;                                                            \
+})
 
 static inline unsigned long __xchg(unsigned long x, void * ptr, int size)
 {
@@ -299,7 +304,6 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
 
 
 #define set_mb(var, value)      do { var = value; mb(); } while (0)
-#define set_wmb(var, value)     do { var = value; wmb(); } while (0)
 
 #ifdef __s390x__
 
index 4848057dafe498e87da4b25c562a8b2d5017b8da..5d0332a4c2bdd0b8d737aea0f8fd5d4fa96e546b 100644 (file)
@@ -19,7 +19,7 @@ static inline cycles_t get_cycles(void)
 {
        cycles_t cycles;
 
-       __asm__("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc");
+       __asm__ __volatile__ ("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc");
        return cycles >> 2;
 }
 
@@ -27,7 +27,7 @@ static inline unsigned long long get_clock (void)
 {
        unsigned long long clk;
 
-       __asm__("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc");
+       __asm__ __volatile__ ("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc");
        return clk;
 }
 
index fa5bd2d8803e4d612abe73ba0c0de9011aa895cc..eeb0f48bb99ead4f5b8d71d92d22df7f7a1d0fbb 100644 (file)
@@ -9,6 +9,7 @@
 #define __ASM_SH_PROCESSOR_H
 #ifdef __KERNEL__
 
+#include <linux/compiler.h>
 #include <asm/page.h>
 #include <asm/types.h>
 #include <asm/cache.h>
@@ -263,7 +264,7 @@ extern unsigned long get_wchan(struct task_struct *p);
 #define KSTK_ESP(tsk)  ((tsk)->thread.sp)
 
 #define cpu_sleep()    __asm__ __volatile__ ("sleep" : : : "memory")
-#define cpu_relax()    do { } while (0)
+#define cpu_relax()    barrier()
 
 #endif /* __KERNEL__ */
 #endif /* __ASM_SH_PROCESSOR_H */
index ce2e60664a86750ec1c07e84bc4765b3eafa95e7..ad35ad4958f44df04d7abda10e132c92d707e8bd 100644 (file)
@@ -101,7 +101,6 @@ extern void __xchg_called_with_bad_pointer(void);
 #endif
 
 #define set_mb(var, value) do { xchg(&var, value); } while (0)
-#define set_wmb(var, value) do { var = value; wmb(); } while (0)
 
 /* Interrupt Control */
 static __inline__ void local_irq_enable(void)
index 1bf252dad8249e5d7f3078dde23f440729d59fad..eb2bee4b47b95e341389ad6cc48845945e0ad28f 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/cache.h>
 #include <asm/registers.h>
 #include <linux/threads.h>
+#include <linux/compiler.h>
 
 /*
  * Default implementation of macro that returns current
@@ -279,7 +280,7 @@ extern unsigned long get_wchan(struct task_struct *p);
 #define KSTK_EIP(tsk)  ((tsk)->thread.pc)
 #define KSTK_ESP(tsk)  ((tsk)->thread.sp)
 
-#define cpu_relax()    do { } while (0)
+#define cpu_relax()    barrier()
 
 #endif /* __ASSEMBLY__ */
 #endif /* __ASM_SH64_PROCESSOR_H */
index 7606f6e1f01ed9b6c253b245d3b1b599d73ff477..87ef6f1ad5a47f5e2df6f941439ff30d5a113eb8 100644 (file)
@@ -66,7 +66,6 @@ extern void __xchg_called_with_bad_pointer(void);
 
 #define set_rmb(var, value) do { xchg(&var, value); } while (0)
 #define set_mb(var, value) set_rmb(var, value)
-#define set_wmb(var, value) do { var = value; wmb(); } while (0)
 
 /* Interrupt Control */
 #ifndef HARD_CLI
index cb7dda1e5e91fe93a853d60b382e74e723ae155a..100c3eaf3c1fe439713ccedab0ea8c0e87459067 100644 (file)
@@ -199,7 +199,6 @@ static inline unsigned long getipl(void)
 #define wmb()  mb()
 #define read_barrier_depends() do { } while(0)
 #define set_mb(__var, __value)  do { __var = __value; mb(); } while(0)
-#define set_wmb(__var, __value) set_mb(__var, __value)
 #define smp_mb()       __asm__ __volatile__("":::"memory")
 #define smp_rmb()      __asm__ __volatile__("":::"memory")
 #define smp_wmb()      __asm__ __volatile__("":::"memory")
index c78d44bb195fcc832503adf7ee3325038a945f47..9284c3cb27ec3c41aaf0a2bbb4c14f28d87e1336 100644 (file)
@@ -4,7 +4,7 @@ ALTARCH := sparc
 ARCHDEF := defined __sparc__ && defined __arch64__
 ALTARCHDEF := defined __sparc__ && !defined __arch64__
 
-unifdef-y := fbio.h perfctr.h
+unifdef-y += fbio.h perfctr.h
 header-y += apb.h asi.h bbc.h bpp.h display7seg.h envctrl.h floppy.h   \
        ipc.h kdebug.h mostek.h openprom.h openpromio.h parport.h       \
        pconf.h psrcompat.h pstate.h reg.h uctx.h utrap.h watchdog.h
index 4ca68600c670413315b17bca7428778aa707fb95..a8b7432c9a70825f3b7d0c6e3b02f3772c24673c 100644 (file)
@@ -123,8 +123,6 @@ do {        __asm__ __volatile__("ba,pt     %%xcc, 1f\n\t" \
 #define read_barrier_depends()         do { } while(0)
 #define set_mb(__var, __value) \
        do { __var = __value; membar_storeload_storestore(); } while(0)
-#define set_wmb(__var, __value) \
-       do { __var = __value; wmb(); } while(0)
 
 #ifdef CONFIG_SMP
 #define smp_mb()       mb()
index 6965b66ccaed89ff828bd331bece3a5a5c6ceefa..979e3467f9afc14b2a9e1db9eb33ec400c693371 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/thread_info.h>
 #endif
 
+#include <linux/compiler.h>
 #include <asm/ptrace.h>
 #include <asm/entry.h>
 
@@ -106,7 +107,7 @@ unsigned long get_wchan (struct task_struct *p);
 #define KSTK_ESP(task) task_sp (task)
 
 
-#define cpu_relax()    ((void)0)
+#define cpu_relax()    barrier()
 
 
 #else /* __ASSEMBLY__ */
index 7091af4b786677ca176f08d01127cc6f69361185..da39916f10b0cc523eb2c0907f8579b5445fdc41 100644 (file)
@@ -68,7 +68,6 @@ static inline int irqs_disabled (void)
 #define read_barrier_depends() ((void)0)
 #define set_rmb(var, value)    do { xchg (&var, value); } while (0)
 #define set_mb(var, value)     set_rmb (var, value)
-#define set_wmb(var, value)    do { var = value; wmb (); } while (0)
 
 #define smp_mb()       mb ()
 #define smp_rmb()      rmb ()
index 6e1654f3098672e1061f471dcdcd1a4d0859b662..fbfb50136edbbe092c335b70a567d3cbe5f0814f 100644 (file)
@@ -1,8 +1,10 @@
 /*
  * Derived from include/asm-powerpc/iommu.h
  *
- * Copyright (C) 2006 Jon Mason <jdmason@us.ibm.com>, IBM Corporation
- * Copyright (C) 2006 Muli Ben-Yehuda <muli@il.ibm.com>, IBM Corporation
+ * Copyright (C) IBM Corporation, 2006
+ *
+ * Author: Jon Mason <jdmason@us.ibm.com>
+ * Author: Muli Ben-Yehuda <muli@il.ibm.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index f67f2873a9225281b98818102ce0cd1ba5cf45b2..6bf170bceae1b4a7d114305c340240670698a032 100644 (file)
@@ -240,7 +240,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
 #endif
 #define read_barrier_depends() do {} while(0)
 #define set_mb(var, value) do { (void) xchg(&var, value); } while (0)
-#define set_wmb(var, value) do { var = value; wmb(); } while (0)
 
 #define warn_if_not_ulong(x) do { unsigned long foo; (void) (&(x) == &foo); } while (0)
 
index ee51d31528d6a01e0aa72e7e531a2ba92c642ac6..53e9a68b33360bcf372d04b4586231d9b94311b1 100644 (file)
@@ -1,9 +1,11 @@
 /*
- * Copyright (C) 2006 Muli Ben-Yehuda <muli@il.ibm.com>, IBM Corporation
- * Copyright (C) 2006 Jon Mason <jdmason@us.ibm.com>, IBM Corporation
- *
  * This file is derived from asm-powerpc/tce.h.
  *
+ * Copyright (C) IBM Corporation, 2006
+ *
+ * Author: Muli Ben-Yehuda <muli@il.ibm.com>
+ * Author: Jon Mason <jdmason@us.ibm.com>
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
index d1d72ad36f08e4506460b7e1aeaeb6b1b75d337b..8b96e77c9d829c6c2bd92fbe2c15b1616ade29f2 100644 (file)
@@ -20,6 +20,7 @@
 #include <xtensa/config/tie.h>
 #include <xtensa/config/system.h>
 
+#include <linux/compiler.h>
 #include <asm/ptrace.h>
 #include <asm/types.h>
 #include <asm/coprocessor.h>
@@ -191,7 +192,7 @@ extern unsigned long get_wchan(struct task_struct *p);
 #define KSTK_EIP(tsk)          (task_pt_regs(tsk)->pc)
 #define KSTK_ESP(tsk)          (task_pt_regs(tsk)->areg[1])
 
-#define cpu_relax()  do { } while (0)
+#define cpu_relax()  barrier()
 
 /* Special register access. */
 
index f986170bd2a15416c5e6e94ec686f11fbb975c09..932bda92a21c392b609e67eb09608897d4259657 100644 (file)
@@ -99,7 +99,6 @@ static inline void disable_coprocessor(int i)
 #endif
 
 #define set_mb(var, value)     do { var = value; mb(); } while (0)
-#define set_wmb(var, value)    do { var = value; wmb(); } while (0)
 
 #if !defined (__ASSEMBLY__)
 
index a7e8cef73d1552589bb8f86b71dcf570b06bcd02..7520cc1ff9e2b9d3947f3cb1ace868b329394555 100644 (file)
@@ -11,7 +11,7 @@ enum blktrace_cat {
        BLK_TC_READ     = 1 << 0,       /* reads */
        BLK_TC_WRITE    = 1 << 1,       /* writes */
        BLK_TC_BARRIER  = 1 << 2,       /* barrier */
-       BLK_TC_SYNC     = 1 << 3,       /* barrier */
+       BLK_TC_SYNC     = 1 << 3,       /* sync IO */
        BLK_TC_QUEUE    = 1 << 4,       /* queueing/merging */
        BLK_TC_REQUEUE  = 1 << 5,       /* requeueing */
        BLK_TC_ISSUE    = 1 << 6,       /* issue */
@@ -19,6 +19,7 @@ enum blktrace_cat {
        BLK_TC_FS       = 1 << 8,       /* fs requests */
        BLK_TC_PC       = 1 << 9,       /* pc requests */
        BLK_TC_NOTIFY   = 1 << 10,      /* special message */
+       BLK_TC_AHEAD    = 1 << 11,      /* readahead */
 
        BLK_TC_END      = 1 << 15,      /* only 16-bits, reminder */
 };
@@ -147,7 +148,7 @@ static inline void blk_add_trace_rq(struct request_queue *q, struct request *rq,
                                    u32 what)
 {
        struct blk_trace *bt = q->blk_trace;
-       int rw = rq->flags & 0x07;
+       int rw = rq->flags & 0x03;
 
        if (likely(!bt))
                return;
index 22866fa2d9600675b702fbf90b004b00b117c1c8..1021f508d82cee1e2577582e100ce9f9abe259b4 100644 (file)
@@ -91,7 +91,7 @@ static inline void *alloc_remap(int nid, unsigned long size)
 }
 #endif
 
-extern unsigned long nr_kernel_pages;
+extern unsigned long __meminitdata nr_kernel_pages;
 extern unsigned long nr_all_pages;
 
 extern void *__init alloc_large_system_hash(const char *tablename,
index 251c41e3ddd5b870f3c05c1654ded90a02d95cff..268c5a4a2bd4d5611d85da425ed1f66ee5eed883 100644 (file)
@@ -18,6 +18,9 @@ struct completion {
 #define COMPLETION_INITIALIZER(work) \
        { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) }
 
+#define COMPLETION_INITIALIZER_ONSTACK(work) \
+       ({ init_completion(&work); work; })
+
 #define DECLARE_COMPLETION(work) \
        struct completion work = COMPLETION_INITIALIZER(work)
 
@@ -28,7 +31,7 @@ struct completion {
  */
 #ifdef CONFIG_LOCKDEP
 # define DECLARE_COMPLETION_ONSTACK(work) \
-       struct completion work = ({ init_completion(&work); work; })
+       struct completion work = COMPLETION_INITIALIZER_ONSTACK(work)
 #else
 # define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
 #endif
index f8e5587a0f92178cf3bd1604f4b4c7cc27cd3f68..25423f79bf9f95fbedc359de9aced4d4c99d1c23 100644 (file)
@@ -9,6 +9,7 @@
  * to achieve effects such as fast scrolling by changing the origin.
  */
 
+#include <linux/wait.h>
 #include <linux/vt.h>
 
 struct vt_struct;
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h
new file mode 100644 (file)
index 0000000..7e8b601
--- /dev/null
@@ -0,0 +1,119 @@
+/* delayacct.h - per-task delay accounting
+ *
+ * Copyright (C) Shailabh Nagar, IBM Corp. 2006
+ *
+ * This program is free software;  you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY;  without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+ * the GNU General Public License for more details.
+ *
+ */
+
+#ifndef _LINUX_DELAYACCT_H
+#define _LINUX_DELAYACCT_H
+
+#include <linux/sched.h>
+#include <linux/taskstats_kern.h>
+
+/*
+ * Per-task flags relevant to delay accounting
+ * maintained privately to avoid exhausting similar flags in sched.h:PF_*
+ * Used to set current->delays->flags
+ */
+#define DELAYACCT_PF_SWAPIN    0x00000001      /* I am doing a swapin */
+
+#ifdef CONFIG_TASK_DELAY_ACCT
+
+extern int delayacct_on;       /* Delay accounting turned on/off */
+extern kmem_cache_t *delayacct_cache;
+extern void delayacct_init(void);
+extern void __delayacct_tsk_init(struct task_struct *);
+extern void __delayacct_tsk_exit(struct task_struct *);
+extern void __delayacct_blkio_start(void);
+extern void __delayacct_blkio_end(void);
+extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *);
+extern __u64 __delayacct_blkio_ticks(struct task_struct *);
+
+static inline void delayacct_set_flag(int flag)
+{
+       if (current->delays)
+               current->delays->flags |= flag;
+}
+
+static inline void delayacct_clear_flag(int flag)
+{
+       if (current->delays)
+               current->delays->flags &= ~flag;
+}
+
+static inline void delayacct_tsk_init(struct task_struct *tsk)
+{
+       /* reinitialize in case parent's non-null pointer was dup'ed*/
+       tsk->delays = NULL;
+       if (unlikely(delayacct_on))
+               __delayacct_tsk_init(tsk);
+}
+
+static inline void delayacct_tsk_exit(struct task_struct *tsk)
+{
+       if (tsk->delays)
+               __delayacct_tsk_exit(tsk);
+}
+
+static inline void delayacct_blkio_start(void)
+{
+       if (current->delays)
+               __delayacct_blkio_start();
+}
+
+static inline void delayacct_blkio_end(void)
+{
+       if (current->delays)
+               __delayacct_blkio_end();
+}
+
+static inline int delayacct_add_tsk(struct taskstats *d,
+                                       struct task_struct *tsk)
+{
+       if (likely(!delayacct_on))
+               return -EINVAL;
+       if (!tsk->delays)
+               return 0;
+       return __delayacct_add_tsk(d, tsk);
+}
+
+static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk)
+{
+       if (tsk->delays)
+               return __delayacct_blkio_ticks(tsk);
+       return 0;
+}
+
+#else
+static inline void delayacct_set_flag(int flag)
+{}
+static inline void delayacct_clear_flag(int flag)
+{}
+static inline void delayacct_init(void)
+{}
+static inline void delayacct_tsk_init(struct task_struct *tsk)
+{}
+static inline void delayacct_tsk_exit(struct task_struct *tsk)
+{}
+static inline void delayacct_blkio_start(void)
+{}
+static inline void delayacct_blkio_end(void)
+{}
+static inline int delayacct_add_tsk(struct taskstats *d,
+                                       struct task_struct *tsk)
+{ return 0; }
+static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk)
+{ return 0; }
+#endif /* CONFIG_TASK_DELAY_ACCT */
+
+#endif
index 0cf0bea010fe2110417f98e83c3cbf60f94f2da5..9631dddae3486b337b628ce6f0a2986db2bc6172 100644 (file)
@@ -60,6 +60,16 @@ struct elf_prstatus
        long    pr_instr;               /* Current instruction */
 #endif
        elf_gregset_t pr_reg;   /* GP registers */
+#ifdef CONFIG_BINFMT_ELF_FDPIC
+       /* When using FDPIC, the loadmap addresses need to be communicated
+        * to GDB in order for GDB to do the necessary relocations.  The
+        * fields (below) used to communicate this information are placed
+        * immediately after ``pr_reg'', so that the loadmap addresses may
+        * be viewed as part of the register set if so desired.
+        */
+       unsigned long pr_exec_fdpic_loadmap;
+       unsigned long pr_interp_fdpic_loadmap;
+#endif
        int pr_fpvalid;         /* True if math co-processor being used.  */
 };
 
index ffefeeeeca937a6cb96d4ea7495853696e8ce65f..405f44e44e5d503c0785713ce0e715caee4fa91e 100644 (file)
@@ -377,7 +377,6 @@ struct fb_cursor {
 
 #include <linux/fs.h>
 #include <linux/init.h>
-#include <linux/tty.h>
 #include <linux/device.h>
 #include <linux/workqueue.h>
 #include <linux/notifier.h>
index 43aef9b230fdea43852a88a7d211372a0ea4e897..25610205c90d09e75ea827ae83ca0ebc9dc3445f 100644 (file)
 #define BLOCK_SIZE_BITS 10
 #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
 
+#define SEEK_SET       0       /* seek relative to beginning of file */
+#define SEEK_CUR       1       /* seek relative to current file position */
+#define SEEK_END       2       /* seek relative to end of file */
+
 /* And dynamically-tunable limits and defaults: */
 struct files_stat_struct {
        int nr_files;           /* read only */
index 4513f9e40937cd0d8383f89105934b258b6bc8fd..d5ebbb29aeaebc339fe893456bc2dba507f80453 100644 (file)
@@ -224,8 +224,6 @@ static __inline__ void debug_frame(const struct sk_buff *skb)
 int hdlc_open(struct net_device *dev);
 /* Must be called by hardware driver when HDLC device is being closed */
 void hdlc_close(struct net_device *dev);
-/* Called by hardware driver when DCD line level changes */
-void hdlc_set_carrier(int on, struct net_device *dev);
 
 /* May be used by hardware driver to gain control over HDLC device */
 static __inline__ void hdlc_proto_detach(hdlc_device *hdlc)
index 21338bb3441d6b9387e327e9ec208fdaab2ec391..9418519a55d16e936cf593e472e953d294f68ea7 100644 (file)
 #define I2C_DRIVERID_BT866     85      /* Conexant bt866 video encoder */
 #define I2C_DRIVERID_KS0127    86      /* Samsung ks0127 video decoder */
 #define I2C_DRIVERID_TLV320AIC23B 87   /* TI TLV320AIC23B audio codec  */
+#define I2C_DRIVERID_ISL1208   88      /* Intersil ISL1208 RTC         */
 
 #define I2C_DRIVERID_I2CDEV    900
 #define I2C_DRIVERID_ARP        902    /* SMBus ARP Client              */
index 526ddc8eecfbf899b67ad0587fcf573e152d9021..eb0628a7ecc637ec71e18714105ac814f679f718 100644 (file)
@@ -193,6 +193,8 @@ struct i2c_algorithm {
           to NULL. If an adapter algorithm can do SMBus access, set 
           smbus_xfer. If set to NULL, the SMBus protocol is simulated
           using common I2C messages */
+       /* master_xfer should return the number of messages successfully
+          processed, or a negative value on error */
        int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, 
                           int num);
        int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, 
index eef0876d8307b11b5678a25469043f26adc17ddd..383627ad328f383bfe07f78ddc77e09e37066d95 100644 (file)
@@ -23,8 +23,8 @@ struct vlan_collection;
 struct vlan_dev_info;
 struct hlist_node;
 
-#include <linux/proc_fs.h> /* for proc_dir_entry */
 #include <linux/netdevice.h>
+#include <linux/etherdevice.h>
 
 #define VLAN_HLEN      4               /* The additional bytes (on top of the Ethernet header)
                                         * that VLAN requires.
@@ -185,7 +185,8 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb,
                 * This allows the VLAN to have a different MAC than the underlying
                 * device, and still route correctly.
                 */
-               if (!memcmp(eth_hdr(skb)->h_dest, skb->dev->dev_addr, ETH_ALEN))
+               if (!compare_ether_addr(eth_hdr(skb)->h_dest,
+                                       skb->dev->dev_addr))
                        skb->pkt_type = PACKET_HOST;
                break;
        };
index 5612dfeeae5055c5305bb6512325b9a5ca98ad5e..d42c83399071fd61600a48eecbf67bc59c42d681 100644 (file)
@@ -97,7 +97,7 @@ extern struct resource iomem_resource;
 extern int request_resource(struct resource *root, struct resource *new);
 extern struct resource * ____request_resource(struct resource *root, struct resource *new);
 extern int release_resource(struct resource *new);
-extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new);
+extern int insert_resource(struct resource *parent, struct resource *new);
 extern int allocate_resource(struct resource *root, struct resource *new,
                             resource_size_t size, resource_size_t min,
                             resource_size_t max, resource_size_t align,
index 5c1ec1f84eab93eea32a8d173486ff2cbcd5036b..181c69cad4e3a45dca58bd6c50c2ae3d3e95f5b1 100644 (file)
@@ -33,6 +33,7 @@ extern const char linux_banner[];
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
 #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
+#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
 
 #define        KERN_EMERG      "<0>"   /* system is unusable                   */
 #define        KERN_ALERT      "<1>"   /* action must be taken immediately     */
index 7cce5dfa092f2a7bb2e6f401202dd5d6755ddff8..1c65e7a9f186cceee83a1e5e199db44b4260daf2 100644 (file)
@@ -28,7 +28,6 @@ struct task_struct *kthread_create(int (*threadfn)(void *data),
 
 void kthread_bind(struct task_struct *k, unsigned int cpu);
 int kthread_stop(struct task_struct *k);
-int kthread_stop_sem(struct task_struct *k, struct semaphore *s);
 int kthread_should_stop(void);
 
 #endif /* _LINUX_KTHREAD_H */
index 6b74adf5297f644f82531a5fbcbc55b5892d13f7..65a5b5ceda4947d1478bba79abbda826963d128e 100644 (file)
@@ -264,6 +264,17 @@ static inline void list_move_tail(struct list_head *list,
         list_add_tail(list, head);
 }
 
+/**
+ * list_is_last - tests whether @list is the last entry in list @head
+ * @list: the entry to test
+ * @head: the head of the list
+ */
+static inline int list_is_last(const struct list_head *list,
+                               const struct list_head *head)
+{
+       return list->next == head;
+}
+
 /**
  * list_empty - tests whether a list is empty
  * @head: the list to test.
index 316e0fb8d7b1f6533afe0afa5e89057f5afaed63..c040a8c969aa503d2904b88cb61921aac212496a 100644 (file)
@@ -120,7 +120,7 @@ struct lock_class {
  */
 struct lockdep_map {
        struct lock_class_key           *key;
-       struct lock_class               *class[MAX_LOCKDEP_SUBCLASSES];
+       struct lock_class               *class_cache;
        const char                      *name;
 };
 
index bbc93ae217e1c48390bb5352d6e76a59e5efb5d4..432b2fa249290343702eabfbc8c031d84a697e39 100644 (file)
@@ -89,4 +89,11 @@ extern spinlock_t rtc_lock;          /* serialize CMOS RAM access */
 # define RTC_VRT 0x80          /* valid RAM and time */
 /**********************************************************************/
 
+#ifndef ARCH_RTC_LOCATION      /* Override by <asm/mc146818rtc.h>? */
+
+#define RTC_IO_EXTENT  0x8
+#define RTC_IOMAPPED   1       /* Default to I/O mapping. */
+
+#endif /* ARCH_RTC_LOCATION */
+
 #endif /* _MC146818RTC_H */
index d06c74fb8c262a13b4e5231ae41b489ce674ba8f..0dfb794c52d3b015bb749559202b35f65222203c 100644 (file)
@@ -362,10 +362,8 @@ int is_module_address(unsigned long addr);
 
 /* Returns module and fills in value, defined and namebuf, or NULL if
    symnum out of range. */
-struct module *module_get_kallsym(unsigned int symnum,
-                                 unsigned long *value,
-                                 char *type,
-                                 char namebuf[128]);
+struct module *module_get_kallsym(unsigned int symnum, unsigned long *value,
+                               char *type, char *name, size_t namelen);
 
 /* Look for this name: can be of form module:name. */
 unsigned long module_kallsyms_lookup_name(const char *name);
@@ -535,8 +533,8 @@ static inline const char *module_address_lookup(unsigned long addr,
 
 static inline struct module *module_get_kallsym(unsigned int symnum,
                                                unsigned long *value,
-                                               char *type,
-                                               char namebuf[128])
+                                               char *type, char *name,
+                                               size_t namelen)
 {
        return NULL;
 }
index 58cb3d3d44b472a4aec9aa262b695e889abb4c92..45511a5918d3edf6be65188c3b1c64ab650da1e8 100644 (file)
@@ -11,7 +11,7 @@ struct open_intent {
        struct file *file;
 };
 
-enum { MAX_NESTED_LINKS = 5 };
+enum { MAX_NESTED_LINKS = 8 };
 
 struct nameidata {
        struct dentry   *dentry;
index 85f99f60deea46c3f5af0f24f9c3a806b51dfd7c..76cc099c8580fa06551f98f0ec2635f2c2a85496 100644 (file)
@@ -549,6 +549,7 @@ struct packet_type {
                                         struct net_device *);
        struct sk_buff          *(*gso_segment)(struct sk_buff *skb,
                                                int features);
+       int                     (*gso_send_check)(struct sk_buff *skb);
        void                    *af_packet_priv;
        struct list_head        list;
 };
@@ -1001,13 +1002,14 @@ static inline int net_gso_ok(int features, int gso_type)
 
 static inline int skb_gso_ok(struct sk_buff *skb, int features)
 {
-       return net_gso_ok(features, skb_shinfo(skb)->gso_size ?
-                                   skb_shinfo(skb)->gso_type : 0);
+       return net_gso_ok(features, skb_shinfo(skb)->gso_type);
 }
 
 static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
 {
-       return !skb_gso_ok(skb, dev->features);
+       return skb_is_gso(skb) &&
+              (!skb_gso_ok(skb, dev->features) ||
+               unlikely(skb->ip_summed != CHECKSUM_HW));
 }
 
 #endif /* __KERNEL__ */
index 5f681d534295ddae8e5a9c726fbdd8e1f3a56f36..db05182ca0e87f122adc3b4c1dbff6622c6c5fbb 100644 (file)
@@ -157,6 +157,12 @@ enum nfs_opnum4 {
        OP_ILLEGAL = 10044,
 };
 
+/*Defining first and last NFS4 operations implemented.
+Needs to be updated if more operations are defined in future.*/
+
+#define FIRST_NFS4_OP  OP_ACCESS
+#define LAST_NFS4_OP   OP_RELEASE_LOCKOWNER
+
 enum nfsstat4 {
        NFS4_OK = 0,
        NFS4ERR_PERM = 1,
index b6f1e0cda4f215cd38422564bc7dd0443d0c0601..28a82fdd922f4d676a697cda557c2540a65a2b28 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef LINUX_NFSD_STATS_H
 #define LINUX_NFSD_STATS_H
 
+#include <linux/nfs4.h>
+
 struct nfsd_stats {
        unsigned int    rchits;         /* repcache hits */
        unsigned int    rcmisses;       /* repcache hits */
@@ -27,6 +29,10 @@ struct nfsd_stats {
        unsigned int    ra_size;        /* size of ra cache */
        unsigned int    ra_depth[11];   /* number of times ra entry was found that deep
                                         * in the cache (10percentiles). [10] = not found */
+#ifdef CONFIG_NFSD_V4
+       unsigned int    nfs4_opcount[LAST_NFS4_OP + 1]; /* count of individual nfsv4 operations */
+#endif
+
 };
 
 /* thread usage wraps very million seconds (approx one fortnight) */
index 135742cfada54c27271b8c7f792446d3c0cb6aa4..7da0cf3702ee05692f1d65fea8a8ad7344106b97 100644 (file)
@@ -25,8 +25,6 @@ struct nsc_gpio_ops {
        void    (*gpio_dump)    (struct nsc_gpio_ops *amp, unsigned iminor);
        int     (*gpio_get)     (unsigned iminor);
        void    (*gpio_set)     (unsigned iminor, int state);
-       void    (*gpio_set_high)(unsigned iminor);
-       void    (*gpio_set_low) (unsigned iminor);
        void    (*gpio_change)  (unsigned iminor);
        int     (*gpio_current) (unsigned iminor);
        struct device*  dev;    /* for dev_dbg() support, set in init  */
index 983fca251b25c67bfc23c738d282eb09a411602b..8565b81d7fbcd9b440c88e1a6fdaabb7d99d1b67 100644 (file)
@@ -161,6 +161,7 @@ struct pci_dev {
        unsigned int    is_enabled:1;   /* pci_enable_device has been called */
        unsigned int    is_busmaster:1; /* device is busmaster */
        unsigned int    no_msi:1;       /* device may not use msi */
+       unsigned int    no_d1d2:1;   /* only allow d0 or d3 */
        unsigned int    block_ucfg_access:1;    /* userspace config space access is blocked */
        unsigned int    broken_parity_status:1; /* Device generates false positive parity */
        unsigned int    msi_enabled:1;
index 6bce4a2403643058bcc35649654622af2ba65966..96930cb5927cddbf04852baca5c7aed50afd04ac 100644 (file)
 #define  PCI_ERR_CAP_ECRC_CHKE 0x00000100      /* ECRC Check Enable */
 #define PCI_ERR_HEADER_LOG     28      /* Header Log Register (16 bytes) */
 #define PCI_ERR_ROOT_COMMAND   44      /* Root Error Command */
+/* Correctable Err Reporting Enable */
+#define PCI_ERR_ROOT_CMD_COR_EN                0x00000001
+/* Non-fatal Err Reporting Enable */
+#define PCI_ERR_ROOT_CMD_NONFATAL_EN   0x00000002
+/* Fatal Err Reporting Enable */
+#define PCI_ERR_ROOT_CMD_FATAL_EN      0x00000004
 #define PCI_ERR_ROOT_STATUS    48
+#define PCI_ERR_ROOT_COR_RCV           0x00000001      /* ERR_COR Received */
+/* Multi ERR_COR Received */
+#define PCI_ERR_ROOT_MULTI_COR_RCV     0x00000002
+/* ERR_FATAL/NONFATAL Recevied */
+#define PCI_ERR_ROOT_UNCOR_RCV         0x00000004
+/* Multi ERR_FATAL/NONFATAL Recevied */
+#define PCI_ERR_ROOT_MULTI_UNCOR_RCV   0x00000008
+#define PCI_ERR_ROOT_FIRST_FATAL       0x00000010      /* First Fatal */
+#define PCI_ERR_ROOT_NONFATAL_RCV      0x00000020      /* Non-Fatal Received */
+#define PCI_ERR_ROOT_FATAL_RCV         0x00000040      /* Fatal Received */
 #define PCI_ERR_ROOT_COR_SRC   52
 #define PCI_ERR_ROOT_SRC       54
 
index 78027c533b94678fce8b685da41dc11fda656234..514729a446888e21dee4289db2ea4e71f80f6eaa 100644 (file)
@@ -14,11 +14,6 @@ extern int pm_active;
 struct pm_dev __deprecated *
 pm_register(pm_dev_t type, unsigned long id, pm_callback callback);
 
-/*
- * Unregister all devices with matching callback
- */
-void __deprecated pm_unregister_all(pm_callback callback);
-
 /*
  * Send a request to all devices
  */
@@ -35,8 +30,6 @@ static inline struct pm_dev *pm_register(pm_dev_t type,
        return NULL;
 }
 
-static inline void pm_unregister_all(pm_callback callback) {}
-
 static inline int pm_send_all(pm_request_t rqst, void *data)
 {
        return 0;
index c1e0ac55bab5c37956117280af7d2c428da063a2..d28890295852ce4f9be9f6bf0c6529f7b81041e6 100644 (file)
@@ -148,9 +148,10 @@ struct mddev_s
 
        struct mdk_thread_s             *thread;        /* management thread */
        struct mdk_thread_s             *sync_thread;   /* doing resync or reconstruct */
-       sector_t                        curr_resync;    /* blocks scheduled */
+       sector_t                        curr_resync;    /* last block scheduled */
        unsigned long                   resync_mark;    /* a recent timestamp */
        sector_t                        resync_mark_cnt;/* blocks written at resync_mark */
+       sector_t                        curr_mark_cnt; /* blocks scheduled now */
 
        sector_t                        resync_max_sectors; /* may be set by personality */
 
index ea4bc9d13735bdc3c71ea42952461c3ac3343e6a..ed241aad7c17a8c8375bce2728bca6c7018759fb 100644 (file)
@@ -2,6 +2,8 @@
 #define _ROOT_DEV_H_
 
 #include <linux/major.h>
+#include <linux/types.h>
+#include <linux/kdev_t.h>
 
 enum {
        Root_NFS = MKDEV(UNNAMED_MAJOR, 255),
index 658afb37c3f51456766ffb10e02a336462189ec2..7b524b4109a039a5cf065d60af824fa4d2fb0ff0 100644 (file)
@@ -61,12 +61,25 @@ extern void downgrade_write(struct rw_semaphore *sem);
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
 /*
- * nested locking:
+ * nested locking. NOTE: rwsems are not allowed to recurse
+ * (which occurs if the same task tries to acquire the same
+ * lock instance multiple times), but multiple locks of the
+ * same lock class might be taken, if the order of the locks
+ * is always the same. This ordering rule can be expressed
+ * to lockdep via the _nested() APIs, but enumerating the
+ * subclasses that are used. (If the nesting relationship is
+ * static then another method for expressing nested locking is
+ * the explicit definition of lock class keys and the use of
+ * lockdep_set_class() at lock initialization time.
+ * See Documentation/lockdep-design.txt for more details.)
  */
 extern void down_read_nested(struct rw_semaphore *sem, int subclass);
 extern void down_write_nested(struct rw_semaphore *sem, int subclass);
 /*
- * Take/release a lock when not the owner will release it:
+ * Take/release a lock when not the owner will release it.
+ *
+ * [ This API should be avoided as much as possible - the
+ *   proper abstraction for this case is completions. ]
  */
 extern void down_read_non_owner(struct rw_semaphore *sem);
 extern void up_read_non_owner(struct rw_semaphore *sem);
index 1c876e27ff936dfe375694bc3cb6b812f1ef33a2..6afa72e080cb7665bc4be600db1b4fe382460ccd 100644 (file)
@@ -463,6 +463,10 @@ struct signal_struct {
 #ifdef CONFIG_BSD_PROCESS_ACCT
        struct pacct_struct pacct;      /* per-process accounting information */
 #endif
+#ifdef CONFIG_TASKSTATS
+       spinlock_t stats_lock;
+       struct taskstats *stats;
+#endif
 };
 
 /* Context switch must be unlocked if interrupts are to be enabled */
@@ -537,7 +541,7 @@ extern struct user_struct root_user;
 struct backing_dev_info;
 struct reclaim_state;
 
-#ifdef CONFIG_SCHEDSTATS
+#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
 struct sched_info {
        /* cumulative counters */
        unsigned long   cpu_time,       /* time spent on the cpu */
@@ -548,9 +552,53 @@ struct sched_info {
        unsigned long   last_arrival,   /* when we last ran on a cpu */
                        last_queued;    /* when we were last queued to run */
 };
+#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */
 
+#ifdef CONFIG_SCHEDSTATS
 extern struct file_operations proc_schedstat_operations;
+#endif /* CONFIG_SCHEDSTATS */
+
+#ifdef CONFIG_TASK_DELAY_ACCT
+struct task_delay_info {
+       spinlock_t      lock;
+       unsigned int    flags;  /* Private per-task flags */
+
+       /* For each stat XXX, add following, aligned appropriately
+        *
+        * struct timespec XXX_start, XXX_end;
+        * u64 XXX_delay;
+        * u32 XXX_count;
+        *
+        * Atomicity of updates to XXX_delay, XXX_count protected by
+        * single lock above (split into XXX_lock if contention is an issue).
+        */
+
+       /*
+        * XXX_count is incremented on every XXX operation, the delay
+        * associated with the operation is added to XXX_delay.
+        * XXX_delay contains the accumulated delay time in nanoseconds.
+        */
+       struct timespec blkio_start, blkio_end; /* Shared by blkio, swapin */
+       u64 blkio_delay;        /* wait for sync block io completion */
+       u64 swapin_delay;       /* wait for swapin block io completion */
+       u32 blkio_count;        /* total count of the number of sync block */
+                               /* io operations performed */
+       u32 swapin_count;       /* total count of the number of swapin block */
+                               /* io operations performed */
+};
+#endif /* CONFIG_TASK_DELAY_ACCT */
+
+static inline int sched_info_on(void)
+{
+#ifdef CONFIG_SCHEDSTATS
+       return 1;
+#elif defined(CONFIG_TASK_DELAY_ACCT)
+       extern int delayacct_on;
+       return delayacct_on;
+#else
+       return 0;
 #endif
+}
 
 enum idle_type
 {
@@ -747,7 +795,7 @@ struct task_struct {
        cpumask_t cpus_allowed;
        unsigned int time_slice, first_time_slice;
 
-#ifdef CONFIG_SCHEDSTATS
+#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
        struct sched_info sched_info;
 #endif
 
@@ -945,6 +993,10 @@ struct task_struct {
         * cache last used pipe for splice
         */
        struct pipe_inode_info *splice_pipe;
+#ifdef CONFIG_TASK_DELAY_ACCT
+       spinlock_t delays_lock;
+       struct task_delay_info *delays;
+#endif
 };
 
 static inline pid_t process_group(struct task_struct *tsk)
index 058cba70818a57654dc1fc0534fce9ecf0877a9b..86501a3de2ac1d771c9b32958ca5b3fdf8a99dee 100644 (file)
@@ -227,6 +227,7 @@ struct uart_port {
 #define UPIO_MEM               (2)
 #define UPIO_MEM32             (3)
 #define UPIO_AU                        (4)                     /* Au1x00 type IO */
+#define UPIO_TSI               (5)                     /* Tsi108/109 type IO */
 
        unsigned int            read_status_mask;       /* driver specific */
        unsigned int            ignore_status_mask;     /* driver specific */
index 3597b4f14389b2dbb4fef37552367266fad5d016..0bf31b83578caa0f4f8f66b9a3dfd5a292f49a3d 100644 (file)
@@ -1455,5 +1455,10 @@ static inline void skb_init_secmark(struct sk_buff *skb)
 { }
 #endif
 
+static inline int skb_is_gso(const struct sk_buff *skb)
+{
+       return skb_shinfo(skb)->gso_size;
+}
+
 #endif /* __KERNEL__ */
 #endif /* _LINUX_SKBUFF_H */
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h
new file mode 100644 (file)
index 0000000..f1cb6cd
--- /dev/null
@@ -0,0 +1,137 @@
+/* taskstats.h - exporting per-task statistics
+ *
+ * Copyright (C) Shailabh Nagar, IBM Corp. 2006
+ *           (C) Balbir Singh,   IBM Corp. 2006
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2.1 of the GNU Lesser General Public License
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef _LINUX_TASKSTATS_H
+#define _LINUX_TASKSTATS_H
+
+/* Format for per-task data returned to userland when
+ *     - a task exits
+ *     - listener requests stats for a task
+ *
+ * The struct is versioned. Newer versions should only add fields to
+ * the bottom of the struct to maintain backward compatibility.
+ *
+ *
+ * To add new fields
+ *     a) bump up TASKSTATS_VERSION
+ *     b) add comment indicating new version number at end of struct
+ *     c) add new fields after version comment; maintain 64-bit alignment
+ */
+
+#define TASKSTATS_VERSION      1
+
+struct taskstats {
+
+       /* Version 1 */
+       __u16   version;
+       __u16   padding[3];     /* Userspace should not interpret the padding
+                                * field which can be replaced by useful
+                                * fields if struct taskstats is extended.
+                                */
+
+       /* Delay accounting fields start
+        *
+        * All values, until comment "Delay accounting fields end" are
+        * available only if delay accounting is enabled, even though the last
+        * few fields are not delays
+        *
+        * xxx_count is the number of delay values recorded
+        * xxx_delay_total is the corresponding cumulative delay in nanoseconds
+        *
+        * xxx_delay_total wraps around to zero on overflow
+        * xxx_count incremented regardless of overflow
+        */
+
+       /* Delay waiting for cpu, while runnable
+        * count, delay_total NOT updated atomically
+        */
+       __u64   cpu_count;
+       __u64   cpu_delay_total;
+
+       /* Following four fields atomically updated using task->delays->lock */
+
+       /* Delay waiting for synchronous block I/O to complete
+        * does not account for delays in I/O submission
+        */
+       __u64   blkio_count;
+       __u64   blkio_delay_total;
+
+       /* Delay waiting for page fault I/O (swap in only) */
+       __u64   swapin_count;
+       __u64   swapin_delay_total;
+
+       /* cpu "wall-clock" running time
+        * On some architectures, value will adjust for cpu time stolen
+        * from the kernel in involuntary waits due to virtualization.
+        * Value is cumulative, in nanoseconds, without a corresponding count
+        * and wraps around to zero silently on overflow
+        */
+       __u64   cpu_run_real_total;
+
+       /* cpu "virtual" running time
+        * Uses time intervals seen by the kernel i.e. no adjustment
+        * for kernel's involuntary waits due to virtualization.
+        * Value is cumulative, in nanoseconds, without a corresponding count
+        * and wraps around to zero silently on overflow
+        */
+       __u64   cpu_run_virtual_total;
+       /* Delay accounting fields end */
+       /* version 1 ends here */
+};
+
+
+/*
+ * Commands sent from userspace
+ * Not versioned. New commands should only be inserted at the enum's end
+ * prior to __TASKSTATS_CMD_MAX
+ */
+
+enum {
+       TASKSTATS_CMD_UNSPEC = 0,       /* Reserved */
+       TASKSTATS_CMD_GET,              /* user->kernel request/get-response */
+       TASKSTATS_CMD_NEW,              /* kernel->user event */
+       __TASKSTATS_CMD_MAX,
+};
+
+#define TASKSTATS_CMD_MAX (__TASKSTATS_CMD_MAX - 1)
+
+enum {
+       TASKSTATS_TYPE_UNSPEC = 0,      /* Reserved */
+       TASKSTATS_TYPE_PID,             /* Process id */
+       TASKSTATS_TYPE_TGID,            /* Thread group id */
+       TASKSTATS_TYPE_STATS,           /* taskstats structure */
+       TASKSTATS_TYPE_AGGR_PID,        /* contains pid + stats */
+       TASKSTATS_TYPE_AGGR_TGID,       /* contains tgid + stats */
+       __TASKSTATS_TYPE_MAX,
+};
+
+#define TASKSTATS_TYPE_MAX (__TASKSTATS_TYPE_MAX - 1)
+
+enum {
+       TASKSTATS_CMD_ATTR_UNSPEC = 0,
+       TASKSTATS_CMD_ATTR_PID,
+       TASKSTATS_CMD_ATTR_TGID,
+       TASKSTATS_CMD_ATTR_REGISTER_CPUMASK,
+       TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK,
+       __TASKSTATS_CMD_ATTR_MAX,
+};
+
+#define TASKSTATS_CMD_ATTR_MAX (__TASKSTATS_CMD_ATTR_MAX - 1)
+
+/* NETLINK_GENERIC related info */
+
+#define TASKSTATS_GENL_NAME    "TASKSTATS"
+#define TASKSTATS_GENL_VERSION 0x1
+
+#endif /* _LINUX_TASKSTATS_H */
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h
new file mode 100644 (file)
index 0000000..16894b7
--- /dev/null
@@ -0,0 +1,89 @@
+/* taskstats_kern.h - kernel header for per-task statistics interface
+ *
+ * Copyright (C) Shailabh Nagar, IBM Corp. 2006
+ *           (C) Balbir Singh,   IBM Corp. 2006
+ */
+
+#ifndef _LINUX_TASKSTATS_KERN_H
+#define _LINUX_TASKSTATS_KERN_H
+
+#include <linux/taskstats.h>
+#include <linux/sched.h>
+#include <net/genetlink.h>
+
+#ifdef CONFIG_TASKSTATS
+extern kmem_cache_t *taskstats_cache;
+extern struct mutex taskstats_exit_mutex;
+
+static inline void taskstats_exit_free(struct taskstats *tidstats)
+{
+       if (tidstats)
+               kmem_cache_free(taskstats_cache, tidstats);
+}
+
+static inline void taskstats_tgid_init(struct signal_struct *sig)
+{
+       spin_lock_init(&sig->stats_lock);
+       sig->stats = NULL;
+}
+
+static inline void taskstats_tgid_alloc(struct signal_struct *sig)
+{
+       struct taskstats *stats;
+       unsigned long flags;
+
+       stats = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL);
+       if (!stats)
+               return;
+
+       spin_lock_irqsave(&sig->stats_lock, flags);
+       if (!sig->stats) {
+               sig->stats = stats;
+               stats = NULL;
+       }
+       spin_unlock_irqrestore(&sig->stats_lock, flags);
+
+       if (stats)
+               kmem_cache_free(taskstats_cache, stats);
+}
+
+static inline void taskstats_tgid_free(struct signal_struct *sig)
+{
+       struct taskstats *stats = NULL;
+       unsigned long flags;
+
+       spin_lock_irqsave(&sig->stats_lock, flags);
+       if (sig->stats) {
+               stats = sig->stats;
+               sig->stats = NULL;
+       }
+       spin_unlock_irqrestore(&sig->stats_lock, flags);
+       if (stats)
+               kmem_cache_free(taskstats_cache, stats);
+}
+
+extern void taskstats_exit_alloc(struct taskstats **, unsigned int *);
+extern void taskstats_exit_send(struct task_struct *, struct taskstats *, int, unsigned int);
+extern void taskstats_init_early(void);
+extern void taskstats_tgid_alloc(struct signal_struct *);
+#else
+static inline void taskstats_exit_alloc(struct taskstats **ptidstats, unsigned int *mycpu)
+{}
+static inline void taskstats_exit_free(struct taskstats *ptidstats)
+{}
+static inline void taskstats_exit_send(struct task_struct *tsk,
+                                      struct taskstats *tidstats,
+                                      int group_dead, unsigned int cpu)
+{}
+static inline void taskstats_tgid_init(struct signal_struct *sig)
+{}
+static inline void taskstats_tgid_alloc(struct signal_struct *sig)
+{}
+static inline void taskstats_tgid_free(struct signal_struct *sig)
+{}
+static inline void taskstats_init_early(void)
+{}
+#endif /* CONFIG_TASKSTATS */
+
+#endif
+
index c05f8bb9a323d575853350cc0b8b5e9baf1d939d..a5b739967b74f46f745526952b1c947c236cf75a 100644 (file)
@@ -70,6 +70,18 @@ extern unsigned long mktime(const unsigned int year, const unsigned int mon,
 
 extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec);
 
+/*
+ * sub = lhs - rhs, in normalized form
+ */
+static inline struct timespec timespec_sub(struct timespec lhs,
+                                               struct timespec rhs)
+{
+       struct timespec ts_delta;
+       set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec,
+                               lhs.tv_nsec - rhs.tv_nsec);
+       return ts_delta;
+}
+
 /*
  * Returns true if the timespec is norm, false if denorm:
  */
index b3b807e4b050031cf5a2e0e4dad2e1e4b31503a3..e421d5e34818cc30ea9af8707581a44129dcb80e 100644 (file)
@@ -5,16 +5,6 @@
  * 'tty.h' defines some structures used by tty_io.c and some defines.
  */
 
-/*
- * These constants are also useful for user-level apps (e.g., VC
- * resizing).
- */
-#define MIN_NR_CONSOLES 1       /* must be at least 1 */
-#define MAX_NR_CONSOLES        63      /* serial lines start at 64 */
-#define MAX_NR_USER_CONSOLES 63        /* must be root to allocate above this */
-               /* Note: the ioctl VT_GETSTATE does not work for
-                  consoles 16 and higher (since it returns a short) */
-
 #ifdef __KERNEL__
 #include <linux/fs.h>
 #include <linux/major.h>
@@ -22,7 +12,6 @@
 #include <linux/workqueue.h>
 #include <linux/tty_driver.h>
 #include <linux/tty_ldisc.h>
-#include <linux/screen_info.h>
 #include <linux/mutex.h>
 
 #include <asm/system.h>
@@ -270,7 +259,6 @@ struct tty_struct {
 extern void tty_write_flush(struct tty_struct *);
 
 extern struct termios tty_std_termios;
-extern int fg_console, last_console, want_console;
 
 extern int kmsg_redirect;
 
index 8dead32e7ebf1065b1268f6b2d25ad781f35bd15..c944e8f06a4a2a3ce7519f82565c1780fc359d57 100644 (file)
@@ -48,7 +48,7 @@ struct ep_device;
  * @urb_list: urbs queued to this endpoint; maintained by usbcore
  * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH)
  *     with one or more transfer descriptors (TDs) per urb
- * @kobj: kobject for sysfs info
+ * @ep_dev: ep_device for sysfs info
  * @extra: descriptors following this endpoint in the configuration
  * @extralen: how many bytes of "extra" are valid
  *
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
new file mode 100644 (file)
index 0000000..91c983e
--- /dev/null
@@ -0,0 +1,300 @@
+/*
+ * USB Serial Converter stuff
+ *
+ *     Copyright (C) 1999 - 2005
+ *         Greg Kroah-Hartman (greg@kroah.com)
+ *
+ *     This program is free software; you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation; version 2 of the License.
+ *
+ */
+
+
+#ifndef __LINUX_USB_SERIAL_H
+#define __LINUX_USB_SERIAL_H
+
+#include <linux/kref.h>
+#include <linux/mutex.h>
+
+#define SERIAL_TTY_MAJOR       188     /* Nice legal number now */
+#define SERIAL_TTY_MINORS      255     /* loads of devices :) */
+
+#define MAX_NUM_PORTS          8       /* The maximum number of ports one device can grab at once */
+
+/* parity check flag */
+#define RELEVANT_IFLAG(iflag)  (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
+
+/**
+ * usb_serial_port: structure for the specific ports of a device.
+ * @serial: pointer back to the struct usb_serial owner of this port.
+ * @tty: pointer to the corresponding tty for this port.
+ * @lock: spinlock to grab when updating portions of this structure.
+ * @mutex: mutex used to synchronize serial_open() and serial_close()
+ *     access for this port.
+ * @number: the number of the port (the minor number).
+ * @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
+ * @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
+ * @interrupt_in_endpointAddress: endpoint address for the interrupt in pipe
+ *     for this port.
+ * @interrupt_out_buffer: pointer to the interrupt out buffer for this port.
+ * @interrupt_out_size: the size of the interrupt_out_buffer, in bytes.
+ * @interrupt_out_urb: pointer to the interrupt out struct urb for this port.
+ * @interrupt_out_endpointAddress: endpoint address for the interrupt out pipe
+ *     for this port.
+ * @bulk_in_buffer: pointer to the bulk in buffer for this port.
+ * @read_urb: pointer to the bulk in struct urb for this port.
+ * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this
+ *     port.
+ * @bulk_out_buffer: pointer to the bulk out buffer for this port.
+ * @bulk_out_size: the size of the bulk_out_buffer, in bytes.
+ * @write_urb: pointer to the bulk out struct urb for this port.
+ * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this
+ *     port.
+ * @write_wait: a wait_queue_head_t used by the port.
+ * @work: work queue entry for the line discipline waking up.
+ * @open_count: number of times this port has been opened.
+ *
+ * This structure is used by the usb-serial core and drivers for the specific
+ * ports of a device.
+ */
+struct usb_serial_port {
+       struct usb_serial *     serial;
+       struct tty_struct *     tty;
+       spinlock_t              lock;
+       struct mutex            mutex;
+       unsigned char           number;
+
+       unsigned char *         interrupt_in_buffer;
+       struct urb *            interrupt_in_urb;
+       __u8                    interrupt_in_endpointAddress;
+
+       unsigned char *         interrupt_out_buffer;
+       int                     interrupt_out_size;
+       struct urb *            interrupt_out_urb;
+       __u8                    interrupt_out_endpointAddress;
+
+       unsigned char *         bulk_in_buffer;
+       int                     bulk_in_size;
+       struct urb *            read_urb;
+       __u8                    bulk_in_endpointAddress;
+
+       unsigned char *         bulk_out_buffer;
+       int                     bulk_out_size;
+       struct urb *            write_urb;
+       int                     write_urb_busy;
+       __u8                    bulk_out_endpointAddress;
+
+       wait_queue_head_t       write_wait;
+       struct work_struct      work;
+       int                     open_count;
+       struct device           dev;
+};
+#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
+
+/* get and set the port private data pointer helper functions */
+static inline void *usb_get_serial_port_data (struct usb_serial_port *port)
+{
+       return dev_get_drvdata(&port->dev);
+}
+
+static inline void usb_set_serial_port_data (struct usb_serial_port *port, void *data)
+{
+       dev_set_drvdata(&port->dev, data);
+}
+
+/**
+ * usb_serial - structure used by the usb-serial core for a device
+ * @dev: pointer to the struct usb_device for this device
+ * @type: pointer to the struct usb_serial_driver for this device
+ * @interface: pointer to the struct usb_interface for this device
+ * @minor: the starting minor number for this device
+ * @num_ports: the number of ports this device has
+ * @num_interrupt_in: number of interrupt in endpoints we have
+ * @num_interrupt_out: number of interrupt out endpoints we have
+ * @num_bulk_in: number of bulk in endpoints we have
+ * @num_bulk_out: number of bulk out endpoints we have
+ * @port: array of struct usb_serial_port structures for the different ports.
+ * @private: place to put any driver specific information that is needed.  The
+ *     usb-serial driver is required to manage this data, the usb-serial core
+ *     will not touch this.  Use usb_get_serial_data() and
+ *     usb_set_serial_data() to access this.
+ */
+struct usb_serial {
+       struct usb_device *             dev;
+       struct usb_serial_driver *      type;
+       struct usb_interface *          interface;
+       unsigned char                   minor;
+       unsigned char                   num_ports;
+       unsigned char                   num_port_pointers;
+       char                            num_interrupt_in;
+       char                            num_interrupt_out;
+       char                            num_bulk_in;
+       char                            num_bulk_out;
+       struct usb_serial_port *        port[MAX_NUM_PORTS];
+       struct kref                     kref;
+       void *                          private;
+};
+#define to_usb_serial(d) container_of(d, struct usb_serial, kref)
+
+#define NUM_DONT_CARE  (-1)
+
+/* get and set the serial private data pointer helper functions */
+static inline void *usb_get_serial_data (struct usb_serial *serial)
+{
+       return serial->private;
+}
+
+static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
+{
+       serial->private = data;
+}
+
+/**
+ * usb_serial_driver - describes a usb serial driver
+ * @description: pointer to a string that describes this driver.  This string used
+ *     in the syslog messages when a device is inserted or removed.
+ * @id_table: pointer to a list of usb_device_id structures that define all
+ *     of the devices this structure can support.
+ * @num_interrupt_in: the number of interrupt in endpoints this device will
+ *     have.
+ * @num_interrupt_out: the number of interrupt out endpoints this device will
+ *     have.
+ * @num_bulk_in: the number of bulk in endpoints this device will have.
+ * @num_bulk_out: the number of bulk out endpoints this device will have.
+ * @num_ports: the number of different ports this device will have.
+ * @calc_num_ports: pointer to a function to determine how many ports this
+ *     device has dynamically.  It will be called after the probe()
+ *     callback is called, but before attach()
+ * @probe: pointer to the driver's probe function.
+ *     This will be called when the device is inserted into the system,
+ *     but before the device has been fully initialized by the usb_serial
+ *     subsystem.  Use this function to download any firmware to the device,
+ *     or any other early initialization that might be needed.
+ *     Return 0 to continue on with the initialization sequence.  Anything
+ *     else will abort it.
+ * @attach: pointer to the driver's attach function.
+ *     This will be called when the struct usb_serial structure is fully set
+ *     set up.  Do any local initialization of the device, or any private
+ *     memory structure allocation at this point in time.
+ * @shutdown: pointer to the driver's shutdown function.  This will be
+ *     called when the device is removed from the system.
+ *
+ * This structure is defines a USB Serial driver.  It provides all of
+ * the information that the USB serial core code needs.  If the function
+ * pointers are defined, then the USB serial core code will call them when
+ * the corresponding tty port functions are called.  If they are not
+ * called, the generic serial function will be used instead.
+ *
+ * The driver.owner field should be set to the module owner of this driver.
+ * The driver.name field should be set to the name of this driver (remember
+ * it will show up in sysfs, so it needs to be short and to the point.
+ * Useing the module name is a good idea.)
+ */
+struct usb_serial_driver {
+       const char *description;
+       const struct usb_device_id *id_table;
+       char    num_interrupt_in;
+       char    num_interrupt_out;
+       char    num_bulk_in;
+       char    num_bulk_out;
+       char    num_ports;
+
+       struct list_head        driver_list;
+       struct device_driver    driver;
+
+       int (*probe) (struct usb_serial *serial, const struct usb_device_id *id);
+       int (*attach) (struct usb_serial *serial);
+       int (*calc_num_ports) (struct usb_serial *serial);
+
+       void (*shutdown) (struct usb_serial *serial);
+
+       int (*port_probe) (struct usb_serial_port *port);
+       int (*port_remove) (struct usb_serial_port *port);
+
+       /* serial function calls */
+       int  (*open)            (struct usb_serial_port *port, struct file * filp);
+       void (*close)           (struct usb_serial_port *port, struct file * filp);
+       int  (*write)           (struct usb_serial_port *port, const unsigned char *buf, int count);
+       int  (*write_room)      (struct usb_serial_port *port);
+       int  (*ioctl)           (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
+       void (*set_termios)     (struct usb_serial_port *port, struct termios * old);
+       void (*break_ctl)       (struct usb_serial_port *port, int break_state);
+       int  (*chars_in_buffer) (struct usb_serial_port *port);
+       void (*throttle)        (struct usb_serial_port *port);
+       void (*unthrottle)      (struct usb_serial_port *port);
+       int  (*tiocmget)        (struct usb_serial_port *port, struct file *file);
+       int  (*tiocmset)        (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
+
+       void (*read_int_callback)(struct urb *urb, struct pt_regs *regs);
+       void (*write_int_callback)(struct urb *urb, struct pt_regs *regs);
+       void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs);
+       void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs);
+};
+#define to_usb_serial_driver(d) container_of(d, struct usb_serial_driver, driver)
+
+extern int  usb_serial_register(struct usb_serial_driver *driver);
+extern void usb_serial_deregister(struct usb_serial_driver *driver);
+extern void usb_serial_port_softint(struct usb_serial_port *port);
+
+extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id);
+extern void usb_serial_disconnect(struct usb_interface *iface);
+
+extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest);
+extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit);
+
+/* USB Serial console functions */
+#ifdef CONFIG_USB_SERIAL_CONSOLE
+extern void usb_serial_console_init (int debug, int minor);
+extern void usb_serial_console_exit (void);
+extern void usb_serial_console_disconnect(struct usb_serial *serial);
+#else
+static inline void usb_serial_console_init (int debug, int minor) { }
+static inline void usb_serial_console_exit (void) { }
+static inline void usb_serial_console_disconnect(struct usb_serial *serial) {}
+#endif
+
+/* Functions needed by other parts of the usbserial core */
+extern struct usb_serial *usb_serial_get_by_index (unsigned int minor);
+extern void usb_serial_put(struct usb_serial *serial);
+extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp);
+extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count);
+extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp);
+extern int usb_serial_generic_write_room (struct usb_serial_port *port);
+extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port);
+extern void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
+extern void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
+extern void usb_serial_generic_shutdown (struct usb_serial *serial);
+extern int usb_serial_generic_register (int debug);
+extern void usb_serial_generic_deregister (void);
+
+extern int usb_serial_bus_register (struct usb_serial_driver *device);
+extern void usb_serial_bus_deregister (struct usb_serial_driver *device);
+
+extern struct usb_serial_driver usb_serial_generic_device;
+extern struct bus_type usb_serial_bus_type;
+extern struct tty_driver *usb_serial_tty_driver;
+
+static inline void usb_serial_debug_data(int debug,
+                                        struct device *dev,
+                                        const char *function, int size,
+                                        const unsigned char *data)
+{
+       int i;
+
+       if (debug) {
+               dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = ", function, size);
+               for (i = 0; i < size; ++i)
+                       printk ("%.2x ", data[i]);
+               printk ("\n");
+       }
+}
+
+/* Use our own dbg macro */
+#undef dbg
+#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg); } while (0)
+
+
+
+#endif /* ifdef __LINUX_USB_SERIAL_H */
+
index a2aacfc7af2f968ac6b16cb0fc31845f97dcd4d9..c720d107ff29b4fbf29e17e2e3a90eff08b7988c 100644 (file)
@@ -51,6 +51,9 @@
 #define USB_RECIP_INTERFACE            0x01
 #define USB_RECIP_ENDPOINT             0x02
 #define USB_RECIP_OTHER                        0x03
+/* From Wireless USB 1.0 */
+#define USB_RECIP_PORT                         0x04
+#define USB_RECIP_RPIPE                0x05
 
 /*
  * Standard requests, for the bRequest field of a SETUP packet.
@@ -73,7 +76,9 @@
 
 #define USB_REQ_SET_ENCRYPTION         0x0D    /* Wireless USB */
 #define USB_REQ_GET_ENCRYPTION         0x0E
+#define USB_REQ_RPIPE_ABORT            0x0E
 #define USB_REQ_SET_HANDSHAKE          0x0F
+#define USB_REQ_RPIPE_RESET            0x0F
 #define USB_REQ_GET_HANDSHAKE          0x10
 #define USB_REQ_SET_CONNECTION         0x11
 #define USB_REQ_SET_SECURITY_DATA      0x12
@@ -159,6 +164,8 @@ struct usb_ctrlrequest {
 #define USB_DT_BOS                     0x0f
 #define USB_DT_DEVICE_CAPABILITY       0x10
 #define USB_DT_WIRELESS_ENDPOINT_COMP  0x11
+#define USB_DT_WIRE_ADAPTER            0x21
+#define USB_DT_RPIPE                   0x22
 
 /* conventional codes for class-specific descriptors */
 #define USB_DT_CS_DEVICE               0x21
index 1d78870ed8af5e465d15ce85b190a81b1bf5d405..e17186dbcdcabfbcbe32a02917e46c9eea270ac3 100644 (file)
@@ -872,9 +872,9 @@ int usb_gadget_config_buf(const struct usb_config_descriptor *config,
 /* utility wrapping a simple endpoint selection policy */
 
 extern struct usb_ep *usb_ep_autoconfig (struct usb_gadget *,
-                       struct usb_endpoint_descriptor *) __init;
+                       struct usb_endpoint_descriptor *) __devinit;
 
-extern void usb_ep_autoconfig_reset (struct usb_gadget *) __init;
+extern void usb_ep_autoconfig_reset (struct usb_gadget *) __devinit;
 
 #endif  /* __KERNEL__ */
 
index 608487a62c98f8e1f129350db0a3c70e3e766dd5..f38f43f20faea4eefb94a1c84c71eb0e302e931a 100644 (file)
@@ -43,6 +43,8 @@
                /* Need delay after Command phase */            \
        US_FLAG(NO_WP_DETECT,   0x00000200)                     \
                /* Don't check for write-protect */             \
+       US_FLAG(MAX_SECTORS_64, 0x00000400)                     \
+               /* Sets max_sectors to 64    */
 
 #define US_FLAG(name, value)   US_FL_##name = value ,
 enum { US_DO_ALL_FLAGS };
index f6024ab4eff06ebfbb9f875f9b15a014495f8ba2..71b6363caaaf0253d84efa3abca6ba8def2509ed 100644 (file)
@@ -11,6 +11,7 @@ struct vm_area_struct;
 #define VM_ALLOC       0x00000002      /* vmalloc() */
 #define VM_MAP         0x00000004      /* vmap()ed pages */
 #define VM_USERMAP     0x00000008      /* suitable for remap_vmalloc_range */
+#define VM_VPAGES      0x00000010      /* buffer for pages was vmalloc'ed */
 /* bits [20..32] reserved for arch specific ioremap internals */
 
 /*
index 3e0daf54133e165aad7bde3adfff94cf659190ad..1ab806c47514e5e6a468063f37fa4fcb1ce9c038 100644 (file)
@@ -57,7 +57,7 @@ static inline void __count_vm_events(enum vm_event_item item, long delta)
 
 static inline void count_vm_events(enum vm_event_item item, long delta)
 {
-       get_cpu_var(vm_event_states.event[item])++;
+       get_cpu_var(vm_event_states.event[item]) += delta;
        put_cpu();
 }
 
@@ -186,11 +186,16 @@ static inline void __mod_zone_page_state(struct zone *zone,
        zone_page_state_add(delta, zone, item);
 }
 
+static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
+{
+       atomic_long_inc(&zone->vm_stat[item]);
+       atomic_long_inc(&vm_stat[item]);
+}
+
 static inline void __inc_zone_page_state(struct page *page,
                        enum zone_stat_item item)
 {
-       atomic_long_inc(&page_zone(page)->vm_stat[item]);
-       atomic_long_inc(&vm_stat[item]);
+       __inc_zone_state(page_zone(page), item);
 }
 
 static inline void __dec_zone_page_state(struct page *page,
index 9f95b0bea5b3a86951a6e85d2b218785234a004c..8ab334a4822215be6fbc556b9447f01cb9180e4d 100644 (file)
@@ -1,6 +1,16 @@
 #ifndef _LINUX_VT_H
 #define _LINUX_VT_H
 
+/*
+ * These constants are also useful for user-level apps (e.g., VC
+ * resizing).
+ */
+#define MIN_NR_CONSOLES 1       /* must be at least 1 */
+#define MAX_NR_CONSOLES        63      /* serial lines start at 64 */
+#define MAX_NR_USER_CONSOLES 63        /* must be root to allocate above this */
+               /* Note: the ioctl VT_GETSTATE does not work for
+                  consoles 16 and higher (since it returns a short) */
+
 /* 0x56 is 'V', to avoid collision with termios and kd */
 
 #define VT_OPENQRY     0x5600  /* find available vt */
index 940d0261a5459078c7283597e63f97c1c2337aa0..918a29763aea3e0afb58cb78d62db873bad16169 100644 (file)
@@ -26,6 +26,7 @@
 
 extern void kd_mksound(unsigned int hz, unsigned int ticks);
 extern int kbd_rate(struct kbd_repeat *rep);
+extern int fg_console, last_console, want_console;
 
 /* console.c */
 
index 794be7af58aeff2191059ab350b1b258ea597a03..b3b9048421d8489568d27f41ff1303e09ab51f37 100644 (file)
@@ -77,17 +77,7 @@ struct task_struct;
 #define __WAIT_BIT_KEY_INITIALIZER(word, bit)                          \
        { .flags = word, .bit_nr = bit, }
 
-/*
- * lockdep: we want one lock-class for all waitqueue locks.
- */
-extern struct lock_class_key waitqueue_lock_key;
-
-static inline void init_waitqueue_head(wait_queue_head_t *q)
-{
-       spin_lock_init(&q->lock);
-       lockdep_set_class(&q->lock, &waitqueue_lock_key);
-       INIT_LIST_HEAD(&q->task_list);
-}
+extern void init_waitqueue_head(wait_queue_head_t *q);
 
 static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
 {
index 805de50df00da8255f02edc3757e440654d16762..8c2287264266776771e08a2fa4387c5b5542112c 100644 (file)
@@ -150,4 +150,24 @@ static inline int genlmsg_unicast(struct sk_buff *skb, u32 pid)
        return nlmsg_unicast(genl_sock, skb, pid);
 }
 
+/**
+ * gennlmsg_data - head of message payload
+ * @gnlh: genetlink messsage header
+ */
+static inline void *genlmsg_data(const struct genlmsghdr *gnlh)
+{
+       return ((unsigned char *) gnlh + GENL_HDRLEN);
+}
+
+/**
+ * genlmsg_len - length of message payload
+ * @gnlh: genetlink message header
+ */
+static inline int genlmsg_len(const struct genlmsghdr *gnlh)
+{
+       struct nlmsghdr *nlh = (struct nlmsghdr *)((unsigned char *)gnlh -
+                                                       NLMSG_HDRLEN);
+       return (nlh->nlmsg_len - GENL_HDRLEN - NLMSG_HDRLEN);
+}
+
 #endif /* __NET_GENERIC_NETLINK_H */
index a225d6371cb12f5d5efa6b4318d1a54004c4bc01..c643bce64e552d0789facb53ebec5697e3ecd88b 100644 (file)
@@ -36,6 +36,7 @@
 struct net_protocol {
        int                     (*handler)(struct sk_buff *skb);
        void                    (*err_handler)(struct sk_buff *skb, u32 info);
+       int                     (*gso_send_check)(struct sk_buff *skb);
        struct sk_buff         *(*gso_segment)(struct sk_buff *skb,
                                               int features);
        int                     no_policy;
@@ -51,6 +52,7 @@ struct inet6_protocol
                               int type, int code, int offset,
                               __u32 info);
 
+       int     (*gso_send_check)(struct sk_buff *skb);
        struct sk_buff *(*gso_segment)(struct sk_buff *skb,
                                       int features);
 
index 3cd803b0d7a531537961483aec4ea77923b8d418..0720bddff1e9cee11ac9f176b4ef2d59c1356ded 100644 (file)
@@ -1086,6 +1086,7 @@ extern struct request_sock_ops tcp_request_sock_ops;
 
 extern int tcp_v4_destroy_sock(struct sock *sk);
 
+extern int tcp_v4_gso_send_check(struct sk_buff *skb);
 extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features);
 
 #ifdef CONFIG_PROC_FS
index fcb5ba87dcc5f76263c30c8293cb76ebbe9f2449..0ff67398928d3f407546468f552e59bb518c271c 100644 (file)
@@ -89,9 +89,10 @@ static inline void ib_addr_set_pkey(struct rdma_dev_addr *dev_addr, u16 pkey)
        dev_addr->broadcast[9] = (unsigned char) pkey;
 }
 
-static inline union ib_gid *ib_addr_get_sgid(struct rdma_dev_addr *dev_addr)
+static inline void ib_addr_get_sgid(struct rdma_dev_addr *dev_addr,
+                                   union ib_gid *gid)
 {
-       return  (union ib_gid *) (dev_addr->src_dev_addr + 4);
+       memcpy(gid, dev_addr->src_dev_addr + 4, sizeof *gid);
 }
 
 static inline void ib_addr_set_sgid(struct rdma_dev_addr *dev_addr,
@@ -100,9 +101,10 @@ static inline void ib_addr_set_sgid(struct rdma_dev_addr *dev_addr,
        memcpy(dev_addr->src_dev_addr + 4, gid, sizeof *gid);
 }
 
-static inline union ib_gid *ib_addr_get_dgid(struct rdma_dev_addr *dev_addr)
+static inline void ib_addr_get_dgid(struct rdma_dev_addr *dev_addr,
+                                   union ib_gid *gid)
 {
-       return  (union ib_gid *) (dev_addr->dst_dev_addr + 4);
+       memcpy(gid, dev_addr->dst_dev_addr + 4, sizeof *gid);
 }
 
 static inline void ib_addr_set_dgid(struct rdma_dev_addr *dev_addr,
index 4ace54cd0ccee3233223e9c8b3ee7c0aac222641..00dadbf94e1d75cca1d9004a9b997efe3eb103c6 100644 (file)
@@ -88,7 +88,7 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool);
 struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle,
                                         u64                *page_list,
                                         int                 list_len,
-                                        u64                *io_virtual_address);
+                                        u64                 io_virtual_address);
 
 int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr);
 
index 5d184be0ff728d5a0ce7b47d525d9594179d23f5..bab3ff457e40cfa00e21b40f2d9e14fee12f8e07 100644 (file)
@@ -188,8 +188,6 @@ struct snd_minor {
        int device;                     /* device number */
        const struct file_operations *f_ops;    /* file operations */
        void *private_data;             /* private data for f_ops->open */
-       char name[0];                   /* device name (keep at the end of
-                                                               structure) */
 };
 
 /* sound.c */
index 80b2979c0cba94c01945faf452d5523ee3c245ed..685928e6f65a52d90d622f2c17127736d63de551 100644 (file)
@@ -1704,6 +1704,7 @@ struct snd_cs46xx {
        int acpi_port;
        struct snd_kcontrol *eapd_switch; /* for amplifier hack */
        int accept_valid;       /* accept mmap valid (for OSS) */
+       int in_suspend;
 
        struct gameport *gameport;
 
diff --git a/include/video/mbxfb.h b/include/video/mbxfb.h
new file mode 100644 (file)
index 0000000..3bde0f5
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef __MBX_FB_H
+#define __MBX_FB_H
+
+struct mbxfb_val {
+       unsigned int    defval;
+       unsigned int    min;
+       unsigned int    max;
+};
+
+struct fb_info;
+
+struct mbxfb_platform_data {
+               /* Screen info */
+               struct mbxfb_val xres;
+               struct mbxfb_val yres;
+               struct mbxfb_val bpp;
+
+               /* Memory info */
+               unsigned long memsize; /* if 0 use ODFB? */
+               unsigned long timings1;
+               unsigned long timings2;
+               unsigned long timings3;
+
+               int (*probe)(struct fb_info *fb);
+               int (*remove)(struct fb_info *fb);
+};
+
+#endif /* __MBX_FB_H */
index a5b073a103e7cf9cd5a3438765a97e6468c23c6f..a099fc6526d9277cf140c70c04399022ce1aaf43 100644 (file)
@@ -158,6 +158,30 @@ config BSD_PROCESS_ACCT_V3
          for processing it. A preliminary version of these tools is available
          at <http://www.physik3.uni-rostock.de/tim/kernel/utils/acct/>.
 
+config TASKSTATS
+       bool "Export task/process statistics through netlink (EXPERIMENTAL)"
+       depends on NET
+       default n
+       help
+         Export selected statistics for tasks/processes through the
+         generic netlink interface. Unlike BSD process accounting, the
+         statistics are available during the lifetime of tasks/processes as
+         responses to commands. Like BSD accounting, they are sent to user
+         space on task exit.
+
+         Say N if unsure.
+
+config TASK_DELAY_ACCT
+       bool "Enable per-task delay accounting (EXPERIMENTAL)"
+       depends on TASKSTATS
+       help
+         Collect information on time spent by a task waiting for system
+         resources like cpu, synchronous block I/O completion and swapping
+         in pages. Such statistics can help in setting a task's priorities
+         relative to other tasks for cpu, io, rss limits etc.
+
+         Say N if unsure.
+
 config SYSCTL
        bool "Sysctl support" if EMBEDDED
        default y
index 628b8e9e841ae9ed86fedd98cdd850a5af2815f6..8651a720a092c4ade7e530c01b57b040c3e52539 100644 (file)
@@ -41,6 +41,8 @@
 #include <linux/cpu.h>
 #include <linux/cpuset.h>
 #include <linux/efi.h>
+#include <linux/taskstats_kern.h>
+#include <linux/delayacct.h>
 #include <linux/unistd.h>
 #include <linux/rmap.h>
 #include <linux/mempolicy.h>
@@ -574,6 +576,8 @@ asmlinkage void __init start_kernel(void)
        proc_root_init();
 #endif
        cpuset_init();
+       taskstats_init_early();
+       delayacct_init();
 
        check_bugs();
 
index 47dbcd570cd8d67599cea355a33fa704614dd297..d62ec66c1af28246946d9a21a52f5fc6df706701 100644 (file)
@@ -48,6 +48,8 @@ obj-$(CONFIG_GENERIC_HARDIRQS) += irq/
 obj-$(CONFIG_SECCOMP) += seccomp.o
 obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o
 obj-$(CONFIG_RELAY) += relay.o
+obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
+obj-$(CONFIG_TASKSTATS) += taskstats.o
 
 ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
 # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
index f18e0b8df3e1d036e6276befb3e707c4610944de..2a7c933651c7c03b0777fcecdc1ea3e06fed259b 100644 (file)
@@ -488,7 +488,7 @@ static void do_acct_process(struct file *file)
                old_encode_dev(tty_devnum(current->signal->tty)) : 0;
        read_unlock(&tasklist_lock);
 
-       spin_lock(&current->sighand->siglock);
+       spin_lock_irq(&current->sighand->siglock);
        ac.ac_utime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_utime)));
        ac.ac_stime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_stime)));
        ac.ac_flag = pacct->ac_flag;
@@ -496,7 +496,7 @@ static void do_acct_process(struct file *file)
        ac.ac_minflt = encode_comp_t(pacct->ac_minflt);
        ac.ac_majflt = encode_comp_t(pacct->ac_majflt);
        ac.ac_exitcode = pacct->ac_exitcode;
-       spin_unlock(&current->sighand->siglock);
+       spin_unlock_irq(&current->sighand->siglock);
        ac.ac_io = encode_comp_t(0 /* current->io_usage */);    /* %% */
        ac.ac_rw = encode_comp_t(ac.ac_io / 1024);
        ac.ac_swaps = encode_comp_t(0);
diff --git a/kernel/delayacct.c b/kernel/delayacct.c
new file mode 100644 (file)
index 0000000..f05392d
--- /dev/null
@@ -0,0 +1,178 @@
+/* delayacct.c - per-task delay accounting
+ *
+ * Copyright (C) Shailabh Nagar, IBM Corp. 2006
+ *
+ * This program is free software;  you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+ * the GNU General Public License for more details.
+ */
+
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/time.h>
+#include <linux/sysctl.h>
+#include <linux/delayacct.h>
+
+int delayacct_on __read_mostly;        /* Delay accounting turned on/off */
+kmem_cache_t *delayacct_cache;
+
+static int __init delayacct_setup_enable(char *str)
+{
+       delayacct_on = 1;
+       return 1;
+}
+__setup("delayacct", delayacct_setup_enable);
+
+void delayacct_init(void)
+{
+       delayacct_cache = kmem_cache_create("delayacct_cache",
+                                       sizeof(struct task_delay_info),
+                                       0,
+                                       SLAB_PANIC,
+                                       NULL, NULL);
+       delayacct_tsk_init(&init_task);
+}
+
+void __delayacct_tsk_init(struct task_struct *tsk)
+{
+       spin_lock_init(&tsk->delays_lock);
+       /* No need to acquire tsk->delays_lock for allocation here unless
+          __delayacct_tsk_init called after tsk is attached to tasklist
+       */
+       tsk->delays = kmem_cache_zalloc(delayacct_cache, SLAB_KERNEL);
+       if (tsk->delays)
+               spin_lock_init(&tsk->delays->lock);
+}
+
+void __delayacct_tsk_exit(struct task_struct *tsk)
+{
+       struct task_delay_info *delays = tsk->delays;
+       spin_lock(&tsk->delays_lock);
+       tsk->delays = NULL;
+       spin_unlock(&tsk->delays_lock);
+       kmem_cache_free(delayacct_cache, delays);
+}
+
+/*
+ * Start accounting for a delay statistic using
+ * its starting timestamp (@start)
+ */
+
+static inline void delayacct_start(struct timespec *start)
+{
+       do_posix_clock_monotonic_gettime(start);
+}
+
+/*
+ * Finish delay accounting for a statistic using
+ * its timestamps (@start, @end), accumalator (@total) and @count
+ */
+
+static void delayacct_end(struct timespec *start, struct timespec *end,
+                               u64 *total, u32 *count)
+{
+       struct timespec ts;
+       s64 ns;
+
+       do_posix_clock_monotonic_gettime(end);
+       ts = timespec_sub(*end, *start);
+       ns = timespec_to_ns(&ts);
+       if (ns < 0)
+               return;
+
+       spin_lock(&current->delays->lock);
+       *total += ns;
+       (*count)++;
+       spin_unlock(&current->delays->lock);
+}
+
+void __delayacct_blkio_start(void)
+{
+       delayacct_start(&current->delays->blkio_start);
+}
+
+void __delayacct_blkio_end(void)
+{
+       if (current->delays->flags & DELAYACCT_PF_SWAPIN)
+               /* Swapin block I/O */
+               delayacct_end(&current->delays->blkio_start,
+                       &current->delays->blkio_end,
+                       &current->delays->swapin_delay,
+                       &current->delays->swapin_count);
+       else    /* Other block I/O */
+               delayacct_end(&current->delays->blkio_start,
+                       &current->delays->blkio_end,
+                       &current->delays->blkio_delay,
+                       &current->delays->blkio_count);
+}
+
+int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk)
+{
+       s64 tmp;
+       struct timespec ts;
+       unsigned long t1,t2,t3;
+
+       spin_lock(&tsk->delays_lock);
+
+       /* Though tsk->delays accessed later, early exit avoids
+        * unnecessary returning of other data
+        */
+       if (!tsk->delays)
+               goto done;
+
+       tmp = (s64)d->cpu_run_real_total;
+       cputime_to_timespec(tsk->utime + tsk->stime, &ts);
+       tmp += timespec_to_ns(&ts);
+       d->cpu_run_real_total = (tmp < (s64)d->cpu_run_real_total) ? 0 : tmp;
+
+       /*
+        * No locking available for sched_info (and too expensive to add one)
+        * Mitigate by taking snapshot of values
+        */
+       t1 = tsk->sched_info.pcnt;
+       t2 = tsk->sched_info.run_delay;
+       t3 = tsk->sched_info.cpu_time;
+
+       d->cpu_count += t1;
+
+       jiffies_to_timespec(t2, &ts);
+       tmp = (s64)d->cpu_delay_total + timespec_to_ns(&ts);
+       d->cpu_delay_total = (tmp < (s64)d->cpu_delay_total) ? 0 : tmp;
+
+       tmp = (s64)d->cpu_run_virtual_total + (s64)jiffies_to_usecs(t3) * 1000;
+       d->cpu_run_virtual_total =
+               (tmp < (s64)d->cpu_run_virtual_total) ? 0 : tmp;
+
+       /* zero XXX_total, non-zero XXX_count implies XXX stat overflowed */
+
+       spin_lock(&tsk->delays->lock);
+       tmp = d->blkio_delay_total + tsk->delays->blkio_delay;
+       d->blkio_delay_total = (tmp < d->blkio_delay_total) ? 0 : tmp;
+       tmp = d->swapin_delay_total + tsk->delays->swapin_delay;
+       d->swapin_delay_total = (tmp < d->swapin_delay_total) ? 0 : tmp;
+       d->blkio_count += tsk->delays->blkio_count;
+       d->swapin_count += tsk->delays->swapin_count;
+       spin_unlock(&tsk->delays->lock);
+
+done:
+       spin_unlock(&tsk->delays_lock);
+       return 0;
+}
+
+__u64 __delayacct_blkio_ticks(struct task_struct *tsk)
+{
+       __u64 ret;
+
+       spin_lock(&tsk->delays->lock);
+       ret = nsec_to_clock_t(tsk->delays->blkio_delay +
+                               tsk->delays->swapin_delay);
+       spin_unlock(&tsk->delays->lock);
+       return ret;
+}
+
index 6664c084783d49c0a80faf22f5b84fad6015fe0b..dba194a8d41619d689d4e53f9819bb51583cb72c 100644 (file)
@@ -25,6 +25,8 @@
 #include <linux/mount.h>
 #include <linux/proc_fs.h>
 #include <linux/mempolicy.h>
+#include <linux/taskstats_kern.h>
+#include <linux/delayacct.h>
 #include <linux/cpuset.h>
 #include <linux/syscalls.h>
 #include <linux/signal.h>
@@ -843,7 +845,9 @@ static void exit_notify(struct task_struct *tsk)
 fastcall NORET_TYPE void do_exit(long code)
 {
        struct task_struct *tsk = current;
+       struct taskstats *tidstats;
        int group_dead;
+       unsigned int mycpu;
 
        profile_task_exit(tsk);
 
@@ -881,6 +885,8 @@ fastcall NORET_TYPE void do_exit(long code)
                                current->comm, current->pid,
                                preempt_count());
 
+       taskstats_exit_alloc(&tidstats, &mycpu);
+
        acct_update_integrals(tsk);
        if (tsk->mm) {
                update_hiwater_rss(tsk->mm);
@@ -900,6 +906,10 @@ fastcall NORET_TYPE void do_exit(long code)
 #endif
        if (unlikely(tsk->audit_context))
                audit_free(tsk);
+       taskstats_exit_send(tsk, tidstats, group_dead, mycpu);
+       taskstats_exit_free(tidstats);
+       delayacct_tsk_exit(tsk);
+
        exit_mm(tsk);
 
        if (group_dead)
index 56e4e07e45f7f1098ab692dfe2eb7bf1f277a1e4..1b0f7b1e088189a53d531e038b1dce75ad3f7a6a 100644 (file)
@@ -43,6 +43,8 @@
 #include <linux/rmap.h>
 #include <linux/acct.h>
 #include <linux/cn_proc.h>
+#include <linux/delayacct.h>
+#include <linux/taskstats_kern.h>
 
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
@@ -61,9 +63,7 @@ int max_threads;              /* tunable limit on nr_threads */
 
 DEFINE_PER_CPU(unsigned long, process_counts) = 0;
 
- __cacheline_aligned DEFINE_RWLOCK(tasklist_lock);  /* outer */
-
-EXPORT_SYMBOL(tasklist_lock);
+__cacheline_aligned DEFINE_RWLOCK(tasklist_lock);  /* outer */
 
 int nr_processes(void)
 {
@@ -820,6 +820,7 @@ static inline int copy_signal(unsigned long clone_flags, struct task_struct * ts
        if (clone_flags & CLONE_THREAD) {
                atomic_inc(&current->signal->count);
                atomic_inc(&current->signal->live);
+               taskstats_tgid_alloc(current->signal);
                return 0;
        }
        sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL);
@@ -864,6 +865,7 @@ static inline int copy_signal(unsigned long clone_flags, struct task_struct * ts
        INIT_LIST_HEAD(&sig->cpu_timers[0]);
        INIT_LIST_HEAD(&sig->cpu_timers[1]);
        INIT_LIST_HEAD(&sig->cpu_timers[2]);
+       taskstats_tgid_init(sig);
 
        task_lock(current->group_leader);
        memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim);
@@ -885,6 +887,7 @@ static inline int copy_signal(unsigned long clone_flags, struct task_struct * ts
 void __cleanup_signal(struct signal_struct *sig)
 {
        exit_thread_group_keys(sig);
+       taskstats_tgid_free(sig);
        kmem_cache_free(signal_cachep, sig);
 }
 
@@ -1002,6 +1005,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
                goto bad_fork_cleanup_put_domain;
 
        p->did_exec = 0;
+       delayacct_tsk_init(p);  /* Must remain after dup_task_struct() */
        copy_flags(clone_flags, p);
        p->pid = pid;
        retval = -EFAULT;
index 1dc98e4dd287ec95872c7c771aab7f14e0d9ca42..cf0c8e21d1abaae85c17a816dbd42a8ed3132dd5 100644 (file)
@@ -476,6 +476,12 @@ lookup_pi_state(u32 uval, struct futex_hash_bucket *hb, struct futex_q *me)
                         * the refcount and return its pi_state:
                         */
                        pi_state = this->pi_state;
+                       /*
+                        * Userspace might have messed up non PI and PI futexes
+                        */
+                       if (unlikely(!pi_state))
+                               return -EINVAL;
+
                        atomic_inc(&pi_state->refcount);
                        me->pi_state = pi_state;
 
index 39277dd6bf90911916db77f2370e2db3a6e070f4..ab16a5a4cfe9ba4c1e3009f136e4c6d11a8cffa7 100644 (file)
@@ -275,8 +275,8 @@ static void upcase_if_global(struct kallsym_iter *iter)
 static int get_ksymbol_mod(struct kallsym_iter *iter)
 {
        iter->owner = module_get_kallsym(iter->pos - kallsyms_num_syms,
-                                        &iter->value,
-                                        &iter->type, iter->name);
+                                        &iter->value, &iter->type,
+                                        iter->name, sizeof(iter->name));
        if (iter->owner == NULL)
                return 0;
 
index 24be714b04c775bb23fd47baaec588ca92e8c6ba..4f9c60ef95e83d9dd08aaeff106d602ad7d41051 100644 (file)
@@ -215,23 +215,6 @@ EXPORT_SYMBOL(kthread_bind);
  * was never called.
  */
 int kthread_stop(struct task_struct *k)
-{
-       return kthread_stop_sem(k, NULL);
-}
-EXPORT_SYMBOL(kthread_stop);
-
-/**
- * kthread_stop_sem - stop a thread created by kthread_create().
- * @k: thread created by kthread_create().
- * @s: semaphore that @k waits on while idle.
- *
- * Does essentially the same thing as kthread_stop() above, but wakes
- * @k by calling up(@s).
- *
- * Returns the result of threadfn(), or %-EINTR if wake_up_process()
- * was never called.
- */
-int kthread_stop_sem(struct task_struct *k, struct semaphore *s)
 {
        int ret;
 
@@ -246,10 +229,7 @@ int kthread_stop_sem(struct task_struct *k, struct semaphore *s)
 
        /* Now set kthread_should_stop() to true, and wake it up. */
        kthread_stop_info.k = k;
-       if (s)
-               up(s);
-       else
-               wake_up_process(k);
+       wake_up_process(k);
        put_task_struct(k);
 
        /* Once it dies, reset stop ptr, gather result and we're done. */
@@ -260,7 +240,7 @@ int kthread_stop_sem(struct task_struct *k, struct semaphore *s)
 
        return ret;
 }
-EXPORT_SYMBOL(kthread_stop_sem);
+EXPORT_SYMBOL(kthread_stop);
 
 static __init int helper_init(void)
 {
index f32ca78c198d20c3ee6a1362f0c7b414e64db077..9bad178845135fba9f6b76ac59d408b723c5b5bc 100644 (file)
@@ -169,22 +169,17 @@ EXPORT_SYMBOL(lockdep_internal);
  */
 static int class_filter(struct lock_class *class)
 {
+#if 0
+       /* Example */
        if (class->name_version == 1 &&
-                       !strcmp(class->name, "&rl->lock"))
+                       !strcmp(class->name, "lockname"))
                return 1;
        if (class->name_version == 1 &&
-                       !strcmp(class->name, "&ni->mrec_lock"))
+                       !strcmp(class->name, "&struct->lockfield"))
                return 1;
-       if (class->name_version == 1 &&
-                       !strcmp(class->name, "mft_ni_runlist_lock"))
-               return 1;
-       if (class->name_version == 1 &&
-                       !strcmp(class->name, "mft_ni_mrec_lock"))
-               return 1;
-       if (class->name_version == 1 &&
-                       !strcmp(class->name, "&vol->lcnbmp_lock"))
-               return 1;
-       return 0;
+#endif
+       /* Allow everything else. 0 would be filter everything else */
+       return 1;
 }
 #endif
 
@@ -408,23 +403,12 @@ static void lockdep_print_held_locks(struct task_struct *curr)
                print_lock(curr->held_locks + i);
        }
 }
-/*
- * Helper to print a nice hierarchy of lock dependencies:
- */
-static void print_spaces(int nr)
-{
-       int i;
-
-       for (i = 0; i < nr; i++)
-               printk("  ");
-}
 
 static void print_lock_class_header(struct lock_class *class, int depth)
 {
        int bit;
 
-       print_spaces(depth);
-       printk("->");
+       printk("%*s->", depth, "");
        print_lock_name(class);
        printk(" ops: %lu", class->ops);
        printk(" {\n");
@@ -433,17 +417,14 @@ static void print_lock_class_header(struct lock_class *class, int depth)
                if (class->usage_mask & (1 << bit)) {
                        int len = depth;
 
-                       print_spaces(depth);
-                       len += printk("   %s", usage_str[bit]);
+                       len += printk("%*s   %s", depth, "", usage_str[bit]);
                        len += printk(" at:\n");
                        print_stack_trace(class->usage_traces + bit, len);
                }
        }
-       print_spaces(depth);
-       printk(" }\n");
+       printk("%*s }\n", depth, "");
 
-       print_spaces(depth);
-       printk(" ... key      at: ");
+       printk("%*s ... key      at: ",depth,"");
        print_ip_sym((unsigned long)class->key);
 }
 
@@ -463,8 +444,7 @@ static void print_lock_dependencies(struct lock_class *class, int depth)
                DEBUG_LOCKS_WARN_ON(!entry->class);
                print_lock_dependencies(entry->class, depth + 1);
 
-               print_spaces(depth);
-               printk(" ... acquired at:\n");
+               printk("%*s ... acquired at:\n",depth,"");
                print_stack_trace(&entry->trace, 2);
                printk("\n");
        }
@@ -1124,7 +1104,7 @@ extern void __error_too_big_MAX_LOCKDEP_SUBCLASSES(void);
  * itself, so actual lookup of the hash should be once per lock object.
  */
 static inline struct lock_class *
-register_lock_class(struct lockdep_map *lock, unsigned int subclass)
+look_up_lock_class(struct lockdep_map *lock, unsigned int subclass)
 {
        struct lockdep_subclass_key *key;
        struct list_head *hash_head;
@@ -1168,7 +1148,26 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass)
         */
        list_for_each_entry(class, hash_head, hash_entry)
                if (class->key == key)
-                       goto out_set;
+                       return class;
+
+       return NULL;
+}
+
+/*
+ * Register a lock's class in the hash-table, if the class is not present
+ * yet. Otherwise we look it up. We cache the result in the lock object
+ * itself, so actual lookup of the hash should be once per lock object.
+ */
+static inline struct lock_class *
+register_lock_class(struct lockdep_map *lock, unsigned int subclass)
+{
+       struct lockdep_subclass_key *key;
+       struct list_head *hash_head;
+       struct lock_class *class;
+
+       class = look_up_lock_class(lock, subclass);
+       if (likely(class))
+               return class;
 
        /*
         * Debug-check: all keys must be persistent!
@@ -1183,6 +1182,9 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass)
                return NULL;
        }
 
+       key = lock->key->subkeys + subclass;
+       hash_head = classhashentry(key);
+
        __raw_spin_lock(&hash_lock);
        /*
         * We have to do the hash-walk again, to avoid races
@@ -1229,8 +1231,8 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass)
 out_unlock_set:
        __raw_spin_unlock(&hash_lock);
 
-out_set:
-       lock->class[subclass] = class;
+       if (!subclass)
+               lock->class_cache = class;
 
        DEBUG_LOCKS_WARN_ON(class->subclass != subclass);
 
@@ -1934,7 +1936,7 @@ void lockdep_init_map(struct lockdep_map *lock, const char *name,
        }
        lock->name = name;
        lock->key = key;
-       memset(lock->class, 0, sizeof(lock->class[0])*MAX_LOCKDEP_SUBCLASSES);
+       lock->class_cache = NULL;
 }
 
 EXPORT_SYMBOL_GPL(lockdep_init_map);
@@ -1948,8 +1950,8 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
                          unsigned long ip)
 {
        struct task_struct *curr = current;
+       struct lock_class *class = NULL;
        struct held_lock *hlock;
-       struct lock_class *class;
        unsigned int depth, id;
        int chain_head = 0;
        u64 chain_key;
@@ -1967,8 +1969,11 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
                return 0;
        }
 
-       class = lock->class[subclass];
-       /* not cached yet? */
+       if (!subclass)
+               class = lock->class_cache;
+       /*
+        * Not cached yet or subclass?
+        */
        if (unlikely(!class)) {
                class = register_lock_class(lock, subclass);
                if (!class)
@@ -2469,48 +2474,44 @@ void lockdep_free_key_range(void *start, unsigned long size)
 
 void lockdep_reset_lock(struct lockdep_map *lock)
 {
-       struct lock_class *class, *next, *entry;
+       struct lock_class *class, *next;
        struct list_head *head;
        unsigned long flags;
        int i, j;
 
        raw_local_irq_save(flags);
-       __raw_spin_lock(&hash_lock);
 
        /*
-        * Remove all classes this lock has:
+        * Remove all classes this lock might have:
+        */
+       for (j = 0; j < MAX_LOCKDEP_SUBCLASSES; j++) {
+               /*
+                * If the class exists we look it up and zap it:
+                */
+               class = look_up_lock_class(lock, j);
+               if (class)
+                       zap_class(class);
+       }
+       /*
+        * Debug check: in the end all mapped classes should
+        * be gone.
         */
+       __raw_spin_lock(&hash_lock);
        for (i = 0; i < CLASSHASH_SIZE; i++) {
                head = classhash_table + i;
                if (list_empty(head))
                        continue;
                list_for_each_entry_safe(class, next, head, hash_entry) {
-                       for (j = 0; j < MAX_LOCKDEP_SUBCLASSES; j++) {
-                               entry = lock->class[j];
-                               if (class == entry) {
-                                       zap_class(class);
-                                       lock->class[j] = NULL;
-                                       break;
-                               }
+                       if (unlikely(class == lock->class_cache)) {
+                               __raw_spin_unlock(&hash_lock);
+                               DEBUG_LOCKS_WARN_ON(1);
+                               goto out_restore;
                        }
                }
        }
-
-       /*
-        * Debug check: in the end all mapped classes should
-        * be gone.
-        */
-       for (j = 0; j < MAX_LOCKDEP_SUBCLASSES; j++) {
-               entry = lock->class[j];
-               if (!entry)
-                       continue;
-               __raw_spin_unlock(&hash_lock);
-               DEBUG_LOCKS_WARN_ON(1);
-               raw_local_irq_restore(flags);
-               return;
-       }
-
        __raw_spin_unlock(&hash_lock);
+
+out_restore:
        raw_local_irq_restore(flags);
 }
 
@@ -2571,7 +2572,7 @@ static inline int in_range(const void *start, const void *addr, const void *end)
 
 static void
 print_freed_lock_bug(struct task_struct *curr, const void *mem_from,
-                    const void *mem_to)
+                    const void *mem_to, struct held_lock *hlock)
 {
        if (!debug_locks_off())
                return;
@@ -2583,6 +2584,7 @@ print_freed_lock_bug(struct task_struct *curr, const void *mem_from,
        printk(  "-------------------------\n");
        printk("%s/%d is freeing memory %p-%p, with a lock still held there!\n",
                curr->comm, curr->pid, mem_from, mem_to-1);
+       print_lock(hlock);
        lockdep_print_held_locks(curr);
 
        printk("\nstack backtrace:\n");
@@ -2616,7 +2618,7 @@ void debug_check_no_locks_freed(const void *mem_from, unsigned long mem_len)
                                        !in_range(mem_from, lock_to, mem_to))
                        continue;
 
-               print_freed_lock_bug(curr, mem_from, mem_to);
+               print_freed_lock_bug(curr, mem_from, mem_to, hlock);
                break;
        }
        local_irq_restore(flags);
index 35e1b1f859d715053376e638c35ec5569ca51053..2a19cd47c0469462947991e5c6ee7259b4d7ea54 100644 (file)
@@ -2019,10 +2019,8 @@ const char *module_address_lookup(unsigned long addr,
        return NULL;
 }
 
-struct module *module_get_kallsym(unsigned int symnum,
-                                 unsigned long *value,
-                                 char *type,
-                                 char namebuf[128])
+struct module *module_get_kallsym(unsigned int symnum, unsigned long *value,
+                               char *type, char *name, size_t namelen)
 {
        struct module *mod;
 
@@ -2031,9 +2029,8 @@ struct module *module_get_kallsym(unsigned int symnum,
                if (symnum < mod->num_symtab) {
                        *value = mod->symtab[symnum].st_value;
                        *type = mod->symtab[symnum].st_info;
-                       strncpy(namebuf,
-                               mod->strtab + mod->symtab[symnum].st_name,
-                               127);
+                       strlcpy(name, mod->strtab + mod->symtab[symnum].st_name,
+                               namelen);
                        mutex_unlock(&module_mutex);
                        return mod;
                }
index ab13f0f668b53efa359233c7c6829e08683f4b65..d8a0bca21233e12d413fa9ab60c436b9b36e0db7 100644 (file)
@@ -172,6 +172,7 @@ const char *print_tainted(void)
 
 void add_taint(unsigned flag)
 {
+       debug_locks_off(); /* can't trust the integrity of the kernel anymore */
        tainted |= flag;
 }
 EXPORT_SYMBOL(add_taint);
@@ -256,6 +257,7 @@ int oops_may_print(void)
  */
 void oops_enter(void)
 {
+       debug_locks_off(); /* can't trust the integrity of the kernel anymore */
        do_oops_enter_exit();
 }
 
index 84063ac8fcfc95bd15d56dc6778ec45bb503aa43..c50d15266c1096d42d61e296ea4da13d34cb57ec 100644 (file)
@@ -75,42 +75,6 @@ struct pm_dev *pm_register(pm_dev_t type,
        return dev;
 }
 
-static void __pm_unregister(struct pm_dev *dev)
-{
-       if (dev) {
-               list_del(&dev->entry);
-               kfree(dev);
-       }
-}
-
-/**
- *     pm_unregister_all - unregister all devices with matching callback
- *     @callback: callback function pointer
- *
- *     Unregister every device that would call the callback passed. This
- *     is primarily meant as a helper function for loadable modules. It
- *     enables a module to give up all its managed devices without keeping
- *     its own private list.
- */
-void pm_unregister_all(pm_callback callback)
-{
-       struct list_head *entry;
-
-       if (!callback)
-               return;
-
-       mutex_lock(&pm_devs_lock);
-       entry = pm_devs.next;
-       while (entry != &pm_devs) {
-               struct pm_dev *dev = list_entry(entry, struct pm_dev, entry);
-               entry = entry->next;
-               if (dev->callback == callback)
-                       __pm_unregister(dev);
-       }
-       mutex_unlock(&pm_devs_lock);
-}
-
 /**
  *     pm_send - send request to a single device
  *     @dev: device to send to
@@ -239,7 +203,6 @@ int pm_send_all(pm_request_t rqst, void *data)
 }
 
 EXPORT_SYMBOL(pm_register);
-EXPORT_SYMBOL(pm_unregister_all);
 EXPORT_SYMBOL(pm_send_all);
 EXPORT_SYMBOL(pm_active);
 
index 24c96f3542318da918879ca45655afef95d55ce8..75d4886e648e7a6ae65258bc43a80fe6ec238ed7 100644 (file)
@@ -227,11 +227,17 @@ static void copy_data_pages(struct pbe *pblist)
                for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) {
                        if (saveable(zone, &zone_pfn)) {
                                struct page *page;
+                               long *src, *dst;
+                               int n;
+
                                page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
                                BUG_ON(!pbe);
                                pbe->orig_address = (unsigned long)page_address(page);
-                               /* copy_page is not usable for copying task structs. */
-                               memcpy((void *)pbe->address, (void *)pbe->orig_address, PAGE_SIZE);
+                               /* copy_page and memcpy are not usable for copying task structs. */
+                               dst = (long *)pbe->address;
+                               src = (long *)pbe->orig_address;
+                               for (n = PAGE_SIZE / sizeof(long); n; n--)
+                                       *dst++ = *src++;
                                pbe = pbe->next;
                        }
                }
index 044b8e0c102547fe909e1d25142dad3c311ad4f8..f1dd146bd64dd97237e5d4fb5d08cefaf3712158 100644 (file)
@@ -263,7 +263,6 @@ int swsusp_write(void)
        struct swap_map_handle handle;
        struct snapshot_handle snapshot;
        struct swsusp_info *header;
-       unsigned long start;
        int error;
 
        if ((error = swsusp_swap_check())) {
@@ -281,16 +280,17 @@ int swsusp_write(void)
        }
        error = get_swap_writer(&handle);
        if (!error) {
-               start = handle.cur_swap;
+               unsigned long start = handle.cur_swap;
                error = swap_write_page(&handle, header);
-       }
-       if (!error)
-               error = save_image(&handle, &snapshot, header->pages - 1);
-       if (!error) {
-               flush_swap_writer(&handle);
-               printk("S");
-               error = mark_swapfiles(swp_entry(root_swap, start));
-               printk("|\n");
+               if (!error)
+                       error = save_image(&handle, &snapshot,
+                                       header->pages - 1);
+               if (!error) {
+                       flush_swap_writer(&handle);
+                       printk("S");
+                       error = mark_swapfiles(swp_entry(root_swap, start));
+                       printk("|\n");
+               }
        }
        if (error)
                free_all_swap_pages(root_swap, handle.bitmap);
@@ -311,8 +311,10 @@ static atomic_t io_done = ATOMIC_INIT(0);
 
 static int end_io(struct bio *bio, unsigned int num, int err)
 {
-       if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
-               panic("I/O error reading memory image");
+       if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) {
+               printk(KERN_ERR "I/O error reading swsusp image.\n");
+               return -EIO;
+       }
        atomic_set(&io_done, 0);
        return 0;
 }
index bdba5d80496c98c9ccfe41a4372cd944d5b334a1..65ca0688f86f1b78fafd144671a17015b2fd1525 100644 (file)
@@ -52,7 +52,7 @@ int console_printk[4] = {
        DEFAULT_CONSOLE_LOGLEVEL,       /* default_console_loglevel */
 };
 
-EXPORT_SYMBOL(console_printk);
+EXPORT_UNUSED_SYMBOL(console_printk);  /*  June 2006  */
 
 /*
  * Low lever drivers may need that to know if they can schedule in
@@ -773,7 +773,7 @@ int is_console_locked(void)
 {
        return console_locked;
 }
-EXPORT_SYMBOL(is_console_locked);
+EXPORT_UNUSED_SYMBOL(is_console_locked);  /*  June 2006  */
 
 /**
  * release_console_sem - unlock the console system
index 129cf046e56173d16201bcc089eff410bd530eca..0dd3a857579e4fe1b9aae9463aac4717e149eaa9 100644 (file)
@@ -404,8 +404,6 @@ int insert_resource(struct resource *parent, struct resource *new)
        return result;
 }
 
-EXPORT_SYMBOL(insert_resource);
-
 /*
  * Given an existing resource, change its start and size to match the
  * arguments.  Returns -EBUSY if it can't fit.  Existing children of
index 494dac872a135823f42a6dec51a8dea301e05f17..948bd8f643e25a0c21c88134a61276eed74325c5 100644 (file)
@@ -275,6 +275,7 @@ static int test_func(void *data)
 
                /* Wait for the next command to be executed */
                schedule();
+               try_to_freeze();
 
                if (signal_pending(current))
                        flush_signals(current);
index 4ee400f9d56bc950c33c6afefd616ff1591359fc..b44b9a43b0fcadbe0745aafd876e2a17a7daa9d5 100644 (file)
@@ -51,6 +51,7 @@
 #include <linux/times.h>
 #include <linux/acct.h>
 #include <linux/kprobes.h>
+#include <linux/delayacct.h>
 #include <asm/tlb.h>
 
 #include <asm/unistd.h>
@@ -501,9 +502,36 @@ struct file_operations proc_schedstat_operations = {
        .release = single_release,
 };
 
+/*
+ * Expects runqueue lock to be held for atomicity of update
+ */
+static inline void
+rq_sched_info_arrive(struct rq *rq, unsigned long delta_jiffies)
+{
+       if (rq) {
+               rq->rq_sched_info.run_delay += delta_jiffies;
+               rq->rq_sched_info.pcnt++;
+       }
+}
+
+/*
+ * Expects runqueue lock to be held for atomicity of update
+ */
+static inline void
+rq_sched_info_depart(struct rq *rq, unsigned long delta_jiffies)
+{
+       if (rq)
+               rq->rq_sched_info.cpu_time += delta_jiffies;
+}
 # define schedstat_inc(rq, field)      do { (rq)->field++; } while (0)
 # define schedstat_add(rq, field, amt) do { (rq)->field += (amt); } while (0)
 #else /* !CONFIG_SCHEDSTATS */
+static inline void
+rq_sched_info_arrive(struct rq *rq, unsigned long delta_jiffies)
+{}
+static inline void
+rq_sched_info_depart(struct rq *rq, unsigned long delta_jiffies)
+{}
 # define schedstat_inc(rq, field)      do { } while (0)
 # define schedstat_add(rq, field, amt) do { } while (0)
 #endif
@@ -523,7 +551,7 @@ static inline struct rq *this_rq_lock(void)
        return rq;
 }
 
-#ifdef CONFIG_SCHEDSTATS
+#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
 /*
  * Called when a process is dequeued from the active array and given
  * the cpu.  We should note that with the exception of interactive
@@ -551,21 +579,16 @@ static inline void sched_info_dequeued(struct task_struct *t)
  */
 static void sched_info_arrive(struct task_struct *t)
 {
-       unsigned long now = jiffies, diff = 0;
-       struct rq *rq = task_rq(t);
+       unsigned long now = jiffies, delta_jiffies = 0;
 
        if (t->sched_info.last_queued)
-               diff = now - t->sched_info.last_queued;
+               delta_jiffies = now - t->sched_info.last_queued;
        sched_info_dequeued(t);
-       t->sched_info.run_delay += diff;
+       t->sched_info.run_delay += delta_jiffies;
        t->sched_info.last_arrival = now;
        t->sched_info.pcnt++;
 
-       if (!rq)
-               return;
-
-       rq->rq_sched_info.run_delay += diff;
-       rq->rq_sched_info.pcnt++;
+       rq_sched_info_arrive(task_rq(t), delta_jiffies);
 }
 
 /*
@@ -585,8 +608,9 @@ static void sched_info_arrive(struct task_struct *t)
  */
 static inline void sched_info_queued(struct task_struct *t)
 {
-       if (!t->sched_info.last_queued)
-               t->sched_info.last_queued = jiffies;
+       if (unlikely(sched_info_on()))
+               if (!t->sched_info.last_queued)
+                       t->sched_info.last_queued = jiffies;
 }
 
 /*
@@ -595,13 +619,10 @@ static inline void sched_info_queued(struct task_struct *t)
  */
 static inline void sched_info_depart(struct task_struct *t)
 {
-       struct rq *rq = task_rq(t);
-       unsigned long diff = jiffies - t->sched_info.last_arrival;
+       unsigned long delta_jiffies = jiffies - t->sched_info.last_arrival;
 
-       t->sched_info.cpu_time += diff;
-
-       if (rq)
-               rq->rq_sched_info.cpu_time += diff;
+       t->sched_info.cpu_time += delta_jiffies;
+       rq_sched_info_depart(task_rq(t), delta_jiffies);
 }
 
 /*
@@ -610,7 +631,7 @@ static inline void sched_info_depart(struct task_struct *t)
  * the idle task.)  We are only called when prev != next.
  */
 static inline void
-sched_info_switch(struct task_struct *prev, struct task_struct *next)
+__sched_info_switch(struct task_struct *prev, struct task_struct *next)
 {
        struct rq *rq = task_rq(prev);
 
@@ -625,10 +646,16 @@ sched_info_switch(struct task_struct *prev, struct task_struct *next)
        if (next != rq->idle)
                sched_info_arrive(next);
 }
+static inline void
+sched_info_switch(struct task_struct *prev, struct task_struct *next)
+{
+       if (unlikely(sched_info_on()))
+               __sched_info_switch(prev, next);
+}
 #else
 #define sched_info_queued(t)           do { } while (0)
 #define sched_info_switch(t, next)     do { } while (0)
-#endif /* CONFIG_SCHEDSTATS */
+#endif /* CONFIG_SCHEDSTATS || CONFIG_TASK_DELAY_ACCT */
 
 /*
  * Adding/removing a task to/from a priority array:
@@ -1530,8 +1557,9 @@ void fastcall sched_fork(struct task_struct *p, int clone_flags)
 
        INIT_LIST_HEAD(&p->run_list);
        p->array = NULL;
-#ifdef CONFIG_SCHEDSTATS
-       memset(&p->sched_info, 0, sizeof(p->sched_info));
+#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
+       if (unlikely(sched_info_on()))
+               memset(&p->sched_info, 0, sizeof(p->sched_info));
 #endif
 #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW)
        p->oncpu = 0;
@@ -1788,7 +1816,15 @@ context_switch(struct rq *rq, struct task_struct *prev,
                WARN_ON(rq->prev_mm);
                rq->prev_mm = oldmm;
        }
+       /*
+        * Since the runqueue lock will be released by the next
+        * task (which is an invalid locking op but in the case
+        * of the scheduler it's an obvious special-case), so we
+        * do an early lockdep release here:
+        */
+#ifndef __ARCH_WANT_UNLOCKED_CTXSW
        spin_release(&rq->lock.dep_map, 1, _THIS_IP_);
+#endif
 
        /* Here we just switch the register state and the stack. */
        switch_to(prev, next, prev);
@@ -3384,7 +3420,7 @@ EXPORT_SYMBOL(schedule);
 
 #ifdef CONFIG_PREEMPT
 /*
- * this is is the entry point to schedule() from in-kernel preemption
+ * this is the entry point to schedule() from in-kernel preemption
  * off of preempt_enable.  Kernel preemptions off return from interrupt
  * occur there and call schedule directly.
  */
@@ -3427,7 +3463,7 @@ need_resched:
 EXPORT_SYMBOL(preempt_schedule);
 
 /*
- * this is is the entry point to schedule() from kernel preemption
+ * this is the entry point to schedule() from kernel preemption
  * off of irq context.
  * Note, that this is called and return with irqs disabled. This will
  * protect us against recursive calling from irq.
@@ -3439,7 +3475,7 @@ asmlinkage void __sched preempt_schedule_irq(void)
        struct task_struct *task = current;
        int saved_lock_depth;
 #endif
-       /* Catch callers which need to be fixed*/
+       /* Catch callers which need to be fixed */
        BUG_ON(ti->preempt_count || !irqs_disabled());
 
 need_resched:
@@ -4526,9 +4562,11 @@ void __sched io_schedule(void)
 {
        struct rq *rq = &__raw_get_cpu_var(runqueues);
 
+       delayacct_blkio_start();
        atomic_inc(&rq->nr_iowait);
        schedule();
        atomic_dec(&rq->nr_iowait);
+       delayacct_blkio_end();
 }
 EXPORT_SYMBOL(io_schedule);
 
@@ -4537,9 +4575,11 @@ long __sched io_schedule_timeout(long timeout)
        struct rq *rq = &__raw_get_cpu_var(runqueues);
        long ret;
 
+       delayacct_blkio_start();
        atomic_inc(&rq->nr_iowait);
        ret = schedule_timeout(timeout);
        atomic_dec(&rq->nr_iowait);
+       delayacct_blkio_end();
        return ret;
 }
 
@@ -4650,7 +4690,7 @@ static inline struct task_struct *younger_sibling(struct task_struct *p)
        return list_entry(p->sibling.next,struct task_struct,sibling);
 }
 
-static const char *stat_nam[] = { "R", "S", "D", "T", "t", "Z", "X" };
+static const char stat_nam[] = "RSDTtZX";
 
 static void show_task(struct task_struct *p)
 {
@@ -4658,12 +4698,9 @@ static void show_task(struct task_struct *p)
        unsigned long free = 0;
        unsigned state;
 
-       printk("%-13.13s ", p->comm);
        state = p->state ? __ffs(p->state) + 1 : 0;
-       if (state < ARRAY_SIZE(stat_nam))
-               printk(stat_nam[state]);
-       else
-               printk("?");
+       printk("%-13.13s %c", p->comm,
+               state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?');
 #if (BITS_PER_LONG == 32)
        if (state == TASK_RUNNING)
                printk(" running ");
@@ -4877,7 +4914,7 @@ static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu)
                p->timestamp = p->timestamp - rq_src->timestamp_last_tick
                                + rq_dest->timestamp_last_tick;
                deactivate_task(p, rq_src);
-               activate_task(p, rq_dest, 0);
+               __activate_task(p, rq_dest);
                if (TASK_PREEMPTS_CURR(p, rq_dest))
                        resched_task(rq_dest->curr);
        }
@@ -5776,7 +5813,7 @@ static unsigned long long measure_migration_cost(int cpu1, int cpu2)
        cache = vmalloc(max_size);
        if (!cache) {
                printk("could not vmalloc %d bytes for cache!\n", 2*max_size);
-               return 1000000; // return 1 msec on very small boxen
+               return 1000000; /* return 1 msec on very small boxen */
        }
 
        while (size <= max_size) {
index 215541e26c1a079a7230eac7d0b83ad1a674ea25..0f08a84ae30718fe21d5430c5f33c86edebff1e9 100644 (file)
@@ -311,8 +311,6 @@ void open_softirq(int nr, void (*action)(struct softirq_action*), void *data)
        softirq_vec[nr].action = action;
 }
 
-EXPORT_SYMBOL(open_softirq);
-
 /* Tasklets */
 struct tasklet_head
 {
index dbb3b9c7ea64b17cf6aa7b96dcd007469e18f5d5..e236f98f7ec5d5460fa5eda7d97155bfb712df61 100644 (file)
@@ -1983,7 +1983,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
                        error = current->mm->dumpable;
                        break;
                case PR_SET_DUMPABLE:
-                       if (arg2 < 0 || arg2 > 2) {
+                       if (arg2 < 0 || arg2 > 1) {
                                error = -EINVAL;
                                break;
                        }
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
new file mode 100644 (file)
index 0000000..f45179c
--- /dev/null
@@ -0,0 +1,568 @@
+/*
+ * taskstats.c - Export per-task statistics to userland
+ *
+ * Copyright (C) Shailabh Nagar, IBM Corp. 2006
+ *           (C) Balbir Singh,   IBM Corp. 2006
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/taskstats_kern.h>
+#include <linux/delayacct.h>
+#include <linux/cpumask.h>
+#include <linux/percpu.h>
+#include <net/genetlink.h>
+#include <asm/atomic.h>
+
+/*
+ * Maximum length of a cpumask that can be specified in
+ * the TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK attribute
+ */
+#define TASKSTATS_CPUMASK_MAXLEN       (100+6*NR_CPUS)
+
+static DEFINE_PER_CPU(__u32, taskstats_seqnum) = { 0 };
+static int family_registered;
+kmem_cache_t *taskstats_cache;
+
+static struct genl_family family = {
+       .id             = GENL_ID_GENERATE,
+       .name           = TASKSTATS_GENL_NAME,
+       .version        = TASKSTATS_GENL_VERSION,
+       .maxattr        = TASKSTATS_CMD_ATTR_MAX,
+};
+
+static struct nla_policy taskstats_cmd_get_policy[TASKSTATS_CMD_ATTR_MAX+1]
+__read_mostly = {
+       [TASKSTATS_CMD_ATTR_PID]  = { .type = NLA_U32 },
+       [TASKSTATS_CMD_ATTR_TGID] = { .type = NLA_U32 },
+       [TASKSTATS_CMD_ATTR_REGISTER_CPUMASK] = { .type = NLA_STRING },
+       [TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK] = { .type = NLA_STRING },};
+
+struct listener {
+       struct list_head list;
+       pid_t pid;
+       char valid;
+};
+
+struct listener_list {
+       struct rw_semaphore sem;
+       struct list_head list;
+};
+static DEFINE_PER_CPU(struct listener_list, listener_array);
+
+enum actions {
+       REGISTER,
+       DEREGISTER,
+       CPU_DONT_CARE
+};
+
+static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp,
+                       void **replyp, size_t size)
+{
+       struct sk_buff *skb;
+       void *reply;
+
+       /*
+        * If new attributes are added, please revisit this allocation
+        */
+       skb = nlmsg_new(size);
+       if (!skb)
+               return -ENOMEM;
+
+       if (!info) {
+               int seq = get_cpu_var(taskstats_seqnum)++;
+               put_cpu_var(taskstats_seqnum);
+
+               reply = genlmsg_put(skb, 0, seq,
+                               family.id, 0, 0,
+                               cmd, family.version);
+       } else
+               reply = genlmsg_put(skb, info->snd_pid, info->snd_seq,
+                               family.id, 0, 0,
+                               cmd, family.version);
+       if (reply == NULL) {
+               nlmsg_free(skb);
+               return -EINVAL;
+       }
+
+       *skbp = skb;
+       *replyp = reply;
+       return 0;
+}
+
+/*
+ * Send taskstats data in @skb to listener with nl_pid @pid
+ */
+static int send_reply(struct sk_buff *skb, pid_t pid)
+{
+       struct genlmsghdr *genlhdr = nlmsg_data((struct nlmsghdr *)skb->data);
+       void *reply = genlmsg_data(genlhdr);
+       int rc;
+
+       rc = genlmsg_end(skb, reply);
+       if (rc < 0) {
+               nlmsg_free(skb);
+               return rc;
+       }
+
+       return genlmsg_unicast(skb, pid);
+}
+
+/*
+ * Send taskstats data in @skb to listeners registered for @cpu's exit data
+ */
+static int send_cpu_listeners(struct sk_buff *skb, unsigned int cpu)
+{
+       struct genlmsghdr *genlhdr = nlmsg_data((struct nlmsghdr *)skb->data);
+       struct listener_list *listeners;
+       struct listener *s, *tmp;
+       struct sk_buff *skb_next, *skb_cur = skb;
+       void *reply = genlmsg_data(genlhdr);
+       int rc, ret, delcount = 0;
+
+       rc = genlmsg_end(skb, reply);
+       if (rc < 0) {
+               nlmsg_free(skb);
+               return rc;
+       }
+
+       rc = 0;
+       listeners = &per_cpu(listener_array, cpu);
+       down_read(&listeners->sem);
+       list_for_each_entry_safe(s, tmp, &listeners->list, list) {
+               skb_next = NULL;
+               if (!list_is_last(&s->list, &listeners->list)) {
+                       skb_next = skb_clone(skb_cur, GFP_KERNEL);
+                       if (!skb_next) {
+                               nlmsg_free(skb_cur);
+                               rc = -ENOMEM;
+                               break;
+                       }
+               }
+               ret = genlmsg_unicast(skb_cur, s->pid);
+               if (ret == -ECONNREFUSED) {
+                       s->valid = 0;
+                       delcount++;
+                       rc = ret;
+               }
+               skb_cur = skb_next;
+       }
+       up_read(&listeners->sem);
+
+       if (!delcount)
+               return rc;
+
+       /* Delete invalidated entries */
+       down_write(&listeners->sem);
+       list_for_each_entry_safe(s, tmp, &listeners->list, list) {
+               if (!s->valid) {
+                       list_del(&s->list);
+                       kfree(s);
+               }
+       }
+       up_write(&listeners->sem);
+       return rc;
+}
+
+static int fill_pid(pid_t pid, struct task_struct *pidtsk,
+               struct taskstats *stats)
+{
+       int rc;
+       struct task_struct *tsk = pidtsk;
+
+       if (!pidtsk) {
+               read_lock(&tasklist_lock);
+               tsk = find_task_by_pid(pid);
+               if (!tsk) {
+                       read_unlock(&tasklist_lock);
+                       return -ESRCH;
+               }
+               get_task_struct(tsk);
+               read_unlock(&tasklist_lock);
+       } else
+               get_task_struct(tsk);
+
+       /*
+        * Each accounting subsystem adds calls to its functions to
+        * fill in relevant parts of struct taskstsats as follows
+        *
+        *      rc = per-task-foo(stats, tsk);
+        *      if (rc)
+        *              goto err;
+        */
+
+       rc = delayacct_add_tsk(stats, tsk);
+       stats->version = TASKSTATS_VERSION;
+
+       /* Define err: label here if needed */
+       put_task_struct(tsk);
+       return rc;
+
+}
+
+static int fill_tgid(pid_t tgid, struct task_struct *tgidtsk,
+               struct taskstats *stats)
+{
+       struct task_struct *tsk, *first;
+       unsigned long flags;
+
+       /*
+        * Add additional stats from live tasks except zombie thread group
+        * leaders who are already counted with the dead tasks
+        */
+       first = tgidtsk;
+       if (!first) {
+               read_lock(&tasklist_lock);
+               first = find_task_by_pid(tgid);
+               if (!first) {
+                       read_unlock(&tasklist_lock);
+                       return -ESRCH;
+               }
+               get_task_struct(first);
+               read_unlock(&tasklist_lock);
+       } else
+               get_task_struct(first);
+
+       /* Start with stats from dead tasks */
+       spin_lock_irqsave(&first->signal->stats_lock, flags);
+       if (first->signal->stats)
+               memcpy(stats, first->signal->stats, sizeof(*stats));
+       spin_unlock_irqrestore(&first->signal->stats_lock, flags);
+
+       tsk = first;
+       read_lock(&tasklist_lock);
+       do {
+               if (tsk->exit_state == EXIT_ZOMBIE && thread_group_leader(tsk))
+                       continue;
+               /*
+                * Accounting subsystem can call its functions here to
+                * fill in relevant parts of struct taskstsats as follows
+                *
+                *      per-task-foo(stats, tsk);
+                */
+               delayacct_add_tsk(stats, tsk);
+
+       } while_each_thread(first, tsk);
+       read_unlock(&tasklist_lock);
+       stats->version = TASKSTATS_VERSION;
+
+       /*
+        * Accounting subsytems can also add calls here to modify
+        * fields of taskstats.
+        */
+
+       return 0;
+}
+
+
+static void fill_tgid_exit(struct task_struct *tsk)
+{
+       unsigned long flags;
+
+       spin_lock_irqsave(&tsk->signal->stats_lock, flags);
+       if (!tsk->signal->stats)
+               goto ret;
+
+       /*
+        * Each accounting subsystem calls its functions here to
+        * accumalate its per-task stats for tsk, into the per-tgid structure
+        *
+        *      per-task-foo(tsk->signal->stats, tsk);
+        */
+       delayacct_add_tsk(tsk->signal->stats, tsk);
+ret:
+       spin_unlock_irqrestore(&tsk->signal->stats_lock, flags);
+       return;
+}
+
+static int add_del_listener(pid_t pid, cpumask_t *maskp, int isadd)
+{
+       struct listener_list *listeners;
+       struct listener *s, *tmp;
+       unsigned int cpu;
+       cpumask_t mask = *maskp;
+
+       if (!cpus_subset(mask, cpu_possible_map))
+               return -EINVAL;
+
+       if (isadd == REGISTER) {
+               for_each_cpu_mask(cpu, mask) {
+                       s = kmalloc_node(sizeof(struct listener), GFP_KERNEL,
+                                        cpu_to_node(cpu));
+                       if (!s)
+                               goto cleanup;
+                       s->pid = pid;
+                       INIT_LIST_HEAD(&s->list);
+                       s->valid = 1;
+
+                       listeners = &per_cpu(listener_array, cpu);
+                       down_write(&listeners->sem);
+                       list_add(&s->list, &listeners->list);
+                       up_write(&listeners->sem);
+               }
+               return 0;
+       }
+
+       /* Deregister or cleanup */
+cleanup:
+       for_each_cpu_mask(cpu, mask) {
+               listeners = &per_cpu(listener_array, cpu);
+               down_write(&listeners->sem);
+               list_for_each_entry_safe(s, tmp, &listeners->list, list) {
+                       if (s->pid == pid) {
+                               list_del(&s->list);
+                               kfree(s);
+                               break;
+                       }
+               }
+               up_write(&listeners->sem);
+       }
+       return 0;
+}
+
+static int parse(struct nlattr *na, cpumask_t *mask)
+{
+       char *data;
+       int len;
+       int ret;
+
+       if (na == NULL)
+               return 1;
+       len = nla_len(na);
+       if (len > TASKSTATS_CPUMASK_MAXLEN)
+               return -E2BIG;
+       if (len < 1)
+               return -EINVAL;
+       data = kmalloc(len, GFP_KERNEL);
+       if (!data)
+               return -ENOMEM;
+       nla_strlcpy(data, na, len);
+       ret = cpulist_parse(data, *mask);
+       kfree(data);
+       return ret;
+}
+
+static int taskstats_user_cmd(struct sk_buff *skb, struct genl_info *info)
+{
+       int rc = 0;
+       struct sk_buff *rep_skb;
+       struct taskstats stats;
+       void *reply;
+       size_t size;
+       struct nlattr *na;
+       cpumask_t mask;
+
+       rc = parse(info->attrs[TASKSTATS_CMD_ATTR_REGISTER_CPUMASK], &mask);
+       if (rc < 0)
+               return rc;
+       if (rc == 0)
+               return add_del_listener(info->snd_pid, &mask, REGISTER);
+
+       rc = parse(info->attrs[TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK], &mask);
+       if (rc < 0)
+               return rc;
+       if (rc == 0)
+               return add_del_listener(info->snd_pid, &mask, DEREGISTER);
+
+       /*
+        * Size includes space for nested attributes
+        */
+       size = nla_total_size(sizeof(u32)) +
+               nla_total_size(sizeof(struct taskstats)) + nla_total_size(0);
+
+       memset(&stats, 0, sizeof(stats));
+       rc = prepare_reply(info, TASKSTATS_CMD_NEW, &rep_skb, &reply, size);
+       if (rc < 0)
+               return rc;
+
+       if (info->attrs[TASKSTATS_CMD_ATTR_PID]) {
+               u32 pid = nla_get_u32(info->attrs[TASKSTATS_CMD_ATTR_PID]);
+               rc = fill_pid(pid, NULL, &stats);
+               if (rc < 0)
+                       goto err;
+
+               na = nla_nest_start(rep_skb, TASKSTATS_TYPE_AGGR_PID);
+               NLA_PUT_U32(rep_skb, TASKSTATS_TYPE_PID, pid);
+               NLA_PUT_TYPE(rep_skb, struct taskstats, TASKSTATS_TYPE_STATS,
+                               stats);
+       } else if (info->attrs[TASKSTATS_CMD_ATTR_TGID]) {
+               u32 tgid = nla_get_u32(info->attrs[TASKSTATS_CMD_ATTR_TGID]);
+               rc = fill_tgid(tgid, NULL, &stats);
+               if (rc < 0)
+                       goto err;
+
+               na = nla_nest_start(rep_skb, TASKSTATS_TYPE_AGGR_TGID);
+               NLA_PUT_U32(rep_skb, TASKSTATS_TYPE_TGID, tgid);
+               NLA_PUT_TYPE(rep_skb, struct taskstats, TASKSTATS_TYPE_STATS,
+                               stats);
+       } else {
+               rc = -EINVAL;
+               goto err;
+       }
+
+       nla_nest_end(rep_skb, na);
+
+       return send_reply(rep_skb, info->snd_pid);
+
+nla_put_failure:
+       return genlmsg_cancel(rep_skb, reply);
+err:
+       nlmsg_free(rep_skb);
+       return rc;
+}
+
+void taskstats_exit_alloc(struct taskstats **ptidstats, unsigned int *mycpu)
+{
+       struct listener_list *listeners;
+       struct taskstats *tmp;
+       /*
+        * This is the cpu on which the task is exiting currently and will
+        * be the one for which the exit event is sent, even if the cpu
+        * on which this function is running changes later.
+        */
+       *mycpu = raw_smp_processor_id();
+
+       *ptidstats = NULL;
+       tmp = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL);
+       if (!tmp)
+               return;
+
+       listeners = &per_cpu(listener_array, *mycpu);
+       down_read(&listeners->sem);
+       if (!list_empty(&listeners->list)) {
+               *ptidstats = tmp;
+               tmp = NULL;
+       }
+       up_read(&listeners->sem);
+       kfree(tmp);
+}
+
+/* Send pid data out on exit */
+void taskstats_exit_send(struct task_struct *tsk, struct taskstats *tidstats,
+                       int group_dead, unsigned int mycpu)
+{
+       int rc;
+       struct sk_buff *rep_skb;
+       void *reply;
+       size_t size;
+       int is_thread_group;
+       struct nlattr *na;
+       unsigned long flags;
+
+       if (!family_registered || !tidstats)
+               return;
+
+       spin_lock_irqsave(&tsk->signal->stats_lock, flags);
+       is_thread_group = tsk->signal->stats ? 1 : 0;
+       spin_unlock_irqrestore(&tsk->signal->stats_lock, flags);
+
+       rc = 0;
+       /*
+        * Size includes space for nested attributes
+        */
+       size = nla_total_size(sizeof(u32)) +
+               nla_total_size(sizeof(struct taskstats)) + nla_total_size(0);
+
+       if (is_thread_group)
+               size = 2 * size;        /* PID + STATS + TGID + STATS */
+
+       rc = prepare_reply(NULL, TASKSTATS_CMD_NEW, &rep_skb, &reply, size);
+       if (rc < 0)
+               goto ret;
+
+       rc = fill_pid(tsk->pid, tsk, tidstats);
+       if (rc < 0)
+               goto err_skb;
+
+       na = nla_nest_start(rep_skb, TASKSTATS_TYPE_AGGR_PID);
+       NLA_PUT_U32(rep_skb, TASKSTATS_TYPE_PID, (u32)tsk->pid);
+       NLA_PUT_TYPE(rep_skb, struct taskstats, TASKSTATS_TYPE_STATS,
+                       *tidstats);
+       nla_nest_end(rep_skb, na);
+
+       if (!is_thread_group)
+               goto send;
+
+       /*
+        * tsk has/had a thread group so fill the tsk->signal->stats structure
+        * Doesn't matter if tsk is the leader or the last group member leaving
+        */
+
+       fill_tgid_exit(tsk);
+       if (!group_dead)
+               goto send;
+
+       na = nla_nest_start(rep_skb, TASKSTATS_TYPE_AGGR_TGID);
+       NLA_PUT_U32(rep_skb, TASKSTATS_TYPE_TGID, (u32)tsk->tgid);
+       /* No locking needed for tsk->signal->stats since group is dead */
+       NLA_PUT_TYPE(rep_skb, struct taskstats, TASKSTATS_TYPE_STATS,
+                       *tsk->signal->stats);
+       nla_nest_end(rep_skb, na);
+
+send:
+       send_cpu_listeners(rep_skb, mycpu);
+       return;
+
+nla_put_failure:
+       genlmsg_cancel(rep_skb, reply);
+       goto ret;
+err_skb:
+       nlmsg_free(rep_skb);
+ret:
+       return;
+}
+
+static struct genl_ops taskstats_ops = {
+       .cmd            = TASKSTATS_CMD_GET,
+       .doit           = taskstats_user_cmd,
+       .policy         = taskstats_cmd_get_policy,
+};
+
+/* Needed early in initialization */
+void __init taskstats_init_early(void)
+{
+       unsigned int i;
+
+       taskstats_cache = kmem_cache_create("taskstats_cache",
+                                               sizeof(struct taskstats),
+                                               0, SLAB_PANIC, NULL, NULL);
+       for_each_possible_cpu(i) {
+               INIT_LIST_HEAD(&(per_cpu(listener_array, i).list));
+               init_rwsem(&(per_cpu(listener_array, i).sem));
+       }
+}
+
+static int __init taskstats_init(void)
+{
+       int rc;
+
+       rc = genl_register_family(&family);
+       if (rc)
+               return rc;
+
+       rc = genl_register_ops(&family, &taskstats_ops);
+       if (rc < 0)
+               goto err;
+
+       family_registered = 1;
+       return 0;
+err:
+       genl_unregister_family(&family);
+       return rc;
+}
+
+/*
+ * late initcall ensures initialization of statistics collection
+ * mechanisms precedes initialization of the taskstats interface
+ */
+late_initcall(taskstats_init);
index 396a3c024c2c5ba95a9cb663d009acba16b5df0f..05809c2e2fd601069bba39b591962e19d90d21e9 100644 (file)
@@ -374,6 +374,7 @@ int del_timer_sync(struct timer_list *timer)
                int ret = try_to_del_timer_sync(timer);
                if (ret >= 0)
                        return ret;
+               cpu_relax();
        }
 }
 
@@ -891,6 +892,7 @@ int do_settimeofday(struct timespec *tv)
        set_normalized_timespec(&xtime, sec, nsec);
        set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
 
+       clock->error = 0;
        ntp_clear();
 
        write_sequnlock_irqrestore(&xtime_lock, flags);
@@ -967,6 +969,7 @@ void __init timekeeping_init(void)
 }
 
 
+static int timekeeping_suspended;
 /*
  * timekeeping_resume - Resumes the generic timekeeping subsystem.
  * @dev:       unused
@@ -982,6 +985,18 @@ static int timekeeping_resume(struct sys_device *dev)
        write_seqlock_irqsave(&xtime_lock, flags);
        /* restart the last cycle value */
        clock->cycle_last = clocksource_read(clock);
+       clock->error = 0;
+       timekeeping_suspended = 0;
+       write_sequnlock_irqrestore(&xtime_lock, flags);
+       return 0;
+}
+
+static int timekeeping_suspend(struct sys_device *dev, pm_message_t state)
+{
+       unsigned long flags;
+
+       write_seqlock_irqsave(&xtime_lock, flags);
+       timekeeping_suspended = 1;
        write_sequnlock_irqrestore(&xtime_lock, flags);
        return 0;
 }
@@ -989,6 +1004,7 @@ static int timekeeping_resume(struct sys_device *dev)
 /* sysfs resume/suspend bits for timekeeping */
 static struct sysdev_class timekeeping_sysclass = {
        .resume         = timekeeping_resume,
+       .suspend        = timekeeping_suspend,
        set_kset_name("timekeeping"),
 };
 
@@ -1008,52 +1024,52 @@ static int __init timekeeping_init_device(void)
 device_initcall(timekeeping_init_device);
 
 /*
- * If the error is already larger, we look ahead another tick,
+ * If the error is already larger, we look ahead even further
  * to compensate for late or lost adjustments.
  */
-static __always_inline int clocksource_bigadjust(int sign, s64 error, s64 *interval, s64 *offset)
+static __always_inline int clocksource_bigadjust(s64 error, s64 *interval, s64 *offset)
 {
-       int adj;
+       s64 tick_error, i;
+       u32 look_ahead, adj;
+       s32 error2, mult;
 
        /*
-        * As soon as the machine is synchronized to the external time
-        * source this should be the common case.
+        * Use the current error value to determine how much to look ahead.
+        * The larger the error the slower we adjust for it to avoid problems
+        * with losing too many ticks, otherwise we would overadjust and
+        * produce an even larger error.  The smaller the adjustment the
+        * faster we try to adjust for it, as lost ticks can do less harm
+        * here.  This is tuned so that an error of about 1 msec is adusted
+        * within about 1 sec (or 2^20 nsec in 2^SHIFT_HZ ticks).
         */
-       error >>= 2;
-       if (likely(sign > 0 ? error <= *interval : error >= *interval))
-               return sign;
+       error2 = clock->error >> (TICK_LENGTH_SHIFT + 22 - 2 * SHIFT_HZ);
+       error2 = abs(error2);
+       for (look_ahead = 0; error2 > 0; look_ahead++)
+               error2 >>= 2;
 
        /*
-        * An extra look ahead dampens the effect of the current error,
-        * which can grow quite large with continously late updates, as
-        * it would dominate the adjustment value and can lead to
-        * oscillation.
+        * Now calculate the error in (1 << look_ahead) ticks, but first
+        * remove the single look ahead already included in the error.
         */
-       error += current_tick_length() >> (TICK_LENGTH_SHIFT - clock->shift + 1);
-       error -= clock->xtime_interval >> 1;
-
-       adj = 0;
-       while (1) {
-               error >>= 1;
-               if (sign > 0 ? error <= *interval : error >= *interval)
-                       break;
-               adj++;
+       tick_error = current_tick_length() >> (TICK_LENGTH_SHIFT - clock->shift + 1);
+       tick_error -= clock->xtime_interval >> 1;
+       error = ((error - tick_error) >> look_ahead) + tick_error;
+
+       /* Finally calculate the adjustment shift value.  */
+       i = *interval;
+       mult = 1;
+       if (error < 0) {
+               error = -error;
+               *interval = -*interval;
+               *offset = -*offset;
+               mult = -1;
        }
-
-       /*
-        * Add the current adjustments to the error and take the offset
-        * into account, the latter can cause the error to be hardly
-        * reduced at the next tick. Check the error again if there's
-        * room for another adjustment, thus further reducing the error
-        * which otherwise had to be corrected at the next update.
-        */
-       error = (error << 1) - *interval + *offset;
-       if (sign > 0 ? error > *interval : error < *interval)
-               adj++;
+       for (adj = 0; error > i; adj++)
+               error >>= 1;
 
        *interval <<= adj;
        *offset <<= adj;
-       return sign << adj;
+       return mult << adj;
 }
 
 /*
@@ -1068,11 +1084,19 @@ static void clocksource_adjust(struct clocksource *clock, s64 offset)
 
        error = clock->error >> (TICK_LENGTH_SHIFT - clock->shift - 1);
        if (error > interval) {
-               adj = clocksource_bigadjust(1, error, &interval, &offset);
+               error >>= 2;
+               if (likely(error <= interval))
+                       adj = 1;
+               else
+                       adj = clocksource_bigadjust(error, &interval, &offset);
        } else if (error < -interval) {
-               interval = -interval;
-               offset = -offset;
-               adj = clocksource_bigadjust(-1, error, &interval, &offset);
+               error >>= 2;
+               if (likely(error >= -interval)) {
+                       adj = -1;
+                       interval = -interval;
+                       offset = -offset;
+               } else
+                       adj = clocksource_bigadjust(error, &interval, &offset);
        } else
                return;
 
@@ -1091,13 +1115,16 @@ static void update_wall_time(void)
 {
        cycle_t offset;
 
-       clock->xtime_nsec += (s64)xtime.tv_nsec << clock->shift;
+       /* Make sure we're fully resumed: */
+       if (unlikely(timekeeping_suspended))
+               return;
 
 #ifdef CONFIG_GENERIC_TIME
        offset = (clocksource_read(clock) - clock->cycle_last) & clock->mask;
 #else
        offset = clock->cycle_interval;
 #endif
+       clock->xtime_nsec += (s64)xtime.tv_nsec << clock->shift;
 
        /* normally this loop will run just once, however in the
         * case of lost or late ticks, it will accumulate correctly.
@@ -1129,7 +1156,7 @@ static void update_wall_time(void)
        clocksource_adjust(clock, offset);
 
        /* store full nanoseconds into xtime */
-       xtime.tv_nsec = clock->xtime_nsec >> clock->shift;
+       xtime.tv_nsec = (s64)clock->xtime_nsec >> clock->shift;
        clock->xtime_nsec -= (s64)xtime.tv_nsec << clock->shift;
 
        /* check to see if there is a new clocksource to use */
index a1d57aeb7f7543fe2eeedb4aa8d8899f5abf3242..59a82f63275df037dd5bfb1062cffe317a698383 100644 (file)
 #include <linux/wait.h>
 #include <linux/hash.h>
 
-struct lock_class_key waitqueue_lock_key;
+void init_waitqueue_head(wait_queue_head_t *q)
+{
+       spin_lock_init(&q->lock);
+       INIT_LIST_HEAD(&q->task_list);
+}
 
-EXPORT_SYMBOL(waitqueue_lock_key);
+EXPORT_SYMBOL(init_waitqueue_head);
 
 void fastcall add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)
 {
index e5889b1a33ff6fbec48441ee0c158b3323703715..554ee688a9f8a397cad63a96458ca5d1198b88e7 100644 (file)
@@ -158,7 +158,7 @@ config DEBUG_RWSEMS
 
 config DEBUG_LOCK_ALLOC
        bool "Lock debugging: detect incorrect freeing of live locks"
-       depends on TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
+       depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
        select DEBUG_SPINLOCK
        select DEBUG_MUTEXES
        select DEBUG_RWSEMS
@@ -173,7 +173,7 @@ config DEBUG_LOCK_ALLOC
 
 config PROVE_LOCKING
        bool "Lock debugging: prove locking correctness"
-       depends on TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
+       depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
        select LOCKDEP
        select DEBUG_SPINLOCK
        select DEBUG_MUTEXES
@@ -216,7 +216,7 @@ config PROVE_LOCKING
 
 config LOCKDEP
        bool
-       depends on TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
+       depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
        select STACKTRACE
        select FRAME_POINTER
        select KALLSYMS
@@ -224,13 +224,14 @@ config LOCKDEP
 
 config DEBUG_LOCKDEP
        bool "Lock dependency engine debugging"
-       depends on LOCKDEP
+       depends on DEBUG_KERNEL && LOCKDEP
        help
          If you say Y here, the lock dependency engine will do
          additional runtime checks to debug itself, at the price
          of more runtime overhead.
 
 config TRACE_IRQFLAGS
+       depends on DEBUG_KERNEL
        bool
        default y
        depends on TRACE_IRQFLAGS_SUPPORT
@@ -256,6 +257,7 @@ config DEBUG_LOCKING_API_SELFTESTS
 
 config STACKTRACE
        bool
+       depends on DEBUG_KERNEL
        depends on STACKTRACE_SUPPORT
 
 config DEBUG_KOBJECT
index 4d096819511a810eafbf4fe6e0a240c120012676..16d2143fea4847e5c367e56d87db654599109713 100644 (file)
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -38,14 +38,15 @@ static kmem_cache_t *idr_layer_cache;
 static struct idr_layer *alloc_layer(struct idr *idp)
 {
        struct idr_layer *p;
+       unsigned long flags;
 
-       spin_lock(&idp->lock);
+       spin_lock_irqsave(&idp->lock, flags);
        if ((p = idp->id_free)) {
                idp->id_free = p->ary[0];
                idp->id_free_cnt--;
                p->ary[0] = NULL;
        }
-       spin_unlock(&idp->lock);
+       spin_unlock_irqrestore(&idp->lock, flags);
        return(p);
 }
 
@@ -59,12 +60,14 @@ static void __free_layer(struct idr *idp, struct idr_layer *p)
 
 static void free_layer(struct idr *idp, struct idr_layer *p)
 {
+       unsigned long flags;
+
        /*
         * Depends on the return element being zeroed.
         */
-       spin_lock(&idp->lock);
+       spin_lock_irqsave(&idp->lock, flags);
        __free_layer(idp, p);
-       spin_unlock(&idp->lock);
+       spin_unlock_irqrestore(&idp->lock, flags);
 }
 
 /**
@@ -168,6 +171,7 @@ static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id)
 {
        struct idr_layer *p, *new;
        int layers, v, id;
+       unsigned long flags;
 
        id = starting_id;
 build_up:
@@ -191,14 +195,14 @@ build_up:
                         * The allocation failed.  If we built part of
                         * the structure tear it down.
                         */
-                       spin_lock(&idp->lock);
+                       spin_lock_irqsave(&idp->lock, flags);
                        for (new = p; p && p != idp->top; new = p) {
                                p = p->ary[0];
                                new->ary[0] = NULL;
                                new->bitmap = new->count = 0;
                                __free_layer(idp, new);
                        }
-                       spin_unlock(&idp->lock);
+                       spin_unlock_irqrestore(&idp->lock, flags);
                        return -1;
                }
                new->ary[0] = p;
index d213feded10df30d04fedd2e744fc89ab3f6f934..50353e0dac12dc41441b64c78b59c852140f76c4 100644 (file)
@@ -29,9 +29,7 @@ unsigned long max_low_pfn;
 unsigned long min_low_pfn;
 unsigned long max_pfn;
 
-EXPORT_SYMBOL(max_pfn);                /* This is exported so
-                                * dma_get_required_mask(), which uses
-                                * it, can be an inline function */
+EXPORT_UNUSED_SYMBOL(max_pfn);  /*  June 2006  */
 
 static LIST_HEAD(bdata_list);
 #ifdef CONFIG_CRASH_DUMP
index 0a03357a1f8ed08277070275b494f3d2a7cc9c88..60a5d55e51d949588cc60fb5ed8f138b37f372ad 100644 (file)
 /*
  * POSIX_FADV_WILLNEED could set PG_Referenced, and POSIX_FADV_NOREUSE could
  * deactivate the pages and clear PG_Referenced.
- *
- * LINUX_FADV_ASYNC_WRITE: start async writeout of any dirty pages between file
- * offsets `offset' and `offset+len' inclusive.  Any pages which are currently
- * under writeout are skipped, whether or not they are dirty.
- *
- * LINUX_FADV_WRITE_WAIT: wait upon writeout of any dirty pages between file
- * offsets `offset' and `offset+len'.
- *
- * By combining these two operations the application may do several things:
- *
- * LINUX_FADV_ASYNC_WRITE: push some or all of the dirty pages at the disk.
- *
  */
 asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice)
 {
index c1e14c9e67e4da1c8696f0cc695e0b1212a302a2..109e9866237ec7992daa1e7c441e07dbfe976151 100644 (file)
@@ -47,6 +47,7 @@
 #include <linux/pagemap.h>
 #include <linux/rmap.h>
 #include <linux/module.h>
+#include <linux/delayacct.h>
 #include <linux/init.h>
 
 #include <asm/pgalloc.h>
@@ -1549,9 +1550,9 @@ gotten:
                flush_cache_page(vma, address, pte_pfn(orig_pte));
                entry = mk_pte(new_page, vma->vm_page_prot);
                entry = maybe_mkwrite(pte_mkdirty(entry), vma);
+               lazy_mmu_prot_update(entry);
                ptep_establish(vma, address, page_table, entry);
                update_mmu_cache(vma, address, entry);
-               lazy_mmu_prot_update(entry);
                lru_cache_add_active(new_page);
                page_add_new_anon_rmap(new_page, vma, address);
 
@@ -1853,7 +1854,7 @@ int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end)
 
        return 0;
 }
-EXPORT_SYMBOL(vmtruncate_range);
+EXPORT_UNUSED_SYMBOL(vmtruncate_range);  /*  June 2006  */
 
 /* 
  * Primitive swap readahead code. We simply read an aligned block of
@@ -1934,6 +1935,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
                migration_entry_wait(mm, pmd, address);
                goto out;
        }
+       delayacct_set_flag(DELAYACCT_PF_SWAPIN);
        page = lookup_swap_cache(entry);
        if (!page) {
                swapin_readahead(entry, address, vma);
@@ -1946,6 +1948,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
                        page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
                        if (likely(pte_same(*page_table, orig_pte)))
                                ret = VM_FAULT_OOM;
+                       delayacct_clear_flag(DELAYACCT_PF_SWAPIN);
                        goto unlock;
                }
 
@@ -1955,6 +1958,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
                grab_swap_token();
        }
 
+       delayacct_clear_flag(DELAYACCT_PF_SWAPIN);
        mark_page_accessed(page);
        lock_page(page);
 
index 0959ee1a4795e65b3dba523770b0d2ea4033baca..febea1c981685af5f05122434aa6f0ce11778430 100644 (file)
@@ -14,7 +14,7 @@ struct pglist_data *first_online_pgdat(void)
        return NODE_DATA(first_online_node);
 }
 
-EXPORT_SYMBOL(first_online_pgdat);
+EXPORT_UNUSED_SYMBOL(first_online_pgdat);  /*  June 2006  */
 
 struct pglist_data *next_online_pgdat(struct pglist_data *pgdat)
 {
@@ -24,7 +24,7 @@ struct pglist_data *next_online_pgdat(struct pglist_data *pgdat)
                return NULL;
        return NODE_DATA(nid);
 }
-EXPORT_SYMBOL(next_online_pgdat);
+EXPORT_UNUSED_SYMBOL(next_online_pgdat);  /*  June 2006  */
 
 
 /*
@@ -45,5 +45,5 @@ struct zone *next_zone(struct zone *zone)
        }
        return zone;
 }
-EXPORT_SYMBOL(next_zone);
+EXPORT_UNUSED_SYMBOL(next_zone);  /*  June 2006  */
 
index 5151c44a8257aa49cecfa7ffb38572e9bad93dc4..c576df71e3bbd1b3f0527bb69b8d778daf20af9b 100644 (file)
@@ -1070,6 +1070,7 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
        vma->vm_start = vma->vm_pgoff << PAGE_SHIFT;
        return 0;
 }
+EXPORT_SYMBOL(remap_pfn_range);
 
 void swap_unplug_io_fn(struct backing_dev_info *bdi, struct page *page)
 {
@@ -1090,6 +1091,7 @@ void unmap_mapping_range(struct address_space *mapping,
                         int even_cows)
 {
 }
+EXPORT_SYMBOL(unmap_mapping_range);
 
 /*
  * Check that a process has enough memory to allocate a new virtual
index 85c2e03098a7fcf60f9c2f250b0af5a72a0330cf..0f20843beffdb504574dc471bfaacf12abfd902d 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -674,6 +674,37 @@ static struct kmem_cache cache_cache = {
 #endif
 };
 
+#ifdef CONFIG_LOCKDEP
+
+/*
+ * Slab sometimes uses the kmalloc slabs to store the slab headers
+ * for other slabs "off slab".
+ * The locking for this is tricky in that it nests within the locks
+ * of all other slabs in a few places; to deal with this special
+ * locking we put on-slab caches into a separate lock-class.
+ */
+static struct lock_class_key on_slab_key;
+
+static inline void init_lock_keys(struct cache_sizes *s)
+{
+       int q;
+
+       for (q = 0; q < MAX_NUMNODES; q++) {
+               if (!s->cs_cachep->nodelists[q] || OFF_SLAB(s->cs_cachep))
+                       continue;
+               lockdep_set_class(&s->cs_cachep->nodelists[q]->list_lock,
+                                 &on_slab_key);
+       }
+}
+
+#else
+static inline void init_lock_keys(struct cache_sizes *s)
+{
+}
+#endif
+
+
+
 /* Guard access to the cache-chain. */
 static DEFINE_MUTEX(cache_chain_mutex);
 static struct list_head cache_chain;
@@ -1021,8 +1052,7 @@ static void drain_alien_cache(struct kmem_cache *cachep,
        }
 }
 
-static inline int cache_free_alien(struct kmem_cache *cachep, void *objp,
-                                  int nesting)
+static inline int cache_free_alien(struct kmem_cache *cachep, void *objp)
 {
        struct slab *slabp = virt_to_slab(objp);
        int nodeid = slabp->nodeid;
@@ -1040,7 +1070,7 @@ static inline int cache_free_alien(struct kmem_cache *cachep, void *objp,
        STATS_INC_NODEFREES(cachep);
        if (l3->alien && l3->alien[nodeid]) {
                alien = l3->alien[nodeid];
-               spin_lock_nested(&alien->lock, nesting);
+               spin_lock(&alien->lock);
                if (unlikely(alien->avail == alien->limit)) {
                        STATS_INC_ACOVERFLOW(cachep);
                        __drain_alien_cache(cachep, alien, nodeid);
@@ -1069,8 +1099,7 @@ static inline void free_alien_cache(struct array_cache **ac_ptr)
 {
 }
 
-static inline int cache_free_alien(struct kmem_cache *cachep, void *objp,
-                                  int nesting)
+static inline int cache_free_alien(struct kmem_cache *cachep, void *objp)
 {
        return 0;
 }
@@ -1393,6 +1422,7 @@ void __init kmem_cache_init(void)
                                        ARCH_KMALLOC_FLAGS|SLAB_PANIC,
                                        NULL, NULL);
                }
+               init_lock_keys(sizes);
 
                sizes->cs_dmacachep = kmem_cache_create(names->name_dma,
                                        sizes->cs_size,
@@ -1760,8 +1790,6 @@ static void slab_destroy_objs(struct kmem_cache *cachep, struct slab *slabp)
 }
 #endif
 
-static void __cache_free(struct kmem_cache *cachep, void *objp, int nesting);
-
 /**
  * slab_destroy - destroy and release all objects in a slab
  * @cachep: cache pointer being destroyed
@@ -1785,17 +1813,8 @@ static void slab_destroy(struct kmem_cache *cachep, struct slab *slabp)
                call_rcu(&slab_rcu->head, kmem_rcu_free);
        } else {
                kmem_freepages(cachep, addr);
-               if (OFF_SLAB(cachep)) {
-                       unsigned long flags;
-
-                       /*
-                        * lockdep: we may nest inside an already held
-                        * ac->lock, so pass in a nesting flag:
-                        */
-                       local_irq_save(flags);
-                       __cache_free(cachep->slabp_cache, slabp, 1);
-                       local_irq_restore(flags);
-               }
+               if (OFF_SLAB(cachep))
+                       kmem_cache_free(cachep->slabp_cache, slabp);
        }
 }
 
@@ -3100,16 +3119,7 @@ static void free_block(struct kmem_cache *cachep, void **objpp, int nr_objects,
                if (slabp->inuse == 0) {
                        if (l3->free_objects > l3->free_limit) {
                                l3->free_objects -= cachep->num;
-                               /*
-                                * It is safe to drop the lock. The slab is
-                                * no longer linked to the cache. cachep
-                                * cannot disappear - we are using it and
-                                * all destruction of caches must be
-                                * serialized properly by the user.
-                                */
-                               spin_unlock(&l3->list_lock);
                                slab_destroy(cachep, slabp);
-                               spin_lock(&l3->list_lock);
                        } else {
                                list_add(&slabp->list, &l3->slabs_free);
                        }
@@ -3135,7 +3145,7 @@ static void cache_flusharray(struct kmem_cache *cachep, struct array_cache *ac)
 #endif
        check_irq_off();
        l3 = cachep->nodelists[node];
-       spin_lock_nested(&l3->list_lock, SINGLE_DEPTH_NESTING);
+       spin_lock(&l3->list_lock);
        if (l3->shared) {
                struct array_cache *shared_array = l3->shared;
                int max = shared_array->limit - shared_array->avail;
@@ -3178,14 +3188,14 @@ free_done:
  * Release an obj back to its cache. If the obj has a constructed state, it must
  * be in this state _before_ it is released.  Called with disabled ints.
  */
-static void __cache_free(struct kmem_cache *cachep, void *objp, int nesting)
+static inline void __cache_free(struct kmem_cache *cachep, void *objp)
 {
        struct array_cache *ac = cpu_cache_get(cachep);
 
        check_irq_off();
        objp = cache_free_debugcheck(cachep, objp, __builtin_return_address(0));
 
-       if (cache_free_alien(cachep, objp, nesting))
+       if (cache_free_alien(cachep, objp))
                return;
 
        if (likely(ac->avail < ac->limit)) {
@@ -3424,7 +3434,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
        BUG_ON(virt_to_cache(objp) != cachep);
 
        local_irq_save(flags);
-       __cache_free(cachep, objp, 0);
+       __cache_free(cachep, objp);
        local_irq_restore(flags);
 }
 EXPORT_SYMBOL(kmem_cache_free);
@@ -3449,7 +3459,7 @@ void kfree(const void *objp)
        kfree_debugcheck(objp);
        c = virt_to_cache(objp);
        debug_check_no_locks_freed(objp, obj_size(c));
-       __cache_free(c, (void *)objp, 0);
+       __cache_free(c, (void *)objp);
        local_irq_restore(flags);
 }
 EXPORT_SYMBOL(kfree);
index 7b450798b458874f4f835aba6be4acb8da1cb35d..266162d2ba28254a9c8ca4366a8262d81d032f3c 100644 (file)
@@ -340,7 +340,7 @@ void __vunmap(void *addr, int deallocate_pages)
                        __free_page(area->pages[i]);
                }
 
-               if (area->nr_pages > PAGE_SIZE/sizeof(struct page *))
+               if (area->flags & VM_VPAGES)
                        vfree(area->pages);
                else
                        kfree(area->pages);
@@ -427,9 +427,10 @@ void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
 
        area->nr_pages = nr_pages;
        /* Please note that the recursion is strictly bounded. */
-       if (array_size > PAGE_SIZE)
+       if (array_size > PAGE_SIZE) {
                pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node);
-       else
+               area->flags |= VM_VPAGES;
+       } else
                pages = kmalloc_node(array_size, (gfp_mask & ~__GFP_HIGHMEM), node);
        area->pages = pages;
        if (!area->pages) {
index 73b83d67bab679c6b4c4c12fbf5a5f1164b8482c..dfdf24133901790e8ca744934bb57279aa25dee5 100644 (file)
@@ -81,6 +81,7 @@ void all_vm_events(unsigned long *ret)
 {
        sum_vm_events(ret, &cpu_online_map);
 }
+EXPORT_SYMBOL_GPL(all_vm_events);
 
 #ifdef CONFIG_HOTPLUG
 /*
index 121bf6f4914897713f0c9672e41b39f54501fd3b..2e62105d91bdc48c6578cdd55280f8a8bb318665 100644 (file)
@@ -962,7 +962,6 @@ static struct file_operations arp_seq_fops = {
 
 static int __init atm_clip_init(void)
 {
-       struct proc_dir_entry *p;
        neigh_table_init_no_netlink(&clip_tbl);
 
        clip_tbl_hook = &clip_tbl;
@@ -972,9 +971,15 @@ static int __init atm_clip_init(void)
 
        setup_timer(&idle_timer, idle_timer_check, 0);
 
-       p = create_proc_entry("arp", S_IRUGO, atm_proc_root);
-       if (p)
-               p->proc_fops = &arp_seq_fops;
+#ifdef CONFIG_PROC_FS
+       {
+               struct proc_dir_entry *p;
+
+               p = create_proc_entry("arp", S_IRUGO, atm_proc_root);
+               if (p)
+                       p->proc_fops = &arp_seq_fops;
+       }
+#endif
 
        return 0;
 }
index 4b1faca5013ff8d573ef784253c77e867be1fcbc..1d3de42fada074ed5458e67dc1d5e7ebbbe208c4 100644 (file)
 /*
  * skb_migrate appends the list at "from" to "to", emptying "from" in the
  * process. skb_migrate is atomic with respect to all other skb operations on
- * "from" and "to". Note that it locks both lists at the same time, so beware
- * of potential deadlocks.
+ * "from" and "to". Note that it locks both lists at the same time, so to deal
+ * with the lock ordering, the locks are taken in address order.
  *
  * This function should live in skbuff.c or skbuff.h.
  */
 
 
-void skb_migrate(struct sk_buff_head *from,struct sk_buff_head *to)
+void skb_migrate(struct sk_buff_head *from, struct sk_buff_head *to)
 {
        unsigned long flags;
        struct sk_buff *skb_from = (struct sk_buff *) from;
        struct sk_buff *skb_to = (struct sk_buff *) to;
        struct sk_buff *prev;
 
-       spin_lock_irqsave(&from->lock,flags);
-       spin_lock(&to->lock);
+       if ((unsigned long) from < (unsigned long) to) {
+               spin_lock_irqsave(&from->lock, flags);
+               spin_lock_nested(&to->lock, SINGLE_DEPTH_NESTING);
+       } else {
+               spin_lock_irqsave(&to->lock, flags);
+               spin_lock_nested(&from->lock, SINGLE_DEPTH_NESTING);
+       }
        prev = from->prev;
        from->next->prev = to->prev;
        prev->next = skb_to;
@@ -51,7 +56,7 @@ void skb_migrate(struct sk_buff_head *from,struct sk_buff_head *to)
        from->prev = skb_from;
        from->next = skb_from;
        from->qlen = 0;
-       spin_unlock_irqrestore(&from->lock,flags);
+       spin_unlock_irqrestore(&from->lock, flags);
 }
 
 
index 10a3c0aa83987be6e563ed8439e7872f1a9419b4..000695c48583c07d2005fd9446a58671f8f8455f 100644 (file)
@@ -145,7 +145,7 @@ struct sock *ax25_find_listener(ax25_address *addr, int digi,
        ax25_cb *s;
        struct hlist_node *node;
 
-       spin_lock_bh(&ax25_list_lock);
+       spin_lock(&ax25_list_lock);
        ax25_for_each(s, node, &ax25_list) {
                if ((s->iamdigi && !digi) || (!s->iamdigi && digi))
                        continue;
@@ -154,12 +154,12 @@ struct sock *ax25_find_listener(ax25_address *addr, int digi,
                        /* If device is null we match any device */
                        if (s->ax25_dev == NULL || s->ax25_dev->dev == dev) {
                                sock_hold(s->sk);
-                               spin_unlock_bh(&ax25_list_lock);
+                               spin_unlock(&ax25_list_lock);
                                return s->sk;
                        }
                }
        }
-       spin_unlock_bh(&ax25_list_lock);
+       spin_unlock(&ax25_list_lock);
 
        return NULL;
 }
@@ -174,7 +174,7 @@ struct sock *ax25_get_socket(ax25_address *my_addr, ax25_address *dest_addr,
        ax25_cb *s;
        struct hlist_node *node;
 
-       spin_lock_bh(&ax25_list_lock);
+       spin_lock(&ax25_list_lock);
        ax25_for_each(s, node, &ax25_list) {
                if (s->sk && !ax25cmp(&s->source_addr, my_addr) &&
                    !ax25cmp(&s->dest_addr, dest_addr) &&
@@ -185,7 +185,7 @@ struct sock *ax25_get_socket(ax25_address *my_addr, ax25_address *dest_addr,
                }
        }
 
-       spin_unlock_bh(&ax25_list_lock);
+       spin_unlock(&ax25_list_lock);
 
        return sk;
 }
@@ -235,7 +235,7 @@ void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto)
        struct sk_buff *copy;
        struct hlist_node *node;
 
-       spin_lock_bh(&ax25_list_lock);
+       spin_lock(&ax25_list_lock);
        ax25_for_each(s, node, &ax25_list) {
                if (s->sk != NULL && ax25cmp(&s->source_addr, addr) == 0 &&
                    s->sk->sk_type == SOCK_RAW &&
@@ -248,7 +248,7 @@ void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto)
                                kfree_skb(copy);
                }
        }
-       spin_unlock_bh(&ax25_list_lock);
+       spin_unlock(&ax25_list_lock);
 }
 
 /*
@@ -486,10 +486,9 @@ ax25_cb *ax25_create_cb(void)
 {
        ax25_cb *ax25;
 
-       if ((ax25 = kmalloc(sizeof(*ax25), GFP_ATOMIC)) == NULL)
+       if ((ax25 = kzalloc(sizeof(*ax25), GFP_ATOMIC)) == NULL)
                return NULL;
 
-       memset(ax25, 0x00, sizeof(*ax25));
        atomic_set(&ax25->refcount, 1);
 
        skb_queue_head_init(&ax25->write_queue);
index 47e6e790bd67951025681549b3b6d034fe8d0d9e..b787678220fff4d6df193d720208fa67ed981b0f 100644 (file)
@@ -55,15 +55,13 @@ void ax25_dev_device_up(struct net_device *dev)
 {
        ax25_dev *ax25_dev;
 
-       if ((ax25_dev = kmalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) {
+       if ((ax25_dev = kzalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) {
                printk(KERN_ERR "AX.25: ax25_dev_device_up - out of memory\n");
                return;
        }
 
        ax25_unregister_sysctl();
 
-       memset(ax25_dev, 0x00, sizeof(*ax25_dev));
-
        dev->ax25_ptr     = ax25_dev;
        ax25_dev->dev     = dev;
        dev_hold(dev);
index 1d4ab641f82be6094255f9046983a3b33fa9e570..4d22d4430ec8a85128484685c4886ca4adc73cfa 100644 (file)
@@ -80,7 +80,7 @@ void ax25_ds_enquiry_response(ax25_cb *ax25)
        ax25_start_t3timer(ax25);
        ax25_ds_set_timer(ax25->ax25_dev);
 
-       spin_lock_bh(&ax25_list_lock);
+       spin_lock(&ax25_list_lock);
        ax25_for_each(ax25o, node, &ax25_list) {
                if (ax25o == ax25)
                        continue;
@@ -106,7 +106,7 @@ void ax25_ds_enquiry_response(ax25_cb *ax25)
                if (ax25o->state != AX25_STATE_0)
                        ax25_start_t3timer(ax25o);
        }
-       spin_unlock_bh(&ax25_list_lock);
+       spin_unlock(&ax25_list_lock);
 }
 
 void ax25_ds_establish_data_link(ax25_cb *ax25)
@@ -162,13 +162,13 @@ static int ax25_check_dama_slave(ax25_dev *ax25_dev)
        int res = 0;
        struct hlist_node *node;
 
-       spin_lock_bh(&ax25_list_lock);
+       spin_lock(&ax25_list_lock);
        ax25_for_each(ax25, node, &ax25_list)
                if (ax25->ax25_dev == ax25_dev && (ax25->condition & AX25_COND_DAMA_MODE) && ax25->state > AX25_STATE_1) {
                        res = 1;
                        break;
                }
-       spin_unlock_bh(&ax25_list_lock);
+       spin_unlock(&ax25_list_lock);
 
        return res;
 }
index 5961459935eb4f0d13497b4b6b0ecda79f7ca6dc..4f44185955c790403435227d598d7c575d4880ea 100644 (file)
@@ -85,7 +85,7 @@ static void ax25_ds_timeout(unsigned long arg)
                return;
        }
 
-       spin_lock_bh(&ax25_list_lock);
+       spin_lock(&ax25_list_lock);
        ax25_for_each(ax25, node, &ax25_list) {
                if (ax25->ax25_dev != ax25_dev || !(ax25->condition & AX25_COND_DAMA_MODE))
                        continue;
@@ -93,7 +93,7 @@ static void ax25_ds_timeout(unsigned long arg)
                ax25_send_control(ax25, AX25_DISC, AX25_POLLON, AX25_COMMAND);
                ax25_disconnect(ax25, ETIMEDOUT);
        }
-       spin_unlock_bh(&ax25_list_lock);
+       spin_unlock(&ax25_list_lock);
 
        ax25_dev_dama_off(ax25_dev);
 }
index 77ba07c67682670f8d4a4035c98f6e166b9242e8..07ac0207eb69b0c2ea42f1b2b6b3b05cc7ab104f 100644 (file)
@@ -66,10 +66,10 @@ int ax25_protocol_register(unsigned int pid,
        protocol->pid  = pid;
        protocol->func = func;
 
-       write_lock(&protocol_list_lock);
+       write_lock_bh(&protocol_list_lock);
        protocol->next = protocol_list;
        protocol_list  = protocol;
-       write_unlock(&protocol_list_lock);
+       write_unlock_bh(&protocol_list_lock);
 
        return 1;
 }
@@ -80,16 +80,16 @@ void ax25_protocol_release(unsigned int pid)
 {
        struct protocol_struct *s, *protocol;
 
-       write_lock(&protocol_list_lock);
+       write_lock_bh(&protocol_list_lock);
        protocol = protocol_list;
        if (protocol == NULL) {
-               write_unlock(&protocol_list_lock);
+               write_unlock_bh(&protocol_list_lock);
                return;
        }
 
        if (protocol->pid == pid) {
                protocol_list = protocol->next;
-               write_unlock(&protocol_list_lock);
+               write_unlock_bh(&protocol_list_lock);
                kfree(protocol);
                return;
        }
@@ -98,14 +98,14 @@ void ax25_protocol_release(unsigned int pid)
                if (protocol->next->pid == pid) {
                        s = protocol->next;
                        protocol->next = protocol->next->next;
-                       write_unlock(&protocol_list_lock);
+                       write_unlock_bh(&protocol_list_lock);
                        kfree(s);
                        return;
                }
 
                protocol = protocol->next;
        }
-       write_unlock(&protocol_list_lock);
+       write_unlock_bh(&protocol_list_lock);
 }
 
 EXPORT_SYMBOL(ax25_protocol_release);
@@ -266,13 +266,13 @@ int ax25_protocol_is_registered(unsigned int pid)
        struct protocol_struct *protocol;
        int res = 0;
 
-       read_lock(&protocol_list_lock);
+       read_lock_bh(&protocol_list_lock);
        for (protocol = protocol_list; protocol != NULL; protocol = protocol->next)
                if (protocol->pid == pid) {
                        res = 1;
                        break;
                }
-       read_unlock(&protocol_list_lock);
+       read_unlock_bh(&protocol_list_lock);
 
        return res;
 }
index 4cf87540fb3abd79df222319a9c79e3dc09f2e3d..e9d94291581ea1a67d53f39989ed26aef5fd0320 100644 (file)
@@ -102,8 +102,8 @@ static int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb)
 int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb)
 {
        int (*func)(struct sk_buff *, ax25_cb *);
-       volatile int queued = 0;
        unsigned char pid;
+       int queued = 0;
 
        if (skb == NULL) return 0;
 
index 6fb47e00e188bb2c292f3d7e94a7689651b832f8..be04e9fb11f604639f92e447451098902a9977d6 100644 (file)
 
 static struct cmtp_application *cmtp_application_add(struct cmtp_session *session, __u16 appl)
 {
-       struct cmtp_application *app = kmalloc(sizeof(*app), GFP_KERNEL);
+       struct cmtp_application *app = kzalloc(sizeof(*app), GFP_KERNEL);
 
        BT_DBG("session %p application %p appl %d", session, app, appl);
 
        if (!app)
                return NULL;
 
-       memset(app, 0, sizeof(*app));
-
        app->state = BT_OPEN;
        app->appl = appl;
 
index 182254a580e26e504294ae22d4e042195cecfe58..b81a01c64aeae8b35e601aec9029a98f4c1ecc86 100644 (file)
@@ -335,10 +335,9 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock)
        baswap(&src, &bt_sk(sock->sk)->src);
        baswap(&dst, &bt_sk(sock->sk)->dst);
 
-       session = kmalloc(sizeof(struct cmtp_session), GFP_KERNEL);
+       session = kzalloc(sizeof(struct cmtp_session), GFP_KERNEL);
        if (!session) 
                return -ENOMEM;
-       memset(session, 0, sizeof(struct cmtp_session));
 
        down_write(&cmtp_session_sem);
 
index 54e8e5ea21542ef47d87dcb84e47ae9917a581b1..5ed47427790385fc335168857d02082deb2ab498 100644 (file)
@@ -336,9 +336,8 @@ void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data)
 
        if (!(e = hci_inquiry_cache_lookup(hdev, &data->bdaddr))) {
                /* Entry not in the cache. Add new one. */
-               if (!(e = kmalloc(sizeof(struct inquiry_entry), GFP_ATOMIC)))
+               if (!(e = kzalloc(sizeof(struct inquiry_entry), GFP_ATOMIC)))
                        return;
-               memset(e, 0, sizeof(struct inquiry_entry));
                e->next     = cache->list;
                cache->list = e;
        }
@@ -800,12 +799,10 @@ struct hci_dev *hci_alloc_dev(void)
 {
        struct hci_dev *hdev;
 
-       hdev = kmalloc(sizeof(struct hci_dev), GFP_KERNEL);
+       hdev = kzalloc(sizeof(struct hci_dev), GFP_KERNEL);
        if (!hdev)
                return NULL;
 
-       memset(hdev, 0, sizeof(struct hci_dev));
-
        skb_queue_head_init(&hdev->driver_init);
 
        return hdev;
index edfea772fb6765c1d00f1e5cf8d6d33284e80b9b..c6abf2a5a9326e5a704a8ec5c8c647843033a891 100644 (file)
@@ -1,7 +1,6 @@
 config BT_HIDP
        tristate "HIDP protocol support"
-       depends on BT && BT_L2CAP && (BROKEN || !S390)
-       select INPUT
+       depends on BT && BT_L2CAP && INPUT
        help
          HIDP (Human Interface Device Protocol) is a transport layer
          for HID reports.  HIDP is required for the Bluetooth Human
index b9c24a55425c90205baa23dcc7f9fe2b2bd0bb00..c6e3a2c27c6ecc864dfa85153b1b42f557957f69 100644 (file)
@@ -582,10 +582,9 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock,
                        bacmp(&bt_sk(ctrl_sock->sk)->dst, &bt_sk(intr_sock->sk)->dst))
                return -ENOTUNIQ;
 
-       session = kmalloc(sizeof(struct hidp_session), GFP_KERNEL);
+       session = kzalloc(sizeof(struct hidp_session), GFP_KERNEL);
        if (!session)
                return -ENOMEM;
-       memset(session, 0, sizeof(struct hidp_session));
 
        session->input = input_allocate_device();
        if (!session->input) {
index eaaad658d11dcd34db3e606d6c2e58d5929cd73c..d56f60b392ac512b36a736f928844208ec88847a 100644 (file)
@@ -185,7 +185,7 @@ static inline void l2cap_chan_unlink(struct l2cap_chan_list *l, struct sock *sk)
 {
        struct sock *next = l2cap_pi(sk)->next_c, *prev = l2cap_pi(sk)->prev_c;
 
-       write_lock(&l->lock);
+       write_lock_bh(&l->lock);
        if (sk == l->head)
                l->head = next;
 
@@ -193,7 +193,7 @@ static inline void l2cap_chan_unlink(struct l2cap_chan_list *l, struct sock *sk)
                l2cap_pi(next)->prev_c = prev;
        if (prev)
                l2cap_pi(prev)->next_c = next;
-       write_unlock(&l->lock);
+       write_unlock_bh(&l->lock);
 
        __sock_put(sk);
 }
@@ -313,9 +313,9 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err)
 static inline void l2cap_chan_add(struct l2cap_conn *conn, struct sock *sk, struct sock *parent)
 {
        struct l2cap_chan_list *l = &conn->chan_list;
-       write_lock(&l->lock);
+       write_lock_bh(&l->lock);
        __l2cap_chan_add(conn, sk, parent);
-       write_unlock(&l->lock);
+       write_unlock_bh(&l->lock);
 }
 
 static inline u8 l2cap_get_ident(struct l2cap_conn *conn)
@@ -328,14 +328,14 @@ static inline u8 l2cap_get_ident(struct l2cap_conn *conn)
         *  200 - 254 are used by utilities like l2ping, etc.
         */
 
-       spin_lock(&conn->lock);
+       spin_lock_bh(&conn->lock);
 
        if (++conn->tx_ident > 128)
                conn->tx_ident = 1;
 
        id = conn->tx_ident;
 
-       spin_unlock(&conn->lock);
+       spin_unlock_bh(&conn->lock);
 
        return id;
 }
@@ -1416,11 +1416,11 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd
        if (!sk)
                goto response;
 
-       write_lock(&list->lock);
+       write_lock_bh(&list->lock);
 
        /* Check if we already have channel with that dcid */
        if (__l2cap_get_chan_by_dcid(list, scid)) {
-               write_unlock(&list->lock);
+               write_unlock_bh(&list->lock);
                sock_set_flag(sk, SOCK_ZAPPED);
                l2cap_sock_kill(sk);
                goto response;
@@ -1458,7 +1458,7 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd
        result = status = 0;
 
 done:
-       write_unlock(&list->lock);
+       write_unlock_bh(&list->lock);
 
 response:
        bh_unlock_sock(parent);
index 155a2b93760e0ccf0fdcc5a74adbee4cc2255c2a..77eab8f4c7fda87b7a03b410dca32dbb70335781 100644 (file)
@@ -273,10 +273,10 @@ static void rfcomm_dlc_clear_state(struct rfcomm_dlc *d)
 
 struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio)
 {
-       struct rfcomm_dlc *d = kmalloc(sizeof(*d), prio);
+       struct rfcomm_dlc *d = kzalloc(sizeof(*d), prio);
+
        if (!d)
                return NULL;
-       memset(d, 0, sizeof(*d));
 
        init_timer(&d->timer);
        d->timer.function = rfcomm_dlc_timeout;
@@ -289,6 +289,7 @@ struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio)
        rfcomm_dlc_clear_state(d);
        
        BT_DBG("%p", d);
+
        return d;
 }
 
@@ -522,10 +523,10 @@ int rfcomm_dlc_get_modem_status(struct rfcomm_dlc *d, u8 *v24_sig)
 /* ---- RFCOMM sessions ---- */
 static struct rfcomm_session *rfcomm_session_add(struct socket *sock, int state)
 {
-       struct rfcomm_session *s = kmalloc(sizeof(*s), GFP_KERNEL);
+       struct rfcomm_session *s = kzalloc(sizeof(*s), GFP_KERNEL);
+
        if (!s)
                return NULL;
-       memset(s, 0, sizeof(*s));
 
        BT_DBG("session %p sock %p", s, sock);
 
index 2ff2d5b87c933ce92207400de962f5edba04f4ea..bd8d671a0ba6f1622ee54e463c2d393b0a6a8943 100644 (file)
@@ -169,10 +169,9 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
 
        BT_DBG("id %d channel %d", req->dev_id, req->channel);
        
-       dev = kmalloc(sizeof(struct rfcomm_dev), GFP_KERNEL);
+       dev = kzalloc(sizeof(struct rfcomm_dev), GFP_KERNEL);
        if (!dev)
                return -ENOMEM;
-       memset(dev, 0, sizeof(struct rfcomm_dev));
 
        write_lock_bh(&rfcomm_dev_lock);
 
index 85defccc028791bc7cde5f0b37de5c3dc7b5fa11..7714a2ec3854d032ed0038ebcc8aea5e39494de7 100644 (file)
@@ -108,17 +108,14 @@ static void sco_sock_init_timer(struct sock *sk)
 static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status)
 {
        struct hci_dev *hdev = hcon->hdev;
-       struct sco_conn *conn;
-
-       if ((conn = hcon->sco_data))
-               return conn;
+       struct sco_conn *conn = hcon->sco_data;
 
-       if (status)
+       if (conn || status)
                return conn;
 
-       if (!(conn = kmalloc(sizeof(struct sco_conn), GFP_ATOMIC)))
+       conn = kzalloc(sizeof(struct sco_conn), GFP_ATOMIC);
+       if (!conn)
                return NULL;
-       memset(conn, 0, sizeof(struct sco_conn));
 
        spin_lock_init(&conn->lock);
 
@@ -134,6 +131,7 @@ static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status)
                conn->mtu = 60;
 
        BT_DBG("hcon %p conn %p", hcon, conn);
+
        return conn;
 }
 
index 8be9f2123e54234f2c7ec1a1904d4e66abde715b..6ccd32b308091dcd443f6ff00ab0aea2ad456e21 100644 (file)
@@ -35,7 +35,7 @@ static inline unsigned packet_length(const struct sk_buff *skb)
 int br_dev_queue_push_xmit(struct sk_buff *skb)
 {
        /* drop mtu oversized packets except gso */
-       if (packet_length(skb) > skb->dev->mtu && !skb_shinfo(skb)->gso_size)
+       if (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb))
                kfree_skb(skb);
        else {
 #ifdef CONFIG_BRIDGE_NETFILTER
index 8298a5179aef758d678f834d18239a7b004d7485..cbc8a389a0a8ceb4063661eb42239c0cfd4a0b52 100644 (file)
@@ -761,7 +761,7 @@ static int br_nf_dev_queue_xmit(struct sk_buff *skb)
 {
        if (skb->protocol == htons(ETH_P_IP) &&
            skb->len > skb->dev->mtu &&
-           !skb_shinfo(skb)->gso_size)
+           !skb_is_gso(skb))
                return ip_fragment(skb, br_dev_queue_push_xmit);
        else
                return br_dev_queue_push_xmit(skb);
index 066a60a75280bc6508c541e645aa5b5d9193e26e..4d2b5167d7f5f7b3088d1b12d7d7f5e2945fb11a 100644 (file)
@@ -1162,9 +1162,17 @@ int skb_checksum_help(struct sk_buff *skb, int inward)
        unsigned int csum;
        int ret = 0, offset = skb->h.raw - skb->data;
 
-       if (inward) {
-               skb->ip_summed = CHECKSUM_NONE;
-               goto out;
+       if (inward)
+               goto out_set_summed;
+
+       if (unlikely(skb_shinfo(skb)->gso_size)) {
+               static int warned;
+
+               WARN_ON(!warned);
+               warned = 1;
+
+               /* Let GSO fix up the checksum. */
+               goto out_set_summed;
        }
 
        if (skb_cloned(skb)) {
@@ -1181,6 +1189,8 @@ int skb_checksum_help(struct sk_buff *skb, int inward)
        BUG_ON(skb->csum + 2 > offset);
 
        *(u16*)(skb->h.raw + skb->csum) = csum_fold(csum);
+
+out_set_summed:
        skb->ip_summed = CHECKSUM_NONE;
 out:   
        return ret;
@@ -1201,17 +1211,35 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
        struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT);
        struct packet_type *ptype;
        int type = skb->protocol;
+       int err;
 
        BUG_ON(skb_shinfo(skb)->frag_list);
-       BUG_ON(skb->ip_summed != CHECKSUM_HW);
 
        skb->mac.raw = skb->data;
        skb->mac_len = skb->nh.raw - skb->data;
        __skb_pull(skb, skb->mac_len);
 
+       if (unlikely(skb->ip_summed != CHECKSUM_HW)) {
+               static int warned;
+
+               WARN_ON(!warned);
+               warned = 1;
+
+               if (skb_header_cloned(skb) &&
+                   (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
+                       return ERR_PTR(err);
+       }
+
        rcu_read_lock();
        list_for_each_entry_rcu(ptype, &ptype_base[ntohs(type) & 15], list) {
                if (ptype->type == type && !ptype->dev && ptype->gso_segment) {
+                       if (unlikely(skb->ip_summed != CHECKSUM_HW)) {
+                               err = ptype->gso_send_check(skb);
+                               segs = ERR_PTR(err);
+                               if (err || skb_gso_ok(skb, features))
+                                       break;
+                               __skb_push(skb, skb->data - skb->nh.raw);
+                       }
                        segs = ptype->gso_segment(skb, features);
                        break;
                }
@@ -1727,7 +1755,7 @@ static int ing_filter(struct sk_buff *skb)
        if (dev->qdisc_ingress) {
                __u32 ttl = (__u32) G_TC_RTTL(skb->tc_verd);
                if (MAX_RED_LOOP < ttl++) {
-                       printk("Redir loop detected Dropping packet (%s->%s)\n",
+                       printk(KERN_WARNING "Redir loop detected Dropping packet (%s->%s)\n",
                                skb->input_dev->name, skb->dev->name);
                        return TC_ACT_SHOT;
                }
@@ -2922,7 +2950,7 @@ int register_netdevice(struct net_device *dev)
        /* Fix illegal SG+CSUM combinations. */
        if ((dev->features & NETIF_F_SG) &&
            !(dev->features & NETIF_F_ALL_CSUM)) {
-               printk("%s: Dropping NETIF_F_SG since no checksum feature.\n",
+               printk(KERN_NOTICE "%s: Dropping NETIF_F_SG since no checksum feature.\n",
                       dev->name);
                dev->features &= ~NETIF_F_SG;
        }
@@ -2930,7 +2958,7 @@ int register_netdevice(struct net_device *dev)
        /* TSO requires that SG is present as well. */
        if ((dev->features & NETIF_F_TSO) &&
            !(dev->features & NETIF_F_SG)) {
-               printk("%s: Dropping NETIF_F_TSO since no SG feature.\n",
+               printk(KERN_NOTICE "%s: Dropping NETIF_F_TSO since no SG feature.\n",
                       dev->name);
                dev->features &= ~NETIF_F_TSO;
        }
index 27ce1683caf52bc69a31a8b4d4f3b34b6e9f8408..2797e2815418993515d39314fdaba8a9f6926b7f 100644 (file)
@@ -437,7 +437,7 @@ static int ethtool_set_pauseparam(struct net_device *dev, void __user *useraddr)
 {
        struct ethtool_pauseparam pauseparam;
 
-       if (!dev->ethtool_ops->get_pauseparam)
+       if (!dev->ethtool_ops->set_pauseparam)
                return -EOPNOTSUPP;
 
        if (copy_from_user(&pauseparam, useraddr, sizeof(pauseparam)))
index 44f6a181a7545f1a4bc13dff16ca209924a66b8b..476aa397850451555cd1e88661f38200b42a4fb7 100644 (file)
@@ -257,11 +257,11 @@ nodata:
 }
 
 
-static void skb_drop_fraglist(struct sk_buff *skb)
+static void skb_drop_list(struct sk_buff **listp)
 {
-       struct sk_buff *list = skb_shinfo(skb)->frag_list;
+       struct sk_buff *list = *listp;
 
-       skb_shinfo(skb)->frag_list = NULL;
+       *listp = NULL;
 
        do {
                struct sk_buff *this = list;
@@ -270,6 +270,11 @@ static void skb_drop_fraglist(struct sk_buff *skb)
        } while (list);
 }
 
+static inline void skb_drop_fraglist(struct sk_buff *skb)
+{
+       skb_drop_list(&skb_shinfo(skb)->frag_list);
+}
+
 static void skb_clone_fraglist(struct sk_buff *skb)
 {
        struct sk_buff *list;
@@ -830,41 +835,75 @@ free_skb:
 
 int ___pskb_trim(struct sk_buff *skb, unsigned int len)
 {
+       struct sk_buff **fragp;
+       struct sk_buff *frag;
        int offset = skb_headlen(skb);
        int nfrags = skb_shinfo(skb)->nr_frags;
        int i;
+       int err;
+
+       if (skb_cloned(skb) &&
+           unlikely((err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC))))
+               return err;
 
        for (i = 0; i < nfrags; i++) {
                int end = offset + skb_shinfo(skb)->frags[i].size;
-               if (end > len) {
-                       if (skb_cloned(skb)) {
-                               if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
-                                       return -ENOMEM;
-                       }
-                       if (len <= offset) {
-                               put_page(skb_shinfo(skb)->frags[i].page);
-                               skb_shinfo(skb)->nr_frags--;
-                       } else {
-                               skb_shinfo(skb)->frags[i].size = len - offset;
-                       }
+
+               if (end < len) {
+                       offset = end;
+                       continue;
                }
-               offset = end;
+
+               if (len > offset)
+                       skb_shinfo(skb)->frags[i++].size = len - offset;
+
+               skb_shinfo(skb)->nr_frags = i;
+
+               for (; i < nfrags; i++)
+                       put_page(skb_shinfo(skb)->frags[i].page);
+
+               if (skb_shinfo(skb)->frag_list)
+                       skb_drop_fraglist(skb);
+               break;
        }
 
-       if (offset < len) {
+       for (fragp = &skb_shinfo(skb)->frag_list; (frag = *fragp);
+            fragp = &frag->next) {
+               int end = offset + frag->len;
+
+               if (skb_shared(frag)) {
+                       struct sk_buff *nfrag;
+
+                       nfrag = skb_clone(frag, GFP_ATOMIC);
+                       if (unlikely(!nfrag))
+                               return -ENOMEM;
+
+                       nfrag->next = frag->next;
+                       frag = nfrag;
+                       *fragp = frag;
+               }
+
+               if (end < len) {
+                       offset = end;
+                       continue;
+               }
+
+               if (end > len &&
+                   unlikely((err = pskb_trim(frag, len - offset))))
+                       return err;
+
+               if (frag->next)
+                       skb_drop_list(&frag->next);
+               break;
+       }
+
+       if (len > skb_headlen(skb)) {
                skb->data_len -= skb->len - len;
                skb->len       = len;
        } else {
-               if (len <= skb_headlen(skb)) {
-                       skb->len      = len;
-                       skb->data_len = 0;
-                       skb->tail     = skb->data + len;
-                       if (skb_shinfo(skb)->frag_list && !skb_cloned(skb))
-                               skb_drop_fraglist(skb);
-               } else {
-                       skb->data_len -= skb->len - len;
-                       skb->len       = len;
-               }
+               skb->len       = len;
+               skb->data_len  = 0;
+               skb->tail      = skb->data + len;
        }
 
        return 0;
index e9489696f694540bfb90d12aba6e1cd3c5dd1d57..d1d7decf70b0087af2de9358049e5e43ed46d326 100644 (file)
@@ -196,15 +196,13 @@ EXPORT_SYMBOL(sk_stream_error);
 
 void __sk_stream_mem_reclaim(struct sock *sk)
 {
-       if (sk->sk_forward_alloc >= SK_STREAM_MEM_QUANTUM) {
-               atomic_sub(sk->sk_forward_alloc / SK_STREAM_MEM_QUANTUM,
-                          sk->sk_prot->memory_allocated);
-               sk->sk_forward_alloc &= SK_STREAM_MEM_QUANTUM - 1;
-               if (*sk->sk_prot->memory_pressure &&
-                   (atomic_read(sk->sk_prot->memory_allocated) <
-                    sk->sk_prot->sysctl_mem[0]))
-                       *sk->sk_prot->memory_pressure = 0;
-       }
+       atomic_sub(sk->sk_forward_alloc / SK_STREAM_MEM_QUANTUM,
+                  sk->sk_prot->memory_allocated);
+       sk->sk_forward_alloc &= SK_STREAM_MEM_QUANTUM - 1;
+       if (*sk->sk_prot->memory_pressure &&
+           (atomic_read(sk->sk_prot->memory_allocated) <
+            sk->sk_prot->sysctl_mem[0]))
+               *sk->sk_prot->memory_pressure = 0;
 }
 
 EXPORT_SYMBOL(__sk_stream_mem_reclaim);
index f4f0627ea41c0ccd53787845267330dc7eb3013b..6f14bb5a28d41c4de55bfa8c7bdad0b50b795a13 100644 (file)
@@ -484,7 +484,7 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname,
                        err = -EINVAL;
                else
                        err = dccp_setsockopt_change(sk, DCCPO_CHANGE_L,
-                                                    (struct dccp_so_feat *)
+                                                    (struct dccp_so_feat __user *)
                                                     optval);
                break;
 
@@ -493,7 +493,7 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname,
                        err = -EINVAL;
                else
                        err = dccp_setsockopt_change(sk, DCCPO_CHANGE_R,
-                                                    (struct dccp_so_feat *)
+                                                    (struct dccp_so_feat __user *)
                                                     optval);
                break;
 
index 06e785fe575798b5ae736317a44ec67d8ca07c11..22f321d9bf9d233474aa6a2a0d36c7388b0f1387 100644 (file)
@@ -399,9 +399,10 @@ int dn_fib_dump_rules(struct sk_buff *skb, struct netlink_callback *cb)
        rcu_read_lock();
        hlist_for_each_entry(r, node, &dn_fib_rules, r_hlist) {
                if (idx < s_idx)
-                       continue;
+                       goto next;
                if (dn_fib_fill_rule(skb, r, cb, NLM_F_MULTI) < 0)
                        break;
+next:
                idx++;
        }
        rcu_read_unlock();
index da33393be45f3d2e4d964dcdb9dbde58e59a1d84..8514106761b0ce6637b3fde1ead4af203d43e9d1 100644 (file)
@@ -572,16 +572,6 @@ config TCP_CONG_VENO
        loss packets.
        See http://www.ntu.edu.sg/home5/ZHOU0022/papers/CPFu03a.pdf
 
-config TCP_CONG_COMPOUND
-       tristate "TCP Compound"
-       depends on EXPERIMENTAL
-       default n
-       ---help---
-       TCP Compound is a sender-side only change to TCP that uses
-       a mixed Reno/Vegas approach to calculate the cwnd.
-       For further details look here:
-         ftp://ftp.research.microsoft.com/pub/tr/TR-2005-86.pdf
-
 endmenu
 
 config TCP_CONG_BIC
index 38b8039bdd55ff4267b8e82da20543110393f5fe..4878fc5be85fec93bd2463b7d7fe872139afdd17 100644 (file)
@@ -47,7 +47,6 @@ obj-$(CONFIG_TCP_CONG_VEGAS) += tcp_vegas.o
 obj-$(CONFIG_TCP_CONG_VENO) += tcp_veno.o
 obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o
 obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
-obj-$(CONFIG_TCP_CONG_COMPOUND) += tcp_compound.o
 
 obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
                      xfrm4_output.o
index 318d4674faa188e8aba6c6c8c17862fed6ce6ee6..c84a32070f8d0dc58ca797e8625942cda0f1d302 100644 (file)
@@ -1097,6 +1097,40 @@ int inet_sk_rebuild_header(struct sock *sk)
 
 EXPORT_SYMBOL(inet_sk_rebuild_header);
 
+static int inet_gso_send_check(struct sk_buff *skb)
+{
+       struct iphdr *iph;
+       struct net_protocol *ops;
+       int proto;
+       int ihl;
+       int err = -EINVAL;
+
+       if (unlikely(!pskb_may_pull(skb, sizeof(*iph))))
+               goto out;
+
+       iph = skb->nh.iph;
+       ihl = iph->ihl * 4;
+       if (ihl < sizeof(*iph))
+               goto out;
+
+       if (unlikely(!pskb_may_pull(skb, ihl)))
+               goto out;
+
+       skb->h.raw = __skb_pull(skb, ihl);
+       iph = skb->nh.iph;
+       proto = iph->protocol & (MAX_INET_PROTOS - 1);
+       err = -EPROTONOSUPPORT;
+
+       rcu_read_lock();
+       ops = rcu_dereference(inet_protos[proto]);
+       if (likely(ops && ops->gso_send_check))
+               err = ops->gso_send_check(skb);
+       rcu_read_unlock();
+
+out:
+       return err;
+}
+
 static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
 {
        struct sk_buff *segs = ERR_PTR(-EINVAL);
@@ -1162,6 +1196,7 @@ static struct net_protocol igmp_protocol = {
 static struct net_protocol tcp_protocol = {
        .handler =      tcp_v4_rcv,
        .err_handler =  tcp_v4_err,
+       .gso_send_check = tcp_v4_gso_send_check,
        .gso_segment =  tcp_tso_segment,
        .no_policy =    1,
 };
@@ -1208,6 +1243,7 @@ static int ipv4_proc_init(void);
 static struct packet_type ip_packet_type = {
        .type = __constant_htons(ETH_P_IP),
        .func = ip_rcv,
+       .gso_send_check = inet_gso_send_check,
        .gso_segment = inet_gso_segment,
 };
 
index 6c642d11d4ca4e18cf2f2da96bbda1ccd41e9f29..773b12ba4e3cf965634df3ad4bf9fb34a8e74433 100644 (file)
@@ -457,13 +457,13 @@ int inet_dump_rules(struct sk_buff *skb, struct netlink_callback *cb)
 
        rcu_read_lock();
        hlist_for_each_entry(r, node, &fib_rules, hlist) {
-
                if (idx < s_idx)
-                       continue;
+                       goto next;
                if (inet_fill_rule(skb, r, NETLINK_CB(cb->skb).pid,
                                   cb->nlh->nlmsg_seq,
                                   RTM_NEWRULE, NLM_F_MULTI) < 0)
                        break;
+next:
                idx++;
        }
        rcu_read_unlock();
index 1cb65305e1029b9bd47de0f041a469f098cb550f..23fb9d9768e369ecc0093805add00cf3f251a158 100644 (file)
@@ -1252,8 +1252,8 @@ fn_trie_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
         */
 
        if (!fa_head) {
-               fa_head = fib_insert_node(t, &err, key, plen);
                err = 0;
+               fa_head = fib_insert_node(t, &err, key, plen);
                if (err)
                        goto out_free_new_fa;
        }
index 2160874ce7aa682db5edda0e8eacb4cce44c7e44..03ff62ebcfeb5fc02473c211a1abe8e19e1bfe9c 100644 (file)
@@ -86,7 +86,7 @@ static struct inet_peer *peer_root = peer_avl_empty;
 static DEFINE_RWLOCK(peer_pool_lock);
 #define PEER_MAXDEPTH 40 /* sufficient for about 2^27 nodes */
 
-static volatile int peer_total;
+static int peer_total;
 /* Exported for sysctl_net_ipv4.  */
 int inet_peer_threshold = 65536 + 128; /* start to throw entries more
                                         * aggressively at this stage */
index e1a7dba2fa8ac6c381e3d0fb7c63d7ba99a857ea..184c78ca79e65e895800153e351ca4fbaa7e7e60 100644 (file)
@@ -428,6 +428,9 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
                goto drop;
        }
 
+       /* Remove any debris in the socket control block */
+       memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
+
        return NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, dev, NULL,
                       ip_rcv_finish);
 
index ca0e714613fb504bf495dad4eb20b2e2579aecc3..7c9f9a6421b8f3acdf7ccff1a106402913c75dd9 100644 (file)
@@ -209,7 +209,7 @@ static inline int ip_finish_output(struct sk_buff *skb)
                return dst_output(skb);
        }
 #endif
-       if (skb->len > dst_mtu(skb->dst) && !skb_shinfo(skb)->gso_size)
+       if (skb->len > dst_mtu(skb->dst) && !skb_is_gso(skb))
                return ip_fragment(skb, ip_finish_output2);
        else
                return ip_finish_output2(skb);
@@ -1095,7 +1095,7 @@ ssize_t   ip_append_page(struct sock *sk, struct page *page,
        while (size > 0) {
                int i;
 
-               if (skb_shinfo(skb)->gso_size)
+               if (skb_is_gso(skb))
                        len = size;
                else {
 
index 8e0374847532970b502609fbfecb9d75332a8896..8a8b5cf2f7fe68c805cec0de2ac2c23e5d944898 100644 (file)
@@ -70,7 +70,8 @@ static int ipcomp_decompress(struct xfrm_state *x, struct sk_buff *skb)
        if (err)
                goto out;
                
-       skb_put(skb, dlen - plen);
+       skb->truesize += dlen - plen;
+       __skb_put(skb, dlen - plen);
        memcpy(skb->data, scratch, dlen);
 out:   
        put_cpu();
diff --git a/net/ipv4/tcp_compound.c b/net/ipv4/tcp_compound.c
deleted file mode 100644 (file)
index bc54f7e..0000000
+++ /dev/null
@@ -1,448 +0,0 @@
-/*
- * TCP Vegas congestion control
- *
- * This is based on the congestion detection/avoidance scheme described in
- *    Lawrence S. Brakmo and Larry L. Peterson.
- *    "TCP Vegas: End to end congestion avoidance on a global internet."
- *    IEEE Journal on Selected Areas in Communication, 13(8):1465--1480,
- *    October 1995. Available from:
- *     ftp://ftp.cs.arizona.edu/xkernel/Papers/jsac.ps
- *
- * See http://www.cs.arizona.edu/xkernel/ for their implementation.
- * The main aspects that distinguish this implementation from the
- * Arizona Vegas implementation are:
- *   o We do not change the loss detection or recovery mechanisms of
- *     Linux in any way. Linux already recovers from losses quite well,
- *     using fine-grained timers, NewReno, and FACK.
- *   o To avoid the performance penalty imposed by increasing cwnd
- *     only every-other RTT during slow start, we increase during
- *     every RTT during slow start, just like Reno.
- *   o Largely to allow continuous cwnd growth during slow start,
- *     we use the rate at which ACKs come back as the "actual"
- *     rate, rather than the rate at which data is sent.
- *   o To speed convergence to the right rate, we set the cwnd
- *     to achieve the right ("actual") rate when we exit slow start.
- *   o To filter out the noise caused by delayed ACKs, we use the
- *     minimum RTT sample observed during the last RTT to calculate
- *     the actual rate.
- *   o When the sender re-starts from idle, it waits until it has
- *     received ACKs for an entire flight of new data before making
- *     a cwnd adjustment decision. The original Vegas implementation
- *     assumed senders never went idle.
- *
- *
- *   TCP Compound based on TCP Vegas
- *
- *   further details can be found here:
- *      ftp://ftp.research.microsoft.com/pub/tr/TR-2005-86.pdf
- */
-
-#include <linux/config.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/skbuff.h>
-#include <linux/inet_diag.h>
-
-#include <net/tcp.h>
-
-/* Default values of the Vegas variables, in fixed-point representation
- * with V_PARAM_SHIFT bits to the right of the binary point.
- */
-#define V_PARAM_SHIFT 1
-
-#define TCP_COMPOUND_ALPHA          3U
-#define TCP_COMPOUND_BETA           1U
-#define TCP_COMPOUND_GAMMA         30
-#define TCP_COMPOUND_ZETA           1
-
-/* TCP compound variables */
-struct compound {
-       u32 beg_snd_nxt;        /* right edge during last RTT */
-       u32 beg_snd_una;        /* left edge  during last RTT */
-       u32 beg_snd_cwnd;       /* saves the size of the cwnd */
-       u8 doing_vegas_now;     /* if true, do vegas for this RTT */
-       u16 cntRTT;             /* # of RTTs measured within last RTT */
-       u32 minRTT;             /* min of RTTs measured within last RTT (in usec) */
-       u32 baseRTT;            /* the min of all Vegas RTT measurements seen (in usec) */
-
-       u32 cwnd;
-       u32 dwnd;
-};
-
-/* There are several situations when we must "re-start" Vegas:
- *
- *  o when a connection is established
- *  o after an RTO
- *  o after fast recovery
- *  o when we send a packet and there is no outstanding
- *    unacknowledged data (restarting an idle connection)
- *
- * In these circumstances we cannot do a Vegas calculation at the
- * end of the first RTT, because any calculation we do is using
- * stale info -- both the saved cwnd and congestion feedback are
- * stale.
- *
- * Instead we must wait until the completion of an RTT during
- * which we actually receive ACKs.
- */
-static inline void vegas_enable(struct sock *sk)
-{
-       const struct tcp_sock *tp = tcp_sk(sk);
-       struct compound *vegas = inet_csk_ca(sk);
-
-       /* Begin taking Vegas samples next time we send something. */
-       vegas->doing_vegas_now = 1;
-
-       /* Set the beginning of the next send window. */
-       vegas->beg_snd_nxt = tp->snd_nxt;
-
-       vegas->cntRTT = 0;
-       vegas->minRTT = 0x7fffffff;
-}
-
-/* Stop taking Vegas samples for now. */
-static inline void vegas_disable(struct sock *sk)
-{
-       struct compound *vegas = inet_csk_ca(sk);
-
-       vegas->doing_vegas_now = 0;
-}
-
-static void tcp_compound_init(struct sock *sk)
-{
-       struct compound *vegas = inet_csk_ca(sk);
-       const struct tcp_sock *tp = tcp_sk(sk);
-
-       vegas->baseRTT = 0x7fffffff;
-       vegas_enable(sk);
-
-       vegas->dwnd = 0;
-       vegas->cwnd = tp->snd_cwnd;
-}
-
-/* Do RTT sampling needed for Vegas.
- * Basically we:
- *   o min-filter RTT samples from within an RTT to get the current
- *     propagation delay + queuing delay (we are min-filtering to try to
- *     avoid the effects of delayed ACKs)
- *   o min-filter RTT samples from a much longer window (forever for now)
- *     to find the propagation delay (baseRTT)
- */
-static void tcp_compound_rtt_calc(struct sock *sk, u32 usrtt)
-{
-       struct compound *vegas = inet_csk_ca(sk);
-       u32 vrtt = usrtt + 1;   /* Never allow zero rtt or baseRTT */
-
-       /* Filter to find propagation delay: */
-       if (vrtt < vegas->baseRTT)
-               vegas->baseRTT = vrtt;
-
-       /* Find the min RTT during the last RTT to find
-        * the current prop. delay + queuing delay:
-        */
-
-       vegas->minRTT = min(vegas->minRTT, vrtt);
-       vegas->cntRTT++;
-}
-
-static void tcp_compound_state(struct sock *sk, u8 ca_state)
-{
-
-       if (ca_state == TCP_CA_Open)
-               vegas_enable(sk);
-       else
-               vegas_disable(sk);
-}
-
-
-/* 64bit divisor, dividend and result. dynamic precision */
-static inline u64 div64_64(u64 dividend, u64 divisor)
-{
-       u32 d = divisor;
-
-       if (divisor > 0xffffffffULL) {
-               unsigned int shift = fls(divisor >> 32);
-
-               d = divisor >> shift;
-               dividend >>= shift;
-       }
-
-       /* avoid 64 bit division if possible */
-       if (dividend >> 32)
-               do_div(dividend, d);
-       else
-               dividend = (u32) dividend / d;
-
-       return dividend;
-}
-
-/* calculate the quartic root of "a" using Newton-Raphson */
-static u32 qroot(u64 a)
-{
-       u32 x, x1;
-
-       /* Initial estimate is based on:
-        * qrt(x) = exp(log(x) / 4)
-        */
-       x = 1u << (fls64(a) >> 2);
-
-       /*
-        * Iteration based on:
-        *                         3
-        * x    = ( 3 * x  +  a / x  ) / 4
-        *  k+1          k         k
-        */
-       do {
-               u64 x3 = x;
-
-               x1 = x;
-               x3 *= x;
-               x3 *= x;
-
-               x = (3 * x + (u32) div64_64(a, x3)) / 4;
-       } while (abs(x1 - x) > 1);
-
-       return x;
-}
-
-
-/*
- * If the connection is idle and we are restarting,
- * then we don't want to do any Vegas calculations
- * until we get fresh RTT samples.  So when we
- * restart, we reset our Vegas state to a clean
- * slate. After we get acks for this flight of
- * packets, _then_ we can make Vegas calculations
- * again.
- */
-static void tcp_compound_cwnd_event(struct sock *sk, enum tcp_ca_event event)
-{
-       if (event == CA_EVENT_CWND_RESTART || event == CA_EVENT_TX_START)
-               tcp_compound_init(sk);
-}
-
-static void tcp_compound_cong_avoid(struct sock *sk, u32 ack,
-                                   u32 seq_rtt, u32 in_flight, int flag)
-{
-       struct tcp_sock *tp = tcp_sk(sk);
-       struct compound *vegas = inet_csk_ca(sk);
-       u8 inc = 0;
-
-       if (vegas->cwnd + vegas->dwnd > tp->snd_cwnd) {
-               if (vegas->cwnd > tp->snd_cwnd || vegas->dwnd > tp->snd_cwnd) {
-                       vegas->cwnd = tp->snd_cwnd;
-                       vegas->dwnd = 0;
-               } else
-                       vegas->cwnd = tp->snd_cwnd - vegas->dwnd;
-
-       }
-
-       if (!tcp_is_cwnd_limited(sk, in_flight))
-               return;
-
-       if (vegas->cwnd <= tp->snd_ssthresh)
-               inc = 1;
-       else if (tp->snd_cwnd_cnt < tp->snd_cwnd)
-               tp->snd_cwnd_cnt++;
-
-       if (tp->snd_cwnd_cnt >= tp->snd_cwnd) {
-               inc = 1;
-               tp->snd_cwnd_cnt = 0;
-       }
-
-       if (inc && tp->snd_cwnd < tp->snd_cwnd_clamp)
-               vegas->cwnd++;
-
-       /* The key players are v_beg_snd_una and v_beg_snd_nxt.
-        *
-        * These are so named because they represent the approximate values
-        * of snd_una and snd_nxt at the beginning of the current RTT. More
-        * precisely, they represent the amount of data sent during the RTT.
-        * At the end of the RTT, when we receive an ACK for v_beg_snd_nxt,
-        * we will calculate that (v_beg_snd_nxt - v_beg_snd_una) outstanding
-        * bytes of data have been ACKed during the course of the RTT, giving
-        * an "actual" rate of:
-        *
-        *     (v_beg_snd_nxt - v_beg_snd_una) / (rtt duration)
-        *
-        * Unfortunately, v_beg_snd_una is not exactly equal to snd_una,
-        * because delayed ACKs can cover more than one segment, so they
-        * don't line up nicely with the boundaries of RTTs.
-        *
-        * Another unfortunate fact of life is that delayed ACKs delay the
-        * advance of the left edge of our send window, so that the number
-        * of bytes we send in an RTT is often less than our cwnd will allow.
-        * So we keep track of our cwnd separately, in v_beg_snd_cwnd.
-        */
-
-       if (after(ack, vegas->beg_snd_nxt)) {
-               /* Do the Vegas once-per-RTT cwnd adjustment. */
-               u32 old_wnd, old_snd_cwnd;
-
-               /* Here old_wnd is essentially the window of data that was
-                * sent during the previous RTT, and has all
-                * been acknowledged in the course of the RTT that ended
-                * with the ACK we just received. Likewise, old_snd_cwnd
-                * is the cwnd during the previous RTT.
-                */
-               if (!tp->mss_cache)
-                       return;
-
-               old_wnd = (vegas->beg_snd_nxt - vegas->beg_snd_una) /
-                   tp->mss_cache;
-               old_snd_cwnd = vegas->beg_snd_cwnd;
-
-               /* Save the extent of the current window so we can use this
-                * at the end of the next RTT.
-                */
-               vegas->beg_snd_una = vegas->beg_snd_nxt;
-               vegas->beg_snd_nxt = tp->snd_nxt;
-               vegas->beg_snd_cwnd = tp->snd_cwnd;
-
-               /* We do the Vegas calculations only if we got enough RTT
-                * samples that we can be reasonably sure that we got
-                * at least one RTT sample that wasn't from a delayed ACK.
-                * If we only had 2 samples total,
-                * then that means we're getting only 1 ACK per RTT, which
-                * means they're almost certainly delayed ACKs.
-                * If  we have 3 samples, we should be OK.
-                */
-
-               if (vegas->cntRTT > 2) {
-                       u32 rtt, target_cwnd, diff;
-                       u32 brtt, dwnd;
-
-                       /* We have enough RTT samples, so, using the Vegas
-                        * algorithm, we determine if we should increase or
-                        * decrease cwnd, and by how much.
-                        */
-
-                       /* Pluck out the RTT we are using for the Vegas
-                        * calculations. This is the min RTT seen during the
-                        * last RTT. Taking the min filters out the effects
-                        * of delayed ACKs, at the cost of noticing congestion
-                        * a bit later.
-                        */
-                       rtt = vegas->minRTT;
-
-                       /* Calculate the cwnd we should have, if we weren't
-                        * going too fast.
-                        *
-                        * This is:
-                        *     (actual rate in segments) * baseRTT
-                        * We keep it as a fixed point number with
-                        * V_PARAM_SHIFT bits to the right of the binary point.
-                        */
-                       if (!rtt)
-                               return;
-
-                       brtt = vegas->baseRTT;
-                       target_cwnd = ((old_wnd * brtt)
-                                      << V_PARAM_SHIFT) / rtt;
-
-                       /* Calculate the difference between the window we had,
-                        * and the window we would like to have. This quantity
-                        * is the "Diff" from the Arizona Vegas papers.
-                        *
-                        * Again, this is a fixed point number with
-                        * V_PARAM_SHIFT bits to the right of the binary
-                        * point.
-                        */
-
-                       diff = (old_wnd << V_PARAM_SHIFT) - target_cwnd;
-
-                       dwnd = vegas->dwnd;
-
-                       if (diff < (TCP_COMPOUND_GAMMA << V_PARAM_SHIFT)) {
-                               u64 v;
-                               u32 x;
-
-                               /*
-                                * The TCP Compound paper describes the choice
-                                * of "k" determines the agressiveness,
-                                * ie. slope of the response function.
-                                *
-                                * For same value as HSTCP would be 0.8
-                                * but for computaional reasons, both the
-                                * original authors and this implementation
-                                * use 0.75.
-                                */
-                               v = old_wnd;
-                               x = qroot(v * v * v) >> TCP_COMPOUND_ALPHA;
-                               if (x > 1)
-                                       dwnd = x - 1;
-                               else
-                                       dwnd = 0;
-
-                               dwnd += vegas->dwnd;
-
-                       } else if ((dwnd << V_PARAM_SHIFT) <
-                                  (diff * TCP_COMPOUND_BETA))
-                               dwnd = 0;
-                       else
-                               dwnd =
-                                   ((dwnd << V_PARAM_SHIFT) -
-                                    (diff *
-                                     TCP_COMPOUND_BETA)) >> V_PARAM_SHIFT;
-
-                       vegas->dwnd = dwnd;
-
-               }
-
-               /* Wipe the slate clean for the next RTT. */
-               vegas->cntRTT = 0;
-               vegas->minRTT = 0x7fffffff;
-       }
-
-       tp->snd_cwnd = vegas->cwnd + vegas->dwnd;
-}
-
-/* Extract info for Tcp socket info provided via netlink. */
-static void tcp_compound_get_info(struct sock *sk, u32 ext, struct sk_buff *skb)
-{
-       const struct compound *ca = inet_csk_ca(sk);
-       if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
-               struct tcpvegas_info *info;
-
-               info = RTA_DATA(__RTA_PUT(skb, INET_DIAG_VEGASINFO,
-                                         sizeof(*info)));
-
-               info->tcpv_enabled = ca->doing_vegas_now;
-               info->tcpv_rttcnt = ca->cntRTT;
-               info->tcpv_rtt = ca->baseRTT;
-               info->tcpv_minrtt = ca->minRTT;
-       rtattr_failure:;
-       }
-}
-
-static struct tcp_congestion_ops tcp_compound = {
-       .init           = tcp_compound_init,
-       .ssthresh       = tcp_reno_ssthresh,
-       .cong_avoid     = tcp_compound_cong_avoid,
-       .rtt_sample     = tcp_compound_rtt_calc,
-       .set_state      = tcp_compound_state,
-       .cwnd_event     = tcp_compound_cwnd_event,
-       .get_info       = tcp_compound_get_info,
-
-       .owner          = THIS_MODULE,
-       .name           = "compound",
-};
-
-static int __init tcp_compound_register(void)
-{
-       BUG_ON(sizeof(struct compound) > ICSK_CA_PRIV_SIZE);
-       tcp_register_congestion_control(&tcp_compound);
-       return 0;
-}
-
-static void __exit tcp_compound_unregister(void)
-{
-       tcp_unregister_congestion_control(&tcp_compound);
-}
-
-module_init(tcp_compound_register);
-module_exit(tcp_compound_unregister);
-
-MODULE_AUTHOR("Angelo P. Castellani, Stephen Hemminger");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("TCP Compound");
index aaa1538c0692c2d842b244106e1f859817f28177..fa3e1aad660cf0ebe6c10ec34b653aab5e2aeef2 100644 (file)
@@ -139,14 +139,19 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt,
                                tp->snd_cwnd++;
                }
        } else {
-               /* Update AIMD parameters */
+               /* Update AIMD parameters.
+                *
+                * We want to guarantee that:
+                *     hstcp_aimd_vals[ca->ai-1].cwnd <
+                *     snd_cwnd <=
+                *     hstcp_aimd_vals[ca->ai].cwnd
+                */
                if (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd) {
                        while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd &&
                               ca->ai < HSTCP_AIMD_MAX - 1)
                                ca->ai++;
-               } else if (tp->snd_cwnd < hstcp_aimd_vals[ca->ai].cwnd) {
-                       while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd &&
-                              ca->ai > 0)
+               } else if (ca->ai && tp->snd_cwnd <= hstcp_aimd_vals[ca->ai-1].cwnd) {
+                       while (ca->ai && tp->snd_cwnd <= hstcp_aimd_vals[ca->ai-1].cwnd)
                                ca->ai--;
                }
 
index 5a886e6efbbedfc79ba382d131fa70338b9138d6..a891133f00e48fa2bf3e17f7f938a810e1f07d29 100644 (file)
@@ -496,6 +496,24 @@ void tcp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb)
        }
 }
 
+int tcp_v4_gso_send_check(struct sk_buff *skb)
+{
+       struct iphdr *iph;
+       struct tcphdr *th;
+
+       if (!pskb_may_pull(skb, sizeof(*th)))
+               return -EINVAL;
+
+       iph = skb->nh.iph;
+       th = skb->h.th;
+
+       th->check = 0;
+       th->check = ~tcp_v4_check(th, skb->len, iph->saddr, iph->daddr, 0);
+       skb->csum = offsetof(struct tcphdr, check);
+       skb->ip_summed = CHECKSUM_HW;
+       return 0;
+}
+
 /*
  *     This routine will send an RST to the other tcp.
  *
index 193363e22932ce19f84a60df94d8bfbdaac471d6..d16f863cf687645198a6299cab9b718c7c25af97 100644 (file)
@@ -134,7 +134,7 @@ static int xfrm4_output_finish(struct sk_buff *skb)
        }
 #endif
 
-       if (!skb_shinfo(skb)->gso_size)
+       if (!skb_is_gso(skb))
                return xfrm4_output_finish2(skb);
 
        skb->protocol = htons(ETH_P_IP);
index c250d0af10d77c3fc76f90a842da7414d1b2ed1e..2316a4315a1800f7d750f9237eb8e29d7b5e77ac 100644 (file)
@@ -508,6 +508,26 @@ void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp)
        kfree(ifp);
 }
 
+static void
+ipv6_link_dev_addr(struct inet6_dev *idev, struct inet6_ifaddr *ifp)
+{
+       struct inet6_ifaddr *ifa, **ifap;
+       int ifp_scope = ipv6_addr_src_scope(&ifp->addr);
+
+       /*
+        * Each device address list is sorted in order of scope -
+        * global before linklocal.
+        */
+       for (ifap = &idev->addr_list; (ifa = *ifap) != NULL;
+            ifap = &ifa->if_next) {
+               if (ifp_scope >= ipv6_addr_src_scope(&ifa->addr))
+                       break;
+       }
+
+       ifp->if_next = *ifap;
+       *ifap = ifp;
+}
+
 /* On success it returns ifp with increased reference count */
 
 static struct inet6_ifaddr *
@@ -573,8 +593,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen,
 
        write_lock(&idev->lock);
        /* Add to inet6_dev unicast addr list. */
-       ifa->if_next = idev->addr_list;
-       idev->addr_list = ifa;
+       ipv6_link_dev_addr(idev, ifa);
 
 #ifdef CONFIG_IPV6_PRIVACY
        if (ifa->flags&IFA_F_TEMPORARY) {
@@ -987,7 +1006,7 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev,
                                        continue;
                        } else if (score.scope < hiscore.scope) {
                                if (score.scope < daddr_scope)
-                                       continue;
+                                       break; /* addresses sorted by scope */
                                else {
                                        score.rule = 2;
                                        goto record_it;
index 2c5b44575af0fee96124d8e37580af9e2d2cb4b4..3bc74ce78800322cc70b88846a5970cca201a0cd 100644 (file)
@@ -147,7 +147,7 @@ static int ip6_output2(struct sk_buff *skb)
 
 int ip6_output(struct sk_buff *skb)
 {
-       if ((skb->len > dst_mtu(skb->dst) && !skb_shinfo(skb)->gso_size) ||
+       if ((skb->len > dst_mtu(skb->dst) && !skb_is_gso(skb)) ||
                                dst_allfrag(skb->dst))
                return ip6_fragment(skb, ip6_output2);
        else
@@ -229,7 +229,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
        skb->priority = sk->sk_priority;
 
        mtu = dst_mtu(dst);
-       if ((skb->len <= mtu) || ipfragok || skb_shinfo(skb)->gso_size) {
+       if ((skb->len <= mtu) || ipfragok || skb_is_gso(skb)) {
                IP6_INC_STATS(IPSTATS_MIB_OUTREQUESTS);
                return NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev,
                                dst_output);
index b285b0357084adac5a81679d8a8e577863dd233d..7e4d1c17bfbc1295e00805b0808c6ec770bf4f8c 100644 (file)
@@ -109,7 +109,8 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb)
                goto out_put_cpu;
        }
 
-       skb_put(skb, dlen - plen);
+       skb->truesize += dlen - plen;
+       __skb_put(skb, dlen - plen);
        memcpy(skb->data, scratch, dlen);
        err = ipch->nexthdr;
 
index 0c17dec11c8d1215725f780666056f8304ecf25f..43327264e69c4be3fadaa055adf0b0940fec717e 100644 (file)
 
 DEFINE_SNMP_STAT(struct ipstats_mib, ipv6_statistics) __read_mostly;
 
-static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features)
+static struct inet6_protocol *ipv6_gso_pull_exthdrs(struct sk_buff *skb,
+                                                   int proto)
 {
-       struct sk_buff *segs = ERR_PTR(-EINVAL);
-       struct ipv6hdr *ipv6h;
-       struct inet6_protocol *ops;
-       int proto;
+       struct inet6_protocol *ops = NULL;
 
-       if (unlikely(skb_shinfo(skb)->gso_type &
-                    ~(SKB_GSO_UDP |
-                      SKB_GSO_DODGY |
-                      SKB_GSO_TCP_ECN |
-                      SKB_GSO_TCPV6 |
-                      0)))
-               goto out;
-
-       if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h))))
-               goto out;
-
-       ipv6h = skb->nh.ipv6h;
-       proto = ipv6h->nexthdr;
-       __skb_pull(skb, sizeof(*ipv6h));
-
-       rcu_read_lock();
        for (;;) {
                struct ipv6_opt_hdr *opth;
                int len;
@@ -88,30 +70,80 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features)
                        ops = rcu_dereference(inet6_protos[proto]);
 
                        if (unlikely(!ops))
-                               goto unlock;
+                               break;
 
                        if (!(ops->flags & INET6_PROTO_GSO_EXTHDR))
                                break;
                }
 
                if (unlikely(!pskb_may_pull(skb, 8)))
-                       goto unlock;
+                       break;
 
                opth = (void *)skb->data;
                len = opth->hdrlen * 8 + 8;
 
                if (unlikely(!pskb_may_pull(skb, len)))
-                       goto unlock;
+                       break;
 
                proto = opth->nexthdr;
                __skb_pull(skb, len);
        }
 
-       skb->h.raw = skb->data;
-       if (likely(ops->gso_segment))
-               segs = ops->gso_segment(skb, features);
+       return ops;
+}
+
+static int ipv6_gso_send_check(struct sk_buff *skb)
+{
+       struct ipv6hdr *ipv6h;
+       struct inet6_protocol *ops;
+       int err = -EINVAL;
+
+       if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h))))
+               goto out;
 
-unlock:
+       ipv6h = skb->nh.ipv6h;
+       __skb_pull(skb, sizeof(*ipv6h));
+       err = -EPROTONOSUPPORT;
+
+       rcu_read_lock();
+       ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr);
+       if (likely(ops && ops->gso_send_check)) {
+               skb->h.raw = skb->data;
+               err = ops->gso_send_check(skb);
+       }
+       rcu_read_unlock();
+
+out:
+       return err;
+}
+
+static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features)
+{
+       struct sk_buff *segs = ERR_PTR(-EINVAL);
+       struct ipv6hdr *ipv6h;
+       struct inet6_protocol *ops;
+
+       if (unlikely(skb_shinfo(skb)->gso_type &
+                    ~(SKB_GSO_UDP |
+                      SKB_GSO_DODGY |
+                      SKB_GSO_TCP_ECN |
+                      SKB_GSO_TCPV6 |
+                      0)))
+               goto out;
+
+       if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h))))
+               goto out;
+
+       ipv6h = skb->nh.ipv6h;
+       __skb_pull(skb, sizeof(*ipv6h));
+       segs = ERR_PTR(-EPROTONOSUPPORT);
+
+       rcu_read_lock();
+       ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr);
+       if (likely(ops && ops->gso_segment)) {
+               skb->h.raw = skb->data;
+               segs = ops->gso_segment(skb, features);
+       }
        rcu_read_unlock();
 
        if (unlikely(IS_ERR(segs)))
@@ -130,6 +162,7 @@ out:
 static struct packet_type ipv6_packet_type = {
        .type = __constant_htons(ETH_P_IPV6), 
        .func = ipv6_rcv,
+       .gso_send_check = ipv6_gso_send_check,
        .gso_segment = ipv6_gso_segment,
 };
 
index 5bdcb9002cf733ee670c05d12e2801e3a9488302..923989d0520d98f4527518b220b41442fcb84803 100644 (file)
@@ -552,6 +552,24 @@ static void tcp_v6_send_check(struct sock *sk, int len, struct sk_buff *skb)
        }
 }
 
+static int tcp_v6_gso_send_check(struct sk_buff *skb)
+{
+       struct ipv6hdr *ipv6h;
+       struct tcphdr *th;
+
+       if (!pskb_may_pull(skb, sizeof(*th)))
+               return -EINVAL;
+
+       ipv6h = skb->nh.ipv6h;
+       th = skb->h.th;
+
+       th->check = 0;
+       th->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, skb->len,
+                                    IPPROTO_TCP, 0);
+       skb->csum = offsetof(struct tcphdr, check);
+       skb->ip_summed = CHECKSUM_HW;
+       return 0;
+}
 
 static void tcp_v6_send_reset(struct sk_buff *skb)
 {
@@ -1603,6 +1621,7 @@ struct proto tcpv6_prot = {
 static struct inet6_protocol tcpv6_protocol = {
        .handler        =       tcp_v6_rcv,
        .err_handler    =       tcp_v6_err,
+       .gso_send_check =       tcp_v6_gso_send_check,
        .gso_segment    =       tcp_tso_segment,
        .flags          =       INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
 };
index 48fccb1eca08ad31eae996995600924e1f491537..0eea60ea9ebc540c243a9b02861afd47cdf9ef74 100644 (file)
@@ -122,7 +122,7 @@ static int xfrm6_output_finish(struct sk_buff *skb)
 {
        struct sk_buff *segs;
 
-       if (!skb_shinfo(skb)->gso_size)
+       if (!skb_is_gso(skb))
                return xfrm6_output_finish2(skb);
 
        skb->protocol = htons(ETH_P_IP);
index 389a4119e1b405a9cebbf11f4a9076ff4b2d95c4..1d50f801f181f4e1c4962a09d6acb81e23c7577a 100644 (file)
@@ -65,6 +65,14 @@ static DEFINE_SPINLOCK(nr_list_lock);
 
 static const struct proto_ops nr_proto_ops;
 
+/*
+ * NETROM network devices are virtual network devices encapsulating NETROM
+ * frames into AX.25 which will be sent through an AX.25 device, so form a
+ * special "super class" of normal net devices; split their locks off into a
+ * separate class since they always nest.
+ */
+static struct lock_class_key nr_netdev_xmit_lock_key;
+
 /*
  *     Socket removal during an interrupt is now safe.
  */
@@ -986,18 +994,18 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)
        nr_make->vl        = 0;
        nr_make->state     = NR_STATE_3;
        sk_acceptq_added(sk);
-
-       nr_insert_socket(make);
-
        skb_queue_head(&sk->sk_receive_queue, skb);
 
-       nr_start_heartbeat(make);
-       nr_start_idletimer(make);
-
        if (!sock_flag(sk, SOCK_DEAD))
                sk->sk_data_ready(sk, skb->len);
 
        bh_unlock_sock(sk);
+
+       nr_insert_socket(make);
+
+       nr_start_heartbeat(make);
+       nr_start_idletimer(make);
+
        return 1;
 }
 
@@ -1382,14 +1390,12 @@ static int __init nr_proto_init(void)
                return -1;
        }
 
-       dev_nr = kmalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL);
+       dev_nr = kzalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL);
        if (dev_nr == NULL) {
                printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device array\n");
                return -1;
        }
 
-       memset(dev_nr, 0x00, nr_ndevs * sizeof(struct net_device *));
-
        for (i = 0; i < nr_ndevs; i++) {
                char name[IFNAMSIZ];
                struct net_device *dev;
@@ -1407,6 +1413,7 @@ static int __init nr_proto_init(void)
                        free_netdev(dev);
                        goto fail;
                }
+               lockdep_set_class(&dev->_xmit_lock, &nr_netdev_xmit_lock_key);
                dev_nr[i] = dev;
        }
 
index 75b72d389ba95283b4c0f1e9adfc69eb8d3ed2a5..ddba1c144260d4b6adfe1b288c9a68739d551b31 100644 (file)
@@ -138,8 +138,8 @@ static void nr_heartbeat_expiry(unsigned long param)
                if (sock_flag(sk, SOCK_DESTROY) ||
                    (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) {
                        sock_hold(sk);
-                       nr_destroy_socket(sk);
                        bh_unlock_sock(sk);
+                       nr_destroy_socket(sk);
                        sock_put(sk);
                        return;
                }
index d0a67bb31363de2e45468dd9d9a99739b4c29e0c..08a542855654fb8981717faeb9a73ab52d3531b7 100644 (file)
@@ -66,6 +66,14 @@ static struct proto_ops rose_proto_ops;
 
 ax25_address rose_callsign;
 
+/*
+ * ROSE network devices are virtual network devices encapsulating ROSE
+ * frames into AX.25 which will be sent through an AX.25 device, so form a
+ * special "super class" of normal net devices; split their locks off into a
+ * separate class since they always nest.
+ */
+static struct lock_class_key rose_netdev_xmit_lock_key;
+
 /*
  *     Convert a ROSE address into text.
  */
@@ -1490,14 +1498,13 @@ static int __init rose_proto_init(void)
 
        rose_callsign = null_ax25_address;
 
-       dev_rose = kmalloc(rose_ndevs * sizeof(struct net_device *), GFP_KERNEL);
+       dev_rose = kzalloc(rose_ndevs * sizeof(struct net_device *), GFP_KERNEL);
        if (dev_rose == NULL) {
                printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate device structure\n");
                rc = -ENOMEM;
                goto out_proto_unregister;
        }
 
-       memset(dev_rose, 0x00, rose_ndevs * sizeof(struct net_device*));
        for (i = 0; i < rose_ndevs; i++) {
                struct net_device *dev;
                char name[IFNAMSIZ];
@@ -1516,6 +1523,7 @@ static int __init rose_proto_init(void)
                        free_netdev(dev);
                        goto fail;
                }
+               lockdep_set_class(&dev->_xmit_lock, &rose_netdev_xmit_lock_key);
                dev_rose[i] = dev;
        }
 
index 599423cc9d0d67796c4936f1d15c08fe979d1e0e..9affeeedf1070372650677711f0ccb97578e7cfa 100644 (file)
@@ -602,8 +602,8 @@ static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
        return err;
 
 rtattr_failure:
-       module_put(a->ops->owner);
 nlmsg_failure:
+       module_put(a->ops->owner);
 err_out:
        kfree_skb(skb);
        kfree(a);
@@ -884,8 +884,6 @@ static int __init tc_action_init(void)
                link_p[RTM_GETACTION-RTM_BASE].dumpit = tc_dump_action;
        }
 
-       printk("TC classifier action (bugs to netdev@vger.kernel.org cc "
-              "hadi@cyberus.ca)\n");
        return 0;
 }
 
index 34afe41fa2f3b6dd3d620214ded409d6fde9781a..cc5f339e6f9121476197c3e659be9099f172e98b 100644 (file)
@@ -196,7 +196,7 @@ struct htb_class
     struct qdisc_rate_table *rate;     /* rate table of the class itself */
     struct qdisc_rate_table *ceil;     /* ceiling rate (limits borrows too) */
     long buffer,cbuffer;               /* token bucket depth/rate */
-    long mbuffer;                      /* max wait time */
+    psched_tdiff_t mbuffer;            /* max wait time */
     long tokens,ctokens;               /* current number of tokens */
     psched_time_t t_c;                 /* checkpoint time */
 };
@@ -1601,7 +1601,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
                /* set class to be in HTB_CAN_SEND state */
                cl->tokens = hopt->buffer;
                cl->ctokens = hopt->cbuffer;
-               cl->mbuffer = 60000000; /* 1min */
+               cl->mbuffer = PSCHED_JIFFIE2US(HZ*60); /* 1min */
                PSCHED_GET_TIME(cl->t_c);
                cl->cmode = HTB_CAN_SEND;
 
index 24caaeec88941004c5acc65d63224ab3b207ab9f..a91c961ba38b5d93deb4a005f79336f17f6d8acd 100644 (file)
@@ -246,6 +246,7 @@ static int superblock_alloc_security(struct super_block *sb)
        sbsec->sb = sb;
        sbsec->sid = SECINITSID_UNLABELED;
        sbsec->def_sid = SECINITSID_FILE;
+       sbsec->mntpoint_sid = SECINITSID_UNLABELED;
        sb->s_security = sbsec;
 
        return 0;
@@ -319,19 +320,53 @@ enum {
        Opt_context = 1,
        Opt_fscontext = 2,
        Opt_defcontext = 4,
+       Opt_rootcontext = 8,
 };
 
 static match_table_t tokens = {
        {Opt_context, "context=%s"},
        {Opt_fscontext, "fscontext=%s"},
        {Opt_defcontext, "defcontext=%s"},
+       {Opt_rootcontext, "rootcontext=%s"},
 };
 
 #define SEL_MOUNT_FAIL_MSG "SELinux:  duplicate or incompatible mount options\n"
 
+static int may_context_mount_sb_relabel(u32 sid,
+                       struct superblock_security_struct *sbsec,
+                       struct task_security_struct *tsec)
+{
+       int rc;
+
+       rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM,
+                         FILESYSTEM__RELABELFROM, NULL);
+       if (rc)
+               return rc;
+
+       rc = avc_has_perm(tsec->sid, sid, SECCLASS_FILESYSTEM,
+                         FILESYSTEM__RELABELTO, NULL);
+       return rc;
+}
+
+static int may_context_mount_inode_relabel(u32 sid,
+                       struct superblock_security_struct *sbsec,
+                       struct task_security_struct *tsec)
+{
+       int rc;
+       rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM,
+                         FILESYSTEM__RELABELFROM, NULL);
+       if (rc)
+               return rc;
+
+       rc = avc_has_perm(sid, sbsec->sid, SECCLASS_FILESYSTEM,
+                         FILESYSTEM__ASSOCIATE, NULL);
+       return rc;
+}
+
 static int try_context_mount(struct super_block *sb, void *data)
 {
        char *context = NULL, *defcontext = NULL;
+       char *fscontext = NULL, *rootcontext = NULL;
        const char *name;
        u32 sid;
        int alloc = 0, rc = 0, seen = 0;
@@ -374,7 +409,7 @@ static int try_context_mount(struct super_block *sb, void *data)
 
                        switch (token) {
                        case Opt_context:
-                               if (seen) {
+                               if (seen & (Opt_context|Opt_defcontext)) {
                                        rc = -EINVAL;
                                        printk(KERN_WARNING SEL_MOUNT_FAIL_MSG);
                                        goto out_free;
@@ -390,13 +425,13 @@ static int try_context_mount(struct super_block *sb, void *data)
                                break;
 
                        case Opt_fscontext:
-                               if (seen & (Opt_context|Opt_fscontext)) {
+                               if (seen & Opt_fscontext) {
                                        rc = -EINVAL;
                                        printk(KERN_WARNING SEL_MOUNT_FAIL_MSG);
                                        goto out_free;
                                }
-                               context = match_strdup(&args[0]);
-                               if (!context) {
+                               fscontext = match_strdup(&args[0]);
+                               if (!fscontext) {
                                        rc = -ENOMEM;
                                        goto out_free;
                                }
@@ -405,6 +440,22 @@ static int try_context_mount(struct super_block *sb, void *data)
                                seen |= Opt_fscontext;
                                break;
 
+                       case Opt_rootcontext:
+                               if (seen & Opt_rootcontext) {
+                                       rc = -EINVAL;
+                                       printk(KERN_WARNING SEL_MOUNT_FAIL_MSG);
+                                       goto out_free;
+                               }
+                               rootcontext = match_strdup(&args[0]);
+                               if (!rootcontext) {
+                                       rc = -ENOMEM;
+                                       goto out_free;
+                               }
+                               if (!alloc)
+                                       alloc = 1;
+                               seen |= Opt_rootcontext;
+                               break;
+
                        case Opt_defcontext:
                                if (sbsec->behavior != SECURITY_FS_USE_XATTR) {
                                        rc = -EINVAL;
@@ -441,6 +492,28 @@ static int try_context_mount(struct super_block *sb, void *data)
        if (!seen)
                goto out;
 
+       /* sets the context of the superblock for the fs being mounted. */
+       if (fscontext) {
+               rc = security_context_to_sid(fscontext, strlen(fscontext), &sid);
+               if (rc) {
+                       printk(KERN_WARNING "SELinux: security_context_to_sid"
+                              "(%s) failed for (dev %s, type %s) errno=%d\n",
+                              fscontext, sb->s_id, name, rc);
+                       goto out_free;
+               }
+
+               rc = may_context_mount_sb_relabel(sid, sbsec, tsec);
+               if (rc)
+                       goto out_free;
+
+               sbsec->sid = sid;
+       }
+
+       /*
+        * Switch to using mount point labeling behavior.
+        * sets the label used on all file below the mountpoint, and will set
+        * the superblock context if not already set.
+        */
        if (context) {
                rc = security_context_to_sid(context, strlen(context), &sid);
                if (rc) {
@@ -450,20 +523,38 @@ static int try_context_mount(struct super_block *sb, void *data)
                        goto out_free;
                }
 
-               rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM,
-                                 FILESYSTEM__RELABELFROM, NULL);
-               if (rc)
+               if (!fscontext) {
+                       rc = may_context_mount_sb_relabel(sid, sbsec, tsec);
+                       if (rc)
+                               goto out_free;
+                       sbsec->sid = sid;
+               } else {
+                       rc = may_context_mount_inode_relabel(sid, sbsec, tsec);
+                       if (rc)
+                               goto out_free;
+               }
+               sbsec->mntpoint_sid = sid;
+
+               sbsec->behavior = SECURITY_FS_USE_MNTPOINT;
+       }
+
+       if (rootcontext) {
+               struct inode *inode = sb->s_root->d_inode;
+               struct inode_security_struct *isec = inode->i_security;
+               rc = security_context_to_sid(rootcontext, strlen(rootcontext), &sid);
+               if (rc) {
+                       printk(KERN_WARNING "SELinux: security_context_to_sid"
+                              "(%s) failed for (dev %s, type %s) errno=%d\n",
+                              rootcontext, sb->s_id, name, rc);
                        goto out_free;
+               }
 
-               rc = avc_has_perm(tsec->sid, sid, SECCLASS_FILESYSTEM,
-                                 FILESYSTEM__RELABELTO, NULL);
+               rc = may_context_mount_inode_relabel(sid, sbsec, tsec);
                if (rc)
                        goto out_free;
 
-               sbsec->sid = sid;
-
-               if (seen & Opt_context)
-                       sbsec->behavior = SECURITY_FS_USE_MNTPOINT;
+               isec->sid = sid;
+               isec->initialized = 1;
        }
 
        if (defcontext) {
@@ -478,13 +569,7 @@ static int try_context_mount(struct super_block *sb, void *data)
                if (sid == sbsec->def_sid)
                        goto out_free;
 
-               rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM,
-                                 FILESYSTEM__RELABELFROM, NULL);
-               if (rc)
-                       goto out_free;
-
-               rc = avc_has_perm(sid, sbsec->sid, SECCLASS_FILESYSTEM,
-                                 FILESYSTEM__ASSOCIATE, NULL);
+               rc = may_context_mount_inode_relabel(sid, sbsec, tsec);
                if (rc)
                        goto out_free;
 
@@ -495,6 +580,8 @@ out_free:
        if (alloc) {
                kfree(context);
                kfree(defcontext);
+               kfree(fscontext);
+               kfree(rootcontext);
        }
 out:
        return rc;
@@ -876,8 +963,11 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
                        goto out;
                isec->sid = sid;
                break;
+       case SECURITY_FS_USE_MNTPOINT:
+               isec->sid = sbsec->mntpoint_sid;
+               break;
        default:
-               /* Default to the fs SID. */
+               /* Default to the fs superblock SID. */
                isec->sid = sbsec->sid;
 
                if (sbsec->proc) {
@@ -1843,7 +1933,8 @@ static inline int selinux_option(char *option, int len)
 {
        return (match_prefix("context=", sizeof("context=")-1, option, len) ||
                match_prefix("fscontext=", sizeof("fscontext=")-1, option, len) ||
-               match_prefix("defcontext=", sizeof("defcontext=")-1, option, len));
+               match_prefix("defcontext=", sizeof("defcontext=")-1, option, len) ||
+               match_prefix("rootcontext=", sizeof("rootcontext=")-1, option, len));
 }
 
 static inline void take_option(char **to, char *from, int *first, int len)
index cf54a304169a0fc4ce2224e26d99221aff5821e3..940178865fc78c97e37979f215204b2e1d17fc38 100644 (file)
@@ -57,8 +57,9 @@ struct file_security_struct {
 struct superblock_security_struct {
        struct super_block *sb;         /* back pointer to sb object */
        struct list_head list;          /* list of superblock_security_struct */
-       u32 sid;              /* SID of file system */
+       u32 sid;                        /* SID of file system superblock */
        u32 def_sid;                    /* default SID for labeling */
+       u32 mntpoint_sid;               /* SECURITY_FS_USE_MNTPOINT context for files */
        unsigned int behavior;          /* labeling behavior */
        unsigned char initialized;      /* initialization flag */
        unsigned char proc;             /* proc fs */
index d8de3e7df48d13a7a19b3211e5c1bd615e7846ed..a8c037f908f8021d6acafc87a8dd078dd0581988 100644 (file)
@@ -1,4 +1,4 @@
 obj-$(CONFIG_SND_AOA) += core/
-obj-$(CONFIG_SND_AOA) += codecs/
-obj-$(CONFIG_SND_AOA) += fabrics/
 obj-$(CONFIG_SND_AOA_SOUNDBUS) += soundbus/
+obj-$(CONFIG_SND_AOA) += fabrics/
+obj-$(CONFIG_SND_AOA) += codecs/
diff --git a/sound/aoa/codecs/snd-aoa-codec-tas-basstreble.h b/sound/aoa/codecs/snd-aoa-codec-tas-basstreble.h
new file mode 100644 (file)
index 0000000..69b6113
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * This file is only included exactly once!
+ *
+ * The tables here are derived from the tas3004 datasheet,
+ * modulo typo corrections and some smoothing...
+ */
+
+#define TAS3004_TREBLE_MIN     0
+#define TAS3004_TREBLE_MAX     72
+#define TAS3004_BASS_MIN       0
+#define TAS3004_BASS_MAX       72
+#define TAS3004_TREBLE_ZERO    36
+#define TAS3004_BASS_ZERO      36
+
+static u8 tas3004_treble_table[] = {
+       150, /* -18 dB */
+       149,
+       148,
+       147,
+       146,
+       145,
+       144,
+       143,
+       142,
+       141,
+       140,
+       139,
+       138,
+       137,
+       136,
+       135,
+       134,
+       133,
+       132,
+       131,
+       130,
+       129,
+       128,
+       127,
+       126,
+       125,
+       124,
+       123,
+       122,
+       121,
+       120,
+       119,
+       118,
+       117,
+       116,
+       115,
+       114, /* 0 dB */
+       113,
+       112,
+       111,
+       109,
+       108,
+       107,
+       105,
+       104,
+       103,
+       101,
+       99,
+       98,
+       96,
+       93,
+       91,
+       89,
+       86,
+       83,
+       81,
+       77,
+       74,
+       71,
+       67,
+       63,
+       59,
+       54,
+       49,
+       44,
+       38,
+       32,
+       26,
+       19,
+       10,
+       4,
+       2,
+       1, /* +18 dB */
+};
+
+static inline u8 tas3004_treble(int idx)
+{
+       return tas3004_treble_table[idx];
+}
+
+/* I only save the difference here to the treble table
+ * so that the binary is smaller...
+ * I have also ignored completely differences of
+ * +/- 1
+ */
+static s8 tas3004_bass_diff_to_treble[] = {
+       2, /* 7 dB, offset 50 */
+       2,
+       2,
+       2,
+       2,
+       1,
+       2,
+       2,
+       2,
+       3,
+       4,
+       4,
+       5,
+       6,
+       7,
+       8,
+       9,
+       10,
+       11,
+       14,
+       13,
+       8,
+       1, /* 18 dB */
+};
+
+static inline u8 tas3004_bass(int idx)
+{
+       u8 result = tas3004_treble_table[idx];
+
+       if (idx >= 50)
+               result += tas3004_bass_diff_to_treble[idx-50];
+       return result;
+}
index 2e39ff6ee349b0888196d1e1a7521e2b7c6acfaa..16c0b6b0a80521eb90134bf50acfa46b842c9b0e 100644 (file)
@@ -72,22 +72,29 @@ MODULE_DESCRIPTION("tas codec driver for snd-aoa");
 
 #include "snd-aoa-codec-tas.h"
 #include "snd-aoa-codec-tas-gain-table.h"
+#include "snd-aoa-codec-tas-basstreble.h"
 #include "../aoa.h"
 #include "../soundbus/soundbus.h"
 
-
 #define PFX "snd-aoa-codec-tas: "
 
+
 struct tas {
        struct aoa_codec        codec;
        struct i2c_client       i2c;
-       u32                     muted_l:1, muted_r:1,
-                               controls_created:1;
+       u32                     mute_l:1, mute_r:1 ,
+                               controls_created:1 ,
+                               drc_enabled:1,
+                               hw_enabled:1;
        u8                      cached_volume_l, cached_volume_r;
        u8                      mixer_l[3], mixer_r[3];
+       u8                      bass, treble;
        u8                      acr;
+       int                     drc_range;
 };
 
+static int tas_reset_init(struct tas *tas);
+
 static struct tas *codec_to_tas(struct aoa_codec *codec)
 {
        return container_of(codec, struct tas, codec);
@@ -101,6 +108,44 @@ static inline int tas_write_reg(struct tas *tas, u8 reg, u8 len, u8 *data)
                return i2c_smbus_write_i2c_block_data(&tas->i2c, reg, len, data);
 }
 
+static void tas3004_set_drc(struct tas *tas)
+{
+       unsigned char val[6];
+
+       if (tas->drc_enabled)
+               val[0] = 0x50; /* 3:1 above threshold */
+       else
+               val[0] = 0x51; /* disabled */
+       val[1] = 0x02; /* 1:1 below threshold */
+       if (tas->drc_range > 0xef)
+               val[2] = 0xef;
+       else if (tas->drc_range < 0)
+               val[2] = 0x00;
+       else
+               val[2] = tas->drc_range;
+       val[3] = 0xb0;
+       val[4] = 0x60;
+       val[5] = 0xa0;
+
+       tas_write_reg(tas, TAS_REG_DRC, 6, val);
+}
+
+static void tas_set_treble(struct tas *tas)
+{
+       u8 tmp;
+
+       tmp = tas3004_treble(tas->treble);
+       tas_write_reg(tas, TAS_REG_TREBLE, 1, &tmp);
+}
+
+static void tas_set_bass(struct tas *tas)
+{
+       u8 tmp;
+
+       tmp = tas3004_bass(tas->bass);
+       tas_write_reg(tas, TAS_REG_BASS, 1, &tmp);
+}
+
 static void tas_set_volume(struct tas *tas)
 {
        u8 block[6];
@@ -113,8 +158,8 @@ static void tas_set_volume(struct tas *tas)
        if (left > 177) left = 177;
        if (right > 177) right = 177;
 
-       if (tas->muted_l) left = 0;
-       if (tas->muted_r) right = 0;
+       if (tas->mute_l) left = 0;
+       if (tas->mute_r) right = 0;
 
        /* analysing the volume and mixer tables shows
         * that they are similar enough when we shift
@@ -202,7 +247,8 @@ static int tas_snd_vol_put(struct snd_kcontrol *kcontrol,
 
        tas->cached_volume_l = ucontrol->value.integer.value[0];
        tas->cached_volume_r = ucontrol->value.integer.value[1];
-       tas_set_volume(tas);
+       if (tas->hw_enabled)
+               tas_set_volume(tas);
        return 1;
 }
 
@@ -230,8 +276,8 @@ static int tas_snd_mute_get(struct snd_kcontrol *kcontrol,
 {
        struct tas *tas = snd_kcontrol_chip(kcontrol);
 
-       ucontrol->value.integer.value[0] = !tas->muted_l;
-       ucontrol->value.integer.value[1] = !tas->muted_r;
+       ucontrol->value.integer.value[0] = !tas->mute_l;
+       ucontrol->value.integer.value[1] = !tas->mute_r;
        return 0;
 }
 
@@ -240,13 +286,14 @@ static int tas_snd_mute_put(struct snd_kcontrol *kcontrol,
 {
        struct tas *tas = snd_kcontrol_chip(kcontrol);
 
-       if (tas->muted_l == !ucontrol->value.integer.value[0]
-        && tas->muted_r == !ucontrol->value.integer.value[1])
+       if (tas->mute_l == !ucontrol->value.integer.value[0]
+        && tas->mute_r == !ucontrol->value.integer.value[1])
                return 0;
 
-       tas->muted_l = !ucontrol->value.integer.value[0];
-       tas->muted_r = !ucontrol->value.integer.value[1];
-       tas_set_volume(tas);
+       tas->mute_l = !ucontrol->value.integer.value[0];
+       tas->mute_r = !ucontrol->value.integer.value[1];
+       if (tas->hw_enabled)
+               tas_set_volume(tas);
        return 1;
 }
 
@@ -294,7 +341,8 @@ static int tas_snd_mixer_put(struct snd_kcontrol *kcontrol,
        tas->mixer_l[idx] = ucontrol->value.integer.value[0];
        tas->mixer_r[idx] = ucontrol->value.integer.value[1];
 
-       tas_set_mixer(tas);
+       if (tas->hw_enabled)
+               tas_set_mixer(tas);
        return 1;
 }
 
@@ -309,9 +357,93 @@ static struct snd_kcontrol_new n##_control = {             \
        .private_value = idx,                           \
 }
 
-MIXER_CONTROL(pcm1, "PCM1", 0);
+MIXER_CONTROL(pcm1, "PCM", 0);
 MIXER_CONTROL(monitor, "Monitor", 2);
 
+static int tas_snd_drc_range_info(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_info *uinfo)
+{
+       uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
+       uinfo->count = 1;
+       uinfo->value.integer.min = 0;
+       uinfo->value.integer.max = TAS3004_DRC_MAX;
+       return 0;
+}
+
+static int tas_snd_drc_range_get(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_value *ucontrol)
+{
+       struct tas *tas = snd_kcontrol_chip(kcontrol);
+
+       ucontrol->value.integer.value[0] = tas->drc_range;
+       return 0;
+}
+
+static int tas_snd_drc_range_put(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_value *ucontrol)
+{
+       struct tas *tas = snd_kcontrol_chip(kcontrol);
+
+       if (tas->drc_range == ucontrol->value.integer.value[0])
+               return 0;
+
+       tas->drc_range = ucontrol->value.integer.value[0];
+       if (tas->hw_enabled)
+               tas3004_set_drc(tas);
+       return 1;
+}
+
+static struct snd_kcontrol_new drc_range_control = {
+       .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+       .name = "DRC Range",
+       .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
+       .info = tas_snd_drc_range_info,
+       .get = tas_snd_drc_range_get,
+       .put = tas_snd_drc_range_put,
+};
+
+static int tas_snd_drc_switch_info(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_info *uinfo)
+{
+       uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
+       uinfo->count = 1;
+       uinfo->value.integer.min = 0;
+       uinfo->value.integer.max = 1;
+       return 0;
+}
+
+static int tas_snd_drc_switch_get(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_value *ucontrol)
+{
+       struct tas *tas = snd_kcontrol_chip(kcontrol);
+
+       ucontrol->value.integer.value[0] = tas->drc_enabled;
+       return 0;
+}
+
+static int tas_snd_drc_switch_put(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_value *ucontrol)
+{
+       struct tas *tas = snd_kcontrol_chip(kcontrol);
+
+       if (tas->drc_enabled == ucontrol->value.integer.value[0])
+               return 0;
+
+       tas->drc_enabled = ucontrol->value.integer.value[0];
+       if (tas->hw_enabled)
+               tas3004_set_drc(tas);
+       return 1;
+}
+
+static struct snd_kcontrol_new drc_switch_control = {
+       .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+       .name = "DRC Range Switch",
+       .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
+       .info = tas_snd_drc_switch_info,
+       .get = tas_snd_drc_switch_get,
+       .put = tas_snd_drc_switch_put,
+};
+
 static int tas_snd_capture_source_info(struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_info *uinfo)
 {
@@ -346,7 +478,8 @@ static int tas_snd_capture_source_put(struct snd_kcontrol *kcontrol,
                tas->acr |= TAS_ACR_INPUT_B;
        if (oldacr == tas->acr)
                return 0;
-       tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr);
+       if (tas->hw_enabled)
+               tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr);
        return 1;
 }
 
@@ -370,6 +503,89 @@ static struct snd_kcontrol_new capture_source_control = {
        .put = tas_snd_capture_source_put,
 };
 
+static int tas_snd_treble_info(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_info *uinfo)
+{
+       uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
+       uinfo->count = 1;
+       uinfo->value.integer.min = TAS3004_TREBLE_MIN;
+       uinfo->value.integer.max = TAS3004_TREBLE_MAX;
+       return 0;
+}
+
+static int tas_snd_treble_get(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_value *ucontrol)
+{
+       struct tas *tas = snd_kcontrol_chip(kcontrol);
+
+       ucontrol->value.integer.value[0] = tas->treble;
+       return 0;
+}
+
+static int tas_snd_treble_put(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_value *ucontrol)
+{
+       struct tas *tas = snd_kcontrol_chip(kcontrol);
+
+       if (tas->treble == ucontrol->value.integer.value[0])
+               return 0;
+
+       tas->treble = ucontrol->value.integer.value[0];
+       if (tas->hw_enabled)
+               tas_set_treble(tas);
+       return 1;
+}
+
+static struct snd_kcontrol_new treble_control = {
+       .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+       .name = "Treble",
+       .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
+       .info = tas_snd_treble_info,
+       .get = tas_snd_treble_get,
+       .put = tas_snd_treble_put,
+};
+
+static int tas_snd_bass_info(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_info *uinfo)
+{
+       uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
+       uinfo->count = 1;
+       uinfo->value.integer.min = TAS3004_BASS_MIN;
+       uinfo->value.integer.max = TAS3004_BASS_MAX;
+       return 0;
+}
+
+static int tas_snd_bass_get(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_value *ucontrol)
+{
+       struct tas *tas = snd_kcontrol_chip(kcontrol);
+
+       ucontrol->value.integer.value[0] = tas->bass;
+       return 0;
+}
+
+static int tas_snd_bass_put(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_value *ucontrol)
+{
+       struct tas *tas = snd_kcontrol_chip(kcontrol);
+
+       if (tas->bass == ucontrol->value.integer.value[0])
+               return 0;
+
+       tas->bass = ucontrol->value.integer.value[0];
+       if (tas->hw_enabled)
+               tas_set_bass(tas);
+       return 1;
+}
+
+static struct snd_kcontrol_new bass_control = {
+       .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+       .name = "Bass",
+       .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
+       .info = tas_snd_bass_info,
+       .get = tas_snd_bass_get,
+       .put = tas_snd_bass_put,
+};
 
 static struct transfer_info tas_transfers[] = {
        {
@@ -399,26 +615,67 @@ static int tas_usable(struct codec_info_item *cii,
 static int tas_reset_init(struct tas *tas)
 {
        u8 tmp;
+
+       tas->codec.gpio->methods->all_amps_off(tas->codec.gpio);
+       msleep(5);
        tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0);
-       msleep(1);
+       msleep(5);
        tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 1);
-       msleep(1);
+       msleep(20);
        tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0);
-       msleep(1);
-
-       tas->acr &= ~TAS_ACR_ANALOG_PDOWN;
-       tas->acr |= TAS_ACR_B_MONAUREAL | TAS_ACR_B_MON_SEL_RIGHT;
-       if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr))
-               return -ENODEV;
+       msleep(10);
+       tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio);
 
        tmp = TAS_MCS_SCLK64 | TAS_MCS_SPORT_MODE_I2S | TAS_MCS_SPORT_WL_24BIT;
        if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp))
                return -ENODEV;
 
+       tas->acr |= TAS_ACR_ANALOG_PDOWN | TAS_ACR_B_MONAUREAL |
+               TAS_ACR_B_MON_SEL_RIGHT;
+       if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr))
+               return -ENODEV;
+
        tmp = 0;
        if (tas_write_reg(tas, TAS_REG_MCS2, 1, &tmp))
                return -ENODEV;
 
+       tas3004_set_drc(tas);
+
+       /* Set treble & bass to 0dB */
+       tas->treble = TAS3004_TREBLE_ZERO;
+       tas->bass = TAS3004_BASS_ZERO;
+       tas_set_treble(tas);
+       tas_set_bass(tas);
+
+       tas->acr &= ~TAS_ACR_ANALOG_PDOWN;
+       if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr))
+               return -ENODEV;
+
+       return 0;
+}
+
+static int tas_switch_clock(struct codec_info_item *cii, enum clock_switch clock)
+{
+       struct tas *tas = cii->codec_data;
+
+       switch(clock) {
+       case CLOCK_SWITCH_PREPARE_SLAVE:
+               /* Clocks are going away, mute mute mute */
+               tas->codec.gpio->methods->all_amps_off(tas->codec.gpio);
+               tas->hw_enabled = 0;
+               break;
+       case CLOCK_SWITCH_SLAVE:
+               /* Clocks are back, re-init the codec */
+               tas_reset_init(tas);
+               tas_set_volume(tas);
+               tas_set_mixer(tas);
+               tas->hw_enabled = 1;
+               tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio);
+               break;
+       default:
+               /* doesn't happen as of now */
+               return -EINVAL;
+       }
        return 0;
 }
 
@@ -427,6 +684,7 @@ static int tas_reset_init(struct tas *tas)
  * our i2c device is suspended, and then take note of that! */
 static int tas_suspend(struct tas *tas)
 {
+       tas->hw_enabled = 0;
        tas->acr |= TAS_ACR_ANALOG_PDOWN;
        tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr);
        return 0;
@@ -438,6 +696,7 @@ static int tas_resume(struct tas *tas)
        tas_reset_init(tas);
        tas_set_volume(tas);
        tas_set_mixer(tas);
+       tas->hw_enabled = 1;
        return 0;
 }
 
@@ -463,6 +722,7 @@ static struct codec_info tas_codec_info = {
        .bus_factor = 64,
        .owner = THIS_MODULE,
        .usable = tas_usable,
+       .switch_clock = tas_switch_clock,
 #ifdef CONFIG_PM
        .suspend = _tas_suspend,
        .resume = _tas_resume,
@@ -483,6 +743,7 @@ static int tas_init_codec(struct aoa_codec *codec)
                printk(KERN_ERR PFX "tas failed to initialise\n");
                return -ENXIO;
        }
+       tas->hw_enabled = 1;
 
        if (tas->codec.soundbus_dev->attach_codec(tas->codec.soundbus_dev,
                                                   aoa_get_card(),
@@ -515,6 +776,22 @@ static int tas_init_codec(struct aoa_codec *codec)
        if (err)
                goto error;
 
+       err = aoa_snd_ctl_add(snd_ctl_new1(&drc_range_control, tas));
+       if (err)
+               goto error;
+
+       err = aoa_snd_ctl_add(snd_ctl_new1(&drc_switch_control, tas));
+       if (err)
+               goto error;
+
+       err = aoa_snd_ctl_add(snd_ctl_new1(&treble_control, tas));
+       if (err)
+               goto error;
+
+       err = aoa_snd_ctl_add(snd_ctl_new1(&bass_control, tas));
+       if (err)
+               goto error;
+
        return 0;
  error:
        tas->codec.soundbus_dev->detach_codec(tas->codec.soundbus_dev, tas);
@@ -548,6 +825,8 @@ static int tas_create(struct i2c_adapter *adapter,
        tas->i2c.driver = &tas_driver;
        tas->i2c.adapter = adapter;
        tas->i2c.addr = addr;
+       /* seems that half is a saner default */
+       tas->drc_range = TAS3004_DRC_MAX / 2;
        strlcpy(tas->i2c.name, "tas audio codec", I2C_NAME_SIZE-1);
 
        if (i2c_attach_client(&tas->i2c)) {
@@ -564,7 +843,9 @@ static int tas_create(struct i2c_adapter *adapter,
        if (aoa_codec_register(&tas->codec)) {
                goto detach;
        }
-       printk(KERN_DEBUG "snd-aoa-codec-tas: created and attached tas instance\n");
+       printk(KERN_DEBUG
+              "snd-aoa-codec-tas: tas found, addr 0x%02x on %s\n",
+              addr, node->full_name);
        return 0;
  detach:
        i2c_detach_client(&tas->i2c);
index daf81f45d83a83ecb52448a82f35d858302e220a..ae177e3466e6db229f9ea05969ec99b4be9c78c9 100644 (file)
 #define TAS_REG_LEFT_BIQUAD6   0x10
 #define TAS_REG_RIGHT_BIQUAD6  0x19
 
+#define TAS_REG_LEFT_LOUDNESS          0x21
+#define TAS_REG_RIGHT_LOUDNESS         0x22
+#define TAS_REG_LEFT_LOUDNESS_GAIN     0x23
+#define TAS_REG_RIGHT_LOUDNESS_GAIN    0x24
+
+#define TAS3001_DRC_MAX                0x5f
+#define TAS3004_DRC_MAX                0xef
+
 #endif /* __SND_AOA_CODECTASH */
index 0e9b9bb2a6de06a48c7666dbee40ab08f4cd5c90..3d57fd1aec4b6888c6d4664015404425143c6285 100644 (file)
 static void pmf_gpio_set_##name(struct gpio_runtime *rt, int on)\
 {                                                              \
        struct pmf_args args = { .count = 1, .u[0].v = !on };   \
-                                                               \
+       int rc;                                                 \
+                                                       \
        if (unlikely(!rt)) return;                              \
-       pmf_call_function(rt->node, #name "-mute", &args);      \
+       rc = pmf_call_function(rt->node, #name "-mute", &args); \
+       if (rc)                                                 \
+               printk(KERN_WARNING "pmf_gpio_set_" #name       \
+               " failed, rc: %d\n", rc);                       \
        rt->implementation_private &= ~(1<<bit);                \
        rt->implementation_private |= (!!on << bit);            \
 }                                                              \
@@ -33,9 +37,13 @@ PMF_GPIO(lineout, 2);
 static void pmf_gpio_set_hw_reset(struct gpio_runtime *rt, int on)
 {
        struct pmf_args args = { .count = 1, .u[0].v = !!on };
+       int rc;
 
        if (unlikely(!rt)) return;
-       pmf_call_function(rt->node, "hw-reset", &args);
+       rc = pmf_call_function(rt->node, "hw-reset", &args);
+       if (rc)
+               printk(KERN_WARNING "pmf_gpio_set_hw_reset"
+                      " failed, rc: %d\n", rc);
 }
 
 static void pmf_gpio_all_amps_off(struct gpio_runtime *rt)
index cbc8a3b5cea4e3d638d936ad72782dba552e0121..172eb95476c032edbbad972fac59bb68fa2dee9d 100644 (file)
@@ -77,24 +77,39 @@ struct layout {
        int pcmid;
 };
 
+MODULE_ALIAS("sound-layout-36");
 MODULE_ALIAS("sound-layout-41");
 MODULE_ALIAS("sound-layout-45");
+MODULE_ALIAS("sound-layout-47");
+MODULE_ALIAS("sound-layout-48");
+MODULE_ALIAS("sound-layout-49");
+MODULE_ALIAS("sound-layout-50");
 MODULE_ALIAS("sound-layout-51");
+MODULE_ALIAS("sound-layout-56");
+MODULE_ALIAS("sound-layout-57");
 MODULE_ALIAS("sound-layout-58");
 MODULE_ALIAS("sound-layout-60");
 MODULE_ALIAS("sound-layout-61");
+MODULE_ALIAS("sound-layout-62");
 MODULE_ALIAS("sound-layout-64");
 MODULE_ALIAS("sound-layout-65");
+MODULE_ALIAS("sound-layout-66");
+MODULE_ALIAS("sound-layout-67");
 MODULE_ALIAS("sound-layout-68");
 MODULE_ALIAS("sound-layout-69");
 MODULE_ALIAS("sound-layout-70");
 MODULE_ALIAS("sound-layout-72");
+MODULE_ALIAS("sound-layout-76");
 MODULE_ALIAS("sound-layout-80");
 MODULE_ALIAS("sound-layout-82");
 MODULE_ALIAS("sound-layout-84");
 MODULE_ALIAS("sound-layout-86");
+MODULE_ALIAS("sound-layout-90");
 MODULE_ALIAS("sound-layout-92");
+MODULE_ALIAS("sound-layout-94");
 MODULE_ALIAS("sound-layout-96");
+MODULE_ALIAS("sound-layout-98");
+MODULE_ALIAS("sound-layout-100");
 
 /* onyx with all but microphone connected */
 static struct codec_connection onyx_connections_nomic[] = {
@@ -950,11 +965,12 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
        layout_id = (unsigned int *) get_property(sound, "layout-id", NULL);
        if (!layout_id)
                goto outnodev;
-       printk(KERN_INFO "snd-aoa-fabric-layout: found bus with layout %d ", *layout_id);
+       printk(KERN_INFO "snd-aoa-fabric-layout: found bus with layout %d\n",
+              *layout_id);
 
        layout = find_layout_by_id(*layout_id);
        if (!layout) {
-               printk("(no idea how to handle)\n");
+               printk(KERN_ERR "snd-aoa-fabric-layout: unknown layout\n");
                goto outnodev;
        }
 
@@ -972,15 +988,17 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
        case 51: /* PowerBook5,4 */
        case 58: /* Mac Mini */
                ldev->gpio.methods = ftr_gpio_methods;
+               printk(KERN_DEBUG
+                      "snd-aoa-fabric-layout: Using direct GPIOs\n");
                break;
        default:
                ldev->gpio.methods = pmf_gpio_methods;
+               printk(KERN_DEBUG
+                      "snd-aoa-fabric-layout: Using PMF GPIOs\n");
        }
        ldev->selfptr_headphone.ptr = ldev;
        ldev->selfptr_lineout.ptr = ldev;
        sdev->ofdev.dev.driver_data = ldev;
-
-       printk("(using)\n");
        list_add(&ldev->list, &layouts_list);
        layouts_list_items++;
 
index abe84a76c835150754eeae3844fa781e06689a2e..47b3e3768df0b3b1f0dfe874bad806570f837d8d 100644 (file)
@@ -194,16 +194,6 @@ static struct bus_type soundbus_bus_type = {
        .dev_attrs      = soundbus_dev_attrs,
 };
 
-static int __init soundbus_init(void)
-{
-       return bus_register(&soundbus_bus_type);
-}
-
-static void __exit soundbus_exit(void)
-{
-       bus_unregister(&soundbus_bus_type);
-}
-
 int soundbus_add_one(struct soundbus_dev *dev)
 {
        static int devcount;
@@ -246,5 +236,15 @@ void soundbus_unregister_driver(struct soundbus_driver *drv)
 }
 EXPORT_SYMBOL_GPL(soundbus_unregister_driver);
 
-module_init(soundbus_init);
+static int __init soundbus_init(void)
+{
+       return bus_register(&soundbus_bus_type);
+}
+
+static void __exit soundbus_exit(void)
+{
+       bus_unregister(&soundbus_bus_type);
+}
+
+subsys_initcall(soundbus_init);
 module_exit(soundbus_exit);
index f50407952d3cad0327e6b9dfa46bff38ae29a6be..87beb4ad4d63a3b7f2521b8820941a6a44631c91 100644 (file)
@@ -6,12 +6,16 @@
  * GPL v2, can be found in COPYING.
  */
 
-#include <asm/io.h>
+#include <linux/kernel.h>
 #include <linux/delay.h>
+
+#include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/macio.h>
 #include <asm/pmac_feature.h>
 #include <asm/pmac_pfunc.h>
+#include <asm/keylargo.h>
+
 #include "i2sbus.h"
 
 int i2sbus_control_init(struct macio_dev* dev, struct i2sbus_control **c)
@@ -22,26 +26,12 @@ int i2sbus_control_init(struct macio_dev* dev, struct i2sbus_control **c)
 
        INIT_LIST_HEAD(&(*c)->list);
 
-       if (of_address_to_resource(dev->ofdev.node, 0, &(*c)->rsrc))
-               goto err;
-       /* we really should be using feature calls instead of mapping
-        * these registers. It's safe for now since no one else is
-        * touching them... */
-       (*c)->controlregs = ioremap((*c)->rsrc.start,
-                                   sizeof(struct i2s_control_regs));
-       if (!(*c)->controlregs)
-               goto err;
-
+       (*c)->macio = dev->bus->chip;
        return 0;
- err:
-       kfree(*c);
-       *c = NULL;
-       return -ENODEV;
 }
 
 void i2sbus_control_destroy(struct i2sbus_control *c)
 {
-       iounmap(c->controlregs);
        kfree(c);
 }
 
@@ -93,19 +83,22 @@ int i2sbus_control_enable(struct i2sbus_control *c,
                          struct i2sbus_dev *i2sdev)
 {
        struct pmf_args args = { .count = 0 };
-       int cc;
+       struct macio_chip *macio = c->macio;
 
        if (i2sdev->enable)
                return pmf_call_one(i2sdev->enable, &args);
 
+       if (macio == NULL || macio->base == NULL)
+               return -ENODEV;
+
        switch (i2sdev->bus_number) {
        case 0:
-               cc = in_le32(&c->controlregs->cell_control);
-               out_le32(&c->controlregs->cell_control, cc | CTRL_CLOCK_INTF_0_ENABLE);
+               /* these need to be locked or done through
+                * newly created feature calls! */
+               MACIO_BIS(KEYLARGO_FCR1, KL1_I2S0_ENABLE);
                break;
        case 1:
-               cc = in_le32(&c->controlregs->cell_control);
-               out_le32(&c->controlregs->cell_control, cc | CTRL_CLOCK_INTF_1_ENABLE);
+               MACIO_BIS(KEYLARGO_FCR1, KL1_I2S1_ENABLE);
                break;
        default:
                return -ENODEV;
@@ -118,7 +111,7 @@ int i2sbus_control_cell(struct i2sbus_control *c,
                        int enable)
 {
        struct pmf_args args = { .count = 0 };
-       int cc;
+       struct macio_chip *macio = c->macio;
 
        switch (enable) {
        case 0:
@@ -133,18 +126,22 @@ int i2sbus_control_cell(struct i2sbus_control *c,
                printk(KERN_ERR "i2sbus: INVALID CELL ENABLE VALUE\n");
                return -ENODEV;
        }
+
+       if (macio == NULL || macio->base == NULL)
+               return -ENODEV;
+
        switch (i2sdev->bus_number) {
        case 0:
-               cc = in_le32(&c->controlregs->cell_control);
-               cc &= ~CTRL_CLOCK_CELL_0_ENABLE;
-               cc |= enable * CTRL_CLOCK_CELL_0_ENABLE;
-               out_le32(&c->controlregs->cell_control, cc);
+               if (enable)
+                       MACIO_BIS(KEYLARGO_FCR1, KL1_I2S0_CELL_ENABLE);
+               else
+                       MACIO_BIC(KEYLARGO_FCR1, KL1_I2S0_CELL_ENABLE);
                break;
        case 1:
-               cc = in_le32(&c->controlregs->cell_control);
-               cc &= ~CTRL_CLOCK_CELL_1_ENABLE;
-               cc |= enable * CTRL_CLOCK_CELL_1_ENABLE;
-               out_le32(&c->controlregs->cell_control, cc);
+               if (enable)
+                       MACIO_BIS(KEYLARGO_FCR1, KL1_I2S1_CELL_ENABLE);
+               else
+                       MACIO_BIC(KEYLARGO_FCR1, KL1_I2S1_CELL_ENABLE);
                break;
        default:
                return -ENODEV;
@@ -157,7 +154,7 @@ int i2sbus_control_clock(struct i2sbus_control *c,
                         int enable)
 {
        struct pmf_args args = { .count = 0 };
-       int cc;
+       struct macio_chip *macio = c->macio;
 
        switch (enable) {
        case 0:
@@ -172,18 +169,22 @@ int i2sbus_control_clock(struct i2sbus_control *c,
                printk(KERN_ERR "i2sbus: INVALID CLOCK ENABLE VALUE\n");
                return -ENODEV;
        }
+
+       if (macio == NULL || macio->base == NULL)
+               return -ENODEV;
+
        switch (i2sdev->bus_number) {
        case 0:
-               cc = in_le32(&c->controlregs->cell_control);
-               cc &= ~CTRL_CLOCK_CLOCK_0_ENABLE;
-               cc |= enable * CTRL_CLOCK_CLOCK_0_ENABLE;
-               out_le32(&c->controlregs->cell_control, cc);
+               if (enable)
+                       MACIO_BIS(KEYLARGO_FCR1, KL1_I2S0_CLK_ENABLE_BIT);
+               else
+                       MACIO_BIC(KEYLARGO_FCR1, KL1_I2S0_CLK_ENABLE_BIT);
                break;
        case 1:
-               cc = in_le32(&c->controlregs->cell_control);
-               cc &= ~CTRL_CLOCK_CLOCK_1_ENABLE;
-               cc |= enable * CTRL_CLOCK_CLOCK_1_ENABLE;
-               out_le32(&c->controlregs->cell_control, cc);
+               if (enable)
+                       MACIO_BIS(KEYLARGO_FCR1, KL1_I2S1_CLK_ENABLE_BIT);
+               else
+                       MACIO_BIC(KEYLARGO_FCR1, KL1_I2S1_CLK_ENABLE_BIT);
                break;
        default:
                return -ENODEV;
diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-control.h b/sound/aoa/soundbus/i2sbus/i2sbus-control.h
deleted file mode 100644 (file)
index bb05550..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * i2sbus driver -- bus register definitions
- *
- * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
- *
- * GPL v2, can be found in COPYING.
- */
-#ifndef __I2SBUS_CONTROLREGS_H
-#define __I2SBUS_CONTROLREGS_H
-
-/* i2s control registers, at least what we know about them */
-
-#define __PAD(m,n) u8 __pad##m[n]
-#define _PAD(line, n) __PAD(line, n)
-#define PAD(n) _PAD(__LINE__, (n))
-struct i2s_control_regs {
-       PAD(0x38);
-       __le32 fcr0;            /* 0x38 (unknown) */
-       __le32 cell_control;    /* 0x3c (fcr1) */
-       __le32 fcr2;            /* 0x40 (unknown) */
-       __le32 fcr3;            /* 0x44 (fcr3) */
-       __le32 clock_control;   /* 0x48 (unknown) */
-       PAD(4);
-       /* total size: 0x50 bytes */
-}  __attribute__((__packed__));
-
-#define CTRL_CLOCK_CELL_0_ENABLE       (1<<10)
-#define CTRL_CLOCK_CLOCK_0_ENABLE      (1<<12)
-#define CTRL_CLOCK_SWRESET_0           (1<<11)
-#define CTRL_CLOCK_INTF_0_ENABLE       (1<<13)
-
-#define CTRL_CLOCK_CELL_1_ENABLE       (1<<17)
-#define CTRL_CLOCK_CLOCK_1_ENABLE      (1<<18)
-#define CTRL_CLOCK_SWRESET_1           (1<<19)
-#define CTRL_CLOCK_INTF_1_ENABLE       (1<<20)
-
-#endif /* __I2SBUS_CONTROLREGS_H */
index 01c0724335a3058652e878de8299726cc65a116b..23190aa6bc7b8607e1cc951182597a0226b75b1b 100644 (file)
@@ -7,13 +7,16 @@
  */
 
 #include <linux/module.h>
-#include <asm/macio.h>
-#include <asm/dbdma.h>
 #include <linux/pci.h>
 #include <linux/interrupt.h>
+#include <linux/dma-mapping.h>
+
 #include <sound/driver.h>
 #include <sound/core.h>
-#include <linux/dma-mapping.h>
+
+#include <asm/macio.h>
+#include <asm/dbdma.h>
+
 #include "../soundbus.h"
 #include "i2sbus.h"
 
@@ -24,6 +27,11 @@ MODULE_DESCRIPTION("Apple Soundbus: I2S support");
  * string that macio puts into the relevant device */
 MODULE_ALIAS("of:Ni2sTi2sC");
 
+static int force;
+module_param(force, int, 0444);
+MODULE_PARM_DESC(force, "Force loading i2sbus even when"
+                       " no layout-id property is present");
+
 static struct of_device_id i2sbus_match[] = {
        { .name = "i2s" },
        { }
@@ -73,12 +81,12 @@ static void i2sbus_release_dev(struct device *dev)
        if (i2sdev->intfregs) iounmap(i2sdev->intfregs);
        if (i2sdev->out.dbdma) iounmap(i2sdev->out.dbdma);
        if (i2sdev->in.dbdma) iounmap(i2sdev->in.dbdma);
-       for (i=0;i<3;i++)
+       for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++)
                if (i2sdev->allocated_resource[i])
                        release_and_free_resource(i2sdev->allocated_resource[i]);
        free_dbdma_descriptor_ring(i2sdev, &i2sdev->out.dbdma_ring);
        free_dbdma_descriptor_ring(i2sdev, &i2sdev->in.dbdma_ring);
-       for (i=0;i<3;i++)
+       for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++)
                free_irq(i2sdev->interrupts[i], i2sdev);
        i2sbus_control_remove_dev(i2sdev->control, i2sdev);
        mutex_destroy(&i2sdev->lock);
@@ -101,10 +109,49 @@ static irqreturn_t i2sbus_bus_intr(int irq, void *devid, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-static int force;
-module_param(force, int, 0444);
-MODULE_PARM_DESC(force, "Force loading i2sbus even when"
-                       " no layout-id property is present");
+
+/*
+ * XXX FIXME: We test the layout_id's here to get the proper way of
+ * mapping in various registers, thanks to bugs in Apple device-trees.
+ * We could instead key off the machine model and the name of the i2s
+ * node (i2s-a). This we'll do when we move it all to macio_asic.c
+ * and have that export items for each sub-node too.
+ */
+static int i2sbus_get_and_fixup_rsrc(struct device_node *np, int index,
+                                    int layout, struct resource *res)
+{
+       struct device_node *parent;
+       int pindex, rc = -ENXIO;
+       u32 *reg;
+
+       /* Machines with layout 76 and 36 (K2 based) have a weird device
+        * tree what we need to special case.
+        * Normal machines just fetch the resource from the i2s-X node.
+        * Darwin further divides normal machines into old and new layouts
+        * with a subtely different code path but that doesn't seem necessary
+        * in practice, they just bloated it. In addition, even on our K2
+        * case the i2s-modem node, if we ever want to handle it, uses the
+        * normal layout
+        */
+       if (layout != 76 && layout != 36)
+               return of_address_to_resource(np, index, res);
+
+       parent = of_get_parent(np);
+       pindex = (index == aoa_resource_i2smmio) ? 0 : 1;
+       rc = of_address_to_resource(parent, pindex, res);
+       if (rc)
+               goto bail;
+       reg = (u32 *)get_property(np, "reg", NULL);
+       if (reg == NULL) {
+               rc = -ENXIO;
+               goto bail;
+       }
+       res->start += reg[index * 2];
+       res->end = res->start + reg[index * 2 + 1] - 1;
+ bail:
+       of_node_put(parent);
+       return rc;
+}
 
 /* FIXME: look at device node refcounting */
 static int i2sbus_add_dev(struct macio_dev *macio,
@@ -113,7 +160,8 @@ static int i2sbus_add_dev(struct macio_dev *macio,
 {
        struct i2sbus_dev *dev;
        struct device_node *child = NULL, *sound = NULL;
-       int i;
+       struct resource *r;
+       int i, layout = 0, rlen;
        static const char *rnames[] = { "i2sbus: %s (control)",
                                        "i2sbus: %s (tx)",
                                        "i2sbus: %s (rx)" };
@@ -129,9 +177,6 @@ static int i2sbus_add_dev(struct macio_dev *macio,
        if (strncmp(np->name, "i2s-", 4))
                return 0;
 
-       if (macio_irq_count(macio) != 3)
-               return 0;
-
        dev = kzalloc(sizeof(struct i2sbus_dev), GFP_KERNEL);
        if (!dev)
                return 0;
@@ -147,8 +192,9 @@ static int i2sbus_add_dev(struct macio_dev *macio,
                u32 *layout_id;
                layout_id = (u32*) get_property(sound, "layout-id", NULL);
                if (layout_id) {
+                       layout = *layout_id;
                        snprintf(dev->sound.modalias, 32,
-                                "sound-layout-%d", *layout_id);
+                                "sound-layout-%d", layout);
                        force = 1;
                }
        }
@@ -178,23 +224,32 @@ static int i2sbus_add_dev(struct macio_dev *macio,
        dev->bus_number = np->name[4] - 'a';
        INIT_LIST_HEAD(&dev->sound.codec_list);
 
-       for (i=0;i<3;i++) {
+       for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) {
                dev->interrupts[i] = -1;
-               snprintf(dev->rnames[i], sizeof(dev->rnames[i]), rnames[i], np->name);
+               snprintf(dev->rnames[i], sizeof(dev->rnames[i]),
+                        rnames[i], np->name);
        }
-       for (i=0;i<3;i++) {
-               if (request_irq(macio_irq(macio, i), ints[i], 0,
-                               dev->rnames[i], dev))
+       for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) {
+               int irq = irq_of_parse_and_map(np, i);
+               if (request_irq(irq, ints[i], 0, dev->rnames[i], dev))
                        goto err;
-               dev->interrupts[i] = macio_irq(macio, i);
+               dev->interrupts[i] = irq;
        }
 
-       for (i=0;i<3;i++) {
-               if (of_address_to_resource(np, i, &dev->resources[i]))
+
+       /* Resource handling is problematic as some device-trees contain
+        * useless crap (ugh ugh ugh). We work around that here by calling
+        * specific functions for calculating the appropriate resources.
+        *
+        * This will all be moved to macio_asic.c at one point
+        */
+       for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) {
+               if (i2sbus_get_and_fixup_rsrc(np,i,layout,&dev->resources[i]))
                        goto err;
-               /* if only we could use our resource dev->resources[i]...
+               /* If only we could use our resource dev->resources[i]...
                 * but request_resource doesn't know about parents and
-                * contained resources... */
+                * contained resources...
+                */
                dev->allocated_resource[i] = 
                        request_mem_region(dev->resources[i].start,
                                           dev->resources[i].end -
@@ -205,13 +260,25 @@ static int i2sbus_add_dev(struct macio_dev *macio,
                        goto err;
                }
        }
-       /* should do sanity checking here about length of them */
-       dev->intfregs = ioremap(dev->resources[0].start,
-                               dev->resources[0].end-dev->resources[0].start+1);
-       dev->out.dbdma = ioremap(dev->resources[1].start,
-                                dev->resources[1].end-dev->resources[1].start+1);
-       dev->in.dbdma = ioremap(dev->resources[2].start,
-                               dev->resources[2].end-dev->resources[2].start+1);
+
+       r = &dev->resources[aoa_resource_i2smmio];
+       rlen = r->end - r->start + 1;
+       if (rlen < sizeof(struct i2s_interface_regs))
+               goto err;
+       dev->intfregs = ioremap(r->start, rlen);
+
+       r = &dev->resources[aoa_resource_txdbdma];
+       rlen = r->end - r->start + 1;
+       if (rlen < sizeof(struct dbdma_regs))
+               goto err;
+       dev->out.dbdma = ioremap(r->start, rlen);
+
+       r = &dev->resources[aoa_resource_rxdbdma];
+       rlen = r->end - r->start + 1;
+       if (rlen < sizeof(struct dbdma_regs))
+               goto err;
+       dev->in.dbdma = ioremap(r->start, rlen);
+
        if (!dev->intfregs || !dev->out.dbdma || !dev->in.dbdma)
                goto err;
 
index cfa5162e3b0f44d0af5aa65d5ca6428fc0b83af2..0c69d209be503db173fb6e7ca979425a7ed9a73a 100644 (file)
@@ -7,20 +7,22 @@
  */
 #ifndef __I2SBUS_H
 #define __I2SBUS_H
-#include <asm/dbdma.h>
 #include <linux/interrupt.h>
-#include <sound/pcm.h>
 #include <linux/spinlock.h>
 #include <linux/mutex.h>
+
+#include <sound/pcm.h>
+
 #include <asm/prom.h>
+#include <asm/pmac_feature.h>
+#include <asm/dbdma.h>
+
 #include "i2sbus-interface.h"
-#include "i2sbus-control.h"
 #include "../soundbus.h"
 
 struct i2sbus_control {
-       volatile struct i2s_control_regs __iomem *controlregs;
-       struct resource rsrc;
        struct list_head list;
+       struct macio_chip *macio;
 };
 
 #define MAX_DBDMA_COMMANDS     32
@@ -45,6 +47,12 @@ struct pcm_info {
        volatile struct dbdma_regs __iomem *dbdma;
 };
 
+enum {
+       aoa_resource_i2smmio = 0,
+       aoa_resource_txdbdma,
+       aoa_resource_rxdbdma,
+};
+
 struct i2sbus_dev {
        struct soundbus_dev sound;
        struct macio_dev *macio;
index 264f2efd1af88ffc26b3b333d08e88a0dd6e19e1..7edd1fc58b1747c20c7f8c65b7815053899949d5 100644 (file)
@@ -244,7 +244,7 @@ int snd_register_device(int type, struct snd_card *card, int dev,
        struct device *device = NULL;
 
        snd_assert(name, return -EINVAL);
-       preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
+       preg = kmalloc(sizeof *preg, GFP_KERNEL);
        if (preg == NULL)
                return -ENOMEM;
        preg->type = type;
@@ -252,7 +252,6 @@ int snd_register_device(int type, struct snd_card *card, int dev,
        preg->device = dev;
        preg->f_ops = f_ops;
        preg->private_data = private_data;
-       strcpy(preg->name, name);
        mutex_lock(&sound_mutex);
 #ifdef CONFIG_SND_DYNAMIC_MINORS
        minor = snd_find_free_minor();
index 78199f58b93a7daf6fc9a53e5f7b1190d977b71a..0a984e881c1089ee68ac4ca11c8ad98a82d0902e 100644 (file)
@@ -628,8 +628,9 @@ static void snd_timer_tasklet(unsigned long arg)
        struct snd_timer_instance *ti;
        struct list_head *p;
        unsigned long resolution, ticks;
+       unsigned long flags;
 
-       spin_lock(&timer->lock);
+       spin_lock_irqsave(&timer->lock, flags);
        /* now process all callbacks */
        while (!list_empty(&timer->sack_list_head)) {
                p = timer->sack_list_head.next;         /* get first item */
@@ -649,7 +650,7 @@ static void snd_timer_tasklet(unsigned long arg)
                spin_lock(&timer->lock);
                ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK;
        }
-       spin_unlock(&timer->lock);
+       spin_unlock_irqrestore(&timer->lock, flags);
 }
 
 /*
index cb89f7eb9236dfee53a2870f8f0622a8d4f9f98a..64388cb8d6e508b9b5f24942cac2ee84285e1a8e 100644 (file)
@@ -76,23 +76,28 @@ int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg,
        buf[0] = reg & 0x7f;
        buf[1] = val;
        if ((err = snd_i2c_sendbytes(device, buf, 2)) != 2) {
-               snd_printk(KERN_ERR "unable to send bytes 0x%02x:0x%02x to CS8427 (%i)\n", buf[0], buf[1], err);
+               snd_printk(KERN_ERR "unable to send bytes 0x%02x:0x%02x "
+                          "to CS8427 (%i)\n", buf[0], buf[1], err);
                return err < 0 ? err : -EIO;
        }
        return 0;
 }
 
+EXPORT_SYMBOL(snd_cs8427_reg_write);
+
 static int snd_cs8427_reg_read(struct snd_i2c_device *device, unsigned char reg)
 {
        int err;
        unsigned char buf;
 
        if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) {
-               snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg);
+               snd_printk(KERN_ERR "unable to send register 0x%x byte "
+                          "to CS8427\n", reg);
                return err < 0 ? err : -EIO;
        }
        if ((err = snd_i2c_readbytes(device, &buf, 1)) != 1) {
-               snd_printk(KERN_ERR "unable to read register 0x%x byte from CS8427\n", reg);
+               snd_printk(KERN_ERR "unable to read register 0x%x byte "
+                          "from CS8427\n", reg);
                return err < 0 ? err : -EIO;
        }
        return buf;
@@ -121,7 +126,8 @@ static int snd_cs8427_send_corudata(struct snd_i2c_device *device,
                                    int count)
 {
        struct cs8427 *chip = device->private_data;
-       char *hw_data = udata ? chip->playback.hw_udata : chip->playback.hw_status;
+       char *hw_data = udata ?
+               chip->playback.hw_udata : chip->playback.hw_status;
        char data[32];
        int err, idx;
 
@@ -134,11 +140,11 @@ static int snd_cs8427_send_corudata(struct snd_i2c_device *device,
                memset(data, 0, sizeof(data));
                if (memcmp(hw_data, data, count) == 0) {
                        chip->regmap[CS8427_REG_UDATABUF] &= ~CS8427_UBMMASK;
-                       chip->regmap[CS8427_REG_UDATABUF] |= CS8427_UBMZEROS | CS8427_EFTUI;
-                       if ((err = snd_cs8427_reg_write(device, CS8427_REG_UDATABUF,
-                                                       chip->regmap[CS8427_REG_UDATABUF])) < 0)
-                               return err;
-                       return 0;
+                       chip->regmap[CS8427_REG_UDATABUF] |= CS8427_UBMZEROS |
+                               CS8427_EFTUI;
+                       err = snd_cs8427_reg_write(device, CS8427_REG_UDATABUF,
+                                                  chip->regmap[CS8427_REG_UDATABUF]);
+                       return err < 0 ? err : 0;
                }
        }
        data[0] = CS8427_REG_AUTOINC | CS8427_REG_CORU_DATABUF;
@@ -161,24 +167,32 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
 {
        static unsigned char initvals1[] = {
          CS8427_REG_CONTROL1 | CS8427_REG_AUTOINC,
-         /* CS8427_REG_CONTROL1: RMCK to OMCK, valid PCM audio, disable mutes, TCBL=output */
+         /* CS8427_REG_CONTROL1: RMCK to OMCK, valid PCM audio, disable mutes,
+            TCBL=output */
          CS8427_SWCLK | CS8427_TCBLDIR,
-         /* CS8427_REG_CONTROL2: hold last valid audio sample, RMCK=256*Fs, normal stereo operation */
+         /* CS8427_REG_CONTROL2: hold last valid audio sample, RMCK=256*Fs,
+            normal stereo operation */
          0x00,
-         /* CS8427_REG_DATAFLOW: output drivers normal operation, Tx<=serial, Rx=>serial */
+         /* CS8427_REG_DATAFLOW: output drivers normal operation, Tx<=serial,
+            Rx=>serial */
          CS8427_TXDSERIAL | CS8427_SPDAES3RECEIVER,
-         /* CS8427_REG_CLOCKSOURCE: Run off, CMCK=256*Fs, output time base = OMCK, input time base =
-            recovered input clock, recovered input clock source is ILRCK changed to AES3INPUT (workaround, see snd_cs8427_reset) */
+         /* CS8427_REG_CLOCKSOURCE: Run off, CMCK=256*Fs,
+            output time base = OMCK, input time base = recovered input clock,
+            recovered input clock source is ILRCK changed to AES3INPUT
+            (workaround, see snd_cs8427_reset) */
          CS8427_RXDILRCK,
-         /* CS8427_REG_SERIALINPUT: Serial audio input port data format = I2S, 24-bit, 64*Fsi */
+         /* CS8427_REG_SERIALINPUT: Serial audio input port data format = I2S,
+            24-bit, 64*Fsi */
          CS8427_SIDEL | CS8427_SILRPOL,
-         /* CS8427_REG_SERIALOUTPUT: Serial audio output port data format = I2S, 24-bit, 64*Fsi */
+         /* CS8427_REG_SERIALOUTPUT: Serial audio output port data format
+            = I2S, 24-bit, 64*Fsi */
          CS8427_SODEL | CS8427_SOLRPOL,
        };
        static unsigned char initvals2[] = {
          CS8427_REG_RECVERRMASK | CS8427_REG_AUTOINC,
-         /* CS8427_REG_RECVERRMASK: unmask the input PLL clock, V, confidence, biphase, parity status bits */
-         /* CS8427_UNLOCK | CS8427_V | CS8427_CONF | CS8427_BIP | CS8427_PAR, */
+         /* CS8427_REG_RECVERRMASK: unmask the input PLL clock, V, confidence,
+            biphase, parity status bits */
+         /* CS8427_UNLOCK | CS8427_V | CS8427_CONF | CS8427_BIP | CS8427_PAR,*/
          0xff, /* set everything */
          /* CS8427_REG_CSDATABUF:
             Registers 32-55 window to CS buffer
@@ -201,7 +215,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
        struct snd_i2c_device *device;
        unsigned char buf[24];
 
-       if ((err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7),
+       if ((err = snd_i2c_device_create(bus, "CS8427",
+                                        CS8427_ADDR | (addr & 7),
                                         &device)) < 0)
                return err;
        chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL);
@@ -212,8 +227,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
        device->private_free = snd_cs8427_free;
        
        snd_i2c_lock(bus);
-       if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) !=
-           CS8427_VER8427A) {
+       err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER);
+       if (err != CS8427_VER8427A) {
                snd_i2c_unlock(bus);
                snd_printk(KERN_ERR "unable to find CS8427 signature "
                           "(expected 0x%x, read 0x%x),\n",
@@ -222,7 +237,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
                return -EFAULT;
        }
        /* turn off run bit while making changes to configuration */
-       if ((err = snd_cs8427_reg_write(device, CS8427_REG_CLOCKSOURCE, 0x00)) < 0)
+       err = snd_cs8427_reg_write(device, CS8427_REG_CLOCKSOURCE, 0x00);
+       if (err < 0)
                goto __fail;
        /* send initial values */
        memcpy(chip->regmap + (initvals1[0] & 0x7f), initvals1 + 1, 6);
@@ -282,6 +298,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
        return err < 0 ? err : -EIO;
 }
 
+EXPORT_SYMBOL(snd_cs8427_create);
+
 /*
  * Reset the chip using run bit, also lock PLL using ILRCK and
  * put back AES3INPUT. This workaround is described in latest
@@ -296,7 +314,8 @@ static void snd_cs8427_reset(struct snd_i2c_device *cs8427)
        snd_assert(cs8427, return);
        chip = cs8427->private_data;
        snd_i2c_lock(cs8427->bus);
-       if ((chip->regmap[CS8427_REG_CLOCKSOURCE] & CS8427_RXDAES3INPUT) == CS8427_RXDAES3INPUT)  /* AES3 bit is set */
+       if ((chip->regmap[CS8427_REG_CLOCKSOURCE] & CS8427_RXDAES3INPUT) ==
+           CS8427_RXDAES3INPUT)  /* AES3 bit is set */
                aes3input = 1;
        chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~(CS8427_RUN | CS8427_RXDMASK);
        snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE,
@@ -367,12 +386,15 @@ static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol,
 
        snd_i2c_lock(device->bus);
        if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) {
-               snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg);
+               snd_printk(KERN_ERR "unable to send register 0x%x byte "
+                          "to CS8427\n", reg);
                snd_i2c_unlock(device->bus);
                return err < 0 ? err : -EIO;
        }
-       if ((err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10)) != 10) {
-               snd_printk(KERN_ERR "unable to read Q-subcode bytes from CS8427\n");
+       err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10);
+       if (err != 10) {
+               snd_printk(KERN_ERR "unable to read Q-subcode bytes "
+                          "from CS8427\n");
                snd_i2c_unlock(device->bus);
                return err < 0 ? err : -EIO;
        }
@@ -380,7 +402,8 @@ static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol,
        return 0;
 }
 
-static int snd_cs8427_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
+static int snd_cs8427_spdif_info(struct snd_kcontrol *kcontrol,
+                                struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
        uinfo->count = 1;
@@ -413,7 +436,8 @@ static int snd_cs8427_spdif_put(struct snd_kcontrol *kcontrol,
        snd_i2c_lock(device->bus);
        change = memcmp(ucontrol->value.iec958.status, status, 24) != 0;
        memcpy(status, ucontrol->value.iec958.status, 24);
-       if (change && (kcontrol->private_value ? runtime != NULL : runtime == NULL)) {
+       if (change && (kcontrol->private_value ?
+                      runtime != NULL : runtime == NULL)) {
                err = snd_cs8427_send_corudata(device, 0, status, 24);
                if (err < 0)
                        change = err;
@@ -442,7 +466,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = {
        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .info =         snd_cs8427_in_status_info,
        .name =         "IEC958 CS8427 Input Status",
-       .access =       SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
+       .access =       (SNDRV_CTL_ELEM_ACCESS_READ |
+                        SNDRV_CTL_ELEM_ACCESS_VOLATILE),
        .get =          snd_cs8427_in_status_get,
        .private_value = 15,
 },
@@ -450,7 +475,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = {
        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .info =         snd_cs8427_in_status_info,
        .name =         "IEC958 CS8427 Error Status",
-       .access =       SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
+       .access =       (SNDRV_CTL_ELEM_ACCESS_READ |
+                        SNDRV_CTL_ELEM_ACCESS_VOLATILE),
        .get =          snd_cs8427_in_status_get,
        .private_value = 16,
 },
@@ -470,7 +496,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = {
        .private_value = 0
 },
 {
-       .access =       SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
+       .access =       (SNDRV_CTL_ELEM_ACCESS_READWRITE |
+                        SNDRV_CTL_ELEM_ACCESS_INACTIVE),
        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),
        .info =         snd_cs8427_spdif_info,
@@ -482,7 +509,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = {
        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .info =         snd_cs8427_qsubcode_info,
        .name =         "IEC958 Q-subcode Capture Default",
-       .access =       SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
+       .access =       (SNDRV_CTL_ELEM_ACCESS_READ |
+                        SNDRV_CTL_ELEM_ACCESS_VOLATILE),
        .get =          snd_cs8427_qsubcode_get
 }};
 
@@ -505,7 +533,8 @@ int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427,
                err = snd_ctl_add(cs8427->bus->card, kctl);
                if (err < 0)
                        return err;
-               if (!strcmp(kctl->id.name, SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM)))
+               if (! strcmp(kctl->id.name,
+                            SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM)))
                        chip->playback.pcm_ctl = kctl;
        }
 
@@ -515,6 +544,8 @@ int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427,
        return 0;
 }
 
+EXPORT_SYMBOL(snd_cs8427_iec958_build);
+
 int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active)
 {
        struct cs8427 *chip;
@@ -522,13 +553,17 @@ int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active)
        snd_assert(cs8427, return -ENXIO);
        chip = cs8427->private_data;
        if (active)
-               memcpy(chip->playback.pcm_status, chip->playback.def_status, 24);
+               memcpy(chip->playback.pcm_status,
+                      chip->playback.def_status, 24);
        chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
-       snd_ctl_notify(cs8427->bus->card, SNDRV_CTL_EVENT_MASK_VALUE |
-                                         SNDRV_CTL_EVENT_MASK_INFO, &chip->playback.pcm_ctl->id);
+       snd_ctl_notify(cs8427->bus->card,
+                      SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO,
+                      &chip->playback.pcm_ctl->id);
        return 0;
 }
 
+EXPORT_SYMBOL(snd_cs8427_iec958_active);
+
 int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate)
 {
        struct cs8427 *chip;
@@ -568,6 +603,8 @@ int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate)
        return err < 0 ? err : 0;
 }
 
+EXPORT_SYMBOL(snd_cs8427_iec958_pcm);
+
 static int __init alsa_cs8427_module_init(void)
 {
        return 0;
@@ -579,10 +616,3 @@ static void __exit alsa_cs8427_module_exit(void)
 
 module_init(alsa_cs8427_module_init)
 module_exit(alsa_cs8427_module_exit)
-
-EXPORT_SYMBOL(snd_cs8427_create);
-EXPORT_SYMBOL(snd_cs8427_reset);
-EXPORT_SYMBOL(snd_cs8427_reg_write);
-EXPORT_SYMBOL(snd_cs8427_iec958_build);
-EXPORT_SYMBOL(snd_cs8427_iec958_active);
-EXPORT_SYMBOL(snd_cs8427_iec958_pcm);
index d2afaea30cbcf2db9e8f25c4f5e24f20a1289460..2fb4f7409d7c132a9d131ad6018f59d7ef9b8ed0 100644 (file)
@@ -11,6 +11,7 @@ snd-cs4236-objs := cs4236.o
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_AZT2320) += snd-cs4231-lib.o
+obj-$(CONFIG_SND_MIRO) += snd-cs4231-lib.o
 obj-$(CONFIG_SND_OPL3SA2) += snd-cs4231-lib.o
 obj-$(CONFIG_SND_CS4231) += snd-cs4231.o snd-cs4231-lib.o
 obj-$(CONFIG_SND_CS4232) += snd-cs4232.o snd-cs4231-lib.o
index 22cdddbfd8247088ad8d63b4bcb5f52cb29c3404..532c56e35ca496fd7a28c3252ce2823b840452e5 100644 (file)
@@ -87,7 +87,7 @@ MODULE_PARM_DESC(channels, "GF1 channels for GUS Extreme driver.");
 module_param_array(pcm_channels, int, NULL, 0444);
 MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver.");
 
-struct platform_device *devices[SNDRV_CARDS];
+static struct platform_device *devices[SNDRV_CARDS];
 
 
 #define PFX    "gusextreme: "
index 180661c5ffdc916df766ce4320c2e86f79d0231b..4f0846feb73f1eb8218e014b399b176596ffd2da 100644 (file)
@@ -34,7 +34,7 @@
 
 /* weird stuff, derived from port I/O tracing with dosemu */
 
-static unsigned char page_zero[] __initdata = {
+static unsigned char page_zero[] __devinitdata = {
 0x01, 0x7c, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00,
 0x11, 0x00, 0x20, 0x00, 0x32, 0x00, 0x40, 0x00, 0x13, 0x00, 0x00,
 0x00, 0x14, 0x02, 0x76, 0x00, 0x60, 0x00, 0x80, 0x02, 0x00, 0x00,
@@ -61,7 +61,7 @@ static unsigned char page_zero[] __initdata = {
 0x1d, 0x02, 0xdf
 };
 
-static unsigned char page_one[] __initdata = {
+static unsigned char page_one[] __devinitdata = {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00,
 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xd8, 0x00, 0x00,
 0x02, 0x20, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01,
@@ -88,7 +88,7 @@ static unsigned char page_one[] __initdata = {
 0x60, 0x00, 0x1b
 };
 
-static unsigned char page_two[] __initdata = {
+static unsigned char page_two[] __devinitdata = {
 0xc4, 0x00, 0x44, 0x07, 0x44, 0x00, 0x40, 0x25, 0x01, 0x06, 0xc4,
 0x07, 0x40, 0x25, 0x01, 0x00, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -103,7 +103,7 @@ static unsigned char page_two[] __initdata = {
 0x46, 0x05, 0x46, 0x07, 0x46, 0x07, 0x44
 };
 
-static unsigned char page_three[] __initdata = {
+static unsigned char page_three[] __devinitdata = {
 0x07, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x40, 0x00, 0x40, 0x06,
 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -118,7 +118,7 @@ static unsigned char page_three[] __initdata = {
 0x02, 0x00, 0x42, 0x00, 0xc0, 0x00, 0x40
 };
 
-static unsigned char page_four[] __initdata = {
+static unsigned char page_four[] __devinitdata = {
 0x63, 0x03, 0x26, 0x02, 0x2c, 0x00, 0x24, 0x00, 0x2e, 0x02, 0x02,
 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -133,7 +133,7 @@ static unsigned char page_four[] __initdata = {
 0x02, 0x62, 0x02, 0x20, 0x01, 0x21, 0x01
 };
 
-static unsigned char page_six[] __initdata = {
+static unsigned char page_six[] __devinitdata = {
 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00,
 0x00, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e,
 0x00, 0x00, 0x10, 0x00, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x00,
@@ -154,7 +154,7 @@ static unsigned char page_six[] __initdata = {
 0x80, 0x00, 0x7e, 0x80, 0x80
 };
 
-static unsigned char page_seven[] __initdata = {
+static unsigned char page_seven[] __devinitdata = {
 0x0f, 0xff, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
 0x08, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0f,
@@ -181,7 +181,7 @@ static unsigned char page_seven[] __initdata = {
 0x00, 0x02, 0x00
 };
 
-static unsigned char page_zero_v2[] __initdata = {
+static unsigned char page_zero_v2[] __devinitdata = {
 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -193,7 +193,7 @@ static unsigned char page_zero_v2[] __initdata = {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-static unsigned char page_one_v2[] __initdata = {
+static unsigned char page_one_v2[] __devinitdata = {
 0x01, 0xc0, 0x01, 0xfa, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -205,21 +205,21 @@ static unsigned char page_one_v2[] __initdata = {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-static unsigned char page_two_v2[] __initdata = {
+static unsigned char page_two_v2[] __devinitdata = {
 0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00
 };
-static unsigned char page_three_v2[] __initdata = {
+static unsigned char page_three_v2[] __devinitdata = {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00
 };
-static unsigned char page_four_v2[] __initdata = {
+static unsigned char page_four_v2[] __devinitdata = {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -227,7 +227,7 @@ static unsigned char page_four_v2[] __initdata = {
 0x00, 0x00, 0x00, 0x00
 };
 
-static unsigned char page_seven_v2[] __initdata = {
+static unsigned char page_seven_v2[] __devinitdata = {
 0x0f, 0xff, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -239,7 +239,7 @@ static unsigned char page_seven_v2[] __initdata = {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-static unsigned char mod_v2[] __initdata = {
+static unsigned char mod_v2[] __devinitdata = {
 0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02,
 0x00, 0x01, 0x03, 0x02, 0x00, 0x01, 0x04, 0x02, 0x00, 0x01, 0x05,
 0x02, 0x00, 0x01, 0x06, 0x02, 0x00, 0x01, 0x07, 0x02, 0x00, 0xb0,
@@ -269,7 +269,7 @@ static unsigned char mod_v2[] __initdata = {
 0x02, 0x01, 0x01, 0x04, 0x02, 0x01, 0x01, 0x05, 0x02, 0x01, 0x01,
 0x06, 0x02, 0x01, 0x01, 0x07, 0x02, 0x01
 };
-static unsigned char coefficients[] __initdata = {
+static unsigned char coefficients[] __devinitdata = {
 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x00, 0x4b, 0x03,
 0x11, 0x00, 0x4d, 0x01, 0x32, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49,
 0x00, 0x00, 0x07, 0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x01,
@@ -305,14 +305,14 @@ static unsigned char coefficients[] __initdata = {
 0x06, 0x6c, 0x4c, 0x6c, 0x06, 0x50, 0x52, 0xe2, 0x06, 0x42, 0x02,
 0xba
 };
-static unsigned char coefficients2[] __initdata = {
+static unsigned char coefficients2[] __devinitdata = {
 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x45, 0x0f,
 0xff, 0x07, 0x48, 0x0f, 0xff, 0x07, 0x7b, 0x04, 0xcc, 0x07, 0x7d,
 0x04, 0xcc, 0x07, 0x7c, 0x00, 0x00, 0x07, 0x7e, 0x00, 0x00, 0x07,
 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x47, 0x00, 0x00,
 0x07, 0x4a, 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x07, 0x4e, 0x00, 0x00
 };
-static unsigned char coefficients3[] __initdata = {
+static unsigned char coefficients3[] __devinitdata = {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x00, 0x51, 0x00,
 0x51, 0x00, 0x7a, 0x00, 0x7a, 0x00, 0xa3, 0x00, 0xa3, 0x00, 0xcc,
 0x00, 0xcc, 0x00, 0xf5, 0x00, 0xf5, 0x01, 0x1e, 0x01, 0x1e, 0x01,
@@ -563,7 +563,7 @@ snd_wavefront_fx_ioctl (struct snd_hwdep *sdev, struct file *file,
 */
 
 
-int __init
+int __devinit
 snd_wavefront_fx_start (snd_wavefront_t *dev)
 
 {
index 15888ba2169bcb0fcce7c5b593cfa0a0e60970a8..cb3460094324db8f34069fc18485148a54232b39 100644 (file)
@@ -474,7 +474,7 @@ snd_wavefront_midi_disable_virtual (snd_wavefront_card_t *card)
        spin_unlock_irqrestore (&card->wavefront.midi.virtual, flags);
 }
 
-int __init
+int __devinit
 snd_wavefront_midi_start (snd_wavefront_card_t *card)
 
 {
index 68aa091e89617b9d6bb8915d96fda8810138c669..bed329edbdd7a357f2a9bd4a65aa91ab327d2261 100644 (file)
@@ -1738,7 +1738,7 @@ snd_wavefront_internal_interrupt (snd_wavefront_card_t *card)
 7 Unused
 */
 
-static int __init
+static int __devinit
 snd_wavefront_interrupt_bits (int irq)
 
 {
@@ -1766,7 +1766,7 @@ snd_wavefront_interrupt_bits (int irq)
        return bits;
 }
 
-static void __init
+static void __devinit
 wavefront_should_cause_interrupt (snd_wavefront_t *dev, 
                                  int val, int port, int timeout)
 
@@ -1787,7 +1787,7 @@ wavefront_should_cause_interrupt (snd_wavefront_t *dev,
        }
 }
 
-static int __init
+static int __devinit
 wavefront_reset_to_cleanliness (snd_wavefront_t *dev)
 
 {
@@ -1946,7 +1946,7 @@ wavefront_reset_to_cleanliness (snd_wavefront_t *dev)
 #include <asm/uaccess.h>
 
 
-static int __init
+static int __devinit
 wavefront_download_firmware (snd_wavefront_t *dev, char *path)
 
 {
@@ -2047,7 +2047,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path)
 }
 
 
-static int __init
+static int __devinit
 wavefront_do_reset (snd_wavefront_t *dev)
 
 {
@@ -2136,7 +2136,7 @@ wavefront_do_reset (snd_wavefront_t *dev)
        return 1;
 }
 
-int __init
+int __devinit
 snd_wavefront_start (snd_wavefront_t *dev)
 
 {
@@ -2178,7 +2178,7 @@ snd_wavefront_start (snd_wavefront_t *dev)
        return (0);
 }
 
-int __init
+int __devinit
 snd_wavefront_detect (snd_wavefront_card_t *card)
 
 {
index 23e54cedfd4a19c8c49915aa24f41e531535a68a..d7ad32f514da5f20f38f159fd96d40cc47d1c86a 100644 (file)
@@ -460,17 +460,19 @@ config SND_FM801
          To compile this driver as a module, choose M here: the module
          will be called snd-fm801.
 
-config SND_FM801_TEA575X
-       tristate "ForteMedia FM801 + TEA5757 tuner"
+config SND_FM801_TEA575X_BOOL
+       bool "ForteMedia FM801 + TEA5757 tuner"
        depends on SND_FM801
-        select VIDEO_DEV
        help
          Say Y here to include support for soundcards based on the ForteMedia
          FM801 chip with a TEA5757 tuner connected to GPIO1-3 pins (Media
-         Forte SF256-PCS-02).
+         Forte SF256-PCS-02) into the snd-fm801 driver.
 
-         To compile this driver as a module, choose M here: the module
-         will be called snd-fm801-tea575x.
+config SND_FM801_TEA575X
+       tristate
+       depends on SND_FM801_TEA575X_BOOL
+       default SND_FM801
+       select VIDEO_DEV
 
 config SND_HDA_INTEL
        tristate "Intel HD Audio"
index f7aef8c9cf439d1c6678461132476b1330eff782..0786d0edaca5aef42a26c28c11915200f1a3bc98 100644 (file)
@@ -241,14 +241,14 @@ ad1889_channel_reset(struct snd_ad1889 *chip, unsigned int channel)
        }
 }
 
-static inline u16
+static u16
 snd_ad1889_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
 {
        struct snd_ad1889 *chip = ac97->private_data;
        return ad1889_readw(chip, AD_AC97_BASE + reg);
 }
 
-static inline void
+static void
 snd_ad1889_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
 {
        struct snd_ad1889 *chip = ac97->private_data;
@@ -873,7 +873,7 @@ skip_hw:
        return 0;
 }
 
-static inline int
+static int
 snd_ad1889_dev_free(struct snd_device *device) 
 {
        struct snd_ad1889 *chip = device->device_data;
@@ -1051,7 +1051,7 @@ snd_ad1889_remove(struct pci_dev *pci)
        pci_set_drvdata(pci, NULL);
 }
 
-static struct pci_device_id snd_ad1889_ids[] __devinitdata = {
+static struct pci_device_id snd_ad1889_ids[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS) },
        { 0, },
 };
index e0a815e53d1ce940eb3c5c989c93e86a433ea62d..74668398eac5da125b790cf5fe3cf5d7325f9ab0 100644 (file)
@@ -279,7 +279,7 @@ struct snd_ali {
 #endif
 };
 
-static struct pci_device_id snd_ali_ids[] __devinitdata = {
+static struct pci_device_id snd_ali_ids[] = {
        {PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0},
        {0, }
 };
index a9c38963188a2551f5bdd596e4c093469537de47..96cfb8ae5055441020e6a81cf4ce5336d4131e1b 100644 (file)
@@ -146,7 +146,7 @@ struct snd_als300_substream_data {
        int block_counter_register;
 };
 
-static struct pci_device_id snd_als300_ids[] __devinitdata = {
+static struct pci_device_id snd_als300_ids[] = {
        { 0x4005, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300 },
        { 0x4005, 0x0308, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300_PLUS },
        { 0, }
index a9f08066459a9122cb8170e04efa026ac49e0f22..9e596f750cbd1825c8ebd47ed94aff597daf9604 100644 (file)
@@ -116,7 +116,7 @@ struct snd_card_als4000 {
 #endif
 };
 
-static struct pci_device_id snd_als4000_ids[] __devinitdata = {
+static struct pci_device_id snd_als4000_ids[] = {
        { 0x4005, 0x4000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* ALS4000 */
        { 0, }
 };
index 9fbb065a810b2c8cea503c68d9122f358f9eb719..347e25ff073dba9e5af492908f2a9190f1473413 100644 (file)
@@ -284,7 +284,7 @@ struct atiixp {
 
 /*
  */
-static struct pci_device_id snd_atiixp_ids[] __devinitdata = {
+static struct pci_device_id snd_atiixp_ids[] = {
        { 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */
        { 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */
        { 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */
index 7dcf4941dce24fcc0669dee7982b763c344a791e..a89d67c4598ba410d6bcf3a0ef94dbf76624e332 100644 (file)
@@ -262,7 +262,7 @@ struct atiixp_modem {
 
 /*
  */
-static struct pci_device_id snd_atiixp_ids[] __devinitdata = {
+static struct pci_device_id snd_atiixp_ids[] = {
        { 0x1002, 0x434d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */
        { 0x1002, 0x4378, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */
        { 0, }
index bd3352998ad0be5bf58c13eaf68eb2ce6c2b5d89..fce22c7af0ea2a7d8c57af9910ae000d8f41db11 100644 (file)
@@ -1,6 +1,6 @@
 #include "au8810.h"
 #include "au88x0.h"
-static struct pci_device_id snd_vortex_ids[] __devinitdata = {
+static struct pci_device_id snd_vortex_ids[] = {
        {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE,
         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,},
        {0,}
index 7e3fd8372d8d5217e034bf1e64d29320d654ce81..d1fbcce0725731cc46d35b3946a17299acbf68ce 100644 (file)
@@ -1,6 +1,6 @@
 #include "au8820.h"
 #include "au88x0.h"
-static struct pci_device_id snd_vortex_ids[] __devinitdata = {
+static struct pci_device_id snd_vortex_ids[] = {
        {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_1,
         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
        {0,}
index b840f6608a61bae4e2408509c6b938bbe9f3b94c..d4f2717c14fb07a896c13cfd943c78b5a107bb32 100644 (file)
@@ -1,6 +1,6 @@
 #include "au8830.h"
 #include "au88x0.h"
-static struct pci_device_id snd_vortex_ids[] __devinitdata = {
+static struct pci_device_id snd_vortex_ids[] = {
        {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_2,
         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
        {0,}
index f078b716d2b05e2b06f7180437cf465ac7b2e80b..b1cfc3c79d07e6ad4bc8a2cf12dcc3136afeb3ce 100644 (file)
@@ -270,7 +270,8 @@ static void vortex_mix_setvolumebyte(vortex_t * vortex, unsigned char mix,
 
 /* A3D functions. */
 #ifndef CHIP_AU8820
-static void vortex_Vort3D(vortex_t * v, int en);
+static void vortex_Vort3D_enable(vortex_t * v);
+static void vortex_Vort3D_disable(vortex_t * v);
 static void vortex_Vort3D_connect(vortex_t * vortex, int en);
 static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en);
 #endif
index d215f393ea6460deaf620f9521cff016b21bb766..649849e540d3893484e61b3c6aa6c6dcb50a22e9 100644 (file)
@@ -593,24 +593,23 @@ static int Vort3DRend_Initialize(vortex_t * v, unsigned short mode)
 static int vortex_a3d_register_controls(vortex_t * vortex);
 static void vortex_a3d_unregister_controls(vortex_t * vortex);
 /* A3D base support init/shudown */
-static void vortex_Vort3D(vortex_t * v, int en)
+static void __devinit vortex_Vort3D_enable(vortex_t * v)
 {
        int i;
-       if (en) {
-               Vort3DRend_Initialize(v, XT_HEADPHONE);
-               for (i = 0; i < NR_A3D; i++) {
-                       vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2);
-                       a3dsrc_ZeroStateA3D(&(v->a3d[0]));
-               }
-       } else {
-               vortex_XtalkHw_Disable(v);
+
+       Vort3DRend_Initialize(v, XT_HEADPHONE);
+       for (i = 0; i < NR_A3D; i++) {
+               vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2);
+               a3dsrc_ZeroStateA3D(&(v->a3d[0]));
        }
        /* Register ALSA controls */
-       if (en) {
-               vortex_a3d_register_controls(v);
-       } else {
-               vortex_a3d_unregister_controls(v);
-       }
+       vortex_a3d_register_controls(v);
+}
+
+static void vortex_Vort3D_disable(vortex_t * v)
+{
+       vortex_XtalkHw_Disable(v);
+       vortex_a3d_unregister_controls(v);
 }
 
 /* Make A3D subsystem connections. */
@@ -855,7 +854,7 @@ static struct snd_kcontrol_new vortex_a3d_kcontrol __devinitdata = {
 };
 
 /* Control (un)registration. */
-static int vortex_a3d_register_controls(vortex_t * vortex)
+static int __devinit vortex_a3d_register_controls(vortex_t * vortex)
 {
        struct snd_kcontrol *kcontrol;
        int err, i;
index 4347e6abc1d5402765ebb6bf93b8243801efbfe0..5299cce583d357a18aca34f832cfa56011bf46ce 100644 (file)
@@ -2690,7 +2690,7 @@ static int __devinit vortex_core_init(vortex_t * vortex)
 #ifndef CHIP_AU8820
        vortex_eq_init(vortex);
        vortex_spdif_init(vortex, 48000, 1);
-       vortex_Vort3D(vortex, 1);
+       vortex_Vort3D_enable(vortex);
 #endif
 #ifndef CHIP_AU8810
        vortex_wt_init(vortex);
@@ -2718,7 +2718,7 @@ static int vortex_core_shutdown(vortex_t * vortex)
        printk(KERN_INFO "Vortex: shutdown...");
 #ifndef CHIP_AU8820
        vortex_eq_free(vortex);
-       vortex_Vort3D(vortex, 0);
+       vortex_Vort3D_disable(vortex);
 #endif
        //vortex_disable_timer_int(vortex);
        vortex_disable_int(vortex);
index 15447a3216dd70bea11ed95b3e92e3d168e59337..bac8e9cfd9218c3856f22021726eae1833959d22 100644 (file)
@@ -238,7 +238,7 @@ struct snd_azf3328 {
 #endif
 };
 
-static const struct pci_device_id snd_azf3328_ids[] __devinitdata = {
+static const struct pci_device_id snd_azf3328_ids[] = {
        { 0x122D, 0x50DC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },   /* PCI168/3328 */
        { 0x122D, 0x80DA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },   /* 3328 */
        { 0, }
index 4d4277d045aac5e5d5a646a94d386dd2a6530c79..97a280a246cb57002fa9028317c0660add7d7ac8 100644 (file)
@@ -774,7 +774,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card,
          .driver_data = rate }
 
 /* driver_data is the default digital_rate value for that device */
-static struct pci_device_id snd_bt87x_ids[] __devinitdata = {
+static struct pci_device_id snd_bt87x_ids[] = {
        /* Hauppauge WinTV series */
        BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0x13eb, 32000),
        /* Hauppauge WinTV series */
index a30c019bab64d353c86a1595611e3b2f618c3bb4..12bbbb6afd2df348df3526cf88a3da8a0a6bd7c0 100644 (file)
@@ -1602,7 +1602,7 @@ static void __devexit snd_ca0106_remove(struct pci_dev *pci)
 }
 
 // PCI IDs
-static struct pci_device_id snd_ca0106_ids[] __devinitdata = {
+static struct pci_device_id snd_ca0106_ids[] = {
        { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },    /* Audigy LS or Live 24bit */
        { 0, }
 };
index 03766ad74998e1e731ce6fd922f2ba4dc18ab3e0..876b64464b6f2a6562aa5daecfedb355f0f96938 100644 (file)
@@ -2609,7 +2609,7 @@ static inline void snd_cmipci_proc_init(struct cmipci *cm) {}
 #endif
 
 
-static struct pci_device_id snd_cmipci_ids[] __devinitdata = {
+static struct pci_device_id snd_cmipci_ids[] = {
        {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
index d1802487f5beecea8a53655e3f2d3c9002f6d447..9631456ec3de84d5e278bc38daf17d99825abaf6 100644 (file)
@@ -494,7 +494,7 @@ struct cs4281 {
 
 static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
-static struct pci_device_id snd_cs4281_ids[] __devinitdata = {
+static struct pci_device_id snd_cs4281_ids[] = {
        { 0x1013, 0x6005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* CS4281 */
        { 0, }
 };
index 772dc52bfeb270a858c256ac8b013d4632e4d6a1..8b6cd144d101c6cdc200e0d308f0540907b154a6 100644 (file)
@@ -65,7 +65,7 @@ MODULE_PARM_DESC(thinkpad, "Force to enable Thinkpad's CLKRUN control.");
 module_param_array(mmap_valid, bool, NULL, 0444);
 MODULE_PARM_DESC(mmap_valid, "Support OSS mmap.");
 
-static struct pci_device_id snd_cs46xx_ids[] __devinitdata = {
+static struct pci_device_id snd_cs46xx_ids[] = {
         { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* CS4280 */
         { 0x1013, 0x6003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* CS4612 */
         { 0x1013, 0x6004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* CS4615 */
index 894545ea41fd2b6f534a833a313302e348d4f5aa..4851847180d24c3bb33041b7d3df2b1d34b9dd9c 100644 (file)
@@ -2317,7 +2317,7 @@ static struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = {
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
 /* Only available on the Hercules Game Theater XP soundcard */
-static struct snd_kcontrol_new snd_hercules_controls[] __devinitdata = {
+static struct snd_kcontrol_new snd_hercules_controls[] = {
 {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Optical/Coaxial SPDIF Input Switch",
@@ -3458,6 +3458,9 @@ static void hercules_mixer_init (struct snd_cs46xx *chip)
        snd_printdd ("initializing Hercules mixer\n");
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
+       if (chip->in_suspend)
+               return;
+
        for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) {
                struct snd_kcontrol *kctl;
 
@@ -3669,6 +3672,7 @@ int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state)
        int amp_saved;
 
        snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
+       chip->in_suspend = 1;
        snd_pcm_suspend_all(chip->pcm);
        // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL);
        // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE);
@@ -3722,6 +3726,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
        else
                chip->active_ctrl(chip, -1); /* disable CLKRUN */
        chip->amplifier = amp_saved;
+       chip->in_suspend = 0;
        snd_power_change_state(card, SNDRV_CTL_POWER_D0);
        return 0;
 }
index c12b24c679f2e1402150449d597c75c47a30b6de..64c7826e8b8c694899f9fbfeb474a4da383b8d17 100644 (file)
@@ -67,7 +67,7 @@ MODULE_PARM_DESC(id, "ID string for " DRIVER_NAME);
 module_param_array(enable, bool, NULL, 0444);
 MODULE_PARM_DESC(enable, "Enable " DRIVER_NAME);
 
-static struct pci_device_id snd_cs5535audio_ids[] __devinitdata = {
+static struct pci_device_id snd_cs5535audio_ids[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO) },
        {}
index 549673ea14a9ae48cd2eda5b4eebc9c99041223f..289bcd99c19c8e14cae065cff776768dc6f4296c 100644 (file)
@@ -77,7 +77,7 @@ MODULE_PARM_DESC(subsystem, "Force card subsystem model.");
 /*
  * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value  Model:SB0400
  */
-static struct pci_device_id snd_emu10k1_ids[] __devinitdata = {
+static struct pci_device_id snd_emu10k1_ids[] = {
        { 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },    /* EMU10K1 */
        { 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },    /* Audigy */
        { 0x1102, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },    /* Audigy 2 Value SB0400 */
index d6f135fe29584b099bb172e69ca3a3807d402735..f9b5c3dc3b346ac51bb5f9e0543d85268475fd50 100644 (file)
@@ -531,7 +531,7 @@ static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 * emu,
        snd_emu10k1_ecard_write(emu, emu->ecard_ctrl);
 }
 
-static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu)
+static int snd_emu10k1_ecard_init(struct snd_emu10k1 * emu)
 {
        unsigned int hc_value;
 
@@ -571,7 +571,7 @@ static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu)
        return 0;
 }
 
-static int __devinit snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu)
+static int snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu)
 {
        unsigned long special_port;
        unsigned int value;
@@ -633,7 +633,7 @@ static int snd_emu1212m_fpga_netlist_write(struct snd_emu10k1 * emu, int reg, in
        return 0;
 }
 
-static int __devinit snd_emu10k1_emu1212m_init(struct snd_emu10k1 * emu)
+static int snd_emu10k1_emu1212m_init(struct snd_emu10k1 * emu)
 {
        unsigned int i;
        int tmp;
@@ -1430,6 +1430,10 @@ void snd_emu10k1_resume_init(struct snd_emu10k1 *emu)
 {
        if (emu->card_capabilities->ecard)
                snd_emu10k1_ecard_init(emu);
+       else if (emu->card_capabilities->ca_cardbus_chip)
+               snd_emu10k1_cardbus_init(emu);
+       else if (emu->card_capabilities->emu1212m)
+               snd_emu10k1_emu1212m_init(emu);
        else
                snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE);
        snd_emu10k1_init(emu, emu->enable_ir, 1);
index 2167279429b8382da8e8373573283787ff6553f4..bda8bdf59935b367988aa692c14c69951fbe7916 100644 (file)
@@ -1286,7 +1286,7 @@ static void snd_emu10k1x_midi_interrupt(struct emu10k1x *emu, unsigned int statu
        do_emu10k1x_midi_interrupt(emu, &emu->midi, status);
 }
 
-static void snd_emu10k1x_midi_cmd(struct emu10k1x * emu,
+static int snd_emu10k1x_midi_cmd(struct emu10k1x * emu,
                                  struct emu10k1x_midi *midi, unsigned char cmd, int ack)
 {
        unsigned long flags;
@@ -1312,11 +1312,14 @@ static void snd_emu10k1x_midi_cmd(struct emu10k1x * emu,
                ok = 1;
        }
        spin_unlock_irqrestore(&midi->input_lock, flags);
-       if (!ok)
+       if (!ok) {
                snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n",
                           cmd, emu->port,
                           mpu401_read_stat(emu, midi),
                           mpu401_read_data(emu, midi));
+               return 1;
+       }
+       return 0;
 }
 
 static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream)
@@ -1332,12 +1335,17 @@ static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream)
        midi->substream_input = substream;
        if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) {
                spin_unlock_irqrestore(&midi->open_lock, flags);
-               snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1);
-               snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1);
+               if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1))
+                       goto error_out;
+               if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
+                       goto error_out;
        } else {
                spin_unlock_irqrestore(&midi->open_lock, flags);
        }
        return 0;
+
+error_out:
+       return -EIO;
 }
 
 static int snd_emu10k1x_midi_output_open(struct snd_rawmidi_substream *substream)
@@ -1353,12 +1361,17 @@ static int snd_emu10k1x_midi_output_open(struct snd_rawmidi_substream *substream
        midi->substream_output = substream;
        if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) {
                spin_unlock_irqrestore(&midi->open_lock, flags);
-               snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1);
-               snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1);
+               if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1))
+                       goto error_out;
+               if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
+                       goto error_out;
        } else {
                spin_unlock_irqrestore(&midi->open_lock, flags);
        }
        return 0;
+
+error_out:
+       return -EIO;
 }
 
 static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream)
@@ -1366,6 +1379,7 @@ static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream
        struct emu10k1x *emu;
        struct emu10k1x_midi *midi = substream->rmidi->private_data;
        unsigned long flags;
+       int err = 0;
 
        emu = midi->emu;
        snd_assert(emu, return -ENXIO);
@@ -1375,11 +1389,11 @@ static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream
        midi->substream_input = NULL;
        if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) {
                spin_unlock_irqrestore(&midi->open_lock, flags);
-               snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0);
+               err = snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0);
        } else {
                spin_unlock_irqrestore(&midi->open_lock, flags);
        }
-       return 0;
+       return err;
 }
 
 static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substream)
@@ -1387,6 +1401,7 @@ static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substrea
        struct emu10k1x *emu;
        struct emu10k1x_midi *midi = substream->rmidi->private_data;
        unsigned long flags;
+       int err = 0;
 
        emu = midi->emu;
        snd_assert(emu, return -ENXIO);
@@ -1396,11 +1411,11 @@ static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substrea
        midi->substream_output = NULL;
        if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) {
                spin_unlock_irqrestore(&midi->open_lock, flags);
-               snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0);
+               err = snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0);
        } else {
                spin_unlock_irqrestore(&midi->open_lock, flags);
        }
-       return 0;
+       return err;
 }
 
 static void snd_emu10k1x_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
@@ -1594,7 +1609,7 @@ static void __devexit snd_emu10k1x_remove(struct pci_dev *pci)
 }
 
 // PCI IDs
-static struct pci_device_id snd_emu10k1x_ids[] __devinitdata = {
+static struct pci_device_id snd_emu10k1x_ids[] = {
        { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },    /* Dell OEM version (EMU10K1) */
        { 0, }
 };
index d96eb455103f9c599d1432cd0689a66b00c8e63c..950c6bcd6b7d9945775cfdefb9bfb9958ca56d5c 100644 (file)
@@ -116,7 +116,7 @@ static void snd_emu10k1_midi_interrupt2(struct snd_emu10k1 *emu, unsigned int st
        do_emu10k1_midi_interrupt(emu, &emu->midi2, status);
 }
 
-static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack)
+static int snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack)
 {
        unsigned long flags;
        int timeout, ok;
@@ -141,11 +141,14 @@ static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_mi
                ok = 1;
        }
        spin_unlock_irqrestore(&midi->input_lock, flags);
-       if (!ok)
+       if (!ok) {
                snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n",
                           cmd, emu->port,
                           mpu401_read_stat(emu, midi),
                           mpu401_read_data(emu, midi));
+               return 1;
+       }
+       return 0;
 }
 
 static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream)
@@ -161,12 +164,17 @@ static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream)
        midi->substream_input = substream;
        if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) {
                spin_unlock_irqrestore(&midi->open_lock, flags);
-               snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1);
-               snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1);
+               if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1))
+                       goto error_out;
+               if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
+                       goto error_out;
        } else {
                spin_unlock_irqrestore(&midi->open_lock, flags);
        }
        return 0;
+
+error_out:
+       return -EIO;
 }
 
 static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream)
@@ -182,12 +190,17 @@ static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream)
        midi->substream_output = substream;
        if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) {
                spin_unlock_irqrestore(&midi->open_lock, flags);
-               snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1);
-               snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1);
+               if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1))
+                       goto error_out;
+               if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1))
+                       goto error_out;
        } else {
                spin_unlock_irqrestore(&midi->open_lock, flags);
        }
        return 0;
+
+error_out:
+       return -EIO;
 }
 
 static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream)
@@ -195,6 +208,7 @@ static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream)
        struct snd_emu10k1 *emu;
        struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
        unsigned long flags;
+       int err = 0;
 
        emu = midi->emu;
        snd_assert(emu, return -ENXIO);
@@ -204,11 +218,11 @@ static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream)
        midi->substream_input = NULL;
        if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) {
                spin_unlock_irqrestore(&midi->open_lock, flags);
-               snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0);
+               err = snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0);
        } else {
                spin_unlock_irqrestore(&midi->open_lock, flags);
        }
-       return 0;
+       return err;
 }
 
 static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream)
@@ -216,6 +230,7 @@ static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream
        struct snd_emu10k1 *emu;
        struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
        unsigned long flags;
+       int err = 0;
 
        emu = midi->emu;
        snd_assert(emu, return -ENXIO);
@@ -225,11 +240,11 @@ static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream
        midi->substream_output = NULL;
        if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) {
                spin_unlock_irqrestore(&midi->open_lock, flags);
-               snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0);
+               err = snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0);
        } else {
                spin_unlock_irqrestore(&midi->open_lock, flags);
        }
-       return 0;
+       return err;
 }
 
 static void snd_emu10k1_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
index 7a985c868007ade18693cfaee3a8eaaae266b752..a8a601fc781f9ca44b10a036ae9a3d48bb550487 100644 (file)
@@ -446,7 +446,7 @@ struct ensoniq {
 
 static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
-static struct pci_device_id snd_audiopci_ids[] __devinitdata = {
+static struct pci_device_id snd_audiopci_ids[] = {
 #ifdef CHIP1370
        { 0x1274, 0x5000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* ES1370 */
 #endif
index 1113b10259cf196e7a8341b3f14dec0fc1b9a714..cc0f34f68185d16f568caf4e3a24c69f08e5d5dd 100644 (file)
@@ -242,7 +242,7 @@ struct es1938 {
 
 static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
-static struct pci_device_id snd_es1938_ids[] __devinitdata = {
+static struct pci_device_id snd_es1938_ids[] = {
         { 0x125d, 0x1969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* Solo-1 */
        { 0, }
 };
index a491c8f8a6a880346fd0bf1011a54b2ba64bb249..3c5ab7c2e72df73deb2ad544958e4e06acbe5711 100644 (file)
@@ -592,7 +592,7 @@ struct es1968 {
 
 static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
-static struct pci_device_id snd_es1968_ids[] __devinitdata = {
+static struct pci_device_id snd_es1968_ids[] = {
        /* Maestro 1 */
         { 0x1285, 0x0100, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, TYPE_MAESTRO },
        /* Maestro 2 */
index 3aed27eace2c74e2e90fd1edeb4ec30327bacce2..13868c9851268cd5c983754b6d40cc64d5ef4554 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <asm/io.h>
 
-#if (defined(CONFIG_SND_FM801_TEA575X) || defined(CONFIG_SND_FM801_TEA575X_MODULE)) && (defined(CONFIG_VIDEO_DEV) || defined(CONFIG_VIDEO_DEV_MODULE))
+#ifdef CONFIG_SND_FM801_TEA575X_BOOL
 #include <sound/tea575x-tuner.h>
 #define TEA575X_RADIO 1
 #endif
@@ -199,7 +199,7 @@ struct fm801 {
 #endif
 };
 
-static struct pci_device_id snd_fm801_ids[] __devinitdata = {
+static struct pci_device_id snd_fm801_ids[] = {
        { 0x1319, 0x0801, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, },   /* FM801 */
        { 0x5213, 0x0510, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, },   /* Gallant Odyssey Sound 4 */
        { 0, }
index 025af7c0c6e1439e9fa9125e92e316bd6caa5cf5..79d63c99f09245d58a5f339d262cb24d68718e73 100644 (file)
@@ -1629,7 +1629,7 @@ static void __devexit azx_remove(struct pci_dev *pci)
 }
 
 /* PCI IDs */
-static struct pci_device_id azx_ids[] __devinitdata = {
+static struct pci_device_id azx_ids[] = {
        { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */
        { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */
        { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */
index 33b7d580646923f91a3892b8803cfa585ff2846e..6823f2bc10b3b6a49fa443a7fdaeb4bd25f4dd2b 100644 (file)
@@ -1545,6 +1545,9 @@ enum {
 /* reivision id to check workarounds */
 #define AD1988A_REV2           0x100200
 
+#define is_rev2(codec) \
+       ((codec)->vendor_id == 0x11d41988 && \
+        (codec)->revision_id == AD1988A_REV2)
 
 /*
  * mixers
@@ -1636,6 +1639,7 @@ static struct snd_kcontrol_new ad1988_6stack_mixers1[] = {
        HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME("Side Playback Volume", 0x0a, 0x0, HDA_OUTPUT),
+       { } /* end */
 };
 
 static struct snd_kcontrol_new ad1988_6stack_mixers1_rev2[] = {
@@ -1644,6 +1648,7 @@ static struct snd_kcontrol_new ad1988_6stack_mixers1_rev2[] = {
        HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0a, 2, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME("Side Playback Volume", 0x06, 0x0, HDA_OUTPUT),
+       { } /* end */
 };
 
 static struct snd_kcontrol_new ad1988_6stack_mixers2[] = {
@@ -1682,6 +1687,7 @@ static struct snd_kcontrol_new ad1988_3stack_mixers1[] = {
        HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT),
+       { } /* end */
 };
 
 static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = {
@@ -1689,6 +1695,7 @@ static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = {
        HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x06, 1, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x06, 2, 0x0, HDA_OUTPUT),
+       { } /* end */
 };
 
 static struct snd_kcontrol_new ad1988_3stack_mixers2[] = {
@@ -2195,7 +2202,7 @@ static inline hda_nid_t ad1988_idx_to_dac(struct hda_codec *codec, int idx)
                /* A     B     C     D     E     F     G     H */
                0x04, 0x05, 0x0a, 0x04, 0x06, 0x05, 0x0a, 0x06
        };
-       if (codec->revision_id == AD1988A_REV2)
+       if (is_rev2(codec))
                return idx_to_dac_rev2[idx];
        else
                return idx_to_dac[idx];
@@ -2564,7 +2571,7 @@ static int patch_ad1988(struct hda_codec *codec)
        mutex_init(&spec->amp_mutex);
        codec->spec = spec;
 
-       if (codec->revision_id == AD1988A_REV2)
+       if (is_rev2(codec))
                snd_printk(KERN_INFO "patch_analog: AD1988A rev.2 is detected, enable workarounds\n");
 
        board_config = snd_hda_check_board_config(codec, ad1988_cfg_tbl);
@@ -2590,13 +2597,13 @@ static int patch_ad1988(struct hda_codec *codec)
        case AD1988_6STACK_DIG:
                spec->multiout.max_channels = 8;
                spec->multiout.num_dacs = 4;
-               if (codec->revision_id == AD1988A_REV2)
+               if (is_rev2(codec))
                        spec->multiout.dac_nids = ad1988_6stack_dac_nids_rev2;
                else
                        spec->multiout.dac_nids = ad1988_6stack_dac_nids;
                spec->input_mux = &ad1988_6stack_capture_source;
                spec->num_mixers = 2;
-               if (codec->revision_id == AD1988A_REV2)
+               if (is_rev2(codec))
                        spec->mixers[0] = ad1988_6stack_mixers1_rev2;
                else
                        spec->mixers[0] = ad1988_6stack_mixers1;
@@ -2612,7 +2619,7 @@ static int patch_ad1988(struct hda_codec *codec)
        case AD1988_3STACK_DIG:
                spec->multiout.max_channels = 6;
                spec->multiout.num_dacs = 3;
-               if (codec->revision_id == AD1988A_REV2)
+               if (is_rev2(codec))
                        spec->multiout.dac_nids = ad1988_3stack_dac_nids_rev2;
                else
                        spec->multiout.dac_nids = ad1988_3stack_dac_nids;
@@ -2620,7 +2627,7 @@ static int patch_ad1988(struct hda_codec *codec)
                spec->channel_mode = ad1988_3stack_modes;
                spec->num_channel_mode = ARRAY_SIZE(ad1988_3stack_modes);
                spec->num_mixers = 2;
-               if (codec->revision_id == AD1988A_REV2)
+               if (is_rev2(codec))
                        spec->mixers[0] = ad1988_3stack_mixers1_rev2;
                else
                        spec->mixers[0] = ad1988_3stack_mixers1;
index fb4bed0759d182bc78277fb63de4f60b5ee38a18..ea99083a1024a36941e54165f4b4e6e5f1472384 100644 (file)
@@ -351,6 +351,7 @@ static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
        [STAC_REF] =    ref922x_pin_configs,
        [STAC_D945GTP3] = d945gtp3_pin_configs,
        [STAC_D945GTP5] = d945gtp5_pin_configs,
+       [STAC_MACMINI] = d945gtp5_pin_configs,
        [STAC_D965_2112] = d965_2112_pin_configs,
 };
 
index ca74f5b85f42070dd611967e5ae3b01034058a7f..9492f3d2455b4aee6d6d6f8b84c02ec239e95582 100644 (file)
@@ -2131,7 +2131,7 @@ struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = {
                .build_controls = aureon_add_controls,
                .eeprom_size = sizeof(aureon71_eeprom),
                .eeprom_data = aureon71_eeprom,
-               .driver = "Aureon71Universe",
+               .driver = "Aureon71Univ", /* keep in 15 letters */
        },
        {
                .subvendor = VT1724_SUBDEVICE_PRODIGY71,
index 89a06dec436529cb2a6bfd7ab25aa2aa8050bcf1..bf20858d9f193b92db0c84b91c2d3abf1c15e9b8 100644 (file)
@@ -106,7 +106,7 @@ module_param_array(dxr_enable, int, NULL, 0444);
 MODULE_PARM_DESC(dxr_enable, "Enable DXR support for Terratec DMX6FIRE.");
 
 
-static struct pci_device_id snd_ice1712_ids[] __devinitdata = {
+static struct pci_device_id snd_ice1712_ids[] = {
        { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },   /* ICE1712 */
        { 0, }
 };
index ad69ed7c1b814230c6e019368b657a537c173763..71d6aedc07496c4de7ddd68907b804036f37e440 100644 (file)
@@ -86,7 +86,7 @@ MODULE_PARM_DESC(model, "Use the given board model.");
 
 
 /* Both VT1720 and VT1724 have the same PCI IDs */
-static struct pci_device_id snd_vt1724_ids[] __devinitdata = {
+static struct pci_device_id snd_vt1724_ids[] = {
        { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_VT1724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { 0, }
 };
index 5634bc349257021d83cc2aefed9ccb740256e55a..6874263f1681f0dd01475ee8871b363e9a0713e4 100644 (file)
@@ -413,7 +413,7 @@ struct intel8x0 {
        u32 int_sta_mask;               /* interrupt status mask */
 };
 
-static struct pci_device_id snd_intel8x0_ids[] __devinitdata = {
+static struct pci_device_id snd_intel8x0_ids[] = {
        { 0x8086, 0x2415, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */
        { 0x8086, 0x2425, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */
        { 0x8086, 0x2445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */
@@ -1955,6 +1955,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
                .name = "AMD64 Mobo",   /* ALC650 */
                .type = AC97_TUNE_HP_ONLY
        },
+       {
+               .subvendor = 0x10f1,
+               .subdevice = 0x2895,
+               .name = "Tyan Thunder K8WE",
+               .type = AC97_TUNE_HP_ONLY
+       },
        {
                .subvendor = 0x110a,
                .subdevice = 0x0056,
index f28e273ae276061f8de292f2585ade7d8422cdf7..91850281f89b16a7ad3afa9e8487f9d194f9e9b9 100644 (file)
@@ -224,7 +224,7 @@ struct intel8x0m {
        unsigned int pcm_pos_shift;
 };
 
-static struct pci_device_id snd_intel8x0m_ids[] __devinitdata = {
+static struct pci_device_id snd_intel8x0m_ids[] = {
        { 0x8086, 0x2416, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */
        { 0x8086, 0x2426, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */
        { 0x8086, 0x2446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */
index 2b4ce002794a1bb4eb5f320c0341045eea955aa6..cfea51f447848d10d75d31b92e72cf1bf13d0c37 100644 (file)
@@ -424,7 +424,7 @@ module_param_array(enable, bool, NULL, 0444);
 MODULE_PARM_DESC(enable, "Enable Korg 1212 soundcard.");
 MODULE_AUTHOR("Haroldo Gamal <gamal@alternex.com.br>");
 
-static struct pci_device_id snd_korg1212_ids[] __devinitdata = {
+static struct pci_device_id snd_korg1212_ids[] = {
        {
                .vendor    = 0x10b5,
                .device    = 0x906d,
index 828eab59253a98d5e5d2fe2930f79548c67f6300..45214b3b81bedfc4b2afa70f4b297025f83a5e56 100644 (file)
@@ -869,7 +869,7 @@ struct snd_m3 {
 /*
  * pci ids
  */
-static struct pci_device_id snd_m3_ids[] __devinitdata = {
+static struct pci_device_id snd_m3_ids[] = {
        {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO_1, PCI_ANY_ID, PCI_ANY_ID,
         PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0},
        {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO, PCI_ANY_ID, PCI_ANY_ID,
@@ -2137,7 +2137,7 @@ static int __devinit snd_m3_mixer(struct snd_m3 *chip)
  * DSP Code images
  */
 
-static const u16 assp_kernel_image[] __devinitdata = {
+static const u16 assp_kernel_image[] = {
     0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4, 
     0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 
     0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 
@@ -2224,7 +2224,7 @@ static const u16 assp_kernel_image[] __devinitdata = {
  * Mini sample rate converter code image
  * that is to be loaded at 0x400 on the DSP.
  */
-static const u16 assp_minisrc_image[] __devinitdata = {
+static const u16 assp_minisrc_image[] = {
 
     0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412, 
     0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41, 
@@ -2267,12 +2267,12 @@ static const u16 assp_minisrc_image[] __devinitdata = {
  */
 
 #define MINISRC_LPF_LEN 10
-static const u16 minisrc_lpf[MINISRC_LPF_LEN] __devinitdata = {
+static const u16 minisrc_lpf[MINISRC_LPF_LEN] = {
        0X0743, 0X1104, 0X0A4C, 0XF88D, 0X242C,
        0X1023, 0X1AA9, 0X0B60, 0XEFDD, 0X186F
 };
 
-static void __devinit snd_m3_assp_init(struct snd_m3 *chip)
+static void snd_m3_assp_init(struct snd_m3 *chip)
 {
        unsigned int i;
 
index a4aaa7b9a231d0de96551af5f33b359b69be91cc..cc43ecd679061686aa2ed20fbc89f5dc571baecb 100644 (file)
@@ -61,7 +61,7 @@ MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard.");
 /*
  */
 
-static struct pci_device_id snd_mixart_ids[] __devinitdata = {
+static struct pci_device_id snd_mixart_ids[] = {
        { 0x1057, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* MC8240 */
        { 0, }
 };
index 56d7282e66512e9a7bb05072fe20494fe2088b45..101eee0aa018a3152777b82ae43ea56c33a988a2 100644 (file)
@@ -263,7 +263,7 @@ struct nm256 {
 /*
  * PCI ids
  */
-static struct pci_device_id snd_nm256_ids[] __devinitdata = {
+static struct pci_device_id snd_nm256_ids[] = {
        {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
index ae980e11827f4154ebdc8c962bcacb6e45827204..533c672ae8f3fd395b4d96b0c0041917b5654d71 100644 (file)
@@ -73,7 +73,7 @@ enum {
        PCI_ID_LAST
 };
 
-static struct pci_device_id pcxhr_ids[] __devinitdata = {
+static struct pci_device_id pcxhr_ids[] = {
        { 0x10b5, 0x9656, 0x1369, 0xb001, 0, 0, PCI_ID_VX882HR, },   /* VX882HR */
        { 0x10b5, 0x9656, 0x1369, 0xb101, 0, 0, PCI_ID_PCX882HR, },  /* PCX882HR */
        { 0x10b5, 0x9656, 0x1369, 0xb201, 0, 0, PCI_ID_VX881HR, },   /* VX881HR */
index 5501a08ca23a3443ccd31c270c5aba905dfb0a8b..f435fcd6dca99b7922a4c44a139b6551b4965bb6 100644 (file)
@@ -506,7 +506,7 @@ static int riptide_reset(struct cmdif *cif, struct snd_riptide *chip);
 /*
  */
 
-static struct pci_device_id snd_riptide_ids[] __devinitdata = {
+static struct pci_device_id snd_riptide_ids[] = {
        {
         .vendor = 0x127a,.device = 0x4310,
         .subvendor = PCI_ANY_ID,.subdevice = PCI_ANY_ID,
index 2e24b68d07aa47f4cf33d4522c0e48f2c240b79c..2a71499242fa6f626cb6b3bb30bffcfbe0aaf87c 100644 (file)
@@ -227,7 +227,7 @@ struct rme32 {
        struct snd_kcontrol *spdif_ctl;
 };
 
-static struct pci_device_id snd_rme32_ids[] __devinitdata = {
+static struct pci_device_id snd_rme32_ids[] = {
        {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32,
         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
        {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8,
index fde0f3e205304e1f3cc89c4420f89f607a371529..f8de7c9970179d52bfb22b64753e0904efb73179 100644 (file)
@@ -232,7 +232,7 @@ struct rme96 {
        struct snd_kcontrol   *spdif_ctl;
 };
 
-static struct pci_device_id snd_rme96_ids[] __devinitdata = {
+static struct pci_device_id snd_rme96_ids[] = {
        { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96,
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
        { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8,
index 99cf86244acbb17f02ec30bca3e6027490df9fe2..e5a52da77b85d89669cb2cc0c559579e36a9439f 100644 (file)
@@ -568,7 +568,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d
 }
 
 
-static struct pci_device_id snd_hdsp_ids[] __devinitdata = {
+static struct pci_device_id snd_hdsp_ids[] = {
        {
                .vendor = PCI_VENDOR_ID_XILINX,
                .device = PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP, 
@@ -1356,7 +1356,7 @@ static struct snd_rawmidi_ops snd_hdsp_midi_input =
        .trigger =      snd_hdsp_midi_input_trigger,
 };
 
-static int __devinit snd_hdsp_create_midi (struct snd_card *card, struct hdsp *hdsp, int id)
+static int snd_hdsp_create_midi (struct snd_card *card, struct hdsp *hdsp, int id)
 {
        char buf[32];
 
index 9534e183413881c715d5263f111c25acc4bf8805..fc15f61ad5d19b5ff14398f3a838b8ea650addf3 100644 (file)
@@ -315,7 +315,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d
 }
 
 
-static struct pci_device_id snd_rme9652_ids[] __devinitdata = {
+static struct pci_device_id snd_rme9652_ids[] = {
        {
                .vendor    = 0x10ee,
                .device    = 0x3fc4,
index c4303418668bae581ab5b832a94d43583bb8ae01..e5d4def1aa6fe095fb874fc79620354ffb3cd2b0 100644 (file)
@@ -243,7 +243,7 @@ struct sonicvibes {
 #endif
 };
 
-static struct pci_device_id snd_sonic_ids[] __devinitdata = {
+static struct pci_device_id snd_sonic_ids[] = {
        { 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
         { 0, }
 };
index 5629b7eba96d3845f2aa05a9ff7bc22db78d4fa9..9145f7c57fb0389cd81a219135351de779ba2aac 100644 (file)
@@ -63,7 +63,7 @@ MODULE_PARM_DESC(pcm_channels, "Number of hardware channels assigned for PCM.");
 module_param_array(wavetable_size, int, NULL, 0444);
 MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth.");
 
-static struct pci_device_id snd_trident_ids[] __devinitdata = {
+static struct pci_device_id snd_trident_ids[] = {
        {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), 
                PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0},
        {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX), 
index 37bd5eb7a380d8deb10851c374adc15cf437f1d2..08da9234efb38e9981c3183536403dc74f0a3058 100644 (file)
@@ -396,7 +396,7 @@ struct via82xx {
 #endif
 };
 
-static struct pci_device_id snd_via82xx_ids[] __devinitdata = {
+static struct pci_device_id snd_via82xx_ids[] = {
        /* 0x1106, 0x3058 */
        { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA686, },     /* 686A */
        /* 0x1106, 0x3059 */
index c1ede6c2a6d485369530d0f5a9eb226bd137e427..016f9dac253f13d2b4d016ec07f7d4308f3dae69 100644 (file)
@@ -261,7 +261,7 @@ struct via82xx_modem {
        struct snd_info_entry *proc_entry;
 };
 
-static struct pci_device_id snd_via82xx_modem_ids[] __devinitdata = {
+static struct pci_device_id snd_via82xx_modem_ids[] = {
        { 0x1106, 0x3068, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA82XX_MODEM, },
        { 0, }
 };
index 7deda25f7adc8499125a78aadf7e03541451ff56..9c03c6b4e49009f8f93b3cf8ffb7f35d51c3a189 100644 (file)
@@ -60,7 +60,7 @@ enum {
        VX_PCI_VX222_NEW
 };
 
-static struct pci_device_id snd_vx222_ids[] __devinitdata = {
+static struct pci_device_id snd_vx222_ids[] = {
        { 0x10b5, 0x9050, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_OLD, },   /* PLX */
        { 0x10b5, 0x9030, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_NEW, },   /* PLX */
        { 0, }
index 26aa775b7b69d17cddc05bd852fa350d4256fd7d..186453f7abe700a818df68f32d1a9b73bb055798 100644 (file)
@@ -70,7 +70,7 @@ MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch");
 module_param_array(rear_swap, bool, NULL, 0444);
 MODULE_PARM_DESC(rear_swap, "Swap rear channels (must be enabled for correct IEC958 (S/PDIF)) output");
 
-static struct pci_device_id snd_ymfpci_ids[] __devinitdata = {
+static struct pci_device_id snd_ymfpci_ids[] = {
         { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* YMF724 */
         { 0x1073, 0x000d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* YMF724F */
         { 0x1073, 0x000a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* YMF740 */
index adfdce7499d1c40418e05b025de9bf4f6ef32b93..1c09e5f49da8b3e1accf94cccfe8ae08259fc30f 100644 (file)
@@ -241,12 +241,13 @@ static int pdacf_config(struct pcmcia_device *link)
        CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, parse));
        link->conf.ConfigBase = parse->config.base;
        link->conf.ConfigIndex = 0x5;
-       kfree(parse);
 
        CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io));
        CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
        CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
 
+       kfree(parse);
+
        if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0)
                goto failed;
 
@@ -254,6 +255,7 @@ static int pdacf_config(struct pcmcia_device *link)
        return 0;
 
 cs_failed:
+       kfree(parse);
        cs_error(link, last_fn, last_ret);
 failed:
        pcmcia_disable_device(link);