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: Mon, 07 Feb 2005 02:55:13 +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/02/07 02:55:06

Modified files:
        .              : CREDITS MAINTAINERS Makefile 
        Documentation  : devices.txt ioctl-number.txt 
                         kernel-parameters.txt 
        Documentation/DocBook: kernel-api.tmpl 
        Documentation/dvb: README.dibusb get_dvb_firmware 
        Documentation/infiniband: user_mad.txt 
        Documentation/networking: netdevices.txt 
        Documentation/vm: hugetlbpage.txt 
        arch/alpha/lib : memmove.S 
        arch/alpha/oprofile: common.c 
        arch/arm/boot/compressed: head-xscale.S 
        arch/arm/kernel: asm-offsets.c calls.S debug.S entry-armv.S 
                         entry-common.S entry-header.S fiq.c process.c 
                         ptrace.c sys_arm.c traps.c 
        arch/arm/mach-iop3xx: iop321-pci.c iq31244-pci.c iq80321-pci.c 
                              iq80331-pci.c iq80332-pci.c 
        arch/arm/mach-ixp4xx: Kconfig Makefile 
        arch/arm/mach-pxa: corgi.c mainstone.c 
        arch/arm/oprofile: common.c init.c 
        arch/arm26/kernel: asm-offsets.c process.c ptrace.c 
        arch/h8300     : Makefile 
        arch/i386/kernel: apic.c entry.S i387.c pci-dma.c process.c 
                          ptrace.c reboot.c setup.c signal.c smpboot.c 
                          traps.c 
        arch/i386/kernel/cpu: common.c 
        arch/i386/mach-visws: reboot.c 
        arch/i386/mach-voyager: voyager_basic.c voyager_smp.c 
        arch/i386/math-emu: fpu_entry.c 
        arch/i386/mm   : ioremap.c 
        arch/i386/oprofile: init.c nmi_int.c 
        arch/ia64/configs: tiger_defconfig 
        arch/ia64/ia32 : binfmt_elf32.c elfcore32.h sys_ia32.c 
        arch/ia64/kernel: domain.c efi.c entry.S entry.h fsys.S gate.S 
                          irq.c irq_ia64.c ivt.S mca.c mca_drv.c 
                          process.c ptrace.c smpboot.c unwind.c 
        arch/ia64/lib  : bitop.c memcpy.S memcpy_mck.S 
        arch/ia64/mm   : contig.c 
        arch/ia64/oprofile: init.c 
        arch/ia64/pci  : pci.c 
        arch/ia64/sn/kernel: bte_error.c irq.c setup.c 
        arch/ia64/sn/kernel/sn2: sn_hwperf.c 
        arch/ia64/sn/pci: pci_dma.c 
        arch/m32r/kernel: ptrace.c setup.c 
        arch/m32r/oprofile: init.c 
        arch/mips      : Kconfig 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: entry.S irixsig.c linux32.c process.c ptrace.c 
                          ptrace32.c signal-common.h signal32.c traps.c 
        arch/mips/oprofile: common.c 
        arch/parisc/kernel: sys_parisc32.c 
        arch/parisc/lib: memcpy.c 
        arch/parisc/oprofile: init.c 
        arch/ppc/boot/common: misc-common.c 
        arch/ppc/boot/simple: misc-ev64260.S misc.c mv64x60_tty.c 
        arch/ppc/configs: katana_defconfig 
        arch/ppc/kernel: entry.S idle.c l2cr.S pci.c ppc_ksyms.c 
                         process.c traps.c 
        arch/ppc/lib   : string.S 
        arch/ppc/oprofile: common.c 
        arch/ppc/platforms: Makefile chrp_pci.c chrp_setup.c chrp_time.c 
                            cpci690.c ev64260.c katana.c katana.h 
                            pmac_cpufreq.c pmac_feature.c pmac_pci.c 
                            pmac_sleep.S 
        arch/ppc/platforms/85xx: Kconfig Makefile mpc8540_ads.c 
                                 mpc8540_ads.h mpc85xx_cds_common.c 
                                 mpc85xx_cds_common.h mpc85xx_devices.c 
                                 mpc85xx_sys.c 
        arch/ppc/syslib: gen550_dbg.c ibm44x_common.c mpc10x_common.c 
                         mv64360_pic.c mv64x60.c ppc4xx_setup.c 
                         ppc85xx_setup.c ppc85xx_setup.h prom_init.c 
        arch/ppc64     : Kconfig Kconfig.debug 
        arch/ppc64/boot: main.c string.S 
        arch/ppc64/configs: pSeries_defconfig 
        arch/ppc64/kernel: Makefile eeh.c entry.S head.S 
                           iSeries_pci_reset.c iomap.c pSeries_iommu.c 
                           pSeries_setup.c pSeries_smp.c process.c 
                           prom.c signal.c smp.c sys_ppc32.c traps.c 
        arch/ppc64/mm  : hash_utils.c slb.c 
        arch/ppc64/oprofile: common.c 
        arch/ppc64/xmon: xmon.c 
        arch/s390/kernel: compat_linux.c process.c setup.c 
        arch/s390/lib  : string.c 
        arch/s390/mm   : extmem.c 
        arch/s390/oprofile: init.c 
        arch/sh/kernel : process.c ptrace.c signal.c 
        arch/sh/kernel/cpu: init.c 
        arch/sh/kernel/cpu/sh4: fpu.c 
        arch/sh/oprofile: op_model_null.c op_model_sh7750.c 
        arch/sh64/kernel: fpu.c process.c ptrace.c signal.c 
        arch/sparc     : Kconfig 
        arch/sparc/kernel: muldiv.c process.c signal.c sparc_ksyms.c 
                           traps.c 
        arch/sparc/lib : memcpy.S 
        arch/sparc/mm  : srmmu.c sun4c.c 
        arch/sparc64   : defconfig 
        arch/sparc64/kernel: process.c setup.c signal32.c 
                             sparc64_ksyms.c sys_sparc32.c sys_sunos32.c 
        arch/sparc64/lib: atomic.S memmove.S 
        arch/sparc64/mm: fault.c generic.c hugetlbpage.c init.c 
        arch/sparc64/oprofile: init.c 
        arch/um/sys-x86_64: sysrq.c 
        arch/v850/lib  : memcpy.c 
        arch/x86_64    : Kconfig 
        arch/x86_64/ia32: fpu32.c ia32_binfmt.c ia32_signal.c ptrace32.c 
                          sys_ia32.c 
        arch/x86_64/kernel: asm-offsets.c early_printk.c entry.S i387.c 
                            module.c process.c ptrace.c setup.c signal.c 
                            suspend_asm.S time.c traps.c x8664_ksyms.c 
        arch/x86_64/mm : ioremap.c k8topology.c numa.c pageattr.c srat.c 
        crypto         : tcrypt.h 
        drivers/acpi   : debug.c pci_bind.c processor_idle.c utils.c 
        drivers/acpi/dispatcher: dsfield.c dsinit.c dsmethod.c 
                                 dsmthdat.c dsobject.c dsopcode.c 
                                 dsutils.c dswexec.c dswload.c 
                                 dswscope.c dswstate.c 
        drivers/acpi/events: evevent.c evgpe.c evgpeblk.c evmisc.c 
                             evregion.c evrgnini.c evsci.c evxface.c 
                             evxfevnt.c evxfregn.c 
        drivers/acpi/executer: exconfig.c exconvrt.c excreate.c exdump.c 
                               exfield.c exfldio.c exmisc.c exmutex.c 
                               exnames.c exoparg1.c exoparg2.c 
                               exoparg3.c exoparg6.c exprep.c exregion.c 
                               exresnte.c exresolv.c exresop.c exstore.c 
                               exstoren.c exstorob.c exsystem.c 
                               exutils.c 
        drivers/acpi/hardware: hwacpi.c hwgpe.c hwregs.c hwsleep.c 
                               hwtimer.c 
        drivers/acpi/namespace: nsaccess.c nsalloc.c nsdump.c nsdumpdv.c 
                                nseval.c nsinit.c nsload.c nsnames.c 
                                nsobject.c nsparse.c nssearch.c 
                                nsutils.c nswalk.c nsxfeval.c nsxfname.c 
                                nsxfobj.c 
        drivers/acpi/parser: psargs.c psopcode.c psparse.c psscope.c 
                             pstree.c psutils.c pswalk.c psxface.c 
        drivers/acpi/resources: rsaddr.c rscalc.c rscreate.c rsdump.c 
                                rsio.c rsirq.c rslist.c rsmemory.c 
                                rsmisc.c rsutils.c rsxface.c 
        drivers/acpi/tables: tbconvrt.c tbget.c tbgetall.c tbinstal.c 
                             tbrsdt.c tbutils.c tbxface.c tbxfroot.c 
        drivers/acpi/utilities: utalloc.c utcopy.c utdebug.c utdelete.c 
                                uteval.c utglobal.c utinit.c utmath.c 
                                utmisc.c utobject.c utxface.c 
        drivers/atm    : fore200e.c he.c nicstar.c nicstarmac.c 
        drivers/base   : Makefile cpu.c init.c 
        drivers/block  : cfq-iosched.c genhd.c 
        drivers/block/aoe: aoeblk.c 
        drivers/bluetooth: bt3c_cs.c btuart_cs.c hci_usb.c hci_usb.h 
        drivers/cdrom  : aztcd.c isp16.c isp16.h mcdx.c viocd.c 
        drivers/char   : n_tty.c random.c tty_io.c 
        drivers/char/drm: Makefile drmP.h drm_drv.c drm_ioctl.c 
                          drm_memory.h drm_pciids.h drm_stub.c drm_vm.c 
                          i810_dma.c i810_drv.c i830_dma.c i830_drv.c 
                          i915_dma.c i915_drv.c mga_drv.c mga_state.c 
                          r128_drv.c r128_drv.h r128_state.c radeon_cp.c 
                          radeon_drm.h radeon_drv.c radeon_drv.h 
                          radeon_state.c sis_drv.c sis_mm.c 
        drivers/char/ftape/compressor: zftape-compress.c 
        drivers/char/ftape/lowlevel: ftape-init.c 
        drivers/char/ftape/zftape: zftape-init.c 
        drivers/char/watchdog: i8xx_tco.c 
        drivers/ide/pci: via82cxxx.c 
        drivers/infiniband/core: user_mad.c 
        drivers/infiniband/hw/mthca: Kconfig mthca_cmd.c mthca_cmd.h 
                                     mthca_config_reg.h mthca_dev.h 
                                     mthca_doorbell.h mthca_eq.c 
                                     mthca_mad.c mthca_main.c 
                                     mthca_memfree.c mthca_memfree.h 
                                     mthca_profile.c mthca_profile.h 
                                     mthca_provider.c mthca_provider.h 
        drivers/infiniband/include: ib_verbs.h 
        drivers/infiniband/ulp/ipoib: ipoib.h ipoib_ib.c ipoib_main.c 
        drivers/input/gameport: cs461x.c 
        drivers/input/joystick: sidewinder.c 
        drivers/input/keyboard: atkbd.c 
        drivers/input/serio: i8042.c libps2.c serport.c 
        drivers/isdn/hardware/avm: avmcard.h 
        drivers/isdn/hardware/eicon: divamnt.c divasi.c divasproc.c io.c 
                                     mntfunc.c platform.h s_4bri.c 
                                     s_bri.c s_pri.c 
        drivers/isdn/icn: icn.h 
        drivers/isdn/pcbit: drv.c pcbit.h 
        drivers/macintosh: via-pmu.c 
        drivers/md     : dm-io.c dm-ioctl.c dm-log.c dm-raid1.c 
                         dm-stripe.c dm-table.c dm.c dm.h raid5.c 
                         raid6main.c 
        drivers/media  : Kconfig 
        drivers/media/common: ir-common.c saa7146_core.c saa7146_fops.c 
        drivers/media/dvb/b2c2: Kconfig b2c2-usb-core.c skystar2.c 
        drivers/media/dvb/bt8xx: Kconfig dvb-bt8xx.c dvb-bt8xx.h 
        drivers/media/dvb/dibusb: Kconfig Makefile dvb-dibusb.h 
        drivers/media/dvb/dvb-core: dvb_demux.c dvb_demux.h 
                                    dvb_frontend.c dvb_frontend.h 
                                    dvb_net.c dvbdev.c 
        drivers/media/dvb/frontends: Kconfig Makefile cx22700.c 
                                     dib3000-common.c dib3000-common.h 
                                     dib3000.h dib3000mb.c dib3000mc.c 
                                     dib3000mc_priv.h mt352.c mt352.h 
                                     sp8870.c sp887x.c stv0297.c 
                                     stv0297.h tda10021.c tda10021.h 
                                     tda80xx.c 
        drivers/media/dvb/ttpci: av7110.c av7110.h av7110_hw.c 
                                 av7110_v4l.c budget-core.c 
                                 budget-patch.c budget.c 
        drivers/media/dvb/ttusb-dec: ttusb_dec.c 
        drivers/media/video: Kconfig Makefile arv.c btcx-risc.c 
                             bttv-cards.c bttv-driver.c bttv-i2c.c 
                             bttv-if.c bttv-risc.c bttv-vbi.c bttv.h 
                             bttvp.h ir-kbd-gpio.c ir-kbd-i2c.c 
                             msp3400.c saa5246a.c saa5246a.h saa5249.c 
                             tda9887.c tuner.c tvaudio.c tvaudio.h 
                             tvmixer.c video-buf-dvb.c video-buf.c 
                             w9966.c zr36120.c 
        drivers/media/video/cx88: cx88-i2c.c 
        drivers/media/video/saa7134: saa7134-core.c 
        drivers/mtd/chips: jedec_probe.c 
        drivers/mtd/devices: block2mtd.c 
        drivers/mtd/maps: sun_uflash.c 
        drivers/net    : 3c59x.c e100.c gianfar.c r8169.c sungem.c 
                         sungem.h tg3.c tg3.h tun.c 
        drivers/net/e1000: e1000.h e1000_main.c 
        drivers/net/pcmcia: 3c574_cs.c 3c589_cs.c axnet_cs.c 
                            fmvj18x_cs.c nmclan_cs.c pcnet_cs.c 
                            smc91c92_cs.c xirc2ps_cs.c 
        drivers/net/skfp: skfddi.c 
        drivers/net/tulip: de2104x.c 
        drivers/net/wireless: netwave_cs.c wavelan_cs.c 
        drivers/oprofile: cpu_buffer.c oprof.c 
        drivers/parisc : led.c 
        drivers/pci/hotplug: shpchprm_legacy.c 
        drivers/pcmcia : cs.c hd64465_ss.c i82092.c i82365.c m32r_cfc.c 
                         m32r_pcc.c rsrc_nonstatic.c tcic.c 
        drivers/pnp/pnpacpi: core.c 
        drivers/pnp/pnpbios: core.c 
        drivers/scsi   : NCR53C9x.c NCR53C9x.h NCR_Q720.c ahci.c 
                         aic7xxx_old.c dpt_i2o.c gdth.c hosts.c 
                         libata-scsi.c oktagon_esp.c osst.c osst.h 
                         sata_sil.c scsi_debug.c scsi_error.c scsi_lib.c 
                         scsi_priv.h scsi_scan.c scsi_sysfs.c 
                         scsi_transport_fc.c scsi_transport_iscsi.c 
                         scsi_transport_spi.c sd.c sg.c sr.c 
        drivers/scsi/aacraid: aachba.c aacraid.h 
        drivers/scsi/megaraid: megaraid_mbox.c 
        drivers/serial : 8250_pnp.c icom.c icom.h mpsc.c mpsc.h 
                         pmac_zilog.c s3c2410.c serial_cs.c 
        drivers/usb/atm: speedtch.c 
        drivers/usb/core: hcd.c 
        drivers/usb/gadget: ether.c file_storage.c serial.c zero.c 
        drivers/usb/host: ehci-q.c 
        drivers/usb/input: hid-core.c hid-debug.h hid-input.c hid.h 
        drivers/usb/misc: idmouse.c 
        drivers/video  : Kconfig fbmem.c fbmon.c vesafb.c 
        drivers/video/aty: radeon_base.c 
        drivers/video/backlight: Kconfig Makefile 
        drivers/video/console: fbcon.c 
        drivers/video/intelfb: intelfbhw.c 
        drivers/video/matrox: Makefile matroxfb_DAC1064.c 
                              matroxfb_DAC1064.h matroxfb_base.c 
                              matroxfb_base.h matroxfb_g450.h 
        fs             : Kconfig aio.c binfmt_elf.c compat.c 
                         compat_ioctl.c file_table.c ioctl.c locks.c 
                         mbcache.c pipe.c read_write.c 
        fs/cifs        : connect.c 
        fs/ext2        : acl.c acl.h balloc.c inode.c xattr.c 
        fs/ext3        : acl.c acl.h inode.c xattr.c 
        fs/nfsd        : export.c 
        fs/ntfs        : ChangeLog debug.c 
        fs/openpromfs  : inode.c 
        fs/proc        : base.c generic.c 
        fs/reiserfs    : file.c 
        fs/udf         : balloc.c ialloc.c super.c 
        fs/xfs         : Makefile xfs_clnt.h xfs_iget.c xfs_inode.h 
                         xfs_mount.h xfs_vfsops.c xfs_vnodeops.c 
        fs/xfs/linux-2.6: kmem.h xfs_aops.c xfs_buf.c xfs_buf.h 
                          xfs_file.c xfs_ioctl.c xfs_iops.c xfs_linux.h 
                          xfs_lrw.c xfs_stats.h xfs_super.c xfs_super.h 
                          xfs_vnode.c xfs_vnode.h 
        include/acpi   : acconfig.h acdebug.h acdisasm.h acdispat.h 
                         acevents.h acexcep.h acglobal.h achware.h 
                         acinterp.h aclocal.h acmacros.h acnamesp.h 
                         acobject.h acoutput.h acparser.h acpi.h 
                         acpiosxf.h acpixf.h acresrc.h acstruct.h 
                         actables.h actbl.h actbl1.h actbl2.h actypes.h 
                         acutils.h amlcode.h amlresrc.h processor.h 
        include/acpi/platform: acenv.h acgcc.h aclinux.h 
        include/asm-alpha: bitops.h page.h pgtable.h string.h 
                           thread_info.h uaccess.h 
        include/asm-arm: bitops.h elf.h numnodes.h ptrace.h string.h 
                         thread_info.h unistd.h 
        include/asm-arm/arch-iop3xx: iop321.h iop331.h 
        include/asm-arm/arch-ixp4xx: system.h uncompress.h 
        include/asm-arm/arch-lh7a40x: memory.h 
        include/asm-arm/arch-pxa: corgi.h pxa-regs.h 
        include/asm-arm/arch-s3c2410: io.h regs-serial.h 
        include/asm-arm26: constants.h thread_info.h 
        include/asm-cris: page.h thread_info.h 
        include/asm-generic: cputime.h 
        include/asm-h8300: bitops.h page.h thread_info.h 
        include/asm-i386: page.h thread_info.h 
        include/asm-ia64: bitops.h hardirq.h hw_irq.h machvec.h 
                          machvec_init.h machvec_sn2.h page.h pal.h 
                          sal.h string.h thread_info.h uaccess.h 
                          unistd.h 
        include/asm-ia64/sn: sn_cpuid.h 
        include/asm-m32r: page.h thread_info.h 
        include/asm-m68k: checksum.h thread_info.h 
        include/asm-m68knommu: page.h thread_info.h 
        include/asm-mips: string.h thread_info.h 
        include/asm-parisc: string.h thread_info.h 
        include/asm-ppc: ibm44x.h mpc10x.h mpc85xx.h mv64x60.h 
                         mv64x60_defs.h pmac_feature.h processor.h reg.h 
                         string.h thread_info.h uninorth.h 
        include/asm-ppc64: cacheflush.h cputable.h eeh.h io.h mmu.h 
                           mmu_context.h page.h prom.h string.h 
                           thread_info.h uaccess.h 
        include/asm-s390: hardirq.h page.h string.h thread_info.h 
        include/asm-sh : spinlock.h string.h thread_info.h 
        include/asm-sh64: thread_info.h 
        include/asm-sparc: bitops.h pgtable.h pgtsrmmu.h string.h 
                           thread_info.h uaccess.h 
        include/asm-sparc64: compat.h page.h pgalloc.h pgtable.h 
                             thread_info.h tlb.h 
        include/asm-um : thread_info.h 
        include/asm-v850: string.h thread_info.h 
        include/asm-x86_64: compat.h i387.h mtrr.h numa.h numnodes.h 
                            page.h pci.h pgtable.h processor.h 
                            spinlock.h thread_info.h uaccess.h 
        include/linux  : atalk.h audit.h crypto.h device-mapper.h 
                         dm-ioctl.h efi.h firmware.h fs.h highmem.h 
                         i2c-id.h irq_cpustat.h jbd.h jiffies.h 
                         kobject.h mmzone.h moduleparam.h mv643xx.h 
                         netdevice.h oprofile.h sched.h serial_reg.h 
                         spinlock.h sysctl.h udf_fs_sb.h videodev2.h 
                         videotext.h 
        include/linux/dvb: frontend.h version.h 
        include/linux/netfilter_ipv4: ip_conntrack.h ip_conntrack_tftp.h 
                                      ipt_conntrack.h ipt_multiport.h 
        include/media  : tuner.h video-buf-dvb.h 
        include/net    : ip.h xfrm.h 
        include/net/bluetooth: hci.h rfcomm.h 
        include/pcmcia : cs_types.h ss.h 
        include/scsi   : scsi_device.h scsi_eh.h scsi_host.h 
                         scsi_transport.h scsi_transport_spi.h 
        init           : do_mounts.c initramfs.c main.c 
        kernel         : audit.c auditsc.c kallsyms.c params.c ptrace.c 
                         sched.c signal.c sys_ni.c sysctl.c 
        kernel/irq     : manage.c proc.c 
        kernel/power   : main.c 
        lib            : string.c 
        mm             : memory.c oom_kill.c page-writeback.c 
                         page_alloc.c slab.c swap_state.c vmscan.c 
        net            : socket.c 
        net/8021q      : vlanproc.h 
        net/atm        : clip.c lec.c resources.c svc.c 
        net/bluetooth  : hci_conn.c hci_core.c hci_event.c hci_sock.c 
                         l2cap.c 
        net/bluetooth/cmtp: capi.c 
        net/bluetooth/hidp: core.c 
        net/bluetooth/rfcomm: core.c sock.c 
        net/core       : dev.c dev_mcast.c neighbour.c netpoll.c 
                         pktgen.c 
        net/ipv4       : ah4.c esp4.c ip_fragment.c ip_input.c 
                         ip_output.c ipcomp.c 
        net/ipv4/ipvs  : ip_vs_core.c 
        net/ipv4/netfilter: ip_conntrack_core.c ip_conntrack_irc.c 
                            ip_conntrack_standalone.c ip_nat_core.c 
                            ip_nat_irc.c ip_nat_proto_tcp.c 
                            ip_nat_rule.c ip_nat_standalone.c 
                            ipt_CLUSTERIP.c ipt_multiport.c 
        net/ipv6       : ah6.c esp6.c ip6_output.c ipcomp6.c 
        net/key        : af_key.c 
        net/netlink    : af_netlink.c 
        net/sched      : sch_generic.c sch_teql.c 
        net/xfrm       : xfrm_algo.c xfrm_user.c 
        sound/oss      : i810_audio.c 
        sound/pci      : bt87x.c 
        sound/pci/mixart: mixart_core.c 
        sound/pci/rme9652: hdsp.c 
Added files:
        arch/arm/configs: omap_h2_1610_defconfig 
        arch/arm/mach-ixp4xx: gtwx5715-pci.c gtwx5715-setup.c 
        arch/ppc/configs: mpc8540_ads_defconfig mpc8555_cds_defconfig 
                          mpc8560_ads_defconfig stx_gp3_defconfig 
        arch/ppc/platforms: pmac_cache.S 
        arch/ppc/platforms/85xx: stx_gp3.c stx_gp3.h 
        drivers/base   : attribute_container.c transport_class.c 
        drivers/char/drm: drm_pci.c drm_sysfs.c 
        drivers/media/dvb/dibusb: dvb-dibusb-core.c dvb-dibusb-dvb.c 
                                  dvb-dibusb-fe-i2c.c 
                                  dvb-dibusb-firmware.c dvb-dibusb-pid.c 
                                  dvb-dibusb-remote.c dvb-dibusb-usb.c 
        drivers/media/dvb/frontends: nxt2002.c nxt2002.h 
        drivers/media/video: tveeprom.c 
        drivers/video/backlight: corgi_bl.c 
        fs/xfs         : Kconfig 
        fs/xfs/linux-2.6: xfs_export.c 
        include/asm-arm/arch-cl7500: debug-macro.S 
        include/asm-arm/arch-clps711x: debug-macro.S 
        include/asm-arm/arch-ebsa110: debug-macro.S 
        include/asm-arm/arch-ebsa285: debug-macro.S 
        include/asm-arm/arch-epxa10db: debug-macro.S 
        include/asm-arm/arch-h720x: debug-macro.S 
        include/asm-arm/arch-imx: debug-macro.S 
        include/asm-arm/arch-integrator: debug-macro.S 
        include/asm-arm/arch-iop3xx: debug-macro.S 
        include/asm-arm/arch-ixp2000: debug-macro.S 
        include/asm-arm/arch-ixp4xx: debug-macro.S gtwx5715.h 
        include/asm-arm/arch-l7200: debug-macro.S 
        include/asm-arm/arch-lh7a40x: debug-macro.S 
        include/asm-arm/arch-omap: debug-macro.S 
        include/asm-arm/arch-pxa: audio.h debug-macro.S 
        include/asm-arm/arch-rpc: debug-macro.S 
        include/asm-arm/arch-s3c2410: debug-macro.S 
        include/asm-arm/arch-sa1100: debug-macro.S 
        include/asm-arm/arch-shark: debug-macro.S 
        include/asm-arm/arch-versatile: debug-macro.S 
        include/asm-mips: ng1.h ng1hw.h 
        include/linux  : attribute_container.h transport_class.h 
        include/media  : tveeprom.h 
Removed files:
        arch/ia64/sn/include: shub.h 
        drivers/atm    : nicstarmac.h 
        drivers/char/drm: ffb.h gamma.h i810.h i830.h i915.h mga.h 
                          r128.h radeon.h sis.h 
        drivers/media/dvb/dibusb: dvb-dibusb.c 
        drivers/scsi/dpt: dpt_osdutil.h 
        drivers/serial : mpsc_defs.h 

Log message:
        Merge with Linux 2.6.11-rc3.

diff -urN linux/CREDITS linux/CREDITS
--- linux/CREDITS       2005/01/25 04:27:50     1.137
+++ linux/CREDITS       2005/02/07 02:54:29     1.138
@@ -3165,6 +3165,14 @@
 S: Seattle, WA  98195-1800
 S: USA
 
+N: Eugene Surovegin
+E: ebs@ebshome.net
+W: http://kernel.ebshome.net/
+P: 1024D/AE5467F1 FF22 39F1 6728 89F6 6E6C  2365 7602 F33D AE54 67F1
+D: Embedded PowerPC 4xx: I2C, PIC and random hacks/fixes
+S: Sunnyvale, California 94085
+S: USA
+
 N: Corey Thomas
 E: corey@world.std.com
 W: http://world.std.com/~corey/index.html
diff -urN linux/MAINTAINERS linux/MAINTAINERS
--- linux/MAINTAINERS   2005/01/25 04:27:50     1.174
+++ linux/MAINTAINERS   2005/02/07 02:54:29     1.175
@@ -283,8 +283,8 @@
 S:     Maintained
 
 ARM MFM AND FLOPPY DRIVERS
-P:     Dave Gilbert
-M:     linux@treblig.org
+P:     Ian Molton
+M:     spyro@f2s.com
 S:     Maintained
 
 ARM/CORGI MACHINE SUPPORT
@@ -1798,7 +1798,7 @@
 
 PPP OVER ETHERNET
 P:     Michal Ostrowski
-M:     mostrows@styx.uwaterloo.ca
+M:     mostrows@speakeasy.net
 S:     Maintained
 
 PREEMPTIBLE KERNEL
@@ -1828,6 +1828,12 @@
 L:     linux-arm-kernel@lists.arm.linux.org.uk
 S:     Maintained
 
+QLOGIC QLA2XXX FC-SCSI DRIVER
+P:     Andrew Vasquez
+M:     andrew.vasquez@qlogic.com
+L:     linux-scsi@vger.kernel.org
+S:     Supported
+
 QNX4 FILESYSTEM
 P:     Anders Larsen
 M:     al@alarsen.net
diff -urN linux/Makefile linux/Makefile
--- linux/Makefile      2005/01/25 04:27:50     1.243
+++ linux/Makefile      2005/02/07 02:54:29     1.244
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 11
-EXTRAVERSION =-rc2
+EXTRAVERSION =-rc3
 NAME=Woozy Numbat
 
 # *DOCUMENTATION*
@@ -329,7 +329,7 @@
 PERL           = perl
 CHECK          = sparse
 
-NOSTDINC_FLAGS := -nostdinc -isystem $(shell $(CC) -print-file-name=include)
+NOSTDINC_FLAGS  = -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__
 CHECKFLAGS     += $(NOSTDINC_FLAGS)
 MODFLAGS       = -DMODULE
diff -urN linux/Documentation/devices.txt linux/Documentation/devices.txt
--- linux/Documentation/devices.txt     2005/01/25 04:27:51     1.31
+++ linux/Documentation/devices.txt     2005/02/07 02:54:29     1.32
@@ -1,9 +1,9 @@
 
-                      LINUX ALLOCATED DEVICES
+                   LINUX ALLOCATED DEVICES (2.6+ version)
 
             Maintained by Torben Mathiasen <device@lanana.org>
 
-                     Last revised: 04 August 2004
+                     Last revised: 25 January 2005
 
 This list is the Linux Device List, the official registry of allocated
 device numbers and /dev directory nodes for the Linux operating
@@ -24,7 +24,8 @@
 the Atari platform only.
 
 The symbol {2.6} means the allocation is obsolete and scheduled for
-removal once kernel version 2.6 (or equivalent) is released.
+removal once kernel version 2.6 (or equivalent) is released. Some of these
+allocations have already been removed.
 
 This document is in the public domain. The author requests, however,
 that semantically altered versions are not distributed without
@@ -41,13 +42,6 @@
 
          **** DEVICE DRIVERS AUTHORS PLEASE READ THIS ****
 
-THE DEVICE REGISTRY IS OFFICIALLY FROZEN FOR LINUS TORVALDS' KERNEL
-TREE.  At Linus' request, no more allocations will be made official
-for Linus' kernel tree; the 3 June 2001 version of this list is the
-official final version of this registry.  At Alan Cox' request,
-however, the registry will continue to be maintained for the -ac
-series of kernels, and registrations will be accepted.
-
 To have a major number allocated, or a minor number in situations
 where that applies (e.g. busmice), please contact me with the
 appropriate device information.         Also, if you have additional
@@ -436,6 +430,8 @@
                226 = /dev/systrace     Systrace device
                227 = /dev/mcelog       X86_64 Machine Check Exception driver
                228 = /dev/hpet         HPET driver
+               229 = /dev/fuse         Fuse (virtual filesystem in user-space)
+               230 = /dev/midishare    MidiShare driver
                240-254                 Reserved for local use
                255                     Reserved for MISC_DYNAMIC_MINOR
 
@@ -1176,7 +1172,7 @@
 
                Requested by: andy@scramdisklinux.org
 
- 65 char       Sundance "plink" Transputer boards
+ 65 char       Sundance "plink" Transputer boards (obsolete, unused)
                  0 = /dev/plink0       First plink device
                  1 = /dev/plink1       Second plink device
                  2 = /dev/plink2       Third plink device
@@ -1526,12 +1522,12 @@
                disks (see major number 3) except that the limit on
                partitions is 15.
 
- 83 char       Teletext/videotext interfaces {2.6}
-                 0 = /dev/vtx          Teletext decoder
-                16 = /dev/vttuner      TV tuner on teletext interface
-
-               Devices for the driver contained in the VideoteXt package.
-               More information on http://home.pages.de/~videotext/
+ 83 char       Matrox mga_vid video driver
+                0 = /dev/mga_vid0      1st video card
+                1 = /dev/mga_vid1      2nd video card
+                2 = /dev/mga_vid2      3rd video card
+                 ...
+               15 = /dev/mga_vid15     16th video card
 
  83 block      I2O hard disk
                  0 = /dev/i2o/hdaw     49th I2O hard disk, whole disk
@@ -1701,11 +1697,6 @@
                  3 = /dev/ipauth       Authentication control device/log file
                    ...         
 
- 95 block      IBM S/390 VM/ESA minidisk
-                 0 = /dev/msd0         First VM/ESA minidisk
-                 1 = /dev/msd1         Second VM/ESA minidisk
-                   ...
-
  96 char       Parallel port ATAPI tape devices
                  0 = /dev/pt0          First parallel port ATAPI tape
                  1 = /dev/pt1          Second parallel port ATAPI tape
@@ -1742,10 +1733,14 @@
                See http://stm.lbl.gov/comedi or http://www.llp.fu-berlin.de/.
 
  98 block      User-mode virtual block device
-                 0 = /dev/ubd0         First user-mode block device
-                 1 = /dev/ubd1         Second user-mode block device
+                 0 = /dev/ubda         First user-mode block device
+                16 = /dev/udbb         Second user-mode block device
                    ...
 
+               Partitions are handled in the same way as for IDE
+               disks (see major number 3) except that the limit on
+               partitions is 15.
+
                This device is used by the user-mode virtual kernel port.
 
  99 char       Raw parallel ports
@@ -2109,6 +2104,7 @@
                disks (see major number 3) except that the limit on
                partitions is 15.
 
+130 char       (Misc devices)
 
 130 block       SCSI disk devices (160-175)
                   0 = /dev/sdfe         161st SCSI disk whole disk
@@ -2546,7 +2542,12 @@
                  0 = /dev/usb/lp0      First USB printer
                    ...
                 15 = /dev/usb/lp15     16th USB printer
-                32 = /dev/usb/mdc800   MDC800 USB camera
+                16 = /dev/usb/mouse0   First USB mouse
+                   ...
+                31 = /dev/usb/mouse15  16th USB mouse
+                32 = /dev/usb/ez0      First USB firmware loader
+                   ...
+                47 = /dev/usb/ez15     16th USB firmware loader
                 48 = /dev/usb/scanner0 First USB scanner
                    ...
                 63 = /dev/usb/scanner15 16th USB scanner
@@ -2554,23 +2555,11 @@
                 65 = /dev/usb/usblcd   USBLCD Interface (info@usblcd.de)
                 66 = /dev/usb/cpad0    Synaptics cPad (mouse/LCD)
 
-                96 = /dev/usb/hiddev0  1st USB HID device
-                   ...
-               111 = /dev/usb/hiddev15 16th USB HID device
-               112 = /dev/usb/auer0    1st auerswald ISDN device
-                   ...
-               127 = /dev/usb/auer15   16th auerswald ISDN device
-               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
-                   ...
-               175 = /dev/usb/legousbtower15   16th USB Legotower device
-               240 = /dev/usb/dabusb0  First daubusb device
-                   ...
-               243 = /dev/usb/dabusb3  Fourth dabusb device
+180 block      USB block devices
+               0 = /dev/uba            First USB block device
+               8 = /dev/ubb            Second USB block device
+               16 = /dev/ubc           Thrid USB block device
+               ...
 
 181 char       Conrad Electronic parallel port radio clocks
                  0 = /dev/pcfclock0    First Conrad radio clock
@@ -2761,8 +2750,10 @@
                 45 = /dev/ttyMM1               Marvell MPSC - port 1
                 46 = /dev/ttyCPM0              PPC CPM (SCC or SMC) - port 0
                    ...
-                49 = /dev/ttyCPM5              PPC CPM (SCC or SMC) - port 5
-
+                47 = /dev/ttyCPM5              PPC CPM (SCC or SMC) - port 5
+                50 = /dev/ttyIOC40             Altix serial card
+                   ...
+                81 = /dev/ttyIOC431            Altix serial card
 
 205 char       Low-density serial ports (alternate device)
                  0 = /dev/culu0                Callout device for ttyLU0
@@ -2788,12 +2779,16 @@
                    ...
                 39 = /dev/cudb7                Callout device for ttyDB7
                 40 = /dev/cusg0                Callout device for ttySG0
-                41 = /dev/ttySMX0              Callout device for ttySMX0
-                42 = /dev/ttySMX1              Callout device for ttySMX1
-                43 = /dev/ttySMX2              Callout device for ttySMX2
+                41 = /dev/ttycusmx0            Callout device for ttySMX0
+                42 = /dev/ttycusmx1            Callout device for ttySMX1
+                43 = /dev/ttycusmx2            Callout device for ttySMX2
                 46 = /dev/cucpm0               Callout device for ttyCPM0
                    ...
                 49 = /dev/cucpm5               Callout device for ttyCPM5
+                50 = /dev/cuioc40              Callout device for ttyIOC40
+                   ...
+                81 = /dev/cuioc431             Callout device for ttyIOC431
+
 
 206 char       OnStream SC-x0 tape devices
                  0 = /dev/osst0                First OnStream SCSI tape, mode 0
@@ -3007,7 +3002,12 @@
                ioctl()'s can be used to rewind the tape regardless of
                the device used to access it.
 
-231-239                UNASSIGNED
+231 char       InfiniBand MAD
+               0 = /dev/infiniband/umad0
+               1 = /dev/infiniband/umad1
+                ...
+
+232-239                UNASSIGNED
 
 240-254 char   LOCAL/EXPERIMENTAL USE
 240-254 block  LOCAL/EXPERIMENTAL USE
diff -urN linux/Documentation/ioctl-number.txt 
linux/Documentation/ioctl-number.txt
--- linux/Documentation/ioctl-number.txt        2005/01/13 14:05:14     1.31
+++ linux/Documentation/ioctl-number.txt        2005/02/07 02:54:29     1.32
@@ -146,7 +146,7 @@
 'p'    40-7F   linux/nvram.h
 'p'    80-9F                           user-space parport
                                        <mailto:tim@cyberelk.net>
-'q'    00-1F   linux/videotext.h       conflict!
+'q'    00-1F   linux/serio.h
 'q'    80-FF                           Internet PhoneJACK, Internet LineJACK
                                        <http://www.quicknet.net>
 'r'    00-1F   linux/msdos_fs.h
@@ -164,6 +164,7 @@
 'z'    40-7F                           CAN bus card
                                        <mailto:oe@port.de>
 0x80   00-1F   linux/fb.h
+0x81   00-1F   linux/videotext.h
 0x89   00-06   asm-i386/sockios.h
 0x89   0B-DF   linux/sockios.h
 0x89   E0-EF   linux/sockios.h         SIOCPROTOPRIVATE range
diff -urN linux/Documentation/kernel-parameters.txt 
linux/Documentation/kernel-parameters.txt
--- linux/Documentation/kernel-parameters.txt   2005/01/25 04:27:51     1.55
+++ linux/Documentation/kernel-parameters.txt   2005/02/07 02:54:29     1.56
@@ -226,15 +226,19 @@
 
        atascsi=        [HW,SCSI] Atari SCSI
 
-       atkbd.extra=    [HW] Enable extra LEDs and keys on IBM RapidAccess, 
EzKey
-                       and similar keyboards
+       atkbd.extra=    [HW] Enable extra LEDs and keys on IBM RapidAccess,
+                       EzKey and similar keyboards
 
        atkbd.reset=    [HW] Reset keyboard during initialization
 
        atkbd.set=      [HW] Select keyboard code set 
                        Format: <int> (2 = AT (default) 3 = PS/2)
 
-       atkbd.scroll=   [HW] Enable scroll wheel on MS Office and similar 
keyboards
+       atkbd.scroll=   [HW] Enable scroll wheel on MS Office and similar
+                       keyboards
+
+       atkbd.softraw=  [HW] Choose between synthetic and real raw mode
+                       Format: <bool> (0 = real, 1 = synthetic (default))
        
        atkbd.softrepeat=
                        [HW] Use software keyboard repeat
@@ -1014,6 +1018,9 @@
                        Format: { parport<nr> | timid | 0 }
                        See also Documentation/parport.txt.
 
+       pnpacpi=        [ACPI]
+                       { off }
+
        pnpbios=        [ISAPNP]
                        { on | off | curr | res | no-curr | no-res }
 
@@ -1099,6 +1106,9 @@
 
        root=           [KNL] Root filesystem
 
+       rootdelay=      [KNL] Delay (in seconds) to pause before attempting to
+                       mount the root filesystem
+
        rootflags=      [KNL] Set root filesystem mount option string
 
        rootfstype=     [KNL] Set root filesystem type
diff -urN linux/Documentation/DocBook/kernel-api.tmpl 
linux/Documentation/DocBook/kernel-api.tmpl
--- linux/Documentation/DocBook/kernel-api.tmpl 2005/01/13 14:05:14     1.36
+++ linux/Documentation/DocBook/kernel-api.tmpl 2005/02/07 02:54:30     1.37
@@ -152,7 +152,6 @@
   <chapter id="netdev">
      <title>Network device support</title>
      <sect1><title>Driver Support</title>
-!Edrivers/net/net_init.c
 !Enet/core/dev.c
      </sect1>
      <sect1><title>8390 Based Network Cards</title>
diff -urN linux/Documentation/dvb/README.dibusb 
linux/Documentation/dvb/README.dibusb
--- linux/Documentation/dvb/README.dibusb       2004/12/27 02:15:47     1.3
+++ linux/Documentation/dvb/README.dibusb       2005/02/07 02:54:30     1.4
@@ -26,7 +26,7 @@
 - HAMA DVB-T USB device
        http://www.hama.de/portal/articleId*110620/action*2598
 
-- CTS Portable (Chinese Television System)
+- CTS Portable (Chinese Television System) (2)
        http://www.2cts.tv/ctsportable/
 
 - Unknown USB DVB-T device with vendor ID Hyper-Paltek
@@ -46,16 +46,16 @@
 
 Others:
 -------
-- Ultima Electronic/Artec T1 USB TVBOX (AN2135 and AN2235)
+- Ultima Electronic/Artec T1 USB TVBOX (AN2135, AN2235, AN2235 with Panasonic 
Tuner) 
        http://82.161.246.249/products-tvbox.html
 
-- Compro Videomate DVB-U2000 - DVB-T USB
+- Compro Videomate DVB-U2000 - DVB-T USB (2)
        http://www.comprousa.com/products/vmu2000.htm
 
 - Grandtec USB DVB-T
        http://www.grand.com.tw/
 
-- Avermedia AverTV DVBT USB
+- Avermedia AverTV DVBT USB (2)
        http://www.avermedia.com/
 
 - DiBcom USB DVB-T reference device (non-public)
@@ -63,16 +63,33 @@
 
 Supported devices USB2.0
 ========================
-- Twinhan MagicBox II
+- Twinhan MagicBox II (2)
        http://www.twinhan.com/product_terrestrial_7.asp
 
-- Yakumo DVB-T mobile
+- Hanftek UMT-010 (1)
+       
http://www.globalsources.com/si/6008819757082/ProductDetail/Digital-TV/product_id-100046529
+
+- Typhoon/Yakumo/HAMA DVB-T mobile USB2.0 (1)
        http://www.yakumo.de/produkte/index.php?pid=1&ag=DVB-T
 
+- Artec T1 USB TVBOX (FX2) (2)
+
 - DiBcom USB2.0 DVB-T reference device (non-public)
 
+1) It is working almost.
+2) No test reports received yet. 
+
 
 0. NEWS:
+  2004-01-13 - moved the mirrored pid_filter_table back to dvb-dibusb
+             - first almost working version for HanfTek UMT-010
+             - found out, that Yakumo/HAMA/Typhoon are predessors of the 
HanfTek
+  2004-01-10 - refactoring completed, now everything is very delightful
+             - tuner quirks for some weird devices (Artec T1 AN2235 device has 
sometimes a
+               Panasonic Tuner assembled). Tunerprobing implemented. Thanks a 
lot to Gunnar Wittich. 
+  2004-12-29 - after several days of struggling around bug of no returning 
URBs fixed.
+  2004-12-26 - refactored the dibusb-driver, splitted into separate files
+             - i2c-probing enabled
   2004-12-06 - possibility for demod i2c-address probing
              - new usb IDs (Compro,Artec)
   2004-11-23 - merged changes from DiB3000MC_ver2.1
@@ -115,13 +132,15 @@
 
 1. How to use?
 NOTE: This driver was developed using Linux 2.6.6.,
-it is working with 2.6.7, 2.6.8.1, 2.6.9 .
+it is working with 2.6.7 and above.
 
 Linux 2.4.x support is not planned, but patches are very welcome.
 
 NOTE: I'm using Debian testing, so the following explaination (especially
 the hotplug-path) needn't match your system, but probably it will :).
 
+The driver is included in the kernel since Linux 2.6.10.
+
 1.1. Firmware
 
 The USB driver needs to download a firmware to start working.
@@ -155,9 +174,13 @@
 first have a look, which debug level are available:
 
 modinfo dib3000mb
+modinfo dib3000-common
+modinfo dib3000mc
 modinfo dvb-dibusb
 
+modprobe dib3000-common debug=<level>
 modprobe dib3000mb debug=<level>
+modprobe dib3000mc debug=<level>
 modprobe dvb-dibusb debug=<level>
 
 should do the trick.
@@ -168,13 +191,11 @@
 
 At this point you should be able to start a dvb-capable application. For myself
 I used mplayer, dvbscan, tzap and kaxtv, they are working. Using the device
-as a slave device in vdr, was not working for me. Some work has to be done
-(patches and comments are very welcome).
+in vdr (at least the USB2.0 one) is working. 
 
 2. Known problems and bugs
 
-TODO:
-- signal-quality and strength calculations
+- none this time
 
 2.1. Adding support for devices 
 
@@ -202,9 +223,10 @@
 maximum bandwidth of about 5-6 MBit/s when connected to a USB2.0 hub.
 This is not enough for receiving the complete transport stream of a
 DVB-T channel (which can be about 16 MBit/s). Normally this is not a
-problem, if you only want to watch TV, but watching a channel while
-recording another channel on the same frequency simply does not work.
-This applies to all USB1.1 DVB-T devices.
+problem, if you only want to watch TV (this does not apply for HDTV),
+but watching a channel while recording another channel on the same 
+frequency simply does not work. This applies to all USB1.1 DVB-T 
+devices, not only dibusb)
 
 A special problem of the dibusb for the USB1.1 is, that the USB control
 IC has a problem with write accesses while having MPEG2-streaming
@@ -218,14 +240,20 @@
 these features is maybe a solution. Additionally this behaviour of VDR exceeds
 the USB1.1 bandwidth.
 
+Update:
+For the USB1.1 and VDR some work has been done (patches and comments are still 
+very welcome). Maybe the problem is solved in the meantime because I now use
+the dmx_sw_filter function instead of dmx_sw_filter_packet. I hope the
+linux-dvb software filter is able to get the best of the garbled TS.
+
 2.3. Comments
 
 Patches, comments and suggestions are very very welcome
 
 3. Acknowledgements
        Amaury Demol (ademol@dibcom.fr) and Francois Kanounnikoff from DiBcom 
for
-       providing specs, code and help, on which the dvb-dibusb and dib3000mb 
are
-       based.
+    providing specs, code and help, on which the dvb-dibusb, dib3000mb and 
+    dib3000mc are based.
 
    David Matthews for identifying a new device type (Artec T1 with AN2235)
     and for extending dibusb with remote control event handling. Thank you.
diff -urN linux/Documentation/dvb/get_dvb_firmware 
linux/Documentation/dvb/get_dvb_firmware
--- linux/Documentation/dvb/get_dvb_firmware    2004/12/27 02:15:47     1.2
+++ linux/Documentation/dvb/get_dvb_firmware    2005/02/07 02:54:30     1.3
@@ -21,7 +21,8 @@
 use File::Temp qw/ tempdir /;
 use IO::Handle;
 
-@components = ( "sp8870", "sp887x", "tda10045", "tda10046", "av7110", 
"dec2000t", "dec2540t", "dec3000s", "vp7041", "dibusb" );
+@components = ( "sp8870", "sp887x", "tda10045", "tda10046", "av7110", 
"dec2000t",
+               "dec2540t", "dec3000s", "vp7041", "dibusb", "nxt2002" );
 
 # Check args
 syntax() if (scalar(@ARGV) != 1);
@@ -233,6 +234,23 @@
        $outfile;
 }
 
+sub nxt2002 {
+    my $sourcefile = "Broadband4PC_4_2_11.zip";
+    my $url = "http://www.bbti.us/download/windows/$sourcefile";;
+    my $hash = "c6d2ea47a8f456d887ada0cfb718ff2a";
+    my $outfile = "dvb-fe-nxt2002.fw";
+    my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
+
+    checkstandard();
+    
+    wgetfile($sourcefile, $url);
+    unzip($sourcefile, $tmpdir);
+    verify("$tmpdir/SkyNETU.sys", $hash);
+    extract("$tmpdir/SkyNETU.sys", 375832, 5908, $outfile);
+
+    $outfile;
+}
+
 # ---------------------------------------------------------------
 # Utilities
 
diff -urN linux/Documentation/infiniband/user_mad.txt 
linux/Documentation/infiniband/user_mad.txt
--- linux/Documentation/infiniband/user_mad.txt 2005/01/13 14:05:16     1.1
+++ linux/Documentation/infiniband/user_mad.txt 2005/02/07 02:54:30     1.2
@@ -2,9 +2,10 @@
 
 Device files
 
-  Each port of each InfiniBand device has a "umad" device attached.
-  For example, a two-port HCA will have two devices, while a switch
-  will have one device (for switch port 0).
+  Each port of each InfiniBand device has a "umad" device and an
+  "issm" device attached.  For example, a two-port HCA will have two
+  umad devices and two issm devices, while a switch will have one
+  device of each type (for switch port 0).
 
 Creating MAD agents
 
@@ -63,19 +64,36 @@
        if (ret != sizeof mad)
                perror("write");
 
+Setting IsSM Capability Bit
+
+  To set the IsSM capability bit for a port, simply open the
+  corresponding issm device file.  If the IsSM bit is already set,
+  then the open call will block until the bit is cleared (or return
+  immediately with errno set to EAGAIN if the O_NONBLOCK flag is
+  passed to open()).  The IsSM bit will be cleared when the issm file
+  is closed.  No read, write or other operations can be performed on
+  the issm file.
+
 /dev files
 
   To create the appropriate character device files automatically with
   udev, a rule like
 
     KERNEL="umad*", NAME="infiniband/%k"
+    KERNEL="issm*", NAME="infiniband/%k"
 
-  can be used.  This will create a device node named
+  can be used.  This will create device nodes named
 
     /dev/infiniband/umad0
+    /dev/infiniband/issm0
 
   for the first port, and so on.  The InfiniBand device and port
-  associated with this device can be determined from the files
+  associated with these devices can be determined from the files
 
     /sys/class/infiniband_mad/umad0/ibdev
     /sys/class/infiniband_mad/umad0/port
+
+  and
+
+    /sys/class/infiniband_mad/issm0/ibdev
+    /sys/class/infiniband_mad/issm0/port
diff -urN linux/Documentation/networking/netdevices.txt 
linux/Documentation/networking/netdevices.txt
--- linux/Documentation/networking/netdevices.txt       2005/01/25 04:27:51     
1.6
+++ linux/Documentation/networking/netdevices.txt       2005/02/07 02:54:30     
1.7
@@ -45,9 +45,10 @@
        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 execute it's transmission routine in a completely lockless
-       manner.  It is recommended only for queueless devices such
-       loopback and tunnels.
+       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
        Context: BHs disabled
        Notes: netif_queue_stopped() is guaranteed false
        Return codes: 
@@ -55,6 +56,8 @@
        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/vm/hugetlbpage.txt 
linux/Documentation/vm/hugetlbpage.txt
--- linux/Documentation/vm/hugetlbpage.txt      2005/01/13 14:05:16     1.10
+++ linux/Documentation/vm/hugetlbpage.txt      2005/02/07 02:54:30     1.11
@@ -1,8 +1,8 @@
 
 The intent of this file is to give a brief summary of hugetlbpage support in
 the Linux kernel.  This support is built on top of multiple page size support
-that is provided by most modern architectures.  For example, IA-32
-architecture supports 4K and 4M (2M in PAE mode) page sizes, IA-64
+that is provided by most modern architectures.  For example, i386
+architecture supports 4K and 4M (2M in PAE mode) page sizes, ia64
 architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M,
 256M and ppc64 supports 4K and 16M.  A TLB is a cache of virtual-to-physical
 translations.  Typically this is a very scarce resource on processor.
@@ -107,10 +107,10 @@
  * SHM_HUGETLB in the shmget system call to inform the kernel that it is
  * requesting hugepages.
  *
- * For the IA-64 architecture, the Linux kernel reserves Region number 4 for
+ * For the ia64 architecture, the Linux kernel reserves Region number 4 for
  * hugepages.  That means the addresses starting with 0x800000... will need
  * to be specified.  Specifying a fixed address is not required on ppc64,
- * i386 or amd64.
+ * i386 or x86_64.
  *
  * Note: The default shared memory limit is quite low on many kernels,
  * you may need to increase it via:
@@ -139,8 +139,8 @@
 
 #define dprintf(x)  printf(x)
 
-/* Only IA64 requires this */
-#ifdef IA64
+/* Only ia64 requires this */
+#ifdef __ia64__
 #define ADDR (void *)(0x8000000000000000UL)
 #define SHMAT_FLAGS (SHM_RND)
 #else
@@ -204,10 +204,10 @@
  * example, the app is requesting memory of size 256MB that is backed by
  * huge pages.
  *
- * For IA-64 architecture, Linux kernel reserves Region number 4 for hugepages.
+ * For ia64 architecture, Linux kernel reserves Region number 4 for hugepages.
  * That means the addresses starting with 0x800000... will need to be
  * specified.  Specifying a fixed address is not required on ppc64, i386
- * or amd64.
+ * or x86_64.
  */
 #include <stdlib.h>
 #include <stdio.h>
@@ -219,8 +219,8 @@
 #define LENGTH (256UL*1024*1024)
 #define PROTECTION (PROT_READ | PROT_WRITE)
 
-/* Only IA64 requires this */
-#ifdef IA64
+/* Only ia64 requires this */
+#ifdef __ia64__
 #define ADDR (void *)(0x8000000000000000UL)
 #define FLAGS (MAP_SHARED | MAP_FIXED)
 #else
diff -urN linux/arch/alpha/lib/memmove.S linux/arch/alpha/lib/memmove.S
--- linux/arch/alpha/lib/memmove.S      2003/06/23 01:23:02     1.4
+++ linux/arch/alpha/lib/memmove.S      2005/02/07 02:54:30     1.5
@@ -12,18 +12,6 @@
        .text
 
        .align 4
-       .globl bcopy
-       .ent bcopy
-bcopy:
-       ldgp $29, 0($27)
-       .prologue 1
-       mov $16,$0
-       mov $17,$16
-       mov $0,$17
-       br  $31, memmove        !samegp
-       .end bcopy
-
-       .align 4
        .globl memmove
        .ent memmove
 memmove:
diff -urN linux/arch/alpha/oprofile/common.c linux/arch/alpha/oprofile/common.c
--- linux/arch/alpha/oprofile/common.c  2005/01/13 14:05:17     1.6
+++ linux/arch/alpha/oprofile/common.c  2005/02/07 02:54:30     1.7
@@ -138,7 +138,7 @@
        return 0;
 }
 
-void __init
+int __init
 oprofile_arch_init(struct oprofile_operations *ops)
 {
        struct op_axp_model *lmodel = NULL;
@@ -166,7 +166,7 @@
        }
 
        if (!lmodel)
-               return;
+               return -ENODEV;
        model = lmodel;
 
        ops->create_files = op_axp_create_files;
@@ -178,6 +178,8 @@
 
        printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
               lmodel->cpu_type);
+
+       return 0;
 }
 
 
diff -urN linux/arch/arm/boot/compressed/head-xscale.S 
linux/arch/arm/boot/compressed/head-xscale.S
--- linux/arch/arm/boot/compressed/head-xscale.S        2005/01/13 14:05:17     
1.9
+++ linux/arch/arm/boot/compressed/head-xscale.S        2005/02/07 02:54:30     
1.10
@@ -42,3 +42,8 @@
                mov     r7, #MACH_TYPE_COTULLA_IDP
 #endif
 
+#ifdef  CONFIG_MACH_GTWX5715
+               mov     r7, #(MACH_TYPE_GTWX5715 & 0xff)
+               orr     r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00)
+#endif
+
diff -urN linux/arch/arm/configs/omap_h2_1610_defconfig 
linux/arch/arm/configs/omap_h2_1610_defconfig
--- linux/arch/arm/configs/omap_h2_1610_defconfig       1970/01/01 00:00:00
+++ linux/arch/arm/configs/omap_h2_1610_defconfig       Mon Feb  7 02:54:30 
2005        1.1
@@ -0,0 +1,935 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.11-rc2
+# Tue Feb  1 14:01:46 2005
+#
+CONFIG_ARM=y
+CONFIG_MMU=y
+CONFIG_UID16=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_IOMAP=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+CONFIG_KOBJECT_UEVENT=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+# CONFIG_TINY_SHMEM is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_KMOD is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_CAMELOT is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_H720X is not set
+
+#
+# TI OMAP Implementations
+#
+
+#
+# OMAP Core Type
+#
+# CONFIG_ARCH_OMAP730 is not set
+# CONFIG_ARCH_OMAP1510 is not set
+CONFIG_ARCH_OMAP16XX=y
+CONFIG_ARCH_OMAP_OTG=y
+
+#
+# OMAP Board Type
+#
+# CONFIG_MACH_OMAP_INNOVATOR is not set
+CONFIG_MACH_OMAP_H2=y
+# CONFIG_MACH_OMAP_H3 is not set
+# CONFIG_MACH_OMAP_H4 is not set
+# CONFIG_MACH_OMAP_OSK is not set
+# CONFIG_MACH_OMAP_GENERIC is not set
+
+#
+# OMAP Feature Selections
+#
+CONFIG_OMAP_MUX=y
+# CONFIG_OMAP_MUX_DEBUG is not set
+CONFIG_OMAP_MUX_WARNINGS=y
+CONFIG_OMAP_LL_DEBUG_UART1=y
+# CONFIG_OMAP_LL_DEBUG_UART2 is not set
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
+CONFIG_OMAP_ARM_192MHZ=y
+# CONFIG_OMAP_ARM_168MHZ is not set
+# CONFIG_OMAP_ARM_120MHZ is not set
+# CONFIG_OMAP_ARM_60MHZ is not set
+# CONFIG_OMAP_ARM_30MHZ is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM926T=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+
+#
+# General setup
+#
+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
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+# CONFIG_VFP is not set
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=y
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+CONFIG_DEBUG_DRIVER=y
+CONFIG_PM=y
+CONFIG_PREEMPT=y
+# CONFIG_APM is not set
+# CONFIG_ARTHUR is not set
+CONFIG_CMDLINE="mem=32M console=ttyS0,115200n8 root=0801 ro init=/bin/sh"
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=3
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS 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_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# 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_ABSENT is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_EDB7312 is not set
+
+#
+# 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
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# Plug and Play support
+#
+
+#
+# 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
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=8192
+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
+CONFIG_ATA_OVER_ETH=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_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
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_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_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_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_SMC91X=y
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=y
+# CONFIG_PPP_MULTILINK is not set
+# 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_PPPOE is not set
+CONFIG_SLIP=y
+CONFIG_SLIP_COMPRESSED=y
+# CONFIG_SLIP_SMART is not set
+# CONFIG_SLIP_MODE_SLIP6 is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=y
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+# CONFIG_BLK_DEV_SD is not set
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transport Attributes
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_EVBUG=y
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_RAW is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=y
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ISA is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+# 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
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# 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
+# CONFIG_SENSORS_W83627HF is not set
+
+#
+# Other I2C Chip support
+#
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+CONFIG_ISP1301_OMAP=y
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_MINIX_FS is not set
+CONFIG_ROMFS_FS=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+# CONFIG_VFAT_FS is not set
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_SYSFS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+# CONFIG_TMPFS 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_JFFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=2
+# 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
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=y
+# 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
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+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_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
+# 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
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+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 is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=y
+# CONFIG_SOUND_BT878 is not set
+# CONFIG_SOUND_FUSION is not set
+# CONFIG_SOUND_CS4281 is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_TRIDENT is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+# CONFIG_SOUND_OSS is not set
+# CONFIG_SOUND_TVMIXER is not set
+# CONFIG_SOUND_AD1980 is not set
+
+#
+# Misc devices
+#
+
+#
+# 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
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_SA1100 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_OMAP=y
+CONFIG_USB_OMAP=y
+# CONFIG_USB_GADGET_DUALSPEED is not set
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=y
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_FILE_STORAGE is not set
+# CONFIG_USB_G_SERIAL is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# Kernel hacking
+#
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_KOBJECT 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
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# 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=y
+# 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=y
+# 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_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
+#
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
diff -urN linux/arch/arm/kernel/asm-offsets.c 
linux/arch/arm/kernel/asm-offsets.c
--- linux/arch/arm/kernel/asm-offsets.c 2005/01/13 14:05:18     1.11
+++ linux/arch/arm/kernel/asm-offsets.c 2005/02/07 02:54:30     1.12
@@ -59,6 +59,7 @@
   DEFINE(TI_CPU_DOMAIN,                offsetof(struct thread_info, 
cpu_domain));
   DEFINE(TI_CPU_SAVE,          offsetof(struct thread_info, cpu_context));
   DEFINE(TI_USED_CP,           offsetof(struct thread_info, used_cp));
+  DEFINE(TI_TP_VALUE,          offsetof(struct thread_info, tp_value));
   DEFINE(TI_FPSTATE,           offsetof(struct thread_info, fpstate));
   DEFINE(TI_VFPSTATE,          offsetof(struct thread_info, vfpstate));
   DEFINE(TI_IWMMXT_STATE,      (offsetof(struct thread_info, fpstate)+4)&~7);
diff -urN linux/arch/arm/kernel/calls.S linux/arch/arm/kernel/calls.S
--- linux/arch/arm/kernel/calls.S       2004/10/12 14:36:31     1.25
+++ linux/arch/arm/kernel/calls.S       2005/02/07 02:54:30     1.26
@@ -270,7 +270,7 @@
                .long   sys_remap_file_pages
                .long   sys_ni_syscall  /* sys_set_thread_area */
 /* 255 */      .long   sys_ni_syscall  /* sys_get_thread_area */
-               .long   sys_ni_syscall  /* sys_set_tid_address */
+               .long   sys_set_tid_address
                .long   sys_timer_create
                .long   sys_timer_settime
                .long   sys_timer_gettime
diff -urN linux/arch/arm/kernel/debug.S linux/arch/arm/kernel/debug.S
--- linux/arch/arm/kernel/debug.S       2004/11/15 11:49:14     1.15
+++ linux/arch/arm/kernel/debug.S       2005/02/07 02:54:30     1.16
@@ -20,31 +20,8 @@
  * printk isn't working).  For DEBUGGING ONLY!!!  Do not leave
  * references to these in a production kernel!
  */
-#if defined(CONFIG_ARCH_RPC)
-               .macro  addruart,rx
-               mov     \rx, #0xe0000000
-               orr     \rx, \rx, #0x00010000
-               orr     \rx, \rx, #0x00000fe0
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx]
-               .endm
 
-               .macro  busyuart,rd,rx
-1001:          ldrb    \rd, [\rx, #0x14]
-               and     \rd, \rd, #0x60
-               teq     \rd, #0x60
-               bne     1001b
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldrb    \rd, [\rx, #0x18]
-               tst     \rd, #0x10
-               beq     1001b
-               .endm
-
-#elif defined(CONFIG_DEBUG_ICEDCC)
+#if defined(CONFIG_DEBUG_ICEDCC)
                @@ debug using ARM EmbeddedICE DCC channel
                .macro  addruart, rx
                .endm
@@ -71,106 +48,12 @@
                bne     1001b
 1002:
                .endm
-
-#elif defined(CONFIG_ARCH_EBSA110)
-               .macro  addruart,rx
-               mov     \rx, #0xf0000000
-               orr     \rx, \rx, #0x00000be0
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx]
-               .endm
-
-               .macro  busyuart,rd,rx
-1002:          ldrb    \rd, [\rx, #0x14]
-               and     \rd, \rd, #0x60
-               teq     \rd, #0x60
-               bne     1002b
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldrb    \rd, [\rx, #0x18]
-               tst     \rd, #0x10
-               beq     1001b
-               .endm
-       
-#elif defined(CONFIG_ARCH_SHARK)
-               .macro  addruart,rx
-               mov     \rx, #0xe0000000
-               orr     \rx, \rx, #0x000003f8
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx]
-               .endm
-
-               .macro  busyuart,rd,rx
-               mov     \rd, #0
-1001:          add     \rd, \rd, #1
-               teq     \rd, #0x10000
-               bne     1001b
-               .endm
-
-               .macro  waituart,rd,rx
-               .endm
-
-#elif defined(CONFIG_FOOTBRIDGE)
-
-#include <asm/hardware/dec21285.h>
-
-#ifndef CONFIG_DEBUG_DC21285_PORT
-       /* For NetWinder debugging */
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               moveq   \rx, #0x7c000000        @ physical
-               movne   \rx, #0xff000000        @ virtual
-               orr     \rx, \rx, #0x000003f8
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx]
-               .endm
-
-               .macro  busyuart,rd,rx
-1002:          ldrb    \rd, [\rx, #0x5]
-               and     \rd, \rd, #0x60
-               teq     \rd, #0x60
-               bne     1002b
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldrb    \rd, [\rx, #0x6]
-               tst     \rd, #0x10
-               beq     1001b
-               .endm
 #else
-       /* For EBSA285 debugging */
-               .equ    dc21285_high, ARMCSR_BASE & 0xff000000
-               .equ    dc21285_low,  ARMCSR_BASE & 0x00ffffff
-
-               .macro  addruart,rx
-               mov     \rx, #dc21285_high
-               .if     dc21285_low
-               orr     \rx, \rx, #dc21285_low
-               .endif
-               .endm
-
-               .macro  senduart,rd,rx
-               str     \rd, [\rx, #0x160]      @ UARTDR
-               .endm
-
-               .macro  busyuart,rd,rx
-1001:          ldr     \rd, [\rx, #0x178]      @ UARTFLG
-               tst     \rd, #1 << 3
-               bne     1001b
-               .endm
-
-               .macro  waituart,rd,rx
-               .endm
+#include <asm/arch/debug-macro.S>
 #endif
-#elif defined(CONFIG_ARCH_FTVPCI)
+
+#if 0
+// #elif defined(CONFIG_ARCH_FTVPCI)
                .macro  addruart,rx
                mrc     p15, 0, \rx, c1, c0
                tst     \rx, #1                 @ MMU enabled?
@@ -190,547 +73,6 @@
 
                .macro  waituart,rd,rx
                .endm
-
-#elif defined(CONFIG_ARCH_SA1100)
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               moveq   \rx, #0x80000000        @ physical base address
-               movne   \rx, #0xf8000000        @ virtual address
-
-               @ We probe for the active serial port here, coherently with
-               @ the comment in include/asm-arm/arch-sa1100/uncompress.h.
-               @ We assume r1 can be clobbered.
-
-               @ see if Ser3 is active
-               add     \rx, \rx, #0x00050000
-               ldr     r1, [\rx, #UTCR3]
-               tst     r1, #UTCR3_TXE
-
-               @ if Ser3 is inactive, then try Ser1
-               addeq   \rx, \rx, #(0x00010000 - 0x00050000)
-               ldreq   r1, [\rx, #UTCR3]
-               tsteq   r1, #UTCR3_TXE
-
-               @ if Ser1 is inactive, then try Ser2
-               addeq   \rx, \rx, #(0x00030000 - 0x00010000)
-               ldreq   r1, [\rx, #UTCR3]
-               tsteq   r1, #UTCR3_TXE
-
-               @ if all ports are inactive, then there is nothing we can do
-               moveq   pc, lr
-               .endm
-
-               .macro  senduart,rd,rx
-               str     \rd, [\rx, #UTDR]
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldr     \rd, [\rx, #UTSR1]
-               tst     \rd, #UTSR1_TNF
-               beq     1001b
-               .endm
-
-               .macro  busyuart,rd,rx
-1001:          ldr     \rd, [\rx, #UTSR1]
-               tst     \rd, #UTSR1_TBY
-               bne     1001b
-               .endm
-
-#elif defined(CONFIG_ARCH_PXA)
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               moveq   \rx, #0x40000000                @ physical
-               movne   \rx, #io_p2v(0x40000000)        @ virtual
-               orr     \rx, \rx, #0x00100000
-               .endm
-
-               .macro  senduart,rd,rx
-               str     \rd, [\rx, #0]
-               .endm
-
-               .macro  busyuart,rd,rx
-1002:          ldr     \rd, [\rx, #0x14]
-               tst     \rd, #(1 << 6)
-               beq     1002b
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldr     \rd, [\rx, #0x14]
-               tst     \rd, #(1 << 5)
-               beq     1001b
-               .endm
-#elif defined(CONFIG_ARCH_CLPS7500)
-               .macro  addruart,rx
-               mov     \rx, #0xe0000000
-               orr     \rx, \rx, #0x00010000
-               orr     \rx, \rx, #0x00000be0
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx]
-               .endm
-
-               .macro  busyuart,rd,rx
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldrb    \rd, [\rx, #0x14]
-               tst     \rd, #0x20
-               beq     1001b
-               .endm
-
-#elif defined(CONFIG_ARCH_L7200)
-
-               .equ    io_virt, IO_BASE
-               .equ    io_phys, IO_START
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               moveq   \rx, #io_phys           @ physical base address
-               movne   \rx, #io_virt           @ virtual address
-               add     \rx, \rx, #0x00044000   @ UART1
-@              add     \rx, \rx, #0x00045000   @ UART2
-               .endm
-
-               .macro  senduart,rd,rx
-               str     \rd, [\rx, #0x0]        @ UARTDR
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldr     \rd, [\rx, #0x18]       @ UARTFLG
-               tst     \rd, #1 << 5            @ UARTFLGUTXFF - 1 when full
-               bne     1001b
-               .endm
-
-               .macro  busyuart,rd,rx
-1001:          ldr     \rd, [\rx, #0x18]       @ UARTFLG
-               tst     \rd, #1 << 3            @ UARTFLGUBUSY - 1 when busy
-               bne     1001b
-               .endm
-
-#elif defined(CONFIG_ARCH_INTEGRATOR)
-
-#include <asm/hardware/amba_serial.h>
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               moveq   \rx, #0x16000000        @ physical base address
-               movne   \rx, #0xf0000000        @ virtual base
-               addne   \rx, \rx, #0x16000000 >> 4
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx, #UART01x_DR]
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldr     \rd, [\rx, #0x18]       @ UARTFLG
-               tst     \rd, #1 << 5            @ UARTFLGUTXFF - 1 when full
-               bne     1001b
-               .endm
-
-               .macro  busyuart,rd,rx
-1001:          ldr     \rd, [\rx, #0x18]       @ UARTFLG
-               tst     \rd, #1 << 3            @ UARTFLGUBUSY - 1 when busy
-               bne     1001b
-               .endm
-
-#elif defined(CONFIG_ARCH_CLPS711X)
-
-#include <asm/hardware/clps7111.h>
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               moveq   \rx, #CLPS7111_PHYS_BASE
-               movne   \rx, #CLPS7111_VIRT_BASE
-#ifndef CONFIG_DEBUG_CLPS711X_UART2
-               add     \rx, \rx, #0x0000       @ UART1
-#else
-               add     \rx, \rx, #0x1000       @ UART2
-#endif
-               .endm
-
-               .macro  senduart,rd,rx
-               str     \rd, [\rx, #0x0480]     @ UARTDR
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldr     \rd, [\rx, #0x0140]     @ SYSFLGx
-               tst     \rd, #1 << 11           @ UBUSYx
-               bne     1001b
-               .endm
-
-               .macro  busyuart,rd,rx
-               tst     \rx, #0x1000            @ UART2 does not have CTS here
-               bne     1002f
-1001:          ldr     \rd, [\rx, #0x0140]     @ SYSFLGx
-               tst     \rd, #1 << 8            @ CTS
-               bne     1001b
-1002:
-               .endm
-
-#elif defined(CONFIG_ARCH_CAMELOT)
-
-#include <asm/arch/excalibur.h>
-#define UART00_TYPE
-#include <asm/arch/uart00.h>
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               ldr     \rx, =EXC_UART00_BASE   @ physical base address
-               orrne   \rx, \rx, #0xff000000   @ virtual base
-               orrne   \rx, \rx, #0x00f00000   
-               .endm
-
-               .macro  senduart,rd,rx
-               str     \rd, [\rx, #UART_TD(0)]
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldr     \rd, [\rx, #UART_TSR(0)]
-               and     \rd, \rd,  #UART_TSR_TX_LEVEL_MSK
-               cmp     \rd, #15
-               beq     1001b
-               .endm
-
-               .macro  busyuart,rd,rx
-1001:          ldr     \rd, [\rx, #UART_TSR(0)]
-               ands    \rd, \rd,  #UART_TSR_TX_LEVEL_MSK
-               bne     1001b
-               .endm
-
-#elif defined(CONFIG_ARCH_IOP3XX)
-
-               .macro  addruart,rx
-               mov     \rx, #0xfe000000        @ physical
-#if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244)
-               orr     \rx, \rx, #0x00800000   @ location of the UART
-#elif defined(CONFIG_ARCH_IOP331)
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               moveq   \rx, #0x000fe000        @ Physical Base
-               movne   \rx, #0
-               orr     \rx, \rx, #0xfe000000
-               orr     \rx, \rx, #0x00f00000   @ Virtual Base
-               orr     \rx, \rx, #0x00001700   @ location of the UART
-#else
-#error Unknown IOP3XX implementation
-#endif
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx]
-               .endm
-
-               .macro  busyuart,rd,rx
-1002:          ldrb    \rd, [\rx, #0x5]
-               and     \rd, \rd, #0x60
-               teq     \rd, #0x60
-               bne     1002b
-               .endm
-
-               .macro  waituart,rd,rx
-#if !defined(CONFIG_ARCH_IQ80321) || !defined(CONFIG_ARCH_IQ31244) || 
!defined(CONFIG_ARCH_IQ80331)
-1001:          ldrb    \rd, [\rx, #0x6]
-               tst     \rd, #0x10
-               beq     1001b
-#endif
-               .endm
-
-#elif defined(CONFIG_ARCH_IXP4XX)
-
-                .macro  addruart,rx
-                mrc     p15, 0, \rx, c1, c0
-                tst     \rx, #1                 @ MMU enabled?
-                moveq   \rx, #0xc8000000
-                movne   \rx, #0xff000000
-                add     \rx,\rx,#3              @ Uart regs are at off set of 
3 if
-                                               @ byte writes used - Big Endian.
-                .endm
-
-               .macro  senduart,rd,rx
-                strb    \rd, [\rx]
-                .endm
-
-                .macro  waituart,rd,rx
-1002:           ldrb    \rd, [\rx, #0x14]
-                and     \rd, \rd, #0x60                @ check THRE and TEMT 
bits
-                teq     \rd, #0x60
-                bne     1002b
-                .endm
-
-                .macro  busyuart,rd,rx
-                .endm
-
-#elif defined(CONFIG_ARCH_IXP2000)
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               moveq   \rx, #0xc0000000        @ Physical base
-               movne   \rx, #0xfe000000        @ virtual base
-               orrne   \rx, \rx, #0x00f00000
-               orr     \rx, \rx, #0x00030000
-#ifdef __ARMEB__
-               orr     \rx, \rx, #0x00000003
-#endif
-               .endm 
-               
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx]
-               .endm
-
-               .macro  busyuart,rd,rx
-1002:          ldrb    \rd, [\rx, #0x14]
-               tst     \rd, #0x20       
-               beq     1002b
-               .endm
-
-               .macro  waituart,rd,rx
-               nop
-               nop
-               nop
-               .endm
-
-#elif defined(CONFIG_ARCH_OMAP)
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               moveq   \rx, #0xff000000        @ physical base address
-               movne   \rx, #0xfe000000        @ virtual base
-               orr     \rx, \rx, #0x00fb0000
-#ifdef CONFIG_OMAP_LL_DEBUG_UART3
-               orr     \rx, \rx, #0x00009000   @ UART 3
-#endif
-#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3)
-               orr     \rx, \rx, #0x00000800   @ UART 2 & 3
-#endif
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx]
-               .endm
-
-               .macro  busyuart,rd,rx
-1001:          ldrb    \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends
-               and     \rd, \rd, #0x60
-               teq     \rd, #0x60
-               beq     1002f
-               ldrb    \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only
-               and     \rd, \rd, #0x60
-               teq     \rd, #0x60
-               bne     1001b
-1002:
-               .endm
-
-               .macro  waituart,rd,rx
-               .endm
-
-#elif defined(CONFIG_ARCH_S3C2410)
-#include <asm/arch/map.h>
-#include <asm/arch/regs-serial.h>
-#include <asm/arch/regs-gpio.h>
-#define S3C2410_UART1_OFF (0x4000)
-#define SHIFT_2440TXF (14-9)
-
-               .macro addruart, rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1
-               ldreq   \rx, = S3C2410_PA_UART
-               ldrne   \rx, = S3C2410_VA_UART
-#if CONFIG_DEBUG_S3C2410_UART != 0
-               add     \rx, \rx, #(S3C2410_UART1_OFF * 
CONFIG_DEBUG_S3C2410_UART)
-#endif
-               .endm
-
-               .macro  senduart,rd,rx
-               str     \rd, [\rx, # S3C2410_UTXH ]
-               .endm
-
-               .macro  busyuart, rd, rx
-               ldr     \rd, [ \rx, # S3C2410_UFCON ]
-               tst     \rd, #S3C2410_UFCON_FIFOMODE    @ fifo enabled?
-               beq     1001f                           @
-               @ FIFO enabled...
-1003:
-               mrc     p15, 0, \rd, c1, c0
-               tst     \rd, #1
-               addeq   \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART)
-               addne   \rd, \rx, #(S3C2410_VA_GPIO - S3C2410_VA_UART)
-               bic     \rd, \rd, #0xff000
-               ldr     \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ]
-               and     \rd, \rd, #0x00ff0000
-               teq     \rd, #0x00440000                @ is it 2440?
-
-               ldr     \rd, [ \rx, # S3C2410_UFSTAT ]
-               moveq   \rd, \rd, lsr #SHIFT_2440TXF
-               tst     \rd, #S3C2410_UFSTAT_TXFULL
-               bne     1003b
-               b       1002f
-
-1001:
-               @ busy waiting for non fifo
-               ldr     \rd, [ \rx, # S3C2410_UTRSTAT ]
-               tst     \rd, #S3C2410_UTRSTAT_TXFE
-               beq     1001b
-
-1002:          @ exit busyuart
-               .endm
-
-               .macro  waituart,rd,rx
-
-               ldr     \rd, [ \rx, # S3C2410_UFCON ]
-               tst     \rd, #S3C2410_UFCON_FIFOMODE    @ fifo enabled?
-               beq     1001f                           @
-               @ FIFO enabled...
-1003:
-               mrc     p15, 0, \rd, c1, c0
-               tst     \rd, #1
-               addeq   \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART)
-               addne   \rd, \rx, #(S3C2410_VA_GPIO - S3C2410_VA_UART)
-               bic     \rd, \rd, #0xff000
-               ldr     \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ]
-               and     \rd, \rd, #0x00ff0000
-               teq     \rd, #0x00440000                @ is it 2440?
-
-               ldr     \rd, [ \rx, # S3C2410_UFSTAT ]
-               andne   \rd, \rd, #S3C2410_UFSTAT_TXMASK
-               andeq   \rd, \rd, #S3C2440_UFSTAT_TXMASK
-               teq     \rd, #0
-               bne     1003b
-               b       1002f
-
-1001:
-               @ idle waiting for non fifo
-               ldr     \rd, [ \rx, # S3C2410_UTRSTAT ]
-               tst     \rd, #S3C2410_UTRSTAT_TXFE
-               beq     1001b
-
-1002:          @ exit busyuart
-               .endm
-
-#elif defined(CONFIG_ARCH_LH7A40X)
-       @ It is not known if this will be appropriate for every 40x
-       @ board.
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               mov     \rx, #0x00000700        @ offset from base
-               orreq   \rx, \rx, #0x80000000   @ physical base
-               orrne   \rx, \rx, #0xf8000000   @ virtual base
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx]              @ DATA
-               .endm
-
-               .macro  busyuart,rd,rx          @ spin while busy
-1001:          ldr     \rd, [\rx, #0x10]       @ STATUS
-               tst     \rd, #1 << 3            @ BUSY (TX FIFO not empty)
-               bne     1001b                   @ yes, spin
-               .endm
-
-               .macro  waituart,rd,rx          @ wait for Tx FIFO room
-1001:          ldrb    \rd, [\rx, #0x10]       @ STATUS
-               tst     \rd, #1 << 5            @ TXFF (TX FIFO full)
-               bne     1001b                   @ yes, spin
-               .endm
-
-
-#elif defined(CONFIG_ARCH_VERSATILE)
-
-#include <asm/hardware/amba_serial.h>
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               moveq   \rx,      #0x10000000
-               movne   \rx,      #0xf1000000   @ virtual base
-               orr     \rx, \rx, #0x001F0000
-               orr     \rx, \rx, #0x00001000
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx, #UART01x_DR]
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldr     \rd, [\rx, #0x18]       @ UARTFLG
-               tst     \rd, #1 << 5            @ UARTFLGUTXFF - 1 when full
-               bne     1001b
-               .endm
-
-               .macro  busyuart,rd,rx
-1001:          ldr     \rd, [\rx, #0x18]       @ UARTFLG
-               tst     \rd, #1 << 3            @ UARTFLGUBUSY - 1 when busy
-               bne     1001b
-               .endm
-
-#elif defined(CONFIG_ARCH_IMX)
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               moveq   \rx, #0x00000000        @ physical
-               movne   \rx, #0xe0000000        @ virtual
-               orr     \rx, \rx, #0x00200000
-               orr     \rx, \rx, #0x00006000   @ UART1 offset
-               .endm
-
-               .macro  senduart,rd,rx
-               str     \rd, [\rx, #0x40]       @ TXDATA
-               .endm
-
-               .macro  waituart,rd,rx
-               .endm
-
-               .macro  busyuart,rd,rx
-1002:          ldr     \rd, [\rx, #0x98]       @ SR2
-               tst     \rd, #1 << 3            @ TXDC
-               beq     1002b                   @ wait until transmit done
-               .endm
-
-#elif defined(CONFIG_ARCH_H720X)
-
-               .equ    io_virt, IO_BASE
-               .equ    io_phys, IO_START
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                @ MMU enabled?
-               moveq   \rx, #io_phys          @ physical base address
-               movne   \rx, #io_virt          @ virtual address
-               add     \rx, \rx, #0x00020000   @ UART1
-               .endm
-
-               .macro  senduart,rd,rx
-               str     \rd, [\rx, #0x0]        @ UARTDR
-
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldr     \rd, [\rx, #0x18]       @ UARTFLG
-               tst     \rd, #1 << 5           @ UARTFLGUTXFF - 1 when full
-               bne     1001b
-               .endm
-
-               .macro  busyuart,rd,rx
-1001:          ldr     \rd, [\rx, #0x18]       @ UARTFLG
-               tst     \rd, #1 << 3           @ UARTFLGUBUSY - 1 when busy
-               bne     1001b
-               .endm
-#else
-#error Unknown architecture
 #endif
 
 /*
diff -urN linux/arch/arm/kernel/entry-armv.S linux/arch/arm/kernel/entry-armv.S
--- linux/arch/arm/kernel/entry-armv.S  2005/01/13 14:05:18     1.62
+++ linux/arch/arm/kernel/entry-armv.S  2005/02/07 02:54:30     1.63
@@ -26,270 +26,357 @@
 /*
  * Invalid mode handlers
  */
-__pabt_invalid:        sub     sp, sp, #S_FRAME_SIZE           @ Allocate 
frame size in one go
-               stmia   sp, {r0 - lr}                   @ Save XXX r0 - lr
-               ldr     r4, .LCabt
-               mov     r1, #BAD_PREFETCH
-               b       1f
-
-__dabt_invalid:        sub     sp, sp, #S_FRAME_SIZE
-               stmia   sp, {r0 - lr}                   @ Save SVC r0 - lr [lr 
*should* be intact]
-               ldr     r4, .LCabt
-               mov     r1, #BAD_DATA
-               b       1f
-
-__irq_invalid: sub     sp, sp, #S_FRAME_SIZE           @ Allocate space on 
stack for frame
-               stmfd   sp, {r0 - lr}                   @ Save r0 - lr
-               ldr     r4, .LCirq
-               mov     r1, #BAD_IRQ
-               b       1f
-
-__und_invalid: sub     sp, sp, #S_FRAME_SIZE
-               stmia   sp, {r0 - lr}
-               ldr     r4, .LCund
-               mov     r1, #BAD_UNDEFINSTR             @ int reason
-
-1:             zero_fp
-               ldmia   r4, {r5 - r7}                   @ Get XXX pc, cpsr, 
old_r0
-               add     r4, sp, #S_PC
-               stmia   r4, {r5 - r7}                   @ Save XXX pc, cpsr, 
old_r0
-               mov     r0, sp
-               and     r2, r6, #31                     @ int mode
-               b       bad_mode
+       .macro  inv_entry, sym, reason
+       sub     sp, sp, #S_FRAME_SIZE           @ Allocate frame size in one go
+       stmia   sp, {r0 - lr}                   @ Save XXX r0 - lr
+       ldr     r4, .LC\sym
+       mov     r1, #\reason
+       .endm
+
+__pabt_invalid:
+       inv_entry abt, BAD_PREFETCH
+       b       1f
+
+__dabt_invalid:
+       inv_entry abt, BAD_DATA
+       b       1f
+
+__irq_invalid:
+       inv_entry irq, BAD_IRQ
+       b       1f
+
+__und_invalid:
+       inv_entry und, BAD_UNDEFINSTR
+
+1:     zero_fp
+       ldmia   r4, {r5 - r7}                   @ Get XXX pc, cpsr, old_r0
+       add     r4, sp, #S_PC
+       stmia   r4, {r5 - r7}                   @ Save XXX pc, cpsr, old_r0
+       mov     r0, sp
+       and     r2, r6, #31                     @ int mode
+       b       bad_mode
 
 /*
  * SVC mode handlers
  */
-               .align  5
-__dabt_svc:    sub     sp, sp, #S_FRAME_SIZE
-               stmia   sp, {r0 - r12}                  @ save r0 - r12
-               ldr     r2, .LCabt
-               add     r0, sp, #S_FRAME_SIZE
-               ldmia   r2, {r2 - r4}                   @ get pc, cpsr
-               add     r5, sp, #S_SP
-               mov     r1, lr
-               stmia   r5, {r0 - r4}                   @ save sp_SVC, lr_SVC, 
pc, cpsr, old_ro
-               mrs     r9, cpsr                        @ Enable interrupts if 
they were
-               tst     r3, #PSR_I_BIT
-               biceq   r9, r9, #PSR_I_BIT              @ previously
-/*
- * This routine must not corrupt r9
- */
+       .macro  svc_entry, sym
+       sub     sp, sp, #S_FRAME_SIZE
+       stmia   sp, {r0 - r12}                  @ save r0 - r12
+       ldr     r2, .LC\sym
+       add     r0, sp, #S_FRAME_SIZE
+       ldmia   r2, {r2 - r4}                   @ get pc, cpsr
+       add     r5, sp, #S_SP
+       mov     r1, lr
+
+       @
+       @ We are now ready to fill in the remaining blanks on the stack:
+       @
+       @  r0 - sp_svc
+       @  r1 - lr_svc
+       @  r2 - lr_<exception>, already fixed up for correct return/restart
+       @  r3 - spsr_<exception>
+       @  r4 - orig_r0 (see pt_regs definition in ptrace.h)
+       @
+       stmia   r5, {r0 - r4}
+       .endm
+
+       .align  5
+__dabt_svc:
+       svc_entry abt
+
+       @
+       @ get ready to re-enable interrupts if appropriate
+       @
+       mrs     r9, cpsr
+       tst     r3, #PSR_I_BIT
+       biceq   r9, r9, #PSR_I_BIT
+
+       @
+       @ Call the processor-specific abort handler:
+       @
+       @  r2 - aborted context pc
+       @  r3 - aborted context cpsr
+       @
+       @ The abort handler must return the aborted address in r0, and
+       @ the fault status register in r1.  r9 must be preserved.
+       @
 #ifdef MULTI_ABORT
-               ldr     r4, .LCprocfns                  @ pass r2, r3 to
-               mov     lr, pc                          @ processor code
-               ldr     pc, [r4]                        @ call processor 
specific code
+       ldr     r4, .LCprocfns
+       mov     lr, pc
+       ldr     pc, [r4]
 #else
-               bl      CPU_ABORT_HANDLER
+       bl      CPU_ABORT_HANDLER
 #endif
-               msr     cpsr_c, r9
-               mov     r2, sp
-               bl      do_DataAbort
-               disable_irq r0
-               ldr     r0, [sp, #S_PSR]
-               msr     spsr_cxsf, r0
-               ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
-
-               .align  5
-__irq_svc:     sub     sp, sp, #S_FRAME_SIZE
-               stmia   sp, {r0 - r12}                  @ save r0 - r12
-               ldr     r7, .LCirq
-               add     r5, sp, #S_FRAME_SIZE
-               ldmia   r7, {r7 - r9}
-               add     r4, sp, #S_SP
-               mov     r6, lr
-               stmia   r4, {r5, r6, r7, r8, r9}        @ save sp_SVC, lr_SVC, 
pc, cpsr, old_ro
+
+       @
+       @ set desired IRQ state, then call main handler
+       @
+       msr     cpsr_c, r9
+       mov     r2, sp
+       bl      do_DataAbort
+
+       @
+       @ IRQs off again before pulling preserved data off the stack
+       @
+       disable_irq r0
+
+       @
+       @ restore SPSR and restart the instruction
+       @
+       ldr     r0, [sp, #S_PSR]
+       msr     spsr_cxsf, r0
+       ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+
+       .align  5
+__irq_svc:
+       svc_entry irq
 #ifdef CONFIG_PREEMPT
-               get_thread_info r8
-               ldr     r9, [r8, #TI_PREEMPT]           @ get preempt count
-               add     r7, r9, #1                      @ increment it
-               str     r7, [r8, #TI_PREEMPT]
-#endif
-1:             get_irqnr_and_base r0, r6, r5, lr
-               movne   r1, sp
-               @
-               @ routine called with r0 = irq number, r1 = struct pt_regs *
-               @
-               adrsvc  ne, lr, 1b
-               bne     asm_do_IRQ
+       get_thread_info r8
+       ldr     r9, [r8, #TI_PREEMPT]           @ get preempt count
+       add     r7, r9, #1                      @ increment it
+       str     r7, [r8, #TI_PREEMPT]
+#endif
+1:     get_irqnr_and_base r0, r6, r5, lr
+       movne   r1, sp
+       @
+       @ routine called with r0 = irq number, r1 = struct pt_regs *
+       @
+       adrne   lr, 1b
+       bne     asm_do_IRQ
 #ifdef CONFIG_PREEMPT
-               ldr     r0, [r8, #TI_FLAGS]             @ get flags
-               tst     r0, #_TIF_NEED_RESCHED
-               blne    svc_preempt
+       ldr     r0, [r8, #TI_FLAGS]             @ get flags
+       tst     r0, #_TIF_NEED_RESCHED
+       blne    svc_preempt
 preempt_return:
-               ldr     r0, [r8, #TI_PREEMPT]           @ read preempt value
-               teq     r0, r7
-               str     r9, [r8, #TI_PREEMPT]           @ restore preempt count
-               strne   r0, [r0, -r0]                   @ bug()
-#endif
-               ldr     r0, [sp, #S_PSR]                @ irqs are already 
disabled
-               msr     spsr_cxsf, r0
-               ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+       ldr     r0, [r8, #TI_PREEMPT]           @ read preempt value
+       teq     r0, r7
+       str     r9, [r8, #TI_PREEMPT]           @ restore preempt count
+       strne   r0, [r0, -r0]                   @ bug()
+#endif
+       ldr     r0, [sp, #S_PSR]                @ irqs are already disabled
+       msr     spsr_cxsf, r0
+       ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
 
-               .ltorg
+       .ltorg
 
 #ifdef CONFIG_PREEMPT
-svc_preempt:   teq     r9, #0                          @ was preempt count = 0
-               ldreq   r6, .LCirq_stat
-               movne   pc, lr                          @ no
-               ldr     r0, [r6, #4]                    @ local_irq_count
-               ldr     r1, [r6, #8]                    @ local_bh_count
-               adds    r0, r0, r1
-               movne   pc, lr
-               mov     r7, #PREEMPT_ACTIVE
-               str     r7, [r8, #TI_PREEMPT]           @ set PREEMPT_ACTIVE
-1:             enable_irq r2                           @ enable IRQs
-               bl      schedule
-               disable_irq r0                          @ disable IRQs
-               ldr     r0, [r8, #TI_FLAGS]             @ get new tasks TI_FLAGS
-               tst     r0, #_TIF_NEED_RESCHED
-               beq     preempt_return                  @ go again
-               b       1b
-#endif
-
-               .align  5
-__und_svc:     sub     sp, sp, #S_FRAME_SIZE
-               stmia   sp, {r0 - r12}                  @ save r0 - r12
-               ldr     r3, .LCund
-               mov     r4, lr
-               ldmia   r3, {r5 - r7}
-               add     r3, sp, #S_FRAME_SIZE
-               add     r2, sp, #S_SP
-               stmia   r2, {r3 - r7}                   @ save sp_SVC, lr_SVC, 
pc, cpsr, old_ro
-
-               ldr     r0, [r5, #-4]                   @ r0 = instruction
-               adrsvc  al, r9, 1f                      @ r9 = normal FP return
-               bl      call_fpe                        @ lr = undefined instr 
return
-
-               mov     r0, sp                          @ struct pt_regs *regs
-               bl      do_undefinstr
-
-1:             disable_irq r0
-               ldr     lr, [sp, #S_PSR]                @ Get SVC cpsr
-               msr     spsr_cxsf, lr
-               ldmia   sp, {r0 - pc}^                  @ Restore SVC registers
-
-               .align  5
-__pabt_svc:    sub     sp, sp, #S_FRAME_SIZE
-               stmia   sp, {r0 - r12}                  @ save r0 - r12
-               ldr     r2, .LCabt
-               add     r0, sp, #S_FRAME_SIZE
-               ldmia   r2, {r2 - r4}                   @ get pc, cpsr
-               add     r5, sp, #S_SP
-               mov     r1, lr
-               stmia   r5, {r0 - r4}                   @ save sp_SVC, lr_SVC, 
pc, cpsr, old_ro
-               mrs     r9, cpsr                        @ Enable interrupts if 
they were
-               tst     r3, #PSR_I_BIT
-               biceq   r9, r9, #PSR_I_BIT              @ previously
-               msr     cpsr_c, r9
-               mov     r0, r2                          @ address (pc)
-               mov     r1, sp                          @ regs
-               bl      do_PrefetchAbort                @ call abort handler
-               disable_irq r0
-               ldr     r0, [sp, #S_PSR]
-               msr     spsr_cxsf, r0
-               ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
-
-               .align  5
-.LCirq:                .word   __temp_irq
-.LCund:                .word   __temp_und
-.LCabt:                .word   __temp_abt
+svc_preempt:
+       teq     r9, #0                          @ was preempt count = 0
+       ldreq   r6, .LCirq_stat
+       movne   pc, lr                          @ no
+       ldr     r0, [r6, #4]                    @ local_irq_count
+       ldr     r1, [r6, #8]                    @ local_bh_count
+       adds    r0, r0, r1
+       movne   pc, lr
+       mov     r7, #0                          @ preempt_schedule_irq
+       str     r7, [r8, #TI_PREEMPT]           @ expects preempt_count == 0
+1:     bl      preempt_schedule_irq            @ irq en/disable is done inside
+       ldr     r0, [r8, #TI_FLAGS]             @ get new tasks TI_FLAGS
+       tst     r0, #_TIF_NEED_RESCHED
+       beq     preempt_return                  @ go again
+       b       1b
+#endif
+
+       .align  5
+__und_svc:
+       svc_entry und
+
+       @
+       @ call emulation code, which returns using r9 if it has emulated
+       @ the instruction, or the more conventional lr if we are to treat
+       @ this as a real undefined instruction
+       @
+       @  r0 - instruction
+       @
+       ldr     r0, [r2, #-4]
+       adr     r9, 1f
+       bl      call_fpe
+
+       mov     r0, sp                          @ struct pt_regs *regs
+       bl      do_undefinstr
+
+       @
+       @ IRQs off again before pulling preserved data off the stack
+       @
+1:     disable_irq r0
+
+       @
+       @ restore SPSR and restart the instruction
+       @
+       ldr     lr, [sp, #S_PSR]                @ Get SVC cpsr
+       msr     spsr_cxsf, lr
+       ldmia   sp, {r0 - pc}^                  @ Restore SVC registers
+
+       .align  5
+__pabt_svc:
+       svc_entry abt
+
+       @
+       @ re-enable interrupts if appropriate
+       @
+       mrs     r9, cpsr
+       tst     r3, #PSR_I_BIT
+       biceq   r9, r9, #PSR_I_BIT
+       msr     cpsr_c, r9
+
+       @
+       @ set args, then call main handler
+       @
+       @  r0 - address of faulting instruction
+       @  r1 - pointer to registers on stack
+       @
+       mov     r0, r2                          @ address (pc)
+       mov     r1, sp                          @ regs
+       bl      do_PrefetchAbort                @ call abort handler
+
+       @
+       @ IRQs off again before pulling preserved data off the stack
+       @
+       disable_irq r0
+
+       @
+       @ restore SPSR and restart the instruction
+       @
+       ldr     r0, [sp, #S_PSR]
+       msr     spsr_cxsf, r0
+       ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+
+       .align  5
+.LCirq:
+       .word   __temp_irq
+.LCund:
+       .word   __temp_und
+.LCabt:
+       .word   __temp_abt
 #ifdef MULTI_ABORT
-.LCprocfns:    .word   processor
+.LCprocfns:
+       .word   processor
 #endif
-.LCfp:         .word   fp_enter
+.LCfp:
+       .word   fp_enter
 #ifdef CONFIG_PREEMPT
-.LCirq_stat:   .word   irq_stat
+.LCirq_stat:
+       .word   irq_stat
 #endif
 
 /*
  * User mode handlers
  */
-               .align  5
-__dabt_usr:    sub     sp, sp, #S_FRAME_SIZE           @ Allocate frame size 
in one go
-               stmia   sp, {r0 - r12}                  @ save r0 - r12
-               ldr     r7, .LCabt
-               add     r5, sp, #S_PC
-               ldmia   r7, {r2 - r4}                   @ Get USR pc, cpsr
-               stmia   r5, {r2 - r4}                   @ Save USR pc, cpsr, 
old_r0
-               stmdb   r5, {sp, lr}^
-               alignment_trap r7, r7, __temp_abt
-               zero_fp
+       .macro  usr_entry, sym
+       sub     sp, sp, #S_FRAME_SIZE           @ Allocate frame size in one go
+       stmia   sp, {r0 - r12}                  @ save r0 - r12
+       ldr     r7, .LC\sym
+       add     r5, sp, #S_PC
+       ldmia   r7, {r2 - r4}                   @ Get USR pc, cpsr
+
+       @
+       @ We are now ready to fill in the remaining blanks on the stack:
+       @
+       @  r2 - lr_<exception>, already fixed up for correct return/restart
+       @  r3 - spsr_<exception>
+       @  r4 - orig_r0 (see pt_regs definition in ptrace.h)
+       @
+       @ Also, separately save sp_usr and lr_usr
+       @
+       stmia   r5, {r2 - r4}
+       stmdb   r5, {sp, lr}^
+       .endm
+
+       .align  5
+__dabt_usr:
+       usr_entry abt
+       alignment_trap r7, r0, __temp_abt
+       zero_fp
+
+       @
+       @ Call the processor-specific abort handler:
+       @
+       @  r2 - aborted context pc
+       @  r3 - aborted context cpsr
+       @
+       @ The abort handler must return the aborted address in r0, and
+       @ the fault status register in r1.
+       @
 #ifdef MULTI_ABORT
-               ldr     r4, .LCprocfns                  @ pass r2, r3 to
-               mov     lr, pc                          @ processor code
-               ldr     pc, [r4]                        @ call processor 
specific code
+       ldr     r4, .LCprocfns
+       mov     lr, pc
+       ldr     pc, [r4]
 #else
-               bl      CPU_ABORT_HANDLER
+       bl      CPU_ABORT_HANDLER
 #endif
-               enable_irq r2                           @ Enable interrupts
-               mov     r2, sp
-               adrsvc  al, lr, ret_from_exception
-               b       do_DataAbort
-
-               .align  5
-__irq_usr:     sub     sp, sp, #S_FRAME_SIZE
-               stmia   sp, {r0 - r12}                  @ save r0 - r12
-               ldr     r4, .LCirq
-               add     r8, sp, #S_PC
-               ldmia   r4, {r5 - r7}                   @ get saved PC, SPSR
-               stmia   r8, {r5 - r7}                   @ save pc, psr, old_r0
-               stmdb   r8, {sp, lr}^
-               alignment_trap r4, r7, __temp_irq
-               zero_fp
+
+       @
+       @ IRQs on, then call the main handler
+       @
+       enable_irq r2
+       mov     r2, sp
+       adr     lr, ret_from_exception
+       b       do_DataAbort
+
+       .align  5
+__irq_usr:
+       usr_entry irq
+       alignment_trap r7, r0, __temp_irq
+       zero_fp
 #ifdef CONFIG_PREEMPT
-               get_thread_info r8
-               ldr     r9, [r8, #TI_PREEMPT]           @ get preempt count
-               add     r7, r9, #1                      @ increment it
-               str     r7, [r8, #TI_PREEMPT]
-#endif
-1:             get_irqnr_and_base r0, r6, r5, lr
-               movne   r1, sp
-               adrsvc  ne, lr, 1b
-               @
-               @ routine called with r0 = irq number, r1 = struct pt_regs *
-               @
-               bne     asm_do_IRQ
+       get_thread_info r8
+       ldr     r9, [r8, #TI_PREEMPT]           @ get preempt count
+       add     r7, r9, #1                      @ increment it
+       str     r7, [r8, #TI_PREEMPT]
+#endif
+1:     get_irqnr_and_base r0, r6, r5, lr
+       movne   r1, sp
+       adrne   lr, 1b
+       @
+       @ routine called with r0 = irq number, r1 = struct pt_regs *
+       @
+       bne     asm_do_IRQ
 #ifdef CONFIG_PREEMPT
-               ldr     r0, [r8, #TI_PREEMPT]
-               teq     r0, r7
-               str     r9, [r8, #TI_PREEMPT]
-               strne   r0, [r0, -r0]
-               mov     tsk, r8
+       ldr     r0, [r8, #TI_PREEMPT]
+       teq     r0, r7
+       str     r9, [r8, #TI_PREEMPT]
+       strne   r0, [r0, -r0]
+       mov     tsk, r8
 #else
-               get_thread_info tsk
+       get_thread_info tsk
 #endif
-               mov     why, #0
-               b       ret_to_user
+       mov     why, #0
+       b       ret_to_user
 
-               .ltorg
+       .ltorg
 
-               .align  5
-__und_usr:     sub     sp, sp, #S_FRAME_SIZE           @ Allocate frame size 
in one go
-               stmia   sp, {r0 - r12}                  @ Save r0 - r12
-               ldr     r4, .LCund
-               add     r8, sp, #S_PC
-               ldmia   r4, {r5 - r7}
-               stmia   r8, {r5 - r7}                   @ Save USR pc, cpsr, 
old_r0
-               stmdb   r8, {sp, lr}^                   @ Save user sp, lr
-               alignment_trap r4, r7, __temp_und
-               zero_fp
-               tst     r6, #PSR_T_BIT                  @ Thumb mode?
-               bne     fpundefinstr                    @ ignore FP
-               sub     r4, r5, #4
-1:             ldrt    r0, [r4]                        @ r0  = instruction
-               adrsvc  al, r9, ret_from_exception      @ r9  = normal FP return
-               adrsvc  al, lr, fpundefinstr            @ lr  = undefined instr 
return
+       .align  5
+__und_usr:
+       usr_entry und
+       alignment_trap r7, r0, __temp_und
+       zero_fp
+       tst     r3, #PSR_T_BIT                  @ Thumb mode?
+       bne     fpundefinstr                    @ ignore FP
+       sub     r4, r2, #4
+
+       @
+       @ fall through to the emulation code, which returns using r9 if
+       @ it has emulated the instruction, or the more conventional lr
+       @ if we are to treat this as a real undefined instruction
+       @
+       @  r0 - instruction
+       @
+1:     ldrt    r0, [r4]
+       adr     r9, ret_from_exception
+       adr     lr, fpundefinstr
+       @
+       @ fallthrough to call_fpe
+       @
 
 /*
  * The out of line fixup for the ldrt above.
  */
-               .section .fixup, "ax"
-2:             mov     pc, r9
-               .previous
-               .section __ex_table,"a"
-               .long   1b, 2b
-               .previous
+       .section .fixup, "ax"
+2:     mov     pc, r9
+       .previous
+       .section __ex_table,"a"
+       .long   1b, 2b
+       .previous
 
 /*
  * r0 = instruction.
@@ -308,53 +395,54 @@
  *  r10 - this threads thread_info structure.
  */
 call_fpe:
-               tst     r0, #0x08000000                 @ only CDP/CPRT/LDC/STC 
have bit 27
+       tst     r0, #0x08000000                 @ only CDP/CPRT/LDC/STC have 
bit 27
 #if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710)
-               and     r8, r0, #0x0f000000             @ mask out op-code bits
-               teqne   r8, #0x0f000000                 @ SWI (ARM6/7 bug)?
+       and     r8, r0, #0x0f000000             @ mask out op-code bits
+       teqne   r8, #0x0f000000                 @ SWI (ARM6/7 bug)?
 #endif
-               moveq   pc, lr
-               get_thread_info r10                     @ get current thread
-               and     r8, r0, #0x00000f00             @ mask out CP number
-               mov     r7, #1
-               add     r6, r10, #TI_USED_CP
-               strb    r7, [r6, r8, lsr #8]            @ set appropriate 
used_cp[]
+       moveq   pc, lr
+       get_thread_info r10                     @ get current thread
+       and     r8, r0, #0x00000f00             @ mask out CP number
+       mov     r7, #1
+       add     r6, r10, #TI_USED_CP
+       strb    r7, [r6, r8, lsr #8]            @ set appropriate used_cp[]
 #ifdef CONFIG_IWMMXT
-               @ Test if we need to give access to iWMMXt coprocessors
-               ldr     r5, [r10, #TI_FLAGS]
-               rsbs    r7, r8, #(1 << 8)               @ CP 0 or 1 only
-               movcss  r7, r5, lsr #(TIF_USING_IWMMXT + 1)
-               bcs     iwmmxt_task_enable
-#endif
-               enable_irq r7
-               add     pc, pc, r8, lsr #6
-               mov     r0, r0
-
-               mov     pc, lr                          @ CP#0
-               b       do_fpe                          @ CP#1 (FPE)
-               b       do_fpe                          @ CP#2 (FPE)
-               mov     pc, lr                          @ CP#3
-               mov     pc, lr                          @ CP#4
-               mov     pc, lr                          @ CP#5
-               mov     pc, lr                          @ CP#6
-               mov     pc, lr                          @ CP#7
-               mov     pc, lr                          @ CP#8
-               mov     pc, lr                          @ CP#9
+       @ Test if we need to give access to iWMMXt coprocessors
+       ldr     r5, [r10, #TI_FLAGS]
+       rsbs    r7, r8, #(1 << 8)               @ CP 0 or 1 only
+       movcss  r7, r5, lsr #(TIF_USING_IWMMXT + 1)
+       bcs     iwmmxt_task_enable
+#endif
+       enable_irq r7
+       add     pc, pc, r8, lsr #6
+       mov     r0, r0
+
+       mov     pc, lr                          @ CP#0
+       b       do_fpe                          @ CP#1 (FPE)
+       b       do_fpe                          @ CP#2 (FPE)
+       mov     pc, lr                          @ CP#3
+       mov     pc, lr                          @ CP#4
+       mov     pc, lr                          @ CP#5
+       mov     pc, lr                          @ CP#6
+       mov     pc, lr                          @ CP#7
+       mov     pc, lr                          @ CP#8
+       mov     pc, lr                          @ CP#9
 #ifdef CONFIG_VFP
-               b       do_vfp                          @ CP#10 (VFP)
-               b       do_vfp                          @ CP#11 (VFP)
+       b       do_vfp                          @ CP#10 (VFP)
+       b       do_vfp                          @ CP#11 (VFP)
 #else
-               mov     pc, lr                          @ CP#10 (VFP)
-               mov     pc, lr                          @ CP#11 (VFP)
+       mov     pc, lr                          @ CP#10 (VFP)
+       mov     pc, lr                          @ CP#11 (VFP)
 #endif
-               mov     pc, lr                          @ CP#12
-               mov     pc, lr                          @ CP#13
-               mov     pc, lr                          @ CP#14 (Debug)
-               mov     pc, lr                          @ CP#15 (Control)
-
-do_fpe:                ldr     r4, .LCfp
-               add     r10, r10, #TI_FPSTATE           @ r10 = workspace
-               ldr     pc, [r4]                        @ Call FP module USR 
entry point
+       mov     pc, lr                          @ CP#12
+       mov     pc, lr                          @ CP#13
+       mov     pc, lr                          @ CP#14 (Debug)
+       mov     pc, lr                          @ CP#15 (Control)
+
+do_fpe:
+       ldr     r4, .LCfp
+       add     r10, r10, #TI_FPSTATE           @ r10 = workspace
+       ldr     pc, [r4]                        @ Call FP module USR entry point
 
 /*
  * The FP module is called with these registers set:
@@ -365,37 +453,33 @@
  *  lr  = unrecognised FP instruction return address
  */
 
-               .data
+       .data
 ENTRY(fp_enter)
-               .word   fpundefinstr
-               .text
+       .word   fpundefinstr
+       .text
 
-fpundefinstr:  mov     r0, sp
-               adrsvc  al, lr, ret_from_exception
-               b       do_undefinstr
-
-               .align  5
-__pabt_usr:    sub     sp, sp, #S_FRAME_SIZE           @ Allocate frame size 
in one go
-               stmia   sp, {r0 - r12}                  @ Save r0 - r12
-               ldr     r4, .LCabt
-               add     r8, sp, #S_PC
-               ldmia   r4, {r5 - r7}                   @ Get USR pc, cpsr
-               stmia   r8, {r5 - r7}                   @ Save USR pc, cpsr, 
old_r0
-               stmdb   r8, {sp, lr}^                   @ Save sp_usr lr_usr
-               alignment_trap r4, r7, __temp_abt
-               zero_fp
-               enable_irq r0                           @ Enable interrupts
-               mov     r0, r5                          @ address (pc)
-               mov     r1, sp                          @ regs
-               bl      do_PrefetchAbort                @ call abort handler
-               /* fall through */
+fpundefinstr:
+       mov     r0, sp
+       adr     lr, ret_from_exception
+       b       do_undefinstr
+
+       .align  5
+__pabt_usr:
+       usr_entry abt
+       alignment_trap r7, r0, __temp_abt
+       zero_fp
+       enable_irq r0                           @ Enable interrupts
+       mov     r0, r2                          @ address (pc)
+       mov     r1, sp                          @ regs
+       bl      do_PrefetchAbort                @ call abort handler
+       /* fall through */
 /*
  * This is the return code to user mode for abort handlers
  */
 ENTRY(ret_from_exception)
-               get_thread_info tsk
-               mov     why, #0
-               b       ret_to_user
+       get_thread_info tsk
+       mov     why, #0
+       b       ret_to_user
 
 /*
  * Register switch for ARMv3 and ARMv4 processors
@@ -403,212 +487,160 @@
  * previous and next are guaranteed not to be the same.
  */
 ENTRY(__switch_to)
-               add     ip, r1, #TI_CPU_SAVE
-               ldr     r3, [r2, #TI_CPU_DOMAIN]!
-               stmia   ip!, {r4 - sl, fp, sp, lr}      @ Store most regs on 
stack
+       add     ip, r1, #TI_CPU_SAVE
+       ldr     r3, [r2, #TI_TP_VALUE]
+       stmia   ip!, {r4 - sl, fp, sp, lr}      @ Store most regs on stack
+       ldr     r6, [r2, #TI_CPU_DOMAIN]!
 #if defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_IWMMXT)
-               mra     r4, r5, acc0
-               stmia   ip, {r4, r5}
+       mra     r4, r5, acc0
+       stmia   ip, {r4, r5}
 #endif
-               mcr     p15, 0, r3, c3, c0, 0           @ Set domain register
+       mov     r4, #0xffff0fff
+       str     r3, [r4, #-3]                   @ Set TLS ptr
+       mcr     p15, 0, r6, c3, c0, 0           @ Set domain register
 #ifdef CONFIG_VFP
-               @ Always disable VFP so we can lazily save/restore the old
-               @ state. This occurs in the context of the previous thread.
-               VFPFMRX r4, FPEXC
-               bic     r4, r4, #FPEXC_ENABLE
-               VFPFMXR FPEXC, r4
+       @ Always disable VFP so we can lazily save/restore the old
+       @ state. This occurs in the context of the previous thread.
+       VFPFMRX r4, FPEXC
+       bic     r4, r4, #FPEXC_ENABLE
+       VFPFMXR FPEXC, r4
 #endif
 #if defined(CONFIG_IWMMXT)
-               bl      iwmmxt_task_switch
+       bl      iwmmxt_task_switch
 #elif defined(CONFIG_CPU_XSCALE)
-               add     r4, r2, #40                     @ 
cpu_context_save->extra
-               ldmib   r4, {r4, r5}
-               mar     acc0, r4, r5
-#endif
-               ldmib   r2, {r4 - sl, fp, sp, pc}       @ Load all regs saved 
previously
-
-               __INIT
-/*
- * Vector stubs.  NOTE that we only align 'vector_IRQ' to a cache line 
boundary,
- * and we rely on each stub being exactly 48 (1.5 cache lines) in size.  This
- * means that we only ever load two cache lines for this code, or one if we're
- * lucky.  We also copy this code to 0x200 so that we can use branches in the
+       add     r4, r2, #40                     @ cpu_context_save->extra
+       ldmib   r4, {r4, r5}
+       mar     acc0, r4, r5
+#endif
+       ldmib   r2, {r4 - sl, fp, sp, pc}       @ Load all regs saved previously
+
+       __INIT
+/*
+ * Vector stubs.
+ *
+ * This code is copied to 0x200 or 0xffff0200 so we can use branches in the
  * vectors, rather than ldr's.
+ *
+ * Common stub entry macro:
+ *   Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC
  */
-               .align  5
+       .macro  vector_stub, name, sym, correction=0
+       .align  5
+
+vector_\name:
+       ldr     r13, .LCs\sym
+       .if \correction
+       sub     lr, lr, #\correction
+       .endif
+       str     lr, [r13]                       @ save lr_IRQ
+       mrs     lr, spsr
+       str     lr, [r13, #4]                   @ save spsr_IRQ
+       @
+       @ now branch to the relevant MODE handling routine
+       @
+       mrs     r13, cpsr
+       bic     r13, r13, #MODE_MASK
+       orr     r13, r13, #MODE_SVC
+       msr     spsr_cxsf, r13                  @ switch to SVC_32 mode
+
+       and     lr, lr, #15
+       ldr     lr, [pc, lr, lsl #2]
+       movs    pc, lr                          @ Changes mode and branches
+       .endm
+
 __stubs_start:
 /*
  * Interrupt dispatcher
- * Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC
  */
-vector_IRQ:    @
-               @ save mode specific registers
-               @
-               ldr     r13, .LCsirq
-               sub     lr, lr, #4
-               str     lr, [r13]                       @ save lr_IRQ
-               mrs     lr, spsr
-               str     lr, [r13, #4]                   @ save spsr_IRQ
-               @
-               @ now branch to the relevant MODE handling routine
-               @
-               mrs     r13, cpsr
-               bic     r13, r13, #MODE_MASK
-               orr     r13, r13, #MODE_SVC
-               msr     spsr_cxsf, r13                  @ switch to SVC_32 mode
-
-               and     lr, lr, #15
-               ldr     lr, [pc, lr, lsl #2]
-               movs    pc, lr                          @ Changes mode and 
branches
-
-.LCtab_irq:    .word   __irq_usr                       @  0  (USR_26 / USR_32)
-               .word   __irq_invalid                   @  1  (FIQ_26 / FIQ_32)
-               .word   __irq_invalid                   @  2  (IRQ_26 / IRQ_32)
-               .word   __irq_svc                       @  3  (SVC_26 / SVC_32)
-               .word   __irq_invalid                   @  4
-               .word   __irq_invalid                   @  5
-               .word   __irq_invalid                   @  6
-               .word   __irq_invalid                   @  7
-               .word   __irq_invalid                   @  8
-               .word   __irq_invalid                   @  9
-               .word   __irq_invalid                   @  a
-               .word   __irq_invalid                   @  b
-               .word   __irq_invalid                   @  c
-               .word   __irq_invalid                   @  d
-               .word   __irq_invalid                   @  e
-               .word   __irq_invalid                   @  f
+       vector_stub     irq, irq, 4
 
-               .align  5
+       .long   __irq_usr                       @  0  (USR_26 / USR_32)
+       .long   __irq_invalid                   @  1  (FIQ_26 / FIQ_32)
+       .long   __irq_invalid                   @  2  (IRQ_26 / IRQ_32)
+       .long   __irq_svc                       @  3  (SVC_26 / SVC_32)
+       .long   __irq_invalid                   @  4
+       .long   __irq_invalid                   @  5
+       .long   __irq_invalid                   @  6
+       .long   __irq_invalid                   @  7
+       .long   __irq_invalid                   @  8
+       .long   __irq_invalid                   @  9
+       .long   __irq_invalid                   @  a
+       .long   __irq_invalid                   @  b
+       .long   __irq_invalid                   @  c
+       .long   __irq_invalid                   @  d
+       .long   __irq_invalid                   @  e
+       .long   __irq_invalid                   @  f
 
 /*
- * Data abort dispatcher - dispatches it to the correct handler for the 
processor mode
+ * Data abort dispatcher
  * Enter in ABT mode, spsr = USR CPSR, lr = USR PC
  */
-vector_data:   @
-               @ save mode specific registers
-               @
-               ldr     r13, .LCsabt
-               sub     lr, lr, #8
-               str     lr, [r13]
-               mrs     lr, spsr
-               str     lr, [r13, #4]
-               @
-               @ now branch to the relevant MODE handling routine
-               @
-               mrs     r13, cpsr
-               bic     r13, r13, #MODE_MASK
-               orr     r13, r13, #MODE_SVC
-               msr     spsr_cxsf, r13                  @ switch to SVC_32 mode
-
-               and     lr, lr, #15
-               ldr     lr, [pc, lr, lsl #2]
-               movs    pc, lr                          @ Changes mode and 
branches
-
-.LCtab_dabt:   .word   __dabt_usr                      @  0  (USR_26 / USR_32)
-               .word   __dabt_invalid                  @  1  (FIQ_26 / FIQ_32)
-               .word   __dabt_invalid                  @  2  (IRQ_26 / IRQ_32)
-               .word   __dabt_svc                      @  3  (SVC_26 / SVC_32)
-               .word   __dabt_invalid                  @  4
-               .word   __dabt_invalid                  @  5
-               .word   __dabt_invalid                  @  6
-               .word   __dabt_invalid                  @  7
-               .word   __dabt_invalid                  @  8
-               .word   __dabt_invalid                  @  9
-               .word   __dabt_invalid                  @  a
-               .word   __dabt_invalid                  @  b
-               .word   __dabt_invalid                  @  c
-               .word   __dabt_invalid                  @  d
-               .word   __dabt_invalid                  @  e
-               .word   __dabt_invalid                  @  f
+       vector_stub     dabt, abt, 8
 
-               .align  5
+       .long   __dabt_usr                      @  0  (USR_26 / USR_32)
+       .long   __dabt_invalid                  @  1  (FIQ_26 / FIQ_32)
+       .long   __dabt_invalid                  @  2  (IRQ_26 / IRQ_32)
+       .long   __dabt_svc                      @  3  (SVC_26 / SVC_32)
+       .long   __dabt_invalid                  @  4
+       .long   __dabt_invalid                  @  5
+       .long   __dabt_invalid                  @  6
+       .long   __dabt_invalid                  @  7
+       .long   __dabt_invalid                  @  8
+       .long   __dabt_invalid                  @  9
+       .long   __dabt_invalid                  @  a
+       .long   __dabt_invalid                  @  b
+       .long   __dabt_invalid                  @  c
+       .long   __dabt_invalid                  @  d
+       .long   __dabt_invalid                  @  e
+       .long   __dabt_invalid                  @  f
 
 /*
- * Prefetch abort dispatcher - dispatches it to the correct handler for the 
processor mode
+ * Prefetch abort dispatcher
  * Enter in ABT mode, spsr = USR CPSR, lr = USR PC
  */
-vector_prefetch:
-               @
-               @ save mode specific registers
-               @
-               ldr     r13, .LCsabt
-               sub     lr, lr, #4
-               str     lr, [r13]                       @ save lr_ABT
-               mrs     lr, spsr
-               str     lr, [r13, #4]                   @ save spsr_ABT
-               @
-               @ now branch to the relevant MODE handling routine
-               @
-               mrs     r13, cpsr
-               bic     r13, r13, #MODE_MASK
-               orr     r13, r13, #MODE_SVC
-               msr     spsr_cxsf, r13                  @ switch to SVC_32 mode
-
-               ands    lr, lr, #15
-               ldr     lr, [pc, lr, lsl #2]
-               movs    pc, lr
-
-.LCtab_pabt:   .word   __pabt_usr                      @  0 (USR_26 / USR_32)
-               .word   __pabt_invalid                  @  1 (FIQ_26 / FIQ_32)
-               .word   __pabt_invalid                  @  2 (IRQ_26 / IRQ_32)
-               .word   __pabt_svc                      @  3 (SVC_26 / SVC_32)
-               .word   __pabt_invalid                  @  4
-               .word   __pabt_invalid                  @  5
-               .word   __pabt_invalid                  @  6
-               .word   __pabt_invalid                  @  7
-               .word   __pabt_invalid                  @  8
-               .word   __pabt_invalid                  @  9
-               .word   __pabt_invalid                  @  a
-               .word   __pabt_invalid                  @  b
-               .word   __pabt_invalid                  @  c
-               .word   __pabt_invalid                  @  d
-               .word   __pabt_invalid                  @  e
-               .word   __pabt_invalid                  @  f
+       vector_stub     pabt, abt, 4
 
-               .align  5
+       .long   __pabt_usr                      @  0 (USR_26 / USR_32)
+       .long   __pabt_invalid                  @  1 (FIQ_26 / FIQ_32)
+       .long   __pabt_invalid                  @  2 (IRQ_26 / IRQ_32)
+       .long   __pabt_svc                      @  3 (SVC_26 / SVC_32)
+       .long   __pabt_invalid                  @  4
+       .long   __pabt_invalid                  @  5
+       .long   __pabt_invalid                  @  6
+       .long   __pabt_invalid                  @  7
+       .long   __pabt_invalid                  @  8
+       .long   __pabt_invalid                  @  9
+       .long   __pabt_invalid                  @  a
+       .long   __pabt_invalid                  @  b
+       .long   __pabt_invalid                  @  c
+       .long   __pabt_invalid                  @  d
+       .long   __pabt_invalid                  @  e
+       .long   __pabt_invalid                  @  f
 
 /*
- * Undef instr entry dispatcher - dispatches it to the correct handler for the 
processor mode
+ * Undef instr entry dispatcher
  * Enter in UND mode, spsr = SVC/USR CPSR, lr = SVC/USR PC
  */
-vector_undefinstr:
-               @
-               @ save mode specific registers
-               @
-               ldr     r13, .LCsund
-               str     lr, [r13]                       @ save lr_UND
-               mrs     lr, spsr
-               str     lr, [r13, #4]                   @ save spsr_UND
-               @
-               @ now branch to the relevant MODE handling routine
-               @
-               mrs     r13, cpsr
-               bic     r13, r13, #MODE_MASK
-               orr     r13, r13, #MODE_SVC
-               msr     spsr_cxsf, r13                  @ switch to SVC_32 mode
-
-               and     lr, lr, #15
-               ldr     lr, [pc, lr, lsl #2]
-               movs    pc, lr                          @ Changes mode and 
branches
-
-.LCtab_und:    .word   __und_usr                       @  0 (USR_26 / USR_32)
-               .word   __und_invalid                   @  1 (FIQ_26 / FIQ_32)
-               .word   __und_invalid                   @  2 (IRQ_26 / IRQ_32)
-               .word   __und_svc                       @  3 (SVC_26 / SVC_32)
-               .word   __und_invalid                   @  4
-               .word   __und_invalid                   @  5
-               .word   __und_invalid                   @  6
-               .word   __und_invalid                   @  7
-               .word   __und_invalid                   @  8
-               .word   __und_invalid                   @  9
-               .word   __und_invalid                   @  a
-               .word   __und_invalid                   @  b
-               .word   __und_invalid                   @  c
-               .word   __und_invalid                   @  d
-               .word   __und_invalid                   @  e
-               .word   __und_invalid                   @  f
+       vector_stub     und, und
+
+       .long   __und_usr                       @  0 (USR_26 / USR_32)
+       .long   __und_invalid                   @  1 (FIQ_26 / FIQ_32)
+       .long   __und_invalid                   @  2 (IRQ_26 / IRQ_32)
+       .long   __und_svc                       @  3 (SVC_26 / SVC_32)
+       .long   __und_invalid                   @  4
+       .long   __und_invalid                   @  5
+       .long   __und_invalid                   @  6
+       .long   __und_invalid                   @  7
+       .long   __und_invalid                   @  8
+       .long   __und_invalid                   @  9
+       .long   __und_invalid                   @  a
+       .long   __und_invalid                   @  b
+       .long   __und_invalid                   @  c
+       .long   __und_invalid                   @  d
+       .long   __und_invalid                   @  e
+       .long   __und_invalid                   @  f
 
-               .align  5
+       .align  5
 
 /*=============================================================================
  * Undefined FIQs
@@ -620,8 +652,9 @@
  * other mode than FIQ...  Ok you can switch to another mode, but you can't
  * get out of that mode without clobbering one register.
  */
-vector_FIQ:    disable_fiq
-               subs    pc, lr, #4
+vector_fiq:
+       disable_fiq
+       subs    pc, lr, #4
 
 /*=============================================================================
  * Address exception handler
@@ -631,70 +664,78 @@
  */
 
 vector_addrexcptn:
-               b       vector_addrexcptn
+       b       vector_addrexcptn
 
 /*
  * We group all the following data together to optimise
  * for CPUs with separate I & D caches.
  */
-               .align  5
+       .align  5
 
-.LCvswi:       .word   vector_swi
+.LCvswi:
+       .word   vector_swi
 
-.LCsirq:       .word   __temp_irq
-.LCsund:       .word   __temp_und
-.LCsabt:       .word   __temp_abt
+.LCsirq:
+       .word   __temp_irq
+.LCsund:
+       .word   __temp_und
+.LCsabt:
+       .word   __temp_abt
 
 __stubs_end:
 
-               .equ    __real_stubs_start, .LCvectors + 0x200
+       .equ    __real_stubs_start, .LCvectors + 0x200
 
-.LCvectors:    swi     SYS_ERROR0
-               b       __real_stubs_start + (vector_undefinstr - __stubs_start)
-               ldr     pc, __real_stubs_start + (.LCvswi - __stubs_start)
-               b       __real_stubs_start + (vector_prefetch - __stubs_start)
-               b       __real_stubs_start + (vector_data - __stubs_start)
-               b       __real_stubs_start + (vector_addrexcptn - __stubs_start)
-               b       __real_stubs_start + (vector_IRQ - __stubs_start)
-               b       __real_stubs_start + (vector_FIQ - __stubs_start)
+.LCvectors:
+       swi     SYS_ERROR0
+       b       __real_stubs_start + (vector_und - __stubs_start)
+       ldr     pc, __real_stubs_start + (.LCvswi - __stubs_start)
+       b       __real_stubs_start + (vector_pabt - __stubs_start)
+       b       __real_stubs_start + (vector_dabt - __stubs_start)
+       b       __real_stubs_start + (vector_addrexcptn - __stubs_start)
+       b       __real_stubs_start + (vector_irq - __stubs_start)
+       b       __real_stubs_start + (vector_fiq - __stubs_start)
 
 ENTRY(__trap_init)
-               stmfd   sp!, {r4 - r6, lr}
+       stmfd   sp!, {r4 - r6, lr}
 
-               mov     r0, #0xff000000
-               orr     r0, r0, #0x00ff0000             @ high vectors position
-               adr     r1, .LCvectors                  @ set up the vectors
-               ldmia   r1, {r1, r2, r3, r4, r5, r6, ip, lr}
-               stmia   r0, {r1, r2, r3, r4, r5, r6, ip, lr}
-
-               add     r2, r0, #0x200
-               adr     r0, __stubs_start               @ copy stubs to 0x200
-               adr     r1, __stubs_end
-1:             ldr     r3, [r0], #4
-               str     r3, [r2], #4
-               cmp     r0, r1
-               blt     1b
-               LOADREGS(fd, sp!, {r4 - r6, pc})
+       mov     r0, #0xff000000
+       orr     r0, r0, #0x00ff0000             @ high vectors position
+       adr     r1, .LCvectors                  @ set up the vectors
+       ldmia   r1, {r1, r2, r3, r4, r5, r6, ip, lr}
+       stmia   r0, {r1, r2, r3, r4, r5, r6, ip, lr}
+
+       add     r2, r0, #0x200
+       adr     r0, __stubs_start               @ copy stubs to 0x200
+       adr     r1, __stubs_end
+1:     ldr     r3, [r0], #4
+       str     r3, [r2], #4
+       cmp     r0, r1
+       blt     1b
+       LOADREGS(fd, sp!, {r4 - r6, pc})
 
-               .data
+       .data
 
 /*
  * Do not reorder these, and do not insert extra data between...
  */
 
-__temp_irq:    .word   0                               @ saved lr_irq
-               .word   0                               @ saved spsr_irq
-               .word   -1                              @ old_r0
-__temp_und:    .word   0                               @ Saved lr_und
-               .word   0                               @ Saved spsr_und
-               .word   -1                              @ old_r0
-__temp_abt:    .word   0                               @ Saved lr_abt
-               .word   0                               @ Saved spsr_abt
-               .word   -1                              @ old_r0
+__temp_irq:
+       .word   0                               @ saved lr_irq
+       .word   0                               @ saved spsr_irq
+       .word   -1                              @ old_r0
+__temp_und:
+       .word   0                               @ Saved lr_und
+       .word   0                               @ Saved spsr_und
+       .word   -1                              @ old_r0
+__temp_abt:
+       .word   0                               @ Saved lr_abt
+       .word   0                               @ Saved spsr_abt
+       .word   -1                              @ old_r0
 
-               .globl  cr_alignment
-               .globl  cr_no_alignment
+       .globl  cr_alignment
+       .globl  cr_no_alignment
 cr_alignment:
-               .space  4
+       .space  4
 cr_no_alignment:
-               .space  4
+       .space  4
diff -urN linux/arch/arm/kernel/entry-common.S 
linux/arch/arm/kernel/entry-common.S
--- linux/arch/arm/kernel/entry-common.S        2004/08/13 07:18:51     1.32
+++ linux/arch/arm/kernel/entry-common.S        2005/02/07 02:54:30     1.33
@@ -137,7 +137,7 @@
        tst     ip, #_TIF_SYSCALL_TRACE         @ are we tracing syscalls?
        bne     __sys_trace
 
-       adrsvc  al, lr, ret_fast_syscall        @ return address
+       adr     lr, ret_fast_syscall            @ return address
        cmp     scno, #NR_syscalls              @ check upper syscall limit
        ldrcc   pc, [tbl, scno, lsl #2]         @ call sys_* routine
 
@@ -157,7 +157,7 @@
        mov     r0, #0                          @ trace entry [IP = 0]
        bl      syscall_trace
 
-       adrsvc  al, lr, __sys_trace_return      @ return address
+       adr     lr, __sys_trace_return          @ return address
        add     r1, sp, #S_R0 + S_OFF           @ pointer to regs
        cmp     scno, #NR_syscalls              @ check upper syscall limit
        ldmccia r1, {r0 - r3}                   @ have to reload r0 - r3
@@ -212,7 +212,8 @@
                b       sys_execve
 
 sys_clone_wapper:
-               add     r2, sp, #S_OFF
+               add     ip, sp, #S_OFF
+               str     ip, [sp, #4]
                b       sys_clone
 
 sys_sigsuspend_wrapper:
diff -urN linux/arch/arm/kernel/entry-header.S 
linux/arch/arm/kernel/entry-header.S
--- linux/arch/arm/kernel/entry-header.S        2005/01/13 14:05:18     1.12
+++ linux/arch/arm/kernel/entry-header.S        2005/02/07 02:54:30     1.13
@@ -141,13 +141,6 @@
        mov     \rd, \rd, lsl #13
        .endm
 
-/*
- * Like adr, but force SVC mode (if required)
- */
-       .macro  adrsvc, cond, reg, label
-       adr\cond        \reg, \label
-       .endm
-
        .macro  alignment_trap, rbase, rtemp, sym
 #ifdef CONFIG_ALIGNMENT_TRAP
 #define OFF_CR_ALIGNMENT(x)    cr_alignment - x
diff -urN linux/arch/arm/kernel/fiq.c linux/arch/arm/kernel/fiq.c
--- linux/arch/arm/kernel/fiq.c 2004/12/27 02:15:48     1.19
+++ linux/arch/arm/kernel/fiq.c 2005/02/07 02:54:30     1.20
@@ -46,6 +46,12 @@
 #include <asm/system.h>
 #include <asm/uaccess.h>
 
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#warning This file requires GCC 3.3.x or older to build.  Alternatively,
+#warning please talk to GCC people to resolve the issues with the
+#warning assembly clobber list.
+#endif
+
 static unsigned long no_fiq_insn;
 
 /* Default reacquire function
@@ -89,16 +95,15 @@
  */
 void set_fiq_regs(struct pt_regs *regs)
 {
-       register unsigned long tmp, tmp2;
+       register unsigned long tmp;
        __asm__ volatile (
        "mrs    %0, cpsr\n\
-       mov     %1, %3\n\
-       msr     cpsr_c, %1      @ select FIQ mode\n\
+       msr     cpsr_c, %2      @ select FIQ mode\n\
        mov     r0, r0\n\
-       ldmia   %2, {r8 - r14}\n\
+       ldmia   %1, {r8 - r14}\n\
        msr     cpsr_c, %0      @ return to SVC mode\n\
        mov     r0, r0"
-       : "=&r" (tmp), "=&r" (tmp2)
+       : "=&r" (tmp)
        : "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)
        /* These registers aren't modified by the above code in a way
           visible to the compiler, but we mark them as clobbers anyway
@@ -109,16 +114,15 @@
 
 void get_fiq_regs(struct pt_regs *regs)
 {
-       register unsigned long tmp, tmp2;
+       register unsigned long tmp;
        __asm__ volatile (
        "mrs    %0, cpsr\n\
-       mov     %1, %3\n\
-       msr     cpsr_c, %1      @ select FIQ mode\n\
+       msr     cpsr_c, %2      @ select FIQ mode\n\
        mov     r0, r0\n\
-       stmia   %2, {r8 - r14}\n\
+       stmia   %1, {r8 - r14}\n\
        msr     cpsr_c, %0      @ return to SVC mode\n\
        mov     r0, r0"
-       : "=&r" (tmp), "=&r" (tmp2)
+       : "=&r" (tmp)
        : "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)
        /* These registers aren't modified by the above code in a way
           visible to the compiler, but we mark them as clobbers anyway
diff -urN linux/arch/arm/kernel/process.c linux/arch/arm/kernel/process.c
--- linux/arch/arm/kernel/process.c     2004/10/25 20:44:10     1.48
+++ linux/arch/arm/kernel/process.c     2005/02/07 02:54:30     1.49
@@ -352,6 +352,9 @@
        thread->cpu_context.sp = (unsigned long)childregs;
        thread->cpu_context.pc = (unsigned long)ret_from_fork;
 
+       if (clone_flags & CLONE_SETTLS)
+               thread->tp_value = regs->ARM_r3;
+
        return 0;
 }
 
diff -urN linux/arch/arm/kernel/ptrace.c linux/arch/arm/kernel/ptrace.c
--- linux/arch/arm/kernel/ptrace.c      2004/10/25 20:44:10     1.35
+++ linux/arch/arm/kernel/ptrace.c      2005/02/07 02:54:30     1.36
@@ -719,6 +719,11 @@
                        ret = ptrace_setfpregs(child, (void __user *)data);
                        break;
 
+               case PTRACE_GET_THREAD_AREA:
+                       ret = put_user(child->thread_info->tp_value,
+                                      (unsigned long __user *) data);
+                       break;
+
                default:
                        ret = ptrace_request(child, request, addr, data);
                        break;
diff -urN linux/arch/arm/kernel/sys_arm.c linux/arch/arm/kernel/sys_arm.c
--- linux/arch/arm/kernel/sys_arm.c     2004/12/27 02:15:48     1.35
+++ linux/arch/arm/kernel/sys_arm.c     2005/02/07 02:54:30     1.36
@@ -241,18 +241,14 @@
 /* Clone a task - this clones the calling program thread.
  * This is called indirectly via a small wrapper
  */
-asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, 
struct pt_regs *regs)
+asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
+                        int *parent_tidptr, int tls_val, int *child_tidptr,
+                        struct pt_regs *regs)
 {
-       /*
-        * We don't support SETTID / CLEARTID
-        */
-       if (clone_flags & (CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID))
-               return -EINVAL;
-
        if (!newsp)
                newsp = regs->ARM_sp;
 
-       return do_fork(clone_flags, newsp, regs, 0, NULL, NULL);
+       return do_fork(clone_flags, newsp, regs, 0, parent_tidptr, 
child_tidptr);
 }
 
 asmlinkage int sys_vfork(struct pt_regs *regs)
diff -urN linux/arch/arm/kernel/traps.c linux/arch/arm/kernel/traps.c
--- linux/arch/arm/kernel/traps.c       2005/01/25 04:27:52     1.47
+++ linux/arch/arm/kernel/traps.c       2005/02/07 02:54:30     1.48
@@ -393,6 +393,7 @@
 #define NR(x) ((__ARM_NR_##x) - __ARM_NR_BASE)
 asmlinkage int arm_syscall(int no, struct pt_regs *regs)
 {
+       struct thread_info *thread = current_thread_info();
        siginfo_t info;
 
        if ((no >> 16) != 0x9f)
@@ -445,6 +446,17 @@
                regs->ARM_cpsr |= MODE32_BIT;
                return regs->ARM_r0;
 
+       case NR(set_tls):
+               thread->tp_value = regs->ARM_r0;
+               /*
+                * Our user accessible TLS ptr is located at 0xffff0ffc.
+                * On SMP read access to this address must raise a fault
+                * and be emulated from the data abort handler.
+                * m
+                */
+               *((unsigned long *)0xffff0ffc) = thread->tp_value;
+               return 0;
+
        default:
                /* Calls 9f00xx..9f07ff are defined to return -ENOSYS
                   if not implemented, rather than raising SIGILL.  This
diff -urN linux/arch/arm/mach-iop3xx/iop321-pci.c 
linux/arch/arm/mach-iop3xx/iop321-pci.c
--- linux/arch/arm/mach-iop3xx/iop321-pci.c     2005/01/13 14:05:18     1.4
+++ linux/arch/arm/mach-iop3xx/iop321-pci.c     2005/02/07 02:54:30     1.5
@@ -198,22 +198,23 @@
 void iop321_init(void)
 {
        DBG("PCI:  Intel 80321 PCI init code.\n");
-       DBG("\tATU: IOP321_ATUCMD=0x%04x\n", *IOP321_ATUCMD);
-       DBG("\tATU: IOP321_OMWTVR0=0x%04x, IOP321_OIOWTVR=0x%04x\n",
+       DBG("ATU: IOP321_ATUCMD=0x%04x\n", *IOP321_ATUCMD);
+       DBG("ATU: IOP321_OMWTVR0=0x%04x, IOP321_OIOWTVR=0x%04x\n",
                        *IOP321_OMWTVR0,
                        *IOP321_OIOWTVR);
-       DBG("\tATU: IOP321_ATUCR=0x%08x\n", *IOP321_ATUCR);
-       DBG("\tATU: IOP321_IABAR0=0x%08x IOP321_IALR0=0x%08x 
IOP321_IATVR0=%08x\n", *IOP321_IABAR0, *IOP321_IALR0, *IOP321_IATVR0);
-       DBG("\tATU: IOP321_ERBAR=0x%08x IOP321_ERLR=0x%08x 
IOP321_ERTVR=%08x\n", *IOP321_ERBAR, *IOP321_ERLR, *IOP321_ERTVR);
-       DBG("\tATU: IOP321_IABAR2=0x%08x IOP321_IALR2=0x%08x 
IOP321_IATVR2=%08x\n", *IOP321_IABAR2, *IOP321_IALR2, *IOP321_IATVR2);
-       DBG("\tATU: IOP321_IABAR3=0x%08x IOP321_IALR3=0x%08x 
IOP321_IATVR3=%08x\n", *IOP321_IABAR3, *IOP321_IALR3, *IOP321_IATVR3);
+       DBG("ATU: IOP321_ATUCR=0x%08x\n", *IOP321_ATUCR);
+       DBG("ATU: IOP321_IABAR0=0x%08x IOP321_IALR0=0x%08x 
IOP321_IATVR0=%08x\n",
+                       *IOP321_IABAR0, *IOP321_IALR0, *IOP321_IATVR0);
+       DBG("ATU: IOP321_OMWTVR0=0x%08x\n", *IOP321_OMWTVR0);
+       DBG("ATU: IOP321_IABAR1=0x%08x IOP321_IALR1=0x%08x\n",
+                       *IOP321_IABAR1, *IOP321_IALR1);
+       DBG("ATU: IOP321_ERBAR=0x%08x IOP321_ERLR=0x%08x IOP321_ERTVR=%08x\n",
+                       *IOP321_ERBAR, *IOP321_ERLR, *IOP321_ERTVR);
+       DBG("ATU: IOP321_IABAR2=0x%08x IOP321_IALR2=0x%08x 
IOP321_IATVR2=%08x\n",
+                       *IOP321_IABAR2, *IOP321_IALR2, *IOP321_IATVR2);
+       DBG("ATU: IOP321_IABAR3=0x%08x IOP321_IALR3=0x%08x 
IOP321_IATVR3=%08x\n",
+                       *IOP321_IABAR3, *IOP321_IALR3, *IOP321_IATVR3);
 
-#if 0
-       hook_fault_code(4, iop321_pci_abort, SIGBUS, "external abort on 
linefetch");
-       hook_fault_code(6, iop321_pci_abort, SIGBUS, "external abort on 
linefetch");
-       hook_fault_code(8, iop321_pci_abort, SIGBUS, "external abort on 
non-linefetch");
-       hook_fault_code(10, iop321_pci_abort, SIGBUS, "external abort on 
non-linefetch");
-#endif
        hook_fault_code(16+6, iop321_pci_abort, SIGBUS, "imprecise external 
abort");
 }
 
diff -urN linux/arch/arm/mach-iop3xx/iq31244-pci.c 
linux/arch/arm/mach-iop3xx/iq31244-pci.c
--- linux/arch/arm/mach-iop3xx/iq31244-pci.c    2005/01/13 14:05:18     1.2
+++ linux/arch/arm/mach-iop3xx/iq31244-pci.c    2005/02/07 02:54:30     1.3
@@ -78,13 +78,13 @@
 
        memset(res, 0, sizeof(struct resource) * 2);
 
-       res[0].start = IOP321_PCI_LOWER_IO_BA + IOP321_PCI_IO_OFFSET;
-       res[0].end   = IOP321_PCI_UPPER_IO_BA + IOP321_PCI_IO_OFFSET;
+       res[0].start = IOP321_PCI_LOWER_IO_VA;
+       res[0].end   = IOP321_PCI_UPPER_IO_VA;
        res[0].name  = "IQ31244 PCI I/O Space";
        res[0].flags = IORESOURCE_IO;
 
-       res[1].start = IOP321_PCI_LOWER_MEM_BA + IOP321_PCI_MEM_OFFSET;
-       res[1].end   = IOP321_PCI_UPPER_MEM_BA + IOP321_PCI_MEM_OFFSET;
+       res[1].start = IOP321_PCI_LOWER_MEM_PA;
+       res[1].end   = IOP321_PCI_UPPER_MEM_PA;
        res[1].name  = "IQ31244 PCI Memory Space";
        res[1].flags = IORESOURCE_MEM;
 
@@ -98,9 +98,6 @@
        sys->resource[1] = &res[1];
        sys->resource[2] = NULL;
 
-       iop3xx_pcibios_min_io = IOP321_PCI_LOWER_IO_VA;
-       iop3xx_pcibios_min_mem = IOP321_PCI_LOWER_MEM_VA;
-
        return 1;
 }
 
diff -urN linux/arch/arm/mach-iop3xx/iq80321-pci.c 
linux/arch/arm/mach-iop3xx/iq80321-pci.c
--- linux/arch/arm/mach-iop3xx/iq80321-pci.c    2005/01/13 14:05:18     1.3
+++ linux/arch/arm/mach-iop3xx/iq80321-pci.c    2005/02/07 02:54:30     1.4
@@ -72,13 +72,13 @@
 
        memset(res, 0, sizeof(struct resource) * 2);
 
-       res[0].start = IOP321_PCI_LOWER_IO_BA + IOP321_PCI_IO_OFFSET;
-       res[0].end   = IOP321_PCI_UPPER_IO_BA + IOP321_PCI_IO_OFFSET;
+       res[0].start = IOP321_PCI_LOWER_IO_VA;
+       res[0].end   = IOP321_PCI_UPPER_IO_VA;
        res[0].name  = "IQ80321 PCI I/O Space";
        res[0].flags = IORESOURCE_IO;
 
-       res[1].start = IOP321_PCI_LOWER_MEM_BA + IOP321_PCI_MEM_OFFSET;
-       res[1].end   = IOP321_PCI_UPPER_MEM_BA + IOP321_PCI_MEM_OFFSET;
+       res[1].start = IOP321_PCI_LOWER_MEM_PA;
+       res[1].end   = IOP321_PCI_UPPER_MEM_PA;
        res[1].name  = "IQ80321 PCI Memory Space";
        res[1].flags = IORESOURCE_MEM;
 
@@ -92,9 +92,6 @@
        sys->resource[1] = &res[1];
        sys->resource[2] = NULL;
 
-       iop3xx_pcibios_min_io = IOP321_PCI_LOWER_IO_VA;
-       iop3xx_pcibios_min_mem = IOP321_PCI_LOWER_MEM_VA;
-
        return 1;
 }
 
diff -urN linux/arch/arm/mach-iop3xx/iq80331-pci.c 
linux/arch/arm/mach-iop3xx/iq80331-pci.c
--- linux/arch/arm/mach-iop3xx/iq80331-pci.c    2005/01/13 14:05:18     1.2
+++ linux/arch/arm/mach-iop3xx/iq80331-pci.c    2005/02/07 02:54:30     1.3
@@ -68,13 +68,13 @@
 
        memset(res, 0, sizeof(struct resource) * 2);
 
-       res[0].start = IOP331_PCI_LOWER_IO_BA + IOP331_PCI_IO_OFFSET;
-       res[0].end   = IOP331_PCI_UPPER_IO_BA + IOP331_PCI_IO_OFFSET;
+       res[0].start = IOP331_PCI_LOWER_IO_VA;
+       res[0].end   = IOP331_PCI_UPPER_IO_VA;
        res[0].name  = "IQ80331 PCI I/O Space";
        res[0].flags = IORESOURCE_IO;
 
-       res[1].start = IOP331_PCI_LOWER_MEM_BA + IOP331_PCI_MEM_OFFSET;
-       res[1].end   = IOP331_PCI_UPPER_MEM_BA + IOP331_PCI_MEM_OFFSET;
+       res[1].start = IOP331_PCI_LOWER_MEM_PA;
+       res[1].end   = IOP331_PCI_UPPER_MEM_PA;
        res[1].name  = "IQ80331 PCI Memory Space";
        res[1].flags = IORESOURCE_MEM;
 
@@ -88,9 +88,6 @@
        sys->resource[1] = &res[1];
        sys->resource[2] = NULL;
 
-       iop3xx_pcibios_min_io = IOP331_PCI_LOWER_IO_VA;
-       iop3xx_pcibios_min_mem = IOP331_PCI_LOWER_MEM_VA;
-
        return 1;
 }
 
diff -urN linux/arch/arm/mach-iop3xx/iq80332-pci.c 
linux/arch/arm/mach-iop3xx/iq80332-pci.c
--- linux/arch/arm/mach-iop3xx/iq80332-pci.c    2005/01/13 14:05:18     1.1
+++ linux/arch/arm/mach-iop3xx/iq80332-pci.c    2005/02/07 02:54:30     1.2
@@ -74,13 +74,13 @@
 
        memset(res, 0, sizeof(struct resource) * 2);
 
-       res[0].start = IOP331_PCI_LOWER_IO_BA + IOP331_PCI_IO_OFFSET;
-       res[0].end   = IOP331_PCI_UPPER_IO_BA + IOP331_PCI_IO_OFFSET;
+       res[0].start = IOP331_PCI_LOWER_IO_VA;
+       res[0].end   = IOP331_PCI_UPPER_IO_VA;
        res[0].name  = "IQ80332 PCI I/O Space";
        res[0].flags = IORESOURCE_IO;
 
-       res[1].start = IOP331_PCI_LOWER_MEM_BA + IOP331_PCI_MEM_OFFSET;
-       res[1].end   = IOP331_PCI_UPPER_MEM_BA + IOP331_PCI_MEM_OFFSET;
+       res[1].start = IOP331_PCI_LOWER_MEM_PA;
+       res[1].end   = IOP331_PCI_UPPER_MEM_PA;
        res[1].name  = "IQ80332 PCI Memory Space";
        res[1].flags = IORESOURCE_MEM;
 
@@ -94,9 +94,6 @@
        sys->resource[1] = &res[1];
        sys->resource[2] = NULL;
 
-       iop3xx_pcibios_min_io = IOP331_PCI_LOWER_IO_VA;
-       iop3xx_pcibios_min_mem = IOP331_PCI_LOWER_MEM_VA;
-
        return 1;
 }
 
diff -urN linux/arch/arm/mach-ixp4xx/gtwx5715-pci.c 
linux/arch/arm/mach-ixp4xx/gtwx5715-pci.c
--- linux/arch/arm/mach-ixp4xx/gtwx5715-pci.c   1970/01/01 00:00:00
+++ linux/arch/arm/mach-ixp4xx/gtwx5715-pci.c   Mon Feb  7 02:54:31 2005        
1.1
@@ -0,0 +1,101 @@
+/*
+ * arch/arm/mach-ixp4xx/gtwx5715-pci.c
+ *
+ * Gemtek GTWX5715 (Linksys WRV54G) board setup
+ *
+ * Copyright (C) 2004 George T. Joseph
+ * Derived from Coyote
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ */
+
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <asm/mach-types.h>
+#include <asm/hardware.h>
+#include <asm/irq.h>
+#include <asm/arch/gtwx5715.h>
+#include <asm/mach/pci.h>
+
+extern void ixp4xx_pci_preinit(void);
+extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
+extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
+
+        /*
+        * The exact GPIO pins and IRQs are defined in arch-ixp4xx/gtwx5715.h
+        * Slot 0 isn't actually populated with a card connector but
+        * we initialize it anyway in case a future version has the
+        * slot populated or someone with good soldering skills has
+        * some free time.
+        */
+
+
+static void gtwx5715_init_gpio(u8 pin, u32 style)
+{
+       gpio_line_config(pin, style | IXP4XX_GPIO_ACTIVE_LOW);
+
+       if (style & IXP4XX_GPIO_IN) gpio_line_isr_clear(pin);
+}
+
+void __init gtwx5715_pci_preinit(void)
+{
+       gtwx5715_init_gpio(GTWX5715_PCI_SLOT0_INTA_GPIO,        IXP4XX_GPIO_IN);
+       gtwx5715_init_gpio(GTWX5715_PCI_SLOT1_INTA_GPIO,        IXP4XX_GPIO_IN);
+
+       ixp4xx_pci_preinit();
+}
+
+
+static int __init gtwx5715_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+       int rc;
+       static int gtwx5715_irqmap
+                       [GTWX5715_PCI_SLOT_COUNT]
+                       [GTWX5715_PCI_INT_PIN_COUNT] = {
+       {GTWX5715_PCI_SLOT0_INTA_IRQ, GTWX5715_PCI_SLOT0_INTB_IRQ},
+       {GTWX5715_PCI_SLOT1_INTA_IRQ, GTWX5715_PCI_SLOT1_INTB_IRQ},
+};
+
+       if (slot >= GTWX5715_PCI_SLOT_COUNT ||
+                       pin >= GTWX5715_PCI_INT_PIN_COUNT) rc = -1;
+       else
+               rc = gtwx5715_irqmap[slot][pin-1];
+
+       printk("%s: Mapped slot %d pin %d to IRQ %d\n", __FUNCTION__,slot, pin, 
rc);
+       return(rc);
+}
+
+struct hw_pci gtwx5715_pci __initdata = {
+       .nr_controllers = 1,
+       .preinit =        gtwx5715_pci_preinit,
+       .swizzle =        pci_std_swizzle,
+       .setup =          ixp4xx_setup,
+       .scan =           ixp4xx_scan_bus,
+       .map_irq =        gtwx5715_map_irq,
+};
+
+int __init gtwx5715_pci_init(void)
+{
+       if (machine_is_gtwx5715())
+       {
+               pci_common_init(&gtwx5715_pci);
+       }
+
+       return 0;
+}
+
+subsys_initcall(gtwx5715_pci_init);
diff -urN linux/arch/arm/mach-ixp4xx/gtwx5715-setup.c 
linux/arch/arm/mach-ixp4xx/gtwx5715-setup.c
--- linux/arch/arm/mach-ixp4xx/gtwx5715-setup.c 1970/01/01 00:00:00
+++ linux/arch/arm/mach-ixp4xx/gtwx5715-setup.c Mon Feb  7 02:54:31 2005        
1.1
@@ -0,0 +1,153 @@
+/*
+ * arch/arm/mach-ixp4xx/gtwx5715-setup.c
+ *
+ * Gemtek GTWX5715 (Linksys WRV54G) board settup
+ *
+ * Copyright (C) 2004 George T. Joseph
+ * Derived from Coyote
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ */
+
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/serial.h>
+#include <linux/tty.h>
+#include <linux/serial_8250.h>
+
+#include <asm/types.h>
+#include <asm/setup.h>
+#include <asm/memory.h>
+#include <asm/hardware.h>
+#include <asm/irq.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/flash.h>
+#include <asm/arch/gtwx5715.h>
+
+/*
+ * Xscale UART registers are 32 bits wide with only the least
+ * significant 8 bits having any meaning.  From a configuration
+ * perspective, this means 2 things...
+ *
+ *   Setting .regshift = 2 so that the standard 16550 registers
+ *   line up on every 4th byte.
+ *
+ *   Shifting the register start virtual address +3 bytes when
+ *   compiled big-endian.  Since register writes are done on a
+ *   single byte basis, if the shift isn't done the driver will
+ *   write the value into the most significant byte of the register,
+ *   which is ignored, instead of the least significant.
+ */
+
+#ifdef __ARMEB__
+#define        REG_OFFSET      3
+#else
+#define        REG_OFFSET      0
+#endif
+
+/*
+ * Only the second or "console" uart is connected on the gtwx5715.
+ */
+
+static struct resource gtwx5715_uart_resources[] = {
+       {
+               .start  = IXP4XX_UART2_BASE_PHYS,
+               .end    = IXP4XX_UART2_BASE_PHYS + 0x0fff,
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .start  = IRQ_IXP4XX_UART2,
+               .end    = IRQ_IXP4XX_UART2,
+               .flags  = IORESOURCE_IRQ,
+       },
+       { },
+};
+
+
+static struct plat_serial8250_port gtwx5715_uart_platform_data[] = {
+       {
+       .mapbase        = IXP4XX_UART2_BASE_PHYS,
+       .membase        = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
+       .irq            = IRQ_IXP4XX_UART2,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .iotype         = UPIO_MEM,
+       .regshift       = 2,
+       .uartclk        = IXP4XX_UART_XTAL,
+       },
+       { },
+};
+
+static struct platform_device gtwx5715_uart_device = {
+       .name           = "serial8250",
+       .id             = 0,
+       .dev                    = {
+               .platform_data  = gtwx5715_uart_platform_data,
+       },
+       .num_resources  = 2,
+       .resource       = gtwx5715_uart_resources,
+};
+
+
+void __init gtwx5715_map_io(void)
+{
+       ixp4xx_map_io();
+}
+
+static struct flash_platform_data gtwx5715_flash_data = {
+       .map_name       = "cfi_probe",
+       .width          = 2,
+};
+
+static struct resource gtwx5715_flash_resource = {
+       .start          = GTWX5715_FLASH_BASE,
+       .end            = GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE,
+       .flags          = IORESOURCE_MEM,
+};
+
+static struct platform_device gtwx5715_flash = {
+       .name           = "IXP4XX-Flash",
+       .id             = 0,
+       .dev            = {
+               .platform_data = &gtwx5715_flash_data,
+       },
+       .num_resources  = 1,
+       .resource       = &gtwx5715_flash_resource,
+};
+
+static struct platform_device *gtwx5715_devices[] __initdata = {
+       &gtwx5715_uart_device,
+       &gtwx5715_flash,
+};
+
+static void __init gtwx5715_init(void)
+{
+       platform_add_devices(gtwx5715_devices, ARRAY_SIZE(gtwx5715_devices));
+}
+
+
+MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)")
+        MAINTAINER("George Joseph")
+        BOOT_MEM(PHYS_OFFSET, IXP4XX_UART2_BASE_PHYS,
+                IXP4XX_UART2_BASE_VIRT)
+        MAPIO(gtwx5715_map_io)
+        INITIRQ(ixp4xx_init_irq)
+                 .timer                = &ixp4xx_timer,
+        BOOT_PARAMS(0x0100)
+        INIT_MACHINE(gtwx5715_init)
+MACHINE_END
+
+
diff -urN linux/arch/arm/mach-ixp4xx/Kconfig linux/arch/arm/mach-ixp4xx/Kconfig
--- linux/arch/arm/mach-ixp4xx/Kconfig  2005/01/25 04:27:53     1.5
+++ linux/arch/arm/mach-ixp4xx/Kconfig  2005/02/07 02:54:31     1.6
@@ -77,6 +77,24 @@
        depends on MACH_IXDP465
        default y
 
+config MACH_GTWX5715
+       bool "Gemtek WX5715 (Linksys WRV54G)"
+       depends on ARCH_IXP4XX
+       help
+               This board is currently inside the Linksys WRV54G Gateways.
+
+               IXP425 - 266mhz
+               32mb SDRAM
+               8mb Flash
+               miniPCI slot 0 does not have a card connector soldered to the 
board
+               miniPCI slot 1 has an ISL3880 802.11g card (Prism54)
+               npe0 is connected to a Kendin KS8995M Switch (4 ports)
+               npe1 is the "wan" port
+               "Console" UART is available on J11 as console
+               "High Speed" UART is n/c (as far as I can tell)
+               20 Pin ARM/Xscale JTAG interface on J2
+
+
 comment "IXP4xx Options"
 
 config IXP4XX_INDIRECT_PCI
diff -urN linux/arch/arm/mach-ixp4xx/Makefile 
linux/arch/arm/mach-ixp4xx/Makefile
--- linux/arch/arm/mach-ixp4xx/Makefile 2004/12/04 18:15:58     1.2
+++ linux/arch/arm/mach-ixp4xx/Makefile 2005/02/07 02:54:31     1.3
@@ -8,4 +8,5 @@
 obj-$(CONFIG_MACH_IXDPG425)    += ixdpg425-pci.o coyote-setup.o
 obj-$(CONFIG_ARCH_ADI_COYOTE)  += coyote-pci.o coyote-setup.o
 obj-$(CONFIG_ARCH_PRPMC1100)   += prpmc1100-pci.o prpmc1100-setup.o
+obj-$(CONFIG_MACH_GTWX5715)    += gtwx5715-pci.o gtwx5715-setup.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/25 04:27:53     1.2
+++ linux/arch/arm/mach-pxa/corgi.c     2005/02/07 02:54:31     1.3
@@ -77,8 +77,6 @@
  * 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            = {
@@ -118,6 +116,18 @@
 
 
 /*
+ * Corgi Backlight Device
+ */
+static struct platform_device corgibl_device = {
+       .name           = "corgi-bl",
+       .dev            = {
+               .parent = &corgifb_device.dev,
+       },
+       .id             = -1,
+};
+
+
+/*
  * MMC/SD Device
  *
  * The card detect interrupt isn't debounced so we delay it by HZ/4
@@ -150,6 +160,10 @@
        pxa_gpio_mode(CORGI_GPIO_nSD_DETECT | GPIO_IN);
        pxa_gpio_mode(CORGI_GPIO_SD_PWR | GPIO_OUT);
 
+       init_timer(&mmc_detect.detect_timer);
+       mmc_detect.detect_timer.function = mmc_detect_callback;
+       mmc_detect.detect_timer.data = (unsigned long) &mmc_detect;
+
        err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_mmc_detect_int, 
SA_INTERRUPT,
                             "MMC card detect", data);
        if (err) {
@@ -157,10 +171,6 @@
                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;
@@ -218,6 +228,7 @@
        &corgiscoop_device,
        &corgissp_device,
        &corgifb_device,
+       &corgibl_device,
 };
 
 static struct sharpsl_flash_param_info sharpsl_flash_param;
diff -urN linux/arch/arm/mach-pxa/mainstone.c 
linux/arch/arm/mach-pxa/mainstone.c
--- linux/arch/arm/mach-pxa/mainstone.c 2004/12/04 18:15:58     1.7
+++ linux/arch/arm/mach-pxa/mainstone.c 2005/02/07 02:54:31     1.8
@@ -33,6 +33,7 @@
 
 #include <asm/arch/pxa-regs.h>
 #include <asm/arch/mainstone.h>
+#include <asm/arch/audio.h>
 #include <asm/arch/pxafb.h>
 #include <asm/arch/mmc.h>
 
@@ -120,6 +121,44 @@
        .resource       = smc91x_resources,
 };
 
+static int mst_audio_startup(snd_pcm_substream_t *substream, void *priv)
+{
+       if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+               MST_MSCWR2 &= ~MST_MSCWR2_AC97_SPKROFF;
+       return 0;
+}
+
+static void mst_audio_shutdown(snd_pcm_substream_t *substream, void *priv)
+{
+       if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+               MST_MSCWR2 |= MST_MSCWR2_AC97_SPKROFF;
+}
+
+static long mst_audio_suspend_mask;
+
+static void mst_audio_suspend(void *priv)
+{
+       mst_audio_suspend_mask = MST_MSCWR2;
+       MST_MSCWR2 |= MST_MSCWR2_AC97_SPKROFF;
+}
+
+static void mst_audio_resume(void *priv)
+{
+       MST_MSCWR2 &= mst_audio_suspend_mask | ~MST_MSCWR2_AC97_SPKROFF;
+}
+
+static pxa2xx_audio_ops_t mst_audio_ops = {
+       .startup        = mst_audio_startup,
+       .shutdown       = mst_audio_shutdown,
+       .suspend        = mst_audio_suspend,
+       .resume         = mst_audio_resume,
+};
+
+static struct platform_device mst_audio_device = {
+       .name           = "pxa2xx-ac97",
+       .id             = -1,
+       .dev            = { .platform_data = &mst_audio_ops },
+};
 
 static void mainstone_backlight_power(int on)
 {
@@ -228,7 +267,14 @@
 
 static void __init mainstone_init(void)
 {
+       /*
+        * On Mainstone, we route AC97_SYSCLK via GPIO45 to
+        * the audio daughter card
+        */
+       pxa_gpio_mode(GPIO45_SYSCLK_AC97_MD);
+
        platform_device_register(&smc91x_device);
+       platform_device_register(&mst_audio_device);
 
        /* reading Mainstone's "Virtual Configuration Register"
           might be handy to select LCD type here */
diff -urN linux/arch/arm/oprofile/common.c linux/arch/arm/oprofile/common.c
--- linux/arch/arm/oprofile/common.c    2005/01/13 14:05:20     1.2
+++ linux/arch/arm/oprofile/common.c    2005/02/07 02:54:31     1.3
@@ -105,12 +105,13 @@
        up(&pmu_sem);
 }
 
-void __init pmu_init(struct oprofile_operations *ops, struct op_arm_model_spec 
*spec)
+int __init
+pmu_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec)
 {
        init_MUTEX(&pmu_sem);
 
        if (spec->init() < 0)
-               return;
+               return -ENODEV;
 
        pmu_model = spec;
        init_driverfs();
@@ -121,6 +122,8 @@
        ops->stop = pmu_stop;
        ops->cpu_type = pmu_model->name;
        printk(KERN_INFO "oprofile: using %s PMU\n", spec->name);
+
+       return 0;
 }
 
 void pmu_exit(void)
diff -urN linux/arch/arm/oprofile/init.c linux/arch/arm/oprofile/init.c
--- linux/arch/arm/oprofile/init.c      2005/01/13 14:05:20     1.3
+++ linux/arch/arm/oprofile/init.c      2005/02/07 02:54:31     1.4
@@ -12,11 +12,15 @@
 #include <linux/errno.h>
 #include "op_arm_model.h"
 
-void __init oprofile_arch_init(struct oprofile_operations *ops)
+int __init oprofile_arch_init(struct oprofile_operations *ops)
 {
+       int ret = -ENODEV;
+
 #ifdef CONFIG_CPU_XSCALE
-       pmu_init(ops, &op_xscale_spec);
+       ret = pmu_init(ops, &op_xscale_spec);
 #endif
+
+       return ret;
 }
 
 void oprofile_arch_exit(void)
diff -urN linux/arch/arm26/kernel/asm-offsets.c 
linux/arch/arm26/kernel/asm-offsets.c
--- linux/arch/arm26/kernel/asm-offsets.c       2003/07/11 02:13:09     1.2
+++ linux/arch/arm26/kernel/asm-offsets.c       2005/02/07 02:54:31     1.3
@@ -42,7 +42,6 @@
 
 int main(void)
 {
-  DEFINE(TSK_USED_MATH,                offsetof(struct task_struct, 
used_math));
   DEFINE(TSK_ACTIVE_MM,                offsetof(struct task_struct, 
active_mm));
   BLANK();
   DEFINE(VMA_VM_MM,            offsetof(struct vm_area_struct, vm_mm));
diff -urN linux/arch/arm26/kernel/process.c linux/arch/arm26/kernel/process.c
--- linux/arch/arm26/kernel/process.c   2005/01/13 14:05:20     1.7
+++ linux/arch/arm26/kernel/process.c   2005/02/07 02:54:31     1.8
@@ -271,7 +271,7 @@
        memset(&tsk->thread.debug, 0, sizeof(struct debug_info));
        memset(&thread->fpstate, 0, sizeof(union fp_state));
 
-       current->used_math = 0;
+       clear_used_math();
 }
 
 void release_thread(struct task_struct *dead_task)
@@ -305,7 +305,7 @@
 int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
 {
        struct thread_info *thread = current_thread_info();
-       int used_math = current->used_math;
+       int used_math = !!used_math();
 
        if (used_math)
                memcpy(fp, &thread->fpstate.soft, sizeof (*fp));
diff -urN linux/arch/arm26/kernel/ptrace.c linux/arch/arm26/kernel/ptrace.c
--- linux/arch/arm26/kernel/ptrace.c    2004/10/25 20:44:12     1.3
+++ linux/arch/arm26/kernel/ptrace.c    2005/02/07 02:54:31     1.4
@@ -540,7 +540,7 @@
  */
 static int ptrace_setfpregs(struct task_struct *tsk, void *ufp)
 {
-       tsk->used_math = 1;
+       set_stopped_child_used_math(tsk);
        return copy_from_user(&tsk->thread_info->fpstate, ufp,
                              sizeof(struct user_fp)) ? -EFAULT : 0;
 }
diff -urN linux/arch/h8300/Makefile linux/arch/h8300/Makefile
--- linux/arch/h8300/Makefile   2004/06/06 02:12:35     1.6
+++ linux/arch/h8300/Makefile   2005/02/07 02:54:31     1.7
@@ -7,9 +7,6 @@
 #
 # (C) Copyright 2002,2003 Yoshinori Sato <ysato@users.sourceforge.jp>
 #
-ifndef include-config
--include $(TOPDIR)/.config
-endif
 
 platform-$(CONFIG_CPU_H8300H)  := h8300h
 platform-$(CONFIG_CPU_H8S)     := h8s
@@ -47,9 +44,11 @@
 head-y := arch/$(ARCH)/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
 
 core-y += arch/$(ARCH)/kernel/ \
-          arch/$(ARCH)/mm/ \
-          arch/$(ARCH)/platform/$(PLATFORM)/ \
+          arch/$(ARCH)/mm/
+ifdef PLATFORM
+core-y += arch/$(ARCH)/platform/$(PLATFORM)/ \
           arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/
+endif
 
 libs-y += arch/$(ARCH)/lib/ $(LIBGCC)
 
diff -urN linux/arch/i386/kernel/apic.c linux/arch/i386/kernel/apic.c
--- linux/arch/i386/kernel/apic.c       2005/01/13 14:05:24     1.59
+++ linux/arch/i386/kernel/apic.c       2005/02/07 02:54:31     1.60
@@ -518,8 +518,7 @@
  * disable it down before re-entering the BIOS on shutdown.
  * Otherwise the BIOS may get confused and not power-off.
  */
-void
-lapic_shutdown()
+void lapic_shutdown(void)
 {
        if (!cpu_has_apic || !enabled_via_apicbase)
                return;
@@ -1046,9 +1045,7 @@
 
 void __init setup_secondary_APIC_clock(void)
 {
-       local_irq_disable(); /* FIXME: Do we need this? --RR */
        setup_APIC_timer(calibration_result);
-       local_irq_enable();
 }
 
 void __init disable_APIC_timer(void)
diff -urN linux/arch/i386/kernel/entry.S linux/arch/i386/kernel/entry.S
--- linux/arch/i386/kernel/entry.S      2005/01/13 14:05:24     1.96
+++ linux/arch/i386/kernel/entry.S      2005/02/07 02:54:31     1.97
@@ -176,6 +176,7 @@
 
 #ifdef CONFIG_PREEMPT
 ENTRY(resume_kernel)
+       cli
        cmpl $0,TI_preempt_count(%ebp)  # non-zero preempt_count ?
        jnz restore_all
 need_resched:
@@ -184,10 +185,7 @@
        jz restore_all
        testl $IF_MASK,EFLAGS(%esp)     # interrupts off (exception path) ?
        jz restore_all
-       sti
-       call preempt_schedule
-       cli
-       movl $0,TI_preempt_count(%ebp)
+       call preempt_schedule_irq
        jmp need_resched
 #endif
 
diff -urN linux/arch/i386/kernel/i387.c linux/arch/i386/kernel/i387.c
--- linux/arch/i386/kernel/i387.c       2005/01/25 04:27:55     1.19
+++ linux/arch/i386/kernel/i387.c       2005/02/07 02:54:31     1.20
@@ -60,7 +60,8 @@
                tsk->thread.i387.fsave.twd = 0xffffffffu;
                tsk->thread.i387.fsave.fos = 0xffff0000u;
        }
-       tsk->used_math = 1;
+       /* only the device not available exception or ptrace can call init_fpu 
*/
+       set_stopped_child_used_math(tsk);
 }
 
 /*
@@ -331,13 +332,13 @@
 
 int save_i387( struct _fpstate __user *buf )
 {
-       if ( !current->used_math )
+       if ( !used_math() )
                return 0;
 
        /* This will cause a "finit" to be triggered by the next
         * attempted FPU operation by the 'current' process.
         */
-       current->used_math = 0;
+       clear_used_math();
 
        if ( HAVE_HWFP ) {
                if ( cpu_has_fxsr ) {
@@ -383,7 +384,7 @@
        } else {
                err = restore_i387_soft( &current->thread.i387.soft, buf );
        }
-       current->used_math = 1;
+       set_used_math();
        return err;
 }
 
@@ -507,7 +508,7 @@
        int fpvalid;
        struct task_struct *tsk = current;
 
-       fpvalid = tsk->used_math;
+       fpvalid = !!used_math();
        if ( fpvalid ) {
                unlazy_fpu( tsk );
                if ( cpu_has_fxsr ) {
@@ -522,7 +523,7 @@
 
 int dump_task_fpu(struct task_struct *tsk, struct user_i387_struct *fpu)
 {
-       int fpvalid = tsk->used_math;
+       int fpvalid = !!tsk_used_math(tsk);
 
        if (fpvalid) {
                if (tsk == current)
@@ -537,7 +538,7 @@
 
 int dump_task_extended_fpu(struct task_struct *tsk, struct user_fxsr_struct 
*fpu)
 {
-       int fpvalid = tsk->used_math && cpu_has_fxsr;
+       int fpvalid = tsk_used_math(tsk) && cpu_has_fxsr;
 
        if (fpvalid) {
                if (tsk == current)
diff -urN linux/arch/i386/kernel/pci-dma.c linux/arch/i386/kernel/pci-dma.c
--- linux/arch/i386/kernel/pci-dma.c    2004/09/19 12:30:03     1.9
+++ linux/arch/i386/kernel/pci-dma.c    2005/02/07 02:54:31     1.10
@@ -122,6 +122,7 @@
        if(!mem)
                return;
        dev->dma_mem = NULL;
+       iounmap(mem->virt_base);
        kfree(mem->bitmap);
        kfree(mem);
 }
diff -urN linux/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
--- linux/arch/i386/kernel/process.c    2005/01/13 14:05:24     1.94
+++ linux/arch/i386/kernel/process.c    2005/02/07 02:54:31     1.95
@@ -351,7 +351,7 @@
         * Forget coprocessor state..
         */
        clear_fpu(tsk);
-       tsk->used_math = 0;
+       clear_used_math();
 }
 
 void release_thread(struct task_struct *dead_task)
diff -urN linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
--- linux/arch/i386/kernel/ptrace.c     2005/01/13 14:05:24     1.47
+++ linux/arch/i386/kernel/ptrace.c     2005/02/07 02:54:31     1.48
@@ -592,7 +592,7 @@
                        break;
                }
                ret = 0;
-               if (!child->used_math)
+               if (!tsk_used_math(child))
                        init_fpu(child);
                get_fpregs((struct user_i387_struct __user *)data, child);
                break;
@@ -604,7 +604,7 @@
                        ret = -EIO;
                        break;
                }
-               child->used_math = 1;
+               set_stopped_child_used_math(child);
                set_fpregs(child, (struct user_i387_struct __user *)data);
                ret = 0;
                break;
@@ -616,7 +616,7 @@
                        ret = -EIO;
                        break;
                }
-               if (!child->used_math)
+               if (!tsk_used_math(child))
                        init_fpu(child);
                ret = get_fpxregs((struct user_fxsr_struct __user *)data, 
child);
                break;
@@ -628,7 +628,7 @@
                        ret = -EIO;
                        break;
                }
-               child->used_math = 1;
+               set_stopped_child_used_math(child);
                ret = set_fpxregs(child, (struct user_fxsr_struct __user 
*)data);
                break;
        }
diff -urN linux/arch/i386/kernel/reboot.c linux/arch/i386/kernel/reboot.c
--- linux/arch/i386/kernel/reboot.c     2004/12/04 18:15:58     1.11
+++ linux/arch/i386/kernel/reboot.c     2005/02/07 02:54:31     1.12
@@ -20,7 +20,7 @@
 void (*pm_power_off)(void);
 
 static int reboot_mode;
-int reboot_thru_bios;
+static int reboot_thru_bios;
 
 #ifdef CONFIG_SMP
 int reboot_smp = 0;
diff -urN linux/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- linux/arch/i386/kernel/setup.c      2005/01/13 14:05:24     1.106
+++ linux/arch/i386/kernel/setup.c      2005/02/07 02:54:31     1.107
@@ -675,6 +675,8 @@
        saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
 
        for (;;) {
+               if (c != ' ')
+                       goto next_char;
                /*
                 * "mem=nopentium" disables the 4MB page tables.
                 * "mem=XXX[kKmM]" defines a memory region from HIGH_MEM
@@ -685,7 +687,7 @@
                 * HPA tells me bootloaders need to parse mem=, so no new
                 * option should be mem=  [also see Documentation/i386/boot.txt]
                 */
-               if (c == ' ' && !memcmp(from, "mem=", 4)) {
+               if (!memcmp(from, "mem=", 4)) {
                        if (to != command_line)
                                to--;
                        if (!memcmp(from+4, "nopentium", 9)) {
@@ -707,7 +709,7 @@
                        }
                }
 
-               if (c == ' ' && !memcmp(from, "memmap=", 7)) {
+               else if (!memcmp(from, "memmap=", 7)) {
                        if (to != command_line)
                                to--;
                        if (!memcmp(from+7, "exactmap", 8)) {
@@ -819,7 +821,7 @@
                 * This works even on boxes that have no highmem otherwise.
                 * This also works to reduce highmem size on bigger boxes.
                 */
-               if (c == ' ' && !memcmp(from, "highmem=", 8))
+               else if (!memcmp(from, "highmem=", 8))
                        highmem_pages = memparse(from+8, &from) >> PAGE_SHIFT;
        
                /*
@@ -827,9 +829,10 @@
                 * bytes. This can be used to increase (or decrease) the
                 * vmalloc area - the default is 128m.
                 */
-               if (c == ' ' && !memcmp(from, "vmalloc=", 8))
+               else if (!memcmp(from, "vmalloc=", 8))
                        __VMALLOC_RESERVE = memparse(from+8, &from);
 
+       next_char:
                c = *(from++);
                if (!c)
                        break;
diff -urN linux/arch/i386/kernel/signal.c linux/arch/i386/kernel/signal.c
--- linux/arch/i386/kernel/signal.c     2005/01/25 04:27:55     1.58
+++ linux/arch/i386/kernel/signal.c     2005/02/07 02:54:31     1.59
@@ -192,9 +192,9 @@
                        err |= restore_i387(buf);
                } else {
                        struct task_struct *me = current;
-                       if (me->used_math) {
+                       if (used_math()) {
                                clear_fpu(me);
-                               me->used_math = 0;
+                               clear_used_math();
                        }
                }
        }
diff -urN linux/arch/i386/kernel/smpboot.c linux/arch/i386/kernel/smpboot.c
--- linux/arch/i386/kernel/smpboot.c    2005/01/25 04:27:55     1.65
+++ linux/arch/i386/kernel/smpboot.c    2005/02/07 02:54:31     1.66
@@ -383,8 +383,6 @@
        setup_local_APIC();
        map_cpu_to_logical_apicid();
 
-       local_irq_enable();
-
        /*
         * Get our bogomips.
         */
@@ -397,7 +395,7 @@
        smp_store_cpu_info(cpuid);
 
        disable_APIC_timer();
-       local_irq_disable();
+
        /*
         * Allow the master to continue.
         */
@@ -439,6 +437,10 @@
         */
        local_flush_tlb();
        cpu_set(smp_processor_id(), cpu_online_map);
+
+       /* We can take interrupts now: we're officially "up". */
+       local_irq_enable();
+
        wmb();
        cpu_idle();
 }
diff -urN linux/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c
--- linux/arch/i386/kernel/traps.c      2005/01/25 04:27:55     1.99
+++ linux/arch/i386/kernel/traps.c      2005/02/07 02:54:31     1.100
@@ -911,7 +911,7 @@
        struct task_struct *tsk = thread->task;
 
        clts();         /* Allow maths ops (or we recurse) */
-       if (!tsk->used_math)
+       if (!tsk_used_math(tsk))
                init_fpu(tsk);
        restore_fpu(tsk);
        thread->status |= TS_USEDFPU;   /* So we fnsave on switch_to() */
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/25 04:27:55     1.27
+++ linux/arch/i386/kernel/cpu/common.c 2005/02/07 02:54:31     1.28
@@ -629,6 +629,6 @@
         * Force FPU initialization:
         */
        current_thread_info()->status = 0;
-       current->used_math = 0;
+       clear_used_math();
        mxcsr_feature_mask_init();
 }
diff -urN linux/arch/i386/mach-visws/reboot.c 
linux/arch/i386/mach-visws/reboot.c
--- linux/arch/i386/mach-visws/reboot.c 2003/10/09 13:09:27     1.2
+++ linux/arch/i386/mach-visws/reboot.c 2005/02/07 02:54:31     1.3
@@ -8,9 +8,6 @@
 
 void (*pm_power_off)(void);
 
-int reboot_thru_bios;
-int reboot_smp;
-
 void machine_restart(char * __unused)
 {
 #ifdef CONFIG_SMP
diff -urN linux/arch/i386/mach-voyager/voyager_basic.c 
linux/arch/i386/mach-voyager/voyager_basic.c
--- linux/arch/i386/mach-voyager/voyager_basic.c        2004/11/15 11:49:16     
1.6
+++ linux/arch/i386/mach-voyager/voyager_basic.c        2005/02/07 02:54:31     
1.7
@@ -36,8 +36,6 @@
  */
 void (*pm_power_off)(void);
 
-int reboot_thru_bios;
-
 int voyager_level = 0;
 
 struct voyager_SUS *voyager_SUS = NULL;
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/25 04:27:56     1.20
+++ linux/arch/i386/mach-voyager/voyager_smp.c  2005/02/07 02:54:31     1.21
@@ -27,13 +27,10 @@
 #include <asm/mtrr.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
-#include <asm/desc.h>
 #include <asm/arch_hooks.h>
 
 #include <linux/irq.h>
 
-int reboot_smp = 0;
-
 /* TLB state -- visible externally, indexed physically */
 DEFINE_PER_CPU(struct tlb_state, cpu_tlbstate) ____cacheline_aligned = { 
&init_mm, 0 };
 
diff -urN linux/arch/i386/math-emu/fpu_entry.c 
linux/arch/i386/math-emu/fpu_entry.c
--- linux/arch/i386/math-emu/fpu_entry.c        2004/06/26 15:15:09     1.13
+++ linux/arch/i386/math-emu/fpu_entry.c        2005/02/07 02:54:32     1.14
@@ -155,10 +155,10 @@
   RE_ENTRANT_CHECK_ON;
 #endif /* RE_ENTRANT_CHECKING */
 
-  if (!current->used_math)
+  if (!used_math())
     {
       finit();
-      current->used_math = 1;
+      set_used_math();
     }
 
   SETUP_DATA_AREA(arg);
diff -urN linux/arch/i386/mm/ioremap.c linux/arch/i386/mm/ioremap.c
--- linux/arch/i386/mm/ioremap.c        2005/01/13 14:05:25     1.28
+++ linux/arch/i386/mm/ioremap.c        2005/02/07 02:54:32     1.29
@@ -238,8 +238,9 @@
        }
 
        if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) {
+               /* p->size includes the guard page, but cpa doesn't like that */
                change_page_attr(virt_to_page(__va(p->phys_addr)),
-                                p->size >> PAGE_SHIFT,
+                                (p->size - PAGE_SIZE) >> PAGE_SHIFT,
                                 PAGE_KERNEL);                           
                global_flush_tlb();
        } 
diff -urN linux/arch/i386/oprofile/init.c linux/arch/i386/oprofile/init.c
--- linux/arch/i386/oprofile/init.c     2005/01/13 14:05:25     1.9
+++ linux/arch/i386/oprofile/init.c     2005/02/07 02:54:32     1.10
@@ -21,7 +21,7 @@
 extern void x86_backtrace(struct pt_regs * const regs, unsigned int depth);
 
 
-void __init oprofile_arch_init(struct oprofile_operations * ops)
+int __init oprofile_arch_init(struct oprofile_operations * ops)
 {
        int ret;
 
@@ -35,6 +35,8 @@
                ret = nmi_timer_init(ops);
 #endif
        ops->backtrace = x86_backtrace;
+
+       return ret;
 }
 
 
diff -urN linux/arch/i386/oprofile/nmi_int.c linux/arch/i386/oprofile/nmi_int.c
--- linux/arch/i386/oprofile/nmi_int.c  2005/01/13 14:05:25     1.18
+++ linux/arch/i386/oprofile/nmi_int.c  2005/02/07 02:54:32     1.19
@@ -304,7 +304,7 @@
 {
        __u8 cpu_model = boot_cpu_data.x86_model;
 
-       if (cpu_model > 3)
+       if (cpu_model > 4)
                return 0;
 
 #ifndef CONFIG_SMP
diff -urN linux/arch/ia64/configs/tiger_defconfig 
linux/arch/ia64/configs/tiger_defconfig
--- linux/arch/ia64/configs/tiger_defconfig     2004/11/15 11:49:16     1.2
+++ linux/arch/ia64/configs/tiger_defconfig     2005/02/07 02:54:32     1.3
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1
-# Tue Nov  2 11:35:10 2004
+# Linux kernel version: 2.6.11-rc2
+# Sat Jan 22 11:17:02 2005
 #
 
 #
@@ -59,12 +59,14 @@
 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
 # CONFIG_IA64_GENERIC is not set
 CONFIG_IA64_DIG=y
 # CONFIG_IA64_HP_ZX1 is not set
+# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
 # CONFIG_IA64_SGI_SN2 is not set
 # CONFIG_IA64_HP_SIM is not set
 # CONFIG_ITANIUM is not set
@@ -76,6 +78,7 @@
 CONFIG_IA64_L1_CACHE_SHIFT=7
 # CONFIG_NUMA is not set
 CONFIG_VIRTUAL_MEM_MAP=y
+CONFIG_HOLES_IN_ZONE=y
 CONFIG_IA64_CYCLONE=y
 CONFIG_IOSAPIC=y
 CONFIG_FORCE_MAX_ZONEORDER=18
@@ -89,6 +92,7 @@
 CONFIG_IA64_MCA_RECOVERY=y
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
+CONFIG_ACPI_DEALLOCATE_IRQ=y
 
 #
 # Firmware Drivers
@@ -110,8 +114,10 @@
 CONFIG_ACPI_BOOT=y
 CONFIG_ACPI_INTERPRETER=y
 CONFIG_ACPI_BUTTON=m
+# CONFIG_ACPI_VIDEO is not set
 CONFIG_ACPI_FAN=m
 CONFIG_ACPI_PROCESSOR=m
+# CONFIG_ACPI_HOTPLUG_CPU is not set
 CONFIG_ACPI_THERMAL=m
 CONFIG_ACPI_BLACKLIST_YEAR=0
 # CONFIG_ACPI_DEBUG is not set
@@ -119,6 +125,7 @@
 CONFIG_ACPI_POWER=y
 CONFIG_ACPI_PCI=y
 CONFIG_ACPI_SYSTEM=y
+# CONFIG_ACPI_CONTAINER is not set
 
 #
 # Bus options (PCI, PCMCIA)
@@ -137,7 +144,6 @@
 CONFIG_HOTPLUG_PCI_ACPI=m
 # CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
 # CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_PCIE is not set
 # CONFIG_HOTPLUG_PCI_SHPC is not set
 
 #
@@ -174,6 +180,7 @@
 #
 # Plug and Play support
 #
+# CONFIG_PNP is not set
 
 #
 # Block devices
@@ -182,12 +189,14 @@
 # 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
 # CONFIG_BLK_DEV_SX8 is not set
 # CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=m
+CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
@@ -199,6 +208,7 @@
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -285,6 +295,7 @@
 #
 CONFIG_SCSI_SPI_ATTRS=y
 CONFIG_SCSI_FC_ATTRS=y
+# CONFIG_SCSI_ISCSI_ATTRS is not set
 
 #
 # SCSI low-level drivers
@@ -325,7 +336,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
@@ -342,6 +352,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
@@ -392,6 +403,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
 
@@ -471,7 +483,6 @@
 # CONFIG_FORCEDETH is not set
 # CONFIG_DGRS is not set
 CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
 CONFIG_E100=m
 # CONFIG_E100_NAPI is not set
 # CONFIG_FEALNX is not set
@@ -564,12 +575,13 @@
 # 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 is not set
 CONFIG_SERIO=y
 CONFIG_SERIO_I8042=y
 # 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
 
 #
@@ -598,6 +610,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
@@ -645,7 +659,7 @@
 #
 CONFIG_AGP=m
 CONFIG_AGP_I460=m
-CONFIG_DRM=y
+CONFIG_DRM=m
 CONFIG_DRM_TDFX=m
 CONFIG_DRM_R128=m
 CONFIG_DRM_RADEON=m
@@ -691,6 +705,7 @@
 #
 CONFIG_VGA_CONSOLE=y
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -722,6 +737,7 @@
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 CONFIG_USB_OHCI_HCD=m
 CONFIG_USB_UHCI_HCD=y
+# CONFIG_USB_SL811_HCD is not set
 
 #
 # USB Device Class drivers
@@ -729,6 +745,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=m
 # CONFIG_USB_STORAGE_DEBUG is not set
 # CONFIG_USB_STORAGE_RW_DETECT is not set
@@ -762,7 +782,6 @@
 #
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
 
 #
 # USB Multimedia devices
@@ -774,7 +793,7 @@
 #
 
 #
-# USB Network adaptors
+# USB Network Adapters
 #
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_KAWETH is not set
@@ -796,7 +815,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
@@ -805,6 +823,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
 # CONFIG_USB_TEST is not set
 
 #
@@ -817,6 +836,16 @@
 # CONFIG_USB_GADGET is not set
 
 #
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -927,7 +956,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
@@ -1002,6 +1031,8 @@
 # CONFIG_CRC_CCITT is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
 
 #
 # Profiling support
@@ -1019,6 +1050,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
 CONFIG_IA64_GRANULE_16MB=y
 # CONFIG_IA64_GRANULE_64MB is not set
 # CONFIG_IA64_PRINT_HAZARDS is not set
@@ -1055,7 +1087,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/ia32/binfmt_elf32.c 
linux/arch/ia64/ia32/binfmt_elf32.c
--- linux/arch/ia64/ia32/binfmt_elf32.c 2005/01/13 14:05:26     1.34
+++ linux/arch/ia64/ia32/binfmt_elf32.c 2005/02/07 02:54:32     1.35
@@ -103,7 +103,7 @@
                        if (insert_vm_struct(current->mm, vma)) {
                                kmem_cache_free(vm_area_cachep, vma);
                                up_write(&current->mm->mmap_sem);
-                               return;
+                               BUG();
                        }
                }
                up_write(&current->mm->mmap_sem);
@@ -130,7 +130,7 @@
                        if (insert_vm_struct(current->mm, vma)) {
                                kmem_cache_free(vm_area_cachep, vma);
                                up_write(&current->mm->mmap_sem);
-                               return;
+                               BUG();
                        }
                }
                up_write(&current->mm->mmap_sem);
@@ -153,7 +153,7 @@
                        if (insert_vm_struct(current->mm, vma)) {
                                kmem_cache_free(vm_area_cachep, vma);
                                up_write(&current->mm->mmap_sem);
-                               return;
+                               BUG();
                        }
                }
                up_write(&current->mm->mmap_sem);
diff -urN linux/arch/ia64/ia32/elfcore32.h linux/arch/ia64/ia32/elfcore32.h
--- linux/arch/ia64/ia32/elfcore32.h    2004/11/15 11:49:16     1.4
+++ linux/arch/ia64/ia32/elfcore32.h    2005/02/07 02:54:32     1.5
@@ -106,7 +106,7 @@
        struct ia32_user_i387_struct *fpstate = (void*)fpu;
        mm_segment_t old_fs;
 
-       if (!tsk->used_math)
+       if (!tsk_used_math(tsk))
                return 0;
        
        old_fs = get_fs();
@@ -124,7 +124,7 @@
        struct ia32_user_fxsr_struct *fpxstate = (void*) xfpu;
        mm_segment_t old_fs;
 
-       if (!tsk->used_math)
+       if (!tsk_used_math(tsk))
                return 0;
 
        old_fs = get_fs();
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/25 04:27:57     1.70
+++ linux/arch/ia64/ia32/sys_ia32.c     2005/02/07 02:54:32     1.71
@@ -1973,10 +1973,10 @@
        unsigned int    __unused[4];
 };
 
+#ifdef CONFIG_SYSCTL
 asmlinkage long
 sys32_sysctl (struct sysctl32 __user *args)
 {
-#ifdef CONFIG_SYSCTL
        struct sysctl32 a32;
        mm_segment_t old_fs = get_fs ();
        void __user *oldvalp, *newvalp;
@@ -2015,10 +2015,8 @@
                return -EFAULT;
 
        return ret;
-#else
-       return -ENOSYS;
-#endif
 }
+#endif
 
 asmlinkage long
 sys32_newuname (struct new_utsname __user *name)
@@ -2656,7 +2654,7 @@
        info.si_signo = 0;
        set_fs (KERNEL_DS);
        ret = sys_waitid(which, pid, (siginfo_t __user *) &info, options,
-                        uru ? &ru : NULL);
+                        uru ? (struct rusage __user *) &ru : NULL);
        set_fs (old_fs);
 
        if (ret < 0 || info.si_signo == 0)
diff -urN linux/arch/ia64/kernel/domain.c linux/arch/ia64/kernel/domain.c
--- linux/arch/ia64/kernel/domain.c     2005/01/13 14:05:26     1.3
+++ linux/arch/ia64/kernel/domain.c     2005/02/07 02:54:32     1.4
@@ -151,10 +151,9 @@
         * Set up domains. Isolated domains just stay on the dummy domain.
         */
        for_each_cpu_mask(i, cpu_default_map) {
-               int node = cpu_to_node(i);
                int group;
                struct sched_domain *sd = NULL, *p;
-               cpumask_t nodemask = node_to_cpumask(node);
+               cpumask_t nodemask = node_to_cpumask(cpu_to_node(i));
 
                cpus_and(nodemask, nodemask, cpu_default_map);
 
@@ -172,7 +171,7 @@
 
                sd = &per_cpu(node_domains, i);
                *sd = SD_NODE_INIT;
-               sd->span = sched_domain_node_span(node);
+               sd->span = sched_domain_node_span(cpu_to_node(i));
                sd->parent = p;
                cpus_and(sd->span, sd->span, cpu_default_map);
 #endif
diff -urN linux/arch/ia64/kernel/efi.c linux/arch/ia64/kernel/efi.c
--- linux/arch/ia64/kernel/efi.c        2005/01/25 04:27:57     1.38
+++ linux/arch/ia64/kernel/efi.c        2005/02/07 02:54:32     1.39
@@ -778,6 +778,7 @@
        }
        return 0;
 }
+EXPORT_SYMBOL(efi_mem_attributes);
 
 int
 valid_phys_addr_range (unsigned long phys_addr, unsigned long *size)
diff -urN linux/arch/ia64/kernel/entry.S linux/arch/ia64/kernel/entry.S
--- linux/arch/ia64/kernel/entry.S      2005/01/25 04:27:57     1.53
+++ linux/arch/ia64/kernel/entry.S      2005/02/07 02:54:32     1.54
@@ -3,7 +3,7 @@
  *
  * Kernel entry points.
  *
- * Copyright (C) 1998-2003 Hewlett-Packard Co
+ * Copyright (C) 1998-2003, 2005 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
  * Copyright (C) 1999, 2002-2003
  *     Asit Mallick <Asit.K.Mallick@intel.com>
@@ -51,8 +51,11 @@
         * setup a null register window frame.
         */
 ENTRY(ia64_execve)
-       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(3)
-       alloc loc1=ar.pfs,3,2,4,0
+       /*
+        * Allocate 8 input registers since ptrace() may clobber them
+        */
+       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
+       alloc loc1=ar.pfs,8,2,4,0
        mov loc0=rp
        .body
        mov out0=in0                    // filename
@@ -113,8 +116,11 @@
  *           u64 tls)
  */
 GLOBAL_ENTRY(sys_clone2)
-       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(6)
-       alloc r16=ar.pfs,6,2,6,0
+       /*
+        * Allocate 8 input registers since ptrace() may clobber them
+        */
+       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
+       alloc r16=ar.pfs,8,2,6,0
        DO_SAVE_SWITCH_STACK
        adds r2=PT(R16)+IA64_SWITCH_STACK_SIZE+16,sp
        mov loc0=rp
@@ -142,8 +148,11 @@
  *     Deprecated.  Use sys_clone2() instead.
  */
 GLOBAL_ENTRY(sys_clone)
-       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5)
-       alloc r16=ar.pfs,5,2,6,0
+       /*
+        * Allocate 8 input registers since ptrace() may clobber them
+        */
+       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
+       alloc r16=ar.pfs,8,2,6,0
        DO_SAVE_SWITCH_STACK
        adds r2=PT(R16)+IA64_SWITCH_STACK_SIZE+16,sp
        mov loc0=rp
@@ -633,10 +642,12 @@
  *              r13: restored (user-level thread pointer)
  *              r14: cleared
  *              r15: restored (syscall #)
- *          r16-r19: cleared
+ *          r16-r17: cleared
+ *              r18: user-level b6
+ *              r19: cleared
  *              r20: user-level ar.fpsr
  *              r21: user-level b0
- *              r22: user-level b6
+ *              r22: cleared
  *              r23: user-level ar.bspstore
  *              r24: user-level ar.rnat
  *              r25: user-level ar.unat
@@ -661,7 +672,7 @@
  *           ar.csd: cleared
  *           ar.ssd: cleared
  */
-GLOBAL_ENTRY(ia64_leave_syscall)
+ENTRY(ia64_leave_syscall)
        PT_REGS_UNWIND_INFO(0)
        /*
         * work.need_resched etc. mustn't get changed by this CPU before it 
returns to
@@ -690,79 +701,80 @@
 (pUStk)        cmp.eq.unc p6,p0=r0,r0          // p6 <- pUStk
 #endif
 .work_processed_syscall:
-       adds r16=PT(LOADRS)+16,r12
-       adds r17=PT(AR_BSPSTORE)+16,r12
+       adds r2=PT(LOADRS)+16,r12
+       adds r3=PT(AR_BSPSTORE)+16,r12
        adds r18=TI_FLAGS+IA64_TASK_SIZE,r13
        ;;
 (p6)   ld4 r31=[r18]                           // load 
current_thread_info()->flags
-       ld8 r19=[r16],PT(B6)-PT(LOADRS)         // load ar.rsc value for 
"loadrs"
-       nop.i 0
+       ld8 r19=[r2],PT(B6)-PT(LOADRS)          // load ar.rsc value for 
"loadrs"
+       mov b7=r0               // clear b7
        ;;
-       ld8 r23=[r17],PT(R9)-PT(AR_BSPSTORE)    // load ar.bspstore (may be 
garbage)
-       ld8 r22=[r16],PT(R8)-PT(B6)             // load b6
+       ld8 r23=[r3],PT(R9)-PT(AR_BSPSTORE)     // load ar.bspstore (may be 
garbage)
+       ld8 r18=[r2],PT(R8)-PT(B6)              // load b6
 (p6)   and r15=TIF_WORK_MASK,r31               // any work other than 
TIF_SYSCALL_TRACE?
        ;;
-
-       mov.m ar.ccv=r0         // clear ar.ccv
+       mov r16=ar.bsp                          // M2  get existing backing 
store pointer
 (p6)   cmp4.ne.unc p6,p0=r15, r0               // any special work pending?
 (p6)   br.cond.spnt .work_pending
        ;;
        // start restoring the state saved on the kernel stack (struct pt_regs):
-       ld8.fill r8=[r16],16
-       ld8.fill r9=[r17],16
+       ld8.fill r8=[r2],16
+       ld8.fill r9=[r3],16
        mov f6=f0               // clear f6
        ;;
-       ld8.fill r10=[r16],16
-       ld8.fill r11=[r17],16
+       invala                  // M0|1 invalidate ALAT
+       rsm psr.i | psr.ic      // M2 initiate turning off of interrupt and 
interruption collection
+       mov f9=f0               // clear f9
+
+       ld8.fill r10=[r2],16
+       ld8.fill r11=[r3],16
        mov f7=f0               // clear f7
        ;;
-       ld8 r29=[r16],16        // load cr.ipsr
-       ld8 r28=[r17],16        // load cr.iip
+       ld8 r29=[r2],16         // load cr.ipsr
+       ld8 r28=[r3],16                 // load cr.iip
        mov f8=f0               // clear f8
        ;;
-       ld8 r30=[r16],16        // load cr.ifs
-       ld8 r25=[r17],16        // load ar.unat
+       ld8 r30=[r2],16         // M0|1 load cr.ifs
+       mov.m ar.ssd=r0         // M2 clear ar.ssd
        cmp.eq p9,p0=r0,r0      // set p9 to indicate that we should restore 
cr.ifs
        ;;
-       rsm psr.i | psr.ic      // initiate turning off of interrupt and 
interruption collection
-       invala                  // invalidate ALAT
-       mov f9=f0               // clear f9
-
-       mov.m ar.ssd=r0         // clear ar.ssd
-       mov.m ar.csd=r0         // clear ar.csd
+       ld8 r25=[r3],16         // M0|1 load ar.unat
+       mov.m ar.csd=r0         // M2 clear ar.csd
+       mov r22=r0              // clear r22
+       ;;
+       ld8 r26=[r2],PT(B0)-PT(AR_PFS)  // M0|1 load ar.pfs
+(pKStk)        mov r22=psr             // M2 read PSR now that interrupts are 
disabled
        mov f10=f0              // clear f10
        ;;
-       ld8 r26=[r16],16        // load ar.pfs
-       ld8 r27=[r17],PT(PR)-PT(AR_RSC) // load ar.rsc
+       ld8 r21=[r2],PT(AR_RNAT)-PT(B0) // load b0
+       ld8 r27=[r3],PT(PR)-PT(AR_RSC)  // load ar.rsc
        mov f11=f0              // clear f11
        ;;
-       ld8 r24=[r16],PT(B0)-PT(AR_RNAT)        // load ar.rnat (may be garbage)
-       ld8 r31=[r17],PT(R1)-PT(PR)             // load predicates
+       ld8 r24=[r2],PT(AR_FPSR)-PT(AR_RNAT)    // load ar.rnat (may be garbage)
+       ld8 r31=[r3],PT(R1)-PT(PR)              // load predicates
 (pUStk) add r14=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13
        ;;
-       ld8 r21=[r16],PT(R12)-PT(B0) // load b0
-       ld8.fill r1=[r17],16    // load r1
-(pUStk) mov r3=1
-       ;;
-       ld8.fill r12=[r16],16
-       ld8.fill r13=[r17],16
-       mov r2=r0               // clear r2
+       ld8 r20=[r2],PT(R12)-PT(AR_FPSR)        // load ar.fpsr
+       ld8.fill r1=[r3],16     // load r1
+(pUStk) mov r17=1
        ;;
-       ld8 r20=[r16]           // load ar.fpsr
-       ld8.fill r15=[r17]      // load r15
-       mov b7=r0               // clear b7
+       srlz.d                  // M0  ensure interruption collection is off
+       ld8.fill r13=[r3],16
+       nop.i 0
        ;;
-(pUStk) st1 [r14]=r3
-       addl r17=THIS_CPU(ia64_phys_stacked_size_p8),r0
+       ld8.fill r12=[r2]       // restore r12 (sp)
+       ld8.fill r15=[r3]       // restore r15
+       addl r3=THIS_CPU(ia64_phys_stacked_size_p8),r0
+       ;;
+(pUStk)        ld4 r3=[r3]             // r3 = cpu_data->phys_stacked_size_p8
+(pUStk) st1 [r14]=r17
+       mov b6=r18              // I0  restore b6
        ;;
-       mov r16=ar.bsp          // get existing backing store pointer
-       srlz.i                  // ensure interruption collection is off
+       shr.u r18=r19,16        // I0|1 get byte size of existing "dirty" 
partition
        mov r14=r0              // clear r14
-       ;;
-       ld4 r17=[r17]           // r17 = cpu_data->phys_stacked_size_p8
-       mov b6=r22                              // restore b6
-       shr.u r18=r19,16        // get byte size of existing "dirty" partition
 (pKStk) br.cond.dpnt.many skip_rbs_switch
+
+       mov.m ar.ccv=r0         // clear ar.ccv
 (pNonSys) br.cond.dpnt.many dont_preserve_current_frame
        br.cond.sptk.many rbs_switch
 END(ia64_leave_syscall)
@@ -883,12 +895,16 @@
        srlz.i                  // ensure interruption collection is off
        mov ar.ccv=r15
        ;;
+       ldf.fill f11=[r2]
        bsw.0                   // switch back to bank 0 (no stop bit required 
beforehand...)
        ;;
-       ldf.fill f11=[r2]
-(pUStk)        mov r18=IA64_KR(CURRENT)        // Itanium 2: 12 cycle read 
latency
+(pUStk)        mov r18=IA64_KR(CURRENT)// M2 (12 cycle read latency)
        adds r16=PT(CR_IPSR)+16,r12
        adds r17=PT(CR_IIP)+16,r12
+
+(pKStk)        mov r22=psr             // M2 read PSR now that interrupts are 
disabled
+       nop.i 0
+       nop.i 0
        ;;
        ld8 r29=[r16],16        // load cr.ipsr
        ld8 r28=[r17],16        // load cr.iip
@@ -901,7 +917,7 @@
        cmp.eq p9,p0=r0,r0      // set p9 to indicate that we should restore 
cr.ifs
        ;;
        ld8 r24=[r16],16        // load ar.rnat (may be garbage)
-       ld8 r23=[r17],16// load ar.bspstore (may be garbage)
+       ld8 r23=[r17],16        // load ar.bspstore (may be garbage)
        ;;
        ld8 r31=[r16],16        // load predicates
        ld8 r21=[r17],16        // load b0
@@ -971,6 +987,7 @@
        shladd in0=loc1,3,r17
        mov in1=0
        ;;
+       .align 32
 rse_clear_invalid:
 #ifdef CONFIG_ITANIUM
        // cycle 0
@@ -1031,23 +1048,33 @@
        loadrs
        ;;
 skip_rbs_switch:
-(pLvSys)       mov r19=r0              // clear r19 for leave_syscall, no-op 
otherwise
-       mov b0=r21
-       mov ar.pfs=r26
-(pUStk)        mov ar.bspstore=r23
-(p9)   mov cr.ifs=r30
-(pLvSys)mov r16=r0             // clear r16 for leave_syscall, no-op otherwise
-       mov cr.ipsr=r29
-       mov ar.fpsr=r20
-(pLvSys)mov r17=r0             // clear r17 for leave_syscall, no-op otherwise
-       mov cr.iip=r28
-       ;;
-(pUStk)        mov ar.rnat=r24         // must happen with RSE in lazy mode
-(pLvSys)mov r18=r0             // clear r18 for leave_syscall, no-op otherwise
-       mov ar.rsc=r27
-       mov ar.unat=r25
-       mov pr=r31,-1
-       rfi
+       mov ar.unat=r25         // M2
+(pKStk)        extr.u r22=r22,21,1     // I0 extract current value of psr.pp 
from r22
+(pLvSys)mov r19=r0             // A  clear r19 for leave_syscall, no-op 
otherwise
+       ;;
+(pUStk)        mov ar.bspstore=r23     // M2
+(pKStk)        dep r29=r22,r29,21,1    // I0 update ipsr.pp with psr.pp
+(pLvSys)mov r16=r0             // A  clear r16 for leave_syscall, no-op 
otherwise
+       ;;
+       mov cr.ipsr=r29         // M2
+       mov ar.pfs=r26          // I0
+(pLvSys)mov r17=r0             // A  clear r17 for leave_syscall, no-op 
otherwise
+
+(p9)   mov cr.ifs=r30          // M2
+       mov b0=r21              // I0
+(pLvSys)mov r18=r0             // A  clear r18 for leave_syscall, no-op 
otherwise
+
+       mov ar.fpsr=r20         // M2
+       mov cr.iip=r28          // M2
+       nop 0
+       ;;
+(pUStk)        mov ar.rnat=r24         // M2 must happen with RSE in lazy mode
+       nop 0
+(pLvSys)mov r2=r0
+
+       mov ar.rsc=r27          // M2
+       mov pr=r31,-1           // I0
+       rfi                     // B
 
        /*
         * On entry:
@@ -1198,7 +1225,10 @@
 
 ENTRY(sys_rt_sigreturn)
        PT_REGS_UNWIND_INFO(0)
-       alloc r2=ar.pfs,0,0,1,0
+       /*
+        * Allocate 8 input registers since ptrace() may clobber them
+        */
+       alloc r2=ar.pfs,8,0,1,0
        .prologue
        PT_REGS_SAVES(16)
        adds sp=-16,sp
diff -urN linux/arch/ia64/kernel/entry.h linux/arch/ia64/kernel/entry.h
--- linux/arch/ia64/kernel/entry.h      2004/01/10 04:59:49     1.9
+++ linux/arch/ia64/kernel/entry.h      2005/02/07 02:54:32     1.10
@@ -1,14 +1,25 @@
 #include <linux/config.h>
 
 /*
- * Preserved registers that are shared between code in ivt.S and entry.S.  Be
- * careful not to step on these!
+ * Preserved registers that are shared between code in ivt.S and
+ * entry.S.  Be careful not to step on these!
  */
-#define pLvSys         p1      /* set 1 if leave from syscall; otherwise, set 
0 */
-#define pKStk          p2      /* will leave_{kernel,syscall} return to 
kernel-stacks? */
-#define pUStk          p3      /* will leave_{kernel,syscall} return to 
user-stacks? */
-#define pSys           p4      /* are we processing a (synchronous) system 
call? */
-#define pNonSys                p5      /* complement of pSys */
+#define PRED_LEAVE_SYSCALL     1 /* TRUE iff leave from syscall */
+#define PRED_KERNEL_STACK      2 /* returning to kernel-stacks? */
+#define PRED_USER_STACK                3 /* returning to user-stacks? */
+#define PRED_SYSCALL           4 /* inside a system call? */
+#define PRED_NON_SYSCALL       5 /* complement of PRED_SYSCALL */
+
+#ifdef __ASSEMBLY__
+# define PASTE2(x,y)   x##y
+# define PASTE(x,y)    PASTE2(x,y)
+
+# define pLvSys                PASTE(p,PRED_LEAVE_SYSCALL)
+# define pKStk         PASTE(p,PRED_KERNEL_STACK)
+# define pUStk         PASTE(p,PRED_USER_STACK)
+# define pSys          PASTE(p,PRED_SYSCALL)
+# define pNonSys       PASTE(p,PRED_NON_SYSCALL)
+#endif
 
 #define PT(f)          (IA64_PT_REGS_##f##_OFFSET)
 #define SW(f)          (IA64_SWITCH_STACK_##f##_OFFSET)
diff -urN linux/arch/ia64/kernel/fsys.S linux/arch/ia64/kernel/fsys.S
--- linux/arch/ia64/kernel/fsys.S       2004/11/15 11:49:17     1.17
+++ linux/arch/ia64/kernel/fsys.S       2005/02/07 02:54:32     1.18
@@ -612,8 +612,9 @@
        ;;
        mov rp=r2                               // set the real return addr
        tbit.z p8,p0=r3,TIF_SYSCALL_TRACE
-
-(p8)   br.call.sptk.many b6=b6                 // ignore this return addr
+       ;;
+(p10)  br.cond.spnt.many ia64_ret_from_syscall // p10==true means out 
registers are more than 8
+(p8)   br.call.sptk.many b6=b6         // ignore this return addr
        br.cond.sptk ia64_trace_syscall
 END(fsys_bubble_down)
 
diff -urN linux/arch/ia64/kernel/gate.S linux/arch/ia64/kernel/gate.S
--- linux/arch/ia64/kernel/gate.S       2004/06/16 12:09:35     1.22
+++ linux/arch/ia64/kernel/gate.S       2005/02/07 02:54:32     1.23
@@ -81,6 +81,7 @@
        LOAD_FSYSCALL_TABLE(r14)
 
        mov r16=IA64_KR(CURRENT)                // 12 cycle read latency
+       tnat.nz p10,p9=r15
        mov r19=NR_syscalls-1
        ;;
        shladd r18=r17,3,r14
@@ -119,7 +120,8 @@
 #endif
 
        mov r10=-1
-       mov r8=ENOSYS
+(p10)  mov r8=EINVAL
+(p9)   mov r8=ENOSYS
        FSYS_RETURN
 END(__kernel_syscall_via_epc)
 
diff -urN linux/arch/ia64/kernel/irq.c linux/arch/ia64/kernel/irq.c
--- linux/arch/ia64/kernel/irq.c        2005/01/25 04:27:57     1.50
+++ linux/arch/ia64/kernel/irq.c        2005/02/07 02:54:32     1.51
@@ -32,35 +32,7 @@
        printk(KERN_ERR "Unexpected irq vector 0x%x on CPU %u!\n", irq, 
smp_processor_id());
 }
 
-/*
- * 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)
-{
-       return __do_IRQ(irq, regs);
-}
-
-#ifdef CONFIG_SMP
-/*
- * This is updated when the user sets irq affinity via /proc
- */
-cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS];
-static unsigned long pending_irq_redir[BITS_TO_LONGS(NR_IRQS)];
-#endif
-
 #ifdef CONFIG_IA64_GENERIC
-irq_desc_t * __ia64_irq_desc (unsigned int irq)
-{
-       return irq_desc + irq;
-}
-
-ia64_vector __ia64_irq_to_vector (unsigned int irq)
-{
-       return (ia64_vector) irq;
-}
-
 unsigned int __ia64_local_vector_to_irq (ia64_vector vec)
 {
        return (unsigned int) vec;
@@ -113,27 +85,19 @@
                seq_putc(p, '\n');
 skip:
                spin_unlock_irqrestore(&irq_desc[i].lock, flags);
-       } else if (i == NR_IRQS) {
-#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_putc(p, '\n');
-#endif
+       } else if (i == NR_IRQS)
                seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
-#if defined(CONFIG_X86_IO_APIC)
-               seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
-#endif
-       }
        return 0;
 }
 
 #ifdef CONFIG_SMP
+/*
+ * This is updated when the user sets irq affinity via /proc
+ */
+cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS];
+static unsigned long pending_irq_redir[BITS_TO_LONGS(NR_IRQS)];
 
 static cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL };
-
 static char irq_redir [NR_IRQS]; // = { [0 ... NR_IRQS-1] = 1 };
 
 void set_irq_affinity_info (unsigned int irq, int hwid, int redir)
@@ -250,7 +214,7 @@
        for (irq=0; irq < NR_IRQS; irq++) {
                if (vectors_in_migration[irq]) {
                        vectors_in_migration[irq]=0;
-                       do_IRQ(irq, NULL);
+                       __do_IRQ(irq, NULL);
                }
        }
 
diff -urN linux/arch/ia64/kernel/irq_ia64.c linux/arch/ia64/kernel/irq_ia64.c
--- linux/arch/ia64/kernel/irq_ia64.c   2005/01/13 14:05:26     1.25
+++ linux/arch/ia64/kernel/irq_ia64.c   2005/02/07 02:54:32     1.26
@@ -90,8 +90,6 @@
                printk(KERN_WARNING "%s: double free!\n", __FUNCTION__);
 }
 
-extern unsigned int do_IRQ(unsigned long irq, struct pt_regs *regs);
-
 #ifdef CONFIG_SMP
 #      define IS_RESCHEDULE(vec)       (vec == IA64_IPI_RESCHEDULE)
 #else
@@ -150,7 +148,7 @@
                        ia64_setreg(_IA64_REG_CR_TPR, vector);
                        ia64_srlz_d();
 
-                       do_IRQ(local_vector_to_irq(vector), regs);
+                       __do_IRQ(local_vector_to_irq(vector), regs);
 
                        /*
                         * Disable interrupts and send EOI:
@@ -201,7 +199,7 @@
                         * Probably could shared code.
                         */
                        vectors_in_migration[local_vector_to_irq(vector)]=0;
-                       do_IRQ(local_vector_to_irq(vector), NULL);
+                       __do_IRQ(local_vector_to_irq(vector), NULL);
 
                        /*
                         * Disable interrupts and send EOI
diff -urN linux/arch/ia64/kernel/ivt.S linux/arch/ia64/kernel/ivt.S
--- linux/arch/ia64/kernel/ivt.S        2004/12/04 18:15:59     1.24
+++ linux/arch/ia64/kernel/ivt.S        2005/02/07 02:54:32     1.25
@@ -51,6 +51,7 @@
 #include <asm/system.h>
 #include <asm/thread_info.h>
 #include <asm/unistd.h>
+#include <asm/errno.h>
 
 #if 1
 # define PSR_DEFAULT_BITS      psr.ac
@@ -732,10 +733,12 @@
        ssm psr.ic | PSR_DEFAULT_BITS
        ;;
        srlz.i                                  // guarantee that interruption 
collection is on
+       mov r3=NR_syscalls - 1
        ;;
 (p15)  ssm psr.i                               // restore psr.i
+       // p10==true means out registers are more than 8 or r15's Nat is true
+(p10)  br.cond.spnt.many ia64_ret_from_syscall
        ;;
-       mov r3=NR_syscalls - 1
        movl r16=sys_call_table
 
        adds r15=-1024,r15                      // r15 contains the syscall 
number---subtract 1024
@@ -836,8 +839,11 @@
         * On exit:
         *      - executing on bank 1 registers
         *      - psr.ic enabled, interrupts restored
+        *      -  p10: TRUE if syscall is invoked with more than 8 out
+        *              registers or r15's Nat is true
         *      -  r1: kernel's gp
         *      -  r3: preserved (same as on entry)
+        *      -  r8: -EINVAL if p10 is true
         *      - r12: points to kernel stack
         *      - r13: points to current task
         *      - p15: TRUE if interrupts need to be re-enabled
@@ -871,12 +877,17 @@
        ;;
 
        st8 [r16]=r19,PT(AR_RNAT)-PT(CR_IFS)    // store ar.pfs.pfm in cr.ifs
+       extr.u r11=r19,7,7      // I0           // get sol of ar.pfs
+       and r8=0x7f,r19         // A            // get sof of ar.pfs
+
        st8 [r17]=r27,PT(AR_BSPSTORE)-PT(AR_RSC)// save ar.rsc
+       tbit.nz p15,p0=r29,IA64_PSR_I_BIT // I0
 (p9)   mov in1=-1
+       ;;
 
 (pUStk) sub r18=r18,r22                                // r18=RSE.ndirty*8
-       tbit.nz p15,p0=r29,IA64_PSR_I_BIT
        tnat.nz p10,p0=in2
+       add r11=8,r11
        ;;
 (pKStk) adds r16=PT(PR)-PT(AR_RNAT),r16                // skip over ar_rnat 
field
 (pKStk) adds r17=PT(B0)-PT(AR_BSPSTORE),r17    // skip over ar_bspstore field
@@ -904,25 +915,29 @@
 (p13)  mov in5=-1
        ;;
        st8 [r16]=r21,PT(R8)-PT(AR_FPSR)        // save ar.fpsr
-       st8.spill [r17]=r15                     // save r15
        tnat.nz p14,p0=in6
+       cmp.lt p10,p9=r11,r8    // frame size can't be more than local+8
        ;;
        stf8 [r16]=f1           // ensure pt_regs.r8 != 0 (see 
handle_syscall_error)
+(p9)   tnat.nz p10,p0=r15
        adds r12=-16,r1         // switch to kernel memory stack (with 16 bytes 
of scratch)
+
+       st8.spill [r17]=r15                     // save r15
        tnat.nz p8,p0=in7
+       nop.i 0
 
        mov r13=r2                              // establish `current'
        movl r1=__gp                            // establish kernel global 
pointer
        ;;
 (p14)  mov in6=-1
 (p8)   mov in7=-1
-       tnat.nz p9,p0=r15
+       nop.i 0
 
        cmp.eq pSys,pNonSys=r0,r0               // set pSys=1, pNonSys=0
        movl r17=FPSR_DEFAULT
        ;;
        mov.m ar.fpsr=r17                       // set ar.fpsr to kernel 
default value
-(p9)   mov r15=-1
+(p10)  mov r8=-EINVAL
        br.ret.sptk.many b7
 END(ia64_syscall_setup)
 
diff -urN linux/arch/ia64/kernel/mca.c linux/arch/ia64/kernel/mca.c
--- linux/arch/ia64/kernel/mca.c        2005/01/25 04:27:57     1.40
+++ linux/arch/ia64/kernel/mca.c        2005/02/07 02:54:32     1.41
@@ -882,8 +882,6 @@
                        &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;
diff -urN linux/arch/ia64/kernel/mca_drv.c linux/arch/ia64/kernel/mca_drv.c
--- linux/arch/ia64/kernel/mca_drv.c    2005/01/25 04:27:57     1.2
+++ linux/arch/ia64/kernel/mca_drv.c    2005/02/07 02:54:32     1.3
@@ -52,7 +52,7 @@
        MCA_IS_GLOBAL = 1
 } mca_type_t;
 
-#define MAX_PAGE_ISOLATE 32
+#define MAX_PAGE_ISOLATE 1024
 
 static struct page *page_isolate[MAX_PAGE_ISOLATE];
 static int num_page_isolate = 0;
diff -urN linux/arch/ia64/kernel/process.c linux/arch/ia64/kernel/process.c
--- linux/arch/ia64/kernel/process.c    2005/01/13 14:05:26     1.45
+++ linux/arch/ia64/kernel/process.c    2005/02/07 02:54:32     1.46
@@ -40,6 +40,8 @@
 #include <asm/unwind.h>
 #include <asm/user.h>
 
+#include "entry.h"
+
 #ifdef CONFIG_PERFMON
 # include <asm/perfmon.h>
 #endif
@@ -630,7 +632,7 @@
        return 1;       /* f0-f31 are always valid so we always return 1 */
 }
 
-asmlinkage long
+long
 sys_execve (char __user *filename, char __user * __user *argv, char __user * 
__user *envp,
            struct pt_regs *regs)
 {
@@ -667,7 +669,7 @@
        regs.pt.cr_ifs = 1UL << 63;             /* mark as valid, empty frame */
        regs.sw.ar_fpsr = regs.pt.ar_fpsr = ia64_getreg(_IA64_REG_AR_FPSR);
        regs.sw.ar_bspstore = (unsigned long) current + IA64_RBS_OFFSET;
-
+       regs.sw.pr = (1 << PRED_KERNEL_STACK);
        return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs.pt, 0, NULL, 
NULL);
 }
 EXPORT_SYMBOL(kernel_thread);
diff -urN linux/arch/ia64/kernel/ptrace.c linux/arch/ia64/kernel/ptrace.c
--- linux/arch/ia64/kernel/ptrace.c     2004/12/04 18:15:59     1.32
+++ linux/arch/ia64/kernel/ptrace.c     2005/02/07 02:54:32     1.33
@@ -31,9 +31,6 @@
 
 #include "entry.h"
 
-#define p4     (1UL << 4)      /* for pSys (see entry.h) */
-#define p5     (1UL << 5)      /* for pNonSys (see entry.h) */
-
 /*
  * Bits in the PSR that we allow ptrace() to change:
  *     be, up, ac, mfl, mfh (the user mask; five bits total)
@@ -669,8 +666,8 @@
        }
 
        unw_get_pr(&prev_info, &pr);
-       pr &= ~pSys;
-       pr |= pNonSys;
+       pr &= ~(1UL << PRED_SYSCALL);
+       pr |=  (1UL << PRED_NON_SYSCALL);
        unw_set_pr(&prev_info, pr);
 
        pt->cr_ifs = (1UL << 63) | cfm;
diff -urN linux/arch/ia64/kernel/smpboot.c linux/arch/ia64/kernel/smpboot.c
--- linux/arch/ia64/kernel/smpboot.c    2005/01/25 04:27:57     1.37
+++ linux/arch/ia64/kernel/smpboot.c    2005/02/07 02:54:32     1.38
@@ -612,8 +612,7 @@
                         */
                        return;
                }
-               current->state = TASK_UNINTERRUPTIBLE;
-               schedule_timeout(HZ/10);
+               msleep(100);
        }
        printk(KERN_ERR "CPU %u didn't die...\n", cpu);
 }
diff -urN linux/arch/ia64/kernel/unwind.c linux/arch/ia64/kernel/unwind.c
--- linux/arch/ia64/kernel/unwind.c     2005/01/13 14:05:26     1.31
+++ linux/arch/ia64/kernel/unwind.c     2005/02/07 02:54:32     1.32
@@ -47,8 +47,6 @@
 #include "entry.h"
 #include "unwind_i.h"
 
-#define p5             5
-
 #define UNW_LOG_CACHE_SIZE     7       /* each unw_script is ~256 bytes in 
size */
 #define UNW_CACHE_SIZE         (1 << UNW_LOG_CACHE_SIZE)
 
@@ -1899,7 +1897,7 @@
        num_regs = 0;
        if ((info->flags & UNW_FLAG_INTERRUPT_FRAME)) {
                info->pt = info->sp + 16;
-               if ((pr & (1UL << pNonSys)) != 0)
+               if ((pr & (1UL << PRED_NON_SYSCALL)) != 0)
                        num_regs = *info->cfm_loc & 0x7f;               /* size 
of frame */
                info->pfs_loc =
                        (unsigned long *) (info->pt + offsetof(struct pt_regs, 
ar_pfs));
@@ -1945,7 +1943,7 @@
 int
 unw_unwind_to_user (struct unw_frame_info *info)
 {
-       unsigned long ip;
+       unsigned long ip, sp;
 
        while (unw_unwind(info) >= 0) {
                if (unw_get_rp(info, &ip) < 0) {
@@ -1954,6 +1952,9 @@
                                   __FUNCTION__, ip);
                        return -1;
                }
+               unw_get_sp(info, &sp);
+               if (sp >= (unsigned long)info->task + IA64_STK_OFFSET)
+                       break;
                if (ip < FIXADDR_USER_END)
                        return 0;
        }
diff -urN linux/arch/ia64/lib/bitop.c linux/arch/ia64/lib/bitop.c
--- linux/arch/ia64/lib/bitop.c 2004/10/25 20:44:14     1.2
+++ linux/arch/ia64/lib/bitop.c 2005/02/07 02:54:32     1.3
@@ -8,7 +8,7 @@
  * Find next zero bit in a bitmap reasonably efficiently..
  */
 
-int __find_next_zero_bit (void *addr, unsigned long size, unsigned long offset)
+int __find_next_zero_bit (const void *addr, unsigned long size, unsigned long 
offset)
 {
        unsigned long *p = ((unsigned long *) addr) + (offset >> 6);
        unsigned long result = offset & ~63UL;
diff -urN linux/arch/ia64/lib/memcpy.S linux/arch/ia64/lib/memcpy.S
--- linux/arch/ia64/lib/memcpy.S        2002/10/31 16:35:48     1.6
+++ linux/arch/ia64/lib/memcpy.S        2005/02/07 02:54:32     1.7
@@ -15,22 +15,6 @@
  */
 #include <asm/asmmacro.h>
 
-GLOBAL_ENTRY(bcopy)
-       .regstk 3,0,0,0
-       mov r8=in0
-       mov in0=in1
-       ;;
-       mov in1=r8
-       // gas doesn't handle control flow across procedures, so it doesn't
-       // realize that a stop bit is needed before the "alloc" instruction
-       // below
-{
-       nop.m 0
-       nop.f 0
-       nop.i 0
-}      ;;
-END(bcopy)
-       // FALL THROUGH
 GLOBAL_ENTRY(memcpy)
 
 #      define MEM_LAT  21              /* latency to memory */
diff -urN linux/arch/ia64/lib/memcpy_mck.S linux/arch/ia64/lib/memcpy_mck.S
--- linux/arch/ia64/lib/memcpy_mck.S    2004/02/05 02:39:53     1.4
+++ linux/arch/ia64/lib/memcpy_mck.S    2005/02/07 02:54:32     1.5
@@ -17,15 +17,6 @@
 
 #define EK(y...) EX(y)
 
-GLOBAL_ENTRY(bcopy)
-       .regstk 3,0,0,0
-       mov r8=in0
-       mov in0=in1
-       ;;
-       mov in1=r8
-       ;;
-END(bcopy)
-
 /* McKinley specific optimization */
 
 #define retval         r8
diff -urN linux/arch/ia64/mm/contig.c linux/arch/ia64/mm/contig.c
--- linux/arch/ia64/mm/contig.c 2005/01/25 04:27:57     1.9
+++ linux/arch/ia64/mm/contig.c 2005/02/07 02:54:32     1.10
@@ -195,7 +195,7 @@
                        __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;
+                       __per_cpu_mca[cpu] = (unsigned long)__pa(mca_data);
                        mca_data += PERCPU_MCA_SIZE;
                }
        }
diff -urN linux/arch/ia64/oprofile/init.c linux/arch/ia64/oprofile/init.c
--- linux/arch/ia64/oprofile/init.c     2005/01/13 14:05:26     1.3
+++ linux/arch/ia64/oprofile/init.c     2005/02/07 02:54:33     1.4
@@ -16,13 +16,17 @@
 extern void perfmon_exit(void);
 extern void ia64_backtrace(struct pt_regs * const regs, unsigned int depth);
 
-void __init oprofile_arch_init(struct oprofile_operations * ops)
+int __init oprofile_arch_init(struct oprofile_operations * ops)
 {
+       int ret = -ENODEV;
+
 #ifdef CONFIG_PERFMON
        /* perfmon_init() can fail, but we have no way to report it */
-       perfmon_init(ops);
+       ret = perfmon_init(ops);
 #endif
        ops->backtrace = ia64_backtrace;
+
+       return ret;
 }
 
 
diff -urN linux/arch/ia64/pci/pci.c linux/arch/ia64/pci/pci.c
--- linux/arch/ia64/pci/pci.c   2005/01/25 04:27:58     1.27
+++ linux/arch/ia64/pci/pci.c   2005/02/07 02:54:33     1.28
@@ -539,7 +539,8 @@
         */
        vma->vm_flags |= (VM_SHM | VM_RESERVED | VM_IO);
 
-       if (write_combine)
+       if (write_combine && efi_range_is_wc(vma->vm_start,
+                                            vma->vm_end - vma->vm_start))
                vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
        else
                vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
diff -urN linux/arch/ia64/sn/include/shub.h linux/arch/ia64/sn/include/shub.h
--- linux/arch/ia64/sn/include/Attic/shub.h     Mon Feb  7 02:54:33 2005        
1.1
+++ linux/arch/ia64/sn/include/Attic/shub.h     1970/01/01 00:00:002002
@@ -1,39 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (c) 2001-2004 Silicon Graphics, Inc.  All rights reserved.
- */
-
-#ifndef _ASM_IA64_SN_SHUB_H
-#define _ASM_IA64_SN_SHUB_H
-
-
-#define MD_MEM_BANKS            4
-
-
-/*
- * Junk Bus Address Space
- *   The junk bus is used to access the PROM, LED's, and UART. It's 
- *   accessed through the local block MMR space. The data path is
- *   16 bits wide. This space requires address bits 31-27 to be set, and
- *   is further divided by address bits 26:15.
- *   The LED addresses are write-only. To read the LEDs, you need to use
- *   SH_JUNK_BUS_LED0-3, defined in shub_mmr.h
- *             
- */
-#define SH_REAL_JUNK_BUS_LED0           0x7fed00000UL
-#define SH_REAL_JUNK_BUS_LED1           0x7fed10000UL
-#define SH_REAL_JUNK_BUS_LED2           0x7fed20000UL
-#define SH_REAL_JUNK_BUS_LED3           0x7fed30000UL
-#define SH_JUNK_BUS_UART0               0x7fed40000UL
-#define SH_JUNK_BUS_UART1               0x7fed40008UL
-#define SH_JUNK_BUS_UART2               0x7fed40010UL
-#define SH_JUNK_BUS_UART3               0x7fed40018UL
-#define SH_JUNK_BUS_UART4               0x7fed40020UL
-#define SH_JUNK_BUS_UART5               0x7fed40028UL
-#define SH_JUNK_BUS_UART6               0x7fed40030UL
-#define SH_JUNK_BUS_UART7               0x7fed40038UL
-
-#endif /* _ASM_IA64_SN_SHUB_H */
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       2005/01/25 04:27:58     1.2
+++ linux/arch/ia64/sn/kernel/bte_error.c       2005/02/07 02:54:33     1.3
@@ -15,6 +15,7 @@
 #include "xtalk/xwidgetdev.h"
 #include "xtalk/hubdev.h"
 #include <asm/sn/bte.h>
+#include <asm/param.h>
 
 /*
  * Bte error handling is done in two parts.  The first captures
diff -urN linux/arch/ia64/sn/kernel/irq.c linux/arch/ia64/sn/kernel/irq.c
--- linux/arch/ia64/sn/kernel/irq.c     2005/01/25 04:27:58     1.19
+++ linux/arch/ia64/sn/kernel/irq.c     2005/02/07 02:54:33     1.20
@@ -183,7 +183,9 @@
 
                        sn_irq_info = sn_irq_info->irq_next;
 
+#ifdef CONFIG_SMP
                        set_irq_affinity_info((irq & 0xff), cpuphys, 0);
+#endif
                } else {
                        break;  /* snp_affinity failed the intr_alloc */
                }
@@ -202,16 +204,6 @@
        sn_set_affinity_irq
 };
 
-struct irq_desc *sn_irq_desc(unsigned int irq)
-{
-       return (irq_desc + irq);
-}
-
-u8 sn_irq_to_vector(unsigned int irq)
-{
-       return irq;
-}
-
 unsigned int sn_local_vector_to_irq(u8 vector)
 {
        return (CPU_VECTOR_TO_IRQ(smp_processor_id(), vector));
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/25 04:27:58     1.29
+++ linux/arch/ia64/sn/kernel/setup.c   2005/02/07 02:54:33     1.30
@@ -163,13 +163,12 @@
 
 void __init early_sn_setup(void)
 {
-       void ia64_sal_handler_init(void *entry_point, void *gpval);
        efi_system_table_t *efi_systab;
        efi_config_table_t *config_tables;
        struct ia64_sal_systab *sal_systab;
        struct ia64_sal_desc_entry_point *ep;
        char *p;
-       int i;
+       int i, j;
 
        /*
         * Parse enough of the SAL tables to locate the SAL entry point. Since, 
console
@@ -185,19 +184,21 @@
                    0) {
                        sal_systab = __va(config_tables[i].table);
                        p = (char *)(sal_systab + 1);
-                       for (i = 0; i < sal_systab->entry_count; i++) {
+                       for (j = 0; j < sal_systab->entry_count; j++) {
                                if (*p == SAL_DESC_ENTRY_POINT) {
                                        ep = (struct ia64_sal_desc_entry_point
                                              *)p;
                                        ia64_sal_handler_init(__va
                                                              (ep->sal_proc),
                                                              __va(ep->gp));
-                                       break;
+                                       return;
                                }
                                p += SAL_DESC_SIZE(*p);
                        }
                }
        }
+       /* Uh-oh, SAL not available?? */
+       printk(KERN_ERR "failed to find SAL entry point\n");
 }
 
 extern int platform_intr_list[];
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/25 04:27:58     1.5
+++ linux/arch/ia64/sn/kernel/sn2/sn_hwperf.c   2005/02/07 02:54:33     1.6
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 2004 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (C) 2004-2005 Silicon Graphics, Inc. All rights reserved.
  *
  * SGI Altix topology and hardware performance monitoring API.
  * Mark Goodwin <markgw@sgi.com>. 
@@ -374,6 +374,42 @@
        return r;
 }
 
+/* map SAL hwperf error code to system error code */
+static int sn_hwperf_map_err(int hwperf_err)
+{
+       int e;
+
+       switch(hwperf_err) {
+       case SN_HWPERF_OP_OK:
+               e = 0;
+               break;
+
+       case SN_HWPERF_OP_NOMEM:
+               e = -ENOMEM;
+               break;
+
+       case SN_HWPERF_OP_NO_PERM:
+               e = -EPERM;
+               break;
+
+       case SN_HWPERF_OP_IO_ERROR:
+               e = -EIO;
+               break;
+
+       case SN_HWPERF_OP_BUSY:
+       case SN_HWPERF_OP_RECONFIGURE:
+               e = -EAGAIN;
+               break;
+
+       case SN_HWPERF_OP_INVAL:
+       default:
+               e = -EINVAL;
+               break;
+       }
+
+       return e;
+}
+
 /*
  * ioctl for "sn_hwperf" misc device
  */
@@ -511,12 +547,20 @@
                op_info.v0 = &v0;
                op_info.op = op;
                r = sn_hwperf_op_cpu(&op_info);
+               if (r) {
+                       r = sn_hwperf_map_err(r);
+                       goto error;
+               }
                break;
 
        default:
                /* all other ops are a direct SAL call */
                r = ia64_sn_hwperf_op(sn_hwperf_master_nasid, op,
                              a.arg, a.sz, (u64) p, 0, 0, &v0);
+               if (r) {
+                       r = sn_hwperf_map_err(r);
+                       goto error;
+               }
                a.v0 = v0;
                break;
        }
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    2005/01/25 04:27:58     1.2
+++ linux/arch/ia64/sn/pci/pci_dma.c    2005/02/07 02:54:33     1.3
@@ -3,52 +3,85 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 2000,2002-2004 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (C) 2000,2002-2005 Silicon Graphics, Inc. All rights reserved.
  *
- * Routines for PCI DMA mapping.  See Documentation/DMA-mapping.txt for
+ * Routines for PCI DMA mapping.  See Documentation/DMA-API.txt for
  * a description of how these routines should be used.
  */
 
 #include <linux/module.h>
+#include <asm/dma.h>
 #include <asm/sn/sn_sal.h>
 #include "pci/pcibus_provider_defs.h"
 #include "pci/pcidev.h"
 #include "pci/pcibr_provider.h"
 
-void sn_pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents,
-                    int direction);
+#define SG_ENT_VIRT_ADDRESS(sg)        (page_address((sg)->page) + 
(sg)->offset)
+#define SG_ENT_PHYS_ADDRESS(SG)        virt_to_phys(SG_ENT_VIRT_ADDRESS(SG))
 
 /**
- * sn_pci_alloc_consistent - allocate memory for coherent DMA
- * @hwdev: device to allocate for
+ * sn_dma_supported - test a DMA mask
+ * @dev: device to test
+ * @mask: DMA mask to test
+ *
+ * Return whether the given PCI device DMA address mask can be supported
+ * properly.  For example, if your device can only drive the low 24-bits
+ * during PCI bus mastering, then you would pass 0x00ffffff as the mask to
+ * this function.  Of course, SN only supports devices that have 32 or more
+ * address bits when using the PMU.
+ */
+int sn_dma_supported(struct device *dev, u64 mask)
+{
+       BUG_ON(dev->bus != &pci_bus_type);
+
+       if (mask < 0x7fffffff)
+               return 0;
+       return 1;
+}
+EXPORT_SYMBOL(sn_dma_supported);
+
+/**
+ * sn_dma_set_mask - set the DMA mask
+ * @dev: device to set
+ * @dma_mask: new mask
+ *
+ * Set @dev's DMA mask if the hw supports it.
+ */
+int sn_dma_set_mask(struct device *dev, u64 dma_mask)
+{
+       BUG_ON(dev->bus != &pci_bus_type);
+
+       if (!sn_dma_supported(dev, dma_mask))
+               return 0;
+
+       *dev->dma_mask = dma_mask;
+       return 1;
+}
+EXPORT_SYMBOL(sn_dma_set_mask);
+
+/**
+ * sn_dma_alloc_coherent - allocate memory for coherent DMA
+ * @dev: device to allocate for
  * @size: size of the region
  * @dma_handle: DMA (bus) address
+ * @flags: memory allocation flags
  *
- * pci_alloc_consistent() returns a pointer to a memory region suitable for
+ * dma_alloc_coherent() returns a pointer to a memory region suitable for
  * coherent DMA traffic to/from a PCI device.  On SN platforms, this means
  * that @dma_handle will have the %PCIIO_DMA_CMD flag set.
  *
  * This interface is usually used for "command" streams (e.g. the command
- * queue for a SCSI controller).  See Documentation/DMA-mapping.txt for
+ * queue for a SCSI controller).  See Documentation/DMA-API.txt for
  * more information.
- *
- * Also known as platform_pci_alloc_consistent() by the IA64 machvec code.
  */
-void *sn_pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
-                             dma_addr_t * dma_handle)
+void *sn_dma_alloc_coherent(struct device *dev, size_t size,
+                           dma_addr_t * dma_handle, int flags)
 {
        void *cpuaddr;
        unsigned long phys_addr;
-       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(hwdev);
-       struct pcibus_bussoft *bussoft = SN_PCIDEV_BUSSOFT(hwdev);
+       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(to_pci_dev(dev));
 
-       if (bussoft == NULL) {
-               return NULL;
-       }
-
-       if (! IS_PCI_BRIDGE_ASIC(bussoft->bs_asic_type)) {
-               return NULL;            /* unsupported asic type */
-       }
+       BUG_ON(dev->bus != &pci_bus_type);
 
        /*
         * Allocate the memory.
@@ -66,151 +99,52 @@
        /*
         * 64 bit address translations should never fail.
         * 32 bit translations can fail if there are insufficient mapping
-        *   resources.
+        * resources.
         */
 
-       *dma_handle = pcibr_dma_map(pcidev_info, phys_addr, size, 
SN_PCIDMA_CONSISTENT);
+       *dma_handle = pcibr_dma_map(pcidev_info, phys_addr, size,
+                                   SN_PCIDMA_CONSISTENT);
        if (!*dma_handle) {
-               printk(KERN_ERR
-                      "sn_pci_alloc_consistent():  failed  *dma_handle = 0x%lx 
hwdev->dev.coherent_dma_mask = 0x%lx \n",
-                      *dma_handle, hwdev->dev.coherent_dma_mask);
+               printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__);
                free_pages((unsigned long)cpuaddr, get_order(size));
                return NULL;
        }
 
        return cpuaddr;
 }
+EXPORT_SYMBOL(sn_dma_alloc_coherent);
 
 /**
- * sn_pci_free_consistent - free memory associated with coherent DMAable region
- * @hwdev: device to free for
+ * sn_pci_free_coherent - free memory associated with coherent DMAable region
+ * @dev: device to free for
  * @size: size to free
- * @vaddr: kernel virtual address to free
+ * @cpu_addr: kernel virtual address to free
  * @dma_handle: DMA address associated with this region
  *
- * Frees the memory allocated by pci_alloc_consistent().  Also known
- * as platform_pci_free_consistent() by the IA64 machvec code.
+ * Frees the memory allocated by dma_alloc_coherent(), potentially unmapping
+ * any associated IOMMU mappings.
  */
-void
-sn_pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr,
-                      dma_addr_t dma_handle)
+void sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
+                         dma_addr_t dma_handle)
 {
-       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(hwdev);
-       struct pcibus_bussoft *bussoft = SN_PCIDEV_BUSSOFT(hwdev);
+       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(to_pci_dev(dev));
 
-       if (! bussoft) {
-               return;
-       }
+       BUG_ON(dev->bus != &pci_bus_type);
 
        pcibr_dma_unmap(pcidev_info, dma_handle, 0);
-       free_pages((unsigned long)vaddr, get_order(size));
-}
-
-/**
- * sn_pci_map_sg - map a scatter-gather list for DMA
- * @hwdev: device to map for
- * @sg: scatterlist to map
- * @nents: number of entries
- * @direction: direction of the DMA transaction
- *
- * Maps each entry of @sg for DMA.  Also known as platform_pci_map_sg by the
- * IA64 machvec code.
- */
-int
-sn_pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents,
-             int direction)
-{
-
-       int i;
-       unsigned long phys_addr;
-       struct scatterlist *saved_sg = sg;
-       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(hwdev);
-       struct pcibus_bussoft *bussoft = SN_PCIDEV_BUSSOFT(hwdev);
-
-       /* can't go anywhere w/o a direction in life */
-       if (direction == PCI_DMA_NONE)
-               BUG();
-
-       if (! bussoft) {
-               return 0;
-       }
-
-       /* SN cannot support DMA addresses smaller than 32 bits. */
-       if (hwdev->dma_mask < 0x7fffffff)
-               return 0;
-
-       /*
-        * Setup a DMA address for each entry in the
-        * scatterlist.
-        */
-       for (i = 0; i < nents; i++, sg++) {
-               phys_addr =
-                   __pa((unsigned long)page_address(sg->page) + sg->offset);
-               sg->dma_address = pcibr_dma_map(pcidev_info, phys_addr, 
sg->length, 0);
-
-               if (!sg->dma_address) {
-                       printk(KERN_ERR "sn_pci_map_sg: Unable to allocate "
-                              "anymore page map entries.\n");
-                       /*
-                        * We will need to free all previously allocated 
entries.
-                        */
-                       if (i > 0) {
-                               sn_pci_unmap_sg(hwdev, saved_sg, i, direction);
-                       }
-                       return (0);
-               }
-
-               sg->dma_length = sg->length;
-       }
-
-       return nents;
-
-}
-
-/**
- * sn_pci_unmap_sg - unmap a scatter-gather list
- * @hwdev: device to unmap
- * @sg: scatterlist to unmap
- * @nents: number of scatterlist entries
- * @direction: DMA direction
- *
- * Unmap a set of streaming mode DMA translations.  Again, cpu read rules
- * concerning calls here are the same as for pci_unmap_single() below.  Also
- * known as sn_pci_unmap_sg() by the IA64 machvec code.
- */
-void
-sn_pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents,
-               int direction)
-{
-       int i;
-       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(hwdev);
-       struct pcibus_bussoft *bussoft = SN_PCIDEV_BUSSOFT(hwdev);
-
-       /* can't go anywhere w/o a direction in life */
-       if (direction == PCI_DMA_NONE)
-               BUG();
-
-       if (! bussoft) {
-               return;
-       }
-
-       for (i = 0; i < nents; i++, sg++) {
-               pcibr_dma_unmap(pcidev_info, sg->dma_address, direction);
-               sg->dma_address = (dma_addr_t) NULL;
-               sg->dma_length = 0;
-       }
+       free_pages((unsigned long)cpu_addr, get_order(size));
 }
+EXPORT_SYMBOL(sn_dma_free_coherent);
 
 /**
- * sn_pci_map_single - map a single region for DMA
- * @hwdev: device to map for
- * @ptr: kernel virtual address of the region to map
+ * sn_dma_map_single - map a single page for DMA
+ * @dev: device to map for
+ * @cpu_addr: kernel virtual address of the region to map
  * @size: size of the region
  * @direction: DMA direction
  *
- * Map the region pointed to by @ptr for DMA and return the
- * DMA address.   Also known as platform_pci_map_single() by
- * the IA64 machvec code.
+ * Map the region pointed to by @cpu_addr for DMA and return the
+ * DMA address.
  *
  * We map this to the one step pcibr_dmamap_trans interface rather than
  * the two step pcibr_dmamap_alloc/pcibr_dmamap_addr because we have
@@ -218,262 +152,150 @@
  * (which is pretty much unacceptable).
  *
  * TODO: simplify our interface;
- *       get rid of dev_desc and vhdl (seems redundant given a pci_dev);
  *       figure out how to save dmamap handle so can use two step.
  */
-dma_addr_t
-sn_pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
+dma_addr_t sn_dma_map_single(struct device *dev, void *cpu_addr, size_t size,
+                            int direction)
 {
        dma_addr_t dma_addr;
        unsigned long phys_addr;
-       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(hwdev);
-       struct pcibus_bussoft *bussoft = SN_PCIDEV_BUSSOFT(hwdev);
-
-       if (direction == PCI_DMA_NONE)
-               BUG();
+       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(to_pci_dev(dev));
 
-       if (bussoft == NULL) {
-               return 0;
-       }
-
-       if (! IS_PCI_BRIDGE_ASIC(bussoft->bs_asic_type)) {
-               return 0;               /* unsupported asic type */
-       }
-
-       /* SN cannot support DMA addresses smaller than 32 bits. */
-       if (hwdev->dma_mask < 0x7fffffff)
-               return 0;
-
-       /*
-        * Call our dmamap interface
-        */
+       BUG_ON(dev->bus != &pci_bus_type);
 
-       phys_addr = __pa(ptr);
+       phys_addr = __pa(cpu_addr);
        dma_addr = pcibr_dma_map(pcidev_info, phys_addr, size, 0);
        if (!dma_addr) {
-               printk(KERN_ERR "pci_map_single: Unable to allocate anymore "
-                      "page map entries.\n");
+               printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__);
                return 0;
        }
-       return ((dma_addr_t) dma_addr);
+       return dma_addr;
 }
+EXPORT_SYMBOL(sn_dma_map_single);
 
 /**
- * sn_pci_dma_sync_single_* - make sure all DMAs or CPU accesses
- * have completed
- * @hwdev: device to sync
- * @dma_handle: DMA address to sync
+ * sn_dma_unmap_single - unamp a DMA mapped page
+ * @dev: device to sync
+ * @dma_addr: DMA address to sync
  * @size: size of region
  * @direction: DMA direction
  *
  * This routine is supposed to sync the DMA region specified
- * by @dma_handle into the 'coherence domain'.  We do not need to do
- * anything on our platform.
+ * by @dma_handle into the coherence domain.  On SN, we're always cache
+ * coherent, so we just need to free any ATEs associated with this mapping.
  */
-void
-sn_pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size,
-                   int direction)
+void sn_dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
+                        int direction)
 {
-       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(hwdev);
-       struct pcibus_bussoft *bussoft = SN_PCIDEV_BUSSOFT(hwdev);
-
-       if (direction == PCI_DMA_NONE)
-               BUG();
-
-       if (bussoft == NULL) {
-               return;
-       }
-
-       if (! IS_PCI_BRIDGE_ASIC(bussoft->bs_asic_type)) {
-               return;         /* unsupported asic type */
-       }
+       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(to_pci_dev(dev));
 
+       BUG_ON(dev->bus != &pci_bus_type);
        pcibr_dma_unmap(pcidev_info, dma_addr, direction);
 }
+EXPORT_SYMBOL(sn_dma_unmap_single);
 
 /**
- * sn_dma_supported - test a DMA mask
- * @hwdev: device to test
- * @mask: DMA mask to test
+ * sn_dma_unmap_sg - unmap a DMA scatterlist
+ * @dev: device to unmap
+ * @sg: scatterlist to unmap
+ * @nhwentries: number of scatterlist entries
+ * @direction: DMA direction
  *
- * Return whether the given PCI device DMA address mask can be supported
- * properly.  For example, if your device can only drive the low 24-bits
- * during PCI bus mastering, then you would pass 0x00ffffff as the mask to
- * this function.  Of course, SN only supports devices that have 32 or more
- * address bits when using the PMU.  We could theoretically support <32 bit
- * cards using direct mapping, but we'll worry about that later--on the off
- * chance that someone actually wants to use such a card.
+ * Unmap a set of streaming mode DMA translations.
  */
-int sn_pci_dma_supported(struct pci_dev *hwdev, u64 mask)
-{
-       if (mask < 0x7fffffff)
-               return 0;
-       return 1;
-}
-
-/*
- * New generic DMA routines just wrap sn2 PCI routines until we
- * support other bus types (if ever).
- */
-
-int sn_dma_supported(struct device *dev, u64 mask)
-{
-       BUG_ON(dev->bus != &pci_bus_type);
-
-       return sn_pci_dma_supported(to_pci_dev(dev), mask);
-}
-
-EXPORT_SYMBOL(sn_dma_supported);
-
-int sn_dma_set_mask(struct device *dev, u64 dma_mask)
+void sn_dma_unmap_sg(struct device *dev, struct scatterlist *sg,
+                    int nhwentries, int direction)
 {
-       BUG_ON(dev->bus != &pci_bus_type);
-
-       if (!sn_dma_supported(dev, dma_mask))
-               return 0;
-
-       *dev->dma_mask = dma_mask;
-       return 1;
-}
-
-EXPORT_SYMBOL(sn_dma_set_mask);
-
-void *sn_dma_alloc_coherent(struct device *dev, size_t size,
-                           dma_addr_t * dma_handle, int flag)
-{
-       BUG_ON(dev->bus != &pci_bus_type);
-
-       return sn_pci_alloc_consistent(to_pci_dev(dev), size, dma_handle);
-}
-
-EXPORT_SYMBOL(sn_dma_alloc_coherent);
+       int i;
+       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(to_pci_dev(dev));
 
-void
-sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
-                    dma_addr_t dma_handle)
-{
        BUG_ON(dev->bus != &pci_bus_type);
 
-       sn_pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle);
+       for (i = 0; i < nhwentries; i++, sg++) {
+               pcibr_dma_unmap(pcidev_info, sg->dma_address, direction);
+               sg->dma_address = (dma_addr_t) NULL;
+               sg->dma_length = 0;
+       }
 }
+EXPORT_SYMBOL(sn_dma_unmap_sg);
 
-EXPORT_SYMBOL(sn_dma_free_coherent);
-
-dma_addr_t
-sn_dma_map_single(struct device *dev, void *cpu_addr, size_t size,
+/**
+ * sn_dma_map_sg - map a scatterlist for DMA
+ * @dev: device to map for
+ * @sg: scatterlist to map
+ * @nhwentries: number of entries
+ * @direction: direction of the DMA transaction
+ *
+ * Maps each entry of @sg for DMA.
+ */
+int sn_dma_map_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
                  int direction)
 {
-       BUG_ON(dev->bus != &pci_bus_type);
-
-       return sn_pci_map_single(to_pci_dev(dev), cpu_addr, size,
-                                (int)direction);
-}
-
-EXPORT_SYMBOL(sn_dma_map_single);
-
-void
-sn_dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-                   int direction)
-{
-       BUG_ON(dev->bus != &pci_bus_type);
-
-       sn_pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction);
-}
-
-EXPORT_SYMBOL(sn_dma_unmap_single);
+       unsigned long phys_addr;
+       struct scatterlist *saved_sg = sg;
+       struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(to_pci_dev(dev));
+       int i;
 
-dma_addr_t
-sn_dma_map_page(struct device *dev, struct page *page,
-               unsigned long offset, size_t size, int direction)
-{
        BUG_ON(dev->bus != &pci_bus_type);
 
-       return pci_map_page(to_pci_dev(dev), page, offset, size,
-                           (int)direction);
-}
-
-EXPORT_SYMBOL(sn_dma_map_page);
-
-void
-sn_dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
-                 int direction)
-{
-       BUG_ON(dev->bus != &pci_bus_type);
+       /*
+        * Setup a DMA address for each entry in the scatterlist.
+        */
+       for (i = 0; i < nhwentries; i++, sg++) {
+               phys_addr = SG_ENT_PHYS_ADDRESS(sg);
+               sg->dma_address = pcibr_dma_map(pcidev_info, phys_addr,
+                                               sg->length, 0);
 
-       pci_unmap_page(to_pci_dev(dev), dma_address, size, (int)direction);
-}
+               if (!sg->dma_address) {
+                       printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__);
 
-EXPORT_SYMBOL(sn_dma_unmap_page);
+                       /*
+                        * Free any successfully allocated entries.
+                        */
+                       if (i > 0)
+                               sn_dma_unmap_sg(dev, saved_sg, i, direction);
+                       return 0;
+               }
 
-int
-sn_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-             int direction)
-{
-       BUG_ON(dev->bus != &pci_bus_type);
+               sg->dma_length = sg->length;
+       }
 
-       return sn_pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction);
+       return nhwentries;
 }
-
 EXPORT_SYMBOL(sn_dma_map_sg);
 
-void
-sn_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
-               int direction)
-{
-       BUG_ON(dev->bus != &pci_bus_type);
-
-       sn_pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction);
-}
-
-EXPORT_SYMBOL(sn_dma_unmap_sg);
-
-void
-sn_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
-                          size_t size, int direction)
+void sn_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
+                               size_t size, int direction)
 {
        BUG_ON(dev->bus != &pci_bus_type);
 }
-
 EXPORT_SYMBOL(sn_dma_sync_single_for_cpu);
 
-void
-sn_dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
-                             size_t size, int direction)
+void sn_dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
+                                  size_t size, int direction)
 {
        BUG_ON(dev->bus != &pci_bus_type);
 }
-
 EXPORT_SYMBOL(sn_dma_sync_single_for_device);
 
-void
-sn_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
-                      int direction)
+void sn_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
+                           int nelems, int direction)
 {
        BUG_ON(dev->bus != &pci_bus_type);
 }
-
 EXPORT_SYMBOL(sn_dma_sync_sg_for_cpu);
 
-void
-sn_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
-                         int nelems, int direction)
+void sn_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
+                              int nelems, int direction)
 {
        BUG_ON(dev->bus != &pci_bus_type);
 }
+EXPORT_SYMBOL(sn_dma_sync_sg_for_device);
 
 int sn_dma_mapping_error(dma_addr_t dma_addr)
 {
        return 0;
 }
-
-EXPORT_SYMBOL(sn_dma_sync_sg_for_device);
-EXPORT_SYMBOL(sn_pci_unmap_single);
-EXPORT_SYMBOL(sn_pci_map_single);
-EXPORT_SYMBOL(sn_pci_map_sg);
-EXPORT_SYMBOL(sn_pci_unmap_sg);
-EXPORT_SYMBOL(sn_pci_alloc_consistent);
-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)
diff -urN linux/arch/m32r/kernel/ptrace.c linux/arch/m32r/kernel/ptrace.c
--- linux/arch/m32r/kernel/ptrace.c     2005/01/13 14:05:27     1.3
+++ linux/arch/m32r/kernel/ptrace.c     2005/02/07 02:54:33     1.4
@@ -130,7 +130,7 @@
 #ifndef NO_FPU
                else if (off >= (long)(&dummy->fpu >> 2) &&
                         off < (long)(&dummy->u_fpvalid >> 2)) {
-                       if (!tsk->used_math) {
+                       if (!tsk_used_math(tsk)) {
                                if (off == (long)(&dummy->fpu.fpscr >> 2))
                                        tmp = FPSCR_INIT;
                                else
@@ -139,7 +139,7 @@
                                tmp = ((long *)(&tsk->thread.fpu >> 2))
                                        [off - (long)&dummy->fpu];
                } else if (off == (long)(&dummy->u_fpvalid >> 2))
-                       tmp = tsk->used_math;
+                       tmp = !!tsk_used_math(tsk);
 #endif /* not NO_FPU */
                else
                        tmp = 0;
@@ -187,12 +187,12 @@
 #ifndef NO_FPU
                else if (off >= (long)(&dummy->fpu >> 2) &&
                         off < (long)(&dummy->u_fpvalid >> 2)) {
-                       tsk->used_math = 1;
+                       set_stopped_child_used_math(tsk);
                        ((long *)&tsk->thread.fpu)
                                [off - (long)&dummy->fpu] = data;
                        ret = 0;
                } else if (off == (long)(&dummy->u_fpvalid >> 2)) {
-                       tsk->used_math = data ? 1 : 0;
+                       conditional_stopped_child_used_math(data, tsk);
                        ret = 0;
                }
 #endif /* not NO_FPU */
diff -urN linux/arch/m32r/kernel/setup.c linux/arch/m32r/kernel/setup.c
--- linux/arch/m32r/kernel/setup.c      2005/01/13 14:05:27     1.3
+++ linux/arch/m32r/kernel/setup.c      2005/02/07 02:54:33     1.4
@@ -391,7 +391,7 @@
 
        /* Force FPU initialization */
        current_thread_info()->status = 0;
-       current->used_math = 0;
+       clear_used_math();
 
 #ifdef CONFIG_MMU
        /* Set up MMU */
diff -urN linux/arch/m32r/oprofile/init.c linux/arch/m32r/oprofile/init.c
--- linux/arch/m32r/oprofile/init.c     2005/01/13 14:05:27     1.2
+++ linux/arch/m32r/oprofile/init.c     2005/02/07 02:54:33     1.3
@@ -12,8 +12,9 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 
-void __init oprofile_arch_init(struct oprofile_operations * ops)
+int __init oprofile_arch_init(struct oprofile_operations * ops)
 {
+       return -ENODEV;
 }
 
 void oprofile_arch_exit(void)
diff -urN linux/arch/mips/Kconfig linux/arch/mips/Kconfig
--- linux/arch/mips/Kconfig     2005/02/07 01:27:14     1.138
+++ linux/arch/mips/Kconfig     2005/02/07 02:54:33     1.139
@@ -1226,6 +1226,17 @@
          This allows applications to run more reliably even when the system is
          under load.
 
+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.
+
 config RTC_DS1742
        bool "DS1742 BRAM/RTC support"
        depends on TOSHIBA_JMR3927 || TOSHIBA_RBTX4927
diff -urN linux/arch/mips/defconfig linux/arch/mips/defconfig
--- linux/arch/mips/defconfig   2005/01/30 20:45:36     1.281
+++ linux/arch/mips/defconfig   2005/02/07 02:54:33     1.282
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:02:36 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:06 2005
 #
 CONFIG_MIPS=y
 
@@ -723,7 +723,6 @@
 # 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
@@ -770,7 +769,12 @@
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 CONFIG_XFS_FS=m
+CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_RT is not set
 CONFIG_XFS_QUOTA=y
 CONFIG_XFS_SECURITY=y
diff -urN linux/arch/mips/configs/atlas_defconfig 
linux/arch/mips/configs/atlas_defconfig
--- linux/arch/mips/configs/atlas_defconfig     2005/02/02 20:46:40     1.45
+++ linux/arch/mips/configs/atlas_defconfig     2005/02/07 02:54:33     1.46
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Wed Feb  2 20:43:05 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:06 2005
 #
 CONFIG_MIPS=y
 
@@ -874,7 +874,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -931,7 +930,12 @@
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 CONFIG_XFS_FS=m
+CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_RT is not set
 CONFIG_XFS_QUOTA=y
 CONFIG_XFS_SECURITY=y
@@ -1012,7 +1016,7 @@
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=y
+CONFIG_EXPORTFS=m
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
diff -urN linux/arch/mips/configs/capcella_defconfig 
linux/arch/mips/configs/capcella_defconfig
--- linux/arch/mips/configs/capcella_defconfig  2005/01/30 20:45:37     1.45
+++ linux/arch/mips/configs/capcella_defconfig  2005/02/07 02:54:33     1.46
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:02:42 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:06 2005
 #
 CONFIG_MIPS=y
 
@@ -571,7 +571,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -613,6 +612,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/cobalt_defconfig 
linux/arch/mips/configs/cobalt_defconfig
--- linux/arch/mips/configs/cobalt_defconfig    2005/01/30 20:45:37     1.42
+++ linux/arch/mips/configs/cobalt_defconfig    2005/02/07 02:54:33     1.43
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:02:45 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:07 2005
 #
 CONFIG_MIPS=y
 
@@ -545,7 +545,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -591,6 +590,10 @@
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/db1000_defconfig 
linux/arch/mips/configs/db1000_defconfig
--- linux/arch/mips/configs/db1000_defconfig    2005/02/02 20:39:29     1.47
+++ linux/arch/mips/configs/db1000_defconfig    2005/02/07 02:54:33     1.48
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Wed Feb  2 20:13:52 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:07 2005
 #
 CONFIG_MIPS=y
 
@@ -536,7 +536,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -590,6 +589,10 @@
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/db1100_defconfig 
linux/arch/mips/configs/db1100_defconfig
--- linux/arch/mips/configs/db1100_defconfig    2005/02/02 20:39:29     1.45
+++ linux/arch/mips/configs/db1100_defconfig    2005/02/07 02:54:33     1.46
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Wed Feb  2 20:14:21 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:08 2005
 #
 CONFIG_MIPS=y
 
@@ -531,7 +531,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -585,6 +584,10 @@
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/db1500_defconfig 
linux/arch/mips/configs/db1500_defconfig
--- linux/arch/mips/configs/db1500_defconfig    2005/02/02 20:39:29     1.49
+++ linux/arch/mips/configs/db1500_defconfig    2005/02/07 02:54:33     1.50
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Wed Feb  2 20:14:23 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:08 2005
 #
 CONFIG_MIPS=y
 
@@ -662,7 +662,6 @@
 # Graphics support
 #
 # CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -843,6 +842,10 @@
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/db1550_defconfig 
linux/arch/mips/configs/db1550_defconfig
--- linux/arch/mips/configs/db1550_defconfig    2005/02/02 20:39:29     1.24
+++ linux/arch/mips/configs/db1550_defconfig    2005/02/07 02:54:33     1.25
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Wed Feb  2 20:14:24 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:08 2005
 #
 CONFIG_MIPS=y
 
@@ -702,7 +702,6 @@
 # Graphics support
 #
 # CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -757,6 +756,10 @@
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/ddb5476_defconfig 
linux/arch/mips/configs/ddb5476_defconfig
--- linux/arch/mips/configs/ddb5476_defconfig   2005/01/30 20:45:37     1.42
+++ linux/arch/mips/configs/ddb5476_defconfig   2005/02/07 02:54:33     1.43
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:00 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:09 2005
 #
 CONFIG_MIPS=y
 
@@ -636,6 +636,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/ddb5477_defconfig 
linux/arch/mips/configs/ddb5477_defconfig
--- linux/arch/mips/configs/ddb5477_defconfig   2005/01/30 20:45:37     1.42
+++ linux/arch/mips/configs/ddb5477_defconfig   2005/02/07 02:54:33     1.43
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:02 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:09 2005
 #
 CONFIG_MIPS=y
 
@@ -546,7 +546,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -588,6 +587,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/decstation_defconfig 
linux/arch/mips/configs/decstation_defconfig
--- linux/arch/mips/configs/decstation_defconfig        2005/02/02 20:36:23     
1.43
+++ linux/arch/mips/configs/decstation_defconfig        2005/02/07 02:54:33     
1.44
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Wed Feb  2 20:14:26 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:09 2005
 #
 CONFIG_MIPS=y
 
@@ -518,7 +518,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -563,6 +562,10 @@
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/e55_defconfig 
linux/arch/mips/configs/e55_defconfig
--- linux/arch/mips/configs/e55_defconfig       2005/01/30 20:45:37     1.44
+++ linux/arch/mips/configs/e55_defconfig       2005/02/07 02:54:33     1.45
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:07 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:09 2005
 #
 CONFIG_MIPS=y
 
@@ -551,7 +551,6 @@
 # CONFIG_VGA_CONSOLE is not set
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -592,6 +591,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/ev64120_defconfig 
linux/arch/mips/configs/ev64120_defconfig
--- linux/arch/mips/configs/ev64120_defconfig   2005/01/30 20:45:37     1.41
+++ linux/arch/mips/configs/ev64120_defconfig   2005/02/07 02:54:33     1.42
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:09 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:10 2005
 #
 CONFIG_MIPS=y
 
@@ -540,7 +540,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -582,6 +581,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/ev96100_defconfig 
linux/arch/mips/configs/ev96100_defconfig
--- linux/arch/mips/configs/ev96100_defconfig   2005/01/30 20:45:37     1.42
+++ linux/arch/mips/configs/ev96100_defconfig   2005/02/07 02:54:33     1.43
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:11 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:10 2005
 #
 CONFIG_MIPS=y
 
@@ -495,7 +495,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -536,6 +535,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/ip22_defconfig 
linux/arch/mips/configs/ip22_defconfig
--- linux/arch/mips/configs/ip22_defconfig      2005/01/30 20:45:37     1.51
+++ linux/arch/mips/configs/ip22_defconfig      2005/02/07 02:54:33     1.52
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:15 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:10 2005
 #
 CONFIG_MIPS=y
 
@@ -723,7 +723,6 @@
 # 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
@@ -770,7 +769,12 @@
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 CONFIG_XFS_FS=m
+CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_RT is not set
 CONFIG_XFS_QUOTA=y
 CONFIG_XFS_SECURITY=y
diff -urN linux/arch/mips/configs/ip27_defconfig 
linux/arch/mips/configs/ip27_defconfig
--- linux/arch/mips/configs/ip27_defconfig      2005/02/07 01:27:14     1.55
+++ linux/arch/mips/configs/ip27_defconfig      2005/02/07 02:54:33     1.56
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Mon Jan 31 18:27:35 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:30:35 2005
 #
 CONFIG_MIPS=y
 
@@ -642,7 +642,6 @@
 # Graphics support
 #
 # CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -696,6 +695,10 @@
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 CONFIG_XFS_FS=m
 # CONFIG_XFS_RT is not set
 CONFIG_XFS_QUOTA=y
diff -urN linux/arch/mips/configs/ip32_defconfig 
linux/arch/mips/configs/ip32_defconfig
--- linux/arch/mips/configs/ip32_defconfig      2005/01/30 20:45:37     1.45
+++ linux/arch/mips/configs/ip32_defconfig      2005/02/07 02:54:33     1.46
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:20 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:11 2005
 #
 CONFIG_MIPS=y
 
@@ -607,7 +607,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -649,6 +648,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/it8172_defconfig 
linux/arch/mips/configs/it8172_defconfig
--- linux/arch/mips/configs/it8172_defconfig    2005/01/30 20:45:37     1.41
+++ linux/arch/mips/configs/it8172_defconfig    2005/02/07 02:54:33     1.42
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:22 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:11 2005
 #
 CONFIG_MIPS=y
 
@@ -587,7 +587,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -648,6 +647,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/ivr_defconfig 
linux/arch/mips/configs/ivr_defconfig
--- linux/arch/mips/configs/ivr_defconfig       2005/01/30 20:45:37     1.41
+++ linux/arch/mips/configs/ivr_defconfig       2005/02/07 02:54:33     1.42
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:25 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:11 2005
 #
 CONFIG_MIPS=y
 
@@ -554,7 +554,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -596,6 +595,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
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/30 20:45:37     
1.46
+++ linux/arch/mips/configs/jaguar-atx_defconfig        2005/02/07 02:54:33     
1.47
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:27 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:12 2005
 #
 CONFIG_MIPS=y
 
@@ -513,7 +513,6 @@
 # Graphics support
 #
 # CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -554,6 +553,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/jmr3927_defconfig 
linux/arch/mips/configs/jmr3927_defconfig
--- linux/arch/mips/configs/jmr3927_defconfig   2005/01/30 20:45:37     1.41
+++ linux/arch/mips/configs/jmr3927_defconfig   2005/02/07 02:54:33     1.42
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:30 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:12 2005
 #
 CONFIG_MIPS=y
 
@@ -606,6 +606,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/lasat200_defconfig 
linux/arch/mips/configs/lasat200_defconfig
--- linux/arch/mips/configs/lasat200_defconfig  2005/01/30 20:45:37     1.42
+++ linux/arch/mips/configs/lasat200_defconfig  2005/02/07 02:54:33     1.43
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:32 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:12 2005
 #
 CONFIG_MIPS=y
 
@@ -652,7 +652,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -699,6 +698,10 @@
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/malta_defconfig 
linux/arch/mips/configs/malta_defconfig
--- linux/arch/mips/configs/malta_defconfig     2005/01/30 20:45:37     1.44
+++ linux/arch/mips/configs/malta_defconfig     2005/02/07 02:54:33     1.45
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:36 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:13 2005
 #
 CONFIG_MIPS=y
 
@@ -903,7 +903,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -960,7 +959,12 @@
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 CONFIG_XFS_FS=m
+CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_RT is not set
 CONFIG_XFS_QUOTA=y
 CONFIG_XFS_SECURITY=y
@@ -1041,7 +1045,7 @@
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=y
+CONFIG_EXPORTFS=m
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
diff -urN linux/arch/mips/configs/mpc30x_defconfig 
linux/arch/mips/configs/mpc30x_defconfig
--- linux/arch/mips/configs/mpc30x_defconfig    2005/01/30 20:45:37     1.46
+++ linux/arch/mips/configs/mpc30x_defconfig    2005/02/07 02:54:33     1.47
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:39 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:13 2005
 #
 CONFIG_MIPS=y
 
@@ -537,7 +537,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -579,6 +578,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
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/30 20:45:37     1.14
+++ linux/arch/mips/configs/ocelot_3_defconfig  2005/02/07 02:54:33     1.15
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:42 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:13 2005
 #
 CONFIG_MIPS=y
 
@@ -744,7 +744,12 @@
 # CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_REISERFS_FS_XATTR is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 CONFIG_XFS_FS=m
+CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_RT is not set
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_SECURITY is not set
@@ -816,7 +821,7 @@
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=y
+CONFIG_EXPORTFS=m
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
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/30 20:45:37     1.40
+++ linux/arch/mips/configs/ocelot_c_defconfig  2005/02/07 02:54:33     1.41
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:45 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:13 2005
 #
 CONFIG_MIPS=y
 
@@ -532,7 +532,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -574,6 +573,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/ocelot_defconfig 
linux/arch/mips/configs/ocelot_defconfig
--- linux/arch/mips/configs/ocelot_defconfig    2005/01/30 20:45:37     1.42
+++ linux/arch/mips/configs/ocelot_defconfig    2005/02/07 02:54:33     1.43
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:47 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:14 2005
 #
 CONFIG_MIPS=y
 
@@ -491,7 +491,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -532,6 +531,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
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/30 20:45:37     1.35
+++ linux/arch/mips/configs/ocelot_g_defconfig  2005/02/07 02:54:33     1.36
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:49 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:14 2005
 #
 CONFIG_MIPS=y
 
@@ -535,7 +535,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -577,6 +576,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/osprey_defconfig 
linux/arch/mips/configs/osprey_defconfig
--- linux/arch/mips/configs/osprey_defconfig    2005/01/30 20:45:37     1.41
+++ linux/arch/mips/configs/osprey_defconfig    2005/02/07 02:54:33     1.42
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:03:52 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:14 2005
 #
 CONFIG_MIPS=y
 
@@ -485,7 +485,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -526,6 +525,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/pb1100_defconfig 
linux/arch/mips/configs/pb1100_defconfig
--- linux/arch/mips/configs/pb1100_defconfig    2005/02/02 20:39:29     1.43
+++ linux/arch/mips/configs/pb1100_defconfig    2005/02/07 02:54:33     1.44
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Wed Feb  2 20:14:36 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:14 2005
 #
 CONFIG_MIPS=y
 
@@ -597,7 +597,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -651,6 +650,10 @@
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/pb1500_defconfig 
linux/arch/mips/configs/pb1500_defconfig
--- linux/arch/mips/configs/pb1500_defconfig    2005/02/02 20:39:29     1.49
+++ linux/arch/mips/configs/pb1500_defconfig    2005/02/07 02:54:33     1.50
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Wed Feb  2 20:14:38 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:15 2005
 #
 CONFIG_MIPS=y
 
@@ -627,7 +627,6 @@
 # Graphics support
 #
 # CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -682,6 +681,10 @@
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/pb1550_defconfig 
linux/arch/mips/configs/pb1550_defconfig
--- linux/arch/mips/configs/pb1550_defconfig    2005/02/02 20:39:29     1.39
+++ linux/arch/mips/configs/pb1550_defconfig    2005/02/07 02:54:33     1.40
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Wed Feb  2 20:14:39 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:15 2005
 #
 CONFIG_MIPS=y
 
@@ -619,7 +619,6 @@
 # Graphics support
 #
 # CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -674,6 +673,10 @@
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/rm200_defconfig 
linux/arch/mips/configs/rm200_defconfig
--- linux/arch/mips/configs/rm200_defconfig     2005/01/30 20:45:37     1.51
+++ linux/arch/mips/configs/rm200_defconfig     2005/02/07 02:54:33     1.52
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:04:05 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:15 2005
 #
 CONFIG_MIPS=y
 
@@ -951,7 +951,6 @@
 CONFIG_VGA_CONSOLE=y
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -1182,7 +1181,12 @@
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 CONFIG_XFS_FS=m
+CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_RT is not set
 CONFIG_XFS_QUOTA=y
 CONFIG_XFS_SECURITY=y
diff -urN linux/arch/mips/configs/sb1250-swarm_defconfig 
linux/arch/mips/configs/sb1250-swarm_defconfig
--- linux/arch/mips/configs/sb1250-swarm_defconfig      2005/02/03 14:28:23     
1.48
+++ linux/arch/mips/configs/sb1250-swarm_defconfig      2005/02/07 02:54:33     
1.49
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Thu Feb  3 15:26:56 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:16 2005
 #
 CONFIG_MIPS=y
 
@@ -565,7 +565,6 @@
 # Graphics support
 #
 # CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -611,6 +610,10 @@
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/sead_defconfig 
linux/arch/mips/configs/sead_defconfig
--- linux/arch/mips/configs/sead_defconfig      2005/02/03 19:19:41     1.40
+++ linux/arch/mips/configs/sead_defconfig      2005/02/07 02:54:33     1.41
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Wed Feb  2 22:58:39 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:16 2005
 #
 CONFIG_MIPS=y
 
@@ -353,7 +353,6 @@
 # Graphics support
 #
 # CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -394,6 +393,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/tb0226_defconfig 
linux/arch/mips/configs/tb0226_defconfig
--- linux/arch/mips/configs/tb0226_defconfig    2005/01/30 20:45:37     1.44
+++ linux/arch/mips/configs/tb0226_defconfig    2005/02/07 02:54:33     1.45
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:04:13 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:16 2005
 #
 CONFIG_MIPS=y
 
@@ -619,6 +619,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=m
diff -urN linux/arch/mips/configs/tb0229_defconfig 
linux/arch/mips/configs/tb0229_defconfig
--- linux/arch/mips/configs/tb0229_defconfig    2005/01/30 20:45:37     1.47
+++ linux/arch/mips/configs/tb0229_defconfig    2005/02/07 02:54:33     1.48
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:04:15 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:16 2005
 #
 CONFIG_MIPS=y
 
@@ -575,7 +575,6 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -626,7 +625,12 @@
 # CONFIG_JFS_SECURITY is not set
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
+
+#
+# XFS support
+#
 CONFIG_XFS_FS=y
+CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_RT is not set
 CONFIG_XFS_QUOTA=y
 # CONFIG_XFS_SECURITY is not set
diff -urN linux/arch/mips/configs/workpad_defconfig 
linux/arch/mips/configs/workpad_defconfig
--- linux/arch/mips/configs/workpad_defconfig   2005/01/30 20:45:37     1.44
+++ linux/arch/mips/configs/workpad_defconfig   2005/02/07 02:54:33     1.45
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:04:18 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:17 2005
 #
 CONFIG_MIPS=y
 
@@ -551,7 +551,6 @@
 # CONFIG_VGA_CONSOLE is not set
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -596,6 +595,10 @@
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/configs/yosemite_defconfig 
linux/arch/mips/configs/yosemite_defconfig
--- linux/arch/mips/configs/yosemite_defconfig  2005/01/30 20:45:37     1.46
+++ linux/arch/mips/configs/yosemite_defconfig  2005/02/07 02:54:33     1.47
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc2
-# Sun Jan 30 19:04:20 2005
+# Linux kernel version: 2.6.11-rc3
+# Mon Feb  7 01:00:17 2005
 #
 CONFIG_MIPS=y
 
@@ -495,7 +495,6 @@
 # Graphics support
 #
 # CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -536,6 +535,10 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
diff -urN linux/arch/mips/kernel/entry.S linux/arch/mips/kernel/entry.S
--- linux/arch/mips/kernel/entry.S      2004/12/10 12:56:33     1.64
+++ linux/arch/mips/kernel/entry.S      2005/02/07 02:54:34     1.65
@@ -48,6 +48,7 @@
 
 #ifdef CONFIG_PREEMPT
 resume_kernel:
+       local_irq_disable
        lw      t0, TI_PRE_COUNT($28)
        bnez    t0, restore_all
 need_resched:
@@ -59,11 +60,7 @@
        beqz    t0, restore_all
        li      t0, PREEMPT_ACTIVE
        sw      t0, TI_PRE_COUNT($28)
-       local_irq_enable
-       jal     schedule
-       sw      zero, TI_PRE_COUNT($28)
-       local_irq_disable
-       b       need_resched
+       jal     preempt_schedule_irq
 #endif
 
 FEXPORT(ret_from_fork)
diff -urN linux/arch/mips/kernel/irixsig.c linux/arch/mips/kernel/irixsig.c
--- linux/arch/mips/kernel/irixsig.c    2005/01/25 04:28:00     1.45
+++ linux/arch/mips/kernel/irixsig.c    2005/02/07 02:54:34     1.46
@@ -99,7 +99,7 @@
        __put_user((u64) regs->hi, &ctx->hi);
        __put_user((u64) regs->lo, &ctx->lo);
        __put_user((u64) regs->cp0_epc, &ctx->pc);
-       __put_user(current->used_math, &ctx->usedfp);
+       __put_user(!!used_math(), &ctx->usedfp);
        __put_user((u64) regs->cp0_cause, &ctx->cp0_cause);
        __put_user((u64) regs->cp0_badvaddr, &ctx->cp0_badvaddr);
 
@@ -725,7 +725,7 @@
        __put_user(regs->cp0_epc, &ctx->regs[35]);
 
        flags = 0x0f;
-       if(!current->used_math) {
+       if(!used_math()) {
                flags &= ~(0x08);
        } else {
                /* XXX wheee... */
diff -urN linux/arch/mips/kernel/linux32.c linux/arch/mips/kernel/linux32.c
--- linux/arch/mips/kernel/linux32.c    2004/12/04 20:10:19     1.22
+++ linux/arch/mips/kernel/linux32.c    2005/02/07 02:54:34     1.23
@@ -468,8 +468,7 @@
        if (!(file->f_mode & FMODE_READ))
                goto out;
        pos = merge_64(a4, a5);
-       ret = locks_verify_area(FLOCK_VERIFY_READ, file->f_dentry->d_inode,
-                               file, pos, count);
+       ret = rw_verify_area(READ, file, &pos, count);
        if (ret)
                goto out;
        ret = -EINVAL;
@@ -504,8 +503,7 @@
        if (!(file->f_mode & FMODE_WRITE))
                goto out;
        pos = merge_64(a4, a5);
-       ret = locks_verify_area(FLOCK_VERIFY_WRITE, file->f_dentry->d_inode,
-                               file, pos, count);
+       ret = rw_verify_area(WRITE, file, &pos, count);
        if (ret)
                goto out;
        ret = -EINVAL;
@@ -1194,13 +1192,6 @@
        return error;
 }
 
-#else /* CONFIG_SYSCTL */
-
-asmlinkage long sys32_sysctl(struct sysctl_args32 *args)
-{
-       return -ENOSYS;
-}
-
 #endif /* CONFIG_SYSCTL */
 
 asmlinkage long sys32_newuname(struct new_utsname * name)
diff -urN linux/arch/mips/kernel/process.c linux/arch/mips/kernel/process.c
--- linux/arch/mips/kernel/process.c    2005/01/26 02:21:06     1.73
+++ linux/arch/mips/kernel/process.c    2005/02/07 02:54:34     1.74
@@ -76,7 +76,7 @@
 #endif
        status |= KU_USER;
        regs->cp0_status = status;
-       current->used_math = 0;
+       clear_used_math();
        lose_fpu();
        regs->cp0_epc = pc;
        regs->regs[29] = sp;
diff -urN linux/arch/mips/kernel/ptrace.c linux/arch/mips/kernel/ptrace.c
--- linux/arch/mips/kernel/ptrace.c     2004/10/25 20:44:17     1.57
+++ linux/arch/mips/kernel/ptrace.c     2005/02/07 02:54:34     1.58
@@ -119,7 +119,7 @@
                        tmp = regs->regs[addr];
                        break;
                case FPR_BASE ... FPR_BASE + 31:
-                       if (child->used_math) {
+                       if (tsk_used_math(child)) {
                                fpureg_t *fregs = get_fpu_regs(child);
 
 #ifdef CONFIG_MIPS32
@@ -205,7 +205,7 @@
                case FPR_BASE ... FPR_BASE + 31: {
                        fpureg_t *fregs = get_fpu_regs(child);
 
-                       if (!child->used_math) {
+                       if (!tsk_used_math(child)) {
                                /* FP not yet used  */
                                memset(&child->thread.fpu.hard, ~0,
                                       sizeof(child->thread.fpu.hard));
diff -urN linux/arch/mips/kernel/ptrace32.c linux/arch/mips/kernel/ptrace32.c
--- linux/arch/mips/kernel/ptrace32.c   2004/10/25 20:44:17     1.3
+++ linux/arch/mips/kernel/ptrace32.c   2005/02/07 02:54:34     1.4
@@ -112,7 +112,7 @@
                        tmp = regs->regs[addr];
                        break;
                case FPR_BASE ... FPR_BASE + 31:
-                       if (child->used_math) {
+                       if (tsk_used_math(child)) {
                                fpureg_t *fregs = get_fpu_regs(child);
 
                                /*
@@ -193,7 +193,7 @@
                case FPR_BASE ... FPR_BASE + 31: {
                        fpureg_t *fregs = get_fpu_regs(child);
 
-                       if (!child->used_math) {
+                       if (!tsk_used_math(child)) {
                                /* FP not yet used  */
                                memset(&child->thread.fpu.hard, ~0,
                                       sizeof(child->thread.fpu.hard));
diff -urN linux/arch/mips/kernel/signal-common.h 
linux/arch/mips/kernel/signal-common.h
--- linux/arch/mips/kernel/signal-common.h      2005/01/10 21:53:25     1.3
+++ linux/arch/mips/kernel/signal-common.h      2005/02/07 02:54:34     1.4
@@ -35,9 +35,9 @@
        err |= __put_user(regs->cp0_cause, &sc->sc_cause);
        err |= __put_user(regs->cp0_badvaddr, &sc->sc_badvaddr);
 
-       err |= __put_user(current->used_math, &sc->sc_used_math);
+       err |= __put_user(!!used_math(), &sc->sc_used_math);
 
-       if (!current->used_math)
+       if (!used_math())
                goto out;
 
        /*
@@ -61,6 +61,7 @@
 static inline int
 restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
 {
+       unsigned int used_math;
        int err = 0;
 
        /* Always make any pending restarted system calls return -EINTR */
@@ -86,11 +87,12 @@
        restore_gp_reg(31);
 #undef restore_gp_reg
 
-       err |= __get_user(current->used_math, &sc->sc_used_math);
+       err |= __get_user(used_math, &sc->sc_used_math);
+       conditional_used_math(used_math);
 
        preempt_disable();
 
-       if (current->used_math) {
+       if (used_math()) {
                /* restore fpu context if we have used it before */
                own_fpu();
                err |= restore_fp_context(sc);
diff -urN linux/arch/mips/kernel/signal32.c linux/arch/mips/kernel/signal32.c
--- linux/arch/mips/kernel/signal32.c   2005/01/25 04:28:00     1.22
+++ linux/arch/mips/kernel/signal32.c   2005/02/07 02:54:34     1.23
@@ -337,6 +337,7 @@
 static int restore_sigcontext32(struct pt_regs *regs, struct sigcontext32 *sc)
 {
        int err = 0;
+       __u32 used_math;
 
        /* Always make any pending restarted system calls return -EINTR */
        current_thread_info()->restart_block.fn = do_no_restart_syscall;
@@ -361,11 +362,12 @@
        restore_gp_reg(31);
 #undef restore_gp_reg
 
-       err |= __get_user(current->used_math, &sc->sc_used_math);
+       err |= __get_user(used_math, &sc->sc_used_math);
+       conditional_used_math(used_math);
 
        preempt_disable();
 
-       if (current->used_math) {
+       if (used_math()) {
                /* restore fpu context if we have used it before */
                own_fpu();
                err |= restore_fp_context32(sc);
@@ -556,9 +558,9 @@
        err |= __put_user(regs->cp0_cause, &sc->sc_cause);
        err |= __put_user(regs->cp0_badvaddr, &sc->sc_badvaddr);
 
-       err |= __put_user(current->used_math, &sc->sc_used_math);
+       err |= __put_user(!!used_math(), &sc->sc_used_math);
 
-       if (!current->used_math)
+       if (!used_math())
                goto out;
 
        /* 
diff -urN linux/arch/mips/kernel/traps.c linux/arch/mips/kernel/traps.c
--- linux/arch/mips/kernel/traps.c      2005/01/14 03:03:23     1.207
+++ linux/arch/mips/kernel/traps.c      2005/02/07 02:54:34     1.208
@@ -661,11 +661,11 @@
                preempt_disable();
 
                own_fpu();
-               if (current->used_math) {       /* Using the FPU again.  */
+               if (used_math()) {      /* Using the FPU again.  */
                        restore_fp(current);
                } else {                        /* First time FPU user.  */
                        init_fpu();
-                       current->used_math = 1;
+                       set_used_math();
                }
 
                if (!cpu_has_fpu) {
diff -urN linux/arch/mips/oprofile/common.c linux/arch/mips/oprofile/common.c
--- linux/arch/mips/oprofile/common.c   2005/01/17 17:58:00     1.3
+++ linux/arch/mips/oprofile/common.c   2005/02/07 02:54:34     1.4
@@ -68,9 +68,18 @@
        on_each_cpu(model->cpu_stop, NULL, 0, 1);
 }
 
-void __init oprofile_arch_init(struct oprofile_operations *ops)
+static struct oprofile_operations oprof_mips_ops = {
+       .create_files   = op_mips_create_files,
+       .setup          = op_mips_setup,
+       .start          = op_mips_start,
+       .stop           = op_mips_stop,
+       .cpu_type       = NULL
+};
+
+int __init oprofile_arch_init(struct oprofile_operations **ops)
 {
        struct op_mips_model *lmodel = NULL;
+       int res;
 
        switch (current_cpu_data.cputype) {
        case CPU_24K:
@@ -83,21 +92,21 @@
        };
 
        if (!lmodel)
-               return;
+               return -ENODEV;
 
-       if (lmodel->init())
-               return;
+       res = lmodel->init();
+       if (res)
+               return res;
 
        model = lmodel;
 
-       ops->create_files = op_mips_create_files;
-       ops->setup = op_mips_setup;
-       ops->start = op_mips_start;
-       ops->stop = op_mips_stop;
-       ops->cpu_type = lmodel->cpu_type;
+       oprof_mips_ops.cpu_type = lmodel->cpu_type;
+       *ops = &oprof_mips_ops;
 
        printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
               lmodel->cpu_type);
+
+       return 0;
 }
 
 void oprofile_arch_exit(void)
diff -urN linux/arch/parisc/kernel/sys_parisc32.c 
linux/arch/parisc/kernel/sys_parisc32.c
--- linux/arch/parisc/kernel/sys_parisc32.c     2005/01/13 14:05:31     1.24
+++ linux/arch/parisc/kernel/sys_parisc32.c     2005/02/07 02:54:35     1.25
@@ -165,12 +165,6 @@
        return error;
 }
 
-#else /* CONFIG_SYSCTL */
-
-asmlinkage long sys32_sysctl(struct __sysctl_args *args)
-{
-       return -ENOSYS;
-}
 #endif /* CONFIG_SYSCTL */
 
 asmlinkage long sys32_sched_rr_get_interval(pid_t pid,
diff -urN linux/arch/parisc/lib/memcpy.c linux/arch/parisc/lib/memcpy.c
--- linux/arch/parisc/lib/memcpy.c      2004/11/15 11:49:19     1.1
+++ linux/arch/parisc/lib/memcpy.c      2005/02/07 02:54:35     1.2
@@ -515,16 +515,8 @@
        return dst;
 }
 
-void bcopy(const void * srcp, void * destp, size_t count)
-{
-       mtsp(get_kernel_space(), 1);
-       mtsp(get_kernel_space(), 2);
-       pa_memcpy(destp, srcp, count);
-}
-
 EXPORT_SYMBOL(copy_to_user);
 EXPORT_SYMBOL(copy_from_user);
 EXPORT_SYMBOL(copy_in_user);
 EXPORT_SYMBOL(memcpy);
-EXPORT_SYMBOL(bcopy);
 #endif
diff -urN linux/arch/parisc/oprofile/init.c linux/arch/parisc/oprofile/init.c
--- linux/arch/parisc/oprofile/init.c   2005/01/13 14:05:31     1.7
+++ linux/arch/parisc/oprofile/init.c   2005/02/07 02:54:35     1.8
@@ -12,8 +12,9 @@
 #include <linux/kernel.h>
 #include <linux/oprofile.h>
 
-void __init oprofile_arch_init(struct oprofile_operations * ops)
+int __init oprofile_arch_init(struct oprofile_operations * ops)
 {
+       return -ENODEV;
 }
 
 
diff -urN linux/arch/ppc/boot/common/misc-common.c 
linux/arch/ppc/boot/common/misc-common.c
--- linux/arch/ppc/boot/common/misc-common.c    2004/09/19 12:30:05     1.12
+++ linux/arch/ppc/boot/common/misc-common.c    2005/02/07 02:54:35     1.13
@@ -52,7 +52,6 @@
 void puts(const char *);
 void putc(const char c);
 void puthex(unsigned long val);
-void _bcopy(char *src, char *dst, int len);
 void gunzip(void *, int, unsigned char *, int *);
 static int _cvt(unsigned long val, char *buf, long radix, char *digits);
 
@@ -60,7 +59,8 @@
 unsigned char *ISA_io = NULL;
 
 #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \
-       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE)
+       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
+       || defined(CONFIG_SERIAL_MPSC_CONSOLE)
 extern unsigned long com_port;
 
 extern int serial_tstc(unsigned long com_port);
@@ -82,7 +82,8 @@
 int tstc(void)
 {
 #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \
-       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE)
+       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
+       || defined(CONFIG_SERIAL_MPSC_CONSOLE)
        if(keyb_present)
                return (CRT_tstc() || serial_tstc(com_port));
        else
@@ -96,7 +97,8 @@
 {
        while (1) {
 #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \
-       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE)
+       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
+       || defined(CONFIG_SERIAL_MPSC_CONSOLE)
                if (serial_tstc(com_port))
                        return (serial_getc(com_port));
 #endif /* serial console */
@@ -112,7 +114,8 @@
        int x,y;
 
 #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \
-       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE)
+       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
+       || defined(CONFIG_SERIAL_MPSC_CONSOLE)
        serial_putc(com_port, c);
        if ( c == '\n' )
                serial_putc(com_port, '\r');
@@ -160,7 +163,8 @@
 
        while ( ( c = *s++ ) != '\0' ) {
 #if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \
-       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE)
+       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
+       || defined(CONFIG_SERIAL_MPSC_CONSOLE)
                serial_putc(com_port, c);
                if ( c == '\n' ) serial_putc(com_port, '\r');
 #endif /* serial console */
diff -urN linux/arch/ppc/boot/simple/misc-ev64260.S 
linux/arch/ppc/boot/simple/misc-ev64260.S
--- linux/arch/ppc/boot/simple/misc-ev64260.S   2005/01/13 14:05:31     1.5
+++ linux/arch/ppc/boot/simple/misc-ev64260.S   2005/02/07 02:54:35     1.6
@@ -6,12 +6,10 @@
  *
  * Author: Mark Greer <mgreer@mvista.com>
  *
- * Copyright 2001 MontaVista Software 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.
+ * 2001 (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
  */
 
 #include <asm/ppc_asm.h>
diff -urN linux/arch/ppc/boot/simple/misc.c linux/arch/ppc/boot/simple/misc.c
--- linux/arch/ppc/boot/simple/misc.c   2005/01/13 14:05:31     1.15
+++ linux/arch/ppc/boot/simple/misc.c   2005/02/07 02:54:35     1.16
@@ -50,7 +50,8 @@
  */
 #if (defined(CONFIG_SERIAL_8250_CONSOLE) \
        || defined(CONFIG_VGA_CONSOLE) \
-       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE)) \
+       || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
+       || defined(CONFIG_SERIAL_MPSC_CONSOLE)) \
        && !defined(CONFIG_GEMINI)
 #define INTERACTIVE_CONSOLE    1
 #endif
@@ -98,7 +99,7 @@
        struct bi_record *rec;
        unsigned long initrd_loc = 0, TotalMemory = 0;
 
-#ifdef CONFIG_SERIAL_8250_CONSOLE
+#if defined(CONFIG_SERIAL_8250_CONSOLE) || defined(CONFIG_SERIAL_MPSC_CONSOLE)
        com_port = serial_init(0, NULL);
 #endif
 
diff -urN linux/arch/ppc/boot/simple/mv64x60_tty.c 
linux/arch/ppc/boot/simple/mv64x60_tty.c
--- linux/arch/ppc/boot/simple/mv64x60_tty.c    2005/01/13 14:05:31     1.1
+++ linux/arch/ppc/boot/simple/mv64x60_tty.c    2005/02/07 02:54:35     1.2
@@ -6,12 +6,10 @@
  *
  * Author: Mark A. Greer <mgreer@mvista.com>
  *
- * Copyright 2001 MontaVista Software 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.
+ * 2001 (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
  */
 
 /* This code assumes that the data cache has been disabled (L1, L2, L3). */
diff -urN linux/arch/ppc/configs/mpc8540_ads_defconfig 
linux/arch/ppc/configs/mpc8540_ads_defconfig
--- linux/arch/ppc/configs/mpc8540_ads_defconfig        1970/01/01 00:00:00
+++ linux/arch/ppc/configs/mpc8540_ads_defconfig        Mon Feb  7 02:54:35 
2005        1.1
@@ -0,0 +1,707 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.11-rc1
+# Thu Jan 20 01:23:13 2005
+#
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_HAVE_DEC_LOCK=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+CONFIG_KOBJECT_UEVENT=y
+# CONFIG_IKCONFIG is not set
+CONFIG_EMBEDDED=y
+# CONFIG_KALLSYMS is not set
+CONFIG_FUTEX=y
+# CONFIG_EPOLL is not set
+# 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 is not set
+
+#
+# Processor
+#
+# CONFIG_6xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8xx is not set
+CONFIG_E500=y
+CONFIG_BOOKE=y
+CONFIG_FSL_BOOKE=y
+CONFIG_SPE=y
+CONFIG_MATH_EMULATION=y
+# CONFIG_CPU_FREQ is not set
+CONFIG_PPC_GEN550=y
+CONFIG_85xx=y
+CONFIG_PPC_INDIRECT_PCI_BE=y
+
+#
+# Freescale 85xx options
+#
+CONFIG_MPC8540_ADS=y
+# CONFIG_MPC8555_CDS is not set
+# CONFIG_MPC8560_ADS is not set
+# CONFIG_SBC8560 is not set
+CONFIG_MPC8540=y
+
+#
+# Platform options
+#
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Bus options
+#
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCI_LEGACY_PROC is not set
+CONFIG_PCI_NAMES=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PC-card bridges
+#
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_LBD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# 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_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_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_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_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+CONFIG_GIANFAR=y
+CONFIG_GFAR_NAPI=y
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+# CONFIG_SERIO_I8042 is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_ISA is not set
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+# 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
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# 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_VIA686A is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+
+#
+# Other I2C Chip support
+#
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# 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
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS 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
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# 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=y
+# CONFIG_DEVFS_FS is not set
+# 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
+
+#
+# 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
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+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
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
diff -urN linux/arch/ppc/configs/mpc8555_cds_defconfig 
linux/arch/ppc/configs/mpc8555_cds_defconfig
--- linux/arch/ppc/configs/mpc8555_cds_defconfig        1970/01/01 00:00:00
+++ linux/arch/ppc/configs/mpc8555_cds_defconfig        Mon Feb  7 02:54:35 
2005        1.1
@@ -0,0 +1,718 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.11-rc1
+# Thu Jan 20 01:25:35 2005
+#
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_HAVE_DEC_LOCK=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+CONFIG_KOBJECT_UEVENT=y
+# CONFIG_IKCONFIG is not set
+CONFIG_EMBEDDED=y
+# CONFIG_KALLSYMS is not set
+CONFIG_FUTEX=y
+# CONFIG_EPOLL is not set
+# 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 is not set
+
+#
+# Processor
+#
+# CONFIG_6xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8xx is not set
+CONFIG_E500=y
+CONFIG_BOOKE=y
+CONFIG_FSL_BOOKE=y
+CONFIG_SPE=y
+CONFIG_MATH_EMULATION=y
+# CONFIG_CPU_FREQ is not set
+CONFIG_PPC_GEN550=y
+CONFIG_85xx=y
+CONFIG_PPC_INDIRECT_PCI_BE=y
+
+#
+# Freescale 85xx options
+#
+# CONFIG_MPC8540_ADS is not set
+CONFIG_MPC8555_CDS=y
+# CONFIG_MPC8560_ADS is not set
+# CONFIG_SBC8560 is not set
+CONFIG_MPC8555=y
+CONFIG_85xx_PCI2=y
+
+#
+# Platform options
+#
+CONFIG_CPM2=y
+# CONFIG_PC_KEYBOARD is not set
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Bus options
+#
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCI_LEGACY_PROC is not set
+CONFIG_PCI_NAMES=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PC-card bridges
+#
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_LBD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# 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_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_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_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_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+CONFIG_GIANFAR=y
+CONFIG_GFAR_NAPI=y
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+# CONFIG_SERIO_I8042 is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_CPM is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_ISA is not set
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+# 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
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# 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_VIA686A is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+
+#
+# Other I2C Chip support
+#
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# 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
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS 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
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# 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=y
+# CONFIG_DEVFS_FS is not set
+# 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
+
+#
+# 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
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+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
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+# CONFIG_SCC_ENET is not set
+# CONFIG_FEC_ENET is not set
+
+#
+# CPM2 Options
+#
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KGDB_CONSOLE is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
diff -urN linux/arch/ppc/configs/mpc8560_ads_defconfig 
linux/arch/ppc/configs/mpc8560_ads_defconfig
--- linux/arch/ppc/configs/mpc8560_ads_defconfig        1970/01/01 00:00:00
+++ linux/arch/ppc/configs/mpc8560_ads_defconfig        Mon Feb  7 02:54:35 
2005        1.1
@@ -0,0 +1,719 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.11-rc1
+# Thu Jan 20 01:24:56 2005
+#
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_HAVE_DEC_LOCK=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+CONFIG_KOBJECT_UEVENT=y
+# CONFIG_IKCONFIG is not set
+CONFIG_EMBEDDED=y
+# CONFIG_KALLSYMS is not set
+CONFIG_FUTEX=y
+# CONFIG_EPOLL is not set
+# 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 is not set
+
+#
+# Processor
+#
+# CONFIG_6xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8xx is not set
+CONFIG_E500=y
+CONFIG_BOOKE=y
+CONFIG_FSL_BOOKE=y
+CONFIG_SPE=y
+CONFIG_MATH_EMULATION=y
+# CONFIG_CPU_FREQ is not set
+CONFIG_85xx=y
+CONFIG_PPC_INDIRECT_PCI_BE=y
+
+#
+# Freescale 85xx options
+#
+# CONFIG_MPC8540_ADS is not set
+# CONFIG_MPC8555_CDS is not set
+CONFIG_MPC8560_ADS=y
+# CONFIG_SBC8560 is not set
+CONFIG_MPC8560=y
+
+#
+# Platform options
+#
+CONFIG_CPM2=y
+# CONFIG_PC_KEYBOARD is not set
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Bus options
+#
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCI_LEGACY_PROC is not set
+CONFIG_PCI_NAMES=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PC-card bridges
+#
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_LBD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# 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_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_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_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_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+CONFIG_GIANFAR=y
+CONFIG_GFAR_NAPI=y
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+# CONFIG_SERIO_I8042 is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_CPM=y
+CONFIG_SERIAL_CPM_CONSOLE=y
+CONFIG_SERIAL_CPM_SCC1=y
+# CONFIG_SERIAL_CPM_SCC2 is not set
+# CONFIG_SERIAL_CPM_SCC3 is not set
+CONFIG_SERIAL_CPM_SCC4=y
+# CONFIG_SERIAL_CPM_SMC1 is not set
+# CONFIG_SERIAL_CPM_SMC2 is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_ISA is not set
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+# 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
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# 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_VIA686A is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+
+#
+# Other I2C Chip support
+#
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# 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
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS 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
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# 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=y
+# CONFIG_DEVFS_FS is not set
+# 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
+
+#
+# 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
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+# CONFIG_EXPORTFS is not set
+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
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+# CONFIG_SCC_ENET is not set
+# CONFIG_FEC_ENET is not set
+
+#
+# CPM2 Options
+#
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_KGDB_CONSOLE is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
diff -urN linux/arch/ppc/configs/stx_gp3_defconfig 
linux/arch/ppc/configs/stx_gp3_defconfig
--- linux/arch/ppc/configs/stx_gp3_defconfig    1970/01/01 00:00:00
+++ linux/arch/ppc/configs/stx_gp3_defconfig    Mon Feb  7 02:54:35 2005        
1.1
@@ -0,0 +1,972 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.11-rc2
+# Wed Jan 26 14:32:58 2005
+#
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_HAVE_DEC_LOCK=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_HOTPLUG=y
+CONFIG_KOBJECT_UEVENT=y
+# CONFIG_IKCONFIG is not set
+CONFIG_EMBEDDED=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=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_OBSOLETE_MODPARM=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Processor
+#
+# CONFIG_6xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8xx is not set
+CONFIG_E500=y
+CONFIG_BOOKE=y
+CONFIG_FSL_BOOKE=y
+# CONFIG_SPE is not set
+CONFIG_MATH_EMULATION=y
+# CONFIG_CPU_FREQ is not set
+CONFIG_85xx=y
+CONFIG_PPC_INDIRECT_PCI_BE=y
+
+#
+# Freescale 85xx options
+#
+# CONFIG_MPC8540_ADS is not set
+# CONFIG_MPC8555_CDS is not set
+# CONFIG_MPC8560_ADS is not set
+# CONFIG_SBC8560 is not set
+CONFIG_STX_GP3=y
+CONFIG_MPC8560=y
+
+#
+# Platform options
+#
+CONFIG_CPM2=y
+# CONFIG_PC_KEYBOARD is not set
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HIGHMEM=y
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=m
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Bus options
+#
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCI_LEGACY_PROC is not set
+# CONFIG_PCI_NAMES is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PC-card bridges
+#
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+# CONFIG_PARPORT_PC_FIFO is not set
+# CONFIG_PARPORT_PC_SUPERIO is not set
+# CONFIG_PARPORT_OTHER is not set
+# CONFIG_PARPORT_1284 is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=m
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_LBD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECD=m
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_IDEPCI is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_IDEDMA_AUTO is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transport Attributes
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+
+#
+# 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_DPT_I2O 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_EATA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH 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
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_IPR is not set
+# CONFIG_SCSI_QLOGIC_ISP is not set
+# CONFIG_SCSI_QLOGIC_FC is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+CONFIG_SCSI_QLA2XXX=m
+# CONFIG_SCSI_QLA21XX is not set
+# CONFIG_SCSI_QLA22XX is not set
+# CONFIG_SCSI_QLA2300 is not set
+# CONFIG_SCSI_QLA2322 is not set
+# CONFIG_SCSI_QLA6312 is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+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_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+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 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 is not set
+# CONFIG_IP_NF_AMANDA is not set
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+# CONFIG_IP_NF_MATCH_LIMIT is not set
+# CONFIG_IP_NF_MATCH_IPRANGE is not set
+# CONFIG_IP_NF_MATCH_MAC is not set
+# CONFIG_IP_NF_MATCH_PKTTYPE is not set
+# CONFIG_IP_NF_MATCH_MARK is not set
+# CONFIG_IP_NF_MATCH_MULTIPORT is not set
+# CONFIG_IP_NF_MATCH_TOS is not set
+# CONFIG_IP_NF_MATCH_RECENT is not set
+# CONFIG_IP_NF_MATCH_ECN is not set
+# CONFIG_IP_NF_MATCH_DSCP is not set
+# CONFIG_IP_NF_MATCH_AH_ESP is not set
+# CONFIG_IP_NF_MATCH_LENGTH is not set
+# CONFIG_IP_NF_MATCH_TTL is not set
+# CONFIG_IP_NF_MATCH_TCPMSS is not set
+# CONFIG_IP_NF_MATCH_HELPER is not set
+# CONFIG_IP_NF_MATCH_STATE is not set
+# CONFIG_IP_NF_MATCH_CONNTRACK is not set
+# CONFIG_IP_NF_MATCH_OWNER is not set
+# 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 is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+# CONFIG_IP_NF_TARGET_ULOG is not set
+# CONFIG_IP_NF_TARGET_TCPMSS is not set
+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 is not set
+# CONFIG_IP_NF_TARGET_SAME 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_MANGLE is not set
+# CONFIG_IP_NF_RAW is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_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_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_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+CONFIG_GIANFAR=y
+CONFIG_GFAR_NAPI=y
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NET_FC is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1280
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1024
+CONFIG_INPUT_JOYDEV=m
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_CPM=y
+CONFIG_SERIAL_CPM_CONSOLE=y
+# CONFIG_SERIAL_CPM_SCC1 is not set
+CONFIG_SERIAL_CPM_SCC2=y
+# CONFIG_SERIAL_CPM_SCC3 is not set
+# CONFIG_SERIAL_CPM_SCC4 is not set
+# CONFIG_SERIAL_CPM_SMC1 is not set
+# CONFIG_SERIAL_CPM_SMC2 is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_PRINTER=m
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
+# CONFIG_TIPAR is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+CONFIG_AGP=m
+CONFIG_DRM=m
+# CONFIG_DRM_TDFX is not set
+# CONFIG_DRM_R128 is not set
+# CONFIG_DRM_RADEON is not set
+# CONFIG_DRM_MGA is not set
+# CONFIG_DRM_SIS is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_ISA is not set
+# CONFIG_I2C_MPC is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+# 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
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# 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_VIA686A is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+
+#
+# Other I2C Chip support
+#
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# 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
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+CONFIG_JBD_DEBUG=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS 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=m
+CONFIG_AUTOFS4_FS=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+# CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+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
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_SYSFS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+# 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
+
+#
+# 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=m
+# 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
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+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_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
+# 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_SCC_ENET is not set
+# CONFIG_FEC_ENET is not set
+
+#
+# CPM2 Options
+#
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=y
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_HIGHMEM is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_KGDB_CONSOLE is not set
+# CONFIG_XMON is not set
+CONFIG_BDI_SWITCH=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
diff -urN linux/arch/ppc/configs/katana_defconfig 
linux/arch/ppc/configs/katana_defconfig
--- linux/arch/ppc/configs/katana_defconfig     2005/01/13 14:05:32     1.1
+++ linux/arch/ppc/configs/katana_defconfig     2005/02/07 02:54:35     1.2
@@ -1,11 +1,12 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc2
-# Fri Nov 19 15:17:10 2004
+# Linux kernel version: 2.6.11-rc2
+# Tue Jan 25 16:31:13 2005
 #
 CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_HAVE_DEC_LOCK=y
 CONFIG_PPC=y
 CONFIG_PPC32=y
@@ -79,8 +80,10 @@
 # CONFIG_APUS is not set
 CONFIG_KATANA=y
 # CONFIG_WILLOW is not set
+# CONFIG_CPCI690 is not set
 # CONFIG_PCORE is not set
 # CONFIG_POWERPMC250 is not set
+# CONFIG_CHESTNUT is not set
 # CONFIG_SPRUCE is not set
 # CONFIG_EV64260 is not set
 # CONFIG_LOPEC is not set
@@ -100,6 +103,7 @@
 # CONFIG_RPX8260 is not set
 # CONFIG_TQM8260 is not set
 # CONFIG_ADS8272 is not set
+# CONFIG_PQ2FADS is not set
 # CONFIG_LITE5200 is not set
 CONFIG_MV64360=y
 CONFIG_MV64X60=y
@@ -127,6 +131,15 @@
 CONFIG_PCI_NAMES=y
 
 #
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PC-card bridges
+#
+
+#
 # Advanced setup
 #
 CONFIG_ADVANCED_OPTIONS=y
@@ -153,6 +166,7 @@
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -176,11 +190,13 @@
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -194,6 +210,7 @@
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -449,6 +466,10 @@
 #
 # Non-8250 serial port support
 #
+CONFIG_SERIAL_MPSC=y
+CONFIG_SERIAL_MPSC_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -510,6 +531,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -524,11 +546,25 @@
 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
 #
 # CONFIG_USB_GADGET is not set
 
 #
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -649,3 +685,7 @@
 # Cryptographic options
 #
 # CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
diff -urN linux/arch/ppc/kernel/entry.S linux/arch/ppc/kernel/entry.S
--- linux/arch/ppc/kernel/entry.S       2005/01/13 14:05:32     1.42
+++ linux/arch/ppc/kernel/entry.S       2005/02/07 02:54:35     1.43
@@ -624,18 +624,8 @@
        beq+    restore
        andi.   r0,r3,MSR_EE    /* interrupts off? */
        beq     restore         /* don't schedule if so */
-1:     lis     r0,PREEMPT_ACTIVE@h
-       stw     r0,TI_PREEMPT(r9)
-       ori     r10,r10,MSR_EE
-       SYNC
-       MTMSRD(r10)             /* hard-enable interrupts */
-       bl      schedule
-       LOAD_MSR_KERNEL(r10,MSR_KERNEL)
-       SYNC
-       MTMSRD(r10)             /* disable interrupts */
+1:     bl      preempt_schedule_irq
        rlwinm  r9,r1,0,0,18
-       li      r0,0
-       stw     r0,TI_PREEMPT(r9)
        lwz     r3,TI_FLAGS(r9)
        andi.   r0,r3,_TIF_NEED_RESCHED
        bne-    1b
diff -urN linux/arch/ppc/kernel/idle.c linux/arch/ppc/kernel/idle.c
--- linux/arch/ppc/kernel/idle.c        2005/01/13 14:05:32     1.36
+++ linux/arch/ppc/kernel/idle.c        2005/02/07 02:54:35     1.37
@@ -41,17 +41,14 @@
        if (!need_resched()) {
                if (powersave != NULL)
                        powersave();
-               else {
 #ifdef CONFIG_SMP
+               else {
                        set_thread_flag(TIF_POLLING_NRFLAG);
-                       local_irq_enable();
                        while (!need_resched())
                                barrier();
                        clear_thread_flag(TIF_POLLING_NRFLAG);
-#else
-                       local_irq_enable();
-#endif
                }
+#endif
        }
        if (need_resched())
                schedule();
diff -urN linux/arch/ppc/kernel/l2cr.S linux/arch/ppc/kernel/l2cr.S
--- linux/arch/ppc/kernel/l2cr.S        2004/03/11 16:46:43     1.10
+++ linux/arch/ppc/kernel/l2cr.S        2005/02/07 02:54:35     1.11
@@ -45,6 +45,7 @@
 #include <asm/cputable.h>
 #include <asm/ppc_asm.h>
 #include <asm/cache.h>
+#include <asm/page.h>
 
 /* Usage:
 
@@ -284,7 +285,7 @@
        /* Tweak some bits */
        rlwinm  r5,r3,0,0,0             /* r5 contains the new enable bit */
        rlwinm  r3,r3,0,22,20           /* Turn off the invalidate bit */
-       rlwinm  r3,r3,0,1,31            /* Turn off the enable bit */
+       rlwinm  r3,r3,0,2,31            /* Turn off the enable & PE bits */
        rlwinm  r3,r3,0,5,3             /* Turn off the clken bit */
        /* Check to see if we need to flush */
        rlwinm. r4,r4,0,0,0
@@ -379,7 +380,7 @@
 /* flush_disable_L1()  - Flush and disable L1 cache
  *
  * clobbers r0, r3, ctr, cr0
- *
+ * Must be called with interrupts disabled and MMU enabled.
  */
 _GLOBAL(__flush_disable_L1)
        /* Stop pending alitvec streams and memory accesses */
@@ -393,7 +394,7 @@
         */
        li      r3,0x4000       /* 512kB / 32B */
        mtctr   r3
-       li      r3, 0
+       lis     r3,KERNELBASE@h
 1:
        lwz     r0,0(r3)
        addi    r3,r3,0x0020    /* Go to start of next cache line */
@@ -404,7 +405,7 @@
        /* Now flush those cache lines */
        li      r3,0x4000       /* 512kB / 32B */
        mtctr   r3
-       li      r3, 0
+       lis     r3,KERNELBASE@h
 1:
        dcbf    0,r3
        addi    r3,r3,0x0020    /* Go to start of next cache line */
diff -urN linux/arch/ppc/kernel/pci.c linux/arch/ppc/kernel/pci.c
--- linux/arch/ppc/kernel/pci.c 2004/10/25 20:44:18     1.54
+++ linux/arch/ppc/kernel/pci.c 2005/02/07 02:54:35     1.55
@@ -1712,7 +1712,11 @@
        if (flags & IORESOURCE_IO)
                return ioport_map(start, len);
        if (flags & IORESOURCE_MEM)
-               return (void __iomem *) start;
+               /* Not checking IORESOURCE_CACHEABLE because PPC does
+                * not currently distinguish between ioremap and
+                * ioremap_nocache.
+                */
+               return ioremap(start, len);
        /* What? */
        return NULL;
 }
diff -urN linux/arch/ppc/kernel/ppc_ksyms.c linux/arch/ppc/kernel/ppc_ksyms.c
--- linux/arch/ppc/kernel/ppc_ksyms.c   2004/11/15 11:49:19     1.74
+++ linux/arch/ppc/kernel/ppc_ksyms.c   2005/02/07 02:54:35     1.75
@@ -190,6 +190,7 @@
 EXPORT_SYMBOL(flush_dcache_page);
 EXPORT_SYMBOL(flush_tlb_kernel_range);
 EXPORT_SYMBOL(flush_tlb_page);
+EXPORT_SYMBOL(_tlbie);
 #ifdef CONFIG_ALTIVEC
 EXPORT_SYMBOL(last_task_used_altivec);
 EXPORT_SYMBOL(giveup_altivec);
diff -urN linux/arch/ppc/kernel/process.c linux/arch/ppc/kernel/process.c
--- linux/arch/ppc/kernel/process.c     2004/12/27 02:15:51     1.67
+++ linux/arch/ppc/kernel/process.c     2005/02/07 02:54:35     1.68
@@ -325,17 +325,6 @@
               current, current->pid, current->comm, current->thread_info);
        printk("Last syscall: %ld ", current->thread.last_syscall);
 
-#if defined(CONFIG_4xx) && defined(DCRN_PLB0_BEAR)
-       printk("\nPLB0: bear= 0x%8.8x acr=   0x%8.8x besr=  0x%8.8x\n",
-           mfdcr(DCRN_PLB0_BEAR), mfdcr(DCRN_PLB0_ACR),
-           mfdcr(DCRN_PLB0_BESR));
-#endif
-#if defined(CONFIG_4xx) && defined(DCRN_POB0_BEAR)
-       printk("PLB0 to OPB: bear= 0x%8.8x besr0= 0x%8.8x besr1= 0x%8.8x\n",
-           mfdcr(DCRN_POB0_BEAR), mfdcr(DCRN_POB0_BESR0),
-           mfdcr(DCRN_POB0_BESR1));
-#endif
-
 #ifdef CONFIG_SMP
        printk(" CPU: %d", smp_processor_id());
 #endif /* CONFIG_SMP */
diff -urN linux/arch/ppc/kernel/traps.c linux/arch/ppc/kernel/traps.c
--- linux/arch/ppc/kernel/traps.c       2005/01/25 04:28:02     1.48
+++ linux/arch/ppc/kernel/traps.c       2005/02/07 02:54:35     1.49
@@ -199,6 +199,15 @@
 #define clear_single_step(regs)        ((regs)->msr &= ~MSR_SE)
 #endif
 
+/*
+ * This is "fall-back" implementation for configurations
+ * which don't provide platform-specific machine check info
+ */
+void __attribute__ ((weak))
+platform_machine_check(struct pt_regs *regs)
+{
+}
+
 void MachineCheckException(struct pt_regs *regs)
 {
        unsigned long reason = get_mc_reason(regs);
@@ -323,6 +332,12 @@
        }
 #endif /* CONFIG_4xx */
 
+       /*
+        * Optional platform-provided routine to print out
+        * additional info, e.g. bus error registers.
+        */
+       platform_machine_check(regs);
+
        debugger(regs);
        die("machine check", regs, SIGBUS);
 }
diff -urN linux/arch/ppc/lib/string.S linux/arch/ppc/lib/string.S
--- linux/arch/ppc/lib/string.S 2004/06/06 02:12:39     1.16
+++ linux/arch/ppc/lib/string.S 2005/02/07 02:54:35     1.17
@@ -216,12 +216,6 @@
        bdnz    8b
        blr
 
-_GLOBAL(bcopy)
-       mr      r6,r3
-       mr      r3,r4
-       mr      r4,r6
-       b       memcpy
-
 /*
  * This version uses dcbz on the complete cache lines in the
  * destination area to reduce memory traffic.  This requires that
diff -urN linux/arch/ppc/oprofile/common.c linux/arch/ppc/oprofile/common.c
--- linux/arch/ppc/oprofile/common.c    2005/01/25 04:28:02     1.2
+++ linux/arch/ppc/oprofile/common.c    2005/02/07 02:54:35     1.3
@@ -124,7 +124,7 @@
        .cpu_type       = NULL          /* To be filled in below. */
 };
 
-void __init oprofile_arch_init(struct oprofile_operations *ops)
+int __init oprofile_arch_init(struct oprofile_operations *ops)
 {
        char *name;
        int cpu_id = smp_processor_id();
@@ -132,14 +132,13 @@
 #ifdef CONFIG_FSL_BOOKE
        model = &op_model_fsl_booke;
 #else
-       printk(KERN_ERR "oprofile enabled on unsupported processor!\n");
-       return;
+       return -ENODEV;
 #endif
 
        name = kmalloc(32, GFP_KERNEL);
 
        if (NULL == name)
-               return;
+               return -ENOMEM;
 
        sprintf(name, "ppc/%s", cur_cpu_spec[cpu_id]->cpu_name);
 
@@ -151,6 +150,8 @@
 
        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/pmac_cache.S 
linux/arch/ppc/platforms/pmac_cache.S
--- linux/arch/ppc/platforms/pmac_cache.S       1970/01/01 00:00:00
+++ linux/arch/ppc/platforms/pmac_cache.S       Mon Feb  7 02:54:35 2005        
1.1
@@ -0,0 +1,325 @@
+/*
+ * This file contains low-level cache management functions
+ * used for sleep and CPU speed changes on Apple machines.
+ * (In fact the only thing that is Apple-specific is that we assume
+ * that we can read from ROM at physical address 0xfff00000.)
+ *
+ *    Copyright (C) 2004 Paul Mackerras (paulus@samba.org) and
+ *                       Benjamin Herrenschmidt (benh@kernel.crashing.org)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#include <linux/config.h>
+#include <asm/processor.h>
+#include <asm/ppc_asm.h>
+#include <asm/cputable.h>
+
+/*
+ * Flush and disable all data caches (dL1, L2, L3). This is used
+ * when going to sleep, when doing a PMU based cpufreq transition,
+ * or when "offlining" a CPU on SMP machines. This code is over
+ * paranoid, but I've had enough issues with various CPU revs and
+ * bugs that I decided it was worth beeing over cautious
+ */
+
+_GLOBAL(flush_disable_caches)
+BEGIN_FTR_SECTION
+       b       flush_disable_745x
+END_FTR_SECTION_IFSET(CPU_FTR_SPEC7450)
+BEGIN_FTR_SECTION
+       b       flush_disable_75x
+END_FTR_SECTION_IFSET(CPU_FTR_L2CR)
+       b       __flush_disable_L1
+
+/* This is the code for G3 and 74[01]0 */
+flush_disable_75x:
+       mflr    r10
+
+       /* Turn off EE and DR in MSR */
+       mfmsr   r11
+       rlwinm  r0,r11,0,~MSR_EE
+       rlwinm  r0,r0,0,~MSR_DR
+       sync
+       mtmsr   r0
+       isync
+
+       /* Stop DST streams */
+BEGIN_FTR_SECTION
+       DSSALL
+       sync
+END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+
+       /* Stop DPM */
+       mfspr   r8,SPRN_HID0            /* Save HID0 in r8 */
+       rlwinm  r4,r8,0,12,10           /* Turn off HID0[DPM] */
+       sync
+       mtspr   SPRN_HID0,r4            /* Disable DPM */
+       sync
+
+       /* disp-flush L1 */
+       li      r4,0x4000
+       mtctr   r4
+       lis     r4,0xfff0
+1:     lwzx    r0,r0,r4
+       addi    r4,r4,32
+       bdnz    1b
+       sync
+       isync
+
+       /* disable / invalidate / enable L1 data */
+       mfspr   r3,SPRN_HID0
+       rlwinm  r0,r0,0,~HID0_DCE
+       mtspr   SPRN_HID0,r3
+       sync
+       isync
+       ori     r3,r3,HID0_DCE|HID0_DCI
+       sync
+       isync
+       mtspr   SPRN_HID0,r3
+       xori    r3,r3,HID0_DCI
+       mtspr   SPRN_HID0,r3
+       sync
+
+       /* Get the current enable bit of the L2CR into r4 */
+       mfspr   r5,L2CR
+       /* Set to data-only (pre-745x bit) */
+       oris    r3,r5,L2CR_L2DO@h
+       b       2f
+       /* When disabling L2, code must be in L1 */
+       .balign 32
+1:     mtspr   L2CR,r3
+3:     sync
+       isync
+       b       1f
+2:     b       3f
+3:     sync
+       isync
+       b       1b
+1:     /* disp-flush L2. The interesting thing here is that the L2 can be
+        * up to 2Mb ... so using the ROM, we'll end up wrapping back to memory
+        * but that is probbaly fine. We disp-flush over 4Mb to be safe
+        */
+       lis     r4,2
+       mtctr   r4
+       lis     r4,0xfff0
+1:     lwzx    r0,r0,r4
+       addi    r4,r4,32
+       bdnz    1b
+       sync
+       isync
+       /* now disable L2 */
+       rlwinm  r5,r5,0,~L2CR_L2E
+       b       2f
+       /* When disabling L2, code must be in L1 */
+       .balign 32
+1:     mtspr   L2CR,r5
+3:     sync
+       isync
+       b       1f
+2:     b       3f
+3:     sync
+       isync
+       b       1b
+1:     sync
+       isync
+       /* Invalidate L2. This is pre-745x, we clear the L2I bit ourselves */
+       oris    r4,r5,L2CR_L2I@h
+       mtspr   L2CR,r4
+       sync
+       isync
+       xoris   r4,r4,L2CR_L2I@h
+       sync
+       mtspr   L2CR,r4
+       sync
+
+       /* now disable the L1 data cache */
+       mfspr   r0,HID0
+       rlwinm  r0,r0,0,~HID0_DCE
+       mtspr   HID0,r0
+       sync
+       isync
+
+       /* Restore HID0[DPM] to whatever it was before */
+       sync
+       mtspr   SPRN_HID0,r8
+       sync
+
+       /* restore DR and EE */
+       sync
+       mtmsr   r11
+       isync
+
+       mtlr    r10
+       blr
+
+/* This code is for 745x processors */
+flush_disable_745x:
+       /* Turn off EE and DR in MSR */
+       mfmsr   r11
+       rlwinm  r0,r11,0,~MSR_EE
+       rlwinm  r0,r0,0,~MSR_DR
+       sync
+       mtmsr   r0
+       isync
+
+       /* Stop prefetch streams */
+       DSSALL
+       sync
+
+       /* Disable L2 prefetching */
+       mfspr   r0,SPRN_MSSCR0
+       rlwinm  r0,r0,0,0,29
+       mtspr   SPRN_MSSCR0,r0
+       sync
+       isync
+       lis     r4,0
+       dcbf    0,r4
+       dcbf    0,r4
+       dcbf    0,r4
+       dcbf    0,r4
+       dcbf    0,r4
+       dcbf    0,r4
+       dcbf    0,r4
+       dcbf    0,r4
+
+       /* Due to a bug with the HW flush on some CPU revs, we occasionally
+        * experience data corruption. I'm adding a displacement flush along
+        * with a dcbf loop over a few Mb to "help". The problem isn't totally
+        * fixed by this in theory, but at least, in practice, I couldn't 
reproduce
+        * it even with a big hammer...
+        */
+
+        lis     r4,0x0002
+        mtctr   r4
+       li      r4,0
+1:
+        lwzx    r0,r0,r4
+        addi    r4,r4,32                /* Go to start of next cache line */
+        bdnz    1b
+        isync
+
+        /* Now, flush the first 4MB of memory */
+        lis     r4,0x0002
+        mtctr   r4
+       li      r4,0
+        sync
+1:
+        dcbf    0,r4
+        addi    r4,r4,32                /* Go to start of next cache line */
+        bdnz    1b
+
+       /* Flush and disable the L1 data cache */
+       mfspr   r6,SPRN_LDSTCR
+       lis     r3,0xfff0       /* read from ROM for displacement flush */
+       li      r4,0xfe         /* start with only way 0 unlocked */
+       li      r5,128          /* 128 lines in each way */
+1:     mtctr   r5
+       rlwimi  r6,r4,0,24,31
+       mtspr   SPRN_LDSTCR,r6
+       sync
+       isync
+2:     lwz     r0,0(r3)        /* touch each cache line */
+       addi    r3,r3,32
+       bdnz    2b
+       rlwinm  r4,r4,1,24,30   /* move on to the next way */
+       ori     r4,r4,1
+       cmpwi   r4,0xff         /* all done? */
+       bne     1b
+       /* now unlock the L1 data cache */
+       li      r4,0
+       rlwimi  r6,r4,0,24,31
+       sync
+       mtspr   SPRN_LDSTCR,r6
+       sync
+       isync
+
+       /* Flush the L2 cache using the hardware assist */
+       mfspr   r3,L2CR
+       cmpwi   r3,0            /* check if it is enabled first */
+       bge     4f
+       oris    r0,r3,(L2CR_L2IO_745x|L2CR_L2DO_745x)@h
+       b       2f
+       /* When disabling/locking L2, code must be in L1 */
+       .balign 32
+1:     mtspr   L2CR,r0         /* lock the L2 cache */
+3:     sync
+       isync
+       b       1f
+2:     b       3f
+3:     sync
+       isync
+       b       1b
+1:     sync
+       isync
+       ori     r0,r3,L2CR_L2HWF_745x
+       sync
+       mtspr   L2CR,r0         /* set the hardware flush bit */
+3:     mfspr   r0,L2CR         /* wait for it to go to 0 */
+       andi.   r0,r0,L2CR_L2HWF_745x
+       bne     3b
+       sync
+       rlwinm  r3,r3,0,~L2CR_L2E
+       b       2f
+       /* When disabling L2, code must be in L1 */
+       .balign 32
+1:     mtspr   L2CR,r3         /* disable the L2 cache */
+3:     sync
+       isync
+       b       1f
+2:     b       3f
+3:     sync
+       isync
+       b       1b
+1:     sync
+       isync
+       oris    r4,r3,L2CR_L2I@h
+       mtspr   L2CR,r4
+       sync
+       isync
+1:     mfspr   r4,L2CR
+       andis.  r0,r4,L2CR_L2I@h
+       bne     1b
+       sync
+
+BEGIN_FTR_SECTION
+       /* Flush the L3 cache using the hardware assist */
+4:     mfspr   r3,L3CR
+       cmpwi   r3,0            /* check if it is enabled */
+       bge     6f
+       oris    r0,r3,L3CR_L3IO@h
+       ori     r0,r0,L3CR_L3DO
+       sync
+       mtspr   L3CR,r0         /* lock the L3 cache */
+       sync
+       isync
+       ori     r0,r0,L3CR_L3HWF
+       sync
+       mtspr   L3CR,r0         /* set the hardware flush bit */
+5:     mfspr   r0,L3CR         /* wait for it to go to zero */
+       andi.   r0,r0,L3CR_L3HWF
+       bne     5b
+       rlwinm  r3,r3,0,~L3CR_L3E
+       sync
+       mtspr   L3CR,r3         /* disable the L3 cache */
+       sync
+       ori     r4,r3,L3CR_L3I
+       mtspr   SPRN_L3CR,r4
+1:     mfspr   r4,SPRN_L3CR
+       andi.   r0,r4,L3CR_L3I
+       bne     1b
+       sync
+END_FTR_SECTION_IFSET(CPU_FTR_L3CR)
+
+6:     mfspr   r0,HID0         /* now disable the L1 data cache */
+       rlwinm  r0,r0,0,~HID0_DCE
+       mtspr   HID0,r0
+       sync
+       isync
+       mtmsr   r11             /* restore DR and EE */
+       isync
+       blr
diff -urN linux/arch/ppc/platforms/Makefile linux/arch/ppc/platforms/Makefile
--- linux/arch/ppc/platforms/Makefile   2005/01/13 14:05:32     1.26
+++ linux/arch/ppc/platforms/Makefile   2005/02/07 02:54:35     1.27
@@ -11,7 +11,7 @@
 endif
 obj-$(CONFIG_PPC_PMAC)         += pmac_pic.o pmac_setup.o pmac_time.o \
                                        pmac_feature.o pmac_pci.o pmac_sleep.o \
-                                       pmac_low_i2c.o
+                                       pmac_low_i2c.o pmac_cache.o
 obj-$(CONFIG_PPC_CHRP)         += chrp_setup.o chrp_time.o chrp_pci.o
 obj-$(CONFIG_PPC_PREP)         += prep_pci.o prep_setup.o
 ifeq ($(CONFIG_PPC_PMAC),y)
diff -urN linux/arch/ppc/platforms/chrp_pci.c 
linux/arch/ppc/platforms/chrp_pci.c
--- linux/arch/ppc/platforms/chrp_pci.c 2005/01/13 14:05:32     1.6
+++ linux/arch/ppc/platforms/chrp_pci.c 2005/02/07 02:54:35     1.7
@@ -97,8 +97,10 @@
 rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
                 int len, u32 *val)
 {
+       struct pci_controller *hose = bus->sysdata;
        unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
-               | ((bus->number & 0xff) << 16);
+               | (((bus->number - hose->first_busno) & 0xff) << 16)
+               | (hose->index << 24);
         unsigned long ret = ~0UL;
        int rval;
 
@@ -111,8 +113,10 @@
 rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
                  int len, u32 val)
 {
+       struct pci_controller *hose = bus->sysdata;
        unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
-               | ((bus->number & 0xff) << 16);
+               | (((bus->number - hose->first_busno) & 0xff) << 16)
+               | (hose->index << 24);
        int rval;
 
        rval = call_rtas("write-pci-config", 3, 1, NULL, addr, len, val);
@@ -186,6 +190,22 @@
        iounmap(reg);
 }
 
+/* Marvell Discovery II based Pegasos 2 */
+static void __init setup_peg2(struct pci_controller *hose, struct device_node 
*dev)
+{
+       struct device_node *root = find_path_device("/");
+       struct device_node *rtas;
+
+       rtas = of_find_node_by_name (root, "rtas");
+       if (rtas) {
+               hose->ops = &rtas_pci_ops;
+       } else {
+               printk ("RTAS supporting Pegasos OF not found, please upgrade"
+                       " your firmware\n");
+       }
+       pci_assign_all_busses = 1;
+}
+
 void __init
 chrp_find_bridges(void)
 {
@@ -195,7 +215,7 @@
        struct pci_controller *hose;
        unsigned int *dma;
        char *model, *machine;
-       int is_longtrail = 0, is_mot = 0;
+       int is_longtrail = 0, is_mot = 0, is_pegasos = 0;
        struct device_node *root = find_path_device("/");
 
        /*
@@ -207,6 +227,10 @@
        if (machine != NULL) {
                is_longtrail = strncmp(machine, "IBM,LongTrail", 13) == 0;
                is_mot = strncmp(machine, "MOT", 3) == 0;
+               if (strncmp(machine, "Pegasos2", 8) == 0)
+                       is_pegasos = 2;
+               else if (strncmp(machine, "Pegasos", 7) == 0)
+                       is_pegasos = 1;
        }
        for (dev = root->child; dev != NULL; dev = dev->sibling) {
                if (dev->type == NULL || strcmp(dev->type, "pci") != 0)
@@ -257,6 +281,10 @@
                        hose->ops = &gg2_pci_ops;
                        hose->cfg_data = p;
                        gg2_pci_config_base = p;
+               } else if (is_pegasos == 1) {
+                       setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc);
+               } else if (is_pegasos == 2) {
+                       setup_peg2(hose, dev);
                } else {
                        printk("No methods for %s (model %s), using RTAS\n",
                               dev->full_name, model);
@@ -275,5 +303,7 @@
                }
        }
 
-       ppc_md.pcibios_fixup = chrp_pcibios_fixup;
+       /* Do not fixup interrupts from OF tree on pegasos */
+       if (is_pegasos == 0)
+               ppc_md.pcibios_fixup = chrp_pcibios_fixup;
 }
diff -urN linux/arch/ppc/platforms/chrp_setup.c 
linux/arch/ppc/platforms/chrp_setup.c
--- linux/arch/ppc/platforms/chrp_setup.c       2005/01/13 14:05:32     1.17
+++ linux/arch/ppc/platforms/chrp_setup.c       2005/02/07 02:54:35     1.18
@@ -37,6 +37,7 @@
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
 #include <linux/initrd.h>
+#include <linux/module.h>
 
 #include <asm/io.h>
 #include <asm/pgtable.h>
@@ -68,6 +69,9 @@
 extern unsigned long pmac_find_end_of_memory(void);
 extern int of_show_percpuinfo(struct seq_file *, int);
 
+int _chrp_type;
+EXPORT_SYMBOL(_chrp_type);
+
 /*
  * XXX this should be in xmon.h, but putting it there means xmon.h
  * has to include <linux/interrupt.h> (to get irqreturn_t), which
@@ -214,8 +218,33 @@
 }
 
 
-void __init
-chrp_setup_arch(void)
+static void __init pegasos_set_l2cr(void)
+{
+       struct device_node *np;
+
+       /* On Pegasos, enable the l2 cache if needed, as the OF forgets it */
+       if (_chrp_type != _CHRP_Pegasos)
+               return;
+
+       /* Enable L2 cache if needed */
+       np = find_type_devices("cpu");
+       if (np != NULL) {
+               unsigned int *l2cr = (unsigned int *)
+                       get_property (np, "l2cr", NULL);
+               if (l2cr == NULL) {
+                       printk ("Pegasos l2cr : no cpu l2cr property found\n");
+                       return;
+               }
+               if (!((*l2cr) & 0x80000000)) {
+                       printk ("Pegasos l2cr : L2 cache was not active, "
+                               "activating\n");
+                       _set_L2CR(0);
+                       _set_L2CR((*l2cr) | 0x80000000);
+               }
+       }
+}
+
+void __init chrp_setup_arch(void)
 {
        struct device_node *device;
 
@@ -232,6 +261,9 @@
 #endif
                ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */
 
+       /* On pegasos, enable the L2 cache if not already done by OF */
+       pegasos_set_l2cr();
+
        /* Lookup PCI host bridges */
        chrp_find_bridges();
 
@@ -402,15 +434,17 @@
 
        chrp_find_openpic();
 
-       prom_get_irq_senses(init_senses, NUM_8259_INTERRUPTS, NR_IRQS);
-       OpenPIC_InitSenses = init_senses;
-       OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS;
-
-       openpic_init(NUM_8259_INTERRUPTS);
-       /* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
-       openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
-                              i8259_irq);
+       if (OpenPIC_Addr) {
+               prom_get_irq_senses(init_senses, NUM_8259_INTERRUPTS, NR_IRQS);
+               OpenPIC_InitSenses = init_senses;
+               OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS;
+
+               openpic_init(NUM_8259_INTERRUPTS);
+               /* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
+               openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
+                                      i8259_irq);
 
+       }
        for (i = 0; i < NUM_8259_INTERRUPTS; i++)
                irq_desc[i].handler = &i8259_pic;
        i8259_init(chrp_int_ack);
@@ -450,6 +484,9 @@
 chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
          unsigned long r6, unsigned long r7)
 {
+       struct device_node *root = find_path_device ("/");
+       char *machine = NULL;
+
 #ifdef CONFIG_BLK_DEV_INITRD
        /* take care of initrd if we have one */
        if ( r6 )
@@ -464,12 +501,29 @@
        DMA_MODE_WRITE = 0x48;
        isa_io_base = CHRP_ISA_IO_BASE;         /* default value */
 
+       if (root)
+               machine = get_property(root, "model", NULL);
+       if (machine && strncmp(machine, "Pegasos", 7) == 0) {
+               _chrp_type = _CHRP_Pegasos;
+       } else if (machine && strncmp(machine, "IBM", 3) == 0) {
+               _chrp_type = _CHRP_IBM;
+       } else if (machine && strncmp(machine, "MOT", 3) == 0) {
+               _chrp_type = _CHRP_Motorola;
+       } else {
+               /* Let's assume it is an IBM chrp if all else fails */
+               _chrp_type = _CHRP_IBM;
+       }
+
        ppc_md.setup_arch     = chrp_setup_arch;
        ppc_md.show_percpuinfo = of_show_percpuinfo;
        ppc_md.show_cpuinfo   = chrp_show_cpuinfo;
+
        ppc_md.irq_canonicalize = chrp_irq_canonicalize;
        ppc_md.init_IRQ       = chrp_init_IRQ;
-       ppc_md.get_irq        = openpic_get_irq;
+       if (_chrp_type == _CHRP_Pegasos)
+               ppc_md.get_irq        = i8259_irq;
+       else
+               ppc_md.get_irq        = openpic_get_irq;
 
        ppc_md.init           = chrp_init2;
 
diff -urN linux/arch/ppc/platforms/chrp_time.c 
linux/arch/ppc/platforms/chrp_time.c
--- linux/arch/ppc/platforms/chrp_time.c        2003/09/30 14:27:19     1.4
+++ linux/arch/ppc/platforms/chrp_time.c        2005/02/07 02:54:35     1.5
@@ -41,6 +41,8 @@
        int base;
 
        rtcs = find_compatible_devices("rtc", "pnpPNP,b00");
+       if (rtcs == NULL)
+               rtcs = find_compatible_devices("rtc", "ds1385-rtc");
        if (rtcs == NULL || rtcs->addrs == NULL)
                return 0;
        base = rtcs->addrs[0].address;
diff -urN linux/arch/ppc/platforms/cpci690.c linux/arch/ppc/platforms/cpci690.c
--- linux/arch/ppc/platforms/cpci690.c  2005/01/13 14:05:32     1.1
+++ linux/arch/ppc/platforms/cpci690.c  2005/02/07 02:54:35     1.2
@@ -289,35 +289,6 @@
        return;
 }
 
-static int __init
-cpci690_fixup_pd(void)
-{
-#if defined(CONFIG_SERIAL_MPSC)
-       struct list_head        *entry;
-       struct platform_device  *pd;
-       struct device           *dev;
-       struct mpsc_pd_dd       *dd;
-
-       list_for_each(entry, &platform_bus_type.devices.list) {
-               dev = container_of(entry, struct device, bus_list);
-               pd = container_of(dev, struct platform_device, dev);
-
-               if (!strncmp(pd->name, MPSC_CTLR_NAME, BUS_ID_SIZE)) {
-                       dd = (struct mpsc_pd_dd *) dev_get_drvdata(&pd->dev);
-
-                       dd->max_idle = 40;
-                       dd->default_baud = 9600;
-                       dd->brg_clk_src = 8;
-                       dd->brg_clk_freq = 133000000;
-               }
-       }
-#endif
-
-       return 0;
-}
-
-subsys_initcall(cpci690_fixup_pd);
-
 static void __init
 cpci690_setup_arch(void)
 {
@@ -359,6 +330,50 @@
        return;
 }
 
+/* Platform device data fixup routines. */
+#if defined(CONFIG_SERIAL_MPSC)
+static void __init
+cpci690_fixup_mpsc_pdata(struct platform_device *pdev)
+{
+       struct mpsc_pdata *pdata;
+
+       pdata = (struct mpsc_pdata *)pdev->dev.platform_data;
+
+       pdata->max_idle = 40;
+       pdata->default_baud = 9600;
+       pdata->brg_clk_src = 8;
+       pdata->brg_clk_freq = 133000000;
+
+       return;
+}
+
+static int __init
+cpci690_platform_notify(struct device *dev)
+{
+       static struct {
+               char    *bus_id;
+               void    ((*rtn)(struct platform_device *pdev));
+       } dev_map[] = {
+               { MPSC_CTLR_NAME "0", cpci690_fixup_mpsc_pdata },
+               { MPSC_CTLR_NAME "1", cpci690_fixup_mpsc_pdata },
+       };
+       struct platform_device  *pdev;
+       int     i;
+
+       if (dev && dev->bus_id)
+               for (i=0; i<ARRAY_SIZE(dev_map); i++)
+                       if (!strncmp(dev->bus_id, dev_map[i].bus_id,
+                               BUS_ID_SIZE)) {
+
+                               pdev = container_of(dev,
+                                       struct platform_device, dev);
+                               dev_map[i].rtn(pdev);
+                       }
+
+       return 0;
+}
+#endif
+
 static void
 cpci690_reset_board(void)
 {
@@ -489,5 +504,9 @@
        ppc_md.early_serial_map = cpci690_early_serial_map;
 #endif /* CONFIG_KGDB */
 
+#if defined(CONFIG_SERIAL_MPSC)
+       platform_notify = cpci690_platform_notify;
+#endif
+
        return;
 }
diff -urN linux/arch/ppc/platforms/ev64260.c linux/arch/ppc/platforms/ev64260.c
--- linux/arch/ppc/platforms/ev64260.c  2005/01/13 14:05:32     1.1
+++ linux/arch/ppc/platforms/ev64260.c  2005/02/07 02:54:35     1.2
@@ -294,7 +294,7 @@
 
         /* Lookup PCI host bridges */
         if (mv64x60_init(&bh, &si))
-                printk("Bridge initialization failed.\n");
+                printk(KERN_ERR "Bridge initialization failed.\n");
 
        pci_dram_offset = 0; /* System mem at same addr on PCI & cpu bus */
        ppc_md.pci_swizzle = common_swizzle;
@@ -337,7 +337,8 @@
 #endif
 
                if (early_serial_setup(&port) != 0)
-                       printk("Early serial init of port 0 failed\n");
+                       printk(KERN_WARNING "Early serial init of port 0"
+                               "failed\n");
 
                first_time = 0;
        }
@@ -351,35 +352,6 @@
 }
 #endif
 
-static int __init
-ev64260_fixup_pd(void)
-{
-#if defined(CONFIG_SERIAL_MPSC)
-       struct list_head        *entry;
-       struct platform_device  *pd;
-       struct device           *dev;
-       struct mpsc_pd_dd       *dd;
-
-       list_for_each(entry, &platform_bus_type.devices.list) {
-               dev = container_of(entry, struct device, bus_list);
-               pd = container_of(dev, struct platform_device, dev);
-
-               if (!strncmp(pd->name, MPSC_CTLR_NAME, BUS_ID_SIZE)) {
-                       dd = (struct mpsc_pd_dd *) dev_get_drvdata(&pd->dev);
-
-                       dd->max_idle = 40;
-                       dd->default_baud = EV64260_DEFAULT_BAUD;
-                       dd->brg_clk_src = EV64260_MPSC_CLK_SRC;
-                       dd->brg_clk_freq = EV64260_MPSC_CLK_FREQ;
-               }
-       }
-#endif
-
-       return 0;
-}
-
-subsys_initcall(ev64260_fixup_pd);
-
 static void __init
 ev64260_setup_arch(void)
 {
@@ -417,8 +389,8 @@
        ev64260_early_serial_map();
 #endif
 
-       printk(BOARD_VENDOR " " BOARD_MACHINE "\n");
-       printk("EV-64260-BP port (C) 2001 MontaVista Software, Inc. 
(source@mvista.com)\n");
+       printk(KERN_INFO "%s %s port (C) 2001 MontaVista Software, Inc."
+               "(source@mvista.com)\n", BOARD_VENDOR, BOARD_MACHINE);
 
        if (ppc_md.progress)
                ppc_md.progress("ev64260_setup_arch: exit", 0);
@@ -426,6 +398,50 @@
        return;
 }
 
+/* Platform device data fixup routines. */
+#if defined(CONFIG_SERIAL_MPSC)
+static void __init
+ev64260_fixup_mpsc_pdata(struct platform_device *pdev)
+{
+       struct mpsc_pdata *pdata;
+
+       pdata = (struct mpsc_pdata *)pdev->dev.platform_data;
+
+       pdata->max_idle = 40;
+       pdata->default_baud = EV64260_DEFAULT_BAUD;
+       pdata->brg_clk_src = EV64260_MPSC_CLK_SRC;
+       pdata->brg_clk_freq = EV64260_MPSC_CLK_FREQ;
+
+       return;
+}
+
+static int __init
+ev64260_platform_notify(struct device *dev)
+{
+       static struct {
+               char    *bus_id;
+               void    ((*rtn)(struct platform_device *pdev));
+       } dev_map[] = {
+               { MPSC_CTLR_NAME "0", ev64260_fixup_mpsc_pdata },
+               { MPSC_CTLR_NAME "1", ev64260_fixup_mpsc_pdata },
+       };
+       struct platform_device  *pdev;
+       int     i;
+
+       if (dev && dev->bus_id)
+               for (i=0; i<ARRAY_SIZE(dev_map); i++)
+                       if (!strncmp(dev->bus_id, dev_map[i].bus_id,
+                               BUS_ID_SIZE)) {
+
+                               pdev = container_of(dev,
+                                       struct platform_device, dev);
+                               dev_map[i].rtn(pdev);
+                       }
+
+       return 0;
+}
+#endif
+
 static void
 ev64260_reset_board(void *addr)
 {
@@ -462,7 +478,7 @@
        /* map bootrom back in to gt @ reset defaults */
        mv64x60_set_32bit_window(&bh, MV64x60_CPU2BOOT_WIN,
                                                0xff800000, 8*1024*1024, 0);
-       bh.ci->disable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN);
+       bh.ci->enable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN);
 
        /* move reg base back to default, setup default pci0 */
        mv64x60_write(&bh, MV64x60_INTERNAL_SPACE_DECODE,
@@ -531,7 +547,7 @@
 
        freq = ev64260_get_bus_speed()/4;
 
-       printk("time_init: decrementer frequency = %lu.%.6lu MHz\n",
+       printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n",
               freq/1000000, freq%1000000);
 
        tb_ticks_per_jiffy = freq / HZ;
@@ -627,5 +643,9 @@
 
 #endif
 
+#if defined(CONFIG_SERIAL_MPSC)
+       platform_notify = ev64260_platform_notify;
+#endif
+
        return;
 }
diff -urN linux/arch/ppc/platforms/katana.c linux/arch/ppc/platforms/katana.c
--- linux/arch/ppc/platforms/katana.c   2005/01/13 14:05:32     1.1
+++ linux/arch/ppc/platforms/katana.c   2005/02/07 02:54:35     1.2
@@ -8,9 +8,9 @@
  * Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il
  * Based on code done by - Mark A. Greer <mgreer@mvista.com>
  *
- * This program is free software; you can redistribute  it and/or modify it
- * under  the terms of  the GNU General  Public License as published by the
- * Free Software Foundation;  either version 2 of the  License, or (at your
+ * 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.
  */
 /*
@@ -194,6 +194,14 @@
        bd_cfg_0 = in_8((volatile char *)(cpld_base + KATANA_CPLD_BD_CFG_0));
 
        switch (bd_cfg_0 & KATANA_CPLD_BD_CFG_0_SYSCLK_MASK) {
+       case KATANA_CPLD_BD_CFG_0_SYSCLK_200:
+               return 200000000;
+               break;
+
+       case KATANA_CPLD_BD_CFG_0_SYSCLK_166:
+               return 166666666;
+               break;
+
        case KATANA_CPLD_BD_CFG_0_SYSCLK_133:
                return 133333333;
                break;
@@ -234,7 +242,7 @@
        /* Config GPP intr ctlr to respond to level trigger */
        mv64x60_set_bits(&bh, MV64x60_COMM_ARBITER_CNTL, (1<<10));
 
-       /* XXXX Erranum FEr PCI-#8 */
+       /* Erranum FEr PCI-#8 */
        mv64x60_clr_bits(&bh, MV64x60_PCI0_CMD, (1<<5) | (1<<9));
        mv64x60_clr_bits(&bh, MV64x60_PCI1_CMD, (1<<5) | (1<<9));
 
@@ -392,7 +400,7 @@
 
        /* Lookup PCI host bridges */
        if (mv64x60_init(&bh, &si))
-               printk("Bridge initialization failed.\n");
+               printk(KERN_WARNING "Bridge initialization failed.\n");
 
        pci_dram_offset = 0; /* sys mem at same addr on PCI & cpu bus */
        ppc_md.pci_swizzle = common_swizzle;
@@ -433,7 +441,7 @@
         * avoid dirty data in cache
         */
        if (PVR_REV(mfspr(PVR)) == 0x0200) {
-               printk("DD2.0 detected. Setting L2 cache"
+               printk(KERN_INFO "DD2.0 detected. Setting L2 cache"
                        "to Writethrough mode\n");
                _set_L2CR(L2CR_L2E | L2CR_L2PE | L2CR_L2WT);
        }
@@ -447,83 +455,96 @@
        katana_setup_peripherals();
        katana_enable_ipmi();
 
-       printk("Artesyn Communication Products, LLC - Katana(TM)\n");
+       printk(KERN_INFO "Artesyn Communication Products, LLC - Katana(TM)\n");
        if (ppc_md.progress)
                ppc_md.progress("katana_setup_arch: exit", 0);
        return;
 }
 
-/* Platform device data fixup routine. */
-static int __init
-katana_fixup_pd(void)
-{
-       struct list_head        *entry;
-       struct platform_device  *pd;
-       struct device           *dev;
+/* Platform device data fixup routines. */
 #if defined(CONFIG_SERIAL_MPSC)
-       struct mpsc_pd_dd       *dd;
+static void __init
+katana_fixup_mpsc_pdata(struct platform_device *pdev)
+{
+       struct mpsc_pdata *pdata;
+
+       pdata = (struct mpsc_pdata *)pdev->dev.platform_data;
+
+       pdata->max_idle = 40;
+       pdata->default_baud = KATANA_DEFAULT_BAUD;
+       pdata->brg_clk_src = KATANA_MPSC_CLK_SRC;
+       pdata->brg_clk_freq = KATANA_MPSC_CLK_FREQ;
+
+       return;
+}
 #endif
+
 #if defined(CONFIG_MV643XX_ETH)
-       struct mv64xxx_eth_pd_dd *eth_dd;
+static void __init
+katana_fixup_eth_pdata(struct platform_device *pdev)
+{
+       struct mv64xxx_eth_platform_data *eth_pd;
        static u16 phy_addr[] = {
                KATANA_ETH0_PHY_ADDR,
                KATANA_ETH1_PHY_ADDR,
                KATANA_ETH2_PHY_ADDR,
        };
-       struct resource *rx_r;
-       struct resource *tx_r;
-       int             rx_size = KATANA_ETH_RX_QUEUE_SIZE * ETH_DESC_SIZE;
-       int             tx_size = KATANA_ETH_TX_QUEUE_SIZE * ETH_DESC_SIZE;
-#endif
+       int     rx_size = KATANA_ETH_RX_QUEUE_SIZE * MV64340_ETH_DESC_SIZE;
+       int     tx_size = KATANA_ETH_TX_QUEUE_SIZE * MV64340_ETH_DESC_SIZE;
 
-       list_for_each(entry, &platform_bus_type.devices.list) {
-               dev = container_of(entry, struct device, bus_list);
-               pd = container_of(dev, struct platform_device, dev);
+       eth_pd = pdev->dev.platform_data;
+       eth_pd->force_phy_addr = 1;
+       eth_pd->phy_addr = phy_addr[pdev->id];
+       eth_pd->tx_queue_size = KATANA_ETH_TX_QUEUE_SIZE;
+       eth_pd->rx_queue_size = KATANA_ETH_RX_QUEUE_SIZE;
+       eth_pd->tx_sram_addr = mv643xx_sram_alloc(tx_size);
 
-#if defined(CONFIG_SERIAL_MPSC)
-               if (!strncmp(pd->name, MPSC_CTLR_NAME, BUS_ID_SIZE)) {
-                       dd = (struct mpsc_pd_dd *)dev_get_drvdata(&pd->dev);
+       if (eth_pd->tx_sram_addr)
+               eth_pd->tx_sram_size = tx_size;
+       else
+               printk(KERN_ERR "mv643xx_sram_alloc failed\n");
 
-                       dd->max_idle = 40;      /* XXXX what should be? */
-                       dd->default_baud = KATANA_DEFAULT_BAUD;
-                       dd->brg_clk_src = KATANA_MPSC_CLK_SRC;
-                       dd->brg_clk_freq = KATANA_MPSC_CLK_FREQ;
-               }
+       eth_pd->rx_sram_addr = mv643xx_sram_alloc(rx_size);
+       if (eth_pd->rx_sram_addr)
+               eth_pd->rx_sram_size = rx_size;
+       else
+               printk(KERN_ERR "mv643xx_sram_alloc failed\n");
+}
+#endif
+
+static int __init
+katana_platform_notify(struct device *dev)
+{
+       static struct {
+               char    *bus_id;
+               void    ((*rtn)(struct platform_device *pdev));
+       } dev_map[] = {
+#if defined(CONFIG_SERIAL_MPSC)
+               { MPSC_CTLR_NAME "0", katana_fixup_mpsc_pdata },
+               { MPSC_CTLR_NAME "1", katana_fixup_mpsc_pdata },
 #endif
 #if defined(CONFIG_MV643XX_ETH)
-               if (!strncmp(pd->name, MV64XXX_ETH_NAME, BUS_ID_SIZE)) {
-                       eth_dd = (struct mv64xxx_eth_pd_dd *)
-                                               dev_get_drvdata(&pd->dev);
-                       eth_dd->phy_addr = phy_addr[pd->id];
-                       eth_dd->port_config = KATANA_ETH_PORT_CONFIG_VALUE;
-                       eth_dd->port_config_extend =
-                                       KATANA_ETH_PORT_CONFIG_EXTEND_VALUE;
-                       eth_dd->port_sdma_config =
-                                       KATANA_ETH_PORT_SDMA_CONFIG_VALUE;
-                       eth_dd->port_serial_control =
-                                       KATANA_ETH_PORT_SERIAL_CONTROL_VALUE;
-                       eth_dd->tx_queue_size = KATANA_ETH_TX_QUEUE_SIZE;
-                       eth_dd->rx_queue_size = KATANA_ETH_RX_QUEUE_SIZE;
-
-                       rx_r = &pd->resource[5];
-                       rx_r->start = KATANA_INTERNAL_SRAM_BASE +
-                                               (rx_size + tx_size) * pd->id;
-                       rx_r->end = rx_r->start + rx_size - 1;
-                       rx_r->flags = IORESOURCE_MEM;
-
-                       tx_r = &pd->resource[6];
-                       tx_r->start = rx_r->start + rx_size;
-                       tx_r->end = tx_r->start + tx_size - 1;
-                       tx_r->flags = IORESOURCE_MEM;
-               }
+               { MV64XXX_ETH_NAME "0", katana_fixup_eth_pdata },
+               { MV64XXX_ETH_NAME "1", katana_fixup_eth_pdata },
+               { MV64XXX_ETH_NAME "2", katana_fixup_eth_pdata },
 #endif
-       }
+       };
+       struct platform_device  *pdev;
+       int     i;
+
+       if (dev && dev->bus_id)
+               for (i=0; i<ARRAY_SIZE(dev_map); i++)
+                       if (!strncmp(dev->bus_id, dev_map[i].bus_id,
+                               BUS_ID_SIZE)) {
+
+                               pdev = container_of(dev,
+                                       struct platform_device, dev);
+                               dev_map[i].rtn(pdev);
+                       }
 
        return 0;
 }
 
-subsys_initcall(katana_fixup_pd);
-
 static void
 katana_restart(char *cmd)
 {
@@ -595,7 +616,7 @@
 
        freq = katana_bus_freq() / 4;
 
-       printk("time_init: decrementer frequency = %lu.%.6lu MHz\n",
+       printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n",
               freq / 1000000, freq % 1000000);
 
        tb_ticks_per_jiffy = freq / HZ;
@@ -654,7 +675,10 @@
        mv64x60_progress_init(KATANA_BRIDGE_REG_BASE);
 #endif
 
-       katana_set_bat(); /* Need for katana_find_end_of_memory and progress */
+#if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH)
+       platform_notify = katana_platform_notify;
+#endif
 
+       katana_set_bat(); /* Need for katana_find_end_of_memory and progress */
        return;
 }
diff -urN linux/arch/ppc/platforms/katana.h linux/arch/ppc/platforms/katana.h
--- linux/arch/ppc/platforms/katana.h   2005/01/13 14:05:32     1.1
+++ linux/arch/ppc/platforms/katana.h   2005/02/07 02:54:35     1.2
@@ -8,9 +8,9 @@
  * Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il
  * Based on code done by Mark A. Greer <mgreer@mvista.com>
  *
- * This program is free software; you can redistribute  it and/or modify it
- * under  the terms of  the GNU General  Public License as published by the
- * Free Software Foundation;  either version 2 of the  License, or (at your
+ * 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.
  */
 
@@ -107,6 +107,8 @@
 #define KATANA_CPLD_RST_CMD_HR                 0x01
 
 #define KATANA_CPLD_BD_CFG_0_SYSCLK_MASK       0xc0
+#define KATANA_CPLD_BD_CFG_0_SYSCLK_200                0x00
+#define KATANA_CPLD_BD_CFG_0_SYSCLK_166                0x80
 #define KATANA_CPLD_BD_CFG_0_SYSCLK_133                0xc0
 #define KATANA_CPLD_BD_CFG_0_SYSCLK_100                0x40
 
@@ -170,8 +172,8 @@
 #define KATANA_PRODUCT_ID_750i                 0x02
 #define KATANA_PRODUCT_ID_752i                 0x04
 
-#define KATANA_ETH_TX_QUEUE_SIZE               1050
-#define KATANA_ETH_RX_QUEUE_SIZE               450
+#define KATANA_ETH_TX_QUEUE_SIZE               800
+#define KATANA_ETH_RX_QUEUE_SIZE               400
 
 #define        KATANA_ETH_PORT_CONFIG_VALUE                    \
        ETH_UNICAST_NORMAL_MODE                 |       \
diff -urN linux/arch/ppc/platforms/pmac_cpufreq.c 
linux/arch/ppc/platforms/pmac_cpufreq.c
--- linux/arch/ppc/platforms/pmac_cpufreq.c     2004/12/04 18:16:00     1.14
+++ linux/arch/ppc/platforms/pmac_cpufreq.c     2005/02/07 02:54:35     1.15
@@ -154,6 +154,14 @@
        return 0;
 }
 
+static unsigned int __pmac dfs_get_cpu_speed(unsigned int cpu)
+{
+       if (mfspr(HID1) & HID1_DFS)
+               return low_freq;
+       else
+               return hi_freq;
+}
+
 
 /* Switch CPU speed using slewing GPIOs
  */
@@ -229,10 +237,6 @@
        /* Save & disable L2 and L3 caches */
        save_l3cr = _get_L3CR();        /* (returns -1 if not available) */
        save_l2cr = _get_L2CR();        /* (returns -1 if not available) */
-       if (save_l3cr != 0xffffffff && (save_l3cr & L3CR_L3E) != 0)
-               _set_L3CR(save_l3cr & 0x7fffffff);
-       if (save_l2cr != 0xffffffff && (save_l2cr & L2CR_L2E) != 0)
-               _set_L2CR(save_l2cr & 0x7fffffff);
 
        /* Send the new speed command. My assumption is that this command
         * will cause PLL_CFG[0..3] to be changed next time CPU goes to sleep
@@ -458,14 +462,13 @@
 {
        struct device_node *volt_gpio_np;
        u32 *reg;
+       struct cpufreq_driver *driver = &pmac_cpufreq_driver;
 
        /* OF only reports the high frequency */
        hi_freq = cur_freq;
        low_freq = cur_freq/2;
-       if (mfspr(HID1) & HID1_DFS)
-               cur_freq = low_freq;
-       else
-               cur_freq = hi_freq;
+       driver->get = dfs_get_cpu_speed;
+       cur_freq = driver->get(0);
 
        volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select");
        if (!volt_gpio_np){
diff -urN linux/arch/ppc/platforms/pmac_feature.c 
linux/arch/ppc/platforms/pmac_feature.c
--- linux/arch/ppc/platforms/pmac_feature.c     2005/01/25 04:28:02     1.17
+++ linux/arch/ppc/platforms/pmac_feature.c     2005/02/07 02:54:35     1.18
@@ -1177,6 +1177,39 @@
                        (void)MACIO_IN32(KEYLARGO_FCR3);
                        udelay(10);
                }
+               if (macio->type == macio_intrepid) {
+                       /* wait for clock stopped bits to clear */
+                       u32 test0 = 0, test1 = 0;
+                       u32 status0, status1;
+                       int timeout = 1000;
+
+                       UNLOCK(flags);
+                       switch (number) {
+                       case 0:
+                               test0 = UNI_N_CLOCK_STOPPED_USB0;
+                               test1 = UNI_N_CLOCK_STOPPED_USB0PCI;
+                               break;
+                       case 2:
+                               test0 = UNI_N_CLOCK_STOPPED_USB1;
+                               test1 = UNI_N_CLOCK_STOPPED_USB1PCI;
+                               break;
+                       case 4:
+                               test0 = UNI_N_CLOCK_STOPPED_USB2;
+                               test1 = UNI_N_CLOCK_STOPPED_USB2PCI;
+                               break;
+                       }
+                       do {
+                               if (--timeout <= 0) {
+                                       printk(KERN_ERR "core99_usb_enable: "
+                                              "Timeout waiting for clocks\n");
+                                       break;
+                               }
+                               mdelay(1);
+                               status0 = UN_IN(UNI_N_CLOCK_STOP_STATUS0);
+                               status1 = UN_IN(UNI_N_CLOCK_STOP_STATUS1);
+                       } while ((status0 & test0) | (status1 & test1));
+                       LOCK(flags);
+               }
        } else {
                /* Turn OFF */
                if (number < 4) {
@@ -1199,20 +1232,20 @@
                        udelay(1);
                }
                if (number == 0) {
-                       MACIO_BIC(KEYLARGO_FCR0, KL0_USB0_CELL_ENABLE);
+                       if (macio->type != macio_intrepid)
+                               MACIO_BIC(KEYLARGO_FCR0, KL0_USB0_CELL_ENABLE);
                        (void)MACIO_IN32(KEYLARGO_FCR0);
                        udelay(1);
                        MACIO_BIS(KEYLARGO_FCR0, (KL0_USB0_PAD_SUSPEND0 | 
KL0_USB0_PAD_SUSPEND1));
                        (void)MACIO_IN32(KEYLARGO_FCR0);
                } else if (number == 2) {
-                       MACIO_BIC(KEYLARGO_FCR0, KL0_USB1_CELL_ENABLE);
+                       if (macio->type != macio_intrepid)
+                               MACIO_BIC(KEYLARGO_FCR0, KL0_USB1_CELL_ENABLE);
                        (void)MACIO_IN32(KEYLARGO_FCR0);
                        udelay(1);
                        MACIO_BIS(KEYLARGO_FCR0, (KL0_USB1_PAD_SUSPEND0 | 
KL0_USB1_PAD_SUSPEND1));
                        (void)MACIO_IN32(KEYLARGO_FCR0);
                } else if (number == 4) {
-                       MACIO_BIC(KEYLARGO_FCR1, KL1_USB2_CELL_ENABLE);
-                       (void)MACIO_IN32(KEYLARGO_FCR1);
                        udelay(1);
                        MACIO_BIS(KEYLARGO_FCR1, (KL1_USB2_PAD_SUSPEND0 | 
KL1_USB2_PAD_SUSPEND1));
                        (void)MACIO_IN32(KEYLARGO_FCR1);
@@ -1535,22 +1568,17 @@
        u32 temp;
 
        MACIO_BIC(KEYLARGO_FCR0,KL0_SCCA_ENABLE | KL0_SCCB_ENABLE |
-                               KL0_SCC_CELL_ENABLE |
-                               KL0_USB0_CELL_ENABLE | KL0_USB1_CELL_ENABLE);
+                 KL0_SCC_CELL_ENABLE);
 
        MACIO_BIC(KEYLARGO_FCR1,
-               KL1_USB2_CELL_ENABLE |
+                 /*KL1_USB2_CELL_ENABLE |*/
                KL1_I2S0_CELL_ENABLE | KL1_I2S0_CLK_ENABLE_BIT |
                KL1_I2S0_ENABLE | KL1_I2S1_CELL_ENABLE |
                KL1_I2S1_CLK_ENABLE_BIT | KL1_I2S1_ENABLE);
        if (pmac_mb.board_flags & PMAC_MB_MOBILE)
                MACIO_BIC(KEYLARGO_FCR1, KL1_UIDE_RESET_N);
 
-       MACIO_BIS(KEYLARGO_FCR2, KL2_ALT_DATA_OUT);
-
        temp = MACIO_IN32(KEYLARGO_FCR3);
-       temp |= KL3_IT_SHUTDOWN_PLL1 | KL3_IT_SHUTDOWN_PLL2 |
-               KL3_IT_SHUTDOWN_PLL3;
        temp &= ~(KL3_CLK49_ENABLE | KL3_CLK45_ENABLE |
                  KL3_I2S1_CLK18_ENABLE | KL3_I2S0_CLK18_ENABLE);
        if (sleep_mode)
@@ -1558,7 +1586,8 @@
        MACIO_OUT32(KEYLARGO_FCR3, temp);
 
        /* Flush posted writes & wait a bit */
-       (void)MACIO_IN32(KEYLARGO_FCR0); mdelay(1);
+       (void)MACIO_IN32(KEYLARGO_FCR0);
+       mdelay(10);
 }
 
 static int __pmac
@@ -1572,6 +1601,12 @@
            macio->type != macio_intrepid)
                return -ENODEV;
 
+       /* The device-tree contains that in the hwclock node */
+       if (macio->type == macio_intrepid) {
+               UN_OUT(UNI_N_CLOCK_SPREADING, 0);
+               mdelay(40);
+       }
+
        /* We power off the wireless slot in case it was not done
         * by the driver. We don't power it on automatically however
         */
@@ -1634,11 +1669,15 @@
         */
 
        save_unin_clock_ctl = UN_IN(UNI_N_CLOCK_CNTL);
+       /* Note: do not switch GMAC off, driver does it when necessary, WOL 
must keep it
+        * enabled !
+        */
        UN_OUT(UNI_N_CLOCK_CNTL, save_unin_clock_ctl &
-               
~(UNI_N_CLOCK_CNTL_GMAC|UNI_N_CLOCK_CNTL_FW/*|UNI_N_CLOCK_CNTL_PCI*/));
+              
~(/*UNI_N_CLOCK_CNTL_GMAC|*/UNI_N_CLOCK_CNTL_FW/*|UNI_N_CLOCK_CNTL_PCI*/));
        udelay(100);
        UN_OUT(UNI_N_HWINIT_STATE, UNI_N_HWINIT_STATE_SLEEPING);
        UN_OUT(UNI_N_POWER_MGT, UNI_N_POWER_MGT_SLEEP);
+       mdelay(10);
 
        /*
         * FIXME: A bit of black magic with OpenPIC (don't ask me why)
@@ -1710,6 +1749,12 @@
        UN_OUT(UNI_N_CLOCK_CNTL, save_unin_clock_ctl);
        udelay(100);
 
+       /* Restore clock spreading */
+       if (macio->type == macio_intrepid) {
+               UN_OUT(UNI_N_CLOCK_SPREADING, 2);
+               mdelay(40);
+       }
+
        return 0;
 }
 
@@ -1733,6 +1778,33 @@
        }
        if ((pmac_mb.board_flags & PMAC_MB_CAN_SLEEP) == 0)
                return -EPERM;
+
+#ifdef CONFIG_CPU_FREQ_PMAC
+       /* XXX should be elsewhere */
+       if (machine_is_compatible("PowerBook6,5") ||
+           machine_is_compatible("PowerBook6,4") ||
+           machine_is_compatible("PowerBook5,5") ||
+           machine_is_compatible("PowerBook5,4")) {
+               struct device_node *volt_gpio_np;
+               u32 *reg = NULL;
+
+               volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select");
+               if (volt_gpio_np != NULL)
+                       reg = (u32 *)get_property(volt_gpio_np, "reg", NULL);
+               if (reg != NULL) {
+                       /* Set the CPU voltage high if sleeping */
+                       if (value == 1) {
+                               pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL,
+                                                 *reg, 0x05);
+                       } else if (value == 0 && (mfspr(HID1) & HID1_DFS)) {
+                               pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL,
+                                                 *reg, 0x04);
+                       }
+                       mdelay(2);
+               }
+       }
+#endif /* CONFIG_CPU_FREQ_PMAC */
+
        if (value == 1)
                return core99_sleep();
        else if (value == 0)
@@ -1743,6 +1815,18 @@
 #endif /* CONFIG_POWER4 */
 
 static long __pmac
+generic_dev_can_wake(struct device_node* node, long param, long value)
+{
+       /* Todo: eventually check we are really dealing with on-board
+        * video device ...
+        */
+
+       if (pmac_mb.board_flags & PMAC_MB_MAY_SLEEP)
+               pmac_mb.board_flags |= PMAC_MB_CAN_SLEEP;
+       return 0;
+}
+
+static long __pmac
 generic_get_mb_info(struct device_node* node, long param, long value)
 {
        switch(param) {
@@ -1767,6 +1851,7 @@
  */
 static struct feature_table_entry any_features[]  __pmacdata = {
        { PMAC_FTR_GET_MB_INFO,         generic_get_mb_info },
+       { PMAC_FTR_DEVICE_CAN_WAKE,     generic_dev_can_wake },
        { 0, NULL }
 };
 
@@ -1995,7 +2080,7 @@
        },
        {       "PowerBook1,1",                 "PowerBook 101 (Lombard)",
                PMAC_TYPE_101_PBOOK,            paddington_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_MOBILE
+               PMAC_MB_MAY_SLEEP | PMAC_MB_MOBILE
        },
        {       "iMac,1",                       "iMac (first generation)",
                PMAC_TYPE_ORIG_IMAC,            paddington_features,
@@ -2003,23 +2088,23 @@
        },
        {       "PowerMac4,1",                  "iMac \"Flower Power\"",
                PMAC_TYPE_PANGEA_IMAC,          pangea_features,
-               PMAC_MB_CAN_SLEEP
+               PMAC_MB_MAY_SLEEP
        },
        {       "PowerBook4,3",                 "iBook 2 rev. 2",
                PMAC_TYPE_IBOOK2,               pangea_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
        },
        {       "PowerBook4,2",                 "iBook 2",
                PMAC_TYPE_IBOOK2,               pangea_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
        },
        {       "PowerBook4,1",                 "iBook 2",
                PMAC_TYPE_IBOOK2,               pangea_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
        },
        {       "PowerMac4,4",                  "eMac",
                PMAC_TYPE_EMAC,                 core99_features,
-               PMAC_MB_CAN_SLEEP
+               PMAC_MB_MAY_SLEEP
        },
        {       "PowerMac4,2",                  "Flat panel iMac",
                PMAC_TYPE_FLAT_PANEL_IMAC,      pangea_features,
@@ -2043,55 +2128,57 @@
        },
        {       "PowerMac3,2",                  "PowerMac G4 AGP Graphics",
                PMAC_TYPE_SAWTOOTH,             core99_features,
-               PMAC_MB_OLD_CORE99
+               PMAC_MB_MAY_SLEEP | PMAC_MB_OLD_CORE99
        },
        {       "PowerMac3,3",                  "PowerMac G4 AGP Graphics",
                PMAC_TYPE_SAWTOOTH,             core99_features,
-               PMAC_MB_OLD_CORE99
+               PMAC_MB_MAY_SLEEP | PMAC_MB_OLD_CORE99
        },
        {       "PowerMac2,1",                  "iMac FireWire",
                PMAC_TYPE_FW_IMAC,              core99_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_OLD_CORE99
+               PMAC_MB_MAY_SLEEP | PMAC_MB_OLD_CORE99
        },
        {       "PowerMac2,2",                  "iMac FireWire",
                PMAC_TYPE_FW_IMAC,              core99_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_OLD_CORE99
+               PMAC_MB_MAY_SLEEP | PMAC_MB_OLD_CORE99
        },
        {       "PowerBook2,2",                 "iBook FireWire",
                PMAC_TYPE_FW_IBOOK,             core99_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_OLD_CORE99 | 
PMAC_MB_MOBILE
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER |
+               PMAC_MB_OLD_CORE99 | PMAC_MB_MOBILE
        },
        {       "PowerMac5,1",                  "PowerMac G4 Cube",
                PMAC_TYPE_CUBE,                 core99_features,
-               PMAC_MB_OLD_CORE99
+               PMAC_MB_MAY_SLEEP | PMAC_MB_OLD_CORE99
        },
        {       "PowerMac3,4",                  "PowerMac G4 Silver",
                PMAC_TYPE_QUICKSILVER,          core99_features,
-               0
+               PMAC_MB_MAY_SLEEP
        },
        {       "PowerMac3,5",                  "PowerMac G4 Silver",
                PMAC_TYPE_QUICKSILVER,          core99_features,
-               0
+               PMAC_MB_MAY_SLEEP
        },
        {       "PowerBook3,1",                 "PowerBook Pismo",
                PMAC_TYPE_PISMO,                core99_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_OLD_CORE99 | 
PMAC_MB_MOBILE
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER |
+               PMAC_MB_OLD_CORE99 | PMAC_MB_MOBILE
        },
        {       "PowerBook3,2",                 "PowerBook Titanium",
                PMAC_TYPE_TITANIUM,             core99_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
        },
        {       "PowerBook3,3",                 "PowerBook Titanium II",
                PMAC_TYPE_TITANIUM2,            core99_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
        },
        {       "PowerBook3,4",                 "PowerBook Titanium III",
                PMAC_TYPE_TITANIUM3,            core99_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
        },
        {       "PowerBook3,5",                 "PowerBook Titanium IV",
                PMAC_TYPE_TITANIUM4,            core99_features,
-               PMAC_MB_CAN_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE
        },
        {       "RackMac1,1",                   "XServe",
                PMAC_TYPE_RACKMAC,              rackmac_features,
@@ -2103,7 +2190,7 @@
        },
        {       "PowerMac3,6",                  "PowerMac G4 Windtunnel",
                PMAC_TYPE_WINDTUNNEL,           core99_features,
-               0,
+               PMAC_MB_MAY_SLEEP,
        },
        {       "PowerBook5,1",                 "PowerBook G4 17\"",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
@@ -2111,39 +2198,39 @@
        },
        {       "PowerBook5,2",                 "PowerBook G4 15\"",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
        },
        {       "PowerBook5,3",                 "PowerBook G4 17\"",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
        },
        {       "PowerBook5,4",                 "PowerBook G4 15\"",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
        },
        {       "PowerBook5,5",                 "PowerBook G4 17\"",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
        },
        {       "PowerBook6,1",                 "PowerBook G4 12\"",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
        },
        {       "PowerBook6,2",                 "PowerBook G4",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
        },
        {       "PowerBook6,3",                 "iBook G4",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
        },
        {       "PowerBook6,4",                 "PowerBook G4 12\"",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
        },
        {       "PowerBook6,5",                 "iBook G4",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
        },
 #else /* CONFIG_POWER4 */
        {       "PowerMac7,2",                  "PowerMac G5",
@@ -2820,3 +2907,27 @@
 }
 
 #endif /* CONFIG_POWER4 */
+
+/*
+ * Early video resume hook
+ */
+
+static void (*pmac_early_vresume_proc)(void *data) __pmacdata;
+static void *pmac_early_vresume_data __pmacdata;
+
+void pmac_set_early_video_resume(void (*proc)(void *data), void *data)
+{
+       if (_machine != _MACH_Pmac)
+               return;
+       preempt_disable();
+       pmac_early_vresume_proc = proc;
+       pmac_early_vresume_data = data;
+       preempt_enable();
+}
+EXPORT_SYMBOL(pmac_set_early_video_resume);
+
+void __pmac pmac_call_early_video_resume(void)
+{
+       if (pmac_early_vresume_proc)
+               pmac_early_vresume_proc(pmac_early_vresume_data);
+}
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/25 04:28:02     1.14
+++ linux/arch/ppc/platforms/pmac_pci.c 2005/02/07 02:54:35     1.15
@@ -913,8 +913,12 @@
         * (iBook second controller)
         */
        if (dev->vendor == PCI_VENDOR_ID_APPLE
-           && dev->device == PCI_DEVICE_ID_APPLE_KL_USB && !node)
+           && (dev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x10))
+           && !node) {
+               printk(KERN_INFO "Apple USB OHCI %s disabled by firmware\n",
+                      pci_name(dev));
                return -EINVAL;
+       }
 
        if (!node)
                return 0;
diff -urN linux/arch/ppc/platforms/pmac_sleep.S 
linux/arch/ppc/platforms/pmac_sleep.S
--- linux/arch/ppc/platforms/pmac_sleep.S       2003/09/30 14:27:19     1.4
+++ linux/arch/ppc/platforms/pmac_sleep.S       2005/02/07 02:54:35     1.5
@@ -161,12 +161,8 @@
        addi r3,r3,sleep_storage@l
        stw r5,0(r3)
 
-       /* Disable DPM during cache flush */
-       mfspr   r3, SPRN_HID0
-       rlwinm  r3,r3,0,12,10
-       sync
-       mtspr   SPRN_HID0,r3
-       sync
+       /* Flush & disable all caches */
+       bl      flush_disable_caches
 
        /* Turn off data relocation. */
        mfmsr   r3              /* Save MSR in r7 */
@@ -175,8 +171,13 @@
        mtmsr   r3
        isync
 
-       /* Flush & disable L1 cache */
-       bl      __flush_disable_L1
+BEGIN_FTR_SECTION
+       /* Flush any pending L2 data prefetches to work around HW bug */
+       sync
+       lis     r3,0xfff0
+       lwz     r0,0(r3)        /* perform cache-inhibited load to ROM */
+       sync                    /* (caches are disabled at this point) */
+END_FTR_SECTION_IFSET(CPU_FTR_SPEC7450)
 
 /*
  * Set the HID0 and MSR for sleep.
@@ -212,17 +213,16 @@
  * r4 has the physical address of SL_PC(sp) (unused)
  */
 _GLOBAL(core99_wake_up)
-       /* Make sure HID0 no longer contains any sleep bit */
+       /* Make sure HID0 no longer contains any sleep bit and that data cache
+        * is disabled
+        */
        mfspr   r3,HID0
        rlwinm  r3,r3,0,11,7            /* clear SLEEP, NAP, DOZE bits */
+       rlwinm  3,r3,0,18,15            /* clear DCE, ICE */
        mtspr   HID0,r3
        sync
        isync
 
-       /* Won't that cause problems on CPU that doesn't support it ? */
-       lis     r3, 0
-       mtspr   SPRN_MMCR0, r3
-
        /* sanitize MSR */
        mfmsr   r3
        ori     r3,r3,MSR_EE|MSR_IP
@@ -246,10 +246,6 @@
  */
 
 grackle_wake_up:
-       /* Invalidate & enable L1 cache, we don't care about
-        * whatever the ROM may have tried to write to memory
-        */
-       bl      __inval_enable_L1
 
        /* Restore the kernel's segment registers before
         * we do any r1 memory access as we are not sure they
@@ -271,6 +267,11 @@
        /* Restore various CPU config stuffs */
        bl      __restore_cpu_setup
 
+       /* Invalidate & enable L1 cache, we don't care about
+        * whatever the ROM may have tried to write to memory
+        */
+       bl      __inval_enable_L1
+
        /* Restore the BATs, and SDR1.  Then we can turn on the MMU. */
        lwz     r4,SL_SDR1(r1)
        mtsdr1  r4
diff -urN linux/arch/ppc/platforms/85xx/stx_gp3.c 
linux/arch/ppc/platforms/85xx/stx_gp3.c
--- linux/arch/ppc/platforms/85xx/stx_gp3.c     1970/01/01 00:00:00
+++ linux/arch/ppc/platforms/85xx/stx_gp3.c     Mon Feb  7 02:54:36 2005        
1.1
@@ -0,0 +1,381 @@
+/*
+ * arch/ppc/platforms/85xx/stx_gp3.c
+ *
+ * STx GP3 board specific routines
+ *
+ * Dan Malek <dan@embeddededge.com>
+ * Copyright 2004 Embedded Edge, LLC
+ *
+ * Copied from mpc8560_ads.c
+ * Copyright 2002, 2003 Motorola Inc.
+ *
+ * Ported to 2.6, Matt Porter <mporter@kernel.crashing.org>
+ * Copyright 2004-2005 MontaVista Software, 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/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
+#include <linux/blkdev.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/root_dev.h>
+#include <linux/seq_file.h>
+#include <linux/serial.h>
+#include <linux/module.h>
+#include <linux/fsl_devices.h>
+
+#include <asm/system.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+#include <asm/atomic.h>
+#include <asm/time.h>
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/prom.h>
+#include <asm/open_pic.h>
+#include <asm/bootinfo.h>
+#include <asm/pci-bridge.h>
+#include <asm/mpc85xx.h>
+#include <asm/irq.h>
+#include <asm/immap_85xx.h>
+#include <asm/immap_cpm2.h>
+#include <asm/mpc85xx.h>
+#include <asm/ppc_sys.h>
+
+#include <syslib/cpm2_pic.h>
+#include <syslib/ppc85xx_common.h>
+
+extern void cpm2_reset(void);
+
+unsigned char __res[sizeof(bd_t)];
+
+#ifndef CONFIG_PCI
+unsigned long isa_io_base = 0;
+unsigned long isa_mem_base = 0;
+unsigned long pci_dram_offset = 0;
+#endif
+
+/* Internal interrupts are all Level Sensitive, and Positive Polarity */
+static u8 gp3_openpic_initsenses[] __initdata = {
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal  0: L2 
Cache */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal  1: ECM */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal  2: DDR 
DRAM */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal  3: LBIU */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal  4: DMA 0 */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal  5: DMA 1 */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal  6: DMA 2 */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal  7: DMA 3 */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal  8: 
PCI/PCI-X */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal  9: RIO 
Inbound Port Write Error */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 10: RIO 
Doorbell Inbound */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 11: RIO 
Outbound Message */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 12: RIO 
Inbound Message */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 13: TSEC 0 
Transmit */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 14: TSEC 0 
Receive */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 15: Unused 
*/
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 16: Unused 
*/
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 17: Unused 
*/
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 18: TSEC 0 
Receive/Transmit Error */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 19: TSEC 1 
Transmit */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 20: TSEC 1 
Receive */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 21: Unused 
*/
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 22: Unused 
*/
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 23: Unused 
*/
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 24: TSEC 1 
Receive/Transmit Error */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 25: Fast 
Ethernet */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 26: DUART */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 27: I2C */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 28: 
Performance Monitor */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 29: Unused 
*/
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 30: CPM */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),      /* Internal 31: Unused 
*/
+       0x0,                                            /* External  0: */
+#if defined(CONFIG_PCI)
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* External 1: PCI slot 
0 */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* External 2: PCI slot 
1 */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* External 3: PCI slot 
2 */
+       (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),      /* External 4: PCI slot 
3 */
+#else
+       0x0,                            /* External  1: */
+       0x0,                            /* External  2: */
+       0x0,                            /* External  3: */
+       0x0,                            /* External  4: */
+#endif
+       0x0,                            /* External  5: */
+       0x0,                            /* External  6: */
+       0x0,                            /* External  7: */
+       0x0,                            /* External  8: */
+       0x0,                            /* External  9: */
+       0x0,                            /* External 10: */
+       0x0,                            /* External 11: */
+};
+
+/*
+ * Setup the architecture
+ */
+static void __init
+gp3_setup_arch(void)
+{
+       bd_t *binfo = (bd_t *) __res;
+       unsigned int freq;
+       struct gianfar_platform_data *pdata;
+
+       cpm2_reset();
+
+       /* get the core frequency */
+       freq = binfo->bi_intfreq;
+
+       if (ppc_md.progress)
+               ppc_md.progress("gp3_setup_arch()", 0);
+
+       /* Set loops_per_jiffy to a half-way reasonable value,
+          for use until calibrate_delay gets called. */
+       loops_per_jiffy = freq / HZ;
+
+#ifdef CONFIG_PCI
+       /* setup PCI host bridges */
+       mpc85xx_setup_hose();
+#endif
+
+       /* 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 = 2;
+       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 = 4;
+       /* 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)
+               ROOT_DEV = Root_RAM0;
+       else
+#endif
+#ifdef CONFIG_ROOT_NFS
+               ROOT_DEV = Root_NFS;
+#else
+               ROOT_DEV = Root_HDA1;
+#endif
+
+       printk ("bi_immr_base = %8.8lx\n", binfo->bi_immr_base);
+}
+
+static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
+{
+       while ((irq = cpm2_get_irq(regs)) >= 0)
+               __do_IRQ(irq, regs);
+
+       return IRQ_HANDLED;
+}
+
+static struct irqaction cpm2_irqaction = {
+       .handler        = cpm2_cascade,
+       .flags          = SA_INTERRUPT,
+       .mask           = CPU_MASK_NONE,
+       .name           = "cpm2_cascade",
+};
+
+static void __init
+gp3_init_IRQ(void)
+{
+       int i;
+       volatile cpm2_map_t *immap = cpm2_immr;
+       bd_t *binfo = (bd_t *) __res;
+
+       /*
+        * Setup OpenPIC
+        */
+
+       /* Determine the Physical Address of the OpenPIC regs */
+       phys_addr_t OpenPIC_PAddr =
+           binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET;
+       OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE);
+       OpenPIC_InitSenses = gp3_openpic_initsenses;
+       OpenPIC_NumInitSenses = sizeof (gp3_openpic_initsenses);
+
+       /* Skip reserved space and internal sources */
+       openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200);
+
+       /* Map PIC IRQs 0-11 */
+       openpic_set_sources(32, 12, OpenPIC_Addr + 0x10000);
+
+       /*
+        * Let openpic interrupts starting from an offset, to
+        * leave space for cascading interrupts underneath.
+        */
+       openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET);
+
+       /*
+        * Setup CPM2 PIC
+        */
+
+       /* disable all CPM interupts */
+       immap->im_intctl.ic_simrh = 0x0;
+       immap->im_intctl.ic_simrl = 0x0;
+
+       for (i = CPM_IRQ_OFFSET; i < (NR_CPM_INTS + CPM_IRQ_OFFSET); i++)
+               irq_desc[i].handler = &cpm2_pic;
+
+       /*
+        * Initialize the default interrupt mapping priorities,
+        * in case the boot rom changed something on us.
+        */
+       immap->im_intctl.ic_sicr = 0;
+       immap->im_intctl.ic_scprrh = 0x05309770;
+       immap->im_intctl.ic_scprrl = 0x05309770;
+
+       setup_irq(MPC85xx_IRQ_CPM, &cpm2_irqaction);
+
+       return;
+}
+
+static int
+gp3_show_cpuinfo(struct seq_file *m)
+{
+       uint pvid, svid, phid1;
+       bd_t *binfo = (bd_t *) __res;
+       uint    memsize;
+       unsigned int freq;
+       extern unsigned long total_memory;      /* in mm/init */
+
+       /* get the core frequency */
+       freq = binfo->bi_intfreq;
+
+       pvid = mfspr(PVR);
+       svid = mfspr(SVR);
+
+       memsize = total_memory;
+
+       seq_printf(m, "Vendor\t\t: RPC Electronics STx \n");
+
+       switch (svid & 0xffff0000) {
+       case SVR_8540:
+               seq_printf(m, "Machine\t\t: GP3 - MPC8540\n");
+               break;
+       case SVR_8560:
+               seq_printf(m, "Machine\t\t: GP3 - MPC8560\n");
+               break;
+       default:
+               seq_printf(m, "Machine\t\t: unknown\n");
+               break;
+       }
+       seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq / 1000000,
+                  freq % 1000000);
+       seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
+       seq_printf(m, "SVR\t\t: 0x%x\n", svid);
+
+       /* Display cpu Pll setting */
+       phid1 = mfspr(HID1);
+       seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
+
+       /* Display the amount of memory */
+       seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
+
+       return 0;
+}
+
+#ifdef CONFIG_PCI
+int mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel,
+                   unsigned char pin)
+{
+       static char pci_irq_table[][4] =
+           /*
+            *      PCI IDSEL/INTPIN->INTLINE
+            *        A      B      C      D
+            */
+       {
+               {PIRQA, PIRQB, PIRQC, PIRQD},
+               {PIRQD, PIRQA, PIRQB, PIRQC},
+               {PIRQC, PIRQD, PIRQA, PIRQB},
+               {PIRQB, PIRQC, PIRQD, PIRQA},
+       };
+
+       const long min_idsel = 12, max_idsel = 15, irqs_per_slot = 4;
+       return PCI_IRQ_TABLE_LOOKUP;
+}
+
+int mpc85xx_exclude_device(u_char bus, u_char devfn)
+{
+       if (bus == 0 && PCI_SLOT(devfn) == 0)
+               return PCIBIOS_DEVICE_NOT_FOUND;
+       else
+               return PCIBIOS_SUCCESSFUL;
+}
+#endif /* CONFIG_PCI */
+
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+             unsigned long r6, unsigned long r7)
+{
+       /* parse_bootinfo must always be called first */
+       parse_bootinfo(find_bootinfo());
+
+       /*
+        * If we were passed in a board information, copy it into the
+        * residual data area.
+        */
+       if (r3) {
+               memcpy((void *) __res, (void *) (r3 + KERNELBASE),
+                      sizeof (bd_t));
+
+       }
+#if defined(CONFIG_BLK_DEV_INITRD)
+       /*
+        * If the init RAM disk has been configured in, and there's a valid
+        * starting address for it, set it up.
+        */
+       if (r4) {
+               initrd_start = r4 + KERNELBASE;
+               initrd_end = r5 + KERNELBASE;
+       }
+#endif                         /* CONFIG_BLK_DEV_INITRD */
+
+       /* Copy the kernel command line arguments to a safe place. */
+
+       if (r6) {
+               *(char *) (r7 + KERNELBASE) = 0;
+               strcpy(cmd_line, (char *) (r6 + KERNELBASE));
+       }
+
+       identify_ppc_sys_by_id(mfspr(SVR));
+
+       /* setup the PowerPC module struct */
+       ppc_md.setup_arch = gp3_setup_arch;
+       ppc_md.show_cpuinfo = gp3_show_cpuinfo;
+
+       ppc_md.init_IRQ = gp3_init_IRQ;
+       ppc_md.get_irq = openpic_get_irq;
+
+       ppc_md.restart = mpc85xx_restart;
+       ppc_md.power_off = mpc85xx_power_off;
+       ppc_md.halt = mpc85xx_halt;
+
+       ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory;
+
+       ppc_md.calibrate_decr = mpc85xx_calibrate_decr;
+
+       if (ppc_md.progress)
+               ppc_md.progress("platform_init(): exit", 0);
+
+       return;
+}
diff -urN linux/arch/ppc/platforms/85xx/stx_gp3.h 
linux/arch/ppc/platforms/85xx/stx_gp3.h
--- linux/arch/ppc/platforms/85xx/stx_gp3.h     1970/01/01 00:00:00
+++ linux/arch/ppc/platforms/85xx/stx_gp3.h     Mon Feb  7 02:54:36 2005        
1.1
@@ -0,0 +1,74 @@
+/*
+ * arch/ppc/platforms/stx8560_gp3.h
+ *
+ * STx GP3 board definitions
+ *
+ * Dan Malek (dan@embeddededge.com)
+ * Copyright 2004 Embedded Edge, LLC
+ *
+ * Ported to 2.6, Matt Porter <mporter@kernel.crashing.org>
+ * Copyright 2004-2005 MontaVista Software, 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.
+ *
+ */
+
+#ifndef __MACH_STX_GP3_H
+#define __MACH_STX_GP3_H
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/seq_file.h>
+#include <asm/ppcboot.h>
+
+#define BOARD_CCSRBAR          ((uint)0xe0000000)
+#define CCSRBAR_SIZE           ((uint)1024*1024)
+
+#define CPM_MAP_ADDR           (CCSRBAR + MPC85xx_CPM_OFFSET)
+
+#define BCSR_ADDR              ((uint)0xfc000000)
+#define BCSR_SIZE              ((uint)(16 * 1024))
+
+#define BCSR_TSEC1_RESET       0x00000080
+#define BCSR_TSEC2_RESET       0x00000040
+#define BCSR_LED1              0x00000008
+#define BCSR_LED2              0x00000004
+#define BCSR_LED3              0x00000002
+#define BCSR_LED4              0x00000001
+
+extern void mpc85xx_setup_hose(void) __init;
+extern void mpc85xx_restart(char *cmd);
+extern void mpc85xx_power_off(void);
+extern void mpc85xx_halt(void);
+extern int mpc85xx_show_cpuinfo(struct seq_file *m);
+extern void mpc85xx_init_IRQ(void) __init;
+extern unsigned long mpc85xx_find_end_of_memory(void) __init;
+extern void mpc85xx_calibrate_decr(void) __init;
+
+#define PCI_CFG_ADDR_OFFSET    (0x8000)
+#define PCI_CFG_DATA_OFFSET    (0x8004)
+
+/* PCI interrupt controller */
+#define PIRQA          MPC85xx_IRQ_EXT1
+#define PIRQB          MPC85xx_IRQ_EXT2
+#define PIRQC          MPC85xx_IRQ_EXT3
+#define PIRQD          MPC85xx_IRQ_EXT4
+#define PCI_MIN_IDSEL  16
+#define PCI_MAX_IDSEL  19
+#define PCI_IRQ_SLOT   4
+
+#define MPC85XX_PCI1_LOWER_IO  0x00000000
+#define MPC85XX_PCI1_UPPER_IO  0x00ffffff
+
+#define MPC85XX_PCI1_LOWER_MEM 0x80000000
+#define MPC85XX_PCI1_UPPER_MEM 0x9fffffff
+
+#define MPC85XX_PCI1_IO_BASE   0xe2000000
+#define MPC85XX_PCI1_MEM_OFFSET        0x00000000
+
+#define MPC85XX_PCI1_IO_SIZE   0x01000000
+
+#endif /* __MACH_STX_GP3_H */
diff -urN linux/arch/ppc/platforms/85xx/Kconfig 
linux/arch/ppc/platforms/85xx/Kconfig
--- linux/arch/ppc/platforms/85xx/Kconfig       2005/01/25 04:28:02     1.4
+++ linux/arch/ppc/platforms/85xx/Kconfig       2005/02/07 02:54:36     1.5
@@ -37,6 +37,12 @@
          This option enables support for the WindRiver PowerQUICC III 
          SBC8560 board.
 
+config STX_GP3
+       bool "Silicon Turnkey Express GP3"
+       help
+         This option enables support for the Silicon Turnkey Express GP3
+         board.
+
 endchoice
 
 # It's often necessary to know the specific 85xx processor type.
@@ -54,7 +60,7 @@
 
 config MPC8560
        bool
-       depends on SBC8560 || MPC8560_ADS
+       depends on SBC8560 || MPC8560_ADS || STX_GP3
        default y
 
 config 85xx_PCI2
diff -urN linux/arch/ppc/platforms/85xx/Makefile 
linux/arch/ppc/platforms/85xx/Makefile
--- linux/arch/ppc/platforms/85xx/Makefile      2005/01/25 04:28:02     1.4
+++ linux/arch/ppc/platforms/85xx/Makefile      2005/02/07 02:54:36     1.5
@@ -7,3 +7,4 @@
 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_STX_GP3)          += stx_gp3.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 2005/01/25 04:28:02     1.4
+++ linux/arch/ppc/platforms/85xx/mpc8540_ads.c 2005/02/07 02:54:36     1.5
@@ -147,10 +147,25 @@
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
        {
                bd_t *binfo = (bd_t *) __res;
+               struct uart_port p;
 
                /* Use the last TLB entry to map CCSRBAR to allow access to 
DUART regs */
                settlbcam(NUM_TLBCAMS - 1, binfo->bi_immr_base,
                          binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 
0);
+
+               memset(&p, 0, sizeof (p));
+               p.iotype = SERIAL_IO_MEM;
+               p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART0_OFFSET;
+               p.uartclk = binfo->bi_busfreq;
+
+               gen550_init(0, &p);
+
+               memset(&p, 0, sizeof (p));
+               p.iotype = SERIAL_IO_MEM;
+               p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART1_OFFSET;
+               p.uartclk = binfo->bi_busfreq;
+
+               gen550_init(1, &p);
        }
 #endif
 
diff -urN linux/arch/ppc/platforms/85xx/mpc8540_ads.h 
linux/arch/ppc/platforms/85xx/mpc8540_ads.h
--- linux/arch/ppc/platforms/85xx/mpc8540_ads.h 2004/08/06 00:33:23     1.2
+++ linux/arch/ppc/platforms/85xx/mpc8540_ads.h 2005/02/07 02:54:36     1.3
@@ -22,8 +22,4 @@
 #include <syslib/ppc85xx_setup.h>
 #include <platforms/85xx/mpc85xx_ads_common.h>
 
-#define SERIAL_PORT_DFNS       \
-       STD_UART_OP(0)          \
-       STD_UART_OP(1)
-
 #endif /* __MACH_MPC8540ADS_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  2005/01/25 04:28:02     
1.5
+++ linux/arch/ppc/platforms/85xx/mpc85xx_cds_common.c  2005/02/07 02:54:36     
1.6
@@ -396,11 +396,25 @@
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
        {
                bd_t *binfo = (bd_t *) __res;
+               struct uart_port p;
 
                /* Use the last TLB entry to map CCSRBAR to allow access to 
DUART regs */
                settlbcam(NUM_TLBCAMS - 1, binfo->bi_immr_base,
-                       binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0);
+                         binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 
0);
 
+               memset(&p, 0, sizeof (p));
+               p.iotype = SERIAL_IO_MEM;
+               p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART0_OFFSET;
+               p.uartclk = binfo->bi_busfreq;
+
+               gen550_init(0, &p);
+
+               memset(&p, 0, sizeof (p));
+               p.iotype = SERIAL_IO_MEM;
+               p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART1_OFFSET;
+               p.uartclk = binfo->bi_busfreq;
+
+               gen550_init(1, &p);
        }
 #endif
 
diff -urN linux/arch/ppc/platforms/85xx/mpc85xx_cds_common.h 
linux/arch/ppc/platforms/85xx/mpc85xx_cds_common.h
--- linux/arch/ppc/platforms/85xx/mpc85xx_cds_common.h  2004/08/06 00:33:23     
1.1
+++ linux/arch/ppc/platforms/85xx/mpc85xx_cds_common.h  2005/02/07 02:54:36     
1.2
@@ -60,8 +60,10 @@
 #define MPC85XX_PCI1_IO_SIZE         0x01000000
 
 /* PCI 2 memory map */
-#define MPC85XX_PCI2_LOWER_IO        0x01000000
-#define MPC85XX_PCI2_UPPER_IO        0x01ffffff
+/* Note: the standard PPC fixups will cause IO space to get bumped by
+ * hose->io_base_virt - isa_io_base => MPC85XX_PCI1_IO_SIZE */
+#define MPC85XX_PCI2_LOWER_IO        0x00000000
+#define MPC85XX_PCI2_UPPER_IO        0x00ffffff
 
 #define MPC85XX_PCI2_LOWER_MEM       0xa0000000
 #define MPC85XX_PCI2_UPPER_MEM       0xbfffffff
@@ -71,8 +73,4 @@
 
 #define MPC85XX_PCI2_IO_SIZE         0x01000000
 
-#define SERIAL_PORT_DFNS               \
-              STD_UART_OP(0)           \
-              STD_UART_OP(1)
-
 #endif /* __MACH_MPC85XX_CDS_H__ */
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     2005/01/25 04:28:02     
1.1
+++ linux/arch/ppc/platforms/85xx/mpc85xx_devices.c     2005/02/07 02:54:36     
1.2
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/device.h>
+#include <linux/serial_8250.h>
 #include <linux/fsl_devices.h>
 #include <asm/mpc85xx.h>
 #include <asm/irq.h>
@@ -47,6 +48,21 @@
        .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR,
 };
 
+static struct plat_serial8250_port serial_platform_data[] = {
+       [0] = {
+               .mapbase        = 0x4500,
+               .irq            = MPC85xx_IRQ_DUART,
+               .iotype         = UPIO_MEM,
+               .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | 
UPF_SHARE_IRQ,
+       },
+       [1] = {
+               .mapbase        = 0x4600,
+               .irq            = MPC85xx_IRQ_DUART,
+               .iotype         = UPIO_MEM,
+               .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | 
UPF_SHARE_IRQ,
+       },
+};
+
 struct platform_device ppc_sys_platform_devices[] = {
        [MPC85xx_TSEC1] = {
                .name = "fsl-gianfar",
@@ -223,6 +239,11 @@
                        },
                },
        },
+       [MPC85xx_DUART] = {
+               .name = "serial8250",
+               .id     = 0,
+               .dev.platform_data = serial_platform_data,
+       },
        [MPC85xx_PERFMON] = {
                .name = "fsl-perfmon",
                .id     = 1,
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 2005/01/25 04:28:02     1.1
+++ linux/arch/ppc/platforms/85xx/mpc85xx_sys.c 2005/02/07 02:54:36     1.2
@@ -24,12 +24,12 @@
                .ppc_sys_name   = "MPC8540",
                .mask           = 0xFFFF0000,
                .value          = 0x80300000,
-               .num_devices    = 9,
+               .num_devices    = 10,
                .device_list    = (enum ppc_sys_devices[])
                {
                        MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_FEC, MPC85xx_IIC1,
                        MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
-                       MPC85xx_PERFMON,
+                       MPC85xx_PERFMON, MPC85xx_DUART,
                },
        },
        {
@@ -52,12 +52,12 @@
                .ppc_sys_name   = "MPC8541",
                .mask           = 0xFFFF0000,
                .value          = 0x80720000,
-               .num_devices    = 12,
+               .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_PERFMON, MPC85xx_DUART,
                        MPC85xx_CPM_SPI, MPC85xx_CPM_I2C,
                        MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
                },
@@ -66,12 +66,12 @@
                .ppc_sys_name   = "MPC8541E",
                .mask           = 0xFFFF0000,
                .value          = 0x807A0000,
-               .num_devices    = 13,
+               .num_devices    = 14,
                .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_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
                        MPC85xx_CPM_SPI, MPC85xx_CPM_I2C,
                        MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
                },
@@ -80,12 +80,12 @@
                .ppc_sys_name   = "MPC8555",
                .mask           = 0xFFFF0000,
                .value          = 0x80710000,
-               .num_devices    = 19,
+               .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_PERFMON, MPC85xx_DUART,
                        MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1,
                        MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3,
                        MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3,
@@ -97,12 +97,12 @@
                .ppc_sys_name   = "MPC8555E",
                .mask           = 0xFFFF0000,
                .value          = 0x80790000,
-               .num_devices    = 20,
+               .num_devices    = 21,
                .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_PERFMON, MPC85xx_DUART, 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,
diff -urN linux/arch/ppc/syslib/gen550_dbg.c linux/arch/ppc/syslib/gen550_dbg.c
--- linux/arch/ppc/syslib/gen550_dbg.c  2004/11/15 11:49:20     1.4
+++ linux/arch/ppc/syslib/gen550_dbg.c  2005/02/07 02:54:36     1.5
@@ -29,6 +29,11 @@
 
 #define SERIAL_BAUD    9600
 
+/* SERIAL_PORT_DFNS is defined in <asm/serial.h> */
+#ifndef SERIAL_PORT_DFNS
+#define SERIAL_PORT_DFNS
+#endif
+
 static struct serial_state rs_table[RS_TABLE_SIZE] = {
        SERIAL_PORT_DFNS        /* defined in <asm/serial.h> */
 };
@@ -154,6 +159,7 @@
        rs_table[i].port = serial_req->iobase;
        rs_table[i].iomem_base = serial_req->membase;
        rs_table[i].iomem_reg_shift = serial_req->regshift;
+       rs_table[i].baud_base = serial_req->uartclk ? serial_req->uartclk / 16 
: BASE_BAUD;
 }
 
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
diff -urN linux/arch/ppc/syslib/ibm44x_common.c 
linux/arch/ppc/syslib/ibm44x_common.c
--- linux/arch/ppc/syslib/ibm44x_common.c       2005/01/13 14:05:33     1.5
+++ linux/arch/ppc/syslib/ibm44x_common.c       2005/02/07 02:54:36     1.6
@@ -172,3 +172,16 @@
 #endif
 }
 
+/* Called from MachineCheckException */
+void platform_machine_check(struct pt_regs *regs)
+{
+       printk("PLB0: BEAR=0x%08x%08x ACR=  0x%08x BESR= 0x%08x\n",
+               mfdcr(DCRN_PLB0_BEARH), mfdcr(DCRN_PLB0_BEARL),
+               mfdcr(DCRN_PLB0_ACR),  mfdcr(DCRN_PLB0_BESR));
+       printk("POB0: BEAR=0x%08x%08x BESR0=0x%08x BESR1=0x%08x\n",
+               mfdcr(DCRN_POB0_BEARH), mfdcr(DCRN_POB0_BEARL),
+               mfdcr(DCRN_POB0_BESR0), mfdcr(DCRN_POB0_BESR1));
+       printk("OPB0: BEAR=0x%08x%08x BSTAT=0x%08x\n",
+               mfdcr(DCRN_OPB0_BEARH), mfdcr(DCRN_OPB0_BEARL),
+               mfdcr(DCRN_OPB0_BSTAT));
+}
diff -urN linux/arch/ppc/syslib/mpc10x_common.c 
linux/arch/ppc/syslib/mpc10x_common.c
--- linux/arch/ppc/syslib/mpc10x_common.c       2004/11/15 11:49:20     1.8
+++ linux/arch/ppc/syslib/mpc10x_common.c       2005/02/07 02:54:36     1.9
@@ -306,6 +306,41 @@
        mpc10x_disable_store_gathering(hose);
 #endif
 
+       /*
+        * 8240 erratum 26, 8241/8245 erratum 29, 107 erratum 23: speculative
+        * PCI reads may return stale data so turn off.
+        */
+       if ((host_bridge == MPC10X_BRIDGE_8240)
+               || (host_bridge == MPC10X_BRIDGE_8245)
+               || (host_bridge == MPC10X_BRIDGE_107)) {
+
+               early_read_config_dword(hose, 0, PCI_DEVFN(0,0),
+                       MPC10X_CFG_PICR1_REG, &picr1);
+
+               picr1 &= ~MPC10X_CFG_PICR1_SPEC_PCI_RD;
+
+               early_write_config_dword(hose, 0, PCI_DEVFN(0,0),
+                       MPC10X_CFG_PICR1_REG, picr1);
+       }
+
+       /*
+        * 8241/8245 erratum 28: PCI reads from local memory may return
+        * stale data.  Workaround by setting PICR2[0] to disable copyback
+        * optimization.  Oddly, the latest available user manual for the
+        * 8245 (Rev 2., dated 10/2003) says PICR2[0] is reserverd.
+        */
+       if (host_bridge == MPC10X_BRIDGE_8245) {
+               ulong   picr2;
+
+               early_read_config_dword(hose, 0, PCI_DEVFN(0,0),
+                       MPC10X_CFG_PICR2_REG, &picr2);
+
+               picr2 |= MPC10X_CFG_PICR2_COPYBACK_OPT;
+
+               early_write_config_dword(hose, 0, PCI_DEVFN(0,0),
+                        MPC10X_CFG_PICR2_REG, picr2);
+       }
+
        if (ppc_md.progress) ppc_md.progress("mpc10x:exit", 0x100);
        return 0;
 }
diff -urN linux/arch/ppc/syslib/mv64360_pic.c 
linux/arch/ppc/syslib/mv64360_pic.c
--- linux/arch/ppc/syslib/mv64360_pic.c 2005/01/13 14:05:33     1.1
+++ linux/arch/ppc/syslib/mv64360_pic.c 2005/02/07 02:54:36     1.2
@@ -369,7 +369,8 @@
        u32     mask;
        int     rc;
 
-       /* Register CPU interface error interrupt handler */
+       /* Clear old errors and register CPU interface error intr handler */
+       mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0);
        if ((rc = request_irq(MV64x60_IRQ_CPU_ERR,
                mv64360_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0)))
                printk(KERN_WARNING "Can't register cpu error handler: %d", rc);
@@ -377,7 +378,8 @@
        mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0);
        mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0x000000ff);
 
-       /* Register internal SRAM error interrupt handler */
+       /* Clear old errors and register internal SRAM error intr handler */
+       mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0);
        if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR,
                mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0)))
                printk(KERN_WARNING "Can't register SRAM error handler: %d",rc);
@@ -393,18 +395,20 @@
                (mv64x60_get_bridge_rev() > 1))
                mask |= 0x1;    /* enable DPErr on 64460 */
 
-       /* Register PCI 0 error interrupt handler */
+       /* Clear old errors and register PCI 0 error intr handler */
+       mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0);
        if ((rc = request_irq(MV64360_IRQ_PCI0, mv64360_pci_error_int_handler,
-                   SA_INTERRUPT, PCI0_INTR_STR, (void *)0)))
+                       SA_INTERRUPT, PCI0_INTR_STR, (void *)0)))
                printk(KERN_WARNING "Can't register pci 0 error handler: %d",
                        rc);
 
        mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, 0);
        mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, mask);
 
-       /* Register PCI 1 error interrupt handler */
+       /* Clear old errors and register PCI 1 error intr handler */
+       mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0);
        if ((rc = request_irq(MV64360_IRQ_PCI1, mv64360_pci_error_int_handler,
-                   SA_INTERRUPT, PCI1_INTR_STR, (void *)1)))
+                       SA_INTERRUPT, PCI1_INTR_STR, (void *)1)))
                printk(KERN_WARNING "Can't register pci 1 error handler: %d",
                        rc);
 
diff -urN linux/arch/ppc/syslib/mv64x60.c linux/arch/ppc/syslib/mv64x60.c
--- linux/arch/ppc/syslib/mv64x60.c     2005/01/13 14:05:33     1.1
+++ linux/arch/ppc/syslib/mv64x60.c     2005/02/07 02:54:36     1.2
@@ -34,10 +34,10 @@
 u8             mv64x60_pci_exclude_bridge = 1;
 spinlock_t     mv64x60_lock; /* Only really used by PIC code once init done */
 
-static u32     mv64x60_bridge_pbase = 0;
-static u32     mv64x60_bridge_vbase = 0;
-static u32     mv64x60_bridge_type = MV64x60_TYPE_INVALID;
-static u32     mv64x60_bridge_rev = 0;
+static phys_addr_t     mv64x60_bridge_pbase = 0;
+static void            *mv64x60_bridge_vbase = 0;
+static u32             mv64x60_bridge_type = MV64x60_TYPE_INVALID;
+static u32             mv64x60_bridge_rev = 0;
 
 static u32 gt64260_translate_size(u32 base, u32 size, u32 num_bits);
 static u32 gt64260_untranslate_size(u32 base, u32 size, u32 num_bits);
@@ -88,7 +88,7 @@
        .translate_size         = gt64260_translate_size,
        .untranslate_size       = gt64260_untranslate_size,
        .set_pci2mem_window     = gt64260_set_pci2mem_window,
-       .set_pci2regs_window    = gt64260_set_pci2regs_window,
+       .set_pci2regs_window    = gt64260_set_pci2regs_window,
        .is_enabled_32bit       = gt64260_is_enabled_32bit,
        .enable_window_32bit    = gt64260_enable_window_32bit,
        .disable_window_32bit   = gt64260_disable_window_32bit,
@@ -104,7 +104,7 @@
        .translate_size         = gt64260_translate_size,
        .untranslate_size       = gt64260_untranslate_size,
        .set_pci2mem_window     = gt64260_set_pci2mem_window,
-       .set_pci2regs_window    = gt64260_set_pci2regs_window,
+       .set_pci2regs_window    = gt64260_set_pci2regs_window,
        .is_enabled_32bit       = gt64260_is_enabled_32bit,
        .enable_window_32bit    = gt64260_enable_window_32bit,
        .disable_window_32bit   = gt64260_disable_window_32bit,
@@ -120,7 +120,7 @@
        .translate_size         = mv64360_translate_size,
        .untranslate_size       = mv64360_untranslate_size,
        .set_pci2mem_window     = mv64360_set_pci2mem_window,
-       .set_pci2regs_window    = mv64360_set_pci2regs_window,
+       .set_pci2regs_window    = mv64360_set_pci2regs_window,
        .is_enabled_32bit       = mv64360_is_enabled_32bit,
        .enable_window_32bit    = mv64360_enable_window_32bit,
        .disable_window_32bit   = mv64360_disable_window_32bit,
@@ -138,7 +138,7 @@
        .translate_size         = mv64360_translate_size,
        .untranslate_size       = mv64360_untranslate_size,
        .set_pci2mem_window     = mv64360_set_pci2mem_window,
-       .set_pci2regs_window    = mv64360_set_pci2regs_window,
+       .set_pci2regs_window    = mv64360_set_pci2regs_window,
        .is_enabled_32bit       = mv64360_is_enabled_32bit,
        .enable_window_32bit    = mv64360_enable_window_32bit,
        .disable_window_32bit   = mv64360_disable_window_32bit,
@@ -160,7 +160,7 @@
  *****************************************************************************
  */
 #ifdef CONFIG_SERIAL_MPSC
-static struct mpsc_shared_pd_dd mv64x60_mpsc_shared_pd_dd = {
+static struct mpsc_shared_pdata mv64x60_mpsc_shared_pdata = {
        .mrr_val                = 0x3ffffe38,
        .rcrr_val               = 0,
        .tcrr_val               = 0,
@@ -192,11 +192,11 @@
        .num_resources  = ARRAY_SIZE(mv64x60_mpsc_shared_resources),
        .resource       = mv64x60_mpsc_shared_resources,
        .dev = {
-               .driver_data = &mv64x60_mpsc_shared_pd_dd,
+               .platform_data = &mv64x60_mpsc_shared_pdata,
        },
 };
 
-static struct mpsc_pd_dd mv64x60_mpsc0_pd_dd = {
+static struct mpsc_pdata mv64x60_mpsc0_pdata = {
        .mirror_regs            = 0,
        .cache_mgmt             = 0,
        .max_idle               = 0,
@@ -248,11 +248,11 @@
        .num_resources  = ARRAY_SIZE(mv64x60_mpsc0_resources),
        .resource       = mv64x60_mpsc0_resources,
        .dev = {
-               .driver_data = &mv64x60_mpsc0_pd_dd,
+               .platform_data = &mv64x60_mpsc0_pdata,
        },
 };
 
-static struct mpsc_pd_dd mv64x60_mpsc1_pd_dd = {
+static struct mpsc_pdata mv64x60_mpsc1_pdata = {
        .mirror_regs            = 0,
        .cache_mgmt             = 0,
        .max_idle               = 0,
@@ -305,7 +305,130 @@
        .num_resources  = ARRAY_SIZE(mv64x60_mpsc1_resources),
        .resource       = mv64x60_mpsc1_resources,
        .dev = {
-               .driver_data = &mv64x60_mpsc1_pd_dd,
+               .platform_data = &mv64x60_mpsc1_pdata,
+       },
+};
+#endif
+
+#ifdef CONFIG_MV643XX_ETH
+static struct resource mv64x60_eth_shared_resources[] = {
+       [0] = {
+               .name   = "ethernet shared base",
+               .start  = MV64340_ETH_SHARED_REGS,
+               .end    = MV64340_ETH_SHARED_REGS +
+                                       MV64340_ETH_SHARED_REGS_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device mv64x60_eth_shared_device = {
+       .name           = MV64XXX_ETH_SHARED_NAME,
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(mv64x60_eth_shared_resources),
+       .resource       = mv64x60_eth_shared_resources,
+};
+
+#ifdef CONFIG_MV643XX_ETH_0
+static struct resource mv64x60_eth0_resources[] = {
+       [0] = {
+               .name   = "eth0 irq",
+               .start  = MV64x60_IRQ_ETH_0,
+               .end    = MV64x60_IRQ_ETH_0,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct mv64xxx_eth_platform_data eth0_pd;
+
+static struct platform_device eth0_device = {
+       .name           = MV64XXX_ETH_NAME,
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(mv64x60_eth0_resources),
+       .resource       = mv64x60_eth0_resources,
+       .dev = {
+               .platform_data = &eth0_pd,
+       },
+};
+#endif
+
+#ifdef CONFIG_MV643XX_ETH_1
+static struct resource mv64x60_eth1_resources[] = {
+       [0] = {
+               .name   = "eth1 irq",
+               .start  = MV64x60_IRQ_ETH_1,
+               .end    = MV64x60_IRQ_ETH_1,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct mv64xxx_eth_platform_data eth1_pd;
+
+static struct platform_device eth1_device = {
+       .name           = MV64XXX_ETH_NAME,
+       .id             = 1,
+       .num_resources  = ARRAY_SIZE(mv64x60_eth1_resources),
+       .resource       = mv64x60_eth1_resources,
+       .dev = {
+               .platform_data = &eth1_pd,
+       },
+};
+#endif
+
+#ifdef CONFIG_MV643XX_ETH_2
+static struct resource mv64x60_eth2_resources[] = {
+       [0] = {
+               .name   = "eth2 irq",
+               .start  = MV64x60_IRQ_ETH_2,
+               .end    = MV64x60_IRQ_ETH_2,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct mv64xxx_eth_platform_data eth2_pd;
+
+static struct platform_device eth2_device = {
+       .name           = MV64XXX_ETH_NAME,
+       .id             = 2,
+       .num_resources  = ARRAY_SIZE(mv64x60_eth2_resources),
+       .resource       = mv64x60_eth2_resources,
+       .dev = {
+               .platform_data = &eth2_pd,
+       },
+};
+#endif
+#endif
+
+#ifdef CONFIG_I2C_MV64XXX
+static struct mv64xxx_i2c_pdata mv64xxx_i2c_pdata = {
+       .freq_m                 = 8,
+       .freq_n                 = 3,
+       .timeout                = 1000, /* Default timeout of 1 second */
+       .retries                = 1,
+};
+
+static struct resource mv64xxx_i2c_resources[] = {
+       /* Do not change the order of the IORESOURCE_MEM resources */
+       [0] = {
+               .name   = "mv64xxx i2c base",
+               .start  = MV64XXX_I2C_OFFSET,
+               .end    = MV64XXX_I2C_OFFSET + MV64XXX_I2C_REG_BLOCK_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .name   = "mv64xxx i2c irq",
+               .start  = MV64x60_IRQ_I2C,
+               .end    = MV64x60_IRQ_I2C,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device i2c_device = {
+       .name           = MV64XXX_I2C_CTLR_NAME,
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(mv64xxx_i2c_resources),
+       .resource       = mv64xxx_i2c_resources,
+       .dev = {
+               .platform_data = &mv64xxx_i2c_pdata,
        },
 };
 #endif
@@ -316,6 +439,21 @@
        &mpsc0_device,
        &mpsc1_device,
 #endif
+#ifdef CONFIG_MV643XX_ETH
+       &mv64x60_eth_shared_device,
+#endif
+#ifdef CONFIG_MV643XX_ETH_0
+       &eth0_device,
+#endif
+#ifdef CONFIG_MV643XX_ETH_1
+       &eth1_device,
+#endif
+#ifdef CONFIG_MV643XX_ETH_2
+       &eth2_device,
+#endif
+#ifdef CONFIG_I2C_MV64XXX
+       &i2c_device,
+#endif
 };
 
 /*
@@ -344,7 +482,7 @@
        mv64x60_early_init(bh, si);
 
        if (mv64x60_get_type(bh) || mv64x60_setup_for_chip(bh)) {
-               iounmap((void *)bh->v_base);
+               iounmap(bh->v_base);
                bh->v_base = 0;
                if (ppc_md.progress)
                        ppc_md.progress("mv64x60_init: Can't determine chip",0);
@@ -416,7 +554,7 @@
        memset(bh, 0, sizeof(*bh));
 
        bh->p_base = si->phys_reg_base;
-       bh->v_base = (u32)ioremap(bh->p_base, MV64x60_INTERNAL_SPACE_SIZE);
+       bh->v_base = ioremap(bh->p_base, MV64x60_INTERNAL_SPACE_SIZE);
 
        mv64x60_bridge_pbase = bh->p_base;
        mv64x60_bridge_vbase = bh->v_base;
@@ -598,7 +736,7 @@
  */
 void __init
 mv64x60_set_64bit_window(struct mv64x60_handle *bh, u32 window,
-                       u32 base_hi, u32 base_lo, u32 size, u32 other_bits)
+       u32 base_hi, u32 base_lo, u32 size, u32 other_bits)
 {
        u32     val, base_lo_reg, size_reg, base_lo_bits, size_bits;
        u32     (*map_to_field)(u32 val, u32 num_bits);
@@ -645,7 +783,7 @@
 }
 
 /*
- * mv64x60_mask_shift_left()
+ * mv64x60_shift_left()
  *
  * Take the low-order 'num_bits' of 'val', shift left to align at bit 31 (MSB).
  */
@@ -702,7 +840,7 @@
        /* Get the revision of the chip */
        early_read_config_word(&hose, 0, PCI_DEVFN(0, 0), PCI_CLASS_REVISION,
                &val);
-       bh->rev = (u32) (val & 0xff);
+       bh->rev = (u32)(val & 0xff);
 
        /* Figure out the type of Marvell bridge it is */
        early_read_config_word(&hose, 0, PCI_DEVFN(0, 0), PCI_DEVICE_ID, &val);
@@ -790,7 +928,7 @@
  *
  * Return the virtual address of the bridge's registers.
  */
-u32
+void *
 mv64x60_get_bridge_vbase(void)
 {
        return mv64x60_bridge_vbase;
@@ -836,13 +974,13 @@
 mv64x60_get_mem_size(u32 bridge_base, u32 chip_type)
 {
        struct mv64x60_handle   bh;
-       u32                     mem_windows[MV64x60_CPU2MEM_WINDOWS][2];
-       u32                     rc = 0;
+       u32     mem_windows[MV64x60_CPU2MEM_WINDOWS][2];
+       u32     rc = 0;
 
        memset(&bh, 0, sizeof(bh));
 
        bh.type = chip_type;
-       bh.v_base = bridge_base;
+       bh.v_base = (void *)bridge_base;
 
        if (!mv64x60_setup_for_chip(&bh)) {
                mv64x60_get_mem_windows(&bh, mem_windows);
@@ -1117,7 +1255,7 @@
                        IORESOURCE_IO, s[hose->index][0]);
                hose->io_space.start = pi->pci_io.pci_base_lo;
                hose->io_space.end = pi->pci_io.pci_base_lo + pi->pci_io.size-1;
-               hose->io_base_phys = (ulong)pi->pci_io.cpu_base;
+               hose->io_base_phys = pi->pci_io.cpu_base;
                hose->io_base_virt = (void *)isa_io_base;
        }
 
@@ -1592,8 +1730,8 @@
        struct resource *r;
 #endif
 #if !defined(CONFIG_NOT_COHERENT_CACHE)
-       u32             val;
-       u8              save_exclude;
+       u32     val;
+       u8      save_exclude;
 #endif
 
        if (si->pci_0.enable_bus)
@@ -1638,10 +1776,10 @@
        mv64x60_clr_bits(bh, 0xf2c0, (1<< 6) | (1<<14) | (1<<22) | (1<<30));
 
 #ifdef CONFIG_SERIAL_MPSC
-       mv64x60_mpsc0_pd_dd.mirror_regs = 1;
-       mv64x60_mpsc0_pd_dd.cache_mgmt = 1;
-       mv64x60_mpsc1_pd_dd.mirror_regs = 1;
-       mv64x60_mpsc1_pd_dd.cache_mgmt = 1;
+       mv64x60_mpsc0_pdata.mirror_regs = 1;
+       mv64x60_mpsc0_pdata.cache_mgmt = 1;
+       mv64x60_mpsc1_pdata.mirror_regs = 1;
+       mv64x60_mpsc1_pdata.cache_mgmt = 1;
 
        if ((r = platform_get_resource(&mpsc1_device, IORESOURCE_IRQ, 0))
                != NULL) {
@@ -1667,8 +1805,8 @@
        struct resource *r;
 #endif
 #if !defined(CONFIG_NOT_COHERENT_CACHE)
-       u32             val;
-       u8              save_exclude;
+       u32     val;
+       u8      save_exclude;
 #endif
 
        if (si->pci_0.enable_bus)
@@ -1720,8 +1858,8 @@
         * can't access cache coherent regions.  However, testing has shown
         * that the MPSC, at least, still has this bug.
         */
-       mv64x60_mpsc0_pd_dd.cache_mgmt = 1;
-       mv64x60_mpsc1_pd_dd.cache_mgmt = 1;
+       mv64x60_mpsc0_pdata.cache_mgmt = 1;
+       mv64x60_mpsc1_pdata.cache_mgmt = 1;
 
        if ((r = platform_get_resource(&mpsc1_device, IORESOURCE_IRQ, 0))
                != NULL) {
@@ -2228,10 +2366,10 @@
        struct mv64x60_setup_info *si)
 {
 #ifdef CONFIG_SERIAL_MPSC
-       mv64x60_mpsc0_pd_dd.brg_can_tune = 1;
-       mv64x60_mpsc0_pd_dd.cache_mgmt = 1;
-       mv64x60_mpsc1_pd_dd.brg_can_tune = 1;
-       mv64x60_mpsc1_pd_dd.cache_mgmt = 1;
+       mv64x60_mpsc0_pdata.brg_can_tune = 1;
+       mv64x60_mpsc0_pdata.cache_mgmt = 1;
+       mv64x60_mpsc1_pdata.brg_can_tune = 1;
+       mv64x60_mpsc1_pdata.cache_mgmt = 1;
 #endif
 
        return;
@@ -2247,8 +2385,8 @@
        struct mv64x60_setup_info *si)
 {
 #ifdef CONFIG_SERIAL_MPSC
-       mv64x60_mpsc0_pd_dd.brg_can_tune = 1;
-       mv64x60_mpsc1_pd_dd.brg_can_tune = 1;
+       mv64x60_mpsc0_pdata.brg_can_tune = 1;
+       mv64x60_mpsc1_pdata.brg_can_tune = 1;
 #endif
        return;
 }
diff -urN linux/arch/ppc/syslib/ppc4xx_setup.c 
linux/arch/ppc/syslib/ppc4xx_setup.c
--- linux/arch/ppc/syslib/ppc4xx_setup.c        2005/01/13 14:05:33     1.8
+++ linux/arch/ppc/syslib/ppc4xx_setup.c        2005/02/07 02:54:36     1.9
@@ -303,3 +303,19 @@
        ppc_ide_md.ide_init_hwif = ppc4xx_ide_init_hwif_ports;
 #endif /* defined(CONFIG_PCI) && defined(CONFIG_IDE) */
 }
+
+/* Called from MachineCheckException */
+void platform_machine_check(struct pt_regs *regs)
+{
+#if defined(DCRN_PLB0_BEAR)
+       printk("PLB0: BEAR= 0x%08x ACR=   0x%08x BESR=  0x%08x\n",
+           mfdcr(DCRN_PLB0_BEAR), mfdcr(DCRN_PLB0_ACR),
+           mfdcr(DCRN_PLB0_BESR));
+#endif
+#if defined(DCRN_POB0_BEAR)
+       printk("PLB0 to OPB: BEAR= 0x%08x BESR0= 0x%08x BESR1= 0x%08x\n",
+           mfdcr(DCRN_POB0_BEAR), mfdcr(DCRN_POB0_BESR0),
+           mfdcr(DCRN_POB0_BESR1));
+#endif
+
+}
diff -urN linux/arch/ppc/syslib/ppc85xx_setup.c 
linux/arch/ppc/syslib/ppc85xx_setup.c
--- linux/arch/ppc/syslib/ppc85xx_setup.c       2005/01/25 04:28:03     1.5
+++ linux/arch/ppc/syslib/ppc85xx_setup.c       2005/02/07 02:54:36     1.6
@@ -21,12 +21,14 @@
 #include <linux/serial.h>
 #include <linux/tty.h> /* for linux/serial_core.h */
 #include <linux/serial_core.h>
+#include <linux/serial_8250.h>
 
 #include <asm/prom.h>
 #include <asm/time.h>
 #include <asm/mpc85xx.h>
 #include <asm/immap_85xx.h>
 #include <asm/mmu.h>
+#include <asm/ppc_sys.h>
 #include <asm/kgdb.h>
 
 #include <syslib/ppc85xx_setup.h>
@@ -72,40 +74,39 @@
 void __init
 mpc85xx_early_serial_map(void)
 {
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
        struct uart_port serial_req;
+#endif
+       struct plat_serial8250_port *pdata;
        bd_t *binfo = (bd_t *) __res;
-       phys_addr_t duart_paddr = binfo->bi_immr_base + MPC85xx_UART0_OFFSET;
+       pdata = (struct plat_serial8250_port *) 
ppc_sys_get_pdata(MPC85xx_DUART);
 
        /* Setup serial port access */
+       pdata[0].uartclk = binfo->bi_busfreq;
+       pdata[0].mapbase += binfo->bi_immr_base;
+       pdata[0].membase = ioremap(pdata[0].mapbase, MPC85xx_UART0_SIZE);
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
        memset(&serial_req, 0, sizeof (serial_req));
-       serial_req.uartclk = binfo->bi_busfreq;
-       serial_req.line = 0;
-       serial_req.irq = MPC85xx_IRQ_DUART;
-       serial_req.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
        serial_req.iotype = SERIAL_IO_MEM;
-       serial_req.membase = ioremap(duart_paddr, MPC85xx_UART0_SIZE);
-       serial_req.mapbase = duart_paddr;
+       serial_req.mapbase = pdata[0].mapbase;
+       serial_req.membase = pdata[0].membase;
        serial_req.regshift = 0;
 
-#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
        gen550_init(0, &serial_req);
 #endif
 
-       if (early_serial_setup(&serial_req) != 0)
-               printk("Early serial init of port 0 failed\n");
-
-       /* Assume early_serial_setup() doesn't modify serial_req */
-       duart_paddr = binfo->bi_immr_base + MPC85xx_UART1_OFFSET;
-       serial_req.line = 1;
-       serial_req.mapbase = duart_paddr;
-       serial_req.membase = ioremap(duart_paddr, MPC85xx_UART1_SIZE);
+       pdata[1].uartclk = binfo->bi_busfreq;
+       pdata[1].mapbase += binfo->bi_immr_base;
+       pdata[1].membase = ioremap(pdata[1].mapbase, MPC85xx_UART0_SIZE);
 
 #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+       /* Assume gen550_init() doesn't modify serial_req */
+       serial_req.mapbase = pdata[1].mapbase;
+       serial_req.membase = pdata[1].membase;
+
        gen550_init(1, &serial_req);
 #endif
-
-       if (early_serial_setup(&serial_req) != 0)
-               printk("Early serial init of port 1 failed\n");
 }
 #endif
 
diff -urN linux/arch/ppc/syslib/ppc85xx_setup.h 
linux/arch/ppc/syslib/ppc85xx_setup.h
--- linux/arch/ppc/syslib/ppc85xx_setup.h       2004/08/06 00:33:23     1.3
+++ linux/arch/ppc/syslib/ppc85xx_setup.h       2005/02/07 02:54:36     1.4
@@ -43,9 +43,6 @@
 #define PCIX_STATUS    0x64
 
 /* Serial Config */
-#define MPC85XX_0_SERIAL                (CCSRBAR + 0x4500)
-#define MPC85XX_1_SERIAL                (CCSRBAR + 0x4600)
-
 #ifdef CONFIG_SERIAL_MANY_PORTS
 #define RS_TABLE_SIZE  64
 #else
@@ -56,12 +53,6 @@
 #define BASE_BAUD 115200
 #endif
 
-#define STD_UART_OP(num)                                       \
-       { 0, BASE_BAUD, num, MPC85xx_IRQ_DUART,                 \
-               (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),        \
-               iomem_base: (u8 *)MPC85XX_##num##_SERIAL,       \
-               io_type: SERIAL_IO_MEM},
-
 /* Offset of CPM register space */
 #define CPM_MAP_ADDR   (CCSRBAR + MPC85xx_CPM_OFFSET)
 
diff -urN linux/arch/ppc/syslib/prom_init.c linux/arch/ppc/syslib/prom_init.c
--- linux/arch/ppc/syslib/prom_init.c   2004/10/25 20:44:18     1.12
+++ linux/arch/ppc/syslib/prom_init.c   2005/02/07 02:54:36     1.13
@@ -810,6 +810,9 @@
        char *p, *d;
        unsigned long phys;
        void *result[3];
+       char model[32];
+       phandle node;
+       int rc;
 
        /* Default */
        phys = (unsigned long) &_stext;
@@ -866,11 +869,20 @@
 
        klimit = (char *) (mem - offset);
 
-       /* If we are already running at 0xc0000000, we assume we were
-        * loaded by an OF bootloader which did set a BAT for us.
-        * This breaks OF translate so we force phys to be 0.
-        */
-       if (offset == 0) {
+       node = call_prom("finddevice", 1, 1, "/");
+       rc = call_prom("getprop", 4, 1, node, "model", model, sizeof(model));
+       if (rc > 0 && !strncmp (model, "Pegasos", 7)
+               && strncmp (model, "Pegasos2", 8)) {
+               /* Pegasos 1 has a broken translate method in the OF,
+                * and furthermore the BATs are mapped 1:1 so the phys
+                * address calculated above is correct, so let's use
+                * it directly.
+                */
+       } else if (offset == 0) {
+               /* If we are already running at 0xc0000000, we assume we were
+                * loaded by an OF bootloader which did set a BAT for us.
+                * This breaks OF translate so we force phys to be 0.
+                */
                prom_print("(already at 0xc0000000) phys=0\n");
                phys = 0;
        } else if ((int) call_prom("getprop", 4, 1, prom_chosen, "mmu",
diff -urN linux/arch/ppc64/Kconfig linux/arch/ppc64/Kconfig
--- linux/arch/ppc64/Kconfig    2005/01/25 04:28:03     1.34
+++ linux/arch/ppc64/Kconfig    2005/02/07 02:54:36     1.35
@@ -234,6 +234,11 @@
          Say Y here if you are building a kernel for a desktop system.
          Say N if you are unsure.
 
+config EEH
+       bool "PCI Extended Error Handling (EEH)" if EMBEDDED
+       depends on PPC_PSERIES
+       default y if !EMBEDDED
+
 #
 # Use the generic interrupt handling code in kernel/irq/:
 #
diff -urN linux/arch/ppc64/Kconfig.debug linux/arch/ppc64/Kconfig.debug
--- linux/arch/ppc64/Kconfig.debug      2005/01/13 14:05:34     1.5
+++ linux/arch/ppc64/Kconfig.debug      2005/02/07 02:54:36     1.6
@@ -34,7 +34,7 @@
 
 config XMON
        bool "Include xmon kernel debugger"
-       depends on DEBUGGER
+       depends on DEBUGGER && !PPC_ISERIES
        help
          Include in-kernel hooks for the xmon kernel monitor/debugger.
          Unless you are intending to debug the kernel, say N here.
diff -urN linux/arch/ppc64/boot/main.c linux/arch/ppc64/boot/main.c
--- linux/arch/ppc64/boot/main.c        2004/10/25 20:44:18     1.9
+++ linux/arch/ppc64/boot/main.c        2005/02/07 02:54:36     1.10
@@ -73,7 +73,7 @@
 void *stdout;
 void *stderr;
 
-#define DEBUG
+#undef DEBUG
 
 static unsigned long claim_base = PROG_START;
 
diff -urN linux/arch/ppc64/boot/string.S linux/arch/ppc64/boot/string.S
--- linux/arch/ppc64/boot/string.S      2003/06/04 16:08:02     1.2
+++ linux/arch/ppc64/boot/string.S      2005/02/07 02:54:36     1.3
@@ -96,13 +96,6 @@
        bdnz    8b
        blr
 
-       .globl  bcopy
-bcopy:
-       mr      r6,r3
-       mr      r3,r4
-       mr      r4,r6
-       b       memcpy
-
        .globl  memmove
 memmove:
        cmplw   0,r3,r4
diff -urN linux/arch/ppc64/configs/pSeries_defconfig 
linux/arch/ppc64/configs/pSeries_defconfig
--- linux/arch/ppc64/configs/pSeries_defconfig  2005/01/13 14:05:34     1.9
+++ linux/arch/ppc64/configs/pSeries_defconfig  2005/02/07 02:54:36     1.10
@@ -268,7 +268,7 @@
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_IPS is not set
-CONFIG_SCSI_IBMVSCSI=m
+CONFIG_SCSI_IBMVSCSI=y
 # CONFIG_SCSI_INIA100 is not set
 CONFIG_SCSI_SYM53C8XX_2=y
 CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
@@ -492,7 +492,7 @@
 #
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-CONFIG_IBMVETH=m
+CONFIG_IBMVETH=y
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=y
 # CONFIG_AMD8111_ETH is not set
diff -urN linux/arch/ppc64/kernel/Makefile linux/arch/ppc64/kernel/Makefile
--- linux/arch/ppc64/kernel/Makefile    2005/01/13 14:05:34     1.35
+++ linux/arch/ppc64/kernel/Makefile    2005/02/07 02:54:36     1.36
@@ -30,9 +30,10 @@
 obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o prom.o mpic.o
 
 obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \
-                            eeh.o pSeries_nvram.o rtasd.o ras.o \
+                            pSeries_nvram.o rtasd.o ras.o \
                             xics.o rtas.o pSeries_setup.o pSeries_iommu.o
 
+obj-$(CONFIG_EEH)              += eeh.o
 obj-$(CONFIG_PROC_FS)          += proc_ppc64.o
 obj-$(CONFIG_RTAS_FLASH)       += rtas_flash.o
 obj-$(CONFIG_SMP)              += smp.o
diff -urN linux/arch/ppc64/kernel/eeh.c linux/arch/ppc64/kernel/eeh.c
--- linux/arch/ppc64/kernel/eeh.c       2005/01/25 04:28:03     1.27
+++ linux/arch/ppc64/kernel/eeh.c       2005/02/07 02:54:36     1.28
@@ -764,8 +764,6 @@
        struct device_node *phb, *np;
        struct eeh_early_enable_info info;
 
-       init_pci_config_tokens();
-
        np = of_find_node_by_path("/rtas");
        if (np == NULL)
                return;
diff -urN linux/arch/ppc64/kernel/entry.S linux/arch/ppc64/kernel/entry.S
--- linux/arch/ppc64/kernel/entry.S     2005/01/25 04:28:03     1.34
+++ linux/arch/ppc64/kernel/entry.S     2005/02/07 02:54:36     1.35
@@ -185,10 +185,10 @@
        beq-    1f                      /* only restore r13 if */
        ld      r13,GPR13(r1)           /* returning to usermode */
 1:     ld      r2,GPR2(r1)
-       ld      r1,GPR1(r1)
        li      r12,MSR_RI
        andc    r10,r10,r12
        mtmsrd  r10,1                   /* clear MSR.RI */
+       ld      r1,GPR1(r1)
        mtlr    r4
        mtcr    r5
        mtspr   SRR0,r7
diff -urN linux/arch/ppc64/kernel/head.S linux/arch/ppc64/kernel/head.S
--- linux/arch/ppc64/kernel/head.S      2005/01/13 14:05:34     1.37
+++ linux/arch/ppc64/kernel/head.S      2005/02/07 02:54:36     1.38
@@ -2145,10 +2145,12 @@
 ioremap_dir:
        .space  4096
 
+#ifdef CONFIG_SMP
 /* 1 page segment table per cpu (max 48, cpu0 allocated at STAB0_PHYS_ADDR) */
        .globl  stab_array
 stab_array:
        .space  4096 * 48
+#endif
        
 /*
  * This space gets a copy of optional info passed to us by the bootstrap
diff -urN linux/arch/ppc64/kernel/iSeries_pci_reset.c 
linux/arch/ppc64/kernel/iSeries_pci_reset.c
--- linux/arch/ppc64/kernel/iSeries_pci_reset.c 2004/10/12 01:45:42     1.6
+++ linux/arch/ppc64/kernel/iSeries_pci_reset.c 2005/02/07 02:54:36     1.7
@@ -32,6 +32,7 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/irq.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/iSeries/HvCallPci.h>
@@ -49,7 +50,7 @@
 int iSeries_Device_ToggleReset(struct pci_dev *PciDev, int AssertTime,
                int DelayTime)
 {
-       unsigned long AssertDelay, WaitDelay;
+       unsigned int AssertDelay, WaitDelay;
        struct iSeries_Device_Node *DeviceNode =
                (struct iSeries_Device_Node *)PciDev->sysdata;
 
@@ -62,14 +63,14 @@
         * Set defaults, Assert is .5 second, Wait is 3 seconds.
         */
        if (AssertTime == 0)
-               AssertDelay = (5 * HZ) / 10;
+               AssertDelay = 500;
        else
-               AssertDelay = (AssertTime * HZ) / 10;
+               AssertDelay = AssertTime * 100;
 
        if (DelayTime == 0)
-               WaitDelay = (30 * HZ) / 10;
+               WaitDelay = 3000;
        else
-               WaitDelay = (DelayTime * HZ) / 10;
+               WaitDelay = DelayTime * 100;
 
        /*
         * Assert reset
@@ -77,8 +78,7 @@
        DeviceNode->ReturnCode = HvCallPci_setSlotReset(ISERIES_BUS(DeviceNode),
                        0x00, DeviceNode->AgentId, 1);
        if (DeviceNode->ReturnCode == 0) {
-               set_current_state(TASK_UNINTERRUPTIBLE);
-               schedule_timeout(AssertDelay);       /* Sleep for the time */
+               msleep(AssertDelay);                    /* Sleep for the time */
                DeviceNode->ReturnCode =
                        HvCallPci_setSlotReset(ISERIES_BUS(DeviceNode),
                                        0x00, DeviceNode->AgentId, 0);
@@ -86,8 +86,7 @@
                /*
                 * Wait for device to reset
                 */
-               set_current_state(TASK_UNINTERRUPTIBLE);  
-               schedule_timeout(WaitDelay);
+               msleep(WaitDelay);
        }
        if (DeviceNode->ReturnCode == 0)
                PCIFR("Slot 0x%04X.%02 Reset\n", ISERIES_BUS(DeviceNode),
diff -urN linux/arch/ppc64/kernel/iomap.c linux/arch/ppc64/kernel/iomap.c
--- linux/arch/ppc64/kernel/iomap.c     2004/10/25 20:44:18     1.2
+++ linux/arch/ppc64/kernel/iomap.c     2005/02/07 02:54:36     1.3
@@ -113,7 +113,7 @@
        if (flags & IORESOURCE_IO)
                return ioport_map(start, len);
        if (flags & IORESOURCE_MEM)
-               return (void __iomem *) start;
+               return ioremap(start, len);
        /* What? */
        return NULL;
 }
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/25 04:28:03     1.10
+++ linux/arch/ppc64/kernel/pSeries_iommu.c     2005/02/07 02:54:36     1.11
@@ -309,6 +309,7 @@
 static void iommu_bus_setup_pSeries(struct pci_bus *bus)
 {
        struct device_node *dn, *pdn;
+       struct iommu_table *tbl;
 
        DBG("iommu_bus_setup_pSeries, bus %p, bus->self %p\n", bus, bus->self);
 
@@ -326,7 +327,6 @@
        if (!bus->self) {
                /* Root bus */
                if (is_python(dn)) {
-                       struct iommu_table *tbl;
                        unsigned int *iohole;
 
                        DBG("Python root bus %s\n", bus->name);
@@ -352,19 +352,35 @@
                        iommu_table_setparms(dn->phb, dn, tbl);
                        dn->iommu_table = iommu_init_table(tbl);
                } else {
-                       /* 256 MB window by default */
-                       dn->phb->dma_window_size = 1 << 28;
-                       /* always skip the first 256MB */
-                       dn->phb->dma_window_base_cur = 1 << 28;
+                       /* Do a 128MB table at root. This is used for the IDE
+                        * controller on some SMP-mode POWER4 machines. It
+                        * doesn't hurt to allocate it on other machines
+                        * -- it'll just be unused since new tables are
+                        * allocated on the EADS level.
+                        *
+                        * Allocate at offset 128MB to avoid having to deal
+                        * with ISA holes; 128MB table for IDE is plenty.
+                        */
+                       dn->phb->dma_window_size = 1 << 27;
+                       dn->phb->dma_window_base_cur = 1 << 27;
+
+                       tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL);
 
-                       /* No table at PHB level for non-python PHBs */
+                       iommu_table_setparms(dn->phb, dn, tbl);
+                       dn->iommu_table = iommu_init_table(tbl);
+
+                       /* All child buses have 256MB tables */
+                       dn->phb->dma_window_size = 1 << 28;
                }
        } else {
                pdn = pci_bus_to_OF_node(bus->parent);
 
-               if (!pdn->iommu_table) {
+               if (!bus->parent->self && !is_python(pdn)) {
                        struct iommu_table *tbl;
-                       /* First child, allocate new table (256MB window) */
+                       /* First child and not python means this is the EADS
+                        * level. Allocate new table for this slot with 256MB
+                        * window.
+                        */
 
                        tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL);
 
@@ -372,7 +388,7 @@
 
                        dn->iommu_table = iommu_init_table(tbl);
                } else {
-                       /* Lower than first child or under python, copy parent 
table */
+                       /* Lower than first child or under python, use parent 
table */
                        dn->iommu_table = pdn->iommu_table;
                }
        }
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/25 04:28:03     1.5
+++ linux/arch/ppc64/kernel/pSeries_setup.c     2005/02/07 02:54:36     1.6
@@ -40,7 +40,6 @@
 #include <linux/adb.h>
 #include <linux/module.h>
 #include <linux/delay.h>
-
 #include <linux/irq.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
@@ -59,13 +58,12 @@
 #include <asm/time.h>
 #include <asm/nvram.h>
 #include <asm/plpar_wrappers.h>
-
-#include "i8259.h"
 #include <asm/xics.h>
-#include <asm/ppcdebug.h>
 #include <asm/cputable.h>
 
+#include "i8259.h"
 #include "mpic.h"
+#include "pci.h"
 
 #ifdef DEBUG
 #define DBG(fmt...) udbg_printf(fmt)
@@ -73,7 +71,6 @@
 #define DBG(fmt...)
 #endif
 
-extern void find_and_init_phbs(void);
 extern void pSeries_final_fixup(void);
 
 extern void pSeries_get_boot_time(struct rtc_time *rtc_time);
@@ -87,10 +84,6 @@
 
 int fwnmi_active;  /* TRUE if an FWNMI handler is present */
 
-unsigned long  virtPython0Facilities = 0;  // python0 facility area (memory 
mapped io) (64-bit format) VIRTUAL address.
-
-extern unsigned long loops_per_jiffy;
-
 extern unsigned long ppc_proc_freq;
 extern unsigned long ppc_tb_freq;
 
@@ -230,7 +223,7 @@
        fwnmi_init();
 
        /* Find and initialize PCI host bridges */
-       /* iSeries needs to be done much later. */
+       init_pci_config_tokens();
        eeh_init();
        find_and_init_phbs();
 
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/25 04:28:03     1.4
+++ linux/arch/ppc64/kernel/pSeries_smp.c       2005/02/07 02:54:36     1.5
@@ -107,8 +107,7 @@
                cpu_status = query_cpu_stopped(pcpu);
                if (cpu_status == 0 || cpu_status == -1)
                        break;
-               set_current_state(TASK_UNINTERRUPTIBLE);
-               schedule_timeout(HZ/5);
+               msleep(200);
        }
        if (cpu_status != 0) {
                printk("Querying DEAD? cpu %i (%i) shows %i\n",
diff -urN linux/arch/ppc64/kernel/process.c linux/arch/ppc64/kernel/process.c
--- linux/arch/ppc64/kernel/process.c   2005/01/13 14:05:34     1.37
+++ linux/arch/ppc64/kernel/process.c   2005/02/07 02:54:36     1.38
@@ -35,7 +35,7 @@
 #include <linux/ptrace.h>
 #include <linux/kallsyms.h>
 #include <linux/interrupt.h>
-#include <linux/version.h>
+#include <linux/utsname.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
@@ -255,7 +255,7 @@
        printk("NIP: %016lX XER: %08X LR: %016lX CTR: %016lX\n",
               regs->nip, (unsigned int)regs->xer, regs->link, regs->ctr);
        printk("REGS: %p TRAP: %04lx   %s  (%s)\n",
-              regs, regs->trap, print_tainted(), UTS_RELEASE);
+              regs, regs->trap, print_tainted(), system_utsname.release);
        printk("MSR: %016lx EE: %01x PR: %01x FP: %01x ME: %01x "
               "IR/DR: %01x%01x CR: %08X\n",
               regs->msr, regs->msr&MSR_EE ? 1 : 0, regs->msr&MSR_PR ? 1 : 0,
diff -urN linux/arch/ppc64/kernel/prom.c linux/arch/ppc64/kernel/prom.c
--- linux/arch/ppc64/kernel/prom.c      2005/01/25 04:28:03     1.39
+++ linux/arch/ppc64/kernel/prom.c      2005/02/07 02:54:36     1.40
@@ -717,6 +717,7 @@
                                dad->next->sibling = np;
                        dad->next = np;
                }
+               kref_init(&np->kref);
        }
        while(1) {
                u32 sz, noff;
@@ -1475,24 +1476,31 @@
  *     @node:  Node to inc refcount, NULL is supported to
  *             simplify writing of callers
  *
- *     Returns the node itself or NULL if gone.
+ *     Returns node.
  */
 struct device_node *of_node_get(struct device_node *node)
 {
-       if (node && !OF_IS_STALE(node)) {
-               atomic_inc(&node->_users);
-               return node;
-       }
-       return NULL;
+       if (node)
+               kref_get(&node->kref);
+       return node;
 }
 EXPORT_SYMBOL(of_node_get);
 
+static inline struct device_node * kref_to_device_node(struct kref *kref)
+{
+       return container_of(kref, struct device_node, kref);
+}
+
 /**
- *     of_node_cleanup - release a dynamically allocated node
- *     @arg:  Node to be released
+ *     of_node_release - release a dynamically allocated node
+ *     @kref:  kref element of the node to be released
+ *
+ *     In of_node_put() this function is passed to kref_put()
+ *     as the destructor.
  */
-static void of_node_cleanup(struct device_node *node)
+static void of_node_release(struct kref *kref)
 {
+       struct device_node *node = kref_to_device_node(kref);
        struct property *prop = node->properties;
 
        if (!OF_IS_DYNAMIC(node))
@@ -1518,19 +1526,8 @@
  */
 void of_node_put(struct device_node *node)
 {
-       if (!node)
-               return;
-
-       WARN_ON(0 == atomic_read(&node->_users));
-
-       if (OF_IS_STALE(node)) {
-               if (atomic_dec_and_test(&node->_users)) {
-                       of_node_cleanup(node);
-                       return;
-               }
-       }
-       else
-               atomic_dec(&node->_users);
+       if (node)
+               kref_put(&node->kref, of_node_release);
 }
 EXPORT_SYMBOL(of_node_put);
 
@@ -1773,6 +1770,7 @@
 
        np->properties = proplist;
        OF_MARK_DYNAMIC(np);
+       kref_init(&np->kref);
        of_node_get(np);
        np->parent = derive_parent(path);
        if (!np->parent) {
@@ -1809,8 +1807,9 @@
 }
 
 /*
- * Remove an OF device node from the system.
- * Caller should have already "gotten" np.
+ * "Unplug" a node from the device tree.  The caller must hold
+ * a reference to the node.  The memory associated with the node
+ * is not freed until its refcount goes to zero.
  */
 int of_remove_node(struct device_node *np)
 {
@@ -1828,7 +1827,6 @@
        of_cleanup_node(np);
 
        write_lock(&devtree_lock);
-       OF_MARK_STALE(np);
        remove_node_proc_entries(np);
        if (allnodes == np)
                allnodes = np->allnext;
@@ -1853,6 +1851,7 @@
        }
        write_unlock(&devtree_lock);
        of_node_put(parent);
+       of_node_put(np); /* Must decrement the refcount */
        return 0;
 }
 
diff -urN linux/arch/ppc64/kernel/signal.c linux/arch/ppc64/kernel/signal.c
--- linux/arch/ppc64/kernel/signal.c    2004/12/27 02:15:51     1.30
+++ linux/arch/ppc64/kernel/signal.c    2005/02/07 02:54:36     1.31
@@ -67,7 +67,7 @@
        struct siginfo info;
        /* 64 bit ABI allows for 288 bytes below sp before decrementing it. */
        char abigap[288];
-};
+} __attribute__ ((aligned (16)));
 
 
 /*
@@ -254,7 +254,7 @@
                        newsp = (current->sas_ss_sp + current->sas_ss_size);
        }
 
-        return (void __user *)((newsp - frame_size) & -8ul);
+        return (void __user *)((newsp - frame_size) & -16ul);
 }
 
 /*
diff -urN linux/arch/ppc64/kernel/smp.c linux/arch/ppc64/kernel/smp.c
--- linux/arch/ppc64/kernel/smp.c       2005/01/25 04:28:03     1.45
+++ linux/arch/ppc64/kernel/smp.c       2005/02/07 02:54:36     1.46
@@ -459,8 +459,7 @@
                 * hotplug case.  Wait five seconds.
                 */
                for (c = 25; c && !cpu_callin_map[cpu]; c--) {
-                       set_current_state(TASK_UNINTERRUPTIBLE);
-                       schedule_timeout(HZ/5);
+                       msleep(200);
                }
 #endif
 
diff -urN linux/arch/ppc64/kernel/sys_ppc32.c 
linux/arch/ppc64/kernel/sys_ppc32.c
--- linux/arch/ppc64/kernel/sys_ppc32.c 2005/01/13 14:05:34     1.44
+++ linux/arch/ppc64/kernel/sys_ppc32.c 2005/02/07 02:54:36     1.45
@@ -492,6 +492,7 @@
        return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
 }
 
+#ifdef CONFIG_SYSVIPC
 long sys32_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr,
               u32 fifth)
 {
@@ -556,6 +557,7 @@
 
        return -ENOSYS;
 }
+#endif
 
 /* Note: it is necessary to treat out_fd and in_fd as unsigned ints, 
  * with the corresponding cast to a signed int to insure that the 
@@ -1104,6 +1106,7 @@
        return sys_umask((int)mask);
 }
 
+#ifdef CONFIG_SYSCTL
 struct __sysctl_args32 {
        u32 name;
        int nlen;
@@ -1153,6 +1156,7 @@
        }
        return error;
 }
+#endif
 
 asmlinkage int sys32_olduname(struct oldold_utsname __user * name)
 {
diff -urN linux/arch/ppc64/kernel/traps.c linux/arch/ppc64/kernel/traps.c
--- linux/arch/ppc64/kernel/traps.c     2005/01/25 04:28:03     1.31
+++ linux/arch/ppc64/kernel/traps.c     2005/02/07 02:54:36     1.32
@@ -29,6 +29,7 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/delay.h>
 #include <asm/kdebug.h>
 
 #include <asm/pgtable.h>
@@ -137,8 +138,7 @@
 
        if (panic_on_oops) {
                printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
-               set_current_state(TASK_UNINTERRUPTIBLE);
-               schedule_timeout(5 * HZ);
+               ssleep(5);
                panic("Fatal exception");
        }
        do_exit(SIGSEGV);
diff -urN linux/arch/ppc64/mm/hash_utils.c linux/arch/ppc64/mm/hash_utils.c
--- linux/arch/ppc64/mm/hash_utils.c    2005/01/13 14:05:36     1.10
+++ linux/arch/ppc64/mm/hash_utils.c    2005/02/07 02:54:37     1.11
@@ -294,12 +294,6 @@
                vsid = get_kernel_vsid(ea);
                break;
 #if 0
-       case EEH_REGION_ID:
-               /*
-                * Should only be hit if there is an access to MMIO space
-                * which is protected by EEH.
-                * Send the problem up to do_page_fault 
-                */
        case KERNEL_REGION_ID:
                /*
                 * Should never get here - entire 0xC0... region is bolted.
diff -urN linux/arch/ppc64/mm/slb.c linux/arch/ppc64/mm/slb.c
--- linux/arch/ppc64/mm/slb.c   2005/01/13 14:05:36     1.4
+++ linux/arch/ppc64/mm/slb.c   2005/02/07 02:54:37     1.5
@@ -78,7 +78,7 @@
 void switch_slb(struct task_struct *tsk, struct mm_struct *mm)
 {
        unsigned long offset = get_paca()->slb_cache_ptr;
-       unsigned long esid_data;
+       unsigned long esid_data = 0;
        unsigned long pc = KSTK_EIP(tsk);
        unsigned long stack = KSTK_ESP(tsk);
        unsigned long unmapped_base;
@@ -97,11 +97,8 @@
        }
 
        /* Workaround POWER5 < DD2.1 issue */
-       if (offset == 1 || offset > SLB_CACHE_ENTRIES) {
-               /* flush segment in EEH region, we shouldn't ever
-                * access addresses in this region. */
-               asm volatile("slbie %0" : : "r"(EEHREGIONBASE));
-       }
+       if (offset == 1 || offset > SLB_CACHE_ENTRIES)
+               asm volatile("slbie %0" : : "r" (esid_data));
 
        get_paca()->slb_cache_ptr = 0;
        get_paca()->context = mm->context;
diff -urN linux/arch/ppc64/oprofile/common.c linux/arch/ppc64/oprofile/common.c
--- linux/arch/ppc64/oprofile/common.c  2005/01/13 14:05:36     1.7
+++ linux/arch/ppc64/oprofile/common.c  2005/02/07 02:54:37     1.8
@@ -125,7 +125,7 @@
        return 0;
 }
 
-void __init oprofile_arch_init(struct oprofile_operations *ops)
+int __init oprofile_arch_init(struct oprofile_operations *ops)
 {
        unsigned int pvr;
 
@@ -170,7 +170,7 @@
                        break;
 
                default:
-                       return;
+                       return -ENODEV;
        }
 
        ops->create_files = op_ppc64_create_files;
@@ -181,6 +181,8 @@
 
        printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
               ops->cpu_type);
+
+       return 0;
 }
 
 void oprofile_arch_exit(void)
diff -urN linux/arch/ppc64/xmon/xmon.c linux/arch/ppc64/xmon/xmon.c
--- linux/arch/ppc64/xmon/xmon.c        2005/01/13 14:05:36     1.28
+++ linux/arch/ppc64/xmon/xmon.c        2005/02/07 02:54:37     1.29
@@ -624,6 +624,17 @@
        return 0;
 }
 
+/* On systems with a hypervisor, we can't set the DABR
+   (data address breakpoint register) directly. */
+static void set_controlled_dabr(unsigned long val)
+{
+       if (systemcfg->platform == PLATFORM_PSERIES_LPAR) {
+               int rc = plpar_hcall_norets(H_SET_DABR, val);
+               if (rc != H_Success)
+                       xmon_printf("Warning: setting DABR failed (%d)\n", rc);
+       } else
+               set_dabr(val);
+}
 
 static struct bpt *at_breakpoint(unsigned long pc)
 {
@@ -711,7 +722,7 @@
 static void insert_cpu_bpts(void)
 {
        if (dabr.enabled)
-               set_dabr(dabr.address | (dabr.enabled & 7));
+               set_controlled_dabr(dabr.address | (dabr.enabled & 7));
        if (iabr && (cur_cpu_spec->cpu_features & CPU_FTR_IABR))
                set_iabr(iabr->address
                         | (iabr->enabled & (BP_IABR|BP_IABR_TE)));
@@ -739,7 +750,7 @@
 
 static void remove_cpu_bpts(void)
 {
-       set_dabr(0);
+       set_controlled_dabr(0);
        if ((cur_cpu_spec->cpu_features & CPU_FTR_IABR))
                set_iabr(0);
 }
@@ -1049,8 +1060,8 @@
     "b <addr> [cnt]   set breakpoint at given instr addr\n"
     "bc               clear all breakpoints\n"
     "bc <n/addr>      clear breakpoint number n or at addr\n"
-    "bi <addr> [cnt]  set hardware instr breakpoint (broken?)\n"
-    "bd <addr> [cnt]  set hardware data breakpoint (broken?)\n"
+    "bi <addr> [cnt]  set hardware instr breakpoint (POWER3/RS64 only)\n"
+    "bd <addr> [cnt]  set hardware data breakpoint\n"
     "";
 
 static void
diff -urN linux/arch/s390/kernel/compat_linux.c 
linux/arch/s390/kernel/compat_linux.c
--- linux/arch/s390/kernel/compat_linux.c       2005/01/13 14:05:36     1.13
+++ linux/arch/s390/kernel/compat_linux.c       2005/02/07 02:54:37     1.14
@@ -906,6 +906,7 @@
        return ret;
 }
 
+#ifdef CONFIG_SYSCTL
 struct __sysctl_args32 {
        u32 name;
        int nlen;
@@ -953,6 +954,7 @@
        }
        return error;
 }
+#endif
 
 struct stat64_emu31 {
        unsigned long long  st_dev;
diff -urN linux/arch/s390/kernel/process.c linux/arch/s390/kernel/process.c
--- linux/arch/s390/kernel/process.c    2005/01/13 14:05:36     1.32
+++ linux/arch/s390/kernel/process.c    2005/02/07 02:54:37     1.33
@@ -215,8 +215,7 @@
 
 void flush_thread(void)
 {
-
-        current->used_math = 0;
+       clear_used_math();
        clear_tsk_thread_flag(current, TIF_USEDFPU);
 }
 
diff -urN linux/arch/s390/kernel/setup.c linux/arch/s390/kernel/setup.c
--- linux/arch/s390/kernel/setup.c      2005/01/25 04:28:04     1.34
+++ linux/arch/s390/kernel/setup.c      2005/02/07 02:54:37     1.35
@@ -96,7 +96,7 @@
          * Force FPU initialization:
          */
         clear_thread_flag(TIF_USEDFPU);
-        current->used_math = 0;
+        clear_used_math();
 
        atomic_inc(&init_mm.mm_count);
        current->active_mm = &init_mm;
diff -urN linux/arch/s390/lib/string.c linux/arch/s390/lib/string.c
--- linux/arch/s390/lib/string.c        2004/09/19 12:30:06     1.3
+++ linux/arch/s390/lib/string.c        2005/02/07 02:54:37     1.4
@@ -357,21 +357,6 @@
 EXPORT_SYMBOL(memcpy);
 
 /**
- * bcopy - Copy one area of memory to another
- * @src: Where to copy from
- * @dest: Where to copy to
- * @n: The size of the area.
- *
- * Note that this is the same as memcpy(), with the arguments reversed.
- * memcpy() is the standard, bcopy() is a legacy BSD function.
- */
-void bcopy(const void *srcp, void *destp, size_t n)
-{
-       __builtin_memcpy(destp, srcp, n);
-}
-EXPORT_SYMBOL(bcopy);
-
-/**
  * memset - Fill a region of memory with the given value
  * @s: Pointer to the start of the area.
  * @c: The byte to fill the area with
diff -urN linux/arch/s390/mm/extmem.c linux/arch/s390/mm/extmem.c
--- linux/arch/s390/mm/extmem.c 2005/01/25 04:28:04     1.6
+++ linux/arch/s390/mm/extmem.c 2005/02/07 02:54:37     1.7
@@ -117,7 +117,7 @@
        struct list_head *l;
        struct dcss_segment *tmp, *retval = NULL;
 
-       BUG_ON (!spin_is_locked(&dcss_lock));
+       assert_spin_locked(&dcss_lock);
        dcss_mkname (name, dcss_name);
        list_for_each (l, &dcss_list) {
                tmp = list_entry (l, struct dcss_segment, list);
@@ -271,7 +271,7 @@
        struct list_head *l;
        struct dcss_segment *tmp;
 
-       BUG_ON (!spin_is_locked(&dcss_lock));
+       assert_spin_locked(&dcss_lock);
        list_for_each(l, &dcss_list) {
                tmp = list_entry(l, struct dcss_segment, list);
                if ((tmp->start_addr >> 20) > (seg->end >> 20))
diff -urN linux/arch/s390/oprofile/init.c linux/arch/s390/oprofile/init.c
--- linux/arch/s390/oprofile/init.c     2005/01/13 14:05:37     1.2
+++ linux/arch/s390/oprofile/init.c     2005/02/07 02:54:37     1.3
@@ -12,8 +12,9 @@
 #include <linux/init.h>
 #include <linux/errno.h>
 
-void __init oprofile_arch_init(struct oprofile_operations* ops)
+int __init oprofile_arch_init(struct oprofile_operations* ops)
 {
+       return -ENODEV;
 }
 
 void oprofile_arch_exit(void)
diff -urN linux/arch/sh/kernel/process.c linux/arch/sh/kernel/process.c
--- linux/arch/sh/kernel/process.c      2005/01/13 14:05:37     1.33
+++ linux/arch/sh/kernel/process.c      2005/02/07 02:54:37     1.34
@@ -208,7 +208,7 @@
 
        /* Forget lazy FPU state */
        clear_fpu(tsk, regs);
-       tsk->used_math = 0;
+       clear_used_math();
 #endif
 }
 
@@ -225,7 +225,7 @@
 #if defined(CONFIG_SH_FPU)
        struct task_struct *tsk = current;
 
-       fpvalid = tsk->used_math;
+       fpvalid = !!tsk_used_math(tsk);
        if (fpvalid) {
                unlazy_fpu(tsk, regs);
                memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu));
@@ -260,7 +260,7 @@
        int fpvalid = 0;
 
 #if defined(CONFIG_SH_FPU)
-       fpvalid = tsk->used_math;
+       fpvalid = !!tsk_used_math(tsk);
        if (fpvalid) {
                struct pt_regs *regs = (struct pt_regs *)
                                        ((unsigned long)tsk->thread_info
@@ -286,7 +286,7 @@
 
        unlazy_fpu(tsk, regs);
        p->thread.fpu = tsk->thread.fpu;
-       p->used_math = tsk->used_math;
+       copy_to_stopped_child_used_math(p);
 #endif
 
        childregs = ((struct pt_regs *)
diff -urN linux/arch/sh/kernel/ptrace.c linux/arch/sh/kernel/ptrace.c
--- linux/arch/sh/kernel/ptrace.c       2004/10/25 20:44:20     1.14
+++ linux/arch/sh/kernel/ptrace.c       2005/02/07 02:54:37     1.15
@@ -150,7 +150,7 @@
                        tmp = get_stack_long(child, addr);
                else if (addr >= (long) &dummy->fpu &&
                         addr < (long) &dummy->u_fpvalid) {
-                       if (!child->used_math) {
+                       if (!tsk_used_math(child)) {
                                if (addr == (long)&dummy->fpu.fpscr)
                                        tmp = FPSCR_INIT;
                                else
@@ -159,7 +159,7 @@
                                tmp = ((long *)&child->thread.fpu)
                                        [(addr - (long)&dummy->fpu) >> 2];
                } else if (addr == (long) &dummy->u_fpvalid)
-                       tmp = child->used_math;
+                       tmp = !!tsk_used_math(child);
                else
                        tmp = 0;
                ret = put_user(tmp, (unsigned long *)data);
@@ -185,12 +185,12 @@
                        ret = put_stack_long(child, addr, data);
                else if (addr >= (long) &dummy->fpu &&
                         addr < (long) &dummy->u_fpvalid) {
-                       child->used_math = 1;
+                       set_stopped_child_used_math(child);
                        ((long *)&child->thread.fpu)
                                [(addr - (long)&dummy->fpu) >> 2] = data;
                        ret = 0;
                } else if (addr == (long) &dummy->u_fpvalid) {
-                       child->used_math = data?1:0;
+                       conditional_stopped_child_used_math(data, child);
                        ret = 0;
                }
                break;
diff -urN linux/arch/sh/kernel/signal.c linux/arch/sh/kernel/signal.c
--- linux/arch/sh/kernel/signal.c       2005/01/25 04:28:05     1.27
+++ linux/arch/sh/kernel/signal.c       2005/02/07 02:54:37     1.28
@@ -162,7 +162,7 @@
        if (!(cpu_data->flags & CPU_HAS_FPU))
                return 0;
 
-       tsk->used_math = 1;
+       set_used_math();
        return __copy_from_user(&tsk->thread.fpu.hard, &sc->sc_fpregs[0],
                                sizeof(long)*(16*2+2));
 }
@@ -175,7 +175,7 @@
        if (!(cpu_data->flags & CPU_HAS_FPU))
                return 0;
 
-       if (!tsk->used_math) {
+       if (!used_math()) {
                __put_user(0, &sc->sc_ownedfp);
                return 0;
        }
@@ -185,7 +185,7 @@
        /* This will cause a "finit" to be triggered by the next
           attempted FPU operation by the 'current' process.
           */
-       tsk->used_math = 0;
+       clear_used_math();
 
        unlazy_fpu(tsk, regs);
        return __copy_to_user(&sc->sc_fpregs[0], &tsk->thread.fpu.hard,
@@ -219,7 +219,7 @@
 
                regs->sr |= SR_FD; /* Release FPU */
                clear_fpu(tsk, regs);
-               tsk->used_math = 0;
+               clear_used_math();
                __get_user (owned_fp, &sc->sc_ownedfp);
                if (owned_fp)
                        err |= restore_sigcontext_fpu(sc);
diff -urN linux/arch/sh/kernel/cpu/init.c linux/arch/sh/kernel/cpu/init.c
--- linux/arch/sh/kernel/cpu/init.c     2004/10/25 20:44:20     1.4
+++ linux/arch/sh/kernel/cpu/init.c     2005/02/07 02:54:37     1.5
@@ -194,7 +194,7 @@
        /* FPU initialization */
        if ((cpu_data->flags & CPU_HAS_FPU)) {
                clear_thread_flag(TIF_USEDFPU);
-               current->used_math = 0;
+               clear_used_math();
        }
 
 #ifdef CONFIG_SH_DSP
diff -urN linux/arch/sh/kernel/cpu/sh4/fpu.c linux/arch/sh/kernel/cpu/sh4/fpu.c
--- linux/arch/sh/kernel/cpu/sh4/fpu.c  2004/02/19 03:06:24     1.3
+++ linux/arch/sh/kernel/cpu/sh4/fpu.c  2005/02/07 02:54:38     1.4
@@ -323,13 +323,13 @@
                return;
        }
 
-       if (tsk->used_math) {
+       if (used_math()) {
                /* Using the FPU again.  */
                restore_fpu(tsk);
        } else  {
                /* First time FPU user.  */
                fpu_init();
-               tsk->used_math = 1;
+               set_used_math();
        }
        set_tsk_thread_flag(tsk, TIF_USEDFPU);
 }
diff -urN linux/arch/sh/oprofile/op_model_null.c 
linux/arch/sh/oprofile/op_model_null.c
--- linux/arch/sh/oprofile/op_model_null.c      2005/01/13 14:05:37     1.2
+++ linux/arch/sh/oprofile/op_model_null.c      2005/02/07 02:54:38     1.3
@@ -12,8 +12,9 @@
 #include <linux/init.h>
 #include <linux/errno.h>
 
-void __init oprofile_arch_init(struct oprofile_operations *ops)
+int __init oprofile_arch_init(struct oprofile_operations *ops)
 {
+       return -ENODEV;
 }
 
 void oprofile_arch_exit(void)
diff -urN linux/arch/sh/oprofile/op_model_sh7750.c 
linux/arch/sh/oprofile/op_model_sh7750.c
--- linux/arch/sh/oprofile/op_model_sh7750.c    2004/10/25 20:44:20     1.1
+++ linux/arch/sh/oprofile/op_model_sh7750.c    2005/02/07 02:54:38     1.2
@@ -112,14 +112,9 @@
  */
 
 static int sh7750_timer_notify(struct notifier_block *self,
-                              unsigned long val, void *data)
+                              unsigned long val, void *regs)
 {
-       struct pt_regs *regs = data;
-       unsigned long pc;
-
-       pc = instruction_pointer(regs);
-       oprofile_add_sample(pc, !user_mode(regs), 0, smp_processor_id());
-
+       oprofile_add_sample((struct pt_regs *)regs, 0);
        return 0;
 }
 
diff -urN linux/arch/sh64/kernel/fpu.c linux/arch/sh64/kernel/fpu.c
--- linux/arch/sh64/kernel/fpu.c        2004/06/30 17:26:46     1.2
+++ linux/arch/sh64/kernel/fpu.c        2005/02/07 02:54:38     1.3
@@ -158,12 +158,12 @@
                fpsave(&last_task_used_math->thread.fpu.hard);
         }
         last_task_used_math = current;
-        if (current->used_math) {
+        if (used_math()) {
                 fpload(&current->thread.fpu.hard);
         } else {
                /* First time FPU user.  */
                fpload(&init_fpuregs.hard);
-                current->used_math = 1;
+                set_used_math();
         }
        release_fpu();
 }
diff -urN linux/arch/sh64/kernel/process.c linux/arch/sh64/kernel/process.c
--- linux/arch/sh64/kernel/process.c    2005/01/13 14:05:37     1.5
+++ linux/arch/sh64/kernel/process.c    2005/02/07 02:54:38     1.6
@@ -688,7 +688,7 @@
                last_task_used_math = NULL;
        }
        /* Force FPU state to be reinitialised after exec */
-       current->used_math = 0;
+       clear_used_math();
 #endif
 
        /* if we are a kernel thread, about to change to user thread,
@@ -713,7 +713,7 @@
        int fpvalid;
        struct task_struct *tsk = current;
 
-       fpvalid = tsk->used_math;
+       fpvalid = !!tsk_used_math(tsk);
        if (fpvalid) {
                if (current == last_task_used_math) {
                        grab_fpu();
diff -urN linux/arch/sh64/kernel/ptrace.c linux/arch/sh64/kernel/ptrace.c
--- linux/arch/sh64/kernel/ptrace.c     2004/10/25 20:44:20     1.4
+++ linux/arch/sh64/kernel/ptrace.c     2005/02/07 02:54:38     1.5
@@ -63,7 +63,7 @@
        struct pt_regs *regs;
        regs = (struct pt_regs*)((unsigned char *)task + THREAD_SIZE) - 1;
 
-       if (!task->used_math) {
+       if (!tsk_used_math(task)) {
                if (addr == offsetof(struct user_fpu_struct, fpscr)) {
                        tmp = FPSCR_INIT;
                } else {
@@ -105,9 +105,9 @@
 
        regs = (struct pt_regs*)((unsigned char *)task + THREAD_SIZE) - 1;
 
-       if (!task->used_math) {
+       if (!tsk_used_math(task)) {
                fpinit(&task->thread.fpu.hard);
-               task->used_math = 1;
+               set_stopped_child_used_math(task);
        } else if (last_task_used_math == task) {
                grab_fpu();
                fpsave(&task->thread.fpu.hard);
@@ -187,7 +187,7 @@
                         (addr <  offsetof(struct user, u_fpvalid))) {
                        tmp = get_fpu_long(child, addr - offsetof(struct user, 
fpu));
                } else if (addr == offsetof(struct user, u_fpvalid)) {
-                       tmp = child->used_math;
+                       tmp = !!tsk_used_math(child);
                } else {
                        break;
                }
diff -urN linux/arch/sh64/kernel/signal.c linux/arch/sh64/kernel/signal.c
--- linux/arch/sh64/kernel/signal.c     2005/01/25 04:28:05     1.4
+++ linux/arch/sh64/kernel/signal.c     2005/02/07 02:54:38     1.5
@@ -186,7 +186,7 @@
        int fpvalid;
 
        err |= __get_user (fpvalid, &sc->sc_fpvalid);
-       current->used_math = fpvalid;
+       conditional_used_math(fpvalid);
        if (! fpvalid)
                return err;
 
@@ -207,7 +207,7 @@
        int err = 0;
        int fpvalid;
 
-       fpvalid = current->used_math;
+       fpvalid = !!used_math();
        err |= __put_user(fpvalid, &sc->sc_fpvalid);
        if (! fpvalid)
                return err;
@@ -222,7 +222,7 @@
 
        err |= __copy_to_user(&sc->sc_fpregs[0], &current->thread.fpu.hard,
                              (sizeof(long long) * 32) + (sizeof(int) * 1));
-       current->used_math = 0;
+       clear_used_math();
 
        return err;
 }
diff -urN linux/arch/sparc/Kconfig linux/arch/sparc/Kconfig
--- linux/arch/sparc/Kconfig    2005/01/13 14:05:38     1.30
+++ linux/arch/sparc/Kconfig    2005/02/07 02:54:38     1.31
@@ -380,6 +380,8 @@
 
 source "drivers/usb/Kconfig"
 
+source "drivers/infiniband/Kconfig"
+
 source "drivers/char/watchdog/Kconfig"
 
 source "arch/sparc/Kconfig.debug"
diff -urN linux/arch/sparc/kernel/muldiv.c linux/arch/sparc/kernel/muldiv.c
--- linux/arch/sparc/kernel/muldiv.c    2004/06/09 14:12:06     1.4
+++ linux/arch/sparc/kernel/muldiv.c    2005/02/07 02:54:38     1.5
@@ -4,6 +4,9 @@
  *
  * Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
+ *
+ * 2004-12-25  Krzysztof Helt (krzysztof.h1@wp.pl) 
+ *             - fixed registers constrains in inline assembly declarations
  */
 
 #include <linux/kernel.h>
@@ -132,7 +135,7 @@
                        "mov    %%o0, %0\n\t"
                        "mov    %%o1, %1\n\t"
                        : "=r" (rs1), "=r" (rs2)
-                       :
+                       : "0" (rs1), "1" (rs2)
                        : "o0", "o1", "o2", "o3", "o4", "o5", "o7", "cc");
 #ifdef DEBUG_MULDIV
                printk ("0x%x%08x\n", rs2, rs1);
@@ -152,7 +155,7 @@
                        "mov    %%o0, %0\n\t"
                        "mov    %%o1, %1\n\t"
                        : "=r" (rs1), "=r" (rs2)
-                       :
+                       : "0" (rs1), "1" (rs2)
                        : "o0", "o1", "o2", "o3", "o4", "o5", "o7", "cc");
 #ifdef DEBUG_MULDIV
                printk ("0x%x%08x\n", rs2, rs1);
@@ -181,7 +184,7 @@
                        "mov    %%o1, %0\n\t"
                        "mov    %%o0, %1\n\t"
                        : "=r" (rs1), "=r" (rs2)
-                       : "r" (regs->y)
+                       : "r" (regs->y), "0" (rs1), "1" (rs2)
                        : "o0", "o1", "o2", "o3", "o4", "o5", "o7",
                          "g1", "g2", "g3", "cc");
 #ifdef DEBUG_MULDIV
@@ -210,7 +213,7 @@
                        "mov    %%o1, %0\n\t"
                        "mov    %%o0, %1\n\t"
                        : "=r" (rs1), "=r" (rs2)
-                       : "r" (regs->y)
+                       : "r" (regs->y), "0" (rs1), "1" (rs2)
                        : "o0", "o1", "o2", "o3", "o4", "o5", "o7",
                          "g1", "g2", "g3", "cc");
 #ifdef DEBUG_MULDIV
diff -urN linux/arch/sparc/kernel/process.c linux/arch/sparc/kernel/process.c
--- linux/arch/sparc/kernel/process.c   2005/01/25 04:28:05     1.61
+++ linux/arch/sparc/kernel/process.c   2005/02/07 02:54:38     1.62
@@ -599,7 +599,7 @@
  */
 int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
 {
-       if (current->used_math == 0) {
+       if (used_math()) {
                memset(fpregs, 0, sizeof(*fpregs));
                fpregs->pr_q_entrysize = 8;
                return 1;
diff -urN linux/arch/sparc/kernel/signal.c linux/arch/sparc/kernel/signal.c
--- linux/arch/sparc/kernel/signal.c    2005/01/13 14:05:38     1.52
+++ linux/arch/sparc/kernel/signal.c    2005/02/07 02:54:38     1.53
@@ -202,7 +202,7 @@
                regs->psr &= ~PSR_EF;
        }
 #endif
-       current->used_math = 1;
+       set_used_math();
        clear_tsk_thread_flag(current, TIF_USEDFPU);
 
        if (verify_area(VERIFY_READ, fpu, sizeof(*fpu)))
@@ -584,7 +584,7 @@
                                      &current->thread.fpqueue[0],
                                      ((sizeof(unsigned long) +
                                      (sizeof(unsigned long *)))*16));
-       current->used_math = 0;
+       clear_used_math();
        return err;
 }
 
@@ -599,7 +599,7 @@
        synchronize_user_stack();
 
        sigframe_size = NF_ALIGNEDSZ;
-       if (!current->used_math)
+       if (!used_math())
                sigframe_size -= sizeof(__siginfo_fpu_t);
 
        sf = (struct new_signal_frame __user *)
@@ -616,7 +616,7 @@
        
        err |= __put_user(0, &sf->extra_size);
 
-       if (current->used_math) {
+       if (used_math()) {
                err |= save_fpu_state(regs, &sf->fpu_state);
                err |= __put_user(&sf->fpu_state, &sf->fpu_save);
        } else {
@@ -677,7 +677,7 @@
 
        synchronize_user_stack();
        sigframe_size = RT_ALIGNEDSZ;
-       if (!current->used_math)
+       if (!used_math())
                sigframe_size -= sizeof(__siginfo_fpu_t);
        sf = (struct rt_signal_frame __user *)
                get_sigframe(&ka->sa, regs, sigframe_size);
@@ -690,7 +690,7 @@
        err |= __put_user(regs->npc, &sf->regs.npc);
        err |= __put_user(regs->y, &sf->regs.y);
        psr = regs->psr;
-       if (current->used_math)
+       if (used_math())
                psr |= PSR_EF;
        err |= __put_user(psr, &sf->regs.psr);
        err |= __copy_to_user(&sf->regs.u_regs, regs->u_regs, 
sizeof(regs->u_regs));
diff -urN linux/arch/sparc/kernel/sparc_ksyms.c 
linux/arch/sparc/kernel/sparc_ksyms.c
--- linux/arch/sparc/kernel/sparc_ksyms.c       2004/09/19 12:30:06     1.54
+++ linux/arch/sparc/kernel/sparc_ksyms.c       2005/02/07 02:54:38     1.55
@@ -75,7 +75,6 @@
 extern int __memcmp(const void *, const void *, __kernel_size_t);
 extern int __strncmp(const char *, const char *, __kernel_size_t);
 
-extern void bcopy (const char *, char *, int);
 extern int __ashrdi3(int, int);
 extern int __ashldi3(int, int);
 extern int __lshrdi3(int, int);
@@ -261,7 +260,6 @@
 EXPORT_SYMBOL(__prom_getsibling);
 
 /* sparc library symbols */
-EXPORT_SYMBOL(bcopy);
 EXPORT_SYMBOL(memchr);
 EXPORT_SYMBOL(memscan);
 EXPORT_SYMBOL(strlen);
diff -urN linux/arch/sparc/kernel/traps.c linux/arch/sparc/kernel/traps.c
--- linux/arch/sparc/kernel/traps.c     2004/07/20 20:21:17     1.21
+++ linux/arch/sparc/kernel/traps.c     2005/02/07 02:54:38     1.22
@@ -246,17 +246,17 @@
                       &fptask->thread.fpqueue[0], &fptask->thread.fpqdepth);
        }
        last_task_used_math = current;
-       if(current->used_math) {
+       if(used_math()) {
                fpload(&current->thread.float_regs[0], &current->thread.fsr);
        } else {
                /* Set initial sane state. */
                fpload(&init_fregs[0], &init_fsr);
-               current->used_math = 1;
+               set_used_math();
        }
 #else
-       if(!current->used_math) {
+       if(!used_math()) {
                fpload(&init_fregs[0], &init_fsr);
-               current->used_math = 1;
+               set_used_math();
        } else {
                fpload(&current->thread.float_regs[0], &current->thread.fsr);
        }
diff -urN linux/arch/sparc/lib/memcpy.S linux/arch/sparc/lib/memcpy.S
--- linux/arch/sparc/lib/memcpy.S       2004/08/13 07:18:53     1.4
+++ linux/arch/sparc/lib/memcpy.S       2005/02/07 02:54:38     1.5
@@ -1,5 +1,5 @@
-/* memcpy.S: Sparc optimized memcpy, bcopy and memmove code
- * Hand optimized from GNU libc's memcpy, bcopy and memmove
+/* memcpy.S: Sparc optimized memcpy and memmove code
+ * Hand optimized from GNU libc's memcpy and memmove
  * Copyright (C) 1991,1996 Free Software Foundation
  * Copyright (C) 1995 Linus Torvalds (Linus.Torvalds@helsinki.fi)
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -192,13 +192,6 @@
        retl
         nop            ! Only bcopy returns here and it retuns void...
 
-FUNC(bcopy)
-       mov             %o0, %o3
-       mov             %o1, %o0
-       mov             %o3, %o1
-       tst             %o2
-       bcs             0b
-        /* Do the cmp in the delay slot */
 #ifdef __KERNEL__
 FUNC(amemmove)
 FUNC(__memmove)
diff -urN linux/arch/sparc/mm/srmmu.c linux/arch/sparc/mm/srmmu.c
--- linux/arch/sparc/mm/srmmu.c 2005/01/25 04:28:05     1.73
+++ linux/arch/sparc/mm/srmmu.c 2005/02/07 02:54:38     1.74
@@ -2197,6 +2197,7 @@
        BTFIXUPSET_CALL(free_pgd_fast, srmmu_free_pgd_fast, BTFIXUPCALL_NORM);
        BTFIXUPSET_CALL(get_pgd_fast, srmmu_get_pgd_fast, BTFIXUPCALL_NORM);
 
+       BTFIXUPSET_HALF(pte_readi, SRMMU_NOREAD);
        BTFIXUPSET_HALF(pte_writei, SRMMU_WRITE);
        BTFIXUPSET_HALF(pte_dirtyi, SRMMU_DIRTY);
        BTFIXUPSET_HALF(pte_youngi, SRMMU_REF);
diff -urN linux/arch/sparc/mm/sun4c.c linux/arch/sparc/mm/sun4c.c
--- linux/arch/sparc/mm/sun4c.c 2004/09/19 12:30:06     1.59
+++ linux/arch/sparc/mm/sun4c.c 2005/02/07 02:54:38     1.60
@@ -2225,6 +2225,7 @@
        BTFIXUPSET_CALL(free_pgd_fast, sun4c_free_pgd_fast, BTFIXUPCALL_NORM);
        BTFIXUPSET_CALL(get_pgd_fast, sun4c_get_pgd_fast, BTFIXUPCALL_NORM);
 
+       BTFIXUPSET_HALF(pte_readi, _SUN4C_PAGE_READ);
        BTFIXUPSET_HALF(pte_writei, _SUN4C_PAGE_WRITE);
        BTFIXUPSET_HALF(pte_dirtyi, _SUN4C_PAGE_MODIFIED);
        BTFIXUPSET_HALF(pte_youngi, _SUN4C_PAGE_ACCESSED);
diff -urN linux/arch/sparc64/defconfig linux/arch/sparc64/defconfig
--- linux/arch/sparc64/defconfig        2005/01/25 04:28:06     1.130
+++ linux/arch/sparc64/defconfig        2005/02/07 02:54:38     1.131
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10
-# Mon Jan 10 11:24:25 2005
+# Linux kernel version: 2.6.11-rc1
+# Fri Jan 21 20:03:21 2005
 #
 CONFIG_64BIT=y
 CONFIG_MMU=y
@@ -66,13 +66,13 @@
 CONFIG_NR_CPUS=4
 CONFIG_CPU_FREQ=y
 # CONFIG_CPU_FREQ_DEBUG is not set
-CONFIG_CPU_FREQ_PROC_INTF=y
+CONFIG_CPU_FREQ_STAT=m
+CONFIG_CPU_FREQ_STAT_DETAILS=y
 CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
 # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
 CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
 CONFIG_CPU_FREQ_GOV_POWERSAVE=m
 CONFIG_CPU_FREQ_GOV_USERSPACE=m
-# CONFIG_CPU_FREQ_24_API is not set
 CONFIG_CPU_FREQ_GOV_ONDEMAND=m
 CONFIG_CPU_FREQ_TABLE=y
 CONFIG_US3_FREQ=m
@@ -189,6 +189,7 @@
 # CONFIG_LOGO_LINUX_VGA16 is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
 CONFIG_LOGO_SUN_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Serial drivers
@@ -228,6 +229,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
@@ -247,6 +249,7 @@
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
+CONFIG_ATA_OVER_ETH=m
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -1202,6 +1205,7 @@
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_PC87360=m
+CONFIG_SENSORS_SMSC47B397=m
 CONFIG_SENSORS_SMSC47M1=m
 CONFIG_SENSORS_VIA686A=m
 CONFIG_SENSORS_W83781D=m
@@ -1759,6 +1763,7 @@
 # CONFIG_USB_SERIAL_IR is not set
 CONFIG_USB_SERIAL_EDGEPORT=m
 # CONFIG_USB_SERIAL_EDGEPORT_TI is not set
+CONFIG_USB_SERIAL_GARMIN=m
 CONFIG_USB_SERIAL_IPW=m
 CONFIG_USB_SERIAL_KEYSPAN_PDA=m
 CONFIG_USB_SERIAL_KEYSPAN=m
@@ -1779,6 +1784,7 @@
 CONFIG_USB_SERIAL_MCT_U232=m
 CONFIG_USB_SERIAL_PL2303=m
 # CONFIG_USB_SERIAL_SAFE is not set
+CONFIG_USB_SERIAL_TI=m
 CONFIG_USB_SERIAL_CYBERJACK=m
 CONFIG_USB_SERIAL_XIRCOM=m
 CONFIG_USB_SERIAL_OMNINET=m
@@ -1789,7 +1795,6 @@
 #
 CONFIG_USB_EMI62=m
 CONFIG_USB_EMI26=m
-# CONFIG_USB_TIGL is not set
 CONFIG_USB_AUERSWALD=m
 CONFIG_USB_RIO500=m
 CONFIG_USB_LEGOTOWER=m
@@ -1798,6 +1803,7 @@
 CONFIG_USB_CYTHERM=m
 CONFIG_USB_PHIDGETKIT=m
 CONFIG_USB_PHIDGETSERVO=m
+CONFIG_USB_IDMOUSE=m
 CONFIG_USB_TEST=m
 
 #
@@ -1863,6 +1869,7 @@
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_STACK_USAGE is not set
 CONFIG_KPROBES=y
 # CONFIG_DEBUG_DCFLUSH is not set
diff -urN linux/arch/sparc64/kernel/process.c 
linux/arch/sparc64/kernel/process.c
--- linux/arch/sparc64/kernel/process.c 2005/01/25 04:28:06     1.72
+++ linux/arch/sparc64/kernel/process.c 2005/02/07 02:54:38     1.73
@@ -167,7 +167,7 @@
        mm_segment_t old_fs;
        
        __asm__ __volatile__ ("flushw");
-       rw = (struct reg_window32 __user *)((long)(unsigned)regs->u_regs[14]);
+       rw = compat_ptr((unsigned)regs->u_regs[14]);
        old_fs = get_fs();
        set_fs (USER_DS);
        if (copy_from_user (&r_w, rw, sizeof(r_w))) {
@@ -434,14 +434,13 @@
                if (test_thread_flag(TIF_32BIT)) {
                        struct mm_struct *mm = t->task->mm;
                        pgd_t *pgd0 = &mm->pgd[0];
+                       pud_t *pud0 = pud_offset(pgd0, 0);
 
-                       if (pgd_none(*pgd0)) {
-                               pmd_t *page = pmd_alloc_one_fast(NULL, 0);
-                               if (!page)
-                                       page = pmd_alloc_one(NULL, 0);
-                               pgd_set(pgd0, page);
+                       if (pud_none(*pud0)) {
+                               pmd_t *page = pmd_alloc_one(mm, 0);
+                               pud_set(pud0, page);
                        }
-                       pgd_cache = ((unsigned long) pgd_val(*pgd0)) << 11UL;
+                       pgd_cache = ((unsigned long) pud_val(*pud0)) << 11UL;
                }
                __asm__ __volatile__("stxa %0, [%1] %2\n\t"
                                     "membar #Sync"
diff -urN linux/arch/sparc64/kernel/setup.c linux/arch/sparc64/kernel/setup.c
--- linux/arch/sparc64/kernel/setup.c   2004/09/19 12:30:06     1.58
+++ linux/arch/sparc64/kernel/setup.c   2005/02/07 02:54:38     1.59
@@ -151,6 +151,7 @@
                        struct task_struct *p;
                        struct mm_struct *mm = NULL;
                        pgd_t *pgdp;
+                       pud_t *pudp;
                        pmd_t *pmdp;
                        pte_t *ptep;
 
@@ -166,7 +167,10 @@
                        pgdp = pgd_offset(mm, va);
                        if (pgd_none(*pgdp))
                                goto done;
-                       pmdp = pmd_offset(pgdp, va);
+                       pudp = pud_offset(pgdp, va);
+                       if (pud_none(*pudp))
+                               goto done;
+                       pmdp = pmd_offset(pudp, va);
                        if (pmd_none(*pmdp))
                                goto done;
 
@@ -208,6 +212,7 @@
                         * vmalloc or prom_inherited mapping.
                         */
                        pgd_t *pgdp;
+                       pud_t *pudp;
                        pmd_t *pmdp;
                        pte_t *ptep;
                        int error;
@@ -221,7 +226,10 @@
                        pgdp = pgd_offset_k(va);
                        if (pgd_none(*pgdp))
                                goto done;
-                       pmdp = pmd_offset(pgdp, va);
+                       pudp = pud_offset(pgdp, va);
+                       if (pud_none(*pudp))
+                               goto done;
+                       pmdp = pmd_offset(pudp, va);
                        if (pmd_none(*pmdp))
                                goto done;
 
diff -urN linux/arch/sparc64/kernel/signal32.c 
linux/arch/sparc64/kernel/signal32.c
--- linux/arch/sparc64/kernel/signal32.c        2005/01/13 14:05:38     1.59
+++ linux/arch/sparc64/kernel/signal32.c        2005/02/07 02:54:38     1.60
@@ -194,7 +194,7 @@
                case __SI_FAULT >> 16:
                case __SI_POLL >> 16:
                        err |= __put_user(from->si_trapno, &to->si_trapno);
-                       err |= __put_user((long)from->si_addr, &to->si_addr);
+                       err |= __put_user((unsigned long)from->si_addr, 
&to->si_addr);
                        break;
                case __SI_RT >> 16: /* This is not generated by the kernel as 
of now.  */
                case __SI_MESGQ >> 16:
@@ -275,7 +275,7 @@
                regs->u_regs[UREG_I0] = EINVAL;
                return;
        }
-       if (copy_from_user(&set32, (void __user *)(long)uset, sizeof(set32))) {
+       if (copy_from_user(&set32, compat_ptr(uset), sizeof(set32))) {
                regs->tstate |= TSTATE_ICARRY;
                regs->u_regs[UREG_I0] = EFAULT;
                return;
@@ -720,9 +720,9 @@
                        sig_address = NULL;
                }
        }
-       err |= __put_user((long)sig_address, &sframep->sig_address);
+       err |= __put_user(ptr_to_compat(sig_address), &sframep->sig_address);
        err |= __put_user(sig_code, &sframep->sig_code);
-       err |= __put_user((u64)sc, &sframep->sig_scptr);
+       err |= __put_user(ptr_to_compat(sc), &sframep->sig_scptr);
        if (err)
                goto sigsegv;
 
@@ -857,7 +857,8 @@
                /* Flush instruction space. */
                unsigned long address = ((unsigned long)&(sf->insns[0]));
                pgd_t *pgdp = pgd_offset(current->mm, address);
-               pmd_t *pmdp = pmd_offset(pgdp, address);
+               pud_t *pudp = pud_offset(pgdp, address);
+               pmd_t *pmdp = pmd_offset(pudp, address);
                pte_t *ptep;
 
                regs->u_regs[UREG_I7] = (unsigned long) (&(sf->insns[0]) - 2);
@@ -967,7 +968,7 @@
        /* Save the currently window file: */
 
        /* 1. Link sfp->uc->gwins to our windows */
-       err |= __put_user((u32)(long)gw, &mc->gwin);
+       err |= __put_user(ptr_to_compat(gw), &mc->gwin);
            
        /* 2. Number of windows to restore at setcontext (): */
        err |= __put_user(get_thread_wsaved(), &gw->count);
@@ -1268,7 +1269,8 @@
                /* Flush instruction space. */
                unsigned long address = ((unsigned long)&(sf->insns[0]));
                pgd_t *pgdp = pgd_offset(current->mm, address);
-               pmd_t *pmdp = pmd_offset(pgdp, address);
+               pud_t *pudp = pud_offset(pgdp, address);
+               pmd_t *pmdp = pmd_offset(pudp, address);
                pte_t *ptep;
 
                regs->u_regs[UREG_I7] = (unsigned long) (&(sf->insns[0]) - 2);
@@ -1446,10 +1448,12 @@
        u32 u_ss_sp = 0;
        int ret;
        mm_segment_t old_fs;
+       stack_t32 __user *uss32 = compat_ptr(ussa);
+       stack_t32 __user *uoss32 = compat_ptr(uossa);
        
-       if (ussa && (get_user(u_ss_sp, &((stack_t32 __user 
*)(long)ussa)->ss_sp) ||
-                   __get_user(uss.ss_flags, &((stack_t32 __user 
*)(long)ussa)->ss_flags) ||
-                   __get_user(uss.ss_size, &((stack_t32 __user 
*)(long)ussa)->ss_size)))
+       if (ussa && (get_user(u_ss_sp, &uss32->ss_sp) ||
+                   __get_user(uss.ss_flags, &uss32->ss_flags) ||
+                   __get_user(uss.ss_size, &uss32->ss_size)))
                return -EFAULT;
        uss.ss_sp = compat_ptr(u_ss_sp);
        old_fs = get_fs();
@@ -1457,9 +1461,9 @@
        ret = do_sigaltstack(ussa ? (stack_t __user *) &uss : NULL,
                             uossa ? (stack_t __user *) &uoss : NULL, sp);
        set_fs(old_fs);
-       if (!ret && uossa && (put_user((long)uoss.ss_sp, &((stack_t32 __user 
*)(long)uossa)->ss_sp) ||
-                   __put_user(uoss.ss_flags, &((stack_t32 __user 
*)(long)uossa)->ss_flags) ||
-                   __put_user(uoss.ss_size, &((stack_t32 __user 
*)(long)uossa)->ss_size)))
+       if (!ret && uossa && (put_user(ptr_to_compat(uoss.ss_sp), 
&uoss32->ss_sp) ||
+                   __put_user(uoss.ss_flags, &uoss32->ss_flags) ||
+                   __put_user(uoss.ss_size, &uoss32->ss_size)))
                return -EFAULT;
        return ret;
 }
diff -urN linux/arch/sparc64/kernel/sparc64_ksyms.c 
linux/arch/sparc64/kernel/sparc64_ksyms.c
--- linux/arch/sparc64/kernel/sparc64_ksyms.c   2004/11/15 11:49:21     1.83
+++ linux/arch/sparc64/kernel/sparc64_ksyms.c   2005/02/07 02:54:38     1.84
@@ -86,7 +86,7 @@
 extern int svr4_setcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
 extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
 extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
-extern long sparc32_open(const char * filename, int flags, int mode);
+extern long sparc32_open(const char __user * filename, int flags, int mode);
 extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, 
unsigned long offset, unsigned long size, pgprot_t prot, int space);
 extern void (*prom_palette)(int);
 
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/25 04:28:06     1.119
+++ linux/arch/sparc64/kernel/sys_sparc32.c     2005/02/07 02:54:38     1.120
@@ -1090,8 +1090,8 @@
         ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
 
        if (!ret && oact) {
-               ret = put_user((long)old_ka.sa.sa_handler, &oact->sa_handler);
-               ret |= __put_user((long)old_ka.sa.sa_restorer, 
&oact->sa_restorer);
+               ret = put_user(ptr_to_compat(old_ka.sa.sa_handler), 
&oact->sa_handler);
+               ret |= __put_user(ptr_to_compat(old_ka.sa.sa_restorer), 
&oact->sa_restorer);
                ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
                ret |= __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
         }
@@ -1147,10 +1147,10 @@
                case 2: set32.sig[3] = (old_ka.sa.sa_mask.sig[1] >> 32); 
set32.sig[2] = old_ka.sa.sa_mask.sig[1];
                case 1: set32.sig[1] = (old_ka.sa.sa_mask.sig[0] >> 32); 
set32.sig[0] = old_ka.sa.sa_mask.sig[0];
                }
-               ret = put_user((long)old_ka.sa.sa_handler, &oact->sa_handler);
+               ret = put_user(ptr_to_compat(old_ka.sa.sa_handler), 
&oact->sa_handler);
                ret |= __copy_to_user(&oact->sa_mask, &set32, 
sizeof(compat_sigset_t));
                ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
-               ret |= __put_user((long)old_ka.sa.sa_restorer, 
&oact->sa_restorer);
+               ret |= __put_user(ptr_to_compat(old_ka.sa.sa_restorer), 
&oact->sa_restorer);
                if (ret)
                        ret = -EFAULT;
         }
diff -urN linux/arch/sparc64/kernel/sys_sunos32.c 
linux/arch/sparc64/kernel/sys_sunos32.c
--- linux/arch/sparc64/kernel/sys_sunos32.c     2005/01/25 04:28:06     1.68
+++ linux/arch/sparc64/kernel/sys_sunos32.c     2005/02/07 02:54:38     1.69
@@ -1177,11 +1177,11 @@
        return rval;
 }
 
-extern asmlinkage long sparc32_open(const char * filename, int flags, int 
mode);
+extern asmlinkage long sparc32_open(const char __user * filename, int flags, 
int mode);
 
 asmlinkage int sunos_open(u32 fname, int flags, int mode)
 {
-       const char *filename = (const char *)(long)fname;
+       const char __user *filename = compat_ptr(fname);
 
        return sparc32_open(filename, flags, mode);
 }
@@ -1294,7 +1294,7 @@
 
        if (!ret && oact) {
                old_ka.sa.sa_flags ^= SUNOS_SV_INTERRUPT;
-               if (put_user((long)old_ka.sa.sa_handler, &oact->sa_handler) ||
+               if (put_user(ptr_to_compat(old_ka.sa.sa_handler), 
&oact->sa_handler) ||
                    __put_user(old_ka.sa.sa_flags, &oact->sa_flags))
                        return -EFAULT;
                __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
diff -urN linux/arch/sparc64/lib/atomic.S linux/arch/sparc64/lib/atomic.S
--- linux/arch/sparc64/lib/atomic.S     2004/09/19 12:30:07     1.7
+++ linux/arch/sparc64/lib/atomic.S     2005/02/07 02:54:39     1.8
@@ -7,8 +7,22 @@
 #include <asm/asi.h>
 
        .text
-       .align  64
 
+       /* We use these stubs for the uncommon case
+        * of contention on the atomic value.  This is
+        * so that we can keep the main fast path 8
+        * instructions long and thus fit into a single
+        * L2 cache line.
+        */
+__atomic_add_membar:
+       ba,pt   %xcc, __atomic_add
+        membar #StoreLoad | #StoreStore
+
+__atomic_sub_membar:
+       ba,pt   %xcc, __atomic_sub
+        membar #StoreLoad | #StoreStore
+
+       .align  64
        .globl  __atomic_add
        .type   __atomic_add,#function
 __atomic_add: /* %o0 = increment, %o1 = atomic_ptr */
@@ -16,10 +30,10 @@
        add     %g5, %o0, %g7
        cas     [%o1], %g5, %g7
        cmp     %g5, %g7
-       bne,pn  %icc, __atomic_add
-        membar #StoreLoad | #StoreStore
+       bne,pn  %icc, __atomic_add_membar
+        add    %g7, %o0, %g7
        retl
-        add    %g7, %o0, %o0
+        sra    %g7, 0, %o0
        .size   __atomic_add, .-__atomic_add
 
        .globl  __atomic_sub
@@ -29,10 +43,10 @@
        sub     %g5, %o0, %g7
        cas     [%o1], %g5, %g7
        cmp     %g5, %g7
-       bne,pn  %icc, __atomic_sub
-        membar #StoreLoad | #StoreStore
+       bne,pn  %icc, __atomic_sub_membar
+        sub    %g7, %o0, %g7
        retl
-        sub    %g7, %o0, %o0
+        sra    %g7, 0, %o0
        .size   __atomic_sub, .-__atomic_sub
 
        .globl  __atomic64_add
diff -urN linux/arch/sparc64/lib/memmove.S linux/arch/sparc64/lib/memmove.S
--- linux/arch/sparc64/lib/memmove.S    2004/09/19 12:30:07     1.2
+++ linux/arch/sparc64/lib/memmove.S    2005/02/07 02:54:39     1.3
@@ -8,18 +8,16 @@
        .align          32
        .globl          memmove
        .type           memmove,#function
-memmove:
+memmove:               /* o0=dst o1=src o2=len */
        mov             %o0, %g1
        cmp             %o0, %o1
-       blu,pt          %xcc, memcpy
-        sub            %o0, %o1, %g5
-       add             %o1, %o2, %g3
-       cmp             %g3, %o0
        bleu,pt         %xcc, memcpy
         add            %o1, %o2, %g5
-       add             %o0, %o2, %o5
-
+       cmp             %g5, %o0
+       bleu,pt         %xcc, memcpy
+        add            %o0, %o2, %o5
        sub             %g5, 1, %o1
+
        sub             %o5, 1, %o0
 1:     ldub            [%o1], %g5
        subcc           %o2, 1, %o2
diff -urN linux/arch/sparc64/mm/fault.c linux/arch/sparc64/mm/fault.c
--- linux/arch/sparc64/mm/fault.c       2004/12/04 18:16:01     1.39
+++ linux/arch/sparc64/mm/fault.c       2005/02/07 02:54:39     1.40
@@ -175,6 +175,7 @@
 static unsigned int get_user_insn(unsigned long tpc)
 {
        pgd_t *pgdp = pgd_offset(current->mm, tpc);
+       pud_t *pudp;
        pmd_t *pmdp;
        pte_t *ptep, pte;
        unsigned long pa;
@@ -183,7 +184,10 @@
 
        if (pgd_none(*pgdp))
                goto outret;
-       pmdp = pmd_offset(pgdp, tpc);
+       pudp = pud_offset(pgdp, tpc);
+       if (pud_none(*pudp))
+               goto outret;
+       pmdp = pmd_offset(pudp, tpc);
        if (pmd_none(*pmdp))
                goto outret;
 
diff -urN linux/arch/sparc64/mm/generic.c linux/arch/sparc64/mm/generic.c
--- linux/arch/sparc64/mm/generic.c     2004/12/04 18:16:01     1.20
+++ linux/arch/sparc64/mm/generic.c     2005/02/07 02:54:39     1.21
@@ -96,6 +96,27 @@
        return 0;
 }
 
+static inline int io_remap_pud_range(pud_t * pud, unsigned long address, 
unsigned long size,
+       unsigned long offset, pgprot_t prot, int space)
+{
+       unsigned long end;
+
+       address &= ~PUD_MASK;
+       end = address + size;
+       if (end > PUD_SIZE)
+               end = PUD_SIZE;
+       offset -= address;
+       do {
+               pmd_t *pmd = pmd_alloc(current->mm, pud, address);
+               if (!pud)
+                       return -ENOMEM;
+               io_remap_pmd_range(pmd, address, end - address, address + 
offset, prot, space);
+               address = (address + PUD_SIZE) & PUD_MASK;
+               pud++;
+       } while (address < end);
+       return 0;
+}
+
 int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, 
unsigned long offset, unsigned long size, pgprot_t prot, int space)
 {
        int error = 0;
@@ -111,11 +132,11 @@
 
        spin_lock(&mm->page_table_lock);
        while (from < end) {
-               pmd_t *pmd = pmd_alloc(current->mm, dir, from);
+               pud_t *pud = pud_alloc(current->mm, dir, from);
                error = -ENOMEM;
-               if (!pmd)
+               if (!pud)
                        break;
-               error = io_remap_pmd_range(pmd, from, end - from, offset + 
from, prot, space);
+               error = io_remap_pud_range(pud, from, end - from, offset + 
from, prot, space);
                if (error)
                        break;
                from = (from + PGDIR_SIZE) & PGDIR_MASK;
diff -urN linux/arch/sparc64/mm/hugetlbpage.c 
linux/arch/sparc64/mm/hugetlbpage.c
--- linux/arch/sparc64/mm/hugetlbpage.c 2004/06/06 02:12:41     1.14
+++ linux/arch/sparc64/mm/hugetlbpage.c 2005/02/07 02:54:39     1.15
@@ -24,14 +24,18 @@
 static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
 {
        pgd_t *pgd;
+       pud_t *pud;
        pmd_t *pmd;
        pte_t *pte = NULL;
 
        pgd = pgd_offset(mm, addr);
        if (pgd) {
-               pmd = pmd_alloc(mm, pgd, addr);
-               if (pmd)
-                       pte = pte_alloc_map(mm, pmd, addr);
+               pud = pud_offset(pgd, addr);
+               if (pud) {
+                       pmd = pmd_alloc(mm, pud, addr);
+                       if (pmd)
+                               pte = pte_alloc_map(mm, pmd, addr);
+               }
        }
        return pte;
 }
@@ -39,14 +43,18 @@
 static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
 {
        pgd_t *pgd;
+       pud_t *pud;
        pmd_t *pmd;
        pte_t *pte = NULL;
 
        pgd = pgd_offset(mm, addr);
        if (pgd) {
-               pmd = pmd_offset(pgd, addr);
-               if (pmd)
-                       pte = pte_offset_map(pmd, addr);
+               pud = pud_offset(pgd, addr);
+               if (pud) {
+                       pmd = pmd_offset(pud, addr);
+                       if (pmd)
+                               pte = pte_offset_map(pmd, addr);
+               }
        }
        return pte;
 }
diff -urN linux/arch/sparc64/mm/init.c linux/arch/sparc64/mm/init.c
--- linux/arch/sparc64/mm/init.c        2005/01/25 04:28:06     1.85
+++ linux/arch/sparc64/mm/init.c        2005/02/07 02:54:39     1.86
@@ -1462,7 +1462,8 @@
        memset(swapper_pmd_dir, 0, sizeof(swapper_pmd_dir));
 
        /* Now can init the kernel/bad page tables. */
-       pgd_set(&swapper_pg_dir[0], swapper_pmd_dir + (shift / sizeof(pgd_t)));
+       pud_set(pud_offset(&swapper_pg_dir[0], 0),
+               swapper_pmd_dir + (shift / sizeof(pgd_t)));
        
        sparc64_vpte_patchme1[0] |=
                (((unsigned long)pgd_val(init_mm.pgd[0])) >> 10);
diff -urN linux/arch/sparc64/oprofile/init.c linux/arch/sparc64/oprofile/init.c
--- linux/arch/sparc64/oprofile/init.c  2005/01/13 14:05:39     1.6
+++ linux/arch/sparc64/oprofile/init.c  2005/02/07 02:54:39     1.7
@@ -12,8 +12,9 @@
 #include <linux/errno.h>
 #include <linux/init.h>
  
-void __init oprofile_arch_init(struct oprofile_operations * ops)
+int __init oprofile_arch_init(struct oprofile_operations * ops)
 {
+       return -ENODEV;
 }
 
 
diff -urN linux/arch/um/sys-x86_64/sysrq.c linux/arch/um/sys-x86_64/sysrq.c
--- linux/arch/um/sys-x86_64/sysrq.c    2005/01/13 14:05:42     1.1
+++ linux/arch/um/sys-x86_64/sysrq.c    2005/02/07 02:54:39     1.2
@@ -5,7 +5,7 @@
  */
 
 #include "linux/kernel.h"
-#include "linux/version.h"
+#include "linux/utsname.h"
 #include "linux/module.h"
 #include "asm/current.h"
 #include "asm/ptrace.h"
@@ -16,7 +16,7 @@
        printk("\n");
        print_modules();
        printk("Pid: %d, comm: %.20s %s %s\n",
-              current->pid, current->comm, print_tainted(), UTS_RELEASE);
+              current->pid, current->comm, print_tainted(), 
system_utsname.release);
        printk("RIP: %04lx:[<%016lx>] ", PT_REGS_CS(regs) & 0xffff,
               PT_REGS_RIP(regs));
        printk("\nRSP: %016lx  EFLAGS: %08lx\n", PT_REGS_RSP(regs),
diff -urN linux/arch/v850/lib/memcpy.c linux/arch/v850/lib/memcpy.c
--- linux/arch/v850/lib/memcpy.c        2002/11/05 15:18:21     1.1
+++ linux/arch/v850/lib/memcpy.c        2005/02/07 02:54:39     1.2
@@ -60,11 +60,6 @@
        return dst;
 }
 
-void bcopy (const char *src, char *dst, int size)
-{
-       memcpy (dst, src, size);
-}
-
 void *memmove (void *dst, const void *src, __kernel_size_t size)
 {
        if ((unsigned long)dst < (unsigned long)src
diff -urN linux/arch/x86_64/Kconfig linux/arch/x86_64/Kconfig
--- linux/arch/x86_64/Kconfig   2005/01/13 14:05:42     1.39
+++ linux/arch/x86_64/Kconfig   2005/02/07 02:54:39     1.40
@@ -52,15 +52,6 @@
 config EARLY_PRINTK
        bool
        default y
-       help
-         Write kernel log output directly into the VGA buffer or to a serial
-         port.
-
-         This is useful for kernel debugging when your machine crashes very
-         early before the console code is initialized. For normal operation
-         it is not recommended because it looks ugly and doesn't cooperate
-         with klogd/syslogd or the X server. You should normally N here,
-         unless you want to debug such a crash.
 
 config HPET_TIMER
        bool
diff -urN linux/arch/x86_64/ia32/fpu32.c linux/arch/x86_64/ia32/fpu32.c
--- linux/arch/x86_64/ia32/fpu32.c      2005/01/25 04:28:08     1.9
+++ linux/arch/x86_64/ia32/fpu32.c      2005/02/07 02:54:39     1.10
@@ -157,7 +157,7 @@
                                     sizeof(struct i387_fxsave_struct)))
                        return -1;
                tsk->thread.i387.fxsave.mxcsr &= mxcsr_feature_mask;
-               tsk->used_math = 1;
+               set_stopped_child_used_math(tsk);
        } 
        return convert_fxsr_from_user(&tsk->thread.i387.fxsave, buf);
 }  
diff -urN linux/arch/x86_64/ia32/ia32_binfmt.c 
linux/arch/x86_64/ia32/ia32_binfmt.c
--- linux/arch/x86_64/ia32/ia32_binfmt.c        2005/01/13 14:05:43     1.26
+++ linux/arch/x86_64/ia32/ia32_binfmt.c        2005/02/07 02:54:39     1.27
@@ -214,7 +214,7 @@
        struct _fpstate_ia32 *fpstate = (void*)fpu; 
        mm_segment_t oldfs = get_fs();
 
-       if (!tsk->used_math) 
+       if (!tsk_used_math(tsk))
                return 0;
        if (!regs)
                regs = (struct pt_regs *)tsk->thread.rsp0;
@@ -235,7 +235,7 @@
 elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu)
 {
        struct pt_regs *regs = ((struct pt_regs *)(t->thread.rsp0))-1; 
-       if (!t->used_math) 
+       if (!tsk_used_math(t))
                return 0;
        if (t == current)
                unlazy_fpu(t); 
diff -urN linux/arch/x86_64/ia32/ia32_signal.c 
linux/arch/x86_64/ia32/ia32_signal.c
--- linux/arch/x86_64/ia32/ia32_signal.c        2005/01/13 14:05:43     1.24
+++ linux/arch/x86_64/ia32/ia32_signal.c        2005/02/07 02:54:39     1.25
@@ -35,8 +35,6 @@
 #include <asm/proto.h>
 #include <asm/vsyscall32.h>
 
-#define ptr_to_u32(x) ((u32)(u64)(x))  /* avoid gcc warning */ 
-
 #define DEBUG_SIG 0
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
@@ -62,7 +60,7 @@
        if (from->si_code < 0) {
                err |= __put_user(from->si_pid, &to->si_pid);
                err |= __put_user(from->si_uid, &to->si_uid);
-               err |= __put_user((u32)(u64)from->si_ptr, &to->si_ptr);
+               err |= __put_user(ptr_to_compat(from->si_ptr), &to->si_ptr);
        } else {
                /* First 32bits of unions are always present:
                 * si_pid === si_band === si_tid === si_addr(LS half) */
@@ -83,7 +81,7 @@
                        break;
                case __SI_TIMER >> 16:
                        err |= __put_user(from->si_overrun, &to->si_overrun); 
-                       err |= __put_user((u32)(u64)from->si_ptr, &to->si_ptr);
+                       err |= __put_user(ptr_to_compat(from->si_ptr), 
&to->si_ptr);
                        break;
                case __SI_RT >> 16: /* This is not generated by the kernel as 
of now.  */
                case __SI_MESGQ >> 16:
@@ -160,7 +158,7 @@
        set_fs(seg); 
        if (ret >= 0 && uoss_ptr)  {
                if (!access_ok(VERIFY_WRITE,uoss_ptr,sizeof(stack_ia32_t)) ||
-                   __put_user((u32)(u64)uoss.ss_sp, &uoss_ptr->ss_sp) ||
+                   __put_user(ptr_to_compat(uoss.ss_sp), &uoss_ptr->ss_sp) ||
                    __put_user(uoss.ss_flags, &uoss_ptr->ss_flags) ||
                    __put_user(uoss.ss_size, &uoss_ptr->ss_size))
                        ret = -EFAULT;
@@ -263,9 +261,9 @@
                        err |= restore_i387_ia32(current, buf, 0);
                } else {
                        struct task_struct *me = current;
-                       if (me->used_math) {
+                       if (used_math()) {
                                clear_fpu(me);
-                               me->used_math = 0;
+                               clear_used_math();
                        }
                }
        }
@@ -389,9 +387,9 @@
        if (tmp < 0)
          err = -EFAULT;
        else { 
-               current->used_math = 0;
+               clear_used_math();
                stts();
-         err |= __put_user((u32)(u64)(tmp ? fpstate : NULL), &sc->fpstate);
+         err |= __put_user(ptr_to_compat(tmp ? fpstate : NULL), &sc->fpstate);
        }
 
        /* non-iBCS2 extensions.. */
@@ -467,7 +465,7 @@
                void __user *restorer = VSYSCALL32_SIGRETURN; 
                if (ka->sa.sa_flags & SA_RESTORER)
                        restorer = ka->sa.sa_restorer;       
-               err |= __put_user(ptr_to_u32(restorer), &frame->pretcode);
+               err |= __put_user(ptr_to_compat(restorer), &frame->pretcode);
        }
        /* These are actually not used anymore, but left because some 
           gdb versions depend on them as a marker. */
@@ -540,8 +538,8 @@
                           : sig),
                          &frame->sig);
        }
-       err |= __put_user((u32)(u64)&frame->info, &frame->pinfo);
-       err |= __put_user((u32)(u64)&frame->uc, &frame->puc);
+       err |= __put_user(ptr_to_compat(&frame->info), &frame->pinfo);
+       err |= __put_user(ptr_to_compat(&frame->uc), &frame->puc);
        err |= copy_siginfo_to_user32(&frame->info, info);
        if (err)
                goto give_sigsegv;
@@ -564,7 +562,7 @@
                void __user *restorer = VSYSCALL32_RTSIGRETURN; 
                if (ka->sa.sa_flags & SA_RESTORER)
                        restorer = ka->sa.sa_restorer;       
-               err |= __put_user(ptr_to_u32(restorer), &frame->pretcode);
+               err |= __put_user(ptr_to_compat(restorer), &frame->pretcode);
        }
 
        /* This is movl $,%eax ; int $0x80 */
diff -urN linux/arch/x86_64/ia32/ptrace32.c linux/arch/x86_64/ia32/ptrace32.c
--- linux/arch/x86_64/ia32/ptrace32.c   2004/11/15 11:49:22     1.15
+++ linux/arch/x86_64/ia32/ptrace32.c   2005/02/07 02:54:39     1.16
@@ -358,14 +358,14 @@
                        break;
                /* no checking to be bug-to-bug compatible with i386 */
                __copy_from_user(&child->thread.i387.fxsave, u, sizeof(*u));
-               child->used_math = 1;
+               set_stopped_child_used_math(child);
                child->thread.i387.fxsave.mxcsr &= mxcsr_feature_mask;
                ret = 0; 
                break;
        }
 
        case PTRACE_GETEVENTMSG:
-               ret = put_user(child->ptrace_message,(unsigned int __user 
*)(u64)data);
+               ret = put_user(child->ptrace_message,(unsigned int __user 
*)compat_ptr(data));
                break;
 
        default:
diff -urN linux/arch/x86_64/ia32/sys_ia32.c linux/arch/x86_64/ia32/sys_ia32.c
--- linux/arch/x86_64/ia32/sys_ia32.c   2005/01/13 14:05:43     1.47
+++ linux/arch/x86_64/ia32/sys_ia32.c   2005/02/07 02:54:39     1.48
@@ -73,10 +73,7 @@
 #include <net/sock.h>
 #include <asm/ia32.h>
 
-#define A(__x)         ((unsigned long)(__x))
 #define AA(__x)                ((unsigned long)(__x))
-#define ROUND_UP(x,a)  ((__typeof__(x))(((unsigned long)(x) + ((a) - 1)) & 
~((a) - 1)))
-#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
 
 int cp_compat_stat(struct kstat *kbuf, struct compat_stat __user *ubuf)
 {
@@ -305,8 +302,8 @@
                        set32.sig[0] = old_ka.sa.sa_mask.sig[0];
                }
                if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
-                   __put_user((long)old_ka.sa.sa_handler, &oact->sa_handler) ||
-                   __put_user((long)old_ka.sa.sa_restorer, &oact->sa_restorer) 
||
+                   __put_user(ptr_to_compat(old_ka.sa.sa_handler), 
&oact->sa_handler) ||
+                   __put_user(ptr_to_compat(old_ka.sa.sa_restorer), 
&oact->sa_restorer) ||
                    __put_user(old_ka.sa.sa_flags, &oact->sa_flags) ||
                    __copy_to_user(&oact->sa_mask, &set32, 
sizeof(compat_sigset_t)))
                        return -EFAULT;
@@ -342,8 +339,8 @@
 
        if (!ret && oact) {
                if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
-                   __put_user((long)old_ka.sa.sa_handler, &oact->sa_handler) ||
-                   __put_user((long)old_ka.sa.sa_restorer, &oact->sa_restorer) 
||
+                   __put_user(ptr_to_compat(old_ka.sa.sa_handler), 
&oact->sa_handler) ||
+                   __put_user(ptr_to_compat(old_ka.sa.sa_restorer), 
&oact->sa_restorer) ||
                    __put_user(old_ka.sa.sa_flags, &oact->sa_flags) ||
                    __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask))
                        return -EFAULT;
@@ -653,6 +650,7 @@
 }
 
 
+#ifdef CONFIG_SYSCTL
 struct sysctl_ia32 {
        unsigned int    name;
        int             nlen;
@@ -667,14 +665,11 @@
 asmlinkage long
 sys32_sysctl(struct sysctl_ia32 __user *args32)
 {
-#ifndef CONFIG_SYSCTL
-       return -ENOSYS; 
-#else
        struct sysctl_ia32 a32;
        mm_segment_t old_fs = get_fs ();
-       void *oldvalp, *newvalp;
+       void __user *oldvalp, *newvalp;
        size_t oldlen;
-       int *namep;
+       int __user *namep;
        long ret;
        extern int do_sysctl(int *name, int nlen, void *oldval, size_t *oldlenp,
                     void *newval, size_t newlen);
@@ -690,9 +685,9 @@
         * addresses, we KNOW that access_ok() will always succeed, so this is 
an
         * expensive NOP, but so what...
         */
-       namep = (int *) A(a32.name);
-       oldvalp = (void *) A(a32.oldval);
-       newvalp = (void *) A(a32.newval);
+       namep = compat_ptr(a32.name);
+       oldvalp = compat_ptr(a32.oldval);
+       newvalp =  compat_ptr(a32.newval);
 
        if ((oldvalp && get_user(oldlen, (int __user *)compat_ptr(a32.oldlenp)))
            || !access_ok(VERIFY_WRITE, namep, 0)
@@ -710,8 +705,8 @@
                return -EFAULT;
 
        return ret;
-#endif
 }
+#endif
 
 /* warning: next two assume little endian */ 
 asmlinkage long
@@ -1082,8 +1077,6 @@
        return sys_lookup_dcookie(((u64)addr_high << 32) | addr_low, buf, len);
 }
 
-cond_syscall(sys32_ipc)
-
 static int __init ia32_init (void)
 {
        printk("IA32 emulation $Id: sys_ia32.c,v 1.32 2002/03/24 13:02:28 ak 
Exp $\n");  
diff -urN linux/arch/x86_64/kernel/asm-offsets.c 
linux/arch/x86_64/kernel/asm-offsets.c
--- linux/arch/x86_64/kernel/asm-offsets.c      2004/09/19 12:30:08     1.5
+++ linux/arch/x86_64/kernel/asm-offsets.c      2005/02/07 02:54:39     1.6
@@ -8,6 +8,7 @@
 #include <linux/stddef.h>
 #include <linux/errno.h> 
 #include <linux/hardirq.h>
+#include <linux/suspend.h>
 #include <asm/pda.h>
 #include <asm/processor.h>
 #include <asm/segment.h>
@@ -61,6 +62,8 @@
               offsetof (struct rt_sigframe32, uc.uc_mcontext));
        BLANK();
 #endif
-
+       DEFINE(SIZEOF_PBE, sizeof(struct pbe));
+       DEFINE(pbe_address, offsetof(struct pbe, address));
+       DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
        return 0;
 }
diff -urN linux/arch/x86_64/kernel/early_printk.c 
linux/arch/x86_64/kernel/early_printk.c
--- linux/arch/x86_64/kernel/early_printk.c     2005/01/13 14:05:43     1.12
+++ linux/arch/x86_64/kernel/early_printk.c     2005/02/07 02:54:39     1.13
@@ -198,9 +198,6 @@
                early_console = &early_serial_console;          
        } else if (!strncmp(buf, "vga", 3)) {
                early_console = &early_vga_console; 
-       } else {
-               early_console = NULL;           
-               return -1; 
        }
        early_console_initialized = 1;
        register_console(early_console);       
diff -urN linux/arch/x86_64/kernel/entry.S linux/arch/x86_64/kernel/entry.S
--- linux/arch/x86_64/kernel/entry.S    2005/01/13 14:05:43     1.22
+++ linux/arch/x86_64/kernel/entry.S    2005/02/07 02:54:39     1.23
@@ -41,7 +41,6 @@
 #include <asm/unistd.h>
 #include <asm/thread_info.h>
 #include <asm/hw_irq.h>
-#include <asm/errno.h>
 
        .code64
 
diff -urN linux/arch/x86_64/kernel/i387.c linux/arch/x86_64/kernel/i387.c
--- linux/arch/x86_64/kernel/i387.c     2004/06/09 14:12:06     1.10
+++ linux/arch/x86_64/kernel/i387.c     2005/02/07 02:54:39     1.11
@@ -57,12 +57,12 @@
        mxcsr_feature_mask_init();
        /* clean state in init */
        current_thread_info()->status = 0;
-       current->used_math = 0;
+       clear_used_math();
 }
 
 void init_fpu(struct task_struct *child)
 {
-       if (child->used_math) { 
+       if (tsk_used_math(child)) {
                if (child == current)
                        unlazy_fpu(child);
                return;
@@ -70,7 +70,8 @@
        memset(&child->thread.i387.fxsave, 0, sizeof(struct 
i387_fxsave_struct));
        child->thread.i387.fxsave.cwd = 0x37f;
        child->thread.i387.fxsave.mxcsr = 0x1f80;
-       child->used_math = 1;
+       /* only the device not available exception or ptrace can call init_fpu 
*/
+       set_stopped_child_used_math(child);
 }
 
 /*
@@ -91,9 +92,9 @@
        if ((unsigned long)buf % 16) 
                printk("save_i387: bad fpstate %p\n",buf); 
 
-       if (!tsk->used_math) 
+       if (!used_math())
                return 0;
-       tsk->used_math = 0; /* trigger finit */ 
+       clear_used_math(); /* trigger finit */
        if (tsk->thread_info->status & TS_USEDFPU) {
                err = save_i387_checking((struct i387_fxsave_struct __user 
*)buf);
                if (err) return err;
@@ -133,7 +134,7 @@
 {
        struct task_struct *tsk = current;
 
-       if (!tsk->used_math) 
+       if (!used_math())
                return 0;
 
        unlazy_fpu(tsk);
@@ -143,7 +144,7 @@
 
 int dump_task_fpu(struct task_struct *tsk, struct user_i387_struct *fpu)
 {
-       int fpvalid = tsk->used_math;
+       int fpvalid = !!tsk_used_math(tsk);
 
        if (fpvalid) {
                if (tsk == current)
diff -urN linux/arch/x86_64/kernel/module.c linux/arch/x86_64/kernel/module.c
--- linux/arch/x86_64/kernel/module.c   2004/06/28 21:04:13     1.10
+++ linux/arch/x86_64/kernel/module.c   2005/02/07 02:54:39     1.11
@@ -23,7 +23,6 @@
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
-#include <linux/vmalloc.h>
 
 #include <asm/system.h>
 #include <asm/page.h>
diff -urN linux/arch/x86_64/kernel/process.c linux/arch/x86_64/kernel/process.c
--- linux/arch/x86_64/kernel/process.c  2005/01/13 14:05:43     1.35
+++ linux/arch/x86_64/kernel/process.c  2005/02/07 02:54:39     1.36
@@ -32,7 +32,7 @@
 #include <linux/delay.h>
 #include <linux/irq.h>
 #include <linux/ptrace.h>
-#include <linux/version.h>
+#include <linux/utsname.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -232,7 +232,7 @@
        printk("\n");
        print_modules();
        printk("Pid: %d, comm: %.20s %s %s\n", 
-              current->pid, current->comm, print_tainted(), UTS_RELEASE);
+              current->pid, current->comm, print_tainted(), 
system_utsname.release);
        printk("RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->rip);
        printk_address(regs->rip); 
        printk("\nRSP: %04lx:%016lx  EFLAGS: %08lx\n", regs->ss, regs->rsp, 
regs->eflags);
@@ -314,7 +314,7 @@
         * Forget coprocessor state..
         */
        clear_fpu(tsk);
-       tsk->used_math = 0;
+       clear_used_math();
 }
 
 void release_thread(struct task_struct *dead_task)
diff -urN linux/arch/x86_64/kernel/ptrace.c linux/arch/x86_64/kernel/ptrace.c
--- linux/arch/x86_64/kernel/ptrace.c   2004/11/15 11:49:22     1.19
+++ linux/arch/x86_64/kernel/ptrace.c   2005/02/07 02:54:39     1.20
@@ -480,7 +480,7 @@
                        ret = -EIO;
                        break;
                }
-               child->used_math = 1;
+               set_stopped_child_used_math(child);
                ret = set_fpregs(child, (struct user_i387_struct __user *)data);
                break;
        }
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/25 04:28:08     1.38
+++ linux/arch/x86_64/kernel/setup.c    2005/02/07 02:54:39     1.39
@@ -53,7 +53,6 @@
 #include <asm/mpspec.h>
 #include <asm/mmu_context.h>
 #include <asm/bootsetup.h>
-#include <asm/smp.h>
 #include <asm/proto.h>
 #include <asm/setup.h>
 #include <asm/mach_apic.h>
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/25 04:28:08     1.25
+++ linux/arch/x86_64/kernel/signal.c   2005/02/07 02:54:39     1.26
@@ -126,9 +126,9 @@
                        err |= restore_i387(buf);
                } else {
                        struct task_struct *me = current;
-                       if (me->used_math) {
+                       if (used_math()) {
                                clear_fpu(me);
-                               me->used_math = 0;
+                               clear_used_math();
                        }
                }
        }
@@ -251,7 +251,7 @@
        int err = 0;
        struct task_struct *me = current;
 
-       if (me->used_math) {
+       if (used_math()) {
                fp = get_stack(ka, regs, sizeof(struct _fpstate)); 
                frame = (void __user *)round_down((unsigned long)fp - 
sizeof(struct rt_sigframe), 16) - 8;
 
diff -urN linux/arch/x86_64/kernel/suspend_asm.S 
linux/arch/x86_64/kernel/suspend_asm.S
--- linux/arch/x86_64/kernel/suspend_asm.S      2004/10/20 00:30:02     1.4
+++ linux/arch/x86_64/kernel/suspend_asm.S      2005/02/07 02:54:39     1.5
@@ -1,6 +1,9 @@
-/* Originally gcc generated, modified by hand
+/* Copyright 2004,2005 Pavel Machek <pavel@suse.cz>, Andi Kleen <ak@suse.de>, 
Rafael J. Wysocki <rjw@sisk.pl>
  *
- * This may not use any stack, nor any variable that is not "NoSave":
+ * Distribute under GPLv2.
+ *
+ * swsusp_arch_resume may not use any stack, nor any variable that is
+ * not "NoSave" during copying pages:
  *
  * Its rewriting one kernel image with another. What is stack in "old"
  * image could very well be data page in "new" image, and overwriting
@@ -11,6 +14,7 @@
 #include <linux/linkage.h>
 #include <asm/segment.h>
 #include <asm/page.h>
+#include <asm/offset.h>
 
 ENTRY(swsusp_arch_suspend)
 
@@ -49,43 +53,28 @@
        movq    %rcx, %cr3;
        movq    %rax, %cr4;  # turn PGE back on
 
+       movq    pagedir_nosave(%rip), %rdx
+       /* compute the limit */
        movl    nr_copy_pages(%rip), %eax
-       xorl    %ecx, %ecx
-       movq    $0, %r10
        testl   %eax, %eax
        jz      done
-.L105:
-       xorl    %esi, %esi
-       movq    $0, %r11
-       jmp     .L104
-       .p2align 4,,7
-copy_one_page:
-       movq    %r10, %rcx
-.L104:
-       movq    pagedir_nosave(%rip), %rdx
-       movq    %rcx, %rax
-       salq    $5, %rax
-       movq    8(%rdx,%rax), %rcx
-       movq    (%rdx,%rax), %rax
-       movzbl  (%rsi,%rax), %eax
-       movb    %al, (%rsi,%rcx)
-
-       movq    %cr3, %rax;  # flush TLB
-       movq    %rax, %cr3;
-
-       movq    %r11, %rax
-       incq    %rax
-       cmpq    $4095, %rax
-       movq    %rax, %rsi
-       movq    %rax, %r11
-       jbe     copy_one_page
-       movq    %r10, %rax
-       incq    %rax
-       movq    %rax, %rcx
-       movq    %rax, %r10
-       mov     nr_copy_pages(%rip), %eax
-       cmpq    %rax, %rcx
-       jb      .L105
+       movq    %rdx,%r8
+       movl    $SIZEOF_PBE,%r9d
+       mul             %r9  # with rax, clobbers rdx
+       movq    %r8, %rdx
+       addq    %r8, %rax
+loop:
+       /* get addresses from the pbe and copy the page */
+       movq    pbe_address(%rdx), %rsi
+       movq    pbe_orig_address(%rdx), %rdi
+       movq    $512, %rcx
+       rep
+       movsq
+
+       /* progress to the next pbe */
+       addq    $SIZEOF_PBE, %rdx
+       cmpq    %rax, %rdx
+       jb      loop
 done:
        movl    $24, %eax
        movl    %eax, %ds
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/25 04:28:08     1.32
+++ linux/arch/x86_64/kernel/time.c     2005/02/07 02:54:39     1.33
@@ -1029,7 +1029,6 @@
  * For (3), we use interrupts at 64Hz or user specified periodic
  * frequency, whichever is higher.
  */
-#include <linux/mc146818rtc.h>
 #include <linux/rtc.h>
 
 extern irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
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/25 04:28:08     1.40
+++ linux/arch/x86_64/kernel/traps.c    2005/02/07 02:54:39     1.41
@@ -405,15 +405,6 @@
        do_exit(SIGSEGV);
 }
 
-static inline unsigned long get_cr2(void)
-{
-       unsigned long address;
-
-       /* get the address */
-       __asm__("movq %%cr2,%0":"=r" (address));
-       return address;
-}
-
 static void do_trap(int trapnr, int signr, char *str, 
                           struct pt_regs * regs, long error_code, siginfo_t 
*info)
 {
@@ -901,7 +892,7 @@
        struct task_struct *me = current;
        clts();                 /* Allow maths ops (or we recurse) */
 
-       if (!me->used_math)
+       if (!used_math())
                init_fpu(me);
        restore_fpu_checking(&me->thread.i387.fxsave);
        me->thread_info->status |= TS_USEDFPU;
@@ -917,7 +908,7 @@
        set_intr_gate(0,&divide_error);
        set_intr_gate_ist(1,&debug,DEBUG_STACK);
        set_intr_gate_ist(2,&nmi,NMI_STACK);
-       set_intr_gate(3,&int3);
+       set_system_gate(3,&int3);
        set_system_gate(4,&overflow);   /* int4-5 can be called from all */
        set_system_gate(5,&bounds);
        set_intr_gate(6,&invalid_op);
diff -urN linux/arch/x86_64/kernel/x8664_ksyms.c 
linux/arch/x86_64/kernel/x8664_ksyms.c
--- linux/arch/x86_64/kernel/x8664_ksyms.c      2004/11/15 11:49:22     1.27
+++ linux/arch/x86_64/kernel/x8664_ksyms.c      2005/02/07 02:54:39     1.28
@@ -30,7 +30,6 @@
 #include <asm/nmi.h>
 #include <asm/kdebug.h>
 #include <asm/unistd.h>
-#include <asm/delay.h>
 #include <asm/tlbflush.h>
 #include <asm/kdebug.h>
 
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/25 04:28:09     1.17
+++ linux/arch/x86_64/mm/ioremap.c      2005/02/07 02:54:39     1.18
@@ -265,8 +265,9 @@
        unmap_vm_area(p);
        if ((p->flags >> 20) &&
                p->phys_addr + p->size - 1 < virt_to_phys(high_memory)) {
+               /* p->size includes the guard page, but cpa doesn't like that */
                change_page_attr(virt_to_page(__va(p->phys_addr)),
-                                p->size >> PAGE_SHIFT,
+                                (p->size - PAGE_SIZE) >> PAGE_SHIFT,
                                 PAGE_KERNEL);                           
                global_flush_tlb();
        } 
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/25 04:28:09     1.13
+++ linux/arch/x86_64/mm/k8topology.c   2005/02/07 02:54:39     1.14
@@ -59,7 +59,7 @@
        printk(KERN_INFO "Scanning NUMA topology in Northbridge %d\n", nb); 
 
        reg = read_pci_config(0, nb, 0, 0x60); 
-       numnodes = ((reg >> 4) & 7) + 1;
+       numnodes = ((reg >> 4) & 0xF) + 1;
 
        printk(KERN_INFO "Number of nodes %d\n", numnodes);
 
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/25 04:28:09     1.16
+++ linux/arch/x86_64/mm/numa.c 2005/02/07 02:54:39     1.17
@@ -28,7 +28,6 @@
 int memnode_shift;
 u8  memnodemap[NODEMAPSIZE];
 
-#define NUMA_NO_NODE 0xff
 unsigned char cpu_to_node[NR_CPUS] = { [0 ... NR_CPUS-1] = NUMA_NO_NODE };
 cpumask_t     node_to_cpumask[MAX_NUMNODES];
 
diff -urN linux/arch/x86_64/mm/pageattr.c linux/arch/x86_64/mm/pageattr.c
--- linux/arch/x86_64/mm/pageattr.c     2005/01/13 14:05:44     1.11
+++ linux/arch/x86_64/mm/pageattr.c     2005/02/07 02:54:39     1.12
@@ -65,7 +65,10 @@
                        asm volatile("clflush (%0)" :: "r" (address + i)); 
        } else
                asm volatile("wbinvd":::"memory"); 
-       __flush_tlb_one(address);
+       if (address)
+               __flush_tlb_one(address);
+       else
+               __flush_tlb_all();
 }
 
 
@@ -217,6 +220,8 @@
        down_read(&init_mm.mmap_sem);
        df = xchg(&df_list, NULL);
        up_read(&init_mm.mmap_sem);
+       if (!df)
+               return;
        flush_map((df && !df->next) ? df->address : 0);
        for (; df; df = next_df) { 
                next_df = df->next;
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/25 04:28:09     1.2
+++ linux/arch/x86_64/mm/srat.c 2005/02/07 02:54:39     1.3
@@ -177,10 +177,18 @@
                if (!node_isset(i, nodes_parsed))
                        continue;
                cutoff_node(i, start, end);
-               if (nodes[i].start == nodes[i].end)
+               if (nodes[i].start == nodes[i].end) { 
+                       node_clear(i, nodes_parsed);
                        continue;
+               }
                setup_node_bootmem(i, nodes[i].start, nodes[i].end);
        }
+       for (i = 0; i < NR_CPUS; i++) { 
+               if (cpu_to_node[i] == NUMA_NO_NODE)
+                       continue;
+               if (!node_isset(cpu_to_node[i], nodes_parsed))
+                       cpu_to_node[i] = NUMA_NO_NODE; 
+       }
        numa_init_array();
        return 0;
 }
diff -urN linux/crypto/tcrypt.h linux/crypto/tcrypt.h
--- linux/crypto/tcrypt.h       2005/01/13 14:05:44     1.18
+++ linux/crypto/tcrypt.h       2005/02/07 02:54:40     1.19
@@ -1986,7 +1986,7 @@
 #define TEA_ENC_TEST_VECTORS   4
 #define TEA_DEC_TEST_VECTORS   4
 
-static struct cipher_testvec xtea_enc_tv_template[] =
+static struct cipher_testvec tea_enc_tv_template[] =
 {
        {
                .key    = { [0 ... 15] = 0x00 },
@@ -2080,7 +2080,7 @@
 #define XTEA_ENC_TEST_VECTORS  4
 #define XTEA_DEC_TEST_VECTORS  4
 
-static struct cipher_testvec tea_enc_tv_template[] =
+static struct cipher_testvec xtea_enc_tv_template[] =
 {
        {
                .key    = { [0 ... 15] = 0x00 },
diff -urN linux/drivers/acpi/debug.c linux/drivers/acpi/debug.c
--- linux/drivers/acpi/debug.c  2005/01/25 04:28:09     1.5
+++ linux/drivers/acpi/debug.c  2005/02/07 02:54:40     1.6
@@ -5,6 +5,7 @@
 #include <linux/proc_fs.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/kernel.h>
 #include <linux/moduleparam.h>
 #include <asm/uaccess.h>
 #include <acpi/acpi_drivers.h>
@@ -89,7 +90,6 @@
        ACPI_DEBUG_INIT(ACPI_LV_FULL_TABLES),
        ACPI_DEBUG_INIT(ACPI_LV_EVENTS),             
 };
-#define NUM_OF(v)      ( sizeof(v)/sizeof(v[0]) )
 
 static int
 acpi_system_read_debug (
@@ -102,7 +102,7 @@
 {
        char                    *p = page;
        int                     size = 0;
-       int                     i;
+       unsigned int            i;
 
        if (off != 0)
                goto end;
@@ -111,7 +111,7 @@
 
        switch ((unsigned long) data) {
        case 0:
-               for (i = 0; i < NUM_OF(acpi_debug_layers); i++) {
+               for (i = 0; i < ARRAY_SIZE(acpi_debug_layers); i++) {
                        p += sprintf(p, "%-25s\t0x%08lX [%c]\n",
                                acpi_debug_layers[i].name,
                                acpi_debug_layers[i].value,
@@ -128,7 +128,7 @@
                        acpi_dbg_layer);
                break;
        case 1:
-               for (i = 0; i < NUM_OF(acpi_debug_levels); i++) {
+               for (i = 0; i < ARRAY_SIZE(acpi_debug_levels); i++) {
                        p += sprintf(p, "%-25s\t0x%08lX [%c]\n",
                                acpi_debug_levels[i].name,
                                acpi_debug_levels[i].value,
diff -urN linux/drivers/acpi/pci_bind.c linux/drivers/acpi/pci_bind.c
--- linux/drivers/acpi/pci_bind.c       2005/01/13 14:05:44     1.8
+++ linux/drivers/acpi/pci_bind.c       2005/02/07 02:54:40     1.9
@@ -276,17 +276,25 @@
        int                     result = 0;
        acpi_status             status = AE_OK;
        struct acpi_pci_data    *data = NULL;
-       char                    pathname[ACPI_PATHNAME_MAX] = {0};
-       struct acpi_buffer      buffer = {ACPI_PATHNAME_MAX, pathname};
+       char                    *pathname = NULL;
+       struct acpi_buffer      buffer = {0, NULL};
 
        ACPI_FUNCTION_TRACE("acpi_pci_unbind");
 
        if (!device || !device->parent)
                return_VALUE(-EINVAL);
 
+       pathname = (char *) kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
+       if(!pathname)
+               return_VALUE(-ENOMEM);
+       memset(pathname, 0, ACPI_PATHNAME_MAX);
+
+       buffer.length = ACPI_PATHNAME_MAX;
+       buffer.pointer = pathname;
        acpi_get_name(device->handle, ACPI_FULL_PATHNAME, &buffer);
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unbinding PCI device [%s]...\n",
                pathname));
+       kfree(pathname);
 
        status = acpi_get_data(device->handle, acpi_pci_data_handler, 
(void**)&data);
        if (ACPI_FAILURE(status)) {
diff -urN linux/drivers/acpi/processor_idle.c 
linux/drivers/acpi/processor_idle.c
--- linux/drivers/acpi/processor_idle.c 2005/01/13 14:05:44     1.1
+++ linux/drivers/acpi/processor_idle.c 2005/02/07 02:54:40     1.2
@@ -60,6 +60,15 @@
 static unsigned int nocst = 0;
 module_param(nocst, uint, 0000);
 
+/*
+ * bm_history -- bit-mask with a bit per jiffy of bus-master activity
+ * 1000 HZ: 0xFFFFFFFF: 32 jiffies = 32ms
+ * 800 HZ: 0xFFFFFFFF: 32 jiffies = 40ms
+ * 100 HZ: 0x0000000F: 4 jiffies = 40ms
+ * reduce history for more aggressive entry into C3
+ */
+static unsigned int bm_history = (HZ >= 800 ? 0xFFFFFFFF : ((1U << (HZ / 25)) 
- 1));
+module_param(bm_history, uint, 0644);
 /* --------------------------------------------------------------------------
                                 Power Management
    -------------------------------------------------------------------------- 
*/
@@ -193,8 +202,18 @@
         */
        if (pr->flags.bm_check) {
                u32             bm_status = 0;
+               unsigned long   diff = jiffies - pr->power.bm_check_timestamp;
+
+               if (diff > 32)
+                       diff = 32;
 
-               pr->power.bm_activity <<= 1;
+               while (diff) {
+                       /* if we didn't get called, assume there was busmaster 
activity */
+                       diff--;
+                       if (diff)
+                               pr->power.bm_activity |= 0x1;
+                       pr->power.bm_activity <<= 1;
+               }
 
                acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS,
                        &bm_status, ACPI_MTX_DO_NOT_LOCK);
@@ -213,6 +232,9 @@
                                || (inb_p(errata.piix4.bmisx + 0x0A) & 0x01))
                                pr->power.bm_activity++;
                }
+
+               pr->power.bm_check_timestamp = jiffies;
+
                /*
                 * Apply bus mastering demotion policy.  Automatically demote
                 * to avoid a faulty transition.  Note that the processor
@@ -425,7 +447,7 @@
                        cx->demotion.threshold.ticks = cx->latency_ticks;
                        cx->demotion.threshold.count = 1;
                        if (cx->type == ACPI_STATE_C3)
-                               cx->demotion.threshold.bm = 0x0F;
+                               cx->demotion.threshold.bm = bm_history;
                }
 
                lower = cx;
@@ -445,7 +467,7 @@
                        else
                                cx->promotion.threshold.count = 10;
                        if (higher->type == ACPI_STATE_C3)
-                               cx->promotion.threshold.bm = 0x0F;
+                               cx->promotion.threshold.bm = bm_history;
                }
 
                higher = cx;
diff -urN linux/drivers/acpi/utils.c linux/drivers/acpi/utils.c
--- linux/drivers/acpi/utils.c  2004/12/04 18:16:01     1.9
+++ linux/drivers/acpi/utils.c  2005/02/07 02:54:40     1.10
@@ -244,26 +244,34 @@
        unsigned long           *data)
 {
        acpi_status             status = AE_OK;
-       union acpi_object       element;
-       struct acpi_buffer      buffer = {sizeof(union acpi_object), &element};
+       union acpi_object       *element;
+       struct acpi_buffer      buffer = {0,NULL};
 
        ACPI_FUNCTION_TRACE("acpi_evaluate_integer");
 
        if (!data)
                return_ACPI_STATUS(AE_BAD_PARAMETER);
 
+       element = kmalloc(sizeof(union acpi_object), GFP_KERNEL);
+       if(!element)
+               return_ACPI_STATUS(AE_NO_MEMORY);
+
+       memset(element, 0, sizeof(union acpi_object));
+       buffer.length = sizeof(union acpi_object);
+       buffer.pointer = element;
        status = acpi_evaluate_object(handle, pathname, arguments, &buffer);
        if (ACPI_FAILURE(status)) {
                acpi_util_eval_error(handle, pathname, status);
                return_ACPI_STATUS(status);
        }
 
-       if (element.type != ACPI_TYPE_INTEGER) {
+       if (element->type != ACPI_TYPE_INTEGER) {
                acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
                return_ACPI_STATUS(AE_BAD_DATA);
        }
 
-       *data = element.integer.value;
+       *data = element->integer.value;
+       kfree(element);
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%lu]\n", *data));
 
diff -urN linux/drivers/acpi/dispatcher/dsfield.c 
linux/drivers/acpi/dispatcher/dsfield.c
--- linux/drivers/acpi/dispatcher/dsfield.c     2004/02/05 02:39:58     1.20
+++ linux/drivers/acpi/dispatcher/dsfield.c     2005/02/07 02:54:40     1.21
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/dispatcher/dsinit.c 
linux/drivers/acpi/dispatcher/dsinit.c
--- linux/drivers/acpi/dispatcher/dsinit.c      2004/02/05 02:39:58     1.10
+++ linux/drivers/acpi/dispatcher/dsinit.c      2005/02/07 02:54:40     1.11
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/dispatcher/dsmethod.c 
linux/drivers/acpi/dispatcher/dsmethod.c
--- linux/drivers/acpi/dispatcher/dsmethod.c    2004/10/12 14:36:34     1.22
+++ linux/drivers/acpi/dispatcher/dsmethod.c    2005/02/07 02:54:40     1.23
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/dispatcher/dsmthdat.c 
linux/drivers/acpi/dispatcher/dsmthdat.c
--- linux/drivers/acpi/dispatcher/dsmthdat.c    2004/12/04 18:16:01     1.26
+++ linux/drivers/acpi/dispatcher/dsmthdat.c    2005/02/07 02:54:40     1.27
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/dispatcher/dsobject.c 
linux/drivers/acpi/dispatcher/dsobject.c
--- linux/drivers/acpi/dispatcher/dsobject.c    2004/03/11 16:46:47     1.29
+++ linux/drivers/acpi/dispatcher/dsobject.c    2005/02/07 02:54:40     1.30
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -516,7 +516,7 @@
 
                        case AML_REVISION_OP:
 
-                               obj_desc->integer.value = ACPI_CA_SUPPORT_LEVEL;
+                               obj_desc->integer.value = ACPI_CA_VERSION;
                                break;
 
                        default:
diff -urN linux/drivers/acpi/dispatcher/dsopcode.c 
linux/drivers/acpi/dispatcher/dsopcode.c
--- linux/drivers/acpi/dispatcher/dsopcode.c    2005/01/13 14:05:45     1.27
+++ linux/drivers/acpi/dispatcher/dsopcode.c    2005/02/07 02:54:40     1.28
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/dispatcher/dsutils.c 
linux/drivers/acpi/dispatcher/dsutils.c
--- linux/drivers/acpi/dispatcher/dsutils.c     2004/11/15 11:49:23     1.25
+++ linux/drivers/acpi/dispatcher/dsutils.c     2005/02/07 02:54:40     1.26
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -88,11 +88,13 @@
        }
 
        /*
-        * If there is no parent, we are executing at the method level.
-        * An executing method typically has no parent, since each method
-        * is parsed separately.
+        * If there is no parent, or the parent is a scope_op, we are executing
+        * at the method level. An executing method typically has no parent,
+        * since each method is parsed separately.  A method invoked externally
+        * via execute_control_method has a scope_op as the parent.
         */
-       if (!op->common.parent) {
+       if ((!op->common.parent) ||
+               (op->common.parent->common.aml_opcode == AML_SCOPE_OP)) {
                /*
                 * If this is the last statement in the method, we know it is 
not a
                 * Return() operator (would not come here.) The following code 
is the
diff -urN linux/drivers/acpi/dispatcher/dswexec.c 
linux/drivers/acpi/dispatcher/dswexec.c
--- linux/drivers/acpi/dispatcher/dswexec.c     2005/01/13 14:05:45     1.23
+++ linux/drivers/acpi/dispatcher/dswexec.c     2005/02/07 02:54:40     1.24
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/dispatcher/dswload.c 
linux/drivers/acpi/dispatcher/dswload.c
--- linux/drivers/acpi/dispatcher/dswload.c     2004/11/15 11:49:23     1.27
+++ linux/drivers/acpi/dispatcher/dswload.c     2005/02/07 02:54:40     1.28
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/dispatcher/dswscope.c 
linux/drivers/acpi/dispatcher/dswscope.c
--- linux/drivers/acpi/dispatcher/dswscope.c    2004/02/05 02:39:58     1.16
+++ linux/drivers/acpi/dispatcher/dswscope.c    2005/02/07 02:54:40     1.17
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/dispatcher/dswstate.c 
linux/drivers/acpi/dispatcher/dswstate.c
--- linux/drivers/acpi/dispatcher/dswstate.c    2004/12/04 18:16:01     1.26
+++ linux/drivers/acpi/dispatcher/dswstate.c    2005/02/07 02:54:40     1.27
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -1071,6 +1071,7 @@
 }
 
 
+#ifdef ACPI_ENABLE_OBJECT_CACHE
 /******************************************************************************
  *
  * FUNCTION:    acpi_ds_delete_walk_state_cache
@@ -1094,5 +1095,6 @@
        acpi_ut_delete_generic_cache (ACPI_MEM_LIST_WALK);
        return_VOID;
 }
+#endif
 
 
diff -urN linux/drivers/acpi/events/evevent.c 
linux/drivers/acpi/events/evevent.c
--- linux/drivers/acpi/events/evevent.c 2004/08/24 15:10:08     1.26
+++ linux/drivers/acpi/events/evevent.c 2005/02/07 02:54:40     1.27
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/events/evgpe.c linux/drivers/acpi/events/evgpe.c
--- linux/drivers/acpi/events/evgpe.c   2005/01/13 14:05:45     1.18
+++ linux/drivers/acpi/events/evgpe.c   2005/02/07 02:54:40     1.19
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/events/evgpeblk.c 
linux/drivers/acpi/events/evgpeblk.c
--- linux/drivers/acpi/events/evgpeblk.c        2005/01/25 04:28:09     1.10
+++ linux/drivers/acpi/events/evgpeblk.c        2005/02/07 02:54:40     1.11
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/events/evmisc.c linux/drivers/acpi/events/evmisc.c
--- linux/drivers/acpi/events/evmisc.c  2004/10/12 14:36:34     1.27
+++ linux/drivers/acpi/events/evmisc.c  2005/02/07 02:54:40     1.28
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/events/evregion.c 
linux/drivers/acpi/events/evregion.c
--- linux/drivers/acpi/events/evregion.c        2004/10/12 14:36:34     1.23
+++ linux/drivers/acpi/events/evregion.c        2005/02/07 02:54:40     1.24
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/events/evrgnini.c 
linux/drivers/acpi/events/evrgnini.c
--- linux/drivers/acpi/events/evrgnini.c        2004/10/12 14:36:34     1.20
+++ linux/drivers/acpi/events/evrgnini.c        2005/02/07 02:54:40     1.21
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/events/evsci.c linux/drivers/acpi/events/evsci.c
--- linux/drivers/acpi/events/evsci.c   2004/02/05 02:39:58     1.16
+++ linux/drivers/acpi/events/evsci.c   2005/02/07 02:54:40     1.17
@@ -6,7 +6,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/events/evxface.c 
linux/drivers/acpi/events/evxface.c
--- linux/drivers/acpi/events/evxface.c 2004/12/04 18:16:01     1.27
+++ linux/drivers/acpi/events/evxface.c 2005/02/07 02:54:40     1.28
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/events/evxfevnt.c 
linux/drivers/acpi/events/evxfevnt.c
--- linux/drivers/acpi/events/evxfevnt.c        2005/01/13 14:05:45     1.23
+++ linux/drivers/acpi/events/evxfevnt.c        2005/02/07 02:54:40     1.24
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/events/evxfregn.c 
linux/drivers/acpi/events/evxfregn.c
--- linux/drivers/acpi/events/evxfregn.c        2004/12/04 18:16:02     1.20
+++ linux/drivers/acpi/events/evxfregn.c        2005/02/07 02:54:40     1.21
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exconfig.c 
linux/drivers/acpi/executer/exconfig.c
--- linux/drivers/acpi/executer/exconfig.c      2005/01/13 14:05:45     1.18
+++ linux/drivers/acpi/executer/exconfig.c      2005/02/07 02:54:40     1.19
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exconvrt.c 
linux/drivers/acpi/executer/exconvrt.c
--- linux/drivers/acpi/executer/exconvrt.c      2005/01/13 14:05:45     1.21
+++ linux/drivers/acpi/executer/exconvrt.c      2005/02/07 02:54:40     1.22
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -136,6 +136,12 @@
 
        case ACPI_TYPE_BUFFER:
 
+               /* Check for zero-length buffer */
+
+               if (!count) {
+                       return_ACPI_STATUS (AE_AML_BUFFER_LIMIT);
+               }
+
                /* Transfer no more than an integer's worth of data */
 
                if (count > acpi_gbl_integer_byte_width) {
@@ -239,8 +245,13 @@
                /*
                 * Create a new Buffer object
                 * Size will be the string length
+                *
+                * NOTE: Add one to the string length to include the null 
terminator.
+                * The ACPI spec is unclear on this subject, but there is 
existing
+                * ASL/AML code that depends on the null being transferred to 
the new
+                * buffer.
                 */
-               return_desc = acpi_ut_create_buffer_object ((acpi_size) 
obj_desc->string.length);
+               return_desc = acpi_ut_create_buffer_object ((acpi_size) 
obj_desc->string.length + 1);
                if (!return_desc) {
                        return_ACPI_STATUS (AE_NO_MEMORY);
                }
diff -urN linux/drivers/acpi/executer/excreate.c 
linux/drivers/acpi/executer/excreate.c
--- linux/drivers/acpi/executer/excreate.c      2004/04/12 20:23:28     1.17
+++ linux/drivers/acpi/executer/excreate.c      2005/02/07 02:54:40     1.18
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exdump.c 
linux/drivers/acpi/executer/exdump.c
--- linux/drivers/acpi/executer/exdump.c        2005/01/13 14:05:45     1.24
+++ linux/drivers/acpi/executer/exdump.c        2005/02/07 02:54:40     1.25
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exfield.c 
linux/drivers/acpi/executer/exfield.c
--- linux/drivers/acpi/executer/exfield.c       2004/02/05 02:39:58     1.16
+++ linux/drivers/acpi/executer/exfield.c       2005/02/07 02:54:40     1.17
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exfldio.c 
linux/drivers/acpi/executer/exfldio.c
--- linux/drivers/acpi/executer/exfldio.c       2005/01/13 14:05:45     1.24
+++ linux/drivers/acpi/executer/exfldio.c       2005/02/07 02:54:40     1.25
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exmisc.c 
linux/drivers/acpi/executer/exmisc.c
--- linux/drivers/acpi/executer/exmisc.c        2005/01/13 14:05:45     1.22
+++ linux/drivers/acpi/executer/exmisc.c        2005/02/07 02:54:40     1.23
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exmutex.c 
linux/drivers/acpi/executer/exmutex.c
--- linux/drivers/acpi/executer/exmutex.c       2004/08/24 15:10:08     1.13
+++ linux/drivers/acpi/executer/exmutex.c       2005/02/07 02:54:40     1.14
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exnames.c 
linux/drivers/acpi/executer/exnames.c
--- linux/drivers/acpi/executer/exnames.c       2004/02/05 02:39:58     1.11
+++ linux/drivers/acpi/executer/exnames.c       2005/02/07 02:54:40     1.12
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exoparg1.c 
linux/drivers/acpi/executer/exoparg1.c
--- linux/drivers/acpi/executer/exoparg1.c      2005/01/13 14:05:45     1.21
+++ linux/drivers/acpi/executer/exoparg1.c      2005/02/07 02:54:40     1.22
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exoparg2.c 
linux/drivers/acpi/executer/exoparg2.c
--- linux/drivers/acpi/executer/exoparg2.c      2005/01/13 14:05:45     1.21
+++ linux/drivers/acpi/executer/exoparg2.c      2005/02/07 02:54:40     1.22
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exoparg3.c 
linux/drivers/acpi/executer/exoparg3.c
--- linux/drivers/acpi/executer/exoparg3.c      2004/02/05 02:39:58     1.10
+++ linux/drivers/acpi/executer/exoparg3.c      2005/02/07 02:54:40     1.11
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -218,6 +218,10 @@
                        return_desc->string.pointer = buffer;
                        return_desc->string.length = (u32) length;
                }
+
+               /* Mark buffer initialized */
+
+               return_desc->buffer.flags |= AOPOBJ_DATA_VALID;
                break;
 
 
diff -urN linux/drivers/acpi/executer/exoparg6.c 
linux/drivers/acpi/executer/exoparg6.c
--- linux/drivers/acpi/executer/exoparg6.c      2004/02/05 02:39:58     1.8
+++ linux/drivers/acpi/executer/exoparg6.c      2005/02/07 02:54:40     1.9
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exprep.c 
linux/drivers/acpi/executer/exprep.c
--- linux/drivers/acpi/executer/exprep.c        2005/01/13 14:05:45     1.19
+++ linux/drivers/acpi/executer/exprep.c        2005/02/07 02:54:40     1.20
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exregion.c 
linux/drivers/acpi/executer/exregion.c
--- linux/drivers/acpi/executer/exregion.c      2004/11/15 11:49:23     1.15
+++ linux/drivers/acpi/executer/exregion.c      2005/02/07 02:54:40     1.16
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exresnte.c 
linux/drivers/acpi/executer/exresnte.c
--- linux/drivers/acpi/executer/exresnte.c      2004/04/12 20:23:28     1.20
+++ linux/drivers/acpi/executer/exresnte.c      2005/02/07 02:54:40     1.21
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exresolv.c 
linux/drivers/acpi/executer/exresolv.c
--- linux/drivers/acpi/executer/exresolv.c      2004/11/15 11:49:23     1.20
+++ linux/drivers/acpi/executer/exresolv.c      2005/02/07 02:54:40     1.21
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exresop.c 
linux/drivers/acpi/executer/exresop.c
--- linux/drivers/acpi/executer/exresop.c       2004/11/15 11:49:23     1.21
+++ linux/drivers/acpi/executer/exresop.c       2005/02/07 02:54:41     1.22
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -580,6 +580,45 @@
                                        acpi_ut_get_object_type_name 
(obj_desc), obj_desc));
 
                                return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+                       }
+                       goto next_operand;
+
+
+               case ARGI_DATAREFOBJ:
+
+                       /* Used by the Store() operator only */
+
+                       switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
+                       case ACPI_TYPE_INTEGER:
+                       case ACPI_TYPE_PACKAGE:
+                       case ACPI_TYPE_STRING:
+                       case ACPI_TYPE_BUFFER:
+                       case ACPI_TYPE_BUFFER_FIELD:
+                       case ACPI_TYPE_LOCAL_REFERENCE:
+                       case ACPI_TYPE_LOCAL_REGION_FIELD:
+                       case ACPI_TYPE_LOCAL_BANK_FIELD:
+                       case ACPI_TYPE_LOCAL_INDEX_FIELD:
+                       case ACPI_TYPE_DDB_HANDLE:
+
+                               /* Valid operand */
+                               break;
+
+                       default:
+
+                               if (acpi_gbl_enable_interpreter_slack) {
+                                       /*
+                                        * Enable original behavior of Store(), 
allowing any and all
+                                        * objects as the source operand.  The 
ACPI spec does not
+                                        * allow this, however.
+                                        */
+                                       break;
+                               }
+
+                               ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+                                       "Needed 
Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p\n",
+                                       acpi_ut_get_object_type_name 
(obj_desc), obj_desc));
+
+                               return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
                        }
                        goto next_operand;
 
diff -urN linux/drivers/acpi/executer/exstore.c 
linux/drivers/acpi/executer/exstore.c
--- linux/drivers/acpi/executer/exstore.c       2005/01/13 14:05:45     1.23
+++ linux/drivers/acpi/executer/exstore.c       2005/02/07 02:54:41     1.24
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exstoren.c 
linux/drivers/acpi/executer/exstoren.c
--- linux/drivers/acpi/executer/exstoren.c      2004/04/12 20:23:28     1.17
+++ linux/drivers/acpi/executer/exstoren.c      2005/02/07 02:54:41     1.18
@@ -7,7 +7,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exstorob.c 
linux/drivers/acpi/executer/exstorob.c
--- linux/drivers/acpi/executer/exstorob.c      2005/01/13 14:05:45     1.15
+++ linux/drivers/acpi/executer/exstorob.c      2005/02/07 02:54:41     1.16
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exsystem.c 
linux/drivers/acpi/executer/exsystem.c
--- linux/drivers/acpi/executer/exsystem.c      2004/11/15 11:49:23     1.13
+++ linux/drivers/acpi/executer/exsystem.c      2005/02/07 02:54:41     1.14
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/executer/exutils.c 
linux/drivers/acpi/executer/exutils.c
--- linux/drivers/acpi/executer/exutils.c       2004/11/15 11:49:23     1.19
+++ linux/drivers/acpi/executer/exutils.c       2005/02/07 02:54:41     1.20
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/hardware/hwacpi.c 
linux/drivers/acpi/hardware/hwacpi.c
--- linux/drivers/acpi/hardware/hwacpi.c        2004/02/05 02:39:58     1.18
+++ linux/drivers/acpi/hardware/hwacpi.c        2005/02/07 02:54:41     1.19
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/hardware/hwgpe.c 
linux/drivers/acpi/hardware/hwgpe.c
--- linux/drivers/acpi/hardware/hwgpe.c 2004/12/04 18:16:02     1.25
+++ linux/drivers/acpi/hardware/hwgpe.c 2005/02/07 02:54:41     1.26
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/hardware/hwregs.c 
linux/drivers/acpi/hardware/hwregs.c
--- linux/drivers/acpi/hardware/hwregs.c        2004/12/04 18:16:02     1.30
+++ linux/drivers/acpi/hardware/hwregs.c        2005/02/07 02:54:41     1.31
@@ -7,7 +7,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/hardware/hwsleep.c 
linux/drivers/acpi/hardware/hwsleep.c
--- linux/drivers/acpi/hardware/hwsleep.c       2005/01/13 14:05:45     1.24
+++ linux/drivers/acpi/hardware/hwsleep.c       2005/02/07 02:54:41     1.25
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/hardware/hwtimer.c 
linux/drivers/acpi/hardware/hwtimer.c
--- linux/drivers/acpi/hardware/hwtimer.c       2004/12/04 18:16:02     1.19
+++ linux/drivers/acpi/hardware/hwtimer.c       2005/02/07 02:54:41     1.20
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nsaccess.c 
linux/drivers/acpi/namespace/nsaccess.c
--- linux/drivers/acpi/namespace/nsaccess.c     2004/11/15 11:49:23     1.25
+++ linux/drivers/acpi/namespace/nsaccess.c     2005/02/07 02:54:41     1.26
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -155,8 +155,7 @@
                         */
                        switch (init_val->type) {
                        case ACPI_TYPE_METHOD:
-                               obj_desc->method.param_count = (u8) ACPI_STRTOUL
-                                                 (val, NULL, 10);
+                               obj_desc->method.param_count = (u8) 
ACPI_TO_INTEGER (val);
                                obj_desc->common.flags |= AOPOBJ_DATA_VALID;
 
 #if defined (_ACPI_ASL_COMPILER) || defined (_ACPI_DUMP_App)
@@ -176,8 +175,7 @@
 
                        case ACPI_TYPE_INTEGER:
 
-                               obj_desc->integer.value =
-                                               (acpi_integer) ACPI_STRTOUL 
(val, NULL, 10);
+                               obj_desc->integer.value = ACPI_TO_INTEGER (val);
                                break;
 
 
@@ -195,8 +193,7 @@
                        case ACPI_TYPE_MUTEX:
 
                                obj_desc->mutex.node = new_node;
-                               obj_desc->mutex.sync_level = (u8) ACPI_STRTOUL
-                                                 (val, NULL, 10);
+                               obj_desc->mutex.sync_level = (u8) 
(ACPI_TO_INTEGER (val) - 1);
 
                                if (ACPI_STRCMP (init_val->name, "_GL_") == 0) {
                                        /*
diff -urN linux/drivers/acpi/namespace/nsalloc.c 
linux/drivers/acpi/namespace/nsalloc.c
--- linux/drivers/acpi/namespace/nsalloc.c      2004/11/15 11:49:23     1.23
+++ linux/drivers/acpi/namespace/nsalloc.c      2005/02/07 02:54:41     1.24
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nsdump.c 
linux/drivers/acpi/namespace/nsdump.c
--- linux/drivers/acpi/namespace/nsdump.c       2004/12/04 18:16:02     1.25
+++ linux/drivers/acpi/namespace/nsdump.c       2005/02/07 02:54:41     1.26
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nsdumpdv.c 
linux/drivers/acpi/namespace/nsdumpdv.c
--- linux/drivers/acpi/namespace/nsdumpdv.c     2004/11/15 11:49:23     1.11
+++ linux/drivers/acpi/namespace/nsdumpdv.c     2005/02/07 02:54:41     1.12
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nseval.c 
linux/drivers/acpi/namespace/nseval.c
--- linux/drivers/acpi/namespace/nseval.c       2004/11/15 11:49:23     1.25
+++ linux/drivers/acpi/namespace/nseval.c       2005/02/07 02:54:41     1.26
@@ -6,7 +6,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nsinit.c 
linux/drivers/acpi/namespace/nsinit.c
--- linux/drivers/acpi/namespace/nsinit.c       2004/11/15 11:49:23     1.21
+++ linux/drivers/acpi/namespace/nsinit.c       2005/02/07 02:54:41     1.22
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -420,6 +420,12 @@
                status = AE_OK;
        }
        else {
+               /* Delete any return object (especially if implicit_return is 
enabled) */
+
+               if (pinfo.return_object) {
+                       acpi_ut_remove_reference (pinfo.return_object);
+               }
+
                /* Count of successful INIs */
 
                info->num_INI++;
diff -urN linux/drivers/acpi/namespace/nsload.c 
linux/drivers/acpi/namespace/nsload.c
--- linux/drivers/acpi/namespace/nsload.c       2004/12/04 18:16:02     1.24
+++ linux/drivers/acpi/namespace/nsload.c       2005/02/07 02:54:41     1.25
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nsnames.c 
linux/drivers/acpi/namespace/nsnames.c
--- linux/drivers/acpi/namespace/nsnames.c      2004/11/15 11:49:23     1.21
+++ linux/drivers/acpi/namespace/nsnames.c      2005/02/07 02:54:41     1.22
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nsobject.c 
linux/drivers/acpi/namespace/nsobject.c
--- linux/drivers/acpi/namespace/nsobject.c     2004/02/05 02:39:58     1.19
+++ linux/drivers/acpi/namespace/nsobject.c     2005/02/07 02:54:41     1.20
@@ -6,7 +6,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nsparse.c 
linux/drivers/acpi/namespace/nsparse.c
--- linux/drivers/acpi/namespace/nsparse.c      2004/08/24 15:10:08     1.9
+++ linux/drivers/acpi/namespace/nsparse.c      2005/02/07 02:54:41     1.10
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nssearch.c 
linux/drivers/acpi/namespace/nssearch.c
--- linux/drivers/acpi/namespace/nssearch.c     2004/11/15 11:49:23     1.23
+++ linux/drivers/acpi/namespace/nssearch.c     2005/02/07 02:54:41     1.24
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nsutils.c 
linux/drivers/acpi/namespace/nsutils.c
--- linux/drivers/acpi/namespace/nsutils.c      2004/12/04 18:16:02     1.29
+++ linux/drivers/acpi/namespace/nsutils.c      2005/02/07 02:54:41     1.30
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nswalk.c 
linux/drivers/acpi/namespace/nswalk.c
--- linux/drivers/acpi/namespace/nswalk.c       2004/11/15 11:49:23     1.16
+++ linux/drivers/acpi/namespace/nswalk.c       2005/02/07 02:54:41     1.17
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nsxfeval.c 
linux/drivers/acpi/namespace/nsxfeval.c
--- linux/drivers/acpi/namespace/nsxfeval.c     2004/12/04 18:16:02     1.15
+++ linux/drivers/acpi/namespace/nsxfeval.c     2005/02/07 02:54:41     1.16
@@ -6,7 +6,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nsxfname.c 
linux/drivers/acpi/namespace/nsxfname.c
--- linux/drivers/acpi/namespace/nsxfname.c     2004/12/04 18:16:02     1.21
+++ linux/drivers/acpi/namespace/nsxfname.c     2005/02/07 02:54:41     1.22
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/namespace/nsxfobj.c 
linux/drivers/acpi/namespace/nsxfobj.c
--- linux/drivers/acpi/namespace/nsxfobj.c      2004/12/04 18:16:02     1.22
+++ linux/drivers/acpi/namespace/nsxfobj.c      2005/02/07 02:54:41     1.23
@@ -6,7 +6,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/parser/psargs.c linux/drivers/acpi/parser/psargs.c
--- linux/drivers/acpi/parser/psargs.c  2004/03/11 16:46:47     1.21
+++ linux/drivers/acpi/parser/psargs.c  2005/02/07 02:54:42     1.22
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/parser/psopcode.c 
linux/drivers/acpi/parser/psopcode.c
--- linux/drivers/acpi/parser/psopcode.c        2005/01/13 14:05:45     1.24
+++ linux/drivers/acpi/parser/psopcode.c        2005/02/07 02:54:42     1.25
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -322,7 +322,7 @@
 #define ARGI_SLEEP_OP                   ARGI_LIST1 (ARGI_INTEGER)
 #define ARGI_STALL_OP                   ARGI_LIST1 (ARGI_INTEGER)
 #define ARGI_STATICSTRING_OP            ARGI_INVALID_OPCODE
-#define ARGI_STORE_OP                   ARGI_LIST2 (ARGI_ANYTYPE,    
ARGI_TARGETREF)
+#define ARGI_STORE_OP                   ARGI_LIST2 (ARGI_DATAREFOBJ, 
ARGI_TARGETREF)
 #define ARGI_STRING_OP                  ARGI_INVALID_OPCODE
 #define ARGI_SUBTRACT_OP                ARGI_LIST3 (ARGI_INTEGER,    
ARGI_INTEGER,       ARGI_TARGETREF)
 #define ARGI_THERMAL_ZONE_OP            ARGI_INVALID_OPCODE
diff -urN linux/drivers/acpi/parser/psparse.c 
linux/drivers/acpi/parser/psparse.c
--- linux/drivers/acpi/parser/psparse.c 2004/11/15 11:49:23     1.25
+++ linux/drivers/acpi/parser/psparse.c 2005/02/07 02:54:42     1.26
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/parser/psscope.c 
linux/drivers/acpi/parser/psscope.c
--- linux/drivers/acpi/parser/psscope.c 2004/04/12 20:23:28     1.14
+++ linux/drivers/acpi/parser/psscope.c 2005/02/07 02:54:42     1.15
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/parser/pstree.c linux/drivers/acpi/parser/pstree.c
--- linux/drivers/acpi/parser/pstree.c  2004/12/04 18:16:02     1.16
+++ linux/drivers/acpi/parser/pstree.c  2005/02/07 02:54:42     1.17
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/parser/psutils.c 
linux/drivers/acpi/parser/psutils.c
--- linux/drivers/acpi/parser/psutils.c 2004/12/04 18:16:02     1.19
+++ linux/drivers/acpi/parser/psutils.c 2005/02/07 02:54:42     1.20
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -208,6 +208,7 @@
 }
 
 
+#ifdef ACPI_ENABLE_OBJECT_CACHE
 
/*******************************************************************************
  *
  * FUNCTION:    acpi_ps_delete_parse_cache
@@ -231,6 +232,7 @@
        acpi_ut_delete_generic_cache (ACPI_MEM_LIST_PSNODE_EXT);
        return_VOID;
 }
+#endif
 
 
 
/*******************************************************************************
diff -urN linux/drivers/acpi/parser/pswalk.c linux/drivers/acpi/parser/pswalk.c
--- linux/drivers/acpi/parser/pswalk.c  2004/02/05 02:39:58     1.15
+++ linux/drivers/acpi/parser/pswalk.c  2005/02/07 02:54:42     1.16
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/parser/psxface.c 
linux/drivers/acpi/parser/psxface.c
--- linux/drivers/acpi/parser/psxface.c 2004/08/24 15:10:08     1.19
+++ linux/drivers/acpi/parser/psxface.c 2005/02/07 02:54:42     1.20
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/resources/rsaddr.c 
linux/drivers/acpi/resources/rsaddr.c
--- linux/drivers/acpi/resources/rsaddr.c       2004/04/12 20:23:28     1.17
+++ linux/drivers/acpi/resources/rsaddr.c       2005/02/07 02:54:42     1.18
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/resources/rscalc.c 
linux/drivers/acpi/resources/rscalc.c
--- linux/drivers/acpi/resources/rscalc.c       2004/11/15 11:49:23     1.20
+++ linux/drivers/acpi/resources/rscalc.c       2005/02/07 02:54:42     1.21
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/resources/rscreate.c 
linux/drivers/acpi/resources/rscreate.c
--- linux/drivers/acpi/resources/rscreate.c     2004/02/05 02:39:58     1.19
+++ linux/drivers/acpi/resources/rscreate.c     2005/02/07 02:54:42     1.20
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/resources/rsdump.c 
linux/drivers/acpi/resources/rsdump.c
--- linux/drivers/acpi/resources/rsdump.c       2004/02/05 02:39:58     1.16
+++ linux/drivers/acpi/resources/rsdump.c       2005/02/07 02:54:42     1.17
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/resources/rsio.c 
linux/drivers/acpi/resources/rsio.c
--- linux/drivers/acpi/resources/rsio.c 2004/02/05 02:39:58     1.16
+++ linux/drivers/acpi/resources/rsio.c 2005/02/07 02:54:42     1.17
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/resources/rsirq.c 
linux/drivers/acpi/resources/rsirq.c
--- linux/drivers/acpi/resources/rsirq.c        2004/02/05 02:39:58     1.18
+++ linux/drivers/acpi/resources/rsirq.c        2005/02/07 02:54:42     1.19
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/resources/rslist.c 
linux/drivers/acpi/resources/rslist.c
--- linux/drivers/acpi/resources/rslist.c       2004/02/05 02:39:58     1.15
+++ linux/drivers/acpi/resources/rslist.c       2005/02/07 02:54:42     1.16
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/resources/rsmemory.c 
linux/drivers/acpi/resources/rsmemory.c
--- linux/drivers/acpi/resources/rsmemory.c     2004/02/05 02:39:58     1.15
+++ linux/drivers/acpi/resources/rsmemory.c     2005/02/07 02:54:42     1.16
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/resources/rsmisc.c 
linux/drivers/acpi/resources/rsmisc.c
--- linux/drivers/acpi/resources/rsmisc.c       2004/02/05 02:39:58     1.14
+++ linux/drivers/acpi/resources/rsmisc.c       2005/02/07 02:54:42     1.15
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/resources/rsutils.c 
linux/drivers/acpi/resources/rsutils.c
--- linux/drivers/acpi/resources/rsutils.c      2004/12/04 18:16:02     1.19
+++ linux/drivers/acpi/resources/rsutils.c      2005/02/07 02:54:42     1.20
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -339,6 +339,13 @@
         * Execute the method, no return value
         */
        status = acpi_ns_evaluate_relative ("_SRS", &info);
+       if (ACPI_SUCCESS (status)) {
+               /* Delete any return object (especially if implicit_return is 
enabled) */
+
+               if (info.return_object) {
+                       acpi_ut_remove_reference (info.return_object);
+               }
+       }
 
        /*
         * Clean up and return the status from acpi_ns_evaluate_relative
diff -urN linux/drivers/acpi/resources/rsxface.c 
linux/drivers/acpi/resources/rsxface.c
--- linux/drivers/acpi/resources/rsxface.c      2004/12/04 18:16:02     1.21
+++ linux/drivers/acpi/resources/rsxface.c      2005/02/07 02:54:42     1.22
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/tables/tbconvrt.c 
linux/drivers/acpi/tables/tbconvrt.c
--- linux/drivers/acpi/tables/tbconvrt.c        2005/01/13 14:05:50     1.26
+++ linux/drivers/acpi/tables/tbconvrt.c        2005/02/07 02:54:42     1.27
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/tables/tbget.c linux/drivers/acpi/tables/tbget.c
--- linux/drivers/acpi/tables/tbget.c   2004/11/15 11:49:23     1.23
+++ linux/drivers/acpi/tables/tbget.c   2005/02/07 02:54:42     1.24
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/tables/tbgetall.c 
linux/drivers/acpi/tables/tbgetall.c
--- linux/drivers/acpi/tables/tbgetall.c        2004/02/05 02:39:58     1.11
+++ linux/drivers/acpi/tables/tbgetall.c        2005/02/07 02:54:42     1.12
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/tables/tbinstal.c 
linux/drivers/acpi/tables/tbinstal.c
--- linux/drivers/acpi/tables/tbinstal.c        2004/11/15 11:49:23     1.24
+++ linux/drivers/acpi/tables/tbinstal.c        2005/02/07 02:54:42     1.25
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/tables/tbrsdt.c linux/drivers/acpi/tables/tbrsdt.c
--- linux/drivers/acpi/tables/tbrsdt.c  2005/01/13 14:05:50     1.12
+++ linux/drivers/acpi/tables/tbrsdt.c  2005/02/07 02:54:42     1.13
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/tables/tbutils.c 
linux/drivers/acpi/tables/tbutils.c
--- linux/drivers/acpi/tables/tbutils.c 2004/12/04 18:16:02     1.22
+++ linux/drivers/acpi/tables/tbutils.c 2005/02/07 02:54:42     1.23
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/tables/tbxface.c 
linux/drivers/acpi/tables/tbxface.c
--- linux/drivers/acpi/tables/tbxface.c 2004/12/04 18:16:02     1.20
+++ linux/drivers/acpi/tables/tbxface.c 2005/02/07 02:54:42     1.21
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/tables/tbxfroot.c 
linux/drivers/acpi/tables/tbxfroot.c
--- linux/drivers/acpi/tables/tbxfroot.c        2005/01/13 14:05:50     1.22
+++ linux/drivers/acpi/tables/tbxfroot.c        2005/02/07 02:54:42     1.23
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -114,8 +114,10 @@
 
        /* Check oem_id and oem_table_id */
 
-       if ((oem_id[0]     && ACPI_STRCMP (oem_id, table->oem_id)) ||
-               (oem_table_id[0] && ACPI_STRCMP (oem_table_id, 
table->oem_table_id))) {
+       if ((oem_id[0]     && ACPI_STRNCMP (
+                        oem_id, table->oem_id, sizeof (table->oem_id))) ||
+               (oem_table_id[0] && ACPI_STRNCMP (
+                                  oem_table_id, table->oem_table_id, sizeof 
(table->oem_table_id)))) {
                return_ACPI_STATUS (AE_AML_NAME_NOT_FOUND);
        }
 
@@ -358,7 +360,8 @@
 
        status = acpi_tb_find_rsdp (&table_info, flags);
        if (ACPI_FAILURE (status)) {
-               ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "RSDP structure not found, %s 
Flags=%X\n",
+               ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+                       "RSDP structure not found, %s Flags=%X\n",
                        acpi_format_exception (status), flags));
                return_ACPI_STATUS (AE_NO_ACPI_TABLES);
        }
@@ -411,7 +414,7 @@
 
                /* Signature matches, check the appropriate checksum */
 
-               if (((struct rsdp_descriptor *) mem_rover)->revision < 2) {
+               if ((ACPI_CAST_PTR (struct rsdp_descriptor, 
mem_rover))->revision < 2) {
                        /* ACPI version 1.0 */
 
                        checksum = acpi_tb_checksum (mem_rover, 
ACPI_RSDP_CHECKSUM_LENGTH);
@@ -490,7 +493,8 @@
                                  ACPI_EBDA_PTR_LENGTH,
                                  (void *) &table_ptr);
                if (ACPI_FAILURE (status)) {
-                       ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory 
at %8.8X for length %X\n",
+                       ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+                               "Could not map memory at %8.8X for length %X\n",
                                ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
                        return_ACPI_STATUS (status);
                }
@@ -509,7 +513,8 @@
                                          ACPI_EBDA_WINDOW_SIZE,
                                          (void *) &table_ptr);
                        if (ACPI_FAILURE (status)) {
-                               ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not 
map memory at %8.8X for length %X\n",
+                               ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+                                       "Could not map memory at %8.8X for 
length %X\n",
                                        physical_address, 
ACPI_EBDA_WINDOW_SIZE));
                                return_ACPI_STATUS (status);
                        }
@@ -534,7 +539,8 @@
                                  ACPI_HI_RSDP_WINDOW_SIZE,
                                  (void *) &table_ptr);
                if (ACPI_FAILURE (status)) {
-                       ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory 
at %8.8X for length %X\n",
+                       ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+                               "Could not map memory at %8.8X for length %X\n",
                                ACPI_HI_RSDP_WINDOW_BASE, 
ACPI_HI_RSDP_WINDOW_SIZE));
                        return_ACPI_STATUS (status);
                }
diff -urN linux/drivers/acpi/utilities/utalloc.c 
linux/drivers/acpi/utilities/utalloc.c
--- linux/drivers/acpi/utilities/utalloc.c      2004/12/04 18:16:02     1.16
+++ linux/drivers/acpi/utilities/utalloc.c      2005/02/07 02:54:42     1.17
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -73,9 +73,12 @@
        ACPI_FUNCTION_ENTRY ();
 
 
+       cache_info = &acpi_gbl_memory_lists[list_id];
+
+#ifdef ACPI_ENABLE_OBJECT_CACHE
+
        /* If walk cache is full, just free this wallkstate object */
 
-       cache_info = &acpi_gbl_memory_lists[list_id];
        if (cache_info->cache_depth >= cache_info->max_cache_depth) {
                ACPI_MEM_FREE (object);
                ACPI_MEM_TRACKING (cache_info->total_freed++);
@@ -101,6 +104,14 @@
 
                (void) acpi_ut_release_mutex (ACPI_MTX_CACHES);
        }
+
+#else
+
+       /* Object cache is disabled; just free the object */
+
+       ACPI_MEM_FREE (object);
+       ACPI_MEM_TRACKING (cache_info->total_freed++);
+#endif
 }
 
 
@@ -130,6 +141,9 @@
 
 
        cache_info = &acpi_gbl_memory_lists[list_id];
+
+#ifdef ACPI_ENABLE_OBJECT_CACHE
+
        if (ACPI_FAILURE (acpi_ut_acquire_mutex (ACPI_MTX_CACHES))) {
                return (NULL);
        }
@@ -174,10 +188,19 @@
                ACPI_MEM_TRACKING (cache_info->total_allocated++);
        }
 
+#else
+
+       /* Object cache is disabled; just allocate the object */
+
+       object = ACPI_MEM_CALLOCATE (cache_info->object_size);
+       ACPI_MEM_TRACKING (cache_info->total_allocated++);
+#endif
+
        return (object);
 }
 
 
+#ifdef ACPI_ENABLE_OBJECT_CACHE
 /******************************************************************************
  *
  * FUNCTION:    acpi_ut_delete_generic_cache
@@ -212,6 +235,7 @@
                cache_info->cache_depth--;
        }
 }
+#endif
 
 
 
/*******************************************************************************
diff -urN linux/drivers/acpi/utilities/utcopy.c 
linux/drivers/acpi/utilities/utcopy.c
--- linux/drivers/acpi/utilities/utcopy.c       2004/11/15 11:49:23     1.22
+++ linux/drivers/acpi/utilities/utcopy.c       2005/02/07 02:54:42     1.23
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/utilities/utdebug.c 
linux/drivers/acpi/utilities/utdebug.c
--- linux/drivers/acpi/utilities/utdebug.c      2004/12/04 18:16:02     1.16
+++ linux/drivers/acpi/utilities/utdebug.c      2005/02/07 02:54:42     1.17
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/utilities/utdelete.c 
linux/drivers/acpi/utilities/utdelete.c
--- linux/drivers/acpi/utilities/utdelete.c     2004/11/15 11:49:23     1.19
+++ linux/drivers/acpi/utilities/utdelete.c     2005/02/07 02:54:42     1.20
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/utilities/uteval.c 
linux/drivers/acpi/utilities/uteval.c
--- linux/drivers/acpi/utilities/uteval.c       2004/08/24 15:10:08     1.19
+++ linux/drivers/acpi/utilities/uteval.c       2005/02/07 02:54:42     1.20
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -198,6 +198,17 @@
                break;
        }
 
+       if ((acpi_gbl_enable_interpreter_slack) &&
+               (!expected_return_btypes)) {
+               /*
+                * We received a return object, but one was not expected.  This 
can
+                * happen frequently if the "implicit return" feature is 
enabled.
+                * Just delete the return object and return AE_OK.
+                */
+               acpi_ut_remove_reference (info.return_object);
+               return_ACPI_STATUS (AE_OK);
+       }
+
        /* Is the return object one of the expected types? */
 
        if (!(expected_return_btypes & return_btype)) {
@@ -205,8 +216,9 @@
                        prefix_node, path, AE_TYPE);
 
                ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
-                       "Type returned from %s was incorrect: %X\n",
-                       path, ACPI_GET_OBJECT_TYPE (info.return_object)));
+                       "Type returned from %s was incorrect: %s, expected 
Btypes: %X\n",
+                       path, acpi_ut_get_object_type_name (info.return_object),
+                       expected_return_btypes));
 
                /* On error exit, we must delete the return object */
 
diff -urN linux/drivers/acpi/utilities/utglobal.c 
linux/drivers/acpi/utilities/utglobal.c
--- linux/drivers/acpi/utilities/utglobal.c     2004/12/04 18:16:02     1.31
+++ linux/drivers/acpi/utilities/utglobal.c     2005/02/07 02:54:42     1.32
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -219,6 +219,8 @@
  * NOTES:
  * 1) _SB_ is defined to be a device to allow \_SB_._INI to be run
  *    during the initialization sequence.
+ * 2) _TZ_ is defined to be a thermal zone in order to allow ASL code to
+ *    perform a Notify() operation on it.
  */
 const struct acpi_predefined_names      acpi_gbl_pre_defined_names[] =
 { {"_GPE",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
@@ -226,12 +228,12 @@
        {"_SB_",    ACPI_TYPE_DEVICE,           NULL},
        {"_SI_",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
        {"_TZ_",    ACPI_TYPE_THERMAL,          NULL},
-       {"_REV",    ACPI_TYPE_INTEGER,          "2"},
+       {"_REV",    ACPI_TYPE_INTEGER,          (char *) ACPI_CA_SUPPORT_LEVEL},
        {"_OS_",    ACPI_TYPE_STRING,           ACPI_OS_NAME},
-       {"_GL_",    ACPI_TYPE_MUTEX,            "0"},
+       {"_GL_",    ACPI_TYPE_MUTEX,            (char *) 1},
 
 #if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
-       {"_OSI",    ACPI_TYPE_METHOD,           "1"},
+       {"_OSI",    ACPI_TYPE_METHOD,           (char *) 1},
 #endif
        {NULL,      ACPI_TYPE_ANY,              NULL}              /* Table 
terminator */
 };
diff -urN linux/drivers/acpi/utilities/utinit.c 
linux/drivers/acpi/utilities/utinit.c
--- linux/drivers/acpi/utilities/utinit.c       2004/02/05 02:39:58     1.14
+++ linux/drivers/acpi/utilities/utinit.c       2005/02/07 02:54:42     1.15
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/utilities/utmath.c 
linux/drivers/acpi/utilities/utmath.c
--- linux/drivers/acpi/utilities/utmath.c       2004/11/15 11:49:23     1.9
+++ linux/drivers/acpi/utilities/utmath.c       2005/02/07 02:54:42     1.10
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -urN linux/drivers/acpi/utilities/utmisc.c 
linux/drivers/acpi/utilities/utmisc.c
--- linux/drivers/acpi/utilities/utmisc.c       2004/12/04 18:16:02     1.26
+++ linux/drivers/acpi/utilities/utmisc.c       2005/02/07 02:54:42     1.27
@@ -5,7 +5,7 @@
  
******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -422,6 +422,12 @@
                string++;
        }
 
+       /* Any string left? */
+
+       if (!(*string)) {
+               goto error_exit;
+       }
+
        /* Main loop: convert the string to a 64-bit integer */
 
        while (*string) {
@@ -672,7 +678,6 @@
        acpi_mutex_handle               mutex_id)
 {
        acpi_status                     status;
-       u32                             i;
        u32                             this_thread_id;
 
 
@@ -685,30 +690,37 @@
 
        this_thread_id = acpi_os_get_thread_id ();
 
-       /*
-        * Deadlock prevention.  Check if this thread owns any mutexes of value
-        * greater than or equal to this one.  If so, the thread has violated
-        * the mutex ordering rule.  This indicates a coding error somewhere in
-        * the ACPI subsystem code.
-        */
-       for (i = mutex_id; i < MAX_MUTEX; i++) {
-               if (acpi_gbl_mutex_info[i].owner_id == this_thread_id) {
-                       if (i == mutex_id) {
-                               ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
-                                               "Mutex [%s] already acquired by 
this thread [%X]\n",
-                                               acpi_ut_get_mutex_name 
(mutex_id), this_thread_id));
+#ifdef ACPI_MUTEX_DEBUG
+       {
+               u32                             i;
+               /*
+                * Mutex debug code, for internal debugging only.
+                *
+                * Deadlock prevention.  Check if this thread owns any mutexes 
of value
+                * greater than or equal to this one.  If so, the thread has 
violated
+                * the mutex ordering rule.  This indicates a coding error 
somewhere in
+                * the ACPI subsystem code.
+                */
+               for (i = mutex_id; i < MAX_MUTEX; i++) {
+                       if (acpi_gbl_mutex_info[i].owner_id == this_thread_id) {
+                               if (i == mutex_id) {
+                                       ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+                                                       "Mutex [%s] already 
acquired by this thread [%X]\n",
+                                                       acpi_ut_get_mutex_name 
(mutex_id), this_thread_id));
 
-                               return (AE_ALREADY_ACQUIRED);
-                       }
+                                       return (AE_ALREADY_ACQUIRED);
+                               }
 
-                       ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
-                                       "Invalid acquire order: Thread %X owns 
[%s], wants [%s]\n",
-                                       this_thread_id, acpi_ut_get_mutex_name 
(i),
-                                       acpi_ut_get_mutex_name (mutex_id)));
+                               ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+                                               "Invalid acquire order: Thread 
%X owns [%s], wants [%s]\n",
+                                               this_thread_id, 
acpi_ut_get_mutex_name (i),
+                                               acpi_ut_get_mutex_name 
(mutex_id)));
 
-                       return (AE_ACQUIRE_DEADLOCK);
+                               return (AE_ACQUIRE_DEADLOCK);
+                       }
                }
        }
+#endif
 
        ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX,
                         "Thread %X attempting to acquire Mutex [%s]\n",
@@ -872,7 +884,7 @@
  * DESCRIPTION: Create a new state and push it
  *
  
******************************************************************************/
-
+#ifdef ACPI_FUTURE_USAGE
 acpi_status
 acpi_ut_create_pkg_state_and_push (
        void                            *internal_object,
@@ -894,7 +906,7 @@
        acpi_ut_push_generic_state (state_list, state);
        return (AE_OK);
 }
-
+#endif  /*  ACPI_FUTURE_USAGE  */
 
 
/*******************************************************************************
  *
@@ -1187,6 +1199,7 @@
 }
 
 
+#ifdef ACPI_ENABLE_OBJECT_CACHE
 
/*******************************************************************************
  *
  * FUNCTION:    acpi_ut_delete_generic_state_cache
@@ -1210,6 +1223,7 @@
        acpi_ut_delete_generic_cache (ACPI_MEM_LIST_STATE);
        return_VOID;
 }
+#endif
 
 
 
/*******************************************************************************
diff -urN linux/drivers/acpi/utilities/utobject.c 
linux/drivers/acpi/utilities/utobject.c
--- linux/drivers/acpi/utilities/utobject.c     2004/11/15 11:49:23     1.16
+++ linux/drivers/acpi/utilities/utobject.c     2005/02/07 02:54:42     1.17
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -368,6 +368,7 @@
 }
 
 
+#ifdef ACPI_ENABLE_OBJECT_CACHE
 
/*******************************************************************************
  *
  * FUNCTION:    acpi_ut_delete_object_cache
@@ -391,6 +392,7 @@
        acpi_ut_delete_generic_cache (ACPI_MEM_LIST_OPERAND);
        return_VOID;
 }
+#endif
 
 
 
/*******************************************************************************
diff -urN linux/drivers/acpi/utilities/utxface.c 
linux/drivers/acpi/utilities/utxface.c
--- linux/drivers/acpi/utilities/utxface.c      2004/12/04 18:16:02     1.15
+++ linux/drivers/acpi/utilities/utxface.c      2005/02/07 02:54:42     1.16
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -514,10 +514,12 @@
        ACPI_FUNCTION_TRACE ("acpi_purge_cached_objects");
 
 
+#ifdef ACPI_ENABLE_OBJECT_CACHE
        acpi_ut_delete_generic_state_cache ();
        acpi_ut_delete_object_cache ();
        acpi_ds_delete_walk_state_cache ();
        acpi_ps_delete_parse_cache ();
+#endif
 
        return_ACPI_STATUS (AE_OK);
 }
diff -urN linux/drivers/atm/fore200e.c linux/drivers/atm/fore200e.c
--- linux/drivers/atm/fore200e.c        2004/12/04 18:16:02     1.33
+++ linux/drivers/atm/fore200e.c        2005/02/07 02:54:43     1.34
@@ -39,6 +39,7 @@
 #include <linux/sonet.h>
 #include <linux/atm_suni.h>
 #include <linux/dma-mapping.h>
+#include <linux/delay.h>
 #include <asm/io.h>
 #include <asm/string.h>
 #include <asm/page.h>
@@ -1779,7 +1780,7 @@
 
            /* retry once again? */
            if (--retry > 0) {
-               schedule();
+               udelay(50);
                goto retry_here;
            }
 
diff -urN linux/drivers/atm/he.c linux/drivers/atm/he.c
--- linux/drivers/atm/he.c      2005/01/25 04:28:09     1.18
+++ linux/drivers/atm/he.c      2005/02/07 02:54:43     1.19
@@ -2575,8 +2575,8 @@
                        udelay(250);
                }
 
-               add_wait_queue(&he_vcc->rx_waitq, &wait);
                set_current_state(TASK_UNINTERRUPTIBLE);
+               add_wait_queue(&he_vcc->rx_waitq, &wait);
 
                he_writel_rsr0(he_dev, RSR0_CLOSE_CONN, cid);
                (void) he_readl_rsr0(he_dev, cid);              /* flush posted 
writes */
@@ -2650,8 +2650,8 @@
                tpd->vcc = vcc;
                wmb();
 
-               add_wait_queue(&he_vcc->tx_waitq, &wait);
                set_current_state(TASK_UNINTERRUPTIBLE);
+               add_wait_queue(&he_vcc->tx_waitq, &wait);
                __enqueue_tpd(he_dev, tpd, cid);
                spin_unlock_irqrestore(&he_dev->global_lock, flags);
 
diff -urN linux/drivers/atm/nicstar.c linux/drivers/atm/nicstar.c
--- linux/drivers/atm/nicstar.c 2004/11/15 11:49:24     1.33
+++ linux/drivers/atm/nicstar.c 2005/02/07 02:54:43     1.34
@@ -54,7 +54,6 @@
 #include <asm/uaccess.h>
 #include <asm/atomic.h>
 #include "nicstar.h"
-#include "nicstarmac.h"
 #ifdef CONFIG_ATM_NICSTAR_USE_SUNI
 #include "suni.h"
 #endif /* CONFIG_ATM_NICSTAR_USE_SUNI */
diff -urN linux/drivers/atm/nicstarmac.c linux/drivers/atm/nicstarmac.c
--- linux/drivers/atm/nicstarmac.c      2005/01/13 14:05:50     1.3
+++ linux/drivers/atm/nicstarmac.c      2005/02/07 02:54:43     1.4
@@ -7,6 +7,8 @@
  * Read this ForeRunner's MAC address from eprom/eeprom
  */
 
+typedef void __iomem *virt_addr_t;
+
 #define CYCLE_DELAY 5
 
 /* This was the original definition
@@ -213,7 +215,7 @@
 }
 
 
-void
+static void
 nicstar_init_eprom( virt_addr_t base )
 {
     u_int32_t val;
@@ -246,7 +248,7 @@
  * above.
  */ 
 
-void
+static void
 nicstar_read_eprom(
     virt_addr_t        base,
     u_int8_t   prom_offset,
diff -urN linux/drivers/atm/nicstarmac.h linux/drivers/atm/nicstarmac.h
--- linux/drivers/atm/Attic/nicstarmac.h        Mon Feb  7 02:54:43 2005        
1.3
+++ linux/drivers/atm/Attic/nicstarmac.h        1970/01/01 00:00:002002
@@ -1,13 +0,0 @@
-/******************************************************************************
- *
- * nicstarmac.h
- *
- * Header file for nicstarmac.c
- *
- 
******************************************************************************/
-
-
-typedef void __iomem *virt_addr_t;
-
-void nicstar_init_eprom( virt_addr_t base );
-void nicstar_read_eprom( virt_addr_t, u_int8_t, u_int8_t *, u_int32_t);
diff -urN linux/drivers/base/attribute_container.c 
linux/drivers/base/attribute_container.c
--- linux/drivers/base/attribute_container.c    1970/01/01 00:00:00
+++ linux/drivers/base/attribute_container.c    Mon Feb  7 02:54:43 2005        
1.1
@@ -0,0 +1,376 @@
+/*
+ * attribute_container.c - implementation of a simple container for classes
+ *
+ * Copyright (c) 2005 - James Bottomley <James.Bottomley@steeleye.com>
+ *
+ * This file is licensed under GPLv2
+ *
+ * The basic idea here is to enable a device to be attached to an
+ * aritrary numer of classes without having to allocate storage for them.
+ * Instead, the contained classes select the devices they need to attach
+ * to via a matching function.
+ */
+
+#include <linux/attribute_container.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/list.h>
+#include <linux/module.h>
+
+/* This is a private structure used to tie the classdev and the
+ * container .. it should never be visible outside this file */
+struct internal_container {
+       struct list_head node;
+       struct attribute_container *cont;
+       struct class_device classdev;
+};
+
+/**
+ * attribute_container_classdev_to_container - given a classdev, return the 
container
+ *
+ * @classdev: the class device created by attribute_container_add_device.
+ *
+ * Returns the container associated with this classdev.
+ */
+struct attribute_container *
+attribute_container_classdev_to_container(struct class_device *classdev)
+{
+       struct internal_container *ic =
+               container_of(classdev, struct internal_container, classdev);
+       return ic->cont;
+}
+EXPORT_SYMBOL_GPL(attribute_container_classdev_to_container);
+
+static struct list_head attribute_container_list;
+
+static DECLARE_MUTEX(attribute_container_mutex);
+
+/**
+ * attribute_container_register - register an attribute container
+ *
+ * @cont: The container to register.  This must be allocated by the
+ *        callee and should also be zeroed by it.
+ */
+int
+attribute_container_register(struct attribute_container *cont)
+{
+       INIT_LIST_HEAD(&cont->node);
+       INIT_LIST_HEAD(&cont->containers);
+               
+       down(&attribute_container_mutex);
+       list_add_tail(&cont->node, &attribute_container_list);
+       up(&attribute_container_mutex);
+
+       return 0;
+}
+EXPORT_SYMBOL_GPL(attribute_container_register);
+
+/**
+ * attribute_container_unregister - remove a container registration
+ *
+ * @cont: previously registered container to remove
+ */
+int
+attribute_container_unregister(struct attribute_container *cont)
+{
+       int retval = -EBUSY;
+       down(&attribute_container_mutex);
+       if (!list_empty(&cont->containers))
+               goto out;
+       retval = 0;
+       list_del(&cont->node);
+ out:
+       up(&attribute_container_mutex);
+       return retval;
+               
+}
+EXPORT_SYMBOL_GPL(attribute_container_unregister);
+
+/* private function used as class release */
+static void attribute_container_release(struct class_device *classdev)
+{
+       struct internal_container *ic 
+               = container_of(classdev, struct internal_container, classdev);
+       struct device *dev = classdev->dev;
+
+       kfree(ic);
+       put_device(dev);
+}
+
+/**
+ * attribute_container_add_device - see if any container is interested in dev
+ *
+ * @dev: device to add attributes to
+ * @fn:         function to trigger addition of class device.
+ *
+ * This function allocates storage for the class device(s) to be
+ * attached to dev (one for each matching attribute_container).  If no
+ * fn is provided, the code will simply register the class device via
+ * class_device_add.  If a function is provided, it is expected to add
+ * the class device at the appropriate time.  One of the things that
+ * might be necessary is to allocate and initialise the classdev and
+ * then add it a later time.  To do this, call this routine for
+ * allocation and initialisation and then use
+ * attribute_container_device_trigger() to call class_device_add() on
+ * it.  Note: after this, the class device contains a reference to dev
+ * which is not relinquished until the release of the classdev.
+ */
+void
+attribute_container_add_device(struct device *dev,
+                              int (*fn)(struct attribute_container *,
+                                        struct device *,
+                                        struct class_device *))
+{
+       struct attribute_container *cont;
+
+       down(&attribute_container_mutex);
+       list_for_each_entry(cont, &attribute_container_list, node) {
+               struct internal_container *ic;
+
+               if (attribute_container_no_classdevs(cont))
+                       continue;
+
+               if (!cont->match(cont, dev))
+                       continue;
+               ic = kmalloc(sizeof(struct internal_container), GFP_KERNEL);
+               if (!ic) {
+                       dev_printk(KERN_ERR, dev, "failed to allocate class 
container\n");
+                       continue;
+               }
+               memset(ic, 0, sizeof(struct internal_container));
+               INIT_LIST_HEAD(&ic->node);
+               ic->cont = cont;
+               class_device_initialize(&ic->classdev);
+               ic->classdev.dev = get_device(dev);
+               ic->classdev.class = cont->class;
+               cont->class->release = attribute_container_release;
+               strcpy(ic->classdev.class_id, dev->bus_id);
+               if (fn)
+                       fn(cont, dev, &ic->classdev);
+               else
+                       attribute_container_add_class_device(&ic->classdev);
+               list_add_tail(&ic->node, &cont->containers);
+       }
+       up(&attribute_container_mutex);
+}
+
+/**
+ * attribute_container_remove_device - make device eligible for removal.
+ *
+ * @dev:  The generic device
+ * @fn:          A function to call to remove the device
+ *
+ * This routine triggers device removal.  If fn is NULL, then it is
+ * simply done via class_device_unregister (note that if something
+ * still has a reference to the classdev, then the memory occupied
+ * will not be freed until the classdev is released).  If you want a
+ * two phase release: remove from visibility and then delete the
+ * device, then you should use this routine with a fn that calls
+ * class_device_del() and then use
+ * attribute_container_device_trigger() to do the final put on the
+ * classdev.
+ */
+void
+attribute_container_remove_device(struct device *dev,
+                                 void (*fn)(struct attribute_container *,
+                                            struct device *,
+                                            struct class_device *))
+{
+       struct attribute_container *cont;
+
+       down(&attribute_container_mutex);
+       list_for_each_entry(cont, &attribute_container_list, node) {
+               struct internal_container *ic, *tmp;
+
+               if (attribute_container_no_classdevs(cont))
+                       continue;
+
+               if (!cont->match(cont, dev))
+                       continue;
+               list_for_each_entry_safe(ic, tmp, &cont->containers, node) {
+                       if (dev != ic->classdev.dev)
+                               continue;
+                       list_del(&ic->node);
+                       if (fn)
+                               fn(cont, dev, &ic->classdev);
+                       else {
+                               attribute_container_remove_attrs(&ic->classdev);
+                               class_device_unregister(&ic->classdev);
+                       }
+               }
+       }
+       up(&attribute_container_mutex);
+}
+EXPORT_SYMBOL_GPL(attribute_container_remove_device);
+
+/**
+ * attribute_container_device_trigger - execute a trigger for each matching 
classdev
+ *
+ * @dev:  The generic device to run the trigger for
+ * @fn   the function to execute for each classdev.
+ *
+ * This funcion is for executing a trigger when you need to know both
+ * the container and the classdev.  If you only care about the
+ * container, then use attribute_container_trigger() instead.
+ */
+void
+attribute_container_device_trigger(struct device *dev, 
+                                  int (*fn)(struct attribute_container *,
+                                            struct device *,
+                                            struct class_device *))
+{
+       struct attribute_container *cont;
+
+       down(&attribute_container_mutex);
+       list_for_each_entry(cont, &attribute_container_list, node) {
+               struct internal_container *ic, *tmp;
+
+               if (!cont->match(cont, dev))
+                       continue;
+
+               list_for_each_entry_safe(ic, tmp, &cont->containers, node) {
+                       if (dev == ic->classdev.dev)
+                               fn(cont, dev, &ic->classdev);
+               }
+       }
+       up(&attribute_container_mutex);
+}
+EXPORT_SYMBOL_GPL(attribute_container_device_trigger);
+
+/**
+ * attribute_container_trigger - trigger a function for each matching container
+ *
+ * @dev:  The generic device to activate the trigger for
+ * @fn:          the function to trigger
+ *
+ * This routine triggers a function that only needs to know the
+ * matching containers (not the classdev) associated with a device.
+ * It is more lightweight than attribute_container_device_trigger, so
+ * should be used in preference unless the triggering function
+ * actually needs to know the classdev.
+ */
+void
+attribute_container_trigger(struct device *dev,
+                           int (*fn)(struct attribute_container *,
+                                     struct device *))
+{
+       struct attribute_container *cont;
+
+       down(&attribute_container_mutex);
+       list_for_each_entry(cont, &attribute_container_list, node) {
+               if (cont->match(cont, dev))
+                       fn(cont, dev);
+       }
+       up(&attribute_container_mutex);
+}
+EXPORT_SYMBOL_GPL(attribute_container_trigger);
+
+/**
+ * attribute_container_add_attrs - add attributes
+ *
+ * @classdev: The class device
+ *
+ * This simply creates all the class device sysfs files from the
+ * attributes listed in the container
+ */
+int
+attribute_container_add_attrs(struct class_device *classdev)
+{
+       struct attribute_container *cont =
+               attribute_container_classdev_to_container(classdev);
+       struct class_device_attribute **attrs = cont->attrs;
+       int i, error;
+
+       if (!attrs)
+               return 0;
+
+       for (i = 0; attrs[i]; i++) {
+               error = class_device_create_file(classdev, attrs[i]);
+               if (error)
+                       return error;
+       }
+
+       return 0;
+}
+EXPORT_SYMBOL_GPL(attribute_container_add_attrs);
+
+/**
+ * attribute_container_add_class_device - same function as class_device_add
+ *
+ * @classdev:  the class device to add
+ *
+ * This performs essentially the same function as class_device_add except for
+ * attribute containers, namely add the classdev to the system and then
+ * create the attribute files
+ */
+int
+attribute_container_add_class_device(struct class_device *classdev)
+{
+       int error = class_device_add(classdev);
+       if (error)
+               return error;
+       return attribute_container_add_attrs(classdev);
+}
+EXPORT_SYMBOL_GPL(attribute_container_add_class_device);
+
+/**
+ * attribute_container_add_class_device_adapter - simple adapter for triggers
+ *
+ * This function is identical to attribute_container_add_class_device except
+ * that it is designed to be called from the triggers
+ */
+int
+attribute_container_add_class_device_adapter(struct attribute_container *cont,
+                                            struct device *dev,
+                                            struct class_device *classdev)
+{
+       return attribute_container_add_class_device(classdev);
+}
+EXPORT_SYMBOL_GPL(attribute_container_add_class_device_adapter);
+
+/**
+ * attribute_container_remove_attrs - remove any attribute files
+ *
+ * @classdev: The class device to remove the files from
+ *
+ */
+void
+attribute_container_remove_attrs(struct class_device *classdev)
+{
+       struct attribute_container *cont =
+               attribute_container_classdev_to_container(classdev);
+       struct class_device_attribute **attrs = cont->attrs;
+       int i;
+
+       if (!attrs)
+               return;
+
+       for (i = 0; attrs[i]; i++)
+               class_device_remove_file(classdev, attrs[i]);
+}
+EXPORT_SYMBOL_GPL(attribute_container_remove_attrs);
+
+/**
+ * attribute_container_class_device_del - equivalent of class_device_del
+ *
+ * @classdev: the class device
+ *
+ * This function simply removes all the attribute files and then calls
+ * class_device_del.
+ */
+void
+attribute_container_class_device_del(struct class_device *classdev)
+{
+       attribute_container_remove_attrs(classdev);
+       class_device_del(classdev);
+}
+EXPORT_SYMBOL_GPL(attribute_container_class_device_del);
+
+int __init
+attribute_container_init(void)
+{
+       INIT_LIST_HEAD(&attribute_container_list);
+       return 0;
+}
diff -urN linux/drivers/base/transport_class.c 
linux/drivers/base/transport_class.c
--- linux/drivers/base/transport_class.c        1970/01/01 00:00:00
+++ linux/drivers/base/transport_class.c        Mon Feb  7 02:54:43 2005        
1.1
@@ -0,0 +1,257 @@
+/*
+ * transport_class.c - implementation of generic transport classes
+ *                     using attribute_containers
+ *
+ * Copyright (c) 2005 - James Bottomley <James.Bottomley@steeleye.com>
+ *
+ * This file is licensed under GPLv2
+ *
+ * The basic idea here is to allow any "device controller" (which
+ * would most often be a Host Bus Adapter" to use the services of one
+ * or more tranport classes for performing transport specific
+ * services.  Transport specific services are things that the generic
+ * command layer doesn't want to know about (speed settings, line
+ * condidtioning, etc), but which the user might be interested in.
+ * Thus, the HBA's use the routines exported by the transport classes
+ * to perform these functions.  The transport classes export certain
+ * values to the user via sysfs using attribute containers.
+ *
+ * Note: because not every HBA will care about every transport
+ * attribute, there's a many to one relationship that goes like this:
+ *
+ * transport class<-----attribute container<----class device
+ *
+ * Usually the attribute container is per-HBA, but the design doesn't
+ * mandate that.  Although most of the services will be specific to
+ * the actual external storage connection used by the HBA, the generic
+ * transport class is framed entirely in terms of generic devices to
+ * allow it to be used by any physical HBA in the system.
+ */
+#include <linux/attribute_container.h>
+#include <linux/transport_class.h>
+
+/**
+ * transport_class_register - register an initial transport class
+ *
+ * @tclass:    a pointer to the transport class structure to be initialised
+ *
+ * The transport class contains an embedded class which is used to
+ * identify it.  The caller should initialise this structure with
+ * zeros and then generic class must have been initialised with the
+ * actual transport class unique name.  There's a macro
+ * DECLARE_TRANSPORT_CLASS() to do this (declared classes still must
+ * be registered).
+ *
+ * Returns 0 on success or error on failure.
+ */
+int transport_class_register(struct transport_class *tclass)
+{
+       return class_register(&tclass->class);
+}
+EXPORT_SYMBOL_GPL(transport_class_register);
+
+/**
+ * transport_class_unregister - unregister a previously registered class
+ *
+ * @tclass: The transport class to unregister
+ *
+ * Must be called prior to deallocating the memory for the transport
+ * class.
+ */
+void transport_class_unregister(struct transport_class *tclass)
+{
+       class_unregister(&tclass->class);
+}
+EXPORT_SYMBOL_GPL(transport_class_unregister);
+
+static int anon_transport_dummy_function(struct device *dev)
+{
+       /* do nothing */
+       return 0;
+}
+
+/**
+ * anon_transport_class_register - register an anonymous class
+ *
+ * @atc: The anon transport class to register
+ *
+ * The anonymous transport class contains both a transport class and a
+ * container.  The idea of an anonymous class is that it never
+ * actually has any device attributes associated with it (and thus
+ * saves on container storage).  So it can only be used for triggering
+ * events.  Use prezero and then use DECLARE_ANON_TRANSPORT_CLASS() to
+ * initialise the anon transport class storage.
+ */
+int anon_transport_class_register(struct anon_transport_class *atc)
+{
+       int error;
+       atc->container.class = &atc->tclass.class;
+       attribute_container_set_no_classdevs(&atc->container);
+       error = attribute_container_register(&atc->container);
+       if (error)
+               return error;
+       atc->tclass.setup = anon_transport_dummy_function;
+       atc->tclass.remove = anon_transport_dummy_function;
+       return 0;
+}
+EXPORT_SYMBOL_GPL(anon_transport_class_register);
+
+/**
+ * anon_transport_class_unregister - unregister an anon class
+ *
+ * @atc: Pointer to the anon transport class to unregister
+ *
+ * Must be called prior to deallocating the memory for the anon
+ * transport class.
+ */
+void anon_transport_class_unregister(struct anon_transport_class *atc)
+{
+       attribute_container_unregister(&atc->container);
+}
+EXPORT_SYMBOL_GPL(anon_transport_class_unregister);
+
+static int transport_setup_classdev(struct attribute_container *cont,
+                                   struct device *dev,
+                                   struct class_device *classdev)
+{
+       struct transport_class *tclass = class_to_transport_class(cont->class);
+
+       if (tclass->setup)
+               tclass->setup(dev);
+
+       return 0;
+}
+
+/**
+ * transport_setup_device - declare a new dev for transport class association
+ *                         but don't make it visible yet.
+ *
+ * @dev: the generic device representing the entity being added
+ *
+ * Usually, dev represents some component in the HBA system (either
+ * the HBA itself or a device remote across the HBA bus).  This
+ * routine is simply a trigger point to see if any set of transport
+ * classes wishes to associate with the added device.  This allocates
+ * storage for the class device and initialises it, but does not yet
+ * add it to the system or add attributes to it (you do this with
+ * transport_add_device).  If you have no need for a separate setup
+ * and add operations, use transport_register_device (see
+ * transport_class.h).
+ */
+
+void transport_setup_device(struct device *dev)
+{
+       attribute_container_add_device(dev, transport_setup_classdev);
+}
+EXPORT_SYMBOL_GPL(transport_setup_device);
+
+
+/**
+ * transport_add_device - declare a new dev for transport class association
+ *
+ * @dev: the generic device representing the entity being added
+ *
+ * Usually, dev represents some component in the HBA system (either
+ * the HBA itself or a device remote across the HBA bus).  This
+ * routine is simply a trigger point used to add the device to the
+ * system and register attributes for it.
+ */
+
+void transport_add_device(struct device *dev)
+{
+       attribute_container_device_trigger(dev,
+                          attribute_container_add_class_device_adapter);
+}
+EXPORT_SYMBOL_GPL(transport_add_device);
+
+static int transport_configure(struct attribute_container *cont,
+                              struct device *dev)
+{
+       struct transport_class *tclass = class_to_transport_class(cont->class);
+
+       if (tclass->configure)
+               tclass->configure(dev);
+
+       return 0;
+}
+
+/**
+ * transport_configure_device - configure an already set up device
+ *
+ * @dev: generic device representing device to be configured
+ *
+ * The idea of configure is simply to provide a point within the setup
+ * process to allow the transport class to extract information from a
+ * device after it has been setup.  This is used in SCSI because we
+ * have to have a setup device to begin using the HBA, but after we
+ * send the initial inquiry, we use configure to extract the device
+ * parameters.  The device need not have been added to be configured.
+ */
+void transport_configure_device(struct device *dev)
+{
+       attribute_container_trigger(dev, transport_configure);
+}
+EXPORT_SYMBOL_GPL(transport_configure_device);
+
+static int transport_remove_classdev(struct attribute_container *cont,
+                                    struct device *dev,
+                                    struct class_device *classdev)
+{
+       struct transport_class *tclass = class_to_transport_class(cont->class);
+
+       if (tclass->remove)
+               tclass->remove(dev);
+
+       if (tclass->remove != anon_transport_dummy_function)
+               attribute_container_class_device_del(classdev);
+
+       return 0;
+}
+
+
+/**
+ * transport_remove_device - remove the visibility of a device
+ *
+ * @dev: generic device to remove
+ *
+ * This call removes the visibility of the device (to the user from
+ * sysfs), but does not destroy it.  To eliminate a device entirely
+ * you must also call transport_destroy_device.  If you don't need to
+ * do remove and destroy as separate operations, use
+ * transport_unregister_device() (see transport_class.h) which will
+ * perform both calls for you.
+ */
+void transport_remove_device(struct device *dev)
+{
+       attribute_container_device_trigger(dev, transport_remove_classdev);
+}
+EXPORT_SYMBOL_GPL(transport_remove_device);
+
+static void transport_destroy_classdev(struct attribute_container *cont,
+                                     struct device *dev,
+                                     struct class_device *classdev)
+{
+       struct transport_class *tclass = class_to_transport_class(cont->class);
+
+       if (tclass->remove != anon_transport_dummy_function)
+               class_device_put(classdev);
+}
+
+
+/**
+ * transport_destroy_device - destroy a removed device
+ *
+ * @dev: device to eliminate from the transport class.
+ *
+ * This call triggers the elimination of storage associated with the
+ * transport classdev.  Note: all it really does is relinquish a
+ * reference to the classdev.  The memory will not be freed until the
+ * last reference goes to zero.  Note also that the classdev retains a
+ * reference count on dev, so dev too will remain for as long as the
+ * transport class device remains around.
+ */
+void transport_destroy_device(struct device *dev)
+{
+       attribute_container_remove_device(dev, transport_destroy_classdev);
+}
+EXPORT_SYMBOL_GPL(transport_destroy_device);
diff -urN linux/drivers/base/Makefile linux/drivers/base/Makefile
--- linux/drivers/base/Makefile 2004/04/12 20:23:28     1.19
+++ linux/drivers/base/Makefile 2005/02/07 02:54:43     1.20
@@ -2,7 +2,8 @@
 
 obj-y                  := core.o sys.o interface.o bus.o \
                           driver.o class.o class_simple.o platform.o \
-                          cpu.o firmware.o init.o map.o dmapool.o
+                          cpu.o firmware.o init.o map.o dmapool.o \
+                          attribute_container.o transport_class.o
 obj-y                  += power/
 obj-$(CONFIG_FW_LOADER)        += firmware_class.o
 obj-$(CONFIG_NUMA)     += node.o
diff -urN linux/drivers/base/cpu.c linux/drivers/base/cpu.c
--- linux/drivers/base/cpu.c    2005/01/13 14:05:50     1.15
+++ linux/drivers/base/cpu.c    2005/02/07 02:54:43     1.16
@@ -64,7 +64,6 @@
 
        return;
 }
-EXPORT_SYMBOL(unregister_cpu);
 #else /* ... !CONFIG_HOTPLUG_CPU */
 static inline void register_cpu_control(struct cpu *cpu)
 {
@@ -96,9 +95,6 @@
                register_cpu_control(cpu);
        return error;
 }
-#ifdef CONFIG_HOTPLUG_CPU
-EXPORT_SYMBOL(register_cpu);
-#endif
 
 
 
diff -urN linux/drivers/base/init.c linux/drivers/base/init.c
--- linux/drivers/base/init.c   2004/06/26 15:15:13     1.4
+++ linux/drivers/base/init.c   2005/02/07 02:54:43     1.5
@@ -17,7 +17,7 @@
 extern int platform_bus_init(void);
 extern int system_bus_init(void);
 extern int cpu_dev_init(void);
-
+extern int attribute_container_init(void);
 /**
  *     driver_init - initialize driver model.
  *
@@ -39,4 +39,5 @@
        platform_bus_init();
        system_bus_init();
        cpu_dev_init();
+       attribute_container_init();
 }
diff -urN linux/drivers/block/cfq-iosched.c linux/drivers/block/cfq-iosched.c
--- linux/drivers/block/cfq-iosched.c   2005/01/25 04:28:10     1.9
+++ linux/drivers/block/cfq-iosched.c   2005/02/07 02:54:43     1.10
@@ -1285,19 +1285,19 @@
 static void cfq_completed_request(request_queue_t *q, struct request *rq)
 {
        struct cfq_rq *crq = RQ_DATA(rq);
+       struct cfq_queue *cfqq;
 
        if (unlikely(!blk_fs_request(rq)))
                return;
 
-       if (crq->in_flight) {
-               struct cfq_queue *cfqq = crq->cfq_queue;
+       cfqq = crq->cfq_queue;
 
+       if (crq->in_flight) {
                WARN_ON(!cfqq->in_flight);
                cfqq->in_flight--;
-
-               cfq_account_completion(cfqq, crq);
        }
 
+       cfq_account_completion(cfqq, crq);
 }
 
 static struct request *
diff -urN linux/drivers/block/genhd.c linux/drivers/block/genhd.c
--- linux/drivers/block/genhd.c 2005/01/25 04:28:10     1.78
+++ linux/drivers/block/genhd.c 2005/02/07 02:54:43     1.79
@@ -300,7 +300,7 @@
        return NULL;
 }
 
-int __init device_init(void)
+static int __init genhd_device_init(void)
 {
        bdev_map = kobj_map_init(base_probe, &block_subsys);
        blk_dev_init();
@@ -308,7 +308,7 @@
        return 0;
 }
 
-subsys_initcall(device_init);
+subsys_initcall(genhd_device_init);
 
 
 
diff -urN linux/drivers/block/aoe/aoeblk.c linux/drivers/block/aoe/aoeblk.c
--- linux/drivers/block/aoe/aoeblk.c    2005/01/25 04:28:11     1.2
+++ linux/drivers/block/aoe/aoeblk.c    2005/02/07 02:54:43     1.3
@@ -245,7 +245,7 @@
                d->fw_ver, (long long)d->ssize);
 }
 
-void __exit
+void
 aoeblk_exit(void)
 {
        kmem_cache_destroy(buf_pool_cache);
@@ -254,19 +254,12 @@
 int __init
 aoeblk_init(void)
 {
-       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");
-               return n;
-       }
        return 0;
 }
 
diff -urN linux/drivers/bluetooth/bt3c_cs.c linux/drivers/bluetooth/bt3c_cs.c
--- linux/drivers/bluetooth/bt3c_cs.c   2005/01/25 04:28:11     1.21
+++ linux/drivers/bluetooth/bt3c_cs.c   2005/02/07 02:54:43     1.22
@@ -771,7 +771,7 @@
 
 static void bt3c_config(dev_link_t *link)
 {
-       static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
+       static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
        client_handle_t handle = link->handle;
        bt3c_info_t *info = link->priv;
        tuple_t tuple;
diff -urN linux/drivers/bluetooth/btuart_cs.c 
linux/drivers/bluetooth/btuart_cs.c
--- linux/drivers/bluetooth/btuart_cs.c 2005/01/25 04:28:11     1.13
+++ linux/drivers/bluetooth/btuart_cs.c 2005/02/07 02:54:43     1.14
@@ -690,7 +690,7 @@
 
 static void btuart_config(dev_link_t *link)
 {
-       static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
+       static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
        client_handle_t handle = link->handle;
        btuart_info_t *info = link->priv;
        tuple_t tuple;
diff -urN linux/drivers/bluetooth/hci_usb.c linux/drivers/bluetooth/hci_usb.c
--- linux/drivers/bluetooth/hci_usb.c   2005/01/25 04:28:11     1.38
+++ linux/drivers/bluetooth/hci_usb.c   2005/02/07 02:54:43     1.39
@@ -113,12 +113,15 @@
        /* ISSC Bluetooth Adapter v3.1 */
        { USB_DEVICE(0x1131, 0x1001), .driver_info = HCI_RESET },
 
+       /* RTX Telecom based adapter with buggy SCO support */
+       { USB_DEVICE(0x0400, 0x0807), .driver_info = HCI_BROKEN_ISOC },
+
        /* Digianswer devices */
        { USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER },
        { USB_DEVICE(0x08fd, 0x0002), .driver_info = HCI_IGNORE },
 
-       /* RTX Telecom based adapter with buggy SCO support */
-       { USB_DEVICE(0x0400, 0x0807), .driver_info = HCI_BROKEN_ISOC },
+       /* CSR BlueCore Bluetooth Sniffer */
+       { USB_DEVICE(0x0a12, 0x0002), .driver_info = HCI_SNIFFER },
 
        { }     /* Terminating entry */
 };
@@ -969,6 +972,11 @@
        if (reset || id->driver_info & HCI_RESET)
                set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks);
 
+       if (id->driver_info & HCI_SNIFFER) {
+               if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x997)
+                       set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
+       }
+
        if (hci_register_dev(hdev) < 0) {
                BT_ERR("Can't register HCI device");
                hci_free_dev(hdev);
diff -urN linux/drivers/bluetooth/hci_usb.h linux/drivers/bluetooth/hci_usb.h
--- linux/drivers/bluetooth/hci_usb.h   2004/11/15 11:49:24     1.8
+++ linux/drivers/bluetooth/hci_usb.h   2005/02/07 02:54:43     1.9
@@ -31,7 +31,8 @@
 #define HCI_IGNORE             0x01
 #define HCI_RESET              0x02
 #define HCI_DIGIANSWER         0x04
-#define HCI_BROKEN_ISOC                0x08
+#define HCI_SNIFFER            0x08
+#define HCI_BROKEN_ISOC                0x10
 
 #define HCI_MAX_IFACE_NUM      3
 
diff -urN linux/drivers/cdrom/aztcd.c linux/drivers/cdrom/aztcd.c
--- linux/drivers/cdrom/aztcd.c 2005/01/25 04:28:12     1.49
+++ linux/drivers/cdrom/aztcd.c 2005/02/07 02:54:43     1.50
@@ -165,7 +165,6 @@
                         Torben Mathiasen <tmm@image.dk>
 */
 
-#include <linux/version.h>
 #include <linux/blkdev.h>
 #include "aztcd.h"
 
@@ -1708,8 +1707,8 @@
        printk(KERN_INFO "aztcd: (C) 1994-98 W.Zimmermann\n");
        if (azt_port == -1) {
                printk
-                   ("aztcd: KernelVersion=%s DriverVersion=%s For 
IDE/ATAPI-drives use ide-cd.c\n",
-                    UTS_RELEASE, AZT_VERSION);
+                   ("aztcd: DriverVersion=%s For IDE/ATAPI-drives use 
ide-cd.c\n",
+                    AZT_VERSION);
        } else
                printk
                    ("aztcd: DriverVersion=%s BaseAddress=0x%x  For 
IDE/ATAPI-drives use ide-cd.c\n",
diff -urN linux/drivers/cdrom/isp16.c linux/drivers/cdrom/isp16.c
--- linux/drivers/cdrom/isp16.c 2005/01/13 14:05:52     1.8
+++ linux/drivers/cdrom/isp16.c 2005/02/07 02:54:43     1.9
@@ -77,10 +77,6 @@
 module_param(isp16_cdrom_dma, int, 0);
 module_param(isp16_cdrom_type, charp, 0);
 
-#ifdef MODULE
-void isp16_exit(void);
-#endif
-
 #define ISP16_IN(p) (outb(isp16_ctrl,ISP16_CTRL_PORT), inb(p))
 #define ISP16_OUT(p,b) (outb(isp16_ctrl,ISP16_CTRL_PORT), outb(b,p))
 
@@ -112,7 +108,7 @@
  *  ISP16 initialisation.
  *
  */
-int __init isp16_init(void)
+static int __init isp16_init(void)
 {
        u_char expected_drive;
 
@@ -366,15 +362,13 @@
        return 0;
 }
 
-void __exit isp16_exit(void)
+static void __exit isp16_exit(void)
 {
        release_region(ISP16_IO_BASE, ISP16_IO_SIZE);
        printk(KERN_INFO "ISP16: module released.\n");
 }
 
-#ifdef MODULE
 module_init(isp16_init);
-#endif
 module_exit(isp16_exit);
 
 MODULE_LICENSE("GPL");
diff -urN linux/drivers/cdrom/isp16.h linux/drivers/cdrom/isp16.h
--- linux/drivers/cdrom/isp16.h 2000/02/04 07:40:32     1.2
+++ linux/drivers/cdrom/isp16.h 2005/02/07 02:54:43     1.3
@@ -70,5 +70,3 @@
 
 #define ISP16_IO_BASE 0xF8D
 #define ISP16_IO_SIZE 5  /* ports used from 0xF8D up to 0xF91 */
-
-int isp16_init(void);
diff -urN linux/drivers/cdrom/mcdx.c linux/drivers/cdrom/mcdx.c
--- linux/drivers/cdrom/mcdx.c  2005/01/25 04:28:12     1.44
+++ linux/drivers/cdrom/mcdx.c  2005/02/07 02:54:43     1.45
@@ -56,7 +56,6 @@
     = "$Id: mcdx.c,v 1.21 1997/01/26 07:12:59 davem Exp $";
 #endif
 
-#include <linux/version.h>
 #include <linux/module.h>
 
 #include <linux/errno.h>
@@ -1265,11 +1264,7 @@
 int __init mcdx_init(void)
 {
        int drive;
-#ifdef MODULE
-       xwarn("Version 2.14(hs) for " UTS_RELEASE "\n");
-#else
        xwarn("Version 2.14(hs) \n");
-#endif
 
        xwarn("$Id: mcdx.c,v 1.21 1997/01/26 07:12:59 davem Exp $\n");
 
diff -urN linux/drivers/cdrom/viocd.c linux/drivers/cdrom/viocd.c
--- linux/drivers/cdrom/viocd.c 2004/12/04 18:16:02     1.7
+++ linux/drivers/cdrom/viocd.c 2005/02/07 02:54:43     1.8
@@ -765,8 +765,6 @@
        vio_setHandler(viomajorsubtype_cdio, vio_handle_cd_event);
 
        get_viocd_info();
-       if (viocd_numdev == 0)
-               goto out_undo_vio;
 
        spin_lock_init(&viocd_reqlock);
 
@@ -786,7 +784,6 @@
        dma_free_coherent(iSeries_vio_dev,
                        sizeof(*viocd_unitinfo) * VIOCD_MAX_CD,
                        viocd_unitinfo, unitinfo_dmaaddr);
-out_undo_vio:
        vio_clearHandler(viomajorsubtype_cdio);
        viopath_close(viopath_hostLp, viomajorsubtype_cdio, MAX_CD_REQ + 2);
 out_unregister:
diff -urN linux/drivers/char/n_tty.c linux/drivers/char/n_tty.c
--- linux/drivers/char/n_tty.c  2005/01/13 14:05:52     1.45
+++ linux/drivers/char/n_tty.c  2005/02/07 02:54:43     1.46
@@ -1143,13 +1143,13 @@
 
 {
        int retval;
-       ssize_t n;
+       size_t n;
        unsigned long flags;
 
        retval = 0;
        spin_lock_irqsave(&tty->read_lock, flags);
        n = min(tty->read_cnt, N_TTY_BUF_SIZE - tty->read_tail);
-       n = min((ssize_t)*nr, n);
+       n = min(*nr, n);
        spin_unlock_irqrestore(&tty->read_lock, flags);
        if (n) {
                mb();
diff -urN linux/drivers/char/random.c linux/drivers/char/random.c
--- linux/drivers/char/random.c 2005/01/25 04:28:12     1.62
+++ linux/drivers/char/random.c 2005/02/07 02:54:43     1.63
@@ -1322,7 +1322,7 @@
 
                bytes=extract_entropy(random_state, tmp, bytes,
                                      EXTRACT_ENTROPY_LIMIT);
-               add_entropy_words(r, tmp, bytes);
+               add_entropy_words(r, tmp, (bytes + 3) / 4);
                credit_entropy_store(r, bytes*8);
        }
 }
diff -urN linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
--- linux/drivers/char/tty_io.c 2005/01/13 14:05:53     1.128
+++ linux/drivers/char/tty_io.c 2005/02/07 02:54:43     1.129
@@ -1156,8 +1156,8 @@
        int i = index + driver->name_base;
        /* ->name is initialized to "ttyp", but "tty" is expected */
        sprintf(p, "%s%c%x",
-                       driver->subtype == PTY_TYPE_SLAVE ? "tty" : 
driver->name,
-                       ptychar[i >> 4 & 0xf], i & 0xf);
+               driver->subtype == PTY_TYPE_SLAVE ? "pty" : driver->name,
+               ptychar[i >> 4 & 0xf], i & 0xf);
 }
 
 static inline void tty_line_name(struct tty_driver *driver, int index, char *p)
diff -urN linux/drivers/char/drm/drm_pci.c linux/drivers/char/drm/drm_pci.c
--- linux/drivers/char/drm/drm_pci.c    1970/01/01 00:00:00
+++ linux/drivers/char/drm/drm_pci.c    Mon Feb  7 02:54:44 2005        1.1
@@ -0,0 +1,140 @@
+/* drm_pci.h -- PCI DMA memory management wrappers for DRM -*- linux-c -*- */
+/**
+ * \file drm_pci.c
+ * \brief Functions and ioctls to manage PCI memory
+ *
+ * \warning These interfaces aren't stable yet.
+ *
+ * \todo Implement the remaining ioctl's for the PCI pools.
+ * \todo The wrappers here are so thin that they would be better off inlined..
+ *
+ * \author Jose Fonseca <jrfonseca@tungstengraphics.com>
+ * \author Leif Delgass <ldelgass@retinalburn.net>
+ */
+
+/*
+ * Copyright 2003 Jos�Fonseca.
+ * Copyright 2003 Leif Delgass.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <linux/pci.h>
+#include "drmP.h"
+
+/**********************************************************************/
+/** \name PCI memory */
+/*@{*/
+
+/**
+ * \brief Allocate a PCI consistent memory block, for DMA.
+ */
+void *drm_pci_alloc(drm_device_t * dev, size_t size, size_t align,
+                   dma_addr_t maxaddr, dma_addr_t * busaddr)
+{
+       void *address;
+#if DRM_DEBUG_MEMORY
+       int area = DRM_MEM_DMA;
+
+       spin_lock(&drm_mem_lock);
+       if ((drm_ram_used >> PAGE_SHIFT)
+           > (DRM_RAM_PERCENT * drm_ram_available) / 100) {
+               spin_unlock(&drm_mem_lock);
+               return 0;
+       }
+       spin_unlock(&drm_mem_lock);
+#endif
+
+       /* pci_alloc_consistent only guarantees alignment to the smallest
+        * PAGE_SIZE order which is greater than or equal to the requested size.
+        * Return NULL here for now to make sure nobody tries for larger 
alignment
+        */
+       if (align > size)
+               return NULL;
+
+       if (pci_set_dma_mask(dev->pdev, maxaddr) != 0) {
+               DRM_ERROR("Setting pci dma mask failed\n");
+               return NULL;
+       }
+
+       address = pci_alloc_consistent(dev->pdev, size, busaddr);
+
+#if DRM_DEBUG_MEMORY
+       if (address == NULL) {
+               spin_lock(&drm_mem_lock);
+               ++drm_mem_stats[area].fail_count;
+               spin_unlock(&drm_mem_lock);
+               return NULL;
+       }
+
+       spin_lock(&drm_mem_lock);
+       ++drm_mem_stats[area].succeed_count;
+       drm_mem_stats[area].bytes_allocated += size;
+       drm_ram_used += size;
+       spin_unlock(&drm_mem_lock);
+#else
+       if (address == NULL)
+               return NULL;
+#endif
+
+       memset(address, 0, size);
+
+       return address;
+}
+EXPORT_SYMBOL(drm_pci_alloc);
+
+/**
+ * \brief Free a PCI consistent memory block.
+ */
+void
+drm_pci_free(drm_device_t * dev, size_t size, void *vaddr, dma_addr_t busaddr)
+{
+#if DRM_DEBUG_MEMORY
+       int area = DRM_MEM_DMA;
+       int alloc_count;
+       int free_count;
+#endif
+
+       if (!vaddr) {
+#if DRM_DEBUG_MEMORY
+               DRM_MEM_ERROR(area, "Attempt to free address 0\n");
+#endif
+       } else {
+               pci_free_consistent(dev->pdev, size, vaddr, busaddr);
+       }
+
+#if DRM_DEBUG_MEMORY
+       spin_lock(&drm_mem_lock);
+       free_count = ++drm_mem_stats[area].free_count;
+       alloc_count = drm_mem_stats[area].succeed_count;
+       drm_mem_stats[area].bytes_freed += size;
+       drm_ram_used -= size;
+       spin_unlock(&drm_mem_lock);
+       if (free_count > alloc_count) {
+               DRM_MEM_ERROR(area,
+                             "Excess frees: %d frees, %d allocs\n",
+                             free_count, alloc_count);
+       }
+#endif
+
+}
+EXPORT_SYMBOL(drm_pci_free);
+
+/*@}*/
diff -urN linux/drivers/char/drm/drm_sysfs.c linux/drivers/char/drm/drm_sysfs.c
--- linux/drivers/char/drm/drm_sysfs.c  1970/01/01 00:00:00
+++ linux/drivers/char/drm/drm_sysfs.c  Mon Feb  7 02:54:44 2005        1.1
@@ -0,0 +1,208 @@
+/*
+ * drm_sysfs.c - Modifications to drm_sysfs_class.c to support
+ *               extra sysfs attribute from DRM. Normal drm_sysfs_class
+ *               does not allow adding attributes.
+ *
+ * Copyright (c) 2004 Jon Smirl <jonsmirl@gmail.com>
+ * Copyright (c) 2003-2004 Greg Kroah-Hartman <greg@kroah.com>
+ * Copyright (c) 2003-2004 IBM Corp.
+ *
+ * This file is released under the GPLv2
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/device.h>
+#include <linux/kdev_t.h>
+#include <linux/err.h>
+
+#include "drm_core.h"
+
+struct drm_sysfs_class {
+       struct class_device_attribute attr;
+       struct class class;
+};
+#define to_drm_sysfs_class(d) container_of(d, struct drm_sysfs_class, class)
+
+struct simple_dev {
+       struct list_head node;
+       dev_t dev;
+       struct class_device class_dev;
+};
+#define to_simple_dev(d) container_of(d, struct simple_dev, class_dev)
+
+static LIST_HEAD(simple_dev_list);
+static DEFINE_SPINLOCK(simple_dev_list_lock);
+
+static void release_simple_dev(struct class_device *class_dev)
+{
+       struct simple_dev *s_dev = to_simple_dev(class_dev);
+       kfree(s_dev);
+}
+
+static ssize_t show_dev(struct class_device *class_dev, char *buf)
+{
+       struct simple_dev *s_dev = to_simple_dev(class_dev);
+       return print_dev_t(buf, s_dev->dev);
+}
+
+static void drm_sysfs_class_release(struct class *class)
+{
+       struct drm_sysfs_class *cs = to_drm_sysfs_class(class);
+       kfree(cs);
+}
+
+/* Display the version of drm_core. This doesn't work right in current design 
*/
+static ssize_t version_show(struct class *dev, char *buf)
+{
+       return sprintf(buf, "%s %d.%d.%d %s\n", DRIVER_NAME, DRIVER_MAJOR,
+                      DRIVER_MINOR, DRIVER_PATCHLEVEL, DRIVER_DATE);
+}
+
+static CLASS_ATTR(version, S_IRUGO, version_show, NULL);
+
+/**
+ * drm_sysfs_create - create a struct drm_sysfs_class structure
+ * @owner: pointer to the module that is to "own" this struct drm_sysfs_class
+ * @name: pointer to a string for the name of this class.
+ *
+ * This is used to create a struct drm_sysfs_class pointer that can then be 
used
+ * in calls to drm_sysfs_device_add().
+ *
+ * Note, the pointer created here is to be destroyed when finished by making a
+ * call to drm_sysfs_destroy().
+ */
+struct drm_sysfs_class *drm_sysfs_create(struct module *owner, char *name)
+{
+       struct drm_sysfs_class *cs;
+       int retval;
+
+       cs = kmalloc(sizeof(*cs), GFP_KERNEL);
+       if (!cs) {
+               retval = -ENOMEM;
+               goto error;
+       }
+       memset(cs, 0x00, sizeof(*cs));
+
+       cs->class.name = name;
+       cs->class.class_release = drm_sysfs_class_release;
+       cs->class.release = release_simple_dev;
+
+       cs->attr.attr.name = "dev";
+       cs->attr.attr.mode = S_IRUGO;
+       cs->attr.attr.owner = owner;
+       cs->attr.show = show_dev;
+       cs->attr.store = NULL;
+
+       retval = class_register(&cs->class);
+       if (retval)
+               goto error;
+       class_create_file(&cs->class, &class_attr_version);
+
+       return cs;
+
+      error:
+       kfree(cs);
+       return ERR_PTR(retval);
+}
+
+/**
+ * drm_sysfs_destroy - destroys a struct drm_sysfs_class structure
+ * @cs: pointer to the struct drm_sysfs_class that is to be destroyed
+ *
+ * Note, the pointer to be destroyed must have been created with a call to
+ * drm_sysfs_create().
+ */
+void drm_sysfs_destroy(struct drm_sysfs_class *cs)
+{
+       if ((cs == NULL) || (IS_ERR(cs)))
+               return;
+
+       class_unregister(&cs->class);
+}
+
+/**
+ * drm_sysfs_device_add - adds a class device to sysfs for a character driver
+ * @cs: pointer to the struct drm_sysfs_class that this device should be 
registered to.
+ * @dev: the dev_t for the device to be added.
+ * @device: a pointer to a struct device that is assiociated with this class 
device.
+ * @fmt: string for the class device's name
+ *
+ * A struct class_device will be created in sysfs, registered to the specified
+ * class.  A "dev" file will be created, showing the dev_t for the device.  The
+ * pointer to the struct class_device will be returned from the call.  Any 
further
+ * sysfs files that might be required can be created using this pointer.
+ * Note: the struct drm_sysfs_class passed to this function must have 
previously been
+ * created with a call to drm_sysfs_create().
+ */
+struct class_device *drm_sysfs_device_add(struct drm_sysfs_class *cs, dev_t 
dev,
+                                         struct device *device,
+                                         const char *fmt, ...)
+{
+       va_list args;
+       struct simple_dev *s_dev = NULL;
+       int retval;
+
+       if ((cs == NULL) || (IS_ERR(cs))) {
+               retval = -ENODEV;
+               goto error;
+       }
+
+       s_dev = kmalloc(sizeof(*s_dev), GFP_KERNEL);
+       if (!s_dev) {
+               retval = -ENOMEM;
+               goto error;
+       }
+       memset(s_dev, 0x00, sizeof(*s_dev));
+
+       s_dev->dev = dev;
+       s_dev->class_dev.dev = device;
+       s_dev->class_dev.class = &cs->class;
+
+       va_start(args, fmt);
+       vsnprintf(s_dev->class_dev.class_id, BUS_ID_SIZE, fmt, args);
+       va_end(args);
+       retval = class_device_register(&s_dev->class_dev);
+       if (retval)
+               goto error;
+
+       class_device_create_file(&s_dev->class_dev, &cs->attr);
+
+       spin_lock(&simple_dev_list_lock);
+       list_add(&s_dev->node, &simple_dev_list);
+       spin_unlock(&simple_dev_list_lock);
+
+       return &s_dev->class_dev;
+
+      error:
+       kfree(s_dev);
+       return ERR_PTR(retval);
+}
+
+/**
+ * drm_sysfs_device_remove - removes a class device that was created with 
drm_sysfs_device_add()
+ * @dev: the dev_t of the device that was previously registered.
+ *
+ * This call unregisters and cleans up a class device that was created with a
+ * call to drm_sysfs_device_add()
+ */
+void drm_sysfs_device_remove(dev_t dev)
+{
+       struct simple_dev *s_dev = NULL;
+       int found = 0;
+
+       spin_lock(&simple_dev_list_lock);
+       list_for_each_entry(s_dev, &simple_dev_list, node) {
+               if (s_dev->dev == dev) {
+                       found = 1;
+                       break;
+               }
+       }
+       if (found) {
+               list_del(&s_dev->node);
+               spin_unlock(&simple_dev_list_lock);
+               class_device_unregister(&s_dev->class_dev);
+       } else {
+               spin_unlock(&simple_dev_list_lock);
+       }
+}
diff -urN linux/drivers/char/drm/Makefile linux/drivers/char/drm/Makefile
--- linux/drivers/char/drm/Makefile     2005/01/13 14:05:54     1.22
+++ linux/drivers/char/drm/Makefile     2005/02/07 02:54:44     1.23
@@ -5,7 +5,8 @@
 drm-objs    := drm_auth.o drm_bufs.o drm_context.o drm_dma.o drm_drawable.o \
                drm_drv.o drm_fops.o drm_init.o drm_ioctl.o drm_irq.o \
                drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
-               drm_agpsupport.o drm_scatter.o ati_pcigart.o
+               drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
+               drm_sysfs.o
 
 gamma-objs  := gamma_drv.o gamma_dma.o
 tdfx-objs   := tdfx_drv.o
diff -urN linux/drivers/char/drm/drmP.h linux/drivers/char/drm/drmP.h
--- linux/drivers/char/drm/drmP.h       2005/01/13 14:05:54     1.37
+++ linux/drivers/char/drm/drmP.h       2005/02/07 02:54:44     1.38
@@ -557,7 +557,7 @@
 struct drm_device;
 
 struct drm_driver {
-       int (*preinit)(struct drm_device *);
+       int (*preinit)(struct drm_device *, unsigned long flags);
        void (*prerelease)(struct drm_device *, struct file *filp);
        void (*pretakedown)(struct drm_device *);
        int (*postcleanup)(struct drm_device *);
@@ -960,7 +960,7 @@
 extern unsigned int   drm_debug;
 extern unsigned int   drm_cards_limit;
 extern drm_minor_t    *drm_minors;
-extern struct class_simple *drm_class;
+extern struct drm_sysfs_class *drm_class;
 extern struct proc_dir_entry *drm_proc_root;
 
                                /* Proc support (drm_proc.h) */
@@ -987,6 +987,24 @@
                                               unsigned long addr,
                                               dma_addr_t bus_addr);
 
+extern void *drm_pci_alloc(drm_device_t * dev, size_t size,
+                          size_t align, dma_addr_t maxaddr,
+                          dma_addr_t * busaddr);
+
+extern void drm_pci_free(drm_device_t * dev, size_t size,
+                        void *vaddr, dma_addr_t busaddr);
+
+                              /* sysfs support (drm_sysfs.c) */
+struct drm_sysfs_class;
+extern struct drm_sysfs_class *drm_sysfs_create(struct module *owner,
+                                               char *name);
+extern void drm_sysfs_destroy(struct drm_sysfs_class *cs);
+extern struct class_device *drm_sysfs_device_add(struct drm_sysfs_class *cs,
+                                                dev_t dev,
+                                                struct device *device,
+                                                const char *fmt, ...);
+extern void drm_sysfs_device_remove(dev_t dev);
+
 
 /* Inline replacements for DRM_IOREMAP macros */
 static __inline__ void drm_core_ioremap(struct drm_map *map, struct drm_device 
*dev)
diff -urN linux/drivers/char/drm/drm_drv.c linux/drivers/char/drm/drm_drv.c
--- linux/drivers/char/drm/drm_drv.c    2005/01/13 14:05:54     1.1
+++ linux/drivers/char/drm/drm_drv.c    2005/02/07 02:54:44     1.2
@@ -403,7 +403,7 @@
        if (register_chrdev(DRM_MAJOR, "drm", &drm_stub_fops))
                goto err_p1;
        
-       drm_class = class_simple_create(THIS_MODULE, "drm");
+       drm_class = drm_sysfs_create(THIS_MODULE, "drm");
        if (IS_ERR(drm_class)) {
                printk (KERN_ERR "DRM: Error creating drm class.\n");
                ret = PTR_ERR(drm_class);
@@ -426,7 +426,7 @@
                );
        return 0;
 err_p3:
-       class_simple_destroy(drm_class);
+       drm_sysfs_destroy(drm_class);
 err_p2:
        unregister_chrdev(DRM_MAJOR, "drm");
        drm_free(drm_minors, sizeof(*drm_minors) * drm_cards_limit, 
DRM_MEM_STUB);
@@ -437,7 +437,7 @@
 static void __exit drm_core_exit (void)
 {
        remove_proc_entry("dri", NULL);
-       class_simple_destroy(drm_class);
+       drm_sysfs_destroy(drm_class);
 
        unregister_chrdev(DRM_MAJOR, "drm");
 
diff -urN linux/drivers/char/drm/drm_ioctl.c linux/drivers/char/drm/drm_ioctl.c
--- linux/drivers/char/drm/drm_ioctl.c  2005/01/13 14:05:54     1.1
+++ linux/drivers/char/drm/drm_ioctl.c  2005/02/07 02:54:44     1.2
@@ -304,6 +304,17 @@
        return 0;
 }
 
+/**
+ * Setversion ioctl.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument, pointing to a drm_lock structure.
+ * \return zero on success or negative number on failure.
+ *
+ * Sets the requested interface version
+ */
 int drm_setversion(DRM_IOCTL_ARGS)
 {
        DRM_DEVICE;
@@ -311,13 +322,15 @@
        drm_set_version_t retv;
        int if_version;
        drm_set_version_t __user *argp = (void __user *)data;
+       drm_version_t version;
 
        DRM_COPY_FROM_USER_IOCTL(sv, argp, sizeof(sv));
 
+       dev->driver->version(&version);
        retv.drm_di_major = DRM_IF_MAJOR;
        retv.drm_di_minor = DRM_IF_MINOR;
-       retv.drm_dd_major = DRIVER_MAJOR;
-       retv.drm_dd_minor = DRIVER_MINOR;
+       retv.drm_dd_major = version.version_major;
+       retv.drm_dd_minor = version.version_minor;
 
        DRM_COPY_TO_USER_IOCTL(argp, retv, sizeof(sv));
 
@@ -336,8 +349,8 @@
        }
 
        if (sv.drm_dd_major != -1) {
-               if (sv.drm_dd_major != DRIVER_MAJOR ||
-                   sv.drm_dd_minor < 0 || sv.drm_dd_minor > DRIVER_MINOR)
+               if (sv.drm_dd_major != version.version_major ||
+                   sv.drm_dd_minor < 0 || sv.drm_dd_minor > 
version.version_minor)
                        return EINVAL;
 
                if (dev->driver->set_version)
diff -urN linux/drivers/char/drm/drm_memory.h 
linux/drivers/char/drm/drm_memory.h
--- linux/drivers/char/drm/drm_memory.h 2005/01/13 14:05:54     1.9
+++ linux/drivers/char/drm/drm_memory.h 2005/02/07 02:54:44     1.10
@@ -57,8 +57,6 @@
 # endif
 #endif
 
-#include <asm/tlbflush.h>
-
 /*
  * Find the drm_map that covers the range [offset, offset+size).
  */
diff -urN linux/drivers/char/drm/drm_pciids.h 
linux/drivers/char/drm/drm_pciids.h
--- linux/drivers/char/drm/drm_pciids.h 2004/09/19 12:30:09     1.2
+++ linux/drivers/char/drm/drm_pciids.h 2005/02/07 02:54:44     1.3
@@ -3,64 +3,75 @@
    Please contact dri-devel@lists.sf.net to add new cards to this list
 */
 #define radeon_PCI_IDS \
-       {0x1002, 0x4136, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4137, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4237, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4242, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4242, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4336, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4337, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4437, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4964, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4965, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4966, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4967, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4C57, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4C58, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4C59, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4C5A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4C64, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4C65, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4C66, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x4C67, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5144, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5145, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5146, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5147, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5148, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x514A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x514B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x514C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x514D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x514E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x514F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5157, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5158, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5159, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x515A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5168, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5169, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x516A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x516B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x516C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5834, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5835, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5836, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5837, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5960, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5961, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5962, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5963, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5964, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5968, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x596A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x596B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5c61, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5c62, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5c63, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-       {0x1002, 0x5c64, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+       {0x1002, 0x4136, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS100|CHIP_IS_IGP}, 
\
+       {0x1002, 0x4137, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS200|CHIP_IS_IGP}, 
\
+       {0x1002, 0x4144, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
+       {0x1002, 0x4145, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
+       {0x1002, 0x4146, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
+       {0x1002, 0x4147, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
+       {0x1002, 0x4150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV350}, \
+       {0x1002, 0x4151, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV350}, \
+       {0x1002, 0x4152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV350}, \
+       {0x1002, 0x4153, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV350}, \
+       {0x1002, 0x4154, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV350}, \
+       {0x1002, 0x4156, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV350}, \
+       {0x1002, 0x4237, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS250|CHIP_IS_IGP}, 
\
+       {0x1002, 0x4242, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x4243, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x4336, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_RS100|CHIP_IS_IGP|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x4337, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_RS200|CHIP_IS_IGP|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x4437, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_RS250|CHIP_IS_IGP|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x4964, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R250}, \
+       {0x1002, 0x4965, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R250}, \
+       {0x1002, 0x4966, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R250}, \
+       {0x1002, 0x4967, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R250}, \
+       {0x1002, 0x4C57, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_RV200|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x4C58, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_RV200|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x4C59, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_RV100|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x4C5A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_RV100|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x4C64, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_R250|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x4C65, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_R250|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x4C66, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_R250|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x4C67, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_R250|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x4E50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_RV350|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x5144, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_R100|CHIP_SINGLE_CRTC}, \
+       {0x1002, 0x5145, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_R100|CHIP_SINGLE_CRTC}, \
+       {0x1002, 0x5146, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_R100|CHIP_SINGLE_CRTC}, \
+       {0x1002, 0x5147, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_R100|CHIP_SINGLE_CRTC}, \
+       {0x1002, 0x5148, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x5149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x514A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x514B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x514C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x514D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x514E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x514F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x5157, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV200}, \
+       {0x1002, 0x5158, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV200}, \
+       {0x1002, 0x5159, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \
+       {0x1002, 0x515A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \
+       {0x1002, 0x5168, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x5169, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x516A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x516B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x516C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \
+       {0x1002, 0x5834, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS300|CHIP_IS_IGP}, 
\
+       {0x1002, 0x5835, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_RS300|CHIP_IS_IGP|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x5836, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS300|CHIP_IS_IGP}, 
\
+       {0x1002, 0x5837, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS300|CHIP_IS_IGP}, 
\
+       {0x1002, 0x5960, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
+       {0x1002, 0x5961, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
+       {0x1002, 0x5962, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
+       {0x1002, 0x5963, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
+       {0x1002, 0x5964, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
+       {0x1002, 0x5968, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
+       {0x1002, 0x5969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
+       {0x1002, 0x596A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
+       {0x1002, 0x596B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
+       {0x1002, 0x5c61, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_RV280|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x5c62, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
+       {0x1002, 0x5c63, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
CHIP_RV280|CHIP_IS_MOBILITY}, \
+       {0x1002, 0x5c64, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
        {0, 0, 0}
 
 #define r128_PCI_IDS \
@@ -207,5 +218,6 @@
        {0x8086, 0x3582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
        {0x8086, 0x2572, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
        {0x8086, 0x2582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
+       {0x8086, 0x2982, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
        {0, 0, 0}
 
diff -urN linux/drivers/char/drm/drm_stub.c linux/drivers/char/drm/drm_stub.c
--- linux/drivers/char/drm/drm_stub.c   2005/01/13 14:05:54     1.1
+++ linux/drivers/char/drm/drm_stub.c   2005/02/07 02:54:44     1.2
@@ -50,7 +50,7 @@
 module_param_named(debug, drm_debug, int, 0666);
 
 drm_minor_t *drm_minors;
-struct class_simple *drm_class;
+struct drm_sysfs_class *drm_class;
 struct proc_dir_entry *drm_proc_root;
 
 static int drm_fill_in_dev(drm_device_t *dev, struct pci_dev *pdev, const 
struct pci_device_id *ent, struct drm_driver *driver)
@@ -87,7 +87,7 @@
        dev->driver = driver;
        
        if (dev->driver->preinit)
-               if ((retcode = dev->driver->preinit(dev)))
+               if ((retcode = dev->driver->preinit(dev, ent->driver_data)))
                        goto error_out_unreg;
 
        if (drm_core_has_AGP(dev)) {
@@ -205,10 +205,13 @@
                        }
 
                        
-                       dev_class = class_simple_device_add(drm_class, 
-                                                           MKDEV(DRM_MAJOR, 
minor), &pdev->dev, "card%d", minor);
+                       dev_class = drm_sysfs_device_add(drm_class,
+                                                        MKDEV(DRM_MAJOR,
+                                                              minor),
+                                                        &pdev->dev,
+                                                        "card%d", minor);
                        if (IS_ERR(dev_class)) {
-                               printk(KERN_ERR "DRM: Error 
class_simple_device_add.\n");
+                               printk(KERN_ERR "DRM: Error 
sysfs_device_add.\n");
                                ret = PTR_ERR(dev_class);
                                goto err_g2;
                        }
@@ -246,7 +249,7 @@
        DRM_DEBUG("release minor %d\n", dev->minor);
        
        drm_proc_cleanup(dev->minor, drm_proc_root, minors->dev_root);
-       class_simple_device_remove(MKDEV(DRM_MAJOR, dev->minor));
+       drm_sysfs_device_remove(MKDEV(DRM_MAJOR, dev->minor));
        
        *minors = (drm_minor_t){.dev = NULL, .type = DRM_MINOR_FREE};
        drm_free(dev, sizeof(*dev), DRM_MEM_STUB);
diff -urN linux/drivers/char/drm/drm_vm.c linux/drivers/char/drm/drm_vm.c
--- linux/drivers/char/drm/drm_vm.c     2005/01/13 14:05:54     1.1
+++ linux/drivers/char/drm/drm_vm.c     2005/02/07 02:54:44     1.2
@@ -34,6 +34,9 @@
  */
 
 #include "drmP.h"
+#if defined(__ia64__)
+#include <linux/efi.h>
+#endif
 
 
 /**
@@ -612,8 +615,13 @@
                        vma->vm_flags |= VM_IO; /* not in core dump */
                }
 #if defined(__ia64__)
-               if (map->type != _DRM_AGP)
-                       vma->vm_page_prot = 
pgprot_writecombine(vma->vm_page_prot);
+               if (efi_range_is_wc(vma->vm_start, vma->vm_end -
+                                   vma->vm_start))
+                       vma->vm_page_prot =
+                               pgprot_writecombine(vma->vm_page_prot);
+               else
+                       vma->vm_page_prot =
+                               pgprot_noncached(vma->vm_page_prot);
 #endif
                offset = dev->driver->get_reg_ofs(dev);
 #ifdef __sparc__
diff -urN linux/drivers/char/drm/i810_dma.c linux/drivers/char/drm/i810_dma.c
--- linux/drivers/char/drm/i810_dma.c   2005/01/13 14:05:54     1.36
+++ linux/drivers/char/drm/i810_dma.c   2005/02/07 02:54:44     1.37
@@ -50,6 +50,26 @@
 #define up_write up
 #endif
 
+drm_ioctl_desc_t i810_ioctls[] = {
+       [DRM_IOCTL_NR(DRM_I810_INIT)]    = { i810_dma_init,    1, 1 },
+       [DRM_IOCTL_NR(DRM_I810_VERTEX)]  = { i810_dma_vertex,  1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_CLEAR)]   = { i810_clear_bufs,  1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_FLUSH)]   = { i810_flush_ioctl, 1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_GETAGE)]  = { i810_getage,      1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_GETBUF)]  = { i810_getbuf,      1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_SWAP)]    = { i810_swap_bufs,   1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_COPY)]    = { i810_copybuf,     1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_DOCOPY)]  = { i810_docopy,      1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_OV0INFO)] = { i810_ov0_info,    1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_FSTATUS)] = { i810_fstatus,     1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_OV0FLIP)] = { i810_ov0_flip,    1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_MC)]      = { i810_dma_mc,      1, 1 },
+       [DRM_IOCTL_NR(DRM_I810_RSTATUS)] = { i810_rstatus,     1, 0 },
+       [DRM_IOCTL_NR(DRM_I810_FLIP)]    = { i810_flip_bufs,   1, 0 }
+};
+
+int i810_max_ioctl = DRM_ARRAY_SIZE(i810_ioctls);
+
 static drm_buf_t *i810_freelist_get(drm_device_t *dev)
 {
        drm_device_dma_t *dma = dev->dma;
diff -urN linux/drivers/char/drm/i810_drv.c linux/drivers/char/drm/i810_drv.c
--- linux/drivers/char/drm/i810_drv.c   2005/01/13 14:05:54     1.15
+++ linux/drivers/char/drm/i810_drv.c   2005/02/07 02:54:44     1.16
@@ -76,23 +76,8 @@
        i810_PCI_IDS
 };
 
-static drm_ioctl_desc_t ioctls[] = {
-       [DRM_IOCTL_NR(DRM_I810_INIT)]    = { i810_dma_init,    1, 1 },
-       [DRM_IOCTL_NR(DRM_I810_VERTEX)]  = { i810_dma_vertex,  1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_CLEAR)]   = { i810_clear_bufs,  1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_FLUSH)]   = { i810_flush_ioctl, 1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_GETAGE)]  = { i810_getage,      1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_GETBUF)]  = { i810_getbuf,      1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_SWAP)]    = { i810_swap_bufs,   1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_COPY)]    = { i810_copybuf,     1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_DOCOPY)]  = { i810_docopy,      1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_OV0INFO)] = { i810_ov0_info,    1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_FSTATUS)] = { i810_fstatus,     1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_OV0FLIP)] = { i810_ov0_flip,    1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_MC)]      = { i810_dma_mc,      1, 1 },
-       [DRM_IOCTL_NR(DRM_I810_RSTATUS)] = { i810_rstatus,     1, 0 },
-       [DRM_IOCTL_NR(DRM_I810_FLIP)]    = { i810_flip_bufs,   1, 0 }
-};
+extern drm_ioctl_desc_t i810_ioctls[];
+extern int i810_max_ioctl;
 
 static struct drm_driver driver = {
        .driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | 
DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE,
@@ -105,8 +90,7 @@
        .get_reg_ofs = drm_core_get_reg_ofs,
        .postinit = postinit,
        .version = version,
-       .ioctls = ioctls,
-       .num_ioctls = DRM_ARRAY_SIZE(ioctls),
+       .ioctls = i810_ioctls,
        .fops = {
                .owner = THIS_MODULE,
                .open = drm_open,
@@ -124,6 +108,7 @@
 
 static int __init i810_init(void)
 {
+       driver.num_ioctls = i810_max_ioctl;
        return drm_init(&driver);
 }
 
diff -urN linux/drivers/char/drm/i830_dma.c linux/drivers/char/drm/i830_dma.c
--- linux/drivers/char/drm/i830_dma.c   2005/01/13 14:05:54     1.19
+++ linux/drivers/char/drm/i830_dma.c   2005/02/07 02:54:44     1.20
@@ -52,6 +52,25 @@
 #define up_write up
 #endif
 
+drm_ioctl_desc_t i830_ioctls[] = {
+       [DRM_IOCTL_NR(DRM_I830_INIT)]     = { i830_dma_init,    1, 1 },
+       [DRM_IOCTL_NR(DRM_I830_VERTEX)]   = { i830_dma_vertex,  1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_CLEAR)]    = { i830_clear_bufs,  1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_FLUSH)]    = { i830_flush_ioctl, 1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_GETAGE)]   = { i830_getage,      1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_GETBUF)]   = { i830_getbuf,      1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_SWAP)]     = { i830_swap_bufs,   1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_COPY)]     = { i830_copybuf,     1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_DOCOPY)]   = { i830_docopy,      1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_FLIP)]     = { i830_flip_bufs,   1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_IRQ_EMIT)] = { i830_irq_emit,    1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_IRQ_WAIT)] = { i830_irq_wait,    1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_GETPARAM)] = { i830_getparam,    1, 0 },
+       [DRM_IOCTL_NR(DRM_I830_SETPARAM)] = { i830_setparam,    1, 0 } 
+};
+
+int i830_max_ioctl = DRM_ARRAY_SIZE(i830_ioctls);
+
 static inline void i830_print_status_page(drm_device_t *dev)
 {
        drm_device_dma_t *dma = dev->dma;
diff -urN linux/drivers/char/drm/i830_drv.c linux/drivers/char/drm/i830_drv.c
--- linux/drivers/char/drm/i830_drv.c   2005/01/13 14:05:54     1.9
+++ linux/drivers/char/drm/i830_drv.c   2005/02/07 02:54:44     1.10
@@ -77,22 +77,8 @@
        i830_PCI_IDS
 };
 
-static drm_ioctl_desc_t ioctls[] = {
-       [DRM_IOCTL_NR(DRM_I830_INIT)]     = { i830_dma_init,    1, 1 },
-       [DRM_IOCTL_NR(DRM_I830_VERTEX)]   = { i830_dma_vertex,  1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_CLEAR)]    = { i830_clear_bufs,  1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_FLUSH)]    = { i830_flush_ioctl, 1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_GETAGE)]   = { i830_getage,      1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_GETBUF)]   = { i830_getbuf,      1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_SWAP)]     = { i830_swap_bufs,   1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_COPY)]     = { i830_copybuf,     1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_DOCOPY)]   = { i830_docopy,      1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_FLIP)]     = { i830_flip_bufs,   1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_IRQ_EMIT)] = { i830_irq_emit,    1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_IRQ_WAIT)] = { i830_irq_wait,    1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_GETPARAM)] = { i830_getparam,    1, 0 },
-       [DRM_IOCTL_NR(DRM_I830_SETPARAM)] = { i830_setparam,    1, 0 } 
-};
+extern drm_ioctl_desc_t i830_ioctls[];
+extern int i830_max_ioctl;
 
 static struct drm_driver driver = {
        .driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | 
DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE,
@@ -114,8 +100,7 @@
 #endif
        .postinit = postinit,
        .version = version,
-       .ioctls = ioctls,
-       .num_ioctls = DRM_ARRAY_SIZE(ioctls),
+       .ioctls = i830_ioctls,
        .fops = {
                .owner = THIS_MODULE,
                .open = drm_open,
@@ -134,6 +119,7 @@
 
 static int __init i830_init(void)
 {
+       driver.num_ioctls = i830_max_ioctl;
        return drm_init(&driver);
 }
 
diff -urN linux/drivers/char/drm/i915_dma.c linux/drivers/char/drm/i915_dma.c
--- linux/drivers/char/drm/i915_dma.c   2005/01/13 14:05:54     1.3
+++ linux/drivers/char/drm/i915_dma.c   2005/02/07 02:54:44     1.4
@@ -12,6 +12,23 @@
 #include "i915_drm.h"
 #include "i915_drv.h"
 
+drm_ioctl_desc_t i915_ioctls[] = {
+       [DRM_IOCTL_NR(DRM_I915_INIT)] = {i915_dma_init, 1, 1},
+       [DRM_IOCTL_NR(DRM_I915_FLUSH)] = {i915_flush_ioctl, 1, 0},
+       [DRM_IOCTL_NR(DRM_I915_FLIP)] = {i915_flip_bufs, 1, 0},
+       [DRM_IOCTL_NR(DRM_I915_BATCHBUFFER)] = {i915_batchbuffer, 1, 0},
+       [DRM_IOCTL_NR(DRM_I915_IRQ_EMIT)] = {i915_irq_emit, 1, 0},
+       [DRM_IOCTL_NR(DRM_I915_IRQ_WAIT)] = {i915_irq_wait, 1, 0},
+       [DRM_IOCTL_NR(DRM_I915_GETPARAM)] = {i915_getparam, 1, 0},
+       [DRM_IOCTL_NR(DRM_I915_SETPARAM)] = {i915_setparam, 1, 1},
+       [DRM_IOCTL_NR(DRM_I915_ALLOC)] = {i915_mem_alloc, 1, 0},
+       [DRM_IOCTL_NR(DRM_I915_FREE)] = {i915_mem_free, 1, 0},
+       [DRM_IOCTL_NR(DRM_I915_INIT_HEAP)] = {i915_mem_init_heap, 1, 1},
+       [DRM_IOCTL_NR(DRM_I915_CMDBUFFER)] = {i915_cmdbuffer, 1, 0}
+};
+
+int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls);
+
 /* Really want an OS-independent resettable timer.  Would like to have
  * this loop run for (eg) 3 sec, but have the timer reset every time
  * the head pointer changes, so that EBUSY only happens if the ring
@@ -76,9 +93,8 @@
                }
 
                if (dev_priv->hw_status_page) {
-                       pci_free_consistent(dev->pdev, PAGE_SIZE,
-                                           dev_priv->hw_status_page,
-                                           dev_priv->dma_status_page);
+                       drm_pci_free(dev, PAGE_SIZE, dev_priv->hw_status_page,
+                                    dev_priv->dma_status_page);
                        /* Need to rewrite hardware status page */
                        I915_WRITE(0x02080, 0x1ffff000);
                }
@@ -155,9 +171,9 @@
        dev_priv->allow_batchbuffer = 1;
 
        /* Program Hardware Status Page */
-       dev_priv->hw_status_page =
-           pci_alloc_consistent(dev->pdev, PAGE_SIZE,
-                                &dev_priv->dma_status_page);
+       dev_priv->hw_status_page = drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE,
+                                                0xffffffff, 
+                                                &dev_priv->dma_status_page);
 
        if (!dev_priv->hw_status_page) {
                dev->dev_private = (void *)dev_priv;
diff -urN linux/drivers/char/drm/i915_drv.c linux/drivers/char/drm/i915_drv.c
--- linux/drivers/char/drm/i915_drv.c   2005/01/13 14:05:54     1.3
+++ linux/drivers/char/drm/i915_drv.c   2005/02/07 02:54:44     1.4
@@ -52,20 +52,8 @@
        i915_PCI_IDS
 };
 
-static drm_ioctl_desc_t ioctls[] = {
-       [DRM_IOCTL_NR(DRM_I915_INIT)]        = { i915_dma_init,      1, 1 },
-       [DRM_IOCTL_NR(DRM_I915_FLUSH)]       = { i915_flush_ioctl,   1, 0 },
-       [DRM_IOCTL_NR(DRM_I915_FLIP)]        = { i915_flip_bufs,     1, 0 },
-       [DRM_IOCTL_NR(DRM_I915_BATCHBUFFER)] = { i915_batchbuffer,   1, 0 },
-       [DRM_IOCTL_NR(DRM_I915_IRQ_EMIT)]    = { i915_irq_emit,      1, 0 },
-       [DRM_IOCTL_NR(DRM_I915_IRQ_WAIT)]    = { i915_irq_wait,      1, 0 },
-       [DRM_IOCTL_NR(DRM_I915_GETPARAM)]    = { i915_getparam,      1, 0 },
-       [DRM_IOCTL_NR(DRM_I915_SETPARAM)]    = { i915_setparam,      1, 1 },
-       [DRM_IOCTL_NR(DRM_I915_ALLOC)]       = { i915_mem_alloc,     1, 0 },
-       [DRM_IOCTL_NR(DRM_I915_FREE)]        = { i915_mem_free,      1, 0 },
-       [DRM_IOCTL_NR(DRM_I915_INIT_HEAP)]   = { i915_mem_init_heap, 1, 1 },
-       [DRM_IOCTL_NR(DRM_I915_CMDBUFFER)]   = { i915_cmdbuffer,     1, 0 }
-};
+extern drm_ioctl_desc_t i915_ioctls[];
+extern int i915_max_ioctl;
 
 static struct drm_driver driver = {
        .driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | 
DRIVER_USE_MTRR |
@@ -81,8 +69,7 @@
        .get_reg_ofs = drm_core_get_reg_ofs,
        .postinit = postinit,
        .version = version,
-       .ioctls = ioctls,
-       .num_ioctls = DRM_ARRAY_SIZE(ioctls),
+       .ioctls = i915_ioctls,
        .fops = {
                .owner = THIS_MODULE,
                .open = drm_open,
@@ -100,6 +87,7 @@
 
 static int __init i915_init(void)
 {
+       driver.num_ioctls = i915_max_ioctl;
        return drm_init(&driver);
 }
 
diff -urN linux/drivers/char/drm/mga_drv.c linux/drivers/char/drm/mga_drv.c
--- linux/drivers/char/drm/mga_drv.c    2005/01/13 14:05:54     1.15
+++ linux/drivers/char/drm/mga_drv.c    2005/02/07 02:54:44     1.16
@@ -74,18 +74,8 @@
        mga_PCI_IDS
 };
 
-static drm_ioctl_desc_t ioctls[] = {
-       [DRM_IOCTL_NR(DRM_MGA_INIT)]    = { mga_dma_init,    1, 1 },
-       [DRM_IOCTL_NR(DRM_MGA_FLUSH)]   = { mga_dma_flush,   1, 0 },
-       [DRM_IOCTL_NR(DRM_MGA_RESET)]   = { mga_dma_reset,   1, 0 },
-       [DRM_IOCTL_NR(DRM_MGA_SWAP)]    = { mga_dma_swap,    1, 0 },
-       [DRM_IOCTL_NR(DRM_MGA_CLEAR)]   = { mga_dma_clear,   1, 0 },
-       [DRM_IOCTL_NR(DRM_MGA_VERTEX)]  = { mga_dma_vertex,  1, 0 },
-       [DRM_IOCTL_NR(DRM_MGA_INDICES)] = { mga_dma_indices, 1, 0 },
-       [DRM_IOCTL_NR(DRM_MGA_ILOAD)]   = { mga_dma_iload,   1, 0 },
-       [DRM_IOCTL_NR(DRM_MGA_BLIT)]    = { mga_dma_blit,    1, 0 },
-       [DRM_IOCTL_NR(DRM_MGA_GETPARAM)]= { mga_getparam,    1, 0 },
-};
+extern drm_ioctl_desc_t mga_ioctls[];
+extern int mga_max_ioctl;
 
 static struct drm_driver driver = {
        .driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | 
DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | 
DRIVER_IRQ_VBL,
@@ -101,8 +91,7 @@
        .get_reg_ofs = drm_core_get_reg_ofs,
        .postinit = postinit,
        .version = version,
-       .ioctls = ioctls,
-       .num_ioctls = DRM_ARRAY_SIZE(ioctls),
+       .ioctls = mga_ioctls,
        .dma_ioctl = mga_dma_buffers,
        .fops = {
                .owner = THIS_MODULE,
@@ -121,6 +110,7 @@
 
 static int __init mga_init(void)
 {
+       driver.num_ioctls = mga_max_ioctl;
        return drm_init(&driver);
 }
 
diff -urN linux/drivers/char/drm/mga_state.c linux/drivers/char/drm/mga_state.c
--- linux/drivers/char/drm/mga_state.c  2005/01/13 14:05:54     1.13
+++ linux/drivers/char/drm/mga_state.c  2005/02/07 02:54:44     1.14
@@ -37,6 +37,20 @@
 #include "mga_drm.h"
 #include "mga_drv.h"
 
+drm_ioctl_desc_t mga_ioctls[] = {
+       [DRM_IOCTL_NR(DRM_MGA_INIT)]    = { mga_dma_init,    1, 1 },
+       [DRM_IOCTL_NR(DRM_MGA_FLUSH)]   = { mga_dma_flush,   1, 0 },
+       [DRM_IOCTL_NR(DRM_MGA_RESET)]   = { mga_dma_reset,   1, 0 },
+       [DRM_IOCTL_NR(DRM_MGA_SWAP)]    = { mga_dma_swap,    1, 0 },
+       [DRM_IOCTL_NR(DRM_MGA_CLEAR)]   = { mga_dma_clear,   1, 0 },
+       [DRM_IOCTL_NR(DRM_MGA_VERTEX)]  = { mga_dma_vertex,  1, 0 },
+       [DRM_IOCTL_NR(DRM_MGA_INDICES)] = { mga_dma_indices, 1, 0 },
+       [DRM_IOCTL_NR(DRM_MGA_ILOAD)]   = { mga_dma_iload,   1, 0 },
+       [DRM_IOCTL_NR(DRM_MGA_BLIT)]    = { mga_dma_blit,    1, 0 },
+       [DRM_IOCTL_NR(DRM_MGA_GETPARAM)]= { mga_getparam,    1, 0 },
+};
+
+int mga_max_ioctl = DRM_ARRAY_SIZE(mga_ioctls);
 
 /* ================================================================
  * DMA hardware state programming functions
diff -urN linux/drivers/char/drm/r128_drv.c linux/drivers/char/drm/r128_drv.c
--- linux/drivers/char/drm/r128_drv.c   2005/01/13 14:05:54     1.17
+++ linux/drivers/char/drm/r128_drv.c   2005/02/07 02:54:44     1.18
@@ -68,31 +68,8 @@
        r128_PCI_IDS
 };
 
-/* Interface history:
- *
- * ??  - ??
- * 2.4 - Add support for ycbcr textures (no new ioctls)
- * 2.5 - Add FLIP ioctl, disable FULLSCREEN.
- */
-static drm_ioctl_desc_t ioctls[] = {
-   [DRM_IOCTL_NR(DRM_R128_INIT)]       = { r128_cce_init,     1, 1 },
-   [DRM_IOCTL_NR(DRM_R128_CCE_START)]  = { r128_cce_start,    1, 1 },
-   [DRM_IOCTL_NR(DRM_R128_CCE_STOP)]   = { r128_cce_stop,     1, 1 },
-   [DRM_IOCTL_NR(DRM_R128_CCE_RESET)]  = { r128_cce_reset,    1, 1 },
-   [DRM_IOCTL_NR(DRM_R128_CCE_IDLE)]   = { r128_cce_idle,     1, 0 },
-   [DRM_IOCTL_NR(DRM_R128_RESET)]      = { r128_engine_reset, 1, 0 },
-   [DRM_IOCTL_NR(DRM_R128_FULLSCREEN)] = { r128_fullscreen,   1, 0 },
-   [DRM_IOCTL_NR(DRM_R128_SWAP)]       = { r128_cce_swap,     1, 0 },
-   [DRM_IOCTL_NR(DRM_R128_FLIP)]       = { r128_cce_flip,     1, 0 },
-   [DRM_IOCTL_NR(DRM_R128_CLEAR)]      = { r128_cce_clear,    1, 0 },
-   [DRM_IOCTL_NR(DRM_R128_VERTEX)]     = { r128_cce_vertex,   1, 0 },
-   [DRM_IOCTL_NR(DRM_R128_INDICES)]    = { r128_cce_indices,  1, 0 },
-   [DRM_IOCTL_NR(DRM_R128_BLIT)]       = { r128_cce_blit,     1, 0 },
-   [DRM_IOCTL_NR(DRM_R128_DEPTH)]      = { r128_cce_depth,    1, 0 },
-   [DRM_IOCTL_NR(DRM_R128_STIPPLE)]    = { r128_cce_stipple,  1, 0 },
-   [DRM_IOCTL_NR(DRM_R128_INDIRECT)]   = { r128_cce_indirect, 1, 1 },
-   [DRM_IOCTL_NR(DRM_R128_GETPARAM)]   = { r128_getparam, 1, 0 },
-};
+extern drm_ioctl_desc_t r128_ioctls[];
+extern int r128_max_ioctl;
 
 static struct drm_driver driver = {
        .driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | 
DRIVER_SG | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | 
DRIVER_IRQ_VBL,
@@ -109,8 +86,7 @@
        .get_reg_ofs = drm_core_get_reg_ofs,
        .postinit = postinit,
        .version = version,
-       .ioctls = ioctls,
-       .num_ioctls = DRM_ARRAY_SIZE(ioctls),
+       .ioctls = r128_ioctls,
        .dma_ioctl = r128_cce_buffers,
        .fops = {
                .owner = THIS_MODULE,
@@ -129,6 +105,7 @@
 
 static int __init r128_init(void)
 {
+       driver.num_ioctls = r128_max_ioctl;
        return drm_init(&driver);
 }
 
diff -urN linux/drivers/char/drm/r128_drv.h linux/drivers/char/drm/r128_drv.h
--- linux/drivers/char/drm/r128_drv.h   2005/01/13 14:05:54     1.19
+++ linux/drivers/char/drm/r128_drv.h   2005/02/07 02:54:44     1.20
@@ -42,6 +42,12 @@
 #define DRIVER_DESC            "ATI Rage 128"
 #define DRIVER_DATE            "20030725"
 
+/* Interface history:
+ *
+ * ??  - ??
+ * 2.4 - Add support for ycbcr textures (no new ioctls)
+ * 2.5 - Add FLIP ioctl, disable FULLSCREEN.
+ */
 #define DRIVER_MAJOR           2
 #define DRIVER_MINOR           5
 #define DRIVER_PATCHLEVEL      0
diff -urN linux/drivers/char/drm/r128_state.c 
linux/drivers/char/drm/r128_state.c
--- linux/drivers/char/drm/r128_state.c 2005/01/13 14:05:54     1.16
+++ linux/drivers/char/drm/r128_state.c 2005/02/07 02:54:44     1.17
@@ -32,6 +32,27 @@
 #include "r128_drm.h"
 #include "r128_drv.h"
 
+drm_ioctl_desc_t r128_ioctls[] = {
+       [DRM_IOCTL_NR(DRM_R128_INIT)]       = { r128_cce_init,     1, 1 },
+       [DRM_IOCTL_NR(DRM_R128_CCE_START)]  = { r128_cce_start,    1, 1 },
+       [DRM_IOCTL_NR(DRM_R128_CCE_STOP)]   = { r128_cce_stop,     1, 1 },
+       [DRM_IOCTL_NR(DRM_R128_CCE_RESET)]  = { r128_cce_reset,    1, 1 },
+       [DRM_IOCTL_NR(DRM_R128_CCE_IDLE)]   = { r128_cce_idle,     1, 0 },
+       [DRM_IOCTL_NR(DRM_R128_RESET)]      = { r128_engine_reset, 1, 0 },
+       [DRM_IOCTL_NR(DRM_R128_FULLSCREEN)] = { r128_fullscreen,   1, 0 },
+       [DRM_IOCTL_NR(DRM_R128_SWAP)]       = { r128_cce_swap,     1, 0 },
+       [DRM_IOCTL_NR(DRM_R128_FLIP)]       = { r128_cce_flip,     1, 0 },
+       [DRM_IOCTL_NR(DRM_R128_CLEAR)]      = { r128_cce_clear,    1, 0 },
+       [DRM_IOCTL_NR(DRM_R128_VERTEX)]     = { r128_cce_vertex,   1, 0 },
+       [DRM_IOCTL_NR(DRM_R128_INDICES)]    = { r128_cce_indices,  1, 0 },
+       [DRM_IOCTL_NR(DRM_R128_BLIT)]       = { r128_cce_blit,     1, 0 },
+       [DRM_IOCTL_NR(DRM_R128_DEPTH)]      = { r128_cce_depth,    1, 0 },
+       [DRM_IOCTL_NR(DRM_R128_STIPPLE)]    = { r128_cce_stipple,  1, 0 },
+       [DRM_IOCTL_NR(DRM_R128_INDIRECT)]   = { r128_cce_indirect, 1, 1 },
+       [DRM_IOCTL_NR(DRM_R128_GETPARAM)]   = { r128_getparam, 1, 0 },
+};
+
+int r128_max_ioctl = DRM_ARRAY_SIZE(r128_ioctls);
 
 /* ================================================================
  * CCE hardware state programming functions
diff -urN linux/drivers/char/drm/radeon_cp.c linux/drivers/char/drm/radeon_cp.c
--- linux/drivers/char/drm/radeon_cp.c  2005/01/13 14:05:54     1.19
+++ linux/drivers/char/drm/radeon_cp.c  2005/02/07 02:54:44     1.20
@@ -556,6 +556,264 @@
        { 0000000000, 0000000000 },
 };
 
+static u32 R300_cp_microcode[][2] = {
+       { 0x4200e000, 0000000000 },
+       { 0x4000e000, 0000000000 },
+       { 0x000000af, 0x00000008 },
+       { 0x000000b3, 0x00000008 },
+       { 0x6c5a504f, 0000000000 },
+       { 0x4f4f497a, 0000000000 },
+       { 0x5a578288, 0000000000 },
+       { 0x4f91906a, 0000000000 },
+       { 0x4f4f4f4f, 0000000000 },
+       { 0x4fe24f44, 0000000000 },
+       { 0x4f9c9c9c, 0000000000 },
+       { 0xdc4f4fde, 0000000000 },
+       { 0xa1cd4f4f, 0000000000 },
+       { 0xd29d9d9d, 0000000000 },
+       { 0x4f0f9fd7, 0000000000 },
+       { 0x000ca000, 0x00000004 },
+       { 0x000d0012, 0x00000038 },
+       { 0x0000e8b4, 0x00000004 },
+       { 0x000d0014, 0x00000038 },
+       { 0x0000e8b6, 0x00000004 },
+       { 0x000d0016, 0x00000038 },
+       { 0x0000e854, 0x00000004 },
+       { 0x000d0018, 0x00000038 },
+       { 0x0000e855, 0x00000004 },
+       { 0x000d001a, 0x00000038 },
+       { 0x0000e856, 0x00000004 },
+       { 0x000d001c, 0x00000038 },
+       { 0x0000e857, 0x00000004 },
+       { 0x000d001e, 0x00000038 },
+       { 0x0000e824, 0x00000004 },
+       { 0x000d0020, 0x00000038 },
+       { 0x0000e825, 0x00000004 },
+       { 0x000d0022, 0x00000038 },
+       { 0x0000e830, 0x00000004 },
+       { 0x000d0024, 0x00000038 },
+       { 0x0000f0c0, 0x00000004 },
+       { 0x000d0026, 0x00000038 },
+       { 0x0000f0c1, 0x00000004 },
+       { 0x000d0028, 0x00000038 },
+       { 0x0000f041, 0x00000004 },
+       { 0x000d002a, 0x00000038 },
+       { 0x0000f184, 0x00000004 },
+       { 0x000d002c, 0x00000038 },
+       { 0x0000f185, 0x00000004 },
+       { 0x000d002e, 0x00000038 },
+       { 0x0000f186, 0x00000004 },
+       { 0x000d0030, 0x00000038 },
+       { 0x0000f187, 0x00000004 },
+       { 0x000d0032, 0x00000038 },
+       { 0x0000f180, 0x00000004 },
+       { 0x000d0034, 0x00000038 },
+       { 0x0000f393, 0x00000004 },
+       { 0x000d0036, 0x00000038 },
+       { 0x0000f38a, 0x00000004 },
+       { 0x000d0038, 0x00000038 },
+       { 0x0000f38e, 0x00000004 },
+       { 0x0000e821, 0x00000004 },
+       { 0x0140a000, 0x00000004 },
+       { 0x00000043, 0x00000018 },
+       { 0x00cce800, 0x00000004 },
+       { 0x001b0001, 0x00000004 },
+       { 0x08004800, 0x00000004 },
+       { 0x001b0001, 0x00000004 },
+       { 0x08004800, 0x00000004 },
+       { 0x001b0001, 0x00000004 },
+       { 0x08004800, 0x00000004 },
+       { 0x0000003a, 0x00000008 },
+       { 0x0000a000, 0000000000 },
+       { 0x02c0a000, 0x00000004 },
+       { 0x000ca000, 0x00000004 },
+       { 0x00130000, 0x00000004 },
+       { 0x000c2000, 0x00000004 },
+       { 0xc980c045, 0x00000008 },
+       { 0x2000451d, 0x00000004 },
+       { 0x0000e580, 0x00000004 },
+       { 0x000ce581, 0x00000004 },
+       { 0x08004580, 0x00000004 },
+       { 0x000ce581, 0x00000004 },
+       { 0x0000004c, 0x00000008 },
+       { 0x0000a000, 0000000000 },
+       { 0x000c2000, 0x00000004 },
+       { 0x0000e50e, 0x00000004 },
+       { 0x00032000, 0x00000004 },
+       { 0x00022056, 0x00000028 },
+       { 0x00000056, 0x00000024 },
+       { 0x0800450f, 0x00000004 },
+       { 0x0000a050, 0x00000008 },
+       { 0x0000e565, 0x00000004 },
+       { 0x0000e566, 0x00000004 },
+       { 0x00000057, 0x00000008 },
+       { 0x03cca5b4, 0x00000004 },
+       { 0x05432000, 0x00000004 },
+       { 0x00022000, 0x00000004 },
+       { 0x4ccce063, 0x00000030 },
+       { 0x08274565, 0x00000004 },
+       { 0x00000063, 0x00000030 },
+       { 0x08004564, 0x00000004 },
+       { 0x0000e566, 0x00000004 },
+       { 0x0000005a, 0x00000008 },
+       { 0x00802066, 0x00000010 },
+       { 0x00202000, 0x00000004 },
+       { 0x001b00ff, 0x00000004 },
+       { 0x01000069, 0x00000010 },
+       { 0x001f2000, 0x00000004 },
+       { 0x001c00ff, 0x00000004 },
+       { 0000000000, 0x0000000c },
+       { 0x00000085, 0x00000030 },
+       { 0x0000005a, 0x00000008 },
+       { 0x0000e576, 0x00000004 },
+       { 0x000ca000, 0x00000004 },
+       { 0x00012000, 0x00000004 },
+       { 0x00082000, 0x00000004 },
+       { 0x1800650e, 0x00000004 },
+       { 0x00092000, 0x00000004 },
+       { 0x000a2000, 0x00000004 },
+       { 0x000f0000, 0x00000004 },
+       { 0x00400000, 0x00000004 },
+       { 0x00000079, 0x00000018 },
+       { 0x0000e563, 0x00000004 },
+       { 0x00c0e5f9, 0x000000c2 },
+       { 0x0000006e, 0x00000008 },
+       { 0x0000a06e, 0x00000008 },
+       { 0x0000e576, 0x00000004 },
+       { 0x0000e577, 0x00000004 },
+       { 0x0000e50e, 0x00000004 },
+       { 0x0000e50f, 0x00000004 },
+       { 0x0140a000, 0x00000004 },
+       { 0x0000007c, 0x00000018 },
+       { 0x00c0e5f9, 0x000000c2 },
+       { 0x0000007c, 0x00000008 },
+       { 0x0014e50e, 0x00000004 },
+       { 0x0040e50f, 0x00000004 },
+       { 0x00c0007f, 0x00000008 },
+       { 0x0000e570, 0x00000004 },
+       { 0x0000e571, 0x00000004 },
+       { 0x0000e572, 0x0000000c },
+       { 0x0000a000, 0x00000004 },
+       { 0x0140a000, 0x00000004 },
+       { 0x0000e568, 0x00000004 },
+       { 0x000c2000, 0x00000004 },
+       { 0x00000089, 0x00000018 },
+       { 0x000b0000, 0x00000004 },
+       { 0x18c0e562, 0x00000004 },
+       { 0x0000008b, 0x00000008 },
+       { 0x00c0008a, 0x00000008 },
+       { 0x000700e4, 0x00000004 },
+       { 0x00000097, 0x00000038 },
+       { 0x000ca099, 0x00000030 },
+       { 0x080045bb, 0x00000004 },
+       { 0x000c209a, 0x00000030 },
+       { 0x0800e5bc, 0000000000 },
+       { 0x0000e5bb, 0x00000004 },
+       { 0x0000e5bc, 0000000000 },
+       { 0x00120000, 0x0000000c },
+       { 0x00120000, 0x00000004 },
+       { 0x001b0002, 0x0000000c },
+       { 0x0000a000, 0x00000004 },
+       { 0x0000e821, 0x00000004 },
+       { 0x0000e800, 0000000000 },
+       { 0x0000e821, 0x00000004 },
+       { 0x0000e82e, 0000000000 },
+       { 0x02cca000, 0x00000004 },
+       { 0x00140000, 0x00000004 },
+       { 0x000ce1cc, 0x00000004 },
+       { 0x050de1cd, 0x00000004 },
+       { 0x000000a7, 0x00000020 },
+       { 0x4200e000, 0000000000 },
+       { 0x000000ae, 0x00000038 },
+       { 0x000ca000, 0x00000004 },
+       { 0x00140000, 0x00000004 },
+       { 0x000c2000, 0x00000004 },
+       { 0x00160000, 0x00000004 },
+       { 0x700ce000, 0x00000004 },
+       { 0x001400aa, 0x00000008 },
+       { 0x4000e000, 0000000000 },
+       { 0x02400000, 0x00000004 },
+       { 0x400ee000, 0x00000004 },
+       { 0x02400000, 0x00000004 },
+       { 0x4000e000, 0000000000 },
+       { 0x000c2000, 0x00000004 },
+       { 0x0240e51b, 0x00000004 },
+       { 0x0080e50a, 0x00000005 },
+       { 0x0080e50b, 0x00000005 },
+       { 0x00220000, 0x00000004 },
+       { 0x000700e4, 0x00000004 },
+       { 0x000000c1, 0x00000038 },
+       { 0x000c209a, 0x00000030 },
+       { 0x0880e5bd, 0x00000005 },
+       { 0x000c2099, 0x00000030 },
+       { 0x0800e5bb, 0x00000005 },
+       { 0x000c209a, 0x00000030 },
+       { 0x0880e5bc, 0x00000005 },
+       { 0x000000c4, 0x00000008 },
+       { 0x0080e5bd, 0x00000005 },
+       { 0x0000e5bb, 0x00000005 },
+       { 0x0080e5bc, 0x00000005 },
+       { 0x00210000, 0x00000004 },
+       { 0x02800000, 0x00000004 },
+       { 0x00c000c8, 0x00000018 },
+       { 0x4180e000, 0x00000040 },
+       { 0x000000ca, 0x00000024 },
+       { 0x01000000, 0x0000000c },
+       { 0x0100e51d, 0x0000000c },
+       { 0x000045bb, 0x00000004 },
+       { 0x000080c4, 0x00000008 },
+       { 0x0000f3ce, 0x00000004 },
+       { 0x0140a000, 0x00000004 },
+       { 0x00cc2000, 0x00000004 },
+       { 0x08c053cf, 0x00000040 },
+       { 0x00008000, 0000000000 },
+       { 0x0000f3d2, 0x00000004 },
+       { 0x0140a000, 0x00000004 },
+       { 0x00cc2000, 0x00000004 },
+       { 0x08c053d3, 0x00000040 },
+       { 0x00008000, 0000000000 },
+       { 0x0000f39d, 0x00000004 },
+       { 0x0140a000, 0x00000004 },
+       { 0x00cc2000, 0x00000004 },
+       { 0x08c0539e, 0x00000040 },
+       { 0x00008000, 0000000000 },
+       { 0x03c00830, 0x00000004 },
+       { 0x4200e000, 0000000000 },
+       { 0x0000a000, 0x00000004 },
+       { 0x200045e0, 0x00000004 },
+       { 0x0000e5e1, 0000000000 },
+       { 0x00000001, 0000000000 },
+       { 0x000700e1, 0x00000004 },
+       { 0x0800e394, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+       { 0000000000, 0000000000 },
+};
 
 int RADEON_READ_PLL(drm_device_t *dev, int addr)
 {
@@ -680,8 +938,7 @@
 
        RADEON_WRITE( RADEON_CP_ME_RAM_ADDR, 0 );
 
-       if (dev_priv->is_r200)
-       {
+       if (dev_priv->microcode_version==UCODE_R200) {
                DRM_INFO("Loading R200 Microcode\n");
                for ( i = 0 ; i < 256 ; i++ ) 
                {
@@ -690,9 +947,16 @@
                        RADEON_WRITE( RADEON_CP_ME_RAM_DATAL,
                                      R200_cp_microcode[i][0] );
                }
-       }
-       else
-       {
+       } else if (dev_priv->microcode_version==UCODE_R300) {
+               DRM_INFO("Loading R300 Microcode\n");
+               for ( i = 0 ; i < 256 ; i++ ) 
+               {
+                       RADEON_WRITE( RADEON_CP_ME_RAM_DATAH,
+                                     R300_cp_microcode[i][1] );
+                       RADEON_WRITE( RADEON_CP_ME_RAM_DATAL,
+                                     R300_cp_microcode[i][0] );
+               }
+       } else {
                for ( i = 0 ; i < 256 ; i++ ) {
                        RADEON_WRITE( RADEON_CP_ME_RAM_DATAH,
                                      radeon_cp_microcode[i][1] );
@@ -1002,15 +1266,9 @@
 
 static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init )
 {
-       drm_radeon_private_t *dev_priv;
+       drm_radeon_private_t *dev_priv = dev->dev_private;;
        DRM_DEBUG( "\n" );
 
-       dev_priv = drm_alloc( sizeof(drm_radeon_private_t), DRM_MEM_DRIVER );
-       if ( dev_priv == NULL )
-               return DRM_ERR(ENOMEM);
-
-       memset( dev_priv, 0, sizeof(drm_radeon_private_t) );
-
        dev_priv->is_pci = init->is_pci;
 
        if ( dev_priv->is_pci && !dev->sg ) {
@@ -1029,7 +1287,17 @@
                return DRM_ERR(EINVAL);
        }
 
-       dev_priv->is_r200 = (init->func == RADEON_INIT_R200_CP);
+       switch(init->func) {
+       case RADEON_INIT_R200_CP:
+               dev_priv->microcode_version=UCODE_R200;
+               break;
+       case RADEON_INIT_R300_CP:
+               dev_priv->microcode_version=UCODE_R300;
+               break;
+       default:
+               dev_priv->microcode_version=UCODE_R100;
+       }
+       
        dev_priv->do_boxes = 0;
        dev_priv->cp_mode = init->cp_mode;
 
@@ -1078,7 +1346,7 @@
         */
        dev_priv->depth_clear.rb3d_cntl = (RADEON_PLANE_MASK_ENABLE |
                                           (dev_priv->color_fmt << 10) |
-                                          (1<<15));
+                                          (dev_priv->microcode_version == 
UCODE_R100 ? RADEON_ZBLOCK16 : 0));
 
        dev_priv->depth_clear.rb3d_zstencilcntl = 
                (dev_priv->depth_fmt |
@@ -1272,6 +1540,7 @@
 
 int radeon_do_cleanup_cp( drm_device_t *dev )
 {
+       drm_radeon_private_t *dev_priv = dev->dev_private;
        DRM_DEBUG( "\n" );
 
        /* Make sure interrupts are disabled here because the uninstall ioctl
@@ -1280,30 +1549,28 @@
         */
        if ( dev->irq_enabled ) drm_irq_uninstall(dev);
 
-       if ( dev->dev_private ) {
-               drm_radeon_private_t *dev_priv = dev->dev_private;
-
 #if __OS_HAS_AGP
-               if ( !dev_priv->is_pci ) {
-                       if ( dev_priv->cp_ring != NULL )
-                               drm_core_ioremapfree( dev_priv->cp_ring, dev );
-                       if ( dev_priv->ring_rptr != NULL )
-                               drm_core_ioremapfree( dev_priv->ring_rptr, dev 
);
-                       if ( dev->agp_buffer_map != NULL )
-                               drm_core_ioremapfree( dev->agp_buffer_map, dev 
);
-               } else
-#endif
+       if ( !dev_priv->is_pci ) {
+               if ( dev_priv->cp_ring != NULL )
+                       drm_core_ioremapfree( dev_priv->cp_ring, dev );
+               if ( dev_priv->ring_rptr != NULL )
+                       drm_core_ioremapfree( dev_priv->ring_rptr, dev );
+               if ( dev->agp_buffer_map != NULL )
                {
-                       if (!drm_ati_pcigart_cleanup( dev,
-                                               dev_priv->phys_pci_gart,
-                                               dev_priv->bus_pci_gart ))
-                               DRM_ERROR( "failed to cleanup PCI GART!\n" );
+                       drm_core_ioremapfree( dev->agp_buffer_map, dev );
+                       dev->agp_buffer_map = NULL;
                }
-
-               drm_free( dev->dev_private, sizeof(drm_radeon_private_t),
-                          DRM_MEM_DRIVER );
-               dev->dev_private = NULL;
+       } else
+#endif
+       {
+               if (!drm_ati_pcigart_cleanup( dev,
+                                             dev_priv->phys_pci_gart,
+                                             dev_priv->bus_pci_gart ))
+                       DRM_ERROR( "failed to cleanup PCI GART!\n" );
        }
+       
+       /* only clear to the start of flags */
+       memset(dev_priv, 0, offsetof(drm_radeon_private_t, flags));
 
        return 0;
 }
@@ -1360,6 +1627,7 @@
        switch ( init.func ) {
        case RADEON_INIT_CP:
        case RADEON_INIT_R200_CP:
+       case RADEON_INIT_R300_CP:
                return radeon_do_init_cp( dev, &init );
        case RADEON_CLEANUP_CP:
                return radeon_do_cleanup_cp( dev );
@@ -1440,7 +1708,7 @@
 void radeon_do_release( drm_device_t *dev )
 {
        drm_radeon_private_t *dev_priv = dev->dev_private;
-       int ret;
+       int i, ret;
 
        if (dev_priv) {
                if (dev_priv->cp_running) {
@@ -1458,7 +1726,16 @@
                }
 
                /* Disable *all* interrupts */
-               RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 );
+               if (dev_priv->mmio)     /* remove this after permanent addmaps 
*/
+                       RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 );
+
+               if (dev_priv->mmio) {/* remove all surfaces */
+                       for (i = 0; i < RADEON_MAX_SURFACES; i++) {
+                               RADEON_WRITE(RADEON_SURFACE0_INFO + 16*i, 0);
+                               RADEON_WRITE(RADEON_SURFACE0_LOWER_BOUND + 
16*i, 0);
+                               RADEON_WRITE(RADEON_SURFACE0_UPPER_BOUND + 
16*i, 0);
+                       }
+               }
 
                /* Free memory heap structures */
                radeon_mem_takedown( &(dev_priv->gart_heap) );
@@ -1742,3 +2019,42 @@
 
        return ret;
 }
+
+int radeon_driver_preinit(struct drm_device *dev, unsigned long flags)
+{
+       drm_radeon_private_t *dev_priv;
+       int ret = 0;
+
+       dev_priv = drm_alloc(sizeof(drm_radeon_private_t), DRM_MEM_DRIVER);
+       if (dev_priv == NULL)
+               return DRM_ERR(ENOMEM);
+
+       memset(dev_priv, 0, sizeof(drm_radeon_private_t));
+       dev->dev_private = (void *)dev_priv;
+       dev_priv->flags = flags;
+
+       switch (flags & CHIP_FAMILY_MASK) {
+       case CHIP_R100:
+       case CHIP_RV200:
+       case CHIP_R200:
+       case CHIP_R300:
+               dev_priv->flags |= CHIP_HAS_HIERZ;
+               break;
+       default:
+       /* all other chips have no hierarchical z buffer */
+               break;
+       }
+       return ret;
+}
+
+int radeon_driver_postcleanup(struct drm_device *dev)
+{
+       drm_radeon_private_t *dev_priv = dev->dev_private;
+
+       DRM_DEBUG("\n");
+
+       drm_free(dev_priv, sizeof(*dev_priv), DRM_MEM_DRIVER);
+
+       dev->dev_private = NULL;
+       return 0;
+}
diff -urN linux/drivers/char/drm/radeon_drm.h 
linux/drivers/char/drm/radeon_drm.h
--- linux/drivers/char/drm/radeon_drm.h 2004/07/20 20:21:18     1.17
+++ linux/drivers/char/drm/radeon_drm.h 2005/02/07 02:54:44     1.18
@@ -145,7 +145,8 @@
 #define RADEON_EMIT_PP_TEX_SIZE_1                   74
 #define RADEON_EMIT_PP_TEX_SIZE_2                   75
 #define R200_EMIT_RB3D_BLENDCOLOR                   76
-#define RADEON_MAX_STATE_PACKETS                    77
+#define R200_EMIT_TCL_POINT_SPRITE_CNTL             77
+#define RADEON_MAX_STATE_PACKETS                    78
 
 
 /* Commands understood by cmd_buffer ioctl.  More can be added but
@@ -192,7 +193,10 @@
 #define RADEON_FRONT                   0x1
 #define RADEON_BACK                    0x2
 #define RADEON_DEPTH                   0x4
-#define RADEON_STENCIL                  0x8
+#define RADEON_STENCIL                 0x8
+#define RADEON_CLEAR_FASTZ             0x80000000
+#define RADEON_USE_HIERZ               0x40000000
+#define RADEON_USE_COMP_ZBUF           0x20000000
 
 /* Primitive types
  */
@@ -227,6 +231,8 @@
 #define RADEON_MAX_TEXTURE_LEVELS      12
 #define RADEON_MAX_TEXTURE_UNITS       3
 
+#define RADEON_MAX_SURFACES            8
+
 /* Blits have strict offset rules.  All blit offset must be aligned on
  * a 1K-byte boundary.
  */
@@ -361,6 +367,7 @@
         int pfState;                /* number of 3d windows (0,1,2ormore) */
         int pfCurrentPage;         /* which buffer is being displayed? */
        int crtc2_base;             /* CRTC2 frame offset */
+       int tiling_enabled;     /* set by drm, read by 2d + 3d clients */
 } drm_radeon_sarea_t;
 
 
@@ -399,6 +406,8 @@
 #define DRM_RADEON_IRQ_WAIT   0x17
 #define DRM_RADEON_CP_RESUME  0x18
 #define DRM_RADEON_SETPARAM   0x19
+#define DRM_RADEON_SURF_ALLOC 0x1a
+#define DRM_RADEON_SURF_FREE  0x1b
 
 #define DRM_IOCTL_RADEON_CP_INIT    DRM_IOW( DRM_COMMAND_BASE + 
DRM_RADEON_CP_INIT, drm_radeon_init_t)
 #define DRM_IOCTL_RADEON_CP_START   DRM_IO(  DRM_COMMAND_BASE + 
DRM_RADEON_CP_START)
@@ -425,12 +434,15 @@
 #define DRM_IOCTL_RADEON_IRQ_WAIT   DRM_IOW( DRM_COMMAND_BASE + 
DRM_RADEON_IRQ_WAIT, drm_radeon_irq_wait_t)
 #define DRM_IOCTL_RADEON_CP_RESUME  DRM_IO(  DRM_COMMAND_BASE + 
DRM_RADEON_CP_RESUME)
 #define DRM_IOCTL_RADEON_SETPARAM   DRM_IOW( DRM_COMMAND_BASE + 
DRM_RADEON_SETPARAM, drm_radeon_setparam_t)
+#define DRM_IOCTL_RADEON_SURF_ALLOC DRM_IOW( DRM_COMMAND_BASE + 
DRM_RADEON_SURF_ALLOC, drm_radeon_surface_alloc_t)
+#define DRM_IOCTL_RADEON_SURF_FREE  DRM_IOW( DRM_COMMAND_BASE + 
DRM_RADEON_SURF_FREE, drm_radeon_surface_free_t)
 
 typedef struct drm_radeon_init {
        enum {
                RADEON_INIT_CP    = 0x01,
                RADEON_CLEANUP_CP = 0x02,
-               RADEON_INIT_R200_CP = 0x03
+               RADEON_INIT_R200_CP = 0x03,
+               RADEON_INIT_R300_CP = 0x04
        } func;
        unsigned long sarea_priv_offset;
        int is_pci;
@@ -623,7 +635,19 @@
        int64_t      value;
 } drm_radeon_setparam_t;
 
-#define RADEON_SETPARAM_FB_LOCATION    1 /* determined framebuffer location */
+#define RADEON_SETPARAM_FB_LOCATION    1       /* determined framebuffer 
location */
+#define RADEON_SETPARAM_SWITCH_TILING  2       /* enable/disable color tiling 
*/
+
+/* 1.14: Clients can allocate/free a surface
+ */
+typedef struct drm_radeon_surface_alloc {
+       unsigned int address;
+       unsigned int size;
+       unsigned int flags;
+} drm_radeon_surface_alloc_t;
 
+typedef struct drm_radeon_surface_free {
+       unsigned int address;
+} drm_radeon_surface_free_t;
 
 #endif
diff -urN linux/drivers/char/drm/radeon_drv.c 
linux/drivers/char/drm/radeon_drv.c
--- linux/drivers/char/drm/radeon_drv.c 2005/01/13 14:05:54     1.9
+++ linux/drivers/char/drm/radeon_drv.c 2005/02/07 02:54:44     1.10
@@ -69,70 +69,14 @@
        radeon_PCI_IDS
 };
 
-/* Interface history:
- *
- * 1.1 - ??
- * 1.2 - Add vertex2 ioctl (keith)
- *     - Add stencil capability to clear ioctl (gareth, keith)
- *     - Increase MAX_TEXTURE_LEVELS (brian)
- * 1.3 - Add cmdbuf ioctl (keith)
- *     - Add support for new radeon packets (keith)
- *     - Add getparam ioctl (keith)
- *     - Add flip-buffers ioctl, deprecate fullscreen foo (keith).
- * 1.4 - Add scratch registers to get_param ioctl.
- * 1.5 - Add r200 packets to cmdbuf ioctl
- *     - Add r200 function to init ioctl
- *     - Add 'scalar2' instruction to cmdbuf
- * 1.6 - Add static GART memory manager
- *       Add irq handler (won't be turned on unless X server knows to)
- *       Add irq ioctls and irq_active getparam.
- *       Add wait command for cmdbuf ioctl
- *       Add GART offset query for getparam
- * 1.7 - Add support for cube map registers: R200_PP_CUBIC_FACES_[0..5]
- *       and R200_PP_CUBIC_OFFSET_F1_[0..5].
- *       Added packets R200_EMIT_PP_CUBIC_FACES_[0..5] and
- *       R200_EMIT_PP_CUBIC_OFFSETS_[0..5].  (brian)
- * 1.8 - Remove need to call cleanup ioctls on last client exit (keith)
- *       Add 'GET' queries for starting additional clients on different VT's.
- * 1.9 - Add DRM_IOCTL_RADEON_CP_RESUME ioctl.
- *       Add texture rectangle support for r100.
- * 1.10- Add SETPARAM ioctl; first parameter to set is FB_LOCATION, which
- *       clients use to tell the DRM where they think the framebuffer is 
- *       located in the card's address space
- * 1.11- Add packet R200_EMIT_RB3D_BLENDCOLOR to support GL_EXT_blend_color
- *       and GL_EXT_blend_[func|equation]_separate on r200
- */
-static drm_ioctl_desc_t ioctls[] = {
- [DRM_IOCTL_NR(DRM_RADEON_CP_INIT)]    = { radeon_cp_init,      1, 1 },
- [DRM_IOCTL_NR(DRM_RADEON_CP_START)]   = { radeon_cp_start,     1, 1 },
- [DRM_IOCTL_NR(DRM_RADEON_CP_STOP)]    = { radeon_cp_stop,      1, 1 },
- [DRM_IOCTL_NR(DRM_RADEON_CP_RESET)]   = { radeon_cp_reset,     1, 1 },
- [DRM_IOCTL_NR(DRM_RADEON_CP_IDLE)]    = { radeon_cp_idle,      1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_CP_RESUME)]  = { radeon_cp_resume,    1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_RESET)]      = { radeon_engine_reset, 1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_FULLSCREEN)] = { radeon_fullscreen,   1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_SWAP)]       = { radeon_cp_swap,      1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_CLEAR)]      = { radeon_cp_clear,     1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_VERTEX)]     = { radeon_cp_vertex,    1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_INDICES)]    = { radeon_cp_indices,   1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_TEXTURE)]    = { radeon_cp_texture,   1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_STIPPLE)]    = { radeon_cp_stipple,   1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_INDIRECT)]   = { radeon_cp_indirect,  1, 1 },
- [DRM_IOCTL_NR(DRM_RADEON_VERTEX2)]    = { radeon_cp_vertex2,   1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_CMDBUF)]     = { radeon_cp_cmdbuf,    1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_GETPARAM)]   = { radeon_cp_getparam,  1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_FLIP)]       = { radeon_cp_flip,      1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_ALLOC)]      = { radeon_mem_alloc,    1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_FREE)]       = { radeon_mem_free,     1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_INIT_HEAP)]  = { radeon_mem_init_heap,1, 1 },
- [DRM_IOCTL_NR(DRM_RADEON_IRQ_EMIT)]   = { radeon_irq_emit,     1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_IRQ_WAIT)]   = { radeon_irq_wait,     1, 0 },
- [DRM_IOCTL_NR(DRM_RADEON_SETPARAM)]   = { radeon_cp_setparam,  1, 0 },
-};
+extern drm_ioctl_desc_t radeon_ioctls[];
+extern int radeon_max_ioctl;
 
 static struct drm_driver driver = {
        .driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | 
DRIVER_SG | DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | 
DRIVER_IRQ_VBL,
        .dev_priv_size = sizeof(drm_radeon_buf_priv_t),
+       .preinit = radeon_driver_preinit,
+       .postcleanup = radeon_driver_postcleanup,
        .prerelease = radeon_driver_prerelease,
        .pretakedown = radeon_driver_pretakedown,
        .open_helper = radeon_driver_open_helper,
@@ -147,8 +91,7 @@
        .get_reg_ofs = drm_core_get_reg_ofs,
        .postinit = postinit,
        .version = version,
-       .ioctls = ioctls,
-       .num_ioctls = DRM_ARRAY_SIZE(ioctls),
+       .ioctls = radeon_ioctls,
        .dma_ioctl = radeon_cp_buffers,
        .fops = {
                .owner = THIS_MODULE,
@@ -167,6 +110,7 @@
 
 static int __init radeon_init(void)
 {
+       driver.num_ioctls = radeon_max_ioctl;
        return drm_init(&driver);
 }
 
diff -urN linux/drivers/char/drm/radeon_drv.h 
linux/drivers/char/drm/radeon_drv.h
--- linux/drivers/char/drm/radeon_drv.h 2005/01/13 14:05:54     1.21
+++ linux/drivers/char/drm/radeon_drv.h 2005/02/07 02:54:44     1.22
@@ -38,15 +38,93 @@
 
 #define DRIVER_NAME            "radeon"
 #define DRIVER_DESC            "ATI Radeon"
-#define DRIVER_DATE            "20020828"
+#define DRIVER_DATE            "20050125"
 
+/* Interface history:
+ *
+ * 1.1 - ??
+ * 1.2 - Add vertex2 ioctl (keith)
+ *     - Add stencil capability to clear ioctl (gareth, keith)
+ *     - Increase MAX_TEXTURE_LEVELS (brian)
+ * 1.3 - Add cmdbuf ioctl (keith)
+ *     - Add support for new radeon packets (keith)
+ *     - Add getparam ioctl (keith)
+ *     - Add flip-buffers ioctl, deprecate fullscreen foo (keith).
+ * 1.4 - Add scratch registers to get_param ioctl.
+ * 1.5 - Add r200 packets to cmdbuf ioctl
+ *     - Add r200 function to init ioctl
+ *     - Add 'scalar2' instruction to cmdbuf
+ * 1.6 - Add static GART memory manager
+ *       Add irq handler (won't be turned on unless X server knows to)
+ *       Add irq ioctls and irq_active getparam.
+ *       Add wait command for cmdbuf ioctl
+ *       Add GART offset query for getparam
+ * 1.7 - Add support for cube map registers: R200_PP_CUBIC_FACES_[0..5]
+ *       and R200_PP_CUBIC_OFFSET_F1_[0..5].
+ *       Added packets R200_EMIT_PP_CUBIC_FACES_[0..5] and
+ *       R200_EMIT_PP_CUBIC_OFFSETS_[0..5].  (brian)
+ * 1.8 - Remove need to call cleanup ioctls on last client exit (keith)
+ *       Add 'GET' queries for starting additional clients on different VT's.
+ * 1.9 - Add DRM_IOCTL_RADEON_CP_RESUME ioctl.
+ *       Add texture rectangle support for r100.
+ * 1.10- Add SETPARAM ioctl; first parameter to set is FB_LOCATION, which
+ *       clients use to tell the DRM where they think the framebuffer is 
+ *       located in the card's address space
+ * 1.11- Add packet R200_EMIT_RB3D_BLENDCOLOR to support GL_EXT_blend_color
+ *       and GL_EXT_blend_[func|equation]_separate on r200
+ * 1.12- Add R300 CP microcode support - this just loads the CP on r300
+ *       (No 3D support yet - just microcode loading)
+ * 1.13- Add packet R200_EMIT_TCL_POINT_SPRITE_CNTL for ARB_point_parameters
+ *     - Add hyperz support, add hyperz flags to clear ioctl.
+ * 1.14- Add support for color tiling
+ *     - Add R100/R200 surface allocation/free support
+ */
 #define DRIVER_MAJOR           1
-#define DRIVER_MINOR           11
+#define DRIVER_MINOR           14
 #define DRIVER_PATCHLEVEL      0
 
 #define GET_RING_HEAD(dev_priv)                DRM_READ32(  
(dev_priv)->ring_rptr, 0 )
 #define SET_RING_HEAD(dev_priv,val)    DRM_WRITE32( (dev_priv)->ring_rptr, 0, 
(val) )
 
+/*
+ * Radeon chip families
+ */
+enum radeon_family {
+       CHIP_R100,
+       CHIP_RS100,
+       CHIP_RV100,
+       CHIP_R200,
+       CHIP_RV200,
+       CHIP_RS200,
+       CHIP_R250,
+       CHIP_RS250,
+       CHIP_RV250,
+       CHIP_RV280,
+       CHIP_R300,
+       CHIP_RS300,
+       CHIP_RV350,
+       CHIP_LAST,
+};
+
+enum radeon_cp_microcode_version {
+       UCODE_R100,
+       UCODE_R200,
+       UCODE_R300,
+};
+
+/*
+ * Chip flags
+ */
+enum radeon_chip_flags {
+       CHIP_FAMILY_MASK = 0x0000ffffUL,
+       CHIP_FLAGS_MASK = 0xffff0000UL,
+       CHIP_IS_MOBILITY = 0x00010000UL,
+       CHIP_IS_IGP = 0x00020000UL,
+       CHIP_SINGLE_CRTC = 0x00040000UL,
+       CHIP_IS_AGP = 0x00080000UL,
+       CHIP_HAS_HIERZ = 0x00100000UL, 
+};
+
 typedef struct drm_radeon_freelist {
        unsigned int age;
        drm_buf_t *buf;
@@ -85,6 +163,21 @@
        DRMFILE filp;           /* 0: free, -1: heap, other: real files */
 };
 
+struct radeon_surface {
+       int refcount;
+       u32 lower;
+       u32 upper;
+       u32 flags;
+};
+
+struct radeon_virt_surface {
+       int surface_index;
+       u32 lower;
+       u32 upper;
+       u32 flags;
+       DRMFILE filp;
+};
+
 typedef struct drm_radeon_private {
        drm_radeon_ring_buffer_t ring;
        drm_radeon_sarea_t *sarea_priv;
@@ -106,7 +199,7 @@
 
        int usec_timeout;
 
-       int is_r200;
+       int microcode_version;
 
        int is_pci;
        unsigned long phys_pci_gart;
@@ -163,6 +256,11 @@
        wait_queue_head_t swi_queue;
        atomic_t swi_emitted;
 
+       struct radeon_surface surfaces[RADEON_MAX_SURFACES];
+       struct radeon_virt_surface virt_surfaces[2*RADEON_MAX_SURFACES];
+
+       /* starting from here on, data is preserved accross an open */
+       uint32_t flags;         /* see radeon_chip_flags */
 } drm_radeon_private_t;
 
 typedef struct drm_radeon_buf_priv {
@@ -189,6 +287,9 @@
 extern int radeon_do_cleanup_cp( drm_device_t *dev );
 extern int radeon_do_cleanup_pageflip( drm_device_t *dev );
 
+extern int radeon_driver_preinit(struct drm_device *dev, unsigned long flags);
+extern int radeon_driver_postcleanup(struct drm_device *dev);
+
                                /* radeon_state.c */
 extern int radeon_cp_clear( DRM_IOCTL_ARGS );
 extern int radeon_cp_swap( DRM_IOCTL_ARGS );
@@ -208,6 +309,8 @@
 extern int radeon_mem_init_heap( DRM_IOCTL_ARGS );
 extern void radeon_mem_takedown( struct mem_block **heap );
 extern void radeon_mem_release( DRMFILE filp, struct mem_block *heap );
+extern int radeon_surface_alloc(DRM_IOCTL_ARGS);
+extern int radeon_surface_free(DRM_IOCTL_ARGS);
 
                                /* radeon_irq.c */
 extern int radeon_irq_emit( DRM_IOCTL_ARGS );
@@ -382,7 +485,9 @@
 #      define RADEON_ROP_ENABLE                (1 << 6)
 #      define RADEON_STENCIL_ENABLE            (1 << 7)
 #      define RADEON_Z_ENABLE                  (1 << 8)
+#      define RADEON_ZBLOCK16                  (1 << 15)
 #define RADEON_RB3D_DEPTHOFFSET                0x1c24
+#define RADEON_RB3D_DEPTHCLEARVALUE    0x3230
 #define RADEON_RB3D_DEPTHPITCH         0x1c28
 #define RADEON_RB3D_PLANEMASK          0x1d84
 #define RADEON_RB3D_STENCILREFMASK     0x1d7c
@@ -395,11 +500,15 @@
 #define RADEON_RB3D_ZSTENCILCNTL       0x1c2c
 #      define RADEON_Z_TEST_MASK               (7 << 4)
 #      define RADEON_Z_TEST_ALWAYS             (7 << 4)
+#      define RADEON_Z_HIERARCHY_ENABLE        (1 << 8)
 #      define RADEON_STENCIL_TEST_ALWAYS       (7 << 12)
 #      define RADEON_STENCIL_S_FAIL_REPLACE    (2 << 16)
 #      define RADEON_STENCIL_ZPASS_REPLACE     (2 << 20)
 #      define RADEON_STENCIL_ZFAIL_REPLACE     (2 << 24)
+#      define RADEON_Z_COMPRESSION_ENABLE      (1 << 28)
+#      define RADEON_FORCE_Z_DIRTY             (1 << 29)
 #      define RADEON_Z_WRITE_ENABLE            (1 << 30)
+#      define RADEON_Z_DECOMPRESSION_ENABLE    (1 << 31)
 #define RADEON_RBBM_SOFT_RESET         0x00f0
 #      define RADEON_SOFT_RESET_CP             (1 <<  0)
 #      define RADEON_SOFT_RESET_HI             (1 <<  1)
@@ -478,6 +587,7 @@
 #      define RADEON_SURF_TILE_MODE_16BIT_Z    (3 << 16)
 #define RADEON_SURFACE0_LOWER_BOUND    0x0b04
 #define RADEON_SURFACE0_UPPER_BOUND    0x0b08
+#      define RADEON_SURF_ADDRESS_FIXED_MASK   (0x3ff << 0)
 #define RADEON_SURFACE1_INFO           0x0b1c
 #define RADEON_SURFACE1_LOWER_BOUND    0x0b14
 #define RADEON_SURFACE1_UPPER_BOUND    0x0b18
@@ -507,7 +617,7 @@
 #      define RADEON_WAIT_3D_IDLECLEAN         (1 << 17)
 #      define RADEON_WAIT_HOST_IDLECLEAN       (1 << 18)
 
-#define RADEON_RB3D_ZMASKOFFSET                0x1c34
+#define RADEON_RB3D_ZMASKOFFSET                0x3234
 #define RADEON_RB3D_ZSTENCILCNTL       0x1c2c
 #      define RADEON_DEPTH_FORMAT_16BIT_INT_Z  (0 << 0)
 #      define RADEON_DEPTH_FORMAT_24BIT_INT_Z  (2 << 0)
@@ -562,6 +672,8 @@
 #      define RADEON_3D_DRAW_IMMD              0x00002900
 #      define RADEON_3D_DRAW_INDX              0x00002A00
 #      define RADEON_3D_LOAD_VBPNTR            0x00002F00
+#      define RADEON_3D_CLEAR_ZMASK            0x00003200
+#      define RADEON_3D_CLEAR_HIZ              0x00003700
 #      define RADEON_CNTL_HOSTDATA_BLT         0x00009400
 #      define RADEON_CNTL_PAINT_MULTI          0x00009A00
 #      define RADEON_CNTL_BITBLT_MULTI         0x00009B00
@@ -720,6 +832,8 @@
 
 #define R200_RB3D_BLENDCOLOR              0x3218
 
+#define R200_SE_TCL_POINT_SPRITE_CNTL     0x22c4
+
 /* Constants */
 #define RADEON_MAX_USEC_TIMEOUT                100000  /* 100 ms */
 
diff -urN linux/drivers/char/drm/radeon_state.c 
linux/drivers/char/drm/radeon_state.c
--- linux/drivers/char/drm/radeon_state.c       2005/01/13 14:05:54     1.22
+++ linux/drivers/char/drm/radeon_state.c       2005/02/07 02:54:44     1.23
@@ -33,6 +33,37 @@
 #include "radeon_drm.h"
 #include "radeon_drv.h"
 
+drm_ioctl_desc_t radeon_ioctls[] = {
+       [DRM_IOCTL_NR(DRM_RADEON_CP_INIT)]    = { radeon_cp_init,      1, 1 },
+       [DRM_IOCTL_NR(DRM_RADEON_CP_START)]   = { radeon_cp_start,     1, 1 },
+       [DRM_IOCTL_NR(DRM_RADEON_CP_STOP)]    = { radeon_cp_stop,      1, 1 },
+       [DRM_IOCTL_NR(DRM_RADEON_CP_RESET)]   = { radeon_cp_reset,     1, 1 },
+       [DRM_IOCTL_NR(DRM_RADEON_CP_IDLE)]    = { radeon_cp_idle,      1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_CP_RESUME)]  = { radeon_cp_resume,    1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_RESET)]      = { radeon_engine_reset, 1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_FULLSCREEN)] = { radeon_fullscreen,   1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_SWAP)]       = { radeon_cp_swap,      1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_CLEAR)]      = { radeon_cp_clear,     1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_VERTEX)]     = { radeon_cp_vertex,    1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_INDICES)]    = { radeon_cp_indices,   1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_TEXTURE)]    = { radeon_cp_texture,   1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_STIPPLE)]    = { radeon_cp_stipple,   1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_INDIRECT)]   = { radeon_cp_indirect,  1, 1 },
+       [DRM_IOCTL_NR(DRM_RADEON_VERTEX2)]    = { radeon_cp_vertex2,   1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_CMDBUF)]     = { radeon_cp_cmdbuf,    1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_GETPARAM)]   = { radeon_cp_getparam,  1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_FLIP)]       = { radeon_cp_flip,      1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_ALLOC)]      = { radeon_mem_alloc,    1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_FREE)]       = { radeon_mem_free,     1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_INIT_HEAP)]  = { radeon_mem_init_heap,1, 1 },
+       [DRM_IOCTL_NR(DRM_RADEON_IRQ_EMIT)]   = { radeon_irq_emit,     1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_IRQ_WAIT)]   = { radeon_irq_wait,     1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_SETPARAM)]   = { radeon_cp_setparam,  1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_SURF_ALLOC)] = { radeon_surface_alloc,1, 0 },
+       [DRM_IOCTL_NR(DRM_RADEON_SURF_FREE)]  = { radeon_surface_free, 1, 0 }
+};
+
+int radeon_max_ioctl = DRM_ARRAY_SIZE(radeon_ioctls);
 
 /* ================================================================
  * Helper functions for client state checking and fixup
@@ -203,6 +234,7 @@
        case RADEON_EMIT_PP_TEX_SIZE_1:
        case RADEON_EMIT_PP_TEX_SIZE_2:
        case R200_EMIT_RB3D_BLENDCOLOR:
+       case R200_EMIT_TCL_POINT_SPRITE_CNTL:
                /* These packets don't contain memory offsets */
                break;
 
@@ -567,6 +599,7 @@
        { RADEON_PP_TEX_SIZE_1, 2, "RADEON_PP_TEX_SIZE_1" },
        { RADEON_PP_TEX_SIZE_2, 2, "RADEON_PP_TEX_SIZE_2" },
        { R200_RB3D_BLENDCOLOR, 3, "R200_RB3D_BLENDCOLOR" },
+       { R200_SE_TCL_POINT_SPRITE_CNTL, 1, "R200_SE_TCL_POINT_SPRITE_CNTL" },
 };
 
 
@@ -777,13 +810,160 @@
                        }
                }
        }
+       
+       /* hyper z clear */
+       /* no docs available, based on reverse engeneering by Stephane 
Marchesin */
+       if ((flags & (RADEON_DEPTH | RADEON_STENCIL)) && (flags & 
RADEON_CLEAR_FASTZ)) {
+
+               int i;
+               int depthpixperline = 
dev_priv->depth_fmt==RADEON_DEPTH_FORMAT_16BIT_INT_Z? 
+                       (dev_priv->depth_pitch / 2): (dev_priv->depth_pitch / 
4);
+               
+               u32 clearmask;
+
+               u32 tempRB3D_DEPTHCLEARVALUE = clear->clear_depth |
+                       ((clear->depth_mask & 0xff) << 24);
+       
+               
+               /* Make sure we restore the 3D state next time.
+                * we haven't touched any "normal" state - still need this?
+                */
+               dev_priv->sarea_priv->ctx_owner = 0;
+
+               if ((dev_priv->flags & CHIP_HAS_HIERZ) && (flags & 
RADEON_USE_HIERZ)) {
+               /* FIXME : reverse engineer that for Rx00 cards */
+               /* FIXME : the mask supposedly contains low-res z values. So 
can't set
+                  just to the max (0xff? or actually 0x3fff?), need to take z 
clear
+                  value into account? */
+               /* pattern seems to work for r100, though get slight
+                  rendering errors with glxgears. If hierz is not enabled for 
r100,
+                  only 4 bits which indicate clear (15,16,31,32, all zero) 
matter, the
+                  other ones are ignored, and the same clear mask can be used. 
That's
+                  very different behaviour than R200 which needs different 
clear mask
+                  and different number of tiles to clear if hierz is enabled 
or not !?!
+               */
+                       clearmask = (0xff<<22)|(0xff<<6)| 0x003f003f;
+               }
+               else {
+               /* clear mask : chooses the clearing pattern.
+                  rv250: could be used to clear only parts of macrotiles
+                  (but that would get really complicated...)?
+                  bit 0 and 1 (either or both of them ?!?!) are used to
+                  not clear tile (or maybe one of the bits indicates if the 
tile is
+                  compressed or not), bit 2 and 3 to not clear tile 1,...,.
+                  Pattern is as follows:
+                       | 0,1 | 4,5 | 8,9 |12,13|16,17|20,21|24,25|28,29|
+                  bits -------------------------------------------------
+                       | 2,3 | 6,7 |10,11|14,15|18,19|22,23|26,27|30,31|
+                  rv100: clearmask covers 2x8 4x1 tiles, but one clear still
+                  covers 256 pixels ?!?
+               */
+                       clearmask = 0x0;
+               }
+
+               BEGIN_RING( 8 );
+               RADEON_WAIT_UNTIL_2D_IDLE();
+               OUT_RING_REG( RADEON_RB3D_DEPTHCLEARVALUE,
+                       tempRB3D_DEPTHCLEARVALUE);
+               /* what offset is this exactly ? */
+               OUT_RING_REG( RADEON_RB3D_ZMASKOFFSET, 0 );
+               /* need ctlstat, otherwise get some strange black flickering */
+               OUT_RING_REG( RADEON_RB3D_ZCACHE_CTLSTAT, 
RADEON_RB3D_ZC_FLUSH_ALL );
+               ADVANCE_RING();
+
+               for (i = 0; i < nbox; i++) {
+                       int tileoffset, nrtilesx, nrtilesy, j;
+                       /* it looks like r200 needs rv-style clears, at least 
if hierz is not enabled? */
+                       if ((dev_priv->flags&CHIP_HAS_HIERZ) && 
!(dev_priv->microcode_version==UCODE_R200)) {
+                               /* FIXME : figure this out for r200 (when hierz 
is enabled). Or
+                                  maybe r200 actually doesn't need to put the 
low-res z value into
+                                  the tile cache like r100, but just needs to 
clear the hi-level z-buffer?
+                                  Works for R100, both with hierz and without.
+                                  R100 seems to operate on 2x1 8x8 tiles, 
but...
+                                  odd: offset/nrtiles need to be 64 pix (4 
block) aligned? Potentially
+                                  problematic with resolutions which are not 
64 pix aligned? */
+                               tileoffset = ((pbox[i].y1 >> 3) * 
depthpixperline + pbox[i].x1) >> 6;
+                               nrtilesx = ((pbox[i].x2 & ~63) - (pbox[i].x1 & 
~63)) >> 4;
+                               nrtilesy = (pbox[i].y2 >> 3) - (pbox[i].y1 >> 
3);
+                               for (j = 0; j <= nrtilesy; j++) {
+                                       BEGIN_RING( 4 );
+                                       OUT_RING( CP_PACKET3( 
RADEON_3D_CLEAR_ZMASK, 2 ) );
+                                       /* first tile */
+                                       OUT_RING( tileoffset * 8 );
+                                       /* the number of tiles to clear */
+                                       OUT_RING( nrtilesx + 4 );
+                                       /* clear mask : chooses the clearing 
pattern. */
+                                       OUT_RING( clearmask );
+                                       ADVANCE_RING();
+                                       tileoffset += depthpixperline >> 6;
+                               }
+                       }
+                       else if (dev_priv->microcode_version==UCODE_R200) {
+                               /* works for rv250. */
+                               /* find first macro tile (8x2 4x4 z-pixels on 
rv250) */
+                               tileoffset = ((pbox[i].y1 >> 3) * 
depthpixperline + pbox[i].x1) >> 5;
+                               nrtilesx = (pbox[i].x2 >> 5) - (pbox[i].x1 >> 
5);
+                               nrtilesy = (pbox[i].y2 >> 3) - (pbox[i].y1 >> 
3);
+                               for (j = 0; j <= nrtilesy; j++) {
+                                       BEGIN_RING( 4 );
+                                       OUT_RING( CP_PACKET3( 
RADEON_3D_CLEAR_ZMASK, 2 ) );
+                                       /* first tile */
+                                       /* judging by the first tile offset 
needed, could possibly
+                                          directly address/clear 4x4 tiles 
instead of 8x2 * 4x4
+                                          macro tiles, though would still need 
clear mask for
+                                          right/bottom if truely 4x4 
granularity is desired ? */
+                                       OUT_RING( tileoffset * 16 );
+                                       /* the number of tiles to clear */
+                                       OUT_RING( nrtilesx + 1 );
+                                       /* clear mask : chooses the clearing 
pattern. */
+                                       OUT_RING( clearmask );
+                                       ADVANCE_RING();
+                                       tileoffset += depthpixperline >> 5;
+                               }
+                       }
+                       else { /* rv 100 */
+                               /* rv100 might not need 64 pix alignment, who 
knows */
+                               /* offsets are, hmm, weird */
+                               tileoffset = ((pbox[i].y1 >> 4) * 
depthpixperline + pbox[i].x1) >> 6;
+                               nrtilesx = ((pbox[i].x2 & ~63) - (pbox[i].x1 & 
~63)) >> 4;
+                               nrtilesy = (pbox[i].y2 >> 4) - (pbox[i].y1 >> 
4);
+                               for (j = 0; j <= nrtilesy; j++) {
+                                       BEGIN_RING( 4 );
+                                       OUT_RING( CP_PACKET3( 
RADEON_3D_CLEAR_ZMASK, 2 ) );
+                                       OUT_RING( tileoffset * 128 );
+                                       /* the number of tiles to clear */
+                                       OUT_RING( nrtilesx + 4 );
+                                       /* clear mask : chooses the clearing 
pattern. */
+                                       OUT_RING( clearmask );
+                                       ADVANCE_RING();
+                                       tileoffset += depthpixperline >> 6;
+                               }
+                       }
+               }
+
+               /* TODO don't always clear all hi-level z tiles */
+               if ((dev_priv->flags & CHIP_HAS_HIERZ) && 
(dev_priv->microcode_version==UCODE_R200)
+                       && (flags & RADEON_USE_HIERZ))
+               /* r100 and cards without hierarchical z-buffer have no 
high-level z-buffer */
+               /* FIXME : the mask supposedly contains low-res z values. So 
can't set
+                  just to the max (0xff? or actually 0x3fff?), need to take z 
clear
+                  value into account? */
+               {
+                       BEGIN_RING( 4 );
+                       OUT_RING( CP_PACKET3( RADEON_3D_CLEAR_HIZ, 2 ) );
+                       OUT_RING( 0x0 ); /* First tile */
+                       OUT_RING( 0x3cc0 );
+                       OUT_RING( (0xff<<22)|(0xff<<6)| 0x003f003f);
+                       ADVANCE_RING();
+               }
+       }
 
        /* We have to clear the depth and/or stencil buffers by
         * rendering a quad into just those buffers.  Thus, we have to
         * make sure the 3D engine is configured correctly.
         */
-       if ( dev_priv->is_r200 &&
-            (flags & (RADEON_DEPTH | RADEON_STENCIL)) ) {
+       if ((dev_priv->microcode_version == UCODE_R200) &&
+           (flags & (RADEON_DEPTH | RADEON_STENCIL))) {
 
                int tempPP_CNTL;
                int tempRE_CNTL;
@@ -802,7 +982,6 @@
                tempRE_CNTL = 0;
 
                tempRB3D_CNTL = depth_clear->rb3d_cntl;
-               tempRB3D_CNTL &= ~(1<<15); /* unset radeon magic flag */
 
                tempRB3D_ZSTENCILCNTL = depth_clear->rb3d_zstencilcntl;
                tempRB3D_STENCILREFMASK = 0x0;
@@ -853,6 +1032,14 @@
                        tempRB3D_STENCILREFMASK = 0x00000000;
                }
 
+               if (flags & RADEON_USE_COMP_ZBUF) {
+                       tempRB3D_ZSTENCILCNTL |= RADEON_Z_COMPRESSION_ENABLE |
+                               RADEON_Z_DECOMPRESSION_ENABLE;
+               }
+               if (flags & RADEON_USE_HIERZ) {
+                       tempRB3D_ZSTENCILCNTL |= RADEON_Z_HIERARCHY_ENABLE;
+               }
+
                BEGIN_RING( 26 );
                RADEON_WAIT_UNTIL_2D_IDLE();
 
@@ -907,6 +1094,8 @@
        } 
        else if ( (flags & (RADEON_DEPTH | RADEON_STENCIL)) ) {
 
+               int tempRB3D_ZSTENCILCNTL = depth_clear->rb3d_zstencilcntl;
+
                rb3d_cntl = depth_clear->rb3d_cntl;
 
                if ( flags & RADEON_DEPTH ) {
@@ -923,6 +1112,14 @@
                        rb3d_stencilrefmask = 0x00000000;
                }
 
+               if (flags & RADEON_USE_COMP_ZBUF) {
+                       tempRB3D_ZSTENCILCNTL |= RADEON_Z_COMPRESSION_ENABLE |
+                               RADEON_Z_DECOMPRESSION_ENABLE;
+               }
+               if (flags & RADEON_USE_HIERZ) {
+                       tempRB3D_ZSTENCILCNTL |= RADEON_Z_HIERARCHY_ENABLE;
+               }
+
                BEGIN_RING( 13 );
                RADEON_WAIT_UNTIL_2D_IDLE();
 
@@ -930,8 +1127,7 @@
                OUT_RING( 0x00000000 );
                OUT_RING( rb3d_cntl );
                
-               OUT_RING_REG( RADEON_RB3D_ZSTENCILCNTL,
-                             depth_clear->rb3d_zstencilcntl );
+               OUT_RING_REG( RADEON_RB3D_ZSTENCILCNTL, tempRB3D_ZSTENCILCNTL );
                OUT_RING_REG( RADEON_RB3D_STENCILREFMASK,
                              rb3d_stencilrefmask );
                OUT_RING_REG( RADEON_RB3D_PLANEMASK,
@@ -1537,10 +1733,203 @@
        ADVANCE_RING();
 }
 
+static void radeon_apply_surface_regs(int surf_index, drm_radeon_private_t 
*dev_priv)
+{
+       if (!dev_priv->mmio)
+               return;
+
+       radeon_do_cp_idle(dev_priv);
+
+       RADEON_WRITE(RADEON_SURFACE0_INFO + 16*surf_index,
+               dev_priv->surfaces[surf_index].flags);
+       RADEON_WRITE(RADEON_SURFACE0_LOWER_BOUND + 16*surf_index,
+               dev_priv->surfaces[surf_index].lower);
+       RADEON_WRITE(RADEON_SURFACE0_UPPER_BOUND + 16*surf_index,
+               dev_priv->surfaces[surf_index].upper);
+}
+
+
+/* Allocates a virtual surface
+ * doesn't always allocate a real surface, will stretch an existing 
+ * surface when possible.
+ *
+ * Note that refcount can be at most 2, since during a free refcount=3
+ * might mean we have to allocate a new surface which might not always
+ * be available.
+ * For example : we allocate three contigous surfaces ABC. If B is 
+ * freed, we suddenly need two surfaces to store A and C, which might
+ * not always be available.
+ */
+static int alloc_surface(drm_radeon_surface_alloc_t* new, drm_radeon_private_t 
*dev_priv, DRMFILE filp)
+{
+       struct radeon_virt_surface *s;
+       int i;
+       int virt_surface_index;
+       uint32_t new_upper, new_lower;
+
+       new_lower = new->address;
+       new_upper = new_lower + new->size - 1;
+
+       /* sanity check */
+       if ((new_lower >= new_upper) || (new->flags == 0) || (new->size == 0) ||
+               ((new_upper & RADEON_SURF_ADDRESS_FIXED_MASK) != 
RADEON_SURF_ADDRESS_FIXED_MASK) ||
+               ((new_lower & RADEON_SURF_ADDRESS_FIXED_MASK) != 0))
+               return -1;
+
+       /* make sure there is no overlap with existing surfaces */
+       for (i = 0; i < RADEON_MAX_SURFACES; i++) {
+               if ((dev_priv->surfaces[i].refcount != 0) &&
+               (( (new_lower >= dev_priv->surfaces[i].lower) &&
+                       (new_lower < dev_priv->surfaces[i].upper) ) ||
+                ( (new_lower < dev_priv->surfaces[i].lower) &&
+                       (new_upper > dev_priv->surfaces[i].lower) )) ){
+               return -1;}
+       }
+
+       /* find a virtual surface */
+       for (i = 0; i < 2*RADEON_MAX_SURFACES; i++)
+               if (dev_priv->virt_surfaces[i].filp == 0)
+                       break;
+       if (i == 2*RADEON_MAX_SURFACES) {
+               return -1;}
+       virt_surface_index = i;
+
+       /* try to reuse an existing surface */
+       for (i = 0; i < RADEON_MAX_SURFACES; i++) {
+               /* extend before */
+               if ((dev_priv->surfaces[i].refcount == 1) &&
+                 (new->flags == dev_priv->surfaces[i].flags) &&
+                 (new_upper + 1 == dev_priv->surfaces[i].lower)) {
+                       s = &(dev_priv->virt_surfaces[virt_surface_index]);
+                       s->surface_index = i;
+                       s->lower = new_lower;
+                       s->upper = new_upper;
+                       s->flags = new->flags;
+                       s->filp = filp;
+                       dev_priv->surfaces[i].refcount++;
+                       dev_priv->surfaces[i].lower = s->lower;
+                       radeon_apply_surface_regs(s->surface_index, dev_priv);
+                       return virt_surface_index;
+               }
+
+               /* extend after */
+               if ((dev_priv->surfaces[i].refcount == 1) &&
+                 (new->flags == dev_priv->surfaces[i].flags) &&
+                 (new_lower == dev_priv->surfaces[i].upper + 1)) {
+                       s = &(dev_priv->virt_surfaces[virt_surface_index]);
+                       s->surface_index = i;
+                       s->lower = new_lower;
+                       s->upper = new_upper;
+                       s->flags = new->flags;
+                       s->filp = filp;
+                       dev_priv->surfaces[i].refcount++;
+                       dev_priv->surfaces[i].upper = s->upper;
+                       radeon_apply_surface_regs(s->surface_index, dev_priv);
+                       return virt_surface_index;
+               }
+       }
+
+       /* okay, we need a new one */
+       for (i = 0; i < RADEON_MAX_SURFACES; i++) {
+               if (dev_priv->surfaces[i].refcount == 0) {
+                       s = &(dev_priv->virt_surfaces[virt_surface_index]);
+                       s->surface_index = i;
+                       s->lower = new_lower;
+                       s->upper = new_upper;
+                       s->flags = new->flags;
+                       s->filp = filp;
+                       dev_priv->surfaces[i].refcount = 1;
+                       dev_priv->surfaces[i].lower = s->lower;
+                       dev_priv->surfaces[i].upper = s->upper;
+                       dev_priv->surfaces[i].flags = s->flags;
+                       radeon_apply_surface_regs(s->surface_index, dev_priv);
+                       return virt_surface_index;
+               }
+       }
+
+       /* we didn't find anything */
+       return -1;
+}
+
+static int free_surface(DRMFILE filp, drm_radeon_private_t *dev_priv, int 
lower)
+{
+       struct radeon_virt_surface *s;
+       int i;
+       /* find the virtual surface */
+       for(i = 0; i < 2*RADEON_MAX_SURFACES; i++) {
+               s = &(dev_priv->virt_surfaces[i]);
+               if (s->filp) {
+                       if ((lower == s->lower) && (filp == s->filp)) {
+                               if (dev_priv->surfaces[s->surface_index].lower 
== s->lower)
+                                       
dev_priv->surfaces[s->surface_index].lower = s->upper;
+
+                               if (dev_priv->surfaces[s->surface_index].upper 
== s->upper)
+                                       
dev_priv->surfaces[s->surface_index].upper = s->lower;
+
+                               dev_priv->surfaces[s->surface_index].refcount--;
+                               if 
(dev_priv->surfaces[s->surface_index].refcount == 0)
+                                       
dev_priv->surfaces[s->surface_index].flags = 0;
+                               s->filp = 0;
+                               radeon_apply_surface_regs(s->surface_index, 
dev_priv);
+                               return 0;
+                       }
+               }
+       }
+       return 1;
+}
+
+static void radeon_surfaces_release(DRMFILE filp, drm_radeon_private_t 
*dev_priv)
+{
+       int i;
+       for( i = 0; i < 2*RADEON_MAX_SURFACES; i++)
+       {
+               if (dev_priv->virt_surfaces[i].filp == filp)
+                       free_surface(filp, dev_priv, 
dev_priv->virt_surfaces[i].lower);
+       }
+}
 
 /* ================================================================
  * IOCTL functions
  */
+int radeon_surface_alloc(DRM_IOCTL_ARGS)
+{
+       DRM_DEVICE;
+       drm_radeon_private_t *dev_priv = dev->dev_private;
+       drm_radeon_surface_alloc_t alloc;
+
+       if (!dev_priv) {
+               DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
+               return DRM_ERR(EINVAL);
+       }
+
+       DRM_COPY_FROM_USER_IOCTL(alloc, (drm_radeon_surface_alloc_t __user 
*)data,
+                                 sizeof(alloc));
+
+       if (alloc_surface(&alloc, dev_priv, filp) == -1)
+               return DRM_ERR(EINVAL);
+       else
+               return 0;
+}
+
+int radeon_surface_free(DRM_IOCTL_ARGS)
+{
+       DRM_DEVICE;
+       drm_radeon_private_t *dev_priv = dev->dev_private;
+       drm_radeon_surface_free_t memfree;
+
+       if (!dev_priv) {
+               DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
+               return DRM_ERR(EINVAL);
+       }
+
+       DRM_COPY_FROM_USER_IOCTL(memfree, (drm_radeon_mem_free_t __user *)data,
+                                 sizeof(memfree) );
+
+       if (free_surface(filp, dev_priv, memfree.address))
+               return DRM_ERR(EINVAL);
+       else
+               return 0;
+}
 
 int radeon_cp_clear( DRM_IOCTL_ARGS )
 {
@@ -2539,6 +2928,20 @@
                radeon_priv = filp_priv->driver_priv;
                radeon_priv->radeon_fb_delta = dev_priv->fb_location - sp.value;
                break;
+       case RADEON_SETPARAM_SWITCH_TILING:
+               if (sp.value == 0) {
+                       DRM_DEBUG( "color tiling disabled\n" );
+                       dev_priv->front_pitch_offset &= ~RADEON_DST_TILE_MACRO;
+                       dev_priv->back_pitch_offset &= ~RADEON_DST_TILE_MACRO;
+                       dev_priv->sarea_priv->tiling_enabled = 0;
+               }
+               else if (sp.value == 1) {
+                       DRM_DEBUG( "color tiling enabled\n" );
+                       dev_priv->front_pitch_offset |= RADEON_DST_TILE_MACRO;
+                       dev_priv->back_pitch_offset |= RADEON_DST_TILE_MACRO;
+                       dev_priv->sarea_priv->tiling_enabled = 1;
+               }
+               break;  
        default:
                DRM_DEBUG( "Invalid parameter %d\n", sp.param );
                return DRM_ERR( EINVAL );
@@ -2562,6 +2965,7 @@
                }                                               
                radeon_mem_release( filp, dev_priv->gart_heap ); 
                radeon_mem_release( filp, dev_priv->fb_heap );  
+               radeon_surfaces_release(filp, dev_priv);
        }                               
 }
 
diff -urN linux/drivers/char/drm/sis_drv.c linux/drivers/char/drm/sis_drv.c
--- linux/drivers/char/drm/sis_drv.c    2005/01/13 14:05:55     1.7
+++ linux/drivers/char/drm/sis_drv.c    2005/02/07 02:54:44     1.8
@@ -63,14 +63,8 @@
        sisdrv_PCI_IDS
 };
 
-static drm_ioctl_desc_t ioctls[] = {
-       [DRM_IOCTL_NR(DRM_SIS_FB_ALLOC)]  = { sis_fb_alloc,        1, 0 },
-       [DRM_IOCTL_NR(DRM_SIS_FB_FREE)]   = { sis_fb_free,         1, 0 },
-       [DRM_IOCTL_NR(DRM_SIS_AGP_INIT)]  = { sis_ioctl_agp_init,  1, 1 },
-       [DRM_IOCTL_NR(DRM_SIS_AGP_ALLOC)] = { sis_ioctl_agp_alloc, 1, 0 },
-       [DRM_IOCTL_NR(DRM_SIS_AGP_FREE)]  = { sis_ioctl_agp_free,  1, 0 },
-       [DRM_IOCTL_NR(DRM_SIS_FB_INIT)]   = { sis_fb_init,         1, 1 }
-};
+extern drm_ioctl_desc_t sis_ioctls[];
+extern int sis_max_ioctl;
 
 static struct drm_driver driver = {
        .driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR,
@@ -81,8 +75,7 @@
        .get_reg_ofs = drm_core_get_reg_ofs,
        .postinit = postinit,
        .version = version,
-       .ioctls = ioctls,
-       .num_ioctls = DRM_ARRAY_SIZE(ioctls),
+       .ioctls = sis_ioctls,
        .fops = {
                .owner = THIS_MODULE,
                .open = drm_open,
@@ -100,6 +93,7 @@
 
 static int __init sis_init(void)
 {
+       driver.num_ioctls = sis_max_ioctl;
        return drm_init(&driver);
 }
 
diff -urN linux/drivers/char/drm/sis_mm.c linux/drivers/char/drm/sis_mm.c
--- linux/drivers/char/drm/sis_mm.c     2005/01/13 14:05:55     1.10
+++ linux/drivers/char/drm/sis_mm.c     2005/02/07 02:54:44     1.11
@@ -36,6 +36,17 @@
 #include <video/sisfb.h>
 #endif
 
+drm_ioctl_desc_t sis_ioctls[] = {
+       [DRM_IOCTL_NR(DRM_SIS_FB_ALLOC)]  = { sis_fb_alloc,        1, 0 },
+       [DRM_IOCTL_NR(DRM_SIS_FB_FREE)]   = { sis_fb_free,         1, 0 },
+       [DRM_IOCTL_NR(DRM_SIS_AGP_INIT)]  = { sis_ioctl_agp_init,  1, 1 },
+       [DRM_IOCTL_NR(DRM_SIS_AGP_ALLOC)] = { sis_ioctl_agp_alloc, 1, 0 },
+       [DRM_IOCTL_NR(DRM_SIS_AGP_FREE)]  = { sis_ioctl_agp_free,  1, 0 },
+       [DRM_IOCTL_NR(DRM_SIS_FB_INIT)]   = { sis_fb_init,         1, 1 }
+};
+
+int sis_max_ioctl = DRM_ARRAY_SIZE(sis_ioctls);
+
 #define MAX_CONTEXT 100
 #define VIDEO_TYPE 0 
 #define AGP_TYPE 1
diff -urN linux/drivers/char/drm/ffb.h linux/drivers/char/drm/ffb.h
--- linux/drivers/char/drm/Attic/ffb.h  Mon Feb  7 02:54:44 2005        1.3
+++ linux/drivers/char/drm/Attic/ffb.h  1970/01/01 00:00:002002
@@ -1,12 +0,0 @@
-/* ffb.h -- ffb DRM template customization -*- linux-c -*-
- */
-
-#ifndef __FFB_H__
-#define __FFB_H__
-
-/* This remains constant for all DRM template files.
- */
-#define DRM(x) ffb_##x
-
-#endif
-
diff -urN linux/drivers/char/drm/gamma.h linux/drivers/char/drm/gamma.h
--- linux/drivers/char/drm/Attic/gamma.h        Mon Feb  7 02:54:44 2005        
1.6
+++ linux/drivers/char/drm/Attic/gamma.h        1970/01/01 00:00:002002
@@ -1,77 +0,0 @@
-/* gamma.c -- 3dlabs GMX 2000 driver -*- linux-c -*-
- * Created: Mon Jan  4 08:58:31 1999 by gareth@valinux.com
- *
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Gareth Hughes <gareth@valinux.com>
- */
-
-#ifndef __GAMMA_H__
-#define __GAMMA_H__
-
-/* This remains constant for all DRM template files.
- */
-#define DRM(x) gamma_##x
-
-/* General customization:
- */
-#define DRIVER_AUTHOR          "VA Linux Systems Inc."
-
-#define DRIVER_NAME            "gamma"
-#define DRIVER_DESC            "3DLabs gamma"
-#define DRIVER_DATE            "20010624"
-
-#define DRIVER_MAJOR           2
-#define DRIVER_MINOR           0
-#define DRIVER_PATCHLEVEL      0
-
-#define DRIVER_IOCTLS                                                    \
-       [DRM_IOCTL_NR(DRM_IOCTL_DMA)]        = { gamma_dma,       1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_GAMMA_INIT)] = { gamma_dma_init,  1, 1 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_GAMMA_COPY)] = { gamma_dma_copy,  1, 1 }
-
-#define IOCTL_TABLE_NAME       DRM(ioctls)
-#define IOCTL_FUNC_NAME        DRM(ioctl)
-
-#define __HAVE_COUNTERS                5
-#define __HAVE_COUNTER6                _DRM_STAT_IRQ
-#define __HAVE_COUNTER7                _DRM_STAT_DMA
-#define __HAVE_COUNTER8                _DRM_STAT_PRIMARY
-#define __HAVE_COUNTER9                _DRM_STAT_SPECIAL
-#define __HAVE_COUNTER10       _DRM_STAT_MISSED
-
-/* Driver customization:
- */
-#define DRIVER_PRETAKEDOWN() do {                                      \
-       gamma_do_cleanup_dma( dev );                                    \
-} while (0)
-
-/* DMA customization:
- */
-#define __HAVE_MULTIPLE_DMA_QUEUES     1
-#define __HAVE_DMA_WAITQUEUE           1
-
-/* removed from DRM HAVE_DMA_FREELIST & HAVE_DMA_SCHEDULE */
-
-#endif /* __GAMMA_H__ */
diff -urN linux/drivers/char/drm/i810.h linux/drivers/char/drm/i810.h
--- linux/drivers/char/drm/Attic/i810.h Mon Feb  7 02:54:44 2005        1.10
+++ linux/drivers/char/drm/Attic/i810.h 1970/01/01 00:00:002002
@@ -1,77 +0,0 @@
-/* i810.h -- Intel i810/i815 DRM template customization -*- linux-c -*-
- * Created: Thu Feb 15 00:01:12 2001 by gareth@valinux.com
- *
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Gareth Hughes <gareth@valinux.com>
- */
-
-#ifndef __I810_H__
-#define __I810_H__
-
-/* This remains constant for all DRM template files.
- */
-#define DRM(x) i810_##x
-
-/* General customization:
- */
-
-#define DRIVER_AUTHOR          "VA Linux Systems Inc."
-
-#define DRIVER_NAME            "i810"
-#define DRIVER_DESC            "Intel i810"
-#define DRIVER_DATE            "20030605"
-
-/* Interface history
- *
- * 1.1   - XFree86 4.1
- * 1.2   - XvMC interfaces
- *       - XFree86 4.2
- * 1.2.1 - Disable copying code (leave stub ioctls for backwards compatibility)
- *       - Remove requirement for interrupt (leave stubs again)
- * 1.3   - Add page flipping.
- * 1.4   - fix DRM interface
- */
-#define DRIVER_MAJOR           1
-#define DRIVER_MINOR           4
-#define DRIVER_PATCHLEVEL      0
-
-#define DRIVER_IOCTLS                                                      \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_INIT)]   = { i810_dma_init,    1, 1 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_VERTEX)] = { i810_dma_vertex,  1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_CLEAR)]  = { i810_clear_bufs,  1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_FLUSH)]  = { i810_flush_ioctl, 1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_GETAGE)] = { i810_getage,      1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_GETBUF)] = { i810_getbuf,      1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_SWAP)]   = { i810_swap_bufs,   1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_COPY)]   = { i810_copybuf,     1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_DOCOPY)] = { i810_docopy,      1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_OV0INFO)] = { i810_ov0_info,   1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_FSTATUS)] = { i810_fstatus,    1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_OV0FLIP)] = { i810_ov0_flip,   1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_MC)]      = { i810_dma_mc,     1, 1 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_RSTATUS)] = { i810_rstatus,    1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I810_FLIP)] =    { i810_flip_bufs,  1, 0 }
-
-#endif
diff -urN linux/drivers/char/drm/i830.h linux/drivers/char/drm/i830.h
--- linux/drivers/char/drm/Attic/i830.h Mon Feb  7 02:54:44 2005        1.8
+++ linux/drivers/char/drm/Attic/i830.h 1970/01/01 00:00:002002
@@ -1,83 +0,0 @@
-/* i830.h -- Intel I830 DRM template customization -*- linux-c -*-
- * Created: Thu Feb 15 00:01:12 2001 by gareth@valinux.com
- *
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Gareth Hughes <gareth@valinux.com>
- */
-
-#ifndef __I830_H__
-#define __I830_H__
-
-/* This remains constant for all DRM template files.
- */
-#define DRM(x) i830_##x
-
-/* General customization:
- */
-
-#define DRIVER_AUTHOR          "VA Linux Systems Inc."
-
-#define DRIVER_NAME            "i830"
-#define DRIVER_DESC            "Intel 830M"
-#define DRIVER_DATE            "20021108"
-
-/* Interface history:
- *
- * 1.1: Original.
- * 1.2: ?
- * 1.3: New irq emit/wait ioctls.
- *      New pageflip ioctl.
- *      New getparam ioctl.
- *      State for texunits 3&4 in sarea.
- *      New (alternative) layout for texture state.
- */
-#define DRIVER_MAJOR           1
-#define DRIVER_MINOR           3
-#define DRIVER_PATCHLEVEL      2
-
-#define DRIVER_IOCTLS                                                      \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_INIT)]   = { i830_dma_init,    1, 1 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_VERTEX)] = { i830_dma_vertex,  1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_CLEAR)]  = { i830_clear_bufs,  1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_FLUSH)]  = { i830_flush_ioctl, 1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_GETAGE)] = { i830_getage,      1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_GETBUF)] = { i830_getbuf,      1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_SWAP)]   = { i830_swap_bufs,   1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_COPY)]   = { i830_copybuf,     1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_DOCOPY)] = { i830_docopy,      1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_FLIP)]   = { i830_flip_bufs,   1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_IRQ_EMIT)] = { i830_irq_emit,  1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_IRQ_WAIT)] = { i830_irq_wait,  1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_GETPARAM)] = { i830_getparam,  1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I830_SETPARAM)] = { i830_setparam,  1, 0 } 
-
-/* Driver will work either way: IRQ's save cpu time when waiting for
- * the card, but are subject to subtle interactions between bios,
- * hardware and the driver.
- */
-/* XXX: Add vblank support? */
-#define USE_IRQS 0
-
-#endif
diff -urN linux/drivers/char/drm/i915.h linux/drivers/char/drm/i915.h
--- linux/drivers/char/drm/Attic/i915.h Mon Feb  7 02:54:44 2005        1.2
+++ linux/drivers/char/drm/Attic/i915.h 1970/01/01 00:00:002002
@@ -1,53 +0,0 @@
-/* i915.h -- Intel I915 DRM template customization -*- linux-c -*-
- */
-/**************************************************************************
- * 
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
- * All Rights Reserved.
- * 
- **************************************************************************/
-
-#ifndef __I915_H__
-#define __I915_H__
-
-/* This remains constant for all DRM template files.
- */
-#define DRM(x) i915_##x
-
-/* General customization:
- */
-
-#define DRIVER_AUTHOR          "Tungsten Graphics, Inc."
-
-#define DRIVER_NAME            "i915"
-#define DRIVER_DESC            "Intel Graphics"
-#define DRIVER_DATE            "20040405"
-
-/* Interface history:
- *
- * 1.1: Original.
- */
-#define DRIVER_MAJOR           1
-#define DRIVER_MINOR           1
-#define DRIVER_PATCHLEVEL      0
-
-#define DRIVER_IOCTLS                                                      \
-       [DRM_IOCTL_NR(DRM_IOCTL_I915_INIT)]   = { i915_dma_init,    1, 1 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I915_FLUSH)]  = { i915_flush_ioctl, 1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I915_FLIP)]   = { i915_flip_bufs,   1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I915_BATCHBUFFER)] = { i915_batchbuffer, 1, 0 
}, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I915_IRQ_EMIT)] = { i915_irq_emit,  1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I915_IRQ_WAIT)] = { i915_irq_wait,  1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I915_GETPARAM)] = { i915_getparam,  1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I915_SETPARAM)] = { i915_setparam,  1, 1 }, \
-        [DRM_IOCTL_NR(DRM_IOCTL_I915_ALLOC)]   = { i915_mem_alloc,  1, 0 }, \
-        [DRM_IOCTL_NR(DRM_IOCTL_I915_FREE)]    = { i915_mem_free,    1, 0 }, \
-        [DRM_IOCTL_NR(DRM_IOCTL_I915_INIT_HEAP)] = { i915_mem_init_heap, 1, 1 
}, \
-       [DRM_IOCTL_NR(DRM_IOCTL_I915_CMDBUFFER)] = { i915_cmdbuffer, 1, 0 }
-
-/* We use our own dma mechanisms, not the drm template code.  However,
- * the shared IRQ code is useful to us:
- */
-#define __HAVE_PM              1
-
-#endif
diff -urN linux/drivers/char/drm/mga.h linux/drivers/char/drm/mga.h
--- linux/drivers/char/drm/Attic/mga.h  Mon Feb  7 02:54:44 2005        1.7
+++ linux/drivers/char/drm/Attic/mga.h  1970/01/01 00:00:002002
@@ -1,63 +0,0 @@
-/* mga.h -- Matrox G200/G400 DRM template customization -*- linux-c -*-
- * Created: Thu Jan 11 21:29:32 2001 by gareth@valinux.com
- *
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Gareth Hughes <gareth@valinux.com>
- */
-
-#ifndef __MGA_H__
-#define __MGA_H__
-
-/* This remains constant for all DRM template files.
- */
-#define DRM(x) mga_##x
-
-/* General customization:
- */
-
-#define DRIVER_AUTHOR          "Gareth Hughes, VA Linux Systems Inc."
-
-#define DRIVER_NAME            "mga"
-#define DRIVER_DESC            "Matrox G200/G400"
-#define DRIVER_DATE            "20021029"
-
-#define DRIVER_MAJOR           3
-#define DRIVER_MINOR           1
-#define DRIVER_PATCHLEVEL      0
-
-#define DRIVER_IOCTLS                                                     \
-       [DRM_IOCTL_NR(DRM_IOCTL_DMA)]         = { mga_dma_buffers, 1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_MGA_INIT)]    = { mga_dma_init,    1, 1 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_MGA_FLUSH)]   = { mga_dma_flush,   1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_MGA_RESET)]   = { mga_dma_reset,   1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_MGA_SWAP)]    = { mga_dma_swap,    1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_MGA_CLEAR)]   = { mga_dma_clear,   1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_MGA_VERTEX)]  = { mga_dma_vertex,  1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_MGA_INDICES)] = { mga_dma_indices, 1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_MGA_ILOAD)]   = { mga_dma_iload,   1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_MGA_BLIT)]    = { mga_dma_blit,    1, 0 }, \
-       [DRM_IOCTL_NR(DRM_IOCTL_MGA_GETPARAM)]= { mga_getparam,    1, 0 },
-
-#endif
diff -urN linux/drivers/char/drm/r128.h linux/drivers/char/drm/r128.h
--- linux/drivers/char/drm/Attic/r128.h Mon Feb  7 02:54:44 2005        1.10
+++ linux/drivers/char/drm/Attic/r128.h 1970/01/01 00:00:002002
@@ -1,75 +0,0 @@
-/* r128.h -- ATI Rage 128 DRM template customization -*- linux-c -*-
- * Created: Wed Feb 14 16:07:10 2001 by gareth@valinux.com
- *
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Gareth Hughes <gareth@valinux.com>
- */
-
-#ifndef __R128_H__
-#define __R128_H__
-
-/* This remains constant for all DRM template files.
- */
-#define DRM(x) r128_##x
-
-/* General customization:
- */
-#define DRIVER_AUTHOR          "Gareth Hughes, VA Linux Systems Inc."
-
-#define DRIVER_NAME            "r128"
-#define DRIVER_DESC            "ATI Rage 128"
-#define DRIVER_DATE            "20030725"
-
-#define DRIVER_MAJOR           2
-#define DRIVER_MINOR           5
-#define DRIVER_PATCHLEVEL      0
-
-/* Interface history:
- *
- * ??  - ??
- * 2.4 - Add support for ycbcr textures (no new ioctls)
- * 2.5 - Add FLIP ioctl, disable FULLSCREEN.
- */
-#define DRIVER_IOCTLS                                                      \
-   [DRM_IOCTL_NR(DRM_IOCTL_DMA)]             = { r128_cce_buffers,  1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_INIT)]       = { r128_cce_init,     1, 1 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_START)]  = { r128_cce_start,    1, 1 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_STOP)]   = { r128_cce_stop,     1, 1 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_RESET)]  = { r128_cce_reset,    1, 1 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_IDLE)]   = { r128_cce_idle,     1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_RESET)]      = { r128_engine_reset, 1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_FULLSCREEN)] = { r128_fullscreen,   1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_SWAP)]       = { r128_cce_swap,     1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_FLIP)]       = { r128_cce_flip,     1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_CLEAR)]      = { r128_cce_clear,    1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_VERTEX)]     = { r128_cce_vertex,   1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_INDICES)]    = { r128_cce_indices,  1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_BLIT)]       = { r128_cce_blit,     1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_DEPTH)]      = { r128_cce_depth,    1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_STIPPLE)]    = { r128_cce_stipple,  1, 0 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_INDIRECT)]   = { r128_cce_indirect, 1, 1 }, \
-   [DRM_IOCTL_NR(DRM_IOCTL_R128_GETPARAM)]   = { r128_getparam, 1, 0 },
-
-#endif
diff -urN linux/drivers/char/drm/radeon.h linux/drivers/char/drm/radeon.h
--- linux/drivers/char/drm/Attic/radeon.h       Mon Feb  7 02:54:44 2005        
1.16
+++ linux/drivers/char/drm/Attic/radeon.h       1970/01/01 00:00:002002
@@ -1,112 +0,0 @@
-/* radeon.h -- ATI Radeon DRM template customization -*- linux-c -*-
- * Created: Wed Feb 14 17:07:34 2001 by gareth@valinux.com
- *
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Gareth Hughes <gareth@valinux.com>
- *    Keith Whitwell <keith@tungstengraphics.com>
- */
-
-#ifndef __RADEON_H__
-#define __RADEON_H__
-
-/* This remains constant for all DRM template files.
- */
-#define DRM(x) radeon_##x
-
-/* General customization:
- */
-
-#define DRIVER_AUTHOR          "Gareth Hughes, Keith Whitwell, others."
-
-#define DRIVER_NAME            "radeon"
-#define DRIVER_DESC            "ATI Radeon"
-#define DRIVER_DATE            "20020828"
-
-#define DRIVER_MAJOR           1
-#define DRIVER_MINOR           11
-#define DRIVER_PATCHLEVEL      0
-
-/* Interface history:
- *
- * 1.1 - ??
- * 1.2 - Add vertex2 ioctl (keith)
- *     - Add stencil capability to clear ioctl (gareth, keith)
- *     - Increase MAX_TEXTURE_LEVELS (brian)
- * 1.3 - Add cmdbuf ioctl (keith)
- *     - Add support for new radeon packets (keith)
- *     - Add getparam ioctl (keith)
- *     - Add flip-buffers ioctl, deprecate fullscreen foo (keith).
- * 1.4 - Add scratch registers to get_param ioctl.
- * 1.5 - Add r200 packets to cmdbuf ioctl
- *     - Add r200 function to init ioctl
- *     - Add 'scalar2' instruction to cmdbuf
- * 1.6 - Add static GART memory manager
- *       Add irq handler (won't be turned on unless X server knows to)
- *       Add irq ioctls and irq_active getparam.
- *       Add wait command for cmdbuf ioctl
- *       Add GART offset query for getparam
- * 1.7 - Add support for cube map registers: R200_PP_CUBIC_FACES_[0..5]
- *       and R200_PP_CUBIC_OFFSET_F1_[0..5].
- *       Added packets R200_EMIT_PP_CUBIC_FACES_[0..5] and
- *       R200_EMIT_PP_CUBIC_OFFSETS_[0..5].  (brian)
- * 1.8 - Remove need to call cleanup ioctls on last client exit (keith)
- *       Add 'GET' queries for starting additional clients on different VT's.
- * 1.9 - Add DRM_IOCTL_RADEON_CP_RESUME ioctl.
- *       Add texture rectangle support for r100.
- * 1.10- Add SETPARAM ioctl; first parameter to set is FB_LOCATION, which
- *       clients use to tell the DRM where they think the framebuffer is 
- *       located in the card's address space
- * 1.11- Add packet R200_EMIT_RB3D_BLENDCOLOR to support GL_EXT_blend_color
- *       and GL_EXT_blend_[func|equation]_separate on r200
- */
-#define DRIVER_IOCTLS                                                       \
- [DRM_IOCTL_NR(DRM_IOCTL_DMA)]               = { radeon_cp_buffers,  1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_INIT)]    = { radeon_cp_init,     1, 1 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_START)]   = { radeon_cp_start,    1, 1 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_STOP)]    = { radeon_cp_stop,     1, 1 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_RESET)]   = { radeon_cp_reset,    1, 1 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_IDLE)]    = { radeon_cp_idle,     1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_RESUME)]  = { radeon_cp_resume,   1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_RESET)]    = { radeon_engine_reset,  1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_FULLSCREEN)] = { radeon_fullscreen,  1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_SWAP)]       = { radeon_cp_swap,     1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_CLEAR)]      = { radeon_cp_clear,    1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX)]     = { radeon_cp_vertex,   1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDICES)]    = { radeon_cp_indices,  1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_TEXTURE)]    = { radeon_cp_texture,  1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_STIPPLE)]    = { radeon_cp_stipple,  1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDIRECT)]   = { radeon_cp_indirect, 1, 1 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX2)]    = { radeon_cp_vertex2,  1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_CMDBUF)]     = { radeon_cp_cmdbuf,   1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_GETPARAM)]   = { radeon_cp_getparam, 1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_FLIP)]       = { radeon_cp_flip,     1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_ALLOC)]      = { radeon_mem_alloc,   1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_FREE)]       = { radeon_mem_free,    1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_INIT_HEAP)]  = { radeon_mem_init_heap, 1, 1 }, 
\
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_IRQ_EMIT)]   = { radeon_irq_emit,    1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_IRQ_WAIT)]   = { radeon_irq_wait,    1, 0 }, \
- [DRM_IOCTL_NR(DRM_IOCTL_RADEON_SETPARAM)]   = { radeon_cp_setparam, 1, 0 }, \
-
-#endif
diff -urN linux/drivers/char/drm/sis.h linux/drivers/char/drm/sis.h
--- linux/drivers/char/drm/Attic/sis.h  Mon Feb  7 02:54:44 2005        1.7
+++ linux/drivers/char/drm/Attic/sis.h  1970/01/01 00:00:002002
@@ -1,61 +0,0 @@
-/* sis_drv.h -- Private header for sis driver -*- linux-c -*-
- *
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- * 
- */
-/* $XFree86: 
xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/sis.h,v 1.3 
2002/10/30 12:52:38 alanh Exp $ */
-
-#ifndef __SIS_H__
-#define __SIS_H__
-
-/* This remains constant for all DRM template files.
- * Name it sisdrv_##x as there's a conflict with sis_free/malloc in the kernel
- * that's used for fb devices 
- */
-#ifdef __linux__
-#define DRM(x) sisdrv_##x
-#else
-#define DRM(x) sis_##x
-#endif
-
-/* General customization:
- */
-
-#define DRIVER_AUTHOR          "SIS"
-#define DRIVER_NAME            "sis"
-#define DRIVER_DESC            "SIS 300/630/540"
-#define DRIVER_DATE            "20030826"
-#define DRIVER_MAJOR           1
-#define DRIVER_MINOR           1
-#define DRIVER_PATCHLEVEL      0
-
-#define DRIVER_IOCTLS \
-       [DRM_IOCTL_NR(DRM_IOCTL_SIS_FB_ALLOC)]  = { sis_fb_alloc,       1, 0 }, 
\
-       [DRM_IOCTL_NR(DRM_IOCTL_SIS_FB_FREE)]   = { sis_fb_free,        1, 0 }, 
\
-       [DRM_IOCTL_NR(DRM_IOCTL_SIS_AGP_INIT)]  = { sis_ioctl_agp_init, 1, 1 }, 
\
-       [DRM_IOCTL_NR(DRM_IOCTL_SIS_AGP_ALLOC)] = { sis_ioctl_agp_alloc, 1, 0 
}, \
-       [DRM_IOCTL_NR(DRM_IOCTL_SIS_AGP_FREE)]  = { sis_ioctl_agp_free, 1, 0 }, 
\
-       [DRM_IOCTL_NR(DRM_IOCTL_SIS_FB_INIT)]   = { sis_fb_init,        1, 1 }
-
-#endif
diff -urN linux/drivers/char/ftape/compressor/zftape-compress.c 
linux/drivers/char/ftape/compressor/zftape-compress.c
--- linux/drivers/char/ftape/compressor/zftape-compress.c       2005/01/13 
14:05:56     1.12
+++ linux/drivers/char/ftape/compressor/zftape-compress.c       2005/02/07 
02:54:44     1.13
@@ -27,7 +27,6 @@
  *     changed * appropriately. See below.
  */
 
-#include <linux/version.h>
 #include <linux/errno.h>
 #include <linux/mm.h>
 #include <linux/module.h>
@@ -1173,12 +1172,11 @@
         if (TRACE_LEVEL >= ft_t_info) {
                printk(
 KERN_INFO "(c) 1997 Claus-Justus Heine (claus@momo.math.rwth-aachen.de)\n"
-KERN_INFO "Compressor for zftape (lzrw3 algorithm)\n"
-KERN_INFO "Compiled for kernel version %s\n", UTS_RELEASE);
+KERN_INFO "Compressor for zftape (lzrw3 algorithm)\n");
         }
 #else /* !MODULE */
        /* print a short no-nonsense boot message */
-       printk("zftape compressor v1.00a 970514 for Linux " UTS_RELEASE "\n");
+       printk("zftape compressor v1.00a 970514\n");
        printk("For use with " FTAPE_VERSION "\n");
 #endif /* MODULE */
        TRACE(ft_t_info, "zft_compressor_init @ 0x%p", zft_compressor_init);
diff -urN linux/drivers/char/ftape/lowlevel/ftape-init.c 
linux/drivers/char/ftape/lowlevel/ftape-init.c
--- linux/drivers/char/ftape/lowlevel/ftape-init.c      2005/01/13 14:05:56     
1.12
+++ linux/drivers/char/ftape/lowlevel/ftape-init.c      2005/02/07 02:54:45     
1.13
@@ -23,7 +23,6 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/kernel.h>
@@ -73,12 +72,11 @@
 KERN_INFO "(c) 1993-1996 Bas Laarhoven (bas@vimec.nl)\n"
 KERN_INFO "(c) 1995-1996 Kai Harrekilde-Petersen (khp@dolphinics.no)\n"
 KERN_INFO "(c) 1996-1997 Claus-Justus Heine (claus@momo.math.rwth-aachen.de)\n"
-KERN_INFO "QIC-117 driver for QIC-40/80/3010/3020 floppy tape drives\n"
-KERN_INFO "Compiled for Linux version %s\n", UTS_RELEASE);
+KERN_INFO "QIC-117 driver for QIC-40/80/3010/3020 floppy tape drives\n");
         }
 #else /* !MODULE */
        /* print a short no-nonsense boot message */
-       printk(KERN_INFO FTAPE_VERSION " for Linux " UTS_RELEASE "\n");
+       printk(KERN_INFO FTAPE_VERSION "\n");
 #endif /* MODULE */
        TRACE(ft_t_info, "installing QIC-117 floppy tape hardware drive ... ");
        TRACE(ft_t_info, "ftape_init @ 0x%p", ftape_init);
diff -urN linux/drivers/char/ftape/zftape/zftape-init.c 
linux/drivers/char/ftape/zftape/zftape-init.c
--- linux/drivers/char/ftape/zftape/zftape-init.c       2005/01/13 14:05:57     
1.31
+++ linux/drivers/char/ftape/zftape/zftape-init.c       2005/02/07 02:54:45     
1.32
@@ -23,7 +23,6 @@
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/errno.h>
-#include <linux/version.h>
 #include <linux/fs.h>
 #include <linux/kernel.h>
 #include <linux/signal.h>
@@ -319,13 +318,11 @@
 KERN_INFO
 "Support for QIC-113 compatible volume table, dynamic memory allocation\n"
 KERN_INFO
-"and builtin compression (lzrw3 algorithm).\n"
-KERN_INFO
-"Compiled for Linux version %s\n", UTS_RELEASE);
+"and builtin compression (lzrw3 algorithm).\n");
         }
 #else /* !MODULE */
        /* print a short no-nonsense boot message */
-       printk(KERN_INFO ZFTAPE_VERSION " for Linux " UTS_RELEASE "\n");
+       printk(KERN_INFO ZFTAPE_VERSION "\n");
 #endif /* MODULE */
        TRACE(ft_t_info, "zft_init @ 0x%p", zft_init);
        TRACE(ft_t_info,
diff -urN linux/drivers/char/watchdog/i8xx_tco.c 
linux/drivers/char/watchdog/i8xx_tco.c
--- linux/drivers/char/watchdog/i8xx_tco.c      2004/12/04 18:16:03     1.5
+++ linux/drivers/char/watchdog/i8xx_tco.c      2005/02/07 02:54:45     1.6
@@ -1,5 +1,5 @@
 /*
- *     i8xx_tco 0.06:  TCO timer driver for i8xx chipsets
+ *     i8xx_tco 0.07:  TCO timer driver for i8xx chipsets
  *
  *     (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>, All Rights 
Reserved.
  *                             http://www.kernelconcepts.de
@@ -22,11 +22,22 @@
  *
  *     The TCO timer is implemented in the following I/O controller hubs:
  *     (See the intel documentation on http://developer.intel.com.)
- *     82801AA & 82801AB  chip : document number 290655-003, 290677-004,
- *     82801BA & 82801BAM chip : document number 290687-002, 298242-005,
- *     82801CA & 82801CAM chip : document number 290716-001, 290718-001,
- *     82801DB & 82801E   chip : document number 290744-001, 273599-001,
- *     82801EB & 82801ER  chip : document number 252516-001
+ *     82801AA  (ICH)    : document number 290655-003, 290677-014,
+ *     82801AB  (ICHO)   : document number 290655-003, 290677-014,
+ *     82801BA  (ICH2)   : document number 290687-002, 298242-027,
+ *     82801BAM (ICH2-M) : document number 290687-002, 298242-027,
+ *     82801CA  (ICH3-S) : document number 290733-003, 290739-013,
+ *     82801CAM (ICH3-M) : document number 290716-001, 290718-007,
+ *     82801DB  (ICH4)   : document number 290744-001, 290745-020,
+ *     82801DBM (ICH4-M) : document number 252337-001, 252663-005,
+ *     82801E   (C-ICH)  : document number 273599-001, 273645-002,
+ *     82801EB  (ICH5)   : document number 252516-001, 252517-003,
+ *     82801ER  (ICH5R)  : document number 252516-001, 252517-003,
+ *     82801FB  (ICH6)   : document number 301473-002, 301474-007,
+ *     82801FR  (ICH6R)  : document number 301473-002, 301474-007,
+ *     82801FBM (ICH6-M) : document number 301473-002, 301474-007,
+ *     82801FW  (ICH6W)  : document number 301473-001, 301474-007,
+ *     82801FRW (ICH6RW) : document number 301473-001, 301474-007
  *
  *  20000710 Nils Faerber
  *     Initial Version 0.01
@@ -49,6 +60,9 @@
  *  20030921 Wim Van Sebroeck <wim@iguana.be>
  *     0.06 change i810_margin to heartbeat, use module_param,
  *          added notify system support, renamed module to i8xx_tco.
+ *  20050128 Wim Van Sebroeck <wim@iguana.be>
+ *     0.07 Added support for the ICH4-M, ICH6, ICH6R, ICH6-M, ICH6W and ICH6RW
+ *          chipsets. Also added support for the "undocumented" ICH7 chipset.
  */
 
 /*
@@ -73,7 +87,7 @@
 #include "i8xx_tco.h"
 
 /* Module and version information */
-#define TCO_VERSION "0.06"
+#define TCO_VERSION "0.07"
 #define TCO_MODULE_NAME "i8xx TCO timer"
 #define TCO_DRIVER_NAME   TCO_MODULE_NAME ", v" TCO_VERSION
 #define PFX TCO_MODULE_NAME ": "
@@ -360,8 +374,14 @@
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,   PCI_ANY_ID, 
PCI_ANY_ID, },
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12,  PCI_ANY_ID, 
PCI_ANY_ID, },
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0,   PCI_ANY_ID, 
PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12,  PCI_ANY_ID, 
PCI_ANY_ID, },
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_0,    PCI_ANY_ID, 
PCI_ANY_ID, },
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0,   PCI_ANY_ID, 
PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0,      PCI_ANY_ID, 
PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1,      PCI_ANY_ID, 
PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_2,      PCI_ANY_ID, 
PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0,      PCI_ANY_ID, 
PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1,      PCI_ANY_ID, 
PCI_ANY_ID, },
        { 0, },                 /* End of list */
 };
 MODULE_DEVICE_TABLE (pci, i8xx_tco_pci_tbl);
diff -urN linux/drivers/ide/pci/via82cxxx.c linux/drivers/ide/pci/via82cxxx.c
--- linux/drivers/ide/pci/via82cxxx.c   2005/01/13 14:06:00     1.20
+++ linux/drivers/ide/pci/via82cxxx.c   2005/02/07 02:54:45     1.21
@@ -36,6 +36,10 @@
 #include <linux/ide.h>
 #include <asm/io.h>
 
+#ifdef CONFIG_PPC_MULTIPLATFORM
+#include <asm/processor.h>
+#endif
+
 #include "ide-timing.h"
 
 #define DISPLAY_VIA_TIMINGS
@@ -584,6 +588,13 @@
        hwif->tuneproc = &via82cxxx_tune_drive;
        hwif->speedproc = &via_set_drive;
 
+
+#ifdef CONFIG_PPC_MULTIPLATFORM
+       if(_machine == _MACH_chrp && _chrp_type == _CHRP_Pegasos) {
+               hwif->irq = hwif->channel ? 15 : 14;
+       }
+#endif
+
        for (i = 0; i < 2; i++) {
                hwif->drives[i].io_32bit = 1;
                hwif->drives[i].unmask = (via_config->flags & VIA_NO_UNMASK) ? 
0 : 1;
diff -urN linux/drivers/infiniband/core/user_mad.c 
linux/drivers/infiniband/core/user_mad.c
--- linux/drivers/infiniband/core/user_mad.c    2005/01/25 04:28:16     1.2
+++ linux/drivers/infiniband/core/user_mad.c    2005/02/07 02:54:45     1.3
@@ -43,9 +43,9 @@
 #include <linux/poll.h>
 #include <linux/rwsem.h>
 #include <linux/kref.h>
-#include <linux/ioctl32.h>
 
 #include <asm/uaccess.h>
+#include <asm/semaphore.h>
 
 #include <ib_mad.h>
 #include <ib_user_mad.h>
@@ -55,14 +55,23 @@
 MODULE_LICENSE("Dual BSD/GPL");
 
 enum {
-       IB_UMAD_MAX_PORTS  = 256,
-       IB_UMAD_MAX_AGENTS = 32
+       IB_UMAD_MAX_PORTS  = 64,
+       IB_UMAD_MAX_AGENTS = 32,
+
+       IB_UMAD_MAJOR      = 231,
+       IB_UMAD_MINOR_BASE = 0
 };
 
 struct ib_umad_port {
        int                    devnum;
        struct cdev            dev;
        struct class_device    class_dev;
+
+       int                    sm_devnum;
+       struct cdev            sm_dev;
+       struct class_device    sm_class_dev;
+       struct semaphore       sm_sem;
+
        struct ib_device      *ib_dev;
        struct ib_umad_device *umad_dev;
        u8                     port_num;
@@ -91,9 +100,9 @@
        DECLARE_PCI_UNMAP_ADDR(mapping)
 };
 
-static dev_t base_dev;
+static const dev_t base_dev = MKDEV(IB_UMAD_MAJOR, IB_UMAD_MINOR_BASE);
 static spinlock_t map_lock;
-static DECLARE_BITMAP(dev_map, IB_UMAD_MAX_PORTS);
+static DECLARE_BITMAP(dev_map, IB_UMAD_MAX_PORTS * 2);
 
 static void ib_umad_add_one(struct ib_device *device);
 static void ib_umad_remove_one(struct ib_device *device);
@@ -502,14 +511,62 @@
 }
 
 static struct file_operations umad_fops = {
-       .owner   = THIS_MODULE,
-       .read    = ib_umad_read,
-       .write   = ib_umad_write,
-       .poll    = ib_umad_poll,
+       .owner          = THIS_MODULE,
+       .read           = ib_umad_read,
+       .write          = ib_umad_write,
+       .poll           = ib_umad_poll,
        .unlocked_ioctl = ib_umad_ioctl,
-       .compat_ioctl = ib_umad_ioctl,
-       .open    = ib_umad_open,
-       .release = ib_umad_close
+       .compat_ioctl   = ib_umad_ioctl,
+       .open           = ib_umad_open,
+       .release        = ib_umad_close
+};
+
+static int ib_umad_sm_open(struct inode *inode, struct file *filp)
+{
+       struct ib_umad_port *port =
+               container_of(inode->i_cdev, struct ib_umad_port, sm_dev);
+       struct ib_port_modify props = {
+               .set_port_cap_mask = IB_PORT_SM
+       };
+       int ret;
+
+       if (filp->f_flags & O_NONBLOCK) {
+               if (down_trylock(&port->sm_sem))
+                       return -EAGAIN;
+       } else {
+               if (down_interruptible(&port->sm_sem))
+                       return -ERESTARTSYS;
+       }
+
+       ret = ib_modify_port(port->ib_dev, port->port_num, 0, &props);
+       if (ret) {
+               up(&port->sm_sem);
+               return ret;
+       }
+
+       filp->private_data = port;
+
+       return 0;
+}
+
+static int ib_umad_sm_close(struct inode *inode, struct file *filp)
+{
+       struct ib_umad_port *port = filp->private_data;
+       struct ib_port_modify props = {
+               .clr_port_cap_mask = IB_PORT_SM
+       };
+       int ret;
+
+       ret = ib_modify_port(port->ib_dev, port->port_num, 0, &props);
+       up(&port->sm_sem);
+
+       return ret;
+}
+
+static struct file_operations umad_sm_fops = {
+       .owner   = THIS_MODULE,
+       .open    = ib_umad_sm_open,
+       .release = ib_umad_sm_close
 };
 
 static struct ib_client umad_client = {
@@ -520,17 +577,18 @@
 
 static ssize_t show_dev(struct class_device *class_dev, char *buf)
 {
-       struct ib_umad_port *port =
-               container_of(class_dev, struct ib_umad_port, class_dev);
+       struct ib_umad_port *port = class_get_devdata(class_dev);
 
-       return print_dev_t(buf, port->dev.dev);
+       if (class_dev == &port->class_dev)
+               return print_dev_t(buf, port->dev.dev);
+       else
+               return print_dev_t(buf, port->sm_dev.dev);
 }
 static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
 
 static ssize_t show_ibdev(struct class_device *class_dev, char *buf)
 {
-       struct ib_umad_port *port =
-               container_of(class_dev, struct ib_umad_port, class_dev);
+       struct ib_umad_port *port = class_get_devdata(class_dev);
 
        return sprintf(buf, "%s\n", port->ib_dev->name);
 }
@@ -538,8 +596,7 @@
 
 static ssize_t show_port(struct class_device *class_dev, char *buf)
 {
-       struct ib_umad_port *port =
-               container_of(class_dev, struct ib_umad_port, class_dev);
+       struct ib_umad_port *port = class_get_devdata(class_dev);
 
        return sprintf(buf, "%d\n", port->port_num);
 }
@@ -555,11 +612,16 @@
 
 static void ib_umad_release_port(struct class_device *class_dev)
 {
-       struct ib_umad_port *port =
-               container_of(class_dev, struct ib_umad_port, class_dev);
+       struct ib_umad_port *port = class_get_devdata(class_dev);
+
+       if (class_dev == &port->class_dev) {
+               cdev_del(&port->dev);
+               clear_bit(port->devnum, dev_map);
+       } else {
+               cdev_del(&port->sm_dev);
+               clear_bit(port->sm_devnum, dev_map);
+       }
 
-       cdev_del(&port->dev);
-       clear_bit(port->devnum, dev_map);
        kref_put(&port->umad_dev->ref, ib_umad_release_dev);
 }
 
@@ -574,6 +636,94 @@
 }
 static CLASS_ATTR(abi_version, S_IRUGO, show_abi_version, NULL);
 
+static int ib_umad_init_port(struct ib_device *device, int port_num,
+                            struct ib_umad_port *port)
+{
+       spin_lock(&map_lock);
+       port->devnum = find_first_zero_bit(dev_map, IB_UMAD_MAX_PORTS);
+       if (port->devnum >= IB_UMAD_MAX_PORTS) {
+               spin_unlock(&map_lock);
+               return -1;
+       }
+       port->sm_devnum = find_next_zero_bit(dev_map, IB_UMAD_MAX_PORTS * 2, 
IB_UMAD_MAX_PORTS);
+       if (port->sm_devnum >= IB_UMAD_MAX_PORTS * 2) {
+               spin_unlock(&map_lock);
+               return -1;
+       }
+       set_bit(port->devnum, dev_map);
+       set_bit(port->sm_devnum, dev_map);
+       spin_unlock(&map_lock);
+
+       port->ib_dev   = device;
+       port->port_num = port_num;
+       init_MUTEX(&port->sm_sem);
+
+       cdev_init(&port->dev, &umad_fops);
+       port->dev.owner = THIS_MODULE;
+       kobject_set_name(&port->dev.kobj, "umad%d", port->devnum);
+       if (cdev_add(&port->dev, base_dev + port->devnum, 1))
+               return -1;
+
+       port->class_dev.class = &umad_class;
+       port->class_dev.dev   = device->dma_device;
+
+       snprintf(port->class_dev.class_id, BUS_ID_SIZE, "umad%d", port->devnum);
+
+       if (class_device_register(&port->class_dev))
+               goto err_cdev;
+
+       class_set_devdata(&port->class_dev, port);
+       kref_get(&port->umad_dev->ref);
+
+       if (class_device_create_file(&port->class_dev, &class_device_attr_dev))
+               goto err_class;
+       if (class_device_create_file(&port->class_dev, 
&class_device_attr_ibdev))
+               goto err_class;
+       if (class_device_create_file(&port->class_dev, &class_device_attr_port))
+               goto err_class;
+
+       cdev_init(&port->sm_dev, &umad_sm_fops);
+       port->sm_dev.owner = THIS_MODULE;
+       kobject_set_name(&port->dev.kobj, "issm%d", port->sm_devnum - 
IB_UMAD_MAX_PORTS);
+       if (cdev_add(&port->sm_dev, base_dev + port->sm_devnum, 1))
+               return -1;
+
+       port->sm_class_dev.class = &umad_class;
+       port->sm_class_dev.dev   = device->dma_device;
+
+       snprintf(port->sm_class_dev.class_id, BUS_ID_SIZE, "issm%d", 
port->sm_devnum - IB_UMAD_MAX_PORTS);
+
+       if (class_device_register(&port->sm_class_dev))
+               goto err_sm_cdev;
+
+       class_set_devdata(&port->sm_class_dev, port);
+       kref_get(&port->umad_dev->ref);
+
+       if (class_device_create_file(&port->sm_class_dev, 
&class_device_attr_dev))
+               goto err_sm_class;
+       if (class_device_create_file(&port->sm_class_dev, 
&class_device_attr_ibdev))
+               goto err_sm_class;
+       if (class_device_create_file(&port->sm_class_dev, 
&class_device_attr_port))
+               goto err_sm_class;
+
+       return 0;
+
+err_sm_class:
+       class_device_unregister(&port->sm_class_dev);
+
+err_sm_cdev:
+       cdev_del(&port->sm_dev);
+
+err_class:
+       class_device_unregister(&port->class_dev);
+
+err_cdev:
+       cdev_del(&port->dev);
+       clear_bit(port->devnum, dev_map);
+
+       return -1;
+}
+
 static void ib_umad_add_one(struct ib_device *device)
 {
        struct ib_umad_device *umad_dev;
@@ -602,58 +752,20 @@
 
        for (i = s; i <= e; ++i) {
                umad_dev->port[i - s].umad_dev = umad_dev;
-               kref_get(&umad_dev->ref);
 
-               spin_lock(&map_lock);
-               umad_dev->port[i - s].devnum =
-                       find_first_zero_bit(dev_map, IB_UMAD_MAX_PORTS);
-               if (umad_dev->port[i - s].devnum >= IB_UMAD_MAX_PORTS) {
-                       spin_unlock(&map_lock);
+               if (ib_umad_init_port(device, i, &umad_dev->port[i - s]))
                        goto err;
-               }
-               set_bit(umad_dev->port[i - s].devnum, dev_map);
-               spin_unlock(&map_lock);
-
-               umad_dev->port[i - s].ib_dev   = device;
-               umad_dev->port[i - s].port_num = i;
-
-               cdev_init(&umad_dev->port[i - s].dev, &umad_fops);
-               umad_dev->port[i - s].dev.owner = THIS_MODULE;
-               kobject_set_name(&umad_dev->port[i - s].dev.kobj,
-                                "umad%d", umad_dev->port[i - s].devnum);
-               if (cdev_add(&umad_dev->port[i - s].dev, base_dev +
-                            umad_dev->port[i - s].devnum, 1))
-                       goto err;
-
-               umad_dev->port[i - s].class_dev.class = &umad_class;
-               umad_dev->port[i - s].class_dev.dev   = device->dma_device;
-               snprintf(umad_dev->port[i - s].class_dev.class_id,
-                        BUS_ID_SIZE, "umad%d", umad_dev->port[i - s].devnum);
-               if (class_device_register(&umad_dev->port[i - s].class_dev))
-                       goto err_class;
-
-               if (class_device_create_file(&umad_dev->port[i - s].class_dev,
-                                            &class_device_attr_dev))
-                       goto err_class;
-               if (class_device_create_file(&umad_dev->port[i - s].class_dev,
-                                            &class_device_attr_ibdev))
-                       goto err_class;
-               if (class_device_create_file(&umad_dev->port[i - s].class_dev,
-                                            &class_device_attr_port))
-                       goto err_class;
        }
 
        ib_set_client_data(device, &umad_client, umad_dev);
 
        return;
 
-err_class:
-       cdev_del(&umad_dev->port[i - s].dev);
-       clear_bit(umad_dev->port[i - s].devnum, dev_map);
-
 err:
-       while (--i >= s)
+       while (--i >= s) {
                class_device_unregister(&umad_dev->port[i - s].class_dev);
+               class_device_unregister(&umad_dev->port[i - s].sm_class_dev);
+       }
 
        kref_put(&umad_dev->ref, ib_umad_release_dev);
 }
@@ -666,8 +778,10 @@
        if (!umad_dev)
                return;
 
-       for (i = 0; i <= umad_dev->end_port - umad_dev->start_port; ++i)
+       for (i = 0; i <= umad_dev->end_port - umad_dev->start_port; ++i) {
                class_device_unregister(&umad_dev->port[i].class_dev);
+               class_device_unregister(&umad_dev->port[i].sm_class_dev);
+       }
 
        kref_put(&umad_dev->ref, ib_umad_release_dev);
 }
@@ -678,10 +792,10 @@
 
        spin_lock_init(&map_lock);
 
-       ret = alloc_chrdev_region(&base_dev, 0, IB_UMAD_MAX_PORTS,
-                                 "infiniband_mad");
+       ret = register_chrdev_region(base_dev, IB_UMAD_MAX_PORTS * 2,
+                                    "infiniband_mad");
        if (ret) {
-               printk(KERN_ERR "user_mad: couldn't get device number\n");
+               printk(KERN_ERR "user_mad: couldn't register device number\n");
                goto out;
        }
 
@@ -705,13 +819,11 @@
 
        return 0;
 
-       ib_unregister_client(&umad_client);
-
 out_class:
        class_unregister(&umad_class);
 
 out_chrdev:
-       unregister_chrdev_region(base_dev, IB_UMAD_MAX_PORTS);
+       unregister_chrdev_region(base_dev, IB_UMAD_MAX_PORTS * 2);
 
 out:
        return ret;
@@ -721,7 +833,7 @@
 {
        ib_unregister_client(&umad_client);
        class_unregister(&umad_class);
-       unregister_chrdev_region(base_dev, IB_UMAD_MAX_PORTS);
+       unregister_chrdev_region(base_dev, IB_UMAD_MAX_PORTS * 2);
 }
 
 module_init(ib_umad_init);
diff -urN linux/drivers/infiniband/hw/mthca/Kconfig 
linux/drivers/infiniband/hw/mthca/Kconfig
--- linux/drivers/infiniband/hw/mthca/Kconfig   2005/01/13 14:06:02     1.1
+++ linux/drivers/infiniband/hw/mthca/Kconfig   2005/02/07 02:54:45     1.2
@@ -14,13 +14,3 @@
          This option causes the mthca driver produce a bunch of debug
          messages.  Select this is you are developing the driver or
          trying to diagnose a problem.
-
-config INFINIBAND_MTHCA_SSE_DOORBELL
-       bool "SSE doorbell code"
-       depends on INFINIBAND_MTHCA && X86 && !X86_64
-       default n
-       ---help---
-         This option will have the mthca driver use SSE instructions
-         to ring hardware doorbell registers.  This may improve
-         performance for some workloads, but the driver will not run
-         on processors without SSE instructions.
diff -urN linux/drivers/infiniband/hw/mthca/mthca_cmd.c 
linux/drivers/infiniband/hw/mthca/mthca_cmd.c
--- linux/drivers/infiniband/hw/mthca/mthca_cmd.c       2005/01/25 04:28:16     
1.2
+++ linux/drivers/infiniband/hw/mthca/mthca_cmd.c       2005/02/07 02:54:45     
1.3
@@ -36,6 +36,7 @@
 #include <linux/pci.h>
 #include <linux/errno.h>
 #include <asm/io.h>
+#include <ib_mad.h>
 
 #include "mthca_dev.h"
 #include "mthca_config_reg.h"
@@ -509,7 +510,8 @@
        return mthca_cmd(dev, 0, 0, 0, CMD_SYS_DIS, HZ, status);
 }
 
-int mthca_MAP_FA(struct mthca_dev *dev, struct mthca_icm *icm, u8 *status)
+static int mthca_map_cmd(struct mthca_dev *dev, u16 op, struct mthca_icm *icm,
+                        u64 virt, u8 *status)
 {
        u32 *inbox;
        dma_addr_t indma;
@@ -518,12 +520,17 @@
        int nent = 0;
        int i;
        int err = 0;
-       int ts = 0;
+       int ts = 0, tc = 0;
 
        inbox = pci_alloc_consistent(dev->pdev, PAGE_SIZE, &indma);
+       if (!inbox)
+               return -ENOMEM;
+
        memset(inbox, 0, PAGE_SIZE);
 
-       for (mthca_icm_first(icm, &iter); !mthca_icm_last(&iter); 
mthca_icm_next(&iter)) {
+       for (mthca_icm_first(icm, &iter);
+            !mthca_icm_last(&iter);
+            mthca_icm_next(&iter)) {
                /*
                 * We have to pass pages that are aligned to their
                 * size, so find the least significant 1 in the
@@ -538,13 +545,20 @@
                        goto out;
                }
                for (i = 0; i < mthca_icm_size(&iter) / (1 << lg); ++i, ++nent) 
{
+                       if (virt != -1) {
+                               *((__be64 *) (inbox + nent * 4)) =
+                                       cpu_to_be64(virt);
+                               virt += 1 << lg;
+                       }
+
                        *((__be64 *) (inbox + nent * 4 + 2)) =
                                cpu_to_be64((mthca_icm_addr(&iter) +
-                                            (i << lg)) |
-                                           (lg - 12));
+                                            (i << lg)) | (lg - 12));
                        ts += 1 << (lg - 10);
+                       ++tc;
+
                        if (nent == PAGE_SIZE / 16) {
-                               err = mthca_cmd(dev, indma, nent, 0, CMD_MAP_FA,
+                               err = mthca_cmd(dev, indma, nent, 0, op,
                                                CMD_TIME_CLASS_B, status);
                                if (err || *status)
                                        goto out;
@@ -553,18 +567,33 @@
                }
        }
 
-       if (nent) {
-               err = mthca_cmd(dev, indma, nent, 0, CMD_MAP_FA,
+       if (nent)
+               err = mthca_cmd(dev, indma, nent, 0, op,
                                CMD_TIME_CLASS_B, status);
-       }
 
-       mthca_dbg(dev, "Mapped %d KB of host memory for FW.\n", ts);
+       switch (op) {
+       case CMD_MAP_FA:
+               mthca_dbg(dev, "Mapped %d chunks/%d KB for FW.\n", tc, ts);
+               break;
+       case CMD_MAP_ICM_AUX:
+               mthca_dbg(dev, "Mapped %d chunks/%d KB for ICM aux.\n", tc, ts);
+               break;
+       case CMD_MAP_ICM:
+               mthca_dbg(dev, "Mapped %d chunks/%d KB at %llx for ICM.\n",
+                         tc, ts, (unsigned long long) virt - (ts << 10));
+               break;
+       }
 
 out:
        pci_free_consistent(dev->pdev, PAGE_SIZE, inbox, indma);
        return err;
 }
 
+int mthca_MAP_FA(struct mthca_dev *dev, struct mthca_icm *icm, u8 *status)
+{
+       return mthca_map_cmd(dev, CMD_MAP_FA, icm, -1, status);
+}
+
 int mthca_UNMAP_FA(struct mthca_dev *dev, u8 *status)
 {
        return mthca_cmd(dev, 0, 0, 0, CMD_UNMAP_FA, CMD_TIME_CLASS_B, status);
@@ -1068,8 +1097,11 @@
 #define  INIT_HCA_MTT_BASE_OFFSET        (INIT_HCA_TPT_OFFSET + 0x10)
 #define INIT_HCA_UAR_OFFSET              0x120
 #define  INIT_HCA_UAR_BASE_OFFSET        (INIT_HCA_UAR_OFFSET + 0x00)
+#define  INIT_HCA_UARC_SZ_OFFSET         (INIT_HCA_UAR_OFFSET + 0x09)
+#define  INIT_HCA_LOG_UAR_SZ_OFFSET      (INIT_HCA_UAR_OFFSET + 0x0a)
 #define  INIT_HCA_UAR_PAGE_SZ_OFFSET     (INIT_HCA_UAR_OFFSET + 0x0b)
 #define  INIT_HCA_UAR_SCATCH_BASE_OFFSET (INIT_HCA_UAR_OFFSET + 0x10)
+#define  INIT_HCA_UAR_CTX_BASE_OFFSET    (INIT_HCA_UAR_OFFSET + 0x18)
 
        inbox = pci_alloc_consistent(dev->pdev, INIT_HCA_IN_SIZE, &indma);
        if (!inbox)
@@ -1117,7 +1149,8 @@
        /* TPT attributes */
 
        MTHCA_PUT(inbox, param->mpt_base,   INIT_HCA_MPT_BASE_OFFSET);
-       MTHCA_PUT(inbox, param->mtt_seg_sz, INIT_HCA_MTT_SEG_SZ_OFFSET);
+       if (dev->hca_type != ARBEL_NATIVE)
+               MTHCA_PUT(inbox, param->mtt_seg_sz, INIT_HCA_MTT_SEG_SZ_OFFSET);
        MTHCA_PUT(inbox, param->log_mpt_sz, INIT_HCA_LOG_MPT_SZ_OFFSET);
        MTHCA_PUT(inbox, param->mtt_base,   INIT_HCA_MTT_BASE_OFFSET);
 
@@ -1125,7 +1158,14 @@
        {
                u8 uar_page_sz = PAGE_SHIFT - 12;
                MTHCA_PUT(inbox, uar_page_sz, INIT_HCA_UAR_PAGE_SZ_OFFSET);
-               MTHCA_PUT(inbox, param->uar_scratch_base, 
INIT_HCA_UAR_SCATCH_BASE_OFFSET);
+       }
+
+       MTHCA_PUT(inbox, param->uar_scratch_base, 
INIT_HCA_UAR_SCATCH_BASE_OFFSET);
+
+       if (dev->hca_type == ARBEL_NATIVE) {
+               MTHCA_PUT(inbox, param->log_uarc_sz, INIT_HCA_UARC_SZ_OFFSET);
+               MTHCA_PUT(inbox, param->log_uar_sz,  
INIT_HCA_LOG_UAR_SZ_OFFSET);
+               MTHCA_PUT(inbox, param->uarc_base,   
INIT_HCA_UAR_CTX_BASE_OFFSET);
        }
 
        err = mthca_cmd(dev, indma, 0, 0, CMD_INIT_HCA,
@@ -1199,6 +1239,103 @@
        return mthca_cmd(dev, 0, 0, panic, CMD_CLOSE_HCA, HZ, status);
 }
 
+int mthca_SET_IB(struct mthca_dev *dev, struct mthca_set_ib_param *param,
+                int port, u8 *status)
+{
+       u32 *inbox;
+       dma_addr_t indma;
+       int err;
+       u32 flags = 0;
+
+#define SET_IB_IN_SIZE         0x40
+#define SET_IB_FLAGS_OFFSET    0x00
+#define SET_IB_FLAG_SIG        (1 << 18)
+#define SET_IB_FLAG_RQK        (1 <<  0)
+#define SET_IB_CAP_MASK_OFFSET 0x04
+#define SET_IB_SI_GUID_OFFSET  0x08
+
+       inbox = pci_alloc_consistent(dev->pdev, SET_IB_IN_SIZE, &indma);
+       if (!inbox)
+               return -ENOMEM;
+
+       memset(inbox, 0, SET_IB_IN_SIZE);
+
+       flags |= param->set_si_guid     ? SET_IB_FLAG_SIG : 0;
+       flags |= param->reset_qkey_viol ? SET_IB_FLAG_RQK : 0;
+       MTHCA_PUT(inbox, flags, SET_IB_FLAGS_OFFSET);
+
+       MTHCA_PUT(inbox, param->cap_mask, SET_IB_CAP_MASK_OFFSET);
+       MTHCA_PUT(inbox, param->si_guid,  SET_IB_SI_GUID_OFFSET);
+
+       err = mthca_cmd(dev, indma, port, 0, CMD_SET_IB,
+                       CMD_TIME_CLASS_B, status);
+
+       pci_free_consistent(dev->pdev, INIT_HCA_IN_SIZE, inbox, indma);
+       return err;
+}
+
+int mthca_MAP_ICM(struct mthca_dev *dev, struct mthca_icm *icm, u64 virt, u8 
*status)
+{
+       return mthca_map_cmd(dev, CMD_MAP_ICM, icm, virt, status);
+}
+
+int mthca_MAP_ICM_page(struct mthca_dev *dev, u64 dma_addr, u64 virt, u8 
*status)
+{
+       u64 *inbox;
+       dma_addr_t indma;
+       int err;
+
+       inbox = pci_alloc_consistent(dev->pdev, 16, &indma);
+       if (!inbox)
+               return -ENOMEM;
+
+       inbox[0] = cpu_to_be64(virt);
+       inbox[1] = cpu_to_be64(dma_addr | (PAGE_SHIFT - 12));
+
+       err = mthca_cmd(dev, indma, 1, 0, CMD_MAP_ICM, CMD_TIME_CLASS_B, 
status);
+
+       pci_free_consistent(dev->pdev, 16, inbox, indma);
+
+       if (!err)
+               mthca_dbg(dev, "Mapped page at %llx for ICM.\n",
+                         (unsigned long long) virt);
+
+       return err;
+}
+
+int mthca_UNMAP_ICM(struct mthca_dev *dev, u64 virt, u32 page_count, u8 
*status)
+{
+       return mthca_cmd(dev, virt, page_count, 0, CMD_UNMAP_ICM, 
CMD_TIME_CLASS_B, status);
+}
+
+int mthca_MAP_ICM_AUX(struct mthca_dev *dev, struct mthca_icm *icm, u8 *status)
+{
+       return mthca_map_cmd(dev, CMD_MAP_ICM_AUX, icm, -1, status);
+}
+
+int mthca_UNMAP_ICM_AUX(struct mthca_dev *dev, u8 *status)
+{
+       return mthca_cmd(dev, 0, 0, 0, CMD_UNMAP_ICM_AUX, CMD_TIME_CLASS_B, 
status);
+}
+
+int mthca_SET_ICM_SIZE(struct mthca_dev *dev, u64 icm_size, u64 *aux_pages,
+                      u8 *status)
+{
+       int ret = mthca_cmd_imm(dev, icm_size, aux_pages, 0, 0, 
CMD_SET_ICM_SIZE,
+                               CMD_TIME_CLASS_A, status);
+
+       if (ret || status)
+               return ret;
+
+       /*
+        * Arbel page size is always 4 KB; round up number of system
+        * pages needed.
+        */
+       *aux_pages = (*aux_pages + (1 << (PAGE_SHIFT - 12)) - 1) >> (PAGE_SHIFT 
- 12);
+
+       return 0;
+}
+
 int mthca_SW2HW_MPT(struct mthca_dev *dev, void *mpt_entry,
                    int mpt_index, u8 *status)
 {
@@ -1490,13 +1627,24 @@
                         CMD_TIME_CLASS_B, status);
 }
 
-int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int port,
-                 void *in_mad, void *response_mad, u8 *status) {
+int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int ignore_bkey,
+                 int port, struct ib_wc* in_wc, struct ib_grh* in_grh,
+                 void *in_mad, void *response_mad, u8 *status)
+{
        void *box;
        dma_addr_t dma;
        int err;
+       u32 in_modifier = port;
+       u8 op_modifier = 0;
 
-#define MAD_IFC_BOX_SIZE 512
+#define MAD_IFC_BOX_SIZE      0x400
+#define MAD_IFC_MY_QPN_OFFSET 0x100
+#define MAD_IFC_RQPN_OFFSET   0x104
+#define MAD_IFC_SL_OFFSET     0x108
+#define MAD_IFC_G_PATH_OFFSET 0x109
+#define MAD_IFC_RLID_OFFSET   0x10a
+#define MAD_IFC_PKEY_OFFSET   0x10e
+#define MAD_IFC_GRH_OFFSET    0x140
 
        box = pci_alloc_consistent(dev->pdev, MAD_IFC_BOX_SIZE, &dma);
        if (!box)
@@ -1504,11 +1652,46 @@
 
        memcpy(box, in_mad, 256);
 
-       err = mthca_cmd_box(dev, dma, dma + 256, port, !!ignore_mkey,
+       /*
+        * Key check traps can't be generated unless we have in_wc to
+        * tell us where to send the trap.
+        */
+       if (ignore_mkey || !in_wc)
+               op_modifier |= 0x1;
+       if (ignore_bkey || !in_wc)
+               op_modifier |= 0x2;
+
+       if (in_wc) {
+               u8 val;
+
+               memset(box + 256, 0, 256);
+
+               MTHCA_PUT(box, in_wc->qp_num,     MAD_IFC_MY_QPN_OFFSET);
+               MTHCA_PUT(box, in_wc->src_qp,     MAD_IFC_RQPN_OFFSET);
+
+               val = in_wc->sl << 4;
+               MTHCA_PUT(box, val,               MAD_IFC_SL_OFFSET);
+
+               val = in_wc->dlid_path_bits |
+                       (in_wc->wc_flags & IB_WC_GRH ? 0x80 : 0);
+               MTHCA_PUT(box, val,               MAD_IFC_GRH_OFFSET);
+
+               MTHCA_PUT(box, in_wc->slid,       MAD_IFC_RLID_OFFSET);
+               MTHCA_PUT(box, in_wc->pkey_index, MAD_IFC_PKEY_OFFSET);
+
+               if (in_grh)
+                       memcpy((u8 *) box + MAD_IFC_GRH_OFFSET, in_grh, 40);
+
+               op_modifier |= 0x10;
+
+               in_modifier |= in_wc->slid << 16;
+       }
+
+       err = mthca_cmd_box(dev, dma, dma + 512, in_modifier, op_modifier,
                            CMD_MAD_IFC, CMD_TIME_CLASS_C, status);
 
        if (!err && !*status)
-               memcpy(response_mad, box + 256, 256);
+               memcpy(response_mad, box + 512, 256);
 
        pci_free_consistent(dev->pdev, MAD_IFC_BOX_SIZE, box, dma);
        return err;
@@ -1574,3 +1757,8 @@
        pci_unmap_single(dev->pdev, indma, 16, PCI_DMA_TODEVICE);
        return err;
 }
+
+int mthca_NOP(struct mthca_dev *dev, u8 *status)
+{
+       return mthca_cmd(dev, 0, 0x1f, 0, CMD_NOP, msecs_to_jiffies(100), 
status);
+}
diff -urN linux/drivers/infiniband/hw/mthca/mthca_cmd.h 
linux/drivers/infiniband/hw/mthca/mthca_cmd.h
--- linux/drivers/infiniband/hw/mthca/mthca_cmd.h       2005/01/25 04:28:16     
1.2
+++ linux/drivers/infiniband/hw/mthca/mthca_cmd.h       2005/02/07 02:54:45     
1.3
@@ -174,27 +174,30 @@
 
 struct mthca_init_hca_param {
        u64 qpc_base;
-       u8  log_num_qps;
        u64 eec_base;
-       u8  log_num_eecs;
        u64 srqc_base;
-       u8  log_num_srqs;
        u64 cqc_base;
-       u8  log_num_cqs;
        u64 eqpc_base;
        u64 eeec_base;
        u64 eqc_base;
-       u8  log_num_eqs;
        u64 rdb_base;
        u64 mc_base;
+       u64 mpt_base;
+       u64 mtt_base;
+       u64 uar_scratch_base;
+       u64 uarc_base;
        u16 log_mc_entry_sz;
        u16 mc_hash_sz;
+       u8  log_num_qps;
+       u8  log_num_eecs;
+       u8  log_num_srqs;
+       u8  log_num_cqs;
+       u8  log_num_eqs;
        u8  log_mc_table_sz;
-       u64 mpt_base;
        u8  mtt_seg_sz;
        u8  log_mpt_sz;
-       u64 mtt_base;
-       u64 uar_scratch_base;
+       u8  log_uar_sz;
+       u8  log_uarc_sz;
 };
 
 struct mthca_init_ib_param {
@@ -212,6 +215,13 @@
        u64 si_guid;
 };
 
+struct mthca_set_ib_param {
+       int set_si_guid;
+       int reset_qkey_viol;
+       u64 si_guid;
+       u32 cap_mask;
+};
+
 int mthca_cmd_use_events(struct mthca_dev *dev);
 void mthca_cmd_use_polling(struct mthca_dev *dev);
 void mthca_cmd_event(struct mthca_dev *dev, u16 token,
@@ -238,6 +248,15 @@
                  int port, u8 *status);
 int mthca_CLOSE_IB(struct mthca_dev *dev, int port, u8 *status);
 int mthca_CLOSE_HCA(struct mthca_dev *dev, int panic, u8 *status);
+int mthca_SET_IB(struct mthca_dev *dev, struct mthca_set_ib_param *param,
+                int port, u8 *status);
+int mthca_MAP_ICM(struct mthca_dev *dev, struct mthca_icm *icm, u64 virt, u8 
*status);
+int mthca_MAP_ICM_page(struct mthca_dev *dev, u64 dma_addr, u64 virt, u8 
*status);
+int mthca_UNMAP_ICM(struct mthca_dev *dev, u64 virt, u32 page_count, u8 
*status);
+int mthca_MAP_ICM_AUX(struct mthca_dev *dev, struct mthca_icm *icm, u8 
*status);
+int mthca_UNMAP_ICM_AUX(struct mthca_dev *dev, u8 *status);
+int mthca_SET_ICM_SIZE(struct mthca_dev *dev, u64 icm_size, u64 *aux_pages,
+                      u8 *status);
 int mthca_SW2HW_MPT(struct mthca_dev *dev, void *mpt_entry,
                    int mpt_index, u8 *status);
 int mthca_HW2SW_MPT(struct mthca_dev *dev, void *mpt_entry,
@@ -261,7 +280,8 @@
                   void *qp_context, u8 *status);
 int mthca_CONF_SPECIAL_QP(struct mthca_dev *dev, int type, u32 qpn,
                          u8 *status);
-int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int port,
+int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int ignore_bkey,
+                 int port, struct ib_wc* in_wc, struct ib_grh* in_grh,
                  void *in_mad, void *response_mad, u8 *status);
 int mthca_READ_MGM(struct mthca_dev *dev, int index, void *mgm,
                   u8 *status);
@@ -269,6 +289,7 @@
                    u8 *status);
 int mthca_MGID_HASH(struct mthca_dev *dev, void *gid, u16 *hash,
                    u8 *status);
+int mthca_NOP(struct mthca_dev *dev, u8 *status);
 
 #define MAILBOX_ALIGN(x) ((void *) ALIGN((unsigned long) (x), 
MTHCA_CMD_MAILBOX_ALIGN))
 
diff -urN linux/drivers/infiniband/hw/mthca/mthca_config_reg.h 
linux/drivers/infiniband/hw/mthca/mthca_config_reg.h
--- linux/drivers/infiniband/hw/mthca/mthca_config_reg.h        2005/01/13 
14:06:02     1.1
+++ linux/drivers/infiniband/hw/mthca/mthca_config_reg.h        2005/02/07 
02:54:45     1.2
@@ -43,13 +43,8 @@
 #define MTHCA_ECR_SIZE         0x00008
 #define MTHCA_ECR_CLR_BASE     0x80708
 #define MTHCA_ECR_CLR_SIZE     0x00008
-#define MTHCA_ECR_OFFSET       (MTHCA_ECR_BASE     - MTHCA_HCR_BASE)
-#define MTHCA_ECR_CLR_OFFSET   (MTHCA_ECR_CLR_BASE - MTHCA_HCR_BASE)
+#define MTHCA_MAP_ECR_SIZE     (MTHCA_ECR_SIZE + MTHCA_ECR_CLR_SIZE)
 #define MTHCA_CLR_INT_BASE     0xf00d8
 #define MTHCA_CLR_INT_SIZE     0x00008
 
-#define MTHCA_MAP_HCR_SIZE     (MTHCA_ECR_CLR_BASE   + \
-                               MTHCA_ECR_CLR_SIZE   - \
-                               MTHCA_HCR_BASE)
-
 #endif /* MTHCA_CONFIG_REG_H */
diff -urN linux/drivers/infiniband/hw/mthca/mthca_dev.h 
linux/drivers/infiniband/hw/mthca/mthca_dev.h
--- linux/drivers/infiniband/hw/mthca/mthca_dev.h       2005/01/25 04:28:16     
1.2
+++ linux/drivers/infiniband/hw/mthca/mthca_dev.h       2005/02/07 02:54:45     
1.3
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -153,10 +153,12 @@
 };
 
 struct mthca_mr_table {
-       struct mthca_alloc mpt_alloc;
-       int                max_mtt_order;
-       unsigned long    **mtt_buddy;
-       u64                mtt_base;
+       struct mthca_alloc      mpt_alloc;
+       int                     max_mtt_order;
+       unsigned long         **mtt_buddy;
+       u64                     mtt_base;
+       struct mthca_icm_table *mtt_table;
+       struct mthca_icm_table *mpt_table;
 };
 
 struct mthca_eq_table {
@@ -164,23 +166,29 @@
        void __iomem      *clr_int;
        u32                clr_mask;
        struct mthca_eq    eq[MTHCA_NUM_EQ];
+       u64                icm_virt;
+       struct page       *icm_page;
+       dma_addr_t         icm_dma;
        int                have_irq;
        u8                 inta_pin;
 };
 
 struct mthca_cq_table {
-       struct mthca_alloc alloc;
-       spinlock_t         lock;
-       struct mthca_array cq;
+       struct mthca_alloc      alloc;
+       spinlock_t              lock;
+       struct mthca_array      cq;
+       struct mthca_icm_table *table;
 };
 
 struct mthca_qp_table {
-       struct mthca_alloc alloc;
-       u32                rdb_base;
-       int                rdb_shift;
-       int                sqp_start;
-       spinlock_t         lock;
-       struct mthca_array qp;
+       struct mthca_alloc      alloc;
+       u32                     rdb_base;
+       int                     rdb_shift;
+       int                     sqp_start;
+       spinlock_t              lock;
+       struct mthca_array      qp;
+       struct mthca_icm_table *qp_table;
+       struct mthca_icm_table *eqp_table;
 };
 
 struct mthca_av_table {
@@ -216,7 +224,8 @@
                        u64 clr_int_base;
                        u64 eq_arm_base;
                        u64 eq_set_ci_base;
-                       struct mthca_icm *icm;
+                       struct mthca_icm *fw_icm;
+                       struct mthca_icm *aux_icm;
                        u16 fw_pages;
                }        arbel;
        }                fw;
@@ -225,8 +234,10 @@
        u64              ddr_end;
 
        MTHCA_DECLARE_DOORBELL_LOCK(doorbell_lock)
+       struct semaphore cap_mask_mutex;
 
        void __iomem    *hcr;
+       void __iomem    *ecr_base;
        void __iomem    *clr_base;
        void __iomem    *kar;
 
@@ -329,6 +340,9 @@
                        u32 access, struct mthca_mr *mr);
 void mthca_free_mr(struct mthca_dev *dev, struct mthca_mr *mr);
 
+int mthca_map_eq_icm(struct mthca_dev *dev, u64 icm_virt);
+void mthca_unmap_eq_icm(struct mthca_dev *dev);
+
 int mthca_poll_cq(struct ib_cq *ibcq, int num_entries,
                  struct ib_wc *entry);
 void mthca_arm_cq(struct mthca_dev *dev, struct mthca_cq *cq,
diff -urN linux/drivers/infiniband/hw/mthca/mthca_doorbell.h 
linux/drivers/infiniband/hw/mthca/mthca_doorbell.h
--- linux/drivers/infiniband/hw/mthca/mthca_doorbell.h  2005/01/13 14:06:02     
1.1
+++ linux/drivers/infiniband/hw/mthca/mthca_doorbell.h  2005/02/07 02:54:45     
1.2
@@ -32,9 +32,7 @@
  * $Id: mthca_doorbell.h 1349 2004-12-16 21:09:43Z roland $
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
-#include <linux/preempt.h>
 
 #define MTHCA_RD_DOORBELL      0x00
 #define MTHCA_SEND_DOORBELL    0x10
@@ -59,51 +57,13 @@
        __raw_writeq(*(u64 *) val, dest);
 }
 
-#elif defined(CONFIG_INFINIBAND_MTHCA_SSE_DOORBELL)
-/* Use SSE to write 64 bits atomically without a lock. */
-
-#define MTHCA_DECLARE_DOORBELL_LOCK(name)
-#define MTHCA_INIT_DOORBELL_LOCK(ptr)    do { } while (0)
-#define MTHCA_GET_DOORBELL_LOCK(ptr)      (NULL)
-
-static inline unsigned long mthca_get_fpu(void)
-{
-       unsigned long cr0;
-
-       preempt_disable();
-       asm volatile("mov %%cr0,%0; clts" : "=r" (cr0));
-       return cr0;
-}
-
-static inline void mthca_put_fpu(unsigned long cr0)
-{
-       asm volatile("mov %0,%%cr0" : : "r" (cr0));
-       preempt_enable();
-}
-
-static inline void mthca_write64(u32 val[2], void __iomem *dest,
-                                spinlock_t *doorbell_lock)
-{
-       /* i386 stack is aligned to 8 bytes, so this should be OK: */
-       u8 xmmsave[8] __attribute__((aligned(8)));
-       unsigned long cr0;
-
-       cr0 = mthca_get_fpu();
-
-       asm volatile (
-               "movlps %%xmm0,(%0); \n\t"
-               "movlps (%1),%%xmm0; \n\t"
-               "movlps %%xmm0,(%2); \n\t"
-               "movlps (%0),%%xmm0; \n\t"
-               :
-               : "r" (xmmsave), "r" (val), "r" (dest)
-               : "memory" );
-
-       mthca_put_fpu(cr0);
-}
-
 #else
-/* Just fall back to a spinlock to protect the doorbell */
+
+/*
+ * Just fall back to a spinlock to protect the doorbell if
+ * BITS_PER_LONG is 32 -- there's no portable way to do atomic 64-bit
+ * MMIO writes.
+ */
 
 #define MTHCA_DECLARE_DOORBELL_LOCK(name) spinlock_t name;
 #define MTHCA_INIT_DOORBELL_LOCK(ptr)     spin_lock_init(ptr)
diff -urN linux/drivers/infiniband/hw/mthca/mthca_eq.c 
linux/drivers/infiniband/hw/mthca/mthca_eq.c
--- linux/drivers/infiniband/hw/mthca/mthca_eq.c        2005/01/25 04:28:16     
1.2
+++ linux/drivers/infiniband/hw/mthca/mthca_eq.c        2005/02/07 02:54:45     
1.3
@@ -164,12 +164,12 @@
                MTHCA_ASYNC_EVENT_MASK;
 }
 
-static inline void set_eq_ci(struct mthca_dev *dev, int eqn, int ci)
+static inline void set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 
ci)
 {
        u32 doorbell[2];
 
-       doorbell[0] = cpu_to_be32(MTHCA_EQ_DB_SET_CI | eqn);
-       doorbell[1] = cpu_to_be32(ci);
+       doorbell[0] = cpu_to_be32(MTHCA_EQ_DB_SET_CI | eq->eqn);
+       doorbell[1] = cpu_to_be32(ci & (eq->nent - 1));
 
        mthca_write64(doorbell,
                      dev->kar + MTHCA_EQ_DOORBELL,
@@ -200,21 +200,22 @@
                      MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
 }
 
-static inline struct mthca_eqe *get_eqe(struct mthca_eq *eq, int entry)
+static inline struct mthca_eqe *get_eqe(struct mthca_eq *eq, u32 entry)
 {
-       return eq->page_list[entry * MTHCA_EQ_ENTRY_SIZE / PAGE_SIZE].buf
-               + (entry * MTHCA_EQ_ENTRY_SIZE) % PAGE_SIZE;
+       unsigned long off = (entry & (eq->nent - 1)) * MTHCA_EQ_ENTRY_SIZE;
+       return eq->page_list[off / PAGE_SIZE].buf + off % PAGE_SIZE;
 }
 
-static inline int next_eqe_sw(struct mthca_eq *eq)
+static inline struct mthca_eqe* next_eqe_sw(struct mthca_eq *eq)
 {
-       return !(MTHCA_EQ_ENTRY_OWNER_HW &
-                get_eqe(eq, eq->cons_index)->owner);
+       struct mthca_eqe* eqe;
+       eqe = get_eqe(eq, eq->cons_index);
+       return (MTHCA_EQ_ENTRY_OWNER_HW & eqe->owner) ? NULL : eqe;
 }
 
-static inline void set_eqe_hw(struct mthca_eq *eq, int entry)
+static inline void set_eqe_hw(struct mthca_eqe *eqe)
 {
-       get_eqe(eq, entry)->owner =  MTHCA_EQ_ENTRY_OWNER_HW;
+       eqe->owner =  MTHCA_EQ_ENTRY_OWNER_HW;
 }
 
 static void port_change(struct mthca_dev *dev, int port, int active)
@@ -235,10 +236,10 @@
 {
        struct mthca_eqe *eqe;
        int disarm_cqn;
+       int  eqes_found = 0;
 
-       while (next_eqe_sw(eq)) {
+       while ((eqe = next_eqe_sw(eq))) {
                int set_ci = 0;
-               eqe = get_eqe(eq, eq->cons_index);
 
                /*
                 * Make sure we read EQ entry contents after we've
@@ -328,12 +329,13 @@
                        break;
                };
 
-               set_eqe_hw(eq, eq->cons_index);
-               eq->cons_index = (eq->cons_index + 1) & (eq->nent - 1);
+               set_eqe_hw(eqe);
+               ++eq->cons_index;
+               eqes_found = 1;
 
                if (set_ci) {
                        wmb(); /* see comment below */
-                       set_eq_ci(dev, eq->eqn, eq->cons_index);
+                       set_eq_ci(dev, eq, eq->cons_index);
                        set_ci = 0;
                }
        }
@@ -347,8 +349,10 @@
         * possibility of the HCA writing an entry and then
         * having set_eqe_hw() overwrite the owner field.
         */
-       wmb();
-       set_eq_ci(dev, eq->eqn, eq->cons_index);
+       if (likely(eqes_found)) {
+               wmb();
+               set_eq_ci(dev, eq, eq->cons_index);
+       }
        eq_req_not(dev, eq->eqn);
 }
 
@@ -362,10 +366,11 @@
        if (dev->eq_table.clr_mask)
                writel(dev->eq_table.clr_mask, dev->eq_table.clr_int);
 
-       while ((ecr = readl(dev->hcr + MTHCA_ECR_OFFSET + 4)) != 0) {
+       if ((ecr = readl(dev->ecr_base + 4)) != 0) {
                work = 1;
 
-               writel(ecr, dev->hcr + MTHCA_ECR_CLR_OFFSET + 4);
+               writel(ecr, dev->ecr_base +
+                      MTHCA_ECR_CLR_BASE - MTHCA_ECR_BASE + 4);
 
                for (i = 0; i < MTHCA_NUM_EQ; ++i)
                        if (ecr & dev->eq_table.eq[i].ecr_mask)
@@ -381,7 +386,6 @@
        struct mthca_eq  *eq  = eq_ptr;
        struct mthca_dev *dev = eq->dev;
 
-       writel(eq->ecr_mask, dev->hcr + MTHCA_ECR_CLR_OFFSET + 4);
        mthca_eq_int(dev, eq);
 
        /* MSI-X vectors always belong to us */
@@ -441,7 +445,7 @@
        }
 
        for (i = 0; i < nent; ++i)
-               set_eqe_hw(eq, i);
+               set_eqe_hw(get_eqe(eq, i));
 
        eq->eqn = mthca_alloc(&dev->eq_table.alloc);
        if (eq->eqn == -1)
@@ -574,6 +578,50 @@
                                 dev->eq_table.eq + i);
 }
 
+int __devinit mthca_map_eq_icm(struct mthca_dev *dev, u64 icm_virt)
+{
+       int ret;
+       u8 status;
+
+       /*
+        * We assume that mapping one page is enough for the whole EQ
+        * context table.  This is fine with all current HCAs, because
+        * we only use 32 EQs and each EQ uses 32 bytes of context
+        * memory, or 1 KB total.
+        */
+       dev->eq_table.icm_virt = icm_virt;
+       dev->eq_table.icm_page = alloc_page(GFP_HIGHUSER);
+       if (!dev->eq_table.icm_page)
+               return -ENOMEM;
+       dev->eq_table.icm_dma  = pci_map_page(dev->pdev, 
dev->eq_table.icm_page, 0,
+                                             PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
+       if (pci_dma_mapping_error(dev->eq_table.icm_dma)) {
+               __free_page(dev->eq_table.icm_page);
+               return -ENOMEM;
+       }
+
+       ret = mthca_MAP_ICM_page(dev, dev->eq_table.icm_dma, icm_virt, &status);
+       if (!ret && status)
+               ret = -EINVAL;
+       if (ret) {
+               pci_unmap_page(dev->pdev, dev->eq_table.icm_dma, PAGE_SIZE,
+                              PCI_DMA_BIDIRECTIONAL);
+               __free_page(dev->eq_table.icm_page);
+       }
+
+       return ret;
+}
+
+void __devexit mthca_unmap_eq_icm(struct mthca_dev *dev)
+{
+       u8 status;
+
+       mthca_UNMAP_ICM(dev, dev->eq_table.icm_virt, PAGE_SIZE / 4096, &status);
+       pci_unmap_page(dev->pdev, dev->eq_table.icm_dma, PAGE_SIZE,
+                      PCI_DMA_BIDIRECTIONAL);
+       __free_page(dev->eq_table.icm_page);
+}
+
 int __devinit mthca_init_eq_table(struct mthca_dev *dev)
 {
        int err;
diff -urN linux/drivers/infiniband/hw/mthca/mthca_mad.c 
linux/drivers/infiniband/hw/mthca/mthca_mad.c
--- linux/drivers/infiniband/hw/mthca/mthca_mad.c       2005/01/25 04:28:16     
1.2
+++ linux/drivers/infiniband/hw/mthca/mthca_mad.c       2005/02/07 02:54:45     
1.3
@@ -232,8 +232,9 @@
                return IB_MAD_RESULT_SUCCESS;
 
        err = mthca_MAD_IFC(to_mdev(ibdev),
-                           !!(mad_flags & IB_MAD_IGNORE_MKEY),
-                           port_num, in_mad, out_mad,
+                           mad_flags & IB_MAD_IGNORE_MKEY,
+                           mad_flags & IB_MAD_IGNORE_BKEY,
+                           port_num, in_wc, in_grh, in_mad, out_mad,
                            &status);
        if (err) {
                mthca_err(to_mdev(ibdev), "MAD_IFC failed\n");
diff -urN linux/drivers/infiniband/hw/mthca/mthca_main.c 
linux/drivers/infiniband/hw/mthca/mthca_main.c
--- linux/drivers/infiniband/hw/mthca/mthca_main.c      2005/01/25 04:28:16     
1.2
+++ linux/drivers/infiniband/hw/mthca/mthca_main.c      2005/02/07 02:54:45     
1.3
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -40,10 +40,6 @@
 #include <linux/pci.h>
 #include <linux/interrupt.h>
 
-#ifdef CONFIG_INFINIBAND_MTHCA_SSE_DOORBELL
-#include <asm/cpufeature.h>
-#endif
-
 #include "mthca_dev.h"
 #include "mthca_config_reg.h"
 #include "mthca_cmd.h"
@@ -82,12 +78,9 @@
        .num_cq     = 1 << 16,
        .num_mcg    = 1 << 13,
        .num_mpt    = 1 << 17,
-       .num_mtt    = 1 << 20
-};
-
-enum {
-       MTHCA_TAVOR_NUM_UDAV  = 1 << 15,
-       MTHCA_ARBEL_UARC_SIZE = 1 << 18
+       .num_mtt    = 1 << 20,
+       .num_udav   = 1 << 15,  /* Tavor only */
+       .uarc_size  = 1 << 18,  /* Arbel only */
 };
 
 static int __devinit mthca_tune_pci(struct mthca_dev *mdev)
@@ -207,58 +200,58 @@
        err = mthca_QUERY_FW(mdev, &status);
        if (err) {
                mthca_err(mdev, "QUERY_FW command failed, aborting.\n");
-               goto err_out_disable;
+               goto err_disable;
        }
        if (status) {
                mthca_err(mdev, "QUERY_FW returned status 0x%02x, "
                          "aborting.\n", status);
                err = -EINVAL;
-               goto err_out_disable;
+               goto err_disable;
        }
        err = mthca_QUERY_DDR(mdev, &status);
        if (err) {
                mthca_err(mdev, "QUERY_DDR command failed, aborting.\n");
-               goto err_out_disable;
+               goto err_disable;
        }
        if (status) {
                mthca_err(mdev, "QUERY_DDR returned status 0x%02x, "
                          "aborting.\n", status);
                err = -EINVAL;
-               goto err_out_disable;
+               goto err_disable;
        }
 
        err = mthca_dev_lim(mdev, &dev_lim);
 
        profile = default_profile;
-       profile.num_uar  = dev_lim.uar_size / PAGE_SIZE;
-       profile.num_udav = MTHCA_TAVOR_NUM_UDAV;
+       profile.num_uar   = dev_lim.uar_size / PAGE_SIZE;
+       profile.uarc_size = 0;
 
        err = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca);
-       if (err)
-               goto err_out_disable;
+       if (err < 0)
+               goto err_disable;
 
        err = mthca_INIT_HCA(mdev, &init_hca, &status);
        if (err) {
                mthca_err(mdev, "INIT_HCA command failed, aborting.\n");
-               goto err_out_disable;
+               goto err_disable;
        }
        if (status) {
                mthca_err(mdev, "INIT_HCA returned status 0x%02x, "
                          "aborting.\n", status);
                err = -EINVAL;
-               goto err_out_disable;
+               goto err_disable;
        }
 
        err = mthca_QUERY_ADAPTER(mdev, &adapter, &status);
        if (err) {
                mthca_err(mdev, "QUERY_ADAPTER command failed, aborting.\n");
-               goto err_out_disable;
+               goto err_close;
        }
        if (status) {
                mthca_err(mdev, "QUERY_ADAPTER returned status 0x%02x, "
                          "aborting.\n", status);
                err = -EINVAL;
-               goto err_out_close;
+               goto err_close;
        }
 
        mdev->eq_table.inta_pin = adapter.inta_pin;
@@ -266,10 +259,10 @@
 
        return 0;
 
-err_out_close:
+err_close:
        mthca_CLOSE_HCA(mdev, 0, &status);
 
-err_out_disable:
+err_disable:
        mthca_SYS_DIS(mdev, &status);
 
        return err;
@@ -282,15 +275,15 @@
 
        /* FIXME: use HCA-attached memory for FW if present */
 
-       mdev->fw.arbel.icm =
+       mdev->fw.arbel.fw_icm =
                mthca_alloc_icm(mdev, mdev->fw.arbel.fw_pages,
                                GFP_HIGHUSER | __GFP_NOWARN);
-       if (!mdev->fw.arbel.icm) {
+       if (!mdev->fw.arbel.fw_icm) {
                mthca_err(mdev, "Couldn't allocate FW area, aborting.\n");
                return -ENOMEM;
        }
 
-       err = mthca_MAP_FA(mdev, mdev->fw.arbel.icm, &status);
+       err = mthca_MAP_FA(mdev, mdev->fw.arbel.fw_icm, &status);
        if (err) {
                mthca_err(mdev, "MAP_FA command failed, aborting.\n");
                goto err_free;
@@ -317,13 +310,146 @@
        mthca_UNMAP_FA(mdev, &status);
 
 err_free:
-       mthca_free_icm(mdev, mdev->fw.arbel.icm);
+       mthca_free_icm(mdev, mdev->fw.arbel.fw_icm);
+       return err;
+}
+
+static int __devinit mthca_init_icm(struct mthca_dev *mdev,
+                                   struct mthca_dev_lim *dev_lim,
+                                   struct mthca_init_hca_param *init_hca,
+                                   u64 icm_size)
+{
+       u64 aux_pages;
+       u8 status;
+       int err;
+
+       err = mthca_SET_ICM_SIZE(mdev, icm_size, &aux_pages, &status);
+       if (err) {
+               mthca_err(mdev, "SET_ICM_SIZE command failed, aborting.\n");
+               return err;
+       }
+       if (status) {
+               mthca_err(mdev, "SET_ICM_SIZE returned status 0x%02x, "
+                         "aborting.\n", status);
+               return -EINVAL;
+       }
+
+       mthca_dbg(mdev, "%lld KB of HCA context requires %lld KB aux memory.\n",
+                 (unsigned long long) icm_size >> 10,
+                 (unsigned long long) aux_pages << 2);
+
+       mdev->fw.arbel.aux_icm = mthca_alloc_icm(mdev, aux_pages,
+                                                GFP_HIGHUSER | __GFP_NOWARN);
+       if (!mdev->fw.arbel.aux_icm) {
+               mthca_err(mdev, "Couldn't allocate aux memory, aborting.\n");
+               return -ENOMEM;
+       }
+
+       err = mthca_MAP_ICM_AUX(mdev, mdev->fw.arbel.aux_icm, &status);
+       if (err) {
+               mthca_err(mdev, "MAP_ICM_AUX command failed, aborting.\n");
+               goto err_free_aux;
+       }
+       if (status) {
+               mthca_err(mdev, "MAP_ICM_AUX returned status 0x%02x, 
aborting.\n", status);
+               err = -EINVAL;
+               goto err_free_aux;
+       }
+
+       err = mthca_map_eq_icm(mdev, init_hca->eqc_base);
+       if (err) {
+               mthca_err(mdev, "Failed to map EQ context memory, aborting.\n");
+               goto err_unmap_aux;
+       }
+
+       mdev->mr_table.mtt_table = mthca_alloc_icm_table(mdev, 
init_hca->mtt_base,
+                                                        
mdev->limits.num_mtt_segs *
+                                                        init_hca->mtt_seg_sz,
+                                                        
mdev->limits.reserved_mtts *
+                                                        init_hca->mtt_seg_sz, 
1);
+       if (!mdev->mr_table.mtt_table) {
+               mthca_err(mdev, "Failed to map MTT context memory, 
aborting.\n");
+               err = -ENOMEM;
+               goto err_unmap_eq;
+       }
+
+       mdev->mr_table.mpt_table = mthca_alloc_icm_table(mdev, 
init_hca->mpt_base,
+                                                        mdev->limits.num_mpts *
+                                                        dev_lim->mpt_entry_sz,
+                                                        
mdev->limits.reserved_mrws *
+                                                        dev_lim->mpt_entry_sz, 
1);
+       if (!mdev->mr_table.mpt_table) {
+               mthca_err(mdev, "Failed to map MPT context memory, 
aborting.\n");
+               err = -ENOMEM;
+               goto err_unmap_mtt;
+       }
+
+       mdev->qp_table.qp_table = mthca_alloc_icm_table(mdev, 
init_hca->qpc_base,
+                                                       mdev->limits.num_qps *
+                                                       dev_lim->qpc_entry_sz,
+                                                       
mdev->limits.reserved_qps *
+                                                       dev_lim->qpc_entry_sz, 
1);
+       if (!mdev->qp_table.qp_table) {
+               mthca_err(mdev, "Failed to map QP context memory, aborting.\n");
+               err = -ENOMEM;
+               goto err_unmap_mpt;
+       }
+
+       mdev->qp_table.eqp_table = mthca_alloc_icm_table(mdev, 
init_hca->eqpc_base,
+                                                        mdev->limits.num_qps *
+                                                        dev_lim->eqpc_entry_sz,
+                                                        
mdev->limits.reserved_qps *
+                                                        
dev_lim->eqpc_entry_sz, 1);
+       if (!mdev->qp_table.eqp_table) {
+               mthca_err(mdev, "Failed to map EQP context memory, 
aborting.\n");
+               err = -ENOMEM;
+               goto err_unmap_qp;
+       }
+
+       mdev->cq_table.table = mthca_alloc_icm_table(mdev, init_hca->cqc_base,
+                                                    mdev->limits.num_cqs *
+                                                    dev_lim->cqc_entry_sz,
+                                                    mdev->limits.reserved_cqs *
+                                                    dev_lim->cqc_entry_sz, 1);
+       if (!mdev->cq_table.table) {
+               mthca_err(mdev, "Failed to map CQ context memory, aborting.\n");
+               err = -ENOMEM;
+               goto err_unmap_eqp;
+       }
+
+       return 0;
+
+err_unmap_eqp:
+       mthca_free_icm_table(mdev, mdev->qp_table.eqp_table);
+
+err_unmap_qp:
+       mthca_free_icm_table(mdev, mdev->qp_table.qp_table);
+
+err_unmap_mpt:
+       mthca_free_icm_table(mdev, mdev->mr_table.mpt_table);
+
+err_unmap_mtt:
+       mthca_free_icm_table(mdev, mdev->mr_table.mtt_table);
+
+err_unmap_eq:
+       mthca_unmap_eq_icm(mdev);
+
+err_unmap_aux:
+       mthca_UNMAP_ICM_AUX(mdev, &status);
+
+err_free_aux:
+       mthca_free_icm(mdev, mdev->fw.arbel.aux_icm);
+
        return err;
 }
 
 static int __devinit mthca_init_arbel(struct mthca_dev *mdev)
 {
-       struct mthca_dev_lim dev_lim;
+       struct mthca_dev_lim        dev_lim;
+       struct mthca_profile        profile;
+       struct mthca_init_hca_param init_hca;
+       struct mthca_adapter        adapter;
+       u64 icm_size;
        u8 status;
        int err;
 
@@ -355,26 +481,77 @@
        err = mthca_load_fw(mdev);
        if (err) {
                mthca_err(mdev, "Failed to start FW, aborting.\n");
-               goto err_out_disable;
+               goto err_disable;
        }
 
        err = mthca_dev_lim(mdev, &dev_lim);
        if (err) {
                mthca_err(mdev, "QUERY_DEV_LIM command failed, aborting.\n");
-               goto err_out_stop_fw;
+               goto err_stop_fw;
        }
 
-       mthca_warn(mdev, "Sorry, native MT25208 mode support is not done, "
-                  "aborting.\n");
-       err = -ENODEV;
+       profile = default_profile;
+       profile.num_uar  = dev_lim.uar_size / PAGE_SIZE;
+       profile.num_udav = 0;
+
+       icm_size = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca);
+       if ((int) icm_size < 0) {
+               err = icm_size;
+               goto err_stop_fw;
+       }
+
+       err = mthca_init_icm(mdev, &dev_lim, &init_hca, icm_size);
+       if (err)
+               goto err_stop_fw;
 
-err_out_stop_fw:
+       err = mthca_INIT_HCA(mdev, &init_hca, &status);
+       if (err) {
+               mthca_err(mdev, "INIT_HCA command failed, aborting.\n");
+               goto err_free_icm;
+       }
+       if (status) {
+               mthca_err(mdev, "INIT_HCA returned status 0x%02x, "
+                         "aborting.\n", status);
+               err = -EINVAL;
+               goto err_free_icm;
+       }
+
+       err = mthca_QUERY_ADAPTER(mdev, &adapter, &status);
+       if (err) {
+               mthca_err(mdev, "QUERY_ADAPTER command failed, aborting.\n");
+               goto err_free_icm;
+       }
+       if (status) {
+               mthca_err(mdev, "QUERY_ADAPTER returned status 0x%02x, "
+                         "aborting.\n", status);
+               err = -EINVAL;
+               goto err_free_icm;
+       }
+
+       mdev->eq_table.inta_pin = adapter.inta_pin;
+       mdev->rev_id            = adapter.revision_id;
+
+       return 0;
+
+err_free_icm:
+       mthca_free_icm_table(mdev, mdev->cq_table.table);
+       mthca_free_icm_table(mdev, mdev->qp_table.eqp_table);
+       mthca_free_icm_table(mdev, mdev->qp_table.qp_table);
+       mthca_free_icm_table(mdev, mdev->mr_table.mpt_table);
+       mthca_free_icm_table(mdev, mdev->mr_table.mtt_table);
+       mthca_unmap_eq_icm(mdev);
+
+       mthca_UNMAP_ICM_AUX(mdev, &status);
+       mthca_free_icm(mdev, mdev->fw.arbel.aux_icm);
+
+err_stop_fw:
        mthca_UNMAP_FA(mdev, &status);
-       mthca_free_icm(mdev, mdev->fw.arbel.icm);
+       mthca_free_icm(mdev, mdev->fw.arbel.fw_icm);
 
-err_out_disable:
+err_disable:
        if (!(mdev->mthca_flags & MTHCA_FLAG_NO_LAM))
                mthca_DISABLE_LAM(mdev, &status);
+
        return err;
 }
 
@@ -389,6 +566,7 @@
 static int __devinit mthca_setup_hca(struct mthca_dev *dev)
 {
        int err;
+       u8 status;
 
        MTHCA_INIT_DOORBELL_LOCK(&dev->doorbell_lock);
 
@@ -403,82 +581,101 @@
        if (err) {
                mthca_err(dev, "Failed to initialize "
                          "memory region table, aborting.\n");
-               goto err_out_pd_table_free;
+               goto err_pd_table_free;
        }
 
        err = mthca_pd_alloc(dev, &dev->driver_pd);
        if (err) {
                mthca_err(dev, "Failed to create driver PD, "
                          "aborting.\n");
-               goto err_out_mr_table_free;
+               goto err_mr_table_free;
+       }
+
+       if (dev->hca_type == ARBEL_NATIVE) {
+               mthca_warn(dev, "Sorry, native MT25208 mode support is not 
done, "
+                          "aborting.\n");
+               err = -ENODEV;
+               goto err_pd_free;
        }
 
        err = mthca_init_eq_table(dev);
        if (err) {
                mthca_err(dev, "Failed to initialize "
                          "event queue table, aborting.\n");
-               goto err_out_pd_free;
+               goto err_pd_free;
        }
 
        err = mthca_cmd_use_events(dev);
        if (err) {
                mthca_err(dev, "Failed to switch to event-driven "
                          "firmware commands, aborting.\n");
-               goto err_out_eq_table_free;
+               goto err_eq_table_free;
        }
 
+       err = mthca_NOP(dev, &status);
+       if (err || status) {
+               mthca_err(dev, "NOP command failed to generate interrupt, 
aborting.\n");
+               if (dev->mthca_flags & (MTHCA_FLAG_MSI | MTHCA_FLAG_MSI_X))
+                       mthca_err(dev, "Try again with MSI/MSI-X disabled.\n");
+               else
+                       mthca_err(dev, "BIOS or ACPI interrupt routing 
problem?\n");
+
+               goto err_cmd_poll;
+       } else
+               mthca_dbg(dev, "NOP command IRQ test passed\n");
+
        err = mthca_init_cq_table(dev);
        if (err) {
                mthca_err(dev, "Failed to initialize "
                          "completion queue table, aborting.\n");
-               goto err_out_cmd_poll;
+               goto err_cmd_poll;
        }
 
        err = mthca_init_qp_table(dev);
        if (err) {
                mthca_err(dev, "Failed to initialize "
                          "queue pair table, aborting.\n");
-               goto err_out_cq_table_free;
+               goto err_cq_table_free;
        }
 
        err = mthca_init_av_table(dev);
        if (err) {
                mthca_err(dev, "Failed to initialize "
                          "address vector table, aborting.\n");
-               goto err_out_qp_table_free;
+               goto err_qp_table_free;
        }
 
        err = mthca_init_mcg_table(dev);
        if (err) {
                mthca_err(dev, "Failed to initialize "
                          "multicast group table, aborting.\n");
-               goto err_out_av_table_free;
+               goto err_av_table_free;
        }
 
        return 0;
 
-err_out_av_table_free:
+err_av_table_free:
        mthca_cleanup_av_table(dev);
 
-err_out_qp_table_free:
+err_qp_table_free:
        mthca_cleanup_qp_table(dev);
 
-err_out_cq_table_free:
+err_cq_table_free:
        mthca_cleanup_cq_table(dev);
 
-err_out_cmd_poll:
+err_cmd_poll:
        mthca_cmd_use_polling(dev);
 
-err_out_eq_table_free:
+err_eq_table_free:
        mthca_cleanup_eq_table(dev);
 
-err_out_pd_free:
+err_pd_free:
        mthca_pd_free(dev, &dev->driver_pd);
 
-err_out_mr_table_free:
+err_mr_table_free:
        mthca_cleanup_mr_table(dev);
 
-err_out_pd_table_free:
+err_pd_table_free:
        mthca_cleanup_pd_table(dev);
        return err;
 }
@@ -498,57 +695,83 @@
         */
        if (!request_mem_region(pci_resource_start(pdev, 0) +
                                MTHCA_HCR_BASE,
-                               MTHCA_MAP_HCR_SIZE,
-                               DRV_NAME))
-               return -EBUSY;
+                               MTHCA_HCR_SIZE,
+                               DRV_NAME)) {
+               err = -EBUSY;
+               goto err_hcr_failed;
+       }
+
+       if (!request_mem_region(pci_resource_start(pdev, 0) +
+                               MTHCA_ECR_BASE,
+                               MTHCA_MAP_ECR_SIZE,
+                               DRV_NAME)) {
+               err = -EBUSY;
+               goto err_ecr_failed;
+       }
 
        if (!request_mem_region(pci_resource_start(pdev, 0) +
                                MTHCA_CLR_INT_BASE,
                                MTHCA_CLR_INT_SIZE,
                                DRV_NAME)) {
                err = -EBUSY;
-               goto err_out_bar0_beg;
+               goto err_int_failed;
        }
 
+
        err = pci_request_region(pdev, 2, DRV_NAME);
        if (err)
-               goto err_out_bar0_end;
+               goto err_bar2_failed;
 
        if (!ddr_hidden) {
                err = pci_request_region(pdev, 4, DRV_NAME);
                if (err)
-                       goto err_out_bar2;
+                       goto err_bar4_failed;
        }
 
        return 0;
 
-err_out_bar0_beg:
-       release_mem_region(pci_resource_start(pdev, 0) +
-                          MTHCA_HCR_BASE,
-                          MTHCA_MAP_HCR_SIZE);
+err_bar4_failed:
+
+       pci_release_region(pdev, 2);
+err_bar2_failed:
 
-err_out_bar0_end:
        release_mem_region(pci_resource_start(pdev, 0) +
                           MTHCA_CLR_INT_BASE,
                           MTHCA_CLR_INT_SIZE);
+err_int_failed:
+
+       release_mem_region(pci_resource_start(pdev, 0) +
+                          MTHCA_ECR_BASE,
+                          MTHCA_MAP_ECR_SIZE);
+err_ecr_failed:
+
+       release_mem_region(pci_resource_start(pdev, 0) +
+                          MTHCA_HCR_BASE,
+                          MTHCA_HCR_SIZE);
+err_hcr_failed:
 
-err_out_bar2:
-       pci_release_region(pdev, 2);
        return err;
 }
 
 static void mthca_release_regions(struct pci_dev *pdev,
                                  int ddr_hidden)
 {
-       release_mem_region(pci_resource_start(pdev, 0) +
-                          MTHCA_HCR_BASE,
-                          MTHCA_MAP_HCR_SIZE);
+       if (!ddr_hidden)
+               pci_release_region(pdev, 4);
+
+       pci_release_region(pdev, 2);
+
        release_mem_region(pci_resource_start(pdev, 0) +
                           MTHCA_CLR_INT_BASE,
                           MTHCA_CLR_INT_SIZE);
-       pci_release_region(pdev, 2);
-       if (!ddr_hidden)
-               pci_release_region(pdev, 4);
+
+       release_mem_region(pci_resource_start(pdev, 0) +
+                          MTHCA_ECR_BASE,
+                          MTHCA_MAP_ECR_SIZE);
+
+       release_mem_region(pci_resource_start(pdev, 0) +
+                          MTHCA_HCR_BASE,
+                          MTHCA_HCR_SIZE);
 }
 
 static int __devinit mthca_enable_msi_x(struct mthca_dev *mdev)
@@ -582,8 +805,18 @@
        mthca_CLOSE_HCA(mdev, 0, &status);
 
        if (mdev->hca_type == ARBEL_NATIVE) {
+               mthca_free_icm_table(mdev, mdev->cq_table.table);
+               mthca_free_icm_table(mdev, mdev->qp_table.eqp_table);
+               mthca_free_icm_table(mdev, mdev->qp_table.qp_table);
+               mthca_free_icm_table(mdev, mdev->mr_table.mpt_table);
+               mthca_free_icm_table(mdev, mdev->mr_table.mtt_table);
+               mthca_unmap_eq_icm(mdev);
+
+               mthca_UNMAP_ICM_AUX(mdev, &status);
+               mthca_free_icm(mdev, mdev->fw.arbel.aux_icm);
+
                mthca_UNMAP_FA(mdev, &status);
-               mthca_free_icm(mdev, mdev->fw.arbel.icm);
+               mthca_free_icm(mdev, mdev->fw.arbel.fw_icm);
 
                if (!(mdev->mthca_flags & MTHCA_FLAG_NO_LAM))
                        mthca_DISABLE_LAM(mdev, &status);
@@ -623,13 +856,13 @@
            pci_resource_len(pdev, 0) != 1 << 20) {
                dev_err(&pdev->dev, "Missing DCS, aborting.");
                err = -ENODEV;
-               goto err_out_disable_pdev;
+               goto err_disable_pdev;
        }
        if (!(pci_resource_flags(pdev, 2) & IORESOURCE_MEM) ||
            pci_resource_len(pdev, 2) != 1 << 23) {
                dev_err(&pdev->dev, "Missing UAR, aborting.");
                err = -ENODEV;
-               goto err_out_disable_pdev;
+               goto err_disable_pdev;
        }
        if (!(pci_resource_flags(pdev, 4) & IORESOURCE_MEM))
                ddr_hidden = 1;
@@ -638,7 +871,7 @@
        if (err) {
                dev_err(&pdev->dev, "Cannot obtain PCI resources, "
                        "aborting.\n");
-               goto err_out_disable_pdev;
+               goto err_disable_pdev;
        }
 
        pci_set_master(pdev);
@@ -649,7 +882,7 @@
                err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
                if (err) {
                        dev_err(&pdev->dev, "Can't set PCI DMA mask, 
aborting.\n");
-                       goto err_out_free_res;
+                       goto err_free_res;
                }
        }
        err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
@@ -660,7 +893,7 @@
                if (err) {
                        dev_err(&pdev->dev, "Can't set consistent PCI DMA mask, 
"
                                "aborting.\n");
-                       goto err_out_free_res;
+                       goto err_free_res;
                }
        }
 
@@ -669,7 +902,7 @@
                dev_err(&pdev->dev, "Device struct alloc failed, "
                        "aborting.\n");
                err = -ENOMEM;
-               goto err_out_free_res;
+               goto err_free_res;
        }
 
        mdev->pdev     = pdev;
@@ -686,7 +919,7 @@
        err = mthca_reset(mdev);
        if (err) {
                mthca_err(mdev, "Failed to reset HCA, aborting.\n");
-               goto err_out_free_dev;
+               goto err_free_dev;
        }
 
        if (msi_x && !mthca_enable_msi_x(mdev))
@@ -700,20 +933,30 @@
        mdev->cmd.use_events = 0;
 
        mthca_base = pci_resource_start(pdev, 0);
-       mdev->hcr = ioremap(mthca_base + MTHCA_HCR_BASE, MTHCA_MAP_HCR_SIZE);
+       mdev->hcr = ioremap(mthca_base + MTHCA_HCR_BASE, MTHCA_HCR_SIZE);
        if (!mdev->hcr) {
                mthca_err(mdev, "Couldn't map command register, "
                          "aborting.\n");
                err = -ENOMEM;
-               goto err_out_free_dev;
+               goto err_free_dev;
        }
+
        mdev->clr_base = ioremap(mthca_base + MTHCA_CLR_INT_BASE,
                                 MTHCA_CLR_INT_SIZE);
        if (!mdev->clr_base) {
-               mthca_err(mdev, "Couldn't map command register, "
+               mthca_err(mdev, "Couldn't map interrupt clear register, "
+                         "aborting.\n");
+               err = -ENOMEM;
+               goto err_iounmap;
+       }
+
+       mdev->ecr_base = ioremap(mthca_base + MTHCA_ECR_BASE,
+                                MTHCA_ECR_SIZE + MTHCA_ECR_CLR_SIZE);
+       if (!mdev->ecr_base) {
+               mthca_err(mdev, "Couldn't map ecr register, "
                          "aborting.\n");
                err = -ENOMEM;
-               goto err_out_iounmap;
+               goto err_iounmap_clr;
        }
 
        mthca_base = pci_resource_start(pdev, 2);
@@ -722,37 +965,37 @@
                mthca_err(mdev, "Couldn't map kernel access region, "
                          "aborting.\n");
                err = -ENOMEM;
-               goto err_out_iounmap_clr;
+               goto err_iounmap_ecr;
        }
 
        err = mthca_tune_pci(mdev);
        if (err)
-               goto err_out_iounmap_kar;
+               goto err_iounmap_kar;
 
        err = mthca_init_hca(mdev);
        if (err)
-               goto err_out_iounmap_kar;
+               goto err_iounmap_kar;
 
        err = mthca_setup_hca(mdev);
        if (err)
-               goto err_out_close;
+               goto err_close;
 
        err = mthca_register_device(mdev);
        if (err)
-               goto err_out_cleanup;
+               goto err_cleanup;
 
        err = mthca_create_agents(mdev);
        if (err)
-               goto err_out_unregister;
+               goto err_unregister;
 
        pci_set_drvdata(pdev, mdev);
 
        return 0;
 
-err_out_unregister:
+err_unregister:
        mthca_unregister_device(mdev);
 
-err_out_cleanup:
+err_cleanup:
        mthca_cleanup_mcg_table(mdev);
        mthca_cleanup_av_table(mdev);
        mthca_cleanup_qp_table(mdev);
@@ -765,19 +1008,22 @@
        mthca_cleanup_mr_table(mdev);
        mthca_cleanup_pd_table(mdev);
 
-err_out_close:
+err_close:
        mthca_close_hca(mdev);
 
-err_out_iounmap_kar:
+err_iounmap_kar:
        iounmap(mdev->kar);
 
-err_out_iounmap_clr:
+err_iounmap_ecr:
+       iounmap(mdev->ecr_base);
+
+err_iounmap_clr:
        iounmap(mdev->clr_base);
 
-err_out_iounmap:
+err_iounmap:
        iounmap(mdev->hcr);
 
-err_out_free_dev:
+err_free_dev:
        if (mdev->mthca_flags & MTHCA_FLAG_MSI_X)
                pci_disable_msix(pdev);
        if (mdev->mthca_flags & MTHCA_FLAG_MSI)
@@ -785,10 +1031,10 @@
 
        ib_dealloc_device(&mdev->ib_dev);
 
-err_out_free_res:
+err_free_res:
        mthca_release_regions(pdev, ddr_hidden);
 
-err_out_disable_pdev:
+err_disable_pdev:
        pci_disable_device(pdev);
        pci_set_drvdata(pdev, NULL);
        return err;
@@ -822,6 +1068,7 @@
                mthca_close_hca(mdev);
 
                iounmap(mdev->hcr);
+               iounmap(mdev->ecr_base);
                iounmap(mdev->clr_base);
 
                if (mdev->mthca_flags & MTHCA_FLAG_MSI_X)
@@ -866,22 +1113,6 @@
 {
        int ret;
 
-       /*
-        * TODO: measure whether dynamically choosing doorbell code at
-        * runtime affects our performance.  Is there a "magic" way to
-        * choose without having to follow a function pointer every
-        * time we ring a doorbell?
-        */
-#ifdef CONFIG_INFINIBAND_MTHCA_SSE_DOORBELL
-       if (!cpu_has_xmm) {
-               printk(KERN_ERR PFX "mthca was compiled with SSE doorbell code, 
but\n");
-               printk(KERN_ERR PFX "the current CPU does not support SSE.\n");
-               printk(KERN_ERR PFX "Turn off 
CONFIG_INFINIBAND_MTHCA_SSE_DOORBELL "
-                      "and recompile.\n");
-               return -ENODEV;
-       }
-#endif
-
        ret = pci_register_driver(&mthca_driver);
        return ret < 0 ? ret : 0;
 }
diff -urN linux/drivers/infiniband/hw/mthca/mthca_memfree.c 
linux/drivers/infiniband/hw/mthca/mthca_memfree.c
--- linux/drivers/infiniband/hw/mthca/mthca_memfree.c   2005/01/25 04:28:16     
1.1
+++ linux/drivers/infiniband/hw/mthca/mthca_memfree.c   2005/02/07 02:54:45     
1.2
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -34,6 +34,16 @@
 
 #include "mthca_memfree.h"
 #include "mthca_dev.h"
+#include "mthca_cmd.h"
+
+/*
+ * We allocate in as big chunks as we can, up to a maximum of 256 KB
+ * per chunk.
+ */
+enum {
+       MTHCA_ICM_ALLOC_SIZE   = 1 << 18,
+       MTHCA_TABLE_CHUNK_SIZE = 1 << 18
+};
 
 void mthca_free_icm(struct mthca_dev *dev, struct mthca_icm *icm)
 {
@@ -71,11 +81,7 @@
 
        INIT_LIST_HEAD(&icm->chunk_list);
 
-       /*
-        * We allocate in as big chunks as we can, up to a maximum of
-        * 256 KB per chunk.
-        */
-       cur_order = get_order(1 << 18);
+       cur_order = get_order(MTHCA_ICM_ALLOC_SIZE);
 
        while (npages > 0) {
                if (!chunk) {
@@ -131,3 +137,70 @@
        mthca_free_icm(dev, icm);
        return NULL;
 }
+
+struct mthca_icm_table *mthca_alloc_icm_table(struct mthca_dev *dev,
+                                             u64 virt, unsigned size,
+                                             unsigned reserved,
+                                             int use_lowmem)
+{
+       struct mthca_icm_table *table;
+       int num_icm;
+       int i;
+       u8 status;
+
+       num_icm = size / MTHCA_TABLE_CHUNK_SIZE;
+
+       table = kmalloc(sizeof *table + num_icm * sizeof *table->icm, 
GFP_KERNEL);
+       if (!table)
+               return NULL;
+
+       table->virt    = virt;
+       table->num_icm = num_icm;
+       init_MUTEX(&table->sem);
+
+       for (i = 0; i < num_icm; ++i)
+               table->icm[i] = NULL;
+
+       for (i = 0; i < (reserved + MTHCA_TABLE_CHUNK_SIZE - 1) / 
MTHCA_TABLE_CHUNK_SIZE; ++i) {
+               table->icm[i] = mthca_alloc_icm(dev, MTHCA_TABLE_CHUNK_SIZE >> 
PAGE_SHIFT,
+                                               (use_lowmem ? GFP_KERNEL : 
GFP_HIGHUSER) |
+                                               __GFP_NOWARN);
+               if (!table->icm[i])
+                       goto err;
+               if (mthca_MAP_ICM(dev, table->icm[i], virt + i * 
MTHCA_TABLE_CHUNK_SIZE,
+                                 &status) || status) {
+                       mthca_free_icm(dev, table->icm[i]);
+                       table->icm[i] = NULL;
+                       goto err;
+               }
+       }
+
+       return table;
+
+err:
+       for (i = 0; i < num_icm; ++i)
+               if (table->icm[i]) {
+                       mthca_UNMAP_ICM(dev, virt + i * MTHCA_TABLE_CHUNK_SIZE,
+                                       MTHCA_TABLE_CHUNK_SIZE >> 12, &status);
+                       mthca_free_icm(dev, table->icm[i]);
+               }
+
+       kfree(table);
+
+       return NULL;
+}
+
+void mthca_free_icm_table(struct mthca_dev *dev, struct mthca_icm_table *table)
+{
+       int i;
+       u8 status;
+
+       for (i = 0; i < table->num_icm; ++i)
+               if (table->icm[i]) {
+                       mthca_UNMAP_ICM(dev, table->virt + i * 
MTHCA_TABLE_CHUNK_SIZE,
+                                       MTHCA_TABLE_CHUNK_SIZE >> 12, &status);
+                       mthca_free_icm(dev, table->icm[i]);
+               }
+
+       kfree(table);
+}
diff -urN linux/drivers/infiniband/hw/mthca/mthca_memfree.h 
linux/drivers/infiniband/hw/mthca/mthca_memfree.h
--- linux/drivers/infiniband/hw/mthca/mthca_memfree.h   2005/01/25 04:28:16     
1.1
+++ linux/drivers/infiniband/hw/mthca/mthca_memfree.h   2005/02/07 02:54:45     
1.2
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -38,8 +38,10 @@
 #include <linux/list.h>
 #include <linux/pci.h>
 
+#include <asm/semaphore.h>
+
 #define MTHCA_ICM_CHUNK_LEN \
-       ((512 - sizeof (struct list_head) - 2 * sizeof (int)) /         \
+       ((256 - sizeof (struct list_head) - 2 * sizeof (int)) /         \
         (sizeof (struct scatterlist)))
 
 struct mthca_icm_chunk {
@@ -53,6 +55,13 @@
        struct list_head chunk_list;
 };
 
+struct mthca_icm_table {
+       u64               virt;
+       int               num_icm;
+       struct semaphore  sem;
+       struct mthca_icm *icm[0];
+};
+
 struct mthca_icm_iter {
        struct mthca_icm       *icm;
        struct mthca_icm_chunk *chunk;
@@ -65,6 +74,12 @@
                                  unsigned int gfp_mask);
 void mthca_free_icm(struct mthca_dev *dev, struct mthca_icm *icm);
 
+struct mthca_icm_table *mthca_alloc_icm_table(struct mthca_dev *dev,
+                                             u64 virt, unsigned size,
+                                             unsigned reserved,
+                                             int use_lowmem);
+void mthca_free_icm_table(struct mthca_dev *dev, struct mthca_icm_table 
*table);
+
 static inline void mthca_icm_first(struct mthca_icm *icm,
                                   struct mthca_icm_iter *iter)
 {
diff -urN linux/drivers/infiniband/hw/mthca/mthca_profile.c 
linux/drivers/infiniband/hw/mthca/mthca_profile.c
--- linux/drivers/infiniband/hw/mthca/mthca_profile.c   2005/01/25 04:28:16     
1.2
+++ linux/drivers/infiniband/hw/mthca/mthca_profile.c   2005/02/07 02:54:45     
1.3
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -60,7 +60,7 @@
        MTHCA_NUM_PDS = 1 << 15
 };
 
-int mthca_make_profile(struct mthca_dev *dev,
+u64 mthca_make_profile(struct mthca_dev *dev,
                       struct mthca_profile *request,
                       struct mthca_dev_lim *dev_lim,
                       struct mthca_init_hca_param *init_hca)
@@ -116,6 +116,8 @@
                profile[i].type     = i;
                profile[i].log_num  = max(ffs(profile[i].num) - 1, 0);
                profile[i].size    *= profile[i].num;
+               if (dev->hca_type == ARBEL_NATIVE)
+                       profile[i].size = max(profile[i].size, (u64) PAGE_SIZE);
        }
 
        if (dev->hca_type == ARBEL_NATIVE) {
@@ -239,6 +241,10 @@
                case MTHCA_RES_UDAV:
                        dev->av_table.ddr_av_base = profile[i].start;
                        dev->av_table.num_ddr_avs = profile[i].num;
+               case MTHCA_RES_UARC:
+                       init_hca->uarc_base   = profile[i].start;
+                       init_hca->log_uarc_sz = ffs(request->uarc_size) - 13;
+                       init_hca->log_uar_sz  = ffs(request->num_uar) - 1;
                default:
                        break;
                }
@@ -251,5 +257,5 @@
        dev->limits.num_pds = MTHCA_NUM_PDS;
 
        kfree(profile);
-       return 0;
+       return total_size;
 }
diff -urN linux/drivers/infiniband/hw/mthca/mthca_profile.h 
linux/drivers/infiniband/hw/mthca/mthca_profile.h
--- linux/drivers/infiniband/hw/mthca/mthca_profile.h   2005/01/25 04:28:16     
1.2
+++ linux/drivers/infiniband/hw/mthca/mthca_profile.h   2005/02/07 02:54:45     
1.3
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -50,7 +50,7 @@
        int uarc_size;
 };
 
-int mthca_make_profile(struct mthca_dev *mdev,
+u64 mthca_make_profile(struct mthca_dev *mdev,
                       struct mthca_profile *request,
                       struct mthca_dev_lim *dev_lim,
                       struct mthca_init_hca_param *init_hca);
diff -urN linux/drivers/infiniband/hw/mthca/mthca_provider.c 
linux/drivers/infiniband/hw/mthca/mthca_provider.c
--- linux/drivers/infiniband/hw/mthca/mthca_provider.c  2005/01/25 04:28:16     
1.2
+++ linux/drivers/infiniband/hw/mthca/mthca_provider.c  2005/02/07 02:54:45     
1.3
@@ -59,8 +59,8 @@
        in_mad->method             = IB_MGMT_METHOD_GET;
        in_mad->attr_id            = IB_SMP_ATTR_NODE_INFO;
 
-       err = mthca_MAD_IFC(to_mdev(ibdev), 1,
-                           1, in_mad, out_mad,
+       err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1,
+                           1, NULL, NULL, in_mad, out_mad,
                            &status);
        if (err)
                goto out;
@@ -104,8 +104,8 @@
        in_mad->attr_id            = IB_SMP_ATTR_PORT_INFO;
        in_mad->attr_mod           = cpu_to_be32(port);
 
-       err = mthca_MAD_IFC(to_mdev(ibdev), 1,
-                           port, in_mad, out_mad,
+       err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1,
+                           port, NULL, NULL, in_mad, out_mad,
                            &status);
        if (err)
                goto out;
@@ -137,7 +137,35 @@
                             u8 port, int port_modify_mask,
                             struct ib_port_modify *props)
 {
-       return 0;
+       struct mthca_set_ib_param set_ib;
+       struct ib_port_attr attr;
+       int err;
+       u8 status;
+
+       if (down_interruptible(&to_mdev(ibdev)->cap_mask_mutex))
+               return -ERESTARTSYS;
+
+       err = mthca_query_port(ibdev, port, &attr);
+       if (err)
+               goto out;
+
+       set_ib.set_si_guid     = 0;
+       set_ib.reset_qkey_viol = !!(port_modify_mask & IB_PORT_RESET_QKEY_CNTR);
+
+       set_ib.cap_mask = (attr.port_cap_flags | props->set_port_cap_mask) &
+               ~props->clr_port_cap_mask;
+
+       err = mthca_SET_IB(to_mdev(ibdev), &set_ib, port, &status);
+       if (err)
+               goto out;
+       if (status) {
+               err = -EINVAL;
+               goto out;
+       }
+
+out:
+       up(&to_mdev(ibdev)->cap_mask_mutex);
+       return err;
 }
 
 static int mthca_query_pkey(struct ib_device *ibdev,
@@ -161,8 +189,8 @@
        in_mad->attr_id            = IB_SMP_ATTR_PKEY_TABLE;
        in_mad->attr_mod           = cpu_to_be32(index / 32);
 
-       err = mthca_MAD_IFC(to_mdev(ibdev), 1,
-                           port, in_mad, out_mad,
+       err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1,
+                           port, NULL, NULL, in_mad, out_mad,
                            &status);
        if (err)
                goto out;
@@ -200,8 +228,8 @@
        in_mad->attr_id            = IB_SMP_ATTR_PORT_INFO;
        in_mad->attr_mod           = cpu_to_be32(port);
 
-       err = mthca_MAD_IFC(to_mdev(ibdev), 1,
-                           port, in_mad, out_mad,
+       err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1,
+                           port, NULL, NULL, in_mad, out_mad,
                            &status);
        if (err)
                goto out;
@@ -220,8 +248,8 @@
        in_mad->attr_id            = IB_SMP_ATTR_GUID_INFO;
        in_mad->attr_mod           = cpu_to_be32(index / 8);
 
-       err = mthca_MAD_IFC(to_mdev(ibdev), 1,
-                           port, in_mad, out_mad,
+       err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1,
+                           port, NULL, NULL, in_mad, out_mad,
                            &status);
        if (err)
                goto out;
@@ -606,6 +634,8 @@
        dev->ib_dev.detach_mcast         = mthca_multicast_detach;
        dev->ib_dev.process_mad          = mthca_process_mad;
 
+       init_MUTEX(&dev->cap_mask_mutex);
+
        ret = ib_register_device(&dev->ib_dev);
        if (ret)
                return ret;
diff -urN linux/drivers/infiniband/hw/mthca/mthca_provider.h 
linux/drivers/infiniband/hw/mthca/mthca_provider.h
--- linux/drivers/infiniband/hw/mthca/mthca_provider.h  2005/01/25 04:28:16     
1.2
+++ linux/drivers/infiniband/hw/mthca/mthca_provider.h  2005/02/07 02:54:45     
1.3
@@ -66,11 +66,11 @@
        struct mthca_dev      *dev;
        int                    eqn;
        u32                    ecr_mask;
+       u32                    cons_index;
        u16                    msi_x_vector;
        u16                    msi_x_entry;
        int                    have_irq;
        int                    nent;
-       int                    cons_index;
        struct mthca_buf_list *page_list;
        struct mthca_mr        mr;
 };
diff -urN linux/drivers/infiniband/include/ib_verbs.h 
linux/drivers/infiniband/include/ib_verbs.h
--- linux/drivers/infiniband/include/ib_verbs.h 2005/01/25 04:28:16     1.2
+++ linux/drivers/infiniband/include/ib_verbs.h 2005/02/07 02:54:45     1.3
@@ -154,25 +154,28 @@
 };
 
 enum ib_port_cap_flags {
-       IB_PORT_SM                              = (1<<31),
-       IB_PORT_NOTICE_SUP                      = (1<<30),
-       IB_PORT_TRAP_SUP                        = (1<<29),
-       IB_PORT_AUTO_MIGR_SUP                   = (1<<27),
-       IB_PORT_SL_MAP_SUP                      = (1<<26),
-       IB_PORT_MKEY_NVRAM                      = (1<<25),
-       IB_PORT_PKEY_NVRAM                      = (1<<24),
-       IB_PORT_LED_INFO_SUP                    = (1<<23),
-       IB_PORT_SM_DISABLED                     = (1<<22),
-       IB_PORT_SYS_IMAGE_GUID_SUP              = (1<<21),
-       IB_PORT_PKEY_SW_EXT_PORT_TRAP_SUP       = (1<<20),
-       IB_PORT_CM_SUP                          = (1<<16),
-       IB_PORT_SNMP_TUNNEL_SUP                 = (1<<15),
-       IB_PORT_REINIT_SUP                      = (1<<14),
-       IB_PORT_DEVICE_MGMT_SUP                 = (1<<13),
-       IB_PORT_VENDOR_CLASS_SUP                = (1<<12),
-       IB_PORT_DR_NOTICE_SUP                   = (1<<11),
-       IB_PORT_PORT_NOTICE_SUP                 = (1<<10),
-       IB_PORT_BOOT_MGMT_SUP                   = (1<<9)
+       IB_PORT_SM                              = 1 <<  1,
+       IB_PORT_NOTICE_SUP                      = 1 <<  2,
+       IB_PORT_TRAP_SUP                        = 1 <<  3,
+       IB_PORT_OPT_IPD_SUP                     = 1 <<  4,
+       IB_PORT_AUTO_MIGR_SUP                   = 1 <<  5,
+       IB_PORT_SL_MAP_SUP                      = 1 <<  6,
+       IB_PORT_MKEY_NVRAM                      = 1 <<  7,
+       IB_PORT_PKEY_NVRAM                      = 1 <<  8,
+       IB_PORT_LED_INFO_SUP                    = 1 <<  9,
+       IB_PORT_SM_DISABLED                     = 1 << 10,
+       IB_PORT_SYS_IMAGE_GUID_SUP              = 1 << 11,
+       IB_PORT_PKEY_SW_EXT_PORT_TRAP_SUP       = 1 << 12,
+       IB_PORT_CM_SUP                          = 1 << 16,
+       IB_PORT_SNMP_TUNNEL_SUP                 = 1 << 17,
+       IB_PORT_REINIT_SUP                      = 1 << 18,
+       IB_PORT_DEVICE_MGMT_SUP                 = 1 << 19,
+       IB_PORT_VENDOR_CLASS_SUP                = 1 << 20,
+       IB_PORT_DR_NOTICE_SUP                   = 1 << 21,
+       IB_PORT_CAP_MASK_NOTICE_SUP             = 1 << 22,
+       IB_PORT_BOOT_MGMT_SUP                   = 1 << 23,
+       IB_PORT_LINK_LATENCY_SUP                = 1 << 24,
+       IB_PORT_CLIENT_REG_SUP                  = 1 << 25
 };
 
 enum ib_port_width {
diff -urN linux/drivers/infiniband/ulp/ipoib/ipoib.h 
linux/drivers/infiniband/ulp/ipoib/ipoib.h
--- linux/drivers/infiniband/ulp/ipoib/ipoib.h  2005/01/25 04:28:17     1.2
+++ linux/drivers/infiniband/ulp/ipoib/ipoib.h  2005/02/07 02:54:45     1.3
@@ -104,10 +104,10 @@
 };
 
 /*
- * Device private locking: netdev->xmit_lock protects members used
- * in TX fast path.
- * lock protects everything else.  lock nests inside of xmit_lock (ie
- * xmit_lock must be acquired first if needed).
+ * Device private locking: tx_lock protects members used in TX fast
+ * path (and we use LLTX so upper layers don't do extra locking).
+ * lock protects everything else.  lock nests inside of tx_lock (ie
+ * tx_lock must be acquired first if needed).
  */
 struct ipoib_dev_priv {
        spinlock_t lock;
@@ -150,6 +150,7 @@
 
        struct ipoib_buf *rx_ring;
 
+       spinlock_t        tx_lock;
        struct ipoib_buf *tx_ring;
        unsigned          tx_head;
        unsigned          tx_tail;
diff -urN linux/drivers/infiniband/ulp/ipoib/ipoib_ib.c 
linux/drivers/infiniband/ulp/ipoib/ipoib_ib.c
--- linux/drivers/infiniband/ulp/ipoib/ipoib_ib.c       2005/01/25 04:28:17     
1.2
+++ linux/drivers/infiniband/ulp/ipoib/ipoib_ib.c       2005/02/07 02:54:45     
1.3
@@ -247,12 +247,12 @@
 
                dev_kfree_skb_any(tx_req->skb);
 
-               spin_lock_irqsave(&dev->xmit_lock, flags);
+               spin_lock_irqsave(&priv->tx_lock, flags);
                ++priv->tx_tail;
                if (netif_queue_stopped(dev) &&
                    priv->tx_head - priv->tx_tail <= IPOIB_TX_RING_SIZE / 2)
                        netif_wake_queue(dev);
-               spin_unlock_irqrestore(&dev->xmit_lock, flags);
+               spin_unlock_irqrestore(&priv->tx_lock, flags);
 
                if (wc->status != IB_WC_SUCCESS &&
                    wc->status != IB_WC_WR_FLUSH_ERR)
@@ -509,7 +509,7 @@
                        goto timeout;
                }
 
-               yield();
+               msleep(1);
        }
 
        ipoib_dbg(priv, "All sends and receives done.\n");
@@ -535,7 +535,7 @@
                        break;
                }
 
-               yield();
+               msleep(1);
        }
 
        return 0;
diff -urN linux/drivers/infiniband/ulp/ipoib/ipoib_main.c 
linux/drivers/infiniband/ulp/ipoib/ipoib_main.c
--- linux/drivers/infiniband/ulp/ipoib/ipoib_main.c     2005/01/25 04:28:17     
1.2
+++ linux/drivers/infiniband/ulp/ipoib/ipoib_main.c     2005/02/07 02:54:45     
1.3
@@ -411,7 +411,7 @@
 
        /*
         * We can only be called from ipoib_start_xmit, so we're
-        * inside dev->xmit_lock -- no need to save/restore flags.
+        * inside tx_lock -- no need to save/restore flags.
         */
        spin_lock(&priv->lock);
 
@@ -483,7 +483,7 @@
 
        /*
         * We can only be called from ipoib_start_xmit, so we're
-        * inside dev->xmit_lock -- no need to save/restore flags.
+        * inside tx_lock -- no need to save/restore flags.
         */
        spin_lock(&priv->lock);
 
@@ -526,11 +526,27 @@
        spin_unlock(&priv->lock);
 }
 
-/* Called with dev->xmit_lock held and IRQs disabled.  */
 static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        struct ipoib_dev_priv *priv = netdev_priv(dev);
        struct ipoib_neigh *neigh;
+       unsigned long flags;
+
+       local_irq_save(flags);
+       if (!spin_trylock(&priv->tx_lock)) {
+               local_irq_restore(flags);
+               return NETDEV_TX_LOCKED;
+       }
+
+       /*
+        * Check if our queue is stopped.  Since we have the LLTX bit
+        * set, we can't rely on netif_stop_queue() preventing our
+        * xmit function from being called with a full queue.
+        */
+       if (unlikely(netif_queue_stopped(dev))) {
+               spin_unlock_irqrestore(&priv->tx_lock, flags);
+               return NETDEV_TX_BUSY;
+       }
 
        if (skb->dst && skb->dst->neighbour) {
                if (unlikely(!*to_ipoib_neigh(skb->dst->neighbour))) {
@@ -585,6 +601,7 @@
        }
 
 out:
+       spin_unlock_irqrestore(&priv->tx_lock, flags);
 
        return NETDEV_TX_OK;
 }
@@ -780,7 +797,7 @@
        dev->addr_len            = INFINIBAND_ALEN;
        dev->type                = ARPHRD_INFINIBAND;
        dev->tx_queue_len        = IPOIB_TX_RING_SIZE * 2;
-       dev->features            = NETIF_F_VLAN_CHALLENGED;
+       dev->features            = NETIF_F_VLAN_CHALLENGED | NETIF_F_LLTX;
 
        /* MTU will be reset when mcast join happens */
        dev->mtu                 = IPOIB_PACKET_SIZE - IPOIB_ENCAP_LEN;
@@ -795,6 +812,7 @@
        priv->dev = dev;
 
        spin_lock_init(&priv->lock);
+       spin_lock_init(&priv->tx_lock);
 
        init_MUTEX(&priv->mcast_mutex);
        init_MUTEX(&priv->vlan_mutex);
diff -urN linux/drivers/input/gameport/cs461x.c 
linux/drivers/input/gameport/cs461x.c
--- linux/drivers/input/gameport/cs461x.c       2004/08/24 15:10:09     1.6
+++ linux/drivers/input/gameport/cs461x.c       2005/02/07 02:54:45     1.7
@@ -118,7 +118,7 @@
 */
 
 static unsigned long ba0_addr;
-static unsigned int *ba0;
+static unsigned int __iomem *ba0;
 
 static char phys[32];
 static char name[] = "CS416x Gameport";
@@ -127,34 +127,34 @@
 static unsigned long ba1_addr;
 static union ba1_t {
         struct {
-                unsigned int *data0;
-                unsigned int *data1;
-                unsigned int *pmem;
-                unsigned int *reg;
+                unsigned int __iomem *data0;
+                unsigned int __iomem *data1;
+                unsigned int __iomem *pmem;
+                unsigned int __iomem *reg;
         } name;
-        unsigned int *idx[4];
+        unsigned int __iomem *idx[4];
 } ba1;
 
 static void cs461x_poke(unsigned long reg, unsigned int val)
 {
-        ba1.idx[(reg >> 16) & 3][(reg >> 2) & 0x3fff] = val;
+        writel(val, &ba1.idx[(reg >> 16) & 3][(reg >> 2) & 0x3fff]);
 }
 
 static unsigned int cs461x_peek(unsigned long reg)
 {
-        return ba1.idx[(reg >> 16) & 3][(reg >> 2) & 0x3fff];
+        return readl(&ba1.idx[(reg >> 16) & 3][(reg >> 2) & 0x3fff]);
 }
 
 #endif
 
 static void cs461x_pokeBA0(unsigned long reg, unsigned int val)
 {
-        ba0[reg >> 2] = val;
+        writel(val, &ba0[reg >> 2]);
 }
 
 static unsigned int cs461x_peekBA0(unsigned long reg)
 {
-        return ba0[reg >> 2];
+        return readl(&ba0[reg >> 2]);
 }
 
 static int cs461x_free(struct pci_dev *pdev)
diff -urN linux/drivers/input/joystick/sidewinder.c 
linux/drivers/input/joystick/sidewinder.c
--- linux/drivers/input/joystick/sidewinder.c   2004/06/09 14:12:08     1.7
+++ linux/drivers/input/joystick/sidewinder.c   2005/02/07 02:54:45     1.8
@@ -45,7 +45,7 @@
  * as well as break everything.
  */
 
-#define SW_DEBUG
+/* #define SW_DEBUG */
 
 #define SW_START       400     /* The time we wait for the first bit [400 us] 
*/
 #define SW_STROBE      45      /* Max time per bit [45 us] */
diff -urN linux/drivers/input/keyboard/atkbd.c 
linux/drivers/input/keyboard/atkbd.c
--- linux/drivers/input/keyboard/atkbd.c        2005/01/25 04:28:17     1.23
+++ linux/drivers/input/keyboard/atkbd.c        2005/02/07 02:54:46     1.24
@@ -234,6 +234,7 @@
        input_regs(dev, regs);
        if (value == 3) {
                input_report_key(dev, code, 1);
+               input_sync(dev);
                input_report_key(dev, code, 0);
        } else
                input_event(dev, EV_KEY, code, value);
@@ -352,6 +353,7 @@
                                       "to make it known.\n",
                                       code & 0x80 ? "e0" : "", code & 0x7f);
                        }
+                       input_sync(&atkbd->dev);
                        break;
                case ATKBD_SCR_1:
                        scroll = 1 - atkbd->release * 2;
diff -urN linux/drivers/input/serio/i8042.c linux/drivers/input/serio/i8042.c
--- linux/drivers/input/serio/i8042.c   2005/01/25 04:28:17     1.26
+++ linux/drivers/input/serio/i8042.c   2005/02/07 02:54:46     1.27
@@ -458,12 +458,11 @@
 }
 
 /*
- * i8042_enable_mux_mode checks whether the controller has an active
- * multiplexor and puts the chip into Multiplexed (as opposed to
- * Legacy) mode.
+ * i8042_set_mux_mode checks whether the controller has an active
+ * multiplexor and puts the chip into Multiplexed (1) or Legacy (0) mode.
  */
 
-static int i8042_enable_mux_mode(struct i8042_values *values, unsigned char 
*mux_version)
+static int i8042_set_mux_mode(unsigned int mode, unsigned char *mux_version)
 {
 
        unsigned char param;
@@ -482,11 +481,11 @@
        param = 0xf0;
        if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0x0f)
                return -1;
-       param = 0x56;
-       if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0xa9)
+       param = mode ? 0x56 : 0xf6;
+       if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != (mode ? 0xa9 
: 0x09))
                return -1;
-       param = 0xa4;
-       if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param == 0x5b)
+       param = mode ? 0xa4 : 0xa5;
+       if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param == (mode ? 0x5b 
: 0x5a))
                return -1;
 
        if (mux_version)
@@ -540,11 +539,11 @@
 {
        unsigned char mux_version;
 
-       if (i8042_enable_mux_mode(values, &mux_version))
+       if (i8042_set_mux_mode(1, &mux_version))
                return -1;
 
-       /* Workaround for broken chips which seem to support MUX, but in 
reality don't. */
-       /* They all report version 10.12 */
+       /* Workaround for interference with USB Legacy emulation */
+       /* that causes a v10.12 MUX to be found. */
        if (mux_version == 0xAC)
                return -1;
 
@@ -774,12 +773,22 @@
  */
 void i8042_controller_reset(void)
 {
-       if (i8042_reset) {
-               unsigned char param;
+       unsigned char param;
+
+/*
+ * Reset the controller if requested.
+ */
 
+       if (i8042_reset)
                if (i8042_command(&param, I8042_CMD_CTL_TEST))
                        printk(KERN_ERR "i8042.c: i8042 controller reset 
timeout.\n");
-       }
+
+/*
+ * Disable MUX mode if present.
+ */
+
+       if (i8042_mux_present)
+               i8042_set_mux_mode(0, NULL);
 
 /*
  * Restore the original control register setting.
@@ -888,7 +897,7 @@
        }
 
        if (i8042_mux_present)
-               if (i8042_enable_mux_mode(&i8042_aux_values, NULL) ||
+               if (i8042_set_mux_mode(1, NULL) ||
                    i8042_enable_mux_ports(&i8042_aux_values)) {
                        printk(KERN_WARNING "i8042: failed to resume active 
multiplexor, mouse won't work.\n");
                }
diff -urN linux/drivers/input/serio/libps2.c linux/drivers/input/serio/libps2.c
--- linux/drivers/input/serio/libps2.c  2005/01/13 14:06:03     1.1
+++ linux/drivers/input/serio/libps2.c  2005/02/07 02:54:46     1.2
@@ -60,9 +60,9 @@
        serio_continue_rx(ps2dev->serio);
 
        if (serio_write(ps2dev->serio, byte) == 0)
-               wait_event_interruptible_timeout(ps2dev->wait,
-                                       !(ps2dev->flags & PS2_FLAG_ACK),
-                                       msecs_to_jiffies(timeout));
+               wait_event_timeout(ps2dev->wait,
+                                  !(ps2dev->flags & PS2_FLAG_ACK),
+                                  msecs_to_jiffies(timeout));
 
        serio_pause_rx(ps2dev->serio);
        ps2dev->flags &= ~PS2_FLAG_ACK;
@@ -115,8 +115,8 @@
         */
        timeout = msecs_to_jiffies(command == PS2_CMD_RESET_BAT ? 4000 : 500);
 
-       wait_event_interruptible_timeout(ps2dev->wait,
-               !(ps2dev->flags & PS2_FLAG_CMD1), timeout);
+       timeout = wait_event_timeout(ps2dev->wait,
+                                    !(ps2dev->flags & PS2_FLAG_CMD1), timeout);
 
        if (ps2dev->cmdcnt && timeout > 0) {
 
@@ -147,8 +147,8 @@
                        serio_continue_rx(ps2dev->serio);
                }
 
-               wait_event_interruptible_timeout(ps2dev->wait,
-                               !(ps2dev->flags & PS2_FLAG_CMD), timeout);
+               wait_event_timeout(ps2dev->wait,
+                                  !(ps2dev->flags & PS2_FLAG_CMD), timeout);
        }
 
        if (param)
@@ -223,7 +223,8 @@
 }
 
 /*
- * ps2_handle_ack()
+ * ps2_handle_ack() is supposed to be used in interrupt handler
+ * to properly process ACK/NAK of a command from a PS/2 device.
  */
 
 int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data)
@@ -250,18 +251,27 @@
                        }
                        /* Fall through */
                default:
-                       return 1;
+                       return 0;
        }
 
+
        if (!ps2dev->nak && ps2dev->cmdcnt)
                ps2dev->flags |= PS2_FLAG_CMD | PS2_FLAG_CMD1;
 
        ps2dev->flags &= ~PS2_FLAG_ACK;
-       wake_up_interruptible(&ps2dev->wait);
+       wake_up(&ps2dev->wait);
+
+       if (data != PS2_RET_ACK)
+               ps2_handle_response(ps2dev, data);
 
-       return data == PS2_RET_ACK || data == PS2_RET_NAK;
+       return 1;
 }
 
+/*
+ * ps2_handle_response() is supposed to be used in interrupt handler
+ * to properly store device's response to a command and notify process
+ * waiting for completion of the command.
+ */
 
 int ps2_handle_response(struct ps2dev *ps2dev, unsigned char data)
 {
@@ -271,12 +281,12 @@
        if (ps2dev->flags & PS2_FLAG_CMD1) {
                ps2dev->flags &= ~PS2_FLAG_CMD1;
                if (ps2dev->cmdcnt)
-                       wake_up_interruptible(&ps2dev->wait);
+                       wake_up(&ps2dev->wait);
        }
 
        if (!ps2dev->cmdcnt) {
                ps2dev->flags &= ~PS2_FLAG_CMD;
-               wake_up_interruptible(&ps2dev->wait);
+               wake_up(&ps2dev->wait);
        }
 
        return 1;
@@ -288,7 +298,7 @@
                ps2dev->nak = 1;
 
        if (ps2dev->flags & (PS2_FLAG_ACK | PS2_FLAG_CMD))
-               wake_up_interruptible(&ps2dev->wait);
+               wake_up(&ps2dev->wait);
 
        ps2dev->flags = 0;
 }
diff -urN linux/drivers/input/serio/serport.c 
linux/drivers/input/serio/serport.c
--- linux/drivers/input/serio/serport.c 2004/10/25 20:44:25     1.12
+++ linux/drivers/input/serio/serport.c 2005/02/07 02:54:46     1.13
@@ -64,6 +64,9 @@
        struct serio *serio;
        char name[64];
 
+       if (!capable(CAP_SYS_ADMIN))
+               return -EPERM;
+
        serport = kmalloc(sizeof(struct serport), GFP_KERNEL);
        serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
        if (unlikely(!serport || !serio)) {
diff -urN linux/drivers/isdn/hardware/avm/avmcard.h 
linux/drivers/isdn/hardware/avm/avmcard.h
--- linux/drivers/isdn/hardware/avm/avmcard.h   2003/09/09 16:41:00     1.7
+++ linux/drivers/isdn/hardware/avm/avmcard.h   2005/02/07 02:54:46     1.8
@@ -89,7 +89,7 @@
        char msgbuf[128];       /* capimsg msg part */
        char databuf[2048];     /* capimsg data part */
 
-       void *mbase;
+       void __iomem *mbase;
        volatile u32 csr;
        avmcard_dmainfo *dma;
 
diff -urN linux/drivers/isdn/hardware/eicon/divamnt.c 
linux/drivers/isdn/hardware/eicon/divamnt.c
--- linux/drivers/isdn/hardware/eicon/divamnt.c 2005/01/13 14:06:04     1.14
+++ linux/drivers/isdn/hardware/eicon/divamnt.c 2005/02/07 02:54:46     1.15
@@ -1,4 +1,4 @@
-/* $Id: divamnt.c,v 1.32.6.5 2004/08/28 20:03:53 armin Exp $
+/* $Id: divamnt.c,v 1.32.6.9 2005/01/31 12:22:20 armin Exp $
  *
  * Driver for Eicon DIVA Server ISDN cards.
  * Maint module
@@ -18,13 +18,14 @@
 #include <linux/smp_lock.h>
 #include <linux/poll.h>
 #include <linux/devfs_fs_kernel.h>
+#include <asm/uaccess.h>
 
 #include "platform.h"
 #include "di_defs.h"
 #include "divasync.h"
 #include "debug_if.h"
 
-static char *main_revision = "$Revision: 1.32.6.5 $";
+static char *main_revision = "$Revision: 1.32.6.9 $";
 
 static int major;
 
diff -urN linux/drivers/isdn/hardware/eicon/divasi.c 
linux/drivers/isdn/hardware/eicon/divasi.c
--- linux/drivers/isdn/hardware/eicon/divasi.c  2004/07/20 20:21:19     1.9
+++ linux/drivers/isdn/hardware/eicon/divasi.c  2005/02/07 02:54:46     1.10
@@ -1,4 +1,4 @@
-/* $Id: divasi.c,v 1.25 2003/09/09 06:46:29 schindler Exp $
+/* $Id: divasi.c,v 1.25.6.2 2005/01/31 12:22:20 armin Exp $
  *
  * Driver for Eicon DIVA Server ISDN cards.
  * User Mode IDI Interface 
@@ -20,6 +20,7 @@
 #include <linux/proc_fs.h>
 #include <linux/skbuff.h>
 #include <linux/devfs_fs_kernel.h>
+#include <asm/uaccess.h>
 
 #include "platform.h"
 #include "di_defs.h"
@@ -27,7 +28,7 @@
 #include "um_xdi.h"
 #include "um_idi.h"
 
-static char *main_revision = "$Revision: 1.25 $";
+static char *main_revision = "$Revision: 1.25.6.2 $";
 
 static int major;
 
diff -urN linux/drivers/isdn/hardware/eicon/divasproc.c 
linux/drivers/isdn/hardware/eicon/divasproc.c
--- linux/drivers/isdn/hardware/eicon/divasproc.c       2004/08/13 07:18:54     
1.7
+++ linux/drivers/isdn/hardware/eicon/divasproc.c       2005/02/07 02:54:46     
1.8
@@ -1,4 +1,4 @@
-/* $Id: divasproc.c,v 1.19 2004/03/21 17:26:01 armin Exp $
+/* $Id: divasproc.c,v 1.19.4.3 2005/01/31 12:22:20 armin Exp $
  *
  * Low level driver for Eicon DIVA Server ISDN cards.
  * /proc functions
@@ -16,6 +16,7 @@
 #include <linux/poll.h>
 #include <linux/proc_fs.h>
 #include <linux/list.h>
+#include <asm/uaccess.h>
 
 #include "platform.h"
 #include "debuglib.h"
diff -urN linux/drivers/isdn/hardware/eicon/io.c 
linux/drivers/isdn/hardware/eicon/io.c
--- linux/drivers/isdn/hardware/eicon/io.c      2004/12/04 18:16:03     1.5
+++ linux/drivers/isdn/hardware/eicon/io.c      2005/02/07 02:54:46     1.6
@@ -227,10 +227,6 @@
         if (pI->descriptor_number >= 0) {
           dword dma_magic;
           void* local_addr;
-#if 0
-          DBG_TRC(("A(%d) dma_alloc(%d)",
-                   IoAdapter->ANum, pI->descriptor_number))
-#endif
           diva_get_dma_map_entry (\
                                (struct _diva_dma_map_entry*)IoAdapter->dma_map,
                                pI->descriptor_number,
@@ -243,9 +239,6 @@
         }
       } else if ((pI->operation == IDI_SYNC_REQ_DMA_DESCRIPTOR_FREE) &&
                  (pI->descriptor_number >= 0)) {
-#if 0
-        DBG_TRC(("A(%d) dma_free(%d)", IoAdapter->ANum, pI->descriptor_number))
-#endif
         diva_free_dma_map_entry((struct 
_diva_dma_map_entry*)IoAdapter->dma_map,
                                 pI->descriptor_number);
         pI->descriptor_number = -1;
@@ -369,9 +362,6 @@
   }
   if ( IoAdapter )
   {
-#if 0
-   DBG_FTL(("xdi: unknown Req 0 / Rc %d !", e->Rc))
-#endif
    return ;
   }
  }
diff -urN linux/drivers/isdn/hardware/eicon/mntfunc.c 
linux/drivers/isdn/hardware/eicon/mntfunc.c
--- linux/drivers/isdn/hardware/eicon/mntfunc.c 2004/09/19 12:30:10     1.7
+++ linux/drivers/isdn/hardware/eicon/mntfunc.c 2005/02/07 02:54:46     1.8
@@ -1,4 +1,4 @@
-/* $Id: mntfunc.c,v 1.19.6.2 2004/08/28 20:03:53 armin Exp $
+/* $Id: mntfunc.c,v 1.19.6.4 2005/01/31 12:22:20 armin Exp $
  *
  * Driver for Eicon DIVA Server ISDN cards.
  * Maint module
@@ -187,7 +187,7 @@
                if (!mask) {
                        ret = diva_set_trace_filter (1, "*");
                } else if (mask < sizeof(data)) {
-                       if (copy_from_user(data, (char __user *)buf+12, mask)) {
+                       if (diva_os_copy_from_user(NULL, data, (char __user 
*)buf+12, mask)) {
                                ret = -EFAULT;
                        } else {
                                ret = diva_set_trace_filter ((int)mask, data);
@@ -199,7 +199,7 @@
 
        case DITRACE_READ_SELECTIVE_TRACE_FILTER:
                if ((ret = diva_get_trace_filter (sizeof(data), data)) > 0) {
-                       if (copy_to_user (buf, data, ret))
+                       if (diva_os_copy_to_user (NULL, buf, data, ret))
                                ret = -EFAULT;
                } else {
                        ret = -ENODEV;
diff -urN linux/drivers/isdn/hardware/eicon/platform.h 
linux/drivers/isdn/hardware/eicon/platform.h
--- linux/drivers/isdn/hardware/eicon/platform.h        2004/12/04 18:16:03     
1.10
+++ linux/drivers/isdn/hardware/eicon/platform.h        2005/02/07 02:54:46     
1.11
@@ -1,4 +1,4 @@
-/* $Id: platform.h,v 1.37.4.2 2004/08/28 20:03:53 armin Exp $
+/* $Id: platform.h,v 1.37.4.6 2005/01/31 12:22:20 armin Exp $
  *
  * platform.h
  * 
@@ -195,9 +195,7 @@
 }
 static __inline__ void  diva_os_free   (unsigned long flags, void* ptr)
 {
-       if (ptr) {
-               vfree(ptr);
-       }
+       vfree(ptr);
 }
 
 /*
diff -urN linux/drivers/isdn/hardware/eicon/s_4bri.c 
linux/drivers/isdn/hardware/eicon/s_4bri.c
--- linux/drivers/isdn/hardware/eicon/s_4bri.c  2004/12/04 18:16:03     1.4
+++ linux/drivers/isdn/hardware/eicon/s_4bri.c  2005/02/07 02:54:46     1.5
@@ -359,506 +359,9 @@
        return (1) ;
 }
 
-#if !defined(DIVA_USER_MODE_CARD_CONFIG) /* { */
-/* --------------------------------------------------------------------------
-               Download protocol code to the adapter
-        
-------------------------------------------------------------------------- */
-
-static int qBri_protocol_load (PISDN_ADAPTER BaseIoAdapter, PISDN_ADAPTER 
IoAdapter) {
-       PISDN_ADAPTER HighIoAdapter;
-
-       byte *p;
-       dword  FileLength ;
-       dword *sharedRam, *File;
-       dword  Addr, ProtOffset, SharedRamOffset, i;
-       dword tasks = BaseIoAdapter->tasks ;
-       int factor = (tasks == 1) ? 1 : 2;
-
-       if (!(File = (dword *)xdiLoadArchive (IoAdapter, &FileLength, 0))) {
-               return (0) ;
-       }
-
-       IoAdapter->features = diva_get_protocol_file_features ((byte*)File,
-                                              OFFS_PROTOCOL_ID_STRING,
-                                              IoAdapter->ProtocolIdString,
-                                              
sizeof(IoAdapter->ProtocolIdString)) ;
-       IoAdapter->a.protocol_capabilities = IoAdapter->features ;
-
-       DBG_LOG(("Loading %s", IoAdapter->ProtocolIdString))
-
-       ProtOffset = IoAdapter->ControllerNumber * (IoAdapter->MemorySize >> 
factor);
-       SharedRamOffset = (IoAdapter->MemorySize >> factor) - 
MQ_SHARED_RAM_SIZE;
-       Addr = ((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR]))
-         | (((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR + 1])) << 8)
-         | (((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR + 2])) << 16)
-         | (((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR + 3])) << 24) ;
-        if ( Addr != 0 )
-       {
-               IoAdapter->DspCodeBaseAddr = (Addr + 3) & (~3) ;
-               IoAdapter->MaxDspCodeSize = (MQ_UNCACHED_ADDR (ProtOffset + 
SharedRamOffset) -
-                                                                               
IoAdapter->DspCodeBaseAddr) & ((IoAdapter->MemorySize >> factor) - 1);
-
-               i = 0 ;
-               while ( 
BaseIoAdapter->QuadroList->QuadroAdapter[i]->ControllerNumber != tasks - 1 )
-                       i++ ;
-               HighIoAdapter = BaseIoAdapter->QuadroList->QuadroAdapter[i] ;
-               Addr = HighIoAdapter->DspCodeBaseAddr ;
-
-               if (tasks == 1) {
-                       ((byte *) File)[OFFS_DIVA_INIT_TASK_COUNT]   =(byte)1;
-                       ((byte *) File)[OFFS_DIVA_INIT_TASK_COUNT+1] = 
(byte)BaseIoAdapter->cardType;
-               }
-
-               ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR] = (byte) Addr ;
-               ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR + 1] = (byte)(Addr >> 
8) ;
-               ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR + 2] = (byte)(Addr >> 
16) ;
-               ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR + 3] = (byte)(Addr >> 
24) ;
-               IoAdapter->InitialDspInfo = 0x80 ;
-       }
-       else
-       {
-               if ( IoAdapter->features & PROTCAP_VOIP )
-               {
-                       IoAdapter->DspCodeBaseAddr = MQ_CACHED_ADDR (ProtOffset 
+ SharedRamOffset - MQ_VOIP_MAX_DSP_CODE_SIZE) ;
-
-                       IoAdapter->MaxDspCodeSize = MQ_VOIP_MAX_DSP_CODE_SIZE ;
-
-               }
-               else if ( IoAdapter->features & PROTCAP_V90D )
-               {
-                       IoAdapter->DspCodeBaseAddr = MQ_CACHED_ADDR (ProtOffset 
+ SharedRamOffset - MQ_V90D_MAX_DSP_CODE_SIZE) ;
-
-                       IoAdapter->MaxDspCodeSize = 
(IoAdapter->ControllerNumber == tasks - 1) ? MQ_V90D_MAX_DSP_CODE_SIZE : 0 ;
-
-               }
-               else
-               {
-                       IoAdapter->DspCodeBaseAddr = MQ_CACHED_ADDR (ProtOffset 
+ SharedRamOffset - MQ_ORG_MAX_DSP_CODE_SIZE) ;
-
-                       IoAdapter->MaxDspCodeSize = 
(IoAdapter->ControllerNumber == tasks - 1) ? MQ_ORG_MAX_DSP_CODE_SIZE : 0 ;
-
-               }
-               IoAdapter->InitialDspInfo = (MQ_CACHED_ADDR (ProtOffset + 
SharedRamOffset -
-                                                                               
                                        MQ_ORG_MAX_DSP_CODE_SIZE) - 
IoAdapter->DspCodeBaseAddr) >> 14 ;
-
-       }
-       DBG_LOG(("%d: DSP code base 0x%08lx, max size 0x%08lx (%08lx,%02x)",
-                IoAdapter->ControllerNumber,
-                IoAdapter->DspCodeBaseAddr, IoAdapter->MaxDspCodeSize,
-                Addr, IoAdapter->InitialDspInfo))
-
-       if (FileLength > ((IoAdapter->DspCodeBaseAddr - MQ_CACHED_ADDR 
(ProtOffset)) & (IoAdapter->MemorySize - 1)) )
-       {
-               xdiFreeFile (File) ;
-               DBG_FTL(("Protocol code '%s' too long (%ld)",
-                        &IoAdapter->Protocol[0], FileLength))
-               return (0) ;
-       }
-       IoAdapter->downloadAddr = 0 ;
-       p = DIVA_OS_MEM_ATTACH_RAM(IoAdapter);
-       sharedRam = (dword *)&p[IoAdapter->downloadAddr & 
(IoAdapter->MemorySize - 1)];
-       memcpy (sharedRam, File, FileLength) ;
-
-       DBG_TRC(("Download addr 0x%08x len %ld - virtual 0x%08x",
-                IoAdapter->downloadAddr, FileLength, sharedRam))
-
-       if ( memcmp (sharedRam, File, FileLength) )
-       {
-               DBG_FTL(("%s: Memory test failed!", IoAdapter->Properties.Name))
-
-               DBG_FTL(("File=0x%x, sharedRam=0x%x", File, sharedRam))
-               DBG_BLK(( (char *)File, 256))
-               DBG_BLK(( (char *)sharedRam, 256))
-               DIVA_OS_MEM_DETACH_RAM(IoAdapter, p);
-
-               xdiFreeFile (File) ;
-               return (0) ;
-       }
-       DIVA_OS_MEM_DETACH_RAM(IoAdapter, p);
-       xdiFreeFile (File) ;
-
-       return (1) ;
-}
-
-/* --------------------------------------------------------------------------
-               DSP Code download
-        
-------------------------------------------------------------------------- */
-static long qBri_download_buffer (OsFileHandle *fp, long length, void **addr) {
-       PISDN_ADAPTER BaseIoAdapter = (PISDN_ADAPTER)fp->sysLoadDesc ;
-       PISDN_ADAPTER IoAdapter;
-       word        i ;
-       dword       *sharedRam ;
-       byte *p;
-
-       i = 0 ;
-
-       do
-       {
-               IoAdapter = BaseIoAdapter->QuadroList->QuadroAdapter[i++] ;
-       } while ( (i < BaseIoAdapter->tasks)
-              && (((dword) length) > IoAdapter->DspCodeBaseAddr +
-                       IoAdapter->MaxDspCodeSize - IoAdapter->downloadAddr) );
-
-       *addr = (void *)IoAdapter->downloadAddr ;
-       if ( ((dword) length) > IoAdapter->DspCodeBaseAddr +
-                               IoAdapter->MaxDspCodeSize - 
IoAdapter->downloadAddr )
-       {
-               DBG_FTL(("%s: out of card memory during DSP download (0x%X)",
-                        IoAdapter->Properties.Name,
-                        IoAdapter->downloadAddr + length))
-               return (-1) ;
-       }
-       p = DIVA_OS_MEM_ATTACH_RAM(BaseIoAdapter);
-       sharedRam = (dword*)&p[IoAdapter->downloadAddr & (IoAdapter->MemorySize 
- 1)];
-
-       if ( fp->sysFileRead (fp, sharedRam, length) != length ) {
-               DIVA_OS_MEM_DETACH_RAM(BaseIoAdapter, p);
-               return (-1) ;
-       }
-       DIVA_OS_MEM_DETACH_RAM(BaseIoAdapter, p);
-
-       IoAdapter->downloadAddr += length ;
-       IoAdapter->downloadAddr  = (IoAdapter->downloadAddr + 3) & (~3) ;
-
-       return (0) ;
-}
-
-/******************************************************************************/
-
-static dword qBri_telindus_load (PISDN_ADAPTER BaseIoAdapter) {
-       PISDN_ADAPTER        IoAdapter = 0;
-       PISDN_ADAPTER        HighIoAdapter = NULL ;
-       char                *error ;
-       OsFileHandle        *fp ;
-       t_dsp_portable_desc  download_table[DSP_MAX_DOWNLOAD_COUNT] ;
-       word                 download_count, i ;
-       dword               *sharedRam ;
-       dword                FileLength ;
-       byte *p;
-
-       if ( !(fp = OsOpenFile (DSP_TELINDUS_FILE)) ) {
-               DBG_FTL(("qBri_telindus_load: %s not found!", 
DSP_TELINDUS_FILE))
-               return (0) ;
-       }
-
-
-       for ( i = 0 ; i < BaseIoAdapter->tasks ; ++i )
-       {
-               IoAdapter = BaseIoAdapter->QuadroList->QuadroAdapter[i] ;
-               IoAdapter->downloadAddr = IoAdapter->DspCodeBaseAddr ;
-               if ( IoAdapter->ControllerNumber == BaseIoAdapter->tasks - 1 )
-               {
-                       HighIoAdapter = IoAdapter ;
-                       HighIoAdapter->downloadAddr = 
(HighIoAdapter->downloadAddr
-                                  + sizeof(dword) + sizeof(download_table) + 
3) & (~3) ;
-               }
-       }
-
-
-       FileLength      = fp->sysFileSize ;
-       fp->sysLoadDesc = (void *)BaseIoAdapter ;
-       fp->sysCardLoad = qBri_download_buffer ;
-
-       download_count = DSP_MAX_DOWNLOAD_COUNT ;
-       memset (&download_table[0], '\0', sizeof(download_table)) ;
-/*
- *     set start address for download
- */
-       error = dsp_read_file (fp, (word)(IoAdapter->cardType),
-                              &download_count, NULL, &download_table[0]) ;
-       if ( error )
-       {
-               DBG_FTL(("download file error: %s", error))
-               OsCloseFile (fp) ;
-               return (0) ;
-       }
-       OsCloseFile (fp) ;
-
-
-       /*
-        *      store # of download files extracted from the archive and 
download table
-        */
-               HighIoAdapter->downloadAddr = HighIoAdapter->DspCodeBaseAddr ;
-               p = DIVA_OS_MEM_ATTACH_RAM(BaseIoAdapter);
-               sharedRam = (dword *)&p[HighIoAdapter->downloadAddr & 
(IoAdapter->MemorySize - 1)];
-               WRITE_DWORD(&(sharedRam[0]), (dword)download_count);
-               memcpy (&sharedRam[1], &download_table[0], 
sizeof(download_table)) ;
-
-
-       /* memory check */
-       if ( memcmp (&sharedRam[1], &download_table, download_count) ) {
-               DBG_FTL(("%s: Dsp Memory test failed!", 
IoAdapter->Properties.Name))
-       }
-       DIVA_OS_MEM_DETACH_RAM(BaseIoAdapter, p);
-
-       return (FileLength) ;
-}
-
-/*
-       Load SDP tasks to the card
-       Return start address of image on succesful load
-       Return zero in case of problem
-
-       INPUT:
-               task                    ->      name of the image containing 
this task
-               link_addr       ->      pointer to start of previous task
-       */
-static byte* qBri_sdp_load (PISDN_ADAPTER BaseIoAdapter,
-                                                                               
                        char* task,
-                                                                               
                        byte*   link_addr) {
-       OsFileHandle *fp;
-       dword FileLength;
-       byte tmp[sizeof(dword)];
-       dword gp_addr;
-       dword entry_addr;
-       dword start_addr = 0;
-       dword phys_start_addr;
-       dword end_addr;
-       byte* sharedRam = 0;
-       byte *p;
-
-  if (task) {
-               if (!(fp = OsOpenFile (task))) {
-                       DBG_ERR(("Can't open [%s] image", task))
-                       return (0);
-               }
-               if ((FileLength = fp->sysFileSize) < 
DIVA_MIPS_TASK_IMAGE_ID_STRING_OFFS) {
-                       OsCloseFile (fp) ;
-                       DBG_ERR(("Image [%s] too short", task))
-                       return (0);
-               }
-
-               fp->sysFileSeek (fp, DIVA_MIPS_TASK_IMAGE_GP_OFFS, OS_SEEK_SET);
-               if (fp->sysFileRead (fp, tmp, sizeof(dword)) != sizeof(dword)) {
-                       OsCloseFile (fp) ;
-                       DBG_ERR(("Can't read image [%s]", task))
-                       return (0);
-               }
-               gp_addr = ((dword)tmp[0])                                       
|
-                                                       (((dword)tmp[1]) << 8)  
|
-                                                       (((dword)tmp[2]) << 16) 
|
-                                                       (((dword)tmp[3]) << 24);
-               DBG_TRC(("Image [%s] GP = %08lx", task, gp_addr))
-
-               fp->sysFileSeek (fp, DIVA_MIPS_TASK_IMAGE_ENTRY_OFFS, 
OS_SEEK_SET);
-               if (fp->sysFileRead (fp, tmp, sizeof(dword)) != sizeof(dword)) {
-                       OsCloseFile (fp) ;
-                       DBG_ERR(("Can't read image [%s]", task))
-                       return (0);
-               }
-               entry_addr = ((dword)tmp[0])                                    
|
-                                                                       
(((dword)tmp[1]) << 8)  |
-                                                                       
(((dword)tmp[2]) << 16) |
-                                                                       
(((dword)tmp[3]) << 24);
-               DBG_TRC(("Image [%s] entry = %08lx", task, entry_addr))
-
-               fp->sysFileSeek (fp, DIVA_MIPS_TASK_IMAGE_LOAD_ADDR_OFFS, 
OS_SEEK_SET);
-               if (fp->sysFileRead (fp, tmp, sizeof(dword)) != sizeof(dword)) {
-                       OsCloseFile (fp) ;
-                       DBG_ERR(("Can't read image [%s]", task))
-                       return (0);
-               }
-               start_addr = ((dword)tmp[0])                                    
|
-                                                                       
(((dword)tmp[1]) << 8)  |
-                                                                       
(((dword)tmp[2]) << 16) |
-                                                                       
(((dword)tmp[3]) << 24);
-               DBG_TRC(("Image [%s] start = %08lx", task, start_addr))
-
-               fp->sysFileSeek (fp, DIVA_MIPS_TASK_IMAGE_END_ADDR_OFFS, 
OS_SEEK_SET);
-               if (fp->sysFileRead (fp, tmp, sizeof(dword)) != sizeof(dword)) {
-                       OsCloseFile (fp) ;
-                       DBG_ERR(("Can't read image [%s]", task))
-                       return (0);
-               }
-               end_addr = ((dword)tmp[0])                                      
|
-                                                               
(((dword)tmp[1]) << 8)  |
-                                                               
(((dword)tmp[2]) << 16) |
-                                                               
(((dword)tmp[3]) << 24);
-               DBG_TRC(("Image [%s] end = %08lx", task, end_addr))
-
-               phys_start_addr = start_addr & 0x1fffffff;
-
-               if ((phys_start_addr + FileLength) >= 
BaseIoAdapter->MemorySize) {
-                       OsCloseFile (fp) ;
-                       DBG_ERR(("Image [%s] too long", task))
-                       return (0);
-               }
-
-               fp->sysFileSeek (fp, 0, OS_SEEK_SET);
-               p = DIVA_OS_MEM_ATTACH_RAM(BaseIoAdapter);
-               sharedRam = &p[phys_start_addr];
-               if ((dword)fp->sysFileRead (fp, sharedRam, FileLength) != 
FileLength) {
-                       DIVA_OS_MEM_DETACH_RAM(BaseIoAdapter, p);
-                       OsCloseFile (fp) ;
-                       DBG_ERR(("Can't read image [%s]", task))
-                       return (0);
-               }
-               DIVA_OS_MEM_DETACH_RAM(BaseIoAdapter, p);
-
-               OsCloseFile (fp) ;
-  }
-
-       p = DIVA_OS_MEM_ATTACH_RAM(BaseIoAdapter);
-       if (!link_addr) {
-               link_addr = &p[OFFS_DSP_CODE_BASE_ADDR];
-       }
-
-       DBG_TRC(("Write task [%s] link %08lx at %08lx",
-                                               task ? task : "none",
-                                               start_addr,
-                                               link_addr - 
(byte*)&BaseIoAdapter->ram[0]))
-
-       link_addr[0] = (byte)(start_addr         & 0xff);
-       link_addr[1] = (byte)((start_addr >>  8) & 0xff);
-       link_addr[2] = (byte)((start_addr >> 16) & 0xff);
-       link_addr[3] = (byte)((start_addr >> 24) & 0xff);
-
-       DIVA_OS_MEM_DETACH_RAM(BaseIoAdapter, p);
-
-       return (task ? &sharedRam[DIVA_MIPS_TASK_IMAGE_LINK_OFFS] : 0);
-}
-
-/* --------------------------------------------------------------------------
-               Load Card
-        
-------------------------------------------------------------------------- */
-static int load_qBri_hardware (PISDN_ADAPTER IoAdapter) {
-       dword         i, offset, controller ;
-       word         *signature ;
-       int           factor = (IoAdapter->tasks == 1) ? 1 : 2;
-       byte *p;
-
-       PISDN_ADAPTER Slave ;
-
-
-       if (
-
-               !IoAdapter->QuadroList
-
-         || ( (IoAdapter->cardType != CARDTYPE_DIVASRV_Q_8M_PCI)
-           && (IoAdapter->cardType != CARDTYPE_DIVASRV_VOICE_Q_8M_PCI)
-           && (IoAdapter->cardType != CARDTYPE_DIVASRV_Q_8M_V2_PCI)
-     && (IoAdapter->cardType != CARDTYPE_DIVASRV_VOICE_Q_8M_V2_PCI)
-     && (IoAdapter->cardType != CARDTYPE_DIVASRV_B_2M_V2_PCI)
-     && (IoAdapter->cardType != CARDTYPE_DIVASRV_VOICE_B_2M_V2_PCI)
-     && (IoAdapter->cardType != CARDTYPE_DIVASRV_B_2F_PCI) ) )
-       {
-               return (0) ;
-       }
-
-/*
- *     Check for first instance
- */
-       if ( IoAdapter->ControllerNumber > 0 )
-               return (1) ;
-
-/*
- *     first initialize the onboard FPGA
- */
-       if ( !qBri_FPGA_download (IoAdapter) )
-               return (0) ;
-
-
-       for ( i = 0; i < IoAdapter->tasks; i++ )
-       {
-               Slave = IoAdapter->QuadroList->QuadroAdapter[i] ;
-               Slave->fpga_features = IoAdapter->fpga_features ;
-       }
-
-
-/*
- *     download protocol code for all instances
- */
-
-       controller = IoAdapter->tasks;
-       do
-       {
-               controller-- ;
-               i = 0 ;
-               while ( 
IoAdapter->QuadroList->QuadroAdapter[i]->ControllerNumber != controller )
-                       i++ ;
-/*
- *     calculate base address for instance
- */
-               Slave          = IoAdapter->QuadroList->QuadroAdapter[i] ;
-               offset         = Slave->ControllerNumber * 
(IoAdapter->MemorySize >> factor) ;
-               Slave->Address = &IoAdapter->Address[offset] ;
-               Slave->ram     = &IoAdapter->ram[offset] ;
-               Slave->reset   = IoAdapter->reset ;
-               Slave->ctlReg  = IoAdapter->ctlReg ;
-               Slave->prom    = IoAdapter->prom ;
-               Slave->Config  = IoAdapter->Config ;
-               Slave->Control = IoAdapter->Control ;
-
-               if ( !qBri_protocol_load (IoAdapter, Slave) )
-                       return (0) ;
-
-       } while (controller != 0) ;
-
-
-/*
- *     download only one copy of the DSP code
- */
- if (IoAdapter->cardType != CARDTYPE_DIVASRV_B_2F_PCI) {
-       if ( !qBri_telindus_load (IoAdapter) )
-               return (0) ;
- } else {
-   byte* link_addr = 0;
-   link_addr = qBri_sdp_load (IoAdapter, DIVA_BRI2F_SDP_1_NAME, link_addr);
-   link_addr = qBri_sdp_load (IoAdapter, DIVA_BRI2F_SDP_2_NAME, link_addr);
-   if (!link_addr) {
-     qBri_sdp_load (IoAdapter, 0, link_addr);
-   }
- }
-
-/*
- *     copy configuration parameters
- */
-
-       for ( i = 0 ; i < IoAdapter->tasks ; ++i )
-       {
-               Slave = IoAdapter->QuadroList->QuadroAdapter[i] ;
-               Slave->ram += (IoAdapter->MemorySize >> factor) - 
MQ_SHARED_RAM_SIZE ;
-               p = DIVA_OS_MEM_ATTACH_RAM(Slave);
-               DBG_TRC(("Configure instance %d shared memory @ 0x%08lx",
-                        Slave->ControllerNumber, p))
-               memset (p, '\0', 256) ;
-               DIVA_OS_MEM_DETACH_RAM(Slave, p);
-               diva_configure_protocol (Slave);
-       }
-
-/*
- *     start adapter
- */
-       start_qBri_hardware (IoAdapter) ;
-       p = DIVA_OS_MEM_ATTACH_RAM(IoAdapter);
-       signature = (word *)(&p[0x1E]) ;
-/*
- *     wait for signature in shared memory (max. 3 seconds)
- */
-       for ( i = 0 ; i < 300 ; ++i )
-       {
-               diva_os_wait (10) ;
-
-               if ( signature[0] == 0x4447 )
-               {
-                       DIVA_OS_MEM_DETACH_RAM(IoAdapter, p);
-                       DBG_TRC(("Protocol startup time %d.%02d seconds",
-                                (i / 100), (i % 100) ))
-
-                       return (1) ;
-               }
-       }
-       DIVA_OS_MEM_DETACH_RAM(IoAdapter, p);
-       DBG_FTL(("%s: Adapter selftest failed (0x%04X)!",
-                IoAdapter->Properties.Name, signature[0] >> 16))
-       qBri_cpu_trapped (IoAdapter) ;
-       return (FALSE) ;
-}
-#else /* } { */
 static int load_qBri_hardware (PISDN_ADAPTER IoAdapter) {
        return (0);
 }
-#endif /* } */
 
 /* --------------------------------------------------------------------------
                Card ISR
diff -urN linux/drivers/isdn/hardware/eicon/s_bri.c 
linux/drivers/isdn/hardware/eicon/s_bri.c
--- linux/drivers/isdn/hardware/eicon/s_bri.c   2004/12/04 18:16:03     1.5
+++ linux/drivers/isdn/hardware/eicon/s_bri.c   2005/02/07 02:54:46     1.6
@@ -119,356 +119,9 @@
  outpp (p, 0x00) ;    /* clear int, halt cpu */
  DIVA_OS_MEM_DETACH_CTLREG(IoAdapter, p);
 }
-#if !defined(DIVA_USER_MODE_CARD_CONFIG) /* { */
-/* ---------------------------------------------------------------------
-  Load protocol on the card
-  --------------------------------------------------------------------- */
-static dword bri_protocol_load (PISDN_ADAPTER IoAdapter) {
- dword   FileLength ;
- word    test, *File = NULL ;
- byte*  addrHi, *addrLo, *ioaddr ;
- char   *FileName = &IoAdapter->Protocol[0] ;
- dword   Addr, i ;
- byte *Port;
- /* -------------------------------------------------------------------
-   Try to load protocol code. 'File' points to memory location
-   that does contain entire protocol code
-   ------------------------------------------------------------------- */
- if ( !(File = (word *)xdiLoadArchive (IoAdapter, &FileLength, 0)) )
-  return (0) ;
- /* -------------------------------------------------------------------
-   Get protocol features and calculate load addresses
-   ------------------------------------------------------------------- */
- IoAdapter->features = diva_get_protocol_file_features ((byte*)File,
-                     OFFS_PROTOCOL_ID_STRING,
-                     IoAdapter->ProtocolIdString,
-                     sizeof(IoAdapter->ProtocolIdString));
- IoAdapter->a.protocol_capabilities = IoAdapter->features ;
- DBG_LOG(("Loading %s", IoAdapter->ProtocolIdString))
- Addr = ((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR]))
-   | (((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR + 1])) << 8)
-   | (((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR + 2])) << 16)
-   | (((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR + 3])) << 24) ;
-        if ( Addr != 0 )
- {
-  IoAdapter->DspCodeBaseAddr = (Addr + 3) & (~3) ;
-  IoAdapter->MaxDspCodeSize = (BRI_UNCACHED_ADDR (IoAdapter->MemoryBase + 
IoAdapter->MemorySize -
-                                                  BRI_SHARED_RAM_SIZE)
-                            - IoAdapter->DspCodeBaseAddr) & 
(IoAdapter->MemorySize - 1) ;
-  Addr = IoAdapter->DspCodeBaseAddr ;
-  ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR] = (byte) Addr ;
-  ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR + 1] = (byte)(Addr >> 8) ;
-  ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR + 2] = (byte)(Addr >> 16) ;
-  ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR + 3] = (byte)(Addr >> 24) ;
-  IoAdapter->InitialDspInfo = 0x80 ;
- }
- else
- {
-  if ( IoAdapter->features & PROTCAP_V90D )
-   IoAdapter->MaxDspCodeSize = BRI_V90D_MAX_DSP_CODE_SIZE ;
-  else
-   IoAdapter->MaxDspCodeSize = BRI_ORG_MAX_DSP_CODE_SIZE ;
-  IoAdapter->DspCodeBaseAddr = BRI_CACHED_ADDR (IoAdapter->MemoryBase + 
IoAdapter->MemorySize -
-                                                BRI_SHARED_RAM_SIZE - 
IoAdapter->MaxDspCodeSize);
-  IoAdapter->InitialDspInfo = (IoAdapter->MaxDspCodeSize - 
BRI_ORG_MAX_DSP_CODE_SIZE) >> 14 ;
- }
- DBG_LOG(("DSP code base 0x%08lx, max size 0x%08lx (%08lx,%02x)",
-      IoAdapter->DspCodeBaseAddr, IoAdapter->MaxDspCodeSize,
-      Addr, IoAdapter->InitialDspInfo))
- if ( FileLength > ((IoAdapter->DspCodeBaseAddr -
-                     BRI_CACHED_ADDR (IoAdapter->MemoryBase)) & 
(IoAdapter->MemorySize - 1)) )
- {
-  xdiFreeFile (File);
-  DBG_FTL(("Protocol code '%s' too big (%ld)", FileName, FileLength))
-  return (0) ;
- }
- Port = DIVA_OS_MEM_ATTACH_PORT(IoAdapter);
- addrHi =   Port + ((IoAdapter->Properties.Bus == BUS_PCI) ? M_PCI_ADDRH : 
ADDRH) ;
- addrLo = Port + ADDR ;
- ioaddr = Port + DATA ;
-/*
- * set start address for download (use autoincrement mode !)
- */
- outpp  (addrHi, 0) ;
- outppw (addrLo, 0) ;
- for ( i = 0 ; i < FileLength ; i += 2 )
- {
-  if ( (i & 0x0000FFFF) == 0 )
-  {
-   outpp (addrHi, (byte)(i >> 16)) ;
-  }
-  outppw (ioaddr, File[i/2]) ;
- }
-/*
- * memory test without second load of file
- */
- outpp  (addrHi, 0) ;
- outppw (addrLo, 0) ;
- for ( i = 0 ; i < FileLength ; i += 2 )
- {
-  if ( (i & 0x0000FFFF) == 0 )
-  {
-   outpp (addrHi, (byte)(i >> 16)) ;
-  }
-  test = inppw (ioaddr) ;
-  if ( test != File[i/2] )
-  {
-   DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port);
-   DBG_FTL(("%s: Memory test failed! (%d - 0x%04X/0x%04X)",
-            IoAdapter->Properties.Name, i, test, File[i/2]))
-   xdiFreeFile (File);
-   return (0) ;
-  }
- }
- DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port);
- xdiFreeFile (File);
- return (FileLength) ;
-}
-/******************************************************************************/
-typedef struct
-{
- PISDN_ADAPTER IoAdapter ;
- byte*        AddrLo ;
- byte*        AddrHi ;
- word*       Data ;
- dword         DownloadPos ;
-} bri_download_info ;
-static long bri_download_buffer (OsFileHandle *fp, long length, void **addr) {
- int        buffer_size = 2048*sizeof(word);
- word       *buffer = (word*)diva_os_malloc (0, buffer_size);
- bri_download_info *info ;
- word       test ;
- long       i, len, page ;
- if (!buffer) {
-  DBG_ERR(("A: out of memory, s_bri at %d", __LINE__))
-  return (-1);
- }
- info = (bri_download_info *)fp->sysLoadDesc ;
- *addr = (void *)info->DownloadPos ;
- if ( ((dword) length) > info->IoAdapter->DspCodeBaseAddr +
-                         info->IoAdapter->MaxDspCodeSize - info->DownloadPos )
- {
-  DBG_FTL(("%s: out of card memory during DSP download (0x%X)",
-           info->IoAdapter->Properties.Name,
-           info->DownloadPos + length))
-  diva_os_free (0, buffer);
-  return (-1) ;
- }
- for ( len = 0 ; length > 0 ; length -= len )
- {
-  len = (length > buffer_size ? buffer_size : length) ;
-  page = ((long)(info->DownloadPos) + len) & 0xFFFF0000 ;
-  if ( page != (long)(info->DownloadPos & 0xFFFF0000) )
-  {
-   len = 0x00010000 - (((long)info->DownloadPos) & 0x0000FFFF) ;
-  }
-  if ( fp->sysFileRead (fp, &buffer[0], len) != len ) {
-   diva_os_free (0, buffer);
-   return (-1) ;
-  }
-  outpp (info->AddrHi, (byte)(info->DownloadPos >> 16)) ;
-  outppw (info->AddrLo, (word)info->DownloadPos) ;
-  outppw_buffer (info->Data, &buffer[0], (len + 1)) ;
-/*
- * memory test without second load of file
- */
-  outpp (info->AddrHi, (byte)(info->DownloadPos >> 16)) ;
-  outppw (info->AddrLo, (word)info->DownloadPos) ;
-  for ( i = 0 ; i < len ; i += 2 )
-  {
-   if ( (test = inppw (info->Data)) != buffer[i/2] )
-   {
-    DBG_FTL(("%s: Memory test failed! (0x%lX - 0x%04X/0x%04X)",
-             info->IoAdapter->Properties.Name,
-             info->DownloadPos + i, test, buffer[i/2]))
-    diva_os_free (0, buffer);
-    return (-2) ;
-   }
-  }
-  info->DownloadPos += len ;
- }
- info->DownloadPos = (info->DownloadPos + 3) & (~3) ;
- diva_os_free (0, buffer);
- return (0) ;
-}
-/******************************************************************************/
-static dword bri_telindus_load (PISDN_ADAPTER IoAdapter, char 
*DspTelindusFile) 
-{
- bri_download_info    *pinfo =\
-             (bri_download_info*)diva_os_malloc(0, sizeof(*pinfo));
- char                *error ;
- OsFileHandle        *fp ;
- t_dsp_portable_desc  download_table[DSP_MAX_DOWNLOAD_COUNT] ;
- word                 download_count ;
- dword                FileLength ;
- byte *Port;
- if (!pinfo) {
-  DBG_ERR (("A: out of memory s_bri at %d", __LINE__))
-  return (0);
- }
- if (!(fp = OsOpenFile (DspTelindusFile))) {
-  diva_os_free (0, pinfo);
-  return (0) ;
- }
- FileLength     = fp->sysFileSize ;
- Port = DIVA_OS_MEM_ATTACH_PORT(IoAdapter);
- pinfo->IoAdapter = IoAdapter ;
- pinfo->AddrLo    = Port + ADDR ;
- pinfo->AddrHi    = Port + (IoAdapter->Properties.Bus == BUS_PCI ? M_PCI_ADDRH 
: ADDRH);
- pinfo->Data = (word*)(Port + DATA) ;
- pinfo->DownloadPos = (IoAdapter->DspCodeBaseAddr +\
-           sizeof(dword) + sizeof(download_table) + 3) & (~3) ;
- fp->sysLoadDesc = (void *)pinfo;
- fp->sysCardLoad = bri_download_buffer ;
- download_count = DSP_MAX_DOWNLOAD_COUNT ;
- memset (&download_table[0], '\0', sizeof(download_table)) ;
-/*
- * set start address for download (use autoincrement mode !)
- */
- error = dsp_read_file (fp, (word)(IoAdapter->cardType),
-                        &download_count, NULL, &download_table[0]) ;
- if ( error )
- {
-  DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port);
-  DBG_FTL(("download file error: %s", error))
-  OsCloseFile (fp) ;
-  diva_os_free (0, pinfo);
-  return (0) ;
- }
- OsCloseFile (fp) ;
-/*
- * store # of separate download files extracted from archive
- */
- pinfo->DownloadPos = IoAdapter->DspCodeBaseAddr ;
- outpp  (pinfo->AddrHi, (byte)(pinfo->DownloadPos >> 16)) ;
- outppw (pinfo->AddrLo, (word)pinfo->DownloadPos) ;
- outppw (pinfo->Data,   (word)download_count) ;
- outppw (pinfo->Data,   (word)0) ;
-/*
- * copy download table to board
- */
- outppw_buffer (pinfo->Data, &download_table[0], sizeof(download_table)) ;
- DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port);
- diva_os_free (0, pinfo);
- return (FileLength) ;
-}
-/******************************************************************************/
-static int load_bri_hardware (PISDN_ADAPTER IoAdapter) {
- dword   i ;
- byte*  addrHi, *addrLo, *ioaddr, *p ;
- dword   test ;
- byte *Port;
- if ( IoAdapter->Properties.Card != CARD_MAE )
- {
-  return (FALSE) ;
- }
- reset_bri_hardware (IoAdapter) ;
- Port = DIVA_OS_MEM_ATTACH_PORT(IoAdapter);
- addrHi =   Port + ((IoAdapter->Properties.Bus==BUS_PCI) ? M_PCI_ADDRH : 
ADDRH);
- addrLo = Port + ADDR ;
- ioaddr = Port + DATA ;
- diva_os_wait (100);
-/*
- * recover
- */
- outpp  (addrHi, (byte) 0) ;
- outppw (addrLo, (word) 0) ;
- outppw (ioaddr, (word) 0) ;
-/*
- * clear shared memory
- */
- outpp  (addrHi, (byte)((BRI_UNCACHED_ADDR (IoAdapter->MemoryBase + \
-          IoAdapter->MemorySize - BRI_SHARED_RAM_SIZE)) >> 16)) ;
- outppw (addrLo, 0) ;
- for ( i = 0 ; i < 0x8000 ; outppw (ioaddr, 0), ++i ) ;
- DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port);
- diva_os_wait (100) ;
-/*
- * download protocol and dsp files
- */
- switch ( IoAdapter->protocol_id ) {
- default:
-  if ( !xdiSetProtocol (IoAdapter, IoAdapter->ProtocolSuffix) )
-   return (FALSE) ;
-  if ( !bri_protocol_load (IoAdapter) )
-   return (FALSE) ;
-  if ( !bri_telindus_load (IoAdapter, DSP_TELINDUS_FILE) )
-   return (FALSE) ;
-  break ;
- case PROTTYPE_QSIG:
- case PROTTYPE_CORNETN:
-  if ( !xdiSetProtocol (IoAdapter, IoAdapter->ProtocolSuffix) )
-   return (FALSE) ;
-  if (IoAdapter->ProtocolSuffix && *IoAdapter->ProtocolSuffix) {
-   sprintf (&IoAdapter->Protocol[0],
-        "TE_QSIG.%s", IoAdapter->ProtocolSuffix) ;
-  }
-  DBG_TRC(("xdiSetProtocol: %s firmware '%s' archive '%s'",
-     IoAdapter->Properties.Name,
-     &IoAdapter->Protocol[0], &IoAdapter->Archive[0]))
-  if ( !bri_protocol_load (IoAdapter) )
-   return (FALSE) ;
-  if ( !bri_telindus_load (IoAdapter, DSP_QSIG_TELINDUS_FILE) )
-   return (FALSE) ;
-  break ;
- }
-
- Port = DIVA_OS_MEM_ATTACH_PORT(IoAdapter);
- addrHi =   Port + ((IoAdapter->Properties.Bus==BUS_PCI) ? M_PCI_ADDRH : 
ADDRH);
- addrLo = Port + ADDR ;
- ioaddr = Port + DATA ;
-/*
- * clear signature
- */
- outpp  (addrHi, (byte)((BRI_UNCACHED_ADDR (IoAdapter->MemoryBase + \
-     IoAdapter->MemorySize - BRI_SHARED_RAM_SIZE)) >> 16)) ;
- outppw (addrLo, 0x1e) ;
- outpp (ioaddr, 0) ;
- outpp (ioaddr, 0) ;
-/*
- * copy parameters
- */
- diva_configure_protocol (IoAdapter);
- DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port);
-/*
- * start the protocol code
- */
- p = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter);
- outpp (p, 0x08) ;
- DIVA_OS_MEM_DETACH_CTLREG(IoAdapter, p);
-/*
- * wait for signature (max. 3 seconds)
- */
- Port = DIVA_OS_MEM_ATTACH_PORT(IoAdapter);
- addrHi =   Port + ((IoAdapter->Properties.Bus==BUS_PCI) ? M_PCI_ADDRH : 
ADDRH);
- addrLo = Port + ADDR ;
- ioaddr = Port + DATA ;
- for ( i = 0 ; i < 300 ; ++i )
- {
-  diva_os_wait (10) ;
-  outpp (addrHi, (byte)((BRI_UNCACHED_ADDR (IoAdapter->MemoryBase + \
-      IoAdapter->MemorySize - BRI_SHARED_RAM_SIZE)) >> 16)) ;
-  outppw (addrLo, 0x1e) ;
-  test = (dword)inppw (ioaddr) ;
-  if ( test == 0x4447 )
-  {
-   DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port);
-   DBG_TRC(("Protocol startup time %d.%02d seconds",
-            (i / 100), (i % 100) ))
-   return (TRUE) ;
-  }
- }
- DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port);
- DBG_FTL(("%s: Adapter selftest failed (0x%04X)!",
-          IoAdapter->Properties.Name, test))
- bri_cpu_trapped (IoAdapter) ;
- return (FALSE) ;
-}
-#else /* } { */
 static int load_bri_hardware (PISDN_ADAPTER IoAdapter) {
  return (0);
 }
-#endif /* } */
 
/******************************************************************************/
 static int bri_ISR (struct _ISDN_ADAPTER* IoAdapter) {
  byte __iomem *p;
diff -urN linux/drivers/isdn/hardware/eicon/s_pri.c 
linux/drivers/isdn/hardware/eicon/s_pri.c
--- linux/drivers/isdn/hardware/eicon/s_pri.c   2004/12/04 18:16:03     1.4
+++ linux/drivers/isdn/hardware/eicon/s_pri.c   2005/02/07 02:54:46     1.5
@@ -122,371 +122,9 @@
  WRITE_BYTE(p, _MP_RISC_RESET | _MP_LED1 | _MP_LED2);
  DIVA_OS_MEM_DETACH_RESET(IoAdapter, p);
 }
-#if !defined(DIVA_USER_MODE_CARD_CONFIG) /* { */
-/* -------------------------------------------------------------------------
-  Load protocol code to the PRI Card
-  ------------------------------------------------------------------------- */
-#define DOWNLOAD_ADDR(IoAdapter) (IoAdapter->downloadAddr & 
(IoAdapter->MemorySize - 1))
-static int pri_protocol_load (PISDN_ADAPTER IoAdapter) {
- dword  FileLength ;
- dword *File ;
- dword *sharedRam ;
- dword  Addr ;
- byte *p;
- if (!(File = (dword *)xdiLoadArchive (IoAdapter, &FileLength, 0))) {
-  return (0) ;
- }
- IoAdapter->features = diva_get_protocol_file_features ((byte*)File,
-                                        OFFS_PROTOCOL_ID_STRING,
-                                        IoAdapter->ProtocolIdString,
-                                        sizeof(IoAdapter->ProtocolIdString)) ;
- IoAdapter->a.protocol_capabilities = IoAdapter->features ;
- DBG_LOG(("Loading %s", IoAdapter->ProtocolIdString))
- Addr = ((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR]))
-   | (((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR + 1])) << 8)
-   | (((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR + 2])) << 16)
-   | (((dword)(((byte *) File)[OFFS_PROTOCOL_END_ADDR + 3])) << 24) ;
-        if ( Addr != 0 )
- {
-  IoAdapter->DspCodeBaseAddr = (Addr + 3) & (~3) ;
-  IoAdapter->MaxDspCodeSize = (MP_UNCACHED_ADDR (IoAdapter->MemorySize)
-                            - IoAdapter->DspCodeBaseAddr) & 
(IoAdapter->MemorySize - 1) ;
-  Addr = IoAdapter->DspCodeBaseAddr ;
-  ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR] = (byte) Addr ;
-  ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR + 1] = (byte)(Addr >> 8) ;
-  ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR + 2] = (byte)(Addr >> 16) ;
-  ((byte *) File)[OFFS_DSP_CODE_BASE_ADDR + 3] = (byte)(Addr >> 24) ;
-  IoAdapter->InitialDspInfo = 0x80 ;
- }
- else
- {
-  if ( IoAdapter->features & PROTCAP_VOIP )
-   IoAdapter->MaxDspCodeSize = MP_VOIP_MAX_DSP_CODE_SIZE ;
-  else if ( IoAdapter->features & PROTCAP_V90D )
-   IoAdapter->MaxDspCodeSize = MP_V90D_MAX_DSP_CODE_SIZE ;
-  else
-   IoAdapter->MaxDspCodeSize = MP_ORG_MAX_DSP_CODE_SIZE ;
-  IoAdapter->DspCodeBaseAddr = MP_CACHED_ADDR (IoAdapter->MemorySize -
-                                               IoAdapter->MaxDspCodeSize) ;
-  IoAdapter->InitialDspInfo = (IoAdapter->MaxDspCodeSize
-                            - MP_ORG_MAX_DSP_CODE_SIZE) >> 14 ;
- }
- DBG_LOG(("DSP code base 0x%08lx, max size 0x%08lx (%08lx,%02x)",
-          IoAdapter->DspCodeBaseAddr, IoAdapter->MaxDspCodeSize,
-          Addr, IoAdapter->InitialDspInfo))
- if ( FileLength > ((IoAdapter->DspCodeBaseAddr -
-                     MP_CACHED_ADDR (MP_PROTOCOL_OFFSET)) & 
(IoAdapter->MemorySize - 1)) )
- {
-  xdiFreeFile (File);
-  DBG_FTL(("Protocol code '%s' too long (%ld)",
-           &IoAdapter->Protocol[0], FileLength))
-  return (0) ;
- }
- IoAdapter->downloadAddr = MP_UNCACHED_ADDR (MP_PROTOCOL_OFFSET) ;
- p = DIVA_OS_MEM_ATTACH_RAM(IoAdapter);
- sharedRam = (dword *)(&p[DOWNLOAD_ADDR(IoAdapter)]);
- memcpy (sharedRam, File, FileLength) ;
- if ( memcmp (sharedRam, File, FileLength) )
- {
-  DIVA_OS_MEM_DETACH_RAM(IoAdapter, p);
-  DBG_FTL(("%s: Memory test failed!", IoAdapter->Properties.Name))
-  xdiFreeFile (File);
-  return (0) ;
- }
- DIVA_OS_MEM_DETACH_RAM(IoAdapter, p);
- xdiFreeFile (File);
- return (1) ;
-}
-/******************************************************************************/
-/*------------------------------------------------------------------
-  Dsp related definitions
-  ------------------------------------------------------------------ */
-#define DSP_SIGNATURE_PROBE_WORD 0x5a5a
-/*
-**  Checks pre