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: Thu, 15 Sep 2005 09:57:37 +0100
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/09/15 09:57:12

Modified files:
        .              : COPYING MAINTAINERS Makefile REPORTING-BUGS 
        Documentation  : 00-INDEX CodingStyle DMA-API.txt IPMI.txt 
                         MSI-HOWTO.txt acpi-hotkey.txt cpusets.txt 
                         exception.txt feature-removal-schedule.txt 
                         ibm-acpi.txt kernel-parameters.txt mono.txt 
                         pci.txt sonypi.txt sparse.txt sysrq.txt 
        Documentation/DocBook: journal-api.tmpl kernel-hacking.tmpl 
                               mcabook.tmpl usb.tmpl 
        Documentation/RCU: RTFP.txt UP.txt checklist.txt rcu.txt 
        Documentation/aoe: mkshelf.sh 
        Documentation/cdrom: sonycd535 
        Documentation/cpu-freq: cpufreq-stats.txt 
        Documentation/crypto: api-intro.txt descore-readme.txt 
        Documentation/dvb: bt8xx.txt ci.txt 
        Documentation/fb: intel810.txt modedb.txt 
        Documentation/filesystems: ntfs.txt proc.txt sysfs.txt vfs.txt 
        Documentation/firmware_class: firmware_sample_driver.c 
        Documentation/hwmon: lm78 
        Documentation/i2c: functionality porting-clients writing-clients 
        Documentation/i2c/chips: max6875 
        Documentation/i386: boot.txt 
        Documentation/ioctl: cdrom.txt 
        Documentation/kbuild: makefiles.txt 
        Documentation/kdump: kdump.txt 
        Documentation/networking: bonding.txt wan-router.txt 
        Documentation/power: swsusp.txt video.txt 
        Documentation/powerpc: eeh-pci-error-recovery.txt 
        Documentation/s390: s390dbf.txt 
        Documentation/scsi: 00-INDEX aic7xxx.txt ibmmca.txt 
                            scsi_mid_low_api.txt 
        Documentation/serial: driver 
        Documentation/sound/alsa: ALSA-Configuration.txt 
        Documentation/sound/alsa/DocBook: writing-an-alsa-driver.tmpl 
        Documentation/uml: UserModeLinux-HOWTO.txt 
        Documentation/usb: gadget_serial.txt proc_usb_info.txt 
        Documentation/video4linux: CARDLIST.bttv CARDLIST.saa7134 
                                   CARDLIST.tuner Zoran 
        Documentation/vm: locking 
        Documentation/watchdog: watchdog-api.txt 
        Documentation/x86_64: boot-options.txt 
        arch/alpha     : Kconfig Makefile 
        arch/alpha/kernel: alpha_ksyms.c entry.S head.S module.c 
                           osf_sys.c signal.c smp.c sys_marvel.c time.c 
        arch/alpha/lib : dbg_stackcheck.S dbg_stackkill.S 
        arch/arm       : Kconfig Kconfig.debug Makefile 
        arch/arm/boot/compressed: head-sharpsl.S 
        arch/arm/common: Kconfig Makefile locomo.c sa1111.c scoop.c 
        arch/arm/configs: omap_h2_1610_defconfig s3c2410_defconfig 
        arch/arm/kernel: calls.S ecard.c entry-common.S entry-header.S 
                         head.S irq.c iwmmxt.S signal.c smp.c sys_arm.c 
                         time.c 
        arch/arm/lib   : copy_page.S csumpartialcopyuser.S getuser.S 
                         putuser.S 
        arch/arm/mach-clps7500: core.c 
        arch/arm/mach-ebsa110: core.c 
        arch/arm/mach-epxa10db: arch.c 
        arch/arm/mach-footbridge: Kconfig isa-irq.c isa.c 
        arch/arm/mach-h720x: common.c cpu-h7202.c 
        arch/arm/mach-imx: irq.c 
        arch/arm/mach-integrator: integrator_cp.c 
        arch/arm/mach-iop3xx: iop321-time.c iop331-time.c 
        arch/arm/mach-ixp2000: core.c ixdp2x00.c ixdp2x01.c 
        arch/arm/mach-ixp4xx: common.c coyote-pci.c coyote-setup.c 
                              gtwx5715-pci.c gtwx5715-setup.c 
                              ixdp425-pci.c ixdp425-setup.c 
                              ixdpg425-pci.c 
        arch/arm/mach-lh7a40x: common.h 
        arch/arm/mach-omap1: Kconfig Makefile board-generic.c board-h2.c 
                             board-h3.c board-innovator.c 
                             board-netstar.c board-osk.c 
                             board-perseus2.c board-voiceblue.c fpga.c 
                             io.c irq.c leds-h2p2-debug.c 
                             leds-innovator.c leds-osk.c leds.c serial.c 
                             time.c 
        arch/arm/mach-pxa: Makefile corgi.c corgi_ssp.c irq.c lubbock.c 
                           mainstone.c poodle.c time.c 
        arch/arm/mach-rpc: riscpc.c 
        arch/arm/mach-s3c2410: Kconfig Makefile bast-irq.c clock.c 
                               devs.c irq.c mach-bast.c mach-h1940.c 
                               mach-n30.c mach-vr1000.c pm-simtec.c pm.c 
                               s3c2440-clock.c s3c2440-irq.c time.c 
        arch/arm/mach-sa1100: assabet.c cerf.c generic.c generic.h irq.c 
                              lart.c neponset.c shannon.c simpad.c 
                              time.c 
        arch/arm/mach-shark: core.c 
        arch/arm/mach-versatile: core.c 
        arch/arm/mm    : alignment.c copypage-v3.S copypage-v4wb.S 
                         copypage-v4wt.S flush.c mm-armv.c 
                         proc-arm1020.S proc-arm1020e.S proc-arm1022.S 
                         proc-arm1026.S proc-arm6_7.S proc-arm720.S 
                         proc-macros.S proc-sa110.S proc-sa1100.S 
                         proc-v6.S tlb-v3.S tlb-v4.S tlb-v4wb.S 
                         tlb-v4wbi.S tlb-v6.S 
        arch/arm/nwfpe : entry26.S 
        arch/arm/plat-omap: Kconfig Makefile clock.c common.c dma.c 
                            gpio.c mcbsp.c mux.c ocpi.c pm.c sleep.S 
                            usb.c 
        arch/arm/vfp   : entry.S 
        arch/arm26     : Kconfig Makefile 
        arch/arm26/kernel: entry.S signal.c time.c 
        arch/arm26/lib : copy_page.S csumpartialcopyuser.S getuser.S 
                         putuser.S 
        arch/arm26/mm  : proc-funcs.S 
        arch/arm26/nwfpe: entry.S 
        arch/cris      : Kconfig.debug Makefile 
        arch/cris/arch-v10/kernel: entry.S signal.c time.c 
        arch/cris/arch-v32/kernel: entry.S signal.c 
        arch/cris/kernel: time.c 
        arch/frv/kernel: frv_ksyms.c signal.c time.c 
        arch/h8300     : Makefile 
        arch/h8300/kernel: signal.c time.c 
        arch/i386      : Kconfig Makefile defconfig 
        arch/i386/boot : setup.S video.S 
        arch/i386/boot/tools: build.c 
        arch/i386/kernel: Makefile crash.c dmi_scan.c doublefault.c 
                          efi.c entry.S head.S io_apic.c ioport.c 
                          kprobes.c ldt.c machine_kexec.c microcode.c 
                          mpparse.c msr.c nmi.c process.c ptrace.c 
                          reboot.c semaphore.c setup.c sigframe.h 
                          signal.c smp.c smpboot.c srat.c time.c traps.c 
                          vm86.c vmlinux.lds.S vsyscall-sigreturn.S 
                          vsyscall.lds.S 
        arch/i386/kernel/acpi: Makefile boot.c earlyquirk.c sleep.c 
                               wakeup.S 
        arch/i386/kernel/cpu: common.c cyrix.c intel.c intel_cacheinfo.c 
        arch/i386/kernel/cpu/cpufreq: acpi-cpufreq.c longhaul.c 
                                      speedstep-centrino.c 
                                      speedstep-smi.c 
        arch/i386/kernel/cpu/mtrr: main.c 
        arch/i386/kernel/timers: timer_hpet.c timer_pit.c timer_pm.c 
                                 timer_tsc.c 
        arch/i386/mach-default: topology.c 
        arch/i386/mach-es7000: es7000.h es7000plat.c 
        arch/i386/mach-generic: bigsmp.c probe.c 
        arch/i386/mach-voyager: voyager_basic.c voyager_smp.c 
        arch/i386/math-emu: get_address.c 
        arch/i386/mm   : discontig.c fault.c hugetlbpage.c init.c 
                         pageattr.c pgtable.c 
        arch/i386/oprofile: init.c nmi_int.c nmi_timer_int.c 
        arch/i386/pci  : Makefile acpi.c common.c i386.c irq.c 
                         mmconfig.c 
        arch/i386/power: cpu.c swsusp.S 
        arch/ia64      : Kconfig Makefile defconfig 
        arch/ia64/configs: bigsur_defconfig sn2_defconfig 
                           tiger_defconfig zx1_defconfig 
        arch/ia64/hp/sim: simserial.c 
        arch/ia64/hp/sim/boot: boot_head.S fw-emu.c 
        arch/ia64/ia32 : ia32_entry.S ia32_signal.c sys_ia32.c 
        arch/ia64/kernel: Makefile acpi-ext.c acpi.c asm-offsets.c 
                          entry.S fsys.S gate.S head.S iosapic.c irq.c 
                          ivt.S jprobes.S kprobes.c mca.c mca_asm.S 
                          mca_drv.c minstate.h palinfo.c perfmon.c 
                          salinfo.c setup.c signal.c sys_ia64.c 
                          topology.c traps.c uncached.c unwind.c 
                          vmlinux.lds.S 
        arch/ia64/lib  : Makefile flush.S memcpy_mck.S swiotlb.c 
        arch/ia64/mm   : fault.c hugetlbpage.c init.c 
        arch/ia64/pci  : pci.c 
        arch/ia64/sn/include: tio.h 
        arch/ia64/sn/include/xtalk: hubdev.h 
        arch/ia64/sn/kernel: bte.c huberror.c io_init.c irq.c setup.c 
                             tiocx.c xpc_main.c xpnet.c 
        arch/ia64/sn/kernel/sn2: ptc_deadlock.S sn2_smp.c sn_hwperf.c 
                                 sn_proc_fs.c timer_interrupt.c 
        arch/ia64/sn/pci: Makefile tioca_provider.c 
        arch/ia64/sn/pci/pcibr: pcibr_dma.c pcibr_provider.c 
        arch/m32r      : Kconfig 
        arch/m32r/kernel: signal.c smp.c time.c 
        arch/m68k      : Kconfig Makefile 
        arch/m68k/amiga: amisound.c 
        arch/m68k/bvme6000: rtc.c 
        arch/m68k/fpsp040: skeleton.S 
        arch/m68k/ifpsp060: iskeleton.S 
        arch/m68k/kernel: entry.S head.S m68k_ksyms.c ptrace.c time.c 
        arch/m68k/lib  : Makefile 
        arch/m68k/mac  : macboing.c 
        arch/m68k/math-emu: fp_emu.h 
        arch/m68k/mm   : Makefile memory.c 
        arch/m68k/mvme16x: rtc.c 
        arch/m68knommu : Kconfig Makefile defconfig 
        arch/m68knommu/kernel: setup.c signal.c time.c traps.c 
                               vmlinux.lds.S 
        arch/m68knommu/platform/5272: config.c 
        arch/m68knommu/platform/5307: Makefile head.S 
        arch/m68knommu/platform/68328: config.c entry.S 
        arch/m68knommu/platform/68360: entry.S 
        arch/m68knommu/platform/68EZ328: config.c 
        arch/mips      : Kconfig Makefile 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 pb1100_defconfig 
                           pb1500_defconfig pb1550_defconfig 
                           qemu_defconfig rbhma4500_defconfig 
                           rm200_defconfig sb1250-swarm_defconfig 
                           sead_defconfig tb0226_defconfig 
                           tb0229_defconfig workpad_defconfig 
                           yosemite_defconfig 
        arch/mips/kernel: irixioctl.c irixsig.c r2300_fpu.S 
                          r2300_switch.S r4k_fpu.S r4k_switch.S 
                          r6000_fpu.S scall32-o32.S scall64-64.S 
                          signal.c signal32.c syscall.c sysirix.c time.c 
        arch/mips/lib  : memcpy.S strlen_user.S strncpy_user.S 
                         strnlen_user.S 
        arch/mips/lib-32: memset.S 
        arch/mips/lib-64: memset.S 
        arch/mips/math-emu: cp1emu.c 
        arch/mips/pci  : pci-ip27.c 
        arch/mips/sgi-ip27: ip27-timer.c 
        arch/parisc    : Kconfig Makefile 
        arch/parisc/hpux: gate.S wrappers.S 
        arch/parisc/kernel: entry.S head.S process.c ptrace.c signal.c 
                            syscall.S time.c 
        arch/parisc/lib: Makefile bitops.c fixup.S 
        arch/ppc       : Kconfig Kconfig.debug Makefile 
        arch/ppc/8xx_io: cs4218_tdm.c 
        arch/ppc/boot/common: ns16550.c util.S 
        arch/ppc/boot/simple: Makefile embed_config.c head.S 
                              misc-cpci690.c misc-katana.c 
                              misc-mv64x60.c mv64x60_tty.c 
        arch/ppc/configs: cpci690_defconfig katana_defconfig 
                          mpc8560_ads_defconfig 
        arch/ppc/kernel: Makefile cpu_setup_6xx.S cpu_setup_power4.S 
                         cputable.c dma-mapping.c entry.S fpu.S head.S 
                         head_44x.S head_4xx.S head_8xx.S 
                         head_fsl_booke.S idle.c idle_6xx.S 
                         idle_power4.S l2cr.S misc.S pci.c ppc_ksyms.c 
                         setup.c signal.c smp.c swsusp.S syscalls.c 
                         time.c traps.c 
        arch/ppc/lib   : Makefile dec_and_lock.c 
        arch/ppc/mm    : fault.c hashtable.S init.c 
        arch/ppc/platforms: Makefile cpci690.c cpci690.h hdpu.c katana.c 
                            katana.h pmac_pic.c pmac_sleep.S pmac_smp.c 
                            tqm8xx.h 
        arch/ppc/platforms/4xx: Kconfig Makefile bamboo.c bamboo.h 
                                ebony.c ibm405ep.c ibm405gp.c 
                                ibm405gpr.c ibm440ep.c ibm440gp.c 
                                ibm440gx.c ibm440sp.c ibmnp405h.c 
                                ibmstb4.c ibmstb4.h luan.c luan.h 
                                ocotea.c redwood5.c 
        arch/ppc/platforms/83xx: mpc834x_sys.c mpc834x_sys.h 
        arch/ppc/syslib: Makefile cpc700_pic.c i8259.c ibm440gx_common.c 
                         m8xx_setup.c mpc10x_common.c mpc83xx_devices.c 
                         mpc85xx_devices.c mv64360_pic.c mv64x60.c ocp.c 
                         of_device.c open_pic.c open_pic2.c ppc403_pic.c 
                         ppc4xx_setup.c ppc83xx_setup.c ppc83xx_setup.h 
                         ppc_sys.c qspan_pci.c xilinx_pic.c 
        arch/ppc64     : Kconfig Kconfig.debug Makefile defconfig 
        arch/ppc64/boot: Makefile addnote.c crt0.S div64.S main.c prom.c 
                         string.S zlib.c 
        arch/ppc64/configs: g5_defconfig iSeries_defconfig 
                            maple_defconfig pSeries_defconfig 
        arch/ppc64/kernel: LparData.c Makefile asm-offsets.c bpa_iic.c 
                           btext.c cpu_setup_power4.S cputable.c eeh.c 
                           entry.S head.S iSeries_VpdInfo.c 
                           iSeries_htab.c iSeries_pci.c iSeries_setup.c 
                           idle_power4.S iomap.c iommu.c kprobes.c lmb.c 
                           lparcfg.c maple_pci.c maple_setup.c misc.S 
                           of_device.c pSeries_iommu.c pSeries_lpar.c 
                           pSeries_reconfig.c pSeries_setup.c 
                           pSeries_smp.c pacaData.c pci.c pci.h pci_dn.c 
                           pci_iommu.c pmac_feature.c pmac_pci.c 
                           pmac_setup.c pmc.c process.c prom.c 
                           prom_init.c ptrace.c ptrace32.c ras.c 
                           rtas_pci.c rtasd.c rtc.c scanlog.c setup.c 
                           signal.c signal32.c sys_ppc32.c syscalls.c 
                           sysfs.c time.c traps.c u3_iommu.c udbg.c 
                           vio.c vmlinux.lds.S xics.c 
        arch/ppc64/kernel/vdso32: cacheflush.S datapage.S gettimeofday.S 
        arch/ppc64/kernel/vdso64: cacheflush.S datapage.S gettimeofday.S 
        arch/ppc64/lib : dec_and_lock.c locks.c 
        arch/ppc64/mm  : fault.c hash_low.S hash_native.c hash_utils.c 
                         hugetlbpage.c imalloc.c init.c numa.c slb.c 
                         slb_low.S tlb.c 
        arch/ppc64/oprofile: common.c op_model_power4.c op_model_rs64.c 
        arch/ppc64/xmon: privinst.h start.c xmon.c 
        arch/s390      : Makefile 
        arch/s390/kernel: compat_linux.c compat_signal.c debug.c entry.S 
                          entry64.S head.S head64.S signal.c time.c 
        arch/s390/lib  : spinlock.c uaccess.S uaccess64.S 
        arch/s390/mm   : fault.c 
        arch/sh        : Kconfig Makefile 
        arch/sh/boards/adx: irq_maskreg.c 
        arch/sh/boards/bigsur: io.c irq.c 
        arch/sh/boards/cqreek: irq.c 
        arch/sh/boards/harp: irq.c 
        arch/sh/boards/overdrive: irq.c 
        arch/sh/boards/renesas/hs7751rvoip: irq.c 
        arch/sh/boards/renesas/rts7751r2d: irq.c 
        arch/sh/boards/renesas/systemh: irq.c 
        arch/sh/boards/superh/microdev: irq.c 
        arch/sh/cchips/hd6446x/hd64465: io.c 
        arch/sh/cchips/voyagergx: irq.c 
        arch/sh/kernel : signal.c time.c 
        arch/sh/kernel/cpu: irq_imask.c irq_ipr.c 
        arch/sh/kernel/cpu/sh4: irq_intc2.c 
        arch/sh64      : Kconfig Makefile 
        arch/sh64/kernel: irq_intc.c signal.c time.c 
        arch/sparc     : Kconfig Makefile 
        arch/sparc/kernel: entry.S module.c pcic.c sclow.S setup.c 
                           signal.c sparc_ksyms.c tick14.c time.c 
        arch/sparc/lib : Makefile atomic32.c mul.S rem.S sdiv.S udiv.S 
                         umul.S urem.S 
        arch/sparc/mm  : fault.c generic.c hypersparc.S init.c swift.S 
                         tsunami.S viking.S 
        arch/sparc64   : Kconfig 
        arch/sparc64/kernel: entry.S head.S kprobes.c pci.c pci_iommu.c 
                             pci_psycho.c pci_sabre.c pci_schizo.c 
                             process.c rtrap.S sbus.c setup.c signal.c 
                             signal32.c smp.c sparc64_ksyms.c 
                             sunos_ioctl32.c sys_sparc32.c time.c 
                             traps.c ttable.S unaligned.c vmlinux.lds.S 
                             winfixup.S 
        arch/sparc64/lib: Makefile PeeCeeI.c copy_page.S 
        arch/sparc64/mm: fault.c generic.c init.c ultra.S 
        arch/sparc64/solaris: ioctl.c misc.c timod.c 
        arch/um        : Kconfig Kconfig.debug Makefile Makefile-i386 
                         Makefile-x86_64 
        arch/um/drivers: Makefile chan_user.c ubd_kern.c 
        arch/um/include: common-offsets.h init.h irq_kern.h mem.h os.h 
                         tlb.h um_uaccess.h user_util.h 
        arch/um/include/sysdep-i386: syscalls.h 
        arch/um/include/sysdep-x86_64: ptrace.h syscalls.h 
        arch/um/kernel : Makefile dyn.lds.S irq.c ksyms.c main.c mem.c 
                         physmem.c signal_kern.c tlb.c trap_kern.c 
                         trap_user.c um_arch.c uml.lds.S 
        arch/um/kernel/skas: Makefile mem_user.c mmu.c process.c 
                             process_kern.c tlb.c 
        arch/um/kernel/skas/include: mmu-skas.h skas.h uaccess-skas.h 
        arch/um/kernel/tt: syscall_kern.c syscall_user.c tlb.c 
        arch/um/kernel/tt/include: uaccess-tt.h 
        arch/um/os-Linux: Makefile elf_aux.c process.c 
        arch/um/scripts: Makefile.rules Makefile.unmap 
        arch/um/sys-i386: Makefile kernel-offsets.c signal.c stub.S 
                          stub_segv.c 
        arch/um/sys-x86_64: Makefile kernel-offsets.c signal.c stub.S 
                            stub_segv.c 
        arch/v850      : Makefile 
        arch/v850/configs: rte-ma1-cb_defconfig rte-me2-cb_defconfig 
                           sim_defconfig 
        arch/v850/kernel: entry.S irq.c setup.c signal.c sim.c time.c 
        arch/x86_64    : Kconfig Makefile defconfig 
        arch/x86_64/boot: Makefile setup.S 
        arch/x86_64/boot/compressed: misc.c 
        arch/x86_64/boot/tools: build.c 
        arch/x86_64/ia32: ia32_ioctl.c ia32entry.S sys_ia32.c 
                          vsyscall-syscall.S vsyscall-sysenter.S 
        arch/x86_64/kernel: Makefile aperture.c apic.c asm-offsets.c 
                            crash.c e820.c early_printk.c entry.S 
                            genapic.c genapic_cluster.c genapic_flat.c 
                            head.S i8259.c init_task.c io_apic.c irq.c 
                            kprobes.c mce.c mpparse.c nmi.c pci-gart.c 
                            process.c setup.c setup64.c signal.c smp.c 
                            smpboot.c suspend.c suspend_asm.S time.c 
                            traps.c vmlinux.lds.S vsyscall.c 
        arch/x86_64/kernel/acpi: Makefile sleep.c 
        arch/x86_64/lib: copy_user.S getuser.S putuser.S 
        arch/x86_64/mm : fault.c init.c k8topology.c numa.c srat.c 
        arch/x86_64/pci: Makefile Makefile-BUS k8-bus.c mmconfig.c 
        arch/xtensa    : Makefile 
        arch/xtensa/kernel: align.S entry.S process.c signal.c time.c 
                            vectors.S 
        crypto         : Kconfig api.c cipher.c internal.h tcrypt.c 
                         tcrypt.h tea.c 
        drivers        : Kconfig Makefile 
        drivers/acorn/block: fd1772.c 
        drivers/acpi   : Kconfig Makefile ac.c acpi_memhotplug.c 
                         asus_acpi.c battery.c blacklist.c bus.c 
                         button.c container.c debug.c ec.c event.c fan.c 
                         glue.c hotkey.c ibm_acpi.c motherboard.c numa.c 
                         osl.c pci_bind.c pci_irq.c pci_link.c 
                         pci_root.c power.c processor_core.c 
                         processor_idle.c processor_perflib.c 
                         processor_thermal.c processor_throttling.c 
                         scan.c system.c tables.c thermal.c 
                         toshiba_acpi.c utils.c video.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: Makefile 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/sleep: main.c poweroff.c proc.c wakeup.c 
        drivers/acpi/tables: tbconvrt.c tbget.c tbgetall.c tbinstal.c 
                             tbrsdt.c tbutils.c tbxface.c tbxfroot.c 
        drivers/acpi/utilities: Makefile utalloc.c utcopy.c utdebug.c 
                                utdelete.c uteval.c utglobal.c utinit.c 
                                utmath.c utmisc.c utobject.c utxface.c 
        drivers/atm    : ambassador.c atmtcp.c eni.c firestream.c 
                         fore200e.c he.c horizon.c idt77105.c idt77252.c 
                         iphase.c lanai.c nicstar.c nicstar.h zatm.c 
        drivers/base   : attribute_container.c bus.c class.c core.c dd.c 
                         dmapool.c driver.c firmware_class.c node.c 
                         sys.c transport_class.c 
        drivers/base/power: resume.c runtime.c suspend.c sysfs.c 
        drivers/block  : Kconfig acsi.c acsi_slm.c ataflop.c cciss.c 
                         cryptoloop.c deadline-iosched.c floppy.c 
                         genhd.c ll_rw_blk.c ps2esdi.c scsi_ioctl.c 
                         swim3.c swim_iop.c ub.c umem.c viodasd.c xd.c 
                         z2ram.c 
        drivers/block/aoe: aoe.h aoedev.c aoenet.c 
        drivers/block/paride: pcd.c pf.c pg.c pt.c 
        drivers/bluetooth: bfusb.c bluecard_cs.c bpa10x.c bt3c_cs.c 
                           btuart_cs.c dtl1_cs.c hci_bcsp.c hci_h4.c 
                           hci_ldisc.c hci_usb.c hci_vhci.c 
        drivers/cdrom  : aztcd.c cdrom.c gscd.c optcd.c sbpcd.c sjcd.c 
                         sonycd535.c viocd.c 
        drivers/char   : Kconfig applicom.c cyclades.c digi1.h 
                         digiFep1.h epca.c epca.h hangcheck-timer.c 
                         hpet.c hvc_vio.c hvcs.c hw_random.c ip2main.c 
                         istallion.c keyboard.c lcd.c lp.c mbcs.c mem.c 
                         misc.c moxa.c mxser.c n_tty.c pty.c random.c 
                         rtc.c snsc_event.c sonypi.c synclink.c 
                         synclinkmp.c tty_io.c viotape.c vt.c 
        drivers/char/agp: amd64-agp.c backend.c generic.c 
        drivers/char/drm: Kconfig Makefile drm.h drmP.h drm_agpsupport.c 
                          drm_bufs.c drm_context.c drm_drv.c drm_fops.c 
                          drm_ioctl.c drm_memory.c drm_pci.c 
                          drm_pciids.h drm_proc.c drm_scatter.c 
                          drm_stub.c drm_sysfs.c drm_vm.c ffb_drv.c 
                          i810_dma.c i810_drv.c i810_drv.h i830_dma.c 
                          i830_drv.c i830_drv.h i915_dma.c i915_drv.c 
                          i915_drv.h mga_dma.c mga_drm.h mga_drv.c 
                          mga_drv.h mga_ioc32.c mga_irq.c mga_state.c 
                          mga_warp.c r128_cce.c r128_drm.h radeon_cp.c 
                          radeon_drm.h radeon_drv.c radeon_drv.h 
                          radeon_state.c 
        drivers/char/ftape/lowlevel: fdc-io.c 
        drivers/char/ip2: i2lib.c 
        drivers/char/ipmi: ipmi_bt_sm.c ipmi_devintf.c ipmi_kcs_sm.c 
                           ipmi_msghandler.c ipmi_poweroff.c 
                           ipmi_si_intf.c ipmi_smic_sm.c ipmi_watchdog.c 
        drivers/char/mwave: mwavedd.c 
        drivers/char/pcmcia: synclink_cs.c 
        drivers/char/tpm: Kconfig tpm_atmel.c tpm_infineon.c 
        drivers/char/watchdog: Kconfig Makefile ixp2000_wdt.c 
                               ixp4xx_wdt.c mixcomwd.c s3c2410_wdt.c 
                               scx200_wdt.c softdog.c w83627hf_wdt.c 
        drivers/cpufreq: cpufreq.c 
        drivers/firmware: Kconfig Makefile 
        drivers/hwmon  : Kconfig Makefile adm1021.c adm1025.c adm1026.c 
                         adm1031.c adm9240.c asb100.c atxp1.c ds1621.c 
                         fscher.c fscpos.c gl518sm.c gl520sm.c it87.c 
                         lm63.c lm75.c lm75.h lm77.c lm78.c lm80.c 
                         lm83.c lm85.c lm87.c lm90.c lm92.c max1619.c 
                         pc87360.c sis5595.c smsc47b397.c smsc47m1.c 
                         via686a.c w83627ehf.c w83627hf.c w83781d.c 
                         w83l785ts.c 
        drivers/i2c    : Makefile i2c-core.c i2c-dev.c 
        drivers/i2c/algos: i2c-algo-bit.c i2c-algo-ite.c i2c-algo-pca.c 
                           i2c-algo-pcf.c i2c-algo-sgi.c 
                           i2c-algo-sibyte.c 
        drivers/i2c/busses: Kconfig Makefile i2c-ali1535.c i2c-ali1563.c 
                            i2c-ali15x3.c i2c-amd756.c i2c-amd8111.c 
                            i2c-au1550.c i2c-i801.c i2c-ibm_iic.c 
                            i2c-iop3xx.c i2c-isa.c i2c-keywest.c 
                            i2c-mpc.c i2c-mv64xxx.c i2c-nforce2.c 
                            i2c-piix4.c i2c-s3c2410.c i2c-sis5595.c 
                            i2c-sis630.c i2c-sis96x.c i2c-stub.c 
                            i2c-viapro.c scx200_acb.c 
        drivers/i2c/chips: Kconfig ds1337.c ds1374.c eeprom.c 
                           isp1301_omap.c m41t00.c max6875.c pca9539.c 
                           pcf8574.c pcf8591.c rtc8564.c 
        drivers/ide    : ide-disk.c ide-io.c ide-tape.c ide-timing.h 
                         ide.c 
        drivers/ide/legacy: ide-cs.c 
        drivers/ide/pci: hpt366.c sc1200.c 
        drivers/ide/ppc: pmac.c 
        drivers/ieee1394: ieee1394_core.c nodemgr.c pcilynx.c sbp2.c 
                          video1394.c 
        drivers/infiniband: Kconfig 
        drivers/infiniband/core: Makefile agent.c agent_priv.h cache.c 
                                 cm.c cm_msgs.h core_priv.h device.c 
                                 fmr_pool.c mad.c mad_priv.h mad_rmpp.c 
                                 packer.c sa_query.c smi.c sysfs.c ucm.c 
                                 ucm.h ud_header.c user_mad.c uverbs.h 
                                 uverbs_cmd.c uverbs_main.c uverbs_mem.c 
                                 verbs.c 
        drivers/infiniband/hw/mthca: Makefile mthca_allocator.c 
                                     mthca_av.c mthca_cmd.c mthca_cmd.h 
                                     mthca_config_reg.h mthca_cq.c 
                                     mthca_dev.h mthca_doorbell.h 
                                     mthca_eq.c mthca_mad.c mthca_main.c 
                                     mthca_mcg.c mthca_memfree.c 
                                     mthca_memfree.h mthca_mr.c 
                                     mthca_pd.c mthca_profile.c 
                                     mthca_profile.h mthca_provider.c 
                                     mthca_provider.h mthca_qp.c 
                                     mthca_reset.c mthca_user.h 
        drivers/infiniband/ulp/ipoib: Makefile ipoib.h ipoib_fs.c 
                                      ipoib_ib.c ipoib_main.c 
                                      ipoib_multicast.c ipoib_verbs.c 
                                      ipoib_vlan.c 
        drivers/input  : evdev.c input.c 
        drivers/input/gameport: emu10k1-gp.c fm801-gp.c ns558.c 
        drivers/input/joystick: a3d.c adi.c analog.c cobra.c db9.c 
                                gamecon.c gf2k.c grip.c grip_mp.c 
                                guillemot.c interact.c sidewinder.c 
                                tmdc.c turbografx.c 
        drivers/input/joystick/iforce: iforce-packets.c iforce-usb.c 
        drivers/input/keyboard: atkbd.c corgikbd.c sunkbd.c 
        drivers/input/mouse: Makefile alps.c logips2pp.c psmouse-base.c 
                             psmouse.h 
        drivers/input/serio: i8042-io.h i8042-ip22io.h i8042-jazzio.h 
                             i8042-sparcio.h i8042-x86ia64io.h i8042.c 
                             serport.c 
        drivers/input/touchscreen: corgi_ts.c 
        drivers/isdn/act2000: capi.c 
        drivers/isdn/hisax: hisax.h 
        drivers/isdn/i4l: isdn_bsdcomp.c isdn_common.c isdn_net.c 
                          isdn_ppp.c isdn_v110.c 
        drivers/macintosh: mediabay.c via-pmu.c 
        drivers/md     : bitmap.c dm-crypt.c dm-exception-store.c 
                         dm-io.c dm-raid1.c dm.c linear.c md.c 
                         multipath.c raid0.c raid1.c raid10.c raid5.c 
                         raid6main.c 
        drivers/media  : Makefile 
        drivers/media/common: ir-common.c saa7146_core.c saa7146_fops.c 
                              saa7146_i2c.c 
        drivers/media/dvb/b2c2: flexcop-fe-tuner.c flexcop-i2c.c 
        drivers/media/dvb/bt8xx: Kconfig bt878.c bt878.h dst.c dst_ca.c 
                                 dst_common.h dvb-bt8xx.c dvb-bt8xx.h 
        drivers/media/dvb/cinergyT2: Kconfig cinergyT2.c 
        drivers/media/dvb/dvb-core: demux.h dmxdev.c dvb_ca_en50221.c 
                                    dvb_demux.c dvb_demux.h dvb_net.c 
        drivers/media/dvb/dvb-usb: Kconfig Makefile a800.c cxusb.c 
                                   cxusb.h dibusb-common.c dibusb-mb.c 
                                   dibusb-mc.c digitv.c dtt200u-fe.c 
                                   dtt200u.c dvb-usb-i2c.c dvb-usb-ids.h 
                                   dvb-usb-init.c dvb-usb.h 
                                   nova-t-usb2.c umt-010.c vp7045.c 
        drivers/media/dvb/frontends: cx24110.c cx24110.h dib3000mb.c 
                                     dib3000mc.c lgdt330x.c mt352.c 
                                     nxt6000.c or51132.c s5h1420.c 
                                     s5h1420.h stv0297.c stv0297.h 
                                     stv0299.c stv0299.h tda1004x.c 
                                     tda80xx.c ves1820.c 
        drivers/media/dvb/pluto2: pluto2.c 
        drivers/media/dvb/ttpci: Kconfig av7110.c av7110.h av7110_hw.c 
                                 av7110_ir.c av7110_v4l.c budget-av.c 
                                 budget-ci.c budget-patch.c budget.c 
        drivers/media/dvb/ttusb-budget: dvb-ttusb-budget.c 
        drivers/media/dvb/ttusb-dec: ttusb_dec.c 
        drivers/media/video: Kconfig Makefile adv7170.c adv7175.c 
                             bt819.c bt832.c bt856.c btcx-risc.c 
                             btcx-risc.h bttv-cards.c bttv-driver.c 
                             bttv-gpio.c bttv-i2c.c bttv-if.c 
                             bttv-risc.c bttv-vbi.c bttv.h bttvp.h 
                             cpia_usb.c ir-kbd-gpio.c ir-kbd-i2c.c 
                             meye.c msp3400.c msp3400.h mt20xx.c 
                             saa7110.c saa7111.c saa7114.c saa7185.c 
                             stradis.c tda7432.c tda8290.c tda9840.c 
                             tda9875.c tda9887.c tea5767.c tea6415c.c 
                             tea6420.c tuner-3036.c tuner-core.c 
                             tuner-simple.c tvaudio.c tveeprom.c 
                             tvmixer.c v4l1-compat.c v4l2-common.c 
                             video-buf-dvb.c video-buf.c vpx3220.c 
                             zoran_card.c zoran_driver.c zr36120.c 
        drivers/media/video/cx88: cx88-blackbird.c cx88-cards.c 
                                  cx88-core.c cx88-dvb.c cx88-i2c.c 
                                  cx88-input.c cx88-mpeg.c cx88-reg.h 
                                  cx88-tvaudio.c cx88-vbi.c cx88-video.c 
                                  cx88.h 
        drivers/media/video/ovcamchip: ov6x20.c ov6x30.c 
                                       ovcamchip_core.c 
        drivers/media/video/saa7134: saa6752hs.c saa7134-cards.c 
                                     saa7134-core.c saa7134-dvb.c 
                                     saa7134-empress.c saa7134-i2c.c 
                                     saa7134-input.c saa7134-oss.c 
                                     saa7134-reg.h saa7134-ts.c 
                                     saa7134-tvaudio.c saa7134-vbi.c 
                                     saa7134-video.c saa7134.h 
        drivers/message/fusion: mptbase.c mptbase.h mptctl.c mptscsih.c 
                                mptspi.c 
        drivers/message/fusion/lsi: mpi.h mpi_cnfg.h mpi_history.txt 
                                    mpi_init.h mpi_ioc.h mpi_targ.h 
        drivers/misc/hdpuftrs: hdpu_cpustate.c 
        drivers/misc/ibmasm: uart.c 
        drivers/mmc    : mmc.c mmc.h mmc_block.c mmc_sysfs.c mmci.c 
                         pxamci.c wbsd.c wbsd.h 
        drivers/mtd    : ftl.c 
        drivers/mtd/devices: mtdram.c 
        drivers/mtd/maps: uclinux.c 
        drivers/mtd/nand: nand_base.c 
        drivers/net    : 3c59x.c Kconfig Makefile Space.c ac3200.c 
                         atari_bionet.c atari_pamsnet.c atarilance.c 
                         bnx2.c bnx2.h bsd_comp.c cs89x0.c dm9000.c 
                         e100.c eepro100.c fec.c fec.h forcedeth.c 
                         hamachi.c ibmveth.c iseries_veth.c jazzsonic.c 
                         loopback.c macsonic.c mv643xx_eth.c 
                         mv643xx_eth.h ne3210.c pci-skeleton.c 
                         ppp_generic.c pppoe.c r8169.c rrunner.c 
                         s2io-regs.h s2io.c s2io.h shaper.c skge.c 
                         skge.h smc-ultra.c smc91x.h sonic.c sonic.h 
                         sun3lance.c sungem.c sungem.h sunhme.c tg3.c 
                         tg3.h tun.c 
        drivers/net/arcnet: arcnet.c 
        drivers/net/bonding: bond_3ad.c bond_3ad.h bond_alb.c 
                             bond_main.c bonding.h 
        drivers/net/cris: eth_v10.c 
        drivers/net/e1000: e1000_hw.h e1000_main.c 
        drivers/net/hamradio: 6pack.c Kconfig baycom_epp.c baycom_par.c 
                              baycom_ser_fdx.c baycom_ser_hdx.c 
                              bpqether.c dmascc.c hdlcdrv.c mkiss.c 
                              scc.c yam.c 
        drivers/net/irda: irda-usb.c smsc-ircc2.c smsc-ircc2.h vlsi_ir.c 
                          vlsi_ir.h 
        drivers/net/ixgb: ixgb.h ixgb_ee.c ixgb_ethtool.c ixgb_hw.h 
                          ixgb_main.c 
        drivers/net/pcmcia: fmvj18x_cs.c 
        drivers/net/tokenring: Kconfig abyss.c madgemc.c proteon.c 
                               skisa.c tms380tr.c tms380tr.h tmspci.c 
        drivers/net/tulip: Kconfig Makefile de2104x.c de4x5.c media.c 
                           timer.c tulip.h tulip_core.c 
        drivers/net/wan: cycx_drv.c hdlc_generic.c lapbether.c sdla_fr.c 
                         syncppp.c 
        drivers/net/wireless: Kconfig Makefile airo.c atmel.c 
                              netwave_cs.c orinoco.c orinoco_cs.c 
                              orinoco_pci.c ray_cs.c ray_cs.h strip.c 
                              wavelan_cs.c wavelan_cs.h wavelan_cs.p.h 
                              wl3501.h wl3501_cs.c 
        drivers/net/wireless/prism54: isl_ioctl.c islpci_dev.c 
                                      islpci_hotplug.c 
        drivers/parisc : iosapic.c lasi.c 
        drivers/parport: ieee1284.c ieee1284_ops.c parport_pc.c 
                         parport_serial.c 
        drivers/pci    : Kconfig Makefile bus.c hotplug.c msi.c msi.h 
                         pci-driver.c pci-sysfs.c pci.c pci.h probe.c 
                         proc.c quirks.c rom.c setup-bus.c setup-res.c 
        drivers/pci/hotplug: Kconfig Makefile pciehp.h pciehprm_acpi.c 
                             rpadlpar_core.c rpaphp.h rpaphp_core.c 
                             rpaphp_pci.c rpaphp_slot.c sgi_hotplug.c 
                             shpchp.h 
        drivers/pci/pcie: portdrv_pci.c 
        drivers/pcmcia : Kconfig Makefile cs.c cs_internal.h ds.c 
                         pcmcia_resource.c pxa2xx_base.c 
                         pxa2xx_mainstone.c pxa2xx_sharpsl.c 
                         sa1100_generic.c sa1111_generic.c sa11xx_base.c 
                         topic.h yenta_socket.c yenta_socket.h 
        drivers/pnp    : Kconfig card.c driver.c manager.c quirks.c 
                         support.c 
        drivers/pnp/isapnp: core.c 
        drivers/pnp/pnpacpi: Kconfig core.c pnpacpi.h rsparser.c 
        drivers/pnp/pnpbios: core.c pnpbios.h proc.c rsparser.c 
        drivers/s390   : s390mach.c 
        drivers/s390/block: Kconfig dasd.c dasd_devmap.c dasd_diag.c 
                            dasd_diag.h dasd_genhd.c dasd_int.h 
                            dasd_ioctl.c dasd_proc.c 
        drivers/s390/char: raw3270.c 
        drivers/s390/cio: cio.c device_fsm.c device_ops.c ioasm.h 
        drivers/s390/crypto: z90common.h z90hardware.c z90main.c 
        drivers/s390/net: claw.c 
        drivers/sbus/char: Kconfig aurora.c bbc_envctrl.c bpp.c 
                           envctrl.c vfc_i2c.c 
        drivers/scsi   : 3w-9xxx.c 3w-xxxx.c 53c7xx.c Kconfig Makefile 
                         NCR5380.c NCR53c406a.c advansys.c ahci.c 
                         ata_piix.c ch.c constants.c cpqfcTSinit.c 
                         hosts.c ibmmca.c libata-core.c libata-scsi.c 
                         libata.h mesh.c osst.c pluto.c qla1280.c 
                         sata_nv.c sata_promise.c sata_promise.h 
                         sata_qstor.c sata_sil.c sata_sis.c sata_svw.c 
                         sata_sx4.c sata_uli.c sata_via.c sata_vsc.c 
                         scsi.c scsi_devinfo.c scsi_error.c scsi_ioctl.c 
                         scsi_lib.c scsi_priv.h scsi_scan.c scsi_sysfs.c 
                         scsi_transport_fc.c scsi_transport_spi.c sd.c 
                         sg.c sr.c sr.h sr_ioctl.c st.c st.h 
        drivers/scsi/aacraid: aachba.c aacraid.h commctrl.c comminit.c 
                              commsup.c linit.c rkt.c rx.c sa.c 
        drivers/scsi/aic7xxx: Kconfig.aic79xx aic7770.c aic79xx.h 
                              aic79xx_core.c aic79xx_osm.c aic79xx_osm.h 
                              aic79xx_osm_pci.c aic79xx_pci.c 
                              aic79xx_proc.c aic7xxx.h aic7xxx.reg 
                              aic7xxx.seq aic7xxx_93cx6.c aic7xxx_core.c 
                              aic7xxx_osm.c aic7xxx_osm.h 
                              aic7xxx_osm_pci.c aic7xxx_proc.c 
                              aic7xxx_reg.h_shipped 
                              aic7xxx_reg_print.c_shipped 
                              aic7xxx_seq.h_shipped aiclib.c aiclib.h 
        drivers/scsi/ibmvscsi: ibmvscsi.c ibmvscsi.h rpa_vscsi.c 
        drivers/scsi/lpfc: lpfc.h lpfc_attr.c lpfc_ct.c lpfc_els.c 
                           lpfc_hbadisc.c lpfc_hw.h lpfc_init.c 
                           lpfc_mbox.c lpfc_mem.c lpfc_nportdisc.c 
                           lpfc_scsi.c lpfc_scsi.h lpfc_sli.c 
                           lpfc_version.h 
        drivers/scsi/qla2xxx: qla_attr.c qla_dbg.c qla_dbg.h qla_def.h 
                              qla_gbl.h qla_gs.c qla_init.c qla_iocb.c 
                              qla_isr.c qla_mbx.c qla_os.c qla_sup.c 
                              qla_version.h 
        drivers/serial : 21285.c 68328serial.c 68360serial.c 8250.c 
                         8250.h 8250_accent.c 8250_acpi.c 8250_boca.c 
                         8250_fourport.c 8250_hub6.c 8250_mca.c 
                         8250_pci.c Kconfig amba-pl010.c amba-pl011.c 
                         au1x00_uart.c clps711x.c crisv10.c dz.c icom.c 
                         imx.c ioc4_serial.c ip22zilog.c m32r_sio.c 
                         mcfserial.c mpc52xx_uart.c mpsc.c mux.c 
                         pmac_zilog.c pxa.c s3c2410.c sa1100.c 
                         serial_core.c serial_lh7a40x.c serial_txx9.c 
                         sh-sci.c sn_console.c sunsab.c sunsu.c 
                         sunzilog.c uart00.c v850e_uart.c 
        drivers/serial/cpm_uart: cpm_uart_core.c cpm_uart_cpm2.c 
        drivers/serial/jsm: jsm_tty.c 
        drivers/telephony: ixj.c 
        drivers/usb/atm: cxacru.c usbatm.c 
        drivers/usb/class: Kconfig audio.c usblp.c 
        drivers/usb/core: Makefile devio.c hcd-pci.c hcd.c hcd.h hub.c 
                          hub.h inode.c message.c urb.c usb.c usb.h 
        drivers/usb/gadget: ether.c file_storage.c gadget_chips.h 
                            inode.c serial.c zero.c 
        drivers/usb/host: ehci-dbg.c ehci-hcd.c ehci-hub.c ehci-q.c 
                          ehci-sched.c ehci.h hc_crisv10.c isp116x-hcd.c 
                          ohci-dbg.c ohci-hcd.c ohci-hub.c 
                          ohci-ppc-soc.c ohci-pxa27x.c ohci-s3c2410.c 
                          ohci.h sl811-hcd.c uhci-hcd.c uhci-hcd.h 
                          uhci-hub.c uhci-q.c 
        drivers/usb/input: Kconfig Makefile acecad.c hid-core.c 
                           hid-debug.h hid-input.c hid.h hiddev.c 
                           itmtouch.c keyspan_remote.c pid.c 
        drivers/usb/media: stv680.c w9968cf.c 
        drivers/usb/misc: auerswald.c ldusb.c usbtest.c uss720.c 
        drivers/usb/misc/sisusbvga: Kconfig Makefile sisusb.c sisusb.h 
        drivers/usb/mon: Makefile mon_text.c usb_mon.h 
        drivers/usb/net: Kconfig Makefile catc.c kaweth.c pegasus.c 
                         rtl8150.c usbnet.c zd1201.c 
        drivers/usb/serial: cp2101.c cypress_m8.c ftdi_sio.c ftdi_sio.h 
                            keyspan.c option.c pl2303.c pl2303.h 
                            usb-serial.c 
        drivers/usb/storage: Kconfig Makefile scsiglue.c shuttle_usbat.c 
                             transport.c unusual_devs.h usb.c usb.h 
        drivers/video  : Kconfig Makefile chipsfb.c fbmem.c fbmon.c 
                         modedb.c offb.c pxafb.c pxafb.h q40fb.c 
                         s1d13xxxfb.c tridentfb.c vesafb.c vgastate.c 
                         w100fb.c w100fb.h 
        drivers/video/aty: aty128fb.c atyfb_base.c radeon_base.c 
                           radeon_i2c.c radeon_pm.c 
        drivers/video/backlight: Makefile 
        drivers/video/console: Kconfig Makefile bitblit.c fbcon.c 
                               fbcon.h vgacon.c 
        drivers/video/geode: Kconfig display_gx1.c geodefb.h 
                             gx1fb_core.c video_cs5530.c 
        drivers/video/i810: Makefile i810.h i810_main.c i810_main.h 
        drivers/video/intelfb: intelfb.h intelfbdrv.c intelfbhw.c 
        drivers/video/matrox: matroxfb_maven.c matroxfb_misc.c 
        drivers/video/nvidia: nv_i2c.c nv_local.h nv_of.c nv_proto.h 
                              nv_setup.c nvidia.c 
        drivers/video/riva: fbdev.c rivafb-i2c.c 
        drivers/video/savage: savagefb-i2c.c savagefb.h 
                              savagefb_driver.c 
        drivers/video/sis: 300vtbl.h 310vtbl.h Makefile init.c init.h 
                           init301.c init301.h initdef.h oem300.h 
                           oem310.h osdef.h sis.h sis_accel.c 
                           sis_accel.h sis_main.c sis_main.h vgatypes.h 
                           vstruct.h 
        drivers/w1     : Kconfig Makefile ds_w1_bridge.c dscore.c 
                         dscore.h w1.c w1.h w1_family.c w1_family.h 
                         w1_int.c w1_io.c w1_io.h w1_netlink.c 
                         w1_netlink.h w1_smem.c w1_therm.c 
        fs             : Kconfig Makefile aio.c binfmt_flat.c bio.c 
                         buffer.c compat.c compat_ioctl.c dcache.c 
                         exec.c fcntl.c file.c file_table.c inode.c 
                         inotify.c locks.c namei.c namespace.c open.c 
                         pipe.c read_write.c select.c xattr.c 
        fs/adfs        : adfs.h 
        fs/affs        : inode.c 
        fs/autofs      : autofs_i.h dirhash.c inode.c 
        fs/bfs         : bfs.h dir.c file.c inode.c 
        fs/cifs        : connect.c dir.c 
        fs/cramfs      : inode.c uncompress.c 
        fs/devpts      : Makefile inode.c 
        fs/ext2        : ialloc.c inode.c super.c xattr.h 
                         xattr_security.c 
        fs/ext3        : ialloc.c inode.c super.c xattr.h 
                         xattr_security.c 
        fs/fat         : dir.c inode.c 
        fs/freevxfs    : vxfs_super.c 
        fs/hfs         : bnode.c catalog.c dir.c hfs.h hfs_fs.h inode.c 
                         mdb.c super.c trans.c 
        fs/hfsplus     : bnode.c hfsplus_fs.h options.c super.c 
        fs/hostfs      : hostfs.h hostfs_kern.c 
        fs/hpfs        : inode.c 
        fs/jbd         : checkpoint.c commit.c journal.c revoke.c 
                         transaction.c 
        fs/jffs        : inode-v23.c intrep.c 
        fs/jffs2       : file.c 
        fs/jfs         : acl.c inode.c jfs_acl.h jfs_filsys.h 
                         jfs_xattr.h namei.c super.c xattr.c 
        fs/lockd       : clntproc.c 
        fs/minix       : inode.c 
        fs/ncpfs       : inode.c 
        fs/nfs         : inode.c nfs3proc.c nfs4proc.c 
        fs/nfsd        : export.c nfs4idmap.c nfs4recover.c 
        fs/ntfs        : ChangeLog Makefile aops.c attrib.c attrib.h 
                         compress.c dir.c file.c index.c inode.c 
                         lcnalloc.c lcnalloc.h logfile.c logfile.h 
                         malloc.h mft.c runlist.c runlist.h super.c 
                         unistr.c 
        fs/proc        : array.c base.c generic.c inode.c task_mmu.c 
        fs/qnx4        : inode.c 
        fs/reiserfs    : inode.c journal.c super.c 
        fs/smbfs       : inode.c proc.c sock.c 
        fs/sysv        : inode.c 
        fs/udf         : inode.c 
        fs/ufs         : balloc.c ialloc.c inode.c truncate.c 
        fs/xfs         : Kconfig Makefile xfs_acl.c xfs_arch.h 
                         xfs_bmap.c xfs_bmap_btree.c xfs_bmap_btree.h 
                         xfs_buf_item.c xfs_dir_leaf.h xfs_dmapi.h 
                         xfs_extfree_item.c xfs_iget.c xfs_inode.c 
                         xfs_inode_item.c xfs_iomap.c xfs_log.c 
                         xfs_log.h xfs_log_priv.h xfs_log_recover.c 
                         xfs_qmops.c xfs_quota.h xfs_trans.c xfs_trans.h 
                         xfs_trans_ail.c xfs_trans_buf.c xfs_vfsops.c 
                         xfs_vnodeops.c 
        fs/xfs/linux-2.6: kmem.c kmem.h spin.h time.h xfs_aops.c 
                          xfs_buf.c xfs_buf.h xfs_file.c xfs_ioctl.c 
                          xfs_ioctl32.c xfs_iops.c xfs_linux.h xfs_lrw.c 
                          xfs_lrw.h xfs_super.c xfs_vfs.c xfs_vfs.h 
                          xfs_vnode.c xfs_vnode.h 
        fs/xfs/quota   : xfs_dquot.c xfs_dquot.h xfs_dquot_item.c 
                         xfs_qm.c xfs_qm.h xfs_qm_bhv.c 
                         xfs_qm_syscalls.c 
        fs/xfs/support : debug.c ktrace.c 
        include/acpi   : acconfig.h acdebug.h acdisasm.h acdispat.h 
                         acevents.h acexcep.h acglobal.h achware.h 
                         acinterp.h aclocal.h acmacros.h acnames.h 
                         acnamesp.h acobject.h acopcode.h acoutput.h 
                         acparser.h acpi.h acpi_bus.h acpi_drivers.h 
                         acpiosxf.h acpixf.h acresrc.h acstruct.h 
                         actables.h actbl.h actbl1.h actbl2.h actbl71.h 
                         actypes.h acutils.h amlcode.h amlresrc.h 
                         container.h pdc_intel.h processor.h 
        include/acpi/platform: acenv.h acgcc.h aclinux.h 
        include/asm-alpha: elf.h fcntl.h page.h pci.h socket.h 
                           spinlock.h types.h uaccess.h 
        include/asm-arm: cacheflush.h fcntl.h page.h pci.h socket.h 
                         spinlock.h types.h uaccess.h unistd.h 
        include/asm-arm/arch-ixp4xx: io.h platform.h 
        include/asm-arm/arch-omap: board-h4.h board-innovator.h 
                                   board-perseus2.h board-voiceblue.h 
                                   board.h cpu.h debug-macro.S dma.h 
                                   entry-macro.S gpio.h hardware.h io.h 
                                   irqs.h memory.h mux.h omap1510.h 
                                   omap16xx.h omap730.h pm.h 
                                   uncompress.h 
        include/asm-arm/arch-pxa: corgi.h hardware.h mmc.h pxa-regs.h 
                                  pxafb.h 
        include/asm-arm/arch-s3c2410: regs-clock.h regs-lcd.h 
        include/asm-arm/arch-sa1100: hardware.h 
        include/asm-arm/hardware: scoop.h 
        include/asm-arm/mach: irq.h time.h 
        include/asm-arm26: fcntl.h hardirq.h page.h socket.h types.h 
                           uaccess.h 
        include/asm-cris: fcntl.h irq.h page.h socket.h types.h 
                          uaccess.h 
        include/asm-frv: fcntl.h page.h socket.h types.h uaccess.h 
        include/asm-generic: pci.h pgtable.h sections.h tlb.h 
                             vmlinux.lds.h 
        include/asm-h8300: fcntl.h page.h socket.h types.h uaccess.h 
        include/asm-i386: acpi.h agp.h apic.h apicdef.h bugs.h 
                          checksum.h desc.h div64.h elf.h fcntl.h 
                          fixmap.h io_apic.h kdebug.h mmzone.h mpspec.h 
                          msr.h page.h pgtable-3level.h pgtable.h 
                          processor.h ptrace.h setup.h smp.h socket.h 
                          spinlock.h system.h thread_info.h timer.h 
                          topology.h types.h uaccess.h unistd.h xor.h 
        include/asm-i386/mach-default: mach_reboot.h 
        include/asm-i386/mach-es7000: mach_mpparse.h 
        include/asm-i386/mach-generic: mach_apic.h 
        include/asm-ia64: acpi-ext.h acpi.h compat.h elf.h fcntl.h 
                          hw_irq.h io.h iosapic.h irq.h kprobes.h mca.h 
                          mca_asm.h mmu.h mmu_context.h page.h pal.h 
                          pci.h pgtable.h processor.h ptrace.h rwsem.h 
                          socket.h spinlock.h system.h thread_info.h 
                          topology.h types.h uaccess.h unwind.h 
        include/asm-ia64/sn: addrs.h geo.h intr.h nodepda.h 
                             pcibus_provider_defs.h pda.h sn_sal.h 
        include/asm-ia64/sn/sn2: sn_hwperf.h 
        include/asm-m32r: checksum.h fcntl.h page.h socket.h spinlock.h 
                          types.h uaccess.h 
        include/asm-m68k: cacheflush.h fcntl.h page.h socket.h string.h 
                          types.h uaccess.h 
        include/asm-m68knommu: bitops.h cacheflush.h checksum.h 
                               coldfire.h m527xsim.h m528xsim.h 
                               mcfcache.h mcfdma.h mcfsim.h mcfuart.h 
                               page.h scatterlist.h system.h uaccess.h 
        include/asm-mips: asmmacro-32.h asmmacro-64.h compat.h page.h 
                          pci.h sim.h socket.h spinlock.h stackframe.h 
                          types.h uaccess.h 
        include/asm-mips/mach-ip27: topology.h 
        include/asm-parisc: assembly.h atomic.h bitops.h cacheflush.h 
                            compat.h fcntl.h irq.h page.h pci.h 
                            processor.h socket.h spinlock.h system.h 
                            types.h uaccess.h 
        include/asm-ppc: dma-mapping.h elf.h ibm4xx.h ibm_ocp.h irq.h 
                         kmap_types.h mpc8260.h mpc8xx.h mv64x60.h 
                         mv64x60_defs.h pci.h pmac_feature.h ppc_sys.h 
                         ptrace.h reg.h serial.h smp.h spinlock.h 
                         system.h types.h uaccess.h 
        include/asm-ppc64: abs_addr.h compat.h cputable.h eeh.h elf.h 
                           hvcall.h imalloc.h io.h iommu.h irq.h 
                           kprobes.h lmb.h lppaca.h machdep.h memory.h 
                           mmu.h naca.h page.h pci-bridge.h pci.h 
                           pgalloc.h pgtable.h plpar_wrappers.h pmc.h 
                           processor.h prom.h ptrace-common.h ptrace.h 
                           spinlock.h system.h types.h uaccess.h udbg.h 
                           vio.h 
        include/asm-s390: compat.h debug.h fcntl.h lowcore.h page.h 
                          socket.h spinlock.h types.h uaccess.h 
        include/asm-sh : fcntl.h irq.h page.h socket.h spinlock.h 
                         types.h uaccess.h 
        include/asm-sh64: fcntl.h page.h types.h uaccess.h 
        include/asm-sparc: fcntl.h page.h pgtable.h processor.h ptrace.h 
                           socket.h spinlock.h system.h types.h 
                           uaccess.h 
        include/asm-sparc64: atomic.h bitops.h compat.h cpudata.h 
                             fcntl.h hardirq.h io.h page.h pci.h 
                             pgtable.h processor.h socket.h spinlock.h 
                             system.h types.h uaccess.h 
        include/asm-um : mmu_context.h page.h pgalloc.h pgtable-2level.h 
                         pgtable-3level.h pgtable.h 
        include/asm-v850: fcntl.h page.h socket.h types.h uaccess.h 
        include/asm-x86_64: acpi.h apic.h apicdef.h bug.h calling.h 
                            checksum.h compat.h current.h desc.h 
                            dma-mapping.h dwarf2.h fcntl.h fixmap.h 
                            hardirq.h hw_irq.h io.h io_apic.h ipi.h 
                            irq.h kdebug.h local.h mmzone.h mpspec.h 
                            msr.h numa.h page.h pci.h pda.h pgalloc.h 
                            pgtable.h processor.h proto.h signal.h smp.h 
                            socket.h spinlock.h system.h timex.h 
                            tlbflush.h topology.h types.h uaccess.h 
                            vsyscall.h 
        include/asm-xtensa: atomic.h checksum.h delay.h fcntl.h io.h 
                            mmu_context.h page.h pci.h pgtable.h 
                            ptrace.h semaphore.h socket.h string.h 
                            system.h tlbflush.h types.h uaccess.h 
        include/linux  : 8250_pci.h acpi.h ata.h attribute_container.h 
                         bfs_fs.h bio.h blkdev.h capability.h chio.h 
                         compat.h cpu.h cpuset.h crypto.h dcache.h 
                         dmapool.h dmi.h efi.h elf.h etherdevice.h 
                         ethtool.h ext2_fs.h ext3_fs.h fb.h file.h 
                         firmware.h fs.h futex.h gfp.h hippidevice.h 
                         hugetlb.h hwmon-sysfs.h i2c-id.h i2c.h 
                         if_ether.h if_fc.h if_fddi.h if_frad.h 
                         if_hippi.h if_tr.h if_tun.h if_vlan.h igmp.h 
                         in.h in6.h init_task.h inotify.h input.h 
                         interrupt.h ioctl32.h ip.h ipmi.h ipv6.h irq.h 
                         isdn.h jbd.h jiffies.h klist.h kprobes.h 
                         libata.h linkage.h list.h mempolicy.h mii.h 
                         mmzone.h mod_devicetable.h msg.h mv643xx.h 
                         net.h netdevice.h netfilter.h 
                         netfilter_decnet.h netfilter_ipv4.h 
                         netfilter_ipv6.h netlink.h page-flags.h pci.h 
                         pci_ids.h pipe_fs_i.h pm.h pnp.h ptrace.h 
                         radix-tree.h random.h rcupdate.h reiserfs_fs.h 
                         rtnetlink.h sched.h security.h 
                         selinux_netlink.h sem.h serial.h serialP.h 
                         serial_8250.h serial_core.h skbuff.h slab.h 
                         socket.h sonypi.h sound.h spinlock.h swap.h 
                         swapops.h sysctl.h tcp.h time.h timer.h timex.h 
                         topology.h transport_class.h tty.h types.h 
                         usb.h usb_isp116x.h usbdevice_fs.h videodev.h 
                         videodev2.h vmalloc.h wireless.h writeback.h 
                         xfrm.h 
        include/linux/mmc: card.h host.h mmc.h protocol.h 
        include/linux/netfilter_ipv4: ip_conntrack.h ip_conntrack_core.h 
                                      ip_conntrack_helper.h 
                                      ip_conntrack_protocol.h 
                                      ip_nat_protocol.h ip_nat_rule.h 
                                      ip_tables.h ipt_LOG.h 
        include/linux/netfilter_ipv6: ip6_tables.h ip6t_LOG.h 
        include/linux/raid: bitmap.h linear.h md_k.h md_p.h raid1.h 
                            raid5.h 
        include/linux/sunrpc: cache.h 
        include/media  : audiochip.h id.h ir-common.h saa7146.h tuner.h 
                         tveeprom.h video-buf.h 
        include/net    : act_api.h addrconf.h af_unix.h arp.h ax25.h 
                         compat.h datalink.h dn.h icmp.h ieee80211.h 
                         inet_common.h ip.h ip6_route.h ip_fib.h ip_vs.h 
                         ipv6.h iw_handler.h llc.h neighbour.h netrom.h 
                         p8022.h pkt_cls.h psnap.h raw.h rawv6.h 
                         request_sock.h route.h sock.h tcp.h tcp_ecn.h 
                         transp_v6.h udp.h x25.h x25device.h xfrm.h 
        include/net/bluetooth: bluetooth.h hci.h hci_core.h rfcomm.h 
        include/net/irda: irlan_filter.h 
        include/net/sctp: constants.h 
        include/pcmcia : ds.h 
        include/scsi   : scsi_cmnd.h scsi_dbg.h scsi_device.h scsi_eh.h 
                         scsi_host.h scsi_request.h scsi_transport_fc.h 
                         scsi_transport_spi.h 
        include/sound  : ac97_codec.h ad1816a.h asound.h core.h cs46xx.h 
                         emu10k1.h gus.h pcm.h tea575x-tuner.h version.h 
                         ymfpci.h 
        include/video  : pmagb-b-fb.h sisfb.h w100fb.h 
        init           : Kconfig Makefile do_mounts.c main.c 
        ipc            : compat.c mqueue.c msg.c sem.c shm.c util.c 
                         util.h 
        kernel         : Makefile acct.c audit.c compat.c cpuset.c 
                         exit.c fork.c futex.c intermodule.c kprobes.c 
                         module.c params.c posix-timers.c printk.c 
                         ptrace.c rcupdate.c resource.c sched.c signal.c 
                         softirq.c spinlock.c sys.c sysctl.c timer.c 
                         workqueue.c 
        kernel/irq     : handle.c manage.c proc.c 
        kernel/power   : Kconfig disk.c main.c pm.c process.c swsusp.c 
        lib            : Kconfig Kconfig.debug Makefile dec_and_lock.c 
                         kernel_lock.c klist.c kobject_uevent.c 
                         radix-tree.c sort.c 
        mm             : Kconfig bootmem.c filemap.c hugetlb.c madvise.c 
                         memory.c mempolicy.c mmap.c mremap.c nommu.c 
                         oom_kill.c page-writeback.c page_alloc.c 
                         readahead.c rmap.c shmem.c slab.c sparse.c 
                         swap_state.c swapfile.c vmalloc.c vmscan.c 
        net            : Kconfig Makefile compat.c socket.c sysctl_net.c 
        net/802        : fc.c fddi.c hippi.c p8022.c p8023.c psnap.c 
                         sysctl_net_802.c 
        net/8021q      : vlan.h vlan_dev.c 
        net/appletalk  : aarp.c ddp.c 
        net/atm        : ioctl.c ipcommon.c mpc.c 
        net/ax25       : af_ax25.c ax25_addr.c ax25_ds_in.c 
                         ax25_ds_timer.c ax25_in.c ax25_ip.c 
                         ax25_route.c ax25_std_in.c ax25_std_timer.c 
                         ax25_subr.c ax25_uid.c 
        net/bluetooth  : hci_core.c hci_event.c hci_sock.c l2cap.c sco.c 
        net/bluetooth/rfcomm: core.c sock.c tty.c 
        net/bridge     : br_fdb.c 
        net/bridge/netfilter: ebt_mark.c ebt_ulog.c 
        net/core       : Makefile datagram.c dev.c dst.c ethtool.c 
                         filter.c flow.c neighbour.c netpoll.c pktgen.c 
                         request_sock.c rtnetlink.c skbuff.c sock.c 
                         sysctl_net_core.c utils.c wireless.c 
        net/decnet     : af_decnet.c dn_dev.c dn_nsp_in.c dn_nsp_out.c 
                         dn_route.c dn_table.c 
        net/decnet/netfilter: dn_rtmsg.c 
        net/econet     : af_econet.c 
        net/ethernet   : eth.c sysctl_net_ether.c 
        net/ipv4       : Kconfig Makefile af_inet.c ah4.c arp.c 
                         datagram.c devinet.c esp4.c fib_frontend.c 
                         fib_hash.c fib_lookup.h fib_semantics.c 
                         fib_trie.c icmp.c igmp.c inetpeer.c 
                         ip_forward.c ip_fragment.c ip_input.c 
                         ip_options.c ip_output.c ip_sockglue.c ipcomp.c 
                         ipconfig.c ipmr.c multipath_drr.c proc.c 
                         protocol.c raw.c route.c syncookies.c 
                         sysctl_net_ipv4.c tcp.c tcp_bic.c tcp_cong.c 
                         tcp_diag.c tcp_highspeed.c tcp_htcp.c 
                         tcp_hybla.c tcp_input.c tcp_ipv4.c 
                         tcp_minisocks.c tcp_output.c tcp_scalable.c 
                         tcp_timer.c tcp_vegas.c tcp_westwood.c udp.c 
                         xfrm4_state.c 
        net/ipv4/ipvs  : ip_vs_app.c ip_vs_conn.c ip_vs_core.c 
                         ip_vs_ctl.c ip_vs_lblc.c ip_vs_lblcr.c 
                         ip_vs_proto_tcp.c ip_vs_xmit.c 
        net/ipv4/netfilter: Kconfig Makefile ip_conntrack_amanda.c 
                            ip_conntrack_core.c ip_conntrack_ftp.c 
                            ip_conntrack_irc.c ip_conntrack_proto_icmp.c 
                            ip_conntrack_proto_sctp.c 
                            ip_conntrack_proto_tcp.c 
                            ip_conntrack_proto_udp.c 
                            ip_conntrack_standalone.c 
                            ip_conntrack_tftp.c ip_nat_core.c 
                            ip_nat_helper.c ip_nat_proto_icmp.c 
                            ip_nat_proto_tcp.c ip_nat_proto_udp.c 
                            ip_nat_proto_unknown.c ip_nat_rule.c 
                            ip_nat_snmp_basic.c ip_nat_standalone.c 
                            ip_queue.c ip_tables.c ipt_CLASSIFY.c 
                            ipt_CLUSTERIP.c ipt_CONNMARK.c ipt_DSCP.c 
                            ipt_ECN.c ipt_LOG.c ipt_MARK.c 
                            ipt_MASQUERADE.c ipt_NETMAP.c ipt_REJECT.c 
                            ipt_TCPMSS.c ipt_TOS.c ipt_ULOG.c 
                            ipt_connmark.c ipt_hashlimit.c ipt_mark.c 
                            ipt_owner.c 
        net/ipv6       : Makefile addrconf.c af_inet6.c ah6.c datagram.c 
                         esp6.c exthdrs.c icmp.c ip6_fib.c 
                         ip6_flowlabel.c ip6_input.c ip6_output.c 
                         ip6_tunnel.c ipcomp6.c ipv6_sockglue.c 
                         ipv6_syms.c ndisc.c raw.c reassembly.c route.c 
                         sit.c sysctl_net_ipv6.c tcp_ipv6.c udp.c 
                         xfrm6_tunnel.c 
        net/ipv6/netfilter: Kconfig Makefile ip6_queue.c ip6_tables.c 
                            ip6t_LOG.c ip6t_MARK.c ip6t_owner.c 
                            ip6t_rt.c 
        net/ipx        : af_ipx.c ipx_proc.c 
        net/irda       : af_irda.c irlap_frame.c irlmp.c irmod.c 
                         irqueue.c qos.c 
        net/irda/ircomm: ircomm_tty.c 
        net/irda/irlan : irlan_filter.c 
        net/irda/irnet : irnet.h irnet_ppp.c 
        net/lapb       : lapb_subr.c 
        net/llc        : af_llc.c llc_conn.c llc_core.c llc_if.c 
                         llc_input.c llc_sap.c 
        net/netlink    : af_netlink.c 
        net/netrom     : af_netrom.c nr_dev.c nr_in.c nr_loopback.c 
                         nr_route.c nr_subr.c nr_timer.c 
                         sysctl_net_netrom.c 
        net/packet     : af_packet.c 
        net/rose       : af_rose.c rose_dev.c rose_in.c rose_route.c 
                         rose_subr.c rose_timer.c 
        net/rxrpc      : transport.c 
        net/sched      : Kconfig act_api.c cls_api.c gact.c ipt.c 
                         mirred.c pedit.c police.c sch_api.c 
                         sch_generic.c simple.c 
        net/sctp       : endpointola.c input.c ipv6.c protocol.c 
                         sm_make_chunk.c socket.c sysctl.c ulpqueue.c 
        net/sunrpc     : cache.c rpc_pipe.c sched.c stats.c 
                         sunrpc_syms.c svcauth.c svcauth_unix.c 
                         svcsock.c 
        net/sunrpc/auth_gss: gss_krb5_crypto.c gss_krb5_mech.c 
                             gss_spkm3_mech.c svcauth_gss.c 
        net/unix       : af_unix.c garbage.c sysctl_net_unix.c 
        net/wanrouter  : af_wanpipe.c 
        net/x25        : af_x25.c x25_dev.c x25_in.c x25_subr.c 
                         x25_timer.c 
        net/xfrm       : xfrm_input.c xfrm_policy.c xfrm_user.c 
        scripts        : Makefile.build Makefile.clean Makefile.host 
                         Makefile.lib Makefile.modinst Makefile.modpost 
                         conmakehash.c kallsyms.c kernel-doc mkcompile_h 
                         reference_discarded.pl reference_init.pl 
                         ver_linux 
        scripts/kconfig: Makefile kxgettext.c lkc.h menu.c 
                         zconf.tab.c_shipped zconf.y 
        scripts/lxdialog: dialog.h inputbox.c 
        scripts/mod    : file2alias.c modpost.c sumversion.c 
        scripts/package: Makefile builddeb mkspec 
        security       : dummy.c seclvl.c 
        security/selinux: avc.c hooks.c netlink.c nlmsgtab.c 
        security/selinux/include: security.h 
        security/selinux/ss: avtab.c avtab.h conditional.c ebitmap.c 
                             ebitmap.h mls.c policydb.c policydb.h 
                             services.c 
        sound          : sound_core.c 
        sound/arm      : Makefile aaci.c aaci.h pxa2xx-ac97.c 
        sound/core     : memalloc.c memory.c pcm_compat.c pcm_lib.c 
                         pcm_native.c sound_oss.c timer.c 
        sound/core/oss : pcm_oss.c 
        sound/drivers/vx: vx_mixer.c vx_pcm.c 
        sound/isa      : Kconfig cmi8330.c opl3sa2.c 
        sound/isa/ad1816a: ad1816a.c ad1816a_lib.c 
        sound/isa/ad1848: ad1848_lib.c 
        sound/isa/cs423x: cs4231_lib.c 
        sound/isa/gus  : gus_io.c 
        sound/isa/sb   : sb16_csp.c sb16_main.c 
        sound/oss      : midibuf.c os.h soundcard.c sys_timer.c 
                         uart6850.c 
        sound/pci      : Kconfig atiixp.c cmipci.c ens1370.c fm801.c 
                         intel8x0.c rme32.c rme96.c via82xx.c 
                         via82xx_modem.c 
        sound/pci/ac97 : Makefile ac97_codec.c ac97_patch.c ac97_patch.h 
        sound/pci/ali5451: ali5451.c 
        sound/pci/au88x0: au88x0_pcm.c 
        sound/pci/ca0106: ca0106_main.c ca0106_mixer.c 
        sound/pci/cs46xx: cs46xx.c cs46xx_lib.c 
        sound/pci/emu10k1: emu10k1.c emu10k1_main.c emu10k1x.c emufx.c 
                           emumixer.c emupcm.c 
        sound/pci/hda  : Makefile hda_codec.c hda_codec.h hda_generic.c 
                         hda_intel.c hda_patch.h patch_analog.c 
                         patch_cmedia.c patch_realtek.c 
        sound/pci/ice1712: delta.c ice1712.c ice1724.c 
        sound/pci/korg1212: korg1212.c 
        sound/pci/nm256: nm256.c 
        sound/pci/rme9652: hdsp.c hdspm.c rme9652.c 
        sound/pci/trident: trident_main.c 
        sound/pci/ymfpci: ymfpci_main.c 
        sound/pcmcia/vx: vxpocket.c 
        sound/synth/emux: emux_synth.c 
        sound/usb      : usbaudio.c usbmidi.c 
        sound/usb/usx2y: usx2yhwdeppcm.c 
        usr            : Makefile 
Added files:
        .              : Kbuild 
        Documentation  : DMA-ISA-LPC.txt applying-patches.txt dcdbas.txt 
                         dell_rbu.txt 
        Documentation/RCU: NMI-RCU.txt rcuref.txt whatisRCU.txt 
        Documentation/connector: cn_test.c connector.txt 
        Documentation/fb/cyblafb: bugs credits documentation fb.modes 
                                  performance todo usage whycyblafb 
        Documentation/filesystems: files.txt fuse.txt relayfs.txt 
                                   v9fs.txt 
        Documentation/hwmon: w83792d 
        Documentation/input: appletouch.txt yealink.txt 
        Documentation/networking: README.ipw2100 README.ipw2200 cxgb.txt 
                                  phy.txt 
        Documentation/power: swsusp-dmcrypt.txt 
        Documentation/scsi: scsi_eh.txt 
        arch/arm/common: gic.c 
        arch/arm/mach-omap1: devices.c 
        arch/arm/mach-pxa: corgi_lcd.c 
        arch/arm/mach-s3c2410: mach-anubis.c 
        arch/arm/plat-omap: dmtimer.c sram-fn.S sram.c sram.h 
        arch/frv/kernel: asm-offsets.c 
        arch/i386/kernel: i8237.c 
        arch/ia64/kernel/cpufreq: Kconfig Makefile acpi-cpufreq.c 
        arch/ia64/sn/pci: tioce_provider.c 
        arch/m32r/kernel: asm-offsets.c 
        arch/m68k/lib  : string.c 
        arch/m68k/mm   : cache.c 
        arch/m68knommu/platform/523x: Makefile config.c 
        arch/m68knommu/platform/68328: head-de2.S timers.c 
        arch/m68knommu/platform/68360: head-ram.S head-rom.S 
        arch/m68knommu/platform/68VZ328: config.c 
        arch/mips/kernel: asm-offsets.c 
        arch/ppc/boot/simple: misc-ev64360.c 
        arch/ppc/configs: ev64360_defconfig 
        arch/ppc/platforms: ev64360.c ev64360.h 
        arch/ppc/syslib: ppc83xx_pci.h pq2_devices.c pq2_sys.c 
        arch/ppc64/boot: elf.h page.h ppc_asm.h prom.h stdio.h string.h 
        arch/ppc64/kernel: firmware.c iSeries_vio.c pSeries_vio.c 
                           udbg_16550.c udbg_scc.c 
        arch/sparc64/kernel: asm-offsets.c 
        arch/um/include: aio.h syscall.h 
        arch/um/kernel : asm-offsets.c syscall.c 
        arch/um/kernel/skas: syscall.c 
        arch/um/os-Linux: aio.c start_up.c tt.c 
        arch/v850/kernel: asm-offsets.c 
        drivers/acpi/parser: psloop.c 
        drivers/acpi/utilities: utcache.c utmutex.c utstate.c 
        drivers/char/drm: r300_cmdbuf.c r300_reg.h savage_bci.c 
                          savage_drm.h savage_drv.c savage_drv.h 
                          savage_state.c 
        drivers/char/watchdog: booke_wdt.c mpcore_wdt.c 
        drivers/connector: Kconfig Makefile cn_queue.c connector.c 
        drivers/firmware: dcdbas.c dcdbas.h dell_rbu.c 
        drivers/hwmon  : hdaps.c hwmon-vid.c hwmon.c w83792d.c 
        drivers/i2c/busses: i2c-pxa.c 
        drivers/infiniband/hw/mthca: mthca_srq.c mthca_wqe.h 
        drivers/input/mouse: trackpoint.c trackpoint.h 
        drivers/media/dvb/dvb-usb: vp702x-fe.c vp702x.c vp702x.h 
        drivers/media/video: rds.h saa6588.c 
        drivers/mfd    : Kconfig Makefile mcp-core.c mcp-sa11x0.c mcp.h 
                         ucb1x00-assabet.c ucb1x00-core.c ucb1x00-ts.c 
                         ucb1x00.h 
        drivers/net    : sis190.c spider_net.c spider_net.h 
                         spider_net_ethtool.c 
        drivers/net/chelsio: Makefile common.h cphy.h cpl5_cmd.h cxgb2.c 
                             elmer0.h espi.c espi.h gmac.h mv88x201x.c 
                             pm3393.c regs.h sge.c sge.h subr.c 
                             suni1x10gexp_regs.h 
        drivers/net/phy: Kconfig Makefile cicada.c davicom.c lxt.c 
                         marvell.c mdio_bus.c phy.c phy_device.c qsemi.c 
        drivers/net/tulip: uli526x.c 
        drivers/net/wireless: ipw2100.c ipw2100.h ipw2200.c ipw2200.h 
                              orinoco_nortel.c spectrum_cs.c 
        drivers/net/wireless/hostap: Kconfig Makefile hostap.c hostap.h 
                                     hostap_80211.h hostap_80211_rx.c 
                                     hostap_80211_tx.c hostap_ap.c 
                                     hostap_ap.h hostap_common.h 
                                     hostap_config.h hostap_cs.c 
                                     hostap_download.c hostap_hw.c 
                                     hostap_info.c hostap_ioctl.c 
                                     hostap_pci.c hostap_plx.c 
                                     hostap_proc.c hostap_wlan.h 
        drivers/pcmcia : omap_cf.c 
        drivers/scsi   : raid_class.c sata_mv.c scsi_transport_sas.c 
        drivers/usb/input: appletouch.c map_to_7segment.h yealink.c 
                           yealink.h 
        drivers/usb/misc/sisusbvga: sisusb_con.c sisusb_init.c 
                                    sisusb_init.h sisusb_struct.h 
        drivers/usb/mon: mon_dma.c 
        drivers/usb/net: asix.c cdc_ether.c cdc_subset.c gl620a.c 
                         net1080.c plusb.c rndis_host.c usbnet.h 
                         zaurus.c 
        drivers/usb/storage: onetouch.c onetouch.h 
        drivers/video  : cyblafb.c fbcvt.c s3c2410fb.c s3c2410fb.h 
        drivers/video/backlight: locomolcd.c 
        drivers/video/i810: i810-i2c.c 
        drivers/video/sis: initextlfb.c 
        drivers/w1     : w1_ds2433.c 
        fs/9p          : 9p.c 9p.h Makefile conv.c conv.h debug.h 
                         error.c error.h fid.c fid.h mux.c mux.h 
                         trans_fd.c trans_sock.c transport.h v9fs.c 
                         v9fs.h v9fs_vfs.h vfs_dentry.c vfs_dir.c 
                         vfs_file.c vfs_inode.c vfs_super.c 
        fs/fuse        : Makefile dev.c dir.c file.c fuse_i.h inode.c 
        fs/relayfs     : Makefile buffers.c buffers.h inode.c relay.c 
                         relay.h 
        fs/xfs         : Makefile-linux-2.6 
        fs/xfs/linux-2.6: xfs_aops.h 
        fs/xfs/quota   : Makefile Makefile-linux-2.6 
        include/asm-alpha: auxvec.h futex.h spinlock_types.h 
        include/asm-arm: auxvec.h futex.h spinlock_types.h 
        include/asm-arm/arch-omap: dmtimer.h dsp.h dsp_common.h 
                                   mtd-xip.h omap24xx.h serial.h 
        include/asm-arm/arch-pxa: i2c.h 
        include/asm-arm/arch-s3c2410: anubis-cpld.h anubis-irq.h 
                                      anubis-map.h fb.h 
        include/asm-arm/arch-sa1100: mcp.h 
        include/asm-arm/hardware: gic.h 
        include/asm-arm26: auxvec.h futex.h 
        include/asm-cris: auxvec.h futex.h 
        include/asm-frv: auxvec.h futex.h 
        include/asm-generic: fcntl.h page.h 
        include/asm-h8300: auxvec.h futex.h 
        include/asm-i386: auxvec.h futex.h numa.h spinlock_types.h 
        include/asm-ia64: auxvec.h futex.h spinlock_types.h 
        include/asm-ia64/sn: sn_feature_sets.h tioce.h tioce_provider.h 
        include/asm-m32r: auxvec.h futex.h spinlock_types.h 
        include/asm-m68k: auxvec.h futex.h 
        include/asm-m68knommu: auxvec.h futex.h m523xsim.h 
        include/asm-mips: auxvec.h futex.h spinlock_types.h 
        include/asm-parisc: auxvec.h futex.h spinlock_types.h 
        include/asm-powerpc: 8253pit.h agp.h bugs.h cputime.h div64.h 
                             emergency-restart.h errno.h fcntl.h ioctl.h 
                             ioctls.h ipc.h linkage.h local.h 
                             mc146818rtc.h mman.h module.h msgbuf.h 
                             namei.h param.h percpu.h poll.h resource.h 
                             sembuf.h setup.h shmbuf.h shmparam.h 
                             siginfo.h socket.h sockios.h string.h 
                             termbits.h termios.h timex.h topology.h 
                             unaligned.h user.h xor.h 
        include/asm-ppc: auxvec.h futex.h spinlock_types.h 
        include/asm-ppc64: auxvec.h firmware.h futex.h oprofile_impl.h 
                           spinlock_types.h 
        include/asm-s390: auxvec.h futex.h spinlock_types.h 
        include/asm-sh : auxvec.h futex.h spinlock_types.h 
        include/asm-sh64: auxvec.h futex.h 
        include/asm-sparc: auxvec.h futex.h spinlock_types.h 
        include/asm-sparc64: auxvec.h futex.h sfafsr.h spinlock_types.h 
        include/asm-um : auxvec.h futex.h spinlock_types.h 
        include/asm-v850: auxvec.h futex.h 
        include/asm-x86_64: auxvec.h futex.h spinlock_types.h 
        include/asm-xtensa: auxvec.h 
        include/linux  : auxvec.h bit_spinlock.h connector.h crc16.h 
                         dccp.h fuse.h hwmon-vid.h hwmon.h i2c-isa.h 
                         i2c-pxa.h inet_diag.h pci_regs.h phy.h 
                         raid_class.h rcuref.h relayfs_fs.h 
                         spinlock_api_smp.h spinlock_api_up.h 
                         spinlock_types.h spinlock_types_up.h 
                         spinlock_up.h 
        include/linux/netfilter: nfnetlink.h nfnetlink_conntrack.h 
                                 nfnetlink_log.h nfnetlink_queue.h 
        include/linux/netfilter_ipv4: ipt_NFQUEUE.h ipt_TTL.h 
                                      ipt_connbytes.h ipt_dccp.h 
                                      ipt_string.h 
        include/linux/netfilter_ipv6: ip6t_HL.h ip6t_REJECT.h 
        include/net    : ieee80211_crypt.h inet6_hashtables.h 
                         inet_connection_sock.h inet_hashtables.h 
                         inet_timewait_sock.h tcp_states.h 
        include/rdma   : ib_cache.h ib_cm.h ib_fmr_pool.h ib_mad.h 
                         ib_pack.h ib_sa.h ib_smi.h ib_user_cm.h 
                         ib_user_mad.h ib_user_verbs.h ib_verbs.h 
        include/scsi   : scsi_transport_sas.h 
        include/video  : cyblafb.h 
        kernel         : softlockup.c 
        lib            : crc16.c semaphore-sleepers.c spinlock_debug.c 
                         ts_bm.c 
        net/dccp       : Kconfig Makefile ccid.c ccid.h dccp.h diag.c 
                         input.c ipv4.c minisocks.c options.c output.c 
                         proto.c timer.c 
        net/dccp/ccids : Kconfig Makefile ccid3.c ccid3.h 
        net/dccp/ccids/lib: Makefile loss_interval.c loss_interval.h 
                            packet_history.c packet_history.h tfrc.h 
                            tfrc_equation.c 
        net/ieee80211  : Kconfig Makefile ieee80211_crypt.c 
                         ieee80211_crypt_ccmp.c ieee80211_crypt_tkip.c 
                         ieee80211_crypt_wep.c ieee80211_module.c 
                         ieee80211_rx.c ieee80211_tx.c ieee80211_wx.c 
        net/ipv4       : inet_connection_sock.c inet_diag.c 
                         inet_hashtables.c inet_timewait_sock.c 
                         netfilter.c 
        net/ipv4/netfilter: ip_conntrack_netbios_ns.c 
                            ip_conntrack_netlink.c ipt_NFQUEUE.c 
                            ipt_TTL.c ipt_connbytes.c ipt_dccp.c 
                            ipt_string.c 
        net/ipv6       : inet6_hashtables.c netfilter.c 
        net/ipv6/netfilter: ip6t_HL.c ip6t_NFQUEUE.c ip6t_REJECT.c 
        net/netfilter  : Kconfig Makefile core.c nf_internals.h nf_log.c 
                         nf_queue.c nf_sockopt.c nfnetlink.c 
                         nfnetlink_log.c nfnetlink_queue.c 
        scripts        : Kbuild.include setlocalversion 
        scripts/package: buildtar 
        sound/pci/ac97 : ac97_bus.c 
        sound/pci/hda  : patch_si3054.c 
        usr            : Kconfig 
Removed files:
        arch/ia64/kernel: domain.c 
        arch/m68k/lib  : memcmp.c memcpy.c memset.c 
        arch/m68knommu/platform/68VZ328/de2: config.c 
        arch/m68knommu/platform/68VZ328/ucdimm: config.c 
        arch/mips/kernel: offset.c 
        arch/parisc/lib: debuglocks.c 
        arch/ppc/boot/utils: addRamDisk.c 
        arch/ppc/configs: SM850_defconfig SPD823TS_defconfig 
                          adir_defconfig ash_defconfig beech_defconfig 
                          cedar_defconfig k2_defconfig mcpn765_defconfig 
                          menf1_defconfig oak_defconfig pcore_defconfig 
                          rainier_defconfig redwood_defconfig 
        arch/ppc/kernel: find_name.c 
        arch/ppc/platforms: adir.h adir_pci.c adir_pic.c adir_setup.c 
                            k2.c k2.h mcpn765.c mcpn765.h pcore.c 
                            pcore.h spd8xx.h 
        arch/ppc/platforms/4xx: ash.c ash.h oak.c oak.h oak_setup.h 
        arch/ppc64/boot: ppc32-types.h 
        arch/ppc64/oprofile: op_impl.h 
        arch/sparc/lib : debuglocks.c 
        arch/sparc64/lib: debuglocks.c 
        arch/um        : Kconfig_char Kconfig_i386 Kconfig_net 
                         Kconfig_scsi Kconfig_x86_64 
        arch/um/include: syscall_user.h 
        arch/um/kernel : process.c syscall_user.c 
        arch/um/kernel/skas: syscall_kern.c syscall_user.c 
        arch/v850/kernel: asm-consts.c 
        arch/x86_64/kernel: msr.c semaphore.c 
        drivers/bluetooth: hci_vhci.h 
        drivers/char/drm: gamma_context.h gamma_dma.c gamma_drm.h 
                          gamma_drv.c gamma_drv.h gamma_lists.h 
                          gamma_lock.h gamma_old_dma.h 
        drivers/i2c    : i2c-sensor-detect.c i2c-sensor-vid.c 
        drivers/infiniband/include: ib_cache.h ib_cm.h ib_fmr_pool.h 
                                    ib_mad.h ib_pack.h ib_sa.h ib_smi.h 
                                    ib_user_cm.h ib_user_mad.h 
                                    ib_user_verbs.h ib_verbs.h 
        drivers/net    : iseries_veth.h 
        drivers/net/wireless: ieee802_11.h 
        drivers/pci    : gen-devlist.c names.c 
        drivers/pci/hotplug: rpaphp_vio.c 
        fs/devpts      : xattr_security.c 
        fs/umsdos      : notes 
        include/asm-alpha: hdreg.h 
        include/asm-arm: hdreg.h 
        include/asm-arm26: hdreg.h 
        include/asm-generic: hdreg.h 
        include/asm-h8300: hdreg.h 
        include/asm-i386: hdreg.h 
        include/asm-ia64: hdreg.h 
        include/asm-m32r: hdreg.h 
        include/asm-m68k: hdreg.h 
        include/asm-m68knommu: hdreg.h 
        include/asm-parisc: hdreg.h 
        include/asm-ppc: 8253pit.h agp.h bugs.h cputime.h div64.h 
                         emergency-restart.h errno.h fcntl.h hdreg.h 
                         ioctl.h ioctls.h ipc.h linkage.h local.h 
                         mc146818rtc.h mman.h module.h msgbuf.h namei.h 
                         param.h percpu.h poll.h resource.h sembuf.h 
                         setup.h shmbuf.h shmparam.h siginfo.h socket.h 
                         sockios.h string.h termbits.h termios.h timex.h 
                         topology.h unaligned.h user.h xor.h 
        include/asm-ppc64: 8253pit.h agp.h bugs.h cputime.h div64.h 
                           emergency-restart.h errno.h fcntl.h hdreg.h 
                           ioctl.h ioctls.h ipc.h linkage.h local.h 
                           mc146818rtc.h mman.h module.h msgbuf.h 
                           namei.h param.h percpu.h poll.h resource.h 
                           segment.h sembuf.h setup.h shmbuf.h 
                           shmparam.h siginfo.h socket.h sockios.h 
                           string.h termbits.h termios.h timex.h 
                           topology.h unaligned.h user.h xor.h 
        include/asm-sh : hdreg.h 
        include/asm-sh64: hdreg.h 
        include/asm-sparc: hdreg.h segment.h 
        include/asm-sparc64: hdreg.h segment.h 
        include/asm-um : hdreg.h 
        include/asm-x86_64: hdreg.h 
        include/asm-xtensa: hdreg.h page.h.n 
        include/linux  : i2c-sensor.h i2c-vid.h tcp_diag.h 
        include/linux/netfilter_ipv4: ip_logging.h 
        include/linux/netfilter_ipv6: ip6_logging.h 
        net/core       : netfilter.c 
        sound/oss      : skeleton.c 

Log message:
        Merge with Linux 2.6.14-rc1.

diff -urN linux/Kbuild linux/Kbuild
--- linux/Kbuild        1970/01/01 00:00:00
+++ linux/Kbuild        2005-09-15 09:52:34.802754000 +0100     1.1
@@ -0,0 +1,49 @@
+#
+# Kbuild for top-level directory of the kernel
+# This file takes care of the following:
+# 1) Generate asm-offsets.h
+
+#####
+# 1) Generate asm-offsets.h
+#
+
+offsets-file := include/asm-$(ARCH)/asm-offsets.h
+
+always  := $(offsets-file)
+targets := $(offsets-file)
+targets += arch/$(ARCH)/kernel/asm-offsets.s
+
+# Default sed regexp - multiline due to syntax constraints
+define sed-y
+       "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; 
s:->::; p;}"
+endef
+# Override default regexp for specific architectures
+sed-$(CONFIG_MIPS) := "/^@@@/s///p"
+
+quiet_cmd_offsets = GEN     $@
+define cmd_offsets
+       mkdir -p $(dir $@); \
+       cat $< | \
+       (set -e; \
+        echo "#ifndef __ASM_OFFSETS_H__"; \
+        echo "#define __ASM_OFFSETS_H__"; \
+        echo "/*"; \
+        echo " * DO NOT MODIFY."; \
+        echo " *"; \
+        echo " * This file was generated by $(srctree)/Kbuild"; \
+        echo " *"; \
+        echo " */"; \
+        echo ""; \
+        sed -ne $(sed-y); \
+        echo ""; \
+        echo "#endif" ) > $@
+endef
+
+# We use internal kbuild rules to avoid the "is up to date" message from make
+arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
+       $(Q)mkdir -p $(dir $@)
+       $(call if_changed_dep,cc_s_c)
+
+$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
+       $(call cmd,offsets)
+
diff -urN linux/COPYING linux/COPYING
--- linux/COPYING       2002/08/18 08:59:39     1.6
+++ linux/COPYING       2005/09/15 08:52:34     1.7
@@ -18,7 +18,7 @@
                       Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+                       51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
@@ -321,7 +321,7 @@
 
     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
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 
 Also add information on how to contact you by electronic and paper mail.
diff -urN linux/MAINTAINERS linux/MAINTAINERS
--- linux/MAINTAINERS   2005/08/24 16:22:47     1.187
+++ linux/MAINTAINERS   2005/09/15 08:52:34     1.188
@@ -116,6 +116,12 @@
 L:     linux-hams@vger.kernel.org
 S:     Maintained
 
+YEALINK PHONE DRIVER
+P:     Henk Vergonet
+M:     Henk.Vergonet@gmail.com
+L:     usbb2k-api-dev@nongnu.org
+S:     Maintained
+
 8139CP 10/100 FAST ETHERNET DRIVER
 P:     Jeff Garzik
 M:     jgarzik@pobox.com
@@ -202,13 +208,6 @@
 M:     colin@colino.net
 S:     Maintained
 
-ADVANSYS SCSI DRIVER
-P:     Bob Frey
-M:     linux@advansys.com
-W:     http://www.advansys.com/linux.html
-L:     linux-scsi@vger.kernel.org
-S:     Maintained
-
 AEDSP16 DRIVER
 P:     Riccardo Facchetti
 M:     fizban@tin.it
@@ -627,6 +626,12 @@
 W:     http://www.arm.linux.org.uk/
 S:     Maintained
 
+CYBLAFB FRAMEBUFFER DRIVER
+P:     Knut Petersen
+M:     Knut_Petersen@t-online.de
+L:     linux-fbdev-devel@lists.sourceforge.net
+S:     Maintained
+
 CYCLADES 2X SYNC CARD DRIVER
 P:     Arnaldo Carvalho de Melo
 M:     acme@conectiva.com.br
@@ -696,6 +701,11 @@
 W:     http://www.debian.org/~dz/i8k/
 S:     Maintained
 
+DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas)
+P:     Doug Warzecha
+M:     Douglas_Warzecha@dell.com
+S:     Maintained
+
 DEVICE-MAPPER
 P:     Alasdair Kergon
 L:     dm-devel@redhat.com
@@ -824,6 +834,13 @@
 W:     http://sourceforge.net/projects/emu10k1/
 S:     Maintained
 
+EMULEX LPFC FC SCSI DRIVER
+P:      James Smart
+M:      james.smart@emulex.com
+L:      linux-scsi@vger.kernel.org
+W:      http://sourceforge.net/projects/lpfcxxxx
+S:      Supported
+
 EPSON 1355 FRAMEBUFFER DRIVER
 P:     Christopher Hoover
 M:     ch@murgatroid.com, ch@hpl.hp.com
@@ -879,7 +896,7 @@
 
 FILESYSTEMS (VFS and infrastructure)
 P:     Alexander Viro
-M:     viro@parcelfarce.linux.theplanet.co.uk
+M:     viro@zeniv.linux.org.uk
 S:     Maintained
 
 FIRMWARE LOADER (request_firmware)
@@ -914,6 +931,13 @@
 W:     http://sourceforge.net/projects/ftape
 S:     Orphan
 
+FUSE: FILESYSTEM IN USERSPACE
+P:     Miklos Szeredi
+M:     miklos@szeredi.hu
+L:     fuse-devel@lists.sourceforge.net
+W:     http://fuse.sourceforge.net/
+S:     Maintained
+
 FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit)
 P:     Rik Faith
 M:     faith@cs.unc.edu
@@ -933,6 +957,20 @@
 W:     http://www.kernel.org/pub/linux/utils/net/hdlc/
 S:     Maintained
 
+HARDWARE MONITORING
+P:     Jean Delvare
+M:     khali@linux-fr.org
+L:     lm-sensors@lm-sensors.org
+W:     http://www.lm-sensors.nu/
+S:     Maintained
+
+HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER
+P:     Robert Love
+M:     rlove@rlove.org
+M:     linux-kernel@vger.kernel.org
+W:     http://www.kernel.org/pub/linux/kernel/people/rml/hdaps/
+S:     Maintained
+
 HARMONY SOUND DRIVER
 P:     Kyle McMartin
 M:     kyle@parisc-linux.org
@@ -991,6 +1029,13 @@
 L:     iss_storagedev@hp.com
 S:     Supported
  
+HOST AP DRIVER
+P:     Jouni Malinen
+M:     jkmaline@cc.hut.fi
+L:     hostap@shmoo.com
+W:     http://hostap.epitest.fi/
+S:     Maintained
+
 HP100: Driver for HP 10/100 Mbit/s Voice Grade Network Adapter Series
 P:     Jaroslav Kysela
 M:     perex@suse.cz
@@ -1007,7 +1052,7 @@
 M:     wli@holomorphy.com
 S:     Maintained
 
-I2C AND SENSORS DRIVERS
+I2C SUBSYSTEM
 P:     Greg Kroah-Hartman
 M:     greg@kroah.com
 P:     Jean Delvare
@@ -1794,13 +1839,6 @@
 L:     linux-abi-devel@lists.sourceforge.net
 S:     Maintained
 
-PCI ID DATABASE
-P:     Martin Mares
-M:     mj@ucw.cz
-L:     pciids-devel@lists.sourceforge.net
-W:     http://pciids.sourceforge.net/
-S:     Maintained
-
 PCI SOUND DRIVERS (ES1370, ES1371 and SONICVIBES)
 P:     Thomas Sailer
 M:     sailer@ife.ee.ethz.ch
@@ -1953,7 +1991,6 @@
 
 ROCKETPORT DRIVER
 P:     Comtrol Corp.
-M:     support@comtrol.com
 W:     http://www.comtrol.com
 S:     Maintained
 
@@ -2092,6 +2129,12 @@
 W:     http://www.simtec.co.uk/products/EB2410ITX/
 S:     Supported
 
+SIS 190 ETHERNET DRIVER
+P:     Francois Romieu
+M:     romieu@fr.zoreil.com
+L:     netdev@vger.kernel.org
+S:     Maintained
+
 SIS 5513 IDE CONTROLLER DRIVER
 P:     Lionel Bouton
 M:     Lionel.Bouton@inet6.fr
@@ -2637,11 +2680,6 @@
 UCLINUX (AND M68KNOMMU)
 P:     Greg Ungerer
 M:     gerg@uclinux.org
-M:     gerg@snapgear.com
-P:     David McCullough
-M:     davidm@snapgear.com
-P:     D. Jeff Dionne (created first uClinux port)
-M:     jeff@uclinux.org
 W:     http://www.uclinux.org/
 L:     uclinux-dev@uclinux.org  (subscribers-only)
 S:     Maintained
@@ -2666,6 +2704,17 @@
 W:     http://rio500.sourceforge.net
 S:     Maintained
 
+V9FS FILE SYSTEM
+P:      Eric Van Hensbergen
+M:      ericvh@gmail.com
+P:      Ron Minnich
+M:      rminnich@lanl.gov
+P:      Latchesar Ionkov
+M:      lucho@ionkov.net
+L:      v9fs-developer@lists.sourceforge.net
+W:      http://v9fs.sf.net
+S:      Maintained
+
 VIDEO FOR LINUX
 P:     Mauro Carvalho Chehab
 M:     mchehab@brturbo.com.br
diff -urN linux/Makefile linux/Makefile
--- linux/Makefile      2005/08/29 16:15:19     1.262
+++ linux/Makefile      2005/09/15 08:52:34     1.263
@@ -1,8 +1,8 @@
 VERSION = 2
 PATCHLEVEL = 6
-SUBLEVEL = 13
-EXTRAVERSION =
-NAME=Woozy Numbat
+SUBLEVEL = 14
+EXTRAVERSION =-rc1
+NAME=Affluent Albatross
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
@@ -109,10 +109,9 @@
 .PHONY: $(MAKECMDGOALS)
 
 $(filter-out _all,$(MAKECMDGOALS)) _all:
-       $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT)         \
-       KBUILD_SRC=$(CURDIR)         KBUILD_VERBOSE=$(KBUILD_VERBOSE)   \
-       KBUILD_CHECK=$(KBUILD_CHECK) KBUILD_EXTMOD="$(KBUILD_EXTMOD)"   \
-        -f $(CURDIR)/Makefile $@
+       $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
+       KBUILD_SRC=$(CURDIR) \
+       KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@
 
 # Leave processing to above invocation of make
 skip-makefile := 1
@@ -231,7 +230,7 @@
   KBUILD_MODULES := 1
 endif
 
-export KBUILD_MODULES KBUILD_BUILTIN KBUILD_VERBOSE
+export KBUILD_MODULES KBUILD_BUILTIN
 export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
 
 # Beautify output
@@ -307,6 +306,9 @@
 # Look for make include files relative to root of kernel src
 MAKEFLAGS += --include-dir=$(srctree)
 
+# We need some generic definitions
+include  $(srctree)/scripts/Kbuild.include
+
 # For maximum performance (+ possibly random breakage, uncomment
 # the following)
 
@@ -330,7 +332,7 @@
 PERL           = perl
 CHECK          = sparse
 
-CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__
+CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ $(CF)
 MODFLAGS       = -DMODULE
 CFLAGS_MODULE   = $(MODFLAGS)
 AFLAGS_MODULE   = $(MODFLAGS)
@@ -346,7 +348,7 @@
 
 CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
 
-CFLAGS                 := -Wall -Wstrict-prototypes -Wno-trigraphs \
+CFLAGS                 := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
                   -fno-strict-aliasing -fno-common \
                   -ffreestanding
 AFLAGS         := -D__ASSEMBLY__
@@ -365,15 +367,10 @@
 # even be read-only.
 export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword 
$(KBUILD_EXTMOD))/).tmp_versions
 
-# The temporary file to save gcc -MD generated dependencies must not
-# contain a comma
-comma := ,
-depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
-
 # Files to ignore in find ... statements
 
-RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS 
-o -name .pc \) -prune -o
-RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude 
CVS --exclude .pc
+RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS 
-o -name .pc -o -name .hg \) -prune -o
+RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude 
CVS --exclude .pc --exclude .hg
 
 # ===========================================================================
 # Rules shared between *config targets and build targets
@@ -383,6 +380,9 @@
 scripts_basic:
        $(Q)$(MAKE) $(build)=scripts/basic
 
+# To avoid any implicit rule to kick in, define an empty command.
+scripts/basic/%: scripts_basic ;
+
 .PHONY: outputmakefile
 # outputmakefile generate a Makefile to be placed in output directory, if
 # using a seperate output directory. This allows convinient use
@@ -445,9 +445,8 @@
 include $(srctree)/arch/$(ARCH)/Makefile
 export KBUILD_DEFCONFIG
 
-config: scripts_basic outputmakefile FORCE
-       $(Q)$(MAKE) $(build)=scripts/kconfig $@
-%config: scripts_basic outputmakefile FORCE
+config %config: scripts_basic outputmakefile FORCE
+       $(Q)mkdir -p include/linux
        $(Q)$(MAKE) $(build)=scripts/kconfig $@
 
 else
@@ -490,6 +489,7 @@
 # If .config is newer than include/linux/autoconf.h, someone tinkered
 # with it and forgot to run make oldconfig
 include/linux/autoconf.h: .config
+       $(Q)mkdir -p include/linux
        $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
 else
 # Dummy target needed, because used as prerequisite
@@ -549,6 +549,26 @@
 # images. Default is /boot, but you can set it to other values
 export INSTALL_PATH ?= /boot
 
+# If CONFIG_LOCALVERSION_AUTO is set, we automatically perform some tests
+# and try to determine if the current source tree is a release tree, of any 
sort,
+# or if is a pure development tree.
+#
+# A 'release tree' is any tree with a git TAG associated
+# with it.  The primary goal of this is to make it safe for a native
+# git/CVS/SVN user to build a release tree (i.e, 2.6.9) and also to
+# continue developing against the current Linus tree, without having the Linus
+# tree overwrite the 2.6.9 tree when installed.
+#
+# Currently, only git is supported.
+# Other SCMs can edit scripts/setlocalversion and add the appropriate
+# checks as needed.
+
+
+ifdef CONFIG_LOCALVERSION_AUTO
+       localversion-auto := $(shell $(PERL) $(srctree)/scripts/setlocalversion 
$(srctree))
+       LOCALVERSION := $(LOCALVERSION)$(localversion-auto)
+endif
+
 #
 # INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
 # relocations required by build roots.  This is not defined in the
@@ -622,8 +642,13 @@
 # Generate new vmlinux version
 quiet_cmd_vmlinux_version = GEN     .version
       cmd_vmlinux_version = set -e;                     \
-       . $(srctree)/scripts/mkversion > .tmp_version;  \
-       mv -f .tmp_version .version;                    \
+       if [ ! -r .version ]; then                      \
+         rm -f .version;                               \
+         echo 1 >.version;                             \
+       else                                            \
+         mv .version .old_version;                     \
+         expr 0$$(cat .old_version) + 1 >.version;     \
+       fi;                                             \
        $(MAKE) $(build)=init
 
 # Generate System.map
@@ -689,8 +714,10 @@
 
 # Update vmlinux version before link
 # Use + in front of this rule to silent warning about make -j1
+# First command is ':' to allow us to use + in front of this rule
 cmd_ksym_ld = $(cmd_vmlinux__)
 define rule_ksym_ld
+       : 
        +$(call cmd,vmlinux_version)
        $(call cmd,vmlinux__)
        $(Q)echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd
@@ -720,11 +747,22 @@
 # Needs to visit scripts/ before $(KALLSYMS) can be used.
 $(KALLSYMS): scripts ;
 
+# Generate some data for debugging strange kallsyms problems
+debug_kallsyms: .tmp_map$(last_kallsyms)
+
+.tmp_map%: .tmp_vmlinux% FORCE
+       ($(OBJDUMP) -h $< | $(AWK) '/^ +[0-9]/{print $$4 " 0 " $$2}'; $(NM) $<) 
| sort > $@
+
+.tmp_map3: .tmp_map2
+
+.tmp_map2: .tmp_map1
+
 endif # ifdef CONFIG_KALLSYMS
 
 # vmlinux image - including updated kernel symbols
 vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
        $(call if_changed_rule,vmlinux__)
+       $(Q)rm -f .old_version
 
 # The actual objects are generated when descending, 
 # make sure no implicit rule kicks in
@@ -737,25 +775,30 @@
 # Error messages still appears in the original language
 
 .PHONY: $(vmlinux-dirs)
-$(vmlinux-dirs): prepare-all scripts
+$(vmlinux-dirs): prepare scripts
        $(Q)$(MAKE) $(build)=$@
 
 # Things we need to do before we recursively start building the kernel
-# or the modules are listed in "prepare-all".
-# A multi level approach is used. prepare1 is updated first, then prepare0.
-# prepare-all is the collection point for the prepare targets.
+# or the modules are listed in "prepare".
+# A multi level approach is used. prepareN is processed before prepareN-1.
+# archprepare is used in arch Makefiles and when processed asm symlink,
+# version.h and scripts_basic is processed / created.
+
+# Listed in dependency order
+.PHONY: prepare archprepare prepare0 prepare1 prepare2 prepare3
 
-.PHONY: prepare-all prepare prepare0 prepare1 prepare2
+# prepare-all is deprecated, use prepare as valid replacement
+.PHONY: prepare-all
 
-# prepare2 is used to check if we are building in a separate output directory,
+# prepare3 is used to check if we are building in a separate output directory,
 # and if so do:
 # 1) Check that make has not been executed in the kernel src $(srctree)
 # 2) Create the include2 directory, used for the second asm symlink
 
-prepare2:
+prepare3:
 ifneq ($(KBUILD_SRC),)
        @echo '  Using $(srctree) as source for kernel'
-       $(Q)if [ -h $(srctree)/include/asm -o -f $(srctree)/.config ]; then \
+       $(Q)if [ -f $(srctree)/.config ]; then \
                echo "  $(srctree) is not clean, please run 'make mrproper'";\
                echo "  in the '$(srctree)' directory.";\
                /bin/false; \
@@ -764,17 +807,23 @@
        $(Q)ln -fsn $(srctree)/include/asm-$(ARCH) include2/asm
 endif
 
-# prepare1 creates a makefile if using a separate output directory
-prepare1: prepare2 outputmakefile
+# prepare2 creates a makefile if using a separate output directory
+prepare2: prepare3 outputmakefile
 
-prepare0: prepare1 include/linux/version.h include/asm include/config/MARKER
+prepare1: prepare2 include/linux/version.h include/asm \
+                   include/config/MARKER
 ifneq ($(KBUILD_MODULES),)
        $(Q)rm -rf $(MODVERDIR)
        $(Q)mkdir -p $(MODVERDIR)
 endif
 
+archprepare: prepare1 scripts_basic
+
+prepare0: archprepare FORCE
+       $(Q)$(MAKE) $(build)=.
+
 # All the preparing..
-prepare-all: prepare0 prepare
+prepare prepare-all: prepare0
 
 #      Leave this as default for preprocessing vmlinux.lds.S, which is now
 #      done in arch/$(ARCH)/kernel/Makefile
@@ -813,7 +862,7 @@
 
 #      Split autoconf.h into include/linux/config/*
 
-include/config/MARKER: include/linux/autoconf.h
+include/config/MARKER: scripts/basic/split-include include/linux/autoconf.h
        @echo '  SPLIT   include/linux/autoconf.h -> include/config/*'
        @scripts/basic/split-include include/linux/autoconf.h include/config
        @touch $@
@@ -865,7 +914,7 @@
 
 # Target to prepare building external modules
 .PHONY: modules_prepare
-modules_prepare: prepare-all scripts
+modules_prepare: prepare scripts
 
 # Target to install modules
 .PHONY: modules_install
@@ -873,7 +922,7 @@
 
 .PHONY: _modinst_
 _modinst_:
-       @if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \
+       @if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \
                echo "Warning: you may need to install module-init-tools"; \
                echo "See 
http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\
                sleep 1; \
@@ -917,26 +966,6 @@
 
 endif # CONFIG_MODULES
 
-# Generate asm-offsets.h 
-# ---------------------------------------------------------------------------
-
-define filechk_gen-asm-offsets
-       (set -e; \
-        echo "#ifndef __ASM_OFFSETS_H__"; \
-        echo "#define __ASM_OFFSETS_H__"; \
-        echo "/*"; \
-        echo " * DO NOT MODIFY."; \
-        echo " *"; \
-        echo " * This file was generated by arch/$(ARCH)/Makefile"; \
-        echo " *"; \
-        echo " */"; \
-        echo ""; \
-        sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* 
\3 */:; s:->::; p;}"; \
-        echo ""; \
-        echo "#endif" )
-endef
-
-
 ###
 # Cleaning is done on three levels.
 # make clean     Delete most generated files
@@ -959,7 +988,7 @@
 #
 clean: rm-dirs  := $(CLEAN_DIRS)
 clean: rm-files := $(CLEAN_FILES)
-clean-dirs      := $(addprefix _clean_,$(vmlinux-alldirs))
+clean-dirs      := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs))
 
 .PHONY: $(clean-dirs) clean archclean
 $(clean-dirs):
@@ -1038,6 +1067,7 @@
        @echo  '  rpm             - Build a kernel as an RPM package'
        @echo  '  tags/TAGS       - Generate tags file for editors'
        @echo  '  cscope          - Generate cscope index'
+       @echo  '  kernelrelease   - Output the release version string'
        @echo  ''
        @echo  'Static analysers'
        @echo  '  buildcheck      - List dangling references to vmlinux 
discarded sections'
@@ -1157,37 +1187,49 @@
 __srctree = $(srctree)/
 endif
 
+ALLSOURCE_ARCHS := $(ARCH)
+
 define all-sources
        ( find $(__srctree) $(RCS_FIND_IGNORE) \
               \( -name include -o -name arch \) -prune -o \
               -name '*.[chS]' -print; \
-         find $(__srctree)arch/$(ARCH) $(RCS_FIND_IGNORE) \
-              -name '*.[chS]' -print; \
+         for ARCH in $(ALLSOURCE_ARCHS) ; do \
+              find $(__srctree)arch/$${ARCH} $(RCS_FIND_IGNORE) \
+                   -name '*.[chS]' -print; \
+         done ; \
          find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
               -name '*.[chS]' -print; \
          find $(__srctree)include $(RCS_FIND_IGNORE) \
               \( -name config -o -name 'asm-*' \) -prune \
               -o -name '*.[chS]' -print; \
-         find $(__srctree)include/asm-$(ARCH) $(RCS_FIND_IGNORE) \
-              -name '*.[chS]' -print; \
+         for ARCH in $(ALLSOURCE_ARCHS) ; do \
+              find $(__srctree)include/asm-$${ARCH} $(RCS_FIND_IGNORE) \
+                   -name '*.[chS]' -print; \
+         done ; \
          find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \
               -name '*.[chS]' -print )
 endef
 
 quiet_cmd_cscope-file = FILELST cscope.files
-      cmd_cscope-file = $(all-sources) > cscope.files
+      cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files
 
 quiet_cmd_cscope = MAKE    cscope.out
-      cmd_cscope = cscope -k -b -q
+      cmd_cscope = cscope -b
 
 cscope: FORCE
        $(call cmd,cscope-file)
        $(call cmd,cscope)
 
 quiet_cmd_TAGS = MAKE   $@
-cmd_TAGS = $(all-sources) | etags -
+define cmd_TAGS
+       rm -f $@; \
+       ETAGSF=`etags --version | grep -i exuberant >/dev/null && echo "-I 
__initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \
+       $(all-sources) | xargs etags $$ETAGSF -a
+endef
+
+TAGS: FORCE
+       $(call cmd,TAGS)
 
-#      Exuberant ctags works better with -I
 
 quiet_cmd_tags = MAKE   $@
 define cmd_tags
@@ -1196,9 +1238,6 @@
        $(all-sources) | xargs ctags $$CTAGSF -a
 endef
 
-TAGS: FORCE
-       $(call cmd,TAGS)
-
 tags: FORCE
        $(call cmd,tags)
 
@@ -1266,82 +1305,11 @@
   include $(cmd_files)
 endif
 
-# Execute command and generate cmd file
-if_changed = $(if $(strip $? \
-                         $(filter-out $(cmd_$(1)),$(cmd_$@))\
-                         $(filter-out $(cmd_$@),$(cmd_$(1)))),\
-       @set -e; \
-       $(if $($(quiet)cmd_$(1)),echo '  $(subst ','\'',$($(quiet)cmd_$(1)))';) 
\
-       $(cmd_$(1)); \
-       echo 'cmd_$@ := $(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > 
$(@D)/.$(@F).cmd)
-
-
-# execute the command and also postprocess generated .d dependencies
-# file
-if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
-                         $(filter-out $(cmd_$(1)),$(cmd_$@))\
-                         $(filter-out $(cmd_$@),$(cmd_$(1)))),\
-       $(Q)set -e; \
-       $(if $($(quiet)cmd_$(1)),echo '  $(subst ','\'',$($(quiet)cmd_$(1)))';) 
\
-       $(cmd_$(1)); \
-       scripts/basic/fixdep $(depfile) $@ '$(subst $$,$$$$,$(subst 
','\'',$(cmd_$(1))))' > $(@D)/.$(@F).tmp; \
-       rm -f $(depfile); \
-       mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
-
-# Usage: $(call if_changed_rule,foo)
-# will check if $(cmd_foo) changed, or any of the prequisites changed,
-# and if so will execute $(rule_foo)
-
-if_changed_rule = $(if $(strip $? \
-                              $(filter-out $(cmd_$(1)),$(cmd_$(@F)))\
-                              $(filter-out $(cmd_$(@F)),$(cmd_$(1)))),\
-                      $(Q)$(rule_$(1)))
-
-# If quiet is set, only print short version of command
-
-cmd = @$(if $($(quiet)cmd_$(1)),echo '  $($(quiet)cmd_$(1))' &&) $(cmd_$(1))
-
-# filechk is used to check if the content of a generated file is updated.
-# Sample usage:
-# define filechk_sample
-#      echo $KERNELRELEASE
-# endef
-# version.h : Makefile
-#      $(call filechk,sample)
-# The rule defined shall write to stdout the content of the new file.
-# The existing file will be compared with the new one.
-# - If no file exist it is created
-# - If the content differ the new file is used
-# - If they are equal no change, and no timestamp update
-
-define filechk
-       @set -e;                                \
-       echo '  CHK     $@';                    \
-       mkdir -p $(dir $@);                     \
-       $(filechk_$(1)) < $< > $@.tmp;          \
-       if [ -r $@ ] && cmp -s $@ $@.tmp; then  \
-               rm -f $@.tmp;                   \
-       else                                    \
-               echo '  UPD     $@';            \
-               mv -f $@.tmp $@;                \
-       fi
-endef
-
-# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=dir
-# Usage:
-# $(Q)$(MAKE) $(build)=dir
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
-
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir
 # Usage:
 # $(Q)$(MAKE) $(clean)=dir
 clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
 
-#      $(call descend,<dir>,<target>)
-#      Recursively call a sub-make in <dir> with target <target>
-# Usage is deprecated, because make does not see this as an invocation of make.
-descend =$(Q)$(MAKE) -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build 
obj=$(1) $(2)
-
 endif  # skip-makefile
 
 FORCE:
diff -urN linux/REPORTING-BUGS linux/REPORTING-BUGS
--- linux/REPORTING-BUGS        2005/08/08 12:30:24     1.7
+++ linux/REPORTING-BUGS        2005/09/15 08:52:34     1.8
@@ -9,7 +9,7 @@
 bug report. This explains what you should do with the "Oops" information
 to make it useful to the recipient.
 
-      Send the output the maintainer of the kernel area that seems to
+      Send the output to the maintainer of the kernel area that seems to
 be involved with the problem. Don't worry too much about getting the
 wrong person. If you are unsure send it to the person responsible for the
 code relevant to what you were doing. If it occurs repeatably try and
@@ -18,15 +18,15 @@
 
       If it is a security bug, please copy the Security Contact listed
 in the MAINTAINERS file.  They can help coordinate bugfix and disclosure.
-See Documentation/SecurityBugs for more infomation.
+See Documentation/SecurityBugs for more information.
 
       If you are totally stumped as to whom to send the report, send it to
 linux-kernel@vger.kernel.org. (For more information on the linux-kernel
 mailing list see http://www.tux.org/lkml/).
 
-This is a suggested format for a bug report sent to the Linux kernel mailing 
-list. Having a standardized bug report form makes it easier  for you not to 
-overlook things, and easier for the developers to find the pieces of 
+This is a suggested format for a bug report sent to the Linux kernel mailing
+list. Having a standardized bug report form makes it easier for you not to
+overlook things, and easier for the developers to find the pieces of
 information they're really interested in. Don't feel you have to follow it.
 
       First run the ver_linux script included as scripts/ver_linux, which
@@ -35,9 +35,9 @@
 
 Use that information to fill in all fields of the bug report form, and
 post it to the mailing list with a subject of "PROBLEM: <one line
-summary from [1.]>" for easy identification by the developers    
+summary from [1.]>" for easy identification by the developers.
 
-[1.] One line summary of the problem:    
+[1.] One line summary of the problem:
 [2.] Full description of the problem/report:
 [3.] Keywords (i.e., modules, networking, kernel):
 [4.] Kernel version (from /proc/version):
diff -urN linux/Documentation/DMA-ISA-LPC.txt 
linux/Documentation/DMA-ISA-LPC.txt
--- linux/Documentation/DMA-ISA-LPC.txt 1970/01/01 00:00:00
+++ linux/Documentation/DMA-ISA-LPC.txt 2005-09-15 09:52:35.223688000 +0100     
1.1
@@ -0,0 +1,151 @@
+                        DMA with ISA and LPC devices
+                        ============================
+
+                      Pierre Ossman <drzeus@drzeus.cx>
+
+This document describes how to do DMA transfers using the old ISA DMA
+controller. Even though ISA is more or less dead today the LPC bus
+uses the same DMA system so it will be around for quite some time.
+
+Part I - Headers and dependencies
+---------------------------------
+
+To do ISA style DMA you need to include two headers:
+
+#include <linux/dma-mapping.h>
+#include <asm/dma.h>
+
+The first is the generic DMA API used to convert virtual addresses to
+physical addresses (see Documentation/DMA-API.txt for details).
+
+The second contains the routines specific to ISA DMA transfers. Since
+this is not present on all platforms make sure you construct your
+Kconfig to be dependent on ISA_DMA_API (not ISA) so that nobody tries
+to build your driver on unsupported platforms.
+
+Part II - Buffer allocation
+---------------------------
+
+The ISA DMA controller has some very strict requirements on which
+memory it can access so extra care must be taken when allocating
+buffers.
+
+(You usually need a special buffer for DMA transfers instead of
+transferring directly to and from your normal data structures.)
+
+The DMA-able address space is the lowest 16 MB of _physical_ memory.
+Also the transfer block may not cross page boundaries (which are 64
+or 128 KiB depending on which channel you use).
+
+In order to allocate a piece of memory that satisfies all these
+requirements you pass the flag GFP_DMA to kmalloc.
+
+Unfortunately the memory available for ISA DMA is scarce so unless you
+allocate the memory during boot-up it's a good idea to also pass
+__GFP_REPEAT and __GFP_NOWARN to make the allocater try a bit harder.
+
+(This scarcity also means that you should allocate the buffer as
+early as possible and not release it until the driver is unloaded.)
+
+Part III - Address translation
+------------------------------
+
+To translate the virtual address to a physical use the normal DMA
+API. Do _not_ use isa_virt_to_phys() even though it does the same
+thing. The reason for this is that the function isa_virt_to_phys()
+will require a Kconfig dependency to ISA, not just ISA_DMA_API which
+is really all you need. Remember that even though the DMA controller
+has its origins in ISA it is used elsewhere.
+
+Note: x86_64 had a broken DMA API when it came to ISA but has since
+been fixed. If your arch has problems then fix the DMA API instead of
+reverting to the ISA functions.
+
+Part IV - Channels
+------------------
+
+A normal ISA DMA controller has 8 channels. The lower four are for
+8-bit transfers and the upper four are for 16-bit transfers.
+
+(Actually the DMA controller is really two separate controllers where
+channel 4 is used to give DMA access for the second controller (0-3).
+This means that of the four 16-bits channels only three are usable.)
+
+You allocate these in a similar fashion as all basic resources:
+
+extern int request_dma(unsigned int dmanr, const char * device_id);
+extern void free_dma(unsigned int dmanr);
+
+The ability to use 16-bit or 8-bit transfers is _not_ up to you as a
+driver author but depends on what the hardware supports. Check your
+specs or test different channels.
+
+Part V - Transfer data
+----------------------
+
+Now for the good stuff, the actual DMA transfer. :)
+
+Before you use any ISA DMA routines you need to claim the DMA lock
+using claim_dma_lock(). The reason is that some DMA operations are
+not atomic so only one driver may fiddle with the registers at a
+time.
+
+The first time you use the DMA controller you should call
+clear_dma_ff(). This clears an internal register in the DMA
+controller that is used for the non-atomic operations. As long as you
+(and everyone else) uses the locking functions then you only need to
+reset this once.
+
+Next, you tell the controller in which direction you intend to do the
+transfer using set_dma_mode(). Currently you have the options
+DMA_MODE_READ and DMA_MODE_WRITE.
+
+Set the address from where the transfer should start (this needs to
+be 16-bit aligned for 16-bit transfers) and how many bytes to
+transfer. Note that it's _bytes_. The DMA routines will do all the
+required translation to values that the DMA controller understands.
+
+The final step is enabling the DMA channel and releasing the DMA
+lock.
+
+Once the DMA transfer is finished (or timed out) you should disable
+the channel again. You should also check get_dma_residue() to make
+sure that all data has been transfered.
+
+Example:
+
+int flags, residue;
+
+flags = claim_dma_lock();
+
+clear_dma_ff();
+
+set_dma_mode(channel, DMA_MODE_WRITE);
+set_dma_addr(channel, phys_addr);
+set_dma_count(channel, num_bytes);
+
+dma_enable(channel);
+
+release_dma_lock(flags);
+
+while (!device_done());
+
+flags = claim_dma_lock();
+
+dma_disable(channel);
+
+residue = dma_get_residue(channel);
+if (residue != 0)
+       printk(KERN_ERR "driver: Incomplete DMA transfer!"
+               " %d bytes left!\n", residue);
+
+release_dma_lock(flags);
+
+Part VI - Suspend/resume
+------------------------
+
+It is the driver's responsibility to make sure that the machine isn't
+suspended while a DMA transfer is in progress. Also, all DMA settings
+are lost when the system suspends so if your driver relies on the DMA
+controller being in a certain state then you have to restore these
+registers upon resume.
diff -urN linux/Documentation/applying-patches.txt 
linux/Documentation/applying-patches.txt
--- linux/Documentation/applying-patches.txt    1970/01/01 00:00:00
+++ linux/Documentation/applying-patches.txt    2005-09-15 09:52:35.249920000 
+0100     1.1
@@ -0,0 +1,439 @@
+
+       Applying Patches To The Linux Kernel
+       ------------------------------------
+
+       (Written by Jesper Juhl, August 2005)
+
+
+
+A frequently asked question on the Linux Kernel Mailing List is how to apply
+a patch to the kernel or, more specifically, what base kernel a patch for
+one of the many trees/branches should be applied to. Hopefully this document
+will explain this to you.
+
+In addition to explaining how to apply and revert patches, a brief
+description of the different kernel trees (and examples of how to apply
+their specific patches) is also provided.
+
+
+What is a patch?
+---
+ A patch is a small text document containing a delta of changes between two
+different versions of a source tree. Patches are created with the `diff'
+program.
+To correctly apply a patch you need to know what base it was generated from
+and what new version the patch will change the source tree into. These
+should both be present in the patch file metadata or be possible to deduce
+from the filename.
+
+
+How do I apply or revert a patch?
+---
+ You apply a patch with the `patch' program. The patch program reads a diff
+(or patch) file and makes the changes to the source tree described in it.
+
+Patches for the Linux kernel are generated relative to the parent directory
+holding the kernel source dir.
+
+This means that paths to files inside the patch file contain the name of the
+kernel source directories it was generated against (or some other directory
+names like "a/" and "b/").
+Since this is unlikely to match the name of the kernel source dir on your
+local machine (but is often useful info to see what version an otherwise
+unlabeled patch was generated against) you should change into your kernel
+source directory and then strip the first element of the path from filenames
+in the patch file when applying it (the -p1 argument to `patch' does this).
+
+To revert a previously applied patch, use the -R argument to patch.
+So, if you applied a patch like this:
+       patch -p1 < ../patch-x.y.z
+
+You can revert (undo) it like this:
+       patch -R -p1 < ../patch-x.y.z
+
+
+How do I feed a patch/diff file to `patch'?
+---
+ This (as usual with Linux and other UNIX like operating systems) can be
+done in several different ways.
+In all the examples below I feed the file (in uncompressed form) to patch
+via stdin using the following syntax:
+       patch -p1 < path/to/patch-x.y.z
+
+If you just want to be able to follow the examples below and don't want to
+know of more than one way to use patch, then you can stop reading this
+section here.
+
+Patch can also get the name of the file to use via the -i argument, like
+this:
+       patch -p1 -i path/to/patch-x.y.z
+
+If your patch file is compressed with gzip or bzip2 and you don't want to
+uncompress it before applying it, then you can feed it to patch like this
+instead:
+       zcat path/to/patch-x.y.z.gz | patch -p1
+       bzcat path/to/patch-x.y.z.bz2 | patch -p1
+
+If you wish to uncompress the patch file by hand first before applying it
+(what I assume you've done in the examples below), then you simply run
+gunzip or bunzip2 on the file - like this:
+       gunzip patch-x.y.z.gz
+       bunzip2 patch-x.y.z.bz2
+
+Which will leave you with a plain text patch-x.y.z file that you can feed to
+patch via stdin or the -i argument, as you prefer.
+
+A few other nice arguments for patch are -s which causes patch to be silent
+except for errors which is nice to prevent errors from scrolling out of the
+screen too fast, and --dry-run which causes patch to just print a listing of
+what would happen, but doesn't actually make any changes. Finally --verbose
+tells patch to print more information about the work being done.
+
+
+Common errors when patching
+---
+ When patch applies a patch file it attempts to verify the sanity of the
+file in different ways.
+Checking that the file looks like a valid patch file, checking the code
+around the bits being modified matches the context provided in the patch are
+just two of the basic sanity checks patch does.
+
+If patch encounters something that doesn't look quite right it has two
+options. It can either refuse to apply the changes and abort or it can try
+to find a way to make the patch apply with a few minor changes.
+
+One example of something that's not 'quite right' that patch will attempt to
+fix up is if all the context matches, the lines being changed match, but the
+line numbers are different. This can happen, for example, if the patch makes
+a change in the middle of the file but for some reasons a few lines have
+been added or removed near the beginning of the file. In that case
+everything looks good it has just moved up or down a bit, and patch will
+usually adjust the line numbers and apply the patch.
+
+Whenever patch applies a patch that it had to modify a bit to make it fit
+it'll tell you about it by saying the patch applied with 'fuzz'.
+You should be wary of such changes since even though patch probably got it
+right it doesn't /always/ get it right, and the result will sometimes be
+wrong.
+
+When patch encounters a change that it can't fix up with fuzz it rejects it
+outright and leaves a file with a .rej extension (a reject file). You can
+read this file to see exactely what change couldn't be applied, so you can
+go fix it up by hand if you wish.
+
+If you don't have any third party patches applied to your kernel source, but
+only patches from kernel.org and you apply the patches in the correct order,
+and have made no modifications yourself to the source files, then you should
+never see a fuzz or reject message from patch. If you do see such messages
+anyway, then there's a high risk that either your local source tree or the
+patch file is corrupted in some way. In that case you should probably try
+redownloading the patch and if things are still not OK then you'd be advised
+to start with a fresh tree downloaded in full from kernel.org.
+
+Let's look a bit more at some of the messages patch can produce.
+
+If patch stops and presents a "File to patch:" prompt, then patch could not
+find a file to be patched. Most likely you forgot to specify -p1 or you are
+in the wrong directory. Less often, you'll find patches that need to be
+applied with -p0 instead of -p1 (reading the patch file should reveal if
+this is the case - if so, then this is an error by the person who created
+the patch but is not fatal).
+
+If you get "Hunk #2 succeeded at 1887 with fuzz 2 (offset 7 lines)." or a
+message similar to that, then it means that patch had to adjust the location
+of the change (in this example it needed to move 7 lines from where it
+expected to make the change to make it fit).
+The resulting file may or may not be OK, depending on the reason the file
+was different than expected.
+This often happens if you try to apply a patch that was generated against a
+different kernel version than the one you are trying to patch.
+
+If you get a message like "Hunk #3 FAILED at 2387.", then it means that the
+patch could not be applied correctly and the patch program was unable to
+fuzz its way through. This will generate a .rej file with the change that
+caused the patch to fail and also a .orig file showing you the original
+content that couldn't be changed.
+
+If you get "Reversed (or previously applied) patch detected!  Assume -R? [n]"
+then patch detected that the change contained in the patch seems to have
+already been made.
+If you actually did apply this patch previously and you just re-applied it
+in error, then just say [n]o and abort this patch. If you applied this patch
+previously and actually intended to revert it, but forgot to specify -R,
+then you can say [y]es here to make patch revert it for you.
+This can also happen if the creator of the patch reversed the source and
+destination directories when creating the patch, and in that case reverting
+the patch will in fact apply it.
+
+A message similar to "patch: **** unexpected end of file in patch" or "patch
+unexpectedly ends in middle of line" means that patch could make no sense of
+the file you fed to it. Either your download is broken or you tried to feed
+patch a compressed patch file without uncompressing it first.
+
+As I already mentioned above, these errors should never happen if you apply
+a patch from kernel.org to the correct version of an unmodified source tree.
+So if you get these errors with kernel.org patches then you should probably
+assume that either your patch file or your tree is broken and I'd advice you
+to start over with a fresh download of a full kernel tree and the patch you
+wish to apply.
+
+
+Are there any alternatives to `patch'?
+---
+ Yes there are alternatives. You can use the `interdiff' program
+(http://cyberelk.net/tim/patchutils/) to generate a patch representing the
+differences between two patches and then apply the result.
+This will let you move from something like 2.6.12.2 to 2.6.12.3 in a single
+step. The -z flag to interdiff will even let you feed it patches in gzip or
+bzip2 compressed form directly without the use of zcat or bzcat or manual
+decompression.
+
+Here's how you'd go from 2.6.12.2 to 2.6.12.3 in a single step:
+       interdiff -z ../patch-2.6.12.2.bz2 ../patch-2.6.12.3.gz | patch -p1
+
+Although interdiff may save you a step or two you are generally advised to
+do the additional steps since interdiff can get things wrong in some cases.
+
+ Another alternative is `ketchup', which is a python script for automatic
+downloading and applying of patches (http://www.selenic.com/ketchup/).
+
+Other nice tools are diffstat which shows a summary of changes made by a
+patch, lsdiff which displays a short listing of affected files in a patch
+file, along with (optionally) the line numbers of the start of each patch
+and grepdiff which displays a list of the files modified by a patch where
+the patch contains a given regular expression.
+
+
+Where can I download the patches?
+---
+ The patches are available at http://kernel.org/
+Most recent patches are linked from the front page, but they also have
+specific homes.
+
+The 2.6.x.y (-stable) and 2.6.x patches live at
+ ftp://ftp.kernel.org/pub/linux/kernel/v2.6/
+
+The -rc patches live at
+ ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/
+
+The -git patches live at
+ ftp://ftp.kernel.org/pub/linux/kernel/v2.6/snapshots/
+
+The -mm kernels live at
+ ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/
+
+In place of ftp.kernel.org you can use ftp.cc.kernel.org, where cc is a
+country code. This way you'll be downloading from a mirror site that's most
+likely geographically closer to you, resulting in faster downloads for you,
+less bandwidth used globally and less load on the main kernel.org servers -
+these are good things, do use mirrors when possible.
+
+
+The 2.6.x kernels
+---
+ These are the base stable releases released by Linus. The highest numbered
+release is the most recent.
+
+If regressions or other serious flaws are found then a -stable fix patch
+will be released (see below) on top of this base. Once a new 2.6.x base
+kernel is released, a patch is made available that is a delta between the
+previous 2.6.x kernel and the new one.
+
+To apply a patch moving from 2.6.11 to 2.6.12 you'd do the following (note
+that such patches do *NOT* apply on top of 2.6.x.y kernels but on top of the
+base 2.6.x kernel - if you need to move from 2.6.x.y to 2.6.x+1 you need to
+first revert the 2.6.x.y patch).
+
+Here are some examples:
+
+# moving from 2.6.11 to 2.6.12
+$ cd ~/linux-2.6.11                    # change to kernel source dir
+$ patch -p1 < ../patch-2.6.12          # apply the 2.6.12 patch
+$ cd ..
+$ mv linux-2.6.11 linux-2.6.12         # rename source dir
+
+# moving from 2.6.11.1 to 2.6.12
+$ cd ~/linux-2.6.11.1                  # change to kernel source dir
+$ patch -p1 -R < ../patch-2.6.11.1     # revert the 2.6.11.1 patch
+                                       # source dir is now 2.6.11
+$ patch -p1 < ../patch-2.6.12          # apply new 2.6.12 patch
+$ cd ..
+$ mv linux-2.6.11.1 inux-2.6.12                # rename source dir
+
+
+The 2.6.x.y kernels
+---
+ Kernels with 4 digit versions are -stable kernels. They contain small(ish)
+critical fixes for security problems or significant regressions discovered
+in a given 2.6.x kernel.
+
+This is the recommended branch for users who want the most recent stable
+kernel and are not interested in helping test development/experimental
+versions.
+
+If no 2.6.x.y kernel is available, then the highest numbered 2.6.x kernel is
+the current stable kernel.
+
+These patches are not incremental, meaning that for example the 2.6.12.3
+patch does not apply on top of the 2.6.12.2 kernel source, but rather on top
+of the base 2.6.12 kernel source.
+So, in order to apply the 2.6.12.3 patch to your existing 2.6.12.2 kernel
+source you have to first back out the 2.6.12.2 patch (so you are left with a
+base 2.6.12 kernel source) and then apply the new 2.6.12.3 patch.
+
+Here's a small example:
+
+$ cd ~/linux-2.6.12.2                  # change into the kernel source dir
+$ patch -p1 -R < ../patch-2.6.12.2     # revert the 2.6.12.2 patch
+$ patch -p1 < ../patch-2.6.12.3                # apply the new 2.6.12.3 patch
+$ cd ..
+$ mv linux-2.6.12.2 linux-2.6.12.3     # rename the kernel source dir
+
+
+The -rc kernels
+---
+ These are release-candidate kernels. These are development kernels released
+by Linus whenever he deems the current git (the kernel's source management
+tool) tree to be in a reasonably sane state adequate for testing.
+
+These kernels are not stable and you should expect occasional breakage if
+you intend to run them. This is however the most stable of the main
+development branches and is also what will eventually turn into the next
+stable kernel, so it is important that it be tested by as many people as
+possible.
+
+This is a good branch to run for people who want to help out testing
+development kernels but do not want to run some of the really experimental
+stuff (such people should see the sections about -git and -mm kernels below).
+
+The -rc patches are not incremental, they apply to a base 2.6.x kernel, just
+like the 2.6.x.y patches described above. The kernel version before the -rcN
+suffix denotes the version of the kernel that this -rc kernel will eventually
+turn into.
+So, 2.6.13-rc5 means that this is the fifth release candidate for the 2.6.13
+kernel and the patch should be applied on top of the 2.6.12 kernel source.
+
+Here are 3 examples of how to apply these patches:
+
+# first an example of moving from 2.6.12 to 2.6.13-rc3
+$ cd ~/linux-2.6.12                    # change into the 2.6.12 source dir
+$ patch -p1 < ../patch-2.6.13-rc3      # apply the 2.6.13-rc3 patch
+$ cd ..
+$ mv linux-2.6.12 linux-2.6.13-rc3     # rename the source dir
+
+# now let's move from 2.6.13-rc3 to 2.6.13-rc5
+$ cd ~/linux-2.6.13-rc3                        # change into the 2.6.13-rc3 dir
+$ patch -p1 -R < ../patch-2.6.13-rc3   # revert the 2.6.13-rc3 patch
+$ patch -p1 < ../patch-2.6.13-rc5      # apply the new 2.6.13-rc5 patch
+$ cd ..
+$ mv linux-2.6.13-rc3 linux-2.6.13-rc5 # rename the source dir
+
+# finally let's try and move from 2.6.12.3 to 2.6.13-rc5
+$ cd ~/linux-2.6.12.3                  # change to the kernel source dir
+$ patch -p1 -R < ../patch-2.6.12.3     # revert the 2.6.12.3 patch
+$ patch -p1 < ../patch-2.6.13-rc5      # apply new 2.6.13-rc5 patch
+$ cd ..
+$ mv linux-2.6.12.3 linux-2.6.13-rc5   # rename the kernel source dir
+
+
+The -git kernels
+---
+ These are daily snapshots of Linus' kernel tree (managed in a git
+repository, hence the name).
+
+These patches are usually released daily and represent the current state of
+Linus' tree. They are more experimental than -rc kernels since they are
+generated automatically without even a cursory glance to see if they are
+sane.
+
+-git patches are not incremental and apply either to a base 2.6.x kernel or
+a base 2.6.x-rc kernel - you can see which from their name.
+A patch named 2.6.12-git1 applies to the 2.6.12 kernel source and a patch
+named 2.6.13-rc3-git2 applies to the source of the 2.6.13-rc3 kernel.
+
+Here are some examples of how to apply these patches:
+
+# moving from 2.6.12 to 2.6.12-git1
+$ cd ~/linux-2.6.12                    # change to the kernel source dir
+$ patch -p1 < ../patch-2.6.12-git1     # apply the 2.6.12-git1 patch
+$ cd ..
+$ mv linux-2.6.12 linux-2.6.12-git1    # rename the kernel source dir
+
+# moving from 2.6.12-git1 to 2.6.13-rc2-git3
+$ cd ~/linux-2.6.12-git1               # change to the kernel source dir
+$ patch -p1 -R < ../patch-2.6.12-git1  # revert the 2.6.12-git1 patch
+                                       # we now have a 2.6.12 kernel
+$ patch -p1 < ../patch-2.6.13-rc2      # apply the 2.6.13-rc2 patch
+                                       # the kernel is now 2.6.13-rc2
+$ patch -p1 < ../patch-2.6.13-rc2-git3 # apply the 2.6.13-rc2-git3 patch
+                                       # the kernel is now 2.6.13-rc2-git3
+$ cd ..
+$ mv linux-2.6.12-git1 linux-2.6.13-rc2-git3   # rename source dir
+
+
+The -mm kernels
+---
+ These are experimental kernels released by Andrew Morton.
+
+The -mm tree serves as a sort of proving ground for new features and other
+experimental patches.
+Once a patch has proved its worth in -mm for a while Andrew pushes it on to
+Linus for inclusion in mainline.
+
+Although it's encouraged that patches flow to Linus via the -mm tree, this
+is not always enforced.
+Subsystem maintainers (or individuals) sometimes push their patches directly
+to Linus, even though (or after) they have been merged and tested in -mm (or
+sometimes even without prior testing in -mm).
+
+You should generally strive to get your patches into mainline via -mm to
+ensure maximum testing.
+
+This branch is in constant flux and contains many experimental features, a
+lot of debugging patches not appropriate for mainline etc and is the most
+experimental of the branches described in this document.
+
+These kernels are not appropriate for use on systems that are supposed to be
+stable and they are more risky to run than any of the other branches (make
+sure you have up-to-date backups - that goes for any experimental kernel but
+even more so for -mm kernels).
+
+These kernels in addition to all the other experimental patches they contain
+usually also contain any changes in the mainline -git kernels available at
+the time of release.
+
+Testing of -mm kernels is greatly appreciated since the whole point of the
+tree is to weed out regressions, crashes, data corruption bugs, build
+breakage (and any other bug in general) before changes are merged into the
+more stable mainline Linus tree.
+But testers of -mm should be aware that breakage in this tree is more common
+than in any other tree.
+
+The -mm kernels are not released on a fixed schedule, but usually a few -mm
+kernels are released in between each -rc kernel (1 to 3 is common).
+The -mm kernels apply to either a base 2.6.x kernel (when no -rc kernels
+have been released yet) or to a Linus -rc kernel.
+
+Here are some examples of applying the -mm patches:
+
+# moving from 2.6.12 to 2.6.12-mm1
+$ cd ~/linux-2.6.12                    # change to the 2.6.12 source dir
+$ patch -p1 < ../2.6.12-mm1            # apply the 2.6.12-mm1 patch
+$ cd ..
+$ mv linux-2.6.12 linux-2.6.12-mm1     # rename the source appropriately
+
+# moving from 2.6.12-mm1 to 2.6.13-rc3-mm3
+$ cd ~/linux-2.6.12-mm1
+$ patch -p1 -R < ../2.6.12-mm1         # revert the 2.6.12-mm1 patch
+                                       # we now have a 2.6.12 source
+$ patch -p1 < ../patch-2.6.13-rc3      # apply the 2.6.13-rc3 patch
+                                       # we now have a 2.6.13-rc3 source
+$ patch -p1 < ../2.6.13-rc3-mm3                # apply the 2.6.13-rc3-mm3 patch
+$ cd ..
+$ mv linux-2.6.12-mm1 linux-2.6.13-rc3-mm3     # rename the source dir
+
+
+This concludes this list of explanations of the various kernel trees and I
+hope you are now crystal clear on how to apply the various patches and help
+testing the kernel.
+
diff -urN linux/Documentation/dcdbas.txt linux/Documentation/dcdbas.txt
--- linux/Documentation/dcdbas.txt      1970/01/01 00:00:00
+++ linux/Documentation/dcdbas.txt      2005-09-15 09:52:35.278213000 +0100     
1.1
@@ -0,0 +1,91 @@
+Overview
+
+The Dell Systems Management Base Driver provides a sysfs interface for
+systems management software such as Dell OpenManage to perform system
+management interrupts and host control actions (system power cycle or
+power off after OS shutdown) on certain Dell systems.
+
+Dell OpenManage requires this driver on the following Dell PowerEdge systems:
+300, 1300, 1400, 400SC, 500SC, 1500SC, 1550, 600SC, 1600SC, 650, 1655MC,
+700, and 750.  Other Dell software such as the open source libsmbios project
+is expected to make use of this driver, and it may include the use of this
+driver on other Dell systems.
+
+The Dell libsmbios project aims towards providing access to as much BIOS
+information as possible.  See http://linux.dell.com/libsmbios/main/ for
+more information about the libsmbios project.
+
+
+System Management Interrupt
+
+On some Dell systems, systems management software must access certain
+management information via a system management interrupt (SMI).  The SMI data
+buffer must reside in 32-bit address space, and the physical address of the
+buffer is required for the SMI.  The driver maintains the memory required for
+the SMI and provides a way for the application to generate the SMI.
+The driver creates the following sysfs entries for systems management
+software to perform these system management interrupts:
+
+/sys/devices/platform/dcdbas/smi_data
+/sys/devices/platform/dcdbas/smi_data_buf_phys_addr
+/sys/devices/platform/dcdbas/smi_data_buf_size
+/sys/devices/platform/dcdbas/smi_request
+
+Systems management software must perform the following steps to execute
+a SMI using this driver:
+
+1) Lock smi_data.
+2) Write system management command to smi_data.
+3) Write "1" to smi_request to generate a calling interface SMI or
+   "2" to generate a raw SMI.
+4) Read system management command response from smi_data.
+5) Unlock smi_data.
+
+
+Host Control Action
+
+Dell OpenManage supports a host control feature that allows the administrator
+to perform a power cycle or power off of the system after the OS has finished
+shutting down.  On some Dell systems, this host control feature requires that
+a driver perform a SMI after the OS has finished shutting down.
+
+The driver creates the following sysfs entries for systems management software
+to schedule the driver to perform a power cycle or power off host control
+action after the system has finished shutting down:
+
+/sys/devices/platform/dcdbas/host_control_action
+/sys/devices/platform/dcdbas/host_control_smi_type
+/sys/devices/platform/dcdbas/host_control_on_shutdown
+
+Dell OpenManage performs the following steps to execute a power cycle or
+power off host control action using this driver:
+
+1) Write host control action to be performed to host_control_action.
+2) Write type of SMI that driver needs to perform to host_control_smi_type.
+3) Write "1" to host_control_on_shutdown to enable host control action.
+4) Initiate OS shutdown.
+   (Driver will perform host control SMI when it is notified that the OS
+   has finished shutting down.)
+
+
+Host Control SMI Type
+
+The following table shows the value to write to host_control_smi_type to
+perform a power cycle or power off host control action:
+
+PowerEdge System    Host Control SMI Type
+----------------    ---------------------
+      300             HC_SMITYPE_TYPE1
+     1300             HC_SMITYPE_TYPE1
+     1400             HC_SMITYPE_TYPE2
+      500SC           HC_SMITYPE_TYPE2
+     1500SC           HC_SMITYPE_TYPE2
+     1550             HC_SMITYPE_TYPE2
+      600SC           HC_SMITYPE_TYPE2
+     1600SC           HC_SMITYPE_TYPE2
+      650             HC_SMITYPE_TYPE2
+     1655MC           HC_SMITYPE_TYPE2
+      700             HC_SMITYPE_TYPE3
+      750             HC_SMITYPE_TYPE3
+
+
diff -urN linux/Documentation/dell_rbu.txt linux/Documentation/dell_rbu.txt
--- linux/Documentation/dell_rbu.txt    1970/01/01 00:00:00
+++ linux/Documentation/dell_rbu.txt    2005-09-15 09:52:35.302952000 +0100     
1.1
@@ -0,0 +1,74 @@
+Purpose:
+Demonstrate the usage of the new open sourced rbu (Remote BIOS Update) driver
+for updating BIOS images on Dell servers and desktops.
+
+Scope:
+This document discusses the functionality of the rbu driver only.
+It does not cover the support needed from aplications to enable the BIOS to
+update itself with the image downloaded in to the memory.
+
+Overview:
+This driver works with Dell OpenManage or Dell Update Packages for updating
+the BIOS on Dell servers (starting from servers sold since 1999), desktops
+and notebooks (starting from those sold in 2005).
+Please go to  http://support.dell.com register and you can find info on
+OpenManage and Dell Update packages (DUP).
+
+Dell_RBU driver supports BIOS update using the monilothic image and packetized
+image methods. In case of moniolithic the driver allocates a contiguous chunk
+of physical pages having the BIOS image. In case of packetized the app
+using the driver breaks the image in to packets of fixed sizes and the driver
+would place each packet in contiguous physical memory. The driver also
+maintains a link list of packets for reading them back.
+If the dell_rbu driver is unloaded all the allocated memory is freed.
+
+The rbu driver needs to have an application which will inform the BIOS to
+enable the update in the next system reboot.
+
+The user should not unload the rbu driver after downloading the BIOS image
+or updating.
+
+The driver load creates the following directories under the /sys file system.
+/sys/class/firmware/dell_rbu/loading
+/sys/class/firmware/dell_rbu/data
+/sys/devices/platform/dell_rbu/image_type
+/sys/devices/platform/dell_rbu/data
+
+The driver supports two types of update mechanism; monolithic and packetized.
+These update mechanism depends upon the BIOS currently running on the system.
+Most of the Dell systems support a monolithic update where the BIOS image is
+copied to a single contiguous block of physical memory.
+In case of packet mechanism the single memory can be broken in smaller chuks
+of contiguous memory and the BIOS image is scattered in these packets.
+
+By default the driver uses monolithic memory for the update type. This can be
+changed to contiguous during the driver load time by specifying the load
+parameter image_type=packet.  This can also be changed later as below
+echo packet > /sys/devices/platform/dell_rbu/image_type
+
+Do the steps below to download the BIOS image.
+1) echo 1 > /sys/class/firmware/dell_rbu/loading
+2) cp bios_image.hdr /sys/class/firmware/dell_rbu/data
+3) echo 0 > /sys/class/firmware/dell_rbu/loading
+
+The /sys/class/firmware/dell_rbu/ entries will remain till the following is
+done.
+echo -1 > /sys/class/firmware/dell_rbu/loading
+
+Until this step is completed the drivr cannot be unloaded.
+
+Also the driver provides /sys/devices/platform/dell_rbu/data readonly file to
+read back the image downloaded. This is useful in case of packet update
+mechanism where the above steps 1,2,3 will repeated for every packet.
+By reading the /sys/devices/platform/dell_rbu/data file all packet data
+downloaded can be verified in a single file.
+The packets are arranged in this file one after the other in a FIFO order.
+
+NOTE:
+This driver requires a patch for firmware_class.c which has the addition
+of request_firmware_nowait_nohotplug function to wortk
+Also after updating the BIOS image an user mdoe application neeeds to execute
+code which message the BIOS update request to the BIOS. So on the next reboot
+the BIOS knows about the new image downloaded and it updates it self.
+Also don't unload the rbu drive if the image has to be updated.
+
diff -urN linux/Documentation/00-INDEX linux/Documentation/00-INDEX
--- linux/Documentation/00-INDEX        2005/07/11 20:45:51     1.28
+++ linux/Documentation/00-INDEX        2005/09/15 08:52:35     1.29
@@ -46,6 +46,8 @@
        - procedure to get a source patch included into the kernel tree.
 VGA-softcursor.txt
        - how to change your VGA cursor from a blinking underscore.
+applying-patches.txt
+       - description of various trees and how to apply their patches.
 arm/
        - directory with info about Linux on the ARM architecture.
 basic_profiling.txt
@@ -275,7 +277,7 @@
 unicode.txt
        - info on the Unicode character/font mapping used in Linux.
 uml/
-       - directory with infomation about User Mode Linux.
+       - directory with information about User Mode Linux.
 usb/
        - directory with info regarding the Universal Serial Bus.
 video4linux/
diff -urN linux/Documentation/CodingStyle linux/Documentation/CodingStyle
--- linux/Documentation/CodingStyle     2004/09/19 12:30:00     1.9
+++ linux/Documentation/CodingStyle     2005/09/15 08:52:35     1.10
@@ -236,6 +236,9 @@
 of the function, telling people what it does, and possibly WHY it does
 it.
 
+When commenting the kernel API functions, please use the kerneldoc format.
+See the files Documentation/kernel-doc-nano-HOWTO.txt and scripts/kernel-doc
+for details.
 
                Chapter 8: You've made a mess of it
 
diff -urN linux/Documentation/DMA-API.txt linux/Documentation/DMA-API.txt
--- linux/Documentation/DMA-API.txt     2004/12/27 02:15:47     1.8
+++ linux/Documentation/DMA-API.txt     2005/09/15 08:52:35     1.9
@@ -121,7 +121,7 @@
                        dma_addr_t addr);
 
 This puts memory back into the pool.  The pool is what was passed to
-the the pool allocation routine; the cpu and dma addresses are what
+the pool allocation routine; the cpu and dma addresses are what
 were returned when that routine allocated the memory being freed.
 
 
diff -urN linux/Documentation/IPMI.txt linux/Documentation/IPMI.txt
--- linux/Documentation/IPMI.txt        2005/07/11 20:45:51     1.8
+++ linux/Documentation/IPMI.txt        2005/09/15 08:52:35     1.9
@@ -605,12 +605,13 @@
 it will send the proper IPMI commands to do this.  This is supported on
 several platforms.
 
-There is a module parameter named "poweroff_control" that may either be zero
-(do a power down) or 2 (do a power cycle, power the system off, then power
-it on in a few seconds).  Setting ipmi_poweroff.poweroff_control=x will do
-the same thing on the kernel command line.  The parameter is also available
-via the proc filesystem in /proc/ipmi/poweroff_control.  Note that if the
-system does not support power cycling, it will always to the power off.
+There is a module parameter named "poweroff_powercycle" that may
+either be zero (do a power down) or non-zero (do a power cycle, power
+the system off, then power it on in a few seconds).  Setting
+ipmi_poweroff.poweroff_control=x will do the same thing on the kernel
+command line.  The parameter is also available via the proc filesystem
+in /proc/sys/dev/ipmi/poweroff_powercycle.  Note that if the system
+does not support power cycling, it will always do the power off.
 
 Note that if you have ACPI enabled, the system will prefer using ACPI to
 power off.
diff -urN linux/Documentation/MSI-HOWTO.txt linux/Documentation/MSI-HOWTO.txt
--- linux/Documentation/MSI-HOWTO.txt   2004/08/06 00:33:21     1.3
+++ linux/Documentation/MSI-HOWTO.txt   2005/09/15 08:52:35     1.4
@@ -430,7 +430,7 @@
 MSI-capable hardware is responsible for whether calling
 pci_enable_msi or not. A return of zero indicates the kernel
 successfully initializes the MSI/MSI-X capability structure of the
-device funtion. The device function is now running on MSI/MSI-X mode.
+device function. The device function is now running on MSI/MSI-X mode.
 
 5.6 How to tell whether MSI/MSI-X is enabled on device function
 
diff -urN linux/Documentation/acpi-hotkey.txt 
linux/Documentation/acpi-hotkey.txt
--- linux/Documentation/acpi-hotkey.txt 2005/08/24 16:22:47     1.2
+++ linux/Documentation/acpi-hotkey.txt 2005/09/15 08:52:35     1.3
@@ -35,4 +35,4 @@
 to retrieve it.
 
 Note: Use cmdline "acpi_generic_hotkey" to over-ride
-loading any platform specific drivers.
+platform-specific with generic driver.
diff -urN linux/Documentation/cpusets.txt linux/Documentation/cpusets.txt
--- linux/Documentation/cpusets.txt     2005/07/11 20:45:51     1.4
+++ linux/Documentation/cpusets.txt     2005/09/15 08:52:35     1.5
@@ -60,6 +60,18 @@
 load balancing code trying to pull tasks outside of the cpu exclusive
 cpuset only to be prevented by the tasks' cpus_allowed mask.
 
+A cpuset that is mem_exclusive restricts kernel allocations for
+page, buffer and other data commonly shared by the kernel across
+multiple users.  All cpusets, whether mem_exclusive or not, restrict
+allocations of memory for user space.  This enables configuring a
+system so that several independent jobs can share common kernel
+data, such as file system pages, while isolating each jobs user
+allocation in its own cpuset.  To do this, construct a large
+mem_exclusive cpuset to hold all the jobs, and construct child,
+non-mem_exclusive cpusets for each individual job.  Only a small
+amount of typical kernel memory, such as requests from interrupt
+handlers, is allowed to be taken outside even a mem_exclusive cpuset.
+
 User level code may create and destroy cpusets by name in the cpuset
 virtual file system, manage the attributes and permissions of these
 cpusets and which CPUs and Memory Nodes are assigned to each cpuset,
@@ -265,7 +277,7 @@
 impacting the scheduler code in the kernel with a check for changes
 in a tasks processor placement.
 
-There is an exception to the above.  If hotplug funtionality is used
+There is an exception to the above.  If hotplug functionality is used
 to remove all the CPUs that are currently assigned to a cpuset,
 then the kernel will automatically update the cpus_allowed of all
 tasks attached to CPUs in that cpuset to allow all CPUs.  When memory
diff -urN linux/Documentation/exception.txt linux/Documentation/exception.txt
--- linux/Documentation/exception.txt   2000/11/23 02:00:47     1.5
+++ linux/Documentation/exception.txt   2005/09/15 08:52:35     1.6
@@ -7,7 +7,7 @@
 
 In older versions of Linux this was done with the 
 int verify_area(int type, const void * addr, unsigned long size) 
-function.
+function (which has since been replaced by access_ok()).
 
 This function verified that the memory area starting at address 
 addr and of size size was accessible for the operation specified 
diff -urN linux/Documentation/feature-removal-schedule.txt 
linux/Documentation/feature-removal-schedule.txt
--- linux/Documentation/feature-removal-schedule.txt    2005/08/01 18:23:36     
1.10
+++ linux/Documentation/feature-removal-schedule.txt    2005/09/15 08:52:35     
1.11
@@ -17,23 +17,6 @@
 
 ---------------------------
 
-What:  ACPI S4bios support
-When:  May 2005
-Why:   Noone uses it, and it probably does not work, anyway. swsusp is
-       faster, more reliable, and people are actually using it.
-Who:   Pavel Machek <pavel@suse.cz>
-
----------------------------
-
-What:  PCI Name Database (CONFIG_PCI_NAMES)
-When:  July 2005
-Why:   It bloats the kernel unnecessarily, and is handled by userspace better
-       (pciutils supports it.)  Will eliminate the need to try to keep the
-       pci.ids file in sync with the sf.net database all of the time.
-Who:   Greg Kroah-Hartman <gregkh@suse.de>
-
----------------------------
-
 What:  io_remap_page_range() (macro or function)
 When:  September 2005
 Why:   Replaced by io_remap_pfn_range() which allows more memory space
@@ -51,14 +34,6 @@
 
 ---------------------------
 
-What:  register_ioctl32_conversion() / unregister_ioctl32_conversion()
-When:  April 2005
-Why:   Replaced by ->compat_ioctl in file_operations and other method
-       vecors.
-Who:   Andi Kleen <ak@muc.de>, Christoph Hellwig <hch@lst.de>
-
----------------------------
-
 What:  RCU API moves to EXPORT_SYMBOL_GPL
 When:  April 2006
 Files: include/linux/rcupdate.h, kernel/rcupdate.c
@@ -74,14 +49,6 @@
 
 ---------------------------
 
-What:  remove verify_area()
-When:  July 2006
-Files: Various uaccess.h headers.
-Why:   Deprecated and redundant. access_ok() should be used instead.
-Who:   Jesper Juhl <juhl-lkml@dif.dk>
-
----------------------------
-
 What:  IEEE1394 Audio and Music Data Transmission Protocol driver,
        Connection Management Procedures driver
 When:  November 2005
@@ -102,16 +69,6 @@
 
 ---------------------------
 
-What:  register_serial/unregister_serial
-When:  September 2005
-Why:   This interface does not allow serial ports to be registered against
-       a struct device, and as such does not allow correct power management
-       of such ports.  8250-based ports should use serial8250_register_port
-       and serial8250_unregister_port, or platform devices instead.
-Who:   Russell King <rmk@arm.linux.org.uk>
-
----------------------------
-
 What:  i2c sysfs name change: in1_ref, vid deprecated in favour of cpu0_vid
 When:  November 2005
 Files: drivers/i2c/chips/adm1025.c, drivers/i2c/chips/adm1026.c
@@ -135,3 +92,15 @@
        pcmciautils package available at
        http://kernel.org/pub/linux/utils/kernel/pcmcia/
 Who:   Dominik Brodowski <linux@brodo.de>
+
+---------------------------
+
+What:  ip_queue and ip6_queue (old ipv4-only and ipv6-only netfilter queue)
+When:  December 2005
+Why:   This interface has been obsoleted by the new layer3-independent
+       "nfnetlink_queue".  The Kernel interface is compatible, so the old
+       ip[6]tables "QUEUE" targets still work and will transparently handle
+       all packets into nfnetlink queue number 0.  Userspace users will have
+       to link against API-compatible library on top of libnfnetlink_queue 
+       instead of the current 'libipq'.
+Who:   Harald Welte <laforge@netfilter.org>
diff -urN linux/Documentation/ibm-acpi.txt linux/Documentation/ibm-acpi.txt
--- linux/Documentation/ibm-acpi.txt    2004/11/15 11:49:12     1.1
+++ linux/Documentation/ibm-acpi.txt    2005/09/15 08:52:35     1.2
@@ -1,16 +1,16 @@
                    IBM ThinkPad ACPI Extras Driver
 
-                            Version 0.8
-                          8 November 2004
+                            Version 0.12
+                           17 August 2005
 
                Borislav Deianov <borislav@users.sf.net>
                      http://ibm-acpi.sf.net/
 
 
-This is a Linux ACPI driver for the IBM ThinkPad laptops. It aims to
-support various features of these laptops which are accessible through
-the ACPI framework but not otherwise supported by the generic Linux
-ACPI drivers.
+This is a Linux ACPI driver for the IBM ThinkPad laptops. It supports
+various features of these laptops which are accessible through the
+ACPI framework but not otherwise supported by the generic Linux ACPI
+drivers.
 
 
 Status
@@ -25,9 +25,14 @@
        - ThinkLight on and off
        - limited docking and undocking
        - UltraBay eject
-       - Experimental: CMOS control
-       - Experimental: LED control
-       - Experimental: ACPI sounds
+       - CMOS control
+       - LED control
+       - ACPI sounds
+       - temperature sensors
+       - Experimental: embedded controller register dump
+       - Experimental: LCD brightness control
+       - Experimental: volume control
+       - Experimental: fan speed, fan enable/disable
 
 A compatibility table by model and feature is maintained on the web
 site, http://ibm-acpi.sf.net/. I appreciate any success or failure
@@ -91,12 +96,12 @@
 commands supported by the various features is guaranteed to change
 frequently.
 
-Driver Version -- /proc/acpi/ibm/driver
---------------------------------------
+Driver version -- /proc/acpi/ibm/driver
+---------------------------------------
 
 The driver name and version. No commands can be written to this file.
 
-Hot Keys -- /proc/acpi/ibm/hotkey
+Hot keys -- /proc/acpi/ibm/hotkey
 ---------------------------------
 
 Without this driver, only the Fn-F4 key (sleep button) generates an
@@ -188,7 +193,7 @@
 the flickering or video corruption can be avoided.
 
 The video_switch command cycles through the available video outputs
-(it sumulates the behavior of Fn-F7).
+(it simulates the behavior of Fn-F7).
 
 Video expansion can be toggled through this feature. This controls
 whether the display is expanded to fill the entire LCD screen when a
@@ -201,6 +206,12 @@
 features of this driver, as it uses the same ACPI methods as
 Fn-F7. Video switching on the console should still work.
 
+UPDATE: There's now a patch for the X.org Radeon driver which
+addresses this issue. Some people are reporting success with the patch
+while others are still having problems. For more information:
+
+https://bugs.freedesktop.org/show_bug.cgi?id=2000
+
 ThinkLight control -- /proc/acpi/ibm/light
 ------------------------------------------
 
@@ -211,7 +222,7 @@
        echo on  > /proc/acpi/ibm/light
        echo off > /proc/acpi/ibm/light
 
-Docking / Undocking -- /proc/acpi/ibm/dock
+Docking / undocking -- /proc/acpi/ibm/dock
 ------------------------------------------
 
 Docking and undocking (e.g. with the X4 UltraBase) requires some
@@ -228,11 +239,15 @@
 when originally booted. This is due to the current lack of support for
 hot plugging of devices in the Linux ACPI framework. If the laptop was
 booted while not in the dock, the following message is shown in the
-logs: "ibm_acpi: dock device not present". No dock-related events are
-generated but the dock and undock commands described below still
-work. They can be executed manually or triggered by Fn key
-combinations (see the example acpid configuration files included in
-the driver tarball package available on the web site).
+logs:
+
+       Mar 17 01:42:34 aero kernel: ibm_acpi: dock device not present
+
+In this case, no dock-related events are generated but the dock and
+undock commands described below still work. They can be executed
+manually or triggered by Fn key combinations (see the example acpid
+configuration files included in the driver tarball package available
+on the web site).
 
 When the eject request button on the dock is pressed, the first event
 above is generated. The handler for this event should issue the
@@ -267,7 +282,7 @@
 UltraBase docks and "dumb" port replicators like the Mini Dock (the
 latter don't need any ACPI support, actually).
 
-UltraBay Eject -- /proc/acpi/ibm/bay
+UltraBay eject -- /proc/acpi/ibm/bay
 ------------------------------------
 
 Inserting or ejecting an UltraBay device requires some actions to be
@@ -284,8 +299,11 @@
 is in the dock, so it may not be present if the laptop was undocked).
 This is due to the current lack of support for hot plugging of devices
 in the Linux ACPI framework. If the laptop was booted without the
-UltraBay, the following message is shown in the logs: "ibm_acpi: bay
-device not present". No bay-related events are generated but the eject
+UltraBay, the following message is shown in the logs:
+
+       Mar 17 01:42:34 aero kernel: ibm_acpi: bay device not present
+
+In this case, no bay-related events are generated but the eject
 command described below still works. It can be executed manually or
 triggered by a hot key combination.
 
@@ -306,22 +324,33 @@
 The contents of the /proc/acpi/ibm/bay file shows the current status
 of the UltraBay, as provided by the ACPI framework.
 
-Experimental Features
----------------------
+EXPERIMENTAL warm eject support on the 600e/x, A22p and A3x (To use
+this feature, you need to supply the experimental=1 parameter when
+loading the module):
+
+These models do not have a button near the UltraBay device to request
+a hot eject but rather require the laptop to be put to sleep
+(suspend-to-ram) before the bay device is ejected or inserted).
+The sequence of steps to eject the device is as follows:
+
+       echo eject > /proc/acpi/ibm/bay
+       put the ThinkPad to sleep
+       remove the drive
+       resume from sleep
+       cat /proc/acpi/ibm/bay should show that the drive was removed
 
-The following features are marked experimental because using them
-involves guessing the correct values of some parameters. Guessing
-incorrectly may have undesirable effects like crashing your
-ThinkPad. USE THESE WITH CAUTION! To activate them, you'll need to
-supply the experimental=1 parameter when loading the module.
+On the A3x, both the UltraBay 2000 and UltraBay Plus devices are
+supported. Use "eject2" instead of "eject" for the second bay.
 
-Experimental: CMOS control - /proc/acpi/ibm/cmos
-------------------------------------------------
+Note: the UltraBay eject support on the 600e/x, A22p and A3x is
+EXPERIMENTAL and may not work as expected. USE WITH CAUTION!
+
+CMOS control -- /proc/acpi/ibm/cmos
+-----------------------------------
 
 This feature is used internally by the ACPI firmware to control the
-ThinkLight on most newer ThinkPad models. It appears that it can also
-control LCD brightness, sounds volume and more, but only on some
-models.
+ThinkLight on most newer ThinkPad models. It may also control LCD
+brightness, sounds volume and more, but only on some models.
 
 The commands are non-negative integer numbers:
 
@@ -330,10 +359,9 @@
        echo 2 >/proc/acpi/ibm/cmos
        ...
 
-The range of numbers which are used internally by various models is 0
-to 21, but it's possible that numbers outside this range have
-interesting behavior. Here is the behavior on the X40 (tpb is the
-ThinkPad Buttons utility):
+The range of valid numbers is 0 to 21, but not all have an effect and
+the behavior varies from model to model. Here is the behavior on the
+X40 (tpb is the ThinkPad Buttons utility):
 
        0 - no effect but tpb reports "Volume down"
        1 - no effect but tpb reports "Volume up"
@@ -346,26 +374,18 @@
        13 - ThinkLight off
        14 - no effect but tpb reports ThinkLight status change
 
-If you try this feature, please send me a report similar to the
-above. On models which allow control of LCD brightness or sound
-volume, I'd like to provide this functionality in an user-friendly
-way, but first I need a way to identify the models which this is
-possible.
-
-Experimental: LED control - /proc/acpi/ibm/LED
-----------------------------------------------
+LED control -- /proc/acpi/ibm/led
+---------------------------------
 
 Some of the LED indicators can be controlled through this feature. The
 available commands are:
 
-       echo <led number> on >/proc/acpi/ibm/led
-       echo <led number> off >/proc/acpi/ibm/led
-       echo <led number> blink >/proc/acpi/ibm/led
-
-The <led number> parameter is a non-negative integer. The range of LED
-numbers used internally by various models is 0 to 7 but it's possible
-that numbers outside this range are also valid. Here is the mapping on
-the X40:
+       echo '<led number> on' >/proc/acpi/ibm/led
+       echo '<led number> off' >/proc/acpi/ibm/led
+       echo '<led number> blink' >/proc/acpi/ibm/led
+
+The <led number> range is 0 to 7. The set of LEDs that can be
+controlled varies from model to model. Here is the mapping on the X40:
 
        0 - power
        1 - battery (orange)
@@ -376,49 +396,224 @@
 
 All of the above can be turned on and off and can be made to blink.
 
-If you try this feature, please send me a report similar to the
-above. I'd like to provide this functionality in an user-friendly way,
-but first I need to identify the which numbers correspond to which
-LEDs on various models.
-
-Experimental: ACPI sounds - /proc/acpi/ibm/beep
------------------------------------------------
+ACPI sounds -- /proc/acpi/ibm/beep
+----------------------------------
 
 The BEEP method is used internally by the ACPI firmware to provide
-audible alerts in various situtation. This feature allows the same
+audible alerts in various situations. This feature allows the same
 sounds to be triggered manually.
 
 The commands are non-negative integer numbers:
 
-       echo 0 >/proc/acpi/ibm/beep
-       echo 1 >/proc/acpi/ibm/beep
-       echo 2 >/proc/acpi/ibm/beep
-       ...
+       echo <number> >/proc/acpi/ibm/beep
 
-The range of numbers which are used internally by various models is 0
-to 17, but it's possible that numbers outside this range are also
-valid. Here is the behavior on the X40:
+The valid <number> range is 0 to 17. Not all numbers trigger sounds
+and the sounds vary from model to model. Here is the behavior on the
+X40:
 
-       2 - two beeps, pause, third beep
+       0 - stop a sound in progress (but use 17 to stop 16)
+       2 - two beeps, pause, third beep ("low battery")
        3 - single beep
-       4 - "unable"    
+       4 - high, followed by low-pitched beep ("unable")
        5 - single beep
-       6 - "AC/DC"
+       6 - very high, followed by high-pitched beep ("AC/DC")
        7 - high-pitched beep
        9 - three short beeps
        10 - very long beep
        12 - low-pitched beep
+       15 - three high-pitched beeps repeating constantly, stop with 0
+       16 - one medium-pitched beep repeating constantly, stop with 17
+       17 - stop 16
+
+Temperature sensors -- /proc/acpi/ibm/thermal
+---------------------------------------------
+
+Most ThinkPads include six or more separate temperature sensors but
+only expose the CPU temperature through the standard ACPI methods.
+This feature shows readings from up to eight different sensors. Some
+readings may not be valid, e.g. may show large negative values. For
+example, on the X40, a typical output may be:
+
+temperatures:   42 42 45 41 36 -128 33 -128
+
+Thomas Gruber took his R51 apart and traced all six active sensors in
+his laptop (the location of sensors may vary on other models):
+
+1:  CPU
+2:  Mini PCI Module
+3:  HDD
+4:  GPU
+5:  Battery
+6:  N/A
+7:  Battery
+8:  N/A
+
+No commands can be written to this file.
+
+EXPERIMENTAL: Embedded controller reigster dump -- /proc/acpi/ibm/ecdump
+------------------------------------------------------------------------
+
+This feature is marked EXPERIMENTAL because the implementation
+directly accesses hardware registers and may not work as expected. USE
+WITH CAUTION! To use this feature, you need to supply the
+experimental=1 parameter when loading the module.
+
+This feature dumps the values of 256 embedded controller
+registers. Values which have changed since the last time the registers
+were dumped are marked with a star:
+
+[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump 
+EC       +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
+EC 0x00:  a7  47  87  01  fe  96  00  08  01  00  cb  00  00  00  40  00
+EC 0x10:  00  00  ff  ff  f4  3c  87  09  01  ff  42  01  ff  ff  0d  00
+EC 0x20:  00  00  00  00  00  00  00  00  00  00  00  03  43  00  00  80
+EC 0x30:  01  07  1a  00  30  04  00  00 *85  00  00  10  00  50  00  00
+EC 0x40:  00  00  00  00  00  00  14  01  00  04  00  00  00  00  00  00
+EC 0x50:  00  c0  02  0d  00  01  01  02  02  03  03  03  03 *bc *02 *bc
+EC 0x60: *02 *bc *02  00  00  00  00  00  00  00  00  00  00  00  00  00
+EC 0x70:  00  00  00  00  00  12  30  40 *24 *26 *2c *27 *20  80 *1f  80
+EC 0x80:  00  00  00  06 *37 *0e  03  00  00  00  0e  07  00  00  00  00
+EC 0x90:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+EC 0xa0: *ff  09  ff  09  ff  ff *64  00 *00 *00 *a2  41 *ff *ff *e0  00
+EC 0xb0:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+EC 0xc0:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+EC 0xd0:  03  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+EC 0xe0:  00  00  00  00  00  00  00  00  11  20  49  04  24  06  55  03
+EC 0xf0:  31  55  48  54  35  38  57  57  08  2f  45  73  07  65  6c  1a
+
+This feature can be used to determine the register holding the fan
+speed on some models. To do that, do the following:
+
+       - make sure the battery is fully charged
+       - make sure the fan is running
+       - run 'cat /proc/acpi/ibm/ecdump' several times, once per second or so
+
+The first step makes sure various charging-related values don't
+vary. The second ensures that the fan-related values do vary, since
+the fan speed fluctuates a bit. The third will (hopefully) mark the
+fan register with a star:
+
+[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump 
+EC       +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
+EC 0x00:  a7  47  87  01  fe  96  00  08  01  00  cb  00  00  00  40  00
+EC 0x10:  00  00  ff  ff  f4  3c  87  09  01  ff  42  01  ff  ff  0d  00
+EC 0x20:  00  00  00  00  00  00  00  00  00  00  00  03  43  00  00  80
+EC 0x30:  01  07  1a  00  30  04  00  00  85  00  00  10  00  50  00  00
+EC 0x40:  00  00  00  00  00  00  14  01  00  04  00  00  00  00  00  00
+EC 0x50:  00  c0  02  0d  00  01  01  02  02  03  03  03  03  bc  02  bc
+EC 0x60:  02  bc  02  00  00  00  00  00  00  00  00  00  00  00  00  00
+EC 0x70:  00  00  00  00  00  12  30  40  24  27  2c  27  21  80  1f  80
+EC 0x80:  00  00  00  06 *be  0d  03  00  00  00  0e  07  00  00  00  00
+EC 0x90:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+EC 0xa0:  ff  09  ff  09  ff  ff  64  00  00  00  a2  41  ff  ff  e0  00
+EC 0xb0:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+EC 0xc0:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+EC 0xd0:  03  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+EC 0xe0:  00  00  00  00  00  00  00  00  11  20  49  04  24  06  55  03
+EC 0xf0:  31  55  48  54  35  38  57  57  08  2f  45  73  07  65  6c  1a
+
+Another set of values that varies often is the temperature
+readings. Since temperatures don't change vary fast, you can take
+several quick dumps to eliminate them.
+
+You can use a similar method to figure out the meaning of other
+embedded controller registers - e.g. make sure nothing else changes
+except the charging or discharging battery to determine which
+registers contain the current battery capacity, etc. If you experiment
+with this, do send me your results (including some complete dumps with
+a description of the conditions when they were taken.)
+
+EXPERIMENTAL: LCD brightness control -- /proc/acpi/ibm/brightness
+-----------------------------------------------------------------
+
+This feature is marked EXPERIMENTAL because the implementation
+directly accesses hardware registers and may not work as expected. USE
+WITH CAUTION! To use this feature, you need to supply the
+experimental=1 parameter when loading the module.
+
+This feature allows software control of the LCD brightness on ThinkPad
+models which don't have a hardware brightness slider. The available
+commands are:
+
+       echo up   >/proc/acpi/ibm/brightness
+       echo down >/proc/acpi/ibm/brightness
+       echo 'level <level>' >/proc/acpi/ibm/brightness
+
+The <level> number range is 0 to 7, although not all of them may be
+distinct. The current brightness level is shown in the file.
+
+EXPERIMENTAL: Volume control -- /proc/acpi/ibm/volume
+-----------------------------------------------------
+
+This feature is marked EXPERIMENTAL because the implementation
+directly accesses hardware registers and may not work as expected. USE
+WITH CAUTION! To use this feature, you need to supply the
+experimental=1 parameter when loading the module.
+
+This feature allows volume control on ThinkPad models which don't have
+a hardware volume knob. The available commands are:
+
+       echo up   >/proc/acpi/ibm/volume
+       echo down >/proc/acpi/ibm/volume
+       echo mute >/proc/acpi/ibm/volume
+       echo 'level <level>' >/proc/acpi/ibm/volume
+
+The <level> number range is 0 to 15 although not all of them may be
+distinct. The unmute the volume after the mute command, use either the
+up or down command (the level command will not unmute the volume).
+The current volume level and mute state is shown in the file.
+
+EXPERIMENTAL: fan speed, fan enable/disable -- /proc/acpi/ibm/fan
+-----------------------------------------------------------------
+
+This feature is marked EXPERIMENTAL because the implementation
+directly accesses hardware registers and may not work as expected. USE
+WITH CAUTION! To use this feature, you need to supply the
+experimental=1 parameter when loading the module.
+
+This feature attempts to show the current fan speed. The speed is read
+directly from the hardware registers of the embedded controller. This
+is known to work on later R, T and X series ThinkPads but may show a
+bogus value on other models.
+
+The fan may be enabled or disabled with the following commands:
+
+       echo enable  >/proc/acpi/ibm/fan
+       echo disable >/proc/acpi/ibm/fan
+
+WARNING WARNING WARNING: do not leave the fan disabled unless you are
+monitoring the temperature sensor readings and you are ready to enable
+it if necessary to avoid overheating.
+
+The fan only runs if it's enabled *and* the various temperature
+sensors which control it read high enough. On the X40, this seems to
+depend on the CPU and HDD temperatures. Specifically, the fan is
+turned on when either the CPU temperature climbs to 56 degrees or the
+HDD temperature climbs to 46 degrees. The fan is turned off when the
+CPU temperature drops to 49 degrees and the HDD temperature drops to
+41 degrees. These thresholds cannot currently be controlled.
+
+On the X31 and X40 (and ONLY on those models), the fan speed can be
+controlled to a certain degree. Once the fan is running, it can be
+forced to run faster or slower with the following command:
+
+       echo 'speed <speed>' > /proc/acpi/ibm/thermal
+
+The sustainable range of fan speeds on the X40 appears to be from
+about 3700 to about 7350. Values outside this range either do not have
+any effect or the fan speed eventually settles somewhere in that
+range. The fan cannot be stopped or started with this command.
+
+On the 570, temperature readings are not available through this
+feature and the fan control works a little differently. The fan speed
+is reported in levels from 0 (off) to 7 (max) and can be controlled
+with the following command:
 
-(I've only been able to identify a couple of them).
-
-If you try this feature, please send me a report similar to the
-above. I'd like to provide this functionality in an user-friendly way,
-but first I need to identify the which numbers correspond to which
-sounds on various models.
+       echo 'level <level>' > /proc/acpi/ibm/thermal
 
 
-Multiple Command, Module Parameters
------------------------------------
+Multiple Commands, Module Parameters
+------------------------------------
 
 Multiple commands can be written to the proc files in one shot by
 separating them with commas, for example:
@@ -451,24 +646,19 @@
        /usr/local/sbin/laptop_mode -- from the Linux kernel source
                distribution, see Documentation/laptop-mode.txt
        /sbin/service -- comes with Redhat/Fedora distributions
+       /usr/sbin/hibernate -- from the Software Suspend 2 distribution,
+               see http://softwaresuspend.berlios.de/
 
-Toan T Nguyen <ntt@control.uchicago.edu> has written a SuSE powersave
-script for the X20, included in config/usr/sbin/ibm_hotkeys_X20
+Toan T Nguyen <ntt@physics.ucla.edu> notes that Suse uses the
+powersave program to suspend ('powersave --suspend-to-ram') or
+hibernate ('powersave --suspend-to-disk'). This means that the
+hibernate script is not needed on that distribution.
 
 Henrik Brix Andersen <brix@gentoo.org> has written a Gentoo ACPI event
 handler script for the X31. You can get the latest version from
 http://dev.gentoo.org/~brix/files/x31.sh
 
 David Schweikert <dws@ee.eth.ch> has written an alternative blank.sh
-script which works on Debian systems, included in
-configs/etc/acpi/actions/blank-debian.sh
-
-
-TODO
-----
-
-I'd like to implement the following features but haven't yet found the
-time and/or I don't yet know how to implement them:
-
-- UltraBay floppy drive support
-
+script which works on Debian systems. This scripts has now been
+extended to also work on Fedora systems and included as the default
+blank.sh in the distribution.
diff -urN linux/Documentation/kernel-parameters.txt 
linux/Documentation/kernel-parameters.txt
--- linux/Documentation/kernel-parameters.txt   2005/08/24 16:22:47     1.63
+++ linux/Documentation/kernel-parameters.txt   2005/09/15 08:52:35     1.64
@@ -164,6 +164,15 @@
                        over-ride platform specific driver.
                        See also Documentation/acpi-hotkey.txt.
 
+       enable_timer_pin_1 [i386,x86-64]
+                       Enable PIN 1 of APIC timer
+                       Can be useful to work around chipset bugs (in 
particular on some ATI chipsets)
+                       The kernel tries to set a reasonable default.
+
+       disable_timer_pin_1 [i386,x86-64]
+                       Disable PIN 1 of APIC timer
+                       Can be useful to work around chipset bugs.
+
        ad1816=         [HW,OSS]
                        Format: <io>,<irq>,<dma>,<dma2>
                        See also Documentation/sound/oss/AD1816.
@@ -549,6 +558,7 @@
                             keyboard and can not control its state
                             (Don't attempt to blink the leds)
        i8042.noaux     [HW] Don't check for auxiliary (== mouse) port
+       i8042.nokbd     [HW] Don't check/create keyboard port
        i8042.nomux     [HW] Don't check presence of an active multiplexing
                             controller
        i8042.nopnp     [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
@@ -1174,6 +1184,11 @@
                        New name for the ramdisk parameter.
                        See Documentation/ramdisk.txt.
 
+       rdinit=         [KNL]
+                       Format: <full_path>
+                       Run specified binary instead of /init from the ramdisk,
+                       used for early userspace startup. See initrd.
+
        reboot=         [BUGS=IA-32,BUGS=ARM,BUGS=IA-64] Rebooting mode
                        Format: <reboot_mode>[,<reboot_mode2>[,...]]
                        See arch/*/kernel/reboot.c.
diff -urN linux/Documentation/mono.txt linux/Documentation/mono.txt
--- linux/Documentation/mono.txt        2004/04/12 20:23:21     1.1
+++ linux/Documentation/mono.txt        2005/09/15 08:52:35     1.2
@@ -30,7 +30,7 @@
    Read the file 'binfmt_misc.txt' in this directory to know
    more about the configuration process.
 
-3) Add the following enries to /etc/rc.local or similar script
+3) Add the following entries to /etc/rc.local or similar script
    to be run at system startup:
 
 # Insert BINFMT_MISC module into the kernel
diff -urN linux/Documentation/pci.txt linux/Documentation/pci.txt
--- linux/Documentation/pci.txt 2005/08/24 16:22:47     1.28
+++ linux/Documentation/pci.txt 2005/09/15 08:52:35     1.29
@@ -84,7 +84,7 @@
 
 Most drivers don't need to use the driver_data field.  Best practice
 for use of driver_data is to use it as an index into a static list of
-equivalant device types, not to use it as a pointer.
+equivalent device types, not to use it as a pointer.
 
 Have a table entry {PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID}
 to have probe() called for every PCI device known to the system.
diff -urN linux/Documentation/sonypi.txt linux/Documentation/sonypi.txt
--- linux/Documentation/sonypi.txt      2004/11/15 11:49:12     1.14
+++ linux/Documentation/sonypi.txt      2005/09/15 08:52:35     1.15
@@ -99,6 +99,7 @@
                                SONYPI_MEYE_MASK                0x0400
                                SONYPI_MEMORYSTICK_MASK         0x0800
                                SONYPI_BATTERY_MASK             0x1000
+                               SONYPI_WIRELESS_MASK            0x2000
 
        useinput:       if set (which is the default) two input devices are
                        created, one which interprets the jogdial events as
@@ -137,6 +138,15 @@
          speed handling etc). Use ACPI instead of APM if it works on your
          laptop.
 
+       - sonypi lacks the ability to distinguish between certain key
+         events on some models.
+
+       - some models with the nvidia card (geforce go 6200 tc) uses a
+         different way to adjust the backlighting of the screen. There
+         is a userspace utility to adjust the brightness on those models,
+         which can be downloaded from
+         http://www.acc.umu.se/~erikw/program/smartdimmer-0.1.tar.bz2
+
        - since all development was done by reverse engineering, there is
          _absolutely no guarantee_ that this driver will not crash your
          laptop. Permanently.
diff -urN linux/Documentation/sparse.txt linux/Documentation/sparse.txt
--- linux/Documentation/sparse.txt      2005/01/13 14:05:14     1.1
+++ linux/Documentation/sparse.txt      2005/09/15 08:52:35     1.2
@@ -57,7 +57,7 @@
 
 and DaveJ has tar-balls at
 
-       http://www.codemonkey.org.uk/projects/bitkeeper/sparse/
+       http://www.codemonkey.org.uk/projects/git-snapshots/sparse/
 
 
 Once you have it, just do
diff -urN linux/Documentation/sysrq.txt linux/Documentation/sysrq.txt
--- linux/Documentation/sysrq.txt       2005/07/11 20:45:51     1.19
+++ linux/Documentation/sysrq.txt       2005/09/15 08:52:35     1.20
@@ -171,7 +171,7 @@
 Next, you must create a sysrq_key_op struct, and populate it with A) the key
 handler function you will use, B) a help_msg string, that will print when SysRQ
 prints help, and C) an action_msg string, that will print right before your
-handler is called. Your handler must conform to the protoype in 'sysrq.h'.
+handler is called. Your handler must conform to the prototype in 'sysrq.h'.
 
 After the sysrq_key_op is created, you can call the macro 
 register_sysrq_key(int key, struct sysrq_key_op *op_p) that is defined in
diff -urN linux/Documentation/DocBook/journal-api.tmpl 
linux/Documentation/DocBook/journal-api.tmpl
--- linux/Documentation/DocBook/journal-api.tmpl        2005/03/18 17:36:43     
1.8
+++ linux/Documentation/DocBook/journal-api.tmpl        2005/09/15 08:52:35     
1.9
@@ -116,7 +116,7 @@
 
 You still need to actually journal your filesystem changes, this
 is done by wrapping them into transactions. Additionally you
-also need to wrap the modification of each of the the buffers
+also need to wrap the modification of each of the buffers
 with calls to the journal layer, so it knows what the modifications
 you are actually making are. To do this use  journal_start() which
 returns a transaction handle.
@@ -128,7 +128,7 @@
 are nestable calls, so you can reenter a transaction if necessary,
 but remember you must call journal_stop() the same number of times as
 journal_start() before the transaction is completed (or more accurately
-leaves the the update phase). Ext3/VFS makes use of this feature to simplify 
+leaves the update phase). Ext3/VFS makes use of this feature to simplify
 quota support.
 </para>
 
diff -urN linux/Documentation/DocBook/kernel-hacking.tmpl 
linux/Documentation/DocBook/kernel-hacking.tmpl
--- linux/Documentation/DocBook/kernel-hacking.tmpl     2005/03/18 17:36:43     
1.20
+++ linux/Documentation/DocBook/kernel-hacking.tmpl     2005/09/15 08:52:35     
1.21
@@ -8,8 +8,7 @@
   
   <authorgroup>
    <author>
-    <firstname>Paul</firstname>
-    <othername>Rusty</othername>
+    <firstname>Rusty</firstname>
     <surname>Russell</surname>
     <affiliation>
      <address>
@@ -20,7 +19,7 @@
   </authorgroup>
 
   <copyright>
-   <year>2001</year>
+   <year>2005</year>
    <holder>Rusty Russell</holder>
   </copyright>
 
@@ -64,7 +63,7 @@
  <chapter id="introduction">
   <title>Introduction</title>
   <para>
-   Welcome, gentle reader, to Rusty's Unreliable Guide to Linux
+   Welcome, gentle reader, to Rusty's Remarkably Unreliable Guide to Linux
    Kernel Hacking.  This document describes the common routines and
    general requirements for kernel code: its goal is to serve as a
    primer for Linux kernel development for experienced C
@@ -96,13 +95,13 @@
 
    <listitem>
     <para>
-     not associated with any process, serving a softirq, tasklet or bh;
+     not associated with any process, serving a softirq or tasklet;
     </para>
    </listitem>
 
    <listitem>
     <para>
-     running in kernel space, associated with a process;
+     running in kernel space, associated with a process (user context);
     </para>
    </listitem>
 
@@ -114,11 +113,12 @@
   </itemizedlist>
 
   <para>
-   There is a strict ordering between these: other than the last
-   category (userspace) each can only be pre-empted by those above.
-   For example, while a softirq is running on a CPU, no other
-   softirq will pre-empt it, but a hardware interrupt can.  However,
-   any other CPUs in the system execute independently.
+   There is an ordering between these.  The bottom two can preempt
+   each other, but above that is a strict hierarchy: each can only be
+   preempted by the ones above it.  For example, while a softirq is
+   running on a CPU, no other softirq will preempt it, but a hardware
+   interrupt can.  However, any other CPUs in the system execute
+   independently.
   </para>
 
   <para>
@@ -130,10 +130,10 @@
    <title>User Context</title>
 
    <para>
-    User context is when you are coming in from a system call or
-    other trap: you can sleep, and you own the CPU (except for
-    interrupts) until you call <function>schedule()</function>.  
-    In other words, user context (unlike userspace) is not pre-emptable.
+    User context is when you are coming in from a system call or other
+    trap: like userspace, you can be preempted by more important tasks
+    and by interrupts.  You can sleep, by calling
+    <function>schedule()</function>.
    </para>
 
    <note>
@@ -153,7 +153,7 @@
 
    <caution>
     <para>
-     Beware that if you have interrupts or bottom halves disabled 
+     Beware that if you have preemption or softirqs disabled
      (see below), <function>in_interrupt()</function> will return a 
      false positive.
     </para>
@@ -168,10 +168,10 @@
     <hardware>keyboard</hardware> are examples of real
     hardware which produce interrupts at any time.  The kernel runs
     interrupt handlers, which services the hardware.  The kernel
-    guarantees that this handler is never re-entered: if another
+    guarantees that this handler is never re-entered: if the same
     interrupt arrives, it is queued (or dropped).  Because it
     disables interrupts, this handler has to be fast: frequently it
-    simply acknowledges the interrupt, marks a `software interrupt'
+    simply acknowledges the interrupt, marks a 'software interrupt'
     for execution and exits.
    </para>
 
@@ -188,60 +188,52 @@
   </sect1>
 
   <sect1 id="basics-softirqs">
-   <title>Software Interrupt Context: Bottom Halves, Tasklets, softirqs</title>
+   <title>Software Interrupt Context: Softirqs and Tasklets</title>
 
    <para>
     Whenever a system call is about to return to userspace, or a
-    hardware interrupt handler exits, any `software interrupts'
+    hardware interrupt handler exits, any 'software interrupts'
     which are marked pending (usually by hardware interrupts) are
     run (<filename>kernel/softirq.c</filename>).
    </para>
 
    <para>
     Much of the real interrupt handling work is done here.  Early in
-    the transition to <acronym>SMP</acronym>, there were only `bottom 
+    the transition to <acronym>SMP</acronym>, there were only 'bottom
     halves' (BHs), which didn't take advantage of multiple CPUs.  Shortly 
     after we switched from wind-up computers made of match-sticks and snot,
-    we abandoned this limitation.
+    we abandoned this limitation and switched to 'softirqs'.
    </para>
 
    <para>
     <filename class="headerfile">include/linux/interrupt.h</filename> lists the
-    different BH's.  No matter how many CPUs you have, no two BHs will run at 
-    the same time. This made the transition to SMP simpler, but sucks hard for
-    scalable performance.  A very important bottom half is the timer
-    BH (<filename class="headerfile">include/linux/timer.h</filename>): you
-    can register to have it call functions for you in a given length of time.
+    different softirqs.  A very important softirq is the
+    timer softirq (<filename
+    class="headerfile">include/linux/timer.h</filename>): you can
+    register to have it call functions for you in a given length of
+    time.
    </para>
 
    <para>
-    2.3.43 introduced softirqs, and re-implemented the (now
-    deprecated) BHs underneath them.  Softirqs are fully-SMP
-    versions of BHs: they can run on as many CPUs at once as
-    required.  This means they need to deal with any races in shared
-    data using their own locks.  A bitmask is used to keep track of
-    which are enabled, so the 32 available softirqs should not be
-    used up lightly.  (<emphasis>Yes</emphasis>, people will
-    notice).
-   </para>
-
-   <para>
-    tasklets (<filename 
class="headerfile">include/linux/interrupt.h</filename>)
-    are like softirqs, except they are dynamically-registrable (meaning you 
-    can have as many as you want), and they also guarantee that any tasklet 
-    will only run on one CPU at any time, although different tasklets can 
-    run simultaneously (unlike different BHs).  
+    Softirqs are often a pain to deal with, since the same softirq
+    will run simultaneously on more than one CPU.  For this reason,
+    tasklets (<filename
+    class="headerfile">include/linux/interrupt.h</filename>) are more
+    often used: they are dynamically-registrable (meaning you can have
+    as many as you want), and they also guarantee that any tasklet
+    will only run on one CPU at any time, although different tasklets
+    can run simultaneously.
    </para>
    <caution>
     <para>
-     The name `tasklet' is misleading: they have nothing to do with `tasks', 
+     The name 'tasklet' is misleading: they have nothing to do with 'tasks',
      and probably more to do with some bad vodka Alexey Kuznetsov had at the 
      time.
     </para>
    </caution>
 
    <para>
-    You can tell you are in a softirq (or bottom half, or tasklet)
+    You can tell you are in a softirq (or tasklet)
     using the <function>in_softirq()</function> macro 
     (<filename class="headerfile">include/linux/interrupt.h</filename>).
    </para>
@@ -288,11 +280,10 @@
     <term>A rigid stack limit</term>
     <listitem>
      <para>
-      The kernel stack is about 6K in 2.2 (for most
-      architectures: it's about 14K on the Alpha), and shared
-      with interrupts so you can't use it all.  Avoid deep
-      recursion and huge local arrays on the stack (allocate
-      them dynamically instead).
+      Depending on configuration options the kernel stack is about 3K to 6K 
for most 32-bit architectures: it's
+      about 14K on most 64-bit archs, and often shared with interrupts
+      so you can't use it all.  Avoid deep recursion and huge local
+      arrays on the stack (allocate them dynamically instead).
      </para>
     </listitem>
    </varlistentry>
@@ -339,7 +330,7 @@
 
   <para>
    If all your routine does is read or write some parameter, consider
-   implementing a <function>sysctl</function> interface instead.
+   implementing a <function>sysfs</function> interface instead.
   </para>
 
   <para>
@@ -417,7 +408,10 @@
   </para>
 
   <para>
-   You will eventually lock up your box if you break these rules.  
+   You should always compile your kernel
+   <symbol>CONFIG_DEBUG_SPINLOCK_SLEEP</symbol> on, and it will warn
+   you if you break these rules.  If you <emphasis>do</emphasis> break
+   the rules, you will eventually lock up your box.
   </para>
 
   <para>
@@ -515,8 +509,7 @@
       success).
      </para>
     </caution>
-    [Yes, this moronic interface makes me cringe.  Please submit a
-    patch and become my hero --RR.]
+    [Yes, this moronic interface makes me cringe.  The flamewar comes up every 
year or so. --RR.]
    </para>
    <para>
     The functions may sleep implicitly. This should never be called
@@ -587,10 +580,11 @@
    </variablelist>
 
    <para>
-    If you see a <errorname>kmem_grow: Called nonatomically from int
-    </errorname> warning message you called a memory allocation function
-    from interrupt context without <constant>GFP_ATOMIC</constant>.
-    You should really fix that.  Run, don't walk.
+    If you see a <errorname>sleeping function called from invalid
+    context</errorname> warning message, then maybe you called a
+    sleeping allocation function from interrupt context without
+    <constant>GFP_ATOMIC</constant>.  You should really fix that.
+    Run, don't walk.
    </para>
 
    <para>
@@ -639,16 +633,16 @@
   </sect1>
 
   <sect1 id="routines-udelay">
-   <title><function>udelay()</function>/<function>mdelay()</function>
+   <title><function>mdelay()</function>/<function>udelay()</function>
      <filename class="headerfile">include/asm/delay.h</filename>
      <filename class="headerfile">include/linux/delay.h</filename>
    </title>
 
    <para>
-    The <function>udelay()</function> function can be used for small pauses.
-    Do not use large values with <function>udelay()</function> as you risk
+    The <function>udelay()</function> and <function>ndelay()</function> 
functions can be used for small pauses.
+    Do not use large values with them as you risk
     overflow - the helper function <function>mdelay()</function> is useful
-    here, or even consider <function>schedule_timeout()</function>.
+    here, or consider <function>msleep()</function>.
    </para> 
   </sect1>
  
@@ -698,8 +692,8 @@
     These routines disable soft interrupts on the local CPU, and
     restore them.  They are reentrant; if soft interrupts were
     disabled before, they will still be disabled after this pair
-    of functions has been called.  They prevent softirqs, tasklets
-    and bottom halves from running on the current CPU.
+    of functions has been called.  They prevent softirqs and tasklets
+    from running on the current CPU.
    </para>
   </sect1>
 
@@ -708,10 +702,16 @@
     <filename class="headerfile">include/asm/smp.h</filename></title>
    
    <para>
-    <function>smp_processor_id()</function> returns the current
-    processor number, between 0 and <symbol>NR_CPUS</symbol> (the
-    maximum number of CPUs supported by Linux, currently 32).  These
-    values are not necessarily continuous.
+    <function>get_cpu()</function> disables preemption (so you won't
+    suddenly get moved to another CPU) and returns the current
+    processor number, between 0 and <symbol>NR_CPUS</symbol>.  Note
+    that the CPU numbers are not necessarily continuous.  You return
+    it again with <function>put_cpu()</function> when you are done.
+   </para>
+   <para>
+    If you know you cannot be preempted by another task (ie. you are
+    in interrupt context, or have preemption disabled) you can use
+    smp_processor_id().
    </para>
   </sect1>
 
@@ -722,19 +722,14 @@
    <para>
     After boot, the kernel frees up a special section; functions
     marked with <type>__init</type> and data structures marked with
-    <type>__initdata</type> are dropped after boot is complete (within
-    modules this directive is currently ignored).  <type>__exit</type>
+    <type>__initdata</type> are dropped after boot is complete: similarly
+    modules discard this memory after initialization.  <type>__exit</type>
     is used to declare a function which is only required on exit: the
     function will be dropped if this file is not compiled as a module.
     See the header file for use. Note that it makes no sense for a function
     marked with <type>__init</type> to be exported to modules with 
     <function>EXPORT_SYMBOL()</function> - this will break.
    </para>
-   <para>
-   Static data structures marked as <type>__initdata</type> must be initialised
-   (as opposed to ordinary static data which is zeroed BSS) and cannot be 
-   <type>const</type>.
-   </para> 
 
   </sect1>
 
@@ -762,9 +757,8 @@
    <para>
     The function can return a negative error number to cause
     module loading to fail (unfortunately, this has no effect if
-    the module is compiled into the kernel).  For modules, this is
-    called in user context, with interrupts enabled, and the
-    kernel lock held, so it can sleep.
+    the module is compiled into the kernel).  This function is
+    called in user context with interrupts enabled, so it can sleep.
    </para>
   </sect1>
   
@@ -779,6 +773,34 @@
     reached zero.  This function can also sleep, but cannot fail:
     everything must be cleaned up by the time it returns.
    </para>
+
+   <para>
+    Note that this macro is optional: if it is not present, your
+    module will not be removable (except for 'rmmod -f').
+   </para>
+  </sect1>
+
+  <sect1 id="routines-module-use-counters">
+   <title> 
<function>try_module_get()</function>/<function>module_put()</function>
+    <filename class="headerfile">include/linux/module.h</filename></title>
+
+   <para>
+    These manipulate the module usage count, to protect against
+    removal (a module also can't be removed if another module uses one
+    of its exported symbols: see below).  Before calling into module
+    code, you should call <function>try_module_get()</function> on
+    that module: if it fails, then the module is being removed and you
+    should act as if it wasn't there.  Otherwise, you can safely enter
+    the module, and call <function>module_put()</function> when you're
+    finished.
+   </para>
+
+   <para>
+   Most registerable structures have an
+   <structfield>owner</structfield> field, such as in the
+   <structname>file_operations</structname> structure. Set this field
+   to the macro <symbol>THIS_MODULE</symbol>.
+   </para>
   </sect1>
 
  <!-- add info on new-style module refcounting here -->
@@ -821,7 +843,7 @@
     There is a macro to do this:
     <function>wait_event_interruptible()</function>
 
-    <filename class="headerfile">include/linux/sched.h</filename> The
+    <filename class="headerfile">include/linux/wait.h</filename> The
     first argument is the wait queue head, and the second is an
     expression which is evaluated; the macro returns
     <returnvalue>0</returnvalue> when this expression is true, or
@@ -847,10 +869,11 @@
    <para>
     Call <function>wake_up()</function>
 
-    <filename class="headerfile">include/linux/sched.h</filename>;,
+    <filename class="headerfile">include/linux/wait.h</filename>;,
     which will wake up every process in the queue.  The exception is
     if one has <constant>TASK_EXCLUSIVE</constant> set, in which case
-    the remainder of the queue will not be woken.
+    the remainder of the queue will not be woken.  There are other variants
+    of this basic function available in the same header.
    </para>
   </sect1>
  </chapter>
@@ -863,7 +886,7 @@
    first class of operations work on <type>atomic_t</type>
 
    <filename class="headerfile">include/asm/atomic.h</filename>; this
-   contains a signed integer (at least 24 bits long), and you must use
+   contains a signed integer (at least 32 bits long), and you must use
    these functions to manipulate or read atomic_t variables.
    <function>atomic_read()</function> and
    <function>atomic_set()</function> get and set the counter,
@@ -882,13 +905,12 @@
 
   <para>
    Note that these functions are slower than normal arithmetic, and
-   so should not be used unnecessarily.  On some platforms they
-   are much slower, like 32-bit Sparc where they use a spinlock.
+   so should not be used unnecessarily.
   </para>
 
   <para>
-   The second class of atomic operations is atomic bit operations on a
-   <type>long</type>, defined in
+   The second class of atomic operations is atomic bit operations on an
+   <type>unsigned long</type>, defined in
 
    <filename class="headerfile">include/linux/bitops.h</filename>.  These
    operations generally take a pointer to the bit pattern, and a bit
@@ -899,7 +921,7 @@
    <function>test_and_clear_bit()</function> and
    <function>test_and_change_bit()</function> do the same thing,
    except return true if the bit was previously set; these are
-   particularly useful for very simple locking.
+   particularly useful for atomically setting flags.
   </para>
   
   <para>
@@ -907,12 +929,6 @@
    than BITS_PER_LONG.  The resulting behavior is strange on big-endian
    platforms though so it is a good idea not to do this.
   </para>
-
-  <para>
-   Note that the order of bits depends on the architecture, and in
-   particular, the bitfield passed to these operations must be at
-   least as large as a <type>long</type>.
-  </para>
  </chapter>
 
  <chapter id="symbols">
@@ -932,11 +948,8 @@
     <filename class="headerfile">include/linux/module.h</filename></title>
 
    <para>
-    This is the classic method of exporting a symbol, and it works
-    for both modules and non-modules.  In the kernel all these
-    declarations are often bundled into a single file to help
-    genksyms (which searches source files for these declarations).
-    See the comment on genksyms and Makefiles below.
+    This is the classic method of exporting a symbol: dynamically
+    loaded modules will be able to use the symbol as normal.
    </para>
   </sect1>
 
@@ -949,7 +962,8 @@
     symbols exported by <function>EXPORT_SYMBOL_GPL()</function> can
     only be seen by modules with a
     <function>MODULE_LICENSE()</function> that specifies a GPL
-    compatible license.
+    compatible license.  It implies that the function is considered
+    an internal implementation issue, and not really an interface.
    </para>
   </sect1>
  </chapter>
@@ -962,12 +976,13 @@
     <filename class="headerfile">include/linux/list.h</filename></title>
 
    <para>
-    There are three sets of linked-list routines in the kernel
-    headers, but this one seems to be winning out (and Linus has
-    used it).  If you don't have some particular pressing need for
-    a single list, it's a good choice.  In fact, I don't care
-    whether it's a good choice or not, just use it so we can get
-    rid of the others.
+    There used to be three sets of linked-list routines in the kernel
+    headers, but this one is the winner.  If you don't have some
+    particular pressing need for a single list, it's a good choice.
+   </para>
+
+   <para>
+    In particular, <function>list_for_each_entry</function> is useful.
    </para>
   </sect1>
 
@@ -979,14 +994,13 @@
     convention, and return <returnvalue>0</returnvalue> for success,
     and a negative error number
     (eg. <returnvalue>-EFAULT</returnvalue>) for failure.  This can be
-    unintuitive at first, but it's fairly widespread in the networking
-    code, for example.
+    unintuitive at first, but it's fairly widespread in the kernel.
    </para>
 
    <para>
-    The filesystem code uses <function>ERR_PTR()</function>
+    Using <function>ERR_PTR()</function>
 
-    <filename class="headerfile">include/linux/fs.h</filename>; to
+    <filename class="headerfile">include/linux/err.h</filename>; to
     encode a negative error number into a pointer, and
     <function>IS_ERR()</function> and <function>PTR_ERR()</function>
     to get it back out again: avoids a separate pointer parameter for
@@ -1040,7 +1054,7 @@
     supported, due to lack of general use, but the following are
     considered standard (see the GCC info page section "C
     Extensions" for more details - Yes, really the info page, the
-    man page is only a short summary of the stuff in info):
+    man page is only a short summary of the stuff in info).
    </para>
    <itemizedlist>
     <listitem>
@@ -1091,7 +1105,7 @@
     </listitem>
     <listitem>
      <para>
-      Function names as strings (__FUNCTION__)
+      Function names as strings (__func__).
      </para>
     </listitem>
     <listitem>
@@ -1164,63 +1178,35 @@
    <listitem>
     <para>
      Usually you want a configuration option for your kernel hack.
-     Edit <filename>Config.in</filename> in the appropriate directory
-     (but under <filename>arch/</filename> it's called
-     <filename>config.in</filename>).  The Config Language used is not
-     bash, even though it looks like bash; the safe way is to use only
-     the constructs that you already see in
-     <filename>Config.in</filename> files (see
-     <filename>Documentation/kbuild/kconfig-language.txt</filename>).
-     It's good to run "make xconfig" at least once to test (because
-     it's the only one with a static parser).
-    </para>
-
-    <para>
-     Variables which can be Y or N use <type>bool</type> followed by a
-     tagline and the config define name (which must start with
-     CONFIG_).  The <type>tristate</type> function is the same, but
-     allows the answer M (which defines
-     <symbol>CONFIG_foo_MODULE</symbol> in your source, instead of
-     <symbol>CONFIG_FOO</symbol>) if <symbol>CONFIG_MODULES</symbol>
-     is enabled.
+     Edit <filename>Kconfig</filename> in the appropriate directory.
+     The Config language is simple to use by cut and paste, and there's
+     complete documentation in
+     <filename>Documentation/kbuild/kconfig-language.txt</filename>.
     </para>
 
     <para>
      You may well want to make your CONFIG option only visible if
      <symbol>CONFIG_EXPERIMENTAL</symbol> is enabled: this serves as a
      warning to users.  There many other fancy things you can do: see
-     the various <filename>Config.in</filename> files for ideas.
+     the various <filename>Kconfig</filename> files for ideas.
     </para>
-   </listitem>
 
-   <listitem>
     <para>
-     Edit the <filename>Makefile</filename>: the CONFIG variables are
-     exported here so you can conditionalize compilation with `ifeq'.
-     If your file exports symbols then add the names to
-     <varname>export-objs</varname> so that genksyms will find them.
-     <caution>
-      <para>
-       There is a restriction on the kernel build system that objects
-       which export symbols must have globally unique names.
-       If your object does not have a globally unique name then the
-       standard fix is to move the
-       <function>EXPORT_SYMBOL()</function> statements to their own
-       object with a unique name.
-       This is why several systems have separate exporting objects,
-       usually suffixed with ksyms.
-      </para>
-     </caution>
+     In your description of the option, make sure you address both the
+     expert user and the user who knows nothing about your feature.  Mention
+     incompatibilities and issues here.  <emphasis> Definitely
+     </emphasis> end your description with <quote> if in doubt, say N
+     </quote> (or, occasionally, `Y'); this is for people who have no
+     idea what you are talking about.
     </para>
    </listitem>
 
    <listitem>
     <para>
-     Document your option in Documentation/Configure.help.  Mention
-     incompatibilities and issues here.  <emphasis> Definitely
-     </emphasis> end your description with <quote> if in doubt, say N
-     </quote> (or, occasionally, `Y'); this is for people who have no
-     idea what you are talking about.
+     Edit the <filename>Makefile</filename>: the CONFIG variables are
+     exported here so you can usually just add a "obj-$(CONFIG_xxx) +=
+     xxx.o" line.  The syntax is documented in
+     <filename>Documentation/kbuild/makefiles.txt</filename>.
     </para>
    </listitem>
 
@@ -1253,20 +1239,12 @@
   </para>
 
   <para>
-   <filename>include/linux/brlock.h:</filename>
+   <filename>include/asm-i386/delay.h:</filename>
   </para>
   <programlisting>
-extern inline void br_read_lock (enum brlock_indices idx)
-{
-        /*
-         * This causes a link-time bug message if an
-         * invalid index is used:
-         */
-        if (idx >= __BR_END)
-                __br_lock_usage_bug();
-
-        read_lock(&amp;__brlock_array[smp_processor_id()][idx]);
-}
+#define ndelay(n) (__builtin_constant_p(n) ? \
+        ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
+        __ndelay(n))
   </programlisting>
 
   <para>
diff -urN linux/Documentation/DocBook/mcabook.tmpl 
linux/Documentation/DocBook/mcabook.tmpl
--- linux/Documentation/DocBook/mcabook.tmpl    2005/03/18 17:36:43     1.2
+++ linux/Documentation/DocBook/mcabook.tmpl    2005/09/15 08:52:35     1.3
@@ -96,7 +96,7 @@
 
   <chapter id="pubfunctions">
      <title>Public Functions Provided</title>
-!Earch/i386/kernel/mca.c
+!Edrivers/mca/mca-legacy.c
   </chapter>
 
   <chapter id="dmafunctions">
diff -urN linux/Documentation/DocBook/usb.tmpl 
linux/Documentation/DocBook/usb.tmpl
--- linux/Documentation/DocBook/usb.tmpl        2005/03/18 17:36:43     1.4
+++ linux/Documentation/DocBook/usb.tmpl        2005/09/15 08:52:35     1.5
@@ -841,7 +841,7 @@
                    File modification time is not updated by this request.
                    </para><para>
                    Those struct members are from some interface descriptor
-                   applying to the the current configuration.
+                   applying to the current configuration.
                    The interface number is the bInterfaceNumber value, and
                    the altsetting number is the bAlternateSetting value.
                    (This resets each endpoint in the interface.)
diff -urN linux/Documentation/RCU/NMI-RCU.txt 
linux/Documentation/RCU/NMI-RCU.txt
--- linux/Documentation/RCU/NMI-RCU.txt 1970/01/01 00:00:00
+++ linux/Documentation/RCU/NMI-RCU.txt 2005-09-15 09:52:36.239354000 +0100     
1.1
@@ -0,0 +1,112 @@
+Using RCU to Protect Dynamic NMI Handlers
+
+
+Although RCU is usually used to protect read-mostly data structures,
+it is possible to use RCU to provide dynamic non-maskable interrupt
+handlers, as well as dynamic irq handlers.  This document describes
+how to do this, drawing loosely from Zwane Mwaikambo's NMI-timer
+work in "arch/i386/oprofile/nmi_timer_int.c" and in
+"arch/i386/kernel/traps.c".
+
+The relevant pieces of code are listed below, each followed by a
+brief explanation.
+
+       static int dummy_nmi_callback(struct pt_regs *regs, int cpu)
+       {
+               return 0;
+       }
+
+The dummy_nmi_callback() function is a "dummy" NMI handler that does
+nothing, but returns zero, thus saying that it did nothing, allowing
+the NMI handler to take the default machine-specific action.
+
+       static nmi_callback_t nmi_callback = dummy_nmi_callback;
+
+This nmi_callback variable is a global function pointer to the current
+NMI handler.
+
+       fastcall void do_nmi(struct pt_regs * regs, long error_code)
+       {
+               int cpu;
+
+               nmi_enter();
+
+               cpu = smp_processor_id();
+               ++nmi_count(cpu);
+
+               if (!rcu_dereference(nmi_callback)(regs, cpu))
+                       default_do_nmi(regs);
+
+               nmi_exit();
+       }
+
+The do_nmi() function processes each NMI.  It first disables preemption
+in the same way that a hardware irq would, then increments the per-CPU
+count of NMIs.  It then invokes the NMI handler stored in the nmi_callback
+function pointer.  If this handler returns zero, do_nmi() invokes the
+default_do_nmi() function to handle a machine-specific NMI.  Finally,
+preemption is restored.
+
+Strictly speaking, rcu_dereference() is not needed, since this code runs
+only on i386, which does not need rcu_dereference() anyway.  However,
+it is a good documentation aid, particularly for anyone attempting to
+do something similar on Alpha.
+
+Quick Quiz:  Why might the rcu_dereference() be necessary on Alpha,
+            given that the code referenced by the pointer is read-only?
+
+
+Back to the discussion of NMI and RCU...
+
+       void set_nmi_callback(nmi_callback_t callback)
+       {
+               rcu_assign_pointer(nmi_callback, callback);
+       }
+
+The set_nmi_callback() function registers an NMI handler.  Note that any
+data that is to be used by the callback must be initialized up -before-
+the call to set_nmi_callback().  On architectures that do not order
+writes, the rcu_assign_pointer() ensures that the NMI handler sees the
+initialized values.
+
+       void unset_nmi_callback(void)
+       {
+               rcu_assign_pointer(nmi_callback, dummy_nmi_callback);
+       }
+
+This function unregisters an NMI handler, restoring the original
+dummy_nmi_handler().  However, there may well be an NMI handler
+currently executing on some other CPU.  We therefore cannot free
+up any data structures used by the old NMI handler until execution
+of it completes on all other CPUs.
+
+One way to accomplish this is via synchronize_sched(), perhaps as
+follows:
+
+       unset_nmi_callback();
+       synchronize_sched();
+       kfree(my_nmi_data);
+
+This works because synchronize_sched() blocks until all CPUs complete
+any preemption-disabled segments of code that they were executing.
+Since NMI handlers disable preemption, synchronize_sched() is guaranteed
+not to return until all ongoing NMI handlers exit.  It is therefore safe
+to free up the handler's data as soon as synchronize_sched() returns.
+
+
+Answer to Quick Quiz
+
+       Why might the rcu_dereference() be necessary on Alpha, given
+       that the code referenced by the pointer is read-only?
+
+       Answer: The caller to set_nmi_callback() might well have
+               initialized some data that is to be used by the
+               new NMI handler.  In this case, the rcu_dereference()
+               would be needed, because otherwise a CPU that received
+               an NMI just after the new handler was set might see
+               the pointer to the new NMI handler, but the old
+               pre-initialized version of the handler's data.
+
+               More important, the rcu_dereference() makes it clear
+               to someone reading the code that the pointer is being
+               protected by RCU.
diff -urN linux/Documentation/RCU/rcuref.txt linux/Documentation/RCU/rcuref.txt
--- linux/Documentation/RCU/rcuref.txt  1970/01/01 00:00:00
+++ linux/Documentation/RCU/rcuref.txt  2005-09-15 09:52:36.267514000 +0100     
1.1
@@ -0,0 +1,74 @@
+Refcounter framework for elements of lists/arrays protected by
+RCU.
+
+Refcounting on elements of  lists which are protected by traditional
+reader/writer spinlocks or semaphores are straight forward as in:
+
+1.                                     2.
+add()                                  search_and_reference()
+{                                      {
+       alloc_object                            read_lock(&list_lock);
+       ...                                     search_for_element
+       atomic_set(&el->rc, 1);                 atomic_inc(&el->rc);
+       write_lock(&list_lock);                 ...
+       add_element                             read_unlock(&list_lock);
+       ...                                     ...
+       write_unlock(&list_lock);       }
+}
+
+3.                                     4.
+release_referenced()                   delete()
+{                                      {
+       ...                             write_lock(&list_lock);
+       atomic_dec(&el->rc, relfunc)    ...
+       ...                             delete_element
+}                                      write_unlock(&list_lock);
+                                       ...
+                                       if (atomic_dec_and_test(&el->rc))
+                                               kfree(el);
+                                       ...
+                                       }
+
+If this list/array is made lock free using rcu as in changing the
+write_lock in add() and delete() to spin_lock and changing read_lock
+in search_and_reference to rcu_read_lock(), the rcuref_get in
+search_and_reference could potentially hold reference to an element which
+has already been deleted from the list/array.  rcuref_lf_get_rcu takes
+care of this scenario. search_and_reference should look as;
+
+1.                                     2.
+add()                                  search_and_reference()
+{                                      {
+       alloc_object                            rcu_read_lock();
+       ...                                     search_for_element
+       atomic_set(&el->rc, 1);                 if (rcuref_inc_lf(&el->rc)) {
+       write_lock(&list_lock);                         rcu_read_unlock();
+                                                       return FAIL;
+       add_element                             }
+       ...                                     ...
+       write_unlock(&list_lock);               rcu_read_unlock();
+}                                      }
+3.                                     4.
+release_referenced()                   delete()
+{                                      {
+       ...                             write_lock(&list_lock);
+       rcuref_dec(&el->rc, relfunc)    ...
+       ...                             delete_element
+}                                      write_unlock(&list_lock);
+                                       ...
+                                       if (rcuref_dec_and_test(&el->rc))
+                                               call_rcu(&el->head, el_free);
+                                       ...
+                                       }
+
+Sometimes, reference to the element need to be obtained in the
+update (write) stream.  In such cases, rcuref_inc_lf might be an overkill
+since the spinlock serialising list updates are held. rcuref_inc
+is to be used in such cases.
+For arches which do not have cmpxchg rcuref_inc_lf
+api uses a hashed spinlock implementation and the same hashed spinlock
+is acquired in all rcuref_xxx primitives to preserve atomicity.
+Note: Use rcuref_inc api only if you need to use rcuref_inc_lf on the
+refcounter atleast at one place.  Mixing rcuref_inc and atomic_xxx api
+might lead to races. rcuref_inc_lf() must be used in lockfree
+RCU critical sections only.
diff -urN linux/Documentation/RCU/whatisRCU.txt 
linux/Documentation/RCU/whatisRCU.txt
--- linux/Documentation/RCU/whatisRCU.txt       1970/01/01 00:00:00
+++ linux/Documentation/RCU/whatisRCU.txt       2005-09-15 09:52:36.288445000 
+0100     1.1
@@ -0,0 +1,902 @@
+What is RCU?
+
+RCU is a synchronization mechanism that was added to the Linux kernel
+during the 2.5 development effort that is optimized for read-mostly
+situations.  Although RCU is actually quite simple once you understand it,
+getting there can sometimes be a challenge.  Part of the problem is that
+most of the past descriptions of RCU have been written with the mistaken
+assumption that there is "one true way" to describe RCU.  Instead,
+the experience has been that different people must take different paths
+to arrive at an understanding of RCU.  This document provides several
+different paths, as follows:
+
+1.     RCU OVERVIEW
+2.     WHAT IS RCU'S CORE API?
+3.     WHAT ARE SOME EXAMPLE USES OF CORE RCU API?
+4.     WHAT IF MY UPDATING THREAD CANNOT BLOCK?
+5.     WHAT ARE SOME SIMPLE IMPLEMENTATIONS OF RCU?
+6.     ANALOGY WITH READER-WRITER LOCKING
+7.     FULL LIST OF RCU APIs
+8.     ANSWERS TO QUICK QUIZZES
+
+People who prefer starting with a conceptual overview should focus on
+Section 1, though most readers will profit by reading this section at
+some point.  People who prefer to start with an API that they can then
+experiment with should focus on Section 2.  People who prefer to start
+with example uses should focus on Sections 3 and 4.  People who need to
+understand the RCU implementation should focus on Section 5, then dive
+into the kernel source code.  People who reason best by analogy should
+focus on Section 6.  Section 7 serves as an index to the docbook API
+documentation, and Section 8 is the traditional answer key.
+
+So, start with the section that makes the most sense to you and your
+preferred method of learning.  If you need to know everything about
+everything, feel free to read the whole thing -- but if you are really
+that type of person, you have perused the source code and will therefore
+never need this document anyway.  ;-)
+
+
+1.  RCU OVERVIEW
+
+The basic idea behind RCU is to split updates into "removal" and
+"reclamation" phases.  The removal phase removes references to data items
+within a data structure (possibly by replacing them with references to
+new versions of these data items), and can run concurrently with readers.
+The reason that it is safe to run the removal phase concurrently with
+readers is the semantics of modern CPUs guarantee that readers will see
+either the old or the new version of the data structure rather than a
+partially updated reference.  The reclamation phase does the work of reclaiming
+(e.g., freeing) the data items removed from the data structure during the
+removal phase.  Because reclaiming data items can disrupt any readers
+concurrently referencing those data items, the reclamation phase must
+not start until readers no longer hold references to those data items.
+
+Splitting the update into removal and reclamation phases permits the
+updater to perform the removal phase immediately, and to defer the
+reclamation phase until all readers active during the removal phase have
+completed, either by blocking until they finish or by registering a
+callback that is invoked after they finish.  Only readers that are active
+during the removal phase need be considered, because any reader starting
+after the removal phase will be unable to gain a reference to the removed
+data items, and therefore cannot be disrupted by the reclamation phase.
+
+So the typical RCU update sequence goes something like the following:
+
+a.     Remove pointers to a data structure, so that subsequent
+       readers cannot gain a reference to it.
+
+b.     Wait for all previous readers to complete their RCU read-side
+       critical sections.
+
+c.     At this point, there cannot be any readers who hold references
+       to the data structure, so it now may safely be reclaimed
+       (e.g., kfree()d).
+
+Step (b) above is the key idea underlying RCU's deferred destruction.
+The ability to wait until all readers are done allows RCU readers to
+use much lighter-weight synchronization, in some cases, absolutely no
+synchronization at all.  In contrast, in more conventional lock-based
+schemes, readers must use heavy-weight synchronization in order to
+prevent an updater from deleting the data structure out from under them.
+This is because lock-based updaters typically update data items in place,
+and must therefore exclude readers.  In contrast, RCU-based updaters
+typically take advantage of the fact that writes to single aligned
+pointers are atomic on modern CPUs, allowing atomic insertion, removal,
+and replacement of data items in a linked structure without disrupting
+readers.  Concurrent RCU readers can then continue accessing the old
+versions, and can dispense with the atomic operations, memory barriers,
+and communications cache misses that are so expensive on present-day
+SMP computer systems, even in absence of lock contention.
+
+In the three-step procedure shown above, the updater is performing both
+the removal and the reclamation step, but it is often helpful for an
+entirely different thread to do the reclamation, as is in fact the case
+in the Linux kernel's directory-entry cache (dcache).  Even if the same
+thread performs both the update step (step (a) above) and the reclamation
+step (step (c) above), it is often helpful to think of them separately.
+For example, RCU readers and updaters need not communicate at all,
+but RCU provides implicit low-overhead communication between readers
+and reclaimers, namely, in step (b) above.
+
+So how the heck can a reclaimer tell when a reader is done, given
+that readers are not doing any sort of synchronization operations???
+Read on to learn about how RCU's API makes this easy.
+
+
+2.  WHAT IS RCU'S CORE API?
+
+The core RCU API is quite small:
+
+a.     rcu_read_lock()
+b.     rcu_read_unlock()
+c.     synchronize_rcu() / call_rcu()
+d.     rcu_assign_pointer()
+e.     rcu_dereference()
+
+There are many other members of the RCU API, but the rest can be
+expressed in terms of these five, though most implementations instead
+express synchronize_rcu() in terms of the call_rcu() callback API.
+
+The five core RCU APIs are described below, the other 18 will be enumerated
+later.  See the kernel docbook documentation for more info, or look directly
+at the function header comments.
+
+rcu_read_lock()
+
+       void rcu_read_lock(void);
+
+       Used by a reader to inform the reclaimer that the reader is
+       entering an RCU read-side critical section.  It is illegal
+       to block while in an RCU read-side critical section, though
+       kernels built with CONFIG_PREEMPT_RCU can preempt RCU read-side
+       critical sections.  Any RCU-protected data structure accessed
+       during an RCU read-side critical section is guaranteed to remain
+       unreclaimed for the full duration of that critical section.
+       Reference counts may be used in conjunction with RCU to maintain
+       longer-term references to data structures.
+
+rcu_read_unlock()
+
+       void rcu_read_unlock(void);
+
+       Used by a reader to inform the reclaimer that the reader is
+       exiting an RCU read-side critical section.  Note that RCU
+       read-side critical sections may be nested and/or overlapping.
+
+synchronize_rcu()
+
+       void synchronize_rcu(void);
+
+       Marks the end of updater code and the beginning of reclaimer
+       code.  It does this by blocking until all pre-existing RCU
+       read-side critical sections on all CPUs have completed.
+       Note that synchronize_rcu() will -not- necessarily wait for
+       any subsequent RCU read-side critical sections to complete.
+       For example, consider the following sequence of events:
+
+                CPU 0                  CPU 1                 CPU 2
+            ----------------- ------------------------- ---------------
+        1.  rcu_read_lock()
+        2.                    enters synchronize_rcu()
+        3.                                               rcu_read_lock()
+        4.  rcu_read_unlock()
+        5.                     exits synchronize_rcu()
+        6.                                              rcu_read_unlock()
+
+       To reiterate, synchronize_rcu() waits only for ongoing RCU
+       read-side critical sections to complete, not necessarily for
+       any that begin after synchronize_rcu() is invoked.
+
+       Of course, synchronize_rcu() does not necessarily return
+       -immediately- after the last pre-existing RCU read-side critical
+       section completes.  For one thing, there might well be scheduling
+       delays.  For another thing, many RCU implementations process
+       requests in batches in order to improve efficiencies, which can
+       further delay synchronize_rcu().
+
+       Since synchronize_rcu() is the API that must figure out when
+       readers are done, its implementation is key to RCU.  For RCU
+       to be useful in all but the most read-intensive situations,
+       synchronize_rcu()'s overhead must also be quite small.
+
+       The call_rcu() API is a callback form of synchronize_rcu(),
+       and is described in more detail in a later section.  Instead of
+       blocking, it registers a function and argument which are invoked
+       after all ongoing RCU read-side critical sections have completed.
+       This callback variant is particularly useful in situations where
+       it is illegal to block.
+
+rcu_assign_pointer()
+
+       typeof(p) rcu_assign_pointer(p, typeof(p) v);
+
+       Yes, rcu_assign_pointer() -is- implemented as a macro, though it
+       would be cool to be able to declare a function in this manner.
+       (Compiler experts will no doubt disagree.)
+
+       The updater uses this function to assign a new value to an
+       RCU-protected pointer, in order to safely communicate the change
+       in value from the updater to the reader.  This function returns
+       the new value, and also executes any memory-barrier instructions
+       required for a given CPU architecture.
+
+       Perhaps more important, it serves to document which pointers
+       are protected by RCU.  That said, rcu_assign_pointer() is most
+       frequently used indirectly, via the _rcu list-manipulation
+       primitives such as list_add_rcu().
+
+rcu_dereference()
+
+       typeof(p) rcu_dereference(p);
+
+       Like rcu_assign_pointer(), rcu_dereference() must be implemented
+       as a macro.
+
+       The reader uses rcu_dereference() to fetch an RCU-protected
+       pointer, which returns a value that may then be safely
+       dereferenced.  Note that rcu_deference() does not actually
+       dereference the pointer, instead, it protects the pointer for
+       later dereferencing.  It also executes any needed memory-barrier
+       instructions for a given CPU architecture.  Currently, only Alpha
+       needs memory barriers within rcu_dereference() -- on other CPUs,
+       it compiles to nothing, not even a compiler directive.
+
+       Common coding practice uses rcu_dereference() to copy an
+       RCU-protected pointer to a local variable, then dereferences
+       this local variable, for example as follows:
+
+               p = rcu_dereference(head.next);
+               return p->data;
+
+       However, in this case, one could just as easily combine these
+       into one statement:
+
+               return rcu_dereference(head.next)->data;
+
+       If you are going to be fetching multiple fields from the
+       RCU-protected structure, using the local variable is of
+       course preferred.  Repeated rcu_dereference() calls look
+       ugly and incur unnecessary overhead on Alpha CPUs.
+
+       Note that the value returned by rcu_dereference() is valid
+       only within the enclosing RCU read-side critical section.
+       For example, the following is -not- legal:
+
+               rcu_read_lock();
+               p = rcu_dereference(head.next);
+               rcu_read_unlock();
+               x = p->address;
+               rcu_read_lock();
+               y = p->data;
+               rcu_read_unlock();
+
+       Holding a reference from one RCU read-side critical section
+       to another is just as illegal as holding a reference from
+       one lock-based critical section to another!  Similarly,
+       using a reference outside of the critical section in which
+       it was acquired is just as illegal as doing so with normal
+       locking.
+
+       As with rcu_assign_pointer(), an important function of
+       rcu_dereference() is to document which pointers are protected
+       by RCU.  And, again like rcu_assign_pointer(), rcu_dereference()
+       is typically used indirectly, via the _rcu list-manipulation
+       primitives, such as list_for_each_entry_rcu().
+
+The following diagram shows how each API communicates among the
+reader, updater, and reclaimer.
+
+
+           rcu_assign_pointer()
+                                   +--------+
+           +---------------------->| reader |---------+
+           |                       +--------+         |
+           |                           |              |
+           |                           |              | Protect:
+           |                           |              | rcu_read_lock()
+           |                           |              | rcu_read_unlock()
+           |        rcu_dereference()  |              |
+       +---------+                      |              |
+       | updater |<---------------------+              |
+       +---------+                                     V
+           |                                    +-----------+
+           +----------------------------------->| reclaimer |
+                                                +-----------+
+             Defer:
+             synchronize_rcu() & call_rcu()
+
+
+The RCU infrastructure observes the time sequence of rcu_read_lock(),
+rcu_read_unlock(), synchronize_rcu(), and call_rcu() invocations in
+order to determine when (1) synchronize_rcu() invocations may return
+to their callers and (2) call_rcu() callbacks may be invoked.  Efficient
+implementations of the RCU infrastructure make heavy use of batching in
+order to amortize their overhead over many uses of the corresponding APIs.
+
+There are no fewer than three RCU mechanisms in the Linux kernel; the
+diagram above shows the first one, which is by far the most commonly used.
+The rcu_dereference() and rcu_assign_pointer() primitives are used for
+all three mechanisms, but different defer and protect primitives are
+used as follows:
+
+       Defer                   Protect
+
+a.     synchronize_rcu()       rcu_read_lock() / rcu_read_unlock()
+       call_rcu()
+
+b.     call_rcu_bh()           rcu_read_lock_bh() / rcu_read_unlock_bh()
+
+c.     synchronize_sched()     preempt_disable() / preempt_enable()
+                               local_irq_save() / local_irq_restore()
+                               hardirq enter / hardirq exit
+                               NMI enter / NMI exit
+
+These three mechanisms are used as follows:
+
+a.     RCU applied to normal data structures.
+
+b.     RCU applied to networking data structures that may be subjected
+       to remote denial-of-service attacks.
+
+c.     RCU applied to scheduler and interrupt/NMI-handler tasks.
+
+Again, most uses will be of (a).  The (b) and (c) cases are important
+for specialized uses, but are relatively uncommon.
+
+
+3.  WHAT ARE SOME EXAMPLE USES OF CORE RCU API?
+
+This section shows a simple use of the core RCU API to protect a
+global pointer to a dynamically allocated structure.  More typical
+uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt.
+
+       struct foo {
+               int a;
+               char b;
+               long c;
+       };
+       DEFINE_SPINLOCK(foo_mutex);
+
+       struct foo *gbl_foo;
+
+       /*
+        * Create a new struct foo that is the same as the one currently
+        * pointed to by gbl_foo, except that field "a" is replaced
+        * with "new_a".  Points gbl_foo to the new structure, and
+        * frees up the old structure after a grace period.
+        *
+        * Uses rcu_assign_pointer() to ensure that concurrent readers
+        * see the initialized version of the new structure.
+        *
+        * Uses synchronize_rcu() to ensure that any readers that might
+        * have references to the old structure complete before freeing
+        * the old structure.
+        */
+       void foo_update_a(int new_a)
+       {
+               struct foo *new_fp;
+               struct foo *old_fp;
+
+               new_fp = kmalloc(sizeof(*fp), GFP_KERNEL);
+               spin_lock(&foo_mutex);
+               old_fp = gbl_foo;
+               *new_fp = *old_fp;
+               new_fp->a = new_a;
+               rcu_assign_pointer(gbl_foo, new_fp);
+               spin_unlock(&foo_mutex);
+               synchronize_rcu();
+               kfree(old_fp);
+       }
+
+       /*
+        * Return the value of field "a" of the current gbl_foo
+        * structure.  Use rcu_read_lock() and rcu_read_unlock()
+        * to ensure that the structure does not get deleted out
+        * from under us, and use rcu_dereference() to ensure that
+        * we see the initialized version of the structure (important
+        * for DEC Alpha and for people reading the code).
+        */
+       int foo_get_a(void)
+       {
+               int retval;
+
+               rcu_read_lock();
+               retval = rcu_dereference(gbl_foo)->a;
+               rcu_read_unlock();
+               return retval;
+       }
+
+So, to sum up:
+
+o      Use rcu_read_lock() and rcu_read_unlock() to guard RCU
+       read-side critical sections.
+
+o      Within an RCU read-side critical section, use rcu_dereference()
+       to dereference RCU-protected pointers.
+
+o      Use some solid scheme (such as locks or semaphores) to
+       keep concurrent updates from interfering with each other.
+
+o      Use rcu_assign_pointer() to update an RCU-protected pointer.
+       This primitive protects concurrent readers from the updater,
+       -not- concurrent updates from each other!  You therefore still
+       need to use locking (or something similar) to keep concurrent
+       rcu_assign_pointer() primitives from interfering with each other.
+
+o      Use synchronize_rcu() -after- removing a data element from an
+       RCU-protected data structure, but -before- reclaiming/freeing
+       the data element, in order to wait for the completion of all
+       RCU read-side critical sections that might be referencing that
+       data item.
+
+See checklist.txt for additional rules to follow when using RCU.
+
+
+4.  WHAT IF MY UPDATING THREAD CANNOT BLOCK?
+
+In the example above, foo_update_a() blocks until a grace period elapses.
+This is quite simple, but in some cases one cannot afford to wait so
+long -- there might be other high-priority work to be done.
+
+In such cases, one uses call_rcu() rather than synchronize_rcu().
+The call_rcu() API is as follows:
+
+       void call_rcu(struct rcu_head * head,
+                     void (*func)(struct rcu_head *head));
+
+This function invokes func(head) after a grace period has elapsed.
+This invocation might happen from either softirq or process context,
+so the function is not permitted to block.  The foo struct needs to
+have an rcu_head structure added, perhaps as follows:
+
+       struct foo {
+               int a;
+               char b;
+               long c;
+               struct rcu_head rcu;
+       };
+
+The foo_update_a() function might then be written as follows:
+
+       /*
+        * Create a new struct foo that is the same as the one currently
+        * pointed to by gbl_foo, except that field "a" is replaced
+        * with "new_a".  Points gbl_foo to the new structure, and
+        * frees up the old structure after a grace period.
+        *
+        * Uses rcu_assign_pointer() to ensure that concurrent readers
+        * see the initialized version of the new structure.
+        *
+        * Uses call_rcu() to ensure that any readers that might have
+        * references to the old structure complete before freeing the
+        * old structure.
+        */
+       void foo_update_a(int new_a)
+       {
+               struct foo *new_fp;
+               struct foo *old_fp;
+
+               new_fp = kmalloc(sizeof(*fp), GFP_KERNEL);
+               spin_lock(&foo_mutex);
+               old_fp = gbl_foo;
+               *new_fp = *old_fp;
+               new_fp->a = new_a;
+               rcu_assign_pointer(gbl_foo, new_fp);
+               spin_unlock(&foo_mutex);
+               call_rcu(&old_fp->rcu, foo_reclaim);
+       }
+
+The foo_reclaim() function might appear as follows:
+
+       void foo_reclaim(struct rcu_head *rp)
+       {
+               struct foo *fp = container_of(rp, struct foo, rcu);
+
+               kfree(fp);
+       }
+
+The container_of() primitive is a macro that, given a pointer into a
+struct, the type of the struct, and the pointed-to field within the
+struct, returns a pointer to the beginning of the struct.
+
+The use of call_rcu() permits the caller of foo_update_a() to
+immediately regain control, without needing to worry further about the
+old version of the newly updated element.  It also clearly shows the
+RCU distinction between updater, namely foo_update_a(), and reclaimer,
+namely foo_reclaim().
+
+The summary of advice is the same as for the previous section, except
+that we are now using call_rcu() rather than synchronize_rcu():
+
+o      Use call_rcu() -after- removing a data element from an
+       RCU-protected data structure in order to register a callback
+       function that will be invoked after the completion of all RCU
+       read-side critical sections that might be referencing that
+       data item.
+
+Again, see checklist.txt for additional rules governing the use of RCU.
+
+
+5.  WHAT ARE SOME SIMPLE IMPLEMENTATIONS OF RCU?
+
+One of the nice things about RCU is that it has extremely simple "toy"
+implementations that are a good first step towards understanding the
+production-quality implementations in the Linux kernel.  This section
+presents two such "toy" implementations of RCU, one that is implemented
+in terms of familiar locking primitives, and another that more closely
+resembles "classic" RCU.  Both are way too simple for real-world use,
+lacking both functionality and performance.  However, they are useful
+in getting a feel for how RCU works.  See kernel/rcupdate.c for a
+production-quality implementation, and see:
+
+       http://www.rdrop.com/users/paulmck/RCU
+
+for papers describing the Linux kernel RCU implementation.  The OLS'01
+and OLS'02 papers are a good introduction, and the dissertation provides
+more details on the current implementation.
+
+
+5A.  "TOY" IMPLEMENTATION #1: LOCKING
+
+This section presents a "toy" RCU implementation that is based on
+familiar locking primitives.  Its overhead makes it a non-starter for
+real-life use, as does its lack of scalability.  It is also unsuitable
+for realtime use, since it allows scheduling latency to "bleed" from
+one read-side critical section to another.
+
+However, it is probably the easiest implementation to relate to, so is
+a good starting point.
+
+It is extremely simple:
+
+       static DEFINE_RWLOCK(rcu_gp_mutex);
+
+       void rcu_read_lock(void)
+       {
+               read_lock(&rcu_gp_mutex);
+       }
+
+       void rcu_read_unlock(void)
+       {
+               read_unlock(&rcu_gp_mutex);
+       }
+
+       void synchronize_rcu(void)
+       {
+               write_lock(&rcu_gp_mutex);
+               write_unlock(&rcu_gp_mutex);
+       }
+
+[You can ignore rcu_assign_pointer() and rcu_dereference() without
+missing much.  But here they are anyway.  And whatever you do, don't
+forget about them when submitting patches making use of RCU!]
+
+       #define rcu_assign_pointer(p, v)        ({ \
+                                                       smp_wmb(); \
+                                                       (p) = (v); \
+                                               })
+
+       #define rcu_dereference(p)     ({ \
+                                       typeof(p) _________p1 = p; \
+                                       smp_read_barrier_depends(); \
+                                       (_________p1); \
+                                       })
+
+
+The rcu_read_lock() and rcu_read_unlock() primitive read-acquire
+and release a global reader-writer lock.  The synchronize_rcu()
+primitive write-acquires this same lock, then immediately releases
+it.  This means that once synchronize_rcu() exits, all RCU read-side
+critical sections that were in progress before synchonize_rcu() was
+called are guaranteed to have completed -- there is no way that
+synchronize_rcu() would have been able to write-acquire the lock
+otherwise.
+
+It is possible to nest rcu_read_lock(), since reader-writer locks may
+be recursively acquired.  Note also that rcu_read_lock() is immune
+from deadlock (an important property of RCU).  The reason for this is
+that the only thing that can block rcu_read_lock() is a synchronize_rcu().
+But synchronize_rcu() does not acquire any locks while holding rcu_gp_mutex,
+so there can be no deadlock cycle.
+
+Quick Quiz #1: Why is this argument naive?  How could a deadlock
+               occur when using this algorithm in a real-world Linux
+               kernel?  How could this deadlock be avoided?
+
+
+5B.  "TOY" EXAMPLE #2: CLASSIC RCU
+
+This section presents a "toy" RCU implementation that is based on
+"classic RCU".  It is also short on performance (but only for updates) and
+on features such as hotplug CPU and the ability to run in CONFIG_PREEMPT
+kernels.  The definitions of rcu_dereference() and rcu_assign_pointer()
+are the same as those shown in the preceding section, so they are omitted.
+
+       void rcu_read_lock(void) { }
+
+       void rcu_read_unlock(void) { }
+
+       void synchronize_rcu(void)
+       {
+               int cpu;
+
+               for_each_cpu(cpu)
+                       run_on(cpu);
+       }
+
+Note that rcu_read_lock() and rcu_read_unlock() do absolutely nothing.
+This is the great strength of classic RCU in a non-preemptive kernel:
+read-side overhead is precisely zero, at least on non-Alpha CPUs.
+And there is absolutely no way that rcu_read_lock() can possibly
+participate in a deadlock cycle!
+
+The implementation of synchronize_rcu() simply schedules itself on each
+CPU in turn.  The run_on() primitive can be implemented straightforwardly
+in terms of the sched_setaffinity() primitive.  Of course, a somewhat less
+"toy" implementation would restore the affinity upon completion rather
+than just leaving all tasks running on the last CPU, but when I said
+"toy", I meant -toy-!
+
+So how the heck is this supposed to work???
+
+Remember that it is illegal to block while in an RCU read-side critical
+section.  Therefore, if a given CPU executes a context switch, we know
+that it must have completed all preceding RCU read-side critical sections.
+Once -all- CPUs have executed a context switch, then -all- preceding
+RCU read-side critical sections will have completed.
+
+So, suppose that we remove a data item from its structure and then invoke
+synchronize_rcu().  Once synchronize_rcu() returns, we are guaranteed
+that there are no RCU read-side critical sections holding a reference
+to that data item, so we can safely reclaim it.
+
+Quick Quiz #2: Give an example where Classic RCU's read-side
+               overhead is -negative-.
+
+Quick Quiz #3:  If it is illegal to block in an RCU read-side
+               critical section, what the heck do you do in
+               PREEMPT_RT, where normal spinlocks can block???
+
+
+6.  ANALOGY WITH READER-WRITER LOCKING
+
+Although RCU can be used in many different ways, a very common use of
+RCU is analogous to reader-writer locking.  The following unified
+diff shows how closely related RCU and reader-writer locking can be.
+
+       @@ -13,15 +14,15 @@
+               struct list_head *lp;
+               struct el *p;
+
+       -       read_lock();
+       -       list_for_each_entry(p, head, lp) {
+       +       rcu_read_lock();
+       +       list_for_each_entry_rcu(p, head, lp) {
+                       if (p->key == key) {
+                               *result = p->data;
+       -                       read_unlock();
+       +                       rcu_read_unlock();
+                               return 1;
+                       }
+               }
+       -       read_unlock();
+       +       rcu_read_unlock();
+               return 0;
+        }
+
+       @@ -29,15 +30,16 @@
+        {
+               struct el *p;
+
+       -       write_lock(&listmutex);
+       +       spin_lock(&listmutex);
+               list_for_each_entry(p, head, lp) {
+                       if (p->key == key) {
+                               list_del(&p->list);
+       -                       write_unlock(&listmutex);
+       +                       spin_unlock(&listmutex);
+       +                       synchronize_rcu();
+                               kfree(p);
+                               return 1;
+                       }
+               }
+       -       write_unlock(&listmutex);
+       +       spin_unlock(&listmutex);
+               return 0;
+        }
+
+Or, for those who prefer a side-by-side listing:
+
+ 1 struct el {                          1 struct el {
+ 2   struct list_head list;             2   struct list_head list;
+ 3   long key;                          3   long key;
+ 4   spinlock_t mutex;                  4   spinlock_t mutex;
+ 5   int data;                          5   int data;
+ 6   /* Other data fields */            6   /* Other data fields */
+ 7 };                                   7 };
+ 8 spinlock_t listmutex;                8 spinlock_t listmutex;
+ 9 struct el head;                      9 struct el head;
+
+ 1 int search(long key, int *result)    1 int search(long key, int *result)
+ 2 {                                    2 {
+ 3   struct list_head *lp;              3   struct list_head *lp;
+ 4   struct el *p;                      4   struct el *p;
+ 5                                      5
+ 6   read_lock();                       6   rcu_read_lock();
+ 7   list_for_each_entry(p, head, lp) { 7   list_for_each_entry_rcu(p, head, 
lp) {
+ 8     if (p->key == key) {             8     if (p->key == key) {
+ 9       *result = p->data;             9       *result = p->data;
+10       read_unlock();                10       rcu_read_unlock();
+11       return 1;                     11       return 1;
+12     }                               12     }
+13   }                                 13   }
+14   read_unlock();                    14   rcu_read_unlock();
+15   return 0;                         15   return 0;
+16 }                                   16 }
+
+ 1 int delete(long key)                 1 int delete(long key)
+ 2 {                                    2 {
+ 3   struct el *p;                      3   struct el *p;
+ 4                                      4
+ 5   write_lock(&listmutex);            5   spin_lock(&listmutex);
+ 6   list_for_each_entry(p, head, lp) { 6   list_for_each_entry(p, head, lp) {
+ 7     if (p->key == key) {             7     if (p->key == key) {
+ 8       list_del(&p->list);            8       list_del(&p->list);
+ 9       write_unlock(&listmutex);      9       spin_unlock(&listmutex);
+                                       10       synchronize_rcu();
+10       kfree(p);                     11       kfree(p);
+11       return 1;                     12       return 1;
+12     }                               13     }
+13   }                                 14   }
+14   write_unlock(&listmutex);         15   spin_unlock(&listmutex);
+15   return 0;                         16   return 0;
+16 }                                   17 }
+
+Either way, the differences are quite small.  Read-side locking moves
+to rcu_read_lock() and rcu_read_unlock, update-side locking moves from
+from a reader-writer lock to a simple spinlock, and a synchronize_rcu()
+precedes the kfree().
+
+However, there is one potential catch: the read-side and update-side
+critical sections can now run concurrently.  In many cases, this will
+not be a problem, but it is necessary to check carefully regardless.
+For example, if multiple independent list updates must be seen as
+a single atomic update, converting to RCU will require special care.
+
+Also, the presence of synchronize_rcu() means that the RCU version of
+delete() can now block.  If this is a problem, there is a callback-based
+mechanism that never blocks, namely call_rcu(), that can be used in
+place of synchronize_rcu().
+
+
+7.  FULL LIST OF RCU APIs
+
+The RCU APIs are documented in docbook-format header comments in the
+Linux-kernel source code, but it helps to have a full list of the
+APIs, since there does not appear to be a way to categorize them
+in docbook.  Here is the list, by category.
+
+Markers for RCU read-side critical sections:
+
+       rcu_read_lock
+       rcu_read_unlock
+       rcu_read_lock_bh
+       rcu_read_unlock_bh
+
+RCU pointer/list traversal:
+
+       rcu_dereference
+       list_for_each_rcu               (to be deprecated in favor of
+                                        list_for_each_entry_rcu)
+       list_for_each_safe_rcu          (deprecated, not used)
+       list_for_each_entry_rcu
+       list_for_each_continue_rcu      (to be deprecated in favor of new
+                                        list_for_each_entry_continue_rcu)
+       hlist_for_each_rcu              (to be deprecated in favor of
+                                        hlist_for_each_entry_rcu)
+       hlist_for_each_entry_rcu
+
+RCU pointer update:
+
+       rcu_assign_pointer
+       list_add_rcu
+       list_add_tail_rcu
+       list_del_rcu
+       list_replace_rcu
+       hlist_del_rcu
+       hlist_add_head_rcu
+
+RCU grace period:
+
+       synchronize_kernel (deprecated)
+       synchronize_net
+       synchronize_sched
+       synchronize_rcu
+       call_rcu
+       call_rcu_bh
+
+See the comment headers in the source code (or the docbook generated
+from them) for more information.
+
+
+8.  ANSWERS TO QUICK QUIZZES
+
+Quick Quiz #1: Why is this argument naive?  How could a deadlock
+               occur when using this algorithm in a real-world Linux
+               kernel?  [Referring to the lock-based "toy" RCU
+               algorithm.]
+
+Answer:                Consider the following sequence of events:
+
+               1.      CPU 0 acquires some unrelated lock, call it
+                       "problematic_lock".
+
+               2.      CPU 1 enters synchronize_rcu(), write-acquiring
+                       rcu_gp_mutex.
+
+               3.      CPU 0 enters rcu_read_lock(), but must wait
+                       because CPU 1 holds rcu_gp_mutex.
+
+               4.      CPU 1 is interrupted, and the irq handler
+                       attempts to acquire problematic_lock.
+
+               The system is now deadlocked.
+
+               One way to avoid this deadlock is to use an approach like
+               that of CONFIG_PREEMPT_RT, where all normal spinlocks
+               become blocking locks, and all irq handlers execute in
+               the context of special tasks.  In this case, in step 4
+               above, the irq handler would block, allowing CPU 1 to
+               release rcu_gp_mutex, avoiding the deadlock.
+
+               Even in the absence of deadlock, this RCU implementation
+               allows latency to "bleed" from readers to other
+               readers through synchronize_rcu().  To see this,
+               consider task A in an RCU read-side critical section
+               (thus read-holding rcu_gp_mutex), task B blocked
+               attempting to write-acquire rcu_gp_mutex, and
+               task C blocked in rcu_read_lock() attempting to
+               read_acquire rcu_gp_mutex.  Task A's RCU read-side
+               latency is holding up task C, albeit indirectly via
+               task B.
+
+               Realtime RCU implementations therefore use a counter-based
+               approach where tasks in RCU read-side critical sections
+               cannot be blocked by tasks executing synchronize_rcu().
+
+Quick Quiz #2: Give an example where Classic RCU's read-side
+               overhead is -negative-.
+
+Answer:                Imagine a single-CPU system with a non-CONFIG_PREEMPT
+               kernel where a routing table is used by process-context
+               code, but can be updated by irq-context code (for example,
+               by an "ICMP REDIRECT" packet).  The usual way of handling
+               this would be to have the process-context code disable
+               interrupts while searching the routing table.  Use of
+               RCU allows such interrupt-disabling to be dispensed with.
+               Thus, without RCU, you pay the cost of disabling interrupts,
+               and with RCU you don't.
+
+               One can argue that the overhead of RCU in this
+               case is negative with respect to the single-CPU
+               interrupt-disabling approach.  Others might argue that
+               the overhead of RCU is merely zero, and that replacing
+               the positive overhead of the interrupt-disabling scheme
+               with the zero-overhead RCU scheme does not constitute
+               negative overhead.
+
+               In real life, of course, things are more complex.  But
+               even the theoretical possibility of negative overhead for
+               a synchronization primitive is a bit unexpected.  ;-)
+
+Quick Quiz #3:  If it is illegal to block in an RCU read-side
+               critical section, what the heck do you do in
+               PREEMPT_RT, where normal spinlocks can block???
+
+Answer:                Just as PREEMPT_RT permits preemption of spinlock
+               critical sections, it permits preemption of RCU
+               read-side critical sections.  It also permits
+               spinlocks blocking while in RCU read-side critical
+               sections.
+
+               Why the apparent inconsistency?  Because it is it
+               possible to use priority boosting to keep the RCU
+               grace periods short if need be (for example, if running
+               short of memory).  In contrast, if blocking waiting
+               for (say) network reception, there is no way to know
+               what should be boosted.  Especially given that the
+               process we need to boost might well be a human being
+               who just went out for a pizza or something.  And although
+               a computer-operated cattle prod might arouse serious
+               interest, it might also provoke serious objections.
+               Besides, how does the computer know what pizza parlor
+               the human being went to???
+
+
+ACKNOWLEDGEMENTS
+
+My thanks to the people who helped make this human-readable, including
+Jon Walpole, Josh Triplett, Serge Hallyn, and Suzanne Wood.
+
+
+For more information, see http://www.rdrop.com/users/paulmck/RCU.
diff -urN linux/Documentation/RCU/RTFP.txt linux/Documentation/RCU/RTFP.txt
--- linux/Documentation/RCU/RTFP.txt    2005/05/19 12:08:05     1.3
+++ linux/Documentation/RCU/RTFP.txt    2005/09/15 08:52:36     1.4
@@ -2,7 +2,8 @@
 
 
 This document describes RCU-related publications, and is followed by
-the corresponding bibtex entries.
+the corresponding bibtex entries.  A number of the publications may
+be found at http://www.rdrop.com/users/paulmck/RCU/.
 
 The first thing resembling RCU was published in 1980, when Kung and Lehman
 [Kung80] recommended use of a garbage collector to defer destruction
@@ -113,6 +114,10 @@
 and a paper describing SELinux performance with RCU [JamesMorris04b].
 
 
+2005 has seen further adaptation of RCU to realtime use, permitting
+preemption of RCU realtime critical sections [PaulMcKenney05a,
+PaulMcKenney05b].
+
 Bibtex Entries
 
 @article{Kung80
@@ -410,3 +415,32 @@
 \url{http://www.livejournal.com/users/james_morris/2153.html}
 [Viewed December 10, 2004]"
 }
+
+@unpublished{PaulMcKenney05a
+,Author="Paul E. McKenney"
+,Title="{[RFC]} {RCU} and {CONFIG\_PREEMPT\_RT} progress"
+,month="May"
+,year="2005"
+,note="Available:
+\url{http://lkml.org/lkml/2005/5/9/185}
+[Viewed May 13, 2005]"
+,annotation="
+       First publication of working lock-based deferred free patches
+       for the CONFIG_PREEMPT_RT environment.
+"
+}
+
+@conference{PaulMcKenney05b
+,Author="Paul E. McKenney and Dipankar Sarma"
+,Title="Towards Hard Realtime Response from the Linux Kernel on SMP Hardware"
+,Booktitle="linux.conf.au 2005"
+,month="April"
+,year="2005"
+,address="Canberra, Australia"
+,note="Available:
+\url{http://www.rdrop.com/users/paulmck/RCU/realtimeRCU.2005.04.23a.pdf}
+[Viewed May 13, 2005]"
+,annotation="
+       Realtime turns into making RCU yet more realtime friendly.
+"
+}
diff -urN linux/Documentation/RCU/UP.txt linux/Documentation/RCU/UP.txt
--- linux/Documentation/RCU/UP.txt      2005/05/19 12:08:05     1.3
+++ linux/Documentation/RCU/UP.txt      2005/09/15 08:52:36     1.4
@@ -8,7 +8,7 @@
 wait for anything else to get done, since there are no other CPUs for
 anything else to be happening on.  Although this approach will -sort- -of-
 work a surprising amount of the time, it is a very bad idea in general.
-This document presents two examples that demonstrate exactly how bad an
+This document presents three examples that demonstrate exactly how bad an
 idea this is.
 
 
@@ -26,6 +26,9 @@
 element B.  This situation can greatly decrease the life expectancy of
 your kernel.
 
+This same problem can occur if call_rcu() is invoked from a hardware
+interrupt handler.
+
 
 Example 2: Function-Call Fatality
 
@@ -44,8 +47,37 @@
 underlying RCU, namely that call_rcu() defers invoking its arguments until
 all RCU read-side critical sections currently executing have completed.
 
-Quick Quiz: why is it -not- legal to invoke synchronize_rcu() in
-this case?
+Quick Quiz #1: why is it -not- legal to invoke synchronize_rcu() in
+       this case?
+
+
+Example 3: Death by Deadlock
+
+Suppose that call_rcu() is invoked while holding a lock, and that the
+callback function must acquire this same lock.  In this case, if
+call_rcu() were to directly invoke the callback, the result would
+be self-deadlock.
+
+In some cases, it would possible to restructure to code so that
+the call_rcu() is delayed until after the lock is released.  However,
+there are cases where this can be quite ugly:
+
+1.     If a number of items need to be passed to call_rcu() within
+       the same critical section, then the code would need to create
+       a list of them, then traverse the list once the lock was
+       released.
+
+2.     In some cases, the lock will be held across some kernel API,
+       so that delaying the call_rcu() until the lock is released
+       requires that the data item be passed up via a common API.
+       It is far better to guarantee that callbacks are invoked
+       with no locks held than to have to modify such APIs to allow
+       arbitrary data items to be passed back up through them.
+
+If call_rcu() directly invokes the callback, painful locking restrictions
+or API changes would be required.
+
+Quick Quiz #2: What locking restriction must RCU callbacks respect?
 
 
 Summary
@@ -53,12 +85,35 @@
 Permitting call_rcu() to immediately invoke its arguments or permitting
 synchronize_rcu() to immediately return breaks RCU, even on a UP system.
 So do not do it!  Even on a UP system, the RCU infrastructure -must-
-respect grace periods.
+respect grace periods, and -must- invoke callbacks from a known environment
+in which no locks are held.
 
 
-Answer to Quick Quiz
+Answer to Quick Quiz #1:
+       Why is it -not- legal to invoke synchronize_rcu() in this case?
 
-The calling function is scanning an RCU-protected linked list, and
-is therefore within an RCU read-side critical section.  Therefore,
-the called function has been invoked within an RCU read-side critical
-section, and is not permitted to block.
+       Because the calling function is scanning an RCU-protected linked
+       list, and is therefore within an RCU read-side critical section.
+       Therefore, the called function has been invoked within an RCU
+       read-side critical section, and is not permitted to block.
+
+Answer to Quick Quiz #2:
+       What locking restriction must RCU callbacks respect?
+
+       Any lock that is acquired within an RCU callback must be
+       acquired elsewhere using an _irq variant of the spinlock
+       primitive.  For example, if "mylock" is acquired by an
+       RCU callback, then a process-context acquisition of this
+       lock must use something like spin_lock_irqsave() to
+       acquire the lock.
+
+       If the process-context code were to simply use spin_lock(),
+       then, since RCU callbacks can be invoked from softirq context,
+       the callback might be called from a softirq that interrupted
+       the process-context critical section.  This would result in
+       self-deadlock.
+
+       This restriction might seem gratuitous, since very few RCU
+       callbacks acquire locks directly.  However, a great many RCU
+       callbacks do acquire locks -indirectly-, for example, via
+       the kfree() primitive.
diff -urN linux/Documentation/RCU/checklist.txt 
linux/Documentation/RCU/checklist.txt
--- linux/Documentation/RCU/checklist.txt       2005/05/19 12:08:05     1.2
+++ linux/Documentation/RCU/checklist.txt       2005/09/15 08:52:36     1.3
@@ -43,6 +43,10 @@
        rcu_read_lock_bh()) in the read-side critical sections,
        and are also an excellent aid to readability.
 
+       As a rough rule of thumb, any dereference of an RCU-protected
+       pointer must be covered by rcu_read_lock() or rcu_read_lock_bh()
+       or by the appropriate update-side lock.
+
 3.     Does the update code tolerate concurrent accesses?
 
        The whole point of RCU is to permit readers to run without
@@ -90,7 +94,11 @@
 
                The rcu_dereference() primitive is used by the various
                "_rcu()" list-traversal primitives, such as the
-               list_for_each_entry_rcu().
+               list_for_each_entry_rcu().  Note that it is perfectly
+               legal (if redundant) for update-side code to use
+               rcu_dereference() and the "_rcu()" list-traversal
+               primitives.  This is particularly useful in code
+               that is common to readers and updaters.
 
        b.      If the list macros are being used, the list_add_tail_rcu()
                and list_add_rcu() primitives must be used in order
@@ -150,16 +158,9 @@
 
        Use of the _rcu() list-traversal primitives outside of an
        RCU read-side critical section causes no harm other than
-       a slight performance degradation on Alpha CPUs and some
-       confusion on the part of people trying to read the code.
-
-       Another way of thinking of this is "If you are holding the
-       lock that prevents the data structure from changing, why do
-       you also need RCU-based protection?"  That said, there may
-       well be situations where use of the _rcu() list-traversal
-       primitives while the update-side lock is held results in
-       simpler and more maintainable code.  The jury is still out
-       on this question.
+       a slight performance degradation on Alpha CPUs.  It can
+       also be quite helpful in reducing code bloat when common
+       code is shared between readers and updaters.
 
 10.    Conversely, if you are in an RCU read-side critical section,
        you -must- use the "_rcu()" variants of the list macros.
diff -urN linux/Documentation/RCU/rcu.txt linux/Documentation/RCU/rcu.txt
--- linux/Documentation/RCU/rcu.txt     2005/05/19 12:08:05     1.3
+++ linux/Documentation/RCU/rcu.txt     2005/09/15 08:52:36     1.4
@@ -64,6 +64,54 @@
        Of these, one was allowed to lapse by the assignee, and the
        others have been contributed to the Linux kernel under GPL.
 
+o      I hear that RCU needs work in order to support realtime kernels?
+
+       Yes, work in progress.
+
 o      Where can I find more information on RCU?
 
        See the RTFP.txt file in this directory.
+       Or point your browser at http://www.rdrop.com/users/paulmck/RCU/.
+
+o      What are all these files in this directory?
+
+
+       NMI-RCU.txt
+
+               Describes how to use RCU to implement dynamic
+               NMI handlers, which can be revectored on the fly,
+               without rebooting.
+
+       RTFP.txt
+
+               List of RCU-related publications and web sites.
+
+       UP.txt
+
+               Discussion of RCU usage in UP kernels.
+
+       arrayRCU.txt
+
+               Describes how to use RCU to protect arrays, with
+               resizeable arrays whose elements reference other
+               data structures being of the most interest.
+
+       checklist.txt
+
+               Lists things to check for when inspecting code that
+               uses RCU.
+
+       listRCU.txt
+
+               Describes how to use RCU to protect linked lists.
+               This is the simplest and most common use of RCU
+               in the Linux kernel.
+
+       rcu.txt
+
+               You are reading it!
+
+       whatisRCU.txt
+
+               Overview of how the RCU implementation works.  Along
+               the way, presents a conceptual view of RCU.
diff -urN linux/Documentation/aoe/mkshelf.sh linux/Documentation/aoe/mkshelf.sh
--- linux/Documentation/aoe/mkshelf.sh  2005/04/29 11:14:59     1.3
+++ linux/Documentation/aoe/mkshelf.sh  2005/09/15 08:52:36     1.4
@@ -8,13 +8,15 @@
 n_partitions=${n_partitions:-16}
 dir=$1
 shelf=$2
+nslots=16
+maxslot=`echo $nslots 1 - p | dc`
 MAJOR=152
 
 set -e
 
-minor=`echo 10 \* $shelf \* $n_partitions | bc`
+minor=`echo $nslots \* $shelf \* $n_partitions | bc`
 endp=`echo $n_partitions - 1 | bc`
-for slot in `seq 0 9`; do
+for slot in `seq 0 $maxslot`; do
        for part in `seq 0 $endp`; do
                name=e$shelf.$slot
                test "$part" != "0" && name=${name}p$part
diff -urN linux/Documentation/cdrom/sonycd535 
linux/Documentation/cdrom/sonycd535
--- linux/Documentation/cdrom/sonycd535 2002/10/31 16:35:47     1.5
+++ linux/Documentation/cdrom/sonycd535 2005/09/15 08:52:36     1.6
@@ -68,7 +68,8 @@
 Porfiri Claudio <C.Porfiri@nisms.tei.ericsson.se> for patches
 to make the driver work with the older CDU-510/515 series, and
 Heiko Eissfeldt <heiko@colossus.escape.de> for pointing out that
-the verify_area() checks were ignoring the results of said checks.
+the verify_area() checks were ignoring the results of said checks
+(note: verify_area() has since been replaced by access_ok()).
 
 (Acknowledgments from Ron Jeppesen in the 0.3 release:)
 Thanks to Corey Minyard who wrote the original CDU-31A driver on which
diff -urN linux/Documentation/connector/cn_test.c 
linux/Documentation/connector/cn_test.c
--- linux/Documentation/connector/cn_test.c     1970/01/01 00:00:00
+++ linux/Documentation/connector/cn_test.c     2005-09-15 09:52:36.852232000 
+0100     1.1
@@ -0,0 +1,194 @@
+/*
+ *     cn_test.c
+ * 
+ * 2004-2005 Copyright (c) Evgeniy Polyakov <johnpol@2ka.mipt.ru>
+ * All rights reserved.
+ * 
+ * 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/kernel.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/skbuff.h>
+#include <linux/timer.h>
+
+#include "connector.h"
+
+static struct cb_id cn_test_id = { 0x123, 0x456 };
+static char cn_test_name[] = "cn_test";
+static struct sock *nls;
+static struct timer_list cn_test_timer;
+
+void cn_test_callback(void *data)
+{
+       struct cn_msg *msg = (struct cn_msg *)data;
+
+       printk("%s: %lu: idx=%x, val=%x, seq=%u, ack=%u, len=%d: %s.\n",
+              __func__, jiffies, msg->id.idx, msg->id.val,
+              msg->seq, msg->ack, msg->len, (char *)msg->data);
+}
+
+static int cn_test_want_notify(void)
+{
+       struct cn_ctl_msg *ctl;
+       struct cn_notify_req *req;
+       struct cn_msg *msg = NULL;
+       int size, size0;
+       struct sk_buff *skb;
+       struct nlmsghdr *nlh;
+       u32 group = 1;
+
+       size0 = sizeof(*msg) + sizeof(*ctl) + 3 * sizeof(*req);
+
+       size = NLMSG_SPACE(size0);
+
+       skb = alloc_skb(size, GFP_ATOMIC);
+       if (!skb) {
+               printk(KERN_ERR "Failed to allocate new skb with size=%u.\n",
+                      size);
+
+               return -ENOMEM;
+       }
+
+       nlh = NLMSG_PUT(skb, 0, 0x123, NLMSG_DONE, size - sizeof(*nlh));
+
+       msg = (struct cn_msg *)NLMSG_DATA(nlh);
+
+       memset(msg, 0, size0);
+
+       msg->id.idx = -1;
+       msg->id.val = -1;
+       msg->seq = 0x123;
+       msg->ack = 0x345;
+       msg->len = size0 - sizeof(*msg);
+
+       ctl = (struct cn_ctl_msg *)(msg + 1);
+
+       ctl->idx_notify_num = 1;
+       ctl->val_notify_num = 2;
+       ctl->group = group;
+       ctl->len = msg->len - sizeof(*ctl);
+
+       req = (struct cn_notify_req *)(ctl + 1);
+
+       /*
+        * Idx.
+        */
+       req->first = cn_test_id.idx;
+       req->range = 10;
+
+       /*
+        * Val 0.
+        */
+       req++;
+       req->first = cn_test_id.val;
+       req->range = 10;
+
+       /*
+        * Val 1.
+        */
+       req++;
+       req->first = cn_test_id.val + 20;
+       req->range = 10;
+
+       NETLINK_CB(skb).dst_groups = ctl->group;
+       //netlink_broadcast(nls, skb, 0, ctl->group, GFP_ATOMIC);
+       netlink_unicast(nls, skb, 0, 0);
+
+       printk(KERN_INFO "Request was sent. Group=0x%x.\n", ctl->group);
+
+       return 0;
+
+nlmsg_failure:
+       printk(KERN_ERR "Failed to send %u.%u\n", msg->seq, msg->ack);
+       kfree_skb(skb);
+       return -EINVAL;
+}
+
+static u32 cn_test_timer_counter;
+static void cn_test_timer_func(unsigned long __data)
+{
+       struct cn_msg *m;
+       char data[32];
+
+       m = kmalloc(sizeof(*m) + sizeof(data), GFP_ATOMIC);
+       if (m) {
+               memset(m, 0, sizeof(*m) + sizeof(data));
+
+               memcpy(&m->id, &cn_test_id, sizeof(m->id));
+               m->seq = cn_test_timer_counter;
+               m->len = sizeof(data);
+
+               m->len =
+                   scnprintf(data, sizeof(data), "counter = %u",
+                             cn_test_timer_counter) + 1;
+
+               memcpy(m + 1, data, m->len);
+
+               cn_netlink_send(m, 0, gfp_any());
+               kfree(m);
+       }
+
+       cn_test_timer_counter++;
+
+       mod_timer(&cn_test_timer, jiffies + HZ);
+}
+
+static int cn_test_init(void)
+{
+       int err;
+
+       err = cn_add_callback(&cn_test_id, cn_test_name, cn_test_callback);
+       if (err)
+               goto err_out;
+       cn_test_id.val++;
+       err = cn_add_callback(&cn_test_id, cn_test_name, cn_test_callback);
+       if (err) {
+               cn_del_callback(&cn_test_id);
+               goto err_out;
+       }
+
+       init_timer(&cn_test_timer);
+       cn_test_timer.function = cn_test_timer_func;
+       cn_test_timer.expires = jiffies + HZ;
+       cn_test_timer.data = 0;
+       add_timer(&cn_test_timer);
+
+       return 0;
+
+      err_out:
+       if (nls && nls->sk_socket)
+               sock_release(nls->sk_socket);
+
+       return err;
+}
+
+static void cn_test_fini(void)
+{
+       del_timer_sync(&cn_test_timer);
+       cn_del_callback(&cn_test_id);
+       cn_test_id.val--;
+       cn_del_callback(&cn_test_id);
+       if (nls && nls->sk_socket)
+               sock_release(nls->sk_socket);
+}
+
+module_init(cn_test_init);
+module_exit(cn_test_fini);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Evgeniy Polyakov <johnpol@2ka.mipt.ru>");
+MODULE_DESCRIPTION("Connector's test module");
diff -urN linux/Documentation/connector/connector.txt 
linux/Documentation/connector/connector.txt
--- linux/Documentation/connector/connector.txt 1970/01/01 00:00:00
+++ linux/Documentation/connector/connector.txt 2005-09-15 09:52:36.880572000 
+0100     1.1
@@ -0,0 +1,133 @@
+/*****************************************/
+Kernel Connector.
+/*****************************************/
+
+Kernel connector - new netlink based userspace <-> kernel space easy
+to use communication module.
+
+Connector driver adds possibility to connect various agents using
+netlink based network.  One must register callback and
+identifier. When driver receives special netlink message with
+appropriate identifier, appropriate callback will be called.
+
+From the userspace point of view it's quite straightforward:
+
+       socket();
+       bind();
+       send();
+       recv();
+
+But if kernelspace want to use full power of such connections, driver
+writer must create special sockets, must know about struct sk_buff
+handling...  Connector allows any kernelspace agents to use netlink
+based networking for inter-process communication in a significantly
+easier way:
+
+int cn_add_callback(struct cb_id *id, char *name, void (*callback) (void *));
+void cn_netlink_send(struct cn_msg *msg, u32 __group, int gfp_mask);
+
+struct cb_id
+{
+       __u32                   idx;
+       __u32                   val;
+};
+
+idx and val are unique identifiers which must be registered in
+connector.h for in-kernel usage.  void (*callback) (void *) - is a
+callback function which will be called when message with above idx.val
+will be received by connector core.  Argument for that function must
+be dereferenced to struct cn_msg *.
+
+struct cn_msg
+{
+       struct cb_id            id;
+
+       __u32                   seq;
+       __u32                   ack;
+
+       __u32                   len;            /* Length of the following data 
*/
+       __u8                    data[0];
+};
+
+/*****************************************/
+Connector interfaces.
+/*****************************************/
+
+int cn_add_callback(struct cb_id *id, char *name, void (*callback) (void *));
+
+Registers new callback with connector core.
+
+struct cb_id *id               - unique connector's user identifier.
+                                 It must be registered in connector.h for 
legal in-kernel users.
+char *name                     - connector's callback symbolic name.
+void (*callback) (void *)      - connector's callback.
+                                 Argument must be dereferenced to struct 
cn_msg *.
+
+void cn_del_callback(struct cb_id *id);
+
+Unregisters new callback with connector core.
+
+struct cb_id *id               - unique connector's user identifier.
+
+void cn_netlink_send(struct cn_msg *msg, u32 __groups, int gfp_mask);
+
+Sends message to the specified groups.  It can be safely called from
+any context, but may silently fail under strong memory pressure.
+
+struct cn_msg *                        - message header(with attached data).
+u32 __group                    - destination group.
+                                 If __group is zero, then appropriate group 
will
+                                 be searched through all registered connector 
users,
+                                 and message will be delivered to the group 
which was
+                                 created for user with the same ID as in msg.
+                                 If __group is not zero, then message will be 
delivered
+                                 to the specified group.
+int gfp_mask                   - GFP mask.
+
+Note: When registering new callback user, connector core assigns
+netlink group to the user which is equal to it's id.idx.
+
+/*****************************************/
+Protocol description.
+/*****************************************/
+
+Current offers transport layer with fixed header.  Recommended
+protocol which uses such header is following:
+
+msg->seq and msg->ack are used to determine message genealogy.  When
+someone sends message it puts there locally unique sequence and random
+acknowledge numbers.  Sequence number may be copied into
+nlmsghdr->nlmsg_seq too.
+
+Sequence number is incremented with each message to be sent.
+
+If we expect reply to our message, then sequence number in received
+message MUST be the same as in original message, and acknowledge
+number MUST be the same + 1.
+
+If we receive message and it's sequence number is not equal to one we
+are expecting, then it is new message.  If we receive message and it's
+sequence number is the same as one we are expecting, but it's
+acknowledge is not equal acknowledge number in original message + 1,
+then it is new message.
+
+Obviously, protocol header contains above id.
+
+connector allows event notification in the following form: kernel
+driver or userspace process can ask connector to notify it when
+selected id's will be turned on or off(registered or unregistered it's
+callback). It is done by sending special command to connector
+driver(it also registers itself with id={-1, -1}).
+
+As example of usage Documentation/connector now contains cn_test.c -
+testing module which uses connector to request notification and to
+send messages.
+
+/*****************************************/
+Reliability.
+/*****************************************/
+
+Netlink itself is not reliable protocol, that means that messages can
+be lost due to memory pressure or process' receiving queue overflowed,
+so caller is warned must be prepared. That is why struct cn_msg [main
+connector's message header] contains u32 seq and u32 ack fields.
diff -urN linux/Documentation/cpu-freq/cpufreq-stats.txt 
linux/Documentation/cpu-freq/cpufreq-stats.txt
--- linux/Documentation/cpu-freq/cpufreq-stats.txt      2005/06/07 13:45:26     
1.1
+++ linux/Documentation/cpu-freq/cpufreq-stats.txt      2005/09/15 08:52:36     
1.2
@@ -36,7 +36,7 @@
 
 All the statistics will be from the time the stats driver has been inserted 
 to the time when a read of a particular statistic is done. Obviously, stats 
-driver will not have any information about the the frequcny transitions before
+driver will not have any information about the frequency transitions before
 the stats driver insertion.
 
 
--------------------------------------------------------------------------------
diff -urN linux/Documentation/crypto/api-intro.txt 
linux/Documentation/crypto/api-intro.txt
--- linux/Documentation/crypto/api-intro.txt    2005/03/18 17:36:44     1.18
+++ linux/Documentation/crypto/api-intro.txt    2005/09/15 08:52:36     1.19
@@ -223,6 +223,7 @@
 
 TEA/XTEA algorithm contributors:
   Aaron Grothe
+  Michael Ringe
 
 Khazad algorithm contributors:
   Aaron Grothe
diff -urN linux/Documentation/crypto/descore-readme.txt 
linux/Documentation/crypto/descore-readme.txt
--- linux/Documentation/crypto/descore-readme.txt       2002/11/02 20:01:53     
1.1
+++ linux/Documentation/crypto/descore-readme.txt       2005/09/15 08:52:36     
1.2
@@ -1,4 +1,4 @@
-Below is the orginal README file from the descore.shar package.
+Below is the original README file from the descore.shar package.
 ------------------------------------------------------------------------------
 
 des - fast & portable DES encryption & decryption.
diff -urN linux/Documentation/dvb/bt8xx.txt linux/Documentation/dvb/bt8xx.txt
--- linux/Documentation/dvb/bt8xx.txt   2005/07/13 11:48:46     1.4
+++ linux/Documentation/dvb/bt8xx.txt   2005/09/15 08:52:37     1.5
@@ -1,55 +1,74 @@
-How to get the Nebula Electronics DigiTV, Pinnacle PCTV Sat, Twinhan DST + 
clones working
-=========================================================================================
+How to get the Nebula, PCTV and Twinhan DST cards working
+=========================================================
 
-1) General information
-======================
+This class of cards has a bt878a as the PCI interface, and
+require the bttv driver.
 
-This class of cards has a bt878a chip as the PCI interface.
-The different card drivers require the bttv driver to provide the means
-to access the i2c bus and the gpio pins of the bt8xx chipset.
+Please pay close attention to the warning about the bttv module
+options below for the DST card.
 
-2) Compilation rules for Kernel >= 2.6.12
-=========================================
+1) General informations
+=======================
 
-Enable the following options:
+These drivers require the bttv driver to provide the means to access
+the i2c bus and the gpio pins of the bt8xx chipset.
 
+Because of this, you need to enable
 "Device drivers" => "Multimedia devices"
- => "Video For Linux" => "BT848 Video For Linux"
+  => "Video For Linux" => "BT848 Video For Linux"
+
+Furthermore you need to enable
 "Device drivers" => "Multimedia devices" => "Digital Video Broadcasting 
Devices"
- => "DVB for Linux" "DVB Core Support" "Nebula/Pinnacle PCTV/TwinHan PCI Cards"
+  => "DVB for Linux" "DVB Core Support" "BT8xx based PCI cards"
 
-3) Loading Modules, described by two approaches
-===============================================
+2) Loading Modules
+==================
 
 In general you need to load the bttv driver, which will handle the gpio and
-i2c communication for us, plus the common dvb-bt8xx device driver,
-which is called the backend.
-The frontends for Nebula DigiTV (nxt6000), Pinnacle PCTV Sat (cx24110),
-TwinHan DST + clones (dst and dst-ca) are loaded automatically by the backend.
-For further details about TwinHan DST + clones see /Documentation/dvb/ci.txt.
-
-3a) The manual approach
------------------------
-
-Loading modules:
-modprobe bttv
-modprobe dvb-bt8xx
-
-Unloading modules:
-modprobe -r dvb-bt8xx
-modprobe -r bttv
+i2c communication for us, plus the common dvb-bt8xx device driver.
+The frontends for Nebula (nxt6000), Pinnacle PCTV (cx24110) and
+TwinHan (dst) are loaded automatically by the dvb-bt8xx device driver.
+
+3a) Nebula / Pinnacle PCTV
+--------------------------
 
-3b) The automatic approach
+   $ modprobe bttv (normally bttv is being loaded automatically by kmod)
+   $ modprobe dvb-bt8xx (or just place dvb-bt8xx in /etc/modules for automatic 
loading)
+
+
+3b) TwinHan and Clones
 --------------------------
 
-If not already done by installation, place a line either in
-/etc/modules.conf or in /etc/modprobe.conf containing this text:
-alias char-major-81    bttv
+   $ modprobe bttv i2c_hw=1 card=0x71
+   $ modprobe dvb-bt8xx
+   $ modprobe dst
+
+The value 0x71 will override the PCI type detection for dvb-bt8xx,
+which  is necessary for TwinHan cards.
+
+If you're having an older card (blue color circuit) and card=0x71 locks
+your machine, try using 0x68, too. If that does not work, ask on the
+mailing list.
+
+The DST module takes a couple of useful parameters.
+
+verbose takes values 0 to 4. These values control the verbosity level,
+and can be used to debug also.
+
+verbose=0 means complete disabling of messages
+       1 only error messages are displayed
+       2 notifications are also displayed
+       3 informational messages are also displayed
+       4 debug setting
+
+dst_addons takes values 0 and 0x20. A value of 0 means it is a FTA card.
+0x20 means it has a Conditional Access slot.
+
+The autodected values are determined bythe cards 'response
+string' which you can see in your logs e.g.
 
-Then place a line in /etc/modules containing this text:
-dvb-bt8xx
+dst_get_device_id: Recognise [DSTMCI]
 
-Reboot your system and have fun!
 
 --
-Authors: Richard Walker, Jamie Honan, Michael Hunold, Manu Abraham, Uwe Bugla
+Authors: Richard Walker, Jamie Honan, Michael Hunold, Manu Abraham
diff -urN linux/Documentation/dvb/ci.txt linux/Documentation/dvb/ci.txt
--- linux/Documentation/dvb/ci.txt      2005/05/26 09:12:36     1.1
+++ linux/Documentation/dvb/ci.txt      2005/09/15 08:52:37     1.2
@@ -23,7 +23,6 @@
          eg: $ szap -c channels.conf -r "TMC" -x
 
        (b) a channels.conf containing a valid PMT PID
-
          eg: TMC:11996:h:0:27500:278:512:650:321
 
          here 278 is a valid PMT PID. the rest of the values are the
@@ -31,13 +30,7 @@
 
        (c) after running a szap, you have to run ca_zap, for the
          descrambler to function,
-
-         eg: $ ca_zap patched_channels.conf "TMC"
-
-         The patched means a patch to apply to scan, such that scan can
-         generate a channels.conf_with pmt, which has this PMT PID info
-         (NOTE: szap cannot use this channels.conf with the PMT_PID)
-
+         eg: $ ca_zap channels.conf "TMC"
 
        (d) Hopeflly Enjoy your favourite subscribed channel as you do with
          a FTA card.
diff -urN linux/Documentation/fb/intel810.txt 
linux/Documentation/fb/intel810.txt
--- linux/Documentation/fb/intel810.txt 2004/03/11 16:46:39     1.2
+++ linux/Documentation/fb/intel810.txt 2005/09/15 08:52:37     1.3
@@ -5,6 +5,7 @@
        March 17, 2002
 
        First Released: July 2001
+       Last Update:    September 12, 2005
 ================================================================
 
 A. Introduction
@@ -44,6 +45,8 @@
 
        - Hardware Cursor Support
  
+       - Supports EDID probing either by DDC/I2C or through the BIOS
+
 C.  List of available options
        
    a. "video=i810fb"  
@@ -52,14 +55,17 @@
        Recommendation: required
  
    b. "xres:<value>"  
-       select horizontal resolution in pixels
+       select horizontal resolution in pixels. (This parameter will be
+       ignored if 'mode_option' is specified.  See 'o' below).
 
        Recommendation: user preference 
        (default = 640)
 
    c. "yres:<value>"
        select vertical resolution in scanlines. If Discrete Video Timings
-       is enabled, this will be ignored and computed as 3*xres/4.  
+       is enabled, this will be ignored and computed as 3*xres/4.  (This
+       parameter will be ignored if 'mode_option' is specified.  See 'o'
+       below)  
 
        Recommendation: user preference
        (default = 480)
@@ -86,7 +92,8 @@
    g. "hsync1/hsync2:<value>" 
        select the minimum and maximum Horizontal Sync Frequency of the 
        monitor in KHz.  If a using a fixed frequency monitor, hsync1 must 
-       be equal to hsync2. 
+       be equal to hsync2. If EDID probing is successful, these will be
+       ignored and values will be taken from the EDID block.
 
        Recommendation: check monitor manual for correct values
        default (29/30)
@@ -94,7 +101,8 @@
    h. "vsync1/vsync2:<value>" 
        select the minimum and maximum Vertical Sync Frequency of the monitor
        in Hz. You can also use this option to lock your monitor's refresh 
-       rate.
+       rate. If EDID probing is successful, these will be ignored and values
+       will be taken from the EDID block.
 
        Recommendation: check monitor manual for correct values
        (default = 60/60)
@@ -154,7 +162,11 @@
 
        Recommendation: do not set
        (default = not set)
-                       
+   o. <xres>x<yres>[-<bpp>][@<refresh>]
+       The driver will now accept specification of boot mode option.  If this
+       is specified, the options 'xres' and 'yres' will be ignored. See
+       Documentation/fb/modedb.txt for usage.
+
 D. Kernel booting
 
 Separate each option/option-pair by commas (,) and the option from its value
@@ -176,7 +188,10 @@
 
 IMPORTANT:
 You must include hsync1, hsync2, vsync1 and vsync2 to enable video modes
-better than 640x480 at 60Hz.
+better than 640x480 at 60Hz. HOWEVER, if your chipset/display combination
+supports I2C and has an EDID block, you can safely exclude hsync1, hsync2,
+vsync1 and vsync2 parameters.  These parameters will be taken from the EDID
+block.
 
 E.  Module options
        
@@ -217,32 +232,21 @@
           This is required.  The option is under "Character Devices"
 
        d. Under "Graphics Support", select "Intel 810/815" either statically
-          or as a module.  Choose "use VESA GTF for video timings"  if you 
-          need to maximize the capability of your display.  To be on the 
+          or as a module.  Choose "use VESA Generalized Timing Formula" if
+          you need to maximize the capability of your display.  To be on the 
           safe side, you can leave this unselected.  
   
-        e. If you want a framebuffer console, enable it under "Console 
+       e. If you want support for DDC/I2C probing (Plug and Play Displays),
+          set 'Enable DDC Support' to 'y'. To make this option appear, set
+          'use VESA Generalized Timing Formula' to 'y'.
+
+        f. If you want a framebuffer console, enable it under "Console 
           Drivers"
 
-       f. Compile your kernel. 
+       g. Compile your kernel. 
                
-       g. Load the driver as described in section D and E.
+       h. Load the driver as described in section D and E.
        
-       Optional:       
-       h.  If you are going to run XFree86 with its native drivers, the 
-           standard XFree86 4.1.0 and 4.2.0 drivers should work as is.
-            However, there's a bug in the XFree86 i810 drivers.  It attempts 
-           to use XAA even when switched to the console. This will crash
-           your server. I have a fix at this site:  
-           
-           http://i810fb.sourceforge.net.  
-
-           You can either use the patch, or just replace 
-           
-            /usr/X11R6/lib/modules/drivers/i810_drv.o
-
-           with the one provided at the website.       
-
        i.  Try the DirectFB (http://www.directfb.org) + the i810 gfxdriver
            patch to see the chipset in action (or inaction :-).
 
diff -urN linux/Documentation/fb/modedb.txt linux/Documentation/fb/modedb.txt
--- linux/Documentation/fb/modedb.txt   2004/02/05 02:39:51     1.3
+++ linux/Documentation/fb/modedb.txt   2005/09/15 08:52:37     1.4
@@ -20,12 +20,83 @@
 
 Valid mode specifiers (mode_option argument):
 
-    <xres>x<yres>[-<bpp>][@<refresh>]
+    <xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m]
     <name>[-<bpp>][@<refresh>]
 
 with <xres>, <yres>, <bpp> and <refresh> decimal numbers and <name> a string.
 Things between square brackets are optional.
 
+If 'M' is specified in the mode_option argument (after <yres> and before
+<bpp> and <refresh>, if specified) the timings will be calculated using
+VESA(TM) Coordinated Video Timings instead of looking up the mode from a table.
+If 'R' is specified, do a 'reduced blanking' calculation for digital displays.
+If 'i' is specified, calculate for an interlaced mode.  And if 'm' is
+specified, add margins to the calculation (1.8% of xres rounded down to 8
+pixels and 1.8% of yres).
+
+       Sample usage: 1024x768M@60m - CVT timing with margins
+
+***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo *****
+
+What is the VESA(TM) Coordinated Video Timings (CVT)?
+
+From the VESA(TM) Website:
+
+     "The purpose of CVT is to provide a method for generating a consistent
+      and coordinated set of standard formats, display refresh rates, and
+      timing specifications for computer display products, both those
+      employing CRTs, and those using other display technologies. The
+      intention of CVT is to give both source and display manufacturers a
+      common set of tools to enable new timings to be developed in a
+      consistent manner that ensures greater compatibility."
+
+This is the third standard approved by VESA(TM) concerning video timings.  The
+first was the Discrete Video Timings (DVT) which is  a collection of
+pre-defined modes approved by VESA(TM).  The second is the Generalized Timing
+Formula (GTF) which is an algorithm to calculate the timings, given the
+pixelclock, the horizontal sync frequency, or the vertical refresh rate.
+
+The GTF is limited by the fact that it is designed mainly for CRT displays.
+It artificially increases the pixelclock because of its high blanking
+requirement. This is inappropriate for digital display interface with its high
+data rate which requires that it conserves the pixelclock as much as possible.
+Also, GTF does not take into account the aspect ratio of the display.
+
+The CVT addresses these limitations.  If used with CRT's, the formula used
+is a derivation of GTF with a few modifications.  If used with digital
+displays, the "reduced blanking" calculation can be used.
+
+From the framebuffer subsystem perspective, new formats need not be added
+to the global mode database whenever a new mode is released by display
+manufacturers. Specifying for CVT will work for most, if not all, relatively
+new CRT displays and probably with most flatpanels, if 'reduced blanking'
+calculation is specified.  (The CVT compatibility of the display can be
+determined from its EDID. The version 1.3 of the EDID has extra 128-byte
+blocks where additional timing information is placed.  As of this time, there
+is no support yet in the layer to parse this additional blocks.)
+
+CVT also introduced a new naming convention (should be seen from dmesg output):
+
+    <pix>M<a>[-R]
+
+    where: pix = total amount of pixels in MB (xres x yres)
+           M   = always present
+           a   = aspect ratio (3 - 4:3; 4 - 5:4; 9 - 15:9, 16:9; A - 16:10)
+          -R   = reduced blanking
+
+         example:  .48M3-R - 800x600 with reduced blanking
+
+Note: VESA(TM) has restrictions on what is a standard CVT timing:
+
+      - aspect ratio can only be one of the above values
+      - acceptable refresh rates are 50, 60, 70 or 85 Hz only
+      - if reduced blanking, the refresh rate must be at 60Hz
+
+If one of the above are not satisfied, the kernel will print a warning but the
+timings will still be calculated.
+
+***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo *****
+
 To find a suitable video mode, you just call
 
 int __init fb_find_mode(struct fb_var_screeninfo *var,
diff -urN linux/Documentation/fb/cyblafb/bugs 
linux/Documentation/fb/cyblafb/bugs
--- linux/Documentation/fb/cyblafb/bugs 1970/01/01 00:00:00
+++ linux/Documentation/fb/cyblafb/bugs 2005-09-15 09:52:37.337760000 +0100     
1.1
@@ -0,0 +1,14 @@
+Bugs
+====
+
+I currently don't know of any bug. Please do send reports to:
+ - linux-fbdev-devel@lists.sourceforge.net
+ - Knut_Petersen@t-online.de.
+
+
+Untested features
+=================
+
+All LCD stuff is untested. If it worked in tridentfb, it should work in
+cyblafb. Please test and report the results to Knut_Petersen@t-online.de.
+
diff -urN linux/Documentation/fb/cyblafb/credits 
linux/Documentation/fb/cyblafb/credits
--- linux/Documentation/fb/cyblafb/credits      1970/01/01 00:00:00
+++ linux/Documentation/fb/cyblafb/credits      2005-09-15 09:52:37.352692000 
+0100     1.1
@@ -0,0 +1,7 @@
+Thanks to
+=========
+   *   Alan Hourihane, for writing the X trident driver
+   *   Jani Monoses, for writing the tridentfb driver
+   *   Antonino A. Daplas, for review of the first published
+       version of cyblafb and some code
+   *   Jochen Hein, for testing and a helpfull bug report
diff -urN linux/Documentation/fb/cyblafb/documentation 
linux/Documentation/fb/cyblafb/documentation
--- linux/Documentation/fb/cyblafb/documentation        1970/01/01 00:00:00
+++ linux/Documentation/fb/cyblafb/documentation        2005-09-15 
09:52:37.367699000 +0100     1.1
@@ -0,0 +1,17 @@
+Available Documentation
+=======================
+
+Apollo PLE 133 Chipset VT8601A North Bridge Datasheet, Rev. 1.82, October 22,
+2001, available from VIA:
+
+       http://www.viavpsd.com/product/6/15/DS8601A182.pdf
+
+The datasheet is incomplete, some registers that need to be programmed are not
+explained at all and important bits are listed as "reserved". But you really
+need the datasheet to understand the code.  "p. xxx" comments refer to page
+numbers of this document.
+
+XFree/XOrg drivers are available and of good quality, looking at the code
+there is a good idea if the datasheet does not provide enough information
+or if the datasheet seems to be wrong.
+
diff -urN linux/Documentation/fb/cyblafb/fb.modes 
linux/Documentation/fb/cyblafb/fb.modes
--- linux/Documentation/fb/cyblafb/fb.modes     1970/01/01 00:00:00
+++ linux/Documentation/fb/cyblafb/fb.modes     2005-09-15 09:52:37.383756000 
+0100     1.1
@@ -0,0 +1,155 @@
+#
+#   Sample fb.modes file
+#
+#      Provides an incomplete list of working modes for
+#      the cyberblade/i1 graphics core.
+#
+#      The value 4294967256 is used instead of -40. Of course, -40 is not
+#      a really reasonable value, but chip design does not always follow
+#      logic. Believe me, it's ok, and it's the way the BIOS does it.
+#
+#      fbset requires 4294967256 in fb.modes and -40 as an argument to
+#      the -t parameter. That's also not too reasonable, and it might change
+#      in the future or might even be differt for your current version.
+#
+
+mode "640x480-50"
+    geometry 640 480 640 3756 8
+    timings 47619 4294967256 24 17 0 216 3
+endmode
+
+mode "640x480-60"
+    geometry 640 480 640 3756 8
+    timings 39682 4294967256 24 17 0 216 3
+endmode
+
+mode "640x480-70"
+    geometry 640 480 640 3756 8
+    timings 34013 4294967256 24 17 0 216 3
+endmode
+
+mode "640x480-72"
+    geometry 640 480 640 3756 8
+    timings 33068 4294967256 24 17 0 216 3
+endmode
+
+mode "640x480-75"
+    geometry 640 480 640 3756 8
+    timings 31746 4294967256 24 17 0 216 3
+endmode
+
+mode "640x480-80"
+    geometry 640 480 640 3756 8
+    timings 29761 4294967256 24 17 0 216 3
+endmode
+
+mode "640x480-85"
+    geometry 640 480 640 3756 8
+    timings 28011 4294967256 24 17 0 216 3
+endmode
+
+mode "800x600-50"
+    geometry 800 600 800 3221 8
+    timings 30303 96 24 14 0 136 11
+endmode
+
+mode "800x600-60"
+    geometry 800 600 800 3221 8
+    timings 25252 96 24 14 0 136 11
+endmode
+
+mode "800x600-70"
+    geometry 800 600 800 3221 8
+    timings 21645 96 24 14 0 136 11
+endmode
+
+mode "800x600-72"
+    geometry 800 600 800 3221 8
+    timings 21043 96 24 14 0 136 11
+endmode
+
+mode "800x600-75"
+    geometry 800 600 800 3221 8
+    timings 20202 96 24 14 0 136 11
+endmode
+
+mode "800x600-80"
+    geometry 800 600 800 3221 8
+    timings 18939 96 24 14 0 136 11
+endmode
+
+mode "800x600-85"
+    geometry 800 600 800 3221 8
+    timings 17825 96 24 14 0 136 11
+endmode
+
+mode "1024x768-50"
+    geometry 1024 768 1024 2815 8
+    timings 19054 144 24 29 0 120 3
+endmode
+
+mode "1024x768-60"
+    geometry 1024 768 1024 2815 8
+    timings 15880 144 24 29 0 120 3
+endmode
+
+mode "1024x768-70"
+    geometry 1024 768 1024 2815 8
+    timings 13610 144 24 29 0 120 3
+endmode
+
+mode "1024x768-72"
+    geometry 1024 768 1024 2815 8
+    timings 13232 144 24 29 0 120 3
+endmode
+
+mode "1024x768-75"
+    geometry 1024 768 1024 2815 8
+    timings 12703 144 24 29 0 120 3
+endmode
+
+mode "1024x768-80"
+    geometry 1024 768 1024 2815 8
+    timings 11910 144 24 29 0 120 3
+endmode
+
+mode "1024x768-85"
+    geometry 1024 768 1024 2815 8
+    timings 11209 144 24 29 0 120 3
+endmode
+
+mode "1280x1024-50"
+    geometry 1280 1024 1280 2662 8
+    timings 11114 232 16 39 0 160 3
+endmode
+
+mode "1280x1024-60"
+    geometry 1280 1024 1280 2662 8
+    timings 9262 232 16 39 0 160 3
+endmode
+
+mode "1280x1024-70"
+    geometry 1280 1024 1280 2662 8
+    timings 7939 232 16 39 0 160 3
+endmode
+
+mode "1280x1024-72"
+    geometry 1280 1024 1280 2662 8
+    timings 7719 232 16 39 0 160 3
+endmode
+
+mode "1280x1024-75"
+    geometry 1280 1024 1280 2662 8
+    timings 7410 232 16 39 0 160 3
+endmode
+
+mode "1280x1024-80"
+    geometry 1280 1024 1280 2662 8
+    timings 6946 232 16 39 0 160 3
+endmode
+
+mode "1280x1024-85"
+    geometry 1280 1024 1280 2662 8
+    timings 6538 232 16 39 0 160 3
+endmode
+
diff -urN linux/Documentation/fb/cyblafb/performance 
linux/Documentation/fb/cyblafb/performance
--- linux/Documentation/fb/cyblafb/performance  1970/01/01 00:00:00
+++ linux/Documentation/fb/cyblafb/performance  2005-09-15 09:52:37.399613000 
+0100     1.1
@@ -0,0 +1,80 @@
+Speed
+=====
+
+CyBlaFB is much faster than tridentfb and vesafb. Compare the performance data
+for mode 1280x1024-[8,16,32]@61 Hz.
+
+Test 1: Cat a file with 2000 lines of 0 characters.
+Test 2: Cat a file with 2000 lines of 80 characters.
+Test 3: Cat a file with 2000 lines of 160 characters.
+
+All values show system time use in seconds, kernel 2.6.12 was used for
+the measurements. 2.6.13 is a bit slower, 2.6.14 hopefully will include a
+patch that speeds up kernel bitblitting a lot ( > 20%).
+
++-----------+-----------------------------------------------------+
+|          |                   not accelerated                   |
+| TRIDENTFB +-----------------+-----------------+-----------------+
+| of 2.6.12 |     8 bpp      |     16 bpp      |     32 bpp      |
+|          | noypan |   ypan | noypan |   ypan | noypan |   ypan |
++-----------+--------+--------+--------+--------+--------+--------+
+|    Test 1 |  4.31 |   4.33 |   6.05 |  12.81 |  ----  |  ----  |
+|    Test 2 |  67.94 |  5.44 | 123.16 |  14.79 |  ----  |  ----  |
+|    Test 3 | 131.36 |  6.55 | 240.12 |  16.76 |  ----  |  ----  |
++-----------+--------+--------+--------+--------+--------+--------+
+|  Comments |                |                 | completely bro- |
+|          |                 |                 | ken, monitor    |
+|          |                 |                 | switches off    |
++-----------+-----------------+-----------------+-----------------+
+
+
++-----------+-----------------------------------------------------+
+|          |                     accelerated                     |
+| TRIDENTFB +-----------------+-----------------+-----------------+
+| of 2.6.12 |     8 bpp      |     16 bpp      |     32 bpp      |
+|          | noypan |   ypan | noypan |   ypan | noypan |   ypan |
++-----------+--------+--------+--------+--------+--------+--------+
+|    Test 1 |  ----  | ----  |  20.62 |   1.22 |  ----  |  ----  |
+|    Test 2 |  ----  | ----  |  22.61 |   3.19 |  ----  |  ----  |
+|    Test 3 |  ----  | ----  |  24.59 |   5.16 |  ----  |  ----  |
++-----------+--------+--------+--------+--------+--------+--------+
+|  Comments | broken, writing | broken, ok only | completely bro- |
+|          | to wrong places | if bgcolor is   | ken, monitor    |
+|          | on screen + bug | black, bug in   | switches off    |
+|          | in fillrect()   | fillrect()      |                 |
++-----------+-----------------+-----------------+-----------------+
+
+
++-----------+-----------------------------------------------------+
+|          |                   not accelerated                   |
+|   VESAFB  +-----------------+-----------------+-----------------+
+| of 2.6.12 |     8 bpp      |     16 bpp      |     32 bpp      |
+|          | noypan |   ypan | noypan |   ypan | noypan |   ypan |
++-----------+--------+--------+--------+--------+--------+--------+
+|    Test 1 |  4.26 |   3.76 |   5.99 |   7.23 |  ----  |  ----  |
+|    Test 2 |  65.65 |  4.89 | 120.88 |   9.08 |  ----  |  ----  |
+|    Test 3 | 126.91 |  5.94 | 235.77 |  11.03 |  ----  |  ----  |
++-----------+--------+--------+--------+--------+--------+--------+
+|  Comments | vga=0x307       | vga=0x31a      | vga=0x31b not   |
+|          | fh=80kHz        | fh=80kHz        | supported by    |
+|          | fv=75kHz        | fv=75kHz        | video BIOS and  |
+|          |                 |                 | hardware        |
++-----------+-----------------+-----------------+-----------------+
+
+
++-----------+-----------------------------------------------------+
+|          |                     accelerated                     |
+|  CYBLAFB  +-----------------+-----------------+-----------------+
+|          |      8 bpp      |     16 bpp      |     32 bpp      |
+|          | noypan |   ypan | noypan |   ypan | noypan |   ypan |
++-----------+--------+--------+--------+--------+--------+--------+
+|    Test 1 |  8.02 |   0.23 |  19.04 |   0.61 |  57.12 |   2.74 |
+|    Test 2 |  8.38 |   0.55 |  19.39 |   0.92 |  57.54 |   3.13 |
+|    Test 3 |  8.73 |   0.86 |  19.74 |   1.24 |  57.95 |   3.51 |
++-----------+--------+--------+--------+--------+--------+--------+
+|  Comments |                |                 |                 |
+|          |                 |                 |                 |
+|          |                 |                 |                 |
+|          |                 |                 |                 |
++-----------+-----------------+-----------------+-----------------+
+
diff -urN linux/Documentation/fb/cyblafb/todo 
linux/Documentation/fb/cyblafb/todo
--- linux/Documentation/fb/cyblafb/todo 1970/01/01 00:00:00
+++ linux/Documentation/fb/cyblafb/todo 2005-09-15 09:52:37.414667000 +0100     
1.1
@@ -0,0 +1,32 @@
+TODO / Missing features
+=======================
+
+Verify LCD stuff               "stretch" and "center" options are
+                               completely untested ... this code needs to be
+                               verified. As I don't have access to such
+                               hardware, please contact me if you are
+                               willing run some tests.
+
+Interlaced video modes         The reason that interleaved
+                               modes are disabled is that I do not know
+                               the meaning of the vertical interlace
+                               parameter. Also the datasheet mentions a
+                               bit d8 of a horizontal interlace parameter,
+                               but nowhere the lower 8 bits. Please help
+                               if you can.
+
+low-res double scan modes      Who needs it?
+
+accelerated color blitting     Who needs it? The console driver does use color
+                               blitting for nothing but drawing the penguine,
+                               everything else is done using color expanding
+                               blitting of 1bpp character bitmaps.
+
+xpanning                       Who needs it?
+
+ioctls                         Who needs it?
+
+TV-out                         Will be done later
+
+???                            Feel free to contact me if you have any
+                               feature requests
diff -urN linux/Documentation/fb/cyblafb/usage 
linux/Documentation/fb/cyblafb/usage
--- linux/Documentation/fb/cyblafb/usage        1970/01/01 00:00:00
+++ linux/Documentation/fb/cyblafb/usage        2005-09-15 09:52:37.429844000 
+0100     1.1
@@ -0,0 +1,206 @@
+CyBlaFB is a framebuffer driver for the Cyberblade/i1 graphics core integrated
+into the VIA Apollo PLE133 (aka vt8601) south bridge. It is developed and
+tested using a VIA EPIA 5000 board.
+
+Cyblafb - compiled into the kernel or as a module?
+==================================================
+
+You might compile cyblafb either as a module or compile it permanently into the
+kernel.
+
+Unless you have a real reason to do so you should not compile both vesafb and
+cyblafb permanently into the kernel. It's possible and it helps during the
+developement cycle, but it's useless and will at least block some otherwise
+usefull memory for ordinary users.
+
+Selecting Modes
+===============
+
+       Startup Mode
+       ============
+
+       First of all, you might use the "vga=???" boot parameter as it is
+       documented in vesafb.txt and svga.txt. Cyblafb will detect the video
+       mode selected and will use the geometry and timings found by
+       inspecting the hardware registers.
+
+               video=cyblafb vga=0x317
+
+       Alternatively you might use a combination of the mode, ref and bpp
+       parameters. If you compiled the driver into the kernel, add something
+       like this to the kernel command line:
+
+               video=cyblafb:1280x1024,bpp=16,ref=50 ...
+
+       If you compiled the driver as a module, the same mode would be
+       selected by the following command:
+
+               modprobe cyblafb mode=1280x1024 bpp=16 ref=50 ...
+
+       None of the modes possible to select as startup modes are affected by
+       the problems described at the end of the next subsection.
+
+       Mode changes using fbset
+       ========================
+
+       You might use fbset to change the video mode, see "man fbset". Cyblafb
+       generally does assume that you know what you are doing. But it does
+       some checks, especially those that are needed to prevent you from
+       damaging your hardware.
+
+               - only 8, 16, 24 and 32 bpp video modes are accepted
+               - interlaced video modes are not accepted
+               - double scan video modes are not accepted
+               - if a flat panel is found, cyblafb does not allow you
+                 to program a resolution higher than the physical
+                 resolution of the flat panel monitor
+               - cyblafb does not allow xres to differ from xres_virtual
+               - cyblafb does not allow vclk to exceed 230 MHz. As 32 bpp
+                 and (currently) 24 bit modes use a doubled vclk internally,
+                 the dotclock limit as seen by fbset is 115 MHz for those
+                 modes and 230 MHz for 8 and 16 bpp modes.
+
+       Any request that violates the rules given above will be ignored and
+       fbset will return an error.
+
+       If you program a virtual y resolution higher than the hardware limit,
+       cyblafb will silently decrease that value to the highest possible
+       value.
+
+       Attempts to disable acceleration are ignored.
+
+       Some video modes that should work do not work as expected. If you use
+       the standard fb.modes, fbset 640x480-60 will program that mode, but
+       you will see a vertical area, about two characters wide, with only
+       much darker characters than the other characters on the screen.
+       Cyblafb does allow that mode to be set, as it does not violate the
+       official specifications. It would need a lot of code to reliably sort
+       out all invalid modes, playing around with the margin values will
+       give a valid mode quickly. And if cyblafb would detect such an invalid
+       mode, should it silently alter the requested values or should it
+       report an error? Both options have some pros and cons. As stated
+       above, none of the startup modes are affected, and if you set
+       verbosity to 1 or higher, cyblafb will print the fbset command that
+       would be needed to program that mode using fbset.
+
+
+Other Parameters
+================
+
+
+crt            don't autodetect, assume monitor connected to
+               standard VGA connector
+
+fp             don't autodetect, assume flat panel display
+               connected to flat panel monitor interface
+
+nativex        inform driver about native x resolution of
+               flat panel monitor connected to special
+               interface (should be autodetected)
+
+stretch        stretch image to adapt low resolution modes to
+               higer resolutions of flat panel monitors
+               connected to special interface
+
+center         center image to adapt low resolution modes to
+               higer resolutions of flat panel monitors
+               connected to special interface
+
+memsize        use if autodetected memsize is wrong ...
+               should never be necessary
+
+nopcirr        disable PCI read retry
+nopciwr        disable PCI write retry
+nopcirb        disable PCI read bursts
+nopciwb        disable PCI write bursts
+
+bpp            bpp for specified modes
+               valid values: 8 || 16 || 24 || 32
+
+ref            refresh rate for specified mode
+               valid values: 50 <= ref <= 85
+
+mode           640x480 or 800x600 or 1024x768 or 1280x1024
+               if not specified, the startup mode will be detected
+               and used, so you might also use the vga=??? parameter
+               described in vesafb.txt. If you do not specify a mode,
+               bpp and ref parameters are ignored.
+
+verbosity      0 is the default, increase to at least 2 for every
+               bug report!
+
+vesafb         allows cyblafb to be loaded after vesafb has been
+               loaded. See sections "Module unloading ...".
+
+
+Development hints
+=================
+
+It's much faster do compile a module and to load the new version after
+unloading the old module than to compile a new kernel and to reboot. So if you
+try to work on cyblafb, it might be a good idea to use cyblafb as a module.
+In real life, fast often means dangerous, and that's also the case here. If
+you introduce a serious bug when cyblafb is compiled into the kernel, the
+kernel will lock or oops with a high probability before the file system is
+mounted, and the danger for your data is low. If you load a broken own version
+of cyblafb on a running system, the danger for the integrity of the file
+system is much higher as you might need a hard reset afterwards. Decide
+yourself.
+
+Module unloading, the vfb method
+================================
+
+If you want to unload/reload cyblafb using the virtual framebuffer, you need
+to enable vfb support in the kernel first. After that, load the modules as
+shown below:
+
+       modprobe vfb vfb_enable=1
+       modprobe fbcon
+       modprobe cyblafb
+       fbset -fb /dev/fb1 1280x1024-60 -vyres 2662
+       con2fb /dev/fb1 /dev/tty1
+       ...
+
+If you now made some changes to cyblafb and want to reload it, you might do it
+as show below:
+
+       con2fb /dev/fb0 /dev/tty1
+       ...
+       rmmod cyblafb
+       modprobe cyblafb
+       con2fb /dev/fb1 /dev/tty1
+       ...
+
+Of course, you might choose another mode, and most certainly you also want to
+map some other /dev/tty* to the real framebuffer device. You might also choose
+to compile fbcon as a kernel module or place it permanently in the kernel.
+
+I do not know of any way to unload fbcon, and fbcon will prevent the
+framebuffer device loaded first from unloading. [If there is a way, then
+please add a description here!]
+
+Module unloading, the vesafb method
+===================================
+
+Configure the kernel:
+
+       <*> Support for frame buffer devices
+       [*]   VESA VGA graphics support
+       <M>   Cyberblade/i1 support
+
+Add e.g. "video=vesafb:ypan vga=0x307" to the kernel parameters. The ypan
+parameter is important, choose any vga parameter you like as long as it is
+a graphics mode.
+
+After booting, load cyblafb without any mode and bpp parameter and assign
+cyblafb to individual ttys using con2fb, e.g.:
+
+       modprobe cyblafb vesafb=1
+       con2fb /dev/fb1 /dev/tty1
+
+Unloading cyblafb works without problems after you assign vesafb to all
+ttys again, e.g.:
+
+       con2fb /dev/fb0 /dev/tty1
+       rmmod cyblafb
+
diff -urN linux/Documentation/fb/cyblafb/whycyblafb 
linux/Documentation/fb/cyblafb/whycyblafb
--- linux/Documentation/fb/cyblafb/whycyblafb   1970/01/01 00:00:00
+++ linux/Documentation/fb/cyblafb/whycyblafb   2005-09-15 09:52:37.446793000 
+0100     1.1
@@ -0,0 +1,85 @@
+I tried the following framebuffer drivers:
+
+       - TRIDENTFB is full of bugs. Acceleration is broken for Blade3D
+         graphics cores like the cyberblade/i1. It claims to support a great
+         number of devices, but documentation for most of these devices is
+         unfortunately not available. There is _no_ reason to use tridentfb
+         for cyberblade/i1 + CRT users. VESAFB is faster, and the one
+         advantage, mode switching, is broken in tridentfb.
+
+       - VESAFB is used by many distributions as a standard. Vesafb does
+         not support mode switching. VESAFB is a bit faster than the working
+         configurations of TRIDENTFB, but it is still too slow, even if you
+         use ypan.
+
+       - EPIAFB (you'll find it on sourceforge) supports the Cyberblade/i1
+         graphics core, but it still has serious bugs and developement seems
+         to have stopped. This is the one driver with TV-out support. If you
+         do need this feature, try epiafb.
+
+None of these drivers was a real option for me.
+
+I believe that is unreasonable to change code that announces to support 20
+devices if I only have more or less sufficient documentation for exactly one
+of these. The risk of breaking device foo while fixing device bar is too high.
+
+So I decided to start CyBlaFB as a stripped down tridentfb.
+
+All code specific to other Trident chips has been removed. After that there
+were a lot of cosmetic changes to increase the readability of the code. All
+register names were changed to those mnemonics used in the datasheet. Function
+and macro names were changed if they hindered easy understanding of the code.
+
+After that I debugged the code and implemented some new features. I'll try to
+give a little summary of the main changes:
+
+       - calculation of vertical and horizontal timings was fixed
+
+       - video signal quality has been improved dramatically
+
+       - acceleration:
+
+               - fillrect and copyarea were fixed and reenabled
+
+               - color expanding imageblit was newly implemented, color
+                 imageblit (only used to draw the penguine) still uses the
+                 generic code.
+
+               - init of the acceleration engine was improved and moved to a
+                 place where it really works ...
+
+               - sync function has a timeout now and tries to reset and
+                 reinit the accel engine if necessary
+
+               - fewer slow copyarea calls when doing ypan scrolling by using
+                 undocumented bit d21 of screen start address stored in
+                 CR2B[5]. BIOS does use it also, so this should be safe.
+
+       - cyblafb rejects any attempt to set modes that would cause vclk
+         values above reasonable 230 MHz. 32bit modes use a clock
+         multiplicator of 2, so fbset does show the correct values for
+         pixclock but not for vclk in this case. The fbset limit is 115 MHz
+         for 32 bpp modes.
+
+       - cyblafb rejects modes known to be broken or unimplemented (all
+         interlaced modes, all doublescan modes for now)
+
+       - cyblafb now works independant of the video mode in effect at startup
+         time (tridentfb does not init all needed registers to reasonable
+         values)
+
+       - switching between video modes does work reliably now
+
+       - the first video mode now is the one selected on startup using the
+         vga=???? mechanism or any of
+               - 640x480, 800x600, 1024x768, 1280x1024
+               - 8, 16, 24 or 32 bpp
+               - refresh between 50 Hz and 85 Hz, 1 Hz steps (1280x1024-32
+                 is limited to 63Hz)
+
+       - pci retry and pci burst mode are settable (try to disable if you
+         experience latency problems)
+
+       - built as a module cyblafb might be unloaded and reloaded using
+         the vfb module and con2vt or might be used together with vesafb
+
diff -urN linux/Documentation/filesystems/files.txt 
linux/Documentation/filesystems/files.txt
--- linux/Documentation/filesystems/files.txt   1970/01/01 00:00:00
+++ linux/Documentation/filesystems/files.txt   2005-09-15 09:52:37.582850000 
+0100     1.1
@@ -0,0 +1,123 @@
+File management in the Linux kernel
+-----------------------------------
+
+This document describes how locking for files (struct file)
+and file descriptor table (struct files) works.
+
+Up until 2.6.12, the file descriptor table has been protected
+with a lock (files->file_lock) and reference count (files->count).
+->file_lock protected accesses to all the file related fields
+of the table. ->count was used for sharing the file descriptor
+table between tasks cloned with CLONE_FILES flag. Typically
+this would be the case for posix threads. As with the common
+refcounting model in the kernel, the last task doing
+a put_files_struct() frees the file descriptor (fd) table.
+The files (struct file) themselves are protected using
+reference count (->f_count).
+
+In the new lock-free model of file descriptor management,
+the reference counting is similar, but the locking is
+based on RCU. The file descriptor table contains multiple
+elements - the fd sets (open_fds and close_on_exec, the
+array of file pointers, the sizes of the sets and the array
+etc.). In order for the updates to appear atomic to
+a lock-free reader, all the elements of the file descriptor
+table are in a separate structure - struct fdtable.
+files_struct contains a pointer to struct fdtable through
+which the actual fd table is accessed. Initially the
+fdtable is embedded in files_struct itself. On a subsequent
+expansion of fdtable, a new fdtable structure is allocated
+and files->fdtab points to the new structure. The fdtable
+structure is freed with RCU and lock-free readers either
+see the old fdtable or the new fdtable making the update
+appear atomic. Here are the locking rules for
+the fdtable structure -
+
+1. All references to the fdtable must be done through
+   the files_fdtable() macro :
+
+       struct fdtable *fdt;
+
+       rcu_read_lock();
+
+       fdt = files_fdtable(files);
+       ....
+       if (n <= fdt->max_fds)
+               ....
+       ...
+       rcu_read_unlock();
+
+   files_fdtable() uses rcu_dereference() macro which takes care of
+   the memory barrier requirements for lock-free dereference.
+   The fdtable pointer must be read within the read-side
+   critical section.
+
+2. Reading of the fdtable as described above must be protected
+   by rcu_read_lock()/rcu_read_unlock().
+
+3. For any update to the the fd table, files->file_lock must
+   be held.
+
+4. To look up the file structure given an fd, a reader
+   must use either fcheck() or fcheck_files() APIs. These
+   take care of barrier requirements due to lock-free lookup.
+   An example :
+
+       struct file *file;
+
+       rcu_read_lock();
+       file = fcheck(fd);
+       if (file) {
+               ...
+       }
+       ....
+       rcu_read_unlock();
+
+5. Handling of the file structures is special. Since the look-up
+   of the fd (fget()/fget_light()) are lock-free, it is possible
+   that look-up may race with the last put() operation on the
+   file structure. This is avoided using the rcuref APIs
+   on ->f_count :
+
+       rcu_read_lock();
+       file = fcheck_files(files, fd);
+       if (file) {
+               if (rcuref_inc_lf(&file->f_count))
+                       *fput_needed = 1;
+               else
+               /* Didn't get the reference, someone's freed */
+                       file = NULL;
+       }
+       rcu_read_unlock();
+       ....
+       return file;
+
+   rcuref_inc_lf() detects if refcounts is already zero or
+   goes to zero during increment. If it does, we fail
+   fget()/fget_light().
+
+6. Since both fdtable and file structures can be looked up
+   lock-free, they must be installed using rcu_assign_pointer()
+   API. If they are looked up lock-free, rcu_dereference()
+   must be used. However it is advisable to use files_fdtable()
+   and fcheck()/fcheck_files() which take care of these issues.
+
+7. While updating, the fdtable pointer must be looked up while
+   holding files->file_lock. If ->file_lock is dropped, then
+   another thread expand the files thereby creating a new
+   fdtable and making the earlier fdtable pointer stale.
+   For example :
+
+       spin_lock(&files->file_lock);
+       fd = locate_fd(files, file, start);
+       if (fd >= 0) {
+               /* locate_fd() may have expanded fdtable, load the ptr */
+               fdt = files_fdtable(files);
+               FD_SET(fd, fdt->open_fds);
+               FD_CLR(fd, fdt->close_on_exec);
+               spin_unlock(&files->file_lock);
+       .....
+
+   Since locate_fd() can drop ->file_lock (and reacquire ->file_lock),
+   the fdtable pointer (fdt) must be loaded after locate_fd().
+
diff -urN linux/Documentation/filesystems/fuse.txt 
linux/Documentation/filesystems/fuse.txt
--- linux/Documentation/filesystems/fuse.txt    1970/01/01 00:00:00
+++ linux/Documentation/filesystems/fuse.txt    2005-09-15 09:52:37.598641000 
+0100     1.1
@@ -0,0 +1,315 @@
+Definitions
+~~~~~~~~~~~
+
+Userspace filesystem:
+
+  A filesystem in which data and metadata are provided by an ordinary
+  userspace process.  The filesystem can be accessed normally through
+  the kernel interface.
+
+Filesystem daemon:
+
+  The process(es) providing the data and metadata of the filesystem.
+
+Non-privileged mount (or user mount):
+
+  A userspace filesystem mounted by a non-privileged (non-root) user.
+  The filesystem daemon is running with the privileges of the mounting
+  user.  NOTE: this is not the same as mounts allowed with the "user"
+  option in /etc/fstab, which is not discussed here.
+
+Mount owner:
+
+  The user who does the mounting.
+
+User:
+
+  The user who is performing filesystem operations.
+
+What is FUSE?
+~~~~~~~~~~~~~
+
+FUSE is a userspace filesystem framework.  It consists of a kernel
+module (fuse.ko), a userspace library (libfuse.*) and a mount utility
+(fusermount).
+
+One of the most important features of FUSE is allowing secure,
+non-privileged mounts.  This opens up new possibilities for the use of
+filesystems.  A good example is sshfs: a secure network filesystem
+using the sftp protocol.
+
+The userspace library and utilities are available from the FUSE
+homepage:
+
+  http://fuse.sourceforge.net/
+
+Mount options
+~~~~~~~~~~~~~
+
+'fd=N'
+
+  The file descriptor to use for communication between the userspace
+  filesystem and the kernel.  The file descriptor must have been
+  obtained by opening the FUSE device ('/dev/fuse').
+
+'rootmode=M'
+
+  The file mode of the filesystem's root in octal representation.
+
+'user_id=N'
+
+  The numeric user id of the mount owner.
+
+'group_id=N'
+
+  The numeric group id of the mount owner.
+
+'default_permissions'
+
+  By default FUSE doesn't check file access permissions, the
+  filesystem is free to implement it's access policy or leave it to
+  the underlying file access mechanism (e.g. in case of network
+  filesystems).  This option enables permission checking, restricting
+  access based on file mode.  This is option is usually useful
+  together with the 'allow_other' mount option.
+
+'allow_other'
+
+  This option overrides the security measure restricting file access
+  to the user mounting the filesystem.  This option is by default only
+  allowed to root, but this restriction can be removed with a
+  (userspace) configuration option.
+
+'max_read=N'
+
+  With this option the maximum size of read operations can be set.
+  The default is infinite.  Note that the size of read requests is
+  limited anyway to 32 pages (which is 128kbyte on i386).
+
+How do non-privileged mounts work?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Since the mount() system call is a privileged operation, a helper
+program (fusermount) is needed, which is installed setuid root.
+
+The implication of providing non-privileged mounts is that the mount
+owner must not be able to use this capability to compromise the
+system.  Obvious requirements arising from this are:
+
+ A) mount owner should not be able to get elevated privileges with the
+    help of the mounted filesystem
+
+ B) mount owner should not get illegitimate access to information from
+    other users' and the super user's processes
+
+ C) mount owner should not be able to induce undesired behavior in
+    other users' or the super user's processes
+
+How are requirements fulfilled?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ A) The mount owner could gain elevated privileges by either:
+
+     1) creating a filesystem containing a device file, then opening
+       this device
+
+     2) creating a filesystem containing a suid or sgid application,
+       then executing this application
+
+    The solution is not to allow opening device files and ignore
+    setuid and setgid bits when executing programs.  To ensure this
+    fusermount always adds "nosuid" and "nodev" to the mount options
+    for non-privileged mounts.
+
+ B) If another user is accessing files or directories in the
+    filesystem, the filesystem daemon serving requests can record the
+    exact sequence and timing of operations performed.  This
+    information is otherwise inaccessible to the mount owner, so this
+    counts as an information leak.
+
+    The solution to this problem will be presented in point 2) of C).
+
+ C) There are several ways in which the mount owner can induce
+    undesired behavior in other users' processes, such as:
+
+     1) mounting a filesystem over a file or directory which the mount
+        owner could otherwise not be able to modify (or could only
+        make limited modifications).
+
+        This is solved in fusermount, by checking the access
+        permissions on the mountpoint and only allowing the mount if
+        the mount owner can do unlimited modification (has write
+        access to the mountpoint, and mountpoint is not a "sticky"
+        directory)
+
+     2) Even if 1) is solved the mount owner can change the behavior
+        of other users' processes.
+
+         i) It can slow down or indefinitely delay the execution of a
+           filesystem operation creating a DoS against the user or the
+           whole system.  For example a suid application locking a
+           system file, and then accessing a file on the mount owner's
+           filesystem could be stopped, and thus causing the system
+           file to be locked forever.
+
+         ii) It can present files or directories of unlimited length, or
+           directory structures of unlimited depth, possibly causing a
+           system process to eat up diskspace, memory or other
+           resources, again causing DoS.
+
+       The solution to this as well as B) is not to allow processes
+       to access the filesystem, which could otherwise not be
+       monitored or manipulated by the mount owner.  Since if the
+       mount owner can ptrace a process, it can do all of the above
+       without using a FUSE mount, the same criteria as used in
+       ptrace can be used to check if a process is allowed to access
+       the filesystem or not.
+
+       Note that the ptrace check is not strictly necessary to
+       prevent B/2/i, it is enough to check if mount owner has enough
+       privilege to send signal to the process accessing the
+       filesystem, since SIGSTOP can be used to get a similar effect.
+
+I think these limitations are unacceptable?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If a sysadmin trusts the users enough, or can ensure through other
+measures, that system processes will never enter non-privileged
+mounts, it can relax the last limitation with a "user_allow_other"
+config option.  If this config option is set, the mounting user can
+add the "allow_other" mount option which disables the check for other
+users' processes.
+
+Kernel - userspace interface
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following diagram shows how a filesystem operation (in this
+example unlink) is performed in FUSE.
+
+NOTE: everything in this description is greatly simplified
+
+ |  "rm /mnt/fuse/file"               |  FUSE filesystem daemon
+ |                                    |
+ |                                    |  >sys_read()
+ |                                    |    >fuse_dev_read()
+ |                                    |      >request_wait()
+ |                                    |        [sleep on fc->waitq]
+ |                                    |
+ |  >sys_unlink()                     |
+ |    >fuse_unlink()                  |
+ |      [get request from             |
+ |       fc->unused_list]             |
+ |      >request_send()               |
+ |        [queue req on fc->pending]  |
+ |        [wake up fc->waitq]         |        [woken up]
+ |        >request_wait_answer()      |
+ |          [sleep on req->waitq]     |
+ |                                    |      <request_wait()
+ |                                    |      [remove req from fc->pending]
+ |                                    |      [copy req to read buffer]
+ |                                    |      [add req to fc->processing]
+ |                                    |    <fuse_dev_read()
+ |                                    |  <sys_read()
+ |                                    |
+ |                                    |  [perform unlink]
+ |                                    |
+ |                                    |  >sys_write()
+ |                                    |    >fuse_dev_write()
+ |                                    |      [look up req in fc->processing]
+ |                                    |      [remove from fc->processing]
+ |                                    |      [copy write buffer to req]
+ |          [woken up]                |      [wake up req->waitq]
+ |                                    |    <fuse_dev_write()
+ |                                    |  <sys_write()
+ |        <request_wait_answer()      |
+ |      <request_send()               |
+ |      [add request to               |
+ |       fc->unused_list]             |
+ |    <fuse_unlink()                  |
+ |  <sys_unlink()                     |
+
+There are a couple of ways in which to deadlock a FUSE filesystem.
+Since we are talking about unprivileged userspace programs,
+something must be done about these.
+
+Scenario 1 -  Simple deadlock
+-----------------------------
+
+ |  "rm /mnt/fuse/file"               |  FUSE filesystem daemon
+ |                                    |
+ |  >sys_unlink("/mnt/fuse/file")     |
+ |    [acquire inode semaphore        |
+ |     for "file"]                    |
+ |    >fuse_unlink()                  |
+ |      [sleep on req->waitq]         |
+ |                                    |  <sys_read()
+ |                                    |  >sys_unlink("/mnt/fuse/file")
+ |                                    |    [acquire inode semaphore
+ |                                    |     for "file"]
+ |                                    |    *DEADLOCK*
+
+The solution for this is to allow requests to be interrupted while
+they are in userspace:
+
+ |      [interrupted by signal]       |
+ |    <fuse_unlink()                  |
+ |    [release semaphore]             |    [semaphore acquired]
+ |  <sys_unlink()                     |
+ |                                    |    >fuse_unlink()
+ |                                    |      [queue req on fc->pending]
+ |                                    |      [wake up fc->waitq]
+ |                                    |      [sleep on req->waitq]
+
+If the filesystem daemon was single threaded, this will stop here,
+since there's no other thread to dequeue and execute the request.
+In this case the solution is to kill the FUSE daemon as well.  If
+there are multiple serving threads, you just have to kill them as
+long as any remain.
+
+Moral: a filesystem which deadlocks, can soon find itself dead.
+
+Scenario 2 - Tricky deadlock
+----------------------------
+
+This one needs a carefully crafted filesystem.  It's a variation on
+the above, only the call back to the filesystem is not explicit,
+but is caused by a pagefault.
+
+ |  Kamikaze filesystem thread 1      |  Kamikaze filesystem thread 2
+ |                                    |
+ |  [fd = open("/mnt/fuse/file")]     |  [request served normally]
+ |  [mmap fd to 'addr']               |
+ |  [close fd]                        |  [FLUSH triggers 'magic' flag]
+ |  [read a byte from addr]           |
+ |    >do_page_fault()                |
+ |      [find or create page]         |
+ |      [lock page]                   |
+ |      >fuse_readpage()              |
+ |         [queue READ request]       |
+ |         [sleep on req->waitq]      |
+ |                                    |  [read request to buffer]
+ |                                    |  [create reply header before addr]
+ |                                    |  >sys_write(addr - headerlength)
+ |                                    |    >fuse_dev_write()
+ |                                    |      [look up req in fc->processing]
+ |                                    |      [remove from fc->processing]
+ |                                    |      [copy write buffer to req]
+ |                                    |        >do_page_fault()
+ |                                    |           [find or create page]
+ |                                    |           [lock page]
+ |                                    |           * DEADLOCK *
+
+Solution is again to let the the request be interrupted (not
+elaborated further).
+
+An additional problem is that while the write buffer is being
+copied to the request, the request must not be interrupted.  This
+is because the destination address of the copy may not be valid
+after the request is interrupted.
+
+This is solved with doing the copy atomically, and allowing
+interruption while the page(s) belonging to the write buffer are
+faulted with get_user_pages().  The 'req->locked' flag indicates
+when the copy is taking place, and interruption is delayed until
+this flag is unset.
+
diff -urN linux/Documentation/filesystems/relayfs.txt 
linux/Documentation/filesystems/relayfs.txt
--- linux/Documentation/filesystems/relayfs.txt 1970/01/01 00:00:00
+++ linux/Documentation/filesystems/relayfs.txt 2005-09-15 09:52:37.616680000 
+0100     1.1
@@ -0,0 +1,362 @@
+
+relayfs - a high-speed data relay filesystem
+============================================
+
+relayfs is a filesystem designed to provide an efficient mechanism for
+tools and facilities to relay large and potentially sustained streams
+of data from kernel space to user space.
+
+The main abstraction of relayfs is the 'channel'.  A channel consists
+of a set of per-cpu kernel buffers each represented by a file in the
+relayfs filesystem.  Kernel clients write into a channel using
+efficient write functions which automatically log to the current cpu's
+channel buffer.  User space applications mmap() the per-cpu files and
+retrieve the data as it becomes available.
+
+The format of the data logged into the channel buffers is completely
+up to the relayfs client; relayfs does however provide hooks which
+allow clients to impose some stucture on the buffer data.  Nor does
+relayfs implement any form of data filtering - this also is left to
+the client.  The purpose is to keep relayfs as simple as possible.
+
+This document provides an overview of the relayfs API.  The details of
+the function parameters are documented along with the functions in the
+filesystem code - please see that for details.
+
+Semantics
+=========
+
+Each relayfs channel has one buffer per CPU, each buffer has one or
+more sub-buffers. Messages are written to the first sub-buffer until
+it is too full to contain a new message, in which case it it is
+written to the next (if available).  Messages are never split across
+sub-buffers.  At this point, userspace can be notified so it empties
+the first sub-buffer, while the kernel continues writing to the next.
+
+When notified that a sub-buffer is full, the kernel knows how many
+bytes of it are padding i.e. unused.  Userspace can use this knowledge
+to copy only valid data.
+
+After copying it, userspace can notify the kernel that a sub-buffer
+has been consumed.
+
+relayfs can operate in a mode where it will overwrite data not yet
+collected by userspace, and not wait for it to consume it.
+
+relayfs itself does not provide for communication of such data between
+userspace and kernel, allowing the kernel side to remain simple and not
+impose a single interface on userspace. It does provide a separate
+helper though, described below.
+
+klog, relay-app & librelay
+==========================
+
+relayfs itself is ready to use, but to make things easier, two
+additional systems are provided.  klog is a simple wrapper to make
+writing formatted text or raw data to a channel simpler, regardless of
+whether a channel to write into exists or not, or whether relayfs is
+compiled into the kernel or is configured as a module.  relay-app is
+the kernel counterpart of userspace librelay.c, combined these two
+files provide glue to easily stream data to disk, without having to
+bother with housekeeping.  klog and relay-app can be used together,
+with klog providing high-level logging functions to the kernel and
+relay-app taking care of kernel-user control and disk-logging chores.
+
+It is possible to use relayfs without relay-app & librelay, but you'll
+have to implement communication between userspace and kernel, allowing
+both to convey the state of buffers (full, empty, amount of padding).
+
+klog, relay-app and librelay can be found in the relay-apps tarball on
+http://relayfs.sourceforge.net
+
+The relayfs user space API
+==========================
+
+relayfs implements basic file operations for user space access to
+relayfs channel buffer data.  Here are the file operations that are
+available and some comments regarding their behavior:
+
+open()  enables user to open an _existing_ buffer.
+
+mmap()  results in channel buffer being mapped into the caller's
+        memory space. Note that you can't do a partial mmap - you must
+        map the entire file, which is NRBUF * SUBBUFSIZE.
+
+read()  read the contents of a channel buffer.  The bytes read are
+        'consumed' by the reader i.e. they won't be available again
+        to subsequent reads.  If the channel is being used in
+        no-overwrite mode (the default), it can be read at any time
+        even if there's an active kernel writer.  If the channel is
+        being used in overwrite mode and there are active channel
+        writers, results may be unpredictable - users should make
+        sure that all logging to the channel has ended before using
+        read() with overwrite mode.
+
+poll()  POLLIN/POLLRDNORM/POLLERR supported.  User applications are
+        notified when sub-buffer boundaries are crossed.
+
+close() decrements the channel buffer's refcount.  When the refcount
+       reaches 0 i.e. when no process or kernel client has the buffer
+       open, the channel buffer is freed.
+
+
+In order for a user application to make use of relayfs files, the
+relayfs filesystem must be mounted.  For example,
+
+       mount -t relayfs relayfs /mnt/relay
+
+NOTE:  relayfs doesn't need to be mounted for kernel clients to create
+       or use channels - it only needs to be mounted when user space
+       applications need access to the buffer data.
+
+
+The relayfs kernel API
+======================
+
+Here's a summary of the API relayfs provides to in-kernel clients:
+
+
+  channel management functions:
+
+    relay_open(base_filename, parent, subbuf_size, n_subbufs,
+               callbacks)
+    relay_close(chan)
+    relay_flush(chan)
+    relay_reset(chan)
+    relayfs_create_dir(name, parent)
+    relayfs_remove_dir(dentry)
+
+  channel management typically called on instigation of userspace:
+
+    relay_subbufs_consumed(chan, cpu, subbufs_consumed)
+
+  write functions:
+
+    relay_write(chan, data, length)
+    __relay_write(chan, data, length)
+    relay_reserve(chan, length)
+
+  callbacks:
+
+    subbuf_start(buf, subbuf, prev_subbuf, prev_padding)
+    buf_mapped(buf, filp)
+    buf_unmapped(buf, filp)
+
+  helper functions:
+
+    relay_buf_full(buf)
+    subbuf_start_reserve(buf, length)
+
+
+Creating a channel
+------------------
+
+relay_open() is used to create a channel, along with its per-cpu
+channel buffers.  Each channel buffer will have an associated file
+created for it in the relayfs filesystem, which can be opened and
+mmapped from user space if desired.  The files are named
+basename0...basenameN-1 where N is the number of online cpus, and by
+default will be created in the root of the filesystem.  If you want a
+directory structure to contain your relayfs files, you can create it
+with relayfs_create_dir() and pass the parent directory to
+relay_open().  Clients are responsible for cleaning up any directory
+structure they create when the channel is closed - use
+relayfs_remove_dir() for that.
+
+The total size of each per-cpu buffer is calculated by multiplying the
+number of sub-buffers by the sub-buffer size passed into relay_open().
+The idea behind sub-buffers is that they're basically an extension of
+double-buffering to N buffers, and they also allow applications to
+easily implement random-access-on-buffer-boundary schemes, which can
+be important for some high-volume applications.  The number and size
+of sub-buffers is completely dependent on the application and even for
+the same application, different conditions will warrant different
+values for these parameters at different times.  Typically, the right
+values to use are best decided after some experimentation; in general,
+though, it's safe to assume that having only 1 sub-buffer is a bad
+idea - you're guaranteed to either overwrite data or lose events
+depending on the channel mode being used.
+
+Channel 'modes'
+---------------
+
+relayfs channels can be used in either of two modes - 'overwrite' or
+'no-overwrite'.  The mode is entirely determined by the implementation
+of the subbuf_start() callback, as described below.  In 'overwrite'
+mode, also known as 'flight recorder' mode, writes continuously cycle
+around the buffer and will never fail, but will unconditionally
+overwrite old data regardless of whether it's actually been consumed.
+In no-overwrite mode, writes will fail i.e. data will be lost, if the
+number of unconsumed sub-buffers equals the total number of
+sub-buffers in the channel.  It should be clear that if there is no
+consumer or if the consumer can't consume sub-buffers fast enought,
+data will be lost in either case; the only difference is whether data
+is lost from the beginning or the end of a buffer.
+
+As explained above, a relayfs channel is made of up one or more
+per-cpu channel buffers, each implemented as a circular buffer
+subdivided into one or more sub-buffers.  Messages are written into
+the current sub-buffer of the channel's current per-cpu buffer via the
+write functions described below.  Whenever a message can't fit into
+the current sub-buffer, because there's no room left for it, the
+client is notified via the subbuf_start() callback that a switch to a
+new sub-buffer is about to occur.  The client uses this callback to 1)
+initialize the next sub-buffer if appropriate 2) finalize the previous
+sub-buffer if appropriate and 3) return a boolean value indicating
+whether or not to actually go ahead with the sub-buffer switch.
+
+To implement 'no-overwrite' mode, the userspace client would provide
+an implementation of the subbuf_start() callback something like the
+following:
+
+static int subbuf_start(struct rchan_buf *buf,
+                        void *subbuf,
+                       void *prev_subbuf,
+                       unsigned int prev_padding)
+{
+       if (prev_subbuf)
+               *((unsigned *)prev_subbuf) = prev_padding;
+
+       if (relay_buf_full(buf))
+               return 0;
+
+       subbuf_start_reserve(buf, sizeof(unsigned int));
+
+       return 1;
+}
+
+If the current buffer is full i.e. all sub-buffers remain unconsumed,
+the callback returns 0 to indicate that the buffer switch should not
+occur yet i.e. until the consumer has had a chance to read the current
+set of ready sub-buffers.  For the relay_buf_full() function to make
+sense, the consumer is reponsible for notifying relayfs when
+sub-buffers have been consumed via relay_subbufs_consumed().  Any
+subsequent attempts to write into the buffer will again invoke the
+subbuf_start() callback with the same parameters; only when the
+consumer has consumed one or more of the ready sub-buffers will
+relay_buf_full() return 0, in which case the buffer switch can
+continue.
+
+The implementation of the subbuf_start() callback for 'overwrite' mode
+would be very similar:
+
+static int subbuf_start(struct rchan_buf *buf,
+                        void *subbuf,
+                       void *prev_subbuf,
+                       unsigned int prev_padding)
+{
+       if (prev_subbuf)
+               *((unsigned *)prev_subbuf) = prev_padding;
+
+       subbuf_start_reserve(buf, sizeof(unsigned int));
+
+       return 1;
+}
+
+In this case, the relay_buf_full() check is meaningless and the
+callback always returns 1, causing the buffer switch to occur
+unconditionally.  It's also meaningless for the client to use the
+relay_subbufs_consumed() function in this mode, as it's never
+consulted.
+
+The default subbuf_start() implementation, used if the client doesn't
+define any callbacks, or doesn't define the subbuf_start() callback,
+implements the simplest possible 'no-overwrite' mode i.e. it does
+nothing but return 0.
+
+Header information can be reserved at the beginning of each sub-buffer
+by calling the subbuf_start_reserve() helper function from within the
+subbuf_start() callback.  This reserved area can be used to store
+whatever information the client wants.  In the example above, room is
+reserved in each sub-buffer to store the padding count for that
+sub-buffer.  This is filled in for the previous sub-buffer in the
+subbuf_start() implementation; the padding value for the previous
+sub-buffer is passed into the subbuf_start() callback along with a
+pointer to the previous sub-buffer, since the padding value isn't
+known until a sub-buffer is filled.  The subbuf_start() callback is
+also called for the first sub-buffer when the channel is opened, to
+give the client a chance to reserve space in it.  In this case the
+previous sub-buffer pointer passed into the callback will be NULL, so
+the client should check the value of the prev_subbuf pointer before
+writing into the previous sub-buffer.
+
+Writing to a channel
+--------------------
+
+kernel clients write data into the current cpu's channel buffer using
+relay_write() or __relay_write().  relay_write() is the main logging
+function - it uses local_irqsave() to protect the buffer and should be
+used if you might be logging from interrupt context.  If you know
+you'll never be logging from interrupt context, you can use
+__relay_write(), which only disables preemption.  These functions
+don't return a value, so you can't determine whether or not they
+failed - the assumption is that you wouldn't want to check a return
+value in the fast logging path anyway, and that they'll always succeed
+unless the buffer is full and no-overwrite mode is being used, in
+which case you can detect a failed write in the subbuf_start()
+callback by calling the relay_buf_full() helper function.
+
+relay_reserve() is used to reserve a slot in a channel buffer which
+can be written to later.  This would typically be used in applications
+that need to write directly into a channel buffer without having to
+stage data in a temporary buffer beforehand.  Because the actual write
+may not happen immediately after the slot is reserved, applications
+using relay_reserve() can keep a count of the number of bytes actually
+written, either in space reserved in the sub-buffers themselves or as
+a separate array.  See the 'reserve' example in the relay-apps tarball
+at http://relayfs.sourceforge.net for an example of how this can be
+done.  Because the write is under control of the client and is
+separated from the reserve, relay_reserve() doesn't protect the buffer
+at all - it's up to the client to provide the appropriate
+synchronization when using relay_reserve().
+
+Closing a channel
+-----------------
+
+The client calls relay_close() when it's finished using the channel.
+The channel and its associated buffers are destroyed when there are no
+longer any references to any of the channel buffers.  relay_flush()
+forces a sub-buffer switch on all the channel buffers, and can be used
+to finalize and process the last sub-buffers before the channel is
+closed.
+
+Misc
+----
+
+Some applications may want to keep a channel around and re-use it
+rather than open and close a new channel for each use.  relay_reset()
+can be used for this purpose - it resets a channel to its initial
+state without reallocating channel buffer memory or destroying
+existing mappings.  It should however only be called when it's safe to
+do so i.e. when the channel isn't currently being written to.
+
+Finally, there are a couple of utility callbacks that can be used for
+different purposes.  buf_mapped() is called whenever a channel buffer
+is mmapped from user space and buf_unmapped() is called when it's
+unmapped.  The client can use this notification to trigger actions
+within the kernel application, such as enabling/disabling logging to
+the channel.
+
+
+Resources
+=========
+
+For news, example code, mailing list, etc. see the relayfs homepage:
+
+    http://relayfs.sourceforge.net
+
+
+Credits
+=======
+
+The ideas and specs for relayfs came about as a result of discussions
+on tracing involving the following:
+
+Michel Dagenais                <michel.dagenais@polymtl.ca>
+Richard Moore          <richardj_moore@uk.ibm.com>
+Bob Wisniewski         <bob@watson.ibm.com>
+Karim Yaghmour         <karim@opersys.com>
+Tom Zanussi            <zanussi@us.ibm.com>
+
+Also thanks to Hubertus Franke for a lot of useful suggestions and bug
+reports.
diff -urN linux/Documentation/filesystems/v9fs.txt 
linux/Documentation/filesystems/v9fs.txt
--- linux/Documentation/filesystems/v9fs.txt    1970/01/01 00:00:00
+++ linux/Documentation/filesystems/v9fs.txt    2005-09-15 09:52:37.637850000 
+0100     1.1
@@ -0,0 +1,95 @@
+                       V9FS: 9P2000 for Linux
+                       ======================
+
+ABOUT
+=====
+
+v9fs is a Unix implementation of the Plan 9 9p remote filesystem protocol.
+
+This software was originally developed by Ron Minnich <rminnich@lanl.gov>
+and Maya Gokhale <maya@lanl.gov>.  Additional development by Greg Watson
+<gwatson@lanl.gov> and most recently Eric Van Hensbergen
+<ericvh@gmail.com> and Latchesar Ionkov <lucho@ionkov.net>.
+
+USAGE
+=====
+
+For remote file server:
+
+       mount -t 9P 10.10.1.2 /mnt/9
+
+For Plan 9 From User Space applications (http://swtch.com/plan9)
+
+       mount -t 9P `namespace`/acme /mnt/9 -o proto=unix,name=$USER
+
+OPTIONS
+=======
+
+  proto=name   select an alternative transport.  Valid options are
+               currently:
+                       unix - specifying a named pipe mount point
+                       tcp  - specifying a normal TCP/IP connection
+                       fd   - used passed file descriptors for connection
+                                (see rfdno and wfdno)
+
+  name=name    user name to attempt mount as on the remote server.  The
+               server may override or ignore this value.  Certain user
+               names may require authentication.
+
+  aname=name   aname specifies the file tree to access when the server is
+               offering several exported file systems.
+
+  debug=n      specifies debug level.  The debug level is a bitmask.
+                       0x01 = display verbose error messages
+                       0x02 = developer debug (DEBUG_CURRENT)
+                       0x04 = display 9P trace
+                       0x08 = display VFS trace
+                       0x10 = display Marshalling debug
+                       0x20 = display RPC debug
+                       0x40 = display transport debug
+                       0x80 = display allocation debug
+
+  rfdno=n      the file descriptor for reading with proto=fd
+
+  wfdno=n      the file descriptor for writing with proto=fd
+
+  maxdata=n    the number of bytes to use for 9P packet payload (msize)
+
+  port=n       port to connect to on the remote server
+
+  timeout=n    request timeouts (in ms) (default 60000ms)
+
+  noextend     force legacy mode (no 9P2000.u semantics)
+
+  uid          attempt to mount as a particular uid
+
+  gid          attempt to mount with a particular gid
+
+  afid         security channel - used by Plan 9 authentication protocols
+
+  nodevmap     do not map special files - represent them as normal files.
+               This can be used to share devices/named pipes/sockets between
+               hosts.  This functionality will be expanded in later versions.
+
+RESOURCES
+=========
+
+The Linux version of the 9P server, along with some client-side utilities
+can be found at http://v9fs.sf.net (along with a CVS repository of the
+development branch of this module).  There are user and developer mailing
+lists here, as well as a bug-tracker.
+
+For more information on the Plan 9 Operating System check out
+http://plan9.bell-labs.com/plan9
+
+For information on Plan 9 from User Space (Plan 9 applications and libraries
+ported to Linux/BSD/OSX/etc) check out http://swtch.com/plan9
+
+
+STATUS
+======
+
+The 2.6 kernel support is working on PPC and x86.
+
+PLEASE USE THE SOURCEFORGE BUG-TRACKER TO REPORT PROBLEMS.
+
diff -urN linux/Documentation/filesystems/ntfs.txt 
linux/Documentation/filesystems/ntfs.txt
--- linux/Documentation/filesystems/ntfs.txt    2005/08/01 18:23:36     1.35
+++ linux/Documentation/filesystems/ntfs.txt    2005/09/15 08:52:37     1.36
@@ -439,6 +439,18 @@
 
 Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
 
+2.1.24:
+       - Support journals ($LogFile) which have been modified by chkdsk.  This
+         means users can boot into Windows after we marked the volume dirty.
+         The Windows boot will run chkdsk and then reboot.  The user can then
+         immediately boot into Linux rather than having to do a full Windows
+         boot first before rebooting into Linux and we will recognize such a
+         journal and empty it as it is clean by definition.
+       - Support journals ($LogFile) with only one restart page as well as
+         journals with two different restart pages.  We sanity check both and
+         either use the only sane one or the more recent one of the two in the
+         case that both are valid.
+       - Lots of bug fixes and enhancements across the board.
 2.1.23:
        - Stamp the user space journal, aka transaction log, aka $UsnJrnl, if
          it is present and active thus telling Windows and applications using
diff -urN linux/Documentation/filesystems/proc.txt 
linux/Documentation/filesystems/proc.txt
--- linux/Documentation/filesystems/proc.txt    2005/05/19 12:08:05     1.34
+++ linux/Documentation/filesystems/proc.txt    2005/09/15 08:52:37     1.35
@@ -133,6 +133,7 @@
  statm   Process memory status information              
  status  Process status in human readable form          
  wchan   If CONFIG_KALLSYMS is set, a pre-decoded wchan
+ smaps  Extension based on maps, presenting the rss size for each mapped file
 ..............................................................................
 
 For example, to get the status information of a process, all you have to do is
@@ -1240,16 +1241,38 @@
 overcommit_memory
 -----------------
 
-This file  contains  one  value.  The following algorithm is used to decide if
-there's enough  memory:  if  the  value of overcommit_memory is positive, then
-there's always  enough  memory. This is a useful feature, since programs often
-malloc() huge  amounts  of  memory 'just in case', while they only use a small
-part of  it.  Leaving  this value at 0 will lead to the failure of such a huge
-malloc(), when in fact the system has enough memory for the program to run.
-
-On the  other  hand,  enabling this feature can cause you to run out of memory
-and thrash the system to death, so large and/or important servers will want to
-set this value to 0.
+Controls overcommit of system memory, possibly allowing processes
+to allocate (but not use) more memory than is actually available.
+
+
+0      -       Heuristic overcommit handling. Obvious overcommits of
+               address space are refused. Used for a typical system. It
+               ensures a seriously wild allocation fails while allowing
+               overcommit to reduce swap usage.  root is allowed to
+               allocate slighly more memory in this mode. This is the
+               default.
+
+1      -       Always overcommit. Appropriate for some scientific
+               applications.
+
+2      -       Don't overcommit. The total address space commit
+               for the system is not permitted to exceed swap plus a
+               configurable percentage (default is 50) of physical RAM.
+               Depending on the percentage you use, in most situations
+               this means a process will not be killed while attempting
+               to use already-allocated memory but will receive errors
+               on memory allocation as appropriate.
+
+overcommit_ratio
+----------------
+
+Percentage of physical memory size to include in overcommit calculations
+(see above.)
+
+Memory allocation limit = swapspace + physmem * (overcommit_ratio / 100)
+
+       swapspace = total size of all swap areas
+       physmem = size of physical memory in system
 
 nr_hugepages and hugetlb_shm_group
 ----------------------------------
diff -urN linux/Documentation/filesystems/sysfs.txt 
linux/Documentation/filesystems/sysfs.txt
--- linux/Documentation/filesystems/sysfs.txt   2005/07/11 20:45:53     1.7
+++ linux/Documentation/filesystems/sysfs.txt   2005/09/15 08:52:37     1.8
@@ -90,7 +90,7 @@
 
 It also defines this helper for defining device attributes: 
 
-#define DEVICE_ATTR(_name,_mode,_show,_store)      \
+#define DEVICE_ATTR(_name, _mode, _show, _store)      \
 struct device_attribute dev_attr_##_name = {            \
         .attr = {.name  = __stringify(_name) , .mode   = _mode },      \
         .show   = _show,                                \
@@ -99,14 +99,14 @@
 
 For example, declaring
 
-static DEVICE_ATTR(foo,0644,show_foo,store_foo);
+static DEVICE_ATTR(foo, S_IWUSR | S_IRUGO, show_foo, store_foo);
 
 is equivalent to doing:
 
 static struct device_attribute dev_attr_foo = {
        .attr   = {
                .name = "foo",
-               .mode = 0644,
+               .mode = S_IWUSR | S_IRUGO,
        },
        .show = show_foo,
        .store = store_foo,
@@ -121,8 +121,8 @@
 show and store methods of the attribute owners. 
 
 struct sysfs_ops {
-        ssize_t (*show)(struct kobject *, struct attribute *,char *);
-        ssize_t (*store)(struct kobject *,struct attribute *,const char *);
+        ssize_t (*show)(struct kobject *, struct attribute *, char *);
+        ssize_t (*store)(struct kobject *, struct attribute *, const char *);
 };
 
 [ Subsystems should have already defined a struct kobj_type as a
@@ -137,7 +137,7 @@
 
 To illustrate:
 
-#define to_dev_attr(_attr) container_of(_attr,struct device_attribute,attr)
+#define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
 #define to_dev(d) container_of(d, struct device, kobj)
 
 static ssize_t
@@ -148,7 +148,7 @@
         ssize_t ret = 0;
 
         if (dev_attr->show)
-                ret = dev_attr->show(dev,buf);
+                ret = dev_attr->show(dev, buf);
         return ret;
 }
 
@@ -216,16 +216,16 @@
 
 static ssize_t show_name(struct device *dev, struct device_attribute *attr, 
char *buf)
 {
-        return sprintf(buf,"%s\n",dev->name);
+       return snprintf(buf, PAGE_SIZE, "%s\n", dev->name);
 }
 
 static ssize_t store_name(struct device * dev, const char * buf)
 {
-       sscanf(buf,"%20s",dev->name);
-       return strlen(buf);
+       sscanf(buf, "%20s", dev->name);
+       return strnlen(buf, PAGE_SIZE);
 }
 
-static DEVICE_ATTR(name,S_IRUGO,show_name,store_name);
+static DEVICE_ATTR(name, S_IRUGO, show_name, store_name);
 
 
 (Note that the real implementation doesn't allow userspace to set the 
@@ -290,7 +290,7 @@
 
 Declaring:
 
-DEVICE_ATTR(_name,_str,_mode,_show,_store);
+DEVICE_ATTR(_name, _str, _mode, _show, _store);
 
 Creation/Removal:
 
@@ -310,7 +310,7 @@
 
 Declaring:
 
-BUS_ATTR(_name,_mode,_show,_store)
+BUS_ATTR(_name, _mode, _show, _store)
 
 Creation/Removal:
 
@@ -331,7 +331,7 @@
 
 Declaring:
 
-DRIVER_ATTR(_name,_mode,_show,_store)
+DRIVER_ATTR(_name, _mode, _show, _store)
 
 Creation/Removal:
 
diff -urN linux/Documentation/filesystems/vfs.txt 
linux/Documentation/filesystems/vfs.txt
--- linux/Documentation/filesystems/vfs.txt     2004/10/25 20:44:09     1.17
+++ linux/Documentation/filesystems/vfs.txt     2005/09/15 08:52:37     1.18
@@ -1,35 +1,27 @@
-/* -*- auto-fill -*-                                                         */
 
-               Overview of the Virtual File System
+             Overview of the Linux Virtual File System
 
-               Richard Gooch <rgooch@atnf.csiro.au>
+       Original author: Richard Gooch <rgooch@atnf.csiro.au>
 
-                             5-JUL-1999
+                 Last updated on August 25, 2005
 
+  Copyright (C) 1999 Richard Gooch
+  Copyright (C) 2005 Pekka Enberg
 
-Conventions used in this document                                     <section>
-=================================
+  This file is released under the GPLv2.
 
-Each section in this document will have the string "<section>" at the
-right-hand side of the section title. Each subsection will have
-"<subsection>" at the right-hand side. These strings are meant to make
-it easier to search through the document.
 
-NOTE that the master copy of this document is available online at:
-http://www.atnf.csiro.au/~rgooch/linux/docs/vfs.txt
-
-
-What is it?                                                           <section>
+What is it?
 ===========
 
 The Virtual File System (otherwise known as the Virtual Filesystem
 Switch) is the software layer in the kernel that provides the
 filesystem interface to userspace programs. It also provides an
 abstraction within the kernel which allows different filesystem
-implementations to co-exist.
+implementations to coexist.
 
 
-A Quick Look At How It Works                                          <section>
+A Quick Look At How It Works
 ============================
 
 In this section I'll briefly describe how things work, before
@@ -38,7 +30,8 @@
 other view which is how a filesystem is supported and subsequently
 mounted.
 
-Opening a File                                                     <subsection>
+
+Opening a File
 --------------
 
 The VFS implements the open(2), stat(2), chmod(2) and similar system
@@ -77,7 +70,7 @@
 
 Opening a file requires another operation: allocation of a file
 structure (this is the kernel-side implementation of file
-descriptors). The freshly allocated file structure is initialised with
+descriptors). The freshly allocated file structure is initialized with
 a pointer to the dentry and a set of file operation member functions.
 These are taken from the inode data. The open() file method is then
 called so the specific filesystem implementation can do it's work. You
@@ -102,7 +95,8 @@
 processors. You should ensure that access to shared resources is
 protected by appropriate locks.
 
-Registering and Mounting a Filesystem                              <subsection>
+
+Registering and Mounting a Filesystem
 -------------------------------------
 
 If you want to support a new kind of filesystem in the kernel, all you
@@ -123,17 +117,21 @@
 It's now time to look at things in more detail.
 
 
-struct file_system_type                                               <section>
+struct file_system_type
 =======================
 
-This describes the filesystem. As of kernel 2.1.99, the following
+This describes the filesystem. As of kernel 2.6.13, the following
 members are defined:
 
 struct file_system_type {
        const char *name;
        int fs_flags;
-       struct super_block *(*read_super) (struct super_block *, void *, int);
-       struct file_system_type * next;
+        struct super_block *(*get_sb) (struct file_system_type *, int,
+                                       const char *, void *);
+        void (*kill_sb) (struct super_block *);
+        struct module *owner;
+        struct file_system_type * next;
+        struct list_head fs_supers;
 };
 
   name: the name of the filesystem type, such as "ext2", "iso9660",
@@ -141,51 +139,97 @@
 
   fs_flags: various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.)
 
-  read_super: the method to call when a new instance of this
+  get_sb: the method to call when a new instance of this
        filesystem should be mounted
 
-  next: for internal VFS use: you should initialise this to NULL
+  kill_sb: the method to call when an instance of this filesystem
+       should be unmounted
+
+  owner: for internal VFS use: you should initialize this to THIS_MODULE in
+       most cases.
 
-The read_super() method has the following arguments:
+  next: for internal VFS use: you should initialize this to NULL
+
+The get_sb() method has the following arguments:
 
   struct super_block *sb: the superblock structure. This is partially
-       initialised by the VFS and the rest must be initialised by the
-       read_super() method
+       initialized by the VFS and the rest must be initialized by the
+       get_sb() method
+
+  int flags: mount flags
+
+  const char *dev_name: the device name we are mounting.
 
   void *data: arbitrary mount options, usually comes as an ASCII
        string
 
   int silent: whether or not to be silent on error
 
-The read_super() method must determine if the block device specified
+The get_sb() method must determine if the block device specified
 in the superblock contains a filesystem of the type the method
 supports. On success the method returns the superblock pointer, on
 failure it returns NULL.
 
 The most interesting member of the superblock structure that the
-read_super() method fills in is the "s_op" field. This is a pointer to
+get_sb() method fills in is the "s_op" field. This is a pointer to
 a "struct super_operations" which describes the next level of the
 filesystem implementation.
 
+Usually, a filesystem uses generic one of the generic get_sb()
+implementations and provides a fill_super() method instead. The
+generic methods are:
+
+  get_sb_bdev: mount a filesystem residing on a block device
 
-struct super_operations                                               <section>
+  get_sb_nodev: mount a filesystem that is not backed by a device
+
+  get_sb_single: mount a filesystem which shares the instance between
+       all mounts
+
+A fill_super() method implementation has the following arguments:
+
+  struct super_block *sb: the superblock structure. The method fill_super()
+       must initialize this properly.
+
+  void *data: arbitrary mount options, usually comes as an ASCII
+       string
+
+  int silent: whether or not to be silent on error
+
+
+struct super_operations
 =======================
 
 This describes how the VFS can manipulate the superblock of your
-filesystem. As of kernel 2.1.99, the following members are defined:
+filesystem. As of kernel 2.6.13, the following members are defined:
 
 struct super_operations {
-       void (*read_inode) (struct inode *);
-       int (*write_inode) (struct inode *, int);
-       void (*put_inode) (struct inode *);
-       void (*drop_inode) (struct inode *);
-       void (*delete_inode) (struct inode *);
-       int (*notify_change) (struct dentry *, struct iattr *);
-       void (*put_super) (struct super_block *);
-       void (*write_super) (struct super_block *);
-       int (*statfs) (struct super_block *, struct statfs *, int);
-       int (*remount_fs) (struct super_block *, int *, char *);
-       void (*clear_inode) (struct inode *);
+        struct inode *(*alloc_inode)(struct super_block *sb);
+        void (*destroy_inode)(struct inode *);
+
+        void (*read_inode) (struct inode *);
+
+        void (*dirty_inode) (struct inode *);
+        int (*write_inode) (struct inode *, int);
+        void (*put_inode) (struct inode *);
+        void (*drop_inode) (struct inode *);
+        void (*delete_inode) (struct inode *);
+        void (*put_super) (struct super_block *);
+        void (*write_super) (struct super_block *);
+        int (*sync_fs)(struct super_block *sb, int wait);
+        void (*write_super_lockfs) (struct super_block *);
+        void (*unlockfs) (struct super_block *);
+        int (*statfs) (struct super_block *, struct kstatfs *);
+        int (*remount_fs) (struct super_block *, int *, char *);
+        void (*clear_inode) (struct inode *);
+        void (*umount_begin) (struct super_block *);
+
+        void (*sync_inodes) (struct super_block *sb,
+                                struct writeback_control *wbc);
+        int (*show_options)(struct seq_file *, struct vfsmount *);
+
+        ssize_t (*quota_read)(struct super_block *, int, char *, size_t, 
loff_t);
+        ssize_t (*quota_write)(struct super_block *, int, const char *, 
size_t, loff_t);
 };
 
 All methods are called without any locks being held, unless otherwise
@@ -193,43 +237,62 @@
 only called from a process context (i.e. not from an interrupt handler
 or bottom half).
 
+  alloc_inode: this method is called by inode_alloc() to allocate memory
+       for struct inode and initialize it.
+
+  destroy_inode: this method is called by destroy_inode() to release
+       resources allocated for struct inode.
+
   read_inode: this method is called to read a specific inode from the
-       mounted filesystem. The "i_ino" member in the "struct inode"
-       will be initialised by the VFS to indicate which inode to
-       read. Other members are filled in by this method
+        mounted filesystem.  The i_ino member in the struct inode is
+       initialized by the VFS to indicate which inode to read. Other
+       members are filled in by this method.
+
+       You can set this to NULL and use iget5_locked() instead of iget()
+       to read inodes.  This is necessary for filesystems for which the
+       inode number is not sufficient to identify an inode.
+
+  dirty_inode: this method is called by the VFS to mark an inode dirty.
 
   write_inode: this method is called when the VFS needs to write an
        inode to disc.  The second parameter indicates whether the write
        should be synchronous or not, not all filesystems check this flag.
 
   put_inode: called when the VFS inode is removed from the inode
-       cache. This method is optional
+       cache.
 
   drop_inode: called when the last access to the inode is dropped,
        with the inode_lock spinlock held.
 
-       This method should be either NULL (normal unix filesystem
+       This method should be either NULL (normal UNIX filesystem
        semantics) or "generic_delete_inode" (for filesystems that do not
        want to cache inodes - causing "delete_inode" to always be
        called regardless of the value of i_nlink)
 
-       The "generic_delete_inode()" behaviour is equivalent to the
+       The "generic_delete_inode()" behavior is equivalent to the
        old practice of using "force_delete" in the put_inode() case,
        but does not have the races that the "force_delete()" approach
        had. 
 
   delete_inode: called when the VFS wants to delete an inode
 
-  notify_change: called when VFS inode attributes are changed. If this
-       is NULL the VFS falls back to the write_inode() method. This
-       is called with the kernel lock held
-
   put_super: called when the VFS wishes to free the superblock
        (i.e. unmount). This is called with the superblock lock held
 
   write_super: called when the VFS superblock needs to be written to
        disc. This method is optional
 
+  sync_fs: called when VFS is writing out all dirty data associated with
+       a superblock. The second parameter indicates whether the method
+       should wait until the write out has been completed. Optional.
+
+  write_super_lockfs: called when VFS is locking a filesystem and forcing
+       it into a consistent state.  This function is currently used by the
+       Logical Volume Manager (LVM).
+
+  unlockfs: called when VFS is unlocking a filesystem and making it writable
+       again.
+
   statfs: called when the VFS needs to get filesystem statistics. This
        is called with the kernel lock held
 
@@ -238,21 +301,31 @@
 
   clear_inode: called then the VFS clears the inode. Optional
 
+  umount_begin: called when the VFS is unmounting a filesystem.
+
+  sync_inodes: called when the VFS is writing out dirty data associated with
+       a superblock.
+
+  show_options: called by the VFS to show mount options for /proc/<pid>/mounts.
+
+  quota_read: called by the VFS to read from filesystem quota file.
+
+  quota_write: called by the VFS to write to filesystem quota file.
+
 The read_inode() method is responsible for filling in the "i_op"
 field. This is a pointer to a "struct inode_operations" which
 describes the methods that can be performed on individual inodes.
 
 
-struct inode_operations                                               <section>
+struct inode_operations
 =======================
 
 This describes how the VFS can manipulate an inode in your
-filesystem. As of kernel 2.1.99, the following members are defined:
+filesystem. As of kernel 2.6.13, the following members are defined:
 
 struct inode_operations {
-       struct file_operations * default_file_ops;
-       int (*create) (struct inode *,struct dentry *,int);
-       int (*lookup) (struct inode *,struct dentry *);
+       int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
+       struct dentry * (*lookup) (struct inode *,struct dentry *, struct 
nameidata *);
        int (*link) (struct dentry *,struct inode *,struct dentry *);
        int (*unlink) (struct inode *,struct dentry *);
        int (*symlink) (struct inode *,struct dentry *,const char *);
@@ -261,25 +334,22 @@
        int (*mknod) (struct inode *,struct dentry *,int,dev_t);
        int (*rename) (struct inode *, struct dentry *,
                        struct inode *, struct dentry *);
-       int (*readlink) (struct dentry *, char *,int);
-       struct dentry * (*follow_link) (struct dentry *, struct dentry *);
-       int (*readpage) (struct file *, struct page *);
-       int (*writepage) (struct page *page, struct writeback_control *wbc);
-       int (*bmap) (struct inode *,int);
+       int (*readlink) (struct dentry *, char __user *,int);
+        void * (*follow_link) (struct dentry *, struct nameidata *);
+        void (*put_link) (struct dentry *, struct nameidata *, void *);
        void (*truncate) (struct inode *);
-       int (*permission) (struct inode *, int);
-       int (*smap) (struct inode *,int);
-       int (*updatepage) (struct file *, struct page *, const char *,
-                               unsigned long, unsigned int, int);
-       int (*revalidate) (struct dentry *);
+       int (*permission) (struct inode *, int, struct nameidata *);
+       int (*setattr) (struct dentry *, struct iattr *);
+       int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
+       int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
+       ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
+       ssize_t (*listxattr) (struct dentry *, char *, size_t);
+       int (*removexattr) (struct dentry *, const char *);
 };
 
 Again, all methods are called without any locks being held, unless
 otherwise noted.
 
-  default_file_ops: this is a pointer to a "struct file_operations"
-       which describes how to open and then manipulate open files
-
   create: called by the open(2) and creat(2) system calls. Only
        required if you want to support regular files. The dentry you
        get should not have an inode (i.e. it should be a negative
@@ -328,31 +398,143 @@
        you want to support reading symbolic links
 
   follow_link: called by the VFS to follow a symbolic link to the
-       inode it points to. Only required if you want to support
-       symbolic links
+       inode it points to.  Only required if you want to support
+       symbolic links.  This function returns a void pointer cookie
+       that is passed to put_link().
+
+  put_link: called by the VFS to release resources allocated by
+       follow_link().  The cookie returned by follow_link() is passed to
+       to this function as the last parameter.  It is used by filesystems
+       such as NFS where page cache is not stable (i.e. page that was
+       installed when the symbolic link walk started might not be in the
+       page cache at the end of the walk).
+
+  truncate: called by the VFS to change the size of a file.  The i_size
+       field of the inode is set to the desired size by the VFS before
+       this function is called.  This function is called by the truncate(2)
+       system call and related functionality.
+
+  permission: called by the VFS to check for access rights on a POSIX-like
+       filesystem.
+
+  setattr: called by the VFS to set attributes for a file.  This function is
+       called by chmod(2) and related system calls.
+
+  getattr: called by the VFS to get attributes of a file.  This function is
+       called by stat(2) and related system calls.
+
+  setxattr: called by the VFS to set an extended attribute for a file.
+       Extended attribute is a name:value pair associated with an inode. This
+       function is called by setxattr(2) system call.
+
+  getxattr: called by the VFS to retrieve the value of an extended attribute
+       name.  This function is called by getxattr(2) function call.
+
+  listxattr: called by the VFS to list all extended attributes for a given
+       file.  This function is called by listxattr(2) system call.
+
+  removexattr: called by the VFS to remove an extended attribute from a file.
+       This function is called by removexattr(2) system call.
+
+
+struct address_space_operations
+===============================
+
+This describes how the VFS can manipulate mapping of a file to page cache in
+your filesystem. As of kernel 2.6.13, the following members are defined:
+
+struct address_space_operations {
+       int (*writepage)(struct page *page, struct writeback_control *wbc);
+       int (*readpage)(struct file *, struct page *);
+       int (*sync_page)(struct page *);
+       int (*writepages)(struct address_space *, struct writeback_control *);
+       int (*set_page_dirty)(struct page *page);
+       int (*readpages)(struct file *filp, struct address_space *mapping,
+                       struct list_head *pages, unsigned nr_pages);
+       int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
+       int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
+       sector_t (*bmap)(struct address_space *, sector_t);
+       int (*invalidatepage) (struct page *, unsigned long);
+       int (*releasepage) (struct page *, int);
+       ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
+                       loff_t offset, unsigned long nr_segs);
+       struct page* (*get_xip_page)(struct address_space *, sector_t,
+                       int);
+};
+
+  writepage: called by the VM write a dirty page to backing store.
+
+  readpage: called by the VM to read a page from backing store.
+
+  sync_page: called by the VM to notify the backing store to perform all
+       queued I/O operations for a page. I/O operations for other pages
+       associated with this address_space object may also be performed.
+
+  writepages: called by the VM to write out pages associated with the
+       address_space object.
+
+  set_page_dirty: called by the VM to set a page dirty.
+
+  readpages: called by the VM to read pages associated with the address_space
+       object.
 
+  prepare_write: called by the generic write path in VM to set up a write
+       request for a page.
 
-struct file_operations                                                <section>
+  commit_write: called by the generic write path in VM to write page to
+       its backing store.
+
+  bmap: called by the VFS to map a logical block offset within object to
+       physical block number. This method is use by for the legacy FIBMAP
+       ioctl. Other uses are discouraged.
+
+  invalidatepage: called by the VM on truncate to disassociate a page from its
+       address_space mapping.
+
+  releasepage: called by the VFS to release filesystem specific metadata from
+       a page.
+
+  direct_IO: called by the VM for direct I/O writes and reads.
+
+  get_xip_page: called by the VM to translate a block number to a page.
+       The page is valid until the corresponding filesystem is unmounted.
+       Filesystems that want to use execute-in-place (XIP) need to implement
+       it.  An example implementation can be found in fs/ext2/xip.c.
+
+
+struct file_operations
 ======================
 
 This describes how the VFS can manipulate an open file. As of kernel
-2.1.99, the following members are defined:
+2.6.13, the following members are defined:
 
 struct file_operations {
        loff_t (*llseek) (struct file *, loff_t, int);
-       ssize_t (*read) (struct file *, char *, size_t, loff_t *);
-       ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
+       ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
+       ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t);
+       ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
+       ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t, 
loff_t);
        int (*readdir) (struct file *, void *, filldir_t);
        unsigned int (*poll) (struct file *, struct poll_table_struct *);
        int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned 
long);
+       long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
+       long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
        int (*mmap) (struct file *, struct vm_area_struct *);
        int (*open) (struct inode *, struct file *);
+       int (*flush) (struct file *);
        int (*release) (struct inode *, struct file *);
-       int (*fsync) (struct file *, struct dentry *);
-       int (*fasync) (struct file *, int);
-       int (*check_media_change) (kdev_t dev);
-       int (*revalidate) (kdev_t dev);
+       int (*fsync) (struct file *, struct dentry *, int datasync);
+       int (*aio_fsync) (struct kiocb *, int datasync);
+       int (*fasync) (int, struct file *, int);
        int (*lock) (struct file *, int, struct file_lock *);
+       ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, 
loff_t *);
+       ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, 
loff_t *);
+       ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, 
void *);
+       ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t 
*, int);
+       unsigned long (*get_unmapped_area)(struct file *, unsigned long, 
unsigned long, unsigned long, unsigned long);
+       int (*check_flags)(int);
+       int (*dir_notify)(struct file *filp, unsigned long arg);
+       int (*flock) (struct file *, int, struct file_lock *);
 };
 
 Again, all methods are called without any locks being held, unless
@@ -362,8 +544,12 @@
 
   read: called by read(2) and related system calls
 
+  aio_read: called by io_submit(2) and other asynchronous I/O operations
+
   write: called by write(2) and related system calls
 
+  aio_write: called by io_submit(2) and other asynchronous I/O operations
+
   readdir: called when the VFS needs to read the directory contents
 
   poll: called by the VFS when a process wants to check if there is
@@ -372,18 +558,25 @@
 
   ioctl: called by the ioctl(2) system call
 
+  unlocked_ioctl: called by the ioctl(2) system call. Filesystems that do not
+       require the BKL should use this method instead of the ioctl() above.
+
+  compat_ioctl: called by the ioctl(2) system call when 32 bit system calls
+        are used on 64 bit kernels.
+
   mmap: called by the mmap(2) system call
 
   open: called by the VFS when an inode should be opened. When the VFS
-       opens a file, it creates a new "struct file" and initialises
-       the "f_op" file operations member with the "default_file_ops"
-       field in the inode structure. It then calls the open method
-       for the newly allocated file structure. You might think that
-       the open method really belongs in "struct inode_operations",
-       and you may be right. I think it's done the way it is because
-       it makes filesystems simpler to implement. The open() method
-       is a good place to initialise the "private_data" member in the
-       file structure if you want to point to a device structure
+       opens a file, it creates a new "struct file". It then calls the
+       open method for the newly allocated file structure. You might
+       think that the open method really belongs in
+       "struct inode_operations", and you may be right. I think it's
+       done the way it is because it makes filesystems simpler to
+       implement. The open() method is a good place to initialize the
+       "private_data" member in the file structure if you want to point
+       to a device structure
+
+  flush: called by the close(2) system call to flush a file
 
   release: called when the last reference to an open file is closed
 
@@ -392,6 +585,23 @@
   fasync: called by the fcntl(2) system call when asynchronous
        (non-blocking) mode is enabled for a file
 
+  lock: called by the fcntl(2) system call for F_GETLK, F_SETLK, and F_SETLKW
+       commands
+
+  readv: called by the readv(2) system call
+
+  writev: called by the writev(2) system call
+
+  sendfile: called by the sendfile(2) system call
+
+  get_unmapped_area: called by the mmap(2) system call
+
+  check_flags: called by the fcntl(2) system call for F_SETFL command
+
+  dir_notify: called by the fcntl(2) system call for F_NOTIFY command
+
+  flock: called by the flock(2) system call
+
 Note that the file operations are implemented by the specific
 filesystem in which the inode resides. When opening a device node
 (character or block special) most filesystems will call special
@@ -400,29 +610,28 @@
 operations with those for the device driver, and then proceed to call
 the new open() method for the file. This is how opening a device file
 in the filesystem eventually ends up calling the device driver open()
-method. Note the devfs (the Device FileSystem) has a more direct path
-from device node to device driver (this is an unofficial kernel
-patch).
+method.
 
 
-Directory Entry Cache (dcache)                                        <section>
-------------------------------
+Directory Entry Cache (dcache)
+==============================
+
 
 struct dentry_operations
-========================
+------------------------
 
 This describes how a filesystem can overload the standard dentry
 operations. Dentries and the dcache are the domain of the VFS and the
 individual filesystem implementations. Device drivers have no business
 here. These methods may be set to NULL, as they are either optional or
-the VFS uses a default. As of kernel 2.1.99, the following members are
+the VFS uses a default. As of kernel 2.6.13, the following members are
 defined:
 
 struct dentry_operations {
-       int (*d_revalidate)(struct dentry *);
+       int (*d_revalidate)(struct dentry *, struct nameidata *);
        int (*d_hash) (struct dentry *, struct qstr *);
        int (*d_compare) (struct dentry *, struct qstr *, struct qstr *);
-       void (*d_delete)(struct dentry *);
+       int (*d_delete)(struct dentry *);
        void (*d_release)(struct dentry *);
        void (*d_iput)(struct dentry *, struct inode *);
 };
@@ -451,6 +660,7 @@
 of child dentries. Child dentries are basically like files in a
 directory.
 
+
 Directory Entry Cache APIs
 --------------------------
 
@@ -471,7 +681,7 @@
        "d_delete" method is called
 
   d_drop: this unhashes a dentry from its parents hash list. A
-       subsequent call to dput() will dellocate the dentry if its
+       subsequent call to dput() will deallocate the dentry if its
        usage count drops to 0
 
   d_delete: delete a dentry. If there are no other open references to
@@ -507,16 +717,16 @@
 of the pathname and using that dentry along with the next
 component to look up the next level and so on. Since it
 is a frequent operation for workloads like multiuser
-environments and webservers, it is important to optimize
+environments and web servers, it is important to optimize
 this path.
 
 Prior to 2.5.10, dcache_lock was acquired in d_lookup and thus
 in every component during path look-up. Since 2.5.10 onwards,
-fastwalk algorithm changed this by holding the dcache_lock
+fast-walk algorithm changed this by holding the dcache_lock
 at the beginning and walking as many cached path component
-dentries as possible. This signficantly decreases the number
+dentries as possible. This significantly decreases the number
 of acquisition of dcache_lock. However it also increases the
-lock hold time signficantly and affects performance in large
+lock hold time significantly and affects performance in large
 SMP machines. Since 2.5.62 kernel, dcache has been using
 a new locking model that uses RCU to make dcache look-up
 lock-free.
@@ -527,7 +737,7 @@
 as d_inode and several other things like mount look-up. RCU-based
 changes affect only the way the hash chain is protected. For everything
 else the dcache_lock must be taken for both traversing as well as
-updating. The hash chain updations too take the dcache_lock.
+updating. The hash chain updates too take the dcache_lock.
 The significant change is the way d_lookup traverses the hash chain,
 it doesn't acquire the dcache_lock for this and rely on RCU to
 ensure that the dentry has not been *freed*.
@@ -535,14 +745,15 @@
 
 Dcache locking details
 ----------------------
+
 For many multi-user workloads, open() and stat() on files are
 very frequently occurring operations. Both involve walking
 of path names to find the dentry corresponding to the
 concerned file. In 2.4 kernel, dcache_lock was held
 during look-up of each path component. Contention and
-cacheline bouncing of this global lock caused significant
+cache-line bouncing of this global lock caused significant
 scalability problems. With the introduction of RCU
-in linux kernel, this was worked around by making
+in Linux kernel, this was worked around by making
 the look-up of path components during path walking lock-free.
 
 
@@ -562,7 +773,7 @@
 2. Insertion of a dentry into the hash table is done using
    hlist_add_head_rcu() which take care of ordering the writes -
    the writes to the dentry must be visible before the dentry
-   is inserted. This works in conjuction with hlist_for_each_rcu()
+   is inserted. This works in conjunction with hlist_for_each_rcu()
    while walking the hash chain. The only requirement is that
    all initialization to the dentry must be done before hlist_add_head_rcu()
    since we don't have dcache_lock protection while traversing
@@ -584,7 +795,7 @@
    the same.  In some sense, dcache_rcu path walking looks like
    the pre-2.5.10 version.
 
-5. All dentry hash chain updations must take the dcache_lock as well as
+5. All dentry hash chain updates must take the dcache_lock as well as
    the per-dentry lock in that order. dput() does this to ensure
    that a dentry that has just been looked up in another CPU
    doesn't get deleted before dget() can be done on it.
@@ -640,10 +851,10 @@
    Since we redo the d_parent check and compare name while holding
    d_lock, lock-free look-up will not race against d_move().
 
-4. There can be a theoritical race when a dentry keeps coming back
+4. There can be a theoretical race when a dentry keeps coming back
    to original bucket due to double moves. Due to this look-up may
    consider that it has never moved and can end up in a infinite loop.
-   But this is not any worse that theoritical livelocks we already
+   But this is not any worse that theoretical livelocks we already
    have in the kernel.
 
 
diff -urN linux/Documentation/firmware_class/firmware_sample_driver.c 
linux/Documentation/firmware_class/firmware_sample_driver.c
--- linux/Documentation/firmware_class/firmware_sample_driver.c 2003/06/23 
01:23:02     1.1
+++ linux/Documentation/firmware_class/firmware_sample_driver.c 2005/09/15 
08:52:37     1.2
@@ -32,14 +32,14 @@
        u8 buf[size+1];
        memcpy(buf, firmware, size);
        buf[size] = '\0';
-       printk("firmware_sample_driver: firmware: %s\n", buf);
+       printk(KERN_INFO "firmware_sample_driver: firmware: %s\n", buf);
 }
 
 static void sample_probe_default(void)
 {
        /* uses the default method to get the firmware */
         const struct firmware *fw_entry;
-       printk("firmware_sample_driver: a ghost device got inserted :)\n");
+       printk(KERN_INFO "firmware_sample_driver: a ghost device got inserted 
:)\n");
 
         if(request_firmware(&fw_entry, "sample_driver_fw", &ghost_device)!=0)
        {
@@ -61,7 +61,7 @@
 
        /* NOTE: This currently doesn't work */
 
-       printk("firmware_sample_driver: a ghost device got inserted :)\n");
+       printk(KERN_INFO "firmware_sample_driver: a ghost device got inserted 
:)\n");
 
         if(request_firmware(NULL, "sample_driver_fw", &ghost_device)!=0)
        {
@@ -83,7 +83,7 @@
                return;
        }
 
-       printk("firmware_sample_driver: device pointer \"%s\"\n",
+       printk(KERN_INFO "firmware_sample_driver: device pointer \"%s\"\n",
               (char *)context);
        sample_firmware_load(fw->data, fw->size);
 }
diff -urN linux/Documentation/hwmon/w83792d linux/Documentation/hwmon/w83792d
--- linux/Documentation/hwmon/w83792d   1970/01/01 00:00:00
+++ linux/Documentation/hwmon/w83792d   2005-09-15 09:52:38.101311000 +0100     
1.1
@@ -0,0 +1,174 @@
+Kernel driver w83792d
+=====================
+
+Supported chips:
+  * Winbond W83792D
+    Prefix: 'w83792d'
+    Addresses scanned: I2C 0x2c - 0x2f
+    Datasheet: 
http://www.winbond.com.tw/E-WINBONDHTM/partner/PDFresult.asp?Pname=1035
+
+Author: Chunhao Huang
+Contact: DZShen <DZShen@Winbond.com.tw>
+
+
+Module Parameters
+-----------------
+
+* init int
+  (default 1)
+  Use 'init=0' to bypass initializing the chip.
+  Try this if your computer crashes when you load the module.
+
+* force_subclients=bus,caddr,saddr,saddr
+  This is used to force the i2c addresses for subclients of
+  a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b'
+  to force the subclients of chip 0x2f on bus 0 to i2c addresses
+  0x4a and 0x4b.
+
+
+Description
+-----------
+
+This driver implements support for the Winbond W83792AD/D.
+
+Detection of the chip can sometimes be foiled because it can be in an
+internal state that allows no clean access (Bank with ID register is not
+currently selected). If you know the address of the chip, use a 'force'
+parameter; this will put it into a more well-behaved state first.
+
+The driver implements three temperature sensors, seven fan rotation speed
+sensors, nine voltage sensors, and two automatic fan regulation
+strategies called: Smart Fan I (Thermal Cruise mode) and Smart Fan II.
+Automatic fan control mode is possible only for fan1-fan3. Fan4-fan7 can run
+synchronized with selected fan (fan1-fan3). This functionality and manual PWM
+control for fan4-fan7 is not yet implemented.
+
+Temperatures are measured in degrees Celsius and measurement resolution is 1
+degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
+the temperature gets higher than the Overtemperature Shutdown value; it stays
+on until the temperature falls below the Hysteresis value.
+
+Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
+triggered if the rotation speed has dropped below a programmable limit. Fan
+readings can be divided by a programmable divider (1, 2, 4, 8, 16, 32, 64 or
+128) to give the readings more range or accuracy.
+
+Voltage sensors (also known as IN sensors) report their values in millivolts.
+An alarm is triggered if the voltage has crossed a programmable minimum
+or maximum limit.
+
+Alarms are provided as output from "realtime status register". Following bits
+are defined:
+
+bit - alarm on:
+0  - in0
+1  - in1
+2  - temp1
+3  - temp2
+4  - temp3
+5  - fan1
+6  - fan2
+7  - fan3
+8  - in2
+9  - in3
+10 - in4
+11 - in5
+12 - in6
+13 - VID change
+14 - chassis
+15 - fan7
+16 - tart1
+17 - tart2
+18 - tart3
+19 - in7
+20 - in8
+21 - fan4
+22 - fan5
+23 - fan6
+
+Tart will be asserted while target temperature cannot be achieved after 3 
minutes
+of full speed rotation of corresponding fan.
+
+In addition to the alarms described above, there is a CHAS alarm on the chips
+which triggers if your computer case is open (This one is latched, contrary
+to realtime alarms).
+
+The chips only update values each 3 seconds; reading them more often will
+do no harm, but will return 'old' values.
+
+
+W83792D PROBLEMS
+----------------
+Known problems:
+       - This driver is only for Winbond W83792D C version device, there
+         are also some motherboards with B version W83792D device. The
+         calculation method to in6-in7(measured value, limits) is a little
+         different between C and B version. C or B version can be identified
+         by CR[0x49h].
+       - The function of vid and vrm has not been finished, because I'm NOT
+         very familiar with them. Adding support is welcome.
+       - The function of chassis open detection needs more tests.
+       - If you have ASUS server board and chip was not found: Then you will
+         need to upgrade to latest (or beta) BIOS. If it does not help please
+         contact us.
+
+Fan control
+-----------
+
+Manual mode
+-----------
+
+Works as expected. You just need to specify desired PWM/DC value (fan speed)
+in appropriate pwm# file.
+
+Thermal cruise
+--------------
+
+In this mode, W83792D provides the Smart Fan system to automatically control
+fan speed to keep the temperatures of CPU and the system within specific
+range. At first a wanted temperature and interval must be set. This is done
+via thermal_cruise# file. The tolerance# file serves to create T +- tolerance
+interval. The fan speed will be lowered as long as the current temperature
+remains below the thermal_cruise# +- tolerance# value. Once the temperature
+exceeds the high limit (T+tolerance), the fan will be turned on with a
+specific speed set by pwm# and automatically controlled its PWM duty cycle
+with the temperature varying. Three conditions may occur:
+
+(1) If the temperature still exceeds the high limit, PWM duty
+cycle will increase slowly.
+
+(2) If the temperature goes below the high limit, but still above the low
+limit (T-tolerance), the fan speed will be fixed at the current speed because
+the temperature is in the target range.
+
+(3) If the temperature goes below the low limit, PWM duty cycle will decrease
+slowly to 0 or a preset stop value until the temperature exceeds the low
+limit. (The preset stop value handling is not yet implemented in driver)
+
+Smart Fan II
+------------
+
+W83792D also provides a special mode for fan. Four temperature points are
+available. When related temperature sensors detects the temperature in preset
+temperature region (sf2_point@_fan# +- tolerance#) it will cause fans to run
+on programmed value from sf2_level@_fan#. You need to set four temperatures
+for each fan.
+
+
+/sys files
+----------
+
+pwm[1-3] - this file stores PWM duty cycle or DC value (fan speed) in range:
+       0 (stop) to 255 (full)
+pwm[1-3]_enable - this file controls mode of fan/temperature control:
+            * 0 Disabled
+            * 1 Manual mode
+            * 2 Smart Fan II
+            * 3 Thermal Cruise
+pwm[1-3]_mode - Select PWM of DC mode
+            * 0 DC
+            * 1 PWM
+thermal_cruise[1-3] - Selects the desired temperature for cruise (degC)
+tolerance[1-3] - Value in degrees of Celsius (degC) for +- T
+sf2_point[1-4]_fan[1-3] - four temperature points for each fan for Smart Fan II
+sf2_level[1-3]_fan[1-3] - three PWM/DC levels for each fan for Smart Fan II
diff -urN linux/Documentation/hwmon/lm78 linux/Documentation/hwmon/lm78
--- linux/Documentation/hwmon/lm78      2005/07/13 11:48:46     1.1
+++ linux/Documentation/hwmon/lm78      2005/09/15 08:52:38     1.2
@@ -2,16 +2,11 @@
 ==================
 
 Supported chips:
-  * National Semiconductor LM78
+  * National Semiconductor LM78 / LM78-J
     Prefix: 'lm78'
     Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
     Datasheet: Publicly available at the National Semiconductor website
                http://www.national.com/
-  * National Semiconductor LM78-J
-    Prefix: 'lm78-j'
-    Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
-    Datasheet: Publicly available at the National Semiconductor website
-               http://www.national.com/
   * National Semiconductor LM79
     Prefix: 'lm79'
     Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
diff -urN linux/Documentation/i2c/functionality 
linux/Documentation/i2c/functionality
--- linux/Documentation/i2c/functionality       2001/01/10 17:17:53     1.1
+++ linux/Documentation/i2c/functionality       2005/09/15 08:52:38     1.2
@@ -115,7 +115,7 @@
 If you try to access an adapter from a userspace program, you will have
 to use the /dev interface. You will still have to check whether the
 functionality you need is supported, of course. This is done using
-the I2C_FUNCS ioctl. An example, adapted from the lm_sensors i2c_detect
+the I2C_FUNCS ioctl. An example, adapted from the lm_sensors i2cdetect
 program, is below:
 
   int file;
diff -urN linux/Documentation/i2c/porting-clients 
linux/Documentation/i2c/porting-clients
--- linux/Documentation/i2c/porting-clients     2005/07/11 20:45:53     1.5
+++ linux/Documentation/i2c/porting-clients     2005/09/15 08:52:38     1.6
@@ -1,4 +1,4 @@
-Revision 4, 2004-03-30
+Revision 5, 2005-07-29
 Jean Delvare <khali@linux-fr.org>
 Greg KH <greg@kroah.com>
 
@@ -17,20 +17,22 @@
 
 Technical changes:
 
-* [Includes] Get rid of "version.h". Replace <linux/i2c-proc.h> with
-  <linux/i2c-sensor.h>. Includes typically look like that:
+* [Includes] Get rid of "version.h" and <linux/i2c-proc.h>.
+  Includes typically look like that:
   #include <linux/module.h>
   #include <linux/init.h>
   #include <linux/slab.h>
   #include <linux/i2c.h>
-  #include <linux/i2c-sensor.h>
-  #include <linux/i2c-vid.h>   /* if you need VRM support */
+  #include <linux/hwmon.h>     /* for hardware monitoring drivers */
+  #include <linux/hwmon-sysfs.h>
+  #include <linux/hwmon-vid.h> /* if you need VRM support */
   #include <asm/io.h>          /* if you have I/O operations */
   Please respect this inclusion order. Some extra headers may be
   required for a given driver (e.g. "lm75.h").
 
-* [Addresses] SENSORS_I2C_END becomes I2C_CLIENT_END, SENSORS_ISA_END
-  becomes I2C_CLIENT_ISA_END.
+* [Addresses] SENSORS_I2C_END becomes I2C_CLIENT_END, ISA addresses
+  are no more handled by the i2c core.
+  SENSORS_INSMOD_<n> becomes I2C_CLIENT_INSMOD_<n>.
 
 * [Client data] Get rid of sysctl_id. Try using standard names for
   register values (for example, temp_os becomes temp_max). You're
@@ -66,13 +68,15 @@
   if (!(adapter->class & I2C_CLASS_HWMON))
           return 0;
   ISA-only drivers of course don't need this.
+  Call i2c_probe() instead of i2c_detect().
 
 * [Detect] As mentioned earlier, the flags parameter is gone.
   The type_name and client_name strings are replaced by a single
   name string, which will be filled with a lowercase, short string
   (typically the driver name, e.g. "lm75").
   In i2c-only drivers, drop the i2c_is_isa_adapter check, it's
-  useless.
+  useless. Same for isa-only drivers, as the test would always be
+  true. Only hybrid drivers (which are quite rare) still need it.
   The errorN labels are reduced to the number needed. If that number
   is 2 (i2c-only drivers), it is advised that the labels are named
   exit and exit_free. For i2c+isa drivers, labels should be named
@@ -86,6 +90,8 @@
   device_create_file. Move the driver initialization before any
   sysfs file creation.
   Drop client->id.
+  Drop any 24RF08 corruption prevention you find, as this is now done
+  at the i2c-core level, and doing it twice voids it.
 
 * [Init] Limits must not be set by the driver (can be done later in
   user-space). Chip should not be reset default (although a module
@@ -93,7 +99,8 @@
   limited to the strictly necessary steps.
 
 * [Detach] Get rid of data, remove the call to
-  i2c_deregister_entry.
+  i2c_deregister_entry. Do not log an error message if
+  i2c_detach_client fails, as i2c-core will now do it for you.
 
 * [Update] Don't access client->data directly, use
   i2c_get_clientdata(client) instead.
diff -urN linux/Documentation/i2c/writing-clients 
linux/Documentation/i2c/writing-clients
--- linux/Documentation/i2c/writing-clients     2005/07/13 11:48:47     1.13
+++ linux/Documentation/i2c/writing-clients     2005/09/15 08:52:38     1.14
@@ -148,15 +148,15 @@
 detection algorithm.
 
 You do not have to use this parameter interface; but don't try to use
-function i2c_probe() (or i2c_detect()) if you don't.
+function i2c_probe() if you don't.
 
 NOTE: If you want to write a `sensors' driver, the interface is slightly
       different! See below.
 
 
 
-Probing classes (i2c)
----------------------
+Probing classes
+---------------
 
 All parameters are given as lists of unsigned 16-bit integers. Lists are
 terminated by I2C_CLIENT_END.
@@ -171,12 +171,18 @@
    ignore: insmod parameter.
      A list of pairs. The first value is a bus number (-1 for any I2C bus), 
      the second is the I2C address. These addresses are never probed. 
-     This parameter overrules 'normal' and 'probe', but not the 'force' lists.
+     This parameter overrules the 'normal_i2c' list only.
    force: insmod parameter. 
      A list of pairs. The first value is a bus number (-1 for any I2C bus),
      the second is the I2C address. A device is blindly assumed to be on
      the given address, no probing is done. 
 
+Additionally, kind-specific force lists may optionally be defined if
+the driver supports several chip kinds. They are grouped in a
+NULL-terminated list of pointers named forces, those first element if the
+generic force list mentioned above. Each additional list correspond to an
+insmod parameter of the form force_<kind>.
+
 Fortunately, as a module writer, you just have to define the `normal_i2c' 
 parameter. The complete declaration could look like this:
 
@@ -186,66 +192,17 @@
 
   /* Magic definition of all other variables and things */
   I2C_CLIENT_INSMOD;
+  /* Or, if your driver supports, say, 2 kind of devices: */
+  I2C_CLIENT_INSMOD_2(foo, bar);
+
+If you use the multi-kind form, an enum will be defined for you:
+  enum chips { any_chip, foo, bar, ... }
+You can then (and certainly should) use it in the driver code.
 
 Note that you *have* to call the defined variable `normal_i2c',
 without any prefix!
 
 
-Probing classes (sensors)
--------------------------
-
-If you write a `sensors' driver, you use a slightly different interface.
-As well as I2C addresses, we have to cope with ISA addresses. Also, we
-use a enum of chip types. Don't forget to include `sensors.h'.
-
-The following lists are used internally. They are all lists of integers.
-
-   normal_i2c: filled in by the module writer. Terminated by SENSORS_I2C_END.
-     A list of I2C addresses which should normally be examined.
-   normal_isa: filled in by the module writer. Terminated by SENSORS_ISA_END.
-     A list of ISA addresses which should normally be examined.
-   probe: insmod parameter. Initialize this list with SENSORS_I2C_END values.
-     A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
-     the ISA bus, -1 for any I2C bus), the second is the address. These
-     addresses are also probed, as if they were in the 'normal' list.
-   ignore: insmod parameter. Initialize this list with SENSORS_I2C_END values.
-     A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
-     the ISA bus, -1 for any I2C bus), the second is the I2C address. These
-     addresses are never probed. This parameter overrules 'normal' and 
-     'probe', but not the 'force' lists.
-
-Also used is a list of pointers to sensors_force_data structures:
-   force_data: insmod parameters. A list, ending with an element of which
-     the force field is NULL.
-     Each element contains the type of chip and a list of pairs.
-     The first value is a bus number (SENSORS_ISA_BUS for the ISA bus, 
-     -1 for any I2C bus), the second is the address. 
-     These are automatically translated to insmod variables of the form
-     force_foo.
-
-So we have a generic insmod variabled `force', and chip-specific variables
-`force_CHIPNAME'.
-
-Fortunately, as a module writer, you just have to define the `normal_i2c' 
-and `normal_isa' parameters, and define what chip names are used. 
-The complete declaration could look like this:
-  /* Scan i2c addresses 0x37, and 0x48 to 0x4f */
-  static unsigned short normal_i2c[] = { 0x37, 0x48, 0x49, 0x4a, 0x4b, 0x4c,
-                                         0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
-  /* Scan ISA address 0x290 */
-  static unsigned int normal_isa[] = {0x0290,SENSORS_ISA_END};
-
-  /* Define chips foo and bar, as well as all module parameters and things */
-  SENSORS_INSMOD_2(foo,bar);
-
-If you have one chip, you use macro SENSORS_INSMOD_1(chip), if you have 2
-you use macro SENSORS_INSMOD_2(chip1,chip2), etc. If you do not want to
-bother with chip types, you can use SENSORS_INSMOD_0.
-
-A enum is automatically defined as follows:
-  enum chips { any_chip, chip1, chip2, ... }
-
-
 Attaching to an adapter
 -----------------------
 
@@ -264,17 +221,10 @@
     return i2c_probe(adapter,&addr_data,&foo_detect_client);
   }
 
-For `sensors' drivers, use the i2c_detect function instead:
-  
-  int foo_attach_adapter(struct i2c_adapter *adapter)
-  { 
-    return i2c_detect(adapter,&addr_data,&foo_detect_client);
-  }
-
 Remember, structure `addr_data' is defined by the macros explained above,
 so you do not have to define it yourself.
 
-The i2c_probe or i2c_detect function will call the foo_detect_client
+The i2c_probe function will call the foo_detect_client
 function only for those i2c addresses that actually have a device on
 them (unless a `force' parameter was used). In addition, addresses that
 are already in use (by some other registered client) are skipped.
@@ -283,19 +233,18 @@
 The detect client function
 --------------------------
 
-The detect client function is called by i2c_probe or i2c_detect.
-The `kind' parameter contains 0 if this call is due to a `force'
-parameter, and -1 otherwise (for i2c_detect, it contains 0 if
-this call is due to the generic `force' parameter, and the chip type
-number if it is due to a specific `force' parameter).
+The detect client function is called by i2c_probe. The `kind' parameter
+contains -1 for a probed detection, 0 for a forced detection, or a positive
+number for a forced detection with a chip type forced.
 
 Below, some things are only needed if this is a `sensors' driver. Those
 parts are between /* SENSORS ONLY START */ and /* SENSORS ONLY END */
 markers. 
 
-This function should only return an error (any value != 0) if there is
-some reason why no more detection should be done anymore. If the
-detection just fails for this address, return 0.
+Returning an error different from -ENODEV in a detect function will cause
+the detection to stop: other addresses and adapters won't be scanned.
+This should only be done on fatal or internal errors, such as a memory
+shortage or i2c_attach_client failing.
 
 For now, you can ignore the `flags' parameter. It is there for future use.
 
@@ -320,11 +269,10 @@
     const char *type_name = "";
     int is_isa = i2c_is_isa_adapter(adapter);
 
-    if (is_isa) {
+    /* Do this only if the chip can additionally be found on the ISA bus
+       (hybrid chip). */
 
-      /* If this client can't be on the ISA bus at all, we can stop now
-         (call `goto ERROR0'). But for kicks, we will assume it is all
-         right. */
+    if (is_isa) {
 
       /* Discard immediately if this ISA range is already used */
       if (check_region(address,FOO_EXTENT))
@@ -495,15 +443,13 @@
     /* SENSORS ONLY END */
 
     /* Try to detach the client from i2c space */
-    if ((err = i2c_detach_client(client))) {
-      printk("foo.o: Client deregistration failed, client not detached.\n");
+    if ((err = i2c_detach_client(client)))
       return err;
-    }
 
-    /* SENSORS ONLY START */
+    /* HYBRID SENSORS CHIP ONLY START */
     if i2c_is_isa_client(client)
       release_region(client->addr,LM78_EXTENT);
-    /* SENSORS ONLY END */
+    /* HYBRID SENSORS CHIP ONLY END */
 
     kfree(client); /* Frees client data too, if allocated at the same time */
     return 0;
diff -urN linux/Documentation/i2c/chips/max6875 
linux/Documentation/i2c/chips/max6875
--- linux/Documentation/i2c/chips/max6875       2005/07/13 11:48:47     1.2
+++ linux/Documentation/i2c/chips/max6875       2005/09/15 08:52:38     1.3
@@ -4,22 +4,13 @@
 Supported chips:
   * Maxim MAX6874, MAX6875
     Prefix: 'max6875'
-    Addresses scanned: 0x50, 0x52
+    Addresses scanned: None (see below)
     Datasheet:
         http://pdfserv.maxim-ic.com/en/ds/MAX6874-MAX6875.pdf
 
 Author: Ben Gardner <bgardner@wabtec.com>
 
 
-Module Parameters
------------------
-
-* allow_write int
-  Set to non-zero to enable write permission:
-  *0: Read only
-   1: Read and write
-
-
 Description
 -----------
 
@@ -33,34 +24,85 @@
 
 The Maxim MAX6874 is a similar, mostly compatible device, with more intputs
 and outputs:
-
              vin     gpi    vout
 MAX6874        6       4       8
 MAX6875        4       3       5
 
-MAX6874 chips can have four different addresses (as opposed to only two for
-the MAX6875). The additional addresses (0x54 and 0x56) are not probed by
-this driver by default, but the probe module parameter can be used if
-needed.
-
-See the datasheet for details on how to program the EEPROM.
+See the datasheet for more information.
 
 
 Sysfs entries
 -------------
 
-eeprom_user   - 512 bytes of user-defined EEPROM space. Only writable if
-                allow_write was set and register 0x43 is 0.
-
-eeprom_config - 70 bytes of config EEPROM. Note that changes will not get
-                loaded into register space until a power cycle or device reset.
-
-reg_config    - 70 bytes of register space. Any changes take affect 
immediately.
+eeprom        - 512 bytes of user-defined EEPROM space.
 
 
 General Remarks
 ---------------
 
-A typical application will require that the EEPROMs be programmed once and
-never altered afterwards.
+Valid addresses for the MAX6875 are 0x50 and 0x52.
+Valid addresses for the MAX6874 are 0x50, 0x52, 0x54 and 0x56.
+The driver does not probe any address, so you must force the address.
+
+Example:
+$ modprobe max6875 force=0,0x50
+
+The MAX6874/MAX6875 ignores address bit 0, so this driver attaches to multiple
+addresses.  For example, for address 0x50, it also reserves 0x51.
+The even-address instance is called 'max6875', the odd one is 'max6875 
subclient'.
+
+
+Programming the chip using i2c-dev
+----------------------------------
+
+Use the i2c-dev interface to access and program the chips.
+Reads and writes are performed differently depending on the address range.
+
+The configuration registers are at addresses 0x00 - 0x45.
+Use i2c_smbus_write_byte_data() to write a register and
+i2c_smbus_read_byte_data() to read a register.
+The command is the register number.
+
+Examples:
+To write a 1 to register 0x45:
+  i2c_smbus_write_byte_data(fd, 0x45, 1);
+
+To read register 0x45:
+  value = i2c_smbus_read_byte_data(fd, 0x45);
+
+
+The configuration EEPROM is at addresses 0x8000 - 0x8045.
+The user EEPROM is at addresses 0x8100 - 0x82ff.
+
+Use i2c_smbus_write_word_data() to write a byte to EEPROM.
+
+The command is the upper byte of the address: 0x80, 0x81, or 0x82.
+The data word is the lower part of the address or'd with data << 8.
+  cmd = address >> 8;
+  val = (address & 0xff) | (data << 8);
+
+Example:
+To write 0x5a to address 0x8003:
+  i2c_smbus_write_word_data(fd, 0x80, 0x5a03);
+
+
+Reading data from the EEPROM is a little more complicated.
+Use i2c_smbus_write_byte_data() to set the read address and then
+i2c_smbus_read_byte() or i2c_smbus_read_i2c_block_data() to read the data.
+
+Example:
+To read data starting at offset 0x8100, first set the address:
+  i2c_smbus_write_byte_data(fd, 0x81, 0x00);
+
+And then read the data
+  value = i2c_smbus_read_byte(fd);
+
+  or
+
+  count = i2c_smbus_read_i2c_block_data(fd, 0x84, buffer);
+
+The block read should read 16 bytes.
+0x84 is the block read command.
+
+See the datasheet for more details.
 
diff -urN linux/Documentation/i386/boot.txt linux/Documentation/i386/boot.txt
--- linux/Documentation/i386/boot.txt   2005/01/13 14:05:15     1.7
+++ linux/Documentation/i386/boot.txt   2005/09/15 08:52:38     1.8
@@ -2,7 +2,7 @@
                     ----------------------------
 
                    H. Peter Anvin <hpa@zytor.com>
-                       Last update 2002-01-01
+                       Last update 2005-09-02
 
 On the i386 platform, the Linux kernel uses a rather complicated boot
 convention.  This has evolved partially due to historical aspects, as
@@ -34,6 +34,8 @@
 Protocol 2.03: (Kernel 2.4.18-pre1) Explicitly makes the highest possible
                initrd address available to the bootloader.
 
+Protocol 2.04: (Kernel 2.6.14) Extend the syssize field to four bytes.
+
 
 **** MEMORY LAYOUT
 
@@ -103,10 +105,9 @@
 Offset Proto   Name            Meaning
 /Size
 
-01F1/1 ALL     setup_sects     The size of the setup in sectors
+01F1/1 ALL(1   setup_sects     The size of the setup in sectors
 01F2/2 ALL     root_flags      If set, the root is mounted readonly
-01F4/2 ALL     syssize         DO NOT USE - for bootsect.S use only
-01F6/2 ALL     swap_dev        DO NOT USE - obsolete
+01F4/4 2.04+(2 syssize         The size of the 32-bit code in 16-byte paras
 01F8/2 ALL     ram_size        DO NOT USE - for bootsect.S use only
 01FA/2 ALL     vid_mode        Video mode control
 01FC/2 ALL     root_dev        Default root device number
@@ -129,8 +130,12 @@
 0228/4 2.02+   cmd_line_ptr    32-bit pointer to the kernel command line
 022C/4 2.03+   initrd_addr_max Highest legal initrd address
 
-For backwards compatibility, if the setup_sects field contains 0, the
-real value is 4.
+(1) For backwards compatibility, if the setup_sects field contains 0, the
+    real value is 4.
+
+(2) For boot protocol prior to 2.04, the upper two bytes of the syssize
+    field are unusable, which means the size of a bzImage kernel
+    cannot be determined.
 
 If the "HdrS" (0x53726448) magic number is not found at offset 0x202,
 the boot protocol version is "old".  Loading an old kernel, the
@@ -230,12 +235,16 @@
 relevant to the boot loader itself, see "special command line options"
 below.
 
-The kernel command line is a null-terminated string up to 255
-characters long, plus the final null.
+The kernel command line is a null-terminated string currently up to
+255 characters long, plus the final null.  A string that is too long
+will be automatically truncated by the kernel, a boot loader may allow
+a longer command line to be passed to permit future kernels to extend
+this limit.
 
 If the boot protocol version is 2.02 or later, the address of the
 kernel command line is given by the header field cmd_line_ptr (see
-above.)
+above.)  This address can be anywhere between the end of the setup
+heap and 0xA0000.
 
 If the protocol version is *not* 2.02 or higher, the kernel
 command line is entered using the following protocol:
@@ -255,7 +264,7 @@
 **** SAMPLE BOOT CONFIGURATION
 
 As a sample configuration, assume the following layout of the real
-mode segment:
+mode segment (this is a typical, and recommended layout):
 
        0x0000-0x7FFF   Real mode kernel
        0x8000-0x8FFF   Stack and heap
@@ -312,9 +321,9 @@
 
 **** LOADING THE REST OF THE KERNEL
 
-The non-real-mode kernel starts at offset (setup_sects+1)*512 in the
-kernel file (again, if setup_sects == 0 the real value is 4.)  It
-should be loaded at address 0x10000 for Image/zImage kernels and
+The 32-bit (non-real-mode) kernel starts at offset (setup_sects+1)*512
+in the kernel file (again, if setup_sects == 0 the real value is 4.)
+It should be loaded at address 0x10000 for Image/zImage kernels and
 0x100000 for bzImage kernels.
 
 The kernel is a bzImage kernel if the protocol >= 2.00 and the 0x01
diff -urN linux/Documentation/input/appletouch.txt 
linux/Documentation/input/appletouch.txt
--- linux/Documentation/input/appletouch.txt    1970/01/01 00:00:00
+++ linux/Documentation/input/appletouch.txt    2005-09-15 09:52:38.603796000 
+0100     1.1
@@ -0,0 +1,84 @@
+Apple Touchpad Driver (appletouch)
+----------------------------------
+       Copyright (C) 2005 Stelian Pop <stelian@popies.net>
+
+appletouch is a Linux kernel driver for the USB touchpad found on post
+February 2005 Apple Alu Powerbooks.
+
+This driver is derived from Johannes Berg's appletrackpad driver[1], but it has
+been improved in some areas:
+       * appletouch is a full kernel driver, no userspace program is necessary
+       * appletouch can be interfaced with the synaptics X11 driver, in order
+         to have touchpad acceleration, scrolling, etc.
+
+Credits go to Johannes Berg for reverse-engineering the touchpad protocol,
+Frank Arnold for further improvements, and Alex Harper for some additional
+information about the inner workings of the touchpad sensors.
+
+Usage:
+------
+
+In order to use the touchpad in the basic mode, compile the driver and load
+the module. A new input device will be detected and you will be able to read
+the mouse data from /dev/input/mice (using gpm, or X11).
+
+In X11, you can configure the touchpad to use the synaptics X11 driver, which
+will give additional functionalities, like acceleration, scrolling, 2 finger
+tap for middle button mouse emulation, 3 finger tap for right button mouse
+emulation, etc. In order to do this, make sure you're using a recent version of
+the synaptics driver (tested with 0.14.2, available from [2]), and configure a
+new input device in your X11 configuration file (take a look below for an
+example). For additional configuration, see the synaptics driver documentation.
+
+       Section "InputDevice"
+               Identifier      "Synaptics Touchpad"
+               Driver          "synaptics"
+               Option          "SendCoreEvents"        "true"
+               Option          "Device"                "/dev/input/mice"
+               Option          "Protocol"              "auto-dev"
+               Option          "LeftEdge"              "0"
+               Option          "RightEdge"             "850"
+               Option          "TopEdge"               "0"
+               Option          "BottomEdge"            "645"
+               Option          "MinSpeed"              "0.4"
+               Option          "MaxSpeed"              "1"
+               Option          "AccelFactor"           "0.02"
+               Option          "FingerLow"             "0"
+               Option          "FingerHigh"            "30"
+               Option          "MaxTapMove"            "20"
+               Option          "MaxTapTime"            "100"
+               Option          "HorizScrollDelta"      "0"
+               Option          "VertScrollDelta"       "30"
+               Option          "SHMConfig"             "on"
+       EndSection
+
+       Section "ServerLayout"
+               ...
+               InputDevice     "Mouse"
+               InputDevice     "Synaptics Touchpad"
+       ...
+       EndSection
+
+Fuzz problems:
+--------------
+
+The touchpad sensors are very sensitive to heat, and will generate a lot of
+noise when the temperature changes. This is especially true when you power-on
+the laptop for the first time.
+
+The appletouch driver tries to handle this noise and auto adapt itself, but it
+is not perfect. If finger movements are not recognized anymore, try reloading
+the driver.
+
+You can activate debugging using the 'debug' module parameter. A value of 0
+deactivates any debugging, 1 activates tracing of invalid samples, 2 activates
+full tracing (each sample is being traced):
+       modprobe appletouch debug=1
+               or
+       echo "1" > /sys/module/appletouch/parameters/debug
+
+Links:
+------
+
+[1]: http://johannes.sipsolutions.net/PowerBook/touchpad/
+[2]: http://web.telia.com/~u89404340/touchpad/index.html
diff -urN linux/Documentation/input/yealink.txt 
linux/Documentation/input/yealink.txt
--- linux/Documentation/input/yealink.txt       1970/01/01 00:00:00
+++ linux/Documentation/input/yealink.txt       2005-09-15 09:52:38.617975000 
+0100     1.1
@@ -0,0 +1,203 @@
+Driver documentation for yealink usb-p1k phones
+
+0. Status
+~~~~~~~~~
+
+The p1k is a relatively cheap usb 1.1 phone with:
+  - keyboard           full support, yealink.ko / input event API
+  - LCD                        full support, yealink.ko / sysfs API
+  - LED                        full support, yealink.ko / sysfs API
+  - dialtone           full support, yealink.ko / sysfs API
+  - ringtone           full support, yealink.ko / sysfs API
+  - audio playback     full support, snd_usb_audio.ko / alsa API
+  - audio record       full support, snd_usb_audio.ko / alsa API
+
+For vendor documentation see http://www.yealink.com
+
+
+1. Compilation (stand alone version)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Currently only kernel 2.6.x.y versions are supported.
+In order to build the yealink.ko module do:
+
+  make
+
+If you encounter problems please check if in the MAKE_OPTS variable in
+the Makefile is pointing to the location where your kernel sources
+are located, default /usr/src/linux.
+
+
+
+2. keyboard features
+~~~~~~~~~~~~~~~~~~~~
+The current mapping in the kernel is provided by the map_p1k_to_key
+function:
+
+   Physical USB-P1K button layout      input events
+
+
+              up                            up
+        IN           OUT               left,   right
+             down                          down
+
+      pickup   C    hangup             enter, backspace, escape
+        1      2      3                        1, 2, 3
+        4      5      6                        4, 5, 6,
+        7      8      9                        7, 8, 9,
+        *      0      #                        *, 0, #,
+
+  The "up" and "down" keys, are symbolised by arrows on the button.
+  The "pickup" and "hangup" keys are symbolised by a green and red phone
+  on the button.
+
+
+3. LCD features
+~~~~~~~~~~~~~~~
+The LCD is divided and organised as a 3 line display:
+
+    |[]   [][]   [][]   [][]   in   |[][]
+    |[] M [][] D [][] : [][]   out  |[][]
+                              store
+
+    NEW REP         SU MO TU WE TH FR SA
+
+    [] [] [] [] [] [] [] [] [] [] [] []
+    [] [] [] [] [] [] [] [] [] [] [] []
+
+
+Line 1 Format (see below)      : 18.e8.M8.88...188
+       Icon names              :   M  D  :  IN OUT STORE
+Line 2  Format                 : .........
+       Icon name               : NEW REP SU MO TU WE TH FR SA
+Line 3  Format                 : 888888888888
+
+
+Format description:
+  From a user space perspective the world is seperated in "digits" and "icons".
+  A digit can have a character set, an icon can only be ON or OFF.
+
+  Format specifier
+    '8' :  Generic 7 segment digit with individual addressable segments
+
+    Reduced capabillity 7 segm digit, when segments are hard wired together.
+    '1' : 2 segments digit only able to produce a 1.
+    'e' : Most significant day of the month digit,
+          able to produce at least 1 2 3.
+    'M' : Most significant minute digit,
+          able to produce at least 0 1 2 3 4 5.
+
+    Icons or pictograms:
+    '.' : For example like AM, PM, SU, a 'dot' .. or other single segment
+         elements.
+
+
+4. Driver usage
+~~~~~~~~~~~~~~~
+For userland the following interfaces are available using the sysfs interface:
+  /sys/.../
+           line1       Read/Write, lcd line1
+           line2       Read/Write, lcd line2
+           line3       Read/Write, lcd line3
+
+          get_icons    Read, returns a set of available icons.
+          hide_icon    Write, hide the element by writing the icon name.
+          show_icon    Write, display the element by writing the icon name.
+
+          map_seg7     Read/Write, the 7 segments char set, common for all
+                       yealink phones. (see map_to_7segment.h)
+
+          ringtone     Write, upload binary representation of a ringtone,
+                       see yealink.c. status EXPERIMENTAL due to potential
+                       races between async. and sync usb calls.
+
+
+4.1 lineX
+~~~~~~~~~
+Reading /sys/../lineX will return the format string with its current value:
+
+  Example:
+  cat ./line3
+  888888888888
+  Linux Rocks!
+
+Writing to /sys/../lineX will set the coresponding LCD line.
+ - Excess characters are ignored.
+ - If less characters are written than allowed, the remaining digits are
+   unchanged.
+ - The tab '\t'and '\n' char does not overwrite the original content.
+ - Writing a space to an icon will always hide its content.
+
+  Example:
+  date +"%m.%e.%k:%M"  | sed 's/^0/ /' > ./line1
+
+  Will update the LCD with the current date & time.
+
+
+4.2 get_icons
+~~~~~~~~~~~~~
+Reading will return all available icon names and its current settings:
+
+  cat ./get_icons
+  on M
+  on D
+  on :
+     IN
+     OUT
+     STORE
+     NEW
+     REP
+     SU
+     MO
+     TU
+     WE
+     TH
+     FR
+     SA
+     LED
+     DIALTONE
+     RINGTONE
+
+
+4.3 show/hide icons
+~~~~~~~~~~~~~~~~~~~
+Writing to these files will update the state of the icon.
+Only one icon at a time can be updated.
+
+If an icon is also on a ./lineX the corresponding value is
+updated with the first letter of the icon.
+
+  Example - light up the store icon:
+  echo -n "STORE" > ./show_icon
+
+  cat ./line1
+  18.e8.M8.88...188
+               S
+
+  Example - sound the ringtone for 10 seconds:
+  echo -n RINGTONE > /sys/..../show_icon
+  sleep 10
+  echo -n RINGTONE > /sys/..../hide_icon
+
+
+5. Sound features
+~~~~~~~~~~~~~~~~~
+Sound is supported by the ALSA driver: snd_usb_audio
+
+One 16-bit channel with sample and playback rates of 8000 Hz is the practical
+limit of the device.
+
+  Example - recording test:
+  arecord -v -d 10 -r 8000 -f S16_LE -t wav  foobar.wav
+
+  Example - playback test:
+  aplay foobar.wav
+
+
+6. Credits & Acknowledgments
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  - Olivier Vandorpe, for starting the usbb2k-api project doing much of
+       the reverse engineering.
+  - Martin Diehl, for pointing out how to handle USB memory allocation.
+  - Dmitry Torokhov, for the numerous code reviews and suggestions.
+
diff -urN linux/Documentation/ioctl/cdrom.txt 
linux/Documentation/ioctl/cdrom.txt
--- linux/Documentation/ioctl/cdrom.txt 2004/12/27 02:15:47     1.2
+++ linux/Documentation/ioctl/cdrom.txt 2005/09/15 08:52:38     1.3
@@ -878,7 +878,7 @@
 
        error returns:
          EINVAL        physical.layer_num exceeds number of layers
-         EIO           Recieved invalid response from drive
+         EIO           Received invalid response from drive
 
 
 
diff -urN linux/Documentation/kbuild/makefiles.txt 
linux/Documentation/kbuild/makefiles.txt
--- linux/Documentation/kbuild/makefiles.txt    2004/11/15 11:49:13     1.18
+++ linux/Documentation/kbuild/makefiles.txt    2005/09/15 08:52:38     1.19
@@ -31,7 +31,7 @@
 
        === 6 Architecture Makefiles
           --- 6.1 Set variables to tweak the build to the architecture
-          --- 6.2 Add prerequisites to prepare:
+          --- 6.2 Add prerequisites to archprepare:
           --- 6.3 List directories to visit when descending
           --- 6.4 Architecture specific boot images
           --- 6.5 Building non-kbuild targets
@@ -734,18 +734,18 @@
        for loadable kernel modules.
 
  
---- 6.2 Add prerequisites to prepare:
+--- 6.2 Add prerequisites to archprepare:
 
-       The prepare: rule is used to list prerequisites that needs to be
+       The archprepare: rule is used to list prerequisites that needs to be
        built before starting to descend down in the subdirectories.
        This is usual header files containing assembler constants.
 
                Example:
-               #arch/s390/Makefile
-               prepare: include/asm-$(ARCH)/offsets.h
+               #arch/arm/Makefile
+               archprepare: maketools
 
-       In this example the file include/asm-$(ARCH)/offsets.h will
-       be built before descending down in the subdirectories.
+       In this example the file target maketools will be processed
+       before descending down in the subdirectories.
        See also chapter XXX-TODO that describe how kbuild supports
        generating offset header files.
 
@@ -872,7 +872,13 @@
        Assignments to $(targets) are without $(obj)/ prefix.
        if_changed may be used in conjunction with custom commands as
        defined in 6.7 "Custom kbuild commands".
+
        Note: It is a typical mistake to forget the FORCE prerequisite.
+       Another common pitfall is that whitespace is sometimes
+       significant; for instance, the below will fail (note the extra space
+       after the comma):
+               target: source(s) FORCE
+       #WRONG!#        $(call if_changed, ld/objcopy/gzip)
 
     ld
        Link target. Often LDFLAGS_$@ is used to set specific options to ld.
diff -urN linux/Documentation/kdump/kdump.txt 
linux/Documentation/kdump/kdump.txt
--- linux/Documentation/kdump/kdump.txt 2005/07/11 20:45:55     1.1
+++ linux/Documentation/kdump/kdump.txt 2005/09/15 08:52:38     1.2
@@ -39,8 +39,7 @@
    and apply 
http://lse.sourceforge.net/kdump/patches/kexec-tools-1.101-kdump.patch
    and after that build the source.
 
-2) Download and build the appropriate (latest) kexec/kdump (-mm) kernel
-   patchset and apply it to the vanilla kernel tree.
+2) Download and build the appropriate (2.6.13-rc1 onwards) vanilla kernel.
 
    Two kernels need to be built in order to get this feature working.
 
@@ -84,15 +83,16 @@
 
 4) Load the second kernel to be booted using:
 
-   kexec -p <second-kernel> --crash-dump --args-linux --append="root=<root-dev>
-   init 1 irqpoll"
+   kexec -p <second-kernel> --args-linux --elf32-core-headers
+   --append="root=<root-dev> init 1 irqpoll"
 
    Note: i) <second-kernel> has to be a vmlinux image. bzImage will not work,
            as of now.
-       ii) By default ELF headers are stored in ELF32 format (for i386). This
-           is sufficient to represent the physical memory up to 4GB. To store
-           headers in ELF64 format, specifiy "--elf64-core-headers" on the
-           kexec command line additionally.
+       ii) By default ELF headers are stored in ELF64 format. Option
+           --elf32-core-headers forces generation of ELF32 headers. gdb can
+           not open ELF64 headers on 32 bit systems. So creating ELF32
+           headers can come handy for users who have got non-PAE systems and
+           hence have memory less than 4GB.
        iii) Specify "irqpoll" as command line parameter. This reduces driver
             initialization failures in second kernel due to shared interrupts.
 
diff -urN linux/Documentation/networking/README.ipw2100 
linux/Documentation/networking/README.ipw2100
--- linux/Documentation/networking/README.ipw2100       1970/01/01 00:00:00
+++ linux/Documentation/networking/README.ipw2100       2005-09-15 
09:52:39.220920000 +0100     1.1
@@ -0,0 +1,246 @@
+
+===========================
+Intel(R) PRO/Wireless 2100 Network Connection Driver for Linux
+README.ipw2100
+
+March 14, 2005
+
+===========================
+Index
+---------------------------
+0. Introduction
+1. Release 1.1.0 Current Features
+2. Command Line Parameters
+3. Sysfs Helper Files
+4. Radio Kill Switch
+5. Dynamic Firmware
+6. Power Management
+7. Support
+8. License
+
+
+===========================
+0. Introduction
+------------ -----   -----       ----       ---       --         -     
+
+This document provides a brief overview of the features supported by the 
+IPW2100 driver project.  The main project website, where the latest 
+development version of the driver can be found, is:
+
+       http://ipw2100.sourceforge.net
+
+There you can find the not only the latest releases, but also information about
+potential fixes and patches, as well as links to the development mailing list
+for the driver project.
+
+
+===========================
+1. Release 1.1.0 Current Supported Features
+---------------------------     
+- Managed (BSS) and Ad-Hoc (IBSS)
+- WEP (shared key and open)
+- Wireless Tools support 
+- 802.1x (tested with XSupplicant 1.0.1)
+
+Enabled (but not supported) features:
+- Monitor/RFMon mode
+- WPA/WPA2
+
+The distinction between officially supported and enabled is a reflection
+on the amount of validation and interoperability testing that has been
+performed on a given feature.
+
+
+===========================
+2. Command Line Parameters
+---------------------------     
+
+If the driver is built as a module, the following optional parameters are used
+by entering them on the command line with the modprobe command using this
+syntax:
+
+       modprobe ipw2100 [<option>=<VAL1><,VAL2>...]
+
+For example, to disable the radio on driver loading, enter:
+
+       modprobe ipw2100 disable=1
+
+The ipw2100 driver supports the following module parameters:
+
+Name           Value           Example:
+debug          0x0-0xffffffff  debug=1024
+mode           0,1,2           mode=1   /* AdHoc */
+channel                int             channel=3 /* Only valid in AdHoc or 
Monitor */
+associate      boolean         associate=0 /* Do NOT auto associate */
+disable                boolean         disable=1 /* Do not power the HW */
+
+
+===========================
+3. Sysfs Helper Files
+---------------------------     
+
+There are several ways to control the behavior of the driver.  Many of the 
+general capabilities are exposed through the Wireless Tools (iwconfig).  There
+are a few capabilities that are exposed through entries in the Linux Sysfs.
+
+
+----- Driver Level ------
+For the driver level files, look in /sys/bus/pci/drivers/ipw2100/
+
+  debug_level  
+       
+       This controls the same global as the 'debug' module parameter.  For 
+        information on the various debugging levels available, run the 'dvals'
+       script found in the driver source directory.
+
+       NOTE:  'debug_level' is only enabled if CONFIG_IPW2100_DEBUG is turn
+              on.
+
+----- Device Level ------
+For the device level files look in
+       
+       /sys/bus/pci/drivers/ipw2100/{PCI-ID}/
+
+For example:
+       /sys/bus/pci/drivers/ipw2100/0000:02:01.0
+
+For the device level files, see /sys/bus/pci/drivers/ipw2100:
+
+  rf_kill
+       read - 
+       0 = RF kill not enabled (radio on)
+       1 = SW based RF kill active (radio off)
+       2 = HW based RF kill active (radio off)
+       3 = Both HW and SW RF kill active (radio off)
+       write -
+       0 = If SW based RF kill active, turn the radio back on
+       1 = If radio is on, activate SW based RF kill
+
+       NOTE: If you enable the SW based RF kill and then toggle the HW
+       based RF kill from ON -> OFF -> ON, the radio will NOT come back on
+
+
+===========================
+4. Radio Kill Switch
+---------------------------
+Most laptops provide the ability for the user to physically disable the radio.
+Some vendors have implemented this as a physical switch that requires no
+software to turn the radio off and on.  On other laptops, however, the switch
+is controlled through a button being pressed and a software driver then making
+calls to turn the radio off and on.  This is referred to as a "software based
+RF kill switch"
+
+See the Sysfs helper file 'rf_kill' for determining the state of the RF switch
+on your system.
+
+
+===========================
+5. Dynamic Firmware
+---------------------------     
+As the firmware is licensed under a restricted use license, it can not be 
+included within the kernel sources.  To enable the IPW2100 you will need a 
+firmware image to load into the wireless NIC's processors.
+
+You can obtain these images from <http://ipw2100.sf.net/firmware.php>.
+
+See INSTALL for instructions on installing the firmware.
+
+
+===========================
+6. Power Management
+---------------------------     
+The IPW2100 supports the configuration of the Power Save Protocol 
+through a private wireless extension interface.  The IPW2100 supports 
+the following different modes:
+
+       off     No power management.  Radio is always on.
+       on      Automatic power management
+       1-5     Different levels of power management.  The higher the 
+               number the greater the power savings, but with an impact to 
+               packet latencies. 
+
+Power management works by powering down the radio after a certain 
+interval of time has passed where no packets are passed through the 
+radio.  Once powered down, the radio remains in that state for a given 
+period of time.  For higher power savings, the interval between last 
+packet processed to sleep is shorter and the sleep period is longer.
+
+When the radio is asleep, the access point sending data to the station 
+must buffer packets at the AP until the station wakes up and requests 
+any buffered packets.  If you have an AP that does not correctly support 
+the PSP protocol you may experience packet loss or very poor performance 
+while power management is enabled.  If this is the case, you will need 
+to try and find a firmware update for your AP, or disable power 
+management (via `iwconfig eth1 power off`)
+
+To configure the power level on the IPW2100 you use a combination of 
+iwconfig and iwpriv.  iwconfig is used to turn power management on, off, 
+and set it to auto.
+
+       iwconfig eth1 power off    Disables radio power down
+       iwconfig eth1 power on     Enables radio power management to 
+                                  last set level (defaults to AUTO)
+       iwpriv eth1 set_power 0    Sets power level to AUTO and enables 
+                                  power management if not previously 
+                                  enabled.
+       iwpriv eth1 set_power 1-5  Set the power level as specified, 
+                                  enabling power management if not 
+                                  previously enabled.
+
+You can view the current power level setting via:
+       
+       iwpriv eth1 get_power
+
+It will return the current period or timeout that is configured as a string
+in the form of xxxx/yyyy (z) where xxxx is the timeout interval (amount of
+time after packet processing), yyyy is the period to sleep (amount of time to 
+wait before powering the radio and querying the access point for buffered
+packets), and z is the 'power level'.  If power management is turned off the
+xxxx/yyyy will be replaced with 'off' -- the level reported will be the active
+level if `iwconfig eth1 power on` is invoked.
+
+
+===========================
+7. Support
+---------------------------     
+
+For general development information and support,
+go to:
+       
+    http://ipw2100.sf.net/
+
+The ipw2100 1.1.0 driver and firmware can be downloaded from:  
+
+    http://support.intel.com
+
+For installation support on the ipw2100 1.1.0 driver on Linux kernels 
+2.6.8 or greater, email support is available from:  
+
+    http://supportmail.intel.com
+
+===========================
+8. License
+---------------------------     
+
+  Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify it 
+  under the terms of the GNU General Public License (version 2) as 
+  published by the Free Software Foundation.
+  
+  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.
+  
+  The full GNU General Public License is included in this distribution in the
+  file called LICENSE.
+  
+  License Contact Information:
+  James P. Ketrenos <ipw2100-admin@linux.intel.com>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
diff -urN linux/Documentation/networking/README.ipw2200 
linux/Documentation/networking/README.ipw2200
--- linux/Documentation/networking/README.ipw2200       1970/01/01 00:00:00
+++ linux/Documentation/networking/README.ipw2200       2005-09-15 
09:52:39.245885000 +0100     1.1
@@ -0,0 +1,300 @@
+
+Intel(R) PRO/Wireless 2915ABG Driver for Linux in support of:
+
+Intel(R) PRO/Wireless 2200BG Network Connection 
+Intel(R) PRO/Wireless 2915ABG Network Connection 
+
+Note: The Intel(R) PRO/Wireless 2915ABG Driver for Linux and Intel(R) 
+PRO/Wireless 2200BG Driver for Linux is a unified driver that works on 
+both hardware adapters listed above. In this document the Intel(R) 
+PRO/Wireless 2915ABG Driver for Linux will be used to reference the 
+unified driver.
+
+Copyright (C) 2004-2005, Intel Corporation
+
+README.ipw2200
+
+Version: 1.0.0
+Date   : January 31, 2005
+
+
+Index
+-----------------------------------------------
+1.   Introduction
+1.1. Overview of features
+1.2. Module parameters
+1.3. Wireless Extension Private Methods
+1.4. Sysfs Helper Files
+2.   About the Version Numbers
+3.   Support
+4.   License
+
+
+1.   Introduction
+-----------------------------------------------
+The following sections attempt to provide a brief introduction to using 
+the Intel(R) PRO/Wireless 2915ABG Driver for Linux.
+
+This document is not meant to be a comprehensive manual on 
+understanding or using wireless technologies, but should be sufficient 
+to get you moving without wires on Linux.
+
+For information on building and installing the driver, see the INSTALL
+file.
+
+
+1.1. Overview of Features
+-----------------------------------------------
+The current release (1.0.0) supports the following features:
+
++ BSS mode (Infrastructure, Managed)
++ IBSS mode (Ad-Hoc)
++ WEP (OPEN and SHARED KEY mode)
++ 802.1x EAP via wpa_supplicant and xsupplicant
++ Wireless Extension support 
++ Full B and G rate support (2200 and 2915)
++ Full A rate support (2915 only)
++ Transmit power control
++ S state support (ACPI suspend/resume)
++ long/short preamble support
+
+
+
+1.2. Command Line Parameters
+-----------------------------------------------
+
+Like many modules used in the Linux kernel, the Intel(R) PRO/Wireless 
+2915ABG Driver for Linux allows certain configuration options to be 
+provided as module parameters.  The most common way to specify a module 
+parameter is via the command line.  
+
+The general form is:
+
+% modprobe ipw2200 parameter=value
+
+Where the supported parameter are:
+
+  associate
+       Set to 0 to disable the auto scan-and-associate functionality of the
+       driver.  If disabled, the driver will not attempt to scan 
+       for and associate to a network until it has been configured with 
+       one or more properties for the target network, for example configuring 
+       the network SSID.  Default is 1 (auto-associate)
+       
+       Example: % modprobe ipw2200 associate=0
+
+  auto_create
+       Set to 0 to disable the auto creation of an Ad-Hoc network 
+       matching the channel and network name parameters provided.  
+       Default is 1.
+
+  channel
+       channel number for association.  The normal method for setting
+        the channel would be to use the standard wireless tools
+        (i.e. `iwconfig eth1 channel 10`), but it is useful sometimes
+       to set this while debugging.  Channel 0 means 'ANY'
+
+  debug
+       If using a debug build, this is used to control the amount of debug
+       info is logged.  See the 'dval' and 'load' script for more info on
+       how to use this (the dval and load scripts are provided as part 
+       of the ipw2200 development snapshot releases available from the 
+       SourceForge project at http://ipw2200.sf.net)
+
+  mode
+       Can be used to set the default mode of the adapter.  
+       0 = Managed, 1 = Ad-Hoc
+
+
+1.3. Wireless Extension Private Methods
+-----------------------------------------------
+
+As an interface designed to handle generic hardware, there are certain 
+capabilities not exposed through the normal Wireless Tool interface.  As 
+such, a provision is provided for a driver to declare custom, or 
+private, methods.  The Intel(R) PRO/Wireless 2915ABG Driver for Linux 
+defines several of these to configure various settings.
+
+The general form of using the private wireless methods is:
+
+       % iwpriv $IFNAME method parameters
+
+Where $IFNAME is the interface name the device is registered with 
+(typically eth1, customized via one of the various network interface
+name managers, such as ifrename)
+
+The supported private methods are:
+
+  get_mode
+       Can be used to report out which IEEE mode the driver is 
+       configured to support.  Example:
+       
+       % iwpriv eth1 get_mode
+       eth1    get_mode:802.11bg (6)
+
+  set_mode
+       Can be used to configure which IEEE mode the driver will 
+       support.  
+
+       Usage:
+       % iwpriv eth1 set_mode {mode}
+       Where {mode} is a number in the range 1-7:
+       1       802.11a (2915 only)
+       2       802.11b
+       3       802.11ab (2915 only)
+       4       802.11g 
+       5       802.11ag (2915 only)
+       6       802.11bg
+       7       802.11abg (2915 only)
+
+  get_preamble
+       Can be used to report configuration of preamble length.
+
+  set_preamble
+       Can be used to set the configuration of preamble length:
+
+       Usage:
+       % iwpriv eth1 set_preamble {mode}
+       Where {mode} is one of:
+       1       Long preamble only
+       0       Auto (long or short based on connection)
+       
+
+1.4. Sysfs Helper Files:
+-----------------------------------------------
+
+The Linux kernel provides a pseudo file system that can be used to 
+access various components of the operating system.  The Intel(R) 
+PRO/Wireless 2915ABG Driver for Linux exposes several configuration 
+parameters through this mechanism.
+
+An entry in the sysfs can support reading and/or writing.  You can 
+typically query the contents of a sysfs entry through the use of cat, 
+and can set the contents via echo.  For example:
+
+% cat /sys/bus/pci/drivers/ipw2200/debug_level
+
+Will report the current debug level of the driver's logging subsystem 
+(only available if CONFIG_IPW_DEBUG was configured when the driver was 
+built).
+
+You can set the debug level via:
+
+% echo $VALUE > /sys/bus/pci/drivers/ipw2200/debug_level
+
+Where $VALUE would be a number in the case of this sysfs entry.  The 
+input to sysfs files does not have to be a number.  For example, the 
+firmware loader used by hotplug utilizes sysfs entries for transferring 
+the firmware image from user space into the driver.
+
+The Intel(R) PRO/Wireless 2915ABG Driver for Linux exposes sysfs entries 
+at two levels -- driver level, which apply to all instances of the 
+driver (in the event that there are more than one device installed) and 
+device level, which applies only to the single specific instance.
+
+
+1.4.1 Driver Level Sysfs Helper Files
+-----------------------------------------------
+
+For the driver level files, look in /sys/bus/pci/drivers/ipw2200/
+
+  debug_level  
+       
+       This controls the same global as the 'debug' module parameter
+
+
+1.4.2 Device Level Sysfs Helper Files
+-----------------------------------------------
+
+For the device level files, look in
+       
+       /sys/bus/pci/drivers/ipw2200/{PCI-ID}/
+
+For example:
+       /sys/bus/pci/drivers/ipw2200/0000:02:01.0
+
+For the device level files, see /sys/bus/pci/[drivers/ipw2200:
+
+  rf_kill
+       read - 
+       0 = RF kill not enabled (radio on)
+       1 = SW based RF kill active (radio off)
+       2 = HW based RF kill active (radio off)
+       3 = Both HW and SW RF kill active (radio off)
+       write -
+       0 = If SW based RF kill active, turn the radio back on
+       1 = If radio is on, activate SW based RF kill
+
+       NOTE: If you enable the SW based RF kill and then toggle the HW
+       based RF kill from ON -> OFF -> ON, the radio will NOT come back on
+       
+  ucode 
+       read-only access to the ucode version number
+
+
+2.   About the Version Numbers
+-----------------------------------------------
+
+Due to the nature of open source development projects, there are 
+frequently changes being incorporated that have not gone through 
+a complete validation process.  These changes are incorporated into 
+development snapshot releases.
+
+Releases are numbered with a three level scheme: 
+
+       major.minor.development
+
+Any version where the 'development' portion is 0 (for example
+1.0.0, 1.1.0, etc.) indicates a stable version that will be made 
+available for kernel inclusion.
+
+Any version where the 'development' portion is not a 0 (for
+example 1.0.1, 1.1.5, etc.) indicates a development version that is
+being made available for testing and cutting edge users.  The stability 
+and functionality of the development releases are not know.  We make
+efforts to try and keep all snapshots reasonably stable, but due to the
+frequency of their release, and the desire to get those releases 
+available as quickly as possible, unknown anomalies should be expected.
+
+The major version number will be incremented when significant changes
+are made to the driver.  Currently, there are no major changes planned.
+
+
+3.  Support
+-----------------------------------------------
+
+For installation support of the 1.0.0 version, you can contact 
+http://supportmail.intel.com, or you can use the open source project 
+support.
+
+For general information and support, go to:
+       
+    http://ipw2200.sf.net/
+
+
+4.  License
+-----------------------------------------------
+
+  Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify it 
+  under the terms of the GNU General Public License version 2 as 
+  published by the Free Software Foundation.
+  
+  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.
+  
+  The full GNU General Public License is included in this distribution in the
+  file called LICENSE.
+  
+  Contact Information:
+  James P. Ketrenos <ipw2100-admin@linux.intel.com>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+
diff -urN linux/Documentation/networking/cxgb.txt 
linux/Documentation/networking/cxgb.txt
--- linux/Documentation/networking/cxgb.txt     1970/01/01 00:00:00
+++ linux/Documentation/networking/cxgb.txt     2005-09-15 09:52:39.273660000 
+0100     1.1
@@ -0,0 +1,352 @@
+                 Chelsio N210 10Gb Ethernet Network Controller
+
+                         Driver Release Notes for Linux
+
+                                 Version 2.1.1
+
+                                 June 20, 2005
+
+CONTENTS
+========
+ INTRODUCTION
+ FEATURES
+ PERFORMANCE
+ DRIVER MESSAGES
+ KNOWN ISSUES
+ SUPPORT
+
+
+INTRODUCTION
+============
+
+ This document describes the Linux driver for Chelsio 10Gb Ethernet Network
+ Controller. This driver supports the Chelsio N210 NIC and is backward
+ compatible with the Chelsio N110 model 10Gb NICs.
+
+
+FEATURES
+========
+
+ Adaptive Interrupts (adaptive-rx)
+ ---------------------------------
+
+  This feature provides an adaptive algorithm that adjusts the interrupt
+  coalescing parameters, allowing the driver to dynamically adapt the latency
+  settings to achieve the highest performance during various types of network
+  load.
+
+  The interface used to control this feature is ethtool. Please see the
+  ethtool manpage for additional usage information.
+
+  By default, adaptive-rx is disabled.
+  To enable adaptive-rx:
+
+      ethtool -C <interface> adaptive-rx on
+
+  To disable adaptive-rx, use ethtool:
+
+      ethtool -C <interface> adaptive-rx off
+
+  After disabling adaptive-rx, the timer latency value will be set to 50us.
+  You may set the timer latency after disabling adaptive-rx:
+
+      ethtool -C <interface> rx-usecs <microseconds>
+
+  An example to set the timer latency value to 100us on eth0:
+
+      ethtool -C eth0 rx-usecs 100
+
+  You may also provide a timer latency value while disabling adpative-rx:
+
+      ethtool -C <interface> adaptive-rx off rx-usecs <microseconds>
+
+  If adaptive-rx is disabled and a timer latency value is specified, the timer
+  will be set to the specified value until changed by the user or until
+  adaptive-rx is enabled.
+
+  To view the status of the adaptive-rx and timer latency values:
+
+      ethtool -c <interface>
+
+
+ TCP Segmentation Offloading (TSO) Support
+ -----------------------------------------
+
+  This feature, also known as "large send", enables a system's protocol stack
+  to offload portions of outbound TCP processing to a network interface card
+  thereby reducing system CPU utilization and enhancing performance.
+
+  The interface used to control this feature is ethtool version 1.8 or higher.
+  Please see the ethtool manpage for additional usage information.
+
+  By default, TSO is enabled.
+  To disable TSO:
+
+      ethtool -K <interface> tso off
+
+  To enable TSO:
+
+      ethtool -K <interface> tso on
+
+  To view the status of TSO:
+
+      ethtool -k <interface>
+
+
+PERFORMANCE
+===========
+
+ The following information is provided as an example of how to change system
+ parameters for "performance tuning" an what value to use. You may or may not
+ want to change these system parameters, depending on your server/workstation
+ application. Doing so is not warranted in any way by Chelsio Communications,
+ and is done at "YOUR OWN RISK". Chelsio will not be held responsible for loss
+ of data or damage to equipment.
+
+ Your distribution may have a different way of doing things, or you may prefer
+ a different method. These commands are shown only to provide an example of
+ what to do and are by no means definitive.
+
+ Making any of the following system changes will only last until you reboot
+ your system. You may want to write a script that runs at boot-up which
+ includes the optimal settings for your system.
+
+  Setting PCI Latency Timer:
+      setpci -d 1425:* 0x0c.l=0x0000F800
+
+  Disabling TCP timestamp:
+      sysctl -w net.ipv4.tcp_timestamps=0
+
+  Disabling SACK:
+      sysctl -w net.ipv4.tcp_sack=0
+
+  Setting large number of incoming connection requests:
+      sysctl -w net.ipv4.tcp_max_syn_backlog=3000
+
+  Setting maximum receive socket buffer size:
+      sysctl -w net.core.rmem_max=1024000
+
+  Setting maximum send socket buffer size:
+      sysctl -w net.core.wmem_max=1024000
+
+  Set smp_affinity (on a multiprocessor system) to a single CPU:
+      echo 1 > /proc/irq/<interrupt_number>/smp_affinity
+
+  Setting default receive socket buffer size:
+      sysctl -w net.core.rmem_default=524287
+
+  Setting default send socket buffer size:
+      sysctl -w net.core.wmem_default=524287
+
+  Setting maximum option memory buffers:
+      sysctl -w net.core.optmem_max=524287
+
+  Setting maximum backlog (# of unprocessed packets before kernel drops):
+      sysctl -w net.core.netdev_max_backlog=300000
+
+  Setting TCP read buffers (min/default/max):
+      sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000"
+
+  Setting TCP write buffers (min/pressure/max):
+      sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000"
+
+  Setting TCP buffer space (min/pressure/max):
+      sysctl -w net.ipv4.tcp_mem="10000000 10000000 10000000"
+
+  TCP window size for single connections:
+   The receive buffer (RX_WINDOW) size must be at least as large as the
+   Bandwidth-Delay Product of the communication link between the sender and
+   receiver. Due to the variations of RTT, you may want to increase the buffer
+   size up to 2 times the Bandwidth-Delay Product. Reference page 289 of
+   "TCP/IP Illustrated, Volume 1, The Protocols" by W. Richard Stevens.
+   At 10Gb speeds, use the following formula:
+       RX_WINDOW >= 1.25MBytes * RTT(in milliseconds)
+       Example for RTT with 100us: RX_WINDOW = (1,250,000 * 0.1) = 125,000
+   RX_WINDOW sizes of 256KB - 512KB should be sufficient.
+   Setting the min, max, and default receive buffer (RX_WINDOW) size:
+       sysctl -w net.ipv4.tcp_rmem="<min> <default> <max>"
+
+  TCP window size for multiple connections:
+   The receive buffer (RX_WINDOW) size may be calculated the same as single
+   connections, but should be divided by the number of connections. The
+   smaller window prevents congestion and facilitates better pacing,
+   especially if/when MAC level flow control does not work well or when it is
+   not supported on the machine. Experimentation may be necessary to attain
+   the correct value. This method is provided as a starting point fot the
+   correct receive buffer size.
+   Setting the min, max, and default receive buffer (RX_WINDOW) size is
+   performed in the same manner as single connection.
+
+
+DRIVER MESSAGES
+===============
+
+ The following messages are the most common messages logged by syslog. These
+ may be found in /var/log/messages.
+
+  Driver up:
+     Chelsio Network Driver - version 2.1.1
+
+  NIC detected:
+     eth#: Chelsio N210 1x10GBaseX NIC (rev #), PCIX 133MHz/64-bit
+
+  Link up:
+     eth#: link is up at 10 Gbps, full duplex
+
+  Link down:
+     eth#: link is down
+
+
+KNOWN ISSUES
+============
+
+ These issues have been identified during testing. The following information
+ is provided as a workaround to the problem. In some cases, this problem is
+ inherent to Linux or to a particular Linux Distribution and/or hardware
+ platform.
+
+  1. Large number of TCP retransmits on a multiprocessor (SMP) system.
+
+      On a system with multiple CPUs, the interrupt (IRQ) for the network
+      controller may be bound to more than one CPU. This will cause TCP
+      retransmits if the packet data were to be split across different CPUs
+      and re-assembled in a different order than expected.
+
+      To eliminate the TCP retransmits, set smp_affinity on the particular
+      interrupt to a single CPU. You can locate the interrupt (IRQ) used on
+      the N110/N210 by using ifconfig:
+          ifconfig <dev_name> | grep Interrupt
+      Set the smp_affinity to a single CPU:
+          echo 1 > /proc/irq/<interrupt_number>/smp_affinity
+
+      It is highly suggested that you do not run the irqbalance daemon on your
+      system, as this will change any smp_affinity setting you have applied.
+      The irqbalance daemon runs on a 10 second interval and binds interrupts
+      to the least loaded CPU determined by the daemon. To disable this daemon:
+          chkconfig --level 2345 irqbalance off
+
+      By default, some Linux distributions enable the kernel feature,
+      irqbalance, which performs the same function as the daemon. To disable
+      this feature, add the following line to your bootloader:
+          noirqbalance
+
+          Example using the Grub bootloader:
+              title Red Hat Enterprise Linux AS (2.4.21-27.ELsmp)
+              root (hd0,0)
+              kernel /vmlinuz-2.4.21-27.ELsmp ro root=/dev/hda3 noirqbalance
+              initrd /initrd-2.4.21-27.ELsmp.img
+
+  2. After running insmod, the driver is loaded and the incorrect network
+     interface is brought up without running ifup.
+
+      When using 2.4.x kernels, including RHEL kernels, the Linux kernel
+      invokes a script named "hotplug". This script is primarily used to
+      automatically bring up USB devices when they are plugged in, however,
+      the script also attempts to automatically bring up a network interface
+      after loading the kernel module. The hotplug script does this by scanning
+      the ifcfg-eth# config files in /etc/sysconfig/network-scripts, looking
+      for HWADDR=<mac_address>.
+
+      If the hotplug script does not find the HWADDRR within any of the
+      ifcfg-eth# files, it will bring up the device with the next available
+      interface name. If this interface is already configured for a different
+      network card, your new interface will have incorrect IP address and
+      network settings.
+
+      To solve this issue, you can add the HWADDR=<mac_address> key to the
+      interface config file of your network controller.
+
+      To disable this "hotplug" feature, you may add the driver (module name)
+      to the "blacklist" file located in /etc/hotplug. It has been noted that
+      this does not work for network devices because the net.agent script
+      does not use the blacklist file. Simply remove, or rename, the net.agent
+      script located in /etc/hotplug to disable this feature.
+
+  3. Transport Protocol (TP) hangs when running heavy multi-connection traffic
+     on an AMD Opteron system with HyperTransport PCI-X Tunnel chipset.
+
+      If your AMD Opteron system uses the AMD-8131 HyperTransport PCI-X Tunnel
+      chipset, you may experience the "133-Mhz Mode Split Completion Data
+      Corruption" bug identified by AMD while using a 133Mhz PCI-X card on the
+      bus PCI-X bus.
+
+      AMD states, "Under highly specific conditions, the AMD-8131 PCI-X Tunnel
+      can provide stale data via split completion cycles to a PCI-X card that
+      is operating at 133 Mhz", causing data corruption.
+
+      AMD's provides three workarounds for this problem, however, Chelsio
+      recommends the first option for best performance with this bug:
+
+        For 133Mhz secondary bus operation, limit the transaction length and
+        the number of outstanding transactions, via BIOS configuration
+        programming of the PCI-X card, to the following:
+
+           Data Length (bytes): 1k
+           Total allowed outstanding transactions: 2
+
+      Please refer to AMD 8131-HT/PCI-X Errata 26310 Rev 3.08 August 2004,
+      section 56, "133-MHz Mode Split Completion Data Corruption" for more
+      details with this bug and workarounds suggested by AMD.
+
+      It may be possible to work outside AMD's recommended PCI-X settings, try
+      increasing the Data Length to 2k bytes for increased performance. If you
+      have issues with these settings, please revert to the "safe" settings
+      and duplicate the problem before submitting a bug or asking for support.
+
+      NOTE: The default setting on most systems is 8 outstanding transactions
+            and 2k bytes data length.
+
+  4. On multiprocessor systems, it has been noted that an application which
+     is handling 10Gb networking can switch between CPUs causing degraded
+     and/or unstable performance.
+
+      If running on an SMP system and taking performance measurements, it
+      is suggested you either run the latest netperf-2.4.0+ or use a binding
+      tool such as Tim Hockin's procstate utilities (runon)
+      <http://www.hockin.org/~thockin/procstate/>.
+
+      Binding netserver and netperf (or other applications) to particular
+      CPUs will have a significant difference in performance measurements.
+      You may need to experiment which CPU to bind the application to in
+      order to achieve the best performance for your system.
+
+      If you are developing an application designed for 10Gb networking,
+      please keep in mind you may want to look at kernel functions
+      sched_setaffinity & sched_getaffinity to bind your application.
+
+      If you are just running user-space applications such as ftp, telnet,
+      etc., you may want to try the runon tool provided by Tim Hockin's
+      procstate utility. You could also try binding the interface to a
+      particular CPU: runon 0 ifup eth0
+
+
+SUPPORT
+=======
+
+ If you have problems with the software or hardware, please contact our
+ customer support team via email at support@chelsio.com or check our website
+ at http://www.chelsio.com
+
+===============================================================================
+
+ Chelsio Communications
+ 370 San Aleso Ave.
+ Suite 100
+ Sunnyvale, CA 94085
+ http://www.chelsio.com
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License, version 2, as
+published by the Free Software Foundation.
+
+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.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ Copyright (c) 2003-2005 Chelsio Communications. All rights reserved.
+
+===============================================================================
diff -urN linux/Documentation/networking/phy.txt 
linux/Documentation/networking/phy.txt
--- linux/Documentation/networking/phy.txt      1970/01/01 00:00:00
+++ linux/Documentation/networking/phy.txt      2005-09-15 09:52:39.298274000 
+0100     1.1
@@ -0,0 +1,288 @@
+
+-------
+PHY Abstraction Layer
+(Updated 2005-07-21)
+
+Purpose
+
+ Most network devices consist of set of registers which provide an interface
+ to a MAC layer, which communicates with the physical connection through a
+ PHY.  The PHY concerns itself with negotiating link parameters with the link
+ partner on the other side of the network connection (typically, an ethernet
+ cable), and provides a register interface to allow drivers to determine what
+ settings were chosen, and to configure what settings are allowed.
+
+ While these devices are distinct from the network devices, and conform to a
+ standard layout for the registers, it has been common practice to integrate
+ the PHY management code with the network driver.  This has resulted in large
+ amounts of redundant code.  Also, on embedded systems with multiple (and
+ sometimes quite different) ethernet controllers connected to the same 
+ management bus, it is difficult to ensure safe use of the bus.
+
+ Since the PHYs are devices, and the management busses through which they are
+ accessed are, in fact, busses, the PHY Abstraction Layer treats them as such.
+ In doing so, it has these goals:
+
+   1) Increase code-reuse
+   2) Increase overall code-maintainability
+   3) Speed development time for new network drivers, and for new systems
+ 
+ Basically, this layer is meant to provide an interface to PHY devices which
+ allows network driver writers to write as little code as possible, while
+ still providing a full feature set.
+
+The MDIO bus
+
+ Most network devices are connected to a PHY by means of a management bus.
+ Different devices use different busses (though some share common interfaces).
+ In order to take advantage of the PAL, each bus interface needs to be
+ registered as a distinct device.
+
+ 1) read and write functions must be implemented.  Their prototypes are:
+
+     int write(struct mii_bus *bus, int mii_id, int regnum, u16 value);
+     int read(struct mii_bus *bus, int mii_id, int regnum);
+
+   mii_id is the address on the bus for the PHY, and regnum is the register
+   number.  These functions are guaranteed not to be called from interrupt
+   time, so it is safe for them to block, waiting for an interrupt to signal
+   the operation is complete
+ 
+ 2) A reset function is necessary.  This is used to return the bus to an
+   initialized state.
+
+ 3) A probe function is needed.  This function should set up anything the bus
+   driver needs, setup the mii_bus structure, and register with the PAL using
+   mdiobus_register.  Similarly, there's a remove function to undo all of
+   that (use mdiobus_unregister).
+ 
+ 4) Like any driver, the device_driver structure must be configured, and init
+   exit functions are used to register the driver.
+
+ 5) The bus must also be declared somewhere as a device, and registered.
+
+ As an example for how one driver implemented an mdio bus driver, see
+ drivers/net/gianfar_mii.c and arch/ppc/syslib/mpc85xx_devices.c
+
+Connecting to a PHY
+
+ Sometime during startup, the network driver needs to establish a connection
+ between the PHY device, and the network device.  At this time, the PHY's bus
+ and drivers need to all have been loaded, so it is ready for the connection.
+ At this point, there are several ways to connect to the PHY:
+
+ 1) The PAL handles everything, and only calls the network driver when
+   the link state changes, so it can react.
+
+ 2) The PAL handles everything except interrupts (usually because the
+   controller has the interrupt registers).
+
+ 3) The PAL handles everything, but checks in with the driver every second,
+   allowing the network driver to react first to any changes before the PAL
+   does.
+ 
+ 4) The PAL serves only as a library of functions, with the network device
+   manually calling functions to update status, and configure the PHY
+
+
+Letting the PHY Abstraction Layer do Everything
+
+ If you choose option 1 (The hope is that every driver can, but to still be
+ useful to drivers that can't), connecting to the PHY is simple:
+
+ First, you need a function to react to changes in the link state.  This
+ function follows this protocol:
+
+   static void adjust_link(struct net_device *dev);
+ 
+ Next, you need to know the device name of the PHY connected to this device. 
+ The name will look something like, "phy0:0", where the first number is the
+ bus id, and the second is the PHY's address on that bus.
+ 
+ Now, to connect, just call this function:
+ 
+   phydev = phy_connect(dev, phy_name, &adjust_link, flags);
+
+ phydev is a pointer to the phy_device structure which represents the PHY.  If
+ phy_connect is successful, it will return the pointer.  dev, here, is the
+ pointer to your net_device.  Once done, this function will have started the
+ PHY's software state machine, and registered for the PHY's interrupt, if it
+ has one.  The phydev structure will be populated with information about the
+ current state, though the PHY will not yet be truly operational at this
+ point.
+
+ flags is a u32 which can optionally contain phy-specific flags.
+ This is useful if the system has put hardware restrictions on
+ the PHY/controller, of which the PHY needs to be aware.
+
+ Now just make sure that phydev->supported and phydev->advertising have any
+ values pruned from them which don't make sense for your controller (a 10/100
+ controller may be connected to a gigabit capable PHY, so you would need to
+ mask off SUPPORTED_1000baseT*).  See include/linux/ethtool.h for definitions
+ for these bitfields. Note that you should not SET any bits, or the PHY may
+ get put into an unsupported state.
+
+ Lastly, once the controller is ready to handle network traffic, you call
+ phy_start(phydev).  This tells the PAL that you are ready, and configures the
+ PHY to connect to the network.  If you want to handle your own interrupts,
+ just set phydev->irq to PHY_IGNORE_INTERRUPT before you call phy_start.
+ Similarly, if you don't want to use interrupts, set phydev->irq to PHY_POLL.
+
+ When you want to disconnect from the network (even if just briefly), you call
+ phy_stop(phydev).
+
+Keeping Close Tabs on the PAL
+
+ It is possible that the PAL's built-in state machine needs a little help to
+ keep your network device and the PHY properly in sync.  If so, you can
+ register a helper function when connecting to the PHY, which will be called
+ every second before the state machine reacts to any changes.  To do this, you
+ need to manually call phy_attach() and phy_prepare_link(), and then call
+ phy_start_machine() with the second argument set to point to your special
+ handler.
+
+ Currently there are no examples of how to use this functionality, and testing
+ on it has been limited because the author does not have any drivers which use
+ it (they all use option 1).  So Caveat Emptor.
+
+Doing it all yourself
+
+ There's a remote chance that the PAL's built-in state machine cannot track
+ the complex interactions between the PHY and your network device.  If this is
+ so, you can simply call phy_attach(), and not call phy_start_machine or
+ phy_prepare_link().  This will mean that phydev->state is entirely yours to
+ handle (phy_start and phy_stop toggle between some of the states, so you
+ might need to avoid them).
+
+ An effort has been made to make sure that useful functionality can be
+ accessed without the state-machine running, and most of these functions are
+ descended from functions which did not interact with a complex state-machine.
+ However, again, no effort has been made so far to test running without the
+ state machine, so tryer beware.
+
+ Here is a brief rundown of the functions:
+
+ int phy_read(struct phy_device *phydev, u16 regnum);
+ int phy_write(struct phy_device *phydev, u16 regnum, u16 val);
+
+   Simple read/write primitives.  They invoke the bus's read/write function
+   pointers.
+
+ void phy_print_status(struct phy_device *phydev);
+ 
+   A convenience function to print out the PHY status neatly.
+
+ int phy_clear_interrupt(struct phy_device *phydev);
+ int phy_config_interrupt(struct phy_device *phydev, u32 interrupts);
+   
+   Clear the PHY's interrupt, and configure which ones are allowed,
+   respectively.  Currently only supports all on, or all off.
+ 
+ int phy_enable_interrupts(struct phy_device *phydev);
+ int phy_disable_interrupts(struct phy_device *phydev);
+
+   Functions which enable/disable PHY interrupts, clearing them
+   before and after, respectively.
+
+ int phy_start_interrupts(struct phy_device *phydev);
+ int phy_stop_interrupts(struct phy_device *phydev);
+
+   Requests the IRQ for the PHY interrupts, then enables them for
+   start, or disables then frees them for stop.
+
+ struct phy_device * phy_attach(struct net_device *dev, const char *phy_id,
+                u32 flags);
+
+   Attaches a network device to a particular PHY, binding the PHY to a generic
+   driver if none was found during bus initialization.  Passes in
+   any phy-specific flags as needed.
+
+ int phy_start_aneg(struct phy_device *phydev);
+   
+   Using variables inside the phydev structure, either configures advertising
+   and resets autonegotiation, or disables autonegotiation, and configures
+   forced settings.
+
+ static inline int phy_read_status(struct phy_device *phydev);
+
+   Fills the phydev structure with up-to-date information about the current
+   settings in the PHY.
+
+ void phy_sanitize_settings(struct phy_device *phydev)
+   
+   Resolves differences between currently desired settings, and
+   supported settings for the given PHY device.  Does not make
+   the changes in the hardware, though.
+
+ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd);
+ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd);
+
+   Ethtool convenience functions.
+
+ int phy_mii_ioctl(struct phy_device *phydev,
+                 struct mii_ioctl_data *mii_data, int cmd);
+
+   The MII ioctl.  Note that this function will completely screw up the state
+   machine if you write registers like BMCR, BMSR, ADVERTISE, etc.  Best to
+   use this only to write registers which are not standard, and don't set off
+   a renegotiation.
+
+
+PHY Device Drivers
+
+ With the PHY Abstraction Layer, adding support for new PHYs is
+ quite easy.  In some cases, no work is required at all!  However,
+ many PHYs require a little hand-holding to get up-and-running.
+
+Generic PHY driver
+
+ If the desired PHY doesn't have any errata, quirks, or special
+ features you want to support, then it may be best to not add
+ support, and let the PHY Abstraction Layer's Generic PHY Driver
+ do all of the work.  
+
+Writing a PHY driver
+
+ If you do need to write a PHY driver, the first thing to do is
+ make sure it can be matched with an appropriate PHY device.
+ This is done during bus initialization by reading the device's
+ UID (stored in registers 2 and 3), then comparing it to each
+ driver's phy_id field by ANDing it with each driver's
+ phy_id_mask field.  Also, it needs a name.  Here's an example:
+
+   static struct phy_driver dm9161_driver = {
+         .phy_id         = 0x0181b880,
+        .name           = "Davicom DM9161E",
+        .phy_id_mask    = 0x0ffffff0,
+        ...
+   }
+
+ Next, you need to specify what features (speed, duplex, autoneg,
+ etc) your PHY device and driver support.  Most PHYs support
+ PHY_BASIC_FEATURES, but you can look in include/mii.h for other
+ features.
+
+ Each driver consists of a number of function pointers:
+
+   config_init: configures PHY into a sane state after a reset.
+     For instance, a Davicom PHY requires descrambling disabled.
+   probe: Does any setup needed by the driver
+   suspend/resume: power management
+   config_aneg: Changes the speed/duplex/negotiation settings
+   read_status: Reads the current speed/duplex/negotiation settings
+   ack_interrupt: Clear a pending interrupt
+   config_intr: Enable or disable interrupts
+   remove: Does any driver take-down
+
+ Of these, only config_aneg and read_status are required to be
+ assigned by the driver code.  The rest are optional.  Also, it is
+ preferred to use the generic phy driver's versions of these two
+ functions if at all possible: genphy_read_status and
+ genphy_config_aneg.  If this is not possible, it is likely that
+ you only need to perform some actions before and after invoking
+ these functions, and so your functions will wrap the generic
+ ones.
+
+ Feel free to look at the Marvell, Cicada, and Davicom drivers in
+ drivers/net/phy/ for examples (the lxt and qsemi drivers have
+ not been tested as of this writing)
diff -urN linux/Documentation/networking/bonding.txt 
linux/Documentation/networking/bonding.txt
--- linux/Documentation/networking/bonding.txt  2005/08/03 15:50:23     1.16
+++ linux/Documentation/networking/bonding.txt  2005/09/15 08:52:39     1.17
@@ -1241,7 +1241,7 @@
 
        If running SNMP agents, the bonding driver should be loaded
 before any network drivers participating in a bond.  This requirement
-is due to the the interface index (ipAdEntIfIndex) being associated to
+is due to the interface index (ipAdEntIfIndex) being associated to
 the first interface found with a given IP address.  That is, there is
 only one ipAdEntIfIndex for each IP address.  For example, if eth0 and
 eth1 are slaves of bond0 and the driver for eth0 is loaded before the
@@ -1937,7 +1937,7 @@
        If not explicitly configured (with ifconfig or ip link), the
 MAC address of the bonding device is taken from its first slave
 device.  This MAC address is then passed to all following slaves and
-remains persistent (even if the the first slave is removed) until the
+remains persistent (even if the first slave is removed) until the
 bonding device is brought down or reconfigured.
 
        If you wish to change the MAC address, you can set it with
diff -urN linux/Documentation/networking/wan-router.txt 
linux/Documentation/networking/wan-router.txt
--- linux/Documentation/networking/wan-router.txt       2003/06/05 00:04:29     
1.9
+++ linux/Documentation/networking/wan-router.txt       2005/09/15 08:52:39     
1.10
@@ -355,7 +355,7 @@
                                There is no functional difference between the 
two packages         
 
 2.0.7   Aug 26, 1999           o  Merged X25API code into WANPIPE.
-                               o  Fixed a memeory leak for X25API
+                               o  Fixed a memory leak for X25API
                                o  Updated the X25API code for 2.2.X kernels.
                                o  Improved NEM handling.   
 
@@ -514,7 +514,7 @@
                                o Patches for 2.4.0 kernel
                                o Patches for 2.2.18 kernel
                                o Minor updates to PPP and CHLDC drivers.
-                                 Note: No functinal difference. 
+                                 Note: No functional difference.
 
 beta3-2.2.9    Jan 10 2001
                                o I missed the 2.2.18 kernel patches in 
beta2-2.2.0
diff -urN linux/Documentation/power/swsusp-dmcrypt.txt 
linux/Documentation/power/swsusp-dmcrypt.txt
--- linux/Documentation/power/swsusp-dmcrypt.txt        1970/01/01 00:00:00
+++ linux/Documentation/power/swsusp-dmcrypt.txt        2005-09-15 
09:52:39.464494000 +0100     1.1
@@ -0,0 +1,138 @@
+Author: Andreas Steinmetz <ast@domdv.de>
+
+
+How to use dm-crypt and swsusp together:
+========================================
+
+Some prerequisites:
+You know how dm-crypt works. If not, visit the following web page:
+http://www.saout.de/misc/dm-crypt/
+You have read Documentation/power/swsusp.txt and understand it.
+You did read Documentation/initrd.txt and know how an initrd works.
+You know how to create or how to modify an initrd.
+
+Now your system is properly set up, your disk is encrypted except for
+the swap device(s) and the boot partition which may contain a mini
+system for crypto setup and/or rescue purposes. You may even have
+an initrd that does your current crypto setup already.
+
+At this point you want to encrypt your swap, too. Still you want to
+be able to suspend using swsusp. This, however, means that you
+have to be able to either enter a passphrase or that you read
+the key(s) from an external device like a pcmcia flash disk
+or an usb stick prior to resume. So you need an initrd, that sets
+up dm-crypt and then asks swsusp to resume from the encrypted
+swap device.
+
+The most important thing is that you set up dm-crypt in such
+a way that the swap device you suspend to/resume from has
+always the same major/minor within the initrd as well as
+within your running system. The easiest way to achieve this is
+to always set up this swap device first with dmsetup, so that
+it will always look like the following:
+
+brw-------  1 root root 254, 0 Jul 28 13:37 /dev/mapper/swap0
+
+Now set up your kernel to use /dev/mapper/swap0 as the default
+resume partition, so your kernel .config contains:
+
+CONFIG_PM_STD_PARTITION="/dev/mapper/swap0"
+
+Prepare your boot loader to use the initrd you will create or
+modify. For lilo the simplest setup looks like the following
+lines:
+
+image=/boot/vmlinuz
+initrd=/boot/initrd.gz
+label=linux
+append="root=/dev/ram0 init=/linuxrc rw"
+
+Finally you need to create or modify your initrd. Lets assume
+you create an initrd that reads the required dm-crypt setup
+from a pcmcia flash disk card. The card is formatted with an ext2
+fs which resides on /dev/hde1 when the card is inserted. The
+card contains at least the encrypted swap setup in a file
+named "swapkey". /etc/fstab of your initrd contains something
+like the following:
+
+/dev/hda1   /mnt    ext3      ro                            0 0
+none        /proc   proc      defaults,noatime,nodiratime   0 0
+none        /sys    sysfs     defaults,noatime,nodiratime   0 0
+
+/dev/hda1 contains an unencrypted mini system that sets up all
+of your crypto devices, again by reading the setup from the
+pcmcia flash disk. What follows now is a /linuxrc for your
+initrd that allows you to resume from encrypted swap and that
+continues boot with your mini system on /dev/hda1 if resume
+does not happen:
+
+#!/bin/sh
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+mount /proc
+mount /sys
+mapped=0
+noresume=`grep -c noresume /proc/cmdline`
+if [ "$*" != "" ]
+then
+  noresume=1
+fi
+dmesg -n 1
+/sbin/cardmgr -q
+for i in 1 2 3 4 5 6 7 8 9 0
+do
+  if [ -f /proc/ide/hde/media ]
+  then
+    usleep 500000
+    mount -t ext2 -o ro /dev/hde1 /mnt
+    if [ -f /mnt/swapkey ]
+    then
+      dmsetup create swap0 /mnt/swapkey > /dev/null 2>&1 && mapped=1
+    fi
+    umount /mnt
+    break
+  fi
+  usleep 500000
+done
+killproc /sbin/cardmgr
+dmesg -n 6
+if [ $mapped = 1 ]
+then
+  if [ $noresume != 0 ]
+  then
+    mkswap /dev/mapper/swap0 > /dev/null 2>&1
+  fi
+  echo 254:0 > /sys/power/resume
+  dmsetup remove swap0
+fi
+umount /sys
+mount /mnt
+umount /proc
+cd /mnt
+pivot_root . mnt
+mount /proc
+umount -l /mnt
+umount /proc
+exec chroot . /sbin/init $* < dev/console > dev/console 2>&1
+
+Please don't mind the weird loop above, busybox's msh doesn't know
+the let statement. Now, what is happening in the script?
+First we have to decide if we want to try to resume, or not.
+We will not resume if booting with "noresume" or any parameters
+for init like "single" or "emergency" as boot parameters.
+
+Then we need to set up dmcrypt with the setup data from the
+pcmcia flash disk. If this succeeds we need to reset the swap
+device if we don't want to resume. The line "echo 254:0 > /sys/power/resume"
+then attempts to resume from the first device mapper device.
+Note that it is important to set the device in /sys/power/resume,
+regardless if resuming or not, otherwise later suspend will fail.
+If resume starts, script execution terminates here.
+
+Otherwise we just remove the encrypted swap device and leave it to the
+mini system on /dev/hda1 to set the whole crypto up (it is up to
+you to modify this to your taste).
+
+What then follows is the well known process to change the root
+file system and continue booting from there. I prefer to unmount
+the initrd prior to continue booting but it is up to you to modify
+this.
diff -urN linux/Documentation/power/swsusp.txt 
linux/Documentation/power/swsusp.txt
--- linux/Documentation/power/swsusp.txt        2005/07/11 20:45:56     1.9
+++ linux/Documentation/power/swsusp.txt        2005/09/15 08:52:39     1.10
@@ -1,22 +1,20 @@
-From kernel/suspend.c:
+Some warnings, first.
 
  * BIG FAT WARNING *********************************************************
  *
- * If you have unsupported (*) devices using DMA...
- *                             ...say goodbye to your data.
- *
  * If you touch anything on disk between suspend and resume...
  *                             ...kiss your data goodbye.
  *
- * If your disk driver does not support suspend... (IDE does)
- *                             ...you'd better find out how to get along
- *                                without your data.
- *
- * If you change kernel command line between suspend and resume...
- *                             ...prepare for nasty fsck or worse.
+ * If you do resume from initrd after your filesystems are mounted...
+ *                             ...bye bye root partition.
+ *                     [this is actually same case as above]
  *
- * If you change your hardware while system is suspended...
- *                             ...well, it was not good idea.
+ * If you have unsupported (*) devices using DMA, you may have some
+ * problems. If your disk driver does not support suspend... (IDE does),
+ * it may cause some problems, too. If you change kernel command line
+ * between suspend and resume, it may do something wrong. If you change
+ * your hardware while system is suspended... well, it was not good idea;
+ * but it will probably only crash.
  *
  * (*) suspend/resume support is needed to make it safe.
 
@@ -30,6 +28,13 @@
 echo platform > /sys/power/disk; echo disk > /sys/power/state
 
 
+Encrypted suspend image:
+------------------------
+If you want to store your suspend image encrypted with a temporary
+key to prevent data gathering after resume you must compile
+crypto and the aes algorithm into the kernel - modules won't work
+as they cannot be loaded at resume time.
+
 
 Article about goals and implementation of Software Suspend for Linux
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -85,11 +90,6 @@
 You have your server on UPS. Power died, and UPS is indicating 30
 seconds to failure. What do you do? Suspend to disk.
 
-Ethernet card in your server died. You want to replace it. Your
-server is not hotplug capable. What do you do? Suspend to disk,
-replace ethernet card, resume. If you are fast your users will not
-even see broken connections.
-
 
 Q: Maybe I'm missing something, but why don't the regular I/O paths work?
 
@@ -117,31 +117,6 @@
 
 A: Yes. That's what echo platform > /sys/power/disk does.
 
-Q: My machine doesn't work with ACPI. How can I use swsusp than ?
-
-A: Do a reboot() syscall with right parameters. Warning: glibc gets in
-its way, so check with strace:
-
-reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, 0xd000fce2)
-
-(Thanks to Peter Osterlund:)
-
-#include <unistd.h>
-#include <syscall.h>
-
-#define LINUX_REBOOT_MAGIC1     0xfee1dead
-#define LINUX_REBOOT_MAGIC2     672274793
-#define LINUX_REBOOT_CMD_SW_SUSPEND     0xD000FCE2
-
-int main()
-{
-    syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
-            LINUX_REBOOT_CMD_SW_SUSPEND, 0);
-    return 0;
-}
-
-Also /sys/ interface should be still present.
-
 Q: What is 'suspend2'?
 
 A: suspend2 is 'Software Suspend 2', a forked implementation of
@@ -311,3 +286,46 @@
 system is shut down or suspended. Additionally use the encrypted
 suspend image to prevent sensitive data from being stolen after
 resume.
+
+Q: Why can't we suspend to a swap file?
+
+A: Because accessing swap file needs the filesystem mounted, and
+filesystem might do something wrong (like replaying the journal)
+during mount.
+
+There are few ways to get that fixed:
+
+1) Probably could be solved by modifying every filesystem to support
+some kind of "really read-only!" option. Patches welcome.
+
+2) suspend2 gets around that by storing absolute positions in on-disk
+image (and blocksize), with resume parameter pointing directly to
+suspend header.
+
+Q: Is there a maximum system RAM size that is supported by swsusp?
+
+A: It should work okay with highmem.
+
+Q: Does swsusp (to disk) use only one swap partition or can it use
+multiple swap partitions (aggregate them into one logical space)?
+
+A: Only one swap partition, sorry.
+
+Q: If my application(s) causes lots of memory & swap space to be used
+(over half of the total system RAM), is it correct that it is likely
+to be useless to try to suspend to disk while that app is running?
+
+A: No, it should work okay, as long as your app does not mlock()
+it. Just prepare big enough swap partition.
+
+Q: What information is usefull for debugging suspend-to-disk problems?
+
+A: Well, last messages on the screen are always useful. If something
+is broken, it is usually some kernel driver, therefore trying with as
+little as possible modules loaded helps a lot. I also prefer people to
+suspend from console, preferably without X running. Booting with
+init=/bin/bash, then swapon and starting suspend sequence manually
+usually does the trick. Then it is good idea to try with latest
+vanilla kernel.
+
+
diff -urN linux/Documentation/power/video.txt 
linux/Documentation/power/video.txt
--- linux/Documentation/power/video.txt 2005/07/13 11:48:49     1.10
+++ linux/Documentation/power/video.txt 2005/09/15 08:52:39     1.11
@@ -46,6 +46,12 @@
   POSTing bios works. Ole Rohne has patch to do just that at
   http://dev.gentoo.org/~marineam/patch-radeonfb-2.6.11-rc2-mm2.
 
+(8) on some systems, you can use the video_post utility mentioned here:
+  http://bugzilla.kernel.org/show_bug.cgi?id=3670. Do echo 3 > /sys/power/state
+  && /usr/sbin/video_post - which will initialize the display in console mode.
+  If  you are in X, you can switch to a virtual terminal and back to X using
+  CTRL+ALT+F1 - CTRL+ALT+F7 to get the display working in graphical mode again.
+
 Now, if you pass acpi_sleep=something, and it does not work with your
 bios, you'll get a hard crash during resume. Be careful. Also it is
 safest to do your experiments with plain old VGA console. The vesafb
@@ -64,7 +70,8 @@
 ------------------------------------------------------------------------------
 Acer Aspire 1406LC             ole's late BIOS init (7), turn off DRI
 Acer TM 242FX                  vbetool (6)
-Acer TM C300                    vga=normal (only suspend on console, not in 
X), vbetool (6)
+Acer TM C110                   video_post (8)
+Acer TM C300                    vga=normal (only suspend on console, not in 
X), vbetool (6) or video_post (8)
 Acer TM 4052LCi                        s3_bios (2)
 Acer TM 636Lci                 s3_bios vga=normal (2)
 Acer TM 650 (Radeon M7)                vga=normal plus boot-radeon (5) gets 
text console back
@@ -113,6 +120,7 @@
 IBM TP X20                     ??? (*)
 IBM TP X30                     s3_bios (2)
 IBM TP X31 / Type 2672-XXH      none (1), use radeontool 
(http://fdd.com/software/radeon/) to turn off backlight.
+IBM TP X32                     none (1), but backlight is on and video is 
trashed after long suspend
 IBM Thinkpad X40 Type 2371-7JG  s3_bios,s3_mode (4)
 Medion MD4220                  ??? (*)
 Samsung P35                    vbetool needed (6)
diff -urN linux/Documentation/powerpc/eeh-pci-error-recovery.txt 
linux/Documentation/powerpc/eeh-pci-error-recovery.txt
--- linux/Documentation/powerpc/eeh-pci-error-recovery.txt      2005/01/25 
04:27:51     1.1
+++ linux/Documentation/powerpc/eeh-pci-error-recovery.txt      2005/09/15 
08:52:39     1.2
@@ -134,7 +134,7 @@
 with that address (if any).
 
 The default include/asm-ppc64/io.h macros readb(), inb(), insb(),
-etc. include a check to see if the the i/o read returned all-0xff's.
+etc. include a check to see if the i/o read returned all-0xff's.
 If so, these make a call to eeh_dn_check_failure(), which in turn
 asks the firmware if the all-ff's value is the sign of a true EEH
 error.  If it is not, processing continues as normal.  The grand
diff -urN linux/Documentation/s390/s390dbf.txt 
linux/Documentation/s390/s390dbf.txt
--- linux/Documentation/s390/s390dbf.txt        2005/07/11 20:45:56     1.8
+++ linux/Documentation/s390/s390dbf.txt        2005/09/15 08:52:39     1.9
@@ -468,7 +468,7 @@
 The raw view returns a bytestream as the debug areas are stored in memory.
 
 The sprintf view formats the debug entries in the same way as the sprintf
-function would do. The sprintf event/expection fuctions write to the 
+function would do. The sprintf event/expection functions write to the
 debug entry a pointer to the format string (size = sizeof(long)) 
 and for each vararg a long value. So e.g. for a debug entry with a format 
 string plus two varargs one would need to allocate a (3 * sizeof(long)) 
diff -urN linux/Documentation/scsi/scsi_eh.txt 
linux/Documentation/scsi/scsi_eh.txt
--- linux/Documentation/scsi/scsi_eh.txt        1970/01/01 00:00:00
+++ linux/Documentation/scsi/scsi_eh.txt        2005-09-15 09:52:39.770509000 
+0100     1.1
@@ -0,0 +1,479 @@
+
+SCSI EH
+======================================
+
+ This document describes SCSI midlayer error handling infrastructure.
+Please refer to Documentation/scsi/scsi_mid_low_api.txt for more
+information regarding SCSI midlayer.
+
+TABLE OF CONTENTS
+
+[1] How SCSI commands travel through the midlayer and to EH
+    [1-1] struct scsi_cmnd
+    [1-2] How do scmd's get completed?
+       [1-2-1] Completing a scmd w/ scsi_done
+       [1-2-2] Completing a scmd w/ timeout
+    [1-3] How EH takes over
+[2] How SCSI EH works
+    [2-1] EH through fine-grained callbacks
+       [2-1-1] Overview
+       [2-1-2] Flow of scmds through EH
+       [2-1-3] Flow of control
+    [2-2] EH through hostt->eh_strategy_handler()
+       [2-2-1] Pre hostt->eh_strategy_handler() SCSI midlayer conditions
+       [2-2-2] Post hostt->eh_strategy_handler() SCSI midlayer conditions
+       [2-2-3] Things to consider
+
+
+[1] How SCSI commands travel through the midlayer and to EH
+
+[1-1] struct scsi_cmnd
+
+ Each SCSI command is represented with struct scsi_cmnd (== scmd).  A
+scmd has two list_head's to link itself into lists.  The two are
+scmd->list and scmd->eh_entry.  The former is used for free list or
+per-device allocated scmd list and not of much interest to this EH
+discussion.  The latter is used for completion and EH lists and unless
+otherwise stated scmds are always linked using scmd->eh_entry in this
+discussion.
+
+
+[1-2] How do scmd's get completed?
+
+ Once LLDD gets hold of a scmd, either the LLDD will complete the
+command by calling scsi_done callback passed from midlayer when
+invoking hostt->queuecommand() or SCSI midlayer will time it out.
+
+
+[1-2-1] Completing a scmd w/ scsi_done
+
+ For all non-EH commands, scsi_done() is the completion callback.  It
+does the following.
+
+ 1. Delete timeout timer.  If it fails, it means that timeout timer
+    has expired and is going to finish the command.  Just return.
+
+ 2. Link scmd to per-cpu scsi_done_q using scmd->en_entry
+
+ 3. Raise SCSI_SOFTIRQ
+
+ SCSI_SOFTIRQ handler scsi_softirq calls scsi_decide_disposition() to
+determine what to do with the command.  scsi_decide_disposition()
+looks at the scmd->result value and sense data to determine what to do
+with the command.
+
+ - SUCCESS
+       scsi_finish_command() is invoked for the command.  The
+       function does some maintenance choirs and notify completion by
+       calling scmd->done() callback, which, for fs requests, would
+       be HLD completion callback - sd:sd_rw_intr, sr:rw_intr,
+       st:st_intr.
+
+ - NEEDS_RETRY
+ - ADD_TO_MLQUEUE
+       scmd is requeued to blk queue.
+
+ - otherwise
+       scsi_eh_scmd_add(scmd, 0) is invoked for the command.  See
+       [1-3] for details of this funciton.
+
+
+[1-2-2] Completing a scmd w/ timeout
+
+ The timeout handler is scsi_times_out().  When a timeout occurs, this
+function
+
+ 1. invokes optional hostt->eh_timedout() callback.  Return value can
+    be one of
+
+    - EH_HANDLED
+       This indicates that eh_timedout() dealt with the timeout.  The
+       scmd is passed to __scsi_done() and thus linked into per-cpu
+       scsi_done_q.  Normal command completion described in [1-2-1]
+       follows.
+
+    - EH_RESET_TIMER
+       This indicates that more time is required to finish the
+       command.  Timer is restarted.  This action is counted as a
+       retry and only allowed scmd->allowed + 1(!) times.  Once the
+       limit is reached, action for EH_NOT_HANDLED is taken instead.
+
+       *NOTE* This action is racy as the LLDD could finish the scmd
+       after the timeout has expired but before it's added back.  In
+       such cases, scsi_done() would think that timeout has occurred
+       and return without doing anything.  We lose completion and the
+       command will time out again.
+
+    - EH_NOT_HANDLED
+       This is the same as when eh_timedout() callback doesn't exist.
+       Step #2 is taken.
+
+ 2. scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD) is invoked for the
+    command.  See [1-3] for more information.
+
+
+[1-3] How EH takes over
+
+ scmds enter EH via scsi_eh_scmd_add(), which does the following.
+
+ 1. Turns on scmd->eh_eflags as requested.  It's 0 for error
+    completions and SCSI_EH_CANCEL_CMD for timeouts.
+
+ 2. Links scmd->eh_entry to shost->eh_cmd_q
+
+ 3. Sets SHOST_RECOVERY bit in shost->shost_state
+
+ 4. Increments shost->host_failed
+
+ 5. Wakes up SCSI EH thread if shost->host_busy == shost->host_failed
+
+ As can be seen above, once any scmd is added to shost->eh_cmd_q,
+SHOST_RECOVERY shost_state bit is turned on.  This prevents any new
+scmd to be issued from blk queue to the host; eventually, all scmds on
+the host either complete normally, fail and get added to eh_cmd_q, or
+time out and get added to shost->eh_cmd_q.
+
+ If all scmds either complete or fail, the number of in-flight scmds
+becomes equal to the number of failed scmds - i.e. shost->host_busy ==
+shost->host_failed.  This wakes up SCSI EH thread.  So, once woken up,
+SCSI EH thread can expect that all in-flight commands have failed and
+are linked on shost->eh_cmd_q.
+
+ Note that this does not mean lower layers are quiescent.  If a LLDD
+completed a scmd with error status, the LLDD and lower layers are
+assumed to forget about the scmd at that point.  However, if a scmd
+has timed out, unless hostt->eh_timedout() made lower layers forget
+about the scmd, which currently no LLDD does, the command is still
+active as long as lower layers are concerned and completion could
+occur at any time.  Of course, all such completions are ignored as the
+timer has already expired.
+
+ We'll talk about how SCSI EH takes actions to abort - make LLDD
+forget about - timed out scmds later.
+
+
+[2] How SCSI EH works
+
+ LLDD's can implement SCSI EH actions in one of the following two
+ways.
+
+ - Fine-grained EH callbacks
+       LLDD can implement fine-grained EH callbacks and let SCSI
+       midlayer drive error handling and call appropriate callbacks.
+       This will be dicussed further in [2-1].
+
+ - eh_strategy_handler() callback
+       This is one big callback which should perform whole error
+       handling.  As such, it should do all choirs SCSI midlayer
+       performs during recovery.  This will be discussed in [2-2].
+
+ Once recovery is complete, SCSI EH resumes normal operation by
+calling scsi_restart_operations(), which
+
+ 1. Checks if door locking is needed and locks door.
+
+ 2. Clears SHOST_RECOVERY shost_state bit
+
+ 3. Wakes up waiters on shost->host_wait.  This occurs if someone
+    calls scsi_block_when_processing_errors() on the host.
+    (*QUESTION* why is it needed?  All operations will be blocked
+    anyway after it reaches blk queue.)
+
+ 4. Kicks queues in all devices on the host in the asses
+
+
+[2-1] EH through fine-grained callbacks
+
+[2-1-1] Overview
+
+ If eh_strategy_handler() is not present, SCSI midlayer takes charge
+of driving error handling.  EH's goals are two - make LLDD, host and
+device forget about timed out scmds and make them ready for new
+commands.  A scmd is said to be recovered if the scmd is forgotten by
+lower layers and lower layers are ready to process or fail the scmd
+again.
+
+ To achieve these goals, EH performs recovery actions with increasing
+severity.  Some actions are performed by issueing SCSI commands and
+others are performed by invoking one of the following fine-grained
+hostt EH callbacks.  Callbacks may be omitted and omitted ones are
+considered to fail always.
+
+int (* eh_abort_handler)(struct scsi_cmnd *);
+int (* eh_device_reset_handler)(struct scsi_cmnd *);
+int (* eh_bus_reset_handler)(struct scsi_cmnd *);
+int (* eh_host_reset_handler)(struct scsi_cmnd *);
+
+ Higher-severity actions are taken only when lower-severity actions
+cannot recover some of failed scmds.  Also, note that failure of the
+highest-severity action means EH failure and results in offlining of
+all unrecovered devices.
+
+ During recovery, the following rules are followed
+
+ - Recovery actions are performed on failed scmds on the to do list,
+   eh_work_q.  If a recovery action succeeds for a scmd, recovered
+   scmds are removed from eh_work_q.
+
+   Note that single recovery action on a scmd can recover multiple
+   scmds.  e.g. resetting a device recovers all failed scmds on the
+   device.
+
+ - Higher severity actions are taken iff eh_work_q is not empty after
+   lower severity actions are complete.
+
+ - EH reuses failed scmds to issue commands for recovery.  For
+   timed-out scmds, SCSI EH ensures that LLDD forgets about a scmd
+   before reusing it for EH commands.
+
+ When a scmd is recovered, the scmd is moved from eh_work_q to EH
+local eh_done_q using scsi_eh_finish_cmd().  After all scmds are
+recovered (eh_work_q is empty), scsi_eh_flush_done_q() is invoked to
+either retry or error-finish (notify upper layer of failure) recovered
+scmds.
+
+ scmds are retried iff its sdev is still online (not offlined during
+EH), REQ_FAILFAST is not set and ++scmd->retries is less than
+scmd->allowed.
+
+
+[2-1-2] Flow of scmds through EH
+
+ 1. Error completion / time out
+    ACTION: scsi_eh_scmd_add() is invoked for scmd
+       - set scmd->eh_eflags
+       - add scmd to shost->eh_cmd_q
+       - set SHOST_RECOVERY
+       - shost->host_failed++
+    LOCKING: shost->host_lock
+
+ 2. EH starts
+    ACTION: move all scmds to EH's local eh_work_q.  shost->eh_cmd_q
+           is cleared.
+    LOCKING: shost->host_lock (not strictly necessary, just for
+             consistency)
+
+ 3. scmd recovered
+    ACTION: scsi_eh_finish_cmd() is invoked to EH-finish scmd
+       - shost->host_failed--
+       - clear scmd->eh_eflags
+       - scsi_setup_cmd_retry()
+       - move from local eh_work_q to local eh_done_q
+    LOCKING: none
+
+ 4. EH completes
+    ACTION: scsi_eh_flush_done_q() retries scmds or notifies upper
+           layer of failure.
+       - scmd is removed from eh_done_q and scmd->eh_entry is cleared
+       - if retry is necessary, scmd is requeued using
+          scsi_queue_insert()
+       - otherwise, scsi_finish_command() is invoked for scmd
+    LOCKING: queue or finish function performs appropriate locking
+
+
+[2-1-3] Flow of control
+
+ EH through fine-grained callbacks start from scsi_unjam_host().
+
+<<scsi_unjam_host>>
+
+    1. Lock shost->host_lock, splice_init shost->eh_cmd_q into local
+       eh_work_q and unlock host_lock.  Note that shost->eh_cmd_q is
+       cleared by this action.
+
+    2. Invoke scsi_eh_get_sense.
+
+    <<scsi_eh_get_sense>>
+
+       This action is taken for each error-completed
+       (!SCSI_EH_CANCEL_CMD) commands without valid sense data.  Most
+       SCSI transports/LLDDs automatically acquire sense data on
+       command failures (autosense).  Autosense is recommended for
+       performance reasons and as sense information could get out of
+       sync inbetween occurrence of CHECK CONDITION and this action.
+
+       Note that if autosense is not supported, scmd->sense_buffer
+       contains invalid sense data when error-completing the scmd
+       with scsi_done().  scsi_decide_disposition() always returns
+       FAILED in such cases thus invoking SCSI EH.  When the scmd
+       reaches here, sense data is acquired and
+       scsi_decide_disposition() is called again.
+
+       1. Invoke scsi_request_sense() which issues REQUEST_SENSE
+           command.  If fails, no action.  Note that taking no action
+           causes higher-severity recovery to be taken for the scmd.
+
+       2. Invoke scsi_decide_disposition() on the scmd
+
+          - SUCCESS
+               scmd->retries is set to scmd->allowed preventing
+               scsi_eh_flush_done_q() from retrying the scmd and
+               scsi_eh_finish_cmd() is invoked.
+
+          - NEEDS_RETRY
+               scsi_eh_finish_cmd() invoked
+
+          - otherwise
+               No action.
+
+    3. If !list_empty(&eh_work_q), invoke scsi_eh_abort_cmds().
+
+    <<scsi_eh_abort_cmds>>
+
+       This action is taken for each timed out command.
+       hostt->eh_abort_handler() is invoked for each scmd.  The
+       handler returns SUCCESS if it has succeeded to make LLDD and
+       all related hardware forget about the scmd.
+
+       If a timedout scmd is successfully aborted and the sdev is
+       either offline or ready, scsi_eh_finish_cmd() is invoked for
+       the scmd.  Otherwise, the scmd is left in eh_work_q for
+       higher-severity actions.
+
+       Note that both offline and ready status mean that the sdev is
+       ready to process new scmds, where processing also implies
+       immediate failing; thus, if a sdev is in one of the two
+       states, no further recovery action is needed.
+
+       Device readiness is tested using scsi_eh_tur() which issues
+       TEST_UNIT_READY command.  Note that the scmd must have been
+       aborted successfully before reusing it for TEST_UNIT_READY.
+
+    4. If !list_empty(&eh_work_q), invoke scsi_eh_ready_devs()
+
+    <<scsi_eh_ready_devs>>
+
+       This function takes four increasingly more severe measures to
+       make failed sdevs ready for new commands.
+
+       1. Invoke scsi_eh_stu()
+
+       <<scsi_eh_stu>>
+
+           For each sdev which has failed scmds with valid sense data
+           of which scsi_check_sense()'s verdict is FAILED,
+           START_STOP_UNIT command is issued w/ start=1.  Note that
+           as we explicitly choose error-completed scmds, it is known
+           that lower layers have forgotten about the scmd and we can
+           reuse it for STU.
+
+           If STU succeeds and the sdev is either offline or ready,
+           all failed scmds on the sdev are EH-finished with
+           scsi_eh_finish_cmd().
+
+           *NOTE* If hostt->eh_abort_handler() isn't implemented or
+           failed, we may still have timed out scmds at this point
+           and STU doesn't make lower layers forget about those
+           scmds.  Yet, this function EH-finish all scmds on the sdev
+           if STU succeeds leaving lower layers in an inconsistent
+           state.  It seems that STU action should be taken only when
+           a sdev has no timed out scmd.
+
+       2. If !list_empty(&eh_work_q), invoke scsi_eh_bus_device_reset().
+
+       <<scsi_eh_bus_device_reset>>
+
+           This action is very similar to scsi_eh_stu() except that,
+           instead of issuing STU, hostt->eh_device_reset_handler()
+           is used.  Also, as we're not issuing SCSI commands and
+           resetting clears all scmds on the sdev, there is no need
+           to choose error-completed scmds.
+
+       3. If !list_empty(&eh_work_q), invoke scsi_eh_bus_reset()
+
+       <<scsi_eh_bus_reset>>
+
+           hostt->eh_bus_reset_handler() is invoked for each channel
+           with failed scmds.  If bus reset succeeds, all failed
+           scmds on all ready or offline sdevs on the channel are
+           EH-finished.
+
+       4. If !list_empty(&eh_work_q), invoke scsi_eh_host_reset()
+
+       <<scsi_eh_host_reset>>
+
+           This is the last resort.  hostt->eh_host_reset_handler()
+           is invoked.  If host reset succeeds, all failed scmds on
+           all ready or offline sdevs on the host are EH-finished.
+
+       5. If !list_empty(&eh_work_q), invoke scsi_eh_offline_sdevs()
+
+       <<scsi_eh_offline_sdevs>>
+
+           Take all sdevs which still have unrecovered scmds offline
+           and EH-finish the scmds.
+
+    5. Invoke scsi_eh_flush_done_q().
+
+       <<scsi_eh_flush_done_q>>
+
+           At this point all scmds are recovered (or given up) and
+           put on eh_done_q by scsi_eh_finish_cmd().  This function
+           flushes eh_done_q by either retrying or notifying upper
+           layer of failure of the scmds.
+
+
+[2-2] EH through hostt->eh_strategy_handler()
+
+ hostt->eh_strategy_handler() is invoked in the place of
+scsi_unjam_host() and it is responsible for whole recovery process.
+On completion, the handler should have made lower layers forget about
+all failed scmds and either ready for new commands or offline.  Also,
+it should perform SCSI EH maintenance choirs to maintain integrity of
+SCSI midlayer.  IOW, of the steps described in [2-1-2], all steps
+except for #1 must be implemented by eh_strategy_handler().
+
+
+[2-2-1] Pre hostt->eh_strategy_handler() SCSI midlayer conditions
+
+ The following conditions are true on entry to the handler.
+
+ - Each failed scmd's eh_flags field is set appropriately.
+
+ - Each failed scmd is linked on scmd->eh_cmd_q by scmd->eh_entry.
+
+ - SHOST_RECOVERY is set.
+
+ - shost->host_failed == shost->host_busy
+
+
+[2-2-2] Post hostt->eh_strategy_handler() SCSI midlayer conditions
+
+ The following conditions must be true on exit from the handler.
+
+ - shost->host_failed is zero.
+
+ - Each scmd's eh_eflags field is cleared.
+
+ - Each scmd is in such a state that scsi_setup_cmd_retry() on the
+   scmd doesn't make any difference.
+
+ - shost->eh_cmd_q is cleared.
+
+ - Each scmd->eh_entry is cleared.
+
+ - Either scsi_queue_insert() or scsi_finish_command() is called on
+   each scmd.  Note that the handler is free to use scmd->retries and
+   ->allowed to limit the number of retries.
+
+
+[2-2-3] Things to consider
+
+ - Know that timed out scmds are still active on lower layers.  Make
+   lower layers forget about them before doing anything else with
+   those scmds.
+
+ - For consistency, when accessing/modifying shost data structure,
+   grab shost->host_lock.
+
+ - On completion, each failed sdev must have forgotten about all
+   active scmds.
+
+ - On completion, each failed sdev must be ready for new commands or
+   offline.
+
+
+--
+Tejun Heo
+htejun@gmail.com
+11th September 2005
diff -urN linux/Documentation/scsi/00-INDEX linux/Documentation/scsi/00-INDEX
--- linux/Documentation/scsi/00-INDEX   2004/06/06 02:12:33     1.2
+++ linux/Documentation/scsi/00-INDEX   2005/09/15 08:52:39     1.3
@@ -60,6 +60,8 @@
        - short blurb on using SCSI support as a module.
 scsi_mid_low_api.txt
        - info on API between SCSI layer and low level drivers
+scsi_eh.txt
+       - info on SCSI midlayer error handling infrastructure
 st.txt
        - info on scsi tape driver
 sym53c500_cs.txt
diff -urN linux/Documentation/scsi/aic7xxx.txt 
linux/Documentation/scsi/aic7xxx.txt
--- linux/Documentation/scsi/aic7xxx.txt        2004/03/11 16:46:40     1.7
+++ linux/Documentation/scsi/aic7xxx.txt        2005/09/15 08:52:39     1.8
@@ -1,5 +1,5 @@
 ====================================================================
-=    Adaptec Aic7xxx Fast -> Ultra160 Family Manager Set v6.2.28   =
+=    Adaptec Aic7xxx Fast -> Ultra160 Family Manager Set v7.0      =
 =                            README for                            =
 =                     The Linux Operating System                   =
 ====================================================================
@@ -131,6 +131,10 @@
       SCSI "stub" effects.
 
 2. Version History
+   7.0   (4th August, 2005)
+       - Updated driver to use SCSI transport class infrastructure
+       - Upported sequencer and core fixes from last adaptec released
+         version of the driver.
    6.2.36 (June 3rd, 2003)
         - Correct code that disables PCI parity error checking.
         - Correct and simplify handling of the ignore wide residue
diff -urN linux/Documentation/scsi/ibmmca.txt 
linux/Documentation/scsi/ibmmca.txt
--- linux/Documentation/scsi/ibmmca.txt 2003/06/05 00:04:29     1.4
+++ linux/Documentation/scsi/ibmmca.txt 2005/09/15 08:52:39     1.5
@@ -344,7 +344,7 @@
    /proc/scsi/ibmmca/<host_no>. ibmmca_proc_info() provides this information.
    
    This table is quite informative for interested users. It shows the load
-   of commands on the subsystem and wether you are running the bypassed 
+   of commands on the subsystem and whether you are running the bypassed
    (software) or integrated (hardware) SCSI-command set (see below). The
    amount of accesses is shown. Read, write, modeselect is shown separately
    in order to help debugging problems with CD-ROMs or tapedrives.
diff -urN linux/Documentation/scsi/scsi_mid_low_api.txt 
linux/Documentation/scsi/scsi_mid_low_api.txt
--- linux/Documentation/scsi/scsi_mid_low_api.txt       2005/08/01 18:23:36     
1.17
+++ linux/Documentation/scsi/scsi_mid_low_api.txt       2005/09/15 08:52:39     
1.18
@@ -373,13 +373,11 @@
    scsi_activate_tcq - turn on tag command queueing
    scsi_add_device - creates new scsi device (lu) instance
    scsi_add_host - perform sysfs registration and SCSI bus scan.
-   scsi_add_timer - (re-)start timer on a SCSI command.
    scsi_adjust_queue_depth - change the queue depth on a SCSI device
    scsi_assign_lock - replace default host_lock with given lock
    scsi_bios_ptable - return copy of block device's partition table
    scsi_block_requests - prevent further commands being queued to given host
    scsi_deactivate_tcq - turn off tag command queueing
-   scsi_delete_timer - cancel timer on a SCSI command.
    scsi_host_alloc - return a new scsi_host instance whose refcount==1
    scsi_host_get - increments Scsi_Host instance's refcount
    scsi_host_put - decrements Scsi_Host instance's refcount (free if 0)
@@ -458,27 +456,6 @@
 
 
 /**
- * scsi_add_timer - (re-)start timer on a SCSI command.
- * @scmd:    pointer to scsi command instance
- * @timeout: duration of timeout in "jiffies"
- * @complete: pointer to function to call if timeout expires
- *
- *      Returns nothing
- *
- *      Might block: no
- *
- *      Notes: Each scsi command has its own timer, and as it is added
- *      to the queue, we set up the timer. When the command completes, 
- *      we cancel the timer. An LLD can use this function to change
- *      the existing timeout value.
- *
- *      Defined in: drivers/scsi/scsi_error.c
- **/
-void scsi_add_timer(struct scsi_cmnd *scmd, int timeout, 
-                    void (*complete)(struct scsi_cmnd *))
-
-
-/**
  * scsi_adjust_queue_depth - allow LLD to change queue depth on a SCSI device
  * @sdev:       pointer to SCSI device to change queue depth on
  * @tagged:     0 - no tagged queuing
@@ -566,24 +543,6 @@
 
 
 /**
- * scsi_delete_timer - cancel timer on a SCSI command.
- * @scmd:    pointer to scsi command instance
- *
- *      Returns 1 if able to cancel timer else 0 (i.e. too late or already
- *      cancelled).
- *
- *      Might block: no [may in the future if it invokes del_timer_sync()]
- *
- *      Notes: All commands issued by upper levels already have a timeout
- *      associated with them. An LLD can use this function to cancel the
- *      timer.
- *
- *      Defined in: drivers/scsi/scsi_error.c
- **/
-int scsi_delete_timer(struct scsi_cmnd *scmd)
-
-
-/**
  * scsi_host_alloc - create a scsi host adapter instance and perform basic
  *                   initialization.
  * @sht:        pointer to scsi host template
diff -urN linux/Documentation/serial/driver linux/Documentation/serial/driver
--- linux/Documentation/serial/driver   2005/07/12 09:18:54     1.6
+++ linux/Documentation/serial/driver   2005/09/15 08:52:39     1.7
@@ -111,24 +111,17 @@
        Interrupts: locally disabled.
        This call must not sleep
 
-  stop_tx(port,tty_stop)
+  stop_tx(port)
        Stop transmitting characters.  This might be due to the CTS
        line becoming inactive or the tty layer indicating we want
-       to stop transmission.
-
-       tty_stop: 1 if this call is due to the TTY layer issuing a
-                 TTY stop to the driver (equiv to rs_stop).
+       to stop transmission due to an XOFF character.
 
        Locking: port->lock taken.
        Interrupts: locally disabled.
        This call must not sleep
 
-  start_tx(port,tty_start)
-       start transmitting characters.  (incidentally, nonempty will
-       always be nonzero, and shouldn't be used - it will be dropped).
-
-       tty_start: 1 if this call was due to the TTY layer issuing
-                  a TTY start to the driver (equiv to rs_start)
+  start_tx(port)
+       start transmitting characters.
 
        Locking: port->lock taken.
        Interrupts: locally disabled.
diff -urN linux/Documentation/sound/alsa/ALSA-Configuration.txt 
linux/Documentation/sound/alsa/ALSA-Configuration.txt
--- linux/Documentation/sound/alsa/ALSA-Configuration.txt       2005/08/01 
18:23:36     1.19
+++ linux/Documentation/sound/alsa/ALSA-Configuration.txt       2005/09/15 
08:52:39     1.20
@@ -132,6 +132,7 @@
     mpu_irq    - IRQ # for MPU-401 UART (PnP setup)
     dma1       - first DMA # for AD1816A chip (PnP setup)
     dma2       - second DMA # for AD1816A chip (PnP setup)
+    clockfreq   - Clock frequency for AD1816A chip (default = 0, 33000Hz)
     
     Module supports up to 8 cards, autoprobe and PnP.
     
@@ -1458,7 +1459,7 @@
 To auto-load an ALSA driver for OSS services, define the string
 'sound-slot-%i' where %i means the slot number for OSS, which
 corresponds to the card index of ALSA.  Usually, define this
-as the the same card module.
+as the same card module.
 
 An example configuration for a single emu10k1 card is like below:
 ----- /etc/modprobe.conf
diff -urN linux/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 
linux/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
--- linux/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl  
2005/07/11 20:45:57     1.20
+++ linux/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl  
2005/09/15 08:52:40     1.21
@@ -3422,10 +3422,17 @@
 
       <para>
         The <structfield>iface</structfield> field specifies the type of
-      the control,
-      <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>. There are
-      <constant>MIXER</constant>, <constant>PCM</constant>,
-      <constant>CARD</constant>, etc.
+      the control, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which
+      is usually <constant>MIXER</constant>.
+      Use <constant>CARD</constant> for global controls that are not
+      logically part of the mixer.
+      If the control is closely associated with some specific device on
+      the sound card, use <constant>HWDEP</constant>,
+      <constant>PCM</constant>, <constant>RAWMIDI</constant>,
+      <constant>TIMER</constant>, or <constant>SEQUENCER</constant>, and
+      specify the device number with the
+      <structfield>device</structfield> and
+      <structfield>subdevice</structfield> fields.
       </para>
 
       <para>
diff -urN linux/Documentation/uml/UserModeLinux-HOWTO.txt 
linux/Documentation/uml/UserModeLinux-HOWTO.txt
--- linux/Documentation/uml/UserModeLinux-HOWTO.txt     2003/06/05 00:04:29     
1.2
+++ linux/Documentation/uml/UserModeLinux-HOWTO.txt     2005/09/15 08:52:40     
1.3
@@ -2176,7 +2176,7 @@
   If you want to access files on the host machine from inside UML, you
   can treat it as a separate machine and either nfs mount directories
   from the host or copy files into the virtual machine with scp or rcp.
-  However, since UML is running on the the host, it can access those
+  However, since UML is running on the host, it can access those
   files just like any other process and make them available inside the
   virtual machine without needing to use the network.
 
diff -urN linux/Documentation/usb/gadget_serial.txt 
linux/Documentation/usb/gadget_serial.txt
--- linux/Documentation/usb/gadget_serial.txt   2004/12/04 18:15:57     1.1
+++ linux/Documentation/usb/gadget_serial.txt   2005/09/15 08:52:40     1.2
@@ -20,7 +20,7 @@
 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 MA 02111-1307 USA.
 
-This document and the the gadget serial driver itself are
+This document and the gadget serial driver itself are
 Copyright (C) 2004 by Al Borchers (alborchers@steinerpoint.com).
 
 If you have questions, problems, or suggestions for this driver
diff -urN linux/Documentation/usb/proc_usb_info.txt 
linux/Documentation/usb/proc_usb_info.txt
--- linux/Documentation/usb/proc_usb_info.txt   2003/06/22 23:09:47     1.7
+++ linux/Documentation/usb/proc_usb_info.txt   2005/09/15 08:52:40     1.8
@@ -20,7 +20,7 @@
 
          to /etc/fstab.  This will mount usbfs at each reboot.
          You can then issue `cat /proc/bus/usb/devices` to extract
-         USB device information, and user mode drivers can use usbfs 
+         USB device information, and user mode drivers can use usbfs
          to interact with USB devices.
 
          There are a number of mount options supported by usbfs.
@@ -32,7 +32,7 @@
          still see references to the older "usbdevfs" name.
 
 For more information on mounting the usbfs file system, see the
-"USB Device Filesystem" section of the USB Guide. The latest copy 
+"USB Device Filesystem" section of the USB Guide. The latest copy
 of the USB Guide can be found at http://www.linux-usb.org/
 
 
@@ -133,7 +133,7 @@
     are the only transfers that reserve bandwidth.  Control and bulk
     transfers use all other bandwidth, including reserved bandwidth that
     is not used for transfers (such as for short packets).
-    
+
     The percentage is how much of the "reserved" bandwidth is scheduled by
     those transfers.  For a low or full speed bus (loosely, "USB 1.1"),
     90% of the bus bandwidth is reserved.  For a high speed bus (loosely,
@@ -197,7 +197,7 @@
 | | |__NumberOfInterfaces
 | |__ "*" indicates the active configuration (others are " ")
 |__Config info tag
-    
+
     USB devices may have multiple configurations, each of which act
     rather differently.  For example, a bus-powered configuration
     might be much less capable than one that is self-powered.  Only
@@ -228,7 +228,7 @@
     For example, default settings may not use more than a small
     amount of periodic bandwidth.  To use significant fractions
     of bus bandwidth, drivers must select a non-default altsetting.
-    
+
     Only one setting for an interface may be active at a time, and
     only one driver may bind to an interface at a time.  Most devices
     have only one alternate setting per interface.
@@ -297,18 +297,21 @@
 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
 I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
 E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
+
 T:  Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 4
 D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
 P:  Vendor=0451 ProdID=1446 Rev= 1.00
 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
 I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
 E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms
+
 T:  Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
 D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
 P:  Vendor=04b4 ProdID=0001 Rev= 0.00
 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
 I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=mouse
 E:  Ad=81(I) Atr=03(Int.) MxPS=   3 Ivl= 10ms
+
 T:  Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  4 Spd=12  MxCh= 0
 D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
 P:  Vendor=0565 ProdID=0001 Rev= 1.08
diff -urN linux/Documentation/video4linux/CARDLIST.bttv 
linux/Documentation/video4linux/CARDLIST.bttv
--- linux/Documentation/video4linux/CARDLIST.bttv       2005/07/13 11:48:49     
1.4
+++ linux/Documentation/video4linux/CARDLIST.bttv       2005/09/15 08:52:40     
1.5
@@ -126,10 +126,12 @@
 card=125 - MATRIX Vision Sigma-SQ
 card=126 - MATRIX Vision Sigma-SLC
 card=127 - APAC Viewcomp 878(AMAX)
-card=128 - DVICO FusionHDTV DVB-T Lite
+card=128 - DViCO FusionHDTV DVB-T Lite
 card=129 - V-Gear MyVCD
 card=130 - Super TV Tuner
 card=131 - Tibet Systems 'Progress DVR' CS16
 card=132 - Kodicom 4400R (master)
 card=133 - Kodicom 4400R (slave)
 card=134 - Adlink RTV24
+card=135 - DViCO FusionHDTV 5 Lite
+card=136 - Acorp Y878F
diff -urN linux/Documentation/video4linux/CARDLIST.saa7134 
linux/Documentation/video4linux/CARDLIST.saa7134
--- linux/Documentation/video4linux/CARDLIST.saa7134    2005/07/13 11:48:49     
1.5
+++ linux/Documentation/video4linux/CARDLIST.saa7134    2005/09/15 08:52:40     
1.6
@@ -62,3 +62,6 @@
  61 -> Philips TOUGH DVB-T reference design     [1131:2004]
  62 -> Compro VideoMate TV Gold+II
  63 -> Kworld Xpert TV PVR7134
+ 64 -> FlyTV mini Asus Digimatrix               [1043:0210,1043:0210]
+ 65 -> V-Stream Studio TV Terminator
+ 66 -> Yuan TUN-900 (saa7135)
diff -urN linux/Documentation/video4linux/CARDLIST.tuner 
linux/Documentation/video4linux/CARDLIST.tuner
--- linux/Documentation/video4linux/CARDLIST.tuner      2005/08/03 15:50:23     
1.5
+++ linux/Documentation/video4linux/CARDLIST.tuner      2005/09/15 08:52:40     
1.6
@@ -64,3 +64,4 @@
 tuner=63 - Philips FMD1216ME MK3 Hybrid Tuner
 tuner=64 - LG TDVS-H062F/TUA6034
 tuner=65 - Ymec TVF66T5-B/DFF
+tuner=66 - LG NTSC (TALN mini series)
diff -urN linux/Documentation/video4linux/Zoran 
linux/Documentation/video4linux/Zoran
--- linux/Documentation/video4linux/Zoran       2004/08/06 00:33:21     1.6
+++ linux/Documentation/video4linux/Zoran       2005/09/15 08:52:40     1.7
@@ -222,7 +222,7 @@
 can generate: PAL , NTSC , SECAM
 
 The adv717x, should be able to produce PAL N. But you find nothing PAL N 
-specific in the the registers. Seem that you have to reuse a other standard
+specific in the registers. Seem that you have to reuse a other standard
 to generate PAL N, maybe it would work if you use the PAL M settings. 
 
 ==========================
diff -urN linux/Documentation/vm/locking linux/Documentation/vm/locking
--- linux/Documentation/vm/locking      2004/06/06 02:12:33     1.11
+++ linux/Documentation/vm/locking      2005/09/15 08:52:40     1.12
@@ -83,19 +83,18 @@
 vmtruncate) does not lose sending ipi's to cloned threads that might 
 be spawned underneath it and go to user mode to drag in pte's into tlbs.
 
-swap_list_lock/swap_device_lock
--------------------------------
+swap_lock
+--------------
 The swap devices are chained in priority order from the "swap_list" header. 
 The "swap_list" is used for the round-robin swaphandle allocation strategy.
 The #free swaphandles is maintained in "nr_swap_pages". These two together
-are protected by the swap_list_lock. 
+are protected by the swap_lock.
 
-The swap_device_lock, which is per swap device, protects the reference 
-counts on the corresponding swaphandles, maintained in the "swap_map"
-array, and the "highest_bit" and "lowest_bit" fields.
+The swap_lock also protects all the device reference counts on the
+corresponding swaphandles, maintained in the "swap_map" array, and the
+"highest_bit" and "lowest_bit" fields.
 
-Both of these are spinlocks, and are never acquired from intr level. The
-locking hierarchy is swap_list_lock -> swap_device_lock.
+The swap_lock is a spinlock, and is never acquired from intr level.
 
 To prevent races between swap space deletion or async readahead swapins
 deciding whether a swap handle is being used, ie worthy of being read in
diff -urN linux/Documentation/watchdog/watchdog-api.txt 
linux/Documentation/watchdog/watchdog-api.txt
--- linux/Documentation/watchdog/watchdog-api.txt       2004/01/10 04:59:48     
1.2
+++ linux/Documentation/watchdog/watchdog-api.txt       2005/09/15 08:52:40     
1.3
@@ -228,6 +228,26 @@
        The GETSTATUS call returns if the device is open or not.
        [FIXME -- silliness again?]
        
+booke_wdt.c -- PowerPC BookE Watchdog Timer
+
+       Timeout default varies according to frequency, supports
+       SETTIMEOUT
+
+       Watchdog can not be turned off, CONFIG_WATCHDOG_NOWAYOUT
+       does not make sense
+
+       GETSUPPORT returns the watchdog_info struct, and
+       GETSTATUS returns the supported options. GETBOOTSTATUS
+       returns a 1 if the last reset was caused by the
+       watchdog and a 0 otherwise. This watchdog can not be
+       disabled once it has been started. The wdt_period kernel
+       parameter selects which bit of the time base changing
+       from 0->1 will trigger the watchdog exception. Changing
+       the timeout from the ioctl calls will change the
+       wdt_period as defined above. Finally if you would like to
+       replace the default Watchdog Handler you can implement the
+       WatchdogHandler() function in your own code.
+
 eurotechwdt.c -- Eurotech CPU-1220/1410
 
        The timeout can be set using the SETTIMEOUT ioctl and defaults
diff -urN linux/Documentation/x86_64/boot-options.txt 
linux/Documentation/x86_64/boot-options.txt
--- linux/Documentation/x86_64/boot-options.txt 2005/08/08 12:30:24     1.11
+++ linux/Documentation/x86_64/boot-options.txt 2005/09/15 08:52:40     1.12
@@ -11,6 +11,11 @@
                If your BIOS doesn't do that it's a good idea to enable though
                to make sure you log even machine check events that result
                in a reboot.
+   mce=tolerancelevel (number)
+               0: always panic, 1: panic if deadlock possible,
+               2: try to avoid panic, 3: never panic or exit (for testing)
+               default is 1
+               Can be also set using sysfs which is preferable.
 
    nomce (for compatibility with i386): same as mce=off
 
diff -urN linux/arch/alpha/Kconfig linux/arch/alpha/Kconfig
--- linux/arch/alpha/Kconfig    2005/08/24 16:22:48     1.34
+++ linux/arch/alpha/Kconfig    2005/09/15 08:52:40     1.35
@@ -479,6 +479,9 @@
        depends on ALPHA_GENERIC || ALPHA_JENSEN || ALPHA_ALCOR || ALPHA_MIKASA 
|| ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_RAWHIDE
        default y
 
+config ARCH_MAY_HAVE_PC_FDC
+       def_bool y
+
 config SMP
        bool "Symmetric multi-processing support"
        depends on ALPHA_SABLE || ALPHA_LYNX || ALPHA_RAWHIDE || ALPHA_DP264 || 
ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_GENERIC || ALPHA_SHARK || ALPHA_MARVEL
diff -urN linux/arch/alpha/Makefile linux/arch/alpha/Makefile
--- linux/arch/alpha/Makefile   2004/12/04 18:15:57     1.40
+++ linux/arch/alpha/Makefile   2005/09/15 08:52:40     1.41
@@ -108,20 +108,9 @@
 bootimage bootpfile bootpzfile: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
-
-prepare: include/asm-$(ARCH)/asm_offsets.h
-
-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
-                                  include/config/MARKER
-
-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
-       $(call filechk,gen-asm-offsets)
-
 archclean:
        $(Q)$(MAKE) $(clean)=$(boot)
 
-CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
-
 define archhelp
   echo '* boot         - Compressed kernel image (arch/alpha/boot/vmlinux.gz)'
   echo '  bootimage    - SRM bootable image (arch/alpha/boot/bootimage)'
diff -urN linux/arch/alpha/kernel/alpha_ksyms.c 
linux/arch/alpha/kernel/alpha_ksyms.c
--- linux/arch/alpha/kernel/alpha_ksyms.c       2005/03/18 17:36:45     1.53
+++ linux/arch/alpha/kernel/alpha_ksyms.c       2005/09/15 08:52:41     1.54
@@ -185,15 +185,6 @@
 EXPORT_SYMBOL(smp_call_function);
 EXPORT_SYMBOL(smp_call_function_on_cpu);
 EXPORT_SYMBOL(_atomic_dec_and_lock);
-#ifdef CONFIG_DEBUG_SPINLOCK
-EXPORT_SYMBOL(_raw_spin_unlock);
-EXPORT_SYMBOL(debug_spin_lock);
-EXPORT_SYMBOL(debug_spin_trylock);
-#endif
-#ifdef CONFIG_DEBUG_RWLOCK
-EXPORT_SYMBOL(_raw_write_lock);
-EXPORT_SYMBOL(_raw_read_lock);
-#endif
 EXPORT_SYMBOL(cpu_present_mask);
 #endif /* CONFIG_SMP */
 
diff -urN linux/arch/alpha/kernel/entry.S linux/arch/alpha/kernel/entry.S
--- linux/arch/alpha/kernel/entry.S     2004/07/20 20:21:15     1.47
+++ linux/arch/alpha/kernel/entry.S     2005/09/15 08:52:41     1.48
@@ -5,7 +5,7 @@
  */
 
 #include <linux/config.h>
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
 #include <asm/pal.h>
 #include <asm/errno.h>
diff -urN linux/arch/alpha/kernel/head.S linux/arch/alpha/kernel/head.S
--- linux/arch/alpha/kernel/head.S      2003/06/22 23:09:47     1.12
+++ linux/arch/alpha/kernel/head.S      2005/09/15 08:52:41     1.13
@@ -9,7 +9,7 @@
 
 #include <linux/config.h>
 #include <asm/system.h>
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 
 .globl swapper_pg_dir
 .globl _stext
diff -urN linux/arch/alpha/kernel/module.c linux/arch/alpha/kernel/module.c
--- linux/arch/alpha/kernel/module.c    2004/06/06 02:12:33     1.6
+++ linux/arch/alpha/kernel/module.c    2005/09/15 08:52:41     1.7
@@ -47,7 +47,7 @@
 
 struct got_entry {
        struct got_entry *next;
-       Elf64_Addr r_offset;
+       Elf64_Sxword r_addend;
        int got_offset;
 };
 
@@ -57,14 +57,14 @@
 {
        unsigned long r_sym = ELF64_R_SYM (rela->r_info);
        unsigned long r_type = ELF64_R_TYPE (rela->r_info);
-       Elf64_Addr r_offset = rela->r_offset;
+       Elf64_Sxword r_addend = rela->r_addend;
        struct got_entry *g;
 
        if (r_type != R_ALPHA_LITERAL)
                return;
 
        for (g = chains + r_sym; g ; g = g->next)
-               if (g->r_offset == r_offset) {
+               if (g->r_addend == r_addend) {
                        if (g->got_offset == 0) {
                                g->got_offset = *poffset;
                                *poffset += 8;
@@ -74,7 +74,7 @@
 
        g = kmalloc (sizeof (*g), GFP_KERNEL);
        g->next = chains[r_sym].next;
-       g->r_offset = r_offset;
+       g->r_addend = r_addend;
        g->got_offset = *poffset;
        *poffset += 8;
        chains[r_sym].next = g;
diff -urN linux/arch/alpha/kernel/osf_sys.c linux/arch/alpha/kernel/osf_sys.c
--- linux/arch/alpha/kernel/osf_sys.c   2005/05/26 09:12:36     1.56
+++ linux/arch/alpha/kernel/osf_sys.c   2005/09/15 08:52:41     1.57
@@ -974,6 +974,7 @@
        size_t size;
        long timeout;
        int ret = -EINVAL;
+       struct fdtable *fdt;
 
        timeout = MAX_SCHEDULE_TIMEOUT;
        if (tvp) {
@@ -995,7 +996,8 @@
                }
        }
 
-       if (n < 0 || n > current->files->max_fdset)
+       fdt = files_fdtable(current->files);
+       if (n < 0 || n > fdt->max_fdset)
                goto out_nofds;
 
        /*
@@ -1152,8 +1154,7 @@
 
        ticks = timeval_to_jiffies(&tmp);
 
-       current->state = TASK_INTERRUPTIBLE;
-       ticks = schedule_timeout(ticks);
+       ticks = schedule_timeout_interruptible(ticks);
 
        if (remain) {
                jiffies_to_timeval(ticks, &tmp);
diff -urN linux/arch/alpha/kernel/signal.c linux/arch/alpha/kernel/signal.c
--- linux/arch/alpha/kernel/signal.c    2005/03/18 17:36:45     1.37
+++ linux/arch/alpha/kernel/signal.c    2005/09/15 08:52:41     1.38
@@ -566,13 +566,12 @@
        if (ka->sa.sa_flags & SA_RESETHAND)
                ka->sa.sa_handler = SIG_DFL;
 
-       if (!(ka->sa.sa_flags & SA_NODEFER)) {
-               spin_lock_irq(&current->sighand->siglock);
-               sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+       spin_lock_irq(&current->sighand->siglock);
+       sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+       if (!(ka->sa.sa_flags & SA_NODEFER)) 
                sigaddset(&current->blocked,sig);
-               recalc_sigpending();
-               spin_unlock_irq(&current->sighand->siglock);
-       }
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
 }
 
 static inline void
diff -urN linux/arch/alpha/kernel/smp.c linux/arch/alpha/kernel/smp.c
--- linux/arch/alpha/kernel/smp.c       2005/08/24 16:22:48     1.60
+++ linux/arch/alpha/kernel/smp.c       2005/09/15 08:52:41     1.61
@@ -989,175 +989,3 @@
 
        preempt_enable();
 }
-
-#ifdef CONFIG_DEBUG_SPINLOCK
-void
-_raw_spin_unlock(spinlock_t * lock)
-{
-       mb();
-       lock->lock = 0;
-
-       lock->on_cpu = -1;
-       lock->previous = NULL;
-       lock->task = NULL;
-       lock->base_file = "none";
-       lock->line_no = 0;
-}
-
-void
-debug_spin_lock(spinlock_t * lock, const char *base_file, int line_no)
-{
-       long tmp;
-       long stuck;
-       void *inline_pc = __builtin_return_address(0);
-       unsigned long started = jiffies;
-       int printed = 0;
-       int cpu = smp_processor_id();
-
-       stuck = 1L << 30;
- try_again:
-
-       /* Use sub-sections to put the actual loop at the end
-          of this object file's text section so as to perfect
-          branch prediction.  */
-       __asm__ __volatile__(
-       "1:     ldl_l   %0,%1\n"
-       "       subq    %2,1,%2\n"
-       "       blbs    %0,2f\n"
-       "       or      %0,1,%0\n"
-       "       stl_c   %0,%1\n"
-       "       beq     %0,3f\n"
-       "4:     mb\n"
-       ".subsection 2\n"
-       "2:     ldl     %0,%1\n"
-       "       subq    %2,1,%2\n"
-       "3:     blt     %2,4b\n"
-       "       blbs    %0,2b\n"
-       "       br      1b\n"
-       ".previous"
-       : "=r" (tmp), "=m" (lock->lock), "=r" (stuck)
-       : "m" (lock->lock), "2" (stuck) : "memory");
-
-       if (stuck < 0) {
-               printk(KERN_WARNING
-                      "%s:%d spinlock stuck in %s at %p(%d)"
-                      " owner %s at %p(%d) %s:%d\n",
-                      base_file, line_no,
-                      current->comm, inline_pc, cpu,
-                      lock->task->comm, lock->previous,
-                      lock->on_cpu, lock->base_file, lock->line_no);
-               stuck = 1L << 36;
-               printed = 1;
-               goto try_again;
-       }
-
-       /* Exiting.  Got the lock.  */
-       lock->on_cpu = cpu;
-       lock->previous = inline_pc;
-       lock->task = current;
-       lock->base_file = base_file;
-       lock->line_no = line_no;
-
-       if (printed) {
-               printk(KERN_WARNING
-                      "%s:%d spinlock grabbed in %s at %p(%d) %ld ticks\n",
-                      base_file, line_no, current->comm, inline_pc,
-                      cpu, jiffies - started);
-       }
-}
-
-int
-debug_spin_trylock(spinlock_t * lock, const char *base_file, int line_no)
-{
-       int ret;
-       if ((ret = !test_and_set_bit(0, lock))) {
-               lock->on_cpu = smp_processor_id();
-               lock->previous = __builtin_return_address(0);
-               lock->task = current;
-       } else {
-               lock->base_file = base_file;
-               lock->line_no = line_no;
-       }
-       return ret;
-}
-#endif /* CONFIG_DEBUG_SPINLOCK */
-
-#ifdef CONFIG_DEBUG_RWLOCK
-void _raw_write_lock(rwlock_t * lock)
-{
-       long regx, regy;
-       int stuck_lock, stuck_reader;
-       void *inline_pc = __builtin_return_address(0);
-
- try_again:
-
-       stuck_lock = 1<<30;
-       stuck_reader = 1<<30;
-
-       __asm__ __volatile__(
-       "1:     ldl_l   %1,%0\n"
-       "       blbs    %1,6f\n"
-       "       blt     %1,8f\n"
-       "       mov     1,%1\n"
-       "       stl_c   %1,%0\n"
-       "       beq     %1,6f\n"
-       "4:     mb\n"
-       ".subsection 2\n"
-       "6:     blt     %3,4b   # debug\n"
-       "       subl    %3,1,%3 # debug\n"
-       "       ldl     %1,%0\n"
-       "       blbs    %1,6b\n"
-       "8:     blt     %4,4b   # debug\n"
-       "       subl    %4,1,%4 # debug\n"
-       "       ldl     %1,%0\n"
-       "       blt     %1,8b\n"
-       "       br      1b\n"
-       ".previous"
-       : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (regy),
-         "=&r" (stuck_lock), "=&r" (stuck_reader)
-       : "m" (*(volatile int *)lock), "3" (stuck_lock), "4" (stuck_reader) : 
"memory");
-
-       if (stuck_lock < 0) {
-               printk(KERN_WARNING "write_lock stuck at %p\n", inline_pc);
-               goto try_again;
-       }
-       if (stuck_reader < 0) {
-               printk(KERN_WARNING "write_lock stuck on readers at %p\n",
-                      inline_pc);
-               goto try_again;
-       }
-}
-
-void _raw_read_lock(rwlock_t * lock)
-{
-       long regx;
-       int stuck_lock;
-       void *inline_pc = __builtin_return_address(0);
-
- try_again:
-
-       stuck_lock = 1<<30;
-
-       __asm__ __volatile__(
-       "1:     ldl_l   %1,%0;"
-       "       blbs    %1,6f;"
-       "       subl    %1,2,%1;"
-       "       stl_c   %1,%0;"
-       "       beq     %1,6f;"
-       "4:     mb\n"
-       ".subsection 2\n"
-       "6:     ldl     %1,%0;"
-       "       blt     %2,4b   # debug\n"
-       "       subl    %2,1,%2 # debug\n"
-       "       blbs    %1,6b;"
-       "       br      1b\n"
-       ".previous"
-       : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (stuck_lock)
-       : "m" (*(volatile int *)lock), "2" (stuck_lock) : "memory");
-
-       if (stuck_lock < 0) {
-               printk(KERN_WARNING "read_lock stuck at %p\n", inline_pc);
-               goto try_again;
-       }
-}
-#endif /* CONFIG_DEBUG_RWLOCK */
diff -urN linux/arch/alpha/kernel/sys_marvel.c 
linux/arch/alpha/kernel/sys_marvel.c
--- linux/arch/alpha/kernel/sys_marvel.c        2004/10/25 20:44:09     1.7
+++ linux/arch/alpha/kernel/sys_marvel.c        2005/09/15 08:52:41     1.8
@@ -373,12 +373,11 @@
                irq += 0x80;                    /* offset for lsi       */
 
 #if 1
-               printk("PCI:%d:%d:%d (hose %d) [%s] is using MSI\n",
+               printk("PCI:%d:%d:%d (hose %d) is using MSI\n",
                       dev->bus->number, 
                       PCI_SLOT(dev->devfn), 
                       PCI_FUNC(dev->devfn),
-                      hose->index,
-                      pci_pretty_name (dev));
+                      hose->index);
                printk("  %d message(s) from 0x%04x\n", 
                       1 << ((msg_ctl & PCI_MSI_FLAGS_QSIZE) >> 4),
                       msg_dat);
diff -urN linux/arch/alpha/kernel/time.c linux/arch/alpha/kernel/time.c
--- linux/arch/alpha/kernel/time.c      2005/01/25 04:27:52     1.49
+++ linux/arch/alpha/kernel/time.c      2005/09/15 08:52:41     1.50
@@ -149,7 +149,7 @@
         * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
         * called as close as possible to 500 ms before the new second starts.
         */
-       if ((time_status & STA_UNSYNC) == 0
+       if (ntp_synced()
            && xtime.tv_sec > state.last_rtc_update + 660
            && xtime.tv_nsec >= 500000 - ((unsigned) TICK_SIZE) / 2
            && xtime.tv_nsec <= 500000 + ((unsigned) TICK_SIZE) / 2) {
@@ -502,10 +502,7 @@
        set_normalized_timespec(&xtime, sec, nsec);
        set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
 
-       time_adjust = 0;                /* stop active adjtime() */
-       time_status |= STA_UNSYNC;
-       time_maxerror = NTP_PHASE_LIMIT;
-       time_esterror = NTP_PHASE_LIMIT;
+       ntp_clear();
 
        write_sequnlock_irq(&xtime_lock);
        clock_was_set();
diff -urN linux/arch/alpha/lib/dbg_stackcheck.S 
linux/arch/alpha/lib/dbg_stackcheck.S
--- linux/arch/alpha/lib/dbg_stackcheck.S       2002/11/01 23:26:52     1.1
+++ linux/arch/alpha/lib/dbg_stackcheck.S       2005/09/15 08:52:41     1.2
@@ -5,7 +5,7 @@
  * Verify that we have not overflowed the stack.  Oops if we have.
  */
 
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 
        .text
        .set noat
diff -urN linux/arch/alpha/lib/dbg_stackkill.S 
linux/arch/alpha/lib/dbg_stackkill.S
--- linux/arch/alpha/lib/dbg_stackkill.S        2002/11/01 23:26:52     1.1
+++ linux/arch/alpha/lib/dbg_stackkill.S        2005/09/15 08:52:41     1.2
@@ -6,7 +6,7 @@
  * uninitialized local variables in the act.
  */
 
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 
        .text
        .set noat
diff -urN linux/arch/arm/Kconfig linux/arch/arm/Kconfig
--- linux/arch/arm/Kconfig      2005/08/24 16:22:48     1.51
+++ linux/arch/arm/Kconfig      2005/09/15 08:52:41     1.52
@@ -64,6 +64,9 @@
 config GENERIC_BUST_SPINLOCK
        bool
 
+config ARCH_MAY_HAVE_PC_FDC
+       bool
+
 config GENERIC_ISA_DMA
        bool
 
@@ -150,6 +153,7 @@
        select ARCH_ACORN
        select FIQ
        select TIMER_ACORN
+       select ARCH_MAY_HAVE_PC_FDC
        help
          On the Acorn Risc-PC, Linux can support the internal IDE disk and
          CD-ROM interface, serial and parallel port, and the floppy drive.
@@ -322,8 +326,8 @@
          processor machines. On a single processor machine, the kernel will
          run faster if you say N here.
 
-         See also the <file:Documentation/smp.tex>,
-         <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+         See also the <file:Documentation/smp.txt>,
+         <file:Documentation/i386/IO-APIC.txt>,
          <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
          <http://www.linuxdoc.org/docs.html#howto>.
 
@@ -365,8 +369,8 @@
 
          Please note that dynamic tick may affect the accuracy of
          timekeeping on some platforms depending on the implementation.
-         Currently at least OMAP platform is known to have accurate
-         timekeeping with dynamic tick.
+         Currently at least OMAP, PXA2xx and SA11x0 platforms are known
+         to have accurate timekeeping with dynamic tick.
 
 config ARCH_DISCONTIGMEM_ENABLE
        bool
@@ -635,10 +639,6 @@
          and the Battery Powered Linux mini-HOWTO, available from
          <http://www.tldp.org/docs.html#howto>.
 
-         Note that, even if you say N here, Linux on the x86 architecture
-         will issue the hlt instruction if nothing is to be done, thereby
-         sending the processor to sleep and saving power.
-
 config APM
        tristate "Advanced Power Management Emulation"
        depends on PM
@@ -650,12 +650,6 @@
          battery status information, and user-space programs will receive
          notification of APM "events" (e.g. battery status change).
 
-         If you select "Y" here, you can disable actual use of the APM
-         BIOS by passing the "apm=off" option to the kernel at boot time.
-
-         Note that the APM support is almost completely disabled for
-         machines with more than one CPU.
-
          In order to use APM, you will need supporting software. For location
          and more information, read <file:Documentation/pm.txt> and the
          Battery Powered Linux mini-HOWTO, available from
@@ -665,39 +659,12 @@
          manpage ("man 8 hdparm") for that), and it doesn't turn off
          VESA-compliant "green" monitors.
 
-         This driver does not support the TI 4000M TravelMate and the ACER
-         486/DX4/75 because they don't have compliant BIOSes. Many "green"
-         desktop machines also don't have compliant BIOSes, and this driver
-         may cause those machines to panic during the boot phase.
-
          Generally, if you don't have a battery in your machine, there isn't
          much point in using this driver and you should say N. If you get
          random kernel OOPSes or reboots that don't seem to be related to
          anything, try disabling/enabling this option (or disabling/enabling
          APM in your BIOS).
 
-         Some other things you should try when experiencing seemingly random,
-         "weird" problems:
-
-         1) make sure that you have enough swap space and that it is
-         enabled.
-         2) pass the "no-hlt" option to the kernel
-         3) switch on floating point emulation in the kernel and pass
-         the "no387" option to the kernel
-         4) pass the "floppy=nodma" option to the kernel
-         5) pass the "mem=4M" option to the kernel (thereby disabling
-         all but the first 4 MB of RAM)
-         6) make sure that the CPU is not over clocked.
-         7) read the sig11 FAQ at <http://www.bitwizard.nl/sig11/>
-         8) disable the cache from your BIOS settings
-         9) install a fan for the video card or exchange video RAM
-         10) install a better fan for the CPU
-         11) exchange RAM chips
-         12) exchange the motherboard.
-
-         To compile this driver as a module, choose M here: the
-         module will be called apm.
-
 endmenu
 
 source "net/Kconfig"
@@ -752,6 +719,8 @@
 
 source "drivers/misc/Kconfig"
 
+source "drivers/mfd/Kconfig"
+
 source "drivers/media/Kconfig"
 
 source "drivers/video/Kconfig"
diff -urN linux/arch/arm/Kconfig.debug linux/arch/arm/Kconfig.debug
--- linux/arch/arm/Kconfig.debug        2005/03/18 17:36:45     1.4
+++ linux/arch/arm/Kconfig.debug        2005/09/15 08:52:41     1.5
@@ -53,7 +53,7 @@
        bool "Kernel low-level debugging functions"
        depends on DEBUG_KERNEL
        help
-         Say Y here to include definitions of printascii, printchar, printhex
+         Say Y here to include definitions of printascii, printch, printhex
          in the kernel.  This is helpful if you are debugging code that
          executes before the console is initialized.
 
diff -urN linux/arch/arm/Makefile linux/arch/arm/Makefile
--- linux/arch/arm/Makefile     2005/07/13 11:48:49     1.78
+++ linux/arch/arm/Makefile     2005/09/15 08:52:41     1.79
@@ -175,10 +175,10 @@
 endif
        @touch $@
 
-prepare: maketools include/asm-arm/.arch
+archprepare: maketools include/asm-arm/.arch
 
 .PHONY: maketools FORCE
-maketools: include/asm-arm/constants.h include/linux/version.h FORCE
+maketools: include/linux/version.h FORCE
        $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
 
 # Convert bzImage to zImage
@@ -190,7 +190,7 @@
 zinstall install: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
 
-CLEAN_FILES += include/asm-arm/constants.h* include/asm-arm/mach-types.h \
+CLEAN_FILES += include/asm-arm/mach-types.h \
               include/asm-arm/arch include/asm-arm/.arch
 
 # We use MRPROPER_FILES and CLEAN_FILES now
@@ -201,11 +201,6 @@
 bp:;   $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage
 i zi:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
 
-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
-                                  include/asm-arm/.arch
-
-include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
-       $(call filechk,gen-asm-offsets)
 
 define archhelp
   echo  '* zImage        - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
diff -urN linux/arch/arm/boot/compressed/head-sharpsl.S 
linux/arch/arm/boot/compressed/head-sharpsl.S
--- linux/arch/arm/boot/compressed/head-sharpsl.S       2005/01/13 14:05:17     
1.1
+++ linux/arch/arm/boot/compressed/head-sharpsl.S       2005/09/15 08:52:42     
1.2
@@ -7,7 +7,8 @@
  * so we have to figure out the machine for ourselves...
  *
  * Support for Poodle, Corgi (SL-C700), Shepherd (SL-C750)
- * and Husky (SL-C760).
+ * Husky (SL-C760), Tosa (SL-C6000), Spitz (SL-C3000),
+ * Akita (SL-C1000) and Borzoi (SL-C3100).
  *
  */
 
@@ -23,6 +24,22 @@
 
 __SharpSL_start:
 
+/* Check for TC6393 - if found we have a Tosa */
+       ldr     r7, .TOSAID
+       mov     r1, #0x10000000         @ Base address of TC6393 chip
+       mov     r6, #0x03
+       ldrh    r3, [r1, #8]            @ Load TC6393XB Revison: This is 0x0003
+       cmp     r6, r3
+       beq     .SHARPEND               @ Success -> tosa
+
+/* Check for pxa270 - if found, branch */
+       mrc p15, 0, r4, c0, c0          @ Get Processor ID
+       and     r4, r4, #0xffffff00
+       ldr     r3, .PXA270ID
+       cmp     r4, r3
+       beq     .PXA270
+
+/* Check for w100 - if not found we have a Poodle */
        ldr     r1, .W100ADDR           @ Base address of w100 chip + regs 
offset
 
        mov r6, #0x31                   @ Load Magic Init value
@@ -30,7 +47,7 @@
        mov r5, #0x3000
 .W100LOOP:
        subs r5, r5, #1
-    bne .W100LOOP
+       bne .W100LOOP
        mov r6, #0x30                   @ Load 2nd Magic Init value
        str     r6, [r1, #0x280]        @ to SCRATCH_UMSK
 
@@ -40,45 +57,52 @@
        cmp     r6, r3
        bne     .SHARPEND                       @ We have no w100 - Poodle
 
-       mrc p15, 0, r6, c0, c0  @ Get Processor ID
-       and     r6, r6, #0xffffff00
+/* Check for pxa250 - if found we have a Corgi */
        ldr     r7, .CORGIID
        ldr     r3, .PXA255ID
-       cmp     r6, r3
+       cmp     r4, r3
        blo     .SHARPEND                       @ We have a PXA250 - Corgi
 
-       mov     r1, #0x0c000000         @ Base address of NAND chip
-       ldrb    r3, [r1, #24]   @ Load FLASHCTL
-       bic     r3, r3, #0x11           @ SET NCE
-       orr     r3, r3, #0x0a           @ SET CLR + FLWP
-       strb    r3, [r1, #24]   @ Save to FLASHCTL
-       mov     r2, #0x90               @ Command "readid"
-       strb    r2, [r1, #20]   @ Save to FLASHIO
-       bic     r3, r3, #2                      @ CLR CLE
-       orr     r3, r3, #4                      @ SET ALE
-       strb    r3, [r1, #24]   @ Save to FLASHCTL
-       mov             r2, #0                  @ Address 0x00
-       strb    r2, [r1, #20]   @ Save to FLASHIO
-       bic     r3, r3, #4                      @ CLR ALE
-       strb    r3, [r1, #24]   @ Save to FLASHCTL
-.SHARP1:
-       ldrb    r3, [r1, #24]   @ Load FLASHCTL
-       tst     r3, #32                         @ Is chip ready?
-       beq     .SHARP1
-       ldrb    r2, [r1, #20]   @ NAND Manufacturer ID
-       ldrb    r3, [r1, #20]   @ NAND Chip ID
+/* Check for 64MiB flash - if found we have a Shepherd */
+       bl      get_flash_ids
        ldr     r7, .SHEPHERDID
        cmp     r3, #0x76                       @ 64MiB flash
        beq     .SHARPEND                       @ We have Shepherd
+
+/* Must be a Husky */
        ldr     r7, .HUSKYID            @ Must be Husky
        b .SHARPEND
 
+.PXA270:
+/* Check for 16MiB flash - if found we have Spitz */
+       bl      get_flash_ids
+       ldr     r7, .SPITZID
+       cmp     r3, #0x73                       @ 16MiB flash
+       beq     .SHARPEND                       @ We have Spitz
+
+/* Check for a second SCOOP chip - if found we have Borzoi */
+       ldr     r1, .SCOOP2ADDR
+       ldr     r7, .BORZOIID
+       mov     r6, #0x0140
+       strh    r6, [r1]
+       ldrh    r6, [r1]
+       cmp     r6, #0x0140
+       beq     .SHARPEND                       @ We have Borzoi
+
+/* Must be Akita */
+       ldr     r7, .AKITAID
+       b       .SHARPEND                       @ We have Borzoi
+
 .PXA255ID:
        .word   0x69052d00              @ PXA255 Processor ID
+.PXA270ID:
+       .word   0x69054100              @ PXA270 Processor ID
 .W100ID:
        .word   0x57411002              @ w100 Chip ID
 .W100ADDR:
        .word   0x08010000              @ w100 Chip ID Reg Address
+.SCOOP2ADDR:
+       .word   0x08800040
 .POODLEID:
        .word   MACH_TYPE_POODLE
 .CORGIID:
@@ -87,6 +111,41 @@
        .word   MACH_TYPE_SHEPHERD
 .HUSKYID:
        .word   MACH_TYPE_HUSKY
-.SHARPEND:
-
+.TOSAID:
+       .word   MACH_TYPE_TOSA
+.SPITZID:
+       .word   MACH_TYPE_SPITZ
+.AKITAID:
+       .word   MACH_TYPE_AKITA
+.BORZOIID:
+       .word   MACH_TYPE_BORZOI
+
+/*
+ * Return: r2 - NAND Manufacturer ID
+ *         r3 - NAND Chip ID
+ * Corrupts: r1
+ */
+get_flash_ids:
+       mov     r1, #0x0c000000         @ Base address of NAND chip
+       ldrb    r3, [r1, #24]           @ Load FLASHCTL
+       bic     r3, r3, #0x11           @ SET NCE
+       orr     r3, r3, #0x0a           @ SET CLR + FLWP
+       strb    r3, [r1, #24]           @ Save to FLASHCTL
+       mov     r2, #0x90               @ Command "readid"
+       strb    r2, [r1, #20]           @ Save to FLASHIO
+       bic     r3, r3, #2              @ CLR CLE
+       orr     r3, r3, #4              @ SET ALE
+       strb    r3, [r1, #24]           @ Save to FLASHCTL
+       mov     r2, #0                  @ Address 0x00
+       strb    r2, [r1, #20]           @ Save to FLASHIO
+       bic     r3, r3, #4              @ CLR ALE
+       strb    r3, [r1, #24]           @ Save to FLASHCTL
+.fids1:
+       ldrb    r3, [r1, #24]           @ Load FLASHCTL
+       tst     r3, #32                 @ Is chip ready?
+       beq     .fids1
+       ldrb    r2, [r1, #20]           @ NAND Manufacturer ID
+       ldrb    r3, [r1, #20]           @ NAND Chip ID
+       mov     pc, lr
 
+.SHARPEND:
diff -urN linux/arch/arm/common/gic.c linux/arch/arm/common/gic.c
--- linux/arch/arm/common/gic.c 1970/01/01 00:00:00
+++ linux/arch/arm/common/gic.c 2005-09-15 09:52:42.439153000 +0100     1.1
@@ -0,0 +1,167 @@
+/*
+ *  linux/arch/arm/common/gic.c
+ *
+ *  Copyright (C) 2002 ARM Limited, All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Interrupt architecture for the GIC:
+ *
+ * o There is one Interrupt Distributor, which receives interrupts
+ *   from system devices and sends them to the Interrupt Controllers.
+ *
+ * o There is one CPU Interface per CPU, which sends interrupts sent
+ *   by the Distributor, and interrupts generated locally, to the
+ *   associated CPU.
+ *
+ * Note that IRQs 0-31 are special - they are local to each CPU.
+ * As such, the enable set/clear, pending set/clear and active bit
+ * registers are banked per-cpu for these sources.
+ */
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/smp.h>
+#include <linux/cpumask.h>
+
+#include <asm/irq.h>
+#include <asm/io.h>
+#include <asm/mach/irq.h>
+#include <asm/hardware/gic.h>
+
+static void __iomem *gic_dist_base;
+static void __iomem *gic_cpu_base;
+
+/*
+ * Routines to acknowledge, disable and enable interrupts
+ *
+ * Linux assumes that when we're done with an interrupt we need to
+ * unmask it, in the same way we need to unmask an interrupt when
+ * we first enable it.
+ *
+ * The GIC has a seperate notion of "end of interrupt" to re-enable
+ * an interrupt after handling, in order to support hardware
+ * prioritisation.
+ *
+ * We can make the GIC behave in the way that Linux expects by making
+ * our "acknowledge" routine disable the interrupt, then mark it as
+ * complete.
+ */
+static void gic_ack_irq(unsigned int irq)
+{
+       u32 mask = 1 << (irq % 32);
+       writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4);
+       writel(irq, gic_cpu_base + GIC_CPU_EOI);
+}
+
+static void gic_mask_irq(unsigned int irq)
+{
+       u32 mask = 1 << (irq % 32);
+       writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4);
+}
+
+static void gic_unmask_irq(unsigned int irq)
+{
+       u32 mask = 1 << (irq % 32);
+       writel(mask, gic_dist_base + GIC_DIST_ENABLE_SET + (irq / 32) * 4);
+}
+
+static void gic_set_cpu(struct irqdesc *desc, unsigned int irq, unsigned int 
cpu)
+{
+       void __iomem *reg = gic_dist_base + GIC_DIST_TARGET + (irq & ~3);
+       unsigned int shift = (irq % 4) * 8;
+       u32 val;
+
+       val = readl(reg) & ~(0xff << shift);
+       val |= 1 << (cpu + shift);
+       writel(val, reg);
+}
+
+static struct irqchip gic_chip = {
+       .ack            = gic_ack_irq,
+       .mask           = gic_mask_irq,
+       .unmask         = gic_unmask_irq,
+#ifdef CONFIG_SMP
+       .set_cpu        = gic_set_cpu,
+#endif
+};
+
+void __init gic_dist_init(void __iomem *base)
+{
+       unsigned int max_irq, i;
+       u32 cpumask = 1 << smp_processor_id();
+
+       cpumask |= cpumask << 8;
+       cpumask |= cpumask << 16;
+
+       gic_dist_base = base;
+
+       writel(0, base + GIC_DIST_CTRL);
+
+       /*
+        * Find out how many interrupts are supported.
+        */
+       max_irq = readl(base + GIC_DIST_CTR) & 0x1f;
+       max_irq = (max_irq + 1) * 32;
+
+       /*
+        * The GIC only supports up to 1020 interrupt sources.
+        * Limit this to either the architected maximum, or the
+        * platform maximum.
+        */
+       if (max_irq > max(1020, NR_IRQS))
+               max_irq = max(1020, NR_IRQS);
+
+       /*
+        * Set all global interrupts to be level triggered, active low.
+        */
+       for (i = 32; i < max_irq; i += 16)
+               writel(0, base + GIC_DIST_CONFIG + i * 4 / 16);
+
+       /*
+        * Set all global interrupts to this CPU only.
+        */
+       for (i = 32; i < max_irq; i += 4)
+               writel(cpumask, base + GIC_DIST_TARGET + i * 4 / 4);
+
+       /*
+        * Set priority on all interrupts.
+        */
+       for (i = 0; i < max_irq; i += 4)
+               writel(0xa0a0a0a0, base + GIC_DIST_PRI + i * 4 / 4);
+
+       /*
+        * Disable all interrupts.
+        */
+       for (i = 0; i < max_irq; i += 32)
+               writel(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4 / 32);
+
+       /*
+        * Setup the Linux IRQ subsystem.
+        */
+       for (i = 29; i < max_irq; i++) {
+               set_irq_chip(i, &gic_chip);
+               set_irq_handler(i, do_level_IRQ);
+               set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+       }
+
+       writel(1, base + GIC_DIST_CTRL);
+}
+
+void __cpuinit gic_cpu_init(void __iomem *base)
+{
+       gic_cpu_base = base;
+       writel(0xf0, base + GIC_CPU_PRIMASK);
+       writel(1, base + GIC_CPU_CTRL);
+}
+
+#ifdef CONFIG_SMP
+void gic_raise_softirq(cpumask_t cpumask, unsigned int irq)
+{
+       unsigned long map = *cpus_addr(cpumask);
+
+       writel(map << 16 | irq, gic_dist_base + GIC_DIST_SOFTINT);
+}
+#endif
diff -urN linux/arch/arm/common/Kconfig linux/arch/arm/common/Kconfig
--- linux/arch/arm/common/Kconfig       2005/04/08 18:57:47     1.1
+++ linux/arch/arm/common/Kconfig       2005/09/15 08:52:42     1.2
@@ -1,6 +1,9 @@
 config ICST525
        bool
 
+config ARM_GIC
+       bool
+
 config ICST307
        bool
 
diff -urN linux/arch/arm/common/Makefile linux/arch/arm/common/Makefile
--- linux/arch/arm/common/Makefile      2005/04/08 18:57:47     1.11
+++ linux/arch/arm/common/Makefile      2005/09/15 08:52:42     1.12
@@ -4,6 +4,7 @@
 
 obj-y                          += rtctime.o
 obj-$(CONFIG_ARM_AMBA)         += amba.o
+obj-$(CONFIG_ARM_GIC)          += gic.o
 obj-$(CONFIG_ICST525)          += icst525.o
 obj-$(CONFIG_ICST307)          += icst307.o
 obj-$(CONFIG_SA1111)           += sa1111.o
diff -urN linux/arch/arm/common/locomo.c linux/arch/arm/common/locomo.c
--- linux/arch/arm/common/locomo.c      2005/03/18 17:36:45     1.4
+++ linux/arch/arm/common/locomo.c      2005/09/15 08:52:42     1.5
@@ -177,7 +177,7 @@
                d = irq_desc + irq;
                for (i = 0; i <= 3; i++, d++, irq++) {
                        if (req & (0x0100 << i)) {
-                               d->handle(irq, d, regs);
+                               desc_handle_irq(irq, d, regs);
                        }
 
                }
@@ -220,7 +220,7 @@
 
        if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) {
                d = irq_desc + LOCOMO_IRQ_KEY_START;
-               d->handle(LOCOMO_IRQ_KEY_START, d, regs);
+               desc_handle_irq(LOCOMO_IRQ_KEY_START, d, regs);
        }
 }
 
@@ -273,7 +273,7 @@
                d = irq_desc + LOCOMO_IRQ_GPIO_START;
                for (i = 0; i <= 15; i++, irq++, d++) {
                        if (req & (0x0001 << i)) {
-                               d->handle(irq, d, regs);
+                               desc_handle_irq(irq, d, regs);
                        }
                }
        }
@@ -328,7 +328,7 @@
 
        if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) {
                d = irq_desc + LOCOMO_IRQ_LT_START;
-               d->handle(LOCOMO_IRQ_LT_START, d, regs);
+               desc_handle_irq(LOCOMO_IRQ_LT_START, d, regs);
        }
 }
 
@@ -379,7 +379,7 @@
 
                for (i = 0; i <= 3; i++, irq++, d++) {
                        if (req & (0x0001 << i)) {
-                               d->handle(irq, d, regs);
+                               desc_handle_irq(irq, d, regs);
                        }
                }
        }
@@ -541,6 +541,103 @@
        return ret;
 }
 
+#ifdef CONFIG_PM
+
+struct locomo_save_data {
+       u16     LCM_GPO;
+       u16     LCM_SPICT;
+       u16     LCM_GPE;
+       u16     LCM_ASD;
+       u16     LCM_SPIMD;
+};
+
+static int locomo_suspend(struct device *dev, u32 pm_message_t, u32 level)
+{
+       struct locomo *lchip = dev_get_drvdata(dev);
+       struct locomo_save_data *save;
+       unsigned long flags;
+
+       if (level != SUSPEND_DISABLE)
+               return 0;
+
+       save = kmalloc(sizeof(struct locomo_save_data), GFP_KERNEL);
+       if (!save)
+               return -ENOMEM;
+
+       dev->power.saved_state = (void *) save;
+
+       spin_lock_irqsave(&lchip->lock, flags);
+
+       save->LCM_GPO     = locomo_readl(lchip->base + LOCOMO_GPO);     /* GPIO 
*/
+       locomo_writel(0x00, lchip->base + LOCOMO_GPO);
+       save->LCM_SPICT   = locomo_readl(lchip->base + LOCOMO_SPICT);   /* SPI 
*/
+       locomo_writel(0x40, lchip->base + LOCOMO_SPICT);
+       save->LCM_GPE     = locomo_readl(lchip->base + LOCOMO_GPE);     /* GPIO 
*/
+       locomo_writel(0x00, lchip->base + LOCOMO_GPE);
+       save->LCM_ASD     = locomo_readl(lchip->base + LOCOMO_ASD);     /* 
ADSTART */
+       locomo_writel(0x00, lchip->base + LOCOMO_ASD);
+       save->LCM_SPIMD   = locomo_readl(lchip->base + LOCOMO_SPIMD);   /* SPI 
*/
+       locomo_writel(0x3C14, lchip->base + LOCOMO_SPIMD);
+
+       locomo_writel(0x00, lchip->base + LOCOMO_PAIF);
+       locomo_writel(0x00, lchip->base + LOCOMO_DAC);
+       locomo_writel(0x00, lchip->base + LOCOMO_BACKLIGHT + LOCOMO_TC);
+
+       if ( (locomo_readl(lchip->base + LOCOMO_LED + LOCOMO_LPT0) & 0x88) && 
(locomo_readl(lchip->base + LOCOMO_LED + LOCOMO_LPT1) & 0x88) )
+               locomo_writel(0x00, lchip->base + LOCOMO_C32K);         /* 
CLK32 off */
+       else
+               /* 18MHz already enabled, so no wait */
+               locomo_writel(0xc1, lchip->base + LOCOMO_C32K);         /* 
CLK32 on */
+
+       locomo_writel(0x00, lchip->base + LOCOMO_TADC);         /* 18MHz clock 
off*/
+       locomo_writel(0x00, lchip->base + LOCOMO_AUDIO + LOCOMO_ACC);           
        /* 22MHz/24MHz clock off */
+       locomo_writel(0x00, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS);      
                /* FL */
+
+       spin_unlock_irqrestore(&lchip->lock, flags);
+
+       return 0;
+}
+
+static int locomo_resume(struct device *dev, u32 level)
+{
+       struct locomo *lchip = dev_get_drvdata(dev);
+       struct locomo_save_data *save;
+       unsigned long r;
+       unsigned long flags;
+       
+       if (level != RESUME_ENABLE)
+               return 0;
+
+       save = (struct locomo_save_data *) dev->power.saved_state;
+       if (!save)
+               return 0;
+
+       spin_lock_irqsave(&lchip->lock, flags);
+
+       locomo_writel(save->LCM_GPO, lchip->base + LOCOMO_GPO);
+       locomo_writel(save->LCM_SPICT, lchip->base + LOCOMO_SPICT);
+       locomo_writel(save->LCM_GPE, lchip->base + LOCOMO_GPE);
+       locomo_writel(save->LCM_ASD, lchip->base + LOCOMO_ASD);
+       locomo_writel(save->LCM_SPIMD, lchip->base + LOCOMO_SPIMD);
+
+       locomo_writel(0x00, lchip->base + LOCOMO_C32K);
+       locomo_writel(0x90, lchip->base + LOCOMO_TADC);
+
+       locomo_writel(0, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KSC);
+       r = locomo_readl(lchip->base + LOCOMO_KEYBOARD + LOCOMO_KIC);
+       r &= 0xFEFF;
+       locomo_writel(r, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KIC);
+       locomo_writel(0x1, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KCMD);
+
+       spin_unlock_irqrestore(&lchip->lock, flags);
+
+       dev->power.saved_state = NULL;
+       kfree(save);
+
+       return 0;
+}
+#endif
+
 /**
  *     locomo_probe - probe for a single LoCoMo chip.
  *     @phys_addr: physical address of device.
@@ -651,15 +748,15 @@
        return ret;
 }
 
-static void __locomo_remove(struct locomo *lchip)
+static int locomo_remove_child(struct device *dev, void *data)
 {
-       struct list_head *l, *n;
-
-       list_for_each_safe(l, n, &lchip->dev->children) {
-               struct device *d = list_to_dev(l);
+       device_unregister(dev);
+       return 0;
+} 
 
-               device_unregister(d);
-       }
+static void __locomo_remove(struct locomo *lchip)
+{
+       device_for_each_child(lchip->dev, NULL, locomo_remove_child);
 
        if (lchip->irq != NO_IRQ) {
                set_irq_chained_handler(lchip->irq, NULL);
@@ -707,6 +804,10 @@
        .bus            = &platform_bus_type,
        .probe          = locomo_probe,
        .remove         = locomo_remove,
+#ifdef CONFIG_PM
+       .suspend        = locomo_suspend,
+       .resume         = locomo_resume,
+#endif
 };
 
 /*
diff -urN linux/arch/arm/common/sa1111.c linux/arch/arm/common/sa1111.c
--- linux/arch/arm/common/sa1111.c      2005/07/11 20:45:58     1.26
+++ linux/arch/arm/common/sa1111.c      2005/09/15 08:52:42     1.27
@@ -268,8 +268,8 @@
        .mask           = sa1111_mask_lowirq,
        .unmask         = sa1111_unmask_lowirq,
        .retrigger      = sa1111_retrigger_lowirq,
-       .type           = sa1111_type_lowirq,
-       .wake           = sa1111_wake_lowirq,
+       .set_type       = sa1111_type_lowirq,
+       .set_wake       = sa1111_wake_lowirq,
 };
 
 static void sa1111_mask_highirq(unsigned int irq)
@@ -364,8 +364,8 @@
        .mask           = sa1111_mask_highirq,
        .unmask         = sa1111_unmask_highirq,
        .retrigger      = sa1111_retrigger_highirq,
-       .type           = sa1111_type_highirq,
-       .wake           = sa1111_wake_highirq,
+       .set_type       = sa1111_type_highirq,
+       .set_wake       = sa1111_wake_highirq,
 };
 
 static void sa1111_setup_irq(struct sa1111 *sachip)
diff -urN linux/arch/arm/common/scoop.c linux/arch/arm/common/scoop.c
--- linux/arch/arm/common/scoop.c       2005/03/18 17:36:45     1.3
+++ linux/arch/arm/common/scoop.c       2005/09/15 08:52:42     1.4
@@ -17,6 +17,12 @@
 
 #define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr)))
 
+/* PCMCIA to Scoop linkage structures for pxa2xx_sharpsl.c
+   There is no easy way to link multiple scoop devices into one
+   single entity for the pxa2xx_pcmcia device */
+int scoop_num;
+struct scoop_pcmcia_dev *scoop_devs;
+
 struct  scoop_dev {
        void  *base;
        spinlock_t scoop_lock;
@@ -85,7 +91,7 @@
 EXPORT_SYMBOL(write_scoop_reg);
 
 #ifdef CONFIG_PM
-static int scoop_suspend(struct device *dev, uint32_t state, uint32_t level)
+static int scoop_suspend(struct device *dev, pm_message_t state, uint32_t 
level)
 {
        if (level == SUSPEND_POWER_DOWN) {
                struct scoop_dev *sdev = dev_get_drvdata(dev);
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       2005/07/13 11:48:50     
1.3
+++ linux/arch/arm/configs/omap_h2_1610_defconfig       2005/09/15 08:52:42     
1.4
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.13-rc2
-# Fri Jul  8 04:49:34 2005
+# Linux kernel version: 2.6.13
+# Mon Sep  5 18:07:12 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -102,9 +102,11 @@
 # CONFIG_OMAP_MPU_TIMER is not set
 CONFIG_OMAP_32K_TIMER=y
 CONFIG_OMAP_32K_TIMER_HZ=128
+# CONFIG_OMAP_DM_TIMER is not set
 CONFIG_OMAP_LL_DEBUG_UART1=y
 # CONFIG_OMAP_LL_DEBUG_UART2 is not set
 # CONFIG_OMAP_LL_DEBUG_UART3 is not set
+CONFIG_OMAP_SERIAL_WAKE=y
 
 #
 # OMAP Core Type
@@ -166,7 +168,6 @@
 #
 # Kernel Features
 #
-# CONFIG_SMP is not set
 CONFIG_PREEMPT=y
 CONFIG_NO_IDLE_HZ=y
 # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
@@ -230,6 +231,68 @@
 # CONFIG_APM is not set
 
 #
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP 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_FIB_HASH=y
+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_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# 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
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+
+#
 # Device Drivers
 #
 
@@ -243,78 +306,7 @@
 #
 # Memory Technology Devices (MTD)
 #
-CONFIG_MTD=y
-CONFIG_MTD_DEBUG=y
-CONFIG_MTD_DEBUG_VERBOSE=3
-# CONFIG_MTD_CONCAT is not set
-CONFIG_MTD_PARTITIONS=y
-# 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
+# CONFIG_MTD is not set
 
 #
 # Parallel port support
@@ -403,72 +395,8 @@
 #
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
+# Network device support
 #
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP 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_FIB_HASH=y
-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_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-# 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
@@ -518,6 +446,8 @@
 # CONFIG_SLIP_MODE_SLIP6 is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -615,77 +545,15 @@
 #
 # 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
+# CONFIG_I2C is not set
+# CONFIG_I2C_SENSOR is not set
+CONFIG_ISP1301_OMAP=y
 
 #
-# Hardware Sensors Chip support
+# Hardware Monitoring 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_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM 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_LM92 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
-# CONFIG_SENSORS_W83627EHF is not set
-
-#
-# Other I2C Chip support
-#
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
-CONFIG_ISP1301_OMAP=y
-CONFIG_TPS65010=y
-# CONFIG_SENSORS_MAX6875 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
+CONFIG_HWMON=y
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Misc devices
@@ -756,15 +624,9 @@
 # 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
 
 #
@@ -810,6 +672,7 @@
 # CONFIG_JBD is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
 
 #
 # XFS support
@@ -817,6 +680,7 @@
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=y
+CONFIG_INOTIFY=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -857,15 +721,6 @@
 # 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
@@ -1007,4 +862,3 @@
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=y
diff -urN linux/arch/arm/configs/s3c2410_defconfig 
linux/arch/arm/configs/s3c2410_defconfig
--- linux/arch/arm/configs/s3c2410_defconfig    2005/08/01 18:23:37     1.12
+++ linux/arch/arm/configs/s3c2410_defconfig    2005/09/15 08:52:42     1.13
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-git4
-# Wed Jun 22 15:56:42 2005
+# Linux kernel version: 2.6.13-git8
+# Thu Sep  8 19:24:02 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -22,6 +22,7 @@
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 # CONFIG_POSIX_MQUEUE is not set
@@ -31,6 +32,7 @@
 # CONFIG_HOTPLUG is not set
 CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
+CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
@@ -88,7 +90,9 @@
 #
 # S3C24XX Implementations
 #
+CONFIG_MACH_ANUBIS=y
 CONFIG_ARCH_BAST=y
+CONFIG_BAST_PC104_IRQ=y
 CONFIG_ARCH_H1940=y
 CONFIG_MACH_N30=y
 CONFIG_ARCH_SMDK2410=y
@@ -112,6 +116,7 @@
 # CONFIG_S3C2410_DMA_DEBUG is not set
 # CONFIG_S3C2410_PM_DEBUG is not set
 # CONFIG_S3C2410_PM_CHECK is not set
+CONFIG_PM_SIMTEC=y
 CONFIG_S3C2410_LOWLEVEL_UART_PORT=0
 
 #
@@ -149,7 +154,15 @@
 #
 # CONFIG_SMP is not set
 # CONFIG_PREEMPT is not set
-# CONFIG_DISCONTIGMEM is not set
+# CONFIG_NO_IDLE_HZ is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -186,6 +199,74 @@
 CONFIG_APM=y
 
 #
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_PACKET 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_FIB_HASH=y
+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_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP 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
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
 # Device Drivers
 #
 
@@ -258,6 +339,7 @@
 # CONFIG_MTD_IMPA7 is not set
 CONFIG_MTD_BAST=y
 CONFIG_MTD_BAST_MAXSIZE=4
+# CONFIG_MTD_PLATRAM is not set
 
 #
 # Self-contained MTD device drivers
@@ -312,7 +394,6 @@
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
 
 #
@@ -354,6 +435,7 @@
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
 
 #
@@ -376,70 +458,8 @@
 #
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
+# Network device support
 #
-# CONFIG_PACKET is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-CONFIG_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-# 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
-# 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
@@ -447,6 +467,11 @@
 # CONFIG_TUN is not set
 
 #
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
@@ -480,6 +505,8 @@
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -562,7 +589,6 @@
 CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 # CONFIG_SERIAL_8250_DETECT_IRQ is not set
-# CONFIG_SERIAL_8250_MULTIPORT is not set
 # CONFIG_SERIAL_8250_RSA is not set
 
 #
@@ -605,7 +631,6 @@
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
@@ -628,7 +653,7 @@
 #
 # I2C Hardware Bus support
 #
-# CONFIG_I2C_ISA is not set
+CONFIG_I2C_ISA=m
 # CONFIG_I2C_PARPORT is not set
 # CONFIG_I2C_PARPORT_LIGHT is not set
 CONFIG_I2C_S3C2410=y
@@ -636,14 +661,33 @@
 # CONFIG_I2C_PCA_ISA is not set
 
 #
-# Hardware Sensors Chip support
+# Miscellaneous I2C Chip support
 #
-CONFIG_I2C_SENSOR=m
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+CONFIG_SENSORS_EEPROM=m
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 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
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+CONFIG_HWMON_VID=m
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
 # CONFIG_SENSORS_ADM1026 is not set
 # CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
 # CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_FSCHER is not set
 # CONFIG_SENSORS_FSCPOS is not set
@@ -662,27 +706,21 @@
 # CONFIG_SENSORS_LM92 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_SMSC47B397 is not set
 # CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83792D is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
-# Other I2C Chip support
+# Misc devices
 #
-# CONFIG_SENSORS_DS1337 is not set
-CONFIG_SENSORS_EEPROM=m
-# 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
 
 #
-# Misc devices
+# Multimedia Capabilities Port drivers
 #
 
 #
@@ -731,7 +769,7 @@
 # USB support
 #
 CONFIG_USB_ARCH_HAS_HCD=y
-# CONFIG_USB_ARCH_HAS_OHCI is not set
+CONFIG_USB_ARCH_HAS_OHCI=y
 # CONFIG_USB is not set
 
 #
@@ -749,6 +787,7 @@
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
@@ -758,6 +797,7 @@
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
 
 #
 # XFS support
@@ -765,6 +805,7 @@
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=y
+CONFIG_INOTIFY=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -791,11 +832,11 @@
 #
 CONFIG_PROC_FS=y
 CONFIG_SYSFS=y
-# CONFIG_DEVPTS_FS_XATTR is not set
 # CONFIG_TMPFS is not set
 # CONFIG_HUGETLBFS is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_RELAYFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -812,8 +853,7 @@
 # CONFIG_JFFS_PROC_FS is not set
 CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-# CONFIG_JFFS2_FS_NOR_ECC is not set
+CONFIG_JFFS2_FS_WRITEBUFFER=y
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -835,6 +875,7 @@
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -920,6 +961,7 @@
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_MAGIC_SYSRQ is not set
 CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_SPINLOCK is not set
diff -urN linux/arch/arm/kernel/calls.S linux/arch/arm/kernel/calls.S
--- linux/arch/arm/kernel/calls.S       2005/08/24 16:22:48     1.29
+++ linux/arch/arm/kernel/calls.S       2005/09/15 08:52:42     1.30
@@ -10,7 +10,7 @@
  *  This file is included twice in entry-common.S
  */
 #ifndef NR_syscalls
-#define NR_syscalls 320
+#define NR_syscalls 328
 #else
 
 __syscall_start:
@@ -284,7 +284,7 @@
                .long   sys_fstatfs64
                .long   sys_tgkill
                .long   sys_utimes
-/* 270 */      .long   sys_fadvise64_64
+/* 270 */      .long   sys_arm_fadvise64_64_wrapper
                .long   sys_pciconfig_iobase
                .long   sys_pciconfig_read
                .long   sys_pciconfig_write
@@ -333,6 +333,9 @@
                .long   sys_inotify_init
                .long   sys_inotify_add_watch
                .long   sys_inotify_rm_watch
+               .long   sys_mbind_wrapper
+/* 320 */      .long   sys_get_mempolicy
+               .long   sys_set_mempolicy
 __syscall_end:
 
                .rept   NR_syscalls - (__syscall_end - __syscall_start) / 4
diff -urN linux/arch/arm/kernel/ecard.c linux/arch/arm/kernel/ecard.c
--- linux/arch/arm/kernel/ecard.c       2005/07/11 20:45:59     1.43
+++ linux/arch/arm/kernel/ecard.c       2005/09/15 08:52:42     1.44
@@ -585,7 +585,7 @@
 
                if (pending) {
                        struct irqdesc *d = irq_desc + ec->irq;
-                       d->handle(ec->irq, d, regs);
+                       desc_handle_irq(ec->irq, d, regs);
                        called ++;
                }
        }
@@ -632,7 +632,7 @@
                         * Serial cards should go in 0/1, ethernet/scsi in 2/3
                         * otherwise you will lose serial data at high speeds!
                         */
-                       d->handle(ec->irq, d, regs);
+                       desc_handle_irq(ec->irq, d, regs);
                } else {
                        printk(KERN_WARNING "card%d: interrupt from unclaimed "
                               "card???\n", slot);
diff -urN linux/arch/arm/kernel/entry-common.S 
linux/arch/arm/kernel/entry-common.S
--- linux/arch/arm/kernel/entry-common.S        2005/05/19 12:08:06     1.35
+++ linux/arch/arm/kernel/entry-common.S        2005/09/15 08:52:42     1.36
@@ -265,6 +265,14 @@
                str     r5, [sp, #4]            @ push sixth arg
                b       sys_futex
 
+sys_arm_fadvise64_64_wrapper:
+               str     r5, [sp, #4]            @ push r5 to stack
+               b       sys_arm_fadvise64_64
+
+sys_mbind_wrapper:
+               str     r5, [sp, #4]
+               b       sys_mbind
+
 /*
  * Note: off_4k (r5) is always units of 4K.  If we can't do the requested
  * offset, we return EINVAL.
diff -urN linux/arch/arm/kernel/entry-header.S 
linux/arch/arm/kernel/entry-header.S
--- linux/arch/arm/kernel/entry-header.S        2005/07/11 20:45:59     1.15
+++ linux/arch/arm/kernel/entry-header.S        2005/09/15 08:52:42     1.16
@@ -3,7 +3,7 @@
 #include <linux/linkage.h>
 
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/errno.h>
 #include <asm/thread_info.h>
 
diff -urN linux/arch/arm/kernel/head.S linux/arch/arm/kernel/head.S
--- linux/arch/arm/kernel/head.S        2005/07/12 09:18:55     1.19
+++ linux/arch/arm/kernel/head.S        2005/09/15 08:52:42     1.20
@@ -20,7 +20,7 @@
 #include <asm/mach-types.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
 #include <asm/system.h>
 
diff -urN linux/arch/arm/kernel/irq.c linux/arch/arm/kernel/irq.c
--- linux/arch/arm/kernel/irq.c 2005/07/11 20:45:59     1.48
+++ linux/arch/arm/kernel/irq.c 2005/09/15 08:52:42     1.49
@@ -207,8 +207,8 @@
        unsigned long flags;
 
        spin_lock_irqsave(&irq_controller_lock, flags);
-       if (desc->chip->wake)
-               desc->chip->wake(irq, 1);
+       if (desc->chip->set_wake)
+               desc->chip->set_wake(irq, 1);
        spin_unlock_irqrestore(&irq_controller_lock, flags);
 }
 EXPORT_SYMBOL(enable_irq_wake);
@@ -219,8 +219,8 @@
        unsigned long flags;
 
        spin_lock_irqsave(&irq_controller_lock, flags);
-       if (desc->chip->wake)
-               desc->chip->wake(irq, 0);
+       if (desc->chip->set_wake)
+               desc->chip->set_wake(irq, 0);
        spin_unlock_irqrestore(&irq_controller_lock, flags);
 }
 EXPORT_SYMBOL(disable_irq_wake);
@@ -517,7 +517,7 @@
                list_for_each_safe(l, n, &head) {
                        desc = list_entry(l, struct irqdesc, pend);
                        list_del_init(&desc->pend);
-                       desc->handle(desc - irq_desc, desc, regs);
+                       desc_handle_irq(desc - irq_desc, desc, regs);
                }
 
                /*
@@ -545,7 +545,7 @@
 
        irq_enter();
        spin_lock(&irq_controller_lock);
-       desc->handle(irq, desc, regs);
+       desc_handle_irq(irq, desc, regs);
 
        /*
         * Now re-run any pending interrupts.
@@ -624,9 +624,9 @@
        }
 
        desc = irq_desc + irq;
-       if (desc->chip->type) {
+       if (desc->chip->set_type) {
                spin_lock_irqsave(&irq_controller_lock, flags);
-               ret = desc->chip->type(irq, type);
+               ret = desc->chip->set_type(irq, type);
                spin_unlock_irqrestore(&irq_controller_lock, flags);
        }
 
@@ -846,8 +846,8 @@
 
                irq_desc[i].probing = 1;
                irq_desc[i].triggered = 0;
-               if (irq_desc[i].chip->type)
-                       irq_desc[i].chip->type(i, IRQT_PROBE);
+               if (irq_desc[i].chip->set_type)
+                       irq_desc[i].chip->set_type(i, IRQT_PROBE);
                irq_desc[i].chip->unmask(i);
                irqs += 1;
        }
diff -urN linux/arch/arm/kernel/iwmmxt.S linux/arch/arm/kernel/iwmmxt.S
--- linux/arch/arm/kernel/iwmmxt.S      2004/08/24 15:10:03     1.1
+++ linux/arch/arm/kernel/iwmmxt.S      2005/09/15 08:52:42     1.2
@@ -17,7 +17,7 @@
 #include <linux/linkage.h>
 #include <asm/ptrace.h>
 #include <asm/thread_info.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 
 #define MMX_WR0                        (0x00)
 #define MMX_WR1                        (0x08)
diff -urN linux/arch/arm/kernel/signal.c linux/arch/arm/kernel/signal.c
--- linux/arch/arm/kernel/signal.c      2005/07/11 20:45:59     1.50
+++ linux/arch/arm/kernel/signal.c      2005/09/15 08:52:42     1.51
@@ -658,11 +658,12 @@
        /*
         * Block the signal if we were unsuccessful.
         */
-       if (ret != 0 || !(ka->sa.sa_flags & SA_NODEFER)) {
+       if (ret != 0) {
                spin_lock_irq(&tsk->sighand->siglock);
                sigorsets(&tsk->blocked, &tsk->blocked,
                          &ka->sa.sa_mask);
-               sigaddset(&tsk->blocked, sig);
+               if (!(ka->sa.sa_flags & SA_NODEFER))
+                       sigaddset(&tsk->blocked, sig);
                recalc_sigpending();
                spin_unlock_irq(&tsk->sighand->siglock);
        }
diff -urN linux/arch/arm/kernel/smp.c linux/arch/arm/kernel/smp.c
--- linux/arch/arm/kernel/smp.c 2005/08/03 15:50:24     1.6
+++ linux/arch/arm/kernel/smp.c 2005/09/15 08:52:42     1.7
@@ -110,7 +110,7 @@
         * We need to tell the secondary core where to find
         * its stack and the page tables.
         */
-       secondary_data.stack = (void *)idle->thread_info + THREAD_SIZE - 8;
+       secondary_data.stack = (void *)idle->thread_info + THREAD_START_SP;
        secondary_data.pgdir = virt_to_phys(pgd);
        wmb();
 
diff -urN linux/arch/arm/kernel/sys_arm.c linux/arch/arm/kernel/sys_arm.c
--- linux/arch/arm/kernel/sys_arm.c     2005/05/19 12:08:06     1.40
+++ linux/arch/arm/kernel/sys_arm.c     2005/09/15 08:52:42     1.41
@@ -311,3 +311,13 @@
        return ret;
 }
 EXPORT_SYMBOL(execve);
+
+/*
+ * Since loff_t is a 64 bit type we avoid a lot of ABI hastle
+ * with a different argument ordering.
+ */
+asmlinkage long sys_arm_fadvise64_64(int fd, int advice,
+                                    loff_t offset, loff_t len)
+{
+       return sys_fadvise64_64(fd, offset, len, advice);
+}
diff -urN linux/arch/arm/kernel/time.c linux/arch/arm/kernel/time.c
--- linux/arch/arm/kernel/time.c        2005/07/11 20:45:59     1.45
+++ linux/arch/arm/kernel/time.c        2005/09/15 08:52:42     1.46
@@ -102,7 +102,7 @@
  */
 static inline void do_set_rtc(void)
 {
-       if (time_status & STA_UNSYNC || set_rtc == NULL)
+       if (!ntp_synced() || set_rtc == NULL)
                return;
 
        if (next_rtc_update &&
@@ -292,10 +292,7 @@
        set_normalized_timespec(&xtime, sec, nsec);
        set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
 
-       time_adjust = 0;                /* stop active adjtime() */
-       time_status |= STA_UNSYNC;
-       time_maxerror = NTP_PHASE_LIMIT;
-       time_esterror = NTP_PHASE_LIMIT;
+       ntp_clear();
        write_sequnlock_irq(&xtime_lock);
        clock_was_set();
        return 0;
@@ -433,10 +430,12 @@
 {
        struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick;
 
-       write_seqlock(&xtime_lock);
-       if (dyn_tick->state & DYN_TICK_ENABLED)
-               dyn_tick->reprogram(next_timer_interrupt() - jiffies);
-       write_sequnlock(&xtime_lock);
+       if (dyn_tick) {
+               write_seqlock(&xtime_lock);
+               if (dyn_tick->state & DYN_TICK_ENABLED)
+                       dyn_tick->reprogram(next_timer_interrupt() - jiffies);
+               write_sequnlock(&xtime_lock);
+       }
 }
 
 static ssize_t timer_show_dyn_tick(struct sys_device *dev, char *buf)
diff -urN linux/arch/arm/lib/copy_page.S linux/arch/arm/lib/copy_page.S
--- linux/arch/arm/lib/copy_page.S      2003/06/05 18:23:57     1.5
+++ linux/arch/arm/lib/copy_page.S      2005/09/15 08:52:43     1.6
@@ -11,7 +11,7 @@
  */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 
 #define COPY_COUNT (PAGE_SZ/64 PLD( -1 ))
 
diff -urN linux/arch/arm/lib/csumpartialcopyuser.S 
linux/arch/arm/lib/csumpartialcopyuser.S
--- linux/arch/arm/lib/csumpartialcopyuser.S    2003/06/05 12:25:45     1.6
+++ linux/arch/arm/lib/csumpartialcopyuser.S    2005/09/15 08:52:43     1.7
@@ -13,7 +13,7 @@
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/errno.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 
                .text
 
diff -urN linux/arch/arm/lib/getuser.S linux/arch/arm/lib/getuser.S
--- linux/arch/arm/lib/getuser.S        2004/12/27 02:15:48     1.6
+++ linux/arch/arm/lib/getuser.S        2005/09/15 08:52:43     1.7
@@ -26,7 +26,7 @@
  * Note that ADDR_LIMIT is either 0 or 0xc0000000.
  * Note also that it is intended that __get_user_bad is not global.
  */
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
 #include <asm/errno.h>
 
diff -urN linux/arch/arm/lib/putuser.S linux/arch/arm/lib/putuser.S
--- linux/arch/arm/lib/putuser.S        2004/12/27 02:15:48     1.7
+++ linux/arch/arm/lib/putuser.S        2005/09/15 08:52:43     1.8
@@ -26,7 +26,7 @@
  * Note that ADDR_LIMIT is either 0 or 0xc0000000
  * Note also that it is intended that __put_user_bad is not global.
  */
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
 #include <asm/errno.h>
 
diff -urN linux/arch/arm/mach-clps7500/core.c 
linux/arch/arm/mach-clps7500/core.c
--- linux/arch/arm/mach-clps7500/core.c 2005/07/12 09:18:56     1.11
+++ linux/arch/arm/mach-clps7500/core.c 2005/09/15 08:52:43     1.12
@@ -354,7 +354,7 @@
 
 static struct platform_device serial_device = {
        .name                   = "serial8250",
-       .id                     = 0,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = serial_platform_data,
        },
diff -urN linux/arch/arm/mach-ebsa110/core.c linux/arch/arm/mach-ebsa110/core.c
--- linux/arch/arm/mach-ebsa110/core.c  2005/07/12 09:18:56     1.9
+++ linux/arch/arm/mach-ebsa110/core.c  2005/09/15 08:52:43     1.10
@@ -219,7 +219,7 @@
 
 static struct platform_device serial_device = {
        .name                   = "serial8250",
-       .id                     = 0,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = serial_platform_data,
        },
diff -urN linux/arch/arm/mach-epxa10db/arch.c 
linux/arch/arm/mach-epxa10db/arch.c
--- linux/arch/arm/mach-epxa10db/arch.c 2005/07/12 09:18:56     1.9
+++ linux/arch/arm/mach-epxa10db/arch.c 2005/09/15 08:52:44     1.10
@@ -52,7 +52,7 @@
 
 static struct platform_device serial_device = {
        .name                   = "serial8250",
-       .id                     = 0,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = serial_platform_data,
        },
diff -urN linux/arch/arm/mach-footbridge/Kconfig 
linux/arch/arm/mach-footbridge/Kconfig
--- linux/arch/arm/mach-footbridge/Kconfig      2005/05/19 12:08:07     1.6
+++ linux/arch/arm/mach-footbridge/Kconfig      2005/09/15 08:52:44     1.7
@@ -87,6 +87,7 @@
 
 # EBSA285 board in either host or addin mode
 config ARCH_EBSA285
+       select ARCH_MAY_HAVE_PC_FDC
        bool
 
 endif
diff -urN linux/arch/arm/mach-footbridge/isa-irq.c 
linux/arch/arm/mach-footbridge/isa-irq.c
--- linux/arch/arm/mach-footbridge/isa-irq.c    2003/06/22 23:09:47     1.6
+++ linux/arch/arm/mach-footbridge/isa-irq.c    2005/09/15 08:52:44     1.7
@@ -95,7 +95,7 @@
        }
 
        desc = irq_desc + isa_irq;
-       desc->handle(isa_irq, desc, regs);
+       desc_handle_irq(isa_irq, desc, regs);
 }
 
 static struct irqaction irq_cascade = { .handler = no_action, .name = 
"cascade", };
diff -urN linux/arch/arm/mach-footbridge/isa.c 
linux/arch/arm/mach-footbridge/isa.c
--- linux/arch/arm/mach-footbridge/isa.c        2004/11/15 11:49:14     1.1
+++ linux/arch/arm/mach-footbridge/isa.c        2005/09/15 08:52:44     1.2
@@ -34,7 +34,7 @@
 
 static struct platform_device serial_device = {
        .name                   = "serial8250",
-       .id                     = 0,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = serial_platform_data,
        },
diff -urN linux/arch/arm/mach-h720x/common.c linux/arch/arm/mach-h720x/common.c
--- linux/arch/arm/mach-h720x/common.c  2004/10/12 14:36:31     1.1
+++ linux/arch/arm/mach-h720x/common.c  2005/09/15 08:52:44     1.2
@@ -108,7 +108,7 @@
        while (mask) {
                if (mask & 1) {
                        IRQDBG("handling irq %d\n", irq);
-                       desc->handle(irq, desc, regs);
+                       desc_handle_irq(irq, desc, regs);
                }
                irq++;
                desc++;
diff -urN linux/arch/arm/mach-h720x/cpu-h7202.c 
linux/arch/arm/mach-h720x/cpu-h7202.c
--- linux/arch/arm/mach-h720x/cpu-h7202.c       2005/07/11 20:46:01     1.5
+++ linux/arch/arm/mach-h720x/cpu-h7202.c       2005/09/15 08:52:44     1.6
@@ -90,7 +90,7 @@
 
 static struct platform_device serial_device = {
        .name                   = "serial8250",
-       .id                     = 0,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = serial_platform_data,
        },
@@ -126,7 +126,7 @@
        desc = irq_desc + irq;
        while (mask) {
                if (mask & 1)
-                       desc->handle(irq, desc, regs);
+                       desc_handle_irq(irq, desc, regs);
                irq++;
                desc++;
                mask >>= 1;
diff -urN linux/arch/arm/mach-imx/irq.c linux/arch/arm/mach-imx/irq.c
--- linux/arch/arm/mach-imx/irq.c       2004/08/24 15:10:03     1.1
+++ linux/arch/arm/mach-imx/irq.c       2005/09/15 08:52:44     1.2
@@ -152,7 +152,7 @@
        while (mask) {
                if (mask & 1) {
                        DEBUG_IRQ("handling irq %d\n", irq);
-                       desc->handle(irq, desc, regs);
+                       desc_handle_irq(irq, desc, regs);
                }
                irq++;
                desc++;
@@ -214,7 +214,7 @@
        .ack = imx_gpio_ack_irq,
        .mask = imx_gpio_mask_irq,
        .unmask = imx_gpio_unmask_irq,
-       .type = imx_gpio_irq_type,
+       .set_type = imx_gpio_irq_type,
 };
 
 void __init
diff -urN linux/arch/arm/mach-integrator/integrator_cp.c 
linux/arch/arm/mach-integrator/integrator_cp.c
--- linux/arch/arm/mach-integrator/integrator_cp.c      2005/07/12 09:18:57     
1.9
+++ linux/arch/arm/mach-integrator/integrator_cp.c      2005/09/15 08:52:44     
1.10
@@ -170,7 +170,7 @@
                irq += IRQ_SIC_START;
 
                desc = irq_desc + irq;
-               desc->handle(irq, desc, regs);
+               desc_handle_irq(irq, desc, regs);
        } while (status);
 }
 
diff -urN linux/arch/arm/mach-iop3xx/iop321-time.c 
linux/arch/arm/mach-iop3xx/iop321-time.c
--- linux/arch/arm/mach-iop3xx/iop321-time.c    2005/07/11 20:46:02     1.9
+++ linux/arch/arm/mach-iop3xx/iop321-time.c    2005/09/15 08:52:44     1.10
@@ -60,7 +60,7 @@
        /*
         * Now convert them to usec.
         */
-       usec = (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH;
+       usec = (unsigned long)(elapsed / (CLOCK_TICK_RATE/1000000));
 
        return usec;
 }
diff -urN linux/arch/arm/mach-iop3xx/iop331-time.c 
linux/arch/arm/mach-iop3xx/iop331-time.c
--- linux/arch/arm/mach-iop3xx/iop331-time.c    2005/07/11 20:46:02     1.4
+++ linux/arch/arm/mach-iop3xx/iop331-time.c    2005/09/15 08:52:44     1.5
@@ -58,7 +58,7 @@
        /*
         * Now convert them to usec.
         */
-       usec = (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH;
+       usec = (unsigned long)(elapsed / (CLOCK_TICK_RATE/1000000));
 
        return usec;
 }
diff -urN linux/arch/arm/mach-ixp2000/core.c linux/arch/arm/mach-ixp2000/core.c
--- linux/arch/arm/mach-ixp2000/core.c  2005/07/13 11:48:50     1.11
+++ linux/arch/arm/mach-ixp2000/core.c  2005/09/15 08:52:45     1.12
@@ -174,7 +174,7 @@
 
 static struct platform_device ixp2000_serial_device = {
        .name           = "serial8250",
-       .id             = 0,
+       .id             = PLAT8250_DEV_PLATFORM,
        .dev            = {
                .platform_data          = ixp2000_serial_port,
        },
@@ -317,7 +317,7 @@
        for (i = 0; i <= 7; i++) {
                if (status & (1<<i)) {
                        desc = irq_desc + i + IRQ_IXP2000_GPIO0;
-                       desc->handle(i + IRQ_IXP2000_GPIO0, desc, regs);
+                       desc_handle_irq(i + IRQ_IXP2000_GPIO0, desc, regs);
                }
        }
 }
@@ -380,10 +380,10 @@
 }
 
 static struct irqchip ixp2000_GPIO_irq_chip = {
-       .type   = ixp2000_GPIO_irq_type,
-       .ack    = ixp2000_GPIO_irq_mask_ack,
-       .mask   = ixp2000_GPIO_irq_mask,
-       .unmask = ixp2000_GPIO_irq_unmask
+       .ack            = ixp2000_GPIO_irq_mask_ack,
+       .mask           = ixp2000_GPIO_irq_mask,
+       .unmask         = ixp2000_GPIO_irq_unmask,
+       .set_type       = ixp2000_GPIO_irq_type,
 };
 
 static void ixp2000_pci_irq_mask(unsigned int irq)
diff -urN linux/arch/arm/mach-ixp2000/ixdp2x00.c 
linux/arch/arm/mach-ixp2000/ixdp2x00.c
--- linux/arch/arm/mach-ixp2000/ixdp2x00.c      2005/07/13 11:48:50     1.6
+++ linux/arch/arm/mach-ixp2000/ixdp2x00.c      2005/09/15 08:52:45     1.7
@@ -133,7 +133,7 @@
                        struct irqdesc *cpld_desc;
                        int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
                        cpld_desc = irq_desc + cpld_irq;
-                       cpld_desc->handle(cpld_irq, cpld_desc, regs);
+                       desc_handle_irq(cpld_irq, cpld_desc, regs);
                }
        }
 
diff -urN linux/arch/arm/mach-ixp2000/ixdp2x01.c 
linux/arch/arm/mach-ixp2000/ixdp2x01.c
--- linux/arch/arm/mach-ixp2000/ixdp2x01.c      2005/07/13 11:48:50     1.7
+++ linux/arch/arm/mach-ixp2000/ixdp2x01.c      2005/09/15 08:52:45     1.8
@@ -82,7 +82,7 @@
                        struct irqdesc *cpld_desc;
                        int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
                        cpld_desc = irq_desc + cpld_irq;
-                       cpld_desc->handle(cpld_irq, cpld_desc, regs);
+                       desc_handle_irq(cpld_irq, cpld_desc, regs);
                }
        }
 
diff -urN linux/arch/arm/mach-ixp4xx/common.c 
linux/arch/arm/mach-ixp4xx/common.c
--- linux/arch/arm/mach-ixp4xx/common.c 2005/07/11 20:46:02     1.10
+++ linux/arch/arm/mach-ixp4xx/common.c 2005/09/15 08:52:45     1.11
@@ -38,90 +38,6 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/time.h>
 
-enum ixp4xx_irq_type {
-       IXP4XX_IRQ_LEVEL, IXP4XX_IRQ_EDGE
-};
-static void ixp4xx_config_irq(unsigned irq, enum ixp4xx_irq_type type);
-
-/*************************************************************************
- * GPIO acces functions
- *************************************************************************/
-
-/*
- * Configure GPIO line for input, interrupt, or output operation
- *
- * TODO: Enable/disable the irq_desc based on interrupt or output mode.
- * TODO: Should these be named ixp4xx_gpio_?
- */
-void gpio_line_config(u8 line, u32 style)
-{
-       static const int gpio2irq[] = {
-               6, 7, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29
-       };
-       u32 enable;
-       volatile u32 *int_reg;
-       u32 int_style;
-       enum ixp4xx_irq_type irq_type;
-
-       enable = *IXP4XX_GPIO_GPOER;
-
-       if (style & IXP4XX_GPIO_OUT) {
-               enable &= ~((1) << line);
-       } else if (style & IXP4XX_GPIO_IN) {
-               enable |= ((1) << line);
-
-               switch (style & IXP4XX_GPIO_INTSTYLE_MASK)
-               {
-               case (IXP4XX_GPIO_ACTIVE_HIGH):
-                       int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH;
-                       irq_type = IXP4XX_IRQ_LEVEL;
-                       break;
-               case (IXP4XX_GPIO_ACTIVE_LOW):
-                       int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW;
-                       irq_type = IXP4XX_IRQ_LEVEL;
-                       break;
-               case (IXP4XX_GPIO_RISING_EDGE):
-                       int_style = IXP4XX_GPIO_STYLE_RISING_EDGE;
-                       irq_type = IXP4XX_IRQ_EDGE;
-                       break;
-               case (IXP4XX_GPIO_FALLING_EDGE):
-                       int_style = IXP4XX_GPIO_STYLE_FALLING_EDGE;
-                       irq_type = IXP4XX_IRQ_EDGE;
-                       break;
-               case (IXP4XX_GPIO_TRANSITIONAL):
-                       int_style = IXP4XX_GPIO_STYLE_TRANSITIONAL;
-                       irq_type = IXP4XX_IRQ_EDGE;
-                       break;
-               default:
-                       int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH;
-                       irq_type = IXP4XX_IRQ_LEVEL;
-                       break;
-               }
-
-               if (style & IXP4XX_GPIO_INTSTYLE_MASK)
-                       ixp4xx_config_irq(gpio2irq[line], irq_type);
-
-               if (line >= 8) {        /* pins 8-15 */ 
-                       line -= 8;
-                       int_reg = IXP4XX_GPIO_GPIT2R;
-               }
-               else {                  /* pins 0-7 */
-                       int_reg = IXP4XX_GPIO_GPIT1R;
-               }
-
-               /* Clear the style for the appropriate pin */
-               *int_reg &= ~(IXP4XX_GPIO_STYLE_CLEAR << 
-                               (line * IXP4XX_GPIO_STYLE_SIZE));
-
-               /* Set the new style */
-               *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE));
-       }
-
-       *IXP4XX_GPIO_GPOER = enable;
-}
-
-EXPORT_SYMBOL(gpio_line_config);
-
 /*************************************************************************
  * IXP4xx chipset I/O mapping
  *************************************************************************/
@@ -165,6 +81,69 @@
  *       (be it PCI or something else) configures that GPIO line
  *       as an IRQ.
  **************************************************************************/
+enum ixp4xx_irq_type {
+       IXP4XX_IRQ_LEVEL, IXP4XX_IRQ_EDGE
+};
+
+static void ixp4xx_config_irq(unsigned irq, enum ixp4xx_irq_type type);
+
+/*
+ * IRQ -> GPIO mapping table
+ */
+static int irq2gpio[32] = {
+       -1, -1, -1, -1, -1, -1,  0,  1,
+       -1, -1, -1, -1, -1, -1, -1, -1,
+       -1, -1, -1,  2,  3,  4,  5,  6,
+        7,  8,  9, 10, 11, 12, -1, -1,
+};
+
+static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
+{
+       int line = irq2gpio[irq];
+       u32 int_style;
+       enum ixp4xx_irq_type irq_type;
+       volatile u32 *int_reg;
+
+       /*
+        * Only for GPIO IRQs
+        */
+       if (line < 0)
+               return -EINVAL;
+
+       if (type & IRQT_BOTHEDGE) {
+               int_style = IXP4XX_GPIO_STYLE_TRANSITIONAL;
+               irq_type = IXP4XX_IRQ_EDGE;
+       } else  if (type & IRQT_RISING) {
+               int_style = IXP4XX_GPIO_STYLE_RISING_EDGE;
+               irq_type = IXP4XX_IRQ_EDGE;
+       } else if (type & IRQT_FALLING) {
+               int_style = IXP4XX_GPIO_STYLE_FALLING_EDGE;
+               irq_type = IXP4XX_IRQ_EDGE;
+       } else if (type & IRQT_HIGH) {
+               int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH;
+               irq_type = IXP4XX_IRQ_LEVEL;
+       } else if (type & IRQT_LOW) {
+               int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW;
+               irq_type = IXP4XX_IRQ_LEVEL;
+       }
+
+       ixp4xx_config_irq(irq, irq_type);
+
+       if (line >= 8) {        /* pins 8-15 */
+               line -= 8;
+               int_reg = IXP4XX_GPIO_GPIT2R;
+       } else {                /* pins 0-7 */
+               int_reg = IXP4XX_GPIO_GPIT1R;
+       }
+
+       /* Clear the style for the appropriate pin */
+       *int_reg &= ~(IXP4XX_GPIO_STYLE_CLEAR <<
+                       (line * IXP4XX_GPIO_STYLE_SIZE));
+
+       /* Set the new style */
+       *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE));
+}
+
 static void ixp4xx_irq_mask(unsigned int irq)
 {
        if (cpu_is_ixp46x() && irq >= 32)
@@ -183,12 +162,6 @@
 
 static void ixp4xx_irq_ack(unsigned int irq)
 {
-       static int irq2gpio[32] = {
-               -1, -1, -1, -1, -1, -1,  0,  1,
-               -1, -1, -1, -1, -1, -1, -1, -1,
-               -1, -1, -1,  2,  3,  4,  5,  6,
-                7,  8,  9, 10, 11, 12, -1, -1,
-       };
        int line = (irq < 32) ? irq2gpio[irq] : -1;
 
        if (line >= 0)
@@ -206,15 +179,17 @@
 }
 
 static struct irqchip ixp4xx_irq_level_chip = {
-       .ack    = ixp4xx_irq_mask,
-       .mask   = ixp4xx_irq_mask,
-       .unmask = ixp4xx_irq_level_unmask,
+       .ack            = ixp4xx_irq_mask,
+       .mask           = ixp4xx_irq_mask,
+       .unmask         = ixp4xx_irq_level_unmask,
+       .set_type       = ixp4xx_set_irq_type,
 };
 
 static struct irqchip ixp4xx_irq_edge_chip = {
-       .ack    = ixp4xx_irq_ack,
-       .mask   = ixp4xx_irq_mask,
-       .unmask = ixp4xx_irq_unmask,
+       .ack            = ixp4xx_irq_ack,
+       .mask           = ixp4xx_irq_mask,
+       .unmask         = ixp4xx_irq_unmask,
+       .set_type       = ixp4xx_set_irq_type,
 };
 
 static void ixp4xx_config_irq(unsigned irq, enum ixp4xx_irq_type type)
diff -urN linux/arch/arm/mach-ixp4xx/coyote-pci.c 
linux/arch/arm/mach-ixp4xx/coyote-pci.c
--- linux/arch/arm/mach-ixp4xx/coyote-pci.c     2005/01/25 04:27:53     1.2
+++ linux/arch/arm/mach-ixp4xx/coyote-pci.c     2005/09/15 08:52:45     1.3
@@ -30,11 +30,8 @@
 
 void __init coyote_pci_preinit(void)
 {
-       gpio_line_config(COYOTE_PCI_SLOT0_PIN,
-                       IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
-
-       gpio_line_config(COYOTE_PCI_SLOT1_PIN,
-                       IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
+       set_irq_type(IRQ_COYOTE_PCI_SLOT0, IRQT_LOW);
+       set_irq_type(IRQ_COYOTE_PCI_SLOT1, IRQT_LOW);
 
        gpio_line_isr_clear(COYOTE_PCI_SLOT0_PIN);
        gpio_line_isr_clear(COYOTE_PCI_SLOT1_PIN);
diff -urN linux/arch/arm/mach-ixp4xx/coyote-setup.c 
linux/arch/arm/mach-ixp4xx/coyote-setup.c
--- linux/arch/arm/mach-ixp4xx/coyote-setup.c   2005/08/29 16:15:19     1.12
+++ linux/arch/arm/mach-ixp4xx/coyote-setup.c   2005/09/15 08:52:45     1.13
@@ -24,11 +24,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 
-void __init coyote_map_io(void)
-{
-       ixp4xx_map_io();
-}
-
 static struct flash_platform_data coyote_flash_data = {
        .map_name       = "cfi_probe",
        .width          = 2,
@@ -71,7 +66,7 @@
 
 static struct platform_device coyote_uart = {
        .name           = "serial8250",
-       .id             = 0,
+       .id             = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = coyote_uart_data,
        },
@@ -107,7 +102,7 @@
        .phys_ram       = PHYS_OFFSET,
        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = coyote_map_io,
+       .map_io         = ixp4xx_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,
@@ -125,7 +120,7 @@
        .phys_ram       = PHYS_OFFSET,
        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = coyote_map_io,
+       .map_io         = ixp4xx_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,
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   2005/02/07 02:54:31     1.1
+++ linux/arch/arm/mach-ixp4xx/gtwx5715-pci.c   2005/09/15 08:52:45     1.2
@@ -35,26 +35,20 @@
 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);
-}
 
+/*
+ * 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.
+ */
 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);
+       set_irq_type(GTWX5715_PCI_SLOT0_INTA_IRQ, IRQT_LOW);
+       set_irq_type(GTWX5715_PCI_SLOT0_INTB_IRQ, IRQT_LOW);
+       set_irq_type(GTWX5715_PCI_SLOT1_INTA_IRQ, IRQT_LOW);
+       set_irq_type(GTWX5715_PCI_SLOT1_INTB_IRQ, IRQT_LOW);
 
        ixp4xx_pci_preinit();
 }
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 2005/08/29 16:15:19     1.4
+++ linux/arch/arm/mach-ixp4xx/gtwx5715-setup.c 2005/09/15 08:52:45     1.5
@@ -93,7 +93,7 @@
 
 static struct platform_device gtwx5715_uart_device = {
        .name           = "serial8250",
-       .id             = 0,
+       .id             = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = gtwx5715_uart_platform_data,
        },
@@ -101,12 +101,6 @@
        .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,
@@ -144,7 +138,7 @@
        .phys_ram       = PHYS_OFFSET,
        .phys_io        = IXP4XX_UART2_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_UART2_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = gtwx5715_map_io,
+       .map_io         = ixp4xx_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,
diff -urN linux/arch/arm/mach-ixp4xx/ixdp425-pci.c 
linux/arch/arm/mach-ixp4xx/ixdp425-pci.c
--- linux/arch/arm/mach-ixp4xx/ixdp425-pci.c    2005/01/25 04:27:53     1.3
+++ linux/arch/arm/mach-ixp4xx/ixdp425-pci.c    2005/09/15 08:52:45     1.4
@@ -27,14 +27,10 @@
 
 void __init ixdp425_pci_preinit(void)
 {
-       gpio_line_config(IXDP425_PCI_INTA_PIN,
-                               IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
-       gpio_line_config(IXDP425_PCI_INTB_PIN, 
-                               IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
-       gpio_line_config(IXDP425_PCI_INTC_PIN, 
-                               IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
-       gpio_line_config(IXDP425_PCI_INTD_PIN, 
-                               IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
+       set_irq_type(IRQ_IXDP425_PCI_INTA, IRQT_LOW);
+       set_irq_type(IRQ_IXDP425_PCI_INTB, IRQT_LOW);
+       set_irq_type(IRQ_IXDP425_PCI_INTC, IRQT_LOW);
+       set_irq_type(IRQ_IXDP425_PCI_INTD, IRQT_LOW);
 
        gpio_line_isr_clear(IXDP425_PCI_INTA_PIN);
        gpio_line_isr_clear(IXDP425_PCI_INTB_PIN);
diff -urN linux/arch/arm/mach-ixp4xx/ixdp425-setup.c 
linux/arch/arm/mach-ixp4xx/ixdp425-setup.c
--- linux/arch/arm/mach-ixp4xx/ixdp425-setup.c  2005/08/29 16:15:19     1.11
+++ linux/arch/arm/mach-ixp4xx/ixdp425-setup.c  2005/09/15 08:52:45     1.12
@@ -24,11 +24,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 
-void __init ixdp425_map_io(void) 
-{
-       ixp4xx_map_io();
-}
-
 static struct flash_platform_data ixdp425_flash_data = {
        .map_name       = "cfi_probe",
        .width          = 2,
@@ -101,7 +96,7 @@
 
 static struct platform_device ixdp425_uart = {
        .name                   = "serial8250",
-       .id                     = 0,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev.platform_data      = ixdp425_uart_data,
        .num_resources          = 2,
        .resource               = ixdp425_uart_resources
@@ -133,7 +128,7 @@
        .phys_ram       = PHYS_OFFSET,
        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = ixdp425_map_io,
+       .map_io         = ixp4xx_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,
@@ -145,7 +140,7 @@
        .phys_ram       = PHYS_OFFSET,
        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = ixdp425_map_io,
+       .map_io         = ixp4xx_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,
@@ -157,7 +152,7 @@
        .phys_ram       = PHYS_OFFSET,
        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = ixdp425_map_io,
+       .map_io         = ixp4xx_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,
@@ -176,7 +171,7 @@
        .phys_ram       = PHYS_OFFSET,
        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = ixdp425_map_io,
+       .map_io         = ixp4xx_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,
diff -urN linux/arch/arm/mach-ixp4xx/ixdpg425-pci.c 
linux/arch/arm/mach-ixp4xx/ixdpg425-pci.c
--- linux/arch/arm/mach-ixp4xx/ixdpg425-pci.c   2005/01/25 04:27:53     1.2
+++ linux/arch/arm/mach-ixp4xx/ixdpg425-pci.c   2005/09/15 08:52:45     1.3
@@ -29,8 +29,8 @@
 
 void __init ixdpg425_pci_preinit(void)
 {
-       gpio_line_config(6, IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
-       gpio_line_config(7, IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
+       set_irq_type(IRQ_IXP4XX_GPIO6, IRQT_LOW);
+       set_irq_type(IRQ_IXP4XX_GPIO7, IRQT_LOW);
 
        gpio_line_isr_clear(6);
        gpio_line_isr_clear(7);
diff -urN linux/arch/arm/mach-lh7a40x/common.h 
linux/arch/arm/mach-lh7a40x/common.h
--- linux/arch/arm/mach-lh7a40x/common.h        2005/03/18 17:36:46     1.3
+++ linux/arch/arm/mach-lh7a40x/common.h        2005/09/15 08:52:45     1.4
@@ -13,4 +13,4 @@
 extern void lh7a400_init_irq (void);
 extern void lh7a404_init_irq (void);
 
-#define IRQ_DISPATCH(irq) irq_desc[irq].handle ((irq), &irq_desc[irq], regs)
+#define IRQ_DISPATCH(irq) desc_handle_irq((irq),(irq_desc + irq), regs)
diff -urN linux/arch/arm/mach-omap1/devices.c 
linux/arch/arm/mach-omap1/devices.c
--- linux/arch/arm/mach-omap1/devices.c 1970/01/01 00:00:00
+++ linux/arch/arm/mach-omap1/devices.c 2005-09-15 09:52:46.243638000 +0100     
1.1
@@ -0,0 +1,351 @@
+/*
+ * linux/arch/arm/mach-omap1/devices.c
+ *
+ * OMAP1 platform device setup/initialization
+ *
+ * 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/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/device.h>
+
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/mach-types.h>
+#include <asm/mach/map.h>
+
+#include <asm/arch/tc.h>
+#include <asm/arch/board.h>
+#include <asm/arch/mux.h>
+#include <asm/arch/gpio.h>
+
+
+static void omap_nop_release(struct device *dev)
+{
+        /* Nothing */
+}
+
+/*-------------------------------------------------------------------------*/
+
+#if    defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
+
+#define        OMAP_I2C_BASE           0xfffb3800
+
+static struct resource i2c_resources[] = {
+       {
+               .start          = OMAP_I2C_BASE,
+               .end            = OMAP_I2C_BASE + 0x3f,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = INT_I2C,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+/* DMA not used; works around erratum writing to non-empty i2c fifo */
+
+static struct platform_device omap_i2c_device = {
+        .name           = "i2c_omap",
+        .id             = -1,
+        .dev = {
+                .release        = omap_nop_release,
+        },
+       .num_resources  = ARRAY_SIZE(i2c_resources),
+       .resource       = i2c_resources,
+};
+
+static void omap_init_i2c(void)
+{
+       /* FIXME define and use a boot tag, in case of boards that
+        * either don't wire up I2C, or chips that mux it differently...
+        * it can include clocking and address info, maybe more.
+        */
+       omap_cfg_reg(I2C_SCL);
+       omap_cfg_reg(I2C_SDA);
+
+       (void) platform_device_register(&omap_i2c_device);
+}
+#else
+static inline void omap_init_i2c(void) {}
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+#if    defined(CONFIG_OMAP1610_IR) || defined(CONFIG_OMAP161O_IR_MODULE)
+
+static u64 irda_dmamask = 0xffffffff;
+
+static struct platform_device omap1610ir_device = {
+       .name = "omap1610-ir",
+       .id = -1,
+       .dev = {
+               .release        = omap_nop_release,
+               .dma_mask       = &irda_dmamask,
+       },
+};
+
+static void omap_init_irda(void)
+{
+       /* FIXME define and use a boot tag, members something like:
+        *  u8          uart;           // uart1, or uart3
+        * ... but driver only handles uart3 for now
+        *  s16         fir_sel;        // gpio for SIR vs FIR
+        * ... may prefer a callback for SIR/MIR/FIR mode select;
+        * while h2 uses a GPIO, H3 uses a gpio expander
+        */
+       if (machine_is_omap_h2()
+                       || machine_is_omap_h3())
+               (void) platform_device_register(&omap1610ir_device);
+}
+#else
+static inline void omap_init_irda(void) {}
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+#if    defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+
+#define        OMAP_MMC1_BASE          0xfffb7800
+#define        OMAP_MMC2_BASE          0xfffb7c00      /* omap16xx only */
+
+static struct omap_mmc_conf mmc1_conf;
+
+static u64 mmc1_dmamask = 0xffffffff;
+
+static struct resource mmc1_resources[] = {
+       {
+               .start          = IO_ADDRESS(OMAP_MMC1_BASE),
+               .end            = IO_ADDRESS(OMAP_MMC1_BASE) + 0x7f,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = INT_MMC,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device mmc_omap_device1 = {
+       .name           = "mmci-omap",
+       .id             = 1,
+       .dev = {
+               .release        = omap_nop_release,
+               .dma_mask       = &mmc1_dmamask,
+               .platform_data  = &mmc1_conf,
+       },
+       .num_resources  = ARRAY_SIZE(mmc1_resources),
+       .resource       = mmc1_resources,
+};
+
+#ifdef CONFIG_ARCH_OMAP16XX
+
+static struct omap_mmc_conf mmc2_conf;
+
+static u64 mmc2_dmamask = 0xffffffff;
+
+static struct resource mmc2_resources[] = {
+       {
+               .start          = IO_ADDRESS(OMAP_MMC2_BASE),
+               .end            = IO_ADDRESS(OMAP_MMC2_BASE) + 0x7f,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = INT_1610_MMC2,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device mmc_omap_device2 = {
+       .name           = "mmci-omap",
+       .id             = 2,
+       .dev = {
+               .release        = omap_nop_release,
+               .dma_mask       = &mmc2_dmamask,
+               .platform_data  = &mmc2_conf,
+       },
+       .num_resources  = ARRAY_SIZE(mmc2_resources),
+       .resource       = mmc2_resources,
+};
+#endif
+
+static void __init omap_init_mmc(void)
+{
+       const struct omap_mmc_config    *mmc_conf;
+       const struct omap_mmc_conf      *mmc;
+
+       /* NOTE:  assumes MMC was never (wrongly) enabled */
+       mmc_conf = omap_get_config(OMAP_TAG_MMC, struct omap_mmc_config);
+       if (!mmc_conf)
+               return;
+
+       /* block 1 is always available and has just one pinout option */
+       mmc = &mmc_conf->mmc[0];
+       if (mmc->enabled) {
+               omap_cfg_reg(MMC_CMD);
+               omap_cfg_reg(MMC_CLK);
+               omap_cfg_reg(MMC_DAT0);
+               if (cpu_is_omap1710()) {
+                     omap_cfg_reg(M15_1710_MMC_CLKI);
+                     omap_cfg_reg(P19_1710_MMC_CMDDIR);
+                     omap_cfg_reg(P20_1710_MMC_DATDIR0);
+               }
+               if (mmc->wire4) {
+                       omap_cfg_reg(MMC_DAT1);
+                       /* NOTE:  DAT2 can be on W10 (here) or M15 */
+                       if (!mmc->nomux)
+                               omap_cfg_reg(MMC_DAT2);
+                       omap_cfg_reg(MMC_DAT3);
+               }
+               mmc1_conf = *mmc;
+               (void) platform_device_register(&mmc_omap_device1);
+       }
+
+#ifdef CONFIG_ARCH_OMAP16XX
+       /* block 2 is on newer chips, and has many pinout options */
+       mmc = &mmc_conf->mmc[1];
+       if (mmc->enabled) {
+               if (!mmc->nomux) {
+                       omap_cfg_reg(Y8_1610_MMC2_CMD);
+                       omap_cfg_reg(Y10_1610_MMC2_CLK);
+                       omap_cfg_reg(R18_1610_MMC2_CLKIN);
+                       omap_cfg_reg(W8_1610_MMC2_DAT0);
+                       if (mmc->wire4) {
+                               omap_cfg_reg(V8_1610_MMC2_DAT1);
+                               omap_cfg_reg(W15_1610_MMC2_DAT2);
+                               omap_cfg_reg(R10_1610_MMC2_DAT3);
+                       }
+
+                       /* These are needed for the level shifter */
+                       omap_cfg_reg(V9_1610_MMC2_CMDDIR);
+                       omap_cfg_reg(V5_1610_MMC2_DATDIR0);
+                       omap_cfg_reg(W19_1610_MMC2_DATDIR1);
+               }
+
+               /* Feedback clock must be set on OMAP-1710 MMC2 */
+               if (cpu_is_omap1710())
+                       omap_writel(omap_readl(MOD_CONF_CTRL_1) | (1 << 24),
+                                    MOD_CONF_CTRL_1);
+               mmc2_conf = *mmc;
+               (void) platform_device_register(&mmc_omap_device2);
+       }
+#endif
+       return;
+}
+#else
+static inline void omap_init_mmc(void) {}
+#endif
+
+#if    defined(CONFIG_OMAP_RTC) || defined(CONFIG_OMAP_RTC)
+
+#define        OMAP_RTC_BASE           0xfffb4800
+
+static struct resource rtc_resources[] = {
+       {
+               .start          = OMAP_RTC_BASE,
+               .end            = OMAP_RTC_BASE + 0x5f,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = INT_RTC_TIMER,
+               .flags          = IORESOURCE_IRQ,
+       },
+       {
+               .start          = INT_RTC_ALARM,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device omap_rtc_device = {
+       .name           = "omap_rtc",
+       .id             = -1,
+       .dev = {
+               .release        = omap_nop_release,
+       },
+       .num_resources  = ARRAY_SIZE(rtc_resources),
+       .resource       = rtc_resources,
+};
+
+static void omap_init_rtc(void)
+{
+       (void) platform_device_register(&omap_rtc_device);
+}
+#else
+static inline void omap_init_rtc(void) {}
+#endif
+
+/*-------------------------------------------------------------------------*/
+
+#if    defined(CONFIG_OMAP16XX_WATCHDOG) || 
defined(CONFIG_OMAP16XX_WATCHDOG_MODULE)
+
+#define        OMAP_WDT_BASE           0xfffeb000
+
+static struct resource wdt_resources[] = {
+       {
+               .start          = OMAP_WDT_BASE,
+               .end            = OMAP_WDT_BASE + 0x4f,
+               .flags          = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device omap_wdt_device = {
+       .name      = "omap1610_wdt",
+       .id          = -1,
+       .dev = {
+               .release        = omap_nop_release,
+       },
+       .num_resources  = ARRAY_SIZE(wdt_resources),
+       .resource       = wdt_resources,
+};
+
+static void omap_init_wdt(void)
+{
+       (void) platform_device_register(&omap_wdt_device);
+}
+#else
+static inline void omap_init_wdt(void) {}
+#endif
+
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * This gets called after board-specific INIT_MACHINE, and initializes most
+ * on-chip peripherals accessible on this board (except for few like USB):
+ *
+ *  (a) Does any "standard config" pin muxing needed.  Board-specific
+ *     code will have muxed GPIO pins and done "nonstandard" setup;
+ *     that code could live in the boot loader.
+ *  (b) Populating board-specific platform_data with the data drivers
+ *     rely on to handle wiring variations.
+ *  (c) Creating platform devices as meaningful on this board and
+ *     with this kernel configuration.
+ *
+ * Claiming GPIOs, and setting their direction and initial values, is the
+ * responsibility of the device drivers.  So is responding to probe().
+ *
+ * Board-specific knowlege like creating devices or pin setup is to be
+ * kept out of drivers as much as possible.  In particular, pin setup
+ * may be handled by the boot loader, and drivers should expect it will
+ * normally have been done by the time they're probed.
+ */
+static int __init omap_init_devices(void)
+{
+       /* please keep these calls, and their implementations above,
+        * in alphabetical order so they're easier to sort through.
+        */
+       omap_init_i2c();
+       omap_init_irda();
+       omap_init_mmc();
+       omap_init_rtc();
+       omap_init_wdt();
+
+       return 0;
+}
+arch_initcall(omap_init_devices);
+
diff -urN linux/arch/arm/mach-omap1/Kconfig linux/arch/arm/mach-omap1/Kconfig
--- linux/arch/arm/mach-omap1/Kconfig   2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/Kconfig   2005/09/15 08:52:45     1.2
@@ -47,6 +47,14 @@
          TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here
           if you have such a board.
 
+config OMAP_OSK_MISTRAL
+       bool "Mistral QVGA board Support"
+       depends on MACH_OMAP_OSK
+       help
+         The OSK supports an optional add-on board with a Quarter-VGA
+         touchscreen, PDA-ish buttons, a resume button, bicolor LED,
+         and camera connector.  Say Y here if you have this board.
+
 config MACH_OMAP_PERSEUS2
        bool "TI Perseus2"
        depends on ARCH_OMAP1 && ARCH_OMAP730
diff -urN linux/arch/arm/mach-omap1/Makefile linux/arch/arm/mach-omap1/Makefile
--- linux/arch/arm/mach-omap1/Makefile  2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/Makefile  2005/09/15 08:52:45     1.2
@@ -3,7 +3,7 @@
 #
 
 # Common support
-obj-y := io.o id.o irq.o time.o serial.o
+obj-y := io.o id.o irq.o time.o serial.o devices.o
 led-y := leds.o
 
 # Specific board support
@@ -23,6 +23,7 @@
 
 # LEDs support
 led-$(CONFIG_MACH_OMAP_H2)             += leds-h2p2-debug.o
+led-$(CONFIG_MACH_OMAP_H3)             += leds-h2p2-debug.o
 led-$(CONFIG_MACH_OMAP_INNOVATOR)      += leds-innovator.o
 led-$(CONFIG_MACH_OMAP_PERSEUS2)       += leds-h2p2-debug.o
 led-$(CONFIG_MACH_OMAP_OSK)            += leds-osk.o
diff -urN linux/arch/arm/mach-omap1/board-generic.c 
linux/arch/arm/mach-omap1/board-generic.c
--- linux/arch/arm/mach-omap1/board-generic.c   2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/board-generic.c   2005/09/15 08:52:45     1.2
@@ -48,19 +48,43 @@
 
 #if defined(CONFIG_ARCH_OMAP16XX)
 static struct omap_usb_config generic1610_usb_config __initdata = {
+#ifdef CONFIG_USB_OTG
+       .otg            = 1,
+#endif
        .register_host  = 1,
        .register_dev   = 1,
        .hmc_mode       = 16,
        .pins[0]        = 6,
 };
+
+static struct omap_mmc_config generic_mmc_config __initdata = {
+       .mmc [0] = {
+               .enabled        = 0,
+               .wire4          = 0,
+               .wp_pin         = -1,
+               .power_pin      = -1,
+               .switch_pin     = -1,
+       },
+       .mmc [1] = {
+               .enabled        = 0,
+               .wire4          = 0,
+               .wp_pin         = -1,
+               .power_pin      = -1,
+               .switch_pin     = -1,
+       },
+};
+
 #endif
 
 static struct omap_board_config_kernel generic_config[] = {
        { OMAP_TAG_USB,           NULL },
+       { OMAP_TAG_MMC,           &generic_mmc_config },
 };
 
 static void __init omap_generic_init(void)
 {
+       const struct omap_uart_config *uart_conf;
+
        /*
         * Make sure the serial ports are muxed on at this point.
         * You have to mux them off in device drivers later on
@@ -76,6 +100,18 @@
                generic_config[0].data = &generic1610_usb_config;
        }
 #endif
+
+       uart_conf = omap_get_config(OMAP_TAG_UART, struct omap_uart_config);
+       if (uart_conf != NULL) {
+               unsigned int enabled_ports, i;
+
+               enabled_ports = uart_conf->enabled_uarts;
+               for (i = 0; i < 3; i++) {
+                       if (!(enabled_ports & (1 << i)))
+                               generic_serial_ports[i] = 0;
+               }
+       }
+
        omap_board_config = generic_config;
        omap_board_config_size = ARRAY_SIZE(generic_config);
        omap_serial_init(generic_serial_ports);
@@ -83,7 +119,7 @@
 
 static void __init omap_generic_map_io(void)
 {
-       omap_map_common_io()
+       omap_map_common_io();
 }
 
 MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
diff -urN linux/arch/arm/mach-omap1/board-h2.c 
linux/arch/arm/mach-omap1/board-h2.c
--- linux/arch/arm/mach-omap1/board-h2.c        2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/board-h2.c        2005/09/15 08:52:45     1.2
@@ -33,6 +33,7 @@
 #include <asm/mach/map.h>
 
 #include <asm/arch/gpio.h>
+#include <asm/arch/mux.h>
 #include <asm/arch/tc.h>
 #include <asm/arch/usb.h>
 #include <asm/arch/common.h>
@@ -80,8 +81,7 @@
 };
 
 static struct resource h2_flash_resource = {
-       .start          = OMAP_CS2B_PHYS,
-       .end            = OMAP_CS2B_PHYS + OMAP_CS2B_SIZE - 1,
+       /* This is on CS3, wherever it's mapped */
        .flags          = IORESOURCE_MEM,
 };
 
@@ -126,10 +126,9 @@
                printk("Error requesting gpio 0 for smc91x irq\n");
                return;
        }
-       omap_set_gpio_edge_ctrl(0, OMAP_GPIO_FALLING_EDGE);
 }
 
-void h2_init_irq(void)
+static void __init h2_init_irq(void)
 {
        omap_init_irq();
        omap_gpio_init();
@@ -152,9 +151,13 @@
 };
 
 static struct omap_mmc_config h2_mmc_config __initdata = {
-       .mmc_blocks             = 1,
-       .mmc1_power_pin         = -1,   /* tps65010 gpio3 */
-       .mmc1_switch_pin        = OMAP_MPUIO(1),
+       .mmc [0] = {
+               .enabled        = 1,
+               .wire4          = 1,
+               .wp_pin         = OMAP_MPUIO(3),
+               .power_pin      = -1,   /* tps65010 gpio3 */
+               .switch_pin     = OMAP_MPUIO(1),
+       },
 };
 
 static struct omap_board_config_kernel h2_config[] = {
@@ -164,6 +167,16 @@
 
 static void __init h2_init(void)
 {
+       /* NOTE: revC boards support NAND-boot, which can put NOR on CS2B
+        * and NAND (either 16bit or 8bit) on CS3.
+        */
+       h2_flash_resource.end = h2_flash_resource.start = omap_cs3_phys();
+       h2_flash_resource.end += SZ_32M - 1;
+
+       /* MMC:  card detect and WP */
+       // omap_cfg_reg(U19_ARMIO1);            /* CD */
+       omap_cfg_reg(BALLOUT_V8_ARMIO3);        /* WP */
+
        platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
        omap_board_config = h2_config;
        omap_board_config_size = ARRAY_SIZE(h2_config);
diff -urN linux/arch/arm/mach-omap1/board-h3.c 
linux/arch/arm/mach-omap1/board-h3.c
--- linux/arch/arm/mach-omap1/board-h3.c        2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/board-h3.c        2005/09/15 08:52:45     1.2
@@ -82,8 +82,7 @@
 };
 
 static struct resource h3_flash_resource = {
-       .start          = OMAP_CS2B_PHYS,
-       .end            = OMAP_CS2B_PHYS + OMAP_CS2B_SIZE - 1,
+       /* This is on CS3, wherever it's mapped */
        .flags          = IORESOURCE_MEM,
 };
 
@@ -161,13 +160,26 @@
        .pins[1]        = 3,
 };
 
+static struct omap_mmc_config h3_mmc_config __initdata = {
+       .mmc[0] = {
+               .enabled        = 1,
+               .power_pin      = -1,   /* tps65010 GPIO4 */
+               .switch_pin     = OMAP_MPUIO(1),
+       },
+};
+
 static struct omap_board_config_kernel h3_config[] = {
        { OMAP_TAG_USB,  &h3_usb_config },
+       { OMAP_TAG_MMC,  &h3_mmc_config },
 };
 
 static void __init h3_init(void)
 {
+       h3_flash_resource.end = h3_flash_resource.start = omap_cs3_phys();
+       h3_flash_resource.end += OMAP_CS3_SIZE - 1;
        (void) platform_add_devices(devices, ARRAY_SIZE(devices));
+       omap_board_config = h3_config;
+       omap_board_config_size = ARRAY_SIZE(h3_config);
 }
 
 static void __init h3_init_smc91x(void)
@@ -177,7 +189,6 @@
                printk("Error requesting gpio 40 for smc91x irq\n");
                return;
        }
-       omap_set_gpio_edge_ctrl(40, OMAP_GPIO_FALLING_EDGE);
 }
 
 void h3_init_irq(void)
diff -urN linux/arch/arm/mach-omap1/board-innovator.c 
linux/arch/arm/mach-omap1/board-innovator.c
--- linux/arch/arm/mach-omap1/board-innovator.c 2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/board-innovator.c 2005/09/15 08:52:45     1.2
@@ -29,6 +29,7 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 
+#include <asm/arch/mux.h>
 #include <asm/arch/fpga.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/tc.h>
@@ -173,7 +174,6 @@
                        printk("Error requesting gpio 0 for smc91x irq\n");
                        return;
                }
-               omap_set_gpio_edge_ctrl(0, OMAP_GPIO_RISING_EDGE);
        }
 }
 
@@ -220,8 +220,19 @@
 };
 #endif
 
+static struct omap_mmc_config innovator_mmc_config __initdata = {
+       .mmc [0] = {
+               .enabled        = 1,
+               .wire4          = 1,
+               .wp_pin         = OMAP_MPUIO(3),
+               .power_pin      = -1,   /* FPGA F3 UIO42 */
+               .switch_pin     = -1,   /* FPGA F4 UIO43 */
+       },
+};
+
 static struct omap_board_config_kernel innovator_config[] = {
        { OMAP_TAG_USB,         NULL },
+       { OMAP_TAG_MMC,         &innovator_mmc_config },
 };
 
 static void __init innovator_init(void)
diff -urN linux/arch/arm/mach-omap1/board-netstar.c 
linux/arch/arm/mach-omap1/board-netstar.c
--- linux/arch/arm/mach-omap1/board-netstar.c   2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/board-netstar.c   2005/09/15 08:52:45     1.2
@@ -75,16 +75,15 @@
        mdelay(50);     /* 50ms until PHY ready */
        /* smc91x interrupt pin */
        omap_request_gpio(8);
-       omap_set_gpio_edge_ctrl(8, OMAP_GPIO_RISING_EDGE);
 
        omap_request_gpio(12);
        omap_request_gpio(13);
        omap_request_gpio(14);
        omap_request_gpio(15);
-       omap_set_gpio_edge_ctrl(12, OMAP_GPIO_FALLING_EDGE);
-       omap_set_gpio_edge_ctrl(13, OMAP_GPIO_FALLING_EDGE);
-       omap_set_gpio_edge_ctrl(14, OMAP_GPIO_FALLING_EDGE);
-       omap_set_gpio_edge_ctrl(15, OMAP_GPIO_FALLING_EDGE);
+       set_irq_type(OMAP_GPIO_IRQ(12), IRQT_FALLING);
+       set_irq_type(OMAP_GPIO_IRQ(13), IRQT_FALLING);
+       set_irq_type(OMAP_GPIO_IRQ(14), IRQT_FALLING);
+       set_irq_type(OMAP_GPIO_IRQ(15), IRQT_FALLING);
 
        platform_add_devices(netstar_devices, ARRAY_SIZE(netstar_devices));
 
diff -urN linux/arch/arm/mach-omap1/board-osk.c 
linux/arch/arm/mach-omap1/board-osk.c
--- linux/arch/arm/mach-omap1/board-osk.c       2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/board-osk.c       2005/09/15 08:52:46     1.2
@@ -29,11 +29,16 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/device.h>
+#include <linux/interrupt.h>
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
 
 #include <asm/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
+#include <asm/mach/flash.h>
 
 #include <asm/arch/gpio.h>
 #include <asm/arch/usb.h>
@@ -41,12 +46,56 @@
 #include <asm/arch/tc.h>
 #include <asm/arch/common.h>
 
-static struct map_desc osk5912_io_desc[] __initdata = {
-{ OMAP_OSK_NOR_FLASH_BASE, OMAP_OSK_NOR_FLASH_START, OMAP_OSK_NOR_FLASH_SIZE,
-       MT_DEVICE },
+static int __initdata osk_serial_ports[OMAP_MAX_NR_PORTS] = {1, 0, 0};
+
+static struct mtd_partition osk_partitions[] = {
+       /* bootloader (U-Boot, etc) in first sector */
+       {
+             .name             = "bootloader",
+             .offset           = 0,
+             .size             = SZ_128K,
+             .mask_flags       = MTD_WRITEABLE, /* force read-only */
+       },
+       /* bootloader params in the next sector */
+       {
+             .name             = "params",
+             .offset           = MTDPART_OFS_APPEND,
+             .size             = SZ_128K,
+             .mask_flags       = 0,
+       }, {
+             .name             = "kernel",
+             .offset           = MTDPART_OFS_APPEND,
+             .size             = SZ_2M,
+             .mask_flags       = 0
+       }, {
+             .name             = "filesystem",
+             .offset           = MTDPART_OFS_APPEND,
+             .size             = MTDPART_SIZ_FULL,
+             .mask_flags       = 0
+       }
 };
 
-static int __initdata osk_serial_ports[OMAP_MAX_NR_PORTS] = {1, 0, 0};
+static struct flash_platform_data osk_flash_data = {
+       .map_name       = "cfi_probe",
+       .width          = 2,
+       .parts          = osk_partitions,
+       .nr_parts       = ARRAY_SIZE(osk_partitions),
+};
+
+static struct resource osk_flash_resource = {
+       /* this is on CS3, wherever it's mapped */
+       .flags          = IORESOURCE_MEM,
+};
+
+static struct platform_device osk5912_flash_device = {
+       .name           = "omapflash",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &osk_flash_data,
+       },
+       .num_resources  = 1,
+       .resource       = &osk_flash_resource,
+};
 
 static struct resource osk5912_smc91x_resources[] = {
        [0] = {
@@ -86,9 +135,16 @@
        .resource       = osk5912_cf_resources,
 };
 
+static struct platform_device osk5912_mcbsp1_device = {
+       .name           = "omap_mcbsp",
+       .id             = 1,
+};
+
 static struct platform_device *osk5912_devices[] __initdata = {
+       &osk5912_flash_device,
        &osk5912_smc91x_device,
        &osk5912_cf_device,
+       &osk5912_mcbsp1_device,
 };
 
 static void __init osk_init_smc91x(void)
@@ -97,7 +153,6 @@
                printk("Error requesting gpio 0 for smc91x irq\n");
                return;
        }
-       omap_set_gpio_edge_ctrl(0, OMAP_GPIO_RISING_EDGE);
 
        /* Check EMIFS wait states to fix errors with SMC_GET_PKT_HDR */
        EMIFS_CCS(1) |= 0x2;
@@ -110,11 +165,11 @@
                printk("Error requesting gpio 62 for CF irq\n");
                return;
        }
-       /* it's really active-low */
-       omap_set_gpio_edge_ctrl(62, OMAP_GPIO_FALLING_EDGE);
+       /* the CF I/O IRQ is really active-low */
+       set_irq_type(OMAP_GPIO_IRQ(62), IRQT_FALLING);
 }
 
-void osk_init_irq(void)
+static void __init osk_init_irq(void)
 {
        omap_init_irq();
        omap_gpio_init();
@@ -142,18 +197,69 @@
        { OMAP_TAG_USB,           &osk_usb_config },
 };
 
+#ifdef CONFIG_OMAP_OSK_MISTRAL
+
+#ifdef CONFIG_PM
+static irqreturn_t
+osk_mistral_wake_interrupt(int irq, void *ignored, struct pt_regs *regs)
+{
+       return IRQ_HANDLED;
+}
+#endif
+
+static void __init osk_mistral_init(void)
+{
+       /* FIXME here's where to feed in framebuffer, touchpad, and
+        * keyboard setup ...  not in the drivers for those devices!
+        *
+        * NOTE:  we could actually tell if there's a Mistral board
+        * attached, e.g. by trying to read something from the ads7846.
+        * But this is too early for that...
+        */
+
+       /* the sideways button (SW1) is for use as a "wakeup" button */
+       omap_cfg_reg(N15_1610_MPUIO2);
+       if (omap_request_gpio(OMAP_MPUIO(2)) == 0) {
+               int ret = 0;
+               omap_set_gpio_direction(OMAP_MPUIO(2), 1);
+               set_irq_type(OMAP_GPIO_IRQ(OMAP_MPUIO(2)), IRQT_RISING);
+#ifdef CONFIG_PM
+               /* share the IRQ in case someone wants to use the
+                * button for more than wakeup from system sleep.
+                */
+               ret = request_irq(OMAP_GPIO_IRQ(OMAP_MPUIO(2)),
+                               &osk_mistral_wake_interrupt,
+                               SA_SHIRQ, "mistral_wakeup",
+                               &osk_mistral_wake_interrupt);
+               if (ret != 0) {
+                       omap_free_gpio(OMAP_MPUIO(2));
+                       printk(KERN_ERR "OSK+Mistral: no wakeup irq, %d?\n",
+                               ret);
+               } else
+                       enable_irq_wake(OMAP_GPIO_IRQ(OMAP_MPUIO(2)));
+#endif
+       } else
+               printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n");
+}
+#else
+static void __init osk_mistral_init(void) { }
+#endif
+
 static void __init osk_init(void)
 {
+       osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys();
+       osk_flash_resource.end += SZ_32M - 1;
        platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices));
        omap_board_config = osk_config;
        omap_board_config_size = ARRAY_SIZE(osk_config);
        USB_TRANSCEIVER_CTRL_REG |= (3 << 1);
+
+       osk_mistral_init();
 }
 
 static void __init osk_map_io(void)
 {
        omap_map_common_io();
-       iotable_init(osk5912_io_desc, ARRAY_SIZE(osk5912_io_desc));
        omap_serial_init(osk_serial_ports);
 }
 
diff -urN linux/arch/arm/mach-omap1/board-perseus2.c 
linux/arch/arm/mach-omap1/board-perseus2.c
--- linux/arch/arm/mach-omap1/board-perseus2.c  2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/board-perseus2.c  2005/09/15 08:52:46     1.2
@@ -24,6 +24,7 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 
+#include <asm/arch/tc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/fpga.h>
@@ -83,8 +84,8 @@
 };
 
 static struct resource p2_flash_resource = {
-       .start          = OMAP_FLASH_0_START,
-       .end            = OMAP_FLASH_0_START + OMAP_FLASH_0_SIZE - 1,
+       .start          = OMAP_CS0_PHYS,
+       .end            = OMAP_CS0_PHYS + SZ_32M - 1,
        .flags          = IORESOURCE_MEM,
 };
 
diff -urN linux/arch/arm/mach-omap1/board-voiceblue.c 
linux/arch/arm/mach-omap1/board-voiceblue.c
--- linux/arch/arm/mach-omap1/board-voiceblue.c 2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/board-voiceblue.c 2005/09/15 08:52:46     1.2
@@ -25,13 +25,14 @@
 #include <asm/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 
+#include <asm/arch/common.h>
 #include <asm/arch/gpio.h>
-#include <asm/arch/tc.h>
 #include <asm/arch/mux.h>
+#include <asm/arch/tc.h>
 #include <asm/arch/usb.h>
-#include <asm/arch/common.h>
 
 extern void omap_init_time(void);
 extern int omap_gpio_init(void);
@@ -74,7 +75,7 @@
 
 static struct platform_device serial_device = {
        .name                   = "serial8250",
-       .id                     = 1,
+       .id                     = PLAT8250_DEV_PLATFORM1,
        .dev                    = {
                .platform_data  = voiceblue_ports,
        },
@@ -86,6 +87,27 @@
 }
 arch_initcall(ext_uart_init);
 
+static struct flash_platform_data voiceblue_flash_data = {
+       .map_name       = "cfi_probe",
+       .width          = 2,
+};
+
+static struct resource voiceblue_flash_resource = {
+       .start  = OMAP_CS0_PHYS,
+       .end    = OMAP_CS0_PHYS + SZ_32M - 1,
+       .flags  = IORESOURCE_MEM,
+};
+
+static struct platform_device voiceblue_flash_device = {
+       .name           = "omapflash",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &voiceblue_flash_data,
+       },
+       .num_resources  = 1,
+       .resource       = &voiceblue_flash_resource,
+};
+
 static struct resource voiceblue_smc91x_resources[] = {
        [0] = {
                .start  = OMAP_CS2_PHYS + 0x300,
@@ -107,6 +129,7 @@
 };
 
 static struct platform_device *voiceblue_devices[] __initdata = {
+       &voiceblue_flash_device,
        &voiceblue_smc91x_device,
 };
 
@@ -119,8 +142,17 @@
        .pins[2]        = 6,
 };
 
+static struct omap_mmc_config voiceblue_mmc_config __initdata = {
+       .mmc[0] = {
+               .enabled        = 1,
+               .power_pin      = 2,
+               .switch_pin     = -1,
+       },
+};
+
 static struct omap_board_config_kernel voiceblue_config[] = {
        { OMAP_TAG_USB, &voiceblue_usb_config },
+       { OMAP_TAG_MMC, &voiceblue_mmc_config },
 };
 
 static void __init voiceblue_init_irq(void)
@@ -131,9 +163,6 @@
 
 static void __init voiceblue_init(void)
 {
-       /* There is a good chance board is going up, so enable Power LED
-        * (it is connected through invertor) */
-       omap_writeb(0x00, OMAP_LPG1_LCR);
        /* Watchdog */
        omap_request_gpio(0);
        /* smc91x reset */
@@ -145,7 +174,6 @@
        mdelay(50);     /* 50ms until PHY ready */
        /* smc91x interrupt pin */
        omap_request_gpio(8);
-       omap_set_gpio_edge_ctrl(8, OMAP_GPIO_RISING_EDGE);
        /* 16C554 reset*/
        omap_request_gpio(6);
        omap_set_gpio_direction(6, 0);
@@ -155,14 +183,19 @@
        omap_request_gpio(13);
        omap_request_gpio(14);
        omap_request_gpio(15);
-       omap_set_gpio_edge_ctrl(12, OMAP_GPIO_RISING_EDGE);
-       omap_set_gpio_edge_ctrl(13, OMAP_GPIO_RISING_EDGE);
-       omap_set_gpio_edge_ctrl(14, OMAP_GPIO_RISING_EDGE);
-       omap_set_gpio_edge_ctrl(15, OMAP_GPIO_RISING_EDGE);
+       set_irq_type(OMAP_GPIO_IRQ(12), IRQT_RISING);
+       set_irq_type(OMAP_GPIO_IRQ(13), IRQT_RISING);
+       set_irq_type(OMAP_GPIO_IRQ(14), IRQT_RISING);
+       set_irq_type(OMAP_GPIO_IRQ(15), IRQT_RISING);
 
        platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
        omap_board_config = voiceblue_config;
        omap_board_config_size = ARRAY_SIZE(voiceblue_config);
+
+       /* There is a good chance board is going up, so enable power LED
+        * (it is connected through invertor) */
+       omap_writeb(0x00, OMAP_LPG1_LCR);
+       omap_writeb(0x00, OMAP_LPG1_PMR);       /* Disable clock */
 }
 
 static int __initdata omap_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
@@ -184,9 +217,9 @@
        if (test_and_set_bit(MACHINE_PANICED, &machine_state))
                return NOTIFY_DONE;
 
-       /* Flash Power LED
-        * (TODO: Enable clock right way (enabled in bootloader already)) */
+       /* Flash power LED */
        omap_writeb(0x78, OMAP_LPG1_LCR);
+       omap_writeb(0x01, OMAP_LPG1_PMR);       /* Enable clock */
 
        return NOTIFY_DONE;
 }
@@ -195,15 +228,14 @@
        .notifier_call  = panic_event,
 };
 
-static int __init setup_notifier(void)
+static int __init voiceblue_setup(void)
 {
        /* Setup panic notifier */
        notifier_chain_register(&panic_notifier_list, &panic_block);
 
        return 0;
 }
-
-postcore_initcall(setup_notifier);
+postcore_initcall(voiceblue_setup);
 
 static int wdt_gpio_state;
 
diff -urN linux/arch/arm/mach-omap1/fpga.c linux/arch/arm/mach-omap1/fpga.c
--- linux/arch/arm/mach-omap1/fpga.c    2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/fpga.c    2005/09/15 08:52:46     1.2
@@ -1,5 +1,5 @@
 /*
- * linux/arch/arm/mach-omap/fpga.c
+ * linux/arch/arm/mach-omap1/fpga.c
  *
  * Interrupt handler for OMAP-1510 Innovator FPGA
  *
@@ -102,7 +102,7 @@
             fpga_irq++, stat >>= 1) {
                if (stat & 1) {
                        d = irq_desc + fpga_irq;
-                       d->handle(fpga_irq, d, regs);
+                       desc_handle_irq(fpga_irq, d, regs);
                }
        }
 }
@@ -181,7 +181,7 @@
         */
        omap_request_gpio(13);
        omap_set_gpio_direction(13, 1);
-       omap_set_gpio_edge_ctrl(13, OMAP_GPIO_RISING_EDGE);
+       set_irq_type(OMAP_GPIO_IRQ(13), IRQT_RISING);
        set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux);
 }
 
diff -urN linux/arch/arm/mach-omap1/io.c linux/arch/arm/mach-omap1/io.c
--- linux/arch/arm/mach-omap1/io.c      2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/io.c      2005/09/15 08:52:46     1.2
@@ -19,6 +19,7 @@
 
 extern int clk_init(void);
 extern void omap_check_revision(void);
+extern void omap_sram_init(void);
 
 /*
  * The machine specific code may provide the extra mapping besides the
@@ -32,7 +33,6 @@
 static struct map_desc omap730_io_desc[] __initdata = {
  { OMAP730_DSP_BASE,    OMAP730_DSP_START,    OMAP730_DSP_SIZE,    MT_DEVICE },
  { OMAP730_DSPREG_BASE, OMAP730_DSPREG_START, OMAP730_DSPREG_SIZE, MT_DEVICE },
- { OMAP730_SRAM_BASE,   OMAP730_SRAM_START,   OMAP730_SRAM_SIZE,   MT_DEVICE }
 };
 #endif
 
@@ -40,27 +40,13 @@
 static struct map_desc omap1510_io_desc[] __initdata = {
  { OMAP1510_DSP_BASE,    OMAP1510_DSP_START,    OMAP1510_DSP_SIZE,    
MT_DEVICE },
  { OMAP1510_DSPREG_BASE, OMAP1510_DSPREG_START, OMAP1510_DSPREG_SIZE, 
MT_DEVICE },
- { OMAP1510_SRAM_BASE,   OMAP1510_SRAM_START,   OMAP1510_SRAM_SIZE,   
MT_DEVICE }
 };
 #endif
 
 #if defined(CONFIG_ARCH_OMAP16XX)
-static struct map_desc omap1610_io_desc[] __initdata = {
+static struct map_desc omap16xx_io_desc[] __initdata = {
  { OMAP16XX_DSP_BASE,    OMAP16XX_DSP_START,    OMAP16XX_DSP_SIZE,    
MT_DEVICE },
  { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, 
MT_DEVICE },
- { OMAP16XX_SRAM_BASE,   OMAP16XX_SRAM_START,   OMAP1610_SRAM_SIZE,   
MT_DEVICE }
-};
-
-static struct map_desc omap5912_io_desc[] __initdata = {
- { OMAP16XX_DSP_BASE,    OMAP16XX_DSP_START,    OMAP16XX_DSP_SIZE,    
MT_DEVICE },
- { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, 
MT_DEVICE },
-/*
- * The OMAP5912 has 250kByte internal SRAM. Because the mapping is baseed on 
page
- * size (4kByte), it seems that the last 2kByte (=0x800) of the 250kByte are 
not mapped.
- * Add additional 2kByte (0x800) so that the last page is mapped and the last 
2kByte
- * can be used.
- */
- { OMAP16XX_SRAM_BASE,   OMAP16XX_SRAM_START,   OMAP5912_SRAM_SIZE + 0x800,   
MT_DEVICE }
 };
 #endif
 
@@ -86,14 +72,13 @@
        }
 #endif
 #if defined(CONFIG_ARCH_OMAP16XX)
-       if (cpu_is_omap1610() || cpu_is_omap1710()) {
-               iotable_init(omap1610_io_desc, ARRAY_SIZE(omap1610_io_desc));
-       }
-       if (cpu_is_omap5912()) {
-               iotable_init(omap5912_io_desc, ARRAY_SIZE(omap5912_io_desc));
+       if (cpu_is_omap16xx()) {
+               iotable_init(omap16xx_io_desc, ARRAY_SIZE(omap16xx_io_desc));
        }
 #endif
 
+       omap_sram_init();
+
        /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
         * on a Posted Write in the TIPB Bridge".
         */
@@ -108,8 +93,9 @@
 /*
  * This should only get called from board specific init
  */
-void omap_map_common_io(void)
+void __init omap_map_common_io(void)
 {
        if (!initialized)
                _omap_map_io();
 }
+
diff -urN linux/arch/arm/mach-omap1/irq.c linux/arch/arm/mach-omap1/irq.c
--- linux/arch/arm/mach-omap1/irq.c     2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/irq.c     2005/09/15 08:52:46     1.2
@@ -1,5 +1,5 @@
 /*
- * linux/arch/arm/mach-omap/irq.c
+ * linux/arch/arm/mach-omap1/irq.c
  *
  * Interrupt handler for all OMAP boards
  *
@@ -165,10 +165,10 @@
 #endif
 
 static struct irqchip omap_irq_chip = {
-       .ack    = omap_mask_ack_irq,
-       .mask   = omap_mask_irq,
-       .unmask = omap_unmask_irq,
-       .wake   = omap_wake_irq,
+       .ack            = omap_mask_ack_irq,
+       .mask           = omap_mask_irq,
+       .unmask         = omap_unmask_irq,
+       .set_wake       = omap_wake_irq,
 };
 
 void __init omap_init_irq(void)
diff -urN linux/arch/arm/mach-omap1/leds-h2p2-debug.c 
linux/arch/arm/mach-omap1/leds-h2p2-debug.c
--- linux/arch/arm/mach-omap1/leds-h2p2-debug.c 2005/08/01 18:23:38     1.2
+++ linux/arch/arm/mach-omap1/leds-h2p2-debug.c 2005/09/15 08:52:46     1.3
@@ -1,5 +1,5 @@
 /*
- * linux/arch/arm/mach-omap/leds-h2p2-debug.c
+ * linux/arch/arm/mach-omap1/leds-h2p2-debug.c
  *
  * Copyright 2003 by Texas Instruments Incorporated
  *
@@ -13,6 +13,7 @@
 #include <linux/init.h>
 #include <linux/kernel_stat.h>
 #include <linux/sched.h>
+#include <linux/version.h>
 
 #include <asm/io.h>
 #include <asm/hardware.h>
diff -urN linux/arch/arm/mach-omap1/leds-innovator.c 
linux/arch/arm/mach-omap1/leds-innovator.c
--- linux/arch/arm/mach-omap1/leds-innovator.c  2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/leds-innovator.c  2005/09/15 08:52:46     1.2
@@ -1,5 +1,5 @@
 /*
- * linux/arch/arm/mach-omap/leds-innovator.c
+ * linux/arch/arm/mach-omap1/leds-innovator.c
  */
 #include <linux/config.h>
 #include <linux/init.h>
diff -urN linux/arch/arm/mach-omap1/leds-osk.c 
linux/arch/arm/mach-omap1/leds-osk.c
--- linux/arch/arm/mach-omap1/leds-osk.c        2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/leds-osk.c        2005/09/15 08:52:46     1.2
@@ -1,5 +1,5 @@
 /*
- * linux/arch/arm/mach-omap/leds-osk.c
+ * linux/arch/arm/mach-omap1/leds-osk.c
  *
  * LED driver for OSK, and optionally Mistral QVGA, boards
  */
@@ -64,7 +64,7 @@
 
 static DECLARE_WORK(work, tps_work, NULL);
 
-#ifdef CONFIG_FB_OMAP
+#ifdef CONFIG_OMAP_OSK_MISTRAL
 
 /* For now, all system indicators require the Mistral board, since that
  * LED can be manipulated without a task context.  This LED is either red,
@@ -127,7 +127,7 @@
                hw_led_state = 0;
                break;
 
-#ifdef CONFIG_FB_OMAP
+#ifdef CONFIG_OMAP_OSK_MISTRAL
 
        case led_timer:
                hw_led_state ^= TIMER_LED;
@@ -144,7 +144,7 @@
                mistral_setled();
                break;
 
-#endif /* CONFIG_FB_OMAP */
+#endif /* CONFIG_OMAP_OSK_MISTRAL */
 
        /* "green" == tps LED1 (leftmost, normally power-good)
         * works only with DC adapter, not on battery power!
diff -urN linux/arch/arm/mach-omap1/leds.c linux/arch/arm/mach-omap1/leds.c
--- linux/arch/arm/mach-omap1/leds.c    2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/leds.c    2005/09/15 08:52:46     1.2
@@ -1,5 +1,5 @@
 /*
- * linux/arch/arm/mach-omap/leds.c
+ * linux/arch/arm/mach-omap1/leds.c
  *
  * OMAP LEDs dispatcher
  */
@@ -20,7 +20,9 @@
        if (machine_is_omap_innovator())
                leds_event = innovator_leds_event;
 
-       else if (machine_is_omap_h2() || machine_is_omap_perseus2())
+       else if (machine_is_omap_h2()
+                       || machine_is_omap_h3()
+                       || machine_is_omap_perseus2())
                leds_event = h2p2_dbg_leds_event;
 
        else if (machine_is_omap_osk())
@@ -30,8 +32,12 @@
                return -1;
 
        if (machine_is_omap_h2()
+                       || machine_is_omap_h3()
                        || machine_is_omap_perseus2()
-                       || machine_is_omap_osk()) {
+#ifdef CONFIG_OMAP_OSK_MISTRAL
+                       || machine_is_omap_osk()
+#endif
+                       ) {
 
                /* LED1/LED2 pins can be used as GPIO (as done here), or by
                 * the LPG (works even in deep sleep!), to drive a bicolor
diff -urN linux/arch/arm/mach-omap1/serial.c linux/arch/arm/mach-omap1/serial.c
--- linux/arch/arm/mach-omap1/serial.c  2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/serial.c  2005/09/15 08:52:46     1.2
@@ -24,7 +24,11 @@
 
 #include <asm/arch/board.h>
 #include <asm/arch/mux.h>
+#include <asm/arch/gpio.h>
 #include <asm/arch/fpga.h>
+#ifdef CONFIG_PM
+#include <asm/arch/pm.h>
+#endif
 
 static struct clk * uart1_ck = NULL;
 static struct clk * uart2_ck = NULL;
@@ -94,7 +98,7 @@
 
 static struct platform_device serial_device = {
        .name                   = "serial8250",
-       .id                     = 0,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = serial_platform_data,
        },
@@ -193,6 +197,86 @@
        }
 }
 
+#ifdef CONFIG_OMAP_SERIAL_WAKE
+
+static irqreturn_t omap_serial_wake_interrupt(int irq, void *dev_id,
+                                             struct pt_regs *regs)
+{
+       /* Need to do something with serial port right after wake-up? */
+       return IRQ_HANDLED;
+}
+
+/*
+ * Reroutes serial RX lines to GPIO lines for the duration of
+ * sleep to allow waking up the device from serial port even
+ * in deep sleep.
+ */
+void omap_serial_wake_trigger(int enable)
+{
+       if (!cpu_is_omap16xx())
+               return;
+
+       if (uart1_ck != NULL) {
+               if (enable)
+                       omap_cfg_reg(V14_16XX_GPIO37);
+               else
+                       omap_cfg_reg(V14_16XX_UART1_RX);
+       }
+       if (uart2_ck != NULL) {
+               if (enable)
+                       omap_cfg_reg(R9_16XX_GPIO18);
+               else
+                       omap_cfg_reg(R9_16XX_UART2_RX);
+       }
+       if (uart3_ck != NULL) {
+               if (enable)
+                       omap_cfg_reg(L14_16XX_GPIO49);
+               else
+                       omap_cfg_reg(L14_16XX_UART3_RX);
+       }
+}
+
+static void __init omap_serial_set_port_wakeup(int gpio_nr)
+{
+       int ret;
+
+       ret = omap_request_gpio(gpio_nr);
+       if (ret < 0) {
+               printk(KERN_ERR "Could not request UART wake GPIO: %i\n",
+                      gpio_nr);
+               return;
+       }
+       omap_set_gpio_direction(gpio_nr, 1);
+       set_irq_type(OMAP_GPIO_IRQ(gpio_nr), IRQT_RISING);
+       ret = request_irq(OMAP_GPIO_IRQ(gpio_nr), &omap_serial_wake_interrupt,
+                         0, "serial wakeup", NULL);
+       if (ret) {
+               omap_free_gpio(gpio_nr);
+               printk(KERN_ERR "No interrupt for UART wake GPIO: %i\n",
+                      gpio_nr);
+               return;
+       }
+       enable_irq_wake(OMAP_GPIO_IRQ(gpio_nr));
+}
+
+static int __init omap_serial_wakeup_init(void)
+{
+       if (!cpu_is_omap16xx())
+               return 0;
+
+       if (uart1_ck != NULL)
+               omap_serial_set_port_wakeup(37);
+       if (uart2_ck != NULL)
+               omap_serial_set_port_wakeup(18);
+       if (uart3_ck != NULL)
+               omap_serial_set_port_wakeup(49);
+
+       return 0;
+}
+late_initcall(omap_serial_wakeup_init);
+
+#endif /* CONFIG_OMAP_SERIAL_WAKE */
+
 static int __init omap_init(void)
 {
        return platform_device_register(&serial_device);
diff -urN linux/arch/arm/mach-omap1/time.c linux/arch/arm/mach-omap1/time.c
--- linux/arch/arm/mach-omap1/time.c    2005/07/13 11:48:52     1.1
+++ linux/arch/arm/mach-omap1/time.c    2005/09/15 08:52:46     1.2
@@ -247,13 +247,6 @@
 #define OMAP_32K_TIMER_TCR             0x04
 
 #define OMAP_32K_TICKS_PER_HZ          (32768 / HZ)
-#if (32768 % HZ) != 0
-/* We cannot ignore modulo.
- * Potential error can be as high as several percent.
- */
-#define OMAP_32K_TICK_MODULO           (32768 % HZ)
-static unsigned modulo_count = 0; /* Counts 1/HZ units */
-#endif
 
 /*
  * TRM says 1 / HZ = ( TVR + 1) / 32768, so TRV = (32768 / HZ) - 1
@@ -296,13 +289,22 @@
 }
 
 /*
- * Rounds down to nearest usec
+ * Rounds down to nearest usec. Note that this will overflow for larger values.
  */
 static inline unsigned long omap_32k_ticks_to_usecs(unsigned long ticks_32k)
 {
        return (ticks_32k * 5*5*5*5*5*5) >> 9;
 }
 
+/*
+ * Rounds down to nearest nsec.
+ */
+static inline unsigned long long
+omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
+{
+       return (unsigned long long) ticks_32k * 1000 * 5*5*5*5*5*5 >> 9;
+}
+
 static unsigned long omap_32k_last_tick = 0;
 
 /*
@@ -315,6 +317,15 @@
 }
 
 /*
+ * Returns current time from boot in nsecs. It's OK for this to wrap
+ * around for now, as it's just a relative time stamp.
+ */
+unsigned long long sched_clock(void)
+{
+       return omap_32k_ticks_to_nsecs(omap_32k_sync_timer_read());
+}
+
+/*
  * Timer interrupt for 32KHz timer. When dynamic tick is enabled, this
  * function is also called from other interrupts to remove latency
  * issues with dynamic tick. In the dynamic tick case, we need to lock
@@ -330,19 +341,6 @@
        now = omap_32k_sync_timer_read();
 
        while (now - omap_32k_last_tick >= OMAP_32K_TICKS_PER_HZ) {
-#ifdef OMAP_32K_TICK_MODULO
-               /* Modulo addition may put omap_32k_last_tick ahead of now
-                * and cause unwanted repetition of the while loop.
-                */
-               if (unlikely(now - omap_32k_last_tick == ~0))
-                       break;
-
-               modulo_count += OMAP_32K_TICK_MODULO;
-               if (modulo_count > HZ) {
-                       ++omap_32k_last_tick;
-                       modulo_count -= HZ;
-               }
-#endif
                omap_32k_last_tick += OMAP_32K_TICKS_PER_HZ;
                timer_tick(regs);
        }
diff -urN linux/arch/arm/mach-pxa/corgi_lcd.c 
linux/arch/arm/mach-pxa/corgi_lcd.c
--- linux/arch/arm/mach-pxa/corgi_lcd.c 1970/01/01 00:00:00
+++ linux/arch/arm/mach-pxa/corgi_lcd.c 2005-09-15 09:52:47.054303000 +0100     
1.1
@@ -0,0 +1,396 @@
+/*
+ * linux/drivers/video/w100fb.c
+ *
+ * Corgi LCD Specific Code for ATI Imageon w100 (Wallaby)
+ *
+ * Copyright (C) 2005 Richard Purdie
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/delay.h>
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <asm/arch/corgi.h>
+#include <asm/mach/sharpsl_param.h>
+#include <video/w100fb.h>
+
+/* Register Addresses */
+#define RESCTL_ADRS     0x00
+#define PHACTRL_ADRS    0x01
+#define DUTYCTRL_ADRS   0x02
+#define POWERREG0_ADRS  0x03
+#define POWERREG1_ADRS  0x04
+#define GPOR3_ADRS      0x05
+#define PICTRL_ADRS     0x06
+#define POLCTRL_ADRS    0x07
+
+/* Resgister Bit Definitions */
+#define RESCTL_QVGA     0x01
+#define RESCTL_VGA      0x00
+
+#define POWER1_VW_ON    0x01  /* VW Supply FET ON */
+#define POWER1_GVSS_ON  0x02  /* GVSS(-8V) Power Supply ON */
+#define POWER1_VDD_ON   0x04  /* VDD(8V),SVSS(-4V) Power Supply ON */
+
+#define POWER1_VW_OFF   0x00  /* VW Supply FET OFF */
+#define POWER1_GVSS_OFF 0x00  /* GVSS(-8V) Power Supply OFF */
+#define POWER1_VDD_OFF  0x00  /* VDD(8V),SVSS(-4V) Power Supply OFF */
+
+#define POWER0_COM_DCLK 0x01  /* COM Voltage DC Bias DAC Serial Data Clock */
+#define POWER0_COM_DOUT 0x02  /* COM Voltage DC Bias DAC Serial Data Out */
+#define POWER0_DAC_ON   0x04  /* DAC Power Supply ON */
+#define POWER0_COM_ON   0x08  /* COM Powewr Supply ON */
+#define POWER0_VCC5_ON  0x10  /* VCC5 Power Supply ON */
+
+#define POWER0_DAC_OFF  0x00  /* DAC Power Supply OFF */
+#define POWER0_COM_OFF  0x00  /* COM Powewr Supply OFF */
+#define POWER0_VCC5_OFF 0x00  /* VCC5 Power Supply OFF */
+
+#define PICTRL_INIT_STATE      0x01
+#define PICTRL_INIOFF          0x02
+#define PICTRL_POWER_DOWN      0x04
+#define PICTRL_COM_SIGNAL_OFF  0x08
+#define PICTRL_DAC_SIGNAL_OFF  0x10
+
+#define POLCTRL_SYNC_POL_FALL  0x01
+#define POLCTRL_EN_POL_FALL    0x02
+#define POLCTRL_DATA_POL_FALL  0x04
+#define POLCTRL_SYNC_ACT_H     0x08
+#define POLCTRL_EN_ACT_L       0x10
+
+#define POLCTRL_SYNC_POL_RISE  0x00
+#define POLCTRL_EN_POL_RISE    0x00
+#define POLCTRL_DATA_POL_RISE  0x00
+#define POLCTRL_SYNC_ACT_L     0x00
+#define POLCTRL_EN_ACT_H       0x00
+
+#define PHACTRL_PHASE_MANUAL   0x01
+#define DEFAULT_PHAD_QVGA     (9)
+#define DEFAULT_COMADJ        (125)
+
+/*
+ * This is only a psuedo I2C interface. We can't use the standard kernel
+ * routines as the interface is write only. We just assume the data is acked...
+ */
+static void lcdtg_ssp_i2c_send(u8 data)
+{
+       corgi_ssp_lcdtg_send(POWERREG0_ADRS, data);
+       udelay(10);
+}
+
+static void lcdtg_i2c_send_bit(u8 data)
+{
+       lcdtg_ssp_i2c_send(data);
+       lcdtg_ssp_i2c_send(data | POWER0_COM_DCLK);
+       lcdtg_ssp_i2c_send(data);
+}
+
+static void lcdtg_i2c_send_start(u8 base)
+{
+       lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK | POWER0_COM_DOUT);
+       lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK);
+       lcdtg_ssp_i2c_send(base);
+}
+
+static void lcdtg_i2c_send_stop(u8 base)
+{
+       lcdtg_ssp_i2c_send(base);
+       lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK);
+       lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK | POWER0_COM_DOUT);
+}
+
+static void lcdtg_i2c_send_byte(u8 base, u8 data)
+{
+       int i;
+       for (i = 0; i < 8; i++) {
+               if (data & 0x80)
+                       lcdtg_i2c_send_bit(base | POWER0_COM_DOUT);
+               else
+                       lcdtg_i2c_send_bit(base);
+               data <<= 1;
+       }
+}
+
+static void lcdtg_i2c_wait_ack(u8 base)
+{
+       lcdtg_i2c_send_bit(base);
+}
+
+static void lcdtg_set_common_voltage(u8 base_data, u8 data)
+{
+       /* Set Common Voltage to M62332FP via I2C */
+       lcdtg_i2c_send_start(base_data);
+       lcdtg_i2c_send_byte(base_data, 0x9c);
+       lcdtg_i2c_wait_ack(base_data);
+       lcdtg_i2c_send_byte(base_data, 0x00);
+       lcdtg_i2c_wait_ack(base_data);
+       lcdtg_i2c_send_byte(base_data, data);
+       lcdtg_i2c_wait_ack(base_data);
+       lcdtg_i2c_send_stop(base_data);
+}
+
+/* Set Phase Adjuct */
+static void lcdtg_set_phadadj(struct w100fb_par *par)
+{
+       int adj;
+       switch(par->xres) {
+               case 480:
+               case 640:
+                       /* Setting for VGA */
+                       adj = sharpsl_param.phadadj;
+                       if (adj < 0) {
+                               adj = PHACTRL_PHASE_MANUAL;
+                       } else {
+                               adj = ((adj & 0x0f) << 1) | 
PHACTRL_PHASE_MANUAL;
+                       }
+                       break;
+               case 240:
+               case 320:
+               default:
+                       /* Setting for QVGA */
+                       adj = (DEFAULT_PHAD_QVGA << 1) | PHACTRL_PHASE_MANUAL;
+                       break;
+       }
+
+       corgi_ssp_lcdtg_send(PHACTRL_ADRS, adj);
+}
+
+static int lcd_inited;
+
+static void lcdtg_hw_init(struct w100fb_par *par)
+{
+       if (!lcd_inited) {
+               int comadj;
+
+               /* Initialize Internal Logic & Port */
+               corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_POWER_DOWN | 
PICTRL_INIOFF | PICTRL_INIT_STATE
+                               | PICTRL_COM_SIGNAL_OFF | 
PICTRL_DAC_SIGNAL_OFF);
+
+               corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | 
POWER0_COM_DOUT | POWER0_DAC_OFF
+                               | POWER0_COM_OFF | POWER0_VCC5_OFF);
+
+               corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | 
POWER1_GVSS_OFF | POWER1_VDD_OFF);
+
+               /* VDD(+8V), SVSS(-4V) ON */
+               corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | 
POWER1_GVSS_OFF | POWER1_VDD_ON);
+               mdelay(3);
+
+               /* DAC ON */
+               corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | 
POWER0_COM_DOUT | POWER0_DAC_ON
+                               | POWER0_COM_OFF | POWER0_VCC5_OFF);
+
+               /* INIB = H, INI = L  */
+               /* PICTL[0] = H , PICTL[1] = PICTL[2] = PICTL[4] = L */
+               corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIT_STATE | 
PICTRL_COM_SIGNAL_OFF);
+
+               /* Set Common Voltage */
+               comadj = sharpsl_param.comadj;
+               if (comadj < 0)
+                       comadj = DEFAULT_COMADJ;
+               lcdtg_set_common_voltage((POWER0_DAC_ON | POWER0_COM_OFF | 
POWER0_VCC5_OFF), comadj);
+
+               /* VCC5 ON, DAC ON */
+               corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | 
POWER0_COM_DOUT | POWER0_DAC_ON |
+                               POWER0_COM_OFF | POWER0_VCC5_ON);
+
+               /* GVSS(-8V) ON, VDD ON */
+               corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | 
POWER1_GVSS_ON | POWER1_VDD_ON);
+               mdelay(2);
+
+               /* COM SIGNAL ON (PICTL[3] = L) */
+               corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIT_STATE);
+
+               /* COM ON, DAC ON, VCC5_ON */
+               corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | 
POWER0_COM_DOUT | POWER0_DAC_ON
+                               | POWER0_COM_ON | POWER0_VCC5_ON);
+
+               /* VW ON, GVSS ON, VDD ON */
+               corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_ON | 
POWER1_GVSS_ON | POWER1_VDD_ON);
+
+               /* Signals output enable */
+               corgi_ssp_lcdtg_send(PICTRL_ADRS, 0);
+
+               /* Set Phase Adjuct */
+               lcdtg_set_phadadj(par);
+
+               /* Initialize for Input Signals from ATI */
+               corgi_ssp_lcdtg_send(POLCTRL_ADRS, POLCTRL_SYNC_POL_RISE | 
POLCTRL_EN_POL_RISE
+                               | POLCTRL_DATA_POL_RISE | POLCTRL_SYNC_ACT_L | 
POLCTRL_EN_ACT_H);
+               udelay(1000);
+
+               lcd_inited=1;
+       } else {
+               lcdtg_set_phadadj(par);
+       }
+
+       switch(par->xres) {
+               case 480:
+               case 640:
+                       /* Set Lcd Resolution (VGA) */
+                       corgi_ssp_lcdtg_send(RESCTL_ADRS, RESCTL_VGA);
+                       break;
+               case 240:
+               case 320:
+               default:
+                       /* Set Lcd Resolution (QVGA) */
+                       corgi_ssp_lcdtg_send(RESCTL_ADRS, RESCTL_QVGA);
+                       break;
+       }
+}
+
+static void lcdtg_suspend(struct w100fb_par *par)
+{
+       /* 60Hz x 2 frame = 16.7msec x 2 = 33.4 msec */
+       mdelay(34);
+
+       /* (1)VW OFF */
+       corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_ON | 
POWER1_VDD_ON);
+
+       /* (2)COM OFF */
+       corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_COM_SIGNAL_OFF);
+       corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_ON | POWER0_COM_OFF | 
POWER0_VCC5_ON);
+
+       /* (3)Set Common Voltage Bias 0V */
+       lcdtg_set_common_voltage(POWER0_DAC_ON | POWER0_COM_OFF | 
POWER0_VCC5_ON, 0);
+
+       /* (4)GVSS OFF */
+       corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | 
POWER1_VDD_ON);
+
+       /* (5)VCC5 OFF */
+       corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_ON | POWER0_COM_OFF | 
POWER0_VCC5_OFF);
+
+       /* (6)Set PDWN, INIOFF, DACOFF */
+       corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIOFF | PICTRL_DAC_SIGNAL_OFF 
|
+                       PICTRL_POWER_DOWN | PICTRL_COM_SIGNAL_OFF);
+
+       /* (7)DAC OFF */
+       corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_OFF | POWER0_COM_OFF | 
POWER0_VCC5_OFF);
+
+       /* (8)VDD OFF */
+       corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | 
POWER1_VDD_OFF);
+
+       lcd_inited = 0;
+}
+
+static struct w100_tg_info corgi_lcdtg_info = {
+       .change=lcdtg_hw_init,
+       .suspend=lcdtg_suspend,
+       .resume=lcdtg_hw_init,
+};
+
+/*
+ * Corgi w100 Frame Buffer Device
+ */
+
+static struct w100_mem_info corgi_fb_mem = {
+       .ext_cntl          = 0x00040003,
+       .sdram_mode_reg    = 0x00650021,
+       .ext_timing_cntl   = 0x10002a4a,
+       .io_cntl           = 0x7ff87012,
+       .size              = 0x1fffff,
+};
+
+static struct w100_gen_regs corgi_fb_regs = {
+       .lcd_format    = 0x00000003,
+       .lcdd_cntl1    = 0x01CC0000,
+       .lcdd_cntl2    = 0x0003FFFF,
+       .genlcd_cntl1  = 0x00FFFF0D,
+       .genlcd_cntl2  = 0x003F3003,
+       .genlcd_cntl3  = 0x000102aa,
+};
+
+static struct w100_gpio_regs corgi_fb_gpio = {
+       .init_data1   = 0x000000bf,
+       .init_data2   = 0x00000000,
+       .gpio_dir1    = 0x00000000,
+       .gpio_oe1     = 0x03c0feff,
+       .gpio_dir2    = 0x00000000,
+       .gpio_oe2     = 0x00000000,
+};
+
+static struct w100_mode corgi_fb_modes[] = {
+{
+       .xres            = 480,
+       .yres            = 640,
+       .left_margin     = 0x56,
+       .right_margin    = 0x55,
+       .upper_margin    = 0x03,
+       .lower_margin    = 0x00,
+       .crtc_ss         = 0x82360056,
+       .crtc_ls         = 0xA0280000,
+       .crtc_gs         = 0x80280028,
+       .crtc_vpos_gs    = 0x02830002,
+       .crtc_rev        = 0x00400008,
+       .crtc_dclk       = 0xA0000000,
+       .crtc_gclk       = 0x8015010F,
+       .crtc_goe        = 0x80100110,
+       .crtc_ps1_active = 0x41060010,
+       .pll_freq        = 75,
+       .fast_pll_freq   = 100,
+       .sysclk_src      = CLK_SRC_PLL,
+       .sysclk_divider  = 0,
+       .pixclk_src      = CLK_SRC_PLL,
+       .pixclk_divider  = 2,
+       .pixclk_divider_rotated = 6,
+},{
+       .xres            = 240,
+       .yres            = 320,
+       .left_margin     = 0x27,
+       .right_margin    = 0x2e,
+       .upper_margin    = 0x01,
+       .lower_margin    = 0x00,
+       .crtc_ss         = 0x81170027,
+       .crtc_ls         = 0xA0140000,
+       .crtc_gs         = 0xC0140014,
+       .crtc_vpos_gs    = 0x00010141,
+       .crtc_rev        = 0x00400008,
+       .crtc_dclk       = 0xA0000000,
+       .crtc_gclk       = 0x8015010F,
+       .crtc_goe        = 0x80100110,
+       .crtc_ps1_active = 0x41060010,
+       .pll_freq        = 0,
+       .fast_pll_freq   = 0,
+       .sysclk_src      = CLK_SRC_XTAL,
+       .sysclk_divider  = 0,
+       .pixclk_src      = CLK_SRC_XTAL,
+       .pixclk_divider  = 1,
+       .pixclk_divider_rotated = 1,
+},
+
+};
+
+static struct w100fb_mach_info corgi_fb_info = {
+       .tg         = &corgi_lcdtg_info,
+       .init_mode  = INIT_MODE_ROTATED,
+       .mem        = &corgi_fb_mem,
+       .regs       = &corgi_fb_regs,
+       .modelist   = &corgi_fb_modes[0],
+       .num_modes  = 2,
+       .gpio       = &corgi_fb_gpio,
+       .xtal_freq  = 12500000,
+       .xtal_dbl   = 0,
+};
+
+static struct resource corgi_fb_resources[] = {
+       [0] = {
+               .start   = 0x08000000,
+               .end     = 0x08ffffff,
+               .flags   = IORESOURCE_MEM,
+       },
+};
+
+struct platform_device corgifb_device = {
+       .name           = "w100fb",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(corgi_fb_resources),
+       .resource       = corgi_fb_resources,
+       .dev            = {
+               .platform_data = &corgi_fb_info,
+               .parent = &corgissp_device.dev,
+       },
+
+};
diff -urN linux/arch/arm/mach-pxa/Makefile linux/arch/arm/mach-pxa/Makefile
--- linux/arch/arm/mach-pxa/Makefile    2005/07/12 09:18:58     1.13
+++ linux/arch/arm/mach-pxa/Makefile    2005/09/15 08:52:46     1.14
@@ -11,7 +11,7 @@
 obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
 obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
 obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
-obj-$(CONFIG_PXA_SHARP_C7xx)   += corgi.o corgi_ssp.o ssp.o
+obj-$(CONFIG_PXA_SHARP_C7xx)   += corgi.o corgi_ssp.o corgi_lcd.o ssp.o
 obj-$(CONFIG_MACH_POODLE)      += poodle.o
 
 # Support for blinky lights
diff -urN linux/arch/arm/mach-pxa/corgi.c linux/arch/arm/mach-pxa/corgi.c
--- linux/arch/arm/mach-pxa/corgi.c     2005/07/12 09:18:58     1.6
+++ linux/arch/arm/mach-pxa/corgi.c     2005/09/15 08:52:46     1.7
@@ -39,7 +39,6 @@
 
 #include <asm/mach/sharpsl_param.h>
 #include <asm/hardware/scoop.h>
-#include <video/w100fb.h>
 
 #include "generic.h"
 
@@ -60,6 +59,15 @@
        .io_out         = CORGI_SCOOP_IO_OUT,
 };
 
+static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = {
+{
+       .dev        = &corgiscoop_device.dev,
+       .irq        = CORGI_IRQ_GPIO_CF_IRQ,
+       .cd_irq     = CORGI_IRQ_GPIO_CF_CD,
+       .cd_irq_str = "PCMCIA0 CD",
+},
+};
+
 struct platform_device corgiscoop_device = {
        .name           = "sharp-scoop",
        .id             = -1,
@@ -78,7 +86,7 @@
  * also use scoop functions and this makes the power up/down order
  * work correctly.
  */
-static struct platform_device corgissp_device = {
+struct platform_device corgissp_device = {
        .name           = "corgi-ssp",
        .dev            = {
                .parent = &corgiscoop_device.dev,
@@ -88,41 +96,33 @@
 
 
 /*
- * Corgi w100 Frame Buffer Device
+ * Corgi Backlight Device
  */
-static struct w100fb_mach_info corgi_fb_info = {
-       .w100fb_ssp_send        = corgi_ssp_lcdtg_send,
-       .comadj                         = -1,
-       .phadadj                        = -1,
-};
-
-static struct resource corgi_fb_resources[] = {
-       [0] = {
-               .start          = 0x08000000,
-               .end            = 0x08ffffff,
-               .flags          = IORESOURCE_MEM,
+static struct platform_device corgibl_device = {
+       .name           = "corgi-bl",
+       .dev            = {
+               .parent = &corgifb_device.dev,
        },
+       .id             = -1,
 };
 
-static struct platform_device corgifb_device = {
-       .name           = "w100fb",
+
+/*
+ * Corgi Keyboard Device
+ */
+static struct platform_device corgikbd_device = {
+       .name           = "corgi-keyboard",
        .id             = -1,
-       .dev            = {
-               .platform_data  = &corgi_fb_info,
-               .parent = &corgissp_device.dev,
-       },
-       .num_resources  = ARRAY_SIZE(corgi_fb_resources),
-       .resource       = corgi_fb_resources,
 };
 
 
 /*
- * Corgi Backlight Device
+ * Corgi Touch Screen Device
  */
-static struct platform_device corgibl_device = {
-       .name           = "corgi-bl",
+static struct platform_device corgits_device = {
+       .name           = "corgi-ts",
        .dev            = {
-               .parent = &corgifb_device.dev,
+               .parent = &corgissp_device.dev,
        },
        .id             = -1,
 };
@@ -131,27 +131,12 @@
 /*
  * MMC/SD Device
  *
- * The card detect interrupt isn't debounced so we delay it by HZ/4
+ * The card detect interrupt isn't debounced so we delay it by 250ms
  * to give the card a chance to fully insert/eject.
  */
-static struct mmc_detect {
-       struct timer_list detect_timer;
-       void *devid;
-} mmc_detect;
-
-static void mmc_detect_callback(unsigned long data)
-{
-       mmc_detect_change(mmc_detect.devid);
-}
+static struct pxamci_platform_data corgi_mci_platform_data;
 
-static irqreturn_t corgi_mmc_detect_int(int irq, void *devid, struct pt_regs 
*regs)
-{
-       mmc_detect.devid=devid;
-       mod_timer(&mmc_detect.detect_timer, jiffies + HZ/4);
-       return IRQ_HANDLED;
-}
-
-static int corgi_mci_init(struct device *dev, irqreturn_t 
(*unused_detect_int)(int, void *, struct pt_regs *), void *data)
+static int corgi_mci_init(struct device *dev, irqreturn_t 
(*corgi_detect_int)(int, void *, struct pt_regs *), void *data)
 {
        int err;
 
@@ -161,11 +146,9 @@
        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;
+       corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
 
-       err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_mmc_detect_int, 
SA_INTERRUPT,
+       err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int, 
SA_INTERRUPT,
                             "MMC card detect", data);
        if (err) {
                printk(KERN_ERR "corgi_mci_init: MMC/SD: can't request MMC card 
detect IRQ\n");
@@ -190,20 +173,26 @@
        }
 }
 
+static int corgi_mci_get_ro(struct device *dev)
+{
+       return GPLR(CORGI_GPIO_nSD_WP) & GPIO_bit(CORGI_GPIO_nSD_WP);
+}
+
 static void corgi_mci_exit(struct device *dev, void *data)
 {
        free_irq(CORGI_IRQ_GPIO_nSD_DETECT, data);
-       del_timer(&mmc_detect.detect_timer);
 }
 
 static struct pxamci_platform_data corgi_mci_platform_data = {
        .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
        .init           = corgi_mci_init,
+       .get_ro         = corgi_mci_get_ro,
        .setpower       = corgi_mci_setpower,
        .exit           = corgi_mci_exit,
 };
 
 
+
 /*
  * USB Device Controller
  */
@@ -229,18 +218,20 @@
        &corgiscoop_device,
        &corgissp_device,
        &corgifb_device,
+       &corgikbd_device,
        &corgibl_device,
+       &corgits_device,
 };
 
 static void __init corgi_init(void)
 {
-       corgi_fb_info.comadj=sharpsl_param.comadj;
-       corgi_fb_info.phadadj=sharpsl_param.phadadj;
-
        pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT);
        pxa_set_udc_info(&udc_info);
        pxa_set_mci_info(&corgi_mci_platform_data);
 
+       scoop_num = 1;
+       scoop_devs = &corgi_pcmcia_scoop[0];
+
        platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
diff -urN linux/arch/arm/mach-pxa/corgi_ssp.c 
linux/arch/arm/mach-pxa/corgi_ssp.c
--- linux/arch/arm/mach-pxa/corgi_ssp.c 2005/04/08 18:57:52     1.2
+++ linux/arch/arm/mach-pxa/corgi_ssp.c 2005/09/15 08:52:46     1.3
@@ -22,7 +22,7 @@
 #include <asm/arch/corgi.h>
 #include <asm/arch/pxa-regs.h>
 
-static spinlock_t corgi_ssp_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(corgi_ssp_lock);
 static struct ssp_dev corgi_ssp_dev;
 static struct ssp_state corgi_ssp_state;
 
diff -urN linux/arch/arm/mach-pxa/irq.c linux/arch/arm/mach-pxa/irq.c
--- linux/arch/arm/mach-pxa/irq.c       2005/03/18 17:36:46     1.10
+++ linux/arch/arm/mach-pxa/irq.c       2005/09/15 08:52:46     1.11
@@ -133,7 +133,7 @@
        .ack            = pxa_ack_low_gpio,
        .mask           = pxa_mask_low_irq,
        .unmask         = pxa_unmask_low_irq,
-       .type           = pxa_gpio_irq_type,
+       .set_type       = pxa_gpio_irq_type,
 };
 
 /*
@@ -157,7 +157,7 @@
                        mask >>= 2;
                        do {
                                if (mask & 1)
-                                       desc->handle(irq, desc, regs);
+                                       desc_handle_irq(irq, desc, regs);
                                irq++;
                                desc++;
                                mask >>= 1;
@@ -172,7 +172,7 @@
                        desc = irq_desc + irq;
                        do {
                                if (mask & 1)
-                                       desc->handle(irq, desc, regs);
+                                       desc_handle_irq(irq, desc, regs);
                                irq++;
                                desc++;
                                mask >>= 1;
@@ -187,7 +187,7 @@
                        desc = irq_desc + irq;
                        do {
                                if (mask & 1)
-                                       desc->handle(irq, desc, regs);
+                                       desc_handle_irq(irq, desc, regs);
                                irq++;
                                desc++;
                                mask >>= 1;
@@ -203,7 +203,7 @@
                        desc = irq_desc + irq;
                        do {
                                if (mask & 1)
-                                       desc->handle(irq, desc, regs);
+                                       desc_handle_irq(irq, desc, regs);
                                irq++;
                                desc++;
                                mask >>= 1;
@@ -241,7 +241,7 @@
        .ack            = pxa_ack_muxed_gpio,
        .mask           = pxa_mask_muxed_gpio,
        .unmask         = pxa_unmask_muxed_gpio,
-       .type           = pxa_gpio_irq_type,
+       .set_type       = pxa_gpio_irq_type,
 };
 
 
diff -urN linux/arch/arm/mach-pxa/lubbock.c linux/arch/arm/mach-pxa/lubbock.c
--- linux/arch/arm/mach-pxa/lubbock.c   2005/07/12 09:18:58     1.25
+++ linux/arch/arm/mach-pxa/lubbock.c   2005/09/15 08:52:46     1.26
@@ -84,7 +84,7 @@
                if (likely(pending)) {
                        irq = LUBBOCK_IRQ(0) + __ffs(pending);
                        desc = irq_desc + irq;
-                       desc->handle(irq, desc, regs);
+                       desc_handle_irq(irq, desc, regs);
                }
                pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled;
        } while (pending);
diff -urN linux/arch/arm/mach-pxa/mainstone.c 
linux/arch/arm/mach-pxa/mainstone.c
--- linux/arch/arm/mach-pxa/mainstone.c 2005/07/12 09:18:58     1.11
+++ linux/arch/arm/mach-pxa/mainstone.c 2005/09/15 08:52:46     1.12
@@ -72,7 +72,7 @@
                if (likely(pending)) {
                        irq = MAINSTONE_IRQ(0) + __ffs(pending);
                        desc = irq_desc + irq;
-                       desc->handle(irq, desc, regs);
+                       desc_handle_irq(irq, desc, regs);
                }
                pending = MST_INTSETCLR & mainstone_irq_enabled;
        } while (pending);
diff -urN linux/arch/arm/mach-pxa/poodle.c linux/arch/arm/mach-pxa/poodle.c
--- linux/arch/arm/mach-pxa/poodle.c    2005/07/12 09:18:58     1.3
+++ linux/arch/arm/mach-pxa/poodle.c    2005/09/15 08:52:46     1.4
@@ -62,6 +62,15 @@
        .resource       = poodle_scoop_resources,
 };
 
+static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = {
+{
+       .dev        = &poodle_scoop_device.dev,
+       .irq        = POODLE_IRQ_GPIO_CF_IRQ,
+       .cd_irq     = POODLE_IRQ_GPIO_CF_CD,
+       .cd_irq_str = "PCMCIA0 CD",
+},
+};
+
 
 /* LoCoMo device */
 static struct resource locomo_resources[] = {
@@ -147,6 +156,9 @@
 
        set_pxa_fb_info(&poodle_fb_info);
 
+       scoop_num = 1;
+       scoop_devs = &poodle_pcmcia_scoop[0];
+
        ret = platform_add_devices(devices, ARRAY_SIZE(devices));
        if (ret) {
                printk(KERN_WARNING "poodle: Unable to register LoCoMo 
device\n");
diff -urN linux/arch/arm/mach-pxa/time.c linux/arch/arm/mach-pxa/time.c
--- linux/arch/arm/mach-pxa/time.c      2005/07/11 20:46:03     1.4
+++ linux/arch/arm/mach-pxa/time.c      2005/09/15 08:52:46     1.5
@@ -70,6 +70,11 @@
        return usec;
 }
 
+#ifdef CONFIG_NO_IDLE_HZ
+static unsigned long initial_match;
+static int match_posponed;
+#endif
+
 static irqreturn_t
 pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
@@ -77,11 +82,19 @@
 
        write_seqlock(&xtime_lock);
 
+#ifdef CONFIG_NO_IDLE_HZ
+       if (match_posponed) {
+               match_posponed = 0;
+               OSMR0 = initial_match;
+       }
+#endif
+
        /* Loop until we get ahead of the free running timer.
         * This ensures an exact clock tick count and time accuracy.
-        * IRQs are disabled inside the loop to ensure coherence between
-        * lost_ticks (updated in do_timer()) and the match reg value, so we
-        * can use do_gettimeofday() from interrupt handlers.
+        * Since IRQs are disabled at this point, coherence between
+        * lost_ticks(updated in do_timer()) and the match reg value is
+        * ensured, hence we can use do_gettimeofday() from interrupt
+        * handlers.
         *
         * HACK ALERT: it seems that the PXA timer regs aren't updated right
         * away in all cases when a write occurs.  We therefore compare with
@@ -126,6 +139,42 @@
        OSCR = 0;               /* initialize free-running timer, force first 
match */
 }
 
+#ifdef CONFIG_NO_IDLE_HZ
+static int pxa_dyn_tick_enable_disable(void)
+{
+       /* nothing to do */
+       return 0;
+}
+
+static void pxa_dyn_tick_reprogram(unsigned long ticks)
+{
+       if (ticks > 1) {
+               initial_match = OSMR0;
+               OSMR0 = initial_match + ticks * LATCH;
+               match_posponed = 1;
+       }
+}
+
+static irqreturn_t
+pxa_dyn_tick_handler(int irq, void *dev_id, struct pt_regs *regs)
+{
+       if (match_posponed) {
+               match_posponed = 0;
+               OSMR0 = initial_match;
+               if ( (signed long)(initial_match - OSCR) <= 8 )
+                       return pxa_timer_interrupt(irq, dev_id, regs);
+       }
+       return IRQ_NONE;
+}
+
+static struct dyn_tick_timer pxa_dyn_tick = {
+       .enable         = pxa_dyn_tick_enable_disable,
+       .disable        = pxa_dyn_tick_enable_disable,
+       .reprogram      = pxa_dyn_tick_reprogram,
+       .handler        = pxa_dyn_tick_handler,
+};
+#endif
+
 #ifdef CONFIG_PM
 static unsigned long osmr[4], oier;
 
@@ -161,4 +210,7 @@
        .suspend        = pxa_timer_suspend,
        .resume         = pxa_timer_resume,
        .offset         = pxa_gettimeoffset,
+#ifdef CONFIG_NO_IDLE_HZ
+       .dyn_tick       = &pxa_dyn_tick,
+#endif
 };
diff -urN linux/arch/arm/mach-rpc/riscpc.c linux/arch/arm/mach-rpc/riscpc.c
--- linux/arch/arm/mach-rpc/riscpc.c    2005/07/12 09:18:58     1.13
+++ linux/arch/arm/mach-rpc/riscpc.c    2005/09/15 08:52:47     1.14
@@ -140,7 +140,7 @@
 
 static struct platform_device serial_device = {
        .name                   = "serial8250",
-       .id                     = 0,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = serial_platform_data,
        },
diff -urN linux/arch/arm/mach-s3c2410/mach-anubis.c 
linux/arch/arm/mach-s3c2410/mach-anubis.c
--- linux/arch/arm/mach-s3c2410/mach-anubis.c   1970/01/01 00:00:00
+++ linux/arch/arm/mach-s3c2410/mach-anubis.c   2005-09-15 09:52:47.778369000 
+0100     1.1
@@ -0,0 +1,270 @@
+/* linux/arch/arm/mach-s3c2410/mach-anubis.c
+ *
+ * Copyright (c) 2003-2005 Simtec Electronics
+ *     http://armlinux.simtec.co.uk/
+ *     Ben Dooks <ben@simtec.co.uk>
+ *
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Modifications:
+ *     02-May-2005 BJD  Copied from mach-bast.c
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/list.h>
+#include <linux/timer.h>
+#include <linux/init.h>
+#include <linux/device.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include <asm/arch/anubis-map.h>
+#include <asm/arch/anubis-irq.h>
+#include <asm/arch/anubis-cpld.h>
+
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/mach-types.h>
+
+#include <asm/arch/regs-serial.h>
+#include <asm/arch/regs-gpio.h>
+#include <asm/arch/regs-mem.h>
+#include <asm/arch/regs-lcd.h>
+#include <asm/arch/nand.h>
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/partitions.h>
+
+#include "clock.h"
+#include "devs.h"
+#include "cpu.h"
+
+#define COPYRIGHT ", (c) 2005 Simtec Electronics"
+
+static struct map_desc anubis_iodesc[] __initdata = {
+  /* ISA IO areas */
+
+  { (u32)S3C24XX_VA_ISA_BYTE, 0x0,        SZ_16M, MT_DEVICE },
+  { (u32)S3C24XX_VA_ISA_WORD, 0x0,        SZ_16M, MT_DEVICE },
+
+  /* we could possibly compress the next set down into a set of smaller tables
+   * pagetables, but that would mean using an L2 section, and it still means
+   * we cannot actually feed the same register to an LDR due to 16K spacing
+   */
+
+  /* CPLD control registers */
+
+  { (u32)ANUBIS_VA_CTRL1,      ANUBIS_PA_CTRL1,        SZ_4K, MT_DEVICE },
+  { (u32)ANUBIS_VA_CTRL2,      ANUBIS_PA_CTRL2,        SZ_4K, MT_DEVICE },
+
+  /* IDE drives */
+
+  { (u32)ANUBIS_IDEPRI,                S3C2410_CS3,            SZ_1M, 
MT_DEVICE },
+  { (u32)ANUBIS_IDEPRIAUX,     S3C2410_CS3+(1<<26),    SZ_1M, MT_DEVICE },
+
+  { (u32)ANUBIS_IDESEC,                S3C2410_CS4,            SZ_1M, 
MT_DEVICE },
+  { (u32)ANUBIS_IDESECAUX,     S3C2410_CS4+(1<<26),    SZ_1M, MT_DEVICE },
+};
+
+#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
+#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
+#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
+
+static struct s3c24xx_uart_clksrc anubis_serial_clocks[] = {
+       [0] = {
+               .name           = "uclk",
+               .divisor        = 1,
+               .min_baud       = 0,
+               .max_baud       = 0,
+       },
+       [1] = {
+               .name           = "pclk",
+               .divisor        = 1,
+               .min_baud       = 0,
+               .max_baud       = 0.
+       }
+};
+
+
+static struct s3c2410_uartcfg anubis_uartcfgs[] = {
+       [0] = {
+               .hwport      = 0,
+               .flags       = 0,
+               .ucon        = UCON,
+               .ulcon       = ULCON,
+               .ufcon       = UFCON,
+               .clocks      = anubis_serial_clocks,
+               .clocks_size = ARRAY_SIZE(anubis_serial_clocks)
+       },
+       [1] = {
+               .hwport      = 2,
+               .flags       = 0,
+               .ucon        = UCON,
+               .ulcon       = ULCON,
+               .ufcon       = UFCON,
+               .clocks      = anubis_serial_clocks,
+               .clocks_size = ARRAY_SIZE(anubis_serial_clocks)
+       },
+};
+
+/* NAND Flash on Anubis board */
+
+static int external_map[]   = { 2 };
+static int chip0_map[]      = { 0 };
+static int chip1_map[]      = { 1 };
+
+struct mtd_partition anubis_default_nand_part[] = {
+       [0] = {
+               .name   = "Boot Agent",
+               .size   = SZ_16K,
+               .offset = 0
+       },
+       [1] = {
+               .name   = "/boot",
+               .size   = SZ_4M - SZ_16K,
+               .offset = SZ_16K,
+       },
+       [2] = {
+               .name   = "user1",
+               .offset = SZ_4M,
+               .size   = SZ_32M - SZ_4M,
+       },
+       [3] = {
+               .name   = "user2",
+               .offset = SZ_32M,
+               .size   = MTDPART_SIZ_FULL,
+       }
+};
+
+/* the Anubis has 3 selectable slots for nand-flash, the two
+ * on-board chip areas, as well as the external slot.
+ *
+ * Note, there is no current hot-plug support for the External
+ * socket.
+*/
+
+static struct s3c2410_nand_set anubis_nand_sets[] = {
+       [1] = {
+               .name           = "External",
+               .nr_chips       = 1,
+               .nr_map         = external_map,
+               .nr_partitions  = ARRAY_SIZE(anubis_default_nand_part),
+               .partitions     = anubis_default_nand_part
+       },
+       [0] = {
+               .name           = "chip0",
+               .nr_chips       = 1,
+               .nr_map         = chip0_map,
+               .nr_partitions  = ARRAY_SIZE(anubis_default_nand_part),
+               .partitions     = anubis_default_nand_part
+       },
+       [2] = {
+               .name           = "chip1",
+               .nr_chips       = 1,
+               .nr_map         = chip1_map,
+               .nr_partitions  = ARRAY_SIZE(anubis_default_nand_part),
+               .partitions     = anubis_default_nand_part
+       },
+};
+
+static void anubis_nand_select(struct s3c2410_nand_set *set, int slot)
+{
+       unsigned int tmp;
+
+       slot = set->nr_map[slot] & 3;
+
+       pr_debug("anubis_nand: selecting slot %d (set %p,%p)\n",
+                slot, set, set->nr_map);
+
+       tmp = __raw_readb(ANUBIS_VA_CTRL1);
+       tmp &= ~ANUBIS_CTRL1_NANDSEL;
+       tmp |= slot;
+
+       pr_debug("anubis_nand: ctrl1 now %02x\n", tmp);
+
+       __raw_writeb(tmp, ANUBIS_VA_CTRL1);
+}
+
+static struct s3c2410_platform_nand anubis_nand_info = {
+       .tacls          = 25,
+       .twrph0         = 80,
+       .twrph1         = 80,
+       .nr_sets        = ARRAY_SIZE(anubis_nand_sets),
+       .sets           = anubis_nand_sets,
+       .select_chip    = anubis_nand_select,
+};
+
+
+/* Standard Anubis devices */
+
+static struct platform_device *anubis_devices[] __initdata = {
+       &s3c_device_usb,
+       &s3c_device_wdt,
+       &s3c_device_adc,
+       &s3c_device_i2c,
+       &s3c_device_rtc,
+       &s3c_device_nand,
+};
+
+static struct clk *anubis_clocks[] = {
+       &s3c24xx_dclk0,
+       &s3c24xx_dclk1,
+       &s3c24xx_clkout0,
+       &s3c24xx_clkout1,
+       &s3c24xx_uclk,
+};
+
+static struct s3c24xx_board anubis_board __initdata = {
+       .devices       = anubis_devices,
+       .devices_count = ARRAY_SIZE(anubis_devices),
+       .clocks        = anubis_clocks,
+       .clocks_count  = ARRAY_SIZE(anubis_clocks)
+};
+
+void __init anubis_map_io(void)
+{
+       /* initialise the clocks */
+
+       s3c24xx_dclk0.parent = NULL;
+       s3c24xx_dclk0.rate   = 12*1000*1000;
+
+       s3c24xx_dclk1.parent = NULL;
+       s3c24xx_dclk1.rate   = 24*1000*1000;
+
+       s3c24xx_clkout0.parent  = &s3c24xx_dclk0;
+       s3c24xx_clkout1.parent  = &s3c24xx_dclk1;
+
+       s3c24xx_uclk.parent  = &s3c24xx_clkout1;
+
+       s3c_device_nand.dev.platform_data = &anubis_nand_info;
+
+       s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
+       s3c24xx_init_clocks(0);
+       s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
+       s3c24xx_set_board(&anubis_board);
+
+       /* ensure that the GPIO is setup */
+       s3c2410_gpio_setpin(S3C2410_GPA0, 1);
+}
+
+MACHINE_START(ANUBIS, "Simtec-Anubis")
+       /* Maintainer: Ben Dooks <ben@simtec.co.uk> */
+       .phys_ram       = S3C2410_SDRAM_PA,
+       .phys_io        = S3C2410_PA_UART,
+       .io_pg_offst    = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
+       .boot_params    = S3C2410_SDRAM_PA + 0x100,
+       .map_io         = anubis_map_io,
+       .init_irq       = s3c24xx_init_irq,
+       .timer          = &s3c24xx_timer,
+MACHINE_END
diff -urN linux/arch/arm/mach-s3c2410/Kconfig 
linux/arch/arm/mach-s3c2410/Kconfig
--- linux/arch/arm/mach-s3c2410/Kconfig 2005/07/12 09:18:58     1.11
+++ linux/arch/arm/mach-s3c2410/Kconfig 2005/09/15 08:52:47     1.12
@@ -2,6 +2,13 @@
 
 menu "S3C24XX Implementations"
 
+config MACH_ANUBIS
+       bool "Simtec Electronics ANUBIS"
+       select CPU_S3C2440
+       help
+         Say Y gere if you are using the Simtec Electronics ANUBIS
+         development system
+
 config ARCH_BAST
        bool "Simtec Electronics BAST (EB2410ITX)"
        select CPU_S3C2410
@@ -11,6 +18,14 @@
 
          Product page: <http://www.simtec.co.uk/products/EB2410ITX/>.
 
+config BAST_PC104_IRQ
+       bool "BAST PC104 IRQ support"
+       depends on ARCH_BAST
+       default y
+       help
+         Say Y here to enable the PC104 IRQ routing on the
+         Simtec BAST (EB2410ITX)
+
 config ARCH_H1940
        bool "IPAQ H1940"
        select CPU_S3C2410
diff -urN linux/arch/arm/mach-s3c2410/Makefile 
linux/arch/arm/mach-s3c2410/Makefile
--- linux/arch/arm/mach-s3c2410/Makefile        2005/08/01 18:23:38     1.11
+++ linux/arch/arm/mach-s3c2410/Makefile        2005/09/15 08:52:47     1.12
@@ -26,8 +26,13 @@
 obj-$(CONFIG_CPU_S3C2440)  += s3c2440-irq.o
 obj-$(CONFIG_CPU_S3C2440)  += s3c2440-clock.o
 
+# bast extras
+
+obj-$(CONFIG_BAST_PC104_IRQ)   += bast-irq.o
+
 # machine specific support
 
+obj-$(CONFIG_MACH_ANUBIS)      += mach-anubis.o
 obj-$(CONFIG_ARCH_BAST)                += mach-bast.o usb-simtec.o
 obj-$(CONFIG_ARCH_H1940)       += mach-h1940.o
 obj-$(CONFIG_MACH_N30)         += mach-n30.o
diff -urN linux/arch/arm/mach-s3c2410/bast-irq.c 
linux/arch/arm/mach-s3c2410/bast-irq.c
--- linux/arch/arm/mach-s3c2410/bast-irq.c      2004/04/23 15:54:06     1.1
+++ linux/arch/arm/mach-s3c2410/bast-irq.c      2005/09/15 08:52:47     1.2
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/bast-irq.c
  *
- * Copyright (c) 2004 Simtec Electronics
+ * Copyright (c) 2003,2005 Simtec Electronics
  *   Ben Dooks <ben@simtec.co.uk>
  *
  * http://www.simtec.co.uk/products/EB2410ITX/
@@ -21,7 +21,8 @@
  *
  * Modifications:
  *     08-Jan-2003 BJD  Moved from central IRQ code
- */
+ *     21-Aug-2005 BJD  Fixed missing code and compile errors
+*/
 
 
 #include <linux/init.h>
@@ -30,12 +31,19 @@
 #include <linux/ptrace.h>
 #include <linux/sysdev.h>
 
+#include <asm/mach-types.h>
+
 #include <asm/hardware.h>
 #include <asm/irq.h>
 #include <asm/io.h>
 
 #include <asm/mach/irq.h>
-#include <asm/hardware/s3c2410/irq.h>
+
+#include <asm/arch/regs-irq.h>
+#include <asm/arch/bast-map.h>
+#include <asm/arch/bast-irq.h>
+
+#include "irq.h"
 
 #if 0
 #include <asm/debug-ll.h>
@@ -79,15 +87,15 @@
        temp = __raw_readb(BAST_VA_PC104_IRQMASK);
        temp &= ~bast_pc104_irqmasks[irqno];
        __raw_writeb(temp, BAST_VA_PC104_IRQMASK);
-
-       if (temp == 0)
-               bast_extint_mask(IRQ_ISA);
 }
 
 static void
-bast_pc104_ack(unsigned int irqno)
+bast_pc104_maskack(unsigned int irqno)
 {
-       bast_extint_ack(IRQ_ISA);
+       struct irqdesc *desc = irq_desc + IRQ_ISA;
+
+       bast_pc104_mask(irqno);
+       desc->chip->ack(IRQ_ISA);
 }
 
 static void
@@ -98,14 +106,12 @@
        temp = __raw_readb(BAST_VA_PC104_IRQMASK);
        temp |= bast_pc104_irqmasks[irqno];
        __raw_writeb(temp, BAST_VA_PC104_IRQMASK);
-
-       bast_extint_unmask(IRQ_ISA);
 }
 
-static struct bast_pc104_chip = {
+static struct irqchip  bast_pc104_chip = {
        .mask        = bast_pc104_mask,
        .unmask      = bast_pc104_unmask,
-       .ack         = bast_pc104_ack
+       .ack         = bast_pc104_maskack
 };
 
 static void
@@ -119,14 +125,49 @@
 
        stat = __raw_readb(BAST_VA_PC104_IRQREQ) & 0xf;
 
-       for (i = 0; i < 4 && stat != 0; i++) {
-               if (stat & 1) {
-                       irqno = bast_pc104_irqs[i];
-                       desc = irq_desc + irqno;
+       if (unlikely(stat == 0)) {
+               /* ack if we get an irq with nothing (ie, startup) */
+
+               desc = irq_desc + IRQ_ISA;
+               desc->chip->ack(IRQ_ISA);
+       } else {
+               /* handle the IRQ */
+
+               for (i = 0; stat != 0; i++, stat >>= 1) {
+                       if (stat & 1) {
+                               irqno = bast_pc104_irqs[i];
 
-                       desc->handle(irqno, desc, regs);
+                               desc_handle_irq(irqno, irq_desc + irqno, regs);
+                       }
                }
+       }
+}
 
-               stat >>= 1;
+static __init int bast_irq_init(void)
+{
+       unsigned int i;
+
+       if (machine_is_bast()) {
+               printk(KERN_INFO "BAST PC104 IRQ routing, (c) 2005 Simtec 
Electronics\n");
+
+               /* zap all the IRQs */
+
+               __raw_writeb(0x0, BAST_VA_PC104_IRQMASK);
+
+               set_irq_chained_handler(IRQ_ISA, bast_irq_pc104_demux);
+
+               /* reigster our IRQs */
+
+               for (i = 0; i < 4; i++) {
+                       unsigned int irqno = bast_pc104_irqs[i];
+
+                       set_irq_chip(irqno, &bast_pc104_chip);
+                       set_irq_handler(irqno, do_level_IRQ);
+                       set_irq_flags(irqno, IRQF_VALID);
+               }
        }
+
+       return 0;
 }
+
+arch_initcall(bast_irq_init);
diff -urN linux/arch/arm/mach-s3c2410/clock.c 
linux/arch/arm/mach-s3c2410/clock.c
--- linux/arch/arm/mach-s3c2410/clock.c 2005/08/01 18:23:38     1.9
+++ linux/arch/arm/mach-s3c2410/clock.c 2005/09/15 08:52:47     1.10
@@ -388,6 +388,7 @@
                                unsigned long hclk,
                                unsigned long pclk)
 {
+       unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
        struct clk *clkp = init_clocks;
        int ptr;
        int ret;
@@ -446,5 +447,13 @@
                }
        }
 
+       /* show the clock-slow value */
+
+       printk("CLOCK: Slow mode (%ld.%ld MHz), %s, MPLL %s, UPLL %s\n",
+              print_mhz(xtal / ( 2 * S3C2410_CLKSLOW_GET_SLOWVAL(clkslow))),
+              (clkslow & S3C2410_CLKSLOW_SLOW) ? "slow" : "fast",
+              (clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on",
+              (clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on");
+
        return 0;
 }
diff -urN linux/arch/arm/mach-s3c2410/devs.c linux/arch/arm/mach-s3c2410/devs.c
--- linux/arch/arm/mach-s3c2410/devs.c  2005/07/12 09:18:58     1.6
+++ linux/arch/arm/mach-s3c2410/devs.c  2005/09/15 08:52:47     1.7
@@ -29,7 +29,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
-
+#include <asm/arch/fb.h>
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -103,6 +103,15 @@
 
 EXPORT_SYMBOL(s3c_device_lcd);
 
+static struct s3c2410fb_mach_info s3c2410fb_info;
+
+void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info)
+{
+       memcpy(&s3c2410fb_info,hard_s3c2410fb_info,sizeof(struct 
s3c2410fb_mach_info));
+       s3c_device_lcd.dev.platform_data = &s3c2410fb_info;
+}
+EXPORT_SYMBOL(set_s3c2410fb_info);
+
 /* NAND Controller */
 
 static struct resource s3c_nand_resource[] = {
diff -urN linux/arch/arm/mach-s3c2410/irq.c linux/arch/arm/mach-s3c2410/irq.c
--- linux/arch/arm/mach-s3c2410/irq.c   2005/08/01 18:23:38     1.8
+++ linux/arch/arm/mach-s3c2410/irq.c   2005/09/15 08:52:47     1.9
@@ -184,14 +184,14 @@
        .ack       = s3c_irq_maskack,
        .mask      = s3c_irq_mask,
        .unmask    = s3c_irq_unmask,
-       .wake      = s3c_irq_wake
+       .set_wake          = s3c_irq_wake
 };
 
 static struct irqchip s3c_irq_chip = {
        .ack       = s3c_irq_ack,
        .mask      = s3c_irq_mask,
        .unmask    = s3c_irq_unmask,
-       .wake      = s3c_irq_wake
+       .set_wake          = s3c_irq_wake
 };
 
 /* S3C2410_EINTMASK
@@ -350,16 +350,16 @@
        .mask       = s3c_irqext_mask,
        .unmask     = s3c_irqext_unmask,
        .ack        = s3c_irqext_ack,
-       .type       = s3c_irqext_type,
-       .wake       = s3c_irqext_wake
+       .set_type    = s3c_irqext_type,
+       .set_wake    = s3c_irqext_wake
 };
 
 static struct irqchip s3c_irq_eint0t4 = {
        .ack       = s3c_irq_ack,
        .mask      = s3c_irq_mask,
        .unmask    = s3c_irq_unmask,
-       .wake      = s3c_irq_wake,
-       .type      = s3c_irqext_type,
+       .set_wake  = s3c_irq_wake,
+       .set_type  = s3c_irqext_type,
 };
 
 /* mask values for the parent registers for each of the interrupt types */
@@ -496,11 +496,11 @@
        if (subsrc != 0) {
                if (subsrc & 1) {
                        mydesc = irq_desc + IRQ_TC;
-                       mydesc->handle( IRQ_TC, mydesc, regs);
+                       desc_handle_irq(IRQ_TC, mydesc, regs);
                }
                if (subsrc & 2) {
                        mydesc = irq_desc + IRQ_ADC;
-                       mydesc->handle(IRQ_ADC, mydesc, regs);
+                       desc_handle_irq(IRQ_ADC, mydesc, regs);
                }
        }
 }
@@ -529,17 +529,17 @@
                desc = irq_desc + start;
 
                if (subsrc & 1)
-                       desc->handle(start, desc, regs);
+                       desc_handle_irq(start, desc, regs);
 
                desc++;
 
                if (subsrc & 2)
-                       desc->handle(start+1, desc, regs);
+                       desc_handle_irq(start+1, desc, regs);
 
                desc++;
 
                if (subsrc & 4)
-                       desc->handle(start+2, desc, regs);
+                       desc_handle_irq(start+2, desc, regs);
        }
 }
 
diff -urN linux/arch/arm/mach-s3c2410/mach-bast.c 
linux/arch/arm/mach-s3c2410/mach-bast.c
--- linux/arch/arm/mach-s3c2410/mach-bast.c     2005/08/08 12:30:25     1.14
+++ linux/arch/arm/mach-s3c2410/mach-bast.c     2005/09/15 08:52:47     1.15
@@ -381,7 +381,7 @@
 
 static struct platform_device bast_sio = {
        .name                   = "serial8250",
-       .id                     = 0,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = &bast_sio_data,
        },
diff -urN linux/arch/arm/mach-s3c2410/mach-h1940.c 
linux/arch/arm/mach-s3c2410/mach-h1940.c
--- linux/arch/arm/mach-s3c2410/mach-h1940.c    2005/07/12 09:18:58     1.10
+++ linux/arch/arm/mach-s3c2410/mach-h1940.c    2005/09/15 08:52:47     1.11
@@ -45,6 +45,9 @@
 
 //#include <asm/debug-ll.h>
 #include <asm/arch/regs-serial.h>
+#include <asm/arch/regs-lcd.h>
+
+#include <asm/arch/fb.h>
 
 #include <linux/serial_core.h>
 
@@ -88,6 +91,48 @@
 
 
 
+/**
+ * Set lcd on or off
+ **/
+static struct s3c2410fb_mach_info h1940_lcdcfg __initdata = {
+       .fixed_syncs=           1,
+       .regs={
+               .lcdcon1=       S3C2410_LCDCON1_TFT16BPP | \
+                               S3C2410_LCDCON1_TFT | \
+                               S3C2410_LCDCON1_CLKVAL(0x0C),
+
+               .lcdcon2=       S3C2410_LCDCON2_VBPD(7) | \
+                               S3C2410_LCDCON2_LINEVAL(319) | \
+                               S3C2410_LCDCON2_VFPD(6) | \
+                               S3C2410_LCDCON2_VSPW(0),
+
+               .lcdcon3=       S3C2410_LCDCON3_HBPD(19) | \
+                               S3C2410_LCDCON3_HOZVAL(239) | \
+                               S3C2410_LCDCON3_HFPD(7),
+
+               .lcdcon4=       S3C2410_LCDCON4_MVAL(0) | \
+                               S3C2410_LCDCON4_HSPW(3),
+
+               .lcdcon5=       S3C2410_LCDCON5_FRM565 | \
+                               S3C2410_LCDCON5_INVVLINE | \
+                               S3C2410_LCDCON5_HWSWP,
+       },
+       .lpcsel=        0x02,
+       .gpccon=        0xaa940659,
+       .gpccon_mask=   0xffffffff,
+       .gpcup=         0x0000ffff,
+       .gpcup_mask=    0xffffffff,
+       .gpdcon=        0xaa84aaa0,
+       .gpdcon_mask=   0xffffffff,
+       .gpdup=         0x0000faff,
+       .gpdup_mask=    0xffffffff,
+
+       .width=         240,
+       .height=        320,
+       .xres=          {240,240,240},
+       .yres=          {320,320,320},
+       .bpp=           {16,16,16},
+};
 
 static struct platform_device *h1940_devices[] __initdata = {
        &s3c_device_usb,
@@ -116,6 +161,11 @@
 
 }
 
+void __init h1940_init(void)
+{
+       set_s3c2410fb_info(&h1940_lcdcfg);
+}
+
 MACHINE_START(H1940, "IPAQ-H1940")
        /* Maintainer: Ben Dooks <ben@fluff.org> */
        .phys_ram       = S3C2410_SDRAM_PA,
@@ -124,5 +174,6 @@
        .boot_params    = S3C2410_SDRAM_PA + 0x100,
        .map_io         = h1940_map_io,
        .init_irq       = h1940_init_irq,
+       .init_machine   = h1940_init,
        .timer          = &s3c24xx_timer,
 MACHINE_END
diff -urN linux/arch/arm/mach-s3c2410/mach-n30.c 
linux/arch/arm/mach-s3c2410/mach-n30.c
--- linux/arch/arm/mach-s3c2410/mach-n30.c      2005/07/12 09:18:58     1.2
+++ linux/arch/arm/mach-s3c2410/mach-n30.c      2005/09/15 08:52:47     1.3
@@ -110,34 +110,24 @@
        s3c24xx_init_irq();
 }
 
-
-static int n30_usbstart_thread(void *unused)
-{
-       /* Turn off suspend on both USB ports, and switch the
-        * selectable USB port to USB device mode. */
-       writel(readl(S3C2410_MISCCR) & ~0x00003008, S3C2410_MISCCR);
-
-       /* Turn off the D+ pull up for 3 seconds so that the USB host
-        * at the other end will do a rescan of the USB bus.  */
-       s3c2410_gpio_setpin(S3C2410_GPB3, 0);
-
-       msleep_interruptible(3*HZ);
-
-       s3c2410_gpio_setpin(S3C2410_GPB3, 1);
-
-       return 0;
-}
-
+/* GPB3 is the line that controls the pull-up for the USB D+ line */
 
 void __init n30_init(void)
 {
        s3c_device_i2c.dev.platform_data = &n30_i2ccfg;
 
-       kthread_run(n30_usbstart_thread, NULL, "n30_usbstart");
+       /* Turn off suspend on both USB ports, and switch the
+        * selectable USB port to USB device mode. */
+
+       s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
+                             S3C2410_MISCCR_USBSUSPND0 |
+                             S3C2410_MISCCR_USBSUSPND1, 0x0);
 }
 
 MACHINE_START(N30, "Acer-N30")
-       /* Maintainer: Christer Weinigel <christer@weinigel.se>, Ben Dooks 
<ben-linux@fluff.org> */
+       /* Maintainer: Christer Weinigel <christer@weinigel.se>,
+                               Ben Dooks <ben-linux@fluff.org>
+       */
        .phys_ram       = S3C2410_SDRAM_PA,
        .phys_io        = S3C2410_PA_UART,
        .io_pg_offst    = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
diff -urN linux/arch/arm/mach-s3c2410/mach-vr1000.c 
linux/arch/arm/mach-s3c2410/mach-vr1000.c
--- linux/arch/arm/mach-s3c2410/mach-vr1000.c   2005/07/12 09:18:58     1.13
+++ linux/arch/arm/mach-s3c2410/mach-vr1000.c   2005/09/15 08:52:47     1.14
@@ -221,7 +221,7 @@
 
 static struct platform_device serial_device = {
        .name                   = "serial8250",
-       .id                     = 0,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = serial_platform_data,
        },
diff -urN linux/arch/arm/mach-s3c2410/pm-simtec.c 
linux/arch/arm/mach-s3c2410/pm-simtec.c
--- linux/arch/arm/mach-s3c2410/pm-simtec.c     2005/07/12 09:18:58     1.1
+++ linux/arch/arm/mach-s3c2410/pm-simtec.c     2005/09/15 08:52:47     1.2
@@ -48,7 +48,7 @@
 
        /* check which machine we are running on */
 
-       if (!machine_is_bast() && !machine_is_vr1000())
+       if (!machine_is_bast() && !machine_is_vr1000() && !machine_is_anubis())
                return 0;
 
        printk(KERN_INFO "Simtec Board Power Manangement" COPYRIGHT "\n");
diff -urN linux/arch/arm/mach-s3c2410/pm.c linux/arch/arm/mach-s3c2410/pm.c
--- linux/arch/arm/mach-s3c2410/pm.c    2005/03/18 17:36:47     1.3
+++ linux/arch/arm/mach-s3c2410/pm.c    2005/09/15 08:52:47     1.4
@@ -585,14 +585,16 @@
 
        s3c2410_pm_check_store();
 
-       // need to make some form of time-delta
-
        /* send the cpu to sleep... */
 
        __raw_writel(0x00, S3C2410_CLKCON);  /* turn off clocks over sleep */
 
        s3c2410_cpu_suspend(regs_save);
 
+       /* restore the cpu state */
+
+       cpu_init();
+
        /* unset the return-from-sleep flag, to ensure reset */
 
        tmp = __raw_readl(S3C2410_GSTATUS2);
diff -urN linux/arch/arm/mach-s3c2410/s3c2440-clock.c 
linux/arch/arm/mach-s3c2410/s3c2440-clock.c
--- linux/arch/arm/mach-s3c2410/s3c2440-clock.c 2005/08/01 18:23:38     1.1
+++ linux/arch/arm/mach-s3c2410/s3c2440-clock.c 2005/09/15 08:52:47     1.2
@@ -68,6 +68,7 @@
 static int s3c2440_clk_add(struct sys_device *sysdev)
 {
        unsigned long upllcon = __raw_readl(S3C2410_UPLLCON);
+       unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
        struct clk *clk_h;
        struct clk *clk_p;
        struct clk *clk_xtal;
@@ -80,8 +81,9 @@
 
        s3c2440_clk_upll.rate = s3c2410_get_pll(upllcon, clk_xtal->rate);
 
-       printk("S3C2440: Clock Support, UPLL %ld.%03ld MHz\n",
-              print_mhz(s3c2440_clk_upll.rate));
+       printk("S3C2440: Clock Support, UPLL %ld.%03ld MHz, DVS %s\n",
+              print_mhz(s3c2440_clk_upll.rate),
+              (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off");
 
        clk_p = clk_get(NULL, "pclk");
        clk_h = clk_get(NULL, "hclk");
diff -urN linux/arch/arm/mach-s3c2410/s3c2440-irq.c 
linux/arch/arm/mach-s3c2410/s3c2440-irq.c
--- linux/arch/arm/mach-s3c2410/s3c2440-irq.c   2005/08/01 18:23:38     1.1
+++ linux/arch/arm/mach-s3c2410/s3c2440-irq.c   2005/09/15 08:52:47     1.2
@@ -64,11 +64,11 @@
        if (subsrc != 0) {
                if (subsrc & 1) {
                        mydesc = irq_desc + IRQ_S3C2440_WDT;
-                       mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);
+                       desc_handle_irq(IRQ_S3C2440_WDT, mydesc, regs);
                }
                if (subsrc & 2) {
                        mydesc = irq_desc + IRQ_S3C2440_AC97;
-                       mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);
+                       desc_handle_irq(IRQ_S3C2440_AC97, mydesc, regs);
                }
        }
 }
@@ -122,11 +122,11 @@
        if (subsrc != 0) {
                if (subsrc & 1) {
                        mydesc = irq_desc + IRQ_S3C2440_CAM_C;
-                       mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);
+                       desc_handle_irq(IRQ_S3C2440_CAM_C, mydesc, regs);
                }
                if (subsrc & 2) {
                        mydesc = irq_desc + IRQ_S3C2440_CAM_P;
-                       mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);
+                       desc_handle_irq(IRQ_S3C2440_CAM_P, mydesc, regs);
                }
        }
 }
diff -urN linux/arch/arm/mach-s3c2410/time.c linux/arch/arm/mach-s3c2410/time.c
--- linux/arch/arm/mach-s3c2410/time.c  2005/07/11 20:46:03     1.9
+++ linux/arch/arm/mach-s3c2410/time.c  2005/09/15 08:52:47     1.10
@@ -164,7 +164,7 @@
 
        /* configure the system for whichever machine is in use */
 
-       if (machine_is_bast() || machine_is_vr1000()) {
+       if (machine_is_bast() || machine_is_vr1000() || machine_is_anubis()) {
                /* timer is at 12MHz, scaler is 1 */
                timer_usec_ticks = timer_mask_usec_ticks(1, 12000000);
                tcnt = 12000000 / HZ;
diff -urN linux/arch/arm/mach-sa1100/assabet.c 
linux/arch/arm/mach-sa1100/assabet.c
--- linux/arch/arm/mach-sa1100/assabet.c        2005/07/12 09:18:59     1.23
+++ linux/arch/arm/mach-sa1100/assabet.c        2005/09/15 08:52:48     1.24
@@ -35,6 +35,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/serial_sa1100.h>
 #include <asm/arch/assabet.h>
+#include <asm/arch/mcp.h>
 
 #include "generic.h"
 
@@ -198,6 +199,11 @@
        .set_speed      = assabet_irda_set_speed,
 };
 
+static struct mcp_plat_data assabet_mcp_data = {
+       .mccr0          = MCCR0_ADM,
+       .sclk_rate      = 11981000,
+};
+
 static void __init assabet_init(void)
 {
        /*
@@ -246,6 +252,7 @@
        sa11x0_set_flash_data(&assabet_flash_data, assabet_flash_resources,
                              ARRAY_SIZE(assabet_flash_resources));
        sa11x0_set_irda_data(&assabet_irda_data);
+       sa11x0_set_mcp_data(&assabet_mcp_data);
 }
 
 /*
diff -urN linux/arch/arm/mach-sa1100/cerf.c linux/arch/arm/mach-sa1100/cerf.c
--- linux/arch/arm/mach-sa1100/cerf.c   2005/07/12 09:18:59     1.12
+++ linux/arch/arm/mach-sa1100/cerf.c   2005/09/15 08:52:48     1.13
@@ -29,6 +29,7 @@
 #include <asm/mach/serial_sa1100.h>
 
 #include <asm/arch/cerf.h>
+#include <asm/arch/mcp.h>
 #include "generic.h"
 
 static struct resource cerfuart2_resources[] = {
@@ -116,10 +117,16 @@
        GPDR |= CERF_GPIO_CF_RESET;
 }
 
+static struct mcp_plat_data cerf_mcp_data = {
+       .mccr0          = MCCR0_ADM,
+       .sclk_rate      = 11981000,
+};
+
 static void __init cerf_init(void)
 {
        platform_add_devices(cerf_devices, ARRAY_SIZE(cerf_devices));
        sa11x0_set_flash_data(&cerf_flash_data, &cerf_flash_resource, 1);
+       sa11x0_set_mcp_data(&cerf_mcp_data);
 }
 
 MACHINE_START(CERF, "Intrinsyc CerfBoard/CerfCube")
diff -urN linux/arch/arm/mach-sa1100/generic.c 
linux/arch/arm/mach-sa1100/generic.c
--- linux/arch/arm/mach-sa1100/generic.c        2004/12/27 02:15:48     1.24
+++ linux/arch/arm/mach-sa1100/generic.c        2005/09/15 08:52:48     1.25
@@ -221,6 +221,11 @@
        .resource       = sa11x0mcp_resources,
 };
 
+void sa11x0_set_mcp_data(struct mcp_plat_data *data)
+{
+       sa11x0mcp_device.dev.platform_data = data;
+}
+
 static struct resource sa11x0ssp_resources[] = {
        [0] = {
                .start  = 0x80070000,
diff -urN linux/arch/arm/mach-sa1100/generic.h 
linux/arch/arm/mach-sa1100/generic.h
--- linux/arch/arm/mach-sa1100/generic.h        2004/12/27 02:15:48     1.11
+++ linux/arch/arm/mach-sa1100/generic.h        2005/09/15 08:52:48     1.12
@@ -34,5 +34,8 @@
 extern void sa11x0_set_flash_data(struct flash_platform_data *flash,
                                  struct resource *res, int nr);
 
+struct sa11x0_ssp_plat_ops;
+extern void sa11x0_set_ssp_data(struct sa11x0_ssp_plat_ops *ops);
+
 struct irda_platform_data;
 void sa11x0_set_irda_data(struct irda_platform_data *irda);
diff -urN linux/arch/arm/mach-sa1100/irq.c linux/arch/arm/mach-sa1100/irq.c
--- linux/arch/arm/mach-sa1100/irq.c    2005/04/08 18:57:52     1.15
+++ linux/arch/arm/mach-sa1100/irq.c    2005/09/15 08:52:48     1.16
@@ -98,8 +98,8 @@
        .ack            = sa1100_low_gpio_ack,
        .mask           = sa1100_low_gpio_mask,
        .unmask         = sa1100_low_gpio_unmask,
-       .type           = sa1100_gpio_type,
-       .wake           = sa1100_low_gpio_wake,
+       .set_type       = sa1100_gpio_type,
+       .set_wake       = sa1100_low_gpio_wake,
 };
 
 /*
@@ -126,7 +126,7 @@
                mask >>= 11;
                do {
                        if (mask & 1)
-                               desc->handle(irq, desc, regs);
+                               desc_handle_irq(irq, desc, regs);
                        mask >>= 1;
                        irq++;
                        desc++;
@@ -181,8 +181,8 @@
        .ack            = sa1100_high_gpio_ack,
        .mask           = sa1100_high_gpio_mask,
        .unmask         = sa1100_high_gpio_unmask,
-       .type           = sa1100_gpio_type,
-       .wake           = sa1100_high_gpio_wake,
+       .set_type       = sa1100_gpio_type,
+       .set_wake       = sa1100_high_gpio_wake,
 };
 
 /*
diff -urN linux/arch/arm/mach-sa1100/lart.c linux/arch/arm/mach-sa1100/lart.c
--- linux/arch/arm/mach-sa1100/lart.c   2005/07/12 09:18:59     1.9
+++ linux/arch/arm/mach-sa1100/lart.c   2005/09/15 08:52:48     1.10
@@ -13,12 +13,23 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/serial_sa1100.h>
+#include <asm/arch/mcp.h>
 
 #include "generic.h"
 
 
 #warning "include/asm/arch-sa1100/ide.h needs fixing for lart"
 
+static struct mcp_plat_data lart_mcp_data = {
+       .mccr0          = MCCR0_ADM,
+       .sclk_rate      = 11981000,
+};
+
+static void __init lart_init(void)
+{
+       sa11x0_set_mcp_data(&lart_mcp_data);
+}
+
 static struct map_desc lart_io_desc[] __initdata = {
  /* virtual     physical    length      type */
   { 0xe8000000, 0x00000000, 0x00400000, MT_DEVICE }, /* main flash memory */
@@ -47,5 +58,6 @@
        .boot_params    = 0xc0000100,
        .map_io         = lart_map_io,
        .init_irq       = sa1100_init_irq,
+       .init_machine   = lart_init,
        .timer          = &sa1100_timer,
 MACHINE_END
diff -urN linux/arch/arm/mach-sa1100/neponset.c 
linux/arch/arm/mach-sa1100/neponset.c
--- linux/arch/arm/mach-sa1100/neponset.c       2005/04/08 18:57:52     1.22
+++ linux/arch/arm/mach-sa1100/neponset.c       2005/09/15 08:52:48     1.23
@@ -61,12 +61,12 @@
 
                        if (irr & IRR_ETHERNET) {
                                d = irq_desc + IRQ_NEPONSET_SMC9196;
-                               d->handle(IRQ_NEPONSET_SMC9196, d, regs);
+                               desc_handle_irq(IRQ_NEPONSET_SMC9196, d, regs);
                        }
 
                        if (irr & IRR_USAR) {
                                d = irq_desc + IRQ_NEPONSET_USAR;
-                               d->handle(IRQ_NEPONSET_USAR, d, regs);
+                               desc_handle_irq(IRQ_NEPONSET_USAR, d, regs);
                        }
 
                        desc->chip->unmask(irq);
@@ -74,7 +74,7 @@
 
                if (irr & IRR_SA1111) {
                        d = irq_desc + IRQ_NEPONSET_SA1111;
-                       d->handle(IRQ_NEPONSET_SA1111, d, regs);
+                       desc_handle_irq(IRQ_NEPONSET_SA1111, d, regs);
                }
        }
 }
diff -urN linux/arch/arm/mach-sa1100/shannon.c 
linux/arch/arm/mach-sa1100/shannon.c
--- linux/arch/arm/mach-sa1100/shannon.c        2005/07/12 09:18:59     1.8
+++ linux/arch/arm/mach-sa1100/shannon.c        2005/09/15 08:52:48     1.9
@@ -18,6 +18,7 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 #include <asm/mach/serial_sa1100.h>
+#include <asm/arch/mcp.h>
 #include <asm/arch/shannon.h>
 
 #include "generic.h"
@@ -52,9 +53,15 @@
        .flags          = IORESOURCE_MEM,
 };
 
+static struct mcp_plat_data shannon_mcp_data = {
+       .mccr0          = MCCR0_ADM,
+       .sclk_rate      = 11981000,
+};
+
 static void __init shannon_init(void)
 {
        sa11x0_set_flash_data(&shannon_flash_data, &shannon_flash_resource, 1);
+       sa11x0_set_mcp_data(&shannon_mcp_data);
 }
 
 static void __init shannon_map_io(void)
diff -urN linux/arch/arm/mach-sa1100/simpad.c 
linux/arch/arm/mach-sa1100/simpad.c
--- linux/arch/arm/mach-sa1100/simpad.c 2005/07/12 09:18:59     1.15
+++ linux/arch/arm/mach-sa1100/simpad.c 2005/09/15 08:52:48     1.16
@@ -23,6 +23,7 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 #include <asm/mach/serial_sa1100.h>
+#include <asm/arch/mcp.h>
 #include <asm/arch/simpad.h>
 
 #include <linux/serial_core.h>
@@ -123,6 +124,11 @@
        }
 };
 
+static struct mcp_plat_data simpad_mcp_data = {
+       .mccr0          = MCCR0_ADM,
+       .sclk_rate      = 11981000,
+};
+
 
 
 static void __init simpad_map_io(void)
@@ -157,6 +163,7 @@
 
        sa11x0_set_flash_data(&simpad_flash_data, simpad_flash_resources,
                              ARRAY_SIZE(simpad_flash_resources));
+       sa11x0_set_mcp_data(&simpad_mcp_data);
 }
 
 static void simpad_power_off(void)
diff -urN linux/arch/arm/mach-sa1100/time.c linux/arch/arm/mach-sa1100/time.c
--- linux/arch/arm/mach-sa1100/time.c   2005/07/11 20:46:03     1.4
+++ linux/arch/arm/mach-sa1100/time.c   2005/09/15 08:52:48     1.5
@@ -70,15 +70,11 @@
        return usec;
 }
 
-/*
- * We will be entered with IRQs enabled.
- *
- * Loop until we get ahead of the free running timer.
- * This ensures an exact clock tick count and time accuracy.
- * IRQs are disabled inside the loop to ensure coherence between
- * lost_ticks (updated in do_timer()) and the match reg value, so we
- * can use do_gettimeofday() from interrupt handlers.
- */
+#ifdef CONFIG_NO_IDLE_HZ
+static unsigned long initial_match;
+static int match_posponed;
+#endif
+
 static irqreturn_t
 sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
@@ -86,6 +82,21 @@
 
        write_seqlock(&xtime_lock);
 
+#ifdef CONFIG_NO_IDLE_HZ
+       if (match_posponed) {
+               match_posponed = 0;
+               OSMR0 = initial_match;
+       }
+#endif
+
+       /*
+        * Loop until we get ahead of the free running timer.
+        * This ensures an exact clock tick count and time accuracy.
+        * Since IRQs are disabled at this point, coherence between
+        * lost_ticks(updated in do_timer()) and the match reg value is
+        * ensured, hence we can use do_gettimeofday() from interrupt
+        * handlers.
+        */
        do {
                timer_tick(regs);
                OSSR = OSSR_M0;  /* Clear match on timer 0 */
@@ -120,6 +131,42 @@
        OSCR = 0;               /* initialize free-running timer, force first 
match */
 }
 
+#ifdef CONFIG_NO_IDLE_HZ
+static int sa1100_dyn_tick_enable_disable(void)
+{
+       /* nothing to do */
+       return 0;
+}
+
+static void sa1100_dyn_tick_reprogram(unsigned long ticks)
+{
+       if (ticks > 1) {
+               initial_match = OSMR0;
+               OSMR0 = initial_match + ticks * LATCH;
+               match_posponed = 1;
+       }
+}
+
+static irqreturn_t
+sa1100_dyn_tick_handler(int irq, void *dev_id, struct pt_regs *regs)
+{
+       if (match_posponed) {
+               match_posponed = 0;
+               OSMR0 = initial_match;
+               if ((signed long)(initial_match - OSCR) <= 0)
+                       return sa1100_timer_interrupt(irq, dev_id, regs);
+       }
+       return IRQ_NONE;
+}
+
+static struct dyn_tick_timer sa1100_dyn_tick = {
+       .enable         = sa1100_dyn_tick_enable_disable,
+       .disable        = sa1100_dyn_tick_enable_disable,
+       .reprogram      = sa1100_dyn_tick_reprogram,
+       .handler        = sa1100_dyn_tick_handler,
+};
+#endif
+
 #ifdef CONFIG_PM
 unsigned long osmr[4], oier;
 
@@ -156,4 +203,7 @@
        .suspend        = sa1100_timer_suspend,
        .resume         = sa1100_timer_resume,
        .offset         = sa1100_gettimeoffset,
+#ifdef CONFIG_NO_IDLE_HZ
+       .dyn_tick       = &sa1100_dyn_tick,
+#endif
 };
diff -urN linux/arch/arm/mach-shark/core.c linux/arch/arm/mach-shark/core.c
--- linux/arch/arm/mach-shark/core.c    2005/08/01 18:23:38     1.9
+++ linux/arch/arm/mach-shark/core.c    2005/09/15 08:52:48     1.10
@@ -41,7 +41,7 @@
 
 static struct platform_device serial_device = {
        .name                   = "serial8250",
-       .id                     = 0,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = serial_platform_data,
        },
diff -urN linux/arch/arm/mach-versatile/core.c 
linux/arch/arm/mach-versatile/core.c
--- linux/arch/arm/mach-versatile/core.c        2005/07/12 09:19:00     1.13
+++ linux/arch/arm/mach-versatile/core.c        2005/09/15 08:52:49     1.14
@@ -108,7 +108,7 @@
                irq += IRQ_SIC_START;
 
                desc = irq_desc + irq;
-               desc->handle(irq, desc, regs);
+               desc_handle_irq(irq, desc, regs);
        } while (status);
 }
 
diff -urN linux/arch/arm/mm/alignment.c linux/arch/arm/mm/alignment.c
--- linux/arch/arm/mm/alignment.c       2005/02/13 20:16:14     1.11
+++ linux/arch/arm/mm/alignment.c       2005/09/15 08:52:49     1.12
@@ -45,7 +45,7 @@
 
 #define LDST_P_EQ_U(i) ((((i) ^ ((i) >> 1)) & (1 << 23)) == 0)
 
-#define LDSTH_I_BIT(i) (i & (1 << 22))         /* half-word immed      */
+#define LDSTHD_I_BIT(i)        (i & (1 << 22))         /* double/half-word 
immed */
 #define LDM_S_BIT(i)   (i & (1 << 22))         /* write CPSR from SPSR */
 
 #define RN_BITS(i)     ((i >> 16) & 15)        /* Rn                   */
@@ -68,6 +68,7 @@
 static unsigned long ai_skipped;
 static unsigned long ai_half;
 static unsigned long ai_word;
+static unsigned long ai_dword;
 static unsigned long ai_multi;
 static int ai_usermode;
 
@@ -93,6 +94,8 @@
        p += sprintf(p, "Skipped:\t%lu\n", ai_skipped);
        p += sprintf(p, "Half:\t\t%lu\n", ai_half);
        p += sprintf(p, "Word:\t\t%lu\n", ai_word);
+       if (cpu_architecture() >= CPU_ARCH_ARMv5TE)
+               p += sprintf(p, "DWord:\t\t%lu\n", ai_dword);
        p += sprintf(p, "Multi:\t\t%lu\n", ai_multi);
        p += sprintf(p, "User faults:\t%i (%s)\n", ai_usermode,
                        usermode_action[ai_usermode]);
@@ -283,12 +286,6 @@
 {
        unsigned int rd = RD_BITS(instr);
 
-       if ((instr & 0x01f00ff0) == 0x01000090)
-               goto swp;
-
-       if ((instr & 0x90) != 0x90 || (instr & 0x60) == 0)
-               goto bad;
-
        ai_half += 1;
 
        if (user_mode(regs))
@@ -323,10 +320,47 @@
 
        return TYPE_LDST;
 
- swp:
-       printk(KERN_ERR "Alignment trap: not handling swp instruction\n");
- bad:
-       return TYPE_ERROR;
+ fault:
+       return TYPE_FAULT;
+}
+
+static int
+do_alignment_ldrdstrd(unsigned long addr, unsigned long instr,
+                     struct pt_regs *regs)
+{
+       unsigned int rd = RD_BITS(instr);
+
+       ai_dword += 1;
+
+       if (user_mode(regs))
+               goto user;
+
+       if ((instr & 0xf0) == 0xd0) {
+               unsigned long val;
+               get32_unaligned_check(val, addr);
+               regs->uregs[rd] = val;
+               get32_unaligned_check(val, addr+4);
+               regs->uregs[rd+1] = val;
+       } else {
+               put32_unaligned_check(regs->uregs[rd], addr);
+               put32_unaligned_check(regs->uregs[rd+1], addr+4);
+       }
+
+       return TYPE_LDST;
+
+ user:
+       if ((instr & 0xf0) == 0xd0) {
+               unsigned long val;
+               get32t_unaligned_check(val, addr);
+               regs->uregs[rd] = val;
+               get32t_unaligned_check(val, addr+4);
+               regs->uregs[rd+1] = val;
+       } else {
+               put32t_unaligned_check(regs->uregs[rd], addr);
+               put32t_unaligned_check(regs->uregs[rd+1], addr+4);
+       }
+
+       return TYPE_LDST;
 
  fault:
        return TYPE_FAULT;
@@ -617,12 +651,20 @@
        regs->ARM_pc += thumb_mode(regs) ? 2 : 4;
 
        switch (CODING_BITS(instr)) {
-       case 0x00000000:        /* ldrh or strh */
-               if (LDSTH_I_BIT(instr))
+       case 0x00000000:        /* 3.13.4 load/store instruction extensions */
+               if (LDSTHD_I_BIT(instr))
                        offset.un = (instr & 0xf00) >> 4 | (instr & 15);
                else
                        offset.un = regs->uregs[RM_BITS(instr)];
-               handler = do_alignment_ldrhstrh;
+
+               if ((instr & 0x000000f0) == 0x000000b0 || /* LDRH, STRH */
+                   (instr & 0x001000f0) == 0x001000f0)   /* LDRSH */
+                       handler = do_alignment_ldrhstrh;
+               else if ((instr & 0x001000f0) == 0x000000d0 || /* LDRD */
+                        (instr & 0x001000f0) == 0x000000f0)   /* STRD */
+                       handler = do_alignment_ldrdstrd;
+               else
+                       goto bad;
                break;
 
        case 0x04000000:        /* ldr or str immediate */
diff -urN linux/arch/arm/mm/copypage-v3.S linux/arch/arm/mm/copypage-v3.S
--- linux/arch/arm/mm/copypage-v3.S     2003/09/30 14:27:16     1.4
+++ linux/arch/arm/mm/copypage-v3.S     2005/09/15 08:52:49     1.5
@@ -12,7 +12,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 
                .text
                .align  5
diff -urN linux/arch/arm/mm/copypage-v4wb.S linux/arch/arm/mm/copypage-v4wb.S
--- linux/arch/arm/mm/copypage-v4wb.S   2003/09/30 14:27:16     1.3
+++ linux/arch/arm/mm/copypage-v4wb.S   2005/09/15 08:52:49     1.4
@@ -11,7 +11,7 @@
  */
 #include <linux/linkage.h>
 #include <linux/init.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 
        .text
        .align  5
diff -urN linux/arch/arm/mm/copypage-v4wt.S linux/arch/arm/mm/copypage-v4wt.S
--- linux/arch/arm/mm/copypage-v4wt.S   2003/09/30 14:27:16     1.3
+++ linux/arch/arm/mm/copypage-v4wt.S   2005/09/15 08:52:49     1.4
@@ -14,7 +14,7 @@
  */
 #include <linux/linkage.h>
 #include <linux/init.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 
        .text
        .align  5
diff -urN linux/arch/arm/mm/flush.c linux/arch/arm/mm/flush.c
--- linux/arch/arm/mm/flush.c   2005/07/11 20:46:04     1.4
+++ linux/arch/arm/mm/flush.c   2005/09/15 08:52:49     1.5
@@ -16,6 +16,58 @@
 #include <asm/tlbflush.h>
 
 #ifdef CONFIG_CPU_CACHE_VIPT
+
+void flush_cache_mm(struct mm_struct *mm)
+{
+       if (cache_is_vivt()) {
+               if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask))
+                       __cpuc_flush_user_all();
+               return;
+       }
+
+       if (cache_is_vipt_aliasing()) {
+               asm(    "mcr    p15, 0, %0, c7, c14, 0\n"
+               "       mcr     p15, 0, %0, c7, c5, 0\n"
+               "       mcr     p15, 0, %0, c7, c10, 4"
+                   :
+                   : "r" (0)
+                   : "cc");
+       }
+}
+
+void flush_cache_range(struct vm_area_struct *vma, unsigned long start, 
unsigned long end)
+{
+       if (cache_is_vivt()) {
+               if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask))
+                       __cpuc_flush_user_range(start & PAGE_MASK, 
PAGE_ALIGN(end),
+                                               vma->vm_flags);
+               return;
+       }
+
+       if (cache_is_vipt_aliasing()) {
+               asm(    "mcr    p15, 0, %0, c7, c14, 0\n"
+               "       mcr     p15, 0, %0, c7, c5, 0\n"
+               "       mcr     p15, 0, %0, c7, c10, 4"
+                   :
+                   : "r" (0)
+                   : "cc");
+       }
+}
+
+void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, 
unsigned long pfn)
+{
+       if (cache_is_vivt()) {
+               if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) {
+                       unsigned long addr = user_addr & PAGE_MASK;
+                       __cpuc_flush_user_range(addr, addr + PAGE_SIZE, 
vma->vm_flags);
+               }
+               return;
+       }
+
+       if (cache_is_vipt_aliasing())
+               flush_pfn_alias(pfn, user_addr);
+}
+
 #define ALIAS_FLUSH_START      0xffff4000
 
 #define TOP_PTE(x)     pte_offset_kernel(top_pmd, x)
diff -urN linux/arch/arm/mm/mm-armv.c linux/arch/arm/mm/mm-armv.c
--- linux/arch/arm/mm/mm-armv.c 2005/08/24 16:22:49     1.53
+++ linux/arch/arm/mm/mm-armv.c 2005/09/15 08:52:49     1.54
@@ -275,11 +275,9 @@
        int i;
 
        for (i = 0; i < 16; i += 1) {
-               alloc_init_section(virt, phys & SUPERSECTION_MASK,
-                                  prot | PMD_SECT_SUPER);
+               alloc_init_section(virt, phys, prot | PMD_SECT_SUPER);
 
                virt += (PGDIR_SIZE / 2);
-               phys += (PGDIR_SIZE / 2);
        }
 }
 
@@ -297,14 +295,10 @@
        pte_t *ptep;
 
        if (pmd_none(*pmdp)) {
-               unsigned long pmdval;
                ptep = alloc_bootmem_low_pages(2 * PTRS_PER_PTE *
                                               sizeof(pte_t));
 
-               pmdval = __pa(ptep) | prot_l1;
-               pmdp[0] = __pmd(pmdval);
-               pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t));
-               flush_pmd_entry(pmdp);
+               __pmd_populate(pmdp, __pa(ptep) | prot_l1);
        }
        ptep = pte_offset_kernel(pmdp, virt);
 
@@ -459,7 +453,7 @@
 
        for (i = 0; i < 16; i++) {
                unsigned long v = pgprot_val(protection_map[i]);
-               v &= (~(PTE_BUFFERABLE|PTE_CACHEABLE)) | user_pgprot;
+               v = (v & ~(PTE_BUFFERABLE|PTE_CACHEABLE)) | user_pgprot;
                protection_map[i] = __pgprot(v);
        }
 
@@ -583,23 +577,23 @@
  */
 void setup_mm_for_reboot(char mode)
 {
-       unsigned long pmdval;
+       unsigned long base_pmdval;
        pgd_t *pgd;
-       pmd_t *pmd;
        int i;
-       int cpu_arch = cpu_architecture();
 
        if (current->mm && current->mm->pgd)
                pgd = current->mm->pgd;
        else
                pgd = init_mm.pgd;
 
-       for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++) {
-               pmdval = (i << PGDIR_SHIFT) |
-                        PMD_SECT_AP_WRITE | PMD_SECT_AP_READ |
-                        PMD_TYPE_SECT;
-               if (cpu_arch <= CPU_ARCH_ARMv5TEJ)
-                       pmdval |= PMD_BIT4;
+       base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT;
+       if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ)
+               base_pmdval |= PMD_BIT4;
+
+       for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) {
+               unsigned long pmdval = (i << PGDIR_SHIFT) | base_pmdval;
+               pmd_t *pmd;
+
                pmd = pmd_off(pgd, i << PGDIR_SHIFT);
                pmd[0] = __pmd(pmdval);
                pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1)));
diff -urN linux/arch/arm/mm/proc-arm1020.S linux/arch/arm/mm/proc-arm1020.S
--- linux/arch/arm/mm/proc-arm1020.S    2005/07/12 09:19:00     1.16
+++ linux/arch/arm/mm/proc-arm1020.S    2005/09/15 08:52:49     1.17
@@ -28,7 +28,7 @@
 #include <linux/config.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
diff -urN linux/arch/arm/mm/proc-arm1020e.S linux/arch/arm/mm/proc-arm1020e.S
--- linux/arch/arm/mm/proc-arm1020e.S   2005/07/12 09:19:00     1.4
+++ linux/arch/arm/mm/proc-arm1020e.S   2005/09/15 08:52:49     1.5
@@ -28,7 +28,7 @@
 #include <linux/config.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
diff -urN linux/arch/arm/mm/proc-arm1022.S linux/arch/arm/mm/proc-arm1022.S
--- linux/arch/arm/mm/proc-arm1022.S    2005/01/13 14:05:19     1.3
+++ linux/arch/arm/mm/proc-arm1022.S    2005/09/15 08:52:49     1.4
@@ -17,7 +17,7 @@
 #include <linux/config.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
diff -urN linux/arch/arm/mm/proc-arm1026.S linux/arch/arm/mm/proc-arm1026.S
--- linux/arch/arm/mm/proc-arm1026.S    2005/01/13 14:05:19     1.4
+++ linux/arch/arm/mm/proc-arm1026.S    2005/09/15 08:52:49     1.5
@@ -17,7 +17,7 @@
 #include <linux/config.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
diff -urN linux/arch/arm/mm/proc-arm6_7.S linux/arch/arm/mm/proc-arm6_7.S
--- linux/arch/arm/mm/proc-arm6_7.S     2005/01/13 14:05:19     1.10
+++ linux/arch/arm/mm/proc-arm6_7.S     2005/09/15 08:52:49     1.11
@@ -13,7 +13,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
@@ -38,8 +38,8 @@
        mrc     p15, 0, r1, c5, c0, 0           @ get FSR
        mrc     p15, 0, r0, c6, c0, 0           @ get FAR
        ldr     r8, [r0]                        @ read arm instruction
-       tst     r8, #1 << 20                    @ L = 1 -> write?
-       orreq   r1, r1, #1 << 8                 @ yes.
+       tst     r8, #1 << 20                    @ L = 0 -> write?
+       orreq   r1, r1, #1 << 11                @ yes.
        and     r7, r8, #15 << 24
        add     pc, pc, r7, lsr #22             @ Now branch to the relevant 
processing routine
        nop
@@ -71,8 +71,8 @@
        mrc     p15, 0, r1, c5, c0, 0           @ get FSR
        mrc     p15, 0, r0, c6, c0, 0           @ get FAR
        ldr     r8, [r2]                        @ read arm instruction
-       tst     r8, #1 << 20                    @ L = 1 -> write?
-       orreq   r1, r1, #1 << 8                 @ yes.
+       tst     r8, #1 << 20                    @ L = 0 -> write?
+       orreq   r1, r1, #1 << 11                @ yes.
        and     r7, r8, #14 << 24
        teq     r7, #8 << 24                    @ was it ldm/stm
        movne   pc, lr
diff -urN linux/arch/arm/mm/proc-arm720.S linux/arch/arm/mm/proc-arm720.S
--- linux/arch/arm/mm/proc-arm720.S     2005/01/13 14:05:19     1.24
+++ linux/arch/arm/mm/proc-arm720.S     2005/09/15 08:52:49     1.25
@@ -33,7 +33,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/pgtable.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
diff -urN linux/arch/arm/mm/proc-macros.S linux/arch/arm/mm/proc-macros.S
--- linux/arch/arm/mm/proc-macros.S     2004/03/11 16:46:40     1.3
+++ linux/arch/arm/mm/proc-macros.S     2005/09/15 08:52:49     1.4
@@ -4,7 +4,7 @@
  *  VMA_VM_FLAGS
  *  VM_EXEC
  */
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
 
 /*
diff -urN linux/arch/arm/mm/proc-sa110.S linux/arch/arm/mm/proc-sa110.S
--- linux/arch/arm/mm/proc-sa110.S      2005/01/13 14:05:19     1.36
+++ linux/arch/arm/mm/proc-sa110.S      2005/09/15 08:52:49     1.37
@@ -15,7 +15,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/procinfo.h>
 #include <asm/hardware.h>
 #include <asm/pgtable.h>
diff -urN linux/arch/arm/mm/proc-sa1100.S linux/arch/arm/mm/proc-sa1100.S
--- linux/arch/arm/mm/proc-sa1100.S     2005/01/13 14:05:19     1.5
+++ linux/arch/arm/mm/proc-sa1100.S     2005/09/15 08:52:49     1.6
@@ -20,7 +20,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/procinfo.h>
 #include <asm/hardware.h>
 #include <asm/pgtable.h>
diff -urN linux/arch/arm/mm/proc-v6.S linux/arch/arm/mm/proc-v6.S
--- linux/arch/arm/mm/proc-v6.S 2005/08/24 16:22:49     1.9
+++ linux/arch/arm/mm/proc-v6.S 2005/09/15 08:52:49     1.10
@@ -11,7 +11,7 @@
  */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/procinfo.h>
 #include <asm/pgtable.h>
 
diff -urN linux/arch/arm/mm/tlb-v3.S linux/arch/arm/mm/tlb-v3.S
--- linux/arch/arm/mm/tlb-v3.S  2003/09/30 14:27:17     1.6
+++ linux/arch/arm/mm/tlb-v3.S  2005/09/15 08:52:49     1.7
@@ -13,7 +13,7 @@
  */
 #include <linux/linkage.h>
 #include <linux/init.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/tlbflush.h>
 #include "proc-macros.S"
 
diff -urN linux/arch/arm/mm/tlb-v4.S linux/arch/arm/mm/tlb-v4.S
--- linux/arch/arm/mm/tlb-v4.S  2005/02/13 20:16:14     1.8
+++ linux/arch/arm/mm/tlb-v4.S  2005/09/15 08:52:49     1.9
@@ -14,7 +14,7 @@
  */
 #include <linux/linkage.h>
 #include <linux/init.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/tlbflush.h>
 #include "proc-macros.S"
 
diff -urN linux/arch/arm/mm/tlb-v4wb.S linux/arch/arm/mm/tlb-v4wb.S
--- linux/arch/arm/mm/tlb-v4wb.S        2005/02/13 20:16:14     1.8
+++ linux/arch/arm/mm/tlb-v4wb.S        2005/09/15 08:52:49     1.9
@@ -14,7 +14,7 @@
  */
 #include <linux/linkage.h>
 #include <linux/init.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/tlbflush.h>
 #include "proc-macros.S"
 
diff -urN linux/arch/arm/mm/tlb-v4wbi.S linux/arch/arm/mm/tlb-v4wbi.S
--- linux/arch/arm/mm/tlb-v4wbi.S       2004/04/23 15:54:06     1.3
+++ linux/arch/arm/mm/tlb-v4wbi.S       2005/09/15 08:52:49     1.4
@@ -14,7 +14,7 @@
  */
 #include <linux/linkage.h>
 #include <linux/init.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/tlbflush.h>
 #include "proc-macros.S"
 
diff -urN linux/arch/arm/mm/tlb-v6.S linux/arch/arm/mm/tlb-v6.S
--- linux/arch/arm/mm/tlb-v6.S  2004/03/11 16:46:40     1.1
+++ linux/arch/arm/mm/tlb-v6.S  2005/09/15 08:52:49     1.2
@@ -11,7 +11,7 @@
  *  These assume a split I/D TLB.
  */
 #include <linux/linkage.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/page.h>
 #include <asm/tlbflush.h>
 #include "proc-macros.S"
diff -urN linux/arch/arm/nwfpe/entry26.S linux/arch/arm/nwfpe/entry26.S
--- linux/arch/arm/nwfpe/entry26.S      2003/06/05 14:43:25     1.8
+++ linux/arch/arm/nwfpe/entry26.S      2005/09/15 08:52:50     1.9
@@ -20,7 +20,7 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 
 /* This is the kernel's entry point into the floating point emulator.
 It is called from the kernel with code similar to this:
diff -urN linux/arch/arm/plat-omap/dmtimer.c linux/arch/arm/plat-omap/dmtimer.c
--- linux/arch/arm/plat-omap/dmtimer.c  1970/01/01 00:00:00
+++ linux/arch/arm/plat-omap/dmtimer.c  2005-09-15 09:52:50.760924000 +0100     
1.1
@@ -0,0 +1,260 @@
+/*
+ * linux/arch/arm/plat-omap/dmtimer.c
+ *
+ * OMAP Dual-Mode Timers
+ *
+ * Copyright (C) 2005 Nokia Corporation
+ * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * You should have received a copy of the  GNU General Public License along
+ * with this program; if not, write  to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/init.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/dmtimer.h>
+#include <asm/io.h>
+#include <asm/arch/irqs.h>
+#include <linux/spinlock.h>
+#include <linux/list.h>
+
+#define OMAP_TIMER_COUNT               8
+
+#define OMAP_TIMER_ID_REG              0x00
+#define OMAP_TIMER_OCP_CFG_REG         0x10
+#define OMAP_TIMER_SYS_STAT_REG                0x14
+#define OMAP_TIMER_STAT_REG            0x18
+#define OMAP_TIMER_INT_EN_REG          0x1c
+#define OMAP_TIMER_WAKEUP_EN_REG       0x20
+#define OMAP_TIMER_CTRL_REG            0x24
+#define OMAP_TIMER_COUNTER_REG         0x28
+#define OMAP_TIMER_LOAD_REG            0x2c
+#define OMAP_TIMER_TRIGGER_REG         0x30
+#define OMAP_TIMER_WRITE_PEND_REG      0x34
+#define OMAP_TIMER_MATCH_REG           0x38
+#define OMAP_TIMER_CAPTURE_REG         0x3c
+#define OMAP_TIMER_IF_CTRL_REG         0x40
+
+
+static struct dmtimer_info_struct {
+       struct list_head        unused_timers;
+       struct list_head        reserved_timers;
+} dm_timer_info;
+
+static struct omap_dm_timer dm_timers[] = {
+       { .base=0xfffb1400, .irq=INT_1610_GPTIMER1 },
+       { .base=0xfffb1c00, .irq=INT_1610_GPTIMER2 },
+       { .base=0xfffb2400, .irq=INT_1610_GPTIMER3 },
+       { .base=0xfffb2c00, .irq=INT_1610_GPTIMER4 },
+       { .base=0xfffb3400, .irq=INT_1610_GPTIMER5 },
+       { .base=0xfffb3c00, .irq=INT_1610_GPTIMER6 },
+       { .base=0xfffb4400, .irq=INT_1610_GPTIMER7 },
+       { .base=0xfffb4c00, .irq=INT_1610_GPTIMER8 },
+       { .base=0x0 },
+};
+
+
+static spinlock_t dm_timer_lock;
+
+
+inline void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 
value)
+{
+       omap_writel(value, timer->base + reg);
+       while (omap_dm_timer_read_reg(timer, OMAP_TIMER_WRITE_PEND_REG))
+               ;
+}
+
+u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg)
+{
+       return omap_readl(timer->base + reg);
+}
+
+int omap_dm_timers_active(void)
+{
+       struct omap_dm_timer *timer;
+
+       for (timer = &dm_timers[0]; timer->base; ++timer)
+               if (omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG) &
+                   OMAP_TIMER_CTRL_ST)
+                       return 1;
+
+       return 0;
+}
+
+
+void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
+{
+       int n = (timer - dm_timers) << 1;
+       u32 l;
+
+       l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n);
+       l |= source << n;
+       omap_writel(l, MOD_CONF_CTRL_1);
+}
+
+
+static void omap_dm_timer_reset(struct omap_dm_timer *timer)
+{
+       /* Reset and set posted mode */
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06);
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, 0x02);
+
+       omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_ARMXOR);
+}
+
+
+
+struct omap_dm_timer * omap_dm_timer_request(void)
+{
+       struct omap_dm_timer *timer = NULL;
+       unsigned long flags;
+
+       spin_lock_irqsave(&dm_timer_lock, flags);
+       if (!list_empty(&dm_timer_info.unused_timers)) {
+               timer = (struct omap_dm_timer *)
+                               dm_timer_info.unused_timers.next;
+               list_move_tail((struct list_head *)timer,
+                               &dm_timer_info.reserved_timers);
+       }
+       spin_unlock_irqrestore(&dm_timer_lock, flags);
+
+       return timer;
+}
+
+
+void omap_dm_timer_free(struct omap_dm_timer *timer)
+{
+       unsigned long flags;
+
+       omap_dm_timer_reset(timer);
+
+       spin_lock_irqsave(&dm_timer_lock, flags);
+       list_move_tail((struct list_head *)timer, &dm_timer_info.unused_timers);
+       spin_unlock_irqrestore(&dm_timer_lock, flags);
+}
+
+void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
+                               unsigned int value)
+{
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value);
+}
+
+unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
+{
+       return omap_dm_timer_read_reg(timer, OMAP_TIMER_STAT_REG);
+}
+
+void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int 
value)
+{
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value);
+}
+
+void omap_dm_timer_enable_autoreload(struct omap_dm_timer *timer)
+{
+       u32 l;
+       l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
+       l |= OMAP_TIMER_CTRL_AR;
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
+}
+
+void omap_dm_timer_trigger(struct omap_dm_timer *timer)
+{
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 1);
+}
+
+void omap_dm_timer_set_trigger(struct omap_dm_timer *timer, unsigned int value)
+{
+       u32 l;
+
+       l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
+       l |= value & 0x3;
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
+}
+
+void omap_dm_timer_start(struct omap_dm_timer *timer)
+{
+       u32 l;
+
+       l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
+       l |= OMAP_TIMER_CTRL_ST;
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
+}
+
+void omap_dm_timer_stop(struct omap_dm_timer *timer)
+{
+       u32 l;
+
+       l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
+       l &= ~0x1;
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
+}
+
+unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
+{
+       return omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG);
+}
+
+void omap_dm_timer_reset_counter(struct omap_dm_timer *timer)
+{
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, 0);
+}
+
+void omap_dm_timer_set_load(struct omap_dm_timer *timer, unsigned int load)
+{
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load);
+}
+
+void omap_dm_timer_set_match(struct omap_dm_timer *timer, unsigned int match)
+{
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match);
+}
+
+void omap_dm_timer_enable_compare(struct omap_dm_timer *timer)
+{
+       u32 l;
+
+       l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
+       l |= OMAP_TIMER_CTRL_CE;
+       omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
+}
+
+
+static inline void __dm_timer_init(void)
+{
+       struct omap_dm_timer *timer;
+
+       spin_lock_init(&dm_timer_lock);
+       INIT_LIST_HEAD(&dm_timer_info.unused_timers);
+       INIT_LIST_HEAD(&dm_timer_info.reserved_timers);
+
+       timer = &dm_timers[0];
+       while (timer->base) {
+               list_add_tail((struct list_head *)timer, 
&dm_timer_info.unused_timers);
+               omap_dm_timer_reset(timer);
+               timer++;
+       }
+}
+
+static int __init omap_dm_timer_init(void)
+{
+       if (cpu_is_omap16xx())
+               __dm_timer_init();
+       return 0;
+}
+
+arch_initcall(omap_dm_timer_init);
diff -urN linux/arch/arm/plat-omap/sram-fn.S linux/arch/arm/plat-omap/sram-fn.S
--- linux/arch/arm/plat-omap/sram-fn.S  1970/01/01 00:00:00
+++ linux/arch/arm/plat-omap/sram-fn.S  2005-09-15 09:52:50.783133000 +0100     
1.1
@@ -0,0 +1,58 @@
+/*
+ * linux/arch/arm/plat-omap/sram.S
+ *
+ * Functions that need to be run in internal SRAM
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <asm/arch/io.h>
+#include <asm/arch/hardware.h>
+
+       .text
+
+/*
+ * Reprograms ULPD and CKCTL.
+ */
+ENTRY(sram_reprogram_clock)
+       stmfd   sp!, {r0 - r12, lr}             @ save registers on stack
+
+       mov     r2, #IO_ADDRESS(DPLL_CTL) & 0xff000000
+       orr     r2, r2, #IO_ADDRESS(DPLL_CTL) & 0x00ff0000
+       orr     r2, r2, #IO_ADDRESS(DPLL_CTL) & 0x0000ff00
+
+       mov     r3, #IO_ADDRESS(ARM_CKCTL) & 0xff000000
+       orr     r3, r3, #IO_ADDRESS(ARM_CKCTL) & 0x00ff0000
+       orr     r3, r3, #IO_ADDRESS(ARM_CKCTL) & 0x0000ff00
+
+       tst     r0, #1 << 4                     @ want lock mode?
+       beq     newck                           @ nope
+       bic     r0, r0, #1 << 4                 @ else clear lock bit
+       strh    r0, [r2]                        @ set dpll into bypass mode
+       orr     r0, r0, #1 << 4                 @ set lock bit again
+
+newck:
+       strh    r1, [r3]                        @ write new ckctl value
+       strh    r0, [r2]                        @ write new dpll value
+
+       mov     r4, #0x0700                     @ let the clocks settle
+       orr     r4, r4, #0x00ff
+delay: sub     r4, r4, #1
+       cmp     r4, #0
+       bne     delay
+
+lock:  ldrh    r4, [r2], #0                    @ read back dpll value
+       tst     r0, #1 << 4                     @ want lock mode?
+       beq     out                             @ nope
+       tst     r4, #1 << 0                     @ dpll rate locked?
+       beq     lock                            @ try again
+
+out:
+       ldmfd   sp!, {r0 - r12, pc}             @ restore regs and return
+ENTRY(sram_reprogram_clock_sz)
+       .word   . - sram_reprogram_clock
diff -urN linux/arch/arm/plat-omap/sram.c linux/arch/arm/plat-omap/sram.c
--- linux/arch/arm/plat-omap/sram.c     1970/01/01 00:00:00
+++ linux/arch/arm/plat-omap/sram.c     2005-09-15 09:52:50.803973000 +0100     
1.1
@@ -0,0 +1,116 @@
+/*
+ * linux/arch/arm/plat-omap/sram.c
+ *
+ * OMAP SRAM detection and management
+ *
+ * Copyright (C) 2005 Nokia Corporation
+ * Written by Tony Lindgren <tony@atomide.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+#include <asm/mach/map.h>
+#include <asm/io.h>
+#include <asm/cacheflush.h>
+
+#include "sram.h"
+
+#define OMAP1_SRAM_BASE                0xd0000000
+#define OMAP1_SRAM_START       0x20000000
+#define SRAM_BOOTLOADER_SZ     0x80
+
+static unsigned long omap_sram_base;
+static unsigned long omap_sram_size;
+static unsigned long omap_sram_ceil;
+
+/*
+ * The amount of SRAM depends on the core type:
+ * 730 = 200K, 1510 = 512K, 5912 = 256K, 1610 = 16K, 1710 = 16K
+ * Note that we cannot try to test for SRAM here because writes
+ * to secure SRAM will hang the system. Also the SRAM is not
+ * yet mapped at this point.
+ */
+void __init omap_detect_sram(void)
+{
+       omap_sram_base = OMAP1_SRAM_BASE;
+
+       if (cpu_is_omap730())
+               omap_sram_size = 0x32000;
+       else if (cpu_is_omap1510())
+               omap_sram_size = 0x80000;
+       else if (cpu_is_omap1610() || cpu_is_omap1621() || cpu_is_omap1710())
+               omap_sram_size = 0x4000;
+       else if (cpu_is_omap1611())
+               omap_sram_size = 0x3e800;
+       else {
+               printk(KERN_ERR "Could not detect SRAM size\n");
+               omap_sram_size = 0x4000;
+       }
+
+       printk(KERN_INFO "SRAM size: 0x%lx\n", omap_sram_size);
+       omap_sram_ceil = omap_sram_base + omap_sram_size;
+}
+
+static struct map_desc omap_sram_io_desc[] __initdata = {
+       { OMAP1_SRAM_BASE, OMAP1_SRAM_START, 0, MT_DEVICE }
+};
+
+/*
+ * In order to use last 2kB of SRAM on 1611b, we must round the size
+ * up to multiple of PAGE_SIZE. We cannot use ioremap for SRAM, as
+ * clock init needs SRAM early.
+ */
+void __init omap_map_sram(void)
+{
+       if (omap_sram_size == 0)
+               return;
+
+       omap_sram_io_desc[0].length = (omap_sram_size + PAGE_SIZE-1)/PAGE_SIZE;
+       omap_sram_io_desc[0].length *= PAGE_SIZE;
+       iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc));
+
+       /*
+        * Looks like we need to preserve some bootloader code at the
+        * beginning of SRAM for jumping to flash for reboot to work...
+        */
+       memset((void *)omap_sram_base + SRAM_BOOTLOADER_SZ, 0,
+              omap_sram_size - SRAM_BOOTLOADER_SZ);
+}
+
+static void (*_omap_sram_reprogram_clock)(u32 dpllctl, u32 ckctl) = NULL;
+
+void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl)
+{
+       if (_omap_sram_reprogram_clock == NULL)
+               panic("Cannot use SRAM");
+
+       return _omap_sram_reprogram_clock(dpllctl, ckctl);
+}
+
+void * omap_sram_push(void * start, unsigned long size)
+{
+       if (size > (omap_sram_ceil - (omap_sram_base + SRAM_BOOTLOADER_SZ))) {
+               printk(KERN_ERR "Not enough space in SRAM\n");
+               return NULL;
+       }
+       omap_sram_ceil -= size;
+       omap_sram_ceil &= ~0x3;
+       memcpy((void *)omap_sram_ceil, start, size);
+
+       return (void *)omap_sram_ceil;
+}
+
+void __init omap_sram_init(void)
+{
+       omap_detect_sram();
+       omap_map_sram();
+       _omap_sram_reprogram_clock = omap_sram_push(sram_reprogram_clock,
+                                                   sram_reprogram_clock_sz);
+}
diff -urN linux/arch/arm/plat-omap/sram.h linux/arch/arm/plat-omap/sram.h
--- linux/arch/arm/plat-omap/sram.h     1970/01/01 00:00:00
+++ linux/arch/arm/plat-omap/sram.h     2005-09-15 09:52:50.823009000 +0100     
1.1
@@ -0,0 +1,21 @@
+/*
+ * linux/arch/arm/plat-omap/sram.h
+ *
+ * Interface for functions that need to be run in internal SRAM
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ARCH_ARM_OMAP_SRAM_H
+#define __ARCH_ARM_OMAP_SRAM_H
+
+extern void * omap_sram_push(void * start, unsigned long size);
+extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl);
+
+/* Do not use these */
+extern void sram_reprogram_clock(u32 ckctl, u32 dpllctl);
+extern unsigned long sram_reprogram_clock_sz;
+
+#endif
diff -urN linux/arch/arm/plat-omap/Kconfig linux/arch/arm/plat-omap/Kconfig
--- linux/arch/arm/plat-omap/Kconfig    2005/07/13 11:48:53     1.1
+++ linux/arch/arm/plat-omap/Kconfig    2005/09/15 08:52:50     1.2
@@ -91,6 +91,13 @@
          Kernel internal timer frequency should be a divisor of 32768,
          such as 64 or 128.
 
+config OMAP_DM_TIMER
+       bool "Use dual-mode timer"
+       default n
+       depends on ARCH_OMAP16XX
+       help
+        Select this option if you want to use OMAP Dual-Mode timers.
+
 choice
        prompt "Low-level debug console UART"
        depends on ARCH_OMAP
@@ -107,6 +114,15 @@
 
 endchoice
 
+config OMAP_SERIAL_WAKE
+       bool "Enable wake-up events for serial ports"
+       depends OMAP_MUX
+       default y
+       help
+         Select this option if you want to have your system wake up
+         to data on the serial RX line. This allows you to wake the
+         system from serial console.
+
 endmenu
 
 endif
diff -urN linux/arch/arm/plat-omap/Makefile linux/arch/arm/plat-omap/Makefile
--- linux/arch/arm/plat-omap/Makefile   2005/07/13 11:48:53     1.1
+++ linux/arch/arm/plat-omap/Makefile   2005/09/15 08:52:50     1.2
@@ -3,7 +3,7 @@
 #
 
 # Common support
-obj-y := common.o dma.o clock.o mux.o gpio.o mcbsp.o usb.o
+obj-y := common.o sram.o sram-fn.o clock.o dma.o mux.o gpio.o mcbsp.o usb.o
 obj-m :=
 obj-n :=
 obj-  :=
@@ -15,3 +15,5 @@
 obj-$(CONFIG_PM) += pm.o sleep.o
 
 obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
+obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
+
diff -urN linux/arch/arm/plat-omap/clock.c linux/arch/arm/plat-omap/clock.c
--- linux/arch/arm/plat-omap/clock.c    2005/07/13 11:48:53     1.1
+++ linux/arch/arm/plat-omap/clock.c    2005/09/15 08:52:50     1.2
@@ -21,6 +21,7 @@
 #include <asm/arch/usb.h>
 
 #include "clock.h"
+#include "sram.h"
 
 static LIST_HEAD(clocks);
 static DECLARE_MUTEX(clocks_sem);
@@ -141,7 +142,7 @@
 static struct clk armper_ck = {
        .name           = "armper_ck",
        .parent         = &ck_dpll1,
-       .flags          = CLOCK_IN_OMAP730 | CLOCK_IN_OMAP1510 | 
CLOCK_IN_OMAP16XX |
+       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
                          RATE_CKCTL,
        .enable_reg     = ARM_IDLECT2,
        .enable_bit     = EN_PERCK,
@@ -385,7 +386,8 @@
        .name           = "uart2_ck",
        /* Direct from ULPD, no parent */
        .rate           = 12000000,
-       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 
ENABLE_REG_32BIT,
+       .flags          = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 
ENABLE_REG_32BIT |
+                         ALWAYS_ENABLED,
        .enable_reg     = MOD_CONF_CTRL_0,
        .enable_bit     = 30,   /* Chooses between 12MHz and 48MHz */
        .set_rate       = &set_uart_rate,
@@ -443,6 +445,15 @@
        .enable_bit     = 8 /* UHOST_EN */,
 };
 
+static struct clk usb_dc_ck = {
+       .name           = "usb_dc_ck",
+       /* Direct from ULPD, no parent */
+       .rate           = 48000000,
+       .flags          = CLOCK_IN_OMAP16XX | RATE_FIXED,
+       .enable_reg     = SOFT_REQ_REG,
+       .enable_bit     = 4,
+};
+
 static struct clk mclk_1510 = {
        .name           = "mclk",
        /* Direct from ULPD, no parent. May be enabled by ext hardware. */
@@ -552,6 +563,7 @@
        &uart3_16xx,
        &usb_clko,
        &usb_hhc_ck1510, &usb_hhc_ck16xx,
+       &usb_dc_ck,
        &mclk_1510,  &mclk_16xx,
        &bclk_1510,  &bclk_16xx,
        &mmc1_ck,
@@ -946,14 +958,13 @@
        if (!ptr->rate)
                return -EINVAL;
 
-       if (!ptr->rate)
-               return -EINVAL;
+       /*
+        * In most cases we should not need to reprogram DPLL.
+        * Reprogramming the DPLL is tricky, it must be done from SRAM.
+        */
+       omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val);
 
-       if (unlikely(ck_dpll1.rate == 0)) {
-               omap_writew(ptr->dpllctl_val, DPLL_CTL);
-               ck_dpll1.rate = ptr->pll_rate;
-       }
-       omap_writew(ptr->ckctl_val, ARM_CKCTL);
+       ck_dpll1.rate = ptr->pll_rate;
        propagate_rate(&ck_dpll1);
        return 0;
 }
@@ -1224,9 +1235,11 @@
 #endif
        /* Cache rates for clocks connected to ck_ref (not dpll1) */
        propagate_rate(&ck_ref);
-       printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): %ld.%01ld/%ld/%ld 
MHz\n",
+       printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): "
+               "%ld.%01ld/%ld.%01ld/%ld.%01ld MHz\n",
               ck_ref.rate / 1000000, (ck_ref.rate / 100000) % 10,
-              ck_dpll1.rate, arm_ck.rate);
+              ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10,
+              arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10);
 
 #ifdef CONFIG_MACH_OMAP_PERSEUS2
        /* Select slicer output as OMAP input clock */
@@ -1271,7 +1284,9 @@
        struct clk *p;
        __u32 regval32;
 
-       omap_writew(0, SOFT_REQ_REG);
+       /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */
+       regval32 = omap_readw(SOFT_REQ_REG) & (1 << 4);
+       omap_writew(regval32, SOFT_REQ_REG);
        omap_writew(0, SOFT_REQ_REG2);
 
        list_for_each_entry(p, &clocks, node) {
diff -urN linux/arch/arm/plat-omap/common.c linux/arch/arm/plat-omap/common.c
--- linux/arch/arm/plat-omap/common.c   2005/07/13 11:48:53     1.1
+++ linux/arch/arm/plat-omap/common.c   2005/09/15 08:52:50     1.2
@@ -26,6 +26,7 @@
 #include <asm/hardware/clock.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
+#include <asm/setup.h>
 
 #include <asm/arch/board.h>
 #include <asm/arch/mux.h>
@@ -35,11 +36,11 @@
 
 #define NO_LENGTH_CHECK 0xffffffff
 
-extern int omap_bootloader_tag_len;
-extern u8 omap_bootloader_tag[];
+unsigned char omap_bootloader_tag[512];
+int omap_bootloader_tag_len;
 
 struct omap_board_config_kernel *omap_board_config;
-int omap_board_config_size = 0;
+int omap_board_config_size;
 
 static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out)
 {
diff -urN linux/arch/arm/plat-omap/dma.c linux/arch/arm/plat-omap/dma.c
--- linux/arch/arm/plat-omap/dma.c      2005/07/13 11:48:53     1.1
+++ linux/arch/arm/plat-omap/dma.c      2005/09/15 08:52:50     1.2
@@ -425,7 +425,7 @@
                dma_chan[ch + 6].saved_csr = csr >> 7;
                csr &= 0x7f;
        }
-       if (!csr)
+       if ((csr & 0x3f) == 0)
                return 0;
        if (unlikely(dma_chan[ch].dev_id == -1)) {
                printk(KERN_WARNING "Spurious interrupt from DMA channel %d 
(CSR %04x)\n",
@@ -890,11 +890,11 @@
        w |= 1 << 8;
        omap_writew(w, OMAP1610_DMA_LCD_CTRL);
 
+       lcd_dma.active = 1;
+
        w = omap_readw(OMAP1610_DMA_LCD_CCR);
        w |= 1 << 7;
        omap_writew(w, OMAP1610_DMA_LCD_CCR);
-
-       lcd_dma.active = 1;
 }
 
 void omap_setup_lcd_dma(void)
@@ -965,8 +965,8 @@
  */
 dma_addr_t omap_get_dma_src_pos(int lch)
 {
-       return (dma_addr_t) (OMAP_DMA_CSSA_L(lch) |
-                            (OMAP_DMA_CSSA_U(lch) << 16));
+       return (dma_addr_t) (omap_readw(OMAP_DMA_CSSA_L(lch)) |
+       (omap_readw(OMAP_DMA_CSSA_U(lch)) << 16));
 }
 
 /*
@@ -979,8 +979,18 @@
  */
 dma_addr_t omap_get_dma_dst_pos(int lch)
 {
-       return (dma_addr_t) (OMAP_DMA_CDSA_L(lch) |
-                            (OMAP_DMA_CDSA_U(lch) << 16));
+       return (dma_addr_t) (omap_readw(OMAP_DMA_CDSA_L(lch)) |
+       (omap_readw(OMAP_DMA_CDSA_U(lch)) << 16));
+}
+
+/*
+ * Returns current source transfer counting for the given DMA channel.
+ * Can be used to monitor the progress of a transfer inside a  block.
+ * It must be called with disabled interrupts.
+ */
+int omap_get_dma_src_addr_counter(int lch)
+{
+       return (dma_addr_t) omap_readw(OMAP_DMA_CSAC(lch));
 }
 
 int omap_dma_running(void)
@@ -1076,6 +1086,7 @@
 
 EXPORT_SYMBOL(omap_get_dma_src_pos);
 EXPORT_SYMBOL(omap_get_dma_dst_pos);
+EXPORT_SYMBOL(omap_get_dma_src_addr_counter);
 EXPORT_SYMBOL(omap_clear_dma);
 EXPORT_SYMBOL(omap_set_dma_priority);
 EXPORT_SYMBOL(omap_request_dma);
diff -urN linux/arch/arm/plat-omap/gpio.c linux/arch/arm/plat-omap/gpio.c
--- linux/arch/arm/plat-omap/gpio.c     2005/07/13 11:48:53     1.1
+++ linux/arch/arm/plat-omap/gpio.c     2005/09/15 08:52:50     1.2
@@ -3,7 +3,7 @@
  *
  * Support functions for OMAP GPIO
  *
- * Copyright (C) 2003 Nokia Corporation
+ * Copyright (C) 2003-2005 Nokia Corporation
  * Written by Juha Yrjölä <juha.yrjola@nokia.com>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -17,8 +17,11 @@
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 #include <linux/ptrace.h>
+#include <linux/sysdev.h>
+#include <linux/err.h>
 
 #include <asm/hardware.h>
+#include <asm/hardware/clock.h>
 #include <asm/irq.h>
 #include <asm/arch/irqs.h>
 #include <asm/arch/gpio.h>
@@ -29,7 +32,7 @@
 /*
  * OMAP1510 GPIO registers
  */
-#define OMAP1510_GPIO_BASE             0xfffce000
+#define OMAP1510_GPIO_BASE             (void __iomem *)0xfffce000
 #define OMAP1510_GPIO_DATA_INPUT       0x00
 #define OMAP1510_GPIO_DATA_OUTPUT      0x04
 #define OMAP1510_GPIO_DIR_CONTROL      0x08
@@ -43,34 +46,37 @@
 /*
  * OMAP1610 specific GPIO registers
  */
-#define OMAP1610_GPIO1_BASE            0xfffbe400
-#define OMAP1610_GPIO2_BASE            0xfffbec00
-#define OMAP1610_GPIO3_BASE            0xfffbb400
-#define OMAP1610_GPIO4_BASE            0xfffbbc00
+#define OMAP1610_GPIO1_BASE            (void __iomem *)0xfffbe400
+#define OMAP1610_GPIO2_BASE            (void __iomem *)0xfffbec00
+#define OMAP1610_GPIO3_BASE            (void __iomem *)0xfffbb400
+#define OMAP1610_GPIO4_BASE            (void __iomem *)0xfffbbc00
 #define OMAP1610_GPIO_REVISION         0x0000
 #define OMAP1610_GPIO_SYSCONFIG                0x0010
 #define OMAP1610_GPIO_SYSSTATUS                0x0014
 #define OMAP1610_GPIO_IRQSTATUS1       0x0018
 #define OMAP1610_GPIO_IRQENABLE1       0x001c
+#define OMAP1610_GPIO_WAKEUPENABLE     0x0028
 #define OMAP1610_GPIO_DATAIN           0x002c
 #define OMAP1610_GPIO_DATAOUT          0x0030
 #define OMAP1610_GPIO_DIRECTION                0x0034
 #define OMAP1610_GPIO_EDGE_CTRL1       0x0038
 #define OMAP1610_GPIO_EDGE_CTRL2       0x003c
 #define OMAP1610_GPIO_CLEAR_IRQENABLE1 0x009c
+#define OMAP1610_GPIO_CLEAR_WAKEUPENA  0x00a8
 #define OMAP1610_GPIO_CLEAR_DATAOUT    0x00b0
 #define OMAP1610_GPIO_SET_IRQENABLE1   0x00dc
+#define OMAP1610_GPIO_SET_WAKEUPENA    0x00e8
 #define OMAP1610_GPIO_SET_DATAOUT      0x00f0
 
 /*
  * OMAP730 specific GPIO registers
  */
-#define OMAP730_GPIO1_BASE             0xfffbc000
-#define OMAP730_GPIO2_BASE             0xfffbc800
-#define OMAP730_GPIO3_BASE             0xfffbd000
-#define OMAP730_GPIO4_BASE             0xfffbd800
-#define OMAP730_GPIO5_BASE             0xfffbe000
-#define OMAP730_GPIO6_BASE             0xfffbe800
+#define OMAP730_GPIO1_BASE             (void __iomem *)0xfffbc000
+#define OMAP730_GPIO2_BASE             (void __iomem *)0xfffbc800
+#define OMAP730_GPIO3_BASE             (void __iomem *)0xfffbd000
+#define OMAP730_GPIO4_BASE             (void __iomem *)0xfffbd800
+#define OMAP730_GPIO5_BASE             (void __iomem *)0xfffbe000
+#define OMAP730_GPIO6_BASE             (void __iomem *)0xfffbe800
 #define OMAP730_GPIO_DATA_INPUT                0x00
 #define OMAP730_GPIO_DATA_OUTPUT       0x04
 #define OMAP730_GPIO_DIR_CONTROL       0x08
@@ -78,14 +84,43 @@
 #define OMAP730_GPIO_INT_MASK          0x10
 #define OMAP730_GPIO_INT_STATUS                0x14
 
+/*
+ * omap24xx specific GPIO registers
+ */
+#define OMAP24XX_GPIO1_BASE            (void __iomem *)0x48018000
+#define OMAP24XX_GPIO2_BASE            (void __iomem *)0x4801a000
+#define OMAP24XX_GPIO3_BASE            (void __iomem *)0x4801c000
+#define OMAP24XX_GPIO4_BASE            (void __iomem *)0x4801e000
+#define OMAP24XX_GPIO_REVISION         0x0000
+#define OMAP24XX_GPIO_SYSCONFIG                0x0010
+#define OMAP24XX_GPIO_SYSSTATUS                0x0014
+#define OMAP24XX_GPIO_IRQSTATUS1       0x0018
+#define OMAP24XX_GPIO_IRQENABLE1       0x001c
+#define OMAP24XX_GPIO_CTRL             0x0030
+#define OMAP24XX_GPIO_OE               0x0034
+#define OMAP24XX_GPIO_DATAIN           0x0038
+#define OMAP24XX_GPIO_DATAOUT          0x003c
+#define OMAP24XX_GPIO_LEVELDETECT0     0x0040
+#define OMAP24XX_GPIO_LEVELDETECT1     0x0044
+#define OMAP24XX_GPIO_RISINGDETECT     0x0048
+#define OMAP24XX_GPIO_FALLINGDETECT    0x004c
+#define OMAP24XX_GPIO_CLEARIRQENABLE1  0x0060
+#define OMAP24XX_GPIO_SETIRQENABLE1    0x0064
+#define OMAP24XX_GPIO_CLEARWKUENA      0x0080
+#define OMAP24XX_GPIO_SETWKUENA                0x0084
+#define OMAP24XX_GPIO_CLEARDATAOUT     0x0090
+#define OMAP24XX_GPIO_SETDATAOUT       0x0094
+
 #define OMAP_MPUIO_MASK                (~OMAP_MAX_GPIO_LINES & 0xff)
 
 struct gpio_bank {
-       u32 base;
+       void __iomem *base;
        u16 irq;
        u16 virtual_irq_start;
-       u8 method;
+       int method;
        u32 reserved_map;
+       u32 suspend_wakeup;
+       u32 saved_wakeup;
        spinlock_t lock;
 };
 
@@ -93,8 +128,9 @@
 #define METHOD_GPIO_1510       1
 #define METHOD_GPIO_1610       2
 #define METHOD_GPIO_730                3
+#define METHOD_GPIO_24XX       4
 
-#if defined(CONFIG_ARCH_OMAP16XX)
+#ifdef CONFIG_ARCH_OMAP16XX
 static struct gpio_bank gpio_bank_1610[5] = {
        { OMAP_MPUIO_BASE,     INT_MPUIO,           IH_MPUIO_BASE,     
METHOD_MPUIO},
        { OMAP1610_GPIO1_BASE, INT_GPIO_BANK1,      IH_GPIO_BASE,      
METHOD_GPIO_1610 },
@@ -123,6 +159,15 @@
 };
 #endif
 
+#ifdef CONFIG_ARCH_OMAP24XX
+static struct gpio_bank gpio_bank_24xx[4] = {
+       { OMAP24XX_GPIO1_BASE, INT_24XX_GPIO_BANK1, IH_GPIO_BASE,       
METHOD_GPIO_24XX },
+       { OMAP24XX_GPIO2_BASE, INT_24XX_GPIO_BANK2, IH_GPIO_BASE + 32,  
METHOD_GPIO_24XX },
+       { OMAP24XX_GPIO3_BASE, INT_24XX_GPIO_BANK3, IH_GPIO_BASE + 64,  
METHOD_GPIO_24XX },
+       { OMAP24XX_GPIO4_BASE, INT_24XX_GPIO_BANK4, IH_GPIO_BASE + 96,  
METHOD_GPIO_24XX },
+};
+#endif
+
 static struct gpio_bank *gpio_bank;
 static int gpio_bank_count;
 
@@ -149,14 +194,23 @@
                return &gpio_bank[1 + (gpio >> 5)];
        }
 #endif
+#ifdef CONFIG_ARCH_OMAP24XX
+       if (cpu_is_omap24xx())
+               return &gpio_bank[gpio >> 5];
+#endif
 }
 
 static inline int get_gpio_index(int gpio)
 {
+#ifdef CONFIG_ARCH_OMAP730
        if (cpu_is_omap730())
                return gpio & 0x1f;
-       else
-               return gpio & 0x0f;
+#endif
+#ifdef CONFIG_ARCH_OMAP24XX
+       if (cpu_is_omap24xx())
+               return gpio & 0x1f;
+#endif
+       return gpio & 0x0f;
 }
 
 static inline int gpio_valid(int gpio)
@@ -180,6 +234,10 @@
        if (cpu_is_omap730() && gpio < 192)
                return 0;
 #endif
+#ifdef CONFIG_ARCH_OMAP24XX
+       if (cpu_is_omap24xx() && gpio < 128)
+               return 0;
+#endif
        return -1;
 }
 
@@ -195,7 +253,7 @@
 
 static void _set_gpio_direction(struct gpio_bank *bank, int gpio, int is_input)
 {
-       u32 reg = bank->base;
+       void __iomem *reg = bank->base;
        u32 l;
 
        switch (bank->method) {
@@ -211,6 +269,9 @@
        case METHOD_GPIO_730:
                reg += OMAP730_GPIO_DIR_CONTROL;
                break;
+       case METHOD_GPIO_24XX:
+               reg += OMAP24XX_GPIO_OE;
+               break;
        }
        l = __raw_readl(reg);
        if (is_input)
@@ -234,7 +295,7 @@
 
 static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable)
 {
-       u32 reg = bank->base;
+       void __iomem *reg = bank->base;
        u32 l = 0;
 
        switch (bank->method) {
@@ -269,6 +330,13 @@
                else
                        l &= ~(1 << gpio);
                break;
+       case METHOD_GPIO_24XX:
+               if (enable)
+                       reg += OMAP24XX_GPIO_SETDATAOUT;
+               else
+                       reg += OMAP24XX_GPIO_CLEARDATAOUT;
+               l = 1 << gpio;
+               break;
        default:
                BUG();
                return;
@@ -291,7 +359,7 @@
 int omap_get_gpio_datain(int gpio)
 {
        struct gpio_bank *bank;
-       u32 reg;
+       void __iomem *reg;
 
        if (check_gpio(gpio) < 0)
                return -1;
@@ -310,109 +378,132 @@
        case METHOD_GPIO_730:
                reg += OMAP730_GPIO_DATA_INPUT;
                break;
+       case METHOD_GPIO_24XX:
+               reg += OMAP24XX_GPIO_DATAIN;
+               break;
        default:
                BUG();
                return -1;
        }
-       return (__raw_readl(reg) & (1 << get_gpio_index(gpio))) != 0;
+       return (__raw_readl(reg)
+                       & (1 << get_gpio_index(gpio))) != 0;
 }
 
-static void _set_gpio_edge_ctrl(struct gpio_bank *bank, int gpio, int edge)
+#define MOD_REG_BIT(reg, bit_mask, set)        \
+do {   \
+       int l = __raw_readl(base + reg); \
+       if (set) l |= bit_mask; \
+       else l &= ~bit_mask; \
+       __raw_writel(l, base + reg); \
+} while(0)
+
+static inline void set_24xx_gpio_triggering(void __iomem *base, int gpio, int 
trigger)
 {
-       u32 reg = bank->base;
-       u32 l;
+       u32 gpio_bit = 1 << gpio;
+
+       MOD_REG_BIT(OMAP24XX_GPIO_LEVELDETECT0, gpio_bit,
+               trigger & IRQT_LOW);
+       MOD_REG_BIT(OMAP24XX_GPIO_LEVELDETECT1, gpio_bit,
+               trigger & IRQT_HIGH);
+       MOD_REG_BIT(OMAP24XX_GPIO_RISINGDETECT, gpio_bit,
+               trigger & IRQT_RISING);
+       MOD_REG_BIT(OMAP24XX_GPIO_FALLINGDETECT, gpio_bit,
+               trigger & IRQT_FALLING);
+       /* FIXME: Possibly do 'set_irq_handler(j, do_level_IRQ)' if only level
+        * triggering requested. */
+}
+
+static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)
+{
+       void __iomem *reg = bank->base;
+       u32 l = 0;
 
        switch (bank->method) {
        case METHOD_MPUIO:
                reg += OMAP_MPUIO_GPIO_INT_EDGE;
                l = __raw_readl(reg);
-               if (edge == OMAP_GPIO_RISING_EDGE)
+               if (trigger == IRQT_RISING)
                        l |= 1 << gpio;
-               else
+               else if (trigger == IRQT_FALLING)
                        l &= ~(1 << gpio);
-               __raw_writel(l, reg);
+               else
+                       goto bad;
                break;
        case METHOD_GPIO_1510:
                reg += OMAP1510_GPIO_INT_CONTROL;
                l = __raw_readl(reg);
-               if (edge == OMAP_GPIO_RISING_EDGE)
+               if (trigger == IRQT_RISING)
                        l |= 1 << gpio;
-               else
+               else if (trigger == IRQT_FALLING)
                        l &= ~(1 << gpio);
-               __raw_writel(l, reg);
+               else
+                       goto bad;
                break;
        case METHOD_GPIO_1610:
-               edge &= 0x03;
                if (gpio & 0x08)
                        reg += OMAP1610_GPIO_EDGE_CTRL2;
                else
                        reg += OMAP1610_GPIO_EDGE_CTRL1;
                gpio &= 0x07;
+               /* We allow only edge triggering, i.e. two lowest bits */
+               if (trigger & ~IRQT_BOTHEDGE)
+                       BUG();
+               /* NOTE: knows __IRQT_{FAL,RIS}EDGE match OMAP hardware */
+               trigger &= 0x03;
                l = __raw_readl(reg);
                l &= ~(3 << (gpio << 1));
-               l |= edge << (gpio << 1);
-               __raw_writel(l, reg);
+               l |= trigger << (gpio << 1);
                break;
        case METHOD_GPIO_730:
                reg += OMAP730_GPIO_INT_CONTROL;
                l = __raw_readl(reg);
-               if (edge == OMAP_GPIO_RISING_EDGE)
+               if (trigger == IRQT_RISING)
                        l |= 1 << gpio;
-               else
+               else if (trigger == IRQT_FALLING)
                        l &= ~(1 << gpio);
-               __raw_writel(l, reg);
+               else
+                       goto bad;
+               break;
+       case METHOD_GPIO_24XX:
+               set_24xx_gpio_triggering(reg, gpio, trigger);
                break;
        default:
                BUG();
-               return;
+               goto bad;
        }
+       __raw_writel(l, reg);
+       return 0;
+bad:
+       return -EINVAL;
 }
 
-void omap_set_gpio_edge_ctrl(int gpio, int edge)
+static int gpio_irq_type(unsigned irq, unsigned type)
 {
        struct gpio_bank *bank;
+       unsigned gpio;
+       int retval;
+
+       if (irq > IH_MPUIO_BASE)
+               gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE);
+       else
+               gpio = irq - IH_GPIO_BASE;
 
        if (check_gpio(gpio) < 0)
-               return;
+               return -EINVAL;
+
+       if (type & (__IRQT_LOWLVL|__IRQT_HIGHLVL|IRQT_PROBE))
+               return -EINVAL;
+
        bank = get_gpio_bank(gpio);
        spin_lock(&bank->lock);
-       _set_gpio_edge_ctrl(bank, get_gpio_index(gpio), edge);
+       retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type);
        spin_unlock(&bank->lock);
-}
-
-
-static int _get_gpio_edge_ctrl(struct gpio_bank *bank, int gpio)
-{
-       u32 reg = bank->base, l;
-
-       switch (bank->method) {
-       case METHOD_MPUIO:
-               l = __raw_readl(reg + OMAP_MPUIO_GPIO_INT_EDGE);
-               return (l & (1 << gpio)) ?
-                       OMAP_GPIO_RISING_EDGE : OMAP_GPIO_FALLING_EDGE;
-       case METHOD_GPIO_1510:
-               l = __raw_readl(reg + OMAP1510_GPIO_INT_CONTROL);
-               return (l & (1 << gpio)) ?
-                       OMAP_GPIO_RISING_EDGE : OMAP_GPIO_FALLING_EDGE;
-       case METHOD_GPIO_1610:
-               if (gpio & 0x08)
-                       reg += OMAP1610_GPIO_EDGE_CTRL2;
-               else
-                       reg += OMAP1610_GPIO_EDGE_CTRL1;
-               return (__raw_readl(reg) >> ((gpio & 0x07) << 1)) & 0x03;
-       case METHOD_GPIO_730:
-               l = __raw_readl(reg + OMAP730_GPIO_INT_CONTROL);
-               return (l & (1 << gpio)) ?
-                       OMAP_GPIO_RISING_EDGE : OMAP_GPIO_FALLING_EDGE;
-       default:
-               BUG();
-               return -1;
-       }
+       return retval;
 }
 
 static void _clear_gpio_irqbank(struct gpio_bank *bank, int gpio_mask)
 {
-       u32 reg = bank->base;
+       void __iomem *reg = bank->base;
 
        switch (bank->method) {
        case METHOD_MPUIO:
@@ -428,6 +519,9 @@
        case METHOD_GPIO_730:
                reg += OMAP730_GPIO_INT_STATUS;
                break;
+       case METHOD_GPIO_24XX:
+               reg += OMAP24XX_GPIO_IRQSTATUS1;
+               break;
        default:
                BUG();
                return;
@@ -442,7 +536,7 @@
 
 static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int 
enable)
 {
-       u32 reg = bank->base;
+       void __iomem *reg = bank->base;
        u32 l;
 
        switch (bank->method) {
@@ -477,6 +571,13 @@
                else
                        l |= gpio_mask;
                break;
+       case METHOD_GPIO_24XX:
+               if (enable)
+                       reg += OMAP24XX_GPIO_SETIRQENABLE1;
+               else
+                       reg += OMAP24XX_GPIO_CLEARIRQENABLE1;
+               l = gpio_mask;
+               break;
        default:
                BUG();
                return;
@@ -489,6 +590,50 @@
        _enable_gpio_irqbank(bank, 1 << get_gpio_index(gpio), enable);
 }
 
+/*
+ * Note that ENAWAKEUP needs to be enabled in GPIO_SYSCONFIG register.
+ * 1510 does not seem to have a wake-up register. If JTAG is connected
+ * to the target, system will wake up always on GPIO events. While
+ * system is running all registered GPIO interrupts need to have wake-up
+ * enabled. When system is suspended, only selected GPIO interrupts need
+ * to have wake-up enabled.
+ */
+static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
+{
+       switch (bank->method) {
+       case METHOD_GPIO_1610:
+       case METHOD_GPIO_24XX:
+               spin_lock(&bank->lock);
+               if (enable)
+                       bank->suspend_wakeup |= (1 << gpio);
+               else
+                       bank->suspend_wakeup &= ~(1 << gpio);
+               spin_unlock(&bank->lock);
+               return 0;
+       default:
+               printk(KERN_ERR "Can't enable GPIO wakeup for method %i\n",
+                      bank->method);
+               return -EINVAL;
+       }
+}
+
+/* Use disable_irq_wake() and enable_irq_wake() functions from drivers */
+static int gpio_wake_enable(unsigned int irq, unsigned int enable)
+{
+       unsigned int gpio = irq - IH_GPIO_BASE;
+       struct gpio_bank *bank;
+       int retval;
+
+       if (check_gpio(gpio) < 0)
+               return -ENODEV;
+       bank = get_gpio_bank(gpio);
+       spin_lock(&bank->lock);
+       retval = _set_gpio_wakeup(bank, get_gpio_index(gpio), enable);
+       spin_unlock(&bank->lock);
+
+       return retval;
+}
+
 int omap_request_gpio(int gpio)
 {
        struct gpio_bank *bank;
@@ -505,15 +650,33 @@
                return -1;
        }
        bank->reserved_map |= (1 << get_gpio_index(gpio));
+
+       /* Set trigger to none. You need to enable the trigger after 
request_irq */
+       _set_gpio_triggering(bank, get_gpio_index(gpio), IRQT_NOEDGE);
+
 #ifdef CONFIG_ARCH_OMAP1510
        if (bank->method == METHOD_GPIO_1510) {
-               u32 reg;
+               void __iomem *reg;
 
-               /* Claim the pin for the ARM */
+               /* Claim the pin for MPU */
                reg = bank->base + OMAP1510_GPIO_PIN_CONTROL;
                __raw_writel(__raw_readl(reg) | (1 << get_gpio_index(gpio)), 
reg);
        }
 #endif
+#ifdef CONFIG_ARCH_OMAP16XX
+       if (bank->method == METHOD_GPIO_1610) {
+               /* Enable wake-up during idle for dynamic tick */
+               void __iomem *reg = bank->base + OMAP1610_GPIO_SET_WAKEUPENA;
+               __raw_writel(1 << get_gpio_index(gpio), reg);
+       }
+#endif
+#ifdef CONFIG_ARCH_OMAP24XX
+       if (bank->method == METHOD_GPIO_24XX) {
+               /* Enable wake-up during idle for dynamic tick */
+               void __iomem *reg = bank->base + OMAP24XX_GPIO_SETWKUENA;
+               __raw_writel(1 << get_gpio_index(gpio), reg);
+       }
+#endif
        spin_unlock(&bank->lock);
 
        return 0;
@@ -533,6 +696,20 @@
                spin_unlock(&bank->lock);
                return;
        }
+#ifdef CONFIG_ARCH_OMAP16XX
+       if (bank->method == METHOD_GPIO_1610) {
+               /* Disable wake-up during idle for dynamic tick */
+               void __iomem *reg = bank->base + OMAP1610_GPIO_CLEAR_WAKEUPENA;
+               __raw_writel(1 << get_gpio_index(gpio), reg);
+       }
+#endif
+#ifdef CONFIG_ARCH_OMAP24XX
+       if (bank->method == METHOD_GPIO_24XX) {
+               /* Disable wake-up during idle for dynamic tick */
+               void __iomem *reg = bank->base + OMAP24XX_GPIO_CLEARWKUENA;
+               __raw_writel(1 << get_gpio_index(gpio), reg);
+       }
+#endif
        bank->reserved_map &= ~(1 << get_gpio_index(gpio));
        _set_gpio_direction(bank, get_gpio_index(gpio), 1);
        _set_gpio_irqenable(bank, gpio, 0);
@@ -552,7 +729,7 @@
 static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc,
                             struct pt_regs *regs)
 {
-       u32 isr_reg = 0;
+       void __iomem *isr_reg = NULL;
        u32 isr;
        unsigned int gpio_irq;
        struct gpio_bank *bank;
@@ -574,24 +751,30 @@
        if (bank->method == METHOD_GPIO_730)
                isr_reg = bank->base + OMAP730_GPIO_INT_STATUS;
 #endif
+#ifdef CONFIG_ARCH_OMAP24XX
+       if (bank->method == METHOD_GPIO_24XX)
+               isr_reg = bank->base + OMAP24XX_GPIO_IRQSTATUS1;
+#endif
 
-       isr = __raw_readl(isr_reg);
-       _enable_gpio_irqbank(bank, isr, 0);
-       _clear_gpio_irqbank(bank, isr);
-       _enable_gpio_irqbank(bank, isr, 1);
-       desc->chip->unmask(irq);
-
-       if (unlikely(!isr))
-               return;
-
-       gpio_irq = bank->virtual_irq_start;
-       for (; isr != 0; isr >>= 1, gpio_irq++) {
-               struct irqdesc *d;
-               if (!(isr & 1))
-                       continue;
-               d = irq_desc + gpio_irq;
-               d->handle(gpio_irq, d, regs);
-       }
+       while(1) {
+               isr = __raw_readl(isr_reg);
+               _enable_gpio_irqbank(bank, isr, 0);
+               _clear_gpio_irqbank(bank, isr);
+               _enable_gpio_irqbank(bank, isr, 1);
+               desc->chip->unmask(irq);
+
+               if (!isr)
+                       break;
+
+               gpio_irq = bank->virtual_irq_start;
+               for (; isr != 0; isr >>= 1, gpio_irq++) {
+                       struct irqdesc *d;
+                       if (!(isr & 1))
+                               continue;
+                       d = irq_desc + gpio_irq;
+                       desc_handle_irq(gpio_irq, d, regs);
+               }
+        }
 }
 
 static void gpio_ack_irq(unsigned int irq)
@@ -613,14 +796,10 @@
 static void gpio_unmask_irq(unsigned int irq)
 {
        unsigned int gpio = irq - IH_GPIO_BASE;
+       unsigned int gpio_idx = get_gpio_index(gpio);
        struct gpio_bank *bank = get_gpio_bank(gpio);
 
-       if (_get_gpio_edge_ctrl(bank, get_gpio_index(gpio)) == 
OMAP_GPIO_NO_EDGE) {
-               printk(KERN_ERR "OMAP GPIO %d: trying to enable GPIO IRQ while 
no edge is set\n",
-                      gpio);
-               _set_gpio_edge_ctrl(bank, get_gpio_index(gpio), 
OMAP_GPIO_RISING_EDGE);
-       }
-       _set_gpio_irqenable(bank, gpio, 1);
+       _set_gpio_irqenable(bank, gpio_idx, 1);
 }
 
 static void mpuio_ack_irq(unsigned int irq)
@@ -645,9 +824,11 @@
 }
 
 static struct irqchip gpio_irq_chip = {
-       .ack    = gpio_ack_irq,
-       .mask   = gpio_mask_irq,
-       .unmask = gpio_unmask_irq,
+       .ack            = gpio_ack_irq,
+       .mask           = gpio_mask_irq,
+       .unmask         = gpio_unmask_irq,
+       .set_type       = gpio_irq_type,
+       .set_wake       = gpio_wake_enable,
 };
 
 static struct irqchip mpuio_irq_chip = {
@@ -657,6 +838,7 @@
 };
 
 static int initialized = 0;
+static struct clk * gpio_ck = NULL;
 
 static int __init _omap_gpio_init(void)
 {
@@ -665,6 +847,14 @@
 
        initialized = 1;
 
+       if (cpu_is_omap1510()) {
+               gpio_ck = clk_get(NULL, "arm_gpio_ck");
+               if (IS_ERR(gpio_ck))
+                       printk("Could not get arm_gpio_ck\n");
+               else
+                       clk_use(gpio_ck);
+       }
+
 #ifdef CONFIG_ARCH_OMAP1510
        if (cpu_is_omap1510()) {
                printk(KERN_INFO "OMAP1510 GPIO hardware\n");
@@ -674,7 +864,7 @@
 #endif
 #if defined(CONFIG_ARCH_OMAP16XX)
        if (cpu_is_omap16xx()) {
-               int rev;
+               u32 rev;
 
                gpio_bank_count = 5;
                gpio_bank = gpio_bank_1610;
@@ -690,6 +880,17 @@
                gpio_bank = gpio_bank_730;
        }
 #endif
+#ifdef CONFIG_ARCH_OMAP24XX
+       if (cpu_is_omap24xx()) {
+               int rev;
+
+               gpio_bank_count = 4;
+               gpio_bank = gpio_bank_24xx;
+               rev = omap_readl(gpio_bank[0].base + OMAP24XX_GPIO_REVISION);
+               printk(KERN_INFO "OMAP24xx GPIO hardware version %d.%d\n",
+                       (rev >> 4) & 0x0f, rev & 0x0f);
+       }
+#endif
        for (i = 0; i < gpio_bank_count; i++) {
                int j, gpio_count = 16;
 
@@ -710,6 +911,7 @@
                if (bank->method == METHOD_GPIO_1610) {
                        __raw_writew(0x0000, bank->base + 
OMAP1610_GPIO_IRQENABLE1);
                        __raw_writew(0xffff, bank->base + 
OMAP1610_GPIO_IRQSTATUS1);
+                       __raw_writew(0x0014, bank->base + 
OMAP1610_GPIO_SYSCONFIG);
                }
 #endif
 #ifdef CONFIG_ARCH_OMAP730
@@ -720,6 +922,14 @@
                        gpio_count = 32; /* 730 has 32-bit GPIOs */
                }
 #endif
+#ifdef CONFIG_ARCH_OMAP24XX
+               if (bank->method == METHOD_GPIO_24XX) {
+                       __raw_writel(0x00000000, bank->base + 
OMAP24XX_GPIO_IRQENABLE1);
+                       __raw_writel(0xffffffff, bank->base + 
OMAP24XX_GPIO_IRQSTATUS1);
+
+                       gpio_count = 32;
+               }
+#endif
                for (j = bank->virtual_irq_start;
                     j < bank->virtual_irq_start + gpio_count; j++) {
                        if (bank->method == METHOD_MPUIO)
@@ -735,12 +945,97 @@
 
        /* Enable system clock for GPIO module.
         * The CAM_CLK_CTRL *is* really the right place. */
-       if (cpu_is_omap1610() || cpu_is_omap1710())
+       if (cpu_is_omap16xx())
                omap_writel(omap_readl(ULPD_CAM_CLK_CTRL) | 0x04, 
ULPD_CAM_CLK_CTRL);
 
        return 0;
 }
 
+#if defined (CONFIG_ARCH_OMAP16XX) || defined (CONFIG_ARCH_OMAP24XX)
+static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg)
+{
+       int i;
+
+       if (!cpu_is_omap24xx() && !cpu_is_omap16xx())
+               return 0;
+
+       for (i = 0; i < gpio_bank_count; i++) {
+               struct gpio_bank *bank = &gpio_bank[i];
+               void __iomem *wake_status;
+               void __iomem *wake_clear;
+               void __iomem *wake_set;
+
+               switch (bank->method) {
+               case METHOD_GPIO_1610:
+                       wake_status = bank->base + OMAP1610_GPIO_WAKEUPENABLE;
+                       wake_clear = bank->base + OMAP1610_GPIO_CLEAR_WAKEUPENA;
+                       wake_set = bank->base + OMAP1610_GPIO_SET_WAKEUPENA;
+                       break;
+               case METHOD_GPIO_24XX:
+                       wake_status = bank->base + OMAP24XX_GPIO_SETWKUENA;
+                       wake_clear = bank->base + OMAP24XX_GPIO_CLEARWKUENA;
+                       wake_set = bank->base + OMAP24XX_GPIO_SETWKUENA;
+                       break;
+               default:
+                       continue;
+               }
+
+               spin_lock(&bank->lock);
+               bank->saved_wakeup = __raw_readl(wake_status);
+               __raw_writel(0xffffffff, wake_clear);
+               __raw_writel(bank->suspend_wakeup, wake_set);
+               spin_unlock(&bank->lock);
+       }
+
+       return 0;
+}
+
+static int omap_gpio_resume(struct sys_device *dev)
+{
+       int i;
+
+       if (!cpu_is_omap24xx() && !cpu_is_omap16xx())
+               return 0;
+
+       for (i = 0; i < gpio_bank_count; i++) {
+               struct gpio_bank *bank = &gpio_bank[i];
+               void __iomem *wake_clear;
+               void __iomem *wake_set;
+
+               switch (bank->method) {
+               case METHOD_GPIO_1610:
+                       wake_clear = bank->base + OMAP1610_GPIO_CLEAR_WAKEUPENA;
+                       wake_set = bank->base + OMAP1610_GPIO_SET_WAKEUPENA;
+                       break;
+               case METHOD_GPIO_24XX:
+                       wake_clear = bank->base + OMAP1610_GPIO_CLEAR_WAKEUPENA;
+                       wake_set = bank->base + OMAP1610_GPIO_SET_WAKEUPENA;
+                       break;
+               default:
+                       continue;
+               }
+
+               spin_lock(&bank->lock);
+               __raw_writel(0xffffffff, wake_clear);
+               __raw_writel(bank->saved_wakeup, wake_set);
+               spin_unlock(&bank->lock);
+       }
+
+       return 0;
+}
+
+static struct sysdev_class omap_gpio_sysclass = {
+       set_kset_name("gpio"),
+       .suspend        = omap_gpio_suspend,
+       .resume         = omap_gpio_resume,
+};
+
+static struct sys_device omap_gpio_device = {
+       .id             = 0,
+       .cls            = &omap_gpio_sysclass,
+};
+#endif
+
 /*
  * This may get called early from board specific init
  */
@@ -752,11 +1047,30 @@
                return 0;
 }
 
+static int __init omap_gpio_sysinit(void)
+{
+       int ret = 0;
+
+       if (!initialized)
+               ret = _omap_gpio_init();
+
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP24XX)
+       if (cpu_is_omap16xx() || cpu_is_omap24xx()) {
+               if (ret == 0) {
+                       ret = sysdev_class_register(&omap_gpio_sysclass);
+                       if (ret == 0)
+                               ret = sysdev_register(&omap_gpio_device);
+               }
+       }
+#endif
+
+       return ret;
+}
+
 EXPORT_SYMBOL(omap_request_gpio);
 EXPORT_SYMBOL(omap_free_gpio);
 EXPORT_SYMBOL(omap_set_gpio_direction);
 EXPORT_SYMBOL(omap_set_gpio_dataout);
 EXPORT_SYMBOL(omap_get_gpio_datain);
-EXPORT_SYMBOL(omap_set_gpio_edge_ctrl);
 
-arch_initcall(omap_gpio_init);
+arch_initcall(omap_gpio_sysinit);
diff -urN linux/arch/arm/plat-omap/mcbsp.c linux/arch/arm/plat-omap/mcbsp.c
--- linux/arch/arm/plat-omap/mcbsp.c    2005/07/13 11:48:53     1.1
+++ linux/arch/arm/plat-omap/mcbsp.c    2005/09/15 08:52:50     1.2
@@ -27,6 +27,7 @@
 #include <asm/arch/dma.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/irqs.h>
+#include <asm/arch/dsp_common.h>
 #include <asm/arch/mcbsp.h>
 
 #include <asm/hardware/clock.h>
@@ -187,9 +188,6 @@
        return -1;
 }
 
-#define EN_XORPCK              1
-#define DSP_RSTCT2              0xe1008014
-
 static void omap_mcbsp_dsp_request(void)
 {
        if (cpu_is_omap1510() || cpu_is_omap16xx()) {
@@ -198,6 +196,11 @@
 
                /* enable 12MHz clock to mcbsp 1 & 3 */
                clk_use(mcbsp_dspxor_ck);
+
+               /*
+                * DSP external peripheral reset
+                * FIXME: This should be moved to dsp code
+                */
                __raw_writew(__raw_readw(DSP_RSTCT2) | 1 | 1 << 1,
                             DSP_RSTCT2);
        }
diff -urN linux/arch/arm/plat-omap/mux.c linux/arch/arm/plat-omap/mux.c
--- linux/arch/arm/plat-omap/mux.c      2005/07/13 11:48:53     1.1
+++ linux/arch/arm/plat-omap/mux.c      2005/09/15 08:52:50     1.2
@@ -48,6 +48,9 @@
                pull_orig = 0, pull = 0;
        unsigned int mask, warn = 0;
 
+       if (cpu_is_omap7xx())
+               return 0;
+
        if (reg_cfg > ARRAY_SIZE(reg_cfg_table)) {
                printk(KERN_ERR "MUX: reg_cfg %d\n", reg_cfg);
                return -EINVAL;
diff -urN linux/arch/arm/plat-omap/ocpi.c linux/arch/arm/plat-omap/ocpi.c
--- linux/arch/arm/plat-omap/ocpi.c     2005/08/01 18:23:39     1.2
+++ linux/arch/arm/plat-omap/ocpi.c     2005/09/15 08:52:50     1.3
@@ -25,6 +25,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
diff -urN linux/arch/arm/plat-omap/pm.c linux/arch/arm/plat-omap/pm.c
--- linux/arch/arm/plat-omap/pm.c       2005/07/13 11:48:53     1.1
+++ linux/arch/arm/plat-omap/pm.c       2005/09/15 08:52:50     1.2
@@ -39,24 +39,32 @@
 #include <linux/sched.h>
 #include <linux/proc_fs.h>
 #include <linux/pm.h>
+#include <linux/interrupt.h>
 
 #include <asm/io.h>
+#include <asm/irq.h>
 #include <asm/mach/time.h>
-#include <asm/mach-types.h>
+#include <asm/mach/irq.h>
 
-#include <asm/arch/omap16xx.h>
+#include <asm/mach-types.h>
+#include <asm/arch/irqs.h>
+#include <asm/arch/tc.h>
 #include <asm/arch/pm.h>
 #include <asm/arch/mux.h>
-#include <asm/arch/tc.h>
 #include <asm/arch/tps65010.h>
+#include <asm/arch/dsp_common.h>
 
 #include "clock.h"
+#include "sram.h"
 
 static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE];
 static unsigned short ulpd_sleep_save[ULPD_SLEEP_SAVE_SIZE];
 static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_SIZE];
 static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE];
 
+static void (*omap_sram_idle)(void) = NULL;
+static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL;
+
 /*
  * Let's power down on idle, but only if we are really
  * idle, because once we start down the path of
@@ -65,7 +73,6 @@
  */
 void omap_pm_idle(void)
 {
-       int (*func_ptr)(void) = 0;
        unsigned int mask32 = 0;
 
        /*
@@ -84,6 +91,13 @@
        mask32 = omap_readl(ARM_SYSST);
 
        /*
+        * Prevent the ULPD from entering low power state by setting
+        * POWER_CTRL_REG:4 = 0
+        */
+       omap_writew(omap_readw(ULPD_POWER_CTRL) &
+                   ~ULPD_DEEP_SLEEP_TRANSITION_EN, ULPD_POWER_CTRL);
+
+       /*
         * Since an interrupt may set up a timer, we don't want to
         * reprogram the hardware timer with interrupts enabled.
         * Re-enable interrupts only after returning from idle.
@@ -92,18 +106,9 @@
 
        if ((mask32 & DSP_IDLE) == 0) {
                __asm__ volatile ("mcr  p15, 0, r0, c7, c0, 4");
-       } else {
-
-               if (cpu_is_omap1510()) {
-                       func_ptr = (void *)(OMAP1510_SRAM_IDLE_SUSPEND);
-               } else if (cpu_is_omap1610() || cpu_is_omap1710()) {
-                       func_ptr = (void *)(OMAP1610_SRAM_IDLE_SUSPEND);
-               } else if (cpu_is_omap5912()) {
-                       func_ptr = (void *)(OMAP5912_SRAM_IDLE_SUSPEND);
-               }
+       } else
+               omap_sram_idle();
 
-               func_ptr();
-       }
        local_fiq_enable();
        local_irq_enable();
 }
@@ -115,58 +120,55 @@
  */
 static void omap_pm_wakeup_setup(void)
 {
-       /*
-        * Enable ARM XOR clock and release peripheral from reset by
-        * writing 1 to PER_EN bit in ARM_RSTCT2, this is required
-        * for UART configuration to use UART2 to wake up.
-        */
-
-       omap_writel(omap_readl(ARM_IDLECT2) | ENABLE_XORCLK, ARM_IDLECT2);
-       omap_writel(omap_readl(ARM_RSTCT2) | PER_EN, ARM_RSTCT2);
-       omap_writew(MODEM_32K_EN, ULPD_CLOCK_CTRL);
+       u32 level1_wake = OMAP_IRQ_BIT(INT_IH2_IRQ);
+       u32 level2_wake = OMAP_IRQ_BIT(INT_UART2) | OMAP_IRQ_BIT(INT_KEYBOARD);
 
        /*
-        * Turn off all interrupts except L1-2nd level cascade,
-        * and the L2 wakeup interrupts: keypad and UART2.
+        * Turn off all interrupts except GPIO bank 1, L1-2nd level cascade,
+        * and the L2 wakeup interrupts: keypad and UART2. Note that the
+        * drivers must still separately call omap_set_gpio_wakeup() to
+        * wake up to a GPIO interrupt.
         */
+       if (cpu_is_omap1510() || cpu_is_omap16xx())
+               level1_wake |= OMAP_IRQ_BIT(INT_GPIO_BANK1);
+       else if (cpu_is_omap730())
+               level1_wake |= OMAP_IRQ_BIT(INT_730_GPIO_BANK1);
 
-       omap_writel(~IRQ_LEVEL2, OMAP_IH1_MIR);
+       omap_writel(~level1_wake, OMAP_IH1_MIR);
 
-       if (cpu_is_omap1510()) {
-               omap_writel(~(IRQ_UART2 | IRQ_KEYBOARD),  OMAP_IH2_MIR);
-       }
+       if (cpu_is_omap1510())
+               omap_writel(~level2_wake,  OMAP_IH2_MIR);
 
+       /* INT_1610_WAKE_UP_REQ is needed for GPIO wakeup... */
        if (cpu_is_omap16xx()) {
-               omap_writel(~(IRQ_UART2 | IRQ_KEYBOARD), OMAP_IH2_0_MIR);
-
-               omap_writel(~0x0, OMAP_IH2_1_MIR);
+               omap_writel(~level2_wake, OMAP_IH2_0_MIR);
+               omap_writel(~OMAP_IRQ_BIT(INT_1610_WAKE_UP_REQ), 
OMAP_IH2_1_MIR);
                omap_writel(~0x0, OMAP_IH2_2_MIR);
                omap_writel(~0x0, OMAP_IH2_3_MIR);
        }
 
-       /*  New IRQ agreement */
+       /*  New IRQ agreement, recalculate in cascade order */
+       omap_writel(1, OMAP_IH2_CONTROL);
        omap_writel(1, OMAP_IH1_CONTROL);
-
-       /* external PULL to down, bit 22 = 0 */
-       omap_writel(omap_readl(PULL_DWN_CTRL_2) & ~(1<<22), PULL_DWN_CTRL_2);
 }
 
 void omap_pm_suspend(void)
 {
-       unsigned int mask32 = 0;
        unsigned long arg0 = 0, arg1 = 0;
-       int (*func_ptr)(unsigned short, unsigned short) = 0;
-       unsigned short save_dsp_idlect2;
 
-       printk("PM: OMAP%x is entering deep sleep now ...\n", system_rev);
+       printk("PM: OMAP%x is trying to enter deep sleep...\n", system_rev);
+
+       omap_serial_wake_trigger(1);
 
        if (machine_is_omap_osk()) {
                /* Stop LED1 (D9) blink */
                tps65010_set_led(LED1, OFF);
        }
 
+       omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG);
+
        /*
-        * Step 1: turn off interrupts
+        * Step 1: turn off interrupts (FIXME: NOTE: already disabled)
         */
 
        local_irq_disable();
@@ -207,6 +209,8 @@
        ARM_SAVE(ARM_CKCTL);
        ARM_SAVE(ARM_IDLECT1);
        ARM_SAVE(ARM_IDLECT2);
+       if (!(cpu_is_omap1510()))
+               ARM_SAVE(ARM_IDLECT3);
        ARM_SAVE(ARM_EWUPCT);
        ARM_SAVE(ARM_RSTCT1);
        ARM_SAVE(ARM_RSTCT2);
@@ -214,42 +218,12 @@
        ULPD_SAVE(ULPD_CLOCK_CTRL);
        ULPD_SAVE(ULPD_STATUS_REQ);
 
-       /*
-        * Step 3: LOW_PWR signal enabling
-        *
-        * Allow the LOW_PWR signal to be visible on MPUIO5 ball.
-        */
-       if (cpu_is_omap1510()) {
-               /* POWER_CTRL_REG = 0x1 (LOW_POWER is available) */
-               omap_writew(omap_readw(ULPD_POWER_CTRL) |
-                           OMAP1510_ULPD_LOW_POWER_REQ, ULPD_POWER_CTRL);
-       } else if (cpu_is_omap16xx()) {
-               /* POWER_CTRL_REG = 0x1 (LOW_POWER is available) */
-               omap_writew(omap_readw(ULPD_POWER_CTRL) |
-                           OMAP1610_ULPD_LOW_POWER_REQ, ULPD_POWER_CTRL);
-       }
-
-       /* configure LOW_PWR pin */
-       omap_cfg_reg(T20_1610_LOW_PWR);
+       /* (Step 3 removed - we now allow deep sleep by default) */
 
        /*
         * Step 4: OMAP DSP Shutdown
         */
 
-       /* Set DSP_RST = 1 and DSP_EN = 0, put DSP block into reset */
-       omap_writel((omap_readl(ARM_RSTCT1) | DSP_RST) & ~DSP_ENABLE,
-                   ARM_RSTCT1);
-
-       /* Set DSP boot mode to DSP-IDLE, DSP_BOOT_MODE = 0x2 */
-        omap_writel(DSP_IDLE_MODE, MPUI_DSP_BOOT_CONFIG);
-
-       /* Set EN_DSPCK = 0, stop DSP block clock */
-       omap_writel(omap_readl(ARM_CKCTL) & ~DSP_CLOCK_ENABLE, ARM_CKCTL);
-
-       /* Stop any DSP domain clocks */
-       omap_writel(omap_readl(ARM_IDLECT2) | (1<<EN_APICK), ARM_IDLECT2);
-       save_dsp_idlect2 = __raw_readw(DSP_IDLECT2);
-       __raw_writew(0, DSP_IDLECT2);
 
        /*
         * Step 5: Wakeup Event Setup
@@ -258,24 +232,9 @@
        omap_pm_wakeup_setup();
 
        /*
-        * Step 6a: ARM and Traffic controller shutdown
-        *
-        * Step 6 starts here with clock and watchdog disable
+        * Step 6: ARM and Traffic controller shutdown
         */
 
-       /* stop clocks */
-       mask32 = omap_readl(ARM_IDLECT2);
-       mask32 &= ~(1<<EN_WDTCK);  /* bit 0 -> 0 (WDT clock) */
-       mask32 |=  (1<<EN_XORPCK); /* bit 1 -> 1 (XORPCK clock) */
-       mask32 &= ~(1<<EN_PERCK);  /* bit 2 -> 0 (MPUPER_CK clock) */
-       mask32 &= ~(1<<EN_LCDCK);  /* bit 3 -> 0 (LCDC clock) */
-       mask32 &= ~(1<<EN_LBCK);   /* bit 4 -> 0 (local bus clock) */
-       mask32 |=  (1<<EN_APICK);  /* bit 6 -> 1 (MPUI clock) */
-       mask32 &= ~(1<<EN_TIMCK);  /* bit 7 -> 0 (MPU timer clock) */
-       mask32 &= ~(1<<DMACK_REQ); /* bit 8 -> 0 (DMAC clock) */
-       mask32 &= ~(1<<EN_GPIOCK); /* bit 9 -> 0 (GPIO clock) */
-       omap_writel(mask32, ARM_IDLECT2);
-
        /* disable ARM watchdog */
        omap_writel(0x00F5, OMAP_WDT_TIMER_MODE);
        omap_writel(0x00A0, OMAP_WDT_TIMER_MODE);
@@ -295,47 +254,24 @@
        arg0 = arm_sleep_save[ARM_SLEEP_SAVE_ARM_IDLECT1];
        arg1 = arm_sleep_save[ARM_SLEEP_SAVE_ARM_IDLECT2];
 
-       if (cpu_is_omap1510()) {
-               func_ptr = (void *)(OMAP1510_SRAM_API_SUSPEND);
-       } else if (cpu_is_omap1610() || cpu_is_omap1710()) {
-               func_ptr = (void *)(OMAP1610_SRAM_API_SUSPEND);
-       } else if (cpu_is_omap5912()) {
-               func_ptr = (void *)(OMAP5912_SRAM_API_SUSPEND);
-       }
-
        /*
         * Step 6c: ARM and Traffic controller shutdown
         *
         * Jump to assembly code. The processor will stay there
         * until wake up.
         */
-
-        func_ptr(arg0, arg1);
+        omap_sram_suspend(arg0, arg1);
 
        /*
         * If we are here, processor is woken up!
         */
 
-       if (cpu_is_omap1510()) {
-               /* POWER_CTRL_REG = 0x0 (LOW_POWER is disabled) */
-               omap_writew(omap_readw(ULPD_POWER_CTRL) &
-                           ~OMAP1510_ULPD_LOW_POWER_REQ, ULPD_POWER_CTRL);
-       } else if (cpu_is_omap16xx()) {
-               /* POWER_CTRL_REG = 0x0 (LOW_POWER is disabled) */
-               omap_writew(omap_readw(ULPD_POWER_CTRL) &
-                           ~OMAP1610_ULPD_LOW_POWER_REQ, ULPD_POWER_CTRL);
-       }
-
-
-       /* Restore DSP clocks */
-       omap_writel(omap_readl(ARM_IDLECT2) | (1<<EN_APICK), ARM_IDLECT2);
-       __raw_writew(save_dsp_idlect2, DSP_IDLECT2);
-       ARM_RESTORE(ARM_IDLECT2);
-
        /*
         * Restore ARM state, except ARM_IDLECT1/2 which omap_cpu_suspend did
         */
 
+       if (!(cpu_is_omap1510()))
+               ARM_RESTORE(ARM_IDLECT3);
        ARM_RESTORE(ARM_CKCTL);
        ARM_RESTORE(ARM_EWUPCT);
        ARM_RESTORE(ARM_RSTCT1);
@@ -366,6 +302,8 @@
                MPUI1610_RESTORE(OMAP_IH2_3_MIR);
        }
 
+       omap_writew(0, ULPD_SOFT_DISABLE_REQ_REG);
+
        /*
         * Reenable interrupts
         */
@@ -373,6 +311,8 @@
        local_irq_enable();
        local_fiq_enable();
 
+       omap_serial_wake_trigger(0);
+
        printk("PM: OMAP%x is re-starting from deep sleep...\n", system_rev);
 
        if (machine_is_omap_osk()) {
@@ -401,6 +341,8 @@
        ARM_SAVE(ARM_CKCTL);
        ARM_SAVE(ARM_IDLECT1);
        ARM_SAVE(ARM_IDLECT2);
+       if (!(cpu_is_omap1510()))
+               ARM_SAVE(ARM_IDLECT3);
        ARM_SAVE(ARM_EWUPCT);
        ARM_SAVE(ARM_RSTCT1);
        ARM_SAVE(ARM_RSTCT2);
@@ -436,6 +378,7 @@
                   "ARM_CKCTL_REG:            0x%-8x     \n"
                   "ARM_IDLECT1_REG:          0x%-8x     \n"
                   "ARM_IDLECT2_REG:          0x%-8x     \n"
+                  "ARM_IDLECT3_REG:          0x%-8x     \n"
                   "ARM_EWUPCT_REG:           0x%-8x     \n"
                   "ARM_RSTCT1_REG:           0x%-8x     \n"
                   "ARM_RSTCT2_REG:           0x%-8x     \n"
@@ -449,6 +392,7 @@
                   ARM_SHOW(ARM_CKCTL),
                   ARM_SHOW(ARM_IDLECT1),
                   ARM_SHOW(ARM_IDLECT2),
+                  ARM_SHOW(ARM_IDLECT3),
                   ARM_SHOW(ARM_EWUPCT),
                   ARM_SHOW(ARM_RSTCT1),
                   ARM_SHOW(ARM_RSTCT2),
@@ -507,7 +451,7 @@
 
        entry = create_proc_read_entry("driver/omap_pm",
                                       S_IWUSR | S_IRUGO, NULL,
-                                      omap_pm_read_proc, 0);
+          omap_pm_read_proc, NULL);
 }
 
 #endif /* DEBUG && CONFIG_PROC_FS */
@@ -580,7 +524,21 @@
 }
 
 
-struct pm_ops omap_pm_ops ={
+static irqreturn_t  omap_wakeup_interrupt(int  irq, void *  dev,
+                                    struct pt_regs *  regs)
+{
+       return IRQ_HANDLED;
+}
+
+static struct irqaction omap_wakeup_irq = {
+       .name           = "peripheral wakeup",
+       .flags          = SA_INTERRUPT,
+       .handler        = omap_wakeup_interrupt
+};
+
+
+
+static struct pm_ops omap_pm_ops ={
        .pm_disk_mode = 0,
         .prepare        = omap_pm_prepare,
         .enter          = omap_pm_enter,
@@ -590,42 +548,61 @@
 static int __init omap_pm_init(void)
 {
        printk("Power Management for TI OMAP.\n");
-       pm_idle = omap_pm_idle;
        /*
         * We copy the assembler sleep/wakeup routines to SRAM.
         * These routines need to be in SRAM as that's the only
         * memory the MPU can see when it wakes up.
         */
-
-#ifdef CONFIG_ARCH_OMAP1510
        if (cpu_is_omap1510()) {
-               memcpy((void *)OMAP1510_SRAM_IDLE_SUSPEND,
-                      omap1510_idle_loop_suspend,
-                      omap1510_idle_loop_suspend_sz);
-               memcpy((void *)OMAP1510_SRAM_API_SUSPEND, omap1510_cpu_suspend,
-                      omap1510_cpu_suspend_sz);
-       } else
-#endif
-       if (cpu_is_omap1610() || cpu_is_omap1710()) {
-               memcpy((void *)OMAP1610_SRAM_IDLE_SUSPEND,
-                      omap1610_idle_loop_suspend,
-                      omap1610_idle_loop_suspend_sz);
-               memcpy((void *)OMAP1610_SRAM_API_SUSPEND, omap1610_cpu_suspend,
-                      omap1610_cpu_suspend_sz);
-       } else if (cpu_is_omap5912()) {
-               memcpy((void *)OMAP5912_SRAM_IDLE_SUSPEND,
-                      omap1610_idle_loop_suspend,
-                      omap1610_idle_loop_suspend_sz);
-               memcpy((void *)OMAP5912_SRAM_API_SUSPEND, omap1610_cpu_suspend,
-                      omap1610_cpu_suspend_sz);
+               omap_sram_idle = omap_sram_push(omap1510_idle_loop_suspend,
+                                               omap1510_idle_loop_suspend_sz);
+               omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend,
+                                                  omap1510_cpu_suspend_sz);
+       } else if (cpu_is_omap16xx()) {
+               omap_sram_idle = omap_sram_push(omap1610_idle_loop_suspend,
+                                               omap1610_idle_loop_suspend_sz);
+               omap_sram_suspend = omap_sram_push(omap1610_cpu_suspend,
+                                                  omap1610_cpu_suspend_sz);
        }
 
+       if (omap_sram_idle == NULL || omap_sram_suspend == NULL) {
+               printk(KERN_ERR "PM not initialized: Missing SRAM support\n");
+               return -ENODEV;
+       }
+
+       pm_idle = omap_pm_idle;
+
+       setup_irq(INT_1610_WAKE_UP_REQ, &omap_wakeup_irq);
+#if 0
+       /* --- BEGIN BOARD-DEPENDENT CODE --- */
+       /* Sleepx mask direction */
+       omap_writew((omap_readw(0xfffb5008) & ~2), 0xfffb5008);
+       /* Unmask sleepx signal */
+       omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004);
+       /* --- END BOARD-DEPENDENT CODE --- */
+#endif
+
+       /* Program new power ramp-up time
+        * (0 for most boards since we don't lower voltage when in deep sleep)
+        */
+       omap_writew(ULPD_SETUP_ANALOG_CELL_3_VAL, ULPD_SETUP_ANALOG_CELL_3);
+
+       /* Setup ULPD POWER_CTRL_REG - enter deep sleep whenever possible */
+       omap_writew(ULPD_POWER_CTRL_REG_VAL, ULPD_POWER_CTRL);
+
+       /* Configure IDLECT3 */
+       if (cpu_is_omap16xx())
+               omap_writel(OMAP1610_IDLECT3_VAL, OMAP1610_IDLECT3);
+
        pm_set_ops(&omap_pm_ops);
 
 #if defined(DEBUG) && defined(CONFIG_PROC_FS)
        omap_pm_init_proc();
 #endif
 
+       /* configure LOW_PWR pin */
+       omap_cfg_reg(T20_1610_LOW_PWR);
+
        return 0;
 }
 __initcall(omap_pm_init);
diff -urN linux/arch/arm/plat-omap/sleep.S linux/arch/arm/plat-omap/sleep.S
--- linux/arch/arm/plat-omap/sleep.S    2005/07/13 11:48:53     1.1
+++ linux/arch/arm/plat-omap/sleep.S    2005/09/15 08:52:50     1.2
@@ -66,7 +66,7 @@
        @ get ARM_IDLECT2 into r2
        ldrh    r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
        mov     r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff
-       orr     r5,r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff00
+       orr     r5, r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff00
        strh    r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
 
        @ request ARM idle
@@ -76,7 +76,7 @@
        strh    r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
 
        mov     r5, #IDLE_WAIT_CYCLES & 0xff
-       orr     r5, r5, #IDLE_WAIT_CYCLES & 0xff00
+       orr     r5, r5, #IDLE_WAIT_CYCLES & 0xff00
 l_1510:        subs    r5, r5, #1
        bne     l_1510
 /*
@@ -96,7 +96,7 @@
        strh    r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
        strh    r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
 
-       ldmfd   sp!, {r0 - r12, pc}     @ restore regs and return
+       ldmfd   sp!, {r0 - r12, pc}             @ restore regs and return
 
 ENTRY(omap1510_idle_loop_suspend_sz)
        .word   . - omap1510_idle_loop_suspend
@@ -115,8 +115,8 @@
        @ turn off clock domains
        @ get ARM_IDLECT2 into r2
        ldrh    r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-       mov     r5, #OMAP1610_IDLE_CLOCK_DOMAINS & 0xff
-       orr     r5,r5, #OMAP1610_IDLE_CLOCK_DOMAINS & 0xff00
+       mov     r5, #OMAP1610_IDLECT2_SLEEP_VAL & 0xff
+       orr     r5, r5, #OMAP1610_IDLECT2_SLEEP_VAL & 0xff00
        strh    r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
 
        @ request ARM idle
@@ -126,7 +126,7 @@
        strh    r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
 
        mov     r5, #IDLE_WAIT_CYCLES & 0xff
-       orr     r5, r5, #IDLE_WAIT_CYCLES & 0xff00
+       orr     r5, r5, #IDLE_WAIT_CYCLES & 0xff00
 l_1610:        subs    r5, r5, #1
        bne     l_1610
 /*
@@ -146,7 +146,7 @@
        strh    r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
        strh    r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
 
-       ldmfd   sp!, {r0 - r12, pc}     @ restore regs and return
+       ldmfd   sp!, {r0 - r12, pc}             @ restore regs and return
 
 ENTRY(omap1610_idle_loop_suspend_sz)
        .word   . - omap1610_idle_loop_suspend
@@ -208,7 +208,7 @@
 
        @ turn off clock domains
        mov     r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff
-       orr     r5,r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff00
+       orr     r5, r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff00
        strh    r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
 
        @ request ARM idle
@@ -217,7 +217,7 @@
        strh    r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
 
        mov     r5, #IDLE_WAIT_CYCLES & 0xff
-       orr     r5, r5, #IDLE_WAIT_CYCLES & 0xff00
+       orr     r5, r5, #IDLE_WAIT_CYCLES & 0xff00
 l_1510_2:
        subs    r5, r5, #1
        bne     l_1510_2
@@ -237,7 +237,7 @@
        strh    r0, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
 
        @ restore regs and return
-       ldmfd   sp!, {r0 - r12, pc}
+       ldmfd   sp!, {r0 - r12, pc}
 
 ENTRY(omap1510_cpu_suspend_sz)
        .word   . - omap1510_cpu_suspend
@@ -249,21 +249,26 @@
        @ save registers on stack
        stmfd   sp!, {r0 - r12, lr}
 
+       @ Drain write cache
+       mov     r4, #0
+       mcr     p15, 0, r0, c7, c10, 4
+       nop
+
        @ load base address of Traffic Controller
-       mov     r4, #TCMIF_ASM_BASE & 0xff000000
-       orr     r4, r4, #TCMIF_ASM_BASE & 0x00ff0000
-       orr     r4, r4, #TCMIF_ASM_BASE & 0x0000ff00
+       mov     r6, #TCMIF_ASM_BASE & 0xff000000
+       orr     r6, r6, #TCMIF_ASM_BASE & 0x00ff0000
+       orr     r6, r6, #TCMIF_ASM_BASE & 0x0000ff00
 
        @ prepare to put SDRAM into self-refresh manually
-       ldr     r5, [r4, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff]
-       orr     r5, r5, #SELF_REFRESH_MODE & 0xff000000
-       orr     r5, r5, #SELF_REFRESH_MODE & 0x000000ff
-       str     r5, [r4, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff]
+       ldr     r7, [r6, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff]
+       orr     r9, r7, #SELF_REFRESH_MODE & 0xff000000
+       orr     r9, r9, #SELF_REFRESH_MODE & 0x000000ff
+       str     r9, [r6, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff]
 
        @ prepare to put EMIFS to Sleep
-       ldr     r5, [r4, #EMIFS_CONFIG_ASM_OFFSET & 0xff]
-       orr     r5, r5, #IDLE_EMIFS_REQUEST & 0xff
-       str     r5, [r4, #EMIFS_CONFIG_ASM_OFFSET & 0xff]
+       ldr     r8, [r6, #EMIFS_CONFIG_ASM_OFFSET & 0xff]
+       orr     r9, r8, #IDLE_EMIFS_REQUEST & 0xff
+       str     r9, [r6, #EMIFS_CONFIG_ASM_OFFSET & 0xff]
 
        @ load base address of ARM_IDLECT1 and ARM_IDLECT2
        mov     r4, #CLKGEN_REG_ASM_BASE & 0xff000000
@@ -271,26 +276,22 @@
        orr     r4, r4, #CLKGEN_REG_ASM_BASE & 0x0000ff00
 
        @ turn off clock domains
-       mov     r5, #OMAP1610_IDLE_CLOCK_DOMAINS & 0xff
-       orr     r5,r5, #OMAP1610_IDLE_CLOCK_DOMAINS & 0xff00
-       strh    r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-
-       @ work around errata of OMAP1610/5912. Enable (!) peripheral
-       @ clock to let the chip go into deep sleep
-       ldrh    r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-       orr     r5,r5, #EN_PERCK_BIT & 0xff
+       @ do not disable PERCK (0x04)
+       mov     r5, #OMAP1610_IDLECT2_SLEEP_VAL & 0xff
+       orr     r5, r5, #OMAP1610_IDLECT2_SLEEP_VAL & 0xff00
        strh    r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
 
        @ request ARM idle
-       mov     r3, #OMAP1610_DEEP_SLEEP_REQUEST & 0xff
-       orr     r3, r3, #OMAP1610_DEEP_SLEEP_REQUEST & 0xff00
+       mov     r3, #OMAP1610_IDLECT1_SLEEP_VAL & 0xff
+       orr     r3, r3, #OMAP1610_IDLECT1_SLEEP_VAL & 0xff00
        strh    r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
 
-       mov     r5, #IDLE_WAIT_CYCLES & 0xff
-       orr     r5, r5, #IDLE_WAIT_CYCLES & 0xff00
-l_1610_2:
-       subs    r5, r5, #1
-       bne     l_1610_2
+       @ disable instruction cache
+       mrc     p15, 0, r9, c1, c0, 0
+       bic     r2, r9, #0x1000
+       mcr     p15, 0, r2, c1, c0, 0
+       nop
+
 /*
  * Let's wait for the next wake up event to wake us up. r0 can't be
  * used here because r0 holds ARM_IDLECT1
@@ -301,13 +302,21 @@
  * omap1610_cpu_suspend()'s resume point.
  *
  * It will just start executing here, so we'll restore stuff from the
- * stack, reset the ARM_IDLECT1 and ARM_IDLECT2.
+ * stack.
  */
+       @ re-enable Icache
+       mcr     p15, 0, r9, c1, c0, 0
+
+       @ reset the ARM_IDLECT1 and ARM_IDLECT2.
        strh    r1, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
        strh    r0, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
 
+       @ Restore EMIFF controls
+       str     r7, [r6, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff]
+       str     r8, [r6, #EMIFS_CONFIG_ASM_OFFSET & 0xff]
+
        @ restore regs and return
-       ldmfd   sp!, {r0 - r12, pc}
+       ldmfd   sp!, {r0 - r12, pc}
 
 ENTRY(omap1610_cpu_suspend_sz)
        .word   . - omap1610_cpu_suspend
diff -urN linux/arch/arm/plat-omap/usb.c linux/arch/arm/plat-omap/usb.c
--- linux/arch/arm/plat-omap/usb.c      2005/07/13 11:48:53     1.1
+++ linux/arch/arm/plat-omap/usb.c      2005/09/15 08:52:50     1.2
@@ -41,6 +41,7 @@
 
 /* These routines should handle the standard chip-specific modes
  * for usb0/1/2 ports, covering basic mux and transceiver setup.
+ * Call omap_usb_init() once, from INIT_MACHINE().
  *
  * Some board-*.c files will need to set up additional mux options,
  * like for suspend handling, vbus sensing, GPIOs, and the D+ pullup.
diff -urN linux/arch/arm/vfp/entry.S linux/arch/arm/vfp/entry.S
--- linux/arch/arm/vfp/entry.S  2005/01/25 04:27:54     1.2
+++ linux/arch/arm/vfp/entry.S  2005/09/15 08:52:51     1.3
@@ -17,7 +17,7 @@
  */
 #include <linux/linkage.h>
 #include <linux/init.h>
-#include <asm/constants.h>
+#include <asm/asm-offsets.h>
 #include <asm/vfpmacros.h>
 
        .globl  do_vfp
diff -urN linux/arch/arm26/Kconfig linux/arch/arm26/Kconfig
--- linux/arch/arm26/Kconfig    2005/07/13 11:48:54     1.16
+++ linux/arch/arm26/Kconfig    2005/09/15 08:52:51     1.17
@@ -55,6 +55,10 @@
 config GENERIC_ISA_DMA
        bool
 
+config ARCH_MAY_HAVE_PC_FDC
+       bool
+       default y
+
 source "init/Kconfig"
 
 
diff -urN linux/arch/arm26/Makefile linux/arch/arm26/Makefile
--- linux/arch/arm26/Makefile   2005/01/13 14:05:20     1.5
+++ linux/arch/arm26/Makefile   2005/09/15 08:52:51     1.6
@@ -17,10 +17,6 @@
 CFLAGS         +=-fno-omit-frame-pointer -mno-sched-prolog
 endif
 
-ifeq ($(CONFIG_DEBUG_INFO),y)
-CFLAGS         +=-g
-endif
-
 CFLAGS_BOOT    :=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
 CFLAGS         +=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
 AFLAGS         +=-mapcs-26 -mcpu=arm3 -msoft-float
@@ -53,10 +49,6 @@
 
 boot := arch/arm26/boot
 
-prepare: include/asm-$(ARCH)/asm_offsets.h
-CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
-
-
 .PHONY: maketools FORCE
 maketools: FORCE
        
@@ -98,12 +90,6 @@
        fi; \
        )
 
-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
-                                  include/config/MARKER
-
-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
-       $(call filechk,gen-asm-offsets)
-
 define archhelp
   echo  '* zImage        - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
   echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
diff -urN linux/arch/arm26/kernel/entry.S linux/arch/arm26/kernel/entry.S
--- linux/arch/arm26/kernel/entry.S     2005/01/13 14:05:20     1.4
+++ linux/arch/arm26/kernel/entry.S     2005/09/15 08:52:51     1.5
@@ -10,7 +10,7 @@
 #include <linux/linkage.h>
 
 #include <asm/assembler.h>
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 #include <asm/errno.h>
 #include <asm/hardware.h>
 #include <asm/sysirq.h>
diff -urN linux/arch/arm26/kernel/signal.c linux/arch/arm26/kernel/signal.c
--- linux/arch/arm26/kernel/signal.c    2005/03/18 17:36:48     1.3
+++ linux/arch/arm26/kernel/signal.c    2005/09/15 08:52:51     1.4
@@ -454,14 +454,13 @@
                if (ka->sa.sa_flags & SA_ONESHOT)
                        ka->sa.sa_handler = SIG_DFL;
 
-               if (!(ka->sa.sa_flags & SA_NODEFER)) {
-                       spin_lock_irq(&tsk->sighand->siglock);
-                       sigorsets(&tsk->blocked, &tsk->blocked,
-                                 &ka->sa.sa_mask);
+               spin_lock_irq(&tsk->sighand->siglock);
+               sigorsets(&tsk->blocked, &tsk->blocked,
+                         &ka->sa.sa_mask);
+               if (!(ka->sa.sa_flags & SA_NODEFER))
                        sigaddset(&tsk->blocked, sig);
-                       recalc_sigpending();
-                       spin_unlock_irq(&tsk->sighand->siglock);
-               }
+               recalc_sigpending();
+               spin_unlock_irq(&tsk->sighand->siglock);
                return;
        }
 
diff -urN linux/arch/arm26/kernel/time.c linux/arch/arm26/kernel/time.c
--- linux/arch/arm26/kernel/time.c      2005/01/25 04:27:54     1.8
+++ linux/arch/arm26/kernel/time.c      2005/09/15 08:52:51     1.9
@@ -114,7 +114,7 @@
  */
 static inline void do_set_rtc(void)
 {
-       if (time_status & STA_UNSYNC || set_rtc == NULL)
+       if (!ntp_synced() || set_rtc == NULL)
                return;
 
 //FIXME - timespec.tv_sec is a time_t not unsigned long
@@ -189,10 +189,7 @@
 
        xtime.tv_sec = tv->tv_sec;
        xtime.tv_nsec = tv->tv_nsec;
-       time_adjust = 0;                /* stop active adjtime() */
-       time_status |= STA_UNSYNC;
-       time_maxerror = NTP_PHASE_LIMIT;
-       time_esterror = NTP_PHASE_LIMIT;
+       ntp_clear();
        write_sequnlock_irq(&xtime_lock);
        clock_was_set();
        return 0;
diff -urN linux/arch/arm26/lib/copy_page.S linux/arch/arm26/lib/copy_page.S
--- linux/arch/arm26/lib/copy_page.S    2005/01/13 14:05:20     1.2
+++ linux/arch/arm26/lib/copy_page.S    2005/09/15 08:52:51     1.3
@@ -11,7 +11,7 @@
  */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 
                .text
                .align  5
diff -urN linux/arch/arm26/lib/csumpartialcopyuser.S 
linux/arch/arm26/lib/csumpartialcopyuser.S
--- linux/arch/arm26/lib/csumpartialcopyuser.S  2003/06/22 23:09:47     1.1
+++ linux/arch/arm26/lib/csumpartialcopyuser.S  2005/09/15 08:52:51     1.2
@@ -11,7 +11,7 @@
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/errno.h>
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 
                .text
 
diff -urN linux/arch/arm26/lib/getuser.S linux/arch/arm26/lib/getuser.S
--- linux/arch/arm26/lib/getuser.S      2005/01/13 14:05:21     1.2
+++ linux/arch/arm26/lib/getuser.S      2005/09/15 08:52:51     1.3
@@ -26,7 +26,7 @@
  * Note that ADDR_LIMIT is either 0 or 0xc0000000.
  * Note also that it is intended that __get_user_bad is not global.
  */
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
 #include <asm/errno.h>
 
diff -urN linux/arch/arm26/lib/putuser.S linux/arch/arm26/lib/putuser.S
--- linux/arch/arm26/lib/putuser.S      2005/01/13 14:05:21     1.2
+++ linux/arch/arm26/lib/putuser.S      2005/09/15 08:52:51     1.3
@@ -26,7 +26,7 @@
  * Note that ADDR_LIMIT is either 0 or 0xc0000000
  * Note also that it is intended that __put_user_bad is not global.
  */
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
 #include <asm/errno.h>
 
diff -urN linux/arch/arm26/mm/proc-funcs.S linux/arch/arm26/mm/proc-funcs.S
--- linux/arch/arm26/mm/proc-funcs.S    2005/01/13 14:05:21     1.2
+++ linux/arch/arm26/mm/proc-funcs.S    2005/09/15 08:52:52     1.3
@@ -14,7 +14,7 @@
  */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
 
diff -urN linux/arch/arm26/nwfpe/entry.S linux/arch/arm26/nwfpe/entry.S
--- linux/arch/arm26/nwfpe/entry.S      2003/06/22 23:09:47     1.1
+++ linux/arch/arm26/nwfpe/entry.S      2005/09/15 08:52:52     1.2
@@ -20,7 +20,7 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 
 /* This is the kernel's entry point into the floating point emulator.
 It is called from the kernel with code similar to this:
diff -urN linux/arch/cris/Kconfig.debug linux/arch/cris/Kconfig.debug
--- linux/arch/cris/Kconfig.debug       2005/08/01 18:23:39     1.3
+++ linux/arch/cris/Kconfig.debug       2005/09/15 08:52:52     1.4
@@ -5,10 +5,13 @@
        bool "Kernel profiling support"
 
 config SYSTEM_PROFILER
-        bool "System profiling support"
+       bool "System profiling support"
+
+source "lib/Kconfig.debug"
 
 config ETRAX_KGDB
        bool "Use kernel GDB debugger"
+       depends on DEBUG_KERNEL
        ---help---
          The CRIS version of gdb can be used to remotely debug a running
          Linux kernel via the serial debug port.  Provided you have gdb-cris
@@ -22,25 +25,11 @@
          this option is turned on!
 
 
-config DEBUG_INFO
-        bool "Compile the kernel with debug info"
-        help
-          If you say Y here the resulting kernel image will include
-          debugging info resulting in a larger kernel image.
-          Say Y here only if you plan to use gdb to debug the kernel.
-          If you don't debug the kernel, you can say N.
-
-config FRAME_POINTER
-        bool "Compile the kernel with frame pointers"
-        help
-          If you say Y here the resulting kernel image will be slightly larger
-          and slower, but it will give very useful debugging information.
-          If you don't debug the kernel, you can say N, but we may not be able
-          to solve problems without frame pointers.
-
 config DEBUG_NMI_OOPS
-       bool "NMI causes oops printout"
-       help
-         If the system locks up without any debug information you can say Y
-         here to make it possible to dump an OOPS with an external NMI.
+       bool "NMI causes oops printout"
+       depends on DEBUG_KERNEL
+       help
+         If the system locks up without any debug information you can say Y
+         here to make it possible to dump an OOPS with an external NMI.
+
 endmenu
diff -urN linux/arch/cris/Makefile linux/arch/cris/Makefile
--- linux/arch/cris/Makefile    2005/08/01 18:23:39     1.20
+++ linux/arch/cris/Makefile    2005/09/15 08:52:52     1.21
@@ -107,8 +107,7 @@
        rm -f timage vmlinux.bin decompress.bin rescue.bin cramfs.img
        rm -rf $(LD_SCRIPT).tmp
 
-prepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch \
-        include/asm-$(ARCH)/$(SARCH)/offset.h
+archprepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch
 
 # Create some links to make all tools happy
 $(SRC_ARCH)/.links:
@@ -120,6 +119,7 @@
        @ln -sfn $(SRC_ARCH)/$(SARCH)/lib $(SRC_ARCH)/lib
        @ln -sfn $(SRC_ARCH)/$(SARCH) $(SRC_ARCH)/arch
        @ln -sfn $(SRC_ARCH)/$(SARCH)/vmlinux.lds.S 
$(SRC_ARCH)/kernel/vmlinux.lds.S
+       @ln -sfn $(SRC_ARCH)/$(SARCH)/asm-offsets.c 
$(SRC_ARCH)/kernel/asm-offsets.c
        @touch $@
 
 # Create link to sub arch includes
@@ -128,9 +128,3 @@
        @rm -f include/asm-$(ARCH)/arch
        @ln -sf $(srctree)/include/asm-$(ARCH)/$(SARCH) 
$(srctree)/include/asm-$(ARCH)/arch
        @touch $@
-
-arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm 
include/linux/version.h \
-                                       include/config/MARKER
-
-include/asm-$(ARCH)/$(SARCH)/offset.h: 
arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s
-       $(call filechk,gen-asm-offsets)
diff -urN linux/arch/cris/arch-v10/kernel/entry.S 
linux/arch/cris/arch-v10/kernel/entry.S
--- linux/arch/cris/arch-v10/kernel/entry.S     2005/08/01 18:23:40     1.4
+++ linux/arch/cris/arch-v10/kernel/entry.S     2005/09/15 08:52:52     1.5
@@ -270,7 +270,7 @@
 #include <asm/arch/sv_addr_ag.h>
 #include <asm/errno.h>
 #include <asm/thread_info.h>
-#include <asm/arch/offset.h>
+#include <asm/asm-offsets.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
 
diff -urN linux/arch/cris/arch-v10/kernel/signal.c 
linux/arch/cris/arch-v10/kernel/signal.c
--- linux/arch/cris/arch-v10/kernel/signal.c    2005/03/18 17:36:48     1.5
+++ linux/arch/cris/arch-v10/kernel/signal.c    2005/09/15 08:52:52     1.6
@@ -517,13 +517,12 @@
        if (ka->sa.sa_flags & SA_ONESHOT)
                ka->sa.sa_handler = SIG_DFL;
 
-       if (!(ka->sa.sa_flags & SA_NODEFER)) {
-               spin_lock_irq(&current->sighand->siglock);
-               sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+       spin_lock_irq(&current->sighand->siglock);
+       sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+       if (!(ka->sa.sa_flags & SA_NODEFER))
                sigaddset(&current->blocked,sig);
-               recalc_sigpending();
-               spin_unlock_irq(&current->sighand->siglock);
-       }
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
 }
 
 /*
diff -urN linux/arch/cris/arch-v10/kernel/time.c 
linux/arch/cris/arch-v10/kernel/time.c
--- linux/arch/cris/arch-v10/kernel/time.c      2004/11/15 11:49:15     1.5
+++ linux/arch/cris/arch-v10/kernel/time.c      2005/09/15 08:52:52     1.6
@@ -240,7 +240,7 @@
         * The division here is not time critical since it will run once in 
         * 11 minutes
         */
-       if ((time_status & STA_UNSYNC) == 0 &&
+       if (ntp_synced() &&
            xtime.tv_sec > last_rtc_update + 660 &&
            (xtime.tv_nsec / 1000) >= 500000 - (tick_nsec / 1000) / 2 &&
            (xtime.tv_nsec / 1000) <= 500000 + (tick_nsec / 1000) / 2) {
diff -urN linux/arch/cris/arch-v32/kernel/entry.S 
linux/arch/cris/arch-v32/kernel/entry.S
--- linux/arch/cris/arch-v32/kernel/entry.S     2005/08/01 18:23:42     1.1
+++ linux/arch/cris/arch-v32/kernel/entry.S     2005/09/15 08:52:52     1.2
@@ -23,7 +23,7 @@
 #include <asm/unistd.h>
 #include <asm/errno.h>
 #include <asm/thread_info.h>
-#include <asm/arch/offset.h>
+#include <asm/asm-offsets.h>
 
 #include <asm/arch/hwregs/asm/reg_map_asm.h>
 #include <asm/arch/hwregs/asm/intr_vect_defs_asm.h>
diff -urN linux/arch/cris/arch-v32/kernel/signal.c 
linux/arch/cris/arch-v32/kernel/signal.c
--- linux/arch/cris/arch-v32/kernel/signal.c    2005/08/01 18:23:42     1.1
+++ linux/arch/cris/arch-v32/kernel/signal.c    2005/09/15 08:52:52     1.2
@@ -568,13 +568,12 @@
        if (ka->sa.sa_flags & SA_ONESHOT)
                ka->sa.sa_handler = SIG_DFL;
 
-       if (!(ka->sa.sa_flags & SA_NODEFER)) {
-               spin_lock_irq(&current->sighand->siglock);
-               sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+       spin_lock_irq(&current->sighand->siglock);
+       sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+       if (!(ka->sa.sa_flags & SA_NODEFER))
                sigaddset(&current->blocked,sig);
-               recalc_sigpending();
-               spin_unlock_irq(&current->sighand->siglock);
-       }
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
 }
 
 /*
diff -urN linux/arch/cris/kernel/time.c linux/arch/cris/kernel/time.c
--- linux/arch/cris/kernel/time.c       2005/08/01 18:23:43     1.14
+++ linux/arch/cris/kernel/time.c       2005/09/15 08:52:53     1.15
@@ -114,10 +114,7 @@
        set_normalized_timespec(&xtime, sec, nsec);
        set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
 
-       time_adjust = 0;                /* stop active adjtime() */
-       time_status |= STA_UNSYNC;
-       time_maxerror = NTP_PHASE_LIMIT;
-       time_esterror = NTP_PHASE_LIMIT;
+       ntp_clear();
        write_sequnlock_irq(&xtime_lock);
        clock_was_set();
        return 0;
diff -urN linux/arch/frv/kernel/asm-offsets.c 
linux/arch/frv/kernel/asm-offsets.c
--- linux/arch/frv/kernel/asm-offsets.c 1970/01/01 00:00:00
+++ linux/arch/frv/kernel/asm-offsets.c 2005-09-15 09:52:53.344585000 +0100     
1.1
@@ -0,0 +1 @@
+/* Dummy asm-offsets.c file. Required by kbuild and ready to be used - hint! */
diff -urN linux/arch/frv/kernel/frv_ksyms.c linux/arch/frv/kernel/frv_ksyms.c
--- linux/arch/frv/kernel/frv_ksyms.c   2005/01/13 14:05:22     1.1
+++ linux/arch/frv/kernel/frv_ksyms.c   2005/09/15 08:52:53     1.2
@@ -71,7 +71,6 @@
 EXPORT_SYMBOL(memcmp);
 EXPORT_SYMBOL(memscan);
 EXPORT_SYMBOL(memmove);
-EXPORT_SYMBOL(strtok);
 
 EXPORT_SYMBOL(get_wchan);
 
diff -urN linux/arch/frv/kernel/signal.c linux/arch/frv/kernel/signal.c
--- linux/arch/frv/kernel/signal.c      2005/07/11 20:46:06     1.5
+++ linux/arch/frv/kernel/signal.c      2005/09/15 08:52:53     1.6
@@ -506,13 +506,12 @@
        else
                setup_frame(sig, ka, oldset, regs);
 
-       if (!(ka->sa.sa_flags & SA_NODEFER)) {
-               spin_lock_irq(&current->sighand->siglock);
-               sigorsets(&current->blocked, &current->blocked, 
&ka->sa.sa_mask);
+       spin_lock_irq(&current->sighand->siglock);
+       sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
+       if (!(ka->sa.sa_flags & SA_NODEFER))
                sigaddset(&current->blocked, sig);
-               recalc_sigpending();
-               spin_unlock_irq(&current->sighand->siglock);
-       }
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
 } /* end handle_signal() */
 
 /*****************************************************************************/
diff -urN linux/arch/frv/kernel/time.c linux/arch/frv/kernel/time.c
--- linux/arch/frv/kernel/time.c        2005/01/13 14:05:22     1.1
+++ linux/arch/frv/kernel/time.c        2005/09/15 08:52:53     1.2
@@ -85,7 +85,7 @@
         * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
         * called as close as possible to 500 ms before the new second starts.
         */
-       if ((time_status & STA_UNSYNC) == 0 &&
+       if (ntp_synced() &&
            xtime.tv_sec > last_rtc_update + 660 &&
            (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&
            (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2
@@ -216,10 +216,7 @@
        set_normalized_timespec(&xtime, sec, nsec);
        set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
 
-       time_adjust = 0;                /* stop active adjtime() */
-       time_status |= STA_UNSYNC;
-       time_maxerror = NTP_PHASE_LIMIT;
-       time_esterror = NTP_PHASE_LIMIT;
+       ntp_clear();
        write_sequnlock_irq(&xtime_lock);
        clock_was_set();
        return 0;
diff -urN linux/arch/h8300/Makefile linux/arch/h8300/Makefile
--- linux/arch/h8300/Makefile   2005/02/07 02:54:31     1.7
+++ linux/arch/h8300/Makefile   2005/09/15 08:52:53     1.8
@@ -61,12 +61,6 @@
 archclean:
        $(Q)$(MAKE) $(clean)=$(boot)
 
-prepare: include/asm-$(ARCH)/asm-offsets.h
-
-include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
-                                  include/asm include/linux/version.h
-       $(call filechk,gen-asm-offsets)
-
 vmlinux.srec vmlinux.bin: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
@@ -74,5 +68,3 @@
   echo  'vmlinux.bin  - Create raw binary'
   echo  'vmlinux.srec - Create srec binary'
 endef
-
-CLEAN_FILES += include/asm-$(ARCH)/asm-offsets.h
diff -urN linux/arch/h8300/kernel/signal.c linux/arch/h8300/kernel/signal.c
--- linux/arch/h8300/kernel/signal.c    2005/07/11 20:46:06     1.10
+++ linux/arch/h8300/kernel/signal.c    2005/09/15 08:52:53     1.11
@@ -488,13 +488,12 @@
        else
                setup_frame(sig, ka, oldset, regs);
 
-       if (!(ka->sa.sa_flags & SA_NODEFER)) {
-               spin_lock_irq(&current->sighand->siglock);
-               sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+       spin_lock_irq(&current->sighand->siglock);
+       sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+       if (!(ka->sa.sa_flags & SA_NODEFER))
                sigaddset(&current->blocked,sig);
-               recalc_sigpending();
-               spin_unlock_irq(&current->sighand->siglock);
-       }
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
 }
 
 /*
diff -urN linux/arch/h8300/kernel/time.c linux/arch/h8300/kernel/time.c
--- linux/arch/h8300/kernel/time.c      2004/10/25 20:44:13     1.7
+++ linux/arch/h8300/kernel/time.c      2005/09/15 08:52:53     1.8
@@ -116,10 +116,7 @@
 
        xtime.tv_sec = tv->tv_sec;
        xtime.tv_nsec = tv->tv_nsec;
-       time_adjust = 0;                /* stop active adjtime() */
-       time_status |= STA_UNSYNC;
-       time_maxerror = NTP_PHASE_LIMIT;
-       time_esterror = NTP_PHASE_LIMIT;
+       ntp_clear();
        write_sequnlock_irq(&xtime_lock);
        clock_was_set();
        return 0;
diff -urN linux/arch/i386/Kconfig linux/arch/i386/Kconfig
--- linux/arch/i386/Kconfig     2005/08/08 12:30:26     1.58
+++ linux/arch/i386/Kconfig     2005/09/15 08:52:53     1.59
@@ -14,6 +14,10 @@
          486, 586, Pentiums, and various instruction-set-compatible chips by
          AMD, Cyrix, and others.
 
+config SEMAPHORE_SLEEPERS
+       bool
+       default y
+
 config MMU
        bool
        default y
@@ -33,6 +37,10 @@
        bool
        default y
 
+config ARCH_MAY_HAVE_PC_FDC
+       bool
+       default y
+
 source "init/Kconfig"
 
 menu "Processor type and features"
@@ -754,6 +762,7 @@
        depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || 
(X86_SUMMIT && ACPI))
        default n if X86_PC
        default y if (X86_NUMAQ || X86_SUMMIT)
+       select SPARSEMEM_STATIC
 
 # Need comments to help the hapless user trying to turn on NUMA support
 comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support"
@@ -1203,7 +1212,6 @@
 config PCI_MMCONFIG
        bool
        depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
-       select ACPI_BOOT
        default y
 
 source "drivers/pci/pcie/Kconfig"
@@ -1313,6 +1321,11 @@
        bool
        default y
 
+config GENERIC_PENDING_IRQ
+       bool
+       depends on GENERIC_HARDIRQS && SMP
+       default y
+
 config X86_SMP
        bool
        depends on SMP && !X86_VOYAGER
diff -urN linux/arch/i386/Makefile linux/arch/i386/Makefile
--- linux/arch/i386/Makefile    2005/07/11 20:46:07     1.71
+++ linux/arch/i386/Makefile    2005/09/15 08:52:53     1.72
@@ -156,15 +156,6 @@
 install kernel_install:
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
 
-prepare: include/asm-$(ARCH)/asm_offsets.h
-CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
-
-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
-                                  include/config/MARKER
-
-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
-       $(call filechk,gen-asm-offsets)
-
 archclean:
        $(Q)$(MAKE) $(clean)=arch/i386/boot
 
diff -urN linux/arch/i386/defconfig linux/arch/i386/defconfig
--- linux/arch/i386/defconfig   2005/07/11 20:46:07     1.110
+++ linux/arch/i386/defconfig   2005/09/15 08:52:53     1.111
@@ -131,8 +131,6 @@
 # ACPI (Advanced Configuration and Power Interface) Support
 #
 CONFIG_ACPI=y
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
 CONFIG_ACPI_SLEEP=y
 CONFIG_ACPI_SLEEP_PROC_FS=y
 CONFIG_ACPI_AC=y
@@ -144,10 +142,8 @@
 # CONFIG_ACPI_ASUS is not set
 # CONFIG_ACPI_TOSHIBA is not set
 # CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
 CONFIG_ACPI_EC=y
 CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
 CONFIG_ACPI_SYSTEM=y
 # CONFIG_X86_PM_TIMER is not set
 
diff -urN linux/arch/i386/boot/setup.S linux/arch/i386/boot/setup.S
--- linux/arch/i386/boot/setup.S        2005/07/11 20:46:07     1.46
+++ linux/arch/i386/boot/setup.S        2005/09/15 08:52:54     1.47
@@ -82,7 +82,7 @@
 # This is the setup header, and it must start at %cs:2 (old 0x9020:2)
 
                .ascii  "HdrS"          # header signature
-               .word   0x0203          # header version number (>= 0x0105)
+               .word   0x0204          # header version number (>= 0x0105)
                                        # or else old loadlin-1.5 will fail)
 realmode_swtch:        .word   0, 0            # default_switch, SETUPSEG
 start_sys_seg: .word   SYSSEG
diff -urN linux/arch/i386/boot/video.S linux/arch/i386/boot/video.S
--- linux/arch/i386/boot/video.S        2005/05/19 12:08:08     1.15
+++ linux/arch/i386/boot/video.S        2005/09/15 08:52:54     1.16
@@ -97,6 +97,7 @@
 #define PARAM_VESAPM_OFF       0x30
 #define PARAM_LFB_PAGES                0x32
 #define PARAM_VESA_ATTRIB      0x34
+#define PARAM_CAPABILITIES      0x36
 
 /* Define DO_STORE according to CONFIG_VIDEO_RETAIN */
 #ifdef CONFIG_VIDEO_RETAIN
@@ -233,6 +234,10 @@
        movw    18(%di), %ax
        movl    %eax, %fs:(PARAM_LFB_SIZE)
 
+# store mode capabilities
+       movl    10(%di), %eax
+       movl    %eax, %fs:(PARAM_CAPABILITIES)
+
 # switching the DAC to 8-bit is for <= 8 bpp only
        movw    %fs:(PARAM_LFB_DEPTH), %ax
        cmpw    $8, %ax
@@ -1944,7 +1949,7 @@
        movw    $0x4f15, %ax                    # do VBE/DDC
        movw    $0x01, %bx
        movw    $0x00, %cx
-       movw    $0x01, %dx
+       movw    $0x00, %dx
        movw    $0x140, %di
        int     $0x10
 
diff -urN linux/arch/i386/boot/tools/build.c linux/arch/i386/boot/tools/build.c
--- linux/arch/i386/boot/tools/build.c  2005/07/11 20:46:07     1.13
+++ linux/arch/i386/boot/tools/build.c  2005/09/15 08:52:54     1.14
@@ -177,7 +177,9 @@
                die("Output: seek failed");
        buf[0] = (sys_size & 0xff);
        buf[1] = ((sys_size >> 8) & 0xff);
-       if (write(1, buf, 2) != 2)
+       buf[2] = ((sys_size >> 16) & 0xff);
+       buf[3] = ((sys_size >> 24) & 0xff);
+       if (write(1, buf, 4) != 4)
                die("Write of image length failed");
 
        return 0;                                           /* Everything is OK 
*/
diff -urN linux/arch/i386/kernel/i8237.c linux/arch/i386/kernel/i8237.c
--- linux/arch/i386/kernel/i8237.c      1970/01/01 00:00:00
+++ linux/arch/i386/kernel/i8237.c      2005-09-15 09:52:54.720321000 +0100     
1.1
@@ -0,0 +1,67 @@
+/*
+ * i8237.c: 8237A DMA controller suspend functions.
+ *
+ * Written by Pierre Ossman, 2005.
+ */
+
+#include <linux/init.h>
+#include <linux/sysdev.h>
+
+#include <asm/dma.h>
+
+/*
+ * This module just handles suspend/resume issues with the
+ * 8237A DMA controller (used for ISA and LPC).
+ * Allocation is handled in kernel/dma.c and normal usage is
+ * in asm/dma.h.
+ */
+
+static int i8237A_resume(struct sys_device *dev)
+{
+       unsigned long flags;
+       int i;
+
+       flags = claim_dma_lock();
+
+       dma_outb(DMA1_RESET_REG, 0);
+       dma_outb(DMA2_RESET_REG, 0);
+
+       for (i = 0;i < 8;i++) {
+               set_dma_addr(i, 0x000000);
+               /* DMA count is a bit weird so this is not 0 */
+               set_dma_count(i, 1);
+       }
+
+       /* Enable cascade DMA or channel 0-3 won't work */
+       enable_dma(4);
+
+       release_dma_lock(flags);
+
+       return 0;
+}
+
+static int i8237A_suspend(struct sys_device *dev, pm_message_t state)
+{
+       return 0;
+}
+
+static struct sysdev_class i8237_sysdev_class = {
+       set_kset_name("i8237"),
+       .suspend = i8237A_suspend,
+       .resume = i8237A_resume,
+};
+
+static struct sys_device device_i8237A = {
+       .id     = 0,
+       .cls    = &i8237_sysdev_class,
+};
+
+static int __init i8237A_init_sysfs(void)
+{
+       int error = sysdev_class_register(&i8237_sysdev_class);
+       if (!error)
+               error = sysdev_register(&device_i8237A);
+       return error;
+}
+
+device_initcall(i8237A_init_sysfs);
diff -urN linux/arch/i386/kernel/Makefile linux/arch/i386/kernel/Makefile
--- linux/arch/i386/kernel/Makefile     2005/07/11 20:46:07     1.74
+++ linux/arch/i386/kernel/Makefile     2005/09/15 08:52:54     1.75
@@ -7,11 +7,11 @@
 obj-y  := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
                ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
                pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \
-               doublefault.o quirks.o
+               doublefault.o quirks.o i8237.o
 
 obj-y                          += cpu/
 obj-y                          += timers/
-obj-$(CONFIG_ACPI_BOOT)                += acpi/
+obj-$(CONFIG_ACPI)             += acpi/
 obj-$(CONFIG_X86_BIOS_REBOOT)  += reboot.o
 obj-$(CONFIG_MCA)              += mca.o
 obj-$(CONFIG_X86_MSR)          += msr.o
diff -urN linux/arch/i386/kernel/crash.c linux/arch/i386/kernel/crash.c
--- linux/arch/i386/kernel/crash.c      2005/07/11 20:46:07     1.1
+++ linux/arch/i386/kernel/crash.c      2005/09/15 08:52:54     1.2
@@ -153,7 +153,7 @@
        disable_local_APIC();
        atomic_dec(&waiting_for_crash_ipi);
        /* Assume hlt works */
-       __asm__("hlt");
+       halt();
        for(;;);
 
        return 1;
diff -urN linux/arch/i386/kernel/dmi_scan.c linux/arch/i386/kernel/dmi_scan.c
--- linux/arch/i386/kernel/dmi_scan.c   2005/07/11 20:46:07     1.51
+++ linux/arch/i386/kernel/dmi_scan.c   2005/09/15 08:52:54     1.52
@@ -6,32 +6,28 @@
 #include <linux/bootmem.h>
 
 
-struct dmi_header {
-       u8 type;
-       u8 length;
-       u16 handle;
-};
-
-#undef DMI_DEBUG
-
-#ifdef DMI_DEBUG
-#define dmi_printk(x) printk x
-#else
-#define dmi_printk(x)
-#endif
-
 static char * __init dmi_string(struct dmi_header *dm, u8 s)
 {
        u8 *bp = ((u8 *) dm) + dm->length;
+       char *str = "";
 
-       if (!s)
-               return "";
-       s--;
-       while (s > 0 && *bp) {
-               bp += strlen(bp) + 1;
+       if (s) {
                s--;
-       }
-       return bp;
+               while (s > 0 && *bp) {
+                       bp += strlen(bp) + 1;
+                       s--;
+               }
+
+               if (*bp != 0) {
+                       str = alloc_bootmem(strlen(bp) + 1);
+                       if (str != NULL)
+                               strcpy(str, bp);
+                       else
+                               printk(KERN_ERR "dmi_string: out of memory.\n");
+               }
+       }
+
+       return str;
 }
 
 /*
@@ -84,69 +80,76 @@
        return sum == 0;
 }
 
-static int __init dmi_iterate(void (*decode)(struct dmi_header *))
+static char *dmi_ident[DMI_STRING_MAX];
+static LIST_HEAD(dmi_devices);
+
+/*
+ *     Save a DMI string
+ */
+static void __init dmi_save_ident(struct dmi_header *dm, int slot, int string)
 {
-       u8 buf[15];
-       char __iomem *p, *q;
+       char *p, *d = (char*) dm;
 
-       /*
-        * no iounmap() for that ioremap(); it would be a no-op, but it's
-        * so early in setup that sucker gets confused into doing what
-        * it shouldn't if we actually call it.
-        */
-       p = ioremap(0xF0000, 0x10000);
+       if (dmi_ident[slot])
+               return;
+
+       p = dmi_string(dm, d[string]);
        if (p == NULL)
-               return -1;
+               return;
 
-       for (q = p; q < p + 0x10000; q += 16) {
-               memcpy_fromio(buf, q, 15);
-               if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
-                       u16 num = (buf[13] << 8) | buf[12];
-                       u16 len = (buf[7] << 8) | buf[6];
-                       u32 base = (buf[11] << 24) | (buf[10] << 16) |
-                                  (buf[9] << 8) | buf[8];
+       dmi_ident[slot] = p;
+}
 
-                       /*
-                        * DMI version 0.0 means that the real version is taken 
from
-                        * the SMBIOS version, which we don't know at this 
point.
-                        */
-                       if (buf[14] != 0)
-                               printk(KERN_INFO "DMI %d.%d present.\n",
-                                       buf[14] >> 4, buf[14] & 0xF);
-                       else
-                               printk(KERN_INFO "DMI present.\n");
+static void __init dmi_save_devices(struct dmi_header *dm)
+{
+       int i, count = (dm->length - sizeof(struct dmi_header)) / 2;
+       struct dmi_device *dev;
 
-                       dmi_printk((KERN_INFO "%d structures occupying %d 
bytes.\n",
-                               num, len));
-                       dmi_printk((KERN_INFO "DMI table at 0x%08X.\n", base));
+       for (i = 0; i < count; i++) {
+               char *d = ((char *) dm) + (i * 2);
 
-                       if (dmi_table(base,len, num, decode) == 0)
-                               return 0;
+               /* Skip disabled device */
+               if ((*d & 0x80) == 0)
+                       continue;
+
+               dev = alloc_bootmem(sizeof(*dev));
+               if (!dev) {
+                       printk(KERN_ERR "dmi_save_devices: out of memory.\n");
+                       break;
                }
+
+               dev->type = *d++ & 0x7f;
+               dev->name = dmi_string(dm, *d);
+               dev->device_data = NULL;
+
+               list_add(&dev->list, &dmi_devices);
        }
-       return -1;
 }
 
-static char *dmi_ident[DMI_STRING_MAX];
-
-/*
- *     Save a DMI string
- */
-static void __init dmi_save_ident(struct dmi_header *dm, int slot, int string)
+static void __init dmi_save_ipmi_device(struct dmi_header *dm)
 {
-       char *d = (char*)dm;
-       char *p = dmi_string(dm, d[string]);
+       struct dmi_device *dev;
+       void * data;
 
-       if (p == NULL || *p == 0)
+       data = alloc_bootmem(dm->length);
+       if (data == NULL) {
+               printk(KERN_ERR "dmi_save_ipmi_device: out of memory.\n");
                return;
-       if (dmi_ident[slot])
+       }
+
+       memcpy(data, dm, dm->length);
+
+       dev = alloc_bootmem(sizeof(*dev));
+       if (!dev) {
+               printk(KERN_ERR "dmi_save_ipmi_device: out of memory.\n");
                return;
+       }
+
+       dev->type = DMI_DEV_TYPE_IPMI;
+       dev->name = "IPMI controller";
+       dev->device_data = data;
 
-       dmi_ident[slot] = alloc_bootmem(strlen(p) + 1);
-       if(dmi_ident[slot])
-               strcpy(dmi_ident[slot], p);
-       else
-               printk(KERN_ERR "dmi_save_ident: out of memory.\n");
+       list_add(&dev->list, &dmi_devices);
 }
 
 /*
@@ -156,42 +159,69 @@
  */
 static void __init dmi_decode(struct dmi_header *dm)
 {
-       u8 *data __attribute__((__unused__)) = (u8 *)dm;
-       
        switch(dm->type) {
-       case  0:
-               dmi_printk(("BIOS Vendor: %s\n", dmi_string(dm, data[4])));
+       case 0:         /* BIOS Information */
                dmi_save_ident(dm, DMI_BIOS_VENDOR, 4);
-               dmi_printk(("BIOS Version: %s\n", dmi_string(dm, data[5])));
                dmi_save_ident(dm, DMI_BIOS_VERSION, 5);
-               dmi_printk(("BIOS Release: %s\n", dmi_string(dm, data[8])));
                dmi_save_ident(dm, DMI_BIOS_DATE, 8);
                break;
-       case 1:
-               dmi_printk(("System Vendor: %s\n", dmi_string(dm, data[4])));
+       case 1:         /* System Information */
                dmi_save_ident(dm, DMI_SYS_VENDOR, 4);
-               dmi_printk(("Product Name: %s\n", dmi_string(dm, data[5])));
                dmi_save_ident(dm, DMI_PRODUCT_NAME, 5);
-               dmi_printk(("Version: %s\n", dmi_string(dm, data[6])));
                dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6);
-               dmi_printk(("Serial Number: %s\n", dmi_string(dm, data[7])));
                dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7);
                break;
-       case 2:
-               dmi_printk(("Board Vendor: %s\n", dmi_string(dm, data[4])));
+       case 2:         /* Base Board Information */
                dmi_save_ident(dm, DMI_BOARD_VENDOR, 4);
-               dmi_printk(("Board Name: %s\n", dmi_string(dm, data[5])));
                dmi_save_ident(dm, DMI_BOARD_NAME, 5);
-               dmi_printk(("Board Version: %s\n", dmi_string(dm, data[6])));
                dmi_save_ident(dm, DMI_BOARD_VERSION, 6);
                break;
+       case 10:        /* Onboard Devices Information */
+               dmi_save_devices(dm);
+               break;
+       case 38:        /* IPMI Device Information */
+               dmi_save_ipmi_device(dm);
        }
 }
 
 void __init dmi_scan_machine(void)
 {
-       if (dmi_iterate(dmi_decode))
-               printk(KERN_INFO "DMI not present.\n");
+       u8 buf[15];
+       char __iomem *p, *q;
+
+       /*
+        * no iounmap() for that ioremap(); it would be a no-op, but it's
+        * so early in setup that sucker gets confused into doing what
+        * it shouldn't if we actually call it.
+        */
+       p = ioremap(0xF0000, 0x10000);
+       if (p == NULL)
+               goto out;
+
+       for (q = p; q < p + 0x10000; q += 16) {
+               memcpy_fromio(buf, q, 15);
+               if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
+                       u16 num = (buf[13] << 8) | buf[12];
+                       u16 len = (buf[7] << 8) | buf[6];
+                       u32 base = (buf[11] << 24) | (buf[10] << 16) |
+                                  (buf[9] << 8) | buf[8];
+
+                       /*
+                        * DMI version 0.0 means that the real version is taken 
from
+                        * the SMBIOS version, which we don't know at this 
point.
+                        */
+                       if (buf[14] != 0)
+                               printk(KERN_INFO "DMI %d.%d present.\n",
+                                       buf[14] >> 4, buf[14] & 0xF);
+                       else
+                               printk(KERN_INFO "DMI present.\n");
+
+                       if (dmi_table(base,len, num, dmi_decode) == 0)
+                               return;
+               }
+       }
+
+out:   printk(KERN_INFO "DMI not present.\n");
 }
 
 
@@ -218,9 +248,9 @@
                        /* No match */
                        goto fail;
                }
+               count++;
                if (d->callback && d->callback(d))
                        break;
-               count++;
 fail:          d++;
        }
 
@@ -240,3 +270,32 @@
        return dmi_ident[field];
 }
 EXPORT_SYMBOL(dmi_get_system_info);
+
+/**
+ *     dmi_find_device - find onboard device by type/name
+ *     @type: device type or %DMI_DEV_TYPE_ANY to match all device types
+ *     @desc: device name string or %NULL to match all
+ *     @from: previous device found in search, or %NULL for new search.
+ *
+ *     Iterates through the list of known onboard devices. If a device is
+ *     found with a matching @vendor and @device, a pointer to its device
+ *     structure is returned.  Otherwise, %NULL is returned.
+ *     A new search is initiated by passing %NULL to the @from argument.
+ *     If @from is not %NULL, searches continue from next device.
+ */
+struct dmi_device * dmi_find_device(int type, const char *name,
+                                   struct dmi_device *from)
+{
+       struct list_head *d, *head = from ? &from->list : &dmi_devices;
+
+       for(d = head->next; d != &dmi_devices; d = d->next) {
+               struct dmi_device *dev = list_entry(d, struct dmi_device, list);
+
+               if (((type == DMI_DEV_TYPE_ANY) || (dev->type == type)) &&
+                   ((name == NULL) || (strcmp(dev->name, name) == 0)))
+                       return dev;
+       }
+
+       return NULL;
+}
+EXPORT_SYMBOL(dmi_find_device);
diff -urN linux/arch/i386/kernel/doublefault.c 
linux/arch/i386/kernel/doublefault.c
--- linux/arch/i386/kernel/doublefault.c        2004/09/19 12:30:02     1.4
+++ linux/arch/i386/kernel/doublefault.c        2005/09/15 08:52:54     1.5
@@ -20,7 +20,7 @@
        struct Xgt_desc_struct gdt_desc = {0, 0};
        unsigned long gdt, tss;
 
-       __asm__ __volatile__("sgdt %0": "=m" (gdt_desc): :"memory");
+       store_gdt(&gdt_desc);
        gdt = gdt_desc.address;
 
        printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
diff -urN linux/arch/i386/kernel/efi.c linux/arch/i386/kernel/efi.c
--- linux/arch/i386/kernel/efi.c        2005/07/11 20:46:07     1.8
+++ linux/arch/i386/kernel/efi.c        2005/09/15 08:52:54     1.9
@@ -79,7 +79,7 @@
         * directory. If I have PSE, I just need to duplicate one entry in
         * page directory.
         */
-       __asm__ __volatile__("movl %%cr4, %0":"=r"(cr4));
+       cr4 = read_cr4();
 
        if (cr4 & X86_CR4_PSE) {
                efi_bak_pg_dir_pointer[0].pgd =
@@ -104,8 +104,7 @@
        local_flush_tlb();
 
        cpu_gdt_descr[0].address = __pa(cpu_gdt_descr[0].address);
-       __asm__ __volatile__("lgdt %0":"=m"
-                           (*(struct Xgt_desc_struct *) 
__pa(&cpu_gdt_descr[0])));
+       load_gdt((struct Xgt_desc_struct *) __pa(&cpu_gdt_descr[0]));
 }
 
 static void efi_call_phys_epilog(void)
@@ -114,8 +113,8 @@
 
        cpu_gdt_descr[0].address =
                (unsigned long) __va(cpu_gdt_descr[0].address);
-       __asm__ __volatile__("lgdt %0":"=m"(cpu_gdt_descr));
-       __asm__ __volatile__("movl %%cr4, %0":"=r"(cr4));
+       load_gdt(&cpu_gdt_descr[0]);
+       cr4 = read_cr4();
 
        if (cr4 & X86_CR4_PSE) {
                swapper_pg_dir[pgd_index(0)].pgd =
@@ -233,22 +232,23 @@
 {
        memmap.map = NULL;
 
-       memmap.map = (efi_memory_desc_t *)
-               bt_ioremap((unsigned long) memmap.phys_map,
-                       (memmap.nr_map * sizeof(efi_memory_desc_t)));
-
+       memmap.map = bt_ioremap((unsigned long) memmap.phys_map,
+                       (memmap.nr_map * memmap.desc_size));
        if (memmap.map == NULL)
                printk(KERN_ERR PFX "Could not remap the EFI memmap!\n");
+
+       memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size);
 }
 
 #if EFI_DEBUG
 static void __init print_efi_memmap(void)
 {
        efi_memory_desc_t *md;
+       void *p;
        int i;
 
-       for (i = 0; i < memmap.nr_map; i++) {
-               md = &memmap.map[i];
+       for (p = memmap.map, i = 0; p < memmap.map_end; p += memmap.desc_size, 
i++) {
+               md = p;
                printk(KERN_INFO "mem%02u: type=%u, attr=0x%llx, "
                        "range=[0x%016llx-0x%016llx) (%lluMB)\n",
                        i, md->type, md->attribute, md->phys_addr,
@@ -271,10 +271,10 @@
        } prev, curr;
        efi_memory_desc_t *md;
        unsigned long start, end;
-       int i;
+       void *p;
 
-       for (i = 0; i < memmap.nr_map; i++) {
-               md = &memmap.map[i];
+       for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
+               md = p;
 
                if ((md->num_pages == 0) || (!is_available_memory(md)))
                        continue;
@@ -325,6 +325,7 @@
        memmap.phys_map = EFI_MEMMAP;
        memmap.nr_map = EFI_MEMMAP_SIZE/EFI_MEMDESC_SIZE;
        memmap.desc_version = EFI_MEMDESC_VERSION;
+       memmap.desc_size = EFI_MEMDESC_SIZE;
 
        efi.systab = (efi_system_table_t *)
                boot_ioremap((unsigned long) efi_phys.systab,
@@ -428,22 +429,30 @@
                printk(KERN_ERR PFX "Could not map the runtime service 
table!\n");
 
        /* Map the EFI memory map for use until paging_init() */
-
-       memmap.map = (efi_memory_desc_t *)
-               boot_ioremap((unsigned long) EFI_MEMMAP, EFI_MEMMAP_SIZE);
-
+       memmap.map = boot_ioremap((unsigned long) EFI_MEMMAP, EFI_MEMMAP_SIZE);
        if (memmap.map == NULL)
                printk(KERN_ERR PFX "Could not map the EFI memory map!\n");
 
-       if (EFI_MEMDESC_SIZE != sizeof(efi_memory_desc_t)) {
-               printk(KERN_WARNING PFX "Warning! Kernel-defined memdesc 
doesn't "
-                          "match the one from EFI!\n");
-       }
+       memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size);
+
 #if EFI_DEBUG
        print_efi_memmap();
 #endif
 }
 
+static inline void __init check_range_for_systab(efi_memory_desc_t *md)
+{
+       if (((unsigned long)md->phys_addr <= (unsigned long)efi_phys.systab) &&
+               ((unsigned long)efi_phys.systab < md->phys_addr +
+               ((unsigned long)md->num_pages << EFI_PAGE_SHIFT))) {
+               unsigned long addr;
+
+               addr = md->virt_addr - md->phys_addr +
+                       (unsigned long)efi_phys.systab;
+               efi.systab = (efi_system_table_t *)addr;
+       }
+}
+
 /*
  * This function will switch the EFI runtime services to virtual mode.
  * Essentially, look through the EFI memmap and map every region that
@@ -457,43 +466,32 @@
 {
        efi_memory_desc_t *md;
        efi_status_t status;
-       int i;
+       void *p;
 
        efi.systab = NULL;
 
-       for (i = 0; i < memmap.nr_map; i++) {
-               md = &memmap.map[i];
+       for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
+               md = p;
 
-               if (md->attribute & EFI_MEMORY_RUNTIME) {
-                       md->virt_addr =
-                               (unsigned long)ioremap(md->phys_addr,
-                                       md->num_pages << EFI_PAGE_SHIFT);
-                       if (!(unsigned long)md->virt_addr) {
-                               printk(KERN_ERR PFX "ioremap of 0x%lX failed\n",
-                                       (unsigned long)md->phys_addr);
-                       }
+               if (!(md->attribute & EFI_MEMORY_RUNTIME))
+                       continue;
 
-                       if (((unsigned long)md->phys_addr <=
-                                       (unsigned long)efi_phys.systab) &&
-                               ((unsigned long)efi_phys.systab <
-                                       md->phys_addr +
-                                       ((unsigned long)md->num_pages <<
-                                               EFI_PAGE_SHIFT))) {
-                               unsigned long addr;
-
-                               addr = md->virt_addr - md->phys_addr +
-                                               (unsigned long)efi_phys.systab;
-                               efi.systab = (efi_system_table_t *)addr;
-                       }
+               md->virt_addr = (unsigned long)ioremap(md->phys_addr,
+                       md->num_pages << EFI_PAGE_SHIFT);
+               if (!(unsigned long)md->virt_addr) {
+                       printk(KERN_ERR PFX "ioremap of 0x%lX failed\n",
+                               (unsigned long)md->phys_addr);
                }
+               /* update the virtual address of the EFI system table */
+               check_range_for_systab(md);
        }
 
        if (!efi.systab)
                BUG();
 
        status = phys_efi_set_virtual_address_map(
-                       sizeof(efi_memory_desc_t) * memmap.nr_map,
-                       sizeof(efi_memory_desc_t),
+                       memmap.desc_size * memmap.nr_map,
+                       memmap.desc_size,
                        memmap.desc_version,
                        memmap.phys_map);
 
@@ -533,10 +531,10 @@
 {
        struct resource *res;
        efi_memory_desc_t *md;
-       int i;
+       void *p;
 
-       for (i = 0; i < memmap.nr_map; i++) {
-               md = &memmap.map[i];
+       for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
+               md = p;
 
                if ((md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) >
                    0x100000000ULL)
@@ -613,10 +611,10 @@
 u32 efi_mem_type(unsigned long phys_addr)
 {
        efi_memory_desc_t *md;
-       int i;
+       void *p;
 
-       for (i = 0; i < memmap.nr_map; i++) {
-               md = &memmap.map[i];
+       for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
+               md = p;
                if ((md->phys_addr <= phys_addr) && (phys_addr <
                        (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) ))
                        return md->type;
@@ -627,10 +625,10 @@
 u64 efi_mem_attributes(unsigned long phys_addr)
 {
        efi_memory_desc_t *md;
-       int i;
+       void *p;
 
-       for (i = 0; i < memmap.nr_map; i++) {
-               md = &memmap.map[i];
+       for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
+               md = p;
                if ((md->phys_addr <= phys_addr) && (phys_addr <
                        (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) ))
                        return md->attribute;
diff -urN linux/arch/i386/kernel/entry.S linux/arch/i386/kernel/entry.S
--- linux/arch/i386/kernel/entry.S      2005/05/19 12:08:08     1.101
+++ linux/arch/i386/kernel/entry.S      2005/09/15 08:52:54     1.102
@@ -203,7 +203,7 @@
        GET_THREAD_INFO(%ebp)
 
        /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not 
testb */
-       testw 
$(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),TI_flags(%ebp)
+       testw 
$(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
        jnz syscall_trace_entry
        cmpl $(nr_syscalls), %eax
        jae syscall_badsys
@@ -226,9 +226,9 @@
        pushl %eax                      # save orig_eax
        SAVE_ALL
        GET_THREAD_INFO(%ebp)
-                                       # system call tracing in operation
+                                       # system call tracing in operation / 
emulation
        /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not 
testb */
-       testw 
$(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),TI_flags(%ebp)
+       testw 
$(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
        jnz syscall_trace_entry
        cmpl $(nr_syscalls), %eax
        jae syscall_badsys
@@ -319,7 +319,7 @@
                                        # vm86-space
        xorl %edx, %edx
        call do_notify_resume
-       jmp restore_all
+       jmp resume_userspace
 
        ALIGN
 work_notifysig_v86:
@@ -329,7 +329,7 @@
        movl %eax, %esp
        xorl %edx, %edx
        call do_notify_resume
-       jmp restore_all
+       jmp resume_userspace
 
        # perform syscall exit tracing
        ALIGN
@@ -338,6 +338,9 @@
        movl %esp, %eax
        xorl %edx,%edx
        call do_syscall_trace
+       cmpl $0, %eax
+       jne resume_userspace            # ret != 0 -> running under 
PTRACE_SYSEMU,
+                                       # so must skip actual syscall
        movl ORIG_EAX(%esp), %eax
        cmpl $(nr_syscalls), %eax
        jnae syscall_call
@@ -504,7 +507,7 @@
        pushl $__KERNEL_CS;                     \
        pushl $sysenter_past_esp
 
-ENTRY(debug)
+KPROBE_ENTRY(debug)
        cmpl $sysenter_entry,(%esp)
        jne debug_stack_correct
        FIX_STACK(12, debug_stack_correct, debug_esp_fix_insn)
@@ -515,7 +518,7 @@
        movl %esp,%eax                  # pt_regs pointer
        call do_debug
        jmp ret_from_exception
-
+       .previous .text
 /*
  * NMI is doubly nasty. It can happen _while_ we're handling
  * a debug fault, and the debug fault hasn't yet been able to
@@ -588,13 +591,14 @@
        .long 1b,iret_exc
 .previous
 
-ENTRY(int3)
+KPROBE_ENTRY(int3)
        pushl $-1                       # mark this as an int
        SAVE_ALL
        xorl %edx,%edx          # zero error code
        movl %esp,%eax          # pt_regs pointer
        call do_int3
        jmp ret_from_exception
+       .previous .text
 
 ENTRY(overflow)
        pushl $0
@@ -628,17 +632,19 @@
        pushl $do_stack_segment
        jmp error_code
 
-ENTRY(general_protection)
+KPROBE_ENTRY(general_protection)
        pushl $do_general_protection
        jmp error_code
+       .previous .text
 
 ENTRY(alignment_check)
        pushl $do_alignment_check
        jmp error_code
 
-ENTRY(page_fault)
+KPROBE_ENTRY(page_fault)
        pushl $do_page_fault
        jmp error_code
+       .previous .text
 
 #ifdef CONFIG_X86_MCE
 ENTRY(machine_check)
diff -urN linux/arch/i386/kernel/head.S linux/arch/i386/kernel/head.S
--- linux/arch/i386/kernel/head.S       2005/07/11 20:46:07     1.53
+++ linux/arch/i386/kernel/head.S       2005/09/15 08:52:54     1.54
@@ -17,7 +17,7 @@
 #include <asm/desc.h>
 #include <asm/cache.h>
 #include <asm/thread_info.h>
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 #include <asm/setup.h>
 
 /*
@@ -77,6 +77,32 @@
        subl %edi,%ecx
        shrl $2,%ecx
        rep ; stosl
+/*
+ * Copy bootup parameters out of the way.
+ * Note: %esi still has the pointer to the real-mode data.
+ * With the kexec as boot loader, parameter segment might be loaded beyond
+ * kernel image and might not even be addressable by early boot page tables.
+ * (kexec on panic case). Hence copy out the parameters before initializing
+ * page tables.
+ */
+       movl $(boot_params - __PAGE_OFFSET),%edi
+       movl $(PARAM_SIZE/4),%ecx
+       cld
+       rep
+       movsl
+       movl boot_params - __PAGE_OFFSET + NEW_CL_POINTER,%esi
+       andl %esi,%esi
+       jnz 2f                  # New command line protocol
+       cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR
+       jne 1f
+       movzwl OLD_CL_OFFSET,%esi
+       addl $(OLD_CL_BASE_ADDR),%esi
+2:
+       movl $(saved_command_line - __PAGE_OFFSET),%edi
+       movl $(COMMAND_LINE_SIZE/4),%ecx
+       rep
+       movsl
+1:
 
 /*
  * Initialize page tables.  This creates a PDE and a set of page
@@ -214,28 +240,6 @@
  */
        call setup_idt
 
-/*
- * Copy bootup parameters out of the way.
- * Note: %esi still has the pointer to the real-mode data.
- */
-       movl $boot_params,%edi
-       movl $(PARAM_SIZE/4),%ecx
-       cld
-       rep
-       movsl
-       movl boot_params+NEW_CL_POINTER,%esi
-       andl %esi,%esi
-       jnz 2f                  # New command line protocol
-       cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR
-       jne 1f
-       movzwl OLD_CL_OFFSET,%esi
-       addl $(OLD_CL_BASE_ADDR),%esi
-2:
-       movl $saved_command_line,%edi
-       movl $(COMMAND_LINE_SIZE/4),%ecx
-       rep
-       movsl
-1:
 checkCPUtype:
 
        movl $-1,X86_CPUID              #  -1 for no CPUID initially
diff -urN linux/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c
--- linux/arch/i386/kernel/io_apic.c    2005/07/12 09:19:00     1.92
+++ linux/arch/i386/kernel/io_apic.c    2005/09/15 08:52:54     1.93
@@ -33,6 +33,7 @@
 #include <linux/acpi.h>
 #include <linux/module.h>
 #include <linux/sysdev.h>
+
 #include <asm/io.h>
 #include <asm/smp.h>
 #include <asm/desc.h>
@@ -59,6 +60,8 @@
  */
 int nr_ioapic_registers[MAX_IO_APICS];
 
+int disable_timer_pin_1 __initdata;
+
 /*
  * Rough estimation of how many shared IRQs there are, can
  * be changed anytime.
@@ -77,7 +80,7 @@
        int apic, pin, next;
 } irq_2_pin[PIN_MAP_SIZE];
 
-int vector_irq[NR_VECTORS] = { [0 ... NR_VECTORS - 1] = -1};
+int vector_irq[NR_VECTORS] __read_mostly = { [0 ... NR_VECTORS - 1] = -1};
 #ifdef CONFIG_PCI_MSI
 #define vector_to_irq(vector)  \
        (platform_legacy_irq(vector) ? vector : vector_irq[vector])
@@ -222,13 +225,21 @@
                        clear_IO_APIC_pin(apic, pin);
 }
 
+#ifdef CONFIG_SMP
 static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
 {
        unsigned long flags;
        int pin;
        struct irq_pin_list *entry = irq_2_pin + irq;
        unsigned int apicid_value;
+       cpumask_t tmp;
        
+       cpus_and(tmp, cpumask, cpu_online_map);
+       if (cpus_empty(tmp))
+               tmp = TARGET_CPUS;
+
+       cpus_and(cpumask, tmp, CPU_MASK_ALL);
+
        apicid_value = cpu_mask_to_apicid(cpumask);
        /* Prepare to do the io_apic_write */
        apicid_value = apicid_value << 24;
@@ -242,6 +253,7 @@
                        break;
                entry = irq_2_pin + entry->next;
        }
+       set_irq_info(irq, cpumask);
        spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
@@ -259,7 +271,6 @@
 #  define Dprintk(x...) 
 # endif
 
-cpumask_t __cacheline_aligned pending_irq_balance_cpumask[NR_IRQS];
 
 #define IRQBALANCE_CHECK_ARCH -999
 static int irqbalance_disabled = IRQBALANCE_CHECK_ARCH;
@@ -328,12 +339,7 @@
        cpus_and(allowed_mask, cpu_online_map, irq_affinity[irq]);
        new_cpu = move(cpu, allowed_mask, now, 1);
        if (cpu != new_cpu) {
-               irq_desc_t *desc = irq_desc + irq;
-               unsigned long flags;
-
-               spin_lock_irqsave(&desc->lock, flags);
-               pending_irq_balance_cpumask[irq] = cpumask_of_cpu(new_cpu);
-               spin_unlock_irqrestore(&desc->lock, flags);
+               set_pending_irq(irq, cpumask_of_cpu(new_cpu));
        }
 }
 
@@ -528,16 +534,12 @@
        cpus_and(tmp, target_cpu_mask, allowed_mask);
 
        if (!cpus_empty(tmp)) {
-               irq_desc_t *desc = irq_desc + selected_irq;
-               unsigned long flags;
 
                Dprintk("irq = %d moved to cpu = %d\n",
                                selected_irq, min_loaded);
                /* mark for change destination */
-               spin_lock_irqsave(&desc->lock, flags);
-               pending_irq_balance_cpumask[selected_irq] =
-                                       cpumask_of_cpu(min_loaded);
-               spin_unlock_irqrestore(&desc->lock, flags);
+               set_pending_irq(selected_irq, cpumask_of_cpu(min_loaded));
+
                /* Since we made a change, come back sooner to 
                 * check for more variation.
                 */
@@ -568,12 +570,12 @@
        
        /* push everything to CPU 0 to give us a starting point.  */
        for (i = 0 ; i < NR_IRQS ; i++) {
-               pending_irq_balance_cpumask[i] = cpumask_of_cpu(0);
+               pending_irq_cpumask[i] = cpumask_of_cpu(0);
+               set_pending_irq(i, cpumask_of_cpu(0));
        }
 
        for ( ; ; ) {
-               set_current_state(TASK_INTERRUPTIBLE);
-               time_remaining = schedule_timeout(time_remaining);
+               time_remaining = schedule_timeout_interruptible(time_remaining);
                try_to_freeze();
                if (time_after(jiffies,
                                prev_balance_time+balanced_irq_interval)) {
@@ -647,20 +649,9 @@
 
 __setup("noirqbalance", irqbalance_disable);
 
-static inline void move_irq(int irq)
-{
-       /* note - we hold the desc->lock */
-       if (unlikely(!cpus_empty(pending_irq_balance_cpumask[irq]))) {
-               set_ioapic_affinity_irq(irq, pending_irq_balance_cpumask[irq]);
-               cpus_clear(pending_irq_balance_cpumask[irq]);
-       }
-}
-
 late_initcall(balanced_irq_init);
-
-#else /* !CONFIG_IRQBALANCE */
-static inline void move_irq(int irq) { }
 #endif /* CONFIG_IRQBALANCE */
+#endif /* CONFIG_SMP */
 
 #ifndef CONFIG_SMP
 void fastcall send_IPI_self(int vector)
@@ -820,6 +811,7 @@
  * we need to reprogram the ioredtbls to cater for the cpus which have come 
online
  * so mask in all cases should simply be TARGET_CPUS
  */
+#ifdef CONFIG_SMP
 void __init setup_ioapic_dest(void)
 {
        int pin, ioapic, irq, irq_entry;
@@ -838,6 +830,7 @@
 
        }
 }
+#endif
 
 /*
  * EISA Edge/Level control register, ELCR
@@ -1127,7 +1120,7 @@
 }
 
 /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
-u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
+u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 };
 
 int assign_irq_vector(int irq)
 {
@@ -1249,6 +1242,7 @@
                spin_lock_irqsave(&ioapic_lock, flags);
                io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1));
                io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0));
+               set_native_irq_info(irq, TARGET_CPUS);
                spin_unlock_irqrestore(&ioapic_lock, flags);
        }
        }
@@ -1641,9 +1635,9 @@
        clear_IO_APIC();
 
        /*
-        * If the i82559 is routed through an IOAPIC
+        * If the i8259 is routed through an IOAPIC
         * Put that IOAPIC in virtual wire mode
-        * so legacy interrups can be delivered.
+        * so legacy interrupts can be delivered.
         */
        pin = find_isa_irq_pin(0, mp_ExtINT);
        if (pin != -1) {
@@ -1944,6 +1938,7 @@
 {
        int irq = vector_to_irq(vector);
 
+       move_irq(vector);
        ack_edge_ioapic_irq(irq);
 }
 
@@ -1958,6 +1953,7 @@
 {
        int irq = vector_to_irq(vector);
 
+       move_irq(vector);
        end_level_ioapic_irq(irq);
 }
 
@@ -1975,14 +1971,17 @@
        unmask_IO_APIC_irq(irq);
 }
 
+#ifdef CONFIG_SMP
 static void set_ioapic_affinity_vector (unsigned int vector,
                                        cpumask_t cpu_mask)
 {
        int irq = vector_to_irq(vector);
 
+       set_native_irq_info(vector, cpu_mask);
        set_ioapic_affinity_irq(irq, cpu_mask);
 }
 #endif
+#endif
 
 /*
  * Level and edge triggered IO-APIC interrupts need different handling,
@@ -1992,7 +1991,7 @@
  * edge-triggered handler, without risking IRQ storms and other ugly
  * races.
  */
-static struct hw_interrupt_type ioapic_edge_type = {
+static struct hw_interrupt_type ioapic_edge_type __read_mostly = {
        .typename       = "IO-APIC-edge",
        .startup        = startup_edge_ioapic,
        .shutdown       = shutdown_edge_ioapic,
@@ -2000,10 +1999,12 @@
        .disable        = disable_edge_ioapic,
        .ack            = ack_edge_ioapic,
        .end            = end_edge_ioapic,
+#ifdef CONFIG_SMP
        .set_affinity   = set_ioapic_affinity,
+#endif
 };
 
-static struct hw_interrupt_type ioapic_level_type = {
+static struct hw_interrupt_type ioapic_level_type __read_mostly = {
        .typename       = "IO-APIC-level",
        .startup        = startup_level_ioapic,
        .shutdown       = shutdown_level_ioapic,
@@ -2011,7 +2012,9 @@
        .disable        = disable_level_ioapic,
        .ack            = mask_and_ack_level_ioapic,
        .end            = end_level_ioapic,
+#ifdef CONFIG_SMP
        .set_affinity   = set_ioapic_affinity,
+#endif
 };
 
 static inline void init_IO_APIC_traps(void)
@@ -2074,7 +2077,7 @@
 
 static void end_lapic_irq (unsigned int i) { /* nothing */ }
 
-static struct hw_interrupt_type lapic_irq_type = {
+static struct hw_interrupt_type lapic_irq_type __read_mostly = {
        .typename       = "local-APIC-edge",
        .startup        = NULL, /* startup_irq() not used for IRQ0 */
        .shutdown       = NULL, /* shutdown_irq() not used for IRQ0 */
@@ -2210,6 +2213,8 @@
                                setup_nmi();
                                enable_8259A_irq(0);
                        }
+                       if (disable_timer_pin_1 > 0)
+                               clear_IO_APIC_pin(0, pin1);
                        return;
                }
                clear_IO_APIC_pin(0, pin1);
@@ -2421,7 +2426,7 @@
                           ACPI-based IOAPIC Configuration
    -------------------------------------------------------------------------- 
*/
 
-#ifdef CONFIG_ACPI_BOOT
+#ifdef CONFIG_ACPI
 
 int __init io_apic_get_unique_id (int ioapic, int apic_id)
 {
@@ -2569,9 +2574,10 @@
        spin_lock_irqsave(&ioapic_lock, flags);
        io_apic_write(ioapic, 0x11+2*pin, *(((int *)&entry)+1));
        io_apic_write(ioapic, 0x10+2*pin, *(((int *)&entry)+0));
+       set_native_irq_info(use_pci_vector() ? entry.vector : irq, TARGET_CPUS);
        spin_unlock_irqrestore(&ioapic_lock, flags);
 
        return 0;
 }
 
-#endif /*CONFIG_ACPI_BOOT*/
+#endif /* CONFIG_ACPI */
diff -urN linux/arch/i386/kernel/ioport.c linux/arch/i386/kernel/ioport.c
--- linux/arch/i386/kernel/ioport.c     2004/10/12 01:45:40     1.17
+++ linux/arch/i386/kernel/ioport.c     2005/09/15 08:52:54     1.18
@@ -132,6 +132,7 @@
        volatile struct pt_regs * regs = (struct pt_regs *) &unused;
        unsigned int level = regs->ebx;
        unsigned int old = (regs->eflags >> 12) & 3;
+       struct thread_struct *t = &current->thread;
 
        if (level > 3)
                return -EINVAL;
@@ -140,8 +141,8 @@
                if (!capable(CAP_SYS_RAWIO))
                        return -EPERM;
        }
-       regs->eflags = (regs->eflags &~ 0x3000UL) | (level << 12);
-       /* Make sure we return the long way (not sysenter) */
-       set_thread_flag(TIF_IRET);
+       t->iopl = level << 12;
+       regs->eflags = (regs->eflags & ~X86_EFLAGS_IOPL) | t->iopl;
+       set_iopl_mask(t->iopl);
        return 0;
 }
diff -urN linux/arch/i386/kernel/kprobes.c linux/arch/i386/kernel/kprobes.c
--- linux/arch/i386/kernel/kprobes.c    2005/07/12 09:19:00     1.10
+++ linux/arch/i386/kernel/kprobes.c    2005/09/15 08:52:54     1.11
@@ -62,32 +62,32 @@
        return 0;
 }
 
-int arch_prepare_kprobe(struct kprobe *p)
+int __kprobes arch_prepare_kprobe(struct kprobe *p)
 {
        return 0;
 }
 
-void arch_copy_kprobe(struct kprobe *p)
+void __kprobes arch_copy_kprobe(struct kprobe *p)
 {
        memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
        p->opcode = *p->addr;
 }
 
-void arch_arm_kprobe(struct kprobe *p)
+void __kprobes arch_arm_kprobe(struct kprobe *p)
 {
        *p->addr = BREAKPOINT_INSTRUCTION;
        flush_icache_range((unsigned long) p->addr,
                           (unsigned long) p->addr + sizeof(kprobe_opcode_t));
 }
 
-void arch_disarm_kprobe(struct kprobe *p)
+void __kprobes arch_disarm_kprobe(struct kprobe *p)
 {
        *p->addr = p->opcode;
        flush_icache_range((unsigned long) p->addr,
                           (unsigned long) p->addr + sizeof(kprobe_opcode_t));
 }
 
-void arch_remove_kprobe(struct kprobe *p)
+void __kprobes arch_remove_kprobe(struct kprobe *p)
 {
 }
 
@@ -127,7 +127,8 @@
                regs->eip = (unsigned long)&p->ainsn.insn;
 }
 
-void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs)
+void __kprobes arch_prepare_kretprobe(struct kretprobe *rp,
+                                     struct pt_regs *regs)
 {
        unsigned long *sara = (unsigned long *)&regs->esp;
         struct kretprobe_instance *ri;
@@ -150,7 +151,7 @@
  * Interrupts are disabled on entry as trap3 is an interrupt gate and they
  * remain disabled thorough out this function.
  */
-static int kprobe_handler(struct pt_regs *regs)
+static int __kprobes kprobe_handler(struct pt_regs *regs)
 {
        struct kprobe *p;
        int ret = 0;
@@ -176,7 +177,8 @@
                   Disarm the probe we just hit, and ignore it. */
                p = get_kprobe(addr);
                if (p) {
-                       if (kprobe_status == KPROBE_HIT_SS) {
+                       if (kprobe_status == KPROBE_HIT_SS &&
+                               *p->ainsn.insn == BREAKPOINT_INSTRUCTION) {
                                regs->eflags &= ~TF_MASK;
                                regs->eflags |= kprobe_saved_eflags;
                                unlock_kprobes();
@@ -220,7 +222,10 @@
                         * either a probepoint or a debugger breakpoint
                         * at this address.  In either case, no further
                         * handling of this interrupt is appropriate.
+                        * Back up over the (now missing) int3 and run
+                        * the original instruction.
                         */
+                       regs->eip -= sizeof(kprobe_opcode_t);
                        ret = 1;
                }
                /* Not one of ours: let kernel handle it */
@@ -259,7 +264,7 @@
 /*
  * Called when we hit the probe point at kretprobe_trampoline
  */
-int trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
+int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
 {
         struct kretprobe_instance *ri = NULL;
         struct hlist_head *head;
@@ -338,7 +343,7 @@
  * that is atop the stack is the address following the copied instruction.
  * We need to make it the address following the original instruction.
  */
-static void resume_execution(struct kprobe *p, struct pt_regs *regs)
+static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs)
 {
        unsigned long *tos = (unsigned long *)&regs->esp;
        unsigned long next_eip = 0;
@@ -444,8 +449,8 @@
 /*
  * Wrapper routine to for handling exceptions.
  */
-int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val,
-                            void *data)
+int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
+                                      unsigned long val, void *data)
 {
        struct die_args *args = (struct die_args *)data;
        switch (val) {
@@ -473,7 +478,7 @@
        return NOTIFY_DONE;
 }
 
-int setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
+int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
 {
        struct jprobe *jp = container_of(p, struct jprobe, kp);
        unsigned long addr;
@@ -495,7 +500,7 @@
        return 1;
 }
 
-void jprobe_return(void)
+void __kprobes jprobe_return(void)
 {
        preempt_enable_no_resched();
        asm volatile ("       xchgl   %%ebx,%%esp     \n"
@@ -506,7 +511,7 @@
                      (jprobe_saved_esp):"memory");
 }
 
-int longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
+int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
 {
        u8 *addr = (u8 *) (regs->eip - 1);
        unsigned long stack_addr = (unsigned long)jprobe_saved_esp;
diff -urN linux/arch/i386/kernel/ldt.c linux/arch/i386/kernel/ldt.c
--- linux/arch/i386/kernel/ldt.c        2004/09/19 12:30:03     1.24
+++ linux/arch/i386/kernel/ldt.c        2005/09/15 08:52:54     1.25
@@ -177,7 +177,7 @@
 static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode)
 {
        struct mm_struct * mm = current->mm;
-       __u32 entry_1, entry_2, *lp;
+       __u32 entry_1, entry_2;
        int error;
        struct user_desc ldt_info;
 
@@ -205,8 +205,6 @@
                        goto out_unlock;
        }
 
-       lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) 
mm->context.ldt);
-
        /* Allow LDTs to be cleared by the user. */
        if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
                if (oldmode || LDT_empty(&ldt_info)) {
@@ -223,8 +221,7 @@
 
        /* Install the new entry ...  */
 install:
-       *lp     = entry_1;
-       *(lp+1) = entry_2;
+       write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, 
entry_2);
        error = 0;
 
 out_unlock:
diff -urN linux/arch/i386/kernel/machine_kexec.c 
linux/arch/i386/kernel/machine_kexec.c
--- linux/arch/i386/kernel/machine_kexec.c      2005/08/03 15:50:24     1.2
+++ linux/arch/i386/kernel/machine_kexec.c      2005/09/15 08:52:54     1.3
@@ -17,13 +17,7 @@
 #include <asm/apic.h>
 #include <asm/cpufeature.h>
 #include <asm/desc.h>
-
-static inline unsigned long read_cr3(void)
-{
-       unsigned long cr3;
-       asm volatile("movl %%cr3,%0": "=r"(cr3));
-       return cr3;
-}
+#include <asm/system.h>
 
 #define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE)))
 
@@ -99,10 +93,7 @@
        curidt.size    = limit;
        curidt.address = (unsigned long)newidt;
 
-       __asm__ __volatile__ (
-               "lidtl %0\n"
-               : : "m" (curidt)
-               );
+       load_idt(&curidt);
 };
 
 
@@ -114,10 +105,7 @@
        curgdt.size    = limit;
        curgdt.address = (unsigned long)newgdt;
 
-       __asm__ __volatile__ (
-               "lgdtl %0\n"
-               : : "m" (curgdt)
-               );
+       load_gdt(&curgdt);
 };
 
 static void load_segments(void)
diff -urN linux/arch/i386/kernel/microcode.c linux/arch/i386/kernel/microcode.c
--- linux/arch/i386/kernel/microcode.c  2005/01/25 04:27:55     1.41
+++ linux/arch/i386/kernel/microcode.c  2005/09/15 08:52:54     1.42
@@ -164,7 +164,8 @@
        }
 
        wrmsr(MSR_IA32_UCODE_REV, 0, 0);
-       __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
+       /* see notes above for revision 1.07.  Apparent chip bug */
+       serialize_cpu();
        /* get the current revision from MSR 0x8B */
        rdmsr(MSR_IA32_UCODE_REV, val[0], uci->rev);
        pr_debug("microcode: collect_cpu_info : sig=0x%x, pf=0x%x, rev=0x%x\n",
@@ -377,7 +378,9 @@
                (unsigned long) uci->mc->bits >> 16 >> 16);
        wrmsr(MSR_IA32_UCODE_REV, 0, 0);
 
-       __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
+       /* see notes above for revision 1.07.  Apparent chip bug */
+       serialize_cpu();
+
        /* get the current revision from MSR 0x8B */
        rdmsr(MSR_IA32_UCODE_REV, val[0], val[1]);
 
diff -urN linux/arch/i386/kernel/mpparse.c linux/arch/i386/kernel/mpparse.c
--- linux/arch/i386/kernel/mpparse.c    2005/08/03 15:50:24     1.62
+++ linux/arch/i386/kernel/mpparse.c    2005/09/15 08:52:54     1.63
@@ -65,6 +65,8 @@
 int pic_mode;
 unsigned long mp_lapic_addr;
 
+unsigned int def_to_bigsmp = 0;
+
 /* Processor that is doing the boot up */
 unsigned int boot_cpu_physical_apicid = -1U;
 /* Internal processor count */
@@ -121,7 +123,7 @@
 static void __init MP_processor_info (struct mpc_config_processor *m)
 {
        int ver, apicid;
-       physid_mask_t tmp;
+       physid_mask_t phys_cpu;
        
        if (!(m->mpc_cpuflag & CPU_ENABLED))
                return;
@@ -192,27 +194,36 @@
                        " Processor ignored.\n", maxcpus); 
                return;
        }
-       num_processors++;
        ver = m->mpc_apicver;
 
        if (!MP_valid_apicid(apicid, ver)) {
                printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n",
                        m->mpc_apicid, MAX_APICS);
-               --num_processors;
                return;
        }
 
-       tmp = apicid_to_cpu_present(apicid);
-       physids_or(phys_cpu_present_map, phys_cpu_present_map, tmp);
-       
+       cpu_set(num_processors, cpu_possible_map);
+       num_processors++;
+       phys_cpu = apicid_to_cpu_present(apicid);
+       physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu);
+
        /*
         * Validate version
         */
        if (ver == 0x0) {
-               printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! 
fixing up to 0x10. (tell your hw vendor)\n", m->mpc_apicid);
+               printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! "
+                               "fixing up to 0x10. (tell your hw vendor)\n",
+                               m->mpc_apicid);
                ver = 0x10;
        }
        apic_version[m->mpc_apicid] = ver;
+       if ((num_processors > 8) &&
+           APIC_XAPIC(ver) &&
+           (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL))
+               def_to_bigsmp = 1;
+       else
+               def_to_bigsmp = 0;
+
        bios_cpu_apicid[num_processors - 1] = m->mpc_apicid;
 }
 
@@ -653,8 +664,6 @@
        struct intel_mp_floating *mpf = mpf_found;
 
        /*
-        * ACPI may be used to obtain the entire SMP configuration or just to 
-        * enumerate/configure processors (CONFIG_ACPI_BOOT).  Note that 
         * ACPI supports both logical (e.g. Hyper-Threading) and physical 
         * processors, where MPS only supports physical.
         */
@@ -810,7 +819,7 @@
                             ACPI-based MP Configuration
    -------------------------------------------------------------------------- 
*/
 
-#ifdef CONFIG_ACPI_BOOT
+#ifdef CONFIG_ACPI
 
 void __init mp_register_lapic_address (
        u64                     address)
@@ -856,7 +865,7 @@
        MP_processor_info(&processor);
 }
 
-#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || 
defined(CONFIG_ACPI_BOOT))
+#ifdef CONFIG_X86_IO_APIC
 
 #define MP_ISA_BUS             0
 #define MP_MAX_IOAPIC_PIN      127
@@ -1071,11 +1080,9 @@
         */
        static int              gsi_to_irq[MAX_GSI_NUM];
 
-#ifdef CONFIG_ACPI_BUS
        /* Don't set up the ACPI SCI because it's already set up */
        if (acpi_fadt.sci_int == gsi)
                return gsi;
-#endif
 
        ioapic = mp_find_ioapic(gsi);
        if (ioapic < 0) {
@@ -1118,13 +1125,11 @@
                if (gsi < MAX_GSI_NUM) {
                        if (gsi > 15)
                                gsi = pci_irq++;
-#ifdef CONFIG_ACPI_BUS
                        /*
                         * Don't assign IRQ used by ACPI SCI
                         */
                        if (gsi == acpi_fadt.sci_int)
                                gsi = pci_irq++;
-#endif
                        gsi_to_irq[irq] = gsi;
                } else {
                        printk(KERN_ERR "GSI %u is too high\n", gsi);
@@ -1138,5 +1143,5 @@
        return gsi;
 }
 
-#endif /*CONFIG_X86_IO_APIC && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)*/
-#endif /*CONFIG_ACPI_BOOT*/
+#endif /* CONFIG_X86_IO_APIC */
+#endif /* CONFIG_ACPI */
diff -urN linux/arch/i386/kernel/msr.c linux/arch/i386/kernel/msr.c
--- linux/arch/i386/kernel/msr.c        2005/07/11 20:46:08     1.21
+++ linux/arch/i386/kernel/msr.c        2005/09/15 08:52:54     1.22
@@ -46,23 +46,13 @@
 
 static struct class *msr_class;
 
-/* Note: "err" is handled in a funny way below.  Otherwise one version
-   of gcc or another breaks. */
-
 static inline int wrmsr_eio(u32 reg, u32 eax, u32 edx)
 {
        int err;
 
-       asm volatile ("1:       wrmsr\n"
-                     "2:\n"
-                     ".section .fixup,\"ax\"\n"
-                     "3:       movl %4,%0\n"
-                     " jmp 2b\n"
-                     ".previous\n"
-                     ".section __ex_table,\"a\"\n"
-                     " .align 4\n" "   .long 1b,3b\n" ".previous":"=&bDS" (err)
-                     :"a"(eax), "d"(edx), "c"(reg), "i"(-EIO), "0"(0));
-
+       err = wrmsr_safe(reg, eax, edx);
+       if (err)
+               err = -EIO;
        return err;
 }
 
@@ -70,18 +60,9 @@
 {
        int err;
 
-       asm volatile ("1:       rdmsr\n"
-                     "2:\n"
-                     ".section .fixup,\"ax\"\n"
-                     "3:       movl %4,%0\n"
-                     " jmp 2b\n"
-                     ".previous\n"
-                     ".section __ex_table,\"a\"\n"
-                     " .align 4\n"
-                     " .long 1b,3b\n"
-                     ".previous":"=&bDS" (err), "=a"(*eax), "=d"(*edx)
-                     :"c"(reg), "i"(-EIO), "0"(0));
-
+       err = rdmsr_safe(reg, eax, edx);
+       if (err)
+               err = -EIO;
        return err;
 }
 
diff -urN linux/arch/i386/kernel/nmi.c linux/arch/i386/kernel/nmi.c
--- linux/arch/i386/kernel/nmi.c        2005/08/24 16:22:49     1.31
+++ linux/arch/i386/kernel/nmi.c        2005/09/15 08:52:54     1.32
@@ -478,6 +478,11 @@
         */
        for (i = 0; i < NR_CPUS; i++)
                alert_counter[i] = 0;
+
+       /*
+        * Tickle the softlockup detector too:
+        */
+       touch_softlockup_watchdog();
 }
 
 extern void die_nmi(struct pt_regs *, const char *msg);
@@ -501,8 +506,11 @@
                 */
                alert_counter[cpu]++;
                if (alert_counter[cpu] == 5*nmi_hz)
+                       /*
+                        * die_nmi will return ONLY if NOTIFY_STOP happens..
+                        */
                        die_nmi(regs, "NMI Watchdog detected LOCKUP");
-       } else {
+
                last_irq_sums[cpu] = sum;
                alert_counter[cpu] = 0;
        }
diff -urN linux/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
--- linux/arch/i386/kernel/process.c    2005/08/01 18:23:44     1.101
+++ linux/arch/i386/kernel/process.c    2005/09/15 08:52:54     1.102
@@ -164,7 +164,7 @@
         */
        local_irq_disable();
        while (1)
-               __asm__ __volatile__("hlt":::"memory");
+               halt();
 }
 #else
 static inline void play_dead(void)
@@ -313,16 +313,12 @@
        printk(" DS: %04x ES: %04x\n",
                0xffff & regs->xds,0xffff & regs->xes);
 
-       __asm__("movl %%cr0, %0": "=r" (cr0));
-       __asm__("movl %%cr2, %0": "=r" (cr2));
-       __asm__("movl %%cr3, %0": "=r" (cr3));
-       /* This could fault if %cr4 does not exist */
-       __asm__("1: movl %%cr4, %0              \n"
-               "2:                             \n"
-               ".section __ex_table,\"a\"      \n"
-               ".long 1b,2b                    \n"
-               ".previous                      \n"
-               : "=r" (cr4): "0" (0));
+       cr0 = read_cr0();
+       cr2 = read_cr2();
+       cr3 = read_cr3();
+       if (current_cpu_data.x86 > 4) {
+               cr4 = read_cr4();
+       }
        printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, 
cr4);
        show_trace(NULL, &regs->esp);
 }
@@ -682,21 +678,26 @@
        __unlazy_fpu(prev_p);
 
        /*
-        * Reload esp0, LDT and the page table pointer:
+        * Reload esp0.
         */
        load_esp0(tss, next);
 
        /*
-        * Load the per-thread Thread-Local Storage descriptor.
+        * Save away %fs and %gs. No need to save %es and %ds, as
+        * those are always kernel segments while inside the kernel.
+        * Doing this before setting the new TLS descriptors avoids
+        * the situation where we temporarily have non-reloadable
+        * segments in %fs and %gs.  This could be an issue if the
+        * NMI handler ever used %fs or %gs (it does not today), or
+        * if the kernel is running inside of a hypervisor layer.
         */
-       load_TLS(next, cpu);
+       savesegment(fs, prev->fs);
+       savesegment(gs, prev->gs);
 
        /*
-        * Save away %fs and %gs. No need to save %es and %ds, as
-        * those are always kernel segments while inside the kernel.
+        * Load the per-thread Thread-Local Storage descriptor.
         */
-       asm volatile("mov %%fs,%0":"=m" (prev->fs));
-       asm volatile("mov %%gs,%0":"=m" (prev->gs));
+       load_TLS(next, cpu);
 
        /*
         * Restore %fs and %gs if needed.
@@ -711,6 +712,12 @@
                loadsegment(gs, next->gs);
 
        /*
+        * Restore IOPL if needed.
+        */
+       if (unlikely(prev->iopl != next->iopl))
+               set_iopl_mask(next->iopl);
+
+       /*
         * Now maybe reload the debug registers
         */
        if (unlikely(next->debugreg[7])) {
diff -urN linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
--- linux/arch/i386/kernel/ptrace.c     2005/07/11 20:46:08     1.51
+++ linux/arch/i386/kernel/ptrace.c     2005/09/15 08:52:54     1.52
@@ -271,6 +271,8 @@
 void ptrace_disable(struct task_struct *child)
 { 
        clear_singlestep(child);
+       clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+       clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
 }
 
 /*
@@ -509,15 +511,20 @@
                  }
                  break;
 
+       case PTRACE_SYSEMU: /* continue and stop at next syscall, which will 
not be executed */
        case PTRACE_SYSCALL:    /* continue and stop at next (return from) 
syscall */
        case PTRACE_CONT:       /* restart after signal. */
                ret = -EIO;
                if (!valid_signal(data))
                        break;
-               if (request == PTRACE_SYSCALL) {
+               if (request == PTRACE_SYSEMU) {
+                       set_tsk_thread_flag(child, TIF_SYSCALL_EMU);
+                       clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+               } else if (request == PTRACE_SYSCALL) {
                        set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
-               }
-               else {
+                       clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
+               } else {
+                       clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
                        clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
                }
                child->exit_code = data;
@@ -542,10 +549,17 @@
                wake_up_process(child);
                break;
 
+       case PTRACE_SYSEMU_SINGLESTEP: /* Same as SYSEMU, but singlestep if not 
syscall */
        case PTRACE_SINGLESTEP: /* set the trap flag. */
                ret = -EIO;
                if (!valid_signal(data))
                        break;
+
+               if (request == PTRACE_SYSEMU_SINGLESTEP)
+                       set_tsk_thread_flag(child, TIF_SYSCALL_EMU);
+               else
+                       clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
+
                clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
                set_singlestep(child);
                child->exit_code = data;
@@ -678,27 +692,58 @@
  * - triggered by current->work.syscall_trace
  */
 __attribute__((regparm(3)))
-void do_syscall_trace(struct pt_regs *regs, int entryexit)
+int do_syscall_trace(struct pt_regs *regs, int entryexit)
 {
+       int is_sysemu = test_thread_flag(TIF_SYSCALL_EMU);
+       /*
+        * With TIF_SYSCALL_EMU set we want to ignore TIF_SINGLESTEP for syscall
+        * interception
+        */
+       int is_singlestep = !is_sysemu && test_thread_flag(TIF_SINGLESTEP);
+       int ret = 0;
+
        /* do the secure computing check first */
-       secure_computing(regs->orig_eax);
+       if (!entryexit)
+               secure_computing(regs->orig_eax);
 
-       if (unlikely(current->audit_context) && entryexit)
-               audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), 
regs->eax);
+       if (unlikely(current->audit_context)) {
+               if (entryexit)
+                       audit_syscall_exit(current, AUDITSC_RESULT(regs->eax),
+                                               regs->eax);
+               /* Debug traps, when using PTRACE_SINGLESTEP, must be sent only
+                * on the syscall exit path. Normally, when TIF_SYSCALL_AUDIT is
+                * not used, entry.S will call us only on syscall exit, not
+                * entry; so when TIF_SYSCALL_AUDIT is used we must avoid
+                * calling send_sigtrap() on syscall entry.
+                *
+                * Note that when PTRACE_SYSEMU_SINGLESTEP is used,
+                * is_singlestep is false, despite his name, so we will still do
+                * the correct thing.
+                */
+               else if (is_singlestep)
+                       goto out;
+       }
 
        if (!(current->ptrace & PT_PTRACED))
                goto out;
 
+       /* If a process stops on the 1st tracepoint with SYSCALL_TRACE
+        * and then is resumed with SYSEMU_SINGLESTEP, it will come in
+        * here. We have to check this and return */
+       if (is_sysemu && entryexit)
+               return 0;
+
        /* Fake a debug trap */
-       if (test_thread_flag(TIF_SINGLESTEP))
+       if (is_singlestep)
                send_sigtrap(current, regs, 0);
 
-       if (!test_thread_flag(TIF_SYSCALL_TRACE))
+       if (!test_thread_flag(TIF_SYSCALL_TRACE) && !is_sysemu)
                goto out;
 
        /* the 0x80 provides a way for the tracing parent to distinguish
           between a syscall stop and SIGTRAP delivery */
-       ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 
0));
+       /* Note that the debugger could change the result of test_thread_flag!*/
+       ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80:0));
 
        /*
         * this isn't the same as continuing with a signal, but it will do
@@ -709,9 +754,17 @@
                send_sig(current->exit_code, current, 1);
                current->exit_code = 0;
        }
- out:
+       ret = is_sysemu;
+out:
        if (unlikely(current->audit_context) && !entryexit)
                audit_syscall_entry(current, AUDIT_ARCH_I386, regs->orig_eax,
                                    regs->ebx, regs->ecx, regs->edx, regs->esi);
+       if (ret == 0)
+               return 0;
 
+       regs->orig_eax = -1; /* force skip of syscall restarting */
+       if (unlikely(current->audit_context))
+               audit_syscall_exit(current, AUDITSC_RESULT(regs->eax),
+                               regs->eax);
+       return 1;
 }
diff -urN linux/arch/i386/kernel/reboot.c linux/arch/i386/kernel/reboot.c
--- linux/arch/i386/kernel/reboot.c     2005/08/01 18:23:44     1.15
+++ linux/arch/i386/kernel/reboot.c     2005/09/15 08:52:54     1.16
@@ -13,6 +13,7 @@
 #include <linux/dmi.h>
 #include <asm/uaccess.h>
 #include <asm/apic.h>
+#include <asm/desc.h>
 #include "mach_reboot.h"
 #include <linux/reboot_fixups.h>
 
@@ -242,13 +243,13 @@
 
        /* Set up the IDT for real mode. */
 
-       __asm__ __volatile__ ("lidt %0" : : "m" (real_mode_idt));
+       load_idt(&real_mode_idt);
 
        /* Set up a GDT from which we can load segment descriptors for real
           mode.  The GDT is not used in real mode; it is just needed here to
           prepare the descriptors. */
 
-       __asm__ __volatile__ ("lgdt %0" : : "m" (real_mode_gdt));
+       load_gdt(&real_mode_gdt);
 
        /* Load the data segment registers, and thus the descriptors ready for
           real mode.  The base address of each segment is 0x100, 16 times the
@@ -316,7 +317,7 @@
        if (!reboot_thru_bios) {
                if (efi_enabled) {
                        efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL);
-                       __asm__ __volatile__("lidt %0": :"m" (no_idt));
+                       load_idt(&no_idt);
                        __asm__ __volatile__("int3");
                }
                /* rebooting needs to touch the page at absolute addr 0 */
@@ -325,7 +326,7 @@
                        mach_reboot_fixups(); /* for board specific fixups */
                        mach_reboot();
                        /* That didn't work - force a triple fault.. */
-                       __asm__ __volatile__("lidt %0": :"m" (no_idt));
+                       load_idt(&no_idt);
                        __asm__ __volatile__("int3");
                }
        }
diff -urN linux/arch/i386/kernel/semaphore.c linux/arch/i386/kernel/semaphore.c
--- linux/arch/i386/kernel/semaphore.c  2005/03/18 17:36:48     1.15
+++ linux/arch/i386/kernel/semaphore.c  2005/09/15 08:52:54     1.16
@@ -13,171 +13,9 @@
  * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org>
  */
 #include <linux/config.h>
-#include <linux/sched.h>
-#include <linux/err.h>
-#include <linux/init.h>
 #include <asm/semaphore.h>
 
 /*
- * Semaphores are implemented using a two-way counter:
- * The "count" variable is decremented for each process
- * that tries to acquire the semaphore, while the "sleeping"
- * variable is a count of such acquires.
- *
- * Notably, the inline "up()" and "down()" functions can
- * efficiently test if they need to do any extra work (up
- * needs to do something only if count was negative before
- * the increment operation.
- *
- * "sleeping" and the contention routine ordering is protected
- * by the spinlock in the semaphore's waitqueue head.
- *
- * Note that these functions are only called when there is
- * contention on the lock, and as such all this is the
- * "non-critical" part of the whole semaphore business. The
- * critical part is the inline stuff in <asm/semaphore.h>
- * where we want to avoid any extra jumps and calls.
- */
-
-/*
- * Logic:
- *  - only on a boundary condition do we need to care. When we go
- *    from a negative count to a non-negative, we wake people up.
- *  - when we go from a non-negative count to a negative do we
- *    (a) synchronize with the "sleeper" count and (b) make sure
- *    that we're on the wakeup list before we synchronize so that
- *    we cannot lose wakeup events.
- */
-
-static fastcall void __attribute_used__  __up(struct semaphore *sem)
-{
-       wake_up(&sem->wait);
-}
-
-static fastcall void __attribute_used__ __sched __down(struct semaphore * sem)
-{
-       struct task_struct *tsk = current;
-       DECLARE_WAITQUEUE(wait, tsk);
-       unsigned long flags;
-
-       tsk->state = TASK_UNINTERRUPTIBLE;
-       spin_lock_irqsave(&sem->wait.lock, flags);
-       add_wait_queue_exclusive_locked(&sem->wait, &wait);
-
-       sem->sleepers++;
-       for (;;) {
-               int sleepers = sem->sleepers;
-
-               /*
-                * Add "everybody else" into it. They aren't
-                * playing, because we own the spinlock in
-                * the wait_queue_head.
-                */
-               if (!atomic_add_negative(sleepers - 1, &sem->count)) {
-                       sem->sleepers = 0;
-                       break;
-               }
-               sem->sleepers = 1;      /* us - see -1 above */
-               spin_unlock_irqrestore(&sem->wait.lock, flags);
-
-               schedule();
-
-               spin_lock_irqsave(&sem->wait.lock, flags);
-               tsk->state = TASK_UNINTERRUPTIBLE;
-       }
-       remove_wait_queue_locked(&sem->wait, &wait);
-       wake_up_locked(&sem->wait);
-       spin_unlock_irqrestore(&sem->wait.lock, flags);
-       tsk->state = TASK_RUNNING;
-}
-
-static fastcall int __attribute_used__ __sched __down_interruptible(struct 
semaphore * sem)
-{
-       int retval = 0;
-       struct task_struct *tsk = current;
-       DECLARE_WAITQUEUE(wait, tsk);
-       unsigned long flags;
-
-       tsk->state = TASK_INTERRUPTIBLE;
-       spin_lock_irqsave(&sem->wait.lock, flags);
-       add_wait_queue_exclusive_locked(&sem->wait, &wait);
-
-       sem->sleepers++;
-       for (;;) {
-               int sleepers = sem->sleepers;
-
-               /*
-                * With signals pending, this turns into
-                * the trylock failure case - we won't be
-                * sleeping, and we* can't get the lock as
-                * it has contention. Just correct the count
-                * and exit.
-                */
-               if (signal_pending(current)) {
-                       retval = -EINTR;
-                       sem->sleepers = 0;
-                       atomic_add(sleepers, &sem->count);
-                       break;
-               }
-
-               /*
-                * Add "everybody else" into it. They aren't
-                * playing, because we own the spinlock in
-                * wait_queue_head. The "-1" is because we're
-                * still hoping to get the semaphore.
-                */
-               if (!atomic_add_negative(sleepers - 1, &sem->count)) {
-                       sem->sleepers = 0;
-                       break;
-               }
-               sem->sleepers = 1;      /* us - see -1 above */
-               spin_unlock_irqrestore(&sem->wait.lock, flags);
-
-               schedule();
-
-               spin_lock_irqsave(&sem->wait.lock, flags);
-               tsk->state = TASK_INTERRUPTIBLE;
-       }
-       remove_wait_queue_locked(&sem->wait, &wait);
-       wake_up_locked(&sem->wait);
-       spin_unlock_irqrestore(&sem->wait.lock, flags);
-
-       tsk->state = TASK_RUNNING;
-       return retval;
-}
-
-/*
- * Trylock failed - make sure we correct for
- * having decremented the count.
- *
- * We could have done the trylock with a
- * single "cmpxchg" without failure cases,
- * but then it wouldn't work on a 386.
- */
-static fastcall int __attribute_used__ __down_trylock(struct semaphore * sem)
-{
-       int sleepers;
-       unsigned long flags;
-
-       spin_lock_irqsave(&sem->wait.lock, flags);
-       sleepers = sem->sleepers + 1;
-       sem->sleepers = 0;
-
-       /*
-        * Add "everybody else" and us into it. They aren't
-        * playing, because we own the spinlock in the
-        * wait_queue_head.
-        */
-       if (!atomic_add_negative(sleepers, &sem->count)) {
-               wake_up_locked(&sem->wait);
-       }
-
-       spin_unlock_irqrestore(&sem->wait.lock, flags);
-       return 1;
-}
-
-
-/*
  * The semaphore operations have a special calling sequence that
  * allow us to do a simpler in-line version of them. These routines
  * need to convert that sequence back into the C sequence when
diff -urN linux/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- linux/arch/i386/kernel/setup.c      2005/08/01 18:23:44     1.112
+++ linux/arch/i386/kernel/setup.c      2005/09/15 08:52:54     1.113
@@ -82,19 +82,19 @@
 /* cpu data as detected by the assembly code in head.S */
 struct cpuinfo_x86 new_cpu_data __initdata = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
 /* common cpu data for all cpus */
-struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
+struct cpuinfo_x86 boot_cpu_data __read_mostly = { 0, 0, 0, 0, -1, 1, 0, 0, -1 
};
 EXPORT_SYMBOL(boot_cpu_data);
 
 unsigned long mmu_cr4_features;
 
-#ifdef CONFIG_ACPI_INTERPRETER
+#ifdef CONFIG_ACPI
        int acpi_disabled = 0;
 #else
        int acpi_disabled = 1;
 #endif
 EXPORT_SYMBOL(acpi_disabled);
 
-#ifdef CONFIG_ACPI_BOOT
+#ifdef CONFIG_ACPI
 int __initdata acpi_force = 0;
 extern acpi_interrupt_flags    acpi_sci_flags;
 #endif
@@ -139,6 +139,7 @@
        unsigned char table[0];
 };
 struct edid_info edid_info;
+EXPORT_SYMBOL_GPL(edid_info);
 struct ist_info ist_info;
 #if defined(CONFIG_X86_SPEEDSTEP_SMI) || \
        defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
@@ -370,12 +371,16 @@
        int i;
 
        if (efi_enabled) {
-               for (i = 0; i < memmap.nr_map; i++) {
-                       current_addr = memmap.map[i].phys_addr +
-                                      (memmap.map[i].num_pages << 12);
-                       if (memmap.map[i].type == EFI_CONVENTIONAL_MEMORY) {
+               efi_memory_desc_t *md;
+               void *p;
+
+               for (p = memmap.map, i = 0; p < memmap.map_end;
+                       p += memmap.desc_size, i++) {
+                       md = p;
+                       current_addr = md->phys_addr + (md->num_pages << 12);
+                       if (md->type == EFI_CONVENTIONAL_MEMORY) {
                                if (current_addr >= size) {
-                                       memmap.map[i].num_pages -=
+                                       md->num_pages -=
                                                (((current_addr-size) + 
PAGE_SIZE-1) >> PAGE_SHIFT);
                                        memmap.nr_map = i + 1;
                                        return;
@@ -794,7 +799,7 @@
                }
 #endif
 
-#ifdef CONFIG_ACPI_BOOT
+#ifdef CONFIG_ACPI
                /* "acpi=off" disables both ACPI table parsing and interpreter 
*/
                else if (!memcmp(from, "acpi=off", 8)) {
                        disable_acpi();
@@ -846,11 +851,16 @@
 #endif
 
 #ifdef CONFIG_X86_LOCAL_APIC
+               if (!memcmp(from, "disable_timer_pin_1", 19))
+                       disable_timer_pin_1 = 1;
+               if (!memcmp(from, "enable_timer_pin_1", 18))
+                       disable_timer_pin_1 = -1;
+
                /* disable IO-APIC */
                else if (!memcmp(from, "noapic", 6))
                        disable_ioapic_setup();
 #endif /* CONFIG_X86_LOCAL_APIC */
-#endif /* CONFIG_ACPI_BOOT */
+#endif /* CONFIG_ACPI */
 
 #ifdef CONFIG_X86_LOCAL_APIC
                /* enable local APIC */
@@ -1295,7 +1305,7 @@
  */
 static void __init register_memory(void)
 {
-       unsigned long gapstart, gapsize;
+       unsigned long gapstart, gapsize, round;
        unsigned long long last;
        int           i;
 
@@ -1340,14 +1350,14 @@
        }
 
        /*
-        * Start allocating dynamic PCI memory a bit into the gap,
-        * aligned up to the nearest megabyte.
-        *
-        * Question: should we try to pad it up a bit (do something
-        * like " + (gapsize >> 3)" in there too?). We now have the
-        * technology.
+        * See how much we want to round up: start off with
+        * rounding to the next 1MB area.
         */
-       pci_mem_start = (gapstart + 0xfffff) & ~0xfffff;
+       round = 0x100000;
+       while ((gapsize >> 4) > round)
+               round += round;
+       /* Fun with two's complement */
+       pci_mem_start = (gapstart + round) & -round;
 
        printk("Allocating PCI resources starting at %08lx (gap: 
%08lx:%08lx)\n",
                pci_mem_start, gapstart, gapsize);
@@ -1575,14 +1585,20 @@
        if (efi_enabled)
                efi_map_memmap();
 
-#ifdef CONFIG_ACPI_BOOT
+#ifdef CONFIG_ACPI
        /*
         * Parse the ACPI tables for possible boot-time SMP configuration.
         */
        acpi_boot_table_init();
        acpi_boot_init();
-#endif
 
+#if defined(CONFIG_SMP) && defined(CONFIG_X86_PC)
+       if (def_to_bigsmp)
+               printk(KERN_WARNING "More than 8 CPUs detected and "
+                       "CONFIG_X86_PC cannot handle it.\nUse "
+                       "CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n");
+#endif
+#endif
 #ifdef CONFIG_X86_LOCAL_APIC
        if (smp_found_config)
                get_smp_config();
diff -urN linux/arch/i386/kernel/sigframe.h linux/arch/i386/kernel/sigframe.h
--- linux/arch/i386/kernel/sigframe.h   2003/06/05 14:43:25     1.1
+++ linux/arch/i386/kernel/sigframe.h   2005/09/15 08:52:54     1.2
@@ -1,6 +1,6 @@
 struct sigframe
 {
-       char *pretcode;
+       char __user *pretcode;
        int sig;
        struct sigcontext sc;
        struct _fpstate fpstate;
@@ -10,10 +10,10 @@
 
 struct rt_sigframe
 {
-       char *pretcode;
+       char __user *pretcode;
        int sig;
-       struct siginfo *pinfo;
-       void *puc;
+       struct siginfo __user *pinfo;
+       void __user *puc;
        struct siginfo info;
        struct ucontext uc;
        struct _fpstate fpstate;
diff -urN linux/arch/i386/kernel/signal.c linux/arch/i386/kernel/signal.c
--- linux/arch/i386/kernel/signal.c     2005/07/11 20:46:08     1.62
+++ linux/arch/i386/kernel/signal.c     2005/09/15 08:52:54     1.63
@@ -278,9 +278,9 @@
        int tmp, err = 0;
 
        tmp = 0;
-       __asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp));
+       savesegment(gs, tmp);
        err |= __put_user(tmp, (unsigned int __user *)&sc->gs);
-       __asm__("movl %%fs,%0" : "=r"(tmp): "0"(tmp));
+       savesegment(fs, tmp);
        err |= __put_user(tmp, (unsigned int __user *)&sc->fs);
 
        err |= __put_user(regs->xes, (unsigned int __user *)&sc->es);
@@ -577,10 +577,11 @@
        else
                ret = setup_frame(sig, ka, oldset, regs);
 
-       if (ret && !(ka->sa.sa_flags & SA_NODEFER)) {
+       if (ret) {
                spin_lock_irq(&current->sighand->siglock);
                sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
-               sigaddset(&current->blocked,sig);
+               if (!(ka->sa.sa_flags & SA_NODEFER))
+                       sigaddset(&current->blocked,sig);
                recalc_sigpending();
                spin_unlock_irq(&current->sighand->siglock);
        }
@@ -603,7 +604,9 @@
         * We want the common case to go fast, which
         * is why we may in certain cases get here from
         * kernel mode. Just return without doing anything
-        * if so.
+        * if so.  vm86 regs switched out by assembly code
+        * before reaching here, so testing against kernel
+        * CS suffices.
         */
        if (!user_mode(regs))
                return 1;
diff -urN linux/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
--- linux/arch/i386/kernel/smp.c        2005/07/11 20:46:08     1.67
+++ linux/arch/i386/kernel/smp.c        2005/09/15 08:52:54     1.68
@@ -576,7 +576,7 @@
        local_irq_disable();
        disable_local_APIC();
        if (cpu_data[smp_processor_id()].hlt_works_ok)
-               for(;;) __asm__("hlt");
+               for(;;) halt();
        for (;;);
 }
 
diff -urN linux/arch/i386/kernel/smpboot.c linux/arch/i386/kernel/smpboot.c
--- linux/arch/i386/kernel/smpboot.c    2005/07/13 11:48:55     1.73
+++ linux/arch/i386/kernel/smpboot.c    2005/09/15 08:52:54     1.74
@@ -88,6 +88,8 @@
 cpumask_t cpu_callin_map;
 cpumask_t cpu_callout_map;
 EXPORT_SYMBOL(cpu_callout_map);
+cpumask_t cpu_possible_map;
+EXPORT_SYMBOL(cpu_possible_map);
 static cpumask_t smp_commenced_mask;
 
 /* TSC's upper 32 bits can't be written in eariler CPU (before prescott), there
@@ -1017,8 +1019,8 @@
        tsc_sync_disabled = 1;
 
        /* init low mem mapping */
-       memcpy(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS,
-                       sizeof(swapper_pg_dir[0]) * KERNEL_PGD_PTRS);
+       clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS,
+                       KERNEL_PGD_PTRS);
        flush_tlb_all();
        schedule_work(&task);
        wait_for_completion(&done);
@@ -1265,6 +1267,7 @@
        cpu_set(smp_processor_id(), cpu_online_map);
        cpu_set(smp_processor_id(), cpu_callout_map);
        cpu_set(smp_processor_id(), cpu_present_map);
+       cpu_set(smp_processor_id(), cpu_possible_map);
        per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
 }
 
@@ -1327,8 +1330,7 @@
                        printk ("CPU %d is now offline\n", cpu);
                        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/i386/kernel/srat.c linux/arch/i386/kernel/srat.c
--- linux/arch/i386/kernel/srat.c       2005/03/18 17:36:48     1.8
+++ linux/arch/i386/kernel/srat.c       2005/09/15 08:52:54     1.9
@@ -213,12 +213,18 @@
                node_end_pfn[nid] = memory_chunk->end_pfn;
 }
 
+static u8 pxm_to_nid_map[MAX_PXM_DOMAINS];/* _PXM to logical node ID map */
+
+int pxm_to_node(int pxm)
+{
+       return pxm_to_nid_map[pxm];
+}
+
 /* Parse the ACPI Static Resource Affinity Table */
 static int __init acpi20_parse_srat(struct acpi_table_srat *sratp)
 {
        u8 *start, *end, *p;
        int i, j, nid;
-       u8 pxm_to_nid_map[MAX_PXM_DOMAINS];/* _PXM to logical node ID map */
        u8 nid_to_pxm_map[MAX_NUMNODES];/* logical node ID to _PXM map */
 
        start = (u8 *)(&(sratp->reserved) + 1); /* skip header */
diff -urN linux/arch/i386/kernel/time.c linux/arch/i386/kernel/time.c
--- linux/arch/i386/kernel/time.c       2005/07/13 11:48:55     1.66
+++ linux/arch/i386/kernel/time.c       2005/09/15 08:52:54     1.67
@@ -194,10 +194,7 @@
        set_normalized_timespec(&xtime, sec, nsec);
        set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
 
-       time_adjust = 0;                /* stop active adjtime() */
-       time_status |= STA_UNSYNC;
-       time_maxerror = NTP_PHASE_LIMIT;
-       time_esterror = NTP_PHASE_LIMIT;
+       ntp_clear();
        write_sequnlock_irq(&xtime_lock);
        clock_was_set();
        return 0;
@@ -252,8 +249,7 @@
  * timer_interrupt() needs to keep up the real-time clock,
  * as well as call the "do_timer()" routine every clocktick
  */
-static inline void do_timer_interrupt(int irq, void *dev_id,
-                                       struct pt_regs *regs)
+static inline void do_timer_interrupt(int irq, struct pt_regs *regs)
 {
 #ifdef CONFIG_X86_IO_APIC
        if (timer_ack) {
@@ -307,7 +303,7 @@
 
        cur_timer->mark_offset();
  
-       do_timer_interrupt(irq, NULL, regs);
+       do_timer_interrupt(irq, regs);
 
        write_sequnlock(&xtime_lock);
        return IRQ_HANDLED;
@@ -333,8 +329,7 @@
 
 static void sync_cmos_clock(unsigned long dummy);
 
-static struct timer_list sync_cmos_timer =
-                                      TIMER_INITIALIZER(sync_cmos_clock, 0, 0);
+static DEFINE_TIMER(sync_cmos_timer, sync_cmos_clock, 0, 0);
 
 static void sync_cmos_clock(unsigned long dummy)
 {
@@ -348,7 +343,7 @@
         * This code is run on a timer.  If the clock is set, that timer
         * may not expire at the correct time.  Thus, we adjust...
         */
-       if ((time_status & STA_UNSYNC) != 0)
+       if (!ntp_synced())
                /*
                 * Not synced, exit, do not restart a timer (if one is
                 * running, let it run out).
@@ -383,6 +378,7 @@
 
 static long clock_cmos_diff, sleep_start;
 
+static struct timer_opts *last_timer;
 static int timer_suspend(struct sys_device *dev, pm_message_t state)
 {
        /*
@@ -391,6 +387,10 @@
        clock_cmos_diff = -get_cmos_time();
        clock_cmos_diff += get_seconds();
        sleep_start = get_cmos_time();
+       last_timer = cur_timer;
+       cur_timer = &timer_none;
+       if (last_timer->suspend)
+               last_timer->suspend(state);
        return 0;
 }
 
@@ -404,6 +404,7 @@
        if (is_hpet_enabled())
                hpet_reenable();
 #endif
+       setup_pit_timer();
        sec = get_cmos_time() + clock_cmos_diff;
        sleep_length = (get_cmos_time() - sleep_start) * HZ;
        write_seqlock_irqsave(&xtime_lock, flags);
@@ -412,6 +413,11 @@
        write_sequnlock_irqrestore(&xtime_lock, flags);
        jiffies += sleep_length;
        wall_jiffies += sleep_length;
+       if (last_timer->resume)
+               last_timer->resume();
+       cur_timer = last_timer;
+       last_timer = NULL;
+       touch_softlockup_watchdog();
        return 0;
 }
 
diff -urN linux/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c
--- linux/arch/i386/kernel/traps.c      2005/08/24 16:22:49     1.105
+++ linux/arch/i386/kernel/traps.c      2005/09/15 08:52:54     1.106
@@ -210,7 +210,7 @@
        unsigned short ss;
 
        esp = (unsigned long) (&regs->esp);
-       ss = __KERNEL_DS;
+       savesegment(ss, ss);
        if (user_mode(regs)) {
                in_kernel = 0;
                esp = regs->esp;
@@ -267,9 +267,6 @@
        char c;
        unsigned long eip;
 
-       if (user_mode(regs))
-               goto no_bug;            /* Not in kernel */
-
        eip = regs->eip;
 
        if (eip < PAGE_OFFSET)
@@ -366,8 +363,9 @@
                die(str, regs, err);
 }
 
-static void do_trap(int trapnr, int signr, char *str, int vm86,
-                          struct pt_regs * regs, long error_code, siginfo_t 
*info)
+static void __kprobes do_trap(int trapnr, int signr, char *str, int vm86,
+                             struct pt_regs * regs, long error_code,
+                             siginfo_t *info)
 {
        struct task_struct *tsk = current;
        tsk->thread.error_code = error_code;
@@ -463,7 +461,8 @@
 DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0)
 DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0)
 
-fastcall void do_general_protection(struct pt_regs * regs, long error_code)
+fastcall void __kprobes do_general_protection(struct pt_regs * regs,
+                                             long error_code)
 {
        int cpu = get_cpu();
        struct tss_struct *tss = &per_cpu(init_tss, cpu);
@@ -568,6 +567,10 @@
 
 void die_nmi (struct pt_regs *regs, const char *msg)
 {
+       if (notify_die(DIE_NMIWATCHDOG, msg, regs, 0, 0, SIGINT) ==
+           NOTIFY_STOP)
+               return;
+
        spin_lock(&nmi_print_lock);
        /*
        * We are in trouble anyway, lets at least try
@@ -656,7 +659,7 @@
 
        ++nmi_count(cpu);
 
-       if (!nmi_callback(regs, cpu))
+       if (!rcu_dereference(nmi_callback)(regs, cpu))
                default_do_nmi(regs);
 
        nmi_exit();
@@ -664,7 +667,7 @@
 
 void set_nmi_callback(nmi_callback_t callback)
 {
-       nmi_callback = callback;
+       rcu_assign_pointer(nmi_callback, callback);
 }
 EXPORT_SYMBOL_GPL(set_nmi_callback);
 
@@ -675,7 +678,7 @@
 EXPORT_SYMBOL_GPL(unset_nmi_callback);
 
 #ifdef CONFIG_KPROBES
-fastcall void do_int3(struct pt_regs *regs, long error_code)
+fastcall void __kprobes do_int3(struct pt_regs *regs, long error_code)
 {
        if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
                        == NOTIFY_STOP)
@@ -709,7 +712,7 @@
  * find every occurrence of the TF bit that could be saved away even
  * by user code)
  */
-fastcall void do_debug(struct pt_regs * regs, long error_code)
+fastcall void __kprobes do_debug(struct pt_regs * regs, long error_code)
 {
        unsigned int condition;
        struct task_struct *tsk = current;
@@ -1008,7 +1011,7 @@
         * it uses the read-only mapped virtual address.
         */
        idt_descr.address = fix_to_virt(FIX_F00F_IDT);
-       __asm__ __volatile__("lidt %0" : : "m" (idt_descr));
+       load_idt(&idt_descr);
 }
 #endif
 
diff -urN linux/arch/i386/kernel/vm86.c linux/arch/i386/kernel/vm86.c
--- linux/arch/i386/kernel/vm86.c       2005/05/19 12:08:08     1.49
+++ linux/arch/i386/kernel/vm86.c       2005/09/15 08:52:54     1.50
@@ -294,8 +294,8 @@
  */
        info->regs32->eax = 0;
        tsk->thread.saved_esp0 = tsk->thread.esp0;
-       asm volatile("mov %%fs,%0":"=m" (tsk->thread.saved_fs));
-       asm volatile("mov %%gs,%0":"=m" (tsk->thread.saved_gs));
+       savesegment(fs, tsk->thread.saved_fs);
+       savesegment(gs, tsk->thread.saved_gs);
 
        tss = &per_cpu(init_tss, get_cpu());
        tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0;
@@ -542,7 +542,7 @@
        unsigned char opcode;
        unsigned char __user *csp;
        unsigned char __user *ssp;
-       unsigned short ip, sp;
+       unsigned short ip, sp, orig_flags;
        int data32, pref_done;
 
 #define CHECK_IF_IN_TRAP \
@@ -551,8 +551,12 @@
 #define VM86_FAULT_RETURN do { \
        if (VMPI.force_return_for_pic  && (VEFLAGS & (IF_MASK | VIF_MASK))) \
                return_to_32bit(regs, VM86_PICRETURN); \
+       if (orig_flags & TF_MASK) \
+               handle_vm86_trap(regs, 0, 1); \
        return; } while (0)
 
+       orig_flags = *(unsigned short *)&regs->eflags;
+
        csp = (unsigned char __user *) (regs->cs << 4);
        ssp = (unsigned char __user *) (regs->ss << 4);
        sp = SP(regs);
diff -urN linux/arch/i386/kernel/vmlinux.lds.S 
linux/arch/i386/kernel/vmlinux.lds.S
--- linux/arch/i386/kernel/vmlinux.lds.S        2005/07/13 11:48:55     1.6
+++ linux/arch/i386/kernel/vmlinux.lds.S        2005/09/15 08:52:54     1.7
@@ -22,6 +22,7 @@
        *(.text)
        SCHED_TEXT
        LOCK_TEXT
+       KPROBES_TEXT
        *(.fixup)
        *(.gnu.warning)
        } = 0x9090
@@ -143,12 +144,7 @@
        *(.exitcall.exit)
        }
 
-  /* Stabs debugging sections.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
-  .stab.excl 0 : { *(.stab.excl) }
-  .stab.exclstr 0 : { *(.stab.exclstr) }
-  .stab.index 0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-  .comment 0 : { *(.comment) }
+  STABS_DEBUG
+
+  DWARF_DEBUG
 }
diff -urN linux/arch/i386/kernel/vsyscall-sigreturn.S 
linux/arch/i386/kernel/vsyscall-sigreturn.S
--- linux/arch/i386/kernel/vsyscall-sigreturn.S 2004/04/12 20:23:23     1.2
+++ linux/arch/i386/kernel/vsyscall-sigreturn.S 2005/09/15 08:52:54     1.3
@@ -7,7 +7,7 @@
  */
 
 #include <asm/unistd.h>
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 
 
 /* XXX
@@ -15,7 +15,7 @@
 */
 
        .text
-       .org    __kernel_vsyscall+32
+       .org __kernel_vsyscall+32,0x90
        .globl __kernel_sigreturn
        .type __kernel_sigreturn,@function
 __kernel_sigreturn:
@@ -35,6 +35,7 @@
        int $0x80
 .LEND_rt_sigreturn:
        .size __kernel_rt_sigreturn,.-.LSTART_rt_sigreturn
+       .balign 32
        .previous
 
        .section .eh_frame,"a",@progbits
diff -urN linux/arch/i386/kernel/vsyscall.lds.S 
linux/arch/i386/kernel/vsyscall.lds.S
--- linux/arch/i386/kernel/vsyscall.lds.S       2005/04/29 11:15:00     1.2
+++ linux/arch/i386/kernel/vsyscall.lds.S       2005/09/15 08:52:54     1.3
@@ -3,7 +3,7 @@
  * object prelinked to its virtual address, and with only one read-only
  * segment (that fits in one page).  This script controls its layout.
  */
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
 
 SECTIONS
 {
diff -urN linux/arch/i386/kernel/acpi/Makefile 
linux/arch/i386/kernel/acpi/Makefile
--- linux/arch/i386/kernel/acpi/Makefile        2005/07/13 11:48:55     1.5
+++ linux/arch/i386/kernel/acpi/Makefile        2005/09/15 08:52:56     1.6
@@ -1,4 +1,4 @@
-obj-$(CONFIG_ACPI_BOOT)                := boot.o
+obj-y                          := boot.o
 obj-$(CONFIG_X86_IO_APIC)      += earlyquirk.o
 obj-$(CONFIG_ACPI_SLEEP)       += sleep.o wakeup.o
 
diff -urN linux/arch/i386/kernel/acpi/boot.c linux/arch/i386/kernel/acpi/boot.c
--- linux/arch/i386/kernel/acpi/boot.c  2005/07/11 20:46:09     1.26
+++ linux/arch/i386/kernel/acpi/boot.c  2005/09/15 08:52:56     1.27
@@ -40,19 +40,25 @@
 
 #ifdef CONFIG_X86_64
 
-static inline void  acpi_madt_oem_check(char *oem_id, char *oem_table_id) { }
+static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+{
+}
 extern void __init clustered_apic_check(void);
-static inline int ioapic_setup_disabled(void) { return 0; }
+static inline int ioapic_setup_disabled(void)
+{
+       return 0;
+}
+
 #include <asm/proto.h>
 
-#else  /* X86 */
+#else                          /* X86 */
 
 #ifdef CONFIG_X86_LOCAL_APIC
 #include <mach_apic.h>
 #include <mach_mpparse.h>
-#endif /* CONFIG_X86_LOCAL_APIC */
+#endif                         /* CONFIG_X86_LOCAL_APIC */
 
-#endif /* X86 */
+#endif                         /* X86 */
 
 #define BAD_MADT_ENTRY(entry, end) (                                       \
                (!entry) || (unsigned long)entry + sizeof(*entry) > end ||  \
@@ -60,13 +66,8 @@
 
 #define PREFIX                 "ACPI: "
 
-#ifdef CONFIG_ACPI_PCI
 int acpi_noirq __initdata;     /* skip ACPI IRQ initialization */
-int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization 
*/
-#else
-int acpi_noirq __initdata = 1;
-int acpi_pci_disabled __initdata = 1;
-#endif
+int acpi_pci_disabled __initdata;      /* skip ACPI PCI scan and IRQ 
initialization */
 int acpi_ht __initdata = 1;    /* enable HT */
 
 int acpi_lapic;
@@ -88,7 +89,7 @@
 
 #define MAX_MADT_ENTRIES       256
 u8 x86_acpiid_to_apicid[MAX_MADT_ENTRIES] =
-                       { [0 ... MAX_MADT_ENTRIES-1] = 0xff };
+    {[0 ... MAX_MADT_ENTRIES - 1] = 0xff };
 EXPORT_SYMBOL(x86_acpiid_to_apicid);
 
 /* --------------------------------------------------------------------------
@@ -99,7 +100,7 @@
  * The default interrupt routing model is PIC (8259).  This gets
  * overriden if IOAPICs are enumerated (below).
  */
-enum acpi_irq_model_id         acpi_irq_model = ACPI_IRQ_MODEL_PIC;
+enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC;
 
 #ifdef CONFIG_X86_64
 
@@ -107,7 +108,7 @@
 char *__acpi_map_table(unsigned long phys_addr, unsigned long size)
 {
        if (!phys_addr || !size)
-       return NULL;
+               return NULL;
 
        if (phys_addr < (end_pfn_map << PAGE_SHIFT))
                return __va(phys_addr);
@@ -134,8 +135,8 @@
        unsigned long base, offset, mapped_size;
        int idx;
 
-       if (phys + size < 8*1024*1024) 
-               return __va(phys); 
+       if (phys + size < 8 * 1024 * 1024)
+               return __va(phys);
 
        offset = phys & (PAGE_SIZE - 1);
        mapped_size = PAGE_SIZE - offset;
@@ -154,7 +155,7 @@
                mapped_size += PAGE_SIZE;
        }
 
-       return ((unsigned char *) base + offset);
+       return ((unsigned char *)base + offset);
 }
 #endif
 
@@ -172,7 +173,7 @@
        if (!phys_addr || !size)
                return -EINVAL;
 
-       mcfg = (struct acpi_table_mcfg *) __acpi_map_table(phys_addr, size);
+       mcfg = (struct acpi_table_mcfg *)__acpi_map_table(phys_addr, size);
        if (!mcfg) {
                printk(KERN_WARNING PREFIX "Unable to map MCFG\n");
                return -ENODEV;
@@ -209,20 +210,17 @@
 
        return 0;
 }
-#endif /* CONFIG_PCI_MMCONFIG */
+#endif                         /* CONFIG_PCI_MMCONFIG */
 
 #ifdef CONFIG_X86_LOCAL_APIC
-static int __init
-acpi_parse_madt (
-       unsigned long           phys_addr,
-       unsigned long           size)
+static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size)
 {
-       struct acpi_table_madt  *madt = NULL;
+       struct acpi_table_madt *madt = NULL;
 
        if (!phys_addr || !size)
                return -EINVAL;
 
-       madt = (struct acpi_table_madt *) __acpi_map_table(phys_addr, size);
+       madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size);
        if (!madt) {
                printk(KERN_WARNING PREFIX "Unable to map MADT\n");
                return -ENODEV;
@@ -232,22 +230,20 @@
                acpi_lapic_addr = (u64) madt->lapic_address;
 
                printk(KERN_DEBUG PREFIX "Local APIC address 0x%08x\n",
-                       madt->lapic_address);
+                      madt->lapic_address);
        }
 
        acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id);
-       
+
        return 0;
 }
 
-
 static int __init
-acpi_parse_lapic (
-       acpi_table_entry_header *header, const unsigned long end)
+acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end)
 {
-       struct acpi_table_lapic *processor = NULL;
+       struct acpi_table_lapic *processor = NULL;
 
-       processor = (struct acpi_table_lapic*) header;
+       processor = (struct acpi_table_lapic *)header;
 
        if (BAD_MADT_ENTRY(processor, end))
                return -EINVAL;
@@ -260,20 +256,19 @@
 
        x86_acpiid_to_apicid[processor->acpi_id] = processor->id;
 
-       mp_register_lapic (
-               processor->id,                                     /* APIC ID */
-               processor->flags.enabled);                        /* Enabled? */
+       mp_register_lapic(processor->id,        /* APIC ID */
+                         processor->flags.enabled);    /* Enabled? */
 
        return 0;
 }
 
 static int __init
-acpi_parse_lapic_addr_ovr (
-       acpi_table_entry_header *header, const unsigned long end)
+acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header,
+                         const unsigned long end)
 {
        struct acpi_table_lapic_addr_ovr *lapic_addr_ovr = NULL;
 
-       lapic_addr_ovr = (struct acpi_table_lapic_addr_ovr*) header;
+       lapic_addr_ovr = (struct acpi_table_lapic_addr_ovr *)header;
 
        if (BAD_MADT_ENTRY(lapic_addr_ovr, end))
                return -EINVAL;
@@ -284,12 +279,11 @@
 }
 
 static int __init
-acpi_parse_lapic_nmi (
-       acpi_table_entry_header *header, const unsigned long end)
+acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end)
 {
        struct acpi_table_lapic_nmi *lapic_nmi = NULL;
 
-       lapic_nmi = (struct acpi_table_lapic_nmi*) header;
+       lapic_nmi = (struct acpi_table_lapic_nmi *)header;
 
        if (BAD_MADT_ENTRY(lapic_nmi, end))
                return -EINVAL;
@@ -302,37 +296,32 @@
        return 0;
 }
 
+#endif                         /*CONFIG_X86_LOCAL_APIC */
 
-#endif /*CONFIG_X86_LOCAL_APIC*/
-
-#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
+#ifdef CONFIG_X86_IO_APIC
 
 static int __init
-acpi_parse_ioapic (
-       acpi_table_entry_header *header, const unsigned long end)
+acpi_parse_ioapic(acpi_table_entry_header * header, const unsigned long end)
 {
        struct acpi_table_ioapic *ioapic = NULL;
 
-       ioapic = (struct acpi_table_ioapic*) header;
+       ioapic = (struct acpi_table_ioapic *)header;
 
        if (BAD_MADT_ENTRY(ioapic, end))
                return -EINVAL;
- 
+
        acpi_table_print_madt_entry(header);
 
-       mp_register_ioapic (
-               ioapic->id,
-               ioapic->address,
-               ioapic->global_irq_base);
- 
+       mp_register_ioapic(ioapic->id,
+                          ioapic->address, ioapic->global_irq_base);
+
        return 0;
 }
 
 /*
  * Parse Interrupt Source Override for the ACPI SCI
  */
-static void
-acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
+static void acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
 {
        if (trigger == 0)       /* compatible SCI trigger is level */
                trigger = 3;
@@ -348,7 +337,7 @@
                polarity = acpi_sci_flags.polarity;
 
        /*
-        * mp_config_acpi_legacy_irqs() already setup IRQs < 16
+        * mp_config_acpi_legacy_irqs() already setup IRQs < 16
         * If GSI is < 16, this will update its flags,
         * else it will create a new mp_irqs[] entry.
         */
@@ -363,12 +352,12 @@
 }
 
 static int __init
-acpi_parse_int_src_ovr (
-       acpi_table_entry_header *header, const unsigned long end)
+acpi_parse_int_src_ovr(acpi_table_entry_header * header,
+                      const unsigned long end)
 {
        struct acpi_table_int_src_ovr *intsrc = NULL;
 
-       intsrc = (struct acpi_table_int_src_ovr*) header;
+       intsrc = (struct acpi_table_int_src_ovr *)header;
 
        if (BAD_MADT_ENTRY(intsrc, end))
                return -EINVAL;
@@ -377,33 +366,30 @@
 
        if (intsrc->bus_irq == acpi_fadt.sci_int) {
                acpi_sci_ioapic_setup(intsrc->global_irq,
-                       intsrc->flags.polarity, intsrc->flags.trigger);
+                                     intsrc->flags.polarity,
+                                     intsrc->flags.trigger);
                return 0;
        }
 
        if (acpi_skip_timer_override &&
-               intsrc->bus_irq == 0 && intsrc->global_irq == 2) {
-                       printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
-                       return 0;
+           intsrc->bus_irq == 0 && intsrc->global_irq == 2) {
+               printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
+               return 0;
        }
 
-       mp_override_legacy_irq (
-               intsrc->bus_irq,
-               intsrc->flags.polarity,
-               intsrc->flags.trigger,
-               intsrc->global_irq);
+       mp_override_legacy_irq(intsrc->bus_irq,
+                              intsrc->flags.polarity,
+                              intsrc->flags.trigger, intsrc->global_irq);
 
        return 0;
 }
 
-
 static int __init
-acpi_parse_nmi_src (
-       acpi_table_entry_header *header, const unsigned long end)
+acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end)
 {
        struct acpi_table_nmi_src *nmi_src = NULL;
 
-       nmi_src = (struct acpi_table_nmi_src*) header;
+       nmi_src = (struct acpi_table_nmi_src *)header;
 
        if (BAD_MADT_ENTRY(nmi_src, end))
                return -EINVAL;
@@ -415,9 +401,7 @@
        return 0;
 }
 
-#endif /* CONFIG_X86_IO_APIC */
-
-#ifdef CONFIG_ACPI_BUS
+#endif                         /* CONFIG_X86_IO_APIC */
 
 /*
  * acpi_pic_sci_set_trigger()
@@ -433,8 +417,7 @@
  * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0)
  */
 
-void __init
-acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger)
+void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger)
 {
        unsigned int mask = 1 << irq;
        unsigned int old, new;
@@ -454,10 +437,10 @@
         * routing tables..
         */
        switch (trigger) {
-       case 1: /* Edge - clear */
+       case 1:         /* Edge - clear */
                new &= ~mask;
                break;
-       case 3: /* Level - set */
+       case 3:         /* Level - set */
                new |= mask;
                break;
        }
@@ -470,21 +453,22 @@
        outb(new >> 8, 0x4d1);
 }
 
-
-#endif /* CONFIG_ACPI_BUS */
-
 int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
 {
 #ifdef CONFIG_X86_IO_APIC
        if (use_pci_vector() && !platform_legacy_irq(gsi))
-               *irq = IO_APIC_VECTOR(gsi);
+               *irq = IO_APIC_VECTOR(gsi);
        else
 #endif
                *irq = gsi;
        return 0;
 }
 
-unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
+/*
+ * success: return IRQ number (>=0)
+ * failure: return < 0
+ */
+int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
 {
        unsigned int irq;
        unsigned int plat_gsi = gsi;
@@ -497,7 +481,7 @@
                extern void eisa_set_level_irq(unsigned int irq);
 
                if (edge_level == ACPI_LEVEL_SENSITIVE)
-                               eisa_set_level_irq(gsi);
+                       eisa_set_level_irq(gsi);
        }
 #endif
 
@@ -509,60 +493,58 @@
        acpi_gsi_to_irq(plat_gsi, &irq);
        return irq;
 }
+
 EXPORT_SYMBOL(acpi_register_gsi);
 
 /*
  *  ACPI based hotplug support for CPU
  */
 #ifdef CONFIG_ACPI_HOTPLUG_CPU
-int
-acpi_map_lsapic(acpi_handle handle, int *pcpu)
+int acpi_map_lsapic(acpi_handle handle, int *pcpu)
 {
        /* TBD */
        return -EINVAL;
 }
-EXPORT_SYMBOL(acpi_map_lsapic);
 
+EXPORT_SYMBOL(acpi_map_lsapic);
 
-int
-acpi_unmap_lsapic(int cpu)
+int acpi_unmap_lsapic(int cpu)
 {
        /* TBD */
        return -EINVAL;
 }
+
 EXPORT_SYMBOL(acpi_unmap_lsapic);
-#endif /* CONFIG_ACPI_HOTPLUG_CPU */
+#endif                         /* CONFIG_ACPI_HOTPLUG_CPU */
 
-int
-acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base)
+int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base)
 {
        /* TBD */
        return -EINVAL;
 }
+
 EXPORT_SYMBOL(acpi_register_ioapic);
 
-int
-acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
+int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
 {
        /* TBD */
        return -EINVAL;
 }
+
 EXPORT_SYMBOL(acpi_unregister_ioapic);
 
 static unsigned long __init
-acpi_scan_rsdp (
-       unsigned long           start,
-       unsigned long           length)
+acpi_scan_rsdp(unsigned long start, unsigned long length)
 {
-       unsigned long           offset = 0;
-       unsigned long           sig_len = sizeof("RSD PTR ") - 1;
+       unsigned long offset = 0;
+       unsigned long sig_len = sizeof("RSD PTR ") - 1;
 
        /*
         * Scan all 16-byte boundaries of the physical memory region for the
         * RSDP signature.
         */
        for (offset = 0; offset < length; offset += 16) {
-               if (strncmp((char *) (start + offset), "RSD PTR ", sig_len))
+               if (strncmp((char *)(start + offset), "RSD PTR ", sig_len))
                        continue;
                return (start + offset);
        }
@@ -575,20 +557,19 @@
        struct acpi_table_sbf *sb;
 
        if (!phys_addr || !size)
-       return -EINVAL;
+               return -EINVAL;
 
-       sb = (struct acpi_table_sbf *) __acpi_map_table(phys_addr, size);
+       sb = (struct acpi_table_sbf *)__acpi_map_table(phys_addr, size);
        if (!sb) {
                printk(KERN_WARNING PREFIX "Unable to map SBF\n");
                return -ENODEV;
        }
 
-       sbf_port = sb->sbf_cmos; /* Save CMOS port */
+       sbf_port = sb->sbf_cmos;        /* Save CMOS port */
 
        return 0;
 }
 
-
 #ifdef CONFIG_HPET_TIMER
 
 static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
@@ -598,7 +579,7 @@
        if (!phys || !size)
                return -EINVAL;
 
-       hpet_tbl = (struct acpi_table_hpet *) __acpi_map_table(phys, size);
+       hpet_tbl = (struct acpi_table_hpet *)__acpi_map_table(phys, size);
        if (!hpet_tbl) {
                printk(KERN_WARNING PREFIX "Unable to map HPET\n");
                return -ENODEV;
@@ -609,22 +590,21 @@
                       "memory.\n");
                return -1;
        }
-
 #ifdef CONFIG_X86_64
-        vxtime.hpet_address = hpet_tbl->addr.addrl |
-                ((long) hpet_tbl->addr.addrh << 32);
+       vxtime.hpet_address = hpet_tbl->addr.addrl |
+           ((long)hpet_tbl->addr.addrh << 32);
 
-        printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
-               hpet_tbl->id, vxtime.hpet_address);
-#else  /* X86 */
+       printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
+              hpet_tbl->id, vxtime.hpet_address);
+#else                          /* X86 */
        {
                extern unsigned long hpet_address;
 
                hpet_address = hpet_tbl->addr.addrl;
                printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
-                       hpet_tbl->id, hpet_address);
+                      hpet_tbl->id, hpet_address);
        }
-#endif /* X86 */
+#endif                         /* X86 */
 
        return 0;
 }
@@ -640,28 +620,25 @@
 {
        struct fadt_descriptor_rev2 *fadt = NULL;
 
-       fadt = (struct fadt_descriptor_rev2*) __acpi_map_table(phys,size);
-       if(!fadt) {
+       fadt = (struct fadt_descriptor_rev2 *)__acpi_map_table(phys, size);
+       if (!fadt) {
                printk(KERN_WARNING PREFIX "Unable to map FADT\n");
                return 0;
        }
-
-#ifdef CONFIG_ACPI_INTERPRETER
        /* initialize sci_int early for INT_SRC_OVR MADT parsing */
        acpi_fadt.sci_int = fadt->sci_int;
-#endif
 
-#ifdef CONFIG_ACPI_BUS
        /* initialize rev and apic_phys_dest_mode for x86_64 genapic */
        acpi_fadt.revision = fadt->revision;
-       acpi_fadt.force_apic_physical_destination_mode = 
fadt->force_apic_physical_destination_mode;
-#endif
+       acpi_fadt.force_apic_physical_destination_mode =
+           fadt->force_apic_physical_destination_mode;
 
 #ifdef CONFIG_X86_PM_TIMER
        /* detect the location of the ACPI PM Timer */
        if (fadt->revision >= FADT2_REVISION_ID) {
                /* FADT rev. 2 */
-               if (fadt->xpm_tmr_blk.address_space_id != 
ACPI_ADR_SPACE_SYSTEM_IO)
+               if (fadt->xpm_tmr_blk.address_space_id !=
+                   ACPI_ADR_SPACE_SYSTEM_IO)
                        return 0;
 
                pmtmr_ioport = fadt->xpm_tmr_blk.address;
@@ -670,16 +647,15 @@
                pmtmr_ioport = fadt->V1_pm_tmr_blk;
        }
        if (pmtmr_ioport)
-               printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", 
pmtmr_ioport);
+               printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n",
+                      pmtmr_ioport);
 #endif
        return 0;
 }
 
-
-unsigned long __init
-acpi_find_rsdp (void)
+unsigned long __init acpi_find_rsdp(void)
 {
-       unsigned long           rsdp_phys = 0;
+       unsigned long rsdp_phys = 0;
 
        if (efi_enabled) {
                if (efi.acpi20)
@@ -691,9 +667,9 @@
         * Scan memory looking for the RSDP signature. First search EBDA (low
         * memory) paragraphs and then search upper memory (E0000-FFFFF).
         */
-       rsdp_phys = acpi_scan_rsdp (0, 0x400);
+       rsdp_phys = acpi_scan_rsdp(0, 0x400);
        if (!rsdp_phys)
-               rsdp_phys = acpi_scan_rsdp (0xE0000, 0x20000);
+               rsdp_phys = acpi_scan_rsdp(0xE0000, 0x20000);
 
        return rsdp_phys;
 }
@@ -703,8 +679,7 @@
  * Parse LAPIC entries in MADT
  * returns 0 on success, < 0 on error
  */
-static int __init
-acpi_parse_madt_lapic_entries(void)
+static int __init acpi_parse_madt_lapic_entries(void)
 {
        int count;
 
@@ -713,28 +688,31 @@
         * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value).
         */
 
-       count = acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR, 
acpi_parse_lapic_addr_ovr, 0);
+       count =
+           acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR,
+                                 acpi_parse_lapic_addr_ovr, 0);
        if (count < 0) {
-               printk(KERN_ERR PREFIX "Error parsing LAPIC address override 
entry\n");
+               printk(KERN_ERR PREFIX
+                      "Error parsing LAPIC address override entry\n");
                return count;
        }
 
        mp_register_lapic_address(acpi_lapic_addr);
 
        count = acpi_table_parse_madt(ACPI_MADT_LAPIC, acpi_parse_lapic,
-                                      MAX_APICS);
-       if (!count) { 
+                                     MAX_APICS);
+       if (!count) {
                printk(KERN_ERR PREFIX "No LAPIC entries present\n");
                /* TBD: Cleanup to allow fallback to MPS */
                return -ENODEV;
-       }
-       else if (count < 0) {
+       } else if (count < 0) {
                printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n");
                /* TBD: Cleanup to allow fallback to MPS */
                return count;
        }
 
-       count = acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, 
acpi_parse_lapic_nmi, 0);
+       count =
+           acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0);
        if (count < 0) {
                printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
                /* TBD: Cleanup to allow fallback to MPS */
@@ -742,15 +720,14 @@
        }
        return 0;
 }
-#endif /* CONFIG_X86_LOCAL_APIC */
+#endif                         /* CONFIG_X86_LOCAL_APIC */
 
-#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
+#ifdef CONFIG_X86_IO_APIC
 /*
  * Parse IOAPIC related entries in MADT
  * returns 0 on success, < 0 on error
  */
-static int __init
-acpi_parse_madt_ioapic_entries(void)
+static int __init acpi_parse_madt_ioapic_entries(void)
 {
        int count;
 
@@ -762,30 +739,34 @@
         */
        if (acpi_disabled || acpi_noirq) {
                return -ENODEV;
-        }
+       }
 
        /*
-        * if "noapic" boot option, don't look for IO-APICs
+        * if "noapic" boot option, don't look for IO-APICs
         */
        if (skip_ioapic_setup) {
                printk(KERN_INFO PREFIX "Skipping IOAPIC probe "
-                       "due to 'noapic' option.\n");
+                      "due to 'noapic' option.\n");
                return -ENODEV;
        }
 
-       count = acpi_table_parse_madt(ACPI_MADT_IOAPIC, acpi_parse_ioapic, 
MAX_IO_APICS);
+       count =
+           acpi_table_parse_madt(ACPI_MADT_IOAPIC, acpi_parse_ioapic,
+                                 MAX_IO_APICS);
        if (!count) {
                printk(KERN_ERR PREFIX "No IOAPIC entries present\n");
                return -ENODEV;
-       }
-       else if (count < 0) {
+       } else if (count < 0) {
                printk(KERN_ERR PREFIX "Error parsing IOAPIC entry\n");
                return count;
        }
 
-       count = acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, 
acpi_parse_int_src_ovr, NR_IRQ_VECTORS);
+       count =
+           acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr,
+                                 NR_IRQ_VECTORS);
        if (count < 0) {
-               printk(KERN_ERR PREFIX "Error parsing interrupt source 
overrides entry\n");
+               printk(KERN_ERR PREFIX
+                      "Error parsing interrupt source overrides entry\n");
                /* TBD: Cleanup to allow fallback to MPS */
                return count;
        }
@@ -800,7 +781,9 @@
        /* Fill in identity legacy mapings where no override */
        mp_config_acpi_legacy_irqs();
 
-       count = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, 
NR_IRQ_VECTORS);
+       count =
+           acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src,
+                                 NR_IRQ_VECTORS);
        if (count < 0) {
                printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n");
                /* TBD: Cleanup to allow fallback to MPS */
@@ -814,11 +797,9 @@
 {
        return -1;
 }
-#endif /* !(CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER) */
+#endif /* !CONFIG_X86_IO_APIC */
 
-
-static void __init
-acpi_process_madt(void)
+static void __init acpi_process_madt(void)
 {
 #ifdef CONFIG_X86_LOCAL_APIC
        int count, error;
@@ -833,6 +814,9 @@
                if (!error) {
                        acpi_lapic = 1;
 
+#ifdef CONFIG_X86_GENERICARCH
+                       generic_bigsmp_probe();
+#endif
                        /*
                         * Parse MADT IO-APIC entries
                         */
@@ -850,7 +834,8 @@
                        /*
                         * Dell Precision Workstation 410, 610 come here.
                         */
-                       printk(KERN_ERR PREFIX "Invalid BIOS MADT, disabling 
ACPI\n");
+                       printk(KERN_ERR PREFIX
+                              "Invalid BIOS MADT, disabling ACPI\n");
                        disable_acpi();
                }
        }
@@ -862,7 +847,6 @@
 
 #ifdef __i386__
 
-#ifdef CONFIG_ACPI_PCI
 static int __init disable_acpi_irq(struct dmi_system_id *d)
 {
        if (!acpi_force) {
@@ -882,12 +866,11 @@
        }
        return 0;
 }
-#endif
 
 static int __init dmi_disable_acpi(struct dmi_system_id *d)
 {
        if (!acpi_force) {
-               printk(KERN_NOTICE "%s detected: acpi off\n",d->ident);
+               printk(KERN_NOTICE "%s detected: acpi off\n", d->ident);
                disable_acpi();
        } else {
                printk(KERN_NOTICE
@@ -902,7 +885,8 @@
 static int __init force_acpi_ht(struct dmi_system_id *d)
 {
        if (!acpi_force) {
-               printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", 
d->ident);
+               printk(KERN_NOTICE "%s detected: force use of acpi=ht\n",
+                      d->ident);
                disable_acpi();
                acpi_ht = 1;
        } else {
@@ -921,155 +905,155 @@
         * Boxes that need ACPI disabled
         */
        {
-               .callback = dmi_disable_acpi,
-               .ident = "IBM Thinkpad",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
-                       DMI_MATCH(DMI_BOARD_NAME, "2629H1G"),
-               },
-       },
+        .callback = dmi_disable_acpi,
+        .ident = "IBM Thinkpad",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+                    DMI_MATCH(DMI_BOARD_NAME, "2629H1G"),
+                    },
+        },
 
        /*
         * Boxes that need acpi=ht
         */
        {
-               .callback = force_acpi_ht,
-               .ident = "FSC Primergy T850",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "FSC Primergy T850",
+        .matches = {
+                    DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+                    DMI_MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"),
+                    },
+        },
        {
-               .callback = force_acpi_ht,
-               .ident = "DELL GX240",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "Dell Computer 
Corporation"),
-                       DMI_MATCH(DMI_BOARD_NAME, "OptiPlex GX240"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "DELL GX240",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"),
+                    DMI_MATCH(DMI_BOARD_NAME, "OptiPlex GX240"),
+                    },
+        },
        {
-               .callback = force_acpi_ht,
-               .ident = "HP VISUALIZE NT Workstation",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT 
Workstation"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "HP VISUALIZE NT Workstation",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+                    DMI_MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"),
+                    },
+        },
        {
-               .callback = force_acpi_ht,
-               .ident = "Compaq Workstation W8000",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "Workstation W8000"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "Compaq Workstation W8000",
+        .matches = {
+                    DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+                    DMI_MATCH(DMI_PRODUCT_NAME, "Workstation W8000"),
+                    },
+        },
        {
-               .callback = force_acpi_ht,
-               .ident = "ASUS P4B266",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
-                       DMI_MATCH(DMI_BOARD_NAME, "P4B266"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "ASUS P4B266",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+                    DMI_MATCH(DMI_BOARD_NAME, "P4B266"),
+                    },
+        },
        {
-               .callback = force_acpi_ht,
-               .ident = "ASUS P2B-DS",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
-                       DMI_MATCH(DMI_BOARD_NAME, "P2B-DS"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "ASUS P2B-DS",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+                    DMI_MATCH(DMI_BOARD_NAME, "P2B-DS"),
+                    },
+        },
        {
-               .callback = force_acpi_ht,
-               .ident = "ASUS CUR-DLS",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
-                       DMI_MATCH(DMI_BOARD_NAME, "CUR-DLS"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "ASUS CUR-DLS",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+                    DMI_MATCH(DMI_BOARD_NAME, "CUR-DLS"),
+                    },
+        },
        {
-               .callback = force_acpi_ht,
-               .ident = "ABIT i440BX-W83977",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "ABIT 
<http://www.abit.com>"),
-                       DMI_MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "ABIT i440BX-W83977",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"),
+                    DMI_MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"),
+                    },
+        },
        {
-               .callback = force_acpi_ht,
-               .ident = "IBM Bladecenter",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
-                       DMI_MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter 
HS20"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "IBM Bladecenter",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+                    DMI_MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"),
+                    },
+        },
        {
-               .callback = force_acpi_ht,
-               .ident = "IBM eServer xSeries 360",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
-                       DMI_MATCH(DMI_BOARD_NAME, "eServer xSeries 360"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "IBM eServer xSeries 360",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+                    DMI_MATCH(DMI_BOARD_NAME, "eServer xSeries 360"),
+                    },
+        },
        {
-               .callback = force_acpi_ht,
-               .ident = "IBM eserver xSeries 330",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
-                       DMI_MATCH(DMI_BOARD_NAME, "eserver xSeries 330"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "IBM eserver xSeries 330",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+                    DMI_MATCH(DMI_BOARD_NAME, "eserver xSeries 330"),
+                    },
+        },
        {
-               .callback = force_acpi_ht,
-               .ident = "IBM eserver xSeries 440",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"),
-               },
-       },
+        .callback = force_acpi_ht,
+        .ident = "IBM eserver xSeries 440",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+                    DMI_MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"),
+                    },
+        },
 
-#ifdef CONFIG_ACPI_PCI
        /*
         * Boxes that need ACPI PCI IRQ routing disabled
         */
        {
-               .callback = disable_acpi_irq,
-               .ident = "ASUS A7V",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"),
-                       DMI_MATCH(DMI_BOARD_NAME, "<A7V>"),
-                       /* newer BIOS, Revision 1011, does work */
-                       DMI_MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS 
Revision 1007"),
-               },
-       },
+        .callback = disable_acpi_irq,
+        .ident = "ASUS A7V",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"),
+                    DMI_MATCH(DMI_BOARD_NAME, "<A7V>"),
+                    /* newer BIOS, Revision 1011, does work */
+                    DMI_MATCH(DMI_BIOS_VERSION,
+                              "ASUS A7V ACPI BIOS Revision 1007"),
+                    },
+        },
 
        /*
         * Boxes that need ACPI PCI IRQ routing and PCI scan disabled
         */
-       {       /* _BBN 0 bug */
-               .callback = disable_acpi_pci,
-               .ident = "ASUS PR-DLS",
-               .matches = {
-                       DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
-                       DMI_MATCH(DMI_BOARD_NAME, "PR-DLS"),
-                       DMI_MATCH(DMI_BIOS_VERSION, "ASUS PR-DLS ACPI BIOS 
Revision 1010"),
-                       DMI_MATCH(DMI_BIOS_DATE, "03/21/2003")
-               },
-       },
+       {                       /* _BBN 0 bug */
+        .callback = disable_acpi_pci,
+        .ident = "ASUS PR-DLS",
+        .matches = {
+                    DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+                    DMI_MATCH(DMI_BOARD_NAME, "PR-DLS"),
+                    DMI_MATCH(DMI_BIOS_VERSION,
+                              "ASUS PR-DLS ACPI BIOS Revision 1010"),
+                    DMI_MATCH(DMI_BIOS_DATE, "03/21/2003")
+                    },
+        },
        {
-               .callback = disable_acpi_pci,
-               .ident = "Acer TravelMate 36x Laptop",
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
-               },
-       },
-#endif
-       { }
+        .callback = disable_acpi_pci,
+        .ident = "Acer TravelMate 36x Laptop",
+        .matches = {
+                    DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+                    DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
+                    },
+        },
+       {}
 };
 
-#endif /* __i386__ */
+#endif                         /* __i386__ */
 
 /*
  * acpi_boot_table_init() and acpi_boot_init()
@@ -1094,8 +1078,7 @@
  *     !0: failure
  */
 
-int __init
-acpi_boot_table_init(void)
+int __init acpi_boot_table_init(void)
 {
        int error;
 
@@ -1108,7 +1091,7 @@
         * One exception: acpi=ht continues far enough to enumerate LAPICs
         */
        if (acpi_disabled && !acpi_ht)
-                return 1;
+               return 1;
 
        /* 
         * Initialize the ACPI boot-time table parser.
@@ -1118,7 +1101,6 @@
                disable_acpi();
                return error;
        }
-
 #ifdef __i386__
        check_acpi_pci();
 #endif
@@ -1142,7 +1124,6 @@
        return 0;
 }
 
-
 int __init acpi_boot_init(void)
 {
        /*
@@ -1150,7 +1131,7 @@
         * One exception: acpi=ht continues far enough to enumerate LAPICs
         */
        if (acpi_disabled && !acpi_ht)
-                return 1;
+               return 1;
 
        acpi_table_parse(ACPI_BOOT, acpi_parse_sbf);
 
@@ -1168,4 +1149,3 @@
 
        return 0;
 }
-
diff -urN linux/arch/i386/kernel/acpi/earlyquirk.c 
linux/arch/i386/kernel/acpi/earlyquirk.c
--- linux/arch/i386/kernel/acpi/earlyquirk.c    2004/12/04 18:15:58     1.1
+++ linux/arch/i386/kernel/acpi/earlyquirk.c    2005/09/15 08:52:56     1.2
@@ -7,45 +7,55 @@
 #include <linux/pci.h>
 #include <asm/pci-direct.h>
 #include <asm/acpi.h>
+#include <asm/apic.h>
 
-static int __init check_bridge(int vendor, int device) 
+static int __init check_bridge(int vendor, int device)
 {
        /* According to Nvidia all timer overrides are bogus. Just ignore
           them all. */
-       if (vendor == PCI_VENDOR_ID_NVIDIA) { 
-               acpi_skip_timer_override = 1;           
+       if (vendor == PCI_VENDOR_ID_NVIDIA) {
+               acpi_skip_timer_override = 1;
        }
+#ifdef CONFIG_X86_LOCAL_APIC
+       /*
+        * ATI IXP chipsets get double timer interrupts.
+        * For now just do this for all ATI chipsets.
+        * FIXME: this needs to be checked for the non ACPI case too.
+        */
+       if (vendor == PCI_VENDOR_ID_ATI)
+               disable_timer_pin_1 = 1;
+#endif
        return 0;
 }
-   
-void __init check_acpi_pci(void) 
-{ 
-       int num,slot,func; 
+
+void __init check_acpi_pci(void)
+{
+       int num,