linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Tue, 25 Jan 2005 04:29:28 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/01/25 04:29:20

Modified files:
        .              : CREDITS MAINTAINERS Makefile 
        Documentation  : devices.txt feature-removal-schedule.txt 
                         kernel-parameters.txt unicode.txt 
        Documentation/aoe: aoe.txt mkdevs.sh mkshelf.sh status.sh 
        Documentation/arm/Samsung-S3C24XX: Overview.txt 
        Documentation/cpu-freq: index.txt 
        Documentation/filesystems: Locking 
        Documentation/infiniband: sysfs.txt 
        Documentation/networking: netdevices.txt pktgen.txt 
        Documentation/power: devices.txt swsusp.txt 
        Documentation/serial: driver 
        Documentation/sound/alsa: ALSA-Configuration.txt 
        Documentation/usb: error-codes.txt sn9c102.txt 
        arch/alpha/kernel: irq_i8259.c irq_srm.c smc37c669.c srmcons.c 
                           sys_dp264.c sys_rawhide.c sys_sable.c 
                           sys_titan.c sys_wildfire.c time.c 
        arch/arm       : Kconfig 
        arch/arm/common: rtctime.c scoop.c 
        arch/arm/configs: s3c2410_defconfig 
        arch/arm/kernel: apm.c dma.c head.S irq.c semaphore.c setup.c 
                         signal.c smp.c time.c traps.c 
        arch/arm/lib   : io-readsw-armv4.S io-writesw-armv4.S 
        arch/arm/mach-footbridge: Kconfig ebsa285-leds.c netwinder-hw.c 
                                  netwinder-leds.c 
        arch/arm/mach-integrator: core.c pci_v3.c 
        arch/arm/mach-ixp2000: Kconfig core.c 
        arch/arm/mach-ixp4xx: Kconfig common-pci.c coyote-pci.c 
                              coyote-setup.c ixdp425-pci.c 
                              ixdp425-setup.c ixdpg425-pci.c 
                              prpmc1100-pci.c prpmc1100-setup.c 
        arch/arm/mach-omap: clock.c mux.c 
        arch/arm/mach-pxa: Makefile corgi.c 
        arch/arm/mach-s3c2410: Kconfig clock.c clock.h cpu.c cpu.h dma.c 
                               irq.c mach-bast.c mach-h1940.c 
                               mach-rx3715.c mach-smdk2410.c 
                               mach-vr1000.c s3c2410.c s3c2410.h 
                               s3c2440-dsc.c s3c2440.c s3c2440.h time.c 
        arch/arm/mach-sa1100: collie.c 
        arch/arm/mach-shark: leds.c 
        arch/arm/mm    : Kconfig consistent.c copypage-v6.c ioremap.c 
                         proc-v6.S 
        arch/arm/vfp   : entry.S 
        arch/arm26     : Kconfig 
        arch/arm26/kernel: dma.c irq.c semaphore.c setup.c time.c 
                           traps.c 
        arch/arm26/mm  : small_page.c 
        arch/cris/arch-v10/drivers: Kconfig 
        arch/cris/kernel: irq.c 
        arch/frv/kernel: dma.c entry.S irq.c 
        arch/frv/mb93090-mb00: pci-dma-nommu.c 
        arch/frv/mm    : mmu-context.c pgalloc.c 
        arch/h8300     : defconfig 
        arch/i386      : Kconfig 
        arch/i386/kernel: apm.c dmi_scan.c efi.c i386_ksyms.c i387.c 
                          i8259.c io_apic.c kprobes.c mca.c microcode.c 
                          nmi.c scx200.c signal.c smp.c smpboot.c time.c 
                          traps.c vm86.c 
        arch/i386/kernel/acpi: wakeup.S 
        arch/i386/kernel/cpu: common.c intel_cacheinfo.c 
        arch/i386/kernel/cpu/cpufreq: Kconfig acpi-cpufreq.c 
                                      cpufreq-nforce2.c gx-suspmod.c 
                                      p4-clockmod.c powernow-k7.c 
                                      powernow-k8.c powernow-k8.h 
                                      speedstep-centrino.c 
        arch/i386/kernel/cpu/mtrr: generic.c 
        arch/i386/mach-visws: visws_apic.c 
        arch/i386/mach-voyager: voyager_smp.c 
        arch/i386/mm   : fault.c pageattr.c pgtable.c 
        arch/i386/pci  : common.c numa.c pcbios.c 
        arch/ia64      : Kconfig Kconfig.debug Makefile defconfig 
        arch/ia64/configs: sn2_defconfig 
        arch/ia64/hp/common: Makefile sba_iommu.c 
        arch/ia64/hp/sim: simeth.c 
        arch/ia64/hp/zx1: Makefile 
        arch/ia64/ia32 : ia32_entry.S sys_ia32.c 
        arch/ia64/kernel: Makefile acpi.c asm-offsets.c efi.c entry.S 
                          head.S iosapic.c irq.c mca.c mca_asm.S 
                          mca_drv.c minstate.h sal.c salinfo.c setup.c 
                          signal.c smp.c smpboot.c time.c 
        arch/ia64/lib  : csum_partial_copy.c swiotlb.c 
        arch/ia64/mm   : contig.c discontig.c init.c tlb.c 
        arch/ia64/pci  : pci.c 
        arch/ia64/sn/kernel: bte_error.c io_init.c iomv.c irq.c setup.c 
        arch/ia64/sn/kernel/sn2: ptc_deadlock.S sn2_smp.c sn_hwperf.c 
                                 timer.c timer_interrupt.c 
        arch/ia64/sn/pci: pci_dma.c 
        arch/m32r/kernel: smp.c sys_m32r.c traps.c 
        arch/m32r/lib  : csum_partial_copy.c 
        arch/m68k      : Kconfig 
        arch/m68k/atari: stram.c 
        arch/m68k/lib  : checksum.c 
        arch/m68knommu/lib: checksum.c 
        arch/mips      : defconfig 
        arch/mips/configs: atlas_defconfig capcella_defconfig 
                           cobalt_defconfig db1000_defconfig 
                           db1100_defconfig db1500_defconfig 
                           db1550_defconfig ddb5476_defconfig 
                           ddb5477_defconfig decstation_defconfig 
                           e55_defconfig ev64120_defconfig 
                           ev96100_defconfig ip22_defconfig 
                           ip27_defconfig ip32_defconfig 
                           it8172_defconfig ivr_defconfig 
                           jaguar-atx_defconfig jmr3927_defconfig 
                           lasat200_defconfig malta_defconfig 
                           mpc30x_defconfig ocelot_3_defconfig 
                           ocelot_c_defconfig ocelot_defconfig 
                           ocelot_g_defconfig osprey_defconfig 
                           pb1100_defconfig pb1500_defconfig 
                           pb1550_defconfig rm200_defconfig 
                           sb1250-swarm_defconfig sead_defconfig 
                           tb0226_defconfig tb0229_defconfig 
                           workpad_defconfig yosemite_defconfig 
        arch/mips/kernel: irixelf.c irixsig.c scall64-n32.S 
                          scall64-o32.S signal.c signal32.c 
        arch/mips/lib  : csum_partial_copy.c 
        arch/parisc    : Kconfig 
        arch/parisc/configs: 712_defconfig a500_defconfig b180_defconfig 
                             c3000_defconfig n4000_defconfig 
        arch/parisc/hpux: entry_hpux.S sys_hpux.c 
        arch/parisc/kernel: cache.c drivers.c firmware.c inventory.c 
                            irq.c parisc_ksyms.c processor.c ptrace.c 
                            setup.c smp.c syscall_table.S traps.c 
        arch/parisc/lib: Makefile checksum.c io.c 
        arch/parisc/mm : init.c ioremap.c 
        arch/ppc       : Kconfig 
        arch/ppc/4xx_io: serial_sicc.c 
        arch/ppc/8xx_io: Kconfig cs4218_tdm.c fec.c 
        arch/ppc/kernel: cpu_setup_6xx.S dma-mapping.c head_8xx.S 
                         perfmon.c smp.c time.c traps.c 
        arch/ppc/oprofile: Makefile common.c 
        arch/ppc/platforms: apus_setup.c chrp_smp.c pal4_setup.c 
                            pmac_feature.c pmac_nvram.c pmac_pci.c 
                            pmac_pic.c pq2ads.c pq2ads.h sbc82xx.c 
        arch/ppc/platforms/85xx: Kconfig Makefile mpc8540_ads.c 
                                 mpc8555_cds.h mpc8560_ads.c 
                                 mpc85xx_ads_common.c 
                                 mpc85xx_cds_common.c sbc8560.c 
                                 sbc85xx.c 
        arch/ppc/syslib: Makefile i8259.c m8260_setup.c m8xx_setup.c 
                         open_pic.c open_pic2.c ppc85xx_common.c 
                         ppc85xx_common.h ppc85xx_setup.c prom.c 
                         qspan_pci.c 
        arch/ppc64     : Kconfig 
        arch/ppc64/kernel: HvLpEvent.c eeh.c entry.S i8259.c 
                           iSeries_VpdInfo.c iSeries_pci.c irq.c 
                           kprobes.c misc.S mpic.c pSeries_iommu.c 
                           pSeries_lpar.c pSeries_nvram.c 
                           pSeries_setup.c pSeries_smp.c pci.c 
                           pmac_feature.c pmac_nvram.c pmac_pci.c 
                           pmac_smp.c prom.c ras.c rtas.c rtas_flash.c 
                           rtasd.c smp.c time.c traps.c viopath.c xics.c 
        arch/ppc64/mm  : hash_native.c init.c 
        arch/s390      : defconfig 
        arch/s390/appldata: appldata_base.c 
        arch/s390/kernel: compat_wrapper.S cpcmd.c setup.c smp.c 
                          syscalls.S traps.c 
        arch/s390/mm   : cmm.c extmem.c 
        arch/sh        : Kconfig 
        arch/sh/cchips/voyagergx: consistent.c 
        arch/sh/drivers/dma: dma-api.c 
        arch/sh/kernel : signal.c time.c 
        arch/sh/kernel/cpu/sh4: sq.c 
        arch/sh64/kernel: signal.c 
        arch/sh64/lib  : c-checksum.c 
        arch/sparc/kernel: auxio.c irq.c process.c semaphore.c smp.c 
                           sun4d_irq.c sun4d_smp.c sun4m_smp.c time.c 
        arch/sparc/mm  : srmmu.c 
        arch/sparc/prom: misc.c 
        arch/sparc64   : Kconfig defconfig 
        arch/sparc64/kernel: auxio.c binfmt_aout32.c devices.c irq.c 
                             kprobes.c pci.c pci_psycho.c pci_schizo.c 
                             process.c smp.c sys_sparc32.c sys_sunos32.c 
                             systbls.S time.c traps.c 
        arch/sparc64/lib: find_bit.c 
        arch/sparc64/mm: init.c 
        arch/sparc64/prom: p1275.c 
        arch/sparc64/solaris: timod.c 
        arch/um        : Kconfig Makefile Makefile-os-Linux 
                         Makefile-skas Makefile-tt 
        arch/um/drivers: chan_user.c line.c mconsole_kern.c net_kern.c 
                         ubd_kern.c ubd_user.c xterm.c xterm_kern.c 
        arch/um/include: init.h ubd_user.h 
        arch/um/include/sysdep-i386: checksum.h ptrace_user.h 
        arch/um/kernel : checksum.c dyn.lds.S irq.c main.c process.c 
                         ptrace.c sigio_kern.c smp.c syscall_kern.c 
                         sysrq.c time_kern.c trap_kern.c um_arch.c 
                         uml.lds.S 
        arch/um/kernel/skas: process.c 
        arch/um/kernel/tt: tracer.c 
        arch/v850/kernel: memcons.c rte_cb_leds.c rte_mb_a_pci.c 
                          semaphore.c 
        arch/v850/lib  : checksum.c 
        arch/x86_64/ia32: fpu32.c ia32_aout.c ia32entry.S syscall32.c 
        arch/x86_64/kernel: i8259.c io_apic.c kprobes.c mce.c nmi.c 
                            pci-gart.c setup.c setup64.c signal.c smp.c 
                            smpboot.c time.c traps.c 
        arch/x86_64/kernel/acpi: wakeup.S 
        arch/x86_64/lib: csum-wrappers.c 
        arch/x86_64/mm : fault.c init.c ioremap.c k8topology.c numa.c 
                         srat.c 
        crypto         : Kconfig 
        drivers/acorn/block: fd1772.c mfmhd.c 
        drivers/acpi   : Kconfig bus.c debug.c ec.c event.c pci_irq.c 
                         scan.c 
        drivers/acpi/events: evgpeblk.c 
        drivers/acpi/sleep: main.c 
        drivers/atm    : ambassador.c he.c horizon.c idt77105.c 
                         idt77252.c suni.c 
        drivers/base   : class_simple.c 
        drivers/block  : Kconfig acsi.c amiflop.c ataflop.c cciss.c 
                         cfq-iosched.c elevator.c floppy.c genhd.c 
                         ioctl.c ll_rw_blk.c nbd.c noop-iosched.c 
                         ps2esdi.c scsi_ioctl.c swim3.c swim_iop.c ub.c 
                         viodasd.c xd.c z2ram.c 
        drivers/block/aoe: aoe.h aoeblk.c aoechr.c aoedev.c aoemain.c 
                           aoenet.c 
        drivers/block/paride: Kconfig paride.c pd.c pseudo.h 
        drivers/bluetooth: bcm203x.c bfusb.c bluecard_cs.c bt3c_cs.c 
                           btuart_cs.c dtl1_cs.c hci_bcsp.c hci_ldisc.c 
                           hci_usb.c 
        drivers/cdrom  : Kconfig aztcd.c cdrom.c cdu31a.c cm206.c gscd.c 
                         mcd.c mcdx.c optcd.c sbpcd.c sjcd.c sonycd535.c 
        drivers/char   : Kconfig consolemap.c cp437.uni keyboard.c lcd.c 
                         qtronix.c random.c s3c2410-rtc.c sb1250_duart.c 
        drivers/char/agp: Kconfig backend.c intel-agp.c intel-mch-agp.c 
        drivers/char/drm: drm_auth.c drm_memory_debug.h 
        drivers/char/ipmi: Kconfig ipmi_msghandler.c ipmi_si_intf.c 
        drivers/char/pcmcia: synclink_cs.c 
        drivers/cpufreq: Kconfig Makefile cpufreq.c cpufreq_ondemand.c 
                         cpufreq_userspace.c freq_table.c 
        drivers/firmware: Kconfig efivars.c 
        drivers/i2c    : i2c-dev.c 
        drivers/i2c/busses: Kconfig i2c-i801.c i2c-mpc.c 
        drivers/i2c/chips: adm1026.c eeprom.c it87.c lm63.c lm85.c 
                           via686a.c 
        drivers/ide    : ide-cd.c ide-default.c ide-dma.c ide-io.c 
                         ide-lib.c ide-probe.c ide.c 
        drivers/ide/arm: icside.c 
        drivers/ide/cris: ide-v10.c 
        drivers/ide/legacy: hd.c ide-cs.c 
        drivers/ide/pci: atiixp.c piix.c piix.h 
        drivers/ieee1394: amdtp.c dv1394.c highlevel.c nodemgr.c 
                          raw1394.c video1394.c 
        drivers/infiniband/core: cache.c mad.c mad_priv.h sysfs.c 
                                 user_mad.c verbs.c 
        drivers/infiniband/hw/mthca: Makefile mthca_av.c mthca_cmd.c 
                                     mthca_cmd.h mthca_cq.c mthca_dev.h 
                                     mthca_eq.c mthca_mad.c mthca_main.c 
                                     mthca_mr.c mthca_profile.c 
                                     mthca_profile.h mthca_provider.c 
                                     mthca_provider.h mthca_qp.c 
        drivers/infiniband/include: ib_cache.h ib_sa.h ib_verbs.h 
        drivers/infiniband/ulp/ipoib: ipoib.h ipoib_ib.c ipoib_main.c 
                                      ipoib_multicast.c ipoib_verbs.c 
        drivers/input  : Kconfig input.c 
        drivers/input/joystick/iforce: Kconfig 
        drivers/input/keyboard: atkbd.c 
        drivers/input/misc: Kconfig pcspkr.c sparcspkr.c 
        drivers/input/mouse: Kconfig logips2pp.c psmouse-base.c 
        drivers/input/serio: i8042.c q40kbd.c serio.c 
        drivers/isdn/capi: capi.c capidrv.c kcapi.c 
        drivers/isdn/divert: divert_procfs.c isdn_divert.c 
        drivers/isdn/hardware/avm: avm_cs.c 
        drivers/isdn/hisax: avma1_cs.c elsa_cs.c sedlbauer_cs.c 
                            teles_cs.c 
        drivers/isdn/i4l: Kconfig 
        drivers/isdn/tpam: Kconfig 
        drivers/macintosh: adb.c adbhid.c macio-adb.c via-cuda.c 
                           via-pmu.c 
        drivers/md     : Kconfig dm-log.c kcopyd.c md.c 
        drivers/media/dvb/dibusb: Kconfig 
        drivers/media/dvb/frontends: dib3000-common.c 
        drivers/media/radio: radio-typhoon.c 
        drivers/message/fusion: mptlan.c mptscsih.c 
        drivers/message/i2o: device.c driver.c exec-osm.c i2o_block.c 
                             i2o_config.c i2o_proc.c i2o_scsi.c iop.c 
                             pci.c 
        drivers/misc   : Kconfig 
        drivers/mmc    : mmc_block.c wbsd.c wbsd.h 
        drivers/mtd    : mtdpart.c 
        drivers/mtd/chips: chipreg.c 
        drivers/mtd/devices: block2mtd.c 
        drivers/mtd/maps: Kconfig cstm_mips_ixx.c dilnetpc.c 
                          elan-104nc.c ipaq-flash.c octagon-5066.c 
                          sbc_gxx.c vmax301.c 
        drivers/net    : 3c515.c 8139too.c Kconfig atp.c big_sur_ge.c 
                         bmac.c de600.c eepro.c gianfar.c gianfar.h 
                         gianfar_ethtool.c hamachi.c iseries_veth.c 
                         myri_sbus.c ppp_async.c ppp_generic.c 
                         ppp_synctty.c pppoe.c s2io.c s2io.h sk_g16.c 
                         smc-ultra.c smc91x.c sungem.c sungem.h tg3.c 
                         tg3.h tun.c via-velocity.c 
        drivers/net/appletalk: ltpc.c 
        drivers/net/arcnet: Kconfig arcnet.c 
        drivers/net/e1000: e1000.h e1000_ethtool.c e1000_main.c 
        drivers/net/fc : iph5526_ip.h 
        drivers/net/fec_8xx: fec_mii.c 
        drivers/net/hamradio: 6pack.c scc.c 
        drivers/net/ibm_emac: ibm_emac.h ibm_emac_core.c ibm_emac_mal.c 
                              ibm_emac_phy.c 
        drivers/net/irda: au1k_ir.c sir_kthread.c stir4200.c 
        drivers/net/ixgb: ixgb.h ixgb_ee.c ixgb_ethtool.c ixgb_hw.c 
                          ixgb_hw.h ixgb_ids.h ixgb_main.c ixgb_osdep.h 
                          ixgb_param.c 
        drivers/net/pcmcia: 3c574_cs.c 3c589_cs.c axnet_cs.c 
                            com20020_cs.c fmvj18x_cs.c ibmtr_cs.c 
                            nmclan_cs.c pcnet_cs.c smc91c92_cs.c 
                            xirc2ps_cs.c 
        drivers/net/tulip: tulip_core.c winbond-840.c 
        drivers/net/wan: Kconfig sdla.c syncppp.c 
        drivers/net/wireless: Kconfig airo.c airo_cs.c atmel_cs.c 
                              netwave_cs.c orinoco.c orinoco_cs.c 
                              ray_cs.c strip.c wavelan_cs.c 
                              wavelan_cs.p.h wl3501_cs.c 
        drivers/oprofile: buffer_sync.c oprofilefs.c 
        drivers/parisc : Makefile asp.c ccio-dma.c dino.c eisa.c gsc.c 
                         gsc.h iosapic.c iosapic_private.h lasi.c 
                         lba_pci.c sba_iommu.c superio.c wax.c 
        drivers/parport: daisy.c parport_cs.c parport_pc.c share.c 
        drivers/pci    : Kconfig Makefile access.c msi.c pci-driver.c 
                         pci.c pci.h pci.ids probe.c remove.c rom.c 
                         search.c 
        drivers/pci/hotplug: Kconfig pciehp.h pciehp_core.c pciehp_hpc.c 
        drivers/pcmcia : Makefile au1000_generic.c cs.c cs_internal.h 
                         i82092.c i82365.c m32r_cfc.c m32r_pcc.c 
                         pd6729.c rsrc_mgr.c soc_common.c socket_sysfs.c 
        drivers/pnp    : core.c 
        drivers/pnp/pnpbios: Kconfig 
        drivers/s390   : Kconfig 
        drivers/s390/block: dasd.c dasd_3990_erp.c dasd_devmap.c 
                            dasd_diag.c dasd_eckd.c dasd_eckd.h 
                            dasd_erp.c dasd_fba.c dasd_int.h 
                            dasd_ioctl.c dasd_proc.c 
        drivers/s390/char: con3215.c sclp.c tape_core.c tty3270.c 
                           vmlogrdr.c 
        drivers/s390/cio: css.c device_id.c qdio.c 
        drivers/s390/net: iucv.c qeth_main.c smsgiucv.c 
        drivers/sbus   : sbus.c 
        drivers/sbus/char: bpp.c flash.c jsflash.c riowatchdog.c 
                           vfc_dev.c 
        drivers/scsi   : Kconfig aha1542.c constants.c dpt_i2o.c eata.c 
                         esp.c fd_mcs.c gdth.c gdth_proc.c gdth_proc.h 
                         imm.c ipr.c lasi700.c osst.c osst.h ppa.c 
                         qla1280.c qlogicpti.c sata_sil.c scsi.c 
                         scsi_debug.c scsi_lib.c scsi_transport_fc.c 
                         scsi_transport_spi.c sd.c sg.c sr.c st.c 
                         sym53c416.c sym53c8xx_comm.h u14-34f.c zalon.c 
        drivers/scsi/aacraid: commsup.c 
        drivers/scsi/aic7xxx: aic7770_osm.c aic7xxx_osm.h 
                              aic7xxx_osm_pci.c aic7xxx_pci.c 
        drivers/scsi/ibmvscsi: ibmvscsi.c ibmvscsi.h 
        drivers/scsi/pcmcia: aha152x_stub.c fdomain_stub.c nsp_cs.c 
                             qlogic_stub.c sym53c500_cs.c 
        drivers/scsi/sym53c8xx_2: sym_conf.h sym_defs.h sym_fw.c 
                                  sym_glue.c sym_glue.h sym_hipd.c 
                                  sym_hipd.h sym_malloc.c sym_misc.c 
                                  sym_nvram.c sym_nvram.h 
        drivers/serial : 8250_gsc.c Kconfig Makefile serial_core.c 
                         serial_cs.c sunsu.c sunzilog.c 
        drivers/usb    : Makefile 
        drivers/usb/class: cdc-acm.c usblp.c 
        drivers/usb/core: devio.c file.c hcd.c hub.c message.c usb.c 
        drivers/usb/host: ehci-hcd.c ehci-mem.c ehci-q.c ehci-sched.c 
                          sl811-hcd.c uhci-debug.c uhci-hcd.c uhci-hcd.h 
        drivers/usb/image: mdc800.c 
        drivers/usb/input: Kconfig hid-core.c 
        drivers/usb/media: sn9c102.h sn9c102_core.c sn9c102_hv7131d.c 
                           sn9c102_mi0343.c sn9c102_pas106b.c 
                           sn9c102_sensor.h sn9c102_tas5110c1b.c 
                           sn9c102_tas5130d1b.c 
        drivers/usb/misc: Kconfig Makefile usbtest.c 
        drivers/usb/net: pegasus.c pegasus.h usbnet.c 
        drivers/usb/serial: cypress_m8.c ftdi_sio.c ftdi_sio.h 
                            garmin_gps.c keyspan.c 
        drivers/usb/storage: Kconfig unusual_devs.h 
        drivers/video  : Kconfig Makefile fbmem.c fbmon.c hgafb.c 
                         pxafb.c sa1100fb.c 
        drivers/video/aty: aty128fb.c radeon_base.c 
        drivers/video/console: fbcon.c fbcon.h mdacon.c vgacon.c 
        drivers/video/i810: i810_main.c 
        drivers/video/matrox: matroxfb_base.c 
        drivers/video/sis: sis.h sis_main.c 
        drivers/w1     : w1.c w1.h w1_family.c w1_io.c w1_io.h 
        fs             : Kconfig aio.c binfmt_aout.c binfmt_elf.c 
                         binfmt_misc.c bio.c block_dev.c buffer.c 
                         char_dev.c compat.c dcache.c dquot.c exec.c 
                         fcntl.c file.c file_table.c filesystems.c 
                         inode.c ioctl.c libfs.c mbcache.c namei.c 
                         namespace.c open.c pipe.c readdir.c super.c 
        fs/adfs        : dir.c map.c 
        fs/afs         : cell.c cmservice.c kafsasyncd.c kafstimod.c 
                         main.c server.c vlocation.c 
        fs/devfs       : base.c 
        fs/ext2        : xattr.c xattr.h 
        fs/ext3        : balloc.c ialloc.c inode.c super.c xattr.c 
                         xattr.h 
        fs/fat         : Makefile cache.c dir.c file.c inode.c misc.c 
        fs/hostfs      : hostfs_kern.c 
        fs/hugetlbfs   : inode.c 
        fs/jffs2       : background.c compr.c 
        fs/jfs         : jfs_logmgr.c jfs_metapage.c jfs_txnmgr.c 
        fs/minix       : itree_common.c 
        fs/msdos       : namei.c 
        fs/nfs         : dir.c file.c nfs4state.c 
        fs/nfsd        : nfscache.c nfssvc.c vfs.c 
        fs/nls         : nls_base.c 
        fs/ntfs        : aops.c compress.c debug.c 
        fs/partitions  : ibm.c 
        fs/proc        : generic.c kcore.c 
        fs/reiserfs    : journal.c xattr.c 
        fs/smbfs       : proc.c request.c smbiod.c 
        fs/sysv        : itree.c 
        fs/vfat        : namei.c 
        fs/xfs/linux-2.6: xfs_buf.c xfs_file.c xfs_ioctl32.c 
                          xfs_ioctl32.h xfs_super.c xfs_vnode.c 
        fs/xfs/support : debug.c 
        include/asm-alpha: io_trivial.h resource.h spinlock.h 
        include/asm-arm: bitops.h cpu.h processor.h resource.h smp.h 
                         tlb.h 
        include/asm-arm/arch-pxa: corgi.h pxa-regs.h 
        include/asm-arm/arch-s3c2410: dma.h regs-iis.h vr1000-map.h 
        include/asm-arm/arch-sa1100: collie.h 
        include/asm-arm/mach: irq.h 
        include/asm-arm26: resource.h 
        include/asm-cris: resource.h 
        include/asm-frv: resource.h 
        include/asm-generic: cputime.h 
        include/asm-h8300: mmu.h resource.h 
        include/asm-i386: checksum.h desc.h resource.h smp.h spinlock.h 
        include/asm-i386/mach-numaq: mach_apic.h 
        include/asm-ia64: hardirq.h hw_irq.h kregs.h machvec.h 
                          machvec_init.h machvec_sn2.h mca.h mca_asm.h 
                          msi.h numnodes.h pci.h percpu.h processor.h 
                          resource.h sal.h signal.h spinlock.h 
                          thread_info.h 
        include/asm-ia64/sn: addrs.h arch.h klconfig.h leds.h nodepda.h 
                             pda.h rw_mmr.h shub_mmr.h sn_cpuid.h 
                             sn_sal.h 
        include/asm-m32r: checksum.h resource.h spinlock.h 
        include/asm-m68k: resource.h 
        include/asm-mips: checksum.h resource.h spinlock.h 
        include/asm-parisc: cache.h cacheflush.h checksum.h hardirq.h 
                            hardware.h hw_irq.h io.h irq.h 
                            parisc-device.h pdc.h ptrace.h resource.h 
                            serial.h spinlock.h superio.h unistd.h 
        include/asm-ppc: irq.h mpc8260.h mpc85xx.h pgtable.h reg.h 
                         resource.h smp.h spinlock.h system.h 
        include/asm-ppc64: irq.h processor.h resource.h smp.h spinlock.h 
                           thread_info.h tlbflush.h 
        include/asm-ppc64/iSeries: HvLpEvent.h iSeries_pci.h 
        include/asm-s390: resource.h spinlock.h system.h 
        include/asm-sh : checksum.h resource.h spinlock.h 
        include/asm-sparc: checksum.h resource.h spinlock.h 
        include/asm-sparc64: bitops.h checksum.h resource.h spinlock.h 
        include/asm-um : pgtable.h system-i386.h 
        include/asm-v850: resource.h 
        include/asm-x86_64: bitops.h checksum.h mmu_context.h numa.h 
                            pgtable.h processor.h proto.h resource.h 
                            smp.h spinlock.h unistd.h 
        include/linux  : agp_backend.h arcdevice.h atmdev.h blkdev.h 
                         capability.h compat_ioctl.h completion.h 
                         cpufreq.h ext3_fs.h fb.h fcdevice.h 
                         fddidevice.h file.h fs.h genhd.h hippidevice.h 
                         i2o.h ide.h if_tun.h in6.h ip.h ipv6.h irq.h 
                         kprobes.h mbcache.h msdos_fs.h netdevice.h 
                         netfilter.h netlink.h netpoll.h nfs_fs.h 
                         nodemask.h page-flags.h pagemap.h pci.h 
                         pci_ids.h pipe_fs_i.h pkt_cls.h random.h 
                         rtnetlink.h sched.h sctp.h serial_core.h 
                         skbuff.h socket.h spinlock.h tcp.h trdevice.h 
                         udp.h 
        include/linux/netfilter_arp: arp_tables.h 
        include/linux/netfilter_ipv4: ip_conntrack.h 
                                      ip_conntrack_amanda.h 
                                      ip_conntrack_core.h 
                                      ip_conntrack_ftp.h 
                                      ip_conntrack_helper.h 
                                      ip_conntrack_irc.h 
                                      ip_conntrack_protocol.h 
                                      ip_conntrack_tftp.h 
                                      ip_conntrack_tuple.h ip_nat.h 
                                      ip_nat_core.h ip_nat_helper.h 
                                      ip_nat_protocol.h ip_tables.h 
                                      ipt_LOG.h 
        include/linux/netfilter_ipv6: ip6_tables.h ip6t_LOG.h 
        include/net    : addrconf.h ax25.h checksum.h dn.h dn_fib.h 
                         icmp.h ip_vs.h ipv6.h ipx.h iw_handler.h 
                         pkt_act.h pkt_cls.h sock.h tcp.h 
        include/net/bluetooth: hci_core.h l2cap.h rfcomm.h sco.h 
        include/net/sctp: command.h constants.h sctp.h sm.h structs.h 
                          tsnmap.h ulpevent.h ulpqueue.h 
        include/net/tc_act: tc_pedit.h 
        include/pcmcia : cs.h 
        include/scsi   : scsi_dbg.h scsi_device.h scsi_transport_fc.h 
        include/sound  : ac97_codec.h version.h 
        kernel         : audit.c auditsc.c compat.c exit.c fork.c 
                         kprobes.c ptrace.c sched.c signal.c spinlock.c 
                         timer.c 
        kernel/irq     : autoprobe.c 
        kernel/power   : Kconfig disk.c main.c swsusp.c 
        lib            : Kconfig.debug kernel_lock.c 
        mm             : filemap.c mempolicy.c mmap.c nommu.c 
                         page_alloc.c pdflush.c vmscan.c 
        net            : Kconfig compat.c socket.c 
        net/802        : fc.c fddi.c hippi.c psnap.c tr.c 
        net/8021q      : vlan.c vlan.h vlanproc.c 
        net/appletalk  : aarp.c ddp.c 
        net/atm        : addr.c br2684.c clip.c common.c lec.c lec.h 
                         resources.c svc.c 
        net/ax25       : af_ax25.c ax25_addr.c ax25_dev.c ax25_iface.c 
                         ax25_out.c ax25_route.c ax25_uid.c 
        net/bluetooth  : hci_conn.c hci_core.c hci_sock.c l2cap.c sco.c 
        net/bluetooth/cmtp: capi.c cmtp.h 
        net/bluetooth/hidp: core.c hidp.h 
        net/bluetooth/rfcomm: core.c sock.c tty.c 
        net/bridge     : br_netfilter.c 
        net/bridge/netfilter: ebt_limit.c ebt_log.c ebt_ulog.c 
        net/core       : datagram.c dev.c dev_mcast.c dst.c dv.c 
                         gen_estimator.c iovec.c link_watch.c 
                         neighbour.c netfilter.c netpoll.c pktgen.c 
                         rtnetlink.c sock.c wireless.c 
        net/decnet     : af_decnet.c dn_dev.c dn_fib.c dn_neigh.c 
                         dn_route.c dn_rules.c dn_table.c dn_timer.c 
        net/econet     : af_econet.c 
        net/ipv4       : af_inet.c devinet.c fib_hash.c fib_rules.c 
                         fib_semantics.c inetpeer.c ip_fragment.c 
                         ip_gre.c ip_sockglue.c ipconfig.c ipip.c ipmr.c 
                         protocol.c raw.c route.c tcp.c tcp_input.c 
                         tcp_minisocks.c tcp_output.c tcp_timer.c udp.c 
        net/ipv4/ipvs  : ip_vs_core.c ip_vs_ctl.c ip_vs_est.c 
                         ip_vs_proto_tcp.c ip_vs_proto_udp.c 
                         ip_vs_sched.c ip_vs_sync.c 
        net/ipv4/netfilter: Kconfig arp_tables.c arptable_filter.c 
                            ip_conntrack_amanda.c ip_conntrack_core.c 
                            ip_conntrack_ftp.c ip_conntrack_irc.c 
                            ip_conntrack_proto_icmp.c 
                            ip_conntrack_proto_sctp.c 
                            ip_conntrack_proto_tcp.c 
                            ip_conntrack_standalone.c 
                            ip_conntrack_tftp.c ip_nat_amanda.c 
                            ip_nat_core.c ip_nat_ftp.c ip_nat_helper.c 
                            ip_nat_irc.c ip_nat_proto_icmp.c 
                            ip_nat_proto_tcp.c ip_nat_proto_udp.c 
                            ip_nat_proto_unknown.c ip_nat_rule.c 
                            ip_nat_snmp_basic.c ip_nat_standalone.c 
                            ip_nat_tftp.c ip_queue.c ip_tables.c 
                            ipt_CLUSTERIP.c ipt_LOG.c ipt_ULOG.c 
                            ipt_hashlimit.c ipt_helper.c ipt_limit.c 
                            ipt_recent.c iptable_filter.c 
                            iptable_mangle.c iptable_raw.c 
        net/ipv6       : addrconf.c af_inet6.c anycast.c exthdrs.c 
                         icmp.c ip6_fib.c ip6_flowlabel.c ip6_output.c 
                         ip6_tunnel.c ipv6_sockglue.c ipv6_syms.c 
                         mcast.c ndisc.c protocol.c raw.c reassembly.c 
                         route.c sit.c sysctl_net_ipv6.c udp.c 
                         xfrm6_tunnel.c 
        net/ipv6/netfilter: Kconfig ip6_queue.c ip6_tables.c ip6t_LOG.c 
                            ip6t_limit.c ip6table_filter.c 
                            ip6table_mangle.c ip6table_raw.c 
        net/ipx        : af_ipx.c ipx_proc.c ipx_route.c 
        net/irda/irnet : Kconfig 
        net/key        : af_key.c 
        net/lapb       : lapb_iface.c 
        net/llc        : llc_core.c 
        net/netlink    : af_netlink.c 
        net/netrom     : af_netrom.c nr_route.c 
        net/packet     : af_packet.c 
        net/rose       : af_rose.c rose_route.c 
        net/rxrpc      : krxiod.c krxsecd.c krxtimod.c transport.c 
        net/sched      : Kconfig act_api.c cls_api.c cls_fw.c 
                         cls_route.c cls_rsvp.h cls_tcindex.c cls_u32.c 
                         estimator.c gact.c ipt.c mirred.c pedit.c 
                         police.c sch_api.c sch_atm.c sch_cbq.c 
                         sch_dsmark.c sch_generic.c sch_gred.c 
                         sch_hfsc.c sch_htb.c sch_prio.c sch_red.c 
                         sch_tbf.c sch_teql.c 
        net/sctp       : associola.c bind_addr.c chunk.c command.c 
                         debug.c endpointola.c input.c inqueue.c ipv6.c 
                         objcnt.c output.c outqueue.c proc.c protocol.c 
                         sm_make_chunk.c sm_sideeffect.c sm_statefuns.c 
                         sm_statetable.c socket.c ssnmap.c transport.c 
                         tsnmap.c ulpevent.c ulpqueue.c 
        net/sunrpc     : auth.c auth_null.c auth_unix.c cache.c 
                         pmap_clnt.c sched.c svcauth.c svcsock.c 
        net/sunrpc/auth_gss: auth_gss.c gss_mech_switch.c 
        net/unix       : af_unix.c 
        net/wanrouter  : af_wanpipe.c 
        net/x25        : af_x25.c x25_link.c x25_route.c 
        net/xfrm       : xfrm_policy.c xfrm_state.c 
        scripts        : reference_discarded.pl reference_init.pl 
        scripts/kconfig: expr.c expr.h lkc.h lkc_proto.h mconf.c menu.c 
                         symbol.c zconf.tab.c_shipped zconf.y 
        scripts/lxdialog: menubox.c 
        security       : Kconfig dummy.c 
        security/keys  : key.c keyring.c 
        security/selinux: Kconfig avc.c hooks.c netif.c nlmsgtab.c 
        security/selinux/ss: avtab.c ebitmap.c policydb.c policydb.h 
                             services.c 
        sound          : sound_core.c 
        sound/core     : rawmidi.c 
        sound/core/ioctl32: ioctl32.c 
        sound/oss      : Kconfig gus_wave.c mad16.c midibuf.c opl3sa.c 
                         opl3sa2.c pas2_card.c pss.c sb_common.c 
                         sequencer.c sys_timer.c uart6850.c waveartist.c 
                         wavfront.c wf_midi.c ymfpci.c 
        sound/oss/emu10k1: midi.c 
        sound/pci      : Kconfig atiixp.c intel8x0.c 
        sound/pci/ac97 : ac97_codec.c ac97_patch.c 
        sound/pci/ca0106: ca0106_mixer.c ca0106_proc.c 
        sound/pci/mixart: mixart.c 
        sound/pcmcia/pdaudiocf: pdaudiocf.c 
        sound/pcmcia/vx: vx_entry.c vxpocket.c vxpocket.h 
Added files:
        Documentation  : PCIEBUS-HOWTO.txt 
        Documentation/powerpc: eeh-pci-error-recovery.txt 
        arch/arm/mach-pxa: corgi_ssp.c 
        arch/i386/kernel: vmlinux.lds vsyscall-int80.so 
                          vsyscall-sysenter.so vsyscall.lds 
        arch/i386/kernel/cpu/cpufreq: speedstep-est-common.h 
        arch/ia64/hp/common: hwsw_iommu.c 
        arch/ia64/hp/zx1: hpzx1_swiotlb_machvec.c 
        arch/parisc/lib: iomap.c 
        arch/ppc/platforms/85xx: mpc85xx_devices.c mpc85xx_sys.c 
        arch/ppc/syslib: ppc_sys.c 
        drivers/cpufreq: cpufreq_stats.c 
        drivers/infiniband/hw/mthca: mthca_memfree.c mthca_memfree.h 
        drivers/pci/pcie: Kconfig Makefile portdrv.h portdrv_bus.c 
                          portdrv_core.c portdrv_pci.c 
        drivers/pcmcia : pxa2xx_sharpsl.c 
        drivers/scsi   : gdth_kcompat.h 
        drivers/serial : mpsc.c mpsc.h mpsc_defs.h 
        drivers/usb/misc: idmouse.c 
        drivers/video  : w100fb.c w100fb.h 
        drivers/video/backlight: Kconfig Makefile backlight.c lcd.c 
        include/asm-generic: resource.h 
        include/asm-i386: asm_offsets.h 
        include/asm-ia64: machvec_hpzx1_swiotlb.h 
        include/asm-ppc: ppc_sys.h 
        include/linux  : backlight.h fsl_devices.h lcd.h pcieport_if.h 
        include/video  : w100fb.h 
        scripts/kconfig: util.c 
Removed files:
        arch/ppc/platforms/85xx: mpc8540.c mpc8555.c mpc8560.c 
        arch/um        : Kconfig_block 
        arch/um/include: umn.h 
        drivers/scsi   : fd_mcs.h lasi700.h 
        fs/fat         : fatfs_syms.c 
        include/asm-ia64/sn: router.h 
        include/asm-parisc: bootdata.h 
        include/asm-ppc64/iSeries: iSeries_VpdInfo.h 
        include/linux  : msdos_fs_i.h msdos_fs_sb.h 
        scripts        : README.Menuconfig 

Log message:
        Merge with 2.6.11-rc2.

diff -urN linux/CREDITS linux/CREDITS
--- linux/CREDITS       2005/01/13 14:05:14     1.136
+++ linux/CREDITS       2005/01/25 04:27:50     1.137
@@ -2936,10 +2936,10 @@
 S: Finland
 
 N: Deepak Saxena
-E: deepak@csociety.purdue.edu
+E: dsaxena@plexity.net
 D: I2O kernel layer (config, block, core, pci, net). I2O disk support for LILO
-D: XScale(IOP310) porting
-S: Tempe, Arizona
+D: XScale(IOP, IXP) porting and other random ARM bits
+S: Portland, OR
 
 N: Eric Schenk
 E: Eric.Schenk@dna.lth.se
diff -urN linux/MAINTAINERS linux/MAINTAINERS
--- linux/MAINTAINERS   2005/01/13 14:05:14     1.173
+++ linux/MAINTAINERS   2005/01/25 04:27:50     1.174
@@ -575,7 +575,7 @@
 CPU FREQUENCY DRIVERS
 P:     Dave Jones
 M:     davej@codemonkey.org.uk
-L:     cpufreq@www.linux.org.uk
+L:     cpufreq@lists.linux.org.uk
 W:     http://www.codemonkey.org.uk/projects/cpufreq/
 S:     Maintained
 
@@ -1988,6 +1988,20 @@
 W:     http://linux-visws.sf.net
 S:     Maintained for 2.6.
 
+SIMTEC EB110ATX (Chalice CATS)
+P:     Ben Dooks
+P:     Vincent Sanders
+M:     support@simtec.co.uk
+W:     http://www.simtec.co.uk/products/EB110ATX/
+S:     Supported
+
+SIMTEC EB2410ITX (BAST)
+P:     Ben Dooks
+P:     Vincent Sanders
+M:     support@simtec.co.uk
+W:     http://www.simtec.co.uk/products/EB2410ITX/
+S:     Supported
+
 SIS 5513 IDE CONTROLLER DRIVER
 P:     Lionel Bouton
 M:     Lionel.Bouton@inet6.fr
@@ -2079,6 +2093,13 @@
 L:     ultralinux@vger.kernel.org
 S:     Maintained
 
+SHARP LH SUPPORT (LH7952X & LH7A40X)
+P:     Marc Singer
+M:     elf@buici.com
+W:     http://projects.buici.com/arm
+L:     linux-arm-kernel@lists.arm.linux.org.uk
+S:     Maintained
+
 SPARC (sparc32):
 P:     William L. Irwin
 M:     wli@holomorphy.com
diff -urN linux/Makefile linux/Makefile
--- linux/Makefile      2005/01/13 14:05:14     1.242
+++ linux/Makefile      2005/01/25 04:27:50     1.243
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 11
-EXTRAVERSION =-rc1
+EXTRAVERSION =-rc2
 NAME=Woozy Numbat
 
 # *DOCUMENTATION*
@@ -531,6 +531,9 @@
 # warn about C99 declaration after statement
 #CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
 
+# disable pointer signedness warnings in gcc 4.0
+CFLAGS += $(call cc-option,-Wno-pointer-sign,)
+
 # Default kernel image to build when no specific target is given.
 # KBUILD_IMAGE may be overruled on the commandline or
 # set in the environment
diff -urN linux/Documentation/PCIEBUS-HOWTO.txt 
linux/Documentation/PCIEBUS-HOWTO.txt
--- linux/Documentation/PCIEBUS-HOWTO.txt       1970/01/01 00:00:00
+++ linux/Documentation/PCIEBUS-HOWTO.txt       Tue Jan 25 04:27:51 2005        
1.1
@@ -0,0 +1,217 @@
+               The PCI Express Port Bus Driver Guide HOWTO
+       Tom L Nguyen tom.l.nguyen@intel.com
+                       11/03/2004
+
+1. About this guide
+
+This guide describes the basics of the PCI Express Port Bus driver
+and provides information on how to enable the service drivers to
+register/unregister with the PCI Express Port Bus Driver.
+
+2. Copyright 2004 Intel Corporation
+
+3. What is the PCI Express Port Bus Driver
+
+A PCI Express Port is a logical PCI-PCI Bridge structure. There
+are two types of PCI Express Port: the Root Port and the Switch
+Port. The Root Port originates a PCI Express link from a PCI Express
+Root Complex and the Switch Port connects PCI Express links to
+internal logical PCI buses. The Switch Port, which has its secondary
+bus representing the switch's internal routing logic, is called the
+switch's Upstream Port. The switch's Downstream Port is bridging from
+switch's internal routing bus to a bus representing the downstream
+PCI Express link from the PCI Express Switch.
+
+A PCI Express Port can provide up to four distinct functions,
+referred to in this document as services, depending on its port type.
+PCI Express Port's services include native hotplug support (HP),
+power management event support (PME), advanced error reporting
+support (AER), and virtual channel support (VC). These services may
+be handled by a single complex driver or be individually distributed
+and handled by corresponding service drivers.
+
+4. Why use the PCI Express Port Bus Driver?
+
+In existing Linux kernels, the Linux Device Driver Model allows a
+physical device to be handled by only a single driver. The PCI
+Express Port is a PCI-PCI Bridge device with multiple distinct
+services. To maintain a clean and simple solution each service
+may have its own software service driver. In this case several
+service drivers will compete for a single PCI-PCI Bridge device.
+For example, if the PCI Express Root Port native hotplug service
+driver is loaded first, it claims a PCI-PCI Bridge Root Port. The
+kernel therefore does not load other service drivers for that Root
+Port. In other words, it is impossible to have multiple service
+drivers load and run on a PCI-PCI Bridge device simultaneously
+using the current driver model.
+
+To enable multiple service drivers running simultaneously requires
+having a PCI Express Port Bus driver, which manages all populated
+PCI Express Ports and distributes all provided service requests
+to the corresponding service drivers as required. Some key
+advantages of using the PCI Express Port Bus driver are listed below:
+
+       - Allow multiple service drivers to run simultaneously on
+         a PCI-PCI Bridge Port device.
+
+       - Allow service drivers implemented in an independent
+         staged approach.
+       
+       - Allow one service driver to run on multiple PCI-PCI Bridge
+         Port devices. 
+
+       - Manage and distribute resources of a PCI-PCI Bridge Port
+         device to requested service drivers.
+
+5. Configuring the PCI Express Port Bus Driver vs. Service Drivers
+
+5.1 Including the PCI Express Port Bus Driver Support into the Kernel
+
+Including the PCI Express Port Bus driver depends on whether the PCI
+Express support is included in the kernel config. The kernel will
+automatically include the PCI Express Port Bus driver as a kernel
+driver when the PCI Express support is enabled in the kernel.
+
+5.2 Enabling Service Driver Support
+
+PCI device drivers are implemented based on Linux Device Driver Model.
+All service drivers are PCI device drivers. As discussed above, it is
+impossible to load any service driver once the kernel has loaded the
+PCI Express Port Bus Driver. To meet the PCI Express Port Bus Driver
+Model requires some minimal changes on existing service drivers that
+imposes no impact on the functionality of existing service drivers.
+
+A service driver is required to use the two APIs shown below to
+register its service with the PCI Express Port Bus driver (see 
+section 5.2.1 & 5.2.2). It is important that a service driver
+initializes the pcie_port_service_driver data structure, included in
+header file /include/linux/pcieport_if.h, before calling these APIs.
+Failure to do so will result an identity mismatch, which prevents
+the PCI Express Port Bus driver from loading a service driver.
+
+5.2.1 pcie_port_service_register
+
+int pcie_port_service_register(struct pcie_port_service_driver *new)
+
+This API replaces the Linux Driver Model's pci_module_init API. A
+service driver should always calls pcie_port_service_register at
+module init. Note that after service driver being loaded, calls
+such as pci_enable_device(dev) and pci_set_master(dev) are no longer
+necessary since these calls are executed by the PCI Port Bus driver.
+
+5.2.2 pcie_port_service_unregister
+
+void pcie_port_service_unregister(struct pcie_port_service_driver *new)
+
+pcie_port_service_unregister replaces the Linux Driver Model's
+pci_unregister_driver. It's always called by service driver when a
+module exits.
+
+5.2.3 Sample Code
+
+Below is sample service driver code to initialize the port service
+driver data structure.
+
+static struct pcie_port_service_id service_id[] = { {
+       .vendor = PCI_ANY_ID,
+       .device = PCI_ANY_ID,
+       .port_type = PCIE_RC_PORT,
+       .service_type = PCIE_PORT_SERVICE_AER,
+       }, { /* end: all zeroes */ }
+};
+
+static struct pcie_port_service_driver root_aerdrv = {
+       .name           = (char *)device_name,
+       .id_table       = &service_id[0],
+
+       .probe          = aerdrv_load,
+       .remove         = aerdrv_unload,
+
+       .suspend        = aerdrv_suspend,
+       .resume         = aerdrv_resume,
+};
+
+Below is a sample code for registering/unregistering a service
+driver.
+
+static int __init aerdrv_service_init(void)
+{
+       int retval = 0;
+       
+       retval = pcie_port_service_register(&root_aerdrv);
+       if (!retval) {
+               /*
+                * FIX ME
+                */
+       }
+       return retval;
+}
+
+static void __exit aerdrv_service_exit(void) 
+{
+       pcie_port_service_unregister(&root_aerdrv);
+}
+
+module_init(aerdrv_service_init);
+module_exit(aerdrv_service_exit);
+
+6. Possible Resource Conflicts
+
+Since all service drivers of a PCI-PCI Bridge Port device are
+allowed to run simultaneously, below lists a few of possible resource
+conflicts with proposed solutions.
+
+6.1 MSI Vector Resource
+
+The MSI capability structure enables a device software driver to call
+pci_enable_msi to request MSI based interrupts. Once MSI interrupts
+are enabled on a device, it stays in this mode until a device driver
+calls pci_disable_msi to disable MSI interrupts and revert back to
+INTx emulation mode. Since service drivers of the same PCI-PCI Bridge
+port share the same physical device, if an individual service driver
+calls pci_enable_msi/pci_disable_msi it may result unpredictable
+behavior. For example, two service drivers run simultaneously on the
+same physical Root Port. Both service drivers call pci_enable_msi to
+request MSI based interrupts. A service driver may not know whether
+any other service drivers have run on this Root Port. If either one
+of them calls pci_disable_msi, it puts the other service driver
+in a wrong interrupt mode. 
+
+To avoid this situation all service drivers are not permitted to
+switch interrupt mode on its device. The PCI Express Port Bus driver
+is responsible for determining the interrupt mode and this should be
+transparent to service drivers. Service drivers need to know only
+the vector IRQ assigned to the field irq of struct pcie_device, which
+is passed in when the PCI Express Port Bus driver probes each service
+driver. Service drivers should use (struct pcie_device*)dev->irq to
+call request_irq/free_irq. In addition, the interrupt mode is stored
+in the field interrupt_mode of struct pcie_device.
+
+6.2 MSI-X Vector Resources
+
+Similar to the MSI a device driver for an MSI-X capable device can
+call pci_enable_msix to request MSI-X interrupts. All service drivers
+are not permitted to switch interrupt mode on its device. The PCI
+Express Port Bus driver is responsible for determining the interrupt
+mode and this should be transparent to service drivers. Any attempt
+by service driver to call pci_enable_msix/pci_disable_msix may
+result unpredictable behavior. Service drivers should use
+(struct pcie_device*)dev->irq and call request_irq/free_irq.
+
+6.3 PCI Memory/IO Mapped Regions
+
+Service drivers for PCI Express Power Management (PME), Advanced
+Error Reporting (AER), Hot-Plug (HP) and Virtual Channel (VC) access
+PCI configuration space on the PCI Express port. In all cases the
+registers accessed are independent of each other. This patch assumes
+that all service drivers will be well behaved and not overwrite
+other service driver's configuration settings.
+
+6.4 PCI Config Registers
+
+Each service driver runs its PCI config operations on its own
+capability structure except the PCI Express capability structure, in
+which Root Control register and Device Control register are shared
+between PME and AER. This patch assumes that all service drivers
+will be well behaved and not overwrite other service driver's
+configuration settings.
diff -urN linux/Documentation/devices.txt linux/Documentation/devices.txt
--- linux/Documentation/devices.txt     2004/11/15 11:49:12     1.30
+++ linux/Documentation/devices.txt     2005/01/25 04:27:51     1.31
@@ -2563,6 +2563,7 @@
                128 = /dev/usb/brlvgr0  First Braille Voyager device
                    ...
                131 = /dev/usb/brlvgr3  Fourth Braille Voyager device
+               132 = /dev/usb/idmouse  ID Mouse (fingerprint scanner) device
                144 = /dev/usb/lcd      USB LCD device
                160 = /dev/usb/legousbtower0    1st USB Legotower device
                    ...
diff -urN linux/Documentation/feature-removal-schedule.txt 
linux/Documentation/feature-removal-schedule.txt
--- linux/Documentation/feature-removal-schedule.txt    2005/01/13 14:05:14     
1.1
+++ linux/Documentation/feature-removal-schedule.txt    2005/01/25 04:27:51     
1.2
@@ -15,20 +15,3 @@
        against the LSB, and can be replaced by using udev.
 Who:   Greg Kroah-Hartman <greg@kroah.com>
 
----------------------------
-
-What:  /proc/sys/cpu/*, sysctl and /proc/cpufreq interfaces to cpufreq (2.4.x 
interfaces)
-When:  January 2005
-Files: drivers/cpufreq/: cpufreq_userspace.c, proc_intf.c
-Why:   /proc/sys/cpu/* has been deprecated since inclusion of cpufreq into
-       the main kernel tree. It bloats /proc/ unnecessarily and doesn't work
-       well with the "governor"-based design of cpufreq.
-       /proc/cpufreq/* has also been deprecated for a long time and was only
-       meant for usage during 2.5. until the new sysfs-based interface became
-       ready. It has an inconsistent interface which doesn't work well with
-       userspace setting the frequency. The output from /proc/cpufreq/* can
-       be emulated using "cpufreq-info --proc" (cpufrequtils).
-       Both interfaces are superseded by the cpufreq interface in
-       /sys/devices/system/cpu/cpu%n/cpufreq/.
-Who:   Dominik Brodowski <linux@brodo.de>
-
diff -urN linux/Documentation/kernel-parameters.txt 
linux/Documentation/kernel-parameters.txt
--- linux/Documentation/kernel-parameters.txt   2005/01/13 14:05:14     1.54
+++ linux/Documentation/kernel-parameters.txt   2005/01/25 04:27:51     1.55
@@ -673,7 +673,11 @@
 
        mac53c9x=       [HW,SCSI]
                        Format: 
<num_esps>,<disconnect>,<nosync>,<can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags>
-       
+
+       machvec=        [IA64]
+                       Force the use of a particular machine-vector (machvec) 
in a generic
+                       kernel.  Example: machvec=hpzx1_swiotlb
+
        mad16=          [HW,OSS]
                        Format: 
<io>,<irq>,<dma>,<dma16>,<mpu_io>,<mpu_irq>,<joystick>
 
diff -urN linux/Documentation/unicode.txt linux/Documentation/unicode.txt
--- linux/Documentation/unicode.txt     1998/05/07 02:55:58     1.2
+++ linux/Documentation/unicode.txt     2005/01/25 04:27:51     1.3
@@ -1,3 +1,13 @@
+                Last update: 2005-01-17, version 1.4
+
+This file is maintained by H. Peter Anvin <unicode@lanana.org> as part
+of the Linux Assigned Names And Numbers Authority (LANANA) project.
+The current version can be found at:
+
+           http://www.lanana.org/docs/unicode/unicode.txt
+
+                      ------------------------
+
 The Linux kernel code has been rewritten to use Unicode to map
 characters to fonts.  By downloading a single Unicode-to-font table,
 both the eight-bit character sets and UTF-8 mode are changed to use
@@ -18,6 +28,10 @@
 permits for example the use of block graphics even with a Latin-1 font
 loaded.
 
+Note that although these codes are similar to ISO 2022, neither the
+codes nor their uses match ISO 2022; Linux has two 8-bit codes (G0 and
+G1), whereas ISO 2022 has four 7-bit codes (G0-G3).
+
 In accordance with the Unicode standard/ISO 10646 the range U+F000 to
 U+F8FF has been reserved for OS-wide allocation (the Unicode Standard
 refers to this as a "Corporate Zone", since this is inaccurate for
@@ -26,18 +40,20 @@
 two (in case 1024- or 2048-character fonts ever become necessary).
 This leaves U+E000 to U+EFFF as End User Zone.
 
-The Unicodes in the range U+F000 to U+F1FF have been hard-coded to map
-directly to the loaded font, bypassing the translation table.  The
-user-defined map now defaults to U+F000 to U+F1FF, emulating the
-previous behaviour.  This range may expand in the future should it be
-warranted.
+[v1.2]: The Unicodes range from U+F000 and up to U+F7FF have been
+hard-coded to map directly to the loaded font, bypassing the
+translation table.  The user-defined map now defaults to U+F000 to
+U+F0FF, emulating the previous behaviour.  In practice, this range
+might be shorter; for example, vgacon can only handle 256-character
+(U+F000..U+F0FF) or 512-character (U+F000..U+F1FF) fonts.
+
 
 Actual characters assigned in the Linux Zone
 --------------------------------------------
 
-In addition, the following characters not present in Unicode 1.1.4 (at
-least, I have not found them!) have been defined; these are used by
-the DEC VT graphics map:
+In addition, the following characters not present in Unicode 1.1.4
+have been defined; these are used by the DEC VT graphics map.  [v1.2]
+THIS USE IS OBSOLETE AND SHOULD NO LONGER BE USED; PLEASE SEE BELOW.
 
 U+F800 DEC VT GRAPHICS HORIZONTAL LINE SCAN 1
 U+F801 DEC VT GRAPHICS HORIZONTAL LINE SCAN 3
@@ -48,31 +64,30 @@
 a smooth progression in the DEC VT graphics character set.  I have
 omitted the scan 5 line, since it is also used as a block-graphics
 character, and hence has been coded as U+2500 FORMS LIGHT HORIZONTAL.
-However, I left U+F802 blank should the need arise.  
+
+[v1.3]: These characters have been officially added to Unicode 3.2.0;
+they are added at U+23BA, U+23BB, U+23BC, U+23BD.  Linux now uses the
+new values.
+
+[v1.2]: The following characters have been added to represent common
+keyboard symbols that are unlikely to ever be added to Unicode proper
+since they are horribly vendor-specific.  This, of course, is an
+excellent example of horrible design.
+
+U+F810 KEYBOARD SYMBOL FLYING FLAG
+U+F811 KEYBOARD SYMBOL PULLDOWN MENU
+U+F812 KEYBOARD SYMBOL OPEN APPLE
+U+F813 KEYBOARD SYMBOL SOLID APPLE
 
 Klingon language support
 ------------------------
 
-Unfortunately, Unicode/ISO 10646 does not allocate code points for the
-language Klingon, probably fearing the potential code point explosion
-if many fictional languages were submitted for inclusion.  There are
-also political reasons (the Japanese, for example, are not too happy
-about the whole 16-bit concept to begin with.)  However, with Linux
-being a hacker-driven OS it seems this is a brilliant linguistic hack
-worth supporting.  Hence I have chosen to add it to the list in the
-Linux Zone.
-
-Several glyph forms for the Klingon alphabet have been proposed.
-However, since the set of symbols appear to be consistent throughout,
-with only the actual shapes being different, in keeping with standard
-Unicode practice these differences are considered font variants.
-
-Klingon has an alphabet of 26 characters, a positional numeric writing
-system with 10 digits, and is written left-to-right, top-to-bottom.
-Punctuation appears to be only used in Latin transliteration; it
-appears customary to write each sentence on its own line, and
-centered.  Space has been reserved for punctuation should it prove
-necessary.
+In 1996, Linux was the first operating system in the world to add
+support for the artificial language Klingon, created by Marc Okrand
+for the "Star Trek" television series. This encoding was later
+adopted by the ConScript Unicode Registry and proposed (but ultimately
+rejected) for inclusion in Unicode Plane 1.  Thus, it remains as a
+Linux/CSUR private assignment in the Linux Zone.
 
 This encoding has been endorsed by the Klingon Language Institute.
 For more information, contact them at:
@@ -84,6 +99,19 @@
 located it at the end, on a 16-cell boundary in keeping with standard
 Unicode practice.
 
+NOTE: This range is now officially managed by the ConScript Unicode
+Registry.  The normative reference is at:
+
+       http://www.evertype.com/standards/csur/klingon.html
+
+Klingon has an alphabet of 26 characters, a positional numeric writing
+system with 10 digits, and is written left-to-right, top-to-bottom.
+
+Several glyph forms for the Klingon alphabet have been proposed.
+However, since the set of symbols appear to be consistent throughout,
+with only the actual shapes being different, in keeping with standard
+Unicode practice these differences are considered font variants.
+
 U+F8D0 KLINGON LETTER A
 U+F8D1 KLINGON LETTER B
 U+F8D2 KLINGON LETTER CH
@@ -124,16 +152,24 @@
 U+F8F8 KLINGON DIGIT EIGHT
 U+F8F9 KLINGON DIGIT NINE
 
+U+F8FD KLINGON COMMA
+U+F8FE KLINGON FULL STOP
+U+F8FF KLINGON SYMBOL FOR EMPIRE
+
 Other Fictional and Artificial Scripts
 --------------------------------------
 
 Since the assignment of the Klingon Linux Unicode block, a registry of
-fictional and artificial scripts has been established by John Cowan,
-<cowan@ccil.org>.  The ConScript Unicode Registry is accessible at
-http://locke.ccil.org/~cowan/csur/; the ranges used fall at the bottom
-of the End User Zone and can hence not be normatively assigned, but it
-is recommended that people who wish to encode fictional scripts use
-these codes, in the interest of interoperability.  For Klingon, CSUR
-has adopted the Linux encoding.
-
-       H. Peter Anvin <hpa@zytor.com>
+fictional and artificial scripts has been established by John Cowan
+<jcowan@reutershealth.com> and Michael Everson <everson@evertype.com>.
+The ConScript Unicode Registry is accessible at:
+
+         http://www.evertype.com/standards/csur/
+
+The ranges used fall at the low end of the End User Zone and can hence
+not be normatively assigned, but it is recommended that people who
+wish to encode fictional scripts use these codes, in the interest of
+interoperability.  For Klingon, CSUR has adopted the Linux encoding.
+The CSUR people are driving adding Tengwar and Cirth into Unicode
+Plane 1; the addition of Klingon to Unicode Plane 1 has been rejected
+and so the above encoding remains official.
diff -urN linux/Documentation/aoe/aoe.txt linux/Documentation/aoe/aoe.txt
--- linux/Documentation/aoe/aoe.txt     2005/01/13 14:05:14     1.1
+++ linux/Documentation/aoe/aoe.txt     2005/01/25 04:27:51     1.2
@@ -33,6 +33,10 @@
   "echo > /dev/etherd/discover" tells the driver to find out what AoE
   devices are available.
 
+  These character devices may disappear and be replaced by sysfs
+  counterparts, so distribution maintainers are encouraged to create
+  scripts that use these devices.
+
   The block devices are named like this:
 
        e{shelf}.{slot}
@@ -57,19 +61,24 @@
   There is a script in this directory that formats this information
   in a convenient way.
 
-  root@makki linux# sh Documentation/aoe/status.sh 
-    device                 mac       netif           state
-      e6.0        0010040010c6        eth0              up
-      e6.1        001004001067        eth0              up
-      e6.2        001004001068        eth0              up
-      e6.3        001004001065        eth0              up
-      e6.4        001004001066        eth0              up
-      e6.5        0010040010c7        eth0              up
-      e6.6        0010040010c8        eth0              up
-      e6.7        0010040010c9        eth0              up
-      e6.8        0010040010ca        eth0              up
-      e6.9        0010040010cb        eth0              up
-      e9.0        001004000020        eth1              up
-      e9.5        001004000025        eth1              up
-      e9.9        001004000029        eth1              up
-
+  root@makki root# sh Documentation/aoe/status.sh 
+     e10.0            eth3              up
+     e10.1            eth3              up
+     e10.2            eth3              up
+     e10.3            eth3              up
+     e10.4            eth3              up
+     e10.5            eth3              up
+     e10.6            eth3              up
+     e10.7            eth3              up
+     e10.8            eth3              up
+     e10.9            eth3              up
+      e4.0            eth1              up
+      e4.1            eth1              up
+      e4.2            eth1              up
+      e4.3            eth1              up
+      e4.4            eth1              up
+      e4.5            eth1              up
+      e4.6            eth1              up
+      e4.7            eth1              up
+      e4.8            eth1              up
+      e4.9            eth1              up
diff -urN linux/Documentation/aoe/mkdevs.sh linux/Documentation/aoe/mkdevs.sh
--- linux/Documentation/aoe/mkdevs.sh   2005/01/13 14:05:14     1.1
+++ linux/Documentation/aoe/mkdevs.sh   2005/01/25 04:27:51     1.2
@@ -1,9 +1,10 @@
 #!/bin/sh
 
-n_shelves=10
+n_shelves=${n_shelves:-10}
+n_partitions=${n_partitions:-16}
 
 if test "$#" != "1"; then
-       echo "Usage: sh mkdevs.sh {dir}" 1>&2
+       echo "Usage: sh `basename $0` {dir}" 1>&2
        exit 1
 fi
 dir=$1
@@ -26,8 +27,10 @@
 rm -f $dir/interfaces
 mknod -m 0200 $dir/interfaces c $MAJOR 4
 
+export n_partitions
+mkshelf=`echo $0 | sed 's!mkdevs!mkshelf!'`
 i=0
 while test $i -lt $n_shelves; do
-       sh -xc "sh `dirname $0`/mkshelf.sh $dir $i"
+       sh -xc "sh $mkshelf $dir $i"
        i=`expr $i + 1`
 done
diff -urN linux/Documentation/aoe/mkshelf.sh linux/Documentation/aoe/mkshelf.sh
--- linux/Documentation/aoe/mkshelf.sh  2005/01/13 14:05:14     1.1
+++ linux/Documentation/aoe/mkshelf.sh  2005/01/25 04:27:51     1.2
@@ -1,18 +1,20 @@
 #! /bin/sh
 
 if test "$#" != "2"; then
-       echo "Usage: sh mkshelf.sh {dir} {shelfaddress}" 1>&2
+       echo "Usage: sh `basename $0` {dir} {shelfaddress}" 1>&2
        exit 1
 fi
+n_partitions=${n_partitions:-16}
 dir=$1
 shelf=$2
 MAJOR=152
 
 set -e
 
-minor=`echo 10 \* $shelf \* 16 | bc`
+minor=`echo 10 \* $shelf \* $n_partitions | bc`
+endp=`echo $n_partitions - 1 | bc`
 for slot in `seq 0 9`; do
-       for part in `seq 0 15`; do
+       for part in `seq 0 $endp`; do
                name=e$shelf.$slot
                test "$part" != "0" && name=${name}p$part
                rm -f $dir/$name
diff -urN linux/Documentation/aoe/status.sh linux/Documentation/aoe/status.sh
--- linux/Documentation/aoe/status.sh   2005/01/13 14:05:14     1.1
+++ linux/Documentation/aoe/status.sh   2005/01/25 04:27:51     1.2
@@ -1,15 +1,28 @@
+#! /bin/sh
 # collate and present sysfs information about AoE storage
 
 set -e
-format="%8s\t%12s\t%8s\t%8s\n"
+format="%8s\t%8s\t%8s\n"
+me=`basename $0`
 
-printf "$format" device mac netif state
+# printf "$format" device mac netif state
+
+test -z "`mount | grep sysfs`" && {
+       echo "$me Error: sysfs is not mounted" 1>&2
+       exit 1
+}
+test -z "`lsmod | grep '^aoe'`" && {
+       echo  "$me Error: aoe module is not loaded" 1>&2
+       exit 1
+}
+
+for d in `ls -d /sys/block/etherd* 2>/dev/null | grep -v p` end; do
+       # maybe ls comes up empty, so we use "end"
+       test $d = end && continue
 
-for d in `ls -d /sys/block/etherd* | grep -v p`; do
        dev=`echo "$d" | sed 's/.*!//'`
        printf "$format" \
                "$dev" \
-               "`cat \"$d/mac\"`" \
                "`cat \"$d/netif\"`" \
                "`cat \"$d/state\"`"
 done | sort
diff -urN linux/Documentation/arm/Samsung-S3C24XX/Overview.txt 
linux/Documentation/arm/Samsung-S3C24XX/Overview.txt
--- linux/Documentation/arm/Samsung-S3C24XX/Overview.txt        2004/11/15 
11:49:12     1.3
+++ linux/Documentation/arm/Samsung-S3C24XX/Overview.txt        2005/01/25 
04:27:51     1.4
@@ -45,6 +45,12 @@
     Handheld (IPAQ), available in several varieties
 
 
+  HP iPAQ rx3715
+
+    S3C2440 based IPAQ, with a number of variations depending on
+    features shipped.
+
+
 NAND
 ----
 
@@ -91,6 +97,8 @@
   Roc Wu
   Klaus Fetscher
   Dimitry Andric
+  Shannon Holland
+
 
 Document Changes
 ----------------
@@ -99,8 +107,9 @@
   05 Sep 2004 - BJD - Added Klaus Fetscher to list of contributors
   25 Oct 2004 - BJD - Added Dimitry Andric to list of contributors
   25 Oct 2004 - BJD - Updated the MTD from the 2.6.9 merge
+  21 Jan 2005 - BJD - Added rx3715, added Shannon to contributors
 
 Document Author
 ---------------
 
-Ben Dooks, (c) 2004 Simtec Electronics
+Ben Dooks, (c) 2004-2005 Simtec Electronics
diff -urN linux/Documentation/cpu-freq/index.txt 
linux/Documentation/cpu-freq/index.txt
--- linux/Documentation/cpu-freq/index.txt      2003/06/04 18:14:24     1.1
+++ linux/Documentation/cpu-freq/index.txt      2005/01/25 04:27:51     1.2
@@ -35,10 +35,10 @@
 ------------
 There is a CPU frequency changing CVS commit and general list where
 you can report bugs, problems or submit patches. To post a message,
-send an email to cpufreq@www.linux.org.uk, to subscribe go to
-http://www.linux.org.uk/mailman/listinfo/cpufreq. Previous post to the
+send an email to cpufreq@lists.linux.org.uk, to subscribe go to
+http://lists.linux.org.uk/mailman/listinfo/cpufreq. Previous post to the
 mailing list are available to subscribers at
-http://www.linux.org.uk/mailman/private/cpufreq/.
+http://lists.linux.org.uk/mailman/private/cpufreq/.
 
 
 Links
@@ -50,7 +50,7 @@
 * http://cvs.arm.linux.org.uk/
 
 the CPUFreq Mailing list:
-* http://www.linux.org.uk/mailman/listinfo/cpufreq
+* http://lists.linux.org.uk/mailman/listinfo/cpufreq
 
 Clock and voltage scaling for the SA-1100:
 * http://www.lart.tudelft.nl/projects/scaling
diff -urN linux/Documentation/filesystems/Locking 
linux/Documentation/filesystems/Locking
--- linux/Documentation/filesystems/Locking     2004/11/15 11:49:12     1.35
+++ linux/Documentation/filesystems/Locking     2005/01/25 04:27:51     1.36
@@ -350,6 +350,8 @@
        unsigned int (*poll) (struct file *, struct poll_table_struct *);
        int (*ioctl) (struct inode *, struct file *, unsigned int,
                        unsigned long);
+       long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
+       long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
        int (*mmap) (struct file *, struct vm_area_struct *);
        int (*open) (struct inode *, struct file *);
        int (*flush) (struct file *);
@@ -383,6 +385,8 @@
 readdir:               no
 poll:                  no
 ioctl:                 yes     (see below)
+unlocked_ioctl:                no      (see below)
+compat_ioctl:          no
 mmap:                  no
 open:                  maybe   (see below)
 flush:                 no
@@ -428,6 +432,9 @@
 anything that resembles union-mount we won't have a struct file for all
 components. And there are other reasons why the current interface is a mess...
 
+->ioctl() on regular files is superceded by the ->unlocked_ioctl() that
+doesn't take the BKL.
+
 ->read on directories probably must go away - we should just enforce -EISDIR
 in sys_read() and friends.
 
diff -urN linux/Documentation/infiniband/sysfs.txt 
linux/Documentation/infiniband/sysfs.txt
--- linux/Documentation/infiniband/sysfs.txt    2005/01/13 14:05:16     1.1
+++ linux/Documentation/infiniband/sysfs.txt    2005/01/25 04:27:51     1.2
@@ -3,6 +3,7 @@
   For each InfiniBand device, the InfiniBand drivers create the
   following files under /sys/class/infiniband/<device name>:
 
+    node_type      - Node type (CA, switch or router)
     node_guid      - Node GUID
     sys_image_guid - System image GUID
 
@@ -25,6 +26,7 @@
     sm_lid         - Subnet manager LID for port's subnet
     sm_sl          - Subnet manager SL for port's subnet
     state          - Port state (DOWN, INIT, ARMED, ACTIVE or ACTIVE_DEFER)
+    phys_state     - Port physical state (Sleep, Polling, LinkUp, etc)
 
   There is also a "counters" subdirectory, with files
 
diff -urN linux/Documentation/networking/netdevices.txt 
linux/Documentation/networking/netdevices.txt
--- linux/Documentation/networking/netdevices.txt       2004/09/19 12:30:01     
1.5
+++ linux/Documentation/networking/netdevices.txt       2005/01/25 04:27:51     
1.6
@@ -45,10 +45,9 @@
        Synchronization: dev->xmit_lock spinlock.
        When the driver sets NETIF_F_LLTX in dev->features this will be
        called without holding xmit_lock. In this case the driver 
-       has to lock by itself when needed. It is recommended to use a try lock
-       for this and return -1 when the spin lock fails. 
-       The locking there should also properly protect against 
-       set_multicast_list
+       has to execute it's transmission routine in a completely lockless
+       manner.  It is recommended only for queueless devices such
+       loopback and tunnels.
        Context: BHs disabled
        Notes: netif_queue_stopped() is guaranteed false
        Return codes: 
@@ -56,8 +55,6 @@
        o NETDEV_TX_BUSY Cannot transmit packet, try later 
          Usually a bug, means queue start/stop flow control is broken in
          the driver. Note: the driver must NOT put the skb in its DMA ring.
-       o NETDEV_TX_LOCKED Locking failed, please retry quickly.
-         Only valid when NETIF_F_LLTX is set.
 
 dev->tx_timeout:
        Synchronization: dev->xmit_lock spinlock.
diff -urN linux/Documentation/networking/pktgen.txt 
linux/Documentation/networking/pktgen.txt
--- linux/Documentation/networking/pktgen.txt   2004/06/29 20:41:55     1.3
+++ linux/Documentation/networking/pktgen.txt   2005/01/25 04:27:51     1.4
@@ -1,77 +1,214 @@
-How to use the Linux packet generator module.
 
-1. Enable CONFIG_NET_PKTGEN to compile and build pktgen.o, install it
-   in the place where insmod may find it.
-2. Cut script "ipg" (see below).
-3. Edit script to set preferred device and destination IP address.
-3a.  Create more scripts for different interfaces.  Up to thirty-two
-     pktgen processes can be configured and run at once by using the
-     32 /proc/net/pktgen/pg* files.
-4. Run in shell: ". ipg"
-5. After this two commands are defined:
-   A. "pg" to start generator and to get results.
-   B. "pgset" to change generator parameters. F.e.
-      pgset "clone_skb 100"   sets the number of copies of the same packet 
-                              will be sent before a new packet is allocated
-      pgset "clone_skb 0"     use multiple SKBs for packet generation
-      pgset "pkt_size 9014"   sets packet size to 9014
-      pgset "frags 5"         packet will consist of 5 fragments
-      pgset "count 200000"    sets number of packets to send, set to zero
-                              for continuous sends until explicitly
-                              stopped.
-      pgset "ipg 5000"        sets artificial gap inserted between packets
-                              to 5000 nanoseconds
-      pgset "dst 10.0.0.1"    sets IP destination address
-                              (BEWARE! This generator is very aggressive!)
-      pgset "dst_min 10.0.0.1"            Same as dst
-      pgset "dst_max 10.0.0.254"          Set the maximum destination IP.
-      pgset "src_min 10.0.0.1"            Set the minimum (or only) source IP.
-      pgset "src_max 10.0.0.254"          Set the maximum source IP.
-      pgset "dstmac 00:00:00:00:00:00"    sets MAC destination address
-      pgset "srcmac 00:00:00:00:00:00"    sets MAC source address
-      pgset "src_mac_count 1" Sets the number of MACs we'll range through.  The
-                              'minimum' MAC is what you set with srcmac.
-      pgset "dst_mac_count 1" Sets the number of MACs we'll range through.  The
-                              'minimum' MAC is what you set with dstmac.
-      pgset "flag [name]"     Set a flag to determine behaviour.  Current flags
-                              are: IPSRC_RND #IP Source is random (between 
min/max),
-                                   IPDST_RND, UDPSRC_RND,
-                                   UDPDST_RND, MACSRC_RND, MACDST_RND 
-      pgset "udp_src_min 9"   set UDP source port min, If < udp_src_max, then
-                              cycle through the port range.
-      pgset "udp_src_max 9"   set UDP source port max.
-      pgset "udp_dst_min 9"   set UDP destination port min, If < udp_dst_max, 
then
-                              cycle through the port range.
-      pgset "udp_dst_max 9"   set UDP destination port max.
-      pgset stop             aborts injection
-      
-  Also, ^C aborts generator.
-
----- cut here
-
-#! /bin/sh
-
-modprobe pktgen
-
-PGDEV=/proc/net/pktgen/pg0
-
-function pgset() {
-    local result
-
-    echo $1 > $PGDEV
-
-    result=`cat $PGDEV | fgrep "Result: OK:"`
-    if [ "$result" = "" ]; then
-         cat $PGDEV | fgrep Result:
-    fi
-}
-
-function pg() {
-    echo inject > $PGDEV
-    cat $PGDEV
-}
 
-pgset "odev eth0"
-pgset "dst 0.0.0.0"
+                  HOWTO for the linux packet generator 
+                  ------------------------------------
 
----- cut here
+Date: 041221
+
+Enable CONFIG_NET_PKTGEN to compile and build pktgen.o either in kernel
+or as module. Module is preferred. insmod pktgen if needed. Once running
+pktgen creates a thread on each CPU where each thread has affinty it's CPU.
+Monitoring and controlling is done via /proc. Easiest to select a suitable 
+a sample script and configure.
+
+On a dual CPU:
+
+ps aux | grep pkt
+root       129  0.3  0.0     0    0 ?        SW    2003 523:20 [pktgen/0]
+root       130  0.3  0.0     0    0 ?        SW    2003 509:50 [pktgen/1]
+
+
+For montoring and control pktgen creates:
+       /proc/net/pktgen/pgctrl
+       /proc/net/pktgen/kpktgend_X
+        /proc/net/pktgen/ethX
+
+
+Viewing threads
+===============
+/proc/net/pktgen/kpktgend_0 
+Name: kpktgend_0  max_before_softirq: 10000
+Running: 
+Stopped: eth1 
+Result: OK: max_before_softirq=10000
+
+Most important the devices assigend to thread. Note! A device can only belong 
+to one thread.
+
+
+Viewing devices
+===============
+
+Parm section holds configured info. Current hold running stats. 
+Result is printed after run or after interruption. Example:
+
+/proc/net/pktgen/eth1       
+
+Params: count 10000000  min_pkt_size: 60  max_pkt_size: 60
+     frags: 0  delay: 0  clone_skb: 1000000  ifname: eth1
+     flows: 0 flowlen: 0
+     dst_min: 10.10.11.2  dst_max: 
+     src_min:   src_max: 
+     src_mac: 00:00:00:00:00:00  dst_mac: 00:04:23:AC:FD:82
+     udp_src_min: 9  udp_src_max: 9  udp_dst_min: 9  udp_dst_max: 9
+     src_mac_count: 0  dst_mac_count: 0 
+     Flags: 
+Current:
+     pkts-sofar: 10000000  errors: 39664
+     started: 1103053986245187us  stopped: 1103053999346329us idle: 880401us
+     seq_num: 10000011  cur_dst_mac_offset: 0  cur_src_mac_offset: 0
+     cur_saddr: 0x10a0a0a  cur_daddr: 0x20b0a0a
+     cur_udp_dst: 9  cur_udp_src: 9
+     flows: 0
+Result: OK: 13101142(c12220741+d880401) usec, 10000000 (60byte,0frags)
+  763292pps 390Mb/sec (390805504bps) errors: 39664
+
+Confguring threads and devices
+==============================
+This is done via the /proc interface easiest done via pgset in the scripts
+
+Examples:
+
+ pgset "clone_skb 1"     sets the number of copies of the same packet
+ pgset "clone_skb 0"     use single SKB for all transmits
+ pgset "pkt_size 9014"   sets packet size to 9014
+ pgset "frags 5"         packet will consist of 5 fragments
+ pgset "count 200000"    sets number of packets to send, set to zero
+                         for continious sends untill explicitl stopped.
+
+ pgset "delay 5000"      adds delay to hard_start_xmit(). nanoseconds
+
+ pgset "dst 10.0.0.1"    sets IP destination address
+                         (BEWARE! This generator is very aggressive!)
+
+ pgset "dst_min 10.0.0.1"            Same as dst
+ pgset "dst_max 10.0.0.254"          Set the maximum destination IP.
+ pgset "src_min 10.0.0.1"            Set the minimum (or only) source IP.
+ pgset "src_max 10.0.0.254"          Set the maximum source IP.
+ pgset "dst6 fec0::1"     IPV6 destination address
+ pgset "src6 fec0::2"     IPV6 source address
+ pgset "dstmac 00:00:00:00:00:00"    sets MAC destination address
+ pgset "srcmac 00:00:00:00:00:00"    sets MAC source address
+
+ pgset "src_mac_count 1" Sets the number of MACs we'll range through.  
+                         The 'minimum' MAC is what you set with srcmac.
+
+ pgset "dst_mac_count 1" Sets the number of MACs we'll range through.
+                         The 'minimum' MAC is what you set with dstmac.
+
+ pgset "flag [name]"     Set a flag to determine behaviour.  Current flags
+                         are: IPSRC_RND #IP Source is random (between min/max),
+                              IPDST_RND, UDPSRC_RND,
+                              UDPDST_RND, MACSRC_RND, MACDST_RND 
+
+ pgset "udp_src_min 9"   set UDP source port min, If < udp_src_max, then
+                         cycle through the port range.
+
+ pgset "udp_src_max 9"   set UDP source port max.
+ pgset "udp_dst_min 9"   set UDP destination port min, If < udp_dst_max, then
+                         cycle through the port range.
+ pgset "udp_dst_max 9"   set UDP destination port max.
+
+ pgset stop                      aborts injection. Also, ^C aborts generator.
+
+
+Example scripts
+===============
+
+A collection of small tutorial scripts for pktgen is in expamples dir.
+
+pktgen.conf-1-1                  # 1 CPU 1 dev 
+pktgen.conf-1-2                  # 1 CPU 2 dev
+pktgen.conf-2-1                  # 2 CPU's 1 dev 
+pktgen.conf-2-2                  # 2 CPU's 2 dev
+pktgen.conf-1-1-rdos             # 1 CPU 1 dev w. route DoS 
+pktgen.conf-1-1-ip6              # 1 CPU 1 dev ipv6
+pktgen.conf-1-1-ip6-rdos         # 1 CPU 1 dev ipv6  w. route DoS
+pktgen.conf-1-1-flows            # 1 CPU 1 dev multiple flows.
+
+Run in shell: ./pktgen.conf-X-Y It does all the setup including sending. 
+
+
+Interrupt affinity
+===================
+Note when adding devices to a specific CPU there good idea to also assign 
+/proc/irq/XX/smp_affinity so the TX-interrupts gets bound to the same CPU.
+as this reduces cache bouncing when freeing skb's.
+
+
+Current commands and configuration options
+==========================================
+
+** Pgcontrol commands:
+
+start
+stop
+
+** Thread commands:
+
+add_device
+rem_device_all
+max_before_softirq
+
+
+** Device commands:
+
+count
+clone_skb
+debug
+
+frags
+delay
+
+src_mac_count
+dst_mac_count
+
+pkt_size 
+min_pkt_size
+max_pkt_size
+
+udp_src_min
+udp_src_max
+
+udp_dst_min
+udp_dst_max
+
+flag
+  IPSRC_RND
+  TXSIZE_RND
+  IPDST_RND
+  UDPSRC_RND
+  UDPDST_RND
+  MACSRC_RND
+  MACDST_RND
+
+dst_min
+dst_max
+
+src_min
+src_max
+
+dst_mac
+src_mac
+
+clear_counters
+
+dst6
+src6
+
+flows
+flowlen
+
+References:
+ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/
+ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/
+
+Paper from Linux-Kongress in Erlangen 2004.
+ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/pktgen_paper.pdf
+
+Thanks to:
+Grant Grundler for testing on IA-64 and parisc, Harald Welte,  Lennert 
Buytenhek
+Stephen Hemminger, Andi Kleen, Dave Miller and many others.
+
+
+Good luck with the linux net-development.
\ No newline at end of file
diff -urN linux/Documentation/power/devices.txt 
linux/Documentation/power/devices.txt
--- linux/Documentation/power/devices.txt       2005/01/13 14:05:16     1.2
+++ linux/Documentation/power/devices.txt       2005/01/25 04:27:51     1.3
@@ -229,3 +229,91 @@
 The driver core will not call any extra functions when binding the
 device to the driver. 
 
+pm_message_t meaning
+
+pm_message_t has two fields. event ("major"), and flags.  If driver
+does not know event code, it aborts the request, returning error. Some
+drivers may need to deal with special cases based on the actual type
+of suspend operation being done at the system level. This is why
+there are flags.
+
+Event codes are:
+
+ON -- no need to do anything except special cases like broken
+HW.
+
+# NOTIFICATION -- pretty much same as ON?
+
+FREEZE -- stop DMA and interrupts, and be prepared to reinit HW from
+scratch. That probably means stop accepting upstream requests, the
+actual policy of what to do with them being specific to a given
+driver. It's acceptable for a network driver to just drop packets
+while a block driver is expected to block the queue so no request is
+lost. (Use IDE as an example on how to do that). FREEZE requires no
+power state change, and it's expected for drivers to be able to
+quickly transition back to operating state.
+
+SUSPEND -- like FREEZE, but also put hardware into low-power state. If
+there's need to distinguish several levels of sleep, additional flag
+is probably best way to do that.
+
+Transitions are only from a resumed state to a suspended state, never
+between 2 suspended states. (ON -> FREEZE or ON -> SUSPEND can happen,
+FREEZE -> SUSPEND or SUSPEND -> FREEZE can not).
+
+All events are:
+
+[NOTE NOTE NOTE: If you are driver author, you should not care; you
+should only look at event, and ignore flags.]
+
+#Prepare for suspend -- userland is still running but we are going to
+#enter suspend state. This gives drivers chance to load firmware from
+#disk and store it in memory, or do other activities taht require
+#operating userland, ability to kmalloc GFP_KERNEL, etc... All of these
+#are forbiden once the suspend dance is started.. event = ON, flags =
+#PREPARE_TO_SUSPEND
+
+Apm standby -- prepare for APM event. Quiesce devices to make life
+easier for APM BIOS. event = FREEZE, flags = APM_STANDBY
+
+Apm suspend -- same as APM_STANDBY, but it we should probably avoid
+spinning down disks. event = FREEZE, flags = APM_SUSPEND
+
+System halt, reboot -- quiesce devices to make life easier for BIOS. event
+= FREEZE, flags = SYSTEM_HALT or SYSTEM_REBOOT
+
+System shutdown -- at least disks need to be spun down, or data may be
+lost. Quiesce devices, just to make life easier for BIOS. event =
+FREEZE, flags = SYSTEM_SHUTDOWN
+
+Kexec    -- turn off DMAs and put hardware into some state where new
+kernel can take over. event = FREEZE, flags = KEXEC
+
+Powerdown at end of swsusp -- very similar to SYSTEM_SHUTDOWN, except wake
+may need to be enabled on some devices. This actually has at least 3
+subtypes, system can reboot, enter S4 and enter S5 at the end of
+swsusp. event = FREEZE, flags = SWSUSP and one of SYSTEM_REBOOT,
+SYSTEM_SHUTDOWN, SYSTEM_S4
+
+Suspend to ram  -- put devices into low power state. event = SUSPEND,
+flags = SUSPEND_TO_RAM
+
+Freeze for swsusp snapshot -- stop DMA and interrupts. No need to put
+devices into low power mode, but you must be able to reinitialize
+device from scratch in resume method. This has two flavors, its done
+once on suspending kernel, once on resuming kernel. event = FREEZE,
+flags = DURING_SUSPEND or DURING_RESUME
+
+Device detach requested from /sys -- deinitialize device; proably same as
+SYSTEM_SHUTDOWN, I do not understand this one too much. probably event
+= FREEZE, flags = DEV_DETACH.
+
+#These are not really events sent:
+#
+#System fully on -- device is working normally; this is probably never
+#passed to suspend() method... event = ON, flags = 0
+#
+#Ready after resume -- userland is now running, again. Time to free any
+#memory you ate during prepare to suspend... event = ON, flags =
+#READY_AFTER_RESUME
+#
diff -urN linux/Documentation/power/swsusp.txt 
linux/Documentation/power/swsusp.txt
--- linux/Documentation/power/swsusp.txt        2004/10/25 20:44:09     1.7
+++ linux/Documentation/power/swsusp.txt        2005/01/25 04:27:51     1.8
@@ -15,6 +15,9 @@
  * If you change kernel command line between suspend and resume...
  *                             ...prepare for nasty fsck or worse.
  *
+ * If you change your hardware while system is suspended...
+ *                             ...well, it was not good idea.
+ *
  * (*) suspend/resume support is needed to make it safe.
 
 You need to append resume=/dev/your_swap_partition to kernel command
@@ -183,3 +186,50 @@
 
 "platform" is actually right thing to do, but "shutdown" is most
 reliable.
+
+Q: I do not understand why you have such strong objections to idea of
+selective suspend.
+
+A: Do selective suspend during runtime power managment, that's okay. But
+its useless for suspend-to-disk. (And I do not see how you could use
+it for suspend-to-ram, I hope you do not want that).
+
+Lets see, so you suggest to
+
+* SUSPEND all but swap device and parents
+* Snapshot
+* Write image to disk
+* SUSPEND swap device and parents
+* Powerdown
+
+Oh no, that does not work, if swap device or its parents uses DMA,
+you've corrupted data. You'd have to do
+
+* SUSPEND all but swap device and parents
+* FREEZE swap device and parents
+* Snapshot
+* UNFREEZE swap device and parents
+* Write
+* SUSPEND swap device and parents
+
+Which means that you still need that FREEZE state, and you get more
+complicated code. (And I have not yet introduce details like system
+devices).
+
+Q: There don't seem to be any generally useful behavioral
+distinctions between SUSPEND and FREEZE.
+
+A: Doing SUSPEND when you are asked to do FREEZE is always correct,
+but it may be unneccessarily slow. If you want USB to stay simple,
+slowness may not matter to you. It can always be fixed later.
+
+For devices like disk it does matter, you do not want to spindown for
+FREEZE.
+
+Q: After resuming, system is paging heavilly, leading to very bad 
interactivity.
+
+A: Try running
+
+cat `cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u` > /dev/null
+
+after resume. swapoff -a; swapon -a may also be usefull.
diff -urN linux/Documentation/powerpc/eeh-pci-error-recovery.txt 
linux/Documentation/powerpc/eeh-pci-error-recovery.txt
--- linux/Documentation/powerpc/eeh-pci-error-recovery.txt      1970/01/01 
00:00:00
+++ linux/Documentation/powerpc/eeh-pci-error-recovery.txt      Tue Jan 25 
04:27:51 2005        1.1
@@ -0,0 +1,332 @@
+
+
+                      PCI Bus EEH Error Recovery
+                      --------------------------
+                           Linas Vepstas
+                       <linas@austin.ibm.com>
+                          12 January 2005
+
+
+Overview:
+---------
+The IBM POWER-based pSeries and iSeries computers include PCI bus
+controller chips that have extended capabilities for detecting and
+reporting a large variety of PCI bus error conditions.  These features
+go under the name of "EEH", for "Extended Error Handling".  The EEH
+hardware features allow PCI bus errors to be cleared and a PCI
+card to be "rebooted", without also having to reboot the operating
+system.
+
+This is in contrast to traditional PCI error handling, where the
+PCI chip is wired directly to the CPU, and an error would cause
+a CPU machine-check/check-stop condition, halting the CPU entirely.
+Another "traditional" technique is to ignore such errors, which
+can lead to data corruption, both of user data or of kernel data,
+hung/unresponsive adapters, or system crashes/lockups.  Thus,
+the idea behind EEH is that the operating system can become more
+reliable and robust by protecting it from PCI errors, and giving
+the OS the ability to "reboot"/recover individual PCI devices.
+
+Future systems from other vendors, based on the PCI-E specification,
+may contain similar features.
+
+
+Causes of EEH Errors
+--------------------
+EEH was originally designed to guard against hardware failure, such
+as PCI cards dying from heat, humidity, dust, vibration and bad
+electrical connections. The vast majority of EEH errors seen in
+"real life" are due to eithr poorly seated PCI cards, or,
+unfortunately quite commonly, due device driver bugs, device firmware
+bugs, and sometimes PCI card hardware bugs.
+
+The most common software bug, is one that causes the device to
+attempt to DMA to a location in system memory that has not been
+reserved for DMA access for that card.  This is a powerful feature,
+as it prevents what; otherwise, would have been silent memory
+corruption caused by the bad DMA.  A number of device driver
+bugs have been found and fixed in this way over the past few
+years.  Other possible causes of EEH errors include data or
+address line parity errors (for example, due to poor electrical
+connectivity due to a poorly seated card), and PCI-X split-completion
+errors (due to software, device firmware, or device PCI hardware bugs).
+The vast majority of "true hardware failures" can be cured by
+physically removing and re-seating the PCI card.
+
+
+Detection and Recovery
+----------------------
+In the following discussion, a generic overview of how to detect
+and recover from EEH errors will be presented. This is followed
+by an overview of how the current implementation in the Linux
+kernel does it.  The actual implementation is subject to change,
+and some of the finer points are still being debated.  These
+may in turn be swayed if or when other architectures implement
+similar functionality.
+
+When a PCI Host Bridge (PHB, the bus controller connecting the
+PCI bus to the system CPU electronics complex) detects a PCI error
+condition, it will "isolate" the affected PCI card.  Isolation
+will block all writes (either to the card from the system, or
+from the card to the system), and it will cause all reads to
+return all-ff's (0xff, 0xffff, 0xffffffff for 8/16/32-bit reads).
+This value was chosen because it is the same value you would
+get if the device was physically unplugged from the slot.
+This includes access to PCI memory, I/O space, and PCI config
+space.  Interrupts; however, will continued to be delivered.
+
+Detection and recovery are performed with the aid of ppc64
+firmware.  The programming interfaces in the Linux kernel
+into the firmware are referred to as RTAS (Run-Time Abstraction
+Services).  The Linux kernel does not (should not) access
+the EEH function in the PCI chipsets directly, primarily because
+there are a number of different chipsets out there, each with
+different interfaces and quirks. The firmware provides a
+uniform abstraction layer that will work with all pSeries
+and iSeries hardware (and be forwards-compatible).
+
+If the OS or device driver suspects that a PCI slot has been
+EEH-isolated, there is a firmware call it can make to determine if
+this is the case. If so, then the device driver should put itself
+into a consistent state (given that it won't be able to complete any
+pending work) and start recovery of the card.  Recovery normally
+would consist of reseting the PCI device (holding the PCI #RST
+line high for two seconds), followed by setting up the device
+config space (the base address registers (BAR's), latency timer,
+cache line size, interrupt line, and so on).  This is followed by a
+reinitialization of the device driver.  In a worst-case scenario,
+the power to the card can be toggled, at least on hot-plug-capable
+slots.  In principle, layers far above the device driver probably
+do not need to know that the PCI card has been "rebooted" in this
+way; ideally, there should be at most a pause in Ethernet/disk/USB
+I/O while the card is being reset.
+
+If the card cannot be recovered after three or four resets, the
+kernel/device driver should assume the worst-case scenario, that the
+card has died completely, and report this error to the sysadmin.
+In addition, error messages are reported through RTAS and also through
+syslogd (/var/log/messages) to alert the sysadmin of PCI resets.
+The correct way to deal with failed adapters is to use the standard
+PCI hotplug tools to remove and replace the dead card.
+
+
+Current PPC64 Linux EEH Implementation
+--------------------------------------
+At this time, a generic EEH recovery mechanism has been implemented,
+so that individual device drivers do not need to be modified to support
+EEH recovery.  This generic mechanism piggy-backs on the PCI hotplug
+infrastructure,  and percolates events up through the hotplug/udev
+infrastructure.  Followiing is a detailed description of how this is
+accomplished.
+
+EEH must be enabled in the PHB's very early during the boot process,
+and if a PCI slot is hot-plugged. The former is performed by
+eeh_init() in arch/ppc64/kernel/eeh.c, and the later by
+drivers/pci/hotplug/pSeries_pci.c calling in to the eeh.c code.
+EEH must be enabled before a PCI scan of the device can proceed.
+Current Power5 hardware will not work unless EEH is enabled;
+although older Power4 can run with it disabled.  Effectively,
+EEH can no longer be turned off.  PCI devices *must* be
+registered with the EEH code; the EEH code needs to know about
+the I/O address ranges of the PCI device in order to detect an
+error.  Given an arbitrary address, the routine
+pci_get_device_by_addr() will find the pci device associated
+with that address (if any).
+
+The default include/asm-ppc64/io.h macros readb(), inb(), insb(),
+etc. include a check to see if the the i/o read returned all-0xff's.
+If so, these make a call to eeh_dn_check_failure(), which in turn
+asks the firmware if the all-ff's value is the sign of a true EEH
+error.  If it is not, processing continues as normal.  The grand
+total number of these false alarms or "false positives" can be
+seen in /proc/ppc64/eeh (subject to change).  Normally, almost
+all of these occur during boot, when the PCI bus is scanned, where
+a large number of 0xff reads are part of the bus scan procedure.
+
+If a frozen slot is detected, code in arch/ppc64/kernel/eeh.c will
+print a stack trace to syslog (/var/log/messages).  This stack trace
+has proven to be very useful to device-driver authors for finding
+out at what point the EEH error was detected, as the error itself
+usually occurs slightly beforehand.
+
+Next, it uses the Linux kernel notifier chain/work queue mechanism to
+allow any interested parties to find out about the failure.  Device
+drivers, or other parts of the kernel, can use
+eeh_register_notifier(struct notifier_block *) to find out about EEH
+events.  The event will include a pointer to the pci device, the
+device node and some state info.  Receivers of the event can "do as
+they wish"; the default handler will be described further in this
+section.
+
+To assist in the recovery of the device, eeh.c exports the
+following functions:
+
+rtas_set_slot_reset() -- assert the  PCI #RST line for 1/8th of a second
+rtas_configure_bridge() -- ask firmware to configure any PCI bridges
+   located topologically under the pci slot.
+eeh_save_bars() and eeh_restore_bars(): save and restore the PCI
+   config-space info for a device and any devices under it.
+
+
+A handler for the EEH notifier_block events is implemented in
+drivers/pci/hotplug/pSeries_pci.c, called handle_eeh_events().
+It saves the device BAR's and then calls rpaphp_unconfig_pci_adapter().
+This last call causes the device driver for the card to be stopped,
+which causes hotplug events to go out to user space. This triggers
+user-space scripts that might issue commands such as "ifdown eth0"
+for ethernet cards, and so on.  This handler then sleeps for 5 seconds,
+hoping to give the user-space scripts enough time to complete.
+It then resets the PCI card, reconfigures the device BAR's, and
+any bridges underneath. It then calls rpaphp_enable_pci_slot(),
+which restarts the device driver and triggers more user-space
+events (for example, calling "ifup eth0" for ethernet cards).
+
+
+Device Shutdown and User-Space Events
+-------------------------------------
+This section documents what happens when a pci slot is unconfigured,
+focusing on how the device driver gets shut down, and on how the
+events get delivered to user-space scripts.
+
+Following is an example sequence of events that cause a device driver
+close function to be called during the first phase of an EEH reset.
+The following sequence is an example of the pcnet32 device driver.
+
+    rpa_php_unconfig_pci_adapter (struct slot *)  // in rpaphp_pci.c
+    {
+      calls
+      pci_remove_bus_device (struct pci_dev *) // in /drivers/pci/remove.c
+      {
+        calls
+        pci_destroy_dev (struct pci_dev *)
+        {
+          calls
+          device_unregister (&dev->dev) // in /drivers/base/core.c
+          {
+            calls
+            device_del (struct device *)
+            {
+              calls
+              bus_remove_device() // in /drivers/base/bus.c
+              {
+                calls
+                device_release_driver()
+                {
+                  calls
+                  struct device_driver->remove() which is just
+                  pci_device_remove()  // in /drivers/pci/pci_driver.c
+                  {
+                    calls
+                    struct pci_driver->remove() which is just
+                    pcnet32_remove_one() // in /drivers/net/pcnet32.c
+                    {
+                      calls
+                      unregister_netdev() // in /net/core/dev.c
+                      {
+                        calls
+                        dev_close()  // in /net/core/dev.c
+                        {
+                           calls dev->stop();
+                           which is just pcnet32_close() // in pcnet32.c
+                           {
+                             which does what you wanted
+                             to stop the device
+                           }
+                        }
+                     }
+                   which
+                   frees pcnet32 device driver memory
+                }
+     }}}}}}
+
+
+    in drivers/pci/pci_driver.c,
+    struct device_driver->remove() is just pci_device_remove()
+    which calls struct pci_driver->remove() which is pcnet32_remove_one()
+    which calls unregister_netdev()  (in net/core/dev.c)
+    which calls dev_close()  (in net/core/dev.c)
+    which calls dev->stop() which is pcnet32_close()
+    which then does the appropriate shutdown.
+
+---
+Following is the analogous stack trace for events sent to user-space
+when the pci device is unconfigured.
+
+rpa_php_unconfig_pci_adapter() {             // in rpaphp_pci.c
+  calls
+  pci_remove_bus_device (struct pci_dev *) { // in /drivers/pci/remove.c
+    calls
+    pci_destroy_dev (struct pci_dev *) {
+      calls
+      device_unregister (&dev->dev) {      // in /drivers/base/core.c
+        calls
+        device_del(struct device * dev) {  // in /drivers/base/core.c
+          calls
+          kobject_del() {                  //in /libs/kobject.c
+            calls
+            kobject_hotplug() {            // in /libs/kobject.c
+              calls
+              kset_hotplug() {             // in /lib/kobject.c
+                calls
+                kset->hotplug_ops->hotplug() which is really just
+                a call to
+                dev_hotplug() {           // in /drivers/base/core.c
+                  calls
+                  dev->bus->hotplug() which is really just a call to
+                  pci_hotplug () {      // in drivers/pci/hotplug.c
+                    which prints device name, etc....
+                 }
+               }
+               then kset_hotplug() calls
+                call_usermodehelper () with
+                   argv[0]=hotplug_path[] which is "/sbin/hotplug"
+             --> event to userspace,
+           }
+         }
+         kobject_del() then calls sysfs_remove_dir(), which would
+         trigger any user-space daemon that was watching /sysfs,
+         and notice the delete event.
+
+
+Pro's and Con's of the Current Design
+-------------------------------------
+There are several issues with the current EEH software recovery design,
+which may be addressed in future revisions.  But first, note that the
+big plus of the current design is that no changes need to be made to
+individual device drivers, so that the current design throws a wide net.
+The biggest negative of the design is that it potentially disturbs
+network daemons and file systems that didn't need to be disturbed.
+
+-- A minor complaint is that resetting the network card causes
+   user-space back-to-back ifdown/ifup burps that potentially disturb
+   network daemons, that didn't need to even know that the pci
+   card was being rebooted.
+
+-- A more serious concern is that the same reset, for SCSI devices,
+   causes havoc to mounted file systems.  Scripts cannot post-facto
+   unmount a file system without flushing pending buffers, but this
+   is impossible, because I/O has already been stopped.  Thus,
+   ideally, the reset should happen at or below the block layer,
+   so that the file systems are not disturbed.
+
+   Reiserfs does not tolerate errors returned from the block device.
+   Ext3fs seems to be tolerant, retrying reads/writes until it does
+   succeed. Both have been only lightly tested in this scenario.
+
+   The SCSI-generic subsystem already has built-in code for performing
+   SCSI device resets, SCSI bus resets, and SCSI host-bus-adapter
+   (HBA) resets.  These are cascaded into a chain of attempted
+   resets if a SCSI command fails. These are completely hidden
+   from the block layer.  It would be very natural to add an EEH
+   reset into this chain of events.
+
+-- If a SCSI error occurs for the root device, all is lost unless
+   the sysadmin had the foresight to run /bin, /sbin, /etc, /var
+   and so on, out of ramdisk/tmpfs.
+
+
+Conclusions
+-----------
+There's forward progress ...
+
+
diff -urN linux/Documentation/serial/driver linux/Documentation/serial/driver
--- linux/Documentation/serial/driver   2003/06/03 13:41:35     1.4
+++ linux/Documentation/serial/driver   2005/01/25 04:27:51     1.5
@@ -211,18 +211,25 @@
        Yes             1       1       character received, marked as
                                        TTY_PARITY
 
+       Other flags may be used (eg, xon/xoff characters) if your
+       hardware supports hardware "soft" flow control.
+
        Locking: none.
        Interrupts: caller dependent.
        This call must not sleep
 
   pm(port,state,oldstate)
-       perform any power management related activities on the specified
-       port.  state indicates the new state (defined by ACPI D0-D3),
+       Perform any power management related activities on the specified
+       port.  State indicates the new state (defined by ACPI D0-D3),
        oldstate indicates the previous state.  Essentially, D0 means
        fully on, D3 means powered down.
 
        This function should not be used to grab any resources.
 
+       This will be called when the port is initially opened and finally
+       closed, except when the port is also the system console.  This
+       will occur even if CONFIG_PM is not set.
+
        Locking: none.
        Interrupts: caller dependent.
 
diff -urN linux/Documentation/sound/alsa/ALSA-Configuration.txt 
linux/Documentation/sound/alsa/ALSA-Configuration.txt
--- linux/Documentation/sound/alsa/ALSA-Configuration.txt       2005/01/13 
14:05:16     1.15
+++ linux/Documentation/sound/alsa/ALSA-Configuration.txt       2005/01/25 
04:27:51     1.16
@@ -184,6 +184,8 @@
     Module for ATI IXP 150/200/250 AC97 controllers.
 
     ac97_clock         - AC'97 clock (defalut = 48000)
+    ac97_quirk         - AC'97 workaround for strange hardware
+                         See the description of intel8x0 module for details.
     spdif_aclink       - S/PDIF transfer over AC-link (default = 1)
 
     This module supports up to 8 cards and autoprobe.
@@ -680,16 +682,21 @@
                        * ALi m5455
 
     ac97_clock   - AC'97 codec clock base (0 = auto-detect)
-    ac97_quirk    - AC'97 workaround for strange hardware (-1 = default)
-                    -1 = default, don't override
-                     0 = disable
-                     1 = use headphone control as master
-                     2 = swap headphone and master controls
-                     3 = for AD1985, turn on OMS bit and use headphone
-                     4 = for ALC65x, turn on the jack sense mode
-                     5 = inverted EAPD implementation
-    buggy_irq      - Enable workaround for buggy interrupts on some
-                     motherboards (default off)
+    ac97_quirk    - AC'97 workaround for strange hardware
+                    The following strings are accepted:
+                      default = don't override the default setting
+                      disable = disable the quirk
+                      hp_only = use headphone control as master
+                      swap_hp = swap headphone and master controls
+                      swap_surround = swap master and surround controls
+                      ad_shring = for AD1985, turn on OMS bit and use headphone
+                      alc_jack = for ALC65x, turn on the jack sense mode
+                      inv_eapd = inverted EAPD implementation
+                      mute_led = bind EAPD bit for turning on/off mute LED
+                    For backward compatibility, the corresponding integer
+                    value -1, 0, ... are accepted, too.
+    buggy_irq     - Enable workaround for buggy interrupts on some
+                    motherboards (default off)
 
     Module supports autoprobe and multiple bus-master chips (max 8).
 
@@ -1402,18 +1409,21 @@
 ALSA PCM devices to OSS devices mapping
 =======================================
 
-/dev/snd/pcmC0D0  -> /dev/audio0 (/dev/audio) -> minor 4
-/dev/snd/pcmC0D0  -> /dev/dsp0 (/dev/dsp)     -> minor 3
-/dev/snd/pcmC0D1  -> /dev/adsp0 (/dev/adsp)   -> minor 12
-/dev/snd/pcmC1D0  -> /dev/audio1              -> minor 4+16 = 20
-/dev/snd/pcmC1D0  -> /dev/dsp1                -> minor 3+16 = 19
-/dev/snd/pcmC1D1  -> /dev/adsp1               -> minor 12+16 = 28
-/dev/snd/pcmC2D0  -> /dev/audio2              -> minor 4+32 = 36
-/dev/snd/pcmC2D0  -> /dev/dsp2                -> minor 3+32 = 39
-/dev/snd/pcmC2D1  -> /dev/adsp2               -> minor 12+32 = 44
+/dev/snd/pcmC0D0[c|p]  -> /dev/audio0 (/dev/audio) -> minor 4
+/dev/snd/pcmC0D0[c|p]  -> /dev/dsp0 (/dev/dsp)     -> minor 3
+/dev/snd/pcmC0D1[c|p]  -> /dev/adsp0 (/dev/adsp)   -> minor 12
+/dev/snd/pcmC1D0[c|p]  -> /dev/audio1              -> minor 4+16 = 20
+/dev/snd/pcmC1D0[c|p]  -> /dev/dsp1                -> minor 3+16 = 19
+/dev/snd/pcmC1D1[c|p]  -> /dev/adsp1               -> minor 12+16 = 28
+/dev/snd/pcmC2D0[c|p]  -> /dev/audio2              -> minor 4+32 = 36
+/dev/snd/pcmC2D0[c|p]  -> /dev/dsp2                -> minor 3+32 = 39
+/dev/snd/pcmC2D1[c|p]  -> /dev/adsp2               -> minor 12+32 = 44
+
+The first number from /dev/snd/pcmC{X}D{Y}[c|p] expression means
+soundcard number and second means device number.  The ALSA devices
+have either 'c' or 'p' suffix indicating the direction, capture and
+playback, respectively.
 
-The first number from /dev/snd/pcmC{X}D{Y} expression means soundcard number
-and second means device number.
 Please note that the device mapping above may be varied via the module
 options of snd-pcm-oss module.
 
diff -urN linux/Documentation/usb/error-codes.txt 
linux/Documentation/usb/error-codes.txt
--- linux/Documentation/usb/error-codes.txt     2004/11/15 11:49:13     1.10
+++ linux/Documentation/usb/error-codes.txt     2005/01/25 04:27:51     1.11
@@ -83,7 +83,18 @@
                           prescribed bus turn-around time
                        c) unknown USB error 
 
--EILSEQ (*, **)                CRC mismatch
+-EILSEQ (*, **)                a) CRC mismatch
+                       b) no response packet received within the
+                          prescribed bus turn-around time
+                       c) unknown USB error 
+
+                       In cases b) and c) either -EPROTO or -EILSEQ
+                       may be returned.  Note that often the controller
+                       hardware does not distinguish among cases a),
+                       b), and c), so a driver cannot tell whether
+                       there was a protocol error, a failure to respond
+                       (often caused by device disconnect), or some
+                       other fault.
 
 -EPIPE (**)            Endpoint stalled.  For non-control endpoints,
                        reset this status with usb_clear_halt().
@@ -104,8 +115,6 @@
                        specified buffer, and URB_SHORT_NOT_OK was set in
                        urb->transfer_flags.
 
--ETIMEDOUT (**)                transfer timed out, NAK
-
 -ENODEV                        Device was removed.  Often preceded by a burst 
of
                        other errors, since the hub driver does't detect
                        device removal events immediately.
@@ -143,4 +152,4 @@
 usb_get_*/usb_set_*():
 usb_control_msg():
 usb_bulk_msg():
-                       All USB errors (submit/status) can occur
+-ETIMEDOUT             timeout expired before the transfer completed
diff -urN linux/Documentation/usb/sn9c102.txt 
linux/Documentation/usb/sn9c102.txt
--- linux/Documentation/usb/sn9c102.txt 2005/01/13 14:05:16     1.6
+++ linux/Documentation/usb/sn9c102.txt 2005/01/25 04:27:51     1.7
@@ -26,7 +26,7 @@
 
 1. Copyright
 ============
-Copyright (C) 2004 by Luca Risolia <luca.risolia@studio.unibo.it>
+Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it>
 
 
 2. Disclaimer
@@ -165,6 +165,17 @@
                 other camera.
 Default:        -1
 -------------------------------------------------------------------------------
+Name:           force_munmap;
+Type:           bool array (min = 0, max = 64)
+Syntax:         <0|1[,...]> 
+Description:    Force the application to unmap previously mapped buffer memory
+                before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not
+                all the applications support this feature. This parameter is
+                specific for each detected camera.
+                0 = do not force memory unmapping"
+                1 = force memory unmapping (save memory)"
+Default:        0
+-------------------------------------------------------------------------------
 Name:           debug
 Type:           int
 Syntax:         <n> 
@@ -362,11 +373,11 @@
 file descriptor. Once it is selected, the application must close and reopen the
 device to switch to the other I/O method;
 
-- previously mapped buffer memory must always be unmapped before calling any
-of the "VIDIOC_S_CROP", "VIDIOC_TRY_FMT" and "VIDIOC_S_FMT" ioctl's. The same
-number of buffers as before will be allocated again to match the size of the
-new video frames, so you have to map the buffers again before any I/O attempts
-on them.
+- although it is not mandatory, previously mapped buffer memory should always
+be unmapped before calling any "VIDIOC_S_CROP" or "VIDIOC_S_FMT" ioctl's.
+The same number of buffers as before will be allocated again to match the size
+of the new video frames, so you have to map the buffers again before any I/O
+attempts on them.
 
 Consistently with the hardware limits, this driver also supports image
 downscaling with arbitrary scaling factors from 1, 2 and 4 in both directions.
diff -urN linux/arch/alpha/kernel/irq_i8259.c 
linux/arch/alpha/kernel/irq_i8259.c
--- linux/arch/alpha/kernel/irq_i8259.c 2003/06/03 12:49:00     1.6
+++ linux/arch/alpha/kernel/irq_i8259.c 2005/01/25 04:27:52     1.7
@@ -22,7 +22,7 @@
 
 /* Note mask bit is true for DISABLED irqs.  */
 static unsigned int cached_irq_mask = 0xffff;
-static spinlock_t i8259_irq_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(i8259_irq_lock);
 
 static inline void
 i8259_update_irq_hw(unsigned int irq, unsigned long mask)
diff -urN linux/arch/alpha/kernel/irq_srm.c linux/arch/alpha/kernel/irq_srm.c
--- linux/arch/alpha/kernel/irq_srm.c   2002/11/02 00:38:47     1.3
+++ linux/arch/alpha/kernel/irq_srm.c   2005/01/25 04:27:52     1.4
@@ -15,7 +15,7 @@
  * at the same time in multiple CPUs? To be safe I added a spinlock
  * but it can be removed trivially if the palcode is robust against smp.
  */
-spinlock_t srm_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(srm_irq_lock);
 
 static inline void
 srm_enable_irq(unsigned int irq)
diff -urN linux/arch/alpha/kernel/smc37c669.c 
linux/arch/alpha/kernel/smc37c669.c
--- linux/arch/alpha/kernel/smc37c669.c 2004/07/20 20:21:16     1.12
+++ linux/arch/alpha/kernel/smc37c669.c 2005/01/25 04:27:52     1.13
@@ -1104,7 +1104,7 @@
     int drq 
 );
 
-static spinlock_t smc_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned DEFINE_SPINLOCK(smc_lock);
 
 /*
 **++
diff -urN linux/arch/alpha/kernel/srmcons.c linux/arch/alpha/kernel/srmcons.c
--- linux/arch/alpha/kernel/srmcons.c   2005/01/13 14:05:17     1.8
+++ linux/arch/alpha/kernel/srmcons.c   2005/01/25 04:27:52     1.9
@@ -22,7 +22,7 @@
 #include <asm/uaccess.h>
 
 
-static spinlock_t srmcons_callback_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(srmcons_callback_lock);
 static int srm_is_registered_console = 0;
 
 /* 
@@ -160,7 +160,7 @@
 srmcons_get_private_struct(struct srmcons_private **ps)
 {
        static struct srmcons_private *srmconsp = NULL;
-       static spinlock_t srmconsp_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(srmconsp_lock);
        unsigned long flags;
        int retval = 0;
 
diff -urN linux/arch/alpha/kernel/sys_dp264.c 
linux/arch/alpha/kernel/sys_dp264.c
--- linux/arch/alpha/kernel/sys_dp264.c 2004/10/25 20:44:09     1.31
+++ linux/arch/alpha/kernel/sys_dp264.c 2005/01/25 04:27:52     1.32
@@ -43,7 +43,7 @@
 /* dp264 boards handle at max four CPUs */
 static unsigned long cpu_irq_affinity[4] = { 0UL, 0UL, 0UL, 0UL };
 
-spinlock_t dp264_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(dp264_irq_lock);
 
 static void
 tsunami_update_irq_hw(unsigned long mask)
diff -urN linux/arch/alpha/kernel/sys_rawhide.c 
linux/arch/alpha/kernel/sys_rawhide.c
--- linux/arch/alpha/kernel/sys_rawhide.c       2004/10/12 01:45:39     1.16
+++ linux/arch/alpha/kernel/sys_rawhide.c       2005/01/25 04:27:52     1.17
@@ -42,7 +42,7 @@
        0xff0000, 0xfe0000, 0xff0000, 0xff0000
 };
 static unsigned int cached_irq_masks[4];
-spinlock_t rawhide_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rawhide_irq_lock);
 
 static inline void
 rawhide_update_irq_hw(int hose, int mask)
diff -urN linux/arch/alpha/kernel/sys_sable.c 
linux/arch/alpha/kernel/sys_sable.c
--- linux/arch/alpha/kernel/sys_sable.c 2004/10/12 01:45:39     1.15
+++ linux/arch/alpha/kernel/sys_sable.c 2005/01/25 04:27:52     1.16
@@ -31,7 +31,7 @@
 #include "pci_impl.h"
 #include "machvec_impl.h"
 
-spinlock_t sable_lynx_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(sable_lynx_irq_lock);
 
 typedef struct irq_swizzle_struct
 {
diff -urN linux/arch/alpha/kernel/sys_titan.c 
linux/arch/alpha/kernel/sys_titan.c
--- linux/arch/alpha/kernel/sys_titan.c 2004/10/25 20:44:09     1.12
+++ linux/arch/alpha/kernel/sys_titan.c 2005/01/25 04:27:52     1.13
@@ -56,7 +56,7 @@
 /*
  * Need SMP-safe access to interrupt CSRs
  */
-spinlock_t titan_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(titan_irq_lock);
 
 static void
 titan_update_irq_hw(unsigned long mask)
diff -urN linux/arch/alpha/kernel/sys_wildfire.c 
linux/arch/alpha/kernel/sys_wildfire.c
--- linux/arch/alpha/kernel/sys_wildfire.c      2004/10/25 20:44:09     1.11
+++ linux/arch/alpha/kernel/sys_wildfire.c      2005/01/25 04:27:52     1.12
@@ -32,7 +32,7 @@
 
 static unsigned long cached_irq_mask[WILDFIRE_NR_IRQS/(sizeof(long)*8)];
 
-spinlock_t wildfire_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(wildfire_irq_lock);
 
 static int doing_init_irq_hw = 0;
 
diff -urN linux/arch/alpha/kernel/time.c linux/arch/alpha/kernel/time.c
--- linux/arch/alpha/kernel/time.c      2004/10/25 20:44:09     1.48
+++ linux/arch/alpha/kernel/time.c      2005/01/25 04:27:52     1.49
@@ -63,7 +63,7 @@
 
 static int set_rtc_mmss(unsigned long);
 
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
 
 #define TICK_SIZE (tick_nsec / 1000)
 
diff -urN linux/arch/arm/Kconfig linux/arch/arm/Kconfig
--- linux/arch/arm/Kconfig      2005/01/13 14:05:17     1.43
+++ linux/arch/arm/Kconfig      2005/01/25 04:27:52     1.44
@@ -131,7 +131,7 @@
          <http://www.linkupsys.com/>
 
          If you have any questions or comments about the Linux kernel port
-         to this board, send e-mail to sjhill@cotw.com.
+         to this board, send e-mail to <sjhill@cotw.com>.
 
 config ARCH_PXA
        bool "PXA2xx-based"
@@ -149,7 +149,7 @@
        bool "Samsung S3C2410"
        help
          Samsung S3C2410X CPU based systems, such as the Simtec Electronics
-         BAST (http://www.simtec.co.uk/products/EB110ITX/), the IPAQ 1940 or
+         BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
          the Samsung SMDK2410 development board (and derviatives).
 
 config ARCH_SHARK
@@ -236,7 +236,7 @@
 
 config SHARP_SCOOP
        bool
-       depends on PXA_SHARPSL
+       depends on PXA_SHARPSL || SA1100_COLLIE
        default y
 
 config FORCE_MAX_ZONEORDER
@@ -418,20 +418,6 @@
          be linked for and stored to.  This address is dependent on your
          own flash usage.
 
-         Please note that, if you're using MTD, you must use a flash chip
-         that is NOT handled by MTD or the flash will be turned into non
-         data mode for status and query purposes which will instantaneously
-         crash the kernel.
-
-         MTD can however be used with a XIP kernel on the same flash chip
-         but only if the flash memory supports multiple partitions in
-         hardware, like with the Intel K3 flash parts, and only if the
-         kernel is not stored within the firrst hardware partition of the
-         chip.
-
-         In any case, make sure that MTD support is configured out for
-         the first attempt.
-
 if (ARCH_SA1100 || ARCH_INTEGRATOR)
 
 source "drivers/cpufreq/Kconfig"
diff -urN linux/arch/arm/common/rtctime.c linux/arch/arm/common/rtctime.c
--- linux/arch/arm/common/rtctime.c     2004/12/04 18:15:57     1.3
+++ linux/arch/arm/common/rtctime.c     2005/01/25 04:27:52     1.4
@@ -28,7 +28,7 @@
 /*
  * rtc_lock protects rtc_irq_data
  */
-static spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(rtc_lock);
 static unsigned long rtc_irq_data;
 
 /*
diff -urN linux/arch/arm/common/scoop.c linux/arch/arm/common/scoop.c
--- linux/arch/arm/common/scoop.c       2005/01/13 14:05:17     1.1
+++ linux/arch/arm/common/scoop.c       2005/01/25 04:27:52     1.2
@@ -31,7 +31,7 @@
        SCOOP_REG(SCOOP_IRM) = 0x0000;
 }
 
-static spinlock_t scoop_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(scoop_lock);
 static u32 scoop_gpwr;
 
 unsigned short set_scoop_gpio(unsigned short bit)
@@ -100,11 +100,13 @@
        struct platform_device *pdev = to_platform_device(dev);
        struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
-       if (!mem) return -EINVAL;
+       if (!mem)
+               return -EINVAL;
 
        inf = dev->platform_data;
        scoop_io_base = ioremap(mem->start, 0x1000);
-       if (!scoop_io_base) return -ENOMEM;
+       if (!scoop_io_base)
+               return -ENOMEM;
 
        SCOOP_REG(SCOOP_MCR) = 0x0140;
 
diff -urN linux/arch/arm/configs/s3c2410_defconfig 
linux/arch/arm/configs/s3c2410_defconfig
--- linux/arch/arm/configs/s3c2410_defconfig    2004/12/04 18:15:58     1.7
+++ linux/arch/arm/configs/s3c2410_defconfig    2005/01/25 04:27:52     1.8
@@ -1,12 +1,13 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc2
-# Mon Nov 15 15:29:42 2004
+# Linux kernel version: 2.6.11-rc1-bk5
+# Tue Jan 18 11:36:49 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
 CONFIG_UID16=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_IOMAP=y
 
 #
@@ -123,12 +124,20 @@
 #
 # General setup
 #
-# CONFIG_ZBOOT_ROM is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 # CONFIG_XIP_KERNEL is not set
 
 #
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PC-card bridges
+#
+
+#
 # At least one math emulation must be selected
 #
 CONFIG_FPE_NWFPE=y
@@ -143,6 +152,7 @@
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
 # CONFIG_DEBUG_DRIVER is not set
 CONFIG_PM=y
 # CONFIG_PREEMPT is not set
@@ -168,6 +178,7 @@
 CONFIG_MTD_PARTITIONS=y
 # CONFIG_MTD_CONCAT is not set
 CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
 # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
 CONFIG_MTD_CMDLINE_PARTS=y
@@ -200,13 +211,15 @@
 # CONFIG_MTD_CFI_I4 is not set
 # CONFIG_MTD_CFI_I8 is not set
 CONFIG_MTD_CFI_INTELEXT=y
-# CONFIG_MTD_CFI_AMDSTD is not set
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_CFI_AMDSTD_RETRY=0
 # CONFIG_MTD_CFI_STAA is not set
 CONFIG_MTD_CFI_UTIL=y
 # CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
+CONFIG_MTD_ROM=y
 # CONFIG_MTD_ABSENT is not set
 # CONFIG_MTD_OBSOLETE_CHIPS is not set
+# CONFIG_MTD_XIP is not set
 
 #
 # Mapping drivers for chip access
@@ -226,6 +239,7 @@
 # CONFIG_MTD_PHRAM is not set
 # CONFIG_MTD_MTDRAM is not set
 # CONFIG_MTD_BLKMTD is not set
+# CONFIG_MTD_BLOCK2MTD is not set
 
 #
 # Disk-On-Chip Device Drivers
@@ -244,6 +258,7 @@
 # CONFIG_MTD_NAND_S3C2410_DEBUG is not set
 # CONFIG_MTD_NAND_S3C2410_HWECC is not set
 # CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
 
 #
 # Plug and Play support
@@ -254,10 +269,12 @@
 #
 # CONFIG_BLK_DEV_FD is not set
 # CONFIG_PARIDE 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=m
 CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -270,6 +287,7 @@
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
+CONFIG_ATA_OVER_ETH=m
 
 #
 # Multi-device support (RAID and LVM)
@@ -456,6 +474,7 @@
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_CT82C710 is not set
 # CONFIG_SERIO_PARKBD is not set
+CONFIG_SERIO_LIBPS2=y
 # CONFIG_SERIO_RAW is not set
 
 #
@@ -489,6 +508,7 @@
 # CONFIG_DIGI is not set
 # CONFIG_MOXA_INTELLIO is not set
 # CONFIG_MOXA_SMARTIO is not set
+# CONFIG_ISI is not set
 # CONFIG_SYNCLINKMP is not set
 # CONFIG_N_HDLC is not set
 # CONFIG_RISCOM8 is not set
@@ -583,6 +603,7 @@
 CONFIG_I2C_SENSOR=m
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
 # CONFIG_SENSORS_ADM1031 is not set
 # CONFIG_SENSORS_ASB100 is not set
 # CONFIG_SENSORS_DS1621 is not set
@@ -600,6 +621,7 @@
 # CONFIG_SENSORS_LM90 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_W83781D is not set
 # CONFIG_SENSORS_W83L785TS is not set
@@ -693,6 +715,7 @@
 CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
 # CONFIG_JFFS2_FS_NAND is not set
+# CONFIG_JFFS2_FS_NOR_ECC is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -812,6 +835,7 @@
 # Logo configuration
 #
 # CONFIG_LOGO is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -830,6 +854,10 @@
 # CONFIG_USB_ARCH_HAS_OHCI is not set
 
 #
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; 
see USB_STORAGE Help for more information
+#
+
+#
 # USB Gadget Support
 #
 # CONFIG_USB_GADGET is not set
@@ -848,8 +876,9 @@
 # CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_FS is not set
 CONFIG_FRAME_POINTER=y
 CONFIG_DEBUG_USER=y
 # CONFIG_DEBUG_WAITQ is not set
@@ -871,6 +900,10 @@
 # CONFIG_CRYPTO is not set
 
 #
+# Hardware crypto devices
+#
+
+#
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
diff -urN linux/arch/arm/kernel/apm.c linux/arch/arm/kernel/apm.c
--- linux/arch/arm/kernel/apm.c 2004/10/12 01:45:40     1.6
+++ linux/arch/arm/kernel/apm.c 2005/01/25 04:27:52     1.7
@@ -97,7 +97,7 @@
  */
 static DECLARE_WAIT_QUEUE_HEAD(kapmd_wait);
 static DECLARE_COMPLETION(kapmd_exit);
-static spinlock_t kapmd_queue_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(kapmd_queue_lock);
 static struct apm_queue kapmd_queue;
 
 
diff -urN linux/arch/arm/kernel/dma.c linux/arch/arm/kernel/dma.c
--- linux/arch/arm/kernel/dma.c 2003/06/01 00:39:08     1.16
+++ linux/arch/arm/kernel/dma.c 2005/01/25 04:27:52     1.17
@@ -22,7 +22,7 @@
 
 #include <asm/mach/dma.h>
 
-spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(dma_spin_lock);
 
 #if MAX_DMA_CHANNELS > 0
 
diff -urN linux/arch/arm/kernel/head.S linux/arch/arm/kernel/head.S
--- linux/arch/arm/kernel/head.S        2005/01/13 14:05:18     1.14
+++ linux/arch/arm/kernel/head.S        2005/01/25 04:27:52     1.15
@@ -406,7 +406,7 @@
  * calculate the offset.
  *
  * Returns:
- *     r3, r6 corrupted
+ *     r3, r4, r6 corrupted
  *     r5 = proc_info pointer in physical address space
  *     r9 = cpuid
  */
@@ -418,9 +418,9 @@
        add     r5, r5, r3                      @ convert virt addresses to
        add     r6, r6, r3                      @ physical address space
        mrc     p15, 0, r9, c0, c0              @ get processor id
-1:     ldmia   r5, {r3, r10}                   @ value, mask
-       and     r10, r10, r9                    @ mask wanted bits
-       teq     r3, r10
+1:     ldmia   r5, {r3, r4}                    @ value, mask
+       and     r4, r4, r9                      @ mask wanted bits
+       teq     r3, r4
        beq     2f
        add     r5, r5, #PROC_INFO_SZ           @ sizeof(proc_info_list)
        cmp     r5, r6
@@ -429,6 +429,15 @@
 2:     mov     pc, lr
 
 /*
+ * This provides a C-API version of the above function.
+ */
+ENTRY(lookup_processor_type)
+       stmfd   sp!, {r4 - r6, r9, lr}
+       bl      __lookup_processor_type
+       mov     r0, r5
+       ldmfd   sp!, {r4 - r6, r9, pc}
+
+/*
  * Look in include/asm-arm/procinfo.h and arch/arm/kernel/arch.[ch] for
  * more information about the __proc_info and __arch_info structures.
  */
@@ -464,3 +473,13 @@
        blt     1b
        mov     r5, #0                          @ unknown machine
 2:     mov     pc, lr
+
+/*
+ * This provides a C-API version of the above function.
+ */
+ENTRY(lookup_machine_type)
+       stmfd   sp!, {r4 - r6, lr}
+       mov     r1, r0
+       bl      __lookup_machine_type
+       mov     r0, r5
+       ldmfd   sp!, {r4 - r6, pc}
diff -urN linux/arch/arm/kernel/irq.c linux/arch/arm/kernel/irq.c
--- linux/arch/arm/kernel/irq.c 2004/11/15 11:49:14     1.45
+++ linux/arch/arm/kernel/irq.c 2005/01/25 04:27:52     1.46
@@ -32,6 +32,7 @@
 #include <linux/errno.h>
 #include <linux/list.h>
 #include <linux/kallsyms.h>
+#include <linux/proc_fs.h>
 
 #include <asm/irq.h>
 #include <asm/system.h>
@@ -48,7 +49,7 @@
 
 static int noirqdebug;
 static volatile unsigned long irq_err_count;
-static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(irq_controller_lock);
 static LIST_HEAD(irq_pending);
 
 struct irqdesc irq_desc[NR_IRQS];
@@ -85,6 +86,23 @@
        .disable_depth  = 1,
 };
 
+#ifdef CONFIG_SMP
+void synchronize_irq(unsigned int irq)
+{
+       struct irqdesc *desc = irq_desc + irq;
+
+       while (desc->running)
+               barrier();
+}
+EXPORT_SYMBOL(synchronize_irq);
+
+#define smp_set_running(desc)  do { desc->running = 1; } while (0)
+#define smp_clear_running(desc)        do { desc->running = 0; } while (0)
+#else
+#define smp_set_running(desc)  do { } while (0)
+#define smp_clear_running(desc)        do { } while (0)
+#endif
+
 /**
  *     disable_irq_nosync - disable an irq without waiting
  *     @irq: Interrupt to disable
@@ -232,6 +250,9 @@
 #ifdef CONFIG_ARCH_ACORN
                show_fiq_list(p, v);
 #endif
+#ifdef CONFIG_SMP
+               show_ipi_list(p);
+#endif
                seq_printf(p, "Err: %10lu\n", irq_err_count);
        }
        return 0;
@@ -329,18 +350,22 @@
 do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
 {
        struct irqaction *action;
-       const int cpu = smp_processor_id();
+       const unsigned int cpu = smp_processor_id();
 
        desc->triggered = 1;
 
        kstat_cpu(cpu).irqs[irq]++;
 
+       smp_set_running(desc);
+
        action = desc->action;
        if (action) {
                int ret = __do_irq(irq, action, regs);
                if (ret != IRQ_HANDLED)
                        report_bad_irq(irq, regs, desc, ret);
        }
+
+       smp_clear_running(desc);
 }
 
 /*
@@ -350,7 +375,7 @@
 void
 do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
 {
-       const int cpu = smp_processor_id();
+       const unsigned int cpu = smp_processor_id();
 
        desc->triggered = 1;
 
@@ -414,7 +439,7 @@
 do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
 {
        struct irqaction *action;
-       const int cpu = smp_processor_id();
+       const unsigned int cpu = smp_processor_id();
 
        desc->triggered = 1;
 
@@ -426,6 +451,8 @@
        if (likely(!desc->disable_depth)) {
                kstat_cpu(cpu).irqs[irq]++;
 
+               smp_set_running(desc);
+
                /*
                 * Return with this interrupt masked if no action
                 */
@@ -440,6 +467,8 @@
                                   !check_irq_lock(desc, irq, regs)))
                                desc->chip->unmask(irq);
                }
+
+               smp_clear_running(desc);
        }
 }
 
@@ -878,8 +907,97 @@
 
 EXPORT_SYMBOL(probe_irq_off);
 
+#ifdef CONFIG_SMP
+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(&irq_controller_lock);
+       desc->cpu = cpu;
+       desc->chip->set_cpu(desc, irq, cpu);
+       spin_unlock_irq(&irq_controller_lock);
+}
+
+#ifdef CONFIG_PROC_FS
+static int
+irq_affinity_read_proc(char *page, char **start, off_t off, int count,
+                      int *eof, void *data)
+{
+       struct irqdesc *desc = irq_desc + ((int)data);
+       int len = cpumask_scnprintf(page, count, desc->affinity);
+
+       if (count - len < 2)
+               return -EINVAL;
+       page[len++] = '\n';
+       page[len] = '\0';
+
+       return len;
+}
+
+static int
+irq_affinity_write_proc(struct file *file, const char __user *buffer,
+                       unsigned long count, void *data)
+{
+       unsigned int irq = (unsigned int)data;
+       struct irqdesc *desc = irq_desc + irq;
+       cpumask_t affinity, tmp;
+       int ret = -EIO;
+
+       if (!desc->chip->set_cpu)
+               goto out;
+
+       ret = cpumask_parse(buffer, count, affinity);
+       if (ret)
+               goto out;
+
+       cpus_and(tmp, affinity, cpu_online_map);
+       if (cpus_empty(tmp)) {
+               ret = -EINVAL;
+               goto out;
+       }
+
+       desc->affinity = affinity;
+       route_irq(desc, irq, first_cpu(tmp));
+       ret = count;
+
+ out:
+       return ret;
+}
+#endif
+#endif
+
 void __init init_irq_proc(void)
 {
+#if defined(CONFIG_SMP) && defined(CONFIG_PROC_FS)
+       struct proc_dir_entry *dir;
+       int irq;
+
+       dir = proc_mkdir("irq", 0);
+       if (!dir)
+               return;
+
+       for (irq = 0; irq < NR_IRQS; irq++) {
+               struct proc_dir_entry *entry;
+               struct irqdesc *desc;
+               char name[16];
+
+               desc = irq_desc + irq;
+               memset(name, 0, sizeof(name));
+               snprintf(name, sizeof(name) - 1, "%u", irq);
+
+               desc->procdir = proc_mkdir(name, dir);
+               if (!desc->procdir)
+                       continue;
+
+               entry = create_proc_entry("smp_affinity", 0600, desc->procdir);
+               if (entry) {
+                       entry->nlink = 1;
+                       entry->data = (void *)irq;
+                       entry->read_proc = irq_affinity_read_proc;
+                       entry->write_proc = irq_affinity_write_proc;
+               }
+       }
+#endif
 }
 
 void __init init_IRQ(void)
@@ -888,6 +1006,11 @@
        extern void init_dma(void);
        int irq;
 
+#ifdef CONFIG_SMP
+       bad_irq_desc.affinity = CPU_MASK_ALL;
+       bad_irq_desc.cpu = smp_processor_id();
+#endif
+
        for (irq = 0, desc = irq_desc; irq < NR_IRQS; irq++, desc++) {
                *desc = bad_irq_desc;
                INIT_LIST_HEAD(&desc->pend);
diff -urN linux/arch/arm/kernel/semaphore.c linux/arch/arm/kernel/semaphore.c
--- linux/arch/arm/kernel/semaphore.c   2004/09/19 12:30:01     1.18
+++ linux/arch/arm/kernel/semaphore.c   2005/01/25 04:27:52     1.19
@@ -54,7 +54,7 @@
        wake_up(&sem->wait);
 }
 
-static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(semaphore_lock);
 
 void __sched __down(struct semaphore * sem)
 {
@@ -178,7 +178,7 @@
  * registers (r0 to r3 and lr), but not ip, as we use it as a return
  * value in some cases..
  */
-asm("  .section .sched.text                    \n\
+asm("  .section .sched.text,\"ax\"             \n\
        .align  5                               \n\
        .globl  __down_failed                   \n\
 __down_failed:                                 \n\
diff -urN linux/arch/arm/kernel/setup.c linux/arch/arm/kernel/setup.c
--- linux/arch/arm/kernel/setup.c       2005/01/13 14:05:18     1.57
+++ linux/arch/arm/kernel/setup.c       2005/01/25 04:27:52     1.58
@@ -221,12 +221,12 @@
 #define CACHE_M(y)     ((y) & (1 << 2))
 #define CACHE_LINE(y)  ((y) & 3)
 
-static inline void dump_cache(const char *prefix, unsigned int cache)
+static inline void dump_cache(const char *prefix, int cpu, unsigned int cache)
 {
        unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0);
 
-       printk("%s: %d bytes, associativity %d, %d byte lines, %d sets\n",
-               prefix,
+       printk("CPU%u: %s: %d bytes, associativity %d, %d byte lines, %d 
sets\n",
+               cpu, prefix,
                mult << (8 + CACHE_SIZE(cache)),
                (mult << CACHE_ASSOC(cache)) >> 1,
                8 << CACHE_LINE(cache),
@@ -234,18 +234,18 @@
                        CACHE_LINE(cache)));
 }
 
-static void __init dump_cpu_info(void)
+static void __init dump_cpu_info(int cpu)
 {
        unsigned int info = read_cpuid(CPUID_CACHETYPE);
 
        if (info != processor_id) {
-               printk("CPU: D %s %s cache\n", cache_is_vivt() ? "VIVT" : 
"VIPT",
+               printk("CPU%u: D %s %s cache\n", cpu, cache_is_vivt() ? "VIVT" 
: "VIPT",
                       cache_types[CACHE_TYPE(info)]);
                if (CACHE_S(info)) {
-                       dump_cache("CPU: I cache", CACHE_ISIZE(info));
-                       dump_cache("CPU: D cache", CACHE_DSIZE(info));
+                       dump_cache("I cache", cpu, CACHE_ISIZE(info));
+                       dump_cache("D cache", cpu, CACHE_DSIZE(info));
                } else {
-                       dump_cache("CPU: cache", CACHE_ISIZE(info));
+                       dump_cache("cache", cpu, CACHE_ISIZE(info));
                }
        }
 }
@@ -267,9 +267,15 @@
        return cpu_arch;
 }
 
+/*
+ * These functions re-use the assembly code in head.S, which
+ * already provide the required functionality.
+ */
+extern struct proc_info_list *lookup_processor_type(void);
+extern struct machine_desc *lookup_machine_type(unsigned int);
+
 static void __init setup_processor(void)
 {
-       extern struct proc_info_list __proc_info_begin, __proc_info_end;
        struct proc_info_list *list;
 
        /*
@@ -277,15 +283,8 @@
         * types.  The linker builds this table for us from the
         * entries in arch/arm/mm/proc-*.S
         */
-       for (list = &__proc_info_begin; list < &__proc_info_end ; list++)
-               if ((processor_id & list->cpu_mask) == list->cpu_val)
-                       break;
-
-       /*
-        * If processor type is unrecognised, then we
-        * can do nothing...
-        */
-       if (list >= &__proc_info_end) {
+       list = lookup_processor_type();
+       if (!list) {
                printk("CPU configuration botched (ID %08x), unable "
                       "to continue.\n", processor_id);
                while (1);
@@ -310,7 +309,7 @@
               cpu_name, processor_id, (int)processor_id & 15,
               proc_arch[cpu_architecture()]);
 
-       dump_cpu_info();
+       dump_cpu_info(smp_processor_id());
 
        sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS);
        sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
@@ -321,22 +320,14 @@
 
 static struct machine_desc * __init setup_machine(unsigned int nr)
 {
-       extern struct machine_desc __arch_info_begin, __arch_info_end;
        struct machine_desc *list;
 
        /*
-        * locate architecture in the list of supported architectures.
-        */
-       for (list = &__arch_info_begin; list < &__arch_info_end; list++)
-               if (list->nr == nr)
-                       break;
-
-       /*
-        * If the architecture type is not recognised, then we
-        * can co nothing...
+        * locate machine in the list of supported machines.
         */
-       if (list >= &__arch_info_end) {
-               printk("Architecture configuration botched (nr %d), unable "
+       list = lookup_machine_type(nr);
+       if (!list) {
+               printk("Machine configuration botched (nr %d), unable "
                       "to continue.\n", nr);
                while (1);
        }
diff -urN linux/arch/arm/kernel/signal.c linux/arch/arm/kernel/signal.c
--- linux/arch/arm/kernel/signal.c      2004/10/25 20:44:10     1.47
+++ linux/arch/arm/kernel/signal.c      2005/01/25 04:27:52     1.48
@@ -12,7 +12,6 @@
 #include <linux/signal.h>
 #include <linux/ptrace.h>
 #include <linux/personality.h>
-#include <linux/suspend.h>
 
 #include <asm/cacheflush.h>
 #include <asm/ucontext.h>
@@ -689,10 +688,8 @@
        if (!user_mode(regs))
                return 0;
 
-       if (current->flags & PF_FREEZE) {
-               refrigerator(0);
+       if (try_to_freeze(0))
                goto no_signal;
-       }
 
        if (current->ptrace & PT_SINGLESTEP)
                ptrace_cancel_bpt(current);
diff -urN linux/arch/arm/kernel/smp.c linux/arch/arm/kernel/smp.c
--- linux/arch/arm/kernel/smp.c 2005/01/13 14:05:18     1.1
+++ linux/arch/arm/kernel/smp.c 2005/01/25 04:27:52     1.2
@@ -17,16 +17,16 @@
 #include <linux/profile.h>
 #include <linux/errno.h>
 #include <linux/mm.h>
+#include <linux/cpu.h>
+#include <linux/smp.h>
 #include <linux/seq_file.h>
 
 #include <asm/atomic.h>
+#include <asm/cacheflush.h>
 #include <asm/cpu.h>
 #include <asm/processor.h>
-#include <asm/smp.h>
-#include <asm/ptrace.h>
-
-#include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
+#include <asm/ptrace.h>
 
 /*
  * bitmask of present and online CPUs.
@@ -42,6 +42,7 @@
  */
 struct ipi_data {
        spinlock_t lock;
+       unsigned long ipi_count;
        unsigned long bits;
 };
 
@@ -65,7 +66,7 @@
 };
 
 static struct smp_call_struct * volatile smp_call_function_data;
-static spinlock_t smp_call_function_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(smp_call_function_lock);
 
 int __init __cpu_up(unsigned int cpu)
 {
@@ -242,12 +243,12 @@
 
 void show_ipi_list(struct seq_file *p)
 {
-       int cpu;
+       unsigned int cpu;
 
-       seq_printf(p, "IPI: ");
+       seq_puts(p, "IPI:");
 
        for_each_online_cpu(cpu)
-               seq_printf(p, "%10lu ", per_cpu(cpu_data, cpu).ipi_count);
+               seq_printf(p, " %10lu", per_cpu(ipi_data, cpu).ipi_count);
 
        seq_putc(p, '\n');
 }
@@ -283,7 +284,7 @@
                cpu_clear(cpu, data->unfinished);
 }
 
-static spinlock_t stop_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(stop_lock);
 
 /*
  * ipi_cpu_stop - handle IPI from smp_send_stop()
@@ -313,68 +314,57 @@
  *
  *  Bit 0 - Inter-processor function call
  */
-void do_IPI(unsigned int ipimask, struct pt_regs *regs)
+void do_IPI(struct pt_regs *regs)
 {
        unsigned int cpu = smp_processor_id();
+       struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
 
-       per_cpu(cpu_data, cpu).ipi_count++;
+       ipi->ipi_count++;
 
-       if (ipimask & (1 << 0)) {
-               struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
+       for (;;) {
+               unsigned long msgs;
 
-               for (;;) {
-                       unsigned long msgs;
+               spin_lock(&ipi->lock);
+               msgs = ipi->bits;
+               ipi->bits = 0;
+               spin_unlock(&ipi->lock);
 
-                       spin_lock(&ipi->lock);
-                       msgs = ipi->bits;
-                       ipi->bits = 0;
-                       spin_unlock(&ipi->lock);
+               if (!msgs)
+                       break;
 
-                       if (!msgs)
+               do {
+                       unsigned nextmsg;
+
+                       nextmsg = msgs & -msgs;
+                       msgs &= ~nextmsg;
+                       nextmsg = ffz(~nextmsg);
+
+                       switch (nextmsg) {
+                       case IPI_TIMER:
+                               ipi_timer(regs);
                                break;
 
-                       do {
-                               unsigned nextmsg;
+                       case IPI_RESCHEDULE:
+                               /*
+                                * nothing more to do - eveything is
+                                * done on the interrupt return path
+                                */
+                               break;
 
-                               nextmsg = msgs & -msgs;
-                               msgs &= ~nextmsg;
-                               nextmsg = ffz(~nextmsg);
-
-                               switch (nextmsg) {
-                               case IPI_TIMER:
-                                       ipi_timer(regs);
-                                       break;
-
-                               case IPI_RESCHEDULE:
-                                       /*
-                                        * nothing more to do - eveything is
-                                        * done on the interrupt return path
-                                        */
-                                       break;
-
-                               case IPI_CALL_FUNC:
-                                       ipi_call_function(cpu);
-                                       break;
-
-                               case IPI_CPU_STOP:
-                                       ipi_cpu_stop(cpu);
-                                       break;
-
-                               default:
-                                       printk(KERN_CRIT "CPU%u: Unknown IPI 
message 0x%x\n",
-                                              cpu, nextmsg);
-                                       break;
-                               }
-                       } while (msgs);
-               }
+                       case IPI_CALL_FUNC:
+                               ipi_call_function(cpu);
+                               break;
 
-               ipimask &= ~0x01;
-       }
+                       case IPI_CPU_STOP:
+                               ipi_cpu_stop(cpu);
+                               break;
 
-       if (ipimask) {
-               printk(KERN_CRIT "CPU %d: Unknown IPI signal %x!\n",
-                      cpu, ipimask);
-               BUG();
+                       default:
+                               printk(KERN_CRIT "CPU%u: Unknown IPI message 
0x%x\n",
+                                      cpu, nextmsg);
+                               break;
+                       }
+               } while (msgs);
        }
 }
 
diff -urN linux/arch/arm/kernel/time.c linux/arch/arm/kernel/time.c
--- linux/arch/arm/kernel/time.c        2004/10/25 20:44:10     1.42
+++ linux/arch/arm/kernel/time.c        2005/01/25 04:27:52     1.43
@@ -48,7 +48,7 @@
 extern unsigned long wall_jiffies;
 
 /* this needs a better home */
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
 
 #ifdef CONFIG_SA1100_RTC_MODULE
 EXPORT_SYMBOL(rtc_lock);
@@ -63,7 +63,7 @@
        unsigned long fp, pc = instruction_pointer(regs);
 
        if (in_lock_functions(pc)) {
-               fp = thread_saved_fp(current);
+               fp = regs->ARM_fp;
                pc = pc_pointer(((unsigned long *)fp)[-1]);
        }
 
diff -urN linux/arch/arm/kernel/traps.c linux/arch/arm/kernel/traps.c
--- linux/arch/arm/kernel/traps.c       2004/12/27 02:15:48     1.46
+++ linux/arch/arm/kernel/traps.c       2005/01/25 04:27:52     1.47
@@ -200,7 +200,7 @@
        barrier();
 }
 
-spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(die_lock);
 
 /*
  * This function is protected against re-entrancy.
@@ -241,7 +241,7 @@
 }
 
 static LIST_HEAD(undef_hook);
-static spinlock_t undef_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(undef_lock);
 
 void register_undef_hook(struct undef_hook *hook)
 {
diff -urN linux/arch/arm/lib/io-readsw-armv4.S 
linux/arch/arm/lib/io-readsw-armv4.S
--- linux/arch/arm/lib/io-readsw-armv4.S        2003/10/09 13:09:26     1.5
+++ linux/arch/arm/lib/io-readsw-armv4.S        2005/01/25 04:27:52     1.6
@@ -18,25 +18,14 @@
 #endif
                .endm
 
-.insw_bad_alignment:
-               adr     r0, .insw_bad_align_msg
-               mov     r2, lr
-               b       panic
-.insw_bad_align_msg:
-               .asciz  "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
-               .align
-
-.insw_align:   tst     r1, #1
-               bne     .insw_bad_alignment
-
-               ldrh    r3, [r0]
-               strh    r3, [r1], #2
-
-               subs    r2, r2, #1
-               RETINSTR(moveq, pc, lr)
+.insw_align:   movs    ip, r1, lsl #31
+               bne     .insw_noalign
+               ldrh    ip, [r0]
+               sub     r2, r2, #1
+               strh    ip, [r1], #2
 
 ENTRY(__raw_readsw)
-               teq     r2, #0          @ do we have to check for the zero len?
+               teq     r2, #0
                moveq   pc, lr
                tst     r1, #3
                bne     .insw_align
@@ -62,14 +51,10 @@
                ldrh    lr, [r0]
                pack    ip, ip, lr
 
-               stmia   r1!, {r3 - r5, ip}
-
                subs    r2, r2, #8
+               stmia   r1!, {r3 - r5, ip}
                bpl     .insw_8_lp
 
-               tst     r2, #7
-               LOADREGS(eqfd, sp!, {r4, r5, pc})
-
 .no_insw_8:    tst     r2, #4
                beq     .no_insw_4
 
@@ -83,17 +68,63 @@
 
                stmia   r1!, {r3, r4}
 
-.no_insw_4:    tst     r2, #2
-               beq     .no_insw_2
+.no_insw_4:    movs    r2, r2, lsl #31
+               bcc     .no_insw_2
 
                ldrh    r3, [r0]
                ldrh    ip, [r0]
                pack    r3, r3, ip
-
                str     r3, [r1], #4
 
-.no_insw_2:    tst     r2, #1
-               ldrneh  r3, [r0]
+.no_insw_2:    ldrneh  r3, [r0]
                strneh  r3, [r1]
 
-               LOADREGS(fd, sp!, {r4, r5, pc})
+               ldmfd   sp!, {r4, r5, pc}
+
+#ifdef __ARMEB__
+#define _BE_ONLY_(code...)     code
+#define _LE_ONLY_(code...)
+#define push_hbyte0            lsr #8
+#define pull_hbyte1            lsl #24
+#else
+#define _BE_ONLY_(code...)
+#define _LE_ONLY_(code...) code
+#define push_hbyte0            lsl #24
+#define pull_hbyte1            lsr #8
+#endif
+
+.insw_noalign: stmfd   sp!, {r4, lr}
+               ldrccb  ip, [r1, #-1]!
+               bcc     1f
+
+               ldrh    ip, [r0]
+               sub     r2, r2, #1
+   _BE_ONLY_(  mov     ip, ip, ror #8          )
+               strb    ip, [r1], #1
+   _LE_ONLY_(  mov     ip, ip, lsr #8          )
+   _BE_ONLY_(  mov     ip, ip, lsr #24         )
+
+1:             subs    r2, r2, #2
+               bmi     3f
+   _BE_ONLY_(  mov     ip, ip, lsl #24         )
+
+2:             ldrh    r3, [r0]
+               ldrh    r4, [r0]
+               subs    r2, r2, #2
+               orr     ip, ip, r3, lsl #8
+               orr     ip, ip, r4, push_hbyte0
+               str     ip, [r1], #4
+               mov     ip, r4, pull_hbyte1
+               bpl     2b
+
+   _BE_ONLY_(  mov     ip, ip, lsr #24         )
+
+3:             tst     r2, #1
+               strb    ip, [r1], #1
+               ldrneh  ip, [r0]
+   _BE_ONLY_(  movne   ip, ip, ror #8          )
+               strneb  ip, [r1], #1
+   _LE_ONLY_(  movne   ip, ip, lsr #8          )
+   _BE_ONLY_(  movne   ip, ip, lsr #24         )
+               strneb  ip, [r1]
+               ldmfd   sp!, {r4, pc}
diff -urN linux/arch/arm/lib/io-writesw-armv4.S 
linux/arch/arm/lib/io-writesw-armv4.S
--- linux/arch/arm/lib/io-writesw-armv4.S       2003/10/09 13:09:26     1.5
+++ linux/arch/arm/lib/io-writesw-armv4.S       2005/01/25 04:27:52     1.6
@@ -22,27 +22,17 @@
 #endif
                .endm
 
-.outsw_bad_alignment:
-               adr     r0, .outsw_bad_align_msg
-               mov     r2, lr
-               b       panic
-.outsw_bad_align_msg:
-               .asciz  "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
-               .align
-
-.outsw_align:  tst     r1, #1
-               bne     .outsw_bad_alignment
+.outsw_align:  movs    ip, r1, lsl #31
+               bne     .outsw_noalign
 
                ldrh    r3, [r1], #2
+               sub     r2, r2, #1
                strh    r3, [r0]
 
-               subs    r2, r2, #1
-               RETINSTR(moveq, pc, lr)
-
 ENTRY(__raw_writesw)
-               teq     r2, #0          @ do we have to check for the zero len?
+               teq     r2, #0
                moveq   pc, lr
-               tst     r1, #3
+               ands    r3, r1, #3
                bne     .outsw_align
 
                stmfd   sp!, {r4, r5, lr}
@@ -51,16 +41,13 @@
                bmi     .no_outsw_8
 
 .outsw_8_lp:   ldmia   r1!, {r3, r4, r5, ip}
+               subs    r2, r2, #8
                outword r3
                outword r4
                outword r5
                outword ip
-               subs    r2, r2, #8
                bpl     .outsw_8_lp
 
-               tst     r2, #7
-               LOADREGS(eqfd, sp!, {r4, r5, pc})
-
 .no_outsw_8:   tst     r2, #4
                beq     .no_outsw_4
 
@@ -68,14 +55,41 @@
                outword r3
                outword ip
 
-.no_outsw_4:   tst     r2, #2
-               beq     .no_outsw_2
+.no_outsw_4:   movs    r2, r2, lsl #31
+               bcc     .no_outsw_2
 
                ldr     r3, [r1], #4
                outword r3
 
-.no_outsw_2:   tst     r2, #1
-               ldrneh  r3, [r1]
+.no_outsw_2:   ldrneh  r3, [r1]
                strneh  r3, [r0]
 
-               LOADREGS(fd, sp!, {r4, r5, pc})
+               ldmfd   sp!, {r4, r5, pc}
+
+#ifdef __ARMEB__
+#define pull_hbyte0    lsl #8
+#define push_hbyte1    lsr #24
+#else
+#define pull_hbyte0    lsr #24
+#define push_hbyte1    lsl #8
+#endif
+
+.outsw_noalign:        ldr     r3, [r1, -r3]!
+               subcs   r2, r2, #1
+               bcs     2f
+               subs    r2, r2, #2
+               bmi     3f
+
+1:             mov     ip, r3, lsr #8
+               strh    ip, [r0]
+2:             mov     ip, r3, pull_hbyte0
+               ldr     r3, [r1, #4]!
+               subs    r2, r2, #2
+               orr     ip, ip, r3, push_hbyte1
+               strh    ip, [r0]
+               bpl     2b
+
+3:             tst     r2, #1
+2:             movne   ip, r3, lsr #8
+               strneh  ip, [r0]
+               mov     pc, lr
diff -urN linux/arch/arm/mach-footbridge/Kconfig 
linux/arch/arm/mach-footbridge/Kconfig
--- linux/arch/arm/mach-footbridge/Kconfig      2004/10/25 20:44:10     1.4
+++ linux/arch/arm/mach-footbridge/Kconfig      2005/01/25 04:27:52     1.5
@@ -26,7 +26,7 @@
          <http://www.crl.hpl.hp.com/projects/personalserver/>
 
          If you have any questions or comments about the  Compaq Personal
-         Server, send e-mail to skiff@crl.dec.com.
+         Server, send e-mail to <skiff@crl.dec.com>.
 
 config ARCH_EBSA285_ADDIN
        bool "EBSA285 (addin mode)"
diff -urN linux/arch/arm/mach-footbridge/ebsa285-leds.c 
linux/arch/arm/mach-footbridge/ebsa285-leds.c
--- linux/arch/arm/mach-footbridge/ebsa285-leds.c       2000/10/05 01:18:42     
1.1
+++ linux/arch/arm/mach-footbridge/ebsa285-leds.c       2005/01/25 04:27:52     
1.2
@@ -32,7 +32,7 @@
 static char led_state;
 static char hw_led_state;
 
-static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(leds_lock);
 
 static void ebsa285_leds_event(led_event_t evt)
 {
diff -urN linux/arch/arm/mach-footbridge/netwinder-hw.c 
linux/arch/arm/mach-footbridge/netwinder-hw.c
--- linux/arch/arm/mach-footbridge/netwinder-hw.c       2004/12/04 18:15:58     
1.6
+++ linux/arch/arm/mach-footbridge/netwinder-hw.c       2005/01/25 04:27:52     
1.7
@@ -68,7 +68,7 @@
 /*
  * This is a lock for accessing ports GP1_IO_BASE and GP2_IO_BASE
  */
-spinlock_t gpio_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(gpio_lock);
 
 static unsigned int current_gpio_op;
 static unsigned int current_gpio_io;
diff -urN linux/arch/arm/mach-footbridge/netwinder-leds.c 
linux/arch/arm/mach-footbridge/netwinder-leds.c
--- linux/arch/arm/mach-footbridge/netwinder-leds.c     2000/10/05 01:18:42     
1.1
+++ linux/arch/arm/mach-footbridge/netwinder-leds.c     2005/01/25 04:27:52     
1.2
@@ -32,7 +32,7 @@
 static char led_state;
 static char hw_led_state;
 
-static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(leds_lock);
 extern spinlock_t gpio_lock;
 
 static void netwinder_leds_event(led_event_t evt)
diff -urN linux/arch/arm/mach-integrator/core.c 
linux/arch/arm/mach-integrator/core.c
--- linux/arch/arm/mach-integrator/core.c       2004/10/25 20:44:10     1.8
+++ linux/arch/arm/mach-integrator/core.c       2005/01/25 04:27:53     1.9
@@ -115,7 +115,7 @@
 
 #define CM_CTRL        IO_ADDRESS(INTEGRATOR_HDR_BASE) + 
INTEGRATOR_HDR_CTRL_OFFSET
 
-static spinlock_t cm_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cm_lock);
 
 /**
  * cm_control - update the CM_CTRL register.
diff -urN linux/arch/arm/mach-integrator/pci_v3.c 
linux/arch/arm/mach-integrator/pci_v3.c
--- linux/arch/arm/mach-integrator/pci_v3.c     2003/10/09 13:09:26     1.15
+++ linux/arch/arm/mach-integrator/pci_v3.c     2005/01/25 04:27:53     1.16
@@ -163,7 +163,7 @@
  *      7:2    register number
  *  
  */
-static spinlock_t v3_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(v3_lock);
 
 #define PCI_BUS_NONMEM_START   0x00000000
 #define PCI_BUS_NONMEM_SIZE    SZ_256M
diff -urN linux/arch/arm/mach-ixp2000/Kconfig 
linux/arch/arm/mach-ixp2000/Kconfig
--- linux/arch/arm/mach-ixp2000/Kconfig 2004/09/19 12:30:02     1.1
+++ linux/arch/arm/mach-ixp2000/Kconfig 2005/01/25 04:27:53     1.2
@@ -14,21 +14,21 @@
        help
          Say 'Y' here if you want your kernel to support the Radisys
          ENP2611 PCI network processing card. For more information on
-         this card, see Documentation/arm/ENP2611.
+         this card, see <file:Documentation/arm/ENP2611>.
 
 config ARCH_IXDP2400
        bool "Support Intel IXDP2400"
        help
          Say 'Y' here if you want your kernel to support the Intel
          IXDP2400 reference platform. For more information on
-         this platform, see Documentation/arm/IXP2000.
+         this platform, see <file:Documentation/arm/IXP2000>.
 
 config ARCH_IXDP2800
        bool "Support Intel IXDP2800"
        help
          Say 'Y' here if you want your kernel to support the Intel
          IXDP2800 reference platform. For more information on
-         this platform, see Documentation/arm/IXP2000.
+         this platform, see <file:Documentation/arm/IXP2000>.
 
 config ARCH_IXDP2X00
        bool
@@ -40,14 +40,14 @@
        help
          Say 'Y' here if you want your kernel to support the Intel
          IXDP2401 reference platform. For more information on
-         this platform, see Documentation/arm/IXP2000.
+         this platform, see <file:Documentation/arm/IXP2000>.
 
 config ARCH_IXDP2801
        bool "Support Intel IXDP2801"
        help
          Say 'Y' here if you want your kernel to support the Intel
          IXDP2801 reference platform. For more information on
-         this platform, see Documentation/arm/IXP2000.
+         this platform, see <file:Documentation/arm/IXP2000>.
 
 config ARCH_IXDP2X01
        bool
diff -urN linux/arch/arm/mach-ixp2000/core.c linux/arch/arm/mach-ixp2000/core.c
--- linux/arch/arm/mach-ixp2000/core.c  2005/01/13 14:05:18     1.5
+++ linux/arch/arm/mach-ixp2000/core.c  2005/01/25 04:27:53     1.6
@@ -40,7 +40,7 @@
 #include <asm/mach/time.h>
 #include <asm/mach/irq.h>
 
-static spinlock_t ixp2000_slowport_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ixp2000_slowport_lock);
 static unsigned long ixp2000_slowport_irq_flags;
 
 /*************************************************************************
@@ -171,22 +171,9 @@
 
 unsigned long ixp2000_gettimeoffset (void)
 {
-       unsigned long elapsed1, elapsed2, pending;
        unsigned long offset;
 
-       elapsed1 = *IXP2000_T1_CSR;
-       pending = (*IXP2000_IRQ_STATUS & IRQ_MASK_TIMER1);
-       elapsed2 = *IXP2000_T1_CSR;
-
-       offset = ticks_per_jiffy - elapsed2;
-
-       /*
-        * We have two cases to cover, one where we were pending
-        * already, and another where it overflowed while we were
-        * checking the timers.
-        */
-       if ((elapsed2 > elapsed1) || pending)
-               offset += ticks_per_jiffy;
+       offset = next_jiffy_time - *IXP2000_T4_CSR;
 
        return offset / ticks_per_usec;
 }
diff -urN linux/arch/arm/mach-ixp4xx/Kconfig linux/arch/arm/mach-ixp4xx/Kconfig
--- linux/arch/arm/mach-ixp4xx/Kconfig  2005/01/13 14:05:18     1.4
+++ linux/arch/arm/mach-ixp4xx/Kconfig  2005/01/25 04:27:53     1.5
@@ -13,28 +13,28 @@
        help
          Say 'Y' here if you want your kernel to support the Gateworks
          Avila Network Platform. For more information on this platform,
-         see Documentation/arm/IXP4xx.
+         see <file:Documentation/arm/IXP4xx>.
 
 config ARCH_ADI_COYOTE
        bool "Coyote"
        help
          Say 'Y' here if you want your kernel to support the ADI 
          Engineering Coyote Gateway Reference Platform. For more
-         information on this platform, see Documentation/arm/IXP4xx.
+         information on this platform, see <file:Documentation/arm/IXP4xx>.
 
 config ARCH_IXDP425
        bool "IXDP425"
        help
          Say 'Y' here if you want your kernel to support Intel's 
          IXDP425 Development Platform (Also known as Richfield).  
-         For more information on this platform, see Documentation/arm/IXP4xx.
+         For more information on this platform, see 
<file:Documentation/arm/IXP4xx>.
 
 config MACH_IXDPG425
        bool "IXDPG425"
        help
          Say 'Y' here if you want your kernel to support Intel's
          IXDPG425 Development Platform (Also known as Montajade).
-         For more information on this platform, see Documentation/arm/IXP4xx.
+         For more information on this platform, see 
<file:Documentation/arm/IXP4xx>.
 
 config MACH_IXDP465
        bool "IXDP465"
@@ -59,7 +59,7 @@
        help
          Say 'Y' here if you want your kernel to support the Motorola
          PrPCM1100 Processor Mezanine Module. For more information on
-         this platform, see Documentation/arm/IXP4xx.
+         this platform, see <file:Documentation/arm/IXP4xx>.
 
 #
 # Avila and IXDP share the same source for now. Will change in future
@@ -87,7 +87,7 @@
           1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB).
              To access PCI via this space, we simply ioremap() the BAR
              into the kernel and we can use the standard read[bwl]/write[bwl]
-             macros. This is the preffered method due to speed but it
+             macros. This is the preferred method due to speed but it
              limits the system to just 64MB of PCI memory. This can be 
              problamatic if using video cards and other memory-heavy devices.
           
diff -urN linux/arch/arm/mach-ixp4xx/common-pci.c 
linux/arch/arm/mach-ixp4xx/common-pci.c
--- linux/arch/arm/mach-ixp4xx/common-pci.c     2005/01/13 14:05:18     1.6
+++ linux/arch/arm/mach-ixp4xx/common-pci.c     2005/01/25 04:27:53     1.7
@@ -53,7 +53,7 @@
  * these transactions are atomic or we will end up
  * with corrupt data on the bus or in a driver.
  */
-static spinlock_t ixp4xx_pci_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ixp4xx_pci_lock);
 
 /*
  * Read from PCI config space
diff -urN linux/arch/arm/mach-ixp4xx/coyote-pci.c 
linux/arch/arm/mach-ixp4xx/coyote-pci.c
--- linux/arch/arm/mach-ixp4xx/coyote-pci.c     2004/06/06 02:12:34     1.1
+++ linux/arch/arm/mach-ixp4xx/coyote-pci.c     2005/01/25 04:27:53     1.2
@@ -14,6 +14,7 @@
  *
  */
 
+#include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/init.h>
 
diff -urN linux/arch/arm/mach-ixp4xx/coyote-setup.c 
linux/arch/arm/mach-ixp4xx/coyote-setup.c
--- linux/arch/arm/mach-ixp4xx/coyote-setup.c   2005/01/13 14:05:18     1.6
+++ linux/arch/arm/mach-ixp4xx/coyote-setup.c   2005/01/25 04:27:53     1.7
@@ -8,6 +8,7 @@
  * Author: Deepak Saxena <dsaxena@plexity.net>
  */
 
+#include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/serial.h>
diff -urN linux/arch/arm/mach-ixp4xx/ixdp425-pci.c 
linux/arch/arm/mach-ixp4xx/ixdp425-pci.c
--- linux/arch/arm/mach-ixp4xx/ixdp425-pci.c    2005/01/13 14:05:18     1.2
+++ linux/arch/arm/mach-ixp4xx/ixdp425-pci.c    2005/01/25 04:27:53     1.3
@@ -14,6 +14,7 @@
  *
  */
 
+#include <linux/kernel.h>
 #include <linux/config.h>
 #include <linux/pci.h>
 #include <linux/init.h>
diff -urN linux/arch/arm/mach-ixp4xx/ixdp425-setup.c 
linux/arch/arm/mach-ixp4xx/ixdp425-setup.c
--- linux/arch/arm/mach-ixp4xx/ixdp425-setup.c  2005/01/13 14:05:18     1.5
+++ linux/arch/arm/mach-ixp4xx/ixdp425-setup.c  2005/01/25 04:27:53     1.6
@@ -8,6 +8,7 @@
  * Author: Deepak Saxena <dsaxena@plexity.net>
  */
 
+#include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/serial.h>
diff -urN linux/arch/arm/mach-ixp4xx/ixdpg425-pci.c 
linux/arch/arm/mach-ixp4xx/ixdpg425-pci.c
--- linux/arch/arm/mach-ixp4xx/ixdpg425-pci.c   2004/12/04 18:15:58     1.1
+++ linux/arch/arm/mach-ixp4xx/ixdpg425-pci.c   2005/01/25 04:27:53     1.2
@@ -13,6 +13,7 @@
  *
  */
 
+#include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/init.h>
 
diff -urN linux/arch/arm/mach-ixp4xx/prpmc1100-pci.c 
linux/arch/arm/mach-ixp4xx/prpmc1100-pci.c
--- linux/arch/arm/mach-ixp4xx/prpmc1100-pci.c  2004/06/06 02:12:34     1.1
+++ linux/arch/arm/mach-ixp4xx/prpmc1100-pci.c  2005/01/25 04:27:53     1.2
@@ -19,6 +19,7 @@
  *
  */
 
+#include <linux/kernel.h>
 #include <linux/config.h>
 #include <linux/pci.h>
 #include <linux/init.h>
diff -urN linux/arch/arm/mach-ixp4xx/prpmc1100-setup.c 
linux/arch/arm/mach-ixp4xx/prpmc1100-setup.c
--- linux/arch/arm/mach-ixp4xx/prpmc1100-setup.c        2005/01/13 14:05:18     
1.5
+++ linux/arch/arm/mach-ixp4xx/prpmc1100-setup.c        2005/01/25 04:27:53     
1.6
@@ -8,6 +8,7 @@
  * Author: Deepak Saxena <dsaxena@plexity.net>
  */
 
+#include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/serial.h>
diff -urN linux/arch/arm/mach-omap/clock.c linux/arch/arm/mach-omap/clock.c
--- linux/arch/arm/mach-omap/clock.c    2004/11/15 11:49:14     1.1
+++ linux/arch/arm/mach-omap/clock.c    2005/01/25 04:27:53     1.2
@@ -22,7 +22,7 @@
 
 static LIST_HEAD(clocks);
 static DECLARE_MUTEX(clocks_sem);
-static spinlock_t clockfw_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(clockfw_lock);
 static void propagate_rate(struct clk *  clk);
 /* MPU virtual clock functions */
 static int select_table_rate(unsigned long rate);
diff -urN linux/arch/arm/mach-omap/mux.c linux/arch/arm/mach-omap/mux.c
--- linux/arch/arm/mach-omap/mux.c      2004/11/15 11:49:14     1.3
+++ linux/arch/arm/mach-omap/mux.c      2005/01/25 04:27:53     1.4
@@ -40,7 +40,7 @@
 int __init_or_module
 omap_cfg_reg(const reg_cfg_t reg_cfg)
 {
-       static spinlock_t mux_spin_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(mux_spin_lock);
 
        unsigned long flags;
        reg_cfg_set *cfg;
diff -urN linux/arch/arm/mach-pxa/corgi_ssp.c 
linux/arch/arm/mach-pxa/corgi_ssp.c
--- linux/arch/arm/mach-pxa/corgi_ssp.c 1970/01/01 00:00:00
+++ linux/arch/arm/mach-pxa/corgi_ssp.c Tue Jan 25 04:27:53 2005        1.1
@@ -0,0 +1,248 @@
+/*
+ *  SSP control code for Sharp Corgi devices
+ *
+ *  Copyright (c) 2004 Richard Purdie
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <asm/hardware.h>
+
+#include <asm/arch/ssp.h>
+#include <asm/arch/corgi.h>
+#include <asm/arch/pxa-regs.h>
+
+static spinlock_t corgi_ssp_lock = SPIN_LOCK_UNLOCKED;
+static struct ssp_dev corgi_ssp_dev;
+static struct ssp_state corgi_ssp_state;
+
+/*
+ * There are three devices connected to the SSP interface:
+ *   1. A touchscreen controller (TI ADS7846 compatible)
+ *   2. An LCD contoller (with some Backlight functionality)
+ *   3. A battery moinitoring IC (Maxim MAX1111)
+ *
+ * Each device uses a different speed/mode of communication.
+ *
+ * The touchscreen is very sensitive and the most frequently used
+ * so the port is left configured for this.
+ *
+ * Devices are selected using Chip Selects on GPIOs.
+ */
+
+/*
+ *  ADS7846 Routines
+ */
+unsigned long corgi_ssp_ads7846_putget(ulong data)
+{
+       unsigned long ret,flag;
+
+       spin_lock_irqsave(&corgi_ssp_lock, flag);
+       GPCR0 = GPIO_bit(CORGI_GPIO_ADS7846_CS);
+
+       ssp_write_word(&corgi_ssp_dev,data);
+       ret = ssp_read_word(&corgi_ssp_dev);
+
+       GPSR0 = GPIO_bit(CORGI_GPIO_ADS7846_CS);
+       spin_unlock_irqrestore(&corgi_ssp_lock, flag);
+
+       return ret;
+}
+
+/*
+ * NOTE: These functions should always be called in interrupt context
+ * and use the _lock and _unlock functions. They are very time sensitive.
+ */
+void corgi_ssp_ads7846_lock(void)
+{
+       spin_lock(&corgi_ssp_lock);
+       GPCR0 = GPIO_bit(CORGI_GPIO_ADS7846_CS);
+}
+
+void corgi_ssp_ads7846_unlock(void)
+{
+       GPSR0 = GPIO_bit(CORGI_GPIO_ADS7846_CS);
+       spin_unlock(&corgi_ssp_lock);
+}
+
+void corgi_ssp_ads7846_put(ulong data)
+{
+       ssp_write_word(&corgi_ssp_dev,data);
+}
+
+unsigned long corgi_ssp_ads7846_get(void)
+{
+       return ssp_read_word(&corgi_ssp_dev);
+}
+
+EXPORT_SYMBOL(corgi_ssp_ads7846_putget);
+EXPORT_SYMBOL(corgi_ssp_ads7846_lock);
+EXPORT_SYMBOL(corgi_ssp_ads7846_unlock);
+EXPORT_SYMBOL(corgi_ssp_ads7846_put);
+EXPORT_SYMBOL(corgi_ssp_ads7846_get);
+
+
+/*
+ *  LCD/Backlight Routines
+ */
+unsigned long corgi_ssp_dac_put(ulong data)
+{
+       unsigned long flag;
+
+       spin_lock_irqsave(&corgi_ssp_lock, flag);
+       GPCR0 = GPIO_bit(CORGI_GPIO_LCDCON_CS);
+
+       ssp_disable(&corgi_ssp_dev);
+       ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), 
SSCR1_SPH, 0, SSCR0_SerClkDiv(76));
+       ssp_enable(&corgi_ssp_dev);
+
+       ssp_write_word(&corgi_ssp_dev,data);
+       /* Read null data back from device to prevent SSP overflow */
+       ssp_read_word(&corgi_ssp_dev);
+
+       ssp_disable(&corgi_ssp_dev);
+       ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 
0, SSCR0_SerClkDiv(2));
+       ssp_enable(&corgi_ssp_dev);
+       GPSR0 = GPIO_bit(CORGI_GPIO_LCDCON_CS);
+       spin_unlock_irqrestore(&corgi_ssp_lock, flag);
+
+       return 0;
+}
+
+void corgi_ssp_lcdtg_send(u8 adrs, u8 data)
+{
+       corgi_ssp_dac_put(((adrs & 0x07) << 5) | (data & 0x1f));
+}
+
+void corgi_ssp_blduty_set(int duty)
+{
+       corgi_ssp_lcdtg_send(0x02,duty);
+}
+
+EXPORT_SYMBOL(corgi_ssp_lcdtg_send);
+EXPORT_SYMBOL(corgi_ssp_blduty_set);
+
+/*
+ *  Max1111 Routines
+ */
+int corgi_ssp_max1111_get(ulong data)
+{
+       unsigned long flag;
+       int voltage,voltage1,voltage2;
+
+       spin_lock_irqsave(&corgi_ssp_lock, flag);
+       GPCR0 = GPIO_bit(CORGI_GPIO_MAX1111_CS);
+       ssp_disable(&corgi_ssp_dev);
+       ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), 0, 
0, SSCR0_SerClkDiv(8));
+       ssp_enable(&corgi_ssp_dev);
+
+       udelay(1);
+
+       /* TB1/RB1 */
+       ssp_write_word(&corgi_ssp_dev,data);
+       ssp_read_word(&corgi_ssp_dev); /* null read */
+
+       /* TB12/RB2 */
+       ssp_write_word(&corgi_ssp_dev,0);
+       voltage1=ssp_read_word(&corgi_ssp_dev);
+
+       /* TB13/RB3*/
+       ssp_write_word(&corgi_ssp_dev,0);
+       voltage2=ssp_read_word(&corgi_ssp_dev);
+
+       ssp_disable(&corgi_ssp_dev);
+       ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 
0, SSCR0_SerClkDiv(2));
+       ssp_enable(&corgi_ssp_dev);
+       GPSR0 = GPIO_bit(CORGI_GPIO_MAX1111_CS);
+       spin_unlock_irqrestore(&corgi_ssp_lock, flag);
+
+       if (voltage1 & 0xc0 || voltage2 & 0x3f)
+               voltage = -1;
+       else
+               voltage = ((voltage1 << 2) & 0xfc) | ((voltage2 >> 6) & 0x03);
+
+       return voltage;
+}
+
+EXPORT_SYMBOL(corgi_ssp_max1111_get);
+
+/*
+ *  Support Routines
+ */
+int __init corgi_ssp_probe(struct device *dev)
+{
+       int ret;
+
+       /* Chip Select - Disable All */
+       GPDR0 |= GPIO_bit(CORGI_GPIO_LCDCON_CS); /* output */
+       GPSR0 = GPIO_bit(CORGI_GPIO_LCDCON_CS);  /* High - Disable LCD 
Control/Timing Gen */
+       GPDR0 |= GPIO_bit(CORGI_GPIO_MAX1111_CS); /* output */
+       GPSR0 = GPIO_bit(CORGI_GPIO_MAX1111_CS);  /* High - Disable MAX1111*/
+       GPDR0 |= GPIO_bit(CORGI_GPIO_ADS7846_CS);  /* output */
+       GPSR0 = GPIO_bit(CORGI_GPIO_ADS7846_CS);   /* High - Disable ADS7846*/
+
+       ret=ssp_init(&corgi_ssp_dev,1);
+
+       if (ret)
+               printk(KERN_ERR "Unable to register SSP handler!\n");
+       else {
+               ssp_disable(&corgi_ssp_dev);
+               ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b 
)), 0, 0, SSCR0_SerClkDiv(2));
+               ssp_enable(&corgi_ssp_dev);
+       }
+
+       return ret;
+}
+
+static int corgi_ssp_remove(struct device *dev)
+{
+       ssp_exit(&corgi_ssp_dev);
+       return 0;
+}
+
+static int corgi_ssp_suspend(struct device *dev, u32 state, u32 level)
+{
+       if (level == SUSPEND_POWER_DOWN) {
+               ssp_flush(&corgi_ssp_dev);
+               ssp_save_state(&corgi_ssp_dev,&corgi_ssp_state);
+       }
+       return 0;
+}
+
+static int corgi_ssp_resume(struct device *dev, u32 level)
+{
+       if (level == RESUME_POWER_ON) {
+               GPSR0 = GPIO_bit(CORGI_GPIO_LCDCON_CS);  /* High - Disable LCD 
Control/Timing Gen */
+               GPSR0 = GPIO_bit(CORGI_GPIO_MAX1111_CS); /* High - Disable 
MAX1111*/
+               GPSR0 = GPIO_bit(CORGI_GPIO_ADS7846_CS); /* High - Disable 
ADS7846*/
+               ssp_restore_state(&corgi_ssp_dev,&corgi_ssp_state);
+               ssp_enable(&corgi_ssp_dev);
+       }
+       return 0;
+}
+
+static struct device_driver corgissp_driver = {
+       .name           = "corgi-ssp",
+       .bus            = &platform_bus_type,
+       .probe          = corgi_ssp_probe,
+       .remove         = corgi_ssp_remove,
+       .suspend        = corgi_ssp_suspend,
+       .resume         = corgi_ssp_resume,
+};
+
+int __init corgi_ssp_init(void)
+{
+       return driver_register(&corgissp_driver);
+}
+
+arch_initcall(corgi_ssp_init);
diff -urN linux/arch/arm/mach-pxa/Makefile linux/arch/arm/mach-pxa/Makefile
--- linux/arch/arm/mach-pxa/Makefile    2005/01/13 14:05:19     1.10
+++ linux/arch/arm/mach-pxa/Makefile    2005/01/25 04:27:53     1.11
@@ -11,7 +11,7 @@
 obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
 obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
 obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
-obj-$(CONFIG_PXA_SHARPSL)      += corgi.o
+obj-$(CONFIG_PXA_SHARPSL)      += corgi.o corgi_ssp.o ssp.o
 
 # Support for blinky lights
 led-y := leds.o
diff -urN linux/arch/arm/mach-pxa/corgi.c linux/arch/arm/mach-pxa/corgi.c
--- linux/arch/arm/mach-pxa/corgi.c     2005/01/13 14:05:19     1.1
+++ linux/arch/arm/mach-pxa/corgi.c     2005/01/25 04:27:53     1.2
@@ -18,6 +18,7 @@
 #include <linux/major.h>
 #include <linux/fs.h>
 #include <linux/interrupt.h>
+#include <linux/mmc/host.h>
 
 #include <asm/setup.h>
 #include <asm/memory.h>
@@ -32,19 +33,19 @@
 
 #include <asm/arch/pxa-regs.h>
 #include <asm/arch/irq.h>
+#include <asm/arch/mmc.h>
+#include <asm/arch/udc.h>
 #include <asm/arch/corgi.h>
 
 #include <asm/hardware/scoop.h>
+#include <video/w100fb.h>
 
 #include "generic.h"
 
-extern void corgi_ssp_lcdtg_send (u8 adrs, u8 data);
-
-static void __init corgi_init_irq(void)
-{
-       pxa_init_irq();
-}
 
+/*
+ * Corgi SCOOP Device
+ */
 static struct resource corgi_scoop_resources[] = {
        [0] = {
                .start          = 0x10800000,
@@ -68,13 +69,160 @@
        .resource       = corgi_scoop_resources,
 };
 
+
+/*
+ * Corgi SSP Device
+ *
+ * Set the parent as the scoop device because a lot of SSP devices
+ * also use scoop functions and this makes the power up/down order
+ * work correctly.
+ */
+extern void corgi_ssp_lcdtg_send (u8 adrs, u8 data);
+
+static struct platform_device corgissp_device = {
+       .name           = "corgi-ssp",
+       .dev            = {
+               .parent = &corgiscoop_device.dev,
+       },
+       .id             = -1,
+};
+
+
+/*
+ * Corgi w100 Frame Buffer Device
+ */
+static struct w100fb_mach_info corgi_fb_info = {
+       .w100fb_ssp_send        = corgi_ssp_lcdtg_send,
+       .comadj                         = -1,
+       .phadadj                        = -1,
+};
+
+static struct resource corgi_fb_resources[] = {
+       [0] = {
+               .start          = 0x08000000,
+               .end            = 0x08ffffff,
+               .flags          = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device corgifb_device = {
+       .name           = "w100fb",
+       .id             = -1,
+       .dev            = {
+               .platform_data  = &corgi_fb_info,
+               .parent = &corgissp_device.dev,
+       },
+       .num_resources  = ARRAY_SIZE(corgi_fb_resources),
+       .resource       = corgi_fb_resources,
+};
+
+
+/*
+ * MMC/SD Device
+ *
+ * The card detect interrupt isn't debounced so we delay it by HZ/4
+ * to give the card a chance to fully insert/eject.
+ */
+static struct mmc_detect {
+       struct timer_list detect_timer;
+       void *devid;
+} mmc_detect;
+
+static void mmc_detect_callback(unsigned long data)
+{
+       mmc_detect_change(mmc_detect.devid);
+}
+
+static irqreturn_t corgi_mmc_detect_int(int irq, void *devid, struct pt_regs 
*regs)
+{
+       mmc_detect.devid=devid;
+       mod_timer(&mmc_detect.detect_timer, jiffies + HZ/4);
+       return IRQ_HANDLED;
+}
+
+static int corgi_mci_init(struct device *dev, irqreturn_t 
(*unused_detect_int)(int, void *, struct pt_regs *), void *data)
+{
+       int err;
+
+       /* setup GPIO for PXA25x MMC controller */
+       pxa_gpio_mode(GPIO6_MMCCLK_MD);
+       pxa_gpio_mode(GPIO8_MMCCS0_MD);
+       pxa_gpio_mode(CORGI_GPIO_nSD_DETECT | GPIO_IN);
+       pxa_gpio_mode(CORGI_GPIO_SD_PWR | GPIO_OUT);
+
+       err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_mmc_detect_int, 
SA_INTERRUPT,
+                            "MMC card detect", data);
+       if (err) {
+               printk(KERN_ERR "corgi_mci_init: MMC/SD: can't request MMC card 
detect IRQ\n");
+               return -1;
+       }
+
+       init_timer(&mmc_detect.detect_timer);
+       mmc_detect.detect_timer.function = mmc_detect_callback;
+       mmc_detect.detect_timer.data = (unsigned long) &mmc_detect;
+
+       set_irq_type(CORGI_IRQ_GPIO_nSD_DETECT, IRQT_BOTHEDGE);
+
+       return 0;
+}
+
+static void corgi_mci_setpower(struct device *dev, unsigned int vdd)
+{
+       struct pxamci_platform_data* p_d = dev->platform_data;
+
+       if (( 1 << vdd) & p_d->ocr_mask) {
+               printk(KERN_DEBUG "%s: on\n", __FUNCTION__);
+               GPSR1 = GPIO_bit(CORGI_GPIO_SD_PWR);
+       } else {
+               printk(KERN_DEBUG "%s: off\n", __FUNCTION__);
+               GPCR1 = GPIO_bit(CORGI_GPIO_SD_PWR);
+       }
+}
+
+static void corgi_mci_exit(struct device *dev, void *data)
+{
+       free_irq(CORGI_IRQ_GPIO_nSD_DETECT, data);
+       del_timer(&mmc_detect.detect_timer);
+}
+
+static struct pxamci_platform_data corgi_mci_platform_data = {
+       .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
+       .init           = corgi_mci_init,
+       .setpower       = corgi_mci_setpower,
+       .exit           = corgi_mci_exit,
+};
+
+
+/*
+ * USB Device Controller
+ */
+static void corgi_udc_command(int cmd)
+{
+       switch(cmd)     {
+       case PXA2XX_UDC_CMD_CONNECT:
+               GPSR(CORGI_GPIO_USB_PULLUP) = GPIO_bit(CORGI_GPIO_USB_PULLUP);
+               break;
+       case PXA2XX_UDC_CMD_DISCONNECT:
+               GPCR(CORGI_GPIO_USB_PULLUP) = GPIO_bit(CORGI_GPIO_USB_PULLUP);
+               break;
+       }
+}
+
+static struct pxa2xx_udc_mach_info udc_info __initdata = {
+       /* no connect GPIO; corgi can't tell connection status */
+       .udc_command            = corgi_udc_command,
+};
+
+
 static struct platform_device *devices[] __initdata = {
        &corgiscoop_device,
+       &corgissp_device,
+       &corgifb_device,
 };
 
 static struct sharpsl_flash_param_info sharpsl_flash_param;
 
-void corgi_get_param(void)
+static void corgi_get_param(void)
 {
        sharpsl_flash_param.comadj_keyword = readl(FLASH_MEM_BASE + 
FLASH_COMADJ_MAGIC_ADR);
        sharpsl_flash_param.comadj = readl(FLASH_MEM_BASE + 
FLASH_COMADJ_DATA_ADR);
@@ -85,6 +233,20 @@
 
 static void __init corgi_init(void)
 {
+       if (sharpsl_flash_param.comadj_keyword == FLASH_COMADJ_MAJIC)
+               corgi_fb_info.comadj=sharpsl_flash_param.comadj;
+       else
+               corgi_fb_info.comadj=-1;
+
+       if (sharpsl_flash_param.phad_keyword == FLASH_PHAD_MAJIC)
+               corgi_fb_info.phadadj=sharpsl_flash_param.phadadj;
+       else
+               corgi_fb_info.phadadj=-1;
+
+       pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT);
+       pxa_set_udc_info(&udc_info);
+       pxa_set_mci_info(&corgi_mci_platform_data);
+
        platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
@@ -101,6 +263,11 @@
                mi->bank[0].size = (64*1024*1024);
 }
 
+static void __init corgi_init_irq(void)
+{
+       pxa_init_irq();
+}
+
 static struct map_desc corgi_io_desc[] __initdata = {
 /*    virtual     physical    length      */
 /*     { 0xf1000000, 0x08000000, 0x01000000, MT_DEVICE },*/ /* LCDC (readable 
for Qt driver) */
diff -urN linux/arch/arm/mach-s3c2410/Kconfig 
linux/arch/arm/mach-s3c2410/Kconfig
--- linux/arch/arm/mach-s3c2410/Kconfig 2004/12/04 18:15:58     1.8
+++ linux/arch/arm/mach-s3c2410/Kconfig 2005/01/25 04:27:53     1.9
@@ -41,7 +41,7 @@
        help
          Say Y here if you are using the HP iPAQ rx3715.
 
-         See http://www.handhelds.org/projects/rx3715.html for more
+         See <http://www.handhelds.org/projects/rx3715.html> for more
          information on this project
 
 endmenu
@@ -77,7 +77,7 @@
          to the kernel log, at priority KERN_DEBUG.
 
          Note, it is easy to create and fill the log buffer in a small
-         amount of time, as well as using an significant percantage of
+         amount of time, as well as using an significant percentage of
          the CPU time doing so.
 
 
@@ -115,9 +115,9 @@
          Choice of which UART port to use for the low-level messages,
          such as the `Uncompressing...` at start time. The value of
          this configuration should be between zero and two. The port
-         must have been initalised by the boot-loader before use.
+         must have been initialised by the boot-loader before use.
 
          Note, this does not affect the port used by the debug messages,
-         which is a seperate configuration.
+         which is a separate configuration.
 
 endif
diff -urN linux/arch/arm/mach-s3c2410/clock.c 
linux/arch/arm/mach-s3c2410/clock.c
--- linux/arch/arm/mach-s3c2410/clock.c 2004/12/27 02:15:48     1.5
+++ linux/arch/arm/mach-s3c2410/clock.c 2005/01/25 04:27:53     1.6
@@ -60,7 +60,7 @@
 
 /* old functions */
 
-void inline s3c2410_clk_enable(unsigned int clocks, unsigned int enable)
+void inline s3c24xx_clk_enable(unsigned int clocks, unsigned int enable)
 {
        unsigned long clkcon;
        unsigned long flags;
@@ -88,9 +88,9 @@
        return 0;
 }
 
-int s3c2410_clkcon_enable(struct clk *clk, int enable)
+int s3c24xx_clkcon_enable(struct clk *clk, int enable)
 {
-       s3c2410_clk_enable(clk->ctrlbit, enable);
+       s3c24xx_clk_enable(clk->ctrlbit, enable);
        return 0;
 }
 
@@ -264,90 +264,90 @@
        { .name    = "nand",
          .id      = -1,
          .parent  = &clk_h,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_NAND
        },
        { .name    = "lcd",
          .id      = -1,
          .parent  = &clk_h,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_LCDC
        },
        { .name    = "usb-host",
          .id      = -1,
          .parent  = &clk_h,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_USBH
        },
        { .name    = "usb-device",
          .id      = -1,
          .parent  = &clk_h,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_USBD
        },
        { .name    = "timers",
          .parent  = &clk_p,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_PWMT
        },
        { .name    = "sdi",
          .id      = -1,
          .parent  = &clk_p,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_SDI
        },
        { .name    = "uart",
          .id      = 0,
          .parent  = &clk_p,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_UART0
        },
        { .name    = "uart",
          .id      = 1,
          .parent  = &clk_p,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_UART1
        },
        { .name    = "uart",
          .id      = 2,
          .parent  = &clk_p,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_UART2
        },
        { .name    = "gpio",
          .id      = -1,
          .parent  = &clk_p,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_GPIO
        },
        { .name    = "rtc",
          .id      = -1,
          .parent  = &clk_p,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_RTC
        },
        { .name    = "adc",
          .id      = -1,
          .parent  = &clk_p,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_ADC
        },
        { .name    = "i2c",
          .id      = -1,
          .parent  = &clk_p,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_IIC
        },
        { .name    = "iis",
          .id      = -1,
          .parent  = &clk_p,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_IIS
        },
        { .name    = "spi",
          .id      = -1,
          .parent  = &clk_p,
-         .enable  = s3c2410_clkcon_enable,
+         .enable  = s3c24xx_clkcon_enable,
          .ctrlbit = S3C2410_CLKCON_SPI
        },
        { .name    = "watchdog",
@@ -359,7 +359,7 @@
 
 /* initialise the clock system */
 
-int s3c2410_register_clock(struct clk *clk)
+int s3c24xx_register_clock(struct clk *clk)
 {
        clk->owner = THIS_MODULE;
        atomic_set(&clk->used, 0);
@@ -378,7 +378,7 @@
 
 /* initalise all the clocks */
 
-int __init s3c2410_init_clocks(void)
+int __init s3c24xx_setup_clocks(void)
 {
        struct clk *clkp = init_clocks;
        int ptr;
@@ -403,28 +403,28 @@
         * and of course, this looks neater
         */
 
-       s3c2410_clk_enable(S3C2410_CLKCON_NAND, 0);
-       s3c2410_clk_enable(S3C2410_CLKCON_USBH, 0);
-       s3c2410_clk_enable(S3C2410_CLKCON_USBD, 0);
-       s3c2410_clk_enable(S3C2410_CLKCON_ADC, 0);
-       s3c2410_clk_enable(S3C2410_CLKCON_IIC, 0);
-       s3c2410_clk_enable(S3C2410_CLKCON_SPI, 0);
+       s3c24xx_clk_enable(S3C2410_CLKCON_NAND, 0);
+       s3c24xx_clk_enable(S3C2410_CLKCON_USBH, 0);
+       s3c24xx_clk_enable(S3C2410_CLKCON_USBD, 0);
+       s3c24xx_clk_enable(S3C2410_CLKCON_ADC, 0);
+       s3c24xx_clk_enable(S3C2410_CLKCON_IIC, 0);
+       s3c24xx_clk_enable(S3C2410_CLKCON_SPI, 0);
 
        /* assume uart clocks are correctly setup */
 
        /* register our clocks */
 
-       if (s3c2410_register_clock(&clk_f) < 0)
+       if (s3c24xx_register_clock(&clk_f) < 0)
                printk(KERN_ERR "failed to register cpu fclk\n");
 
-       if (s3c2410_register_clock(&clk_h) < 0)
+       if (s3c24xx_register_clock(&clk_h) < 0)
                printk(KERN_ERR "failed to register cpu hclk\n");
 
-       if (s3c2410_register_clock(&clk_p) < 0)
+       if (s3c24xx_register_clock(&clk_p) < 0)
                printk(KERN_ERR "failed to register cpu pclk\n");
 
        for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) {
-               ret = s3c2410_register_clock(clkp);
+               ret = s3c24xx_register_clock(clkp);
                if (ret < 0) {
                        printk(KERN_ERR "Failed to register clock %s (%d)\n",
                               clkp->name, ret);
diff -urN linux/arch/arm/mach-s3c2410/clock.h 
linux/arch/arm/mach-s3c2410/clock.h
--- linux/arch/arm/mach-s3c2410/clock.h 2004/11/15 11:49:14     1.3
+++ linux/arch/arm/mach-s3c2410/clock.h 2005/01/25 04:27:53     1.4
@@ -41,7 +41,7 @@
  * Please DO NOT use these outside of arch/arm/mach-s3c2410
 */
 
-extern int s3c2410_clkcon_enable(struct clk *clk, int enable);
-extern int s3c2410_register_clock(struct clk *clk);
-extern int s3c2410_init_clocks(void);
+extern int s3c24xx_clkcon_enable(struct clk *clk, int enable);
+extern int s3c24xx_register_clock(struct clk *clk);
 
+extern int s3c24xx_setup_clocks(void);
diff -urN linux/arch/arm/mach-s3c2410/cpu.c linux/arch/arm/mach-s3c2410/cpu.c
--- linux/arch/arm/mach-s3c2410/cpu.c   2005/01/13 14:05:19     1.5
+++ linux/arch/arm/mach-s3c2410/cpu.c   2005/01/25 04:27:53     1.6
@@ -47,6 +47,7 @@
        unsigned long   idmask;
        void            (*map_io)(struct map_desc *mach_desc, int size);
        void            (*init_uarts)(struct s3c2410_uartcfg *cfg, int no);
+       void            (*init_clocks)(int xtal);
        int             (*init)(void);
        const char      *name;
 };
@@ -63,6 +64,7 @@
                .idcode         = 0x32410000,
                .idmask         = 0xffffffff,
                .map_io         = s3c2410_map_io,
+               .init_clocks    = s3c2410_init_clocks,
                .init_uarts     = s3c2410_init_uarts,
                .init           = s3c2410_init,
                .name           = name_s3c2410
@@ -71,6 +73,7 @@
                .idcode         = 0x32410002,
                .idmask         = 0xffffffff,
                .map_io         = s3c2410_map_io,
+               .init_clocks    = s3c2410_init_clocks,
                .init_uarts     = s3c2410_init_uarts,
                .init           = s3c2410_init,
                .name           = name_s3c2410a
@@ -79,6 +82,7 @@
                .idcode         = 0x32440000,
                .idmask         = 0xffffffff,
                .map_io         = s3c2440_map_io,
+               .init_clocks    = s3c2440_init_clocks,
                .init_uarts     = s3c2440_init_uarts,
                .init           = s3c2440_init,
                .name           = name_s3c2440
@@ -87,6 +91,7 @@
                .idcode         = 0x32440001,
                .idmask         = 0xffffffff,
                .map_io         = s3c2440_map_io,
+               .init_clocks    = s3c2440_init_clocks,
                .init_uarts     = s3c2440_init_uarts,
                .init           = s3c2440_init,
                .name           = name_s3c2440a
@@ -132,7 +137,7 @@
                struct clk **ptr = b->clocks;;
 
                for (i = b->clocks_count; i > 0; i--, ptr++)
-                       s3c2410_register_clock(*ptr);
+                       s3c24xx_register_clock(*ptr);
        }
 }
 
@@ -165,6 +170,29 @@
        (cpu->map_io)(mach_desc, size);
 }
 
+/* s3c24xx_init_clocks
+ *
+ * Initialise the clock subsystem and associated information from the
+ * given master crystal value.
+ *
+ * xtal  = 0 -> use default PLL crystal value (normally 12MHz)
+ *      != 0 -> PLL crystal value in Hz
+*/
+
+void __init s3c24xx_init_clocks(int xtal)
+{
+       if (xtal != 0)
+               s3c24xx_xtal = xtal;
+
+       if (cpu == NULL)
+               panic("s3c24xx_init_clocks: no cpu setup?\n");
+
+       if (cpu->init_clocks == NULL)
+               panic("s3c24xx_init_clocks: cpu has no clock init\n");
+       else
+               (cpu->init_clocks)(xtal);
+}
+
 void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)
 {
        if (cpu == NULL)
@@ -175,6 +203,7 @@
        } else
                (cpu->init_uarts)(cfg, no);
 }
+
 static int __init s3c_arch_init(void)
 {
        int ret;
diff -urN linux/arch/arm/mach-s3c2410/cpu.h linux/arch/arm/mach-s3c2410/cpu.h
--- linux/arch/arm/mach-s3c2410/cpu.h   2005/01/13 14:05:19     1.4
+++ linux/arch/arm/mach-s3c2410/cpu.h   2005/01/25 04:27:53     1.5
@@ -13,6 +13,8 @@
  *     24-Aug-2004 BJD  Start of generic S3C24XX support
  *     18-Oct-2004 BJD  Moved board struct into this file
  *     04-Jan-2005 BJD  New uart initialisation
+ *     10-Jan-2005 BJD  Moved generic init here, specific to cpu headers
+ *     14-Jan-2005 BJD  Added s3c24xx_init_clocks() call
 */
 
 #define IODESC_ENT(x) { S3C2410_VA_##x, S3C2410_PA_##x, S3C2410_SZ_##x, 
MT_DEVICE }
@@ -26,30 +28,16 @@
 /* forward declaration */
 struct s3c2410_uartcfg;
 
-#ifdef CONFIG_CPU_S3C2410
-extern  int s3c2410_init(void);
-extern void s3c2410_map_io(struct map_desc *mach_desc, int size);
-extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
-#else
-#define s3c2410_init_uarts NULL
-#define s3c2410_map_io NULL
-#define s3c2410_init NULL
-#endif
+/* core initialisation functions */
 
-#ifdef CONFIG_CPU_S3C2440
-extern  int s3c2440_init(void);
-extern void s3c2440_map_io(struct map_desc *mach_desc, int size);
-extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
-#else
-#define s3c2440_init_uarts NULL
-#define s3c2440_map_io NULL
-#define s3c2440_init NULL
-#endif
+extern void s3c24xx_init_irq(void);
 
 extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
 
 extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 
+extern void s3c24xx_init_clocks(int xtal);
+
 /* the board structure is used at first initialsation time
  * to get info such as the devices to register for this
  * board. This is done because platfrom_add_devices() cannot
@@ -65,3 +53,8 @@
 };
 
 extern void s3c24xx_set_board(struct s3c24xx_board *board);
+
+/* timer for 2410/2440 */
+
+struct sys_timer;
+extern struct sys_timer s3c24xx_timer;
diff -urN linux/arch/arm/mach-s3c2410/dma.c linux/arch/arm/mach-s3c2410/dma.c
--- linux/arch/arm/mach-s3c2410/dma.c   2004/12/04 18:15:58     1.3
+++ linux/arch/arm/mach-s3c2410/dma.c   2005/01/25 04:27:53     1.4
@@ -1063,6 +1063,29 @@
 
 EXPORT_SYMBOL(s3c2410_dma_devconfig);
 
+/* s3c2410_dma_getposition
+ *
+ * returns the current transfer points for the dma source and destination
+*/
+
+int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst)
+{
+       s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
+
+       check_channel(channel);
+
+       if (src != NULL)
+               *src = dma_rdreg(chan, S3C2410_DMA_DCSRC);
+
+       if (dst != NULL)
+               *dst = dma_rdreg(chan, S3C2410_DMA_DCDST);
+
+       return 0;
+}
+
+EXPORT_SYMBOL(s3c2410_dma_getposition);
+
+
 /* system device class */
 
 #ifdef CONFIG_PM
diff -urN linux/arch/arm/mach-s3c2410/irq.c linux/arch/arm/mach-s3c2410/irq.c
--- linux/arch/arm/mach-s3c2410/irq.c   2004/11/15 11:49:14     1.4
+++ linux/arch/arm/mach-s3c2410/irq.c   2005/01/25 04:27:53     1.5
@@ -628,12 +628,12 @@
        s3c_irq_demux_uart(IRQ_S3CUART_RX2, regs);
 }
 
-/* s3c2410_init_irq
+/* s3c24xx_init_irq
  *
  * Initialise S3C2410 IRQ system
 */
 
-void __init s3c2410_init_irq(void)
+void __init s3c24xx_init_irq(void)
 {
        unsigned long pend;
        unsigned long last;
diff -urN linux/arch/arm/mach-s3c2410/mach-bast.c 
linux/arch/arm/mach-s3c2410/mach-bast.c
--- linux/arch/arm/mach-s3c2410/mach-bast.c     2005/01/13 14:05:19     1.8
+++ linux/arch/arm/mach-s3c2410/mach-bast.c     2005/01/25 04:27:53     1.9
@@ -20,7 +20,9 @@
  *     18-Jan-2003 BJD  Added serial port configuration
  *     05-Oct-2004 BJD  Power management code
  *     04-Nov-2004 BJD  Updated serial port clocks
- *     04-Jan-2004 BJD  New uart init call
+ *     04-Jan-2005 BJD  New uart init call
+ *     10-Jan-2005 BJD  Removed include of s3c2410.h
+ *     14-Jan-2005 BJD  Add support for muitlple NAND devices
 */
 
 #include <linux/kernel.h>
@@ -47,15 +49,20 @@
 #include <asm/arch/regs-serial.h>
 #include <asm/arch/regs-gpio.h>
 #include <asm/arch/regs-mem.h>
+#include <asm/arch/nand.h>
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/partitions.h>
 
-#include "s3c2410.h"
 #include "clock.h"
 #include "devs.h"
 #include "cpu.h"
 #include "usb-simtec.h"
 #include "pm.h"
 
-#define COPYRIGHT ", (c) 2004 Simtec Electronics"
+#define COPYRIGHT ", (c) 2004-2005 Simtec Electronics"
 
 /* macros for virtual address mods for the io space entries */
 #define VA_C5(item) ((item) + BAST_VAM_CS5)
@@ -220,6 +227,100 @@
        .resource       = bast_nor_resource,
 };
 
+/* NAND Flash on BAST board */
+
+
+static int smartmedia_map[] = { 0 };
+static int chip0_map[] = { 1 };
+static int chip1_map[] = { 2 };
+static int chip2_map[] = { 3 };
+
+struct mtd_partition bast_default_nand_part[] = {
+       [0] = {
+               .name   = "Boot Agent",
+               .size   = SZ_16K,
+               .offset = 0
+       },
+       [1] = {
+               .name   = "/boot",
+               .size   = SZ_4M - SZ_16K,
+               .offset = SZ_16K,
+       },
+       [2] = {
+               .name   = "user",
+               .offset = SZ_4M,
+               .size   = MTDPART_SIZ_FULL,
+       }
+};
+
+/* the bast has 4 selectable slots for nand-flash, the three
+ * on-board chip areas, as well as the external SmartMedia
+ * slot.
+ *
+ * Note, there is no current hot-plug support for the SmartMedia
+ * socket.
+*/
+
+static struct s3c2410_nand_set bast_nand_sets[] = {
+       [0] = {
+               .name           = "SmartMedia",
+               .nr_chips       = 1,
+               .nr_map         = smartmedia_map,
+               .nr_partitions  = ARRAY_SIZE(bast_default_nand_part),
+               .partitions     = bast_default_nand_part
+       },
+       [1] = {
+               .name           = "chip0",
+               .nr_chips       = 1,
+               .nr_map         = chip0_map,
+               .nr_partitions  = ARRAY_SIZE(bast_default_nand_part),
+               .partitions     = bast_default_nand_part
+       },
+       [2] = {
+               .name           = "chip1",
+               .nr_chips       = 1,
+               .nr_map         = chip1_map,
+               .nr_partitions  = ARRAY_SIZE(bast_default_nand_part),
+               .partitions     = bast_default_nand_part
+       },
+       [3] = {
+               .name           = "chip2",
+               .nr_chips       = 1,
+               .nr_map         = chip2_map,
+               .nr_partitions  = ARRAY_SIZE(bast_default_nand_part),
+               .partitions     = bast_default_nand_part
+       }
+};
+
+static void bast_nand_select(struct s3c2410_nand_set *set, int slot)
+{
+       unsigned int tmp;
+
+       slot = set->nr_map[slot] & 3;
+
+       pr_debug("bast_nand: selecting slot %d (set %p,%p)\n",
+                slot, set, set->nr_map);
+
+       tmp = __raw_readb(BAST_VA_CTRL2);
+       tmp &= BAST_CPLD_CTLR2_IDERST;
+       tmp |= slot;
+       tmp |= BAST_CPLD_CTRL2_WNAND;
+
+       pr_debug("bast_nand: ctrl2 now %02x\n", tmp);
+
+       __raw_writeb(tmp, BAST_VA_CTRL2);
+}
+
+static struct s3c2410_platform_nand bast_nand_info = {
+       .tacls          = 80,
+       .twrph0         = 80,
+       .twrph1         = 80,
+       .nr_sets        = ARRAY_SIZE(bast_nand_sets),
+       .sets           = bast_nand_sets,
+       .select_chip    = bast_nand_select,
+};
+
+
 /* Standard BAST devices */
 
 static struct platform_device *bast_devices[] __initdata = {
@@ -229,6 +330,7 @@
        &s3c_device_i2c,
        &s3c_device_iis,
        &s3c_device_rtc,
+       &s3c_device_nand,
        &bast_device_nor
 };
 
@@ -262,7 +364,10 @@
 
        s3c24xx_uclk.parent  = &s3c24xx_clkout1;
 
+       s3c_device_nand.dev.platform_data = &bast_nand_info;
+
        s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
+       s3c24xx_init_clocks(0);
        s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
        s3c24xx_set_board(&bast_board);
        usb_simtec_init();
@@ -270,7 +375,7 @@
 
 void __init bast_init_irq(void)
 {
-       s3c2410_init_irq();
+       s3c24xx_init_irq();
 }
 
 #ifdef CONFIG_PM
@@ -307,5 +412,5 @@
      MAPIO(bast_map_io)
      INITIRQ(bast_init_irq)
        .init_machine   = bast_init_machine,
-     .timer            = &s3c2410_timer,
+       .timer          = &s3c24xx_timer,
 MACHINE_END
diff -urN linux/arch/arm/mach-s3c2410/mach-h1940.c 
linux/arch/arm/mach-s3c2410/mach-h1940.c
--- linux/arch/arm/mach-s3c2410/mach-h1940.c    2005/01/13 14:05:19     1.7
+++ linux/arch/arm/mach-s3c2410/mach-h1940.c    2005/01/25 04:27:53     1.8
@@ -21,6 +21,8 @@
  *     18-Oct-2004 BJD  Updated new board structure name
  *     04-Nov-2004 BJD  Change for new serial clock
  *     04-Jan-2005 BJD  Updated uart init call
+ *     10-Jan-2005 BJD  Removed include of s3c2410.h
+ *     14-Jan-2005 BJD  Added clock init
 */
 
 #include <linux/kernel.h>
@@ -45,7 +47,6 @@
 
 #include <linux/serial_core.h>
 
-#include "s3c2410.h"
 #include "clock.h"
 #include "devs.h"
 #include "cpu.h"
@@ -103,13 +104,14 @@
 void __init h1940_map_io(void)
 {
        s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc));
+       s3c24xx_init_clocks(0);
        s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
        s3c24xx_set_board(&h1940_board);
 }
 
 void __init h1940_init_irq(void)
 {
-       s3c2410_init_irq();
+       s3c24xx_init_irq();
 
 }
 
@@ -119,5 +121,5 @@
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(h1940_map_io)
      INITIRQ(h1940_init_irq)
-     .timer            = &s3c2410_timer,
+       .timer          = &s3c24xx_timer,
 MACHINE_END
diff -urN linux/arch/arm/mach-s3c2410/mach-rx3715.c 
linux/arch/arm/mach-s3c2410/mach-rx3715.c
--- linux/arch/arm/mach-s3c2410/mach-rx3715.c   2005/01/13 14:05:19     1.2
+++ linux/arch/arm/mach-s3c2410/mach-rx3715.c   2005/01/25 04:27:53     1.3
@@ -12,6 +12,8 @@
  * Modifications:
  *     16-Sep-2004 BJD Copied from mach-h1940.c
  *     25-Oct-2004 BJD Updates for 2.6.10-rc1
+ *     10-Jan-2005 BJD Removed include of s3c2410.h s3c2440.h
+ *     14-Jan-2005 BJD Added new clock init
 */
 
 #include <linux/kernel.h>
@@ -38,8 +40,6 @@
 #include <asm/arch/regs-serial.h>
 #include <asm/arch/regs-gpio.h>
 
-#include "s3c2410.h"
-#include "s3c2440.h"
 #include "clock.h"
 #include "devs.h"
 #include "cpu.h"
@@ -92,16 +92,15 @@
 
 void __init rx3715_map_io(void)
 {
-       s3c24xx_xtal = 16934000;
-
        s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc));
+       s3c24xx_init_clocks(16934000);
        s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
        s3c24xx_set_board(&rx3715_board);
 }
 
 void __init rx3715_init_irq(void)
 {
-       s3c2410_init_irq();
+       s3c24xx_init_irq();
 }
 
 #ifdef CONFIG_PM
@@ -120,5 +119,5 @@
      MAPIO(rx3715_map_io)
      INITIRQ(rx3715_init_irq)
      INIT_MACHINE(rx3715_init_machine)
-     .timer            = &s3c2410_timer,
+       .timer          = &s3c24xx_timer,
 MACHINE_END
diff -urN linux/arch/arm/mach-s3c2410/mach-smdk2410.c 
linux/arch/arm/mach-s3c2410/mach-smdk2410.c
--- linux/arch/arm/mach-s3c2410/mach-smdk2410.c 2005/01/13 14:05:19     1.7
+++ linux/arch/arm/mach-s3c2410/mach-smdk2410.c 2005/01/25 04:27:53     1.8
@@ -46,7 +46,6 @@
 
 #include <asm/arch/regs-serial.h>
 
-#include "s3c2410.h"
 #include "devs.h"
 #include "cpu.h"
 
@@ -98,13 +97,14 @@
 void __init smdk2410_map_io(void)
 {
        s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc));
+       s3c24xx_init_clocks(0);
        s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
        s3c24xx_set_board(&smdk2410_board);
 }
 
 void __init smdk2410_init_irq(void)
 {
-       s3c2410_init_irq();
+       s3c24xx_init_irq();
 }
 
 MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and 
switch
@@ -114,7 +114,7 @@
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(smdk2410_map_io)
      INITIRQ(smdk2410_init_irq)
-     .timer            = &s3c2410_timer,
+       .timer          = &s3c24xx_timer,
 MACHINE_END
 
 
diff -urN linux/arch/arm/mach-s3c2410/mach-vr1000.c 
linux/arch/arm/mach-s3c2410/mach-vr1000.c
--- linux/arch/arm/mach-s3c2410/mach-vr1000.c   2005/01/13 14:05:19     1.9
+++ linux/arch/arm/mach-s3c2410/mach-vr1000.c   2005/01/25 04:27:53     1.10
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/mach-vr1000.c
  *
- * Copyright (c) 2003,2004 Simtec Electronics
+ * Copyright (c) 2003-2005 Simtec Electronics
  *   Ben Dooks <ben@simtec.co.uk>
  *
  * Machine support for Thorcom VR1000 board. Designed for Thorcom by
@@ -18,7 +18,12 @@
  *     05-Apr-2004 BJD  Copied to make mach-vr1000.c
  *     18-Oct-2004 BJD  Updated board struct
  *     04-Nov-2004 BJD  Clock and serial configuration update
- *     04-Jan-2004 BJD  Updated uart init call
+ *
+ *     04-Jan-2005 BJD  Updated uart init call
+ *     10-Jan-2005 BJD  Removed include of s3c2410.h
+ *     14-Jan-2005 BJD  Added clock init
+ *     15-Jan-2005 BJD  Add serial port device definition
+ *     20-Jan-2005 BJD  Use UPF_IOREMAP for ports
 */
 
 #include <linux/kernel.h>
@@ -28,12 +33,19 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 
+#include <linux/serial.h>
+#include <linux/tty.h>
+#include <linux/serial_8250.h>
+#include <linux/serial_reg.h>
+
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <asm/arch/bast-map.h>
 #include <asm/arch/vr1000-map.h>
+#include <asm/arch/vr1000-irq.h>
+#include <asm/arch/vr1000-cpld.h>
 
 #include <asm/hardware.h>
 #include <asm/io.h>
@@ -43,7 +55,6 @@
 //#include <asm/debug-ll.h>
 #include <asm/arch/regs-serial.h>
 
-#include "s3c2410.h"
 #include "clock.h"
 #include "devs.h"
 #include "cpu.h"
@@ -165,12 +176,82 @@
        }
 };
 
+/* definitions for the vr1000 extra 16550 serial ports */
+
+#define VR1000_BAUDBASE (3692307)
+
+#define VR1000_SERIAL_MAPBASE(x) (VR1000_PA_SERIAL + 0x80 + ((x) << 5))
+
+static struct plat_serial8250_port serial_platform_data[] = {
+       [0] = {
+               .mapbase        = VR1000_SERIAL_MAPBASE(0),
+               .irq            = IRQ_VR1000_SERIAL + 0,
+               .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
+               .iotype         = UPIO_MEM,
+               .regshift       = 0,
+               .uartclk        = VR1000_BAUDBASE,
+       },
+       [1] = {
+               .mapbase        = VR1000_SERIAL_MAPBASE(1),
+               .irq            = IRQ_VR1000_SERIAL + 1,
+               .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
+               .iotype         = UPIO_MEM,
+               .regshift       = 0,
+               .uartclk        = VR1000_BAUDBASE,
+       },
+       [2] = {
+               .mapbase        = VR1000_SERIAL_MAPBASE(2),
+               .irq            = IRQ_VR1000_SERIAL + 2,
+               .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
+               .iotype         = UPIO_MEM,
+               .regshift       = 0,
+               .uartclk        = VR1000_BAUDBASE,
+       },
+       [3] = {
+               .mapbase        = VR1000_SERIAL_MAPBASE(3),
+               .irq            = IRQ_VR1000_SERIAL + 3,
+               .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
+               .iotype         = UPIO_MEM,
+               .regshift       = 0,
+               .uartclk        = VR1000_BAUDBASE,
+       },
+       { },
+};
+
+static struct platform_device serial_device = {
+       .name                   = "serial8250",
+       .id                     = 0,
+       .dev                    = {
+               .platform_data  = serial_platform_data,
+       },
+};
+
+/* MTD NOR Flash */
+
+static struct resource vr1000_nor_resource[] = {
+       [0] = {
+               .start  = S3C2410_CS1 + 0x4000000,
+               .end    = S3C2410_CS1 + 0x4000000 + SZ_16M - 1,
+               .flags  = IORESOURCE_MEM,
+       }
+};
+
+static struct platform_device vr1000_nor = {
+       .name           = "bast-nor",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(vr1000_nor_resource),
+       .resource       = vr1000_nor_resource,
+};
+
+
 static struct platform_device *vr1000_devices[] __initdata = {
        &s3c_device_usb,
        &s3c_device_lcd,
        &s3c_device_wdt,
        &s3c_device_i2c,
        &s3c_device_iis,
+       &serial_device,
+       &vr1000_nor,
 };
 
 static struct clk *vr1000_clocks[] = {
@@ -205,6 +286,7 @@
        s3c24xx_uclk.parent  = &s3c24xx_clkout1;
 
        s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc));
+       s3c24xx_init_clocks(0);
        s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs));
        s3c24xx_set_board(&vr1000_board);
        usb_simtec_init();
@@ -212,7 +294,7 @@
 
 void __init vr1000_init_irq(void)
 {
-       s3c2410_init_irq();
+       s3c24xx_init_irq();
 }
 
 MACHINE_START(VR1000, "Thorcom-VR1000")
@@ -221,5 +303,5 @@
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(vr1000_map_io)
      INITIRQ(vr1000_init_irq)
-     .timer            = &s3c2410_timer,
+       .timer          = &s3c24xx_timer,
 MACHINE_END
diff -urN linux/arch/arm/mach-s3c2410/s3c2410.c 
linux/arch/arm/mach-s3c2410/s3c2410.c
--- linux/arch/arm/mach-s3c2410/s3c2410.c       2005/01/13 14:05:19     1.6
+++ linux/arch/arm/mach-s3c2410/s3c2410.c       2005/01/25 04:27:53     1.7
@@ -151,19 +151,19 @@
  *
  * register the standard cpu IO areas, and any passed in from the
  * machine specific initialisation.
- *
- * this function also sets the initial clock frequencies from the
- * settings passed in
 */
 
 void __init s3c2410_map_io(struct map_desc *mach_desc, int mach_size)
 {
-       unsigned long tmp;
-
        /* register our io-tables */
 
        iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc));
        iotable_init(mach_desc, mach_size);
+}
+
+void __init s3c2410_init_clocks(int xtal)
+{
+       unsigned long tmp;
 
        /* now we've got our machine bits initialised, work out what
         * clocks we've got */
@@ -188,7 +188,7 @@
         * console to use them
         */
 
-       s3c2410_init_clocks();
+       s3c24xx_setup_clocks();
 }
 
 int __init s3c2410_init(void)
diff -urN linux/arch/arm/mach-s3c2410/s3c2410.h 
linux/arch/arm/mach-s3c2410/s3c2410.h
--- linux/arch/arm/mach-s3c2410/s3c2410.h       2005/01/13 14:05:19     1.8
+++ linux/arch/arm/mach-s3c2410/s3c2410.h       2005/01/25 04:27:53     1.9
@@ -1,7 +1,7 @@
 /* arch/arm/mach-s3c2410/s3c2410.h
  *
  * Copyright (c) 2004 Simtec Electronics
- * Ben Dooks <ben@simtec.co.uk>
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * Header file for s3c2410 machine directory
  *
@@ -15,13 +15,23 @@
  *     04-Sep-2004 BJD  Added s3c2410_init_uarts() call
  *     17-Oct-2004 BJD  Moved board out to cpu
  *     04-Jan-2005 BJD  Changed uart init
+ *     10-Jan-2005 BJD  Removed timer to cpu.h, moved 2410 specific bits here
+ *     14-Jan-2005 BJD  Added s3c2410_init_clocks call
 */
 
-extern void s3c2410_map_io(struct map_desc *, int count);
+#ifdef CONFIG_CPU_S3C2410
 
-extern void s3c2410_init_irq(void);
+extern  int s3c2410_init(void);
 
-struct sys_timer;
-extern struct sys_timer s3c2410_timer;
+extern void s3c2410_map_io(struct map_desc *mach_desc, int size);
 
+extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 
+extern void s3c2410_init_clocks(int xtal);
+
+#else
+#define s3c2410_init_clocks NULL
+#define s3c2410_init_uarts NULL
+#define s3c2410_map_io NULL
+#define s3c2410_init NULL
+#endif
diff -urN linux/arch/arm/mach-s3c2410/s3c2440-dsc.c 
linux/arch/arm/mach-s3c2410/s3c2440-dsc.c
--- linux/arch/arm/mach-s3c2410/s3c2440-dsc.c   2004/11/15 11:49:14     1.2
+++ linux/arch/arm/mach-s3c2410/s3c2440-dsc.c   2005/01/25 04:27:53     1.3
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/s3c2440-dsc.c
  *
- * Copyright (c) 2004 Simtec Electronics
+ * Copyright (c) 2004-2005 Simtec Electronics
  *   Ben Dooks <ben@simtec.co.uk>
  *
  * Samsung S3C2440 Drive Strength Control support
@@ -12,6 +12,7 @@
  * Modifications:
  *     29-Aug-2004 BJD  Start of drive-strength control
  *     09-Nov-2004 BJD  Added symbol export
+ *     11-Jan-2005 BJD  Include fix
 */
 
 #include <linux/kernel.h>
@@ -31,8 +32,8 @@
 #include <asm/arch/regs-gpio.h>
 #include <asm/arch/regs-dsc.h>
 
-#include "s3c2440.h"
 #include "cpu.h"
+#include "s3c2440.h"
 
 int s3c2440_set_dsc(unsigned int pin, unsigned int value)
 {
diff -urN linux/arch/arm/mach-s3c2410/s3c2440.c 
linux/arch/arm/mach-s3c2410/s3c2440.c
--- linux/arch/arm/mach-s3c2410/s3c2440.c       2005/01/13 14:05:19     1.5
+++ linux/arch/arm/mach-s3c2410/s3c2440.c       2005/01/25 04:27:53     1.6
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/s3c2440.c
  *
- * Copyright (c) 2004 Simtec Electronics
+ * Copyright (c) 2004-2005 Simtec Electronics
  *   Ben Dooks <ben@simtec.co.uk>
  *
  * Samsung S3C2440 Mobile CPU support
@@ -16,6 +16,8 @@
  *     09-Nov-2004 BJD  Added sysdev for power management
  *     04-Nov-2004 BJD  New serial registration
  *     15-Nov-2004 BJD  Rename the i2c device for the s3c2440
+ *     14-Jan-2005 BJD  Moved clock init code into seperate function
+ *     14-Jan-2005 BJD  Removed un-used clock bits
 */
 
 #include <linux/kernel.h>
@@ -48,10 +50,6 @@
 #include "cpu.h"
 #include "pm.h"
 
-int s3c2440_clock_tick_rate = 12*1000*1000;  /* current timers at 12MHz */
-
-/* clock info */
-unsigned long s3c2440_hdiv;
 
 static struct map_desc s3c2440_iodesc[] __initdata = {
        IODESC_ENT(USBHOST),
@@ -155,13 +153,13 @@
 
 static struct clk s3c2440_clk_cam = {
        .name           = "camera",
-       .enable         = s3c2410_clkcon_enable,
+       .enable         = s3c24xx_clkcon_enable,
        .ctrlbit        = S3C2440_CLKCON_CAMERA
 };
 
 static struct clk s3c2440_clk_ac97 = {
        .name           = "ac97",
-       .enable         = s3c2410_clkcon_enable,
+       .enable         = s3c24xx_clkcon_enable,
        .ctrlbit        = S3C2440_CLKCON_CAMERA
 };
 
@@ -204,13 +202,20 @@
 
 void __init s3c2440_map_io(struct map_desc *mach_desc, int size)
 {
-       unsigned long clkdiv;
-       unsigned long camdiv;
-
        /* register our io-tables */
 
        iotable_init(s3c2440_iodesc, ARRAY_SIZE(s3c2440_iodesc));
        iotable_init(mach_desc, size);
+       /* rename any peripherals used differing from the s3c2410 */
+
+       s3c_device_i2c.name = "s3c2440-i2c";
+}
+
+void __init s3c2440_init_clocks(int xtal)
+{
+       unsigned long clkdiv;
+       unsigned long camdiv;
+       int s3c2440_hdiv = 1;
 
        /* now we've got our machine bits initialised, work out what
         * clocks we've got */
@@ -254,22 +259,18 @@
         * console to use them, and to add new ones after the initialisation
         */
 
-       s3c2410_init_clocks();
+       s3c24xx_setup_clocks();
 
        /* add s3c2440 specific clocks */
 
        s3c2440_clk_cam.parent = clk_get(NULL, "hclk");
        s3c2440_clk_ac97.parent = clk_get(NULL, "pclk");
 
-       s3c2410_register_clock(&s3c2440_clk_ac97);
-       s3c2410_register_clock(&s3c2440_clk_cam);
+       s3c24xx_register_clock(&s3c2440_clk_ac97);
+       s3c24xx_register_clock(&s3c2440_clk_cam);
 
        clk_disable(&s3c2440_clk_ac97);
        clk_disable(&s3c2440_clk_cam);
-
-       /* rename any peripherals used differing from the s3c2410 */
-
-       s3c_device_i2c.name = "s3c2440-i2c";
 }
 
 int __init s3c2440_init(void)
diff -urN linux/arch/arm/mach-s3c2410/s3c2440.h 
linux/arch/arm/mach-s3c2410/s3c2440.h
--- linux/arch/arm/mach-s3c2410/s3c2440.h       2005/01/13 14:05:19     1.3
+++ linux/arch/arm/mach-s3c2410/s3c2440.h       2005/01/25 04:27:53     1.4
@@ -1,7 +1,7 @@
 /* arch/arm/mach-s3c2410/s3c2440.h
  *
- * Copyright (c) 2004 Simtec Electronics
- * Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2004-2005 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * Header file for s3c2440 cpu support
  *
@@ -12,9 +12,24 @@
  * Modifications:
  *     24-Aug-2004 BJD  Start of S3C2440 CPU support
  *     04-Nov-2004 BJD  Added s3c2440_init_uarts()
- *     04-Jan-2004 BJD  Moved uart init to cpu code
+ *     04-Jan-2005 BJD  Moved uart init to cpu code
+ *     10-Jan-2005 BJD  Moved 2440 specific init here
+ *     14-Jan-2005 BJD  Split the clock initialisation code
 */
 
-extern void s3c2440_init_irq(void);
+#ifdef CONFIG_CPU_S3C2440
 
-extern void s3c2440_init_time(void);
+extern  int s3c2440_init(void);
+
+extern void s3c2440_map_io(struct map_desc *mach_desc, int size);
+
+extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+
+extern void s3c2440_init_clocks(int xtal);
+
+#else
+#define s3c2440_init_clocks NULL
+#define s3c2440_init_uarts NULL
+#define s3c2440_map_io NULL
+#define s3c2440_init NULL
+#endif
diff -urN linux/arch/arm/mach-s3c2410/time.c linux/arch/arm/mach-s3c2410/time.c
--- linux/arch/arm/mach-s3c2410/time.c  2004/12/27 02:15:48     1.6
+++ linux/arch/arm/mach-s3c2410/time.c  2005/01/25 04:27:53     1.7
@@ -232,7 +232,7 @@
        setup_irq(IRQ_TIMER4, &s3c2410_timer_irq);
 }
 
-struct sys_timer s3c2410_timer = {
+struct sys_timer s3c24xx_timer = {
        .init           = s3c2410_timer_init,
        .offset         = s3c2410_gettimeoffset,
        .resume         = s3c2410_timer_setup
diff -urN linux/arch/arm/mach-sa1100/collie.c 
linux/arch/arm/mach-sa1100/collie.c
--- linux/arch/arm/mach-sa1100/collie.c 2004/11/15 11:49:15     1.5
+++ linux/arch/arm/mach-sa1100/collie.c 2005/01/25 04:27:53     1.6
@@ -37,36 +37,34 @@
 #include <asm/mach/map.h>
 #include <asm/mach/serial_sa1100.h>
 
+#include <asm/hardware/scoop.h>
 #include <asm/hardware/locomo.h>
 
 #include "generic.h"
 
-static void __init scoop_init(void)
-{
+static struct resource collie_scoop_resources[] = {
+       [0] = {
+               .start          = 0x40800000,
+               .end            = 0x40800fff,
+               .flags          = IORESOURCE_MEM,
+       },
+};
 
-#define        COLLIE_SCP_INIT_DATA(adr,dat)   (((adr)<<16)|(dat))
-#define        COLLIE_SCP_INIT_DATA_END        ((unsigned long)-1)
-       static const unsigned long scp_init[] = {
-               COLLIE_SCP_INIT_DATA(COLLIE_SCP_MCR, 0x0140),   // 00
-               COLLIE_SCP_INIT_DATA(COLLIE_SCP_MCR, 0x0100),
-               COLLIE_SCP_INIT_DATA(COLLIE_SCP_CDR, 0x0000),   // 04
-               COLLIE_SCP_INIT_DATA(COLLIE_SCP_CPR, 0x0000),   // 0C
-               COLLIE_SCP_INIT_DATA(COLLIE_SCP_CCR, 0x0000),   // 10
-               COLLIE_SCP_INIT_DATA(COLLIE_SCP_IMR, 0x0000),   // 18
-               COLLIE_SCP_INIT_DATA(COLLIE_SCP_IRM, 0x00FF),   // 14
-               COLLIE_SCP_INIT_DATA(COLLIE_SCP_ISR, 0x0000),   // 1C
-               COLLIE_SCP_INIT_DATA(COLLIE_SCP_IRM, 0x0000),
-               COLLIE_SCP_INIT_DATA(COLLIE_SCP_GPCR, COLLIE_SCP_IO_DIR),       
// 20
-               COLLIE_SCP_INIT_DATA(COLLIE_SCP_GPWR, COLLIE_SCP_IO_OUT),       
// 24
-               COLLIE_SCP_INIT_DATA_END
-       };
-       int i;
-       for (i = 0; scp_init[i] != COLLIE_SCP_INIT_DATA_END; i++) {
-               int adr = scp_init[i] >> 16;
-               COLLIE_SCP_REG(adr) = scp_init[i] & 0xFFFF;
-       }
+static struct scoop_config collie_scoop_setup = {
+       .io_dir         = COLLIE_SCOOP_IO_DIR,
+       .io_out         = COLLIE_SCOOP_IO_OUT,
+};
+
+static struct platform_device colliescoop_device = {
+       .name           = "sharp-scoop",
+       .id             = -1,
+       .dev            = {
+               .platform_data  = &collie_scoop_setup,
+       },
+       .num_resources  = ARRAY_SIZE(collie_scoop_resources),
+       .resource       = collie_scoop_resources,
+};
 
-}
 
 static struct resource locomo_resources[] = {
        [0] = {
@@ -90,6 +88,7 @@
 
 static struct platform_device *devices[] __initdata = {
        &locomo_device,
+       &colliescoop_device,
 };
 
 static struct mtd_partition collie_partitions[] = {
@@ -111,11 +110,11 @@
 
 static void collie_set_vpp(int vpp)
 {
-       COLLIE_SCP_REG_GPCR |= COLLIE_SCP_VPEN;
+       write_scoop_reg(SCOOP_GPCR, read_scoop_reg(SCOOP_GPCR) | 
COLLIE_SCP_VPEN);
        if (vpp) {
-               COLLIE_SCP_REG_GPWR |= COLLIE_SCP_VPEN;
+               write_scoop_reg(SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) | 
COLLIE_SCP_VPEN);
        } else {
-               COLLIE_SCP_REG_GPWR &= ~COLLIE_SCP_VPEN;
+               write_scoop_reg(SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) & 
~COLLIE_SCP_VPEN);
        }
 }
 
@@ -160,8 +159,6 @@
        GPDR |= GPIO_32_768kHz;
        TUCR  = TUCR_32_768kHz;
 
-       scoop_init();
-
        ret = platform_add_devices(devices, ARRAY_SIZE(devices));
        if (ret) {
                printk(KERN_WARNING "collie: Unable to register LoCoMo 
device\n");
@@ -175,7 +172,6 @@
        /* virtual     physical    length      type */
        {0xe8000000, 0x00000000, 0x02000000, MT_DEVICE},        /* 32M main 
flash (cs0) */
        {0xea000000, 0x08000000, 0x02000000, MT_DEVICE},        /* 32M boot 
flash (cs1) */
-       {0xf0000000, 0x40000000, 0x01000000, MT_DEVICE},        /* 16M LOCOMO  
& SCOOP (cs4) */
 };
 
 static void __init collie_map_io(void)
diff -urN linux/arch/arm/mach-shark/leds.c linux/arch/arm/mach-shark/leds.c
--- linux/arch/arm/mach-shark/leds.c    2001/11/06 07:55:46     1.2
+++ linux/arch/arm/mach-shark/leds.c    2005/01/25 04:27:54     1.3
@@ -33,7 +33,7 @@
 static short hw_led_state;
 static short saved_state;
 
-static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(leds_lock);
 
 short sequoia_read(int addr) {
   outw(addr,0x24);
diff -urN linux/arch/arm/mm/Kconfig linux/arch/arm/mm/Kconfig
--- linux/arch/arm/mm/Kconfig   2005/01/13 14:05:19     1.15
+++ linux/arch/arm/mm/Kconfig   2005/01/25 04:27:54     1.16
@@ -394,7 +394,7 @@
        depends on (CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || 
CPU_ARM1020) && !CPU_DISABLE_DCACHE
        default y if CPU_ARM925T
        help
-         Say Y here to use the data cache in writethough mode. Unless you
+         Say Y here to use the data cache in writethrough mode. Unless you
          specifically require this or are unsure, say N.
 
 config CPU_CACHE_ROUND_ROBIN
diff -urN linux/arch/arm/mm/consistent.c linux/arch/arm/mm/consistent.c
--- linux/arch/arm/mm/consistent.c      2005/01/13 14:05:19     1.23
+++ linux/arch/arm/mm/consistent.c      2005/01/25 04:27:54     1.24
@@ -30,7 +30,7 @@
  * This is the page table (2MB) covering uncached, DMA consistent allocations
  */
 static pte_t *consistent_pte;
-static spinlock_t consistent_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(consistent_lock);
 
 /*
  * VM region handling support.
diff -urN linux/arch/arm/mm/copypage-v6.c linux/arch/arm/mm/copypage-v6.c
--- linux/arch/arm/mm/copypage-v6.c     2004/12/27 02:15:49     1.4
+++ linux/arch/arm/mm/copypage-v6.c     2005/01/25 04:27:54     1.5
@@ -28,7 +28,7 @@
 
 static pte_t *from_pte;
 static pte_t *to_pte;
-static spinlock_t v6_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(v6_lock);
 
 #define DCACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
 
diff -urN linux/arch/arm/mm/ioremap.c linux/arch/arm/mm/ioremap.c
--- linux/arch/arm/mm/ioremap.c 2004/11/15 11:49:15     1.15
+++ linux/arch/arm/mm/ioremap.c 2005/01/25 04:27:54     1.16
@@ -148,7 +148,7 @@
         */
        offset = phys_addr & ~PAGE_MASK;
        phys_addr &= PAGE_MASK;
-       size = PAGE_ALIGN(last_addr) - phys_addr;
+       size = PAGE_ALIGN(last_addr + 1) - phys_addr;
 
        /*
         * Ok, go for it..
diff -urN linux/arch/arm/mm/proc-v6.S linux/arch/arm/mm/proc-v6.S
--- linux/arch/arm/mm/proc-v6.S 2005/01/13 14:05:19     1.5
+++ linux/arch/arm/mm/proc-v6.S 2005/01/25 04:27:54     1.6
@@ -105,6 +105,7 @@
 ENTRY(cpu_v6_switch_mm)
        mov     r2, #0
        ldr     r1, [r1, #MM_CONTEXT_ID]        @ get mm->context.id
+       mcr     p15, 0, r2, c7, c5, 6           @ flush BTAC/BTB
        mcr     p15, 0, r2, c7, c10, 4          @ drain write buffer
        mcr     p15, 0, r0, c2, c0, 0           @ set TTB 0
        mcr     p15, 0, r1, c13, c0, 1          @ set context ID
diff -urN linux/arch/arm/vfp/entry.S linux/arch/arm/vfp/entry.S
--- linux/arch/arm/vfp/entry.S  2004/06/26 15:15:08     1.1
+++ linux/arch/arm/vfp/entry.S  2005/01/25 04:27:54     1.2
@@ -17,7 +17,7 @@
  */
 #include <linux/linkage.h>
 #include <linux/init.h>
-#include <asm/thread_info.h>
+#include <asm/constants.h>
 #include <asm/vfpmacros.h>
 
        .globl  do_vfp
diff -urN linux/arch/arm26/Kconfig linux/arch/arm26/Kconfig
--- linux/arch/arm26/Kconfig    2005/01/13 14:05:20     1.12
+++ linux/arch/arm26/Kconfig    2005/01/25 04:27:54     1.13
@@ -225,4 +225,3 @@
 source "crypto/Kconfig"
 
 source "lib/Kconfig"
-
diff -urN linux/arch/arm26/kernel/dma.c linux/arch/arm26/kernel/dma.c
--- linux/arch/arm26/kernel/dma.c       2005/01/13 14:05:20     1.3
+++ linux/arch/arm26/kernel/dma.c       2005/01/25 04:27:54     1.4
@@ -22,7 +22,7 @@
 
 #include <asm/dma.h>
 
-spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(dma_spin_lock);
 
 static dma_t dma_chan[MAX_DMA_CHANNELS];
 
diff -urN linux/arch/arm26/kernel/irq.c linux/arch/arm26/kernel/irq.c
--- linux/arch/arm26/kernel/irq.c       2004/09/19 12:30:02     1.7
+++ linux/arch/arm26/kernel/irq.c       2005/01/25 04:27:54     1.8
@@ -50,7 +50,7 @@
 #define MAX_IRQ_CNT    100000
 
 static volatile unsigned long irq_err_count;
-static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(irq_controller_lock);
 
 struct irqdesc irq_desc[NR_IRQS];
 
diff -urN linux/arch/arm26/kernel/semaphore.c 
linux/arch/arm26/kernel/semaphore.c
--- linux/arch/arm26/kernel/semaphore.c 2005/01/13 14:05:20     1.3
+++ linux/arch/arm26/kernel/semaphore.c 2005/01/25 04:27:54     1.4
@@ -56,7 +56,7 @@
        wake_up(&sem->wait);
 }
 
-static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(semaphore_lock);
 
 void __sched __down(struct semaphore * sem)
 {
diff -urN linux/arch/arm26/kernel/setup.c linux/arch/arm26/kernel/setup.c
--- linux/arch/arm26/kernel/setup.c     2005/01/13 14:05:20     1.7
+++ linux/arch/arm26/kernel/setup.c     2005/01/25 04:27:54     1.8
@@ -37,7 +37,7 @@
 #endif
 
 #ifdef CONFIG_PREEMPT
-spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(kernel_flag);
 #endif
 
 #if defined(CONFIG_FPE_NWFPE)
diff -urN linux/arch/arm26/kernel/time.c linux/arch/arm26/kernel/time.c
--- linux/arch/arm26/kernel/time.c      2005/01/13 14:05:20     1.7
+++ linux/arch/arm26/kernel/time.c      2005/01/25 04:27:54     1.8
@@ -41,7 +41,7 @@
 extern unsigned long wall_jiffies;
 
 /* this needs a better home */
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
 
 /* change this if you have some constant time drift */
 #define USECS_PER_JIFFY        (1000000/HZ)
diff -urN linux/arch/arm26/kernel/traps.c linux/arch/arm26/kernel/traps.c
--- linux/arch/arm26/kernel/traps.c     2005/01/13 14:05:20     1.5
+++ linux/arch/arm26/kernel/traps.c     2005/01/25 04:27:54     1.6
@@ -171,7 +171,7 @@
        dump_mem("Stack: ", (unsigned long)sp, 8192+(unsigned 
long)task->thread_info);
 }
 
-spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(die_lock);
 
 /*
  * This function is protected against re-entrancy.
diff -urN linux/arch/arm26/mm/small_page.c linux/arch/arm26/mm/small_page.c
--- linux/arch/arm26/mm/small_page.c    2005/01/13 14:05:21     1.1
+++ linux/arch/arm26/mm/small_page.c    2005/01/25 04:27:54     1.2
@@ -75,7 +75,7 @@
 #define TEST_AND_CLEAR_USED(pg,off)    (test_and_clear_bit(off, &USED_MAP(pg)))
 #define SET_USED(pg,off)               (set_bit(off, &USED_MAP(pg)))
 
-static spinlock_t small_page_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(small_page_lock);
 
 static unsigned long __get_small_page(int priority, struct order *order)
 {
diff -urN linux/arch/cris/arch-v10/drivers/Kconfig 
linux/arch/cris/arch-v10/drivers/Kconfig
--- linux/arch/cris/arch-v10/drivers/Kconfig    2004/11/15 11:49:15     1.3
+++ linux/arch/cris/arch-v10/drivers/Kconfig    2005/01/25 04:27:54     1.4
@@ -557,7 +557,7 @@
        select DMA_NONPCI
        help
          Enable this to get support for ATA/IDE.
-         You can't use parallell ports or SCSI ports
+         You can't use paralell ports or SCSI ports
          at the same time.
 
 
diff -urN linux/arch/cris/kernel/irq.c linux/arch/cris/kernel/irq.c
--- linux/arch/cris/kernel/irq.c        2004/10/25 20:44:13     1.17
+++ linux/arch/cris/kernel/irq.c        2005/01/25 04:27:54     1.18
@@ -158,11 +158,6 @@
                local_irq_disable();
         }
         irq_exit();
-
-       if (softirq_pending(cpu))
-                do_softirq();
-
-        /* unmasking and bottom half handling is done magically for us. */
 }
 
 /* this function links in a handler into the chain of handlers for the
diff -urN linux/arch/frv/kernel/dma.c linux/arch/frv/kernel/dma.c
--- linux/arch/frv/kernel/dma.c 2005/01/13 14:05:22     1.1
+++ linux/arch/frv/kernel/dma.c 2005/01/25 04:27:54     1.2
@@ -107,7 +107,7 @@
        },
 };
 
-static rwlock_t frv_dma_channels_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(frv_dma_channels_lock);
 
 unsigned long frv_dma_inprogress;
 
diff -urN linux/arch/frv/kernel/entry.S linux/arch/frv/kernel/entry.S
--- linux/arch/frv/kernel/entry.S       2005/01/13 14:05:22     1.1
+++ linux/arch/frv/kernel/entry.S       2005/01/25 04:27:54     1.2
@@ -821,7 +821,6 @@
        ori             gr4,#_TIF_SYSCALL_TRACE,gr4
        andicc          gr4,#_TIF_SYSCALL_TRACE,gr0,icc0
        bne             icc0,#0,__syscall_trace_entry
-       bra             __syscall_trace_entry
 
 __syscall_call:
        slli.p          gr7,#2,gr7
@@ -858,7 +857,6 @@
        movgs           gr23,psr
 
        ldi             @(gr15,#TI_FLAGS),gr4
-//     ori             gr4,#_TIF_SYSCALL_TRACE,gr4             
/////////////////////////////////
        sethi.p         %hi(_TIF_ALLWORK_MASK),gr5
        setlo           %lo(_TIF_ALLWORK_MASK),gr5
        andcc           gr4,gr5,gr0,icc0
@@ -1075,7 +1073,7 @@
        andicc          gr4,#_TIF_NEED_RESCHED,gr0,icc0
        bne             icc0,#1,__entry_work_resched
 
- __entry_work_notifysig:
+__entry_work_notifysig:
        LEDS            0x6410
        ori.p           gr4,#0,gr8
        call            do_notify_resume
diff -urN linux/arch/frv/kernel/irq.c linux/arch/frv/kernel/irq.c
--- linux/arch/frv/kernel/irq.c 2005/01/13 14:05:22     1.1
+++ linux/arch/frv/kernel/irq.c 2005/01/25 04:27:54     1.2
@@ -312,7 +312,7 @@
 
        /* only process softirqs if we didn't interrupt another interrupt 
handler */
        if ((__frame->psr & PSR_PIL) == PSR_PIL_0)
-               if (softirq_pending(cpu))
+               if (local_softirq_pending())
                        do_softirq();
 
 #ifdef CONFIG_PREEMPT
diff -urN linux/arch/frv/mb93090-mb00/pci-dma-nommu.c 
linux/arch/frv/mb93090-mb00/pci-dma-nommu.c
--- linux/arch/frv/mb93090-mb00/pci-dma-nommu.c 2005/01/13 14:05:23     1.1
+++ linux/arch/frv/mb93090-mb00/pci-dma-nommu.c 2005/01/25 04:27:54     1.2
@@ -30,7 +30,7 @@
        unsigned long           len;
 };
 
-static spinlock_t dma_alloc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(dma_alloc_lock);
 static LIST_HEAD(dma_alloc_list);
 
 void *dma_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t 
*dma_handle, int gfp)
diff -urN linux/arch/frv/mm/mmu-context.c linux/arch/frv/mm/mmu-context.c
--- linux/arch/frv/mm/mmu-context.c     2005/01/13 14:05:23     1.1
+++ linux/arch/frv/mm/mmu-context.c     2005/01/25 04:27:54     1.2
@@ -17,7 +17,7 @@
 
 static unsigned long cxn_bitmap[NR_CXN / (sizeof(unsigned long) * 8)];
 static LIST_HEAD(cxn_owners_lru);
-static spinlock_t cxn_owners_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cxn_owners_lock);
 
 int __nongpreldata cxn_pinned = -1;
 
diff -urN linux/arch/frv/mm/pgalloc.c linux/arch/frv/mm/pgalloc.c
--- linux/arch/frv/mm/pgalloc.c 2005/01/13 14:05:23     1.1
+++ linux/arch/frv/mm/pgalloc.c 2005/01/25 04:27:54     1.2
@@ -77,7 +77,7 @@
  * manfred's recommendations and having no core impact whatsoever.
  * -- wli
  */
-spinlock_t pgd_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(pgd_lock);
 struct page *pgd_list;
 
 static inline void pgd_list_add(pgd_t *pgd)
diff -urN linux/arch/h8300/defconfig linux/arch/h8300/defconfig
--- linux/arch/h8300/defconfig  2004/08/14 16:16:40     1.4
+++ linux/arch/h8300/defconfig  2005/01/25 04:27:54     1.5
@@ -1,5 +1,7 @@
 #
 # Automatically generated make config: don't edit
+# Linux kernel version: 2.6.11-rc1
+# Sun Jan 16 17:24:38 2005
 #
 CONFIG_H8300=y
 # CONFIG_MMU is not set
@@ -8,32 +10,37 @@
 CONFIG_UID16=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_ISA=y
+# CONFIG_PCI is not set
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_CLEAN_COMPILE=y
-CONFIG_STANDALONE=y
 CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
 #
-# CONFIG_SYSVIPC is not set
+CONFIG_LOCALVERSION=""
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_SYSCTL is not set
+# CONFIG_AUDIT is not set
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_EMBEDDED=y
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_KALLSYMS is not set
+# CONFIG_FUTEX is not set
+# CONFIG_EPOLL is not set
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_TINY_SHMEM=y
 
 #
 # Loadable module support
@@ -43,32 +50,42 @@
 #
 # Processor type and features
 #
-# CONFIG_H8300H_GENERIC is not set
+CONFIG_H8300H_GENERIC=y
 # CONFIG_H8300H_AKI3068NET is not set
 # CONFIG_H8300H_H8MAX is not set
-CONFIG_H8300H_SIM=y
+# CONFIG_H8300H_SIM is not set
+# CONFIG_H8S_GENERIC is not set
 # CONFIG_H8S_EDOSK2674 is not set
 # CONFIG_H8S_SIM is not set
+
+#
+# Detail Selection
+#
 # CONFIG_H83002 is not set
-CONFIG_H83007=y
+# CONFIG_H83007 is not set
 # CONFIG_H83048 is not set
-# CONFIG_H83068 is not set
-# CONFIG_H8S2678 is not set
-CONFIG_CPU_H8300H=y
-CONFIG_CPU_CLOCK=16000
+CONFIG_H83068=y
+CONFIG_CPU_CLOCK=20000
 # CONFIG_RAMKERNEL is not set
 CONFIG_ROMKERNEL=y
+CONFIG_CPU_H8300H=y
+# CONFIG_PREEMPT is not set
 
 #
 # Executable file formats
 #
 CONFIG_BINFMT_FLAT=y
-# CONFIG_BINFMT_ZFLAT is not set
+CONFIG_BINFMT_ZFLAT=y
+# CONFIG_BINFMT_SHARED_FLAT is not set
 # CONFIG_BINFMT_MISC is not set
 
 #
 # Generic Driver Options
 #
+# CONFIG_STANDALONE is not set
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -76,7 +93,7 @@
 CONFIG_MTD=y
 # CONFIG_MTD_DEBUG is not set
 CONFIG_MTD_PARTITIONS=y
-# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_CONCAT=y
 # CONFIG_MTD_REDBOOT_PARTS is not set
 # CONFIG_MTD_CMDLINE_PARTS is not set
 
@@ -94,10 +111,19 @@
 #
 # CONFIG_MTD_CFI is not set
 # CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
 CONFIG_MTD_RAM=y
-# CONFIG_MTD_ROM is not set
+CONFIG_MTD_ROM=y
 # CONFIG_MTD_ABSENT is not set
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
 
 #
 # Mapping drivers for chip access
@@ -109,8 +135,10 @@
 # Self-contained MTD device drivers
 #
 # 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
 
 #
 # Disk-On-Chip Device Drivers
@@ -130,114 +158,30 @@
 # CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_XD is not set
 # CONFIG_BLK_DEV_LOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CDROM_PKTCDVD is not set
 
 #
-# ATA/ATAPI/MFM/RLL support
+# IO Schedulers
 #
-# CONFIG_IDE is not set
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
 
 #
-# IDE Extra configuration
+# ATA/ATAPI/MFM/RLL support
 #
+# CONFIG_IDE is not set
 
 #
 # Networking support
 #
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_PACKET is not set
-# CONFIG_NETLINK_DEV is not set
-# CONFIG_UNIX is not set
-# CONFIG_NET_KEY is not set
-# CONFIG_INET is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_NETFILTER is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-# CONFIG_NET_ETHERNET is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-# CONFIG_SHAPER is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
-#
-# CONFIG_IRDA is not set
-
-#
-# Bluetooth support
-#
-# CONFIG_BT is not set
+# CONFIG_NET is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # Input device support
@@ -264,9 +208,6 @@
 # Character devices
 #
 # CONFIG_VT is not set
-# CONFIG_SERIAL is not set
-CONFIG_SH_SCI=y
-CONFIG_SERIAL_CONSOLE=y
 
 #
 # Unix98 PTY support
@@ -281,6 +222,10 @@
 #
 # Non-8250 serial port support
 #
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_SH_SCI_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 
 #
 # I2C support
@@ -290,6 +235,12 @@
 #
 # USB support
 #
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; 
see USB_STORAGE Help for more information
+#
 
 #
 # USB Gadget Support
@@ -308,6 +259,7 @@
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=y
 # CONFIG_QUOTA is not set
+# CONFIG_DNOTIFY is not set
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 
@@ -320,14 +272,15 @@
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
 # CONFIG_NTFS_FS is not set
 
 #
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
+# CONFIG_SYSFS is not set
 # CONFIG_DEVFS_FS is not set
 # CONFIG_TMPFS is not set
 # CONFIG_HUGETLB_PAGE is not set
@@ -339,6 +292,7 @@
 # CONFIG_ADFS_FS is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
@@ -352,11 +306,6 @@
 # CONFIG_UFS_FS is not set
 
 #
-# Network File Systems
-#
-# CONFIG_EXPORTFS is not set
-
-#
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
@@ -370,18 +319,23 @@
 #
 # Kernel hacking
 #
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_FS is not set
 CONFIG_FULLDEBUG=y
-# CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_HIGHPROFILE is not set
 CONFIG_NO_KERNEL_MSG=y
-CONFIG_GDB_MAGICPRINT=y
 # CONFIG_SYSCALL_PRINT is not set
+# CONFIG_GDB_DEBUG is not set
+# CONFIG_CONFIG_SH_STANDARD_BIOS is not set
 # CONFIG_DEFAULT_CMDLINE is not set
 # CONFIG_BLKDEV_RESERVE is not set
 
 #
 # Security options
 #
+# CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 
 #
@@ -390,6 +344,13 @@
 # CONFIG_CRYPTO is not set
 
 #
+# Hardware crypto devices
+#
+
+#
 # Library routines
 #
-# CONFIG_CRC32 is not set
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
diff -urN linux/arch/i386/Kconfig linux/arch/i386/Kconfig
--- linux/arch/i386/Kconfig     2005/01/13 14:05:23     1.51
+++ linux/arch/i386/Kconfig     2005/01/25 04:27:55     1.52
@@ -842,7 +842,6 @@
        depends on ACPI
        default n
        ---help---
-
        This enables the the kernel to boot on EFI platforms using
        system configuration information passed to it from the firmware.
        This also enables the kernel to use any EFI runtime services that are
@@ -881,7 +880,7 @@
        depends on EXPERIMENTAL
        default n
        help
-       Compile the kernel with -mregparm=3. This uses an different ABI
+       Compile the kernel with -mregparm=3. This uses a different ABI
        and passes the first three arguments of a function call in registers.
        This will probably break binary only modules.
 
@@ -1132,6 +1131,8 @@
        select ACPI_BOOT
        default y
 
+source "drivers/pci/pcie/Kconfig"
+
 source "drivers/pci/Kconfig"
 
 config ISA
diff -urN linux/arch/i386/kernel/vmlinux.lds linux/arch/i386/kernel/vmlinux.lds
--- linux/arch/i386/kernel/vmlinux.lds  1970/01/01 00:00:00
+++ linux/arch/i386/kernel/vmlinux.lds  Tue Jan 25 04:27:55 2005        1.1
@@ -0,0 +1,1124 @@
+/* ld script to make i386 Linux kernel
+ * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
+ */
+/* thread_info.h: i386 low-level thread information
+ *
+ * Copyright (C) 2002  David Howells (dhowells@redhat.com)
+ * - Incorporating suggestions made by Linus Torvalds and Dave Miller
+ */
+/*
+ * Automatically generated C config: don't edit
+ * Linux kernel version: 2.6.11-rc1
+ * Sun Jan 16 18:13:50 2005
+ */
+
+
+
+
+
+
+
+/*
+ * Code maturity level options
+ */
+
+
+
+
+/*
+ * General setup
+ */
+/*
+ * Loadable module support
+ */
+/*
+ * Processor type and features
+ */
+/*
+ * Firmware Drivers
+ */
+/*
+ * Power management options (ACPI, APM)
+ */
+
+
+
+
+/*
+ * ACPI (Advanced Configuration and Power Interface) Support
+ */
+/*
+ * APM (Advanced Power Management) BIOS Support
+ */
+/*
+ * CPU Frequency scaling
+ */
+/*
+ * CPUFreq processor drivers
+ */
+/*
+ * shared options
+ */
+
+
+
+
+/*
+ * Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+ */
+/*
+ * PCCARD (PCMCIA/CardBus) support
+ */
+
+
+
+
+
+/*
+ * PC-card bridges
+ */
+/*
+ * PCI Hotplug Support
+ */
+/*
+ * Executable file formats
+ */
+
+
+
+
+/*
+ * Device Drivers
+ */
+
+/*
+ * Generic Driver Options
+ */
+
+
+
+
+
+/*
+ * Memory Technology Devices (MTD)
+ */
+/*
+ * User Modules And Translation Layers
+ */
+/*
+ * RAM/ROM/Flash chip drivers
+ */
+/*
+ * Mapping drivers for chip access
+ */
+/*
+ * Self-contained MTD device drivers
+ */
+/*
+ * Disk-On-Chip Device Drivers
+ */
+/*
+ * NAND Flash Device Drivers
+ */
+
+
+
+
+
+
+/*
+ * Parallel port support
+ */
+/*
+ * Plug and Play support
+ */
+
+
+
+/*
+ * Protocols
+ */
+
+
+
+
+/*
+ * Block devices
+ */
+/*
+ * IO Schedulers
+ */
+
+
+
+
+
+
+/*
+ * ATA/ATAPI/MFM/RLL support
+ */
+
+
+
+/*
+ * Please see Documentation/ide.txt for help/info on IDE drives
+ */
+/*
+ * IDE chipset support/bugfixes
+ */
+/*
+ * SCSI device support
+ */
+
+
+
+/*
+ * SCSI support type (disk, tape, CD-ROM)
+ */
+
+
+
+
+
+
+
+/*
+ * Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+ */
+
+
+
+
+/*
+ * SCSI Transport Attributes
+ */
+
+
+
+
+/*
+ * SCSI low-level drivers
+ */
+/*
+ * PCMCIA SCSI adapter support
+ */
+
+
+
+
+
+
+/*
+ * Old CD-ROM drivers (not SCSI, not IDE)
+ */
+
+
+/*
+ * Multi-device support (RAID and LVM)
+ */
+/*
+ * Fusion MPT device support
+ */
+
+
+
+
+
+/*
+ * IEEE 1394 (FireWire) support
+ */
+
+
+/*
+ * Subsystem Options
+ */
+
+
+
+
+
+/*
+ * Device Drivers
+ */
+
+
+
+/*
+ * Protocol Drivers
+ */
+/*
+ * I2O device support
+ */
+
+
+
+
+
+
+/*
+ * Networking support
+ */
+
+
+/*
+ * Networking options
+ */
+/*
+ * IP: Virtual Server Configuration
+ */
+
+
+
+
+/*
+ * IPVS transport protocol load balancing support
+ */
+
+
+
+
+
+/*
+ * IPVS scheduler
+ */
+/*
+ * IPVS application helper
+ */
+/*
+ * IP: Netfilter Configuration
+ */
+/*
+ * IPv6: Netfilter Configuration
+ */
+/*
+ * Bridge: Netfilter Configuration
+ */
+/*
+ * SCTP Configuration (EXPERIMENTAL)
+ */
+/*
+ * QoS and/or fair queueing
+ */
+/*
+ * Network testing
+ */
+/*
+ * IrDA protocols
+ */
+
+
+
+
+
+/*
+ * IrDA options
+ */
+
+
+
+
+/*
+ * Infrared-port device drivers
+ */
+
+/*
+ * SIR device drivers
+ */
+
+
+/*
+ * Dongle support
+ */
+/*
+ * Old SIR device drivers
+ */
+
+
+/*
+ * Old Serial dongle support
+ */
+
+
+/*
+ * FIR device drivers
+ */
+/*
+ * Bluetooth device drivers
+ */
+/*
+ * ARCnet devices
+ */
+
+
+/*
+ * Ethernet (10 or 100Mbit)
+ */
+/*
+ * Tulip family network device support
+ */
+/*
+ * Ethernet (1000 Mbit)
+ */
+/*
+ * Ethernet (10000 Mbit)
+ */
+
+
+
+
+
+
+/*
+ * Token Ring devices
+ */
+/*
+ * Wireless LAN (non-hamradio)
+ */
+
+
+/*
+ * Obsolete Wireless cards support (pre-802.11)
+ */
+
+
+
+
+
+
+/*
+ * Wireless 802.11 Frequency Hopping cards support
+ */
+
+
+/*
+ * Wireless 802.11b ISA/PCI cards support
+ */
+/*
+ * Wireless 802.11b Pcmcia/Cardbus cards support
+ */
+
+
+
+
+
+/*
+ * Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
+ */
+
+
+
+/*
+ * PCMCIA network device support
+ */
+/*
+ * Wan interfaces
+ */
+
+
+/*
+ * ATM drivers
+ */
+/*
+ * ISDN subsystem
+ */
+
+
+/*
+ * Old ISDN4Linux
+ */
+/*
+ * ISDN feature submodules
+ */
+
+
+
+/*
+ * ISDN4Linux hardware drivers
+ */
+
+/*
+ * Passive cards
+ */
+
+
+/*
+ * D-channel protocol features
+ */
+/*
+ * HiSax supported cards
+ */
+/*
+ * HiSax PCMCIA card service modules
+ */
+
+
+
+
+
+/*
+ * HiSax sub driver modules
+ */
+
+
+
+
+
+/*
+ * Active cards
+ */
+/*
+ * CAPI subsystem
+ */
+/*
+ * CAPI hardware drivers
+ */
+
+/*
+ * Active AVM cards
+ */
+/*
+ * Active Eicon DIVA Server cards
+ */
+/*
+ * Telephony Support
+ */
+
+
+/*
+ * Input device support
+ */
+
+
+/*
+ * Userland interfaces
+ */
+/*
+ * Input I/O drivers
+ */
+/*
+ * Input Device Drivers
+ */
+/*
+ * Character devices
+ */
+/*
+ * Serial drivers
+ */
+/*
+ * Non-8250 serial port support
+ */
+/*
+ * IPMI
+ */
+
+
+
+
+
+
+
+/*
+ * Watchdog Cards
+ */
+
+
+
+/*
+ * Watchdog Device Drivers
+ */
+/*
+ * ISA-based Watchdog Cards
+ */
+
+
+
+
+
+/*
+ * PCI-based Watchdog Cards
+ */
+
+
+
+
+/*
+ * USB-based Watchdog Cards
+ */
+/*
+ * Ftape, the floppy tape device driver
+ */
+/*
+ * PCMCIA character devices
+ */
+/*
+ * I2C support
+ */
+
+
+
+/*
+ * I2C Algorithms
+ */
+
+
+
+
+/*
+ * I2C Hardware Bus support
+ */
+/*
+ * Hardware Sensors Chip support
+ */
+/*
+ * Other I2C Chip support
+ */
+/*
+ * Dallas's 1-wire bus
+ */
+
+
+
+
+
+
+
+/*
+ * Misc devices
+ */
+
+
+/*
+ * Multimedia devices
+ */
+
+
+/*
+ * Video For Linux
+ */
+
+/*
+ * Video Adapters
+ */
+/*
+ * Radio Adapters
+ */
+/*
+ * Digital Video Broadcasting Devices
+ */
+
+
+
+/*
+ * Supported SAA7146 based PCI Adapters
+ */
+
+
+
+
+
+
+
+/*
+ * Supported USB Adapters
+ */
+/*
+ * Supported FlexCopII (B2C2) Adapters
+ */
+
+
+
+/*
+ * Supported BT878 Adapters
+ */
+
+
+/*
+ * Supported DVB Frontends
+ */
+
+/*
+ * Customise DVB Frontends
+ */
+
+/*
+ * DVB-S (satellite) frontends
+ */
+
+
+
+
+
+
+
+/*
+ * DVB-T (terrestrial) frontends
+ */
+/*
+ * DVB-C (cable) frontends
+ */
+/*
+ * Graphics support
+ */
+/*
+ * Console display driver support
+ */
+/*
+ * Logo configuration
+ */
+
+
+
+
+
+/*
+ * Sound
+ */
+
+
+/*
+ * Advanced Linux Sound Architecture
+ */
+/*
+ * Generic devices
+ */
+/*
+ * ISA devices
+ */
+/*
+ * PCI devices
+ */
+/*
+ * USB devices
+ */
+
+
+
+/*
+ * PCMCIA devices
+ */
+
+
+
+
+/*
+ * Open Sound System
+ */
+
+
+/*
+ * USB support
+ */
+
+
+
+/*
+ * Miscellaneous USB options
+ */
+/*
+ * USB Host Controller Drivers
+ */
+
+
+
+
+
+
+
+/*
+ * USB Device Class drivers
+ */
+
+
+/*
+ * USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
+ */
+
+
+
+
+/*
+ * NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; 
see USB_STORAGE Help for more information
+ */
+/*
+ * USB Input Devices
+ */
+/*
+ * USB Imaging devices
+ */
+
+
+
+/*
+ * USB Multimedia devices
+ */
+/*
+ * USB Network Adapters
+ */
+
+
+
+
+
+
+/*
+ * USB Host-to-Host Cables
+ */
+/*
+ * Intelligent USB Devices/Gadgets
+ */
+
+
+
+
+
+/*
+ * USB Network Adapters
+ */
+
+
+/*
+ * USB port drivers
+ */
+
+
+/*
+ * USB Serial Converter support
+ */
+/*
+ * USB Miscellaneous drivers
+ */
+/*
+ * USB ATM/DSL drivers
+ */
+
+
+
+/*
+ * USB Gadget Support
+ */
+
+
+/*
+ * MMC/SD Card support
+ */
+
+
+
+
+
+/*
+ * InfiniBand support
+ */
+
+
+
+
+
+
+
+/*
+ * File systems
+ */
+/*
+ * CD-ROM/DVD Filesystems
+ */
+
+
+
+
+
+
+
+/*
+ * DOS/FAT/NT Filesystems
+ */
+
+
+
+
+
+
+
+/*
+ * Pseudo filesystems
+ */
+/*
+ * Miscellaneous filesystems
+ */
+/*
+ * Network File Systems
+ */
+/*
+ * Partition Types
+ */
+/*
+ * Native Language Support
+ */
+/*
+ * Profiling support
+ */
+
+
+
+/*
+ * Kernel hacking
+ */
+/*
+ * Security options
+ */
+/*
+ * Cryptographic options
+ */
+/*
+ * Hardware crypto devices
+ */
+
+
+
+/*
+ * Library routines
+ */
+/*
+ * Allow us to mark functions as 'deprecated' and have gcc emit a nice
+ * warning for each use, in hopes of speeding the functions removal.
+ * Usage is:
+ *             int __deprecated foo(void)
+ */
+/*
+ * Allow us to avoid 'defined but not used' warnings on functions and data,
+ * as well as force them to be emitted to the assembly file.
+ *
+ * As of gcc 3.3, static functions that are not marked with attribute((used))
+ * may be elided from the assembly file.  As of gcc 3.3, static data not so
+ * marked will not be elided, but this may change in a future gcc version.
+ *
+ * In prior versions of gcc, such functions and data would be emitted, but
+ * would be warned about except with attribute((unused)).
+ */
+
+
+
+
+/*
+ * From the GCC manual:
+ *
+ * Many functions have no effects except the return value and their
+ * return value depends only on the parameters and/or global
+ * variables.  Such a function can be subject to common subexpression
+ * elimination and loop optimization just as an arithmetic operator
+ * would be.
+ * [...]
+ */
+
+
+
+
+/*
+ * From the GCC manual:
+ *
+ * Many functions do not examine any values except their arguments,
+ * and have no effects except the return value.  Basically this is
+ * just slightly more strict class than the `pure' attribute above,
+ * since function is not allowed to read global memory.
+ *
+ * Note that a function that has pointer arguments and examines the
+ * data pointed to must _not_ be declared `const'.  Likewise, a
+ * function that calls a non-`const' function usually must not be
+ * `const'.  It does not make sense for a `const' function to return
+ * `void'.
+ */
+/* PAGE_SHIFT determines the page size */
+/* to align the pointer to the (next) page boundary */
+
+
+/*
+ * This handles the memory map.. We could make this a config
+ * option, but too many people screw it up, and too few need
+ * it.
+ *
+ * A __PAGE_OFFSET of 0xC0000000 means that the kernel has
+ * a virtual address space of one gigabyte, which limits the
+ * amount of physical memory you can use to about 950MB. 
+ *
+ * If you want more physical memory than this then see the CONFIG_HIGHMEM4G
+ * and CONFIG_HIGHMEM64G options in the kernel configuration.
+ */
+/*
+ * low level task data that entry.S needs immediate access to
+ * - this struct should fit entirely inside of one cache line
+ * - this struct shares the supervisor stack pages
+ * - if the contents of this structure are changed, the assembly constants 
must also be changed
+ */
+/*
+ * DO NOT MODIFY.
+ *
+ * This file was generated by arch/i386/Makefile
+ *
+ */
+/*
+ * macros/functions for gaining access to the thread information structure
+ *
+ * preempt_count needs to be 1 initially, until the scheduler is functional.
+ */
+/* how to get the thread information struct from ASM */
+
+
+
+
+/* use this one if reg already contains %esp */
+
+
+
+
+
+/*
+ * thread information flags
+ * - these are process state flags that various assembly files may need to 
access
+ * - pending work-to-be-done flags are in LSW
+ * - other flags in MSW
+ */
+/* work to do on interrupt/exception return */
+
+
+
+
+/*
+ * Thread-synchronous status.
+ *
+ * This is different from the flags in that nobody else
+ * ever touches our thread-synchronous status, so we don't
+ * have to worry about atomic accesses.
+ */
+
+
+
+
+
+
+
+OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+OUTPUT_ARCH(i386)
+ENTRY(startup_32)
+jiffies = jiffies_64;
+SECTIONS
+{
+  . = (0xC0000000) + 0x100000;
+  /* read-only */
+  _text = .; /* Text and read-only data */
+  .text : {
+ *(.text)
+ __sched_text_start = .; *(.sched.text) __sched_text_end = .;
+ __lock_text_start = .; *(.spinlock.text) __lock_text_end = .;
+ *(.fixup)
+ *(.gnu.warning)
+ } = 0x9090
+
+  _etext = .; /* End of text section */
+
+  . = ALIGN(16); /* Exception table */
+  __start___ex_table = .;
+  __ex_table : { *(__ex_table) }
+  __stop___ex_table = .;
+
+  .rodata : AT(ADDR(.rodata) - 0) { *(.rodata) *(.rodata.*) *(__vermagic) } 
.rodata1 : AT(ADDR(.rodata1) - 0) { *(.rodata1) } .pci_fixup : 
AT(ADDR(.pci_fixup) - 0) { __start_pci_fixups_early = .; *(.pci_fixup_early) 
__end_pci_fixups_early = .; __start_pci_fixups_header = .; *(.pci_fixup_header) 
__end_pci_fixups_header = .; __start_pci_fixups_final = .; *(.pci_fixup_final) 
__end_pci_fixups_final = .; __start_pci_fixups_enable = .; *(.pci_fixup_enable) 
__end_pci_fixups_enable = .; } __ksymtab : AT(ADDR(__ksymtab) - 0) { 
__start___ksymtab = .; *(__ksymtab) __stop___ksymtab = .; } __ksymtab_gpl : 
AT(ADDR(__ksymtab_gpl) - 0) { __start___ksymtab_gpl = .; *(__ksymtab_gpl) 
__stop___ksymtab_gpl = .; } __kcrctab : AT(ADDR(__kcrctab) - 0) { 
__start___kcrctab = .; *(__kcrctab) __stop___kcrctab = .; } __kcrctab_gpl : 
AT(ADDR(__kcrctab_gpl) - 0) { __start___kcrctab_gpl = .; *(__kcrctab_gpl) 
__stop___kcrctab_gpl = .; } __ksymtab_strings : AT(ADDR(__ksymtab_strings) - 0) 
{ *(__ksymtab_strings) } __param : AT(ADDR(__param) - 0) { __start___param = .; 
*(__param) __stop___param = .; }
+
+  /* writeable */
+  .data : { /* Data */
+ *(.data)
+ CONSTRUCTORS
+ }
+
+  . = ALIGN(4096);
+  __nosave_begin = .;
+  .data_nosave : { *(.data.nosave) }
+  . = ALIGN(4096);
+  __nosave_end = .;
+
+  . = ALIGN(4096);
+  .data.page_aligned : { *(.data.idt) }
+
+  . = ALIGN(32);
+  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+
+  _edata = .; /* End of data section */
+
+  . = ALIGN((4096)); /* init_task */
+  .data.init_task : { *(.data.init_task) }
+
+  /* will be freed after init */
+  . = ALIGN(4096); /* Init code and data */
+  __init_begin = .;
+  .init.text : {
+ _sinittext = .;
+ *(.init.text)
+ _einittext = .;
+  }
+  .init.data : { *(.init.data) }
+  . = ALIGN(16);
+  __setup_start = .;
+  .init.setup : { *(.init.setup) }
+  __setup_end = .;
+  __initcall_start = .;
+  .initcall.init : {
+ *(.initcall1.init)
+ *(.initcall2.init)
+ *(.initcall3.init)
+ *(.initcall4.init)
+ *(.initcall5.init)
+ *(.initcall6.init)
+ *(.initcall7.init)
+  }
+  __initcall_end = .;
+  __con_initcall_start = .;
+  .con_initcall.init : { *(.con_initcall.init) }
+  __con_initcall_end = .;
+  .security_initcall.init : { __security_initcall_start = .; 
*(.security_initcall.init) __security_initcall_end = .; }
+  . = ALIGN(4);
+  __alt_instructions = .;
+  .altinstructions : { *(.altinstructions) }
+  __alt_instructions_end = .;
+ .altinstr_replacement : { *(.altinstr_replacement) }
+  /* .exit.text is discard at runtime, not link time, to deal with references
+     from .altinstructions and .eh_frame */
+  .exit.text : { *(.exit.text) }
+  .exit.data : { *(.exit.data) }
+  . = ALIGN(4096);
+  __initramfs_start = .;
+  .init.ramfs : { *(.init.ramfs) }
+  __initramfs_end = .;
+  . = ALIGN(32);
+  __per_cpu_start = .;
+  .data.percpu : { *(.data.percpu) }
+  __per_cpu_end = .;
+  . = ALIGN(4096);
+  __init_end = .;
+  /* freed after init ends here */
+
+  __bss_start = .; /* BSS */
+  .bss : {
+ *(.bss.page_aligned)
+ *(.bss)
+  }
+  . = ALIGN(4);
+  __bss_stop = .;
+
+  _end = . ;
+
+  /* This is where the kernel creates the early boot page tables */
+  . = ALIGN(4096);
+  pg0 = .;
+
+  /* Sections to be discarded */
+  /DISCARD/ : {
+ *(.exitcall.exit)
+ }
+
+  /* Stabs debugging sections.  */
+  .stab 0 : { *(.stab) }
+  .stabstr 0 : { *(.stabstr) }
+  .stab.excl 0 : { *(.stab.excl) }
+  .stab.exclstr 0 : { *(.stab.exclstr) }
+  .stab.index 0 : { *(.stab.index) }
+  .stab.indexstr 0 : { *(.stab.indexstr) }
+  .comment 0 : { *(.comment) }
+}
diff -urN linux/arch/i386/kernel/vsyscall-int80.so 
linux/arch/i386/kernel/vsyscall-int80.so
Binary files /dev/null and - differ
diff -urN linux/arch/i386/kernel/vsyscall-sysenter.so 
linux/arch/i386/kernel/vsyscall-sysenter.so
Binary files /dev/null and - differ
diff -urN linux/arch/i386/kernel/vsyscall.lds 
linux/arch/i386/kernel/vsyscall.lds
--- linux/arch/i386/kernel/vsyscall.lds 2004/09/19 12:30:03     1.2
+++ linux/arch/i386/kernel/vsyscall.lds 2005/01/25 04:27:55     1.3
@@ -4,37 +4,42 @@
  * segment (that fits in one page).  This script controls its layout.
  */
 
-/* This must match <asm/fixmap.h>.  */
-VSYSCALL_BASE = 0xffffe000;
 
+
+/*
+ * DO NOT MODIFY.
+ *
+ * This file was generated by arch/i386/Makefile
+ *
+ */
 SECTIONS
 {
-  . = VSYSCALL_BASE + SIZEOF_HEADERS;
+  . = -8192 + SIZEOF_HEADERS;
 
-  .hash           : { *(.hash) }               :text
-  .dynsym         : { *(.dynsym) }
-  .dynstr         : { *(.dynstr) }
-  .gnu.version    : { *(.gnu.version) }
-  .gnu.version_d  : { *(.gnu.version_d) }
-  .gnu.version_r  : { *(.gnu.version_r) }
+  .hash : { *(.hash) } :text
+  .dynsym : { *(.dynsym) }
+  .dynstr : { *(.dynstr) }
+  .gnu.version : { *(.gnu.version) }
+  .gnu.version_d : { *(.gnu.version_d) }
+  .gnu.version_r : { *(.gnu.version_r) }
 
   /* This linker script is used both with -r and with -shared.
      For the layouts to match, we need to skip more than enough
      space for the dynamic symbol table et al.  If this amount
      is insufficient, ld -shared will barf.  Just increase it here.  */
-  . = VSYSCALL_BASE + 0x400;
+  . = -8192 + 0x400;
 
-  .text           : { *(.text) }               :text =0x90909090
+  .text : { *(.text) } :text =0x90909090
 
-  .eh_frame_hdr   : { *(.eh_frame_hdr) }       :text :eh_frame_hdr
-  .eh_frame       : { KEEP (*(.eh_frame)) }    :text
-  .dynamic        : { *(.dynamic) }            :text :dynamic
-  .useless        : {
-       *(.got.plt) *(.got)
-       *(.data .data.* .gnu.linkonce.d.*)
-       *(.dynbss)
-       *(.bss .bss.* .gnu.linkonce.b.*)
-  }                                            :text
+  .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
+  .eh_frame : { KEEP (*(.eh_frame)) } :text
+  .dynamic : { *(.dynamic) } :text :dynamic
+  .useless : {
+   *(.got.plt) *(.got)
+ *(.data .data.* .gnu.linkonce.d.*)
+ *(.dynbss)
+ *(.bss .bss.* .gnu.linkonce.b.*)
+  } :text
 }
 
 /*
@@ -55,9 +60,9 @@
 {
   LINUX_2.5 {
     global:
-       __kernel_vsyscall;
-       __kernel_sigreturn;
-       __kernel_rt_sigreturn;
+     __kernel_vsyscall;
+     __kernel_sigreturn;
+     __kernel_rt_sigreturn;
 
     local: *;
   };
diff -urN linux/arch/i386/kernel/apm.c linux/arch/i386/kernel/apm.c
--- linux/arch/i386/kernel/apm.c        2005/01/13 14:05:24     1.73
+++ linux/arch/i386/kernel/apm.c        2005/01/25 04:27:55     1.74
@@ -424,7 +424,7 @@
 static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
 static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
 static struct apm_user *       user_list;
-static spinlock_t              user_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(user_list_lock);
 static struct desc_struct      bad_bios_desc = { 0, 0x00409200 };
 
 static char                    driver_version[] = "1.16ac";    /* no spaces */
@@ -1201,8 +1201,8 @@
                printk(KERN_CRIT "apm: suspend was vetoed, but suspending 
anyway.\n");
        }
 
-       device_suspend(3);
-       device_power_down(3);
+       device_suspend(PMSG_SUSPEND);
+       device_power_down(PMSG_SUSPEND);
 
        /* serialize with the timer interrupt */
        write_seqlock_irq(&xtime_lock);
@@ -1255,7 +1255,7 @@
 {
        int     err;
 
-       device_power_down(3);
+       device_power_down(PMSG_SUSPEND);
        /* serialize with the timer interrupt */
        write_seqlock_irq(&xtime_lock);
        /* If needed, notify drivers here */
diff -urN linux/arch/i386/kernel/dmi_scan.c linux/arch/i386/kernel/dmi_scan.c
--- linux/arch/i386/kernel/dmi_scan.c   2005/01/13 14:05:24     1.47
+++ linux/arch/i386/kernel/dmi_scan.c   2005/01/25 04:27:55     1.48
@@ -109,7 +109,10 @@
         * so early in setup that sucker gets confused into doing what
         * it shouldn't if we actually call it.
         */
-       for (p = q = ioremap(0xF0000, 0x10000); q < p + 0x10000; q += 16) {
+       p = ioremap(0xF0000, 0x10000);
+       if (p == NULL)
+               return -1;
+       for (q = p; q < p + 0x10000; q += 16) {
                memcpy_fromio(buf, q, 15);
                if(memcmp(buf, "_DMI_", 5)==0 && dmi_checksum(buf))
                {
diff -urN linux/arch/i386/kernel/efi.c linux/arch/i386/kernel/efi.c
--- linux/arch/i386/kernel/efi.c        2004/06/26 15:15:08     1.4
+++ linux/arch/i386/kernel/efi.c        2005/01/25 04:27:55     1.5
@@ -62,7 +62,7 @@
  */
 
 static unsigned long efi_rt_eflags;
-static spinlock_t efi_rt_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(efi_rt_lock);
 static pgd_t efi_bak_pg_dir_pointer[2];
 
 static void efi_call_phys_prelog(void)
diff -urN linux/arch/i386/kernel/i386_ksyms.c 
linux/arch/i386/kernel/i386_ksyms.c
--- linux/arch/i386/kernel/i386_ksyms.c 2005/01/13 14:05:24     1.79
+++ linux/arch/i386/kernel/i386_ksyms.c 2005/01/25 04:27:55     1.80
@@ -74,7 +74,6 @@
 EXPORT_SYMBOL(__ioremap);
 EXPORT_SYMBOL(ioremap_nocache);
 EXPORT_SYMBOL(iounmap);
-EXPORT_SYMBOL(probe_irq_mask);
 EXPORT_SYMBOL(kernel_thread);
 EXPORT_SYMBOL(pm_idle);
 EXPORT_SYMBOL(pm_power_off);
diff -urN linux/arch/i386/kernel/i387.c linux/arch/i386/kernel/i387.c
--- linux/arch/i386/kernel/i387.c       2004/11/15 11:49:16     1.18
+++ linux/arch/i386/kernel/i387.c       2005/01/25 04:27:55     1.19
@@ -111,16 +111,17 @@
 static inline unsigned long twd_fxsr_to_i387( struct i387_fxsave_struct 
*fxsave )
 {
        struct _fpxreg *st = NULL;
+       unsigned long tos = (fxsave->swd >> 11) & 7;
        unsigned long twd = (unsigned long) fxsave->twd;
        unsigned long tag;
        unsigned long ret = 0xffff0000u;
        int i;
 
-#define FPREG_ADDR(f, n)       ((char *)&(f)->st_space + (n) * 16);
+#define FPREG_ADDR(f, n)       ((void *)&(f)->st_space + (n) * 16);
 
        for ( i = 0 ; i < 8 ; i++ ) {
                if ( twd & 0x1 ) {
-                       st = (struct _fpxreg *) FPREG_ADDR( fxsave, i );
+                       st = FPREG_ADDR( fxsave, (i - tos) & 7 );
 
                        switch ( st->exponent & 0x7fff ) {
                        case 0x7fff:
diff -urN linux/arch/i386/kernel/i8259.c linux/arch/i386/kernel/i8259.c
--- linux/arch/i386/kernel/i8259.c      2004/10/25 20:44:13     1.46
+++ linux/arch/i386/kernel/i8259.c      2005/01/25 04:27:55     1.47
@@ -38,7 +38,7 @@
  * moves to arch independent land
  */
 
-spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(i8259A_lock);
 
 static void end_8259A_irq (unsigned int irq)
 {
diff -urN linux/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c
--- linux/arch/i386/kernel/io_apic.c    2004/12/04 18:15:58     1.85
+++ linux/arch/i386/kernel/io_apic.c    2005/01/25 04:27:55     1.86
@@ -45,7 +45,7 @@
 int (*ioapic_renumber_irq)(int ioapic, int irq);
 atomic_t irq_mis_count;
 
-static spinlock_t ioapic_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ioapic_lock);
 
 /*
  *     Is the SiS APIC rmw bug present ?
@@ -573,6 +573,7 @@
        for ( ; ; ) {
                set_current_state(TASK_INTERRUPTIBLE);
                time_remaining = schedule_timeout(time_remaining);
+               try_to_freeze(PF_FREEZE);
                if (time_after(jiffies,
                                prev_balance_time+balanced_irq_interval)) {
                        do_irq_balance();
diff -urN linux/arch/i386/kernel/kprobes.c linux/arch/i386/kernel/kprobes.c
--- linux/arch/i386/kernel/kprobes.c    2005/01/13 14:05:24     1.5
+++ linux/arch/i386/kernel/kprobes.c    2005/01/25 04:27:55     1.6
@@ -31,6 +31,7 @@
 #include <linux/spinlock.h>
 #include <linux/preempt.h>
 #include <asm/kdebug.h>
+#include <asm/desc.h>
 
 /* kprobe_status settings */
 #define KPROBE_HIT_ACTIVE      0x00000001
@@ -61,10 +62,14 @@
 
 int arch_prepare_kprobe(struct kprobe *p)
 {
-       memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
        return 0;
 }
 
+void arch_copy_kprobe(struct kprobe *p)
+{
+       memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
+}
+
 void arch_remove_kprobe(struct kprobe *p)
 {
 }
@@ -101,10 +106,8 @@
        if ((regs->xcs & 4) && (current->mm)) {
                lp = (unsigned long *) ((unsigned long)((regs->xcs >> 3) * 8)
                                        + (char *) current->mm->context.ldt);
-               addr = (kprobe_opcode_t *) ((((*lp) >> 16 &  0x0000ffff)
-                               | (*(lp +1) & 0xff000000)
-                               | ((*(lp +1) << 16) & 0x00ff0000))
-                               + regs->eip - sizeof(kprobe_opcode_t));
+               addr = (kprobe_opcode_t *) (get_desc_base(lp) + regs->eip -
+                                               sizeof(kprobe_opcode_t));
        } else {
                addr = (kprobe_opcode_t *)(regs->eip - sizeof(kprobe_opcode_t));
        }
diff -urN linux/arch/i386/kernel/mca.c linux/arch/i386/kernel/mca.c
--- linux/arch/i386/kernel/mca.c        2005/01/13 14:05:24     1.27
+++ linux/arch/i386/kernel/mca.c        2005/01/25 04:27:55     1.28
@@ -65,7 +65,7 @@
  *
  * Yes - Alan
  */
-static spinlock_t mca_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mca_lock);
 
 /* Build the status info for the adapter */
 
diff -urN linux/arch/i386/kernel/microcode.c linux/arch/i386/kernel/microcode.c
--- linux/arch/i386/kernel/microcode.c  2005/01/13 14:05:24     1.40
+++ linux/arch/i386/kernel/microcode.c  2005/01/25 04:27:55     1.41
@@ -109,7 +109,7 @@
 #define exttable_size(et) ((et)->count * EXT_SIGNATURE_SIZE + EXT_HEADER_SIZE)
 
 /* serialize access to the physical write to MSR 0x79 */
-static spinlock_t microcode_update_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(microcode_update_lock);
 
 /* no concurrent ->write()s are allowed on /dev/cpu/microcode */
 static DECLARE_MUTEX(microcode_sem);
diff -urN linux/arch/i386/kernel/nmi.c linux/arch/i386/kernel/nmi.c
--- linux/arch/i386/kernel/nmi.c        2004/09/19 12:30:03     1.25
+++ linux/arch/i386/kernel/nmi.c        2005/01/25 04:27:55     1.26
@@ -50,7 +50,7 @@
  * This is maintained separately from nmi_active because the NMI
  * watchdog may also be driven from the I/O APIC timer.
  */
-static spinlock_t lapic_nmi_owner_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(lapic_nmi_owner_lock);
 static unsigned int lapic_nmi_owner;
 #define LAPIC_NMI_WATCHDOG     (1<<0)
 #define LAPIC_NMI_RESERVED     (1<<1)
@@ -117,8 +117,12 @@
        /* FIXME: Only boot CPU is online at this stage.  Check CPUs
            as they come up. */
        for (cpu = 0; cpu < NR_CPUS; cpu++) {
-               if (!cpu_online(cpu))
+#ifdef CONFIG_SMP
+               /* Check cpu_callin_map here because that is set
+                  after the timer is started. */
+               if (!cpu_isset(cpu, cpu_callin_map))
                        continue;
+#endif
                if (nmi_count(cpu) - prev_nmi_count[cpu] <= 5) {
                        printk("CPU#%d: NMI appears to be stuck!\n", cpu);
                        nmi_active = 0;
diff -urN linux/arch/i386/kernel/scx200.c linux/arch/i386/kernel/scx200.c
--- linux/arch/i386/kernel/scx200.c     2004/10/25 20:44:13     1.4
+++ linux/arch/i386/kernel/scx200.c     2005/01/25 04:27:55     1.5
@@ -37,8 +37,8 @@
        .probe = scx200_probe,
 };
 
-spinlock_t scx200_gpio_lock = SPIN_LOCK_UNLOCKED;
-static spinlock_t scx200_gpio_config_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(scx200_gpio_lock);
+static DEFINE_SPINLOCK(scx200_gpio_config_lock);
 
 static int __devinit scx200_probe(struct pci_dev *pdev, const struct 
pci_device_id *ent)
 {
diff -urN linux/arch/i386/kernel/signal.c linux/arch/i386/kernel/signal.c
--- linux/arch/i386/kernel/signal.c     2005/01/13 14:05:24     1.57
+++ linux/arch/i386/kernel/signal.c     2005/01/25 04:27:55     1.58
@@ -365,20 +365,20 @@
                ? current_thread_info()->exec_domain->signal_invmap[sig]
                : sig;
 
-       err |= __put_user(usig, &frame->sig);
+       err = __put_user(usig, &frame->sig);
        if (err)
                goto give_sigsegv;
 
-       err |= setup_sigcontext(&frame->sc, &frame->fpstate, regs, set->sig[0]);
+       err = setup_sigcontext(&frame->sc, &frame->fpstate, regs, set->sig[0]);
        if (err)
                goto give_sigsegv;
 
        if (_NSIG_WORDS > 1) {
-               err |= __copy_to_user(&frame->extramask, &set->sig[1],
+               err = __copy_to_user(&frame->extramask, &set->sig[1],
                                      sizeof(frame->extramask));
+               if (err)
+                       goto give_sigsegv;
        }
-       if (err)
-               goto give_sigsegv;
 
        restorer = &__kernel_sigreturn;
        if (ka->sa.sa_flags & SA_RESTORER)
diff -urN linux/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
--- linux/arch/i386/kernel/smp.c        2004/12/04 18:15:58     1.64
+++ linux/arch/i386/kernel/smp.c        2005/01/25 04:27:55     1.65
@@ -244,7 +244,7 @@
 static cpumask_t flush_cpumask;
 static struct mm_struct * flush_mm;
 static unsigned long flush_va;
-static spinlock_t tlbstate_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tlbstate_lock);
 #define FLUSH_ALL      0xffffffff
 
 /*
@@ -481,7 +481,7 @@
  * Structure and data for smp_call_function(). This is designed to minimise
  * static memory requirements. It also looks cleaner.
  */
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
 
 struct call_data_struct {
        void (*func) (void *info);
diff -urN linux/arch/i386/kernel/smpboot.c linux/arch/i386/kernel/smpboot.c
--- linux/arch/i386/kernel/smpboot.c    2005/01/13 14:05:24     1.64
+++ linux/arch/i386/kernel/smpboot.c    2005/01/25 04:27:55     1.65
@@ -66,7 +66,7 @@
 /* bitmap of online cpus */
 cpumask_t cpu_online_map;
 
-static cpumask_t cpu_callin_map;
+cpumask_t cpu_callin_map;
 cpumask_t cpu_callout_map;
 static cpumask_t smp_commenced_mask;
 
diff -urN linux/arch/i386/kernel/time.c linux/arch/i386/kernel/time.c
--- linux/arch/i386/kernel/time.c       2005/01/13 14:05:24     1.58
+++ linux/arch/i386/kernel/time.c       2005/01/25 04:27:55     1.59
@@ -81,9 +81,9 @@
 
 extern unsigned long wall_jiffies;
 
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
 
-spinlock_t i8253_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(i8253_lock);
 EXPORT_SYMBOL(i8253_lock);
 
 struct timer_opts *cur_timer = &timer_none;
diff -urN linux/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c
--- linux/arch/i386/kernel/traps.c      2005/01/13 14:05:24     1.98
+++ linux/arch/i386/kernel/traps.c      2005/01/25 04:27:55     1.99
@@ -93,7 +93,7 @@
 
 static int kstack_depth_to_print = 24;
 struct notifier_block *i386die_chain;
-static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(die_notifier_lock);
 
 int register_die_notifier(struct notifier_block *nb)
 {
@@ -551,7 +551,7 @@
        printk("Do you have a strange power saving mode enabled?\n");
 }
 
-static spinlock_t nmi_print_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nmi_print_lock);
 
 void die_nmi (struct pt_regs *regs, const char *msg)
 {
diff -urN linux/arch/i386/kernel/vm86.c linux/arch/i386/kernel/vm86.c
--- linux/arch/i386/kernel/vm86.c       2005/01/13 14:05:24     1.46
+++ linux/arch/i386/kernel/vm86.c       2005/01/25 04:27:55     1.47
@@ -713,7 +713,7 @@
        int sig;
 } vm86_irqs[16];
 
-static spinlock_t irqbits_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(irqbits_lock);
 static int irqbits;
 
 #define ALLOWED_SIGS ( 1 /* 0 = don't send a signal */ \
diff -urN linux/arch/i386/kernel/acpi/wakeup.S 
linux/arch/i386/kernel/acpi/wakeup.S
--- linux/arch/i386/kernel/acpi/wakeup.S        2004/10/25 20:44:13     1.6
+++ linux/arch/i386/kernel/acpi/wakeup.S        2005/01/25 04:27:55     1.7
@@ -278,7 +278,7 @@
        movl %edi, saved_context_edi
        pushfl ; popl saved_context_eflags
 
-       movl $ret_point,saved_eip
+       movl $ret_point, saved_eip
        ret
 
 
@@ -295,7 +295,7 @@
        call    save_registers
        pushl   $3
        call    acpi_enter_sleep_state
-       addl    $4,%esp
+       addl    $4, %esp
        ret
        .p2align 4,,7
 ret_point:
diff -urN linux/arch/i386/kernel/cpu/common.c 
linux/arch/i386/kernel/cpu/common.c
--- linux/arch/i386/kernel/cpu/common.c 2005/01/13 14:05:24     1.26
+++ linux/arch/i386/kernel/cpu/common.c 2005/01/25 04:27:55     1.27
@@ -504,7 +504,7 @@
                printk("\n");
 }
 
-unsigned long cpu_initialized __initdata = 0;
+cpumask_t cpu_initialized __initdata = CPU_MASK_NONE;
 
 /* This is hacky. :)
  * We're emulating future behavior.
@@ -558,7 +558,7 @@
        struct tss_struct * t = &per_cpu(init_tss, cpu);
        struct thread_struct *thread = &current->thread;
 
-       if (test_and_set_bit(cpu, &cpu_initialized)) {
+       if (cpu_test_and_set(cpu, cpu_initialized)) {
                printk(KERN_WARNING "CPU#%d already initialized!\n", cpu);
                for (;;) local_irq_enable();
        }
diff -urN linux/arch/i386/kernel/cpu/intel_cacheinfo.c 
linux/arch/i386/kernel/cpu/intel_cacheinfo.c
--- linux/arch/i386/kernel/cpu/intel_cacheinfo.c        2004/10/25 20:44:13     
1.1
+++ linux/arch/i386/kernel/cpu/intel_cacheinfo.c        2005/01/25 04:27:55     
1.2
@@ -58,7 +58,7 @@
        { 0x00, 0, 0}
 };
 
-unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c)
+unsigned int __init init_intel_cacheinfo(struct cpuinfo_x86 *c)
 {
        unsigned int trace = 0, l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache 
sizes */
 
diff -urN linux/arch/i386/kernel/cpu/cpufreq/speedstep-est-common.h 
linux/arch/i386/kernel/cpu/cpufreq/speedstep-est-common.h
--- linux/arch/i386/kernel/cpu/cpufreq/speedstep-est-common.h   1970/01/01 
00:00:00
+++ linux/arch/i386/kernel/cpu/cpufreq/speedstep-est-common.h   Tue Jan 25 
04:27:55 2005        1.1
@@ -0,0 +1,25 @@
+/*
+ * Routines common for drivers handling Enhanced Speedstep Technology
+ *  Copyright (C) 2004 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
+ *
+ *  Licensed under the terms of the GNU GPL License version 2 -- see
+ *  COPYING for details.
+ */
+
+static inline int is_const_loops_cpu(unsigned int cpu)
+{
+       struct cpuinfo_x86      *c = cpu_data + cpu;
+
+       if (c->x86_vendor != X86_VENDOR_INTEL || !cpu_has(c, X86_FEATURE_EST))
+               return 0;
+
+       /*
+        * on P-4s, the TSC runs with constant frequency independent of cpu freq
+        * when we use EST
+        */
+       if (c->x86 == 0xf)
+               return 1;
+
+       return 0;
+}
+
diff -urN linux/arch/i386/kernel/cpu/cpufreq/Kconfig 
linux/arch/i386/kernel/cpu/cpufreq/Kconfig
--- linux/arch/i386/kernel/cpu/cpufreq/Kconfig  2004/11/15 11:49:16     1.12
+++ linux/arch/i386/kernel/cpu/cpufreq/Kconfig  2005/01/25 04:27:55     1.13
@@ -175,7 +175,7 @@
        depends on CPU_FREQ && EXPERIMENTAL
        help
          This adds the CPUFreq driver for FSB changing on nVidia nForce2
-         plattforms.
+         platforms.
 
          For details, take a look at <file:Documentation/cpu-freq/>.
 
diff -urN linux/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 
linux/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
--- linux/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c   2004/11/15 11:49:16     
1.1
+++ linux/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c   2005/01/25 04:27:55     
1.2
@@ -38,6 +38,8 @@
 #include <linux/acpi.h>
 #include <acpi/processor.h>
 
+#include "speedstep-est-common.h"
+
 #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, 
"acpi-cpufreq", msg)
 
 MODULE_AUTHOR("Paul Diefenbaugh, Dominik Brodowski");
@@ -48,10 +50,12 @@
 struct cpufreq_acpi_io {
        struct acpi_processor_performance       acpi_data;
        struct cpufreq_frequency_table          *freq_table;
+       unsigned int                            resume;
 };
 
 static struct cpufreq_acpi_io  *acpi_io_data[NR_CPUS];
 
+static struct cpufreq_driver acpi_cpufreq_driver;
 
 static int
 acpi_processor_write_port(
@@ -119,9 +123,14 @@
        }
        
        if (state == data->acpi_data.state) {
-               dprintk("Already at target state (P%d)\n", state);
-               retval = 0;
-               goto migrate_end;
+               if (unlikely(data->resume)) {
+                       dprintk("Called after resume, resetting to P%d\n", 
state);
+                       data->resume = 0;
+               } else {
+                       dprintk("Already at target state (P%d)\n", state);
+                       retval = 0;
+                       goto migrate_end;
+               }
        }
 
        dprintk("Transitioning from P%d to P%d\n",
@@ -368,6 +377,10 @@
        if (result)
                goto err_free;
 
+       if (is_const_loops_cpu(cpu)) {
+               acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS;
+       }
+
        /* capability check */
        if (data->acpi_data.state_count <= 1) {
                dprintk("No P-States\n");
@@ -462,6 +475,20 @@
        return (0);
 }
 
+static int
+acpi_cpufreq_resume (
+       struct cpufreq_policy   *policy)
+{
+       struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu];
+
+
+       dprintk("acpi_cpufreq_resume\n");
+
+       data->resume = 1;
+
+       return (0);
+}
+
 
 static struct freq_attr* acpi_cpufreq_attr[] = {
        &cpufreq_freq_attr_scaling_available_freqs,
@@ -473,6 +500,7 @@
        .target         = acpi_cpufreq_target,
        .init           = acpi_cpufreq_cpu_init,
        .exit           = acpi_cpufreq_cpu_exit,
+       .resume         = acpi_cpufreq_resume,
        .name           = "acpi-cpufreq",
        .owner          = THIS_MODULE,
        .attr           = acpi_cpufreq_attr,
diff -urN linux/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c 
linux/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
--- linux/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c        2004/11/15 
11:49:16     1.1
+++ linux/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c        2005/01/25 
04:27:55     1.2
@@ -55,16 +55,7 @@
 MODULE_PARM_DESC(min_fsb,
                  "Minimum FSB to use, if not defined: current FSB - 50");
 
-/* DEBUG
- *   Define it if you want verbose debug output, e.g. for bug reporting
- */
-//#define NFORCE2_DEBUG
-
-#ifdef NFORCE2_DEBUG
-#define dprintk(msg...) printk(msg)
-#else
-#define dprintk(msg...) do { } while(0)
-#endif
+#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, 
"cpufreq-nforce2", msg)
 
 /*
  * nforce2_calc_fsb - calculate FSB
diff -urN linux/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c 
linux/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
--- linux/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c     2004/11/15 11:49:16     
1.15
+++ linux/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c     2005/01/25 04:27:55     
1.16
@@ -209,7 +209,7 @@
        if ((gx_params->pci_suscfg & SUSMOD) == 0) 
                return stock_freq;
 
-       return (stock_freq * gx_params->on_duration) 
+       return (stock_freq * gx_params->off_duration) 
                / (gx_params->on_duration + gx_params->off_duration);
 }
 
diff -urN linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c 
linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
--- linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c    2004/11/15 11:49:16     
1.26
+++ linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c    2005/01/25 04:27:55     
1.27
@@ -171,7 +171,7 @@
                return 
speedstep_get_processor_frequency(SPEEDSTEP_PROCESSOR_PM);
        }
 
-       if ((c->x86 == 0x06) && (c->x86_model == 0x13)) {
+       if ((c->x86 == 0x06) && (c->x86_model == 0x0D)) {
                /* Pentium M (Dothan) */
                printk(KERN_WARNING PFX "Warning: Pentium M detected. "
                       "The speedstep_centrino module offers voltage scaling"
diff -urN linux/arch/i386/kernel/cpu/cpufreq/powernow-k7.c 
linux/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
--- linux/arch/i386/kernel/cpu/cpufreq/powernow-k7.c    2004/11/15 11:49:16     
1.22
+++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k7.c    2005/01/25 04:27:55     
1.23
@@ -67,12 +67,12 @@
 #endif
 
 #ifdef CONFIG_CPU_FREQ_DEBUG
-/* divide by 1000 to get VID. */
+/* divide by 1000 to get VCore voltage in V. */
 static int mobile_vid_table[32] = {
     2000, 1950, 1900, 1850, 1800, 1750, 1700, 1650,
     1600, 1550, 1500, 1450, 1400, 1350, 1300, 0,
     1275, 1250, 1225, 1200, 1175, 1150, 1125, 1100,
-    1075, 1050, 1024, 1000, 975, 950, 925, 0,
+    1075, 1050, 1025, 1000, 975, 950, 925, 0,
 };
 #endif
 
@@ -635,6 +635,17 @@
 
 static int powernow_cpu_exit (struct cpufreq_policy *policy) {
        cpufreq_frequency_table_put_attr(policy->cpu);
+
+#ifdef CONFIG_X86_POWERNOW_K7_ACPI
+       if (acpi_processor_perf) {
+               acpi_processor_unregister_performance(acpi_processor_perf, 0);
+               kfree(acpi_processor_perf);
+       }
+#endif
+
+       if (powernow_table)
+               kfree(powernow_table);
+
        return 0;
 }
 
@@ -664,15 +675,7 @@
 
 static void __exit powernow_exit (void)
 {
-#ifdef CONFIG_X86_POWERNOW_K7_ACPI
-       if (acpi_processor_perf) {
-               acpi_processor_unregister_performance(acpi_processor_perf, 0);
-               kfree(acpi_processor_perf);
-       }
-#endif
        cpufreq_unregister_driver(&powernow_driver);
-       if (powernow_table)
-               kfree(powernow_table);
 }
 
 module_param(acpi_force,  int, 0444);
diff -urN linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 
linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
--- linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c    2004/11/15 11:49:16     
1.13
+++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c    2005/01/25 04:27:55     
1.14
@@ -18,6 +18,9 @@
  *  Processor information obtained from Chapter 9 (Power and Thermal 
Management)
  *  of the "BIOS and Kernel Developer's Guide for the AMD Athlon 64 and AMD
  *  Opteron Processors" available for download from www.amd.com
+ *
+ *  Tables for specific CPUs can be infrerred from
+ *     
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/30430.pdf
  */
 
 #include <linux/kernel.h>
@@ -65,7 +68,12 @@
        return 1550-vid*25;
 }
 
-/* Return the vco fid for an input fid */
+/* Return the vco fid for an input fid
+ *
+ * Each "low" fid has corresponding "high" fid, and you can get to "low" fids
+ * only from corresponding high fids. This returns "high" fid corresponding to
+ * "low" one.
+ */
 static u32 convert_fid_to_vco_fid(u32 fid)
 {
        if (fid < HI_FID_TABLE_BOTTOM) {
@@ -278,7 +286,7 @@
                        return 1;
        }
 
-       while (rvosteps > 0) {
+       while ((rvosteps > 0)  && ((data->rvo + data->currvid) > reqvid)) {
                if (data->currvid == 0) {
                        rvosteps = 0;
                } else {
@@ -307,10 +315,7 @@
 /* Phase 2 - core frequency transition */
 static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid)
 {
-       u32 vcoreqfid;
-       u32 vcocurrfid;
-       u32 vcofiddiff;
-       u32 savevid = data->currvid;
+       u32 vcoreqfid, vcocurrfid, vcofiddiff, savevid = data->currvid;
 
        if ((reqfid < HI_FID_TABLE_BOTTOM) && (data->currfid < 
HI_FID_TABLE_BOTTOM)) {
                printk(KERN_ERR PFX "ph2: illegal lo-lo transition 0x%x 0x%x\n",
@@ -498,7 +503,7 @@
                    || (pst[j].fid & 1)
                    || (j && (pst[j].fid < HI_FID_TABLE_BOTTOM))) {
                        /* Only first fid is allowed to be in "low" range */
-                       printk(KERN_ERR PFX "fid %d invalid : 0x%x\n", j, 
pst[j].fid);
+                       printk(KERN_ERR PFX "two low fids - %d : 0x%x\n", j, 
pst[j].fid);
                        return -EINVAL;
                }
                if (pst[j].fid < lastfid)
@@ -618,7 +623,7 @@
                        return -ENODEV;
                }
 
-               data->vstable = psb->voltagestabilizationtime;
+               data->vstable = psb->vstable;
                dprintk("voltage stabilization time: %d(*20us)\n", 
data->vstable);
 
                dprintk("flags2: 0x%x\n", psb->flags2);
@@ -632,8 +637,8 @@
                dprintk("isochronous relief time: %d\n", data->irt);
                dprintk("maximum voltage step: %d - 0x%x\n", mvs, data->vidmvs);
 
-               dprintk("numpst: 0x%x\n", psb->numpst);
-               cpst = psb->numpst;
+               dprintk("numpst: 0x%x\n", psb->num_tables);
+               cpst = psb->num_tables;
                if ((psb->cpuid == 0x00000fc0) || (psb->cpuid == 0x00000fe0) ){
                        thiscpuid = cpuid_eax(CPUID_PROCESSOR_SIGNATURE);
                        if ((thiscpuid == 0x00000fc0) || (thiscpuid == 
0x00000fe0) ) {
@@ -651,7 +656,7 @@
                dprintk("maxvid: 0x%x\n", psb->maxvid);
                maxvid = psb->maxvid;
 
-               data->numps = psb->numpstates;
+               data->numps = psb->numps;
                dprintk("numpstates: 0x%x\n", data->numps);
                return fill_powernow_table(data, (struct pst_s *)(psb+1), 
maxvid);
        }
@@ -1010,6 +1015,7 @@
        /* min/max the cpu is capable of */
        if (cpufreq_frequency_table_cpuinfo(pol, data->powernow_table)) {
                printk(KERN_ERR PFX "invalid powernow_table\n");
+               powernow_k8_cpu_exit_acpi(data);
                kfree(data->powernow_table);
                kfree(data);
                return -EINVAL;
@@ -1027,6 +1033,7 @@
 err_out:
        set_cpus_allowed(current, oldmask);
        schedule();
+       powernow_k8_cpu_exit_acpi(data);
 
        kfree(data);
        return -ENODEV;
diff -urN linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.h 
linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.h
--- linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.h    2004/11/15 11:49:16     
1.7
+++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.h    2005/01/25 04:27:55     
1.8
@@ -21,8 +21,7 @@
        u32 plllock; /* pll lock time, units 1 us */
 
        /* keep track of the current fid / vid */
-       u32 currvid;
-       u32 currfid;
+       u32 currvid, currfid;
 
        /* the powernow_table includes all frequency and vid/fid pairings:
         * fid are the lower 8 bits of the index, vid are the upper 8 bits.
@@ -152,14 +151,14 @@
        u8 signature[10];
        u8 tableversion;
        u8 flags1;
-       u16 voltagestabilizationtime;
+       u16 vstable;
        u8 flags2;
-       u8 numpst;
+       u8 num_tables;
        u32 cpuid;
        u8 plllocktime;
        u8 maxfid;
        u8 maxvid;
-       u8 numpstates;
+       u8 numps;
 };
 
 /* Pairs of fid/vid values are appended to the version 1.4 PSB table. */
diff -urN linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c 
linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
--- linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c     2005/01/13 
14:05:24     1.13
+++ linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c     2005/01/25 
04:27:55     1.14
@@ -22,6 +22,8 @@
 #include <linux/init.h>
 #include <linux/cpufreq.h>
 #include <linux/config.h>
+#include <linux/delay.h>
+#include <linux/compiler.h>
 
 #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
 #include <linux/acpi.h>
@@ -32,6 +34,8 @@
 #include <asm/processor.h>
 #include <asm/cpufeature.h>
 
+#include "speedstep-est-common.h"
+
 #define PFX            "speedstep-centrino: "
 #define MAINTAINER     "Jeremy Fitzhardinge <jeremy@goop.org>"
 
@@ -71,8 +75,10 @@
 static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c, const struct 
cpu_id *x);
 
 /* Operating points for current CPU */
-static struct cpu_model *centrino_model;
-static const struct cpu_id *centrino_cpu;
+static struct cpu_model *centrino_model[NR_CPUS];
+static const struct cpu_id *centrino_cpu[NR_CPUS];
+
+static struct cpufreq_driver centrino_driver;
 
 #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE
 
@@ -239,7 +245,7 @@
 
        if (model->cpu_id == NULL) {
                /* No match at all */
-               printk(KERN_INFO PFX "no support for CPU model \"%s\": "
+               dprintk(KERN_INFO PFX "no support for CPU model \"%s\": "
                       "send /proc/cpuinfo to " MAINTAINER "\n",
                       cpu->x86_model_id);
                return -ENOENT;
@@ -247,15 +253,15 @@
 
        if (model->op_points == NULL) {
                /* Matched a non-match */
-               printk(KERN_INFO PFX "no table support for CPU model \"%s\": 
\n",
+               dprintk(KERN_INFO PFX "no table support for CPU model \"%s\": 
\n",
                       cpu->x86_model_id);
 #ifndef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
-               printk(KERN_INFO PFX "try compiling with 
CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n");
+               dprintk(KERN_INFO PFX "try compiling with 
CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n");
 #endif
                return -ENOENT;
        }
 
-       centrino_model = model;
+       centrino_model[policy->cpu] = model;
 
        dprintk("found \"%s\": max frequency: %dkHz\n",
               model->model_name, model->max_freq);
@@ -277,7 +283,7 @@
 }
 
 /* To be called only after centrino_model is initialized */
-static unsigned extract_clock(unsigned msr)
+static unsigned extract_clock(unsigned msr, unsigned int cpu, int failsafe)
 {
        int i;
 
@@ -286,28 +292,32 @@
         * for centrino, as some DSDTs are buggy.
         * Ideally, this can be done using the acpi_data structure.
         */
-       if ((centrino_cpu == &cpu_ids[CPU_BANIAS]) ||
-           (centrino_cpu == &cpu_ids[CPU_DOTHAN_A1]) ||
-           (centrino_cpu == &cpu_ids[CPU_DOTHAN_B0])) {
+       if ((centrino_cpu[cpu] == &cpu_ids[CPU_BANIAS]) ||
+           (centrino_cpu[cpu] == &cpu_ids[CPU_DOTHAN_A1]) ||
+           (centrino_cpu[cpu] == &cpu_ids[CPU_DOTHAN_B0])) {
                msr = (msr >> 8) & 0xff;
                return msr * 100000;
        }
 
-       if ((!centrino_model) || (!centrino_model->op_points))
+       if ((!centrino_model[cpu]) || (!centrino_model[cpu]->op_points))
                return 0;
 
        msr &= 0xffff;
-       for (i=0;centrino_model->op_points[i].frequency != CPUFREQ_TABLE_END; 
i++) {
-               if (msr == centrino_model->op_points[i].index)
-               return centrino_model->op_points[i].frequency;
-       }
-       return 0;
+       for (i=0;centrino_model[cpu]->op_points[i].frequency != 
CPUFREQ_TABLE_END; i++) {
+               if (msr == centrino_model[cpu]->op_points[i].index)
+                       return centrino_model[cpu]->op_points[i].frequency;
+       }
+       if (failsafe)
+               return centrino_model[cpu]->op_points[i-1].frequency;
+       else
+               return 0;
 }
 
 /* Return the current CPU frequency in kHz */
 static unsigned int get_cur_freq(unsigned int cpu)
 {
        unsigned l, h;
+       unsigned clock_freq;
        cpumask_t saved_mask;
 
        saved_mask = current->cpus_allowed;
@@ -316,8 +326,21 @@
                return 0;
 
        rdmsr(MSR_IA32_PERF_STATUS, l, h);
+       clock_freq = extract_clock(l, cpu, 0);
+
+       if (unlikely(clock_freq == 0)) {
+               /*
+                * On some CPUs, we can see transient MSR values (which are
+                * not present in _PSS), while CPU is doing some automatic
+                * P-state transition (like TM2). Get the last freq set 
+                * in PERF_CTL.
+                */
+               rdmsr(MSR_IA32_PERF_CTL, l, h);
+               clock_freq = extract_clock(l, cpu, 1);
+       }
+
        set_cpus_allowed(current, saved_mask);
-       return extract_clock(l);
+       return clock_freq;
 }
 
 
@@ -339,6 +362,7 @@
        struct acpi_object_list         arg_list = {1, &arg0};
        unsigned long                   cur_freq;
        int                             result = 0, i;
+       unsigned int                    cpu = policy->cpu;
 
        /* _PDC settings */
        arg0.buffer.length = 12;
@@ -350,8 +374,8 @@
        p.pdc = &arg_list;
 
        /* register with ACPI core */
-       if (acpi_processor_register_performance(&p, policy->cpu)) {
-               printk(KERN_INFO PFX "obtaining ACPI data failed\n");
+       if (acpi_processor_register_performance(&p, cpu)) {
+               dprintk(KERN_INFO PFX "obtaining ACPI data failed\n");
                return -EIO;
        }
 
@@ -392,49 +416,49 @@
                }
        }
 
-       centrino_model = kmalloc(sizeof(struct cpu_model), GFP_KERNEL);
-       if (!centrino_model) {
+       centrino_model[cpu] = kmalloc(sizeof(struct cpu_model), GFP_KERNEL);
+       if (!centrino_model[cpu]) {
                result = -ENOMEM;
                goto err_unreg;
        }
-       memset(centrino_model, 0, sizeof(struct cpu_model));
+       memset(centrino_model[cpu], 0, sizeof(struct cpu_model));
 
-       centrino_model->model_name=NULL;
-       centrino_model->max_freq = p.states[0].core_frequency * 1000;
-       centrino_model->op_points =  kmalloc(sizeof(struct 
cpufreq_frequency_table) *
+       centrino_model[cpu]->model_name=NULL;
+       centrino_model[cpu]->max_freq = p.states[0].core_frequency * 1000;
+       centrino_model[cpu]->op_points =  kmalloc(sizeof(struct 
cpufreq_frequency_table) *
                                             (p.state_count + 1), GFP_KERNEL);
-        if (!centrino_model->op_points) {
+        if (!centrino_model[cpu]->op_points) {
                 result = -ENOMEM;
                 goto err_kfree;
         }
 
         for (i=0; i<p.state_count; i++) {
-               centrino_model->op_points[i].index = p.states[i].control;
-               centrino_model->op_points[i].frequency = 
p.states[i].core_frequency * 1000;
+               centrino_model[cpu]->op_points[i].index = p.states[i].control;
+               centrino_model[cpu]->op_points[i].frequency = 
p.states[i].core_frequency * 1000;
                dprintk("adding state %i with frequency %u and control value 
%04x\n", 
-                       i, centrino_model->op_points[i].frequency, 
centrino_model->op_points[i].index);
+                       i, centrino_model[cpu]->op_points[i].frequency, 
centrino_model[cpu]->op_points[i].index);
        }
-       centrino_model->op_points[p.state_count].frequency = CPUFREQ_TABLE_END;
+       centrino_model[cpu]->op_points[p.state_count].frequency = 
CPUFREQ_TABLE_END;
 
-       cur_freq = get_cur_freq(policy->cpu);
+       cur_freq = get_cur_freq(cpu);
 
        for (i=0; i<p.state_count; i++) {
                if (!p.states[i].core_frequency) {
                        dprintk("skipping state %u\n", i);
-                       centrino_model->op_points[i].frequency = 
CPUFREQ_ENTRY_INVALID;
+                       centrino_model[cpu]->op_points[i].frequency = 
CPUFREQ_ENTRY_INVALID;
                        continue;
                }
                
-               if (extract_clock(centrino_model->op_points[i].index) !=
-                   (centrino_model->op_points[i].frequency)) {
+               if (extract_clock(centrino_model[cpu]->op_points[i].index, cpu, 
0) !=
+                   (centrino_model[cpu]->op_points[i].frequency)) {
                        dprintk("Invalid encoded frequency (%u vs. %u)\n",
-                               
extract_clock(centrino_model->op_points[i].index),
-                               centrino_model->op_points[i].frequency);
+                               
extract_clock(centrino_model[cpu]->op_points[i].index, cpu, 0),
+                               centrino_model[cpu]->op_points[i].frequency);
                        result = -EINVAL;
                        goto err_kfree_all;
                }
 
-               if (cur_freq == centrino_model->op_points[i].frequency)
+               if (cur_freq == centrino_model[cpu]->op_points[i].frequency)
                        p.state = i;
        }
 
@@ -444,12 +468,12 @@
        return 0;
 
  err_kfree_all:
-       kfree(centrino_model->op_points);
+       kfree(centrino_model[cpu]->op_points);
  err_kfree:
-       kfree(centrino_model);
+       kfree(centrino_model[cpu]);
  err_unreg:
-       acpi_processor_unregister_performance(&p, policy->cpu);
-       printk(KERN_INFO PFX "invalid ACPI data\n");
+       acpi_processor_unregister_performance(&p, cpu);
+       dprintk(KERN_INFO PFX "invalid ACPI data\n");
        return (result);
 }
 #else
@@ -473,14 +497,18 @@
                        break;
 
        if (i != N_IDS)
-               centrino_cpu = &cpu_ids[i];
+               centrino_cpu[policy->cpu] = &cpu_ids[i];
+
+       if (is_const_loops_cpu(policy->cpu)) {
+               centrino_driver.flags |= CPUFREQ_CONST_LOOPS;
+       }
 
        if (centrino_cpu_init_acpi(policy)) {
                if (policy->cpu != 0)
                        return -ENODEV;
 
-               if (!centrino_cpu) {
-                       printk(KERN_INFO PFX "found unsupported CPU with "
+               if (!centrino_cpu[policy->cpu]) {
+                       dprintk(KERN_INFO PFX "found unsupported CPU with "
                        "Enhanced SpeedStep: send /proc/cpuinfo to "
                        MAINTAINER "\n");
                        return -ENODEV;
@@ -516,32 +544,34 @@
 
        dprintk("centrino_cpu_init: cur=%dkHz\n", policy->cur);
 
-       ret = cpufreq_frequency_table_cpuinfo(policy, 
centrino_model->op_points);
+       ret = cpufreq_frequency_table_cpuinfo(policy, 
centrino_model[policy->cpu]->op_points);
        if (ret)
                return (ret);
 
-       cpufreq_frequency_table_get_attr(centrino_model->op_points, 
policy->cpu);
+       
cpufreq_frequency_table_get_attr(centrino_model[policy->cpu]->op_points, 
policy->cpu);
 
        return 0;
 }
 
 static int centrino_cpu_exit(struct cpufreq_policy *policy)
 {
-       if (!centrino_model)
+       unsigned int cpu = policy->cpu;
+
+       if (!centrino_model[cpu])
                return -ENODEV;
 
-       cpufreq_frequency_table_put_attr(policy->cpu);
+       cpufreq_frequency_table_put_attr(cpu);
 
 #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
-       if (!centrino_model->model_name) {
+       if (!centrino_model[cpu]->model_name) {
                dprintk("unregistering and freeing ACPI data\n");
-               acpi_processor_unregister_performance(&p, policy->cpu);
-               kfree(centrino_model->op_points);
-               kfree(centrino_model);
+               acpi_processor_unregister_performance(&p, cpu);
+               kfree(centrino_model[cpu]->op_points);
+               kfree(centrino_model[cpu]);
        }
 #endif
 
-       centrino_model = NULL;
+       centrino_model[cpu] = NULL;
 
        return 0;
 }
@@ -555,7 +585,7 @@
  */
 static int centrino_verify (struct cpufreq_policy *policy)
 {
-       return cpufreq_frequency_table_verify(policy, 
centrino_model->op_points);
+       return cpufreq_frequency_table_verify(policy, 
centrino_model[policy->cpu]->op_points);
 }
 
 /**
@@ -571,12 +601,12 @@
                            unsigned int relation)
 {
        unsigned int    newstate = 0;
-       unsigned int    msr, oldmsr, h;
+       unsigned int    msr, oldmsr, h, cpu = policy->cpu;
        struct cpufreq_freqs    freqs;
        cpumask_t               saved_mask;
        int                     retval;
 
-       if (centrino_model == NULL)
+       if (centrino_model[cpu] == NULL)
                return -ENODEV;
 
        /*
@@ -585,18 +615,18 @@
         */
        saved_mask = current->cpus_allowed;
        set_cpus_allowed(current, policy->cpus);
-       if (smp_processor_id() != policy->cpu) {
+       if (!cpu_isset(smp_processor_id(), policy->cpus)) {
                dprintk("couldn't limit to CPUs in this domain\n");
                return(-EAGAIN);
        }
 
-       if (cpufreq_frequency_table_target(policy, centrino_model->op_points, 
target_freq,
+       if (cpufreq_frequency_table_target(policy, 
centrino_model[cpu]->op_points, target_freq,
                                           relation, &newstate)) {
                retval = -EINVAL;
                goto migrate_end;
        }
 
-       msr = centrino_model->op_points[newstate].index;
+       msr = centrino_model[cpu]->op_points[newstate].index;
        rdmsr(MSR_IA32_PERF_CTL, oldmsr, h);
 
        if (msr == (oldmsr & 0xffff)) {
@@ -605,9 +635,9 @@
                goto migrate_end;
        }
 
-       freqs.cpu = policy->cpu;
-       freqs.old = extract_clock(oldmsr);
-       freqs.new = extract_clock(msr);
+       freqs.cpu = cpu;
+       freqs.old = extract_clock(oldmsr, cpu, 0);
+       freqs.new = extract_clock(msr, cpu, 0);
 
        dprintk("target=%dkHz old=%d new=%d msr=%04x\n",
                target_freq, freqs.old, freqs.new, msr);
diff -urN linux/arch/i386/kernel/cpu/mtrr/generic.c 
linux/arch/i386/kernel/cpu/mtrr/generic.c
--- linux/arch/i386/kernel/cpu/mtrr/generic.c   2005/01/13 14:05:24     1.9
+++ linux/arch/i386/kernel/cpu/mtrr/generic.c   2005/01/25 04:27:56     1.10
@@ -231,7 +231,7 @@
 
 static unsigned long cr4 = 0;
 static u32 deftype_lo, deftype_hi;
-static spinlock_t set_atomicity_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(set_atomicity_lock);
 
 /*
  * Since we are disabling the cache don't allow any interrupts - they
diff -urN linux/arch/i386/mach-visws/visws_apic.c 
linux/arch/i386/mach-visws/visws_apic.c
--- linux/arch/i386/mach-visws/visws_apic.c     2003/11/24 15:18:08     1.7
+++ linux/arch/i386/mach-visws/visws_apic.c     2005/01/25 04:27:56     1.8
@@ -31,7 +31,7 @@
 #include "irq_vectors.h"
 
 
-static spinlock_t cobalt_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cobalt_lock);
 
 /*
  * Set the given Cobalt APIC Redirection Table entry to point
diff -urN linux/arch/i386/mach-voyager/voyager_smp.c 
linux/arch/i386/mach-voyager/voyager_smp.c
--- linux/arch/i386/mach-voyager/voyager_smp.c  2005/01/13 14:05:25     1.19
+++ linux/arch/i386/mach-voyager/voyager_smp.c  2005/01/25 04:27:56     1.20
@@ -254,7 +254,7 @@
 static __u16 vic_irq_enable_mask[NR_CPUS] __cacheline_aligned = { 0 };
 
 /* Lock for enable/disable of VIC interrupts */
-static spinlock_t vic_irq_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned DEFINE_SPINLOCK(vic_irq_lock);
 
 /* The boot processor is correctly set up in PC mode when it 
  * comes up, but the secondaries need their master/slave 8259
@@ -798,7 +798,7 @@
 smp_vic_cmn_interrupt(struct pt_regs *regs)
 {
        static __u8 in_cmn_int = 0;
-       static spinlock_t cmn_int_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(cmn_int_lock);
 
        /* common ints are broadcast, so make sure we only do this once */
        _raw_spin_lock(&cmn_int_lock);
@@ -831,7 +831,7 @@
 
 static struct mm_struct * flush_mm;
 static unsigned long flush_va;
-static spinlock_t tlbstate_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tlbstate_lock);
 #define FLUSH_ALL      0xffffffff
 
 /*
@@ -1021,7 +1021,7 @@
               __asm__("hlt");
 }
 
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
 
 struct call_data_struct {
        void (*func) (void *info);
diff -urN linux/arch/i386/mm/fault.c linux/arch/i386/mm/fault.c
--- linux/arch/i386/mm/fault.c  2005/01/13 14:05:25     1.50
+++ linux/arch/i386/mm/fault.c  2005/01/25 04:27:56     1.51
@@ -112,9 +112,7 @@
        }
 
        /* Decode the code segment base from the descriptor */
-       base =   (desc[0] >> 16) |
-               ((desc[1] & 0xff) << 16) |
-                (desc[1] & 0xff000000);
+       base = get_desc_base((unsigned long *)desc);
 
        if (seg & (1<<2)) { 
                up(&current->mm->context.sem);
diff -urN linux/arch/i386/mm/pageattr.c linux/arch/i386/mm/pageattr.c
--- linux/arch/i386/mm/pageattr.c       2005/01/13 14:05:25     1.12
+++ linux/arch/i386/mm/pageattr.c       2005/01/25 04:27:56     1.13
@@ -13,7 +13,7 @@
 #include <asm/processor.h>
 #include <asm/tlbflush.h>
 
-static spinlock_t cpa_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cpa_lock);
 static struct list_head df_list = LIST_HEAD_INIT(df_list);
 
 
diff -urN linux/arch/i386/mm/pgtable.c linux/arch/i386/mm/pgtable.c
--- linux/arch/i386/mm/pgtable.c        2005/01/13 14:05:25     1.15
+++ linux/arch/i386/mm/pgtable.c        2005/01/25 04:27:56     1.16
@@ -172,7 +172,7 @@
  * recommendations and having no core impact whatsoever.
  * -- wli
  */
-spinlock_t pgd_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(pgd_lock);
 struct page *pgd_list;
 
 static inline void pgd_list_add(pgd_t *pgd)
diff -urN linux/arch/i386/pci/common.c linux/arch/i386/pci/common.c
--- linux/arch/i386/pci/common.c        2004/11/15 11:49:16     1.17
+++ linux/arch/i386/pci/common.c        2005/01/25 04:27:56     1.18
@@ -53,7 +53,7 @@
  * This interrupt-safe spinlock protects all accesses to PCI
  * configuration space.
  */
-spinlock_t pci_config_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(pci_config_lock);
 
 /*
  * Several buggy motherboards address only 16 devices and mirror
diff -urN linux/arch/i386/pci/numa.c linux/arch/i386/pci/numa.c
--- linux/arch/i386/pci/numa.c  2005/01/13 14:05:25     1.12
+++ linux/arch/i386/pci/numa.c  2005/01/25 04:27:56     1.13
@@ -4,6 +4,7 @@
 
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/nodemask.h>
 #include "pci.h"
 
 #define BUS2QUAD(global) (mp_bus_id_to_node[global])
diff -urN linux/arch/i386/pci/pcbios.c linux/arch/i386/pci/pcbios.c
--- linux/arch/i386/pci/pcbios.c        2004/08/24 15:10:05     1.10
+++ linux/arch/i386/pci/pcbios.c        2005/01/25 04:27:56     1.11
@@ -385,8 +385,8 @@
                        }
                }
                if (!found) {
-                       printk(KERN_WARNING "PCI: Device %02x:%02x not found by 
BIOS\n",
-                               dev->bus->number, dev->devfn);
+                       printk(KERN_WARNING "PCI: Device %s not found by 
BIOS\n",
+                               pci_name(dev));
                        list_del(&dev->global_list);
                        list_add_tail(&dev->global_list, &sorted_devices);
                }
diff -urN linux/arch/ia64/Kconfig linux/arch/ia64/Kconfig
--- linux/arch/ia64/Kconfig     2005/01/13 14:05:25     1.37
+++ linux/arch/ia64/Kconfig     2005/01/25 04:27:56     1.38
@@ -61,11 +61,12 @@
          will run on any supported IA-64 system.  However, if you configure
          a kernel for your specific system, it will be faster and smaller.
 
-         generic        For any supported IA-64 system
-         DIG-compliant  For DIG ("Developer's Interface Guide") compliant 
systems
-         HP-zx1/sx1000  For HP systems
-         SGI-SN2        For SGI Altix systems
-         Ski-simulator  For the HP simulator 
<http://www.hpl.hp.com/research/linux/ski/>
+         generic               For any supported IA-64 system
+         DIG-compliant         For DIG ("Developer's Interface Guide") 
compliant systems
+         HP-zx1/sx1000         For HP systems
+         HP-zx1/sx1000+swiotlb For HP systems with (broken) DMA-constrained 
devices.
+         SGI-SN2               For SGI Altix systems
+         Ski-simulator         For the HP simulator 
<http://www.hpl.hp.com/research/linux/ski/>
 
          If you don't know what to do, choose "generic".
 
@@ -78,6 +79,15 @@
          Build a kernel that runs on HP zx1 and sx1000 systems.  This adds
          support for the HP I/O MMU.
 
+config IA64_HP_ZX1_SWIOTLB
+       bool "HP-zx1/sx1000 with software I/O TLB"
+       help
+         Build a kernel that runs on HP zx1 and sx1000 systems even when they
+         have broken PCI devices which cannot DMA to full 32 bits.  Apart
+         from support for the HP I/O MMU, this includes support for the 
software
+         I/O TLB, which allows supporting the broken devices at the expense of
+         wasting some kernel memory (about 2MB by default).
+
 config IA64_SGI_SN2
        bool "SGI-SN2"
        help
@@ -188,7 +198,7 @@
 
 config DISCONTIGMEM
        bool "Discontiguous memory support"
-       depends on (IA64_DIG || IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1) && 
NUMA && VIRTUAL_MEM_MAP
+       depends on (IA64_DIG || IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || 
IA64_HP_ZX1_SWIOTLB) && NUMA && VIRTUAL_MEM_MAP
        default y if (IA64_SGI_SN2 || IA64_GENERIC) && NUMA
        help
          Say Y to support efficient handling of discontiguous physical memory,
@@ -326,7 +336,7 @@
 
 config PM
        bool "Power Management support"
-       depends on IA64_GENERIC || IA64_DIG || IA64_HP_ZX1
+       depends on IA64_GENERIC || IA64_DIG || IA64_HP_ZX1 || 
IA64_HP_ZX1_SWIOTLB
        default y
        help
          "Power Management" means that parts of your computer are shut
@@ -395,6 +405,17 @@
 
 source "lib/Kconfig"
 
+#
+# Use the generic interrupt handling code in kernel/irq/:
+#
+config GENERIC_HARDIRQS
+       bool
+       default y
+
+config GENERIC_IRQ_PROBE
+       bool
+       default y
+
 source "arch/ia64/hp/sim/Kconfig"
 
 source "arch/ia64/oprofile/Kconfig"
diff -urN linux/arch/ia64/Kconfig.debug linux/arch/ia64/Kconfig.debug
--- linux/arch/ia64/Kconfig.debug       2004/08/24 15:10:05     1.1
+++ linux/arch/ia64/Kconfig.debug       2005/01/25 04:27:56     1.2
@@ -16,7 +16,7 @@
 
 config IA64_GRANULE_64MB
        bool "64MB"
-       depends on !(IA64_GENERIC || IA64_HP_ZX1 || IA64_SGI_SN2)
+       depends on !(IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || 
IA64_SGI_SN2)
 
 endchoice
 
diff -urN linux/arch/ia64/Makefile linux/arch/ia64/Makefile
--- linux/arch/ia64/Makefile    2004/12/27 02:15:49     1.46
+++ linux/arch/ia64/Makefile    2005/01/25 04:27:56     1.47
@@ -57,11 +57,13 @@
 core-$(CONFIG_IA64_DIG)        += arch/ia64/dig/
 core-$(CONFIG_IA64_GENERIC)    += arch/ia64/dig/
 core-$(CONFIG_IA64_HP_ZX1)     += arch/ia64/dig/
+core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
 core-$(CONFIG_IA64_SGI_SN2)    += arch/ia64/sn/
 
 drivers-$(CONFIG_PCI)          += arch/ia64/pci/
 drivers-$(CONFIG_IA64_HP_SIM)  += arch/ia64/hp/sim/
 drivers-$(CONFIG_IA64_HP_ZX1)  += arch/ia64/hp/common/ arch/ia64/hp/zx1/
+drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
 drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ 
arch/ia64/hp/sim/ arch/ia64/sn/
 drivers-$(CONFIG_OPROFILE)     += arch/ia64/oprofile/
 
diff -urN linux/arch/ia64/defconfig linux/arch/ia64/defconfig
--- linux/arch/ia64/defconfig   2004/11/15 11:49:16     1.34
+++ linux/arch/ia64/defconfig   2005/01/25 04:27:56     1.35
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1
-# Tue Nov  2 11:47:56 2004
+# Linux kernel version: 2.6.10
+# Thu Jan  6 11:13:13 2005
 #
 
 #
@@ -59,6 +59,7 @@
 CONFIG_64BIT=y
 CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_TIME_INTERPOLATION=y
 CONFIG_EFI=y
 CONFIG_GENERIC_IOMAP=y
@@ -90,6 +91,7 @@
 CONFIG_IA64_MCA_RECOVERY=y
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
+CONFIG_ACPI_DEALLOCATE_IRQ=y
 
 #
 # Firmware Drivers
@@ -111,8 +113,10 @@
 CONFIG_ACPI_BOOT=y
 CONFIG_ACPI_INTERPRETER=y
 CONFIG_ACPI_BUTTON=m
+CONFIG_ACPI_VIDEO=m
 CONFIG_ACPI_FAN=m
 CONFIG_ACPI_PROCESSOR=m
+CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=m
 CONFIG_ACPI_NUMA=y
 CONFIG_ACPI_BLACKLIST_YEAR=0
@@ -121,6 +125,7 @@
 CONFIG_ACPI_POWER=y
 CONFIG_ACPI_PCI=y
 CONFIG_ACPI_SYSTEM=y
+CONFIG_ACPI_CONTAINER=m
 
 #
 # Bus options (PCI, PCMCIA)
@@ -176,6 +181,7 @@
 #
 # Plug and Play support
 #
+# CONFIG_PNP is not set
 
 #
 # Block devices
@@ -189,8 +195,10 @@
 CONFIG_BLK_DEV_NBD=m
 # CONFIG_BLK_DEV_SX8 is not set
 # CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
 
@@ -288,6 +296,7 @@
 #
 CONFIG_SCSI_SPI_ATTRS=y
 CONFIG_SCSI_FC_ATTRS=y
+# CONFIG_SCSI_ISCSI_ATTRS is not set
 
 #
 # SCSI low-level drivers
@@ -328,7 +337,6 @@
 CONFIG_SCSI_QLA2300=m
 CONFIG_SCSI_QLA2322=m
 # CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_QLA6322 is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
@@ -345,6 +353,7 @@
 CONFIG_MD_RAID5=m
 CONFIG_MD_RAID6=m
 CONFIG_MD_MULTIPATH=m
+# CONFIG_MD_FAULTY is not set
 CONFIG_BLK_DEV_DM=m
 CONFIG_DM_CRYPT=m
 CONFIG_DM_SNAPSHOT=m
@@ -395,6 +404,7 @@
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_TUNNEL is not set
 CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
 # CONFIG_IPV6 is not set
 # CONFIG_NETFILTER is not set
 
@@ -573,6 +583,7 @@
 # CONFIG_SERIO_SERPORT is not set
 # CONFIG_SERIO_CT82C710 is not set
 # CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_LIBPS2=y
 # CONFIG_SERIO_RAW is not set
 
 #
@@ -601,6 +612,7 @@
 CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_ROCKETPORT is not set
 # CONFIG_CYCLADES is not set
+# CONFIG_MOXA_SMARTIO is not set
 # CONFIG_SYNCLINK is not set
 # CONFIG_SYNCLINKMP is not set
 # CONFIG_N_HDLC is not set
@@ -651,7 +663,7 @@
 CONFIG_AGP=m
 CONFIG_AGP_I460=m
 CONFIG_AGP_HP_ZX1=m
-CONFIG_DRM=y
+CONFIG_DRM=m
 CONFIG_DRM_TDFX=m
 CONFIG_DRM_R128=m
 CONFIG_DRM_RADEON=m
@@ -810,6 +822,7 @@
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 CONFIG_USB_OHCI_HCD=m
 CONFIG_USB_UHCI_HCD=m
+# CONFIG_USB_SL811_HCD is not set
 
 #
 # USB Device Class drivers
@@ -819,6 +832,10 @@
 # CONFIG_USB_MIDI is not set
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER 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=m
 # CONFIG_USB_STORAGE_DEBUG is not set
 # CONFIG_USB_STORAGE_RW_DETECT is not set
@@ -858,7 +875,6 @@
 #
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
 
 #
 # USB Multimedia devices
@@ -870,7 +886,7 @@
 #
 
 #
-# USB Network adaptors
+# USB Network Adapters
 #
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_KAWETH is not set
@@ -913,6 +929,20 @@
 # CONFIG_USB_GADGET is not set
 
 #
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+CONFIG_INFINIBAND=m
+CONFIG_INFINIBAND_MTHCA=m
+# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
+CONFIG_INFINIBAND_IPOIB=m
+# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -1023,7 +1053,7 @@
 CONFIG_CIFS=m
 # CONFIG_CIFS_STATS is not set
 # CONFIG_CIFS_XATTR is not set
-# CONFIG_CIFS_POSIX is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1158,7 +1188,12 @@
 # CONFIG_CRYPTO_TEA is not set
 # CONFIG_CRYPTO_ARC4 is not set
 # CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 # CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
diff -urN linux/arch/ia64/configs/sn2_defconfig 
linux/arch/ia64/configs/sn2_defconfig
--- linux/arch/ia64/configs/sn2_defconfig       2004/11/15 11:49:16     1.12
+++ linux/arch/ia64/configs/sn2_defconfig       2005/01/25 04:27:56     1.13
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1
-# Mon Nov  1 14:35:44 2004
+# Linux kernel version: 2.6.10
+# Mon Jan 10 13:57:35 2005
 #
 
 #
@@ -58,6 +58,7 @@
 CONFIG_64BIT=y
 CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_TIME_INTERPOLATION=y
 CONFIG_EFI=y
 CONFIG_GENERIC_IOMAP=y
@@ -75,6 +76,7 @@
 CONFIG_IA64_L1_CACHE_SHIFT=7
 CONFIG_NUMA=y
 CONFIG_VIRTUAL_MEM_MAP=y
+CONFIG_HOLES_IN_ZONE=y
 CONFIG_DISCONTIGMEM=y
 # CONFIG_IA64_CYCLONE is not set
 CONFIG_IOSAPIC=y
@@ -90,6 +92,7 @@
 CONFIG_IA64_MCA_RECOVERY=y
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
+CONFIG_ACPI_DEALLOCATE_IRQ=y
 
 #
 # Firmware Drivers
@@ -110,6 +113,7 @@
 CONFIG_ACPI_BOOT=y
 CONFIG_ACPI_INTERPRETER=y
 # CONFIG_ACPI_BUTTON is not set
+CONFIG_ACPI_VIDEO=m
 # CONFIG_ACPI_FAN is not set
 # CONFIG_ACPI_PROCESSOR is not set
 CONFIG_ACPI_NUMA=y
@@ -119,6 +123,7 @@
 CONFIG_ACPI_POWER=y
 CONFIG_ACPI_PCI=y
 CONFIG_ACPI_SYSTEM=y
+# CONFIG_ACPI_CONTAINER is not set
 
 #
 # Bus options (PCI, PCMCIA)
@@ -174,6 +179,7 @@
 #
 # Plug and Play support
 #
+# CONFIG_PNP is not set
 
 #
 # Block devices
@@ -188,6 +194,7 @@
 # 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=4096
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -200,6 +207,7 @@
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
+CONFIG_ATA_OVER_ETH=m
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -287,6 +295,7 @@
 #
 CONFIG_SCSI_SPI_ATTRS=y
 CONFIG_SCSI_FC_ATTRS=y
+# CONFIG_SCSI_ISCSI_ATTRS is not set
 
 #
 # SCSI low-level drivers
@@ -333,7 +342,6 @@
 CONFIG_SCSI_QLA2300=y
 CONFIG_SCSI_QLA2322=y
 # CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_QLA6322 is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
@@ -350,6 +358,7 @@
 CONFIG_MD_RAID5=y
 # CONFIG_MD_RAID6 is not set
 CONFIG_MD_MULTIPATH=y
+# CONFIG_MD_FAULTY is not set
 CONFIG_BLK_DEV_DM=y
 CONFIG_DM_CRYPT=m
 CONFIG_DM_SNAPSHOT=m
@@ -399,6 +408,8 @@
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
 CONFIG_IPV6=m
 # CONFIG_IPV6_PRIVACY is not set
 # CONFIG_INET6_AH is not set
@@ -478,6 +489,7 @@
 # CONFIG_IXGB is not set
 CONFIG_S2IO=m
 # CONFIG_S2IO_NAPI is not set
+# CONFIG_2BUFF_MODE is not set
 
 #
 # Token Ring devices
@@ -554,6 +566,8 @@
 CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_ROCKETPORT is not set
 # CONFIG_CYCLADES is not set
+# CONFIG_MOXA_SMARTIO is not set
+# CONFIG_ISI is not set
 # CONFIG_SYNCLINK is not set
 # CONFIG_SYNCLINKMP is not set
 # CONFIG_N_HDLC is not set
@@ -664,6 +678,7 @@
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 CONFIG_USB_OHCI_HCD=m
 CONFIG_USB_UHCI_HCD=m
+# CONFIG_USB_SL811_HCD is not set
 
 #
 # USB Device Class drivers
@@ -671,6 +686,10 @@
 # CONFIG_USB_BLUETOOTH_TTY is not set
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER 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 is not set
 
 #
@@ -700,7 +719,6 @@
 #
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
 
 #
 # USB Multimedia devices
@@ -712,7 +730,7 @@
 #
 
 #
-# USB Network adaptors
+# USB Network Adapters
 #
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_KAWETH is not set
@@ -734,7 +752,6 @@
 #
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
-# CONFIG_USB_TIGL is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
@@ -754,6 +771,20 @@
 # CONFIG_USB_GADGET is not set
 
 #
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+CONFIG_INFINIBAND=m
+CONFIG_INFINIBAND_MTHCA=m
+# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
+CONFIG_INFINIBAND_IPOIB=m
+# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -864,7 +895,7 @@
 CONFIG_CIFS=m
 # CONFIG_CIFS_STATS is not set
 # CONFIG_CIFS_XATTR is not set
-# CONFIG_CIFS_POSIX is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -958,6 +989,7 @@
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_FS is not set
 CONFIG_IA64_GRANULE_16MB=y
 # CONFIG_IA64_GRANULE_64MB is not set
 # CONFIG_IA64_PRINT_HAZARDS is not set
@@ -994,7 +1026,12 @@
 # CONFIG_CRYPTO_TEA is not set
 # CONFIG_CRYPTO_ARC4 is not set
 # CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
 CONFIG_CRYPTO_DEFLATE=m
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 # CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
diff -urN linux/arch/ia64/hp/common/hwsw_iommu.c 
linux/arch/ia64/hp/common/hwsw_iommu.c
--- linux/arch/ia64/hp/common/hwsw_iommu.c      1970/01/01 00:00:00
+++ linux/arch/ia64/hp/common/hwsw_iommu.c      Tue Jan 25 04:27:56 2005        
1.1
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
+ *   Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
+ *
+ * This is a pseudo I/O MMU which dispatches to the hardware I/O MMU
+ * whenever possible.  We assume that the hardware I/O MMU requires
+ * full 32-bit addressability, as is the case, e.g., for HP zx1-based
+ * systems (there, the I/O MMU window is mapped at 3-4GB).  If a
+ * device doesn't provide full 32-bit addressability, we fall back on
+ * the sw I/O TLB.  This is good enough to let us support broken
+ * hardware such as soundcards which have a DMA engine that can
+ * address only 28 bits.
+ */
+
+#include <linux/device.h>
+
+#include <asm/machvec.h>
+
+/* swiotlb declarations & definitions: */
+extern void swiotlb_init_with_default_size (size_t size);
+extern ia64_mv_dma_alloc_coherent      swiotlb_alloc_coherent;
+extern ia64_mv_dma_free_coherent       swiotlb_free_coherent;
+extern ia64_mv_dma_map_single          swiotlb_map_single;
+extern ia64_mv_dma_unmap_single                swiotlb_unmap_single;
+extern ia64_mv_dma_map_sg              swiotlb_map_sg;
+extern ia64_mv_dma_unmap_sg            swiotlb_unmap_sg;
+extern ia64_mv_dma_supported           swiotlb_dma_supported;
+extern ia64_mv_dma_mapping_error       swiotlb_dma_mapping_error;
+
+/* hwiommu declarations & definitions: */
+
+extern ia64_mv_dma_alloc_coherent      sba_alloc_coherent;
+extern ia64_mv_dma_free_coherent       sba_free_coherent;
+extern ia64_mv_dma_map_single          sba_map_single;
+extern ia64_mv_dma_unmap_single                sba_unmap_single;
+extern ia64_mv_dma_map_sg              sba_map_sg;
+extern ia64_mv_dma_unmap_sg            sba_unmap_sg;
+extern ia64_mv_dma_supported           sba_dma_supported;
+extern ia64_mv_dma_mapping_error       sba_dma_mapping_error;
+
+#define hwiommu_alloc_coherent         sba_alloc_coherent
+#define hwiommu_free_coherent          sba_free_coherent
+#define hwiommu_map_single             sba_map_single
+#define hwiommu_unmap_single           sba_unmap_single
+#define hwiommu_map_sg                 sba_map_sg
+#define hwiommu_unmap_sg               sba_unmap_sg
+#define hwiommu_dma_supported          sba_dma_supported
+#define hwiommu_dma_mapping_error      sba_dma_mapping_error
+#define hwiommu_sync_single_for_cpu    machvec_dma_sync_single
+#define hwiommu_sync_sg_for_cpu                machvec_dma_sync_sg
+#define hwiommu_sync_single_for_device machvec_dma_sync_single
+#define hwiommu_sync_sg_for_device     machvec_dma_sync_sg
+
+
+/*
+ * Note: we need to make the determination of whether or not to use
+ * the sw I/O TLB based purely on the device structure.  Anything else
+ * would be unreliable or would be too intrusive.
+ */
+static inline int
+use_swiotlb (struct device *dev)
+{
+       return dev && dev->dma_mask && !hwiommu_dma_supported(dev, 
*dev->dma_mask);
+}
+
+void
+hwsw_init (void)
+{
+       /* default to a smallish 2MB sw I/O TLB */
+       swiotlb_init_with_default_size (2 * (1<<20));
+}
+
+void *
+hwsw_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, 
int flags)
+{
+       if (use_swiotlb(dev))
+               return swiotlb_alloc_coherent(dev, size, dma_handle, flags);
+       else
+               return hwiommu_alloc_coherent(dev, size, dma_handle, flags);
+}
+
+void
+hwsw_free_coherent (struct device *dev, size_t size, void *vaddr, dma_addr_t 
dma_handle)
+{
+       if (use_swiotlb(dev))
+               swiotlb_free_coherent(dev, size, vaddr, dma_handle);
+       else
+               hwiommu_free_coherent(dev, size, vaddr, dma_handle);
+}
+
+dma_addr_t
+hwsw_map_single (struct device *dev, void *addr, size_t size, int dir)
+{
+       if (use_swiotlb(dev))
+               return swiotlb_map_single(dev, addr, size, dir);
+       else
+               return hwiommu_map_single(dev, addr, size, dir);
+}
+
+void
+hwsw_unmap_single (struct device *dev, dma_addr_t iova, size_t size, int dir)
+{
+       if (use_swiotlb(dev))
+               return swiotlb_unmap_single(dev, iova, size, dir);
+       else
+               return hwiommu_unmap_single(dev, iova, size, dir);
+}
+
+
+int
+hwsw_map_sg (struct device *dev, struct scatterlist *sglist, int nents, int 
dir)
+{
+       if (use_swiotlb(dev))
+               return swiotlb_map_sg(dev, sglist, nents, dir);
+       else
+               return hwiommu_map_sg(dev, sglist, nents, dir);
+}
+
+void
+hwsw_unmap_sg (struct device *dev, struct scatterlist *sglist, int nents, int 
dir)
+{
+       if (use_swiotlb(dev))
+               return swiotlb_unmap_sg(dev, sglist, nents, dir);
+       else
+               return hwiommu_unmap_sg(dev, sglist, nents, dir);
+}
+
+void
+hwsw_sync_single_for_cpu (struct device *dev, dma_addr_t addr, size_t size, 
int dir)
+{
+       if (use_swiotlb(dev))
+               swiotlb_sync_single_for_cpu(dev, addr, size, dir);
+       else
+               hwiommu_sync_single_for_cpu(dev, addr, size, dir);
+}
+
+void
+hwsw_sync_sg_for_cpu (struct device *dev, struct scatterlist *sg, int nelems, 
int dir)
+{
+       if (use_swiotlb(dev))
+               swiotlb_sync_sg_for_cpu(dev, sg, nelems, dir);
+       else
+               hwiommu_sync_sg_for_cpu(dev, sg, nelems, dir);
+}
+
+void
+hwsw_sync_single_for_device (struct device *dev, dma_addr_t addr, size_t size, 
int dir)
+{
+       if (use_swiotlb(dev))
+               swiotlb_sync_single_for_device(dev, addr, size, dir);
+       else
+               hwiommu_sync_single_for_device(dev, addr, size, dir);
+}
+
+void
+hwsw_sync_sg_for_device (struct device *dev, struct scatterlist *sg, int 
nelems, int dir)
+{
+       if (use_swiotlb(dev))
+               swiotlb_sync_sg_for_device(dev, sg, nelems, dir);
+       else
+               hwiommu_sync_sg_for_device(dev, sg, nelems, dir);
+}
+
+int
+hwsw_dma_supported (struct device *dev, u64 mask)
+{
+       if (hwiommu_dma_supported(dev, mask))
+               return 1;
+       return swiotlb_dma_supported(dev, mask);
+}
+
+int
+hwsw_dma_mapping_error (dma_addr_t dma_addr)
+{
+       return hwiommu_dma_mapping_error (dma_addr) || 
swiotlb_dma_mapping_error(dma_addr);
+}
+
+EXPORT_SYMBOL(hwsw_dma_mapping_error);
+EXPORT_SYMBOL(hwsw_map_single);
+EXPORT_SYMBOL(hwsw_unmap_single);
+EXPORT_SYMBOL(hwsw_map_sg);
+EXPORT_SYMBOL(hwsw_unmap_sg);
+EXPORT_SYMBOL(hwsw_dma_supported);
+EXPORT_SYMBOL(hwsw_alloc_coherent);
+EXPORT_SYMBOL(hwsw_free_coherent);
diff -urN linux/arch/ia64/hp/common/Makefile linux/arch/ia64/hp/common/Makefile
--- linux/arch/ia64/hp/common/Makefile  2003/06/04 14:05:38     1.5
+++ linux/arch/ia64/hp/common/Makefile  2005/01/25 04:27:56     1.6
@@ -6,3 +6,5 @@
 #
 
 obj-y := sba_iommu.o
+obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += hwsw_iommu.o
+obj-$(CONFIG_IA64_GENERIC) += hwsw_iommu.o
diff -urN linux/arch/ia64/hp/common/sba_iommu.c 
linux/arch/ia64/hp/common/sba_iommu.c
--- linux/arch/ia64/hp/common/sba_iommu.c       2004/11/15 11:49:16     1.25
+++ linux/arch/ia64/hp/common/sba_iommu.c       2005/01/25 04:27:56     1.26
@@ -1557,7 +1557,7 @@
        ** We program the next pdir index after we stop w/ a key for
        ** the GART code to handshake on.
        */
-       while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != 
NULL)
+       for_each_pci_dev(device)        
                agp_found |= pci_find_capability(device, PCI_CAP_ID_AGP);
 
        if (agp_found && reserve_sba_gart) {
diff -urN linux/arch/ia64/hp/sim/simeth.c linux/arch/ia64/hp/sim/simeth.c
--- linux/arch/ia64/hp/sim/simeth.c     2004/10/25 20:44:14     1.11
+++ linux/arch/ia64/hp/sim/simeth.c     2005/01/25 04:27:56     1.12
@@ -286,7 +286,7 @@
 static int
 simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr)
 {
-       struct net_device *dev = (struct net_device *)ptr;
+       struct net_device *dev = ptr;
        struct simeth_local *local;
        struct in_device *in_dev;
        struct in_ifaddr **ifap = NULL;
@@ -382,7 +382,7 @@
 static int
 simeth_tx(struct sk_buff *skb, struct net_device *dev)
 {
-       struct simeth_local *local = (struct simeth_local *)dev->priv;
+       struct simeth_local *local = dev->priv;
 
 #if 0
        /* ensure we have at least ETH_ZLEN bytes (min frame size) */
@@ -446,7 +446,7 @@
        int                     len;
        int                     rcv_count = SIMETH_RECV_MAX;
 
-       local = (struct simeth_local *)dev->priv;
+       local = dev->priv;
        /*
         * the loop concept has been borrowed from other drivers
         * looks to me like it's a throttling thing to avoid pushing to many
@@ -515,7 +515,7 @@
 static struct net_device_stats *
 simeth_get_stats(struct net_device *dev)
 {
-       struct simeth_local  *local = (struct simeth_local *) dev->priv;
+       struct simeth_local *local = dev->priv;
 
        return &local->stats;
 }
diff -urN linux/arch/ia64/hp/zx1/hpzx1_swiotlb_machvec.c 
linux/arch/ia64/hp/zx1/hpzx1_swiotlb_machvec.c
--- linux/arch/ia64/hp/zx1/hpzx1_swiotlb_machvec.c      1970/01/01 00:00:00
+++ linux/arch/ia64/hp/zx1/hpzx1_swiotlb_machvec.c      Tue Jan 25 04:27:57 
2005        1.1
@@ -0,0 +1,3 @@
+#define MACHVEC_PLATFORM_NAME          hpzx1_swiotlb
+#define MACHVEC_PLATFORM_HEADER                <asm/machvec_hpzx1_swiotlb.h>
+#include <asm/machvec_init.h>
diff -urN linux/arch/ia64/hp/zx1/Makefile linux/arch/ia64/hp/zx1/Makefile
--- linux/arch/ia64/hp/zx1/Makefile     2003/06/05 18:23:58     1.5
+++ linux/arch/ia64/hp/zx1/Makefile     2005/01/25 04:27:56     1.6
@@ -5,4 +5,4 @@
 # Copyright (C) Alex Williamson (alex_williamson@hp.com)
 #
 
-obj-$(CONFIG_IA64_GENERIC) += hpzx1_machvec.o
+obj-$(CONFIG_IA64_GENERIC) += hpzx1_machvec.o hpzx1_swiotlb_machvec.o
diff -urN linux/arch/ia64/ia32/ia32_entry.S linux/arch/ia64/ia32/ia32_entry.S
--- linux/arch/ia64/ia32/ia32_entry.S   2005/01/13 14:05:26     1.37
+++ linux/arch/ia64/ia32/ia32_entry.S   2005/01/25 04:27:57     1.38
@@ -387,7 +387,7 @@
        data8 sys32_rt_sigaction
        data8 sys32_rt_sigprocmask /* 175 */
        data8 sys_rt_sigpending
-       data8 compat_rt_sigtimedwait
+       data8 compat_sys_rt_sigtimedwait
        data8 sys32_rt_sigqueueinfo
        data8 sys32_rt_sigsuspend
        data8 sys32_pread         /* 180 */
diff -urN linux/arch/ia64/ia32/sys_ia32.c linux/arch/ia64/ia32/sys_ia32.c
--- linux/arch/ia64/ia32/sys_ia32.c     2005/01/13 14:05:26     1.69
+++ linux/arch/ia64/ia32/sys_ia32.c     2005/01/25 04:27:57     1.70
@@ -1873,6 +1873,10 @@
                                            compat_ptr(data));
                break;
 
+             case PTRACE_GETEVENTMSG:   
+               ret = put_user(child->ptrace_message, (unsigned int __user *) 
compat_ptr(data));
+               break;
+
              case PTRACE_SYSCALL:      /* continue, stop after next syscall */
              case PTRACE_CONT:         /* restart after signal. */
              case PTRACE_KILL:
diff -urN linux/arch/ia64/kernel/Makefile linux/arch/ia64/kernel/Makefile
--- linux/arch/ia64/kernel/Makefile     2005/01/13 14:05:26     1.35
+++ linux/arch/ia64/kernel/Makefile     2005/01/25 04:27:57     1.36
@@ -12,6 +12,7 @@
 obj-$(CONFIG_IA64_BRL_EMU)     += brl_emu.o
 obj-$(CONFIG_IA64_GENERIC)     += acpi-ext.o
 obj-$(CONFIG_IA64_HP_ZX1)      += acpi-ext.o
+obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o
 obj-$(CONFIG_IA64_PALINFO)     += palinfo.o
 obj-$(CONFIG_IOSAPIC)          += iosapic.o
 obj-$(CONFIG_MODULES)          += module.o
diff -urN linux/arch/ia64/kernel/acpi.c linux/arch/ia64/kernel/acpi.c
--- linux/arch/ia64/kernel/acpi.c       2005/01/13 14:05:26     1.46
+++ linux/arch/ia64/kernel/acpi.c       2005/01/25 04:27:57     1.47
@@ -113,6 +113,8 @@
        return "hpsim";
 # elif defined (CONFIG_IA64_HP_ZX1)
        return "hpzx1";
+# elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB)
+       return "hpzx1_swiotlb";
 # elif defined (CONFIG_IA64_SGI_SN2)
        return "sn2";
 # elif defined (CONFIG_IA64_DIG)
diff -urN linux/arch/ia64/kernel/asm-offsets.c 
linux/arch/ia64/kernel/asm-offsets.c
--- linux/arch/ia64/kernel/asm-offsets.c        2004/11/15 11:49:17     1.6
+++ linux/arch/ia64/kernel/asm-offsets.c        2005/01/25 04:27:57     1.7
@@ -203,7 +203,16 @@
 #endif
 
        BLANK();
-       DEFINE(IA64_MCA_TLB_INFO_SIZE, sizeof (struct ia64_mca_tlb_info));
+       /* used by arch/ia64/kernel/mca_asm.S */
+       DEFINE(IA64_CPUINFO_PERCPU_PADDR, offsetof (struct cpuinfo_ia64, 
percpu_paddr));
+       DEFINE(IA64_CPUINFO_PAL_PADDR, offsetof (struct cpuinfo_ia64, 
pal_paddr));
+       DEFINE(IA64_CPUINFO_PA_MCA_INFO, offsetof (struct cpuinfo_ia64, 
ia64_pa_mca_data));
+       DEFINE(IA64_MCA_PROC_STATE_DUMP, offsetof (struct ia64_mca_cpu_s, 
ia64_mca_proc_state_dump));
+       DEFINE(IA64_MCA_STACK, offsetof (struct ia64_mca_cpu_s, 
ia64_mca_stack));
+       DEFINE(IA64_MCA_STACKFRAME, offsetof (struct ia64_mca_cpu_s, 
ia64_mca_stackframe));
+       DEFINE(IA64_MCA_BSPSTORE, offsetof (struct ia64_mca_cpu_s, 
ia64_mca_bspstore));
+       DEFINE(IA64_INIT_STACK, offsetof (struct ia64_mca_cpu_s, 
ia64_init_stack));
+
        /* used by head.S */
        DEFINE(IA64_CPUINFO_NSEC_PER_CYC_OFFSET, offsetof (struct cpuinfo_ia64, 
nsec_per_cyc));
 
diff -urN linux/arch/ia64/kernel/efi.c linux/arch/ia64/kernel/efi.c
--- linux/arch/ia64/kernel/efi.c        2004/11/15 11:49:17     1.37
+++ linux/arch/ia64/kernel/efi.c        2005/01/25 04:27:57     1.38
@@ -414,16 +414,15 @@
  * ITR to enable safe PAL calls in virtual mode.  See IA-64 Processor
  * Abstraction Layer chapter 11 in ADAG
  */
-void
-efi_map_pal_code (void)
+
+static efi_memory_desc_t *
+pal_code_memdesc (void)
 {
        void *efi_map_start, *efi_map_end, *p;
        efi_memory_desc_t *md;
        u64 efi_desc_size;
        int pal_code_count = 0;
-       u64 mask, psr;
-       u64 vaddr;
-       int cpu;
+       u64 vaddr, mask;
 
        efi_map_start = __va(ia64_boot_param->efi_memmap);
        efi_map_end   = efi_map_start + ia64_boot_param->efi_memmap_size;
@@ -467,29 +466,58 @@
                if (md->num_pages << EFI_PAGE_SHIFT > IA64_GRANULE_SIZE)
                        panic("Woah!  PAL code size bigger than a granule!");
 
-               mask  = ~((1 << IA64_GRANULE_SHIFT) - 1);
 #if EFI_DEBUG
+               mask  = ~((1 << IA64_GRANULE_SHIFT) - 1);
+
                printk(KERN_INFO "CPU %d: mapping PAL code [0x%lx-0x%lx) into 
[0x%lx-0x%lx)\n",
-                      smp_processor_id(), md->phys_addr,
-                      md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT),
-                      vaddr & mask, (vaddr & mask) + IA64_GRANULE_SIZE);
+                       smp_processor_id(), md->phys_addr,
+                       md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT),
+                       vaddr & mask, (vaddr & mask) + IA64_GRANULE_SIZE);
 #endif
+               return md;
+       }
+
+       return NULL;
+}
+
+void
+efi_get_pal_addr (void)
+{
+       efi_memory_desc_t *md = pal_code_memdesc();
+       u64 vaddr, mask;
+       struct cpuinfo_ia64 *cpuinfo;
+
+       if (md != NULL) {
+
+               vaddr = PAGE_OFFSET + md->phys_addr;
+               mask  = ~((1 << IA64_GRANULE_SHIFT) - 1);
+
+               cpuinfo = (struct cpuinfo_ia64 
*)__va(ia64_get_kr(IA64_KR_PA_CPU_INFO));
+               cpuinfo->pal_base = vaddr & mask;
+               cpuinfo->pal_paddr = pte_val(mk_pte_phys(md->phys_addr, 
PAGE_KERNEL));
+       }
+}
+
+void
+efi_map_pal_code (void)
+{
+       efi_memory_desc_t *md = pal_code_memdesc();
+       u64 vaddr, mask, psr;
+
+       if (md != NULL) {
+
+               vaddr = PAGE_OFFSET + md->phys_addr;
+               mask  = ~((1 << IA64_GRANULE_SHIFT) - 1);
 
                /*
                 * Cannot write to CRx with PSR.ic=1
                 */
                psr = ia64_clear_ic();
                ia64_itr(0x1, IA64_TR_PALCODE, vaddr & mask,
-                        pte_val(pfn_pte(md->phys_addr >> PAGE_SHIFT, 
PAGE_KERNEL)),
-                        IA64_GRANULE_SHIFT);
+                       pte_val(pfn_pte(md->phys_addr >> PAGE_SHIFT, 
PAGE_KERNEL)),
+                       IA64_GRANULE_SHIFT);
                ia64_set_psr(psr);              /* restore psr */
                ia64_srlz_i();
-
-               cpu = smp_processor_id();
-
-               /* insert this TR into our list for MCA recovery purposes */
-               ia64_mca_tlb_list[cpu].pal_base = vaddr & mask;
-               ia64_mca_tlb_list[cpu].pal_paddr = 
pte_val(mk_pte_phys(md->phys_addr, PAGE_KERNEL));
        }
 }
 
diff -urN linux/arch/ia64/kernel/entry.S linux/arch/ia64/kernel/entry.S
--- linux/arch/ia64/kernel/entry.S      2004/12/04 18:15:59     1.52
+++ linux/arch/ia64/kernel/entry.S      2005/01/25 04:27:57     1.53
@@ -1057,6 +1057,9 @@
         *      p6 = TRUE if work-pending-check needs to be redone
         */
 .work_pending:
+       tbit.nz p6,p0=r31,TIF_SIGDELAYED                // signal delayed from  
MCA/INIT/NMI/PMI context?
+(p6)   br.cond.sptk.few .sigdelayed
+       ;;
        tbit.z p6,p0=r31,TIF_NEED_RESCHED               // 
current_thread_info()->need_resched==0?
 (p6)   br.cond.sptk.few .notify
 #ifdef CONFIG_PREEMPT
@@ -1082,6 +1085,18 @@
 .ret10:        cmp.ne p6,p0=r0,r0                              // p6 <- 0
 (pLvSys)br.cond.sptk.many .work_processed_syscall      // don't re-check
        br.cond.sptk.many .work_processed_kernel        // don't re-check
+
+// There is a delayed signal that was detected in MCA/INIT/NMI/PMI context 
where
+// it could not be delivered.  Deliver it now.  The signal might be for us and
+// may set TIF_SIGPENDING, so redrive ia64_leave_* after processing the delayed
+// signal.
+
+.sigdelayed:
+       br.call.sptk.many rp=do_sigdelayed
+       cmp.eq p6,p0=r0,r0                              // p6 <- 1, always 
re-check
+(pLvSys)br.cond.sptk.many .work_processed_syscall      // re-check
+       br.cond.sptk.many .work_processed_kernel        // re-check
+
 END(ia64_leave_kernel)
 
 ENTRY(handle_syscall_error)
diff -urN linux/arch/ia64/kernel/head.S linux/arch/ia64/kernel/head.S
--- linux/arch/ia64/kernel/head.S       2005/01/13 14:05:26     1.29
+++ linux/arch/ia64/kernel/head.S       2005/01/25 04:27:57     1.30
@@ -65,10 +65,27 @@
        ;;
        /*
         * Initialize kernel region registers:
+        *      rr[0]: VHPT enabled, page size = PAGE_SHIFT
+        *      rr[1]: VHPT enabled, page size = PAGE_SHIFT
+        *      rr[2]: VHPT enabled, page size = PAGE_SHIFT
+        *      rr[3]: VHPT enabled, page size = PAGE_SHIFT
+        *      rr[4]: VHPT enabled, page size = PAGE_SHIFT
         *      rr[5]: VHPT enabled, page size = PAGE_SHIFT
         *      rr[6]: VHPT disabled, page size = IA64_GRANULE_SHIFT
         *      rr[7]: VHPT disabled, page size = IA64_GRANULE_SHIFT
+        * We initialize all of them to prevent inadvertently assuming
+        * something about the state of address translation early in boot.
         */
+       mov r6=((ia64_rid(IA64_REGION_ID_KERNEL, (0<<61)) << 8) | (PAGE_SHIFT 
<< 2) | 1)
+       movl r7=(0<<61)
+       mov r8=((ia64_rid(IA64_REGION_ID_KERNEL, (1<<61)) << 8) | (PAGE_SHIFT 
<< 2) | 1)
+       movl r9=(1<<61)
+       mov r10=((ia64_rid(IA64_REGION_ID_KERNEL, (2<<61)) << 8) | (PAGE_SHIFT 
<< 2) | 1)
+       movl r11=(2<<61)
+       mov r12=((ia64_rid(IA64_REGION_ID_KERNEL, (3<<61)) << 8) | (PAGE_SHIFT 
<< 2) | 1)
+       movl r13=(3<<61)
+       mov r14=((ia64_rid(IA64_REGION_ID_KERNEL, (4<<61)) << 8) | (PAGE_SHIFT 
<< 2) | 1)
+       movl r15=(4<<61)
        mov r16=((ia64_rid(IA64_REGION_ID_KERNEL, (5<<61)) << 8) | (PAGE_SHIFT 
<< 2) | 1)
        movl r17=(5<<61)
        mov r18=((ia64_rid(IA64_REGION_ID_KERNEL, (6<<61)) << 8) | 
(IA64_GRANULE_SHIFT << 2))
@@ -76,6 +93,11 @@
        mov r20=((ia64_rid(IA64_REGION_ID_KERNEL, (7<<61)) << 8) | 
(IA64_GRANULE_SHIFT << 2))
        movl r21=(7<<61)
        ;;
+       mov rr[r7]=r6
+       mov rr[r9]=r8
+       mov rr[r11]=r10
+       mov rr[r13]=r12
+       mov rr[r15]=r14
        mov rr[r17]=r16
        mov rr[r19]=r18
        mov rr[r21]=r20
diff -urN linux/arch/ia64/kernel/iosapic.c linux/arch/ia64/kernel/iosapic.c
--- linux/arch/ia64/kernel/iosapic.c    2005/01/13 14:05:26     1.34
+++ linux/arch/ia64/kernel/iosapic.c    2005/01/25 04:27:57     1.35
@@ -99,7 +99,7 @@
 #define DBG(fmt...)
 #endif
 
-static spinlock_t iosapic_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(iosapic_lock);
 
 /* These tables map IA-64 vectors to the IOSAPIC pin that generates this 
vector. */
 
diff -urN linux/arch/ia64/kernel/irq.c linux/arch/ia64/kernel/irq.c
--- linux/arch/ia64/kernel/irq.c        2005/01/13 14:05:26     1.49
+++ linux/arch/ia64/kernel/irq.c        2005/01/25 04:27:57     1.50
@@ -16,73 +16,31 @@
  *                     architecture.
  */
 
-/*
- * (mostly architecture independent, will move to kernel/irq.c in 2.5.)
- *
- * IRQs are in fact implemented a bit like signal handlers for the kernel.
- * Naturally it's not a 1:1 relation, but there are similarities.
- */
-
-#include <linux/config.h>
-#include <linux/errno.h>
+#include <asm/delay.h>
+#include <asm/uaccess.h>
 #include <linux/module.h>
-#include <linux/signal.h>
-#include <linux/sched.h>
-#include <linux/ioport.h>
+#include <linux/seq_file.h>
 #include <linux/interrupt.h>
-#include <linux/timex.h>
-#include <linux/slab.h>
-#include <linux/random.h>
-#include <linux/cpu.h>
-#include <linux/ctype.h>
-#include <linux/smp_lock.h>
-#include <linux/init.h>
 #include <linux/kernel_stat.h>
-#include <linux/irq.h>
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <linux/kallsyms.h>
-#include <linux/notifier.h>
-#include <linux/bitops.h>
-
-#include <asm/atomic.h>
-#include <asm/cpu.h>
-#include <asm/io.h>
-#include <asm/smp.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
-#include <asm/pgalloc.h>
-#include <asm/tlbflush.h>
-#include <asm/delay.h>
-#include <asm/irq.h>
-
 
 /*
- * Linux has a controller-independent x86 interrupt architecture.
- * every controller has a 'controller-template', that is used
- * by the main code to do the right thing. Each driver-visible
- * interrupt source is transparently wired to the appropriate
- * controller. Thus drivers need not be aware of the
- * interrupt-controller.
- *
- * Various interrupt controllers we handle: 8259 PIC, SMP IO-APIC,
- * PIIX4's internal 8259 PIC and SGI's Visual Workstation Cobalt (IO-)APIC.
- * (IO-APICs assumed to be messaging to Pentium local-APICs)
- *
- * the code is designed to be easily extended with new/different
- * interrupt controllers, without having to do assembly magic.
+ * 'what should we do if we get a hw irq event on an illegal vector'.
+ * each architecture has to answer this themselves.
  */
+void ack_bad_irq(unsigned int irq)
+{
+       printk(KERN_ERR "Unexpected irq vector 0x%x on CPU %u!\n", irq, 
smp_processor_id());
+}
 
 /*
- * Controller mappings for all interrupt sources:
+ * do_IRQ handles all normal device IRQ's (the special
+ * SMP cross-CPU interrupts have their own specific
+ * handlers).
  */
-irq_desc_t _irq_desc[NR_IRQS] __cacheline_aligned = {
-       [0 ... NR_IRQS-1] = {
-               .status = IRQ_DISABLED,
-               .handler = &no_irq_type,
-               .lock = SPIN_LOCK_UNLOCKED
-       }
-};
+unsigned int do_IRQ(unsigned long irq, struct pt_regs *regs)
+{
+       return __do_IRQ(irq, regs);
+}
 
 #ifdef CONFIG_SMP
 /*
@@ -95,7 +53,7 @@
 #ifdef CONFIG_IA64_GENERIC
 irq_desc_t * __ia64_irq_desc (unsigned int irq)
 {
-       return _irq_desc + irq;
+       return irq_desc + irq;
 }
 
 ia64_vector __ia64_irq_to_vector (unsigned int irq)
@@ -109,82 +67,24 @@
 }
 #endif
 
-static void register_irq_proc (unsigned int irq);
-
-/*
- * Special irq handlers.
- */
-
-irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs)
-{ return IRQ_NONE; }
-
-/*
- * Generic no controller code
- */
-
-static void enable_none(unsigned int irq) { }
-static unsigned int startup_none(unsigned int irq) { return 0; }
-static void disable_none(unsigned int irq) { }
-static void ack_none(unsigned int irq)
-{
 /*
- * 'what should we do if we get a hw irq event on an illegal vector'.
- * each architecture has to answer this themselves, it doesn't deserve
- * a generic callback i think.
+ * Interrupt statistics:
  */
-#ifdef CONFIG_X86
-       printk(KERN_ERR "unexpected IRQ trap at vector %02x\n", irq);
-#ifdef CONFIG_X86_LOCAL_APIC
-       /*
-        * Currently unexpected vectors happen only on SMP and APIC.
-        * We _must_ ack these because every local APIC has only N
-        * irq slots per priority level, and a 'hanging, unacked' IRQ
-        * holds up an irq slot - in excessive cases (when multiple
-        * unexpected vectors occur) that might lock up the APIC
-        * completely.
-        */
-       ack_APIC_irq();
-#endif
-#endif
-#ifdef CONFIG_IA64
-       printk(KERN_ERR "Unexpected irq vector 0x%x on CPU %u!\n", irq, 
smp_processor_id());
-#endif
-}
-
-/* startup is the same as "enable", shutdown is same as "disable" */
-#define shutdown_none  disable_none
-#define end_none       enable_none
-
-struct hw_interrupt_type no_irq_type = {
-       "none",
-       startup_none,
-       shutdown_none,
-       enable_none,
-       disable_none,
-       ack_none,
-       end_none
-};
 
 atomic_t irq_err_count;
-#ifdef CONFIG_X86_IO_APIC
-#ifdef APIC_MISMATCH_DEBUG
-atomic_t irq_mis_count;
-#endif
-#endif
 
 /*
- * Generic, controller-independent functions:
+ * /proc/interrupts printing:
  */
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int j, i = *(loff_t *) v;
+       int i = *(loff_t *) v, j;
        struct irqaction * action;
-       irq_desc_t *idesc;
        unsigned long flags;
 
        if (i == 0) {
-               seq_puts(p, "           ");
+               seq_printf(p, "           ");
                for (j=0; j<NR_CPUS; j++)
                        if (cpu_online(j))
                                seq_printf(p, "CPU%d       ",j);
@@ -192,9 +92,8 @@
        }
 
        if (i < NR_IRQS) {
-               idesc = irq_descp(i);
-               spin_lock_irqsave(&idesc->lock, flags);
-               action = idesc->action;
+               spin_lock_irqsave(&irq_desc[i].lock, flags);
+               action = irq_desc[i].action;
                if (!action)
                        goto skip;
                seq_printf(p, "%3d: ",i);
@@ -205,7 +104,7 @@
                        if (cpu_online(j))
                                seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
 #endif
-               seq_printf(p, " %14s", idesc->handler->typename);
+               seq_printf(p, " %14s", irq_desc[i].handler->typename);
                seq_printf(p, "  %s", action->name);
 
                for (action=action->next; action; action = action->next)
@@ -213,725 +112,25 @@
 
                seq_putc(p, '\n');
 skip:
-               spin_unlock_irqrestore(&idesc->lock, flags);
+               spin_unlock_irqrestore(&irq_desc[i].lock, flags);
        } else if (i == NR_IRQS) {
-#ifdef CONFIG_X86_LOCAL_APIC
+#if defined(CONFIG_X86_LOCAL_APIC)
                seq_puts(p, "LOC: ");
                for (j = 0; j < NR_CPUS; j++)
                        if (cpu_online(j))
-                               seq_printf(p, "%10u ", 
irq_stat[j].apic_timer_irqs);
+                               seq_printf(p, "%10u ",
+                                          irq_stat[j].apic_timer_irqs);
                seq_putc(p, '\n');
 #endif
                seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
-#ifdef CONFIG_X86_IO_APIC
-#ifdef APIC_MISMATCH_DEBUG
+#if defined(CONFIG_X86_IO_APIC)
                seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
 #endif
-#endif
        }
        return 0;
 }
 
 #ifdef CONFIG_SMP
-inline void synchronize_irq(unsigned int irq)
-{
-       while (irq_descp(irq)->status & IRQ_INPROGRESS)
-               cpu_relax();
-}
-EXPORT_SYMBOL(synchronize_irq);
-#endif
-
-/*
- * This should really return information about whether
- * we should do bottom half handling etc. Right now we
- * end up _always_ checking the bottom half, which is a
- * waste of time and is not what some drivers would
- * prefer.
- */
-int handle_IRQ_event(unsigned int irq,
-               struct pt_regs *regs, struct irqaction *action)
-{
-       int status = 1; /* Force the "do bottom halves" bit */
-       int ret, retval = 0;
-
-       if (!(action->flags & SA_INTERRUPT))
-               local_irq_enable();
-
-       do {
-               ret = action->handler(irq, action->dev_id, regs);
-               if (ret == IRQ_HANDLED)
-                       status |= action->flags;
-               retval |= ret;
-               action = action->next;
-       } while (action);
-       if (status & SA_SAMPLE_RANDOM)
-               add_interrupt_randomness(irq);
-       local_irq_disable();
-       return retval;
-}
-
-static void __report_bad_irq(int irq, irq_desc_t *desc, irqreturn_t action_ret)
-{
-       struct irqaction *action;
-
-       if (action_ret != IRQ_HANDLED && action_ret != IRQ_NONE) {
-               printk(KERN_ERR "irq event %d: bogus return value %x\n",
-                               irq, action_ret);
-       } else {
-               printk(KERN_ERR "irq %d: nobody cared!\n", irq);
-       }
-       dump_stack();
-       printk(KERN_ERR "handlers:\n");
-       action = desc->action;
-       do {
-               printk(KERN_ERR "[<%p>]", action->handler);
-               print_symbol(" (%s)",
-                       (unsigned long)action->handler);
-               printk("\n");
-               action = action->next;
-       } while (action);
-}
-
-static void report_bad_irq(int irq, irq_desc_t *desc, irqreturn_t action_ret)
-{
-       static int count = 100;
-
-       if (count) {
-               count--;
-               __report_bad_irq(irq, desc, action_ret);
-       }
-}
-
-static int noirqdebug;
-
-static int __init noirqdebug_setup(char *str)
-{
-       noirqdebug = 1;
-       printk("IRQ lockup detection disabled\n");
-       return 1;
-}
-
-__setup("noirqdebug", noirqdebug_setup);
-
-/*
- * If 99,900 of the previous 100,000 interrupts have not been handled then
- * assume that the IRQ is stuck in some manner.  Drop a diagnostic and try to
- * turn the IRQ off.
- *
- * (The other 100-of-100,000 interrupts may have been a correctly-functioning
- *  device sharing an IRQ with the failing one)
- *
- * Called under desc->lock
- */
-static void note_interrupt(int irq, irq_desc_t *desc, irqreturn_t action_ret)
-{
-       if (action_ret != IRQ_HANDLED) {
-               desc->irqs_unhandled++;
-               if (action_ret != IRQ_NONE)
-                       report_bad_irq(irq, desc, action_ret);
-       }
-
-       desc->irq_count++;
-       if (desc->irq_count < 100000)
-               return;
-
-       desc->irq_count = 0;
-       if (desc->irqs_unhandled > 99900) {
-               /*
-                * The interrupt is stuck
-                */
-               __report_bad_irq(irq, desc, action_ret);
-               /*
-                * Now kill the IRQ
-                */
-               printk(KERN_EMERG "Disabling IRQ #%d\n", irq);
-               desc->status |= IRQ_DISABLED;
-               desc->handler->disable(irq);
-       }
-       desc->irqs_unhandled = 0;
-}
-
-/*
- * Generic enable/disable code: this just calls
- * down into the PIC-specific version for the actual
- * hardware disable after having gotten the irq
- * controller lock.
- */
-
-/**
- *     disable_irq_nosync - disable an irq without waiting
- *     @irq: Interrupt to disable
- *
- *     Disable the selected interrupt line.  Disables and Enables are
- *     nested.
- *     Unlike disable_irq(), this function does not ensure existing
- *     instances of the IRQ handler have completed before returning.
- *
- *     This function may be called from IRQ context.
- */
-
-inline void disable_irq_nosync(unsigned int irq)
-{
-       irq_desc_t *desc = irq_descp(irq);
-       unsigned long flags;
-
-       spin_lock_irqsave(&desc->lock, flags);
-       if (!desc->depth++) {
-               desc->status |= IRQ_DISABLED;
-               desc->handler->disable(irq);
-       }
-       spin_unlock_irqrestore(&desc->lock, flags);
-}
-EXPORT_SYMBOL(disable_irq_nosync);
-
-/**
- *     disable_irq - disable an irq and wait for completion
- *     @irq: Interrupt to disable
- *
- *     Disable the selected interrupt line.  Enables and Disables are
- *     nested.
- *     This function waits for any pending IRQ handlers for this interrupt
- *     to complete before returning. If you use this function while
- *     holding a resource the IRQ handler may need you will deadlock.
- *
- *     This function may be called - with care - from IRQ context.
- */
-
-void disable_irq(unsigned int irq)
-{
-       irq_desc_t *desc = irq_descp(irq);
-
-       disable_irq_nosync(irq);
-       if (desc->action)
-               synchronize_irq(irq);
-}
-EXPORT_SYMBOL(disable_irq);
-
-/**
- *     enable_irq - enable handling of an irq
- *     @irq: Interrupt to enable
- *
- *     Undoes the effect of one call to disable_irq().  If this
- *     matches the last disable, processing of interrupts on this
- *     IRQ line is re-enabled.
- *
- *     This function may be called from IRQ context.
- */
-
-void enable_irq(unsigned int irq)
-{
-       irq_desc_t *desc = irq_descp(irq);
-       unsigned long flags;
-
-       spin_lock_irqsave(&desc->lock, flags);
-       switch (desc->depth) {
-       case 1: {
-               unsigned int status = desc->status & ~IRQ_DISABLED;
-               desc->status = status;
-               if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
-                       desc->status = status | IRQ_REPLAY;
-                       hw_resend_irq(desc->handler,irq);
-               }
-               desc->handler->enable(irq);
-               /* fall-through */
-       }
-       default:
-               desc->depth--;
-               break;
-       case 0:
-               printk(KERN_ERR "enable_irq(%u) unbalanced from %p\n",
-                      irq, (void *) __builtin_return_address(0));
-       }
-       spin_unlock_irqrestore(&desc->lock, flags);
-}
-EXPORT_SYMBOL(enable_irq);
-
-/*
- * do_IRQ handles all normal device IRQ's (the special
- * SMP cross-CPU interrupts have their own specific
- * handlers).
- */
-unsigned int do_IRQ(unsigned long irq, struct pt_regs *regs)
-{
-       /*
-        * We ack quickly, we don't want the irq controller
-        * thinking we're snobs just because some other CPU has
-        * disabled global interrupts (we have already done the
-        * INT_ACK cycles, it's too late to try to pretend to the
-        * controller that we aren't taking the interrupt).
-        *
-        * 0 return value means that this irq is already being
-        * handled by some other CPU. (or is disabled)
-        */
-       irq_desc_t *desc = irq_descp(irq);
-       struct irqaction * action;
-       irqreturn_t action_ret;
-       unsigned int status;
-       int cpu;
-
-       cpu = smp_processor_id(); /* for CONFIG_PREEMPT, this must come after 
irq_enter()! */
-
-       kstat_cpu(cpu).irqs[irq]++;
-
-       if (desc->status & IRQ_PER_CPU) {
-               /* no locking required for CPU-local interrupts: */
-               desc->handler->ack(irq);
-               action_ret = handle_IRQ_event(irq, regs, desc->action);
-               desc->handler->end(irq);
-       } else {
-               spin_lock(&desc->lock);
-               desc->handler->ack(irq);
-               /*
-                * REPLAY is when Linux resends an IRQ that was dropped earlier
-                * WAITING is used by probe to mark irqs that are being tested
-                */
-               status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
-               status |= IRQ_PENDING; /* we _want_ to handle it */
-
-               /*
-                * If the IRQ is disabled for whatever reason, we cannot
-                * use the action we have.
-                */
-               action = NULL;
-               if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {
-                       action = desc->action;
-                       status &= ~IRQ_PENDING; /* we commit to handling */
-                       status |= IRQ_INPROGRESS; /* we are handling it */
-               }
-               desc->status = status;
-
-               /*
-                * If there is no IRQ handler or it was disabled, exit early.
-                * Since we set PENDING, if another processor is handling
-                * a different instance of this same irq, the other processor
-                * will take care of it.
-                */
-               if (unlikely(!action))
-                       goto out;
-
-               /*
-                * Edge triggered interrupts need to remember
-                * pending events.
-                * This applies to any hw interrupts that allow a second
-                * instance of the same irq to arrive while we are in do_IRQ
-                * or in the handler. But the code here only handles the 
_second_
-                * instance of the irq, not the third or fourth. So it is mostly
-                * useful for irq hardware that does not mask cleanly in an
-                * SMP environment.
-                */
-               for (;;) {
-                       spin_unlock(&desc->lock);
-                       action_ret = handle_IRQ_event(irq, regs, action);
-                       spin_lock(&desc->lock);
-                       if (!noirqdebug)
-                               note_interrupt(irq, desc, action_ret);
-                       if (!(desc->status & IRQ_PENDING))
-                               break;
-                       desc->status &= ~IRQ_PENDING;
-               }
-               desc->status &= ~IRQ_INPROGRESS;
-         out:
-               /*
-                * The ->end() handler has to deal with interrupts which got
-                * disabled while the handler was running.
-                */
-               desc->handler->end(irq);
-               spin_unlock(&desc->lock);
-       }
-       return 1;
-}
-
-/**
- *     request_irq - allocate an interrupt line
- *     @irq: Interrupt line to allocate
- *     @handler: Function to be called when the IRQ occurs
- *     @irqflags: Interrupt type flags
- *     @devname: An ascii name for the claiming device
- *     @dev_id: A cookie passed back to the handler function
- *
- *     This call allocates interrupt resources and enables the
- *     interrupt line and IRQ handling. From the point this
- *     call is made your handler function may be invoked. Since
- *     your handler function must clear any interrupt the board 
- *     raises, you must take care both to initialise your hardware
- *     and to set up the interrupt handler in the right order.
- *
- *     Dev_id must be globally unique. Normally the address of the
- *     device data structure is used as the cookie. Since the handler
- *     receives this value it makes sense to use it.
- *
- *     If your interrupt is shared you must pass a non NULL dev_id
- *     as this is required when freeing the interrupt.
- *
- *     Flags:
- *
- *     SA_SHIRQ                Interrupt is shared
- *
- *     SA_INTERRUPT            Disable local interrupts while processing
- *
- *     SA_SAMPLE_RANDOM        The interrupt can be used for entropy
- *
- */
-
-int request_irq(unsigned int irq,
-               irqreturn_t (*handler)(int, void *, struct pt_regs *),
-               unsigned long irqflags,
-               const char * devname,
-               void *dev_id)
-{
-       int retval;
-       struct irqaction * action;
-
-#if 1
-       /*
-        * Sanity-check: shared interrupts should REALLY pass in
-        * a real dev-ID, otherwise we'll have trouble later trying
-        * to figure out which interrupt is which (messes up the
-        * interrupt freeing logic etc).
-        */
-       if (irqflags & SA_SHIRQ) {
-               if (!dev_id)
-                       printk(KERN_ERR "Bad boy: %s called us without a 
dev_id!\n", devname);
-       }
-#endif
-
-       if (irq >= NR_IRQS)
-               return -EINVAL;
-       if (!handler)
-               return -EINVAL;
-
-       action = (struct irqaction *)
-                       kmalloc(sizeof(struct irqaction), GFP_ATOMIC);
-       if (!action)
-               return -ENOMEM;
-
-       action->handler = handler;
-       action->flags = irqflags;
-       cpus_clear(action->mask);
-       action->name = devname;
-       action->next = NULL;
-       action->dev_id = dev_id;
-
-       retval = setup_irq(irq, action);
-       if (retval)
-               kfree(action);
-       return retval;
-}
-
-EXPORT_SYMBOL(request_irq);
-
-/**
- *     free_irq - free an interrupt
- *     @irq: Interrupt line to free
- *     @dev_id: Device identity to free
- *
- *     Remove an interrupt handler. The handler is removed and if the
- *     interrupt line is no longer in use by any driver it is disabled.
- *     On a shared IRQ the caller must ensure the interrupt is disabled
- *     on the card it drives before calling this function. The function
- *     does not return until any executing interrupts for this IRQ
- *     have completed.
- *
- *     This function must not be called from interrupt context.
- */
-
-void free_irq(unsigned int irq, void *dev_id)
-{
-       irq_desc_t *desc;
-       struct irqaction **p;
-       unsigned long flags;
-
-       if (irq >= NR_IRQS)
-               return;
-
-       desc = irq_descp(irq);
-       spin_lock_irqsave(&desc->lock,flags);
-       p = &desc->action;
-       for (;;) {
-               struct irqaction * action = *p;
-               if (action) {
-                       struct irqaction **pp = p;
-                       p = &action->next;
-                       if (action->dev_id != dev_id)
-                               continue;
-
-                       /* Found it - now remove it from the list of entries */
-                       *pp = action->next;
-                       if (!desc->action) {
-                               desc->status |= IRQ_DISABLED;
-                               desc->handler->shutdown(irq);
-                       }
-                       spin_unlock_irqrestore(&desc->lock,flags);
-
-                       /* Wait to make sure it's not being used on another CPU 
*/
-                       synchronize_irq(irq);
-                       kfree(action);
-                       return;
-               }
-               printk(KERN_ERR "Trying to free free IRQ%d\n",irq);
-               spin_unlock_irqrestore(&desc->lock,flags);
-               return;
-       }
-}
-
-EXPORT_SYMBOL(free_irq);
-
-/*
- * IRQ autodetection code..
- *
- * This depends on the fact that any interrupt that
- * comes in on to an unassigned handler will get stuck
- * with "IRQ_WAITING" cleared and the interrupt
- * disabled.
- */
-
-static DECLARE_MUTEX(probe_sem);
-
-/**
- *     probe_irq_on    - begin an interrupt autodetect
- *
- *     Commence probing for an interrupt. The interrupts are scanned
- *     and a mask of potential interrupt lines is returned.
- *
- */
-
-unsigned long probe_irq_on(void)
-{
-       unsigned int i;
-       irq_desc_t *desc;
-       unsigned long val;
-       unsigned long delay;
-
-       down(&probe_sem);
-       /*
-        * something may have generated an irq long ago and we want to
-        * flush such a longstanding irq before considering it as spurious.
-        */
-       for (i = NR_IRQS-1; i > 0; i--)  {
-               desc = irq_descp(i);
-
-               spin_lock_irq(&desc->lock);
-               if (!desc->action)
-                       desc->handler->startup(i);
-               spin_unlock_irq(&desc->lock);
-       }
-
-       /* Wait for longstanding interrupts to trigger. */
-       for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
-               /* about 20ms delay */ barrier();
-
-       /*
-        * enable any unassigned irqs
-        * (we must startup again here because if a longstanding irq
-        * happened in the previous stage, it may have masked itself)
-        */
-       for (i = NR_IRQS-1; i > 0; i--) {
-               desc = irq_descp(i);
-
-               spin_lock_irq(&desc->lock);
-               if (!desc->action) {
-                       desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
-                       if (desc->handler->startup(i))
-                               desc->status |= IRQ_PENDING;
-               }
-               spin_unlock_irq(&desc->lock);
-       }
-
-       /*
-        * Wait for spurious interrupts to trigger
-        */
-       for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
-               /* about 100ms delay */ barrier();
-
-       /*
-        * Now filter out any obviously spurious interrupts
-        */
-       val = 0;
-       for (i = 0; i < NR_IRQS; i++) {
-               irq_desc_t *desc = irq_descp(i);
-               unsigned int status;
-
-               spin_lock_irq(&desc->lock);
-               status = desc->status;
-
-               if (status & IRQ_AUTODETECT) {
-                       /* It triggered already - consider it spurious. */
-                       if (!(status & IRQ_WAITING)) {
-                               desc->status = status & ~IRQ_AUTODETECT;
-                               desc->handler->shutdown(i);
-                       } else
-                               if (i < 32)
-                                       val |= 1 << i;
-               }
-               spin_unlock_irq(&desc->lock);
-       }
-
-       return val;
-}
-
-EXPORT_SYMBOL(probe_irq_on);
-
-/**
- *     probe_irq_mask - scan a bitmap of interrupt lines
- *     @val:   mask of interrupts to consider
- *
- *     Scan the ISA bus interrupt lines and return a bitmap of
- *     active interrupts. The interrupt probe logic state is then
- *     returned to its previous value.
- *
- *     Note: we need to scan all the irq's even though we will
- *     only return ISA irq numbers - just so that we reset them
- *     all to a known state.
- */
-unsigned int probe_irq_mask(unsigned long val)
-{
-       int i;
-       unsigned int mask;
-
-       mask = 0;
-       for (i = 0; i < 16; i++) {
-               irq_desc_t *desc = irq_descp(i);
-               unsigned int status;
-
-               spin_lock_irq(&desc->lock);
-               status = desc->status;
-
-               if (status & IRQ_AUTODETECT) {
-                       if (!(status & IRQ_WAITING))
-                               mask |= 1 << i;
-
-                       desc->status = status & ~IRQ_AUTODETECT;
-                       desc->handler->shutdown(i);
-               }
-               spin_unlock_irq(&desc->lock);
-       }
-       up(&probe_sem);
-
-       return mask & val;
-}
-EXPORT_SYMBOL(probe_irq_mask);
-
-/**
- *     probe_irq_off   - end an interrupt autodetect
- *     @val: mask of potential interrupts (unused)
- *
- *     Scans the unused interrupt lines and returns the line which
- *     appears to have triggered the interrupt. If no interrupt was
- *     found then zero is returned. If more than one interrupt is
- *     found then minus the first candidate is returned to indicate
- *     their is doubt.
- *
- *     The interrupt probe logic state is returned to its previous
- *     value.
- *
- *     BUGS: When used in a module (which arguably shouldn't happen)
- *     nothing prevents two IRQ probe callers from overlapping. The
- *     results of this are non-optimal.
- */
-
-int probe_irq_off(unsigned long val)
-{
-       int i, irq_found, nr_irqs;
-
-       nr_irqs = 0;
-       irq_found = 0;
-       for (i = 0; i < NR_IRQS; i++) {
-               irq_desc_t *desc = irq_descp(i);
-               unsigned int status;
-
-               spin_lock_irq(&desc->lock);
-               status = desc->status;
-
-               if (status & IRQ_AUTODETECT) {
-                       if (!(status & IRQ_WAITING)) {
-                               if (!nr_irqs)
-                                       irq_found = i;
-                               nr_irqs++;
-                       }
-                       desc->status = status & ~IRQ_AUTODETECT;
-                       desc->handler->shutdown(i);
-               }
-               spin_unlock_irq(&desc->lock);
-       }
-       up(&probe_sem);
-
-       if (nr_irqs > 1)
-               irq_found = -irq_found;
-       return irq_found;
-}
-
-EXPORT_SYMBOL(probe_irq_off);
-
-int setup_irq(unsigned int irq, struct irqaction * new)
-{
-       int shared = 0;
-       unsigned long flags;
-       struct irqaction *old, **p;
-       irq_desc_t *desc = irq_descp(irq);
-
-       if (desc->handler == &no_irq_type)
-               return -ENOSYS;
-       /*
-        * Some drivers like serial.c use request_irq() heavily,
-        * so we have to be careful not to interfere with a
-        * running system.
-        */
-       if (new->flags & SA_SAMPLE_RANDOM) {
-               /*
-                * This function might sleep, we want to call it first,
-                * outside of the atomic block.
-                * Yes, this might clear the entropy pool if the wrong
-                * driver is attempted to be loaded, without actually
-                * installing a new handler, but is this really a problem,
-                * only the sysadmin is able to do this.
-                */
-               rand_initialize_irq(irq);
-       }
-
-       if (new->flags & SA_PERCPU_IRQ) {
-               desc->status |= IRQ_PER_CPU;
-               desc->handler = &irq_type_ia64_lsapic;
-       }
-
-       /*
-        * The following block of code has to be executed atomically
-        */
-       spin_lock_irqsave(&desc->lock,flags);
-       p = &desc->action;
-       if ((old = *p) != NULL) {
-               /* Can't share interrupts unless both agree to */
-               if (!(old->flags & new->flags & SA_SHIRQ)) {
-                       spin_unlock_irqrestore(&desc->lock,flags);
-                       return -EBUSY;
-               }
-
-               /* add new interrupt at end of irq queue */
-               do {
-                       p = &old->next;
-                       old = *p;
-               } while (old);
-               shared = 1;
-       }
-
-       *p = new;
-
-       if (!shared) {
-               desc->depth = 0;
-               desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | 
IRQ_INPROGRESS);
-               desc->handler->startup(irq);
-       }
-       spin_unlock_irqrestore(&desc->lock,flags);
-
-       register_irq_proc(irq);
-       return 0;
-}
-
-static struct proc_dir_entry * root_irq_dir;
-static struct proc_dir_entry * irq_dir [NR_IRQS];
-
-#ifdef CONFIG_SMP
-
-static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
 
 static cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL };
 
@@ -949,79 +148,6 @@
        }
 }
 
-static int irq_affinity_read_proc (char *page, char **start, off_t off,
-                       int count, int *eof, void *data)
-{
-       int len = sprintf(page, "%s", irq_redir[(long)data] ? "r " : "");
-
-       len += cpumask_scnprintf(page+len, count, irq_affinity[(long)data]);
-       if (count - len < 2)
-               return -EINVAL;
-       len += sprintf(page + len, "\n");
-       return len;
-}
-
-static int irq_affinity_write_proc (struct file *file, const char __user 
*buffer,
-                                   unsigned long count, void *data)
-{
-       unsigned int irq = (unsigned long) data;
-       int full_count = count, err;
-       cpumask_t new_value, tmp;
-#      define R_PREFIX_LEN 16
-       char rbuf[R_PREFIX_LEN];
-       int rlen;
-       int prelen;
-       irq_desc_t *desc = irq_descp(irq);
-       unsigned long flags;
-       int redir = 0;
-
-       if (!desc->handler->set_affinity)
-               return -EIO;
-
-       /*
-        * If string being written starts with a prefix of 'r' or 'R'
-        * and some limited number of spaces, set IA64_IRQ_REDIRECTED.
-        * If more than (R_PREFIX_LEN - 2) spaces are passed, they won't
-        * all be trimmed as part of prelen, the untrimmed spaces will
-        * cause the hex parsing to fail, and this write() syscall will
-        * fail with EINVAL.
-        */
-
-       if (!count)
-               return -EINVAL;
-       rlen = min(sizeof(rbuf)-1, count);
-       if (copy_from_user(rbuf, buffer, rlen))
-               return -EFAULT;
-       rbuf[rlen] = 0;
-       prelen = 0;
-       if (tolower(*rbuf) == 'r') {
-               prelen = strspn(rbuf, "Rr ");
-               redir++;
-       }
-
-       err = cpumask_parse(buffer+prelen, count-prelen, new_value);
-       if (err)
-               return err;
-
-       /*
-        * Do not allow disabling IRQs completely - it's a too easy
-        * way to make the system unusable accidentally :-) At least
-        * one online CPU still has to be targeted.
-        */
-       cpus_and(tmp, new_value, cpu_online_map);
-       if (cpus_empty(tmp))
-               return -EINVAL;
-
-       spin_lock_irqsave(&desc->lock, flags);
-       pending_irq_cpumask[irq] = new_value;
-       if (redir)
-               set_bit(irq, pending_irq_redir);
-       else
-               clear_bit(irq, pending_irq_redir);
-       spin_unlock_irqrestore(&desc->lock, flags);
-
-       return full_count;
-}
 
 void move_irq(int irq)
 {
@@ -1138,57 +264,3 @@
        local_irq_disable();
 }
 #endif
-
-#define MAX_NAMELEN 10
-
-static void register_irq_proc (unsigned int irq)
-{
-       char name [MAX_NAMELEN];
-
-       if (!root_irq_dir || (irq_descp(irq)->handler == &no_irq_type) || 
irq_dir[irq])
-               return;
-
-       memset(name, 0, MAX_NAMELEN);
-       sprintf(name, "%d", irq);
-
-       /* create /proc/irq/1234 */
-       irq_dir[irq] = proc_mkdir(name, root_irq_dir);
-
-#ifdef CONFIG_SMP
-       {
-               struct proc_dir_entry *entry;
-
-               /* create /proc/irq/1234/smp_affinity */
-               entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
-
-               if (entry) {
-                       entry->nlink = 1;
-                       entry->data = (void *)(long)irq;
-                       entry->read_proc = irq_affinity_read_proc;
-                       entry->write_proc = irq_affinity_write_proc;
-               }
-
-               smp_affinity_entry[irq] = entry;
-       }
-#endif
-}
-
-void init_irq_proc (void)
-{
-       int i;
-
-       /* create /proc/irq */
-       root_irq_dir = proc_mkdir("irq", NULL);
-
-       /* create /proc/irq/prof_cpu_mask */
-       create_prof_cpu_mask(root_irq_dir);
-
-       /*
-        * Create entries for all existing IRQs.
-        */
-       for (i = 0; i < NR_IRQS; i++) {
-               if (irq_descp(i)->handler == &no_irq_type)
-                       continue;
-               register_irq_proc(i);
-       }
-}
diff -urN linux/arch/ia64/kernel/mca.c linux/arch/ia64/kernel/mca.c
--- linux/arch/ia64/kernel/mca.c        2004/12/04 18:15:59     1.39
+++ linux/arch/ia64/kernel/mca.c        2005/01/25 04:27:57     1.40
@@ -85,11 +85,6 @@
 /* Used by mca_asm.S */
 ia64_mca_sal_to_os_state_t     ia64_sal_to_os_handoff_state;
 ia64_mca_os_to_sal_state_t     ia64_os_to_sal_handoff_state;
-u64                            ia64_mca_proc_state_dump[512];
-u64                            ia64_mca_stack[1024] 
__attribute__((aligned(16)));
-u64                            ia64_mca_stackframe[32];
-u64                            ia64_mca_bspstore[1024];
-u64                            ia64_init_stack[KERNEL_STACK_SIZE/8] 
__attribute__((aligned(16)));
 u64                            ia64_mca_serialize;
 
 /* In mca_asm.S */
@@ -98,8 +93,6 @@
 
 static ia64_mc_info_t          ia64_mc_info;
 
-struct ia64_mca_tlb_info ia64_mca_tlb_list[NR_CPUS];
-
 #define MAX_CPE_POLL_INTERVAL (15*60*HZ) /* 15 minutes */
 #define MIN_CPE_POLL_INTERVAL (2*60*HZ)  /* 2 minutes */
 #define CMC_POLL_INTERVAL     (1*60*HZ)  /* 1 minute */
@@ -240,6 +233,7 @@
 ia64_mca_log_sal_error_record(int sal_info_type)
 {
        u8 *buffer;
+       sal_log_record_header_t *rh;
        u64 size;
        int irq_safe = sal_info_type != SAL_INFO_TYPE_MCA && sal_info_type != 
SAL_INFO_TYPE_INIT;
 #ifdef IA64_MCA_DEBUG_INFO
@@ -258,7 +252,8 @@
                        sal_info_type < ARRAY_SIZE(rec_name) ? 
rec_name[sal_info_type] : "UNKNOWN");
 
        /* Clear logs from corrected errors in case there's no user-level 
logger */
-       if (sal_info_type == SAL_INFO_TYPE_CPE || sal_info_type == 
SAL_INFO_TYPE_CMC)
+       rh = (sal_log_record_header_t *)buffer;
+       if (rh->severity == sal_log_severity_corrected)
                ia64_sal_clear_state_info(sal_info_type);
 }
 
@@ -276,7 +271,7 @@
 {
        static unsigned long    cpe_history[CPE_HISTORY_LENGTH];
        static int              index;
-       static spinlock_t       cpe_history_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(cpe_history_lock);
 
        IA64_MCA_DEBUG("%s: received interrupt vector = %#x on CPU %d\n",
                       __FUNCTION__, cpe_irq, smp_processor_id());
@@ -887,6 +882,13 @@
                        &ia64_sal_to_os_handoff_state,
                        &ia64_os_to_sal_handoff_state)); 
 
+return_to_sal:
+
+       if (recover) {
+               sal_log_record_header_t *rh = 
IA64_LOG_CURR_BUFFER(SAL_INFO_TYPE_MCA);
+               rh->severity = sal_log_severity_corrected;
+               ia64_sal_clear_state_info(SAL_INFO_TYPE_MCA);
+       }
        /*
         *  Wakeup all the processors which are spinning in the rendezvous
         *  loop.
@@ -920,7 +922,7 @@
 {
        static unsigned long    cmc_history[CMC_HISTORY_LENGTH];
        static int              index;
-       static spinlock_t       cmc_history_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(cmc_history_lock);
 
        IA64_MCA_DEBUG("%s: received interrupt vector = %#x on CPU %d\n",
                       __FUNCTION__, cmc_irq, smp_processor_id());
@@ -1133,6 +1135,7 @@
        pal_min_state_area_t *ms;
 
        oops_in_progress = 1;   /* avoid deadlock in printk, but it makes 
recovery dodgy */
+       console_loglevel = 15;  /* make sure printks make it to console */
 
        printk(KERN_INFO "Entered OS INIT handler. PSP=%lx\n",
                ia64_sal_to_os_handoff_state.proc_state_param);
diff -urN linux/arch/ia64/kernel/mca_asm.S linux/arch/ia64/kernel/mca_asm.S
--- linux/arch/ia64/kernel/mca_asm.S    2004/11/15 11:49:17     1.16
+++ linux/arch/ia64/kernel/mca_asm.S    2005/01/25 04:27:57     1.17
@@ -13,6 +13,9 @@
 //                2. Restore current thread pointer to kr6
 //                3. Move stack ptr 16 bytes to conform to C calling convention
 //
+// 04/11/12 Russ Anderson <rja@sgi.com>
+//                Added per cpu MCA/INIT stack save areas.
+//
 #include <linux/config.h>
 #include <linux/threads.h>
 
@@ -102,11 +105,6 @@
        .global ia64_os_mca_dispatch_end
        .global ia64_sal_to_os_handoff_state
        .global ia64_os_to_sal_handoff_state
-       .global ia64_mca_proc_state_dump
-       .global ia64_mca_stack
-       .global ia64_mca_stackframe
-       .global ia64_mca_bspstore
-       .global ia64_init_stack
 
        .text
        .align 16
@@ -146,23 +144,11 @@
        // The following code purges TC and TR entries. Then reload all TC 
entries.
        // Purge percpu data TC entries.
 begin_tlb_purge_and_reload:
-       mov r16=cr.lid
-       LOAD_PHYSICAL(p0,r17,ia64_mca_tlb_list) // Physical address of 
ia64_mca_tlb_list
-       mov r19=0
-       mov r20=NR_CPUS
-       ;;
-1:     cmp.eq p6,p7=r19,r20
-(p6)   br.spnt.few err
-       ld8 r18=[r17],IA64_MCA_TLB_INFO_SIZE
-       ;;
-       add r19=1,r19
-       cmp.eq p6,p7=r18,r16
-(p7)   br.sptk.few 1b
+       GET_PERCPU_PADDR(r2)    // paddr of percpu_paddr in cpuinfo struct
        ;;
-       adds r17=-IA64_MCA_TLB_INFO_SIZE,r17
+       mov     r17=r2
        ;;
-       mov r23=r17             // save current ia64_mca_percpu_info addr 
pointer.
-       adds r17=16,r17
+       adds r17=8,r17
        ;;
        ld8 r18=[r17],8         // r18=ptce_base
        ;;
@@ -215,7 +201,7 @@
        srlz.d
        ;;
        // 3. Purge ITR for PAL code.
-       adds r17=48,r23
+       adds r17=40,r23
        ;;
        ld8 r16=[r17]
        mov r18=IA64_GRANULE_SHIFT<<2
@@ -260,7 +246,9 @@
        srlz.d
        ;;
        // 2. Reload DTR register for PERCPU data.
-       adds r17=8,r23
+       GET_PERCPU_PADDR(r2)            // paddr of percpu_paddr in cpuinfo 
struct
+       ;;
+       mov r17=r2
        movl r16=PERCPU_ADDR            // vaddr
        movl r18=PERCPU_PAGE_SHIFT<<2
        ;;
@@ -275,7 +263,9 @@
        srlz.d
        ;;
        // 3. Reload ITR for PAL code.
-       adds r17=40,r23
+       GET_CPUINFO_PAL_PADDR(r2)       // paddr of pal_paddr in cpuinfo struct
+       ;;
+       mov r17=r2
        ;;
        ld8 r18=[r17],8                 // pte
        ;;
@@ -318,17 +308,14 @@
 done_tlb_purge_and_reload:
 
        // Setup new stack frame for OS_MCA handling
-       movl    r2=ia64_mca_bspstore;;  // local bspstore area location in r2
-       DATA_VA_TO_PA(r2);;
-       movl    r3=ia64_mca_stackframe;; // save stack frame to memory in r3
-       DATA_VA_TO_PA(r3);;
+       GET_MCA_BSPSTORE(r2)            // paddr of bspstore save area
+       GET_MCA_STACKFRAME(r3);;        // paddr of stack frame save area
        rse_switch_context(r6,r3,r2);;  // RSC management in this new context
-       movl    r12=ia64_mca_stack
-       mov     r2=8*1024;;             // stack size must be same as C array
-       add     r12=r2,r12;;            // stack base @ bottom of array
-       adds    r12=-16,r12;;           // allow 16 bytes of scratch
+       GET_MCA_STACK(r2);;             // paddr of stack save area
+                                       // stack size must be same as C array
+       addl    r2=8*1024-16,r2;;       // stack base @ bottom of array
+       mov     r12=r2                  // allow 16 bytes of scratch
                                        // (C calling convention)
-       DATA_VA_TO_PA(r12);;
 
         // Enter virtual mode from physical mode
        VIRTUAL_MODE_ENTER(r2, r3, ia64_os_mca_virtual_begin, r4)
@@ -344,9 +331,7 @@
 ia64_os_mca_virtual_end:
 
        // restore the original stack frame here
-       movl    r2=ia64_mca_stackframe  // restore stack frame from memory at r2
-       ;;
-       DATA_VA_TO_PA(r2)
+       GET_MCA_STACKFRAME(r2);;        // phys addr of MCA save area
        movl    r4=IA64_PSR_MC
        ;;
        rse_return_context(r4,r3,r2)    // switch from interrupt context for RSE
@@ -387,7 +372,7 @@
 ia64_os_mca_proc_state_dump:
 // Save bank 1 GRs 16-31 which will be used by c-language code when we switch
 //  to virtual addressing mode.
-       LOAD_PHYSICAL(p0,r2,ia64_mca_proc_state_dump)// convert OS state dump 
area to physical address
+       GET_MCA_DUMP_PADDR(r2);;  // phys addr of MCA save area
 
 // save ar.NaT
        mov             r5=ar.unat                  // ar.unat
@@ -618,9 +603,7 @@
 ia64_os_mca_proc_state_restore:
 
 // Restore bank1 GR16-31
-       movl            r2=ia64_mca_proc_state_dump     // Convert virtual 
address
-       ;;                                              // of OS state dump area
-       DATA_VA_TO_PA(r2)                               // to physical address
+       GET_MCA_DUMP_PADDR(r2);;                // phys addr of proc state dump 
area
 
 restore_GRs:                                    // restore bank-1 GRs 16-31
        bsw.1;;
diff -urN linux/arch/ia64/kernel/mca_drv.c linux/arch/ia64/kernel/mca_drv.c
--- linux/arch/ia64/kernel/mca_drv.c    2004/10/12 14:36:32     1.1
+++ linux/arch/ia64/kernel/mca_drv.c    2005/01/25 04:27:57     1.2
@@ -45,7 +45,7 @@
 /* from mca_drv_asm.S */
 extern void *mca_handler_bhhook(void);
 
-static spinlock_t mca_bh_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mca_bh_lock);
 
 typedef enum {
        MCA_IS_LOCAL  = 0,
diff -urN linux/arch/ia64/kernel/minstate.h linux/arch/ia64/kernel/minstate.h
--- linux/arch/ia64/kernel/minstate.h   2004/10/12 01:45:40     1.12
+++ linux/arch/ia64/kernel/minstate.h   2005/01/25 04:27:57     1.13
@@ -37,12 +37,15 @@
  * go virtual and don't want to destroy the iip or ipsr.
  */
 #define MINSTATE_START_SAVE_MIN_PHYS                                           
                \
-(pKStk) movl sp=ia64_init_stack+IA64_STK_OFFSET-IA64_PT_REGS_SIZE;             
                \
+(pKStk) mov r3=ar.k3;;                                                         
                \
+(pKStk) addl r3=IA64_CPUINFO_PA_MCA_INFO,r3;;                                  
                \
+(pKStk) ld8 r3 = [r3];;                                                        
                        \
+(pKStk) addl r3=IA64_INIT_STACK,r3;;                                           
                \
+(pKStk) addl sp=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r3;                          
                \
 (pUStk)        mov ar.rsc=0;           /* set enforced lazy mode, pl 0, 
little-endian, loadrs=0 */     \
 (pUStk)        addl r22=IA64_RBS_OFFSET,r1;            /* compute base of 
register backing store */    \
        ;;                                                                      
                \
 (pUStk)        mov r24=ar.rnat;                                                
                        \
-(pKStk) tpa r1=sp;                             /* compute physical addr of sp  
*/              \
 (pUStk)        addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r1;   /* compute base 
of memory stack */      \
 (pUStk)        mov r23=ar.bspstore;                            /* save 
ar.bspstore */                  \
 (pUStk)        dep r22=-1,r22,61,3;                    /* compute kernel 
virtual addr of RBS */        \
diff -urN linux/arch/ia64/kernel/sal.c linux/arch/ia64/kernel/sal.c
--- linux/arch/ia64/kernel/sal.c        2004/09/19 12:30:03     1.15
+++ linux/arch/ia64/kernel/sal.c        2005/01/25 04:27:57     1.16
@@ -18,7 +18,7 @@
 #include <asm/sal.h>
 #include <asm/pal.h>
 
-spinlock_t sal_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
+ __cacheline_aligned DEFINE_SPINLOCK(sal_lock);
 unsigned long sal_platform_features;
 
 unsigned short sal_revision;
diff -urN linux/arch/ia64/kernel/salinfo.c linux/arch/ia64/kernel/salinfo.c
--- linux/arch/ia64/kernel/salinfo.c    2004/10/12 14:36:32     1.9
+++ linux/arch/ia64/kernel/salinfo.c    2005/01/25 04:27:57     1.10
@@ -19,6 +19,9 @@
  *
  * Jan 28 2004 kaos@sgi.com
  *   Periodically check for outstanding MCA or INIT records.
+ *
+ * Dec  5 2004 kaos@sgi.com
+ *   Standardize which records are cleared automatically.
  */
 
 #include <linux/types.h>
@@ -230,8 +233,8 @@
        }
 }
 
-/* Check for outstanding MCA/INIT records every 5 minutes (arbitrary) */
-#define SALINFO_TIMER_DELAY (5*60*HZ)
+/* Check for outstanding MCA/INIT records every minute (arbitrary) */
+#define SALINFO_TIMER_DELAY (60*HZ)
 static struct timer_list salinfo_timer;
 
 static void
@@ -382,8 +385,11 @@
 salinfo_log_read_cpu(void *context)
 {
        struct salinfo_data *data = context;
+       sal_log_record_header_t *rh;
        data->log_size = ia64_sal_get_state_info(data->type, (u64 *) 
data->log_buffer);
-       if (data->type == SAL_INFO_TYPE_CPE || data->type == SAL_INFO_TYPE_CMC)
+       rh = (sal_log_record_header_t *)(data->log_buffer);
+       /* Clear corrected errors as they are read from SAL */
+       if (rh->severity == sal_log_severity_corrected)
                ia64_sal_clear_state_info(data->type);
 }
 
@@ -457,6 +463,7 @@
 static int
 salinfo_log_clear(struct salinfo_data *data, int cpu)
 {
+       sal_log_record_header_t *rh;
        data->state = STATE_NO_DATA;
        if (!test_bit(cpu, &data->cpu_event))
                return 0;
@@ -469,10 +476,9 @@
                data->saved_num = 0;
                spin_unlock_irqrestore(&data_saved_lock, flags);
        }
-       /* ia64_mca_log_sal_error_record or salinfo_log_read_cpu already cleared
-        * CPE and CMC errors
-        */
-       if (data->type != SAL_INFO_TYPE_CPE && data->type != SAL_INFO_TYPE_CMC)
+       rh = (sal_log_record_header_t *)(data->log_buffer);
+       /* Corrected errors have already been cleared from SAL */
+       if (rh->severity != sal_log_severity_corrected)
                call_on_cpu(cpu, salinfo_log_clear_cpu, data);
        /* clearing a record may make a new record visible */
        salinfo_log_new_read(cpu, data);
diff -urN linux/arch/ia64/kernel/setup.c linux/arch/ia64/kernel/setup.c
--- linux/arch/ia64/kernel/setup.c      2004/12/27 02:15:49     1.44
+++ linux/arch/ia64/kernel/setup.c      2005/01/25 04:27:57     1.45
@@ -1,7 +1,7 @@
 /*
  * Architecture-specific setup.
  *
- * Copyright (C) 1998-2001, 2003 Hewlett-Packard Co
+ * Copyright (C) 1998-2001, 2003-2004 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
  *     Stephane Eranian <eranian@hpl.hp.com>
  * Copyright (C) 2000, Rohit Seth <rohit.seth@intel.com>
@@ -60,6 +60,7 @@
 unsigned long __per_cpu_offset[NR_CPUS];
 EXPORT_SYMBOL(__per_cpu_offset);
 #endif
+unsigned long __per_cpu_mca[NR_CPUS];
 
 DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info);
 DEFINE_PER_CPU(unsigned long, local_per_cpu_offset);
@@ -312,7 +313,28 @@
        io_port_init();
 
 #ifdef CONFIG_IA64_GENERIC
-       machvec_init(acpi_get_sysname());
+       {
+               const char *mvec_name = strstr (*cmdline_p, "machvec=");
+               char str[64];
+
+               if (mvec_name) {
+                       const char *end;
+                       size_t len;
+
+                       mvec_name += 8;
+                       end = strchr (mvec_name, ' ');
+                       if (end)
+                               len = end - mvec_name;
+                       else
+                               len = strlen (mvec_name);
+                       len = min(len, sizeof (str) - 1);
+                       strncpy (str, mvec_name, len);
+                       str[len] = '\0';
+                       mvec_name = str;
+               } else
+                       mvec_name = acpi_get_sysname();
+               machvec_init(mvec_name);
+       }
 #endif
 
        if (early_console_setup(*cmdline_p) == 0)
@@ -580,6 +602,7 @@
 cpu_init (void)
 {
        extern void __devinit ia64_mmu_init (void *);
+       extern void set_mca_pointer (struct cpuinfo_ia64 *, void *);
        unsigned long num_phys_stacked;
        pal_vm_info_2_u_t vmi;
        unsigned int max_ctx;
@@ -634,6 +657,7 @@
                BUG();
 
        ia64_mmu_init(ia64_imva(cpu_data));
+       set_mca_pointer(cpu_info, cpu_data);
 
 #ifdef CONFIG_IA32_SUPPORT
        ia32_cpu_init();
diff -urN linux/arch/ia64/kernel/signal.c linux/arch/ia64/kernel/signal.c
--- linux/arch/ia64/kernel/signal.c     2004/12/04 18:15:59     1.36
+++ linux/arch/ia64/kernel/signal.c     2005/01/25 04:27:57     1.37
@@ -589,3 +589,104 @@
        }
        return 0;
 }
+
+/* Set a delayed signal that was detected in MCA/INIT/NMI/PMI context where it
+ * could not be delivered.  It is important that the target process is not
+ * allowed to do any more work in user space.  Possible cases for the target
+ * process:
+ *
+ * - It is sleeping and will wake up soon.  Store the data in the current task,
+ *   the signal will be sent when the current task returns from the next
+ *   interrupt.
+ *
+ * - It is running in user context.  Store the data in the current task, the
+ *   signal will be sent when the current task returns from the next interrupt.
+ *
+ * - It is running in kernel context on this or another cpu and will return to
+ *   user context.  Store the data in the target task, the signal will be sent
+ *   to itself when the target task returns to user space.
+ *
+ * - It is running in kernel context on this cpu and will sleep before
+ *   returning to user context.  Because this is also the current task, the
+ *   signal will not get delivered and the task could sleep indefinitely.
+ *   Store the data in the idle task for this cpu, the signal will be sent
+ *   after the idle task processes its next interrupt.
+ *
+ * To cover all cases, store the data in the target task, the current task and
+ * the idle task on this cpu.  Whatever happens, the signal will be delivered
+ * to the target task before it can do any useful user space work.  Multiple
+ * deliveries have no unwanted side effects.
+ *
+ * Note: This code is executed in MCA/INIT/NMI/PMI context, with interrupts
+ * disabled.  It must not take any locks nor use kernel structures or services
+ * that require locks.
+ */
+
+/* To ensure that we get the right pid, check its start time.  To avoid extra
+ * include files in thread_info.h, convert the task start_time to unsigned 
long,
+ * giving us a cycle time of > 580 years.
+ */
+static inline unsigned long
+start_time_ul(const struct task_struct *t)
+{
+       return t->start_time.tv_sec * NSEC_PER_SEC + t->start_time.tv_nsec;
+}
+
+void
+set_sigdelayed(pid_t pid, int signo, int code, void __user *addr)
+{
+       struct task_struct *t;
+       unsigned long start_time =  0;
+       int i;
+
+       for (i = 1; i <= 3; ++i) {
+               switch (i) {
+               case 1:
+                       t = find_task_by_pid(pid);
+                       if (t)
+                               start_time = start_time_ul(t);
+                       break;
+               case 2:
+                       t = current;
+                       break;
+               default:
+                       t = idle_task(smp_processor_id());
+                       break;
+               }
+
+               if (!t)
+                       return;
+               t->thread_info->sigdelayed.signo = signo;
+               t->thread_info->sigdelayed.code = code;
+               t->thread_info->sigdelayed.addr = addr;
+               t->thread_info->sigdelayed.start_time = start_time;
+               t->thread_info->sigdelayed.pid = pid;
+               wmb();
+               set_tsk_thread_flag(t, TIF_SIGDELAYED);
+       }
+}
+
+/* Called from entry.S when it detects TIF_SIGDELAYED, a delayed signal that
+ * was detected in MCA/INIT/NMI/PMI context where it could not be delivered.
+ */
+
+void
+do_sigdelayed(void)
+{
+       struct siginfo siginfo;
+       pid_t pid;
+       struct task_struct *t;
+
+       clear_thread_flag(TIF_SIGDELAYED);
+       memset(&siginfo, 0, sizeof(siginfo));
+       siginfo.si_signo = current_thread_info()->sigdelayed.signo;
+       siginfo.si_code = current_thread_info()->sigdelayed.code;
+       siginfo.si_addr = current_thread_info()->sigdelayed.addr;
+       pid = current_thread_info()->sigdelayed.pid;
+       t = find_task_by_pid(pid);
+       if (!t)
+               return;
+       if (current_thread_info()->sigdelayed.start_time != start_time_ul(t))
+               return;
+       force_sig_info(siginfo.si_signo, &siginfo, t);
+}
diff -urN linux/arch/ia64/kernel/smp.c linux/arch/ia64/kernel/smp.c
--- linux/arch/ia64/kernel/smp.c        2004/12/04 18:15:59     1.35
+++ linux/arch/ia64/kernel/smp.c        2005/01/25 04:27:57     1.36
@@ -52,7 +52,7 @@
  * Structure and data for smp_call_function(). This is designed to minimise 
static memory
  * requirements. It also looks cleaner.
  */
-static spinlock_t call_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned DEFINE_SPINLOCK(call_lock);
 
 struct call_data_struct {
        void (*func) (void *info);
diff -urN linux/arch/ia64/kernel/smpboot.c linux/arch/ia64/kernel/smpboot.c
--- linux/arch/ia64/kernel/smpboot.c    2005/01/13 14:05:26     1.36
+++ linux/arch/ia64/kernel/smpboot.c    2005/01/25 04:27:57     1.37
@@ -68,7 +68,7 @@
 #define NUM_ROUNDS     64      /* magic value */
 #define NUM_ITERS      5       /* likewise */
 
-static spinlock_t itc_sync_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(itc_sync_lock);
 static volatile unsigned long go[SLAVE + 1];
 
 #define DEBUG_ITC_SYNC 0
diff -urN linux/arch/ia64/kernel/time.c linux/arch/ia64/kernel/time.c
--- linux/arch/ia64/kernel/time.c       2004/11/15 11:49:17     1.39
+++ linux/arch/ia64/kernel/time.c       2005/01/25 04:27:57     1.40
@@ -32,7 +32,7 @@
 
 extern unsigned long wall_jiffies;
 
-u64 jiffies_64 = INITIAL_JIFFIES;
+u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
 
 EXPORT_SYMBOL(jiffies_64);
 
diff -urN linux/arch/ia64/lib/csum_partial_copy.c 
linux/arch/ia64/lib/csum_partial_copy.c
--- linux/arch/ia64/lib/csum_partial_copy.c     2004/10/12 14:36:32     1.6
+++ linux/arch/ia64/lib/csum_partial_copy.c     2005/01/25 04:27:57     1.7
@@ -105,8 +105,8 @@
 extern unsigned long do_csum(const unsigned char *, long);
 
 static unsigned int
-do_csum_partial_copy_from_user (const char __user *src, char *dst, int len,
-                               unsigned int psum, int *errp)
+do_csum_partial_copy_from_user (const unsigned char __user *src, unsigned char 
*dst,
+                               int len, unsigned int psum, int *errp)
 {
        unsigned long result;
 
@@ -129,8 +129,8 @@
 }
 
 unsigned int
-csum_partial_copy_from_user (const char __user *src, char *dst, int len,
-                            unsigned int sum, int *errp)
+csum_partial_copy_from_user (const unsigned char __user *src, unsigned char 
*dst,
+                            int len, unsigned int sum, int *errp)
 {
        if (!access_ok(VERIFY_READ, src, len)) {
                *errp = -EFAULT;
@@ -142,7 +142,8 @@
 }
 
 unsigned int
-csum_partial_copy_nocheck(const char __user *src, char *dst, int len, unsigned 
int sum)
+csum_partial_copy_nocheck(const unsigned char __user *src, unsigned char *dst,
+                         int len, unsigned int sum)
 {
        return do_csum_partial_copy_from_user(src, dst, len, sum, NULL);
 }
diff -urN linux/arch/ia64/lib/swiotlb.c linux/arch/ia64/lib/swiotlb.c
--- linux/arch/ia64/lib/swiotlb.c       2005/01/13 14:05:26     1.16
+++ linux/arch/ia64/lib/swiotlb.c       2005/01/25 04:27:57     1.17
@@ -61,9 +61,8 @@
 /*
  * The number of IO TLB blocks (in groups of 64) betweeen io_tlb_start and
  * io_tlb_end.  This is command line adjustable via setup_io_tlb_npages.
- * Default to 64MB.
  */
-static unsigned long io_tlb_nslabs = 32768;
+static unsigned long io_tlb_nslabs;
 
 /*
  * When the IOMMU overflows we return a fallback buffer. This sets the size.
@@ -88,7 +87,7 @@
 /*
  * Protect the above data structures in the map and unmap calls
  */
-static spinlock_t io_tlb_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(io_tlb_lock);
 
 static int __init
 setup_io_tlb_npages(char *str)
@@ -113,10 +112,15 @@
  * structures for the software IO TLB used to implement the PCI DMA API.
  */
 void
-swiotlb_init(void)
+swiotlb_init_with_default_size (size_t default_size)
 {
        unsigned long i;
 
+       if (!io_tlb_nslabs) {
+               io_tlb_nslabs = (default_size >> PAGE_SHIFT);
+               io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
+       }
+
        /*
         * Get IO TLB memory from the low pages
         */
@@ -145,6 +149,12 @@
               virt_to_phys(io_tlb_start), virt_to_phys(io_tlb_end));
 }
 
+void
+swiotlb_init (void)
+{
+       swiotlb_init_with_default_size(64 * (1<<20));   /* default to 64MB */
+}
+
 static inline int
 address_needs_mapping(struct device *hwdev, dma_addr_t addr)
 {
@@ -347,8 +357,8 @@
 
        /* Confirm address can be DMA'd by device */
        if (address_needs_mapping(hwdev, dev_addr)) {
-               printk("hwdev DMA mask = 0x%016lx, dev_addr = 0x%016lx\n",
-                      *hwdev->dma_mask, dev_addr);
+               printk("hwdev DMA mask = 0x%016Lx, dev_addr = 0x%016lx\n",
+                      (unsigned long long)*hwdev->dma_mask, dev_addr);
                panic("swiotlb_alloc_coherent: allocated memory is out of "
                      "range for device");
        }
diff -urN linux/arch/ia64/mm/contig.c linux/arch/ia64/mm/contig.c
--- linux/arch/ia64/mm/contig.c 2005/01/13 14:05:26     1.8
+++ linux/arch/ia64/mm/contig.c 2005/01/25 04:27:57     1.9
@@ -24,6 +24,7 @@
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/sections.h>
+#include <asm/mca.h>
 
 #ifdef CONFIG_VIRTUAL_MEM_MAP
 static unsigned long num_dma_physpages;
@@ -177,7 +178,7 @@
 void *
 per_cpu_init (void)
 {
-       void *cpu_data;
+       void *cpu_data, *mca_data;
        int cpu;
 
        /*
@@ -188,11 +189,14 @@
        if (smp_processor_id() == 0) {
                cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS,
                                           PERCPU_PAGE_SIZE, 
__pa(MAX_DMA_ADDRESS));
+               mca_data = alloc_bootmem(PERCPU_MCA_SIZE * NR_CPUS);
                for (cpu = 0; cpu < NR_CPUS; cpu++) {
                        memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - 
__per_cpu_start);
                        __per_cpu_offset[cpu] = (char *) cpu_data - 
__per_cpu_start;
                        cpu_data += PERCPU_PAGE_SIZE;
                        per_cpu(local_per_cpu_offset, cpu) = 
__per_cpu_offset[cpu];
+                       __per_cpu_mca[cpu] = (unsigned long)mca_data;
+                       mca_data += PERCPU_MCA_SIZE;
                }
        }
        return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
diff -urN linux/arch/ia64/mm/discontig.c linux/arch/ia64/mm/discontig.c
--- linux/arch/ia64/mm/discontig.c      2005/01/13 14:05:26     1.19
+++ linux/arch/ia64/mm/discontig.c      2005/01/25 04:27:57     1.20
@@ -4,6 +4,10 @@
  * Copyright (c) 2001 Tony Luck <tony.luck@intel.com>
  * Copyright (c) 2002 NEC Corp.
  * Copyright (c) 2002 Kimio Suganuma <k-suganuma@da.jp.nec.com>
+ * Copyright (c) 2004 Silicon Graphics, Inc
+ *     Russ Anderson <rja@sgi.com>
+ *     Jesse Barnes <jbarnes@sgi.com>
+ *     Jack Steiner <steiner@sgi.com>
  */
 
 /*
@@ -22,6 +26,7 @@
 #include <asm/meminit.h>
 #include <asm/numa.h>
 #include <asm/sections.h>
+#include <asm/mca.h>
 
 /*
  * Track per-node information needed to setup the boot memory allocator, the
@@ -229,12 +234,34 @@
 }
 
 /**
+ * early_nr_phys_cpus_node - return number of physical cpus on a given node
+ * @node: node to check
+ *
+ * Count the number of physical cpus on @node.  These are cpus that actually
+ * exist.  We can't use nr_cpus_node() yet because
+ * acpi_boot_init() (which builds the node_to_cpu_mask array) hasn't been
+ * called yet.
+ */
+static int early_nr_phys_cpus_node(int node)
+{
+       int cpu, n = 0;
+
+       for (cpu = 0; cpu < NR_CPUS; cpu++)
+               if (node == node_cpuid[cpu].nid)
+                       if ((cpu == 0) || node_cpuid[cpu].phys_id)
+                               n++;
+
+       return n;
+}
+
+
+/**
  * early_nr_cpus_node - return number of cpus on a given node
  * @node: node to check
  *
  * Count the number of cpus on @node.  We can't use nr_cpus_node() yet because
  * acpi_boot_init() (which builds the node_to_cpu_mask array) hasn't been
- * called yet.
+ * called yet.  Note that node 0 will also count all non-existent cpus.
  */
 static int early_nr_cpus_node(int node)
 {
@@ -261,12 +288,15 @@
  *   |                        |
  *   |~~~~~~~~~~~~~~~~~~~~~~~~| <-- NODEDATA_ALIGN(start, node) for the first
  *   |    PERCPU_PAGE_SIZE *  |     start and length big enough
- *   |        NR_CPUS         |
+ *   |    cpus_on_this_node   | Node 0 will also have entries for all 
non-existent cpus.
  *   |------------------------|
  *   |   local pg_data_t *    |
  *   |------------------------|
  *   |  local ia64_node_data  |
  *   |------------------------|
+ *   |    MCA/INIT data *     |
+ *   |    cpus_on_this_node   |
+ *   |------------------------|
  *   |          ???           |
  *   |________________________|
  *
@@ -278,9 +308,9 @@
 static int __init find_pernode_space(unsigned long start, unsigned long len,
                                     int node)
 {
-       unsigned long epfn, cpu, cpus;
+       unsigned long epfn, cpu, cpus, phys_cpus;
        unsigned long pernodesize = 0, pernode, pages, mapsize;
-       void *cpu_data;
+       void *cpu_data, *mca_data_phys;
        struct bootmem_data *bdp = &mem_data[node].bootmem_data;
 
        epfn = (start + len) >> PAGE_SHIFT;
@@ -304,9 +334,12 @@
         * for good alignment and alias prevention.
         */
        cpus = early_nr_cpus_node(node);
+       phys_cpus = early_nr_phys_cpus_node(node);
        pernodesize += PERCPU_PAGE_SIZE * cpus;
+       pernodesize += node * L1_CACHE_BYTES;
        pernodesize += L1_CACHE_ALIGN(sizeof(pg_data_t));
        pernodesize += L1_CACHE_ALIGN(sizeof(struct ia64_node_data));
+       pernodesize += L1_CACHE_ALIGN(sizeof(ia64_mca_cpu_t)) * phys_cpus;
        pernodesize = PAGE_ALIGN(pernodesize);
        pernode = NODEDATA_ALIGN(start, node);
 
@@ -318,6 +351,7 @@
 
                cpu_data = (void *)pernode;
                pernode += PERCPU_PAGE_SIZE * cpus;
+               pernode += node * L1_CACHE_BYTES;
 
                mem_data[node].pgdat = __va(pernode);
                pernode += L1_CACHE_ALIGN(sizeof(pg_data_t));
@@ -328,6 +362,9 @@
                mem_data[node].pgdat->bdata = bdp;
                pernode += L1_CACHE_ALIGN(sizeof(pg_data_t));
 
+               mca_data_phys = (void *)pernode;
+               pernode += L1_CACHE_ALIGN(sizeof(ia64_mca_cpu_t)) * phys_cpus;
+
                /*
                 * Copy the static per-cpu data into the region we
                 * just set aside and then setup __per_cpu_offset
@@ -337,6 +374,18 @@
                        if (node == node_cpuid[cpu].nid) {
                                memcpy(__va(cpu_data), __phys_per_cpu_start,
                                       __per_cpu_end - __per_cpu_start);
+                               if ((cpu == 0) || (node_cpuid[cpu].phys_id > 
0)) {
+                                       /* 
+                                        * The memory for the cpuinfo structure 
is allocated
+                                        * here, but the data in the structure 
is initialized
+                                        * later.  Save the physical address of 
the MCA save
+                                        * area in __per_cpu_mca[cpu].  When 
the cpuinfo struct 
+                                        * is initialized, the value in 
__per_cpu_mca[cpu]
+                                        * will be put in the cpuinfo structure.
+                                        */
+                                       __per_cpu_mca[cpu] = 
__pa(mca_data_phys);
+                                       mca_data_phys += 
L1_CACHE_ALIGN(sizeof(ia64_mca_cpu_t));
+                               }
                                __per_cpu_offset[cpu] = (char*)__va(cpu_data) -
                                        __per_cpu_start;
                                cpu_data += PERCPU_PAGE_SIZE;
diff -urN linux/arch/ia64/mm/init.c linux/arch/ia64/mm/init.c
--- linux/arch/ia64/mm/init.c   2005/01/13 14:05:26     1.51
+++ linux/arch/ia64/mm/init.c   2005/01/25 04:27:57     1.52
@@ -40,6 +40,7 @@
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 
 extern void ia64_tlb_init (void);
+extern void efi_get_pal_addr (void);
 
 unsigned long MAX_DMA_ADDRESS = PAGE_OFFSET + 0x100000000UL;
 
@@ -291,12 +292,32 @@
        ia64_patch_gate();
 }
 
+void
+set_mca_pointer(struct cpuinfo_ia64 *cpuinfo, void *cpu_data)
+{
+       void *my_cpu_data = ia64_imva(cpu_data);
+
+        /*
+         * The MCA info structure was allocated earlier and a physical address 
pointer
+         * saved in __per_cpu_mca[cpu].  Move that pointer into the cpuinfo 
structure.
+         */
+
+        cpuinfo->ia64_pa_mca_data = (__u64 *)__per_cpu_mca[smp_processor_id()];
+
+        cpuinfo->percpu_paddr = pte_val(mk_pte_phys(__pa(my_cpu_data), 
PAGE_KERNEL));
+        ia64_set_kr(IA64_KR_PA_CPU_INFO, __pa(cpuinfo));
+
+        /*
+         * Set pal_base and pal_paddr in cpuinfo structure.
+         */
+        efi_get_pal_addr();
+}
+
 void __devinit
 ia64_mmu_init (void *my_cpu_data)
 {
        unsigned long psr, pta, impl_va_bits;
        extern void __devinit tlb_init (void);
-       int cpu;
 
 #ifdef CONFIG_DISABLE_VHPT
 #      define VHPT_ENABLE_BIT  0
@@ -361,20 +382,6 @@
        ia64_set_rr(HPAGE_REGION_BASE, HPAGE_SHIFT << 2);
        ia64_srlz_d();
 #endif
-
-       cpu = smp_processor_id();
-
-       /* mca handler uses cr.lid as key to pick the right entry */
-       ia64_mca_tlb_list[cpu].cr_lid = ia64_getreg(_IA64_REG_CR_LID);
-
-       /* insert this percpu data information into our list for MCA recovery 
purposes */
-       ia64_mca_tlb_list[cpu].percpu_paddr = 
pte_val(mk_pte_phys(__pa(my_cpu_data), PAGE_KERNEL));
-       /* Also save per-cpu tlb flush recipe for use in physical mode mca 
handler */
-       ia64_mca_tlb_list[cpu].ptce_base = local_cpu_data->ptce_base;
-       ia64_mca_tlb_list[cpu].ptce_count[0] = local_cpu_data->ptce_count[0];
-       ia64_mca_tlb_list[cpu].ptce_count[1] = local_cpu_data->ptce_count[1];
-       ia64_mca_tlb_list[cpu].ptce_stride[0] = local_cpu_data->ptce_stride[0];
-       ia64_mca_tlb_list[cpu].ptce_stride[1] = local_cpu_data->ptce_stride[1];
 }
 
 #ifdef CONFIG_VIRTUAL_MEM_MAP
diff -urN linux/arch/ia64/mm/tlb.c linux/arch/ia64/mm/tlb.c
--- linux/arch/ia64/mm/tlb.c    2004/10/12 14:36:32     1.23
+++ linux/arch/ia64/mm/tlb.c    2005/01/25 04:27:57     1.24
@@ -88,7 +88,7 @@
 void
 ia64_global_tlb_purge (unsigned long start, unsigned long end, unsigned long 
nbits)
 {
-       static spinlock_t ptcg_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(ptcg_lock);
 
        /* HW requires global serialization of ptc.ga.  */
        spin_lock(&ptcg_lock);
diff -urN linux/arch/ia64/pci/pci.c linux/arch/ia64/pci/pci.c
--- linux/arch/ia64/pci/pci.c   2005/01/13 14:05:27     1.26
+++ linux/arch/ia64/pci/pci.c   2005/01/25 04:27:58     1.27
@@ -6,6 +6,7 @@
  * Copyright (C) 2002 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
  *     Bjorn Helgaas <bjorn_helgaas@hp.com>
+ * Copyright (C) 2004 Silicon Graphics, Inc.
  *
  * Note: Above list of copyright holders is incomplete...
  */
@@ -131,6 +132,19 @@
        .write = pci_write,
 };
 
+#ifdef CONFIG_NUMA
+extern acpi_status acpi_map_iosapic(acpi_handle, u32, void *, void **);
+static void acpi_map_iosapics(void)
+{
+       acpi_get_devices(NULL, acpi_map_iosapic, NULL, NULL);
+}
+#else
+static void acpi_map_iosapics(void)
+{
+       return;
+}
+#endif /* CONFIG_NUMA */
+
 static int __init
 pci_acpi_init (void)
 {
@@ -138,11 +152,7 @@
 
        printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
 
-#ifdef CONFIG_NUMA
-extern acpi_status acpi_map_iosapic (acpi_handle, u32, void*, void**);
-
-       acpi_get_devices(NULL, acpi_map_iosapic, NULL, NULL);
-#endif
+       acpi_map_iosapics();
 
        if (pci_routeirq) {
                /*
@@ -154,7 +164,7 @@
                printk(KERN_INFO "** was specified.  If this was required to 
make a driver work,\n");
                printk(KERN_INFO "** please email the output of \"lspci\" to 
bjorn.helgaas@hp.com\n");
                printk(KERN_INFO "** so I can fix the driver.\n");
-               while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != 
NULL)
+               for_each_pci_dev(dev)
                        acpi_pci_irq_enable(dev);
        } else {
                printk(KERN_INFO "** PCI interrupts are no longer routed 
automatically.  If this\n");
@@ -367,6 +377,7 @@
        region->start = res->start - offset;
        region->end = res->end - offset;
 }
+EXPORT_SYMBOL(pcibios_resource_to_bus);
 
 void pcibios_bus_to_resource(struct pci_dev *dev,
                struct resource *res, struct pci_bus_region *region)
@@ -526,7 +537,7 @@
         * Leave vm_pgoff as-is, the PCI space address is the physical
         * address on this platform.
         */
-       vma->vm_flags |= (VM_SHM | VM_LOCKED | VM_IO);
+       vma->vm_flags |= (VM_SHM | VM_RESERVED | VM_IO);
 
        if (write_combine)
                vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
@@ -541,6 +552,117 @@
 }
 
 /**
+ * ia64_pci_get_legacy_mem - generic legacy mem routine
+ * @bus: bus to get legacy memory base address for
+ *
+ * Find the base of legacy memory for @bus.  This is typically the first
+ * megabyte of bus address space for @bus or is simply 0 on platforms whose
+ * chipsets support legacy I/O and memory routing.  Returns the base address
+ * or an error pointer if an error occurred.
+ *
+ * This is the ia64 generic version of this routine.  Other platforms
+ * are free to override it with a machine vector.
+ */
+char *ia64_pci_get_legacy_mem(struct pci_bus *bus)
+{
+       return (char *)__IA64_UNCACHED_OFFSET;
+}
+
+/**
+ * pci_mmap_legacy_page_range - map legacy memory space to userland
+ * @bus: bus whose legacy space we're mapping
+ * @vma: vma passed in by mmap
+ *
+ * Map legacy memory space for this device back to userspace using a machine
+ * vector to get the base address.
+ */
+int
+pci_mmap_legacy_page_range(struct pci_bus *bus, struct vm_area_struct *vma)
+{
+       char *addr;
+
+       addr = pci_get_legacy_mem(bus);
+       if (IS_ERR(addr))
+               return PTR_ERR(addr);
+
+       vma->vm_pgoff += (unsigned long)addr >> PAGE_SHIFT;
+       vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+       vma->vm_flags |= (VM_SHM | VM_RESERVED | VM_IO);
+
+       if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
+                           vma->vm_end - vma->vm_start, vma->vm_page_prot))
+               return -EAGAIN;
+
+       return 0;
+}
+
+/**
+ * ia64_pci_legacy_read - read from legacy I/O space
+ * @bus: bus to read
+ * @port: legacy port value
+ * @val: caller allocated storage for returned value
+ * @size: number of bytes to read
+ *
+ * Simply reads @size bytes from @port and puts the result in @val.
+ *
+ * Again, this (and the write routine) are generic versions that can be
+ * overridden by the platform.  This is necessary on platforms that don't
+ * support legacy I/O routing or that hard fail on legacy I/O timeouts.
+ */
+int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
+{
+       int ret = size;
+
+       switch (size) {
+       case 1:
+               *val = inb(port);
+               break;
+       case 2:
+               *val = inw(port);
+               break;
+       case 4:
+               *val = inl(port);
+               break;
+       default:
+               ret = -EINVAL;
+               break;
+       }
+
+       return ret;
+}
+
+/**
+ * ia64_pci_legacy_write - perform a legacy I/O write
+ * @bus: bus pointer
+ * @port: port to write
+ * @val: value to write
+ * @size: number of bytes to write from @val
+ *
+ * Simply writes @size bytes of @val to @port.
+ */
+int ia64_pci_legacy_write(struct pci_dev *bus, u16 port, u32 val, u8 size)
+{
+       int ret = 0;
+
+       switch (size) {
+       case 1:
+               outb(val, port);
+               break;
+       case 2:
+               outw(val, port);
+               break;
+       case 4:
+               outl(val, port);
+               break;
+       default:
+               ret = -EINVAL;
+               break;
+       }
+
+       return ret;
+}
+
+/**
  * pci_cacheline_size - determine cacheline size for PCI devices
  * @dev: void
  *
diff -urN linux/arch/ia64/sn/kernel/bte_error.c 
linux/arch/ia64/sn/kernel/bte_error.c
--- linux/arch/ia64/sn/kernel/bte_error.c       2004/10/25 20:44:15     1.1
+++ linux/arch/ia64/sn/kernel/bte_error.c       2005/01/25 04:27:58     1.2
@@ -47,6 +47,7 @@
        ii_icrb0_d_u_t icrbd;   /* II CRB Register D */
        ii_ibcr_u_t ibcr;
        ii_icmr_u_t icmr;
+       ii_ieclr_u_t ieclr;
 
        BTE_PRINTK(("bte_error_handler(%p) - %d\n", err_nodepda,
                    smp_processor_id()));
@@ -131,6 +132,14 @@
        imem.ii_imem_fld_s.i_b0_esd = imem.ii_imem_fld_s.i_b1_esd = 1;
        REMOTE_HUB_S(nasid, IIO_IMEM, imem.ii_imem_regval);
 
+       /* Clear BTE0/1 error bits */
+       ieclr.ii_ieclr_regval = 0;
+       if (err_nodepda->bte_if[0].bh_error != BTE_SUCCESS)
+               ieclr.ii_ieclr_fld_s.i_e_bte_0 = 1;
+       if (err_nodepda->bte_if[1].bh_error != BTE_SUCCESS)
+               ieclr.ii_ieclr_fld_s.i_e_bte_1 = 1;
+       REMOTE_HUB_S(nasid, IIO_IECLR, ieclr.ii_ieclr_regval);
+
        /* Reinitialize both BTE state machines. */
        ibcr.ii_ibcr_regval = REMOTE_HUB_L(nasid, IIO_IBCR);
        ibcr.ii_ibcr_fld_s.i_soft_reset = 1;
@@ -152,7 +161,7 @@
                err_nodepda->bte_if[i].cleanup_active = 0;
                BTE_PRINTK(("eh:%p:%d Unlocked %d\n", err_nodepda,
                            smp_processor_id(), i));
-               spin_unlock(&pda->cpu_bte_if[i]->spinlock);
+               spin_unlock(&err_nodepda->bte_if[i].spinlock);
        }
 
        del_timer(recovery_timer);
diff -urN linux/arch/ia64/sn/kernel/io_init.c 
linux/arch/ia64/sn/kernel/io_init.c
--- linux/arch/ia64/sn/kernel/io_init.c 2005/01/13 14:05:27     1.3
+++ linux/arch/ia64/sn/kernel/io_init.c 2005/01/25 04:27:58     1.4
@@ -202,7 +202,7 @@
        struct pci_dev *host_pci_dev;
        int status = 0;
 
-       SN_PCIDEV_INFO(dev) = kmalloc(sizeof(struct pcidev_info), GFP_KERNEL);
+       dev->sysdata = kmalloc(sizeof(struct pcidev_info), GFP_KERNEL);
        if (SN_PCIDEV_INFO(dev) <= 0)
                BUG();          /* Cannot afford to run out of memory */
        memset(SN_PCIDEV_INFO(dev), 0, sizeof(struct pcidev_info));
@@ -310,8 +310,8 @@
         * after this point.
         */
 
-       PCI_CONTROLLER(bus) = controller;
-       SN_PCIBUS_BUSSOFT(bus) = provider_soft;
+       bus->sysdata = controller;
+       PCI_CONTROLLER(bus)->platform_data = provider_soft;
 
        nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base);
        cnode = nasid_to_cnodeid(nasid);
diff -urN linux/arch/ia64/sn/kernel/iomv.c linux/arch/ia64/sn/kernel/iomv.c
--- linux/arch/ia64/sn/kernel/iomv.c    2004/11/15 11:49:17     1.5
+++ linux/arch/ia64/sn/kernel/iomv.c    2005/01/25 04:27:58     1.6
@@ -32,7 +32,6 @@
                return ((void *)(port | __IA64_UNCACHED_OFFSET));
        } else {
                /* but the simulator uses them... */
-               unsigned long io_base;
                unsigned long addr;
 
                /*
@@ -40,14 +39,9 @@
                 * for accessing registers in bedrock local block
                 * (so we don't do port&0xfff)
                 */
-               if ((port >= 0x1f0 && port <= 0x1f7) ||
-                   port == 0x3f6 || port == 0x3f7) {
-                       io_base = (0xc000000fcc000000UL |
-                                  ((unsigned long)get_nasid() << 38));
-                       addr = io_base | ((port >> 2) << 12) | (port & 0xfff);
-               } else {
-                       addr = __ia64_get_io_port_base() | ((port >> 2) << 2);
-               }
+               addr = (is_shub2() ? 0xc00000028c000000UL : 
0xc0000087cc000000UL) | ((port >> 2) << 12);
+               if ((port >= 0x1f0 && port <= 0x1f7) || port == 0x3f6 || port 
== 0x3f7)
+                       addr |= port;
                return (void *)addr;
        }
 }
@@ -66,9 +60,10 @@
  */
 void __sn_mmiowb(void)
 {
-       while ((((volatile unsigned long)(*pda->pio_write_status_addr)) &
-               SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT_MASK) !=
-              SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT_MASK)
+       volatile unsigned long *adr = pda->pio_write_status_addr;
+       unsigned long val = pda->pio_write_status_val;
+
+       while ((*adr & SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK) != val)
                cpu_relax();
 }
 
diff -urN linux/arch/ia64/sn/kernel/irq.c linux/arch/ia64/sn/kernel/irq.c
--- linux/arch/ia64/sn/kernel/irq.c     2004/11/15 11:49:17     1.18
+++ linux/arch/ia64/sn/kernel/irq.c     2005/01/25 04:27:58     1.19
@@ -204,7 +204,7 @@
 
 struct irq_desc *sn_irq_desc(unsigned int irq)
 {
-       return (_irq_desc + irq);
+       return (irq_desc + irq);
 }
 
 u8 sn_irq_to_vector(unsigned int irq)
@@ -220,7 +220,7 @@
 void sn_irq_init(void)
 {
        int i;
-       irq_desc_t *base_desc = _irq_desc;
+       irq_desc_t *base_desc = irq_desc;
 
        for (i = 0; i < NR_IRQS; i++) {
                if (base_desc[i].handler == &no_irq_type) {
diff -urN linux/arch/ia64/sn/kernel/setup.c linux/arch/ia64/sn/kernel/setup.c
--- linux/arch/ia64/sn/kernel/setup.c   2005/01/13 14:05:27     1.28
+++ linux/arch/ia64/sn/kernel/setup.c   2005/01/25 04:27:58     1.29
@@ -41,7 +41,6 @@
 #include <asm/sn/nodepda.h>
 #include <asm/sn/sn_cpuid.h>
 #include <asm/sn/simulator.h>
-#include "shub.h"
 #include <asm/sn/leds.h>
 #include <asm/sn/bte.h>
 #include <asm/sn/shub_mmr.h>
@@ -216,8 +215,10 @@
        unsigned long id;
        int rev;
 
-       id = REMOTE_HUB_L(nasid, SH_SHUB_ID);
-       rev = (id & SH_SHUB_ID_REVISION_MASK) >> SH_SHUB_ID_REVISION_SHFT;
+       if (is_shub2())
+               return 0;
+       id = REMOTE_HUB_L(nasid, SH1_SHUB_ID);
+       rev = (id & SH1_SHUB_ID_REVISION_MASK) >> SH1_SHUB_ID_REVISION_SHFT;
        return rev <= 2;
 }
 
@@ -225,9 +226,13 @@
 {
        int cnode;
 
-       for_each_online_node(cnode) {
-               if (is_shub_1_1(cnodeid_to_nasid(cnode)))
-                       shub_1_1_found = 1;
+       if (is_shub2()) {
+               /* none yet */
+       } else {
+               for_each_online_node(cnode) {
+                       if (is_shub_1_1(cnodeid_to_nasid(cnode)))
+                               shub_1_1_found = 1;
+               }
        }
 }
 
@@ -342,7 +347,7 @@
  *
  * One time setup for Node Data Area.  Called by sn_setup().
  */
-void __init sn_init_pdas(char **cmdline_p)
+static void __init sn_init_pdas(char **cmdline_p)
 {
        cnodeid_t cnode;
 
@@ -418,8 +423,17 @@
        int slice;
        int cnode;
        int i;
+       u64 shubtype, nasid_bitmask, nasid_shift;
        static int wars_have_been_checked;
 
+       memset(pda, 0, sizeof(pda));
+       if (ia64_sn_get_hub_info(0, &shubtype, &nasid_bitmask, &nasid_shift))
+               BUG();
+       pda->shub2 = (u8)shubtype;
+       pda->nasid_bitmask = (u16)nasid_bitmask;
+       pda->nasid_shift = (u8)nasid_shift;
+       pda->as_shift = pda->nasid_shift - 2;
+
        /*
         * The boot cpu makes this call again after platform initialization is
         * complete.
@@ -443,7 +457,6 @@
 
        cnode = nasid_to_cnodeid(nasid);
 
-       memset(pda, 0, sizeof(pda));
        pda->p_nodepda = nodepdaindr[cnode];
        pda->led_address =
            (typeof(pda->led_address)) (LED0 + (slice << LED_CPU_SHIFT));
@@ -471,25 +484,29 @@
        pda->shub_1_1_found = shub_1_1_found;
 
        /*
-        * We must use different memory allocators for first cpu (bootmem 
-        * allocator) than for the other cpus (regular allocator).
+        * Set up addresses of PIO/MEM write status registers.
         */
-       pda->pio_write_status_addr = (volatile unsigned long *)
-           LOCAL_MMR_ADDR((slice <
-                           2 ? SH_PIO_WRITE_STATUS_0 : SH_PIO_WRITE_STATUS_1));
-       pda->mem_write_status_addr = (volatile u64 *)
-           LOCAL_MMR_ADDR((slice <
-                           2 ? SH_MEMORY_WRITE_STATUS_0 :
-                           SH_MEMORY_WRITE_STATUS_1));
+       {
+               u64 pio1[] = {SH1_PIO_WRITE_STATUS_0, 0, 
SH1_PIO_WRITE_STATUS_1, 0};
+               u64 pio2[] = {SH2_PIO_WRITE_STATUS_0, SH2_PIO_WRITE_STATUS_1, 
+                       SH2_PIO_WRITE_STATUS_2, SH2_PIO_WRITE_STATUS_3};
+               u64 *pio;
+               pio = is_shub1() ? pio1 : pio2;
+               pda->pio_write_status_addr = (volatile unsigned long *) 
LOCAL_MMR_ADDR(pio[slice]);
+               pda->pio_write_status_val = is_shub1() ? 
SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK : 0;
+       }
 
-       if (local_node_data->active_cpu_count++ == 0) {
+       /*
+        * WAR addresses for SHUB 1.x.
+        */
+       if (local_node_data->active_cpu_count++ == 0 && is_shub1()) {
                int buddy_nasid;
                buddy_nasid =
                    cnodeid_to_nasid(numa_node_id() ==
                                     num_online_nodes() - 1 ? 0 : 
numa_node_id() + 1);
                pda->pio_shub_war_cam_addr =
                    (volatile unsigned long *)GLOBAL_MMR_ADDR(nasid,
-                                                             
SH_PI_CAM_CONTROL);
+                                                             
SH1_PI_CAM_CONTROL);
        }
 }
 
@@ -505,15 +522,15 @@
 
        /* Setup ionodes with memory */
        for (nasid = 0; nasid < MAX_PHYSNODE_ID; nasid += 2) {
-               u64 klgraph_header;
+               char *klgraph_header;
                cnodeid_t cnodeid;
 
                if (physical_node_map[nasid] == -1)
                        continue;
 
-               klgraph_header = cnodeid = -1;
-               klgraph_header = ia64_sn_get_klconfig_addr(nasid);
-               if (klgraph_header <= 0) {
+               cnodeid = -1;
+               klgraph_header = __va(ia64_sn_get_klconfig_addr(nasid));
+               if (!klgraph_header) {
                        if (IS_RUNNING_ON_SIMULATOR())
                                continue;
                        BUG();  /* All nodes must have klconfig tables! */
diff -urN linux/arch/ia64/sn/kernel/sn2/ptc_deadlock.S 
linux/arch/ia64/sn/kernel/sn2/ptc_deadlock.S
--- linux/arch/ia64/sn/kernel/sn2/ptc_deadlock.S        2004/10/25 20:44:15     
1.2
+++ linux/arch/ia64/sn/kernel/sn2/ptc_deadlock.S        2005/01/25 04:27:58     
1.3
@@ -8,34 +8,33 @@
 
 #include <asm/sn/shub_mmr.h>
 
-#define ZEROVAL                0x3f            // "zero" value for outstanding 
PIO requests
-#define DEADLOCKBIT    SH_PIO_WRITE_STATUS_0_WRITE_DEADLOCK_SHFT
-#define WRITECOUNT     SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT_SHFT
-#define ALIAS_OFFSET   (SH_PIO_WRITE_STATUS_0_ALIAS-SH_PIO_WRITE_STATUS_0)
+#define DEADLOCKBIT    SH_PIO_WRITE_STATUS_WRITE_DEADLOCK_SHFT
+#define WRITECOUNTMASK SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK
+#define ALIAS_OFFSET   (SH1_PIO_WRITE_STATUS_0_ALIAS-SH1_PIO_WRITE_STATUS_0)
 
 
        .global sn2_ptc_deadlock_recovery_core
        .proc   sn2_ptc_deadlock_recovery_core
 
 sn2_ptc_deadlock_recovery_core:
-       .regstk 5,0,0,0
+       .regstk 6,0,0,0
 
        ptc0     = in0
        data0    = in1
        ptc1     = in2
        data1    = in3
        piowc    = in4
+       zeroval  = in5
        piowcphy = r30
        psrsave  = r2
-       zeroval  = r3
        scr1     = r16
        scr2     = r17
+       mask     = r18
 
 
        extr.u  piowcphy=piowc,0,61;;   // Convert piowc to uncached physical 
address
        dep     piowcphy=-1,piowcphy,63,1
-
-       mov     zeroval=ZEROVAL         // "zero" value for PIO write count
+       movl    mask=WRITECOUNTMASK
 
 1:
        add     scr2=ALIAS_OFFSET,piowc // Address of WRITE_STATUS alias 
register 
@@ -43,7 +42,7 @@
        st8.rel [scr2]=scr1;;
 
 5:     ld8.acq scr1=[piowc];;          // Wait for PIOs to complete.
-       extr.u  scr2=scr1,WRITECOUNT,7;;// PIO count
+       and     scr2=scr1,mask;;        // mask of writecount bits
        cmp.ne  p6,p0=zeroval,scr2
 (p6)   br.cond.sptk 5b
        
@@ -57,16 +56,17 @@
        st8.rel [ptc0]=data0            // Write PTC0 & wait for completion.
 
 5:     ld8.acq scr1=[piowcphy];;       // Wait for PIOs to complete.
-       extr.u  scr2=scr1,WRITECOUNT,7;;// PIO count
+       and     scr2=scr1,mask;;        // mask of writecount bits
        cmp.ne  p6,p0=zeroval,scr2
 (p6)   br.cond.sptk 5b;;
 
        tbit.nz p8,p7=scr1,DEADLOCKBIT;;// Test for DEADLOCK
+(p7)   cmp.ne p7,p0=r0,ptc1;;          // Test for non-null ptc1
        
 (p7)   st8.rel [ptc1]=data1;;          // Now write PTC1.
 
 5:     ld8.acq scr1=[piowcphy];;       // Wait for PIOs to complete.
-       extr.u  scr2=scr1,WRITECOUNT,7;;// PIO count
+       and     scr2=scr1,mask;;        // mask of writecount bits
        cmp.ne  p6,p0=zeroval,scr2
 (p6)   br.cond.sptk 5b
        
diff -urN linux/arch/ia64/sn/kernel/sn2/sn2_smp.c 
linux/arch/ia64/sn/kernel/sn2/sn2_smp.c
--- linux/arch/ia64/sn/kernel/sn2/sn2_smp.c     2005/01/13 14:05:27     1.13
+++ linux/arch/ia64/sn/kernel/sn2/sn2_smp.c     2005/01/25 04:27:58     1.14
@@ -39,23 +39,23 @@
 #include <asm/sn/nodepda.h>
 #include <asm/sn/rw_mmr.h>
 
-void sn2_ptc_deadlock_recovery(unsigned long data0, unsigned long data1);
+void sn2_ptc_deadlock_recovery(volatile unsigned long *, unsigned long data0, 
+       volatile unsigned long *, unsigned long data1);
 
-static spinlock_t sn2_global_ptc_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned DEFINE_SPINLOCK(sn2_global_ptc_lock);
 
 static unsigned long sn2_ptc_deadlock_count;
 
 static inline unsigned long wait_piowc(void)
 {
-       volatile unsigned long *piows;
+       volatile unsigned long *piows, zeroval;
        unsigned long ws;
 
        piows = pda->pio_write_status_addr;
+       zeroval = pda->pio_write_status_val;
        do {
-               ia64_mfa();
-       } while (((ws =
-                  *piows) & SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT_MASK) !=
-                SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT_MASK);
+               cpu_relax();
+       } while (((ws = *piows) & SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK) 
!= zeroval);
        return ws;
 }
 
@@ -89,9 +89,9 @@
 sn2_global_tlb_purge(unsigned long start, unsigned long end,
                     unsigned long nbits)
 {
-       int i, cnode, mynasid, cpu, lcpu = 0, nasid, flushed = 0;
+       int i, shub1, cnode, mynasid, cpu, lcpu = 0, nasid, flushed = 0;
        volatile unsigned long *ptc0, *ptc1;
-       unsigned long flags = 0, data0, data1;
+       unsigned long flags = 0, data0 = 0, data1 = 0;
        struct mm_struct *mm = current->active_mm;
        short nasids[MAX_NUMNODES], nix;
        nodemask_t nodes_flushed;
@@ -128,28 +128,42 @@
        for_each_node_mask(cnode, nodes_flushed)
                nasids[nix++] = cnodeid_to_nasid(cnode);
 
-       data0 = (1UL << SH_PTC_0_A_SHFT) |
-           (nbits << SH_PTC_0_PS_SHFT) |
-           ((ia64_get_rr(start) >> 8) << SH_PTC_0_RID_SHFT) |
-           (1UL << SH_PTC_0_START_SHFT);
-
-       ptc0 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH_PTC_0);
-       ptc1 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH_PTC_1);
+       shub1 = is_shub1();
+       if (shub1) {
+               data0 = (1UL << SH1_PTC_0_A_SHFT) |
+                       (nbits << SH1_PTC_0_PS_SHFT) |
+                       ((ia64_get_rr(start) >> 8) << SH1_PTC_0_RID_SHFT) |
+                       (1UL << SH1_PTC_0_START_SHFT);
+               ptc0 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH1_PTC_0);
+               ptc1 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH1_PTC_1);
+       } else {
+               data0 = (1UL << SH2_PTC_A_SHFT) |
+                       (nbits << SH2_PTC_PS_SHFT) |
+                       (1UL << SH2_PTC_START_SHFT);
+               ptc0 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH2_PTC + 
+                       ((ia64_get_rr(start) >> 8) << SH2_PTC_RID_SHFT) );
+               ptc1 = NULL;
+       }
+       
 
        mynasid = get_nasid();
 
        spin_lock_irqsave(&sn2_global_ptc_lock, flags);
 
        do {
-               data1 = start | (1UL << SH_PTC_1_START_SHFT);
+               if (shub1)
+                       data1 = start | (1UL << SH1_PTC_1_START_SHFT);
+               else
+                       data0 = (data0 & ~SH2_PTC_ADDR_MASK) | (start & 
SH2_PTC_ADDR_MASK);
                for (i = 0; i < nix; i++) {
                        nasid = nasids[i];
-                       if (likely(nasid == mynasid)) {
+                       if (unlikely(nasid == mynasid)) {
                                ia64_ptcga(start, nbits << 2);
                                ia64_srlz_i();
                        } else {
                                ptc0 = CHANGE_NASID(nasid, ptc0);
-                               ptc1 = CHANGE_NASID(nasid, ptc1);
+                               if (ptc1)
+                                       ptc1 = CHANGE_NASID(nasid, ptc1);
                                pio_atomic_phys_write_mmrs(ptc0, data0, ptc1,
                                                           data1);
                                flushed = 1;
@@ -158,8 +172,8 @@
 
                if (flushed
                    && (wait_piowc() &
-                       SH_PIO_WRITE_STATUS_0_WRITE_DEADLOCK_MASK)) {
-                       sn2_ptc_deadlock_recovery(data0, data1);
+                       SH_PIO_WRITE_STATUS_WRITE_DEADLOCK_MASK)) {
+                       sn2_ptc_deadlock_recovery(ptc0, data0, ptc1, data1);
                }
 
                start += (1UL << nbits);
@@ -178,18 +192,19 @@
  * TLB flush transaction.  The recovery sequence is somewhat tricky & is
  * coded in assembly language.
  */
-void sn2_ptc_deadlock_recovery(unsigned long data0, unsigned long data1)
+void sn2_ptc_deadlock_recovery(volatile unsigned long *ptc0, unsigned long 
data0,
+       volatile unsigned long *ptc1, unsigned long data1)
 {
-       extern void sn2_ptc_deadlock_recovery_core(long *, long, long *, long,
-                                                  long *);
+       extern void sn2_ptc_deadlock_recovery_core(volatile unsigned long *, 
unsigned long,
+               volatile unsigned long *, unsigned long, volatile unsigned long 
*, unsigned long);
        int cnode, mycnode, nasid;
-       long *ptc0, *ptc1, *piows;
+       volatile unsigned long *piows;
+       volatile unsigned long zeroval;
 
        sn2_ptc_deadlock_count++;
 
-       ptc0 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH_PTC_0);
-       ptc1 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH_PTC_1);
-       piows = (long *)pda->pio_write_status_addr;
+       piows = pda->pio_write_status_addr;
+       zeroval = pda->pio_write_status_val;
 
        mycnode = numa_node_id();
 
@@ -198,8 +213,9 @@
                        continue;
                nasid = cnodeid_to_nasid(cnode);
                ptc0 = CHANGE_NASID(nasid, ptc0);
-               ptc1 = CHANGE_NASID(nasid, ptc1);
-               sn2_ptc_deadlock_recovery_core(ptc0, data0, ptc1, data1, piows);
+               if (ptc1)
+                       ptc1 = CHANGE_NASID(nasid, ptc1);
+               sn2_ptc_deadlock_recovery_core(ptc0, data0, ptc1, data1, piows, 
zeroval);
        }
 }
 
diff -urN linux/arch/ia64/sn/kernel/sn2/sn_hwperf.c 
linux/arch/ia64/sn/kernel/sn2/sn_hwperf.c
--- linux/arch/ia64/sn/kernel/sn2/sn_hwperf.c   2005/01/13 14:05:27     1.4
+++ linux/arch/ia64/sn/kernel/sn2/sn_hwperf.c   2005/01/25 04:27:58     1.5
@@ -530,8 +530,7 @@
        }
 
 error:
-       if (p)
-               vfree(p);
+       vfree(p);
 
        lock_kernel();
        return r;
@@ -642,7 +641,6 @@
 {
        struct seq_file *seq = file->private_data;
 
-       if (seq->private)
-               vfree(seq->private);
+       vfree(seq->private);
        return seq_release(inode, file);
 }
diff -urN linux/arch/ia64/sn/kernel/sn2/timer.c 
linux/arch/ia64/sn/kernel/sn2/timer.c
--- linux/arch/ia64/sn/kernel/sn2/timer.c       2004/11/15 11:49:17     1.4
+++ linux/arch/ia64/sn/kernel/sn2/timer.c       2005/01/25 04:27:58     1.5
@@ -15,7 +15,6 @@
 #include <asm/hw_irq.h>
 #include <asm/system.h>
 
-#include "shub.h"
 #include <asm/sn/leds.h>
 #include <asm/sn/shub_mmr.h>
 #include <asm/sn/clksupport.h>
@@ -26,12 +25,12 @@
        .drift = -1,
        .shift = 10,
        .mask = (1LL << 55) - 1,
-       .source = TIME_SOURCE_MMIO64,
-       .addr = RTC_COUNTER_ADDR
+       .source = TIME_SOURCE_MMIO64
 };
 
 void __init sn_timer_init(void)
 {
        sn2_interpolator.frequency = sn_rtc_cycles_per_second;
+       sn2_interpolator.addr = RTC_COUNTER_ADDR;
        register_time_interpolator(&sn2_interpolator);
 }
diff -urN linux/arch/ia64/sn/kernel/sn2/timer_interrupt.c 
linux/arch/ia64/sn/kernel/sn2/timer_interrupt.c
--- linux/arch/ia64/sn/kernel/sn2/timer_interrupt.c     2004/10/25 20:44:15     
1.3
+++ linux/arch/ia64/sn/kernel/sn2/timer_interrupt.c     2005/01/25 04:27:58     
1.4
@@ -34,7 +34,6 @@
 
 #include <linux/interrupt.h>
 #include <asm/sn/pda.h>
-#include "shub.h"
 #include <asm/sn/leds.h>
 
 extern void sn_lb_int_war_check(void);
diff -urN linux/arch/ia64/sn/pci/pci_dma.c linux/arch/ia64/sn/pci/pci_dma.c
--- linux/arch/ia64/sn/pci/pci_dma.c    2004/10/25 20:44:15     1.1
+++ linux/arch/ia64/sn/pci/pci_dma.c    2005/01/25 04:27:58     1.2
@@ -475,3 +475,67 @@
 EXPORT_SYMBOL(sn_pci_free_consistent);
 EXPORT_SYMBOL(sn_pci_dma_supported);
 EXPORT_SYMBOL(sn_dma_mapping_error);
+
+char *sn_pci_get_legacy_mem(struct pci_bus *bus)
+{
+       if (!SN_PCIBUS_BUSSOFT(bus))
+               return ERR_PTR(-ENODEV);
+
+       return (char *)(SN_PCIBUS_BUSSOFT(bus)->bs_legacy_mem | 
__IA64_UNCACHED_OFFSET);
+}
+
+int sn_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
+{
+       unsigned long addr;
+       int ret;
+
+       if (!SN_PCIBUS_BUSSOFT(bus))
+               return -ENODEV;
+
+       addr = SN_PCIBUS_BUSSOFT(bus)->bs_legacy_io | __IA64_UNCACHED_OFFSET;
+       addr += port;
+
+       ret = ia64_sn_probe_mem(addr, (long)size, (void *)val);
+
+       if (ret == 2)
+               return -EINVAL;
+
+       if (ret == 1)
+               *val = -1;
+
+       return size;
+}
+
+int sn_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
+{
+       int ret = size;
+       unsigned long paddr;
+       unsigned long *addr;
+
+       if (!SN_PCIBUS_BUSSOFT(bus)) {
+               ret = -ENODEV;
+               goto out;
+       }
+
+       /* Put the phys addr in uncached space */
+       paddr = SN_PCIBUS_BUSSOFT(bus)->bs_legacy_io | __IA64_UNCACHED_OFFSET;
+       paddr += port;
+       addr = (unsigned long *)paddr;
+
+       switch (size) {
+       case 1:
+               *(volatile u8 *)(addr) = (u8)(val);
+               break;
+       case 2:
+               *(volatile u16 *)(addr) = (u16)(val);
+               break;
+       case 4:
+               *(volatile u32 *)(addr) = (u32)(val);
+               break;
+       default:
+               ret = -EINVAL;
+               break;
+       }
+ out:
+       return ret;
+}
diff -urN linux/arch/m32r/kernel/smp.c linux/arch/m32r/kernel/smp.c
--- linux/arch/m32r/kernel/smp.c        2004/10/12 14:36:33     1.2
+++ linux/arch/m32r/kernel/smp.c        2005/01/25 04:27:58     1.3
@@ -38,7 +38,7 @@
  * Structure and data for smp_call_function(). This is designed to minimise
  * static memory requirements. It also looks cleaner.
  */
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
 
 struct call_data_struct {
        void (*func) (void *info);
@@ -53,7 +53,7 @@
 /*
  * For flush_cache_all()
  */
-static spinlock_t flushcache_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(flushcache_lock);
 static volatile unsigned long flushcache_cpumask = 0;
 
 /*
@@ -63,7 +63,7 @@
 static struct mm_struct *flush_mm;
 static struct vm_area_struct *flush_vma;
 static volatile unsigned long flush_va;
-static spinlock_t tlbstate_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tlbstate_lock);
 #define FLUSH_ALL 0xffffffff
 
 DECLARE_PER_CPU(int, prof_multiplier);
diff -urN linux/arch/m32r/kernel/sys_m32r.c linux/arch/m32r/kernel/sys_m32r.c
--- linux/arch/m32r/kernel/sys_m32r.c   2004/10/25 20:44:16     1.3
+++ linux/arch/m32r/kernel/sys_m32r.c   2005/01/25 04:27:58     1.4
@@ -48,7 +48,7 @@
 #else /* CONFIG_SMP */
 #include <linux/spinlock.h>
 
-static spinlock_t tas_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tas_lock);
 
 asmlinkage int sys_tas(int *addr)
 {
diff -urN linux/arch/m32r/kernel/traps.c linux/arch/m32r/kernel/traps.c
--- linux/arch/m32r/kernel/traps.c      2004/10/12 01:45:41     1.1
+++ linux/arch/m32r/kernel/traps.c      2005/01/25 04:27:58     1.2
@@ -223,7 +223,7 @@
        printk("\n");
 }
 
-spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(die_lock);
 
 void die(const char * str, struct pt_regs * regs, long err)
 {
diff -urN linux/arch/m32r/lib/csum_partial_copy.c 
linux/arch/m32r/lib/csum_partial_copy.c
--- linux/arch/m32r/lib/csum_partial_copy.c     2004/10/12 01:45:41     1.1
+++ linux/arch/m32r/lib/csum_partial_copy.c     2005/01/25 04:27:58     1.2
@@ -3,16 +3,16 @@
  *             operating system.  INET is implemented using the  BSD Socket
  *             interface as the means of communication with the user level.
  *
- *             MIPS specific IP/TCP/UDP checksumming routines
+ *             M32R specific IP/TCP/UDP checksumming routines
+ *             (Some code taken from MIPS architecture)
  *
- * Authors:    Ralf Baechle, <ralf@waldorf-gmbh.de>
- *             Lots of code moved from tcp.c and ip.c; see those files
- *             for more names.
+ * 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.
  *
- *             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.
+ * Copyright (C) 1994, 1995  Waldorf Electronics GmbH
+ * Copyright (C) 1998, 1999  Ralf Baechle
+ * Copyright (C) 2001-2005  Hiroyuki Kondo, Hirokazu Takata
  *
  */
 
@@ -27,8 +27,9 @@
 /*
  * Copy while checksumming, otherwise like csum_partial
  */
-unsigned int csum_partial_copy_nocheck (const char *src, char *dst,
-                                        int len, unsigned int sum)
+unsigned int
+csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst,
+                           int len, unsigned int sum)
 {
        sum = csum_partial(src, len, sum);
        memcpy(dst, src, len);
@@ -41,9 +42,10 @@
  * Copy from userspace and compute checksum.  If we catch an exception
  * then zero the rest of the buffer.
  */
-unsigned int csum_partial_copy_from_user (const char __user *src, char *dst,
-                                          int len, unsigned int sum,
-                                          int *err_ptr)
+unsigned int
+csum_partial_copy_from_user (const unsigned char __user *src,
+                            unsigned char *dst,
+                            int len, unsigned int sum, int *err_ptr)
 {
        int missing;
 
diff -urN linux/arch/m68k/Kconfig linux/arch/m68k/Kconfig
--- linux/arch/m68k/Kconfig     2005/01/13 14:05:27     1.27
+++ linux/arch/m68k/Kconfig     2005/01/25 04:27:58     1.28
@@ -385,8 +385,8 @@
        bool "Support for ST-RAM as swap space"
        depends on ATARI && BROKEN
        ---help---
-         Some Atari 68k macines (including the 520STF and 1020STE) divide
-         their addressible memory into ST and TT sections.  The TT section
+         Some Atari 68k machines (including the 520STF and 1020STE) divide
+         their addressable memory into ST and TT sections.  The TT section
          (up to 512MB) is the main memory; the ST section (up to 4MB) is
          accessible to the built-in graphics board, runs slower, and is
          present mainly for backward compatibility with older machines.
diff -urN linux/arch/m68k/atari/stram.c linux/arch/m68k/atari/stram.c
--- linux/arch/m68k/atari/stram.c       2004/06/26 15:15:09     1.38
+++ linux/arch/m68k/atari/stram.c       2005/01/25 04:27:58     1.39
@@ -1033,7 +1033,7 @@
 
 static struct gendisk *stram_disk;
 static struct request_queue *stram_queue;
-static spinlock_t stram_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(stram_lock);
 
 int __init stram_device_init(void)
 {
diff -urN linux/arch/m68k/lib/checksum.c linux/arch/m68k/lib/checksum.c
--- linux/arch/m68k/lib/checksum.c      2004/08/06 00:33:22     1.7
+++ linux/arch/m68k/lib/checksum.c      2005/01/25 04:27:58     1.8
@@ -134,8 +134,8 @@
  */
 
 unsigned int
-csum_partial_copy_from_user(const char *src, char *dst, int len,
-                           int sum, int *csum_err)
+csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst,
+                           int len, int sum, int *csum_err)
 {
        /*
         * GCC doesn't like more than 10 operands for the asm
@@ -326,7 +326,7 @@
  */
 
 unsigned int
-csum_partial_copy_nocheck(const char *src, char *dst, int len, int sum)
+csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst, int 
len, int sum)
 {
        unsigned long tmp1, tmp2;
        __asm__("movel %2,%4\n\t"
diff -urN linux/arch/m68knommu/lib/checksum.c 
linux/arch/m68knommu/lib/checksum.c
--- linux/arch/m68knommu/lib/checksum.c 2005/01/13 14:05:28     1.4
+++ linux/arch/m68knommu/lib/checksum.c 2005/01/25 04:27:58     1.5
@@ -140,7 +140,8 @@
  */
 
 unsigned int
-csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int 
*csum_err)
+csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst,
+                           int len, int sum, int *csum_err)
 {
        if (csum_err) *csum_err = 0;
        memcpy(dst, src, len);
@@ -152,7 +153,7 @@
  */
 
 unsigned int
-csum_partial_copy(const char *src, char *dst, int len, int sum)
+csum_partial_copy(const unsigned char *src, unsigned char *dst, int len, int 
sum)
 {
        memcpy(dst, src, len);
        return csum_partial(dst, len, sum);
diff -urN linux/arch/mips/defconfig linux/arch/mips/defconfig
--- linux/arch/mips/defconfig   2005/01/13 14:05:28     1.276
+++ linux/arch/mips/defconfig   2005/01/25 04:27:58     1.277
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:41 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:58:08 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -187,6 +187,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -691,6 +692,7 @@
 # CONFIG_LOGO_LINUX_VGA16 is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
 CONFIG_LOGO_SGI_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -952,7 +954,7 @@
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
-# CONFIG_CRC32 is not set
+CONFIG_CRC32=m
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
diff -urN linux/arch/mips/configs/atlas_defconfig 
linux/arch/mips/configs/atlas_defconfig
--- linux/arch/mips/configs/atlas_defconfig     2005/01/24 11:19:51     1.39
+++ linux/arch/mips/configs/atlas_defconfig     2005/01/25 04:27:59     1.40
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Mon Jan 24 11:17:58 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:58:12 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -192,6 +192,7 @@
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 CONFIG_BLK_DEV_UMEM=m
+# CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
@@ -844,6 +845,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/capcella_defconfig 
linux/arch/mips/configs/capcella_defconfig
--- linux/arch/mips/configs/capcella_defconfig  2005/01/13 14:05:28     1.40
+++ linux/arch/mips/configs/capcella_defconfig  2005/01/25 04:27:59     1.41
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:42 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:58:16 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -192,6 +192,7 @@
 # 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 is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -540,6 +541,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/cobalt_defconfig 
linux/arch/mips/configs/cobalt_defconfig
--- linux/arch/mips/configs/cobalt_defconfig    2005/01/13 14:05:28     1.37
+++ linux/arch/mips/configs/cobalt_defconfig    2005/01/25 04:27:59     1.38
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:42 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:58:19 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -181,6 +181,7 @@
 # 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
@@ -514,6 +515,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/db1000_defconfig 
linux/arch/mips/configs/db1000_defconfig
--- linux/arch/mips/configs/db1000_defconfig    2005/01/13 14:05:28     1.41
+++ linux/arch/mips/configs/db1000_defconfig    2005/01/25 04:27:59     1.42
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:42 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:58:22 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -199,6 +199,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD 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
@@ -521,6 +522,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/db1100_defconfig 
linux/arch/mips/configs/db1100_defconfig
--- linux/arch/mips/configs/db1100_defconfig    2005/01/13 14:05:28     1.39
+++ linux/arch/mips/configs/db1100_defconfig    2005/01/25 04:27:59     1.40
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:47 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:58:26 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -197,6 +197,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD 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
@@ -516,6 +517,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/db1500_defconfig 
linux/arch/mips/configs/db1500_defconfig
--- linux/arch/mips/configs/db1500_defconfig    2005/01/13 14:05:28     1.43
+++ linux/arch/mips/configs/db1500_defconfig    2005/01/25 04:27:59     1.44
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:47 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:58:38 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -283,6 +283,7 @@
 # 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
@@ -647,6 +648,7 @@
 # Graphics support
 #
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -784,6 +786,7 @@
 # CONFIG_USB_CYTHERM is not set
 # CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
+# CONFIG_USB_IDMOUSE is not set
 
 #
 # USB ATM/DSL drivers
diff -urN linux/arch/mips/configs/db1550_defconfig 
linux/arch/mips/configs/db1550_defconfig
--- linux/arch/mips/configs/db1550_defconfig    2005/01/13 14:05:28     1.18
+++ linux/arch/mips/configs/db1550_defconfig    2005/01/25 04:27:59     1.19
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:49 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:58:44 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -287,6 +287,7 @@
 # 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
@@ -687,6 +688,7 @@
 # Graphics support
 #
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/ddb5476_defconfig 
linux/arch/mips/configs/ddb5476_defconfig
--- linux/arch/mips/configs/ddb5476_defconfig   2005/01/13 14:05:28     1.37
+++ linux/arch/mips/configs/ddb5476_defconfig   2005/01/25 04:27:59     1.38
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:50 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:58:50 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -186,6 +186,7 @@
 # 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 is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -563,6 +564,7 @@
 # Logo configuration
 #
 # CONFIG_LOGO is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/ddb5477_defconfig 
linux/arch/mips/configs/ddb5477_defconfig
--- linux/arch/mips/configs/ddb5477_defconfig   2005/01/13 14:05:28     1.37
+++ linux/arch/mips/configs/ddb5477_defconfig   2005/01/25 04:27:59     1.38
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:51 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:58:54 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -182,6 +182,7 @@
 # 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 is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -515,6 +516,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/decstation_defconfig 
linux/arch/mips/configs/decstation_defconfig
--- linux/arch/mips/configs/decstation_defconfig        2005/01/13 14:05:28     
1.37
+++ linux/arch/mips/configs/decstation_defconfig        2005/01/25 04:27:59     
1.38
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:52 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:58:57 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -177,6 +177,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -488,6 +489,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/e55_defconfig 
linux/arch/mips/configs/e55_defconfig
--- linux/arch/mips/configs/e55_defconfig       2005/01/13 14:05:28     1.39
+++ linux/arch/mips/configs/e55_defconfig       2005/01/25 04:27:59     1.40
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:54 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:00 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -186,6 +186,7 @@
 #
 # CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_XD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -520,6 +521,7 @@
 # CONFIG_VGA_CONSOLE is not set
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/ev64120_defconfig 
linux/arch/mips/configs/ev64120_defconfig
--- linux/arch/mips/configs/ev64120_defconfig   2005/01/13 14:05:28     1.36
+++ linux/arch/mips/configs/ev64120_defconfig   2005/01/25 04:27:59     1.37
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:54 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:02 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -190,6 +190,7 @@
 # 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 is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -509,6 +510,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/ev96100_defconfig 
linux/arch/mips/configs/ev96100_defconfig
--- linux/arch/mips/configs/ev96100_defconfig   2005/01/13 14:05:28     1.37
+++ linux/arch/mips/configs/ev96100_defconfig   2005/01/25 04:27:59     1.38
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:56 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:05 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -185,6 +185,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -464,6 +465,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/ip22_defconfig 
linux/arch/mips/configs/ip22_defconfig
--- linux/arch/mips/configs/ip22_defconfig      2005/01/13 14:05:28     1.46
+++ linux/arch/mips/configs/ip22_defconfig      2005/01/25 04:27:59     1.47
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:58 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:09 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -187,6 +187,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -691,6 +692,7 @@
 # CONFIG_LOGO_LINUX_VGA16 is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
 CONFIG_LOGO_SGI_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -952,7 +954,7 @@
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
-# CONFIG_CRC32 is not set
+CONFIG_CRC32=m
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
diff -urN linux/arch/mips/configs/ip27_defconfig 
linux/arch/mips/configs/ip27_defconfig
--- linux/arch/mips/configs/ip27_defconfig      2005/01/13 14:05:28     1.49
+++ linux/arch/mips/configs/ip27_defconfig      2005/01/25 04:27:59     1.50
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:41:58 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:12 2005
 #
 CONFIG_MIPS=y
 CONFIG_MIPS64=y
@@ -203,6 +203,7 @@
 # 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=m
 # CONFIG_BLK_DEV_NBD is not set
@@ -610,6 +611,7 @@
 # Graphics support
 #
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/ip32_defconfig 
linux/arch/mips/configs/ip32_defconfig
--- linux/arch/mips/configs/ip32_defconfig      2005/01/13 14:05:29     1.40
+++ linux/arch/mips/configs/ip32_defconfig      2005/01/25 04:27:59     1.41
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:00 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:16 2005
 #
 CONFIG_MIPS=y
 CONFIG_MIPS64=y
@@ -191,6 +191,7 @@
 # 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
@@ -575,6 +576,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/it8172_defconfig 
linux/arch/mips/configs/it8172_defconfig
--- linux/arch/mips/configs/it8172_defconfig    2005/01/13 14:05:29     1.36
+++ linux/arch/mips/configs/it8172_defconfig    2005/01/25 04:27:59     1.37
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:02 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:27 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -251,6 +251,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD 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
@@ -556,6 +557,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/ivr_defconfig 
linux/arch/mips/configs/ivr_defconfig
--- linux/arch/mips/configs/ivr_defconfig       2005/01/13 14:05:29     1.36
+++ linux/arch/mips/configs/ivr_defconfig       2005/01/25 04:27:59     1.37
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:03 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:32 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -187,6 +187,7 @@
 # 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 is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -523,6 +524,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/jaguar-atx_defconfig 
linux/arch/mips/configs/jaguar-atx_defconfig
--- linux/arch/mips/configs/jaguar-atx_defconfig        2005/01/13 14:05:29     
1.41
+++ linux/arch/mips/configs/jaguar-atx_defconfig        2005/01/25 04:27:59     
1.42
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:05 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:36 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -188,6 +188,7 @@
 # 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_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -476,6 +477,7 @@
 # Graphics support
 #
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/jmr3927_defconfig 
linux/arch/mips/configs/jmr3927_defconfig
--- linux/arch/mips/configs/jmr3927_defconfig   2005/01/13 14:05:29     1.36
+++ linux/arch/mips/configs/jmr3927_defconfig   2005/01/25 04:27:59     1.37
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:05 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:41 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -180,6 +180,7 @@
 # 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 is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -536,6 +537,7 @@
 # Logo configuration
 #
 # CONFIG_LOGO is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/lasat200_defconfig 
linux/arch/mips/configs/lasat200_defconfig
--- linux/arch/mips/configs/lasat200_defconfig  2005/01/13 14:05:29     1.37
+++ linux/arch/mips/configs/lasat200_defconfig  2005/01/25 04:27:59     1.38
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:07 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:46 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -262,6 +262,7 @@
 # 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 is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -621,6 +622,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/malta_defconfig 
linux/arch/mips/configs/malta_defconfig
--- linux/arch/mips/configs/malta_defconfig     2005/01/24 03:55:50     1.38
+++ linux/arch/mips/configs/malta_defconfig     2005/01/25 04:27:59     1.39
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Mon Jan 24 00:59:59 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:52 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -194,6 +194,7 @@
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 CONFIG_BLK_DEV_UMEM=m
+# CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
@@ -872,6 +873,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/mpc30x_defconfig 
linux/arch/mips/configs/mpc30x_defconfig
--- linux/arch/mips/configs/mpc30x_defconfig    2005/01/13 14:05:29     1.41
+++ linux/arch/mips/configs/mpc30x_defconfig    2005/01/25 04:27:59     1.42
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:11 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 02:59:56 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -192,6 +192,7 @@
 # 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 is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -506,6 +507,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/ocelot_3_defconfig 
linux/arch/mips/configs/ocelot_3_defconfig
--- linux/arch/mips/configs/ocelot_3_defconfig  2005/01/13 14:05:29     1.9
+++ linux/arch/mips/configs/ocelot_3_defconfig  2005/01/25 04:27:59     1.10
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:13 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:00:02 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -197,6 +197,7 @@
 # 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
@@ -663,6 +664,7 @@
 CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/ocelot_c_defconfig 
linux/arch/mips/configs/ocelot_c_defconfig
--- linux/arch/mips/configs/ocelot_c_defconfig  2005/01/13 14:05:29     1.35
+++ linux/arch/mips/configs/ocelot_c_defconfig  2005/01/25 04:27:59     1.36
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:13 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:00:07 2005
 #
 CONFIG_MIPS=y
 CONFIG_MIPS64=y
@@ -187,6 +187,7 @@
 # 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 is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -499,6 +500,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/ocelot_defconfig 
linux/arch/mips/configs/ocelot_defconfig
--- linux/arch/mips/configs/ocelot_defconfig    2005/01/13 14:05:29     1.37
+++ linux/arch/mips/configs/ocelot_defconfig    2005/01/25 04:27:59     1.38
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:14 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:00:11 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -182,6 +182,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -460,6 +461,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/ocelot_g_defconfig 
linux/arch/mips/configs/ocelot_g_defconfig
--- linux/arch/mips/configs/ocelot_g_defconfig  2005/01/13 14:05:29     1.30
+++ linux/arch/mips/configs/ocelot_g_defconfig  2005/01/25 04:27:59     1.31
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:15 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:00:16 2005
 #
 CONFIG_MIPS=y
 CONFIG_MIPS64=y
@@ -190,6 +190,7 @@
 # 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 is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -502,6 +503,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/osprey_defconfig 
linux/arch/mips/configs/osprey_defconfig
--- linux/arch/mips/configs/osprey_defconfig    2005/01/13 14:05:29     1.36
+++ linux/arch/mips/configs/osprey_defconfig    2005/01/25 04:27:59     1.37
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:17 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:00:37 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -175,6 +175,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -454,6 +455,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/pb1100_defconfig 
linux/arch/mips/configs/pb1100_defconfig
--- linux/arch/mips/configs/pb1100_defconfig    2005/01/13 14:05:29     1.37
+++ linux/arch/mips/configs/pb1100_defconfig    2005/01/25 04:27:59     1.38
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:18 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:00:47 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -271,6 +271,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD 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
@@ -582,6 +583,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/pb1500_defconfig 
linux/arch/mips/configs/pb1500_defconfig
--- linux/arch/mips/configs/pb1500_defconfig    2005/01/13 14:05:29     1.43
+++ linux/arch/mips/configs/pb1500_defconfig    2005/01/25 04:27:59     1.44
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:19 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:00:59 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -212,6 +212,7 @@
 # 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
@@ -612,6 +613,7 @@
 # Graphics support
 #
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/pb1550_defconfig 
linux/arch/mips/configs/pb1550_defconfig
--- linux/arch/mips/configs/pb1550_defconfig    2005/01/13 14:05:29     1.33
+++ linux/arch/mips/configs/pb1550_defconfig    2005/01/25 04:27:59     1.34
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:22 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:01:03 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -212,6 +212,7 @@
 # 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
@@ -604,6 +605,7 @@
 # Graphics support
 #
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/rm200_defconfig 
linux/arch/mips/configs/rm200_defconfig
--- linux/arch/mips/configs/rm200_defconfig     2005/01/13 14:05:29     1.46
+++ linux/arch/mips/configs/rm200_defconfig     2005/01/25 04:27:59     1.47
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:26 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:01:10 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -239,6 +239,7 @@
 # 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=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
@@ -918,6 +919,7 @@
 CONFIG_VGA_CONSOLE=y
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -1106,6 +1108,7 @@
 CONFIG_USB_CYTHERM=m
 CONFIG_USB_PHIDGETKIT=m
 CONFIG_USB_PHIDGETSERVO=m
+# CONFIG_USB_IDMOUSE is not set
 CONFIG_USB_TEST=m
 
 #
diff -urN linux/arch/mips/configs/sb1250-swarm_defconfig 
linux/arch/mips/configs/sb1250-swarm_defconfig
--- linux/arch/mips/configs/sb1250-swarm_defconfig      2005/01/13 14:05:29     
1.42
+++ linux/arch/mips/configs/sb1250-swarm_defconfig      2005/01/25 04:27:59     
1.43
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:26 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:01:14 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -219,6 +219,7 @@
 # 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 is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -542,6 +543,7 @@
 # Graphics support
 #
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/sead_defconfig 
linux/arch/mips/configs/sead_defconfig
--- linux/arch/mips/configs/sead_defconfig      2005/01/13 14:05:29     1.34
+++ linux/arch/mips/configs/sead_defconfig      2005/01/25 04:27:59     1.35
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:27 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:01:23 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -171,6 +171,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD 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_RAM=y
@@ -350,6 +351,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/tb0226_defconfig 
linux/arch/mips/configs/tb0226_defconfig
--- linux/arch/mips/configs/tb0226_defconfig    2005/01/13 14:05:29     1.39
+++ linux/arch/mips/configs/tb0226_defconfig    2005/01/25 04:27:59     1.40
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:28 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:01:26 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -183,6 +183,7 @@
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=m
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 CONFIG_BLK_DEV_NBD=m
@@ -537,6 +538,7 @@
 # Logo configuration
 #
 # CONFIG_LOGO is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/tb0229_defconfig 
linux/arch/mips/configs/tb0229_defconfig
--- linux/arch/mips/configs/tb0229_defconfig    2005/01/13 14:05:29     1.42
+++ linux/arch/mips/configs/tb0229_defconfig    2005/01/25 04:27:59     1.43
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:31 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:01:30 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -193,6 +193,7 @@
 # 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=m
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 CONFIG_BLK_DEV_NBD=m
@@ -544,6 +545,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/workpad_defconfig 
linux/arch/mips/configs/workpad_defconfig
--- linux/arch/mips/configs/workpad_defconfig   2005/01/13 14:05:29     1.39
+++ linux/arch/mips/configs/workpad_defconfig   2005/01/25 04:27:59     1.40
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:31 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:01:32 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -186,6 +186,7 @@
 #
 # CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_XD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -520,6 +521,7 @@
 # CONFIG_VGA_CONSOLE is not set
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/configs/yosemite_defconfig 
linux/arch/mips/configs/yosemite_defconfig
--- linux/arch/mips/configs/yosemite_defconfig  2005/01/13 14:05:29     1.41
+++ linux/arch/mips/configs/yosemite_defconfig  2005/01/25 04:27:59     1.42
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Wed Jan 12 22:42:31 2005
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 03:01:35 2005
 #
 CONFIG_MIPS=y
 # CONFIG_MIPS64 is not set
@@ -187,6 +187,7 @@
 # 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_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
@@ -458,6 +459,7 @@
 # Graphics support
 #
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
diff -urN linux/arch/mips/kernel/irixelf.c linux/arch/mips/kernel/irixelf.c
--- linux/arch/mips/kernel/irixelf.c    2005/01/13 14:05:30     1.61
+++ linux/arch/mips/kernel/irixelf.c    2005/01/25 04:28:00     1.62
@@ -128,7 +128,9 @@
        end = PAGE_ALIGN(end);
        if (end <= start)
                return;
+       down_write(&current->mm->mmap_sem);
        do_brk(start, end - start);
+       up_write(&current->mm->mmap_sem);
 }
 
 
@@ -376,7 +378,9 @@
 
        /* Map the last of the bss segment */
        if (last_bss > len) {
+               down_write(&current->mm->mmap_sem);
                do_brk(len, (last_bss - len));
+               up_write(&current->mm->mmap_sem);
        }
        kfree(elf_phdata);
 
@@ -563,7 +567,9 @@
        unsigned long v;
        struct prda *pp;
 
+       down_write(&current->mm->mmap_sem);
        v =  do_brk (PRDA_ADDRESS, PAGE_SIZE);
+       up_write(&current->mm->mmap_sem);
 
        if (v < 0)
                return;
@@ -854,8 +860,11 @@
 
        len = (elf_phdata->p_filesz + elf_phdata->p_vaddr+ 0xfff) & 0xfffff000;
        bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
-       if (bss > len)
+       if (bss > len) {
+         down_write(&current->mm->mmap_sem);
          do_brk(len, bss-len);
+         up_write(&current->mm->mmap_sem);
+       }
        kfree(elf_phdata);
        return 0;
 }
diff -urN linux/arch/mips/kernel/irixsig.c linux/arch/mips/kernel/irixsig.c
--- linux/arch/mips/kernel/irixsig.c    2005/01/13 14:05:30     1.44
+++ linux/arch/mips/kernel/irixsig.c    2005/01/25 04:28:00     1.45
@@ -13,7 +13,6 @@
 #include <linux/smp_lock.h>
 #include <linux/time.h>
 #include <linux/ptrace.h>
-#include <linux/suspend.h>
 
 #include <asm/ptrace.h>
 #include <asm/uaccess.h>
@@ -179,10 +178,8 @@
        if (!user_mode(regs))
                return 1;
 
-       if (current->flags & PF_FREEZE) {
-               refrigerator(0);
+       if (try_to_freeze(0))
                goto no_signal;
-       }
 
        if (!oldset)
                oldset = &current->blocked;
diff -urN linux/arch/mips/kernel/scall64-n32.S 
linux/arch/mips/kernel/scall64-n32.S
--- linux/arch/mips/kernel/scall64-n32.S        2005/01/13 14:05:30     1.24
+++ linux/arch/mips/kernel/scall64-n32.S        2005/01/25 04:28:00     1.25
@@ -243,7 +243,7 @@
        PTR     sys_capget
        PTR     sys_capset
        PTR     sys32_rt_sigpending             /* 6125 */
-       PTR     compat_rt_sigtimedwait
+       PTR     compat_sys_rt_sigtimedwait
        PTR     sys32_rt_sigqueueinfo
        PTR     sys32_rt_sigsuspend
        PTR     sys32_sigaltstack
diff -urN linux/arch/mips/kernel/scall64-o32.S 
linux/arch/mips/kernel/scall64-o32.S
--- linux/arch/mips/kernel/scall64-o32.S        2005/01/13 14:05:30     1.31
+++ linux/arch/mips/kernel/scall64-o32.S        2005/01/25 04:28:00     1.32
@@ -399,7 +399,7 @@
        PTR     sys32_rt_sigaction
        PTR     sys32_rt_sigprocmask            /* 4195 */
        PTR     sys32_rt_sigpending
-       PTR     compat_rt_sigtimedwait
+       PTR     compat_sys_rt_sigtimedwait
        PTR     sys32_rt_sigqueueinfo
        PTR     sys32_rt_sigsuspend
        PTR     sys32_pread                     /* 4200 */
diff -urN linux/arch/mips/kernel/signal.c linux/arch/mips/kernel/signal.c
--- linux/arch/mips/kernel/signal.c     2005/01/09 12:03:49     1.87
+++ linux/arch/mips/kernel/signal.c     2005/01/25 04:28:00     1.88
@@ -18,7 +18,6 @@
 #include <linux/errno.h>
 #include <linux/wait.h>
 #include <linux/ptrace.h>
-#include <linux/suspend.h>
 #include <linux/unistd.h>
 #include <linux/compiler.h>
 
@@ -458,10 +457,8 @@
        if (!user_mode(regs))
                return 1;
 
-       if (current->flags & PF_FREEZE) {
-               refrigerator(0);
+       if (try_to_freeze(0))
                goto no_signal;
-       }
 
        if (!oldset)
                oldset = &current->blocked;
diff -urN linux/arch/mips/kernel/signal32.c linux/arch/mips/kernel/signal32.c
--- linux/arch/mips/kernel/signal32.c   2005/01/13 14:05:30     1.21
+++ linux/arch/mips/kernel/signal32.c   2005/01/25 04:28:00     1.22
@@ -777,10 +777,8 @@
        if (!user_mode(regs))
                return 1;
 
-       if (current->flags & PF_FREEZE) {
-               refrigerator(0);
+       if (try_to_freeze(0))
                goto no_signal;
-       }
 
        if (!oldset)
                oldset = &current->blocked;
diff -urN linux/arch/mips/lib/csum_partial_copy.c 
linux/arch/mips/lib/csum_partial_copy.c
--- linux/arch/mips/lib/csum_partial_copy.c     2004/11/24 11:56:33     1.9
+++ linux/arch/mips/lib/csum_partial_copy.c     2005/01/25 04:28:00     1.10
@@ -16,8 +16,8 @@
 /*
  * copy while checksumming, otherwise like csum_partial
  */
-unsigned int csum_partial_copy_nocheck(const char *src, char *dst,
-       int len, unsigned int sum)
+unsigned int csum_partial_copy_nocheck(const unsigned char *src,
+       unsigned char *dst, int len, unsigned int sum)
 {
        /*
         * It's 2:30 am and I don't feel like doing it real ...
@@ -33,8 +33,8 @@
  * Copy from userspace and compute checksum.  If we catch an exception
  * then zero the rest of the buffer.
  */
-unsigned int csum_partial_copy_from_user (const char *src, char *dst,
-       int len, unsigned int sum, int *err_ptr)
+unsigned int csum_partial_copy_from_user (const unsigned char *src,
+       unsigned char *dst, int len, unsigned int sum, int *err_ptr)
 {
        int missing;
 
diff -urN linux/arch/parisc/Kconfig linux/arch/parisc/Kconfig
--- linux/arch/parisc/Kconfig   2005/01/13 14:05:31     1.25
+++ linux/arch/parisc/Kconfig   2005/01/25 04:28:00     1.26
@@ -39,6 +39,12 @@
 config GENERIC_ISA_DMA
        bool
 
+config GENERIC_HARDIRQS
+       def_bool y
+
+config GENERIC_IRQ_PROBE
+       def_bool y
+
 # unless you want to implement ACPI on PA-RISC ... ;-)
 config PM
        bool
diff -urN linux/arch/parisc/configs/712_defconfig 
linux/arch/parisc/configs/712_defconfig
--- linux/arch/parisc/configs/712_defconfig     2004/06/06 02:12:39     1.3
+++ linux/arch/parisc/configs/712_defconfig     2005/01/25 04:28:00     1.4
@@ -1,5 +1,7 @@
 #
 # Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-pa5
+# Wed Jan  5 13:20:32 2005
 #
 CONFIG_PARISC=y
 CONFIG_MMU=y
@@ -9,37 +11,50 @@
 #
 # Code maturity level options
 #
-# CONFIG_EXPERIMENTAL is not set
-CONFIG_CLEAN_COMPILE=y
-CONFIG_STANDALONE=y
+CONFIG_EXPERIMENTAL=y
+# CONFIG_CLEAN_COMPILE is not set
+CONFIG_BROKEN=y
 CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
 #
+CONFIG_LOCALVERSION=""
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=15
-# CONFIG_HOTPLUG is not set
-# CONFIG_IKCONFIG is not set
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_HOTPLUG=y
+CONFIG_KOBJECT_UEVENT=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE 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_TINY_SHMEM is not set
 
 #
 # Loadable module support
 #
 CONFIG_MODULES=y
-# CONFIG_MODULE_UNLOAD is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_OBSOLETE_MODPARM=y
-# CONFIG_KMOD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
 
 #
 # Processor type and features
@@ -47,10 +62,12 @@
 # CONFIG_PA7000 is not set
 CONFIG_PA7100LC=y
 # CONFIG_PA7200 is not set
+# CONFIG_PA7300LC is not set
 # CONFIG_PA8X00 is not set
 CONFIG_PA11=y
 # CONFIG_64BIT is not set
 # CONFIG_SMP is not set
+# CONFIG_DISCONTIGMEM is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_HPUX is not set
 
@@ -61,17 +78,30 @@
 # CONFIG_HPPB is not set
 # CONFIG_IOMMU_CCIO is not set
 CONFIG_GSC_LASI=y
-CONFIG_GSC_WAX=y
+# CONFIG_GSC_WAX is not set
 # CONFIG_EISA is not set
 # CONFIG_PCI is not set
-# CONFIG_CHASSIS_LCD_LED is not set
+CONFIG_CHASSIS_LCD_LED=y
 # CONFIG_PDC_CHASSIS is not set
 
 #
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PC-card bridges
+#
+
+#
+# PCI Hotplug Support
+#
+
+#
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_MISC is not set
+CONFIG_BINFMT_MISC=m
 
 #
 # Device Drivers
@@ -80,7 +110,10 @@
 #
 # Generic Driver Options
 #
-CONFIG_DEBUG_DRIVER=y
+# CONFIG_STANDALONE is not set
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -91,9 +124,10 @@
 # Parallel port support
 #
 CONFIG_PARPORT=y
-CONFIG_PARPORT_PC=y
-CONFIG_PARPORT_PC_CML1=y
-# CONFIG_PARPORT_SERIAL is not set
+CONFIG_PARPORT_PC=m
+CONFIG_PARPORT_PC_CML1=m
+# CONFIG_PARPORT_PC_FIFO is not set
+# CONFIG_PARPORT_PC_SUPERIO is not set
 CONFIG_PARPORT_GSC=y
 # CONFIG_PARPORT_OTHER is not set
 # CONFIG_PARPORT_1284 is not set
@@ -110,7 +144,20 @@
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_CRYPTOLOOP=y
 # CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_RAM is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=6144
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -137,7 +184,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 # CONFIG_SCSI_MULTI_LUN is not set
-# CONFIG_SCSI_REPORT_LUNS is not set
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
 
@@ -145,31 +191,33 @@
 # SCSI Transport Attributes
 #
 CONFIG_SCSI_SPI_ATTRS=y
-CONFIG_SCSI_FC_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
 
 #
 # SCSI low-level drivers
 #
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_PPA is not set
 # CONFIG_SCSI_IMM is not set
 CONFIG_SCSI_LASI700=y
 CONFIG_53C700_MEM_MAPPED=y
 CONFIG_53C700_LE_ON_BE=y
 # CONFIG_SCSI_ZALON is not set
-# CONFIG_SCSI_DEBUG is not set
+CONFIG_SCSI_DEBUG=m
 
 #
 # Multi-device support (RAID and LVM)
 #
 CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=y
-CONFIG_MD_RAID0=y
-CONFIG_MD_RAID1=y
-CONFIG_MD_RAID5=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+# CONFIG_MD_RAID10 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_MD_RAID6 is not set
 # CONFIG_MD_MULTIPATH is not set
+# CONFIG_MD_FAULTY is not set
 # CONFIG_BLK_DEV_DM is not set
 
 #
@@ -197,49 +245,151 @@
 CONFIG_PACKET_MMAP=y
 CONFIG_NETLINK_DEV=y
 CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
+CONFIG_NET_KEY=m
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 # CONFIG_IP_PNP_RARP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
 # CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
 # CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
 # CONFIG_INET_IPCOMP is not set
-# CONFIG_DECNET is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+# CONFIG_IPV6 is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=m
+# CONFIG_IP_NF_CT_ACCT is not set
+CONFIG_IP_NF_CONNTRACK_MARK=y
+CONFIG_IP_NF_CT_PROTO_SCTP=m
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
+CONFIG_IP_NF_TFTP=m
+CONFIG_IP_NF_AMANDA=m
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_LIMIT=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
+CONFIG_IP_NF_MATCH_MARK=m
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
+CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
+CONFIG_IP_NF_MATCH_OWNER=m
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+# CONFIG_IP_NF_MATCH_REALM is not set
+CONFIG_IP_NF_MATCH_SCTP=m
+CONFIG_IP_NF_MATCH_COMMENT=m
+CONFIG_IP_NF_MATCH_CONNMARK=m
+CONFIG_IP_NF_MATCH_HASHLIMIT=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_SAME=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+CONFIG_IP_NF_NAT_SNMP_BASIC=m
+CONFIG_IP_NF_NAT_IRC=m
+CONFIG_IP_NF_NAT_FTP=m
+CONFIG_IP_NF_NAT_TFTP=m
+CONFIG_IP_NF_NAT_AMANDA=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_DSCP=m
+CONFIG_IP_NF_TARGET_MARK=m
+CONFIG_IP_NF_TARGET_CLASSIFY=m
+CONFIG_IP_NF_TARGET_CONNMARK=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_TARGET_NOTRACK=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
-# CONFIG_NETFILTER is not set
 # CONFIG_VLAN_8021Q is not set
-# CONFIG_LLC2 is not set
+# CONFIG_DECNET is not set
+CONFIG_LLC=m
+CONFIG_LLC2=m
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
 
 #
 # QoS and/or fair queueing
 #
 # CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
 
 #
 # Network testing
 #
-# CONFIG_NET_PKTGEN is not set
+CONFIG_NET_PKTGEN=m
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
 # CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
+CONFIG_TUN=m
+# CONFIG_ETHERTAP is not set
 
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
+CONFIG_MII=m
 CONFIG_LASI_82596=y
 
 #
@@ -249,14 +399,10 @@
 #
 # Ethernet (10000 Mbit)
 #
-# CONFIG_PLIP is not set
-CONFIG_PPP=y
-# CONFIG_PPP_FILTER is not set
-# CONFIG_PPP_ASYNC is not set
-# CONFIG_PPP_SYNC_TTY is not set
-# CONFIG_PPP_DEFLATE is not set
-# CONFIG_PPP_BSDCOMP is not set
-# CONFIG_SLIP is not set
+
+#
+# Token Ring devices
+#
 
 #
 # Wireless LAN (non-hamradio)
@@ -267,32 +413,24 @@
 # Obsolete Wireless cards support (pre-802.11)
 #
 # CONFIG_STRIP is not set
-
-#
-# Token Ring devices
-#
+# CONFIG_ATMEL is not set
 
 #
 # Wan interfaces
 #
 # CONFIG_WAN is not set
-
-#
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
-#
-# CONFIG_IRDA is not set
-
-#
-# Bluetooth support
-#
-# CONFIG_BT is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_PLIP is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPPOE=m
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
 
 #
 # ISDN subsystem
@@ -318,7 +456,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVDEV is not set
 # CONFIG_INPUT_EVBUG is not set
 
 #
@@ -327,33 +465,33 @@
 # CONFIG_GAMEPORT is not set
 CONFIG_SOUND_GAMEPORT=y
 CONFIG_SERIO=y
-# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PARKBD is not set
 CONFIG_SERIO_GSCPS2=y
-# CONFIG_HP_SDC is not set
+CONFIG_HP_SDC=y
+CONFIG_HIL_MLC=y
+# CONFIG_SERIO_RAW is not set
 
 #
 # Input Device Drivers
 #
 CONFIG_INPUT_KEYBOARD=y
-# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_ATKBD_HP_KEYCODES=y
+# CONFIG_KEYBOARD_ATKBD_RDI_KEYCODES is not set
 # CONFIG_KEYBOARD_SUNKBD is not set
 # CONFIG_KEYBOARD_LKKBD is not set
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
-# CONFIG_KEYBOARD_HIL_OLD is not set
 # CONFIG_KEYBOARD_HIL is not set
 CONFIG_INPUT_MOUSE=y
-# CONFIG_MOUSE_PS2 is not set
-# CONFIG_MOUSE_SERIAL is not set
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_VSXXXAA is not set
-# CONFIG_MOUSE_HIL is not set
+CONFIG_MOUSE_HIL=m
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-# CONFIG_INPUT_PCSPKR is not set
-# CONFIG_INPUT_UINPUT is not set
-# CONFIG_HP_SDC_RTC is not set
+# CONFIG_INPUT_MISC is not set
 
 #
 # Character devices
@@ -368,7 +506,7 @@
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_NR_UARTS=8
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
@@ -380,17 +518,16 @@
 # Non-8250 serial port support
 #
 # CONFIG_SERIAL_MUX is not set
-# CONFIG_PDC_CONSOLE is not set
+CONFIG_PDC_CONSOLE=y
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=y
+CONFIG_LEGACY_PTY_COUNT=64
+CONFIG_PRINTER=m
 # CONFIG_LP_CONSOLE is not set
-# CONFIG_PPDEV is not set
+CONFIG_PPDEV=m
 # CONFIG_TIPAR is not set
-# CONFIG_QIC02_TAPE is not set
 
 #
 # IPMI
@@ -402,18 +539,17 @@
 #
 # CONFIG_WATCHDOG is not set
 CONFIG_GEN_RTC=y
-# CONFIG_GEN_RTC_X is not set
+CONFIG_GEN_RTC_X=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
 
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
-# CONFIG_RAW_DRIVER is not set
+CONFIG_RAW_DRIVER=y
+CONFIG_MAX_RAW_DEVS=256
 
 #
 # I2C support
@@ -421,6 +557,11 @@
 # CONFIG_I2C is not set
 
 #
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
 # Misc devices
 #
 
@@ -438,40 +579,86 @@
 # Graphics support
 #
 CONFIG_FB=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
 CONFIG_FB_STI=y
 # CONFIG_FB_VIRTUAL is not set
 
 #
 # Console display driver support
 #
-# CONFIG_MDA_CONSOLE is not set
 CONFIG_STI_CONSOLE=y
-CONFIG_DUMMY_CONSOLE_COLUMNS=160
-CONFIG_DUMMY_CONSOLE_ROWS=64
+CONFIG_DUMMY_CONSOLE_COLUMNS=128
+CONFIG_DUMMY_CONSOLE_ROWS=48
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
-# CONFIG_FONTS is not set
+CONFIG_FONTS=y
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
 
 #
 # Logo configuration
 #
 CONFIG_LOGO=y
-CONFIG_LOGO_LINUX_MONO=y
-CONFIG_LOGO_LINUX_VGA16=y
-CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
 CONFIG_LOGO_PARISC_CLUT224=y
 
 #
 # Sound
 #
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_SEQUENCER=y
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# GSC devices
+#
+CONFIG_SND_HARMONY=y
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
 
 #
 # USB support
 #
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; 
see USB_STORAGE Help for more information
+#
 
 #
 # USB Gadget Support
@@ -479,6 +666,11 @@
 # CONFIG_USB_GADGET is not set
 
 #
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -488,13 +680,22 @@
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 # CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-# CONFIG_XFS_FS is not set
+CONFIG_JFS_FS=m
+# CONFIG_JFS_POSIX_ACL is not set
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_SECURITY is not set
+# CONFIG_XFS_POSIX_ACL is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
+CONFIG_AUTOFS4_FS=y
 
 #
 # CD-ROM/DVD Filesystems
@@ -502,12 +703,17 @@
 CONFIG_ISO9660_FS=y
 CONFIG_JOLIET=y
 # CONFIG_ZISOFS is not set
-# CONFIG_UDF_FS is not set
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
 
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_FAT_FS is not set
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
 #
@@ -515,38 +721,63 @@
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+# CONFIG_DEVFS_FS is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
+CONFIG_TMPFS_XATTR=y
+# CONFIG_TMPFS_SECURITY is not set
+# CONFIG_HUGETLBFS is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 
 #
 # Miscellaneous filesystems
 #
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
 # CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
+CONFIG_UFS_FS=m
+# CONFIG_UFS_FS_WRITE is not set
 
 #
 # Network File Systems
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
-CONFIG_NFSD=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=y
+CONFIG_EXPORTFS=m
 CONFIG_SUNRPC=y
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+CONFIG_RPCSEC_GSS_SPKM3=m
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
 
 #
 # Partition Types
@@ -559,85 +790,102 @@
 #
 CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="iso8859-1"
-# CONFIG_NLS_CODEPAGE_437 is not set
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Profiling support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
 
 #
 # Kernel hacking
 #
 CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SLAB is not set
 CONFIG_MAGIC_SYSRQ=y
-CONFIG_FRAME_POINTER=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 
 #
 # Security options
 #
-CONFIG_SECURITY=y
-# CONFIG_SECURITY_NETWORK is not set
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_SELINUX is not set
+CONFIG_KEYS=y
+CONFIG_KEYS_DEBUG_PROC_KEYS=y
+# CONFIG_SECURITY is not set
 
 #
 # Cryptographic options
 #
 CONFIG_CRYPTO=y
-# CONFIG_CRYPTO_HMAC is not set
-# CONFIG_CRYPTO_NULL is not set
-# CONFIG_CRYPTO_MD4 is not set
-# CONFIG_CRYPTO_MD5 is not set
-# CONFIG_CRYPTO_SHA1 is not set
-# CONFIG_CRYPTO_SHA256 is not set
-# CONFIG_CRYPTO_SHA512 is not set
-# CONFIG_CRYPTO_DES is not set
-# CONFIG_CRYPTO_BLOWFISH is not set
-# CONFIG_CRYPTO_TWOFISH is not set
-# CONFIG_CRYPTO_SERPENT is not set
-# CONFIG_CRYPTO_AES is not set
-# CONFIG_CRYPTO_CAST5 is not set
-# CONFIG_CRYPTO_CAST6 is not set
-# CONFIG_CRYPTO_ARC4 is not set
-# CONFIG_CRYPTO_DEFLATE is not set
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_TEST=m
 
 #
 # Library routines
 #
-# CONFIG_CRC32 is not set
+CONFIG_CRC_CCITT=m
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
diff -urN linux/arch/parisc/configs/a500_defconfig 
linux/arch/parisc/configs/a500_defconfig
--- linux/arch/parisc/configs/a500_defconfig    2005/01/13 14:05:31     1.6
+++ linux/arch/parisc/configs/a500_defconfig    2005/01/25 04:28:00     1.7
@@ -1,5 +1,7 @@
 #
 # Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-pa5
+# Wed Jan  5 13:22:34 2005
 #
 CONFIG_PARISC=y
 CONFIG_MMU=y
@@ -13,10 +15,12 @@
 # CONFIG_CLEAN_COMPILE is not set
 CONFIG_BROKEN=y
 CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
 
 #
 # General setup
 #
+CONFIG_LOCALVERSION=""
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
@@ -25,6 +29,7 @@
 # CONFIG_AUDIT is not set
 CONFIG_LOG_BUF_SHIFT=16
 CONFIG_HOTPLUG=y
+CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_EMBEDDED=y
@@ -33,11 +38,13 @@
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE 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_TINY_SHMEM is not set
 
 #
 # Loadable module support
@@ -47,6 +54,7 @@
 CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 CONFIG_STOP_MACHINE=y
 
@@ -64,10 +72,10 @@
 CONFIG_64BIT=y
 CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y
-# CONFIG_DISCONTIGMEM is not set
+CONFIG_DISCONTIGMEM=y
 # CONFIG_PREEMPT is not set
 CONFIG_COMPAT=y
-CONFIG_NR_CPUS=4
+CONFIG_NR_CPUS=8
 
 #
 # Bus options (PCI, PCMCIA, EISA, GSC, ISA)
@@ -84,15 +92,21 @@
 CONFIG_PDC_CHASSIS=y
 
 #
-# PCMCIA/CardBus support
+# PCCARD (PCMCIA/CardBus) support
 #
+CONFIG_PCCARD=m
+# CONFIG_PCMCIA_DEBUG is not set
+# CONFIG_PCMCIA_OBSOLETE is not set
 CONFIG_PCMCIA=m
-CONFIG_PCMCIA_DEBUG=y
-CONFIG_YENTA=m
 CONFIG_CARDBUS=y
-# CONFIG_PD6729 is not set
-# CONFIG_I82092 is not set
-# CONFIG_TCIC is not set
+
+#
+# PC-card bridges
+#
+CONFIG_YENTA=m
+CONFIG_PD6729=m
+CONFIG_I82092=m
+CONFIG_TCIC=m
 
 #
 # PCI Hotplug Support
@@ -113,9 +127,9 @@
 # Generic Driver Options
 #
 # CONFIG_STANDALONE is not set
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
-CONFIG_DEBUG_DRIVER=y
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -144,8 +158,19 @@
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=6144
 CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -192,7 +217,8 @@
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
@@ -216,6 +242,7 @@
 CONFIG_SCSI_QLOGIC_FC=m
 # CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
 CONFIG_SCSI_QLOGIC_1280=m
+# CONFIG_SCSI_QLOGIC_1280_1040 is not set
 CONFIG_SCSI_QLA2XXX=y
 # CONFIG_SCSI_QLA21XX is not set
 # CONFIG_SCSI_QLA22XX is not set
@@ -230,9 +257,9 @@
 #
 # PCMCIA SCSI adapter support
 #
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
 
 #
 # Multi-device support (RAID and LVM)
@@ -242,9 +269,11 @@
 CONFIG_MD_LINEAR=y
 CONFIG_MD_RAID0=y
 CONFIG_MD_RAID1=y
+# CONFIG_MD_RAID10 is not set
 # CONFIG_MD_RAID5 is not set
 # CONFIG_MD_RAID6 is not set
 # CONFIG_MD_MULTIPATH is not set
+# CONFIG_MD_FAULTY is not set
 # CONFIG_BLK_DEV_DM is not set
 
 #
@@ -252,7 +281,6 @@
 #
 CONFIG_FUSION=m
 CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_ISENSE=m
 CONFIG_FUSION_CTL=m
 
 #
@@ -293,6 +321,9 @@
 CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 # CONFIG_INET_IPCOMP is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
 
 #
 # IP: Virtual Server Configuration
@@ -306,6 +337,9 @@
 # IP: Netfilter Configuration
 #
 CONFIG_IP_NF_CONNTRACK=m
+# CONFIG_IP_NF_CT_ACCT is not set
+CONFIG_IP_NF_CONNTRACK_MARK=y
+CONFIG_IP_NF_CT_PROTO_SCTP=m
 CONFIG_IP_NF_FTP=m
 CONFIG_IP_NF_IRC=m
 CONFIG_IP_NF_TFTP=m
@@ -330,8 +364,17 @@
 CONFIG_IP_NF_MATCH_STATE=m
 CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_OWNER=m
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+# CONFIG_IP_NF_MATCH_REALM is not set
+CONFIG_IP_NF_MATCH_SCTP=m
+CONFIG_IP_NF_MATCH_COMMENT=m
+CONFIG_IP_NF_MATCH_CONNMARK=m
+CONFIG_IP_NF_MATCH_HASHLIMIT=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
 CONFIG_IP_NF_NAT=m
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -349,18 +392,15 @@
 CONFIG_IP_NF_TARGET_DSCP=m
 CONFIG_IP_NF_TARGET_MARK=m
 CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_TARGET_CONNMARK=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_TARGET_NOTRACK=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_ARP_MANGLE=m
 # CONFIG_IP_NF_COMPAT_IPCHAINS is not set
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_RAW=m
-# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
-# CONFIG_IP_NF_MATCH_REALM is not set
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
 
@@ -381,7 +421,6 @@
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
 
 #
 # QoS and/or fair queueing
@@ -434,7 +473,7 @@
 # CONFIG_WINBOND_840 is not set
 # CONFIG_DM9102 is not set
 CONFIG_PCMCIA_XIRCOM=m
-CONFIG_PCMCIA_XIRTULIP=m
+# CONFIG_PCMCIA_XIRTULIP is not set
 CONFIG_HP100=m
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=m
@@ -461,7 +500,6 @@
 # CONFIG_SUNDANCE is not set
 CONFIG_VIA_RHINE=m
 CONFIG_VIA_RHINE_MMIO=y
-# CONFIG_VIA_VELOCITY is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -476,6 +514,7 @@
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=m
 
 #
@@ -500,13 +539,13 @@
 # Obsolete Wireless cards support (pre-802.11)
 #
 # CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
+# CONFIG_PCMCIA_WAVELAN is not set
 CONFIG_PCMCIA_NETWAVE=m
 
 #
 # Wireless 802.11 Frequency Hopping cards support
 #
-# CONFIG_PCMCIA_RAYCS is not set
+CONFIG_PCMCIA_RAYCS=m
 
 #
 # Wireless 802.11b ISA/PCI cards support
@@ -522,7 +561,7 @@
 #
 CONFIG_PCMCIA_HERMES=m
 CONFIG_AIRO_CS=m
-# CONFIG_PCMCIA_WL3501 is not set
+CONFIG_PCMCIA_WL3501=m
 
 #
 # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
@@ -615,7 +654,7 @@
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_CS is not set
+CONFIG_SERIAL_8250_CS=m
 CONFIG_SERIAL_8250_NR_UARTS=8
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_MANY_PORTS=y
@@ -633,7 +672,6 @@
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 # CONFIG_LEGACY_PTYS is not set
-# CONFIG_QIC02_TAPE is not set
 
 #
 # IPMI
@@ -695,7 +733,6 @@
 #
 # Console display driver support
 #
-# CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE_COLUMNS=160
 CONFIG_DUMMY_CONSOLE_ROWS=64
 CONFIG_DUMMY_CONSOLE=y
@@ -709,6 +746,12 @@
 # USB support
 #
 # CONFIG_USB is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; 
see USB_STORAGE Help for more information
+#
 
 #
 # USB Gadget Support
@@ -716,6 +759,11 @@
 # CONFIG_USB_GADGET is not set
 
 #
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -729,6 +777,7 @@
 # CONFIG_JFS_POSIX_ACL is not set
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_RT is not set
 # CONFIG_XFS_QUOTA is not set
@@ -737,8 +786,9 @@
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_QUOTA is not set
+# CONFIG_DNOTIFY is not set
 # CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
+CONFIG_AUTOFS4_FS=y
 
 #
 # CD-ROM/DVD Filesystems
@@ -807,13 +857,14 @@
 CONFIG_SUNRPC=m
 CONFIG_SUNRPC_GSS=m
 CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_RPCSEC_GSS_SPKM3=m
 CONFIG_SMB_FS=m
 CONFIG_SMB_NLS_DEFAULT=y
 CONFIG_SMB_NLS_REMOTE="cp437"
 CONFIG_CIFS=m
 # CONFIG_CIFS_STATS is not set
 # CONFIG_CIFS_XATTR is not set
-# CONFIG_CIFS_POSIX is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -878,16 +929,19 @@
 # Kernel hacking
 #
 CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SLAB is not set
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_RWLOCK is not set
-# CONFIG_FRAME_POINTER is not set
+# CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_RWLOCK is not set
 
 #
 # Security options
 #
+CONFIG_KEYS=y
+CONFIG_KEYS_DEBUG_PROC_KEYS=y
 # CONFIG_SECURITY is not set
 
 #
@@ -901,6 +955,7 @@
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_DES=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
@@ -908,11 +963,12 @@
 CONFIG_CRYPTO_AES=m
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
-# CONFIG_CRYPTO_TEA is not set
-# CONFIG_CRYPTO_ARC4 is not set
-# CONFIG_CRYPTO_KHAZAD is not set
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_DEFLATE=m
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_CRC32C=m
 CONFIG_CRYPTO_TEST=m
 
diff -urN linux/arch/parisc/configs/b180_defconfig 
linux/arch/parisc/configs/b180_defconfig
--- linux/arch/parisc/configs/b180_defconfig    2004/08/14 16:16:41     1.3
+++ linux/arch/parisc/configs/b180_defconfig    2005/01/25 04:28:00     1.4
@@ -1,5 +1,7 @@
 #
 # Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-pa5
+# Wed Jan  5 13:35:54 2005
 #
 CONFIG_PARISC=y
 CONFIG_MMU=y
@@ -11,19 +13,20 @@
 #
 # CONFIG_EXPERIMENTAL is not set
 CONFIG_CLEAN_COMPILE=y
-CONFIG_STANDALONE=y
 CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
 #
+CONFIG_LOCALVERSION=""
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_LOG_BUF_SHIFT=15
+CONFIG_LOG_BUF_SHIFT=16
 # CONFIG_HOTPLUG is not set
+CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
@@ -31,11 +34,13 @@
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE 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_TINY_SHMEM is not set
 
 #
 # Loadable module support
@@ -43,6 +48,7 @@
 CONFIG_MODULES=y
 # CONFIG_MODULE_UNLOAD is not set
 CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
 # CONFIG_KMOD is not set
 
 #
@@ -91,8 +97,9 @@
 #
 # Generic Driver Options
 #
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_DEBUG_DRIVER=y
+CONFIG_STANDALONE=y
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+# CONFIG_DEBUG_DRIVER is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -129,6 +136,19 @@
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
 # CONFIG_BLK_DEV_RAM is not set
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -174,12 +194,15 @@
 # CONFIG_SCSI_AHA152X is not set
 # CONFIG_SCSI_AHA1542 is not set
 # CONFIG_SCSI_AHA1740 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_SCSI_IN2000 is not set
-# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_DTC3280 is not set
@@ -190,6 +213,7 @@
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
 # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_PPA is not set
 # CONFIG_SCSI_IMM is not set
@@ -240,6 +264,7 @@
 CONFIG_MD_RAID1=y
 CONFIG_MD_RAID5=y
 # CONFIG_MD_MULTIPATH is not set
+# CONFIG_MD_FAULTY is not set
 # CONFIG_BLK_DEV_DM is not set
 
 #
@@ -284,6 +309,9 @@
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_VLAN_8021Q is not set
@@ -446,6 +474,7 @@
 CONFIG_SERIO_GSCPS2=y
 # CONFIG_HP_SDC is not set
 # CONFIG_SERIO_PCIPS2 is not set
+# CONFIG_SERIO_RAW is not set
 
 #
 # Input Device Drivers
@@ -507,7 +536,6 @@
 # CONFIG_LP_CONSOLE is not set
 # CONFIG_PPDEV is not set
 # CONFIG_TIPAR is not set
-# CONFIG_QIC02_TAPE is not set
 
 #
 # IPMI
@@ -527,7 +555,6 @@
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
@@ -560,6 +587,8 @@
 # Graphics support
 #
 CONFIG_FB=y
+# 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
@@ -611,6 +640,12 @@
 # USB support
 #
 # CONFIG_USB is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; 
see USB_STORAGE Help for more information
+#
 
 #
 # USB Gadget Support
@@ -618,6 +653,11 @@
 # CONFIG_USB_GADGET is not set
 
 #
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -632,8 +672,9 @@
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
+CONFIG_AUTOFS4_FS=y
 
 #
 # CD-ROM/DVD Filesystems
@@ -658,6 +699,7 @@
 CONFIG_SYSFS=y
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_XATTR is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 
@@ -665,7 +707,6 @@
 # Miscellaneous filesystems
 #
 # CONFIG_HFSPLUS_FS is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
@@ -745,18 +786,21 @@
 # Kernel hacking
 #
 CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SLAB is not set
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_SPINLOCK is not set
-CONFIG_FRAME_POINTER=y
+# CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 
 #
 # Security options
 #
+# CONFIG_KEYS is not set
 CONFIG_SECURITY=y
 # CONFIG_SECURITY_NETWORK is not set
 CONFIG_SECURITY_CAPABILITIES=y
+# CONFIG_SECURITY_SECLVL is not set
 # CONFIG_SECURITY_SELINUX is not set
 
 #
@@ -770,6 +814,7 @@
 # CONFIG_CRYPTO_SHA1 is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_DES is not set
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
@@ -779,6 +824,8 @@
 # CONFIG_CRYPTO_CAST6 is not set
 # CONFIG_CRYPTO_TEA is not set
 # CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 # CONFIG_CRYPTO_CRC32C is not set
diff -urN linux/arch/parisc/configs/c3000_defconfig 
linux/arch/parisc/configs/c3000_defconfig
--- linux/arch/parisc/configs/c3000_defconfig   2005/01/13 14:05:31     1.6
+++ linux/arch/parisc/configs/c3000_defconfig   2005/01/25 04:28:00     1.7
@@ -1,5 +1,7 @@
 #
 # Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-pa5
+# Wed Jan  5 13:26:49 2005
 #
 CONFIG_PARISC=y
 CONFIG_MMU=y
@@ -11,13 +13,13 @@
 #
 CONFIG_EXPERIMENTAL=y
 # CONFIG_CLEAN_COMPILE is not set
-# CONFIG_STANDALONE is not set
 CONFIG_BROKEN=y
 CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
 #
+CONFIG_LOCALVERSION=""
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 # CONFIG_POSIX_MQUEUE is not set
@@ -26,18 +28,22 @@
 # CONFIG_AUDIT is not set
 CONFIG_LOG_BUF_SHIFT=16
 CONFIG_HOTPLUG=y
+CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_EMBEDDED=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE 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_TINY_SHMEM is not set
 
 #
 # Loadable module support
@@ -47,6 +53,7 @@
 CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 
 #
@@ -62,6 +69,7 @@
 # CONFIG_PARISC64 is not set
 # CONFIG_64BIT is not set
 # CONFIG_SMP is not set
+# CONFIG_DISCONTIGMEM is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_HPUX is not set
 
@@ -80,14 +88,13 @@
 # CONFIG_PDC_CHASSIS is not set
 
 #
-# PCMCIA/CardBus support
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PC-card bridges
 #
-CONFIG_PCMCIA=m
-CONFIG_PCMCIA_DEBUG=y
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-# CONFIG_I82092 is not set
-# CONFIG_TCIC is not set
 
 #
 # PCI Hotplug Support
@@ -107,8 +114,10 @@
 #
 # Generic Driver Options
 #
+# CONFIG_STANDALONE is not set
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
 CONFIG_FW_LOADER=y
-CONFIG_DEBUG_DRIVER=y
+# CONFIG_DEBUG_DRIVER is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -135,8 +144,20 @@
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_CARMEL is not set
+# 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_INITRAMFS_SOURCE=""
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -147,16 +168,14 @@
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
+# CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=m
 # CONFIG_IDEDISK_MULTI_MODE is not set
-CONFIG_IDEDISK_STROKE=y
-# CONFIG_BLK_DEV_IDECS is not set
 CONFIG_BLK_DEV_IDECD=y
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
 CONFIG_BLK_DEV_IDESCSI=y
 # CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
 
 #
 # IDE chipset support/bugfixes
@@ -170,7 +189,6 @@
 CONFIG_BLK_DEV_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 # CONFIG_IDEDMA_PCI_AUTO is not set
-CONFIG_BLK_DEV_ADMA=y
 # CONFIG_BLK_DEV_AEC62XX is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
 # CONFIG_BLK_DEV_AMD74XX is not set
@@ -217,7 +235,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_REPORT_LUNS=y
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
 
@@ -231,6 +248,7 @@
 # SCSI low-level drivers
 #
 # 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
@@ -238,14 +256,18 @@
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
 CONFIG_SCSI_SATA=y
+# CONFIG_SCSI_SATA_AHCI is not set
 # CONFIG_SCSI_SATA_SVW is not set
 CONFIG_SCSI_ATA_PIIX=m
+# CONFIG_SCSI_SATA_NV is not set
 CONFIG_SCSI_SATA_PROMISE=m
 # CONFIG_SCSI_SATA_SX4 is not set
 CONFIG_SCSI_SATA_SIL=m
 # CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
 CONFIG_SCSI_SATA_VIA=m
 # CONFIG_SCSI_SATA_VITESSE is not set
 # CONFIG_SCSI_BUSLOGIC is not set
@@ -270,6 +292,7 @@
 CONFIG_SCSI_QLOGIC_FC=m
 # CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
 CONFIG_SCSI_QLOGIC_1280=m
+# CONFIG_SCSI_QLOGIC_1280_1040 is not set
 CONFIG_SCSI_QLA2XXX=y
 # CONFIG_SCSI_QLA21XX is not set
 # CONFIG_SCSI_QLA22XX is not set
@@ -283,15 +306,6 @@
 CONFIG_SCSI_DEBUG=m
 
 #
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-CONFIG_PCMCIA_QLOGIC=m
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
 # Multi-device support (RAID and LVM)
 #
 CONFIG_MD=y
@@ -299,18 +313,22 @@
 CONFIG_MD_LINEAR=y
 CONFIG_MD_RAID0=y
 CONFIG_MD_RAID1=y
+# CONFIG_MD_RAID10 is not set
 # CONFIG_MD_RAID5 is not set
 # CONFIG_MD_RAID6 is not set
 CONFIG_MD_MULTIPATH=y
+# CONFIG_MD_FAULTY is not set
 CONFIG_BLK_DEV_DM=y
 # CONFIG_DM_CRYPT is not set
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
 
 #
 # Fusion MPT device support
 #
 CONFIG_FUSION=m
 CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_ISENSE=m
 CONFIG_FUSION_CTL=m
 
 #
@@ -351,6 +369,9 @@
 CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 # CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
 
 #
 # IP: Virtual Server Configuration
@@ -364,6 +385,9 @@
 # IP: Netfilter Configuration
 #
 CONFIG_IP_NF_CONNTRACK=m
+# CONFIG_IP_NF_CT_ACCT is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
+# CONFIG_IP_NF_CT_PROTO_SCTP is not set
 CONFIG_IP_NF_FTP=m
 CONFIG_IP_NF_IRC=m
 CONFIG_IP_NF_TFTP=m
@@ -388,8 +412,16 @@
 CONFIG_IP_NF_MATCH_STATE=m
 CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_OWNER=m
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+# CONFIG_IP_NF_MATCH_REALM is not set
+# CONFIG_IP_NF_MATCH_SCTP is not set
+# CONFIG_IP_NF_MATCH_COMMENT is not set
+# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
 CONFIG_IP_NF_NAT=m
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -407,15 +439,12 @@
 CONFIG_IP_NF_TARGET_DSCP=m
 CONFIG_IP_NF_TARGET_MARK=m
 CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
+# CONFIG_IP_NF_RAW is not set
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_IP_NF_COMPAT_IPCHAINS=m
 CONFIG_IP_NF_COMPAT_IPFWADM=m
-# CONFIG_IP_NF_RAW is not set
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
 
@@ -436,12 +465,12 @@
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
 
 #
 # QoS and/or fair queueing
 #
 # CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
 
 #
 # Network testing
@@ -480,13 +509,11 @@
 CONFIG_DE2104X=m
 CONFIG_TULIP=y
 # CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
+CONFIG_TULIP_MMIO=y
 # CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
 # CONFIG_DM9102 is not set
-CONFIG_PCMCIA_XIRCOM=m
-CONFIG_PCMCIA_XIRTULIP=m
 # CONFIG_HP100 is not set
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=m
@@ -528,6 +555,7 @@
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=m
 
 #
@@ -548,19 +576,6 @@
 # CONFIG_NET_RADIO is not set
 
 #
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
 # Wan interfaces
 #
 # CONFIG_WAN is not set
@@ -614,6 +629,7 @@
 CONFIG_SERIO=m
 CONFIG_SERIO_SERPORT=m
 # CONFIG_SERIO_PCIPS2 is not set
+# CONFIG_SERIO_RAW is not set
 
 #
 # Input Device Drivers
@@ -624,13 +640,10 @@
 # CONFIG_KEYBOARD_LKKBD is not set
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
-# CONFIG_KEYBOARD_HIL_OLD is not set
-# CONFIG_KEYBOARD_HIL is not set
 CONFIG_INPUT_MOUSE=y
 # CONFIG_MOUSE_PS2 is not set
 # CONFIG_MOUSE_SERIAL is not set
 # CONFIG_MOUSE_VSXXXAA is not set
-# CONFIG_MOUSE_HIL is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
 # CONFIG_INPUT_MISC is not set
@@ -648,7 +661,6 @@
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
 CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_MANY_PORTS=y
@@ -667,7 +679,6 @@
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-# CONFIG_QIC02_TAPE is not set
 
 #
 # IPMI
@@ -687,14 +698,8 @@
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
 CONFIG_RAW_DRIVER=y
 CONFIG_MAX_RAW_DEVS=256
 
@@ -704,6 +709,11 @@
 # CONFIG_I2C is not set
 
 #
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
 # Misc devices
 #
 
@@ -721,6 +731,8 @@
 # Graphics support
 #
 CONFIG_FB=y
+# 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
@@ -733,6 +745,7 @@
 # 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
@@ -745,13 +758,11 @@
 #
 # Console display driver support
 #
-# CONFIG_MDA_CONSOLE is not set
 CONFIG_STI_CONSOLE=y
 CONFIG_DUMMY_CONSOLE_COLUMNS=160
 CONFIG_DUMMY_CONSOLE_ROWS=64
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
 # CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
@@ -792,6 +803,9 @@
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_OTG is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
 
 #
 # USB Host Controller Drivers
@@ -799,6 +813,7 @@
 # CONFIG_USB_EHCI_HCD is not set
 CONFIG_USB_OHCI_HCD=y
 # CONFIG_USB_UHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
 
 #
 # USB Device Class drivers
@@ -808,8 +823,13 @@
 # CONFIG_USB_MIDI is not set
 # CONFIG_USB_ACM is not set
 CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; 
see USB_STORAGE Help for more information
+#
 CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_RW_DETECT is not set
 CONFIG_USB_STORAGE_DATAFAB=y
 CONFIG_USB_STORAGE_FREECOM=y
 # CONFIG_USB_STORAGE_ISD200 is not set
@@ -820,7 +840,7 @@
 CONFIG_USB_STORAGE_JUMPSHOT=y
 
 #
-# USB Human Interface Devices (HID)
+# USB Input Devices
 #
 CONFIG_USB_HID=y
 CONFIG_USB_HIDINPUT=y
@@ -852,7 +872,7 @@
 #
 
 #
-# USB Network adaptors
+# USB Network Adapters
 #
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_KAWETH is not set
@@ -881,15 +901,25 @@
 # 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_TEST is not set
 
 #
+# USB ATM/DSL drivers
+#
+
+#
 # USB Gadget Support
 #
 # CONFIG_USB_GADGET is not set
 
 #
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -908,8 +938,9 @@
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
+CONFIG_AUTOFS4_FS=y
 
 #
 # CD-ROM/DVD Filesystems
@@ -925,6 +956,8 @@
 CONFIG_FAT_FS=m
 CONFIG_MSDOS_FS=m
 CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
 #
@@ -936,6 +969,7 @@
 # CONFIG_DEVFS_FS is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_XATTR is not set
 # CONFIG_HUGETLBFS is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
@@ -974,6 +1008,7 @@
 CONFIG_EXPORTFS=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
@@ -1014,6 +1049,7 @@
 # CONFIG_NLS_ISO8859_8 is not set
 # CONFIG_NLS_CODEPAGE_1250 is not set
 # CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
 # CONFIG_NLS_ISO8859_1 is not set
 # CONFIG_NLS_ISO8859_2 is not set
 # CONFIG_NLS_ISO8859_3 is not set
@@ -1039,14 +1075,17 @@
 # Kernel hacking
 #
 CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SLAB is not set
 CONFIG_MAGIC_SYSRQ=y
-# CONFIG_FRAME_POINTER is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 
 #
 # Security options
 #
+# CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 
 #
@@ -1060,6 +1099,7 @@
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SHA256=m
 # CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
 CONFIG_CRYPTO_DES=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
@@ -1067,7 +1107,10 @@
 CONFIG_CRYPTO_AES=m
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
+# CONFIG_CRYPTO_TEA is not set
 # CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
 CONFIG_CRYPTO_DEFLATE=m
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 CONFIG_CRYPTO_CRC32C=m
@@ -1076,6 +1119,7 @@
 #
 # Library routines
 #
+CONFIG_CRC_CCITT=m
 CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
diff -urN linux/arch/parisc/configs/n4000_defconfig 
linux/arch/parisc/configs/n4000_defconfig
--- linux/arch/parisc/configs/n4000_defconfig   2005/01/13 14:05:31     1.2
+++ linux/arch/parisc/configs/n4000_defconfig   2005/01/25 04:28:00     1.3
@@ -1,5 +1,7 @@
 #
 # Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-pa5
+# Wed Jan  5 13:40:36 2005
 #
 CONFIG_PARISC=y
 CONFIG_MMU=y
@@ -11,13 +13,13 @@
 #
 CONFIG_EXPERIMENTAL=y
 # CONFIG_CLEAN_COMPILE is not set
-# CONFIG_STANDALONE is not set
 CONFIG_BROKEN=y
 CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
 #
+CONFIG_LOCALVERSION=""
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
@@ -26,18 +28,22 @@
 # CONFIG_AUDIT is not set
 CONFIG_LOG_BUF_SHIFT=16
 CONFIG_HOTPLUG=y
+CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_EMBEDDED=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE 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_TINY_SHMEM is not set
 
 #
 # Loadable module support
@@ -47,6 +53,7 @@
 CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 
 #
@@ -81,14 +88,13 @@
 # CONFIG_PDC_CHASSIS is not set
 
 #
-# PCMCIA/CardBus support
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PC-card bridges
 #
-CONFIG_PCMCIA=m
-CONFIG_PCMCIA_DEBUG=y
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-# CONFIG_I82092 is not set
-# CONFIG_TCIC is not set
 
 #
 # PCI Hotplug Support
@@ -108,8 +114,10 @@
 #
 # Generic Driver Options
 #
-# CONFIG_FW_LOADER is not set
-CONFIG_DEBUG_DRIVER=y
+# CONFIG_STANDALONE is not set
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -136,10 +144,23 @@
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_CARMEL is not set
+# CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=6144
 CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -179,13 +200,15 @@
 # SCSI low-level drivers
 #
 # 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_ADVANSYS is not set
-# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
@@ -209,6 +232,7 @@
 CONFIG_SCSI_QLOGIC_FC=m
 # CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
 CONFIG_SCSI_QLOGIC_1280=m
+# CONFIG_SCSI_QLOGIC_1280_1040 is not set
 CONFIG_SCSI_QLA2XXX=y
 # CONFIG_SCSI_QLA21XX is not set
 # CONFIG_SCSI_QLA22XX is not set
@@ -221,13 +245,6 @@
 CONFIG_SCSI_DEBUG=m
 
 #
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
 # Multi-device support (RAID and LVM)
 #
 CONFIG_MD=y
@@ -235,9 +252,11 @@
 CONFIG_MD_LINEAR=y
 CONFIG_MD_RAID0=y
 CONFIG_MD_RAID1=y
+# CONFIG_MD_RAID10 is not set
 # CONFIG_MD_RAID5 is not set
 # CONFIG_MD_RAID6 is not set
 # CONFIG_MD_MULTIPATH is not set
+# CONFIG_MD_FAULTY is not set
 # CONFIG_BLK_DEV_DM is not set
 
 #
@@ -245,7 +264,6 @@
 #
 CONFIG_FUSION=m
 CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_ISENSE=m
 CONFIG_FUSION_CTL=m
 
 #
@@ -286,6 +304,9 @@
 CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 # CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
 
 #
 # IP: Virtual Server Configuration
@@ -299,6 +320,9 @@
 # IP: Netfilter Configuration
 #
 CONFIG_IP_NF_CONNTRACK=m
+# CONFIG_IP_NF_CT_ACCT is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
+# CONFIG_IP_NF_CT_PROTO_SCTP is not set
 CONFIG_IP_NF_FTP=m
 CONFIG_IP_NF_IRC=m
 CONFIG_IP_NF_TFTP=m
@@ -323,8 +347,16 @@
 CONFIG_IP_NF_MATCH_STATE=m
 CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_MATCH_REALM=m
+CONFIG_IP_NF_MATCH_SCTP=m
+CONFIG_IP_NF_MATCH_COMMENT=m
+CONFIG_IP_NF_MATCH_HASHLIMIT=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
 CONFIG_IP_NF_NAT=m
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -342,16 +374,13 @@
 CONFIG_IP_NF_TARGET_DSCP=m
 CONFIG_IP_NF_TARGET_MARK=m
 CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_TARGET_NOTRACK=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_ARP_MANGLE=m
 # CONFIG_IP_NF_COMPAT_IPCHAINS is not set
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_RAW=m
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
 
@@ -372,13 +401,12 @@
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
 
 #
 # QoS and/or fair queueing
 #
 # CONFIG_NET_SCHED is not set
+CONFIG_NET_CLS_ROUTE=y
 
 #
 # Network testing
@@ -424,8 +452,6 @@
 # CONFIG_DE4X5 is not set
 # CONFIG_WINBOND_840 is not set
 # CONFIG_DM9102 is not set
-CONFIG_PCMCIA_XIRCOM=m
-CONFIG_PCMCIA_XIRTULIP=m
 CONFIG_HP100=m
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=m
@@ -466,6 +492,7 @@
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=m
 
 #
@@ -490,18 +517,10 @@
 # Obsolete Wireless cards support (pre-802.11)
 #
 # CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
 
 #
 # Wireless 802.11b ISA/PCI cards support
 #
-# CONFIG_AIRO is not set
 CONFIG_HERMES=m
 CONFIG_PLX_HERMES=m
 CONFIG_TMD_HERMES=m
@@ -509,32 +528,12 @@
 # CONFIG_ATMEL is not set
 
 #
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-# CONFIG_PCMCIA_WL3501 is not set
-
-#
 # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
 #
 # CONFIG_PRISM54 is not set
 CONFIG_NET_WIRELESS=y
 
 #
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-# CONFIG_PCMCIA_FMVJ18X is not set
-# CONFIG_PCMCIA_PCNET is not set
-# CONFIG_PCMCIA_NMCLAN is not set
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-# CONFIG_PCMCIA_AXNET is not set
-
-#
 # Wan interfaces
 #
 # CONFIG_WAN is not set
@@ -606,7 +605,6 @@
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_CS is not set
 CONFIG_SERIAL_8250_NR_UARTS=8
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_MANY_PORTS=y
@@ -624,7 +622,6 @@
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 # CONFIG_LEGACY_PTYS is not set
-# CONFIG_QIC02_TAPE is not set
 
 #
 # IPMI
@@ -644,14 +641,8 @@
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
 CONFIG_RAW_DRIVER=y
 CONFIG_MAX_RAW_DEVS=256
 
@@ -661,6 +652,11 @@
 # CONFIG_I2C is not set
 
 #
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
 # Misc devices
 #
 
@@ -682,7 +678,6 @@
 #
 # Console display driver support
 #
-# CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE_COLUMNS=160
 CONFIG_DUMMY_CONSOLE_ROWS=64
 CONFIG_DUMMY_CONSOLE=y
@@ -696,6 +691,12 @@
 # USB support
 #
 # CONFIG_USB is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; 
see USB_STORAGE Help for more information
+#
 
 #
 # USB Gadget Support
@@ -703,6 +704,11 @@
 # CONFIG_USB_GADGET is not set
 
 #
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -716,6 +722,7 @@
 # CONFIG_JFS_POSIX_ACL is not set
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_RT is not set
 # CONFIG_XFS_QUOTA is not set
@@ -724,8 +731,9 @@
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_QUOTA is not set
+# CONFIG_DNOTIFY is not set
 # CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
+CONFIG_AUTOFS4_FS=y
 
 #
 # CD-ROM/DVD Filesystems
@@ -734,6 +742,7 @@
 CONFIG_JOLIET=y
 # CONFIG_ZISOFS is not set
 CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
 
 #
 # DOS/FAT/NT Filesystems
@@ -741,6 +750,8 @@
 CONFIG_FAT_FS=m
 CONFIG_MSDOS_FS=m
 CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
 #
@@ -752,6 +763,7 @@
 # CONFIG_DEVFS_FS is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_XATTR is not set
 # CONFIG_HUGETLBFS is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
@@ -792,11 +804,14 @@
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
 CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
 CONFIG_SMB_NLS_DEFAULT=y
 CONFIG_SMB_NLS_REMOTE="cp437"
 CONFIG_CIFS=m
 # CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -835,6 +850,7 @@
 # CONFIG_NLS_ISO8859_8 is not set
 # CONFIG_NLS_CODEPAGE_1250 is not set
 # CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
 CONFIG_NLS_ISO8859_1=m
 CONFIG_NLS_ISO8859_2=m
 CONFIG_NLS_ISO8859_3=m
@@ -860,15 +876,17 @@
 # Kernel hacking
 #
 CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SLAB is not set
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_FRAME_POINTER is not set
+# CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 
 #
 # Security options
 #
+# CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 
 #
@@ -882,6 +900,7 @@
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
@@ -889,7 +908,10 @@
 CONFIG_CRYPTO_AES=m
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
 # CONFIG_CRYPTO_ARC4 is not set
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_DEFLATE=m
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 CONFIG_CRYPTO_CRC32C=m
@@ -898,6 +920,7 @@
 #
 # Library routines
 #
+CONFIG_CRC_CCITT=m
 CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
diff -urN linux/arch/parisc/hpux/entry_hpux.S 
linux/arch/parisc/hpux/entry_hpux.S
--- linux/arch/parisc/hpux/entry_hpux.S 2004/04/12 20:23:25     1.4
+++ linux/arch/parisc/hpux/entry_hpux.S 2005/01/25 04:28:00     1.5
@@ -227,7 +227,7 @@
        ENTRY_NAME(hpux_unimplemented_wrapper)
        ENTRY_NAME(hpux_unimplemented_wrapper)      /* 195 */
        ENTRY_NAME(hpux_statfs)
-       ENTRY_NAME(hpux_unimplemented_wrapper)
+       ENTRY_NAME(hpux_fstatfs)
        ENTRY_NAME(hpux_unimplemented_wrapper)
        ENTRY_NAME(hpux_unimplemented_wrapper)
        ENTRY_NAME(sys_waitpid) /* 200 */
diff -urN linux/arch/parisc/hpux/sys_hpux.c linux/arch/parisc/hpux/sys_hpux.c
--- linux/arch/parisc/hpux/sys_hpux.c   2004/03/11 16:46:43     1.9
+++ linux/arch/parisc/hpux/sys_hpux.c   2005/01/25 04:28:00     1.10
@@ -22,14 +22,16 @@
  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <linux/file.h>
 #include <linux/fs.h>
+#include <linux/namei.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/smp_lock.h>
 #include <linux/syscalls.h>
 #include <linux/utsname.h>
-#include <linux/vmalloc.h>
 #include <linux/vfs.h>
+#include <linux/vmalloc.h>
 
 #include <asm/errno.h>
 #include <asm/pgalloc.h>
@@ -65,7 +67,6 @@
 
 int hpux_setpgrp(void)
 {
-       extern int sys_setpgid(int, int);
        return sys_setpgid(0,0);
 }
 
@@ -133,7 +134,7 @@
  *  aid in porting forward if and when sys_ustat() is changed from
  *  its form in kernel 2.2.5.
  */
-static int hpux_ustat(dev_t dev, struct hpux_ustat *ubuf)
+static int hpux_ustat(dev_t dev, struct hpux_ustat __user *ubuf)
 {
        struct super_block *s;
        struct hpux_ustat tmp;  /* Changed to hpux_ustat */
@@ -148,14 +149,13 @@
        if (err)
                goto out;
 
-       memset(&tmp,0,sizeof(struct hpux_ustat));  /* Changed to hpux_ustat */
+       memset(&tmp,0,sizeof(tmp));
 
        tmp.f_tfree = (int32_t)sbuf.f_bfree;
        tmp.f_tinode = (u_int32_t)sbuf.f_ffree;
        tmp.f_blksize = (u_int32_t)sbuf.f_bsize;  /*  Added this line  */
 
-       /* Changed to hpux_ustat:  */
-       err = copy_to_user(ubuf,&tmp,sizeof(struct hpux_ustat)) ? -EFAULT : 0;
+       err = copy_to_user(ubuf, &tmp, sizeof(tmp)) ? -EFAULT : 0;
 out:
        return err;
 }
@@ -185,37 +185,62 @@
      int16_t f_pad;
 };
 
-/* hpux statfs */
-int hpux_statfs(const char *path, struct hpux_statfs *buf)
+static int vfs_statfs_hpux(struct super_block *sb, struct hpux_statfs *buf)
 {
-       int error;
-       int len;
-       char *kpath;
-
-       len = strlen_user((char *)path); 
-
-       kpath = (char *) kmalloc(len+1, GFP_KERNEL);
-       if ( !kpath ) {
-       printk(KERN_DEBUG "failed to kmalloc kpath\n");
-       return 0;
-       }
+       struct kstatfs st;
+       int retval;
+       
+       retval = vfs_statfs(sb, &st);
+       if (retval)
+               return retval;
+
+       memset(buf, 0, sizeof(*buf));
+       buf->f_type = st.f_type;
+       buf->f_bsize = st.f_bsize;
+       buf->f_blocks = st.f_blocks;
+       buf->f_bfree = st.f_bfree;
+       buf->f_bavail = st.f_bavail;
+       buf->f_files = st.f_files;
+       buf->f_ffree = st.f_ffree;
+       buf->f_fsid[0] = st.f_fsid.val[0];
+       buf->f_fsid[1] = st.f_fsid.val[1];
 
-       if ( copy_from_user(kpath, (char *)path, len+1) ) {
-       printk(KERN_DEBUG "failed to copy_from_user kpath\n");
-       kfree(kpath);
        return 0;
-       }
-
-       printk(KERN_DEBUG "hpux_statfs(\"%s\",-)\n", kpath);
+}
 
-       kfree(kpath);
+/* hpux statfs */
+asmlinkage long hpux_statfs(const char __user *path,
+                                               struct hpux_statfs __user *buf)
+{
+       struct nameidata nd;
+       int error;
 
-       /* just fake it, beginning of structures match */
-       error = sys_statfs(path, (struct statfs *) buf);
+       error = user_path_walk(path, &nd);
+       if (!error) {
+               struct hpux_statfs tmp;
+               error = vfs_statfs_hpux(nd.dentry->d_inode->i_sb, &tmp);
+               if (!error && copy_to_user(buf, &tmp, sizeof(tmp)))
+                       error = -EFAULT;
+               path_release(&nd);
+       }
+       return error;
+}
 
-       /* ignoring rest of statfs struct, but it should be zeros. Need to do 
-               something with f_fsid[1], which is the fstype for sysfs */
+asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf)
+{
+       struct file *file;
+       struct hpux_statfs tmp;
+       int error;
 
+       error = -EBADF;
+       file = fget(fd);
+       if (!file)
+               goto out;
+       error = vfs_statfs_hpux(file->f_dentry->d_inode->i_sb, &tmp);
+       if (!error && copy_to_user(buf, &tmp, sizeof(tmp)))
+               error = -EFAULT;
+       fput(file);
+ out:
        return error;
 }
 
@@ -671,8 +696,8 @@
        "setdomainname",         
        "async_daemon",          
        "getdirentries",          /* 195 */
-       "statfs",                
-       "fstatfs",               
+       NULL,                
+       NULL,               
        "vfsmount",              
        NULL,                    
        "waitpid",                /* 200 */
diff -urN linux/arch/parisc/kernel/cache.c linux/arch/parisc/kernel/cache.c
--- linux/arch/parisc/kernel/cache.c    2004/11/15 11:49:19     1.12
+++ linux/arch/parisc/kernel/cache.c    2005/01/25 04:28:00     1.13
@@ -40,7 +40,7 @@
  * by software.  We put a spinlock around all TLB flushes  to
  * ensure this.
  */
-spinlock_t pa_tlb_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(pa_tlb_lock);
 EXPORT_SYMBOL(pa_tlb_lock);
 #endif
 
@@ -55,6 +55,11 @@
 {
        on_each_cpu((void (*)(void *))flush_data_cache_local, NULL, 1, 1);
 }
+void 
+flush_instruction_cache(void)
+{
+       on_each_cpu((void (*)(void *))flush_instruction_cache_local, NULL, 1, 
1);
+}
 #endif
 
 void
@@ -327,3 +332,35 @@
        __clear_user_page_asm(page, vaddr);
        purge_tlb_end();
 }
+
+#define FLUSH_THRESHOLD 0x80000 /* 0.5MB */
+int parisc_cache_flush_threshold = FLUSH_THRESHOLD;
+
+void parisc_setup_cache_timing(void)
+{
+       unsigned long rangetime, alltime;
+       extern char _text;      /* start of kernel code, defined by linker */
+       extern char _end;       /* end of BSS, defined by linker */
+       unsigned long size;
+
+       alltime = mfctl(16);
+       flush_data_cache();
+       alltime = mfctl(16) - alltime;
+
+       size = (unsigned long)(&_end - _text);
+       rangetime = mfctl(16);
+       flush_kernel_dcache_range((unsigned long)&_text, size);
+       rangetime = mfctl(16) - rangetime;
+
+       printk(KERN_DEBUG "Whole cache flush %lu cycles, flushing %lu bytes %lu 
cycles\n",
+               alltime, size, rangetime);
+
+       /* Racy, but if we see an intermediate value, it's ok too... */
+       parisc_cache_flush_threshold = size * alltime / rangetime;
+
+       parisc_cache_flush_threshold = (parisc_cache_flush_threshold + 
L1_CACHE_BYTES - 1) &~ (L1_CACHE_BYTES - 1); 
+       if (!parisc_cache_flush_threshold)
+               parisc_cache_flush_threshold = FLUSH_THRESHOLD;
+
+       printk("Setting cache flush threshold to %x (%d CPUs online)\n", 
parisc_cache_flush_threshold, num_online_cpus());
+}
diff -urN linux/arch/parisc/kernel/drivers.c linux/arch/parisc/kernel/drivers.c
--- linux/arch/parisc/kernel/drivers.c  2004/04/12 20:23:25     1.11
+++ linux/arch/parisc/kernel/drivers.c  2005/01/25 04:28:00     1.12
@@ -10,9 +10,21 @@
  * Copyright (c) 2001 Matthew Wilcox for Hewlett Packard
  * Copyright (c) 2001 Helge Deller <deller@gmx.de>
  * Copyright (c) 2001,2002 Ryan Bradetich 
+ * Copyright (c) 2004 Thibaut VARENE <varenet@parisc-linux.org>
  * 
  * The file handles registering devices and drivers, then matching them.
  * It's the closest we get to a dating agency.
+ *
+ * If you're thinking about modifying this file, here are some gotchas to
+ * bear in mind:
+ *  - 715/Mirage device paths have a dummy device between Lasi and its children
+ *  - The EISA adapter may show up as a sibling or child of Wax
+ *  - Dino has an optionally functional serial port.  If firmware enables it,
+ *    it shows up as a child of Dino.  If firmware disables it, the buswalk
+ *    finds it and it shows up as a child of Cujo
+ *  - Dino has both parisc and pci devices as children
+ *  - parisc devices are discovered in a random order, including children
+ *    before parents in some cases.
  */
 
 #include <linux/slab.h>
@@ -30,13 +42,16 @@
 struct hppa_dma_ops *hppa_dma_ops;
 EXPORT_SYMBOL(hppa_dma_ops);
 
-static struct parisc_device root;
+static struct device root = {
+       .bus_id = "parisc",
+};
 
-#define for_each_padev(dev) \
-       for (dev = root.child; dev != NULL; dev = next_dev(dev))
+#define for_each_padev(padev) \
+       for (padev = next_dev(&root); padev != NULL; \
+                       padev = next_dev(&padev->dev))
 
-#define check_dev(dev) \
-       (dev->id.hw_type != HPHW_FAULTY) ? dev : next_dev(dev)
+#define check_dev(padev) \
+       (padev->id.hw_type != HPHW_FAULTY) ? padev : next_dev(&padev->dev)
 
 /**
  * next_dev - enumerates registered devices
@@ -45,20 +60,20 @@
  * next_dev does a depth-first search of the tree, returning parents
  * before children.  Returns NULL when there are no more devices.
  */
-struct parisc_device *next_dev(struct parisc_device *dev)
+static struct parisc_device *next_dev(struct device *dev)
 {
-       if (dev->child) {
-               return check_dev(dev->child);
-       } else if (dev->sibling) {
-               return dev->sibling;
+       if (!list_empty(&dev->children)) {
+               dev = list_to_dev(dev->children.next);
+               return check_dev(to_parisc_device(dev));
        }
 
-       /* Exhausted tree at this level, time to go up. */
-       do {
+       while (dev != &root) {
+               if (dev->node.next != &dev->parent->children) {
+                       dev = list_to_dev(dev->node.next);
+                       return to_parisc_device(dev);
+               }
                dev = dev->parent;
-               if (dev && dev->sibling)
-                       return dev->sibling;
-       } while (dev != &root);
+       }
 
        return NULL;
 }
@@ -209,24 +224,58 @@
  * Walks up the device tree looking for a device of the specified type.
  * If it finds it, it returns it.  If not, it returns NULL.
  */
-const struct parisc_device *find_pa_parent_type(const struct parisc_device 
*dev, int type)
+const struct parisc_device *
+find_pa_parent_type(const struct parisc_device *padev, int type)
 {
+       const struct device *dev = &padev->dev;
        while (dev != &root) {
-               if (dev->id.hw_type == type)
-                       return dev;
+               struct parisc_device *candidate = to_parisc_device(dev);
+               if (candidate->id.hw_type == type)
+                       return candidate;
                dev = dev->parent;
        }
 
        return NULL;
 }
 
-static void
-get_node_path(struct parisc_device *dev, struct hardware_path *path)
+#ifdef CONFIG_PCI
+static inline int is_pci_dev(struct device *dev)
+{
+       return dev->bus == &pci_bus_type;
+}
+#else
+static inline int is_pci_dev(struct device *dev)
+{
+       return 0;
+}
+#endif
+
+/*
+ * get_node_path fills in @path with the firmware path to the device.
+ * Note that if @node is a parisc device, we don't fill in the 'mod' field.
+ * This is because both callers pass the parent and fill in the mod
+ * themselves.  If @node is a PCI device, we do fill it in, even though this
+ * is inconsistent.
+ */
+static void get_node_path(struct device *dev, struct hardware_path *path)
 {
        int i = 5;
        memset(&path->bc, -1, 6);
+
+       if (is_pci_dev(dev)) {
+               unsigned int devfn = to_pci_dev(dev)->devfn;
+               path->mod = PCI_FUNC(devfn);
+               path->bc[i--] = PCI_SLOT(devfn);
+               dev = dev->parent;
+       }
+
        while (dev != &root) {
-               path->bc[i--] = dev->hw_path;
+               if (is_pci_dev(dev)) {
+                       unsigned int devfn = to_pci_dev(dev)->devfn;
+                       path->bc[i--] = PCI_SLOT(devfn) | (PCI_FUNC(devfn)<< 5);
+               } else if (dev->bus == &parisc_bus_type) {
+                       path->bc[i--] = to_parisc_device(dev)->hw_path;
+               }
                dev = dev->parent;
        }
 }
@@ -256,7 +305,7 @@
 {
        struct hardware_path path;
 
-       get_node_path(dev->parent, &path);
+       get_node_path(dev->dev.parent, &path);
        path.mod = dev->hw_path;
        return print_hwpath(&path, output);
 }
@@ -264,33 +313,17 @@
 
 #if defined(CONFIG_PCI) || defined(CONFIG_ISA)
 /**
- * get_pci_node_path - Returns hardware path for PCI devices
- * dev: The device to return the path for
- * output: Pointer to a previously-allocated array to place the path in.
+ * get_pci_node_path - Determines the hardware path for a PCI device
+ * @pdev: The device to return the path for
+ * @path: Pointer to a previously-allocated array to place the path in.
  *
  * This function fills in the hardware_path structure with the route to
  * the specified PCI device.  This structure is suitable for passing to
  * PDC calls.
  */
-void get_pci_node_path(struct pci_dev *dev, struct hardware_path *path)
+void get_pci_node_path(struct pci_dev *pdev, struct hardware_path *path)
 {
-       struct pci_bus *bus;
-       const struct parisc_device *padev;
-       int i = 5;
-
-       memset(&path->bc, -1, 6);
-       path->mod = PCI_FUNC(dev->devfn);
-       path->bc[i--] = PCI_SLOT(dev->devfn);
-       for (bus = dev->bus; bus->parent; bus = bus->parent) {
-               unsigned int devfn = bus->self->devfn;
-               path->bc[i--] = PCI_SLOT(devfn) | (PCI_FUNC(devfn) << 5);
-       }
-
-       padev = HBA_DATA(bus->bridge->platform_data)->dev;
-       while (padev != &root) {
-               path->bc[i--] = padev->hw_path;
-               padev = padev->parent;
-       }
+       get_node_path(&pdev->dev, path);
 }
 EXPORT_SYMBOL(get_pci_node_path);
 
@@ -314,19 +347,43 @@
 
 #endif /* defined(CONFIG_PCI) || defined(CONFIG_ISA) */
 
+static void setup_bus_id(struct parisc_device *padev)
+{
+       struct hardware_path path;
+       char *output = padev->dev.bus_id;
+       int i;
+
+       get_node_path(padev->dev.parent, &path);
 
-struct parisc_device * create_tree_node(char id, struct parisc_device *parent,
-               struct parisc_device **insert)
+       for (i = 0; i < 6; i++) {
+               if (path.bc[i] == -1)
+                       continue;
+               output += sprintf(output, "%u:", (unsigned char) path.bc[i]);
+       }
+       sprintf(output, "%u", (unsigned char) padev->hw_path);
+}
+
+struct parisc_device * create_tree_node(char id, struct device *parent)
 {
        struct parisc_device *dev = kmalloc(sizeof(*dev), GFP_KERNEL);
        if (!dev)
                return NULL;
+
        memset(dev, 0, sizeof(*dev));
        dev->hw_path = id;
        dev->id.hw_type = HPHW_FAULTY;
-       dev->parent = parent;
-       dev->sibling = *insert;
-       *insert = dev;
+
+       dev->dev.parent = parent;
+       setup_bus_id(dev);
+
+       dev->dev.bus = &parisc_bus_type;
+       dev->dma_mask = 0xffffffffUL;   /* PARISC devices are 32-bit */
+
+       /* make the generic dma mask a pointer to the parisc one */
+       dev->dev.dma_mask = &dev->dma_mask;
+       dev->dev.coherent_dma_mask = dev->dma_mask;
+       device_register(&dev->dev);
+
        return dev;
 }
 
@@ -338,36 +395,27 @@
  * Checks all the children of @parent for a matching @id.  If none
  * found, it allocates a new device and returns it.
  */
-struct parisc_device *
-alloc_tree_node(struct parisc_device *parent, char id)
+static struct parisc_device * alloc_tree_node(struct device *parent, char id)
 {
-       struct parisc_device *prev;
-       if ((!parent->child) || (parent->child->hw_path > id)) {
-               return create_tree_node(id, parent, &parent->child);
-       }
-
-       prev = parent->child;
-       if (prev->hw_path == id)
-               return prev;
+       struct device *dev;
 
-       while (prev->sibling && prev->sibling->hw_path < id) {
-               prev = prev->sibling;
+       list_for_each_entry(dev, &parent->children, node) {
+               struct parisc_device *padev = to_parisc_device(dev);
+               if (padev->hw_path == id)
+                       return padev;
        }
 
-       if ((prev->sibling) && (prev->sibling->hw_path == id))
-               return prev->sibling;
-
-       return create_tree_node(id, parent, &prev->sibling);
+       return create_tree_node(id, parent);
 }
 
-static struct parisc_device *find_parisc_device(struct hardware_path *modpath)
+static struct parisc_device *create_parisc_device(struct hardware_path 
*modpath)
 {
        int i;
-       struct parisc_device *parent = &root;
+       struct device *parent = &root;
        for (i = 0; i < 6; i++) {
                if (modpath->bc[i] == -1)
                        continue;
-               parent = alloc_tree_node(parent, modpath->bc[i]);
+               parent = &alloc_tree_node(parent, modpath->bc[i])->dev;
        }
        return alloc_tree_node(parent, modpath->mod);
 }
@@ -389,7 +437,7 @@
        if (status != PDC_OK)
                return NULL;
 
-       dev = find_parisc_device(mod_path);
+       dev = create_parisc_device(mod_path);
        if (dev->id.hw_type != HPHW_FAULTY) {
                char p[64];
                print_pa_hwpath(dev, p);
@@ -414,12 +462,37 @@
 
 static int parisc_generic_match(struct device *dev, struct device_driver *drv)
 {
-       return  match_device(to_parisc_driver(drv), to_parisc_device(dev));
+       return match_device(to_parisc_driver(drv), to_parisc_device(dev));
 }
 
+#define pa_dev_attr(name, field, format_string)                                
\
+static ssize_t name##_show(struct device *dev, char *buf)              \
+{                                                                      \
+       struct parisc_device *padev = to_parisc_device(dev);            \
+       return sprintf(buf, format_string, padev->field);               \
+}
+
+#define pa_dev_attr_id(field, format) pa_dev_attr(field, id.field, format)
+
+pa_dev_attr(irq, irq, "%u\n");
+pa_dev_attr_id(hw_type, "0x%02x\n");
+pa_dev_attr(rev, id.hversion_rev, "0x%x\n");
+pa_dev_attr_id(hversion, "0x%03x\n");
+pa_dev_attr_id(sversion, "0x%05x\n");
+
+static struct device_attribute parisc_device_attrs[] = {
+       __ATTR_RO(irq),
+       __ATTR_RO(hw_type),
+       __ATTR_RO(rev),
+       __ATTR_RO(hversion),
+       __ATTR_RO(sversion),
+       __ATTR_NULL,
+};
+
 struct bus_type parisc_bus_type = {
        .name = "parisc",
        .match = parisc_generic_match,
+       .dev_attrs = parisc_device_attrs,
 };
 
 /**
@@ -440,6 +513,104 @@
        return 0;
 }
 
+/**
+ * match_pci_device - Matches a pci device against a given hardware path
+ * entry.
+ * @dev: the generic device (known to be contained by a pci_dev).
+ * @index: the current BC index
+ * @modpath: the hardware path.
+ * @return: true if the device matches the hardware path.
+ */
+static int match_pci_device(struct device *dev, int index,
+               struct hardware_path *modpath)
+{
+       struct pci_dev *pdev = to_pci_dev(dev);
+       int id;
+
+       if (index == 5) {
+               /* we are at the end of the path, and on the actual device */
+               unsigned int devfn = pdev->devfn;
+               return ((modpath->bc[5] == PCI_SLOT(devfn)) &&
+                                       (modpath->mod == PCI_FUNC(devfn)));
+       }
+
+       id = PCI_SLOT(pdev->devfn) | (PCI_FUNC(pdev->devfn) << 5);
+       return (modpath->bc[index] == id);
+}
+
+/**
+ * match_parisc_device - Matches a parisc device against a given hardware
+ * path entry.
+ * @dev: the generic device (known to be contained by a parisc_device).
+ * @index: the current BC index
+ * @modpath: the hardware path.
+ * @return: true if the device matches the hardware path.
+ */
+static int match_parisc_device(struct device *dev, int index,
+               struct hardware_path *modpath)
+{
+       struct parisc_device *curr = to_parisc_device(dev);
+       char id = (index == 6) ? modpath->mod : modpath->bc[index];
+
+       return (curr->hw_path == id);
+}
+
+/**
+ * parse_tree_node - returns a device entry in the iotree
+ * @parent: the parent node in the tree
+ * @index: the current BC index
+ * @modpath: the hardware_path struct to match a device against
+ * @return: The corresponding device if found, NULL otherwise.
+ *
+ * Checks all the children of @parent for a matching @id.  If none
+ * found, it returns NULL.
+ */
+static struct device *
+parse_tree_node(struct device *parent, int index, struct hardware_path 
*modpath)
+{
+       struct device *device;
+        
+       list_for_each_entry(device, &parent->children, node) {
+               if (device->bus == &parisc_bus_type) {
+                       if (match_parisc_device(device, index, modpath))
+                               return device;
+               } else if (is_pci_dev(device)) {
+                       if (match_pci_device(device, index, modpath))
+                               return device;
+               } else if (device->bus == NULL) {
+                       /* we are on a bus bridge */
+                       struct device *new = parse_tree_node(device, index, 
modpath);
+                       if (new)
+                               return new;
+               }
+       }
+
+       return NULL;
+}
+
+/**
+ * hwpath_to_device - Finds the generic device corresponding to a given 
hardware path.
+ * @modpath: the hardware path.
+ * @return: The target device, NULL if not found.
+ */
+struct device *hwpath_to_device(struct hardware_path *modpath)
+{
+       int i;
+       struct device *parent = &root;
+       for (i = 0; i < 6; i++) {
+               if (modpath->bc[i] == -1)
+                       continue;
+               parent = parse_tree_node(parent, i, modpath);
+               if (!parent)
+                       return NULL;
+       }
+       if (is_pci_dev(parent)) /* pci devices already parse MOD */
+               return parent;
+       else
+               return parse_tree_node(parent, 6, modpath);
+}
+EXPORT_SYMBOL(hwpath_to_device);
+
 #define BC_PORT_MASK 0x8
 #define BC_LOWER_PORT 0x8
 
@@ -447,7 +618,7 @@
         ((dev->id.hw_type == HPHW_IOA) || (dev->id.hw_type == HPHW_BCPORT))
 
 #define IS_LOWER_PORT(dev) \
-        ((gsc_readl(&((struct bc_module *)dev->hpa)->io_status) \
+        ((gsc_readl(dev->hpa + offsetof(struct bc_module, io_status)) \
                 & BC_PORT_MASK) == BC_LOWER_PORT)
 
 #define MAX_NATIVE_DEVICES 64
@@ -456,11 +627,11 @@
 #define FLEX_MASK      F_EXTEND(0xfffc0000)
 #define IO_IO_LOW      offsetof(struct bc_module, io_io_low)
 #define IO_IO_HIGH     offsetof(struct bc_module, io_io_high)
-#define READ_IO_IO_LOW(dev)  (unsigned long)(signed int)__raw_readl(dev->hpa + 
IO_IO_LOW)
-#define READ_IO_IO_HIGH(dev) (unsigned long)(signed int)__raw_readl(dev->hpa + 
IO_IO_HIGH)
+#define READ_IO_IO_LOW(dev)  (unsigned long)(signed int)gsc_readl(dev->hpa + 
IO_IO_LOW)
+#define READ_IO_IO_HIGH(dev) (unsigned long)(signed int)gsc_readl(dev->hpa + 
IO_IO_HIGH)
 
 static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
-                            struct parisc_device *parent);
+                            struct device *parent);
 
 void walk_lower_bus(struct parisc_device *dev)
 {
@@ -477,7 +648,7 @@
                io_io_high = (READ_IO_IO_HIGH(dev)+ ~FLEX_MASK) & FLEX_MASK;
        }
 
-       walk_native_bus(io_io_low, io_io_high, dev);
+       walk_native_bus(io_io_low, io_io_high, &dev->dev);
 }
 
 /**
@@ -493,7 +664,7 @@
  * keyboard ports).  This problem is not yet solved.
  */
 static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
-                            struct parisc_device *parent)
+                            struct device *parent)
 {
        int i, devices_found = 0;
        unsigned long hpa = io_io_low;
@@ -535,25 +706,6 @@
                        &root);
 }
 
-void fixup_child_irqs(struct parisc_device *parent, int base,
-                       int (*choose_irq)(struct parisc_device *))
-{
-       struct parisc_device *dev;
-
-       if (!parent->child)
-               return;
-
-       for (dev = check_dev(parent->child); dev; dev = dev->sibling) {
-               int irq = choose_irq(dev);
-               if (irq > 0) {
-#ifdef __LP64__
-                       irq += 32;
-#endif
-                       dev->irq = base + irq;
-               }
-       }
-}
-
 static void print_parisc_device(struct parisc_device *dev)
 {
        char hw_path[64];
@@ -573,68 +725,14 @@
        printk("\n");
 }
 
-void print_subdevices(struct parisc_device *parent)
-{
-       struct parisc_device *dev;
-       for (dev = parent->child; dev != parent->sibling; dev = next_dev(dev)) {
-               print_parisc_device(dev);
-       }
-}
-
-
-/*
- * parisc_generic_device_register_recursive() - internal function to 
recursively
- *     register all parisc devices
- */
-static void parisc_generic_device_register_recursive( struct parisc_device 
*dev )
-{
-       char tmp1[32];
-       
-       /* has this device been registered already ? */
-       if (dev->dev.dma_mask != NULL)
-               return;
-       
-       /* register all parents recursively */
-       if (dev->parent && dev->parent!=&root)
-               parisc_generic_device_register_recursive(dev->parent);
-       
-       /* set up the generic device tree for this */
-       snprintf(tmp1, sizeof(tmp1), "%d", dev->hw_path);
-       if (dev->parent && dev->parent != &root) {
-               struct parisc_device *ndev;
-               char tmp2[32];
-
-               dev->dev.parent = &dev->parent->dev;
-               for(ndev = dev->parent; ndev != &root;
-                   ndev = ndev->parent) {
-                       snprintf(tmp2, sizeof(tmp2), "%d:%s",
-                                ndev->hw_path, tmp1);
-                       strlcpy(tmp1, tmp2, sizeof(tmp1));
-               }
-       }
-
-       dev->dev.bus = &parisc_bus_type;
-       snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), "parisc%s",
-                tmp1);
-       /* make the generic dma mask a pointer to the parisc one */
-       dev->dev.dma_mask = &dev->dma_mask;
-       dev->dev.coherent_dma_mask = dev->dma_mask;
-       pr_debug("device_register(%s)\n", dev->dev.bus_id);
-       device_register(&dev->dev);
-}
-
-/*
- * parisc_generic_device_register() - register all parisc devices
+/**
+ * init_parisc_bus - Some preparation to be done before inventory
  */
-void parisc_generic_device_register(void)
+void init_parisc_bus(void)
 {
-       struct parisc_device *dev;
-       
        bus_register(&parisc_bus_type);
-
-       for_each_padev(dev) {
-               parisc_generic_device_register_recursive( dev );
-       }
+       device_register(&root);
+       get_device(&root);
 }
 
 /**
diff -urN linux/arch/parisc/kernel/firmware.c 
linux/arch/parisc/kernel/firmware.c
--- linux/arch/parisc/kernel/firmware.c 2004/11/15 11:49:19     1.8
+++ linux/arch/parisc/kernel/firmware.c 2005/01/25 04:28:00     1.9
@@ -11,6 +11,7 @@
  * Copyright 1999 The Puffin Group, (Alex deVries, David Kennedy)
  * Copyright 2003 Grant Grundler <grundler parisc-linux org>
  * Copyright 2003,2004 Ryan Bradetich <rbrad@parisc-linux.org>
+ * Copyright 2004 Thibaut VARENE <varenet@parisc-linux.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
@@ -69,7 +70,7 @@
 #include <asm/system.h>
 #include <asm/processor.h>     /* for boot_cpu_data */
 
-static spinlock_t pdc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pdc_lock);
 static unsigned long pdc_result[32] __attribute__ ((aligned (8)));
 static unsigned long pdc_result2[32] __attribute__ ((aligned (8)));
 
@@ -573,14 +574,118 @@
 }
 EXPORT_SYMBOL(pdc_lan_station_id);
 
+/**
+ * pdc_stable_read - Read data from Stable Storage.
+ * @staddr: Stable Storage address to access.
+ * @memaddr: The memory address where Stable Storage data shall be copied.
+ * @count: number of bytes to transfert. count is multiple of 4.
+ *
+ * This PDC call reads from the Stable Storage address supplied in staddr
+ * and copies count bytes to the memory address memaddr.
+ * The call will fail if staddr+count > PDC_STABLE size.
+ */
+int pdc_stable_read(unsigned long staddr, void *memaddr, unsigned long count)
+{
+       int retval;
+
+       spin_lock_irq(&pdc_lock);
+       retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_READ, staddr,
+               __pa(pdc_result), count);
+       convert_to_wide(pdc_result);
+       memcpy(memaddr, pdc_result, count);
+       spin_unlock_irq(&pdc_lock);
+
+       return retval;
+}
+EXPORT_SYMBOL(pdc_stable_read);
+
+/**
+ * pdc_stable_write - Write data to Stable Storage.
+ * @staddr: Stable Storage address to access.
+ * @memaddr: The memory address where Stable Storage data shall be read from.
+ * @count: number of bytes to transfert. count is multiple of 4.
+ *
+ * This PDC call reads count bytes from the supplied memaddr address,
+ * and copies count bytes to the Stable Storage address staddr.
+ * The call will fail if staddr+count > PDC_STABLE size.
+ */
+int pdc_stable_write(unsigned long staddr, void *memaddr, unsigned long count)
+{
+       int retval;
+
+       spin_lock_irq(&pdc_lock);
+       memcpy(pdc_result, memaddr, count);
+       convert_to_wide(pdc_result);
+       retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_WRITE, staddr,
+               __pa(pdc_result), count);
+       spin_unlock_irq(&pdc_lock);
+
+       return retval;
+}
+EXPORT_SYMBOL(pdc_stable_write);
+
+/**
+ * pdc_stable_get_size - Get Stable Storage size in bytes.
+ * @size: pointer where the size will be stored.
+ *
+ * This PDC call returns the number of bytes in the processor's Stable
+ * Storage, which is the number of contiguous bytes implemented in Stable
+ * Storage starting from staddr=0. size in an unsigned 64-bit integer
+ * which is a multiple of four.
+ */
+int pdc_stable_get_size(unsigned long *size)
+{
+       int retval;
+
+       spin_lock_irq(&pdc_lock);
+       retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_RETURN_SIZE, 
__pa(pdc_result));
+       *size = pdc_result[0];
+       spin_unlock_irq(&pdc_lock);
+
+       return retval;
+}
+EXPORT_SYMBOL(pdc_stable_get_size);
+
+/**
+ * pdc_stable_verify_contents - Checks that Stable Storage contents are valid.
+ *
+ * This PDC call is meant to be used to check the integrity of the current
+ * contents of Stable Storage.
+ */
+int pdc_stable_verify_contents(void)
+{
+       int retval;
+
+       spin_lock_irq(&pdc_lock);
+       retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_VERIFY_CONTENTS);
+       spin_unlock_irq(&pdc_lock);
+
+       return retval;
+}
+EXPORT_SYMBOL(pdc_stable_verify_contents);
+
+/**
+ * pdc_stable_initialize - Sets Stable Storage contents to zero and initialize
+ * the validity indicator.
+ *
+ * This PDC call will erase all contents of Stable Storage. Use with care!
+ */
+int pdc_stable_initialize(void)
+{
+       int retval;
+
+       spin_lock_irq(&pdc_lock);
+       retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_INITIALIZE);
+       spin_unlock_irq(&pdc_lock);
+
+       return retval;
+}
+EXPORT_SYMBOL(pdc_stable_initialize);
 
 /**
  * pdc_get_initiator - Get the SCSI Interface Card params (SCSI ID, SDTR, SE 
or LVD)
  * @hwpath: fully bc.mod style path to the device.
- * @scsi_id: what someone told firmware the ID should be.
- * @period: time in cycles 
- * @width: 8 or 16-bit wide bus
- * @mode: 0,1,2 -> SE,HVD,LVD signalling mode
+ * @initiator: the array to return the result into
  *
  * Get the SCSI operational parameters from PDC.
  * Needed since HPUX never used BIOS or symbios card NVRAM.
@@ -591,8 +696,7 @@
  *    o cable too long (ie SE scsi 10Mhz won't support 6m length),
  *    o bus width exported is less than what the interface chip supports.
  */
-int pdc_get_initiator(struct hardware_path *hwpath, unsigned char *scsi_id,
-               unsigned long *period, char *width, char *mode)
+int pdc_get_initiator(struct hardware_path *hwpath, struct pdc_initiator 
*initiator)
 {
        int retval;
 
@@ -604,44 +708,38 @@
 
        retval = mem_pdc_call(PDC_INITIATOR, PDC_GET_INITIATOR, 
                              __pa(pdc_result), __pa(hwpath));
-
        if (retval < PDC_OK)
-               goto fail;
-
-       *scsi_id = (unsigned char) pdc_result[0];
+               goto out;
 
-       /* convert Bus speed in Mhz to period (in 1/10 ns) */
-       switch (pdc_result[1]) {
-               /*
-                * case  0:   driver determines rate
-                * case -1:   Settings are uninitialized.
-                */
-               case  5:  *period = 2000; break;
-               case 10:  *period = 1000; break;
-               case 20:  *period = 500; break;
-               case 40:  *period = 250; break;
-               case 80:  *period = 125; break;
-               default: /* Do nothing */ break;
+       if (pdc_result[0] < 16) {
+               initiator->host_id = pdc_result[0];
+       } else {
+               initiator->host_id = -1;
        }
 
-       /* 
-        * pdc_result[2]        PDC suggested SCSI id
-        * pdc_result[3]        PDC suggested SCSI rate
+       /*
+        * Sprockets and Piranha return 20 or 40 (MT/s).  Prelude returns
+        * 1, 2, 5 or 10 for 5, 10, 20 or 40 MT/s, respectively
         */
+       switch (pdc_result[1]) {
+               case  1: initiator->factor = 50; break;
+               case  2: initiator->factor = 25; break;
+               case  5: initiator->factor = 12; break;
+               case 25: initiator->factor = 10; break;
+               case 20: initiator->factor = 12; break;
+               case 40: initiator->factor = 10; break;
+               default: initiator->factor = -1; break;
+       }
 
        if (IS_SPROCKETS()) {
-               /* 0 == 8-bit, 1 == 16-bit */
-               *width = (char) pdc_result[4];
-
-               /* ...in case someone needs it in the future.
-                * sym53c8xx.c comments say it can't autodetect
-                * for 825/825A/875 chips.
-                *      0 == SE, 1 == HVD, 2 == LVD
-                */
-               *mode = (char) pdc_result[5]; 
+               initiator->width = pdc_result[4];
+               initiator->mode = pdc_result[5];
+       } else {
+               initiator->width = -1;
+               initiator->mode = -1;
        }
 
- fail:
+ out:
        spin_unlock_irq(&pdc_lock);
        return (retval >= PDC_OK);
 }
diff -urN linux/arch/parisc/kernel/inventory.c 
linux/arch/parisc/kernel/inventory.c
--- linux/arch/parisc/kernel/inventory.c        2004/08/14 16:16:41     1.7
+++ linux/arch/parisc/kernel/inventory.c        2005/01/25 04:28:00     1.8
@@ -518,7 +518,7 @@
 }
 
 /**
- * do_system_map_inventory - Retrieve firmware devices via SYSTEM_MAP.
+ * system_map_inventory - Retrieve firmware devices via SYSTEM_MAP.
  *
  * This function attempts to retrieve and register all the devices firmware
  * knows about via the SYSTEM_MAP PDC call.
@@ -528,16 +528,18 @@
        int i;
        long status = PDC_OK;
     
-       for (i = 0; status != PDC_BAD_PROC && status != PDC_NE_MOD; i++) {
+       for (i = 0; i < 256; i++) {
                struct parisc_device *dev;
                struct pdc_system_map_mod_info module_result;
                struct pdc_module_path module_path;
 
                status = pdc_system_map_find_mods(&module_result,
                                &module_path, i);
+               if ((status == PDC_BAD_PROC) || (status == PDC_NE_MOD))
+                       break;
                if (status != PDC_OK)
                        continue;
-               
+
                dev = alloc_pa_dev(module_result.mod_addr, &module_path.path);
                if (!dev)
                        continue;
@@ -584,10 +586,10 @@
 
 void __init do_device_inventory(void)
 {
-       extern void parisc_generic_device_register(void);
-
        printk(KERN_INFO "Searching for devices...\n");
 
+       init_parisc_bus();
+
        switch (pdc_type) {
 
        case PDC_TYPE_PAT:
@@ -605,7 +607,6 @@
        default:
                panic("Unknown PDC type!\n");
        }
-       parisc_generic_device_register();
        printk(KERN_INFO "Found devices:\n");
        print_parisc_devices();
 }
diff -urN linux/arch/parisc/kernel/irq.c linux/arch/parisc/kernel/irq.c
--- linux/arch/parisc/kernel/irq.c      2004/08/14 16:16:41     1.17
+++ linux/arch/parisc/kernel/irq.c      2005/01/25 04:28:00     1.18
@@ -54,21 +54,19 @@
 #define DBG_IRQ(irq, x)        do { } while (0)
 #endif /* DEBUG_IRQ */
 
-#define EIEM_MASK(irq)       (1UL<<(MAX_CPU_IRQ-IRQ_OFFSET(irq)))
+#define EIEM_MASK(irq)       (1UL<<(CPU_IRQ_MAX - irq))
 
 /* Bits in EIEM correlate with cpu_irq_action[].
 ** Numbered *Big Endian*! (ie bit 0 is MSB)
 */
 static volatile unsigned long cpu_eiem = 0;
 
-static spinlock_t irq_lock = SPIN_LOCK_UNLOCKED;  /* protect IRQ regions */
-
 static void cpu_set_eiem(void *info)
 {
        set_eiem((unsigned long) info);
 }
 
-static inline void disable_cpu_irq(void *unused, int irq)
+static inline void cpu_disable_irq(unsigned int irq)
 {
        unsigned long eirr_bit = EIEM_MASK(irq);
 
@@ -76,7 +74,7 @@
         on_each_cpu(cpu_set_eiem, (void *) cpu_eiem, 1, 1);
 }
 
-static void enable_cpu_irq(void *unused, int irq)
+static void cpu_enable_irq(unsigned int irq)
 {
        unsigned long eirr_bit = EIEM_MASK(irq);
 
@@ -85,172 +83,56 @@
         on_each_cpu(cpu_set_eiem, (void *) cpu_eiem, 1, 1);
 }
 
-/* mask and disable are the same at the CPU level
-** Difference is enable clears pending interrupts
-*/
-#define mask_cpu_irq   disable_cpu_irq
-
-static inline void unmask_cpu_irq(void *unused, int irq)
+static unsigned int cpu_startup_irq(unsigned int irq)
 {
-       unsigned long eirr_bit = EIEM_MASK(irq);
-       cpu_eiem |= eirr_bit;
-       /* NOTE: sending an IPI will cause do_cpu_irq_mask() to
-       ** handle *any* unmasked pending interrupts.
-       ** ie We don't need to check for pending interrupts here.
-       */
-        on_each_cpu(cpu_set_eiem, (void *) cpu_eiem, 1, 1);
+       cpu_enable_irq(irq);
+       return 0;
 }
 
-/*
- * XXX cpu_irq_actions[] will become 2 dimensional for per CPU EIR support.
- * correspond changes needed in:
- *     processor_probe()       initialize additional action arrays
- *     request_irq()           handle CPU IRQ region specially
- *     do_cpu_irq_mask()       index into the matching irq_action array.
- */
-struct irqaction cpu_irq_actions[IRQ_PER_REGION] = {
-       [IRQ_OFFSET(TIMER_IRQ)] = {
-                                       .handler = timer_interrupt,
-                                       .name = "timer",
-                               },
-#ifdef CONFIG_SMP
-       [IRQ_OFFSET(IPI_IRQ)]   = {
-                                       .handler = ipi_interrupt,
-                                       .name = "IPI",
-                               },
-#endif
-};
+void no_ack_irq(unsigned int irq) { }
+void no_end_irq(unsigned int irq) { }
 
-
-struct irq_region cpu0_irq_region = {
-       .ops    = {
-                       .disable_irq    = disable_cpu_irq,
-                       .enable_irq     = enable_cpu_irq,
-                       .mask_irq       = unmask_cpu_irq,
-                       .unmask_irq     = unmask_cpu_irq
-       },
-       .data   = {
-                       .dev            = &cpu_data[0],
-                       .name           = "PARISC-CPU",
-                       .irqbase        = IRQ_FROM_REGION(CPU_IRQ_REGION),
-       },
-       .action = cpu_irq_actions,
-};
-
-struct irq_region *irq_region[NR_IRQ_REGS] = {
-       [ 0 ]              = NULL, /* reserved for EISA, else causes data page 
fault (aka code 15) */
-       [ CPU_IRQ_REGION ] = &cpu0_irq_region,
+static struct hw_interrupt_type cpu_interrupt_type = {
+       .typename       = "CPU",
+       .startup        = cpu_startup_irq,
+       .shutdown       = cpu_disable_irq,
+       .enable         = cpu_enable_irq,
+       .disable        = cpu_disable_irq,
+       .ack            = no_ack_irq,
+       .end            = no_end_irq,
+//     .set_affinity   = cpu_set_affinity_irq,
 };
 
-
-/*
-** Generic interfaces that device drivers can use:
-**    mask_irq()       block IRQ
-**    unmask_irq()     re-enable IRQ and trigger if IRQ is pending
-**    disable_irq()    block IRQ
-**    enable_irq()     clear pending and re-enable IRQ
-*/
-
-void mask_irq(int irq)
-{
-       struct irq_region *region;
-
-       DBG_IRQ(irq, ("mask_irq(%d) %d+%d eiem 0x%lx\n", irq,
-                               IRQ_REGION(irq), IRQ_OFFSET(irq), cpu_eiem));
-       irq = irq_canonicalize(irq);
-       region = irq_region[IRQ_REGION(irq)];
-       if (region->ops.mask_irq)
-               region->ops.mask_irq(region->data.dev, IRQ_OFFSET(irq));
-}
-
-void unmask_irq(int irq)
-{
-       struct irq_region *region;
-
-       DBG_IRQ(irq, ("unmask_irq(%d) %d+%d eiem 0x%lx\n", irq,
-                               IRQ_REGION(irq), IRQ_OFFSET(irq), cpu_eiem));
-       irq = irq_canonicalize(irq);
-       region = irq_region[IRQ_REGION(irq)];
-       if (region->ops.unmask_irq)
-               region->ops.unmask_irq(region->data.dev, IRQ_OFFSET(irq));
-}
-
-void disable_irq(int irq)
-{
-       struct irq_region *region;
-
-       DBG_IRQ(irq, ("disable_irq(%d) %d+%d eiem 0x%lx\n", irq,
-                               IRQ_REGION(irq), IRQ_OFFSET(irq), cpu_eiem));
-       irq = irq_canonicalize(irq);
-       region = irq_region[IRQ_REGION(irq)];
-       if (region->ops.disable_irq)
-               region->ops.disable_irq(region->data.dev, IRQ_OFFSET(irq));
-       else
-               BUG();
-}
-EXPORT_SYMBOL(disable_irq);
-
-void enable_irq(int irq)
-{
-       struct irq_region *region;
-
-       DBG_IRQ(irq, ("enable_irq(%d) %d+%d EIRR 0x%lx EIEM 0x%lx\n", irq,
-                               IRQ_REGION(irq), IRQ_OFFSET(irq), mfctl(23), 
mfctl(15)));
-       irq = irq_canonicalize(irq);
-       region = irq_region[IRQ_REGION(irq)];
-
-       if (region->ops.enable_irq)
-               region->ops.enable_irq(region->data.dev, IRQ_OFFSET(irq));
-       else
-               BUG();
-}
-EXPORT_SYMBOL(enable_irq);
-
 int show_interrupts(struct seq_file *p, void *v)
 {
-#ifdef CONFIG_PROC_FS
-       unsigned int regnr = *(loff_t *) v, i = 0;
+       int i = *(loff_t *) v, j;
+       unsigned long flags;
 
-       if (regnr == 0) {
-               seq_puts(p, "     ");
-#ifdef CONFIG_SMP
-               for (i = 0; i < NR_CPUS; i++)
-                       if (cpu_online(i))
-#endif
-                               seq_printf(p, "      CPU%02d ", i);
+       if (i == 0) {
+               seq_puts(p, "    ");
+               for_each_online_cpu(j)
+                       seq_printf(p, "       CPU%d", j);
 
 #ifdef PARISC_IRQ_CR16_COUNTS
-               seq_printf(p, "[min/avg/max] (CPU cycle counts)");
+               seq_printf(p, " [min/avg/max] (CPU cycle counts)");
 #endif
                seq_putc(p, '\n');
        }
 
-       /* We don't need *irqsave lock variants since this is
-       ** only allowed to change while in the base context.
-       */
-       spin_lock(&irq_lock);
-       if (regnr < NR_IRQ_REGS) {
-           struct irq_region *region = irq_region[regnr];
-
-            if (!region || !region->action)
-                   goto skip;
-
-           for (i = 0; i <= MAX_CPU_IRQ; i++) {
-               struct irqaction *action = &region->action[i];
-               unsigned int irq_no = IRQ_FROM_REGION(regnr) + i;
-               int j = 0;
-               if (!action->handler)
-                       continue;
-
-               seq_printf(p, "%3d: ", irq_no);
+       if (i < NR_IRQS) {
+               spin_lock_irqsave(&irq_desc[i].lock, flags);
+               struct irqaction *action = irq_desc[i].action;
+               if (!action)
+                       goto skip;
+               seq_printf(p, "%3d: ", i);
 #ifdef CONFIG_SMP
-               for (; j < NR_CPUS; j++)
-                       if (cpu_online(j))
+               for_each_online_cpu(j)
+                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+#else
+               seq_printf(p, "%10u ", kstat_irqs(i));
 #endif
-                 seq_printf(p, "%10u ", kstat_cpu(j).irqs[irq_no]);
 
-               seq_printf(p, " %14s",
-                           region->data.name ? region->data.name : "N/A");
+               seq_printf(p, " %14s", irq_desc[i].handler->typename);
 #ifndef PARISC_IRQ_CR16_COUNTS
                seq_printf(p, "  %s", action->name);
 
@@ -281,12 +163,10 @@
 #endif
 
                seq_putc(p, '\n');
-           }
+ skip:
+               spin_unlock_irqrestore(&irq_desc[i].lock, flags);
        }
-  skip:
-       spin_unlock(&irq_lock);
 
-#endif /* CONFIG_PROC_FS */
        return 0;
 }
 
@@ -300,34 +180,42 @@
 ** Then use that to get the Transaction address and data.
 */
 
-int
-txn_alloc_irq(void)
+int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *type, void *data)
 {
-       int irq;
-
-       /* never return irq 0 cause that's the interval timer */
-       for (irq = 1; irq <= MAX_CPU_IRQ; irq++) {
-               if (cpu_irq_actions[irq].handler == NULL) {
-                       return (IRQ_FROM_REGION(CPU_IRQ_REGION) + irq);
-               }
+       if (irq_desc[irq].action)
+               return -EBUSY;
+       if (irq_desc[irq].handler != &cpu_interrupt_type)
+               return -EBUSY;
+
+       if (type) {
+               irq_desc[irq].handler = type;
+               irq_desc[irq].handler_data = data;
+               cpu_interrupt_type.enable(irq);
        }
+       return 0;
+}
 
-       /* unlikely, but be prepared */
-       return -1;
+int txn_claim_irq(int irq)
+{
+       return cpu_claim_irq(irq, NULL, NULL) ? -1 : irq;
 }
 
-int
-txn_claim_irq(int irq)
+int txn_alloc_irq(void)
 {
-       if (irq_region[IRQ_REGION(irq)]->action[IRQ_OFFSET(irq)].handler ==NULL)
+       int irq;
+
+       /* never return irq 0 cause that's the interval timer */
+       for (irq = CPU_IRQ_BASE + 1; irq <= CPU_IRQ_MAX; irq++) {
+               if (cpu_claim_irq(irq, NULL, NULL) < 0)
+                       continue;
                return irq;
+       }
 
        /* unlikely, but be prepared */
        return -1;
 }
 
-unsigned long
-txn_alloc_addr(int virt_irq)
+unsigned long txn_alloc_addr(int virt_irq)
 {
        static int next_cpu = -1;
 
@@ -364,68 +252,20 @@
 ** I/O subsystem supports more bits than PA2.0 has. The first
 ** case is the problem.
 */
-unsigned int
-txn_alloc_data(int virt_irq, unsigned int bits_wide)
+unsigned int txn_alloc_data(int virt_irq, unsigned int bits_wide)
 {
        /* XXX FIXME : bits_wide indicates how wide the transaction
        ** data is allowed to be...we may need a different virt_irq
        ** if this one won't work. Another reason to index virtual
        ** irq's into a table which can manage CPU/IRQ bit separately.
        */
-       if (IRQ_OFFSET(virt_irq) > (1 << (bits_wide -1)))
-       {
+       if ((virt_irq - CPU_IRQ_BASE) > (1 << (bits_wide - 1))) {
                panic("Sorry -- didn't allocate valid IRQ for this device\n");
        }
 
-       return (IRQ_OFFSET(virt_irq));
+       return virt_irq - CPU_IRQ_BASE;
 }
 
-void do_irq(struct irqaction *action, int irq, struct pt_regs * regs)
-{
-       int cpu = smp_processor_id();
-
-       irq_enter();
-       ++kstat_cpu(cpu).irqs[irq];
-
-       DBG_IRQ(irq, ("do_irq(%d) %d+%d eiem 0x%lx\n", irq, IRQ_REGION(irq), 
IRQ_OFFSET(irq), cpu_eiem));
-
-       for (; action; action = action->next) {
-#ifdef PARISC_IRQ_CR16_COUNTS
-               unsigned long cr_start = mfctl(16);
-#endif
-
-               if (action->handler == NULL) {
-                       if (IRQ_REGION(irq) == EISA_IRQ_REGION && 
irq_region[EISA_IRQ_REGION]) {
-                               /* were we called due to autodetecting (E)ISA 
irqs ? */
-                               unsigned int *status;
-                               status = 
&irq_region[EISA_IRQ_REGION]->data.status[IRQ_OFFSET(irq)];
-                               if (*status & IRQ_AUTODETECT) {
-                                       *status &= ~IRQ_WAITING;
-                                       continue; 
-                               }
-                       }
-                       printk(KERN_ERR "IRQ:  CPU:%d No handler for IRQ %d 
!\n", cpu, irq);
-                       continue;
-               }
-
-               action->handler(irq, action->dev_id, regs);
-
-#ifdef PARISC_IRQ_CR16_COUNTS
-               {
-                       unsigned long cr_end = mfctl(16);
-                       unsigned long tmp = cr_end - cr_start;
-                       /* check for roll over */
-                       cr_start = (cr_end < cr_start) ?  -(tmp) : (tmp);
-               }
-               action->cr16_hist[action->cr16_idx++] = (int) cr_start;
-               action->cr16_idx &= PARISC_CR16_HIST_SIZE - 1;
-#endif
-       }
-
-       irq_exit();
-}
-
-
 /* ONLY called from entry.S:intr_extint() */
 void do_cpu_irq_mask(struct pt_regs *regs)
 {
@@ -449,9 +289,12 @@
         * 3) Limit the number of times we loop to make sure other
         *    processing can occur.
         */
-       while ((eirr_val = (mfctl(23) & cpu_eiem)) && --i) {
-               unsigned long bit = (1UL<<MAX_CPU_IRQ);
+       for (;;) {
+               unsigned long bit = (1UL << (BITS_PER_LONG - 1));
                unsigned int irq;
+               eirr_val = mfctl(23) & cpu_eiem;
+               if (!eirr_val || !i--)
+                       break;
 
                mtctl(eirr_val, 23); /* reset bits we are going to process */
 
@@ -461,408 +304,52 @@
 #endif
 
                /* Work our way from MSb to LSb...same order we alloc EIRs */
-               for (irq = 0; eirr_val && bit; bit>>=1, irq++)
-               {
+               for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) {
                        if (!(bit & eirr_val & cpu_eiem))
                                continue;
 
                        /* clear bit in mask - can exit loop sooner */
                        eirr_val &= ~bit;
 
-                       do_irq(&cpu_irq_actions[irq], TIMER_IRQ+irq, regs);
+                       __do_IRQ(irq, regs);
                }
        }
        set_eiem(cpu_eiem);
 }
 
 
-/* Called from second level IRQ regions: eg dino or iosapic. */
-void do_irq_mask(unsigned long mask, struct irq_region *region, struct pt_regs 
*regs)
-{
-       unsigned long bit;
-       unsigned int irq;
-
-#ifdef DEBUG_IRQ
-       if (mask != (1L<<MAX_CPU_IRQ))
-           printk(KERN_DEBUG "do_irq_mask %08lx %p %p\n", mask, region, regs);
-#endif
-
-       for (bit = (1L<<MAX_CPU_IRQ), irq = 0; mask && bit; bit>>=1, irq++) {
-               unsigned int irq_num;
-               if (!(bit&mask))
-                       continue;
-
-               mask &= ~bit;   /* clear bit in mask - can exit loop sooner */
-               irq_num = region->data.irqbase + irq;
-
-               mask_irq(irq_num);
-               do_irq(&region->action[irq], irq_num, regs);
-               unmask_irq(irq_num);
-       }
-}
-
-
-static inline int find_free_region(void)
-{
-       int irqreg;
-
-       for (irqreg=1; irqreg <= (NR_IRQ_REGS); irqreg++) {
-               if (irq_region[irqreg] == NULL)
-                       return irqreg;
-       }
-
-       return 0;
-}
-
-
-/*****
- * alloc_irq_region - allocate/init a new IRQ region
- * @count: number of IRQs in this region.
- * @ops: function table with request/release/mask/unmask/etc.. entries.
- * @name: name of region owner for /proc/interrupts output.
- * @dev: private data to associate with the new IRQ region.
- *
- * Every IRQ must become a MMIO write to the CPU's EIRR in
- * order to get CPU service. The IRQ region represents the
- * number of unique events the region handler can (or must)
- * identify. For PARISC CPU, that's the width of the EIR Register.
- * IRQ regions virtualize IRQs (eg EISA or PCI host bus controllers)
- * for line based devices.
- */
-struct irq_region *alloc_irq_region( int count, struct irq_region_ops *ops,
-                                       const char *name, void *dev)
-{
-       struct irq_region *region;
-       int index;
-
-       index = find_free_region();
-       if (index == 0) {
-               printk(KERN_ERR "Maximum number of irq regions exceeded. 
Increase NR_IRQ_REGS!\n");
-               return NULL;
-       }
-
-       if ((IRQ_REGION(count-1)))
-               return NULL;
-
-       if (count < IRQ_PER_REGION) {
-           DBG_IRQ(0, ("alloc_irq_region() using minimum of %d irq lines for 
%s (%d)\n",
-                       IRQ_PER_REGION, name, count));
-           count = IRQ_PER_REGION;
-       }
-
-       /* if either mask *or* unmask is set, both have to be set. */
-       if((ops->mask_irq || ops->unmask_irq) &&
-               !(ops->mask_irq && ops->unmask_irq))
-                       return NULL;
-
-       /* ditto for enable/disable */
-       if( (ops->disable_irq || ops->enable_irq) &&
-               !(ops->disable_irq && ops->enable_irq) )
-                       return NULL;
-
-       region = kmalloc(sizeof(*region), GFP_ATOMIC);
-       if (!region)
-               return NULL;
-       memset(region, 0, sizeof(*region));
-
-       region->action = kmalloc(count * sizeof(*region->action), GFP_ATOMIC);
-       if (!region->action) {
-               kfree(region);
-               return NULL;
-       }
-       memset(region->action, 0, count * sizeof(*region->action));
-
-       region->ops = *ops;
-       region->data.irqbase = IRQ_FROM_REGION(index);
-       region->data.name = name;
-       region->data.dev = dev;
-
-       irq_region[index] = region;
-
-       return irq_region[index];
-}
-
-/* FIXME: SMP, flags, bottom halves, rest */
-
-int request_irq(unsigned int irq,
-               irqreturn_t (*handler)(int, void *, struct pt_regs *),
-               unsigned long irqflags,
-               const char * devname,
-               void *dev_id)
-{
-       struct irqaction * action;
+static struct irqaction timer_action = {
+       .handler = timer_interrupt,
+       .name = "timer",
+};
 
-#if 0
-       printk(KERN_INFO "request_irq(%d, %p, 0x%lx, %s, %p)\n",irq, handler, 
irqflags, devname, dev_id);
+#ifdef CONFIG_SMP
+static struct irqaction ipi_action = {
+       .handler = ipi_interrupt,
+       .name = "IPI",
+};
 #endif
 
-       irq = irq_canonicalize(irq);
-       /* request_irq()/free_irq() may not be called from interrupt context. */
-       if (in_interrupt())
-               BUG();
-
-       if (!handler) {
-               printk(KERN_ERR "request_irq(%d,...): Augh! No handler for 
irq!\n",
-                       irq);
-               return -EINVAL;
-       }
-
-       if (irq_region[IRQ_REGION(irq)] == NULL) {
-               /*
-               ** Bug catcher for drivers which use "char" or u8 for
-               ** the IRQ number. They lose the region number which
-               ** is in pcidev->irq (an int).
-               */
-               printk(KERN_ERR "%p (%s?) called request_irq with an invalid 
irq %d\n",
-                       __builtin_return_address(0), devname, irq);
-               return -EINVAL;
-       }
-
-       spin_lock(&irq_lock);
-       action = &(irq_region[IRQ_REGION(irq)]->action[IRQ_OFFSET(irq)]);
-
-       /* First one is preallocated. */
-       if (action->handler) {
-               /* But it's in use...find the tail and allocate a new one */
-               while (action->next)
-                       action = action->next;
-
-               action->next = kmalloc(sizeof(*action), GFP_ATOMIC);
-               memset(action->next, 0, sizeof(*action));
-
-               action = action->next;
-       }
-
-       if (!action) {
-               spin_unlock(&irq_lock);
-               printk(KERN_ERR "request_irq(): Augh! No action!\n") ;
-               return -ENOMEM;
-       }
-
-       action->handler = handler;
-       action->flags = irqflags;
-       cpus_clear(action->mask);
-       action->name = devname;
-       action->next = NULL;
-       action->dev_id = dev_id;
-       spin_unlock(&irq_lock);
-
-       enable_irq(irq);
-       return 0;
-}
-
-EXPORT_SYMBOL(request_irq);
-
-void free_irq(unsigned int irq, void *dev_id)
+static void claim_cpu_irqs(void)
 {
-       struct irqaction *action, **p;
-
-       /* See comments in request_irq() about interrupt context */
-       irq = irq_canonicalize(irq);
-       
-       if (in_interrupt()) BUG();
-
-       spin_lock(&irq_lock);
-       action = &irq_region[IRQ_REGION(irq)]->action[IRQ_OFFSET(irq)];
-
-       if (action->dev_id == dev_id) {
-               if (action->next == NULL) {
-                       action->handler = NULL;
-               } else {
-                       memcpy(action, action->next, sizeof(*action));
-               }
-
-               spin_unlock(&irq_lock);
-               return;
-       }
-
-       p = &action->next;
-       action = action->next;
-
-       for (; (action = *p) != NULL; p = &action->next) {
-               if (action->dev_id != dev_id)
-                       continue;
-
-               /* Found it - now free it */
-               *p = action->next;
-               kfree(action);
-
-               spin_unlock(&irq_lock);
-               return;
+       int i;
+       for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) {
+               irq_desc[i].handler = &cpu_interrupt_type;
        }
 
-       spin_unlock(&irq_lock);
-       printk(KERN_ERR "Trying to free free IRQ%d\n",irq);
-}
-
-EXPORT_SYMBOL(free_irq);
-
-
+       irq_desc[TIMER_IRQ].action = &timer_action;
+       irq_desc[TIMER_IRQ].status |= IRQ_PER_CPU;
 #ifdef CONFIG_SMP
-void synchronize_irq(unsigned int irqnum)
-{
-       while (in_irq()) ;
-}
-EXPORT_SYMBOL(synchronize_irq);
+       irq_desc[IPI_IRQ].action = &ipi_action;
+       irq_desc[IPI_IRQ].status = IRQ_PER_CPU;
 #endif
-
-
-/*
- * IRQ autodetection code..
- *
- * This depends on the fact that any interrupt that
- * comes in on to an unassigned handler will get stuck
- * with "IRQ_WAITING" cleared and the interrupt
- * disabled.
- */
-
-static DECLARE_MUTEX(probe_sem);
-
-/**
- *     probe_irq_on    - begin an interrupt autodetect
- *
- *     Commence probing for an interrupt. The interrupts are scanned
- *     and a mask of potential interrupt lines is returned.
- *
- */
-
-/* TODO: spin_lock_irq(desc->lock -> irq_lock) */
-
-unsigned long probe_irq_on(void)
-{
-       unsigned int i;
-       unsigned long val;
-       unsigned long delay;
-       struct irq_region *region;
-
-       /* support for irq autoprobing is limited to EISA (irq region 0) */
-       region = irq_region[EISA_IRQ_REGION];
-       if (!EISA_bus || !region)
-               return 0;
-
-       down(&probe_sem);
-
-       /*
-        * enable any unassigned irqs
-        * (we must startup again here because if a longstanding irq
-        * happened in the previous stage, it may have masked itself)
-        */
-       for (i = EISA_MAX_IRQS-1; i > 0; i--) {
-               struct irqaction *action;
-               
-               spin_lock_irq(&irq_lock);
-               action = region->action + i;
-               if (!action->handler) {
-                       region->data.status[i] |= IRQ_AUTODETECT | IRQ_WAITING;
-                       region->ops.enable_irq(region->data.dev,i);
-               }
-               spin_unlock_irq(&irq_lock);
-       }
-
-       /*
-        * Wait for spurious interrupts to trigger
-        */
-       for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
-               /* about 100ms delay */ barrier();
-
-       /*
-        * Now filter out any obviously spurious interrupts
-        */
-       val = 0;
-       for (i = 0; i < EISA_MAX_IRQS; i++) {
-               unsigned int status;
-
-               spin_lock_irq(&irq_lock);
-               status = region->data.status[i];
-
-               if (status & IRQ_AUTODETECT) {
-                       /* It triggered already - consider it spurious. */
-                       if (!(status & IRQ_WAITING)) {
-                               region->data.status[i] = status & 
~IRQ_AUTODETECT;
-                               region->ops.disable_irq(region->data.dev,i);
-                       } else
-                               if (i < BITS_PER_LONG)
-                                       val |= (1 << i);
-               }
-               spin_unlock_irq(&irq_lock);
-       }
-
-       return val;
-}
-
-EXPORT_SYMBOL(probe_irq_on);
-
-/*
- * Return the one interrupt that triggered (this can
- * handle any interrupt source).
- */
-
-/**
- *     probe_irq_off   - end an interrupt autodetect
- *     @val: mask of potential interrupts (unused)
- *
- *     Scans the unused interrupt lines and returns the line which
- *     appears to have triggered the interrupt. If no interrupt was
- *     found then zero is returned. If more than one interrupt is
- *     found then minus the first candidate is returned to indicate
- *     their is doubt.
- *
- *     The interrupt probe logic state is returned to its previous
- *     value.
- *
- *     BUGS: When used in a module (which arguably shouldnt happen)
- *     nothing prevents two IRQ probe callers from overlapping. The
- *     results of this are non-optimal.
- */
- 
-int probe_irq_off(unsigned long val)
-{
-        struct irq_region *region;
-       int i, irq_found, nr_irqs;
-
-        /* support for irq autoprobing is limited to EISA (irq region 0) */
-        region = irq_region[EISA_IRQ_REGION];
-        if (!EISA_bus || !region)
-               return 0;
-
-       nr_irqs = 0;
-       irq_found = 0;
-       for (i = 0; i < EISA_MAX_IRQS; i++) {
-               unsigned int status;
-               
-               spin_lock_irq(&irq_lock);
-               status = region->data.status[i];
-
-                if (status & IRQ_AUTODETECT) {
-                       if (!(status & IRQ_WAITING)) {
-                               if (!nr_irqs)
-                                       irq_found = i;
-                               nr_irqs++;
-                       }
-                       region->ops.disable_irq(region->data.dev,i);
-                       region->data.status[i] = status & ~IRQ_AUTODETECT;
-               }
-               spin_unlock_irq(&irq_lock);
-       }
-       up(&probe_sem);
-
-       if (nr_irqs > 1)
-               irq_found = -irq_found;
-       return irq_found;
-}
-
-EXPORT_SYMBOL(probe_irq_off);
-
-unsigned int probe_irq_mask(unsigned long irqs)
-{
-       return 0;
 }
-EXPORT_SYMBOL(probe_irq_mask);
 
 void __init init_IRQ(void)
 {
        local_irq_disable();    /* PARANOID - should already be disabled */
        mtctl(~0UL, 23);        /* EIRR : clear all pending external intr */
+       claim_cpu_irqs();
 #ifdef CONFIG_SMP
        if (!cpu_eiem)
                cpu_eiem = EIEM_MASK(IPI_IRQ) | EIEM_MASK(TIMER_IRQ);
@@ -873,9 +360,14 @@
 
 }
 
-#ifdef CONFIG_PROC_FS
-/* called from kernel/sysctl.c:sysctl_init() */
-void __init init_irq_proc(void)
+void hw_resend_irq(struct hw_interrupt_type *type, unsigned int irq)
 {
+       /* XXX: Needs to be written.  We managed without it so far, but
+        * we really ought to write it.
+        */
+}
+
+void ack_bad_irq(unsigned int irq)
+{
+       printk("unexpected IRQ %d\n", irq);
 }
-#endif
diff -urN linux/arch/parisc/kernel/parisc_ksyms.c 
linux/arch/parisc/kernel/parisc_ksyms.c
--- linux/arch/parisc/kernel/parisc_ksyms.c     2004/11/15 11:49:19     1.17
+++ linux/arch/parisc/kernel/parisc_ksyms.c     2005/01/25 04:28:00     1.18
@@ -87,9 +87,9 @@
 #include <asm/io.h>
 EXPORT_SYMBOL(__ioremap);
 EXPORT_SYMBOL(iounmap);
-EXPORT_SYMBOL(__memcpy_toio);
-EXPORT_SYMBOL(__memcpy_fromio);
-EXPORT_SYMBOL(__memset_io);
+EXPORT_SYMBOL(memcpy_toio);
+EXPORT_SYMBOL(memcpy_fromio);
+EXPORT_SYMBOL(memset_io);
 
 #include <asm/unistd.h>
 EXPORT_SYMBOL(sys_open);
diff -urN linux/arch/parisc/kernel/processor.c 
linux/arch/parisc/kernel/processor.c
--- linux/arch/parisc/kernel/processor.c        2004/08/14 16:16:41     1.9
+++ linux/arch/parisc/kernel/processor.c        2005/01/25 04:28:00     1.10
@@ -153,7 +153,7 @@
        p->cpuid = cpuid;       /* save CPU id */
        p->txn_addr = txn_addr; /* save CPU IRQ address */
 #ifdef CONFIG_SMP
-       p->lock = SPIN_LOCK_UNLOCKED;
+       spin_lock_init(&p->lock);
 
        /*
        ** FIXME: review if any other initialization is clobbered
diff -urN linux/arch/parisc/kernel/ptrace.c linux/arch/parisc/kernel/ptrace.c
--- linux/arch/parisc/kernel/ptrace.c   2004/11/15 11:49:19     1.12
+++ linux/arch/parisc/kernel/ptrace.c   2005/01/25 04:28:00     1.13
@@ -30,9 +30,9 @@
 #undef DEBUG_PTRACE
 
 #ifdef DEBUG_PTRACE
-#define DBG(x) printk x
+#define DBG(x...)      printk(x)
 #else
-#define DBG(x)
+#define DBG(x...)
 #endif
 
 #ifdef __LP64__
@@ -138,9 +138,9 @@
                        if (copied != sizeof(tmp))
                                goto out_tsk;
                        ret = put_user(tmp,(unsigned int *) data);
-                       DBG(("sys_ptrace(PEEK%s, %d, %lx, %lx) returning %ld, 
data %x\n",
+                       DBG("sys_ptrace(PEEK%s, %d, %lx, %lx) returning %ld, 
data %x\n",
                                request == PTRACE_PEEKTEXT ? "TEXT" : "DATA",
-                               pid, oaddr, odata, ret, tmp));
+                               pid, oaddr, odata, ret, tmp);
                }
                else
 #endif
@@ -163,9 +163,9 @@
 #ifdef __LP64__
                if (is_compat_task(child)) {
                        unsigned int tmp = (unsigned int)data;
-                       DBG(("sys_ptrace(POKE%s, %d, %lx, %lx)\n",
+                       DBG("sys_ptrace(POKE%s, %d, %lx, %lx)\n",
                                request == PTRACE_POKETEXT ? "TEXT" : "DATA",
-                               pid, oaddr, odata));
+                               pid, oaddr, odata);
                        addr &= 0xffffffffL;
                        if (access_process_vm(child, addr, &tmp, sizeof(tmp), 
1) == sizeof(tmp))
                                goto out_tsk;
@@ -194,8 +194,8 @@
 
                        tmp = *(unsigned int *) ((char *) task_regs(child) + 
addr);
                        ret = put_user(tmp, (unsigned int *) data);
-                       DBG(("sys_ptrace(PEEKUSR, %d, %lx, %lx) returning %ld, 
addr %lx, data %x\n",
-                               pid, oaddr, odata, ret, addr, tmp));
+                       DBG("sys_ptrace(PEEKUSR, %d, %lx, %lx) returning %ld, 
addr %lx, data %x\n",
+                               pid, oaddr, odata, ret, addr, tmp);
                }
                else
 #endif
@@ -234,8 +234,8 @@
                         * BEWARE, if you set N, and then single step, it won't
                         * stop on the nullified instruction.
                         */
-                       DBG(("sys_ptrace(POKEUSR, %d, %lx, %lx)\n",
-                               pid, oaddr, odata));
+                       DBG("sys_ptrace(POKEUSR, %d, %lx, %lx)\n",
+                               pid, oaddr, odata);
                        data &= USER_PSW_BITS;
                        task_regs(child)->gr[0] &= ~USER_PSW_BITS;
                        task_regs(child)->gr[0] |= data;
@@ -248,9 +248,9 @@
                                goto out_tsk;
                        if ((addr = translate_usr_offset(addr)) < 0)
                                goto out_tsk;
-                       DBG(("sys_ptrace(POKEUSR, %d, %lx, %lx) addr %lx\n",
-                               pid, oaddr, odata, addr));
-                       if (addr >= PT_FR0 && addr <= PT_FR31) {
+                       DBG("sys_ptrace(POKEUSR, %d, %lx, %lx) addr %lx\n",
+                               pid, oaddr, odata, addr);
+                       if (addr >= PT_FR0 && addr <= PT_FR31 + 4) {
                                /* Special case, fp regs are 64 bits anyway */
                                *(unsigned int *) ((char *) task_regs(child) + 
addr) = data;
                                ret = 0;
@@ -272,7 +272,7 @@
                                goto out_tsk;
                        if ((addr >= PT_GR1 && addr <= PT_GR31) ||
                                        addr == PT_IAOQ0 || addr == PT_IAOQ1 ||
-                                       (addr >= PT_FR0 && addr <= PT_FR31) ||
+                                       (addr >= PT_FR0 && addr <= PT_FR31 + 4) 
||
                                        addr == PT_SAR) {
                                *(unsigned long *) ((char *) task_regs(child) + 
addr) = data;
                                ret = 0;
@@ -283,8 +283,8 @@
        case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall 
*/
        case PTRACE_CONT:
                ret = -EIO;
-               DBG(("sys_ptrace(%s)\n",
-                       request == PTRACE_SYSCALL ? "SYSCALL" : "CONT"));
+               DBG("sys_ptrace(%s)\n",
+                       request == PTRACE_SYSCALL ? "SYSCALL" : "CONT");
                if ((unsigned long) data > _NSIG)
                        goto out_tsk;
                child->ptrace &= ~(PT_SINGLESTEP|PT_BLOCKSTEP);
@@ -302,14 +302,14 @@
                 * sigkill.  perhaps it should be put in the status
                 * that it wants to exit.
                 */
-               DBG(("sys_ptrace(KILL)\n"));
+               DBG("sys_ptrace(KILL)\n");
                if (child->exit_state == EXIT_ZOMBIE)   /* already dead */
                        goto out_tsk;
                child->exit_code = SIGKILL;
                goto out_wake_notrap;
 
        case PTRACE_SINGLEBLOCK:
-               DBG(("sys_ptrace(SINGLEBLOCK)\n"));
+               DBG("sys_ptrace(SINGLEBLOCK)\n");
                ret = -EIO;
                if ((unsigned long) data > _NSIG)
                        goto out_tsk;
@@ -326,10 +326,11 @@
                goto out_wake;
 
        case PTRACE_SINGLESTEP:
-               DBG(("sys_ptrace(SINGLESTEP)\n"));
+               DBG("sys_ptrace(SINGLESTEP)\n");
                ret = -EIO;
                if ((unsigned long) data > _NSIG)
                        goto out_tsk;
+
                clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
                child->ptrace &= ~PT_BLOCKSTEP;
                child->ptrace |= PT_SINGLESTEP;
@@ -351,7 +352,7 @@
                        /* Don't wake up the child, but let the
                           parent know something happened. */
                        si.si_code = TRAP_TRACE;
-                       si.si_addr = (void *) (task_regs(child)->iaoq[0] & ~3);
+                       si.si_addr = (void __user *) (task_regs(child)->iaoq[0] 
& ~3);
                        si.si_signo = SIGTRAP;
                        si.si_errno = 0;
                        force_sig_info(SIGTRAP, &si, child);
@@ -397,8 +398,8 @@
        put_task_struct(child);
 out:
        unlock_kernel();
-       DBG(("sys_ptrace(%ld, %d, %lx, %lx) returning %ld\n",
-               request, pid, oaddr, odata, ret));
+       DBG("sys_ptrace(%ld, %d, %lx, %lx) returning %ld\n",
+               request, pid, oaddr, odata, ret);
        return ret;
 }
 
diff -urN linux/arch/parisc/kernel/setup.c linux/arch/parisc/kernel/setup.c
--- linux/arch/parisc/kernel/setup.c    2004/08/14 16:16:41     1.13
+++ linux/arch/parisc/kernel/setup.c    2005/01/25 04:28:00     1.14
@@ -307,6 +307,8 @@
                        boot_cpu_data.cpu_hz / 1000000,
                        boot_cpu_data.cpu_hz % 1000000  );
 
+       parisc_setup_cache_timing();
+
        /* These are in a non-obvious order, will fix when we have an iotree */
 #if defined(CONFIG_IOSAPIC)
        iosapic_init();
diff -urN linux/arch/parisc/kernel/smp.c linux/arch/parisc/kernel/smp.c
--- linux/arch/parisc/kernel/smp.c      2005/01/13 14:05:31     1.17
+++ linux/arch/parisc/kernel/smp.c      2005/01/25 04:28:00     1.18
@@ -54,7 +54,7 @@
 
 #define kDEBUG 0
 
-spinlock_t smp_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(smp_lock);
 
 volatile struct task_struct *smp_init_current_idle_task;
 
@@ -277,7 +277,7 @@
 
        spin_lock_irqsave(&(p->lock),flags);
        p->pending_ipi |= 1 << op;
-       __raw_writel(IRQ_OFFSET(IPI_IRQ), cpu_data[cpu].hpa);
+       gsc_writel(IPI_IRQ - CPU_IRQ_BASE, cpu_data[cpu].hpa);
        spin_unlock_irqrestore(&(p->lock),flags);
 }
 
@@ -332,7 +332,7 @@
 {
        struct smp_call_struct data;
        unsigned long timeout;
-       static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(lock);
        int retries = 0;
 
        if (num_online_cpus() < 2)
@@ -533,7 +533,7 @@
        ** EIR{0}). MEM_RENDEZ is valid only when it is nonzero and the 
        ** contents of memory are valid."
        */
-       __raw_writel(IRQ_OFFSET(TIMER_IRQ), cpu_data[cpuid].hpa);
+       gsc_writel(TIMER_IRQ - CPU_IRQ_BASE, cpu_data[cpuid].hpa);
        mb();
 
        /* 
diff -urN linux/arch/parisc/kernel/syscall_table.S 
linux/arch/parisc/kernel/syscall_table.S
--- linux/arch/parisc/kernel/syscall_table.S    2005/01/13 14:05:31     1.7
+++ linux/arch/parisc/kernel/syscall_table.S    2005/01/25 04:28:00     1.8
@@ -275,7 +275,7 @@
        ENTRY_DIFF(rt_sigaction)
        ENTRY_DIFF(rt_sigprocmask)      /* 175 */
        ENTRY_DIFF(rt_sigpending)
-       ENTRY_UHOH(rt_sigtimedwait)
+       ENTRY_COMP(rt_sigtimedwait)
        /* even though the struct siginfo_t is different, it appears like
         * all the paths use values which should be same wide and narrow.
         * Also the struct is padded to 128 bytes which means we don't have
diff -urN linux/arch/parisc/kernel/traps.c linux/arch/parisc/kernel/traps.c
--- linux/arch/parisc/kernel/traps.c    2004/11/15 11:49:19     1.17
+++ linux/arch/parisc/kernel/traps.c    2005/01/25 04:28:00     1.18
@@ -46,7 +46,7 @@
                          /*  dumped to the console via printk)          */
 
 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
-spinlock_t pa_dbit_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(pa_dbit_lock);
 #endif
 
 int printbinary(char *buf, unsigned long x, int nbits)
@@ -385,7 +385,7 @@
  */
 void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long 
offset)
 {
-       static spinlock_t terminate_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(terminate_lock);
 
        oops_in_progress = 1;
 
diff -urN linux/arch/parisc/lib/iomap.c linux/arch/parisc/lib/iomap.c
--- linux/arch/parisc/lib/iomap.c       1970/01/01 00:00:00
+++ linux/arch/parisc/lib/iomap.c       Tue Jan 25 04:28:01 2005        1.1
@@ -0,0 +1,422 @@
+/*
+ * iomap.c - Implement iomap interface for PA-RISC
+ * Copyright (c) 2004 Matthew Wilcox
+ */
+
+#include <linux/ioport.h>
+#include <linux/pci.h>
+#include <asm/io.h>
+
+/*
+ * The iomap space on 32-bit PA-RISC is intended to look like this:
+ * 00000000-7fffffff virtual mapped IO
+ * 80000000-8fffffff ISA/EISA port space that can't be virtually mapped
+ * 90000000-9fffffff Dino port space
+ * a0000000-afffffff Astro port space
+ * b0000000-bfffffff PAT port space
+ * c0000000-cfffffff non-swapped memory IO
+ * f0000000-ffffffff legacy IO memory pointers
+ *
+ * For the moment, here's what it looks like:
+ * 80000000-8fffffff All ISA/EISA port space
+ * f0000000-ffffffff legacy IO memory pointers
+ *
+ * On 64-bit, everything is extended, so:
+ * 8000000000000000-8fffffffffffffff All ISA/EISA port space
+ * f000000000000000-ffffffffffffffff legacy IO memory pointers
+ */
+
+/*
+ * Technically, this should be 'if (VMALLOC_START < addr < VMALLOC_END),
+ * but that's slow and we know it'll be within the first 2GB.
+ */
+#ifdef CONFIG_64BIT
+#define INDIRECT_ADDR(addr)    (((unsigned long)(addr) & 1UL<<63) != 0)
+#define ADDR_TO_REGION(addr)    (((unsigned long)addr >> 60) & 7)
+#define IOPORT_MAP_BASE                (8UL << 60)
+#else
+#define INDIRECT_ADDR(addr)     (((unsigned long)(addr) & 1UL<<31) != 0)
+#define ADDR_TO_REGION(addr)    (((unsigned long)addr >> 28) & 7)
+#define IOPORT_MAP_BASE                (8UL << 28)
+#endif
+
+struct iomap_ops {
+       unsigned int (*read8)(void __iomem *);
+       unsigned int (*read16)(void __iomem *);
+       unsigned int (*read32)(void __iomem *);
+       void (*write8)(u8, void __iomem *);
+       void (*write16)(u16, void __iomem *);
+       void (*write32)(u32, void __iomem *);
+       void (*read8r)(void __iomem *, void *, unsigned long);
+       void (*read16r)(void __iomem *, void *, unsigned long);
+       void (*read32r)(void __iomem *, void *, unsigned long);
+       void (*write8r)(void __iomem *, const void *, unsigned long);
+       void (*write16r)(void __iomem *, const void *, unsigned long);
+       void (*write32r)(void __iomem *, const void *, unsigned long);
+};
+
+/* Generic ioport ops.  To be replaced later by specific dino/elroy/wax code */
+
+#define ADDR2PORT(addr) ((unsigned long __force)(addr) & 0xffffff)
+
+static unsigned int ioport_read8(void __iomem *addr)
+{
+       return inb(ADDR2PORT(addr));
+}
+
+static unsigned int ioport_read16(void __iomem *addr)
+{
+       return inw(ADDR2PORT(addr));
+}
+
+static unsigned int ioport_read32(void __iomem *addr)
+{
+       return inl(ADDR2PORT(addr));
+}
+
+static void ioport_write8(u8 datum, void __iomem *addr)
+{
+       outb(datum, ADDR2PORT(addr));
+}
+
+static void ioport_write16(u16 datum, void __iomem *addr)
+{
+       outw(datum, ADDR2PORT(addr));
+}
+
+static void ioport_write32(u32 datum, void __iomem *addr)
+{
+       outl(datum, ADDR2PORT(addr));
+}
+
+static void ioport_read8r(void __iomem *addr, void *dst, unsigned long count)
+{
+       insb(ADDR2PORT(addr), dst, count);
+}
+
+static void ioport_read16r(void __iomem *addr, void *dst, unsigned long count)
+{
+       insw(ADDR2PORT(addr), dst, count);
+}
+
+static void ioport_read32r(void __iomem *addr, void *dst, unsigned long count)
+{
+       insl(ADDR2PORT(addr), dst, count);
+}
+
+static void ioport_write8r(void __iomem *addr, const void *s, unsigned long n)
+{
+       outsb(ADDR2PORT(addr), s, n);
+}
+
+static void ioport_write16r(void __iomem *addr, const void *s, unsigned long n)
+{
+       outsw(ADDR2PORT(addr), s, n);
+}
+
+static void ioport_write32r(void __iomem *addr, const void *s, unsigned long n)
+{
+       outsl(ADDR2PORT(addr), s, n);
+}
+
+static const struct iomap_ops ioport_ops = {
+       ioport_read8,
+       ioport_read16,
+       ioport_read32,
+       ioport_write8,
+       ioport_write16,
+       ioport_write32,
+       ioport_read8r,
+       ioport_read16r,
+       ioport_read32r,
+       ioport_write8r,
+       ioport_write16r,
+       ioport_write32r,
+};
+
+/* Legacy I/O memory ops */
+
+static unsigned int iomem_read8(void __iomem *addr)
+{
+       return readb(addr);
+}
+
+static unsigned int iomem_read16(void __iomem *addr)
+{
+       return readw(addr);
+}
+
+static unsigned int iomem_read32(void __iomem *addr)
+{
+       return readl(addr);
+}
+
+static void iomem_write8(u8 datum, void __iomem *addr)
+{
+       writeb(datum, addr);
+}
+
+static void iomem_write16(u16 datum, void __iomem *addr)
+{
+       writew(datum, addr);
+}
+
+static void iomem_write32(u32 datum, void __iomem *addr)
+{
+       writel(datum, addr);
+}
+
+static void iomem_read8r(void __iomem *addr, void *dst, unsigned long count)
+{
+       while (count--) {
+               *(u8 *)dst = __raw_readb(addr);
+               dst++;
+       }
+}
+
+static void iomem_read16r(void __iomem *addr, void *dst, unsigned long count)
+{
+       while (count--) {
+               *(u16 *)dst = __raw_readw(addr);
+               dst += 2;
+       }
+}
+
+static void iomem_read32r(void __iomem *addr, void *dst, unsigned long count)
+{
+       while (count--) {
+               *(u32 *)dst = __raw_readl(addr);
+               dst += 4;
+       }
+}
+
+static void iomem_write8r(void __iomem *addr, const void *s, unsigned long n)
+{
+       while (n--) {
+               __raw_writeb(*(u8 *)s, addr);
+               s++;
+       }
+}
+
+static void iomem_write16r(void __iomem *addr, const void *s, unsigned long n)
+{
+       while (n--) {
+               __raw_writew(*(u16 *)s, addr);
+               s += 2;
+       }
+}
+
+static void iomem_write32r(void __iomem *addr, const void *s, unsigned long n)
+{
+       while (n--) {
+               __raw_writel(*(u32 *)s, addr);
+               s += 4;
+       }
+}
+
+static const struct iomap_ops iomem_ops = {
+       iomem_read8,
+       iomem_read16,
+       iomem_read32,
+       iomem_write8,
+       iomem_write16,
+       iomem_write32,
+       iomem_read8r,
+       iomem_read16r,
+       iomem_read32r,
+       iomem_write8r,
+       iomem_write16r,
+       iomem_write32r,
+};
+
+const struct iomap_ops *iomap_ops[8] = {
+       [0] = &ioport_ops,
+#ifdef CONFIG_DEBUG_IOREMAP
+       [6] = &iomem_ops,
+#else
+       [7] = &iomem_ops
+#endif
+};
+
+
+unsigned int ioread8(void __iomem *addr)
+{
+       if (unlikely(INDIRECT_ADDR(addr)))
+               return iomap_ops[ADDR_TO_REGION(addr)]->read8(addr);
+       return *((u8 *)addr);
+}
+
+unsigned int ioread16(void __iomem *addr)
+{
+       if (unlikely(INDIRECT_ADDR(addr)))
+               return iomap_ops[ADDR_TO_REGION(addr)]->read16(addr);
+       return le16_to_cpup((u16 *)addr);
+}
+
+unsigned int ioread32(void __iomem *addr)
+{
+       if (unlikely(INDIRECT_ADDR(addr)))
+               return iomap_ops[ADDR_TO_REGION(addr)]->read32(addr);
+       return le32_to_cpup((u32 *)addr);
+}
+
+void iowrite8(u8 datum, void __iomem *addr)
+{
+       if (unlikely(INDIRECT_ADDR(addr))) {
+               iomap_ops[ADDR_TO_REGION(addr)]->write8(datum, addr);
+       } else {
+               *((u8 *)addr) = datum;
+       }
+}
+
+void iowrite16(u16 datum, void __iomem *addr)
+{
+       if (unlikely(INDIRECT_ADDR(addr))) {
+               iomap_ops[ADDR_TO_REGION(addr)]->write16(datum, addr);
+       } else {
+               *((u16 *)addr) = cpu_to_le16(datum);
+       }
+}
+
+void iowrite32(u32 datum, void __iomem *addr)
+{
+       if (unlikely(INDIRECT_ADDR(addr))) {
+               iomap_ops[ADDR_TO_REGION(addr)]->write32(datum, addr);
+       } else {
+               *((u32 *)addr) = cpu_to_le32(datum);
+       }
+}
+
+/* Repeating interfaces */
+
+void ioread8_rep(void __iomem *addr, void *dst, unsigned long count)
+{
+       if (unlikely(INDIRECT_ADDR(addr))) {
+               iomap_ops[ADDR_TO_REGION(addr)]->read8r(addr, dst, count);
+       } else {
+               while (count--) {
+                       *(u8 *)dst = *(u8 *)addr;
+                       dst++;
+               }
+       }
+}
+
+void ioread16_rep(void __iomem *addr, void *dst, unsigned long count)
+{
+       if (unlikely(INDIRECT_ADDR(addr))) {
+               iomap_ops[ADDR_TO_REGION(addr)]->read16r(addr, dst, count);
+       } else {
+               while (count--) {
+                       *(u16 *)dst = *(u16 *)addr;
+                       dst += 2;
+               }
+       }
+}
+
+void ioread32_rep(void __iomem *addr, void *dst, unsigned long count)
+{
+       if (unlikely(INDIRECT_ADDR(addr))) {
+               iomap_ops[ADDR_TO_REGION(addr)]->read32r(addr, dst, count);
+       } else {
+               while (count--) {
+                       *(u32 *)dst = *(u32 *)addr;
+                       dst += 4;
+               }
+       }
+}
+
+void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count)
+{
+       if (unlikely(INDIRECT_ADDR(addr))) {
+               iomap_ops[ADDR_TO_REGION(addr)]->write8r(addr, src, count);
+       } else {
+               while (count--) {
+                       *(u8 *)addr = *(u8 *)src;
+                       src++;
+               }
+       }
+}
+
+void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count)
+{
+       if (unlikely(INDIRECT_ADDR(addr))) {
+               iomap_ops[ADDR_TO_REGION(addr)]->write16r(addr, src, count);
+       } else {
+               while (count--) {
+                       *(u16 *)addr = *(u16 *)src;
+                       src += 2;
+               }
+       }
+}
+
+void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count)
+{
+       if (unlikely(INDIRECT_ADDR(addr))) {
+               iomap_ops[ADDR_TO_REGION(addr)]->write32r(addr, src, count);
+       } else {
+               while (count--) {
+                       *(u32 *)addr = *(u32 *)src;
+                       src += 4;
+               }
+       }
+}
+
+/* Mapping interfaces */
+
+void __iomem *ioport_map(unsigned long port, unsigned int nr)
+{
+       return (void __iomem *)(IOPORT_MAP_BASE | port);
+}
+
+void ioport_unmap(void __iomem *addr)
+{
+       if (!INDIRECT_ADDR(addr)) {
+               iounmap(addr);
+       }
+}
+
+/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
+void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
+{
+       unsigned long start = pci_resource_start(dev, bar);
+       unsigned long len = pci_resource_len(dev, bar);
+       unsigned long flags = pci_resource_flags(dev, bar);
+
+       if (!len || !start)
+               return NULL;
+       if (maxlen && len > maxlen)
+               len = maxlen;
+       if (flags & IORESOURCE_IO)
+               return ioport_map(start, len);
+       if (flags & IORESOURCE_MEM) {
+               if (flags & IORESOURCE_CACHEABLE)
+                       return ioremap(start, len);
+               return ioremap_nocache(start, len);
+       }
+       /* What? */
+       return NULL;
+}
+
+void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
+{
+       if (!INDIRECT_ADDR(addr)) {
+               iounmap(addr);
+       }
+}
+
+EXPORT_SYMBOL(ioread8);
+EXPORT_SYMBOL(ioread16);
+EXPORT_SYMBOL(ioread32);
+EXPORT_SYMBOL(iowrite8);
+EXPORT_SYMBOL(iowrite16);
+EXPORT_SYMBOL(iowrite32);
+EXPORT_SYMBOL(ioread8_rep);
+EXPORT_SYMBOL(ioread16_rep);
+EXPORT_SYMBOL(ioread32_rep);
+EXPORT_SYMBOL(iowrite8_rep);
+EXPORT_SYMBOL(iowrite16_rep);
+EXPORT_SYMBOL(iowrite32_rep);
+EXPORT_SYMBOL(ioport_map);
+EXPORT_SYMBOL(ioport_unmap);
+EXPORT_SYMBOL(pci_iomap);
+EXPORT_SYMBOL(pci_iounmap);
diff -urN linux/arch/parisc/lib/Makefile linux/arch/parisc/lib/Makefile
--- linux/arch/parisc/lib/Makefile      2004/11/15 11:49:19     1.9
+++ linux/arch/parisc/lib/Makefile      2005/01/25 04:28:01     1.10
@@ -4,4 +4,6 @@
 
 lib-y  := lusercopy.o bitops.o checksum.o io.o memset.o fixup.o memcpy.o
 
+obj-y  := iomap.o
+
 lib-$(CONFIG_SMP) += debuglocks.o
diff -urN linux/arch/parisc/lib/checksum.c linux/arch/parisc/lib/checksum.c
--- linux/arch/parisc/lib/checksum.c    2004/11/15 11:49:19     1.4
+++ linux/arch/parisc/lib/checksum.c    2005/01/25 04:28:01     1.5
@@ -113,7 +113,7 @@
 /*
  * copy while checksumming, otherwise like csum_partial
  */
-unsigned int csum_partial_copy_nocheck(const char *src, char *dst, 
+unsigned int csum_partial_copy_nocheck(const unsigned char *src, unsigned char 
*dst,
                                       int len, unsigned int sum)
 {
        /*
@@ -131,7 +131,7 @@
  * Copy from userspace and compute checksum.  If we catch an exception
  * then zero the rest of the buffer.
  */
-unsigned int csum_partial_copy_from_user (const char *src, char *dst,
+unsigned int csum_partial_copy_from_user (const unsigned char *src, unsigned 
char *dst,
                                           int len, unsigned int sum,
                                           int *err_ptr)
 {
diff -urN linux/arch/parisc/lib/io.c linux/arch/parisc/lib/io.c
--- linux/arch/parisc/lib/io.c  2004/08/14 16:16:41     1.5
+++ linux/arch/parisc/lib/io.c  2005/01/25 04:28:01     1.6
@@ -15,24 +15,24 @@
  * Assumes the device can cope with 32-bit transfers.  If it can't,
  * don't use this function.
  */
-void __memcpy_toio(unsigned long dest, unsigned long src, int count)
+void memcpy_toio(volatile void __iomem *dst, const void *src, int count)
 {
-       if ((dest & 3) != (src & 3))
+       if (((unsigned long)dst & 3) != ((unsigned long)src & 3))
                goto bytecopy;
-       while (dest & 3) {
-               writeb(*(char *)src, dest++);
+       while ((unsigned long)dst & 3) {
+               writeb(*(char *)src, dst++);
                src++;
                count--;
        }
        while (count > 3) {
-               __raw_writel(*(u32 *)src, dest);
+               __raw_writel(*(u32 *)src, dst);
                src += 4;
-               dest += 4;
+               dst += 4;
                count -= 4;
        }
  bytecopy:
        while (count--) {
-               writeb(*(char *)src, dest++);
+               writeb(*(char *)src, dst++);
                src++;
        }
 }
@@ -50,51 +50,51 @@
 **      Minimize total number of transfers at cost of CPU cycles.
 **     TODO: only look at src alignment and adjust the stores to dest.
 */
-void __memcpy_fromio(unsigned long dest, unsigned long src, int count)
+void memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
 {
        /* first compare alignment of src/dst */ 
-       if ( ((dest ^ src) & 1) || (count < 2) )
+       if ( (((unsigned long)dst ^ (unsigned long)src) & 1) || (count < 2) )
                goto bytecopy;
 
-       if ( ((dest ^ src) & 2) || (count < 4) )
+       if ( (((unsigned long)dst ^ (unsigned long)src) & 2) || (count < 4) )
                goto shortcopy;
 
        /* Then check for misaligned start address */
-       if (src & 1) {
-               *(u8 *)dest = readb(src);
+       if ((unsigned long)src & 1) {
+               *(u8 *)dst = readb(src);
                src++;
-               dest++;
+               dst++;
                count--;
                if (count < 2) goto bytecopy;
        }
 
-       if (src & 2) {
-               *(u16 *)dest = __raw_readw(src);
+       if ((unsigned long)src & 2) {
+               *(u16 *)dst = __raw_readw(src);
                src += 2;
-               dest += 2;
+               dst += 2;
                count -= 2;
        }
 
        while (count > 3) {
-               *(u32 *)dest = __raw_readl(src);
-               dest += 4;
+               *(u32 *)dst = __raw_readl(src);
+               dst += 4;
                src += 4;
                count -= 4;
        }
 
  shortcopy:
        while (count > 1) {
-               *(u16 *)dest = __raw_readw(src);
+               *(u16 *)dst = __raw_readw(src);
                src += 2;
-               dest += 2;
+               dst += 2;
                count -= 2;
        }
 
  bytecopy:
        while (count--) {
-               *(char *)dest = readb(src);
+               *(char *)dst = readb(src);
                src++;
-               dest++;
+               dst++;
        }
 }
 
@@ -102,20 +102,20 @@
  * Assumes the device can cope with 32-bit transfers.  If it can't,
  * don't use this function.
  */
-void __memset_io(unsigned long dest, char fill, int count)
+void memset_io(volatile void __iomem *addr, unsigned char val, int count)
 {
-       u32 fill32 = (fill << 24) | (fill << 16) | (fill << 8) | fill;
-       while (dest & 3) {
-               writeb(fill, dest++);
+       u32 val32 = (val << 24) | (val << 16) | (val << 8) | val;
+       while ((unsigned long)addr & 3) {
+               writeb(val, addr++);
                count--;
        }
        while (count > 3) {
-               __raw_writel(fill32, dest);
-               dest += 4;
+               __raw_writel(val32, addr);
+               addr += 4;
                count -= 4;
        }
        while (count--) {
-               writeb(fill, dest++);
+               writeb(val, addr++);
        }
 }
 
diff -urN linux/arch/parisc/mm/init.c linux/arch/parisc/mm/init.c
--- linux/arch/parisc/mm/init.c 2005/01/13 14:05:31     1.18
+++ linux/arch/parisc/mm/init.c 2005/01/25 04:28:01     1.19
@@ -853,7 +853,7 @@
 static unsigned long free_space_ids = NR_SPACE_IDS - 1;
 static unsigned long dirty_space_ids = 0;
 
-static spinlock_t sid_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sid_lock);
 
 unsigned long alloc_sid(void)
 {
diff -urN linux/arch/parisc/mm/ioremap.c linux/arch/parisc/mm/ioremap.c
--- linux/arch/parisc/mm/ioremap.c      2003/10/09 13:09:28     1.3
+++ linux/arch/parisc/mm/ioremap.c      2005/01/25 04:28:01     1.4
@@ -11,6 +11,7 @@
 
 #include <linux/vmalloc.h>
 #include <linux/errno.h>
+#include <linux/module.h>
 #include <asm/io.h>
 #include <asm/pgalloc.h>
 
@@ -94,6 +95,30 @@
 }
 #endif /* USE_HPPA_IOREMAP */
 
+#ifdef CONFIG_DEBUG_IOREMAP
+static unsigned long last = 0;
+
+void gsc_bad_addr(unsigned long addr)
+{
+       if (time_after(jiffies, last + HZ*10)) {
+               printk("gsc_foo() called with bad address 0x%lx\n", addr);
+               dump_stack();
+               last = jiffies;
+       }
+}
+EXPORT_SYMBOL(gsc_bad_addr);
+
+void __raw_bad_addr(const volatile void __iomem *addr)
+{
+       if (time_after(jiffies, last + HZ*10)) {
+               printk("__raw_foo() called with bad address 0x%p\n", addr);
+               dump_stack();
+               last = jiffies;
+       }
+}
+EXPORT_SYMBOL(__raw_bad_addr);
+#endif
+
 /*
  * Generic mapping function (not visible outside):
  */
@@ -107,7 +132,7 @@
  * have to convert them into an offset in a page-aligned mapping, but the
  * caller shouldn't need to know that small detail.
  */
-void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long 
flags)
+void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned 
long flags)
 {
 #if !(USE_HPPA_IOREMAP)
 
@@ -118,7 +143,11 @@
                phys_addr |= 0xfc000000;
        }
 
-       return (void *)phys_addr;
+#ifdef CONFIG_DEBUG_IOREMAP
+       return (void __iomem *)(phys_addr - (0x1UL << NYBBLE_SHIFT));
+#else
+       return (void __iomem *)phys_addr;
+#endif
 
 #else
        void * addr;
@@ -163,16 +192,16 @@
                vfree(addr);
                return NULL;
        }
-       return (void *) (offset + (char *)addr);
+       return (void __iomem *) (offset + (char *)addr);
 #endif
 }
 
-void iounmap(void *addr)
+void iounmap(void __iomem *addr)
 {
 #if !(USE_HPPA_IOREMAP)
        return;
 #else
        if (addr > high_memory)
-               return vfree((void *) (PAGE_MASK & (unsigned long) addr));
+               return vfree((void *) (PAGE_MASK & (unsigned long __force) 
addr));
 #endif
 }
diff -urN linux/arch/ppc/Kconfig linux/arch/ppc/Kconfig
--- linux/arch/ppc/Kconfig      2005/01/13 14:05:31     1.43
+++ linux/arch/ppc/Kconfig      2005/01/25 04:28:01     1.44
@@ -326,7 +326,7 @@
 
          HERMES:
          Hermes-Pro ISDN/LAN router with integrated 8 x hub
-         Manufacturer: Multidata Gesellschaft für Datentechnik und Informatik
+         Manufacturer: Multidata Gesellschaft fur Datentechnik und Informatik
          <http://www.multidata.de/>
          Date of Release: 2000 (?)
          End of life: -
@@ -623,6 +623,12 @@
 config ADS8272
        bool "ADS8272"
 
+config PQ2FADS
+       bool "Freescale-PQ2FADS"
+       help
+         Select PQ2FADS if you wish to configure for a Freescale
+         PQ2FADS board (-VR or -ZU).
+
 config LITE5200
        bool "Freescale LITE5200 / (IceCube)"
        select PPC_MPC52xx
@@ -655,7 +661,7 @@
 config 8260
        bool "CPM2 Support" if WILLOW
        depends on 6xx
-       default y if TQM8260 || RPX8260 || EST8260 || SBS8260 || SBC82xx
+       default y if TQM8260 || RPX8260 || EST8260 || SBS8260 || SBC82xx || 
PQ2FADS
        help
          The MPC8260 is a typical embedded CPU made by Motorola.  Selecting
          this option means that you wish to build a kernel for a machine with
@@ -672,7 +678,7 @@
 
 config CPM2
        bool
-       depends on 8260 || MPC8560
+       depends on 8260 || MPC8560 || MPC8555
        default y
        help
          The CPM2 (Communications Processor Module) is a coprocessor on
diff -urN linux/arch/ppc/4xx_io/serial_sicc.c 
linux/arch/ppc/4xx_io/serial_sicc.c
--- linux/arch/ppc/4xx_io/serial_sicc.c 2004/10/25 20:44:18     1.11
+++ linux/arch/ppc/4xx_io/serial_sicc.c 2005/01/25 04:28:01     1.12
@@ -264,6 +264,7 @@
     unsigned int        flags;
     int         count;
     struct SICC_info    *info;
+    spinlock_t         sicc_lock;
 };
 
 #define SICC_XMIT_SIZE 1024
@@ -385,9 +386,10 @@
     struct SICC_info *info = tty->driver_data;
     unsigned long flags;
 
-    save_flags(flags); cli();
+    /* disable interrupts while stopping serial port interrupts */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
     siccuart_disable_tx_interrupt(info);
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
 }
 
 static void siccuart_start(struct tty_struct *tty)
@@ -395,11 +397,12 @@
     struct SICC_info *info = tty->driver_data;
     unsigned long flags;
 
-    save_flags(flags); cli();
+    /* disable interrupts while starting serial port interrupts */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
     if (info->xmit.head != info->xmit.tail
         && info->xmit.buf)
         siccuart_enable_tx_interrupt(info);
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
 }
 
 
@@ -604,7 +607,8 @@
        return -ENOMEM;
     }
 
-    save_flags(flags); cli();
+    /* lock access to info while doing setup */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
 
     if (info->xmit.buf)
         free_page(page);
@@ -688,12 +692,12 @@
     siccuart_enable_rx_interrupt(info);
 
     info->flags |= ASYNC_INITIALIZED;
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     return 0;
 
 
 errout:
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     return retval;
 }
 
@@ -708,7 +712,8 @@
     if (!(info->flags & ASYNC_INITIALIZED))
         return;
 
-    save_flags(flags); cli(); /* Disable interrupts */
+    /* lock while shutting down port */
+    spin_lock_irqsave(&info->state->sicc_lock,flags); /* Disable interrupts */
 
     /*
      * clear delta_msr_wait queue to avoid mem leaks: we may free the irq
@@ -746,7 +751,7 @@
 
     info->flags &= ~ASYNC_INITIALIZED;
 
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
 }
 
 
@@ -868,8 +873,8 @@
             info->ignore_status_mask |=  _LSR_OE_MASK;
     }
 
-    /* first, disable everything */
-    save_flags(flags); cli();
+    /* disable interrupts while reading and clearing registers */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
 
     old_rcr = readb(info->port->uart_base + BL_SICC_RCR);
     old_tcr = readb(info->port->uart_base + BL_SICC_TxCR);
@@ -881,7 +886,7 @@
     /*RLBtrace (&ppc403Chan0, 0x2000000c, 0, 0);*/
 
 
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
 
 
     /* Set baud rate */
@@ -909,12 +914,13 @@
     if (!tty || !info->xmit.buf)
         return;
 
-    save_flags(flags); cli();
+    /* lock info->xmit while adding character to tx buffer */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
     if (CIRC_SPACE(info->xmit.head, info->xmit.tail, SICC_XMIT_SIZE) != 0) {
         info->xmit.buf[info->xmit.head] = ch;
         info->xmit.head = (info->xmit.head + 1) & (SICC_XMIT_SIZE - 1);
     }
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
 }
 
 static void siccuart_flush_chars(struct tty_struct *tty)
@@ -928,9 +934,10 @@
         || !info->xmit.buf)
         return;
 
-    save_flags(flags); cli();
+    /* disable interrupts while transmitting characters */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
     siccuart_enable_tx_interrupt(info);
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
 }
 
 static int siccuart_write(struct tty_struct *tty,
@@ -943,8 +950,8 @@
     if (!tty || !info->xmit.buf || !tmp_buf)
         return 0;
 
-    save_flags(flags);
-    cli();
+    /* lock info->xmit while removing characters from buffer */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
     while (1) {
         c = CIRC_SPACE_TO_END(info->xmit.head,
                       info->xmit.tail,
@@ -960,11 +967,11 @@
         count -= c;
         ret += c;
     }
-    restore_flags(flags);
     if (info->xmit.head != info->xmit.tail
         && !tty->stopped
         && !tty->hw_stopped)
         siccuart_enable_tx_interrupt(info);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     return ret;
 }
 
@@ -988,9 +995,10 @@
     unsigned long flags;
 
     pr_debug("siccuart_flush_buffer(%d) called\n", tty->index);
-    save_flags(flags); cli();
+    /* lock info->xmit while zeroing buffer counts */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
     info->xmit.head = info->xmit.tail = 0;
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     wake_up_interruptible(&tty->write_wait);
     if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
         tty->ldisc.write_wakeup)
@@ -1019,10 +1027,11 @@
         siccuart_send_xchar(tty, STOP_CHAR(tty));
 
     if (tty->termios->c_cflag & CRTSCTS) {
-        save_flags(flags); cli();
+        /* disable interrupts while setting modem control lines */
+        spin_lock_irqsave(&info->state->sicc_lock,flags);
         info->mctrl &= ~TIOCM_RTS;
         info->port->set_mctrl(info->port, info->mctrl);
-        restore_flags(flags);
+        spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     }
 }
 
@@ -1039,10 +1048,11 @@
     }
 
     if (tty->termios->c_cflag & CRTSCTS) {
-        save_flags(flags); cli();
+        /* disable interrupts while setting modem control lines */
+        spin_lock_irqsave(&info->state->sicc_lock,flags);
         info->mctrl |= TIOCM_RTS;
         info->port->set_mctrl(info->port, info->mctrl);
-        restore_flags(flags);
+        spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     }
 }
 
@@ -1181,9 +1191,10 @@
     unsigned int result, status;
     unsigned long flags;
 
-    save_flags(flags); cli();
+    /* disable interrupts while reading status from port */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
     status = readb(info->port->uart_base +  BL_SICC_LSR);
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     result = status & _LSR_TSR_EMPTY ? TIOCSER_TEMT : 0;
 
     /*
@@ -1234,10 +1245,11 @@
     default:
         return -EINVAL;
     }
-    save_flags(flags); cli();
+    /* disable interrupts while setting modem control lines */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
     if (old != info->mctrl)
         info->port->set_mctrl(info->port, info->mctrl);
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     return 0;
 }
 
@@ -1248,14 +1260,15 @@
     unsigned int lcr_h;
 
 
-    save_flags(flags); cli();
+    /* disable interrupts while setting break state */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
     lcr_h = readb(info->port + BL_SICC_LSR);
     if (break_state == -1)
         lcr_h |=  _LSR_LB_MASK;
     else
         lcr_h &= ~_LSR_LB_MASK;
     writeb(lcr_h, info->port + BL_SICC_LSRS);
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
 }
 
 static int siccuart_ioctl(struct tty_struct *tty, struct file *file,
@@ -1303,9 +1316,10 @@
          *     RI where only 0->1 is counted.
          */
         case TIOCGICOUNT:
-            save_flags(flags); cli();
+            /* disable interrupts while getting interrupt count */
+            spin_lock_irqsave(&info->state->sicc_lock,flags);
             cnow = info->state->icount;
-            restore_flags(flags);
+            spin_unlock_irqrestore(&info->state->sicc_lock,flags);
             icount.cts = cnow.cts;
             icount.dsr = cnow.dsr;
             icount.rng = cnow.rng;
@@ -1342,22 +1356,24 @@
     /* Handle transition to B0 status */
     if ((old_termios->c_cflag & CBAUD) &&
         !(cflag & CBAUD)) {
-        save_flags(flags); cli();
+        /* disable interrupts while setting break state */
+        spin_lock_irqsave(&info->state->sicc_lock,flags);
         info->mctrl &= ~(TIOCM_RTS | TIOCM_DTR);
         info->port->set_mctrl(info->port, info->mctrl);
-        restore_flags(flags);
+        spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     }
 
     /* Handle transition away from B0 status */
     if (!(old_termios->c_cflag & CBAUD) &&
         (cflag & CBAUD)) {
-        save_flags(flags); cli();
+        /* disable interrupts while setting break state */
+        spin_lock_irqsave(&info->state->sicc_lock,flags);
         info->mctrl |= TIOCM_DTR;
         if (!(cflag & CRTSCTS) ||
             !test_bit(TTY_THROTTLED, &tty->flags))
             info->mctrl |= TIOCM_RTS;
         info->port->set_mctrl(info->port, info->mctrl);
-        restore_flags(flags);
+        spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     }
 
     /* Handle turning off CRTSCTS */
@@ -1393,11 +1409,11 @@
 
     //pr_debug("siccuart_close() called\n");
 
-    save_flags(flags); cli();
+    /* lock tty->driver_data while closing port */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
 
     if (tty_hung_up_p(filp)) {
-        restore_flags(flags);
-        return;
+        goto quick_close;
     }
 
     if ((tty->count == 1) && (state->count != 1)) {
@@ -1416,11 +1432,10 @@
         state->count = 0;
     }
     if (state->count) {
-        restore_flags(flags);
-        return;
+        goto quick_close;
     }
     info->flags |= ASYNC_CLOSING;
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     /*
      * Now we wait for the transmit buffer to clear; and we notify
      * the line discipline to only process XON/XOFF characters.
@@ -1458,6 +1473,11 @@
     }
     info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
     wake_up_interruptible(&info->close_wait);
+    return;
+
+quick_close:
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
+    return;
 }
 
 static void siccuart_wait_until_sent(struct tty_struct *tty, int timeout)
@@ -1569,20 +1589,22 @@
      */
     retval = 0;
     add_wait_queue(&info->open_wait, &wait);
-    save_flags(flags); cli();
+    /* lock while decrementing state->count */
+    spin_lock_irqsave(&info->state->sicc_lock,flags);
     if (!tty_hung_up_p(filp)) {
         extra_count = 1;
         state->count--;
     }
-    restore_flags(flags);
+    spin_unlock_irqrestore(&info->state->sicc_lock,flags);
     info->blocked_open++;
     while (1) {
-        save_flags(flags); cli();
+        /* disable interrupts while setting modem control lines */
+        spin_lock_irqsave(&info->state->sicc_lock,flags);
         if (tty->termios->c_cflag & CBAUD) {
             info->mctrl = TIOCM_DTR | TIOCM_RTS;
             info->port->set_mctrl(info->port, info->mctrl);
         }
-        restore_flags(flags);
+        spin_unlock_irqrestore(&info->state->sicc_lock,flags);
         set_current_state(TASK_INTERRUPTIBLE);
         if (tty_hung_up_p(filp) ||
             !(info->flags & ASYNC_INITIALIZED)) {
@@ -1753,6 +1775,7 @@
         state->line     = i;
         state->close_delay  = 5 * HZ / 10;
         state->closing_wait = 30 * HZ;
+       spin_lock_init(&state->sicc_lock);
     }
 
 
diff -urN linux/arch/ppc/8xx_io/Kconfig linux/arch/ppc/8xx_io/Kconfig
--- linux/arch/ppc/8xx_io/Kconfig       2004/11/15 11:49:19     1.3
+++ linux/arch/ppc/8xx_io/Kconfig       2005/01/25 04:28:01     1.4
@@ -10,7 +10,7 @@
        depends on NET_ETHERNET
        help
          Enable Ethernet support via the Motorola MPC8xx serial
-         commmunications controller.
+         communications controller.
 
 choice
        prompt "SCC used for Ethernet"
diff -urN linux/arch/ppc/8xx_io/cs4218_tdm.c linux/arch/ppc/8xx_io/cs4218_tdm.c
--- linux/arch/ppc/8xx_io/cs4218_tdm.c  2004/08/13 07:18:52     1.13
+++ linux/arch/ppc/8xx_io/cs4218_tdm.c  2005/01/25 04:28:01     1.14
@@ -55,6 +55,8 @@
 static char **sound_buffers = NULL;
 static char **sound_read_buffers = NULL;
 
+static spinlock_t cs4218_lock = SPIN_LOCK_UNLOCKED;
+
 /* Local copies of things we put in the control register.  Output
  * volume, like most codecs is really attenuation.
  */
@@ -1206,7 +1208,8 @@
        volatile cbd_t  *bdp;
        volatile cpm8xx_t *cp;
 
-       save_flags(flags); cli();
+       /* Protect buffer */
+       spin_lock_irqsave(&cs4218_lock, flags);
 #if 0
        if (awacs_beep_state) {
                /* sound takes precedence over beeps */
@@ -1263,7 +1266,7 @@
 
                ++sq.active;
        }
-       restore_flags(flags);
+       spin_unlock_irqrestore(&cs4218_lock, flags);
 }
 
 
@@ -1275,7 +1278,8 @@
        if (read_sq.active)
                return;
 
-       save_flags(flags); cli();
+       /* Protect buffer */
+       spin_lock_irqsave(&cs4218_lock, flags);
 
        /* This is all we have to do......Just start it up.
        */
@@ -1284,7 +1288,7 @@
 
        read_sq.active = 1;
 
-        restore_flags(flags);
+        spin_unlock_irqrestore(&cs4218_lock, flags);
 }
 
 
@@ -1365,14 +1369,15 @@
 {
        unsigned long flags;
 
-       save_flags(flags); cli();
+       /* not sure if this is needed, since hardware command is #if 0'd */
+       spin_lock_irqsave(&cs4218_lock, flags);
        if (beep_playing) {
 #if 0
                st_le16(&beep_dbdma_cmd->command, DBDMA_STOP);
 #endif
                beep_playing = 0;
        }
-       restore_flags(flags);
+       spin_unlock_irqrestore(&cs4218_lock, flags);
 }
 
 static struct timer_list beep_timer = TIMER_INITIALIZER(cs_nosound, 0, 0);
@@ -1401,21 +1406,22 @@
                return;
 #endif
        }
-       save_flags(flags); cli();
+       /* lock while modifying beep_timer */
+       spin_lock_irqsave(&cs4218_lock, flags);
        del_timer(&beep_timer);
        if (ticks) {
                beep_timer.expires = jiffies + ticks;
                add_timer(&beep_timer);
        }
        if (beep_playing || sq.active || beep_buf == NULL) {
-               restore_flags(flags);
+               spin_unlock_irqrestore(&cs4218_lock, flags);
                return;         /* too hard, sorry :-( */
        }
        beep_playing = 1;
 #if 0
        st_le16(&beep_dbdma_cmd->command, OUTPUT_MORE + BR_ALWAYS);
 #endif
-       restore_flags(flags);
+       spin_unlock_irqrestore(&cs4218_lock, flags);
 
        if (hz == beep_hz_cache && beep_volume == beep_volume_cache) {
                nsamples = beep_nsamples_cache;
@@ -1442,7 +1448,7 @@
        st_le32(&beep_dbdma_cmd->phy_addr, virt_to_bus(beep_buf));
        awacs_beep_state = 1;
 
-       save_flags(flags); cli();
+       spin_lock_irqsave(&cs4218_lock, flags);
        if (beep_playing) {     /* i.e. haven't been terminated already */
                out_le32(&awacs_txdma->control, (RUN|WAKE|FLUSH|PAUSE) << 16);
                out_le32(&awacs->control,
@@ -1452,8 +1458,8 @@
                out_le32(&awacs_txdma->cmdptr, virt_to_bus(beep_dbdma_cmd));
                out_le32(&awacs_txdma->control, RUN | (RUN << 16));
        }
+       spin_unlock_irqrestore(&cs4218_lock, flags);
 #endif
-       restore_flags(flags);
 }
 
 static MACHINE mach_cs4218 = {
diff -urN linux/arch/ppc/8xx_io/fec.c linux/arch/ppc/8xx_io/fec.c
--- linux/arch/ppc/8xx_io/fec.c 2004/11/15 11:49:19     1.22
+++ linux/arch/ppc/8xx_io/fec.c 2005/01/25 04:28:01     1.23
@@ -389,6 +389,7 @@
        flush_dcache_range((unsigned long)skb->data,
                           (unsigned long)skb->data + skb->len);
 
+       /* disable interrupts while triggering transmit */
        spin_lock_irq(&fep->lock);
 
        /* Send it on its way.  Tell FEC its ready, interrupt when done,
@@ -539,6 +540,7 @@
        struct  sk_buff *skb;
 
        fep = dev->priv;
+       /* lock while transmitting */
        spin_lock(&fep->lock);
        bdp = fep->dirty_tx;
 
@@ -799,6 +801,7 @@
 
        if ((mip = mii_head) != NULL) {
                ep->fec_mii_data = mip->mii_regval;
+
        }
 }
 
@@ -817,8 +820,8 @@
 
        retval = 0;
 
-       save_flags(flags);
-       cli();
+       /* lock while modifying mii_list */
+       spin_lock_irqsave(&fep->lock, flags);
 
        if ((mip = mii_free) != NULL) {
                mii_free = mip->mii_next;
@@ -836,7 +839,7 @@
                retval = 1;
        }
 
-       restore_flags(flags);
+       spin_unlock_irqrestore(&fep->lock, flags);
 
        return(retval);
 }
diff -urN linux/arch/ppc/kernel/cpu_setup_6xx.S 
linux/arch/ppc/kernel/cpu_setup_6xx.S
--- linux/arch/ppc/kernel/cpu_setup_6xx.S       2004/10/12 14:36:33     1.7
+++ linux/arch/ppc/kernel/cpu_setup_6xx.S       2005/01/25 04:28:02     1.8
@@ -292,13 +292,15 @@
        cmplwi  cr2,r3,0x800c   /* 7410 */
        cmplwi  cr3,r3,0x8001   /* 7455 */
        cmplwi  cr4,r3,0x8002   /* 7457 */
-       cmplwi  cr5,r3,0x7000   /* 750FX */
+       cmplwi  cr5,r3,0x8003   /* 7447A */
+       cmplwi  cr6,r3,0x7000   /* 750FX */
        /* cr1 is 7400 || 7410 */
        cror    4*cr1+eq,4*cr1+eq,4*cr2+eq
        /* cr0 is 74xx */
        cror    4*cr0+eq,4*cr0+eq,4*cr3+eq
        cror    4*cr0+eq,4*cr0+eq,4*cr4+eq
        cror    4*cr0+eq,4*cr0+eq,4*cr1+eq
+       cror    4*cr0+eq,4*cr0+eq,4*cr5+eq
        bne     1f
        /* Backup 74xx specific regs */
        mfspr   r4,SPRN_MSSCR0
@@ -316,7 +318,7 @@
        mfspr   r4,SPRN_LDSTDB
        stw     r4,CS_LDSTDB(r5)
 1:
-       bne     cr5,1f
+       bne     cr6,1f
        /* Backup 750FX specific registers */
        mfspr   r4,SPRN_HID1
        stw     r4,CS_HID1(r5)
@@ -359,13 +361,15 @@
        cmplwi  cr2,r3,0x800c   /* 7410 */
        cmplwi  cr3,r3,0x8001   /* 7455 */
        cmplwi  cr4,r3,0x8002   /* 7457 */
-       cmplwi  cr5,r3,0x7000   /* 750FX */
+       cmplwi  cr5,r3,0x8003   /* 7447A */
+       cmplwi  cr6,r3,0x7000   /* 750FX */
        /* cr1 is 7400 || 7410 */
        cror    4*cr1+eq,4*cr1+eq,4*cr2+eq
        /* cr0 is 74xx */
        cror    4*cr0+eq,4*cr0+eq,4*cr3+eq
        cror    4*cr0+eq,4*cr0+eq,4*cr4+eq
        cror    4*cr0+eq,4*cr0+eq,4*cr1+eq
+       cror    4*cr0+eq,4*cr0+eq,4*cr5+eq
        bne     2f
        /* Restore 74xx specific regs */
        lwz     r4,CS_MSSCR0(r5)
@@ -404,7 +408,7 @@
        mtspr   SPRN_LDSTDB,r4
        isync
        sync
-2:     bne     cr5,1f
+2:     bne     cr6,1f
        /* Restore 750FX specific registers
         * that is restore HID2 on rev 2.x and PLL config & switch
         * to PLL 0 on all
diff -urN linux/arch/ppc/kernel/dma-mapping.c 
linux/arch/ppc/kernel/dma-mapping.c
--- linux/arch/ppc/kernel/dma-mapping.c 2004/09/19 12:30:05     1.4
+++ linux/arch/ppc/kernel/dma-mapping.c 2005/01/25 04:28:02     1.5
@@ -71,7 +71,7 @@
  * This is the page table (2MB) covering uncached, DMA consistent allocations
  */
 static pte_t *consistent_pte;
-static spinlock_t consistent_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(consistent_lock);
 
 /*
  * VM region handling support.
diff -urN linux/arch/ppc/kernel/head_8xx.S linux/arch/ppc/kernel/head_8xx.S
--- linux/arch/ppc/kernel/head_8xx.S    2004/11/15 11:49:19     1.18
+++ linux/arch/ppc/kernel/head_8xx.S    2005/01/25 04:28:02     1.19
@@ -343,7 +343,7 @@
         * set.  All other Linux PTE bits control the behavior
         * of the MMU.
         */
-       li      r11, 0x00f0
+2:     li      r11, 0x00f0
        rlwimi  r10, r11, 0, 24, 28     /* Set 24-27, clear 28 */
        DO_8xx_CPU6(0x2d80, r3)
        mtspr   MI_RPN, r10     /* Update TLB entry */
@@ -357,15 +357,6 @@
 #endif
        rfi
 
-2:     mfspr   r10, M_TW       /* Restore registers */
-       lwz     r11, 0(r0)
-       mtcr    r11
-       lwz     r11, 4(r0)
-#ifdef CONFIG_8xx_CPU6
-       lwz     r3, 8(r0)
-#endif
-       b       InstructionAccess
-
        . = 0x1200
 DataStoreTLBMiss:
 #ifdef CONFIG_8xx_CPU6
@@ -419,7 +410,7 @@
         * set.  All other Linux PTE bits control the behavior
         * of the MMU.
         */
-       li      r11, 0x00f0
+2:     li      r11, 0x00f0
        rlwimi  r10, r11, 0, 24, 28     /* Set 24-27, clear 28 */
        DO_8xx_CPU6(0x3d80, r3)
        mtspr   MD_RPN, r10     /* Update TLB entry */
@@ -433,15 +424,6 @@
 #endif
        rfi
 
-2:     mfspr   r10, M_TW       /* Restore registers */
-       lwz     r11, 0(r0)
-       mtcr    r11
-       lwz     r11, 4(r0)
-#ifdef CONFIG_8xx_CPU6
-       lwz     r3, 8(r0)
-#endif
-       b       DataAccess
-
 /* This is an instruction TLB error on the MPC8xx.  This could be due
  * to many reasons, such as executing guarded memory or illegal instruction
  * addresses.  There is nothing to do but handle a big time error fault.
diff -urN linux/arch/ppc/kernel/perfmon.c linux/arch/ppc/kernel/perfmon.c
--- linux/arch/ppc/kernel/perfmon.c     2005/01/13 14:05:32     1.1
+++ linux/arch/ppc/kernel/perfmon.c     2005/01/25 04:28:02     1.2
@@ -34,7 +34,7 @@
 #include <asm/xmon.h>
 
 /* A lock to regulate grabbing the interrupt */
-spinlock_t perfmon_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(perfmon_lock);
 
 #ifdef CONFIG_FSL_BOOKE
 static void dummy_perf(struct pt_regs *regs)
diff -urN linux/arch/ppc/kernel/smp.c linux/arch/ppc/kernel/smp.c
--- linux/arch/ppc/kernel/smp.c 2005/01/13 14:05:32     1.60
+++ linux/arch/ppc/kernel/smp.c 2005/01/25 04:28:02     1.61
@@ -42,8 +42,6 @@
 struct klock_info_struct klock_info = { KLOCK_CLEAR, 0 };
 atomic_t ipi_recv;
 atomic_t ipi_sent;
-DEFINE_PER_CPU(unsigned int, prof_multiplier);
-DEFINE_PER_CPU(unsigned int, prof_counter);
 unsigned long cache_decay_ticks = HZ/100;
 cpumask_t cpu_online_map;
 cpumask_t cpu_possible_map;
@@ -88,16 +86,6 @@
 /*
  * Common functions
  */
-void smp_local_timer_interrupt(struct pt_regs * regs)
-{
-       int cpu = smp_processor_id();
-
-       if (!--per_cpu(prof_counter, cpu)) {
-               update_process_times(user_mode(regs));
-               per_cpu(prof_counter, cpu) = per_cpu(prof_multiplier, cpu);
-       }
-}
-
 void smp_message_recv(int msg, struct pt_regs *regs)
 {
        atomic_inc(&ipi_recv);
@@ -175,7 +163,7 @@
  * static memory requirements. It also looks cleaner.
  * Stolen from the i386 version.
  */
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
 
 static struct call_data_struct {
        void (*func) (void *info);
@@ -296,8 +284,6 @@
        /* assume bogomips are same for everything */
         c->loops_per_jiffy = loops_per_jiffy;
         c->pvr = mfspr(PVR);
-       per_cpu(prof_counter, id) = 1;
-       per_cpu(prof_multiplier, id) = 1;
 }
 
 void __init smp_prepare_cpus(unsigned int max_cpus)
diff -urN linux/arch/ppc/kernel/time.c linux/arch/ppc/kernel/time.c
--- linux/arch/ppc/kernel/time.c        2004/10/25 20:44:18     1.45
+++ linux/arch/ppc/kernel/time.c        2005/01/25 04:28:02     1.46
@@ -91,7 +91,7 @@
 
 static long time_offset;
 
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
 
 EXPORT_SYMBOL(rtc_lock);
 
@@ -142,6 +142,7 @@
                jiffy_stamp += tb_ticks_per_jiffy;
                
                profile_tick(CPU_PROFILING, regs);
+               update_process_times(user_mode(regs));
 
                if (smp_processor_id())
                        continue;
@@ -150,9 +151,6 @@
                write_seqlock(&xtime_lock);
                tb_last_stamp = jiffy_stamp;
                do_timer(regs);
-#ifndef CONFIG_SMP
-               update_process_times(user_mode(regs));
-#endif
 
                /*
                 * update the rtc when needed, this should be performed on the
@@ -186,10 +184,6 @@
                set_dec(next_dec);
        last_jiffy_stamp(cpu) = jiffy_stamp;
 
-#ifdef CONFIG_SMP
-       smp_local_timer_interrupt(regs);
-#endif /* CONFIG_SMP */
-
        if (ppc_md.heartbeat && !ppc_md.heartbeat_count--)
                ppc_md.heartbeat();
 
diff -urN linux/arch/ppc/kernel/traps.c linux/arch/ppc/kernel/traps.c
--- linux/arch/ppc/kernel/traps.c       2005/01/13 14:05:32     1.47
+++ linux/arch/ppc/kernel/traps.c       2005/01/25 04:28:02     1.48
@@ -72,7 +72,7 @@
  * Trap & Exception support
  */
 
-spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(die_lock);
 
 void die(const char * str, struct pt_regs * fp, long err)
 {
diff -urN linux/arch/ppc/oprofile/Makefile linux/arch/ppc/oprofile/Makefile
--- linux/arch/ppc/oprofile/Makefile    2005/01/13 14:05:32     1.2
+++ linux/arch/ppc/oprofile/Makefile    2005/01/25 04:28:02     1.3
@@ -6,4 +6,9 @@
                oprofilefs.o oprofile_stats.o \
                timer_int.o )
 
-oprofile-y := $(DRIVER_OBJS) common.o op_model_fsl_booke.o
+oprofile-y := $(DRIVER_OBJS) common.o
+
+ifeq ($(CONFIG_FSL_BOOKE),y)
+       oprofile-y += op_model_fsl_booke.o
+endif
+
diff -urN linux/arch/ppc/oprofile/common.c linux/arch/ppc/oprofile/common.c
--- linux/arch/ppc/oprofile/common.c    2005/01/13 14:05:32     1.1
+++ linux/arch/ppc/oprofile/common.c    2005/01/25 04:28:02     1.2
@@ -124,7 +124,7 @@
        .cpu_type       = NULL          /* To be filled in below. */
 };
 
-int __init oprofile_arch_init(struct oprofile_operations **ops)
+void __init oprofile_arch_init(struct oprofile_operations *ops)
 {
        char *name;
        int cpu_id = smp_processor_id();
@@ -133,13 +133,13 @@
        model = &op_model_fsl_booke;
 #else
        printk(KERN_ERR "oprofile enabled on unsupported processor!\n");
-       return -ENODEV;
+       return;
 #endif
 
        name = kmalloc(32, GFP_KERNEL);
 
        if (NULL == name)
-               return -ENOMEM;
+               return;
 
        sprintf(name, "ppc/%s", cur_cpu_spec[cpu_id]->cpu_name);
 
@@ -147,12 +147,10 @@
 
        model->num_counters = cur_cpu_spec[cpu_id]->num_pmcs;
 
-       *ops = &oprof_ppc32_ops;
+       *ops = oprof_ppc32_ops;
 
        printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
               oprof_ppc32_ops.cpu_type);
-
-       return 0;
 }
 
 void oprofile_arch_exit(void)
diff -urN linux/arch/ppc/platforms/apus_setup.c 
linux/arch/ppc/platforms/apus_setup.c
--- linux/arch/ppc/platforms/apus_setup.c       2003/06/05 18:24:00     1.8
+++ linux/arch/ppc/platforms/apus_setup.c       2005/01/25 04:28:02     1.9
@@ -480,7 +480,7 @@
 void
 apus_restart(char *cmd)
 {
-       cli();
+       local_irq_disable();
 
        APUS_WRITE(APUS_REG_LOCK,
                   REGLOCK_BLACKMAGICK1|REGLOCK_BLACKMAGICK2);
diff -urN linux/arch/ppc/platforms/chrp_smp.c 
linux/arch/ppc/platforms/chrp_smp.c
--- linux/arch/ppc/platforms/chrp_smp.c 2004/09/19 12:30:05     1.8
+++ linux/arch/ppc/platforms/chrp_smp.c 2005/01/25 04:28:02     1.9
@@ -57,7 +57,7 @@
                do_openpic_setup_cpu();
 }
 
-static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(timebase_lock);
 static unsigned int timebase_upper = 0, timebase_lower = 0;
 
 void __devinit
diff -urN linux/arch/ppc/platforms/pal4_setup.c 
linux/arch/ppc/platforms/pal4_setup.c
--- linux/arch/ppc/platforms/pal4_setup.c       2003/09/30 14:27:19     1.7
+++ linux/arch/ppc/platforms/pal4_setup.c       2005/01/25 04:28:02     1.8
@@ -81,7 +81,7 @@
 static void
 pal4_restart(char *cmd)
 {
-        __cli();
+        local_irq_disable();
         __asm__ __volatile__("lis  3,0xfff0\n \
                               ori  3,3,0x100\n \
                               mtspr 26,3\n \
@@ -95,7 +95,7 @@
 static void
 pal4_power_off(void)
 {
-       __cli();
+       local_irq_disable();
        for(;;);
 }
 
diff -urN linux/arch/ppc/platforms/pmac_feature.c 
linux/arch/ppc/platforms/pmac_feature.c
--- linux/arch/ppc/platforms/pmac_feature.c     2004/12/04 18:16:00     1.16
+++ linux/arch/ppc/platforms/pmac_feature.c     2005/01/25 04:28:02     1.17
@@ -56,14 +56,14 @@
 #endif
 
 extern int powersave_nap;
-extern struct pci_dev *k2_skiplist[2];
+extern struct device_node *k2_skiplist[2];
 
 
 /*
  * We use a single global lock to protect accesses. Each driver has
  * to take care of its own locking
  */
-static spinlock_t feature_lock  __pmacdata = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(feature_lock  __pmacdata);
 
 #define LOCK(flags)    spin_lock_irqsave(&feature_lock, flags);
 #define UNLOCK(flags)  spin_unlock_irqrestore(&feature_lock, flags);
@@ -1328,24 +1328,15 @@
 {
        struct macio_chip* macio = &macio_chips[0];
        unsigned long flags;
-       struct pci_dev *pdev;
        u8 pbus, pid;
 
-       /* XXX FIXME: We should fix pci_device_from_OF_node here, and
-        * get to a real pci_dev or we'll get into trouble with PCI
-        * domains the day we get overlapping numbers (like if we ever
-        * decide to show the HT root
-        */
-       if (pci_device_from_OF_node(node, &pbus, &pid) == 0)
-               pdev = pci_find_slot(pbus, pid);
-
        LOCK(flags);
        if (value) {
                MACIO_BIS(KEYLARGO_FCR1, K2_FCR1_GMAC_CLK_ENABLE);
                mb();
                k2_skiplist[0] = NULL;
        } else {
-               k2_skiplist[0] = pdev;
+               k2_skiplist[0] = node;
                mb();
                MACIO_BIC(KEYLARGO_FCR1, K2_FCR1_GMAC_CLK_ENABLE);
        }
@@ -1361,16 +1352,6 @@
 {
        struct macio_chip* macio = &macio_chips[0];
        unsigned long flags;
-       struct pci_dev *pdev;
-       u8 pbus, pid;
-
-       /* XXX FIXME: We should fix pci_device_from_OF_node here, and
-        * get to a real pci_dev or we'll get into trouble with PCI
-        * domains the day we get overlapping numbers (like if we ever
-        * decide to show the HT root
-        */
-       if (pci_device_from_OF_node(node, &pbus, &pid) == 0)
-               pdev = pci_find_slot(pbus, pid);
 
        LOCK(flags);
        if (value) {
@@ -1378,7 +1359,7 @@
                mb();
                k2_skiplist[1] = NULL;
        } else {
-               k2_skiplist[1] = pdev;
+               k2_skiplist[1] = node;
                mb();
                MACIO_BIC(KEYLARGO_FCR1, K2_FCR1_FW_CLK_ENABLE);
        }
diff -urN linux/arch/ppc/platforms/pmac_nvram.c 
linux/arch/ppc/platforms/pmac_nvram.c
--- linux/arch/ppc/platforms/pmac_nvram.c       2004/04/23 15:54:10     1.7
+++ linux/arch/ppc/platforms/pmac_nvram.c       2005/01/25 04:28:02     1.8
@@ -80,7 +80,7 @@
 static int nvram_mult, is_core_99;
 static int core99_bank = 0;
 static int nvram_partitions[3];
-static spinlock_t nv_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nv_lock);
 
 extern int pmac_newworld;
 extern int system_running;
diff -urN linux/arch/ppc/platforms/pmac_pci.c 
linux/arch/ppc/platforms/pmac_pci.c
--- linux/arch/ppc/platforms/pmac_pci.c 2005/01/13 14:05:32     1.13
+++ linux/arch/ppc/platforms/pmac_pci.c 2005/01/25 04:28:02     1.14
@@ -52,7 +52,7 @@
 extern u8 pci_cache_line_size;
 extern int pcibios_assign_bus_offset;
 
-struct pci_dev *k2_skiplist[2];
+struct device_node *k2_skiplist[2];
 
 /*
  * Magic constants for enabling cache coherency in the bandit/PSX bridge.
@@ -325,8 +325,7 @@
         * cycle accesses. Fix that here.
         */
        for (i=0; i<2; i++)
-               if (k2_skiplist[i] && k2_skiplist[i]->bus == bus &&
-                   k2_skiplist[i]->devfn == devfn) {
+               if (k2_skiplist[i] == np) {
                        switch (len) {
                        case 1:
                                *val = 0xff; break;
@@ -375,8 +374,7 @@
         * cycle accesses. Fix that here.
         */
        for (i=0; i<2; i++)
-               if (k2_skiplist[i] && k2_skiplist[i]->bus == bus &&
-                   k2_skiplist[i]->devfn == devfn)
+               if (k2_skiplist[i] == np)
                        return PCIBIOS_SUCCESSFUL;
 
        addr = u3_ht_cfg_access(hose, bus->number, devfn, offset);
diff -urN linux/arch/ppc/platforms/pmac_pic.c 
linux/arch/ppc/platforms/pmac_pic.c
--- linux/arch/ppc/platforms/pmac_pic.c 2004/10/25 20:44:18     1.15
+++ linux/arch/ppc/platforms/pmac_pic.c 2005/01/25 04:28:02     1.16
@@ -68,7 +68,7 @@
 static int max_real_irqs __pmacdata;
 static u32 level_mask[4] __pmacdata;
 
-static spinlock_t pmac_pic_lock __pmacdata = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pmac_pic_lock __pmacdata);
 
 
 #define GATWICK_IRQ_POOL_SIZE        10
diff -urN linux/arch/ppc/platforms/pq2ads.c linux/arch/ppc/platforms/pq2ads.c
--- linux/arch/ppc/platforms/pq2ads.c   2004/09/19 12:30:05     1.1
+++ linux/arch/ppc/platforms/pq2ads.c   2005/01/25 04:28:02     1.2
@@ -19,8 +19,8 @@
 #include <asm/mpc8260.h>
 
 void __init
-m82xx_board_init(void)
+m82xx_board_setup(void)
 {
        /* Enable the 2nd UART port */
-        *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_RS232_EN2;
+       *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_RS232_EN2;
 }
diff -urN linux/arch/ppc/platforms/pq2ads.h linux/arch/ppc/platforms/pq2ads.h
--- linux/arch/ppc/platforms/pq2ads.h   2004/09/19 12:30:05     1.3
+++ linux/arch/ppc/platforms/pq2ads.h   2005/01/25 04:28:02     1.4
@@ -40,6 +40,8 @@
 #define BCSR1_FETH_RST         ((uint)0x04000000)      /* 0 == reset */
 #define BCSR1_RS232_EN1                ((uint)0x02000000)      /* 0 == enable 
*/
 #define BCSR1_RS232_EN2                ((uint)0x01000000)      /* 0 == enable 
*/
+#define BCSR3_FETHIEN2         ((uint)0x10000000)      /* 0 == enable */
+#define BCSR3_FETH2_RST        ((uint)0x80000000)      /* 0 == reset */
 
 #define PHY_INTERRUPT  SIU_INT_IRQ7
 
diff -urN linux/arch/ppc/platforms/sbc82xx.c linux/arch/ppc/platforms/sbc82xx.c
--- linux/arch/ppc/platforms/sbc82xx.c  2004/11/15 11:49:20     1.6
+++ linux/arch/ppc/platforms/sbc82xx.c  2005/01/25 04:28:02     1.7
@@ -68,7 +68,7 @@
 
 static volatile char *sbc82xx_i8259_map;
 static char sbc82xx_i8259_mask = 0xff;
-static spinlock_t sbc82xx_i8259_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sbc82xx_i8259_lock);
 
 static void sbc82xx_i8259_mask_and_ack_irq(unsigned int irq_nr)
 {
diff -urN linux/arch/ppc/platforms/85xx/mpc85xx_devices.c 
linux/arch/ppc/platforms/85xx/mpc85xx_devices.c
--- linux/arch/ppc/platforms/85xx/mpc85xx_devices.c     1970/01/01 00:00:00
+++ linux/arch/ppc/platforms/85xx/mpc85xx_devices.c     Tue Jan 25 04:28:02 
2005        1.1
@@ -0,0 +1,531 @@
+/*
+ * arch/ppc/platforms/85xx/mpc85xx_devices.c
+ *
+ * MPC85xx Device descriptions
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2005 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/fsl_devices.h>
+#include <asm/mpc85xx.h>
+#include <asm/irq.h>
+#include <asm/ppc_sys.h>
+
+/* We use offsets for IORESOURCE_MEM since we do not know at compile time
+ * what CCSRBAR is, will get fixed up by mach_mpc85xx_fixup
+ */
+
+static struct gianfar_platform_data mpc85xx_tsec1_pdata = {
+       .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
+           FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
+           FSL_GIANFAR_DEV_HAS_MULTI_INTR,
+       .phy_reg_addr = MPC85xx_ENET1_OFFSET,
+};
+
+static struct gianfar_platform_data mpc85xx_tsec2_pdata = {
+       .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
+           FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
+           FSL_GIANFAR_DEV_HAS_MULTI_INTR,
+       .phy_reg_addr = MPC85xx_ENET1_OFFSET,
+};
+
+static struct gianfar_platform_data mpc85xx_fec_pdata = {
+       .phy_reg_addr = MPC85xx_ENET1_OFFSET,
+};
+
+static struct fsl_i2c_platform_data mpc85xx_fsl_i2c_pdata = {
+       .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR,
+};
+
+struct platform_device ppc_sys_platform_devices[] = {
+       [MPC85xx_TSEC1] = {
+               .name = "fsl-gianfar",
+               .id     = 1,
+               .dev.platform_data = &mpc85xx_tsec1_pdata,
+               .num_resources   = 4,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = MPC85xx_ENET1_OFFSET,
+                               .end    = MPC85xx_ENET1_OFFSET +
+                                               MPC85xx_ENET1_SIZE - 1,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .name   = "tx",
+                               .start  = MPC85xx_IRQ_TSEC1_TX,
+                               .end    = MPC85xx_IRQ_TSEC1_TX,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+                       {
+                               .name   = "rx",
+                               .start  = MPC85xx_IRQ_TSEC1_RX,
+                               .end    = MPC85xx_IRQ_TSEC1_RX,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+                       {
+                               .name   = "error",
+                               .start  = MPC85xx_IRQ_TSEC1_ERROR,
+                               .end    = MPC85xx_IRQ_TSEC1_ERROR,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_TSEC2] = {
+               .name = "fsl-gianfar",
+               .id     = 2,
+               .dev.platform_data = &mpc85xx_tsec2_pdata,
+               .num_resources   = 4,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = MPC85xx_ENET2_OFFSET,
+                               .end    = MPC85xx_ENET2_OFFSET +
+                                               MPC85xx_ENET2_SIZE - 1,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .name   = "tx",
+                               .start  = MPC85xx_IRQ_TSEC2_TX,
+                               .end    = MPC85xx_IRQ_TSEC2_TX,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+                       {
+                               .name   = "rx",
+                               .start  = MPC85xx_IRQ_TSEC2_RX,
+                               .end    = MPC85xx_IRQ_TSEC2_RX,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+                       {
+                               .name   = "error",
+                               .start  = MPC85xx_IRQ_TSEC2_ERROR,
+                               .end    = MPC85xx_IRQ_TSEC2_ERROR,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_FEC] = {
+               .name = "fsl-gianfar",
+               .id     = 3,
+               .dev.platform_data = &mpc85xx_fec_pdata,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = MPC85xx_ENET3_OFFSET,
+                               .end    = MPC85xx_ENET3_OFFSET +
+                                               MPC85xx_ENET3_SIZE - 1,
+                               .flags  = IORESOURCE_MEM,
+
+                       },
+                       {
+                               .start  = MPC85xx_IRQ_FEC,
+                               .end    = MPC85xx_IRQ_FEC,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_IIC1] = {
+               .name = "fsl-i2c",
+               .id     = 1,
+               .dev.platform_data = &mpc85xx_fsl_i2c_pdata,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = MPC85xx_IIC1_OFFSET,
+                               .end    = MPC85xx_IIC1_OFFSET +
+                                               MPC85xx_IIC1_SIZE - 1,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = MPC85xx_IRQ_IIC1,
+                               .end    = MPC85xx_IRQ_IIC1,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_DMA0] = {
+               .name = "fsl-dma",
+               .id     = 0,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = MPC85xx_DMA0_OFFSET,
+                               .end    = MPC85xx_DMA0_OFFSET +
+                                               MPC85xx_DMA0_SIZE - 1,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = MPC85xx_IRQ_DMA0,
+                               .end    = MPC85xx_IRQ_DMA0,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_DMA1] = {
+               .name = "fsl-dma",
+               .id     = 1,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = MPC85xx_DMA1_OFFSET,
+                               .end    = MPC85xx_DMA1_OFFSET +
+                                               MPC85xx_DMA1_SIZE - 1,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = MPC85xx_IRQ_DMA1,
+                               .end    = MPC85xx_IRQ_DMA1,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_DMA2] = {
+               .name = "fsl-dma",
+               .id     = 2,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = MPC85xx_DMA2_OFFSET,
+                               .end    = MPC85xx_DMA2_OFFSET +
+                                               MPC85xx_DMA2_SIZE - 1,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = MPC85xx_IRQ_DMA2,
+                               .end    = MPC85xx_IRQ_DMA2,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_DMA3] = {
+               .name = "fsl-dma",
+               .id     = 3,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = MPC85xx_DMA3_OFFSET,
+                               .end    = MPC85xx_DMA3_OFFSET +
+                                               MPC85xx_DMA3_SIZE - 1,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = MPC85xx_IRQ_DMA3,
+                               .end    = MPC85xx_IRQ_DMA3,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_PERFMON] = {
+               .name = "fsl-perfmon",
+               .id     = 1,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = MPC85xx_PERFMON_OFFSET,
+                               .end    = MPC85xx_PERFMON_OFFSET +
+                                               MPC85xx_PERFMON_SIZE - 1,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = MPC85xx_IRQ_PERFMON,
+                               .end    = MPC85xx_IRQ_PERFMON,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_SEC2] = {
+               .name = "fsl-sec2",
+               .id     = 1,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = MPC85xx_SEC2_OFFSET,
+                               .end    = MPC85xx_SEC2_OFFSET +
+                                               MPC85xx_SEC2_SIZE - 1,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = MPC85xx_IRQ_SEC2,
+                               .end    = MPC85xx_IRQ_SEC2,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+#ifdef CONFIG_CPM2
+       [MPC85xx_CPM_FCC1] = {
+               .name = "fsl-cpm-fcc",
+               .id     = 1,
+               .num_resources   = 3,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91300,
+                               .end    = 0x9131F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = 0x91380,
+                               .end    = 0x9139F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_FCC1,
+                               .end    = SIU_INT_FCC1,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_FCC2] = {
+               .name = "fsl-cpm-fcc",
+               .id     = 2,
+               .num_resources   = 3,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91320,
+                               .end    = 0x9133F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = 0x913A0,
+                               .end    = 0x913CF,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_FCC2,
+                               .end    = SIU_INT_FCC2,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_FCC3] = {
+               .name = "fsl-cpm-fcc",
+               .id     = 3,
+               .num_resources   = 3,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91340,
+                               .end    = 0x9135F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = 0x913D0,
+                               .end    = 0x913FF,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_FCC3,
+                               .end    = SIU_INT_FCC3,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_I2C] = {
+               .name = "fsl-cpm-i2c",
+               .id     = 1,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91860,
+                               .end    = 0x918BF,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_I2C,
+                               .end    = SIU_INT_I2C,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_SCC1] = {
+               .name = "fsl-cpm-scc",
+               .id     = 1,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91A00,
+                               .end    = 0x91A1F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_SCC1,
+                               .end    = SIU_INT_SCC1,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_SCC2] = {
+               .name = "fsl-cpm-scc",
+               .id     = 2,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91A20,
+                               .end    = 0x91A3F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_SCC2,
+                               .end    = SIU_INT_SCC2,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_SCC3] = {
+               .name = "fsl-cpm-scc",
+               .id     = 3,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91A40,
+                               .end    = 0x91A5F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_SCC3,
+                               .end    = SIU_INT_SCC3,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_SCC4] = {
+               .name = "fsl-cpm-scc",
+               .id     = 4,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91A60,
+                               .end    = 0x91A7F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_SCC4,
+                               .end    = SIU_INT_SCC4,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_SPI] = {
+               .name = "fsl-cpm-spi",
+               .id     = 1,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91AA0,
+                               .end    = 0x91AFF,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_SPI,
+                               .end    = SIU_INT_SPI,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_MCC1] = {
+               .name = "fsl-cpm-mcc",
+               .id     = 1,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91B30,
+                               .end    = 0x91B3F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_MCC1,
+                               .end    = SIU_INT_MCC1,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_MCC2] = {
+               .name = "fsl-cpm-mcc",
+               .id     = 2,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91B50,
+                               .end    = 0x91B5F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_MCC2,
+                               .end    = SIU_INT_MCC2,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_SMC1] = {
+               .name = "fsl-cpm-smc",
+               .id     = 1,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91A80,
+                               .end    = 0x91A8F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_SMC1,
+                               .end    = SIU_INT_SMC1,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_SMC2] = {
+               .name = "fsl-cpm-smc",
+               .id     = 2,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91A90,
+                               .end    = 0x91A9F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_SMC2,
+                               .end    = SIU_INT_SMC2,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+       [MPC85xx_CPM_USB] = {
+               .name = "fsl-cpm-usb",
+               .id     = 2,
+               .num_resources   = 2,
+               .resource = (struct resource[]) {
+                       {
+                               .start  = 0x91B60,
+                               .end    = 0x91B7F,
+                               .flags  = IORESOURCE_MEM,
+                       },
+                       {
+                               .start  = SIU_INT_USB,
+                               .end    = SIU_INT_USB,
+                               .flags  = IORESOURCE_IRQ,
+                       },
+               },
+       },
+#endif /* CONFIG_CPM2 */
+};
+
+static int __init mach_mpc85xx_fixup(struct platform_device *pdev)
+{
+       ppc_sys_fixup_mem_resource(pdev, CCSRBAR);
+       return 0;
+}
+
+static int __init mach_mpc85xx_init(void)
+{
+       ppc_sys_device_fixup = mach_mpc85xx_fixup;
+       return 0;
+}
+
+postcore_initcall(mach_mpc85xx_init);
diff -urN linux/arch/ppc/platforms/85xx/mpc85xx_sys.c 
linux/arch/ppc/platforms/85xx/mpc85xx_sys.c
--- linux/arch/ppc/platforms/85xx/mpc85xx_sys.c 1970/01/01 00:00:00
+++ linux/arch/ppc/platforms/85xx/mpc85xx_sys.c Tue Jan 25 04:28:02 2005        
1.1
@@ -0,0 +1,118 @@
+/*
+ * arch/ppc/platforms/85xx/mpc85xx_sys.c
+ *
+ * MPC85xx System descriptions
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2005 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <asm/ppc_sys.h>
+
+struct ppc_sys_spec *cur_ppc_sys_spec;
+struct ppc_sys_spec ppc_sys_specs[] = {
+       {
+               .ppc_sys_name   = "MPC8540",
+               .mask           = 0xFFFF0000,
+               .value          = 0x80300000,
+               .num_devices    = 9,
+               .device_list    = (enum ppc_sys_devices[])
+               {
+                       MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_FEC, MPC85xx_IIC1,
+                       MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
+                       MPC85xx_PERFMON,
+               },
+       },
+       {
+               .ppc_sys_name   = "MPC8560",
+               .mask           = 0xFFFF0000,
+               .value          = 0x80700000,
+               .num_devices    = 19,
+               .device_list    = (enum ppc_sys_devices[])
+               {
+                       MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
+                       MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
+                       MPC85xx_PERFMON,
+                       MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1,
+                       MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3, MPC85xx_CPM_SCC4,
+                       MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3,
+                       MPC85xx_CPM_MCC1, MPC85xx_CPM_MCC2,
+               },
+       },
+       {
+               .ppc_sys_name   = "MPC8541",
+               .mask           = 0xFFFF0000,
+               .value          = 0x80720000,
+               .num_devices    = 12,
+               .device_list    = (enum ppc_sys_devices[])
+               {
+                       MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
+                       MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
+                       MPC85xx_PERFMON,
+                       MPC85xx_CPM_SPI, MPC85xx_CPM_I2C,
+                       MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
+               },
+       },
+       {
+               .ppc_sys_name   = "MPC8541E",
+               .mask           = 0xFFFF0000,
+               .value          = 0x807A0000,
+               .num_devices    = 13,
+               .device_list    = (enum ppc_sys_devices[])
+               {
+                       MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
+                       MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
+                       MPC85xx_PERFMON, MPC85xx_SEC2,
+                       MPC85xx_CPM_SPI, MPC85xx_CPM_I2C,
+                       MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
+               },
+       },
+       {
+               .ppc_sys_name   = "MPC8555",
+               .mask           = 0xFFFF0000,
+               .value          = 0x80710000,
+               .num_devices    = 19,
+               .device_list    = (enum ppc_sys_devices[])
+               {
+                       MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
+                       MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
+                       MPC85xx_PERFMON,
+                       MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1,
+                       MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3,
+                       MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3,
+                       MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2,
+                       MPC85xx_CPM_USB,
+               },
+       },
+       {
+               .ppc_sys_name   = "MPC8555E",
+               .mask           = 0xFFFF0000,
+               .value          = 0x80790000,
+               .num_devices    = 20,
+               .device_list    = (enum ppc_sys_devices[])
+               {
+                       MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
+                       MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
+                       MPC85xx_PERFMON, MPC85xx_SEC2,
+                       MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1,
+                       MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3,
+                       MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3,
+                       MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2,
+                       MPC85xx_CPM_USB,
+               },
+       },
+       {       /* default match */
+               .ppc_sys_name   = "",
+               .mask           = 0x00000000,
+               .value          = 0x00000000,
+       },
+};
diff -urN linux/arch/ppc/platforms/85xx/Kconfig 
linux/arch/ppc/platforms/85xx/Kconfig
--- linux/arch/ppc/platforms/85xx/Kconfig       2004/08/06 00:33:23     1.3
+++ linux/arch/ppc/platforms/85xx/Kconfig       2005/01/25 04:28:02     1.4
@@ -62,11 +62,6 @@
        depends on MPC8555_CDS
        default y
 
-config FSL_OCP
-       bool
-       depends on 85xx
-       default y
-
 config PPC_GEN550
        bool
        depends on MPC8540 || SBC8560 || MPC8555
diff -urN linux/arch/ppc/platforms/85xx/Makefile 
linux/arch/ppc/platforms/85xx/Makefile
--- linux/arch/ppc/platforms/85xx/Makefile      2004/08/06 00:33:23     1.3
+++ linux/arch/ppc/platforms/85xx/Makefile      2005/01/25 04:28:02     1.4
@@ -1,12 +1,9 @@
 #
 # Makefile for the PowerPC 85xx linux kernel.
 #
+obj-$(CONFIG_85xx)             += mpc85xx_sys.o mpc85xx_devices.o
 
 obj-$(CONFIG_MPC8540_ADS)      += mpc85xx_ads_common.o mpc8540_ads.o
 obj-$(CONFIG_MPC8555_CDS)      += mpc85xx_cds_common.o
 obj-$(CONFIG_MPC8560_ADS)      += mpc85xx_ads_common.o mpc8560_ads.o
 obj-$(CONFIG_SBC8560)          += sbc85xx.o sbc8560.o
-
-obj-$(CONFIG_MPC8540)          += mpc8540.o
-obj-$(CONFIG_MPC8555)          += mpc8555.o
-obj-$(CONFIG_MPC8560)          += mpc8560.o
diff -urN linux/arch/ppc/platforms/85xx/mpc8540_ads.c 
linux/arch/ppc/platforms/85xx/mpc8540_ads.c
--- linux/arch/ppc/platforms/85xx/mpc8540_ads.c 2004/09/19 12:30:05     1.3
+++ linux/arch/ppc/platforms/85xx/mpc8540_ads.c 2005/01/25 04:28:02     1.4
@@ -32,6 +32,7 @@
 #include <linux/serial_core.h>
 #include <linux/initrd.h>
 #include <linux/module.h>
+#include <linux/fsl_devices.h>
 
 #include <asm/system.h>
 #include <asm/pgtable.h>
@@ -48,50 +49,11 @@
 #include <asm/irq.h>
 #include <asm/immap_85xx.h>
 #include <asm/kgdb.h>
-#include <asm/ocp.h>
+#include <asm/ppc_sys.h>
 #include <mm/mmu_decl.h>
 
-#include <syslib/ppc85xx_common.h>
 #include <syslib/ppc85xx_setup.h>
 
-struct ocp_gfar_data mpc85xx_tsec1_def = {
-       .interruptTransmit = MPC85xx_IRQ_TSEC1_TX,
-       .interruptError = MPC85xx_IRQ_TSEC1_ERROR,
-       .interruptReceive = MPC85xx_IRQ_TSEC1_RX,
-       .interruptPHY = MPC85xx_IRQ_EXT5,
-       .flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR
-                       | GFAR_HAS_RMON
-                       | GFAR_HAS_PHY_INTR | GFAR_HAS_COALESCE),
-       .phyid = 0,
-       .phyregidx = 0,
-};
-
-struct ocp_gfar_data mpc85xx_tsec2_def = {
-       .interruptTransmit = MPC85xx_IRQ_TSEC2_TX,
-       .interruptError = MPC85xx_IRQ_TSEC2_ERROR,
-       .interruptReceive = MPC85xx_IRQ_TSEC2_RX,
-       .interruptPHY = MPC85xx_IRQ_EXT5,
-       .flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR
-                       | GFAR_HAS_RMON
-                       | GFAR_HAS_PHY_INTR | GFAR_HAS_COALESCE),
-       .phyid = 1,
-       .phyregidx = 0,
-};
-
-struct ocp_gfar_data mpc85xx_fec_def = {
-       .interruptTransmit = MPC85xx_IRQ_FEC,
-       .interruptError = MPC85xx_IRQ_FEC,
-       .interruptReceive = MPC85xx_IRQ_FEC,
-       .interruptPHY = MPC85xx_IRQ_EXT5,
-       .flags = 0,
-       .phyid = 3,
-       .phyregidx = 0,
-};
-
-struct ocp_fs_i2c_data mpc85xx_i2c1_def = {
-       .flags = FS_I2C_SEPARATE_DFSRR,
-};
-
 /* ************************************************************************
  *
  * Setup the architecture
@@ -100,10 +62,9 @@
 static void __init
 mpc8540ads_setup_arch(void)
 {
-       struct ocp_def *def;
-       struct ocp_gfar_data *einfo;
        bd_t *binfo = (bd_t *) __res;
        unsigned int freq;
+       struct gianfar_platform_data *pdata;
 
        /* get the core frequency */
        freq = binfo->bi_intfreq;
@@ -130,23 +91,30 @@
        invalidate_tlbcam_entry(NUM_TLBCAMS - 1);
 #endif
 
-       def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 0);
-       if (def) {
-               einfo = (struct ocp_gfar_data *) def->additions;
-               memcpy(einfo->mac_addr, binfo->bi_enetaddr, 6);
-       }
-
-       def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 1);
-       if (def) {
-               einfo = (struct ocp_gfar_data *) def->additions;
-               memcpy(einfo->mac_addr, binfo->bi_enet1addr, 6);
-       }
-
-       def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 2);
-       if (def) {
-               einfo = (struct ocp_gfar_data *) def->additions;
-               memcpy(einfo->mac_addr, binfo->bi_enet2addr, 6);
-       }
+       /* setup the board related information for the enet controllers */
+       pdata = (struct gianfar_platform_data *) 
ppc_sys_get_pdata(MPC85xx_TSEC1);
+       pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+       pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+       pdata->phyid = 0;
+       /* fixup phy address */
+       pdata->phy_reg_addr += binfo->bi_immr_base;
+       memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+
+       pdata = (struct gianfar_platform_data *) 
ppc_sys_get_pdata(MPC85xx_TSEC2);
+       pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+       pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+       pdata->phyid = 1;
+       /* fixup phy address */
+       pdata->phy_reg_addr += binfo->bi_immr_base;
+       memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
+
+       pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC);
+       pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+       pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+       pdata->phyid = 3;
+       /* fixup phy address */
+       pdata->phy_reg_addr += binfo->bi_immr_base;
+       memcpy(pdata->mac_addr, binfo->bi_enet2addr, 6);
 
 #ifdef CONFIG_BLK_DEV_INITRD
        if (initrd_start)
@@ -158,8 +126,6 @@
 #else
                ROOT_DEV = Root_HDA1;
 #endif
-
-       ocp_for_each_device(mpc85xx_update_paddr_ocp, &(binfo->bi_immr_base));
 }
 
 /* ************************************************************************ */
@@ -206,6 +172,8 @@
                strcpy(cmd_line, (char *) (r6 + KERNELBASE));
        }
 
+       identify_ppc_sys_by_id(mfspr(SVR));
+
        /* setup the PowerPC module struct */
        ppc_md.setup_arch = mpc8540ads_setup_arch;
        ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo;
diff -urN linux/arch/ppc/platforms/85xx/mpc8555_cds.h 
linux/arch/ppc/platforms/85xx/mpc8555_cds.h
--- linux/arch/ppc/platforms/85xx/mpc8555_cds.h 2004/08/06 00:33:23     1.1
+++ linux/arch/ppc/platforms/85xx/mpc8555_cds.h 2005/01/25 04:28:02     1.2
@@ -18,7 +18,7 @@
 #define __MACH_MPC8555CDS_H__
 
 #include <linux/config.h>
-#include <linux/serial.h>
+#include <syslib/ppc85xx_setup.h>
 #include <platforms/85xx/mpc85xx_cds_common.h>
 
 #define CPM_MAP_ADDR   (CCSRBAR + MPC85xx_CPM_OFFSET)
diff -urN linux/arch/ppc/platforms/85xx/mpc8560_ads.c 
linux/arch/ppc/platforms/85xx/mpc8560_ads.c
--- linux/arch/ppc/platforms/85xx/mpc8560_ads.c 2004/11/15 11:49:20     1.3
+++ linux/arch/ppc/platforms/85xx/mpc8560_ads.c 2005/01/25 04:28:02     1.4
@@ -32,6 +32,7 @@
 #include <linux/serial_core.h>
 #include <linux/initrd.h>
 #include <linux/module.h>
+#include <linux/fsl_devices.h>
 
 #include <asm/system.h>
 #include <asm/pgtable.h>
@@ -48,7 +49,7 @@
 #include <asm/irq.h>
 #include <asm/immap_85xx.h>
 #include <asm/kgdb.h>
-#include <asm/ocp.h>
+#include <asm/ppc_sys.h>
 #include <asm/cpm2.h>
 #include <mm/mmu_decl.h>
 
@@ -58,34 +59,6 @@
 
 extern void cpm2_reset(void);
 
-struct ocp_gfar_data mpc85xx_tsec1_def = {
-        .interruptTransmit = MPC85xx_IRQ_TSEC1_TX,
-        .interruptError = MPC85xx_IRQ_TSEC1_ERROR,
-        .interruptReceive = MPC85xx_IRQ_TSEC1_RX,
-        .interruptPHY = MPC85xx_IRQ_EXT5,
-        .flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR
-                       | GFAR_HAS_RMON | GFAR_HAS_COALESCE
-                        | GFAR_HAS_PHY_INTR),
-        .phyid = 0,
-        .phyregidx = 0,
-};
-
-struct ocp_gfar_data mpc85xx_tsec2_def = {
-        .interruptTransmit = MPC85xx_IRQ_TSEC2_TX,
-        .interruptError = MPC85xx_IRQ_TSEC2_ERROR,
-        .interruptReceive = MPC85xx_IRQ_TSEC2_RX,
-        .interruptPHY = MPC85xx_IRQ_EXT5,
-        .flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR
-                       | GFAR_HAS_RMON | GFAR_HAS_COALESCE
-                        | GFAR_HAS_PHY_INTR),
-        .phyid = 1,
-        .phyregidx = 0,
-};
-
-struct ocp_fs_i2c_data mpc85xx_i2c1_def = {
-       .flags = FS_I2C_SEPARATE_DFSRR,
-};
-
 /* ************************************************************************
  *
  * Setup the architecture
@@ -95,10 +68,9 @@
 static void __init
 mpc8560ads_setup_arch(void)
 {
-       struct ocp_def *def;
-       struct ocp_gfar_data *einfo;
        bd_t *binfo = (bd_t *) __res;
        unsigned int freq;
+       struct gianfar_platform_data *pdata;
 
        cpm2_reset();
 
@@ -117,17 +89,22 @@
        mpc85xx_setup_hose();
 #endif
 
-       def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 0);
-       if (def) {
-               einfo = (struct ocp_gfar_data *) def->additions;
-               memcpy(einfo->mac_addr, binfo->bi_enetaddr, 6);
-       }
-
-       def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 1);
-       if (def) {
-               einfo = (struct ocp_gfar_data *) def->additions;
-               memcpy(einfo->mac_addr, binfo->bi_enet1addr, 6);
-       }
+       /* setup the board related information for the enet controllers */
+       pdata = (struct gianfar_platform_data *) 
ppc_sys_get_pdata(MPC85xx_TSEC1);
+       pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+       pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+       pdata->phyid = 0;
+       /* fixup phy address */
+       pdata->phy_reg_addr += binfo->bi_immr_base;
+       memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+
+       pdata = (struct gianfar_platform_data *) 
ppc_sys_get_pdata(MPC85xx_TSEC2);
+       pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+       pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+       pdata->phyid = 1;
+       /* fixup phy address */
+       pdata->phy_reg_addr += binfo->bi_immr_base;
+       memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
 
 #ifdef CONFIG_BLK_DEV_INITRD
        if (initrd_start)
@@ -139,8 +116,6 @@
 #else
                ROOT_DEV = Root_HDA1;
 #endif
-
-       ocp_for_each_device(mpc85xx_update_paddr_ocp, &(binfo->bi_immr_base));
 }
 
 static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
@@ -222,6 +197,8 @@
                strcpy(cmd_line, (char *) (r6 + KERNELBASE));
        }
 
+       identify_ppc_sys_by_id(mfspr(SVR));
+
        /* setup the PowerPC module struct */
        ppc_md.setup_arch = mpc8560ads_setup_arch;
        ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo;
diff -urN linux/arch/ppc/platforms/85xx/mpc85xx_ads_common.c 
linux/arch/ppc/platforms/85xx/mpc85xx_ads_common.c
--- linux/arch/ppc/platforms/85xx/mpc85xx_ads_common.c  2004/11/15 11:49:20     
1.2
+++ linux/arch/ppc/platforms/85xx/mpc85xx_ads_common.c  2005/01/25 04:28:02     
1.3
@@ -43,7 +43,6 @@
 #include <asm/mpc85xx.h>
 #include <asm/irq.h>
 #include <asm/immap_85xx.h>
-#include <asm/ocp.h>
 
 #include <mm/mmu_decl.h>
 
diff -urN linux/arch/ppc/platforms/85xx/mpc85xx_cds_common.c 
linux/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
--- linux/arch/ppc/platforms/85xx/mpc85xx_cds_common.c  2004/11/15 11:49:20     
1.4
+++ linux/arch/ppc/platforms/85xx/mpc85xx_cds_common.c  2005/01/25 04:28:02     
1.5
@@ -32,6 +32,7 @@
 #include <linux/initrd.h>
 #include <linux/tty.h>
 #include <linux/serial_core.h>
+#include <linux/fsl_devices.h>
 
 #include <asm/system.h>
 #include <asm/pgtable.h>
@@ -48,7 +49,7 @@
 #include <asm/irq.h>
 #include <asm/immap_85xx.h>
 #include <asm/immap_cpm2.h>
-#include <asm/ocp.h>
+#include <asm/ppc_sys.h>
 #include <asm/kgdb.h>
 
 #include <mm/mmu_decl.h>
@@ -129,32 +130,6 @@
 #endif
 };
 
-struct ocp_gfar_data mpc85xx_tsec1_def = {
-        .interruptTransmit = MPC85xx_IRQ_TSEC1_TX,
-        .interruptError = MPC85xx_IRQ_TSEC1_ERROR,
-        .interruptReceive = MPC85xx_IRQ_TSEC1_RX,
-        .interruptPHY = MPC85xx_IRQ_EXT5,
-        .flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR |
-                        GFAR_HAS_PHY_INTR),
-        .phyid = 0,
-        .phyregidx = 0,
-};
-
-struct ocp_gfar_data mpc85xx_tsec2_def = {
-        .interruptTransmit = MPC85xx_IRQ_TSEC2_TX,
-        .interruptError = MPC85xx_IRQ_TSEC2_ERROR,
-        .interruptReceive = MPC85xx_IRQ_TSEC2_RX,
-        .interruptPHY = MPC85xx_IRQ_EXT5,
-        .flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR |
-                        GFAR_HAS_PHY_INTR),
-        .phyid = 1,
-        .phyregidx = 0,
-};
-
-struct ocp_fs_i2c_data mpc85xx_i2c1_def = {
-       .flags = FS_I2C_SEPARATE_DFSRR,
-};
-
 /* ************************************************************************ */
 int
 mpc85xx_cds_show_cpuinfo(struct seq_file *m)
@@ -335,10 +310,9 @@
 static void __init
 mpc85xx_cds_setup_arch(void)
 {
-        struct ocp_def *def;
-        struct ocp_gfar_data *einfo;
         bd_t *binfo = (bd_t *) __res;
         unsigned int freq;
+       struct gianfar_platform_data *pdata;
 
         /* get the core frequency */
         freq = binfo->bi_intfreq;
@@ -372,17 +346,23 @@
        invalidate_tlbcam_entry(NUM_TLBCAMS - 1);
 #endif
 
-        def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 0);
-        if (def) {
-                einfo = (struct ocp_gfar_data *) def->additions;
-                memcpy(einfo->mac_addr, binfo->bi_enetaddr, 6);
-        }
+       /* setup the board related information for the enet controllers */
+       pdata = (struct gianfar_platform_data *) 
ppc_sys_get_pdata(MPC85xx_TSEC1);
+       pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+       pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+       pdata->phyid = 0;
+       /* fixup phy address */
+       pdata->phy_reg_addr += binfo->bi_immr_base;
+       memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+
+       pdata = (struct gianfar_platform_data *) 
ppc_sys_get_pdata(MPC85xx_TSEC2);
+       pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+       pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+       pdata->phyid = 1;
+       /* fixup phy address */
+       pdata->phy_reg_addr += binfo->bi_immr_base;
+       memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
 
-        def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 1);
-        if (def) {
-                einfo = (struct ocp_gfar_data *) def->additions;
-                memcpy(einfo->mac_addr, binfo->bi_enet1addr, 6);
-        }
 
 #ifdef CONFIG_BLK_DEV_INITRD
         if (initrd_start)
@@ -394,8 +374,6 @@
 #else
                 ROOT_DEV = Root_HDA1;
 #endif
-
-       ocp_for_each_device(mpc85xx_update_paddr_ocp, &(binfo->bi_immr_base));
 }
 
 /* ************************************************************************ */
@@ -444,6 +422,8 @@
                 strcpy(cmd_line, (char *) (r6 + KERNELBASE));
         }
 
+       identify_ppc_sys_by_id(mfspr(SVR));
+
         /* setup the PowerPC module struct */
         ppc_md.setup_arch = mpc85xx_cds_setup_arch;
         ppc_md.show_cpuinfo = mpc85xx_cds_show_cpuinfo;
diff -urN linux/arch/ppc/platforms/85xx/sbc8560.c 
linux/arch/ppc/platforms/85xx/sbc8560.c
--- linux/arch/ppc/platforms/85xx/sbc8560.c     2004/09/19 12:30:05     1.4
+++ linux/arch/ppc/platforms/85xx/sbc8560.c     2005/01/25 04:28:02     1.5
@@ -32,6 +32,7 @@
 #include <linux/serial_core.h>
 #include <linux/initrd.h>
 #include <linux/module.h>
+#include <linux/fsl_devices.h>
 
 #include <asm/system.h>
 #include <asm/pgtable.h>
@@ -48,37 +49,12 @@
 #include <asm/irq.h>
 #include <asm/immap_85xx.h>
 #include <asm/kgdb.h>
-#include <asm/ocp.h>
+#include <asm/ppc_sys.h>
 #include <mm/mmu_decl.h>
 
 #include <syslib/ppc85xx_common.h>
 #include <syslib/ppc85xx_setup.h>
 
-struct ocp_gfar_data mpc85xx_tsec1_def = {
-       .interruptTransmit = MPC85xx_IRQ_TSEC1_TX,
-       .interruptError = MPC85xx_IRQ_TSEC1_ERROR,
-       .interruptReceive = MPC85xx_IRQ_TSEC1_RX,
-       .interruptPHY = MPC85xx_IRQ_EXT6,
-       .flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR | GFAR_HAS_PHY_INTR),
-       .phyid = 25,
-       .phyregidx = 0,
-};
-
-struct ocp_gfar_data mpc85xx_tsec2_def = {
-       .interruptTransmit = MPC85xx_IRQ_TSEC2_TX,
-       .interruptError = MPC85xx_IRQ_TSEC2_ERROR,
-       .interruptReceive = MPC85xx_IRQ_TSEC2_RX,
-       .interruptPHY = MPC85xx_IRQ_EXT7,
-       .flags = (GFAR_HAS_GIGABIT | GFAR_HAS_MULTI_INTR | GFAR_HAS_PHY_INTR),
-       .phyid = 26,
-       .phyregidx = 0,
-};
-
-struct ocp_fs_i2c_data mpc85xx_i2c1_def = {
-       .flags = FS_I2C_SEPARATE_DFSRR,
-};
-
-
 #ifdef CONFIG_SERIAL_8250
 static void __init
 sbc8560_early_serial_map(void)
@@ -125,10 +101,9 @@
 static void __init
 sbc8560_setup_arch(void)
 {
-       struct ocp_def *def;
-       struct ocp_gfar_data *einfo;
        bd_t *binfo = (bd_t *) __res;
        unsigned int freq;
+       struct gianfar_platform_data *pdata;
 
        /* get the core frequency */
        freq = binfo->bi_intfreq;
@@ -153,18 +128,22 @@
        invalidate_tlbcam_entry(NUM_TLBCAMS - 1);
 #endif
 
-       /* Set up MAC addresses for the Ethernet devices */
-       def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 0);
-       if (def) {
-               einfo = (struct ocp_gfar_data *) def->additions;
-               memcpy(einfo->mac_addr, binfo->bi_enetaddr, 6);
-       }
-
-       def = ocp_get_one_device(OCP_VENDOR_FREESCALE, OCP_FUNC_GFAR, 1);
-       if (def) {
-               einfo = (struct ocp_gfar_data *) def->additions;
-               memcpy(einfo->mac_addr, binfo->bi_enet1addr, 6);
-       }
+       /* setup the board related information for the enet controllers */
+       pdata = (struct gianfar_platform_data *) 
ppc_sys_get_pdata(MPC85xx_TSEC1);
+       pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+       pdata->interruptPHY = MPC85xx_IRQ_EXT6;
+       pdata->phyid = 25;
+       /* fixup phy address */
+       pdata->phy_reg_addr += binfo->bi_immr_base;
+       memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+
+       pdata = (struct gianfar_platform_data *) 
ppc_sys_get_pdata(MPC85xx_TSEC2);
+       pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+       pdata->interruptPHY = MPC85xx_IRQ_EXT7;
+       pdata->phyid = 26;
+       /* fixup phy address */
+       pdata->phy_reg_addr += binfo->bi_immr_base;
+       memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
 
 #ifdef CONFIG_BLK_DEV_INITRD
        if (initrd_start)
@@ -176,8 +155,6 @@
 #else
                ROOT_DEV = Root_HDA1;
 #endif
-
-       ocp_for_each_device(mpc85xx_update_paddr_ocp, &(binfo->bi_immr_base));
 }
 
 /* ************************************************************************ */
@@ -221,6 +198,8 @@
                strcpy(cmd_line, (char *) (r6 + KERNELBASE));
        }
 
+       identify_ppc_sys_by_id(mfspr(SVR));
+
        /* setup the PowerPC module struct */
        ppc_md.setup_arch = sbc8560_setup_arch;
        ppc_md.show_cpuinfo = sbc8560_show_cpuinfo;
diff -urN linux/arch/ppc/platforms/85xx/sbc85xx.c 
linux/arch/ppc/platforms/85xx/sbc85xx.c
--- linux/arch/ppc/platforms/85xx/sbc85xx.c     2004/11/15 11:49:20     1.3
+++ linux/arch/ppc/platforms/85xx/sbc85xx.c     2005/01/25 04:28:02     1.4
@@ -42,7 +42,6 @@
 #include <asm/mpc85xx.h>
 #include <asm/irq.h>
 #include <asm/immap_85xx.h>
-#include <asm/ocp.h>
 
 #include <mm/mmu_decl.h>
 
diff -urN linux/arch/ppc/platforms/85xx/mpc8540.c 
linux/arch/ppc/platforms/85xx/mpc8540.c
--- linux/arch/ppc/platforms/85xx/Attic/mpc8540.c       Tue Jan 25 04:28:03 
2005        1.1
+++ linux/arch/ppc/platforms/85xx/Attic/mpc8540.c       1970/01/01 00:00:002002
@@ -1,97 +0,0 @@
-/*
- * arch/ppc/platforms/85xx/mpc8540.c
- *
- * MPC8540 I/O descriptions
- *
- * Maintainer: Kumar Gala <kumar.gala@freescale.com>
- *
- * Copyright 2004 Freescale Semiconductor Inc.
- *
- * This program is free software; you can redistribute  it and/or modify it
- * under  the terms of  the GNU General  Public License as published by the
- * Free Software Foundation;  either version 2 of the  License, or (at your
- * option) any later version.
- */
-
-#include <linux/init.h>
-#include <linux/module.h>
-#include <asm/mpc85xx.h>
-#include <asm/ocp.h>
-
-/* These should be defined in platform code */
-extern struct ocp_gfar_data mpc85xx_tsec1_def;
-extern struct ocp_gfar_data mpc85xx_tsec2_def;
-extern struct ocp_gfar_data mpc85xx_fec_def;
-extern struct ocp_mpc_i2c_data mpc85xx_i2c1_def;
-
-/* We use offsets for paddr since we do not know at compile time
- * what CCSRBAR is, platform code should fix this up in
- * setup_arch
- *
- * Only the first IRQ is given even if a device has
- * multiple lines associated with ita
- */
-struct ocp_def core_ocp[] = {
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_IIC,
-          .index        = 0,
-          .paddr        = MPC85xx_IIC1_OFFSET,
-          .irq          = MPC85xx_IRQ_IIC1,
-          .pm           = OCP_CPM_NA,
-          .additions    = &mpc85xx_i2c1_def,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_16550,
-          .index        = 0,
-          .paddr        = MPC85xx_UART0_OFFSET,
-          .irq          = MPC85xx_IRQ_DUART,
-          .pm           = OCP_CPM_NA,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_16550,
-          .index        = 1,
-          .paddr        = MPC85xx_UART1_OFFSET,
-          .irq          = MPC85xx_IRQ_DUART,
-          .pm           = OCP_CPM_NA,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_GFAR,
-          .index        = 0,
-          .paddr        = MPC85xx_ENET1_OFFSET,
-          .irq          = MPC85xx_IRQ_TSEC1_TX,
-          .pm           = OCP_CPM_NA,
-          .additions    = &mpc85xx_tsec1_def,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_GFAR,
-          .index        = 1,
-          .paddr        = MPC85xx_ENET2_OFFSET,
-          .irq          = MPC85xx_IRQ_TSEC2_TX,
-          .pm           = OCP_CPM_NA,
-          .additions    = &mpc85xx_tsec2_def,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_GFAR,
-          .index        = 2,
-          .paddr        = MPC85xx_ENET3_OFFSET,
-          .irq          = MPC85xx_IRQ_FEC,
-          .pm           = OCP_CPM_NA,
-          .additions    = &mpc85xx_fec_def,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_DMA,
-          .index        = 0,
-          .paddr        = MPC85xx_DMA_OFFSET,
-          .irq          = MPC85xx_IRQ_DMA0,
-          .pm           = OCP_CPM_NA,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_PERFMON,
-          .index        = 0,
-          .paddr        = MPC85xx_PERFMON_OFFSET,
-          .irq          = MPC85xx_IRQ_PERFMON,
-          .pm           = OCP_CPM_NA,
-        },
-        { .vendor       = OCP_VENDOR_INVALID
-        }
-};
diff -urN linux/arch/ppc/platforms/85xx/mpc8555.c 
linux/arch/ppc/platforms/85xx/mpc8555.c
--- linux/arch/ppc/platforms/85xx/Attic/mpc8555.c       Tue Jan 25 04:28:03 
2005        1.2
+++ linux/arch/ppc/platforms/85xx/Attic/mpc8555.c       1970/01/01 00:00:002002
@@ -1,95 +0,0 @@
-/*
- * arch/ppc/platform/85xx/mpc8555.c
- *
- * MPC8555 I/O descriptions
- *
- * Maintainer: Kumar Gala <kumar.gala@freescale.com>
- *
- * Copyright 2004 Freescale Semiconductor Inc.
- *
- * This program is free software; you can redistribute  it and/or modify it
- * under  the terms of  the GNU General  Public License as published by the
- * Free Software Foundation;  either version 2 of the  License, or (at your
- * option) any later version.
- */
-
-#include <linux/init.h>
-#include <linux/module.h>
-#include <asm/mpc85xx.h>
-#include <asm/ocp.h>
-
-/* These should be defined in platform code */
-extern struct ocp_gfar_data mpc85xx_tsec1_def;
-extern struct ocp_gfar_data mpc85xx_tsec2_def;
-extern struct ocp_mpc_i2c_data mpc85xx_i2c1_def;
-
-/* We use offsets for paddr since we do not know at compile time
- * what CCSRBAR is, platform code should fix this up in
- * setup_arch
- *
- * Only the first IRQ is given even if a device has
- * multiple lines associated with ita
- */
-struct ocp_def core_ocp[] = {
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_IIC,
-          .index        = 0,
-          .paddr        = MPC85xx_IIC1_OFFSET,
-          .irq          = MPC85xx_IRQ_IIC1,
-          .pm           = OCP_CPM_NA,
-         .additions    = &mpc85xx_i2c1_def,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_16550,
-          .index        = 0,
-          .paddr        = MPC85xx_UART0_OFFSET,
-          .irq          = MPC85xx_IRQ_DUART,
-          .pm           = OCP_CPM_NA,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_16550,
-          .index        = 1,
-          .paddr        = MPC85xx_UART1_OFFSET,
-          .irq          = MPC85xx_IRQ_DUART,
-          .pm           = OCP_CPM_NA,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_GFAR,
-          .index        = 0,
-          .paddr        = MPC85xx_ENET1_OFFSET,
-          .irq          = MPC85xx_IRQ_TSEC1_TX,
-          .pm           = OCP_CPM_NA,
-          .additions    = &mpc85xx_tsec1_def,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_GFAR,
-          .index        = 1,
-          .paddr        = MPC85xx_ENET2_OFFSET,
-          .irq          = MPC85xx_IRQ_TSEC2_TX,
-          .pm           = OCP_CPM_NA,
-          .additions    = &mpc85xx_tsec2_def,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_DMA,
-          .index        = 0,
-          .paddr        = MPC85xx_DMA_OFFSET,
-          .irq          = MPC85xx_IRQ_DMA0,
-          .pm           = OCP_CPM_NA,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_SEC2,
-          .index        = 0,
-          .paddr        = MPC85xx_SEC2_OFFSET,
-          .irq          = MPC85xx_IRQ_SEC2,
-          .pm           = OCP_CPM_NA,
-       },
-       { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_PERFMON,
-          .index        = 0,
-          .paddr        = MPC85xx_PERFMON_OFFSET,
-          .irq          = MPC85xx_IRQ_PERFMON,
-          .pm           = OCP_CPM_NA,
-        },
-        { .vendor       = OCP_VENDOR_INVALID
-        }
-};
diff -urN linux/arch/ppc/platforms/85xx/mpc8560.c 
linux/arch/ppc/platforms/85xx/mpc8560.c
--- linux/arch/ppc/platforms/85xx/Attic/mpc8560.c       Tue Jan 25 04:28:03 
2005        1.1
+++ linux/arch/ppc/platforms/85xx/Attic/mpc8560.c       1970/01/01 00:00:002002
@@ -1,74 +0,0 @@
-/*
- * arch/ppc/platforms/85xx/mpc8560.c
- * 
- * MPC8560 I/O descriptions
- * 
- * Maintainer: Kumar Gala <kumar.gala@freescale.com>
- *
- * Copyright 2004 Freescale Semiconductor Inc.
- * 
- * This program is free software; you can redistribute  it and/or modify it
- * under  the terms of  the GNU General  Public License as published by the
- * Free Software Foundation;  either version 2 of the  License, or (at your
- * option) any later version.
- */
-
-#include <linux/init.h>
-#include <linux/module.h>
-#include <asm/mpc85xx.h>
-#include <asm/ocp.h>
-
-/* These should be defined in platform code */
-extern struct ocp_gfar_data mpc85xx_tsec1_def;
-extern struct ocp_gfar_data mpc85xx_tsec2_def;
-extern struct ocp_mpc_i2c_data mpc85xx_i2c1_def;
-
-/* We use offsets for paddr since we do not know at compile time
- * what CCSRBAR is, platform code should fix this up in
- * setup_arch
- *
- * Only the first IRQ is given even if a device has
- * multiple lines associated with ita
- */
-struct ocp_def core_ocp[] = {
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_IIC,
-          .index        = 0,
-          .paddr        = MPC85xx_IIC1_OFFSET,
-          .irq          = MPC85xx_IRQ_IIC1,
-          .pm           = OCP_CPM_NA,
-          .additions    = &mpc85xx_i2c1_def,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_GFAR,
-          .index        = 0,
-          .paddr        = MPC85xx_ENET1_OFFSET,
-          .irq          = MPC85xx_IRQ_TSEC1_TX,
-          .pm           = OCP_CPM_NA,
-          .additions    = &mpc85xx_tsec1_def,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_GFAR,
-          .index        = 1,
-          .paddr        = MPC85xx_ENET2_OFFSET,
-          .irq          = MPC85xx_IRQ_TSEC2_TX,
-          .pm           = OCP_CPM_NA,
-          .additions    = &mpc85xx_tsec2_def,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_DMA,
-          .index        = 0,
-          .paddr        = MPC85xx_DMA_OFFSET,
-          .irq          = MPC85xx_IRQ_DMA0,
-          .pm           = OCP_CPM_NA,
-        },
-        { .vendor       = OCP_VENDOR_FREESCALE,
-          .function     = OCP_FUNC_PERFMON,
-          .index        = 0,
-          .paddr        = MPC85xx_PERFMON_OFFSET,
-          .irq          = MPC85xx_IRQ_PERFMON,
-          .pm           = OCP_CPM_NA,
-        },
-        { .vendor       = OCP_VENDOR_INVALID
-        }
-};
diff -urN linux/arch/ppc/syslib/ppc_sys.c linux/arch/ppc/syslib/ppc_sys.c
--- linux/arch/ppc/syslib/ppc_sys.c     1970/01/01 00:00:00
+++ linux/arch/ppc/syslib/ppc_sys.c     Tue Jan 25 04:28:03 2005        1.1
@@ -0,0 +1,103 @@
+/*
+ * arch/ppc/syslib/ppc_sys.c
+ *
+ * PPC System library functions
+ *
+ * Maintainer: Kumar Gala <kumar.gala@freescale.com>
+ *
+ * Copyright 2005 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <asm/ppc_sys.h>
+
+int (*ppc_sys_device_fixup) (struct platform_device * pdev);
+
+static int ppc_sys_inited;
+
+void __init identify_ppc_sys_by_id(u32 id)
+{
+       unsigned int i = 0;
+       while (1) {
+               if ((ppc_sys_specs[i].mask & id) == ppc_sys_specs[i].value)
+                       break;
+               i++;
+       }
+
+       cur_ppc_sys_spec = &ppc_sys_specs[i];
+
+       return;
+}
+
+void __init identify_ppc_sys_by_name(char *name)
+{
+       /* TODO */
+       return;
+}
+
+/* Update all memory resources by paddr, call before platform_device_register 
*/
+void __init
+ppc_sys_fixup_mem_resource(struct platform_device *pdev, phys_addr_t paddr)
+{
+       int i;
+       for (i = 0; i < pdev->num_resources; i++) {
+               struct resource *r = &pdev->resource[i];
+               if ((r->flags & IORESOURCE_MEM) == IORESOURCE_MEM) {
+                       r->start += paddr;
+                       r->end += paddr;
+               }
+       }
+}
+
+/* Get platform_data pointer out of platform device, call before 
platform_device_register */
+void *__init ppc_sys_get_pdata(enum ppc_sys_devices dev)
+{
+       return ppc_sys_platform_devices[dev].dev.platform_data;
+}
+
+void ppc_sys_device_remove(enum ppc_sys_devices dev)
+{
+       unsigned int i;
+
+       if (ppc_sys_inited) {
+               platform_device_unregister(&ppc_sys_platform_devices[dev]);
+       } else {
+               if (cur_ppc_sys_spec == NULL)
+                       return;
+               for (i = 0; i < cur_ppc_sys_spec->num_devices; i++)
+                       if (cur_ppc_sys_spec->device_list[i] == dev)
+                               cur_ppc_sys_spec->device_list[i] = -1;
+       }
+}
+
+static int __init ppc_sys_init(void)
+{
+       unsigned int i, dev_id, ret = 0;
+
+       BUG_ON(cur_ppc_sys_spec == NULL);
+
+       for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) {
+               dev_id = cur_ppc_sys_spec->device_list[i];
+               if (dev_id != -1) {
+                       if (ppc_sys_device_fixup != NULL)
+                               ppc_sys_device_fixup(&ppc_sys_platform_devices
+                                                    [dev_id]);
+                       if (platform_device_register
+                           (&ppc_sys_platform_devices[dev_id])) {
+                               ret = 1;
+                               printk(KERN_ERR
+                                      "unable to register device %d\n",
+                                      dev_id);
+                       }
+               }
+       }
+
+       ppc_sys_inited = 1;
+       return ret;
+}
+
+subsys_initcall(ppc_sys_init);
diff -urN linux/arch/ppc/syslib/Makefile linux/arch/ppc/syslib/Makefile
--- linux/arch/ppc/syslib/Makefile      2005/01/13 14:05:33     1.24
+++ linux/arch/ppc/syslib/Makefile      2005/01/25 04:28:03     1.25
@@ -92,7 +92,8 @@
 obj-$(CONFIG_MPC10X_OPENPIC)   += open_pic.o
 obj-$(CONFIG_40x)              += dcr.o
 obj-$(CONFIG_BOOKE)            += dcr.o
-obj-$(CONFIG_85xx)             += open_pic.o ppc85xx_common.o ppc85xx_setup.o
+obj-$(CONFIG_85xx)             += open_pic.o ppc85xx_common.o ppc85xx_setup.o \
+                                       ppc_sys.o
 ifeq ($(CONFIG_85xx),y)
 obj-$(CONFIG_PCI)              += indirect_pci.o pci_auto.o
 endif
diff -urN linux/arch/ppc/syslib/i8259.c linux/arch/ppc/syslib/i8259.c
--- linux/arch/ppc/syslib/i8259.c       2004/11/15 11:49:20     1.4
+++ linux/arch/ppc/syslib/i8259.c       2005/01/25 04:28:03     1.5
@@ -10,7 +10,7 @@
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-static spinlock_t i8259_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(i8259_lock);
 
 int i8259_pic_irq_offset;
 
diff -urN linux/arch/ppc/syslib/m8260_setup.c 
linux/arch/ppc/syslib/m8260_setup.c
--- linux/arch/ppc/syslib/m8260_setup.c 2004/12/04 18:16:00     1.7
+++ linux/arch/ppc/syslib/m8260_setup.c 2005/01/25 04:28:03     1.8
@@ -37,6 +37,12 @@
 extern void m8260_find_bridges(void);
 extern void idma_pci9_init(void);
 
+/* Place-holder for board-specific init */
+void __attribute__ ((weak)) __init
+m82xx_board_setup(void)
+{
+}
+
 static void __init
 m8260_setup_arch(void)
 {
@@ -56,6 +62,7 @@
        if (initrd_start)
                ROOT_DEV = Root_RAM0;
 #endif
+       m82xx_board_setup();
 }
 
 /* The decrementer counts at the system (internal) clock frequency
@@ -203,7 +210,7 @@
        io_block_mapping(IO_VIRT_ADDR, IO_PHYS_ADDR, 0x10000000, _PAGE_IO);
 }
 
-/* Place-holder for board-specific init */
+/* Place-holder for board-specific ppc_md hooking */
 void __attribute__ ((weak)) __init
 m82xx_board_init(void)
 {
diff -urN linux/arch/ppc/syslib/m8xx_setup.c linux/arch/ppc/syslib/m8xx_setup.c
--- linux/arch/ppc/syslib/m8xx_setup.c  2004/11/15 11:49:20     1.6
+++ linux/arch/ppc/syslib/m8xx_setup.c  2005/01/25 04:28:03     1.7
@@ -238,7 +238,7 @@
 {
        __volatile__ unsigned char dummy;
 
-       cli();
+       local_irq_disable();
        ((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr |= 0x00000080;
 
        /* Clear the ME bit in MSR to cause checkstop on machine check
diff -urN linux/arch/ppc/syslib/open_pic.c linux/arch/ppc/syslib/open_pic.c
--- linux/arch/ppc/syslib/open_pic.c    2005/01/13 14:05:33     1.20
+++ linux/arch/ppc/syslib/open_pic.c    2005/01/25 04:28:03     1.21
@@ -531,7 +531,7 @@
 }
 
 #if defined(CONFIG_SMP) || defined(CONFIG_PM)
-static spinlock_t openpic_setup_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(openpic_setup_lock);
 #endif
 
 #ifdef CONFIG_SMP
diff -urN linux/arch/ppc/syslib/open_pic2.c linux/arch/ppc/syslib/open_pic2.c
--- linux/arch/ppc/syslib/open_pic2.c   2004/10/12 01:45:42     1.4
+++ linux/arch/ppc/syslib/open_pic2.c   2005/01/25 04:28:03     1.5
@@ -386,7 +386,7 @@
                           vec);
 }
 
-static spinlock_t openpic2_setup_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(openpic2_setup_lock);
 
 /*
  *  Initialize a timer interrupt (and disable it)
diff -urN linux/arch/ppc/syslib/ppc85xx_common.c 
linux/arch/ppc/syslib/ppc85xx_common.c
--- linux/arch/ppc/syslib/ppc85xx_common.c      2004/06/26 15:15:11     1.1
+++ linux/arch/ppc/syslib/ppc85xx_common.c      2005/01/25 04:28:03     1.2
@@ -20,7 +20,6 @@
 
 #include <asm/mpc85xx.h>
 #include <asm/mmu.h>
-#include <asm/ocp.h>
 
 /* ************************************************************************ */
 /* Return the value of CCSRBAR for the current board */
@@ -31,16 +30,4 @@
         return BOARD_CCSRBAR;
 }
 
-/* ************************************************************************ */
-/* Update the 85xx OCP tables paddr field */
-void
-mpc85xx_update_paddr_ocp(struct ocp_device *dev, void *arg)
-{
-       phys_addr_t ccsrbar;
-       if (arg) {
-               ccsrbar = *(phys_addr_t *)arg;
-               dev->def->paddr += ccsrbar;
-       }
-}
-
 EXPORT_SYMBOL(get_ccsrbar);
diff -urN linux/arch/ppc/syslib/ppc85xx_common.h 
linux/arch/ppc/syslib/ppc85xx_common.h
--- linux/arch/ppc/syslib/ppc85xx_common.h      2004/06/26 15:15:11     1.1
+++ linux/arch/ppc/syslib/ppc85xx_common.h      2005/01/25 04:28:03     1.2
@@ -18,12 +18,8 @@
 
 #include <linux/config.h>
 #include <linux/init.h>
-#include <asm/ocp.h>
 
 /* Provide access to ccsrbar for any modules, etc */
 phys_addr_t get_ccsrbar(void);
 
-/* Update the 85xx OCP tables paddr field */
-void mpc85xx_update_paddr_ocp(struct ocp_device *dev, void *ccsrbar);
-
 #endif /* __PPC_SYSLIB_PPC85XX_COMMON_H */
diff -urN linux/arch/ppc/syslib/ppc85xx_setup.c 
linux/arch/ppc/syslib/ppc85xx_setup.c
--- linux/arch/ppc/syslib/ppc85xx_setup.c       2004/09/19 12:30:05     1.4
+++ linux/arch/ppc/syslib/ppc85xx_setup.c       2005/01/25 04:28:03     1.5
@@ -27,7 +27,6 @@
 #include <asm/mpc85xx.h>
 #include <asm/immap_85xx.h>
 #include <asm/mmu.h>
-#include <asm/ocp.h>
 #include <asm/kgdb.h>
 
 #include <syslib/ppc85xx_setup.h>
diff -urN linux/arch/ppc/syslib/prom.c linux/arch/ppc/syslib/prom.c
--- linux/arch/ppc/syslib/prom.c        2004/10/25 20:44:18     1.8
+++ linux/arch/ppc/syslib/prom.c        2005/01/25 04:28:03     1.9
@@ -1397,7 +1397,7 @@
 }
 #endif
 
-static spinlock_t rtas_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(rtas_lock);
 
 /* this can be called after setup -- Cort */
 int __openfirmware
diff -urN linux/arch/ppc/syslib/qspan_pci.c linux/arch/ppc/syslib/qspan_pci.c
--- linux/arch/ppc/syslib/qspan_pci.c   2002/11/12 01:34:14     1.1
+++ linux/arch/ppc/syslib/qspan_pci.c   2005/01/25 04:28:03     1.2
@@ -94,6 +94,8 @@
 #define mk_config_type1(bus, dev, offset) \
        mk_config_addr(bus, dev, offset) | 1;
 
+static spinlock_t pcibios_lock = SPIN_LOCK_UNLOCKED;
+
 int qspan_pcibios_read_config_byte(unsigned char bus, unsigned char dev_fn,
                                  unsigned char offset, unsigned char *val)
 {
@@ -109,8 +111,8 @@
        }
 
 #ifdef CONFIG_RPXCLASSIC
-       save_flags(flags);
-       cli();
+       /* disable interrupts */
+       spin_lock_irqsave(&pcibios_lock, flags);
        *((uint *)RPX_CSR_ADDR) &= ~BCSR2_QSPACESEL;
        eieio();
 #endif
@@ -124,7 +126,7 @@
 #ifdef CONFIG_RPXCLASSIC
        *((uint *)RPX_CSR_ADDR) |= BCSR2_QSPACESEL;
        eieio();
-       restore_flags(flags);
+       spin_unlock_irqrestore(&pcibios_lock, flags);
 #endif
 
        offset ^= 0x03;
@@ -148,8 +150,8 @@
        }
 
 #ifdef CONFIG_RPXCLASSIC
-       save_flags(flags);
-       cli();
+       /* disable interrupts */
+       spin_lock_irqsave(&pcibios_lock, flags);
        *((uint *)RPX_CSR_ADDR) &= ~BCSR2_QSPACESEL;
        eieio();
 #endif
@@ -164,7 +166,7 @@
 #ifdef CONFIG_RPXCLASSIC
        *((uint *)RPX_CSR_ADDR) |= BCSR2_QSPACESEL;
        eieio();
-       restore_flags(flags);
+       spin_unlock_irqrestore(&pcibios_lock, flags);
 #endif
 
        sp = ((ushort *)&temp) + ((offset >> 1) & 1);
@@ -185,8 +187,8 @@
        }
 
 #ifdef CONFIG_RPXCLASSIC
-       save_flags(flags);
-       cli();
+       /* disable interrupts */
+       spin_lock_irqsave(&pcibios_lock, flags);
        *((uint *)RPX_CSR_ADDR) &= ~BCSR2_QSPACESEL;
        eieio();
 #endif
@@ -200,7 +202,7 @@
 #ifdef CONFIG_RPXCLASSIC
        *((uint *)RPX_CSR_ADDR) |= BCSR2_QSPACESEL;
        eieio();
-       restore_flags(flags);
+       spin_unlock_irqrestore(&pcibios_lock, flags);
 #endif
 
        return PCIBIOS_SUCCESSFUL;
@@ -225,8 +227,8 @@
        *cp = val;
 
 #ifdef CONFIG_RPXCLASSIC
-       save_flags(flags);
-       cli();
+       /* disable interrupts */
+       spin_lock_irqsave(&pcibios_lock, flags);
        *((uint *)RPX_CSR_ADDR) &= ~BCSR2_QSPACESEL;
        eieio();
 #endif
@@ -240,7 +242,7 @@
 #ifdef CONFIG_RPXCLASSIC
        *((uint *)RPX_CSR_ADDR) |= BCSR2_QSPACESEL;
        eieio();
-       restore_flags(flags);
+       spin_unlock_irqrestore(&pcibios_lock, flags);
 #endif
 
        return PCIBIOS_SUCCESSFUL;
@@ -265,8 +267,8 @@
        *sp = val;
 
 #ifdef CONFIG_RPXCLASSIC
-       save_flags(flags);
-       cli();
+       /* disable interrupts */
+       spin_lock_irqsave(&pcibios_lock, flags);
        *((uint *)RPX_CSR_ADDR) &= ~BCSR2_QSPACESEL;
        eieio();
 #endif
@@ -280,7 +282,7 @@
 #ifdef CONFIG_RPXCLASSIC
        *((uint *)RPX_CSR_ADDR) |= BCSR2_QSPACESEL;
        eieio();
-       restore_flags(flags);
+       spin_unlock_irqrestore(&pcibios_lock, flags);
 #endif
 
        return PCIBIOS_SUCCESSFUL;
@@ -297,8 +299,8 @@
                return PCIBIOS_DEVICE_NOT_FOUND;
 
 #ifdef CONFIG_RPXCLASSIC
-       save_flags(flags);
-       cli();
+       /* disable interrupts */
+       spin_lock_irqsave(&pcibios_lock, flags);
        *((uint *)RPX_CSR_ADDR) &= ~BCSR2_QSPACESEL;
        eieio();
 #endif
@@ -312,7 +314,7 @@
 #ifdef CONFIG_RPXCLASSIC
        *((uint *)RPX_CSR_ADDR) |= BCSR2_QSPACESEL;
        eieio();
-       restore_flags(flags);
+       spin_unlock_irqrestore(&pcibios_lock, flags);
 #endif
 
        return PCIBIOS_SUCCESSFUL;
diff -urN linux/arch/ppc64/Kconfig linux/arch/ppc64/Kconfig
--- linux/arch/ppc64/Kconfig    2005/01/13 14:05:34     1.33
+++ linux/arch/ppc64/Kconfig    2005/01/25 04:28:03     1.34
@@ -92,7 +92,7 @@
        default n
        help
           This option enables support for the Maple 970FX Evaluation Board.
-         For more informations, refer to http://www.970eval.com
+         For more informations, refer to <http://www.970eval.com>
 
 config PPC
        bool
@@ -186,14 +186,6 @@
 
          If you don't know what to do here, say Y.
 
-config IRQ_ALL_CPUS
-       bool "Distribute interrupts on all CPUs by default"
-       depends on SMP && PPC_MULTIPLATFORM
-       help
-         This option gives the kernel permission to distribute IRQs across
-         multiple CPUs.  Saying N here will route all IRQs to the first
-         CPU.
-
 config NR_CPUS
        int "Maximum number of CPUs (2-128)"
        range 2 128
@@ -231,6 +223,17 @@
          Say Y here if you are building a kernel for a desktop, embedded
          or real-time system.  Say N if you are unsure.
 
+config PREEMPT_BKL
+       bool "Preempt The Big Kernel Lock"
+       depends on PREEMPT
+       default y
+       help
+         This option reduces the latency of the kernel by making the
+         big kernel lock preemptible.
+
+         Say Y here if you are building a kernel for a desktop system.
+         Say N if you are unsure.
+
 #
 # Use the generic interrupt handling code in kernel/irq/:
 #
diff -urN linux/arch/ppc64/kernel/HvLpEvent.c 
linux/arch/ppc64/kernel/HvLpEvent.c
--- linux/arch/ppc64/kernel/HvLpEvent.c 2004/06/06 02:12:40     1.3
+++ linux/arch/ppc64/kernel/HvLpEvent.c 2005/01/25 04:28:03     1.4
@@ -34,10 +34,18 @@
 int HvLpEvent_unregisterHandler( HvLpEvent_Type eventType )
 {
        int rc = 1;
+
+       might_sleep();
+
        if ( eventType < HvLpEvent_Type_NumTypes ) {
                if ( !lpEventHandlerPaths[eventType] ) {
                        lpEventHandler[eventType] = NULL;
                        rc = 0;
+
+                       /* We now sleep until all other CPUs have scheduled. 
This ensures that
+                        * the deletion is seen by all other CPUs, and that the 
deleted handler
+                        * isn't still running on another CPU when we return. */
+                       synchronize_kernel();
                }
        }
        return rc;
diff -urN linux/arch/ppc64/kernel/eeh.c linux/arch/ppc64/kernel/eeh.c
--- linux/arch/ppc64/kernel/eeh.c       2005/01/13 14:05:34     1.26
+++ linux/arch/ppc64/kernel/eeh.c       2005/01/25 04:28:03     1.27
@@ -76,7 +76,7 @@
 #define BUID_LO(buid) ((buid) & 0xffffffff)
 
 /* EEH event workqueue setup. */
-static spinlock_t eeh_eventlist_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(eeh_eventlist_lock);
 LIST_HEAD(eeh_eventlist);
 static void eeh_event_handler(void *);
 DECLARE_WORK(eeh_event_wq, eeh_event_handler, NULL);
@@ -103,7 +103,7 @@
 
 /* Buffer for reporting slot-error-detail rtas calls */
 static unsigned char slot_errbuf[RTAS_ERROR_LOG_MAX];
-static spinlock_t slot_errbuf_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(slot_errbuf_lock);
 static int eeh_error_buf_size;
 
 /* System monitoring statistics */
diff -urN linux/arch/ppc64/kernel/entry.S linux/arch/ppc64/kernel/entry.S
--- linux/arch/ppc64/kernel/entry.S     2005/01/13 14:05:34     1.33
+++ linux/arch/ppc64/kernel/entry.S     2005/01/25 04:28:03     1.34
@@ -574,25 +574,22 @@
        crandc  eq,cr1*4+eq,eq
        bne     restore
        /* here we are preempting the current task */
-1:     lis     r0,PREEMPT_ACTIVE@h
-       stw     r0,TI_PREEMPT(r9)
+1:
 #ifdef CONFIG_PPC_ISERIES
        li      r0,1
        stb     r0,PACAPROCENABLED(r13)
 #endif
        ori     r10,r10,MSR_EE
        mtmsrd  r10,1           /* reenable interrupts */
-       bl      .schedule
+       bl      .preempt_schedule
        mfmsr   r10
        clrrdi  r9,r1,THREAD_SHIFT
        rldicl  r10,r10,48,1    /* disable interrupts again */
-       li      r0,0
        rotldi  r10,r10,16
        mtmsrd  r10,1
        ld      r4,TI_FLAGS(r9)
        andi.   r0,r4,_TIF_NEED_RESCHED
        bne     1b
-       stw     r0,TI_PREEMPT(r9)
        b       restore
 
 user_work:
diff -urN linux/arch/ppc64/kernel/i8259.c linux/arch/ppc64/kernel/i8259.c
--- linux/arch/ppc64/kernel/i8259.c     2004/11/15 11:49:20     1.6
+++ linux/arch/ppc64/kernel/i8259.c     2005/01/25 04:28:03     1.7
@@ -21,7 +21,7 @@
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-static spinlock_t i8259_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned_in_smp DEFINE_SPINLOCK(i8259_lock);
 
 static int i8259_pic_irq_offset;
 static int i8259_present;
diff -urN linux/arch/ppc64/kernel/iSeries_VpdInfo.c 
linux/arch/ppc64/kernel/iSeries_VpdInfo.c
--- linux/arch/ppc64/kernel/iSeries_VpdInfo.c   2004/04/12 20:23:26     1.6
+++ linux/arch/ppc64/kernel/iSeries_VpdInfo.c   2005/01/25 04:28:03     1.7
@@ -36,7 +36,6 @@
 #include <asm/iSeries/HvTypes.h>
 #include <asm/iSeries/mf.h>
 #include <asm/iSeries/LparData.h>
-//#include <asm/iSeries/iSeries_VpdInfo.h>
 #include <asm/iSeries/iSeries_pci.h>
 #include "pci.h"
 
@@ -85,30 +84,6 @@
 #define SLOT_ENTRY_SIZE   16
 
 /*
- * Bus, Card, Board, FrameId, CardLocation.
- */
-LocationData* iSeries_GetLocationData(struct pci_dev *PciDev)
-{
-       struct iSeries_Device_Node *DevNode =
-               (struct iSeries_Device_Node *)PciDev->sysdata;
-       LocationData *LocationPtr =
-               (LocationData *)kmalloc(LOCATION_DATA_SIZE, GFP_KERNEL);
-
-       if (LocationPtr == NULL) {
-               printk("PCI: LocationData area allocation failed!\n");
-               return NULL;
-       }
-       memset(LocationPtr, 0, LOCATION_DATA_SIZE);
-       LocationPtr->Bus = ISERIES_BUS(DevNode);
-       LocationPtr->Board = DevNode->Board;
-       LocationPtr->FrameId = DevNode->FrameId;
-       LocationPtr->Card = PCI_SLOT(DevNode->DevFn);
-       strcpy(&LocationPtr->CardLocation[0], &DevNode->CardLocation[0]);
-       return LocationPtr;
-}
-EXPORT_SYMBOL(iSeries_GetLocationData);
-
-/*
  * Formats the device information.
  * - Pass in pci_dev* pointer to the device.
  * - Pass in buffer to place the data.  Danger here is the buffer must
@@ -149,18 +124,6 @@
 }
 
 /*
- * Build a character string of the device location, Frame  1, Card  C10
- */
-int device_Location(struct pci_dev *PciDev, char *BufPtr)
-{
-       struct iSeries_Device_Node *DevNode =
-               (struct iSeries_Device_Node *)PciDev->sysdata;
-       return sprintf(BufPtr, "PCI: Bus%3d, AgentId%3d, Vendor %04X, Location 
%s",
-                      DevNode->DsaAddr.Dsa.busNumber, DevNode->AgentId,
-                      DevNode->Vendor, DevNode->Location);
-}
-
-/*
  * Parse the Slot Area
  */
 void iSeries_Parse_SlotArea(SlotMap *MapPtr, int MapLen,
diff -urN linux/arch/ppc64/kernel/iSeries_pci.c 
linux/arch/ppc64/kernel/iSeries_pci.c
--- linux/arch/ppc64/kernel/iSeries_pci.c       2005/01/13 14:05:34     1.20
+++ linux/arch/ppc64/kernel/iSeries_pci.c       2005/01/25 04:28:03     1.21
@@ -96,7 +96,7 @@
  * Static and Global variables
  */
 static char *pci_io_text = "iSeries PCI I/O";
-static spinlock_t iomm_table_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(iomm_table_lock);
 
 /*
  * iomm_table_initialize
diff -urN linux/arch/ppc64/kernel/irq.c linux/arch/ppc64/kernel/irq.c
--- linux/arch/ppc64/kernel/irq.c       2005/01/13 14:05:34     1.36
+++ linux/arch/ppc64/kernel/irq.c       2005/01/25 04:28:03     1.37
@@ -62,6 +62,7 @@
 
 extern irq_desc_t irq_desc[NR_IRQS];
 
+int distribute_irqs = 1;
 int __irq_offset_value;
 int ppc_spurious_interrupts;
 unsigned long lpevent_count;
@@ -479,3 +480,10 @@
 
 #endif /* CONFIG_IRQSTACKS */
 
+static int __init setup_noirqdistrib(char *str)
+{
+       distribute_irqs = 0;
+       return 1;
+}
+
+__setup("noirqdistrib", setup_noirqdistrib);
diff -urN linux/arch/ppc64/kernel/kprobes.c linux/arch/ppc64/kernel/kprobes.c
--- linux/arch/ppc64/kernel/kprobes.c   2005/01/13 14:05:34     1.1
+++ linux/arch/ppc64/kernel/kprobes.c   2005/01/25 04:28:03     1.2
@@ -45,13 +45,19 @@
 
 int arch_prepare_kprobe(struct kprobe *p)
 {
-       memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
-       if (IS_MTMSRD(p->ainsn.insn[0]) || IS_RFID(p->ainsn.insn[0]))
+       kprobe_opcode_t insn = *p->addr;
+
+       if (IS_MTMSRD(insn) || IS_RFID(insn))
                /* cannot put bp on RFID/MTMSRD */
                return 1;
        return 0;
 }
 
+void arch_copy_kprobe(struct kprobe *p)
+{
+       memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
+}
+
 void arch_remove_kprobe(struct kprobe *p)
 {
 }
diff -urN linux/arch/ppc64/kernel/misc.S linux/arch/ppc64/kernel/misc.S
--- linux/arch/ppc64/kernel/misc.S      2005/01/13 14:05:34     1.39
+++ linux/arch/ppc64/kernel/misc.S      2005/01/25 04:28:03     1.40
@@ -843,7 +843,7 @@
        .llong .sys32_rt_sigaction
        .llong .sys32_rt_sigprocmask
        .llong .sys32_rt_sigpending     /* 175 */
-       .llong .compat_rt_sigtimedwait
+       .llong .compat_sys_rt_sigtimedwait
        .llong .sys32_rt_sigqueueinfo
        .llong .ppc32_rt_sigsuspend
        .llong .sys32_pread64
diff -urN linux/arch/ppc64/kernel/mpic.c linux/arch/ppc64/kernel/mpic.c
--- linux/arch/ppc64/kernel/mpic.c      2004/12/04 18:16:00     1.2
+++ linux/arch/ppc64/kernel/mpic.c      2005/01/25 04:28:03     1.3
@@ -42,7 +42,7 @@
 
 static struct mpic *mpics;
 static struct mpic *mpic_primary;
-static spinlock_t mpic_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mpic_lock);
 
 
 /*
@@ -765,10 +765,8 @@
 #ifdef CONFIG_SMP
        struct mpic *mpic = mpic_primary;
        unsigned long flags;
-#ifdef CONFIG_IRQ_ALL_CPUS
        u32 msk = 1 << hard_smp_processor_id();
        unsigned int i;
-#endif
 
        BUG_ON(mpic == NULL);
 
@@ -776,16 +774,16 @@
 
        spin_lock_irqsave(&mpic_lock, flags);
 
-#ifdef CONFIG_IRQ_ALL_CPUS
        /* let the mpic know we want intrs. default affinity is 0xffffffff
         * until changed via /proc. That's how it's done on x86. If we want
         * it differently, then we should make sure we also change the default
         * values of irq_affinity in irq.c.
         */
-       for (i = 0; i < mpic->num_sources ; i++)
-               mpic_irq_write(i, MPIC_IRQ_DESTINATION,
-                       mpic_irq_read(i, MPIC_IRQ_DESTINATION) | msk);
-#endif /* CONFIG_IRQ_ALL_CPUS */
+       if (distribute_irqs) {
+               for (i = 0; i < mpic->num_sources ; i++)
+                       mpic_irq_write(i, MPIC_IRQ_DESTINATION,
+                               mpic_irq_read(i, MPIC_IRQ_DESTINATION) | msk);
+       }
 
        /* Set current processor priority to 0 */
        mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0);
diff -urN linux/arch/ppc64/kernel/pSeries_iommu.c 
linux/arch/ppc64/kernel/pSeries_iommu.c
--- linux/arch/ppc64/kernel/pSeries_iommu.c     2005/01/13 14:05:34     1.9
+++ linux/arch/ppc64/kernel/pSeries_iommu.c     2005/01/25 04:28:03     1.10
@@ -327,12 +327,25 @@
                /* Root bus */
                if (is_python(dn)) {
                        struct iommu_table *tbl;
+                       unsigned int *iohole;
 
                        DBG("Python root bus %s\n", bus->name);
 
-                       /* 1GB window by default */
-                       dn->phb->dma_window_size = 1 << 30;
-                       dn->phb->dma_window_base_cur = 0;
+                       iohole = (unsigned int *)get_property(dn, "io-hole", 0);
+
+                       if (iohole) {
+                               /* On first bus we need to leave room for the
+                                * ISA address space. Just skip the first 256MB
+                                * alltogether. This leaves 768MB for the 
window.
+                                */
+                               DBG("PHB has io-hole, reserving 256MB\n");
+                               dn->phb->dma_window_size = 3 << 28;
+                               dn->phb->dma_window_base_cur = 1 << 28;
+                       } else {
+                               /* 1GB window by default */
+                               dn->phb->dma_window_size = 1 << 30;
+                               dn->phb->dma_window_base_cur = 0;
+                       }
 
                        tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL);
 
diff -urN linux/arch/ppc64/kernel/pSeries_lpar.c 
linux/arch/ppc64/kernel/pSeries_lpar.c
--- linux/arch/ppc64/kernel/pSeries_lpar.c      2005/01/13 14:05:34     1.26
+++ linux/arch/ppc64/kernel/pSeries_lpar.c      2005/01/25 04:28:03     1.27
@@ -335,7 +335,7 @@
        return (slot & 7) | (secondary << 3);
 }
 
-static spinlock_t pSeries_lpar_tlbie_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pSeries_lpar_tlbie_lock);
 
 static long pSeries_lpar_hpte_remove(unsigned long hpte_group)
 {
diff -urN linux/arch/ppc64/kernel/pSeries_nvram.c 
linux/arch/ppc64/kernel/pSeries_nvram.c
--- linux/arch/ppc64/kernel/pSeries_nvram.c     2004/06/26 15:15:11     1.4
+++ linux/arch/ppc64/kernel/pSeries_nvram.c     2005/01/25 04:28:03     1.5
@@ -31,7 +31,7 @@
 static unsigned int nvram_size;
 static int nvram_fetch, nvram_store;
 static char nvram_buf[NVRW_CNT];       /* assume this is in the first 4GB */
-static spinlock_t nvram_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nvram_lock);
 
 
 static ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index)
diff -urN linux/arch/ppc64/kernel/pSeries_setup.c 
linux/arch/ppc64/kernel/pSeries_setup.c
--- linux/arch/ppc64/kernel/pSeries_setup.c     2005/01/13 14:05:34     1.4
+++ linux/arch/ppc64/kernel/pSeries_setup.c     2005/01/25 04:28:03     1.5
@@ -394,7 +394,7 @@
        char *os;
        static int display_character, set_indicator;
        static int max_width;
-       static spinlock_t progress_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(progress_lock);
        static int pending_newline = 0;  /* did last write end with unprinted 
newline? */
 
        if (!rtas.base)
diff -urN linux/arch/ppc64/kernel/pSeries_smp.c 
linux/arch/ppc64/kernel/pSeries_smp.c
--- linux/arch/ppc64/kernel/pSeries_smp.c       2005/01/13 14:05:34     1.3
+++ linux/arch/ppc64/kernel/pSeries_smp.c       2005/01/25 04:28:03     1.4
@@ -259,7 +259,6 @@
        if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR)
                vpa_init(cpu);
 
-#ifdef CONFIG_IRQ_ALL_CPUS
        /*
         * Put the calling processor into the GIQ.  This is really only
         * necessary from a secondary thread as the OF start-cpu interface
@@ -267,10 +266,9 @@
         */
        rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
                (1UL << interrupt_server_size) - 1 - default_distrib_server, 1);
-#endif
 }
 
-static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(timebase_lock);
 static unsigned long timebase = 0;
 
 static void __devinit pSeries_give_timebase(void)
diff -urN linux/arch/ppc64/kernel/pci.c linux/arch/ppc64/kernel/pci.c
--- linux/arch/ppc64/kernel/pci.c       2005/01/13 14:05:34     1.28
+++ linux/arch/ppc64/kernel/pci.c       2005/01/25 04:28:03     1.29
@@ -157,7 +157,7 @@
        res->start = start;
 }
 
-static spinlock_t hose_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hose_spinlock);
 
 /*
  * pci_controller(phb) initialized common variables.
diff -urN linux/arch/ppc64/kernel/pmac_feature.c 
linux/arch/ppc64/kernel/pmac_feature.c
--- linux/arch/ppc64/kernel/pmac_feature.c      2004/10/12 14:36:33     1.6
+++ linux/arch/ppc64/kernel/pmac_feature.c      2005/01/25 04:28:03     1.7
@@ -53,7 +53,7 @@
  * We use a single global lock to protect accesses. Each driver has
  * to take care of its own locking
  */
-static spinlock_t feature_lock  __pmacdata = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(feature_lock  __pmacdata);
 
 #define LOCK(flags)    spin_lock_irqsave(&feature_lock, flags);
 #define UNLOCK(flags)  spin_unlock_irqrestore(&feature_lock, flags);
@@ -111,7 +111,7 @@
 static u32 uninorth_rev __pmacdata;
 static void *u3_ht;
 
-extern struct pci_dev *k2_skiplist[2];
+extern struct device_node *k2_skiplist[2];
 
 /*
  * For each motherboard family, we have a table of functions pointers
@@ -160,30 +160,17 @@
 {
        struct macio_chip* macio = &macio_chips[0];
        unsigned long flags;
-       struct pci_dev *pdev = NULL;
 
        if (node == NULL)
                return -ENODEV;
 
-       /* XXX FIXME: We should fix pci_device_from_OF_node here, and
-        * get to a real pci_dev or we'll get into trouble with PCI
-        * domains the day we get overlapping numbers (like if we ever
-        * decide to show the HT root.
-        * Note that we only get the slot when value is 0. This is called
-        * early during boot with value 1 to enable all devices, at which
-        * point, we don't yet have probed pci_find_slot, so it would fail
-        * to look for the slot at this point.
-        */
-       if (!value)
-               pdev = pci_find_slot(node->busno, node->devfn);
-
        LOCK(flags);
        if (value) {
                MACIO_BIS(KEYLARGO_FCR1, K2_FCR1_GMAC_CLK_ENABLE);
                mb();
                k2_skiplist[0] = NULL;
        } else {
-               k2_skiplist[0] = pdev;
+               k2_skiplist[0] = node;
                mb();
                MACIO_BIC(KEYLARGO_FCR1, K2_FCR1_GMAC_CLK_ENABLE);
        }
@@ -198,30 +185,17 @@
 {
        struct macio_chip* macio = &macio_chips[0];
        unsigned long flags;
-       struct pci_dev *pdev = NULL;
 
-       /* XXX FIXME: We should fix pci_device_from_OF_node here, and
-        * get to a real pci_dev or we'll get into trouble with PCI
-        * domains the day we get overlapping numbers (like if we ever
-        * decide to show the HT root
-        * Note that we only get the slot when value is 0. This is called
-        * early during boot with value 1 to enable all devices, at which
-        * point, we don't yet have probed pci_find_slot, so it would fail
-        * to look for the slot at this point.
-        */
        if (node == NULL)
                return -ENODEV;
 
-       if (!value)
-               pdev = pci_find_slot(node->busno, node->devfn);
-
        LOCK(flags);
        if (value) {
                MACIO_BIS(KEYLARGO_FCR1, K2_FCR1_FW_CLK_ENABLE);
                mb();
                k2_skiplist[1] = NULL;
        } else {
-               k2_skiplist[1] = pdev;
+               k2_skiplist[1] = node;
                mb();
                MACIO_BIC(KEYLARGO_FCR1, K2_FCR1_FW_CLK_ENABLE);
        }
diff -urN linux/arch/ppc64/kernel/pmac_nvram.c 
linux/arch/ppc64/kernel/pmac_nvram.c
--- linux/arch/ppc64/kernel/pmac_nvram.c        2004/02/19 03:06:24     1.3
+++ linux/arch/ppc64/kernel/pmac_nvram.c        2005/01/25 04:28:03     1.4
@@ -75,7 +75,7 @@
 static volatile unsigned char *nvram_data;
 static int core99_bank = 0;
 // XXX Turn that into a sem
-static spinlock_t nv_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nv_lock);
 
 extern int system_running;
 
diff -urN linux/arch/ppc64/kernel/pmac_pci.c linux/arch/ppc64/kernel/pmac_pci.c
--- linux/arch/ppc64/kernel/pmac_pci.c  2005/01/13 14:05:34     1.10
+++ linux/arch/ppc64/kernel/pmac_pci.c  2005/01/25 04:28:03     1.11
@@ -43,7 +43,7 @@
  * assuming we won't have both UniNorth and Bandit */
 static int has_uninorth;
 static struct pci_controller *u3_agp;
-struct pci_dev *k2_skiplist[2];
+struct device_node *k2_skiplist[2];
 
 static int __init fixup_one_level_bus_range(struct device_node *node, int 
higher)
 {
@@ -233,15 +233,6 @@
        struct device_node *busdn, *dn;
        int i;
 
-       /*
-        * When a device in K2 is powered down, we die on config
-        * cycle accesses. Fix that here.
-        */
-       for (i=0; i<2; i++)
-               if (k2_skiplist[i] && k2_skiplist[i]->bus == bus &&
-                   k2_skiplist[i]->devfn == devfn)
-                       return 1;
-
        /* We only allow config cycles to devices that are in OF device-tree
         * as we are apparently having some weird things going on with some
         * revs of K2 on recent G5s
@@ -256,6 +247,14 @@
        if (dn == NULL)
                return -1;
 
+       /*
+        * When a device in K2 is powered down, we die on config
+        * cycle accesses. Fix that here.
+        */
+       for (i=0; i<2; i++)
+               if (k2_skiplist[i] == dn)
+                       return 1;
+
        return 0;
 }
 
diff -urN linux/arch/ppc64/kernel/pmac_smp.c linux/arch/ppc64/kernel/pmac_smp.c
--- linux/arch/ppc64/kernel/pmac_smp.c  2004/11/15 11:49:20     1.6
+++ linux/arch/ppc64/kernel/pmac_smp.c  2005/01/25 04:28:03     1.7
@@ -68,7 +68,7 @@
 
 static void (*pmac_tb_freeze)(int freeze);
 static struct device_node *pmac_tb_clock_chip_host;
-static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(timebase_lock);
 static unsigned long timebase;
 
 static void smp_core99_cypress_tb_freeze(int freeze)
diff -urN linux/arch/ppc64/kernel/prom.c linux/arch/ppc64/kernel/prom.c
--- linux/arch/ppc64/kernel/prom.c      2005/01/13 14:05:34     1.38
+++ linux/arch/ppc64/kernel/prom.c      2005/01/25 04:28:03     1.39
@@ -95,7 +95,7 @@
 /* use when traversing tree through the allnext, child, sibling,
  * or parent members of struct device_node.
  */
-static rwlock_t devtree_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(devtree_lock);
 
 /* export that to outside world */
 struct device_node *of_chosen;
@@ -1055,7 +1055,7 @@
                        rnd_mem_size <<= 1;
 
                /* # pages / 2 */
-               pteg_count = (rnd_mem_size >> (12 + 1));
+               pteg_count = max(rnd_mem_size >> (12 + 1), 1UL << 11);
 
                ppc64_pft_size = __ilog2(pteg_count << 7);
        }
diff -urN linux/arch/ppc64/kernel/ras.c linux/arch/ppc64/kernel/ras.c
--- linux/arch/ppc64/kernel/ras.c       2005/01/13 14:05:34     1.16
+++ linux/arch/ppc64/kernel/ras.c       2005/01/25 04:28:03     1.17
@@ -53,7 +53,7 @@
 #include <asm/ppcdebug.h>
 
 static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX];
-static spinlock_t ras_log_buf_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ras_log_buf_lock);
 
 char mce_data_buf[RTAS_ERROR_LOG_MAX]
 ;
diff -urN linux/arch/ppc64/kernel/rtas.c linux/arch/ppc64/kernel/rtas.c
--- linux/arch/ppc64/kernel/rtas.c      2005/01/13 14:05:34     1.24
+++ linux/arch/ppc64/kernel/rtas.c      2005/01/25 04:28:03     1.25
@@ -41,7 +41,7 @@
 
 char rtas_err_buf[RTAS_ERROR_LOG_MAX];
 
-spinlock_t rtas_data_buf_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtas_data_buf_lock);
 char rtas_data_buf[RTAS_DATA_BUF_SIZE]__page_aligned;
 unsigned long rtas_rmo_buf;
 
diff -urN linux/arch/ppc64/kernel/rtas_flash.c 
linux/arch/ppc64/kernel/rtas_flash.c
--- linux/arch/ppc64/kernel/rtas_flash.c        2004/11/15 11:49:20     1.12
+++ linux/arch/ppc64/kernel/rtas_flash.c        2005/01/25 04:28:03     1.13
@@ -105,7 +105,7 @@
        unsigned int update_results;    /* Update results token */
 };
 
-static spinlock_t flash_file_open_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(flash_file_open_lock);
 static struct proc_dir_entry *firmware_flash_pde;
 static struct proc_dir_entry *firmware_update_pde;
 static struct proc_dir_entry *validate_pde;
diff -urN linux/arch/ppc64/kernel/rtasd.c linux/arch/ppc64/kernel/rtasd.c
--- linux/arch/ppc64/kernel/rtasd.c     2005/01/13 14:05:34     1.24
+++ linux/arch/ppc64/kernel/rtasd.c     2005/01/25 04:28:03     1.25
@@ -34,7 +34,7 @@
 #define DEBUG(A...)
 #endif
 
-static spinlock_t rtasd_log_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(rtasd_log_lock);
 
 DECLARE_WAIT_QUEUE_HEAD(rtas_log_wait);
 
diff -urN linux/arch/ppc64/kernel/smp.c linux/arch/ppc64/kernel/smp.c
--- linux/arch/ppc64/kernel/smp.c       2005/01/13 14:05:34     1.44
+++ linux/arch/ppc64/kernel/smp.c       2005/01/25 04:28:03     1.45
@@ -202,7 +202,7 @@
  * static memory requirements. It also looks cleaner.
  * Stolen from the i386 version.
  */
-static spinlock_t call_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock);
 
 static struct call_data_struct {
        void (*func) (void *info);
@@ -526,9 +526,6 @@
        
        smp_ops->setup_cpu(boot_cpuid);
 
-       /* XXX fix this, xics currently relies on it - Anton */
-       smp_threads_ready = 1;
-
        set_cpus_allowed(current, old_mask);
 
        /*
diff -urN linux/arch/ppc64/kernel/time.c linux/arch/ppc64/kernel/time.c
--- linux/arch/ppc64/kernel/time.c      2005/01/13 14:05:34     1.31
+++ linux/arch/ppc64/kernel/time.c      2005/01/25 04:28:03     1.32
@@ -91,7 +91,7 @@
 unsigned long tb_to_xs;
 unsigned      tb_to_us;
 unsigned long processor_freq;
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
 
 unsigned long tb_to_ns_scale;
 unsigned long tb_to_ns_shift;
diff -urN linux/arch/ppc64/kernel/traps.c linux/arch/ppc64/kernel/traps.c
--- linux/arch/ppc64/kernel/traps.c     2005/01/13 14:05:34     1.30
+++ linux/arch/ppc64/kernel/traps.c     2005/01/25 04:28:03     1.31
@@ -60,7 +60,7 @@
 #endif
 
 struct notifier_block *ppc64_die_chain;
-static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(die_notifier_lock);
 
 int register_die_notifier(struct notifier_block *nb)
 {
@@ -77,7 +77,7 @@
  * Trap & Exception support
  */
 
-static spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(die_lock);
 
 int die(const char *str, struct pt_regs *regs, long err)
 {
diff -urN linux/arch/ppc64/kernel/viopath.c linux/arch/ppc64/kernel/viopath.c
--- linux/arch/ppc64/kernel/viopath.c   2004/11/15 11:49:20     1.9
+++ linux/arch/ppc64/kernel/viopath.c   2005/01/25 04:28:03     1.10
@@ -64,7 +64,7 @@
        int numberAllocated;
 } viopathStatus[HVMAXARCHITECTEDLPS];
 
-static spinlock_t statuslock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(statuslock);
 
 /*
  * For each kind of event we allocate a buffer that is
diff -urN linux/arch/ppc64/kernel/xics.c linux/arch/ppc64/kernel/xics.c
--- linux/arch/ppc64/kernel/xics.c      2005/01/13 14:05:34     1.29
+++ linux/arch/ppc64/kernel/xics.c      2005/01/25 04:28:03     1.30
@@ -242,28 +242,24 @@
 static int get_irq_server(unsigned int irq)
 {
        unsigned int server;
-
-#ifdef CONFIG_IRQ_ALL_CPUS
        /* For the moment only implement delivery to all cpus or one cpu */
-       if (smp_threads_ready) {
-               cpumask_t cpumask = irq_affinity[irq];
-               cpumask_t tmp = CPU_MASK_NONE;
-               if (cpus_equal(cpumask, CPU_MASK_ALL)) {
-                       server = default_distrib_server;
-               } else {
-                       cpus_and(tmp, cpu_online_map, cpumask);
+       cpumask_t cpumask = irq_affinity[irq];
+       cpumask_t tmp = CPU_MASK_NONE;
+
+       if (!distribute_irqs)
+               return default_server;
 
-                       if (cpus_empty(tmp))
-                               server = default_distrib_server;
-                       else
-                               server = 
get_hard_smp_processor_id(first_cpu(tmp));
-               }
+       if (cpus_equal(cpumask, CPU_MASK_ALL)) {
+               server = default_distrib_server;
        } else {
-               server = default_server;
+               cpus_and(tmp, cpu_online_map, cpumask);
+
+               if (cpus_empty(tmp))
+                       server = default_distrib_server;
+               else
+                       server = get_hard_smp_processor_id(first_cpu(tmp));
        }
-#else
-       server = default_server;
-#endif
+
        return server;
 
 }
diff -urN linux/arch/ppc64/mm/hash_native.c linux/arch/ppc64/mm/hash_native.c
--- linux/arch/ppc64/mm/hash_native.c   2005/01/13 14:05:36     1.5
+++ linux/arch/ppc64/mm/hash_native.c   2005/01/25 04:28:04     1.6
@@ -25,7 +25,7 @@
 
 #define HPTE_LOCK_BIT 3
 
-static spinlock_t native_tlbie_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(native_tlbie_lock);
 
 static inline void native_lock_hpte(HPTE *hptep)
 {
diff -urN linux/arch/ppc64/mm/init.c linux/arch/ppc64/mm/init.c
--- linux/arch/ppc64/mm/init.c  2005/01/13 14:05:36     1.40
+++ linux/arch/ppc64/mm/init.c  2005/01/25 04:28:04     1.41
@@ -470,7 +470,7 @@
 }
 #endif
 
-static spinlock_t mmu_context_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mmu_context_lock);
 static DEFINE_IDR(mmu_context_idr);
 
 int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
diff -urN linux/arch/s390/defconfig linux/arch/s390/defconfig
--- linux/arch/s390/defconfig   2005/01/13 14:05:36     1.42
+++ linux/arch/s390/defconfig   2005/01/25 04:28:04     1.43
@@ -1,10 +1,11 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10
-# Mon Dec 27 11:03:23 2004
+# Linux kernel version: 2.6.11-rc1
+# Fri Jan 14 14:56:51 2005
 #
 CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_ARCH_S390=y
 CONFIG_UID16=y
 
@@ -142,6 +143,7 @@
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 CONFIG_SCSI_FC_ATTRS=y
+# CONFIG_SCSI_ISCSI_ATTRS is not set
 
 #
 # SCSI low-level drivers
@@ -184,6 +186,7 @@
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -530,6 +533,7 @@
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_FS is not set
 
 #
 # Security options
diff -urN linux/arch/s390/appldata/appldata_base.c 
linux/arch/s390/appldata/appldata_base.c
--- linux/arch/s390/appldata/appldata_base.c    2004/08/13 07:18:53     1.5
+++ linux/arch/s390/appldata/appldata_base.c    2005/01/25 04:28:04     1.6
@@ -128,7 +128,7 @@
 DEFINE_PER_CPU(struct vtimer_list, appldata_timer);
 static atomic_t appldata_expire_count = ATOMIC_INIT(0);
 
-static spinlock_t appldata_timer_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(appldata_timer_lock);
 static int appldata_interval = APPLDATA_CPU_INTERVAL;
 static int appldata_timer_active;
 
@@ -140,7 +140,7 @@
 /*
  * Ops list
  */
-static spinlock_t appldata_ops_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(appldata_ops_lock);
 static LIST_HEAD(appldata_ops_list);
 
 
diff -urN linux/arch/s390/kernel/compat_wrapper.S 
linux/arch/s390/kernel/compat_wrapper.S
--- linux/arch/s390/kernel/compat_wrapper.S     2005/01/13 14:05:36     1.13
+++ linux/arch/s390/kernel/compat_wrapper.S     2005/01/25 04:28:04     1.14
@@ -840,13 +840,13 @@
        llgfr   %r3,%r3                 # size_t
        jg      sys32_rt_sigpending     # branch to system call
 
-       .globl  compat_rt_sigtimedwait_wrapper
-compat_rt_sigtimedwait_wrapper:
+       .globl  compat_sys_rt_sigtimedwait_wrapper
+compat_sys_rt_sigtimedwait_wrapper:
        llgtr   %r2,%r2                 # const sigset_emu31_t *
        llgtr   %r3,%r3                 # siginfo_emu31_t *
        llgtr   %r4,%r4                 # const struct compat_timespec *
        llgfr   %r5,%r5                 # size_t
-       jg      compat_rt_sigtimedwait  # branch to system call
+       jg      compat_sys_rt_sigtimedwait      # branch to system call
 
        .globl  sys32_rt_sigqueueinfo_wrapper 
 sys32_rt_sigqueueinfo_wrapper:
diff -urN linux/arch/s390/kernel/cpcmd.c linux/arch/s390/kernel/cpcmd.c
--- linux/arch/s390/kernel/cpcmd.c      2004/11/15 11:49:21     1.6
+++ linux/arch/s390/kernel/cpcmd.c      2005/01/25 04:28:04     1.7
@@ -14,7 +14,7 @@
 #include <asm/cpcmd.h>
 #include <asm/system.h>
 
-static spinlock_t cpcmd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cpcmd_lock);
 static char cpcmd_buf[240];
 
 void cpcmd(char *cmd, char *response, int rlen)
diff -urN linux/arch/s390/kernel/setup.c linux/arch/s390/kernel/setup.c
--- linux/arch/s390/kernel/setup.c      2005/01/13 14:05:36     1.33
+++ linux/arch/s390/kernel/setup.c      2005/01/25 04:28:04     1.34
@@ -98,6 +98,8 @@
         clear_thread_flag(TIF_USEDFPU);
         current->used_math = 0;
 
+       atomic_inc(&init_mm.mm_count);
+       current->active_mm = &init_mm;
         if (current->mm)
                 BUG();
         enter_lazy_tlb(&init_mm, current);
diff -urN linux/arch/s390/kernel/smp.c linux/arch/s390/kernel/smp.c
--- linux/arch/s390/kernel/smp.c        2005/01/13 14:05:36     1.34
+++ linux/arch/s390/kernel/smp.c        2005/01/25 04:28:04     1.35
@@ -76,7 +76,7 @@
  * Structure and data for smp_call_function(). This is designed to minimise
  * static memory requirements. It also looks cleaner.
  */
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
 
 struct call_data_struct {
        void (*func) (void *info);
@@ -486,48 +486,38 @@
  * Lets check how many CPUs we have.
  */
 
-#ifdef CONFIG_HOTPLUG_CPU
-
 void
 __init smp_check_cpus(unsigned int max_cpus)
 {
-       int cpu;
+       int cpu, num_cpus;
+       __u16 boot_cpu_addr;
 
        /*
         * cpu 0 is the boot cpu. See smp_prepare_boot_cpu.
         */
-       for (cpu = 1; cpu < max_cpus; cpu++)
-               cpu_set(cpu, cpu_possible_map);
-}
 
-#else /* CONFIG_HOTPLUG_CPU */
+       boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr;
+       __cpu_logical_map[0] = boot_cpu_addr;
+       current_thread_info()->cpu = 0;
+       num_cpus = 1;
+       for (cpu = 0; cpu <= 65535 && num_cpus < max_cpus; cpu++) {
+               if ((__u16) cpu == boot_cpu_addr)
+                       continue;
+               __cpu_logical_map[num_cpus] = (__u16) cpu;
+               if (signal_processor(num_cpus, sigp_sense) ==
+                   sigp_not_operational)
+                       continue;
+               cpu_set(num_cpus, cpu_present_map);
+               num_cpus++;
+       }
 
-void
-__init smp_check_cpus(unsigned int max_cpus)
-{
-        int curr_cpu, num_cpus;
-       __u16 boot_cpu_addr;
+       for (cpu = 1; cpu < max_cpus; cpu++)
+               cpu_set(cpu, cpu_possible_map);
 
-       boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr;
-        current_thread_info()->cpu = 0;
-        num_cpus = 1;
-        for (curr_cpu = 0;
-             curr_cpu <= 65535 && num_cpus < max_cpus; curr_cpu++) {
-                if ((__u16) curr_cpu == boot_cpu_addr)
-                        continue;
-                __cpu_logical_map[num_cpus] = (__u16) curr_cpu;
-                if (signal_processor(num_cpus, sigp_sense) ==
-                    sigp_not_operational)
-                        continue;
-               cpu_set(num_cpus, cpu_possible_map);
-                num_cpus++;
-        }
-        printk("Detected %d CPU's\n",(int) num_cpus);
-        printk("Boot cpu address %2X\n", boot_cpu_addr);
+       printk("Detected %d CPU's\n",(int) num_cpus);
+       printk("Boot cpu address %2X\n", boot_cpu_addr);
 }
 
-#endif /* CONFIG_HOTPLUG_CPU */
-
 /*
  *      Activate a secondary processor.
  */
@@ -571,14 +561,12 @@
        p = fork_idle(cpu);
        if (IS_ERR(p))
                panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
-       atomic_inc(&init_mm.mm_count);
-       p->active_mm = &init_mm;
        current_set[cpu] = p;
 }
 
 /* Reserving and releasing of CPUs */
 
-static spinlock_t smp_reserve_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(smp_reserve_lock);
 static int smp_cpu_reserved[NR_CPUS];
 
 int
@@ -681,7 +669,8 @@
        eieio();
        signal_processor(cpu,sigp_restart);
 
-       while (!cpu_online(cpu));
+       while (!cpu_online(cpu))
+               cpu_relax();
        return 0;
 }
 
@@ -736,13 +725,15 @@
 __cpu_die(unsigned int cpu)
 {
        /* Wait until target cpu is down */
-       while (!cpu_stopped(cpu));
+       while (!cpu_stopped(cpu))
+               cpu_relax();
        printk("Processor %d spun down\n", cpu);
 }
 
 void
 cpu_die(void)
 {
+       idle_task_exit();
        signal_processor(smp_processor_id(), sigp_stop);
        BUG();
        for(;;);
@@ -806,6 +797,7 @@
 
 void smp_cpus_done(unsigned int max_cpus)
 {
+       cpu_present_map = cpu_possible_map;
 }
 
 /*
diff -urN linux/arch/s390/kernel/syscalls.S linux/arch/s390/kernel/syscalls.S
--- linux/arch/s390/kernel/syscalls.S   2005/01/13 14:05:36     1.12
+++ linux/arch/s390/kernel/syscalls.S   2005/01/25 04:28:04     1.13
@@ -185,7 +185,7 @@
 SYSCALL(sys_rt_sigaction,sys_rt_sigaction,sys32_rt_sigaction_wrapper)
 SYSCALL(sys_rt_sigprocmask,sys_rt_sigprocmask,sys32_rt_sigprocmask_wrapper)    
/* 175 */
 SYSCALL(sys_rt_sigpending,sys_rt_sigpending,sys32_rt_sigpending_wrapper)
-SYSCALL(sys_rt_sigtimedwait,sys_rt_sigtimedwait,compat_rt_sigtimedwait_wrapper)
+SYSCALL(sys_rt_sigtimedwait,sys_rt_sigtimedwait,compat_sys_rt_sigtimedwait_wrapper)
 SYSCALL(sys_rt_sigqueueinfo,sys_rt_sigqueueinfo,sys32_rt_sigqueueinfo_wrapper)
 SYSCALL(sys_rt_sigsuspend_glue,sys_rt_sigsuspend_glue,sys32_rt_sigsuspend_glue)
 SYSCALL(sys_pread64,sys_pread64,sys32_pread64_wrapper)         /* 180 */
diff -urN linux/arch/s390/kernel/traps.c linux/arch/s390/kernel/traps.c
--- linux/arch/s390/kernel/traps.c      2004/12/04 18:16:01     1.32
+++ linux/arch/s390/kernel/traps.c      2005/01/25 04:28:04     1.33
@@ -273,7 +273,7 @@
        return buffer;
 }
 
-spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(die_lock);
 
 void die(const char * str, struct pt_regs * regs, long err)
 {
diff -urN linux/arch/s390/mm/cmm.c linux/arch/s390/mm/cmm.c
--- linux/arch/s390/mm/cmm.c    2004/08/13 07:18:53     1.3
+++ linux/arch/s390/mm/cmm.c    2005/01/25 04:28:04     1.4
@@ -124,7 +124,6 @@
        int rc;
 
        daemonize("cmmthread");
-       set_cpus_allowed(current, cpumask_of_cpu(0));
        while (1) {
                rc = wait_event_interruptible(cmm_thread_wait,
                        (cmm_pages != cmm_pages_target ||
@@ -408,14 +407,6 @@
 static int
 cmm_init (void)
 {
-       int rc;
-
-       /* Prevent logical cpu 0 from being set offline. */
-       rc = smp_get_cpu(cpumask_of_cpu(0));
-       if (rc) {
-               printk(KERN_ERR "CMM: unable to reserve cpu 0\n");
-               return rc;
-       }
 #ifdef CONFIG_CMM_PROC
        cmm_sysctl_header = register_sysctl_table(cmm_dir_table, 1);
 #endif
@@ -439,8 +430,6 @@
 #ifdef CONFIG_CMM_IUCV
        smsg_unregister_callback(SMSG_PREFIX, cmm_smsg_target);
 #endif
-       /* Allow logical cpu 0 to be set offline again. */
-       smp_put_cpu(0);
 }
 
 module_init(cmm_init);
diff -urN linux/arch/s390/mm/extmem.c linux/arch/s390/mm/extmem.c
--- linux/arch/s390/mm/extmem.c 2005/01/13 14:05:37     1.5
+++ linux/arch/s390/mm/extmem.c 2005/01/25 04:28:04     1.6
@@ -77,7 +77,7 @@
        int segcnt;
 };
 
-static spinlock_t dcss_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(dcss_lock);
 static struct list_head dcss_list = LIST_HEAD_INIT(dcss_list);
 static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC",
                                        "EW/EN-MIXED" };
diff -urN linux/arch/sh/Kconfig linux/arch/sh/Kconfig
--- linux/arch/sh/Kconfig       2005/01/13 14:05:37     1.26
+++ linux/arch/sh/Kconfig       2005/01/25 04:28:05     1.27
@@ -41,25 +41,25 @@
        bool "SolutionEngine"
        help
          Select SolutionEngine if configuring for a Hitachi SH7709
-         or SH7750 evalutation board.
+         or SH7750 evaluation board.
 
 config SH_7751_SOLUTION_ENGINE
        bool "SolutionEngine7751"
        help
          Select 7751 SolutionEngine if configuring for a Hitachi SH7751
-         evalutation board.
+         evaluation board.
 
 config SH_7300_SOLUTION_ENGINE
        bool "SolutionEngine7300"
        help
          Select 7300 SolutionEngine if configuring for a Hitachi 
SH7300(SH-Mobile V)
-         evalutation board.
+         evaluation board.
 
 config SH_73180_SOLUTION_ENGINE
        bool "SolutionEngine73180"
        help
          Select 73180 SolutionEngine if configuring for a Hitachi 
SH73180(SH-Mobile 3)
-         evalutation board.
+         evaluation board.
 
 config SH_7751_SYSTEMH
        bool "SystemH7751R"
diff -urN linux/arch/sh/cchips/voyagergx/consistent.c 
linux/arch/sh/cchips/voyagergx/consistent.c
--- linux/arch/sh/cchips/voyagergx/consistent.c 2004/10/25 20:44:19     1.2
+++ linux/arch/sh/cchips/voyagergx/consistent.c 2005/01/25 04:28:05     1.3
@@ -23,7 +23,7 @@
        unsigned long len;
 };
 
-static spinlock_t voya_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(voya_list_lock);
 static LIST_HEAD(voya_alloc_list);
 
 #define OHCI_SRAM_START        0xb0000000
diff -urN linux/arch/sh/drivers/dma/dma-api.c 
linux/arch/sh/drivers/dma/dma-api.c
--- linux/arch/sh/drivers/dma/dma-api.c 2004/10/25 20:44:20     1.4
+++ linux/arch/sh/drivers/dma/dma-api.c 2005/01/25 04:28:05     1.5
@@ -17,7 +17,7 @@
 #include <linux/list.h>
 #include <asm/dma.h>
 
-spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(dma_spin_lock);
 static LIST_HEAD(registered_dmac_list);
 
 /*
diff -urN linux/arch/sh/kernel/signal.c linux/arch/sh/kernel/signal.c
--- linux/arch/sh/kernel/signal.c       2004/11/15 11:49:21     1.26
+++ linux/arch/sh/kernel/signal.c       2005/01/25 04:28:05     1.27
@@ -24,7 +24,6 @@
 #include <linux/tty.h>
 #include <linux/personality.h>
 #include <linux/binfmts.h>
-#include <linux/suspend.h>
 
 #include <asm/ucontext.h>
 #include <asm/uaccess.h>
@@ -579,10 +578,8 @@
        if (!user_mode(regs))
                return 1;
 
-       if (current->flags & PF_FREEZE) {
-               refrigerator(0);
+       if (try_to_freeze(0))
                goto no_signal;
-       }
 
        if (!oldset)
                oldset = &current->blocked;
diff -urN linux/arch/sh/kernel/time.c linux/arch/sh/kernel/time.c
--- linux/arch/sh/kernel/time.c 2004/10/25 20:44:20     1.28
+++ linux/arch/sh/kernel/time.c 2005/01/25 04:28:05     1.29
@@ -83,7 +83,7 @@
 
 extern unsigned long wall_jiffies;
 #define TICK_SIZE (tick_nsec / 1000)
-spinlock_t tmu0_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(tmu0_lock);
 
 u64 jiffies_64 = INITIAL_JIFFIES;
 
diff -urN linux/arch/sh/kernel/cpu/sh4/sq.c linux/arch/sh/kernel/cpu/sh4/sq.c
--- linux/arch/sh/kernel/cpu/sh4/sq.c   2004/10/25 20:44:20     1.4
+++ linux/arch/sh/kernel/cpu/sh4/sq.c   2005/01/25 04:28:05     1.5
@@ -32,7 +32,7 @@
 #include <asm/cpu/sq.h>
 
 static LIST_HEAD(sq_mapping_list);
-static spinlock_t sq_mapping_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sq_mapping_lock);
 
 /**
  * sq_flush - Flush (prefetch) the store queue cache
diff -urN linux/arch/sh64/kernel/signal.c linux/arch/sh64/kernel/signal.c
--- linux/arch/sh64/kernel/signal.c     2004/09/19 12:30:06     1.3
+++ linux/arch/sh64/kernel/signal.c     2005/01/25 04:28:05     1.4
@@ -701,10 +701,8 @@
        if (!user_mode(regs))
                return 1;
 
-       if (current->flags & PF_FREEZE) {
-               refrigerator(0);
+       if (try_to_freeze(0))
                goto no_signal;
-               }
 
        if (!oldset)
                oldset = &current->blocked;
diff -urN linux/arch/sh64/lib/c-checksum.c linux/arch/sh64/lib/c-checksum.c
--- linux/arch/sh64/lib/c-checksum.c    2004/06/30 17:26:46     1.2
+++ linux/arch/sh64/lib/c-checksum.c    2005/01/25 04:28:05     1.3
@@ -136,7 +136,7 @@
 
 /* Copy while checksumming, otherwise like csum_partial.  */
 unsigned int
-csum_partial_copy(const char *src, char *dst, int len, unsigned int sum)
+csum_partial_copy(const unsigned char *src, unsigned char *dst, int len, 
unsigned int sum)
 {
        sum = csum_partial(src, len, sum);
        memcpy(dst, src, len);
@@ -147,7 +147,7 @@
 /* Copy from userspace and compute checksum.  If we catch an exception
    then zero the rest of the buffer.  */
 unsigned int
-csum_partial_copy_from_user(const char *src, char *dst, int len,
+csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst, int 
len,
                            unsigned int sum, int *err_ptr)
 {
        int missing;
@@ -168,7 +168,7 @@
 
 /* Copy to userspace and compute checksum.  */
 unsigned int
-csum_partial_copy_to_user(const char *src, char *dst, int len,
+csum_partial_copy_to_user(const unsigned char *src, unsigned char *dst, int 
len,
                          unsigned int sum, int *err_ptr)
 {
        sum = csum_partial(src, len, sum);
@@ -221,7 +221,7 @@
 
 // Post SIM:
 unsigned int
-csum_partial_copy_nocheck(const char *src, char *dst, int len, unsigned int 
sum)
+csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst, int 
len, unsigned int sum)
 {
        //  unsigned dummy;
        pr_debug("csum_partial_copy_nocheck src %p dst %p len %d\n", src, dst,
diff -urN linux/arch/sparc/kernel/auxio.c linux/arch/sparc/kernel/auxio.c
--- linux/arch/sparc/kernel/auxio.c     2004/12/04 18:16:01     1.7
+++ linux/arch/sparc/kernel/auxio.c     2005/01/25 04:28:05     1.8
@@ -18,7 +18,7 @@
  * in entry.S::floppy_tdone
  */
 void __iomem *auxio_register = NULL;
-static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(auxio_lock);
 
 void __init auxio_probe(void)
 {
diff -urN linux/arch/sparc/kernel/irq.c linux/arch/sparc/kernel/irq.c
--- linux/arch/sparc/kernel/irq.c       2004/09/19 12:30:06     1.46
+++ linux/arch/sparc/kernel/irq.c       2005/01/25 04:28:05     1.47
@@ -159,7 +159,7 @@
 };
 
 /* Used to protect the IRQ action lists */
-spinlock_t irq_action_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(irq_action_lock);
 
 int show_interrupts(struct seq_file *p, void *v)
 {
diff -urN linux/arch/sparc/kernel/process.c linux/arch/sparc/kernel/process.c
--- linux/arch/sparc/kernel/process.c   2005/01/13 14:05:38     1.60
+++ linux/arch/sparc/kernel/process.c   2005/01/25 04:28:05     1.61
@@ -198,7 +198,7 @@
 
 EXPORT_SYMBOL(machine_power_off);
 
-static spinlock_t sparc_backtrace_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sparc_backtrace_lock);
 
 void __show_backtrace(unsigned long fp)
 {
diff -urN linux/arch/sparc/kernel/semaphore.c 
linux/arch/sparc/kernel/semaphore.c
--- linux/arch/sparc/kernel/semaphore.c 2004/04/23 15:54:10     1.10
+++ linux/arch/sparc/kernel/semaphore.c 2005/01/25 04:28:05     1.11
@@ -44,7 +44,7 @@
        wake_up(&sem->wait);
 }
 
-static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(semaphore_lock);
 
 void __sched __down(struct semaphore * sem)
 {
diff -urN linux/arch/sparc/kernel/smp.c linux/arch/sparc/kernel/smp.c
--- linux/arch/sparc/kernel/smp.c       2004/09/19 12:30:06     1.29
+++ linux/arch/sparc/kernel/smp.c       2005/01/25 04:28:05     1.30
@@ -234,7 +234,7 @@
 extern unsigned int lvl14_resolution;
 
 /* /proc/profile writes can call this, don't __init it please. */
-static spinlock_t prof_setup_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(prof_setup_lock);
 
 int setup_profiling_timer(unsigned int multiplier)
 {
diff -urN linux/arch/sparc/kernel/sun4d_irq.c 
linux/arch/sparc/kernel/sun4d_irq.c
--- linux/arch/sparc/kernel/sun4d_irq.c 2004/07/20 20:21:17     1.27
+++ linux/arch/sparc/kernel/sun4d_irq.c 2005/01/25 04:28:05     1.28
@@ -72,7 +72,7 @@
 
 static int nsbi;
 #ifdef CONFIG_SMP
-spinlock_t sun4d_imsk_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(sun4d_imsk_lock);
 #endif
 
 int show_sun4d_interrupts(struct seq_file *p, void *v)
diff -urN linux/arch/sparc/kernel/sun4d_smp.c 
linux/arch/sparc/kernel/sun4d_smp.c
--- linux/arch/sparc/kernel/sun4d_smp.c 2005/01/13 14:05:38     1.32
+++ linux/arch/sparc/kernel/sun4d_smp.c 2005/01/25 04:28:05     1.33
@@ -300,7 +300,7 @@
        unsigned char processors_out[NR_CPUS]; /* Set when ipi exited. */
 } ccall_info __attribute__((aligned(8)));
 
-static spinlock_t cross_call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cross_call_lock);
 
 /* Cross calls must be serialized, at least currently. */
 void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
@@ -397,7 +397,7 @@
        SMP_PRINTK(("smp4d_message_pass %d %d %08lx %d\n", target, msg, data, 
wait));
        if (msg == MSG_STOP_CPU && target == MSG_ALL_BUT_SELF) {
                unsigned long flags;
-               static spinlock_t stop_cpu_lock = SPIN_LOCK_UNLOCKED;
+               static DEFINE_SPINLOCK(stop_cpu_lock);
                spin_lock_irqsave(&stop_cpu_lock, flags);
                smp4d_stop_cpu_sender = me;
                smp4d_cross_call((smpfunc_t)smp4d_stop_cpu, 0, 0, 0, 0, 0);
diff -urN linux/arch/sparc/kernel/sun4m_smp.c 
linux/arch/sparc/kernel/sun4m_smp.c
--- linux/arch/sparc/kernel/sun4m_smp.c 2005/01/13 14:05:38     1.31
+++ linux/arch/sparc/kernel/sun4m_smp.c 2005/01/25 04:28:05     1.32
@@ -321,7 +321,7 @@
        unsigned long processors_out[NR_CPUS]; /* Set when ipi exited. */
 } ccall_info;
 
-static spinlock_t cross_call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cross_call_lock);
 
 /* Cross calls must be serialized, at least currently. */
 void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
diff -urN linux/arch/sparc/kernel/time.c linux/arch/sparc/kernel/time.c
--- linux/arch/sparc/kernel/time.c      2004/12/04 18:16:01     1.43
+++ linux/arch/sparc/kernel/time.c      2005/01/25 04:28:05     1.44
@@ -50,9 +50,9 @@
 
 EXPORT_SYMBOL(jiffies_64);
 
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
 enum sparc_clock_type sp_clock_typ;
-spinlock_t mostek_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(mostek_lock);
 void __iomem *mstk48t02_regs = NULL;
 static struct mostek48t08 *mstk48t08_regs = NULL;
 static int set_rtc_mmss(unsigned long);
diff -urN linux/arch/sparc/mm/srmmu.c linux/arch/sparc/mm/srmmu.c
--- linux/arch/sparc/mm/srmmu.c 2004/11/15 11:49:21     1.72
+++ linux/arch/sparc/mm/srmmu.c 2005/01/25 04:28:05     1.73
@@ -88,7 +88,7 @@
 ctxd_t *srmmu_context_table;
 
 int viking_mxcc_present;
-static spinlock_t srmmu_context_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(srmmu_context_spinlock);
 
 int is_hypersparc;
 
diff -urN linux/arch/sparc/prom/misc.c linux/arch/sparc/prom/misc.c
--- linux/arch/sparc/prom/misc.c        2003/06/05 14:43:27     1.8
+++ linux/arch/sparc/prom/misc.c        2005/01/25 04:28:05     1.9
@@ -16,7 +16,7 @@
 
 extern void restore_current(void);
 
-spinlock_t prom_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(prom_lock);
 
 /* Reset and reboot the machine with the command 'bcommand'. */
 void
diff -urN linux/arch/sparc64/Kconfig linux/arch/sparc64/Kconfig
--- linux/arch/sparc64/Kconfig  2005/01/13 14:05:38     1.39
+++ linux/arch/sparc64/Kconfig  2005/01/25 04:28:06     1.40
@@ -92,8 +92,8 @@
        bool "Symmetric multi-processing support"
        ---help---
          This enables support for systems with more than one CPU. If you have
-         a system with only one CPU, like most personal computers, say N. If
-         you have a system with more than one CPU, say Y.
+         a system with only one CPU, say N. If you have a system with more than
+         one CPU, say Y.
 
          If you say N here, the kernel will run on single and multiprocessor
          machines, but will use only one CPU of a multiprocessor machine. If
@@ -101,17 +101,11 @@
          singleprocessor machines. On a singleprocessor machine, the kernel
          will run faster if you say N here.
 
-         Note that if you say Y here and choose architecture "586" or
-         "Pentium" under "Processor family", the kernel will not work on 486
-         architectures. Similarly, multiprocessor kernels for the "PPro"
-         architecture may not work on all Pentium based boards.
-
          People using multiprocessor machines who say Y here should also say
          Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
          Management" code will be disabled if you say Y here.
 
          See also the <file:Documentation/smp.txt>,
-         <file:Documentation/i386/IO-APIC.txt>,
          <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
          <http://www.tldp.org/docs.html#howto>.
 
diff -urN linux/arch/sparc64/defconfig linux/arch/sparc64/defconfig
--- linux/arch/sparc64/defconfig        2005/01/13 14:05:38     1.129
+++ linux/arch/sparc64/defconfig        2005/01/25 04:28:06     1.130
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.10
-# Mon Dec 27 22:36:56 2004
+# Mon Jan 10 11:24:25 2005
 #
 CONFIG_64BIT=y
 CONFIG_MMU=y
@@ -79,6 +79,7 @@
 CONFIG_US2E_FREQ=m
 CONFIG_SPARC64=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_HUGETLB_PAGE_SIZE_4MB=y
 # CONFIG_HUGETLB_PAGE_SIZE_512K is not set
 # CONFIG_HUGETLB_PAGE_SIZE_64K is not set
@@ -336,6 +337,7 @@
 #
 CONFIG_SCSI_SPI_ATTRS=y
 CONFIG_SCSI_FC_ATTRS=m
+CONFIG_SCSI_ISCSI_ATTRS=m
 
 #
 # SCSI low-level drivers
@@ -395,7 +397,6 @@
 # CONFIG_SCSI_QLA2300 is not set
 # CONFIG_SCSI_QLA2322 is not set
 # CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_QLA6322 is not set
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
 CONFIG_SCSI_DEBUG=m
@@ -619,8 +620,6 @@
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_ARP_MANGLE=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_COMPAT_IPFWADM=m
 
 #
 # IPv6: Netfilter Configuration
@@ -894,7 +893,6 @@
 CONFIG_FORCEDETH=m
 CONFIG_DGRS=m
 CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
 CONFIG_E100=m
 CONFIG_E100_NAPI=y
 CONFIG_FEALNX=m
@@ -1081,7 +1079,6 @@
 # XFree86 DRI support
 #
 CONFIG_DRM=y
-CONFIG_DRM_FFB=m
 CONFIG_DRM_TDFX=m
 # CONFIG_DRM_R128 is not set
 
@@ -1112,13 +1109,14 @@
 # CONFIG_GAMEPORT_EMU10K1 is not set
 # CONFIG_GAMEPORT_VORTEX is not set
 # CONFIG_GAMEPORT_FM801 is not set
-# CONFIG_GAMEPORT_CS461x is not set
+CONFIG_GAMEPORT_CS461X=m
 CONFIG_SERIO=y
 CONFIG_SERIO_I8042=y
 # CONFIG_SERIO_SERPORT is not set
 # CONFIG_SERIO_CT82C710 is not set
 # CONFIG_SERIO_PARKBD is not set
 CONFIG_SERIO_PCIPS2=m
+CONFIG_SERIO_LIBPS2=y
 CONFIG_SERIO_RAW=m
 
 #
@@ -1239,6 +1237,7 @@
 # CONFIG_REISERFS_FS is not set
 CONFIG_JFS_FS=m
 CONFIG_JFS_POSIX_ACL=y
+CONFIG_JFS_SECURITY=y
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 CONFIG_FS_POSIX_ACL=y
@@ -1308,7 +1307,6 @@
 CONFIG_VXFS_FS=m
 CONFIG_HPFS_FS=m
 CONFIG_QNX4FS_FS=m
-# CONFIG_QNX4FS_RW is not set
 CONFIG_SYSV_FS=m
 CONFIG_UFS_FS=m
 CONFIG_UFS_FS_WRITE=y
@@ -1579,6 +1577,8 @@
 # CONFIG_SND_CS46XX_NEW_DSP is not set
 CONFIG_SND_CS4281=m
 CONFIG_SND_EMU10K1=m
+CONFIG_SND_EMU10K1X=m
+CONFIG_SND_CA0106=m
 CONFIG_SND_KORG1212=m
 CONFIG_SND_MIXART=m
 CONFIG_SND_NM256=m
@@ -1603,13 +1603,13 @@
 CONFIG_SND_INTEL8X0M=m
 CONFIG_SND_SONICVIBES=m
 # CONFIG_SND_VIA82XX is not set
+CONFIG_SND_VIA82XX_MODEM=m
 CONFIG_SND_VX222=m
 
 #
 # USB devices
 #
 # CONFIG_SND_USB_AUDIO is not set
-CONFIG_SND_USB_USX2Y=m
 
 #
 # ALSA Sparc devices
@@ -1691,7 +1691,6 @@
 #
 CONFIG_USB_MDC800=m
 CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
 
 #
 # USB Multimedia devices
@@ -1862,7 +1861,7 @@
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 CONFIG_KPROBES=y
diff -urN linux/arch/sparc64/kernel/auxio.c linux/arch/sparc64/kernel/auxio.c
--- linux/arch/sparc64/kernel/auxio.c   2004/10/12 01:45:42     1.12
+++ linux/arch/sparc64/kernel/auxio.c   2005/01/25 04:28:06     1.13
@@ -26,7 +26,7 @@
 };
 
 static enum auxio_type auxio_devtype = AUXIO_TYPE_NODEV;
-static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(auxio_lock);
 
 static void __auxio_sbus_set(u8 bits_on, u8 bits_off)
 {
diff -urN linux/arch/sparc64/kernel/binfmt_aout32.c 
linux/arch/sparc64/kernel/binfmt_aout32.c
--- linux/arch/sparc64/kernel/binfmt_aout32.c   2005/01/13 14:05:38     1.29
+++ linux/arch/sparc64/kernel/binfmt_aout32.c   2005/01/25 04:28:06     1.30
@@ -49,7 +49,9 @@
        end = PAGE_ALIGN(end);
        if (end <= start)
                return;
+       down_write(&current->mm->mmap_sem);
        do_brk(start, end - start);
+       up_write(&current->mm->mmap_sem);
 }
 
 /*
@@ -246,10 +248,14 @@
        if (N_MAGIC(ex) == NMAGIC) {
                loff_t pos = fd_offset;
                /* Fuck me plenty... */
+               down_write(&current->mm->mmap_sem);     
                error = do_brk(N_TXTADDR(ex), ex.a_text);
+               up_write(&current->mm->mmap_sem);
                bprm->file->f_op->read(bprm->file, (char __user *)N_TXTADDR(ex),
                          ex.a_text, &pos);
+               down_write(&current->mm->mmap_sem);
                error = do_brk(N_DATADDR(ex), ex.a_data);
+               up_write(&current->mm->mmap_sem);
                bprm->file->f_op->read(bprm->file, (char __user *)N_DATADDR(ex),
                          ex.a_data, &pos);
                goto beyond_if;
@@ -257,8 +263,10 @@
 
        if (N_MAGIC(ex) == OMAGIC) {
                loff_t pos = fd_offset;
+               down_write(&current->mm->mmap_sem);
                do_brk(N_TXTADDR(ex) & PAGE_MASK,
                        ex.a_text+ex.a_data + PAGE_SIZE - 1);
+               up_write(&current->mm->mmap_sem);
                bprm->file->f_op->read(bprm->file, (char __user *)N_TXTADDR(ex),
                          ex.a_text+ex.a_data, &pos);
        } else {
@@ -272,7 +280,9 @@
 
                if (!bprm->file->f_op->mmap) {
                        loff_t pos = fd_offset;
+                       down_write(&current->mm->mmap_sem);
                        do_brk(0, ex.a_text+ex.a_data);
+                       up_write(&current->mm->mmap_sem);
                        bprm->file->f_op->read(bprm->file,
                                  (char __user *)N_TXTADDR(ex),
                                  ex.a_text+ex.a_data, &pos);
@@ -389,7 +399,9 @@
        len = PAGE_ALIGN(ex.a_text + ex.a_data);
        bss = ex.a_text + ex.a_data + ex.a_bss;
        if (bss > len) {
+               down_write(&current->mm->mmap_sem);
                error = do_brk(start_addr + len, bss - len);
+               up_write(&current->mm->mmap_sem);
                retval = error;
                if (error != start_addr + len)
                        goto out;
diff -urN linux/arch/sparc64/kernel/devices.c 
linux/arch/sparc64/kernel/devices.c
--- linux/arch/sparc64/kernel/devices.c 2003/08/26 00:28:52     1.19
+++ linux/arch/sparc64/kernel/devices.c 2005/01/25 04:28:06     1.20
@@ -24,7 +24,7 @@
 /* Used to synchronize acceses to NatSemi SUPER I/O chip configure
  * operations in asm/ns87303.h
  */
-spinlock_t ns87303_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(ns87303_lock);
 
 extern void cpu_probe(void);
 extern void central_probe(void);
diff -urN linux/arch/sparc64/kernel/irq.c linux/arch/sparc64/kernel/irq.c
--- linux/arch/sparc64/kernel/irq.c     2004/09/19 12:30:06     1.57
+++ linux/arch/sparc64/kernel/irq.c     2005/01/25 04:28:06     1.58
@@ -101,7 +101,7 @@
  * read things in the table.  IRQ handler processing orders
  * its' accesses such that no locking is needed.
  */
-static spinlock_t irq_action_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(irq_action_lock);
 
 static void register_irq_proc (unsigned int irq);
 
diff -urN linux/arch/sparc64/kernel/kprobes.c 
linux/arch/sparc64/kernel/kprobes.c
--- linux/arch/sparc64/kernel/kprobes.c 2004/11/15 11:49:21     1.3
+++ linux/arch/sparc64/kernel/kprobes.c 2005/01/25 04:28:06     1.4
@@ -40,9 +40,13 @@
 
 int arch_prepare_kprobe(struct kprobe *p)
 {
+       return 0;
+}
+
+void arch_copy_kprobe(struct kprobe *p)
+{
        p->ainsn.insn[0] = *p->addr;
        p->ainsn.insn[1] = BREAKPOINT_INSTRUCTION_2;
-       return 0;
 }
 
 void arch_remove_kprobe(struct kprobe *p)
diff -urN linux/arch/sparc64/kernel/pci.c linux/arch/sparc64/kernel/pci.c
--- linux/arch/sparc64/kernel/pci.c     2004/12/04 18:16:01     1.37
+++ linux/arch/sparc64/kernel/pci.c     2005/01/25 04:28:06     1.38
@@ -56,7 +56,7 @@
 volatile int pci_poke_cpu = -1;
 volatile int pci_poke_faulted;
 
-static spinlock_t pci_poke_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pci_poke_lock);
 
 void pci_config_read8(u8 *addr, u8 *ret)
 {
diff -urN linux/arch/sparc64/kernel/pci_psycho.c 
linux/arch/sparc64/kernel/pci_psycho.c
--- linux/arch/sparc64/kernel/pci_psycho.c      2004/10/12 01:45:42     1.34
+++ linux/arch/sparc64/kernel/pci_psycho.c      2005/01/25 04:28:06     1.35
@@ -433,7 +433,7 @@
 #define  PSYCHO_STCLINE_VALID   0x0000000000000002UL   /* Valid */
 #define  PSYCHO_STCLINE_FOFN    0x0000000000000001UL   /* Fetch Outstanding / 
Flush Necessary */
 
-static spinlock_t stc_buf_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(stc_buf_lock);
 static unsigned long stc_error_buf[128];
 static unsigned long stc_tag_buf[16];
 static unsigned long stc_line_buf[16];
@@ -453,9 +453,9 @@
                tag_base = regbase + PSYCHO_STC_TAG_A;
                line_base = regbase + PSYCHO_STC_LINE_A;
        } else {
-               err_base = regbase + PSYCHO_STC_ERR_A;
-               tag_base = regbase + PSYCHO_STC_TAG_A;
-               line_base = regbase + PSYCHO_STC_LINE_A;
+               err_base = regbase + PSYCHO_STC_ERR_B;
+               tag_base = regbase + PSYCHO_STC_TAG_B;
+               line_base = regbase + PSYCHO_STC_LINE_B;
        }
 
        spin_lock(&stc_buf_lock);
diff -urN linux/arch/sparc64/kernel/pci_schizo.c 
linux/arch/sparc64/kernel/pci_schizo.c
--- linux/arch/sparc64/kernel/pci_schizo.c      2004/10/12 01:45:42     1.24
+++ linux/arch/sparc64/kernel/pci_schizo.c      2005/01/25 04:28:06     1.25
@@ -377,7 +377,7 @@
        UE_ERR, CE_ERR, PCI_ERR, SAFARI_ERR
 };
 
-static spinlock_t stc_buf_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(stc_buf_lock);
 static unsigned long stc_error_buf[128];
 static unsigned long stc_tag_buf[16];
 static unsigned long stc_line_buf[16];
diff -urN linux/arch/sparc64/kernel/process.c 
linux/arch/sparc64/kernel/process.c
--- linux/arch/sparc64/kernel/process.c 2005/01/13 14:05:38     1.71
+++ linux/arch/sparc64/kernel/process.c 2005/01/25 04:28:06     1.72
@@ -282,7 +282,7 @@
 }
 
 #ifdef CONFIG_SMP
-static spinlock_t regdump_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(regdump_lock);
 #endif
 
 void __show_regs(struct pt_regs * regs)
diff -urN linux/arch/sparc64/kernel/smp.c linux/arch/sparc64/kernel/smp.c
--- linux/arch/sparc64/kernel/smp.c     2004/12/27 02:15:51     1.73
+++ linux/arch/sparc64/kernel/smp.c     2005/01/25 04:28:06     1.74
@@ -154,7 +154,7 @@
 #define NUM_ROUNDS     64      /* magic value */
 #define NUM_ITERS      5       /* likewise */
 
-static spinlock_t itc_sync_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(itc_sync_lock);
 static unsigned long go[SLAVE + 1];
 
 #define DEBUG_TICK_SYNC        0
@@ -546,7 +546,7 @@
        int wait;
 };
 
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
 static struct call_data_struct *call_data;
 
 extern unsigned long xcall_call_function;
@@ -1146,7 +1146,7 @@
 }
 
 /* /proc/profile writes can call this, don't __init it please. */
-static spinlock_t prof_setup_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(prof_setup_lock);
 
 int setup_profiling_timer(unsigned int multiplier)
 {
diff -urN linux/arch/sparc64/kernel/sys_sparc32.c 
linux/arch/sparc64/kernel/sys_sparc32.c
--- linux/arch/sparc64/kernel/sys_sparc32.c     2005/01/13 14:05:38     1.118
+++ linux/arch/sparc64/kernel/sys_sparc32.c     2005/01/25 04:28:06     1.119
@@ -1598,7 +1598,8 @@
                            put_user(oldlen, (u32 __user *)(unsigned long) 
tmp.oldlenp))
                                error = -EFAULT;
                }
-               copy_to_user(args->__unused, tmp.__unused, 
sizeof(tmp.__unused));
+               if (copy_to_user(args->__unused, tmp.__unused, 
sizeof(tmp.__unused)))
+                       error = -EFAULT;
        }
        return error;
 #endif
diff -urN linux/arch/sparc64/kernel/sys_sunos32.c 
linux/arch/sparc64/kernel/sys_sunos32.c
--- linux/arch/sparc64/kernel/sys_sunos32.c     2004/10/25 20:44:21     1.67
+++ linux/arch/sparc64/kernel/sys_sunos32.c     2005/01/25 04:28:06     1.68
@@ -291,7 +291,8 @@
        put_user(ino, &dirent->d_ino);
        put_user(namlen, &dirent->d_namlen);
        put_user(reclen, &dirent->d_reclen);
-       copy_to_user(dirent->d_name, name, namlen);
+       if (copy_to_user(dirent->d_name, name, namlen))
+               return -EFAULT;
        put_user(0, dirent->d_name + namlen);
        dirent = (void __user *) dirent + reclen;
        buf->curr = dirent;
@@ -371,7 +372,8 @@
        put_user(ino, &dirent->d_ino);
        put_user(namlen, &dirent->d_namlen);
        put_user(reclen, &dirent->d_reclen);
-       copy_to_user(dirent->d_name, name, namlen);
+       if (copy_to_user(dirent->d_name, name, namlen))
+               return -EFAULT;
        put_user(0, dirent->d_name + namlen);
        dirent = (void __user *) dirent + reclen;
        buf->curr = dirent;
diff -urN linux/arch/sparc64/kernel/systbls.S 
linux/arch/sparc64/kernel/systbls.S
--- linux/arch/sparc64/kernel/systbls.S 2005/01/13 14:05:38     1.68
+++ linux/arch/sparc64/kernel/systbls.S 2005/01/25 04:28:06     1.69
@@ -41,7 +41,7 @@
 /*90*/ .word sys_dup2, sys_setfsuid, compat_sys_fcntl, sys32_select, 
sys_setfsgid
        .word sys_fsync, sys32_setpriority, sys_nis_syscall, sys_nis_syscall, 
sys_nis_syscall
 /*100*/ .word sys32_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, 
sys32_rt_sigprocmask, sys32_rt_sigpending
-       .word compat_rt_sigtimedwait, sys32_rt_sigqueueinfo, 
sys32_rt_sigsuspend, sys_setresuid, sys_getresuid
+       .word compat_sys_rt_sigtimedwait, sys32_rt_sigqueueinfo, 
sys32_rt_sigsuspend, sys_setresuid, sys_getresuid
 /*110*/        .word sys_setresgid, sys_getresgid, sys_setregid, 
sys_nis_syscall, sys_nis_syscall
        .word sys32_getgroups, sys32_gettimeofday, sys32_getrusage, 
sys_nis_syscall, sys_getcwd
 /*120*/        .word compat_sys_readv, compat_sys_writev, sys32_settimeofday, 
sys32_fchown16, sys_fchmod
diff -urN linux/arch/sparc64/kernel/time.c linux/arch/sparc64/kernel/time.c
--- linux/arch/sparc64/kernel/time.c    2004/11/15 11:49:21     1.58
+++ linux/arch/sparc64/kernel/time.c    2005/01/25 04:28:06     1.59
@@ -46,8 +46,8 @@
 #include <asm/sections.h>
 #include <asm/cpudata.h>
 
-spinlock_t mostek_lock = SPIN_LOCK_UNLOCKED;
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(mostek_lock);
+DEFINE_SPINLOCK(rtc_lock);
 unsigned long mstk48t02_regs = 0UL;
 #ifdef CONFIG_PCI
 unsigned long ds1287_regs = 0UL;
diff -urN linux/arch/sparc64/kernel/traps.c linux/arch/sparc64/kernel/traps.c
--- linux/arch/sparc64/kernel/traps.c   2004/10/12 14:36:34     1.52
+++ linux/arch/sparc64/kernel/traps.c   2005/01/25 04:28:06     1.53
@@ -42,7 +42,7 @@
 #endif
 
 struct notifier_block *sparc64die_chain;
-static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(die_notifier_lock);
 
 int register_die_notifier(struct notifier_block *nb)
 {
diff -urN linux/arch/sparc64/lib/find_bit.c linux/arch/sparc64/lib/find_bit.c
--- linux/arch/sparc64/lib/find_bit.c   2004/10/25 20:44:21     1.3
+++ linux/arch/sparc64/lib/find_bit.c   2005/01/25 04:28:06     1.4
@@ -50,9 +50,10 @@
  * on Linus's ALPHA routines, which are pretty portable BTW.
  */
 
-unsigned long find_next_zero_bit(unsigned long *addr, unsigned long size, 
unsigned long offset)
+unsigned long find_next_zero_bit(const unsigned long *addr,
+                       unsigned long size, unsigned long offset)
 {
-       unsigned long *p = addr + (offset >> 6);
+       const unsigned long *p = addr + (offset >> 6);
        unsigned long result = offset & ~63UL;
        unsigned long tmp;
 
diff -urN linux/arch/sparc64/mm/init.c linux/arch/sparc64/mm/init.c
--- linux/arch/sparc64/mm/init.c        2005/01/13 14:05:38     1.84
+++ linux/arch/sparc64/mm/init.c        2005/01/25 04:28:06     1.85
@@ -59,7 +59,7 @@
 static unsigned long bootmap_base;
 
 /* get_new_mmu_context() uses "cache + 1".  */
-spinlock_t ctx_alloc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(ctx_alloc_lock);
 unsigned long tlb_context_cache = CTX_FIRST_VERSION - 1;
 #define CTX_BMAP_SLOTS (1UL << (CTX_VERSION_SHIFT - 6))
 unsigned long mmu_context_bmap[CTX_BMAP_SLOTS];
diff -urN linux/arch/sparc64/prom/p1275.c linux/arch/sparc64/prom/p1275.c
--- linux/arch/sparc64/prom/p1275.c     2001/11/06 00:55:00     1.11
+++ linux/arch/sparc64/prom/p1275.c     2005/01/25 04:28:07     1.12
@@ -251,7 +251,7 @@
  * This provides SMP safety on the p1275buf. prom_callback() drops this lock
  * to allow recursuve acquisition.
  */
-spinlock_t prom_entry_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(prom_entry_lock);
 
 long p1275_cmd (char *service, long fmt, ...)
 {
diff -urN linux/arch/sparc64/solaris/timod.c linux/arch/sparc64/solaris/timod.c
--- linux/arch/sparc64/solaris/timod.c  2005/01/13 14:05:39     1.25
+++ linux/arch/sparc64/solaris/timod.c  2005/01/25 04:28:07     1.26
@@ -29,7 +29,7 @@
 
 asmlinkage int solaris_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
 
-static spinlock_t timod_pagelock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(timod_pagelock);
 static char * page = NULL ;
 
 #ifndef DEBUG_SOLARIS_KMALLOC
diff -urN linux/arch/um/Kconfig linux/arch/um/Kconfig
--- linux/arch/um/Kconfig       2005/01/13 14:05:39     1.15
+++ linux/arch/um/Kconfig       2005/01/25 04:28:07     1.16
@@ -70,6 +70,16 @@
 
 source "arch/um/Kconfig_arch"
 
+config LD_SCRIPT_STATIC
+       bool
+       default y
+       depends on MODE_TT || STATIC_LINK
+
+config LD_SCRIPT_DYN
+       bool
+       default y
+       depends on !LD_SCRIPT_STATIC
+
 config NET
        bool "Networking support"
        help
@@ -80,7 +90,7 @@
        should consider updating your networking tools too because changes
        in the kernel and the tools often go hand in hand. The tools are
        contained in the package net-tools, the location and version number
-       of which are given in Documentation/Changes.
+       of which are given in <file:Documentation/Changes>.
 
        For a general introduction to Linux networking, it is highly
        recommended to read the NET-HOWTO, available from
@@ -120,7 +130,7 @@
        by removing or changing anything in /proc which gives away the
        identity of a UML.
 
-       See http://user-mode-linux.sf.net/hppfs.html for more information.
+       See <http://user-mode-linux.sf.net/hppfs.html> for more information.
 
        You only need this if you are setting up a UML honeypot.  Otherwise,
        it is safe to say 'N' here.
@@ -145,6 +155,25 @@
 
         It is safe to say 'Y' here.
 
+config MAGIC_SYSRQ
+       bool "Magic SysRq key"
+       depends on MCONSOLE
+       ---help---
+       If you say Y here, you will have some control over the system even
+       if the system crashes for example during kernel debugging (e.g., you
+       will be able to flush the buffer cache to disk, reboot the system
+       immediately or dump some status information). A key for each of the
+       possible requests is provided.
+
+       This is the feature normally accomplished by pressing a key
+       while holding SysRq (Alt+PrintScreen).
+
+       On UML, this is accomplished by sending a "sysrq" command with
+       mconsole, followed by the letter for the requested command.
+
+       The keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
+       unless you really know what this hack does.
+
 config HOST_2G_2G
        bool "2G/2G host address space split"
        default n
@@ -244,7 +273,7 @@
 
 source "arch/um/Kconfig_char"
 
-source "arch/um/Kconfig_block"
+source "drivers/block/Kconfig"
 
 config NETDEVICES
        bool
diff -urN linux/arch/um/Makefile linux/arch/um/Makefile
--- linux/arch/um/Makefile      2005/01/13 14:05:39     1.18
+++ linux/arch/um/Makefile      2005/01/25 04:28:07     1.19
@@ -3,7 +3,7 @@
 # Licensed under the GPL
 #
 
-ARCH_DIR = arch/um
+ARCH_DIR := arch/um
 OS := $(shell uname -s)
 # We require bash because the vmlinux link and loader script cpp use bash
 # features.
@@ -12,34 +12,38 @@
 filechk_gen_header = $<
 
 core-y                 += $(ARCH_DIR)/kernel/          \
-                          $(ARCH_DIR)/drivers/
-
-clean-dirs := sys-$(SUBARCH)
+                          $(ARCH_DIR)/drivers/         \
+                          $(ARCH_DIR)/os-$(OS)/
 
 # Have to precede the include because the included Makefiles reference them.
-SYMLINK_HEADERS = archparam.h system.h sigcontext.h processor.h ptrace.h \
+SYMLINK_HEADERS := archparam.h system.h sigcontext.h processor.h ptrace.h \
        arch-signal.h module.h vm-flags.h
 SYMLINK_HEADERS := $(foreach 
header,$(SYMLINK_HEADERS),include/asm-um/$(header))
 
-CLEAN_FILES += $(ARCH_SYMLINKS)
-
+# The "os" symlink is only used by arch/um/include/os.h, which includes
+# ../os/include/file.h
 ARCH_SYMLINKS = include/asm-um/arch $(ARCH_DIR)/include/sysdep $(ARCH_DIR)/os \
        $(SYMLINK_HEADERS) $(ARCH_DIR)/include/uml-config.h
 
 GEN_HEADERS += $(ARCH_DIR)/include/task.h $(ARCH_DIR)/include/kern_constants.h
 
-MAKEFILE-$(CONFIG_MODE_TT) += Makefile-tt
-MAKEFILE-$(CONFIG_MODE_SKAS) += Makefile-skas
+um-modes-$(CONFIG_MODE_TT) += tt
+um-modes-$(CONFIG_MODE_SKAS) += skas
+
+MODE_INCLUDE   += $(foreach mode,$(um-modes-y),\
+                  -I$(srctree)/$(ARCH_DIR)/kernel/$(mode)/include)
 
-ifneq ($(MAKEFILE-y),)
-  include $(addprefix $(srctree)/$(ARCH_DIR)/,$(MAKEFILE-y))
+MAKEFILES-INCL += $(foreach mode,$(um-modes-y),\
+                  $(srctree)/$(ARCH_DIR)/Makefile-$(mode))
+
+ifneq ($(MAKEFILE-INCL),)
+  include $(MAKEFILE-INCL)
 endif
 
 ARCH_INCLUDE   := -I$(ARCH_DIR)/include
 SYS_DIR                := $(ARCH_DIR)/include/sysdep-$(SUBARCH)
 
 include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
-include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
 
 core-y += $(SUBARCH_CORE)
 libs-y += $(SUBARCH_LIBS)
@@ -50,12 +54,16 @@
 # errnos.
 
 CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
-       -D_LARGEFILE64_SOURCE $(ARCH_INCLUDE) -Derrno=kernel_errno \
-       -Dsigprocmask=kernel_sigprocmask $(MODE_INCLUDE)
+       $(ARCH_INCLUDE) $(MODE_INCLUDE)
 
+USER_CFLAGS := $(patsubst -I%,,$(CFLAGS))
+USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
+       $(MODE_INCLUDE)
+CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask
 CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
 
-LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
+#This will adjust *FLAGS accordingly to the platform.
+include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
 
 # These are needed for clean and mrproper, since in that case .config is not
 # included; the values here are meaningless
@@ -85,34 +93,16 @@
 
 $(shell cd $(ARCH_DIR) && ln -sf Kconfig_$(SUBARCH) Kconfig_arch)
 
-CLEAN_FILES += $(TOPDIR)/$(ARCH_DIR)/include/skas_ptregs.h \
-       $(TOPDIR)/$(ARCH_DIR)/os
-
 prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) \
        $(ARCH_DIR)/kernel/vmlinux.lds.S
 
-# These aren't in Makefile-tt because they are needed in the !CONFIG_MODE_TT +
-# CONFIG_MODE_SKAS + CONFIG_STATIC_LINK case.
-
-LINK_TT = -static
-LD_SCRIPT_TT := uml.lds.S
+LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
+LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib
 
-ifeq ($(CONFIG_STATIC_LINK),y)
-  LINK-y += $(LINK_TT)
-  LD_SCRIPT-y := $(LD_SCRIPT_TT)
-else
-ifeq ($(CONFIG_MODE_TT),y)
-  LINK-y += $(LINK_TT)
-  LD_SCRIPT-y := $(LD_SCRIPT_TT)
-else
-ifeq ($(CONFIG_MODE_SKAS),y)
-  LINK-y += $(LINK_SKAS)
-  LD_SCRIPT-y := $(LD_SCRIPT_SKAS)
-endif
-endif
-endif
+LD_SCRIPT-$(CONFIG_LD_SCRIPT_STATIC) := uml.lds.S
+LD_SCRIPT-$(CONFIG_LD_SCRIPT_DYN) := dyn.lds.S
 
-CPP_MODE_TT := $(shell [ "$(CONFIG_MODE_TT)" = "y" ] && echo -DMODE_TT)
+CPP_MODE-$(CONFIG_MODE_TT) := -DMODE_TT
 CONFIG_KERNEL_STACK_ORDER ?= 2
 STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] )
 
@@ -122,9 +112,12 @@
 
 CPPFLAGS_vmlinux.lds = $(shell echo -U$(SUBARCH) \
        -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \
-       -DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \
+       -DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE-y) \
        -DKERNEL_STACK_SIZE=$(STACK_SIZE))
 
+#The wrappers will select whether using "malloc" or the kernel allocator.
+LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
+
 CFLAGS_vmlinux = $(LINK-y) $(LINK_WRAPS)
 define cmd_vmlinux__
        $(CC) $(CFLAGS_vmlinux) -o $@ \
@@ -135,39 +128,27 @@
        FORCE ,$^) ; rm -f linux
 endef
 
-USER_CFLAGS := $(patsubst -I%,,$(CFLAGS))
-USER_CFLAGS := $(patsubst -Derrno=kernel_errno,,$(USER_CFLAGS))
-USER_CFLAGS := $(patsubst -Dsigprocmask=kernel_sigprocmask,,$(USER_CFLAGS))
-USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
-       $(MODE_INCLUDE)
-USER_CFLAGS += $(ARCH_USER_CFLAGS)
-
-# To get a definition of F_SETSIG
-USER_CFLAGS += -D_GNU_SOURCE
-
 #When cleaning we don't include .config, so we don't include
 #TT or skas makefiles and don't clean skas_ptregs.h.
 CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/include/uml-config.h \
-       $(GEN_HEADERS) $(ARCH_DIR)/include/skas_ptregs.h \
-       $(ARCH_DIR)/util/mk_constants $(ARCH_DIR)/util/mk_task
+       $(GEN_HEADERS) $(ARCH_DIR)/include/skas_ptregs.h
 
 MRPROPER_FILES += $(SYMLINK_HEADERS) $(ARCH_SYMLINKS) \
        $(addprefix $(ARCH_DIR)/kernel/,$(KERN_SYMLINKS)) $(ARCH_DIR)/os
 
-archmrproper:
-       @:
-
 archclean:
        $(Q)$(MAKE) $(clean)=$(ARCH_DIR)/util
        @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
                -o -name '*.gcov' \) -type f -print | xargs rm -f
 
 #We need to re-preprocess this when the symlink dest changes.
-#So we touch it.
+#So we touch it when needed.
 $(ARCH_DIR)/kernel/vmlinux.lds.S: FORCE
-       @echo '  SYMLINK $@'
-       $(Q)ln -sf $(LD_SCRIPT-y) $@
-       $(Q)touch $@
+       $(Q)if [ "$(shell readlink $@)" != "$(LD_SCRIPT-y)" ]; then \
+               echo '  SYMLINK $@'; \
+               ln -sf $(LD_SCRIPT-y) $@; \
+               touch $@; \
+       fi;
 
 $(SYMLINK_HEADERS):
        @echo '  SYMLINK $@'
diff -urN linux/arch/um/Makefile-os-Linux linux/arch/um/Makefile-os-Linux
--- linux/arch/um/Makefile-os-Linux     2002/11/01 19:20:32     1.2
+++ linux/arch/um/Makefile-os-Linux     2005/01/25 04:28:07     1.3
@@ -3,4 +3,6 @@
 # Licensed under the GPL
 #
 
-core-y         += $(ARCH_DIR)/os-$(OS)/
+# To get a definition of F_SETSIG
+USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
+CFLAGS += -D_LARGEFILE64_SOURCE
diff -urN linux/arch/um/Makefile-skas linux/arch/um/Makefile-skas
--- linux/arch/um/Makefile-skas 2004/10/20 00:30:02     1.4
+++ linux/arch/um/Makefile-skas 2005/01/25 04:28:07     1.5
@@ -9,9 +9,4 @@
 CFLAGS-$(CONFIG_GPROF) += $(PROFILE)
 LINK-$(CONFIG_GPROF) += $(PROFILE)
 
-MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/kernel/skas/include
-
-LINK_SKAS = -Wl,-rpath,/lib 
-LD_SCRIPT_SKAS = dyn.lds.S
-
 GEN_HEADERS += $(ARCH_DIR)/include/skas_ptregs.h
diff -urN linux/arch/um/Makefile-tt linux/arch/um/Makefile-tt
--- linux/arch/um/Makefile-tt   2004/10/20 00:30:02     1.2
+++ linux/arch/um/Makefile-tt   2005/01/25 04:28:07     1.3
@@ -3,4 +3,3 @@
 # Licensed under the GPL
 #
 
-MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/kernel/tt/include
diff -urN linux/arch/um/Kconfig_block linux/arch/um/Kconfig_block
--- linux/arch/um/Attic/Kconfig_block   Tue Jan 25 04:28:07 2005        1.7
+++ linux/arch/um/Attic/Kconfig_block   1970/01/01 00:00:002002
@@ -1,105 +0,0 @@
-
-menu "Block Devices"
-
-config BLK_DEV_UBD
-       bool "Virtual block device"
-       help
-        The User-Mode Linux port includes a driver called UBD which will let
-        you access arbitrary files on the host computer as block devices.
-        Unless you know that you do not need such virtual block devices say
-        Y here.
-
-config BLK_DEV_UBD_SYNC
-       bool "Always do synchronous disk IO for UBD"
-       depends on BLK_DEV_UBD
-       help
-        Writes to the virtual block device are not immediately written to the 
-       host's disk; this may cause problems if, for example, the 
-       User-Mode Linux 'Virtual Machine' uses a journalling filesystem and 
-       the host computer crashes.
-
-        Synchronous operation (i.e. always writing data to the host's disk
-        immediately) is configurable on a per-UBD basis by using a special
-        kernel command line option.  Alternatively, you can say Y here to
-        turn on synchronous operation by default for all block devices.
-
-        If you're running a journalling file system (like reiserfs, for
-        example) in your virtual machine, you will want to say Y here.  If
-        you care for the safety of the data in your virtual machine, Y is a
-        wise choice too.  In all other cases (for example, if you're just
-        playing around with User-Mode Linux) you can choose N.
-
-config BLK_DEV_COW_COMMON
-       bool
-       default BLK_DEV_UBD
-
-config BLK_DEV_LOOP
-       tristate "Loopback device support"
-
-config BLK_DEV_NBD
-       tristate "Network block device support"
-       depends on NET
-
-config BLK_DEV_RAM
-       tristate "RAM disk support"
-
-config BLK_DEV_RAM_COUNT
-       int "Default number of RAM disks" if BLK_DEV_RAM
-       default "16"
-
-config BLK_DEV_RAM_SIZE
-       int "Default RAM disk size"
-       depends on BLK_DEV_RAM
-       default "4096"
-
-config BLK_DEV_INITRD
-       bool "Initial RAM disk (initrd) support"
-       depends on BLK_DEV_RAM=y
-
-#Copied directly from drivers/block/Kconfig
-config INITRAMFS_SOURCE
-       string "Source directory of cpio_list"
-       default ""
-       help
-         This can be set to either a directory containing files, etc to be
-         included in the initramfs archive, or a file containing newline
-         separated entries.
-
-         If it is a file, it should be in the following format:
-           # a comment
-           file <name> <location> <mode> <uid> <gid>
-           dir <name> <mode> <uid> <gid>
-           nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>
-
-         Where:
-           <name>      name of the file/dir/nod in the archive
-           <location>  location of the file in the current filesystem
-           <mode>      mode/permissions of the file
-           <uid>       user id (0=root)
-           <gid>       group id (0=root)
-           <dev_type>  device type (b=block, c=character)
-           <maj>       major number of nod
-           <min>       minor number of nod
-
-         If you are not sure, leave it blank.
-
-config MMAPPER
-       tristate "Example IO memory driver"
-       depends on BROKEN
-       help
-        The User-Mode Linux port can provide support for IO Memory
-        emulation with this option.  This allows a host file to be
-        specified as an I/O region on the kernel command line. That file
-        will be mapped into UML's kernel address space where a driver can
-        locate it and do whatever it wants with the memory, including
-        providing an interface to it for UML processes to use.
-
-        For more information, see
-        <http://user-mode-linux.sourceforge.net/iomem.html>.
-
-        If you'd like to be able to provide a simulated IO port space for
-        User-Mode Linux processes, say Y.  If unsure, say N.
-
-source "drivers/block/Kconfig.iosched"
-
-endmenu
diff -urN linux/arch/um/drivers/chan_user.c linux/arch/um/drivers/chan_user.c
--- linux/arch/um/drivers/chan_user.c   2005/01/13 14:05:39     1.7
+++ linux/arch/um/drivers/chan_user.c   2005/01/25 04:28:07     1.8
@@ -49,6 +49,24 @@
        return(-errno);
 }
 
+/*
+ * UML SIGWINCH handling
+ *
+ * The point of this is to handle SIGWINCH on consoles which have host ttys and
+ * relay them inside UML to whatever might be running on the console and cares
+ * about the window size (since SIGWINCH notifies about terminal size changes).
+ *
+ * So, we have a separate thread for each host tty attached to a UML device
+ * (side-issue - I'm annoyed that one thread can't have multiple controlling
+ * ttys for purposed of handling SIGWINCH, but I imagine there are other 
reasons
+ * that doesn't make any sense).
+ *
+ * SIGWINCH can't be received synchronously, so you have to set up to receive 
it
+ * as a signal.  That being the case, if you are going to wait for it, it is
+ * convenient to sit in a pause() and wait for the signal to bounce you out of
+ * it (see below for how we make sure to exit only on SIGWINCH).
+ */
+
 static void winch_handler(int sig)
 {
 }
@@ -75,9 +93,14 @@
                printk("winch_thread : failed to write synchronization "
                       "byte, err = %d\n", -count);
 
+       /* We are not using SIG_IGN on purpose, so don't fix it as I thought to
+        * do! If using SIG_IGN, the pause() call below would not stop on
+        * SIGWINCH. */
+
        signal(SIGWINCH, winch_handler);
        sigfillset(&sigs);
        sigdelset(&sigs, SIGWINCH);
+       /* Block anything else than SIGWINCH. */
        if(sigprocmask(SIG_SETMASK, &sigs, NULL) < 0){
                printk("winch_thread : sigprocmask failed, errno = %d\n", 
                       errno);
@@ -95,12 +118,18 @@
                exit(1);
        }
 
+       /* These are synchronization calls between various UML threads on the
+        * host - since they are not different kernel threads, we cannot use
+        * kernel semaphores. We don't use SysV semaphores because they are
+        * persistant. */
        count = os_read_file(pipe_fd, &c, sizeof(c));
        if(count != sizeof(c))
                printk("winch_thread : failed to read synchronization byte, "
                       "err = %d\n", -count);
 
        while(1){
+               /* This will be interrupted by SIGWINCH only, since other 
signals
+                * are blocked.*/
                pause();
 
                count = os_write_file(pipe_fd, &c, sizeof(c));
diff -urN linux/arch/um/drivers/line.c linux/arch/um/drivers/line.c
--- linux/arch/um/drivers/line.c        2005/01/13 14:05:39     1.14
+++ linux/arch/um/drivers/line.c        2005/01/25 04:28:07     1.15
@@ -593,8 +593,8 @@
                }
        }
        tty  = winch->tty;
-       line = tty->driver_data;
        if (tty != NULL) {
+               line = tty->driver_data;
                chan_window_size(&line->chan_list,
                                 &tty->winsize.ws_row, 
                                 &tty->winsize.ws_col);
diff -urN linux/arch/um/drivers/mconsole_kern.c 
linux/arch/um/drivers/mconsole_kern.c
--- linux/arch/um/drivers/mconsole_kern.c       2005/01/13 14:05:39     1.10
+++ linux/arch/um/drivers/mconsole_kern.c       2005/01/25 04:28:07     1.11
@@ -538,7 +538,7 @@
        return(0);
 }
 
-static spinlock_t notify_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(notify_spinlock);
 
 void lock_notify(void)
 {
diff -urN linux/arch/um/drivers/net_kern.c linux/arch/um/drivers/net_kern.c
--- linux/arch/um/drivers/net_kern.c    2005/01/13 14:05:39     1.13
+++ linux/arch/um/drivers/net_kern.c    2005/01/25 04:28:07     1.14
@@ -32,7 +32,7 @@
 
 #define DRIVER_NAME "uml-netdev"
 
-static spinlock_t opened_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(opened_lock);
 LIST_HEAD(opened);
 
 static int uml_net_rx(struct net_device *dev)
@@ -282,7 +282,7 @@
 #endif
 }
 
-static spinlock_t devices_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(devices_lock);
 static struct list_head devices = LIST_HEAD_INIT(devices);
 
 static struct device_driver uml_net_driver = {
diff -urN linux/arch/um/drivers/ubd_kern.c linux/arch/um/drivers/ubd_kern.c
--- linux/arch/um/drivers/ubd_kern.c    2005/01/13 14:05:39     1.19
+++ linux/arch/um/drivers/ubd_kern.c    2005/01/25 04:28:07     1.20
@@ -53,11 +53,65 @@
 #include "os.h"
 #include "mem.h"
 #include "mem_kern.h"
+#include "cow.h"
+
+enum ubd_req { UBD_READ, UBD_WRITE, UBD_MMAP };
+
+struct io_thread_req {
+       enum ubd_req op;
+       int fds[2];
+       unsigned long offsets[2];
+       unsigned long long offset;
+       unsigned long length;
+       char *buffer;
+       int sectorsize;
+       unsigned long sector_mask;
+       unsigned long long cow_offset;
+       unsigned long bitmap_words[2];
+       int map_fd;
+       unsigned long long map_offset;
+       int error;
+};
+
+extern int open_ubd_file(char *file, struct openflags *openflags,
+                        char **backing_file_out, int *bitmap_offset_out,
+                        unsigned long *bitmap_len_out, int *data_offset_out,
+                        int *create_cow_out);
+extern int create_cow_file(char *cow_file, char *backing_file,
+                          struct openflags flags, int sectorsize,
+                          int alignment, int *bitmap_offset_out,
+                          unsigned long *bitmap_len_out,
+                          int *data_offset_out);
+extern int read_cow_bitmap(int fd, void *buf, int offset, int len);
+extern void do_io(struct io_thread_req *req);
+
+static inline int ubd_test_bit(__u64 bit, unsigned char *data)
+{
+       __u64 n;
+       int bits, off;
+
+       bits = sizeof(data[0]) * 8;
+       n = bit / bits;
+       off = bit % bits;
+       return((data[n] & (1 << off)) != 0);
+}
+
+static inline void ubd_set_bit(__u64 bit, unsigned char *data)
+{
+       __u64 n;
+       int bits, off;
+
+       bits = sizeof(data[0]) * 8;
+       n = bit / bits;
+       off = bit % bits;
+       data[n] |= (1 << off);
+}
+/*End stuff from ubd_user.h*/
 
 #define DRIVER_NAME "uml-blkdev"
 
-static spinlock_t ubd_io_lock = SPIN_LOCK_UNLOCKED;
-static spinlock_t ubd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ubd_io_lock);
+static DEFINE_SPINLOCK(ubd_lock);
 
 static void (*do_ubd)(void);
 
@@ -250,7 +304,7 @@
        struct ubd *dev;
        struct openflags flags = global_openflags;
        char *backing_file;
-       int n, err;
+       int n, err, i;
 
        if(index_out) *index_out = -1;
        n = *str;
@@ -267,7 +321,7 @@
                }
 
                if(!strcmp(str, "sync")){
-                       global_openflags.s = 1;
+                       global_openflags = of_sync(global_openflags);
                        return(0);
                }
                major = simple_strtoul(str, &end, 0);
@@ -312,31 +366,47 @@
        dev = &ubd_dev[n];
        if(dev->file != NULL){
                printk(KERN_ERR "ubd_setup : device already configured\n");
-               goto out2;
+               goto out;
        }
 
-       if(index_out) *index_out = n;
+       if (index_out)
+               *index_out = n;
 
-       if (*str == 'r'){
-               flags.w = 0;
-               str++;
-       }
-       if (*str == 's'){
-               flags.s = 1;
-               str++;
-       }
-       if (*str == 'd'){
-               dev->no_cow = 1;
+       for (i = 0; i < 4; i++) {
+               switch (*str) {
+               case 'r':
+                       flags.w = 0;
+                       break;
+               case 's':
+                       flags.s = 1;
+                       break;
+               case 'd':
+                       dev->no_cow = 1;
+                       break;
+               case '=':
+                       str++;
+                       goto break_loop;
+               default:
+                       printk(KERN_ERR "ubd_setup : Expected '=' or flag 
letter (r,s or d)\n");
+                       goto out;
+               }
                str++;
        }
 
-       if(*str++ != '='){
+        if (*str == '=')
+               printk(KERN_ERR "ubd_setup : Too many flags specified\n");
+        else
                printk(KERN_ERR "ubd_setup : Expected '='\n");
-               goto out2;
-       }
+       goto out;
 
+break_loop:
        err = 0;
        backing_file = strchr(str, ',');
+
+       if (!backing_file) {
+               backing_file = strchr(str, ':');
+       }
+
        if(backing_file){
                if(dev->no_cow)
                        printk(KERN_ERR "Can't specify both 'd' and a "
@@ -349,7 +419,7 @@
        dev->file = str;
        dev->cow.file = backing_file;
        dev->boot_openflags = flags;
- out2:
+out:
        spin_unlock(&ubd_lock);
        return(err);
 }
@@ -362,17 +432,25 @@
 
 __setup("ubd", ubd_setup);
 __uml_help(ubd_setup,
-"ubd<n>=<filename>\n"
+"ubd<n><flags>=<filename>[(:|,)<filename2>]\n"
 "    This is used to associate a device with a file in the underlying\n"
-"    filesystem. Usually, there is a filesystem in the file, but \n"
+"    filesystem. When specifying two filenames, the first one is the\n"
+"    COW name and the second is the backing file name. As separator you can\n"
+"    use either a ':' or a ',': the first one allows writing things like;\n"
+"      ubd0=~/Uml/root_cow:~/Uml/root_backing_file\n"
+"    while with a ',' the shell would not expand the 2nd '~'.\n"
+"    When using only one filename, UML will detect whether to thread it like\n"
+"    a COW file or a backing file. To override this detection, add the 'd'\n"
+"    flag:\n"
+"      ubd0d=BackingFile\n"
+"    Usually, there is a filesystem in the file, but \n"
 "    that's not required. Swap devices containing swap files can be\n"
 "    specified like this. Also, a file which doesn't contain a\n"
 "    filesystem can have its contents read in the virtual \n"
-"    machine by running dd on the device. n must be in the range\n"
+"    machine by running 'dd' on the device. <n> must be in the range\n"
 "    0 to 7. Appending an 'r' to the number will cause that device\n"
 "    to be mounted read-only. For example ubd1r=./ext_fs. Appending\n"
-"    an 's' (has to be _after_ 'r', if there is one) will cause data\n"
-"    to be written to disk on the host immediately.\n\n"
+"    an 's' will cause data to be written to disk on the host immediately.\n\n"
 );
 
 static int fakehd_set = 0;
@@ -433,7 +511,7 @@
 
        do_ubd = NULL;
        intr_count++;
-       n = read_ubd_fs(thread_fd, &req, sizeof(req));
+       n = os_read_file(thread_fd, &req, sizeof(req));
        if(n != sizeof(req)){
                printk(KERN_ERR "Pid %d - spurious interrupt in ubd_handler, "
                       "err = %d\n", os_getpid(), -n);
@@ -604,6 +682,8 @@
        return 0;
 }
 
+#define ROUND_BLOCK(n) ((n + ((1 << 9) - 1)) & (-1 << 9))
+
 static int ubd_add(int n)
 {
        struct ubd *dev = &ubd_dev[n];
@@ -619,6 +699,8 @@
        if(err < 0)
                return(err);
 
+       dev->size = ROUND_BLOCK(dev->size);
+
        err = ubd_new_disk(MAJOR_NR, dev->size, n, &ubd_gendisk[n]);
        if(err) 
                return(err);
@@ -1075,7 +1157,7 @@
                err = prepare_request(req, &io_req);
                if(!err){
                        do_ubd = ubd_handler;
-                       n = write_ubd_fs(thread_fd, (char *) &io_req, 
+                       n = os_write_file(thread_fd, (char *) &io_req,
                                         sizeof(io_req));
                        if(n != sizeof(io_req))
                                printk("write to io thread failed, "
@@ -1263,6 +1345,304 @@
 
 __initcall(ubd_remapper_setup);
 
+static int same_backing_files(char *from_cmdline, char *from_cow, char *cow)
+{
+       struct uml_stat buf1, buf2;
+       int err;
+
+       if(from_cmdline == NULL) return(1);
+       if(!strcmp(from_cmdline, from_cow)) return(1);
+
+       err = os_stat_file(from_cmdline, &buf1);
+       if(err < 0){
+               printk("Couldn't stat '%s', err = %d\n", from_cmdline, -err);
+               return(1);
+       }
+       err = os_stat_file(from_cow, &buf2);
+       if(err < 0){
+               printk("Couldn't stat '%s', err = %d\n", from_cow, -err);
+               return(1);
+       }
+       if((buf1.ust_dev == buf2.ust_dev) && (buf1.ust_ino == buf2.ust_ino))
+               return(1);
+
+       printk("Backing file mismatch - \"%s\" requested,\n"
+              "\"%s\" specified in COW header of \"%s\"\n",
+              from_cmdline, from_cow, cow);
+       return(0);
+}
+
+static int backing_file_mismatch(char *file, __u64 size, time_t mtime)
+{
+       unsigned long modtime;
+       long long actual;
+       int err;
+
+       err = os_file_modtime(file, &modtime);
+       if(err < 0){
+               printk("Failed to get modification time of backing file "
+                      "\"%s\", err = %d\n", file, -err);
+               return(err);
+       }
+
+       err = os_file_size(file, &actual);
+       if(err < 0){
+               printk("Failed to get size of backing file \"%s\", "
+                      "err = %d\n", file, -err);
+               return(err);
+       }
+
+       if(actual != size){
+               /*__u64 can be a long on AMD64 and with %lu GCC complains; so
+                * the typecast.*/
+               printk("Size mismatch (%llu vs %llu) of COW header vs backing "
+                      "file\n", (unsigned long long) size, actual);
+               return(-EINVAL);
+       }
+       if(modtime != mtime){
+               printk("mtime mismatch (%ld vs %ld) of COW header vs backing "
+                      "file\n", mtime, modtime);
+               return(-EINVAL);
+       }
+       return(0);
+}
+
+int read_cow_bitmap(int fd, void *buf, int offset, int len)
+{
+       int err;
+
+       err = os_seek_file(fd, offset);
+       if(err < 0)
+               return(err);
+
+       err = os_read_file(fd, buf, len);
+       if(err < 0)
+               return(err);
+
+       return(0);
+}
+
+int open_ubd_file(char *file, struct openflags *openflags,
+                 char **backing_file_out, int *bitmap_offset_out,
+                 unsigned long *bitmap_len_out, int *data_offset_out,
+                 int *create_cow_out)
+{
+       time_t mtime;
+       unsigned long long size;
+       __u32 version, align;
+       char *backing_file;
+       int fd, err, sectorsize, same, mode = 0644;
+
+       fd = os_open_file(file, *openflags, mode);
+       if(fd < 0){
+               if((fd == -ENOENT) && (create_cow_out != NULL))
+                       *create_cow_out = 1;
+                if(!openflags->w ||
+                   ((fd != -EROFS) && (fd != -EACCES))) return(fd);
+               openflags->w = 0;
+               fd = os_open_file(file, *openflags, mode);
+               if(fd < 0)
+                       return(fd);
+        }
+
+       err = os_lock_file(fd, openflags->w);
+       if(err < 0){
+               printk("Failed to lock '%s', err = %d\n", file, -err);
+               goto out_close;
+       }
+
+       if(backing_file_out == NULL) return(fd);
+
+       err = read_cow_header(file_reader, &fd, &version, &backing_file, &mtime,
+                             &size, &sectorsize, &align, bitmap_offset_out);
+       if(err && (*backing_file_out != NULL)){
+               printk("Failed to read COW header from COW file \"%s\", "
+                      "errno = %d\n", file, -err);
+               goto out_close;
+       }
+       if(err) return(fd);
+
+       if(backing_file_out == NULL) return(fd);
+
+       same = same_backing_files(*backing_file_out, backing_file, file);
+
+       if(!same && !backing_file_mismatch(*backing_file_out, size, mtime)){
+               printk("Switching backing file to '%s'\n", *backing_file_out);
+               err = write_cow_header(file, fd, *backing_file_out,
+                                      sectorsize, align, &size);
+               if(err){
+                       printk("Switch failed, errno = %d\n", -err);
+                       return(err);
+               }
+       }
+       else {
+               *backing_file_out = backing_file;
+               err = backing_file_mismatch(*backing_file_out, size, mtime);
+               if(err) goto out_close;
+       }
+
+       cow_sizes(version, size, sectorsize, align, *bitmap_offset_out,
+                 bitmap_len_out, data_offset_out);
+
+        return(fd);
+ out_close:
+       os_close_file(fd);
+       return(err);
+}
+
+int create_cow_file(char *cow_file, char *backing_file, struct openflags flags,
+                   int sectorsize, int alignment, int *bitmap_offset_out,
+                   unsigned long *bitmap_len_out, int *data_offset_out)
+{
+       int err, fd;
+
+       flags.c = 1;
+       fd = open_ubd_file(cow_file, &flags, NULL, NULL, NULL, NULL, NULL);
+       if(fd < 0){
+               err = fd;
+               printk("Open of COW file '%s' failed, errno = %d\n", cow_file,
+                      -err);
+               goto out;
+       }
+
+       err = init_cow_file(fd, cow_file, backing_file, sectorsize, alignment,
+                           bitmap_offset_out, bitmap_len_out,
+                           data_offset_out);
+       if(!err)
+               return(fd);
+       os_close_file(fd);
+ out:
+       return(err);
+}
+
+static int update_bitmap(struct io_thread_req *req)
+{
+       int n;
+
+       if(req->cow_offset == -1)
+               return(0);
+
+       n = os_seek_file(req->fds[1], req->cow_offset);
+       if(n < 0){
+               printk("do_io - bitmap lseek failed : err = %d\n", -n);
+               return(1);
+       }
+
+       n = os_write_file(req->fds[1], &req->bitmap_words,
+                         sizeof(req->bitmap_words));
+       if(n != sizeof(req->bitmap_words)){
+               printk("do_io - bitmap update failed, err = %d fd = %d\n", -n,
+                      req->fds[1]);
+               return(1);
+       }
+
+       return(0);
+}
+
+void do_io(struct io_thread_req *req)
+{
+       char *buf;
+       unsigned long len;
+       int n, nsectors, start, end, bit;
+       int err;
+       __u64 off;
+
+       if(req->op == UBD_MMAP){
+               /* Touch the page to force the host to do any necessary IO to
+                * get it into memory
+                */
+               n = *((volatile int *) req->buffer);
+               req->error = update_bitmap(req);
+               return;
+       }
+
+       nsectors = req->length / req->sectorsize;
+       start = 0;
+       do {
+               bit = ubd_test_bit(start, (unsigned char *) &req->sector_mask);
+               end = start;
+               while((end < nsectors) &&
+                     (ubd_test_bit(end, (unsigned char *)
+                                   &req->sector_mask) == bit))
+                       end++;
+
+               off = req->offset + req->offsets[bit] +
+                       start * req->sectorsize;
+               len = (end - start) * req->sectorsize;
+               buf = &req->buffer[start * req->sectorsize];
+
+               err = os_seek_file(req->fds[bit], off);
+               if(err < 0){
+                       printk("do_io - lseek failed : err = %d\n", -err);
+                       req->error = 1;
+                       return;
+               }
+               if(req->op == UBD_READ){
+                       n = 0;
+                       do {
+                               buf = &buf[n];
+                               len -= n;
+                               n = os_read_file(req->fds[bit], buf, len);
+                               if (n < 0) {
+                                       printk("do_io - read failed, err = %d "
+                                              "fd = %d\n", -n, req->fds[bit]);
+                                       req->error = 1;
+                                       return;
+                               }
+                       } while((n < len) && (n != 0));
+                       if (n < len) memset(&buf[n], 0, len - n);
+               }
+               else {
+                       n = os_write_file(req->fds[bit], buf, len);
+                       if(n != len){
+                               printk("do_io - write failed err = %d "
+                                      "fd = %d\n", -n, req->fds[bit]);
+                               req->error = 1;
+                               return;
+                       }
+               }
+
+               start = end;
+       } while(start < nsectors);
+
+       req->error = update_bitmap(req);
+}
+
+/* Changed in start_io_thread, which is serialized by being called only
+ * from ubd_init, which is an initcall.
+ */
+int kernel_fd = -1;
+
+/* Only changed by the io thread */
+int io_count = 0;
+
+int io_thread(void *arg)
+{
+       struct io_thread_req req;
+       int n;
+
+       ignore_sigwinch_sig();
+       while(1){
+               n = os_read_file(kernel_fd, &req, sizeof(req));
+               if(n != sizeof(req)){
+                       if(n < 0)
+                               printk("io_thread - read failed, fd = %d, "
+                                      "err = %d\n", kernel_fd, -n);
+                       else {
+                               printk("io_thread - short read, fd = %d, "
+                                      "length = %d\n", kernel_fd, n);
+                       }
+                       continue;
+               }
+               io_count++;
+               do_io(&req);
+               n = os_write_file(kernel_fd, &req, sizeof(req));
+               if(n != sizeof(req))
+                       printk("io_thread - write failed, fd = %d, err = %d\n",
+                              kernel_fd, -n);
+       }
+}
+
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically
diff -urN linux/arch/um/drivers/ubd_user.c linux/arch/um/drivers/ubd_user.c
--- linux/arch/um/drivers/ubd_user.c    2005/01/13 14:05:39     1.5
+++ linux/arch/um/drivers/ubd_user.c    2005/01/25 04:28:07     1.6
@@ -26,311 +26,9 @@
 #include <endian.h>
 #include <byteswap.h>
 
-static int same_backing_files(char *from_cmdline, char *from_cow, char *cow)
+void ignore_sigwinch_sig(void)
 {
-       struct uml_stat buf1, buf2;
-       int err;
-
-       if(from_cmdline == NULL) return(1);
-       if(!strcmp(from_cmdline, from_cow)) return(1);
-
-       err = os_stat_file(from_cmdline, &buf1);
-       if(err < 0){
-               printk("Couldn't stat '%s', err = %d\n", from_cmdline, -err);
-               return(1);
-       }
-       err = os_stat_file(from_cow, &buf2);
-       if(err < 0){
-               printk("Couldn't stat '%s', err = %d\n", from_cow, -err);
-               return(1);
-       }
-       if((buf1.ust_dev == buf2.ust_dev) && (buf1.ust_ino == buf2.ust_ino))
-               return(1);
-
-       printk("Backing file mismatch - \"%s\" requested,\n"
-              "\"%s\" specified in COW header of \"%s\"\n",
-              from_cmdline, from_cow, cow);
-       return(0);
-}
-
-static int backing_file_mismatch(char *file, __u64 size, time_t mtime)
-{
-       unsigned long modtime;
-       long long actual;
-       int err;
-
-       err = os_file_modtime(file, &modtime);
-       if(err < 0){
-               printk("Failed to get modification time of backing file "
-                      "\"%s\", err = %d\n", file, -err);
-               return(err);
-       }
-
-       err = os_file_size(file, &actual);
-       if(err < 0){
-               printk("Failed to get size of backing file \"%s\", "
-                      "err = %d\n", file, -err);
-               return(err);
-       }
-
-       if(actual != size){
-               printk("Size mismatch (%ld vs %ld) of COW header vs backing "
-                      "file\n", size, actual);
-               return(-EINVAL);
-       }
-       if(modtime != mtime){
-               printk("mtime mismatch (%ld vs %ld) of COW header vs backing "
-                      "file\n", mtime, modtime);
-               return(-EINVAL);
-       }
-       return(0);
-}
-
-int read_cow_bitmap(int fd, void *buf, int offset, int len)
-{
-       int err;
-
-       err = os_seek_file(fd, offset);
-       if(err < 0)
-               return(err);
-
-       err = os_read_file(fd, buf, len);
-       if(err < 0)
-               return(err);
-
-       return(0);
-}
-
-int open_ubd_file(char *file, struct openflags *openflags, 
-                 char **backing_file_out, int *bitmap_offset_out, 
-                 unsigned long *bitmap_len_out, int *data_offset_out, 
-                 int *create_cow_out)
-{
-       time_t mtime;
-       unsigned long long size;
-       __u32 version, align;
-       char *backing_file;
-       int fd, err, sectorsize, same, mode = 0644;
-
-       fd = os_open_file(file, *openflags, mode);
-       if(fd < 0){
-               if((fd == -ENOENT) && (create_cow_out != NULL))
-                       *create_cow_out = 1;
-                if(!openflags->w ||
-                   ((errno != EROFS) && (errno != EACCES))) return(-errno);
-               openflags->w = 0;
-               fd = os_open_file(file, *openflags, mode);
-               if(fd < 0)
-                       return(fd);
-        }
-
-       err = os_lock_file(fd, openflags->w);
-       if(err < 0){
-               printk("Failed to lock '%s', err = %d\n", file, -err);
-               goto out_close;
-       }
-
-       if(backing_file_out == NULL) return(fd);
-
-       err = read_cow_header(file_reader, &fd, &version, &backing_file, &mtime,
-                             &size, &sectorsize, &align, bitmap_offset_out);
-       if(err && (*backing_file_out != NULL)){
-               printk("Failed to read COW header from COW file \"%s\", "
-                      "errno = %d\n", file, -err);
-               goto out_close;
-       }
-       if(err) return(fd);
-
-       if(backing_file_out == NULL) return(fd);
-       
-       same = same_backing_files(*backing_file_out, backing_file, file);
-
-       if(!same && !backing_file_mismatch(*backing_file_out, size, mtime)){
-               printk("Switching backing file to '%s'\n", *backing_file_out);
-               err = write_cow_header(file, fd, *backing_file_out,
-                                      sectorsize, align, &size);
-               if(err){
-                       printk("Switch failed, errno = %d\n", -err);
-                       return(err);
-               }
-       }
-       else {
-               *backing_file_out = backing_file;
-               err = backing_file_mismatch(*backing_file_out, size, mtime);
-               if(err) goto out_close;
-       }
-
-       cow_sizes(version, size, sectorsize, align, *bitmap_offset_out,
-                 bitmap_len_out, data_offset_out);
-
-        return(fd);
- out_close:
-       os_close_file(fd);
-       return(err);
-}
-
-int create_cow_file(char *cow_file, char *backing_file, struct openflags flags,
-                   int sectorsize, int alignment, int *bitmap_offset_out,
-                   unsigned long *bitmap_len_out, int *data_offset_out)
-{
-       int err, fd;
-
-       flags.c = 1;
-       fd = open_ubd_file(cow_file, &flags, NULL, NULL, NULL, NULL, NULL);
-       if(fd < 0){
-               err = fd;
-               printk("Open of COW file '%s' failed, errno = %d\n", cow_file,
-                      -err);
-               goto out;
-       }
-
-       err = init_cow_file(fd, cow_file, backing_file, sectorsize, alignment,
-                           bitmap_offset_out, bitmap_len_out,
-                           data_offset_out);
-       if(!err)
-               return(fd);
-       os_close_file(fd);
- out:
-       return(err);
-}
-
-/* XXX Just trivial wrappers around os_read_file and os_write_file */
-int read_ubd_fs(int fd, void *buffer, int len)
-{
-       return(os_read_file(fd, buffer, len));
-}
-
-int write_ubd_fs(int fd, char *buffer, int len)
-{
-       return(os_write_file(fd, buffer, len));
-}
-
-static int update_bitmap(struct io_thread_req *req)
-{
-       int n;
-
-       if(req->cow_offset == -1)
-               return(0);
-
-       n = os_seek_file(req->fds[1], req->cow_offset);
-       if(n < 0){
-               printk("do_io - bitmap lseek failed : err = %d\n", -n);
-               return(1);
-       }
-
-       n = os_write_file(req->fds[1], &req->bitmap_words,
-                         sizeof(req->bitmap_words));
-       if(n != sizeof(req->bitmap_words)){
-               printk("do_io - bitmap update failed, err = %d fd = %d\n", -n,
-                      req->fds[1]);
-               return(1);
-       }
-
-       return(0);
-}
-
-void do_io(struct io_thread_req *req)
-{
-       char *buf;
-       unsigned long len;
-       int n, nsectors, start, end, bit;
-       int err;
-       __u64 off;
-
-       if(req->op == UBD_MMAP){
-               /* Touch the page to force the host to do any necessary IO to
-                * get it into memory
-                */
-               n = *((volatile int *) req->buffer);
-               req->error = update_bitmap(req);
-               return;
-       }
-
-       nsectors = req->length / req->sectorsize;
-       start = 0;
-       do {
-               bit = ubd_test_bit(start, (unsigned char *) &req->sector_mask);
-               end = start;
-               while((end < nsectors) && 
-                     (ubd_test_bit(end, (unsigned char *) 
-                                   &req->sector_mask) == bit))
-                       end++;
-
-               off = req->offset + req->offsets[bit] + 
-                       start * req->sectorsize;
-               len = (end - start) * req->sectorsize;
-               buf = &req->buffer[start * req->sectorsize];
-
-               err = os_seek_file(req->fds[bit], off);
-               if(err < 0){
-                       printk("do_io - lseek failed : err = %d\n", -err);
-                       req->error = 1;
-                       return;
-               }
-               if(req->op == UBD_READ){
-                       n = 0;
-                       do {
-                               buf = &buf[n];
-                               len -= n;
-                               n = os_read_file(req->fds[bit], buf, len);
-                               if (n < 0) {
-                                       printk("do_io - read failed, err = %d "
-                                              "fd = %d\n", -n, req->fds[bit]);
-                                       req->error = 1;
-                                       return;
-                               }
-                       } while((n < len) && (n != 0));
-                       if (n < len) memset(&buf[n], 0, len - n);
-               }
-               else {
-                       n = os_write_file(req->fds[bit], buf, len);
-                       if(n != len){
-                               printk("do_io - write failed err = %d "
-                                      "fd = %d\n", -n, req->fds[bit]);
-                               req->error = 1;
-                               return;
-                       }
-               }
-
-               start = end;
-       } while(start < nsectors);
-
-       req->error = update_bitmap(req);
-}
-
-/* Changed in start_io_thread, which is serialized by being called only
- * from ubd_init, which is an initcall.
- */
-int kernel_fd = -1;
-
-/* Only changed by the io thread */
-int io_count = 0;
-
-int io_thread(void *arg)
-{
-       struct io_thread_req req;
-       int n;
-
        signal(SIGWINCH, SIG_IGN);
-       while(1){
-               n = os_read_file(kernel_fd, &req, sizeof(req));
-               if(n != sizeof(req)){
-                       if(n < 0)
-                               printk("io_thread - read failed, fd = %d, "
-                                      "err = %d\n", kernel_fd, -n);
-                       else {
-                               printk("io_thread - short read, fd = %d, "
-                                      "length = %d\n", kernel_fd, n);
-                       }
-                       continue;
-               }
-               io_count++;
-               do_io(&req);
-               n = os_write_file(kernel_fd, &req, sizeof(req));
-               if(n != sizeof(req))
-                       printk("io_thread - write failed, fd = %d, err = %d\n",
-                              kernel_fd, -n);
-       }
 }
 
 int start_io_thread(unsigned long sp, int *fd_out)
diff -urN linux/arch/um/drivers/xterm.c linux/arch/um/drivers/xterm.c
--- linux/arch/um/drivers/xterm.c       2005/01/13 14:05:39     1.8
+++ linux/arch/um/drivers/xterm.c       2005/01/25 04:28:07     1.9
@@ -97,6 +97,13 @@
        if(os_access(argv[4], OS_ACC_X_OK) < 0)
                argv[4] = "port-helper";
 
+       /* Check that DISPLAY is set, this doesn't guarantee the xterm
+        * will work but w/o it we can be pretty sure it won't. */
+       if (!getenv("DISPLAY")) {
+               printk("xterm_open: $DISPLAY not set.\n");
+               return -ENODEV;
+       }
+
        fd = mkstemp(file);
        if(fd < 0){
                printk("xterm_open : mkstemp failed, errno = %d\n", errno);
diff -urN linux/arch/um/drivers/xterm_kern.c linux/arch/um/drivers/xterm_kern.c
--- linux/arch/um/drivers/xterm_kern.c  2004/11/15 11:49:21     1.5
+++ linux/arch/um/drivers/xterm_kern.c  2005/01/25 04:28:07     1.6
@@ -46,6 +46,8 @@
                printk(KERN_ERR "xterm_fd : failed to allocate xterm_wait\n");
                return(-ENOMEM);
        }
+
+       /* This is a locked semaphore... */
        *data = ((struct xterm_wait) 
                { .sem          = __SEMAPHORE_INITIALIZER(data->sem, 0),
                  .fd           = socket,
@@ -55,12 +57,17 @@
        err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt, 
                             SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, 
                             "xterm", data);
-       if(err){
+       if (err){
                printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, "
                       "err = %d\n",  err);
                ret = err;
                goto out;
        }
+
+       /* ... so here we wait for an xterm interrupt.
+        *
+        * XXX Note, if the xterm doesn't work for some reason (eg. DISPLAY
+        * isn't set) this will hang... */
        down(&data->sem);
 
        free_irq_by_irq_and_dev(XTERM_IRQ, data);
diff -urN linux/arch/um/include/init.h linux/arch/um/include/init.h
--- linux/arch/um/include/init.h        2002/10/31 20:59:34     1.1
+++ linux/arch/um/include/init.h        2005/01/25 04:28:07     1.2
@@ -40,9 +40,18 @@
 typedef int (*initcall_t)(void);
 typedef void (*exitcall_t)(void);
 
-#define __init          __attribute__ ((__section__ (".text.init")))
-#define __exit          __attribute__ ((unused, __section__(".text.exit")))
-#define __initdata      __attribute__ ((__section__ (".data.init")))
+/* These are for everybody (although not all archs will actually
+   discard it in modules) */
+#define __init         __attribute__ ((__section__ (".init.text")))
+#define __initdata     __attribute__ ((__section__ (".init.data")))
+#define __exitdata     __attribute__ ((__section__(".exit.data")))
+#define __exit_call    __attribute_used__ __attribute__ ((__section__ 
(".exitcall.exit")))
+
+#ifdef MODULE
+#define __exit         __attribute__ ((__section__(".exit.text")))
+#else
+#define __exit         __attribute_used__ __attribute__ 
((__section__(".exit.text")))
+#endif
 
 #endif
 
@@ -94,11 +103,20 @@
  * Mark functions and data as being only used at initialization
  * or exit time.
  */
-#define __uml_init_setup       __attribute__ ((unused,__section__ 
(".uml.setup.init")))
-#define __uml_setup_help       __attribute__ ((unused,__section__ 
(".uml.help.init")))
-#define __uml_init_call                __attribute__ ((unused,__section__ 
(".uml.initcall.init")))
-#define __uml_postsetup_call   __attribute__ ((unused,__section__ 
(".uml.postsetup.init")))
-#define __uml_exit_call                __attribute__ ((unused,__section__ 
(".uml.exitcall.exit")))
+#define __uml_init_setup       __attribute_used__ __attribute__ ((__section__ 
(".uml.setup.init")))
+#define __uml_setup_help       __attribute_used__ __attribute__ ((__section__ 
(".uml.help.init")))
+#define __uml_init_call                __attribute_used__ __attribute__ 
((__section__ (".uml.initcall.init")))
+#define __uml_postsetup_call   __attribute_used__ __attribute__ ((__section__ 
(".uml.postsetup.init")))
+#define __uml_exit_call                __attribute_used__ __attribute__ 
((__section__ (".uml.exitcall.exit")))
+
+#ifndef __KERNEL__
+
+#define __initcall(fn) static initcall_t __initcall_##fn __init_call = fn
+#define __exitcall(fn) static exitcall_t __exitcall_##fn __exit_call = fn
+
+#define __init_call __attribute__ ((unused,__section__ (".initcall.init")))
+
+#endif
 
 #endif /* _LINUX_UML_INIT_H */
 
diff -urN linux/arch/um/include/ubd_user.h linux/arch/um/include/ubd_user.h
--- linux/arch/um/include/ubd_user.h    2004/09/19 12:30:07     1.2
+++ linux/arch/um/include/ubd_user.h    2005/01/25 04:28:07     1.3
@@ -7,63 +7,10 @@
 #ifndef __UM_UBD_USER_H
 #define __UM_UBD_USER_H
 
-#include "os.h"
-
-enum ubd_req { UBD_READ, UBD_WRITE, UBD_MMAP };
-
-struct io_thread_req {
-       enum ubd_req op;
-       int fds[2];
-       unsigned long offsets[2];
-       unsigned long long offset;
-       unsigned long length;
-       char *buffer;
-       int sectorsize;
-       unsigned long sector_mask;
-       unsigned long long cow_offset;
-       unsigned long bitmap_words[2];
-       int map_fd;
-       unsigned long long map_offset;
-       int error;
-};
-
-extern int open_ubd_file(char *file, struct openflags *openflags, 
-                        char **backing_file_out, int *bitmap_offset_out, 
-                        unsigned long *bitmap_len_out, int *data_offset_out,
-                        int *create_cow_out);
-extern int create_cow_file(char *cow_file, char *backing_file, 
-                          struct openflags flags, int sectorsize, 
-                          int alignment, int *bitmap_offset_out,
-                          unsigned long *bitmap_len_out,
-                          int *data_offset_out);
-extern int read_cow_bitmap(int fd, void *buf, int offset, int len);
-extern int read_ubd_fs(int fd, void *buffer, int len);
-extern int write_ubd_fs(int fd, char *buffer, int len);
+extern void ignore_sigwinch_sig(void);
 extern int start_io_thread(unsigned long sp, int *fds_out);
-extern void do_io(struct io_thread_req *req);
-
-static inline int ubd_test_bit(__u64 bit, unsigned char *data)
-{
-       __u64 n;
-       int bits, off;
-
-       bits = sizeof(data[0]) * 8;
-       n = bit / bits;
-       off = bit % bits;
-       return((data[n] & (1 << off)) != 0);
-}
-
-static inline void ubd_set_bit(__u64 bit, unsigned char *data)
-{
-       __u64 n;
-       int bits, off;
-
-       bits = sizeof(data[0]) * 8;
-       n = bit / bits;
-       off = bit % bits;
-       data[n] |= (1 << off);
-}
-
+extern int io_thread(void *arg);
+extern int kernel_fd;
 
 #endif
 
diff -urN linux/arch/um/include/umn.h linux/arch/um/include/umn.h
--- linux/arch/um/include/Attic/umn.h   Tue Jan 25 04:28:07 2005        1.1
+++ linux/arch/um/include/Attic/umn.h   1970/01/01 00:00:002002
@@ -1,27 +0,0 @@
-/* 
- * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#ifndef __UMN_H
-#define __UMN_H
-
-extern int open_umn_tty(int *slave_out, int *slipno_out);
-extern void close_umn_tty(int master, int slave);
-extern int umn_send_packet(int fd, void *data, int len);
-extern int set_umn_addr(int fd, char *addr, char *ptp_addr);
-extern void slip_unesc(unsigned char s);
-extern void umn_read(int fd);
-
-#endif
-
-/*
- * 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 -urN linux/arch/um/include/sysdep-i386/checksum.h 
linux/arch/um/include/sysdep-i386/checksum.h
--- linux/arch/um/include/sysdep-i386/checksum.h        2004/10/20 00:30:02     
1.4
+++ linux/arch/um/include/sysdep-i386/checksum.h        2005/01/25 04:28:07     
1.5
@@ -31,10 +31,10 @@
  * better 64-bit) boundary
  */
 
-unsigned int csum_partial_copy_to(const char *src, char *dst, int len, 
-                                 int sum, int *err_ptr);
-unsigned int csum_partial_copy_from(const char *src, char *dst, int len, 
-                                   int sum, int *err_ptr);
+unsigned int csum_partial_copy_to(const unsigned char *src, unsigned char *dst,
+                                 int len, int sum, int *err_ptr);
+unsigned int csum_partial_copy_from(const unsigned char *src, unsigned char 
*dst,
+                                   int len, int sum, int *err_ptr);
 
 /*
  *     Note: when you get a NULL pointer exception here this means someone
@@ -45,7 +45,7 @@
  */
 
 static __inline__
-unsigned int csum_partial_copy_nocheck(const char *src, char *dst,
+unsigned int csum_partial_copy_nocheck(const unsigned char *src, unsigned char 
*dst,
                                       int len, int sum)
 {
        memcpy(dst, src, len);
@@ -53,7 +53,7 @@
 }
 
 static __inline__
-unsigned int csum_partial_copy_from_user(const char *src, char *dst,
+unsigned int csum_partial_copy_from_user(const unsigned char *src, unsigned 
char *dst,
                                         int len, int sum, int *err_ptr)
 {
        return csum_partial_copy_from(src, dst, len, sum, err_ptr);
@@ -67,7 +67,7 @@
  */
 
 #define csum_partial_copy_fromuser csum_partial_copy_from_user
-unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum);
+unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst, 
int len, int sum);
 
 /*
  *     This is a version of ip_compute_csum() optimized for IP headers,
@@ -192,9 +192,9 @@
  *     Copy and checksum to user
  */
 #define HAVE_CSUM_COPY_USER
-static __inline__ unsigned int csum_and_copy_to_user(const char *src, 
-                                                    char *dst, int len,
-                                                    int sum, int *err_ptr)
+static __inline__ unsigned int csum_and_copy_to_user(const unsigned char *src,
+                                                    unsigned char *dst,
+                                                    int len, int sum, int 
*err_ptr)
 {
        if (access_ok(VERIFY_WRITE, dst, len))
                return(csum_partial_copy_to(src, dst, len, sum, err_ptr));
diff -urN linux/arch/um/include/sysdep-i386/ptrace_user.h 
linux/arch/um/include/sysdep-i386/ptrace_user.h
--- linux/arch/um/include/sysdep-i386/ptrace_user.h     2002/10/31 20:59:34     
1.1
+++ linux/arch/um/include/sysdep-i386/ptrace_user.h     2005/01/25 04:28:07     
1.2
@@ -33,6 +33,9 @@
 #define FP_FRAME_SIZE (27)
 #define FPX_FRAME_SIZE (128)
 
+#define MAX_REG_OFFSET (FRAME_SIZE_OFFSET)
+#define MAX_REG_NR (FRAME_SIZE)
+
 #ifdef PTRACE_GETREGS
 #define UM_HAVE_GETREGS
 #endif
diff -urN linux/arch/um/kernel/checksum.c linux/arch/um/kernel/checksum.c
--- linux/arch/um/kernel/checksum.c     2005/01/13 14:05:40     1.3
+++ linux/arch/um/kernel/checksum.c     2005/01/25 04:28:07     1.4
@@ -2,17 +2,17 @@
 #include "linux/errno.h"
 #include "linux/module.h"
 
-unsigned int arch_csum_partial(const char *buff, int len, int sum);
+unsigned int arch_csum_partial(const unsigned char *buff, int len, int sum);
 
-unsigned int csum_partial(char *buff, int len, int sum)
+unsigned int csum_partial(unsigned char *buff, int len, int sum)
 {
        return arch_csum_partial(buff, len, sum);
 }
 
 EXPORT_SYMBOL(csum_partial);
 
-unsigned int csum_partial_copy_to(const char *src, char __user *dst, int len,
-                                 int sum, int *err_ptr)
+unsigned int csum_partial_copy_to(const unsigned char *src, char __user *dst,
+                               int len, int sum, int *err_ptr)
 {
        if(copy_to_user(dst, src, len)){
                *err_ptr = -EFAULT;
@@ -22,8 +22,8 @@
        return(arch_csum_partial(src, len, sum));
 }
 
-unsigned int csum_partial_copy_from(const char __user *src, char *dst, int len,
-                                   int sum, int *err_ptr)
+unsigned int csum_partial_copy_from(const unsigned char __user *src, char *dst,
+                               int len, int sum, int *err_ptr)
 {
        if(copy_from_user(dst, src, len)){
                *err_ptr = -EFAULT;
diff -urN linux/arch/um/kernel/dyn.lds.S linux/arch/um/kernel/dyn.lds.S
--- linux/arch/um/kernel/dyn.lds.S      2004/11/15 11:49:21     1.2
+++ linux/arch/um/kernel/dyn.lds.S      2005/01/25 04:28:07     1.3
@@ -7,8 +7,11 @@
 
 SECTIONS
 {
+  PROVIDE (__executable_start = START);
   . = START + SIZEOF_HEADERS;
   .interp         : { *(.interp) }
+  /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
+   * is remapped.*/
   __binary_start = .;
   . = ALIGN(4096);             /* Init code and data */
   _stext = .;
diff -urN linux/arch/um/kernel/irq.c linux/arch/um/kernel/irq.c
--- linux/arch/um/kernel/irq.c  2005/01/13 14:05:40     1.18
+++ linux/arch/um/kernel/irq.c  2005/01/25 04:28:07     1.19
@@ -45,7 +45,7 @@
 
        if (i == 0) {
                seq_printf(p, "           ");
-               for_each_cpu(j)
+               for_each_online_cpu(j)
                        seq_printf(p, "CPU%d       ",j);
                seq_putc(p, '\n');
        }
@@ -59,7 +59,7 @@
 #ifndef CONFIG_SMP
                seq_printf(p, "%10u ", kstat_irqs(i));
 #else
-               for_each_cpu(j)
+               for_each_online_cpu(j)
                        seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
 #endif
                seq_printf(p, " %14s", irq_desc[i].handler->typename);
@@ -109,7 +109,7 @@
 EXPORT_SYMBOL(um_request_irq);
 EXPORT_SYMBOL(reactivate_fd);
 
-static spinlock_t irq_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(irq_spinlock);
 
 unsigned long irq_lock(void)
 {
diff -urN linux/arch/um/kernel/main.c linux/arch/um/kernel/main.c
--- linux/arch/um/kernel/main.c 2005/01/13 14:05:40     1.4
+++ linux/arch/um/kernel/main.c 2005/01/25 04:28:07     1.5
@@ -154,13 +154,21 @@
        do_uml_initcalls();
        ret = linux_main(argc, argv);
 
+       /* Disable SIGPROF - I have no idea why libc doesn't do this or turn
+        * off the profiling time, but UML dies with a SIGPROF just before
+        * exiting when profiling is active.
+        */
+       change_sig(SIGPROF, 0);
+
        /* Reboot */
        if(ret){
                int err;
 
                printf("\n");
+
                /* stop timers and set SIG*ALRM to be ignored */
                disable_timer();
+
                /* disable SIGIO for the fds and set SIGIO to be ignored */
                err = deactivate_all_fds();
                if(err)
diff -urN linux/arch/um/kernel/process.c linux/arch/um/kernel/process.c
--- linux/arch/um/kernel/process.c      2005/01/13 14:05:40     1.9
+++ linux/arch/um/kernel/process.c      2005/01/25 04:28:07     1.10
@@ -371,9 +371,9 @@
                kill(target, SIGIO);
 }
 
-int can_do_skas(void)
-{
 #ifdef UML_CONFIG_MODE_SKAS
+static inline int check_skas3_ptrace_support(void)
+{
        struct ptrace_faultinfo fi;
        void *stack;
        int pid, n, ret = 1;
@@ -382,29 +382,46 @@
        pid = start_ptraced_child(&stack);
 
        n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi);
-       if(n < 0){
+       if (n < 0) {
                if(errno == EIO)
                        printf("not found\n");
-               else printf("No (unexpected errno - %d)\n", errno);
+               else {
+                       perror("not found");
+               }
                ret = 0;
+       } else {
+               printf("found\n");
        }
-       else printf("found\n");
 
        init_registers(pid);
        stop_ptraced_child(pid, stack, 1, 1);
 
+       return(ret);
+}
+
+int can_do_skas(void)
+{
+       int ret = 1;
+
        printf("Checking for /proc/mm...");
-       if(os_access("/proc/mm", OS_ACC_W_OK) < 0){
+       if (os_access("/proc/mm", OS_ACC_W_OK) < 0) {
                printf("not found\n");
                ret = 0;
+               goto out;
+       } else {
+               printf("found\n");
        }
-       else printf("found\n");
 
-       return(ret);
+       ret = check_skas3_ptrace_support();
+out:
+       return ret;
+}
 #else
+int can_do_skas(void)
+{
        return(0);
-#endif
 }
+#endif
 
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
diff -urN linux/arch/um/kernel/ptrace.c linux/arch/um/kernel/ptrace.c
--- linux/arch/um/kernel/ptrace.c       2005/01/13 14:05:40     1.11
+++ linux/arch/um/kernel/ptrace.c       2005/01/25 04:28:07     1.12
@@ -94,7 +94,7 @@
                        break;
 
                tmp = 0;  /* Default return condition */
-               if(addr < FRAME_SIZE_OFFSET){
+               if(addr < MAX_REG_OFFSET){
                        tmp = getreg(child, addr);
                }
                else if((addr >= offsetof(struct user, u_debugreg[0])) &&
@@ -122,10 +122,11 @@
                if ((addr & 3) || addr < 0)
                        break;
 
-               if (addr < FRAME_SIZE_OFFSET) {
+               if (addr < MAX_REG_OFFSET) {
                        ret = putreg(child, addr, data);
                        break;
                }
+#if 0 /* XXX x86_64 */
                else if((addr >= offsetof(struct user, u_debugreg[0])) &&
                        (addr <= offsetof(struct user, u_debugreg[7]))){
                          addr -= offsetof(struct user, u_debugreg[0]);
@@ -134,6 +135,7 @@
                          child->thread.arch.debugregs[addr] = data;
                          ret = 0;
                }
+#endif
 
                break;
 
@@ -196,11 +198,11 @@
 #ifdef PTRACE_GETREGS
        case PTRACE_GETREGS: { /* Get all gp regs from the child. */
                if (!access_ok(VERIFY_WRITE, (unsigned long *)data, 
-                              FRAME_SIZE_OFFSET)) {
+                              MAX_REG_OFFSET)) {
                        ret = -EIO;
                        break;
                }
-               for ( i = 0; i < FRAME_SIZE_OFFSET; i += sizeof(long) ) {
+               for ( i = 0; i < MAX_REG_OFFSET; i += sizeof(long) ) {
                        __put_user(getreg(child, i),
                                   (unsigned long __user *) data);
                        data += sizeof(long);
@@ -213,11 +215,11 @@
        case PTRACE_SETREGS: { /* Set all gp regs in the child. */
                unsigned long tmp = 0;
                if (!access_ok(VERIFY_READ, (unsigned *)data, 
-                              FRAME_SIZE_OFFSET)) {
+                              MAX_REG_OFFSET)) {
                        ret = -EIO;
                        break;
                }
-               for ( i = 0; i < FRAME_SIZE_OFFSET; i += sizeof(long) ) {
+               for ( i = 0; i < MAX_REG_OFFSET; i += sizeof(long) ) {
                        __get_user(tmp, (unsigned long __user *) data);
                        putreg(child, i, tmp);
                        data += sizeof(long);
diff -urN linux/arch/um/kernel/sigio_kern.c linux/arch/um/kernel/sigio_kern.c
--- linux/arch/um/kernel/sigio_kern.c   2004/12/04 18:16:01     1.6
+++ linux/arch/um/kernel/sigio_kern.c   2005/01/25 04:28:07     1.7
@@ -39,7 +39,7 @@
        return(0);
 }
 
-static spinlock_t sigio_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sigio_spinlock);
 
 void sigio_lock(void)
 {
diff -urN linux/arch/um/kernel/smp.c linux/arch/um/kernel/smp.c
--- linux/arch/um/kernel/smp.c  2005/01/13 14:05:40     1.12
+++ linux/arch/um/kernel/smp.c  2005/01/25 04:28:07     1.13
@@ -216,7 +216,7 @@
        return(pid_to_processor_id(os_getpid()));
 }
 
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
 static atomic_t scf_started;
 static atomic_t scf_finished;
 static void (*func)(void *info);
@@ -247,7 +247,7 @@
        func = _func;
        info = _info;
 
-       for_each_cpu(i)
+       for_each_online_cpu(i)
                os_write_file(cpu_data[i].ipi_pipe[1], "C", 1);
 
        while (atomic_read(&scf_started) != cpus)
diff -urN linux/arch/um/kernel/syscall_kern.c 
linux/arch/um/kernel/syscall_kern.c
--- linux/arch/um/kernel/syscall_kern.c 2005/01/13 14:05:40     1.8
+++ linux/arch/um/kernel/syscall_kern.c 2005/01/25 04:28:07     1.9
@@ -159,7 +159,7 @@
        return(CHOOSE_MODE_PROC(execute_syscall_tt, execute_syscall_skas, r));
 }
 
-spinlock_t syscall_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(syscall_lock);
 
 static int syscall_index = 0;
 
diff -urN linux/arch/um/kernel/sysrq.c linux/arch/um/kernel/sysrq.c
--- linux/arch/um/kernel/sysrq.c        2004/11/15 11:49:21     1.9
+++ linux/arch/um/kernel/sysrq.c        2005/01/25 04:28:07     1.10
@@ -15,26 +15,30 @@
 void show_trace(unsigned long * stack)
 {
        /* XXX: Copy the CONFIG_FRAME_POINTER stack-walking backtrace from
-        * arch/i386/kernel/traps.c. */
+        * arch/i386/kernel/traps.c, and then move this to sys-i386/sysrq.c.*/
         unsigned long addr;
 
-        if (!stack)
+        if (!stack) {
                 stack = (unsigned long*) &stack;
+               WARN_ON(1);
+       }
 
         printk("Call Trace: \n");
         while (((long) stack & (THREAD_SIZE-1)) != 0) {
-                addr = *stack++;
+                addr = *stack;
                if (__kernel_text_address(addr)) {
-                       printk(" [<%08lx>]", addr);
+                       printk("%08lx:  [<%08lx>]", (unsigned long) stack, 
addr);
                        print_symbol(" %s", addr);
                        printk("\n");
                 }
+                stack++;
         }
         printk("\n");
 }
 
 /*
- * The architecture-independent dump_stack generator
+ * stack dumps generator - this is used by arch-independent code.
+ * And this is identical to i386 currently.
  */
 void dump_stack(void)
 {
@@ -44,7 +48,34 @@
 }
 EXPORT_SYMBOL(dump_stack);
 
-void show_stack(struct task_struct *task, unsigned long *sp)
+/*Stolen from arch/i386/kernel/traps.c */
+static int kstack_depth_to_print = 24;
+
+/* This recently started being used in arch-independent code too, as in
+ * kernel/sched.c.*/
+void show_stack(struct task_struct *task, unsigned long *esp)
 {
-       show_trace(sp);
+       unsigned long *stack;
+       int i;
+
+       if (esp == NULL) {
+               if (task != current) {
+                       esp = (unsigned long *) KSTK_ESP(task);
+                       /* Which one? No actual difference - just coding 
style.*/
+                       //esp = (unsigned long *) 
PT_REGS_IP(&task->thread.regs);
+               } else {
+                       esp = (unsigned long *) &esp;
+               }
+       }
+
+       stack = esp;
+       for(i = 0; i < kstack_depth_to_print; i++) {
+               if (kstack_end(stack))
+                       break;
+               if (i && ((i % 8) == 0))
+                       printk("\n       ");
+               printk("%08lx ", *stack++);
+       }
+
+       show_trace(esp);
 }
diff -urN linux/arch/um/kernel/time_kern.c linux/arch/um/kernel/time_kern.c
--- linux/arch/um/kernel/time_kern.c    2005/01/13 14:05:40     1.11
+++ linux/arch/um/kernel/time_kern.c    2005/01/25 04:28:07     1.12
@@ -161,7 +161,7 @@
                timer_irq(regs);
 }
 
-static spinlock_t timer_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(timer_spinlock);
 
 unsigned long time_lock(void)
 {
diff -urN linux/arch/um/kernel/trap_kern.c linux/arch/um/kernel/trap_kern.c
--- linux/arch/um/kernel/trap_kern.c    2005/01/13 14:05:40     1.7
+++ linux/arch/um/kernel/trap_kern.c    2005/01/25 04:28:07     1.8
@@ -221,7 +221,7 @@
 {
 }
 
-spinlock_t trap_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(trap_lock);
 
 static int trap_index = 0;
 
diff -urN linux/arch/um/kernel/um_arch.c linux/arch/um/kernel/um_arch.c
--- linux/arch/um/kernel/um_arch.c      2005/01/13 14:05:40     1.11
+++ linux/arch/um/kernel/um_arch.c      2005/01/25 04:28:07     1.12
@@ -198,7 +198,7 @@
 );
 #endif
 
-int force_tt = 0;
+static int force_tt = 0;
 
 #if defined(CONFIG_MODE_TT) && defined(CONFIG_MODE_SKAS)
 #define DEFAULT_TT 0
@@ -319,6 +319,14 @@
        if(have_root == 0) add_arg(saved_command_line, DEFAULT_COMMAND_LINE);
 
        mode_tt = force_tt ? 1 : !can_do_skas();
+#ifndef CONFIG_MODE_TT
+       if (mode_tt) {
+               /*Since CONFIG_MODE_TT is #undef'ed, force_tt cannot be 1. So,
+                * can_do_skas() returned 0, and the message is correct. */
+               printf("Support for TT mode is disabled, and no SKAS support is 
present on the host.\n");
+               exit(1);
+       }
+#endif
        uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0,
                                     &host_task_size, &task_size);
 
diff -urN linux/arch/um/kernel/uml.lds.S linux/arch/um/kernel/uml.lds.S
--- linux/arch/um/kernel/uml.lds.S      2004/11/15 11:49:21     1.2
+++ linux/arch/um/kernel/uml.lds.S      2005/01/25 04:28:07     1.3
@@ -7,8 +7,12 @@
 
 SECTIONS
 {
+  /*This must contain the right address - not quite the default ELF one.*/
+  PROVIDE (__executable_start = START);
   . = START + SIZEOF_HEADERS;
 
+  /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
+   * is remapped.*/
   __binary_start = .;
 #ifdef MODE_TT
   .thread_private : {
@@ -20,9 +24,13 @@
   }
   . = ALIGN(4096);
   .remap : { arch/um/kernel/tt/unmap_fin.o (.text) }
-#endif
+
+  /* We want it only if we are in MODE_TT. In both cases, however, when MODE_TT
+   * is off the resulting binary segfaults.*/
 
   . = ALIGN(4096);             /* Init code and data */
+#endif
+
   _stext = .;
   __init_begin = .;
   .init.text : {
diff -urN linux/arch/um/kernel/skas/process.c 
linux/arch/um/kernel/skas/process.c
--- linux/arch/um/kernel/skas/process.c 2005/01/13 14:05:41     1.7
+++ linux/arch/um/kernel/skas/process.c 2005/01/25 04:28:08     1.8
@@ -224,9 +224,10 @@
        block_signals();
        if(sigsetjmp(fork_buf, 1) == 0)
                new_thread_proc(stack, handler);
-       set_signals(flags);
 
        remove_sigstack();
+
+       set_signals(flags);
 }
 
 void thread_wait(void *sw, void *fb)
diff -urN linux/arch/um/kernel/tt/tracer.c linux/arch/um/kernel/tt/tracer.c
--- linux/arch/um/kernel/tt/tracer.c    2005/01/13 14:05:41     1.6
+++ linux/arch/um/kernel/tt/tracer.c    2005/01/25 04:28:08     1.7
@@ -313,6 +313,15 @@
                                sig = 0;
                                op = do_proc_op(task, proc_id);
                                switch(op){
+                               /*
+                                * This is called when entering user mode; after
+                                * this, we start intercepting syscalls.
+                                *
+                                * In fact, a process is started in kernel mode,
+                                * so with is_tracing() == 0 (and that is reset
+                                * when executing syscalls, since UML kernel has
+                                * the right to do syscalls);
+                                */
                                case OP_TRACE_ON:
                                        arch_leave_kernel(task, pid);
                                        tracing = 1;
@@ -347,6 +356,11 @@
                                        continue;
                                }
                                tracing = 0;
+                               /* local_using_sysemu has been already set
+                                * below, since if we are here, is_tracing() on
+                                * the traced task was 1, i.e. the process had
+                                * already run through one iteration of the
+                                * loop which executed a OP_TRACE_ON request.*/
                                do_syscall(task, pid, local_using_sysemu);
                                sig = SIGUSR2;
                                break;
diff -urN linux/arch/v850/kernel/memcons.c linux/arch/v850/kernel/memcons.c
--- linux/arch/v850/kernel/memcons.c    2004/10/25 20:44:21     1.5
+++ linux/arch/v850/kernel/memcons.c    2005/01/25 04:28:08     1.6
@@ -25,7 +25,7 @@
 static unsigned long memcons_offs = 0;
 
 /* Spinlock protecting memcons_offs.  */
-static spinlock_t memcons_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(memcons_lock);
 
 
 static size_t write (const char *buf, size_t len)
diff -urN linux/arch/v850/kernel/rte_cb_leds.c 
linux/arch/v850/kernel/rte_cb_leds.c
--- linux/arch/v850/kernel/rte_cb_leds.c        2003/06/22 23:09:51     1.4
+++ linux/arch/v850/kernel/rte_cb_leds.c        2005/01/25 04:28:08     1.5
@@ -25,7 +25,7 @@
 static unsigned char leds_image[LED_NUM_DIGITS] = { 0 };
 
 /* Spinlock protecting the above leds.  */
-static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(leds_lock);
 
 /* Common body of LED read/write functions, checks POS and LEN for
    correctness, declares a variable using IMG_DECL, initialized pointing at
diff -urN linux/arch/v850/kernel/rte_mb_a_pci.c 
linux/arch/v850/kernel/rte_mb_a_pci.c
--- linux/arch/v850/kernel/rte_mb_a_pci.c       2004/11/15 11:49:22     1.10
+++ linux/arch/v850/kernel/rte_mb_a_pci.c       2005/01/25 04:28:08     1.11
@@ -359,7 +359,7 @@
 static struct mb_sram_free_area *mb_sram_free_free_areas = 0;
 
 /* Spinlock protecting the above globals.  */
-static spinlock_t mb_sram_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mb_sram_lock);
 
 /* Allocate a memory block at least SIZE bytes long in the Mother-A SRAM
    space.  */
@@ -514,7 +514,7 @@
 static struct dma_mapping *free_dma_mappings = 0;
 
 /* Spinlock protecting the above globals.  */
-static spinlock_t dma_mappings_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(dma_mappings_lock);
 
 static struct dma_mapping *new_dma_mapping (size_t size)
 {
diff -urN linux/arch/v850/kernel/semaphore.c linux/arch/v850/kernel/semaphore.c
--- linux/arch/v850/kernel/semaphore.c  2004/04/23 15:54:11     1.3
+++ linux/arch/v850/kernel/semaphore.c  2005/01/25 04:28:08     1.4
@@ -55,7 +55,7 @@
        wake_up(&sem->wait);
 }
 
-static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(semaphore_lock);
 
 void __sched __down(struct semaphore * sem)
 {
diff -urN linux/arch/v850/lib/checksum.c linux/arch/v850/lib/checksum.c
--- linux/arch/v850/lib/checksum.c      2003/10/09 13:09:29     1.2
+++ linux/arch/v850/lib/checksum.c      2005/01/25 04:28:08     1.3
@@ -121,7 +121,7 @@
 /*
  * copy while checksumming, otherwise like csum_partial
  */
-unsigned int csum_partial_copy(const char *src, char *dst, 
+unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst,
                                int len, unsigned int sum)
 {
        /*
@@ -138,7 +138,7 @@
  * Copy from userspace and compute checksum.  If we catch an exception
  * then zero the rest of the buffer.
  */
-unsigned int csum_partial_copy_from_user (const char *src, char *dst,
+unsigned int csum_partial_copy_from_user (const unsigned char *src, unsigned 
char *dst,
                                           int len, unsigned int sum,
                                           int *err_ptr)
 {
diff -urN linux/arch/x86_64/ia32/fpu32.c linux/arch/x86_64/ia32/fpu32.c
--- linux/arch/x86_64/ia32/fpu32.c      2004/06/09 14:12:06     1.8
+++ linux/arch/x86_64/ia32/fpu32.c      2005/01/25 04:28:08     1.9
@@ -28,16 +28,17 @@
 static inline unsigned long twd_fxsr_to_i387(struct i387_fxsave_struct *fxsave)
 {
        struct _fpxreg *st = NULL;
+       unsigned long tos = (fxsave->swd >> 11) & 7;
        unsigned long twd = (unsigned long) fxsave->twd;
        unsigned long tag;
        unsigned long ret = 0xffff0000;
        int i;
 
-#define FPREG_ADDR(f, n)       ((char *)&(f)->st_space + (n) * 16);
+#define FPREG_ADDR(f, n)       ((void *)&(f)->st_space + (n) * 16);
 
        for (i = 0 ; i < 8 ; i++) {
                if (twd & 0x1) {
-                       st = (struct _fpxreg *) FPREG_ADDR( fxsave, i );
+                       st = FPREG_ADDR( fxsave, (i - tos) & 7 );
 
                        switch (st->exponent & 0x7fff) {
                        case 0x7fff:
diff -urN linux/arch/x86_64/ia32/ia32_aout.c linux/arch/x86_64/ia32/ia32_aout.c
--- linux/arch/x86_64/ia32/ia32_aout.c  2005/01/13 14:05:43     1.7
+++ linux/arch/x86_64/ia32/ia32_aout.c  2005/01/25 04:28:08     1.8
@@ -115,7 +115,9 @@
        end = PAGE_ALIGN(end);
        if (end <= start)
                return;
+       down_write(&current->mm->mmap_sem);
        do_brk(start, end - start);
+       up_write(&current->mm->mmap_sem);
 }
 
 #if CORE_DUMP
@@ -325,7 +327,10 @@
                pos = 32;
                map_size = ex.a_text+ex.a_data;
 
+               down_write(&current->mm->mmap_sem);
                error = do_brk(text_addr & PAGE_MASK, map_size);
+               up_write(&current->mm->mmap_sem);
+
                if (error != (text_addr & PAGE_MASK)) {
                        send_sig(SIGKILL, current, 0);
                        return error;
@@ -361,7 +366,9 @@
 
                if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
                        loff_t pos = fd_offset;
+                       down_write(&current->mm->mmap_sem);
                        do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
+                       up_write(&current->mm->mmap_sem);
                        bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex),
                                        ex.a_text+ex.a_data, &pos);
                        flush_icache_range((unsigned long) N_TXTADDR(ex),
@@ -469,8 +476,9 @@
                        error_time = jiffies;
                }
 #endif
-
+               down_write(&current->mm->mmap_sem);
                do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
+               up_write(&current->mm->mmap_sem);
                
                file->f_op->read(file, (char *)start_addr,
                        ex.a_text + ex.a_data, &pos);
@@ -494,7 +502,9 @@
        len = PAGE_ALIGN(ex.a_text + ex.a_data);
        bss = ex.a_text + ex.a_data + ex.a_bss;
        if (bss > len) {
+               down_write(&current->mm->mmap_sem);
                error = do_brk(start_addr + len, bss - len);
+               up_write(&current->mm->mmap_sem);
                retval = error;
                if (error != start_addr + len)
                        goto out;
diff -urN linux/arch/x86_64/ia32/ia32entry.S linux/arch/x86_64/ia32/ia32entry.S
--- linux/arch/x86_64/ia32/ia32entry.S  2005/01/13 14:05:43     1.29
+++ linux/arch/x86_64/ia32/ia32entry.S  2005/01/25 04:28:08     1.30
@@ -388,7 +388,11 @@
        .quad sys_symlink
        .quad sys_lstat
        .quad sys_readlink              /* 85 */
+#ifdef CONFIG_IA32_AOUT
        .quad sys_uselib
+#else
+       .quad quiet_ni_syscall
+#endif
        .quad sys_swapon
        .quad sys_reboot
        .quad compat_sys_old_readdir
@@ -479,7 +483,7 @@
        .quad sys32_rt_sigaction
        .quad sys32_rt_sigprocmask      /* 175 */
        .quad sys32_rt_sigpending
-       .quad compat_rt_sigtimedwait
+       .quad compat_sys_rt_sigtimedwait
        .quad sys32_rt_sigqueueinfo
        .quad stub32_rt_sigsuspend
        .quad sys32_pread               /* 180 */
diff -urN linux/arch/x86_64/ia32/syscall32.c linux/arch/x86_64/ia32/syscall32.c
--- linux/arch/x86_64/ia32/syscall32.c  2005/01/13 14:05:43     1.10
+++ linux/arch/x86_64/ia32/syscall32.c  2005/01/25 04:28:08     1.11
@@ -55,7 +55,7 @@
                        if (pte_none(*pte)) {
                                set_pte(pte,
                                        mk_pte(virt_to_page(syscall32_page),
-                                              PAGE_KERNEL_VSYSCALL));
+                                              PAGE_KERNEL_VSYSCALL32));
                        }
                        /* Flush only the local CPU. Other CPUs taking a fault
                           will just end up here again
diff -urN linux/arch/x86_64/kernel/i8259.c linux/arch/x86_64/kernel/i8259.c
--- linux/arch/x86_64/kernel/i8259.c    2005/01/13 14:05:43     1.17
+++ linux/arch/x86_64/kernel/i8259.c    2005/01/25 04:28:08     1.18
@@ -130,7 +130,7 @@
  * moves to arch independent land
  */
 
-spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(i8259A_lock);
 
 static void end_8259A_irq (unsigned int irq)
 {
diff -urN linux/arch/x86_64/kernel/io_apic.c linux/arch/x86_64/kernel/io_apic.c
--- linux/arch/x86_64/kernel/io_apic.c  2005/01/13 14:05:43     1.30
+++ linux/arch/x86_64/kernel/io_apic.c  2005/01/25 04:28:08     1.31
@@ -42,7 +42,7 @@
 
 int sis_apic_bug; /* not actually supported, dummy for compile */
 
-static spinlock_t ioapic_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ioapic_lock);
 
 /*
  * # of IRQ routing registers
diff -urN linux/arch/x86_64/kernel/kprobes.c linux/arch/x86_64/kernel/kprobes.c
--- linux/arch/x86_64/kernel/kprobes.c  2004/11/15 11:49:22     1.1
+++ linux/arch/x86_64/kernel/kprobes.c  2005/01/25 04:28:08     1.2
@@ -39,6 +39,8 @@
 #include <asm/pgtable.h>
 #include <asm/kdebug.h>
 
+static DECLARE_MUTEX(kprobe_mutex);
+
 /* kprobe_status settings */
 #define KPROBE_HIT_ACTIVE      0x00000001
 #define KPROBE_HIT_SS          0x00000002
@@ -75,17 +77,25 @@
 int arch_prepare_kprobe(struct kprobe *p)
 {
        /* insn: must be on special executable page on x86_64. */
+       up(&kprobe_mutex);
        p->ainsn.insn = get_insn_slot();
+       down(&kprobe_mutex);
        if (!p->ainsn.insn) {
                return -ENOMEM;
        }
-       memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE);
        return 0;
 }
 
+void arch_copy_kprobe(struct kprobe *p)
+{
+       memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE);
+}
+
 void arch_remove_kprobe(struct kprobe *p)
 {
+       up(&kprobe_mutex);
        free_insn_slot(p->ainsn.insn);
+       down(&kprobe_mutex);
 }
 
 static inline void disarm_kprobe(struct kprobe *p, struct pt_regs *regs)
@@ -425,12 +435,12 @@
        }
 
        /* All out of space.  Need to allocate a new page. Use slot 0.*/
-       kip = kmalloc(sizeof(struct kprobe_insn_page), GFP_ATOMIC);
+       kip = kmalloc(sizeof(struct kprobe_insn_page), GFP_KERNEL);
        if (!kip) {
                return NULL;
        }
        kip->insns = (kprobe_opcode_t*) __vmalloc(PAGE_SIZE,
-               GFP_ATOMIC|__GFP_HIGHMEM, __pgprot(__PAGE_KERNEL_EXEC));
+               GFP_KERNEL|__GFP_HIGHMEM, __pgprot(__PAGE_KERNEL_EXEC));
        if (!kip->insns) {
                kfree(kip);
                return NULL;
diff -urN linux/arch/x86_64/kernel/mce.c linux/arch/x86_64/kernel/mce.c
--- linux/arch/x86_64/kernel/mce.c      2005/01/13 14:05:43     1.14
+++ linux/arch/x86_64/kernel/mce.c      2005/01/25 04:28:08     1.15
@@ -340,12 +340,12 @@
  */
 void __init mcheck_init(struct cpuinfo_x86 *c)
 {
-       static unsigned long mce_cpus __initdata = 0;
+       static cpumask_t mce_cpus __initdata = CPU_MASK_NONE;
 
        mce_cpu_quirks(c); 
 
        if (mce_dont_init ||
-           test_and_set_bit(smp_processor_id(), &mce_cpus) ||
+           cpu_test_and_set(smp_processor_id(), mce_cpus) ||
            !mce_available(c))
                return;
 
diff -urN linux/arch/x86_64/kernel/nmi.c linux/arch/x86_64/kernel/nmi.c
--- linux/arch/x86_64/kernel/nmi.c      2004/11/15 11:49:22     1.21
+++ linux/arch/x86_64/kernel/nmi.c      2005/01/25 04:28:08     1.22
@@ -43,7 +43,7 @@
  * This is maintained separately from nmi_active because the NMI
  * watchdog may also be driven from the I/O APIC timer.
  */
-static spinlock_t lapic_nmi_owner_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(lapic_nmi_owner_lock);
 static unsigned int lapic_nmi_owner;
 #define LAPIC_NMI_WATCHDOG     (1<<0)
 #define LAPIC_NMI_RESERVED     (1<<1)
@@ -130,8 +130,12 @@
        mdelay((10*1000)/nmi_hz); // wait 10 ticks
 
        for (cpu = 0; cpu < NR_CPUS; cpu++) {
-               if (!cpu_online(cpu))
+#ifdef CONFIG_SMP
+               /* Check cpu_callin_map here because that is set
+                  after the timer is started. */
+               if (!cpu_isset(cpu, cpu_callin_map))
                        continue;
+#endif
                if (cpu_pda[cpu].__nmi_count - counts[cpu] <= 5) {
                        printk("CPU#%d: NMI appears to be stuck (%d)!\n", 
                               cpu,
diff -urN linux/arch/x86_64/kernel/pci-gart.c 
linux/arch/x86_64/kernel/pci-gart.c
--- linux/arch/x86_64/kernel/pci-gart.c 2004/11/15 11:49:22     1.31
+++ linux/arch/x86_64/kernel/pci-gart.c 2005/01/25 04:28:08     1.32
@@ -65,7 +65,7 @@
 #define MAX_NB 8
 
 /* Allocation bitmap for the remapping area */ 
-static spinlock_t iommu_bitmap_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(iommu_bitmap_lock);
 static unsigned long *iommu_gart_bitmap; /* guarded by iommu_bitmap_lock */
 
 static u32 gart_unmapped_entry; 
diff -urN linux/arch/x86_64/kernel/setup.c linux/arch/x86_64/kernel/setup.c
--- linux/arch/x86_64/kernel/setup.c    2005/01/13 14:05:43     1.37
+++ linux/arch/x86_64/kernel/setup.c    2005/01/25 04:28:08     1.38
@@ -485,6 +485,8 @@
 
        parse_cmdline_early(cmdline_p);
 
+       early_identify_cpu(&boot_cpu_data);
+
        /*
         * partially used pages are not usable - thus
         * we are rounding upwards:
@@ -635,7 +637,7 @@
 {
        unsigned int *v;
 
-       if (cpuid_eax(0x80000000) < 0x80000004)
+       if (c->x86_cpuid_level < 0x80000004)
                return 0;
 
        v = (unsigned int *) c->x86_model_id;
@@ -651,7 +653,7 @@
 {
        unsigned int n, dummy, eax, ebx, ecx, edx;
 
-       n = cpuid_eax(0x80000000);
+       n = c->x86_cpuid_level;
 
        if (n >= 0x80000005) {
                cpuid(0x80000005, &dummy, &ebx, &ecx, &edx);
@@ -711,7 +713,7 @@
        } 
        display_cacheinfo(c);
 
-       if (cpuid_eax(0x80000000) >= 0x80000008) {
+       if (c->x86_cpuid_level >= 0x80000008) {
                c->x86_num_cores = (cpuid_ecx(0x80000008) & 0xff) + 1;
                if (c->x86_num_cores & (c->x86_num_cores - 1))
                        c->x86_num_cores = 1;
@@ -725,6 +727,8 @@
                cpu = c->x86_apicid;
                if (acpi_numa <= 0 && c->x86_num_cores > 1) {
                        cpu_to_node[cpu] = cpu >> hweight32(c->x86_num_cores - 
1);
+                       if (!node_online(cpu_to_node[cpu]))
+                               cpu_to_node[cpu] = first_node(node_online_map);
                }
                printk(KERN_INFO "CPU %d(%d) -> Node %d\n",
                                cpu, c->x86_num_cores, cpu_to_node[cpu]);
@@ -800,7 +804,7 @@
        unsigned n;
 
        init_intel_cacheinfo(c);
-       n = cpuid_eax(0x80000000);
+       n = c->x86_cpuid_level;
        if (n >= 0x80000008) {
                unsigned eax = cpuid_eax(0x80000008);
                c->x86_virt_bits = (eax >> 8) & 0xff;
@@ -846,6 +850,7 @@
        c->x86_cache_alignment = c->x86_clflush_size;
        c->x86_num_cores = 1;
        c->x86_apicid = c == &boot_cpu_data ? 0 : c - cpu_data;
+       c->x86_cpuid_level = 0;
        memset(&c->x86_capability, 0, sizeof c->x86_capability);
 
        /* Get vendor name */
@@ -892,6 +897,7 @@
 
        /* AMD-defined flags: level 0x80000001 */
        xlvl = cpuid_eax(0x80000000);
+       c->x86_cpuid_level = xlvl;
        if ((xlvl & 0xffff0000) == 0x80000000) {
                if (xlvl >= 0x80000001) {
                        c->x86_capability[1] = cpuid_edx(0x80000001);
@@ -904,6 +910,7 @@
        /* Transmeta-defined flags: level 0x80860001 */
        xlvl = cpuid_eax(0x80860000);
        if ((xlvl & 0xffff0000) == 0x80860000) {
+               /* Don't set x86_cpuid_level here for now to not confuse. */
                if (xlvl >= 0x80860001)
                        c->x86_capability[2] = cpuid_edx(0x80860001);
        }
diff -urN linux/arch/x86_64/kernel/setup64.c linux/arch/x86_64/kernel/setup64.c
--- linux/arch/x86_64/kernel/setup64.c  2005/01/13 14:05:43     1.27
+++ linux/arch/x86_64/kernel/setup64.c  2005/01/25 04:28:08     1.28
@@ -28,7 +28,7 @@
 
 char x86_boot_params[2048] __initdata = {0,};
 
-unsigned long cpu_initialized __initdata = 0;
+cpumask_t cpu_initialized __initdata = CPU_MASK_NONE;
 
 struct x8664_pda cpu_pda[NR_CPUS] __cacheline_aligned; 
 
@@ -187,7 +187,7 @@
 
        me = current;
 
-       if (test_and_set_bit(cpu, &cpu_initialized))
+       if (cpu_test_and_set(cpu, cpu_initialized))
                panic("CPU#%d already initialized!\n", cpu);
 
        printk("Initializing CPU#%d\n", cpu);
@@ -215,9 +215,6 @@
 
        asm volatile("pushfq ; popq %%rax ; btr $14,%%rax ; pushq %%rax ; 
popfq" ::: "eax");
 
-       if (cpu == 0) 
-               early_identify_cpu(&boot_cpu_data);
-
        syscall_init();
 
        wrmsrl(MSR_FS_BASE, 0);
diff -urN linux/arch/x86_64/kernel/signal.c linux/arch/x86_64/kernel/signal.c
--- linux/arch/x86_64/kernel/signal.c   2005/01/13 14:05:43     1.24
+++ linux/arch/x86_64/kernel/signal.c   2005/01/25 04:28:08     1.25
@@ -24,7 +24,6 @@
 #include <linux/stddef.h>
 #include <linux/personality.h>
 #include <linux/compiler.h>
-#include <linux/suspend.h>
 #include <asm/ucontext.h>
 #include <asm/uaccess.h>
 #include <asm/i387.h>
@@ -423,10 +422,8 @@
                return 1;
        }       
 
-       if (current->flags & PF_FREEZE) {
-               refrigerator(0);
+       if (try_to_freeze(0))
                goto no_signal;
-       }
 
        if (!oldset)
                oldset = &current->blocked;
diff -urN linux/arch/x86_64/kernel/smp.c linux/arch/x86_64/kernel/smp.c
--- linux/arch/x86_64/kernel/smp.c      2005/01/13 14:05:43     1.25
+++ linux/arch/x86_64/kernel/smp.c      2005/01/25 04:28:08     1.26
@@ -40,7 +40,7 @@
 static cpumask_t flush_cpumask;
 static struct mm_struct * flush_mm;
 static unsigned long flush_va;
-static spinlock_t tlbstate_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tlbstate_lock);
 #define FLUSH_ALL      0xffffffff
 
 /*
@@ -269,7 +269,7 @@
  * Structure and data for smp_call_function(). This is designed to minimise
  * static memory requirements. It also looks cleaner.
  */
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
 
 struct call_data_struct {
        void (*func) (void *info);
diff -urN linux/arch/x86_64/kernel/smpboot.c linux/arch/x86_64/kernel/smpboot.c
--- linux/arch/x86_64/kernel/smpboot.c  2005/01/13 14:05:43     1.33
+++ linux/arch/x86_64/kernel/smpboot.c  2005/01/25 04:28:08     1.34
@@ -63,7 +63,7 @@
 /* Bitmask of currently online CPUs */
 cpumask_t cpu_online_map;
 
-static cpumask_t cpu_callin_map;
+cpumask_t cpu_callin_map;
 cpumask_t cpu_callout_map;
 static cpumask_t smp_commenced_mask;
 
diff -urN linux/arch/x86_64/kernel/time.c linux/arch/x86_64/kernel/time.c
--- linux/arch/x86_64/kernel/time.c     2005/01/13 14:05:43     1.31
+++ linux/arch/x86_64/kernel/time.c     2005/01/25 04:28:08     1.32
@@ -49,8 +49,8 @@
 
 extern int using_apic_timer;
 
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
-spinlock_t i8253_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
+DEFINE_SPINLOCK(i8253_lock);
 
 static int nohpet __initdata = 0;
 static int notsc __initdata = 0;
@@ -955,16 +955,19 @@
 
 __setup("report_lost_ticks", time_setup);
 
-static long clock_cmos_diff, sleep_start;
+static long clock_cmos_diff;
+static unsigned long sleep_start;
 
 static int timer_suspend(struct sys_device *dev, u32 state)
 {
        /*
         * Estimate time zone so that set_time can update the clock
         */
-       clock_cmos_diff = -get_cmos_time();
+       long cmos_time =  get_cmos_time();
+
+       clock_cmos_diff = -cmos_time;
        clock_cmos_diff += get_seconds();
-       sleep_start = jiffies;
+       sleep_start = cmos_time;
        return 0;
 }
 
@@ -973,7 +976,7 @@
        unsigned long flags;
        unsigned long sec;
        unsigned long ctime = get_cmos_time();
-       unsigned long sleep_length = ctime - sleep_start;
+       unsigned long sleep_length = (ctime - sleep_start) * HZ;
 
        if (vxtime.hpet_address)
                hpet_reenable();
@@ -983,7 +986,8 @@
        xtime.tv_sec = sec;
        xtime.tv_nsec = 0;
        write_sequnlock_irqrestore(&xtime_lock,flags);
-       jiffies += sleep_length * HZ;
+       jiffies += sleep_length;
+       wall_jiffies += sleep_length;
        return 0;
 }
 
diff -urN linux/arch/x86_64/kernel/traps.c linux/arch/x86_64/kernel/traps.c
--- linux/arch/x86_64/kernel/traps.c    2005/01/13 14:05:43     1.39
+++ linux/arch/x86_64/kernel/traps.c    2005/01/25 04:28:08     1.40
@@ -74,7 +74,7 @@
 asmlinkage void call_debug(void);
 
 struct notifier_block *die_chain;
-static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(die_notifier_lock);
 
 int register_die_notifier(struct notifier_block *nb)
 {
@@ -324,7 +324,7 @@
        BUG(); 
 } 
 
-static spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(die_lock);
 static int die_owner = -1;
 
 void oops_begin(void)
diff -urN linux/arch/x86_64/kernel/acpi/wakeup.S 
linux/arch/x86_64/kernel/acpi/wakeup.S
--- linux/arch/x86_64/kernel/acpi/wakeup.S      2004/02/05 02:39:57     1.4
+++ linux/arch/x86_64/kernel/acpi/wakeup.S      2005/01/25 04:28:08     1.5
@@ -429,9 +429,6 @@
 do_suspend_lowlevel:
 .LFB5:
        subq    $8, %rsp
-.LCFI2:
-       testl   %edi, %edi
-       jne     .L99
        xorl    %eax, %eax
        call    save_processor_state
 
diff -urN linux/arch/x86_64/lib/csum-wrappers.c 
linux/arch/x86_64/lib/csum-wrappers.c
--- linux/arch/x86_64/lib/csum-wrappers.c       2004/10/12 01:45:43     1.6
+++ linux/arch/x86_64/lib/csum-wrappers.c       2005/01/25 04:28:09     1.7
@@ -19,7 +19,7 @@
  * src and dst are best aligned to 64bits. 
  */ 
 unsigned int 
-csum_partial_copy_from_user(const char __user *src, char *dst, 
+csum_partial_copy_from_user(const unsigned char __user *src, unsigned char 
*dst,
                            int len, unsigned int isum, int *errp)
 { 
        might_sleep();
@@ -67,7 +67,7 @@
  * src and dst are best aligned to 64bits.
  */ 
 unsigned int 
-csum_partial_copy_to_user(const char *src, char __user *dst, 
+csum_partial_copy_to_user(unsigned const char *src, unsigned char __user *dst,
                          int len, unsigned int isum, int *errp)
 { 
        might_sleep();
@@ -105,7 +105,7 @@
  * Returns an 32bit unfolded checksum of the buffer.
  */ 
 unsigned int 
-csum_partial_copy_nocheck(const char *src, char *dst, int len, unsigned int 
sum)
+csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst, int 
len, unsigned int sum)
 { 
        return csum_partial_copy_generic(src,dst,len,sum,NULL,NULL);
 } 
diff -urN linux/arch/x86_64/mm/fault.c linux/arch/x86_64/mm/fault.c
--- linux/arch/x86_64/mm/fault.c        2005/01/13 14:05:44     1.26
+++ linux/arch/x86_64/mm/fault.c        2005/01/25 04:28:09     1.27
@@ -462,7 +462,7 @@
 #ifdef CONFIG_IA32_EMULATION
        /* 32bit vsyscall. map on demand. */
        if (test_thread_flag(TIF_IA32) &&
-           address >= 0xffffe000 && address < 0xffffe000 + PAGE_SIZE) { 
+           address >= VSYSCALL32_BASE && address < VSYSCALL32_END) {
                if (map_syscall32(mm, address) < 0)
                        goto out_of_memory2;
                return;
diff -urN linux/arch/x86_64/mm/init.c linux/arch/x86_64/mm/init.c
--- linux/arch/x86_64/mm/init.c 2005/01/13 14:05:44     1.30
+++ linux/arch/x86_64/mm/init.c 2005/01/25 04:28:09     1.31
@@ -605,7 +605,7 @@
        if (test_tsk_thread_flag(tsk, TIF_IA32)) {
                /* lookup code assumes the pages are present. set them up
                   now */
-               if (__map_syscall32(tsk->mm, 0xfffe000) < 0)
+               if (__map_syscall32(tsk->mm, VSYSCALL32_BASE) < 0)
                        return NULL;
                return &gate32_vma;
        }
diff -urN linux/arch/x86_64/mm/ioremap.c linux/arch/x86_64/mm/ioremap.c
--- linux/arch/x86_64/mm/ioremap.c      2005/01/13 14:05:44     1.16
+++ linux/arch/x86_64/mm/ioremap.c      2005/01/25 04:28:09     1.17
@@ -85,7 +85,7 @@
                        return -ENOMEM;
                remap_area_pmd(pmd, address, end - address, address + 
phys_addr, flags);
                address = (address + PUD_SIZE) & PUD_MASK;
-               pmd++;
+               pud++;
        } while (address && (address < end));
        return 0;
 }
diff -urN linux/arch/x86_64/mm/k8topology.c linux/arch/x86_64/mm/k8topology.c
--- linux/arch/x86_64/mm/k8topology.c   2005/01/13 14:05:44     1.12
+++ linux/arch/x86_64/mm/k8topology.c   2005/01/25 04:28:09     1.13
@@ -47,6 +47,10 @@
        int nodeid, i, nb; 
        int found = 0;
        u32 reg;
+       unsigned numnodes;
+       nodemask_t nodes_parsed;
+
+       nodes_clear(nodes_parsed);
 
        nb = find_northbridge(); 
        if (nb < 0) 
@@ -55,10 +59,9 @@
        printk(KERN_INFO "Scanning NUMA topology in Northbridge %d\n", nb); 
 
        reg = read_pci_config(0, nb, 0, 0x60); 
-       for (i = 0; i <= ((reg >> 4) & 7); i++)
-               node_set_online(i);
+       numnodes = ((reg >> 4) & 7) + 1;
 
-       printk(KERN_INFO "Number of nodes %d (%x)\n", num_online_nodes(), reg);
+       printk(KERN_INFO "Number of nodes %d\n", numnodes);
 
        memset(&nodes,0,sizeof(nodes)); 
        prevbase = 0;
@@ -70,11 +73,11 @@
 
                nodeid = limit & 7; 
                if ((base & 3) == 0) { 
-                       if (i < num_online_nodes())
+                       if (i < numnodes)
                                printk("Skipping disabled node %d\n", i); 
                        continue;
                } 
-               if (nodeid >= num_online_nodes()) {
+               if (nodeid >= numnodes) {
                        printk("Ignoring excess node %d (%lx:%lx)\n", nodeid,
                               base, limit); 
                        continue;
@@ -90,7 +93,7 @@
                               nodeid, (base>>8)&3, (limit>>8) & 3); 
                        return -1; 
                }       
-               if (node_online(nodeid)) { 
+               if (node_isset(nodeid, nodes_parsed)) { 
                        printk(KERN_INFO "Node %d already present. Skipping\n", 
                               nodeid);
                        continue;
@@ -138,12 +141,14 @@
                nodes[nodeid].end = limit;
 
                prevbase = base;
+
+               node_set(nodeid, nodes_parsed);
        } 
 
        if (!found)
                return -1; 
 
-       memnode_shift = compute_hash_shift(nodes);
+       memnode_shift = compute_hash_shift(nodes, numnodes);
        if (memnode_shift < 0) { 
                printk(KERN_ERR "No NUMA node hash function found. Contact 
maintainer\n"); 
                return -1; 
@@ -154,8 +159,8 @@
                if (nodes[i].start != nodes[i].end) { 
                        /* assume 1:1 NODE:CPU */
                        cpu_to_node[i] = i; 
-               setup_node_bootmem(i, nodes[i].start, nodes[i].end); 
-       } 
+                       setup_node_bootmem(i, nodes[i].start, nodes[i].end); 
+               } 
        }
 
        numa_init_array();
diff -urN linux/arch/x86_64/mm/numa.c linux/arch/x86_64/mm/numa.c
--- linux/arch/x86_64/mm/numa.c 2005/01/13 14:05:44     1.15
+++ linux/arch/x86_64/mm/numa.c 2005/01/25 04:28:09     1.16
@@ -34,9 +34,7 @@
 
 int numa_off __initdata;
 
-unsigned long nodes_present; 
-
-int __init compute_hash_shift(struct node *nodes)
+int __init compute_hash_shift(struct node *nodes, int numnodes)
 {
        int i; 
        int shift = 24;
@@ -45,7 +43,7 @@
        /* When in doubt use brute force. */
        while (shift < 48) { 
                memset(memnodemap,0xff,sizeof(*memnodemap) * NODEMAPSIZE); 
-               for_each_online_node(i) {
+               for (i = 0; i < numnodes; i++) {
                        if (nodes[i].start == nodes[i].end) 
                                continue;
                        for (addr = nodes[i].start; 
@@ -197,7 +195,7 @@
                       (nodes[i].end - nodes[i].start) >> 20);
                node_set_online(i);
        }
-       memnode_shift = compute_hash_shift(nodes);
+       memnode_shift = compute_hash_shift(nodes, numa_fake);
        if (memnode_shift < 0) {
                memnode_shift = 0;
                printk(KERN_ERR "No NUMA hash function found. Emulation 
disabled.\n");
@@ -274,7 +272,7 @@
 /* [numa=off] */
 __init int numa_setup(char *opt) 
 { 
-       if (!strcmp(opt,"off"))
+       if (!strncmp(opt,"off",3))
                numa_off = 1;
 #ifdef CONFIG_NUMA_EMU
        if(!strncmp(opt, "fake=", 5)) {
diff -urN linux/arch/x86_64/mm/srat.c linux/arch/x86_64/mm/srat.c
--- linux/arch/x86_64/mm/srat.c 2005/01/13 14:05:44     1.1
+++ linux/arch/x86_64/mm/srat.c 2005/01/25 04:28:09     1.2
@@ -20,17 +20,20 @@
 
 static struct acpi_table_slit *acpi_slit;
 
-static DECLARE_BITMAP(nodes_parsed, MAX_NUMNODES) __initdata;
+static nodemask_t nodes_parsed __initdata;
+static nodemask_t nodes_found __initdata;
 static struct node nodes[MAX_NUMNODES] __initdata;
 static __u8  pxm2node[256] __initdata = { [0 ... 255] = 0xff };
 
 static __init int setup_node(int pxm)
 {
-       if (pxm2node[pxm] == 0xff) {
-               if (num_online_nodes() >= MAX_NUMNODES)
+       unsigned node = pxm2node[pxm];
+       if (node == 0xff) {
+               if (nodes_weight(nodes_found) >= MAX_NUMNODES)
                        return -1;
-               pxm2node[pxm] = num_online_nodes();
-               node_set_online(num_online_nodes());
+               node = first_unset_node(nodes_found); 
+               node_set(node, nodes_found);
+               pxm2node[pxm] = node;
        }
        return pxm2node[pxm];
 }
@@ -140,7 +143,7 @@
                return;
        }
        nd = &nodes[node];
-       if (!test_and_set_bit(node, &nodes_parsed)) {
+       if (!node_test_and_set(node, nodes_parsed)) {
                nd->start = start;
                nd->end = end;
        } else {
@@ -163,7 +166,7 @@
        int i;
        if (acpi_numa <= 0)
                return -1;
-       memnode_shift = compute_hash_shift(nodes);
+       memnode_shift = compute_hash_shift(nodes, nodes_weight(nodes_parsed));
        if (memnode_shift < 0) {
                printk(KERN_ERR
                     "SRAT: No NUMA node hash function found. Contact 
maintainer\n");
@@ -171,7 +174,7 @@
                return -1;
        }
        for (i = 0; i < MAX_NUMNODES; i++) {
-               if (!test_bit(i, &nodes_parsed))
+               if (!node_isset(i, nodes_parsed))
                        continue;
                cutoff_node(i, start, end);
                if (nodes[i].start == nodes[i].end)
diff -urN linux/crypto/Kconfig linux/crypto/Kconfig
--- linux/crypto/Kconfig        2005/01/13 14:05:44     1.27
+++ linux/crypto/Kconfig        2005/01/25 04:28:09     1.28
@@ -77,7 +77,7 @@
          Whirlpool will be part of the ISO/IEC 10118-3:2003(E) standard
 
          See also:
-         
http://planeta.terra.com.br/informatica/paulobarreto/WhirlpoolPage.html
+         
<http://planeta.terra.com.br/informatica/paulobarreto/WhirlpoolPage.html>
 
 config CRYPTO_DES
        tristate "DES and Triple DES EDE cipher algorithms"
@@ -102,7 +102,7 @@
          designed for use on "large microprocessors".
          
          See also:
-         http://www.schneier.com/blowfish.html
+         <http://www.schneier.com/blowfish.html>
 
 config CRYPTO_TWOFISH
        tristate "Twofish cipher algorithm"
@@ -116,7 +116,7 @@
          bits.
          
          See also:
-         http://www.schneier.com/twofish.html
+         <http://www.schneier.com/twofish.html>
 
 config CRYPTO_SERPENT
        tristate "Serpent cipher algorithm"
@@ -129,7 +129,7 @@
          variant of Serpent for compatibility with old kerneli code.
 
          See also:
-         http://www.cl.cam.ac.uk/~rja14/serpent.html
+         <http://www.cl.cam.ac.uk/~rja14/serpent.html>
 
 config CRYPTO_AES
        tristate "AES cipher algorithms"
@@ -149,7 +149,7 @@
 
          The AES specifies three key sizes: 128, 192 and 256 bits        
 
-         See http://csrc.nist.gov/CryptoToolkit/aes/ for more information.
+         See <http://csrc.nist.gov/CryptoToolkit/aes/> for more information.
 
 config CRYPTO_AES_586
        tristate "AES cipher algorithms (i586)"
@@ -169,7 +169,7 @@
 
          The AES specifies three key sizes: 128, 192 and 256 bits        
 
-         See http://csrc.nist.gov/encryption/aes/ for more information.
+         See <http://csrc.nist.gov/encryption/aes/> for more information.
 
 config CRYPTO_CAST5
        tristate "CAST5 (CAST-128) cipher algorithm"
@@ -221,7 +221,7 @@
          on 32-bit processors.  Khazad uses an 128 bit key size.
 
          See also:
-         http://planeta.terra.com.br/informatica/paulobarreto/KhazadPage.html
+         <http://planeta.terra.com.br/informatica/paulobarreto/KhazadPage.html>
 
 config CRYPTO_ANUBIS
        tristate "Anubis cipher algorithm"
@@ -234,8 +234,8 @@
          in the NESSIE competition.
          
          See also:
-         https://www.cosic.esat.kuleuven.ac.be/nessie/reports/
-         http://planeta.terra.com.br/informatica/paulobarreto/AnubisPage.html
+         <https://www.cosic.esat.kuleuven.ac.be/nessie/reports/>
+         <http://planeta.terra.com.br/informatica/paulobarreto/AnubisPage.html>
 
 
 config CRYPTO_DEFLATE
diff -urN linux/drivers/acorn/block/fd1772.c linux/drivers/acorn/block/fd1772.c
--- linux/drivers/acorn/block/fd1772.c  2004/10/25 20:44:21     1.46
+++ linux/drivers/acorn/block/fd1772.c  2005/01/25 04:28:09     1.47
@@ -1522,7 +1522,7 @@
 
 int fd1772_init(void)
 {
-       static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(lock);
        int i, err = -ENOMEM;
 
        if (!machine_is_archimedes())
diff -urN linux/drivers/acorn/block/mfmhd.c linux/drivers/acorn/block/mfmhd.c
--- linux/drivers/acorn/block/mfmhd.c   2003/08/15 15:14:33     1.43
+++ linux/drivers/acorn/block/mfmhd.c   2005/01/25 04:28:09     1.44
@@ -124,7 +124,7 @@
 
 static void (*do_mfm)(void) = NULL;
 static struct request_queue *mfm_queue;
-static spinlock_t mfm_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mfm_lock);
 
 #define MAJOR_NR       MFM_ACORN_MAJOR
 #define QUEUE (mfm_queue)
diff -urN linux/drivers/acpi/Kconfig linux/drivers/acpi/Kconfig
--- linux/drivers/acpi/Kconfig  2005/01/13 14:05:44     1.20
+++ linux/drivers/acpi/Kconfig  2005/01/25 04:28:09     1.21
@@ -20,7 +20,7 @@
          kernel by about 70K.
 
          Linux ACPI provides a robust functional replacement for several 
-         legacy configuration and power management intefaces, including 
+         legacy configuration and power management interfaces, including
          the Plug-and-Play BIOS specification (PnP BIOS), the 
          MultiProcessor Specification (MPS), and the Advanced Power 
          Management (APM) specification.  If both ACPI and APM support 
@@ -209,8 +209,8 @@
          This is a Linux ACPI driver for the IBM ThinkPad laptops. It adds
          support for Fn-Fx key combinations, Bluetooth control, video
          output switching, ThinkLight control, UltraBay eject and more.
-         For more information about this driver see Documentation/ibm-acpi.txt
-         and http://ibm-acpi.sf.net/ .
+         For more information about this driver see 
<file:Documentation/ibm-acpi.txt>
+         and <http://ibm-acpi.sf.net/> .
 
          If you have an IBM ThinkPad laptop, say Y or M here.
 
diff -urN linux/drivers/acpi/bus.c linux/drivers/acpi/bus.c
--- linux/drivers/acpi/bus.c    2005/01/13 14:05:44     1.26
+++ linux/drivers/acpi/bus.c    2005/01/25 04:28:09     1.27
@@ -281,7 +281,7 @@
                                 Event Management
    -------------------------------------------------------------------------- 
*/
 
-static spinlock_t              acpi_bus_event_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(acpi_bus_event_lock);
 
 LIST_HEAD(acpi_bus_event_list);
 DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
diff -urN linux/drivers/acpi/debug.c linux/drivers/acpi/debug.c
--- linux/drivers/acpi/debug.c  2004/10/12 14:36:34     1.4
+++ linux/drivers/acpi/debug.c  2005/01/25 04:28:09     1.5
@@ -4,9 +4,11 @@
 
 #include <linux/proc_fs.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <asm/uaccess.h>
 #include <acpi/acpi_drivers.h>
+#include <acpi/acglobal.h>
 
 #define _COMPONENT             ACPI_SYSTEM_COMPONENT
 ACPI_MODULE_NAME               ("debug")
diff -urN linux/drivers/acpi/ec.c linux/drivers/acpi/ec.c
--- linux/drivers/acpi/ec.c     2005/01/13 14:05:44     1.31
+++ linux/drivers/acpi/ec.c     2005/01/25 04:28:09     1.32
@@ -832,7 +832,7 @@
        status = acpi_evaluate_integer(handle, "_GPE", NULL, &ec_ecdt->gpe_bit);
        if (ACPI_FAILURE(status))
                return status;
-       ec_ecdt->lock = SPIN_LOCK_UNLOCKED;
+       spin_lock_init(&ec_ecdt->lock);
        ec_ecdt->global_lock = TRUE;
        ec_ecdt->handle = handle;
 
diff -urN linux/drivers/acpi/event.c linux/drivers/acpi/event.c
--- linux/drivers/acpi/event.c  2004/06/06 02:12:41     1.3
+++ linux/drivers/acpi/event.c  2005/01/25 04:28:09     1.4
@@ -16,7 +16,7 @@
 ACPI_MODULE_NAME               ("event")
 
 /* Global vars for handling event proc entry */
-static spinlock_t              acpi_system_event_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(acpi_system_event_lock);
 int                            event_is_open = 0;
 extern struct list_head                acpi_bus_event_list;
 extern wait_queue_head_t       acpi_bus_event_queue;
diff -urN linux/drivers/acpi/pci_irq.c linux/drivers/acpi/pci_irq.c
--- linux/drivers/acpi/pci_irq.c        2005/01/13 14:05:44     1.23
+++ linux/drivers/acpi/pci_irq.c        2005/01/25 04:28:09     1.24
@@ -43,7 +43,7 @@
 ACPI_MODULE_NAME               ("pci_irq")
 
 struct acpi_prt_list           acpi_prt;
-spinlock_t acpi_prt_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(acpi_prt_lock);
 
 /* --------------------------------------------------------------------------
                          PCI IRQ Routing Table (PRT) Support
diff -urN linux/drivers/acpi/scan.c linux/drivers/acpi/scan.c
--- linux/drivers/acpi/scan.c   2005/01/13 14:05:44     1.18
+++ linux/drivers/acpi/scan.c   2005/01/25 04:28:09     1.19
@@ -24,7 +24,7 @@
 #define ACPI_BUS_DEVICE_NAME           "System Bus"
 
 static LIST_HEAD(acpi_device_list);
-spinlock_t acpi_device_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(acpi_device_lock);
 LIST_HEAD(acpi_wakeup_device_list);
 
 static void acpi_device_release(struct kobject * kobj)
diff -urN linux/drivers/acpi/events/evgpeblk.c 
linux/drivers/acpi/events/evgpeblk.c
--- linux/drivers/acpi/events/evgpeblk.c        2004/11/15 11:49:23     1.9
+++ linux/drivers/acpi/events/evgpeblk.c        2005/01/25 04:28:09     1.10
@@ -925,7 +925,7 @@
 
        /*
         * Runtime option: Should Wake GPEs be enabled at runtime?  The default
-        * is No,they should only be enabled just as the machine goes to sleep.
+        * is No, they should only be enabled just as the machine goes to sleep.
         */
        if (acpi_gbl_leave_wake_gpes_disabled) {
                /*
diff -urN linux/drivers/acpi/sleep/main.c linux/drivers/acpi/sleep/main.c
--- linux/drivers/acpi/sleep/main.c     2004/11/15 11:49:23     1.12
+++ linux/drivers/acpi/sleep/main.c     2005/01/25 04:28:09     1.13
@@ -159,7 +159,7 @@
 
 int acpi_suspend(u32 acpi_state)
 {
-       u32 states[] = {
+       suspend_state_t states[] = {
                [1]     = PM_SUSPEND_STANDBY,
                [3]     = PM_SUSPEND_MEM,
                [4]     = PM_SUSPEND_DISK,
diff -urN linux/drivers/atm/ambassador.c linux/drivers/atm/ambassador.c
--- linux/drivers/atm/ambassador.c      2005/01/13 14:05:50     1.33
+++ linux/drivers/atm/ambassador.c      2005/01/25 04:28:09     1.34
@@ -574,7 +574,6 @@
   amb_cq * cq = &dev->cq;
   volatile amb_cq_ptrs * ptrs = &cq->ptrs;
   command * my_slot;
-  unsigned long timeout;
   
   PRINTD (DBG_FLOW|DBG_CMD, "command_do %p", dev);
   
@@ -599,20 +598,14 @@
     // mail the command
     wr_mem (dev, offsetof(amb_mem, mb.adapter.cmd_address), virt_to_bus 
(ptrs->in));
     
-    // prepare to wait for cq->pending milliseconds
-    // effectively one centisecond on i386
-    timeout = (cq->pending*HZ+999)/1000;
-    
     if (cq->pending > cq->high)
       cq->high = cq->pending;
     spin_unlock (&cq->lock);
     
-    while (timeout) {
-      // go to sleep
-      // PRINTD (DBG_CMD, "wait: sleeping %lu for command", timeout);
-      set_current_state(TASK_UNINTERRUPTIBLE);
-      timeout = schedule_timeout (timeout);
-    }
+    // these comments were in a while-loop before, msleep removes the loop
+    // go to sleep
+    // PRINTD (DBG_CMD, "wait: sleeping %lu for command", timeout);
+    msleep(cq->pending);
     
     // wait for my slot to be reached (all waiters are here or above, until...)
     while (ptrs->out != my_slot) {
@@ -1799,12 +1792,11 @@
   // dump_loader_block (lb);
   wr_mem (dev, offsetof(amb_mem, doorbell), virt_to_bus (lb) & ~onegigmask);
   
-  timeout = command_timeouts[cmd] * HZ/100;
+  timeout = command_timeouts[cmd] * 10;
   
   while (!lb->result || lb->result == cpu_to_be32 (COMMAND_IN_PROGRESS))
     if (timeout) {
-      set_current_state(TASK_UNINTERRUPTIBLE);
-      timeout = schedule_timeout (timeout);
+      timeout = msleep_interruptible(timeout);
     } else {
       PRINTD (DBG_LOAD|DBG_ERR, "command %d timed out", cmd);
       dump_registers (dev);
@@ -1814,10 +1806,10 @@
   
   if (cmd == adapter_start) {
     // wait for start command to acknowledge...
-    timeout = HZ/10;
+    timeout = 100;
     while (rd_plain (dev, offsetof(amb_mem, doorbell)))
       if (timeout) {
-       timeout = schedule_timeout (timeout);
+       timeout = msleep_interruptible(timeout);
       } else {
        PRINTD (DBG_LOAD|DBG_ERR, "start command did not clear doorbell, 
res=%08x",
                be32_to_cpu (lb->result));
@@ -1932,17 +1924,12 @@
   if (diags) { 
     unsigned long timeout;
     // 4.2 second wait
-    timeout = HZ*42/10;
-    while (timeout) {
-      set_current_state(TASK_UNINTERRUPTIBLE);
-      timeout = schedule_timeout (timeout);
-    }
+    msleep(4200);
     // half second time-out
-    timeout = HZ/2;
+    timeout = 500;
     while (!rd_plain (dev, offsetof(amb_mem, mb.loader.ready)))
       if (timeout) {
-        set_current_state(TASK_UNINTERRUPTIBLE);
-       timeout = schedule_timeout (timeout);
+       timeout = msleep_interruptible(timeout);
       } else {
        PRINTD (DBG_LOAD|DBG_ERR, "reset timed out");
        return -ETIMEDOUT;
@@ -2056,14 +2043,12 @@
   wr_mem (dev, offsetof(amb_mem, doorbell), virt_to_bus (&a));
   
   // 2.2 second wait (must not touch doorbell during 2 second DMA test)
-  timeout = HZ*22/10;
-  while (timeout)
-    timeout = schedule_timeout (timeout);
+  msleep(2200);
   // give the adapter another half second?
-  timeout = HZ/2;
+  timeout = 500;
   while (rd_plain (dev, offsetof(amb_mem, doorbell)))
     if (timeout) {
-      timeout = schedule_timeout (timeout);
+      timeout = msleep_interruptible(timeout);
     } else {
       PRINTD (DBG_INIT|DBG_ERR, "adapter init timed out");
       return -ETIMEDOUT;
@@ -2228,17 +2213,12 @@
        spin_lock_init (&dev->rxq[pool].lock);
 }
 
-static int setup_pci_dev(struct pci_dev *pci_dev)
+static void setup_pci_dev(struct pci_dev *pci_dev)
 {
        unsigned char lat;
-       int ret;
       
        // enable bus master accesses
        pci_set_master(pci_dev);
-      
-       ret = pci_enable_device(pci_dev);
-       if (ret < 0)
-               goto out;
 
        // frobnicate latency (upwards, usually)
        pci_read_config_byte (pci_dev, PCI_LATENCY_TIMER, &lat);
@@ -2251,22 +2231,27 @@
                        lat, pci_lat);
                pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, pci_lat);
        }
-out:
-       return ret;
 }
 
 static int __devinit amb_probe(struct pci_dev *pci_dev, const struct 
pci_device_id *pci_ent)
 {
        amb_dev * dev;
        int err;
+       unsigned int irq;
+      
+       err = pci_enable_device(pci_dev);
+       if (err < 0) {
+               PRINTK (KERN_ERR, "skipped broken (PLX rev 2) card");
+               goto out;
+       }
 
        // read resources from PCI configuration space
-       unsigned int irq = pci_dev->irq;
+       irq = pci_dev->irq;
 
        if (pci_dev->device == PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD) {
                PRINTK (KERN_ERR, "skipped broken (PLX rev 2) card");
                err = -EINVAL;
-               goto out;
+               goto out_disable;
        }
 
        PRINTD (DBG_INFO, "found Madge ATM adapter (amb) at"
@@ -2277,7 +2262,7 @@
        err = pci_request_region(pci_dev, 1, DEV_LABEL);
        if (err < 0) {
                PRINTK (KERN_ERR, "IO range already in use!");
-               goto out;
+               goto out_disable;
        }
 
        dev = kmalloc (sizeof(amb_dev), GFP_KERNEL);
@@ -2295,15 +2280,13 @@
                goto out_free;
        }
 
-       err = setup_pci_dev(pci_dev);
-       if (err < 0)
-               goto out_reset;
+       setup_pci_dev(pci_dev);
 
        // grab (but share) IRQ and install handler
        err = request_irq(irq, interrupt_handler, SA_SHIRQ, DEV_LABEL, dev);
        if (err < 0) {
                PRINTK (KERN_ERR, "request IRQ failed!");
-               goto out_disable;
+               goto out_reset;
        }
 
        dev->atm_dev = atm_dev_register (DEV_LABEL, &amb_ops, -1, NULL);
@@ -2337,14 +2320,14 @@
 
 out_free_irq:
        free_irq(irq, dev);
-out_disable:
-       pci_disable_device(pci_dev);
 out_reset:
        amb_reset(dev, 0);
 out_free:
        kfree(dev);
 out_release:
        pci_release_region(pci_dev, 1);
+out_disable:
+       pci_disable_device(pci_dev);
        goto out;
 }
 
diff -urN linux/drivers/atm/he.c linux/drivers/atm/he.c
--- linux/drivers/atm/he.c      2005/01/13 14:05:50     1.17
+++ linux/drivers/atm/he.c      2005/01/25 04:28:09     1.18
@@ -86,44 +86,19 @@
 #undef USE_RBPL_POOL                   /* if memory is tight try this */
 #define USE_TPD_POOL
 /* #undef CONFIG_ATM_HE_USE_SUNI */
-
-/* compatibility */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)
-typedef void irqreturn_t;
-#define IRQ_NONE
-#define IRQ_HANDLED
-#define IRQ_RETVAL(x)
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,9)
-#define __devexit_p(func)              func
-#endif
-
-#ifndef MODULE_LICENSE
-#define MODULE_LICENSE(x)
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,3)
-#define pci_set_drvdata(pci_dev, data) (pci_dev)->driver_data = (data)
-#define pci_get_drvdata(pci_dev)       (pci_dev)->driver_data
-#endif
+/* #undef HE_DEBUG */
 
 #include "he.h"
-
 #include "suni.h"
-
 #include <linux/atm_he.h>
 
 #define hprintk(fmt,args...)   printk(KERN_ERR DEV_LABEL "%d: " fmt, 
he_dev->number , ##args)
 
-#undef DEBUG
-#ifdef DEBUG
+#ifdef HE_DEBUG
 #define HPRINTK(fmt,args...)   printk(KERN_DEBUG DEV_LABEL "%d: " fmt, 
he_dev->number , ##args)
-#else
+#else /* !HE_DEBUG */
 #define HPRINTK(fmt,args...)   do { } while (0)
-#endif /* DEBUG */
-
+#endif /* HE_DEBUG */
 
 /* version definition */
 
@@ -147,8 +122,8 @@
 
 /* globals */
 
-static struct he_dev *he_devs = NULL;
-static int disable64 = 0;
+static struct he_dev *he_devs;
+static int disable64;
 static short nvpibits = -1;
 static short nvcibits = -1;
 static short rx_skb_reserve = 16;
diff -urN linux/drivers/atm/horizon.c linux/drivers/atm/horizon.c
--- linux/drivers/atm/horizon.c 2004/11/15 11:49:23     1.23
+++ linux/drivers/atm/horizon.c 2005/01/25 04:28:09     1.24
@@ -2706,18 +2706,18 @@
        // adapter slot free, read resources from PCI configuration space
        u32 iobase = pci_resource_start (pci_dev, 0);
        u32 * membase = bus_to_virt (pci_resource_start (pci_dev, 1));
-       u8 irq = pci_dev->irq;
+       unsigned int irq;
        unsigned char lat;
 
        PRINTD (DBG_FLOW, "hrz_probe");
 
-       /* XXX DEV_LABEL is a guess */
-       if (!request_region(iobase, HRZ_IO_EXTENT, DEV_LABEL))
+       if (pci_enable_device(pci_dev))
                return -EINVAL;
 
-       if (pci_enable_device(pci_dev)) {
-               err = -EINVAL;
-               goto out_release;
+       /* XXX DEV_LABEL is a guess */
+       if (!request_region(iobase, HRZ_IO_EXTENT, DEV_LABEL)) {
+               return -EINVAL;
+               goto out_disable;
        }
 
        dev = kmalloc(sizeof(hrz_dev), GFP_KERNEL);
@@ -2725,7 +2725,7 @@
                // perhaps we should be nice: deregister all adapters and abort?
                PRINTD(DBG_ERR, "out of memory");
                err = -ENOMEM;
-               goto out_disable;
+               goto out_release;
        }
 
        memset(dev, 0, sizeof(hrz_dev));
@@ -2733,6 +2733,7 @@
        pci_set_drvdata(pci_dev, dev);
 
        // grab IRQ and install handler - move this someplace more sensible
+       irq = pci_dev->irq;
        if (request_irq(irq,
                        interrupt_handler,
                        SA_SHIRQ, /* irqflags guess */
@@ -2846,10 +2847,10 @@
        free_irq(dev->irq, dev);
 out_free:
        kfree(dev);
-out_disable:
-       pci_disable_device(pci_dev);
 out_release:
        release_region(iobase, HRZ_IO_EXTENT);
+out_disable:
+       pci_disable_device(pci_dev);
        goto out;
 }
 
diff -urN linux/drivers/atm/idt77105.c linux/drivers/atm/idt77105.c
--- linux/drivers/atm/idt77105.c        2005/01/13 14:05:50     1.12
+++ linux/drivers/atm/idt77105.c        2005/01/25 04:28:09     1.13
@@ -39,7 +39,7 @@
         unsigned char old_mcr;          /* storage of MCR reg while signal 
lost */
 };
 
-static spinlock_t idt77105_priv_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(idt77105_priv_lock);
 
 #define PRIV(dev) ((struct idt77105_priv *) dev->phy_data)
 
diff -urN linux/drivers/atm/idt77252.c linux/drivers/atm/idt77252.c
--- linux/drivers/atm/idt77252.c        2004/12/04 18:16:02     1.23
+++ linux/drivers/atm/idt77252.c        2005/01/25 04:28:09     1.24
@@ -3136,14 +3136,11 @@
                }
        }
 
-       if (card->soft_tst)
-               vfree(card->soft_tst);
+       vfree(card->soft_tst);
 
-       if (card->scd2vc)
-               vfree(card->scd2vc);
+       vfree(card->scd2vc);
 
-       if (card->vcs)
-               vfree(card->vcs);
+       vfree(card->vcs);
 
        if (card->raw_cell_hnd) {
                pci_free_consistent(card->pcidev, 2 * sizeof(u32),
diff -urN linux/drivers/atm/suni.c linux/drivers/atm/suni.c
--- linux/drivers/atm/suni.c    2004/07/20 20:21:18     1.14
+++ linux/drivers/atm/suni.c    2005/01/25 04:28:09     1.15
@@ -48,7 +48,7 @@
 
 static struct timer_list poll_timer;
 static struct suni_priv *sunis = NULL;
-static spinlock_t sunis_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sunis_lock);
 
 
 #define ADD_LIMITED(s,v) \
diff -urN linux/drivers/base/class_simple.c linux/drivers/base/class_simple.c
--- linux/drivers/base/class_simple.c   2004/12/04 18:16:02     1.6
+++ linux/drivers/base/class_simple.c   2005/01/25 04:28:10     1.7
@@ -27,7 +27,7 @@
 #define to_simple_dev(d) container_of(d, struct simple_dev, class_dev)
 
 static LIST_HEAD(simple_dev_list);
-static spinlock_t simple_dev_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(simple_dev_list_lock);
 
 static void release_simple_dev(struct class_device *class_dev)
 {
diff -urN linux/drivers/block/Kconfig linux/drivers/block/Kconfig
--- linux/drivers/block/Kconfig 2005/01/13 14:05:51     1.21
+++ linux/drivers/block/Kconfig 2005/01/25 04:28:10     1.22
@@ -6,7 +6,7 @@
 
 config BLK_DEV_FD
        tristate "Normal floppy disk support"
-       depends on (!ARCH_S390 && !M68K && !IA64) || Q40 || (SUN3X && BROKEN)
+       depends on (!ARCH_S390 && !M68K && !IA64 && !USERMODE) || Q40 || (SUN3X 
&& BROKEN)
        ---help---
          If you want to use the floppy disk drive(s) of your PC under Linux,
          say Y. Information about this driver, especially important for IBM
@@ -170,7 +170,7 @@
        help
          When enabled (Y), this option allows SCSI tape drives and SCSI medium
          changers (tape robots) to be accessed via a Compaq 5xxx array 
-         controller.  (See Documentation/cciss.txt for more details.)
+         controller.  (See <file:Documentation/cciss.txt> for more details.)
 
          "SCSI support" and "SCSI tape support" must also be enabled for this 
          option to work.
@@ -196,7 +196,7 @@
        ---help---
          Saying Y here will include support for the MM5415 family of
          battery backed (Non-volatile) RAM cards.
-         http://www.umem.com/
+         <http://www.umem.com/>
 
          The cards appear as block devices that can be partitioned into
          as many as 15 partitions.
@@ -208,6 +208,56 @@
          one is chosen dynamically.  Use "devfs" or look in /proc/devices
          for the device number
 
+config BLK_DEV_UBD
+       bool "Virtual block device"
+       depends on USERMODE
+       ---help---
+          The User-Mode Linux port includes a driver called UBD which will let
+          you access arbitrary files on the host computer as block devices.
+          Unless you know that you do not need such virtual block devices say
+          Y here.
+
+config BLK_DEV_UBD_SYNC
+       bool "Always do synchronous disk IO for UBD"
+       depends on BLK_DEV_UBD
+       ---help---
+         Writes to the virtual block device are not immediately written to the
+         host's disk; this may cause problems if, for example, the User-Mode
+         Linux 'Virtual Machine' uses a journalling filesystem and the host
+         computer crashes.
+
+          Synchronous operation (i.e. always writing data to the host's disk
+          immediately) is configurable on a per-UBD basis by using a special
+          kernel command line option.  Alternatively, you can say Y here to
+          turn on synchronous operation by default for all block devices.
+
+          If you're running a journalling file system (like reiserfs, for
+          example) in your virtual machine, you will want to say Y here.  If
+          you care for the safety of the data in your virtual machine, Y is a
+          wise choice too.  In all other cases (for example, if you're just
+          playing around with User-Mode Linux) you can choose N.
+
+config BLK_DEV_COW_COMMON
+       bool
+       default BLK_DEV_UBD
+
+config MMAPPER
+       tristate "Example IO memory driver (BROKEN)"
+       depends on USERMODE && BROKEN
+       ---help---
+          The User-Mode Linux port can provide support for IO Memory
+          emulation with this option.  This allows a host file to be
+          specified as an I/O region on the kernel command line. That file
+          will be mapped into UML's kernel address space where a driver can
+          locate it and do whatever it wants with the memory, including
+          providing an interface to it for UML processes to use.
+
+          For more information, see
+          <http://user-mode-linux.sourceforge.net/iomem.html>.
+
+          If you'd like to be able to provide a simulated IO port space for
+          User-Mode Linux processes, say Y.  If unsure, say N.
+
 config BLK_DEV_LOOP
        tristate "Loopback device support"
        ---help---
@@ -401,9 +451,11 @@
 
          If you are not sure, leave it set to "0".
 
+#XXX - it makes sense to enable this only for 32-bit subarch's, not for x86_64
+#for instance.
 config LBD
        bool "Support for Large Block Devices"
-       depends on X86 || MIPS32 || PPC32 || ARCH_S390_31 || SUPERH
+       depends on X86 || MIPS32 || PPC32 || ARCH_S390_31 || SUPERH || USERMODE
        help
          Say Y here if you want to attach large (bigger than 2TB) discs to
          your machine, or if you want to have a raid or loopback device
@@ -411,6 +463,7 @@
 
 config CDROM_PKTCDVD
        tristate "Packet writing on CD/DVD media"
+       depends on !USERMODE
        help
          If you have a CDROM drive that supports packet writing, say Y to
          include preliminary support. It should work with any MMC/Mt Fuji
@@ -449,7 +502,6 @@
 config ATA_OVER_ETH
        tristate "ATA over Ethernet support"
        depends on NET
-       default m
        help
        This driver provides Support for ATA over Ethernet block
        devices like the Coraid EtherDrive (R) Storage Blade.
diff -urN linux/drivers/block/acsi.c linux/drivers/block/acsi.c
--- linux/drivers/block/acsi.c  2003/10/09 13:09:29     1.54
+++ linux/drivers/block/acsi.c  2005/01/25 04:28:10     1.55
@@ -250,7 +250,7 @@
 static int                             CurrentNSect;
 static char                            *CurrentBuffer;
 
-static spinlock_t                      acsi_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(acsi_lock);
 
 
 #define SET_TIMER()    mod_timer(&acsi_timer, jiffies + ACSI_TIMEOUT)
diff -urN linux/drivers/block/amiflop.c linux/drivers/block/amiflop.c
--- linux/drivers/block/amiflop.c       2004/11/15 11:49:24     1.51
+++ linux/drivers/block/amiflop.c       2005/01/25 04:28:10     1.52
@@ -163,7 +163,7 @@
 static int writefromint;
 static char *raw_buf;
 
-static spinlock_t amiflop_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(amiflop_lock);
 
 #define RAW_BUF_SIZE 30000  /* size of raw disk data */
 
diff -urN linux/drivers/block/ataflop.c linux/drivers/block/ataflop.c
--- linux/drivers/block/ataflop.c       2004/08/06 00:33:24     1.49
+++ linux/drivers/block/ataflop.c       2005/01/25 04:28:10     1.50
@@ -140,7 +140,7 @@
 
 static int DriveType = TYPE_HD;
 
-static spinlock_t ataflop_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ataflop_lock);
 
 /* Array for translating minors into disk formats */
 static struct {
diff -urN linux/drivers/block/cciss.c linux/drivers/block/cciss.c
--- linux/drivers/block/cciss.c 2005/01/13 14:05:51     1.66
+++ linux/drivers/block/cciss.c 2005/01/25 04:28:10     1.67
@@ -146,11 +146,18 @@
 static void cciss_procinit(int i) {}
 #endif /* CONFIG_PROC_FS */
 
+#ifdef CONFIG_COMPAT
+static long cciss_compat_ioctl(struct file *f, unsigned cmd, unsigned long 
arg);
+#endif
+
 static struct block_device_operations cciss_fops  = {
        .owner          = THIS_MODULE,
        .open           = cciss_open, 
        .release        = cciss_release,
         .ioctl         = cciss_ioctl,
+#ifdef CONFIG_COMPAT
+       .compat_ioctl   = cciss_compat_ioctl,
+#endif
        .revalidate_disk= cciss_revalidate,
 };
 
@@ -477,80 +484,50 @@
 }
 
 #ifdef CONFIG_COMPAT
-/* for AMD 64 bit kernel compatibility with 32-bit userland ioctls */
-extern long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
-extern int
-register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int,
-      unsigned int, unsigned long, struct file *));
-extern int unregister_ioctl32_conversion(unsigned int cmd);
-
-static int cciss_ioctl32_passthru(unsigned int fd, unsigned cmd, unsigned long 
arg, struct file *file);
-static int cciss_ioctl32_big_passthru(unsigned int fd, unsigned cmd, unsigned 
long arg,
-       struct file *file);
-
-typedef int (*handler_type) (unsigned int, unsigned int, unsigned long, struct 
file *);
-
-static struct ioctl32_map {
-       unsigned int cmd;
-       handler_type handler;
-       int registered;
-} cciss_ioctl32_map[] = {
-       { CCISS_GETPCIINFO,     (handler_type) sys_ioctl, 0 },
-       { CCISS_GETINTINFO,     (handler_type) sys_ioctl, 0 },
-       { CCISS_SETINTINFO,     (handler_type) sys_ioctl, 0 },
-       { CCISS_GETNODENAME,    (handler_type) sys_ioctl, 0 },
-       { CCISS_SETNODENAME,    (handler_type) sys_ioctl, 0 },
-       { CCISS_GETHEARTBEAT,   (handler_type) sys_ioctl, 0 },
-       { CCISS_GETBUSTYPES,    (handler_type) sys_ioctl, 0 },
-       { CCISS_GETFIRMVER,     (handler_type) sys_ioctl, 0 },
-       { CCISS_GETDRIVVER,     (handler_type) sys_ioctl, 0 },
-       { CCISS_REVALIDVOLS,    (handler_type) sys_ioctl, 0 },
-       { CCISS_PASSTHRU32,     cciss_ioctl32_passthru, 0 },
-       { CCISS_DEREGDISK,      (handler_type) sys_ioctl, 0 },
-       { CCISS_REGNEWDISK,     (handler_type) sys_ioctl, 0 },
-       { CCISS_REGNEWD,        (handler_type) sys_ioctl, 0 },
-       { CCISS_RESCANDISK,     (handler_type) sys_ioctl, 0 },
-       { CCISS_GETLUNINFO,     (handler_type) sys_ioctl, 0 },
-       { CCISS_BIG_PASSTHRU32, cciss_ioctl32_big_passthru, 0 },
-};
-#define NCCISS_IOCTL32_ENTRIES (sizeof(cciss_ioctl32_map) / 
sizeof(cciss_ioctl32_map[0]))
-static void register_cciss_ioctl32(void)
-{
-       int i, rc;
 
-       for (i=0; i < NCCISS_IOCTL32_ENTRIES; i++) {
-               rc = register_ioctl32_conversion(
-                       cciss_ioctl32_map[i].cmd,
-                       cciss_ioctl32_map[i].handler);
-               if (rc != 0) {
-                       printk(KERN_WARNING "cciss: failed to register "
-                               "32 bit compatible ioctl 0x%08x\n",
-                               cciss_ioctl32_map[i].cmd);
-                       cciss_ioctl32_map[i].registered = 0;
-               } else
-                       cciss_ioctl32_map[i].registered = 1;
-       }
+static int do_ioctl(struct file *f, unsigned cmd, unsigned long arg)
+{
+       int ret;
+       lock_kernel();
+       ret = cciss_ioctl(f->f_dentry->d_inode, f, cmd, arg);
+       unlock_kernel();
+       return ret;
 }
-static void unregister_cciss_ioctl32(void)
+
+static int cciss_ioctl32_passthru(struct file *f, unsigned cmd, unsigned long 
arg);
+static int cciss_ioctl32_big_passthru(struct file *f, unsigned cmd, unsigned 
long arg);
+
+static long cciss_compat_ioctl(struct file *f, unsigned cmd, unsigned long arg)
 {
-       int i, rc;
+       switch (cmd) {
+       case CCISS_GETPCIINFO:
+       case CCISS_GETINTINFO:
+       case CCISS_SETINTINFO:
+       case CCISS_GETNODENAME:
+       case CCISS_SETNODENAME:
+       case CCISS_GETHEARTBEAT:
+       case CCISS_GETBUSTYPES:
+       case CCISS_GETFIRMVER:
+       case CCISS_GETDRIVVER:
+       case CCISS_REVALIDVOLS:
+       case CCISS_DEREGDISK:
+       case CCISS_REGNEWDISK:
+       case CCISS_REGNEWD:
+       case CCISS_RESCANDISK:
+       case CCISS_GETLUNINFO:
+               return do_ioctl(f, cmd, arg);
+
+       case CCISS_PASSTHRU32:
+               return cciss_ioctl32_passthru(f, cmd, arg);
+       case CCISS_BIG_PASSTHRU32:
+               return cciss_ioctl32_big_passthru(f, cmd, arg);
 
-       for (i=0; i < NCCISS_IOCTL32_ENTRIES; i++) {
-               if (!cciss_ioctl32_map[i].registered)
-                       continue;
-               rc = unregister_ioctl32_conversion(
-                       cciss_ioctl32_map[i].cmd);
-               if (rc == 0) {
-                       cciss_ioctl32_map[i].registered = 0;
-                       continue;
-               }
-               printk(KERN_WARNING "cciss: failed to unregister "
-                       "32 bit compatible ioctl 0x%08x\n",
-                       cciss_ioctl32_map[i].cmd);
+       default:
+               return -ENOIOCTLCMD;
        }
 }
-int cciss_ioctl32_passthru(unsigned int fd, unsigned cmd, unsigned long arg,
-       struct file *file)
+
+static int cciss_ioctl32_passthru(struct file *f, unsigned cmd, unsigned long 
arg)
 {
        IOCTL32_Command_struct __user *arg32 =
                (IOCTL32_Command_struct __user *) arg;
@@ -571,7 +548,7 @@
        if (err)
                return -EFAULT;
 
-       err = sys_ioctl(fd, CCISS_PASSTHRU, (unsigned long) p);
+       err = do_ioctl(f, CCISS_PASSTHRU, (unsigned long) p);
        if (err)
                return err;
        err |= copy_in_user(&arg32->error_info, &p->error_info, 
sizeof(arg32->error_info));
@@ -580,8 +557,7 @@
        return err;
 }
 
-int cciss_ioctl32_big_passthru(unsigned int fd, unsigned cmd, unsigned long 
arg,
-       struct file *file)
+static int cciss_ioctl32_big_passthru(struct file *file, unsigned cmd, 
unsigned long arg)
 {
        BIG_IOCTL32_Command_struct __user *arg32 =
                (BIG_IOCTL32_Command_struct __user *) arg;
@@ -603,7 +579,7 @@
        if (err)
                 return -EFAULT;
 
-       err = sys_ioctl(fd, CCISS_BIG_PASSTHRU, (unsigned long) p);
+       err = do_ioctl(file, CCISS_BIG_PASSTHRU, (unsigned long) p);
        if (err)
                return err;
        err |= copy_in_user(&arg32->error_info, &p->error_info, 
sizeof(arg32->error_info));
@@ -611,9 +587,6 @@
                return -EFAULT;
        return err;
 }
-#else
-static inline void register_cciss_ioctl32(void) {}
-static inline void unregister_cciss_ioctl32(void) {}
 #endif
 /*
  * ioctl 
@@ -2915,7 +2888,6 @@
 
 static int __init init_cciss_module(void)
 {
-       register_cciss_ioctl32();
        return ( cciss_init());
 }
 
@@ -2923,7 +2895,6 @@
 {
        int i;
 
-       unregister_cciss_ioctl32();
        pci_unregister_driver(&cciss_pci_driver);
        /* double check that all controller entrys have been removed */
        for (i=0; i< MAX_CTLR; i++) 
diff -urN linux/drivers/block/cfq-iosched.c linux/drivers/block/cfq-iosched.c
--- linux/drivers/block/cfq-iosched.c   2004/12/27 02:15:52     1.8
+++ linux/drivers/block/cfq-iosched.c   2005/01/25 04:28:10     1.9
@@ -622,8 +622,10 @@
                        cfq_sort_rr_list(cfqq, 0);
                }
 
-               crq->accounted = 0;
-               cfqq->cfqd->rq_in_driver--;
+               if (crq->accounted) {
+                       crq->accounted = 0;
+                       cfqq->cfqd->rq_in_driver--;
+               }
        }
        list_add(&rq->queuelist, &q->queue_head);
 }
diff -urN linux/drivers/block/elevator.c linux/drivers/block/elevator.c
--- linux/drivers/block/elevator.c      2004/11/15 11:49:24     1.40
+++ linux/drivers/block/elevator.c      2005/01/25 04:28:10     1.41
@@ -37,7 +37,7 @@
 
 #include <asm/uaccess.h>
 
-static spinlock_t elv_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(elv_list_lock);
 static LIST_HEAD(elv_list);
 
 /*
@@ -170,8 +170,6 @@
 #else
 #error "You must build at least 1 IO scheduler into the kernel"
 #endif
-       printk(KERN_INFO "elevator: using %s as default io scheduler\n",
-                                                       chosen_elevator);
 }
 
 static int __init elevator_setup(char *str)
@@ -515,7 +513,10 @@
        list_add_tail(&e->list, &elv_list);
        spin_unlock_irq(&elv_list_lock);
 
-       printk(KERN_INFO "io scheduler %s registered\n", e->elevator_name);
+       printk(KERN_INFO "io scheduler %s registered", e->elevator_name);
+       if (!strcmp(e->elevator_name, chosen_elevator))
+               printk(" (default)");
+       printk("\n");
        return 0;
 }
 EXPORT_SYMBOL_GPL(elv_register);
diff -urN linux/drivers/block/floppy.c linux/drivers/block/floppy.c
--- linux/drivers/block/floppy.c        2005/01/13 14:05:51     1.100
+++ linux/drivers/block/floppy.c        2005/01/25 04:28:10     1.101
@@ -216,7 +216,7 @@
  * record each buffers capabilities
  */
 
-static spinlock_t floppy_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(floppy_lock);
 static struct completion device_release;
 
 static unsigned short virtual_dma_port = 0x3f0;
@@ -1072,7 +1072,7 @@
        return 0;
 }
 
-static spinlock_t floppy_hlt_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(floppy_hlt_lock);
 static int hlt_disabled;
 static void floppy_disable_hlt(void)
 {
@@ -4415,7 +4415,7 @@
        return err;
 }
 
-static spinlock_t floppy_usage_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(floppy_usage_lock);
 
 static int floppy_grab_irq_and_dma(void)
 {
diff -urN linux/drivers/block/genhd.c linux/drivers/block/genhd.c
--- linux/drivers/block/genhd.c 2005/01/13 14:05:51     1.77
+++ linux/drivers/block/genhd.c 2005/01/25 04:28:10     1.78
@@ -19,10 +19,11 @@
 
 static struct subsystem block_subsys;
 
+static DECLARE_MUTEX(block_subsys_sem);
+
 /*
  * Can be deleted altogether. Later.
  *
- * Modified under both block_subsys.rwsem and major_names_lock.
  */
 static struct blk_major_name {
        struct blk_major_name *next;
@@ -30,8 +31,6 @@
        char name[16];
 } *major_names[MAX_PROBE_HASH];
 
-static spinlock_t major_names_lock = SPIN_LOCK_UNLOCKED;
-
 /* index in the above - for now: assume no multimajor ranges */
 static inline int major_to_index(int major)
 {
@@ -47,13 +46,13 @@
 
        len = sprintf(p, "\nBlock devices:\n");
 
-       down_read(&block_subsys.rwsem);
+       down(&block_subsys_sem);
        for (i = 0; i < ARRAY_SIZE(major_names); i++) {
                for (n = major_names[i]; n; n = n->next)
                        len += sprintf(p+len, "%3d %s\n",
                                       n->major, n->name);
        }
-       up_read(&block_subsys.rwsem);
+       up(&block_subsys_sem);
 
        return len;
 }
@@ -63,9 +62,8 @@
 {
        struct blk_major_name **n, *p;
        int index, ret = 0;
-       unsigned long flags;
 
-       down_write(&block_subsys.rwsem);
+       down(&block_subsys_sem);
 
        /* temporary */
        if (major == 0) {
@@ -95,7 +93,6 @@
        p->next = NULL;
        index = major_to_index(major);
 
-       spin_lock_irqsave(&major_names_lock, flags);
        for (n = &major_names[index]; *n; n = &(*n)->next) {
                if ((*n)->major == major)
                        break;
@@ -104,7 +101,6 @@
                *n = p;
        else
                ret = -EBUSY;
-       spin_unlock_irqrestore(&major_names_lock, flags);
 
        if (ret < 0) {
                printk("register_blkdev: cannot get major %d for %s\n",
@@ -112,7 +108,7 @@
                kfree(p);
        }
 out:
-       up_write(&block_subsys.rwsem);
+       up(&block_subsys_sem);
        return ret;
 }
 
@@ -124,11 +120,9 @@
        struct blk_major_name **n;
        struct blk_major_name *p = NULL;
        int index = major_to_index(major);
-       unsigned long flags;
        int ret = 0;
 
-       down_write(&block_subsys.rwsem);
-       spin_lock_irqsave(&major_names_lock, flags);
+       down(&block_subsys_sem);
        for (n = &major_names[index]; *n; n = &(*n)->next)
                if ((*n)->major == major)
                        break;
@@ -138,8 +132,7 @@
                p = *n;
                *n = p->next;
        }
-       spin_unlock_irqrestore(&major_names_lock, flags);
-       up_write(&block_subsys.rwsem);
+       up(&block_subsys_sem);
        kfree(p);
 
        return ret;
@@ -233,7 +226,7 @@
        struct list_head *p;
        loff_t l = *pos;
 
-       down_read(&block_subsys.rwsem);
+       down(&block_subsys_sem);
        list_for_each(p, &block_subsys.kset.list)
                if (!l--)
                        return list_entry(p, struct gendisk, kobj.entry);
@@ -250,7 +243,7 @@
 
 static void part_stop(struct seq_file *part, void *v)
 {
-       up_read(&block_subsys.rwsem);
+       up(&block_subsys_sem);
 }
 
 static int show_partition(struct seq_file *part, void *v)
@@ -322,12 +315,6 @@
 /*
  * kobject & sysfs bindings for block devices
  */
-
-struct disk_attribute {
-       struct attribute attr;
-       ssize_t (*show)(struct gendisk *, char *);
-};
-
 static ssize_t disk_attr_show(struct kobject *kobj, struct attribute *attr,
                              char *page)
 {
@@ -508,7 +495,7 @@
        loff_t k = *pos;
        struct list_head *p;
 
-       down_read(&block_subsys.rwsem);
+       down(&block_subsys_sem);
        list_for_each(p, &block_subsys.kset.list)
                if (!k--)
                        return list_entry(p, struct gendisk, kobj.entry);
@@ -525,7 +512,7 @@
 
 static void diskstats_stop(struct seq_file *part, void *v)
 {
-       up_read(&block_subsys.rwsem);
+       up(&block_subsys_sem);
 }
 
 static int diskstats_show(struct seq_file *s, void *v)
diff -urN linux/drivers/block/ioctl.c linux/drivers/block/ioctl.c
--- linux/drivers/block/ioctl.c 2004/10/12 14:36:35     1.10
+++ linux/drivers/block/ioctl.c 2005/01/25 04:28:11     1.11
@@ -3,6 +3,7 @@
 #include <linux/blkpg.h>
 #include <linux/backing-dev.h>
 #include <linux/buffer_head.h>
+#include <linux/smp_lock.h>
 #include <asm/uaccess.h>
 
 static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg 
__user *arg)
@@ -220,3 +221,19 @@
        }
        return -ENOTTY;
 }
+
+/* Most of the generic ioctls are handled in the normal fallback path.
+   This assumes the blkdev's low level compat_ioctl always returns
+   ENOIOCTLCMD for unknown ioctls. */
+long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
+{
+       struct block_device *bdev = file->f_dentry->d_inode->i_bdev;
+       struct gendisk *disk = bdev->bd_disk;
+       int ret = -ENOIOCTLCMD;
+       if (disk->fops->compat_ioctl) {
+               lock_kernel();
+               ret = disk->fops->compat_ioctl(file, cmd, arg);
+               unlock_kernel();
+       }
+       return ret;
+}
diff -urN linux/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
--- linux/drivers/block/ll_rw_blk.c     2004/12/04 18:16:02     1.140
+++ linux/drivers/block/ll_rw_blk.c     2005/01/25 04:28:11     1.141
@@ -1438,6 +1438,7 @@
        struct request_list *rl = &q->rq;
 
        rl->count[READ] = rl->count[WRITE] = 0;
+       rl->starved[READ] = rl->starved[WRITE] = 0;
        init_waitqueue_head(&rl->wait[READ]);
        init_waitqueue_head(&rl->wait[WRITE]);
        init_waitqueue_head(&rl->drain);
@@ -1618,6 +1619,22 @@
        ioc->last_waited = jiffies;
 }
 
+static void __freed_request(request_queue_t *q, int rw)
+{
+       struct request_list *rl = &q->rq;
+
+       if (rl->count[rw] < queue_congestion_off_threshold(q))
+               clear_queue_congested(q, rw);
+
+       if (rl->count[rw] + 1 <= q->nr_requests) {
+               smp_mb();
+               if (waitqueue_active(&rl->wait[rw]))
+                       wake_up(&rl->wait[rw]);
+
+               blk_clear_queue_full(q, rw);
+       }
+}
+
 /*
  * A request has just been released.  Account for it, update the full and
  * congestion status, wake up any waiters.   Called under q->queue_lock.
@@ -1627,17 +1644,17 @@
        struct request_list *rl = &q->rq;
 
        rl->count[rw]--;
-       if (rl->count[rw] < queue_congestion_off_threshold(q))
-               clear_queue_congested(q, rw);
-       if (rl->count[rw]+1 <= q->nr_requests) {
+
+       __freed_request(q, rw);
+
+       if (unlikely(rl->starved[rw ^ 1]))
+               __freed_request(q, rw ^ 1);
+
+       if (!rl->count[READ] && !rl->count[WRITE]) {
                smp_mb();
-               if (waitqueue_active(&rl->wait[rw]))
-                       wake_up(&rl->wait[rw]);
-               blk_clear_queue_full(q, rw);
+               if (unlikely(waitqueue_active(&rl->drain)))
+                       wake_up(&rl->drain);
        }
-       if (unlikely(waitqueue_active(&rl->drain)) &&
-           !rl->count[READ] && !rl->count[WRITE])
-               wake_up(&rl->drain);
 }
 
 #define blkdev_free_rq(list) list_entry((list)->next, struct request, 
queuelist)
@@ -1669,8 +1686,7 @@
 
        switch (elv_may_queue(q, rw)) {
                case ELV_MQUEUE_NO:
-                       spin_unlock_irq(q->queue_lock);
-                       goto out;
+                       goto rq_starved;
                case ELV_MQUEUE_MAY:
                        break;
                case ELV_MQUEUE_MUST:
@@ -1688,6 +1704,7 @@
 
 get_rq:
        rl->count[rw]++;
+       rl->starved[rw] = 0;
        if (rl->count[rw] >= queue_congestion_on_threshold(q))
                set_queue_congested(q, rw);
        spin_unlock_irq(q->queue_lock);
@@ -1703,6 +1720,18 @@
                 */
                spin_lock_irq(q->queue_lock);
                freed_request(q, rw);
+
+               /*
+                * in the very unlikely event that allocation failed and no
+                * requests for this direction was pending, mark us starved
+                * so that freeing of a request in the other direction will
+                * notice us. another possible fix would be to split the
+                * rq mempool into READ and WRITE
+                */
+rq_starved:
+               if (unlikely(rl->count[rw] == 0))
+                       rl->starved[rw] = 1;
+
                spin_unlock_irq(q->queue_lock);
                goto out;
        }
diff -urN linux/drivers/block/nbd.c linux/drivers/block/nbd.c
--- linux/drivers/block/nbd.c   2005/01/13 14:05:51     1.67
+++ linux/drivers/block/nbd.c   2005/01/25 04:28:11     1.68
@@ -92,7 +92,7 @@
  *    a single lock.
  * Thanks go to Jens Axboe and Al Viro for their LKML emails explaining this!
  */
-static spinlock_t nbd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nbd_lock);
 
 #ifndef NDEBUG
 static const char *ioctl_cmd_to_ascii(int cmd)
diff -urN linux/drivers/block/noop-iosched.c linux/drivers/block/noop-iosched.c
--- linux/drivers/block/noop-iosched.c  2005/01/13 14:05:51     1.4
+++ linux/drivers/block/noop-iosched.c  2005/01/25 04:28:11     1.5
@@ -52,12 +52,10 @@
 static void elevator_noop_add_request(request_queue_t *q, struct request *rq,
                                      int where)
 {
-       struct list_head *insert = q->queue_head.prev;
-
        if (where == ELEVATOR_INSERT_FRONT)
-               insert = &q->queue_head;
-
-       list_add_tail(&rq->queuelist, &q->queue_head);
+               list_add(&rq->queuelist, &q->queue_head);
+       else
+               list_add_tail(&rq->queuelist, &q->queue_head);
 
        /*
         * new merges must not precede this barrier
diff -urN linux/drivers/block/ps2esdi.c linux/drivers/block/ps2esdi.c
--- linux/drivers/block/ps2esdi.c       2005/01/13 14:05:51     1.64
+++ linux/drivers/block/ps2esdi.c       2005/01/25 04:28:11     1.65
@@ -108,7 +108,7 @@
 struct ps2esdi_i_struct {
        unsigned int head, sect, cyl, wpcom, lzone, ctl;
 };
-static spinlock_t ps2esdi_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ps2esdi_lock);
 static struct request_queue *ps2esdi_queue;
 static struct request *current_req;
 
diff -urN linux/drivers/block/scsi_ioctl.c linux/drivers/block/scsi_ioctl.c
--- linux/drivers/block/scsi_ioctl.c    2005/01/13 14:05:51     1.29
+++ linux/drivers/block/scsi_ioctl.c    2005/01/25 04:28:11     1.30
@@ -199,7 +199,7 @@
                        return 0;
        }
 
-       if (!(type & CMD_WARNED)) {
+       if (!type) {
                cmd_type[cmd[0]] = CMD_WARNED;
                printk(KERN_WARNING "scsi: unknown opcode 0x%02x\n", cmd[0]);
        }
@@ -339,7 +339,8 @@
                         struct gendisk *bd_disk, Scsi_Ioctl_Command __user 
*sic)
 {
        struct request *rq;
-       int err, in_len, out_len, bytes, opcode, cmdlen;
+       int err;
+       unsigned int in_len, out_len, bytes, opcode, cmdlen;
        char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE];
 
        /*
diff -urN linux/drivers/block/swim3.c linux/drivers/block/swim3.c
--- linux/drivers/block/swim3.c 2004/12/04 18:16:02     1.46
+++ linux/drivers/block/swim3.c 2005/01/25 04:28:11     1.47
@@ -206,7 +206,7 @@
 
 static struct floppy_state floppy_states[MAX_FLOPPIES];
 static int floppy_count = 0;
-static spinlock_t swim3_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(swim3_lock);
 
 static unsigned short write_preamble[] = {
        0x4e4e, 0x4e4e, 0x4e4e, 0x4e4e, 0x4e4e, /* gap field */
diff -urN linux/drivers/block/swim_iop.c linux/drivers/block/swim_iop.c
--- linux/drivers/block/swim_iop.c      2003/10/09 13:09:29     1.29
+++ linux/drivers/block/swim_iop.c      2005/01/25 04:28:11     1.30
@@ -76,7 +76,7 @@
 static int floppy_count;
 
 static struct floppy_state floppy_states[MAX_FLOPPIES];
-static spinlock_t swim_iop_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(swim_iop_lock);
 
 #define CURRENT elv_next_request(swim_queue)
 
diff -urN linux/drivers/block/ub.c linux/drivers/block/ub.c
--- linux/drivers/block/ub.c    2004/12/04 18:16:02     1.5
+++ linux/drivers/block/ub.c    2005/01/25 04:28:11     1.6
@@ -108,7 +108,8 @@
  */
 #define UB_URB_TIMEOUT (HZ*2)
 #define UB_DATA_TIMEOUT        (HZ*5)  /* ZIP does spin-ups in the data phase 
*/
-#define UB_CTRL_TIMEOUT        (HZ/2) /* 500ms ought to be enough to clear a 
stall */
+#define UB_STAT_TIMEOUT        (HZ*5)  /* Same spinups and eject for a 
dataless cmd. */
+#define UB_CTRL_TIMEOUT        (HZ/2)  /* 500ms ought to be enough to clear a 
stall */
 
 /*
  * An instance of a SCSI command in transit.
@@ -307,6 +308,7 @@
 static void ub_scsi_dispatch(struct ub_dev *sc);
 static void ub_scsi_urb_compl(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
 static void ub_state_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd, int rc);
+static void __ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
 static void ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
 static void ub_state_sense(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
 static int ub_submit_clear_stall(struct ub_dev *sc, struct ub_scsi_cmd *cmd,
@@ -334,7 +336,7 @@
  */
 #define UB_MAX_HOSTS  26
 static char ub_hostv[UB_MAX_HOSTS];
-static spinlock_t ub_lock = SPIN_LOCK_UNLOCKED;        /* Locks globals and 
->openc */
+static DEFINE_SPINLOCK(ub_lock);       /* Locks globals and ->openc */
 
 /*
  * The SCSI command tracing procedures.
@@ -894,7 +896,7 @@
                if (urb->status == -EPIPE) {
                        /*
                         * STALL while clearning STALL.
-                        * A STALL is illegal on a control pipe!
+                        * The control pipe clears itself - nothing to do.
                         * XXX Might try to reset the device here and retry.
                         */
                        printk(KERN_NOTICE "%s: "
@@ -917,7 +919,7 @@
                if (urb->status == -EPIPE) {
                        /*
                         * STALL while clearning STALL.
-                        * A STALL is illegal on a control pipe!
+                        * The control pipe clears itself - nothing to do.
                         * XXX Might try to reset the device here and retry.
                         */
                        printk(KERN_NOTICE "%s: "
@@ -941,7 +943,8 @@
                        rc = ub_submit_clear_stall(sc, cmd, sc->last_pipe);
                        if (rc != 0) {
                                printk(KERN_NOTICE "%s: "
-                                   "unable to submit clear for device %u 
(%d)\n",
+                                   "unable to submit clear for device %u"
+                                   " (code %d)\n",
                                    sc->name, sc->dev->devnum, rc);
                                /*
                                 * This is typically ENOMEM or some other such 
shit.
@@ -1001,7 +1004,8 @@
                        rc = ub_submit_clear_stall(sc, cmd, sc->last_pipe);
                        if (rc != 0) {
                                printk(KERN_NOTICE "%s: "
-                                   "unable to submit clear for device %u 
(%d)\n",
+                                   "unable to submit clear for device %u"
+                                   " (code %d)\n",
                                    sc->name, sc->dev->devnum, rc);
                                /*
                                 * This is typically ENOMEM or some other such 
shit.
@@ -1033,7 +1037,8 @@
                        rc = ub_submit_clear_stall(sc, cmd, sc->last_pipe);
                        if (rc != 0) {
                                printk(KERN_NOTICE "%s: "
-                                   "unable to submit clear for device %u 
(%d)\n",
+                                   "unable to submit clear for device %u"
+                                   " (code %d)\n",
                                    sc->name, sc->dev->devnum, rc);
                                /*
                                 * This is typically ENOMEM or some other such 
shit.
@@ -1061,33 +1066,7 @@
                                    sc->name, sc->dev->devnum);
                                goto Bad_End;
                        }
-
-                       /*
-                        * ub_state_stat only not dropping the count...
-                        */
-                       UB_INIT_COMPLETION(sc->work_done);
-
-                       sc->last_pipe = sc->recv_bulk_pipe;
-                       usb_fill_bulk_urb(&sc->work_urb, sc->dev,
-                           sc->recv_bulk_pipe, &sc->work_bcs,
-                           US_BULK_CS_WRAP_LEN, ub_urb_complete, sc);
-                       sc->work_urb.transfer_flags = URB_ASYNC_UNLINK;
-                       sc->work_urb.actual_length = 0;
-                       sc->work_urb.error_count = 0;
-                       sc->work_urb.status = 0;
-
-                       rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC);
-                       if (rc != 0) {
-                               /* XXX Clear stalls */
-                               printk("%s: CSW #%d submit failed (%d)\n",
-                                  sc->name, cmd->tag, rc); /* P3 */
-                               ub_complete(&sc->work_done);
-                               ub_state_done(sc, cmd, rc);
-                               return;
-                       }
-
-                       sc->work_timer.expires = jiffies + UB_URB_TIMEOUT;
-                       add_timer(&sc->work_timer);
+                       __ub_state_stat(sc, cmd);
                        return;
                }
 
@@ -1108,17 +1087,31 @@
                        goto Bad_End;
                }
 
+#if 0
                if (bcs->Signature != cpu_to_le32(US_BULK_CS_SIGN) &&
                    bcs->Signature != cpu_to_le32(US_BULK_CS_OLYMPUS_SIGN)) {
-                       /* XXX Rate-limit, even for P3 tagged */
-                       /* P3 */ printk("ub: signature 0x%x\n", bcs->Signature);
                        /* Windows ignores signatures, so do we. */
                }
+#endif
 
                if (bcs->Tag != cmd->tag) {
-                       /* P3 */ printk("%s: tag orig 0x%x reply 0x%x\n",
-                           sc->name, cmd->tag, bcs->Tag);
-                       goto Bad_End;
+                       /*
+                        * This usually happens when we disagree with the
+                        * device's microcode about something. For instance,
+                        * a few of them throw this after timeouts. They buffer
+                        * commands and reply at commands we timed out before.
+                        * Without flushing these replies we loop forever.
+                        */
+                       if (++cmd->stat_count >= 4) {
+                               printk(KERN_NOTICE "%s: "
+                                   "tag mismatch orig 0x%x reply 0x%x "
+                                   "on device %u\n",
+                                   sc->name, cmd->tag, bcs->Tag,
+                                   sc->dev->devnum);
+                               goto Bad_End;
+                       }
+                       __ub_state_stat(sc, cmd);
+                       return;
                }
 
                switch (bcs->Status) {
@@ -1174,9 +1167,9 @@
 
 /*
  * Factorization helper for the command state machine:
- * Submit a CSW read and go to STAT state.
+ * Submit a CSW read.
  */
-static void ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
+static void __ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
 {
        int rc;
 
@@ -1192,14 +1185,23 @@
 
        if ((rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC)) != 0) {
                /* XXX Clear stalls */
-               printk("ub: CSW #%d submit failed (%d)\n", cmd->tag, rc); /* P3 
*/
+               printk("%s: CSW #%d submit failed (%d)\n", sc->name, cmd->tag, 
rc); /* P3 */
                ub_complete(&sc->work_done);
                ub_state_done(sc, cmd, rc);
                return;
        }
 
-       sc->work_timer.expires = jiffies + UB_URB_TIMEOUT;
+       sc->work_timer.expires = jiffies + UB_STAT_TIMEOUT;
        add_timer(&sc->work_timer);
+}
+
+/*
+ * Factorization helper for the command state machine:
+ * Submit a CSW read and go to STAT state.
+ */
+static void ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
+{
+       __ub_state_stat(sc, cmd);
 
        cmd->stat_count = 0;
        cmd->state = UB_CMDST_STAT;
diff -urN linux/drivers/block/viodasd.c linux/drivers/block/viodasd.c
--- linux/drivers/block/viodasd.c       2004/12/04 18:16:02     1.5
+++ linux/drivers/block/viodasd.c       2005/01/25 04:28:11     1.6
@@ -72,7 +72,7 @@
        MAX_DISK_NAME = sizeof(((struct gendisk *)0)->disk_name)
 };
 
-static spinlock_t      viodasd_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(viodasd_spinlock);
 
 #define VIOMAXREQ              16
 #define VIOMAXBLOCKDMA         12
diff -urN linux/drivers/block/xd.c linux/drivers/block/xd.c
--- linux/drivers/block/xd.c    2005/01/13 14:05:51     1.64
+++ linux/drivers/block/xd.c    2005/01/25 04:28:11     1.65
@@ -123,7 +123,7 @@
        0xE0000
 };
 
-static spinlock_t xd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(xd_lock);
 
 static struct gendisk *xd_gendisk[2];
 
diff -urN linux/drivers/block/z2ram.c linux/drivers/block/z2ram.c
--- linux/drivers/block/z2ram.c 2004/10/25 20:44:22     1.37
+++ linux/drivers/block/z2ram.c 2005/01/25 04:28:11     1.38
@@ -65,7 +65,7 @@
 static int list_count       = 0;
 static int current_device   = -1;
 
-static spinlock_t z2ram_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(z2ram_lock);
 
 static struct block_device_operations z2_fops;
 static struct gendisk *z2ram_gendisk;
diff -urN linux/drivers/block/aoe/aoe.h linux/drivers/block/aoe/aoe.h
--- linux/drivers/block/aoe/aoe.h       2005/01/13 14:05:51     1.1
+++ linux/drivers/block/aoe/aoe.h       2005/01/25 04:28:11     1.2
@@ -1,7 +1,10 @@
 /* Copyright (c) 2004 Coraid, Inc.  See COPYING for GPL terms. */
-#define VERSION "4"
+#define VERSION "5"
 #define AOE_MAJOR 152
 #define DEVICE_NAME "aoe"
+#ifndef AOE_PARTITIONS
+#define AOE_PARTITIONS 16
+#endif
 #define SYSMINOR(aoemajor, aoeminor) ((aoemajor) * 10 + (aoeminor))
 #define AOEMAJOR(sysminor) ((sysminor) / 10)
 #define AOEMINOR(sysminor) ((sysminor) % 10)
@@ -101,7 +104,7 @@
        int ndata;
 
        /* largest possible */
-       char data[sizeof(struct aoe_hdr) + sizeof(struct aoe_atahdr)];
+       unsigned char data[sizeof(struct aoe_hdr) + sizeof(struct aoe_atahdr)];
 };
 
 struct aoedev {
@@ -111,6 +114,7 @@
        ulong sysminor;
        ulong aoemajor;
        ulong aoeminor;
+       ulong nopen;            /* (bd_openers isn't available without 
sleeping) */
        ulong rttavg;           /* round trip average of requests/responses */
        u16 fw_ver;             /* version of blade's firmware */
        struct work_struct work;/* disk create work struct */
diff -urN linux/drivers/block/aoe/aoeblk.c linux/drivers/block/aoe/aoeblk.c
--- linux/drivers/block/aoe/aoeblk.c    2005/01/13 14:05:51     1.1
+++ linux/drivers/block/aoe/aoeblk.c    2005/01/25 04:28:11     1.2
@@ -12,14 +12,9 @@
 #include <linux/netdevice.h>
 #include "aoe.h"
 
-/* add attributes for our block devices in sysfs
- * (see drivers/block/genhd.c:disk_attr_show, etc.)
- */
-struct disk_attribute {
-       struct attribute attr;
-       ssize_t (*show)(struct gendisk *, char *);
-};
+static kmem_cache_t *buf_pool_cache;
 
+/* add attributes for our block devices in sysfs */
 static ssize_t aoedisk_show_state(struct gendisk * disk, char *page)
 {
        struct aoedev *d = disk->private_data;
@@ -74,9 +69,18 @@
 aoeblk_open(struct inode *inode, struct file *filp)
 {
        struct aoedev *d;
+       ulong flags;
 
        d = inode->i_bdev->bd_disk->private_data;
-       return (d->flags & DEVFL_UP) ? 0 : -ENODEV;
+
+       spin_lock_irqsave(&d->lock, flags);
+       if (d->flags & DEVFL_UP) {
+               d->nopen++;
+               spin_unlock_irqrestore(&d->lock, flags);
+               return 0;
+       }
+       spin_unlock_irqrestore(&d->lock, flags);
+       return -ENODEV;
 }
 
 static int
@@ -89,7 +93,7 @@
 
        spin_lock_irqsave(&d->lock, flags);
 
-       if (inode->i_bdev->bd_openers == 0 && (d->flags & DEVFL_CLOSEWAIT)) {
+       if (--d->nopen == 0 && (d->flags & DEVFL_CLOSEWAIT)) {
                d->flags &= ~DEVFL_CLOSEWAIT;
                spin_unlock_irqrestore(&d->lock, flags);
                aoecmd_cfg(d->aoemajor, d->aoeminor);
@@ -192,23 +196,34 @@
        struct aoedev *d = vp;
        struct gendisk *gd;
        ulong flags;
-       enum { NPARTITIONS = 16 };
-
-       gd = alloc_disk(NPARTITIONS);
-
-       spin_lock_irqsave(&d->lock, flags);
 
+       gd = alloc_disk(AOE_PARTITIONS);
        if (gd == NULL) {
-               printk(KERN_CRIT "aoe: aoeblk_gdalloc: cannot allocate disk "
+               printk(KERN_ERR "aoe: aoeblk_gdalloc: cannot allocate disk "
                        "structure for %ld.%ld\n", d->aoemajor, d->aoeminor);
+               spin_lock_irqsave(&d->lock, flags);
                d->flags &= ~DEVFL_WORKON;
                spin_unlock_irqrestore(&d->lock, flags);
                return;
        }
 
+       d->bufpool = mempool_create(MIN_BUFS,
+                                   mempool_alloc_slab, mempool_free_slab,
+                                   buf_pool_cache);
+       if (d->bufpool == NULL) {
+               printk(KERN_ERR "aoe: aoeblk_gdalloc: cannot allocate bufpool "
+                       "for %ld.%ld\n", d->aoemajor, d->aoeminor);
+               put_disk(gd);
+               spin_lock_irqsave(&d->lock, flags);
+               d->flags &= ~DEVFL_WORKON;
+               spin_unlock_irqrestore(&d->lock, flags);
+               return;
+       }
+
+       spin_lock_irqsave(&d->lock, flags);
        blk_queue_make_request(&d->blkq, aoeblk_make_request);
        gd->major = AOE_MAJOR;
-       gd->first_minor = d->sysminor * NPARTITIONS;
+       gd->first_minor = d->sysminor * AOE_PARTITIONS;
        gd->fops = &aoe_bdops;
        gd->private_data = d;
        gd->capacity = d->ssize;
@@ -233,7 +248,7 @@
 void __exit
 aoeblk_exit(void)
 {
-       unregister_blkdev(AOE_MAJOR, DEVICE_NAME);
+       kmem_cache_destroy(buf_pool_cache);
 }
 
 int __init
@@ -241,6 +256,12 @@
 {
        int n;
 
+       buf_pool_cache = kmem_cache_create("aoe_bufs", 
+                                          sizeof(struct buf),
+                                          0, 0, NULL, NULL);
+       if (buf_pool_cache == NULL)
+               return -ENOMEM;
+
        n = register_blkdev(AOE_MAJOR, DEVICE_NAME);
        if (n < 0) {
                printk(KERN_ERR "aoe: aoeblk_init: can't register major\n");
diff -urN linux/drivers/block/aoe/aoechr.c linux/drivers/block/aoe/aoechr.c
--- linux/drivers/block/aoe/aoechr.c    2005/01/13 14:05:51     1.1
+++ linux/drivers/block/aoe/aoechr.c    2005/01/25 04:28:11     1.2
@@ -266,7 +266,7 @@
        return 0;
 }
 
-void __exit
+void
 aoechr_exit(void)
 {
        int i;
diff -urN linux/drivers/block/aoe/aoedev.c linux/drivers/block/aoe/aoedev.c
--- linux/drivers/block/aoe/aoedev.c    2005/01/13 14:05:51     1.1
+++ linux/drivers/block/aoe/aoedev.c    2005/01/25 04:28:11     1.2
@@ -11,7 +11,6 @@
 
 static struct aoedev *devlist;
 static spinlock_t devlist_lock;
-static kmem_cache_t *buf_pool_cache;
 
 struct aoedev *
 aoedev_bymac(unsigned char *macaddr)
@@ -53,9 +52,7 @@
 
        spin_lock_init(&d->lock);
        init_timer(&d->timer);
-       d->bufpool = mempool_create(MIN_BUFS,
-                                   mempool_alloc_slab, mempool_free_slab,
-                                   buf_pool_cache);
+       d->bufpool = NULL;      /* defer to aoeblk_gdalloc */
        INIT_LIST_HEAD(&d->bufq);
        d->next = devlist;
        devlist = d;
@@ -95,15 +92,10 @@
                bio_endio(bio, bio->bi_size, -EIO);
        }
 
-       if (d->gd) {
-               struct block_device *bdev = bdget_disk(d->gd, 0);
-               if (bdev) {
-                       if (bdev->bd_openers)
-                               d->flags |= DEVFL_CLOSEWAIT;
-                       bdput(bdev);
-               }
+       if (d->nopen)
+               d->flags |= DEVFL_CLOSEWAIT;
+       if (d->gd)
                d->gd->capacity = 0;
-       }
 
        d->flags &= ~DEVFL_UP;
 }
@@ -159,7 +151,7 @@
        kfree(d);
 }
 
-void __exit
+void
 aoedev_exit(void)
 {
        struct aoedev *d;
@@ -177,17 +169,11 @@
                del_timer_sync(&d->timer);
                aoedev_freedev(d);
        }
-       kmem_cache_destroy(buf_pool_cache);
 }
 
 int __init
 aoedev_init(void)
 {
-       buf_pool_cache = kmem_cache_create("aoe_bufs", 
-                                          sizeof(struct buf),
-                                          0, 0, NULL, NULL);
-       if (buf_pool_cache == NULL)
-               return -ENOMEM;
        spin_lock_init(&devlist_lock);
        return 0;
 }
diff -urN linux/drivers/block/aoe/aoemain.c linux/drivers/block/aoe/aoemain.c
--- linux/drivers/block/aoe/aoemain.c   2005/01/13 14:05:51     1.1
+++ linux/drivers/block/aoe/aoemain.c   2005/01/25 04:28:11     1.2
@@ -53,39 +53,58 @@
        }
 }
 
-static void __exit
+static void
 aoe_exit(void)
 {
        discover_timer(TKILL);
 
        aoenet_exit();
-       aoeblk_exit();
+       unregister_blkdev(AOE_MAJOR, DEVICE_NAME);
        aoechr_exit();
        aoedev_exit();
+       aoeblk_exit();          /* free cache after de-allocating bufs */
 }
 
 static int __init
 aoe_init(void)
 {
-       int n, (**p)(void);
-       int (*fns[])(void) = {
-               aoedev_init, aoechr_init, aoeblk_init, aoenet_init, NULL
-       };
-
-       for (p=fns; *p != NULL; p++) {
-               n = (*p)();
-               if (n) {
-                       aoe_exit();
-                       printk(KERN_INFO "aoe: aoe_init: initialisation 
failure.\n");
-                       return n;
-               }
+       int ret;
+
+       ret = aoedev_init();
+       if (ret)
+               return ret;
+       ret = aoechr_init();
+       if (ret)
+               goto chr_fail;
+       ret = aoeblk_init();
+       if (ret)
+               goto blk_fail;
+       ret = aoenet_init();
+       if (ret)
+               goto net_fail;
+       ret = register_blkdev(AOE_MAJOR, DEVICE_NAME);
+       if (ret < 0) {
+               printk(KERN_ERR "aoe: aoeblk_init: can't register major\n");
+               goto blkreg_fail;
        }
+
        printk(KERN_INFO
               "aoe: aoe_init: AoE v2.6-%s initialised.\n",
               VERSION);
-
        discover_timer(TINIT);
        return 0;
+
+ blkreg_fail:
+       aoenet_exit();
+ net_fail:
+       aoeblk_exit();
+ blk_fail:
+       aoechr_exit();
+ chr_fail:
+       aoedev_exit();
+       
+       printk(KERN_INFO "aoe: aoe_init: initialisation failure.\n");
+       return ret;
 }
 
 module_init(aoe_init);
diff -urN linux/drivers/block/aoe/aoenet.c linux/drivers/block/aoe/aoenet.c
--- linux/drivers/block/aoe/aoenet.c    2005/01/13 14:05:51     1.1
+++ linux/drivers/block/aoe/aoenet.c    2005/01/25 04:28:11     1.2
@@ -102,10 +102,7 @@
 }
 
 /* 
- * (1) i have no idea if this is redundant, but i can't figure why
- * the ifp is passed in if it is.
- *
- * (2) len doesn't include the header by default.  I want this. 
+ * (1) len doesn't include the header by default.  I want this. 
  */
 static int
 aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt)
@@ -117,12 +114,11 @@
        if (!skb)
                return 0;
 
-       skb->dev = ifp; /* (1) */
-
        if (!is_aoe_netif(ifp))
                goto exit;
 
-       skb->len += ETH_HLEN;   /* (2) */
+       //skb->len += ETH_HLEN; /* (1) */
+       skb_push(skb, ETH_HLEN);        /* (1) */
 
        h = (struct aoe_hdr *) skb->mac.raw;
        n = __be32_to_cpu(*((u32 *) h->tag));
@@ -133,10 +129,11 @@
                n = h->err;
                if (n > NECODES)
                        n = 0;
-               printk(KERN_CRIT "aoe: aoenet_rcv: error packet from %d.%d; "
-                       "ecode=%d '%s'\n",
-                      __be16_to_cpu(*((u16 *) h->major)), h->minor, 
-                       h->err, aoe_errlist[n]);
+               if (net_ratelimit())
+                       printk(KERN_ERR "aoe: aoenet_rcv: error packet from 
%d.%d; "
+                              "ecode=%d '%s'\n",
+                              __be16_to_cpu(*((u16 *) h->major)), h->minor, 
+                              h->err, aoe_errlist[n]);
                goto exit;
        }
 
@@ -167,7 +164,7 @@
        return 0;
 }
 
-void __exit
+void
 aoenet_exit(void)
 {
        dev_remove_pack(&aoe_pt);
diff -urN linux/drivers/block/paride/Kconfig linux/drivers/block/paride/Kconfig
--- linux/drivers/block/paride/Kconfig  2004/04/23 15:54:11     1.4
+++ linux/drivers/block/paride/Kconfig  2005/01/25 04:28:11     1.5
@@ -119,7 +119,7 @@
          before 1999 were Series 5) Series 5 drives will NOT always have the
          Series noted on the bottom of the drive. Series 6 drivers will.
 
-         In other words, if your BACKPACK drive dosen't say "Series 6" on the
+         In other words, if your BACKPACK drive doesn't say "Series 6" on the
          bottom, enable this option.
 
          If you chose to build PARIDE support into your kernel, you may
diff -urN linux/drivers/block/paride/paride.c 
linux/drivers/block/paride/paride.c
--- linux/drivers/block/paride/paride.c 2004/11/15 11:49:24     1.23
+++ linux/drivers/block/paride/paride.c 2005/01/25 04:28:11     1.24
@@ -46,7 +46,7 @@
 
 static struct pi_protocol *protocols[MAX_PROTOS];
 
-static spinlock_t pi_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pi_spinlock);
 
 void pi_write_regr(PIA * pi, int cont, int regr, int val)
 {
diff -urN linux/drivers/block/paride/pd.c linux/drivers/block/paride/pd.c
--- linux/drivers/block/paride/pd.c     2005/01/13 14:05:51     1.50
+++ linux/drivers/block/paride/pd.c     2005/01/25 04:28:11     1.51
@@ -155,7 +155,7 @@
 #include <linux/sched.h>
 #include <linux/workqueue.h>
 
-static spinlock_t pd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pd_lock);
 
 #ifndef MODULE
 
diff -urN linux/drivers/block/paride/pseudo.h 
linux/drivers/block/paride/pseudo.h
--- linux/drivers/block/paride/pseudo.h 2003/06/05 12:25:47     1.12
+++ linux/drivers/block/paride/pseudo.h 2005/01/25 04:28:11     1.13
@@ -43,7 +43,7 @@
 static int ps_tq_active = 0;
 static int ps_nice = 0;
 
-static spinlock_t ps_spinlock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ps_spinlock __attribute__((unused)));
 
 static DECLARE_WORK(ps_tq, ps_tq_int, NULL);
 
diff -urN linux/drivers/bluetooth/bcm203x.c linux/drivers/bluetooth/bcm203x.c
--- linux/drivers/bluetooth/bcm203x.c   2004/12/04 18:16:02     1.6
+++ linux/drivers/bluetooth/bcm203x.c   2005/01/25 04:28:11     1.7
@@ -46,6 +46,8 @@
 
 #define VERSION "1.0"
 
+static int ignore = 0;
+
 static struct usb_device_id bcm203x_table[] = {
        /* Broadcom Blutonium (BCM2033) */
        { USB_DEVICE(0x0a5c, 0x2033) },
@@ -55,7 +57,6 @@
 
 MODULE_DEVICE_TABLE(usb, bcm203x_table);
 
-
 #define BCM203X_ERROR          0
 #define BCM203X_RESET          1
 #define BCM203X_LOAD_MINIDRV   2
@@ -175,7 +176,7 @@
 
        BT_DBG("intf %p id %p", intf, id);
 
-       if (intf->cur_altsetting->desc.bInterfaceNumber != 0)
+       if (ignore || (intf->cur_altsetting->desc.bInterfaceNumber != 0))
                return -ENODEV;
 
        data = kmalloc(sizeof(*data), GFP_KERNEL);
@@ -304,6 +305,9 @@
 module_init(bcm203x_init);
 module_exit(bcm203x_exit);
 
+module_param(ignore, bool, 0644);
+MODULE_PARM_DESC(ignore, "Ignore devices from the matching table");
+
 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("Broadcom Blutonium firmware driver ver " VERSION);
 MODULE_VERSION(VERSION);
diff -urN linux/drivers/bluetooth/bfusb.c linux/drivers/bluetooth/bfusb.c
--- linux/drivers/bluetooth/bfusb.c     2005/01/13 14:05:52     1.10
+++ linux/drivers/bluetooth/bfusb.c     2005/01/25 04:28:11     1.11
@@ -47,6 +47,8 @@
 
 #define VERSION "1.1"
 
+static int ignore = 0;
+
 static struct usb_driver bfusb_driver;
 
 static struct usb_device_id bfusb_table[] = {
@@ -655,6 +657,9 @@
 
        BT_DBG("intf %p id %p", intf, id);
 
+       if (ignore)
+               return -ENODEV;
+
        /* Check number of endpoints */
        if (intf->cur_altsetting->desc.bNumEndpoints < 2)
                return -EIO;
@@ -792,6 +797,9 @@
 module_init(bfusb_init);
 module_exit(bfusb_exit);
 
+module_param(ignore, bool, 0644);
+MODULE_PARM_DESC(ignore, "Ignore devices from the matching table");
+
 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("BlueFRITZ! USB driver ver " VERSION);
 MODULE_VERSION(VERSION);
diff -urN linux/drivers/bluetooth/bluecard_cs.c 
linux/drivers/bluetooth/bluecard_cs.c
--- linux/drivers/bluetooth/bluecard_cs.c       2005/01/13 14:05:52     1.15
+++ linux/drivers/bluetooth/bluecard_cs.c       2005/01/25 04:28:11     1.16
@@ -55,13 +55,6 @@
 /* ======================== Module parameters ======================== */
 
 
-/* Bit map of interrupts to choose from */
-static unsigned int irq_mask = 0x86bc;
-static int irq_list[4] = { -1 };
-
-module_param(irq_mask, uint, 0);
-module_param_array(irq_list, int, NULL, 0);
-
 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("Bluetooth driver for the Anycom BlueCard (LSE039/LSE041)");
 MODULE_LICENSE("GPL");
@@ -871,7 +864,7 @@
        bluecard_info_t *info;
        client_reg_t client_reg;
        dev_link_t *link;
-       int i, ret;
+       int ret;
 
        /* Create new info device */
        info = kmalloc(sizeof(*info), GFP_KERNEL);
@@ -885,13 +878,7 @@
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
        link->io.NumPorts1 = 8;
        link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
-       link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID;
-
-       if (irq_list[0] == -1)
-               link->irq.IRQInfo2 = irq_mask;
-       else
-               for (i = 0; i < 4; i++)
-                       link->irq.IRQInfo2 |= 1 << irq_list[i];
+       link->irq.IRQInfo1 = IRQ_LEVEL_ID;
 
        link->irq.Handler = bluecard_interrupt;
        link->irq.Instance = info;
diff -urN linux/drivers/bluetooth/bt3c_cs.c linux/drivers/bluetooth/bt3c_cs.c
--- linux/drivers/bluetooth/bt3c_cs.c   2005/01/13 14:05:52     1.20
+++ linux/drivers/bluetooth/bt3c_cs.c   2005/01/25 04:28:11     1.21
@@ -63,13 +63,6 @@
 /* ======================== Module parameters ======================== */
 
 
-/* Bit map of interrupts to choose from */
-static unsigned int irq_mask = 0xffff;
-static int irq_list[4] = { -1 };
-
-module_param(irq_mask, uint, 0);
-module_param_array(irq_list, int, NULL, 0);
-
 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>, Jose Orlando Pereira 
<jop@di.uminho.pt>");
 MODULE_DESCRIPTION("Bluetooth driver for the 3Com Bluetooth PCMCIA card");
 MODULE_LICENSE("GPL");
@@ -676,7 +669,7 @@
        bt3c_info_t *info;
        client_reg_t client_reg;
        dev_link_t *link;
-       int i, ret;
+       int ret;
 
        /* Create new info device */
        info = kmalloc(sizeof(*info), GFP_KERNEL);
@@ -690,13 +683,7 @@
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
        link->io.NumPorts1 = 8;
        link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
-       link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID;
-
-       if (irq_list[0] == -1)
-               link->irq.IRQInfo2 = irq_mask;
-       else
-               for (i = 0; i < 4; i++)
-                       link->irq.IRQInfo2 |= 1 << irq_list[i];
+       link->irq.IRQInfo1 = IRQ_LEVEL_ID;
 
        link->irq.Handler = bt3c_interrupt;
        link->irq.Instance = info;
diff -urN linux/drivers/bluetooth/btuart_cs.c 
linux/drivers/bluetooth/btuart_cs.c
--- linux/drivers/bluetooth/btuart_cs.c 2005/01/13 14:05:52     1.12
+++ linux/drivers/bluetooth/btuart_cs.c 2005/01/25 04:28:11     1.13
@@ -59,13 +59,6 @@
 /* ======================== Module parameters ======================== */
 
 
-/* Bit map of interrupts to choose from */
-static unsigned int irq_mask = 0xffff;
-static int irq_list[4] = { -1 };
-
-module_param(irq_mask, uint, 0);
-module_param_array(irq_list, int, NULL, 0);
-
 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("Bluetooth driver for Bluetooth PCMCIA cards with HCI UART 
interface");
 MODULE_LICENSE("GPL");
@@ -595,7 +588,7 @@
        btuart_info_t *info;
        client_reg_t client_reg;
        dev_link_t *link;
-       int i, ret;
+       int ret;
 
        /* Create new info device */
        info = kmalloc(sizeof(*info), GFP_KERNEL);
@@ -609,13 +602,7 @@
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
        link->io.NumPorts1 = 8;
        link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
-       link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID;
-
-       if (irq_list[0] == -1)
-               link->irq.IRQInfo2 = irq_mask;
-       else
-               for (i = 0; i < 4; i++)
-                       link->irq.IRQInfo2 |= 1 << irq_list[i];
+       link->irq.IRQInfo1 = IRQ_LEVEL_ID;
 
        link->irq.Handler = btuart_interrupt;
        link->irq.Instance = info;
diff -urN linux/drivers/bluetooth/dtl1_cs.c linux/drivers/bluetooth/dtl1_cs.c
--- linux/drivers/bluetooth/dtl1_cs.c   2005/01/13 14:05:52     1.17
+++ linux/drivers/bluetooth/dtl1_cs.c   2005/01/25 04:28:11     1.18
@@ -59,13 +59,6 @@
 /* ======================== Module parameters ======================== */
 
 
-/* Bit map of interrupts to choose from */
-static unsigned int irq_mask = 0xffff;
-static int irq_list[4] = { -1 };
-
-module_param(irq_mask, uint, 0);
-module_param_array(irq_list, int, NULL, 0);
-
 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("Bluetooth driver for Nokia Connectivity Card DTL-1");
 MODULE_LICENSE("GPL");
@@ -574,7 +567,7 @@
        dtl1_info_t *info;
        client_reg_t client_reg;
        dev_link_t *link;
-       int i, ret;
+       int ret;
 
        /* Create new info device */
        info = kmalloc(sizeof(*info), GFP_KERNEL);
@@ -588,13 +581,7 @@
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
        link->io.NumPorts1 = 8;
        link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
-       link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID;
-
-       if (irq_list[0] == -1)
-               link->irq.IRQInfo2 = irq_mask;
-       else
-               for (i = 0; i < 4; i++)
-                       link->irq.IRQInfo2 |= 1 << irq_list[i];
+       link->irq.IRQInfo1 = IRQ_LEVEL_ID;
 
        link->irq.Handler = dtl1_interrupt;
        link->irq.Instance = info;
diff -urN linux/drivers/bluetooth/hci_bcsp.c linux/drivers/bluetooth/hci_bcsp.c
--- linux/drivers/bluetooth/hci_bcsp.c  2004/08/06 00:33:24     1.8
+++ linux/drivers/bluetooth/hci_bcsp.c  2005/01/25 04:28:11     1.9
@@ -265,7 +265,7 @@
 /* This is a rewrite of pkt_avail in ABCSP */
 static struct sk_buff *bcsp_dequeue(struct hci_uart *hu)
 {
-       struct bcsp_struct *bcsp = (struct bcsp_struct *) hu->priv;
+       struct bcsp_struct *bcsp = hu->priv;
        unsigned long flags;
        struct sk_buff *skb;
        
@@ -629,7 +629,7 @@
 static void bcsp_timed_event(unsigned long arg)
 {
        struct hci_uart *hu = (struct hci_uart *) arg;
-       struct bcsp_struct *bcsp = (struct bcsp_struct *) hu->priv;
+       struct bcsp_struct *bcsp = hu->priv;
        struct sk_buff *skb;
        unsigned long flags;
 
diff -urN linux/drivers/bluetooth/hci_ldisc.c 
linux/drivers/bluetooth/hci_ldisc.c
--- linux/drivers/bluetooth/hci_ldisc.c 2004/10/25 20:44:22     1.16
+++ linux/drivers/bluetooth/hci_ldisc.c 2005/01/25 04:28:11     1.17
@@ -51,6 +51,7 @@
 
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
+
 #include "hci_uart.h"
 
 #ifndef CONFIG_BT_HCIUART_DEBUG
@@ -60,6 +61,8 @@
 #define BT_DMP( A... )
 #endif
 
+static int reset = 0;
+
 static struct hci_uart_proto *hup[HCI_UART_MAX_PROTO];
 
 int hci_uart_register_proto(struct hci_uart_proto *p)
@@ -412,7 +415,10 @@
        hdev->destruct = hci_uart_destruct;
 
        hdev->owner = THIS_MODULE;
-       
+
+       if (reset)
+               set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks);
+
        if (hci_register_dev(hdev) < 0) {
                BT_ERR("Can't register HCI device");
                hci_free_dev(hdev);
@@ -577,7 +583,10 @@
 module_init(hci_uart_init);
 module_exit(hci_uart_exit);
 
-MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
+module_param(reset, bool, 0644);
+MODULE_PARM_DESC(reset, "Send HCI reset command on initialization");
+
+MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann 
<marcel@holtmann.org>");
 MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION);
 MODULE_VERSION(VERSION);
 MODULE_LICENSE("GPL");
diff -urN linux/drivers/bluetooth/hci_usb.c linux/drivers/bluetooth/hci_usb.c
--- linux/drivers/bluetooth/hci_usb.c   2005/01/13 14:05:52     1.37
+++ linux/drivers/bluetooth/hci_usb.c   2005/01/25 04:28:11     1.38
@@ -66,6 +66,9 @@
 #define URB_ZERO_PACKET 0
 #endif
 
+static int ignore = 0;
+static int reset = 0;
+
 #ifdef CONFIG_BT_HCIUSB_SCO
 static int isoc = 2;
 #endif
@@ -827,7 +830,7 @@
                        id = match;
        }
 
-       if (id->driver_info & HCI_IGNORE)
+       if (ignore || id->driver_info & HCI_IGNORE)
                return -ENODEV;
 
        if (intf->cur_altsetting->desc.bInterfaceNumber > 0)
@@ -963,7 +966,7 @@
 
        hdev->owner = THIS_MODULE;
 
-       if (id->driver_info & HCI_RESET)
+       if (reset || id->driver_info & HCI_RESET)
                set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks);
 
        if (hci_register_dev(hdev) < 0) {
@@ -1036,6 +1039,12 @@
 module_init(hci_usb_init);
 module_exit(hci_usb_exit);
 
+module_param(ignore, bool, 0644);
+MODULE_PARM_DESC(ignore, "Ignore devices from the matching table");
+
+module_param(reset, bool, 0644);
+MODULE_PARM_DESC(reset, "Send HCI reset command on initialization");
+
 #ifdef CONFIG_BT_HCIUSB_SCO
 module_param(isoc, int, 0644);
 MODULE_PARM_DESC(isoc, "Set isochronous transfers for SCO over HCI support");
diff -urN linux/drivers/cdrom/Kconfig linux/drivers/cdrom/Kconfig
--- linux/drivers/cdrom/Kconfig 2003/09/30 14:27:21     1.5
+++ linux/drivers/cdrom/Kconfig 2005/01/25 04:28:12     1.6
@@ -18,7 +18,7 @@
          have, say Y and find out whether you have one of the following
          drives.
 
-         For each of these drivers, a file Documentation/cdrom/{driver_name}
+         For each of these drivers, a <file:Documentation/cdrom/{driver_name}>
          exists. Especially in cases where you do not know exactly which kind
          of drive you have you should read there. Most of these drivers use a
          file drivers/cdrom/{driver_name}.h where you can define your
diff -urN linux/drivers/cdrom/aztcd.c linux/drivers/cdrom/aztcd.c
--- linux/drivers/cdrom/aztcd.c 2005/01/13 14:05:52     1.48
+++ linux/drivers/cdrom/aztcd.c 2005/01/25 04:28:12     1.49
@@ -312,7 +312,7 @@
 static unsigned long aztTimeOutCount;
 static int aztCmd = 0;
 
-static spinlock_t aztSpin = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(aztSpin);
 
 /*###########################################################################
    Function Prototypes
diff -urN linux/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c
--- linux/drivers/cdrom/cdrom.c 2005/01/13 14:05:52     1.78
+++ linux/drivers/cdrom/cdrom.c 2005/01/25 04:28:12     1.79
@@ -303,7 +303,7 @@
 module_param(check_media_type, bool, 0);
 module_param(mrw_format_restart, bool, 0);
 
-static spinlock_t cdrom_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cdrom_lock);
 
 static const char *mrw_format_status[] = {
        "not mrw",
diff -urN linux/drivers/cdrom/cdu31a.c linux/drivers/cdrom/cdu31a.c
--- linux/drivers/cdrom/cdu31a.c        2004/11/15 11:49:25     1.47
+++ linux/drivers/cdrom/cdu31a.c        2005/01/25 04:28:12     1.48
@@ -236,7 +236,7 @@
 static volatile unsigned short sony_cd_fifost_reg;
 
 static struct request_queue *cdu31a_queue;
-static spinlock_t cdu31a_lock = SPIN_LOCK_UNLOCKED; /* queue lock */
+static DEFINE_SPINLOCK(cdu31a_lock); /* queue lock */
 
 static int sony_spun_up = 0;   /* Has the drive been spun up? */
 
diff -urN linux/drivers/cdrom/cm206.c linux/drivers/cdrom/cm206.c
--- linux/drivers/cdrom/cm206.c 2004/08/14 16:16:42     1.47
+++ linux/drivers/cdrom/cm206.c 2005/01/25 04:28:12     1.48
@@ -302,7 +302,7 @@
 
 static struct cm206_struct *cd;        /* the main memory structure */
 static struct request_queue *cm206_queue;
-static spinlock_t cm206_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cm206_lock);
 
 /* First, we define some polling functions. These are actually
    only being used in the initialization. */
diff -urN linux/drivers/cdrom/gscd.c linux/drivers/cdrom/gscd.c
--- linux/drivers/cdrom/gscd.c  2005/01/13 14:05:52     1.43
+++ linux/drivers/cdrom/gscd.c  2005/01/25 04:28:12     1.44
@@ -147,7 +147,7 @@
 static int AudioEnd_f;
 
 static struct timer_list gscd_timer = TIMER_INITIALIZER(NULL, 0, 0);
-static spinlock_t gscd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(gscd_lock);
 static struct request_queue *gscd_queue;
 
 static struct block_device_operations gscd_fops = {
diff -urN linux/drivers/cdrom/mcd.c linux/drivers/cdrom/mcd.c
--- linux/drivers/cdrom/mcd.c   2005/01/13 14:05:52     1.45
+++ linux/drivers/cdrom/mcd.c   2005/01/25 04:28:12     1.46
@@ -187,7 +187,7 @@
 static void mcd_release(struct cdrom_device_info *cdi);
 static int mcd_media_changed(struct cdrom_device_info *cdi, int disc_nr);
 static int mcd_tray_move(struct cdrom_device_info *cdi, int position);
-static spinlock_t mcd_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mcd_spinlock);
 static int mcd_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
                    void *arg);
 static int mcd_drive_status(struct cdrom_device_info *cdi, int slot_nr);
diff -urN linux/drivers/cdrom/mcdx.c linux/drivers/cdrom/mcdx.c
--- linux/drivers/cdrom/mcdx.c  2005/01/13 14:05:52     1.43
+++ linux/drivers/cdrom/mcdx.c  2005/01/25 04:28:12     1.44
@@ -305,7 +305,7 @@
 
 static int mcdx_drive_map[][2] = MCDX_DRIVEMAP;
 static struct s_drive_stuff *mcdx_stuffp[MCDX_NDRIVES];
-static spinlock_t mcdx_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mcdx_lock);
 static struct request_queue *mcdx_queue;
 
 /* You can only set the first two pairs, from old MODULE_PARM code.  */
diff -urN linux/drivers/cdrom/optcd.c linux/drivers/cdrom/optcd.c
--- linux/drivers/cdrom/optcd.c 2005/01/13 14:05:52     1.45
+++ linux/drivers/cdrom/optcd.c 2005/01/25 04:28:12     1.46
@@ -265,7 +265,7 @@
 static DECLARE_WAIT_QUEUE_HEAD(waitq);
 static void sleep_timer(unsigned long data);
 static struct timer_list delay_timer = TIMER_INITIALIZER(sleep_timer, 0, 0);
-static spinlock_t optcd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(optcd_lock);
 static struct request_queue *opt_queue;
 
 /* Timer routine: wake up when desired flag goes low,
diff -urN linux/drivers/cdrom/sbpcd.c linux/drivers/cdrom/sbpcd.c
--- linux/drivers/cdrom/sbpcd.c 2004/12/27 02:15:52     1.58
+++ linux/drivers/cdrom/sbpcd.c 2005/01/25 04:28:12     1.59
@@ -461,7 +461,7 @@
 /*
  * Protects access to global structures etc.
  */
-static spinlock_t sbpcd_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned DEFINE_SPINLOCK(sbpcd_lock);
 static struct request_queue *sbpcd_queue;
 
 MODULE_PARM(sbpcd, "2i");
diff -urN linux/drivers/cdrom/sjcd.c linux/drivers/cdrom/sjcd.c
---