rpms/kernel-xen-2.6/devel .gitignore, 1.1, 1.2 gen-patches, 1.1, 1.2 linux-2.6-acpi-eeepc-hotkey.patch, 1.1, 1.2 linux-2.6-at76.patch, 1.1, 1.2 linux-2.6-blkcipher-depend-on-chainiv.patch, 1.1, 1.2 linux-2.6-compile-fix-gcc-43.patch, 1.1, 1.2 linux-2.6-compile-fixes.patch, 1.3, 1.4 linux-2.6-debug-acpi-os-write-port.patch, 1.1, 1.2 linux-2.6-default-mmf_dump_elf_headers.patch, 1.1, 1.2 linux-2.6-drm-add-i915-radeon-mdt.patch, 1.1, 1.2 linux-2.6-drm-git-i915-remove-priv-access.patch, 1.1, 1.2 linux-2.6-drm-git-mm-revert-nopfn.patch, 1.1, 1.2 linux-2.6-drm-git-mm.patch, 1.1, 1.2 linux-2.6-e1000-corrupt-eeprom-checksum.patch, 1.1, 1.2 linux-2.6-e1000-ich9.patch, 1.1, 1.2 linux-2.6-ext4-stable-queue.patch, 1.1, 1.2 linux-2.6-firewire-git-pending.patch, 1.1, 1.2 linux-2.6-firewire-git-update.patch, 1.1, 1.2 linux-2.6-hotfixes.patch, 1.1, 1.2 linux-2.6-ia32-syscall-restart.patch, 1.1, 1.2 linux-2.6-lirc.patch, 1.1, 1.2 linux-2.6-netdev-atl2.patch, 1.1, 1.2 linux-2.6-netdev-e1000-disable-alpm.patch, 1.1, 1.2 linux-2.6-ppc-rtc.patch, 1.1, 1.2 linux-2.6-ppc-use-libgcc.patch, 1.1, 1.2 linux-2.6-ps3-legacy-bootloader-hack.patch, 1.1, 1.2 linux-2.6-ps3-storage-alias.patch, 1.1, 1.2 linux-2.6-scsi-mpt-vmware-fix.patch, 1.1, 1.2 linux-2.6-smarter-relatime.patch, 1.1, 1.2 linux-2.6-usb-ehci-hcd-respect-nousb.patch, 1.1, 1.2 linux-2.6-utrace-ptrace-compat-avr32.patch, 1.1, 1.2 linux-2.6-utrace-regset-avr32.patch, 1.1, 1.2 linux-2.6-utrace-tracehook-avr32.patch, 1.1, 1.2 linux-2.6-uvcvideo.patch, 1.1, 1.2 linux-2.6-vio-modalias.patch, 1.1, 1.2 linux-2.6-virtio_blk-fix-sysfs-bits.patch, 1.1, 1.2 linux-2.6-wireless-pending-too.patch, 1.1, 1.2 linux-2.6-wireless-pending.patch, 1.1, 1.2 linux-2.6-x86-debug-boot.patch, 1.1, 1.2 linux-2.6-xen-0001-Revert-linux-2.6-execshield.patch.patch, 1.1, 1.2 linux-2.6-xen-0002-squashfs-Fix-build-without-CONFIG_SMP.patch, 1.1, 1.2 linux-2.6-xen-0003-xen-Make-hvc0-the-preferred-console-in-domU.patch, 1.1, 1.2 linux-2.6-xen-0004-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch, 1.1, 1.2 linux-2.6-xen-0005-fbdev-Make-deferred-I-O-work-as-advertized.patch, 1.1, 1.2 linux-2.6-xen-0006-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch, 1.1, 1.2 linux-2.6-xen-0007-xen-Module-autoprobing-support-for-frontend-drivers.patch, 1.1, 1.2 linux-2.6-xen-0008-xen-Add-compatibility-aliases-for-frontend-drivers.patch, 1.1, 1.2 linux-2.6-xen-0009-xen-Add-a-vmlinuz-target.patch, 1.1, 1.2 linux-2.6-xen-0010-xen-Add-empty-xenctrl-module.patch, 1.1, 1.2 linux-2.6-xen-0011-xen-Add-proc-xen-capabilities.patch, 1.1, 1.2 linux-2.6-xen-0012-xen-Add-proc-xen-privcmd.patch, 1.1, 1.2 linux-2.6-xen-0013-xen-Add-proc-xen-xenbus.patch, 1.1, 1.2 linux-2.6-xen-0014-xen-Add-Xen-s-sys-hypervisor-interface.patch, 1.1, 1.2 linux-2.6-xen-0015-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch, 1.1, 1.2 linux-2.6-xen-0016-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch, 1.1, 1.2 linux-2.6-xen-0017-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch, 1.1, 1.2 linux-2.6.24.tar.bz2.sign, 1.1, 1.2 mirrors, 1.1, 1.2 patch-2.6.25-rc4.bz2.sign, 1.1, 1.2 upstream, 1.1, 1.2 upstream-key.gpg, 1.1, 1.2 .cvsignore, 1.11, 1.12 Makefile, 1.2, 1.3 Makefile.config, 1.2, 1.3 config-debug, 1.2, 1.3 config-generic, 1.2, 1.3 config-i586, 1.2, 1.3 config-ia64-generic, 1.2, 1.3 config-nodebug, 1.2, 1.3 config-powerpc-generic, 1.2, 1.3 config-powerpc32-generic, 1.2, 1.3 config-powerpc64, 1.2, 1.3 config-s390x, 1.2, 1.3 config-sparc-generic, 1.2, 1.3 config-sparc64-generic, 1.2, 1.3 config-x86-generic, 1.2, 1.3 config-x86_64-generic, 1.2, 1.3 config-xen-generic, 1.2, 1.3 config-xen-ia64, 1.2, 1.3 config-xen-x86, 1.2, 1.3 config-xen-x86_64, 1.2, 1.3 kernel.spec, 1.13, 1.14 linux-2.6-ata-quirk.patch, 1.2, 1.3 linux-2.6-build-nonintconfig.patch, 1.1, 1.2 linux-2.6-crash-driver.patch, 1.2, 1.3 linux-2.6-cve-2008-0600.patch, 1.1, 1.2 linux-2.6-debug-nmi-timeout.patch, 1.2, 1.3 linux-2.6-debug-no-quiet.patch, 1.2, 1.3 linux-2.6-debug-sizeof-structs.patch, 1.2, 1.3 linux-2.6-debug-spinlock-taint.patch, 1.1, 1.2 linux-2.6-debug-taint-vm.patch, 1.3, 1.4 linux-2.6-defaults-fat-utf8.patch, 1.1, 1.2 linux-2.6-devmem.patch, 1.3, 1.4 linux-2.6-execshield.patch, 1.3, 1.4 linux-2.6-input-kill-stupid-messages.patch, 1.1, 1.2 linux-2.6-net-silence-noisy-printks.patch, 1.2, 1.3 linux-2.6-ppc32-ucmpdi2.patch, 1.1, 1.2 linux-2.6-ps3-ehci-iso.patch, 1.2, 1.3 linux-2.6-selinux-mprotect-checks.patch, 1.1, 1.2 linux-2.6-serial-460800.patch, 1.1, 1.2 linux-2.6-silence-noise.patch, 1.3, 1.4 linux-2.6-squashfs.patch, 1.3, 1.4 linux-2.6-utrace-core.patch, 1.2, 1.3 linux-2.6-utrace-ptrace-compat-ia64.patch, 1.2, 1.3 linux-2.6-utrace-ptrace-compat-s390.patch, 1.2, 1.3 linux-2.6-utrace-ptrace-compat-sparc64.patch, 1.2, 1.3 linux-2.6-utrace-ptrace-compat.patch, 1.2, 1.3 linux-2.6-utrace-regset-ia64.patch, 1.2, 1.3 linux-2.6-utrace-regset-s390.patch, 1.2, 1.3 linux-2.6-utrace-regset-sparc64.patch, 1.2, 1.3 linux-2.6-utrace-regset.patch, 1.2, 1.3 linux-2.6-utrace-tracehook-ia64.patch, 1.2, 1.3 linux-2.6-utrace-tracehook-s390.patch, 1.2, 1.3 linux-2.6-utrace-tracehook-sparc64.patch, 1.2, 1.3 linux-2.6-utrace-tracehook-um.patch, 1.2, 1.3 linux-2.6-utrace-tracehook.patch, 1.2, 1.3 linux-2.6-wireless.patch, 1.2, 1.3 linux-2.6-x86-tune-generic.patch, 1.1, 1.2 nouveau-drm.patch, 1.2, 1.3 sources, 1.11, 1.12 xen-build-id.patch, 1.2, 1.3 xen-compile-fix.patch, 1.3, 1.4 xen-syms-build-id.patch, 1.2, 1.3 config-olpc-generic, 1.1, NONE git-wireless-dev.patch, 1.2, NONE kernel-2.6.21.7-i686-xen.config, 1.3, NONE kernel-2.6.21.7-x86_64-xen.config, 1.3, NONE linux-2.6-2110_scsi-sd-printing.patch, 1.2, NONE linux-2.6-2111_sd-start-stop.patch, 1.2, NONE linux-2.6-2112_libata-suspend.patch, 1.2, NONE linux-2.6-2113_libata-spindown-compat.patch, 1.2, NONE linux-2.6-2114_libata-shutdown-warning.patch, 1.2, NONE linux-2.6-2115_libata-spindown-status.patch, 1.2, NONE linux-2.6-2116_libata-remove-spindown-compat.patch, 1.2, NONE linux-2.6-2117_sata-via-suspend.patch, 1.2, NONE linux-2.6-2118_scsi-constants.patch, 1.2, NONE linux-2.6-3w-9xxx-mem_len.patch, 1.1, NONE linux-2.6-PT_LOAD-align.patch, 1.1, NONE linux-2.6-acpi-boot-regression.patch, 1.2, NONE linux-2.6-acpi-config_pm-poweroff.patch, 1.1, NONE linux-2.6-acpi-dock-oops.patch, 1.2, NONE linux-2.6-acpi-keep-tsc-stable-when-lapic-timer-c2-ok-is-set.patch, 1.2, NONE linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch, 1.2, NONE linux-2.6-acpi-unblacklist-dell-gx240.patch, 1.2, NONE linux-2.6-amd-disabled-svm-detect-msr-1.patch, 1.2, NONE linux-2.6-amd-disabled-svm-detect.patch, 1.2, NONE linux-2.6-ata-call-check-dma-with-qc-prepared.patch, 1.2, NONE linux-2.6-ata-use-pio-for-non-16-byte-xfers.patch, 1.2, NONE linux-2.6-bcm43xx-pci-neuter.patch, 1.2, NONE linux-2.6-cell-spu-device-tree.patch, 1.2, NONE linux-2.6-cell-spufs-fixes.patch, 1.2, NONE linux-2.6-clockevents-fix-resume-logic.patch, 1.2, NONE linux-2.6-common-uevent.patch, 1.2, NONE linux-2.6-crap-sysfs-workaround.patch, 1.2, NONE linux-2.6-crash-driver-xen.patch, 1.2, NONE linux-2.6-debug-boot-delay.patch, 1.2, NONE linux-2.6-debug-extra-warnings.patch, 1.2, NONE linux-2.6-debug-must_check.patch, 1.1, NONE linux-2.6-debug-slab-backtrace.patch, 1.1, NONE linux-2.6-debug-sysfs-crash-debugging-xen.patch, 1.2, NONE linux-2.6-debug-sysfs-crash-debugging.patch, 1.2, NONE linux-2.6-defaults-nonmi.patch, 1.1, NONE linux-2.6-defaults-pci_no_msi_mmconf.patch, 1.2, NONE linux-2.6-defaults-unicode-vt.patch, 1.1, NONE linux-2.6-devmem-xen.patch, 1.2, NONE linux-2.6-disable-netback-checksum.patch, 1.3, NONE linux-2.6-dvb-spinlock.patch, 1.2, NONE linux-2.6-execshield-xen.patch, 1.2, NONE linux-2.6-firewire-be32-fix.patch, 1.2, NONE linux-2.6-firewire.patch, 1.2, NONE linux-2.6-fix-pmops-1.patch, 1.2, NONE linux-2.6-fix-pmops-2.patch, 1.2, NONE linux-2.6-fix-pmops-3.patch, 1.2, NONE linux-2.6-fix-pmops-4.patch, 1.2, NONE linux-2.6-gfs2-update.patch, 1.2, NONE linux-2.6-i82875-edac-pci-setup.patch, 1.2, NONE linux-2.6-i965gm-support.patch, 1.2, NONE linux-2.6-ibmvscsi-schizo.patch, 1.1, NONE linux-2.6-kvm-19.patch, 1.2, NONE linux-2.6-kvm-reinit-real-mode-tss.patch, 1.2, NONE linux-2.6-libata-atiixp-ids.patch, 1.2, NONE linux-2.6-libata-hpa.patch, 1.2, NONE linux-2.6-libata-ich8m-add-pciid.patch, 1.2, NONE linux-2.6-libata-ncq-blacklist-2.6.22-rc7.patch, 1.2, NONE linux-2.6-libata-pata-hpt3x2n-correct-revision-boundary.patch, 1.2, NONE linux-2.6-libata-pata-pcmcia-new-ident.patch, 1.2, NONE linux-2.6-libata-pata-sis-fix-timing.patch, 1.2, NONE linux-2.6-libata-pata_dma-param.patch, 1.2, NONE linux-2.6-libata-pata_it821x-partly-fix-dma.patch, 1.2, NONE linux-2.6-libata-sata_nv-adma.patch, 1.2, NONE linux-2.6-libata-sata_nv-wildcard-removal.patch, 1.2, NONE linux-2.6-libata-setxfer.patch, 1.2, NONE linux-2.6-libata_ali_max_dma_speed.patch, 1.2, NONE linux-2.6-libertas.diff, 1.2, NONE linux-2.6-mm-udf-fixes.patch, 1.2, NONE linux-2.6-modsign-core.patch, 1.3, NONE linux-2.6-modsign-crypto.patch, 1.3, NONE linux-2.6-modsign-include.patch, 1.3, NONE linux-2.6-modsign-ksign.patch, 1.3, NONE linux-2.6-modsign-mpilib.patch, 1.3, NONE linux-2.6-modsign-script.patch, 1.3, NONE linux-2.6-modsign-verify.patch, 1.1, NONE linux-2.6-module_version.patch, 1.2, NONE linux-2.6-mpc52xx-fec.patch, 1.2, NONE linux-2.6-mpc52xx-sdma.patch, 1.2, NONE linux-2.6-net-e1000-no-msi-warning.patch, 1.2, NONE linux-2.6-netdev-e1000e-01.patch, 1.1, NONE linux-2.6-netdev-e1000e-02.patch, 1.1, NONE linux-2.6-netdev-e1000e-03.patch, 1.1, NONE linux-2.6-netdev-e1000e-04.patch, 1.1, NONE linux-2.6-netdev-e1000e-05.patch, 1.1, NONE linux-2.6-netdev-e1000e-06.patch, 1.1, NONE linux-2.6-netdev-e1000e-07.patch, 1.1, NONE linux-2.6-netdev-e1000e-08.patch, 1.1, NONE linux-2.6-netdev-e1000e-09.patch, 1.1, NONE linux-2.6-netdev-e1000e-10.patch, 1.1, NONE linux-2.6-netdev-e1000e-backport.patch, 1.1, NONE linux-2.6-nfs-missing-braces.patch, 1.2, NONE linux-2.6-nfs-noreaddirplus.patch, 1.2, NONE linux-2.6-olpc-touchpad.diff, 1.2, NONE linux-2.6-ondemand-timer.patch, 1.2, NONE linux-2.6-oprofile-0.9.3.patch, 1.1, NONE linux-2.6-optimise-spinlock-debug.patch, 1.1, NONE linux-2.6-pmac-zilog.patch, 1.2, NONE linux-2.6-powermac-generic-suspend-1.patch, 1.2, NONE linux-2.6-powermac-generic-suspend-2.patch, 1.2, NONE linux-2.6-powermac-generic-suspend-3.patch, 1.2, NONE linux-2.6-powermac-generic-suspend-4.patch, 1.2, NONE linux-2.6-powerpc-reserve-initrd-1.patch, 1.2, NONE linux-2.6-powerpc-reserve-initrd-2.patch, 1.2, NONE linux-2.6-powerpc-slabalign.patch, 1.2, NONE linux-2.6-ppc-data-exception.patch, 1.2, NONE linux-2.6-proc-self-maps-fix.patch, 1.2, NONE linux-2.6-ps3-clear-spu-irq.patch, 1.2, NONE linux-2.6-ps3-device-init.patch, 1.2, NONE linux-2.6-ps3-ethernet-autoload.patch, 1.2, NONE linux-2.6-ps3-ethernet-modular.patch, 1.2, NONE linux-2.6-ps3-gelic-wireless.patch, 1.2, NONE linux-2.6-ps3-gelic.patch, 1.2, NONE linux-2.6-ps3-kexec.patch, 1.2, NONE linux-2.6-ps3-legacy-ioport.patch, 1.2, NONE linux-2.6-ps3-memory-probe.patch, 1.2, NONE linux-2.6-ps3-smp-boot.patch, 1.2, NONE linux-2.6-ps3-sound-autoload.patch, 1.2, NONE linux-2.6-ps3-sound.patch, 1.2, NONE linux-2.6-ps3-stable-patches.patch, 1.2, NONE linux-2.6-ps3-storage.patch, 1.2, NONE linux-2.6-ps3-system-bus-rework-2.patch, 1.2, NONE linux-2.6-ps3-system-bus-rework.patch, 1.2, NONE linux-2.6-ps3-usb-autoload.patch, 1.2, NONE linux-2.6-ps3-wrap-spu-runctl.patch, 1.2, NONE linux-2.6-ps3av-export-header.patch, 1.2, NONE linux-2.6-ps3fb-panic.patch, 1.2, NONE linux-2.6-raid-autorun.patch, 1.1, NONE linux-2.6-remove-unnecessary-cast-in-prefetch.patch, 1.1, NONE linux-2.6-scsi-bounce-isa.patch, 1.2, NONE linux-2.6-sha_alignment.patch, 1.1, NONE linux-2.6-softirq-printout-irq-trace-events.patch, 1.2, NONE linux-2.6-softlockup-disable.patch, 1.2, NONE linux-2.6-sumversion-limits-dot-h.patch, 1.1, NONE linux-2.6-suspend-ordering.patch, 1.2, NONE linux-2.6-sysfs-inode-allocator-oops.patch, 1.2, NONE linux-2.6-udf-2.6.22-rc2-1-udf_data_corruption.patch, 1.2, NONE linux-2.6-udf-2.6.22-rc4-1-udf_block_leak.patch, 1.2, NONE linux-2.6-uevent-ebus.patch, 1.1, NONE linux-2.6-uevent-macio.patch, 1.1, NONE linux-2.6-uevent-of_platform.patch, 1.1, NONE linux-2.6-unexport-symbols.patch, 1.1, NONE linux-2.6-usb-autosuspend-default-disable.patch, 1.2, NONE linux-2.6-use-build-id-ld-option.patch, 1.2, NONE linux-2.6-utrace-ptrace-compat-xen.patch, 1.2, NONE linux-2.6-utrace-recalc_sigpending_and_wake.patch, 1.2, NONE linux-2.6-utrace-sig_kernel-macros.patch, 1.2, NONE linux-2.6-utrace-tracehook-xen.patch, 1.2, NONE linux-2.6-vm-invalidate_mapping_pages-cond-resched.patch, 1.2, NONE linux-2.6-vm-silence-atomic-alloc-failures.patch, 1.1, NONE linux-2.6-wakeups-hdaps.patch, 1.2, NONE linux-2.6-x86-64-edac-support.patch, 1.1, NONE linux-2.6-x86-64_pmtrace.patch, 1.2, NONE linux-2.6-x86-dell-hpet.patch, 1.2, NONE linux-2.6-x86-dont-delete-cpu_devs-data.patch, 1.2, NONE linux-2.6-x86-fsc-interrupt-controller-quirk.patch, 1.2, NONE linux-2.6-x86-vga-vidfail.patch, 1.1, NONE linux-2.6-x86_64-silence-up-apic-errors-xen.patch, 1.2, NONE linux-2.6-x86_64-silence-up-apic-errors.patch, 1.1, NONE linux-2.6-xen-backwards-time.patch, 1.1, NONE linux-2.6-xen-blkfront-wait-add.patch, 1.3, NONE linux-2.6-xen-fix-irq-warn-mismerge.patch, 1.1, NONE linux-2.6-xen-irq_vector-uninitialize.patch, 1.1, NONE linux-2.6-xen-paravirt-nographics-pvfb-fix.patch, 1.2, NONE linux-2.6-xen-privcmd-use-nopfn.patch, 1.1, NONE linux-2.6-xen-sleazy-fpu-i386.patch, 1.1, NONE linux-2.6-xen-sleazy-fpu-x86_64.patch, 1.1, NONE linux-2.6.20.tar.bz2.sign, 1.1, NONE

Mark McLoughlin (markmc) fedora-extras-commits at redhat.com
Thu Mar 6 14:01:16 UTC 2008


Author: markmc

Update of /cvs/pkgs/rpms/kernel-xen-2.6/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22915

Modified Files:
	.cvsignore Makefile Makefile.config config-debug 
	config-generic config-i586 config-ia64-generic config-nodebug 
	config-powerpc-generic config-powerpc32-generic 
	config-powerpc64 config-s390x config-sparc-generic 
	config-sparc64-generic config-x86-generic 
	config-x86_64-generic config-xen-generic config-xen-ia64 
	config-xen-x86 config-xen-x86_64 kernel.spec 
	linux-2.6-ata-quirk.patch linux-2.6-build-nonintconfig.patch 
	linux-2.6-crash-driver.patch linux-2.6-cve-2008-0600.patch 
	linux-2.6-debug-nmi-timeout.patch 
	linux-2.6-debug-no-quiet.patch 
	linux-2.6-debug-sizeof-structs.patch 
	linux-2.6-debug-spinlock-taint.patch 
	linux-2.6-debug-taint-vm.patch 
	linux-2.6-defaults-fat-utf8.patch linux-2.6-devmem.patch 
	linux-2.6-execshield.patch 
	linux-2.6-input-kill-stupid-messages.patch 
	linux-2.6-net-silence-noisy-printks.patch 
	linux-2.6-ppc32-ucmpdi2.patch linux-2.6-ps3-ehci-iso.patch 
	linux-2.6-selinux-mprotect-checks.patch 
	linux-2.6-serial-460800.patch linux-2.6-silence-noise.patch 
	linux-2.6-squashfs.patch linux-2.6-utrace-core.patch 
	linux-2.6-utrace-ptrace-compat-ia64.patch 
	linux-2.6-utrace-ptrace-compat-s390.patch 
	linux-2.6-utrace-ptrace-compat-sparc64.patch 
	linux-2.6-utrace-ptrace-compat.patch 
	linux-2.6-utrace-regset-ia64.patch 
	linux-2.6-utrace-regset-s390.patch 
	linux-2.6-utrace-regset-sparc64.patch 
	linux-2.6-utrace-regset.patch 
	linux-2.6-utrace-tracehook-ia64.patch 
	linux-2.6-utrace-tracehook-s390.patch 
	linux-2.6-utrace-tracehook-sparc64.patch 
	linux-2.6-utrace-tracehook-um.patch 
	linux-2.6-utrace-tracehook.patch linux-2.6-wireless.patch 
	linux-2.6-x86-tune-generic.patch nouveau-drm.patch sources 
	xen-build-id.patch xen-compile-fix.patch 
	xen-syms-build-id.patch 
Added Files:
	.gitignore gen-patches linux-2.6-acpi-eeepc-hotkey.patch 
	linux-2.6-at76.patch 
	linux-2.6-blkcipher-depend-on-chainiv.patch 
	linux-2.6-compile-fix-gcc-43.patch 
	linux-2.6-compile-fixes.patch 
	linux-2.6-debug-acpi-os-write-port.patch 
	linux-2.6-default-mmf_dump_elf_headers.patch 
	linux-2.6-drm-add-i915-radeon-mdt.patch 
	linux-2.6-drm-git-i915-remove-priv-access.patch 
	linux-2.6-drm-git-mm-revert-nopfn.patch 
	linux-2.6-drm-git-mm.patch 
	linux-2.6-e1000-corrupt-eeprom-checksum.patch 
	linux-2.6-e1000-ich9.patch linux-2.6-ext4-stable-queue.patch 
	linux-2.6-firewire-git-pending.patch 
	linux-2.6-firewire-git-update.patch linux-2.6-hotfixes.patch 
	linux-2.6-ia32-syscall-restart.patch linux-2.6-lirc.patch 
	linux-2.6-netdev-atl2.patch 
	linux-2.6-netdev-e1000-disable-alpm.patch 
	linux-2.6-ppc-rtc.patch linux-2.6-ppc-use-libgcc.patch 
	linux-2.6-ps3-legacy-bootloader-hack.patch 
	linux-2.6-ps3-storage-alias.patch 
	linux-2.6-scsi-mpt-vmware-fix.patch 
	linux-2.6-smarter-relatime.patch 
	linux-2.6-usb-ehci-hcd-respect-nousb.patch 
	linux-2.6-utrace-ptrace-compat-avr32.patch 
	linux-2.6-utrace-regset-avr32.patch 
	linux-2.6-utrace-tracehook-avr32.patch 
	linux-2.6-uvcvideo.patch linux-2.6-vio-modalias.patch 
	linux-2.6-virtio_blk-fix-sysfs-bits.patch 
	linux-2.6-wireless-pending-too.patch 
	linux-2.6-wireless-pending.patch 
	linux-2.6-x86-debug-boot.patch 
	linux-2.6-xen-0001-Revert-linux-2.6-execshield.patch.patch 
	linux-2.6-xen-0002-squashfs-Fix-build-without-CONFIG_SMP.patch 
	linux-2.6-xen-0003-xen-Make-hvc0-the-preferred-console-in-domU.patch 
	linux-2.6-xen-0004-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch 
	linux-2.6-xen-0005-fbdev-Make-deferred-I-O-work-as-advertized.patch 
	linux-2.6-xen-0006-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch 
	linux-2.6-xen-0007-xen-Module-autoprobing-support-for-frontend-drivers.patch 
	linux-2.6-xen-0008-xen-Add-compatibility-aliases-for-frontend-drivers.patch 
	linux-2.6-xen-0009-xen-Add-a-vmlinuz-target.patch 
	linux-2.6-xen-0010-xen-Add-empty-xenctrl-module.patch 
	linux-2.6-xen-0011-xen-Add-proc-xen-capabilities.patch 
	linux-2.6-xen-0012-xen-Add-proc-xen-privcmd.patch 
	linux-2.6-xen-0013-xen-Add-proc-xen-xenbus.patch 
	linux-2.6-xen-0014-xen-Add-Xen-s-sys-hypervisor-interface.patch 
	linux-2.6-xen-0015-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch 
	linux-2.6-xen-0016-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch 
	linux-2.6-xen-0017-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch 
	linux-2.6.24.tar.bz2.sign mirrors patch-2.6.25-rc4.bz2.sign 
	upstream upstream-key.gpg 
Removed Files:
	config-olpc-generic git-wireless-dev.patch 
	kernel-2.6.21.7-i686-xen.config 
	kernel-2.6.21.7-x86_64-xen.config 
	linux-2.6-2110_scsi-sd-printing.patch 
	linux-2.6-2111_sd-start-stop.patch 
	linux-2.6-2112_libata-suspend.patch 
	linux-2.6-2113_libata-spindown-compat.patch 
	linux-2.6-2114_libata-shutdown-warning.patch 
	linux-2.6-2115_libata-spindown-status.patch 
	linux-2.6-2116_libata-remove-spindown-compat.patch 
	linux-2.6-2117_sata-via-suspend.patch 
	linux-2.6-2118_scsi-constants.patch 
	linux-2.6-3w-9xxx-mem_len.patch linux-2.6-PT_LOAD-align.patch 
	linux-2.6-acpi-boot-regression.patch 
	linux-2.6-acpi-config_pm-poweroff.patch 
	linux-2.6-acpi-dock-oops.patch 
	linux-2.6-acpi-keep-tsc-stable-when-lapic-timer-c2-ok-is-set.patch 
	linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch 
	linux-2.6-acpi-unblacklist-dell-gx240.patch 
	linux-2.6-amd-disabled-svm-detect-msr-1.patch 
	linux-2.6-amd-disabled-svm-detect.patch 
	linux-2.6-ata-call-check-dma-with-qc-prepared.patch 
	linux-2.6-ata-use-pio-for-non-16-byte-xfers.patch 
	linux-2.6-bcm43xx-pci-neuter.patch 
	linux-2.6-cell-spu-device-tree.patch 
	linux-2.6-cell-spufs-fixes.patch 
	linux-2.6-clockevents-fix-resume-logic.patch 
	linux-2.6-common-uevent.patch 
	linux-2.6-crap-sysfs-workaround.patch 
	linux-2.6-crash-driver-xen.patch 
	linux-2.6-debug-boot-delay.patch 
	linux-2.6-debug-extra-warnings.patch 
	linux-2.6-debug-must_check.patch 
	linux-2.6-debug-slab-backtrace.patch 
	linux-2.6-debug-sysfs-crash-debugging-xen.patch 
	linux-2.6-debug-sysfs-crash-debugging.patch 
	linux-2.6-defaults-nonmi.patch 
	linux-2.6-defaults-pci_no_msi_mmconf.patch 
	linux-2.6-defaults-unicode-vt.patch linux-2.6-devmem-xen.patch 
	linux-2.6-disable-netback-checksum.patch 
	linux-2.6-dvb-spinlock.patch linux-2.6-execshield-xen.patch 
	linux-2.6-firewire-be32-fix.patch linux-2.6-firewire.patch 
	linux-2.6-fix-pmops-1.patch linux-2.6-fix-pmops-2.patch 
	linux-2.6-fix-pmops-3.patch linux-2.6-fix-pmops-4.patch 
	linux-2.6-gfs2-update.patch 
	linux-2.6-i82875-edac-pci-setup.patch 
	linux-2.6-i965gm-support.patch linux-2.6-ibmvscsi-schizo.patch 
	linux-2.6-kvm-19.patch 
	linux-2.6-kvm-reinit-real-mode-tss.patch 
	linux-2.6-libata-atiixp-ids.patch linux-2.6-libata-hpa.patch 
	linux-2.6-libata-ich8m-add-pciid.patch 
	linux-2.6-libata-ncq-blacklist-2.6.22-rc7.patch 
	linux-2.6-libata-pata-hpt3x2n-correct-revision-boundary.patch 
	linux-2.6-libata-pata-pcmcia-new-ident.patch 
	linux-2.6-libata-pata-sis-fix-timing.patch 
	linux-2.6-libata-pata_dma-param.patch 
	linux-2.6-libata-pata_it821x-partly-fix-dma.patch 
	linux-2.6-libata-sata_nv-adma.patch 
	linux-2.6-libata-sata_nv-wildcard-removal.patch 
	linux-2.6-libata-setxfer.patch 
	linux-2.6-libata_ali_max_dma_speed.patch 
	linux-2.6-libertas.diff linux-2.6-mm-udf-fixes.patch 
	linux-2.6-modsign-core.patch linux-2.6-modsign-crypto.patch 
	linux-2.6-modsign-include.patch linux-2.6-modsign-ksign.patch 
	linux-2.6-modsign-mpilib.patch linux-2.6-modsign-script.patch 
	linux-2.6-modsign-verify.patch linux-2.6-module_version.patch 
	linux-2.6-mpc52xx-fec.patch linux-2.6-mpc52xx-sdma.patch 
	linux-2.6-net-e1000-no-msi-warning.patch 
	linux-2.6-netdev-e1000e-01.patch 
	linux-2.6-netdev-e1000e-02.patch 
	linux-2.6-netdev-e1000e-03.patch 
	linux-2.6-netdev-e1000e-04.patch 
	linux-2.6-netdev-e1000e-05.patch 
	linux-2.6-netdev-e1000e-06.patch 
	linux-2.6-netdev-e1000e-07.patch 
	linux-2.6-netdev-e1000e-08.patch 
	linux-2.6-netdev-e1000e-09.patch 
	linux-2.6-netdev-e1000e-10.patch 
	linux-2.6-netdev-e1000e-backport.patch 
	linux-2.6-nfs-missing-braces.patch 
	linux-2.6-nfs-noreaddirplus.patch linux-2.6-olpc-touchpad.diff 
	linux-2.6-ondemand-timer.patch linux-2.6-oprofile-0.9.3.patch 
	linux-2.6-optimise-spinlock-debug.patch 
	linux-2.6-pmac-zilog.patch 
	linux-2.6-powermac-generic-suspend-1.patch 
	linux-2.6-powermac-generic-suspend-2.patch 
	linux-2.6-powermac-generic-suspend-3.patch 
	linux-2.6-powermac-generic-suspend-4.patch 
	linux-2.6-powerpc-reserve-initrd-1.patch 
	linux-2.6-powerpc-reserve-initrd-2.patch 
	linux-2.6-powerpc-slabalign.patch 
	linux-2.6-ppc-data-exception.patch 
	linux-2.6-proc-self-maps-fix.patch 
	linux-2.6-ps3-clear-spu-irq.patch 
	linux-2.6-ps3-device-init.patch 
	linux-2.6-ps3-ethernet-autoload.patch 
	linux-2.6-ps3-ethernet-modular.patch 
	linux-2.6-ps3-gelic-wireless.patch linux-2.6-ps3-gelic.patch 
	linux-2.6-ps3-kexec.patch linux-2.6-ps3-legacy-ioport.patch 
	linux-2.6-ps3-memory-probe.patch linux-2.6-ps3-smp-boot.patch 
	linux-2.6-ps3-sound-autoload.patch linux-2.6-ps3-sound.patch 
	linux-2.6-ps3-stable-patches.patch linux-2.6-ps3-storage.patch 
	linux-2.6-ps3-system-bus-rework-2.patch 
	linux-2.6-ps3-system-bus-rework.patch 
	linux-2.6-ps3-usb-autoload.patch 
	linux-2.6-ps3-wrap-spu-runctl.patch 
	linux-2.6-ps3av-export-header.patch 
	linux-2.6-ps3fb-panic.patch linux-2.6-raid-autorun.patch 
	linux-2.6-remove-unnecessary-cast-in-prefetch.patch 
	linux-2.6-scsi-bounce-isa.patch linux-2.6-sha_alignment.patch 
	linux-2.6-softirq-printout-irq-trace-events.patch 
	linux-2.6-softlockup-disable.patch 
	linux-2.6-sumversion-limits-dot-h.patch 
	linux-2.6-suspend-ordering.patch 
	linux-2.6-sysfs-inode-allocator-oops.patch 
	linux-2.6-udf-2.6.22-rc2-1-udf_data_corruption.patch 
	linux-2.6-udf-2.6.22-rc4-1-udf_block_leak.patch 
	linux-2.6-uevent-ebus.patch linux-2.6-uevent-macio.patch 
	linux-2.6-uevent-of_platform.patch 
	linux-2.6-unexport-symbols.patch 
	linux-2.6-usb-autosuspend-default-disable.patch 
	linux-2.6-use-build-id-ld-option.patch 
	linux-2.6-utrace-ptrace-compat-xen.patch 
	linux-2.6-utrace-recalc_sigpending_and_wake.patch 
	linux-2.6-utrace-sig_kernel-macros.patch 
	linux-2.6-utrace-tracehook-xen.patch 
	linux-2.6-vm-invalidate_mapping_pages-cond-resched.patch 
	linux-2.6-vm-silence-atomic-alloc-failures.patch 
	linux-2.6-wakeups-hdaps.patch 
	linux-2.6-x86-64-edac-support.patch 
	linux-2.6-x86-64_pmtrace.patch linux-2.6-x86-dell-hpet.patch 
	linux-2.6-x86-dont-delete-cpu_devs-data.patch 
	linux-2.6-x86-fsc-interrupt-controller-quirk.patch 
	linux-2.6-x86-vga-vidfail.patch 
	linux-2.6-x86_64-silence-up-apic-errors-xen.patch 
	linux-2.6-x86_64-silence-up-apic-errors.patch 
	linux-2.6-xen-backwards-time.patch 
	linux-2.6-xen-blkfront-wait-add.patch 
	linux-2.6-xen-fix-irq-warn-mismerge.patch 
	linux-2.6-xen-irq_vector-uninitialize.patch 
	linux-2.6-xen-paravirt-nographics-pvfb-fix.patch 
	linux-2.6-xen-privcmd-use-nopfn.patch 
	linux-2.6-xen-sleazy-fpu-i386.patch 
	linux-2.6-xen-sleazy-fpu-x86_64.patch 
	linux-2.6.20.tar.bz2.sign 
Log Message:
* Wed Mar 05 2008 Mark McLoughlin <markmc at redhat.com>
- Reset to pv_ops xen DomU from kernel-2_6_25-0_93_rc4_fc9
- Revert the execshield patch for now
- Include xen pv fb and kbd drivers
- Add support for auto-probing frontend drivers
- Add module aliases for xennet and xenblk
- Add /proc/xen and /sys/hypervisor
- Add first round of x86_64 xen pv_ops patches



Index: .gitignore
===================================================================
RCS file: .gitignore
diff -N .gitignore
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .gitignore	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,8 @@
+clog
+GNUmakefile
+kernel-2.6.*.config
+temp-*
+kernel-2.6.24
+linux-2.6.24.tar.bz2
+patch-2.6.25-rc4.bz2
+xen-3.2.0.tar.gz


Index: gen-patches
===================================================================
RCS file: gen-patches
diff -N gen-patches
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gen-patches	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,215 @@
+#!/bin/bash
+#
+# This script goes with the Makefile hacks for git/branch builds.
+#
+
+nopatches=1
+if [ "x$1" = "x--fedora" ]; then
+  nopatches=0
+  shift
+  patchcomment="plus Fedora patches"
+else
+  patchcomment="no Fedora patches"
+fi
+
+name=
+if [ "x$1" = "x--name" ]; then
+  shift
+  name="$1"
+  shift
+fi
+
+if [ $# -lt 2 ]; then
+  echo >&2 "Usage: GIT_DIR=REPO $0 [--fedora] [--name NAME]\
+ TARBALL-TAG [PATCH-TAG...] BRANCH..."
+  exit 2
+fi
+
+base=$1
+shift
+base_rev=`git-rev-parse "$base"` || exit
+
+patchbase=10
+nextpatch=$patchbase
+usepatch()
+{
+  patches[$nextpatch]=$1
+  nextpatch=$(($nextpatch + 1))
+}
+
+lasturl=:
+loglines="- Experimental build from git sources ($patchcomment)\\
+"
+log()
+{
+  local logrev=$1
+  local logbranch=$3
+  local ref
+  ref=`git-symbolic-ref -q $logbranch` && logbranch=$ref
+  case $logbranch in
+  refs/remotes/*)
+    logbranch=${logbranch#refs/remotes/}
+    local remote=${logbranch%%/*}
+    logbranch=${logbranch#*/}
+    logbranch=${logbranch//\//-}
+    local url
+    url=`git-config "remote.${remote}.url"` || {
+      echo >&2 "Cannot find URL for remote $remote"
+      exit 2
+    }
+    if [ "$url" != "$lasturl" ]; then
+      lasturl="$url"
+      loglines="${loglines}- $url\\
+"
+    fi
+    logtext="$(printf %12s "remote: ")$logbranch"
+    ;;
+  *)
+    lasturl=:
+    logtext="$(printf %-12s "git $2:")$logbranch"
+    ;;
+  esac
+  loglines="${loglines}- $(printf %-35s "$logtext") ${logrev}\\
+"
+}
+
+patch_headers()
+{
+  p=$patchbase
+  while [ $p -lt $nextpatch ]; do
+    echo "Patch$p: ${patches[$p]}\\"
+    p=$(($p + 1))
+  done
+}
+
+patch_apply()
+{
+  p=$patchbase
+  while [ $p -lt $nextpatch ]; do
+#    echo "%patch$p -p1\\"
+    echo "ApplyPatch ${patches[$p]}\\"
+    p=$(($p + 1))
+  done
+}
+
+base_rev()
+{
+  local base=$1
+  tag_rev=`git-rev-parse --revs-only --verify "$base^{}" 2> /dev/null` &&
+  [ "`git-describe --tags $tag_rev`" = "$base" ] && return 0
+  case "$1" in
+  v*-git*)
+    local id=patch-${1#v}.id
+    if [ ! -r $id ]; then
+      make download UPSTREAM_FILES=$id UPSTREAM_CHECKS=-- > /dev/null 2>&1
+    fi
+    [ -r $id ] && tag_rev=`cat $id` && return 0
+    ;;
+  v2*)
+    echo >&2 "Cannot find tag $base"
+    exit 2
+    ;;
+  esac
+  return 1
+}
+
+log $base_rev base $base
+while base_rev $1; do
+  base=$1
+  base_rev=$tag_rev
+  shift
+  patchfile=patch-${base#v}.bz2
+  fgrep -q $patchfile sources || usepatch $patchfile
+  log $tag_rev tag $base
+done
+version=${base#v}
+
+now="`date +'%Y-%m-%d %H:%M %Z'`"
+
+GIT_DIFF_OPTS=-pu
+export GIT_DIFF_OPTS
+
+i=0
+last_base=$base
+last_base_rev=$base_rev
+for branch; do
+  branch_rev=`git-rev-parse "$branch^{}"` || exit 2
+  merge_base=`git-merge-base $last_base_rev $branch_rev` || {
+    echo >&2 "No common ancestor for $last_base and $branch"
+    exit 2
+  }
+  if ((i > 0)) && [ "x$merge_base" = "x${merge_rev[$(($i - 1))]}" ]; then
+    echo >&2 "$last_base is not an ancestor of $branch"
+    exit 2
+  fi
+  merge_rev[$i]=$merge_base
+  ((i++))
+  last_base=$branch
+  last_base_rev=$branch_rev
+done
+merge_rev[$i]=$last_base_rev
+
+test "x${merge_rev[0]}" = "x$base_rev" || {
+  echo >&2 "$base is not an ancestor of $branch"
+  exit 2
+}
+
+i=1
+for branch; do
+
+  branch_rev=${merge_rev[$i]}
+  ((i++))
+
+  case "$branch" in
+  refs/remotes/*/master)
+    branch_name=${branch#refs/remotes/}
+    branch_name=${branch_name%/master}
+    ;;
+  refs/remotes/*)
+    branch_name=${branch#refs/remotes/}
+    branch_name=${branch_name//\//-}
+    ;;
+  */*)
+    branch_name=${branch_name//\//-}
+    ;;
+  *)
+    branch_name=$branch
+    ;;
+  esac
+
+  file=linux-${version}-${branch_name}.patch
+  git diff --no-renames --patch-with-stat \
+	   -r "${base_rev}" -r "${branch_rev}" > $file || exit
+  if [ ! -s $file ]; then
+    rm -f $file
+    continue
+  fi
+
+  usepatch $file
+  log $branch_rev branch $branch
+
+  base_rev="$branch_rev"
+done
+name=`echo ${name:-${branch}} | sed s/-/_/g`
+
+#upstream_branch=`date -u -d "$now" +${branch}.%Y%m%dT%H%M | sed s/-/_/g`
+upstream_branch=$name
+branch_rev=`git describe $base_rev | sed 's/-g[0-9a-f]*$//;s/^[^-]*//;s/-/./g'`
+
+logdate=`date -d "$now" +'%a %b %d %Y'`
+
+sed "/%define nopatches/c\\
+%define nopatches ${nopatches}\\
+%define upstream_branch ${name}\\
+%define upstream_branch_tag ${branch_rev}
+/^### BRANCH PATCH/a\\
+`patch_headers`
+###
+/^### BRANCH APPLY/a\\
+`patch_apply`
+###
+/^%changelog/a\\
+* ${logdate} ${GIT_AUTHOR_NAME} <${GIT_AUTHOR_EMAIL}>\\
+$loglines
+
+"

linux-2.6-acpi-eeepc-hotkey.patch:

Index: linux-2.6-acpi-eeepc-hotkey.patch
===================================================================
RCS file: linux-2.6-acpi-eeepc-hotkey.patch
diff -N linux-2.6-acpi-eeepc-hotkey.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-acpi-eeepc-hotkey.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,490 @@
+Signed-off-by: Eric Cooper <ecc at cmu.edu>
+
+---
+ drivers/misc/Kconfig  |   10 +
+ drivers/misc/Makefile |    1 +
+ drivers/misc/eeepc.c  |  447 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 458 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/misc/eeepc.c
+
+diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
+index b1f9a40..8fd1ccb 100644
+--- a/drivers/misc/Kconfig
++++ b/drivers/misc/Kconfig
+@@ -251,4 +251,14 @@ config ATMEL_SSC
+ 	  driver (SCSI/ATA) which supports enclosures
+ 	  or a SCSI enclosure device (SES) to use these services.
+ 
++config EEEPC
++        tristate "Eee PC Hotkey Driver (EXPERIMENTAL)"
++        depends on X86
++        depends on ACPI
++	depends on EXPERIMENTAL && !ACPI_ASUS
++        ---help---
++	  This driver supports the Fn-Fx keys on Eee PC laptops.
++
++	  If you have an Eee PC laptop, say Y or M here.
++
+ endif # MISC_DEVICES
+diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
+index 87f2685..699b35c 100644
+--- a/drivers/misc/Makefile
++++ b/drivers/misc/Makefile
+@@ -17,3 +17,4 @@ obj-$(CONFIG_SONY_LAPTOP)	+= sony-laptop.o
+ obj-$(CONFIG_EEPROM_93CX6)	+= eeprom_93cx6.o
+ obj-$(CONFIG_INTEL_MENLOW)	+= intel_menlow.o
+ obj-$(CONFIG_ENCLOSURE_SERVICES) += enclosure.o
++obj-$(CONFIG_EEEPC)		+= eeepc.o
+diff --git a/drivers/misc/eeepc.c b/drivers/misc/eeepc.c
+new file mode 100644
+index 0000000..2e33117
+--- /dev/null
++++ b/drivers/misc/eeepc.c
+@@ -0,0 +1,447 @@
++/*
++ *  eepc_acpi.c - Asus Eee PC hotkey driver
++ *
++ *  Copyright (C) 2008 Eric Cooper <ecc at cmu.edu>
++ *
++ *  Based on asus_acpi.c as patched for the Eee PC by Asus:
++ *  ftp://ftp.asus.com/pub/ASUS/EeePC/701/ASUS_ACPI_071126.rar
++ *
++ *  Copyright (C) 2002-2005 Julien Lerouge, 2003-2006 Karol Kozimor
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation; either version 2 of the License, or
++ *  (at your option) any later version.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/types.h>
++#include <linux/platform_device.h>
++#include <acpi/acpi_drivers.h>
++#include <acpi/acpi_bus.h>
++#include <asm/uaccess.h>
++
++#define EEEPC_HOTK_NAME          "Eee PC Hotkey Driver"
++#define EEEPC_HOTK_FILE          "eeepc"
++#define EEEPC_HOTK_CLASS         "hotkey"
++#define EEEPC_HOTK_DEVICE_NAME   "Hotkey"
++#define EEEPC_HOTK_HID           "ASUS010"
++
++#define EEEPC_LOG	EEEPC_HOTK_FILE ": "
++#define EEEPC_ERR	KERN_ERR EEEPC_LOG
++#define EEEPC_WARNING	KERN_WARNING EEEPC_LOG
++#define EEEPC_NOTICE	KERN_NOTICE EEEPC_LOG
++#define EEEPC_INFO	KERN_INFO EEEPC_LOG
++
++/*
++ * Definitions for Asus EeePC
++ */
++
++#define	NOTIFY_WLAN_ON	0x10
++
++enum {
++	DISABLE_ASL_WLAN = 0x0001,
++	DISABLE_ASL_BLUETOOTH = 0x0002,
++	DISABLE_ASL_IRDA = 0x0004,
++	DISABLE_ASL_CAMERA = 0x0008,
++	DISABLE_ASL_TV = 0x0010,
++	DISABLE_ASL_GPS = 0x0020,
++	DISABLE_ASL_DISPLAYSWITCH = 0x0040,
++	DISABLE_ASL_MODEM = 0x0080,
++	DISABLE_ASL_CARDREADER = 0x0100
++};
++
++enum {
++	CM_ASL_WLAN = 0,
++	CM_ASL_BLUETOOTH,
++	CM_ASL_IRDA,
++	CM_ASL_1394,
++	CM_ASL_CAMERA,
++	CM_ASL_TV,
++	CM_ASL_GPS,
++	CM_ASL_DVDROM,
++	CM_ASL_DISPLAYSWITCH,
++	CM_ASL_PANELBRIGHT,
++	CM_ASL_BIOSFLASH,
++	CM_ASL_ACPIFLASH,
++	CM_ASL_CPUFV,
++	CM_ASL_CPUTEMPERATURE,
++	CM_ASL_FANCPU,
++	CM_ASL_FANCHASSIS,
++	CM_ASL_USBPORT1,
++	CM_ASL_USBPORT2,
++	CM_ASL_USBPORT3,
++	CM_ASL_MODEM,
++	CM_ASL_CARDREADER,
++	CM_ASL_LID
++};
++
++const char *cm_getv[] = {
++	"WLDG", NULL, NULL, NULL,
++	"CAMG", NULL, NULL, NULL,
++	NULL, "PBLG", NULL, NULL,
++	"CFVG", NULL, NULL, NULL,
++	"USBG", NULL, NULL, "MODG",
++	"CRDG", "LIDG"
++};
++
++const char *cm_setv[] = {
++	"WLDS", NULL, NULL, NULL,
++	"CAMS", NULL, NULL, NULL,
++	"SDSP", "PBLS", "HDPS", NULL,
++	"CFVS", NULL, NULL, NULL,
++	"USBG", NULL, NULL, "MODS",
++	"CRDS", NULL
++};
++
++static unsigned int init_flag;
++
++/*
++ * This is the main structure, we can use it to store useful information
++ * about the hotk device
++ */
++struct eeepc_hotk {
++	struct acpi_device *device;	/* the device we are in */
++	acpi_handle handle;		/* the handle of the hotk device */
++	u32 cm_supported;		/* the control methods supported
++					   by this BIOS */
++	u16 event_count[128];		/* count for each event */
++};
++
++/* The actual device the driver binds to */
++static struct eeepc_hotk *ehotk;
++
++/*
++ * The hotkey driver declaration
++ */
++static int eeepc_hotk_add(struct acpi_device *device);
++static int eeepc_hotk_remove(struct acpi_device *device, int type);
++
++static const struct acpi_device_id eee_device_ids[] = {
++	{EEEPC_HOTK_HID, 0},
++	{"", 0},
++};
++
++static struct acpi_driver eeepc_hotk_driver = {
++	.name = EEEPC_HOTK_NAME,
++	.class = EEEPC_HOTK_CLASS,
++	.ids = eee_device_ids,
++	.ops = {
++		.add = eeepc_hotk_add,
++		.remove = eeepc_hotk_remove,
++	},
++};
++
++MODULE_AUTHOR("Julien Lerouge, Karol Kozimor, Eric Cooper");
++MODULE_DESCRIPTION(EEEPC_HOTK_NAME);
++MODULE_LICENSE("GPL");
++
++/*
++ * returns 1 if write is successful, otherwise 0.
++ */
++static int write_acpi_int(acpi_handle handle, const char *method, int val,
++			  struct acpi_buffer *output)
++{
++	struct acpi_object_list params;
++	union acpi_object in_obj;
++	acpi_status status;
++
++	params.count = 1;
++	params.pointer = &in_obj;
++	in_obj.type = ACPI_TYPE_INTEGER;
++	in_obj.integer.value = val;
++
++	status = acpi_evaluate_object(handle, (char *)method, &params, output);
++	return (status == AE_OK);
++}
++
++static int read_acpi_int(acpi_handle handle, const char *method, int *val)
++{
++	struct acpi_buffer output;
++	union acpi_object out_obj;
++	acpi_status status;
++
++	output.length = sizeof(out_obj);
++	output.pointer = &out_obj;
++	status = acpi_evaluate_object(handle, (char *) method, NULL, &output);
++	*val = out_obj.integer.value;
++	return (status == AE_OK) && (out_obj.type == ACPI_TYPE_INTEGER);
++}
++
++static int parse_arg(const char *buf, unsigned long count, int *val)
++{
++	if (!count)
++		return 0;
++	if (count > 31)
++		return -EINVAL;
++	if (sscanf(buf, "%i", val) != 1)
++		return -EINVAL;
++	return count;
++}
++
++static ssize_t store_proc(int cm, const char *buf, size_t count)
++{
++	int rv, value;
++
++	rv = parse_arg(buf, count, &value);
++	if (rv > 0 && (ehotk->cm_supported & (0x1 << cm))) {
++		const char *method = cm_setv[cm];
++		if (method == NULL)
++			return 0;
++		if (!write_acpi_int(ehotk->handle, method, value, NULL))
++			printk(EEEPC_WARNING "Error writing %s\n", method);
++	}
++	return rv;
++}
++
++static ssize_t show_proc(int cm, char *buf)
++{
++	int value = -1;
++
++	if ((ehotk->cm_supported & (0x1 << cm))) {
++		const char *method = cm_getv[cm];
++		if (method == NULL)
++			return 0;
++		if (!read_acpi_int(ehotk->handle, method, &value))
++			printk(EEEPC_WARNING "Error reading %s\n", method);
++	}
++	return sprintf(buf, "%d\n", value);
++}
++
++static ssize_t real_store_init(struct device *dev,
++			       struct device_attribute *attr,
++			       const char *buf, size_t count)
++{
++	int rv, value;
++
++	rv = parse_arg(buf, count, &value);
++	if (!write_acpi_int(ehotk->handle, "INIT", value, NULL))
++		printk(EEEPC_ERR "Hotkey initialization failed\n");
++	else
++		printk(EEEPC_INFO "Reset init flag 0x%x\n", value);
++	return rv;
++}
++
++#define EEEPC_CREATE_DEVICE_ATTR(_name, _cm)				\
++	static ssize_t show_##_name(struct device *dev,			\
++				    struct device_attribute *attr,	\
++				    char *buf)				\
++	{								\
++		return show_proc(_cm, buf);				\
++	}								\
++	static ssize_t store_##_name(struct device *dev,		\
++				     struct device_attribute *attr,	\
++				     const char *buf, size_t count)	\
++	{								\
++		return store_proc(_cm, buf, count);			\
++	}								\
++	static struct device_attribute dev_attr_##_name = {		\
++		.attr = {						\
++			.name = __stringify(_name),			\
++			.mode = 0644 },					\
++		.show   = show_##_name,					\
++		.store  = store_##_name,				\
++	}
++
++EEEPC_CREATE_DEVICE_ATTR(brn, CM_ASL_PANELBRIGHT);
++EEEPC_CREATE_DEVICE_ATTR(camera, CM_ASL_CAMERA);
++EEEPC_CREATE_DEVICE_ATTR(cardr, CM_ASL_CARDREADER);
++EEEPC_CREATE_DEVICE_ATTR(cpufv, CM_ASL_CPUFV);
++EEEPC_CREATE_DEVICE_ATTR(disp, CM_ASL_DISPLAYSWITCH);
++EEEPC_CREATE_DEVICE_ATTR(hdps, CM_ASL_BIOSFLASH);
++EEEPC_CREATE_DEVICE_ATTR(init, -1);	/* fixed up in eeepc_hotk_add() */
++EEEPC_CREATE_DEVICE_ATTR(lid, CM_ASL_LID);
++EEEPC_CREATE_DEVICE_ATTR(wlan, CM_ASL_WLAN);
++
++static struct attribute *platform_attributes[] = {
++	&dev_attr_brn.attr,
++	&dev_attr_camera.attr,
++	&dev_attr_cardr.attr,
++	&dev_attr_cpufv.attr,
++	&dev_attr_disp.attr,
++	&dev_attr_hdps.attr,
++	&dev_attr_init.attr,
++	&dev_attr_lid.attr,
++	&dev_attr_wlan.attr,
++	NULL
++};
++
++static struct attribute_group platform_attribute_group = {
++	.attrs = platform_attributes
++};
++
++static int eeepc_hotk_check(void)
++{
++	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
++	int result;
++
++	result = acpi_bus_get_status(ehotk->device);
++	if (result)
++		return result;
++	if (ehotk->device->status.present) {
++		if (!write_acpi_int(ehotk->handle, "INIT", init_flag,
++				    &buffer)) {
++			printk(EEEPC_ERR "Hotkey initialization failed\n");
++			return -ENODEV;
++		} else {
++			printk(EEEPC_NOTICE "Hotkey init flags 0x%x\n",
++			       init_flag);
++		}
++		/* get control methods supported */
++		if (!read_acpi_int(ehotk->handle, "CMSG"
++				   , &ehotk->cm_supported)) {
++			printk(EEEPC_ERR
++			       "Get control methods supported failed\n");
++			return -ENODEV;
++		} else {
++			printk(EEEPC_INFO
++			       "Get control methods supported: 0x%x\n",
++			       ehotk->cm_supported);
++		}
++		ehotk->cm_supported |= (0x1 << CM_ASL_LID);
++	} else {
++		printk(EEEPC_ERR "Hotkey device not present, aborting\n");
++		return -EINVAL;
++	}
++	return 0;
++}
++
++static void eeepc_hotk_notify(acpi_handle handle, u32 event, void *data)
++{
++	if (!ehotk)
++		return;
++	/* if DISABLE_ASL_WLAN is set, the notify code for fn+f2
++	   will always be 0x10 */
++	if (event == NOTIFY_WLAN_ON && (DISABLE_ASL_WLAN & init_flag)) {
++		int value;
++		if (ehotk->cm_supported & (0x1 << CM_ASL_WLAN)) {
++			const char *method = cm_getv[CM_ASL_WLAN];
++			if (!read_acpi_int(ehotk->handle, method, &value))
++				printk(EEEPC_WARNING "Error reading %s\n",
++				       method);
++			else if (value == 1)
++				event = 0x11;
++		}
++	}
++	acpi_bus_generate_proc_event(ehotk->device, event,
++				     ehotk->event_count[event % 128]++);
++}
++
++static int ehotk_found;
++
++static int eeepc_hotk_add(struct acpi_device *device)
++{
++	acpi_status status = AE_OK;
++	int result;
++
++	if (!device)
++		 return -EINVAL;
++	printk(EEEPC_NOTICE EEEPC_HOTK_NAME "\n");
++	ehotk = kzalloc(sizeof(struct eeepc_hotk), GFP_KERNEL);
++	if (!ehotk)
++		return -ENOMEM;
++	ehotk->handle = device->handle;
++	strcpy(acpi_device_name(device), EEEPC_HOTK_DEVICE_NAME);
++	strcpy(acpi_device_class(device), EEEPC_HOTK_CLASS);
++	acpi_driver_data(device) = ehotk;
++	ehotk->device = device;
++	result = eeepc_hotk_check();
++	if (result)
++		goto end;
++	dev_attr_init.show = NULL;
++	dev_attr_init.store = real_store_init;
++	status = acpi_install_notify_handler(ehotk->handle, ACPI_SYSTEM_NOTIFY,
++					     eeepc_hotk_notify, ehotk);
++	if (ACPI_FAILURE(status))
++		printk(EEEPC_ERR "Error installing notify handler\n");
++	ehotk_found = 1;
++ end:
++	if (result)
++		kfree(ehotk);
++	return result;
++}
++
++static int eeepc_hotk_remove(struct acpi_device *device, int type)
++{
++	acpi_status status = 0;
++
++	if (!device || !acpi_driver_data(device))
++		 return -EINVAL;
++	status = acpi_remove_notify_handler(ehotk->handle, ACPI_SYSTEM_NOTIFY,
++					    eeepc_hotk_notify);
++	if (ACPI_FAILURE(status))
++		printk(EEEPC_ERR "Error removing notify handler\n");
++	kfree(ehotk);
++	return 0;
++}
++
++static struct platform_driver platform_driver = {
++	.driver = {
++		.name = EEEPC_HOTK_FILE,
++		.owner = THIS_MODULE,
++	}
++};
++
++static struct platform_device *platform_device;
++
++static void __exit eeepc_hotk_exit(void)
++{
++	acpi_bus_unregister_driver(&eeepc_hotk_driver);
++	sysfs_remove_group(&platform_device->dev.kobj,
++			   &platform_attribute_group);
++	platform_device_unregister(platform_device);
++	platform_driver_unregister(&platform_driver);
++}
++
++static int __init eeepc_hotk_init(void)
++{
++	struct device *dev;
++	int result;
++
++	if (acpi_disabled)
++		return -ENODEV;
++	init_flag = DISABLE_ASL_WLAN | DISABLE_ASL_DISPLAYSWITCH;
++	result = acpi_bus_register_driver(&eeepc_hotk_driver);
++	if (result < 0)
++		return result;
++	if (!ehotk_found) {
++		acpi_bus_unregister_driver(&eeepc_hotk_driver);
++		return -ENODEV;
++	}
++	dev = acpi_get_physical_device(ehotk->device->handle);
++	/* Register platform stuff */
++	result = platform_driver_register(&platform_driver);
++	if (result)
++		goto fail_platform_driver;
++	platform_device = platform_device_alloc(EEEPC_HOTK_FILE, -1);
++	if (!platform_device) {
++		result = -ENOMEM;
++		goto fail_platform_device1;
++	}
++	result = platform_device_add(platform_device);
++	if (result)
++		goto fail_platform_device2;
++	result = sysfs_create_group(&platform_device->dev.kobj,
++				    &platform_attribute_group);
++	if (result)
++		goto fail_sysfs;
++	return 0;
++ fail_sysfs:
++	platform_device_del(platform_device);
++ fail_platform_device2:
++	platform_device_put(platform_device);
++ fail_platform_device1:
++	platform_driver_unregister(&platform_driver);
++ fail_platform_driver:
++	return result;
++}
++
++module_init(eeepc_hotk_init);
++module_exit(eeepc_hotk_exit);

linux-2.6-at76.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 linux-2.6-at76.patch
Index: linux-2.6-at76.patch
===================================================================
RCS file: linux-2.6-at76.patch
diff -N linux-2.6-at76.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-at76.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,3933 @@
+commit e141a848e24724c2d5534ff8152b0be4fe1b6f62
+Author: Pavel Roskin <proski at gnu.org>
+Date:   Fri Feb 22 00:01:07 2008 -0500
+
+    at76_usb: make the driver depend on MAC80211
+    
+    Signed-off-by: Pavel Roskin <proski at gnu.org>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 4891e7cb744d9e00dfe714c2827abcd32a02e405
+Author: Pavel Roskin <proski at gnu.org>
+Date:   Fri Feb 22 00:01:01 2008 -0500
+
+    at76_usb: reindent, reorder initializers for readability
+    
+    Signed-off-by: Pavel Roskin <proski at gnu.org>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit a5d909eecd7c57843395780d7bc3e9655093bd5e
+Author: Pavel Roskin <proski at gnu.org>
+Date:   Fri Feb 22 00:00:55 2008 -0500
+
+    at76_usb: add more MODULE_AUTHOR entries
+    
+    Signed-off-by: Pavel Roskin <proski at gnu.org>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit e5d8694e15d0f20a5a3999ca6697278df9a66ca7
+Author: Pavel Roskin <proski at gnu.org>
+Date:   Fri Feb 22 00:00:50 2008 -0500
+
+    at76_usb: remove unneeded code
+    
+    Signed-off-by: Pavel Roskin <proski at gnu.org>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 781e1500cd246b9aeaa0fc7593f028d43c87dbc0
+Author: Pavel Roskin <proski at gnu.org>
+Date:   Fri Feb 22 00:00:44 2008 -0500
+
+    at76_usb: fix missing newlines in printk, improve some messages
+    
+    It's important to know which function failed.
+    
+    Signed-off-by: Pavel Roskin <proski at gnu.org>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 4083ec919a7353cf7a9de6cf42aa13669b7e018e
+Author: Kalle Valo <kalle.valo at iki.fi>
+Date:   Sun Feb 10 17:01:19 2008 +0200
+
+    at76_usb: Remove struct net_device
+    
+    This patch contains only code removal, no code has been modified.
+    
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit bae74e67b58fc0ecf930fc1b5f485d536b1eea5a
+Author: Kalle Valo <kalle.valo at iki.fi>
+Date:   Sun Feb 10 17:01:11 2008 +0200
+
+    at76_usb: Prepare for struct net_device removal
+    
+    Some cleanup to make it easier to remove the struct net_device.
+    
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit e31a31b44489b3535fcf7b02871458186ed43aa7
+Author: Kalle Valo <kalle.valo at iki.fi>
+Date:   Sun Feb 10 17:01:04 2008 +0200
+
+    at76_usb: Allocate struct at76_priv using ieee80211_alloc_hw()
+    
+    This is for the preparation to remove struct net_device.
+    
+    Also netdev is not registered anymore so the legacy stack does not have
+    visible interface anymore.
+    
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 162d3ad6b55220940216d35dc1418e0c0ef9b98e
+Author: Kalle Valo <kalle.valo at iki.fi>
+Date:   Sun Feb 10 17:00:56 2008 +0200
+
+    at76_usb: Use wiphy_name everywhere where needed
+    
+    This is for the preparation to remove struct net_device.
+    
+    Functions used by the legacy stack were not converted, because they will
+    removed anyway.
+    
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 779e36d16d4b79f30207da5d41d8cda9151f8e1f
+Author: Kalle Valo <kalle.valo at iki.fi>
+Date:   Sun Feb 10 17:00:49 2008 +0200
+
+    at76_usb: Remove support the legacy stack
+    
+    Now the mac80211 interface will only work, the interface using the legacy
+    stack will be defunct. The legacy interface will removed in following
+    patches.
+    
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 0e5a456201237a135d5970b755ade55c18565033
+Author: Kalle Valo <kalle.valo at iki.fi>
+Date:   Sun Feb 10 17:00:41 2008 +0200
+
+    at76_usb: Add support for WEP
+    
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 88ba88d527a925f0b0a5162e64e026e33312648e
+Author: Kalle Valo <kalle.valo at iki.fi>
+Date:   Sun Feb 10 17:00:34 2008 +0200
+
+    at76_usb: Add support for monitor mode
+    
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 798f4f8d71f221f0e74dbd1588ab6225c64efc45
+Author: Kalle Valo <kalle.valo at iki.fi>
+Date:   Sun Feb 10 17:00:26 2008 +0200
+
+    at76_usb: add mac80211 support
+    
+    This patch creates the basic facilities for using mac80211 while keeping
+    the old legacy stack alone. This add only adds new code, no old code is
+    changed. Both the legacy and mac80211 interfaces are created to make the
+    transition easier. The legacy interface will be removed with following
+    patches.
+    
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit ee5141d10332561306a48b216a1ae1ddfe318805
+Author: Kalle Valo <kalle.valo at iki.fi>
+Date:   Sun Feb 10 17:00:19 2008 +0200
+
+    at76_usb: Add DBG_CMD for debugging firmware commands
+    
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 2009705e36ad0b50f0cdb0f9ef186f33057d17e8
+Author: Kalle Valo <kalle.valo at iki.fi>
+Date:   Sun Feb 10 17:00:11 2008 +0200
+
+    at76_usb: Convert DBG_TX levels to use at76_dbg_dump()
+    
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit bd80e67cdc3286868f59cf809b63c5c021392fbd
+Author: Kalle Valo <kalle.valo at iki.fi>
+Date:   Sun Feb 10 17:00:04 2008 +0200
+
+    at76_usb: Add at76_dbg_dump() macro
+    
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit c53a0aa28992ba7f212effec5e29be990848b54f
+Author: Pavel Roskin <proski at gnu.org>
+Date:   Sun Feb 10 16:59:56 2008 +0200
+
+    at76_usb: Use net/mac80211.h instead of net/ieee80211.h
+    
+    Rename symbols as required.  Use IEEE80211_MAX_FRAG_THRESHOLD as the
+    maximal packet size, which takes slightly more memory, but should be
+    safer.
+    
+    Copy some frame definitions from net/ieee80211.h to at76_usb.h.  It's
+    done temporarily until mac80211 conversion is complete.
+    
+    Signed-off-by: Pavel Roskin <proski at gnu.org>
+    Signed-off-by: Kalle Valo <kalle.valo at iki.fi>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 38ec6fbd236318179e28c71bc1b3dc94166e4be2
+Author: Pavel Roskin <proski at gnu.org>
+Date:   Mon Feb 4 00:05:19 2008 -0500
+
+    at76_usb: Add ID for Uniden PCW100
+    
[...3540 lines suppressed...]
++
++	at76_dbg(DBG_PROC_ENTRY, "%s: EXIT", __func__);
++}
++
++static int at76_probe(struct usb_interface *interface,
++		      const struct usb_device_id *id)
++{
++	int ret;
++	struct at76_priv *priv;
++	struct fwentry *fwe;
++	struct usb_device *udev;
++	int op_mode;
++	int need_ext_fw = 0;
++	struct mib_fw_version fwv;
++	int board_type = (int)id->driver_info;
++
++	udev = usb_get_dev(interface_to_usbdev(interface));
++
++	/* Load firmware into kernel memory */
++	fwe = at76_load_firmware(udev, board_type);
++	if (!fwe) {
++		ret = -ENOENT;
++		goto error;
++	}
++
++	op_mode = at76_get_op_mode(udev);
++
++	at76_dbg(DBG_DEVSTART, "opmode %d", op_mode);
++
++	/* we get OPMODE_NONE with 2.4.23, SMC2662W-AR ???
++	   we get 204 with 2.4.23, Fiberline FL-WL240u (505A+RFMD2958) ??? */
++
++	if (op_mode == OPMODE_HW_CONFIG_MODE) {
++		dev_printk(KERN_ERR, &interface->dev,
++			   "cannot handle a device in HW_CONFIG_MODE\n");
++		ret = -EBUSY;
++		goto error;
++	}
++
++	if (op_mode != OPMODE_NORMAL_NIC_WITH_FLASH
++	    && op_mode != OPMODE_NORMAL_NIC_WITHOUT_FLASH) {
++		/* download internal firmware part */
++		dev_printk(KERN_DEBUG, &interface->dev,
++			   "downloading internal firmware\n");
++		ret = at76_load_internal_fw(udev, fwe);
++		if (ret < 0) {
++			dev_printk(KERN_ERR, &interface->dev,
++				   "error %d downloading internal firmware\n",
++				   ret);
++			goto error;
++		}
++		usb_put_dev(udev);
++		return ret;
++	}
++
++	/* Internal firmware already inside the device.  Get firmware
++	 * version to test if external firmware is loaded.
++	 * This works only for newer firmware, e.g. the Intersil 0.90.x
++	 * says "control timeout on ep0in" and subsequent
++	 * at76_get_op_mode() fail too :-( */
++
++	/* if version >= 0.100.x.y or device with built-in flash we can
++	 * query the device for the fw version */
++	if ((fwe->fw_version.major > 0 || fwe->fw_version.minor >= 100)
++	    || (op_mode == OPMODE_NORMAL_NIC_WITH_FLASH)) {
++		ret = at76_get_mib(udev, MIB_FW_VERSION, &fwv, sizeof(fwv));
++		if (ret < 0 || (fwv.major | fwv.minor) == 0)
++			need_ext_fw = 1;
++	} else
++		/* No way to check firmware version, reload to be sure */
++		need_ext_fw = 1;
++
++	if (need_ext_fw) {
++		dev_printk(KERN_DEBUG, &interface->dev,
++			   "downloading external firmware\n");
++
++		ret = at76_load_external_fw(udev, fwe);
++		if (ret)
++			goto error;
++
++		/* Re-check firmware version */
++		ret = at76_get_mib(udev, MIB_FW_VERSION, &fwv, sizeof(fwv));
++		if (ret < 0) {
++			dev_printk(KERN_ERR, &interface->dev,
++				   "error %d getting firmware version\n", ret);
++			goto error;
++		}
++	}
++
++	priv = at76_alloc_new_device(udev);
++	if (!priv) {
++		ret = -ENOMEM;
++		goto error;
++	}
++
++	usb_set_intfdata(interface, priv);
++
++	memcpy(&priv->fw_version, &fwv, sizeof(struct mib_fw_version));
++	priv->board_type = board_type;
++
++	ret = at76_init_new_device(priv, interface);
++	if (ret < 0)
++		at76_delete_device(priv);
++
++	return ret;
++
++error:
++	usb_put_dev(udev);
++	return ret;
++}
++
++static void at76_disconnect(struct usb_interface *interface)
++{
++	struct at76_priv *priv;
++
++	priv = usb_get_intfdata(interface);
++	usb_set_intfdata(interface, NULL);
++
++	/* Disconnect after loading internal firmware */
++	if (!priv)
++		return;
++
++	printk(KERN_INFO "%s: disconnecting\n", wiphy_name(priv->hw->wiphy));
++	at76_delete_device(priv);
++	dev_printk(KERN_INFO, &interface->dev, "disconnected\n");
++}
++
++/* Structure for registering this driver with the USB subsystem */
++static struct usb_driver at76_driver = {
++	.name = DRIVER_NAME,
++	.probe = at76_probe,
++	.disconnect = at76_disconnect,
++	.id_table = dev_table,
++};
++
++static int __init at76_mod_init(void)
++{
++	int result;
++
++	printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION " loading\n");
++
++	mutex_init(&fw_mutex);
++
++	/* register this driver with the USB subsystem */
++	result = usb_register(&at76_driver);
++	if (result < 0)
++		printk(KERN_ERR DRIVER_NAME
++		       ": usb_register failed (status %d)\n", result);
++
++	led_trigger_register_simple("at76_usb-tx", &ledtrig_tx);
++	return result;
++}
++
++static void __exit at76_mod_exit(void)
++{
++	int i;
++
++	printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION " unloading\n");
++	usb_deregister(&at76_driver);
++	for (i = 0; i < ARRAY_SIZE(firmwares); i++) {
++		if (firmwares[i].fw)
++			release_firmware(firmwares[i].fw);
++	}
++	led_trigger_unregister_simple(ledtrig_tx);
++}
++
++module_param_named(debug, at76_debug, int, 0600);
++MODULE_PARM_DESC(debug, "Debugging level");
++
++module_init(at76_mod_init);
++module_exit(at76_mod_exit);
++
++MODULE_AUTHOR("Oliver Kurth <oku at masqmail.cx>");
++MODULE_AUTHOR("Joerg Albert <joerg.albert at gmx.de>");
++MODULE_AUTHOR("Alex <alex at foogod.com>");
++MODULE_AUTHOR("Nick Jones");
++MODULE_AUTHOR("Balint Seeber <n0_5p4m_p13453 at hotmail.com>");
++MODULE_AUTHOR("Pavel Roskin <proski at gnu.org>");
++MODULE_AUTHOR("Guido Guenther <agx at sigxcpu.org>");
++MODULE_AUTHOR("Kalle Valo <kalle.valo at iki.fi>");
++MODULE_DESCRIPTION(DRIVER_DESC);
++MODULE_LICENSE("GPL");
+diff -up linux-2.6.24.noarch/drivers/net/wireless/Kconfig.orig linux-2.6.24.noarch/drivers/net/wireless/Kconfig
+--- linux-2.6.24.noarch/drivers/net/wireless/Kconfig.orig	2008-02-27 20:56:07.000000000 -0500
++++ linux-2.6.24.noarch/drivers/net/wireless/Kconfig	2008-02-27 20:56:23.000000000 -0500
+@@ -457,6 +457,14 @@ config PCMCIA_ATMEL
+ 	  Enable support for PCMCIA cards containing the
+ 	  Atmel at76c502 and at76c504 chips.
+ 
++config USB_ATMEL
++	tristate "Atmel at76c503/at76c505/at76c505a USB cards"
++	depends on MAC80211 && WLAN_80211 && USB
++	select FW_LOADER
++	---help---
++	  Enable support for USB Wireless devices using Atmel at76c503,
++	  at76c505 or at76c505a chips.
++
+ config AIRO_CS
+ 	tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards"
+ 	depends on PCMCIA && (BROKEN || !M32R) && WLAN_80211

linux-2.6-blkcipher-depend-on-chainiv.patch:

Index: linux-2.6-blkcipher-depend-on-chainiv.patch
===================================================================
RCS file: linux-2.6-blkcipher-depend-on-chainiv.patch
diff -N linux-2.6-blkcipher-depend-on-chainiv.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-blkcipher-depend-on-chainiv.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,23 @@
+diff --git a/crypto/Makefile b/crypto/Makefile
+index 48c7583..13b8cf8 100644
+--- a/crypto/Makefile
++++ b/crypto/Makefile
+@@ -12,8 +12,8 @@ obj-$(CONFIG_CRYPTO_AEAD) += aead.o
+ 
+ crypto_blkcipher-objs := ablkcipher.o
+ crypto_blkcipher-objs += blkcipher.o
++crypto_blkcipher-objs += chainiv.o
+ obj-$(CONFIG_CRYPTO_BLKCIPHER) += crypto_blkcipher.o
+-obj-$(CONFIG_CRYPTO_BLKCIPHER) += chainiv.o
+ obj-$(CONFIG_CRYPTO_BLKCIPHER) += eseqiv.o
+ obj-$(CONFIG_CRYPTO_SEQIV) += seqiv.o
+ 
+diff --git a/crypto/chainiv.c b/crypto/chainiv.c
+index d17fa04..170e436 100644
+--- a/crypto/chainiv.c
++++ b/crypto/chainiv.c
+@@ -329,3 +329,4 @@ module_exit(chainiv_module_exit);
+ 
+ MODULE_LICENSE("GPL");
+ MODULE_DESCRIPTION("Chain IV Generator");
++MODULE_ALIAS("chainiv");

linux-2.6-compile-fix-gcc-43.patch:

Index: linux-2.6-compile-fix-gcc-43.patch
===================================================================
RCS file: linux-2.6-compile-fix-gcc-43.patch
diff -N linux-2.6-compile-fix-gcc-43.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-compile-fix-gcc-43.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,38 @@
+--- linux-2.6.24.noarch.orig/include/linux/time.h
++++ linux-2.6.24.noarch/include/linux/time.h
+@@ -169,7 +169,7 @@ extern struct timeval ns_to_timeval(cons
+  * @a:		pointer to timespec to be incremented
+  * @ns:		unsigned nanoseconds value to be added
+  */
+-static inline void timespec_add_ns(struct timespec *a, u64 ns)
++static inline void timespec_add_ns(struct timespec *a, volatile u64 ns)
+ {
+ 	ns += a->tv_nsec;
+ 	while(unlikely(ns >= NSEC_PER_SEC)) {
+--- a/include/linux/module.h
++++ b/include/linux/module.h
+@@ -30,6 +30,15 @@
+ 
+ #define MODULE_NAME_LEN (64 - sizeof(unsigned long))
+ 
++/* On some platforms relocations to global data cannot go into read-only
++ * sections, so 'const' makes no sense and even causes compile failures
++ * with some compilers. */
++#if defined(CONFIG_ALPHA) || defined(CONFIG_IA64) || defined(CONFIG_PPC64)
++#define __ksym_const
++#else
++#define __ksym_const const
++#endif
++
+ struct kernel_symbol
+ {
+ 	unsigned long value;
+@@ -192,7 +201,7 @@ void *__symbol_get_gpl(const char *symbol);
+ 	static const char __kstrtab_##sym[]			\
+ 	__attribute__((section("__ksymtab_strings")))		\
+ 	= MODULE_SYMBOL_PREFIX #sym;                    	\
+-	static const struct kernel_symbol __ksymtab_##sym	\
++	static __ksym_const struct kernel_symbol __ksymtab_##sym	\
+ 	__used							\
+ 	__attribute__((section("__ksymtab" sec), unused))	\
+ 	= { (unsigned long)&sym, __kstrtab_##sym }

linux-2.6-compile-fixes.patch:

Index: linux-2.6-compile-fixes.patch
===================================================================
RCS file: linux-2.6-compile-fixes.patch
diff -N linux-2.6-compile-fixes.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-compile-fixes.patch	6 Mar 2008 13:59:25 -0000	1.4
@@ -0,0 +1,7 @@
+#
+# Small compile fixes (For more involved fixes, please use a separate patch).
+#
+# Please add the errors from gcc before the diffs to save others having
+# to do a compile to figure out what your diff is fixing. Thanks.
+#
+

linux-2.6-debug-acpi-os-write-port.patch:

Index: linux-2.6-debug-acpi-os-write-port.patch
===================================================================
RCS file: linux-2.6-debug-acpi-os-write-port.patch
diff -N linux-2.6-debug-acpi-os-write-port.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-debug-acpi-os-write-port.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,15 @@
+---
+ drivers/acpi/osl.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- linux-2.6.22.noarch.orig/drivers/acpi/osl.c
++++ linux-2.6.22.noarch/drivers/acpi/osl.c
+@@ -419,6 +419,8 @@ acpi_status acpi_os_write_port(acpi_io_a
+ 		*(u32 *) value = readl(virt_addr);
+ 		break;
+ 	default:
++		printk(KERN_ERR PREFIX
++		       "writing %d bits to %p\n", (int)width, virt_addr);
+ 		BUG();
+ 	}
+ 

linux-2.6-default-mmf_dump_elf_headers.patch:

Index: linux-2.6-default-mmf_dump_elf_headers.patch
===================================================================
RCS file: linux-2.6-default-mmf_dump_elf_headers.patch
diff -N linux-2.6-default-mmf_dump_elf_headers.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-default-mmf_dump_elf_headers.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,12 @@
+--- linux-2.6/include/linux/sched.h
++++ linux-2.6/include/linux/sched.h
+@@ -373,7 +373,8 @@ extern int get_dumpable(struct mm_struct
+ #define MMF_DUMP_FILTER_MASK \
+ 	(((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT)
+ #define MMF_DUMP_FILTER_DEFAULT \
+-	((1 << MMF_DUMP_ANON_PRIVATE) |	(1 << MMF_DUMP_ANON_SHARED))
++	((1 << MMF_DUMP_ANON_PRIVATE) |	(1 << MMF_DUMP_ANON_SHARED) | \
++	 (1 << MMF_DUMP_ELF_HEADERS))
+ 
+ struct sighand_struct {
+ 	atomic_t		count;

linux-2.6-drm-add-i915-radeon-mdt.patch:

Index: linux-2.6-drm-add-i915-radeon-mdt.patch
===================================================================
RCS file: linux-2.6-drm-add-i915-radeon-mdt.patch
diff -N linux-2.6-drm-add-i915-radeon-mdt.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-drm-add-i915-radeon-mdt.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,26 @@
+diff --git a/drivers/char/drm/i915_drv.c b/drivers/char/drm/i915_drv.c
+index 0f9c1f1..1be5795 100644
+--- a/drivers/char/drm/i915_drv.c
++++ b/drivers/char/drm/i915_drv.c
+@@ -37,6 +37,8 @@
+ static struct pci_device_id pciidlist[] = {
+ 	i915_PCI_IDS
+ };
++MODULE_DEVICE_TABLE(pci, pciidlist);
++
+ static struct drm_fence_driver i915_fence_driver = {
+ 	.num_classes = 1,
+ 	.wrap_diff = (1U << (BREADCRUMB_BITS - 1)),
+diff --git a/drivers/char/drm/radeon_drv.c b/drivers/char/drm/radeon_drv.c
+index 349ac3d..1be40f5 100644
+--- a/drivers/char/drm/radeon_drv.c
++++ b/drivers/char/drm/radeon_drv.c
+@@ -56,6 +56,8 @@ static struct pci_device_id pciidlist[] = {
+ 	radeon_PCI_IDS
+ };
+ 
++MODULE_DEVICE_TABLE(pci, pciidlist);
++
+ static struct drm_driver driver = {
+ 	.driver_features =
+ 	    DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG |

linux-2.6-drm-git-i915-remove-priv-access.patch:

Index: linux-2.6-drm-git-i915-remove-priv-access.patch
===================================================================
RCS file: linux-2.6-drm-git-i915-remove-priv-access.patch
diff -N linux-2.6-drm-git-i915-remove-priv-access.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-drm-git-i915-remove-priv-access.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,24 @@
+diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c
+index d2b7d3f..30ab367 100644
+--- a/drivers/char/drm/i915_dma.c
++++ b/drivers/char/drm/i915_dma.c
+@@ -51,7 +51,7 @@ int i915_wait_ring(struct drm_device *dev, int n, const char *caller)
+ 		if (ring->space >= n)
+ 			return 0;
+ 
+-		dev_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT;
++		//dev_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT;
+ 
+ 		if (ring->head != last_head)
+ 			i = 0;
+@@ -73,8 +73,8 @@ void i915_kernel_lost_context(struct drm_device *dev)
+ 	if (ring->space < 0)
+ 		ring->space += ring->Size;
+ 
+-	if (ring->head == ring->tail)
+-		dev_priv->sarea_priv->perf_boxes |= I915_BOX_RING_EMPTY;
++//	if (ring->head == ring->tail)
++//		dev_priv->sarea_priv->perf_boxes |= I915_BOX_RING_EMPTY;
+ }
+ 
+ static int i915_dma_cleanup(struct drm_device *dev)

linux-2.6-drm-git-mm-revert-nopfn.patch:

Index: linux-2.6-drm-git-mm-revert-nopfn.patch
===================================================================
RCS file: linux-2.6-drm-git-mm-revert-nopfn.patch
diff -N linux-2.6-drm-git-mm-revert-nopfn.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-drm-git-mm-revert-nopfn.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,117 @@
+commit 4825484968daa23b3a55446c5f40f4d35fb6ff21
+Author: Dave Airlie <airlied at dhcp-64-219.bne.redhat.com>
+Date:   Mon Mar 3 13:29:52 2008 +1000
+
+    Revert "drm:  reimplement nopfn callers with fault"
+    
+    This reverts commit ae0bdbd7e1d02e978323640256125f8a5391510a.
+
+diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
+index 6184b98..3cd0b1c 100644
+--- a/drivers/char/drm/drm_vm.c
++++ b/drivers/char/drm/drm_vm.c
+@@ -679,8 +679,8 @@ EXPORT_SYMBOL(drm_mmap);
+  * \c Pagefault method for buffer objects.
+  *
+  * \param vma Virtual memory area.
+- * \param vmf vm fault data
+- * \return Error or VM_FAULT_NOPAGE: the pfn is manually inserted.
++ * \param address File offset.
++ * \return Error or refault. The pfn is manually inserted.
+  *
+  * It's important that pfns are inserted while holding the bo->mutex lock.
+  * otherwise we might race with unmap_mapping_range() which is always
+@@ -692,7 +692,8 @@ EXPORT_SYMBOL(drm_mmap);
+  * protected by the bo->mutex lock.
+  */
+ 
+-static int drm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
++static unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma,
++				     unsigned long address)
+ {
+ 	struct drm_buffer_object *bo = (struct drm_buffer_object *) vma->vm_private_data;
+ 	unsigned long page_offset;
+@@ -704,22 +705,25 @@ static int drm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+ 	unsigned long bus_base;
+ 	unsigned long bus_offset;
+ 	unsigned long bus_size;
+-	unsigned long ret = VM_FAULT_NOPAGE;
++	unsigned long ret = NOPFN_REFAULT;
++
++	if (address > vma->vm_end)
++		return NOPFN_SIGBUS;
+ 
+ 	dev = bo->dev;
+ 	err = drm_bo_read_lock(&dev->bm.bm_lock);
+ 	if (err)
+-		return VM_FAULT_NOPAGE;
++		return NOPFN_REFAULT;
+ 
+ 	err = mutex_lock_interruptible(&bo->mutex);
+ 	if (err) {
+ 		drm_bo_read_unlock(&dev->bm.bm_lock);
+-		return VM_FAULT_NOPAGE;
++		return NOPFN_REFAULT;
+ 	}
+ 
+ 	err = drm_bo_wait(bo, 0, 0, 0);
+ 	if (err) {
+-		ret = (err != -EAGAIN) ? VM_FAULT_SIGBUS : VM_FAULT_NOPAGE;
++		ret = (err != -EAGAIN) ? NOPFN_SIGBUS : NOPFN_REFAULT;
+ 		goto out_unlock;
+ 	}
+ 
+@@ -734,7 +738,7 @@ static int drm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+ 			DRM_BO_FLAG_FORCE_MAPPABLE;
+ 		err = drm_bo_move_buffer(bo, new_flags, 0, 0);
+ 		if (err) {
+-			ret = (err != -EAGAIN) ? VM_FAULT_SIGBUS : VM_FAULT_NOPAGE;
++			ret = (err != -EAGAIN) ? NOPFN_SIGBUS : NOPFN_REFAULT;
+ 			goto out_unlock;
+ 		}
+ 	}
+@@ -743,12 +747,11 @@ static int drm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+ 				&bus_size);
+ 
+ 	if (err) {
+-		ret = VM_FAULT_SIGBUS;
++		ret = NOPFN_SIGBUS;
+ 		goto out_unlock;
+ 	}
+ 
+-	/* XXX: vmf->pgoff may work here, but it adds on vma->vm_pgoff */
+-	page_offset = ((unsigned long)vmf->virtual_address - vma->vm_start) >> PAGE_SHIFT;
++	page_offset = (address - vma->vm_start) >> PAGE_SHIFT;
+ 
+ 	if (bus_size) {
+ 		struct drm_mem_type_manager *man = &dev->bm.man[bo->mem.mem_type];
+@@ -761,7 +764,7 @@ static int drm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+ 		drm_ttm_fixup_caching(ttm);
+ 		page = drm_ttm_get_page(ttm, page_offset);
+ 		if (!page) {
+-			ret = VM_FAULT_OOM;
++			ret = NOPFN_OOM;
+ 			goto out_unlock;
+ 		}
+ 		pfn = page_to_pfn(page);
+@@ -770,9 +773,9 @@ static int drm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+ 			drm_io_prot(_DRM_TTM, vma);
+ 	}
+ 
+-	err = vm_insert_pfn(vma, (unsigned long)vmf->virtual_address, pfn);
++	err = vm_insert_pfn(vma, address, pfn);
+ 	if (err) {
+-		ret = (err != -EAGAIN) ? VM_FAULT_OOM : VM_FAULT_NOPAGE;
++		ret = (err != -EAGAIN) ? NOPFN_OOM : NOPFN_REFAULT;
+ 		goto out_unlock;
+ 	}
+ out_unlock:
+@@ -827,7 +830,7 @@ static void drm_bo_vm_close(struct vm_area_struct *vma)
+ }
+ 
+ static struct vm_operations_struct drm_bo_vm_ops = {
+-	.fault = drm_bo_vm_fault,
++	.nopfn = drm_bo_vm_nopfn,
+ 	.open = drm_bo_vm_open,
+ 	.close = drm_bo_vm_close,
+ };

linux-2.6-drm-git-mm.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 linux-2.6-drm-git-mm.patch
Index: linux-2.6-drm-git-mm.patch
===================================================================
RCS file: linux-2.6-drm-git-mm.patch
diff -N linux-2.6-drm-git-mm.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-drm-git-mm.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,11136 @@
+commit 9ad1ccf9cff8aa911d965c94b83187b50c459d43
+Author: Xiang, Haihao <haihao.xiang at intel.com>
+Date:   Fri Feb 29 12:07:01 2008 +1000
+
+    i915: i915_execbuffer ioctl32 routine, fix #13732
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit aa0e20c041614319ff66a40c5f70a9f7eae01fbc
+Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
+Date:   Fri Feb 29 12:05:48 2008 +1000
+
+    drm/ttm: Add a compat kmap_atomic_prot_pfn to do quick kernel map / unmaps of PCI- or high memory.
+    
+    This is substantially more efficient than drm_bo_kmap, since the mapping only lives on a single processor.  Unmapping is done use kunmap_atomic(). Flushes only a single tlb() entry.
+    
+    Add a support utility int drm_bo_pfn_prot() that returns the pfn and desired page protection for a given bo offset.
+    
+    This is all intended for relocations in bound TTMS or vram.  Mapping-accessing-unmapping must be atomic, either using preempt_xx() macros or a spinlock.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 9c005b094ecada32e04e0b9ebdcfe3ab47fe86b7
+Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
+Date:   Fri Feb 29 11:53:45 2008 +1000
+
+    drm/i915: relocation fixes.
+    
+    This fixes various problems in the relocations for i915.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 35c64f7d95512505400849241605d26b9a9801b4
+Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
+Date:   Fri Feb 29 11:49:39 2008 +1000
+
+    drm/i915: Make the execbuffer code reasonably safe against errors.
+    
+    In particular -EAGAINs, which should be common during Xserver operation.
+    Also handle the fence creation failure case.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit ae0806d80764d8ae63e74a5d7e3921a532d61d14
+Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
+Date:   Fri Feb 29 11:41:36 2008 +1000
+
+    drm/fence: add a last queued sequence member
+    
+    Add an fence_class_manager::last_queued_sequence member, since a sequence number may actually turn up before the corresponding fence object has been queued on the ring.
+    
+    Fence drivers can use this member to determine whether a sequence number must be re-reported.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit e3d3d4c7421a2277be24254524f56e17419c1449
+Author: Kristian Høgsberg <krh at redhat.com>
+Date:   Fri Feb 29 11:38:20 2008 +1000
+
+    drm/i915: remove leading underscores and fixup sarea
+    
+    the sarea fix came from Alan Hourihane
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit e1a98c2e5dd333becd47e188cf66093e1a86f41b
+Author: Kristian Høgsberg <krh at redhat.com>
+Date:   Fri Feb 29 11:35:21 2008 +1000
+
+    drm/i915: Add a dri2 init path that gets the lock from the dri2 sarea.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 70a1de5ac59b59cb8f7c1d08ce455374785bca05
+Author: Kristian Høgsberg <krh at redhat.com>
+Date:   Fri Feb 29 11:31:08 2008 +1000
+
+    drm/i915: Only look up dev_priv->mmio_map if it's not already set up
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 047243f9c142c599d1ab82991a5a0a8dd0170bb8
+Author: Kristian Høgsberg <krh at redhat.com>
+Date:   Fri Feb 29 11:30:26 2008 +1000
+
+    drm/i915: Add I915_PARAM_CHIPSET_ID param to get chipset ID.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit b57dde526e116f14a5697b5c0d9697493baa2d5d
+Author: Kristian Høgsberg <krh at redhat.com>
+Date:   Fri Feb 29 11:29:42 2008 +1000
+
+    drm/i915: Make sarea_priv setup optional.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 3cb77dd7f3974fc64de6ec3859c970b9b9ddd1fc
+Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
+Date:   Fri Feb 29 11:27:30 2008 +1000
+
+    drm/i915: Re-report breadcrumbs on poll to the fence manager,
+    
+    since a breadcrumb may actually turn up before a corresponding fence object
+    has been placed on the fence ring.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 0f066ed26802ff65965f7b29346cec98921c2b29
+Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
+Date:   Fri Feb 29 11:02:23 2008 +1000
+
+    drm/i915: Avoid calling drm_fence_flush_old excessively.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit e927ccfe2905d680b4217fc6af17c9c1ff86ebef
+Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
+Date:   Fri Feb 29 10:57:18 2008 +1000
+
+    drm/fence: differentiate between flushes and waiting types.
+    
+    Add a "command_stream_barrier" method to the bo driver.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit ae0bdbd7e1d02e978323640256125f8a5391510a
+Author: Nick Piggin <npiggin at suse.de>
+Date:   Thu Feb 7 16:29:15 2008 +1000
+
+    drm:  reimplement nopfn callers with fault
+    
+    Reimplement the existing nopfn handlers with ->fault so we can subsequently
+    remove nopfn
+    
+    Signed-off-by: Nick Piggin <npiggin at suse.de>
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 29403da6adea71d155a4c3ad0923cd7c86f0bf9e
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Thu Feb 7 16:21:57 2008 +1000
+
+    drm: remove tlb flush call as no longer needed.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit b691c8da4038e0e01fb3beaa06bf21468c8dd0f0
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Fri Jan 25 11:36:39 2008 +1000
+
+    drm/i915: final i915 interface change - make reloc use copy from user
+    
+    Life is a lot simpler especially with relocation avoidance code, if we
+    simple store the relocations in a malloced buffer and copy from user
+    instead of bring up a BO everytime.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 222a41948d2a1f454c7f978f3c3f18dc25061216
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Fri Jan 25 11:05:59 2008 +1000
+
+    drm: whitespace and some label cleanups.
+    
+    Signed-off-by: Dave Airlie <airlied at linux.ie>
+
+commit 046fd35ec86a5744b6a1073e47fd7fea1ab0c553
+Author: Kyle McMartin <kyle at mcmartin.ca>
+Date:   Thu Jan 24 16:48:24 2008 +1000
+
+    i915: fix invalid opcode exception on cpus without clflush
+    
+    i915_flush_ttm was unconditionally executing a clflush instruction
+    to (obviously) flush the cache. Instead, check if the cpu supports
+    clflush, and if not, fall back to calling wbinvd to flush the entire
+    cache.
+    
+    Signed-off-by: Kyle McMartin <kmcmartin at redhat.com>
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 9f32218d9b003af5206d9e0c280a2bcff19ee125
+Author: Eric Anholt <eric at anholt.net>
+Date:   Thu Jan 24 16:47:28 2008 +1000
+
+    drm: Add additional explanation of DRM_BO_FLAG_CACHED_MAPPED
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 9149865182a2edf9e62ad290bbe93521f1c00372
+Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
+Date:   Thu Jan 24 16:44:25 2008 +1000
+
+    drm/ttm:  Properly propagate the user-space fence flags.
[...10743 lines suppressed...]
++	if (dev_priv->irq_enabled && (--dev_priv->user_irq_refcount == 0)) {
++		/*		dev_priv->irq_enable_reg &= ~USER_INT_FLAG;
++		  I915_WRITE16(I915REG_INT_ENABLE_R, dev_priv->irq_enable_reg);*/
++	}
++	spin_unlock(&dev_priv->user_irq_lock);
++}
++
++
+ static int i915_wait_irq(struct drm_device * dev, int irq_nr)
+ {
+ 	drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
+@@ -308,19 +411,24 @@ static int i915_wait_irq(struct drm_device * dev, int irq_nr)
+ 
+ 	dev_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT;
+ 
++	i915_user_irq_on(dev_priv);
+ 	DRM_WAIT_ON(ret, dev_priv->irq_queue, 3 * DRM_HZ,
+ 		    READ_BREADCRUMB(dev_priv) >= irq_nr);
++	i915_user_irq_off(dev_priv);
+ 
+ 	if (ret == -EBUSY) {
+ 		DRM_ERROR("EBUSY -- rec: %d emitted: %d\n",
+ 			  READ_BREADCRUMB(dev_priv), (int)dev_priv->counter);
+ 	}
+ 
+-	dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv);
++	if (dev_priv->sarea_priv)
++		dev_priv->sarea_priv->last_dispatch =
++			READ_BREADCRUMB(dev_priv);
+ 	return ret;
+ }
+ 
+-static int i915_driver_vblank_do_wait(struct drm_device *dev, unsigned int *sequence,
++static int i915_driver_vblank_do_wait(struct drm_device *dev,
++				      unsigned int *sequence,
+ 				      atomic_t *counter)
+ {
+ 	drm_i915_private_t *dev_priv = dev->dev_private;
+@@ -397,15 +505,15 @@ int i915_irq_wait(struct drm_device *dev, void *data,
+ static void i915_enable_interrupt (struct drm_device *dev)
+ {
+ 	drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
+-	u16 flag;
+ 
+-	flag = 0;
++	dev_priv->irq_enable_reg = USER_INT_FLAG;
+ 	if (dev_priv->vblank_pipe & DRM_I915_VBLANK_PIPE_A)
+-		flag |= VSYNC_PIPEA_FLAG;
++		dev_priv->irq_enable_reg |= VSYNC_PIPEA_FLAG;
+ 	if (dev_priv->vblank_pipe & DRM_I915_VBLANK_PIPE_B)
+-		flag |= VSYNC_PIPEB_FLAG;
++		dev_priv->irq_enable_reg |= VSYNC_PIPEB_FLAG;
+ 
+-	I915_WRITE16(I915REG_INT_ENABLE_R, USER_INT_FLAG | flag);
++	I915_WRITE16(I915REG_INT_ENABLE_R, dev_priv->irq_enable_reg);
++	dev_priv->irq_enabled = 1;
+ }
+ 
+ /* Set the vblank monitor pipe
+@@ -464,7 +572,7 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
+ 	drm_i915_private_t *dev_priv = dev->dev_private;
+ 	drm_i915_vblank_swap_t *swap = data;
+ 	drm_i915_vbl_swap_t *vbl_swap;
+-	unsigned int pipe, seqtype, curseq;
++	unsigned int pipe, seqtype, curseq, plane;
+ 	unsigned long irqflags;
+ 	struct list_head *list;
+ 
+@@ -473,18 +581,20 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
+ 		return -EINVAL;
+ 	}
+ 
+-	if (dev_priv->sarea_priv->rotation) {
++	if (!dev_priv->sarea_priv || dev_priv->sarea_priv->rotation) {
+ 		DRM_DEBUG("Rotation not supported\n");
+ 		return -EINVAL;
+ 	}
+ 
+ 	if (swap->seqtype & ~(_DRM_VBLANK_RELATIVE | _DRM_VBLANK_ABSOLUTE |
+-			     _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS)) {
++			     _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS |
++			     _DRM_VBLANK_FLIP)) {
+ 		DRM_ERROR("Invalid sequence type 0x%x\n", swap->seqtype);
+ 		return -EINVAL;
+ 	}
+ 
+-	pipe = (swap->seqtype & _DRM_VBLANK_SECONDARY) ? 1 : 0;
++	plane = (swap->seqtype & _DRM_VBLANK_SECONDARY) ? 1 : 0;
++	pipe = i915_get_pipe(dev, plane);
+ 
+ 	seqtype = swap->seqtype & (_DRM_VBLANK_RELATIVE | _DRM_VBLANK_ABSOLUTE);
+ 
+@@ -495,6 +605,11 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
+ 
+ 	spin_lock_irqsave(&dev->drw_lock, irqflags);
+ 
++	/* It makes no sense to schedule a swap for a drawable that doesn't have
++	 * valid information at this point. E.g. this could mean that the X
++	 * server is too old to push drawable information to the DRM, in which
++	 * case all such swaps would become ineffective.
++	 */
+ 	if (!drm_get_drawable_info(dev, swap->drawable)) {
+ 		spin_unlock_irqrestore(&dev->drw_lock, irqflags);
+ 		DRM_DEBUG("Invalid drawable ID %d\n", swap->drawable);
+@@ -517,14 +632,43 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
+ 		}
+ 	}
+ 
++	if (swap->seqtype & _DRM_VBLANK_FLIP) {
++		swap->sequence--;
++
++		if ((curseq - swap->sequence) <= (1<<23)) {
++			struct drm_drawable_info *drw;
++
++			LOCK_TEST_WITH_RETURN(dev, file_priv);
++
++			spin_lock_irqsave(&dev->drw_lock, irqflags);
++
++			drw = drm_get_drawable_info(dev, swap->drawable);
++
++			if (!drw) {
++				spin_unlock_irqrestore(&dev->drw_lock,
++				    irqflags);
++				DRM_DEBUG("Invalid drawable ID %d\n",
++					  swap->drawable);
++				return -EINVAL;
++			}
++
++			i915_dispatch_vsync_flip(dev, drw, plane);
++
++			spin_unlock_irqrestore(&dev->drw_lock, irqflags);
++
++			return 0;
++		}
++	}
++
+ 	spin_lock_irqsave(&dev_priv->swaps_lock, irqflags);
+ 
+ 	list_for_each(list, &dev_priv->vbl_swaps.head) {
+ 		vbl_swap = list_entry(list, drm_i915_vbl_swap_t, head);
+ 
+ 		if (vbl_swap->drw_id == swap->drawable &&
+-		    vbl_swap->pipe == pipe &&
++		    vbl_swap->plane == plane &&
+ 		    vbl_swap->sequence == swap->sequence) {
++			vbl_swap->flip = (swap->seqtype & _DRM_VBLANK_FLIP);
+ 			spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags);
+ 			DRM_DEBUG("Already scheduled\n");
+ 			return 0;
+@@ -548,8 +692,12 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
+ 	DRM_DEBUG("\n");
+ 
+ 	vbl_swap->drw_id = swap->drawable;
+-	vbl_swap->pipe = pipe;
++	vbl_swap->plane = plane;
+ 	vbl_swap->sequence = swap->sequence;
++	vbl_swap->flip = (swap->seqtype & _DRM_VBLANK_FLIP);
++
++	if (vbl_swap->flip)
++		swap->sequence++;
+ 
+ 	spin_lock_irqsave(&dev_priv->swaps_lock, irqflags);
+ 
+@@ -567,7 +715,7 @@ void i915_driver_irq_preinstall(struct drm_device * dev)
+ {
+ 	drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
+ 
+-	I915_WRITE16(I915REG_HWSTAM, 0xfffe);
++	I915_WRITE16(I915REG_HWSTAM, 0xeffe);
+ 	I915_WRITE16(I915REG_INT_MASK_R, 0x0);
+ 	I915_WRITE16(I915REG_INT_ENABLE_R, 0x0);
+ }
+@@ -580,10 +728,17 @@ void i915_driver_irq_postinstall(struct drm_device * dev)
+ 	INIT_LIST_HEAD(&dev_priv->vbl_swaps.head);
+ 	dev_priv->swaps_pending = 0;
+ 
+-	if (!dev_priv->vblank_pipe)
+-		dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A;
++	spin_lock_init(&dev_priv->user_irq_lock);
++	dev_priv->user_irq_refcount = 0;
++
+ 	i915_enable_interrupt(dev);
+ 	DRM_INIT_WAITQUEUE(&dev_priv->irq_queue);
++
++	/*
++	 * Initialize the hardware status page IRQ location.
++	 */
++
++	I915_WRITE(I915REG_INSTPM, (1 << 5) | (1 << 21));
+ }
+ 
+ void i915_driver_irq_uninstall(struct drm_device * dev)
+@@ -594,6 +749,7 @@ void i915_driver_irq_uninstall(struct drm_device * dev)
+ 	if (!dev_priv)
+ 		return;
+ 
++	dev_priv->irq_enabled = 0;
+ 	I915_WRITE16(I915REG_HWSTAM, 0xffff);
+ 	I915_WRITE16(I915REG_INT_MASK_R, 0xffff);
+ 	I915_WRITE16(I915REG_INT_ENABLE_R, 0x0);

linux-2.6-e1000-corrupt-eeprom-checksum.patch:

Index: linux-2.6-e1000-corrupt-eeprom-checksum.patch
===================================================================
RCS file: linux-2.6-e1000-corrupt-eeprom-checksum.patch
diff -N linux-2.6-e1000-corrupt-eeprom-checksum.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-e1000-corrupt-eeprom-checksum.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,25 @@
+diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
+index 7c5b05a..603150b 100644
+--- a/drivers/net/e1000/e1000_main.c
++++ b/drivers/net/e1000/e1000_main.c
+@@ -258,6 +258,10 @@ static int debug = NETIF_MSG_DRV | NETIF_MSG_PROBE;
+ module_param(debug, int, 0);
+ MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
+ 
++static int eeprom_bad_csum_allow = 0;
++module_param(eeprom_bad_csum_allow, int, 0);
++MODULE_PARM_DESC(eeprom_bas_csum_allow, "Allow bad eeprom checksums");
++
+ /**
+  * e1000_init_module - Driver Registration Routine
+  *
+@@ -1081,7 +1085,8 @@ e1000_probe(struct pci_dev *pdev,
+ 		 * interface after manually setting a hw addr using
+ 		 * `ip set address`
+ 		 */
+-		memset(adapter->hw.mac_addr, 0, netdev->addr_len);
++		if (!eeprom_bad_csum_allow)
++			memset(adapter->hw.mac_addr, 0, netdev->addr_len);
+ 	} else {
+ 		/* copy the MAC address out of the EEPROM */
+ 		if (e1000_read_mac_addr(&adapter->hw))

linux-2.6-e1000-ich9.patch:

Index: linux-2.6-e1000-ich9.patch
===================================================================
RCS file: linux-2.6-e1000-ich9.patch
diff -N linux-2.6-e1000-ich9.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-e1000-ich9.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,29 @@
+diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
+index 8f8139d..22c49ec 100644
+--- a/drivers/net/e1000e/ich8lan.c
++++ b/drivers/net/e1000e/ich8lan.c
+@@ -209,6 +209,12 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw)
+ 
+ 	/* Verify phy id */
+ 	switch (phy->id) {
++	case 0x0:
++		if (hw->adapter->pdev->device == 0x10be)
++			hw_dbg(hw, "got 0 phy id, trying anyway");
++			/* Fall through to IGP03E1000 case below */
++		else
++			return -E1000_ERR_PHY;
+ 	case IGP03E1000_E_PHY_ID:
+ 		phy->type = e1000_phy_igp_3;
+ 		phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
+diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
+index 3031d6d..932b4d8 100644
+--- a/drivers/net/e1000e/netdev.c
++++ b/drivers/net/e1000e/netdev.c
+@@ -4095,6 +4095,7 @@ static struct pci_device_id e1000_pci_tbl[] = {
+ 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE_G), board_ich9lan },
+ 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE_GT), board_ich9lan },
+ 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_AMT), board_ich9lan },
++	{ PCI_VDEVICE(INTEL, 0x10be), board_ich9lan },
+ 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_C), board_ich9lan },
+ 
+ 	{ }	/* terminate list */

linux-2.6-ext4-stable-queue.patch:

Index: linux-2.6-ext4-stable-queue.patch
===================================================================
RCS file: linux-2.6-ext4-stable-queue.patch
diff -N linux-2.6-ext4-stable-queue.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ext4-stable-queue.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,810 @@
+Index: linux-2.6.24.noarch/fs/ext4/dir.c
+===================================================================
+--- linux-2.6.24.noarch.orig/fs/ext4/dir.c
++++ linux-2.6.24.noarch/fs/ext4/dir.c
+@@ -46,7 +46,7 @@ const struct file_operations ext4_dir_op
+ #ifdef CONFIG_COMPAT
+ 	.compat_ioctl	= ext4_compat_ioctl,
+ #endif
+-	.fsync		= ext4_sync_file,	/* BKL held */
++	.fsync		= ext4_sync_file,
+ 	.release	= ext4_release_dir,
+ };
+ 
+Index: linux-2.6.24.noarch/fs/ext4/inode.c
+===================================================================
+--- linux-2.6.24.noarch.orig/fs/ext4/inode.c
++++ linux-2.6.24.noarch/fs/ext4/inode.c
+@@ -403,6 +403,7 @@ static ext4_fsblk_t ext4_find_near(struc
+ 	__le32 *start = ind->bh ? (__le32*) ind->bh->b_data : ei->i_data;
+ 	__le32 *p;
+ 	ext4_fsblk_t bg_start;
++	ext4_fsblk_t last_block;
+ 	ext4_grpblk_t colour;
+ 
+ 	/* Try to find previous block */
+@@ -420,8 +421,13 @@ static ext4_fsblk_t ext4_find_near(struc
+ 	 * into the same cylinder group then.
+ 	 */
+ 	bg_start = ext4_group_first_block_no(inode->i_sb, ei->i_block_group);
+-	colour = (current->pid % 16) *
++	last_block = ext4_blocks_count(EXT4_SB(inode->i_sb)->s_es) - 1;
++
++	if (bg_start + EXT4_BLOCKS_PER_GROUP(inode->i_sb) <= last_block)
++		colour = (current->pid % 16) *
+ 			(EXT4_BLOCKS_PER_GROUP(inode->i_sb) / 16);
++	else
++		colour = (current->pid % 16) * ((last_block - bg_start) / 16);
+ 	return bg_start + colour;
+ }
+ 
+@@ -768,7 +774,6 @@ err_out:
+  *
+  * `handle' can be NULL if create == 0.
+  *
+- * The BKL may not be held on entry here.  Be sure to take it early.
+  * return > 0, # of blocks mapped or allocated.
+  * return = 0, if plain lookup failed.
+  * return < 0, error case.
+@@ -903,11 +908,34 @@ out:
+  */
+ #define DIO_CREDITS 25
+ 
++
++/*
++ * ext4 get_block() wrapper function
++ * It first do a look up, returns if the blocks already mapped. Otherwise
++ * it takes the write sem and do block allocation
++ *
++ * If file type is extents based, call with ext4_ext_get_blocks()
++ * Otherwise, call with ext4_get_blocks_handle() to handle indirect mapping
++ * based files
++ *
++ * return > 0, number of of blocks already mapped/allocated
++ *          if create==0 and these are pre-allocated blocks
++ *          	 buffer head is unmapped
++ *          otherwise blocks are mapped
++ *
++ * return = 0, if plain look up failed (blocks have not been allocated)
++ *          buffer head is unmapped
++ *
++ * return < 0, error case.
++ */
+ int ext4_get_blocks_wrap(handle_t *handle, struct inode *inode, sector_t block,
+ 			unsigned long max_blocks, struct buffer_head *bh,
+ 			int create, int extend_disksize)
+ {
+ 	int retval;
++
++	clear_buffer_mapped(bh);
++
+ 	/*
+ 	 * Try to see if we can get  the block without requesting
+ 	 * for new file system block.
+@@ -921,12 +949,27 @@ int ext4_get_blocks_wrap(handle_t *handl
+ 				inode, block, max_blocks, bh, 0, 0);
+ 	}
+ 	up_read((&EXT4_I(inode)->i_data_sem));
+-	if (!create || (retval > 0))
++
++	/* If it is only a block(s) look up */
++	if (!create)
++		return retval;
++
++	/*
++	 * Returns if the blocks have already allocated
++	 *
++	 * Note that if blocks have been preallocated
++	 * ext4_ext_get_block() returns with buffer head unmapped.
++	 * Write to a preallocated space needs to split
++	 * the preallocated extents, thus needs to update
++	 * i_data
++	 */
++	if (retval > 0 && buffer_mapped(bh))
+ 		return retval;
+ 
+ 	/*
+-	 * We need to allocate new blocks which will result
+-	 * in i_data update
++	 * New blocks and preallocation handling will possiblely result
++	 * in i_data update, take the write sem, and call get_blocks()
++	 * with create = 1
+ 	 */
+ 	down_write((&EXT4_I(inode)->i_data_sem));
+ 	/*
+@@ -3461,3 +3504,9 @@ int ext4_change_inode_journal_flag(struc
+ 
+ 	return err;
+ }
++
++int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page)
++{
++	return block_page_mkwrite(vma, page, ext4_get_block);
++}
++
+Index: linux-2.6.24.noarch/fs/ext4/extents.c
+===================================================================
+--- linux-2.6.24.noarch.orig/fs/ext4/extents.c
++++ linux-2.6.24.noarch/fs/ext4/extents.c
+@@ -148,6 +148,7 @@ static ext4_fsblk_t ext4_ext_find_goal(s
+ {
+ 	struct ext4_inode_info *ei = EXT4_I(inode);
+ 	ext4_fsblk_t bg_start;
++	ext4_fsblk_t last_block;
+ 	ext4_grpblk_t colour;
+ 	int depth;
+ 
+@@ -169,8 +170,13 @@ static ext4_fsblk_t ext4_ext_find_goal(s
+ 	/* OK. use inode's group */
+ 	bg_start = (ei->i_block_group * EXT4_BLOCKS_PER_GROUP(inode->i_sb)) +
+ 		le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_first_data_block);
+-	colour = (current->pid % 16) *
++	last_block = ext4_blocks_count(EXT4_SB(inode->i_sb)->s_es) - 1;
++
++	if (bg_start + EXT4_BLOCKS_PER_GROUP(inode->i_sb) <= last_block)
++		colour = (current->pid % 16) *
+ 			(EXT4_BLOCKS_PER_GROUP(inode->i_sb) / 16);
++	else
++		colour = (current->pid % 16) * ((last_block - bg_start) / 16);
+ 	return bg_start + colour + block;
+ }
+ 
+@@ -349,7 +355,7 @@ static void ext4_ext_show_leaf(struct in
+ #define ext4_ext_show_leaf(inode,path)
+ #endif
+ 
+-static void ext4_ext_drop_refs(struct ext4_ext_path *path)
++void ext4_ext_drop_refs(struct ext4_ext_path *path)
+ {
+ 	int depth = path->p_depth;
+ 	int i;
+@@ -2168,6 +2174,10 @@ static int ext4_ext_convert_to_initializ
+ 	newblock = iblock - ee_block + ext_pblock(ex);
+ 	ex2 = ex;
+ 
++	err = ext4_ext_get_access(handle, inode, path + depth);
++	if (err)
++		goto out;
++
+ 	/* ex1: ee_block to iblock - 1 : uninitialized */
+ 	if (iblock > ee_block) {
+ 		ex1 = ex;
+@@ -2200,16 +2210,20 @@ static int ext4_ext_convert_to_initializ
+ 		newdepth = ext_depth(inode);
+ 		if (newdepth != depth) {
+ 			depth = newdepth;
+-			path = ext4_ext_find_extent(inode, iblock, NULL);
++			ext4_ext_drop_refs(path);
++			path = ext4_ext_find_extent(inode, iblock, path);
+ 			if (IS_ERR(path)) {
+ 				err = PTR_ERR(path);
+-				path = NULL;
+ 				goto out;
+ 			}
+ 			eh = path[depth].p_hdr;
+ 			ex = path[depth].p_ext;
+ 			if (ex2 != &newex)
+ 				ex2 = ex;
++
++			err = ext4_ext_get_access(handle, inode, path + depth);
++			if (err)
++				goto out;
+ 		}
+ 		allocated = max_blocks;
+ 	}
+@@ -2230,9 +2244,6 @@ static int ext4_ext_convert_to_initializ
+ 	ex2->ee_len = cpu_to_le16(allocated);
+ 	if (ex2 != ex)
+ 		goto insert;
+-	err = ext4_ext_get_access(handle, inode, path + depth);
+-	if (err)
+-		goto out;
+ 	/*
+ 	 * New (initialized) extent starts from the first block
+ 	 * in the current extent. i.e., ex2 == ex
+@@ -2276,9 +2287,22 @@ out:
+ }
+ 
+ /*
++ * Block allocation/map/preallocation routine for extents based files
++ *
++ *
+  * Need to be called with
+  * down_read(&EXT4_I(inode)->i_data_sem) if not allocating file system block
+  * (ie, create is zero). Otherwise down_write(&EXT4_I(inode)->i_data_sem)
++ *
++ * return > 0, number of of blocks already mapped/allocated
++ *          if create == 0 and these are pre-allocated blocks
++ *          	buffer head is unmapped
++ *          otherwise blocks are mapped
++ *
++ * return = 0, if plain look up failed (blocks have not been allocated)
++ *          buffer head is unmapped
++ *
++ * return < 0, error case.
+  */
+ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
+ 			ext4_lblk_t iblock,
+@@ -2623,7 +2647,7 @@ long ext4_fallocate(struct inode *inode,
+ 	 * modify 1 super block, 1 block bitmap and 1 group descriptor.
+ 	 */
+ 	credits = EXT4_DATA_TRANS_BLOCKS(inode->i_sb) + 3;
+-	down_write((&EXT4_I(inode)->i_data_sem));
++	mutex_lock(&inode->i_mutex);
+ retry:
+ 	while (ret >= 0 && ret < max_blocks) {
+ 		block = block + ret;
+@@ -2634,16 +2658,17 @@ retry:
+ 			break;
+ 		}
+ 
+-		ret = ext4_ext_get_blocks(handle, inode, block,
++		ret = ext4_get_blocks_wrap(handle, inode, block,
+ 					  max_blocks, &map_bh,
+ 					  EXT4_CREATE_UNINITIALIZED_EXT, 0);
+-		WARN_ON(ret <= 0);
+ 		if (ret <= 0) {
+-			ext4_error(inode->i_sb, "ext4_fallocate",
+-				    "ext4_ext_get_blocks returned error: "
+-				    "inode#%lu, block=%u, max_blocks=%lu",
++#ifdef EXT4FS_DEBUG
++			WARN_ON(ret <= 0);
++			printk(KERN_ERR "%s: ext4_ext_get_blocks "
++				    "returned error inode#%lu, block=%u, "
++				    "max_blocks=%lu", __func__,
+ 				    inode->i_ino, block, max_blocks);
+-			ret = -EIO;
++#endif
+ 			ext4_mark_inode_dirty(handle, inode);
+ 			ret2 = ext4_journal_stop(handle);
+ 			break;
+@@ -2680,7 +2705,6 @@ retry:
+ 	if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries))
+ 		goto retry;
+ 
+-	up_write((&EXT4_I(inode)->i_data_sem));
+ 	/*
+ 	 * Time to update the file size.
+ 	 * Update only when preallocation was requested beyond the file size.
+@@ -2692,21 +2716,18 @@ retry:
+ 			 * if no error, we assume preallocation succeeded
+ 			 * completely
+ 			 */
+-			mutex_lock(&inode->i_mutex);
+ 			i_size_write(inode, offset + len);
+ 			EXT4_I(inode)->i_disksize = i_size_read(inode);
+-			mutex_unlock(&inode->i_mutex);
+ 		} else if (ret < 0 && nblocks) {
+ 			/* Handle partial allocation scenario */
+ 			loff_t newsize;
+ 
+-			mutex_lock(&inode->i_mutex);
+ 			newsize  = (nblocks << blkbits) + i_size_read(inode);
+ 			i_size_write(inode, EXT4_BLOCK_ALIGN(newsize, blkbits));
+ 			EXT4_I(inode)->i_disksize = i_size_read(inode);
+-			mutex_unlock(&inode->i_mutex);
+ 		}
+ 	}
+ 
++	mutex_unlock(&inode->i_mutex);
+ 	return ret > 0 ? ret2 : ret;
+ }
+Index: linux-2.6.24.noarch/fs/ext4/mballoc.c
+===================================================================
+--- linux-2.6.24.noarch.orig/fs/ext4/mballoc.c
++++ linux-2.6.24.noarch/fs/ext4/mballoc.c
+@@ -627,21 +627,19 @@ static ext4_fsblk_t ext4_grp_offs_to_blo
+ 	return block;
+ }
+ 
++static inline void *mb_correct_addr_and_bit(int *bit, void *addr)
++{
+ #if BITS_PER_LONG == 64
+-#define mb_correct_addr_and_bit(bit, addr)		\
+-{							\
+-	bit += ((unsigned long) addr & 7UL) << 3;	\
+-	addr = (void *) ((unsigned long) addr & ~7UL);	\
+-}
++	*bit += ((unsigned long) addr & 7UL) << 3;
++	addr = (void *) ((unsigned long) addr & ~7UL);
+ #elif BITS_PER_LONG == 32
+-#define mb_correct_addr_and_bit(bit, addr)		\
+-{							\
+-	bit += ((unsigned long) addr & 3UL) << 3;	\
+-	addr = (void *) ((unsigned long) addr & ~3UL);	\
+-}
++	*bit += ((unsigned long) addr & 3UL) << 3;
++	addr = (void *) ((unsigned long) addr & ~3UL);
+ #else
+ #error "how many bits you are?!"
+ #endif
++	return addr;
++}
+ 
+ static inline int mb_test_bit(int bit, void *addr)
+ {
+@@ -649,34 +647,54 @@ static inline int mb_test_bit(int bit, v
+ 	 * ext4_test_bit on architecture like powerpc
+ 	 * needs unsigned long aligned address
+ 	 */
+-	mb_correct_addr_and_bit(bit, addr);
++	addr = mb_correct_addr_and_bit(&bit, addr);
+ 	return ext4_test_bit(bit, addr);
+ }
+ 
+ static inline void mb_set_bit(int bit, void *addr)
+ {
+-	mb_correct_addr_and_bit(bit, addr);
++	addr = mb_correct_addr_and_bit(&bit, addr);
+ 	ext4_set_bit(bit, addr);
+ }
+ 
+ static inline void mb_set_bit_atomic(spinlock_t *lock, int bit, void *addr)
+ {
+-	mb_correct_addr_and_bit(bit, addr);
++	addr = mb_correct_addr_and_bit(&bit, addr);
+ 	ext4_set_bit_atomic(lock, bit, addr);
+ }
+ 
+ static inline void mb_clear_bit(int bit, void *addr)
+ {
+-	mb_correct_addr_and_bit(bit, addr);
++	addr = mb_correct_addr_and_bit(&bit, addr);
+ 	ext4_clear_bit(bit, addr);
+ }
+ 
+ static inline void mb_clear_bit_atomic(spinlock_t *lock, int bit, void *addr)
+ {
+-	mb_correct_addr_and_bit(bit, addr);
++	addr = mb_correct_addr_and_bit(&bit, addr);
+ 	ext4_clear_bit_atomic(lock, bit, addr);
+ }
+ 
++static inline int mb_find_next_zero_bit(void *addr, int max, int start)
++{
++	int fix = 0;
++	addr = mb_correct_addr_and_bit(&fix, addr);
++	max += fix;
++	start += fix;
++
++	return ext4_find_next_zero_bit(addr, max, start) - fix;
++}
++
++static inline int mb_find_next_bit(void *addr, int max, int start)
++{
++	int fix = 0;
++	addr = mb_correct_addr_and_bit(&fix, addr);
++	max += fix;
++	start += fix;
++
++	return ext4_find_next_bit(addr, max, start) - fix;
++}
++
+ static void *mb_find_buddy(struct ext4_buddy *e4b, int order, int *max)
+ {
+ 	char *bb;
+@@ -906,7 +924,7 @@ static void ext4_mb_mark_free_simple(str
+ 	unsigned short chunk;
+ 	unsigned short border;
+ 
+-	BUG_ON(len >= EXT4_BLOCKS_PER_GROUP(sb));
++	BUG_ON(len > EXT4_BLOCKS_PER_GROUP(sb));
+ 
+ 	border = 2 << sb->s_blocksize_bits;
+ 
+@@ -946,12 +964,12 @@ static void ext4_mb_generate_buddy(struc
+ 
+ 	/* initialize buddy from bitmap which is aggregation
+ 	 * of on-disk bitmap and preallocations */
+-	i = ext4_find_next_zero_bit(bitmap, max, 0);
++	i = mb_find_next_zero_bit(bitmap, max, 0);
+ 	grp->bb_first_free = i;
+ 	while (i < max) {
+ 		fragments++;
+ 		first = i;
+-		i = ext4_find_next_bit(bitmap, max, i);
++		i = mb_find_next_bit(bitmap, max, i);
+ 		len = i - first;
+ 		free += len;
+ 		if (len > 1)
+@@ -959,7 +977,7 @@ static void ext4_mb_generate_buddy(struc
+ 		else
+ 			grp->bb_counters[0]++;
+ 		if (i < max)
+-			i = ext4_find_next_zero_bit(bitmap, max, i);
++			i = mb_find_next_zero_bit(bitmap, max, i);
+ 	}
+ 	grp->bb_fragments = fragments;
+ 
+@@ -967,6 +985,10 @@ static void ext4_mb_generate_buddy(struc
+ 		ext4_error(sb, __FUNCTION__,
+ 			"EXT4-fs: group %lu: %u blocks in bitmap, %u in gd\n",
+ 			group, free, grp->bb_free);
++		/*
++		 * If we intent to continue, we consider group descritor
++		 * corrupt and update bb_free using bitmap value
++		 */
+ 		grp->bb_free = free;
+ 	}
+ 
+@@ -1146,8 +1168,9 @@ out:
+ 	return err;
+ }
+ 
+-static int ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group,
+-		struct ext4_buddy *e4b)
++static noinline int
++ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group,
++					struct ext4_buddy *e4b)
+ {
+ 	struct ext4_sb_info *sbi = EXT4_SB(sb);
+ 	struct inode *inode = sbi->s_buddy_cache;
+@@ -1778,7 +1801,7 @@ static void ext4_mb_simple_scan_group(st
+ 		buddy = mb_find_buddy(e4b, i, &max);
+ 		BUG_ON(buddy == NULL);
+ 
+-		k = ext4_find_next_zero_bit(buddy, max, 0);
++		k = mb_find_next_zero_bit(buddy, max, 0);
+ 		BUG_ON(k >= max);
+ 
+ 		ac->ac_found++;
+@@ -1818,11 +1841,11 @@ static void ext4_mb_complex_scan_group(s
+ 	i = e4b->bd_info->bb_first_free;
+ 
+ 	while (free && ac->ac_status == AC_STATUS_CONTINUE) {
+-		i = ext4_find_next_zero_bit(bitmap,
++		i = mb_find_next_zero_bit(bitmap,
+ 						EXT4_BLOCKS_PER_GROUP(sb), i);
+ 		if (i >= EXT4_BLOCKS_PER_GROUP(sb)) {
+ 			/*
+-			 * IF we corrupt the bitmap  we won't find any
++			 * IF we have corrupt bitmap, we won't find any
+ 			 * free blocks even though group info says we
+ 			 * we have free blocks
+ 			 */
+@@ -1838,6 +1861,12 @@ static void ext4_mb_complex_scan_group(s
+ 			ext4_error(sb, __FUNCTION__, "%d free blocks as per "
+ 					"group info. But got %d blocks\n",
+ 					free, ex.fe_len);
++			/*
++			 * The number of free blocks differs. This mostly
++			 * indicate that the bitmap is corrupt. So exit
++			 * without claiming the space.
++			 */
++			break;
+ 		}
+ 
+ 		ext4_mb_measure_extent(ac, &ex, e4b);
+@@ -1937,7 +1966,8 @@ static int ext4_mb_good_group(struct ext
+ 	return 0;
+ }
+ 
+-static int ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
++static noinline int
++ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
+ {
+ 	ext4_group_t group;
+ 	ext4_group_t i;
+@@ -2444,7 +2474,7 @@ static void ext4_mb_history_init(struct 
+ 	/* if we can't allocate history, then we simple won't use it */
+ }
+ 
+-static void ext4_mb_store_history(struct ext4_allocation_context *ac)
++static noinline void ext4_mb_store_history(struct ext4_allocation_context *ac)
+ {
+ 	struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
+ 	struct ext4_mb_history h;
+@@ -2780,7 +2810,7 @@ int ext4_mb_release(struct super_block *
+ 	return 0;
+ }
+ 
+-static void ext4_mb_free_committed_blocks(struct super_block *sb)
++static noinline void ext4_mb_free_committed_blocks(struct super_block *sb)
+ {
+ 	struct ext4_sb_info *sbi = EXT4_SB(sb);
+ 	int err;
+@@ -3001,7 +3031,8 @@ void exit_ext4_mballoc(void)
+  * Check quota and mark choosed space (ac->ac_b_ex) non-free in bitmaps
+  * Returns 0 if success or error code
+  */
+-static int ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
++static noinline int
++ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
+ 				handle_t *handle)
+ {
+ 	struct buffer_head *bitmap_bh = NULL;
+@@ -3118,7 +3149,8 @@ static void ext4_mb_normalize_group_requ
+  * Normalization means making request better in terms of
+  * size and alignment
+  */
+-static void ext4_mb_normalize_request(struct ext4_allocation_context *ac,
++static noinline void
++ext4_mb_normalize_request(struct ext4_allocation_context *ac,
+ 				struct ext4_allocation_request *ar)
+ {
+ 	int bsbits, max;
+@@ -3384,7 +3416,7 @@ static void ext4_mb_use_group_pa(struct 
+ /*
+  * search goal blocks in preallocated space
+  */
+-static int ext4_mb_use_preallocated(struct ext4_allocation_context *ac)
++static noinline int ext4_mb_use_preallocated(struct ext4_allocation_context *ac)
+ {
+ 	struct ext4_inode_info *ei = EXT4_I(ac->ac_inode);
+ 	struct ext4_locality_group *lg;
+@@ -3551,7 +3583,7 @@ static void ext4_mb_put_pa(struct ext4_a
+ /*
+  * creates new preallocated space for given inode
+  */
+-static int ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
++static noinline int ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
+ {
+ 	struct super_block *sb = ac->ac_sb;
+ 	struct ext4_prealloc_space *pa;
+@@ -3638,7 +3670,7 @@ static int ext4_mb_new_inode_pa(struct e
+ /*
+  * creates new preallocated space for locality group inodes belongs to
+  */
+-static int ext4_mb_new_group_pa(struct ext4_allocation_context *ac)
++static noinline int ext4_mb_new_group_pa(struct ext4_allocation_context *ac)
+ {
+ 	struct super_block *sb = ac->ac_sb;
+ 	struct ext4_locality_group *lg;
+@@ -3711,7 +3743,7 @@ static int ext4_mb_new_preallocation(str
+  * the caller MUST hold group/inode locks.
+  * TODO: optimize the case when there are no in-core structures yet
+  */
+-static int ext4_mb_release_inode_pa(struct ext4_buddy *e4b,
++static noinline int ext4_mb_release_inode_pa(struct ext4_buddy *e4b,
+ 				struct buffer_head *bitmap_bh,
+ 				struct ext4_prealloc_space *pa)
+ {
+@@ -3740,10 +3772,10 @@ static int ext4_mb_release_inode_pa(stru
+ 	}
+ 
+ 	while (bit < end) {
+-		bit = ext4_find_next_zero_bit(bitmap_bh->b_data, end, bit);
++		bit = mb_find_next_zero_bit(bitmap_bh->b_data, end, bit);
+ 		if (bit >= end)
+ 			break;
+-		next = ext4_find_next_bit(bitmap_bh->b_data, end, bit);
++		next = mb_find_next_bit(bitmap_bh->b_data, end, bit);
+ 		if (next > end)
+ 			next = end;
+ 		start = group * EXT4_BLOCKS_PER_GROUP(sb) + bit +
+@@ -3771,6 +3803,10 @@ static int ext4_mb_release_inode_pa(stru
+ 			(unsigned long) pa->pa_len);
+ 		ext4_error(sb, __FUNCTION__, "free %u, pa_free %u\n",
+ 						free, pa->pa_free);
++		/*
++		 * pa is already deleted so we use the value obtained
++		 * from the bitmap and continue.
++		 */
+ 	}
+ 	atomic_add(free, &sbi->s_mb_discarded);
+ 	if (ac)
+@@ -3779,7 +3815,7 @@ static int ext4_mb_release_inode_pa(stru
+ 	return err;
+ }
+ 
+-static int ext4_mb_release_group_pa(struct ext4_buddy *e4b,
++static noinline int ext4_mb_release_group_pa(struct ext4_buddy *e4b,
+ 				struct ext4_prealloc_space *pa)
+ {
+ 	struct ext4_allocation_context *ac;
+@@ -3821,7 +3857,7 @@ static int ext4_mb_release_group_pa(stru
+  * - how many do we discard
+  *   1) how many requested
+  */
+-static int ext4_mb_discard_group_preallocations(struct super_block *sb,
++static noinline int ext4_mb_discard_group_preallocations(struct super_block *sb,
+ 					ext4_group_t group, int needed)
+ {
+ 	struct ext4_group_info *grp = ext4_get_group_info(sb, group);
+@@ -4143,7 +4179,8 @@ static void ext4_mb_group_or_file(struct
+ 	mutex_lock(&ac->ac_lg->lg_mutex);
+ }
+ 
+-static int ext4_mb_initialize_context(struct ext4_allocation_context *ac,
++static noinline int
++ext4_mb_initialize_context(struct ext4_allocation_context *ac,
+ 				struct ext4_allocation_request *ar)
+ {
+ 	struct super_block *sb = ar->inode->i_sb;
+@@ -4374,7 +4411,8 @@ static void ext4_mb_poll_new_transaction
+ 	ext4_mb_free_committed_blocks(sb);
+ }
+ 
+-static int ext4_mb_free_metadata(handle_t *handle, struct ext4_buddy *e4b,
++static noinline int
++ext4_mb_free_metadata(handle_t *handle, struct ext4_buddy *e4b,
+ 			  ext4_group_t group, ext4_grpblk_t block, int count)
+ {
+ 	struct ext4_group_info *db = e4b->bd_info;
+Index: linux-2.6.24.noarch/fs/ext4/namei.c
+===================================================================
+--- linux-2.6.24.noarch.orig/fs/ext4/namei.c
++++ linux-2.6.24.noarch/fs/ext4/namei.c
+@@ -1804,12 +1804,8 @@ retry:
+ 	inode->i_fop = &ext4_dir_operations;
+ 	inode->i_size = EXT4_I(inode)->i_disksize = inode->i_sb->s_blocksize;
+ 	dir_block = ext4_bread (handle, inode, 0, 1, &err);
+-	if (!dir_block) {
+-		ext4_dec_count(handle, inode); /* is this nlink == 0? */
+-		ext4_mark_inode_dirty(handle, inode);
+-		iput (inode);
+-		goto out_stop;
+-	}
++	if (!dir_block)
++		goto out_clear_inode;
+ 	BUFFER_TRACE(dir_block, "get_write_access");
+ 	ext4_journal_get_write_access(handle, dir_block);
+ 	de = (struct ext4_dir_entry_2 *) dir_block->b_data;
+@@ -1832,7 +1828,8 @@ retry:
+ 	ext4_mark_inode_dirty(handle, inode);
+ 	err = ext4_add_entry (handle, dentry, inode);
+ 	if (err) {
+-		inode->i_nlink = 0;
++out_clear_inode:
++		clear_nlink(inode);
+ 		ext4_mark_inode_dirty(handle, inode);
+ 		iput (inode);
+ 		goto out_stop;
+@@ -2164,7 +2161,7 @@ static int ext4_unlink(struct inode * di
+ 	dir->i_ctime = dir->i_mtime = ext4_current_time(dir);
+ 	ext4_update_dx_flag(dir);
+ 	ext4_mark_inode_dirty(handle, dir);
+-	ext4_dec_count(handle, inode);
++	drop_nlink(inode);
+ 	if (!inode->i_nlink)
+ 		ext4_orphan_add(handle, inode);
+ 	inode->i_ctime = ext4_current_time(inode);
+@@ -2214,7 +2211,7 @@ retry:
+ 		err = __page_symlink(inode, symname, l,
+ 				mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
+ 		if (err) {
+-			ext4_dec_count(handle, inode);
++			clear_nlink(inode);
+ 			ext4_mark_inode_dirty(handle, inode);
+ 			iput (inode);
+ 			goto out_stop;
+@@ -2223,7 +2220,6 @@ retry:
+ 		inode->i_op = &ext4_fast_symlink_inode_operations;
+ 		memcpy((char*)&EXT4_I(inode)->i_data,symname,l);
+ 		inode->i_size = l-1;
+-		EXT4_I(inode)->i_flags &= ~EXT4_EXTENTS_FL;
+ 	}
+ 	EXT4_I(inode)->i_disksize = inode->i_size;
+ 	err = ext4_add_nondir(handle, dentry, inode);
+@@ -2407,7 +2403,7 @@ static int ext4_rename (struct inode * o
+ 		ext4_dec_count(handle, old_dir);
+ 		if (new_inode) {
+ 			/* checked empty_dir above, can't have another parent,
+-			 * ext3_dec_count() won't work for many-linked dirs */
++			 * ext4_dec_count() won't work for many-linked dirs */
+ 			new_inode->i_nlink = 0;
+ 		} else {
+ 			ext4_inc_count(handle, new_dir);
+Index: linux-2.6.24.noarch/fs/ext4/migrate.c
+===================================================================
+--- linux-2.6.24.noarch.orig/fs/ext4/migrate.c
++++ linux-2.6.24.noarch/fs/ext4/migrate.c
+@@ -43,6 +43,7 @@ static int finish_range(handle_t *handle
+ 
+ 	if (IS_ERR(path)) {
+ 		retval = PTR_ERR(path);
++		path = NULL;
+ 		goto err_out;
+ 	}
+ 
+@@ -74,6 +75,10 @@ static int finish_range(handle_t *handle
+ 	}
+ 	retval = ext4_ext_insert_extent(handle, inode, path, &newext);
+ err_out:
++	if (path) {
++		ext4_ext_drop_refs(path);
++		kfree(path);
++	}
+ 	lb->first_pblock = 0;
+ 	return retval;
+ }
+Index: linux-2.6.24.noarch/include/linux/ext4_fs_extents.h
+===================================================================
+--- linux-2.6.24.noarch.orig/include/linux/ext4_fs_extents.h
++++ linux-2.6.24.noarch/include/linux/ext4_fs_extents.h
+@@ -227,5 +227,6 @@ extern int ext4_ext_search_left(struct i
+ 						ext4_lblk_t *, ext4_fsblk_t *);
+ extern int ext4_ext_search_right(struct inode *, struct ext4_ext_path *,
+ 						ext4_lblk_t *, ext4_fsblk_t *);
++extern void ext4_ext_drop_refs(struct ext4_ext_path *);
+ #endif /* _LINUX_EXT4_EXTENTS */
+ 
+Index: linux-2.6.24.noarch/fs/ext4/file.c
+===================================================================
+--- linux-2.6.24.noarch.orig/fs/ext4/file.c
++++ linux-2.6.24.noarch/fs/ext4/file.c
+@@ -123,6 +123,23 @@ force_commit:
+ 	return ret;
+ }
+ 
++static struct vm_operations_struct ext4_file_vm_ops = {
++	.fault		= filemap_fault,
++	.page_mkwrite   = ext4_page_mkwrite,
++};
++
++static int ext4_file_mmap(struct file *file, struct vm_area_struct *vma)
++{
++	struct address_space *mapping = file->f_mapping;
++
++	if (!mapping->a_ops->readpage)
++		return -ENOEXEC;
++	file_accessed(file);
++	vma->vm_ops = &ext4_file_vm_ops;
++	vma->vm_flags |= VM_CAN_NONLINEAR;
++	return 0;
++}
++
+ const struct file_operations ext4_file_operations = {
+ 	.llseek		= generic_file_llseek,
+ 	.read		= do_sync_read,
+@@ -133,7 +150,7 @@ const struct file_operations ext4_file_o
+ #ifdef CONFIG_COMPAT
+ 	.compat_ioctl	= ext4_compat_ioctl,
+ #endif
+-	.mmap		= generic_file_mmap,
++	.mmap		= ext4_file_mmap,
+ 	.open		= generic_file_open,
+ 	.release	= ext4_release_file,
+ 	.fsync		= ext4_sync_file,
+Index: linux-2.6.24.noarch/include/linux/ext4_fs.h
+===================================================================
+--- linux-2.6.24.noarch.orig/include/linux/ext4_fs.h
++++ linux-2.6.24.noarch/include/linux/ext4_fs.h
+@@ -1047,6 +1047,7 @@ extern void ext4_set_aops(struct inode *
+ extern int ext4_writepage_trans_blocks(struct inode *);
+ extern int ext4_block_truncate_page(handle_t *handle, struct page *page,
+ 		struct address_space *mapping, loff_t from);
++extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page);
+ 
+ /* ioctl.c */
+ extern int ext4_ioctl (struct inode *, struct file *, unsigned int,
+Index: linux-2.6.24.noarch/fs/ext4/ialloc.c
+===================================================================
+--- linux-2.6.24.noarch.orig/fs/ext4/ialloc.c
++++ linux-2.6.24.noarch/fs/ext4/ialloc.c
+@@ -702,7 +702,12 @@ got:
+ 	ei->i_dir_start_lookup = 0;
+ 	ei->i_disksize = 0;
+ 
+-	ei->i_flags = EXT4_I(dir)->i_flags & ~EXT4_INDEX_FL;
++	/*
++	 * Don't inherit extent flag from directory. We set extent flag on
++	 * newly created directory and file only if -o extent mount option is
++	 * specified
++	 */
++	ei->i_flags = EXT4_I(dir)->i_flags & ~(EXT4_INDEX_FL|EXT4_EXTENTS_FL);
+ 	if (S_ISLNK(mode))
+ 		ei->i_flags &= ~(EXT4_IMMUTABLE_FL|EXT4_APPEND_FL);
+ 	/* dirsync only applies to directories */
+@@ -745,12 +750,15 @@ got:
+ 		goto fail_free_drop;
+ 	}
+ 	if (test_opt(sb, EXTENTS)) {
+-		EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL;
+-		ext4_ext_tree_init(handle, inode);
+-		err = ext4_update_incompat_feature(handle, sb,
+-						EXT4_FEATURE_INCOMPAT_EXTENTS);
+-		if (err)
+-			goto fail;
++		/* set extent flag only for diretory and file */
++		if (S_ISDIR(mode) || S_ISREG(mode)) {
++			EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL;
++			ext4_ext_tree_init(handle, inode);
++			err = ext4_update_incompat_feature(handle, sb,
++					EXT4_FEATURE_INCOMPAT_EXTENTS);
++			if (err)
++				goto fail;
++		}
+ 	}
+ 
+ 	ext4_debug("allocating inode %lu\n", inode->i_ino);

linux-2.6-firewire-git-pending.patch:

Index: linux-2.6-firewire-git-pending.patch
===================================================================
RCS file: linux-2.6-firewire-git-pending.patch
diff -N linux-2.6-firewire-git-pending.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-firewire-git-pending.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,487 @@
+#
+# Patches under review and/or pending inclusion in the linux1394-git
+# tree, which we think we're going to want...
+#
+
+read_bus_info_block() is repeatedly called by workqueue jobs.
+These will step on each others toes eventually if there are multiple
+workqueue threads, and we end up with corrupt config ROM images.
+
+Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
+---
+ drivers/firewire/fw-device.c |   41 +++++++++++++++++++++++------------
+ 1 file changed, 27 insertions(+), 14 deletions(-)
+
+Index: linux/drivers/firewire/fw-device.c
+===================================================================
+--- linux.orig/drivers/firewire/fw-device.c
++++ linux/drivers/firewire/fw-device.c
+@@ -400,6 +400,9 @@ read_rom(struct fw_device *device, int g
+ 	return callback_data.rcode;
+ }
+ 
++#define READ_BIB_ROM_SIZE	256
++#define READ_BIB_STACK_SIZE	16
++
+ /*
+  * Read the bus info block, perform a speed probe, and read all of the rest of
+  * the config ROM.  We do all this with a cached bus generation.  If the bus
+@@ -409,16 +412,23 @@ read_rom(struct fw_device *device, int g
+  */
+ static int read_bus_info_block(struct fw_device *device, int generation)
+ {
+-	static u32 rom[256];
+-	u32 stack[16], sp, key;
+-	int i, end, length;
++	u32 *rom, *stack;
++	u32 sp, key;
++	int i, end, length, ret = -1;
++
++	rom = kmalloc(sizeof(*rom) * READ_BIB_ROM_SIZE +
++		      sizeof(*stack) * READ_BIB_STACK_SIZE, GFP_KERNEL);
++	if (rom == NULL)
++		return -ENOMEM;
++
++	stack = &rom[READ_BIB_ROM_SIZE];
+ 
+ 	device->max_speed = SCODE_100;
+ 
+ 	/* First read the bus info block. */
+ 	for (i = 0; i < 5; i++) {
+ 		if (read_rom(device, generation, i, &rom[i]) != RCODE_COMPLETE)
+-			return -1;
++			goto out;
+ 		/*
+ 		 * As per IEEE1212 7.2, during power-up, devices can
+ 		 * reply with a 0 for the first quadlet of the config
+@@ -428,7 +438,7 @@ static int read_bus_info_block(struct fw
+ 		 * retry mechanism will try again later.
+ 		 */
+ 		if (i == 0 && rom[i] == 0)
+-			return -1;
++			goto out;
+ 	}
+ 
+ 	device->max_speed = device->node->max_speed;
+@@ -478,26 +488,26 @@ static int read_bus_info_block(struct fw
+ 		 */
+ 		key = stack[--sp];
+ 		i = key & 0xffffff;
+-		if (i >= ARRAY_SIZE(rom))
++		if (i >= READ_BIB_ROM_SIZE)
+ 			/*
+ 			 * The reference points outside the standard
+ 			 * config rom area, something's fishy.
+ 			 */
+-			return -1;
++			goto out;
+ 
+ 		/* Read header quadlet for the block to get the length. */
+ 		if (read_rom(device, generation, i, &rom[i]) != RCODE_COMPLETE)
+-			return -1;
++			goto out;
+ 		end = i + (rom[i] >> 16) + 1;
+ 		i++;
+-		if (end > ARRAY_SIZE(rom))
++		if (end > READ_BIB_ROM_SIZE)
+ 			/*
+ 			 * This block extends outside standard config
+ 			 * area (and the array we're reading it
+ 			 * into).  That's broken, so ignore this
+ 			 * device.
+ 			 */
+-			return -1;
++			goto out;
+ 
+ 		/*
+ 		 * Now read in the block.  If this is a directory
+@@ -507,9 +517,9 @@ static int read_bus_info_block(struct fw
+ 		while (i < end) {
+ 			if (read_rom(device, generation, i, &rom[i]) !=
+ 			    RCODE_COMPLETE)
+-				return -1;
++				goto out;
+ 			if ((key >> 30) == 3 && (rom[i] >> 30) > 1 &&
+-			    sp < ARRAY_SIZE(stack))
++			    sp < READ_BIB_STACK_SIZE)
+ 				stack[sp++] = i + rom[i];
+ 			i++;
+ 		}
+@@ -519,11 +529,14 @@ static int read_bus_info_block(struct fw
+ 
+ 	device->config_rom = kmalloc(length * 4, GFP_KERNEL);
+ 	if (device->config_rom == NULL)
+-		return -1;
++		goto out;
+ 	memcpy(device->config_rom, rom, length * 4);
+ 	device->config_rom_length = length;
++	ret = 0;
++ out:
++	kfree(rom);
+ 
+-	return 0;
++	return ret;
+ }
+ 
+ static void fw_unit_release(struct device *dev)
+
+-- 
+Stefan Richter
+-=====-==--- --== ---=-
+http://arcgraph.de/sr/
+
+
+When a device changes its configuration ROM, it announces this with a
+bus reset.  firewire-core has to check which node initiated a bus reset
+and whether any unit directories went away or were added on this node.
+
+Tested with an IOI FWB-IDE01AB which has its link-on bit set if bus
+power is available but does not respond to ROM read requests if self
+power is off.  This implements
+  - recognition of the units if self power is switched on after fw-core
+    gave up the initial attempt to read the config ROM,
+  - shutdown of the units when self power is switched off.
+
+Also tested with a second PC running Linux/ieee1394.  When the eth1394
+driver is inserted and removed on that node, fw-core now notices the
+addition and removal of the IPv4 unit on the ieee1394 node.
+
+Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
+---
+
+Applies after "firewire: replace static ROM cache by allocated cache".
+
+ drivers/firewire/fw-cdev.c     |   18 ++--
+ drivers/firewire/fw-device.c   |  147 ++++++++++++++++++++++++++++++---
+ drivers/firewire/fw-topology.c |    3 
+ drivers/firewire/fw-topology.h |   11 +-
+ 4 files changed, 158 insertions(+), 21 deletions(-)
+
+Index: linux/drivers/firewire/fw-cdev.c
+===================================================================
+--- linux.orig/drivers/firewire/fw-cdev.c
++++ linux/drivers/firewire/fw-cdev.c
+@@ -32,6 +32,7 @@
+ #include <linux/idr.h>
+ #include <linux/compat.h>
+ #include <linux/firewire-cdev.h>
++#include <asm/semaphore.h>
+ #include <asm/system.h>
+ #include <asm/uaccess.h>
+ #include "fw-transaction.h"
+@@ -269,20 +270,25 @@ static int ioctl_get_info(struct client 
+ {
+ 	struct fw_cdev_get_info *get_info = buffer;
+ 	struct fw_cdev_event_bus_reset bus_reset;
++	struct fw_device *device = client->device;
++	unsigned long ret = 0;
+ 
+ 	client->version = get_info->version;
+ 	get_info->version = FW_CDEV_VERSION;
+ 
++	down(&device->device.sem);
+ 	if (get_info->rom != 0) {
+ 		void __user *uptr = u64_to_uptr(get_info->rom);
+ 		size_t want = get_info->rom_length;
+-		size_t have = client->device->config_rom_length * 4;
++		size_t have;
+ 
+-		if (copy_to_user(uptr, client->device->config_rom,
+-				 min(want, have)))
+-			return -EFAULT;
++		have = device->config_rom_length * 4;
++		ret = copy_to_user(uptr, device->config_rom, min(want, have));
+ 	}
+-	get_info->rom_length = client->device->config_rom_length * 4;
++	get_info->rom_length = device->config_rom_length * 4;
++	up(&device->device.sem);
++	if (ret != 0)
++		return -EFAULT;
+ 
+ 	client->bus_reset_closure = get_info->bus_reset_closure;
+ 	if (get_info->bus_reset != 0) {
+@@ -293,7 +299,7 @@ static int ioctl_get_info(struct client 
+ 			return -EFAULT;
+ 	}
+ 
+-	get_info->card = client->device->card->index;
++	get_info->card = device->card->index;
+ 
+ 	return 0;
+ }
+Index: linux/drivers/firewire/fw-device.c
+===================================================================
+--- linux.orig/drivers/firewire/fw-device.c
++++ linux/drivers/firewire/fw-device.c
+@@ -26,6 +26,7 @@
+ #include <linux/delay.h>
+ #include <linux/idr.h>
+ #include <linux/rwsem.h>
++#include <linux/string.h>
+ #include <asm/semaphore.h>
+ #include <asm/system.h>
+ #include <linux/ctype.h>
+@@ -160,9 +161,9 @@ static void fw_device_release(struct dev
+ 	 * Take the card lock so we don't set this to NULL while a
+ 	 * FW_NODE_UPDATED callback is being handled.
+ 	 */
+-	spin_lock_irqsave(&device->card->lock, flags);
++	spin_lock_irqsave(&card->lock, flags);
+ 	device->node->data = NULL;
+-	spin_unlock_irqrestore(&device->card->lock, flags);
++	spin_unlock_irqrestore(&card->lock, flags);
+ 
+ 	fw_node_put(device->node);
+ 	kfree(device->config_rom);
+@@ -337,10 +338,14 @@ static ssize_t
+ config_rom_show(struct device *dev, struct device_attribute *attr, char *buf)
+ {
+ 	struct fw_device *device = fw_device(dev);
++	size_t length;
+ 
+-	memcpy(buf, device->config_rom, device->config_rom_length * 4);
++	down(&dev->sem);
++	length = device->config_rom_length * 4;
++	memcpy(buf, device->config_rom, length);
++	up(&dev->sem);
+ 
+-	return device->config_rom_length * 4;
++	return length;
+ }
+ 
+ static ssize_t
+@@ -412,7 +417,7 @@ read_rom(struct fw_device *device, int g
+  */
+ static int read_bus_info_block(struct fw_device *device, int generation)
+ {
+-	u32 *rom, *stack;
++	u32 *rom, *stack, *old_rom, *new_rom;
+ 	u32 sp, key;
+ 	int i, end, length, ret = -1;
+ 
+@@ -527,11 +532,18 @@ static int read_bus_info_block(struct fw
+ 			length = i;
+ 	}
+ 
+-	device->config_rom = kmalloc(length * 4, GFP_KERNEL);
+-	if (device->config_rom == NULL)
++	old_rom = device->config_rom;
++	new_rom = kmemdup(rom, length * 4, GFP_KERNEL);
++	if (new_rom == NULL)
+ 		goto out;
+-	memcpy(device->config_rom, rom, length * 4);
++
++	/* serialize with readers via sysfs or ioctl */
++	down(&device->device.sem);
++	device->config_rom = new_rom;
+ 	device->config_rom_length = length;
++	up(&device->device.sem);
++
++	kfree(old_rom);
+ 	ret = 0;
+  out:
+ 	kfree(rom);
+@@ -724,7 +736,7 @@ static void fw_device_init(struct work_s
+ 	if (atomic_cmpxchg(&device->state,
+ 		    FW_DEVICE_INITIALIZING,
+ 		    FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN) {
+-		fw_device_shutdown(&device->work.work);
++		fw_device_shutdown(work);
+ 	} else {
+ 		if (device->config_rom_retries)
+ 			fw_notify("created device %s: GUID %08x%08x, S%d00, "
+@@ -738,6 +750,7 @@ static void fw_device_init(struct work_s
+ 				  device->device.bus_id,
+ 				  device->config_rom[3], device->config_rom[4],
+ 				  1 << device->max_speed);
++		device->config_rom_retries = 0;
+ 	}
+ 
+ 	/*
+@@ -784,6 +797,104 @@ static void fw_device_update(struct work
+ 	device_for_each_child(&device->device, NULL, update_unit);
+ }
+ 
++enum {
++	REREAD_BIB_ERROR,
++	REREAD_BIB_GONE,
++	REREAD_BIB_UNCHANGED,
++	REREAD_BIB_CHANGED,
++};
++
++/* Reread and compare bus info block and header of root directory */
++static int reread_bus_info_block(struct fw_device *device, int generation)
++{
++	u32 q;
++	int i;
++
++	for (i = 0; i < 6; i++) {
++		if (read_rom(device, generation, i, &q) != RCODE_COMPLETE)
++			return REREAD_BIB_ERROR;
++
++		if (i == 0 && q == 0)
++			return REREAD_BIB_GONE;
++
++		if (i > device->config_rom_length || q != device->config_rom[i])
++			return REREAD_BIB_CHANGED;
++	}
++
++	return REREAD_BIB_UNCHANGED;
++}
++
++static void fw_device_refresh(struct work_struct *work)
++{
++	struct fw_device *device =
++		container_of(work, struct fw_device, work.work);
++	struct fw_card *card = device->card;
++	int node_id = device->node_id;
++
++	switch (reread_bus_info_block(device, device->generation)) {
++	case REREAD_BIB_ERROR:
++		if (device->config_rom_retries < MAX_RETRIES / 2 &&
++		    atomic_read(&device->state) == FW_DEVICE_INITIALIZING) {
++			device->config_rom_retries++;
++			schedule_delayed_work(&device->work, RETRY_DELAY / 2);
++
++			return;
++		}
++		goto give_up;
++
++	case REREAD_BIB_GONE:
++		goto gone;
++
++	case REREAD_BIB_UNCHANGED:
++		if (atomic_cmpxchg(&device->state,
++			    FW_DEVICE_INITIALIZING,
++			    FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN)
++			goto gone;
++
++		fw_device_update(work);
++		device->config_rom_retries = 0;
++
++		return;
++	}
++
++	/*
++	 * Something changed.  We keep things simple and don't investigate
++	 * further.  We just destroy all previous units and create new ones.
++	 */
++	device_for_each_child(&device->device, NULL, shutdown_unit);
++
++	if (read_bus_info_block(device, device->generation) < 0) {
++		if (device->config_rom_retries < MAX_RETRIES &&
++		    atomic_read(&device->state) == FW_DEVICE_INITIALIZING) {
++			device->config_rom_retries++;
++			schedule_delayed_work(&device->work, RETRY_DELAY);
++
++			return;
++		}
++		goto give_up;
++	}
++
++	create_units(device);
++
++	if (atomic_cmpxchg(&device->state,
++		    FW_DEVICE_INITIALIZING,
++		    FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN)
++		goto gone;
++
++	fw_notify("refreshed device %s\n", device->device.bus_id);
++	device->config_rom_retries = 0;
++	goto out;
++
++ give_up:
++	fw_notify("giving up on refresh of device %s\n", device->device.bus_id);
++ gone:
++	atomic_set(&device->state, FW_DEVICE_SHUTDOWN);
++	fw_device_shutdown(work);
++ out:
++	if (node_id == card->root_node->node_id)
++		schedule_delayed_work(&card->work, 0);
++}
++
+ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
+ {
+ 	struct fw_device *device;
+@@ -793,7 +904,7 @@ void fw_node_event(struct fw_card *card,
+ 	case FW_NODE_LINK_ON:
+ 		if (!node->link_on)
+ 			break;
+-
++ create:
+ 		device = kzalloc(sizeof(*device), GFP_ATOMIC);
+ 		if (device == NULL)
+ 			break;
+@@ -832,6 +943,22 @@ void fw_node_event(struct fw_card *card,
+ 		schedule_delayed_work(&device->work, INITIAL_DELAY);
+ 		break;
+ 
++	case FW_NODE_INITIATED_RESET:
++		device = node->data;
++		if (device == NULL)
++			goto create;
++
++		device->node_id = node->node_id;
++		smp_wmb();  /* update node_id before generation */
++		device->generation = card->generation;
++		if (atomic_cmpxchg(&device->state,
++			    FW_DEVICE_RUNNING,
++			    FW_DEVICE_INITIALIZING) == FW_DEVICE_RUNNING) {
++			PREPARE_DELAYED_WORK(&device->work, fw_device_refresh);
++			schedule_delayed_work(&device->work, INITIAL_DELAY);
++		}
++		break;
++
+ 	case FW_NODE_UPDATED:
+ 		if (!node->link_on || node->data == NULL)
+ 			break;
+Index: linux/drivers/firewire/fw-topology.c
+===================================================================
+--- linux.orig/drivers/firewire/fw-topology.c
++++ linux/drivers/firewire/fw-topology.c
+@@ -107,6 +107,7 @@ static struct fw_node *fw_node_create(u3
+ 	node->node_id = LOCAL_BUS | SELF_ID_PHY_ID(sid);
+ 	node->link_on = SELF_ID_LINK_ON(sid);
+ 	node->phy_speed = SELF_ID_PHY_SPEED(sid);
++	node->initiated_reset = SELF_ID_PHY_INITIATOR(sid);
+ 	node->port_count = port_count;
+ 
+ 	atomic_set(&node->ref_count, 1);
+@@ -430,6 +431,8 @@ update_tree(struct fw_card *card, struct
+ 			event = FW_NODE_LINK_OFF;
+ 		else if (!node0->link_on && node1->link_on)
+ 			event = FW_NODE_LINK_ON;
++		else if (node1->initiated_reset && node1->link_on)
++			event = FW_NODE_INITIATED_RESET;
+ 		else
+ 			event = FW_NODE_UPDATED;
+ 
+Index: linux/drivers/firewire/fw-topology.h
+===================================================================
+--- linux.orig/drivers/firewire/fw-topology.h
++++ linux/drivers/firewire/fw-topology.h
+@@ -20,11 +20,12 @@
+ #define __fw_topology_h
+ 
+ enum {
+-	FW_NODE_CREATED =   0x00,
+-	FW_NODE_UPDATED =   0x01,
+-	FW_NODE_DESTROYED = 0x02,
+-	FW_NODE_LINK_ON =   0x03,
+-	FW_NODE_LINK_OFF =  0x04,
++	FW_NODE_CREATED,
++	FW_NODE_UPDATED,
++	FW_NODE_DESTROYED,
++	FW_NODE_LINK_ON,
++	FW_NODE_LINK_OFF,
++	FW_NODE_INITIATED_RESET,
+ };
+ 
+ struct fw_node {
+
+-- 
+Stefan Richter
+-=====-==--- --== ---==
+http://arcgraph.de/sr/
+
+

linux-2.6-firewire-git-update.patch:

Index: linux-2.6-firewire-git-update.patch
===================================================================
RCS file: linux-2.6-firewire-git-update.patch
diff -N linux-2.6-firewire-git-update.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-firewire-git-update.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,1147 @@
+git diff in linux1394-git tree vs. 2.6.25-rc3-git4, 03/03/2008
+
+ Documentation/debugging-via-ohci1394.txt |   13 ++-
+ drivers/firewire/fw-card.c               |   38 ----------
+ drivers/firewire/fw-device.h             |   27 ++++---
+ drivers/firewire/fw-ohci.c               |  114 +++++++++++++++++++++-------
+ drivers/firewire/fw-sbp2.c               |  120 ++++++++++++------------------
+ drivers/firewire/fw-transaction.c        |    2 +-
+ drivers/firewire/fw-transaction.h        |   10 +--
+ drivers/ieee1394/csr.c                   |    6 +-
+ drivers/ieee1394/dv1394.c                |    3 +-
+ drivers/ieee1394/nodemgr.c               |    6 +-
+ drivers/ieee1394/ohci1394.c              |  109 ++++++++++++---------------
+ drivers/ieee1394/raw1394.c               |    1 -
+ drivers/ieee1394/sbp2.c                  |    7 +-
+ drivers/ieee1394/video1394.c             |    3 +-
+ lib/Kconfig.debug                        |   10 +++
+ 15 files changed, 233 insertions(+), 236 deletions(-)
+
+diff --git a/Documentation/debugging-via-ohci1394.txt b/Documentation/debugging-via-ohci1394.txt
+index c360d4e..371ba27 100644
+--- a/Documentation/debugging-via-ohci1394.txt
++++ b/Documentation/debugging-via-ohci1394.txt
+@@ -41,11 +41,14 @@ to a working state and enables physical DMA by default for all remote nodes.
+ This can be turned off by ohci1394's module parameter phys_dma=0.
+ 
+ The alternative firewire-ohci driver in drivers/firewire uses filtered physical
+-DMA, hence is not yet suitable for remote debugging.
+-
+-Because ohci1394 depends on the PCI enumeration to be completed, an
+-initialization routine which runs pretty early (long before console_init()
+-which makes the printk buffer appear on the console can be called) was written.
++DMA by default, which is more secure but not suitable for remote debugging.
++Compile the driver with CONFIG_FIREWIRE_OHCI_REMOTE_DMA to get unfiltered
++physical DMA.
++
++Because ohci1394 and firewire-ohci depend on the PCI enumeration to be
++completed, an initialization routine which runs pretty early has been
++implemented for x86.  This routine runs long before console_init() can be
++called, i.e. before the printk buffer appears on the console.
+ 
+ To activate it, enable CONFIG_PROVIDE_OHCI1394_DMA_INIT (Kernel hacking menu:
+ Provide code for enabling DMA over FireWire early on boot) and pass the
+diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c
+index a034627..140b34d 100644
+--- a/drivers/firewire/fw-card.c
++++ b/drivers/firewire/fw-card.c
+@@ -398,7 +398,6 @@ fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver,
+ {
+ 	static atomic_t index = ATOMIC_INIT(-1);
+ 
+-	kref_init(&card->kref);
+ 	atomic_set(&card->device_count, 0);
+ 	card->index = atomic_inc_return(&index);
+ 	card->driver = driver;
+@@ -429,12 +428,6 @@ fw_card_add(struct fw_card *card,
+ 	card->link_speed = link_speed;
+ 	card->guid = guid;
+ 
+-	/*
+-	 * The subsystem grabs a reference when the card is added and
+-	 * drops it when the driver calls fw_core_remove_card.
+-	 */
+-	fw_card_get(card);
+-
+ 	mutex_lock(&card_mutex);
+ 	config_rom = generate_config_rom(card, &length);
+ 	list_add_tail(&card->link, &card_list);
+@@ -540,40 +533,9 @@ fw_core_remove_card(struct fw_card *card)
+ 	cancel_delayed_work_sync(&card->work);
+ 	fw_flush_transactions(card);
+ 	del_timer_sync(&card->flush_timer);
+-
+-	fw_card_put(card);
+ }
+ EXPORT_SYMBOL(fw_core_remove_card);
+ 
+-struct fw_card *
+-fw_card_get(struct fw_card *card)
+-{
+-	kref_get(&card->kref);
+-
+-	return card;
+-}
+-EXPORT_SYMBOL(fw_card_get);
+-
+-static void
+-release_card(struct kref *kref)
+-{
+-	struct fw_card *card = container_of(kref, struct fw_card, kref);
+-
+-	kfree(card);
+-}
+-
+-/*
+- * An assumption for fw_card_put() is that the card driver allocates
+- * the fw_card struct with kalloc and that it has been shut down
+- * before the last ref is dropped.
+- */
+-void
+-fw_card_put(struct fw_card *card)
+-{
+-	kref_put(&card->kref, release_card);
+-}
+-EXPORT_SYMBOL(fw_card_put);
+-
+ int
+ fw_core_initiate_bus_reset(struct fw_card *card, int short_reset)
+ {
+diff --git a/drivers/firewire/fw-device.h b/drivers/firewire/fw-device.h
+index 78ecd39..0d771fd 100644
+--- a/drivers/firewire/fw-device.h
++++ b/drivers/firewire/fw-device.h
+@@ -64,28 +64,24 @@ struct fw_device {
+ 	struct fw_attribute_group attribute_group;
+ };
+ 
+-static inline struct fw_device *
+-fw_device(struct device *dev)
++static inline struct fw_device *fw_device(struct device *dev)
+ {
+ 	return container_of(dev, struct fw_device, device);
+ }
+ 
+-static inline int
+-fw_device_is_shutdown(struct fw_device *device)
++static inline int fw_device_is_shutdown(struct fw_device *device)
+ {
+ 	return atomic_read(&device->state) == FW_DEVICE_SHUTDOWN;
+ }
+ 
+-static inline struct fw_device *
+-fw_device_get(struct fw_device *device)
++static inline struct fw_device *fw_device_get(struct fw_device *device)
+ {
+ 	get_device(&device->device);
+ 
+ 	return device;
+ }
+ 
+-static inline void
+-fw_device_put(struct fw_device *device)
++static inline void fw_device_put(struct fw_device *device)
+ {
+ 	put_device(&device->device);
+ }
+@@ -104,12 +100,23 @@ struct fw_unit {
+ 	struct fw_attribute_group attribute_group;
+ };
+ 
+-static inline struct fw_unit *
+-fw_unit(struct device *dev)
++static inline struct fw_unit *fw_unit(struct device *dev)
+ {
+ 	return container_of(dev, struct fw_unit, device);
+ }
+ 
++static inline struct fw_unit *fw_unit_get(struct fw_unit *unit)
++{
++	get_device(&unit->device);
++
++	return unit;
++}
++
++static inline void fw_unit_put(struct fw_unit *unit)
++{
++	put_device(&unit->device);
++}
++
+ #define CSR_OFFSET	0x40
+ #define CSR_LEAF	0x80
+ #define CSR_DIRECTORY	0xc0
+diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
+index 7ebad3c..28ea78c 100644
+--- a/drivers/firewire/fw-ohci.c
++++ b/drivers/firewire/fw-ohci.c
+@@ -33,6 +33,10 @@
+ #include <asm/page.h>
+ #include <asm/system.h>
+ 
++#ifdef CONFIG_PPC_PMAC
++#include <asm/pmac_feature.h>
++#endif
++
+ #include "fw-ohci.h"
+ #include "fw-transaction.h"
+ 
+@@ -175,6 +179,7 @@ struct fw_ohci {
+ 	int generation;
+ 	int request_generation;
+ 	u32 bus_seconds;
++	bool old_uninorth;
+ 
+ 	/*
+ 	 * Spinlock for accessing fw_ohci data.  Never call out of
+@@ -311,15 +316,22 @@ static int ar_context_add_page(struct ar_context *ctx)
+ 	return 0;
+ }
+ 
++#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
++#define cond_le32_to_cpu(v) \
++	(ohci->old_uninorth ? (__force __u32)(v) : le32_to_cpu(v))
++#else
++#define cond_le32_to_cpu(v) le32_to_cpu(v)
++#endif
++
+ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
+ {
+ 	struct fw_ohci *ohci = ctx->ohci;
+ 	struct fw_packet p;
+ 	u32 status, length, tcode;
+ 
+-	p.header[0] = le32_to_cpu(buffer[0]);
+-	p.header[1] = le32_to_cpu(buffer[1]);
+-	p.header[2] = le32_to_cpu(buffer[2]);
++	p.header[0] = cond_le32_to_cpu(buffer[0]);
++	p.header[1] = cond_le32_to_cpu(buffer[1]);
++	p.header[2] = cond_le32_to_cpu(buffer[2]);
+ 
+ 	tcode = (p.header[0] >> 4) & 0x0f;
+ 	switch (tcode) {
+@@ -331,7 +343,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
+ 		break;
+ 
+ 	case TCODE_READ_BLOCK_REQUEST :
+-		p.header[3] = le32_to_cpu(buffer[3]);
++		p.header[3] = cond_le32_to_cpu(buffer[3]);
+ 		p.header_length = 16;
+ 		p.payload_length = 0;
+ 		break;
+@@ -340,7 +352,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
+ 	case TCODE_READ_BLOCK_RESPONSE:
+ 	case TCODE_LOCK_REQUEST:
+ 	case TCODE_LOCK_RESPONSE:
+-		p.header[3] = le32_to_cpu(buffer[3]);
++		p.header[3] = cond_le32_to_cpu(buffer[3]);
+ 		p.header_length = 16;
+ 		p.payload_length = p.header[3] >> 16;
+ 		break;
+@@ -357,7 +369,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
+ 
+ 	/* FIXME: What to do about evt_* errors? */
+ 	length = (p.header_length + p.payload_length + 3) / 4;
+-	status = le32_to_cpu(buffer[length]);
++	status = cond_le32_to_cpu(buffer[length]);
+ 
+ 	p.ack        = ((status >> 16) & 0x1f) - 16;
+ 	p.speed      = (status >> 21) & 0x7;
+@@ -375,7 +387,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
+ 	 */
+ 
+ 	if (p.ack + 16 == 0x09)
+-		ohci->request_generation = (buffer[2] >> 16) & 0xff;
++		ohci->request_generation = (p.header[2] >> 16) & 0xff;
+ 	else if (ctx == &ohci->ar_request_ctx)
+ 		fw_core_handle_request(&ohci->card, &p);
+ 	else
+@@ -532,7 +544,7 @@ static int
+ context_add_buffer(struct context *ctx)
+ {
+ 	struct descriptor_buffer *desc;
+-	dma_addr_t bus_addr;
++	dma_addr_t uninitialized_var(bus_addr);
+ 	int offset;
+ 
+ 	/*
+@@ -1022,13 +1034,14 @@ static void bus_reset_tasklet(unsigned long data)
+ 	 */
+ 
+ 	self_id_count = (reg_read(ohci, OHCI1394_SelfIDCount) >> 3) & 0x3ff;
+-	generation = (le32_to_cpu(ohci->self_id_cpu[0]) >> 16) & 0xff;
++	generation = (cond_le32_to_cpu(ohci->self_id_cpu[0]) >> 16) & 0xff;
+ 	rmb();
+ 
+ 	for (i = 1, j = 0; j < self_id_count; i += 2, j++) {
+ 		if (ohci->self_id_cpu[i] != ~ohci->self_id_cpu[i + 1])
+ 			fw_error("inconsistent self IDs\n");
+-		ohci->self_id_buffer[j] = le32_to_cpu(ohci->self_id_cpu[i]);
++		ohci->self_id_buffer[j] =
++				cond_le32_to_cpu(ohci->self_id_cpu[i]);
+ 	}
+ 	rmb();
+ 
+@@ -1091,6 +1104,11 @@ static void bus_reset_tasklet(unsigned long data)
+ 		reg_write(ohci, OHCI1394_ConfigROMhdr, ohci->next_header);
+ 	}
+ 
++#ifdef CONFIG_FIREWIRE_OHCI_REMOTE_DMA
++	reg_write(ohci, OHCI1394_PhyReqFilterHiSet, ~0);
++	reg_write(ohci, OHCI1394_PhyReqFilterLoSet, ~0);
++#endif
++
+ 	spin_unlock_irqrestore(&ohci->lock, flags);
+ 
+ 	if (free_rom)
+@@ -1316,7 +1334,7 @@ ohci_set_config_rom(struct fw_card *card, u32 *config_rom, size_t length)
+ 	unsigned long flags;
+ 	int retval = -EBUSY;
+ 	__be32 *next_config_rom;
+-	dma_addr_t next_config_rom_bus;
++	dma_addr_t uninitialized_var(next_config_rom_bus);
+ 
+ 	ohci = fw_ohci(card);
+ 
+@@ -1429,6 +1447,9 @@ static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
+ static int
+ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation)
+ {
++#ifdef CONFIG_FIREWIRE_OHCI_REMOTE_DMA
++	return 0;
++#else
+ 	struct fw_ohci *ohci = fw_ohci(card);
+ 	unsigned long flags;
+ 	int n, retval = 0;
+@@ -1460,6 +1481,7 @@ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation)
+  out:
+ 	spin_unlock_irqrestore(&ohci->lock, flags);
+ 	return retval;
++#endif /* CONFIG_FIREWIRE_OHCI_REMOTE_DMA */
+ }
+ 
+ static u64
+@@ -1487,7 +1509,7 @@ static int handle_ir_dualbuffer_packet(struct context *context,
+ 	void *p, *end;
+ 	int i;
+ 
+-	if (db->first_res_count > 0 && db->second_res_count > 0) {
++	if (db->first_res_count != 0 && db->second_res_count != 0) {
+ 		if (ctx->excess_bytes <= le16_to_cpu(db->second_req_count)) {
+ 			/* This descriptor isn't done yet, stop iteration. */
+ 			return 0;
+@@ -1513,7 +1535,7 @@ static int handle_ir_dualbuffer_packet(struct context *context,
+ 		memcpy(ctx->header + i + 4, p + 8, ctx->base.header_size - 4);
+ 		i += ctx->base.header_size;
+ 		ctx->excess_bytes +=
+-			(le32_to_cpu(*(u32 *)(p + 4)) >> 16) & 0xffff;
++			(le32_to_cpu(*(__le32 *)(p + 4)) >> 16) & 0xffff;
+ 		p += ctx->base.header_size + 4;
+ 	}
+ 	ctx->header_length = i;
+@@ -2039,6 +2061,35 @@ static const struct fw_card_driver ohci_driver = {
+ 	.stop_iso		= ohci_stop_iso,
+ };
+ 
++#ifdef CONFIG_PPC_PMAC
++static void ohci_pmac_on(struct pci_dev *dev)
++{
++	if (machine_is(powermac)) {
++		struct device_node *ofn = pci_device_to_OF_node(dev);
++
++		if (ofn) {
++			pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, ofn, 0, 1);
++			pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 1);
++		}
++	}
++}
++
++static void ohci_pmac_off(struct pci_dev *dev)
++{
++	if (machine_is(powermac)) {
++		struct device_node *ofn = pci_device_to_OF_node(dev);
++
++		if (ofn) {
++			pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0);
++			pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, ofn, 0, 0);
++		}
++	}
++}
++#else
++#define ohci_pmac_on(dev)
++#define ohci_pmac_off(dev)
++#endif /* CONFIG_PPC_PMAC */
++
+ static int __devinit
+ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
+ {
+@@ -2048,6 +2099,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
+ 	int err;
+ 	size_t size;
+ 
++	ohci_pmac_on(dev);
++
+ 	ohci = kzalloc(sizeof(*ohci), GFP_KERNEL);
+ 	if (ohci == NULL) {
+ 		fw_error("Could not malloc fw_ohci data.\n");
+@@ -2059,13 +2112,17 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
+ 	err = pci_enable_device(dev);
+ 	if (err) {
+ 		fw_error("Failed to enable OHCI hardware.\n");
+-		goto fail_put_card;
++		goto fail_free;
+ 	}
+ 
+ 	pci_set_master(dev);
+ 	pci_write_config_dword(dev, OHCI1394_PCI_HCI_Control, 0);
+ 	pci_set_drvdata(dev, ohci);
+ 
++#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
++	ohci->old_uninorth = dev->vendor == PCI_VENDOR_ID_APPLE &&
++			     dev->device == PCI_DEVICE_ID_APPLE_UNI_N_FW;
++#endif
+ 	spin_lock_init(&ohci->lock);
+ 
+ 	tasklet_init(&ohci->bus_reset_tasklet,
+@@ -2151,8 +2208,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
+ 	pci_release_region(dev, 0);
+  fail_disable:
+ 	pci_disable_device(dev);
+- fail_put_card:
+-	fw_card_put(&ohci->card);
++ fail_free:
++	kfree(&ohci->card);
+ 
+ 	return err;
+ }
+@@ -2180,39 +2237,42 @@ static void pci_remove(struct pci_dev *dev)
+ 	pci_iounmap(dev, ohci->registers);
+ 	pci_release_region(dev, 0);
+ 	pci_disable_device(dev);
+-	fw_card_put(&ohci->card);
++	ohci_pmac_off(dev);
++	kfree(&ohci->card);
+ 
+ 	fw_notify("Removed fw-ohci device.\n");
+ }
+ 
+ #ifdef CONFIG_PM
+-static int pci_suspend(struct pci_dev *pdev, pm_message_t state)
++static int pci_suspend(struct pci_dev *dev, pm_message_t state)
+ {
+-	struct fw_ohci *ohci = pci_get_drvdata(pdev);
++	struct fw_ohci *ohci = pci_get_drvdata(dev);
+ 	int err;
+ 
+ 	software_reset(ohci);
+-	free_irq(pdev->irq, ohci);
+-	err = pci_save_state(pdev);
++	free_irq(dev->irq, ohci);
++	err = pci_save_state(dev);
+ 	if (err) {
+ 		fw_error("pci_save_state failed\n");
+ 		return err;
+ 	}
+-	err = pci_set_power_state(pdev, pci_choose_state(pdev, state));
++	err = pci_set_power_state(dev, pci_choose_state(dev, state));
+ 	if (err)
+ 		fw_error("pci_set_power_state failed with %d\n", err);
++	ohci_pmac_off(dev);
+ 
+ 	return 0;
+ }
+ 
+-static int pci_resume(struct pci_dev *pdev)
++static int pci_resume(struct pci_dev *dev)
+ {
+-	struct fw_ohci *ohci = pci_get_drvdata(pdev);
++	struct fw_ohci *ohci = pci_get_drvdata(dev);
+ 	int err;
+ 
+-	pci_set_power_state(pdev, PCI_D0);
+-	pci_restore_state(pdev);
+-	err = pci_enable_device(pdev);
++	ohci_pmac_on(dev);
++	pci_set_power_state(dev, PCI_D0);
++	pci_restore_state(dev);
++	err = pci_enable_device(dev);
+ 	if (err) {
+ 		fw_error("pci_enable_device failed\n");
+ 		return err;
+diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
+index 03069a4..d6d62c6 100644
+--- a/drivers/firewire/fw-sbp2.c
++++ b/drivers/firewire/fw-sbp2.c
+@@ -174,9 +174,6 @@ struct sbp2_target {
+ #define SBP2_ORB_NULL			0x80000000
+ #define SBP2_MAX_SG_ELEMENT_LENGTH	0xf000
+ 
+-#define SBP2_DIRECTION_TO_MEDIA		0x0
+-#define SBP2_DIRECTION_FROM_MEDIA	0x1
+-
+ /* Unit directory keys */
+ #define SBP2_CSR_UNIT_CHARACTERISTICS	0x3a
+ #define SBP2_CSR_FIRMWARE_REVISION	0x3c
+@@ -223,8 +220,8 @@ struct sbp2_status {
+ };
+ 
+ struct sbp2_pointer {
+-	u32 high;
+-	u32 low;
++	__be32 high;
++	__be32 low;
+ };
+ 
+ struct sbp2_orb {
+@@ -252,8 +249,8 @@ struct sbp2_management_orb {
+ 	struct {
+ 		struct sbp2_pointer password;
+ 		struct sbp2_pointer response;
+-		u32 misc;
+-		u32 length;
++		__be32 misc;
++		__be32 length;
+ 		struct sbp2_pointer status_fifo;
+ 	} request;
+ 	__be32 response[4];
+@@ -262,20 +259,17 @@ struct sbp2_management_orb {
+ 	struct sbp2_status status;
+ };
+ 
+-#define LOGIN_RESPONSE_GET_LOGIN_ID(v)	((v).misc & 0xffff)
+-#define LOGIN_RESPONSE_GET_LENGTH(v)	(((v).misc >> 16) & 0xffff)
+-
+ struct sbp2_login_response {
+-	u32 misc;
++	__be32 misc;
+ 	struct sbp2_pointer command_block_agent;
+-	u32 reconnect_hold;
++	__be32 reconnect_hold;
+ };
+ #define COMMAND_ORB_DATA_SIZE(v)	((v))
+ #define COMMAND_ORB_PAGE_SIZE(v)	((v) << 16)
+ #define COMMAND_ORB_PAGE_TABLE_PRESENT	((1) << 19)
+ #define COMMAND_ORB_MAX_PAYLOAD(v)	((v) << 20)
+ #define COMMAND_ORB_SPEED(v)		((v) << 24)
+-#define COMMAND_ORB_DIRECTION(v)	((v) << 27)
++#define COMMAND_ORB_DIRECTION		((1) << 27)
+ #define COMMAND_ORB_REQUEST_FORMAT(v)	((v) << 29)
+ #define COMMAND_ORB_NOTIFY		((1) << 31)
+ 
+@@ -284,7 +278,7 @@ struct sbp2_command_orb {
+ 	struct {
+ 		struct sbp2_pointer next;
+ 		struct sbp2_pointer data_descriptor;
+-		u32 misc;
++		__be32 misc;
+ 		u8 command_block[12];
+ 	} request;
+ 	struct scsi_cmnd *cmd;
+@@ -453,8 +447,7 @@ sbp2_send_orb(struct sbp2_orb *orb, struct sbp2_logical_unit *lu,
+ 	unsigned long flags;
+ 
+ 	orb->pointer.high = 0;
+-	orb->pointer.low = orb->request_bus;
+-	fw_memcpy_to_be32(&orb->pointer, &orb->pointer, sizeof(orb->pointer));
++	orb->pointer.low = cpu_to_be32(orb->request_bus);
+ 
+ 	spin_lock_irqsave(&device->card->lock, flags);
+ 	list_add_tail(&orb->link, &lu->orb_list);
+@@ -530,31 +523,31 @@ sbp2_send_management_orb(struct sbp2_logical_unit *lu, int node_id,
+ 	if (dma_mapping_error(orb->response_bus))
+ 		goto fail_mapping_response;
+ 
+-	orb->request.response.high    = 0;
+-	orb->request.response.low     = orb->response_bus;
++	orb->request.response.high = 0;
++	orb->request.response.low  = cpu_to_be32(orb->response_bus);
+ 
+-	orb->request.misc =
++	orb->request.misc = cpu_to_be32(
+ 		MANAGEMENT_ORB_NOTIFY |
+ 		MANAGEMENT_ORB_FUNCTION(function) |
+-		MANAGEMENT_ORB_LUN(lun_or_login_id);
+-	orb->request.length =
+-		MANAGEMENT_ORB_RESPONSE_LENGTH(sizeof(orb->response));
++		MANAGEMENT_ORB_LUN(lun_or_login_id));
++	orb->request.length = cpu_to_be32(
++		MANAGEMENT_ORB_RESPONSE_LENGTH(sizeof(orb->response)));
+ 
+-	orb->request.status_fifo.high = lu->address_handler.offset >> 32;
+-	orb->request.status_fifo.low  = lu->address_handler.offset;
++	orb->request.status_fifo.high =
++		cpu_to_be32(lu->address_handler.offset >> 32);
++	orb->request.status_fifo.low  =
++		cpu_to_be32(lu->address_handler.offset);
+ 
+ 	if (function == SBP2_LOGIN_REQUEST) {
+ 		/* Ask for 2^2 == 4 seconds reconnect grace period */
+-		orb->request.misc |=
++		orb->request.misc |= cpu_to_be32(
+ 			MANAGEMENT_ORB_RECONNECT(2) |
+-			MANAGEMENT_ORB_EXCLUSIVE(sbp2_param_exclusive_login);
++			MANAGEMENT_ORB_EXCLUSIVE(sbp2_param_exclusive_login));
+ 		timeout = lu->tgt->mgt_orb_timeout;
+ 	} else {
+ 		timeout = SBP2_ORB_TIMEOUT;
+ 	}
+ 
+-	fw_memcpy_to_be32(&orb->request, &orb->request, sizeof(orb->request));
+-
+ 	init_completion(&orb->done);
+ 	orb->base.callback = complete_management_orb;
+ 
+@@ -599,8 +592,7 @@ sbp2_send_management_orb(struct sbp2_logical_unit *lu, int node_id,
+ 			 sizeof(orb->response), DMA_FROM_DEVICE);
+  fail_mapping_response:
+ 	if (response)
+-		fw_memcpy_from_be32(response,
+-				    orb->response, sizeof(orb->response));
++		memcpy(response, orb->response, sizeof(orb->response));
+ 	kref_put(&orb->base.kref, free_orb);
+ 
+ 	return retval;
+@@ -695,10 +687,8 @@ static void sbp2_conditionally_block(struct sbp2_logical_unit *lu)
+ 	if (!tgt->dont_block && !lu->blocked &&
+ 	    lu->generation != card->generation) {
+ 		lu->blocked = true;
+-		if (++tgt->blocked == 1) {
++		if (++tgt->blocked == 1)
+ 			scsi_block_requests(shost);
+-			fw_notify("blocked %s\n", lu->tgt->bus_id);
+-		}
+ 	}
+ 	spin_unlock_irqrestore(&card->lock, flags);
+ }
+@@ -725,10 +715,8 @@ static void sbp2_conditionally_unblock(struct sbp2_logical_unit *lu)
+ 	}
+ 	spin_unlock_irqrestore(&card->lock, flags);
+ 
+-	if (unblock) {
++	if (unblock)
+ 		scsi_unblock_requests(shost);
+-		fw_notify("unblocked %s\n", lu->tgt->bus_id);
+-	}
+ }
+ 
+ /*
+@@ -790,7 +778,7 @@ static void sbp2_release_target(struct kref *kref)
+ 	scsi_remove_host(shost);
+ 	fw_notify("released %s\n", tgt->bus_id);
+ 
+-	put_device(&tgt->unit->device);
++	fw_unit_put(tgt->unit);
+ 	scsi_host_put(shost);
+ 	fw_device_put(device);
+ }
+@@ -855,11 +843,10 @@ static void sbp2_login(struct work_struct *work)
+ 	tgt->address_high = local_node_id << 16;
+ 	sbp2_set_generation(lu, generation);
+ 
+-	/* Get command block agent offset and login id. */
+ 	lu->command_block_agent_address =
+-		((u64) (response.command_block_agent.high & 0xffff) << 32) |
+-		response.command_block_agent.low;
+-	lu->login_id = LOGIN_RESPONSE_GET_LOGIN_ID(response);
++		((u64)(be32_to_cpu(response.command_block_agent.high) & 0xffff)
++		      << 32) | be32_to_cpu(response.command_block_agent.low);
++	lu->login_id = be32_to_cpu(response.misc) & 0xffff;
+ 
+ 	fw_notify("%s: logged in to LUN %04x (%d retries)\n",
+ 		  tgt->bus_id, lu->lun, lu->retries);
+@@ -1091,6 +1078,7 @@ static int sbp2_probe(struct device *dev)
+ 		goto fail_shost_put;
+ 
+ 	fw_device_get(device);
++	fw_unit_get(unit);
+ 
+ 	/* Initialize to values that won't match anything in our table. */
+ 	firmware_revision = 0xff000000;
+@@ -1106,8 +1094,6 @@ static int sbp2_probe(struct device *dev)
+ 
+ 	sbp2_init_workarounds(tgt, model, firmware_revision);
+ 
+-	get_device(&unit->device);
+-
+ 	/* Do the login in a workqueue so we can easily reschedule retries. */
+ 	list_for_each_entry(lu, &tgt->lu_list, link)
+ 		sbp2_queue_work(lu, 0);
+@@ -1339,9 +1325,12 @@ sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device,
+ 	 * tables.
+ 	 */
+ 	if (count == 1 && sg_dma_len(sg) < SBP2_MAX_SG_ELEMENT_LENGTH) {
+-		orb->request.data_descriptor.high = lu->tgt->address_high;
+-		orb->request.data_descriptor.low  = sg_dma_address(sg);
+-		orb->request.misc |= COMMAND_ORB_DATA_SIZE(sg_dma_len(sg));
++		orb->request.data_descriptor.high =
++			cpu_to_be32(lu->tgt->address_high);
++		orb->request.data_descriptor.low  =
++			cpu_to_be32(sg_dma_address(sg));
++		orb->request.misc |=
++			cpu_to_be32(COMMAND_ORB_DATA_SIZE(sg_dma_len(sg)));
+ 		return 0;
+ 	}
+ 
+@@ -1362,16 +1351,14 @@ sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device,
+ 				goto fail_page_table;
+ 			}
+ 			l = min(sg_len, SBP2_MAX_SG_ELEMENT_LENGTH);
+-			orb->page_table[j].low = sg_addr;
+-			orb->page_table[j].high = (l << 16);
++			orb->page_table[j].low = cpu_to_be32(sg_addr);
++			orb->page_table[j].high = cpu_to_be32(l << 16);
+ 			sg_addr += l;
+ 			sg_len -= l;
+ 			j++;
+ 		}
+ 	}
+ 
+-	fw_memcpy_to_be32(orb->page_table, orb->page_table,
+-			  sizeof(orb->page_table[0]) * j);
+ 	orb->page_table_bus =
+ 		dma_map_single(device->card->device, orb->page_table,
+ 			       sizeof(orb->page_table), DMA_TO_DEVICE);
+@@ -1385,11 +1372,10 @@ sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device,
+ 	 * initiator (i.e. us), but data_descriptor can refer to data
+ 	 * on other nodes so we need to put our ID in descriptor.high.
+ 	 */
+-	orb->request.data_descriptor.high = lu->tgt->address_high;
+-	orb->request.data_descriptor.low  = orb->page_table_bus;
+-	orb->request.misc |=
+-		COMMAND_ORB_PAGE_TABLE_PRESENT |
+-		COMMAND_ORB_DATA_SIZE(j);
++	orb->request.data_descriptor.high = cpu_to_be32(lu->tgt->address_high);
++	orb->request.data_descriptor.low  = cpu_to_be32(orb->page_table_bus);
++	orb->request.misc |= cpu_to_be32(COMMAND_ORB_PAGE_TABLE_PRESENT |
++					 COMMAND_ORB_DATA_SIZE(j));
+ 
+ 	return 0;
+ 
+@@ -1435,8 +1421,7 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
+ 	orb->done = done;
+ 	orb->cmd  = cmd;
+ 
+-	orb->request.next.high   = SBP2_ORB_NULL;
+-	orb->request.next.low    = 0x0;
++	orb->request.next.high   = cpu_to_be32(SBP2_ORB_NULL);
+ 	/*
+ 	 * At speed 100 we can do 512 bytes per packet, at speed 200,
+ 	 * 1024 bytes per packet etc.  The SBP-2 max_payload field
+@@ -1445,25 +1430,17 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
+ 	 */
+ 	max_payload = min(device->max_speed + 7,
+ 			  device->card->max_receive - 1);
+-	orb->request.misc =
++	orb->request.misc = cpu_to_be32(
+ 		COMMAND_ORB_MAX_PAYLOAD(max_payload) |
+ 		COMMAND_ORB_SPEED(device->max_speed) |
+-		COMMAND_ORB_NOTIFY;
++		COMMAND_ORB_NOTIFY);
+ 
+ 	if (cmd->sc_data_direction == DMA_FROM_DEVICE)
+-		orb->request.misc |=
+-			COMMAND_ORB_DIRECTION(SBP2_DIRECTION_FROM_MEDIA);
+-	else if (cmd->sc_data_direction == DMA_TO_DEVICE)
+-		orb->request.misc |=
+-			COMMAND_ORB_DIRECTION(SBP2_DIRECTION_TO_MEDIA);
++		orb->request.misc |= cpu_to_be32(COMMAND_ORB_DIRECTION);
+ 
+ 	if (scsi_sg_count(cmd) && sbp2_map_scatterlist(orb, device, lu) < 0)
+ 		goto out;
+ 
+-	fw_memcpy_to_be32(&orb->request, &orb->request, sizeof(orb->request));
+-
+-	memset(orb->request.command_block,
+-	       0, sizeof(orb->request.command_block));
+ 	memcpy(orb->request.command_block, cmd->cmnd, COMMAND_SIZE(*cmd->cmnd));
+ 
+ 	orb->base.callback = complete_command_orb;
+@@ -1491,11 +1468,8 @@ static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
+ 
+ 	sdev->allow_restart = 1;
+ 
+-	/*
+-	 * Update the dma alignment (minimum alignment requirements for
+-	 * start and end of DMA transfers) to be a sector
+-	 */
+-	blk_queue_update_dma_alignment(sdev->request_queue, 511);
++	/* SBP-2 requires quadlet alignment of the data buffers. */
++	blk_queue_update_dma_alignment(sdev->request_queue, 4 - 1);
+ 
+ 	if (lu->tgt->workarounds & SBP2_WORKAROUND_INQUIRY_36)
+ 		sdev->inquiry_len = 36;
+diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c
+index 7fcc59d..99529e5 100644
+--- a/drivers/firewire/fw-transaction.c
++++ b/drivers/firewire/fw-transaction.c
+@@ -751,7 +751,7 @@ handle_topology_map(struct fw_card *card, struct fw_request *request,
+ 		    void *payload, size_t length, void *callback_data)
+ {
+ 	int i, start, end;
+-	u32 *map;
++	__be32 *map;
+ 
+ 	if (!TCODE_IS_READ_REQUEST(tcode)) {
+ 		fw_send_response(card, request, RCODE_TYPE_ERROR);
+diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h
+index 09cb728..1a22a23 100644
+--- a/drivers/firewire/fw-transaction.h
++++ b/drivers/firewire/fw-transaction.h
+@@ -86,12 +86,12 @@
+ static inline void
+ fw_memcpy_from_be32(void *_dst, void *_src, size_t size)
+ {
+-	u32 *dst = _dst;
+-	u32 *src = _src;
++	u32    *dst = _dst;
++	__be32 *src = _src;
+ 	int i;
+ 
+ 	for (i = 0; i < size / 4; i++)
+-		dst[i] = cpu_to_be32(src[i]);
++		dst[i] = be32_to_cpu(src[i]);
+ }
+ 
+ static inline void
+@@ -221,7 +221,6 @@ struct fw_card {
+ 	const struct fw_card_driver *driver;
+ 	struct device *device;
+ 	atomic_t device_count;
+-	struct kref kref;
+ 
+ 	int node_id;
+ 	int generation;
+@@ -263,9 +262,6 @@ struct fw_card {
+ 	int bm_generation;
+ };
+ 
+-struct fw_card *fw_card_get(struct fw_card *card);
+-void fw_card_put(struct fw_card *card);
+-
+ /*
+  * The iso packet format allows for an immediate header/payload part
+  * stored in 'header' immediately after the packet info plus an
+diff --git a/drivers/ieee1394/csr.c b/drivers/ieee1394/csr.c
+index 52ac83e..c90be40 100644
+--- a/drivers/ieee1394/csr.c
++++ b/drivers/ieee1394/csr.c
+@@ -133,8 +133,7 @@ static void host_reset(struct hpsb_host *host)
+                 host->csr.state &= ~0x100;
+         }
+ 
+-        host->csr.topology_map[1] =
+-                cpu_to_be32(be32_to_cpu(host->csr.topology_map[1]) + 1);
++	be32_add_cpu(&host->csr.topology_map[1], 1);
+         host->csr.topology_map[2] = cpu_to_be32(host->node_count << 16
+                                                 | host->selfid_count);
+         host->csr.topology_map[0] =
+@@ -142,8 +141,7 @@ static void host_reset(struct hpsb_host *host)
+                             | csr_crc16(host->csr.topology_map + 1,
+                                         host->selfid_count + 2));
+ 
+-        host->csr.speed_map[1] =
+-                cpu_to_be32(be32_to_cpu(host->csr.speed_map[1]) + 1);
++	be32_add_cpu(&host->csr.speed_map[1], 1);
+         host->csr.speed_map[0] = cpu_to_be32(0x3f1 << 16
+                                              | csr_crc16(host->csr.speed_map+1,
+                                                          0x3f1));
+diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
+index 6572211..8c72f36 100644
+--- a/drivers/ieee1394/dv1394.c
++++ b/drivers/ieee1394/dv1394.c
+@@ -2179,8 +2179,7 @@ static struct ieee1394_device_id dv1394_id_table[] = {
+ MODULE_DEVICE_TABLE(ieee1394, dv1394_id_table);
+ 
+ static struct hpsb_protocol_driver dv1394_driver = {
+-	.name		= "dv1394",
+-	.id_table	= dv1394_id_table,
++	.name = "dv1394",
+ };
+ 
+ 
+diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
+index 511e432..70afa37 100644
+--- a/drivers/ieee1394/nodemgr.c
++++ b/drivers/ieee1394/nodemgr.c
+@@ -701,7 +701,11 @@ static int nodemgr_bus_match(struct device * dev, struct device_driver * drv)
+ 		return 0;
+ 
+ 	driver = container_of(drv, struct hpsb_protocol_driver, driver);
+-	for (id = driver->id_table; id->match_flags != 0; id++) {
++	id = driver->id_table;
++	if (!id)
++		return 0;
++
++	for (; id->match_flags != 0; id++) {
+ 		if ((id->match_flags & IEEE1394_MATCH_VENDOR_ID) &&
+ 		    id->vendor_id != ud->vendor_id)
+ 			continue;
+diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
+index 969de2a..29b8910 100644
+--- a/drivers/ieee1394/ohci1394.c
++++ b/drivers/ieee1394/ohci1394.c
+@@ -2993,15 +2993,9 @@ do {						\
+ 	return err;				\
+ } while (0)
+ 
+-static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
+-					const struct pci_device_id *ent)
+-{
+-	struct hpsb_host *host;
+-	struct ti_ohci *ohci;	/* shortcut to currently handled device */
+-	resource_size_t ohci_base;
+-
+ #ifdef CONFIG_PPC_PMAC
+-	/* Necessary on some machines if ohci1394 was loaded/ unloaded before */
++static void ohci1394_pmac_on(struct pci_dev *dev)
++{
+ 	if (machine_is(powermac)) {
+ 		struct device_node *ofn = pci_device_to_OF_node(dev);
+ 
+@@ -3010,8 +3004,32 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
+ 			pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 1);
+ 		}
+ 	}
++}
++
++static void ohci1394_pmac_off(struct pci_dev *dev)
++{
++	if (machine_is(powermac)) {
++		struct device_node *ofn = pci_device_to_OF_node(dev);
++
++		if (ofn) {
++			pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0);
++			pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, ofn, 0, 0);
++		}
++	}
++}
++#else
++#define ohci1394_pmac_on(dev)
++#define ohci1394_pmac_off(dev)
+ #endif /* CONFIG_PPC_PMAC */
+ 
++static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
++					const struct pci_device_id *ent)
++{
++	struct hpsb_host *host;
++	struct ti_ohci *ohci;	/* shortcut to currently handled device */
++	resource_size_t ohci_base;
++
++	ohci1394_pmac_on(dev);
+         if (pci_enable_device(dev))
+ 		FAIL(-ENXIO, "Failed to enable OHCI hardware");
+         pci_set_master(dev);
+@@ -3203,16 +3221,16 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
+ #undef FAIL
+ }
+ 
+-static void ohci1394_pci_remove(struct pci_dev *pdev)
++static void ohci1394_pci_remove(struct pci_dev *dev)
+ {
+ 	struct ti_ohci *ohci;
+-	struct device *dev;
++	struct device *device;
+ 
+-	ohci = pci_get_drvdata(pdev);
++	ohci = pci_get_drvdata(dev);
+ 	if (!ohci)
+ 		return;
+ 
+-	dev = get_device(&ohci->host->device);
++	device = get_device(&ohci->host->device);
+ 
+ 	switch (ohci->init_state) {
+ 	case OHCI_INIT_DONE:
+@@ -3246,7 +3264,7 @@ static void ohci1394_pci_remove(struct pci_dev *pdev)
+ 		/* Soft reset before we start - this disables
+ 		 * interrupts and clears linkEnable and LPS. */
+ 		ohci_soft_reset(ohci);
+-		free_irq(ohci->dev->irq, ohci);
++		free_irq(dev->irq, ohci);
+ 
+ 	case OHCI_INIT_HAVE_TXRX_BUFFERS__MAYBE:
+ 		/* The ohci_soft_reset() stops all DMA contexts, so we
+@@ -3257,12 +3275,12 @@ static void ohci1394_pci_remove(struct pci_dev *pdev)
+ 		free_dma_trm_ctx(&ohci->at_resp_context);
+ 
+ 	case OHCI_INIT_HAVE_SELFID_BUFFER:
+-		pci_free_consistent(ohci->dev, OHCI1394_SI_DMA_BUF_SIZE,
++		pci_free_consistent(dev, OHCI1394_SI_DMA_BUF_SIZE,
+ 				    ohci->selfid_buf_cpu,
+ 				    ohci->selfid_buf_bus);
+ 
+ 	case OHCI_INIT_HAVE_CONFIG_ROM_BUFFER:
+-		pci_free_consistent(ohci->dev, OHCI_CONFIG_ROM_LEN,
++		pci_free_consistent(dev, OHCI_CONFIG_ROM_LEN,
+ 				    ohci->csr_config_rom_cpu,
+ 				    ohci->csr_config_rom_bus);
+ 
+@@ -3270,35 +3288,24 @@ static void ohci1394_pci_remove(struct pci_dev *pdev)
+ 		iounmap(ohci->registers);
+ 
+ 	case OHCI_INIT_HAVE_MEM_REGION:
+-		release_mem_region(pci_resource_start(ohci->dev, 0),
++		release_mem_region(pci_resource_start(dev, 0),
+ 				   OHCI1394_REGISTER_SIZE);
+ 
+-#ifdef CONFIG_PPC_PMAC
+-	/* On UniNorth, power down the cable and turn off the chip clock
+-	 * to save power on laptops */
+-	if (machine_is(powermac)) {
+-		struct device_node* ofn = pci_device_to_OF_node(ohci->dev);
+-
+-		if (ofn) {
+-			pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0);
+-			pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, ofn, 0, 0);
+-		}
+-	}
+-#endif /* CONFIG_PPC_PMAC */
++		ohci1394_pmac_off(dev);
+ 
+ 	case OHCI_INIT_ALLOC_HOST:
+-		pci_set_drvdata(ohci->dev, NULL);
++		pci_set_drvdata(dev, NULL);
+ 	}
+ 
+-	if (dev)
+-		put_device(dev);
++	if (device)
++		put_device(device);
+ }
+ 
+ #ifdef CONFIG_PM
+-static int ohci1394_pci_suspend(struct pci_dev *pdev, pm_message_t state)
++static int ohci1394_pci_suspend(struct pci_dev *dev, pm_message_t state)
+ {
+ 	int err;
+-	struct ti_ohci *ohci = pci_get_drvdata(pdev);
++	struct ti_ohci *ohci = pci_get_drvdata(dev);
+ 
+ 	if (!ohci) {
+ 		printk(KERN_ERR "%s: tried to suspend nonexisting host\n",
+@@ -3326,32 +3333,23 @@ static int ohci1394_pci_suspend(struct pci_dev *pdev, pm_message_t state)
+ 	ohci_devctl(ohci->host, RESET_BUS, LONG_RESET_NO_FORCE_ROOT);
+ 	ohci_soft_reset(ohci);
+ 
+-	err = pci_save_state(pdev);
++	err = pci_save_state(dev);
+ 	if (err) {
+ 		PRINT(KERN_ERR, "pci_save_state failed with %d", err);
+ 		return err;
+ 	}
+-	err = pci_set_power_state(pdev, pci_choose_state(pdev, state));
++	err = pci_set_power_state(dev, pci_choose_state(dev, state));
+ 	if (err)
+ 		DBGMSG("pci_set_power_state failed with %d", err);
+-
+-/* PowerMac suspend code comes last */
+-#ifdef CONFIG_PPC_PMAC
+-	if (machine_is(powermac)) {
+-		struct device_node *ofn = pci_device_to_OF_node(pdev);
+-
+-		if (ofn)
+-			pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0);
+-	}
+-#endif /* CONFIG_PPC_PMAC */
++	ohci1394_pmac_off(dev);
+ 
+ 	return 0;
+ }
+ 
+-static int ohci1394_pci_resume(struct pci_dev *pdev)
++static int ohci1394_pci_resume(struct pci_dev *dev)
+ {
+ 	int err;
+-	struct ti_ohci *ohci = pci_get_drvdata(pdev);
++	struct ti_ohci *ohci = pci_get_drvdata(dev);
+ 
+ 	if (!ohci) {
+ 		printk(KERN_ERR "%s: tried to resume nonexisting host\n",
+@@ -3360,19 +3358,10 @@ static int ohci1394_pci_resume(struct pci_dev *pdev)
+ 	}
+ 	DBGMSG("resume called");
+ 
+-/* PowerMac resume code comes first */
+-#ifdef CONFIG_PPC_PMAC
+-	if (machine_is(powermac)) {
+-		struct device_node *ofn = pci_device_to_OF_node(pdev);
+-
+-		if (ofn)
+-			pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 1);
+-	}
+-#endif /* CONFIG_PPC_PMAC */
+-
+-	pci_set_power_state(pdev, PCI_D0);
+-	pci_restore_state(pdev);
+-	err = pci_enable_device(pdev);
++	ohci1394_pmac_on(dev);
++	pci_set_power_state(dev, PCI_D0);
++	pci_restore_state(dev);
++	err = pci_enable_device(dev);
+ 	if (err) {
+ 		PRINT(KERN_ERR, "pci_enable_device failed with %d", err);
+ 		return err;
+diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
+index 37e7e10..3634785 100644
+--- a/drivers/ieee1394/raw1394.c
++++ b/drivers/ieee1394/raw1394.c
+@@ -2959,7 +2959,6 @@ MODULE_DEVICE_TABLE(ieee1394, raw1394_id_table);
+ 
+ static struct hpsb_protocol_driver raw1394_driver = {
+ 	.name = "raw1394",
+-	.id_table = raw1394_id_table,
+ };
+ 
+ /******************************************************************************/
+diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
+index 9e2b196..29e6663 100644
+--- a/drivers/ieee1394/sbp2.c
++++ b/drivers/ieee1394/sbp2.c
+@@ -1980,11 +1980,8 @@ static int sbp2scsi_slave_alloc(struct scsi_device *sdev)
+ 	lu->sdev = sdev;
+ 	sdev->allow_restart = 1;
+ 
+-	/*
+-	 * Update the dma alignment (minimum alignment requirements for
+-	 * start and end of DMA transfers) to be a sector
+-	 */
+-	blk_queue_update_dma_alignment(sdev->request_queue, 511);
++	/* SBP-2 requires quadlet alignment of the data buffers. */
++	blk_queue_update_dma_alignment(sdev->request_queue, 4 - 1);
+ 
+ 	if (lu->workarounds & SBP2_WORKAROUND_INQUIRY_36)
+ 		sdev->inquiry_len = 36;
+diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c
+index bd28adf..cc240b2 100644
+--- a/drivers/ieee1394/video1394.c
++++ b/drivers/ieee1394/video1394.c
+@@ -1315,8 +1315,7 @@ static struct ieee1394_device_id video1394_id_table[] = {
+ MODULE_DEVICE_TABLE(ieee1394, video1394_id_table);
+ 
+ static struct hpsb_protocol_driver video1394_driver = {
+-	.name		= VIDEO1394_DRIVER_NAME,
+-	.id_table	= video1394_id_table,
++	.name = VIDEO1394_DRIVER_NAME,
+ };
+ 
+ 
+diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
+index 0796c1a..4e370e1 100644
+--- a/lib/Kconfig.debug
++++ b/lib/Kconfig.debug
+@@ -592,6 +592,16 @@ config LATENCYTOP
+ 	  Enable this option if you want to use the LatencyTOP tool
+ 	  to find out which userspace is blocking on what kernel operations.
+ 
++config FIREWIRE_OHCI_REMOTE_DMA
++	bool "Remote debugging via firewire-ohci"
++	depends on FIREWIRE_OHCI
++	help
++	  This option lets you use the FireWire bus for remote debugging.
++	  It enables unfiltered remote DMA in the firewire-ohci driver.
++	  See Documentation/debugging-via-ohci1394.txt for more information.
++
++	  If unsure, say N.
++
+ config PROVIDE_OHCI1394_DMA_INIT
+ 	bool "Provide code for enabling DMA over FireWire early on boot"
+ 	depends on PCI && X86

linux-2.6-hotfixes.patch:

Index: linux-2.6-hotfixes.patch
===================================================================
RCS file: linux-2.6-hotfixes.patch
diff -N linux-2.6-hotfixes.patch

linux-2.6-ia32-syscall-restart.patch:

Index: linux-2.6-ia32-syscall-restart.patch
===================================================================
RCS file: linux-2.6-ia32-syscall-restart.patch
diff -N linux-2.6-ia32-syscall-restart.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ia32-syscall-restart.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,117 @@
+From 702b92b212afb1cb9d9590f5a9133113c2b4168c Mon Sep 17 00:00:00 2001
+From: Roland McGrath <roland at redhat.com>
+Date: Thu, 28 Feb 2008 19:40:17 -0800
+Subject: [PATCH] x86_64 ia32 syscall restart fix
+
+The code to restart syscalls after signals depends on checking for a
+negative orig_ax, and for particular negative -ERESTART* values in ax.
+These fields are 64 bits and for a 32-bit task they get zero-extended.
+The syscall restart behavior is lost, a regression from a native 32-bit
+kernel and from 64-bit tasks' behavior.  This patch fixes the problem by
+doing sign-extension where it matters.  For orig_ax, the only time the
+value should be -1 but winds up as 0x0ffffffff is via a 32-bit ptrace
+call.  So the patch changes ptrace to sign-extend the 32-bit orig_eax
+value when it's stored; it doesn't change the checks on orig_ax, though
+it uses the new current_syscall() inline to better document the subtle
+importance of the used of signedness there.  The ax value is stored a
+lot of ways and it seems hard to get them all sign-extended at their
+origins.  So for that, we use the current_syscall_ret() to sign-extend
+it only for 32-bit tasks at the time of the -ERESTART* comparisons.
+
+Signed-off-by: Roland McGrath <roland at redhat.com>
+---
+ arch/x86/kernel/ptrace.c    |    9 ++++++++-
+ arch/x86/kernel/signal_64.c |   38 +++++++++++++++++++++++++++++++++-----
+ 2 files changed, 41 insertions(+), 6 deletions(-)
+
+diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
+index f41fdc9..f8eed1b 100644
+--- a/arch/x86/kernel/ptrace.c
++++ b/arch/x86/kernel/ptrace.c
+@@ -1045,10 +1045,17 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 value)
+ 	R32(esi, si);
+ 	R32(ebp, bp);
+ 	R32(eax, ax);
+-	R32(orig_eax, orig_ax);
+ 	R32(eip, ip);
+ 	R32(esp, sp);
+ 
++	case offsetof(struct user32, regs.orig_eax):
++		/*
++		 * Sign-extend the value so that orig_eax = -1
++		 * causes (long)orig_ax < 0 tests to fire correctly.
++		 */
++		regs->orig_ax = (long) (s32) value;
++		break;
++
+ 	case offsetof(struct user32, regs.eflags):
+ 		return set_flags(child, value);
+ 
+diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
+index 7347bb1..ce317ee 100644
+--- a/arch/x86/kernel/signal_64.c
++++ b/arch/x86/kernel/signal_64.c
+@@ -311,6 +311,35 @@ give_sigsegv:
+ }
+ 
+ /*
++ * Return -1L or the syscall number that @regs is executing.
++ */
++static long current_syscall(struct pt_regs *regs)
++{
++	/*
++	 * We always sign-extend a -1 value being set here,
++	 * so this is always either -1L or a syscall number.
++	 */
++	return regs->orig_ax;
++}
++
++/*
++ * Return a value that is -EFOO if the system call in @regs->orig_ax
++ * returned an error.  This only works for @regs from @current.
++ */
++static long current_syscall_ret(struct pt_regs *regs)
++{
++#ifdef CONFIG_IA32_EMULATION
++	if (test_thread_flag(TIF_IA32))
++		/*
++		 * Sign-extend the value so (int)-EFOO becomes (long)-EFOO
++		 * and will match correctly in comparisons.
++		 */
++		return (int) regs->ax;
++#endif
++	return regs->ax;
++}
++
++/*
+  * OK, we're invoking a handler
+  */	
+ 
+@@ -327,9 +356,9 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
+ #endif
+ 
+ 	/* Are we from a system call? */
+-	if ((long)regs->orig_ax >= 0) {
++	if (current_syscall(regs) >= 0) {
+ 		/* If so, check system call restarting.. */
+-		switch (regs->ax) {
++		switch (current_syscall_ret(regs)) {
+ 		        case -ERESTART_RESTARTBLOCK:
+ 			case -ERESTARTNOHAND:
+ 				regs->ax = -EINTR;
+@@ -426,10 +455,9 @@ static void do_signal(struct pt_regs *regs)
+ 	}
+ 
+ 	/* Did we come from a system call? */
+-	if ((long)regs->orig_ax >= 0) {
++	if (current_syscall(regs) >= 0) {
+ 		/* Restart the system call - no handlers present */
+-		long res = regs->ax;
+-		switch (res) {
++		switch (current_syscall_ret(regs)) {
+ 		case -ERESTARTNOHAND:
+ 		case -ERESTARTSYS:
+ 		case -ERESTARTNOINTR:
+-- 
+1.5.4.1
+

linux-2.6-lirc.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 linux-2.6-lirc.patch
Index: linux-2.6-lirc.patch
===================================================================
RCS file: linux-2.6-lirc.patch
diff -N linux-2.6-lirc.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-lirc.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,17646 @@
+diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
+index 9dea14d..d84ac4a 100644
+--- a/drivers/input/Kconfig
++++ b/drivers/input/Kconfig
+@@ -173,5 +173,7 @@ source "drivers/input/gameport/Kconfig"
+ 
+ endmenu
+ 
++source "drivers/input/lirc/Kconfig"
++
+ endmenu
+ 
+diff --git a/drivers/input/Makefile b/drivers/input/Makefile
+index 2ae87b1..24bdec1 100644
+--- a/drivers/input/Makefile
++++ b/drivers/input/Makefile
+@@ -21,5 +21,6 @@ obj-$(CONFIG_INPUT_JOYSTICK)	+= joystick/
+ obj-$(CONFIG_INPUT_TABLET)	+= tablet/
+ obj-$(CONFIG_INPUT_TOUCHSCREEN)	+= touchscreen/
+ obj-$(CONFIG_INPUT_MISC)	+= misc/
++obj-$(CONFIG_INPUT_LIRC)	+= lirc/
+ 
+ obj-$(CONFIG_INPUT_APMPOWER)	+= apm-power.o
+diff --git a/drivers/input/lirc/Kconfig b/drivers/input/lirc/Kconfig
+new file mode 100644
+index 0000000..138e58a
+--- /dev/null
++++ b/drivers/input/lirc/Kconfig
+@@ -0,0 +1,127 @@
++#
++# LIRC driver(s) configuration
++#
++menuconfig INPUT_LIRC
++	bool "Linux Infrared Remote Control IR receiver/transmitter drivers"
++	default n
++	help
++	  Say Y here, and all supported Linux Infrared Remote Control IR and
++	  RF receiver and transmitter drivers will be displayed. When paired
++	  with a remote control and the lirc daemon, the receiver drivers
++	  allow control of your Linux system via remote control.
++
++if INPUT_LIRC
++
++config LIRC_DEV
++	tristate "LIRC device loadable module support"
++	default m
++	help
++	  LIRC device loadable module support, required for most LIRC drivers
++
++config LIRC_ATIUSB
++	tristate "ATI RF USB Receiver support"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for the ATI USB RF remote receiver
++
++config LIRC_BT829
++        tristate "BT829 based hardware"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for the IR interface on BT829-based hardware
++
++config LIRC_CMDIR
++	tristate "CommandIR USB Transceiver"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for the CommandIR USB Transceiver
++
++config LIRC_I2C
++	tristate "I2C Based IR Receivers"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for I2C-based IR receivers, such as those commonly
++	  found onboard Hauppauge PVR-150/250/350 video capture cards
++
++config LIRC_IGORPLUGUSB
++	tristate "Igor Cesko's USB IR Receiver"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for Igor Cesko's USB IR Receiver
++
++config LIRC_IMON
++	tristate "Soundgraph IMON Receiver"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for the Soundgraph IMON IR Receiver
++
++config LIRC_IT87
++	tristate "ITE IT87XX CIR Port Receiver"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for the ITE IT87xx IR Receiver
++
++config LIRC_MCEUSB
++	tristate "Microsoft Media Center Ed. Receiver, v1"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for the Microsoft Media Center Ed. Receiver, v1
++
++config LIRC_MCEUSB2
++	tristate "Microsoft Media Center Ed. Receiver, v2"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for the Microsoft Media Center Ed. Receiver, v2
++
++config LIRC_PVR150
++	tristate "Hauppauge PVR-XXX Transmitter"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for the Hauppauge PVR-150/250/350/500 IR Transmitter
++
++config LIRC_PARALLEL
++	tristate "Homebrew Parallel Port Receiver"
++	default m
++	depends on LIRC_DEV && !SMP
++	help
++	  Driver for Homebrew Parallel Port Receivers
++
++config LIRC_SERIAL
++	tristate "Homebrew Serial Port Receiver"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for Homebrew Serial Port Receivers
++
++config LIRC_SIR
++	tristate "Built-in SIR IrDA port"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for the SIR IrDA port
++
++config LIRC_STREAMZAP
++	tristate "Streamzap PC Receiver"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for the Streamzap PC Receiver
++
++config LIRC_TTUSBIR
++	tristate "Technotrend USB IR Receiver"
++	default m
++	depends on LIRC_DEV
++	help
++	  Driver for the Technotrend USB IR Receiver
++
++endif
+diff --git a/drivers/input/lirc/Makefile b/drivers/input/lirc/Makefile
+new file mode 100644
+index 0000000..71124ef
+--- /dev/null
++++ b/drivers/input/lirc/Makefile
+@@ -0,0 +1,24 @@
++# Makefile for the lirc drivers.
++#
++
++# Each configuration option enables a list of files.
++
++EXTRA_CFLAGS =-DIRCTL_DEV_MAJOR=61 -DLIRC_SERIAL_TRANSMITTER -I$(src)
++
++obj-$(CONFIG_LIRC_DEV)		+= lirc_dev.o
++obj-$(CONFIG_LIRC_ATIUSB)	+= lirc_atiusb.o
++obj-$(CONFIG_LIRC_BT829)	+= lirc_bt829.o
++obj-$(CONFIG_LIRC_CMDIR)	+= lirc_cmdir.o commandir.o
++obj-$(CONFIG_LIRC_I2C)		+= lirc_i2c.o
++obj-$(CONFIG_LIRC_IGORPLUGUSB)	+= lirc_igorplugusb.o
++obj-$(CONFIG_LIRC_IMON)		+= lirc_imon.o
++obj-$(CONFIG_LIRC_IT87)		+= lirc_it87.o
++obj-$(CONFIG_LIRC_MCEUSB)	+= lirc_mceusb.o
++obj-$(CONFIG_LIRC_MCEUSB2)	+= lirc_mceusb2.o
++obj-$(CONFIG_LIRC_PVR150)	+= lirc_pvr150.o
++obj-$(CONFIG_LIRC_PARALLEL)	+= lirc_parallel.o
++obj-$(CONFIG_LIRC_SASEM)	+= lirc_sasem.o
++obj-$(CONFIG_LIRC_SERIAL)	+= lirc_serial.o
++obj-$(CONFIG_LIRC_SIR)		+= lirc_sir.o
++obj-$(CONFIG_LIRC_STREAMZAP)	+= lirc_streamzap.o
++obj-$(CONFIG_LIRC_TTUSBIR)	+= lirc_ttusbir.o
+diff --git a/drivers/input/lirc/commandir.c b/drivers/input/lirc/commandir.c
+new file mode 100644
+index 0000000..a49d996
+--- /dev/null
++++ b/drivers/input/lirc/commandir.c
+@@ -0,0 +1,1009 @@
++
[...17253 lines suppressed...]
++		if (ttusbir->last_pulse == buf[i]) {
++			if (ttusbir->last_num < PULSE_MASK/63)
++				ttusbir->last_num++;
++		/* else we are in a idle period and do not need to
++		 * increment any longer */
++		} else {
++			l = ttusbir->last_num * 62; /* about 62 = us/byte */
++			if (ttusbir->last_pulse) /* pulse or space? */
++				l |= PULSE_BIT;
++			if (!lirc_buffer_full(&ttusbir->rbuf)) {
++				lirc_buffer_write_1(&ttusbir->rbuf, (void *)&l);
++				wake_up_interruptible(&ttusbir->rbuf.wait_poll);
++			}
++			ttusbir->last_num = 0;
++			ttusbir->last_pulse = buf[i];
++		}
++	}
++	usb_submit_urb(urb, GFP_ATOMIC); /* keep data rolling :-) */
++}
++
++/* Called whenever the USB subsystem thinks we could be the right driver
++   to handle this device
++*/
++static int probe(struct usb_interface *intf, const struct usb_device_id *id)
++{
++	int alt_set, endp;
++	int found = 0;
++	int i, j;
++	int struct_size;
++	struct usb_host_interface *host_interf;
++	struct usb_interface_descriptor *interf_desc;
++	struct usb_host_endpoint *host_endpoint;
++	struct ttusbir_device *ttusbir;
++
++	DPRINTK("Module ttusbir probe\n");
++
++	/* To reduce memory fragmentation we use only one allocation */
++	struct_size =  sizeof(struct ttusbir_device) +
++		(sizeof(struct urb *) * num_urbs) +
++		(sizeof(char *) * num_urbs) +
++		(num_urbs * 128);
++	ttusbir = kmalloc(struct_size, GFP_KERNEL);
++	if (!ttusbir)
++		return -ENOMEM;
++	memset(ttusbir, 0, struct_size);
++
++	ttusbir->urb = (struct urb **)((char *)ttusbir +
++				      sizeof(struct ttusbir_device));
++	ttusbir->buffer = (char **)((char *)ttusbir->urb +
++				   (sizeof(struct urb *) * num_urbs));
++	for (i = 0; i < num_urbs; i++)
++		ttusbir->buffer[i] = (char *)ttusbir->buffer +
++			(sizeof(char *)*num_urbs) + (i * 128);
++
++	ttusbir->driver = &driver;
++	ttusbir->alt_setting = -1;
++	/* @TODO check if error can be returned */
++	ttusbir->udev = usb_get_dev(interface_to_usbdev(intf));
++	ttusbir->interf = intf;
++	ttusbir->last_pulse = 0x00;
++	ttusbir->last_num = 0;
++
++	/* Now look for interface setting we can handle
++	   We are searching for the alt setting where end point
++	   0x82 has max packet size 16
++	*/
++	for (alt_set = 0; alt_set < intf->num_altsetting && !found; alt_set++) {
++		host_interf = &intf->altsetting[alt_set];
++		interf_desc = &host_interf->desc;
++		for (endp = 0; endp < interf_desc->bNumEndpoints; endp++) {
++			host_endpoint = &host_interf->endpoint[endp];
++			if ((host_endpoint->desc.bEndpointAddress == 0x82) &&
++			    (host_endpoint->desc.wMaxPacketSize == 0x10)) {
++				ttusbir->alt_setting = alt_set;
++				ttusbir->endpoint = endp;
++				found = 1;
++				break;
++			}
++		}
++	}
++	if (ttusbir->alt_setting != -1)
++		DPRINTK("alt setting: %d\n", ttusbir->alt_setting);
++	else {
++		err("Could not find alternate setting\n");
++		kfree(ttusbir);
++		return -EINVAL;
++	}
++
++	/* OK lets setup this interface setting */
++	usb_set_interface(ttusbir->udev, 0, ttusbir->alt_setting);
++
++	/* Store device info in interface structure */
++	usb_set_intfdata(intf, ttusbir);
++
++	/* Register as a LIRC plugin */
++	if (lirc_buffer_init(&ttusbir->rbuf, sizeof(lirc_t), 256) < 0) {
++		err("Could not get memory for LIRC data buffer\n");
++		usb_set_intfdata(intf, NULL);
++		kfree(ttusbir);
++		return -ENOMEM;
++	}
++	strcpy(ttusbir->plugin.name, "TTUSBIR");
++	ttusbir->plugin.minor = -1;
++	ttusbir->plugin.code_length = 1;
++	ttusbir->plugin.sample_rate = 0;
++	ttusbir->plugin.data = ttusbir;
++	ttusbir->plugin.add_to_buf = NULL;
++	ttusbir->plugin.get_queue = NULL;
++	ttusbir->plugin.rbuf = &ttusbir->rbuf;
++	ttusbir->plugin.set_use_inc = set_use_inc;
++	ttusbir->plugin.set_use_dec = set_use_dec;
++	ttusbir->plugin.ioctl = NULL;
++	ttusbir->plugin.fops = NULL;
++	ttusbir->plugin.owner = THIS_MODULE;
++	ttusbir->plugin.features = LIRC_CAN_REC_MODE2;
++	ttusbir->minor = lirc_register_plugin(&ttusbir->plugin);
++	if (ttusbir->minor < 0) {
++		err("Error registering as LIRC plugin\n");
++		usb_set_intfdata(intf, NULL);
++		lirc_buffer_free(&ttusbir->rbuf);
++		kfree(ttusbir);
++		return -EIO;
++	}
++
++	/* Allocate and setup the URB that we will use to talk to the device */
++	for (i = 0; i < num_urbs; i++) {
++		ttusbir->urb[i] = usb_alloc_urb(8, GFP_KERNEL);
++		if (!ttusbir->urb[i]) {
++			err("Could not allocate memory for the URB\n");
++			for (j = i - 1; j >= 0; j--)
++				kfree(ttusbir->urb[j]);
++			lirc_buffer_free(&ttusbir->rbuf);
++			lirc_unregister_plugin(ttusbir->minor);
++			kfree(ttusbir);
++			usb_set_intfdata(intf, NULL);
++			return -ENOMEM;
++		}
++		ttusbir->urb[i]->dev = ttusbir->udev;
++		ttusbir->urb[i]->context = ttusbir;
++		ttusbir->urb[i]->pipe = usb_rcvisocpipe(ttusbir->udev,
++							ttusbir->endpoint);
++		ttusbir->urb[i]->interval = 1;
++		ttusbir->urb[i]->transfer_flags = URB_ISO_ASAP;
++		ttusbir->urb[i]->transfer_buffer = &ttusbir->buffer[i][0];
++		ttusbir->urb[i]->complete = urb_complete;
++		ttusbir->urb[i]->number_of_packets = 8;
++		ttusbir->urb[i]->transfer_buffer_length = 128;
++		for (j = 0; j < 8; j++) {
++			ttusbir->urb[i]->iso_frame_desc[j].offset = j*16;
++			ttusbir->urb[i]->iso_frame_desc[j].length = 16;
++		}
++	}
++	return 0;
++}
++
++/* Called when the driver is unloaded or the device is unplugged
++ */
++static void disconnect(struct usb_interface *intf)
++{
++	int i;
++	struct ttusbir_device *ttusbir;
++
++	DPRINTK("Module ttusbir disconnect\n");
++
++	ttusbir = (struct ttusbir_device *) usb_get_intfdata(intf);
++	usb_set_intfdata(intf, NULL);
++	lirc_unregister_plugin(ttusbir->minor);
++	DPRINTK("unregistered\n");
++
++	for (i = 0; i < num_urbs; i++) {
++		usb_kill_urb(ttusbir->urb[i]);
++		usb_free_urb(ttusbir->urb[i]);
++	}
++	DPRINTK("URBs killed\n");
++	lirc_buffer_free(&ttusbir->rbuf);
++	kfree(ttusbir);
++}
++
++static int ttusbir_init_module(void)
++{
++	int result;
++
++	DPRINTK(KERN_DEBUG "Module ttusbir init\n");
++
++	/* register this driver with the USB subsystem */
++	result = usb_register(&driver);
++	if (result)
++		err("usb_register failed. Error number %d", result);
++	return result;
++}
++
++static void ttusbir_exit_module(void)
++{
++	printk(KERN_DEBUG "Module ttusbir exit\n");
++	/* deregister this driver with the USB subsystem */
++	usb_deregister(&driver);
++}
++
++module_init(ttusbir_init_module);
++module_exit(ttusbir_exit_module);

linux-2.6-netdev-atl2.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 linux-2.6-netdev-atl2.patch
Index: linux-2.6-netdev-atl2.patch
===================================================================
RCS file: linux-2.6-netdev-atl2.patch
diff -N linux-2.6-netdev-atl2.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-netdev-atl2.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,4360 @@
+diff -Nurp a/drivers/net/atl2/atl2_ethtool.c b/drivers/net/atl2/atl2_ethtool.c
+--- a/drivers/net/atl2/atl2_ethtool.c	1969-12-31 19:00:00.000000000 -0500
++++ b/drivers/net/atl2/atl2_ethtool.c	2007-12-10 12:45:39.000000000 -0500
+@@ -0,0 +1,416 @@
++/* atl2_ethtool.c -- atl2 ethtool support
++ *
++ * Copyright(c) 2007 Atheros Corporation. All rights reserved.
++ * Copyright(c) 2006 xiong huang <xiong.huang at atheros.com>
++ * Copyright(c) 2007 Chris Snook <csnook at redhat.com>
++ *
++ * Derived from Intel e1000 driver
++ * Copyright(c) 1999 - 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 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/bitops.h>
++#include <linux/ethtool.h>
++#include <linux/mii.h>
++#include <linux/netdevice.h>
++#include <linux/slab.h>
++#include <linux/string.h>
++#include <linux/types.h>
++
++#include "atl2.h"
++#include "atl2_hw.h"
++
++extern char atl2_driver_name[];
++extern char atl2_driver_version[];
++
++extern int atl2_up(struct atl2_adapter *adapter);
++extern void atl2_down(struct atl2_adapter *adapter);
++extern void atl2_reinit_locked(struct atl2_adapter *adapter);
++extern s32 atl2_reset_hw(struct atl2_hw *hw);
++
++static int
++atl2_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
++{
++	struct atl2_adapter *adapter = netdev_priv(netdev);
++	struct atl2_hw *hw = &adapter->hw;
++
++	ecmd->supported = (SUPPORTED_10baseT_Half |
++		SUPPORTED_10baseT_Full |
++		SUPPORTED_100baseT_Half |
++		SUPPORTED_100baseT_Full |
++		SUPPORTED_Autoneg |
++		SUPPORTED_TP);
++	ecmd->advertising = ADVERTISED_TP;
++
++	ecmd->advertising |= ADVERTISED_Autoneg;
++	ecmd->advertising |= hw->autoneg_advertised;
++
++	ecmd->port = PORT_TP;
++	ecmd->phy_address = 0;
++	ecmd->transceiver = XCVR_INTERNAL;
++
++	if (adapter->link_speed != SPEED_0) {
++		ecmd->speed = adapter->link_speed;
++		if (adapter->link_duplex == FULL_DUPLEX)
++			ecmd->duplex = DUPLEX_FULL;
++		else
++			ecmd->duplex = DUPLEX_HALF;
++	} else {
++		ecmd->speed = -1;
++		ecmd->duplex = -1;
++	}
++
++	ecmd->autoneg = AUTONEG_ENABLE;
++	return 0;
++}
++
++static int
++atl2_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
++{
++	struct atl2_adapter *adapter = netdev_priv(netdev);
++	struct atl2_hw *hw = &adapter->hw;
++
++	while (test_and_set_bit(__ATL2_RESETTING, &adapter->flags))
++		msleep(1);
++
++	if (ecmd->autoneg == AUTONEG_ENABLE) {
++#define MY_ADV_MASK	(ADVERTISE_10_HALF| \
++					 ADVERTISE_10_FULL| \
++					 ADVERTISE_100_HALF| \
++					 ADVERTISE_100_FULL)
++
++		if ((ecmd->advertising&MY_ADV_MASK) == MY_ADV_MASK) {
++			hw->MediaType = MEDIA_TYPE_AUTO_SENSOR;
++			hw->autoneg_advertised =  MY_ADV_MASK;
++		} else if ((ecmd->advertising&MY_ADV_MASK) == ADVERTISE_100_FULL) {
++			hw->MediaType = MEDIA_TYPE_100M_FULL;
++			hw->autoneg_advertised = ADVERTISE_100_FULL;
++		} else if ((ecmd->advertising&MY_ADV_MASK) == ADVERTISE_100_HALF) {
++			hw->MediaType = MEDIA_TYPE_100M_HALF;
++			hw->autoneg_advertised = ADVERTISE_100_HALF;
++		} else if ((ecmd->advertising&MY_ADV_MASK) == ADVERTISE_10_FULL) {
++			hw->MediaType = MEDIA_TYPE_10M_FULL;
++			hw->autoneg_advertised = ADVERTISE_10_FULL;
++		}  else if ((ecmd->advertising&MY_ADV_MASK) == ADVERTISE_10_HALF) {
++			hw->MediaType = MEDIA_TYPE_10M_HALF;
++			hw->autoneg_advertised = ADVERTISE_10_HALF;
++		} else {
++			clear_bit(__ATL2_RESETTING, &adapter->flags);
++			return -EINVAL;
++		}
++		ecmd->advertising = hw->autoneg_advertised |
++			ADVERTISED_TP | ADVERTISED_Autoneg;
++	} else {
++		clear_bit(__ATL2_RESETTING, &adapter->flags);
++		return -EINVAL;
++	}
++
++	/* reset the link */
++	if (netif_running(adapter->netdev)) {
++		atl2_down(adapter);
++		atl2_up(adapter);
++	} else
++		atl2_reset_hw(&adapter->hw);
++
++	clear_bit(__ATL2_RESETTING, &adapter->flags);
++	return 0;
++}
++
++static u32
++atl2_get_tx_csum(struct net_device *netdev)
++{
++	return (netdev->features & NETIF_F_HW_CSUM) != 0;
++}
++
++static u32
++atl2_get_msglevel(struct net_device *netdev)
++{
++	return 0;
++}
++
++/*
++ * It's sane for this to be empty, but we might want to take advantage of this.
++ */
++static void
++atl2_set_msglevel(struct net_device *netdev, u32 data)
++{
++}
++
++static int
++atl2_get_regs_len(struct net_device *netdev)
++{
++#define ATL2_REGS_LEN 42
++	return ATL2_REGS_LEN * sizeof(u32);
++}
++
++static void
++atl2_get_regs(struct net_device *netdev, struct ethtool_regs *regs, void *p)
++{
++	struct atl2_adapter *adapter = netdev_priv(netdev);
++	struct atl2_hw *hw = &adapter->hw;
++	u32 *regs_buff = p;
++	u16 phy_data;
++
++	memset(p, 0, ATL2_REGS_LEN * sizeof(u32));
++
++	regs->version = (1 << 24) | (hw->revision_id << 16) | hw->device_id;
++
++	regs_buff[0]  = ATL2_READ_REG(hw, REG_VPD_CAP);
++	regs_buff[1]  = ATL2_READ_REG(hw, REG_SPI_FLASH_CTRL);
++	regs_buff[2]  = ATL2_READ_REG(hw, REG_SPI_FLASH_CONFIG);
++	regs_buff[3]  = ATL2_READ_REG(hw, REG_TWSI_CTRL);
++	regs_buff[4]  = ATL2_READ_REG(hw, REG_PCIE_DEV_MISC_CTRL);
++	regs_buff[5]  = ATL2_READ_REG(hw, REG_MASTER_CTRL);
++	regs_buff[6]  = ATL2_READ_REG(hw, REG_MANUAL_TIMER_INIT);
++	regs_buff[7]  = ATL2_READ_REG(hw, REG_IRQ_MODU_TIMER_INIT);
++	regs_buff[8]  = ATL2_READ_REG(hw, REG_PHY_ENABLE);
++	regs_buff[9]  = ATL2_READ_REG(hw, REG_CMBDISDMA_TIMER);
++	regs_buff[10] = ATL2_READ_REG(hw, REG_IDLE_STATUS);
++	regs_buff[11] = ATL2_READ_REG(hw, REG_MDIO_CTRL);
++	regs_buff[12] = ATL2_READ_REG(hw, REG_SERDES_LOCK);
++	regs_buff[13] = ATL2_READ_REG(hw, REG_MAC_CTRL);
++	regs_buff[14] = ATL2_READ_REG(hw, REG_MAC_IPG_IFG);
++	regs_buff[15] = ATL2_READ_REG(hw, REG_MAC_STA_ADDR);
++	regs_buff[16] = ATL2_READ_REG(hw, REG_MAC_STA_ADDR+4);
++	regs_buff[17] = ATL2_READ_REG(hw, REG_RX_HASH_TABLE);
++	regs_buff[18] = ATL2_READ_REG(hw, REG_RX_HASH_TABLE+4);
[...3967 lines suppressed...]
++		case enable_option:
++			switch (*value) {
++				case OPTION_ENABLED:
++					printk(KERN_INFO "%s Enabled\n", opt->name);
++					return 0;
++					break;
++				case OPTION_DISABLED:
++					printk(KERN_INFO "%s Disabled\n", opt->name);
++					return 0;
++					break;
++			}
++			break;
++		case range_option:
++			if(*value >= opt->arg.r.min && *value <= opt->arg.r.max) {
++				printk(KERN_INFO "%s set to %i\n", opt->name, *value);
++				return 0;
++			}
++			break;
++		case list_option:
++			for(i = 0; i < opt->arg.l.nr; i++) {
++				ent = &opt->arg.l.p[i];
++				if(*value == ent->i) {
++					if(ent->str[0] != '\0')
++						printk(KERN_INFO "%s\n", ent->str);
++				return 0;
++				}
++			}
++			break;
++		default:
++			BUG();
++	}
++
++	printk(KERN_INFO "Invalid %s specified (%i) %s\n",
++		opt->name, *value, opt->err);
++	*value = opt->def;
++	return -1;
++}
++
++/**
++ * atl2_check_options - Range Checking for Command Line Parameters
++ * @adapter: board private structure
++ *
++ * This routine checks all command line parameters for valid user
++ * input.  If an invalid value is given, or if no user specified
++ * value exists, a default value is used.  The final value is stored
++ * in a variable in the adapter structure.
++ **/
++void __devinit
++atl2_check_options(struct atl2_adapter *adapter)
++{
++	int val;
++	struct atl2_option opt;
++	int bd = adapter->bd_number;
++	if(bd >= ATL2_MAX_NIC) {
++		printk(KERN_NOTICE "Warning: no configuration for board #%i\n", bd);
++		printk(KERN_NOTICE "Using defaults for all values\n");
++#ifndef module_param_array
++		bd = ATL2_MAX_NIC;
++#endif
++	}
++
++	/* Bytes of Transmit Memory */
++	opt.type = range_option;
++	opt.name = "Bytes of Transmit Memory";
++	opt.err = "using default of " __MODULE_STRING(ATL2_DEFAULT_TX_MEMSIZE);
++	opt.def = ATL2_DEFAULT_TX_MEMSIZE;
++	opt.arg.r.min = ATL2_MIN_TX_MEMSIZE;
++	opt.arg.r.max = ATL2_MAX_TX_MEMSIZE;
++#ifdef module_param_array
++	if(num_TxMemSize > bd) {
++#endif
++		val = TxMemSize[bd];
++		atl2_validate_option(&val, &opt);
++		adapter->txd_ring_size = ((u32) val) * 1024;
++#ifdef module_param_array
++        } else {
++		adapter->txd_ring_size = ((u32)opt.def) * 1024;
++	}
++#endif
++	// txs ring size:
++	adapter->txs_ring_size = adapter->txd_ring_size / 128;
++	if (adapter->txs_ring_size > 160)
++		adapter->txs_ring_size = 160;
++
++	/* Receive Memory Block Count */
++	opt.type = range_option;
++	opt.name = "Number of receive memory block";
++	opt.err = "using default of " __MODULE_STRING(ATL2_DEFAULT_RXD_COUNT);
++	opt.def = ATL2_DEFAULT_RXD_COUNT;
++	opt.arg.r.min = ATL2_MIN_RXD_COUNT;
++	opt.arg.r.max = ATL2_MAX_RXD_COUNT;
++#ifdef module_param_array
++	if(num_RxMemBlock > bd) {
++#endif
++		val = RxMemBlock[bd];
++		atl2_validate_option(&val, &opt);
++		adapter->rxd_ring_size = (u32)val; //((u16)val)&~1; // even number
++#ifdef module_param_array
++	} else {
++		adapter->rxd_ring_size = (u32)opt.def;
++	}
++#endif
++	// init RXD Flow control value
++	adapter->hw.fc_rxd_hi = (adapter->rxd_ring_size/8)*7;
++	adapter->hw.fc_rxd_lo = (ATL2_MIN_RXD_COUNT/8) > (adapter->rxd_ring_size/12) ?
++		(ATL2_MIN_RXD_COUNT/8) : (adapter->rxd_ring_size/12);
++
++	/* Interrupt Moderate Timer */
++	opt.type = range_option;
++	opt.name = "Interrupt Moderate Timer";
++	opt.err = "using default of " __MODULE_STRING(INT_MOD_DEFAULT_CNT);
++	opt.def = INT_MOD_DEFAULT_CNT;
++	opt.arg.r.min = INT_MOD_MIN_CNT;
++	opt.arg.r.max = INT_MOD_MAX_CNT;
++#ifdef module_param_array
++	if(num_IntModTimer > bd) {
++#endif
++		val = IntModTimer[bd];
++		atl2_validate_option(&val, &opt);
++		adapter->imt = (u16) val;
++#ifdef module_param_array
++	} else {
++		adapter->imt = (u16)(opt.def);
++	}
++#endif
++	/* Flash Vendor */
++	opt.type = range_option;
++	opt.name = "SPI Flash Vendor";
++	opt.err = "using default of " __MODULE_STRING(FLASH_VENDOR_DEFAULT);
++	opt.def = FLASH_VENDOR_DEFAULT;
++	opt.arg.r.min = FLASH_VENDOR_MIN;
++	opt.arg.r.max = FLASH_VENDOR_MAX;
++#ifdef module_param_array
++	if(num_FlashVendor > bd) {
++#endif
++		val = FlashVendor[bd];
++		atl2_validate_option(&val, &opt);
++		adapter->hw.flash_vendor = (u8) val;
++#ifdef module_param_array
++	} else {
++		adapter->hw.flash_vendor = (u8)(opt.def);
++	}
++#endif
++	/* MediaType */
++	opt.type = range_option;
++	opt.name = "Speed/Duplex Selection";
++	opt.err = "using default of " __MODULE_STRING(MEDIA_TYPE_AUTO_SENSOR);
++	opt.def = MEDIA_TYPE_AUTO_SENSOR;
++	opt.arg.r.min = MEDIA_TYPE_AUTO_SENSOR;
++	opt.arg.r.max = MEDIA_TYPE_10M_HALF;
++#ifdef module_param_array
++	if(num_MediaType > bd) {
++#endif
++		val = MediaType[bd];
++		atl2_validate_option(&val, &opt);
++		adapter->hw.MediaType = (u16) val;
++#ifdef module_param_array
++	} else {
++		adapter->hw.MediaType = (u16)(opt.def);
++	}
++#endif
++}
+diff -Nurp a/drivers/net/atl2/Makefile b/drivers/net/atl2/Makefile
+--- a/drivers/net/atl2/Makefile	1969-12-31 19:00:00.000000000 -0500
++++ b/drivers/net/atl2/Makefile	2008-01-31 14:37:35.000000000 -0500
+@@ -0,0 +1,2 @@
++obj-$(CONFIG_ATL2)	+= atl2.o
++atl2-y			+= atl2_main.o atl2_hw.o atl2_ethtool.o atl2_param.o
+diff -Nurp a/drivers/net/Kconfig b/drivers/net/Kconfig
+--- a/drivers/net/Kconfig	2008-01-31 14:32:05.000000000 -0500
++++ b/drivers/net/Kconfig	2008-01-31 14:44:01.000000000 -0500
+@@ -1999,6 +1999,17 @@ config NE_H8300
+ 	  Say Y here if you want to use the NE2000 compatible
+ 	  controller on the Renesas H8/300 processor.
+ 
++config ATL2
++	tristate "Atheros L2 Fast Ethernet support (EXPERIMENTAL)"
++	depends on PCI && EXPERIMENTAL
++	select CRC32
++	select MII
++	help
++	  This driver supports the Atheros L2 fast ethernet adapter.
++
++	  To compile this driver as a module, choose M here.  The module
++	  will be called atl2.
++
+ source "drivers/net/fec_8xx/Kconfig"
+ source "drivers/net/fs_enet/Kconfig"
+ 
+diff -Nurp a/drivers/net/Makefile b/drivers/net/Makefile
+--- a/drivers/net/Makefile	2008-01-31 14:32:05.000000000 -0500
++++ b/drivers/net/Makefile	2008-01-31 14:38:52.000000000 -0500
+@@ -11,6 +11,7 @@ obj-$(CONFIG_CHELSIO_T3) += cxgb3/
+ obj-$(CONFIG_EHEA) += ehea/
+ obj-$(CONFIG_BONDING) += bonding/
+ obj-$(CONFIG_ATL1) += atl1/
++obj-$(CONFIG_ATL2) += atl2/
+ obj-$(CONFIG_GIANFAR) += gianfar_driver.o
+ obj-$(CONFIG_TEHUTI) += tehuti.o
+ 

linux-2.6-netdev-e1000-disable-alpm.patch:

Index: linux-2.6-netdev-e1000-disable-alpm.patch
===================================================================
RCS file: linux-2.6-netdev-e1000-disable-alpm.patch
diff -N linux-2.6-netdev-e1000-disable-alpm.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-netdev-e1000-disable-alpm.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,70 @@
+Port of f2fa3114919fa195f800a04a5e57156c0f67fff4 (from the netdev tree)
+from e1000e to e1000.
+
+Should fix the checksum problems too.
+
+bz #400561 (F8)
+---
+ drivers/net/e1000/e1000_main.c |   31 +++++++++++++++++++++++++++++++
+ 1 file changed, 31 insertions(+)
+
+--- linux-2.6.23.noarch.orig/drivers/net/e1000/e1000_main.c
++++ linux-2.6.23.noarch/drivers/net/e1000/e1000_main.c
+@@ -846,6 +846,33 @@ e1000_reset(struct e1000_adapter *adapte
+ 	e1000_release_manageability(adapter);
+ }
+ 
++static void e1000e_disable_l1aspm(struct pci_dev *pdev)
++{
++	int pos;
++	u32 cap;
++	u16 val;
++
++	/*
++	 * 82573 workaround - disable L1 ASPM on mobile chipsets
++	 *
++	 * L1 ASPM on various mobile (ich7) chipsets do not behave properly
++	 * resulting in lost data or garbage information on the pci-e link
++	 * level. This could result in (false) bad EEPROM checksum errors,
++	 * long ping times (up to 2s) or even a system freeze/hang.
++	 *
++	 * Unfortunately this feature saves about 1W power consumption when
++	 * active.
++	 */
++	pos = pci_find_capability(pdev, PCI_CAP_ID_EXP);
++	pci_read_config_dword(pdev, pos + PCI_EXP_LNKCAP, &cap);
++	pci_read_config_word(pdev, pos + PCI_EXP_LNKCTL, &val);
++	if (val & 0x2) {
++		dev_warn(&pdev->dev, "Disabling L1 ASPM\n");
++		val &= ~0x2;
++		pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, val);
++	}
++}
++
+ /**
+  * e1000_probe - Device Initialization Routine
+  * @pdev: PCI device information struct
+@@ -872,6 +899,7 @@ e1000_probe(struct pci_dev *pdev,
+ 	uint16_t eeprom_apme_mask = E1000_EEPROM_APME;
+ 	DECLARE_MAC_BUF(mac);
+ 
++	e1000e_disable_l1aspm(pdev);
+ 	if ((err = pci_enable_device(pdev)))
+ 		return err;
+ 
+@@ -5180,6 +5209,7 @@ e1000_resume(struct pci_dev *pdev)
+ 
+ 	pci_set_power_state(pdev, PCI_D0);
+ 	pci_restore_state(pdev);
++	e1000e_disable_l1aspm(pdev);
+ 	if ((err = pci_enable_device(pdev))) {
+ 		printk(KERN_ERR "e1000: Cannot enable PCI device from suspend\n");
+ 		return err;
+@@ -5276,6 +5306,7 @@ static pci_ers_result_t e1000_io_slot_re
+ 	struct net_device *netdev = pci_get_drvdata(pdev);
+ 	struct e1000_adapter *adapter = netdev->priv;
+ 
++	e1000e_disable_l1aspm(pdev);
+ 	if (pci_enable_device(pdev)) {
+ 		printk(KERN_ERR "e1000: Cannot re-enable PCI device after reset.\n");
+ 		return PCI_ERS_RESULT_DISCONNECT;

linux-2.6-ppc-rtc.patch:

Index: linux-2.6-ppc-rtc.patch
===================================================================
RCS file: linux-2.6-ppc-rtc.patch
diff -N linux-2.6-ppc-rtc.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ppc-rtc.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,98 @@
+diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
+index 1e6715e..3e788b7 100644
+--- a/drivers/rtc/Kconfig
++++ b/drivers/rtc/Kconfig
+@@ -461,4 +461,12 @@ config RTC_DRV_RS5C313
+ 	help
+ 	  If you say yes here you get support for the Ricoh RS5C313 RTC chips.
+ 
++config RTC_DRV_PPC
++       tristate "PowerPC machine dependent RTC support"
++       depends on PPC_MERGE
++       help
++         The PowerPC kernel has machine-specific functions for accessing
++	 the RTC. This exposes that functionality through the generic RTC
++	 class.
++
+ endif # RTC_CLASS
+diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
+index 465db4d..e822e56 100644
+--- a/drivers/rtc/Makefile
++++ b/drivers/rtc/Makefile
+@@ -49,3 +49,4 @@ obj-$(CONFIG_RTC_DRV_TEST)	+= rtc-test.o
+ obj-$(CONFIG_RTC_DRV_V3020)	+= rtc-v3020.o
+ obj-$(CONFIG_RTC_DRV_VR41XX)	+= rtc-vr41xx.o
+ obj-$(CONFIG_RTC_DRV_X1205)	+= rtc-x1205.o
++obj-$(CONFIG_RTC_DRV_PPC)	+= rtc-ppc.o
+--- /dev/null	2007-12-03 03:08:41.854157978 +0000
++++ b/drivers/rtc/rtc-ppc.c	2007-12-03 16:56:15.000000000 +0000
+@@ -0,0 +1,69 @@
++/*
++ * RTC driver for ppc_md RTC functions
++ *
++ * © 2007 Red Hat, Inc.
++ *
++ * Author: David Woodhouse <dwmw2 at infradead.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++
++#include <linux/module.h>
++#include <linux/err.h>
++#include <linux/rtc.h>
++#include <linux/platform_device.h>
++#include <asm/machdep.h>
++
++static int ppc_rtc_read_time(struct device *dev, struct rtc_time *tm)
++{
++	ppc_md.get_rtc_time(tm);
++	return 0;
++}
++
++static int ppc_rtc_set_time(struct device *dev, struct rtc_time *tm)
++{
++	return ppc_md.set_rtc_time(tm);
++}
++
++static const struct rtc_class_ops ppc_rtc_ops = {
++	.set_time = ppc_rtc_set_time,
++	.read_time = ppc_rtc_read_time,
++};
++
++static struct rtc_device *rtc;
++static struct platform_device *ppc_rtc_pdev;
++
++static int __init ppc_rtc_init(void)
++{
++	if (!ppc_md.get_rtc_time || !ppc_md.set_rtc_time)
++		return -ENODEV;
++
++	ppc_rtc_pdev = platform_device_register_simple("ppc-rtc", 0, NULL, 0);
++	if (IS_ERR(ppc_rtc_pdev))
++		return PTR_ERR(ppc_rtc_pdev);
++
++	rtc = rtc_device_register("ppc_md", &ppc_rtc_pdev->dev,
++				  &ppc_rtc_ops, THIS_MODULE);
++	if (IS_ERR(rtc)) {
++		platform_device_unregister(ppc_rtc_pdev);
++		return PTR_ERR(rtc);
++	}
++
++	return 0;
++}
++
++static void __exit ppc_rtc_exit(void)
++{
++	rtc_device_unregister(rtc);
++	platform_device_unregister(ppc_rtc_pdev);
++}
++
++module_init(ppc_rtc_init);
++module_exit(ppc_rtc_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("David Woodhouse <dwmw2 at infradead.org>");
++MODULE_DESCRIPTION("Generic RTC class driver for PowerPC");

linux-2.6-ppc-use-libgcc.patch:

Index: linux-2.6-ppc-use-libgcc.patch
===================================================================
RCS file: linux-2.6-ppc-use-libgcc.patch
diff -N linux-2.6-ppc-use-libgcc.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ppc-use-libgcc.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,102 @@
+diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
+index 4bb023f..63e68d2 100644
+--- a/arch/powerpc/lib/Makefile
++++ b/arch/powerpc/lib/Makefile
+@@ -23,3 +23,5 @@ obj-$(CONFIG_SMP)	+= locks.o
+ endif
+ 
+ obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
++
++obj-y	+=	libgcc/
+diff --git a/arch/powerpc/lib/libgcc/Makefile b/arch/powerpc/lib/libgcc/Makefile
+new file mode 100644
+index 0000000..36d8e1e
+--- /dev/null
++++ b/arch/powerpc/lib/libgcc/Makefile
+@@ -0,0 +1,2 @@
++obj-y	+=	__divdi3.o
++obj-y	+=	__udivmoddi4.o
+diff --git a/arch/powerpc/lib/libgcc/__divdi3.c b/arch/powerpc/lib/libgcc/__divdi3.c
+new file mode 100644
+index 0000000..f23c6fe
+--- /dev/null
++++ b/arch/powerpc/lib/libgcc/__divdi3.c
+@@ -0,0 +1,23 @@
++#include "libgcc.h"
++
++s64 __divdi3(s64 num, s64 den)
++{
++	int minus = 0;
++	s64 v;
++
++	if (num < 0) {
++		num = -num;
++		minus = 1;
++	}
++	if (den < 0) {
++		den = -den;
++		minus ^= 1;
++	}
++
++	v = __udivmoddi4(num, den, NULL);
++	if (minus)
++		v = -v;
++
++	return v;
++}
++EXPORT_SYMBOL(__divdi3);
+diff --git a/arch/powerpc/lib/libgcc/__udivmoddi4.c b/arch/powerpc/lib/libgcc/__udivmoddi4.c
+new file mode 100644
+index 0000000..2df0caa
+--- /dev/null
++++ b/arch/powerpc/lib/libgcc/__udivmoddi4.c
+@@ -0,0 +1,31 @@
++#include "libgcc.h"
++
++u64 __udivmoddi4(u64 num, u64 den, u64 * rem_p)
++{
++	u64 quot = 0, qbit = 1;
++
++	if (den == 0) {
++		BUG();
++	}
++
++	/* Left-justify denominator and count shift */
++	while ((s64) den >= 0) {
++		den <<= 1;
++		qbit <<= 1;
++	}
++
++	while (qbit) {
++		if (den <= num) {
++			num -= den;
++			quot += qbit;
++		}
++		den >>= 1;
++		qbit >>= 1;
++	}
++
++	if (rem_p)
++		*rem_p = num;
++
++	return quot;
++}
++EXPORT_SYMBOL(__udivmoddi4);
+diff --git a/arch/powerpc/lib/libgcc/libgcc.h b/arch/powerpc/lib/libgcc/libgcc.h
+new file mode 100644
+index 0000000..4dd6a2e
+--- /dev/null
++++ b/arch/powerpc/lib/libgcc/libgcc.h
+@@ -0,0 +1,12 @@
++#ifndef _LIBGCC_H_
++#define _LIBGCC_H_
++
++#include <linux/types.h>
++#include <linux/module.h>
++
++/* Cribbed from klibc/libgcc/ */
++
++s64 __divdi3(s64 num, s64 den);
++u64 __udivmoddi4(u64 num, u64 den, u64 * rem_p);
++
++#endif /*_LIBGCC_H_*/

linux-2.6-ps3-legacy-bootloader-hack.patch:

Index: linux-2.6-ps3-legacy-bootloader-hack.patch
===================================================================
RCS file: linux-2.6-ps3-legacy-bootloader-hack.patch
diff -N linux-2.6-ps3-legacy-bootloader-hack.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ps3-legacy-bootloader-hack.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,37 @@
+A temporary hack to support the legacy 2.6.16 bootloader.  This will be
+removed as soon as a 2.6.22 bootloader is ready.
+
+Hacked-by: Geoff Levand <geoffrey.levand at am.sony.com>
+---
+ arch/powerpc/kernel/prom.c         |    6 ++++++
+ arch/powerpc/platforms/ps3/setup.c |    4 +++-
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+--- a/arch/powerpc/kernel/prom.c
++++ b/arch/powerpc/kernel/prom.c
+@@ -939,6 +939,12 @@ static int __init early_init_dt_scan_mem
+ 				size = 0x80000000ul - base;
+ 		}
+ #endif
++#ifdef CONFIG_PPC_PS3
++	/* temporary hack for the legacy bootloader */
++	if (of_flat_dt_is_compatible(of_get_flat_dt_root(), "PS3PF")) {
++		size = 0x8000000;
++	}
++#endif
+ 		lmb_add(base, size);
+ 	}
+ 	return 0;
+--- a/arch/powerpc/platforms/ps3/setup.c
++++ b/arch/powerpc/platforms/ps3/setup.c
+@@ -210,7 +210,9 @@ static int __init ps3_probe(void)
+ 	DBG(" -> %s:%d\n", __func__, __LINE__);
+ 
+ 	dt_root = of_get_flat_dt_root();
+-	if (!of_flat_dt_is_compatible(dt_root, "sony,ps3"))
++	if (!of_flat_dt_is_compatible(dt_root, "sony,ps3")
++		/* temporary hack for the legacy bootloader */
++		&& !of_flat_dt_is_compatible(dt_root, "PS3PF"))
+ 		return 0;
+ 
+ 	powerpc_firmware_features |= FW_FEATURE_PS3_POSSIBLE;

linux-2.6-ps3-storage-alias.patch:

Index: linux-2.6-ps3-storage-alias.patch
===================================================================
RCS file: linux-2.6-ps3-storage-alias.patch
diff -N linux-2.6-ps3-storage-alias.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ps3-storage-alias.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,7 @@
+--- linux-2.6.22.ppc64/drivers/block/ps3disk.c~	2007-07-25 16:06:16.000000000 +0100
++++ linux-2.6.22.ppc64/drivers/block/ps3disk.c	2007-07-26 08:49:44.000000000 +0100
+@@ -628,3 +628,4 @@ MODULE_LICENSE("GPL");
+ MODULE_DESCRIPTION("PS3 Disk Storage Driver");
+ MODULE_AUTHOR("Sony Corporation");
+ MODULE_ALIAS(PS3_MODULE_ALIAS_STOR_DISK);
++MODULE_ALIAS("ps3_storage");

linux-2.6-scsi-mpt-vmware-fix.patch:

Index: linux-2.6-scsi-mpt-vmware-fix.patch
===================================================================
RCS file: linux-2.6-scsi-mpt-vmware-fix.patch
diff -N linux-2.6-scsi-mpt-vmware-fix.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-scsi-mpt-vmware-fix.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,43 @@
+The attached patch is a workaround for a bug in VMWare's emulated LSI
+Fusion SCSI HBA.  The emulated firmware returns zero for the maximum
+number of attached devices; the real firmware returns a positive
+number.  Therefore, the kernel that boots and works fine on bare metal
+will fail on VMWare because this firmware value is handed to the SCSI
+midlayer, which then skips the entire bus scan.
+
+F7 bz 241935
+
+The patch below was submitted by Eric Moore of LSI to the linux-scsi
+mailing list:
+
+http://marc.info/?l=linux-scsi&m=117432237404247
+
+then immediately rejected by Christoph Hellwig, who prefers that
+VMWare fix their emulation instead.
+
+diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
+index eddb933..21fadf2 100644
+--- a/drivers/message/fusion/mptbase.c
++++ b/drivers/message/fusion/mptbase.c
+@@ -2571,8 +2571,19 @@ GetPortFacts(MPT_ADAPTER *ioc, int portnum, int sleepFlag)
+ 	pfacts->MaxPersistentIDs = le16_to_cpu(pfacts->MaxPersistentIDs);
+ 	pfacts->MaxLanBuckets = le16_to_cpu(pfacts->MaxLanBuckets);
+ 
+-	max_id = (ioc->bus_type == SAS) ? pfacts->PortSCSIID :
+-	    pfacts->MaxDevices;
++	switch (ioc->bus_type) {
++	case SAS:
++		max_id = pfacts->PortSCSIID;
++		break;
++	case FC:
++		max_id = pfacts->MaxDevices;
++		break;
++	case SPI:
++	default:
++		max_id = MPT_MAX_SCSI_DEVICES;
++		break;
++	}
++
+ 	ioc->devices_per_bus = (max_id > 255) ? 256 : max_id;
+ 	ioc->number_of_buses = (ioc->devices_per_bus < 256) ? 1 : max_id/256;
+ 

linux-2.6-smarter-relatime.patch:

Index: linux-2.6-smarter-relatime.patch
===================================================================
RCS file: linux-2.6-smarter-relatime.patch
diff -N linux-2.6-smarter-relatime.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-smarter-relatime.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,267 @@
+
+Subject: [patch] [patch] implement smarter atime updates support
+From: Ingo Molnar <mingo at elte.hu>
+
+change relatime updates to be performed once per day. This makes
+relatime a compatible solution for HSM, mailer-notification and
+tmpwatch applications too.
+
+also add the CONFIG_DEFAULT_RELATIME kernel option, which makes
+"norelatime" the default for all mounts without an extra kernel
+boot option.
+
+add the "default_relatime=0" boot option to turn this off.
+
+also add the /proc/sys/kernel/default_relatime flag which can be changed
+runtime to modify the behavior of subsequent new mounts.
+
+tested by moving the date forward:
+
+   # date
+   Sun Aug  5 22:55:14 CEST 2007
+   # date -s "Tue Aug  7 22:55:14 CEST 2007"
+   Tue Aug  7 22:55:14 CEST 2007
+
+access to a file did not generate disk IO before the date was set, and
+it generated exactly one IO after the date was set.
+
+Signed-off-by: Ingo Molnar <mingo at elte.hu>
+---
+ Documentation/kernel-parameters.txt |    8 +++++
+ fs/Kconfig                          |   22 ++++++++++++++
+ fs/inode.c                          |   53 +++++++++++++++++++++++++++---------
+ fs/namespace.c                      |   24 ++++++++++++++++
+ include/linux/mount.h               |    3 ++
+ kernel/sysctl.c                     |   17 +++++++++++
+ 6 files changed, 114 insertions(+), 13 deletions(-)
+
+Index: linux/Documentation/kernel-parameters.txt
+===================================================================
+--- linux.orig/Documentation/kernel-parameters.txt
++++ linux/Documentation/kernel-parameters.txt
+@@ -525,6 +525,10 @@ and is between 256 and 4096 characters. 
+ 			This is a 16-member array composed of values
+ 			ranging from 0-255.
+ 
++	default_relatime=
++			[FS] mount all filesystems with relative atime
++			updates by default.
++
+ 	vt.default_utf8=
+ 			[VT]
+ 			Format=<0|1>
+@@ -1468,6 +1472,10 @@ and is between 256 and 4096 characters. 
+ 			Format: <reboot_mode>[,<reboot_mode2>[,...]]
+ 			See arch/*/kernel/reboot.c or arch/*/kernel/process.c			
+ 
++	relatime_interval=
++			[FS] relative atime update frequency, in seconds.
++			(default: 1 day: 86400 seconds)
++
+ 	reserve=	[KNL,BUGS] Force the kernel to ignore some iomem area
+ 
+ 	reservetop=	[X86-32]
+--- linux-2.6.23.noarch/fs/Kconfig~	2007-10-17 17:09:10.000000000 -0400
++++ linux-2.6.23.noarch/fs/Kconfig	2007-10-17 17:10:05.000000000 -0400
+@@ -2173,6 +2173,29 @@ config 9P_FS
+ 
+ endif # NETWORK_FILESYSTEMS
+ 
++config DEFAULT_RELATIME
++	bool "Mount all filesystems with relatime by default"
++	default y
++	help
++	  If you say Y here, all your filesystems will be mounted
++	  with the "relatime" mount option. This eliminates many atime
++	  ('file last accessed' timestamp) updates (which otherwise
++	  is performed on every file access and generates a write
++	  IO to the inode) and thus speeds up IO. Atime is still updated,
++	  but only once per day.
++
++	  The mtime ('file last modified') and ctime ('file created')
++	  timestamp are unaffected by this change.
++
++	  Use the "norelatime" kernel boot option to turn off this
++	  feature.
++
++config DEFAULT_RELATIME_VAL
++	int
++	default "1" if DEFAULT_RELATIME
++	default "0"
++
++
+ if BLOCK
+ menu "Partition Types"
+ 
+Index: linux/fs/inode.c
+===================================================================
+--- linux.orig/fs/inode.c
++++ linux/fs/inode.c
+@@ -1162,6 +1162,41 @@ sector_t bmap(struct inode * inode, sect
+ }
+ EXPORT_SYMBOL(bmap);
+ 
++/*
++ * Relative atime updates frequency (default: 1 day):
++ */
++int relatime_interval __read_mostly = 24*60*60;
++
++/*
++ * With relative atime, only update atime if the
++ * previous atime is earlier than either the ctime or
++ * mtime.
++ */
++static int relatime_need_update(struct inode *inode, struct timespec now)
++{
++	/*
++	 * Is mtime younger than atime? If yes, update atime:
++	 */
++	if (timespec_compare(&inode->i_mtime, &inode->i_atime) >= 0)
++		return 1;
++	/*
++	 * Is ctime younger than atime? If yes, update atime:
++	 */
++	if (timespec_compare(&inode->i_ctime, &inode->i_atime) >= 0)
++		return 1;
++
++	/*
++	 * Is the previous atime value older than a day? If yes,
++	 * update atime:
++	 */
++	if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= relatime_interval)
++		return 1;
++	/*
++	 * Good, we can skip the atime update:
++	 */
++	return 0;
++}
++
+ /**
+  *	touch_atime	-	update the access time
+  *	@mnt: mount the inode is accessed on
+@@ -1191,22 +1226,14 @@ void touch_atime(struct vfsmount *mnt, s
+ 			return;
+ 		if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
+ 			return;
+-
+-		if (mnt->mnt_flags & MNT_RELATIME) {
+-			/*
+-			 * With relative atime, only update atime if the
+-			 * previous atime is earlier than either the ctime or
+-			 * mtime.
+-			 */
+-			if (timespec_compare(&inode->i_mtime,
+-						&inode->i_atime) < 0 &&
+-			    timespec_compare(&inode->i_ctime,
+-						&inode->i_atime) < 0)
++	}
++	now = current_fs_time(inode->i_sb);
++	if (mnt) {
++		if (mnt->mnt_flags & MNT_RELATIME)
++			if (!relatime_need_update(inode, now))
+ 				return;
+-		}
+ 	}
+ 
+-	now = current_fs_time(inode->i_sb);
+ 	if (timespec_equal(&inode->i_atime, &now))
+ 		return;
+ 
+Index: linux/fs/namespace.c
+===================================================================
+--- linux.orig/fs/namespace.c
++++ linux/fs/namespace.c
+@@ -1107,6 +1107,7 @@ int do_add_mount(struct vfsmount *newmnt
+ 		goto unlock;
+ 
+ 	newmnt->mnt_flags = mnt_flags;
++
+ 	if ((err = graft_tree(newmnt, nd)))
+ 		goto unlock;
+ 
+@@ -1362,6 +1363,24 @@ int copy_mount_options(const void __user
+ }
+ 
+ /*
++ * Allow users to disable (or enable) atime updates via a .config
++ * option or via the boot line, or via /proc/sys/fs/default_relatime:
++ */
++int default_relatime __read_mostly = CONFIG_DEFAULT_RELATIME_VAL;
++
++static int __init set_default_relatime(char *str)
++{
++	get_option(&str, &default_relatime);
++
++	printk(KERN_INFO "Mount all filesystems with"
++		"default relative atime updates: %s.\n",
++		default_relatime ? "enabled" : "disabled");
++
++	return 1;
++}
++__setup("default_relatime=", set_default_relatime);
++
++/*
+  * Flags is a 32-bit value that allows up to 31 non-fs dependent flags to
+  * be given to the mount() call (ie: read-only, no-dev, no-suid etc).
+  *
+@@ -1409,6 +1428,11 @@ long do_mount(char *dev_name, char *dir_
+ 		mnt_flags |= MNT_NODIRATIME;
+ 	if (flags & MS_RELATIME)
+ 		mnt_flags |= MNT_RELATIME;
++	else if (default_relatime &&
++				!(flags & (MNT_NOATIME | MNT_NODIRATIME))) {
++		mnt_flags |= MNT_RELATIME;
++		flags |= MS_RELATIME;
++	}
+ 
+ 	flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE |
+ 		   MS_NOATIME | MS_NODIRATIME | MS_RELATIME);
+Index: linux/include/linux/mount.h
+===================================================================
+--- linux.orig/include/linux/mount.h
++++ linux/include/linux/mount.h
+@@ -103,5 +103,8 @@ extern void shrink_submounts(struct vfsm
+ extern spinlock_t vfsmount_lock;
+ extern dev_t name_to_dev_t(char *name);
+ 
++extern int default_relatime;
++extern int relatime_interval;
++
+ #endif
+ #endif /* _LINUX_MOUNT_H */
+Index: linux/kernel/sysctl.c
+===================================================================
+--- linux.orig/kernel/sysctl.c
++++ linux/kernel/sysctl.c
+@@ -30,6 +30,7 @@
+ #include <linux/capability.h>
+ #include <linux/smp_lock.h>
+ #include <linux/fs.h>
++#include <linux/mount.h>
+ #include <linux/init.h>
+ #include <linux/kernel.h>
+ #include <linux/kobject.h>
+@@ -1206,6 +1207,22 @@ static ctl_table fs_table[] = {
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec,
+ 	},
++	{
++		.ctl_name	= CTL_UNNUMBERED,
++		.procname	= "default_relatime",
++		.data		= &default_relatime,
++		.maxlen		= sizeof(int),
++		.mode		= 0644,
++		.proc_handler	= &proc_dointvec,
++	},
++	{
++		.ctl_name	= CTL_UNNUMBERED,
++		.procname	= "relatime_interval",
++		.data		= &relatime_interval,
++		.maxlen		= sizeof(int),
++		.mode		= 0644,
++		.proc_handler	= &proc_dointvec,
++	},
+ #if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
+ 	{
+ 		.ctl_name	= CTL_UNNUMBERED,
+

linux-2.6-usb-ehci-hcd-respect-nousb.patch:

Index: linux-2.6-usb-ehci-hcd-respect-nousb.patch
===================================================================
RCS file: linux-2.6-usb-ehci-hcd-respect-nousb.patch
diff -N linux-2.6-usb-ehci-hcd-respect-nousb.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-usb-ehci-hcd-respect-nousb.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,20 @@
+Make the EHCI host driver respect the "nousb" kernel option.
+
+Signed-off-by: Chuck Ebbert <cebbert at redhat.com>
+
+---
+ drivers/usb/host/ehci-hcd.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- linux-2.6.23.noarch.orig/drivers/usb/host/ehci-hcd.c
++++ linux-2.6.23.noarch/drivers/usb/host/ehci-hcd.c
+@@ -973,6 +973,9 @@ static int __init ehci_hcd_init(void)
+ {
+ 	int retval = 0;
+ 
++	if (usb_disabled())
++		return -ENODEV;
++
+ 	pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
+ 		 hcd_name,
+ 		 sizeof(struct ehci_qh), sizeof(struct ehci_qtd),

linux-2.6-utrace-ptrace-compat-avr32.patch:

Index: linux-2.6-utrace-ptrace-compat-avr32.patch
===================================================================
RCS file: linux-2.6-utrace-ptrace-compat-avr32.patch
diff -N linux-2.6-utrace-ptrace-compat-avr32.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-utrace-ptrace-compat-avr32.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,137 @@
+[PATCH 4d] utrace: avr32 ptrace compatibility
+
+From: Haavard Skinnemoen <hskinnemoen at atmel.com>
+
+Rip out most of the ptrace code for AVR32 and replace it with the much
+nicer utrace stuff.  It builds in all possible combinations of
+CONFIG_UTRACE and CONFIG_PTRACE, and it seems to work as far as I've tested
+it with strace and some simple debugging with gdb.
+
+Signed-off-by: Haavard Skinnemoen <hskinnemoen at atmel.com>
+Signed-off-by: Roland McGrath <roland at redhat.com>
+
+---
+
+ arch/avr32/kernel/ptrace.c |   91 +++++++++-----------------------------------
+ 1 files changed, 19 insertions(+), 72 deletions(-)
+
+--- linux-2.6/arch/avr32/kernel/ptrace.c
++++ linux-2.6/arch/avr32/kernel/ptrace.c
+@@ -112,98 +112,45 @@ const struct utrace_regset_view *utrace_
+ }
+ #endif /* CONFIG_UTRACE */
+ 
++#ifdef CONFIG_PTRACE
+ 
+-#if 0
+-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
++static const struct ptrace_layout_segment avr32_uarea[] = {
++	{ 0, ELF_NGREG * sizeof(long), 0, 0 },
++	{ 0, 0, -1, 0 },
++};
++
++int arch_ptrace(long *request, struct task_struct *child,
++		struct utrace_attached_engine *engine,
++		unsigned long addr, unsigned long data, long *val)
+ {
+-	int ret;
++	pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n",
++		 *request, child->pid, addr, data);
+ 
+ 	pr_debug("ptrace: Enabling monitor mode...\n");
+ 	ocd_write(DC, ocd_read(DC) | (1 << OCD_DC_MM_BIT)
+ 			| (1 << OCD_DC_DBE_BIT));
+ 
+-	switch (request) {
+-	/* Read the word at location addr in the child process */
+-	case PTRACE_PEEKTEXT:
+-	case PTRACE_PEEKDATA:
+-		ret = generic_ptrace_peekdata(child, addr, data);
+-		break;
+-
++	switch (*request) {
+ 	case PTRACE_PEEKUSR:
+-		ret = ptrace_read_user(child, addr,
+-				       (unsigned long __user *)data);
+-		break;
+-
+-	/* Write the word in data at location addr */
+-	case PTRACE_POKETEXT:
+-	case PTRACE_POKEDATA:
+-		ret = generic_ptrace_pokedata(child, addr, data);
+-		break;
++		return ptrace_peekusr(child, engine, avr32_uarea, addr, data);
+ 
+ 	case PTRACE_POKEUSR:
+-		ret = ptrace_write_user(child, addr, data);
+-		break;
+-
+-	/* continue and stop at next (return from) syscall */
+-	case PTRACE_SYSCALL:
+-	/* restart after signal */
+-	case PTRACE_CONT:
+-		ret = -EIO;
+-		if (!valid_signal(data))
+-			break;
+-		if (request == PTRACE_SYSCALL)
+-			set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+-		else
+-			clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+-		child->exit_code = data;
+-		/* XXX: Are we sure no breakpoints are active here? */
+-		wake_up_process(child);
+-		ret = 0;
+-		break;
+-
+-	/*
+-	 * Make the child exit. Best I can do is send it a
+-	 * SIGKILL. Perhaps it should be put in the status that it
+-	 * wants to exit.
+-	 */
+-	case PTRACE_KILL:
+-		ret = 0;
+-		if (child->exit_state == EXIT_ZOMBIE)
+-			break;
+-		child->exit_code = SIGKILL;
+-		wake_up_process(child);
+-		break;
+-
+-	/*
+-	 * execute single instruction.
+-	 */
+-	case PTRACE_SINGLESTEP:
+-		ret = -EIO;
+-		if (!valid_signal(data))
+-			break;
+-		clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+-		ptrace_single_step(child);
+-		child->exit_code = data;
+-		wake_up_process(child);
+-		ret = 0;
++		return ptrace_pokeusr(child, engine, avr32_uarea, addr, data);
+ 		break;
+ 
+ 	case PTRACE_GETREGS:
+-		ret = ptrace_getregs(child, (void __user *)data);
++		return ptrace_whole_regset(child, engine, data, 0, 0);
+ 		break;
+ 
+ 	case PTRACE_SETREGS:
+-		ret = ptrace_setregs(child, (const void __user *)data);
+-		break;
+-
+-	default:
+-		ret = ptrace_request(child, request, addr, data);
++		return ptrace_whole_regset(child, engine, data, 0, 1);
+ 		break;
+ 	}
+ 
+-	return ret;
++	return -ENOSYS;
+ }
+-#endif
++#endif /* CONFIG_PTRACE */
++#endif /* CONFIG_UTRACE */
+ 
+ asmlinkage void syscall_trace(struct pt_regs *regs, int is_exit)
+ {

linux-2.6-utrace-regset-avr32.patch:

Index: linux-2.6-utrace-regset-avr32.patch
===================================================================
RCS file: linux-2.6-utrace-regset-avr32.patch
diff -N linux-2.6-utrace-regset-avr32.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-utrace-regset-avr32.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,159 @@
+[PATCH 2d] utrace: avr32 regset support
+
+From: Haavard Skinnemoen <hskinnemoen at atmel.com>
+
+Rip out most of the ptrace code for AVR32 and replace it with the much
+nicer utrace stuff.
+
+CC: Haavard Skinnemoen <hskinnemoen at atmel.com>
+Signed-off-by: Roland McGrath <roland at redhat.com>
+
+---
+
+ arch/avr32/kernel/ptrace.c |  111 +++++++++++++++++---------------------------
+ 1 files changed, 44 insertions(+), 67 deletions(-)
+
+--- linux-2.6/arch/avr32/kernel/ptrace.c
++++ linux-2.6/arch/avr32/kernel/ptrace.c
+@@ -14,10 +14,14 @@
+ #include <linux/ptrace.h>
+ #include <linux/errno.h>
+ #include <linux/user.h>
++#include <linux/tracehook.h>
+ 
++#include <asm/tracehook.h>
+ #include <asm/mmu_context.h>
+ #include <linux/kdebug.h>
+ 
++#ifdef CONFIG_UTRACE
++
+ static struct pt_regs *get_user_regs(struct task_struct *tsk)
+ {
+ 	return (struct pt_regs *)((unsigned long)task_stack_page(tsk) +
+@@ -57,86 +61,59 @@ void ptrace_disable(struct task_struct *
+ 	clear_tsk_thread_flag(child, TIF_BREAKPOINT);
+ }
+ 
+-/*
+- * Read the word at offset "offset" into the task's "struct user". We
+- * actually access the pt_regs struct stored on the kernel stack.
+- */
+-static int ptrace_read_user(struct task_struct *tsk, unsigned long offset,
+-			    unsigned long __user *data)
++static int genregs_get(struct task_struct *target,
++		       const struct utrace_regset *regset,
++		       unsigned int pos, unsigned int count,
++		       void *kbuf, void __user *ubuf)
+ {
+-	unsigned long *regs;
+-	unsigned long value;
+-
+-	if (offset & 3 || offset >= sizeof(struct user)) {
+-		printk("ptrace_read_user: invalid offset 0x%08lx\n", offset);
+-		return -EIO;
+-	}
+-
+-	regs = (unsigned long *)get_user_regs(tsk);
+-
+-	value = 0;
+-	if (offset < sizeof(struct pt_regs))
+-		value = regs[offset / sizeof(regs[0])];
++	struct pt_regs *regs = get_user_regs(target);
+ 
+-	pr_debug("ptrace_read_user(%s[%u], %#lx, %p) -> %#lx\n",
+-		 tsk->comm, tsk->pid, offset, data, value);
+-
+-	return put_user(value, data);
++	return utrace_regset_copyout(&pos, &count, &kbuf, &ubuf,
++				     regs, 0, -1);
+ }
+ 
+-/*
+- * Write the word "value" to offset "offset" into the task's "struct
+- * user". We actually access the pt_regs struct stored on the kernel
+- * stack.
+- */
+-static int ptrace_write_user(struct task_struct *tsk, unsigned long offset,
+-			     unsigned long value)
++static int genregs_set(struct task_struct *target,
++		       const struct utrace_regset *regset,
++		       unsigned int pos, unsigned int count,
++		       const void *kbuf, const void __user *ubuf)
+ {
+-	unsigned long *regs;
+-
+-	pr_debug("ptrace_write_user(%s[%u], %#lx, %#lx)\n",
+-			tsk->comm, tsk->pid, offset, value);
+-
+-	if (offset & 3 || offset >= sizeof(struct user)) {
+-		pr_debug("  invalid offset 0x%08lx\n", offset);
+-		return -EIO;
+-	}
+-
+-	if (offset >= sizeof(struct pt_regs))
+-		return 0;
++	struct pt_regs *regs = get_user_regs(target);
+ 
+-	regs = (unsigned long *)get_user_regs(tsk);
+-	regs[offset / sizeof(regs[0])] = value;
+-
+-	return 0;
++	return utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
++				    regs, 0, -1);
+ }
+ 
+-static int ptrace_getregs(struct task_struct *tsk, void __user *uregs)
+-{
+-	struct pt_regs *regs = get_user_regs(tsk);
++static const struct utrace_regset native_regsets[] = {
++	{
++		.core_note_type = NT_PRSTATUS,
++		.n	= ELF_NGREG,
++		.size	= sizeof(long),
++		.align	= sizeof(long),
++		.get	= genregs_get,
++		.set	= genregs_set,
++	},
++	/*
++	 * Other register sets that probably would make sense:
++	 *   - Coprocessor registers (8 coprocs with 16 registers each)
++	 *   - TLS stuff
++	 */
++};
+ 
+-	return copy_to_user(uregs, regs, sizeof(*regs)) ? -EFAULT : 0;
+-}
++static const struct utrace_regset_view utrace_avr32_native_view = {
++	.name		= UTS_MACHINE,
++	.e_machine	= ELF_ARCH,
++	.regsets	= native_regsets,
++	.n		= ARRAY_SIZE(native_regsets),
++};
+ 
+-static int ptrace_setregs(struct task_struct *tsk, const void __user *uregs)
++const struct utrace_regset_view *utrace_native_view(struct task_struct *tsk)
+ {
+-	struct pt_regs newregs;
+-	int ret;
+-
+-	ret = -EFAULT;
+-	if (copy_from_user(&newregs, uregs, sizeof(newregs)) == 0) {
+-		struct pt_regs *regs = get_user_regs(tsk);
+-
+-		ret = -EINVAL;
+-		if (valid_user_regs(&newregs)) {
+-			*regs = newregs;
+-			ret = 0;
+-		}
+-	}
+-
+-	return ret;
++	return &utrace_avr32_native_view;
+ }
++#endif /* CONFIG_UTRACE */
++
+ 
++#if 0
+ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+ {
+ 	int ret;

linux-2.6-utrace-tracehook-avr32.patch:

Index: linux-2.6-utrace-tracehook-avr32.patch
===================================================================
RCS file: linux-2.6-utrace-tracehook-avr32.patch
diff -N linux-2.6-utrace-tracehook-avr32.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-utrace-tracehook-avr32.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -0,0 +1,205 @@
+[PATCH 1e] utrace: tracehook for AVR32
+
+From: Haavard Skinnemoen <hskinnemoen at atmel.com>
+
+This patch does the initial tracehook conversion for AVR32.
+
+Signed-off-by: Haavard Skinnemoen <hskinnemoen at atmel.com>
+Signed-off-by: Roland McGrath <roland at redhat.com>
+
+---
+
+ arch/avr32/kernel/ptrace.c       |   50 +++++++++++++++----------------
+ arch/avr32/kernel/process.c      |    2 -
+ arch/avr32/kernel/entry-avr32b.S |   10 +++++-
+ include/asm-avr32/tracehook.h    |   62 ++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 94 insertions(+), 30 deletions(-)
+ create include/asm-avr32/tracehook.h
+
+--- linux-2.6/arch/avr32/kernel/ptrace.c
++++ linux-2.6/arch/avr32/kernel/ptrace.c
+@@ -5,20 +5,16 @@
+  * it under the terms of the GNU General Public License version 2 as
+  * published by the Free Software Foundation.
+  */
+-#undef DEBUG
++#include <linux/compile.h>
++#include <linux/elf.h>
++#include <linux/errno.h>
+ #include <linux/kernel.h>
+ #include <linux/sched.h>
+ #include <linux/mm.h>
+ #include <linux/ptrace.h>
+ #include <linux/errno.h>
+ #include <linux/user.h>
+-#include <linux/security.h>
+-#include <linux/unistd.h>
+-#include <linux/notifier.h>
+-
+-#include <asm/traps.h>
+-#include <asm/uaccess.h>
+-#include <asm/ocd.h>
++
+ #include <asm/mmu_context.h>
+ #include <linux/kdebug.h>
+ 
+@@ -28,6 +24,7 @@ static struct pt_regs *get_user_regs(str
+ 				  THREAD_SIZE - sizeof(struct pt_regs));
+ }
+ 
++#if 0
+ static void ptrace_single_step(struct task_struct *tsk)
+ {
+ 	pr_debug("ptrace_single_step: pid=%u, PC=0x%08lx, SR=0x%08lx\n",
+@@ -229,30 +226,31 @@ long arch_ptrace(struct task_struct *chi
+ 
+ 	return ret;
+ }
++#endif
+ 
+-asmlinkage void syscall_trace(void)
++asmlinkage void syscall_trace(struct pt_regs *regs, int is_exit)
+ {
+ 	if (!test_thread_flag(TIF_SYSCALL_TRACE))
+ 		return;
+-	if (!(current->ptrace & PT_PTRACED))
+-		return;
+ 
+-	/* 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));
++	tracehook_report_syscall(regs, is_exit);
++}
+ 
+-	/*
+-	 * this isn't the same as continuing with a signal, but it
+-	 * will do for normal use.  strace only continues with a
+-	 * signal if the stopping signal is not SIGTRAP.  -brl
+-	 */
+-	if (current->exit_code) {
+-		pr_debug("syscall_trace: sending signal %d to PID %u\n",
+-			 current->exit_code, current->pid);
+-		send_sig(current->exit_code, current, 1);
+-		current->exit_code = 0;
+-	}
++/*
++ * Handle hitting a breakpoint
++ */
++static void do_breakpoint(struct task_struct *tsk, struct pt_regs *regs)
++{
++	siginfo_t info;
++
++	info.si_signo = SIGTRAP;
++	info.si_errno = 0;
++	info.si_code  = TRAP_BRKPT;
++	info.si_addr  = (void __user *)instruction_pointer(regs);
++
++	pr_debug("ptrace_break: Sending SIGTRAP to PID %u (pc = 0x%p)\n",
++		 tsk->pid, info.si_addr);
++	force_sig_info(SIGTRAP, &info, tsk);
+ }
+ 
+ /*
+--- linux-2.6/arch/avr32/kernel/process.c
++++ linux-2.6/arch/avr32/kernel/process.c
+@@ -383,8 +383,6 @@ asmlinkage int sys_execve(char __user *u
+ 		goto out;
+ 
+ 	error = do_execve(filename, uargv, uenvp, regs);
+-	if (error == 0)
+-		current->ptrace &= ~PT_DTRACE;
+ 	putname(filename);
+ 
+ out:
+--- linux-2.6/arch/avr32/kernel/entry-avr32b.S
++++ linux-2.6/arch/avr32/kernel/entry-avr32b.S
+@@ -230,15 +230,21 @@ ret_from_fork:
+ 	rjmp    syscall_exit_cont
+ 
+ syscall_trace_enter:
+-	pushm	r8-r12
++	mov	r12, sp		/* regs		*/
++	mov	r11, 0		/* is_exit	*/
+ 	rcall	syscall_trace
+-	popm	r8-r12
++
++	/* syscall_trace may update r8, so reload r8-r12 from regs. */
++	sub	lr, sp, -REG_R12
++	ldm	lr, r8-r12
+ 	rjmp	syscall_trace_cont
+ 
+ syscall_exit_work:
+ 	bld	r1, TIF_SYSCALL_TRACE
+ 	brcc	1f
+ 	unmask_interrupts
++	mov	r12, sp
++	mov	r11, 1
+ 	rcall	syscall_trace
+ 	mask_interrupts
+ 	ld.w	r1, r0[TI_flags]
+--- linux-2.6/include/asm-avr32/tracehook.h
++++ linux-2.6/include/asm-avr32/tracehook.h
+@@ -0,0 +1,62 @@
++/*
++ * Tracing hooks for AVR32
++ *
++ * Copyright (C) 2007 Atmel Corporation
++ *
++ * 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 _ASM_AVR32_TRACEHOOK_H
++#define _ASM_AVR32_TRACEHOOK_H
++
++#include <linux/sched.h>
++
++#define ARCH_HAS_SINGLE_STEP	1
++
++static inline void tracehook_enable_single_step(struct task_struct *tsk)
++{
++	/*
++	 * If the process is stopped in debug mode, simply set
++	 * TIF_SINGLE_STEP to tell the monitor code to set the single
++	 * step bit in DC before returning.
++	 *
++	 * Otherwise, we need to set a breakpoint at the return
++	 * address before returning to userspace. TIF_BREAKPOINT will
++	 * tell the syscall/exception exit code to do this.
++	 */
++	if (!(tsk->thread.cpu_context.sr & SR_D))
++		set_tsk_thread_flag(tsk, TIF_BREAKPOINT);
++
++	set_tsk_thread_flag(tsk, TIF_SINGLE_STEP);
++}
++
++static inline void tracehook_disable_single_step(struct task_struct *tsk)
++{
++	clear_tsk_thread_flag(tsk, TIF_BREAKPOINT);
++	clear_tsk_thread_flag(tsk, TIF_SINGLE_STEP);
++}
++
++static inline int tracehook_single_step_enabled(struct task_struct *tsk)
++{
++	return test_tsk_thread_flag(tsk, TIF_SINGLE_STEP);
++}
++
++static inline void tracehook_enable_syscall_trace(struct task_struct *tsk)
++{
++	set_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
++}
++
++static inline void tracehook_disable_syscall_trace(struct task_struct *tsk)
++{
++	clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
++}
++
++static inline void tracehook_abort_syscall(struct pt_regs *regs)
++{
++	/* Invalid system call number => return -ENOSYS */
++	regs->r8 = -1;
++}
++
++
++#endif /* _ASM_AVR32_TRACEHOOK_H */

linux-2.6-uvcvideo.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 linux-2.6-uvcvideo.patch
Index: linux-2.6-uvcvideo.patch
===================================================================
RCS file: linux-2.6-uvcvideo.patch
diff -N linux-2.6-uvcvideo.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-uvcvideo.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,6928 @@
+diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
+index c9f14bf..19acd71 100644
+--- a/drivers/media/video/Kconfig
++++ b/drivers/media/video/Kconfig
+@@ -718,6 +718,7 @@ source "drivers/media/video/em28xx/Kconfig"
+ source "drivers/media/video/usbvision/Kconfig"
+ 
+ source "drivers/media/video/usbvideo/Kconfig"
++source "drivers/media/video/uvcvideo/Kconfig"
+ 
+ source "drivers/media/video/et61x251/Kconfig"
+ 
+diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
+index b5a0641..91033cf 100644
+--- a/drivers/media/video/Makefile
++++ b/drivers/media/video/Makefile
+@@ -123,6 +123,8 @@ obj-$(CONFIG_USB_KONICAWC)      += usbvideo/
+ obj-$(CONFIG_USB_VICAM)         += usbvideo/
+ obj-$(CONFIG_USB_QUICKCAM_MESSENGER)	+= usbvideo/
+ 
++obj-$(CONFIG_USB_UVCVIDEO)	+= uvcvideo/
++
+ obj-$(CONFIG_VIDEO_IVTV) += ivtv/
+ 
+ obj-$(CONFIG_VIDEO_VIVI) += vivi.o
+diff --git a/drivers/media/video/uvcvideo/Kconfig b/drivers/media/video/uvcvideo/Kconfig
+new file mode 100644
+index 0000000..dccaab7
+--- /dev/null
++++ b/drivers/media/video/uvcvideo/Kconfig
+@@ -0,0 +1,7 @@
++config USB_UVCVIDEO
++	tristate "USB Video class device (uvcvideo) driver"
++	---help---
++	Say M or Y here to enable support for USB video devices that
++	conform to the USB video class device specification.
++	.
++	If unsure, jump up and down and look confused.
+diff --git a/drivers/media/video/uvcvideo/Makefile b/drivers/media/video/uvcvideo/Makefile
+new file mode 100644
+index 0000000..ada681c
+--- /dev/null
++++ b/drivers/media/video/uvcvideo/Makefile
+@@ -0,0 +1,2 @@
++obj-$(CONFIG_USB_UVCVIDEO)	:= uvcvideo.o
++uvcvideo-objs   := uvc_driver.o uvc_queue.o uvc_v4l2.o uvc_video.o uvc_ctrl.o uvc_status.o uvc_isight.o
+diff --git a/drivers/media/video/uvcvideo/uvc_compat.h b/drivers/media/video/uvcvideo/uvc_compat.h
+new file mode 100644
+index 0000000..321f3d3
+--- /dev/null
++++ b/drivers/media/video/uvcvideo/uvc_compat.h
+@@ -0,0 +1,263 @@
++#ifndef _UVC_COMPAT_H
++#define _UVC_COMPAT_H
++
++#include <linux/version.h>
++
++#ifndef __KERNEL__
++#ifndef __user
++#define __user
++#endif
++#endif
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
++/*
++ * Extended control API
++ */
++struct v4l2_ext_control
++{
++	__u32 id;
++	__u32 reserved2[2];
++	union {
++		__s32 value;
++		__s64 value64;
++		void *reserved;
++	};
++} __attribute__ ((packed));
++
++struct v4l2_ext_controls
++{
++	__u32 ctrl_class;
++	__u32 count;
++	__u32 error_idx;
++	__u32 reserved[2];
++	struct v4l2_ext_control *controls;
++};
++
++/* Values for ctrl_class field */
++#define V4L2_CTRL_CLASS_USER		0x00980000	/* Old-style 'user' controls */
++#define V4L2_CTRL_CLASS_MPEG		0x00990000	/* MPEG-compression controls */
++
++#define V4L2_CTRL_ID_MASK		(0x0fffffff)
++#define V4L2_CTRL_ID2CLASS(id)		((id) & 0x0fff0000UL)
++#define V4L2_CTRL_DRIVER_PRIV(id)	(((id) & 0xffff) >= 0x1000)
++
++/* Control flags */
++#define V4L2_CTRL_FLAG_READ_ONLY	0x0004
++#define V4L2_CTRL_FLAG_UPDATE		0x0008
++#define V4L2_CTRL_FLAG_INACTIVE		0x0010
++#define V4L2_CTRL_FLAG_SLIDER		0x0020
++
++/* Query flags, to be ORed with the control ID */
++#define V4L2_CTRL_FLAG_NEXT_CTRL	0x80000000
++
++/* User-class control IDs defined by V4L2 */
++#undef	V4L2_CID_BASE
++#define V4L2_CID_BASE			(V4L2_CTRL_CLASS_USER | 0x900)
++#define V4L2_CID_USER_BASE		V4L2_CID_BASE
++#define V4L2_CID_USER_CLASS		(V4L2_CTRL_CLASS_USER | 1)
++	
++#define VIDIOC_G_EXT_CTRLS		_IOWR ('V', 71, struct v4l2_ext_controls)
++#define VIDIOC_S_EXT_CTRLS		_IOWR ('V', 72, struct v4l2_ext_controls)
++#define VIDIOC_TRY_EXT_CTRLS		_IOWR ('V', 73, struct v4l2_ext_controls)
++
++#endif
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++/*
++ * Frame size and frame rate enumeration
++ *
++ * Included in Linux 2.6.19
++ */
++enum v4l2_frmsizetypes
++{
++	V4L2_FRMSIZE_TYPE_DISCRETE	= 1,
++	V4L2_FRMSIZE_TYPE_CONTINUOUS	= 2,
++	V4L2_FRMSIZE_TYPE_STEPWISE	= 3,
++};
++
++struct v4l2_frmsize_discrete
++{
++	__u32			width;		/* Frame width [pixel] */
++	__u32			height;		/* Frame height [pixel] */
++};
++
++struct v4l2_frmsize_stepwise
++{
++	__u32			min_width;	/* Minimum frame width [pixel] */
++	__u32			max_width;	/* Maximum frame width [pixel] */
++	__u32			step_width;	/* Frame width step size [pixel] */
++	__u32			min_height;	/* Minimum frame height [pixel] */
++	__u32			max_height;	/* Maximum frame height [pixel] */
++	__u32			step_height;	/* Frame height step size [pixel] */
++};
++
++struct v4l2_frmsizeenum
++{
++	__u32			index;		/* Frame size number */
++	__u32			pixel_format;	/* Pixel format */
++	__u32			type;		/* Frame size type the device supports. */
++
++        union {					/* Frame size */
++		struct v4l2_frmsize_discrete	discrete;
++		struct v4l2_frmsize_stepwise	stepwise;
++	};
++
++	__u32   reserved[2];			/* Reserved space for future use */
++};
++
++enum v4l2_frmivaltypes
++{
++	V4L2_FRMIVAL_TYPE_DISCRETE	= 1,
++	V4L2_FRMIVAL_TYPE_CONTINUOUS	= 2,
++	V4L2_FRMIVAL_TYPE_STEPWISE	= 3,
++};
++
++struct v4l2_frmival_stepwise
++{
++	struct v4l2_fract	min;		/* Minimum frame interval [s] */
++	struct v4l2_fract	max;		/* Maximum frame interval [s] */
++	struct v4l2_fract	step;		/* Frame interval step size [s] */
++};
++
++struct v4l2_frmivalenum
++{
++	__u32			index;		/* Frame format index */
++	__u32			pixel_format;	/* Pixel format */
++	__u32			width;		/* Frame width */
++	__u32			height;		/* Frame height */
++	__u32			type;		/* Frame interval type the device supports. */
++
++	union {					/* Frame interval */
++		struct v4l2_fract		discrete;
++		struct v4l2_frmival_stepwise	stepwise;
++	};
++
++	__u32	reserved[2];			/* Reserved space for future use */
++};
++
++#define VIDIOC_ENUM_FRAMESIZES		_IOWR ('V', 74, struct v4l2_frmsizeenum)
++#define VIDIOC_ENUM_FRAMEINTERVALS	_IOWR ('V', 75, struct v4l2_frmivalenum)
++#endif
++
[...6535 lines suppressed...]
++	/* Video streaming object, must always be non-NULL. */
++	struct uvc_streaming *streaming;
++
++	void (*decode) (struct urb *urb, struct uvc_video_device *video,
++			struct uvc_buffer *buf);
++
++	/* Context data used by the bulk completion handler. */
++	struct {
++		__u8 header[256];
++		unsigned int header_size;
++		int skip_payload;
++		__u32 payload_size;
++		__u32 max_payload_size;
++	} bulk;
++
++	struct urb *urb[UVC_URBS];
++	char *urb_buffer[UVC_URBS];
++
++	__u8 last_fid;
++};
++
++enum uvc_device_state {
++	UVC_DEV_DISCONNECTED = 1,
++};
++
++struct uvc_device {
++	struct usb_device *udev;
++	struct usb_interface *intf;
++	__u32 quirks;
++	int intfnum;
++
++	enum uvc_device_state state;
++	struct kref kref;
++	struct list_head list;
++
++	/* Video control interface */
++	__u16 uvc_version;
++	__u32 clock_frequency;
++
++	struct list_head entities;
++
++	struct uvc_video_device video;
++
++	/* Status Interrupt Endpoint */
++	struct usb_host_endpoint *int_ep;
++	struct urb *int_urb;
++	__u8 status[16];
++
++	/* Video Streaming interfaces */
++	struct list_head streaming;
++};
++
++enum uvc_handle_state {
++	UVC_HANDLE_PASSIVE	= 0,
++	UVC_HANDLE_ACTIVE	= 1,
++};
++
++struct uvc_fh {
++	struct uvc_video_device *device;
++	enum uvc_handle_state state;
++};
++
++struct uvc_driver {
++	struct usb_driver driver;
++
++	struct mutex open_mutex;	/* protects from open/disconnect race */
++
++	struct list_head devices;	/* struct uvc_device list */
++	struct list_head controls;	/* struct uvc_control_info list */
++	struct mutex ctrl_mutex;	/* protects controls and devices lists */
++};
++
++/* ------------------------------------------------------------------------
++ * Debugging, printing and logging
++ */
++
++#define UVC_TRACE_PROBE		(1 << 0)
++#define UVC_TRACE_DESCR		(1 << 1)
++#define UVC_TRACE_CONTROL	(1 << 2)
++#define UVC_TRACE_FORMAT	(1 << 3)
++#define UVC_TRACE_CAPTURE	(1 << 4)
++#define UVC_TRACE_CALLS		(1 << 5)
++#define UVC_TRACE_IOCTL		(1 << 6)
++#define UVC_TRACE_FRAME		(1 << 7)
++#define UVC_TRACE_SUSPEND	(1 << 8)
++#define UVC_TRACE_STATUS	(1 << 9)
++
++extern unsigned int uvc_trace_param;
++
++#define uvc_trace(flag, msg...) \
++	do { \
++		if (uvc_trace_param & flag) \
++			printk(KERN_DEBUG "uvcvideo: " msg); \
++	} while(0)
++
++#define uvc_printk(level, msg...) \
++	printk(level "uvcvideo: " msg)
++
++#define UVC_GUID_FORMAT "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x"
++#define UVC_GUID_ARGS(guid) \
++        (guid)[3],  (guid)[2],  (guid)[1],  (guid)[0], \
++        (guid)[5],  (guid)[4], \
++        (guid)[7],  (guid)[6], \
++        (guid)[8],  (guid)[9], \
++        (guid)[10], (guid)[11], (guid)[12], \
++        (guid)[13], (guid)[14], (guid)[15]
++
++/* --------------------------------------------------------------------------
++ * Internal functions.
++ */
++
++/* Core driver */
++extern struct uvc_driver uvc_driver;
++extern void uvc_delete(struct kref *kref);
++
++/* Video buffers queue management. */
++extern void uvc_queue_init(struct uvc_video_queue *queue);
++extern int uvc_alloc_buffers(struct uvc_video_queue *queue,
++		unsigned int nbuffers, unsigned int buflength);
++extern int uvc_free_buffers(struct uvc_video_queue *queue);
++extern void uvc_query_buffer(struct uvc_buffer *buf,
++		struct v4l2_buffer *v4l2_buf);
++extern int uvc_queue_buffer(struct uvc_video_queue *queue,
++		struct v4l2_buffer *v4l2_buf);
++extern int uvc_dequeue_buffer(struct uvc_video_queue *queue,
++		struct v4l2_buffer *v4l2_buf, int nonblocking);
++extern int uvc_queue_enable(struct uvc_video_queue *queue, int enable);
++extern void uvc_queue_cancel(struct uvc_video_queue *queue);
++extern struct uvc_buffer *uvc_queue_next_buffer(struct uvc_video_queue *queue,
++		struct uvc_buffer *buf);
++
++/* V4L2 interface */
++extern struct file_operations uvc_fops;
++
++/* Video */
++extern int uvc_video_init(struct uvc_video_device *video);
++extern int uvc_video_suspend(struct uvc_video_device *video);
++extern int uvc_video_resume(struct uvc_video_device *video);
++extern int uvc_video_enable(struct uvc_video_device *video, int enable);
++extern int uvc_probe_video(struct uvc_video_device *video,
++		struct uvc_streaming_control *probe);
++extern int uvc_query_ctrl(struct uvc_device *dev, __u8 query, __u8 unit,
++		__u8 intfnum, __u8 cs, void *data, __u16 size);
++extern int uvc_set_video_ctrl(struct uvc_video_device *video,
++		struct uvc_streaming_control *ctrl, int probe);
++
++/* Status */
++extern int uvc_status_init(struct uvc_device *dev);
++extern void uvc_status_cleanup(struct uvc_device *dev);
++extern int uvc_status_suspend(struct uvc_device *dev);
++extern int uvc_status_resume(struct uvc_device *dev);
++
++/* Controls */
++extern struct uvc_control *uvc_find_control(struct uvc_video_device *video,
++		__u32 v4l2_id, struct uvc_control_mapping **mapping);
++extern int uvc_query_v4l2_ctrl(struct uvc_video_device *video,
++		struct v4l2_queryctrl *v4l2_ctrl);
++
++extern int uvc_ctrl_add_info(struct uvc_control_info *info);
++extern int uvc_ctrl_add_mapping(struct uvc_control_mapping *mapping);
++extern int uvc_ctrl_init_device(struct uvc_device *dev);
++extern void uvc_ctrl_cleanup_device(struct uvc_device *dev);
++extern int uvc_ctrl_resume_device(struct uvc_device *dev);
++extern void uvc_ctrl_init(void);
++
++extern int uvc_ctrl_begin(struct uvc_video_device *video);
++extern int __uvc_ctrl_commit(struct uvc_video_device *video, int rollback);
++static inline int uvc_ctrl_commit(struct uvc_video_device *video)
++{
++	return __uvc_ctrl_commit(video, 0);
++}
++static inline int uvc_ctrl_rollback(struct uvc_video_device *video)
++{
++	return __uvc_ctrl_commit(video, 1);
++}
++
++extern int uvc_ctrl_get(struct uvc_video_device *video,
++		struct v4l2_ext_control *xctrl);
++extern int uvc_ctrl_set(struct uvc_video_device *video,
++		struct v4l2_ext_control *xctrl);
++
++extern int uvc_xu_ctrl_query(struct uvc_video_device *video,
++		struct uvc_xu_control *ctrl, int set);
++
++/* Utility functions */
++extern void uvc_simplify_fraction(uint32_t *numerator, uint32_t *denominator,
++		unsigned int n_terms, unsigned int threshold);
++extern uint32_t uvc_fraction_to_interval(uint32_t numerator,
++		uint32_t denominator);
++extern struct usb_host_endpoint *uvc_find_endpoint(
++		struct usb_host_interface *alts, __u8 epaddr);
++
++/* Quirks support */
++void uvc_video_decode_isight (struct urb *urb, struct uvc_video_device *video, 
++		struct uvc_buffer *buf);
++
++#endif /* __KERNEL__ */
++
++#endif
++

linux-2.6-vio-modalias.patch:

Index: linux-2.6-vio-modalias.patch
===================================================================
RCS file: linux-2.6-vio-modalias.patch
diff -N linux-2.6-vio-modalias.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-vio-modalias.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,32 @@
+diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
+index f988672..12a0851 100644
+--- a/arch/powerpc/kernel/vio.c
++++ b/arch/powerpc/kernel/vio.c
+@@ -294,9 +294,27 @@ static ssize_t devspec_show(struct device *dev,
+ 	return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none");
+ }
+ 
++static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
++			     char *buf)
++{
++	const struct vio_dev *vio_dev = to_vio_dev(dev);
++	struct device_node *dn;
++	const char *cp;
++
++	dn = dev->archdata.of_node;
++	if (!dn)
++		return -ENODEV;
++	cp = of_get_property(dn, "compatible", NULL);
++	if (!cp)
++		return -ENODEV;
++
++	return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp);
++}
++
+ static struct device_attribute vio_dev_attrs[] = {
+ 	__ATTR_RO(name),
+ 	__ATTR_RO(devspec),
++	__ATTR_RO(modalias),
+ 	__ATTR_NULL
+ };
+ 

linux-2.6-virtio_blk-fix-sysfs-bits.patch:

Index: linux-2.6-virtio_blk-fix-sysfs-bits.patch
===================================================================
RCS file: linux-2.6-virtio_blk-fix-sysfs-bits.patch
diff -N linux-2.6-virtio_blk-fix-sysfs-bits.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-virtio_blk-fix-sysfs-bits.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,27 @@
+From: Jeremy Katz <katzj at redhat.com>
+To: rusty at rustcorp.com.au
+Cc: Jeremy Katz <katzj at redhat.com>
+Subject: [PATCH] Fix sysfs bits to have proper block symlink
+Date: Sun, 2 Mar 2008 17:00:15 -0500
+
+Fix up so that the virtio_blk devices in sysfs link correctly to their
+block device.  This then allows them to be detected by hal, etc
+
+Signed-off-by: Jeremy Katz <katzj at redhat.com>
+---
+ drivers/block/virtio_blk.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
+index 3b1a68d..0cfbe8c 100644
+--- a/drivers/block/virtio_blk.c
++++ b/drivers/block/virtio_blk.c
+@@ -238,6 +238,7 @@ static int virtblk_probe(struct virtio_device *vdev)
+ 	vblk->disk->first_minor = index_to_minor(index);
+ 	vblk->disk->private_data = vblk;
+ 	vblk->disk->fops = &virtblk_fops;
++	vblk->disk->driverfs_dev = &vdev->dev;
+ 	index++;
+ 
+ 	/* If barriers are supported, tell block layer that queue is ordered */
+

linux-2.6-wireless-pending-too.patch:

Index: linux-2.6-wireless-pending-too.patch
===================================================================
RCS file: linux-2.6-wireless-pending-too.patch
diff -N linux-2.6-wireless-pending-too.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-wireless-pending-too.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,68 @@
+This is an a backport of two fixes which are based on top of the open11s
+patches which are not yet in Rawhide.  They will disappear when those
+later patches get merged to net-2.6.26 (probably in a few days).
+
+	mac80211: always insert key into list
+	mac80211: fix hardware scan completion
+
+diff -up linux-2.6.24.noarch/net/mac80211/key.c.orig linux-2.6.24.noarch/net/mac80211/key.c
+--- linux-2.6.24.noarch/net/mac80211/key.c.orig	2008-03-04 19:40:41.000000000 -0500
++++ linux-2.6.24.noarch/net/mac80211/key.c	2008-03-04 19:43:13.000000000 -0500
+@@ -174,6 +174,9 @@ static void __ieee80211_key_replace(stru
+ {
+ 	int idx, defkey;
+ 
++	if (new)
++		list_add(&new->list, &sdata->key_list);
++
+ 	if (sta) {
+ 		rcu_assign_pointer(sta->key, new);
+ 	} else {
+@@ -190,9 +193,6 @@ static void __ieee80211_key_replace(stru
+ 			ieee80211_set_default_key(sdata, -1);
+ 
+ 		rcu_assign_pointer(sdata->keys[idx], new);
+-		if (new)
+-			list_add(&new->list, &sdata->key_list);
+-
+ 		if (defkey && new)
+ 			ieee80211_set_default_key(sdata, new->conf.keyidx);
+ 	}
+diff -up linux-2.6.24.noarch/net/mac80211/ieee80211_sta.c.orig linux-2.6.24.noarch/net/mac80211/ieee80211_sta.c
+--- linux-2.6.24.noarch/net/mac80211/ieee80211_sta.c.orig	2008-03-04 19:40:41.000000000 -0500
++++ linux-2.6.24.noarch/net/mac80211/ieee80211_sta.c	2008-03-04 19:48:19.000000000 -0500
+@@ -3401,22 +3401,27 @@ void ieee80211_scan_completed(struct iee
+ 
+ 	rcu_read_lock();
+ 	list_for_each_entry_rcu(sdata, &local->interfaces, list) {
+-
+ 		/* No need to wake the master device. */
+ 		if (sdata->dev == local->mdev)
+ 			continue;
+ 
+-		if (sdata->vif.type == IEEE80211_IF_TYPE_STA) {
+-			if (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED)
+-				ieee80211_send_nullfunc(local, sdata, 0);
+-			ieee80211_sta_timer((unsigned long)sdata);
+-		}
++		/* Tell AP we're back */
++		if (sdata->vif.type == IEEE80211_IF_TYPE_STA &&
++		    sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED)
++			ieee80211_send_nullfunc(local, sdata, 0);
+ 
+ 		netif_wake_queue(sdata->dev);
+ 	}
+-	rcu_read_unlock();
+ 
+ done:
++	/* Restart STA timer for both SW and HW scan cases */
++	list_for_each_entry_rcu(sdata, &local->interfaces, list) {
++		if (sdata->vif.type == IEEE80211_IF_TYPE_STA)
++			ieee80211_sta_timer((unsigned long)sdata);
++	}
++
++	rcu_read_unlock();
++
+ 	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ 	if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS) {
+ 		struct ieee80211_if_sta *ifsta = &sdata->u.sta;

linux-2.6-wireless-pending.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 linux-2.6-wireless-pending.patch
Index: linux-2.6-wireless-pending.patch
===================================================================
RCS file: linux-2.6-wireless-pending.patch
diff -N linux-2.6-wireless-pending.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-wireless-pending.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,34582 @@
+commit e4861829072c61883114c64a3af61f305a789ff0
+Author: Johannes Berg <johannes at sipsolutions.net>
+Date:   Wed Feb 27 13:39:00 2008 +0100
+
+    mac80211: fix key replacing, hw accel
+    
+    Even though I thought about it a lot and had also tested it, some
+    of my recent changes in the key code broke replacing keys, making
+    the kernel oops because a key is removed from a list while not on
+    it.
+    
+    This patch fixes that using the list as an indication whether or
+    not the key is on it (an empty list means it's not on any list.)
+    
+    Also, this patch fixes hw accel enabling, the check for not doing
+    hw accel when the interface is down was lost and is restored by
+    this.
+    
+    Additionally, move adding the key to the list into the function
+    __ieee80211_key_replace() for more consistency.
+    
+    Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit db4d1169d0b893bfb7923b6526748fe2c5a7373f
+Author: Johannes Berg <johannes at sipsolutions.net>
+Date:   Mon Feb 25 16:27:45 2008 +0100
+
+    mac80211: split ieee80211_key_alloc/free
+    
+    In order to RCU-ify sta_info, we need to be able to allocate
+    a key without linking it to an sdata/sta structure (because
+    allocation cannot be done in an rcu critical section). This
+    patch splits up ieee80211_key_alloc() and updates all users
+    appropriately.
+    
+    While at it, this patch fixes a number of race conditions
+    such as finally making key replacement atomic, unfortunately
+    at the expense of more complex code.
+    
+    Note that this patch documents /existing/ bugs with sta info
+    and key interaction, there is currently a race condition
+    when a sta info is freed without holding the RTNL. This will
+    finally be fixed by a followup patch.
+    
+    Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 6f48422a29714ed92f6136d9e7d3ff39c75607d7
+Author: Johannes Berg <johannes at sipsolutions.net>
+Date:   Mon Feb 25 16:27:44 2008 +0100
+
+    mac80211: remove STA infos last_ack stuff
+    
+    These things aren't used and the only possible use is within
+    rate control algorithms, however those can, if they need it,
+    keep track of it in their private data. last_ack_ms isn't
+    even updated so completely useless.
+    
+    Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit e6a5ddf20886206caf1c4a2431f6ff01198ab0f7
+Author: Johannes Berg <johannes at sipsolutions.net>
+Date:   Mon Feb 25 16:27:42 2008 +0100
+
+    mac80211: safely free beacon in ieee80211_if_reinit
+    
+    If ieee80211_if_reinit() is called from ieee80211_unregister_hw()
+    then it is possible that the driver will still request a beacon
+    (it is allowed to until ieee80211_unregister_hw() has returned.)
+    This means we need to use an RCU-protected write to the beacon
+    information even in this function.
+    
+    Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 2485f7105f20f85c2dbebc67be6b2cb97175fa7e
+Author: Johannes Berg <johannes at sipsolutions.net>
+Date:   Mon Feb 25 16:27:41 2008 +0100
+
+    mac80211: clarify use of TX status/RX callbacks
+    
+    This patch clarifies the use of the irqsafe vs. non-irq-safe
+    functions and their respective locking requirements.
+    
+    Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 38c07b430b50172b803fe4c7f76cba580ba9931f
+Author: Pavel Roskin <proski at gnu.org>
+Date:   Tue Feb 26 17:59:14 2008 -0500
+
+    ath5k: fix all endian issues reported by sparse
+    
+    Changes-licensed-under: ISC
+    Signed-off-by: Pavel Roskin <proski at gnu.org>
+    Acked-by: Luis R. Rodriguez <mcgrof at winlab.rutgers.edu>
+    Acked-by: Nick Kossifidis <mickflemm at gmail.com>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit e6084239d39a10bac1186611fe7c523cea92c9ec
+Author: Ivo van Doorn <ivdoorn at gmail.com>
+Date:   Mon Feb 25 23:22:13 2008 +0100
+
+    rt2x00: Release rt2x00 2.1.3
+    
+    Signed-off-by: Ivo van Doorn <IvDoorn at gmail.com>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 1497074ad79009f8fb465d795f9e0d2a428b7fa2
+Author: Ivo van Doorn <ivdoorn at gmail.com>
+Date:   Mon Feb 25 23:20:33 2008 +0100
+
+    rt2x00: Check for 5GHz band in link tuner
+    
+    Fix a typo in the link tuner where accidently the
+    2GHz band was checked instead of the 5GHz band.
+    This forced the link tuner to work in an invalid
+    range for the currently active band.
+    
+    Signed-off-by: Ivo van Doorn <IvDoorn at gmail.com>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 58e307398317ab55470547a7d72859c89edd187d
+Author: Florian Fainelli <florian.fainelli at telecomint.eu>
+Date:   Mon Feb 25 17:51:53 2008 +0100
+
+    p54: print unknown eeprom fields
+    
+    This patch allows p54common to print the
+    uknown EEPROM fields, which can help
+    when debugging/testing devices.
+    
+    Signed-off-by: Florian Fainelli <florian.fainelli at telecomint.eu>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 9a89c839f79395426b84cf6da9d56773402b4c0e
+Author: Johannes Berg <johannes at sipsolutions.net>
+Date:   Mon Feb 25 11:12:18 2008 +0100
+
+    adm8211: fix cfg80211 band API conversion
+    
+    Insert a missing band assignment.
+    
+    Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 8f300ae5b819f7655197925cdb1954edfd906a87
+Author: Michael Buesch <mb at bu3sch.de>
+Date:   Sun Feb 24 14:42:29 2008 +0100
+
+    b43legacy: Fix nondebug build
+    
+    Fix a typo.
+    
+    Signed-off-by: Michael Buesch <mb at bu3sch.de>
+    Acked-by: Stefano Brivio <stefano.brivio at polimi.it>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 28de57d1a9eb7e67badb731297197fcbef0cc19e
+Author: Aurelien Jarno <aurelien at aurel32.net>
+Date:   Fri Feb 22 16:14:58 2008 +0100
+
+    ssb: Add CHIPCO IRQ access functions
+    
+    This patch adds functions to setup and read the CHIPCO IRQ.
+    
+    Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
+    Signed-off-by: Michael Buesch <mb at bu3sch.de>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit fba4a1e63723b5ef16c21a90f06520ae37c5da98
+Author: Johannes Berg <johannes at sipsolutions.net>
+Date:   Thu Feb 21 11:08:33 2008 +0100
+
+    mac80211: fix IBSS code
+    
+    This patch fixes two errors introduced by
+    
+        commit 19d35612f3cd7f60dd9174c0100584e21f5a1025
+        Author: Bruno Randolf <bruno at thinktube.com>
+        Date:   Mon Feb 18 11:21:36 2008 +0900
+    
+            mac80211: enable IBSS merging
+    
+    The first error is an endianness problem that sparse found and
+    the second is a build failure when CONFIG_MAC80211_IBSS_DEBUG
+    is not set.
+    
+    Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
+    Cc: Bruno Randolf <bruno at thinktube.com>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
[...34189 lines suppressed...]
+-	memcpy(priv->rates, adm8211_rates, sizeof(adm8211_rates));
+-	priv->modes[0].num_rates = ARRAY_SIZE(adm8211_rates);
+-	priv->modes[0].rates = priv->rates;
+-
+ 	dev->queues = 1; /* ADM8211C supports more, maybe ADM8211B too */
+ 
+ 	priv->retry_limit = 3;
+@@ -1917,14 +1930,9 @@ static int __devinit adm8211_probe(struc
+ 		goto err_free_desc;
+ 	}
+ 
+-	priv->channel = priv->modes[0].channels[0].chan;
++	priv->channel = 1;
+ 
+-	err = ieee80211_register_hwmode(dev, &priv->modes[0]);
+-	if (err) {
+-		printk(KERN_ERR "%s (adm8211): Can't register hwmode\n",
+-		       pci_name(pdev));
+-		goto err_free_desc;
+-	}
++	dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
+ 
+ 	err = ieee80211_register_hw(dev);
+ 	if (err) {
+diff -up linux-2.6.24.noarch/drivers/ssb/pcmcia.c.orig linux-2.6.24.noarch/drivers/ssb/pcmcia.c
+--- linux-2.6.24.noarch/drivers/ssb/pcmcia.c.orig	2008-03-04 19:28:32.000000000 -0500
++++ linux-2.6.24.noarch/drivers/ssb/pcmcia.c	2008-03-04 19:35:36.000000000 -0500
+@@ -172,6 +172,22 @@ static int select_core_and_segment(struc
+ 	return 0;
+ }
+ 
++static u8 ssb_pcmcia_read8(struct ssb_device *dev, u16 offset)
++{
++	struct ssb_bus *bus = dev->bus;
++	unsigned long flags;
++	int err;
++	u8 value = 0xFF;
++
++	spin_lock_irqsave(&bus->bar_lock, flags);
++	err = select_core_and_segment(dev, &offset);
++	if (likely(!err))
++		value = readb(bus->mmio + offset);
++	spin_unlock_irqrestore(&bus->bar_lock, flags);
++
++	return value;
++}
++
+ static u16 ssb_pcmcia_read16(struct ssb_device *dev, u16 offset)
+ {
+ 	struct ssb_bus *bus = dev->bus;
+@@ -206,6 +222,20 @@ static u32 ssb_pcmcia_read32(struct ssb_
+ 	return (lo | (hi << 16));
+ }
+ 
++static void ssb_pcmcia_write8(struct ssb_device *dev, u16 offset, u8 value)
++{
++	struct ssb_bus *bus = dev->bus;
++	unsigned long flags;
++	int err;
++
++	spin_lock_irqsave(&bus->bar_lock, flags);
++	err = select_core_and_segment(dev, &offset);
++	if (likely(!err))
++		writeb(value, bus->mmio + offset);
++	mmiowb();
++	spin_unlock_irqrestore(&bus->bar_lock, flags);
++}
++
+ static void ssb_pcmcia_write16(struct ssb_device *dev, u16 offset, u16 value)
+ {
+ 	struct ssb_bus *bus = dev->bus;
+@@ -238,8 +268,10 @@ static void ssb_pcmcia_write32(struct ss
+ 
+ /* Not "static", as it's used in main.c */
+ const struct ssb_bus_ops ssb_pcmcia_ops = {
++	.read8		= ssb_pcmcia_read8,
+ 	.read16		= ssb_pcmcia_read16,
+ 	.read32		= ssb_pcmcia_read32,
++	.write8		= ssb_pcmcia_write8,
+ 	.write16	= ssb_pcmcia_write16,
+ 	.write32	= ssb_pcmcia_write32,
+ };
+diff -up linux-2.6.24.noarch/drivers/ssb/main.c.orig linux-2.6.24.noarch/drivers/ssb/main.c
+--- linux-2.6.24.noarch/drivers/ssb/main.c.orig	2008-03-04 19:28:32.000000000 -0500
++++ linux-2.6.24.noarch/drivers/ssb/main.c	2008-03-04 19:35:36.000000000 -0500
+@@ -505,6 +505,14 @@ error:
+ 	return err;
+ }
+ 
++static u8 ssb_ssb_read8(struct ssb_device *dev, u16 offset)
++{
++	struct ssb_bus *bus = dev->bus;
++
++	offset += dev->core_index * SSB_CORE_SIZE;
++	return readb(bus->mmio + offset);
++}
++
+ static u16 ssb_ssb_read16(struct ssb_device *dev, u16 offset)
+ {
+ 	struct ssb_bus *bus = dev->bus;
+@@ -521,6 +529,14 @@ static u32 ssb_ssb_read32(struct ssb_dev
+ 	return readl(bus->mmio + offset);
+ }
+ 
++static void ssb_ssb_write8(struct ssb_device *dev, u16 offset, u8 value)
++{
++	struct ssb_bus *bus = dev->bus;
++
++	offset += dev->core_index * SSB_CORE_SIZE;
++	writeb(value, bus->mmio + offset);
++}
++
+ static void ssb_ssb_write16(struct ssb_device *dev, u16 offset, u16 value)
+ {
+ 	struct ssb_bus *bus = dev->bus;
+@@ -539,8 +555,10 @@ static void ssb_ssb_write32(struct ssb_d
+ 
+ /* Ops for the plain SSB bus without a host-device (no PCI or PCMCIA). */
+ static const struct ssb_bus_ops ssb_ssb_ops = {
++	.read8		= ssb_ssb_read8,
+ 	.read16		= ssb_ssb_read16,
+ 	.read32		= ssb_ssb_read32,
++	.write8		= ssb_ssb_write8,
+ 	.write16	= ssb_ssb_write16,
+ 	.write32	= ssb_ssb_write32,
+ };
+diff -up linux-2.6.24.noarch/drivers/ssb/pci.c.orig linux-2.6.24.noarch/drivers/ssb/pci.c
+--- linux-2.6.24.noarch/drivers/ssb/pci.c.orig	2008-03-04 19:28:32.000000000 -0500
++++ linux-2.6.24.noarch/drivers/ssb/pci.c	2008-03-04 19:35:36.000000000 -0500
+@@ -572,6 +572,19 @@ static inline int ssb_pci_assert_buspowe
+ }
+ #endif /* DEBUG */
+ 
++static u8 ssb_pci_read8(struct ssb_device *dev, u16 offset)
++{
++	struct ssb_bus *bus = dev->bus;
++
++	if (unlikely(ssb_pci_assert_buspower(bus)))
++		return 0xFF;
++	if (unlikely(bus->mapped_device != dev)) {
++		if (unlikely(ssb_pci_switch_core(bus, dev)))
++			return 0xFF;
++	}
++	return ioread8(bus->mmio + offset);
++}
++
+ static u16 ssb_pci_read16(struct ssb_device *dev, u16 offset)
+ {
+ 	struct ssb_bus *bus = dev->bus;
+@@ -598,6 +611,19 @@ static u32 ssb_pci_read32(struct ssb_dev
+ 	return ioread32(bus->mmio + offset);
+ }
+ 
++static void ssb_pci_write8(struct ssb_device *dev, u16 offset, u8 value)
++{
++	struct ssb_bus *bus = dev->bus;
++
++	if (unlikely(ssb_pci_assert_buspower(bus)))
++		return;
++	if (unlikely(bus->mapped_device != dev)) {
++		if (unlikely(ssb_pci_switch_core(bus, dev)))
++			return;
++	}
++	iowrite8(value, bus->mmio + offset);
++}
++
+ static void ssb_pci_write16(struct ssb_device *dev, u16 offset, u16 value)
+ {
+ 	struct ssb_bus *bus = dev->bus;
+@@ -626,8 +652,10 @@ static void ssb_pci_write32(struct ssb_d
+ 
+ /* Not "static", as it's used in main.c */
+ const struct ssb_bus_ops ssb_pci_ops = {
++	.read8		= ssb_pci_read8,
+ 	.read16		= ssb_pci_read16,
+ 	.read32		= ssb_pci_read32,
++	.write8		= ssb_pci_write8,
+ 	.write16	= ssb_pci_write16,
+ 	.write32	= ssb_pci_write32,
+ };
+diff -up linux-2.6.24.noarch/drivers/ssb/driver_chipcommon.c.orig linux-2.6.24.noarch/drivers/ssb/driver_chipcommon.c
+--- linux-2.6.24.noarch/drivers/ssb/driver_chipcommon.c.orig	2008-03-04 19:28:32.000000000 -0500
++++ linux-2.6.24.noarch/drivers/ssb/driver_chipcommon.c	2008-03-04 19:35:36.000000000 -0500
+@@ -353,6 +353,16 @@ void ssb_chipco_watchdog_timer_set(struc
+ 	chipco_write32(cc, SSB_CHIPCO_WATCHDOG, ticks);
+ }
+ 
++void ssb_chipco_irq_mask(struct ssb_chipcommon *cc, u32 mask, u32 value)
++{
++	chipco_write32_masked(cc, SSB_CHIPCO_IRQMASK, mask, value);
++}
++
++u32 ssb_chipco_irq_status(struct ssb_chipcommon *cc, u32 mask)
++{
++	return chipco_read32(cc, SSB_CHIPCO_IRQSTAT) & mask;
++}
++
+ u32 ssb_chipco_gpio_in(struct ssb_chipcommon *cc, u32 mask)
+ {
+ 	return chipco_read32(cc, SSB_CHIPCO_GPIOIN) & mask;

linux-2.6-x86-debug-boot.patch:

Index: linux-2.6-x86-debug-boot.patch
===================================================================
RCS file: linux-2.6-x86-debug-boot.patch
diff -N linux-2.6-x86-debug-boot.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-x86-debug-boot.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,104 @@
+---
+ arch/i386/boot/main.c |   12 ++++++++++++
+ arch/i386/boot/pm.c   |    8 ++++++++
+ 2 files changed, 20 insertions(+)
+
+--- linux-2.6.22.noarch.orig/arch/i386/boot/main.c
++++ linux-2.6.22.noarch/arch/i386/boot/main.c
+@@ -105,6 +105,7 @@ static void set_bios_mode(void)
+ void main(void)
+ {
+ 	/* First, copy the boot header into the "zeropage" */
++	puts("Booting: ");
+ 	copy_boot_params();
+ 
+ 	/* End of heap check */
+@@ -118,6 +119,7 @@ void main(void)
+ 	}
+ 
+ 	/* Make sure we have all the proper CPU support */
++	putchar('A');
+ 	if (validate_cpu()) {
+ 		puts("Unable to boot - please use a kernel appropriate "
+ 		     "for your CPU.\n");
+@@ -125,37 +127,47 @@ void main(void)
+ 	}
+ 
+ 	/* Tell the BIOS what CPU mode we intend to run in. */
++	putchar('B');
+ 	set_bios_mode();
+ 
+ 	/* Detect memory layout */
++	putchar('C');
+ 	detect_memory();
+ 
+ 	/* Set keyboard repeat rate (why?) */
++	putchar('D');
+ 	keyboard_set_repeat();
+ 
+ 	/* Set the video mode */
++	putchar('E');
+ 	set_video();
+ 
+ 	/* Query MCA information */
++	putchar('F');
+ 	query_mca();
+ 
+ 	/* Voyager */
+ #ifdef CONFIG_X86_VOYAGER
++	putchar('G');
+ 	query_voyager();
+ #endif
+ 
++	putchar('H');
+ 	/* Query Intel SpeedStep (IST) information */
+ 	query_ist();
+ 
+ 	/* Query APM information */
+ #if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
++	putchar('I');
+ 	query_apm_bios();
+ #endif
+ 
+ 	/* Query EDD information */
+ #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
++	putchar('J');
+ 	query_edd();
+ #endif
+ 	/* Do the last things and invoke protected mode */
++	putchar('K');
+ 	go_to_protected_mode();
+ }
+--- linux-2.6.22.noarch.orig/arch/i386/boot/pm.c
++++ linux-2.6.22.noarch/arch/i386/boot/pm.c
+@@ -145,24 +145,30 @@ static void setup_idt(void)
+ void go_to_protected_mode(void)
+ {
+ 	/* Hook before leaving real mode, also disables interrupts */
++	putchar('L');
+ 	realmode_switch_hook();
+ 
+ 	/* Move the kernel/setup to their final resting places */
++	putchar('M');
+ 	move_kernel_around();
+ 
+ 	/* Enable the A20 gate */
++	putchar('N');
+ 	if (enable_a20()) {
+ 		puts("A20 gate not responding, unable to boot...\n");
+ 		die();
+ 	}
+ 
+ 	/* Reset coprocessor (IGNNE#) */
++	putchar('O');
+ 	reset_coprocessor();
+ 
+ 	/* Mask all interrupts in the PIC */
++	putchar('P');
+ 	mask_all_interrupts();
+ 
+ 	/* Actual transition to protected mode... */
++	puts("Q\n");
+ 	setup_idt();
+ 	setup_gdt();
+ 	protected_mode_jump(boot_params.hdr.code32_start,

linux-2.6-xen-0001-Revert-linux-2.6-execshield.patch.patch:

Index: linux-2.6-xen-0001-Revert-linux-2.6-execshield.patch.patch
===================================================================
RCS file: linux-2.6-xen-0001-Revert-linux-2.6-execshield.patch.patch
diff -N linux-2.6-xen-0001-Revert-linux-2.6-execshield.patch.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0001-Revert-linux-2.6-execshield.patch.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,1067 @@
+From 77198032633b5660879bb89bae9f1682fd0ec24c Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Wed, 5 Mar 2008 17:20:11 +0000
+Subject: [PATCH] Revert linux-2.6-execshield.patch
+
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ arch/x86/kernel/cpu/common.c  |   14 -----
+ arch/x86/kernel/process_32.c  |   39 +--------------
+ arch/x86/kernel/setup64.c     |   40 +++++++++++++++
+ arch/x86/kernel/smp_32.c      |    3 -
+ arch/x86/kernel/traps_32.c    |  106 +---------------------------------------
+ arch/x86/mm/init_32.c         |   20 ++++----
+ arch/x86/mm/mmap.c            |    4 +-
+ arch/x86/vdso/vdso32-setup.c  |    2 +-
+ fs/binfmt_elf.c               |   21 +-------
+ fs/proc/array.c               |    8 +--
+ include/asm-ia64/pgalloc.h    |    4 --
+ include/asm-powerpc/pgalloc.h |    5 --
+ include/asm-ppc/pgalloc.h     |    5 --
+ include/asm-s390/pgalloc.h    |    4 --
+ include/asm-sparc/pgalloc.h   |    4 --
+ include/asm-sparc64/pgalloc.h |    4 --
+ include/asm-x86/desc.h        |   16 ------
+ include/asm-x86/elf.h         |    2 +
+ include/asm-x86/mmu.h         |    6 --
+ include/asm-x86/pgalloc_64.h  |    7 ---
+ include/asm-x86/processor.h   |    6 --
+ include/linux/mm.h            |    8 +---
+ include/linux/mm_types.h      |    3 -
+ include/linux/resource.h      |    5 +--
+ include/linux/sched.h         |    7 ---
+ kernel/sysctl.c               |   28 -----------
+ mm/mmap.c                     |  107 +++-------------------------------------
+ mm/mprotect.c                 |    9 +---
+ mm/mremap.c                   |    4 +-
+ 29 files changed, 74 insertions(+), 417 deletions(-)
+
+diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
+index 53cb84e..a38aafa 100644
+--- a/arch/x86/kernel/cpu/common.c
++++ b/arch/x86/kernel/cpu/common.c
+@@ -478,20 +478,6 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
+ 	 * we do "generic changes."
+ 	 */
+ 
+-	/*
+-	 *  emulation of NX with segment limits unfortunately means
+-	 *  we have to disable the fast system calls, due to the way that
+-	 *  sysexit clears the segment limits on return.
+-	 *  If we have either disabled exec-shield on the boot command line,
+-	 *  or we have NX, then we don't need to do this.
+-	 */
+-	if (exec_shield != 0) {
+-#ifdef CONFIG_X86_PAE
+-		if (!test_bit(X86_FEATURE_NX, c->x86_capability))
+-#endif
+-			clear_bit(X86_FEATURE_SEP, c->x86_capability);
+-	}
+-
+ 	/* If the model name is still unset, do table lookup. */
+ 	if ( !c->x86_model_id[0] ) {
+ 		char *p;
+diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
+index db271a2..be3c7a2 100644
+--- a/arch/x86/kernel/process_32.c
++++ b/arch/x86/kernel/process_32.c
+@@ -679,8 +679,7 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct
+ 	/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
+ 
+ 	__unlazy_fpu(prev_p);
+-	if (next_p->mm)
+-		load_user_cs_desc(cpu, next_p->mm);
++
+ 
+ 	/* we're going to use this soon, after a few expensive things */
+ 	if (next_p->fpu_counter > 5)
+@@ -850,39 +849,3 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
+ 	unsigned long range_end = mm->brk + 0x02000000;
+ 	return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
+ }
+-
+-static void modify_cs(struct mm_struct *mm, unsigned long limit)
+-{
+-	mm->context.exec_limit = limit;
+-	set_user_cs(&mm->context.user_cs, limit);
+-	if (mm == current->mm) {
+-		preempt_disable();
+-		load_user_cs_desc(smp_processor_id(), mm);
+-		preempt_enable();
+-	}
+-}
+-
+-void arch_add_exec_range(struct mm_struct *mm, unsigned long limit)
+-{
+-	if (limit > mm->context.exec_limit)
+-		modify_cs(mm, limit);
+-}
+-
+-void arch_remove_exec_range(struct mm_struct *mm, unsigned long old_end)
+-{
+-	struct vm_area_struct *vma;
+-	unsigned long limit = PAGE_SIZE;
+-
+-	if (old_end == mm->context.exec_limit) {
+-		for (vma = mm->mmap; vma; vma = vma->vm_next)
+-			if ((vma->vm_flags & VM_EXEC) && (vma->vm_end > limit))
+-				limit = vma->vm_end;
+-		modify_cs(mm, limit);
+-	}
+-}
+-
+-void arch_flush_exec_range(struct mm_struct *mm)
+-{
+-	mm->context.exec_limit = 0;
+-	set_user_cs(&mm->context.user_cs, 0);
+-}
+diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c
+index 8a940dc..309366f 100644
+--- a/arch/x86/kernel/setup64.c
++++ b/arch/x86/kernel/setup64.c
+@@ -45,6 +45,46 @@ EXPORT_SYMBOL_GPL(__supported_pte_mask);
+ 
+ static int do_not_nx __cpuinitdata = 0;
+ 
++/* noexec=on|off
++Control non executable mappings for 64bit processes.
++
++on	Enable(default)
++off	Disable
++*/ 
++static int __init nonx_setup(char *str)
++{
++	if (!str)
++		return -EINVAL;
++	if (!strncmp(str, "on", 2)) {
++                __supported_pte_mask |= _PAGE_NX; 
++ 		do_not_nx = 0; 
++	} else if (!strncmp(str, "off", 3)) {
++		do_not_nx = 1;
++		__supported_pte_mask &= ~_PAGE_NX;
++        }
++	return 0;
++} 
++early_param("noexec", nonx_setup);
++
++int force_personality32 = 0; 
++
++/* noexec32=on|off
++Control non executable heap for 32bit processes.
++To control the stack too use noexec=off
++
++on	PROT_READ does not imply PROT_EXEC for 32bit processes
++off	PROT_READ implies PROT_EXEC (default)
++*/
++static int __init nonx32_setup(char *str)
++{
++	if (!strcmp(str, "on"))
++		force_personality32 &= ~READ_IMPLIES_EXEC;
++	else if (!strcmp(str, "off"))
++		force_personality32 |= READ_IMPLIES_EXEC;
++	return 1;
++}
++__setup("noexec32=", nonx32_setup);
++
+ /*
+  * Copy data used in early init routines from the initial arrays to the
+  * per cpu data areas.  These arrays then become expendable and the
+diff --git a/arch/x86/kernel/smp_32.c b/arch/x86/kernel/smp_32.c
+index cca75b4..dc0cde9 100644
+--- a/arch/x86/kernel/smp_32.c
++++ b/arch/x86/kernel/smp_32.c
+@@ -22,7 +22,6 @@
+ 
+ #include <asm/mtrr.h>
+ #include <asm/tlbflush.h>
+-#include <asm/desc.h>
+ #include <asm/mmu_context.h>
+ #include <mach_apic.h>
+ 
+@@ -317,8 +316,6 @@ void smp_invalidate_interrupt(struct pt_regs *regs)
+ 	unsigned long cpu;
+ 
+ 	cpu = get_cpu();
+-	if (current->active_mm)
+-		load_user_cs_desc(cpu, current->active_mm);
+ 
+ 	if (!cpu_isset(cpu, flush_cpumask))
+ 		goto out;
+diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
+index 7865615..b22c01e 100644
+--- a/arch/x86/kernel/traps_32.c
++++ b/arch/x86/kernel/traps_32.c
+@@ -592,91 +592,7 @@ DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
+ DO_ERROR(11, SIGBUS,  "segment not present", segment_not_present)
+ DO_ERROR(12, SIGBUS,  "stack segment", stack_segment)
+ DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0, 0)
+-
+-/*
+- * lazy-check for CS validity on exec-shield binaries:
+- *
+- * the original non-exec stack patch was written by
+- * Solar Designer <solar at openwall.com>. Thanks!
+- */
+-static int
+-check_lazy_exec_limit(int cpu, struct pt_regs *regs, long error_code)
+-{
+-	struct desc_struct *desc1, *desc2;
+-	struct vm_area_struct *vma;
+-	unsigned long limit;
+-
+-	if (current->mm == NULL)
+-		return 0;
+-
+-	limit = -1UL;
+-	if (current->mm->context.exec_limit != -1UL) {
+-		limit = PAGE_SIZE;
+-		spin_lock(&current->mm->page_table_lock);
+-		for (vma = current->mm->mmap; vma; vma = vma->vm_next)
+-			if ((vma->vm_flags & VM_EXEC) && (vma->vm_end > limit))
+-				limit = vma->vm_end;
+-		vma = get_gate_vma(current);
+-		if (vma && (vma->vm_flags & VM_EXEC) && (vma->vm_end > limit))
+-			limit = vma->vm_end;
+-		spin_unlock(&current->mm->page_table_lock);
+-		if (limit >= TASK_SIZE)
+-			limit = -1UL;
+-		current->mm->context.exec_limit = limit;
+-	}
+-	set_user_cs(&current->mm->context.user_cs, limit);
+-
+-	desc1 = &current->mm->context.user_cs;
+-	desc2 = get_cpu_gdt_table(cpu) + GDT_ENTRY_DEFAULT_USER_CS;
+-
+-	if (desc1->a != desc2->a || desc1->b != desc2->b) {
+-		/*
+-		 * The CS was not in sync - reload it and retry the
+-		 * instruction. If the instruction still faults then
+-		 * we won't hit this branch next time around.
+-		 */
+-		if (print_fatal_signals >= 2) {
+-			printk(KERN_ERR "#GPF fixup (%ld[seg:%lx]) at %08lx, CPU#%d.\n",
+-				error_code, error_code/8, regs->ip, smp_processor_id());
+-			printk(KERN_ERR "exec_limit: %08lx, user_cs: %08x/%08x, CPU_cs: %08x/%08x.\n",
+-				current->mm->context.exec_limit, desc1->a, desc1->b, desc2->a, desc2->b);
+-		}
+-		load_user_cs_desc(cpu, current->mm);
+-		return 1;
+-	}
+-
+-	return 0;
+-}
+-
+-/*
+- * The fixup code for errors in iret jumps to here (iret_exc).  It loses
+- * the original trap number and error code.  The bogus trap 32 and error
+- * code 0 are what the vanilla kernel delivers via:
+- * DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0, 1)
+- *
+- * NOTE: Because of the final "1" in the macro we need to enable interrupts.
+- *
+- * In case of a general protection fault in the iret instruction, we
+- * need to check for a lazy CS update for exec-shield.
+- */
+-void do_iret_error(struct pt_regs *regs, long error_code)
+-{
+-	int ok;
+-	local_irq_enable();
+-	ok = check_lazy_exec_limit(get_cpu(), regs, error_code);
+-	put_cpu();
+-	if (!ok && notify_die(DIE_TRAP, "iret exception", regs,
+-	    error_code, 32, SIGSEGV) != NOTIFY_STOP) {
+-		siginfo_t info;
+-		info.si_signo = SIGSEGV;
+-		info.si_errno = 0;
+-		info.si_code = ILL_BADSTK;
+-		info.si_addr = 0;
+-		do_trap(32, SIGSEGV, "iret exception", 0, regs, error_code,
+-			&info);
+-	}
+-}
+-
++DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0, 1)
+ 
+ void __kprobes do_general_protection(struct pt_regs * regs,
+ 					      long error_code)
+@@ -684,7 +600,6 @@ void __kprobes do_general_protection(struct pt_regs * regs,
+ 	int cpu = get_cpu();
+ 	struct tss_struct *tss = &per_cpu(init_tss, cpu);
+ 	struct thread_struct *thread = &current->thread;
+-	int ok;
+ 
+ 	/*
+ 	 * Perform the lazy TSS's I/O bitmap copy. If the TSS has an
+@@ -711,6 +626,7 @@ void __kprobes do_general_protection(struct pt_regs * regs,
+ 		put_cpu();
+ 		return;
+ 	}
++	put_cpu();
+ 
+ 	if (regs->flags & VM_MASK)
+ 		goto gp_in_vm86;
+@@ -718,22 +634,6 @@ void __kprobes do_general_protection(struct pt_regs * regs,
+ 	if (!user_mode(regs))
+ 		goto gp_in_kernel;
+ 
+-	ok = check_lazy_exec_limit(cpu, regs, error_code);
+-
+-	put_cpu();
+-
+-	if (ok)
+-		return;
+-
+-	if (print_fatal_signals) {
+-		printk(KERN_ERR "#GPF(%ld[seg:%lx]) at %08lx, CPU#%d.\n", error_code,
+-			error_code/8, regs->ip, smp_processor_id());
+-		printk(KERN_ERR "exec_limit: %08lx, user_cs: %08x/%08x.\n",
+-			current->mm->context.exec_limit,
+-			current->mm->context.user_cs.a,
+-			current->mm->context.user_cs.b);
+-	}
+-
+ 	current->thread.error_code = error_code;
+ 	current->thread.trap_no = 13;
+ 	if (show_unhandled_signals && unhandled_signal(current, SIGSEGV) &&
+@@ -750,13 +650,11 @@ void __kprobes do_general_protection(struct pt_regs * regs,
+ 	return;
+ 
+ gp_in_vm86:
+-	put_cpu();
+ 	local_irq_enable();
+ 	handle_vm86_fault((struct kernel_vm86_regs *) regs, error_code);
+ 	return;
+ 
+ gp_in_kernel:
+-	put_cpu();
+ 	if (!fixup_exception(regs)) {
+ 		current->thread.error_code = error_code;
+ 		current->thread.trap_no = 13;
+diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
+index f5926ae..ee1091a 100644
+--- a/arch/x86/mm/init_32.c
++++ b/arch/x86/mm/init_32.c
+@@ -474,7 +474,7 @@ static int disable_nx __initdata;
+  * Control non executable mappings.
+  *
+  * on      Enable
+- * off     Disable (disables exec-shield too)
++ * off     Disable
+  */
+ static int __init noexec_setup(char *str)
+ {
+@@ -483,12 +483,14 @@ static int __init noexec_setup(char *str)
+ 			__supported_pte_mask |= _PAGE_NX;
+ 			disable_nx = 0;
+ 		}
+-	} else if (!strcmp(str, "off")) {
+-		disable_nx = 1;
+-		__supported_pte_mask &= ~_PAGE_NX;
+-		exec_shield = 0;
+-	} else
+-		return -EINVAL;
++	} else {
++		if (!strcmp(str, "off")) {
++			disable_nx = 1;
++			__supported_pte_mask &= ~_PAGE_NX;
++		} else {
++			return -EINVAL;
++		}
++	}
+ 
+ 	return 0;
+ }
+@@ -526,10 +528,6 @@ void __init paging_init(void)
+ 	if (nx_enabled)
+ 		printk(KERN_INFO "NX (Execute Disable) protection: active\n");
+ #endif
+-	if (exec_shield)
+-		printk(KERN_INFO "Using x86 segment limits to approximate "
+-			"NX protection\n");
+-
+ 	pagetable_init();
+ 
+ 	load_cr3(swapper_pg_dir);
+diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
+index ec932ae..56fe712 100644
+--- a/arch/x86/mm/mmap.c
++++ b/arch/x86/mm/mmap.c
+@@ -111,15 +111,13 @@ static unsigned long mmap_legacy_base(void)
+  */
+ void arch_pick_mmap_layout(struct mm_struct *mm)
+ {
+-	if (!(2 & exec_shield) && mmap_is_legacy()) {
++	if (mmap_is_legacy()) {
+ 		mm->mmap_base = mmap_legacy_base();
+ 		mm->get_unmapped_area = arch_get_unmapped_area;
+ 		mm->unmap_area = arch_unmap_area;
+ 	} else {
+ 		mm->mmap_base = mmap_base();
+ 		mm->get_unmapped_area = arch_get_unmapped_area_topdown;
+-		if (!(current->personality & READ_IMPLIES_EXEC))
+-			mm->get_unmapped_exec_area = arch_get_unmapped_exec_area;
+ 		mm->unmap_area = arch_unmap_area_topdown;
+ 	}
+ }
+diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
+index 0bd5f44..348f134 100644
+--- a/arch/x86/vdso/vdso32-setup.c
++++ b/arch/x86/vdso/vdso32-setup.c
+@@ -336,7 +336,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
+ 	if (compat)
+ 		addr = VDSO_HIGH_BASE;
+ 	else {
+-		addr = get_unmapped_area_prot(NULL, 0, PAGE_SIZE, 0, 0, 1);
++		addr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0);
+ 		if (IS_ERR_VALUE(addr)) {
+ 			ret = addr;
+ 			goto up_fail;
+diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
+index 1fc8940..5e1a4fb 100644
+--- a/fs/binfmt_elf.c
++++ b/fs/binfmt_elf.c
+@@ -81,7 +81,7 @@ static struct linux_binfmt elf_format = {
+ 		.hasvdso	= 1
+ };
+ 
+-#define BAD_ADDR(x) IS_ERR_VALUE(x)
++#define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE)
+ 
+ static int set_brk(unsigned long start, unsigned long end)
+ {
+@@ -709,11 +709,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
+ 			break;
+ 		}
+ 
+-	if (current->personality == PER_LINUX && (exec_shield & 2)) {
+-		executable_stack = EXSTACK_DISABLE_X;
+-		current->flags |= PF_RANDOMIZE;
+-	}
+-
+ 	/* Some simple consistency checks for the interpreter */
+ 	if (elf_interpreter) {
+ 		retval = -ELIBBAD;
+@@ -733,15 +728,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
+ 	if (retval)
+ 		goto out_free_dentry;
+ 
+-#ifdef CONFIG_X86_32
+-	/*
+-	 * Turn off the CS limit completely if exec-shield disabled or
+-	 * NX active:
+-	 */
+-	if (!exec_shield || executable_stack != EXSTACK_DISABLE_X || nx_enabled)
+-		arch_add_exec_range(current->mm, -1);
+-#endif
+-
+ 	/* Discard our unneeded old files struct */
+ 	if (files) {
+ 		put_files_struct(files);
+@@ -755,8 +741,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
+ 	/* Do this immediately, since STACK_TOP as used in setup_arg_pages
+ 	   may depend on the personality.  */
+ 	SET_PERSONALITY(loc->elf_ex, 0);
+-	if (!(exec_shield & 2) &&
+-			elf_read_implies_exec(loc->elf_ex, executable_stack))
++	if (elf_read_implies_exec(loc->elf_ex, executable_stack))
+ 		current->personality |= READ_IMPLIES_EXEC;
+ 
+ 	if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
+@@ -921,7 +906,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
+ 					    interpreter,
+ 					    &interp_map_addr,
+ 					    load_bias);
+-		if (!BAD_ADDR(elf_entry)) {
++		if (!IS_ERR((void *)elf_entry)) {
+ 			/*
+ 			 * load_elf_interp() returns relocation
+ 			 * adjustment
+diff --git a/fs/proc/array.c b/fs/proc/array.c
+index 46adc3b..07d6c48 100644
+--- a/fs/proc/array.c
++++ b/fs/proc/array.c
+@@ -471,12 +471,8 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
+ 	}
+ 	rcu_read_unlock();
+ 
+-	if (!whole || num_threads < 2) {
+-		wchan = 0;
+-		if (current->uid == task->uid || current->euid == task->uid ||
+-			capable(CAP_SYS_NICE))
+-				wchan = get_wchan(task);
+-	}
++	if (!whole || num_threads < 2)
++		wchan = get_wchan(task);
+ 	if (!whole) {
+ 		min_flt = task->min_flt;
+ 		maj_flt = task->maj_flt;
+diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h
+index 24f183a..b9ac1a6 100644
+--- a/include/asm-ia64/pgalloc.h
++++ b/include/asm-ia64/pgalloc.h
+@@ -1,10 +1,6 @@
+ #ifndef _ASM_IA64_PGALLOC_H
+ #define _ASM_IA64_PGALLOC_H
+ 
+-#define arch_add_exec_range(mm, limit)		do { ; } while (0)
+-#define arch_flush_exec_range(mm)		do { ; } while (0)
+-#define arch_remove_exec_range(mm, limit)	do { ; } while (0)
+-
+ /*
+  * This file contains the functions and defines necessary to allocate
+  * page tables.
+diff --git a/include/asm-powerpc/pgalloc.h b/include/asm-powerpc/pgalloc.h
+index 25068ae..b4505ed 100644
+--- a/include/asm-powerpc/pgalloc.h
++++ b/include/asm-powerpc/pgalloc.h
+@@ -2,11 +2,6 @@
+ #define _ASM_POWERPC_PGALLOC_H
+ #ifdef __KERNEL__
+ 
+-/* Dummy functions since we don't support execshield on ppc */
+-#define arch_add_exec_range(mm, limit) do { ; } while (0)
+-#define arch_flush_exec_range(mm)      do { ; } while (0)
+-#define arch_remove_exec_range(mm, limit) do { ; } while (0)
+-
+ #ifdef CONFIG_PPC64
+ #include <asm/pgalloc-64.h>
+ #else
+diff --git a/include/asm-ppc/pgalloc.h b/include/asm-ppc/pgalloc.h
+index de55ad5..fd4d1d7 100644
+--- a/include/asm-ppc/pgalloc.h
++++ b/include/asm-ppc/pgalloc.h
+@@ -41,10 +41,5 @@ extern void pte_free(struct mm_struct *mm, pgtable_t pte);
+ 
+ #define check_pgt_cache()	do { } while (0)
+ 
+-#define arch_add_exec_range(mm, limit)         do { ; } while (0)
+-#define arch_flush_exec_range(mm)              do { ; } while (0)
+-#define arch_remove_exec_range(mm, limit)      do { ; } while (0)
+-
+-
+ #endif /* _PPC_PGALLOC_H */
+ #endif /* __KERNEL__ */
+diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h
+index a43f0ec..f5b2bf3 100644
+--- a/include/asm-s390/pgalloc.h
++++ b/include/asm-s390/pgalloc.h
+@@ -17,10 +17,6 @@
+ #include <linux/gfp.h>
+ #include <linux/mm.h>
+ 
+-#define arch_add_exec_range(mm, limit) do { ; } while (0)
+-#define arch_flush_exec_range(mm)      do { ; } while (0)
+-#define arch_remove_exec_range(mm, limit) do { ; } while (0)
+-
+ #define check_pgt_cache()	do {} while (0)
+ 
+ unsigned long *crst_table_alloc(struct mm_struct *, int);
+diff --git a/include/asm-sparc/pgalloc.h b/include/asm-sparc/pgalloc.h
+index 2632807..6292cd0 100644
+--- a/include/asm-sparc/pgalloc.h
++++ b/include/asm-sparc/pgalloc.h
+@@ -66,8 +66,4 @@ BTFIXUPDEF_CALL(void, pte_free, pgtable_t )
+ #define pte_free(mm, pte)	BTFIXUP_CALL(pte_free)(pte)
+ #define __pte_free_tlb(tlb, pte)	pte_free((tlb)->mm, pte)
+ 
+-#define arch_add_exec_range(mm, limit)		do { ; } while (0)
+-#define arch_flush_exec_range(mm)		do { ; } while (0)
+-#define arch_remove_exec_range(mm, limit)	do { ; } while (0)
+-
+ #endif /* _SPARC_PGALLOC_H */
+diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
+index c998da2..3ee2d40 100644
+--- a/include/asm-sparc64/pgalloc.h
++++ b/include/asm-sparc64/pgalloc.h
+@@ -79,8 +79,4 @@ static inline void check_pgt_cache(void)
+ 	quicklist_trim(0, NULL, 25, 16);
+ }
+ 
+-#define arch_add_exec_range(mm, limit)		do { ; } while (0)
+-#define arch_flush_exec_range(mm)		do { ; } while (0)
+-#define arch_remove_exec_range(mm, limit)	do { ; } while (0)
+-
+ #endif /* _SPARC64_PGALLOC_H */
+diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
+index 7ad80b9..5b6a05d 100644
+--- a/include/asm-x86/desc.h
++++ b/include/asm-x86/desc.h
+@@ -353,22 +353,6 @@ static inline void set_system_gate_ist(int n, void *addr, unsigned ist)
+ 	_set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, __KERNEL_CS);
+ }
+ 
+-static inline void set_user_cs(struct desc_struct *desc, unsigned long limit)
+-{
+-	limit = (limit - 1) / PAGE_SIZE;
+-	desc->a = limit & 0xffff;
+-	desc->b = (limit & 0xf0000) | 0x00c0fb00;
+-}
+-
+-#define load_user_cs_desc(cpu, mm) \
+-	get_cpu_gdt_table(cpu)[GDT_ENTRY_DEFAULT_USER_CS] = (mm)->context.user_cs
+-
+-#ifdef CONFIG_X86_32
+-extern void arch_add_exec_range(struct mm_struct *mm, unsigned long limit);
+-extern void arch_remove_exec_range(struct mm_struct *mm, unsigned long limit);
+-extern void arch_flush_exec_range(struct mm_struct *mm);
+-#endif /* CONFIG_X86_32 */
+-
+ #else
+ /*
+  * GET_DESC_BASE reads the descriptor base of the specified segment.
+diff --git a/include/asm-x86/elf.h b/include/asm-x86/elf.h
+index 001b577..fb62f99 100644
+--- a/include/asm-x86/elf.h
++++ b/include/asm-x86/elf.h
+@@ -185,6 +185,7 @@ static inline void elf_common_init(struct thread_struct *t,
+ 			clear_thread_flag(TIF_ABI_PENDING);	\
+ 		else						\
+ 			set_thread_flag(TIF_ABI_PENDING);	\
++		current->personality |= force_personality32;	\
+ 	} while (0)
+ #define COMPAT_ELF_PLATFORM			("i686")
+ 
+@@ -229,6 +230,7 @@ static inline void elf_common_init(struct thread_struct *t,
+ #define ELF_PLATFORM       ("x86_64")
+ extern void set_personality_64bit(void);
+ extern unsigned int sysctl_vsyscall32;
++extern int force_personality32;
+ 
+ #endif /* !CONFIG_X86_32 */
+ 
+diff --git a/include/asm-x86/mmu.h b/include/asm-x86/mmu.h
+index db9b109..efa962c 100644
+--- a/include/asm-x86/mmu.h
++++ b/include/asm-x86/mmu.h
+@@ -9,8 +9,6 @@
+  * we put the segment information here.
+  *
+  * cpu_vm_mask is used to optimize ldt flushing.
+- * exec_limit is used to track the range PROT_EXEC
+- * mappings span.
+  */
+ typedef struct { 
+ 	void *ldt;
+@@ -20,10 +18,6 @@ typedef struct {
+ 	int size;
+ 	struct mutex lock;
+ 	void *vdso;
+-#ifdef CONFIG_X86_32
+-	struct desc_struct user_cs;
+-	unsigned long exec_limit;
+-#endif
+ } mm_context_t;
+ 
+ #ifdef CONFIG_SMP
+diff --git a/include/asm-x86/pgalloc_64.h b/include/asm-x86/pgalloc_64.h
+index 982e1cb..8d67223 100644
+--- a/include/asm-x86/pgalloc_64.h
++++ b/include/asm-x86/pgalloc_64.h
+@@ -5,13 +5,6 @@
+ #include <linux/threads.h>
+ #include <linux/mm.h>
+ 
+-#define arch_add_exec_range(mm, limit) \
+-		do { (void)(mm), (void)(limit); } while (0)
+-#define arch_flush_exec_range(mm) \
+-		do { (void)(mm); } while (0)
+-#define arch_remove_exec_range(mm, limit) \
+-		do { (void)(mm), (void)(limit); } while (0)
+-
+ #define pmd_populate_kernel(mm, pmd, pte) \
+ 		set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte)))
+ #define pud_populate(mm, pud, pmd) \
+diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
+index ef01196..45a2f0a 100644
+--- a/include/asm-x86/processor.h
++++ b/include/asm-x86/processor.h
+@@ -674,9 +674,6 @@ extern int bootloader_type;
+ extern char ignore_fpu_irq;
+ #define cache_line_size() (boot_cpu_data.x86_cache_alignment)
+ 
+-#define __HAVE_ARCH_ALIGN_STACK
+-extern unsigned long arch_align_stack(unsigned long sp);
+-
+ #define HAVE_ARCH_PICK_MMAP_LAYOUT 1
+ #define ARCH_HAS_PREFETCHW
+ #define ARCH_HAS_SPINLOCK_PREFETCH
+@@ -754,9 +751,6 @@ static inline void prefetchw(const void *x)
+ 	regs->cs = __USER_CS;					\
+ 	regs->ip = new_eip;					\
+ 	regs->sp = new_esp;					\
+-	preempt_disable();					\
+-	load_user_cs_desc(smp_processor_id(), current->mm);	\
+-	preempt_enable();					\
+ } while (0)
+ 
+ 
+diff --git a/include/linux/mm.h b/include/linux/mm.h
+index 4b74dc8..3f3ccfe 100644
+--- a/include/linux/mm.h
++++ b/include/linux/mm.h
+@@ -1043,13 +1043,7 @@ extern int install_special_mapping(struct mm_struct *mm,
+ 				   unsigned long addr, unsigned long len,
+ 				   unsigned long flags, struct page **pages);
+ 
+-extern unsigned long get_unmapped_area_prot(struct file *, unsigned long, unsigned long, unsigned long, unsigned long, int);
+-
+-static inline unsigned long get_unmapped_area(struct file *file, unsigned long addr,
+-		unsigned long len, unsigned long pgoff, unsigned long flags)
+-{
+-	return get_unmapped_area_prot(file, addr, len, pgoff, flags, 0);
+-}
++extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
+ 
+ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+ 	unsigned long len, unsigned long prot,
+diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
+index 1f430ab..af190ce 100644
+--- a/include/linux/mm_types.h
++++ b/include/linux/mm_types.h
+@@ -163,9 +163,6 @@ struct mm_struct {
+ 	unsigned long (*get_unmapped_area) (struct file *filp,
+ 				unsigned long addr, unsigned long len,
+ 				unsigned long pgoff, unsigned long flags);
+-       unsigned long (*get_unmapped_exec_area) (struct file *filp,
+-				unsigned long addr, unsigned long len,
+-				unsigned long pgoff, unsigned long flags);
+ 	void (*unmap_area) (struct mm_struct *mm, unsigned long addr);
+ 	unsigned long mmap_base;		/* base of mmap area */
+ 	unsigned long task_size;		/* size of task vm space */
+diff --git a/include/linux/resource.h b/include/linux/resource.h
+index 14757af..ae13db7 100644
+--- a/include/linux/resource.h
++++ b/include/linux/resource.h
+@@ -54,11 +54,8 @@ struct rlimit {
+ /*
+  * Limit the stack by to some sane default: root can always
+  * increase this limit if needed..  8MB seems reasonable.
+- *
+- * (2MB more to cover randomization effects.)
+  */
+-#define _STK_LIM	(10*1024*1024)
+-#define EXEC_STACK_BIAS	(2*1024*1024)
++#define _STK_LIM	(8*1024*1024)
+ 
+ /*
+  * GPG wants 32kB of mlocked memory, to make sure pass phrases
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index a4b1a64..6361cff 100644
+--- a/include/linux/sched.h
++++ b/include/linux/sched.h
+@@ -98,9 +98,6 @@ struct futex_pi_state;
+ struct robust_list_head;
+ struct bio;
+ 
+-extern int exec_shield;
+-extern int print_fatal_signals;
+-
+ /*
+  * List of flags we want to share for kernel threads,
+  * if only because they are not used by them anyway.
+@@ -346,10 +343,6 @@ extern int sysctl_max_map_count;
+ extern unsigned long
+ arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
+ 		       unsigned long, unsigned long);
+-
+-extern unsigned long
+-arch_get_unmapped_exec_area(struct file *, unsigned long, unsigned long,
+-		       unsigned long, unsigned long);
+ extern unsigned long
+ arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
+ 			  unsigned long len, unsigned long pgoff,
+diff --git a/kernel/sysctl.c b/kernel/sysctl.c
+index ea74b8c..2d35d6e 100644
+--- a/kernel/sysctl.c
++++ b/kernel/sysctl.c
+@@ -82,26 +82,6 @@ extern int maps_protect;
+ extern int sysctl_stat_interval;
+ extern int latencytop_enabled;
+ 
+-int exec_shield = (1<<0);
+-/* exec_shield is a bitmask:
+- * 0: off; vdso at STACK_TOP, 1 page below TASK_SIZE
+- * (1<<0) 1: on [also on if !=0]
+- * (1<<1) 2: force noexecstack regardless of PT_GNU_STACK
+- * The old settings
+- * (1<<2) 4: vdso just below .text of main (unless too low)
+- * (1<<3) 8: vdso just below .text of PT_INTERP (unless too low)
+- * are ignored because the vdso is placed completely randomly
+- */
+-
+-static int __init setup_exec_shield(char *str)
+-{
+-	get_option(&str, &exec_shield);
+-
+-	return 1;
+-}
+-
+-__setup("exec-shield=", setup_exec_shield);
+-
+ /* Constants used for minimum and  maximum */
+ #if defined(CONFIG_DETECT_SOFTLOCKUP) || defined(CONFIG_HIGHMEM)
+ static int one = 1;
+@@ -386,14 +366,6 @@ static struct ctl_table kern_table[] = {
+ 		.proc_handler	= &proc_dointvec,
+ 	},
+ 	{
+-		.ctl_name	= CTL_UNNUMBERED,
+-		.procname	= "exec-shield",
+-		.data		= &exec_shield,
+-		.maxlen		= sizeof(int),
+-		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec,
+-	},
+-	{
+ 		.ctl_name	= KERN_CORE_USES_PID,
+ 		.procname	= "core_uses_pid",
+ 		.data		= &core_uses_pid,
+diff --git a/mm/mmap.c b/mm/mmap.c
+index d7c2c9d..a32d28c 100644
+--- a/mm/mmap.c
++++ b/mm/mmap.c
+@@ -26,7 +26,6 @@
+ #include <linux/mount.h>
+ #include <linux/mempolicy.h>
+ #include <linux/rmap.h>
+-#include <linux/random.h>
+ 
+ #include <asm/uaccess.h>
+ #include <asm/cacheflush.h>
+@@ -378,8 +377,6 @@ static inline void
+ __vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma,
+ 		struct vm_area_struct *prev, struct rb_node *rb_parent)
+ {
+-	if (vma->vm_flags & VM_EXEC)
+-		arch_add_exec_range(mm, vma->vm_end);
+ 	if (prev) {
+ 		vma->vm_next = prev->vm_next;
+ 		prev->vm_next = vma;
+@@ -483,8 +480,6 @@ __vma_unlink(struct mm_struct *mm, struct vm_area_struct *vma,
+ 	rb_erase(&vma->vm_rb, &mm->mm_rb);
+ 	if (mm->mmap_cache == vma)
+ 		mm->mmap_cache = prev;
+-	if (vma->vm_flags & VM_EXEC)
+-		arch_remove_exec_range(mm, vma->vm_end);
+ }
+ 
+ /*
+@@ -790,8 +785,6 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+ 		} else					/* cases 2, 5, 7 */
+ 			vma_adjust(prev, prev->vm_start,
+ 				end, prev->vm_pgoff, NULL);
+-		if (prev->vm_flags & VM_EXEC)
+-			arch_add_exec_range(mm, prev->vm_end);
+ 		return prev;
+ 	}
+ 
+@@ -947,8 +940,7 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
+ 	/* Obtain the address to map to. we verify (or select) it and ensure
+ 	 * that it represents a valid section of the address space.
+ 	 */
+-	addr = get_unmapped_area_prot(file, addr, len, pgoff, flags,
+-		prot & PROT_EXEC);
++	addr = get_unmapped_area(file, addr, len, pgoff, flags);
+ 	if (addr & ~PAGE_MASK)
+ 		return addr;
+ 
+@@ -1418,17 +1410,13 @@ void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr)
+ }
+ 
+ unsigned long
+-get_unmapped_area_prot(struct file *file, unsigned long addr, unsigned long len,
+-		unsigned long pgoff, unsigned long flags, int exec)
++get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
++		unsigned long pgoff, unsigned long flags)
+ {
+ 	unsigned long (*get_area)(struct file *, unsigned long,
+ 				  unsigned long, unsigned long, unsigned long);
+ 
+-	if (exec && current->mm->get_unmapped_exec_area)
+-		get_area = current->mm->get_unmapped_exec_area;
+-	else
+-		get_area = current->mm->get_unmapped_area;
+-
++	get_area = current->mm->get_unmapped_area;
+ 	if (file && file->f_op && file->f_op->get_unmapped_area)
+ 		get_area = file->f_op->get_unmapped_area;
+ 	addr = get_area(file, addr, len, pgoff, flags);
+@@ -1442,74 +1430,8 @@ get_unmapped_area_prot(struct file *file, unsigned long addr, unsigned long len,
+ 
+ 	return arch_rebalance_pgtables(addr, len);
+ }
+-EXPORT_SYMBOL(get_unmapped_area_prot);
+-
+-#define SHLIB_BASE             0x00110000
+-
+-unsigned long arch_get_unmapped_exec_area(struct file *filp, unsigned long addr0,
+-		unsigned long len0, unsigned long pgoff, unsigned long flags)
+-{
+-	unsigned long addr = addr0, len = len0;
+-	struct mm_struct *mm = current->mm;
+-	struct vm_area_struct *vma;
+-	unsigned long tmp;
+-
+-	if (len > TASK_SIZE)
+-		return -ENOMEM;
+-
+-	if (flags & MAP_FIXED)
+-		return addr;
+-
+-	if (!addr) {
+-		addr = randomize_range(SHLIB_BASE, 0x01000000, len);
+-	} else {
+-		addr = PAGE_ALIGN(addr);
+-		vma = find_vma(mm, addr);
+-		if (TASK_SIZE - len >= addr &&
+-		    (!vma || addr + len <= vma->vm_start))
+-			return addr;
+-	}
+-
+-	addr = SHLIB_BASE;
+-	for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
+-		/* At this point:  (!vma || addr < vma->vm_end). */
+-		if (TASK_SIZE - len < addr)
+-			return -ENOMEM;
+-
+-		if (!vma || addr + len <= vma->vm_start) {
+-			/*
+-			 * Must not let a PROT_EXEC mapping get into the
+-			 * brk area:
+-			 */
+-			if (addr + len > mm->brk)
+-				goto failed;
+-
+-			/*
+-			 * Up until the brk area we randomize addresses
+-			 * as much as possible:
+-			 */
+-			if (addr >= 0x01000000) {
+-				tmp = randomize_range(0x01000000,
+-					PAGE_ALIGN(max(mm->start_brk,
+-					(unsigned long)0x08000000)), len);
+-				vma = find_vma(mm, tmp);
+-				if (TASK_SIZE - len >= tmp &&
+-				    (!vma || tmp + len <= vma->vm_start))
+-					return tmp;
+-			}
+-			/*
+-			 * Ok, randomization didnt work out - return
+-			 * the result of the linear search:
+-			 */
+-			return addr;
+-		}
+-		addr = vma->vm_end;
+-	}
+-
+-failed:
+-	return current->mm->get_unmapped_area(filp, addr0, len0, pgoff, flags);
+-}
+ 
++EXPORT_SYMBOL(get_unmapped_area);
+ 
+ /* Look up the first VMA which satisfies  addr < vm_end,  NULL if none. */
+ struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr)
+@@ -1584,14 +1506,6 @@ out:
+ 	return prev ? prev->vm_next : vma;
+ }
+ 
+-static int over_stack_limit(unsigned long sz)
+-{
+-	if (sz < EXEC_STACK_BIAS)
+-		return 0;
+-	return (sz - EXEC_STACK_BIAS) >
+-			current->signal->rlim[RLIMIT_STACK].rlim_cur;
+-}
+-
+ /*
+  * Verify that the stack growth is acceptable and
+  * update accounting. This is shared with both the
+@@ -1608,7 +1522,7 @@ static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, un
+ 		return -ENOMEM;
+ 
+ 	/* Stack limit test */
+-	if (over_stack_limit(size))
++	if (size > rlim[RLIMIT_STACK].rlim_cur)
+ 		return -ENOMEM;
+ 
+ 	/* mlock limit tests */
+@@ -1912,14 +1826,10 @@ int split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
+ 	if (new->vm_ops && new->vm_ops->open)
+ 		new->vm_ops->open(new);
+ 
+-	if (new_below) {
+-		unsigned long old_end = vma->vm_end;
+-
++	if (new_below)
+ 		vma_adjust(vma, addr, vma->vm_end, vma->vm_pgoff +
+ 			((addr - new->vm_start) >> PAGE_SHIFT), new);
+-		if (vma->vm_flags & VM_EXEC)
+-			arch_remove_exec_range(mm, old_end);
+-	} else
++	else
+ 		vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
+ 
+ 	return 0;
+@@ -2138,7 +2048,6 @@ void exit_mmap(struct mm_struct *mm)
+ 	vm_unacct_memory(nr_accounted);
+ 	free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, 0);
+ 	tlb_finish_mmu(tlb, 0, end);
+-	arch_flush_exec_range(mm);
+ 
+ 	/*
+ 	 * Walk the list again, actually closing and freeing it,
+diff --git a/mm/mprotect.c b/mm/mprotect.c
+index 6d822ad..4de5468 100644
+--- a/mm/mprotect.c
++++ b/mm/mprotect.c
+@@ -23,12 +23,8 @@
+ #include <linux/swapops.h>
+ #include <asm/uaccess.h>
+ #include <asm/pgtable.h>
+-#include <asm/pgalloc.h>
+ #include <asm/cacheflush.h>
+ #include <asm/tlbflush.h>
+-#ifdef CONFIG_X86
+-#include <asm/desc.h>
+-#endif
+ 
+ static void change_pte_range(struct mm_struct *mm, pmd_t *pmd,
+ 		unsigned long addr, unsigned long end, pgprot_t newprot,
+@@ -138,7 +134,7 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
+ 	struct mm_struct *mm = vma->vm_mm;
+ 	unsigned long oldflags = vma->vm_flags;
+ 	long nrpages = (end - start) >> PAGE_SHIFT;
+-	unsigned long charged = 0, old_end = vma->vm_end;
++	unsigned long charged = 0;
+ 	pgoff_t pgoff;
+ 	int error;
+ 	int dirty_accountable = 0;
+@@ -202,9 +198,6 @@ success:
+ 		dirty_accountable = 1;
+ 	}
+ 
+-	if (oldflags & VM_EXEC)
+-		arch_remove_exec_range(current->mm, old_end);
+-
+ 	if (is_vm_hugetlb_page(vma))
+ 		hugetlb_change_protection(vma, start, end, vma->vm_page_prot);
+ 	else
+diff --git a/mm/mremap.c b/mm/mremap.c
+index 101f885..08e3c7f 100644
+--- a/mm/mremap.c
++++ b/mm/mremap.c
+@@ -392,8 +392,8 @@ unsigned long do_mremap(unsigned long addr,
+ 			if (vma->vm_flags & VM_MAYSHARE)
+ 				map_flags |= MAP_SHARED;
+ 
+-			new_addr = get_unmapped_area_prot(vma->vm_file, 0, new_len,
+-				vma->vm_pgoff, map_flags, vma->vm_flags & VM_EXEC);
++			new_addr = get_unmapped_area(vma->vm_file, 0, new_len,
++						vma->vm_pgoff, map_flags);
+ 			if (new_addr & ~PAGE_MASK) {
+ 				ret = new_addr;
+ 				goto out;
+-- 
+1.5.4.1
+

linux-2.6-xen-0002-squashfs-Fix-build-without-CONFIG_SMP.patch:

Index: linux-2.6-xen-0002-squashfs-Fix-build-without-CONFIG_SMP.patch
===================================================================
RCS file: linux-2.6-xen-0002-squashfs-Fix-build-without-CONFIG_SMP.patch
diff -N linux-2.6-xen-0002-squashfs-Fix-build-without-CONFIG_SMP.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0002-squashfs-Fix-build-without-CONFIG_SMP.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,30 @@
+From 1fa2a8ec8dd7f0a05035b50dec00a92710dab698 Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Wed, 5 Mar 2008 12:50:50 +0000
+Subject: [PATCH] squashfs: Fix build without CONFIG_SMP
+
+wait_event() needs various definitions from <linux/sched.h>
+
+With CONFIG_SMP, <linux/smp_lock.h> pulls in <linux/sched.h>,
+but without CONFIG_SMP it fails to build.
+
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ fs/squashfs/inode.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/fs/squashfs/inode.c b/fs/squashfs/inode.c
+index f578528..f5829f2 100644
+--- a/fs/squashfs/inode.c
++++ b/fs/squashfs/inode.c
+@@ -32,6 +32,7 @@
+ #include <linux/vmalloc.h>
+ #include <linux/smp_lock.h>
+ #include <linux/exportfs.h>
++#include <linux/sched.h>
+ 
+ #include "squashfs.h"
+ 
+-- 
+1.5.4.1
+

linux-2.6-xen-0003-xen-Make-hvc0-the-preferred-console-in-domU.patch:

Index: linux-2.6-xen-0003-xen-Make-hvc0-the-preferred-console-in-domU.patch
===================================================================
RCS file: linux-2.6-xen-0003-xen-Make-hvc0-the-preferred-console-in-domU.patch
diff -N linux-2.6-xen-0003-xen-Make-hvc0-the-preferred-console-in-domU.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0003-xen-Make-hvc0-the-preferred-console-in-domU.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,39 @@
+From 8085f21aff0de59e5c2f6937823040dff8a003ed Mon Sep 17 00:00:00 2001
+From: Markus Armbruster <armbru at redhat.com>
+Date: Fri, 29 Feb 2008 17:37:43 +0000
+Subject: [PATCH] xen: Make hvc0 the preferred console in domU
+
+This makes the Xen console just work.  Before, you had to ask for it
+on the kernel command line with console=hvc0
+
+Signed-off-by: Markus Armbruster <armbru at redhat.com>
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ arch/x86/xen/enlighten.c |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
+index 8b9ee27..a94605e 100644
+--- a/arch/x86/xen/enlighten.c
++++ b/arch/x86/xen/enlighten.c
+@@ -25,6 +25,7 @@
+ #include <linux/mm.h>
+ #include <linux/page-flags.h>
+ #include <linux/highmem.h>
++#include <linux/console.h>
+ 
+ #include <xen/interface/xen.h>
+ #include <xen/interface/physdev.h>
+@@ -1210,6 +1211,9 @@ asmlinkage void __init xen_start_kernel(void)
+ 		? __pa(xen_start_info->mod_start) : 0;
+ 	boot_params.hdr.ramdisk_size = xen_start_info->mod_len;
+ 
++	if (!is_initial_xendomain())
++		add_preferred_console("hvc", 0, NULL);
++
+ 	/* Start the world */
+ 	start_kernel();
+ }
+-- 
+1.5.4.1
+

linux-2.6-xen-0004-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch:

Index: linux-2.6-xen-0004-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch
===================================================================
RCS file: linux-2.6-xen-0004-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch
diff -N linux-2.6-xen-0004-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0004-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,78 @@
+From 6007e6d44bea69bc39ddb3a45185a1b4f3d42f06 Mon Sep 17 00:00:00 2001
+From: Markus Armbruster <armbru at redhat.com>
+Date: Mon, 25 Feb 2008 14:02:24 +0100
+Subject: [PATCH] xen: Make xen-blkfront write its protocol ABI to xenstore
+
+Frontends are expected to write their protocol ABI to xenstore.  Since
+the protocol ABI defaults to the backend's native ABI, things work
+fine without that as long as the frontend's native ABI is identical to
+the backend's native ABI.  This is not the case for xen-blkfront
+running 32-on-64, because its ABI differs between 32 and 64 bit, and
+thus needs this fix.
+
+Based on http://xenbits.xensource.com/xen-unstable.hg?rev/c545932a18f3
+and http://xenbits.xensource.com/xen-unstable.hg?rev/ffe52263b430 by
+Gerd Hoffmann <kraxel at suse.de>
+
+Signed-off-by: Markus Armbruster <armbru at redhat.com>
+---
+ drivers/block/xen-blkfront.c         |    7 +++++++
+ include/xen/interface/io/protocols.h |   21 +++++++++++++++++++++
+ 2 files changed, 28 insertions(+), 0 deletions(-)
+ create mode 100644 include/xen/interface/io/protocols.h
+
+diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
+index 9c6f3f9..2e7c81e 100644
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -47,6 +47,7 @@
+ 
+ #include <xen/interface/grant_table.h>
+ #include <xen/interface/io/blkif.h>
++#include <xen/interface/io/protocols.h>
+ 
+ #include <asm/xen/hypervisor.h>
+ 
+@@ -614,6 +615,12 @@ again:
+ 		message = "writing event-channel";
+ 		goto abort_transaction;
+ 	}
++	err = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
++			    XEN_IO_PROTO_ABI_NATIVE);
++	if (err) {
++		message = "writing protocol";
++		goto abort_transaction;
++	}
+ 
+ 	err = xenbus_transaction_end(xbt, 0);
+ 	if (err) {
+diff --git a/include/xen/interface/io/protocols.h b/include/xen/interface/io/protocols.h
+new file mode 100644
+index 0000000..01fc8ae
+--- /dev/null
++++ b/include/xen/interface/io/protocols.h
+@@ -0,0 +1,21 @@
++#ifndef __XEN_PROTOCOLS_H__
++#define __XEN_PROTOCOLS_H__
++
++#define XEN_IO_PROTO_ABI_X86_32     "x86_32-abi"
++#define XEN_IO_PROTO_ABI_X86_64     "x86_64-abi"
++#define XEN_IO_PROTO_ABI_IA64       "ia64-abi"
++#define XEN_IO_PROTO_ABI_POWERPC64  "powerpc64-abi"
++
++#if defined(__i386__)
++# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_X86_32
++#elif defined(__x86_64__)
++# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_X86_64
++#elif defined(__ia64__)
++# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_IA64
++#elif defined(__powerpc64__)
++# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_POWERPC64
++#else
++# error arch fixup needed here
++#endif
++
++#endif
+-- 
+1.5.4.1
+

linux-2.6-xen-0005-fbdev-Make-deferred-I-O-work-as-advertized.patch:

Index: linux-2.6-xen-0005-fbdev-Make-deferred-I-O-work-as-advertized.patch
===================================================================
RCS file: linux-2.6-xen-0005-fbdev-Make-deferred-I-O-work-as-advertized.patch
diff -N linux-2.6-xen-0005-fbdev-Make-deferred-I-O-work-as-advertized.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0005-fbdev-Make-deferred-I-O-work-as-advertized.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,87 @@
+From 014bae01b0076eb96cd5ba1013253623dba06254 Mon Sep 17 00:00:00 2001
+From: Markus Armbruster <armbru at redhat.com>
+Date: Mon, 25 Feb 2008 14:03:52 +0100
+Subject: [PATCH] fbdev: Make deferred I/O work as advertized
+
+Deferred I/O was utterly broken.  Reading the mmap()ed framebuffer
+worked, but writing it made the VM endlessly invoke
+vm_ops.page_mkwrite().  That happened because we failed to set
+page->mapping and page->index.
+
+The fix is to set them, and clean up properly before the framebuffer
+gets released.
+
+Fix extracted from this linux-fbdev-devel message:
+
+    Subject: [PATCH 1/1 2.6.24] fbdev: defio and Metronomefb
+    From: Jaya Kumar <jayakumar.lkml at gmail.com>
+    Date: 2008-02-18 13:41:26
+
+Signed-off-by: Jaya Kumar <jayakumar.lkml at gmail.com>
+Signed-off-by: Markus Armbruster <armbru at redhat.com>
+---
+ drivers/video/fb_defio.c |   22 ++++++++++++++++++++--
+ 1 files changed, 20 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c
+index 0f8cfb9..24843fd 100644
+--- a/drivers/video/fb_defio.c
++++ b/drivers/video/fb_defio.c
+@@ -4,7 +4,7 @@
+  *  Copyright (C) 2006 Jaya Kumar
+  *
+  * This file is subject to the terms and conditions of the GNU General Public
+- * License.  See the file COPYING in the main directory of this archive
++ * License. See the file COPYING in the main directory of this archive
+  * for more details.
+  */
+ 
+@@ -31,7 +31,7 @@ static int fb_deferred_io_fault(struct vm_area_struct *vma,
+ 	unsigned long offset;
+ 	struct page *page;
+ 	struct fb_info *info = vma->vm_private_data;
+-	/* info->screen_base is in System RAM */
++	/* info->screen_base is virtual memory */
+ 	void *screen_base = (void __force *) info->screen_base;
+ 
+ 	offset = vmf->pgoff << PAGE_SHIFT;
+@@ -43,6 +43,15 @@ static int fb_deferred_io_fault(struct vm_area_struct *vma,
+ 		return VM_FAULT_SIGBUS;
+ 
+ 	get_page(page);
++
++	if (vma->vm_file)
++		page->mapping = vma->vm_file->f_mapping;
++	else
++		printk(KERN_ERR "no mapping available\n");
++
++	BUG_ON(!page->mapping);
++	page->index = vmf->pgoff;
++
+ 	vmf->page = page;
+ 	return 0;
+ }
+@@ -138,11 +147,20 @@ EXPORT_SYMBOL_GPL(fb_deferred_io_init);
+ 
+ void fb_deferred_io_cleanup(struct fb_info *info)
+ {
++	void *screen_base = (void __force *) info->screen_base;
+ 	struct fb_deferred_io *fbdefio = info->fbdefio;
++	struct page *page;
++	int i;
+ 
+ 	BUG_ON(!fbdefio);
+ 	cancel_delayed_work(&info->deferred_work);
+ 	flush_scheduled_work();
++
++	/* clear out the mapping that we setup */
++	for (i = 0 ; i < info->fix.smem_len; i += PAGE_SIZE) {
++		page = vmalloc_to_page(screen_base + i);
++		page->mapping = NULL;
++	}
+ }
+ EXPORT_SYMBOL_GPL(fb_deferred_io_cleanup);
+ 
+-- 
+1.5.4.1
+

linux-2.6-xen-0006-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch:

Index: linux-2.6-xen-0006-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch
===================================================================
RCS file: linux-2.6-xen-0006-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch
diff -N linux-2.6-xen-0006-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0006-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,1254 @@
+From 38a7237d6e5d70a4deafc7ef14e90c76b391834f Mon Sep 17 00:00:00 2001
+From: Markus Armbruster <armbru at redhat.com>
+Date: Mon, 25 Feb 2008 14:06:46 +0100
+Subject: [PATCH] xen pvfb: Para-virtual framebuffer, keyboard and pointer driver
+
+This is a pair of Xen para-virtual frontend device drivers:
+drivers/video/xen-fbfront.c provides a framebuffer, and
+drivers/input/xen-kbdfront provides keyboard and mouse.
+
+The backends run in dom0 user space.
+
+The two drivers are not in two separate patches, because the
+intermediate step (one driver, not the other) is somewhat problematic:
+the backend in dom0 needs both drivers, and will refuse to complete
+device initialization unless they're both present.
+
+Signed-off-by: Markus Armbruster <armbru at redhat.com>
+---
+ drivers/input/Kconfig            |    9 +
+ drivers/input/Makefile           |    2 +
+ drivers/input/xen-kbdfront.c     |  340 +++++++++++++++++++++++
+ drivers/video/Kconfig            |   14 +
+ drivers/video/Makefile           |    1 +
+ drivers/video/xen-fbfront.c      |  550 ++++++++++++++++++++++++++++++++++++++
+ include/xen/interface/io/fbif.h  |  124 +++++++++
+ include/xen/interface/io/kbdif.h |  114 ++++++++
+ 8 files changed, 1154 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/xen-kbdfront.c
+ create mode 100644 drivers/video/xen-fbfront.c
+ create mode 100644 include/xen/interface/io/fbif.h
+ create mode 100644 include/xen/interface/io/kbdif.h
+
+diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
+index d84ac4a..747633c 100644
+--- a/drivers/input/Kconfig
++++ b/drivers/input/Kconfig
+@@ -149,6 +149,15 @@ config INPUT_APMPOWER
+ 	  To compile this driver as a module, choose M here: the
+ 	  module will be called apm-power.
+ 
++config XEN_KBDDEV_FRONTEND
++	tristate "Xen virtual keyboard and mouse support"
++	depends on XEN_FBDEV_FRONTEND
++	default y
++	help
++	  This driver implements the front-end of the Xen virtual
++	  keyboard and mouse device driver.  It communicates with a back-end
++	  in another domain.
++
+ comment "Input Device Drivers"
+ 
+ source "drivers/input/keyboard/Kconfig"
+diff --git a/drivers/input/Makefile b/drivers/input/Makefile
+index 24bdec1..606e1b9 100644
+--- a/drivers/input/Makefile
++++ b/drivers/input/Makefile
+@@ -24,3 +24,5 @@ obj-$(CONFIG_INPUT_MISC)	+= misc/
+ obj-$(CONFIG_INPUT_LIRC)	+= lirc/
+ 
+ obj-$(CONFIG_INPUT_APMPOWER)	+= apm-power.o
++
++obj-$(CONFIG_XEN_KBDDEV_FRONTEND)	+= xen-kbdfront.o
+diff --git a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c
+new file mode 100644
+index 0000000..0f47f46
+--- /dev/null
++++ b/drivers/input/xen-kbdfront.c
+@@ -0,0 +1,340 @@
++/*
++ * Xen para-virtual input device
++ *
++ * Copyright (C) 2005 Anthony Liguori <aliguori at us.ibm.com>
++ * Copyright (C) 2006-2008 Red Hat, Inc., Markus Armbruster <armbru at redhat.com>
++ *
++ *  Based on linux/drivers/input/mouse/sermouse.c
++ *
++ *  This file is subject to the terms and conditions of the GNU General Public
++ *  License. See the file COPYING in the main directory of this archive for
++ *  more details.
++ */
++
++/*
++ * TODO:
++ *
++ * Switch to grant tables together with xen-fbfront.c.
++ */
++
++#include <linux/kernel.h>
++#include <linux/errno.h>
++#include <linux/module.h>
++#include <linux/input.h>
++#include <asm/xen/hypervisor.h>
++#include <xen/events.h>
++#include <xen/page.h>
++#include <xen/interface/io/fbif.h>
++#include <xen/interface/io/kbdif.h>
++#include <xen/xenbus.h>
++
++struct xenkbd_info {
++	struct input_dev *kbd;
++	struct input_dev *ptr;
++	struct xenkbd_page *page;
++	int irq;
++	struct xenbus_device *xbdev;
++	char phys[32];
++};
++
++static int xenkbd_remove(struct xenbus_device *);
++static int xenkbd_connect_backend(struct xenbus_device *, struct xenkbd_info *);
++static void xenkbd_disconnect_backend(struct xenkbd_info *);
++
++/*
++ * Note: if you need to send out events, see xenfb_do_update() for how
++ * to do that.
++ */
++
++static irqreturn_t input_handler(int rq, void *dev_id)
++{
++	struct xenkbd_info *info = dev_id;
++	struct xenkbd_page *page = info->page;
++	__u32 cons, prod;
++
++	prod = page->in_prod;
++	if (prod == page->in_cons)
++		return IRQ_HANDLED;
++	rmb();			/* ensure we see ring contents up to prod */
++	for (cons = page->in_cons; cons != prod; cons++) {
++		union xenkbd_in_event *event;
++		struct input_dev *dev;
++		event = &XENKBD_IN_RING_REF(page, cons);
++
++		dev = info->ptr;
++		switch (event->type) {
++		case XENKBD_TYPE_MOTION:
++			input_report_rel(dev, REL_X, event->motion.rel_x);
++			input_report_rel(dev, REL_Y, event->motion.rel_y);
++			break;
++		case XENKBD_TYPE_KEY:
++			dev = NULL;
++			if (test_bit(event->key.keycode, info->kbd->keybit))
++				dev = info->kbd;
++			if (test_bit(event->key.keycode, info->ptr->keybit))
++				dev = info->ptr;
++			if (dev)
++				input_report_key(dev, event->key.keycode,
++						 event->key.pressed);
++			else
++				printk(KERN_WARNING
++				       "xenkbd: unhandled keycode 0x%x\n",
++				       event->key.keycode);
++			break;
++		case XENKBD_TYPE_POS:
++			input_report_abs(dev, ABS_X, event->pos.abs_x);
++			input_report_abs(dev, ABS_Y, event->pos.abs_y);
++			break;
++		}
++		if (dev)
++			input_sync(dev);
++	}
++	mb();			/* ensure we got ring contents */
++	page->in_cons = cons;
++	notify_remote_via_irq(info->irq);
++
++	return IRQ_HANDLED;
++}
++
++static int __devinit xenkbd_probe(struct xenbus_device *dev,
++				  const struct xenbus_device_id *id)
++{
++	int ret, i;
++	struct xenkbd_info *info;
++	struct input_dev *kbd, *ptr;
++
++	info = kzalloc(sizeof(*info), GFP_KERNEL);
++	if (!info) {
++		xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure");
++		return -ENOMEM;
++	}
++	dev->dev.driver_data = info;
++	info->xbdev = dev;
++	info->irq = -1;
++	snprintf(info->phys, sizeof(info->phys), "xenbus/%s", dev->nodename);
++
++	info->page = (void *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
++	if (!info->page)
++		goto error_nomem;
++
++	/* keyboard */
++	kbd = input_allocate_device();
++	if (!kbd)
++		goto error_nomem;
++	kbd->name = "Xen Virtual Keyboard";
++	kbd->phys = info->phys;
++	kbd->id.bustype = BUS_PCI;
++	kbd->id.vendor = 0x5853;
++	kbd->id.product = 0xffff;
++	kbd->evbit[0] = BIT(EV_KEY);
++	for (i = KEY_ESC; i < KEY_UNKNOWN; i++)
++		set_bit(i, kbd->keybit);
++	for (i = KEY_OK; i < KEY_MAX; i++)
++		set_bit(i, kbd->keybit);
++
++	ret = input_register_device(kbd);
++	if (ret) {
++		input_free_device(kbd);
++		xenbus_dev_fatal(dev, ret, "input_register_device(kbd)");
++		goto error;
++	}
++	info->kbd = kbd;
++
++	/* pointing device */
++	ptr = input_allocate_device();
++	if (!ptr)
++		goto error_nomem;
++	ptr->name = "Xen Virtual Pointer";
++	ptr->phys = info->phys;
++	ptr->id.bustype = BUS_PCI;
++	ptr->id.vendor = 0x5853;
++	ptr->id.product = 0xfffe;
++	ptr->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS);
++	for (i = BTN_LEFT; i <= BTN_TASK; i++)
++		set_bit(i, ptr->keybit);
++	ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y);
++	input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0);
++	input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0);
++
++	ret = input_register_device(ptr);
++	if (ret) {
++		input_free_device(ptr);
++		xenbus_dev_fatal(dev, ret, "input_register_device(ptr)");
++		goto error;
++	}
++	info->ptr = ptr;
++
++	ret = xenkbd_connect_backend(dev, info);
++	if (ret < 0)
++		goto error;
++
++	return 0;
++
++ error_nomem:
++	ret = -ENOMEM;
++	xenbus_dev_fatal(dev, ret, "allocating device memory");
++ error:
++	xenkbd_remove(dev);
++	return ret;
++}
++
++static int xenkbd_resume(struct xenbus_device *dev)
++{
++	struct xenkbd_info *info = dev->dev.driver_data;
++
++	xenkbd_disconnect_backend(info);
++	memset(info->page, 0, PAGE_SIZE);
++	return xenkbd_connect_backend(dev, info);
++}
++
++static int xenkbd_remove(struct xenbus_device *dev)
++{
++	struct xenkbd_info *info = dev->dev.driver_data;
++
++	xenkbd_disconnect_backend(info);
++	if (info->kbd)
++		input_unregister_device(info->kbd);
++	if (info->ptr)
++		input_unregister_device(info->ptr);
++	free_page((unsigned long)info->page);
++	kfree(info);
++	return 0;
++}
++
++static int xenkbd_connect_backend(struct xenbus_device *dev,
++				  struct xenkbd_info *info)
++{
++	int ret, evtchn;
++	struct xenbus_transaction xbt;
++
++	ret = xenbus_alloc_evtchn(dev, &evtchn);
++	if (ret)
++		return ret;
++	ret = bind_evtchn_to_irqhandler(evtchn, input_handler,
++					0, dev->devicetype, info);
++	if (ret < 0) {
++		xenbus_free_evtchn(dev, evtchn);
++		xenbus_dev_fatal(dev, ret, "bind_evtchn_to_irqhandler");
++		return ret;
++	}
++	info->irq = ret;
++
++ again:
++	ret = xenbus_transaction_start(&xbt);
++	if (ret) {
++		xenbus_dev_fatal(dev, ret, "starting transaction");
++		return ret;
++	}
++	ret = xenbus_printf(xbt, dev->nodename, "page-ref", "%lu",
++			    virt_to_mfn(info->page));
++	if (ret)
++		goto error_xenbus;
++	ret = xenbus_printf(xbt, dev->nodename, "event-channel", "%u",
++			    evtchn);
++	if (ret)
++		goto error_xenbus;
++	ret = xenbus_transaction_end(xbt, 0);
++	if (ret) {
++		if (ret == -EAGAIN)
++			goto again;
++		xenbus_dev_fatal(dev, ret, "completing transaction");
++		return ret;
++	}
++
++	xenbus_switch_state(dev, XenbusStateInitialised);
++	return 0;
++
++ error_xenbus:
++	xenbus_transaction_end(xbt, 1);
++	xenbus_dev_fatal(dev, ret, "writing xenstore");
++	return ret;
++}
++
++static void xenkbd_disconnect_backend(struct xenkbd_info *info)
++{
++	if (info->irq >= 0)
++		unbind_from_irqhandler(info->irq, info);
++	info->irq = -1;
++}
++
++static void xenkbd_backend_changed(struct xenbus_device *dev,
++				   enum xenbus_state backend_state)
++{
++	struct xenkbd_info *info = dev->dev.driver_data;
++	int ret, val;
++
++	switch (backend_state) {
++	case XenbusStateInitialising:
++	case XenbusStateInitialised:
++	case XenbusStateUnknown:
++	case XenbusStateClosed:
++		break;
++
++	case XenbusStateInitWait:
++InitWait:
++		ret = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
++				   "feature-abs-pointer", "%d", &val);
++		if (ret < 0)
++			val = 0;
++		if (val) {
++			ret = xenbus_printf(XBT_NIL, info->xbdev->nodename,
++					    "request-abs-pointer", "1");
++			if (ret)
++				printk(KERN_WARNING
++				       "xenkbd: can't request abs-pointer");
++		}
++		xenbus_switch_state(dev, XenbusStateConnected);
++		break;
++
++	case XenbusStateConnected:
++		/*
++		 * Work around xenbus race condition: If backend goes
++		 * through InitWait to Connected fast enough, we can
++		 * get Connected twice here.
++		 */
++		if (dev->state != XenbusStateConnected)
++			goto InitWait; /* no InitWait seen yet, fudge it */
++		break;
++
++	case XenbusStateClosing:
++		xenbus_frontend_closed(dev);
++		break;
++	}
++}
++
++static struct xenbus_device_id xenkbd_ids[] = {
++	{ "vkbd" },
++	{ "" }
++};
++
++static struct xenbus_driver xenkbd = {
++	.name = "vkbd",
++	.owner = THIS_MODULE,
++	.ids = xenkbd_ids,
++	.probe = xenkbd_probe,
++	.remove = xenkbd_remove,
++	.resume = xenkbd_resume,
++	.otherend_changed = xenkbd_backend_changed,
++};
++
++static int __init xenkbd_init(void)
++{
++	if (!is_running_on_xen())
++		return -ENODEV;
++
++	/* Nothing to do if running in dom0. */
++	if (is_initial_xendomain())
++		return -ENODEV;
++
++	return xenbus_register_frontend(&xenkbd);
++}
++
++static void __exit xenkbd_cleanup(void)
++{
++	xenbus_unregister_driver(&xenkbd);
++}
++
++module_init(xenkbd_init);
++module_exit(xenkbd_cleanup);
++
++MODULE_LICENSE("GPL");
+diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
+index 758435f..67de177 100644
+--- a/drivers/video/Kconfig
++++ b/drivers/video/Kconfig
+@@ -1903,6 +1903,20 @@ config FB_VIRTUAL
+ 
+ 	  If unsure, say N.
+ 
++config XEN_FBDEV_FRONTEND
++	tristate "Xen virtual frame buffer support"
++	depends on FB && XEN
++	select FB_SYS_FILLRECT
++	select FB_SYS_COPYAREA
++	select FB_SYS_IMAGEBLIT
++	select FB_SYS_FOPS
++	select FB_DEFERRED_IO
++	default y
++	help
++	  This driver implements the front-end of the Xen virtual
++	  frame buffer driver.  It communicates with a back-end
++	  in another domain.
++
+ source "drivers/video/omap/Kconfig"
+ 
+ source "drivers/video/backlight/Kconfig"
+diff --git a/drivers/video/Makefile b/drivers/video/Makefile
+index 83e02b3..d3ab9b2 100644
+--- a/drivers/video/Makefile
++++ b/drivers/video/Makefile
+@@ -113,6 +113,7 @@ obj-$(CONFIG_FB_PS3)		  += ps3fb.o
+ obj-$(CONFIG_FB_SM501)            += sm501fb.o
+ obj-$(CONFIG_FB_XILINX)           += xilinxfb.o
+ obj-$(CONFIG_FB_OMAP)             += omap/
++obj-$(CONFIG_XEN_FBDEV_FRONTEND)  += xen-fbfront.o
+ 
+ # Platform or fallback drivers go here
+ obj-$(CONFIG_FB_UVESA)            += uvesafb.o
+diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c
+new file mode 100644
+index 0000000..619a6f8
+--- /dev/null
++++ b/drivers/video/xen-fbfront.c
+@@ -0,0 +1,550 @@
++/*
++ * Xen para-virtual frame buffer device
++ *
++ * Copyright (C) 2005-2006 Anthony Liguori <aliguori at us.ibm.com>
++ * Copyright (C) 2006-2008 Red Hat, Inc., Markus Armbruster <armbru at redhat.com>
++ *
++ *  Based on linux/drivers/video/q40fb.c
++ *
++ *  This file is subject to the terms and conditions of the GNU General Public
++ *  License. See the file COPYING in the main directory of this archive for
++ *  more details.
++ */
++
++/*
++ * TODO:
++ *
++ * Switch to grant tables when they become capable of dealing with the
++ * frame buffer.
++ */
++
++#include <linux/kernel.h>
++#include <linux/errno.h>
++#include <linux/fb.h>
++#include <linux/module.h>
++#include <linux/vmalloc.h>
++#include <linux/mm.h>
++#include <asm/xen/hypervisor.h>
++#include <xen/events.h>
++#include <xen/page.h>
++#include <xen/interface/io/fbif.h>
++#include <xen/interface/io/protocols.h>
++#include <xen/xenbus.h>
++
++struct xenfb_info {
++	unsigned char		*fb;
++	struct fb_info		*fb_info;
++	int			x1, y1, x2, y2;	/* dirty rectangle,
++						   protected by dirty_lock */
++	spinlock_t		dirty_lock;
++	int			nr_pages;
++	int			irq;
++	struct xenfb_page	*page;
++	unsigned long 		*mfns;
++	int			update_wanted; /* XENFB_TYPE_UPDATE wanted */
++
++	struct xenbus_device	*xbdev;
++};
++
++static u32 xenfb_mem_len = XENFB_WIDTH * XENFB_HEIGHT * XENFB_DEPTH / 8;
++
++static int xenfb_remove(struct xenbus_device *);
++static void xenfb_init_shared_page(struct xenfb_info *);
++static int xenfb_connect_backend(struct xenbus_device *, struct xenfb_info *);
++static void xenfb_disconnect_backend(struct xenfb_info *);
++
++static void xenfb_do_update(struct xenfb_info *info,
++			    int x, int y, int w, int h)
++{
++	union xenfb_out_event event;
++	u32 prod;
++
++	event.type = XENFB_TYPE_UPDATE;
++	event.update.x = x;
++	event.update.y = y;
++	event.update.width = w;
++	event.update.height = h;
++
++	prod = info->page->out_prod;
++	/* caller ensures !xenfb_queue_full() */
++	mb();			/* ensure ring space available */
++	XENFB_OUT_RING_REF(info->page, prod) = event;
++	wmb();			/* ensure ring contents visible */
++	info->page->out_prod = prod + 1;
++
++	notify_remote_via_irq(info->irq);
++}
++
++static int xenfb_queue_full(struct xenfb_info *info)
++{
++	u32 cons, prod;
++
++	prod = info->page->out_prod;
++	cons = info->page->out_cons;
++	return prod - cons == XENFB_OUT_RING_LEN;
++}
++
++static void xenfb_refresh(struct xenfb_info *info,
++			  int x1, int y1, int w, int h)
++{
++	unsigned long flags;
++	int y2 = y1 + h - 1;
++	int x2 = x1 + w - 1;
++
++	if (!info->update_wanted)
++		return;
++
++	spin_lock_irqsave(&info->dirty_lock, flags);
++
++	/* Combine with dirty rectangle: */
++	if (info->y1 < y1)
++		y1 = info->y1;
++	if (info->y2 > y2)
++		y2 = info->y2;
++	if (info->x1 < x1)
++		x1 = info->x1;
++	if (info->x2 > x2)
++		x2 = info->x2;
++
++	if (xenfb_queue_full(info)) {
++		/* Can't send right now, stash it in the dirty rectangle */
++		info->x1 = x1;
++		info->x2 = x2;
++		info->y1 = y1;
++		info->y2 = y2;
++		spin_unlock_irqrestore(&info->dirty_lock, flags);
++		return;
++	}
++
++	/* Clear dirty rectangle: */
++	info->x1 = info->y1 = INT_MAX;
++	info->x2 = info->y2 = 0;
++
++	spin_unlock_irqrestore(&info->dirty_lock, flags);
++
++	if (x1 <= x2 && y1 <= y2)
++		xenfb_do_update(info, x1, y1, x2 - x1 + 1, y2 - y1 + 1);
++}
++
++static void xenfb_deferred_io(struct fb_info *fb_info,
++			      struct list_head *pagelist)
++{
++	struct xenfb_info *info = fb_info->par;
++	struct page *page;
++	unsigned long beg, end;
++	int y1, y2, miny, maxy;
++
++	miny = INT_MAX;
++	maxy = 0;
++	list_for_each_entry(page, pagelist, lru) {
++		beg = page->index << PAGE_SHIFT;
++		end = beg + PAGE_SIZE - 1;
++		y1 = beg / fb_info->fix.line_length;
++		y2 = end / fb_info->fix.line_length;
++		if (y2 >= fb_info->var.yres)
++			y2 = fb_info->var.yres - 1;
++		if (miny > y1)
++			miny = y1;
++		if (maxy < y2)
++			maxy = y2;
++	}
++	xenfb_refresh(info, 0, miny, fb_info->var.xres, maxy - miny + 1);
++}
++
++static struct fb_deferred_io xenfb_defio = {
++	.delay		= HZ / 20,
++	.deferred_io	= xenfb_deferred_io,
++};
++
++static int xenfb_setcolreg(unsigned regno, unsigned red, unsigned green,
++			   unsigned blue, unsigned transp,
++			   struct fb_info *info)
++{
++	u32 v;
++
++	if (regno > info->cmap.len)
++		return 1;
++
++#define CNVT_TOHW(val, width) ((((val)<<(width))+0x7FFF-(val))>>16)
++	red = CNVT_TOHW(red, info->var.red.length);
++	green = CNVT_TOHW(green, info->var.green.length);
++	blue = CNVT_TOHW(blue, info->var.blue.length);
++	transp = CNVT_TOHW(transp, info->var.transp.length);
++#undef CNVT_TOHW
++
++	v = (red << info->var.red.offset) |
++	    (green << info->var.green.offset) |
++	    (blue << info->var.blue.offset);
++
++	switch (info->var.bits_per_pixel) {
++	case 16:
++	case 24:
++	case 32:
++		((u32 *)info->pseudo_palette)[regno] = v;
++		break;
++	}
++
++	return 0;
++}
++
++static void xenfb_fillrect(struct fb_info *p, const struct fb_fillrect *rect)
++{
++	struct xenfb_info *info = p->par;
++
++	sys_fillrect(p, rect);
++	xenfb_refresh(info, rect->dx, rect->dy, rect->width, rect->height);
++}
++
++static void xenfb_imageblit(struct fb_info *p, const struct fb_image *image)
++{
++	struct xenfb_info *info = p->par;
++
++	sys_imageblit(p, image);
++	xenfb_refresh(info, image->dx, image->dy, image->width, image->height);
++}
++
++static void xenfb_copyarea(struct fb_info *p, const struct fb_copyarea *area)
++{
++	struct xenfb_info *info = p->par;
++
++	sys_copyarea(p, area);
++	xenfb_refresh(info, area->dx, area->dy, area->width, area->height);
++}
++
++static ssize_t xenfb_write(struct fb_info *p, const char __user *buf,
++			size_t count, loff_t *ppos)
++{
++	struct xenfb_info *info = p->par;
++	ssize_t res;
++
++	res = fb_sys_write(p, buf, count, ppos);
++	xenfb_refresh(info, 0, 0, info->page->width, info->page->height);
++	return res;
++}
++
++static struct fb_ops xenfb_fb_ops = {
++	.owner		= THIS_MODULE,
++	.fb_read	= fb_sys_read,
++	.fb_write	= xenfb_write,
++	.fb_setcolreg	= xenfb_setcolreg,
++	.fb_fillrect	= xenfb_fillrect,
++	.fb_copyarea	= xenfb_copyarea,
++	.fb_imageblit	= xenfb_imageblit,
++};
++
++static irqreturn_t xenfb_event_handler(int rq, void *dev_id)
++{
++	/*
++	 * No in events recognized, simply ignore them all.
++	 * If you need to recognize some, see xen-kbdfront's
++	 * input_handler() for how to do that.
++	 */
++	struct xenfb_info *info = dev_id;
++	struct xenfb_page *page = info->page;
++
++	if (page->in_cons != page->in_prod) {
++		info->page->in_cons = info->page->in_prod;
++		notify_remote_via_irq(info->irq);
++	}
++
++	/* Flush dirty rectangle: */
++	xenfb_refresh(info, INT_MAX, INT_MAX, -INT_MAX, -INT_MAX);
++
++	return IRQ_HANDLED;
++}
++
++static int __devinit xenfb_probe(struct xenbus_device *dev,
++				 const struct xenbus_device_id *id)
++{
++	struct xenfb_info *info;
++	struct fb_info *fb_info;
++	int ret;
++
++	info = kzalloc(sizeof(*info), GFP_KERNEL);
++	if (info == NULL) {
++		xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure");
++		return -ENOMEM;
++	}
++	dev->dev.driver_data = info;
++	info->xbdev = dev;
++	info->irq = -1;
++	info->x1 = info->y1 = INT_MAX;
++	spin_lock_init(&info->dirty_lock);
++
++	info->fb = vmalloc(xenfb_mem_len);
++	if (info->fb == NULL)
++		goto error_nomem;
++	memset(info->fb, 0, xenfb_mem_len);
++
++	info->nr_pages = (xenfb_mem_len + PAGE_SIZE - 1) >> PAGE_SHIFT;
++
++	info->mfns = vmalloc(sizeof(unsigned long) * info->nr_pages);
++	if (!info->mfns)
++		goto error_nomem;
++
++	/* set up shared page */
++	info->page = (void *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
++	if (!info->page)
++		goto error_nomem;
++
++	xenfb_init_shared_page(info);
++
++	/* abusing framebuffer_alloc() to allocate pseudo_palette */
++	fb_info = framebuffer_alloc(sizeof(u32) * 256, NULL);
++	if (fb_info == NULL)
++		goto error_nomem;
++
++	/* complete the abuse: */
++	fb_info->pseudo_palette = fb_info->par;
++	fb_info->par = info;
++
++	fb_info->screen_base = info->fb;
++
++	fb_info->fbops = &xenfb_fb_ops;
++	fb_info->var.xres_virtual = fb_info->var.xres = info->page->width;
++	fb_info->var.yres_virtual = fb_info->var.yres = info->page->height;
++	fb_info->var.bits_per_pixel = info->page->depth;
++
++	fb_info->var.red = (struct fb_bitfield){16, 8, 0};
++	fb_info->var.green = (struct fb_bitfield){8, 8, 0};
++	fb_info->var.blue = (struct fb_bitfield){0, 8, 0};
++
++	fb_info->var.activate = FB_ACTIVATE_NOW;
++	fb_info->var.height = -1;
++	fb_info->var.width = -1;
++	fb_info->var.vmode = FB_VMODE_NONINTERLACED;
++
++	fb_info->fix.visual = FB_VISUAL_TRUECOLOR;
++	fb_info->fix.line_length = info->page->line_length;
++	fb_info->fix.smem_start = 0;
++	fb_info->fix.smem_len = xenfb_mem_len;
++	strcpy(fb_info->fix.id, "xen");
++	fb_info->fix.type = FB_TYPE_PACKED_PIXELS;
++	fb_info->fix.accel = FB_ACCEL_NONE;
++
++	fb_info->flags = FBINFO_FLAG_DEFAULT;
++
++	ret = fb_alloc_cmap(&fb_info->cmap, 256, 0);
++	if (ret < 0) {
++		framebuffer_release(fb_info);
++		xenbus_dev_fatal(dev, ret, "fb_alloc_cmap");
++		goto error;
++	}
++
++	fb_info->fbdefio = &xenfb_defio;
++	fb_deferred_io_init(fb_info);
++
++	ret = register_framebuffer(fb_info);
++	if (ret) {
++		fb_deferred_io_cleanup(fb_info);
++		fb_dealloc_cmap(&fb_info->cmap);
++		framebuffer_release(fb_info);
++		xenbus_dev_fatal(dev, ret, "register_framebuffer");
++		goto error;
++	}
++	info->fb_info = fb_info;
++
++	ret = xenfb_connect_backend(dev, info);
++	if (ret < 0)
++		goto error;
++
++	return 0;
++
++ error_nomem:
++	ret = -ENOMEM;
++	xenbus_dev_fatal(dev, ret, "allocating device memory");
++ error:
++	xenfb_remove(dev);
++	return ret;
++}
++
++static int xenfb_resume(struct xenbus_device *dev)
++{
++	struct xenfb_info *info = dev->dev.driver_data;
++
++	xenfb_disconnect_backend(info);
++	xenfb_init_shared_page(info);
++	return xenfb_connect_backend(dev, info);
++}
++
++static int xenfb_remove(struct xenbus_device *dev)
++{
++	struct xenfb_info *info = dev->dev.driver_data;
++
++	xenfb_disconnect_backend(info);
++	if (info->fb_info) {
++		fb_deferred_io_cleanup(info->fb_info);
++		unregister_framebuffer(info->fb_info);
++		fb_dealloc_cmap(&info->fb_info->cmap);
++		framebuffer_release(info->fb_info);
++	}
++	free_page((unsigned long)info->page);
++	vfree(info->mfns);
++	vfree(info->fb);
++	kfree(info);
++
++	return 0;
++}
++
++static unsigned long vmalloc_to_mfn(void *address)
++{
++	return pfn_to_mfn(vmalloc_to_pfn(address));
++}
++
++static void xenfb_init_shared_page(struct xenfb_info *info)
++{
++	int i;
++
++	for (i = 0; i < info->nr_pages; i++)
++		info->mfns[i] = vmalloc_to_mfn(info->fb + i * PAGE_SIZE);
++
++	info->page->pd[0] = vmalloc_to_mfn(info->mfns);
++	info->page->pd[1] = 0;
++	info->page->width = XENFB_WIDTH;
++	info->page->height = XENFB_HEIGHT;
++	info->page->depth = XENFB_DEPTH;
++	info->page->line_length = (info->page->depth / 8) * info->page->width;
++	info->page->mem_length = xenfb_mem_len;
++	info->page->in_cons = info->page->in_prod = 0;
++	info->page->out_cons = info->page->out_prod = 0;
++}
++
++static int xenfb_connect_backend(struct xenbus_device *dev,
++				 struct xenfb_info *info)
++{
++	int ret, evtchn;
++	struct xenbus_transaction xbt;
++
++	ret = xenbus_alloc_evtchn(dev, &evtchn);
++	if (ret)
++		return ret;
++	ret = bind_evtchn_to_irqhandler(evtchn, xenfb_event_handler,
++					0, dev->devicetype, info);
++	if (ret < 0) {
++		xenbus_free_evtchn(dev, evtchn);
++		xenbus_dev_fatal(dev, ret, "bind_evtchn_to_irqhandler");
++		return ret;
++	}
++	info->irq = ret;
++
++ again:
++	ret = xenbus_transaction_start(&xbt);
++	if (ret) {
++		xenbus_dev_fatal(dev, ret, "starting transaction");
++		return ret;
++	}
++	ret = xenbus_printf(xbt, dev->nodename, "page-ref", "%lu",
++			    virt_to_mfn(info->page));
++	if (ret)
++		goto error_xenbus;
++	ret = xenbus_printf(xbt, dev->nodename, "event-channel", "%u",
++			    evtchn);
++	if (ret)
++		goto error_xenbus;
++	ret = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
++			    XEN_IO_PROTO_ABI_NATIVE);
++	if (ret)
++		goto error_xenbus;
++	ret = xenbus_printf(xbt, dev->nodename, "feature-update", "1");
++	if (ret)
++		goto error_xenbus;
++	ret = xenbus_transaction_end(xbt, 0);
++	if (ret) {
++		if (ret == -EAGAIN)
++			goto again;
++		xenbus_dev_fatal(dev, ret, "completing transaction");
++		return ret;
++	}
++
++	xenbus_switch_state(dev, XenbusStateInitialised);
++	return 0;
++
++ error_xenbus:
++	xenbus_transaction_end(xbt, 1);
++	xenbus_dev_fatal(dev, ret, "writing xenstore");
++	return ret;
++}
++
++static void xenfb_disconnect_backend(struct xenfb_info *info)
++{
++	if (info->irq >= 0)
++		unbind_from_irqhandler(info->irq, info);
++	info->irq = -1;
++}
++
++static void xenfb_backend_changed(struct xenbus_device *dev,
++				  enum xenbus_state backend_state)
++{
++	struct xenfb_info *info = dev->dev.driver_data;
++	int val;
++
++	switch (backend_state) {
++	case XenbusStateInitialising:
++	case XenbusStateInitialised:
++	case XenbusStateUnknown:
++	case XenbusStateClosed:
++		break;
++
++	case XenbusStateInitWait:
++InitWait:
++		xenbus_switch_state(dev, XenbusStateConnected);
++		break;
++
++	case XenbusStateConnected:
++		/*
++		 * Work around xenbus race condition: If backend goes
++		 * through InitWait to Connected fast enough, we can
++		 * get Connected twice here.
++		 */
++		if (dev->state != XenbusStateConnected)
++			goto InitWait; /* no InitWait seen yet, fudge it */
++
++		if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
++				 "request-update", "%d", &val) < 0)
++			val = 0;
++		if (val)
++			info->update_wanted = 1;
++		break;
++
++	case XenbusStateClosing:
++		xenbus_frontend_closed(dev);
++		break;
++	}
++}
++
++static struct xenbus_device_id xenfb_ids[] = {
++	{ "vfb" },
++	{ "" }
++};
++
++static struct xenbus_driver xenfb = {
++	.name = "vfb",
++	.owner = THIS_MODULE,
++	.ids = xenfb_ids,
++	.probe = xenfb_probe,
++	.remove = xenfb_remove,
++	.resume = xenfb_resume,
++	.otherend_changed = xenfb_backend_changed,
++};
++
++static int __init xenfb_init(void)
++{
++	if (!is_running_on_xen())
++		return -ENODEV;
++
++	/* Nothing to do if running in dom0. */
++	if (is_initial_xendomain())
++		return -ENODEV;
++
++	return xenbus_register_frontend(&xenfb);
++}
++
++static void __exit xenfb_cleanup(void)
++{
++	xenbus_unregister_driver(&xenfb);
++}
++
++module_init(xenfb_init);
++module_exit(xenfb_cleanup);
++
++MODULE_LICENSE("GPL");
+diff --git a/include/xen/interface/io/fbif.h b/include/xen/interface/io/fbif.h
+new file mode 100644
+index 0000000..5a934dd
+--- /dev/null
++++ b/include/xen/interface/io/fbif.h
+@@ -0,0 +1,124 @@
++/*
++ * fbif.h -- Xen virtual frame buffer device
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to
++ * deal in the Software without restriction, including without limitation the
++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ *
++ * Copyright (C) 2005 Anthony Liguori <aliguori at us.ibm.com>
++ * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru at redhat.com>
++ */
++
++#ifndef __XEN_PUBLIC_IO_FBIF_H__
++#define __XEN_PUBLIC_IO_FBIF_H__
++
++/* Out events (frontend -> backend) */
++
++/*
++ * Out events may be sent only when requested by backend, and receipt
++ * of an unknown out event is an error.
++ */
++
++/* Event type 1 currently not used */
++/*
++ * Framebuffer update notification event
++ * Capable frontend sets feature-update in xenstore.
++ * Backend requests it by setting request-update in xenstore.
++ */
++#define XENFB_TYPE_UPDATE 2
++
++struct xenfb_update {
++	uint8_t type;		/* XENFB_TYPE_UPDATE */
++	int32_t x;		/* source x */
++	int32_t y;		/* source y */
++	int32_t width;		/* rect width */
++	int32_t height;		/* rect height */
++};
++
++#define XENFB_OUT_EVENT_SIZE 40
++
++union xenfb_out_event {
++	uint8_t type;
++	struct xenfb_update update;
++	char pad[XENFB_OUT_EVENT_SIZE];
++};
++
++/* In events (backend -> frontend) */
++
++/*
++ * Frontends should ignore unknown in events.
++ * No in events currently defined.
++ */
++
++#define XENFB_IN_EVENT_SIZE 40
++
++union xenfb_in_event {
++	uint8_t type;
++	char pad[XENFB_IN_EVENT_SIZE];
++};
++
++/* shared page */
++
++#define XENFB_IN_RING_SIZE 1024
++#define XENFB_IN_RING_LEN (XENFB_IN_RING_SIZE / XENFB_IN_EVENT_SIZE)
++#define XENFB_IN_RING_OFFS 1024
++#define XENFB_IN_RING(page) \
++	((union xenfb_in_event *)((char *)(page) + XENFB_IN_RING_OFFS))
++#define XENFB_IN_RING_REF(page, idx) \
++	(XENFB_IN_RING((page))[(idx) % XENFB_IN_RING_LEN])
++
++#define XENFB_OUT_RING_SIZE 2048
++#define XENFB_OUT_RING_LEN (XENFB_OUT_RING_SIZE / XENFB_OUT_EVENT_SIZE)
++#define XENFB_OUT_RING_OFFS (XENFB_IN_RING_OFFS + XENFB_IN_RING_SIZE)
++#define XENFB_OUT_RING(page) \
++	((union xenfb_out_event *)((char *)(page) + XENFB_OUT_RING_OFFS))
++#define XENFB_OUT_RING_REF(page, idx) \
++	(XENFB_OUT_RING((page))[(idx) % XENFB_OUT_RING_LEN])
++
++struct xenfb_page {
++	uint32_t in_cons, in_prod;
++	uint32_t out_cons, out_prod;
++
++	int32_t width;          /* width of the framebuffer (in pixels) */
++	int32_t height;         /* height of the framebuffer (in pixels) */
++	uint32_t line_length;   /* length of a row of pixels (in bytes) */
++	uint32_t mem_length;    /* length of the framebuffer (in bytes) */
++	uint8_t depth;          /* depth of a pixel (in bits) */
++
++	/*
++	 * Framebuffer page directory
++	 *
++	 * Each directory page holds PAGE_SIZE / sizeof(*pd)
++	 * framebuffer pages, and can thus map up to PAGE_SIZE *
++	 * PAGE_SIZE / sizeof(*pd) bytes.  With PAGE_SIZE == 4096 and
++	 * sizeof(unsigned long) == 4, that's 4 Megs.  Two directory
++	 * pages should be enough for a while.
++	 */
++	unsigned long pd[2];
++};
++
++/*
++ * Wart: xenkbd needs to know resolution.  Put it here until a better
++ * solution is found, but don't leak it to the backend.
++ */
++#ifdef __KERNEL__
++#define XENFB_WIDTH 800
++#define XENFB_HEIGHT 600
++#define XENFB_DEPTH 32
++#endif
++
++#endif
+diff --git a/include/xen/interface/io/kbdif.h b/include/xen/interface/io/kbdif.h
+new file mode 100644
+index 0000000..fb97f42
+--- /dev/null
++++ b/include/xen/interface/io/kbdif.h
+@@ -0,0 +1,114 @@
++/*
++ * kbdif.h -- Xen virtual keyboard/mouse
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to
++ * deal in the Software without restriction, including without limitation the
++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ *
++ * Copyright (C) 2005 Anthony Liguori <aliguori at us.ibm.com>
++ * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru at redhat.com>
++ */
++
++#ifndef __XEN_PUBLIC_IO_KBDIF_H__
++#define __XEN_PUBLIC_IO_KBDIF_H__
++
++/* In events (backend -> frontend) */
++
++/*
++ * Frontends should ignore unknown in events.
++ */
++
++/* Pointer movement event */
++#define XENKBD_TYPE_MOTION  1
++/* Event type 2 currently not used */
++/* Key event (includes pointer buttons) */
++#define XENKBD_TYPE_KEY     3
++/*
++ * Pointer position event
++ * Capable backend sets feature-abs-pointer in xenstore.
++ * Frontend requests ot instead of XENKBD_TYPE_MOTION by setting
++ * request-abs-update in xenstore.
++ */
++#define XENKBD_TYPE_POS     4
++
++struct xenkbd_motion {
++	uint8_t type;		/* XENKBD_TYPE_MOTION */
++	int32_t rel_x;		/* relative X motion */
++	int32_t rel_y;		/* relative Y motion */
++};
++
++struct xenkbd_key {
++	uint8_t type;		/* XENKBD_TYPE_KEY */
++	uint8_t pressed;	/* 1 if pressed; 0 otherwise */
++	uint32_t keycode;	/* KEY_* from linux/input.h */
++};
++
++struct xenkbd_position {
++	uint8_t type;		/* XENKBD_TYPE_POS */
++	int32_t abs_x;		/* absolute X position (in FB pixels) */
++	int32_t abs_y;		/* absolute Y position (in FB pixels) */
++};
++
++#define XENKBD_IN_EVENT_SIZE 40
++
++union xenkbd_in_event {
++	uint8_t type;
++	struct xenkbd_motion motion;
++	struct xenkbd_key key;
++	struct xenkbd_position pos;
++	char pad[XENKBD_IN_EVENT_SIZE];
++};
++
++/* Out events (frontend -> backend) */
++
++/*
++ * Out events may be sent only when requested by backend, and receipt
++ * of an unknown out event is an error.
++ * No out events currently defined.
++ */
++
++#define XENKBD_OUT_EVENT_SIZE 40
++
++union xenkbd_out_event {
++	uint8_t type;
++	char pad[XENKBD_OUT_EVENT_SIZE];
++};
++
++/* shared page */
++
++#define XENKBD_IN_RING_SIZE 2048
++#define XENKBD_IN_RING_LEN (XENKBD_IN_RING_SIZE / XENKBD_IN_EVENT_SIZE)
++#define XENKBD_IN_RING_OFFS 1024
++#define XENKBD_IN_RING(page) \
++	((union xenkbd_in_event *)((char *)(page) + XENKBD_IN_RING_OFFS))
++#define XENKBD_IN_RING_REF(page, idx) \
++	(XENKBD_IN_RING((page))[(idx) % XENKBD_IN_RING_LEN])
++
++#define XENKBD_OUT_RING_SIZE 1024
++#define XENKBD_OUT_RING_LEN (XENKBD_OUT_RING_SIZE / XENKBD_OUT_EVENT_SIZE)
++#define XENKBD_OUT_RING_OFFS (XENKBD_IN_RING_OFFS + XENKBD_IN_RING_SIZE)
++#define XENKBD_OUT_RING(page) \
++	((union xenkbd_out_event *)((char *)(page) + XENKBD_OUT_RING_OFFS))
++#define XENKBD_OUT_RING_REF(page, idx) \
++	(XENKBD_OUT_RING((page))[(idx) % XENKBD_OUT_RING_LEN])
++
++struct xenkbd_page {
++	uint32_t in_cons, in_prod;
++	uint32_t out_cons, out_prod;
++};
++
++#endif
+-- 
+1.5.4.1
+

linux-2.6-xen-0007-xen-Module-autoprobing-support-for-frontend-drivers.patch:

Index: linux-2.6-xen-0007-xen-Module-autoprobing-support-for-frontend-drivers.patch
===================================================================
RCS file: linux-2.6-xen-0007-xen-Module-autoprobing-support-for-frontend-drivers.patch
diff -N linux-2.6-xen-0007-xen-Module-autoprobing-support-for-frontend-drivers.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0007-xen-Module-autoprobing-support-for-frontend-drivers.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,97 @@
+From 422407af4fdf82e12748b36174a17d857f08ebee Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Fri, 22 Feb 2008 12:42:52 +0000
+Subject: [PATCH] xen: Module autoprobing support for frontend drivers
+
+Add module aliases to support autoprobing modules
+for xen frontend devices.
+
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ drivers/block/xen-blkfront.c      |    1 +
+ drivers/net/xen-netfront.c        |    1 +
+ drivers/xen/xenbus/xenbus_probe.c |   27 +++++++++++++++++++++++++--
+ 3 files changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
+index 2e7c81e..0c47c02 100644
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -1005,3 +1005,4 @@ module_exit(xlblk_exit);
+ MODULE_DESCRIPTION("Xen virtual block device frontend");
+ MODULE_LICENSE("GPL");
+ MODULE_ALIAS_BLOCKDEV_MAJOR(XENVBD_MAJOR);
++MODULE_ALIAS("xen:vbd");
+diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
+index 7483d45..b3fa27e 100644
+--- a/drivers/net/xen-netfront.c
++++ b/drivers/net/xen-netfront.c
+@@ -1809,3 +1809,4 @@ module_exit(netif_exit);
+ 
+ MODULE_DESCRIPTION("Xen virtual network device frontend");
+ MODULE_LICENSE("GPL");
++MODULE_ALIAS("xen:vif");
+diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
+index 4750de3..336363c 100644
+--- a/drivers/xen/xenbus/xenbus_probe.c
++++ b/drivers/xen/xenbus/xenbus_probe.c
+@@ -88,6 +88,16 @@ int xenbus_match(struct device *_dev, struct device_driver *_drv)
+ 	return match_device(drv->ids, to_xenbus_device(_dev)) != NULL;
+ }
+ 
++static int xenbus_uevent(struct device *_dev, struct kobj_uevent_env *env)
++{
++	struct xenbus_device *dev = to_xenbus_device(_dev);
++
++	if (add_uevent_var(env, "MODALIAS=xen:%s", dev->devicetype))
++		return -ENOMEM;
++
++	return 0;
++}
++
+ /* device/<type>/<id> => <type>-<id> */
+ static int frontend_bus_id(char bus_id[BUS_ID_SIZE], const char *nodename)
+ {
+@@ -166,6 +176,7 @@ static struct xen_bus_type xenbus_frontend = {
+ 	.bus = {
+ 		.name     = "xen",
+ 		.match    = xenbus_match,
++		.uevent   = xenbus_uevent,
+ 		.probe    = xenbus_dev_probe,
+ 		.remove   = xenbus_dev_remove,
+ 		.shutdown = xenbus_dev_shutdown,
+@@ -438,6 +449,12 @@ static ssize_t xendev_show_devtype(struct device *dev,
+ }
+ DEVICE_ATTR(devtype, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_devtype, NULL);
+ 
++static ssize_t xendev_show_modalias(struct device *dev,
++				    struct device_attribute *attr, char *buf)
++{
++	return sprintf(buf, "xen:%s\n", to_xenbus_device(dev)->devicetype);
++}
++DEVICE_ATTR(modalias, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_modalias, NULL);
+ 
+ int xenbus_probe_node(struct xen_bus_type *bus,
+ 		      const char *type,
+@@ -492,10 +509,16 @@ int xenbus_probe_node(struct xen_bus_type *bus,
+ 
+ 	err = device_create_file(&xendev->dev, &dev_attr_devtype);
+ 	if (err)
+-		goto fail_remove_file;
++		goto fail_remove_nodename;
++
++	err = device_create_file(&xendev->dev, &dev_attr_modalias);
++	if (err)
++		goto fail_remove_devtype;
+ 
+ 	return 0;
+-fail_remove_file:
++fail_remove_devtype:
++	device_remove_file(&xendev->dev, &dev_attr_devtype);
++fail_remove_nodename:
+ 	device_remove_file(&xendev->dev, &dev_attr_nodename);
+ fail_unregister:
+ 	device_unregister(&xendev->dev);
+-- 
+1.5.4.1
+

linux-2.6-xen-0008-xen-Add-compatibility-aliases-for-frontend-drivers.patch:

Index: linux-2.6-xen-0008-xen-Add-compatibility-aliases-for-frontend-drivers.patch
===================================================================
RCS file: linux-2.6-xen-0008-xen-Add-compatibility-aliases-for-frontend-drivers.patch
diff -N linux-2.6-xen-0008-xen-Add-compatibility-aliases-for-frontend-drivers.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0008-xen-Add-compatibility-aliases-for-frontend-drivers.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,37 @@
+From 6025fff31cba456d0e44e6120af376454658890d Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Thu, 21 Feb 2008 11:13:12 +0000
+Subject: [PATCH] xen: Add compatibility aliases for frontend drivers
+
+Before getting merged, xen-blkfront was xenblk and
+xen-netfront was xennet.
+
+Add compatibility module aliases to ease upgrades.
+
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ drivers/block/xen-blkfront.c |    1 +
+ drivers/net/xen-netfront.c   |    1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
+index 0c47c02..8ce168d 100644
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -1006,3 +1006,4 @@ MODULE_DESCRIPTION("Xen virtual block device frontend");
+ MODULE_LICENSE("GPL");
+ MODULE_ALIAS_BLOCKDEV_MAJOR(XENVBD_MAJOR);
+ MODULE_ALIAS("xen:vbd");
++MODULE_ALIAS("xenblk");
+diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
+index b3fa27e..e62018a 100644
+--- a/drivers/net/xen-netfront.c
++++ b/drivers/net/xen-netfront.c
+@@ -1810,3 +1810,4 @@ module_exit(netif_exit);
+ MODULE_DESCRIPTION("Xen virtual network device frontend");
+ MODULE_LICENSE("GPL");
+ MODULE_ALIAS("xen:vif");
++MODULE_ALIAS("xennet");
+-- 
+1.5.4.1
+

linux-2.6-xen-0009-xen-Add-a-vmlinuz-target.patch:

Index: linux-2.6-xen-0009-xen-Add-a-vmlinuz-target.patch
===================================================================
RCS file: linux-2.6-xen-0009-xen-Add-a-vmlinuz-target.patch
diff -N linux-2.6-xen-0009-xen-Add-a-vmlinuz-target.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0009-xen-Add-a-vmlinuz-target.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,78 @@
+From cf0f35fc0d69ca088953e0cba566bfa503488b6b Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Tue, 19 Feb 2008 15:34:32 +0000
+Subject: [PATCH] xen: Add a vmlinuz target
+
+Although patches are in progress to allow Xen boot
+a DomU using a bzImage, support for booting a Dom0
+using a bzImage is still a ways off.
+
+For now, just add a target to build a gzip-ed ELF
+file which Xen can use to boot both Dom0 and DomU.
+
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ arch/x86/Makefile        |    9 +++++++++
+ arch/x86/boot/.gitignore |    1 +
+ arch/x86/boot/Makefile   |    9 +++++++++
+ 3 files changed, 19 insertions(+), 0 deletions(-)
+
+diff --git a/arch/x86/Makefile b/arch/x86/Makefile
+index f1e739a..14a752e 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -206,6 +206,15 @@ boot := arch/x86/boot
+ PHONY += zImage bzImage compressed zlilo bzlilo \
+          zdisk bzdisk fdimage fdimage144 fdimage288 isoimage install
+ 
++ifdef CONFIG_XEN
++PHONY += vmlinuz
++all: vmlinuz
++
++vmlinuz: KBUILD_IMAGE := $(boot)/vmlinuz
++vmlinuz: vmlinux
++	$(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
++endif
++
+ # Default kernel to build
+ all: bzImage
+ 
+diff --git a/arch/x86/boot/.gitignore b/arch/x86/boot/.gitignore
+index b1bdc4c..35e7956 100644
+--- a/arch/x86/boot/.gitignore
++++ b/arch/x86/boot/.gitignore
+@@ -5,3 +5,4 @@ setup.bin
+ setup.elf
+ cpustr.h
+ mkcpustr
++vmlinuz
+diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
+index f88458e..61bba92 100644
+--- a/arch/x86/boot/Makefile
++++ b/arch/x86/boot/Makefile
+@@ -26,6 +26,7 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
+ #RAMDISK := -DRAMDISK=512
+ 
+ targets		:= vmlinux.bin setup.bin setup.elf zImage bzImage
++targets		+= vmlinuz vmlinux-stripped
+ subdir-		:= compressed
+ 
+ setup-y		+= a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
+@@ -105,6 +106,14 @@ $(obj)/setup.bin: $(obj)/setup.elf FORCE
+ $(obj)/compressed/vmlinux: FORCE
+ 	$(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
+ 
++$(obj)/vmlinuz: $(obj)/vmlinux-stripped FORCE
++	$(call if_changed,gzip)
++	@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
++
++$(obj)/vmlinux-stripped: OBJCOPYFLAGS := -g --strip-unneeded
++$(obj)/vmlinux-stripped: vmlinux FORCE
++	$(call if_changed,objcopy)
++
+ # Set this if you want to pass append arguments to the zdisk/fdimage/isoimage kernel
+ FDARGS =
+ # Set this if you want an initrd included with the zdisk/fdimage/isoimage kernel
+-- 
+1.5.4.1
+

linux-2.6-xen-0010-xen-Add-empty-xenctrl-module.patch:

Index: linux-2.6-xen-0010-xen-Add-empty-xenctrl-module.patch
===================================================================
RCS file: linux-2.6-xen-0010-xen-Add-empty-xenctrl-module.patch
diff -N linux-2.6-xen-0010-xen-Add-empty-xenctrl-module.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0010-xen-Add-empty-xenctrl-module.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,124 @@
+From 1f09b9348726be2b7a25427c21a08f8c16e7a5a2 Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Mon, 4 Feb 2008 08:30:37 +0000
+Subject: [PATCH] xen: Add empty xenctrl module
+
+Add the basic infrastructure for a xenctrl module
+which will contain the various kernel interfaces
+used by (mainly Dom0) Xen userspace.
+
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ arch/x86/xen/Kconfig         |    7 +++++
+ drivers/xen/Makefile         |    2 +
+ drivers/xen/xenctrl/Makefile |    4 +++
+ drivers/xen/xenctrl/main.c   |   62 ++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 75 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/xen/xenctrl/Makefile
+ create mode 100644 drivers/xen/xenctrl/main.c
+
+diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
+index 4d5f264..4723bc1 100644
+--- a/arch/x86/xen/Kconfig
++++ b/arch/x86/xen/Kconfig
+@@ -11,3 +11,10 @@ config XEN
+ 	  This is the Linux Xen port.  Enabling this will allow the
+ 	  kernel to boot in a paravirtualized environment under the
+ 	  Xen hypervisor.
++
++config XENCTRL
++	tristate "Xen's user space control interfaces"
++	depends on XEN && PROC_FS
++	default y if XEN
++	help
++	  This is the /proc/xen interface used by Xen's libxc.
+diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile
+index 56592f0..6737463 100644
+--- a/drivers/xen/Makefile
++++ b/drivers/xen/Makefile
+@@ -1,2 +1,4 @@
+ obj-y	+= grant-table.o
+ obj-y	+= xenbus/
++
++obj-$(CONFIG_XENCTRL) += xenctrl/
+diff --git a/drivers/xen/xenctrl/Makefile b/drivers/xen/xenctrl/Makefile
+new file mode 100644
+index 0000000..1f43a43
+--- /dev/null
++++ b/drivers/xen/xenctrl/Makefile
+@@ -0,0 +1,4 @@
++obj-$(CONFIG_XENCTRL) += xenctrl.o
++
++xenctrl-objs  =
++xenctrl-objs += main.o
+diff --git a/drivers/xen/xenctrl/main.c b/drivers/xen/xenctrl/main.c
+new file mode 100644
+index 0000000..2965ceb
+--- /dev/null
++++ b/drivers/xen/xenctrl/main.c
+@@ -0,0 +1,62 @@
++/******************************************************************************
++ *
++ * main.c
++ *
++ * Xen userspace control interfaces
++ *
++ * Copyright (c) 2002-2004, K A Fraser, B Dragovic
++ *
++ * 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; or, when distributed
++ * separately from the Linux kernel or incorporated into other
++ * software packages, subject to the following license:
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#include <linux/proc_fs.h>
++#include <linux/module.h>
++#include <asm/xen/hypervisor.h>
++
++static int __init xenctrl_init(void)
++{
++	struct proc_dir_entry *dir;
++
++	if (!is_running_on_xen())
++		return -ENODEV;
++
++	dir = proc_mkdir("xen", NULL);
++	if (!dir)
++		return -ENOMEM;
++
++	dir->owner = THIS_MODULE;
++
++	return 0;
++}
++
++static void __exit xenctrl_exit(void)
++{
++	remove_proc_entry("xen", NULL);
++}
++
++module_init(xenctrl_init);
++module_exit(xenctrl_exit);
++
++MODULE_LICENSE("Dual BSD/GPL");
+-- 
+1.5.4.1
+

linux-2.6-xen-0011-xen-Add-proc-xen-capabilities.patch:

Index: linux-2.6-xen-0011-xen-Add-proc-xen-capabilities.patch
===================================================================
RCS file: linux-2.6-xen-0011-xen-Add-proc-xen-capabilities.patch
diff -N linux-2.6-xen-0011-xen-Add-proc-xen-capabilities.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0011-xen-Add-proc-xen-capabilities.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,190 @@
+From 1d322cb04345404de611fc9b7e10c78bf957eb49 Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Mon, 4 Feb 2008 09:16:51 +0000
+Subject: [PATCH] xen: Add /proc/xen/capabilities
+
+/proc/xen/capabilities is used by the xend init script
+to check whether it is running on Dom0.
+
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ drivers/xen/xenctrl/Makefile       |    1 +
+ drivers/xen/xenctrl/capabilities.c |   68 ++++++++++++++++++++++++++++++++++++
+ drivers/xen/xenctrl/main.c         |   11 ++++++
+ drivers/xen/xenctrl/xenctrl.h      |   39 ++++++++++++++++++++
+ 4 files changed, 119 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/xen/xenctrl/capabilities.c
+ create mode 100644 drivers/xen/xenctrl/xenctrl.h
+
+diff --git a/drivers/xen/xenctrl/Makefile b/drivers/xen/xenctrl/Makefile
+index 1f43a43..631f535 100644
+--- a/drivers/xen/xenctrl/Makefile
++++ b/drivers/xen/xenctrl/Makefile
+@@ -2,3 +2,4 @@ obj-$(CONFIG_XENCTRL) += xenctrl.o
+ 
+ xenctrl-objs  =
+ xenctrl-objs += main.o
++xenctrl-objs += capabilities.o
+diff --git a/drivers/xen/xenctrl/capabilities.c b/drivers/xen/xenctrl/capabilities.c
+new file mode 100644
+index 0000000..1ff078a
+--- /dev/null
++++ b/drivers/xen/xenctrl/capabilities.c
+@@ -0,0 +1,68 @@
++/******************************************************************************
++ *
++ * capabilities.c
++ *
++ * /proc/xen/capabilities
++ *
++ * Copyright (c) 2002-2004, K A Fraser, B Dragovic
++ *
++ * 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; or, when distributed
++ * separately from the Linux kernel or incorporated into other
++ * software packages, subject to the following license:
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#include <linux/proc_fs.h>
++#include <linux/module.h>
++#include <asm/xen/hypervisor.h>
++
++static int capabilities_read(char *page, char **start, off_t off,
++			     int count, int *eof, void *data)
++{
++	int len = 0;
++	*page = 0;
++
++	if (is_initial_xendomain())
++		len = sprintf(page, "control_d\n");
++
++	*eof = 1;
++	return len;
++}
++
++int __init capabilities_create_proc_entry(void)
++{
++	struct proc_dir_entry *entry;
++
++	entry = create_proc_entry("xen/capabilities", 0400, NULL);
++	if (!entry)
++		return -ENOMEM;
++
++	entry->owner = THIS_MODULE;
++	entry->read_proc = capabilities_read;
++
++	return 0;
++}
++
++void __exit capabilities_remove_proc_entry(void)
++{
++	remove_proc_entry("xen/capabilities", NULL);
++}
+diff --git a/drivers/xen/xenctrl/main.c b/drivers/xen/xenctrl/main.c
+index 2965ceb..0e42f7e 100644
+--- a/drivers/xen/xenctrl/main.c
++++ b/drivers/xen/xenctrl/main.c
+@@ -31,6 +31,8 @@
+  * IN THE SOFTWARE.
+  */
+ 
++#include "xenctrl.h"
++
+ #include <linux/proc_fs.h>
+ #include <linux/module.h>
+ #include <asm/xen/hypervisor.h>
+@@ -38,6 +40,7 @@
+ static int __init xenctrl_init(void)
+ {
+ 	struct proc_dir_entry *dir;
++	int ret;
+ 
+ 	if (!is_running_on_xen())
+ 		return -ENODEV;
+@@ -48,11 +51,19 @@ static int __init xenctrl_init(void)
+ 
+ 	dir->owner = THIS_MODULE;
+ 
++	ret = capabilities_create_proc_entry();
++	if (ret)
++		goto fail1;
++
+ 	return 0;
++
++ fail1:	remove_proc_entry("xen", NULL);
++	return ret;
+ }
+ 
+ static void __exit xenctrl_exit(void)
+ {
++	capabilities_remove_proc_entry();
+ 	remove_proc_entry("xen", NULL);
+ }
+ 
+diff --git a/drivers/xen/xenctrl/xenctrl.h b/drivers/xen/xenctrl/xenctrl.h
+new file mode 100644
+index 0000000..7378dde
+--- /dev/null
++++ b/drivers/xen/xenctrl/xenctrl.h
+@@ -0,0 +1,39 @@
++/******************************************************************************
++ * xenctl.h
++ * 
++ * Xen userspace control interfaces
++ * 
++ * Copyright (c) 2002-2004, K A Fraser, B Dragovic
++ *
++ * 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; or, when distributed
++ * separately from the Linux kernel or incorporated into other
++ * software packages, subject to the following license:
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#include <linux/init.h>
++
++/*
++ * capabilities.c
++ */
++int capabilities_create_proc_entry(void) __init;
++void capabilities_remove_proc_entry(void) __exit;
+-- 
+1.5.4.1
+

linux-2.6-xen-0012-xen-Add-proc-xen-privcmd.patch:

Index: linux-2.6-xen-0012-xen-Add-proc-xen-privcmd.patch
===================================================================
RCS file: linux-2.6-xen-0012-xen-Add-proc-xen-privcmd.patch
diff -N linux-2.6-xen-0012-xen-Add-proc-xen-privcmd.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0012-xen-Add-proc-xen-privcmd.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,285 @@
+From b897a4dad96c4695994783da288a44818579f868 Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Mon, 4 Feb 2008 08:24:57 +0000
+Subject: [PATCH] xen: Add /proc/xen/privcmd
+
+/proc/xen/privcmd is an ioctl() interface which allows
+userspace apps to invoke hypercalls.
+
+There should also be an ioctl (IOCTL_PRIVCMD_MMAP)
+which is used to map foreign pages into a processes
+address space, but we leave this unimplemented for
+now pending further work on foreign page support.
+
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ drivers/xen/xenctrl/Makefile    |    1 +
+ drivers/xen/xenctrl/main.c      |    6 +++
+ drivers/xen/xenctrl/privcmd.c   |   81 +++++++++++++++++++++++++++++++++++++++
+ drivers/xen/xenctrl/xenctrl.h   |    6 +++
+ include/asm-x86/xen/hypercall.h |   28 +++++++++++++
+ include/xen/sys/privcmd.h       |   79 ++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 201 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/xen/xenctrl/privcmd.c
+ create mode 100644 include/xen/sys/privcmd.h
+
+diff --git a/drivers/xen/xenctrl/Makefile b/drivers/xen/xenctrl/Makefile
+index 631f535..8a706cb 100644
+--- a/drivers/xen/xenctrl/Makefile
++++ b/drivers/xen/xenctrl/Makefile
+@@ -3,3 +3,4 @@ obj-$(CONFIG_XENCTRL) += xenctrl.o
+ xenctrl-objs  =
+ xenctrl-objs += main.o
+ xenctrl-objs += capabilities.o
++xenctrl-objs += privcmd.o
+diff --git a/drivers/xen/xenctrl/main.c b/drivers/xen/xenctrl/main.c
+index 0e42f7e..d1fe6ef 100644
+--- a/drivers/xen/xenctrl/main.c
++++ b/drivers/xen/xenctrl/main.c
+@@ -55,14 +55,20 @@ static int __init xenctrl_init(void)
+ 	if (ret)
+ 		goto fail1;
+ 
++	ret = privcmd_create_proc_entry();
++	if (ret)
++		goto fail2;
++
+ 	return 0;
+ 
++ fail2: capabilities_remove_proc_entry();
+  fail1:	remove_proc_entry("xen", NULL);
+ 	return ret;
+ }
+ 
+ static void __exit xenctrl_exit(void)
+ {
++	privcmd_remove_proc_entry();
+ 	capabilities_remove_proc_entry();
+ 	remove_proc_entry("xen", NULL);
+ }
+diff --git a/drivers/xen/xenctrl/privcmd.c b/drivers/xen/xenctrl/privcmd.c
+new file mode 100644
+index 0000000..58c4b83
+--- /dev/null
++++ b/drivers/xen/xenctrl/privcmd.c
+@@ -0,0 +1,81 @@
++/******************************************************************************
++ * privcmd.c
++ * 
++ * Interface to privileged domain-0 commands.
++ * 
++ * Copyright (c) 2002-2004, K A Fraser, B Dragovic
++ *
++ * 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; or, when distributed
++ * separately from the Linux kernel or incorporated into other
++ * software packages, subject to the following license:
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#include <linux/proc_fs.h>
++#include <linux/module.h>
++#include <linux/uaccess.h>
++#include <asm/xen/hypervisor.h>
++#include <xen/sys/privcmd.h>
++
++static long privcmd_ioctl(struct file *file, unsigned int cmd,
++			  unsigned long arg)
++{
++	switch (cmd) {
++	case IOCTL_PRIVCMD_HYPERCALL: {
++		privcmd_hypercall_t cmd;
++  
++		if (copy_from_user(&cmd, (void __user *)arg, sizeof(cmd)))
++			return -EFAULT;
++
++		return privcmd_hypercall(&cmd);
++	}
++
++	case IOCTL_PRIVCMD_MMAP:
++	case IOCTL_PRIVCMD_MMAPBATCH:
++		printk(KERN_WARNING "IOCTL_PRIVCMD_MMAP ioctl not yet implemented\n");
++	default:
++		return -EINVAL;
++	}
++}
++
++static const struct file_operations privcmd_file_ops = {
++	.unlocked_ioctl = privcmd_ioctl,
++};
++
++int __init privcmd_create_proc_entry(void)
++{
++	static struct proc_dir_entry *entry;
++
++	entry = create_proc_entry("xen/privcmd", 0400, NULL);
++	if (!entry)
++		return -ENOMEM;
++
++	entry->owner = THIS_MODULE;
++	entry->proc_fops = &privcmd_file_ops;
++
++	return 0;
++}
++
++void __exit privcmd_remove_proc_entry(void)
++{
++	remove_proc_entry("xen/privcmd", NULL);
++}
+diff --git a/drivers/xen/xenctrl/xenctrl.h b/drivers/xen/xenctrl/xenctrl.h
+index 7378dde..a35209a 100644
+--- a/drivers/xen/xenctrl/xenctrl.h
++++ b/drivers/xen/xenctrl/xenctrl.h
+@@ -37,3 +37,9 @@
+  */
+ int capabilities_create_proc_entry(void) __init;
+ void capabilities_remove_proc_entry(void) __exit;
++
++/*
++ * privcmd.c
++ */
++int privcmd_create_proc_entry(void) __init;
++void privcmd_remove_proc_entry(void) __exit;
+diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h
+index bc0ee7d..cd554ca 100644
+--- a/include/asm-x86/xen/hypercall.h
++++ b/include/asm-x86/xen/hypercall.h
+@@ -410,4 +410,32 @@ MULTI_stack_switch(struct multicall_entry *mcl,
+ 	mcl->args[1] = esp;
+ }
+ 
++#include <xen/sys/privcmd.h>
++
++static inline int privcmd_hypercall(privcmd_hypercall_t *hypercall)
++{
++	int ret;
++
++	if (hypercall->op >= (PAGE_SIZE >> 5))
++		return -EINVAL;
++
++	__asm__ __volatile__ (
++		"pushl %%ebx; pushl %%ecx; pushl %%edx; "
++		"pushl %%esi; pushl %%edi; "
++		"movl  8(%%eax),%%ebx ;"
++		"movl 16(%%eax),%%ecx ;"
++		"movl 24(%%eax),%%edx ;"
++		"movl 32(%%eax),%%esi ;"
++		"movl 40(%%eax),%%edi ;"
++		"movl   (%%eax),%%eax ;"
++		"shll $5,%%eax ;"
++		"addl $hypercall_page,%%eax ;"
++		"call *%%eax ;"
++		"popl %%edi; popl %%esi; popl %%edx; "
++		"popl %%ecx; popl %%ebx"
++		: "=a" (ret) : "0" (hypercall) : "memory" );
++
++	return ret;
++}
++
+ #endif /* __HYPERCALL_H__ */
+diff --git a/include/xen/sys/privcmd.h b/include/xen/sys/privcmd.h
+new file mode 100644
+index 0000000..9cfa9d7
+--- /dev/null
++++ b/include/xen/sys/privcmd.h
+@@ -0,0 +1,79 @@
++/******************************************************************************
++ * privcmd.h
++ * 
++ * Interface to /proc/xen/privcmd.
++ * 
++ * Copyright (c) 2003-2005, K A Fraser
++ * 
++ * 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; or, when distributed
++ * separately from the Linux kernel or incorporated into other
++ * software packages, subject to the following license:
++ * 
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ * 
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ * 
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#ifndef __LINUX_PUBLIC_PRIVCMD_H__
++#define __LINUX_PUBLIC_PRIVCMD_H__
++
++#include <linux/types.h>
++
++#ifndef __user
++#define __user
++#endif
++
++typedef struct privcmd_hypercall
++{
++	__u64 op;
++	__u64 arg[5];
++} privcmd_hypercall_t;
++
++typedef struct privcmd_mmap_entry {
++	__u64 va;
++	__u64 mfn;
++	__u64 npages;
++} privcmd_mmap_entry_t; 
++
++typedef struct privcmd_mmap {
++	int num;
++	domid_t dom; /* target domain */
++	privcmd_mmap_entry_t __user *entry;
++} privcmd_mmap_t; 
++
++typedef struct privcmd_mmapbatch {
++	int num;     /* number of pages to populate */
++	domid_t dom; /* target domain */
++	__u64 addr;  /* virtual address */
++	ulong __user *arr; /* array of mfns - top nibble set on err */
++} privcmd_mmapbatch_t; 
++
++/*
++ * @cmd: IOCTL_PRIVCMD_HYPERCALL
++ * @arg: &privcmd_hypercall_t
++ * Return: Value returned from execution of the specified hypercall.
++ */
++#define IOCTL_PRIVCMD_HYPERCALL					\
++	_IOC(_IOC_NONE, 'P', 0, sizeof(privcmd_hypercall_t))
++#define IOCTL_PRIVCMD_MMAP					\
++	_IOC(_IOC_NONE, 'P', 2, sizeof(privcmd_mmap_t))
++#define IOCTL_PRIVCMD_MMAPBATCH					\
++	_IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
++
++#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
+-- 
+1.5.4.1
+

linux-2.6-xen-0013-xen-Add-proc-xen-xenbus.patch:

Index: linux-2.6-xen-0013-xen-Add-proc-xen-xenbus.patch
===================================================================
RCS file: linux-2.6-xen-0013-xen-Add-proc-xen-xenbus.patch
diff -N linux-2.6-xen-0013-xen-Add-proc-xen-xenbus.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0013-xen-Add-proc-xen-xenbus.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,529 @@
+From 6a0df620e0d6ae9ab22cdadb226f7da0b1282fac Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Mon, 4 Feb 2008 22:04:36 +0000
+Subject: [PATCH] xen: Add /proc/xen/xenbus
+
+This interface is used by userspace programs to talk to
+xenstored.
+
+Since xenstored makes itself available to Dom0 userspace
+via a socket this should only really be useful in Domu,
+but it turns out that Dom0 apps historically default
+to using /proc/xen/xenbus rather than the socket.
+
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ drivers/xen/xenbus/xenbus_comms.h |    1 -
+ drivers/xen/xenbus/xenbus_probe.c |    2 +
+ drivers/xen/xenbus/xenbus_xs.c    |    1 +
+ drivers/xen/xenctrl/Makefile      |    1 +
+ drivers/xen/xenctrl/main.c        |    6 +
+ drivers/xen/xenctrl/xenbus.c      |  398 +++++++++++++++++++++++++++++++++++++
+ drivers/xen/xenctrl/xenctrl.h     |    6 +
+ include/xen/xenbus.h              |    2 +
+ 8 files changed, 416 insertions(+), 1 deletions(-)
+ create mode 100644 drivers/xen/xenctrl/xenbus.c
+
+diff --git a/drivers/xen/xenbus/xenbus_comms.h b/drivers/xen/xenbus/xenbus_comms.h
+index c21db75..fcc9b29 100644
+--- a/drivers/xen/xenbus/xenbus_comms.h
++++ b/drivers/xen/xenbus/xenbus_comms.h
+@@ -41,6 +41,5 @@ int xb_data_to_read(void);
+ int xb_wait_for_data_to_read(void);
+ int xs_input_avail(void);
+ extern struct xenstore_domain_interface *xen_store_interface;
+-extern int xen_store_evtchn;
+ 
+ #endif /* _XENBUS_COMMS_H */
+diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
+index 336363c..759fdbc 100644
+--- a/drivers/xen/xenbus/xenbus_probe.c
++++ b/drivers/xen/xenbus/xenbus_probe.c
+@@ -56,6 +56,8 @@
+ #include "xenbus_probe.h"
+ 
+ int xen_store_evtchn;
++EXPORT_SYMBOL_GPL(xen_store_evtchn);
++
+ struct xenstore_domain_interface *xen_store_interface;
+ static unsigned long xen_store_mfn;
+ 
+diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
+index 227d53b..810e24a 100644
+--- a/drivers/xen/xenbus/xenbus_xs.c
++++ b/drivers/xen/xenbus/xenbus_xs.c
+@@ -184,6 +184,7 @@ void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
+ 
+ 	return ret;
+ }
++EXPORT_SYMBOL(xenbus_dev_request_and_reply);
+ 
+ /* Send message to xs, get kmalloc'ed reply.  ERR_PTR() on error. */
+ static void *xs_talkv(struct xenbus_transaction t,
+diff --git a/drivers/xen/xenctrl/Makefile b/drivers/xen/xenctrl/Makefile
+index 8a706cb..23dafa3 100644
+--- a/drivers/xen/xenctrl/Makefile
++++ b/drivers/xen/xenctrl/Makefile
+@@ -4,3 +4,4 @@ xenctrl-objs  =
+ xenctrl-objs += main.o
+ xenctrl-objs += capabilities.o
+ xenctrl-objs += privcmd.o
++xenctrl-objs += xenbus.o
+diff --git a/drivers/xen/xenctrl/main.c b/drivers/xen/xenctrl/main.c
+index d1fe6ef..b0cf61b 100644
+--- a/drivers/xen/xenctrl/main.c
++++ b/drivers/xen/xenctrl/main.c
+@@ -59,8 +59,13 @@ static int __init xenctrl_init(void)
+ 	if (ret)
+ 		goto fail2;
+ 
++	ret = xenbus_create_proc_entry();
++	if (ret)
++		goto fail3;
++
+ 	return 0;
+ 
++ fail3: privcmd_remove_proc_entry();
+  fail2: capabilities_remove_proc_entry();
+  fail1:	remove_proc_entry("xen", NULL);
+ 	return ret;
+@@ -68,6 +73,7 @@ static int __init xenctrl_init(void)
+ 
+ static void __exit xenctrl_exit(void)
+ {
++	xenbus_remove_proc_entry();
+ 	privcmd_remove_proc_entry();
+ 	capabilities_remove_proc_entry();
+ 	remove_proc_entry("xen", NULL);
+diff --git a/drivers/xen/xenctrl/xenbus.c b/drivers/xen/xenctrl/xenbus.c
+new file mode 100644
+index 0000000..57d5501
+--- /dev/null
++++ b/drivers/xen/xenctrl/xenbus.c
+@@ -0,0 +1,398 @@
++/*
++ * xenbus.c
++ * 
++ * /proc/xen/xenbus gives user-space access to the kernel's xenbus
++ * connection to xenstore.
++ * 
++ * Copyright (c) 2005, Christian Limpach
++ * Copyright (c) 2005, Rusty Russell, IBM Corporation
++ * 
++ * 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; or, when distributed
++ * separately from the Linux kernel or incorporated into other
++ * software packages, subject to the following license:
++ * 
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ * 
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ * 
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#include <linux/proc_fs.h>
++#include <linux/module.h>
++#include <linux/uaccess.h>
++#include <linux/poll.h>
++
++#include <xen/xenbus.h>
++
++struct xenbus_dev_transaction {
++	struct list_head list;
++	struct xenbus_transaction handle;
++};
++
++struct read_buffer {
++	struct list_head list;
++	unsigned int cons;
++	unsigned int len;
++	char msg[];
++};
++
++struct xenbus_dev_data {
++	/* In-progress transaction. */
++	struct list_head transactions;
++
++	/* Active watches. */
++	struct list_head watches;
++
++	/* Partial request. */
++	unsigned int len;
++	union {
++		struct xsd_sockmsg msg;
++		char buffer[PAGE_SIZE];
++	} u;
++
++	/* Response queue. */
++	struct list_head read_buffers;
++	wait_queue_head_t read_waitq;
++
++	struct mutex reply_mutex;
++};
++
++static ssize_t xenbus_dev_read(struct file *filp,
++			       char __user *ubuf,
++			       size_t len, loff_t *ppos)
++{
++	struct xenbus_dev_data *u = filp->private_data;
++	struct read_buffer *rb;
++	int i, ret;
++
++	mutex_lock(&u->reply_mutex);
++	while (list_empty(&u->read_buffers)) {
++		mutex_unlock(&u->reply_mutex);
++		ret = wait_event_interruptible(u->read_waitq,
++					       !list_empty(&u->read_buffers));
++		if (ret)
++			return ret;
++		mutex_lock(&u->reply_mutex);
++	}
++
++	rb = list_entry(u->read_buffers.next, struct read_buffer, list);
++	for (i = 0; i < len;) {
++		put_user(rb->msg[rb->cons], ubuf + i);
++		i++;
++		rb->cons++;
++		if (rb->cons == rb->len) {
++			list_del(&rb->list);
++			kfree(rb);
++			if (list_empty(&u->read_buffers))
++				break;
++			rb = list_entry(u->read_buffers.next,
++					struct read_buffer, list);
++		}
++	}
++	mutex_unlock(&u->reply_mutex);
++
++	return i;
++}
++
++static void queue_reply(struct xenbus_dev_data *u,
++			char *data, unsigned int len)
++{
++	struct read_buffer *rb;
++
++	if (len == 0)
++		return;
++
++	rb = kmalloc(sizeof(*rb) + len, GFP_KERNEL);
++	BUG_ON(rb == NULL);
++
++	rb->cons = 0;
++	rb->len = len;
++
++	memcpy(rb->msg, data, len);
++
++	list_add_tail(&rb->list, &u->read_buffers);
++
++	wake_up(&u->read_waitq);
++}
++
++struct watch_adapter
++{
++	struct list_head list;
++	struct xenbus_watch watch;
++	struct xenbus_dev_data *dev_data;
++	char *token;
++};
++
++static void free_watch_adapter(struct watch_adapter *watch)
++{
++	kfree(watch->watch.node);
++	kfree(watch->token);
++	kfree(watch);
++}
++
++static void watch_fired(struct xenbus_watch *watch,
++			const char **vec,
++			unsigned int len)
++{
++	struct watch_adapter *adap =
++            container_of(watch, struct watch_adapter, watch);
++	struct xsd_sockmsg hdr;
++	const char *path, *token;
++	int path_len, tok_len, body_len;
++
++	path = vec[XS_WATCH_PATH];
++	token = adap->token;
++
++	path_len = strlen(path) + 1;
++	tok_len = strlen(token) + 1;
++	body_len = path_len + tok_len;
++
++	hdr.type = XS_WATCH_EVENT;
++	hdr.len = body_len;
++
++	mutex_lock(&adap->dev_data->reply_mutex);
++	queue_reply(adap->dev_data, (char *)&hdr, sizeof(hdr));
++	queue_reply(adap->dev_data, (char *)path, path_len);
++	queue_reply(adap->dev_data, (char *)token, tok_len);
++	mutex_unlock(&adap->dev_data->reply_mutex);
++}
++
++static LIST_HEAD(watch_list);
++
++static ssize_t xenbus_dev_write(struct file *filp,
++				const char __user *ubuf,
++				size_t len, loff_t *ppos)
++{
++	struct xenbus_dev_data *u = filp->private_data;
++	struct xenbus_dev_transaction *trans = NULL;
++	uint32_t msg_type;
++	void *reply;
++	char *path, *token;
++	struct watch_adapter *watch, *tmp_watch;
++	int err, rc = len;
++
++	if ((len + u->len) > sizeof(u->u.buffer)) {
++		rc = -EINVAL;
++		goto out;
++	}
++
++	if (copy_from_user(u->u.buffer + u->len, ubuf, len) != 0) {
++		rc = -EFAULT;
++		goto out;
++	}
++
++	u->len += len;
++	if ((u->len < sizeof(u->u.msg)) ||
++	    (u->len < (sizeof(u->u.msg) + u->u.msg.len)))
++		return rc;
++
++	msg_type = u->u.msg.type;
++
++	switch (msg_type) {
++	case XS_TRANSACTION_START:
++	case XS_TRANSACTION_END:
++	case XS_DIRECTORY:
++	case XS_READ:
++	case XS_GET_PERMS:
++	case XS_RELEASE:
++	case XS_GET_DOMAIN_PATH:
++	case XS_WRITE:
++	case XS_MKDIR:
++	case XS_RM:
++	case XS_SET_PERMS:
++		if (msg_type == XS_TRANSACTION_START) {
++			trans = kmalloc(sizeof(*trans), GFP_KERNEL);
++			if (!trans) {
++				rc = -ENOMEM;
++				goto out;
++			}
++		}
++
++		reply = xenbus_dev_request_and_reply(&u->u.msg);
++		if (IS_ERR(reply)) {
++			kfree(trans);
++			rc = PTR_ERR(reply);
++			goto out;
++		}
++
++		if (msg_type == XS_TRANSACTION_START) {
++			trans->handle.id = simple_strtoul(reply, NULL, 0);
++			list_add(&trans->list, &u->transactions);
++		} else if (msg_type == XS_TRANSACTION_END) {
++			list_for_each_entry(trans, &u->transactions, list)
++				if (trans->handle.id == u->u.msg.tx_id)
++					break;
++			BUG_ON(&trans->list == &u->transactions);
++			list_del(&trans->list);
++			kfree(trans);
++		}
++		mutex_lock(&u->reply_mutex);
++		queue_reply(u, (char *)&u->u.msg, sizeof(u->u.msg));
++		queue_reply(u, (char *)reply, u->u.msg.len);
++		mutex_unlock(&u->reply_mutex);
++		kfree(reply);
++		break;
++
++	case XS_WATCH:
++	case XS_UNWATCH: {
++		static const char *XS_RESP = "OK";
++		struct xsd_sockmsg hdr;
++
++		path = u->u.buffer + sizeof(u->u.msg);
++		token = memchr(path, 0, u->u.msg.len);
++		if (token == NULL) {
++			rc = -EILSEQ;
++			goto out;
++		}
++		token++;
++
++		if (msg_type == XS_WATCH) {
++			watch = kmalloc(sizeof(*watch), GFP_KERNEL);
++			watch->watch.node = kmalloc(strlen(path)+1,
++                                                    GFP_KERNEL);
++			strcpy((char *)watch->watch.node, path);
++			watch->watch.callback = watch_fired;
++			watch->token = kmalloc(strlen(token)+1, GFP_KERNEL);
++			strcpy(watch->token, token);
++			watch->dev_data = u;
++
++			err = register_xenbus_watch(&watch->watch);
++			if (err) {
++				free_watch_adapter(watch);
++				rc = err;
++				goto out;
++			}
++			
++			list_add(&watch->list, &u->watches);
++		} else {
++			list_for_each_entry_safe(watch, tmp_watch,
++                                                 &u->watches, list) {
++				if (!strcmp(watch->token, token) &&
++				    !strcmp(watch->watch.node, path))
++				{
++					unregister_xenbus_watch(&watch->watch);
++					list_del(&watch->list);
++					free_watch_adapter(watch);
++					break;
++				}
++			}
++		}
++
++		hdr.type = msg_type;
++		hdr.len = strlen(XS_RESP) + 1;
++		mutex_lock(&u->reply_mutex);
++		queue_reply(u, (char *)&hdr, sizeof(hdr));
++		queue_reply(u, (char *)XS_RESP, hdr.len);
++		mutex_unlock(&u->reply_mutex);
++		break;
++	}
++
++	default:
++		rc = -EINVAL;
++		break;
++	}
++
++ out:
++	u->len = 0;
++	return rc;
++}
++
++static int xenbus_dev_open(struct inode *inode, struct file *filp)
++{
++	struct xenbus_dev_data *u;
++
++	if (xen_store_evtchn == 0)
++		return -ENOENT;
++
++	nonseekable_open(inode, filp);
++
++	u = kzalloc(sizeof(*u), GFP_KERNEL);
++	if (u == NULL)
++		return -ENOMEM;
++
++	INIT_LIST_HEAD(&u->transactions);
++	INIT_LIST_HEAD(&u->watches);
++	INIT_LIST_HEAD(&u->read_buffers);
++	init_waitqueue_head(&u->read_waitq);
++
++	mutex_init(&u->reply_mutex);
++
++	filp->private_data = u;
++
++	return 0;
++}
++
++static int xenbus_dev_release(struct inode *inode, struct file *filp)
++{
++	struct xenbus_dev_data *u = filp->private_data;
++	struct xenbus_dev_transaction *trans, *tmp;
++	struct watch_adapter *watch, *tmp_watch;
++
++	list_for_each_entry_safe(trans, tmp, &u->transactions, list) {
++		xenbus_transaction_end(trans->handle, 1);
++		list_del(&trans->list);
++		kfree(trans);
++	}
++
++	list_for_each_entry_safe(watch, tmp_watch, &u->watches, list) {
++		unregister_xenbus_watch(&watch->watch);
++		list_del(&watch->list);
++		free_watch_adapter(watch);
++	}
++
++	kfree(u);
++
++	return 0;
++}
++
++static unsigned int xenbus_dev_poll(struct file *file, poll_table *wait)
++{
++	struct xenbus_dev_data *u = file->private_data;
++
++	poll_wait(file, &u->read_waitq, wait);
++	if (!list_empty(&u->read_buffers))
++		return POLLIN | POLLRDNORM;
++	return 0;
++}
++
++static const struct file_operations xenbus_dev_file_ops = {
++	.read = xenbus_dev_read,
++	.write = xenbus_dev_write,
++	.open = xenbus_dev_open,
++	.release = xenbus_dev_release,
++	.poll = xenbus_dev_poll,
++};
++
++int __init xenbus_create_proc_entry(void)
++{
++	struct proc_dir_entry *entry;
++
++	entry = create_proc_entry("xen/xenbus", 0400, NULL);
++	if (!entry)
++		return -ENOMEM;
++
++	entry->owner = THIS_MODULE;
++	entry->proc_fops = &xenbus_dev_file_ops;
++
++	return 0;
++}
++
++void __exit xenbus_remove_proc_entry(void)
++{
++	remove_proc_entry("xen/xenbus", NULL);
++}
+diff --git a/drivers/xen/xenctrl/xenctrl.h b/drivers/xen/xenctrl/xenctrl.h
+index a35209a..e585c4b 100644
+--- a/drivers/xen/xenctrl/xenctrl.h
++++ b/drivers/xen/xenctrl/xenctrl.h
+@@ -43,3 +43,9 @@ void capabilities_remove_proc_entry(void) __exit;
+  */
+ int privcmd_create_proc_entry(void) __init;
+ void privcmd_remove_proc_entry(void) __exit;
++
++/*
++ * xenbus.c
++ */
++int xenbus_create_proc_entry(void) __init;
++void xenbus_remove_proc_entry(void) __exit;
+diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h
+index 6f7c290..10eae11 100644
+--- a/include/xen/xenbus.h
++++ b/include/xen/xenbus.h
+@@ -231,4 +231,6 @@ const char *xenbus_strstate(enum xenbus_state state);
+ int xenbus_dev_is_online(struct xenbus_device *dev);
+ int xenbus_frontend_closed(struct xenbus_device *dev);
+ 
++extern int xen_store_evtchn;
++
+ #endif /* _XEN_XENBUS_H */
+-- 
+1.5.4.1
+

linux-2.6-xen-0014-xen-Add-Xen-s-sys-hypervisor-interface.patch:

Index: linux-2.6-xen-0014-xen-Add-Xen-s-sys-hypervisor-interface.patch
===================================================================
RCS file: linux-2.6-xen-0014-xen-Add-Xen-s-sys-hypervisor-interface.patch
diff -N linux-2.6-xen-0014-xen-Add-Xen-s-sys-hypervisor-interface.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0014-xen-Add-Xen-s-sys-hypervisor-interface.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,479 @@
+From 54754bff4a3564e48821056f1134b1450cd0280e Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Thu, 7 Feb 2008 15:32:28 +0000
+Subject: [PATCH] xen: Add Xen's /sys/hypervisor interface
+
+Hook up Xen's /sys/hypervisor interface:
+
+  /sys/hypervisor/
+    -> type
+    -> uuid
+    -> compilation
+         -> compile_date
+         -> compiled_by
+         -> compiler
+    -> properties
+         -> capabilities
+         -> changeset
+         -> pagesize
+         -> virtual_start
+         -> writable_pt
+    -> version
+         -> extra
+         -> major
+         -> minor
+
+Note: the hypervisor subsys hook requires that
+SYS_HYPERVISOR is selected to enabled it, which in
+turns means that the subsys will be registered by
+a pv-ops kernel with Xen support, even on bare
+metal. This hook needs to be changed to be runtime
+enabled.
+
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ arch/x86/xen/Kconfig            |    3 +-
+ drivers/xen/xenctrl/Makefile    |    1 +
+ drivers/xen/xenctrl/main.c      |    6 +
+ drivers/xen/xenctrl/sysfs.c     |  349 +++++++++++++++++++++++++++++++++++++++
+ drivers/xen/xenctrl/xenctrl.h   |    6 +
+ include/xen/interface/version.h |    6 +
+ 6 files changed, 370 insertions(+), 1 deletions(-)
+ create mode 100644 drivers/xen/xenctrl/sysfs.c
+
+diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
+index 4723bc1..ff6a56a 100644
+--- a/arch/x86/xen/Kconfig
++++ b/arch/x86/xen/Kconfig
+@@ -14,7 +14,8 @@ config XEN
+ 
+ config XENCTRL
+ 	tristate "Xen's user space control interfaces"
+-	depends on XEN && PROC_FS
++	depends on XEN && PROC_FS && SYSFS
+ 	default y if XEN
++	select SYS_HYPERVISOR
+ 	help
+ 	  This is the /proc/xen interface used by Xen's libxc.
+diff --git a/drivers/xen/xenctrl/Makefile b/drivers/xen/xenctrl/Makefile
+index 23dafa3..e126e76 100644
+--- a/drivers/xen/xenctrl/Makefile
++++ b/drivers/xen/xenctrl/Makefile
+@@ -5,3 +5,4 @@ xenctrl-objs += main.o
+ xenctrl-objs += capabilities.o
+ xenctrl-objs += privcmd.o
+ xenctrl-objs += xenbus.o
++xenctrl-objs += sysfs.o
+diff --git a/drivers/xen/xenctrl/main.c b/drivers/xen/xenctrl/main.c
+index b0cf61b..87d0dba 100644
+--- a/drivers/xen/xenctrl/main.c
++++ b/drivers/xen/xenctrl/main.c
+@@ -63,8 +63,13 @@ static int __init xenctrl_init(void)
+ 	if (ret)
+ 		goto fail3;
+ 
++	ret = sys_hypervisor_init();
++	if (ret)
++		goto fail4;
++
+ 	return 0;
+ 
++ fail4: xenbus_remove_proc_entry();
+  fail3: privcmd_remove_proc_entry();
+  fail2: capabilities_remove_proc_entry();
+  fail1:	remove_proc_entry("xen", NULL);
+@@ -73,6 +78,7 @@ static int __init xenctrl_init(void)
+ 
+ static void __exit xenctrl_exit(void)
+ {
++	sys_hypervisor_exit();
+ 	xenbus_remove_proc_entry();
+ 	privcmd_remove_proc_entry();
+ 	capabilities_remove_proc_entry();
+diff --git a/drivers/xen/xenctrl/sysfs.c b/drivers/xen/xenctrl/sysfs.c
+new file mode 100644
+index 0000000..8cbf4d6
+--- /dev/null
++++ b/drivers/xen/xenctrl/sysfs.c
+@@ -0,0 +1,349 @@
++/*
++ *  copyright (c) 2006 IBM Corporation
++ *  Authored by: Mike D. Day <ncmike at us.ibm.com>
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License version 2 as
++ *  published by the Free Software Foundation.
++ */
++
++#include <linux/kobject.h>
++#include <linux/sysfs.h>
++#include <linux/err.h>
++#include <asm/xen/hypervisor.h>
++#include <xen/xenbus.h>
++#include "xenctrl.h"
++
++#define HYPERVISOR_ATTR_RO(_name) \
++static struct kobj_attribute _name##_attr = __ATTR_RO(_name)
++
++#define HYPERVISOR_ATTR_RW(_name) \
++static struct kobj_attribute _name##_attr = \
++	__ATTR(_name, 0644, _name##_show, _name##_store)
++
++static ssize_t type_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	return sprintf(buffer, "xen\n");
++}
++
++HYPERVISOR_ATTR_RO(type);
++
++static int __init xen_sysfs_type_init(void)
++{
++	return sysfs_create_file(hypervisor_kobj, &type_attr.attr);
++}
++
++static void xen_sysfs_type_destroy(void)
++{
++	sysfs_remove_file(hypervisor_kobj, &type_attr.attr);
++}
++
++static ssize_t major_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	int version;
++
++	version = HYPERVISOR_xen_version(XENVER_version, NULL);
++	if (!version)
++		return -ENODEV;
++
++	return sprintf(buffer, "%d\n", version >> 16);
++}
++
++HYPERVISOR_ATTR_RO(major);
++
++static ssize_t minor_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	int version;
++
++	version = HYPERVISOR_xen_version(XENVER_version, NULL);
++	if (!version)
++		return -ENODEV;
++
++	return sprintf(buffer, "%d\n", version & 0xff);
++}
++
++HYPERVISOR_ATTR_RO(minor);
++
++static ssize_t extra_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	int ret;
++	struct xen_extraversion extra;
++
++	ret = HYPERVISOR_xen_version(XENVER_extraversion, &extra);
++	if (ret)
++		return ret;
++
++	return sprintf(buffer, "%s\n", extra.extraversion);
++}
++
++HYPERVISOR_ATTR_RO(extra);
++
++static struct attribute *version_attrs[] = {
++	&major_attr.attr,
++	&minor_attr.attr,
++	&extra_attr.attr,
++	NULL
++};
++
++static struct attribute_group version_group = {
++	.name = "version",
++	.attrs = version_attrs,
++};
++
++static int __init xen_sysfs_version_init(void)
++{
++	return sysfs_create_group(hypervisor_kobj, &version_group);
++}
++
++static void xen_sysfs_version_destroy(void)
++{
++	sysfs_remove_group(hypervisor_kobj, &version_group);
++}
++
++static ssize_t uuid_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	char *vm, *val;
++	int ret;
++
++	vm = xenbus_read(XBT_NIL, "vm", "", NULL);
++	if (IS_ERR(vm))
++		return PTR_ERR(vm);
++
++	val = xenbus_read(XBT_NIL, vm, "uuid", NULL);
++	if (IS_ERR(val)) {
++		ret = PTR_ERR(val);
++		goto out;
++	}
++
++	ret = sprintf(buffer, "%s\n", val);
++
++	kfree(val);
++out:	kfree(vm);
++
++	return ret;
++}
++
++HYPERVISOR_ATTR_RO(uuid);
++
++static int __init xen_sysfs_uuid_init(void)
++{
++	return sysfs_create_file(hypervisor_kobj, &uuid_attr.attr);
++}
++
++static void xen_sysfs_uuid_destroy(void)
++{
++	sysfs_remove_file(hypervisor_kobj, &uuid_attr.attr);
++}
++
++static ssize_t compiler_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	struct xen_compile_info info;
++	int ret;
++
++	ret = HYPERVISOR_xen_version(XENVER_compile_info, &info);
++	if (ret)
++		return ret;
++
++	return sprintf(buffer, "%s\n", info.compiler);
++}
++
++HYPERVISOR_ATTR_RO(compiler);
++
++static ssize_t compiled_by_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	struct xen_compile_info info;
++	int ret;
++
++	ret = HYPERVISOR_xen_version(XENVER_compile_info, &info);
++	if (ret)
++		return ret;
++
++	return sprintf(buffer, "%s\n", info.compile_by);
++}
++
++HYPERVISOR_ATTR_RO(compiled_by);
++
++static ssize_t compile_date_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	struct xen_compile_info info;
++	int ret;
++
++	ret = HYPERVISOR_xen_version(XENVER_compile_info, &info);
++	if (ret)
++		return ret;
++
++	return sprintf(buffer, "%s\n", info.compile_date);
++}
++
++HYPERVISOR_ATTR_RO(compile_date);
++
++static struct attribute *xen_compile_attrs[] = {
++	&compiler_attr.attr,
++	&compiled_by_attr.attr,
++	&compile_date_attr.attr,
++	NULL
++};
++
++static struct attribute_group xen_compilation_group = {
++	.name = "compilation",
++	.attrs = xen_compile_attrs,
++};
++
++static int __init xen_compilation_init(void)
++{
++	return sysfs_create_group(hypervisor_kobj,
++				  &xen_compilation_group);
++}
++
++static void xen_compilation_destroy(void)
++{
++	sysfs_remove_group(hypervisor_kobj,
++			   &xen_compilation_group);
++}
++
++static ssize_t capabilities_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	struct xen_capabilities_info *caps;
++	int ret;
++
++	caps = kmalloc(sizeof(struct xen_capabilities_info), GFP_KERNEL);
++	if (!caps)
++		return -ENOMEM;
++
++	ret = HYPERVISOR_xen_version(XENVER_capabilities, caps);
++	if (ret)
++		goto out;
++
++	ret = sprintf(buffer, "%s\n", caps->info);
++
++out:	kfree(caps);
++
++	return ret;
++}
++
++HYPERVISOR_ATTR_RO(capabilities);
++
++static ssize_t changeset_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	struct xen_changeset_info cset;
++	int ret;
++
++	ret = HYPERVISOR_xen_version(XENVER_changeset, &cset);
++	if (ret)
++		return ret;
++
++	return sprintf(buffer, "%s\n", cset.info);
++}
++
++HYPERVISOR_ATTR_RO(changeset);
++
++static ssize_t virtual_start_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	struct xen_platform_parameters parms;
++	int ret;
++
++	ret = HYPERVISOR_xen_version(XENVER_platform_parameters, &parms);
++	if (ret)
++		return ret;
++
++	return sprintf(buffer, "%lx\n", parms.virt_start);
++}
++
++HYPERVISOR_ATTR_RO(virtual_start);
++
++static ssize_t pagesize_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	int ret;
++
++	ret = HYPERVISOR_xen_version(XENVER_pagesize, NULL);
++	if (ret < 0)
++		return ret;
++
++	return sprintf(buffer, "%x\n", ret);
++}
++
++HYPERVISOR_ATTR_RO(pagesize);
++
++static ssize_t writable_pt_show(struct kobject *kobj, struct kobj_attribute *attr, char *buffer)
++{
++	struct xen_feature_info info;
++	int ret;
++
++	info.submap_idx = XENFEAT_writable_page_tables;
++
++	ret = HYPERVISOR_xen_version(XENVER_get_features, &info);
++	if (ret)
++		return ret;
++
++	return sprintf(buffer, "%d\n", info.submap);
++}
++
++HYPERVISOR_ATTR_RO(writable_pt);
++
++static struct attribute *xen_properties_attrs[] = {
++	&capabilities_attr.attr,
++	&changeset_attr.attr,
++	&virtual_start_attr.attr,
++	&pagesize_attr.attr,
++	&writable_pt_attr.attr,
++	NULL
++};
++
++static struct attribute_group xen_properties_group = {
++	.name = "properties",
++	.attrs = xen_properties_attrs,
++};
++
++static int __init xen_properties_init(void)
++{
++	return sysfs_create_group(hypervisor_kobj,
++				  &xen_properties_group);
++}
++
++static void xen_properties_destroy(void)
++{
++	sysfs_remove_group(hypervisor_kobj, &xen_properties_group);
++}
++
++int __init sys_hypervisor_init(void)
++{
++	int ret;
++
++	if (!is_running_on_xen())
++		return -ENODEV;
++
++	ret = xen_sysfs_type_init();
++	if (ret)
++		goto out;
++	ret = xen_sysfs_version_init();
++	if (ret)
++		goto version_out;
++	ret = xen_compilation_init();
++	if (ret)
++		goto comp_out;
++	ret = xen_sysfs_uuid_init();
++	if (ret)
++		goto uuid_out;
++	ret = xen_properties_init();
++	if (!ret)
++		goto out;
++
++	xen_sysfs_uuid_destroy();
++uuid_out:
++	xen_compilation_destroy();
++comp_out:
++	xen_sysfs_version_destroy();
++version_out:
++	xen_sysfs_type_destroy();
++out:
++	return ret;
++}
++
++void __exit sys_hypervisor_exit(void)
++{
++	xen_properties_destroy();
++	xen_compilation_destroy();
++	xen_sysfs_uuid_destroy();
++	xen_sysfs_version_destroy();
++	xen_sysfs_type_destroy();
++}
+diff --git a/drivers/xen/xenctrl/xenctrl.h b/drivers/xen/xenctrl/xenctrl.h
+index e585c4b..1afbdfb 100644
+--- a/drivers/xen/xenctrl/xenctrl.h
++++ b/drivers/xen/xenctrl/xenctrl.h
+@@ -49,3 +49,9 @@ void privcmd_remove_proc_entry(void) __exit;
+  */
+ int xenbus_create_proc_entry(void) __init;
+ void xenbus_remove_proc_entry(void) __exit;
++
++/*
++ * sysfs.c
++ */
++int sys_hypervisor_init(void) __init;
++void sys_hypervisor_exit(void) __exit;
+diff --git a/include/xen/interface/version.h b/include/xen/interface/version.h
+index 453235e..dd58cf5 100644
+--- a/include/xen/interface/version.h
++++ b/include/xen/interface/version.h
+@@ -57,4 +57,10 @@ struct xen_feature_info {
+ /* Declares the features reported by XENVER_get_features. */
+ #include "features.h"
+ 
++/* arg == NULL; returns host memory page size. */
++#define XENVER_pagesize 7
++
++/* arg == xen_domain_handle_t. */
++#define XENVER_guest_handle 8
++
+ #endif /* __XEN_PUBLIC_VERSION_H__ */
+-- 
+1.5.4.1
+

linux-2.6-xen-0015-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch:

Index: linux-2.6-xen-0015-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch
===================================================================
RCS file: linux-2.6-xen-0015-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch
diff -N linux-2.6-xen-0015-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0015-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,79 @@
+From dc0daca424b10e5758a875d9dfe55dbf4fc7966e Mon Sep 17 00:00:00 2001
+From: Stephen Tweedie <sct at redhat.com>
+Date: Wed, 21 Nov 2007 18:40:31 +0000
+Subject: [PATCH] xen debug: Add xprintk to log directly via hypercall
+
+For early debugging, it is useful to have a way of doing debugging output
+direct to the hypervisor without having to rely on console being fully
+initialised.
+
+Signed-off-by: Stephen Tweedie <sct at redhat.com>
+---
+ arch/x86/xen/enlighten.c  |   32 ++++++++++++++++++++++++++++++++
+ include/xen/hvc-console.h |    1 +
+ 2 files changed, 33 insertions(+), 0 deletions(-)
+
+diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
+index a94605e..e1702e1 100644
+--- a/arch/x86/xen/enlighten.c
++++ b/arch/x86/xen/enlighten.c
+@@ -33,6 +33,7 @@
+ #include <xen/interface/sched.h>
+ #include <xen/features.h>
+ #include <xen/page.h>
++#include <xen/hvc-console.h>
+ 
+ #include <asm/paravirt.h>
+ #include <asm/page.h>
+@@ -142,6 +143,37 @@ static void __init xen_banner(void)
+ 	printk(KERN_INFO "Hypervisor signature: %s\n", xen_start_info->magic);
+ }
+ 
++static void kcons_write_dom0(const char *s, unsigned int count)
++{
++       int rc;
++
++       while ((count > 0) &&
++              ((rc = HYPERVISOR_console_io(
++                       CONSOLEIO_write, count, (char *)s)) > 0)) {
++               count -= rc;
++               s += rc;
++       }
++}
++
++
++/*** Useful function for console debugging -- goes straight to Xen. ***/
++asmlinkage int xprintk(const char *fmt, ...)
++{
++       va_list args;
++       int printk_len;
++       static char printk_buf[1024];
++
++       /* Emit the output into the temporary buffer */
++       va_start(args, fmt);
++       printk_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
++       va_end(args);
++
++       /* Send the processed output directly to Xen. */
++       kcons_write_dom0(printk_buf, printk_len);
++
++       return 0;
++}
++
+ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
+ 		      unsigned int *cx, unsigned int *dx)
+ {
+diff --git a/include/xen/hvc-console.h b/include/xen/hvc-console.h
+index 21c0ecf..cb7a3c9 100644
+--- a/include/xen/hvc-console.h
++++ b/include/xen/hvc-console.h
+@@ -2,5 +2,6 @@
+ #define XEN_HVC_CONSOLE_H
+ 
+ extern struct console xenboot_console;
++extern asmlinkage int xprintk(const char *fmt, ...);
+ 
+ #endif	/* XEN_HVC_CONSOLE_H */
+-- 
+1.5.4.1
+

linux-2.6-xen-0016-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 linux-2.6-xen-0016-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch
Index: linux-2.6-xen-0016-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch
===================================================================
RCS file: linux-2.6-xen-0016-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch
diff -N linux-2.6-xen-0016-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0016-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,5938 @@
+From c255dab2cece092ec17e85fc0186ae6ac667afd5 Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Tue, 4 Mar 2008 17:59:50 +0000
+Subject: [PATCH] xen x86_64: Initial x86_64 support for Xen paravirt_ops
+
+Signed-off-by: Eduardo Habkost <ehabkost at redhat.com>
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ arch/x86/Kconfig                     |    3 +-
+ arch/x86/kernel/acpi/boot.c          |    4 +-
+ arch/x86/kernel/apic_32.c            |    4 +-
+ arch/x86/kernel/apic_64.c            |    2 +-
+ arch/x86/kernel/asm-offsets_64.c     |   15 +
+ arch/x86/kernel/early_printk.c       |    5 +-
+ arch/x86/kernel/efi_64.c             |    4 +-
+ arch/x86/kernel/entry_32.S           |   83 +-----
+ arch/x86/kernel/entry_64.S           |   72 ++++-
+ arch/x86/kernel/genapic_64.c         |   12 +
+ arch/x86/kernel/head64.c             |    4 +
+ arch/x86/kernel/head_64.S            |   23 ++
+ arch/x86/kernel/hpet.c               |    4 +-
+ arch/x86/kernel/io_apic_64.c         |    2 +-
+ arch/x86/kernel/irq_64.c             |    5 +
+ arch/x86/kernel/mpparse_32.c         |    4 +-
+ arch/x86/kernel/mpparse_64.c         |    4 +-
+ arch/x86/kernel/paravirt.c           |    3 +
+ arch/x86/kernel/process_64.c         |    9 +
+ arch/x86/kernel/setup64.c            |    5 +
+ arch/x86/kernel/setup_64.c           |   41 +++-
+ arch/x86/kernel/smpboot_64.c         |    4 +-
+ arch/x86/kernel/vsyscall_64.c        |   31 ++-
+ arch/x86/mach-visws/traps.c          |   10 +-
+ arch/x86/mm/init_32.c                |    2 +-
+ arch/x86/mm/init_64.c                |  558 ++++++++++++++++++++++++++++++++--
+ arch/x86/mm/ioremap.c                |    4 +-
+ arch/x86/mm/pgtable_32.c             |   25 ++-
+ arch/x86/pci/mmconfig_32.c           |    2 +-
+ arch/x86/vdso/vdso32-setup.c         |    6 +-
+ arch/x86/xen/Kconfig                 |    1 -
+ arch/x86/xen/Makefile                |    6 +
+ arch/x86/xen/enlighten.c             |  268 +++++++++++-----
+ arch/x86/xen/entry.S                 |    5 +
+ arch/x86/xen/entry_32.S              |   81 +++++
+ arch/x86/xen/entry_64.S              |   68 ++++
+ arch/x86/xen/events.c                |   13 +-
+ arch/x86/xen/genapic.c               |  190 ++++++++++++
+ arch/x86/xen/init.h                  |   20 ++
+ arch/x86/xen/init_32.c               |    3 +
+ arch/x86/xen/init_64.c               |  181 +++++++++++
+ arch/x86/xen/mmu.c                   |  407 ++++++++++++++++++-------
+ arch/x86/xen/mmu.h                   |   46 ++--
+ arch/x86/xen/multicalls.c            |    9 +-
+ arch/x86/xen/setup.c                 |   22 ++
+ arch/x86/xen/smp.c                   |   16 +
+ arch/x86/xen/xen-asm.S               |  219 +++-----------
+ arch/x86/xen/xen-asm_32.S            |  184 +++++++++++
+ arch/x86/xen/xen-asm_64.S            |   75 +++++
+ arch/x86/xen/xen-head.S              |   21 +-
+ arch/x86/xen/xen-ops.h               |   11 +
+ drivers/acpi/thermal.c               |    5 +
+ drivers/char/hvc_xen.c               |    6 +
+ drivers/ieee1394/init_ohci1394_dma.c |    2 +-
+ drivers/serial/8250_early.c          |    2 +-
+ include/asm-x86/asm-hack.h           |   27 ++
+ include/asm-x86/cmpxchg_64.h         |   36 +++
+ include/asm-x86/desc_defs.h          |    4 +
+ include/asm-x86/fixmap_32.h          |   22 +-
+ include/asm-x86/fixmap_64.h          |   31 ++-
+ include/asm-x86/mmu_context_64.h     |    6 +-
+ include/asm-x86/page_64.h            |    2 +-
+ include/asm-x86/paravirt.h           |   46 ++-
+ include/asm-x86/percpu.h             |   32 ++
+ include/asm-x86/pgalloc_64.h         |   69 ++++-
+ include/asm-x86/pgtable.h            |   15 +-
+ include/asm-x86/pgtable_64.h         |    3 +-
+ include/asm-x86/proto.h              |    1 +
+ include/asm-x86/smp_64.h             |    3 +
+ include/asm-x86/system.h             |    3 +-
+ include/asm-x86/xen/hypercall.h      |  205 ++++++++++---
+ include/asm-x86/xen/hypervisor.h     |    3 -
+ include/asm-x86/xen/interface.h      |   35 ++-
+ include/linux/dmi.h                  |    1 +
+ include/linux/elfnote.h              |    2 +-
+ include/xen/events.h                 |    2 +
+ include/xen/interface/elfnote.h      |   16 +
+ include/xen/page.h                   |   34 ++-
+ init/main.c                          |   10 +
+ mm/slab.c                            |    8 +-
+ 80 files changed, 2759 insertions(+), 668 deletions(-)
+ create mode 100644 arch/x86/xen/entry.S
+ create mode 100644 arch/x86/xen/entry_32.S
+ create mode 100644 arch/x86/xen/entry_64.S
+ create mode 100644 arch/x86/xen/genapic.c
+ create mode 100644 arch/x86/xen/init.h
+ create mode 100644 arch/x86/xen/init_32.c
+ create mode 100644 arch/x86/xen/init_64.c
+ create mode 100644 arch/x86/xen/xen-asm_32.S
+ create mode 100644 arch/x86/xen/xen-asm_64.S
+ create mode 100644 include/asm-x86/asm-hack.h
+
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index f41c953..6f466aa 100644
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -92,7 +92,7 @@ config ARCH_MAY_HAVE_PC_FDC
+ 	def_bool y
+ 
+ config DMI
+-	def_bool y
++	def_bool !XEN
+ 
+ config RWSEM_GENERIC_SPINLOCK
+ 	def_bool !X86_XADD
+@@ -330,6 +330,7 @@ config X86_RDC321X
+ 
+ config X86_VSMP
+ 	bool "Support for ScaleMP vSMP"
++	depends on !XEN
+ 	depends on X86_64 && PCI
+ 	 help
+ 	  Support for ScaleMP vSMP systems.  Say 'Y' here if this kernel is
+diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
+index 2cdc9de..cfc79ac 100644
+--- a/arch/x86/kernel/acpi/boot.c
++++ b/arch/x86/kernel/acpi/boot.c
+@@ -141,7 +141,7 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
+ 
+ 	offset = phys & (PAGE_SIZE - 1);
+ 	mapped_size = PAGE_SIZE - offset;
+-	set_fixmap(FIX_ACPI_END, phys);
++	set_fixmap_ma(FIX_ACPI_END, phys);
+ 	base = fix_to_virt(FIX_ACPI_END);
+ 
+ 	/*
+@@ -152,7 +152,7 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
+ 		if (--idx < FIX_ACPI_BEGIN)
+ 			return NULL;	/* cannot handle this */
+ 		phys += PAGE_SIZE;
+-		set_fixmap(idx, phys);
++		set_fixmap_ma(idx, phys);
+ 		mapped_size += PAGE_SIZE;
+ 	}
+ 
+diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
+index 35a568e..40fc1b3 100644
+--- a/arch/x86/kernel/apic_32.c
++++ b/arch/x86/kernel/apic_32.c
+@@ -1138,7 +1138,7 @@ void __init init_apic_mappings(void)
+ 	} else
+ 		apic_phys = mp_lapic_addr;
+ 
+-	set_fixmap_nocache(FIX_APIC_BASE, apic_phys);
++	set_fixmap_ma_nocache(FIX_APIC_BASE, apic_phys);
+ 	printk(KERN_DEBUG "mapped APIC to %08lx (%08lx)\n", APIC_BASE,
+ 	       apic_phys);
+ 
+@@ -1172,7 +1172,7 @@ fake_ioapic_page:
+ 					      alloc_bootmem_pages(PAGE_SIZE);
+ 				ioapic_phys = __pa(ioapic_phys);
+ 			}
+-			set_fixmap_nocache(idx, ioapic_phys);
++			set_fixmap_ma_nocache(idx, ioapic_phys);
+ 			printk(KERN_DEBUG "mapped IOAPIC to %08lx (%08lx)\n",
+ 			       __fix_to_virt(idx), ioapic_phys);
+ 			idx++;
+diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
+index d8d03e0..a611520 100644
+--- a/arch/x86/kernel/apic_64.c
++++ b/arch/x86/kernel/apic_64.c
+@@ -877,7 +877,7 @@ void __init init_apic_mappings(void)
+ 	} else
+ 		apic_phys = mp_lapic_addr;
+ 
+-	set_fixmap_nocache(FIX_APIC_BASE, apic_phys);
++	set_fixmap_ma_nocache(FIX_APIC_BASE, apic_phys);
+ 	apic_printk(APIC_VERBOSE, "mapped APIC to %16lx (%16lx)\n",
+ 				APIC_BASE, apic_phys);
+ 
+diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
+index 494e1e0..d0fabfd 100644
+--- a/arch/x86/kernel/asm-offsets_64.c
++++ b/arch/x86/kernel/asm-offsets_64.c
+@@ -25,6 +25,8 @@
+ #define OFFSET(sym, str, mem) \
+ 	DEFINE(sym, offsetof(struct str, mem))
+ 
++#include <xen/interface/xen.h>
++
+ #define __NO_STUBS 1
+ #undef __SYSCALL
+ #undef _ASM_X86_64_UNISTD_H_
+@@ -92,6 +94,13 @@ int main(void)
+ 	       offsetof (struct rt_sigframe32, uc.uc_mcontext));
[...5545 lines suppressed...]
+-#define ELFNOTE(name, type, desc)		\
++#define ELFNOTE(name, type, desc...)		\
+ 	ELFNOTE_START(name, type, "")		\
+ 		desc			;	\
+ 	ELFNOTE_END
+diff --git a/include/xen/events.h b/include/xen/events.h
+index 2bde54d..c18d2bf 100644
+--- a/include/xen/events.h
++++ b/include/xen/events.h
+@@ -3,6 +3,8 @@
+ 
+ #include <linux/interrupt.h>
+ 
++#include <asm/xen/interface.h>
++#include <xen/interface/xen.h>
+ #include <xen/interface/event_channel.h>
+ #include <asm/xen/hypercall.h>
+ 
+diff --git a/include/xen/interface/elfnote.h b/include/xen/interface/elfnote.h
+index a64d3df..ee5501d 100644
+--- a/include/xen/interface/elfnote.h
++++ b/include/xen/interface/elfnote.h
+@@ -120,6 +120,22 @@
+  */
+ #define XEN_ELFNOTE_BSD_SYMTAB    11
+ 
++/*
++ * The lowest address the hypervisor hole can begin at (numeric).
++ *
++ * This must not be set higher than HYPERVISOR_VIRT_START. Its presence
++ * also indicates to the hypervisor that the kernel can deal with the
++ * hole starting at a higher address.
++ */
++#define XEN_ELFNOTE_HV_START_LOW  12
++
++/*
++ * List of maddr_t-sized mask/value pairs describing how to recognize
++ * (non-present) L1 page table entries carrying valid MFNs (numeric).
++ */
++#define XEN_ELFNOTE_L1_MFN_VALID  13
++
++
+ #endif /* __XEN_PUBLIC_ELFNOTE_H__ */
+ 
+ /*
+diff --git a/include/xen/page.h b/include/xen/page.h
+index 031ef22..158fb60 100644
+--- a/include/xen/page.h
++++ b/include/xen/page.h
+@@ -8,6 +8,10 @@
+ 
+ #include <xen/features.h>
+ 
++#include <asm/xen/interface.h>
++
++#include <xen/hvc-console.h>
++
+ #ifdef CONFIG_X86_PAE
+ /* Xen machine address */
+ typedef struct xmaddr {
+@@ -70,6 +74,8 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn)
+ #endif
+ 
+ 	pfn = 0;
++	//xprintk("mfn_to_pfn(%lx):\n", mfn);
++
+ 	/*
+ 	 * The array access can fail (e.g., device space beyond end of RAM).
+ 	 * In such cases it doesn't matter what we return (we return garbage),
+@@ -77,6 +83,7 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn)
+ 	 */
+ 	__get_user(pfn, &machine_to_phys_mapping[mfn]);
+ 
++	//xprintk("mfn_to_pfn(%lx) = %lx\n", mfn, pfn);
+ 	return pfn;
+ }
+ 
+@@ -143,34 +150,29 @@ static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
+ 
+ static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot)
+ {
+-	pte_t pte;
+-
+-	pte.pte_high = (page_nr >> (32 - PAGE_SHIFT)) |
+-		(pgprot_val(pgprot) >> 32);
+-	pte.pte_high &= (__supported_pte_mask >> 32);
+-	pte.pte_low = ((page_nr << PAGE_SHIFT) | pgprot_val(pgprot));
+-	pte.pte_low &= __supported_pte_mask;
+-
+-	return pte;
++	pteval_t val;
++	
++	val = (page_nr << PAGE_SHIFT) | pgprot_val(pgprot);
++	val &= __supported_pte_mask;
++	return native_make_pte(val);
+ }
+ 
+-static inline unsigned long long pte_val_ma(pte_t x)
++static inline pteval_t pte_val_ma(pte_t x)
+ {
+-	return x.pte;
++	return native_pte_val(x);
+ }
+-#define pmd_val_ma(v) ((v).pmd)
+-#define pud_val_ma(v) ((v).pgd.pgd)
+-#define __pte_ma(x)	((pte_t) { .pte = (x) })
++#define __pte_ma(x)	(native_make_pte(x))
+ #define __pmd_ma(x)	((pmd_t) { (x) } )
+ #else  /* !X86_PAE */
+-#define pte_mfn(_pte) ((_pte).pte_low >> PAGE_SHIFT)
++#define pte_mfn(_pte) ((native_pte_val(_pte) & __PHYSICAL_MASK) >> PAGE_SHIFT)
+ #define mfn_pte(pfn, prot)	__pte_ma(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+ #define pte_val_ma(x)	((x).pte)
+-#define pmd_val_ma(v)	((v).pud.pgd.pgd)
+ #define __pte_ma(x)	((pte_t) { (x) } )
+ #endif	/* CONFIG_X86_PAE */
+ 
+ #define pgd_val_ma(x)	((x).pgd)
++#define pmd_val_ma(x)	(native_pmd_val((x)))
++#define pud_val_ma(x)	(native_pud_val((x)))
+ 
+ 
+ xmaddr_t arbitrary_virt_to_machine(unsigned long address);
+diff --git a/init/main.c b/init/main.c
+index 80f5aaf..4a84f60 100644
+--- a/init/main.c
++++ b/init/main.c
+@@ -590,17 +590,25 @@ asmlinkage void __init start_kernel(void)
+ 	rcu_init();
+ 	init_IRQ();
+ 	pidhash_init();
++	printk("init_timers:\n");
+ 	init_timers();
+ 	hrtimers_init();
+ 	softirq_init();
++	printk("timekeeping:\n");
+ 	timekeeping_init();
++	printk("time:\n");
+ 	time_init();
++	printk("profile:\n");
+ 	profile_init();
++	printk("irqs_disabled:\n");
+ 	if (!irqs_disabled())
+ 		printk("start_kernel(): bug: interrupts were enabled early\n");
++	printk("early_boot_irqs_on:\n");
+ 	early_boot_irqs_on();
++	printk("local_irq_enable:\n");
+ 	local_irq_enable();
+ 
++	printk("console_init:\n");
+ 	/*
+ 	 * HACK ALERT! This is early. We're enabling the console before
+ 	 * we've done PCI setups etc, and console_init() must be aware of
+@@ -637,7 +645,9 @@ asmlinkage void __init start_kernel(void)
+ 	numa_policy_init();
+ 	if (late_time_init)
+ 		late_time_init();
++	printk("calibrate_delay:\n");
+ 	calibrate_delay();
++	printk("pidmap_init:\n");
+ 	pidmap_init();
+ 	pgtable_cache_init();
+ 	prio_tree_init();
+diff --git a/mm/slab.c b/mm/slab.c
+index e499669..c18daa3 100644
+--- a/mm/slab.c
++++ b/mm/slab.c
+@@ -3202,6 +3202,8 @@ static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)
+ 		STATS_INC_ALLOCHIT(cachep);
+ 		ac->touched = 1;
+ 		objp = ac->entry[--ac->avail];
++		if (!objp)
++			printk("really weird: avail objp for cache %s is null\n", cachep->name);
+ 	} else {
+ 		STATS_INC_ALLOCMISS(cachep);
+ 		objp = cache_alloc_refill(cachep, flags);
+@@ -3464,8 +3466,10 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
+ 	unsigned long save_flags;
+ 	void *objp;
+ 
+-	if (should_failslab(cachep, flags))
++	if (should_failslab(cachep, flags)) {
++		printk("cache %s should fail\n", cachep->name);
+ 		return NULL;
++	}
+ 
+ 	cache_alloc_debugcheck_before(cachep, flags);
+ 	local_irq_save(save_flags);
+@@ -3477,6 +3481,8 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
+ 	if (unlikely((flags & __GFP_ZERO) && objp))
+ 		memset(objp, 0, obj_size(cachep));
+ 
++	if (!objp)
++		printk("allocation from cache %s failed!!!\n", cachep->name);
+ 	return objp;
+ }
+ 
+-- 
+1.5.4.1
+

linux-2.6-xen-0017-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch:

Index: linux-2.6-xen-0017-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch
===================================================================
RCS file: linux-2.6-xen-0017-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch
diff -N linux-2.6-xen-0017-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-xen-0017-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,58 @@
+From d00be6cef97823ca14f0c9a3d05a4ecbdda9c6f2 Mon Sep 17 00:00:00 2001
+From: Mark McLoughlin <markmc at redhat.com>
+Date: Thu, 6 Mar 2008 11:10:59 +0000
+Subject: [PATCH] xen x86_64: Add 64 bit version of privcmd_hypercall()
+
+Signed-off-by: Mark McLoughlin <markmc at redhat.com>
+---
+ include/asm-x86/xen/hypercall.h |   28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
+
+diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h
+index a99725b..77108b4 100644
+--- a/include/asm-x86/xen/hypercall.h
++++ b/include/asm-x86/xen/hypercall.h
+@@ -545,6 +545,7 @@ MULTI_stack_switch(struct multicall_entry *mcl,
+ 
+ #include <xen/sys/privcmd.h>
+ 
++#ifdef CONFIG_X86_32
+ static inline int privcmd_hypercall(privcmd_hypercall_t *hypercall)
+ {
+ 	int ret;
+@@ -570,5 +571,32 @@ static inline int privcmd_hypercall(privcmd_hypercall_t *hypercall)
+ 
+ 	return ret;
+ }
++#else /* CONFIG_X86_32 */
++static inline int privcmd_hypercall(privcmd_hypercall_t *hypercall)
++{
++	int ret;
++        long ign1, ign2, ign3;
++
++	if (hypercall->op >= (PAGE_SIZE >> 5))
++		return -EINVAL;
++
++        __asm__ __volatile__ (
++		"movq %8,%%r10; movq %9,%%r8;"
++                "shll $5,%%eax ;"
++                "addq $hypercall_page,%%rax ;"
++                "call *%%rax"
++                : "=a" (ret), "=D" (ign1),
++                  "=S" (ign2), "=d" (ign3)
++                : "0" ((unsigned int)hypercall->op),
++                  "1" (hypercall->arg[0]),
++                  "2" (hypercall->arg[1]),
++                  "3" (hypercall->arg[2]),
++                  "g" (hypercall->arg[3]),
++                  "g" (hypercall->arg[4])
++                : "r8", "r10", "memory" );
++
++	return ret;
++}
++#endif /* CONFIG_X86_32 */
+ 
+ #endif /* __HYPERCALL_H__ */
+-- 
+1.5.4.1
+


Index: linux-2.6.24.tar.bz2.sign
===================================================================
RCS file: linux-2.6.24.tar.bz2.sign
diff -N linux-2.6.24.tar.bz2.sign
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6.24.tar.bz2.sign	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,8 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.7 (GNU/Linux)
+Comment: See http://www.kernel.org/signature.html for info
+
+iD8DBQBHmR5WyGugalF9Dw4RAgviAJsF8E19NUBvcgI4inL02JCSMljEHwCbBfsp
+fU6wxlRC0o2yQ596/IyRLNI=
+=2egt
+-----END PGP SIGNATURE-----


Index: mirrors
===================================================================
RCS file: mirrors
diff -N mirrors
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mirrors	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,5 @@
+http://ftp.kernel.org/pub/linux/kernel/v2.6/snapshots/
+http://ftp.kernel.org/pub/linux/kernel/v2.6/
+http://ftp.kernel.org/pub/linux/kernel/v2.6/snapshots/old/
+http://ftp.kernel.org/pub/linux/kernel/v2.6/testing/
+http://ftp.kernel.org/pub/linux/kernel/v2.6/stable-review/


Index: patch-2.6.25-rc4.bz2.sign
===================================================================
RCS file: patch-2.6.25-rc4.bz2.sign
diff -N patch-2.6.25-rc4.bz2.sign
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patch-2.6.25-rc4.bz2.sign	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,8 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.7 (GNU/Linux)
+Comment: See http://www.kernel.org/signature.html for info
+
+iD8DBQBHzihsyGugalF9Dw4RAmvmAJ9ksQ5jf9yUO9KIUeo1adCPfKJrMQCfa3Ob
+5SYdhp9yFKCV9a4cvu3nF70=
+=9t/0
+-----END PGP SIGNATURE-----


Index: upstream
===================================================================
RCS file: upstream
diff -N upstream
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ upstream	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,2 @@
+linux-2.6.24.tar.bz2
+patch-2.6.25-rc4.bz2


Index: upstream-key.gpg
===================================================================
RCS file: upstream-key.gpg
diff -N upstream-key.gpg
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ upstream-key.gpg	6 Mar 2008 13:59:26 -0000	1.2
@@ -0,0 +1,54 @@
+pub  1024D/517D0F0E 2000-10-10 Linux Kernel Archives Verification Key <ftpadmin at kernel.org>
+     Key fingerprint = C75D C40A 11D7 AF88 9981  ED5B C86B A06A 517D 0F0E
+sub  4096g/E50A8F2A 2000-10-10
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.0.3 (GNU/Linux)
+Comment: For info see http://www.gnupg.org
+
+mQGiBDnirDkRBADCTL/iUTeZKb0tiAcKdZdsUP/KSnrGGjlinolUAsUC0D6/hUB1
+RdCpJOOERTIEr1yvehqDM7veRhNMoxJNQxa/sSrkywey5qc8uaskUNEqenimq/70
+bahWJeoWXjad68mQFh65lULnHQrrioeJnh9UpyGJppNb/yIjdnymH9aYEwCglgP7
+UegBzH22h8NVQEK2PWWbyUUD/jQA4lI0wRWcL9HpkYkHcH0LTKRB9zYpQYtyvzJi
+yTGwJyFMfYNXy0RT11dICeLkf3HMR84hkPERKMhALobLxVUbfc7j2AygmzGphWGy
+DH/xjptQP/zrsq87ylYRONK18w1J42cm+yZa4XThMDPJMrb9/l8qnxU1JnW7W1al
+HKTpBACbs+91KLqrnIGcF44TMwxgUj5CUrayPoEnLU+ZMBqfSjmu8RqEYmTxJCKv
+7erBFSuazBGj5X7twunrtrW3bxO63MbLbHjfXSRrMnKOb8dRULIg6eWAnoAx8VVZ
+YjrOpwAntU3WxYOpbiCHt9kLbb+N5rvNtFcmOqRRQaCIUFOOaLQ8TGludXggS2Vy
+bmVsIEFyY2hpdmVzIFZlcmlmaWNhdGlvbiBLZXkgPGZ0cGFkbWluQGtlcm5lbC5v
+cmc+iFUEExECABUFAjnirDkDCwoDAxUDAgMWAgECF4AACgkQyGugalF9Dw4MNACe
+JiQTyCmQzPGou2cl/RyOXj79kYYAnAsT6xt72hp/PFiywYM9vBsDVv9niQEVAwUQ
+OeKwNWx5eAAqlgcFAQEdZgf/Vn2dMKrn8021NhavP0uA3pHGRmdKQ2WJBdLiN2tv
+LkpAioZtho+op+xBz8j1zdIJQ/7XWko869KHge2BAFwA8rWDzjtaAWdE0Jo/NiAR
+epUwV2FdRRwSxIcNG2CCPyJnfPokRqjdl2z9k2PkwidHSq+2k6JxCWnOcIXChSKf
+kHnemtA65ixAlhuxvyN3MPuYs1jAHyDGcyMfomp1qH9tXFQhhyXRrG2eMAfslstC
+XGXLcoLN3O2BMR/fG2GlV6kOqGOvoMIW3clVeQLQ9B1yyekKiVY6Vg+CgK5qhg8z
+9tjH4f33zzNDwsx1WSCOU/1LIPzFBNbR9QtTF2XmOUfRs4hGBBARAgAGBQI54rBc
+AAoJEH2d7s4ry8YhmjsAoMUW9RxfXBSos0A6LwGd+5pXv/MRAKCYFLG2T4GSV+qf
+iRsXnrgDHQHD04hGBBARAgAGBQI54rOZAAoJEPKlddweGoeC/+sAoL5f7JF21mRe
+Z8VV4nhh7prm+idSAKCMXDWW/tBOeJDYpiEhgyGSGgJJWrkEDQQ54q+cEBAAjRmb
+txamcZ9EYsQTnQvVL2l6vY5Rnbc1JDdcyHEV1kH5OwZWqvckL4QgKKBbTQwyB9pC
+o0nGK4PkBbrwL0outfHQ5jl9DUzTKIu+asWUyf3fxfUV6j2A6BMo59KNnJzUyJ2+
+B5na6NN8nEqEtmogROtjT8LkOvYwqD4A/5re2vwtie+h5yU6A+JbyGQF6lFxThZj
+4WGctBgCcDBqRkPAG8DFFAdeN5SMAArktCYuUGXi2q88EDoOs3Ykw0kB8+ZFECz/
+4/b93so5Wt2hC15cxAJoXFfR3mXHm40EHzMdEublWV4blB2KvFocQC74/H74QPUk
+cWlc6EhPodKvcuOfTimDxXaiGNFONUPgNAmCXeVoOapdWpb3x7iOHPwSaXeJSrO9
+fc4GtVjDv90DT2ekK7cvYk8s6B3t7p7W21Xi+hRgrw63B3HElr01gdMZY5XA5ey/
+WmnyBS6LOxXlnVBE+2uSQ+aZHqrLpXcRvq2ZonOziDSE0i940ZvIwlSzn0U5BQWl
+9hBDQw78RacYqaFvlpcGiPj75bScB4eemxV6Wdo9mtK0Vrr+9bWScXHEv7did4X+
+7tBWKbA8M+g290OSzjeQBGLuPmbjxzEKH9jcUumzBzzC5x5GFh7On9TLXQ4K/oRT
+6QQpS93YrTVbR60G4MKsePWLJmg7IgYUtNdLGjsAAwUP/0aAAq8CmWtourj1XxNY
+pFmOAU45d65fPWVadKyF++B+uDyRNYN7HQCqrJ7ddn0sH7OBtlE8yaBYgR0TFly9
+9+LqQO4r4IGCw2TBgA5tKnOWoPGEzvrLeoxR3SnPrKBlDvx6Rr9h3OJ9UV5u/NLh
+mCP9iN10gWCGzsWbONc6qD6PugbTur44D6s4CRK9xfliSrtG3GBHW914UKjJeB9s
+e3oc1rkmNv39kKcu33w4XVETAj4qpXnwoJvy639dfvnQt1TWFjIt20iP7m+jkT3B
+b526uJ5GuJl6r8sm5OYYRs5cLigvUzRZVgYnjjqlRRACx0WcinKK55Li2Pq4qcRV
+vSE5Tr3kTUTGxdmy113FbscrhLhesGALv3Hb7jeeWC8jviGEaHppgUumR6v0hsI1
+rZ3K8kCjFRAYV8OKtcEeMqjouArGi5dn0ClmG4lwH4SEdqC/TRNWGG+iVpWf5yCj
+9mvtvUhLtl6QjXHLrJdSGyafvqR1EQMJadFt4URvx0M7tqZIcwPUnb+7Oc+J96po
+e/EQmnm6rFnTpWz0BbY4mbJC7vUH4JyLs0nlxiKrBjaO9C1DSAKBpjqaga8dQe1Z
+kLOI2F7IWFeKV2LaMl+ZvvfWMECNcqNW2fkCuP9Fpz5K+xg21TwovVy93aWKgFL6
+06jK51oQp3fW86xXK9ZGKYqQiEYEGBECAAYFAjnir5wACgkQyGugalF9Dw5M9QCg
+hhmHalzWf8B3AVrjPrtrRHA1vlgAn3YRlU5l0V5W1iXvHXQCUHIESpgm
+=SZZb
+-----END PGP PUBLIC KEY BLOCK-----


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/.cvsignore,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- .cvsignore	18 Jan 2008 19:14:27 -0000	1.11
+++ .cvsignore	6 Mar 2008 13:59:25 -0000	1.12
@@ -1,4 +1,8 @@
-linux-2.6.21.tar.bz2
-patch-2.6.21.7.bz2
-linux-2.6.21.7-xen-3.1.0.patch.bz2
+clog
+GNUmakefile
+kernel-2.6.*.config
+temp-*
+kernel-2.6.24
+linux-2.6.24.tar.bz2
+patch-2.6.25-rc4.bz2
 xen-3.2.0.tar.gz


Index: Makefile
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile	15 Oct 2007 18:56:30 -0000	1.2
+++ Makefile	6 Mar 2008 13:59:25 -0000	1.3
@@ -1,7 +1,18 @@
-# Makefile for source rpm: kernel-xen-2.6
+# Makefile for source rpm: kernel
 # $Id$
-NAME := kernel-xen-2.6
-SPECFILE = $(firstword $(wildcard *.spec))
+NAME     := kernel-xen-2.6
+SPECFILE := kernel.spec
+
+# use noarch for make prep instead of the current CPU
+# noarch creates and checks all config files not just the current one,
+# in addition "i386" isn't a valid kernel target
+PREPARCH  = noarch
+
+# we only check the .sign signatures
+UPSTREAM_CHECKS = sign
+
+# local targets we need to carry around in addition to the default sources
+TARGETS		= download
 
 define find-makefile-common
 for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
@@ -10,7 +21,7 @@
 MAKEFILE_COMMON := $(shell $(find-makefile-common))
 
 ifeq ($(MAKEFILE_COMMON),)
-# attempt a checkout
+# attept a checkout
 define checkout-makefile-common
 test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
 endef
@@ -19,3 +30,187 @@
 endif
 
 include $(MAKEFILE_COMMON)
+include Makefile.config
+
+debug:
+	@perl -pi -e 's/# CONFIG_SLUB_DEBUG_ON is not set/CONFIG_SLUB_DEBUG_ON=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_LOCK_STAT is not set/CONFIG_LOCK_STAT=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_STACK_USAGE is not set/CONFIG_DEBUG_STACK_USAGE=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_IGNORE_QUIET is not set/CONFIG_DEBUG_IGNORE_QUIET=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_SLAB is not set/CONFIG_DEBUG_SLAB=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_MUTEXES is not set/CONFIG_DEBUG_MUTEXES=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_RT_MUTEXES is not set/CONFIG_DEBUG_RT_MUTEXES=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_RWSEMS is not set/CONFIG_DEBUG_RWSEMS=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_LOCK_ALLOC is not set/CONFIG_DEBUG_LOCK_ALLOC=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_PROVE_LOCKING is not set/CONFIG_PROVE_LOCKING=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_SPINLOCK is not set/CONFIG_DEBUG_SPINLOCK=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_VM is not set/CONFIG_DEBUG_VM=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_SLEEP_IN_IRQ is not set/CONFIG_DEBUG_SLEEP_IN_IRQ=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_FAULT_INJECTION is not set/CONFIG_FAULT_INJECTION=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_FAILSLAB is not set/CONFIG_FAILSLAB=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_FAIL_PAGE_ALLOC is not set/CONFIG_FAIL_PAGE_ALLOC=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_FAIL_MAKE_REQUEST is not set/CONFIG_FAIL_MAKE_REQUEST=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_FAULT_INJECTION_DEBUG_FS is not set/CONFIG_FAULT_INJECTION_DEBUG_FS=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set/CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_DEBUG_SG is not set/CONFIG_DEBUG_SG=y/' config-nodebug
+	@perl -pi -e 's/# CONFIG_EXT4DEV_FS is not set/CONFIG_EXT4DEV_FS=m/' config-generic
+
+	@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
+
+release:
+	@perl -pi -e 's/CONFIG_SLUB_DEBUG_ON=y/# CONFIG_SLUB_DEBUG_ON is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_LOCK_STAT=y/# CONFIG_LOCK_STAT is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_STACK_USAGE=y/# CONFIG_DEBUG_STACK_USAGE is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_IGNORE_QUIET=y/# CONFIG_DEBUG_IGNORE_QUIET is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_SLAB=y/# CONFIG_DEBUG_SLAB is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_MUTEXES=y/# CONFIG_DEBUG_MUTEXES is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_RT_MUTEXES=y/# CONFIG_DEBUG_RT_MUTEXES is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_RWSEMS=y/# CONFIG_DEBUG_RWSEMS is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_LOCK_ALLOC=y/# CONFIG_DEBUG_LOCK_ALLOC is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_PROVE_LOCKING=y/# CONFIG_PROVE_LOCKING is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_SPINLOCK=y/# CONFIG_DEBUG_SPINLOCK is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_VM=y/# CONFIG_DEBUG_VM is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_SLEEP_IN_IRQ=y/# CONFIG_DEBUG_SLEEP_IN_IRQ is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_FAULT_INJECTION=y/# CONFIG_FAULT_INJECTION is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_FAILSLAB=y/# CONFIG_FAILSLAB is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_FAIL_PAGE_ALLOC=y/# CONFIG_FAIL_PAGE_ALLOC is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_FAIL_MAKE_REQUEST=y/# CONFIG_FAIL_MAKE_REQUEST is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_FAULT_INJECTION_DEBUG_FS=y/# CONFIG_FAULT_INJECTION_DEBUG_FS is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y/# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_DEBUG_SG=y/# CONFIG_DEBUG_SG is not set/' config-nodebug
+	@perl -pi -e 's/CONFIG_EXT4DEV_FS=m/# CONFIG_EXT4DEV_FS is not set/' config-generic
+
+	@perl -pi -e 's/^%define debugbuildsenabled 0/%define debugbuildsenabled 1/' kernel.spec
+
+
+reconfig:
+	@rm -f kernel-*-config
+	@VERSION="2.6.25" make -f Makefile.config configs
+	@scripts/reconfig.sh
+
+# since i386 isn't a target...
+compile compile-short: DIST_DEFINES += --target $(shell uname -m)
+
+#
+# Hacks for building vanilla (unpatched) kernel rpms.
+# Use "make vanilla-TARGET" like "make TARGET" (make vanilla-scratch-build).
+#
+vanilla-%: $(SPECFILE:.spec=-vanilla.spec)
+	@$(MAKE) $* SPECFILE=$<
+
+$(SPECFILE:.spec=-vanilla.spec): $(SPECFILE)
+	@rm -f $@
+	(echo %define nopatches 1; cat $<) > $@
+
+#scratch-build: NAME = $(shell rpm $(RPM_DEFINES) $(DIST_DEFINES) -q --qf "%{NAME}\n" --specfile $(SPECFILE)| head -1)
+#scratch-build: test-srpm
+#	$(BUILD_CLIENT) build $(BUILD_FLAGS) --scratch $(TARGET) \
+#			$(SRCRPMDIR)/$(NAME)-$(VERSION)-$(RELEASE).src.rpm
+
+# Dismal kludge for building via brew from cvs after "make vanilla-tag".
+ifdef BEEHIVE_SRPM_BUILD
+export CHECKOUT_TAG ?= $(shell sed s/^.// CVS/Tag)
+tag-pattern = $(TAG_NAME)-$(TAG_VERSION)-0_%_$(TAG_RELEASE)
+ifeq (,$(filter-out $(tag-pattern),$(CHECKOUT_TAG)))
+variant := $(patsubst $(tag-pattern),%,$(CHECKOUT_TAG))
+srpm: SPECFILE := $(wildcard $(SPECFILE:.spec=-$(variant).spec) \
+			     $(SPECFILE:.spec=.t.$(variant).spec))
+srpm beehive-sprm: RELEASE := 0.$(variant).$(RELEASE)
+endif
+endif
+
+ifndef KVERSION
+KVERSION := $(shell awk '$$1 == "%define" && $$2 == "base_sublevel" { \
+				print "2.6." $$3 \
+			 }' $(SPECFILE))
+endif
+
+#
+# Hacks for building kernel rpms from upstream code plus local GIT branches.
+# Use "make git/BRANCH/TARGET" like "make TARGET".
+# Use "make git/BRANCH-fedora/TARGET" to include Fedora patches on top.
+#
+ifndef GIT_SPEC
+git/%:
+	@$(MAKE) GIT_SPEC=$(subst /,-,$(*D)) git-$(*F)
+else
+git-%: $(SPECFILE:.spec=.t.$(GIT_SPEC).spec)
+	@$(MAKE) GIT_SPEC= $* SPECFILE=$<
+endif
+
+#
+# Your git-branches.mk file can define GIT_DIR, e.g.:
+#	GIT_DIR = ${HOME}/kernel/.git
+# Make sure GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL are also set
+# or your rpm changelogs will look like crap.
+#
+# For each branch it can define a variable branch-BRANCH or tag-BRANCH
+# giving the parent of BRANCH to diff against in a separate patch.  If
+# the parent is unknown, it will use $(branch-upstream) defaulting to
+# "refs/remotes/upstream/master".
+#
+# Defining tag-BRANCH means the tag corresponds to an upstream patch in
+# the sources file, so that is used instead of generating a patch with
+# git.  If there is no tag-upstream defined, it will figure out a vNNN
+# tag or vNNN-gitN pseudo-tag from the last patch in the sources file.
+# For example:
+#	tag-some-hacks = v2.6.21-rc5
+#	branch-more-hacks = some-hacks
+# Leads to patches:
+#	git diff v2.6.21-rc5..more-hacks > linux-2.6.21-rc5-some-hacks.patch
+#	git diff some-hacks..more-hacks > linux-2.6.21-rc5-more-hacks.patch
+# Whereas having no git-branches.mk at all but doing
+# "make GIT_DIR=... git/mybranch/test-srpm" does:
+#	id=`cat patch-2.6.21-rc5-git4.id` # auto-fetched via upstream file
+#	git diff $id..upstream > linux-2.6.21-rc5-git4-upstream.patch
+#	git diff upstream..mybranch > linux-2.6.21-rc5-git4-mybranch.patch
+# If the upstream patch (or any branch patch) is empty it's left out.
+#
+git-branches.mk:;
+-include git-branches.mk
+
+branch-upstream ?= refs/remotes/upstream/master
+
+ifdef GIT_DIR
+export GIT_DIR
+export GIT_AUTHOR_NAME
+export GIT_AUTHOR_EMAIL
+gen-patches ?= gen-patches
+
+ifndef havespec
+$(SPECFILE:.spec=.t.%-fedora.spec): $(SPECFILE) $(gen-patches) FORCE
+	./$(gen-patches) --fedora < $< > $@ $(gen-patches-args)
+$(SPECFILE:.spec=.t.%.spec): $(SPECFILE) $(gen-patches) FORCE
+	./$(gen-patches) < $< > $@ $(gen-patches-args)
+.PRECIOUS: $(SPECFILE:.spec=.t.%.spec) $(SPECFILE:.spec=.t.%-fedora.spec)
+endif
+
+spec-%: $(SPECFILE:.spec=.t.%.spec) ;
+$(SPECFILE):;
+FORCE:;
+
+branch-of-* = $(firstword $(head-$*) $*)
+gen-patches-args = --name $* v$(KVERSION) $(call heads,$(branch-of-*))
+define heads
+$(if $(tag-$1),$(filter-out v$(KVERSION),$(tag-$1)),\
+     $(call heads,$(firstword $(branch-$1) $(branch-upstream)))) $1
+endef
+
+files-%-fedora:
+	@echo $(SPECFILE:.spec=.t.$*-fedora.spec)
+	@$(call list-patches,$(branch-of-*))
+files-%:
+	@echo $(SPECFILE:.spec=.t.$*.spec)
+	@$(call list-patches,$(branch-of-*))
+define list-patches
+$(if $(tag-$1),version=$(patsubst v%,%,$(tag-$1)),\
+     $(call list-patches,$(firstword $(branch-$1) $(branch-upstream)))); \
+echo linux-$${version}-$(patsubst refs/remotes/%/master,%,$1).patch
+endef
+
+ifndef tag-$(branch-upstream)
+tag-$(branch-upstream) := $(shell \
+	sed -n 's/^.*  *//;s/\.bz2$$//;s/patch-/v/;/^v/h;$${g;p}' sources)
+endif
+endif




Index: config-debug
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-debug,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-debug	29 Oct 2007 17:29:06 -0000	1.2
+++ config-debug	6 Mar 2008 13:59:25 -0000	1.3
@@ -25,4 +25,8 @@
 CONFIG_DEBUG_STACK_USAGE=y
 
 CONFIG_ACPI_DEBUG=y
-# CONFIG_ACPI_DEBUG_FUNC_TRACE is not set
\ No newline at end of file
+# CONFIG_ACPI_DEBUG_FUNC_TRACE is not set
+
+CONFIG_DEBUG_SG=y
+
+CONFIG_DEBUG_PAGEALLOC=y


Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-generic,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-generic	29 Oct 2007 17:29:06 -0000	1.2
+++ config-generic	6 Mar 2008 13:59:25 -0000	1.3
@@ -40,8 +40,11 @@
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
 CONFIG_DEFAULT_CFQ=y
-CONFIG_IPC_NS=y
 CONFIG_USER_NS=y
+CONFIG_PID_NS=y
+CONFIG_UTS_NS=y
+CONFIG_IPC_NS=y
+
 CONFIG_POSIX_MQUEUE=y
 # CONFIG_PREEMPT_NONE is not set
 CONFIG_PREEMPT_VOLUNTARY=y
@@ -49,6 +52,7 @@
 CONFIG_PREEMPT_BKL=y
 
 CONFIG_SLUB=y
+# CONFIG_SLUB_STATS is not set
 
 CONFIG_MISC_DEVICES=y
 
@@ -71,9 +75,12 @@
 CONFIG_PCI_MSI=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_PCIEAER=y
+CONFIG_PCIEASPM=y
+# CONFIG_PCIEASPM_DEBUG is not set
 CONFIG_HOTPLUG_PCI_PCIE=m
 CONFIG_HOTPLUG_PCI_FAKE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
+# CONFIG_PCI_LEGACY is not set
+
 CONFIG_ISA=y
 # CONFIG_EISA is not set
 # CONFIG_MCA is not set
@@ -110,7 +117,7 @@
 CONFIG_INFINIBAND_IPOIB=m
 CONFIG_INFINIBAND_IPOIB_DEBUG=y
 CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
-# CONFIG_INFINIBAND_IPOIB_CM is not set
+CONFIG_INFINIBAND_IPOIB_CM=y
 CONFIG_INFINIBAND_SRP=m
 CONFIG_INFINIBAND_USER_MAD=m
 CONFIG_INFINIBAND_USER_ACCESS=m
@@ -121,6 +128,8 @@
 CONFIG_INFINIBAND_CXGB3=m
 # CONFIG_INFINIBAND_CXGB3_DEBUG is not set
 CONFIG_MLX4_INFINIBAND=m
+CONFIG_INFINIBAND_NES=m
+# CONFIG_INFINIBAND_NES_DEBUG is not set
 
 #
 # Executable file formats
@@ -365,8 +374,6 @@
 # CONFIG_BLK_DEV_OPTI621 is not set
 CONFIG_BLK_DEV_RZ1000=y
 CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_ONLYDISK is not set
 CONFIG_BLK_DEV_AEC62XX=y
 CONFIG_BLK_DEV_ALI15X3=y
 # CONFIG_WDC_ALI15X3 is not set
@@ -393,21 +400,27 @@
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_CHIPSETS is not set
 CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
 # CONFIG_BLK_DEV_HD is not set
 
+CONFIG_VIRTIO=m
+CONFIG_VIRTIO_BLK=m
+CONFIG_VIRTIO_RING=m
+CONFIG_VIRTIO_PCI=m
+CONFIG_VIRTIO_BALLOON=m
+CONFIG_VIRTIO_NET=m
+
 #
 # SCSI device support
 #
 CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
 
-CONFIG_SCSI_TGT=m
+CONFIG_SCSI_ENCLOSURE=m
+CONFIG_SCSI_PROC_FS=y
 CONFIG_SCSI_SCAN_ASYNC=y
 CONFIG_SCSI_SRP=m
 CONFIG_SCSI_SRP_ATTRS=m
+CONFIG_SCSI_TGT=m
 
 #
 # SCSI support type (disk, tape, CD-ROM)
@@ -435,6 +448,7 @@
 CONFIG_SCSI_SAS_LIBSAS=m
 CONFIG_SCSI_SAS_ATA=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
+CONFIG_SCSI_SAS_HOST_SMP=y
 CONFIG_RAID_ATTRS=m
 
 CONFIG_ISCSI_TCP=m
@@ -515,14 +529,14 @@
 CONFIG_PATA_IT8213=m
 CONFIG_PATA_JMICRON=m
 # CONFIG_PATA_LEGACY is not set
-CONFIG_PATA_TRIFLEX=m
+CONFIG_PATA_NINJA32=m
 CONFIG_PATA_MARVELL=m
 # CONFIG_PATA_WINBOND_VLB is not set
 CONFIG_PATA_MPIIX=m
-CONFIG_PATA_OLDPIIX=m
 CONFIG_PATA_NETCELL=m
 CONFIG_PATA_NS87410=m
 CONFIG_PATA_NS87415=m
+CONFIG_PATA_OLDPIIX=m
 CONFIG_PATA_OPTI=m
 CONFIG_PATA_OPTIDMA=m
 CONFIG_PATA_PCMCIA=m
@@ -535,6 +549,7 @@
 CONFIG_PATA_PDC2027X=m
 CONFIG_PATA_SIL680=m
 CONFIG_PATA_SIS=m
+CONFIG_PATA_TRIFLEX=m
 CONFIG_PATA_VIA=m
 CONFIG_PATA_WINBOND=m
 
@@ -678,11 +693,6 @@
 CONFIG_IP_MULTIPLE_TABLES=y
 CONFIG_IP_ROUTE_MULTIPATH=y
 CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_MULTIPATH_RR=m
-CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m
-CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m
-CONFIG_IP_ROUTE_MULTIPATH_DRR=m
 # CONFIG_IP_PNP is not set
 CONFIG_NET_IPIP=m
 CONFIG_NET_IPGRE=m
@@ -737,14 +747,17 @@
 CONFIG_IPV6_MULTIPLE_TABLES=y
 
 CONFIG_NET_9P=m
-# CONFIG_NET_9P_DEBUG is not set
 CONFIG_NET_9P_FD=m
+CONFIG_NET_9P_VIRTIO=m
+# CONFIG_NET_9P_DEBUG is not set
 
 CONFIG_DECNET=m
 CONFIG_DECNET_ROUTER=y
 # CONFIG_DECNET_NF_GRABULATOR is not set
 CONFIG_BRIDGE=m
 CONFIG_NETFILTER=y
+CONFIG_NETFILTER_ADVANCED=y
+CONFIG_NF_CONNTRACK=m
 CONFIG_NETFILTER_NETLINK=m
 CONFIG_NETFILTER_NETLINK_QUEUE=m
 CONFIG_NETFILTER_NETLINK_LOG=m
@@ -757,8 +770,10 @@
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_SECMARK=m
 CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
@@ -770,15 +785,18 @@
 CONFIG_NETFILTER_XT_MATCH_ESP=m
 CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
@@ -891,9 +909,10 @@
 CONFIG_BRIDGE_EBT_LOG=m
 CONFIG_BRIDGE_EBT_ULOG=m
 CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_XFRM_SUB_POLICY=y
 CONFIG_XFRM_MIGRATE=y
+CONFIG_XFRM_SUB_POLICY=y
+CONFIG_XFRM_STATISTICS=y
+CONFIG_XFRM_USER=y
 CONFIG_INET_XFRM_MODE_TRANSPORT=m
 CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_XFRM_MODE_BEET=m
@@ -949,40 +968,40 @@
 #
 CONFIG_NET_SCHED=y
 CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_HFSC=m
 CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_SCH_NETEM=m
 CONFIG_NET_SCH_PRIO=m
 CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_RR=m
 CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
 CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_RR=m
-CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_SCH_TEQL=m
 CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_FLOW=m
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_CLS_POLICE=y
 CONFIG_NET_CLS_ROUTE4=m
 CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_MARK=y
 CONFIG_NET_CLS_RSVP=m
 CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_MARK=y
 CONFIG_CLS_U32_PERF=y
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_CLS_BASIC=m
 CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
 CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
 CONFIG_NET_EMATCH_META=m
+CONFIG_NET_EMATCH_NBYTE=m
+CONFIG_NET_EMATCH_STACK=32
 CONFIG_NET_EMATCH_TEXT=m
+CONFIG_NET_EMATCH_U32=m
 
 CONFIG_NET_ACT_GACT=m
 CONFIG_GACT_PROB=y
@@ -1068,7 +1087,7 @@
 CONFIG_BROADCOM_PHY=m
 CONFIG_CICADA_PHY=m
 CONFIG_DAVICOM_PHY=m
-CONFIG_FIXED_PHY=m
+CONFIG_FIXED_PHY=y
 CONFIG_FIXED_MII_10_FDX=y
 CONFIG_FIXED_MII_100_FDX=y
 CONFIG_FIXED_MII_1000_FDX=y
@@ -1078,6 +1097,7 @@
 CONFIG_LXT_PHY=m
 CONFIG_MARVELL_PHY=m
 CONFIG_QSEMI_PHY=m
+CONFIG_REALTEK_PHY=m
 CONFIG_SMSC_PHY=m
 CONFIG_VITESSE_PHY=m
 
@@ -1120,7 +1140,7 @@
 CONFIG_BNX2=m
 CONFIG_QLA3XXX=m
 CONFIG_ATL1=m
-# CONFIG_DGRS is not set
+CONFIG_ATL2=m
 # CONFIG_EEPRO100 is not set
 CONFIG_E100=m
 CONFIG_FEALNX=m
@@ -1225,9 +1245,14 @@
 # CONFIG_PCMCIA_RAYCS is not set
 
 CONFIG_MAC80211=m
+CONFIG_MAC80211_RC_DEFAULT_PID=y
+# CONFIG_MAC80211_RC_DEFAULT_SIMPLE is not set
+CONFIG_MAC80211_RC_DEFAULT="pid"
+CONFIG_MAC80211_RC_PID=y
+CONFIG_MAC80211_RC_SIMPLE=y
 CONFIG_MAC80211_LEDS=y
-CONFIG_MAC80211_HT=y
-# CONFIG_MAC80211_DEBUGFS is not set
+CONFIG_MAC80211_DEBUGFS=y
+# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
 # CONFIG_MAC80211_DEBUG is not set
 CONFIG_IEEE80211=m
 CONFIG_IEEE80211_DEBUG=y
@@ -1237,25 +1262,19 @@
 CONFIG_IEEE80211_SOFTMAC=m
 CONFIG_IEEE80211_SOFTMAC_DEBUG=y
 CONFIG_CFG80211=m
+CONFIG_NL80211=y
 
 CONFIG_ADM8211=m
 CONFIG_ATH5K=m
+CONFIG_ATH5K_DEBUG=y
 CONFIG_AIRO=m
 CONFIG_AIRO_CS=m
 CONFIG_ATMEL=m
 # CONFIG_BCM43XX is not set
 CONFIG_B43=m
-CONFIG_B43_PCI=y
 CONFIG_B43_PCMCIA=y
 CONFIG_B43_DEBUG=y
-CONFIG_B43_DMA=y
-CONFIG_B43_PIO=y
-CONFIG_B43_DMA_AND_PIO_MODE=y
-# CONFIG_B43_DMA_MODE is not set
-# CONFIG_B43_PIO_MODE is not set
 CONFIG_B43LEGACY=m
-CONFIG_B43LEGACY_PCI=y
-CONFIG_B43LEGACY_PCMCIA=y
 CONFIG_B43LEGACY_DEBUG=y
 CONFIG_B43LEGACY_DMA=y
 CONFIG_B43LEGACY_PIO=y
@@ -1273,17 +1292,21 @@
 # CONFIG_IPW2200 is not set
 # CONFIG_IPW2100_DEBUG is not set
 # CONFIG_IPW2200_DEBUG is not set
-# CONFIG_LIBERTAS is not set
-
-CONFIG_IWLWIFI=y
-CONFIG_IWLWIFI_DEBUG=y
-CONFIG_IWLWIFI_SENSITIVITY=y
-CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT=y
-CONFIG_IWLWIFI_QOS=y
-CONFIG_IWLWIFI_HT=y
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
+CONFIG_LIBERTAS_CS=m
+CONFIG_LIBERTAS_SDIO=m
+CONFIG_LIBERTAS_DEBUG=y
 CONFIG_IWL4965=m
+CONFIG_IWL4965_DEBUG=y
+CONFIG_IWL4965_SENSITIVITY=y
+CONFIG_IWL4965_SPECTRUM_MEASUREMENT=y
+CONFIG_IWL4965_QOS=y
+CONFIG_IWL4965_HT=y
 CONFIG_IWL3945=m
-# CONFIG_NL80211 is not set
+CONFIG_IWL3945_DEBUG=y
+CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
+CONFIG_IWL3945_QOS=y
 CONFIG_NORTEL_HERMES=m
 CONFIG_P54_COMMON=m
 CONFIG_P54_USB=m
@@ -1297,23 +1320,29 @@
 CONFIG_PCMCIA_ATMEL=m
 CONFIG_PCMCIA_WL3501=m
 CONFIG_RT2X00=y
+CONFIG_RT2X00_LIB_DEBUGFS=y
 # CONFIG_RT2X00_DEBUG is not set
 CONFIG_RT2400PCI=m
 CONFIG_RT2400PCI_RFKILL=y
+CONFIG_RT2400PCI_LEDS=y
 CONFIG_RT2500PCI=m
 CONFIG_RT2500PCI_RFKILL=y
+CONFIG_RT2500PCI_LEDS=y
 CONFIG_RT61PCI=m
 CONFIG_RT61PCI_RFKILL=y
+CONFIG_RT61PCI_LEDS=y
 CONFIG_RT2500USB=m
+CONFIG_RT2500USB_LEDS=y
 CONFIG_RT73USB=m
-CONFIG_RTL818X=y
+CONFIG_RT73USB_LEDS=y
+CONFIG_RTL8180=m
 CONFIG_RTL8187=m
 CONFIG_TMD_HERMES=m
 CONFIG_USB_ATMEL=m
 CONFIG_USB_ZD1201=m
-# CONFIG_ZD1211RW is not set
-CONFIG_ZD1211RW_MAC80211=m
-# CONFIG_ZD1211RW_MAC80211_DEBUG is not set
+CONFIG_USB_NET_RNDIS_WLAN=m
+CONFIG_ZD1211RW=m
+# CONFIG_ZD1211RW_DEBUG is not set
 
 
 #
@@ -1354,7 +1383,24 @@
 #
 # Amateur Radio support
 #
-# CONFIG_HAMRADIO is not set
+CONFIG_HAMRADIO=y
+CONFIG_AX25=m
+CONFIG_AX25_DAMA_SLAVE=y
+# CONFIG_CAN is not set
+CONFIG_NETROM=m
+CONFIG_ROSE=m
+CONFIG_MKISS=m
+CONFIG_6PACK=m
+CONFIG_BPQETHER=m
+CONFIG_SCC=m
+CONFIG_DMASCC=m
+CONFIG_SCC_DELAY=n
+CONFIG_SCC_TRXECHO=y
+CONFIG_BAYCOM_SER_FDX=m
+CONFIG_BAYCOM_SER_HDX=m
+CONFIG_BAYCOM_PAR=m
+CONFIG_BAYCOM_EPP=m
+CONFIG_YAM=m
 
 #
 # IrDA (infrared) support
@@ -1426,6 +1472,8 @@
 CONFIG_BT_HCIBCM203X=m
 CONFIG_BT_HCIBFUSB=m
 CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBTSDIO=m
+CONFIG_BT_HCIUART_LL=y
 
 #
 # ISDN subsystem
@@ -1551,7 +1599,6 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
 CONFIG_INPUT_EVDEV=y
 # CONFIG_INPUT_EVBUG is not set
 
@@ -1655,7 +1702,6 @@
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-CONFIG_VT_UNICODE=y
 CONFIG_HW_CONSOLE=y
 CONFIG_VT_HW_CONSOLE_BINDING=y
 CONFIG_SERIAL_NONSTANDARD=y
@@ -1673,7 +1719,7 @@
 CONFIG_TCG_NSC=m
 CONFIG_TCG_ATMEL=m
 # CONFIG_TCG_INFINEON is not set
-# CONFIG_TELCLOCK is not set
+CONFIG_TELCLOCK=m
 
 #
 # Serial drivers
@@ -1715,7 +1761,6 @@
 CONFIG_PRINTER=m
 CONFIG_LP_CONSOLE=y
 CONFIG_PPDEV=m
-CONFIG_TIPAR=m
 
 #
 # I2C support
@@ -1780,7 +1825,9 @@
 CONFIG_SENSORS_ADM1029=m
 CONFIG_SENSORS_ADM1031=m
 CONFIG_SENSORS_ADM9240=m
+CONFIG_SENSORS_ADS7828=m
 CONFIG_SENSORS_ADT7470=m
+CONFIG_SENSORS_ADT7473=m
 CONFIG_SENSORS_APPLESMC=m
 CONFIG_SENSORS_ASB100=m
 CONFIG_SENSORS_ATXP1=m
@@ -1800,6 +1847,7 @@
 CONFIG_SENSORS_GL518SM=m
 CONFIG_SENSORS_GL520SM=m
 CONFIG_SENSORS_HDAPS=m
+# CONFIG_SENSORS_I5K_AMB is not set
 CONFIG_SENSORS_IBMPEX=m
 CONFIG_SENSORS_IT87=m
 CONFIG_SENSORS_K8TEMP=m
@@ -1834,6 +1882,7 @@
 CONFIG_SENSORS_W83627HF=m
 CONFIG_SENSORS_W83781D=m
 CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83L786NG=m
 CONFIG_SENSORS_W83627EHF=m
 CONFIG_SENSORS_W83791D=m
 CONFIG_SENSORS_W83792D=m
@@ -1895,7 +1944,9 @@
 # CONFIG_WAFER_WDT is not set
 # CONFIG_CPU5_WDT is not set
 CONFIG_I6300ESB_WDT=m
+CONFIG_IT8712F_WDT=m
 # CONFIG_SBC8360_WDT is not set
+# CONFIG_SBC7240_WDT is not set
 CONFIG_W83977F_WDT=m
 CONFIG_PCIPCWATCHDOG=m
 CONFIG_USBPCWATCHDOG=m
@@ -1903,21 +1954,21 @@
 
 CONFIG_HW_RANDOM=y
 # CONFIG_NVRAM is not set
-CONFIG_RTC=y
+# CONFIG_RTC is not set
 # CONFIG_RTC_DEBUG is not set
 # CONFIG_GEN_RTC is not set
-# CONFIG_RTC_CLASS is not set
+CONFIG_RTC_CLASS=y
 # CONFIG_RTC_HCTOSYS is not set
-CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
 CONFIG_RTC_INTF_SYSFS=y
 CONFIG_RTC_INTF_PROC=y
 CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-CONFIG_RTC_DRV_CMOS=m
+CONFIG_RTC_DRV_CMOS=y
 CONFIG_RTC_DRV_DS1307=m
 CONFIG_RTC_DRV_DS1553=m
 CONFIG_RTC_DRV_DS1672=m
 CONFIG_RTC_DRV_DS1742=m
+CONFIG_RTC_DRV_DS1374=m
 # CONFIG_RTC_DRV_EP93XX is not set
 CONFIG_RTC_DRV_ISL1208=m
 CONFIG_RTC_DRV_M41T80=m
@@ -1933,6 +1984,7 @@
 CONFIG_RTC_DRV_X1205=m
 CONFIG_RTC_DRV_V3020=m
 CONFIG_RTC_DRV_STK17TA8=m
+# CONFIG_RTC_DRV_S35390A is not set
 
 CONFIG_DTLK=m
 CONFIG_R3964=m
@@ -2013,6 +2065,7 @@
 CONFIG_VIDEO_CPIA_USB=m
 CONFIG_VIDEO_CPIA2=m
 CONFIG_VIDEO_CQCAM=m
+CONFIG_VIDEO_CS5345=m
 CONFIG_VIDEO_CS53L32A=m
 CONFIG_VIDEO_CX25840=m
 CONFIG_VIDEO_CX2341X=m
@@ -2024,6 +2077,7 @@
 CONFIG_VIDEO_CX88_VP3054=m
 CONFIG_VIDEO_DPC=m
 CONFIG_VIDEO_EM28XX=m
+CONFIG_VIDEO_EM28XX_ALSA=m
 CONFIG_VIDEO_HEXIUM_ORION=m
 CONFIG_VIDEO_HEXIUM_GEMINI=m
 CONFIG_VIDEO_IVTV=m
@@ -2033,6 +2087,8 @@
 CONFIG_VIDEO_MXB=m
 CONFIG_VIDEO_OVCAMCHIP=m
 CONFIG_VIDEO_OV7670=m
+CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR=y
+CONFIG_VIDEO_PVRUSB2_ONAIR_USB2=y
 CONFIG_VIDEO_SAA5246A=m
 CONFIG_VIDEO_SAA5249=m
 CONFIG_VIDEO_SAA6588=m
@@ -2071,6 +2127,8 @@
 CONFIG_VIDEO_ZORAN_LML33=m
 CONFIG_VIDEO_ZORAN_LML33R10=m
 CONFIG_VIDEO_FB_IVTV=m
+CONFIG_VIDEO_M52790=m
+CONFIG_VIDEO_VP27SMPX=m
 CONFIG_TUNER_3036=m
 # CONFIG_TUNER_TEA5761 is not set
 
@@ -2098,6 +2156,7 @@
 CONFIG_DVB_STV0299=m
 # CONFIG_DVB_SP887X is not set
 CONFIG_DVB_BT8XX=m
+CONFIG_DVB_BUDGET_CORE=m
 CONFIG_DVB_CX24110=m
 CONFIG_DVB_L64781=m
 CONFIG_DVB_LGDT330X=m
@@ -2108,7 +2167,9 @@
 CONFIG_DVB_S5H1420=m
 CONFIG_DVB_SP8870=m
 CONFIG_DVB_TDA10021=m
+CONFIG_DVB_TDA10023=m
 CONFIG_DVB_TDA1004X=m
+CONFIG_DVB_TUA6100=m
 CONFIG_DVB_TTUSB_DEC=m
 CONFIG_DVB_VES1820=m
 CONFIG_DVB_VES1X93=m
@@ -2178,7 +2239,6 @@
 CONFIG_VIDEO_SAA7146_VV=m
 CONFIG_VIDEO_TUNER=m
 # CONFIG_VIDEO_TUNER_CUSTOMIZE is not set
-CONFIG_VIDEO_BUF=m
 CONFIG_VIDEO_BTCX=m
 CONFIG_VIDEO_PVRUSB2=m
 CONFIG_VIDEO_PVRUSB2_24XXX=y
@@ -2259,7 +2319,7 @@
 # CONFIG_FB_VIRTUAL is not set
 CONFIG_FB_VOODOO1=m
 # CONFIG_FB_VT8623 is not set
-
+CONFIG_FB_EFI=y
 
 # CONFIG_FIRMWARE_EDID is not set
 
@@ -2304,8 +2364,6 @@
 CONFIG_SND_PCM_OSS=m
 CONFIG_SND_PCM_OSS_PLUGINS=y
 CONFIG_SND_RTCTIMER=m
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
 CONFIG_SND_DYNAMIC_MINORS=y
 # CONFIG_SND_SUPPORT_OLD_API is not set
 
@@ -2372,6 +2430,7 @@
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=5
 CONFIG_SND_HDSPM=m
+CONFIG_SND_HIFIER=m
 CONFIG_SND_ICE1712=m
 CONFIG_SND_ICE1724=m
 CONFIG_SND_INTEL8X0=m
@@ -2383,17 +2442,20 @@
 CONFIG_SND_MIRO=m
 CONFIG_SND_MIXART=m
 CONFIG_SND_NM256=m
+CONFIG_SND_OXYGEN=m
 CONFIG_SND_RME32=m
 CONFIG_SND_PCXHR=m
 CONFIG_SND_RIPTIDE=m
 CONFIG_SND_RME96=m
 CONFIG_SND_RME9652=m
 CONFIG_SND_SC6000=m
+CONFIG_SND_SIS7019=m
 CONFIG_SND_SONICVIBES=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_TRIDENT=m
 CONFIG_SND_VIA82XX=m
 CONFIG_SND_VIA82XX_MODEM=m
+CONFIG_SND_VIRTUOSO=m
 CONFIG_SND_VX222=m
 CONFIG_SND_YMFPCI=m
 CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL=y
@@ -2415,7 +2477,6 @@
 # Open Sound System
 #
 # CONFIG_SOUND_PRIME is not set
-# CONFIG_SOUND_BT878 is not set
 
 #
 # USB support
@@ -2423,6 +2484,8 @@
 CONFIG_USB=y
 CONFIG_USB_SUPPORT=y
 # CONFIG_USB_DEBUG is not set
+
+# DEPRECATED: See bug 362221. Fix udev.
 # CONFIG_USB_DEVICE_CLASS is not set
 
 # CONFIG_USB_PERSIST is not set
@@ -2582,6 +2645,7 @@
 CONFIG_USB_SERIAL_IPAQ=m
 CONFIG_USB_SERIAL_IPW=m
 CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_IUU=m
 CONFIG_USB_SERIAL_KEYSPAN_PDA=m
 CONFIG_USB_SERIAL_KEYSPAN=m
 CONFIG_USB_SERIAL_KEYSPAN_MPR=y
@@ -2625,50 +2689,55 @@
 #
 # USB Miscellaneous drivers
 #
-CONFIG_USB_EMI26=m
+
 CONFIG_USB_ADUTUX=m
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_APPLEDISPLAY=m
+CONFIG_USB_ATM=m
 CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LCD=m
 CONFIG_USB_BERRY_CHARGE=m
-# CONFIG_USB_IOWARRIOR is not set
-# CONFIG_USB_TEST is not set
+CONFIG_USB_CXACRU=m
+# CONFIG_USB_CYTHERM is not set
+CONFIG_USB_EMI26=m
+CONFIG_USB_ETH=m
+CONFIG_USB_FTDI_ELAN=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
 # CONFIG_USB_GADGET is not set
 # CONFIG_USB_GADGET_PXA2XX is not set
 # CONFIG_USB_GADGET_GOKU is not set
-CONFIG_USB_ZERO=m
-CONFIG_USB_ETH=m
 # CONFIG_USB_GADGETFS is not set
-CONFIG_USB_W9968CF=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+CONFIG_USB_ISP116X_HCD=m
+CONFIG_USB_IOWARRIOR=m
+CONFIG_USB_LCD=m
+CONFIG_USB_LD=m
 CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_FILE_STORAGE=m
-# CONFIG_USB_FILE_STORAGE_TEST is not set
-CONFIG_USB_ALI_M5632=y
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_FTDI_ELAN=m
-CONFIG_USB_APPLEDISPLAY=m
+CONFIG_USB_MON=y
 CONFIG_USB_PHIDGET=m
 CONFIG_USB_PHIDGETSERVO=m
 CONFIG_USB_PHIDGETKIT=m
 CONFIG_USB_PHIDGETMOTORCONTROL=m
-CONFIG_USB_U132_HCD=m
+CONFIG_USB_PWC=m
+# CONFIG_USB_PWC_DEBUG is not set
+CONFIG_USB_RIO500=m
+CONFIG_USB_QUICKCAM_MESSENGER=m
 CONFIG_USB_SL811_HCD=m
-CONFIG_USB_MON=y
 CONFIG_USB_SISUSBVGA=m
 CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_ATM=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_XUSBATM=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_LD=m
+CONFIG_USB_SI470X=m
+CONFIG_USB_STKWEBCAM=m
+# CONFIG_USB_TEST is not set
 CONFIG_USB_TRANCEVIBRATOR=m
+CONFIG_USB_U132_HCD=m
+CONFIG_USB_UEAGLEATM=m
+CONFIG_USB_UVCVIDEO=m
+CONFIG_USB_W9968CF=m
+CONFIG_USB_XUSBATM=m
+CONFIG_USB_ZC0301=m
+CONFIG_USB_ZERO=m
 
-CONFIG_USB_QUICKCAM_MESSENGER=m
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
 
 #
 # Sonics Silicon Backplane
@@ -2758,7 +2827,6 @@
 CONFIG_TMPFS_POSIX_ACL=y
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
 CONFIG_DEBUG_FS=y
 
 #
@@ -2823,11 +2891,14 @@
 # CONFIG_SMB_NLS_DEFAULT is not set
 CONFIG_CIFS=m
 # CONFIG_CIFS_STATS is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
+CONFIG_CIFS_EXPERIMENTAL=y
+CONFIG_CIFS_UPCALL=y
 CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
 CONFIG_CIFS_WEAK_PW_HASH=y
 # CONFIG_CIFS_DEBUG2 is not set
+CONFIG_CIFS_UPCALL=y
+CONFIG_CIFS_DFS_UPCALL=y
 CONFIG_NCP_FS=m
 CONFIG_NCPFS_PACKET_SIGNING=y
 CONFIG_NCPFS_IOCTL_LOCKING=y
@@ -2843,6 +2914,7 @@
 # CONFIG_AF_RXRPC is not set
 
 CONFIG_OCFS2_FS=m
+# CONFIG_OCFS2_DEBUG_FS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 CONFIG_CONFIGFS_FS=m
 
@@ -2936,6 +3008,7 @@
 # CONFIG_DEBUG_DRIVER is not set
 CONFIG_HEADERS_CHECK=y
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_TRACE is not set
 # CONFIG_LKDTM is not set
 
 # CONFIG_RT_MUTEX_TESTER is not set
@@ -2952,6 +3025,11 @@
 CONFIG_DEBUG_LIST=y
 CONFIG_DEBUG_SHIRQ=y
 CONFIG_DEBUG_DEVRES=y
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
+
+# CONFIG_DEBUG_RODATA_TEST is not set
+# CONFIG_DEBUG_NX_TEST is not set
+# CONFIG_DEBUG_BOOT_PARAMS is not set
 
 #
 # Security options
@@ -2966,11 +3044,12 @@
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_DISABLE=y
 CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
 CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
 CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-CONFIG_UTS_NS=y
+CONFIG_SECURITY_SELINUX_AVC_STATS=y
+CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536
+# CONFIG_SECURITY_SMACK is not set
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 
@@ -2990,27 +3069,32 @@
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
 CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_CCM=m
 CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CTR=m
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_DES=m
 CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_GCM=m
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_KHAZAD=m
 CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_LZO=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=m
 CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_MPILIB=y
 CONFIG_CRYPTO_NULL=m
 CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SALSA20_586=m
 CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SEQIV=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_SIGNATURE_DSA=y
 CONFIG_CRYPTO_TEA=m
 CONFIG_CRYPTO_TGR192=m
 CONFIG_CRYPTO_TWOFISH=m
@@ -3019,7 +3103,8 @@
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_TEST=m
 CONFIG_LIBCRC32C=m
-
+CONFIG_CRYPTO_DEV_HIFN_795X=m
+CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
 
 #
 # Library routines
@@ -3064,7 +3149,9 @@
 CONFIG_CGROUP_CPUACCT=y
 CONFIG_PROC_PID_CPUSET=y
 
-CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+
 CONFIG_RELAY=y
 # CONFIG_PRINTK_TIME is not set
 CONFIG_ENABLE_MUST_CHECK=y
@@ -3084,10 +3171,8 @@
 CONFIG_IBMASR=m
 
 CONFIG_PM_LEGACY=y
-# CONFIG_PM_SYSFS_DEPRECATED is not set
 CONFIG_PM_DEBUG=y
 CONFIG_PM_TRACE=y
-# CONFIG_DISABLE_CONSOLE_SUSPEND is not set
 # CONFIG_PM_VERBOSE is not set
 
 CONFIG_CRASH=m
@@ -3106,7 +3191,6 @@
 CONFIG_SCSI_ARCMSR=m
 CONFIG_SCSI_ARCMSR_AER=y
 # CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_ESP_CORE is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
 # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_NCR53C406A is not set
@@ -3117,7 +3201,7 @@
 # CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
 # CONFIG_SCSI_ULTRASTOR is not set
-# CONFIG_CD_NO_IDESCSI is not set
+CONFIG_SCSI_MVSAS=m
 
 # CONFIG_EL1 is not set
 # CONFIG_EL2 is not set
@@ -3291,13 +3375,8 @@
 CONFIG_CFAG12864B_RATE=20
 
 # CONFIG_PHANTOM is not set
-# CONFIG_BLINK is not set
 CONFIG_EEPROM_93CX6=m
 
-CONFIG_CPU_IDLE=y
-# CONFIG_CPU_IDLE_GOV_LADDER is not set
-CONFIG_CPU_IDLE_GOV_MENU=y
-
 CONFIG_POWER_SUPPLY=m
 # CONFIG_POWER_SUPPLY_DEBUG is not set
 CONFIG_APM_POWER=m
@@ -3337,3 +3416,53 @@
 
 # CONFIG_SAMPLES is not set
 
+# CONFIG_DEVKMEM is not set
+
+CONFIG_PM_TRACE_RTC=y
+CONFIG_R6040=m
+CONFIG_IGB=m
+CONFIG_BNX2X=m
+CONFIG_NOZOMI=m
+CONFIG_PCF8575=m
+# CONFIG_TPS65010 is not set
+# CONFIG_DEBUG_SECTION_MISMATCH is not set
+# CONFIG_KPROBES_SANITY_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+CONFIG_LATENCYTOP=y
+CONFIG_RESOURCE_COUNTERS=y
+# CONFIG_COMPAT_BRK is not set
+
+# FIXME: Move to arch
+CONFIG_ACPI_WMI=m
+CONFIG_ACPI_CUSTOM_DSDT_INITRD=y
+
+#FIXME: x86 generic?
+CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
+CONFIG_LEDS_CLEVO_MAIL=m
+CONFIG_I8K=m
+CONFIG_ACER_WMI=m
+CONFIG_EDAC_I3000=m
+CONFIG_INPUT_APANEL=m
+
+# CONFIG_INTEL_MENLOW is not set
+CONFIG_ENCLOSURE_SERVICES=m
+CONFIG_IPWIRELESS=m
+CONFIG_RTC_DRV_DS1511=m
+CONFIG_CGROUP_MEM_CONT=y
+CONFIG_TC1100_WMI=m
+
+# CONFIG_BLK_DEV_XIP is not set
+CONFIG_MEMSTICK=m
+CONFIG_MEMSTICK_DEBUG=y
+
+# CONFIG_MEMSTICK_UNSAFE_RESUME is not set
+CONFIG_MSPRO_BLOCK=m
+CONFIG_MEMSTICK_TIFM_MS=m
+
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_CGROUP_SCHED=y
+# CONFIG_CGROUP_MEM_RES_CTLR is not set
+
+# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set


Index: config-i586
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-i586,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-i586	29 Oct 2007 17:29:06 -0000	1.2
+++ config-i586	6 Mar 2008 13:59:25 -0000	1.3
@@ -5,3 +5,5 @@
 # CONFIG_HIGHMEM64G is not set
 
 CONFIG_X86_POWERNOW_K6=m
+
+# CONFIG_KVM is not set


Index: config-ia64-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-ia64-generic,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-ia64-generic	29 Oct 2007 17:29:06 -0000	1.2
+++ config-ia64-generic	6 Mar 2008 13:59:25 -0000	1.3
@@ -13,7 +13,6 @@
 # CONFIG_XEN_VT is not set
 CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_TIME_INTERPOLATION=y
 CONFIG_EFI=y
 # CONFIG_ITANIUM is not set
 CONFIG_MCKINLEY=y
@@ -63,6 +62,7 @@
 #
 # Character devices
 #
+CONFIG_TCG_INFINEON=m
 
 #
 # Watchdog Cards
@@ -114,8 +114,10 @@
 CONFIG_ACPI=y
 CONFIG_ACPI_AC=m
 # CONFIG_ACPI_ASUS is not set
-CONFIG_ACPI_BAY=m
-CONFIG_ACPI_BATTERY=m
+CONFIG_ACPI_PROCFS_POWER=y
+CONFIG_ACPI_SYSFS_POWER=y
+# CONFIG_ACPI_BAY is not set
+# CONFIG_ACPI_BATTERY is not set
 CONFIG_ACPI_BLACKLIST_YEAR=0
 CONFIG_ACPI_BUTTON=m
 # CONFIG_ACPI_DOCK is not set
@@ -187,3 +189,7 @@
 # CONFIG_IA64_MC_ERR_INJECT is not set
 
 CONFIG_DMIID=y
+
+CONFIG_SENSORS_I5K_AMB=m
+
+CONFIG_SPARSEMEM_VMEMMAP=y


Index: config-nodebug
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-nodebug,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-nodebug	29 Oct 2007 17:29:06 -0000	1.2
+++ config-nodebug	6 Mar 2008 13:59:25 -0000	1.3
@@ -25,3 +25,7 @@
 CONFIG_DEBUG_STACK_USAGE=y
 
 # CONFIG_ACPI_DEBUG is not set
+
+CONFIG_DEBUG_SG=y
+
+CONFIG_DEBUG_PAGEALLOC=y


Index: config-powerpc-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-powerpc-generic,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-powerpc-generic	29 Oct 2007 17:29:06 -0000	1.2
+++ config-powerpc-generic	6 Mar 2008 13:59:25 -0000	1.3
@@ -33,8 +33,9 @@
 CONFIG_SUSPEND=y
 CONFIG_HIBERNATION=y
 # CONFIG_RTC is not set
-CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC is not set
 # CONFIG_GEN_RTC_X is not set
+CONFIG_RTC_DRV_PPC=y
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
 CONFIG_BLK_DEV_IDE_PMAC=y
@@ -49,6 +50,7 @@
 CONFIG_I2C_POWERMAC=y
 CONFIG_APPLE_AIRPORT=m
 CONFIG_SERIAL_PMACZILOG=m
+# CONFIG_SERIAL_PMACZILOG_TTYS is not set
 CONFIG_AGP_UNINORTH=y
 CONFIG_FB_OF=y
 # CONFIG_FB_CONTROL is not set
@@ -119,9 +121,6 @@
 # CONFIG_PPC_LITE5200 is not set
 CONFIG_PPC_BESTCOMM=y
 CONFIG_PMAC_RACKMETER=m
-CONFIG_SERIAL_MPC52xx=y
-CONFIG_SERIAL_MPC52xx_CONSOLE=y
-CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
 CONFIG_USB_OHCI_HCD_PPC_SOC=y
 CONFIG_USB_OHCI_HCD_PCI=y
 CONFIG_USB_OHCI_HCD_PPC_OF=y
@@ -157,8 +156,6 @@
 # CONFIG_BLK_DEV_IDEPNP is not set
 # CONFIG_BLK_DEV_IDEPCI is not set
 CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_ONLYDISK is not set
 # CONFIG_BLK_DEV_AEC62XX is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
 # CONFIG_BLK_DEV_AMD74XX is not set
@@ -186,9 +183,7 @@
 CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
 CONFIG_BLK_DEV_IDEDMA_PMAC=y
 # CONFIG_IDE_ARM is not set
-# CONFIG_IDE_CHIPSETS is not set
 CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
 # CONFIG_BLK_DEV_HD is not set
 # CONFIG_USB_STORAGE_ISD200 is not set
 CONFIG_MTD_PHYSMAP_OF=m
@@ -210,4 +205,19 @@
 CONFIG_AXON_RAM=m
 CONFIG_OPROFILE_CELL=y
 
-# CONFIG_MPC5200_WDT is not set
+# CONFIG_PPC_MPC52xx is not set
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_IDEPCI_PCIBUS_ORDER is not set
+CONFIG_PATA_PLATFORM=m
+CONFIG_PATA_OF_PLATFORM=m
+CONFIG_USB_EHCI_HCD_PPC_OF=y
+
+# CONFIG_MPC5121_ADS is not set
+CONFIG_MTD_OF_PARTS=m
+# CONFIG_MTD_NAND_FSL_ELBC is not set
+CONFIG_THERMAL=y
+
+# CONFIG_MEMORY_HOTREMOVE is not set
+
+CONFIG_DMADEVICES=y
+# CONFIG_FSL_DMA is not set


Index: config-powerpc32-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-powerpc32-generic,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-powerpc32-generic	29 Oct 2007 17:29:06 -0000	1.2
+++ config-powerpc32-generic	6 Mar 2008 13:59:25 -0000	1.3
@@ -47,7 +47,6 @@
 CONFIG_FB_PLATINUM=y
 CONFIG_FB_VALKYRIE=y
 CONFIG_FB_CT65550=y
-CONFIG_DMASOUND_PMAC=m
 # CONFIG_BDI_SWITCH is not set
 CONFIG_MAC_FLOPPY=m
 # CONFIG_BLK_DEV_FD is not set
@@ -67,7 +66,16 @@
 
 CONFIG_PATA_MPC52xx=m
 
+CONFIG_SERIAL_MPC52xx=y
+CONFIG_SERIAL_MPC52xx_CONSOLE=y
+CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
+# CONFIG_MPC5200_WDT is not set
+
 CONFIG_PPC_MPC5200_BUGFIX=y
+CONFIG_FEC_MPC52xx=m
+#CHECK: This may later become a tristate.
+CONFIG_FEC_MPC52xx_MDIO=y
+
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_DEBUG_STACKOVERFLOW=y
 
@@ -82,9 +90,9 @@
 # CONFIG_BLK_DEV_HT6560B is not set
 # CONFIG_BLK_DEV_QD65XX is not set
 # CONFIG_BLK_DEV_UMC8672 is not set
-CONFIG_SERIAL_PMACZILOG_TTYS=y
 # CONFIG_VIRQ_DEBUG is not set
 
 CONFIG_PPC_BESTCOMM_ATA=m
 CONFIG_PPC_BESTCOMM_FEC=m
 CONFIG_PPC_BESTCOMM_GEN_BD=m
+


Index: config-powerpc64
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-powerpc64,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-powerpc64	29 Oct 2007 17:29:06 -0000	1.2
+++ config-powerpc64	6 Mar 2008 13:59:25 -0000	1.3
@@ -16,7 +16,7 @@
 CONFIG_PPC_CELLEB=y
 CONFIG_PS3_HTAB_SIZE=20
 # CONFIG_PS3_DYNAMIC_DMA is not set
-CONFIG_PS3_USE_LPAR_ADDR=y
+# CONFIG_PS3_USE_LPAR_ADDR is not set
 CONFIG_PS3_ADVANCED=y
 CONFIG_PS3_HTAB_SIZE=20
 # CONFIG_PS3_DYNAMIC_DMA is not set
@@ -29,6 +29,7 @@
 CONFIG_PS3_DISK=m
 CONFIG_PS3_ROM=m
 CONFIG_PS3_FLASH=m
+CONFIG_PS3_LPM=y
 CONFIG_SND_PS3=m
 CONFIG_SND_PS3_DEFAULT_START_DELAY=1000
 CONFIG_GELIC_NET=m
@@ -77,8 +78,7 @@
 CONFIG_VIOCD=m
 CONFIG_VIOTAPE=m
 
-# virq_to_hw() requires irq_map[] to be exported. Ick.
-# CONFIG_PASEMI_MAC is not set 
+CONFIG_PASEMI_MAC=m
 CONFIG_SERIAL_OF_PLATFORM=m
 
 CONFIG_PPC_PASEMI_IOMMU=y
@@ -110,7 +110,6 @@
 # CONFIG_FB_ATY is not set
 
 # CONFIG_POWER4_ONLY is not set
-# CONFIG_PPC_PASEMI is not set
 
 CONFIG_RTAS_PROC=y
 CONFIG_IOMMU_VMERGE=y
@@ -126,7 +125,6 @@
 
 CONFIG_EHEA=m
 CONFIG_INFINIBAND_EHCA=m
-CONFIG_INFINIBAND_EHCA_SCALING=y
 
 CONFIG_HCALL_STATS=y
 
@@ -148,7 +146,11 @@
 CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
 # CONFIG_IBM_NEW_EMAC_DEBUG is not set
 
-CONFIG_SERIAL_PMACZILOG_TTYS=y
 # CONFIG_VIRQ_DEBUG is not set
 CONFIG_ELECTRA_CF=m
 
+CONFIG_SPARSEMEM_VMEMMAP=y
+
+CONFIG_SPU_TRACE=m
+CONFIG_MTD_NAND_PASEMI=m
+CONFIG_EDAC_CELL=m


Index: config-s390x
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-s390x,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-s390x	29 Oct 2007 17:29:06 -0000	1.2
+++ config-s390x	6 Mar 2008 13:59:25 -0000	1.3
@@ -63,7 +63,6 @@
 CONFIG_TN3215=y
 CONFIG_TN3215_CONSOLE=y
 CONFIG_CCW_CONSOLE=y
-CONFIG_SCLP=y
 CONFIG_SCLP_TTY=y
 CONFIG_SCLP_CONSOLE=y
 CONFIG_SCLP_VT220_TTY=y
@@ -197,3 +196,5 @@
 
 CONFIG_S390_VMUR=m
 
+# CONFIG_THERMAL is not set
+# CONFIG_DEBUG_PAGEALLOC is not set


Index: config-sparc-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-sparc-generic,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-sparc-generic	29 Oct 2007 17:29:06 -0000	1.2
+++ config-sparc-generic	6 Mar 2008 13:59:25 -0000	1.3
@@ -39,7 +39,6 @@
 CONFIG_FB_CG14=y
 CONFIG_FB_P9100=y
 CONFIG_FB_LEO=y
-# CONFIG_FB_PCI is not set
 # CONFIG_FB_IGA is not set
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_PROM_CONSOLE=y
@@ -81,7 +80,6 @@
 CONFIG_SUN_MOSTEK_RTC=y
 # CONFIG_SUN_BPP is not set
 # CONFIG_SUN_VIDEOPIX is not set
-# CONFIG_SUN_AURORA is not set
 CONFIG_TADPOLE_TS102_UCTRL=m
 CONFIG_SUN_JSFLASH=m
 CONFIG_APM_RTC_IS_GMT=y
@@ -97,7 +95,6 @@
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
@@ -115,9 +112,6 @@
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_NSP32 is not set
 CONFIG_SCSI_SUNESP=m
-CONFIG_FC4=m
-CONFIG_FC4_SOC=m
-CONFIG_FC4_SOCAL=m
 CONFIG_SCSI_PLUTO=m
 CONFIG_SCSI_FCAL=m
 CONFIG_SUNLANCE=m


Index: config-sparc64-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-sparc64-generic,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-sparc64-generic	29 Oct 2007 17:29:06 -0000	1.2
+++ config-sparc64-generic	6 Mar 2008 13:59:25 -0000	1.3
@@ -28,7 +28,7 @@
 CONFIG_HUGETLB_PAGE_SIZE_4MB=y
 # CONFIG_HUGETLB_PAGE_SIZE_512K is not set
 # CONFIG_HUGETLB_PAGE_SIZE_64K is not set
-CONFIG_NR_CPUS=32
+CONFIG_NR_CPUS=64
 CONFIG_US3_FREQ=m
 CONFIG_US2E_FREQ=m
 CONFIG_SUN_OPENPROMFS=m
@@ -63,9 +63,9 @@
 CONFIG_FB_PM2=y
 CONFIG_FB_P9100=y
 # CONFIG_FB_LEO is not set
-CONFIG_FB_PCI=y
 CONFIG_FB_XVR500=y
 CONFIG_FB_XVR2500=y
+# CONFIG_DRM_NOUVEAU is not set
 # CONFIG_MDA_CONSOLE is not set
 # CONFIG_PROM_CONSOLE is not set
 CONFIG_FONTS=y
@@ -90,7 +90,6 @@
 CONFIG_SUN_MOSTEK_RTC=y
 CONFIG_OBP_FLASH=m
 # CONFIG_SUN_VIDEOPIX is not set
-# CONFIG_SUN_AURORA is not set
 # CONFIG_SERIO_SERPORT is not set
 CONFIG_BLK_DEV_FD=y
 CONFIG_SUNVDC=m
@@ -109,15 +108,9 @@
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 CONFIG_SCSI_QLOGICPTI=m
 CONFIG_SCSI_SUNESP=m
-CONFIG_FC4=m
-CONFIG_FC4_SOC=m
-CONFIG_FC4_SOCAL=m
-CONFIG_SCSI_PLUTO=m
-CONFIG_SCSI_FCAL=m
 CONFIG_SUNLANCE=m
 CONFIG_SUNBMAC=m
 CONFIG_SUNQE=m
@@ -130,7 +123,6 @@
 CONFIG_ATM_FORE200E_USE_TASKLET=y
 CONFIG_ATM_FORE200E_DEBUG=0
 CONFIG_ATM_FORE200E_TX_RETRY=16
-CONFIG_DRM_FFB=m
 # CONFIG_DRM_TDFX is not set
 # CONFIG_DRM_R128 is not set
 # CONFIG_KEYBOARD_ATKBD is not set
@@ -138,7 +130,6 @@
 # CONFIG_INPUT_PCSPKR is not set
 CONFIG_INPUT_SPARCSPKR=m
 # CONFIG_SOUND_PRIME is not set
-CONFIG_SND_BIT32_EMUL=m
 CONFIG_SND_SUN_AMD7930=m
 CONFIG_SND_SUN_CS4231=m
 CONFIG_SND_SUN_DBRI=m
@@ -159,3 +150,6 @@
 # CONFIG_DEBUG_PAGEALLOC is not set
 # CONFIG_STACK_DEBUG is not set
 
+CONFIG_SPARSEMEM_VMEMMAP=y
+
+# CONFIG_THERMAL is not set


Index: config-x86-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-x86-generic,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-x86-generic	29 Oct 2007 17:29:06 -0000	1.2
+++ config-x86-generic	6 Mar 2008 13:59:25 -0000	1.3
@@ -1,5 +1,6 @@
 CONFIG_UID16=y
-CONFIG_X86_64_XEN is not set
+# CONFIG_64BIT is not set
+
 #
 # Processor type and features
 #
@@ -50,7 +51,6 @@
 CONFIG_X86_USE_PPRO_CHECKSUM=y
 CONFIG_HPET=y
 CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
 # CONFIG_HPET_RTC_IRQ is not set
 # CONFIG_HPET_MMAP is not set
 CONFIG_X86_LOCAL_APIC=y
@@ -77,7 +77,7 @@
 CONFIG_EFI=y
 CONFIG_EFI_VARS=y
 CONFIG_EFI_PCDP=y
-CONFIG_EFI_RTC=y
+CONFIG_FB_IMAC=y
 
 # CONFIG_PCI_GOBIOS is not set
 # CONFIG_PCI_GODIRECT is not set
@@ -125,6 +125,8 @@
 CONFIG_ACPI=y
 CONFIG_ACPI_AC=m
 # CONFIG_ACPI_ASUS is not set
+CONFIG_ACPI_PROCFS_POWER=y
+CONFIG_ACPI_SYSFS_POWER=y
 CONFIG_ACPI_BATTERY=m
 CONFIG_ACPI_BAY=m
 CONFIG_ACPI_BLACKLIST_YEAR=1999
@@ -139,7 +141,6 @@
 CONFIG_ACPI_PROCFS=y
 CONFIG_ACPI_SBS=m
 CONFIG_ACPI_SLEEP=y
-# CONFIG_ACPI_PROCFS_SLEEP is not set
 CONFIG_ACPI_SYSTEM=y
 CONFIG_ACPI_THERMAL=y
 CONFIG_ACPI_TOSHIBA=m
@@ -169,7 +170,7 @@
 # CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
 # CONFIG_X86_POWERNOW_K6 is not set
 CONFIG_X86_POWERNOW_K7=y
-CONFIG_X86_POWERNOW_K8=y
+CONFIG_X86_POWERNOW_K8=m
 CONFIG_X86_POWERNOW_K8_ACPI=y
 # CONFIG_X86_GX_SUSPMOD is not set
 # CONFIG_X86_SPEEDSTEP_CENTRINO is not set
@@ -177,7 +178,7 @@
 CONFIG_X86_SPEEDSTEP_SMI=y
 CONFIG_X86_SPEEDSTEP_LIB=y
 # CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
-CONFIG_X86_P4_CLOCKMOD=m
+# CONFIG_X86_P4_CLOCKMOD is not set
 CONFIG_X86_LONGRUN=y
 # CONFIG_X86_LONGHAUL is not set
 # CONFIG_X86_CPUFREQ_NFORCE2 is not set
@@ -216,6 +217,8 @@
 CONFIG_PCI_DIRECT=y
 CONFIG_PCI_MMCONFIG=y
 CONFIG_PCI_BIOS=y
+CONFIG_DMAR=y
+CONFIG_DMAR_GFX_WA=y
 
 CONFIG_HOTPLUG_PCI=y
 CONFIG_HOTPLUG_PCI_COMPAQ=m
@@ -224,7 +227,6 @@
 
 # CONFIG_HOTPLUG_PCI_CPCI is not set
 CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
 # SHPC has half-arsed PCI probing, which makes it load on too many systems
 # CONFIG_HOTPLUG_PCI_SHPC is not set
 CONFIG_PM=y
@@ -251,7 +253,6 @@
 CONFIG_I2C_AMD8111=m
 CONFIG_I2C_I801=m
 CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
 CONFIG_I2C_NFORCE2=m
 CONFIG_I2C_PIIX4=m
 CONFIG_I2C_PROSAVAGE=m
@@ -283,7 +284,6 @@
 CONFIG_EDAC_I82975X=m
 CONFIG_EDAC_I3000=m
 CONFIG_EDAC_I5000=m
-CONFIG_EDAC_K8=m
 CONFIG_EDAC_R82600=m
 
 CONFIG_SCHED_MC=y
@@ -304,6 +304,7 @@
 # CONFIG_SGI_IOC4 is not set
 
 CONFIG_ASUS_LAPTOP=m
+CONFIG_EEEPC=m
 CONFIG_FUJITSU_LAPTOP=m
 CONFIG_MSI_LAPTOP=m
 CONFIG_SONY_LAPTOP=m
@@ -315,7 +316,7 @@
 
 CONFIG_RELOCATABLE=y
 CONFIG_PHYSICAL_ALIGN=0x400000
-CONFIG_PHYSICAL_START=0x1000000
+CONFIG_PHYSICAL_START=0x400000
 CONFIG_CRASH_DUMP=y
 CONFIG_PROC_VMCORE=y
 
@@ -333,21 +334,34 @@
 
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
+CONFIG_CPU_IDLE=y
+# CONFIG_CPU_IDLE_GOV_LADDER is not set
+CONFIG_CPU_IDLE_GOV_MENU=y
+
 
 CONFIG_THINKPAD_ACPI=m
 # CONFIG_THINKPAD_ACPI_DEBUG is not set
 CONFIG_THINKPAD_ACPI_BAY=y
+CONFIG_THINKPAD_ACPI_VIDEO=y
 
 CONFIG_MACINTOSH_DRIVERS=y
 
 CONFIG_DMIID=y
 
 CONFIG_VIRTUALIZATION=y
+CONFIG_PARAVIRT_GUEST=y
 CONFIG_VMI=y
 CONFIG_LGUEST=m
+CONFIG_LGUEST_GUEST=y
 # CONFIG_XEN is not set
 # CONFIG_HVC_XEN is not set
 
 CONFIG_DMADEVICES=y
 CONFIG_INTEL_IOATDMA=m
 
+CONFIG_SENSORS_I5K_AMB=m
+
+# CONFIG_CPA_DEBUG is not set
+# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
+
+CONFIG_HP_WATCHDOG=m


Index: config-x86_64-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-x86_64-generic,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-x86_64-generic	29 Oct 2007 17:29:06 -0000	1.2
+++ config-x86_64-generic	6 Mar 2008 13:59:25 -0000	1.3
@@ -1,3 +1,4 @@
+CONFIG_64BIT=y
 CONFIG_UID16=y
 # CONFIG_X86_64_XEN is not set
 # CONFIG_MK8 is not set
@@ -11,7 +12,9 @@
 CONFIG_X86_64_ACPI_NUMA=y
 # CONFIG_NUMA_EMU is not set
 CONFIG_NR_CPUS=64
-CONFIG_X86_POWERNOW_K8=y
+CONFIG_X86_POWERNOW_K8=m
+CONFIG_X86_POWERNOW_K8_ACPI=y
+# CONFIG_X86_P4_CLOCKMOD is not set
 CONFIG_IA32_EMULATION=y
 # CONFIG_IA32_AOUT is not set
 # CONFIG_IOMMU_DEBUG is not set
@@ -24,6 +27,12 @@
 CONFIG_EDD=m
 CONFIG_PCI_BIOS=y
 CONFIG_PCI_MMCONFIG=y
+CONFIG_DMAR=y
+CONFIG_DMAR_GFX_WA=y
+
+CONFIG_EFI=y
+CONFIG_EFI_VARS=y
+CONFIG_EFI_PCDP=y
 
 CONFIG_I2O=m
 CONFIG_I2O_BLOCK=m
@@ -62,6 +71,8 @@
 CONFIG_ACPI=y
 CONFIG_ACPI_AC=m
 # CONFIG_ACPI_ASUS is not set
+CONFIG_ACPI_PROCFS_POWER=y
+CONFIG_ACPI_SYSFS_POWER=y
 CONFIG_ACPI_BATTERY=m
 CONFIG_ACPI_BAY=m
 CONFIG_ACPI_BLACKLIST_YEAR=0
@@ -76,7 +87,6 @@
 CONFIG_ACPI_PROCFS=y
 CONFIG_ACPI_SBS=m
 CONFIG_ACPI_SLEEP=y
-# CONFIG_ACPI_PROCFS_SLEEP is not set
 CONFIG_ACPI_THERMAL=y
 CONFIG_ACPI_TOSHIBA=m
 CONFIG_ACPI_POWER=y
@@ -86,6 +96,7 @@
 CONFIG_ACPI_PROC_EVENT=y
 
 CONFIG_ASUS_LAPTOP=m
+CONFIG_EEEPC=m
 CONFIG_FUJITSU_LAPTOP=m
 CONFIG_MSI_LAPTOP=m
 CONFIG_SONY_LAPTOP=m
@@ -94,6 +105,7 @@
 CONFIG_THINKPAD_ACPI=m
 # CONFIG_THINKPAD_ACPI_DEBUG is not set
 CONFIG_THINKPAD_ACPI_BAY=y
+CONFIG_THINKPAD_ACPI_VIDEO=y
 
 CONFIG_HOTPLUG_PCI=y
 CONFIG_HOTPLUG_PCI_COMPAQ=m
@@ -101,13 +113,11 @@
 CONFIG_HOTPLUG_PCI_IBM=m
 # CONFIG_HOTPLUG_PCI_CPCI is not set
 CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
 # SHPC has half-arsed PCI probing, which makes it load on too many systems
 CONFIG_HOTPLUG_PCI_SHPC=m
 CONFIG_HPET=y
 # CONFIG_HPET_MMAP is not set
 # CONFIG_HPET_RTC_IRQ is not set
-CONFIG_HPET_EMULATE_RTC=y
 CONFIG_PM=y
 
 CONFIG_IEEE80211=m
@@ -148,7 +158,6 @@
 CONFIG_I2C_SIS96X=m
 CONFIG_I2C_VIA=m
 CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_ISA=m
 
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
@@ -165,7 +174,6 @@
 CONFIG_EDAC_I82875P=m
 CONFIG_EDAC_I82860=m
 CONFIG_EDAC_I82975X=m
-CONFIG_EDAC_K8=m
 CONFIG_EDAC_R82600=m
 
 CONFIG_SCHED_MC=y
@@ -178,6 +186,8 @@
 
 # CONFIG_HW_RANDOM_GEODE is not set
 
+CONFIG_USB_HIDINPUT_POWERBOOK=y
+
 CONFIG_DEBUG_STACKOVERFLOW=y
 CONFIG_DEBUG_NMI_TIMEOUT=5
 
@@ -225,9 +235,26 @@
 
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
+CONFIG_CPU_IDLE=y
+# CONFIG_CPU_IDLE_GOV_LADDER is not set
+CONFIG_CPU_IDLE_GOV_MENU=y
 
 CONFIG_VIRTUALIZATION=y
 
 CONFIG_DMADEVICES=y
 CONFIG_INTEL_IOATDMA=m
 
+CONFIG_SENSORS_I5K_AMB=m
+
+# CONFIG_X86_MCE is not set
+
+CONFIG_SPARSEMEM_VMEMMAP=y
+
+# CONFIG_PARAVIRT_GUEST is not set
+# CONFIG_COMPAT_VDSO is not set
+CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
+# CONFIG_DEBUG_PER_CPU_MAPS is not set
+# CONFIG_CPA_DEBUG is not set
+CONFIG_CRYPTO_SALSA20_X86_64=m
+
+CONFIG_HP_WATCHDOG=m


Index: config-xen-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-xen-generic,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-xen-generic	29 Oct 2007 17:29:06 -0000	1.2
+++ config-xen-generic	6 Mar 2008 13:59:25 -0000	1.3
@@ -1,72 +1,9 @@
-
-CONFIG_XEN_PCIDEV_FRONTEND=y
-# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
-
-
 CONFIG_XEN=y
-CONFIG_XEN_INTERFACE_VERSION=0x00030202
-
-#
-# XEN
-#
-CONFIG_XEN_PRIVILEGED_GUEST=y
-# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
-CONFIG_XEN_PRIVCMD=y
-CONFIG_XEN_XENBUS_DEV=y
-CONFIG_XEN_BACKEND=y
-CONFIG_XEN_BLKDEV_BACKEND=m
-CONFIG_XEN_BLKDEV_TAP=m
-CONFIG_XEN_NETDEV_BACKEND=m
-# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
-CONFIG_XEN_NETDEV_LOOPBACK=m
-CONFIG_XEN_PCIDEV_BACKEND=m
-CONFIG_XEN_PCIDEV_BACKEND_VPCI=y
-# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
-# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
-# CONFIG_XEN_TPMDEV_BACKEND is not set
+CONFIG_XENCTRL=y
+CONFIG_HVC_XEN=y
 CONFIG_XEN_BLKDEV_FRONTEND=m
 CONFIG_XEN_NETDEV_FRONTEND=m
-CONFIG_XEN_FRAMEBUFFER=y
-CONFIG_XEN_KEYBOARD=y
-CONFIG_XEN_SCRUB_PAGES=y
-# CONFIG_XEN_DISABLE_SERIAL is not set
-CONFIG_XEN_SYSFS=y
-CONFIG_XEN_COMPAT_030002_AND_LATER=y
-# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
-CONFIG_XEN_COMPAT_030002=y
-CONFIG_HAVE_ARCH_ALLOC_SKB=y
-CONFIG_HAVE_ARCH_DEV_ALLOC_SKB=y
-CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
-CONFIG_NO_IDLE_HZ=y
-CONFIG_XEN_UTIL=y
-CONFIG_XEN_BALLOON=y
-CONFIG_XEN_DEVMEM=y
-CONFIG_XEN_SKBUFF=y
-CONFIG_XEN_REBOOT=y
-CONFIG_XEN_SMPBOOT=y
-
-# Microcode needs sys_mlock & sys_munlock that are not exported
-# it needs to be compiled in
-# FIXME: This isn't going to work as of .19, due to firmware loader
-# not being available that early in boot. This will cause long pauses during boot.
-CONFIG_MICROCODE=y
-
-# TPM is not working, somebody have to merge the xen bits
-# CONFIG_TCG_TPM is not set
-
-# frequency scaling really needs to be done in the hypervisor instead
-# CONFIG_CPU_FREQ is not set
-
-# need to set the serial stuff up like this or serial console doesn't
-# work quite right in dom0.  ick.
-CONFIG_SERIAL_8250=m
-# CONFIG_SERIAL_8250_CONSOLE is not set
-
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ_250=y
-
-# xen and kvm conflict
-# CONFIG_KVM is not set
-# CONFIG_KVM_INTEL is not set
-# CONFIG_KVM_AMD is not set
 
+# We need this for console, so compile in
+CONFIG_XEN_FBDEV_FRONTEND=y
+CONFIG_XEN_KBDDEV_FRONTEND=y


Index: config-xen-ia64
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-xen-ia64,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-xen-ia64	29 Oct 2007 17:29:06 -0000	1.2
+++ config-xen-ia64	6 Mar 2008 13:59:25 -0000	1.3
@@ -1,25 +0,0 @@
-# CONFIG_IA64_GENERIC is not set
-CONFIG_IA64_DIG=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM_MANUAL=y
-CONFIG_FORCE_MAX_ZONEORDER=11
-
-CONFIG_XEN=y
-CONFIG_XEN_IA64_DOM0_VP=y
-CONFIG_XEN_DISABLE_SERIAL=y
-# CONFIG_XEN_PCIDEV_BACKEND is not set
-# CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
-# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
-# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
-# CONFIG_XEN_TPMDEV_BACKEND is not set
-
-# internal #defines conflict with xen-ia64
-# CONFIG_FB_NEOMAGIC is not set
-
-# don't work, missing symbols
-# CONFIG_KEXEC is not set
-# CONFIG_CRASH_DUMP is not set
-
-# Missing function not exported
-# CONFIG_XEN_BLKDEV_TAP is not set


Index: config-xen-x86
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-xen-x86,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-xen-x86	29 Oct 2007 17:29:06 -0000	1.2
+++ config-xen-x86	6 Mar 2008 13:59:25 -0000	1.3
@@ -1,4 +0,0 @@
-
-# CONFIG_X86_PC is not set
-CONFIG_X86_XEN=y
-# CONFIG_X86_GENERICARCH is not set


Index: config-xen-x86_64
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-xen-x86_64,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-xen-x86_64	29 Oct 2007 17:29:06 -0000	1.2
+++ config-xen-x86_64	6 Mar 2008 13:59:25 -0000	1.3
@@ -1,8 +1,5 @@
-# things we want different from i686 xen
-
-CONFIG_X86_64=y
-
-# CONFIG_X86_XEN is not set
-CONFIG_X86_64_XEN=y
-
-CONFIG_GENERIC_CPU=y
+CONFIG_PARAVIRT=y
+CONFIG_PARAVIRT_GUEST=y
+# CONFIG_SMP is not set
+# CONFIG_NUMA is not set
+# CONFIG_NEED_MULTIPLE_NODES is not set


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/kernel.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- kernel.spec	25 Feb 2008 00:37:30 -0000	1.13
+++ kernel.spec	6 Mar 2008 13:59:25 -0000	1.14
@@ -1,12 +1,9 @@
-# we are kernel-xen-2.6!
-%define xen_package_magic 1
-
 Summary: The Linux kernel (the core of the Linux operating system)
 
 # For a stable, released kernel, released_kernel should be 1. For rawhide
 # and/or a kernel built from an rc or git snapshot, released_kernel should
 # be 0.
-%define released_kernel 1
+%define released_kernel 0
 
 # Versions of various parts
 
@@ -19,33 +16,22 @@
 
 # fedora_build defines which build revision of this kernel version we're
 # building. Rather than incrementing forever, as with the prior versioning
-# setup, the trick below will allow us to use the automatic CVS Revision keyword
-# expansion, without breaking release number ordering.
-#
-# CVS Revision 1.42 was after RPM Release 2925.14. We do some math to
-# increase the Release number starting from 2926
+# setup, we set fedora_cvs_origin to the current cvs revision s/1.// of the
+# kernel spec when the kernel is rebased, so fedora_build automatically
+# works out to the offset from the rebase, so it doesn't get too ginormous.
 #
-%define baserevision 42
-%define baserelease 2926
-%define fedora_build %(R="$Revision$"; \
-	# be careful: '%%' becomes '%' below \
-	R="${R%% \$}"; R="${R##: 1.}"; \
-	# keep anything after the first dot, so this won't \
-	# break horribily when using branches \
-	# (e.g. 1.42.1.2.3.4 will become 1.2926.1.2.3.4) \
-	r1="${R%%%%.*}";rest="${R#$r1}"; \
-	# now, the math: \
-	echo `expr '(' $r1 - %{baserevision} ')' + %{baserelease}`$rest)
+%define fedora_cvs_origin 14
+%define fedora_build %(R="$Revision$"; R="${R%% \$}"; R="${R##: 1.}"; expr $R - %{fedora_cvs_origin})
 
 # base_sublevel is the kernel version we're starting with and patching
 # on top of -- for example, 2.6.22-rc7-git1 starts with a 2.6.21 base,
 # which yields a base_sublevel of 21.
-%define base_sublevel 21
+%define base_sublevel 24
 
 ## If this is a released kernel ##
 %if 0%{?released_kernel}
 # Do we have a 2.6.21.y update to apply?
-%define stable_update 7
+%define stable_update 0
 # Set rpm version accordingly
 %if 0%{?stable_update}
 %define stablerev .%{stable_update}
@@ -57,9 +43,9 @@
 # The next upstream release sublevel (base_sublevel+1)
 %define upstream_sublevel %(expr %{base_sublevel} + 1)
 # The rc snapshot level
-%define rcrev 0
+%define rcrev 4
 # The git snapshot level
-%define gitrev 17
+%define gitrev 0
 # Set rpm version accordingly
 %define rpmversion 2.6.%{upstream_sublevel}
 %endif
@@ -92,6 +78,8 @@
 %define with_headers   %{?_without_headers:   0} %{?!_without_headers:   1}
 # kernel-debuginfo
 %define with_debuginfo %{?_without_debuginfo: 0} %{!?_without_debuginfo: 1}
+# kernel-bootwrapper (for creating zImages from kernel + initrd)
+%define with_bootwrapper %{?_without_bootwrapper: 0} %{!?_without_bootwrapper: 1}
 
 # Additional options for user-friendly one-off kernel building:
 #
@@ -104,55 +92,15 @@
 # Only build the xen kernel (--with xenonly):
 %define with_xenonly   %{?_with_xenonly:      1} %{?!_with_xenonly:      0}
 
-# Whether or not to do C=1 builds with sparse
-%define usesparse 0
-%if "%fedora" >= "7"
-%define usesparse 1
-%endif
-
-# defaults for the non-xen package:
-
-# don't include xen patches
-%define includexen 0
-
-# don't build xen variant
-%define with_xen 0
-
-# Install vdso files
-%define do_vdso_install 1
-
+# should we do C=1 builds with sparse
+%define with_sparse	%{?_with_sparse:      1} %{?!_with_sparse:      0}
 
-# Magic that will be enabled for the kernel-xen-2.6 Fedora package:
-%if 0%{?xen_package_magic}
-
-# Include the Xen patches
+# Whether or not to apply the Xen patches -- leave this enabled
 %define includexen 1
-
-# Enable the xen variant
-%define with_xen 1
-
-# No vdso files
-%define do_vdso_install 0
-
-# Disable all other variants
+# Disable non-xen sub-packages under kernel-xen-2.6
 %define with_xenonly 1
-
-# No kernel-headers
 %define with_headers 0
 
-
-# We don't build the .config files dynamically, currently
-%define preconfigured 1
-
-# The main package is called kernel-xen-2.6
-%define variant -xen-2.6
-
-# However the -xen variant will be called kernel-xen
-%define variantbase kernel
-
-%endif   # (xen_package_magic)
-
-
 # Set debugbuildsenabled to 1 for production (build separate debug kernels)
 #  and 0 for rawhide (all kernels are debug kernels).
 # See also 'make debug' and 'make release'.
@@ -178,9 +126,9 @@
 %define pkg_release 0.%{fedora_build}%{?rctag}%{?gittag}%{?buildid}%{?dist}
 %endif
 
-%define mainpkgname kernel%{?variant}
+%define mainpkgname kernel-xen-2.6
 %if !0%{?variantbase:1}
-%define variantbase %{mainpkgname}
+%define variantbase kernel
 %endif
 
 # The kernel tarball/base version
@@ -192,7 +140,7 @@
 %define xen_hv_dirname xen-%{xen_hv_version}
 %define xen_flags verbose=y crash_debug=y
 %define xen_target vmlinuz
-%define xen_image vmlinuz
+%define xen_image arch/x86/boot/vmlinuz
 
 %define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
 %define hdrarch %_target_cpu
@@ -208,6 +156,7 @@
 %if %{nopatches}
 %define includexen 0
 %define with_xen 0
+%define with_bootwrapper 0
 %define variant -vanilla
 %else
 %define variant_fedora -fedora
@@ -215,9 +164,10 @@
 
 %define using_upstream_branch 0
 %if 0%{?upstream_branch:1}
+%define stable_update 0
 %define using_upstream_branch 1
 %define variant -%{upstream_branch}%{?variant_fedora}
-%define pkg_release %{upstream_branch_release}.%{pkg_release}
+%define pkg_release 0.%{fedora_build}%{upstream_branch_tag}%{?buildid}%{?dist}
 %endif
 
 %if !%{debugbuildsenabled}
@@ -282,8 +232,8 @@
 %define with_pae 0
 %endif
 
-# xen only builds on i686, x86_64 and ia64
-%ifnarch i686 x86_64 ia64
+# xen only builds on i686 and x86_64
+%ifnarch i686 x86_64
 %define with_xen 0
 %endif
 
@@ -304,8 +254,8 @@
 %endif
 
 # no need to build headers again for these arches,
-# they can just use i386 and ppc64 and sparc headers
-%ifarch i586 i686 ppc64iseries sparc64
+# they can just use i386 and ppc64 headers
+%ifarch i586 i686 ppc64iseries 
 %define with_headers 0
 %endif
 
@@ -316,9 +266,14 @@
 %define all_arch_configs kernel-%{version}-*.config
 %endif
 
-# sparse blows up on ppc64
+# bootwrapper is only on ppc
+%ifnarch ppc ppc64
+%define with_bootwrapper 0
+%endif
+
+# sparse blows up on ppc64 alpha and sparc64
 %ifarch ppc64 ppc alpha sparc64
-%define usesparse 0
+%define with_sparse 0
 %endif
 
 # Per-arch tweaks
@@ -356,8 +311,7 @@
 %endif
 
 %ifarch sparc
-# Yes, this is a hack. We want both sets of headers in the sparc.rpm
-%define hdrarch sparc64
+# We only build sparc headers since we dont support sparc32 hardware
 %endif
 
 %ifarch sparc64
@@ -396,7 +350,7 @@
 
 %if %{nopatches}
 # XXX temporary until last vdso patches are upstream
-%define vdso_arches %{nil}
+%define vdso_arches ppc ppc64
 %endif
 
 %if %{nopatches}%{using_upstream_branch}
@@ -468,7 +422,7 @@
 # Packages that need to be installed before the kernel is, because the %post
 # scripts use them.
 #
-%define kernel_prereq  fileutils, module-init-tools, initscripts >= 8.11.1-1, mkinitrd >= 6.0.9-7
+%define kernel_prereq  fileutils, module-init-tools, initscripts >= 8.11.1-1, mkinitrd >= 6.0.30-1
 
 #
 # This macro does requires, provides, conflicts, obsoletes for a kernel package.
@@ -500,11 +454,8 @@
 URL: http://www.kernel.org/
 Version: %{rpmversion}
 Release: %{pkg_release}
-# non-xen kernel says:
-# > DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
-# > SET %%nobuildarches (ABOVE) INSTEAD
-# However kernel-xen-2.6 can ignore this warning because it is not responsible
-# for generating the kernel-headers packages.
+# DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
+# SET %%nobuildarches (ABOVE) INSTEAD
 ExclusiveArch: noarch i686 x86_64
 ExclusiveOS: Linux
 
@@ -520,8 +471,8 @@
 BuildRequires: module-init-tools, patch >= 2.5.4, bash >= 2.03, sh-utils, tar
 BuildRequires: bzip2, findutils, gzip, m4, perl, make >= 3.78, diffutils, gawk
 BuildRequires: gcc >= 3.4.2, binutils >= 2.12, redhat-rpm-config
-%if %{usesparse}
-BuildRequires: sparse >= 0.3
+%if %{with_sparse}
+BuildRequires: sparse >= 0.4.1
 %endif
 BuildConflicts: rhbuildsys(DiskFree) < 500Mb
 
@@ -583,12 +534,6 @@
 Source91: config-sparc64
 Source92: config-sparc64-smp
 
-Source100: kernel-%{version}-i686-xen.config
-Source101: kernel-%{version}-x86_64-xen.config
-
-%if %{using_upstream_branch}
-### BRANCH PATCH ###
-%else
 # Here should be only the patches up to the upstream canonical Linus tree.
 
 # For a stable release kernel
@@ -612,341 +557,137 @@
 %endif
 %endif
 
+%if %{using_upstream_branch}
+### BRANCH PATCH ###
 %endif
 
-%if !%{nopatches}
-
-# compile fix with latest glibc
-Patch1: linux-2.6-sumversion-limits-dot-h.patch
-# gcc 4.3 mis-compile on x86_64
-Patch2: linux-2.6-remove-unnecessary-cast-in-prefetch.patch
-
-# Patches 10 through 99 are for things that are going upstream really soon.
-Patch11: nouveau-drm.patch
-
-Patch12: linux-2.6-fix-pmops-1.patch
-Patch13: linux-2.6-fix-pmops-2.patch
-Patch14: linux-2.6-fix-pmops-3.patch
-Patch15: linux-2.6-fix-pmops-4.patch
+# stable release candidate
+# Patch03: patch-2.6.24.1-rc1.bz2
 
-# DRM bits for 965
-Patch17: linux-2.6-i965gm-support.patch
+# we always need nonintconfig, even for -vanilla kernels
+Patch06: linux-2.6-build-nonintconfig.patch
 
-# enable sysrq-c on all kernels, not only kexec
-Patch20: linux-2.6-sysrq-c.patch
+%if !%{nopatches}
 
-# utrace
-Patch30: linux-2.6-utrace-sig_kernel-macros.patch
-Patch31: linux-2.6-utrace-recalc_sigpending_and_wake.patch
-Patch32: linux-2.6-utrace-tracehook.patch
-Patch33: linux-2.6-utrace-tracehook-ia64.patch
-Patch34: linux-2.6-utrace-tracehook-sparc64.patch
-Patch35: linux-2.6-utrace-tracehook-s390.patch
-Patch36: linux-2.6-utrace-tracehook-um.patch
-Patch37: linux-2.6-utrace-regset.patch
-Patch38: linux-2.6-utrace-regset-ia64.patch
-Patch39: linux-2.6-utrace-regset-sparc64.patch
-Patch40: linux-2.6-utrace-regset-s390.patch
-Patch41: linux-2.6-utrace-core.patch
-Patch42: linux-2.6-utrace-ptrace-compat.patch
-Patch43: linux-2.6-utrace-ptrace-compat-ia64.patch
-Patch44: linux-2.6-utrace-ptrace-compat-sparc64.patch
-Patch45: linux-2.6-utrace-ptrace-compat-s390.patch
-
-#xen bits of utrace patches:
-Patch52: linux-2.6-utrace-tracehook-xen.patch
-Patch62: linux-2.6-utrace-ptrace-compat-xen.patch
-
-
-# build-id stuff (http://fedoraproject.org/wiki/Releases/FeatureBuildId)
-Patch70: linux-2.6-use-build-id-ld-option.patch
-
-# Patches 100 through 500 are meant for architecture patches
-
-# 200 - 299   x86(-64)
-
-Patch200: linux-2.6-x86-tune-generic.patch
-Patch201: linux-2.6-x86-vga-vidfail.patch
-Patch202: linux-2.6-x86-64-edac-support.patch
-Patch203: linux-2.6-x86_64-silence-up-apic-errors.patch
-Patch204: linux-2.6-x86_64-silence-up-apic-errors-xen.patch
-Patch205: linux-2.6-x86-dont-delete-cpu_devs-data.patch
-Patch206: linux-2.6-x86-fsc-interrupt-controller-quirk.patch
-Patch207: linux-2.6-x86-dell-hpet.patch
-Patch209: linux-2.6-x86-64_pmtrace.patch
-
-
-# 300 - 399   ppc(64)
-Patch300: linux-2.6-g5-therm-shutdown.patch
-Patch301: linux-2.6-powerpc-slabalign.patch
-Patch302: linux-2.6-ppc-data-exception.patch
-Patch303: linux-2.6-ppc32-ucmpdi2.patch
-Patch304: linux-2.6-ibmvscsi-schizo.patch
-Patch305: linux-2.6-pmac-zilog.patch
-Patch306: linux-2.6-powerpc-reserve-initrd-1.patch
-Patch307: linux-2.6-powerpc-reserve-initrd-2.patch
-Patch308: linux-2.6-cell-spu-device-tree.patch
-Patch309: linux-2.6-cell-spufs-fixes.patch
-
-Patch310: linux-2.6-common-uevent.patch
-Patch311: linux-2.6-uevent-macio.patch
-Patch312: linux-2.6-uevent-of_platform.patch
-Patch313: linux-2.6-uevent-ebus.patch
-
-Patch330: linux-2.6-powermac-generic-suspend-1.patch
-Patch331: linux-2.6-powermac-generic-suspend-2.patch
-Patch332: linux-2.6-powermac-generic-suspend-3.patch
-Patch333: linux-2.6-powermac-generic-suspend-4.patch
-
-Patch340: linux-2.6-mpc52xx-sdma.patch
-Patch341: linux-2.6-mpc52xx-fec.patch
-
-# Patches from ps3-linux-patches.git (2007-05-04)
-Patch350: linux-2.6-ps3-stable-patches.patch
-Patch351: linux-2.6-ps3-smp-boot.patch
-Patch352: linux-2.6-ps3-system-bus-rework.patch
-Patch353: linux-2.6-ps3-kexec.patch
-Patch354: linux-2.6-ps3-gelic.patch
-Patch355: linux-2.6-ps3-gelic-wireless.patch
-Patch356: linux-2.6-ps3-ehci-iso.patch
-Patch357: linux-2.6-ps3-clear-spu-irq.patch
-Patch358: linux-2.6-ps3-wrap-spu-runctl.patch
-# Ignore the SPE logo bits. Cute, but not exactly necessary
-Patch359: linux-2.6-ps3-storage.patch
-Patch360: linux-2.6-ps3-sound.patch
-Patch361: linux-2.6-ps3-device-init.patch
-Patch362: linux-2.6-ps3-system-bus-rework-2.patch
-
-# And then some minor tweaks...
-Patch370: linux-2.6-ps3-memory-probe.patch
-Patch371: linux-2.6-ps3-legacy-ioport.patch
-Patch372: linux-2.6-ps3fb-panic.patch
-Patch373: linux-2.6-ps3-ethernet-modular.patch
-Patch374: linux-2.6-ps3-sound-autoload.patch
-Patch375: linux-2.6-ps3-ethernet-autoload.patch
-Patch376: linux-2.6-ps3av-export-header.patch
-Patch377: linux-2.6-ps3-usb-autoload.patch
-
-
-
-# 400 - 499   ia64
-
-# 500 - 599   s390(x)
-
-# 600 - 699   sparc(64)
-
-#
-# Patches 800 through 899 are reserved for bugfixes to the core system
-# and patches related to how RPMs are build
-#
-Patch800: linux-2.6-build-nonintconfig.patch
-
-# Exec-shield.
-Patch810: linux-2.6-execshield.patch
-Patch811: linux-2.6-execshield-xen.patch
-
-# Module signing infrastructure.
-Patch900: linux-2.6-modsign-mpilib.patch
-Patch901: linux-2.6-modsign-crypto.patch
-Patch902: linux-2.6-modsign-include.patch
-Patch903: linux-2.6-modsign-verify.patch
-Patch904: linux-2.6-modsign-ksign.patch
-Patch905: linux-2.6-modsign-core.patch
-Patch906: linux-2.6-modsign-script.patch
-
-# 950 - 999 Xen
-# linux-2.6.21.7-xen-3.1.0.patch patch generated by
-# 'hg diff -rd91e11100fb0 -rd610071e6045 -X .hgtags' on
-# http://hg.et.redhat.com/kernel-dev/ehabkost/linux-2.6.21.y-xen-3.1.0
-Patch950: linux-2.6.21.7-xen-3.1.0.patch.bz2
-Patch960: linux-2.6-xen-blkfront-wait-add.patch
-Patch961: linux-2.6-xen-backwards-time.patch
-Patch962: linux-2.6-xen-irq_vector-uninitialize.patch
-
-# Fix sleazy-FPU implementation
-Patch963: linux-2.6-xen-sleazy-fpu-i386.patch
-Patch964: linux-2.6-xen-sleazy-fpu-x86_64.patch
-
-# Fix VM_PFNMAP BUG_ON()
-Patch965: linux-2.6-xen-privcmd-use-nopfn.patch
-
-# Remove bogus WARN_ON() from synchronize_irq() (bug #293451)
-Patch966: linux-2.6-xen-fix-irq-warn-mismerge.patch
-
-# virt-install --nographics --paravirt fix (bug #348931)
-Patch967: linux-2.6-xen-paravirt-nographics-pvfb-fix.patch
-
-#
-# Patches 1000 to 5000 are reserved for bugfixes to drivers and filesystems
-#
-
-Patch1010: linux-2.6-debug-sizeof-structs.patch
-Patch1011: linux-2.6-debug-slab-backtrace.patch
-Patch1012: linux-2.6-debug-nmi-timeout.patch
-Patch1013: linux-2.6-debug-taint-vm.patch
-Patch1015: linux-2.6-debug-spinlock-taint.patch
-Patch1016: linux-2.6-debug-extra-warnings.patch
-Patch1019: linux-2.6-debug-must_check.patch
-Patch1020: linux-2.6-debug-no-quiet.patch
-Patch1021: linux-2.6-debug-boot-delay.patch
-Patch1022: linux-2.6-debug-sysfs-crash-debugging.patch
-Patch1023: linux-2.6-debug-sysfs-crash-debugging-xen.patch
-
-# Restrict /dev/mem usage.
-Patch1050: linux-2.6-devmem.patch
-Patch1051: linux-2.6-devmem-xen.patch
-
-# Provide read only /dev/crash driver.
-Patch1060: linux-2.6-crash-driver.patch
-Patch1061: linux-2.6-crash-driver-xen.patch
-
-# SCSI bits.
-Patch1100: linux-2.6-scsi-bounce-isa.patch
-Patch1106: linux-2.6-scsi-cpqarray-set-master.patch
-Patch1107: linux-2.6-3w-9xxx-mem_len.patch
-
-# NIC driver fixes
-Patch1300: linux-2.6-net-e1000-no-msi-warning.patch
-
-# e1000e backport
-Patch1350: linux-2.6-netdev-e1000e-01.patch
-Patch1351: linux-2.6-netdev-e1000e-02.patch
-Patch1352: linux-2.6-netdev-e1000e-03.patch
-Patch1353: linux-2.6-netdev-e1000e-04.patch
-Patch1354: linux-2.6-netdev-e1000e-05.patch
-Patch1355: linux-2.6-netdev-e1000e-06.patch
-Patch1356: linux-2.6-netdev-e1000e-07.patch
-Patch1357: linux-2.6-netdev-e1000e-08.patch
-Patch1358: linux-2.6-netdev-e1000e-09.patch
-Patch1359: linux-2.6-netdev-e1000e-10.patch
-Patch1360: linux-2.6-netdev-e1000e-backport.patch
+Patch10: linux-2.6-hotfixes.patch
 
-# Filesystem stuff.
-# Squashfs
-Patch1400: linux-2.6-squashfs.patch
-# GFS2
-Patch1410: linux-2.6-gfs2-update.patch
-
-
-# Networking core.
-Patch1500: linux-2.6-net-silence-noisy-printks.patch
-
-# Misc bits.
-Patch1600: linux-2.6-module_version.patch
-Patch1601: linux-2.6-sha_alignment.patch
-Patch1610: linux-2.6-input-kill-stupid-messages.patch
-Patch1620: linux-2.6-ondemand-timer.patch
-Patch1630: linux-2.6-kvm-19.patch
-Patch1631: linux-2.6-amd-disabled-svm-detect.patch
-Patch1632: linux-2.6-amd-disabled-svm-detect-msr-1.patch
-Patch1633: linux-2.6-kvm-reinit-real-mode-tss.patch
-Patch1650: linux-2.6-serial-460800.patch
-Patch1660: linux-2.6-mm-udf-fixes.patch
-Patch1661: linux-2.6-udf-2.6.22-rc2-1-udf_data_corruption.patch
-Patch1662: linux-2.6-udf-2.6.22-rc4-1-udf_block_leak.patch
-Patch1670: linux-2.6-sysfs-inode-allocator-oops.patch
-# checksum fixes (bug #223258)
-Patch1665: linux-2.6-disable-netback-checksum.patch
-
-Patch1690: linux-2.6-PT_LOAD-align.patch
-Patch1700: linux-2.6-dvb-spinlock.patch
-Patch1710: linux-2.6-nfs-noreaddirplus.patch
-Patch1711: linux-2.6-nfs-missing-braces.patch
-Patch1720: linux-2.6-proc-self-maps-fix.patch
-Patch1730: linux-2.6-suspend-ordering.patch
-Patch1740: linux-2.6-softlockup-disable.patch
-Patch1770: linux-2.6-optimise-spinlock-debug.patch
-Patch1771: linux-2.6-silence-noise.patch
-Patch1781: linux-2.6-softirq-printout-irq-trace-events.patch
-Patch1791: linux-2.6-libertas.diff
-Patch1792: linux-2.6-olpc-touchpad.diff
-Patch1793: linux-2.6-raid-autorun.patch
-Patch1794: linux-2.6-i82875-edac-pci-setup.patch
-Patch1795: linux-2.6-crap-sysfs-workaround.patch
-Patch1796: linux-2.6-oprofile-0.9.3.patch
-
-# SELinux/audit patches.
-Patch1801: linux-2.6-selinux-mprotect-checks.patch
-
-# no external module should use these symbols.
-Patch1910: linux-2.6-unexport-symbols.patch
-
-# VM bits.
-Patch2000: linux-2.6-vm-invalidate_mapping_pages-cond-resched.patch
-Patch2001: linux-2.6-vm-silence-atomic-alloc-failures.patch
-
-# Tweak some defaults.
-Patch2100: linux-2.6-defaults-fat-utf8.patch
-Patch2103: linux-2.6-defaults-unicode-vt.patch
-Patch2105: linux-2.6-defaults-nonmi.patch
-Patch2106: linux-2.6-defaults-pci_no_msi_mmconf.patch
-Patch2107: linux-2.6-usb-autosuspend-default-disable.patch
-
-# SATA Bits
-Patch2201: linux-2.6-libata-hpa.patch
-Patch2202: linux-2.6-libata-sata_nv-adma.patch
-Patch2203: linux-2.6-libata-ali-atapi-dma.patch
-Patch2204: linux-2.6-ata-quirk.patch
-Patch2206: linux-2.6-libata-sata_nv-wildcard-removal.patch
-Patch2207: linux-2.6-libata-pata-pcmcia-new-ident.patch
-Patch2208: linux-2.6-libata-atiixp-ids.patch
-Patch2209: linux-2.6-libata-pata-hpt3x2n-correct-revision-boundary.patch
-Patch2210: linux-2.6-libata-pata-sis-fix-timing.patch
-Patch2211: linux-2.6-libata-setxfer.patch
-Patch2212: linux-2.6-libata_ali_max_dma_speed.patch
-Patch2213: linux-2.6-ata-use-pio-for-non-16-byte-xfers.patch
-Patch2214: linux-2.6-ata-call-check-dma-with-qc-prepared.patch
-Patch2215: linux-2.6-libata-ich8m-add-pciid.patch
-Patch2216: linux-2.6-libata-pata_dma-param.patch
-Patch2217: linux-2.6-libata-ncq-blacklist-2.6.22-rc7.patch
-Patch2218: linux-2.6-libata-pata_it821x-partly-fix-dma.patch
-
-# ATA spindown
-Patch2220: linux-2.6-2110_scsi-sd-printing.patch
-Patch2221: linux-2.6-2111_sd-start-stop.patch
-Patch2222: linux-2.6-2112_libata-suspend.patch
-Patch2223: linux-2.6-2113_libata-spindown-compat.patch
-Patch2224: linux-2.6-2114_libata-shutdown-warning.patch
-Patch2225: linux-2.6-2115_libata-spindown-status.patch
-Patch2226: linux-2.6-2116_libata-remove-spindown-compat.patch
-Patch2227: linux-2.6-2117_sata-via-suspend.patch
-Patch2228: linux-2.6-2118_scsi-constants.patch
-
-# Wireless bits
-Patch2300: linux-2.6-wireless.patch
-Patch2301: git-wireless-dev.patch
-Patch2302: linux-2.6-bcm43xx-pci-neuter.patch
-
-# Assorted dyntick/clock/timer fixes.
-Patch2402: linux-2.6-acpi-keep-tsc-stable-when-lapic-timer-c2-ok-is-set.patch
-Patch2403: linux-2.6-clockevents-fix-resume-logic.patch
-
-# ACPI bits
-Patch2500: linux-2.6-acpi-unblacklist-dell-gx240.patch
-Patch2501: linux-2.6-acpi-dock-oops.patch
-Patch2502: linux-2.6-acpi-boot-regression.patch
-Patch2503: linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch
-
-# Excessive wakeups.
-Patch2600: linux-2.6-wakeups-hdaps.patch
-
-Patch3000: linux-2.6-acpi-config_pm-poweroff.patch
-
-# Add the new firewire stack. Diff between the v2.6.20 tag and commit
-# 5468ee91741092a711327628c7c524a4d4d0cd6a in the linux1394 git tree.
-Patch5000: linux-2.6-firewire.patch
-Patch5001: linux-2.6-firewire-be32-fix.patch
-
-# Security:
-
-# CVE-2008-0600 (bug #432517)
-Patch6000: linux-2.6-cve-2008-0600.patch
-
-#
-# 10000 to 20000 is for stuff that has to come last due to the
-# amount of drivers they touch. But only these should go here.
-# Not patches you're too lazy for to put in the proper place.
-#
+Patch21: linux-2.6-utrace-tracehook.patch
+Patch22: linux-2.6-utrace-tracehook-ia64.patch
+Patch23: linux-2.6-utrace-tracehook-sparc64.patch
+Patch24: linux-2.6-utrace-tracehook-s390.patch
+Patch25: linux-2.6-utrace-tracehook-um.patch
+Patch26: linux-2.6-utrace-tracehook-avr32.patch
+Patch27: linux-2.6-utrace-regset.patch
+Patch28: linux-2.6-utrace-regset-ia64.patch
+Patch29: linux-2.6-utrace-regset-sparc64.patch
+Patch30: linux-2.6-utrace-regset-s390.patch
+Patch31: linux-2.6-utrace-regset-avr32.patch
+Patch32: linux-2.6-utrace-core.patch
+Patch33: linux-2.6-utrace-ptrace-compat.patch
+Patch34: linux-2.6-utrace-ptrace-compat-ia64.patch
+Patch35: linux-2.6-utrace-ptrace-compat-sparc64.patch
+Patch36: linux-2.6-utrace-ptrace-compat-s390.patch
+Patch37: linux-2.6-utrace-ptrace-compat-avr32.patch
+
+Patch41: linux-2.6-sysrq-c.patch
+Patch42: linux-2.6-x86-tune-generic.patch
+Patch75: linux-2.6-x86-debug-boot.patch
+
+Patch80: linux-2.6-ia32-syscall-restart.patch
+
+Patch123: linux-2.6-ppc-rtc.patch
+Patch140: linux-2.6-ps3-ehci-iso.patch
+Patch141: linux-2.6-ps3-storage-alias.patch
+Patch142: linux-2.6-ps3-legacy-bootloader-hack.patch
+Patch143: linux-2.6-g5-therm-shutdown.patch
+Patch144: linux-2.6-vio-modalias.patch
+
+Patch160: linux-2.6-execshield.patch
+Patch250: linux-2.6-debug-sizeof-structs.patch
+Patch260: linux-2.6-debug-nmi-timeout.patch
+Patch270: linux-2.6-debug-taint-vm.patch
+Patch280: linux-2.6-debug-spinlock-taint.patch
+Patch330: linux-2.6-debug-no-quiet.patch
+Patch350: linux-2.6-devmem.patch
+Patch370: linux-2.6-crash-driver.patch
+Patch400: linux-2.6-scsi-cpqarray-set-master.patch
+Patch402: linux-2.6-scsi-mpt-vmware-fix.patch
+Patch420: linux-2.6-squashfs.patch
+Patch430: linux-2.6-net-silence-noisy-printks.patch
+Patch450: linux-2.6-input-kill-stupid-messages.patch
+Patch460: linux-2.6-serial-460800.patch
+Patch510: linux-2.6-silence-noise.patch
+Patch570: linux-2.6-selinux-mprotect-checks.patch
+Patch610: linux-2.6-defaults-fat-utf8.patch
+Patch660: linux-2.6-libata-ali-atapi-dma.patch
+Patch670: linux-2.6-ata-quirk.patch
+
+Patch680: linux-2.6-wireless.patch
+Patch681: linux-2.6-wireless-pending.patch
+Patch682: linux-2.6-wireless-pending-too.patch
+Patch690: linux-2.6-at76.patch
+
+Patch820: linux-2.6-compile-fixes.patch
+Patch821: linux-2.6-compile-fix-gcc-43.patch
+Patch1101: linux-2.6-default-mmf_dump_elf_headers.patch
+Patch1400: linux-2.6-smarter-relatime.patch
+Patch1515: linux-2.6-lirc.patch
+
+# nouveau + drm fixes
+Patch1801: linux-2.6-drm-git-mm.patch
+Patch1802: linux-2.6-ppc32-ucmpdi2.patch
+Patch1803: nouveau-drm.patch
+Patch1804: linux-2.6-drm-git-mm-revert-nopfn.patch
+Patch1805: linux-2.6-drm-git-i915-remove-priv-access.patch
+
+# kludge to make ich9 e1000 work
+Patch2000: linux-2.6-e1000-ich9.patch
+
+# atl2 network driver
+Patch2020: linux-2.6-netdev-atl2.patch
+
+# ext4 patches
+Patch2100: linux-2.6-ext4-stable-queue.patch
+
+# linux1394 git patches
+Patch2200: linux-2.6-firewire-git-update.patch
+Patch2201: linux-2.6-firewire-git-pending.patch
+
+# make USB EHCI driver respect "nousb" parameter
+Patch2300: linux-2.6-usb-ehci-hcd-respect-nousb.patch
+
+# acpi hotkey driver for asus eeepc
+Patch2350: linux-2.6-acpi-eeepc-hotkey.patch
+
+# usb video
+Patch2400: linux-2.6-uvcvideo.patch
+
+Patch2501: linux-2.6-ppc-use-libgcc.patch
+
+Patch2503: linux-2.6-virtio_blk-fix-sysfs-bits.patch
+
+### HACK ###
+Patch2502: linux-2.6-blkcipher-depend-on-chainiv.patch
+
+# kernel-xen patches start
+Patch5000: linux-2.6-xen-0001-Revert-linux-2.6-execshield.patch.patch
+Patch5001: linux-2.6-xen-0002-squashfs-Fix-build-without-CONFIG_SMP.patch
+Patch5002: linux-2.6-xen-0003-xen-Make-hvc0-the-preferred-console-in-domU.patch
+Patch5003: linux-2.6-xen-0004-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch
+Patch5004: linux-2.6-xen-0005-fbdev-Make-deferred-I-O-work-as-advertized.patch
+Patch5005: linux-2.6-xen-0006-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch
+Patch5006: linux-2.6-xen-0007-xen-Module-autoprobing-support-for-frontend-drivers.patch
+Patch5007: linux-2.6-xen-0008-xen-Add-compatibility-aliases-for-frontend-drivers.patch
+Patch5008: linux-2.6-xen-0009-xen-Add-a-vmlinuz-target.patch
+Patch5009: linux-2.6-xen-0010-xen-Add-empty-xenctrl-module.patch
+Patch5010: linux-2.6-xen-0011-xen-Add-proc-xen-capabilities.patch
+Patch5011: linux-2.6-xen-0012-xen-Add-proc-xen-privcmd.patch
+Patch5012: linux-2.6-xen-0013-xen-Add-proc-xen-xenbus.patch
+Patch5013: linux-2.6-xen-0014-xen-Add-Xen-s-sys-hypervisor-interface.patch
+Patch5014: linux-2.6-xen-0015-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch
+Patch5015: linux-2.6-xen-0016-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch
+Patch5016: linux-2.6-xen-0017-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch
+# kernel-xen patches end
 
 # Xen hypervisor patches (20000+)
 Patch20000: xen-compile-fix.patch
@@ -959,9 +700,6 @@
 # Include build-id notes on xen-syms
 Patch20005: xen-syms-build-id.patch
 
-
-
-
 %endif
 
 BuildRoot: %{_tmppath}/%{mainpkgname}-%{KVERREL}-root-%{_target_cpu}
@@ -997,6 +735,12 @@
 building most standard programs and are also needed for rebuilding the
 glibc package.
 
+%package bootwrapper
+Summary: Boot wrapper files for generating combined kernel + initrd images
+Group: Development/System
+%description bootwrapper
+Kernel-bootwrapper contains the wrapper code which makes bootable "zImage"
+files combining both kernel and initial ramdisk.
 
 %package -n %{mainpkgname}-debuginfo-common
 Summary: Kernel source files used by %{mainpkgname}-debuginfo packages
@@ -1021,7 +765,7 @@
 %description -n %{variantbase}%{?1:-%{1}}-debuginfo\
 This package provides debug information for package %{variantbase}%{?1:-%{1}}.\
 This is required to use SystemTap with %{variantbase}%{?1:-%{1}}-%{KVERREL}.\
-%{expand:%%global debuginfo_args %{?debuginfo_args} -p '/.*/%%{KVERREL}%{?1:-?%{1}}(-%%{_target_cpu})?/.*|/.*%%{KVERREL}%{?1}' -o debuginfo%{?1}.list}\
+%{?1:%{expand:%%global debuginfo_args %{?debuginfo_args} -p '/.*/%%{KVERREL}%{?1:-?%{1}}(-%%{_target_cpu})?/.*|/.*%%{KVERREL}%{?1}(\.debug)?' -o debuginfo%{?1}.list}}\
 %{nil}
 
 #
@@ -1084,8 +828,9 @@
 
 
 %define variant_summary The Linux kernel compiled with extra debugging enabled for PAE capable machines
-%kernel_variant_package PAE-debug
-%description -n %{variantbase}-PAE-debug
+%kernel_variant_package PAEdebug
+Obsoletes: %{variantbase}-PAEdebug
+%description -n %{variantbase}-PAEdebug
 This package includes a version of the Linux kernel with support for up to
 64GB of high memory. It requires a CPU with Physical Address Extensions (PAE).
 The non-PAE kernel can only address up to 4GB of memory.
@@ -1126,6 +871,7 @@
 
 %prep
 # do a few sanity-checks for --with *only builds
+%if !%{with_doc}
 %if %{with_baseonly}
 %if !%{with_up}
 echo "Cannot build --with baseonly, up build is disabled"
@@ -1147,6 +893,14 @@
 %endif
 %endif
 
+%if %{with_xenonly}
+%if !%{with_xen}
+echo "Cannot build --with xenonly, xen build is disabled"
+exit 1
+%endif
+%endif
+%endif
+
 # If the package has a variantbase set, the up (no variant suffix) packages would
 # be inconsistent (sometimes using %%{mainpkgname}, other using %%{variantbase})
 #
@@ -1161,17 +915,75 @@
 exit 1
 %endif
 
-
-
+patch_command='patch -p1 -F1 -s'
+ApplyPatch()
+{
+  local patch=$1
+  shift
+  if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
+    exit 1;
+  fi
+  case "$patch" in
+  *.bz2) bunzip2 < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
+  *.gz) gunzip < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
+  *) $patch_command ${1+"$@"} < "$RPM_SOURCE_DIR/$patch" ;;
+  esac
+}
 
 # First we unpack the kernel tarball.
 # If this isn't the first make prep, we use links to the existing clean tarball
 # which speeds things up quite a bit.
-if [ ! -d kernel-%{kversion}/vanilla ]; then
+
+# Update to latest upstream.
+%if 0%{?released_kernel}
+%define vanillaversion 2.6.%{base_sublevel}
+# released_kernel with stable_update available case
+%if 0%{?stable_update}
+%define vanillaversion 2.6.%{base_sublevel}.%{stable_update}
+%endif
+# non-released_kernel case
+%else
+%if 0%{?rcrev}
+%define vanillaversion 2.6.%{upstream_sublevel}-rc%{rcrev}
+%if 0%{?gitrev}
+%define vanillaversion 2.6.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}
+%endif
+%else
+# pre-{base_sublevel+1}-rc1 case
+%if 0%{?gitrev}
+%define vanillaversion 2.6.%{base_sublevel}-git%{gitrev}
+%endif
+%endif
+%endif
+
+if [ ! -d kernel-%{kversion}/vanilla-%{vanillaversion} ]; then
   # Ok, first time we do a make prep.
   rm -f pax_global_header
 %setup -q -n kernel-%{kversion} -c
-  mv linux-%{kversion} vanilla
+  mv linux-%{kversion} vanilla-%{vanillaversion}
+  cd vanilla-%{vanillaversion}
+
+# Update vanilla to the latest upstream.
+# released_kernel with stable_update available case
+%if 0%{?stable_update}
+ApplyPatch patch-2.6.%{base_sublevel}.%{stable_update}.bz2
+# non-released_kernel case
+%else
+%if 0%{?rcrev}
+ApplyPatch patch-2.6.%{upstream_sublevel}-rc%{rcrev}.bz2
+%if 0%{?gitrev}
+ApplyPatch patch-2.6.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.bz2
+%endif
+%else
+# pre-{base_sublevel+1}-rc1 case
+%if 0%{?gitrev}
+ApplyPatch patch-2.6.%{base_sublevel}-git%{gitrev}.bz2
+%endif
+%endif
+%endif
+
+ cd ..
+
 else
   # We already have a vanilla dir.
   cd kernel-%{kversion}
@@ -1184,22 +996,20 @@
   fi
 fi
 
-cp -rl vanilla linux-%{kversion}.%{_target_cpu}
+cp -rl vanilla-%{vanillaversion} linux-%{kversion}.%{_target_cpu}
 
 cd linux-%{kversion}.%{_target_cpu}
 
-%if 0%{?preconfigured}
-  # The .config files were already generated
-  cp $RPM_SOURCE_DIR/kernel-%{kversion}*.config .
-%else
-  # Drop some necessary files from the source dir into the buildroot
-  cp $RPM_SOURCE_DIR/config-* .
-  cp %{SOURCE15} .
-
-  # Dynamically generate kernel .config files from config-* files
-  make -f %{SOURCE20} VERSION=%{version} configs
+%if %{using_upstream_branch}
+### BRANCH APPLY ###
 %endif
 
+# Drop some necessary files from the source dir into the buildroot
+cp $RPM_SOURCE_DIR/config-* .
+cp %{SOURCE15} .
+
+# Dynamically generate kernel .config files from config-* files
+make -f %{SOURCE20} VERSION=%{version} configs
 
 #if a rhel kernel, apply the rhel config options
 %if 0%{?rhel}
@@ -1218,538 +1028,245 @@
   done
 %endif
 
-patch_command='patch -p1 -F1 -s'
-ApplyPatch()
-{
-  local patch=$1
-  shift
-  if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
-    exit 1;
-  fi
-  case "$patch" in
-  *.bz2) bunzip2 < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
-  *.gz) gunzip < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
-  *) $patch_command ${1+"$@"} < "$RPM_SOURCE_DIR/$patch" ;;
-  esac
-}
-
-%if %{using_upstream_branch}
-### BRANCH APPLY ###
-%else
-
-# Update to latest upstream.
-# released_kernel with stable_update available case
-%if 0%{?stable_update}
-ApplyPatch patch-2.6.%{base_sublevel}.%{stable_update}.bz2
-
-# non-released_kernel case
-%else
-%if 0%{?rcrev}
-ApplyPatch patch-2.6.%{upstream_sublevel}-rc%{rcrev}.bz2
-%if 0%{?gitrev}
-ApplyPatch patch-2.6.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.bz2
-%endif
-%else
-# pre-{base_sublevel+1}-rc1 case
-%if 0%{?gitrev}
-ApplyPatch patch-2.6.%{base_sublevel}-git%{gitrev}.bz2
-%endif
-%endif
-%endif
-
-%endif
+# stable release candidate
+# ApplyPatch patch-2.6.24.1-rc1.bz2
 
+# This patch adds a "make nonint_oldconfig" which is non-interactive and
+# also gives a list of missing options at the end. Useful for automated
+# builds (as used in the buildsystem).
+ApplyPatch linux-2.6-build-nonintconfig.patch
 
 %if !%{nopatches}
 
-#
-# Xen
-#
-%if %{includexen}
-#
-# Apply the main xen patch...
-#%patch951 -p1
-%patch950 -p1 -b .p.xen
-#
-# ... and back out all the tpm additions, they need fixing
-#
-for f in `find drivers/char/tpm -type f -name "*.p.xen"` ; do \
-    g=`dirname $f`/`basename $f .p.xen`; \
-    mv "$f" "$g"; \
-    if [ ! -s "$g" ] ; then rm -f "$g" ; fi; \
-done
-# Delete the rest of the backup files, they just confuse the build later
-find -name "*.p.xen" | xargs rm -f
-
-# Xen utrace
-%patch960 -p1
-%patch961 -p1
-%patch962 -p1
-%patch963 -p1
-%patch964 -p1
-%patch965 -p1
-%patch966 -p1
-%patch967 -p1
-%endif
-
-
-# compile fix
-%patch1 -p1
-%patch2 -p1
-
-# Patches 10 through 100 are meant for core subsystem upgrades
-%patch11 -p1
-
-# Power management fixes
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
-
-# DRM support for 965GM
-%patch17 -p1
-
-# sysrq works always
-%patch20 -p1
+ApplyPatch linux-2.6-hotfixes.patch
 
 # Roland's utrace ptrace replacement.
-%patch30 -p1
-%patch31 -p1
-%patch32 -p1
-%patch33 -p1
-%patch34 -p1
-%patch35 -p1
-%patch36 -p1
-%patch37 -p1
-%patch38 -p1
-%patch39 -p1
-%patch40 -p1
-%patch41 -p1
-%patch42 -p1
-%patch43 -p1
-%patch44 -p1
-%patch45 -p1
-
-%if %{includexen}
-#xen bits of utrace
-%patch52 -p1
-%patch62 -p1
-%endif
+# Main patch includes i386, x86_64, powerpc.
+#ApplyPatch linux-2.6-utrace-tracehook.patch
+# Additional arch work by other contributors.
+#ApplyPatch linux-2.6-utrace-tracehook-ia64.patch
+#ApplyPatch linux-2.6-utrace-tracehook-sparc64.patch
+#ApplyPatch linux-2.6-utrace-tracehook-s390.patch
+#ApplyPatch linux-2.6-utrace-tracehook-um.patch
+#ApplyPatch linux-2.6-utrace-tracehook-avr32.patch
+# Main patch includes i386, x86_64, powerpc.
+#ApplyPatch linux-2.6-utrace-regset.patch
+# Additional arch work by other contributors.
+#ApplyPatch linux-2.6-utrace-regset-ia64.patch
+#ApplyPatch linux-2.6-utrace-regset-sparc64.patch
+#ApplyPatch linux-2.6-utrace-regset-s390.patch
+#ApplyPatch linux-2.6-utrace-regset-avr32.patch
+# Core patch has no machine dependencies.
+#ApplyPatch linux-2.6-utrace-core.patch
+# Main patch includes i386, x86_64, powerpc.
+#ApplyPatch linux-2.6-utrace-ptrace-compat.patch
+# Additional arch work by other contributors.
+#ApplyPatch linux-2.6-utrace-ptrace-compat-ia64.patch
+#ApplyPatch linux-2.6-utrace-ptrace-compat-sparc64.patch
+#ApplyPatch linux-2.6-utrace-ptrace-compat-s390.patch
+#ApplyPatch linux-2.6-utrace-ptrace-compat-avr32.patch
 
-# Use --build-id option
-%patch70 -p1
+# enable sysrq-c on all kernels, not only kexec
+ApplyPatch linux-2.6-sysrq-c.patch
 
 # Architecture patches
-
-#
 # x86(-64)
-#
 # Compile 686 kernels tuned for Pentium4.
-%patch200 -p1
-# add vidfail capability;
-# without this patch specifying a framebuffer on the kernel prompt would
-# make the boot stop if there's no supported framebuffer device; this is bad
-# for the installer cd that wants to automatically fall back to textmode
-# in that case
-%patch201 -p1
-# EDAC support for K8
-%patch202 -p1
-# Suppress APIC errors on UP x86-64.
-%patch203 -p1
-%if %{includexen}
-# Suppress APIC errors on UP x86-64 (xen bits)
-%patch204 -p1
-%endif
-# Don't delete cpu_devs data to identify different x86 types in late_initcall
-%patch205 -p1
-# quirk for Siemens Nixdorf AG FSC Multiprocessor Interrupt Controller
-%patch206 -p1
-# Blacklist Dell Optiplex 320 from using the HPET
-%patch207 -p1
-# Add x86-64 PM_TRACE support.
-%patch209 -p1
+ApplyPatch linux-2.6-x86-tune-generic.patch
+
+ApplyPatch linux-2.6-ia32-syscall-restart.patch
 
 #
 # PowerPC
 #
+###  UPSTREAM PATCHES FROM 2.6.25 (we think):
+# RTC class driver for ppc_md rtc functions
+ApplyPatch linux-2.6-ppc-rtc.patch
+### NOT (YET) UPSTREAM:
+# The EHCI ISO patch isn't yet upstream but is needed to fix reboot
+ApplyPatch linux-2.6-ps3-ehci-iso.patch
+# The storage alias patch is Fedora-local, and allows the old 'ps3_storage'
+# module name to work on upgrades. Otherwise, I believe mkinitrd will fail
+# to pull the module in,
+ApplyPatch linux-2.6-ps3-storage-alias.patch
+# Support booting from Sony's original released 2.6.16-based kboot
+ApplyPatch linux-2.6-ps3-legacy-bootloader-hack.patch
 # Alleviate G5 thermal shutdown problems
-%patch300 -p1
-# Ensure slab objects are aligned enough for a uint64_t (#235392)
-%patch301 -p1
-# Fix data exception problem
-%patch302 -p1
-# Temporary hack to work around GCC PR #25724 / #21237
-%patch303 -p1
-# Fix up ibmvscsi for combined pSeries/iSeries build
-%patch304 -p1
-# Move pmac_zilog to its newly-registered device number
-%patch305 -p1
-# Ensure initrd memory is reserved at boot
-%patch306 -p1
-%patch307 -p1
-%patch308 -p1
-%patch309 -p1
-
-# uevent support for of_platform device
-%patch310 -p1
-%patch311 -p1
-%patch312 -p1
-%patch313 -p1
-
-#powermac-generic-suspend-*
-%patch330 -p1
-%patch331 -p1
-%patch332 -p1
-%patch333 -p1
-
-# Efika Ethernet
-%patch340 -p1
-%patch341 -p1
-
-# PlayStation 3 support
-%patch350 -p1
-%patch351 -p1
-%patch352 -p1
-%patch353 -p1
-%patch354 -p1
-%patch355 -p1
-%patch356 -p1
-%patch357 -p1
-%patch358 -p1
-%patch359 -p1
-%patch360 -p1
-%patch361 -p1
-%patch362 -p1
-
-%patch370 -p1
-%patch371 -p1
-%patch372 -p1
-%patch373 -p1
-%patch374 -p1
-%patch375 -p1
-%patch376 -p1
-%patch377 -p1
-
-# S390
+ApplyPatch linux-2.6-g5-therm-shutdown.patch
+# Provide modalias in sysfs for vio devices
+ApplyPatch linux-2.6-vio-modalias.patch
 
 #
-# Patches 800 through 899 are reserved for bugfixes to the core system
-# and patches related to how RPMs are build
-#
-
-
-# This patch adds a "make nonint_oldconfig" which is non-interactive and
-# also gives a list of missing options at the end. Useful for automated
-# builds (as used in the buildsystem).
-%patch800 -p1
-
 # Exec shield
-%patch810 -p1
-%if %{includexen}
-%patch811 -p1
-%endif
-
 #
-# GPG signed kernel modules
-#
-%patch900 -p1
-%patch901 -p1
-%patch902 -p1
-%patch903 -p1
-%patch904 -p1
-%patch905 -p1
-%patch906 -p1
-
+ApplyPatch linux-2.6-execshield.patch
 
 #
-# Patches 1000 to 5000 are reserved for bugfixes to drivers and filesystems
+# bugfixes to drivers and filesystems
 #
 
+# USB
+ApplyPatch linux-2.6-usb-ehci-hcd-respect-nousb.patch
+
+# ACPI
+# eeepc hotkey support
+ApplyPatch linux-2.6-acpi-eeepc-hotkey.patch
 
 # Various low-impact patches to aid debugging.
-%patch1010 -p1
-%patch1011 -p1
-%patch1012 -p1
-%patch1013 -p1
-%patch1015 -p1
-%patch1016 -p1
-%patch1019 -p1
-# Disable the 'quiet' boot switch for better bug reports.
-%patch1020 -p1
-%patch1021 -p1
-%patch1022 -p1
-%if %{includexen}
-%patch1023 -p1
+ApplyPatch linux-2.6-debug-sizeof-structs.patch
+ApplyPatch linux-2.6-debug-nmi-timeout.patch
+ApplyPatch linux-2.6-debug-taint-vm.patch
+ApplyPatch linux-2.6-debug-spinlock-taint.patch
+%if !%{debugbuildsenabled}
+ApplyPatch linux-2.6-debug-no-quiet.patch
 %endif
 
 #
 # Make /dev/mem a need-to-know function
 #
-%patch1050 -p1
-%if %{includexen}
-%patch1051 -p1
-%endif
+ApplyPatch linux-2.6-devmem.patch
 
 #
 # /dev/crash driver for the crashdump analysis tool
 #
-%patch1060 -p1
-%if %{includexen}
-%patch1061 -p1
-%endif
+ApplyPatch linux-2.6-crash-driver.patch
 
 #
 # SCSI Bits.
 #
-# Fix old SCSI adapter crashes with CD-ROM
-%patch1100 -p1
 # fix cpqarray pci enable
-%patch1106 -p1
+ApplyPatch linux-2.6-scsi-cpqarray-set-master.patch
+# fix vmware emulated scsi controller
+#ApplyPatch linux-2.6-scsi-mpt-vmware-fix.patch
 
-# Fix 3w-9xxx to use PCI resource length correctly (bug #309611)
-%patch1107 -p1
-
-#
-# Various NFS/NFSD fixes.
+# ALSA
 #
 
-# NIC driver fixes
-# Don't print warnings about MSI failures on e1000
-%patch1300 -p1
-
-# e1000e backport
-%patch1350 -p1
-%patch1351 -p1
-%patch1352 -p1
-%patch1353 -p1
-%patch1354 -p1
-%patch1355 -p1
-%patch1356 -p1
-%patch1357 -p1
-%patch1358 -p1
-%patch1359 -p1
-%patch1360 -p1
-
 # Filesystem patches.
 # Squashfs
-%patch1400 -p1
-# GFS2 update
-%patch1410 -p1
+ApplyPatch linux-2.6-squashfs.patch
 
 # Networking
 # Disable easy to trigger printk's.
-%patch1500 -p1
+ApplyPatch linux-2.6-net-silence-noisy-printks.patch
 
 # Misc fixes
-# Add missing MODULE_VERSION tags to some modules.
-%patch1600 -p1
-# Fix SHA1 alignment problem on ia64
-%patch1601 -p1
 # The input layer spews crap no-one cares about.
-%patch1610 -p1
-# don't wakeup ondemand timer whilst idle.
-%patch1620 -p1
-# Update KVM. (should we just carry the latest version?)
-%patch1630 -p1
-# KVM: Detect if AMD svm was disabled by BIOS
-%patch1631 -p1
-# KVM: Fix above patch on 32-bit
-%patch1632 -p1
-# KVM: reinit real-mode TSS before switching back
-%patch1633 -p1
+ApplyPatch linux-2.6-input-kill-stupid-messages.patch
 # Allow to use 480600 baud on 16C950 UARTs
-%patch1650 -p1
-# Allow large files on UDF
-%patch1660 -p1
-%patch1661 -p1
-%patch1662 -p1
-# fix oops in sysfs_readdir
-%patch1670 -p1
-
-%if %{includexen}
-# checksum fixes (bug #223258)
-%patch1665 -p1
-%endif
-
-# Align kernel data segment to page boundary.
-%patch1690 -p1
-# DVB spinlock bug
-%patch1700 -p1
-# NFS: Added support to turn off the NFSv3 READDIRPLUS RPC.
-%patch1710 -p1
-# Missing braces
-%patch1711 -p1
-# setuid /proc/self/maps fix.
-%patch1720 -p1
-# Fix ACPI suspend / device suspend ordering problem
-%patch1730 -p1
-# Add a safety net to softlockup so that it doesn't prevent installs.
-%patch1740 -p1
-# Speed up spinlock debug.
-%patch1770 -p1
+ApplyPatch linux-2.6-serial-460800.patch
 # Silence some useless messages that still get printed with 'quiet'
-%patch1771 -p1
-# softirqs: print out irq-trace events
-%patch1781 -p1
-
-# OLPC specific patches
-%if 0%{?olpc}
-# Marvell Libertas wireless driver
-%patch1791 -p1
-# OLPC touchpad
-%patch1792 -p1
-%endif
-
-# temporarily restore START_ARRAY ioctl
-%patch1793 -p1
-
-# Fix i82875 EDAC driver setup so X will start
-%patch1794 -p1
-# Work around sysfs/uevent use-after-free problems with Bluetooth HID
-%patch1795 -p1
-
-%if %{includexen}
-# Xenoprof's DOMAIN_SWITCH_CODE changed in oprofile 0.9.3
-%patch1796 -p1
-%endif
+ApplyPatch linux-2.6-silence-noise.patch
 
 # Fix the SELinux mprotect checks on executable mappings
-%patch1801 -p1
-
-# Remove kernel-internal functionality that nothing external should use.
-%patch1910 -p1
-
-#
-# VM related fixes.
-#
-# Re-add cond_resched to invalidate_mapping_pages()
-%patch2000 -p1
-# Silence GFP_ATOMIC failures.
-%patch2001 -p1
+ApplyPatch linux-2.6-selinux-mprotect-checks.patch
 
 # Changes to upstream defaults.
 # Use UTF-8 by default on VFAT.
-%patch2100 -p1
+ApplyPatch linux-2.6-defaults-fat-utf8.patch
 
-# Use unicode VT's by default.
-%patch2103 -p1
-# Disable NMI watchdog by default.
-%patch2105 -p1
-# Disable MMCONFIG & MSI by default.
-%patch2106 -p1
-# Disable USB autosuspend by default.
-%patch2107 -p1
-
-# HPA support for libata.
-%patch2201 -p1
-# sata_nv: Don't attempt using ADMA for (READ|SET)_MAX commands
-%patch2202 -p1
 # Disable ATAPI DMA on ALI chipsets.
-%patch2203 -p1
-# libata: don't initialize sg in ata_exec_internal() if DMA_NONE
+ApplyPatch linux-2.6-libata-ali-atapi-dma.patch
 # ia64 ata quirk
-%patch2204 -p1
-# remove the wildcard from sata_nv driver
-%patch2206 -p1
-# pata_pcmcia.c: add card ident for jvc cdrom
-%patch2207 -p1
-# Add libata ID's for ATI SB700
-%patch2208 -p1
-# hpt3x2n: Correct revision boundary
-%patch2209 -p1
-# pata_sis: Fix and clean up some timing setups
-%patch2210 -p1
-# libata: always use polling SETXFER
-%patch2211 -p1
-# pata_ali: limit DMA speeds
-%patch2212 -p1
-# libata: use PIO when xfer is not a multiple of 16
-%patch2213 -p1
-# libata: call check_dma with qc better prepared
-%patch2214 -p1
-# libata: add intel ich8m (santa rosa) pata ID
-%patch2215 -p1
-# libata: add option to disable PATA DMA
-%patch2216 -p1
-# libata: update NCQ blacklist
-%patch2217 -p1
-# libata: partially fix dma for pata_it821x
-%patch2218 -p1
-
-# ATA spindown
-%patch2220 -p1
-%patch2221 -p1
-%patch2222 -p1
-%patch2223 -p1
-%patch2224 -p1
-%patch2225 -p1
-%patch2226 -p1
-%patch2227 -p1
-%patch2228 -p1
-
-# Add critical wireless updates from 2.6.22
-%patch2300 -p1
-# Add the new wireless stack and drivers from wireless-dev
-%patch2301 -p1
-# avoid bcm43xx vs bcm43xx-mac80211 PCI ID conflicts
-%patch2302 -p1
-
-# Assorted dyntick/clock/timer fixes.
-%patch2402 -p1
-%patch2403 -p1
-
-
-# ACPI patches
-# Remove Dell Optiplex GX240 from the ACPI blacklist
-%patch2500 -p1
-# Fix ACPI dock oops (#238054)
-%patch2501 -p1
-# Fix another ACPI boot regression.
-%patch2502 -p1
-# Fix possible breakage of ACPI suspend
-%patch2503 -p1
-
-# Fix excessive wakeups
-# Make hdaps timer only tick when in use.
-%patch2600 -p1
-
-
-# ACPI patches
-%patch3000 -p1
-
-#
-# Patches 5000 to 6000 are reserved for new drivers that are about to
-# be merged upstream
-#
-
-# Pull in the new firewire stack from 2.6.20-rc3-mm1.
-%patch5000 -p1
-%patch5001 -p1
-
-# security:
-%patch6000 -p1
+ApplyPatch linux-2.6-ata-quirk.patch
 
-#
-# final stuff
-#
+# wireless patches headed for 2.6.25
+#ApplyPatch linux-2.6-wireless.patch
+# wireless patches headed for 2.6.26
+ApplyPatch linux-2.6-wireless-pending.patch
+# temporary backport of some later wireless patches
+ApplyPatch linux-2.6-wireless-pending-too.patch
+
+# Add misc wireless bits from upstream wireless tree
+ApplyPatch linux-2.6-at76.patch
+
+# implement smarter atime updates support.
+ApplyPatch linux-2.6-smarter-relatime.patch
 
 #
-# misc small stuff to make things compile or otherwise improve performance
+# misc small stuff to make things compile
 #
 
-# END OF PATCH APPLICATIONS
+C=$(wc -l $RPM_SOURCE_DIR/linux-2.6-compile-fixes.patch | awk '{print $1}')
+if [ "$C" -gt 10 ]; then
+ApplyPatch linux-2.6-compile-fixes.patch
+fi
+
+# build with gcc43
+ApplyPatch linux-2.6-compile-fix-gcc-43.patch
+
+# build id related enhancements
+ApplyPatch linux-2.6-default-mmf_dump_elf_headers.patch
+
+# http://www.lirc.org/
+ApplyPatch linux-2.6-lirc.patch
+
+ApplyPatch linux-2.6-e1000-ich9.patch
+ApplyPatch linux-2.6-netdev-atl2.patch
+
+# Nouveau DRM + drm fixes
+ApplyPatch linux-2.6-drm-git-mm.patch
+ApplyPatch linux-2.6-ppc32-ucmpdi2.patch
+ApplyPatch nouveau-drm.patch
+ApplyPatch linux-2.6-drm-git-mm-revert-nopfn.patch
+ApplyPatch linux-2.6-drm-git-i915-remove-priv-access.patch
+
+# ext4dev stable patch queue, slated for 2.6.25
+#ApplyPatch linux-2.6-ext4-stable-queue.patch
+
+# linux1394 git patches
+ApplyPatch linux-2.6-firewire-git-update.patch
+C=$(wc -l $RPM_SOURCE_DIR/linux-2.6-firewire-git-pending.patch | awk '{print $1}')
+if [ "$C" -gt 10 ]; then
+ApplyPatch linux-2.6-firewire-git-pending.patch
+fi
 
+# usb video
+ApplyPatch linux-2.6-uvcvideo.patch
+
+ApplyPatch linux-2.6-ppc-use-libgcc.patch
+
+ApplyPatch linux-2.6-virtio_blk-fix-sysfs-bits.patch
+
+ApplyPatch linux-2.6-blkcipher-depend-on-chainiv.patch
+
+# ---------- below all scheduled for 2.6.24 -----------------
+
+# kernel-xen apply start
+ApplyPatch linux-2.6-xen-0001-Revert-linux-2.6-execshield.patch.patch
+ApplyPatch linux-2.6-xen-0002-squashfs-Fix-build-without-CONFIG_SMP.patch
+ApplyPatch linux-2.6-xen-0003-xen-Make-hvc0-the-preferred-console-in-domU.patch
+ApplyPatch linux-2.6-xen-0004-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch
+ApplyPatch linux-2.6-xen-0005-fbdev-Make-deferred-I-O-work-as-advertized.patch
+ApplyPatch linux-2.6-xen-0006-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch
+ApplyPatch linux-2.6-xen-0007-xen-Module-autoprobing-support-for-frontend-drivers.patch
+ApplyPatch linux-2.6-xen-0008-xen-Add-compatibility-aliases-for-frontend-drivers.patch
+ApplyPatch linux-2.6-xen-0009-xen-Add-a-vmlinuz-target.patch
+ApplyPatch linux-2.6-xen-0010-xen-Add-empty-xenctrl-module.patch
+ApplyPatch linux-2.6-xen-0011-xen-Add-proc-xen-capabilities.patch
+ApplyPatch linux-2.6-xen-0012-xen-Add-proc-xen-privcmd.patch
+ApplyPatch linux-2.6-xen-0013-xen-Add-proc-xen-xenbus.patch
+ApplyPatch linux-2.6-xen-0014-xen-Add-Xen-s-sys-hypervisor-interface.patch
+ApplyPatch linux-2.6-xen-0015-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch
+%ifarch x86_64
+ApplyPatch linux-2.6-xen-0016-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch
+ApplyPatch linux-2.6-xen-0017-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch
+%endif
+# kernel-xen apply end
+
+# END OF PATCH APPLICATIONS
 
 %endif
 
 # Any further pre-build tree manipulations happen here.
 
-if [ -e scripts/checkpatch.pl ];then
-  chmod +x scripts/checkpatch.pl
-fi
+chmod +x scripts/checkpatch.pl
 
 cp %{SOURCE10} Documentation/
 
+# only deal with configs if we are going to build for the arch
+%ifnarch %nobuildarches
+
 mkdir configs
 
 # Remove configs not for the buildarch
@@ -1772,6 +1289,8 @@
   echo "# $Arch" > configs/$i
   cat .config >> configs/$i
 done
+# end of kernel config 
+%endif
 
 # get rid of unwanted files resulting from patch fuzz
 find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null
@@ -1781,17 +1300,16 @@
 # Unpack the Xen tarball.
 %if %{includexen}
 cp %{SOURCE2} .
-if [ -d xen ]; then
-  rm -rf xen
+if [ -d %{xen_hv_dirname} ]; then
+  rm -rf %{xen_hv_dirname}
 fi
 %setup -D -T -q -n kernel-%{kversion} -a1
 cd %{xen_hv_dirname}/
 # Any necessary hypervisor patches go here
-%patch20000 -p1
-%patch20001 -p1
-%patch20004 -p1
-%patch20005 -p1
-
+ApplyPatch xen-compile-fix.patch
+ApplyPatch xen-version-strings.patch
+ApplyPatch xen-build-id.patch
+ApplyPatch xen-syms-build-id.patch
 %endif
 
 
@@ -1800,7 +1318,7 @@
 ###
 %build
 
-%if %{usesparse}
+%if %{with_sparse}
 %define sparse_mflags	C=1
 %endif
 
@@ -1816,10 +1334,16 @@
 '$(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@'
 %endif
 
+cp_vmlinux()
+{
+  eu-strip --remove-comment -o "$2" "$1"
+}
+
 BuildKernel() {
     MakeTarget=$1
     KernelImage=$2
     Flavour=$3
+    InstallName=${4:-vmlinuz}
 
     # Pick the right config file for the kernel we're building
     if [ -n "$Flavour" ] ; then
@@ -1832,6 +1356,14 @@
       DevelLink=
     fi
 
+    # When the bootable image is just the ELF kernel, strip it.
+    # We already copy the unstripped file into the debuginfo package.
+    if [ "$KernelImage" = vmlinux ]; then
+      CopyKernel=cp_vmlinux
+    else
+      CopyKernel=cp
+    fi
+
     KernelVer=%{version}-%{release}$Flavour
     echo BUILDING A KERNEL FOR $Flavour %{_target_cpu}...
 
@@ -1867,23 +1399,18 @@
     install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
     install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer
     touch $RPM_BUILD_ROOT/boot/initrd-$KernelVer.img
-    cp $KernelImage $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
     if [ -f arch/$Arch/boot/zImage.stub ]; then
       cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/%{image_install_path}/zImage.stub-$KernelVer || :
     fi
-
-    if [ "$Flavour" == "kdump" ]; then
-        cp vmlinux $RPM_BUILD_ROOT/%{image_install_path}/vmlinux-$KernelVer
-        rm -f $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
-    fi
+    $CopyKernel $KernelImage \
+    		$RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
+    chmod 755 $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
 
     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
     make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer
-%if %{do_vdso_install}
 %ifarch %{vdso_arches}
     make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT vdso_install KERNELRELEASE=$KernelVer
 %endif
-%endif
 
     # And save the headers/makefiles etc for building modules against
     #
@@ -1903,6 +1430,10 @@
     # first copy everything
     cp --parents `find  -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
     cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
+    cp System.map $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
+    if [ -s Module.markers ]; then
+      cp Module.markers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
+    fi
     # then drop all but the needed Makefiles/Kconfig files
     rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Documentation
     rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts
@@ -1921,9 +1452,6 @@
     cd include
     cp -a acpi config keys linux math-emu media mtd net pcmcia rdma rxrpc scsi sound video asm asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
     cp -a `readlink asm` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    if [ "$Arch" = "x86_64" ]; then
-      cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    fi
     # While arch/powerpc/include/asm is still a symlink to the old
     # include/asm-ppc{64,} directory, include that in kernel-devel too.
     if [ "$Arch" = "powerpc" -a -r ../arch/powerpc/include/asm ]; then
@@ -1972,7 +1500,7 @@
     collect_modules_list networking \
     			 'register_netdev|ieee80211_register_hw|usbnet_probe'
     collect_modules_list block \
-    			 'ata_scsi_ioctl|scsi_add_host|blk_init_queue'
+    			 'ata_scsi_ioctl|scsi_add_host|blk_init_queue|register_mtd_blktrans'
 
     # detect missing or incorrect license tags
     rm -f modinfo
@@ -2025,7 +1553,7 @@
 %if %{with_debug}
 BuildKernel %make_target %kernel_image debug
 %if %{with_pae}
-BuildKernel %make_target %kernel_image PAE-debug
+BuildKernel %make_target %kernel_image PAEdebug
 %endif
 %endif
 
@@ -2048,7 +1576,7 @@
 %endif
 
 %if %{with_kdump}
-BuildKernel %make_target %kernel_image kdump
+BuildKernel vmlinux vmlinux kdump vmlinux
 %endif
 
 ###
@@ -2130,6 +1658,10 @@
 rm -f $RPM_BUILD_ROOT/usr/include/asm*/irq.h
 %endif
 
+%if %{with_bootwrapper}
+make DESTDIR=$RPM_BUILD_ROOT bootwrapper_install WRAPPER_OBJDIR=%{_libdir}/kernel-wrapper WRAPPER_DTSDIR=%{_libdir}/kernel-wrapper/dts
+%endif
+
 ###
 ### clean
 ###
@@ -2214,8 +1746,8 @@
 %endif
 
 %if %{with_pae_debug}
-%kernel_variant_preun PAE-debug
-%kernel_variant_post -v PAE-debug -s kernel-smp -r kernel-PAE-debug
+%kernel_variant_post -v PAEdebug -s kernel-smp -r kernel-PAEdebug
+%kernel_variant_preun PAEdebug
 %endif
 
 %if %{with_xen}
@@ -2237,6 +1769,13 @@
 /usr/include/*
 %endif
 
+%if %{with_bootwrapper}
+%files bootwrapper
+%defattr(-,root,root)
+/usr/sbin/*
+%{_libdir}/kernel-wrapper
+%endif
+
 # only some architecture builds need kernel-doc
 %if %{with_doc}
 %files -n %{mainpkgname}-doc
@@ -2271,13 +1810,12 @@
 /lib/modules/%{KVERREL}%{?2}/extra\
 /lib/modules/%{KVERREL}%{?2}/updates\
 /lib/modules/%{KVERREL}%{?2}/weak-updates\
-%if %{do_vdso_install}\
 %ifarch %{vdso_arches}\
 /lib/modules/%{KVERREL}%{?2}/vdso\
 %endif\
-%endif\
 /lib/modules/%{KVERREL}%{?2}/modules.block\
 /lib/modules/%{KVERREL}%{?2}/modules.networking\
+/lib/modules/%{KVERREL}%{?2}/modules.order\
 %ghost /boot/initrd-%{KVERREL}%{?2}.img\
 %{?-e:%{-e*}}\
 %{expand:%%files -n %{variantbase}-%{?2:%{2}-}devel}\
@@ -2309,11 +1847,20 @@
 %kernel_variant_files %{with_smp} smp
 %kernel_variant_files %{with_debug} debug
 %kernel_variant_files %{with_pae} PAE
-%kernel_variant_files %{with_pae_debug} PAE-debug
+%kernel_variant_files %{with_pae_debug} PAEdebug
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
 
 %changelog
+* Wed Mar 05 2008 Mark McLoughlin <markmc at redhat.com>
+- Reset to pv_ops xen DomU from kernel-2_6_25-0_93_rc4_fc9
+- Revert the execshield patch for now
+- Include xen pv fb and kbd drivers
+- Add support for auto-probing frontend drivers
+- Add module aliases for xennet and xenblk
+- Add /proc/xen and /sys/hypervisor
+- Add first round of x86_64 xen pv_ops patches
+
 * Mon Feb 25 2008 Mark McLoughlin <markmc at redhat.com>
 - Fix boot on x86_64 - gcc 4.3.0 related (#434556)
 

linux-2.6-ata-quirk.patch:

Index: linux-2.6-ata-quirk.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-ata-quirk.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-ata-quirk.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-ata-quirk.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -46,13 +46,13 @@
 +
 +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_11, quirk_intel_ide_controller);
 +
---- linux-2.6.20/arch/ia64/kernel/Makefile	2007-02-08 02:13:41.000000000 -0500
-+++ linux-2.6.20_fix/arch/ia64/kernel/Makefile	2007-02-12 09:49:39.000000000 -0500
+--- linux-2.6.21.noarch/arch/ia64/kernel/Makefile~	2007-05-27 23:23:36.000000000 -0400
++++ linux-2.6.21.noarch/arch/ia64/kernel/Makefile	2007-05-27 23:23:48.000000000 -0400
 @@ -33,6 +33,7 @@ obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
  obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR)	+= uncached.o
  obj-$(CONFIG_AUDIT)		+= audit.o
  obj-$(CONFIG_PCI_MSI)		+= msi_ia64.o
 +obj-$(CONFIG_PCI)		+= quirks.o
  mca_recovery-y			+= mca_drv.o mca_drv_asm.o
+ obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o
  
- obj-$(CONFIG_IA64_ESI)		+= esi.o

linux-2.6-build-nonintconfig.patch:

Index: linux-2.6-build-nonintconfig.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-build-nonintconfig.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-build-nonintconfig.patch	24 Jan 2007 01:28:48 -0000	1.1
+++ linux-2.6-build-nonintconfig.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -1,140 +1,123 @@
-diff -urNp --exclude-from=/home/davej/.exclude linux-600/scripts/kconfig/conf.c linux-800/scripts/kconfig/conf.c
---- linux-600/scripts/kconfig/conf.c
-+++ linux-800/scripts/kconfig/conf.c
-@@ -20,6 +20,7 @@ enum {
+diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
+index 32e8c5a..8020453 100644
+--- a/scripts/kconfig/Makefile
++++ b/scripts/kconfig/Makefile
+@@ -24,6 +24,11 @@ oldconfig: $(obj)/conf
+ silentoldconfig: $(obj)/conf
+ 	$< -s $(Kconfig)
+ 
++nonint_oldconfig: $(obj)/conf
++	$< -b $(Kconfig)
++loose_nonint_oldconfig: $(obj)/conf
++	$< -B $(Kconfig)
++
+ # Create new linux.pot file
+ # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
+ # The symlink is used to repair a deficiency in arch/um
+diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
+index fda6313..ed33b66 100644
+--- a/scripts/kconfig/conf.c
++++ b/scripts/kconfig/conf.c
+@@ -22,6 +22,8 @@ enum {
  	ask_all,
  	ask_new,
  	ask_silent,
 +	dont_ask,
++	dont_ask_dont_tell,
  	set_default,
  	set_yes,
  	set_mod,
-@@ -37,6 +37,8 @@ static struct menu *rootEntry;
+@@ -38,6 +40,8 @@ static struct menu *rootEntry;
  
  static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
  
 +static int return_value = 0;
 +
- static void strip(char *str)
+ static const char *get_help(struct menu *menu)
  {
- 	char *p = str;
-@@ -93,6 +96,12 @@ static void conf_askvalue(struct symbol 
+ 	if (menu_has_help(menu))
+@@ -112,6 +116,16 @@ static int conf_askvalue(struct symbol *sym, const char *def)
  		fflush(stdout);
  		fgets(line, 128, stdin);
- 		return;
+ 		return 1;
 +	case dont_ask:
 +		if (!sym_has_value(sym)) {
 +			fprintf(stderr,"CONFIG_%s\n",sym->name);
 +			return_value++;
 +		}
-+		return;
++		/*FALLTHROUGH*/
++	case dont_ask_dont_tell:
++		if (sym_has_value(sym))
++			return 0;
++		return 1;
  	case set_default:
  		printf("%s\n", def);
- 		return;
-@@ -337,6 +346,10 @@ static int conf_choice(struct menu *menu
+ 		return 1;
+@@ -351,6 +365,11 @@ static int conf_choice(struct menu *menu)
  			printf("?");
  		printf("]: ");
  		switch (input_mode) {
 +		case dont_ask:
++		case dont_ask_dont_tell:
 +			cnt = def;
 +			printf("%d\n", cnt);
 +			break;
  		case ask_new:
  		case ask_silent:
  			if (!is_new) {
-@@ -472,7 +485,10 @@ static void check_conf(struct menu *menu
+@@ -486,6 +505,10 @@ static void check_conf(struct menu *menu)
  			if (!conf_cnt++)
- 				printf("*\n* Restart config...\n*\n");
+ 				printf(_("*\n* Restart config...\n*\n"));
  			rootEntry = menu_get_parent_menu(menu);
--			conf(rootEntry);
-+			if (input_mode == dont_ask)
++			if (input_mode == dont_ask
++			    || input_mode == dont_ask_dont_tell)
 +				fprintf(stderr,"CONFIG_%s\n",sym->name);
 +			else
-+				conf(rootEntry);
+ 			conf(rootEntry);
  		}
- 		if (sym_is_choice(sym) && sym_get_tristate_value(sym) != mod)
- 			return;
-@@ -493,6 +509,9 @@ int main(int ac, char **av)
+ 	}
+@@ -504,11 +527,17 @@ int main(int ac, char **av)
+ 	bindtextdomain(PACKAGE, LOCALEDIR);
+ 	textdomain(PACKAGE);
+ 
+-	while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) {
++	while ((opt = getopt(ac, av, "osbBdD:nmyrh")) != -1) {
+ 		switch (opt) {
  		case 'o':
  			input_mode = ask_new;
  			break;
 +		case 'b':
 +			input_mode = dont_ask;
 +			break;
++		case 'B':
++			input_mode = dont_ask_dont_tell;
++			break;
  		case 's':
  			input_mode = ask_silent;
  			valid_stdin = isatty(0) && isatty(1) && isatty(2);
-@@ -557,6 +576,7 @@ int main(int ac, char **av)
+@@ -573,6 +602,8 @@ int main(int ac, char **av)
  		}
  	case ask_all:
  	case ask_new:
 +	case dont_ask:
++	case dont_ask_dont_tell:
  		conf_read(NULL);
  		break;
- 	default:
-@@ -632,7 +632,7 @@ int main(int ac, char **av)
+ 	case set_no:
+@@ -619,7 +650,8 @@ int main(int ac, char **av)
  	do {
  		conf_cnt = 0;
  		check_conf(&rootmenu);
 -	} while (conf_cnt);
-+	} while ((conf_cnt) && (input_mode != dont_ask));
++ 	} while (conf_cnt && (input_mode != dont_ask
++			      && input_mode != dont_ask_dont_tell));
  	if (conf_write(NULL)) {
  		fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
  		return 1;
-@@ -643,5 +643,5 @@ skip_check:
+@@ -630,5 +662,5 @@ skip_check:
  		return 1;
  	}
  
 -	return 0;
 +	return return_value;
  }
---- linux-2.6.16.noarch/scripts/kconfig/Makefile~	2006-03-25 15:55:18.000000000 -0500
-+++ linux-2.6.16.noarch/scripts/kconfig/Makefile	2006-03-25 15:55:47.000000000 -0500
-@@ -23,6 +23,9 @@ oldconfig: $(obj)/conf
- silentoldconfig: $(obj)/conf
- 	$< -s arch/$(ARCH)/Kconfig
- 
-+nonint_oldconfig: scripts/kconfig/conf
-+	./scripts/kconfig/conf -b arch/$(ARCH)/Kconfig
-+
- update-po-config: $(obj)/kxgettext
- 	xgettext --default-domain=linux \
-           --add-comments --keyword=_ --keyword=N_ \
---- linux-2.6.14/scripts/kconfig/confdata.c~	2005-11-10 14:55:46.000000000 -0500
-+++ linux-2.6.14/scripts/kconfig/confdata.c	2005-11-10 14:56:01.000000000 -0500
-@@ -161,7 +161,7 @@ load:
- 			if (def == S_DEF_USER) {
- 				sym = sym_find(line + 9);
- 				if (!sym) {
--					conf_warning("trying to assign nonexistent symbol %s", line + 9);
-+					conf_warning("trying to assign nonexistent symbol %s", line + 9);
- 					break;
- 				}
- 			} else {
-@@ -197,7 +197,7 @@ load:
- 			if (def == S_DEF_USER) {
- 				sym = sym_find(line + 7);
- 				if (!sym) {
--					conf_warning("trying to assign nonexistent symbol %s", line + 7);
-+					conf_warning("trying to assign nonexistent symbol %s", line + 7);
- 					break;
- 				}
- 			} else {
---- linux-2.6.14/scripts/kconfig/confdata.c~	2005-11-15 23:51:37.000000000 -0500
-+++ linux-2.6.14/scripts/kconfig/confdata.c	2005-11-15 23:52:50.000000000 -0500
-@@ -153,7 +153,6 @@ int conf_read_simple(const char *name)
- 				break;
- 			} else if (!(sym->flags & SYMBOL_NEW)) {
- 				conf_warning("trying to reassign symbol %s", sym->name);
--				break;
- 			}
- 			switch (sym->type) {
- 			case S_BOOLEAN:
-@@ -183,7 +182,6 @@ int conf_read_simple(const char *name)
- 				break;
- 			} else if (!(sym->flags & SYMBOL_NEW)) {
- 				conf_warning("trying to reassign symbol %s", sym->name);
--				break;
- 			}
- 			switch (sym->type) {
- 			case S_TRISTATE:

linux-2.6-crash-driver.patch:

Index: linux-2.6-crash-driver.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-crash-driver.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-crash-driver.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-crash-driver.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -1,15 +1,3 @@
-diff -urNp --exclude-from=/home/davej/.exclude linux-1050/arch/i386/mm/init.c linux-1060/arch/i386/mm/init.c
---- linux-1050/arch/i386/mm/init.c
-+++ linux-1060/arch/i386/mm/init.c
-@@ -248,6 +248,8 @@ int devmem_is_allowed(unsigned long page
-    return 0;
- }
- 
-+EXPORT_SYMBOL_GPL(page_is_ram);
-+
- #ifdef CONFIG_HIGHMEM
- pte_t *kmap_pte;
- pgprot_t kmap_prot;
 diff -urNp --exclude-from=/home/davej/.exclude linux-1050/arch/ia64/kernel/ia64_ksyms.c linux-1060/arch/ia64/kernel/ia64_ksyms.c
 --- linux-1050/arch/ia64/kernel/ia64_ksyms.c
 +++ linux-1060/arch/ia64/kernel/ia64_ksyms.c
@@ -23,25 +11,6 @@
  #ifdef ASM_SUPPORTED
  # ifdef CONFIG_SMP
  #  if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
-diff -urNp --exclude-from=/home/davej/.exclude linux-1050/arch/x86_64/mm/init.c linux-1060/arch/x86_64/mm/init.c
---- linux-1050/arch/x86_64/mm/init.c
-+++ linux-1060/arch/x86_64/mm/init.c
-@@ -6,5 +6,6 @@
-  */
- 
-+#include <linux/module.h>
- #include <linux/signal.h>
- #include <linux/sched.h>
- #include <linux/kernel.h>
-@@ -417,6 +418,8 @@ int devmem_is_allowed(unsigned long page
- }
- 
- 
-+EXPORT_SYMBOL_GPL(page_is_ram);
-+
- static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, kcore_modules,
- 			 kcore_vsyscall;
- 
 diff -urNp --exclude-from=/home/davej/.exclude linux-1050/drivers/char/crash.c linux-1060/drivers/char/crash.c
 --- linux-1050/drivers/char/crash.c
 +++ linux-1060/drivers/char/crash.c
@@ -188,17 +157,18 @@
  	int "Maximum number of legacy PTY in use"
 --- linux-2.6.16.noarch/drivers/char/Makefile~	2006-03-25 18:50:42.000000000 -0500
 +++ linux-2.6.16.noarch/drivers/char/Makefile	2006-03-25 18:50:59.000000000 -0500
-@@ -95,6 +95,7 @@ obj-$(CONFIG_IPMI_HANDLER)	+= ipmi/
+@@ -95,6 +95,8 @@ obj-$(CONFIG_IPMI_HANDLER)	+= ipmi/
+ obj-$(CONFIG_JS_RTC)		+= js-rtc.o
+ js-rtc-y = rtc.o
  
- obj-$(CONFIG_HANGCHECK_TIMER)	+= hangcheck-timer.o
- obj-$(CONFIG_TCG_TPM)		+= tpm/
 +obj-$(CONFIG_CRASH)		+= crash.o
- 
++
  # Files generated that shall be removed upon make clean
- clean-files := consolemap_deftbl.c defkeymap.c qtronixmap.c
+ clean-files := consolemap_deftbl.c defkeymap.c
+ 
 diff -urNp --exclude-from=/home/davej/.exclude linux-1050/include/asm-i386/crash.h linux-1060/include/asm-i386/crash.h
---- linux-1050/include/asm-i386/crash.h
-+++ linux-1060/include/asm-i386/crash.h
+--- linux-1050/include/asm-x86/crash.h
++++ linux-1060/include/asm-x86/crash.h
 @@ -0,0 +1,75 @@
 +#ifndef _ASM_I386_CRASH_H
 +#define _ASM_I386_CRASH_H
@@ -369,93 +339,15 @@
 +#endif /* __KERNEL__ */
 +
 +#endif /* _ASM_IA64_CRASH_H */
-diff -urNp --exclude-from=/home/davej/.exclude linux-1050/include/asm-x86_64/crash.h linux-1060/include/asm-x86_64/crash.h
---- linux-1050/include/asm-x86_64/crash.h
-+++ linux-1060/include/asm-x86_64/crash.h
-@@ -0,0 +1,75 @@
-+#ifndef _ASM_X86_64_CRASH_H
-+#define _ASM_X86_64_CRASH_H
-+
-+/*
-+ * linux/include/asm-x86_64/crash.h
-+ *
-+ * Copyright (c) 2004 Red Hat, Inc. 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ *
-+ */
-+
-+#ifdef __KERNEL__
-+
-+#include <linux/mm.h>
-+#include <linux/highmem.h>
-+#include <asm/mmzone.h>
-+
-+extern int page_is_ram(unsigned long);
-+
-+static inline void *
-+map_virtual(u64 offset, struct page **pp)
-+{
-+	struct page *page;
-+	unsigned long pfn;
-+	void *vaddr;
-+
-+	pfn = (unsigned long)(offset >> PAGE_SHIFT);
-+
-+	if (!page_is_ram(pfn)) {
-+		printk(KERN_INFO
-+		    "crash memory driver: !page_is_ram(pfn: %lx)\n", pfn);
-+		return NULL;
-+	}
-+
-+	if (!pfn_valid(pfn)) {
-+		printk(KERN_INFO
-+		    "crash memory driver: invalid pfn: %lx )\n", pfn);
-+		return NULL;
-+	}
-+
-+	page = pfn_to_page(pfn);
-+
-+	vaddr = kmap(page);
-+	if (!vaddr) {
-+		printk(KERN_INFO
-+		    "crash memory driver: pfn: %lx kmap(page: %lx) failed\n", 
-+			pfn, (unsigned long)page);
-+		return NULL;
-+	}
-+
-+	*pp = page;
-+	return (vaddr + (offset & (PAGE_SIZE-1)));
-+}
-+
-+static inline void unmap_virtual(struct page *page) 
-+{ 
-+	kunmap(page);
-+}
-+
-+#endif /* __KERNEL__ */
-+
-+#endif /* _ASM_X86_64_CRASH_H */
---- linux-2.6.21.noarch/arch/x86_64/kernel/e820.c~	2007-05-04 00:04:56.000000000 -0400
-+++ linux-2.6.21.noarch/arch/x86_64/kernel/e820.c	2007-05-04 00:05:02.000000000 -0400
-@@ -25,7 +25,7 @@
- #include <asm/bootsetup.h>
- #include <asm/sections.h>
- 
--struct e820map e820 __initdata;
-+struct e820map e820;
+diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
+index c004d94..13417a2 100644
+--- a/arch/x86/mm/ioremap.c
++++ b/arch/x86/mm/ioremap.c
+@@ -65,6 +65,7 @@ int page_is_ram(unsigned long pagenr)
+ 	}
+ 	return 0;
+ }
++EXPORT_SYMBOL_GPL(page_is_ram);
  
- /* 
-  * PFN of last memory page.
+ /*
+  * Fix up the linear direct mapping of the kernel to avoid cache attribute

linux-2.6-cve-2008-0600.patch:

Index: linux-2.6-cve-2008-0600.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-cve-2008-0600.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-cve-2008-0600.patch	12 Feb 2008 17:10:17 -0000	1.1
+++ linux-2.6-cve-2008-0600.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -21,11 +21,11 @@
 Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
 ---
 
-Index: linux-2.6.21.i686/fs/splice.c
-===================================================================
---- linux-2.6.21.i686.orig/fs/splice.c
-+++ linux-2.6.21.i686/fs/splice.c
-@@ -1171,7 +1171,7 @@ static int get_iovec_page_array(const st
+diff --git a/fs/splice.c b/fs/splice.c
+index 14e2262..9b559ee 100644
+--- a/fs/splice.c
++++ b/fs/splice.c
+@@ -1234,7 +1234,7 @@ static int get_iovec_page_array(const struct iovec __user *iov,
  		if (unlikely(!len))
  			break;
  		error = -EFAULT;
@@ -34,3 +34,4 @@
  			break;
  
  		/*
+

linux-2.6-debug-nmi-timeout.patch:

Index: linux-2.6-debug-nmi-timeout.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-debug-nmi-timeout.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-debug-nmi-timeout.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-debug-nmi-timeout.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -1,5 +1,5 @@
---- linux-2.6.20.noarch/arch/i386/kernel/nmi.c~	2007-04-13 15:52:37.000000000 -0400
-+++ linux-2.6.20.noarch/arch/i386/kernel/nmi.c	2007-04-13 15:53:06.000000000 -0400
+--- linux-2.6.20.noarch/arch/x86/kernel/nmi_32.c~	2007-04-13 15:52:37.000000000 -0400
++++ linux-2.6.20.noarch/arch/x86/kernel/nmi_32.c	2007-04-13 15:53:06.000000000 -0400
 @@ -1044,7 +1044,7 @@ __kprobes int nmi_watchdog_tick(struct p
  		 * wait a few IRQs (5 seconds) before doing the oops ...
  		 */
@@ -9,8 +9,8 @@
  			/*
  			 * die_nmi will return ONLY if NOTIFY_STOP happens..
  			 */
---- linux-2.6.20.noarch/arch/x86_64/kernel/nmi.c~	2007-04-13 15:53:09.000000000 -0400
-+++ linux-2.6.20.noarch/arch/x86_64/kernel/nmi.c	2007-04-13 15:53:29.000000000 -0400
+--- linux-2.6.20.noarch/arch/x86/kernel/nmi_64.c~	2007-04-13 15:53:09.000000000 -0400
++++ linux-2.6.20.noarch/arch/x86/kernel/nmi_64.c	2007-04-13 15:53:29.000000000 -0400
 @@ -923,7 +923,7 @@ int __kprobes nmi_watchdog_tick(struct p
  		 * wait a few IRQs (5 seconds) before doing the oops ...
  		 */
@@ -20,11 +20,11 @@
  			die_nmi("NMI Watchdog detected LOCKUP on CPU %d\n", regs,
  				panic_on_timeout);
  	} else {
---- linux-2.6.20.noarch/lib/Kconfig.debug~	2007-04-13 15:53:48.000000000 -0400
-+++ linux-2.6.20.noarch/lib/Kconfig.debug	2007-04-13 15:55:18.000000000 -0400
-@@ -133,6 +133,14 @@ config DETECT_SOFTLOCKUP
- 	   can be detected via the NMI-watchdog, on platforms that
- 	   support it.)
+--- linux-2.6.21.noarch/lib/Kconfig.debug~	2007-07-06 17:05:46.000000000 -0400
++++ linux-2.6.21.noarch/lib/Kconfig.debug	2007-07-06 17:06:07.000000000 -0400
+@@ -126,6 +126,14 @@ config SCHEDSTATS
+ 	  application, you can say N to avoid the very slight overhead
+ 	  this adds.
  
 +config DEBUG_NMI_TIMEOUT
 +	int "Number of seconds before NMI timeout"
@@ -34,6 +34,6 @@
 +	  This value is the number of seconds the NMI watchdog will tick
 +	  before it decides the machine has hung.
 +
- config SCHEDSTATS
- 	bool "Collect scheduler statistics"
+ config TIMER_STATS
+ 	bool "Collect kernel timers statistics"
  	depends on DEBUG_KERNEL && PROC_FS

linux-2.6-debug-no-quiet.patch:

Index: linux-2.6-debug-no-quiet.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-debug-no-quiet.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-debug-no-quiet.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-debug-no-quiet.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -1,21 +1,24 @@
 diff --git a/init/main.c b/init/main.c
-index a92989e..f4dee52 100644
+index 8b19820..c27d2a0 100644
 --- a/init/main.c
 +++ b/init/main.c
-@@ -236,7 +236,11 @@ static int __init quiet_kernel(char *str)
+@@ -244,8 +244,12 @@ static int __init debug_kernel(char *str)
+ 
+ static int __init quiet_kernel(char *str)
  {
- 	if (*str)
- 		return 0;
 +#ifdef CONFIG_DEBUG_IGNORE_QUIET
 +	console_loglevel = 10;
 +#else
  	console_loglevel = 4;
 +#endif
- 	return 1;
+ 	return 0;
  }
  
---- linux-2.6.21.noarch/lib/Kconfig.debug~	2007-05-28 02:18:07.000000000 -0400
-+++ linux-2.6.21.noarch/lib/Kconfig.debug	2007-05-28 02:18:43.000000000 -0400
+ early_param("debug", debug_kernel);
+diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
+index a370fe8..aee5495 100644
+--- a/lib/Kconfig.debug
++++ b/lib/Kconfig.debug
 @@ -1,3 +1,8 @@
 +config DEBUG_IGNORE_QUIET
 +	bool "Ignore 'quiet' boot argument"

linux-2.6-debug-sizeof-structs.patch:

Index: linux-2.6-debug-sizeof-structs.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-debug-sizeof-structs.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-debug-sizeof-structs.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-debug-sizeof-structs.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -2,7 +2,7 @@
 +++ linux-2.6/init/main.c	2006-07-11 02:49:01.000000000 -0400
 @@ -350,6 +350,10 @@ static void __init setup_per_cpu_areas(v
  }
- #endif /* !__GENERIC_PER_CPU */
+ #endif /* CONFIG_HAVE_SETUP_PER_CPU_AREA */
  
 +#include <linux/ext3_fs_i.h>
 +#include <linux/skbuff.h>
@@ -16,7 +16,7 @@
 @@ -403,6 +403,15 @@ static void __init smp_init(void)
  	/* Any cleanup work */
  	printk(KERN_INFO "Brought up %ld CPUs\n", (long)num_online_cpus());
- 	smp_cpus_done(max_cpus);
+ 	smp_cpus_done(setup_max_cpus);
 +
 +	printk(KERN_DEBUG "sizeof(vma)=%u bytes\n", (unsigned int) sizeof(struct vm_area_struct));
 +	printk(KERN_DEBUG "sizeof(page)=%u bytes\n", (unsigned int) sizeof(struct page));

linux-2.6-debug-spinlock-taint.patch:

Index: linux-2.6-debug-spinlock-taint.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-debug-spinlock-taint.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-debug-spinlock-taint.patch	24 Jan 2007 01:28:48 -0000	1.1
+++ linux-2.6-debug-spinlock-taint.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -1,42 +1,44 @@
---- linux-2.6.17.noarch/lib/spinlock_debug.c~	2006-07-04 16:23:43.000000000 -0400
-+++ linux-2.6.17.noarch/lib/spinlock_debug.c	2006-07-04 16:24:45.000000000 -0400
-@@ -57,9 +57,9 @@ static void spin_bug(spinlock_t *lock, c
+diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
+index 9c4b025..b7a010a 100644
+--- a/lib/spinlock_debug.c
++++ b/lib/spinlock_debug.c
+@@ -58,9 +58,9 @@ static void spin_bug(spinlock_t *lock, const char *msg)
  
  	if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT)
  		owner = lock->owner;
 -	printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n",
 +	printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d (%s)\n",
  		msg, raw_smp_processor_id(),
--		current->comm, current->pid);
-+		current->comm, current->pid, print_tainted());
+-		current->comm, task_pid_nr(current));
++		current->comm, task_pid_nr(current), print_tainted());
  	printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, "
  			".owner_cpu: %d\n",
  		lock, lock->magic,
-@@ -112,9 +112,9 @@ static void __spin_lock_debug(spinlock_t
+@@ -114,9 +114,9 @@ static void __spin_lock_debug(spinlock_t *lock)
  		if (print_once) {
  			print_once = 0;
  			printk(KERN_EMERG "BUG: spinlock lockup on CPU#%d, "
 -					"%s/%d, %p\n",
 +					"%s/%d, %p (%s)\n",
  				raw_smp_processor_id(), current->comm,
--				current->pid, lock);
-+				current->pid, lock, print_tainted());
+-				task_pid_nr(current), lock);
++				task_pid_nr(current), lock, print_tainted());
  			dump_stack();
- 		}
- 	}
-@@ -154,9 +154,9 @@ static void rwlock_bug(rwlock_t *lock, c
+ #ifdef CONFIG_SMP
+ 			trigger_all_cpu_backtrace();
+@@ -159,9 +159,9 @@ static void rwlock_bug(rwlock_t *lock, const char *msg)
  	if (!debug_locks_off())
  		return;
  
 -	printk(KERN_EMERG "BUG: rwlock %s on CPU#%d, %s/%d, %p\n",
 +	printk(KERN_EMERG "BUG: rwlock %s on CPU#%d, %s/%d, %p (%s)\n",
  		msg, raw_smp_processor_id(), current->comm,
--		current->pid, lock);
-+		current->pid, lock, print_tainted());
+-		task_pid_nr(current), lock);
++		task_pid_nr(current), lock, print_tainted());
  	dump_stack();
  }
  
-@@ -177,9 +177,9 @@ static void __read_lock_debug(rwlock_t *
+@@ -184,9 +184,9 @@ static void __read_lock_debug(rwlock_t *lock)
  		if (print_once) {
  			print_once = 0;
  			printk(KERN_EMERG "BUG: read-lock lockup on CPU#%d, "
@@ -48,7 +50,7 @@
  			dump_stack();
  		}
  	}
-@@ -250,9 +250,9 @@ static void __write_lock_debug(rwlock_t 
+@@ -259,9 +259,9 @@ static void __write_lock_debug(rwlock_t *lock)
  		if (print_once) {
  			print_once = 0;
  			printk(KERN_EMERG "BUG: write-lock lockup on CPU#%d, "
@@ -60,3 +62,4 @@
  			dump_stack();
  		}
  	}
+

linux-2.6-debug-taint-vm.patch:

Index: linux-2.6-debug-taint-vm.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-debug-taint-vm.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-debug-taint-vm.patch	24 Jul 2007 14:13:44 -0000	1.3
+++ linux-2.6-debug-taint-vm.patch	6 Mar 2008 13:59:25 -0000	1.4
@@ -1,39 +1,8 @@
---- linux-2.6.20.noarch/include/asm-generic/bug.h~	2007-02-12 16:18:21.000000000 -0500
-+++ linux-2.6.20.noarch/include/asm-generic/bug.h	2007-02-12 16:19:57.000000000 -0500
-@@ -3,6 +3,10 @@
- 
- #include <linux/compiler.h>
- 
-+#ifndef __ASSEMBLY__
-+extern const char *print_tainted(void);
-+#endif
-+
- #ifdef CONFIG_BUG
- 
- #ifdef CONFIG_GENERIC_BUG
-@@ -22,7 +26,7 @@ struct bug_entry {
- 
- #ifndef HAVE_ARCH_BUG
- #define BUG() do { \
--	printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
-+	printk("BUG: failure at %s:%d/%s()! (%s)\n", __FILE__, __LINE__, __FUNCTION__, print_tainted()); \
- 	panic("BUG!"); \
- } while (0)
- #endif
-@@ -35,8 +39,7 @@ struct bug_entry {
- #define WARN_ON(condition) ({						\
- 	typeof(condition) __ret_warn_on = (condition);			\
- 	if (unlikely(__ret_warn_on)) {					\
--		printk("BUG: at %s:%d %s()\n", __FILE__,		\
--			__LINE__, __FUNCTION__);			\
-+		printk("BUG: warning at %s:%d/%s() (%s)\n", __FILE__, __LINE__, __FUNCTION__, print_tainted()); \
- 		dump_stack();						\
- 	}								\
- 	unlikely(__ret_warn_on);					\
-diff -urNp --exclude-from=/home/davej/.exclude linux-1740/kernel/panic.c linux-2000/kernel/panic.c
---- linux-1740/kernel/panic.c
-+++ linux-2000/kernel/panic.c
-@@ -151,6 +151,7 @@ const char *print_tainted(void)
+diff --git a/kernel/panic.c b/kernel/panic.c
+index 6f6e03e..198fc58 100644
+--- a/kernel/panic.c
++++ b/kernel/panic.c
+@@ -173,6 +173,7 @@ const char *print_tainted(void)
  		snprintf(buf, sizeof(buf), "Not tainted");
  	return(buf);
  }
@@ -41,26 +10,11 @@
  
  void add_taint(unsigned flag)
  {
---- linux-2.6.15/mm/page_alloc.c~	2006-01-07 20:48:33.000000000 -0500
-+++ linux-2.6.15/mm/page_alloc.c	2006-01-07 20:49:24.000000000 -0500
-@@ -137,12 +137,12 @@ static inline int bad_range(struct zone 
- static void bad_page(struct page *page)
- {
- 	printk(KERN_EMERG "Bad page state in process '%s'\n"
--		KERN_EMERG "page:%p flags:0x%0*lx mapping:%p mapcount:%d count:%d\n"
-+		KERN_EMERG "page:%p flags:0x%0*lx mapping:%p mapcount:%d count:%d (%s)\n"
- 		KERN_EMERG "Trying to fix it up, but a reboot is needed\n"
- 		KERN_EMERG "Backtrace:\n",
- 		current->comm, page, (int)(2*sizeof(unsigned long)),
- 		(unsigned long)page->flags, page->mapping,
--		page_mapcount(page), page_count(page));
-+		page_mapcount(page), page_count(page), print_tainted());
- 	dump_stack();
- 	page->flags &= ~(1 << PG_lru	|
- 			1 << PG_private |
---- linux-2.6.20.noarch/mm/slab.c~	2007-04-04 16:36:51.000000000 -0400
-+++ linux-2.6.20.noarch/mm/slab.c	2007-04-04 16:37:03.000000000 -0400
-@@ -1802,8 +1802,8 @@ static void check_poison_obj(struct kmem
+diff --git a/mm/slab.c b/mm/slab.c
+index 2e338a5..e5627f9 100644
+--- a/mm/slab.c
++++ b/mm/slab.c
+@@ -1846,8 +1846,8 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp)
  			/* Print header */
  			if (lines == 0) {
  				printk(KERN_ERR
@@ -69,11 +23,9 @@
 +					"Slab corruption (%s): %s start=%p, len=%d\n",
 +					print_tainted(), cachep->name, realobj, size);
  				print_objinfo(cachep, objp, 0);
- 				dump_stack();
  			}
---- linux-2.6.21.noarch/mm/slab.c~	2007-05-14 11:51:33.000000000 -0400
-+++ linux-2.6.21.noarch/mm/slab.c	2007-05-14 11:53:00.000000000 -0400
-@@ -2924,8 +2924,8 @@ static void check_slabp(struct kmem_cach
+ 			/* Hexdump the affected line */
+@@ -2935,8 +2935,8 @@ static void check_slabp(struct kmem_cache *cachep, struct slab *slabp)
  	if (entries != cachep->num - slabp->inuse) {
  bad:
  		printk(KERN_ERR "slab: Internal list corruption detected in "
@@ -84,3 +36,48 @@
  		for (i = 0;
  		     i < sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t);
  		     i++) {
+diff --git a/mm/slub.c b/mm/slub.c
+index 9c1d9f3..e11d58d 100644
+--- a/mm/slub.c
++++ b/mm/slub.c
+@@ -451,7 +451,7 @@ static void slab_bug(struct kmem_cache *s, char *fmt, ...)
+ 	va_end(args);
+ 	printk(KERN_ERR "========================================"
+ 			"=====================================\n");
+-	printk(KERN_ERR "BUG %s: %s\n", s->name, buf);
++	printk(KERN_ERR "BUG %s (%s): %s\n", s->name, print_tainted(), buf);
+ 	printk(KERN_ERR "----------------------------------------"
+ 			"-------------------------------------\n\n");
+ }
+diff --git a/kernel/panic.c b/kernel/panic.c
+index d9e90cf..570b1f6 100644
+--- a/kernel/panic.c
++++ b/kernel/panic.c
+@@ -306,8 +306,8 @@ void warn_on_slowpath(const char *file, int line)
+ 	sprint_symbol(function, caller);
+ 
+ 	printk(KERN_WARNING "------------[ cut here ]------------\n");
+-	printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file,
+-		line, function);
++	printk(KERN_WARNING "WARNING: at %s:%d %s() (%s)\n", file,
++		line, function, print_tainted());
+ 	print_modules();
+ 	dump_stack();
+ 	print_oops_end_marker();
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index 402a504..2085092 100644
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -225,10 +225,10 @@ static void bad_page(struct page *page)
+ 	void *pc = page_get_page_cgroup(page);
+ 
+ 	printk(KERN_EMERG "Bad page state in process '%s'\n" KERN_EMERG
+-		"page:%p flags:0x%0*lx mapping:%p mapcount:%d count:%d\n",
++		"page:%p flags:0x%0*lx mapping:%p mapcount:%d count:%d (%s)\n",
+ 		current->comm, page, (int)(2*sizeof(unsigned long)),
+ 		(unsigned long)page->flags, page->mapping,
+-		page_mapcount(page), page_count(page));
++		page_mapcount(page), page_count(page), print_tainted());
+ 	if (pc) {
+ 		printk(KERN_EMERG "cgroup:%p\n", pc);
+ 		page_reset_bad_cgroup(page);

linux-2.6-defaults-fat-utf8.patch:

Index: linux-2.6-defaults-fat-utf8.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-defaults-fat-utf8.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-defaults-fat-utf8.patch	24 Jan 2007 01:28:48 -0000	1.1
+++ linux-2.6-defaults-fat-utf8.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -1,9 +1,9 @@
 
 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=181963
 
---- linux-2.6.15.noarch/fs/fat/inode.c~	2006-02-20 23:20:12.000000000 -0500
-+++ linux-2.6.15.noarch/fs/fat/inode.c	2006-02-20 23:21:42.000000000 -0500
-@@ -952,7 +952,8 @@ static int parse_options(char *options, 
+--- linux-2.6.21.noarch/fs/fat/inode.c~	2007-05-27 23:22:31.000000000 -0400
++++ linux-2.6.21.noarch/fs/fat/inode.c	2007-05-27 23:22:50.000000000 -0400
+@@ -950,7 +950,8 @@ static int parse_options(char *options, 
  		opts->shortname = 0;
  	opts->name_check = 'n';
  	opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK =  0;
@@ -11,5 +11,5 @@
 +	opts->utf8 = 1;
 +	opts->unicode_xlate = 0;
  	opts->numtail = 1;
- 	opts->nocase = 0;
+ 	opts->usefree = opts->nocase = 0;
  	*debug = 0;

linux-2.6-devmem.patch:

Index: linux-2.6-devmem.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-devmem.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-devmem.patch	24 Jul 2007 14:13:44 -0000	1.3
+++ linux-2.6-devmem.patch	6 Mar 2008 13:59:25 -0000	1.4
@@ -1,657 +1,119 @@
-Index: patching/arch/i386/mm/init.c
-===================================================================
---- patching.orig/arch/i386/mm/init.c
-+++ patching/arch/i386/mm/init.c
-@@ -233,6 +233,25 @@ int page_is_ram(unsigned long pagenr)
+From: Arjan van de Ven <arjan at linux.intel.com>
+Subject: [PATCH] make /dev/kmem a config option
+
+This patch makes /dev/kmem a config option; /dev/kmem is VERY rarely
+used, and when used, it's generally for no good (rootkits tend to be
+the most common users). With this config option, users have the
+choice to disable /dev/kmem, saving some size as well.
+
+A patch to disable /dev/kmem has been in the Fedora and RHEL kernels for
+4+ years now without any known problems or legit users of /dev/kmem.
+
+Signed-off-by: Arjan van de Ven <arjan at linux.intel.com>
+---
+ drivers/char/Kconfig |    8 ++++++++
+ drivers/char/mem.c   |   10 ++++++++++
+ 2 files changed, 18 insertions(+)
+
+Index: linux.trees.git/drivers/char/Kconfig
+===================================================================
+--- linux.trees.git.orig/drivers/char/Kconfig
++++ linux.trees.git/drivers/char/Kconfig
+@@ -80,6 +80,14 @@ config VT_HW_CONSOLE_BINDING
+ 	 information. For framebuffer console users, please refer to
+ 	 <file:Documentation/fb/fbcon.txt>.
+ 
++config DEVKMEM
++	bool "/dev/kmem virtual device support"
++	help
++	  Say Y here if you want to support the /dev/kmem device. The
++	  /dev/kmem device is rarely used, but can be used for certain
++	  kind of kernel debugging operations.
++	  When in doubt, say "N".
++
+ config SERIAL_NONSTANDARD
+ 	bool "Non-standard serial port support"
+ 	depends on HAS_IOMEM
+Index: linux.trees.git/drivers/char/mem.c
+===================================================================
+--- linux.trees.git.orig/drivers/char/mem.c
++++ linux.trees.git/drivers/char/mem.c
+@@ -295,6 +295,7 @@ static int mmap_mem(struct file * file, 
  	return 0;
  }
  
-+/*
-+ * devmem_is_allowed() checks to see if /dev/mem access to a certain address is
-+ * valid. The argument is a physical page number.
-+ *
-+ *
-+ * On x86, access has to be given to the first megabyte of ram because that area
-+ * contains bios code and data regions used by X and dosemu and similar apps.
-+ * Access has to be given to non-kernel-ram areas as well, these contain the PCI
-+ * mmio resources as well as potential bios/acpi data regions.
-+ */
-+int devmem_is_allowed(unsigned long pagenr)
-+{
-+   if (pagenr <= 256)
-+       return 1;
-+   if (!page_is_ram(pagenr))
-+       return 1;
-+   return 0;
-+}
-+
- #ifdef CONFIG_HIGHMEM
- pte_t *kmap_pte;
- pgprot_t kmap_prot;
-Index: patching/arch/ia64/mm/init.c
-===================================================================
---- patching.orig/arch/ia64/mm/init.c
-+++ patching/arch/ia64/mm/init.c
-@@ -281,6 +281,13 @@ free_initrd_mem (unsigned long start, un
- 	}
++#ifdef CONFIG_DEVKMEM
+ static int mmap_kmem(struct file * file, struct vm_area_struct * vma)
+ {
+ 	unsigned long pfn;
+@@ -315,6 +316,7 @@ static int mmap_kmem(struct file * file,
+ 	vma->vm_pgoff = pfn;
+ 	return mmap_mem(file, vma);
  }
- 
-+int page_is_ram(unsigned long pagenr)
-+{
-+      //FIXME: implement w/efi walk
-+      printk("page is ram is called!!!!!\n");	
-+      return 1;
-+}
-+
- /*
-  * This installs a clean page in the kernel's page table.
-  */
-Index: patching/arch/powerpc/mm/mem.c
-===================================================================
---- patching.orig/arch/powerpc/mm/mem.c
-+++ patching/arch/powerpc/mm/mem.c
-@@ -45,6 +45,7 @@
- #include <asm/prom.h>
- #include <asm/lmb.h>
- #include <asm/sections.h>
-+#include <asm/rtas.h>
- #include <asm/vdso.h>
- 
- #include "mmu_decl.h"
-@@ -339,6 +340,19 @@ void __init mem_init(void)
- 	max_mapnr = max_pfn;
- 	totalram_pages += free_all_bootmem();
- #endif
-+
-+#ifdef CONFIG_PPC_PSERIES
-+	/* Mark the RTAS pages as PG_reserved so userspace can mmap them */
-+	if (rtas_rmo_buf) {
-+		unsigned long pfn, start_pfn, end_pfn;
-+
-+		start_pfn = rtas_rmo_buf >> PAGE_SHIFT;
-+		end_pfn = (rtas_rmo_buf + RTAS_RMOBUF_MAX) >>  PAGE_SHIFT;
-+		for (pfn = start_pfn; pfn < end_pfn; pfn++)
-+			SetPageReserved(pfn_to_page(pfn));
-+	}
 +#endif
-+
- 	for_each_online_pgdat(pgdat) {
- 		for (i = 0; i < pgdat->node_spanned_pages; i++) {
- 			if (!pfn_valid(pgdat->node_start_pfn + i))
-Index: patching/arch/s390/mm/init.c
-===================================================================
---- patching.orig/arch/s390/mm/init.c
-+++ patching/arch/s390/mm/init.c
-@@ -148,6 +148,11 @@ void __init paging_init(void)
- 	free_area_init_nodes(max_zone_pfns);
- }
- 
-+int page_is_ram (unsigned long pagenr)
-+{
-+	return pagenr < max_mapnr;
-+}
-+
- void __init mem_init(void)
- {
- 	unsigned long codesize, reservedpages, datasize, initsize;
-Index: patching/arch/x86_64/mm/init.c
-===================================================================
---- patching.orig/arch/x86_64/mm/init.c
-+++ patching/arch/x86_64/mm/init.c
-@@ -452,6 +452,28 @@ void __init clear_kernel_mapping(unsigne
- 	__flush_tlb_all();
- } 
  
-+static inline int page_is_ram (unsigned long pagenr)
-+{
-+	int i;
-+
-+	for (i = 0; i < e820.nr_map; i++) {
-+		unsigned long addr, end;
-+
-+		if (e820.map[i].type != E820_RAM)	/* not usable memory */
-+			continue;
-+		/*
-+		 * !!!FIXME!!! Some BIOSen report areas as RAM that
-+		 * are not. Notably the 640->1Mb area. We need a sanity
-+		 * check here.
-+		 */
-+		addr = (e820.map[i].addr+PAGE_SIZE-1) >> PAGE_SHIFT;
-+		end = (e820.map[i].addr+e820.map[i].size) >> PAGE_SHIFT;
-+		if  ((pagenr >= addr) && (pagenr < end))
-+			return 1;
-+	}
-+	return 0;
-+}
-+
+ #ifdef CONFIG_CRASH_DUMP
  /*
-  * Memory hotplug specific functions
-  */
-@@ -534,6 +556,26 @@ int __add_pages(struct zone *z, unsigned
- }
- #endif
+@@ -353,6 +355,7 @@ static ssize_t read_oldmem(struct file *
+ extern long vread(char *buf, char *addr, unsigned long count);
+ extern long vwrite(char *buf, char *addr, unsigned long count);
  
-+/*
-+ * devmem_is_allowed() checks to see if /dev/mem access to a certain address is
-+ * valid. The argument is a physical page number.
-+ *
-+ *
-+ * On x86-64, access has to be given to the first megabyte of ram because that area
-+ * contains bios code and data regions used by X and dosemu and similar apps.
-+ * Access has to be given to non-kernel-ram areas as well, these contain the PCI
-+ * mmio resources as well as potential bios/acpi data regions.
-+ */
-+int devmem_is_allowed(unsigned long pagenr)
-+{
-+	if (pagenr <= 256)
-+		return 1;
-+	if (!page_is_ram(pagenr))
-+		return 1;
-+	return 0;
-+}
-+
-+
- static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, kcore_modules,
- 			 kcore_vsyscall;
- 
-Index: patching/drivers/char/mem.c
-===================================================================
---- patching.orig/drivers/char/mem.c
-+++ patching/drivers/char/mem.c
-@@ -35,6 +35,22 @@
- # include <linux/efi.h>
- #endif
- 
-+static inline int range_is_allowed(unsigned long from, unsigned long to)
-+{
-+	unsigned long cursor;
-+
-+	cursor = from >> PAGE_SHIFT;
-+	while ((cursor << PAGE_SHIFT) < to) {
-+		if (!devmem_is_allowed(cursor)) {
-+			printk ("Program %s tried to read /dev/mem between %lx->%lx.\n",
-+					current->comm, from, to);
-+			return 0;
-+		}
-+		cursor++;
-+	}
-+	return 1;
-+}
-+
++#ifdef CONFIG_DEVKMEM
  /*
-  * Architectures vary in how they handle caching for addresses
-  * outside of main memory.
-@@ -152,6 +168,8 @@ static ssize_t read_mem(struct file * fi
- 		 */
- 		ptr = xlate_dev_mem_ptr(p);
- 
-+		if (!range_is_allowed(p, p+count))
-+			return -EPERM;
- 		if (copy_to_user(buf, ptr, sz))
- 			return -EFAULT;
- 		buf += sz;
-@@ -209,6 +227,8 @@ static ssize_t write_mem(struct file * f
- 		 */
- 		ptr = xlate_dev_mem_ptr(p);
- 
-+		if (!range_is_allowed(ptr, ptr+sz))
-+			return -EPERM;
- 		copied = copy_from_user(ptr, buf, sz);
- 		if (copied) {
- 			written += sz - copied;
-@@ -359,6 +379,8 @@ static ssize_t read_kmem(struct file *fi
- 	ssize_t low_count, read, sz;
- 	char * kbuf; /* k-addr because vread() takes vmlist_lock rwlock */
- 
-+	return -EPERM;
-+
- 	read = 0;
- 	if (p < (unsigned long) high_memory) {
- 		low_count = count;
-@@ -434,126 +456,6 @@ static ssize_t read_kmem(struct file *fi
-  	return read;
+  * This function reads the *virtual* memory as seen by the kernel.
+  */
+@@ -557,6 +560,7 @@ static ssize_t write_kmem(struct file * 
+  	*ppos = p;
+  	return virtr + wrote;
  }
++#endif
  
--
--static inline ssize_t
--do_write_kmem(void *p, unsigned long realp, const char __user * buf,
--	      size_t count, loff_t *ppos)
--{
--	ssize_t written, sz;
--	unsigned long copied;
--
--	written = 0;
--#ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED
--	/* we don't have page 0 mapped on sparc and m68k.. */
--	if (realp < PAGE_SIZE) {
--		unsigned long sz = PAGE_SIZE - realp;
--		if (sz > count)
--			sz = count;
--		/* Hmm. Do something? */
--		buf += sz;
--		p += sz;
--		realp += sz;
--		count -= sz;
--		written += sz;
--	}
--#endif
--
--	while (count > 0) {
--		char *ptr;
--		/*
--		 * Handle first page in case it's not aligned
--		 */
--		if (-realp & (PAGE_SIZE - 1))
--			sz = -realp & (PAGE_SIZE - 1);
--		else
--			sz = PAGE_SIZE;
--
--		sz = min_t(unsigned long, sz, count);
--
--		/*
--		 * On ia64 if a page has been mapped somewhere as
--		 * uncached, then it must also be accessed uncached
--		 * by the kernel or data corruption may occur
--		 */
--		ptr = xlate_dev_kmem_ptr(p);
--
--		copied = copy_from_user(ptr, buf, sz);
--		if (copied) {
--			written += sz - copied;
--			if (written)
--				break;
--			return -EFAULT;
--		}
--		buf += sz;
--		p += sz;
--		realp += sz;
--		count -= sz;
--		written += sz;
--	}
--
--	*ppos += written;
--	return written;
--}
--
--
--/*
-- * This function writes to the *virtual* memory as seen by the kernel.
-- */
--static ssize_t write_kmem(struct file * file, const char __user * buf, 
--			  size_t count, loff_t *ppos)
--{
--	unsigned long p = *ppos;
--	ssize_t wrote = 0;
--	ssize_t virtr = 0;
--	ssize_t written;
--	char * kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */
--
--	if (p < (unsigned long) high_memory) {
--
--		wrote = count;
--		if (count > (unsigned long) high_memory - p)
--			wrote = (unsigned long) high_memory - p;
--
--		written = do_write_kmem((void*)p, p, buf, wrote, ppos);
--		if (written != wrote)
--			return written;
--		wrote = written;
--		p += wrote;
--		buf += wrote;
--		count -= wrote;
--	}
--
--	if (count > 0) {
--		kbuf = (char *)__get_free_page(GFP_KERNEL);
--		if (!kbuf)
--			return wrote ? wrote : -ENOMEM;
--		while (count > 0) {
--			int len = count;
--
--			if (len > PAGE_SIZE)
--				len = PAGE_SIZE;
--			if (len) {
--				written = copy_from_user(kbuf, buf, len);
--				if (written) {
--					if (wrote + virtr)
--						break;
--					free_page((unsigned long)kbuf);
--					return -EFAULT;
--				}
--			}
--			len = vwrite(kbuf, (char *)p, len);
--			count -= len;
--			buf += len;
--			virtr += len;
--			p += len;
--		}
--		free_page((unsigned long)kbuf);
--	}
--
-- 	*ppos = p;
-- 	return virtr + wrote;
--}
--
- #if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
+ #ifdef CONFIG_DEVPORT
  static ssize_t read_port(struct file * file, char __user * buf,
- 			 size_t count, loff_t *ppos)
-@@ -828,7 +730,6 @@ extern const struct file_operations mem_
+@@ -734,6 +738,7 @@ static const struct file_operations mem_
+ 	.get_unmapped_area = get_unmapped_area_mem,
+ };
+ 
++#ifdef CONFIG_DEVKMEM
  static const struct file_operations kmem_fops = {
  	.llseek		= memory_lseek,
  	.read		= read_kmem,
--	.write		= write_kmem,
- 	.mmap		= mmap_kmem,
+@@ -742,6 +747,7 @@ static const struct file_operations kmem
  	.open		= open_kmem,
  	.get_unmapped_area = get_unmapped_area_mem,
-@@ -964,7 +865,6 @@ static const struct {
+ };
++#endif
+ 
+ static const struct file_operations null_fops = {
+ 	.llseek		= null_lseek,
+@@ -820,11 +826,13 @@ static int memory_open(struct inode * in
+ 			filp->f_mapping->backing_dev_info =
+ 				&directly_mappable_cdev_bdi;
+ 			break;
++#ifdef CONFIG_DEVKMEM
+ 		case 2:
+ 			filp->f_op = &kmem_fops;
+ 			filp->f_mapping->backing_dev_info =
+ 				&directly_mappable_cdev_bdi;
+ 			break;
++#endif
+ 		case 3:
+ 			filp->f_op = &null_fops;
+ 			break;
+@@ -873,7 +881,9 @@ static const struct {
  	const struct file_operations	*fops;
  } devlist[] = { /* list of minor devices */
  	{1, "mem",     S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
--	{2, "kmem",    S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
++#ifdef CONFIG_DEVKMEM
+ 	{2, "kmem",    S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
++#endif
  	{3, "null",    S_IRUGO | S_IWUGO,           &null_fops},
- #if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
+ #ifdef CONFIG_DEVPORT
  	{4, "port",    S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
-Index: patching/fs/proc/kcore.c
-===================================================================
---- patching.orig/fs/proc/kcore.c
-+++ patching/fs/proc/kcore.c
-@@ -23,10 +23,10 @@
- #include <asm/io.h>
- 
- #define CORE_STR "CORE"
--
-+unsigned int allow_kcore_access = 0;
- static int open_kcore(struct inode * inode, struct file * filp)
- {
--	return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
-+	return (capable(CAP_SYS_RAWIO) && allow_kcore_access) ? 0 : -EPERM;
- }
- 
- static ssize_t read_kcore(struct file *, char __user *, size_t, loff_t *);
-Index: patching/include/asm-alpha/page.h
-===================================================================
---- patching.orig/include/asm-alpha/page.h
-+++ patching/include/asm-alpha/page.h
-@@ -93,6 +93,8 @@ typedef unsigned long pgprot_t;
- #define VM_DATA_DEFAULT_FLAGS		(VM_READ | VM_WRITE | VM_EXEC | \
- 					 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
- 
-+#define devmem_is_allowed(x) 1
-+
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
- 
-Index: patching/include/asm-arm/page.h
-===================================================================
---- patching.orig/include/asm-arm/page.h
-+++ patching/include/asm-arm/page.h
-@@ -192,6 +192,8 @@ typedef unsigned long pgprot_t;
- 
- #include <asm-generic/page.h>
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- 
- #endif
-Index: patching/include/asm-arm26/page.h
-===================================================================
---- patching.orig/include/asm-arm26/page.h
-+++ patching/include/asm-arm26/page.h
-@@ -95,6 +95,8 @@ typedef unsigned long pgprot_t;
- #define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
- 				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- 
- #include <asm-generic/page.h>
-Index: patching/include/asm-cris/page.h
-===================================================================
---- patching.orig/include/asm-cris/page.h
-+++ patching/include/asm-cris/page.h
-@@ -76,6 +76,8 @@ typedef struct { unsigned long pgprot; }
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- 
- #endif /* _CRIS_PAGE_H */
-Index: patching/include/asm-h8300/page.h
-===================================================================
---- patching.orig/include/asm-h8300/page.h
-+++ patching/include/asm-h8300/page.h
-@@ -78,6 +78,8 @@ extern unsigned long memory_end;
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- 
- #endif /* _H8300_PAGE_H */
-Index: patching/include/asm-i386/page.h
-===================================================================
---- patching.orig/include/asm-i386/page.h
-+++ patching/include/asm-i386/page.h
-@@ -110,6 +110,8 @@ extern int sysctl_legacy_va_layout;
- 
- extern int page_is_ram(unsigned long pagenr);
- 
-+extern int devmem_is_allowed(unsigned long pagenr);
-+
- #endif /* __ASSEMBLY__ */
- 
- #ifdef __ASSEMBLY__
-Index: patching/include/asm-ia64/page.h
-===================================================================
---- patching.orig/include/asm-ia64/page.h
-+++ patching/include/asm-ia64/page.h
-@@ -229,6 +229,8 @@ get_order (unsigned long size)
- 					 (((current->personality & READ_IMPLIES_EXEC) != 0)	\
- 					  ? VM_EXEC : 0))
- 
-+#define devmem_is_allowed(x) 1
-+
- #ifndef __ASSEMBLY__
- #ifdef CONFIG_XEN
- 
-Index: patching/include/asm-m68k/page.h
-===================================================================
---- patching.orig/include/asm-m68k/page.h
-+++ patching/include/asm-m68k/page.h
-@@ -177,6 +177,8 @@ static inline void *__va(unsigned long x
- 
- #include <asm-generic/page.h>
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- 
- #endif /* _M68K_PAGE_H */
-Index: patching/include/asm-m68knommu/page.h
-===================================================================
---- patching.orig/include/asm-m68knommu/page.h
-+++ patching/include/asm-m68knommu/page.h
-@@ -77,6 +77,8 @@ extern unsigned long memory_end;
- 
- #include <asm-generic/page.h>
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- 
- #endif /* _M68KNOMMU_PAGE_H */
-Index: patching/include/asm-mips/page.h
-===================================================================
---- patching.orig/include/asm-mips/page.h
-+++ patching/include/asm-mips/page.h
-@@ -199,4 +199,6 @@ typedef struct { unsigned long pgprot; }
- 
- #endif /* defined (__KERNEL__) */
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* _ASM_PAGE_H */
-Index: patching/include/asm-parisc/page.h
-===================================================================
---- patching.orig/include/asm-parisc/page.h
-+++ patching/include/asm-parisc/page.h
-@@ -173,6 +173,8 @@ extern int npmem_ranges;
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- 
- #endif /* _PARISC_PAGE_H */
-Index: patching/include/asm-ppc/page.h
-===================================================================
---- patching.orig/include/asm-ppc/page.h
-+++ patching/include/asm-ppc/page.h
-@@ -173,6 +173,8 @@ extern __inline__ int get_order(unsigned
- /* We do define AT_SYSINFO_EHDR but don't use the gate mechanism */
- #define __HAVE_ARCH_GATE_AREA		1
- 
-+#define devmem_is_allowed(x) 1
-+
- #include <asm-generic/memory_model.h>
- #endif /* __KERNEL__ */
- #endif /* _PPC_PAGE_H */
-Index: patching/include/asm-powerpc/page.h
-===================================================================
---- patching.orig/include/asm-powerpc/page.h
-+++ patching/include/asm-powerpc/page.h
-@@ -191,6 +191,8 @@ extern const char *arch_vma_name(struct 
- #include <asm-generic/memory_model.h>
- #endif /* __ASSEMBLY__ */
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- 
- #endif /* _ASM_POWERPC_PAGE_H */
-Index: patching/include/asm-s390/page.h
-===================================================================
---- patching.orig/include/asm-s390/page.h
-+++ patching/include/asm-s390/page.h
-@@ -166,6 +166,8 @@ static inline int pfn_valid(unsigned lon
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- 
- #endif /* _S390_PAGE_H */
-Index: patching/include/asm-sh/page.h
-===================================================================
---- patching.orig/include/asm-sh/page.h
-+++ patching/include/asm-sh/page.h
-@@ -148,5 +148,7 @@ typedef struct { unsigned long pgd; } pg
- #define __HAVE_ARCH_GATE_AREA
- #endif
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- #endif /* __ASM_SH_PAGE_H */
-Index: patching/include/asm-sh64/page.h
-===================================================================
---- patching.orig/include/asm-sh64/page.h
-+++ patching/include/asm-sh64/page.h
-@@ -115,5 +115,7 @@ typedef struct { unsigned long pgprot; }
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- #endif /* __ASM_SH64_PAGE_H */
-Index: patching/include/asm-sparc/page.h
-===================================================================
---- patching.orig/include/asm-sparc/page.h
-+++ patching/include/asm-sparc/page.h
-@@ -163,6 +163,8 @@ extern unsigned long pfn_base;
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* __KERNEL__ */
- 
- #endif /* _SPARC_PAGE_H */
-Index: patching/include/asm-sparc64/page.h
-===================================================================
---- patching.orig/include/asm-sparc64/page.h
-+++ patching/include/asm-sparc64/page.h
-@@ -141,6 +141,8 @@ typedef unsigned long pgprot_t;
- #define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
- 				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
- 
-+#define devmem_is_allowed(x) 1
-+
- #include <asm-generic/page.h>
- 
- #endif /* __KERNEL__ */
-Index: patching/include/asm-um/page.h
-===================================================================
---- patching.orig/include/asm-um/page.h
-+++ patching/include/asm-um/page.h
-@@ -113,6 +113,7 @@ extern unsigned long uml_physmem;
- 
- extern struct page *arch_validate(struct page *page, gfp_t mask, int order);
- #define HAVE_ARCH_VALIDATE
-+#define devmem_is_allowed(x) 1
- 
- extern int arch_free_page(struct page *page, int order);
- #define HAVE_ARCH_FREE_PAGE
-Index: patching/include/asm-v850/page.h
-===================================================================
---- patching.orig/include/asm-v850/page.h
-+++ patching/include/asm-v850/page.h
-@@ -126,6 +126,8 @@ typedef unsigned long pgprot_t;
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
- 
-+#define devmem_is_allowed(x) 1
-+
- #endif /* KERNEL */
- 
- #endif /* __V850_PAGE_H__ */
-Index: patching/include/asm-x86_64/page.h
-===================================================================
---- patching.orig/include/asm-x86_64/page.h
-+++ patching/include/asm-x86_64/page.h
-@@ -138,6 +138,10 @@ typedef struct { unsigned long pgprot; }
- #include <asm-generic/memory_model.h>
- #include <asm-generic/page.h>
- 
-+#ifndef __ASSEMBLY__
-+extern int devmem_is_allowed(unsigned long pagenr);
-+#endif
-+
- #endif /* __KERNEL__ */
- 
- #endif /* _X86_64_PAGE_H */
-Index: patching/arch/x86_64/kernel/machine_kexec.c
-===================================================================
---- patching.orig/arch/x86_64/kernel/machine_kexec.c
-+++ patching/arch/x86_64/kernel/machine_kexec.c
-@@ -344,10 +344,12 @@ NORET_TYPE void machine_kexec(struct kim
-  * Useful for holding code to do something appropriate
-  * after a kernel panic.
-  */
-+extern int allow_kcore_access;
- static int __init setup_crashkernel(char *arg)
- {
- 	unsigned long size, base;
- 	char *p;
-+	allow_kcore_access = 1; /*enable ability to read /proc/kcore*/
- 	if (!arg)
- 		return -EINVAL;
- 	size = memparse(arg, &p);
+
+
+-- 
+If you want to reach me at my work email, use arjan at linux.intel.com
+For development, discussion and tips for power savings, 
+visit http://www.lesswatts.org
+

linux-2.6-execshield.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.3 -r 1.4 linux-2.6-execshield.patch
Index: linux-2.6-execshield.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-execshield.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-execshield.patch	24 Jul 2007 14:13:44 -0000	1.3
+++ linux-2.6-execshield.patch	6 Mar 2008 13:59:25 -0000	1.4
@@ -1,52 +1,68 @@
-Index: linux-2.6/arch/i386/kernel/cpu/common.c
-===================================================================
---- linux-2.6.orig/arch/i386/kernel/cpu/common.c
-+++ linux-2.6/arch/i386/kernel/cpu/common.c
-@@ -437,6 +437,13 @@ void __cpuinit identify_cpu(struct cpuin
- 	if (disable_pse)
- 		clear_bit(X86_FEATURE_PSE, c->x86_capability);
+diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
+index f86a3c4..4c5f70d 100644
+--- a/arch/x86/kernel/cpu/common.c
++++ b/arch/x86/kernel/cpu/common.c
+@@ -478,6 +478,20 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
+ 	 * we do "generic changes."
+ 	 */
  
++	/*
++	 *  emulation of NX with segment limits unfortunately means
++	 *  we have to disable the fast system calls, due to the way that
++	 *  sysexit clears the segment limits on return.
++	 *  If we have either disabled exec-shield on the boot command line,
++	 *  or we have NX, then we don't need to do this.
++	 */
 +	if (exec_shield != 0) {
-+#ifdef CONFIG_HIGHMEM64G   /* NX implies PAE */
++#ifdef CONFIG_X86_PAE
 +		if (!test_bit(X86_FEATURE_NX, c->x86_capability))
 +#endif
-+		clear_bit(X86_FEATURE_SEP, c->x86_capability);
++			clear_bit(X86_FEATURE_SEP, c->x86_capability);
 +	}
 +
  	/* If the model name is still unset, do table lookup. */
  	if ( !c->x86_model_id[0] ) {
  		char *p;
-Index: linux-2.6/arch/i386/kernel/process.c
-===================================================================
---- linux-2.6.orig/arch/i386/kernel/process.c
-+++ linux-2.6/arch/i386/kernel/process.c
-@@ -647,6 +647,8 @@ struct task_struct fastcall * __switch_t
+diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
+index a7d50a5..83f7b4e 100644
+--- a/arch/x86/kernel/process_32.c
++++ b/arch/x86/kernel/process_32.c
+@@ -677,7 +677,8 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct
  	/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
  
  	__unlazy_fpu(prev_p);
+-
 +	if (next_p->mm)
 +		load_user_cs_desc(cpu, next_p->mm);
  
- 	/*
- 	 * Reload esp0.
-@@ -907,3 +909,60 @@ unsigned long arch_align_stack(unsigned 
- 		sp -= get_random_int() % 8192;
- 	return sp & ~0xf;
+ 	/* we're going to use this soon, after a few expensive things */
+ 	if (next_p->fpu_counter > 5)
+diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
+index a7d50a5..86e35cb 100644
+--- a/arch/x86/kernel/process_32.c
++++ b/arch/x86/kernel/process_32.c
+@@ -847,3 +847,39 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
+ 	unsigned long range_end = mm->brk + 0x02000000;
+ 	return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
  }
 +
-+void arch_add_exec_range(struct mm_struct *mm, unsigned long limit)
++static void modify_cs(struct mm_struct *mm, unsigned long limit)
 +{
-+	if (limit > mm->context.exec_limit) {
-+		mm->context.exec_limit = limit;
-+		set_user_cs(&mm->context.user_cs, limit);
-+		if (mm == current->mm) {
-+			preempt_disable();
-+			load_user_cs_desc(smp_processor_id(), mm);
-+			preempt_enable();
-+		}
++	mm->context.exec_limit = limit;
++	set_user_cs(&mm->context.user_cs, limit);
++	if (mm == current->mm) {
++		preempt_disable();
++		load_user_cs_desc(smp_processor_id(), mm);
++		preempt_enable();
 +	}
 +}
 +
++void arch_add_exec_range(struct mm_struct *mm, unsigned long limit)
++{
++	if (limit > mm->context.exec_limit)
++		modify_cs(mm, limit);
++}
++
 +void arch_remove_exec_range(struct mm_struct *mm, unsigned long old_end)
 +{
 +	struct vm_area_struct *vma;
@@ -56,14 +72,7 @@
 +		for (vma = mm->mmap; vma; vma = vma->vm_next)
 +			if ((vma->vm_flags & VM_EXEC) && (vma->vm_end > limit))
 +				limit = vma->vm_end;
-+
-+		mm->context.exec_limit = limit;
-+		set_user_cs(&mm->context.user_cs, limit);
-+		if (mm == current->mm) {
-+			preempt_disable();
-+			load_user_cs_desc(smp_processor_id(), mm);
-+			preempt_enable();
-+		}
++		modify_cs(mm, limit);
 +	}
 +}
 +
@@ -72,35 +81,70 @@
 +	mm->context.exec_limit = 0;
 +	set_user_cs(&mm->context.user_cs, 0);
 +}
-+
-+/*
-+ * Generate random brk address between 128MB and 196MB. (if the layout
-+ * allows it.)
-+ */
-+void randomize_brk(unsigned long old_brk)
-+{
-+	unsigned long new_brk, range_start, range_end;
-+
-+	range_start = 0x08000000;
-+	if (current->mm->brk >= range_start)
-+		range_start = current->mm->brk;
-+	range_end = range_start + 0x02000000;
-+	new_brk = randomize_range(range_start, range_end, 0);
-+	if (new_brk)
-+		current->mm->brk = new_brk;
-+}
-+
---- linux-2.6.20.noarch/arch/i386/kernel/smp.c~	2007-02-17 21:43:47.000000000 -0500
-+++ linux-2.6.20.noarch/arch/i386/kernel/smp.c	2007-02-17 21:43:53.000000000 -0500
-@@ -23,6 +23,7 @@
+diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c
+index 309366f..8a940dc 100644
+--- a/arch/x86/kernel/setup64.c
++++ b/arch/x86/kernel/setup64.c
+@@ -45,46 +45,6 @@ EXPORT_SYMBOL_GPL(__supported_pte_mask);
+ 
+ static int do_not_nx __cpuinitdata = 0;
+ 
+-/* noexec=on|off
+-Control non executable mappings for 64bit processes.
+-
+-on	Enable(default)
+-off	Disable
+-*/ 
+-static int __init nonx_setup(char *str)
+-{
+-	if (!str)
+-		return -EINVAL;
+-	if (!strncmp(str, "on", 2)) {
+-                __supported_pte_mask |= _PAGE_NX; 
+- 		do_not_nx = 0; 
+-	} else if (!strncmp(str, "off", 3)) {
+-		do_not_nx = 1;
+-		__supported_pte_mask &= ~_PAGE_NX;
+-        }
+-	return 0;
+-} 
+-early_param("noexec", nonx_setup);
+-
+-int force_personality32 = 0; 
+-
+-/* noexec32=on|off
+-Control non executable heap for 32bit processes.
+-To control the stack too use noexec=off
+-
+-on	PROT_READ does not imply PROT_EXEC for 32bit processes
+-off	PROT_READ implies PROT_EXEC (default)
+-*/
+-static int __init nonx32_setup(char *str)
+-{
+-	if (!strcmp(str, "on"))
+-		force_personality32 &= ~READ_IMPLIES_EXEC;
+-	else if (!strcmp(str, "off"))
+-		force_personality32 |= READ_IMPLIES_EXEC;
+-	return 1;
+-}
+-__setup("noexec32=", nonx32_setup);
+-
+ /*
+  * Copy data used in early init routines from the initial arrays to the
+  * per cpu data areas.  These arrays then become expendable and the
+diff --git a/arch/x86/kernel/smp_32.c b/arch/x86/kernel/smp_32.c
+index dc0cde9..cca75b4 100644
+--- a/arch/x86/kernel/smp_32.c
[...1917 lines suppressed...]
++		unsigned long len0, unsigned long pgoff, unsigned long flags)
++{
++	unsigned long addr = addr0, len = len0;
++	struct mm_struct *mm = current->mm;
++	struct vm_area_struct *vma;
++	unsigned long tmp;
++
++	if (len > TASK_SIZE)
++		return -ENOMEM;
 +
-+			__get_user(insn, (unsigned char *)(regs->eip + i));
-+			printk("%02x ", insn);
++	if (flags & MAP_FIXED)
++		return addr;
++
++	if (!addr) {
++		addr = randomize_range(SHLIB_BASE, 0x01000000, len);
++	} else {
++		addr = PAGE_ALIGN(addr);
++		vma = find_vma(mm, addr);
++		if (TASK_SIZE - len >= addr &&
++		    (!vma || addr + len <= vma->vm_start))
++			return addr;
++	}
++
++	addr = SHLIB_BASE;
++	for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
++		/* At this point:  (!vma || addr < vma->vm_end). */
++		if (TASK_SIZE - len < addr)
++			return -ENOMEM;
++
++		if (!vma || addr + len <= vma->vm_start) {
++			/*
++			 * Must not let a PROT_EXEC mapping get into the
++			 * brk area:
++			 */
++			if (addr + len > mm->brk)
++				goto failed;
++
++			/*
++			 * Up until the brk area we randomize addresses
++			 * as much as possible:
++			 */
++			if (addr >= 0x01000000) {
++				tmp = randomize_range(0x01000000,
++					PAGE_ALIGN(max(mm->start_brk,
++					(unsigned long)0x08000000)), len);
++				vma = find_vma(mm, tmp);
++				if (TASK_SIZE - len >= tmp &&
++				    (!vma || tmp + len <= vma->vm_start))
++					return tmp;
++			}
++			/*
++			 * Ok, randomization didnt work out - return
++			 * the result of the linear search:
++			 */
++			return addr;
 +		}
++		addr = vma->vm_end;
 +	}
-+#endif
-+	printk("\n");
-+	show_regs(regs);
-+}
 +
-+static int __init setup_print_fatal_signals(char *str)
++failed:
++	return current->mm->get_unmapped_area(filp, addr0, len0, pgoff, flags);
++}
+ 
+-EXPORT_SYMBOL(get_unmapped_area);
+ 
+ /* Look up the first VMA which satisfies  addr < vm_end,  NULL if none. */
+ struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr)
+@@ -1506,6 +1585,14 @@ out:
+ 	return prev ? prev->vm_next : vma;
+ }
+ 
++static int over_stack_limit(unsigned long sz)
 +{
-+	get_option (&str, &print_fatal_signals);
-+
-+	return 1;
++	if (sz < EXEC_STACK_BIAS)
++		return 0;
++	return (sz - EXEC_STACK_BIAS) >
++			current->signal->rlim[RLIMIT_STACK].rlim_cur;
 +}
 +
-+__setup("print-fatal-signals=", setup_print_fatal_signals);
+ /*
+  * Verify that the stack growth is acceptable and
+  * update accounting. This is shared with both the
+@@ -1522,7 +1609,7 @@ static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, un
+ 		return -ENOMEM;
+ 
+ 	/* Stack limit test */
+-	if (size > rlim[RLIMIT_STACK].rlim_cur)
++	if (over_stack_limit(size))
+ 		return -ENOMEM;
+ 
+ 	/* mlock limit tests */
+@@ -1826,10 +1913,14 @@ int split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
+ 	if (new->vm_ops && new->vm_ops->open)
+ 		new->vm_ops->open(new);
+ 
+-	if (new_below)
++	if (new_below) {
++		unsigned long old_end = vma->vm_end;
++
+ 		vma_adjust(vma, addr, vma->vm_end, vma->vm_pgoff +
+ 			((addr - new->vm_start) >> PAGE_SHIFT), new);
+-	else
++		if (vma->vm_flags & VM_EXEC)
++			arch_remove_exec_range(mm, old_end);
++	} else
+ 		vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
  
- static int
- specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
-@@ -1795,6 +1826,8 @@ relock:
- 		 * Anything else is fatal, maybe with a core dump.
- 		 */
- 		current->flags |= PF_SIGNALED;
-+		if (print_fatal_signals)
-+			print_fatal_signal(regs, signr);
- 		if (sig_kernel_coredump(signr)) {
- 			/*
- 			 * If it was able to dump core, this kills all
-Index: linux-2.6/mm/mprotect.c
-===================================================================
---- linux-2.6.orig/mm/mprotect.c
-+++ linux-2.6/mm/mprotect.c
-@@ -23,6 +23,7 @@
+ 	return 0;
+@@ -2048,6 +2139,7 @@ void exit_mmap(struct mm_struct *mm)
+ 	vm_unacct_memory(nr_accounted);
+ 	free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, 0);
+ 	tlb_finish_mmu(tlb, 0, end);
++	arch_flush_exec_range(mm);
+ 
+ 	/*
+ 	 * Walk the list again, actually closing and freeing it,
+diff --git a/mm/mprotect.c b/mm/mprotect.c
+index 4de5468..6d822ad 100644
+--- a/mm/mprotect.c
++++ b/mm/mprotect.c
+@@ -23,8 +23,12 @@
  #include <linux/swapops.h>
  #include <asm/uaccess.h>
  #include <asm/pgtable.h>
 +#include <asm/pgalloc.h>
  #include <asm/cacheflush.h>
  #include <asm/tlbflush.h>
++#ifdef CONFIG_X86
++#include <asm/desc.h>
++#endif
  
-@@ -135,7 +136,7 @@ mprotect_fixup(struct vm_area_struct *vm
+ static void change_pte_range(struct mm_struct *mm, pmd_t *pmd,
+ 		unsigned long addr, unsigned long end, pgprot_t newprot,
+@@ -134,7 +138,7 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
  	struct mm_struct *mm = vma->vm_mm;
  	unsigned long oldflags = vma->vm_flags;
  	long nrpages = (end - start) >> PAGE_SHIFT;
@@ -1709,7 +1003,7 @@
  	pgoff_t pgoff;
  	int error;
  	int dirty_accountable = 0;
-@@ -201,6 +202,9 @@ success:
+@@ -198,6 +202,9 @@ success:
  		dirty_accountable = 1;
  	}
  
@@ -1719,11 +1013,11 @@
  	if (is_vm_hugetlb_page(vma))
  		hugetlb_change_protection(vma, start, end, vma->vm_page_prot);
  	else
-Index: linux-2.6/mm/mremap.c
-===================================================================
---- linux-2.6.orig/mm/mremap.c
-+++ linux-2.6/mm/mremap.c
-@@ -389,8 +389,8 @@ unsigned long do_mremap(unsigned long ad
+diff --git a/mm/mremap.c b/mm/mremap.c
+index 08e3c7f..101f885 100644
+--- a/mm/mremap.c
++++ b/mm/mremap.c
+@@ -392,8 +392,8 @@ unsigned long do_mremap(unsigned long addr,
  			if (vma->vm_flags & VM_MAYSHARE)
  				map_flags |= MAP_SHARED;
  
@@ -1731,6 +1025,6 @@
 -						vma->vm_pgoff, map_flags);
 +			new_addr = get_unmapped_area_prot(vma->vm_file, 0, new_len,
 +				vma->vm_pgoff, map_flags, vma->vm_flags & VM_EXEC);
- 			ret = new_addr;
- 			if (new_addr & ~PAGE_MASK)
+ 			if (new_addr & ~PAGE_MASK) {
+ 				ret = new_addr;
  				goto out;

linux-2.6-input-kill-stupid-messages.patch:

Index: linux-2.6-input-kill-stupid-messages.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-input-kill-stupid-messages.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-input-kill-stupid-messages.patch	22 Mar 2007 16:01:16 -0000	1.1
+++ linux-2.6-input-kill-stupid-messages.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -1,16 +1,17 @@
---- linux-2.6.17.noarch/drivers/input/keyboard/atkbd.c~	2006-06-26 19:11:36.659767000 -0400
-+++ linux-2.6.17.noarch/drivers/input/keyboard/atkbd.c	2006-06-26 19:12:23.643737000 -0400
-@@ -383,9 +383,13 @@ static irqreturn_t atkbd_interrupt(struc
+--- linux-2.6.21.noarch/drivers/input/keyboard/atkbd.c~	2007-07-06 10:51:04.000000000 -0400
++++ linux-2.6.21.noarch/drivers/input/keyboard/atkbd.c	2007-07-06 10:51:33.000000000 -0400
+@@ -409,10 +409,14 @@ static irqreturn_t atkbd_interrupt(struc
  			goto out;
  		case ATKBD_RET_ACK:
  		case ATKBD_RET_NAK:
 +#if 0
 +			/* Quite a few key switchers and other tools trigger this and it confuses
 +			   people who can do nothing about it */
- 			printk(KERN_WARNING "atkbd.c: Spurious %s on %s. "
- 			       "Some program might be trying access hardware directly.\n",
- 			       data == ATKBD_RET_ACK ? "ACK" : "NAK", serio->phys);
+ 			if (printk_ratelimit())
+ 				printk(KERN_WARNING "atkbd.c: Spurious %s on %s. "
+ 				       "Some program might be trying access hardware directly.\n",
+ 				       data == ATKBD_RET_ACK ? "ACK" : "NAK", serio->phys);
 +#endif
  			goto out;
- 		case ATKBD_RET_HANGEUL:
- 		case ATKBD_RET_HANJA:
+ 		case ATKBD_RET_ERR:
+ 			atkbd->err_count++;

linux-2.6-net-silence-noisy-printks.patch:

Index: linux-2.6-net-silence-noisy-printks.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-net-silence-noisy-printks.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-net-silence-noisy-printks.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-net-silence-noisy-printks.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -4,123 +4,14 @@
 
 Signed-off-by: Dave Jones <davej at redhat.com>
 
-diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c
-index 56b2f75..b2b36c7 100644
---- a/net/ipv4/netfilter/ip_conntrack_standalone.c
-+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c
-@@ -458,11 +458,8 @@ static unsigned int ip_conntrack_local(unsigned int hooknum,
- {
+--- linux-2.6.23.noarch/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c~	2007-10-16 13:56:02.000000000 -0400
++++ linux-2.6.23.noarch/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c	2007-10-16 13:56:08.000000000 -0400
+@@ -176,8 +176,6 @@ static unsigned int ipv4_conntrack_local
  	/* root is playing with raw sockets. */
- 	if ((*pskb)->len < sizeof(struct iphdr)
--	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr)) {
+ 	if (skb->len < sizeof(struct iphdr) ||
+ 	    ip_hdrlen(skb) < sizeof(struct iphdr)) {
 -		if (net_ratelimit())
 -			printk("ipt_hook: happy cracking.\n");
-+	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr))
  		return NF_ACCEPT;
--	}
- 	return ip_conntrack_in(hooknum, pskb, in, out, okfn);
- }
- 
-diff --git a/net/ipv4/netfilter/iptable_filter.c b/net/ipv4/netfilter/iptable_filter.c
-index d1d61e9..acd903e 100644
---- a/net/ipv4/netfilter/iptable_filter.c
-+++ b/net/ipv4/netfilter/iptable_filter.c
-@@ -102,11 +102,8 @@ ipt_local_out_hook(unsigned int hook,
- {
- 	/* root is playing with raw sockets. */
- 	if ((*pskb)->len < sizeof(struct iphdr)
--	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr)) {
--		if (net_ratelimit())
--			printk("ipt_hook: happy cracking.\n");
-+	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr))
- 		return NF_ACCEPT;
--	}
- 
- 	return ipt_do_table(pskb, hook, in, out, &packet_filter);
- }
-diff --git a/net/ipv4/netfilter/iptable_mangle.c b/net/ipv4/netfilter/iptable_mangle.c
-index 98b66ef..8d7bf96 100644
---- a/net/ipv4/netfilter/iptable_mangle.c
-+++ b/net/ipv4/netfilter/iptable_mangle.c
-@@ -136,11 +136,8 @@ ipt_local_hook(unsigned int hook,
- 
- 	/* root is playing with raw sockets. */
- 	if ((*pskb)->len < sizeof(struct iphdr)
--	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr)) {
--		if (net_ratelimit())
--			printk("ipt_hook: happy cracking.\n");
-+	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr))
- 		return NF_ACCEPT;
--	}
- 
- 	/* Save things which could affect route */
- 	mark = (*pskb)->mark;
-diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
-index 8f3e92d..4e3d6f6 100644
---- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
-+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
-@@ -199,11 +199,8 @@ static unsigned int ipv4_conntrack_local(unsigned int hooknum,
- {
- 	/* root is playing with raw sockets. */
- 	if ((*pskb)->len < sizeof(struct iphdr)
--	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr)) {
--		if (net_ratelimit())
--			printk("ipt_hook: happy cracking.\n");
-+	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr))
- 		return NF_ACCEPT;
--	}
- 	return nf_conntrack_in(PF_INET, hooknum, pskb);
- }
- 
-diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c
-index 112a21d..847e6a4 100644
---- a/net/ipv6/netfilter/ip6table_filter.c
-+++ b/net/ipv6/netfilter/ip6table_filter.c
-@@ -102,11 +102,8 @@ ip6t_local_out_hook(unsigned int hook,
- #if 0
- 	/* root is playing with raw sockets. */
- 	if ((*pskb)->len < sizeof(struct iphdr)
--	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr)) {
--		if (net_ratelimit())
--			printk("ip6t_hook: happy cracking.\n");
-+	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr))
- 		return NF_ACCEPT;
--	}
- #endif
- 
- 	return ip6t_do_table(pskb, hook, in, out, &packet_filter);
-diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c
-index 0c468d3..6c80e35 100644
---- a/net/ipv6/netfilter/ip6table_mangle.c
-+++ b/net/ipv6/netfilter/ip6table_mangle.c
-@@ -138,11 +138,8 @@ ip6t_local_hook(unsigned int hook,
- #if 0
- 	/* root is playing with raw sockets. */
- 	if ((*pskb)->len < sizeof(struct iphdr)
--	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr)) {
--		if (net_ratelimit())
--			printk("ip6t_hook: happy cracking.\n");
-+	    || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr))
- 		return NF_ACCEPT;
--	}
- #endif
- 
- 	/* save source/dest address, mark, hoplimit, flowlabel, priority,  */
-
-
-
-Remove noisy, easy to trigger (as user even, with sfuzz) printk.
-
-Signed-off-by: Dave Jones <davej at redhat.com>
-
---- linux-2.6.20.noarch/net/irda/af_irda.c~	2007-04-19 19:07:21.000000000 -0400
-+++ linux-2.6.20.noarch/net/irda/af_irda.c	2007-04-19 19:07:28.000000000 -0400
-@@ -1143,8 +1143,6 @@ static int irda_create(struct socket *so
- 			self->max_sdu_size_rx = TTP_SAR_UNBOUND;
- 			break;
- 		default:
--			IRDA_ERROR("%s: protocol not supported!\n",
--				   __FUNCTION__);
- 			return -ESOCKTNOSUPPORT;
- 		}
- 		break;
+ 	}
+ 	return nf_conntrack_in(PF_INET, hooknum, skb);

linux-2.6-ppc32-ucmpdi2.patch:

Index: linux-2.6-ppc32-ucmpdi2.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-ppc32-ucmpdi2.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-ppc32-ucmpdi2.patch	22 Mar 2007 16:01:16 -0000	1.1
+++ linux-2.6-ppc32-ucmpdi2.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -1,3 +1,8 @@
+Without this diff, nouveau doesn't build on ppc32.
+It works around a gcc bug. (PR #25724 / #21237)
+
+Hopefully we can just drop this when we move to gcc4.3
+
 --- linux-2.6.19.ppc/arch/powerpc/kernel/misc_32.S~	2006-11-29 21:57:37.000000000 +0000
 +++ linux-2.6.19.ppc/arch/powerpc/kernel/misc_32.S	2006-12-17 12:19:48.000000000 +0000
 @@ -728,6 +728,27 @@ _GLOBAL(__lshrdi3)

linux-2.6-ps3-ehci-iso.patch:

Index: linux-2.6-ps3-ehci-iso.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-ps3-ehci-iso.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-ps3-ehci-iso.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-ps3-ehci-iso.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -18,18 +18,27 @@
 Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>
 
 ---
- drivers/usb/host/ehci-sched.c |   34 ++++++++++++++++++++++++++++++----
- 1 file changed, 30 insertions(+), 4 deletions(-)
+ drivers/usb/host/ehci-sched.c |   30 ++++++++++++++++++++++++++++++
+ 1 files changed, 30 insertions(+)
 
---- ps3-linux-dev.orig/drivers/usb/host/ehci-sched.c
-+++ ps3-linux-dev/drivers/usb/host/ehci-sched.c
-@@ -1168,8 +1168,21 @@ itd_urb_transaction (
+--- a/drivers/usb/host/ehci-sched.c
++++ b/drivers/usb/host/ehci-sched.c
+@@ -21,6 +21,10 @@
+ 
+ /*-------------------------------------------------------------------------*/
+ 
++#ifdef CONFIG_PPC_PS3
++#include <asm/firmware.h>
++#endif
++
+ /*
+  * EHCI scheduled transaction support:  interrupt, iso, split iso
+  * These are called "periodic" transactions in the EHCI spec.
+@@ -1302,8 +1306,21 @@ itd_urb_transaction (
  		if (likely (!list_empty(&stream->free_list))) {
  			itd = list_entry (stream->free_list.prev,
- 					 struct ehci_itd, itd_list);
--			list_del (&itd->itd_list);
--			itd_dma = itd->itd_dma;
-+#if defined(CONFIG_PPC_PS3)
+ 					struct ehci_itd, itd_list);
++#ifdef CONFIG_PPC_PS3
 +			/* Fix for Cell SCC ISO transfer (PS3 Bluetooth). */
 +			if (firmware_has_feature(FW_FEATURE_PS3_LV1)
 +				&& itd->frame == ((ehci_readl(ehci,
@@ -41,19 +50,17 @@
 +				itd_dma = itd->itd_dma;
 +			}
 +#else
-+                       list_del (&itd->itd_list);
-+                       itd_dma = itd->itd_dma;
+ 			list_del (&itd->itd_list);
+ 			itd_dma = itd->itd_dma;
 +#endif
  		} else
  			itd = NULL;
  
-@@ -1784,8 +1797,21 @@ sitd_urb_transaction (
+@@ -1922,8 +1939,21 @@ sitd_urb_transaction (
  		if (!list_empty(&stream->free_list)) {
  			sitd = list_entry (stream->free_list.prev,
  					 struct ehci_sitd, sitd_list);
--			list_del (&sitd->sitd_list);
--			sitd_dma = sitd->sitd_dma;
-+#if defined(CONFIG_PPC_PS3)
++#ifdef CONFIG_PPC_PS3
 +			/* Fix for Cell SCC ISO transfer (PS3 Bluetooth). */
 +			if (firmware_has_feature(FW_FEATURE_PS3_LV1)
 +				&& sitd->frame == ((ehci_readl(ehci,
@@ -65,8 +72,8 @@
 +				sitd_dma = sitd->sitd_dma;
 +			}
 +#else
-+                       list_del (&sitd->sitd_list);
-+                       sitd_dma = sitd->sitd_dma;
+ 			list_del (&sitd->sitd_list);
+ 			sitd_dma = sitd->sitd_dma;
 +#endif
  		} else
  			sitd = NULL;

linux-2.6-selinux-mprotect-checks.patch:

Index: linux-2.6-selinux-mprotect-checks.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-selinux-mprotect-checks.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-selinux-mprotect-checks.patch	24 Jan 2007 01:28:48 -0000	1.1
+++ linux-2.6-selinux-mprotect-checks.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -1,3 +1,6 @@
+This needs a fixed toolchain, and a userspace rebuild to work.
+For this reason, it's had difficulty getting upstream.
+
 --- linux-2.6.16-rc3/security/selinux/hooks.c	2006-02-13 13:19:09.000000000 -0500
 +++ linux-2.6.16-rc3-x/security/selinux/hooks.c	2006-02-14 14:44:48.000000000 -0500
 @@ -2365,7 +2365,6 @@ static int selinux_file_ioctl(struct fil

linux-2.6-serial-460800.patch:

Index: linux-2.6-serial-460800.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-serial-460800.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-serial-460800.patch	24 Jan 2007 01:28:48 -0000	1.1
+++ linux-2.6-serial-460800.patch	6 Mar 2008 13:59:25 -0000	1.2
@@ -38,13 +38,13 @@
  
  	switch (termios->c_cflag & CSIZE) {
  	case CS5:
-@@ -1697,7 +1708,8 @@
+@@ -2034,7 +2034,8 @@ serial8250_set_termios(struct uart_port 
  	/*
  	 * Ask the core to calculate the divisor for us.
  	 */
--	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 
+-	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
 +	max_baud = (up->port.type == PORT_16C950 ? port->uartclk/4 : port->uartclk/16);
-+	baud = uart_get_baud_rate(port, termios, old, 0, max_baud); 
++	baud = uart_get_baud_rate(port, termios, old, 0, max_baud);
  	quot = serial8250_get_divisor(port, baud);
  
  	/*
@@ -52,7 +52,7 @@
  	 */
  	spin_lock_irqsave(&up->port.lock, flags);
  
-+	/* 
++	/*
 +	 * 16C950 supports additional prescaler ratios between 1:16 and 1:4
 +	 * thus increasing max baud rate to uartclk/4.
 +	 */
@@ -64,7 +64,7 @@
 +		else
 +			serial_icr_write(up, UART_TCR, 0);
 +	}
-+	
++
  	/*
  	 * Update the per-port timeout.
  	 */

linux-2.6-silence-noise.patch:

Index: linux-2.6-silence-noise.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-silence-noise.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-silence-noise.patch	24 Jul 2007 14:13:44 -0000	1.3
+++ linux-2.6-silence-noise.patch	6 Mar 2008 13:59:25 -0000	1.4
@@ -1,5 +1,5 @@
---- linux-2.6.18.noarch/arch/x86_64/mm/init.c~	2006-10-16 17:09:56.000000000 -0400
-+++ linux-2.6.18.noarch/arch/x86_64/mm/init.c	2006-10-16 17:10:09.000000000 -0400
+--- linux-2.6.18.noarch/arch/x86/mm/init_64.c~	2006-10-16 17:09:56.000000000 -0400
++++ linux-2.6.18.noarch/arch/x86/mm/init_64.c	2006-10-16 17:10:09.000000000 -0400
 @@ -337,10 +337,6 @@ static void __init find_early_table_spac
  
  	table_start >>= PAGE_SHIFT;
@@ -32,8 +32,8 @@
  				"#%d:%llx@%llx for %s\n",
  			res->flags & IORESOURCE_IO ? "I/O" : "mem",
  			resno, (unsigned long long)(res->end - res->start + 1),
---- linux-2.6.19.noarch/arch/i386/pci/i386.c~	2006-12-04 11:21:32.000000000 -0500
-+++ linux-2.6.19.noarch/arch/i386/pci/i386.c	2006-12-04 11:22:10.000000000 -0500
+--- linux-2.6.19.noarch/arch/x86/pci/i386.c~	2006-12-04 11:21:32.000000000 -0500
++++ linux-2.6.19.noarch/arch/x86/pci/i386.c	2006-12-04 11:22:10.000000000 -0500
 @@ -112,7 +112,7 @@ static void __init pcibios_allocate_bus_
  				pr = pci_find_parent_resource(dev, r);
  				if (!r->start || !pr ||
@@ -52,28 +52,7 @@
  						"resource region %d "
  						"of device %s\n",
  						idx, pci_name(dev));
---- linux-2.6.20.noarch/drivers/base/power/main.c~	2007-04-12 15:29:10.000000000 -0400
-+++ linux-2.6.20.noarch/drivers/base/power/main.c	2007-04-12 15:29:34.000000000 -0400
-@@ -53,9 +53,6 @@ int device_pm_add(struct device * dev)
- {
- 	int error;
- 
--	pr_debug("PM: Adding info for %s:%s\n",
--		 dev->bus ? dev->bus->name : "No Bus",
--		 kobject_name(&dev->kobj));
- 	down(&dpm_list_sem);
- 	list_add_tail(&dev->power.entry, &dpm_active);
- 	device_pm_set_parent(dev, dev->parent);
-@@ -67,9 +64,6 @@ int device_pm_add(struct device * dev)
- 
- void device_pm_remove(struct device * dev)
- {
--	pr_debug("PM: Removing info for %s:%s\n",
--		 dev->bus ? dev->bus->name : "No Bus",
--		 kobject_name(&dev->kobj));
- 	down(&dpm_list_sem);
- 	dpm_sysfs_remove(dev);
- 	put_device(dev->power.pm_parent);
+
 Remove noisy PM printk.
 This has served its purpose.
 
@@ -97,3 +76,29 @@
  	}
  	pci_restore_pcix_state(dev);
  	pci_restore_msi_state(dev);
+
+
+diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
+index d887d5c..80be564 100644
+--- a/drivers/base/power/main.c
++++ b/drivers/base/power/main.c
+@@ -64,9 +64,6 @@ int (*platform_enable_wakeup)(struct device *dev, int is_on);
+  */
+ void device_pm_add(struct device *dev)
+ {
+-	pr_debug("PM: Adding info for %s:%s\n",
+-		 dev->bus ? dev->bus->name : "No Bus",
+-		 kobject_name(&dev->kobj));
+ 	mutex_lock(&dpm_list_mtx);
+ 	list_add_tail(&dev->power.entry, &dpm_active);
+ 	mutex_unlock(&dpm_list_mtx);
+@@ -80,9 +77,6 @@ void device_pm_add(struct device *dev)
+  */
+ void device_pm_remove(struct device *dev)
+ {
+-	pr_debug("PM: Removing info for %s:%s\n",
+-		 dev->bus ? dev->bus->name : "No Bus",
+-		 kobject_name(&dev->kobj));
+ 	mutex_lock(&dpm_list_mtx);
+ 	dpm_sysfs_remove(dev);
+ 	list_del_init(&dev->power.entry);

linux-2.6-squashfs.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.3 -r 1.4 linux-2.6-squashfs.patch
Index: linux-2.6-squashfs.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-squashfs.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-squashfs.patch	24 Jul 2007 14:13:44 -0000	1.3
+++ linux-2.6-squashfs.patch	6 Mar 2008 13:59:25 -0000	1.4
@@ -1,26 +1,28 @@
-diff -x .gitignore -Nurp linux-2.6.20/fs/Kconfig linux-2.6.20-squashfs3.2-r2/fs/Kconfig
---- linux-2.6.20/fs/Kconfig	2006-12-25 01:13:12.000000000 +0000
-+++ linux-2.6.20-squashfs3.2-r2/fs/Kconfig	2007-01-16 02:06:03.000000000 +0000
-@@ -1404,6 +1404,71 @@ config CRAMFS
+diff --git a/fs/Kconfig b/fs/Kconfig
+index d731282..cab44a1 100644
+--- a/fs/Kconfig
++++ b/fs/Kconfig
+@@ -1367,6 +1367,56 @@ config CRAMFS
  
  	  If unsure, say N.
  
 +config SQUASHFS
-+	tristate "SquashFS 3.2 - Squashed file system support"
++	tristate "SquashFS 3.3 - Squashed file system support"
 +	select ZLIB_INFLATE
 +	help
-+	  Saying Y here includes support for SquashFS 3.2 (a Compressed Read-Only File
-+	  System).  Squashfs is a highly compressed read-only filesystem for Linux.
-+	  It uses zlib compression to compress both files, inodes and directories.
-+	  Inodes in the system are very small and all blocks are packed to minimise
-+	  data overhead. Block sizes greater than 4K are supported up to a maximum of 64K.
-+	  SquashFS 3.1 supports 64 bit filesystems and files (larger than 4GB), full
-+	  uid/gid information, hard links and timestamps.
-+
-+	  Squashfs is intended for general read-only filesystem use, for archival
-+	  use (i.e. in cases where a .tar.gz file may be used), and in embedded
-+	  systems where low overhead is needed.  Further information and filesystem tools
-+	  are available from http://squashfs.sourceforge.net.
++	  Saying Y here includes support for SquashFS 3.3 (a Compressed
++	  Read-Only File System).  Squashfs is a highly compressed read-only
++	  filesystem for Linux.  It uses zlib compression to compress both
++	  files, inodes and directories.  Inodes in the system are very small
++	  and all blocks are packed to minimise data overhead. Block sizes
++	  greater than 4K are supported up to a maximum of 1 Mbytes (default
++	  block size 128K).  SquashFS 3.3 supports 64 bit filesystems and files
++	  (larger than 4GB), full uid/gid information, hard links and timestamps.  
++
++	  Squashfs is intended for general read-only filesystem use, for
++	  archival use (i.e. in cases where a .tar.gz file may be used), and in
++	  embedded systems where low overhead is needed.  Further information
++	  and filesystem tools are available from http://squashfs.sourceforge.net.
 +
 +	  If you want to compile this as a module ( = code which can be
 +	  inserted in and removed from the running kernel whenever you want),
@@ -32,13 +34,11 @@
 +
 +config SQUASHFS_EMBEDDED
 +
-+	bool "Additional options for memory-constrained systems" 
++	bool "Additional option for memory-constrained systems" 
 +	depends on SQUASHFS
 +	default n
 +	help
-+	  Saying Y here allows you to specify cache sizes and how Squashfs
-+	  allocates memory.  This is only intended for memory constrained
-+	  systems.
++	  Saying Y here allows you to specify cache size.
 +
 +	  If unsure, say N.
 +
@@ -56,43 +56,45 @@
 +	  Note there must be at least one cached fragment.  Anything
 +	  much more than three will probably not make much difference.
 +
-+config SQUASHFS_VMALLOC
-+	bool "Use Vmalloc rather than Kmalloc" if SQUASHFS_EMBEDDED
-+	depends on SQUASHFS
-+	default n
-+	help
-+	  By default SquashFS uses kmalloc to obtain fragment cache memory.
-+	  Kmalloc memory is the standard kernel allocator, but it can fail
-+	  on memory constrained systems.  Because of the way Vmalloc works,
-+	  Vmalloc can succeed when kmalloc fails.  Specifying this option
-+	  will make SquashFS always use Vmalloc to allocate the
-+	  fragment cache memory.
-+
-+	  If unsure, say N.
-+
  config VXFS_FS
  	tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
  	depends on BLOCK
-diff -x .gitignore -Nurp linux-2.6.20/fs/Makefile linux-2.6.20-squashfs3.2-r2/fs/Makefile
---- linux-2.6.20/fs/Makefile	2006-12-25 01:13:12.000000000 +0000
-+++ linux-2.6.20-squashfs3.2-r2/fs/Makefile	2007-01-16 02:06:03.000000000 +0000
-@@ -68,6 +68,7 @@ obj-$(CONFIG_JBD)		+= jbd/
+diff --git a/fs/Makefile b/fs/Makefile
+index 1e7a11b..3faf857 100644
+--- a/fs/Makefile
++++ b/fs/Makefile
+@@ -73,6 +73,7 @@ obj-$(CONFIG_JBD)		+= jbd/
  obj-$(CONFIG_JBD2)		+= jbd2/
  obj-$(CONFIG_EXT2_FS)		+= ext2/
  obj-$(CONFIG_CRAMFS)		+= cramfs/
 +obj-$(CONFIG_SQUASHFS)		+= squashfs/
- obj-$(CONFIG_RAMFS)		+= ramfs/
+ obj-y				+= ramfs/
  obj-$(CONFIG_HUGETLBFS)		+= hugetlbfs/
  obj-$(CONFIG_CODA_FS)		+= coda/
-diff -x .gitignore -Nurp linux-2.6.20/fs/squashfs/inode.c linux-2.6.20-squashfs3.2-r2/fs/squashfs/inode.c
---- linux-2.6.20/fs/squashfs/inode.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.20-squashfs3.2-r2/fs/squashfs/inode.c	2007-01-16 02:28:36.000000000 +0000
-@@ -0,0 +1,2329 @@
+diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile
+new file mode 100644
+index 0000000..1bc7b06
+--- /dev/null
++++ b/fs/squashfs/Makefile
+@@ -0,0 +1,7 @@
++#
++# Makefile for the linux squashfs routines.
++#
++
++obj-$(CONFIG_SQUASHFS) += squashfs.o
++squashfs-y += inode.o
++squashfs-y += squashfs2_0.o
+diff --git a/fs/squashfs/inode.c b/fs/squashfs/inode.c
+new file mode 100644
+index 0000000..f578528
+--- /dev/null
++++ b/fs/squashfs/inode.c
+@@ -0,0 +1,2178 @@
 +/*
 + * Squashfs - a compressed read only filesystem for Linux
 + *
 + * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
-+ * Phillip Lougher <phillip at lougher.org.uk>
++ * Phillip Lougher <phillip at lougher.demon.co.uk>
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
@@ -121,10 +123,12 @@
 +#include <linux/vfs.h>
 +#include <linux/vmalloc.h>
 +#include <linux/smp_lock.h>
++#include <linux/exportfs.h>
 +
 +#include "squashfs.h"
 +
-+static void vfs_read_inode(struct inode *i);
++int squashfs_cached_blks;
++
 +static struct dentry *squashfs_get_parent(struct dentry *child);
 +static int squashfs_read_inode(struct inode *i, squashfs_inode_t inode);
 +static int squashfs_statfs(struct dentry *, struct kstatfs *);
@@ -133,7 +137,6 @@
 +				int readahead_blks, char *block_list,
 +				unsigned short **block_p, unsigned int *bsize);
 +static int squashfs_readpage(struct file *file, struct page *page);
-+static int squashfs_readpage4K(struct file *file, struct page *page);
 +static int squashfs_readdir(struct file *, void *, filldir_t);
 +static struct dentry *squashfs_lookup(struct inode *, struct dentry *,
 +				struct nameidata *);
@@ -171,7 +174,6 @@
 +	.destroy_inode = squashfs_destroy_inode,
 +	.statfs = squashfs_statfs,
 +	.put_super = squashfs_put_super,
-+	.read_inode = vfs_read_inode
 +};
 +
 +static struct export_operations squashfs_export_ops = {
@@ -186,10 +188,6 @@
 +	.readpage = squashfs_readpage
 +};
 +
-+SQSH_EXTERN const struct address_space_operations squashfs_aops_4K = {
-+	.readpage = squashfs_readpage4K
-+};
-+
 +static const struct file_operations squashfs_dir_ops = {
 +	.read = generic_read_dir,
 +	.readdir = squashfs_readdir
@@ -273,30 +271,36 @@
 +{
 +	struct squashfs_sb_info *msblk = s->s_fs_info;
 +	struct squashfs_super_block *sblk = &msblk->sblk;
-+	struct buffer_head *bh[((SQUASHFS_FILE_MAX_SIZE - 1) >>
-+			msblk->devblksize_log2) + 2];
++	struct buffer_head **bh;
 +	unsigned int offset = index & ((1 << msblk->devblksize_log2) - 1);
 +	unsigned int cur_index = index >> msblk->devblksize_log2;
 +	int bytes, avail_bytes, b = 0, k = 0;
 +	unsigned int compressed;
 +	unsigned int c_byte = length;
 +
++	bh = kmalloc(((sblk->block_size >> msblk->devblksize_log2) + 1) *
++								sizeof(struct buffer_head *), GFP_KERNEL);
++	if (bh == NULL)
++		goto read_failure;
++
 +	if (c_byte) {
[...2115 lines suppressed...]
-+#endif
-+
-+#ifdef CONFIG_SQUASHFS_2_0_COMPATIBILITY
-+extern int squashfs_2_0_supported(struct squashfs_sb_info *msblk);
-+#else
-+static inline int squashfs_2_0_supported(struct squashfs_sb_info *msblk)
-+{
-+	return 0;
-+}
-+#endif
-diff -x .gitignore -Nurp linux-2.6.20/include/linux/squashfs_fs.h linux-2.6.20-squashfs3.2-r2/include/linux/squashfs_fs.h
---- linux-2.6.20/include/linux/squashfs_fs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.20-squashfs3.2-r2/include/linux/squashfs_fs.h	2007-01-12 00:06:09.000000000 +0000
-@@ -0,0 +1,934 @@
+diff --git a/include/linux/squashfs_fs.h b/include/linux/squashfs_fs.h
+new file mode 100644
+index 0000000..e60308e
+--- /dev/null
++++ b/include/linux/squashfs_fs.h
+@@ -0,0 +1,935 @@
 +#ifndef SQUASHFS_FS
 +#define SQUASHFS_FS
 +
@@ -3276,7 +3119,7 @@
 + * Squashfs
 + *
 + * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
-+ * Phillip Lougher <phillip at lougher.org.uk>
++ * Phillip Lougher <phillip at lougher.demon.co.uk>
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
@@ -3299,16 +3142,9 @@
 +#define CONFIG_SQUASHFS_2_0_COMPATIBILITY
 +#endif
 +
-+#ifdef	CONFIG_SQUASHFS_VMALLOC
-+#define SQUASHFS_ALLOC(a)		vmalloc(a)
-+#define SQUASHFS_FREE(a)		vfree(a)
-+#else
-+#define SQUASHFS_ALLOC(a)		kmalloc(a, GFP_KERNEL)
-+#define SQUASHFS_FREE(a)		kfree(a)
-+#endif
 +#define SQUASHFS_CACHED_FRAGMENTS	CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE	
 +#define SQUASHFS_MAJOR			3
-+#define SQUASHFS_MINOR			0
++#define SQUASHFS_MINOR			1
 +#define SQUASHFS_MAGIC			0x73717368
 +#define SQUASHFS_MAGIC_SWAP		0x68737173
 +#define SQUASHFS_START			0
@@ -3318,10 +3154,10 @@
 +#define SQUASHFS_METADATA_LOG		13
 +
 +/* default size of data blocks */
-+#define SQUASHFS_FILE_SIZE		65536
-+#define SQUASHFS_FILE_LOG		16
++#define SQUASHFS_FILE_SIZE		131072
++#define SQUASHFS_FILE_LOG		17
 +
-+#define SQUASHFS_FILE_MAX_SIZE		65536
++#define SQUASHFS_FILE_MAX_SIZE		1048576
 +
 +/* Max number of uids and gids */
 +#define SQUASHFS_UIDS			256
@@ -3402,9 +3238,8 @@
 +
 +#define SQUASHFS_COMPRESSED_BIT_BLOCK		(1 << 24)
 +
-+#define SQUASHFS_COMPRESSED_SIZE_BLOCK(B)	(((B) & \
-+	~SQUASHFS_COMPRESSED_BIT_BLOCK) ? (B) & \
-+	~SQUASHFS_COMPRESSED_BIT_BLOCK : SQUASHFS_COMPRESSED_BIT_BLOCK)
++#define SQUASHFS_COMPRESSED_SIZE_BLOCK(B)	((B) & \
++	~SQUASHFS_COMPRESSED_BIT_BLOCK)
 +
 +#define SQUASHFS_COMPRESSED_BLOCK(B)	(!((B) & SQUASHFS_COMPRESSED_BIT_BLOCK))
 +
@@ -3900,6 +3735,15 @@
 +	unsigned int		start_block:24;
 +} __attribute__  ((packed));
 +
++union squashfs_inode_header_1 {
++	struct squashfs_base_inode_header_1	base;
++	struct squashfs_dev_inode_header_1	dev;
++	struct squashfs_symlink_inode_header_1	symlink;
++	struct squashfs_reg_inode_header_1	reg;
++	struct squashfs_dir_inode_header_1	dir;
++	struct squashfs_ipc_inode_header_1	ipc;
++};
++
 +#define SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, n) \
 +	SQUASHFS_MEMSET(s, d, n);\
 +	SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\
@@ -4203,9 +4047,11 @@
 +
 +#endif
 +#endif
-diff -x .gitignore -Nurp linux-2.6.20/include/linux/squashfs_fs_i.h linux-2.6.20-squashfs3.2-r2/include/linux/squashfs_fs_i.h
---- linux-2.6.20/include/linux/squashfs_fs_i.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.20-squashfs3.2-r2/include/linux/squashfs_fs_i.h	2007-01-12 00:06:09.000000000 +0000
+diff --git a/include/linux/squashfs_fs_i.h b/include/linux/squashfs_fs_i.h
+new file mode 100644
+index 0000000..76a3a5a
+--- /dev/null
++++ b/include/linux/squashfs_fs_i.h
 @@ -0,0 +1,45 @@
 +#ifndef SQUASHFS_FS_I
 +#define SQUASHFS_FS_I
@@ -4213,7 +4059,7 @@
 + * Squashfs
 + *
 + * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
-+ * Phillip Lougher <phillip at lougher.org.uk>
++ * Phillip Lougher <phillip at lougher.demon.co.uk>
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
@@ -4252,17 +4098,19 @@
 +	struct inode	vfs_inode;
 +};
 +#endif
-diff -x .gitignore -Nurp linux-2.6.20/include/linux/squashfs_fs_sb.h linux-2.6.20-squashfs3.2-r2/include/linux/squashfs_fs_sb.h
---- linux-2.6.20/include/linux/squashfs_fs_sb.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.20-squashfs3.2-r2/include/linux/squashfs_fs_sb.h	2007-01-12 01:23:47.000000000 +0000
-@@ -0,0 +1,74 @@
+diff --git a/include/linux/squashfs_fs_sb.h b/include/linux/squashfs_fs_sb.h
+new file mode 100644
+index 0000000..e5fa802
+--- /dev/null
++++ b/include/linux/squashfs_fs_sb.h
+@@ -0,0 +1,76 @@
 +#ifndef SQUASHFS_FS_SB
 +#define SQUASHFS_FS_SB
 +/*
 + * Squashfs
 + *
 + * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
-+ * Phillip Lougher <phillip at lougher.org.uk>
++ * Phillip Lougher <phillip at lougher.demon.co.uk>
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
@@ -4322,6 +4170,8 @@
 +	struct meta_index	*meta_index;
 +	z_stream		stream;
 +	long long		*inode_lookup_table;
++	int			unused_cache_blks;
++	int			unused_frag_blks;
 +	int			(*read_inode)(struct inode *i,  squashfs_inode_t \
 +				inode);
 +	long long		(*read_blocklist)(struct inode *inode, int \
@@ -4330,9 +4180,10 @@
 +	int			(*read_fragment_index_table)(struct super_block *s);
 +};
 +#endif
-diff -x .gitignore -Nurp linux-2.6.20/init/do_mounts_rd.c linux-2.6.20-squashfs3.2-r2/init/do_mounts_rd.c
---- linux-2.6.20/init/do_mounts_rd.c	2006-11-29 21:57:37.000000000 +0000
-+++ linux-2.6.20-squashfs3.2-r2/init/do_mounts_rd.c	2007-01-16 02:06:03.000000000 +0000
+diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
+index 3ac5904..0ddd43c 100644
+--- a/init/do_mounts_rd.c
++++ b/init/do_mounts_rd.c
 @@ -5,6 +5,7 @@
  #include <linux/ext2_fs.h>
  #include <linux/romfs_fs.h>
@@ -4341,7 +4192,7 @@
  #include <linux/initrd.h>
  #include <linux/string.h>
  
-@@ -39,6 +40,7 @@ static int __init crd_load(int in_fd, in
+@@ -39,6 +40,7 @@ static int __init crd_load(int in_fd, int out_fd);
   * numbers could not be found.
   *
   * We currently check for the following magic numbers:
@@ -4349,7 +4200,7 @@
   * 	minix
   * 	ext2
   *	romfs
-@@ -53,6 +55,7 @@ identify_ramdisk_image(int fd, int start
+@@ -53,6 +55,7 @@ identify_ramdisk_image(int fd, int start_block)
  	struct ext2_super_block *ext2sb;
  	struct romfs_super_block *romfsb;
  	struct cramfs_super *cramfsb;
@@ -4357,7 +4208,7 @@
  	int nblocks = -1;
  	unsigned char *buf;
  
-@@ -64,6 +67,7 @@ identify_ramdisk_image(int fd, int start
+@@ -64,6 +67,7 @@ identify_ramdisk_image(int fd, int start_block)
  	ext2sb = (struct ext2_super_block *) buf;
  	romfsb = (struct romfs_super_block *) buf;
  	cramfsb = (struct cramfs_super *) buf;
@@ -4365,7 +4216,7 @@
  	memset(buf, 0xe5, size);
  
  	/*
-@@ -101,6 +105,18 @@ identify_ramdisk_image(int fd, int start
+@@ -101,6 +105,18 @@ identify_ramdisk_image(int fd, int start_block)
  		goto done;
  	}
  

linux-2.6-utrace-core.patch:

Index: linux-2.6-utrace-core.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-core.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-core.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-core.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -19,42 +19,38 @@
 
 ---
 
+ kernel/Makefile                   |    1 
+ kernel/utrace.c                   | 2383 +++++++++++++++++++++++++++++++++++++
+ Documentation/utrace.txt          |  579 +++++++++
  Documentation/DocBook/Makefile    |    2 
  Documentation/DocBook/utrace.tmpl |   23 
- Documentation/utrace.txt          |  579 ++++++++++
- include/linux/sched.h             |    5 
  include/linux/tracehook.h         |   85 +
- include/linux/utrace.h            |  544 +++++++++
+ include/linux/utrace.h            |  544 ++++++++
+ include/linux/sched.h             |    5 
  init/Kconfig                      |   18 
- kernel/Makefile                   |    1 
- kernel/utrace.c                   | 2141 ++++++++++++++++++++++++++++++++++++++
- 9 files changed, 3380 insertions(+), 18 deletions(-)
+ 9 files changed, 3622 insertions(+), 18 deletions(-)
  create kernel/utrace.c
  create Documentation/utrace.txt
  create Documentation/DocBook/utrace.tmpl
  create include/linux/utrace.h
 
-Index: b/kernel/Makefile
-===================================================================
---- a/kernel/Makefile
-+++ b/kernel/Makefile
-@@ -51,6 +51,7 @@ obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
- obj-$(CONFIG_UTS_NS) += utsname.o
+--- linux-2.6/kernel/Makefile
++++ linux-2.6/kernel/Makefile
+@@ -57,6 +57,7 @@ obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
  obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
  obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
+ obj-$(CONFIG_MARKERS) += marker.o
 +obj-$(CONFIG_UTRACE) += utrace.o
  
  ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
  # According to Alan Modra <alan at linuxcare.com.au>, the -fno-omit-frame-pointer is
-Index: b/kernel/utrace.c
-===================================================================
---- /dev/null
-+++ b/kernel/utrace.c
-@@ -0,0 +1,2141 @@
+--- linux-2.6/kernel/utrace.c
++++ linux-2.6/kernel/utrace.c
+@@ -0,0 +1,2383 @@
 +/*
 + * utrace infrastructure interface for debugging user processes
 + *
-+ * Copyright (C) 2006, 2007 Red Hat, Inc.  All rights reserved.
++ * Copyright (C) 2006, 2007, 2008 Red Hat, Inc.  All rights reserved.
 + *
 + * This copyrighted material is made available to anyone wishing to use,
 + * modify, copy, or redistribute it subject to the terms and conditions
@@ -125,11 +121,11 @@
 +	utrace_cachep =
 +		kmem_cache_create("utrace_cache",
 +				  sizeof(struct utrace), 0,
-+				  SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
++				  SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
 +	utrace_engine_cachep =
 +		kmem_cache_create("utrace_engine_cache",
 +				  sizeof(struct utrace_attached_engine), 0,
-+				  SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
++				  SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
 +	return 0;
 +}
 +subsys_initcall(utrace_init);
@@ -154,12 +150,13 @@
 +	 * to attach.  The PF_STARTING flag is cleared after its
 +	 * report_clone hook has had a chance to run.
 +	 */
-+	if ((target->flags & PF_STARTING)
-+	    && (current->utrace == NULL
-+		|| current->utrace->u.live.cloning != target)) {
-+		yield();
-+		return (signal_pending(current)
-+			? ERR_PTR(-ERESTARTNOINTR) : NULL);
++	if (target->flags & PF_STARTING) {
++		utrace = current->utrace;
++		if (utrace == NULL || utrace->u.live.cloning != target) {
++			yield();
++			return (signal_pending(current)
++				? ERR_PTR(-ERESTARTNOINTR) : NULL);
++		}
 +	}
 +
 +	utrace = kmem_cache_alloc(utrace_cachep, GFP_KERNEL);
@@ -359,7 +356,18 @@
 +			 * which will call release_task itself.
 +			 */
 +			read_unlock(&tasklist_lock);
++	}
 +
++	/*
++	 * When it's in TASK_STOPPED state, do not set UTRACE_EVENT(JCTL).
++	 * That bit indicates utrace_report_jctl has not run yet, but it
++	 * may have.  Set UTRACE_ACTION_QUIESCE instead to be sure that
++	 * once it resumes it will recompute its flags in utrace_quiescent.
++	 */
++	if (((flags &~ tsk->utrace_flags) & UTRACE_EVENT(JCTL))
++	    && tsk->state == TASK_STOPPED) {
++		flags &= ~UTRACE_EVENT(JCTL);
++		flags |= UTRACE_ACTION_QUIESCE;
 +	}
 +
 +	tsk->utrace_flags = flags;
@@ -405,7 +413,7 @@
 +static int
 +quiesce(struct task_struct *target, int interrupt)
 +{
-+	int quiescent;
++	int ret;
 +
 +	target->utrace_flags |= UTRACE_ACTION_QUIESCE;
 +	read_barrier_depends();
@@ -413,27 +421,62 @@
 +	if (target->exit_state)
 +		goto dead;
 +
-+	quiescent = target->state & (TASK_TRACED | TASK_STOPPED);
-+	if (!quiescent) {
++	/*
++	 * First a quick check without the siglock.  If it's in TASK_TRACED
++	 * or TASK_STOPPED already, we know it is going to go through
++	 * utrace_get_signal before it resumes.
++	 */
++	ret = 1;
++	switch (target->state) {
++	case TASK_TRACED:
++		break;
++
++	case TASK_STOPPED:
++		/*
++		 * If it will call utrace_report_jctl but has not gotten
++		 * through it yet, then don't consider it quiescent yet.
++		 * utrace_report_jctl will take target->utrace->lock and
++		 * clear UTRACE_EVENT(JCTL) once it finishes.  After that,
++		 * it is considered quiescent; when it wakes up, it will go
++		 * through utrace_get_signal before doing anything else.
++		 */
++		if (!(target->utrace_flags & UTRACE_EVENT(JCTL)))
++			break;
++
++	default:
++		/*
++		 * Now get the siglock and check again.
++		 */
 +		spin_lock_irq(&target->sighand->siglock);
 +		if (unlikely(target->exit_state)) {
 +			spin_unlock_irq(&target->sighand->siglock);
 +			goto dead;
 +		}
-+		quiescent = unlikely(target->state
-+				     & (TASK_TRACED | TASK_STOPPED));
-+		if (!quiescent) {
++		switch (target->state) {
++		case TASK_TRACED:
++			break;
++
++		case TASK_STOPPED:
++			ret = !(target->utrace_flags & UTRACE_EVENT(JCTL));
++			break;
++
++		default:
++			/*
++			 * It is not stopped, so tell it to stop soon.
++			 */
++			ret = 0;
 +			if (interrupt)
 +				signal_wake_up(target, 0);
 +			else {
 +				set_tsk_thread_flag(target, TIF_SIGPENDING);
 +				kick_process(target);
 +			}
++			break;
 +		}
 +		spin_unlock_irq(&target->sighand->siglock);
 +	}
 +
-+	return quiescent;
++	return ret;
 +
 +dead:
 +	/*
@@ -479,7 +522,7 @@
 + */
 +struct utrace_attached_engine *
 +utrace_attach(struct task_struct *target, int flags,
-+	     const struct utrace_engine_ops *ops, void *data)
++	      const struct utrace_engine_ops *ops, void *data)
 +{
 +	struct utrace *utrace;
 +	struct utrace_attached_engine *engine;
@@ -494,6 +537,8 @@
 +		 * Check this first; a race with reaping may lead to restart.
 +		 */
 +		rcu_read_unlock();
++		if (!(flags & UTRACE_ATTACH_CREATE))
++			return ERR_PTR(-ENOENT);
 +		return ERR_PTR(-ESRCH);
 +	}
 +
@@ -579,10 +624,13 @@
 +EXPORT_SYMBOL_GPL(utrace_attach);
 +
 +/*
-+ * When an engine is detached, the target thread may still see it and make
-+ * callbacks until it quiesces.  We reset its event flags to just QUIESCE
-+ * and install a special ops vector whose callback is dead_engine_delete.
-+ * When the target thread quiesces, it can safely free the engine itself.
++ * When an engine is detached, the target thread may still see it
++ * and make callbacks until it quiesces.  We install a special ops
++ * vector whose callbacks are all dead_engine_delete.  When the
++ * target thread quiesces, it can safely free the engine itself.
++ * We must cover all callbacks in case of races between checking
++ * engine->flags and utrace_detach changing engine->ops.
++ * Only report_reap is never called due to a special case in utrace_reap.
 + */
 +static u32
 +dead_engine_delete(struct utrace_attached_engine *engine,
@@ -591,9 +639,38 @@
 +	return UTRACE_ACTION_DETACH;
 +}
 +
++/*
++ * Don't use .report_xxx = ... style here because this way makes it easier
++ * to be sure we're forced to have an initializer here for every member.
++ */
 +static const struct utrace_engine_ops dead_engine_ops =
 +{
-+	.report_quiesce = &dead_engine_delete
++	(u32 (*)(struct utrace_attached_engine *, struct task_struct *,
++		 unsigned long, struct task_struct *)) &dead_engine_delete,
++	(u32 (*)(struct utrace_attached_engine *, struct task_struct *,
++		 pid_t)) &dead_engine_delete,
++	&dead_engine_delete,
++	(u32 (*)(struct utrace_attached_engine *, struct task_struct *,
++		 struct pt_regs *, u32, siginfo_t *,
++		 const struct k_sigaction *, struct k_sigaction *))
++	&dead_engine_delete,
++	(u32 (*)(struct utrace_attached_engine *, struct task_struct *,
++		 int)) &dead_engine_delete,
++	(u32 (*)(struct utrace_attached_engine *, struct task_struct *,
++		 const struct linux_binprm *, struct pt_regs *))
++	&dead_engine_delete,
++	(u32 (*)(struct utrace_attached_engine *, struct task_struct *,
++		 struct pt_regs *)) &dead_engine_delete,
++	(u32 (*)(struct utrace_attached_engine *, struct task_struct *,
++		 struct pt_regs *)) &dead_engine_delete,
++	(u32 (*)(struct utrace_attached_engine *, struct task_struct *,
++		 long, long *)) &dead_engine_delete,
++	(u32 (*)(struct utrace_attached_engine *, struct task_struct *))
++	&dead_engine_delete,
++	NULL,			/* report_reap */
++	NULL,			/* allow_access_process_vm */
++	NULL,			/* unsafe_exec */
++	NULL,			/* tracer_task */
 +};
 +
 +
@@ -799,9 +876,32 @@
 +		return ret;
 +	}
 +
-+	flags = engine->flags;
-+	engine->flags = UTRACE_EVENT(QUIESCE) | UTRACE_ACTION_QUIESCE;
++	/*
++	 * This must work while the target thread races with us doing:
++	 *	if (engine->flags & UTRACE_EVENT(x)) REPORT(x, ...);
++	 * The REPORT macro uses smp_rmb() between checking engine->flags
++	 * and using engine->ops.  Here we change engine->ops first, then
++	 * use smp_wmb() before changing engine->flags.  This ensures it
++	 * can check the old flags before using the old ops, or check the
++	 * old flags before using the new ops, or check the new flags
++	 * before using the new ops, but can never check the new flags
++	 * before using the old ops.  Hence, dead_engine_ops might be used
++	 * with any old flags in place.  So, it has report_* callback
++	 * pointers for every event type.  Since it has to have those
++	 * anyway, we enable (for after any potential race) all the events
++	 * that have no overhead to enable.  We want it to get into that
++	 * callback and complete the detach ASAP.
++	 */
 +	rcu_assign_pointer(engine->ops, &dead_engine_ops);
++	smp_wmb();
++	flags = engine->flags;
++	engine->flags = (UTRACE_EVENT(QUIESCE)
++			 | UTRACE_EVENT(CLONE)
++			 | UTRACE_EVENT(VFORK_DONE)
++			 | UTRACE_EVENT(EXEC)
++			 | UTRACE_EVENT(EXIT)
++			 | UTRACE_EVENT(JCTL)
++			 | UTRACE_ACTION_QUIESCE);
 +
 +	if (quiesce(target, 1)) {
 +		remove_engine(engine, target, utrace);
@@ -926,7 +1026,7 @@
 +{
 +	struct utrace *utrace;
 +	int report;
-+	unsigned long old_flags, old_utrace_flags;
++	unsigned long old_flags, old_utrace_flags, set_utrace_flags;
 +	int ret = -EALREADY;
 +
 +#ifdef ARCH_HAS_SINGLE_STEP
@@ -960,6 +1060,22 @@
 +	}
 +
 +	/*
++	 * When it's in TASK_STOPPED state, do not set UTRACE_EVENT(JCTL).
++	 * That bit indicates utrace_report_jctl has not run yet and so the
++	 * target cannot be considered quiescent.  But if the bit wasn't
++	 * already set, it can't be in running in there and really is
++	 * quiescent now in its existing job control stop.  We set
++	 * UTRACE_ACTION_QUIESCE to be sure that once it resumes it will
++	 * recompute its flags in utrace_quiescent.
++	 */
++	set_utrace_flags = flags;
++	if (((set_utrace_flags &~ old_utrace_flags) & UTRACE_EVENT(JCTL))
++	    && target->state == TASK_STOPPED) {
++		set_utrace_flags &= ~UTRACE_EVENT(JCTL);
++		set_utrace_flags |= UTRACE_ACTION_QUIESCE;
++	}
++
++	/*
 +	 * When setting these flags, it's essential that we really
 +	 * synchronize with exit_notify.  They cannot be set after
 +	 * exit_notify takes the tasklist_lock.  By holding the read
@@ -969,20 +1085,20 @@
 +	 * knows positively that utrace_report_death will be called or
 +	 * that it won't.
 +	 */
-+	if ((flags &~ old_utrace_flags) & (UTRACE_ACTION_NOREAP
-+					   | DEATH_EVENTS)) {
++	if ((set_utrace_flags &~ old_utrace_flags) & (UTRACE_ACTION_NOREAP
++						      | DEATH_EVENTS)) {
 +		read_lock(&tasklist_lock);
 +		if (unlikely(target->exit_state)) {
 +			read_unlock(&tasklist_lock);
 +			spin_unlock(&utrace->lock);
 +			return ret;
 +		}
-+		target->utrace_flags |= flags;
++		target->utrace_flags |= set_utrace_flags;
 +		read_unlock(&tasklist_lock);
 +	}
 +
 +	engine->flags = flags;
-+	target->utrace_flags |= flags;
++	target->utrace_flags |= set_utrace_flags;
 +	ret = 0;
 +
 +	report = 0;
@@ -1104,10 +1220,20 @@
 +	return ret;
 +}
 +
-+#define REPORT(callback, ...) do { \
-+	u32 ret = (*rcu_dereference(engine->ops)->callback) \
-+		(engine, tsk, ##__VA_ARGS__); \
-+	action = update_action(tsk, utrace, engine, ret); \
++/*
++ * This macro is always used after checking engine->flags.
++ * The smp_rmb() here pairs with smp_wmb() in utrace_detach.
++ * engine->ops changes before engine->flags, so the flags we
++ * just tested properly enabled this report for the real ops,
++ * or harmlessly enabled it for dead_engine_ops.
++ */
++#define REPORT(callback, ...)						\
++	do {								\
++		u32 ret;						\
++		smp_rmb();						\
++		ret = (*rcu_dereference(engine->ops)->callback)		\
++			(engine, tsk, ##__VA_ARGS__);			\
++		action = update_action(tsk, utrace, engine, ret);	\
 +	} while (0)
 +
 +
@@ -1145,9 +1271,11 @@
 +		 * This must be current to be sure it's not possibly
 +		 * getting into utrace_report_death.
 +		 */
++		struct utrace *utrace;
 +		BUG_ON(tsk != current);
-+		spin_lock(&tsk->utrace->lock);
-+		action = remove_detached(tsk, tsk->utrace, action, ~0UL);
++		utrace = tsk->utrace;
++		spin_lock(&utrace->lock);
++		action = remove_detached(tsk, utrace, action, ~0UL);
 +	}
 +	return action;
 +}
@@ -1251,6 +1379,18 @@
 +		spin_unlock_irq(&tsk->sighand->siglock);
 +	}
 +
++	/*
++	 * We clear the UTRACE_EVENT(JCTL) bit to indicate that we are now
++	 * in a truly quiescent TASK_STOPPED state.  After this, we can be
++	 * detached by another thread.  Setting UTRACE_ACTION_QUIESCE
++	 * ensures that we will go through utrace_quiescent and recompute
++	 * flags after we resume.
++	 */
++	spin_lock(&utrace->lock);
++	tsk->utrace_flags &= ~UTRACE_EVENT(JCTL);
++	tsk->utrace_flags |= UTRACE_ACTION_QUIESCE;
++	spin_unlock(&utrace->lock);
++
 +	return action & UTRACE_JCTL_NOSIGCHLD;
 +}
 +
@@ -1294,6 +1434,7 @@
 +	 */
 +	if (action & UTRACE_ACTION_QUIESCE) {
 +		int killed;
++		int stop;
 +
 +		if (signal != NULL) {
 +			BUG_ON(utrace->u.live.signal != NULL);
@@ -1310,7 +1451,8 @@
 +		 * Never stop when there is a SIGKILL bringing us down.
 +		 */
 +		killed = sigkill_pending(tsk);
-+		if (!killed && (tsk->utrace_flags & UTRACE_ACTION_QUIESCE)) {
++		stop = !killed && (tsk->utrace_flags & UTRACE_ACTION_QUIESCE);
++		if (likely(stop)) {
 +			set_current_state(TASK_TRACED);
 +			/*
 +			 * If there is a group stop in progress,
@@ -1332,10 +1474,32 @@
 +			 */
 +			BUG_ON(tsk->utrace != utrace);
 +			BUG_ON(utrace->u.live.signal != signal);
++
++			if (likely(stop)) {
++				/*
++				 * Synchronize with any utrace_detach
++				 * that might be in progress.  We were
++				 * just now quiescent in TASK_TRACED,
++				 * and it expected us to stay there.
++				 * But SIGKILL might have broken that.
++				 * Taking this lock here serializes its
++				 * work so that if it had the lock and
++				 * thought we were still in TASK_TRACED,
++				 * we block until it has finished
++				 * looking at utrace.  A utrace_detach
++				 * that gets the lock after we release
++				 * it here will not think we are
++				 * quiescent at all, since we are in
++				 * TASK_RUNNING state now.
++				 */
++				spin_lock(&utrace->lock);
++				spin_unlock(&utrace->lock);
++			}
++
 +			utrace->u.live.signal = NULL;
 +		}
 +
-+		if (killed)	/* Game over, man!  */
++		if (unlikely(killed)) /* Game over, man!  */
 +			return 1;
 +
 +		/*
@@ -1630,6 +1794,7 @@
 +	struct list_head *pos, *next;
 +	struct utrace_attached_engine *engine;
 +	unsigned long action, ev;
++	int killed;
 +
 +/*
 +  XXX pass syscall # to engine hook directly, let it return inhibit-action
@@ -1653,12 +1818,32 @@
 +			break;
 +	}
 +	action = check_detach(tsk, action);
-+	if (unlikely(check_quiescent(tsk, action)) && !is_exit)
++	killed = check_quiescent(tsk, action);
++
++	if (!is_exit) {
++		if (unlikely(killed))
++			/*
++			 * We are continuing despite QUIESCE because of a
++			 * SIGKILL.  Don't let the system call actually
++			 * proceed.
++			 */
++			tracehook_abort_syscall(regs);
++
 +		/*
-+		 * We are continuing despite QUIESCE because of a SIGKILL.
-+		 * Don't let the system call actually proceed.
++		 * Clear TIF_SIGPENDING if it no longer needs to be set.
++		 * It may have been set as part of quiescence, and won't
++		 * ever have been cleared by another thread.  For other
++		 * reports, we can just leave it set and will go through
++		 * utrace_get_signal to reset things.  But here we are
++		 * about to enter a syscall, which might bail out with an
++		 * -ERESTART* error if it's set now.
 +		 */
-+		tracehook_abort_syscall(regs);
++		if (signal_pending(tsk)) {
++			spin_lock_irq(&tsk->sighand->siglock);
++			recalc_sigpending();
++			spin_unlock_irq(&tsk->sighand->siglock);
++		}
++	}
 +}
 +
 +
@@ -1726,12 +1911,50 @@
 +	__releases(tsk->sighand->siglock)
 +	__acquires(tsk->sighand->siglock)
 +{
-+	struct utrace *utrace = tsk->utrace;
++	struct utrace *utrace;
 +	struct utrace_signal signal = { info, return_ka, 0 };
 +	struct k_sigaction *ka;
 +	unsigned long action, event;
 +
 +	/*
++	 * We could have been considered quiescent while we were in
++	 * TASK_STOPPED, and detached asynchronously.  If we woke up
++	 * and checked tsk->utrace_flags before that was finished,
++	 * we might be here with utrace already removed or in the
++	 * middle of being removed.
++	 */
++	rcu_read_lock();
++	utrace = rcu_dereference(tsk->utrace);
++	if (unlikely(utrace == NULL)) {
++		rcu_read_unlock();
++		return 0;
++	}
++	if (!(tsk->utrace_flags & UTRACE_EVENT(JCTL))) {
++		/*
++		 * It's possible we might have just been in TASK_STOPPED
++		 * and subject to the aforementioned race.
++		 *
++		 * RCU makes it safe to get the utrace->lock even if it's
++		 * being freed.  Once we have that lock, either an external
++		 * detach has finished and this struct has been freed, or
++		 * else we know we are excluding any other detach attempt.
++		 * Since we are no longer in TASK_STOPPED now, all we
++		 * needed the lock for was to order any quiesce() call after us.
++		 */
++		spin_unlock_irq(&tsk->sighand->siglock);
++		spin_lock(&utrace->lock);
++		if (unlikely(tsk->utrace != utrace)) {
++			spin_unlock(&utrace->lock);
++			rcu_read_unlock();
++			cond_resched();
++			return -1;
++		}
++		spin_unlock(&utrace->lock);
++		spin_lock_irq(&tsk->sighand->siglock);
++	}
++	rcu_read_unlock();
++
++	/*
 +	 * If a signal was injected previously, it could not use our
 +	 * stack space directly.  It had to allocate a data structure,
 +	 * which we can now copy out of and free.
@@ -1805,13 +2028,28 @@
 +	 */
 +	if (signal.signr != 0) {
 +		if (signal.return_ka == NULL) {
-+			ka = &tsk->sighand->action[signal.signr - 1];
++			/*
++			 * utrace_inject_signal recorded this to have us
++			 * use the injected signal's normal sigaction.  We
++			 * have to perform the SA_ONESHOT work now because
++			 * our caller will never touch the real sigaction.
++			 */
++			ka = &tsk->sighand->action[info->si_signo - 1];
++			*return_ka = *ka;
 +			if (ka->sa.sa_flags & SA_ONESHOT)
 +				ka->sa.sa_handler = SIG_DFL;
-+			*return_ka = *ka;
 +		}
 +		else
 +			BUG_ON(signal.return_ka != return_ka);
++
++		/*
++		 * We already processed the SA_ONESHOT work ahead of time.
++		 * Once we return nonzero, our caller will only refer to
++		 * return_ka.  So we must clear the flag to be sure it
++		 * doesn't clear return_ka->sa.sa_handler.
++		 */
++		return_ka->sa.sa_flags &= ~SA_ONESHOT;
++
 +		return signal.signr;
 +	}
 +
@@ -2192,10 +2430,8 @@
 +
 +	return unsafe;
 +}
-Index: b/Documentation/utrace.txt
-===================================================================
---- /dev/null
-+++ b/Documentation/utrace.txt
+--- linux-2.6/Documentation/utrace.txt
++++ linux-2.6/Documentation/utrace.txt
 @@ -0,0 +1,579 @@
 +DRAFT DRAFT DRAFT	WORK IN PROGRESS	DRAFT DRAFT DRAFT
 +
@@ -2776,10 +3012,8 @@
 +sure which event callbacks it will or won't see after utrace_set_flags
 +has returned.  By checking for errors, it can know whether to clean up
 +its data structures immediately or to let its callbacks do the work.
-Index: b/Documentation/DocBook/Makefile
-===================================================================
---- a/Documentation/DocBook/Makefile
-+++ b/Documentation/DocBook/Makefile
+--- linux-2.6/Documentation/DocBook/Makefile
++++ linux-2.6/Documentation/DocBook/Makefile
 @@ -9,7 +9,7 @@
  DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
  	    kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
@@ -2787,12 +3021,10 @@
 -	    kernel-api.xml filesystems.xml lsm.xml usb.xml \
 +	    kernel-api.xml filesystems.xml lsm.xml utrace.xml usb.xml \
  	    gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
- 	    genericirq.xml
+ 	    genericirq.xml s390-drivers.xml uio-howto.xml
  
-Index: b/Documentation/DocBook/utrace.tmpl
-===================================================================
---- /dev/null
-+++ b/Documentation/DocBook/utrace.tmpl
+--- linux-2.6/Documentation/DocBook/utrace.tmpl
++++ linux-2.6/Documentation/DocBook/utrace.tmpl
 @@ -0,0 +1,23 @@
 +<?xml version="1.0" encoding="UTF-8"?>
 +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
@@ -2817,10 +3049,8 @@
 +    </chapter>
 +
 +</book>
-Index: b/include/linux/tracehook.h
-===================================================================
---- a/include/linux/tracehook.h
-+++ b/include/linux/tracehook.h
+--- linux-2.6/include/linux/tracehook.h
++++ linux-2.6/include/linux/tracehook.h
 @@ -28,6 +28,7 @@
  
  #include <linux/sched.h>
@@ -2829,7 +3059,7 @@
  struct linux_binprm;
  struct pt_regs;
  
-@@ -342,6 +343,7 @@ utrace_regset_copyin_ignore(unsigned int
+@@ -353,6 +354,7 @@ utrace_regset_copyin_ignore(unsigned int
   */
  static inline void tracehook_init_task(struct task_struct *child)
  {
@@ -2837,7 +3067,7 @@
  }
  
  /*
-@@ -350,6 +352,9 @@ static inline void tracehook_init_task(s
+@@ -361,6 +363,9 @@ static inline void tracehook_init_task(s
   */
  static inline void tracehook_release_task(struct task_struct *p)
  {
@@ -2847,7 +3077,7 @@
  }
  
  /*
-@@ -360,7 +365,20 @@ static inline void tracehook_release_tas
+@@ -370,7 +375,20 @@ static inline void tracehook_release_tas
   */
  static inline int tracehook_check_released(struct task_struct *p)
  {
@@ -2869,7 +3099,7 @@
  }
  
  /*
-@@ -371,7 +389,7 @@ static inline int tracehook_check_releas
+@@ -381,7 +399,7 @@ static inline int tracehook_check_releas
  static inline int tracehook_notify_cldstop(struct task_struct *tsk,
  					   const siginfo_t *info)
  {
@@ -2878,7 +3108,7 @@
  }
  
  /*
-@@ -385,7 +403,11 @@ static inline int tracehook_notify_cldst
+@@ -395,7 +413,11 @@ static inline int tracehook_notify_cldst
  static inline int tracehook_notify_death(struct task_struct *tsk,
  					 int *noreap, void **death_cookie)
  {
@@ -2891,7 +3121,7 @@
  	*noreap = 0;
  	return 0;
  }
-@@ -398,7 +420,8 @@ static inline int tracehook_notify_death
+@@ -408,7 +430,8 @@ static inline int tracehook_notify_death
  static inline int tracehook_consider_fatal_signal(struct task_struct *tsk,
  						  int sig)
  {
@@ -2901,7 +3131,7 @@
  }
  
  /*
-@@ -411,7 +434,7 @@ static inline int tracehook_consider_ign
+@@ -421,7 +444,7 @@ static inline int tracehook_consider_ign
  						    int sig,
  						    void __user *handler)
  {
@@ -2910,7 +3140,7 @@
  }
  
  
-@@ -422,7 +445,7 @@ static inline int tracehook_consider_ign
+@@ -432,7 +455,7 @@ static inline int tracehook_consider_ign
   */
  static inline int tracehook_induce_sigpending(struct task_struct *tsk)
  {
@@ -2919,7 +3149,7 @@
  }
  
  /*
-@@ -437,6 +460,8 @@ static inline int tracehook_get_signal(s
+@@ -447,6 +470,8 @@ static inline int tracehook_get_signal(s
  				       siginfo_t *info,
  				       struct k_sigaction *return_ka)
  {
@@ -2928,7 +3158,7 @@
  	return 0;
  }
  
-@@ -449,6 +474,8 @@ static inline int tracehook_get_signal(s
+@@ -459,6 +484,8 @@ static inline int tracehook_get_signal(s
   */
  static inline int tracehook_finish_stop(int last_one)
  {
@@ -2937,7 +3167,7 @@
  	return 0;
  }
  
-@@ -460,7 +487,7 @@ static inline int tracehook_finish_stop(
+@@ -470,7 +497,7 @@ static inline int tracehook_finish_stop(
   */
  static inline int tracehook_inhibit_wait_stopped(struct task_struct *child)
  {
@@ -2946,7 +3176,7 @@
  }
  
  /*
-@@ -470,7 +497,7 @@ static inline int tracehook_inhibit_wait
+@@ -480,7 +507,7 @@ static inline int tracehook_inhibit_wait
   */
  static inline int tracehook_inhibit_wait_zombie(struct task_struct *child)
  {
@@ -2955,7 +3185,7 @@
  }
  
  /*
-@@ -480,7 +507,7 @@ static inline int tracehook_inhibit_wait
+@@ -490,7 +517,7 @@ static inline int tracehook_inhibit_wait
   */
  static inline int tracehook_inhibit_wait_continued(struct task_struct *child)
  {
@@ -2964,7 +3194,7 @@
  }
  
  
-@@ -490,13 +517,9 @@ static inline int tracehook_inhibit_wait
+@@ -500,13 +527,9 @@ static inline int tracehook_inhibit_wait
   */
  static inline int tracehook_unsafe_exec(struct task_struct *tsk)
  {
@@ -2980,7 +3210,7 @@
  }
  
  /*
-@@ -511,6 +534,8 @@ static inline int tracehook_unsafe_exec(
+@@ -521,6 +544,8 @@ static inline int tracehook_unsafe_exec(
   */
  static inline struct task_struct *tracehook_tracer_task(struct task_struct *p)
  {
@@ -2989,7 +3219,7 @@
  	return NULL;
  }
  
-@@ -522,6 +547,8 @@ static inline int tracehook_allow_access
+@@ -532,6 +557,8 @@ static inline int tracehook_allow_access
  {
  	if (tsk == current)
  		return 1;
@@ -2998,7 +3228,7 @@
  	return 0;
  }
  
-@@ -533,7 +560,7 @@ static inline int tracehook_allow_access
+@@ -543,7 +570,7 @@ static inline int tracehook_allow_access
   */
  static inline int tracehook_expect_breakpoints(struct task_struct *tsk)
  {
@@ -3007,18 +3237,18 @@
  }
  
  
-@@ -556,6 +583,10 @@ static inline int tracehook_expect_break
+@@ -566,6 +593,10 @@ static inline int tracehook_expect_break
  static inline void tracehook_report_death(struct task_struct *tsk,
  					  int exit_state, void *death_cookie)
  {
 +	smp_mb();
 +	if (tsk_utrace_flags(tsk) & (UTRACE_EVENT(DEATH)
-+				     | UTRACE_ACTION_QUIESCE))
++				     | UTRACE_EVENT(QUIESCE)))
 +		utrace_report_death(tsk, death_cookie);
  }
  
  /*
-@@ -565,14 +596,18 @@ static inline void tracehook_report_deat
+@@ -575,14 +606,18 @@ static inline void tracehook_report_deat
   */
  static inline void tracehook_report_delayed_group_leader(struct task_struct *p)
  {
@@ -3038,7 +3268,7 @@
  }
  
  /*
-@@ -581,6 +616,8 @@ static inline void tracehook_report_exec
+@@ -591,6 +626,8 @@ static inline void tracehook_report_exec
   */
  static inline void tracehook_report_exit(long *exit_code)
  {
@@ -3047,7 +3277,7 @@
  }
  
  /*
-@@ -595,6 +632,8 @@ static inline void tracehook_report_exit
+@@ -605,6 +642,8 @@ static inline void tracehook_report_exit
  static inline void tracehook_report_clone(unsigned long clone_flags,
  					  struct task_struct *child)
  {
@@ -3056,7 +3286,7 @@
  }
  
  /*
-@@ -608,6 +647,8 @@ static inline void tracehook_report_clon
+@@ -618,6 +657,8 @@ static inline void tracehook_report_clon
  						   pid_t pid,
  						   struct task_struct *child)
  {
@@ -3065,7 +3295,7 @@
  }
  
  /*
-@@ -619,6 +660,8 @@ static inline void tracehook_report_clon
+@@ -629,6 +670,8 @@ static inline void tracehook_report_clon
  static inline void tracehook_report_vfork_done(struct task_struct *child,
  					       pid_t child_pid)
  {
@@ -3074,7 +3304,7 @@
  }
  
  /*
-@@ -626,6 +669,9 @@ static inline void tracehook_report_vfor
+@@ -636,6 +679,9 @@ static inline void tracehook_report_vfor
   */
  static inline void tracehook_report_syscall(struct pt_regs *regs, int is_exit)
  {
@@ -3084,7 +3314,7 @@
  }
  
  /*
-@@ -645,6 +691,11 @@ static inline void tracehook_report_hand
+@@ -655,6 +701,11 @@ static inline void tracehook_report_hand
  						  const sigset_t *oldset,
  						  struct pt_regs *regs)
  {
@@ -3096,10 +3326,8 @@
  }
  
  
-Index: b/include/linux/utrace.h
-===================================================================
---- /dev/null
-+++ b/include/linux/utrace.h
+--- linux-2.6/include/linux/utrace.h
++++ linux-2.6/include/linux/utrace.h
 @@ -0,0 +1,544 @@
 +/*
 + * utrace infrastructure interface for debugging user processes
@@ -3645,11 +3873,9 @@
 +#endif  /* CONFIG_UTRACE */
 +
 +#endif	/* linux/utrace.h */
-Index: b/include/linux/sched.h
-===================================================================
---- a/include/linux/sched.h
-+++ b/include/linux/sched.h
-@@ -941,6 +941,11 @@ struct task_struct {
+--- linux-2.6/include/linux/sched.h
++++ linux-2.6/include/linux/sched.h
+@@ -1064,6 +1064,11 @@ struct task_struct {
  	struct audit_context *audit_context;
  	seccomp_t seccomp;
  
@@ -3661,14 +3887,13 @@
  /* Thread group tracking */
     	u32 parent_exec_id;
     	u32 self_exec_id;
-Index: b/init/Kconfig
-===================================================================
---- a/init/Kconfig
-+++ b/init/Kconfig
-@@ -595,6 +595,24 @@ config STOP_MACHINE
- 	  Need stop_machine() primitive.
- endmenu
+--- linux-2.6/init/Kconfig
++++ linux-2.6/init/Kconfig
+@@ -762,3 +762,21 @@ source "block/Kconfig"
  
+ config PREEMPT_NOTIFIERS
+ 	bool
++
 +menu "Process debugging support"
 +
 +config UTRACE
@@ -3686,7 +3911,3 @@
 +	  kernel and are very sure you don't need these facilitiies,
 +	  say Y.
 +endmenu
-+
- menu "Block layer"
- source "block/Kconfig"
- endmenu

linux-2.6-utrace-ptrace-compat-ia64.patch:

Index: linux-2.6-utrace-ptrace-compat-ia64.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-ptrace-compat-ia64.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-ptrace-compat-ia64.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-ptrace-compat-ia64.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -8,15 +8,13 @@
 
 ---
 
- arch/ia64/ia32/sys_ia32.c |   40 +
- arch/ia64/kernel/ptrace.c | 1016 +++++-----------------------------------------
- 2 files changed, 159 insertions(+), 897 deletions(-)
+ arch/ia64/ia32/sys_ia32.c |   40 ++
+ arch/ia64/kernel/ptrace.c | 1019 +++++----------------------------------------
+ 2 files changed, 159 insertions(+), 900 deletions(-)
 
-Index: b/arch/ia64/ia32/sys_ia32.c
-===================================================================
---- a/arch/ia64/ia32/sys_ia32.c
-+++ b/arch/ia64/ia32/sys_ia32.c
-@@ -2340,6 +2340,46 @@ const struct utrace_regset_view utrace_i
+--- linux-2.6/arch/ia64/ia32/sys_ia32.c
++++ linux-2.6/arch/ia64/ia32/sys_ia32.c
+@@ -2344,6 +2344,46 @@ const struct utrace_regset_view utrace_i
  };
  #endif
  
@@ -63,10 +61,8 @@
  typedef struct {
  	unsigned int	ss_sp;
  	unsigned int	ss_flags;
-Index: b/arch/ia64/kernel/ptrace.c
-===================================================================
---- a/arch/ia64/kernel/ptrace.c
-+++ b/arch/ia64/kernel/ptrace.c
+--- linux-2.6/arch/ia64/kernel/ptrace.c
++++ linux-2.6/arch/ia64/kernel/ptrace.c
 @@ -554,81 +554,6 @@ ia64_sync_user_rbs (struct task_struct *
  	return 0;
  }
@@ -149,7 +145,7 @@
  /*
   * Write f32-f127 back to task->thread.fph if it has been modified.
   */
-@@ -792,828 +717,6 @@ access_nat_bits (struct task_struct *chi
+@@ -792,831 +717,6 @@ access_nat_bits (struct task_struct *chi
  	return 0;
  }
  
@@ -324,10 +320,14 @@
 -			return 0;
 -
 -		      case PT_CR_IPSR:
--			if (write_access)
--				pt->cr_ipsr = ((*data & IPSR_MASK)
+-			if (write_access) {
+-				unsigned long tmp = *data;
+-				/* psr.ri==3 is a reserved value: SDM 2:25 */
+-				if ((tmp & IA64_PSR_RI) == IA64_PSR_RI)
+-					tmp &= ~IA64_PSR_RI;
+-				pt->cr_ipsr = ((tmp & IPSR_MASK)
 -					       | (pt->cr_ipsr & ~IPSR_MASK));
--			else
+-			} else
 -				*data = (pt->cr_ipsr & IPSR_MASK);
 -			return 0;
 -
@@ -950,7 +950,6 @@
 -
 -	      case PTRACE_DETACH:
 -		/* detach a process that was attached. */
--		clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
 -		ret = ptrace_detach(child, data);
 -		goto out_tsk;
 -
@@ -978,7 +977,7 @@
  
  /* "asmlinkage" so the input arguments are preserved... */
  
-@@ -1667,6 +770,9 @@ syscall_trace_leave (long arg0, long arg
+@@ -1670,6 +770,9 @@ syscall_trace_leave (long arg0, long arg
  	}
  }
  
@@ -988,7 +987,7 @@
  /* Utrace implementation starts here */
  
  typedef struct utrace_get {
-@@ -2454,3 +1560,119 @@ const struct utrace_regset_view *utrace_
+@@ -2463,3 +1566,119 @@ const struct utrace_regset_view *utrace_
  #endif
  	return &utrace_ia64_native;
  }

linux-2.6-utrace-ptrace-compat-s390.patch:

Index: linux-2.6-utrace-ptrace-compat-s390.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-ptrace-compat-s390.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-ptrace-compat-s390.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-ptrace-compat-s390.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -7,15 +7,13 @@
 
 ---
 
+ arch/s390/kernel/ptrace.c         |  155 +++++++++++++++++++++++++++++++++++++
  arch/s390/kernel/compat_wrapper.S |    2 
- arch/s390/kernel/ptrace.c         |  151 ++++++++++++++++++++++++++++++++++++++
- 2 files changed, 152 insertions(+), 1 deletion(-)
+ 2 files changed, 156 insertions(+), 1 deletions(-)
 
-Index: b/arch/s390/kernel/ptrace.c
-===================================================================
---- a/arch/s390/kernel/ptrace.c
-+++ b/arch/s390/kernel/ptrace.c
-@@ -575,6 +575,157 @@ const struct utrace_regset_view *utrace_
+--- linux-2.6/arch/s390/kernel/ptrace.c
++++ linux-2.6/arch/s390/kernel/ptrace.c
+@@ -595,6 +595,161 @@ const struct utrace_regset_view *utrace_
  }
  
  
@@ -124,11 +122,15 @@
 +
 +#ifdef CONFIG_COMPAT
 +static const struct ptrace_layout_segment s390_compat_uarea[] = {
-+	{PT_PSWMASK / 2, PT_FPC / 2, 0, 0},
-+	{PT_FPC / 2, PT_CR_9 / 2, 1, 0},
-+	{PT_CR_9 / 2, PT_IEEE_IP / 2, 2, 0},
-+	{PT_IEEE_IP / 2, sizeof(struct user32), -1, -1},
-+	{0, 0, -1, 0}
++	{ offsetof(struct user_regs_struct32, psw),
++	  offsetof(struct user_regs_struct32, fp_regs), 0, 0 },
++	{ offsetof(struct user_regs_struct32, fp_regs),
++	  offsetof(struct user_regs_struct32, per_info), 1, 0 },
++	{ offsetof(struct user_regs_struct32, per_info),
++	  offsetof(struct user_regs_struct32, ieee_instruction_pointer), 2, 0 },
++	{ offsetof(struct user_regs_struct32, ieee_instruction_pointer),
++	  sizeof(struct user32), -1, -1 },
++	{ 0, 0, -1, 0 }
 +};
 +
 +int arch_compat_ptrace(compat_long_t *request,
@@ -173,10 +175,8 @@
  asmlinkage void
  syscall_trace(struct pt_regs *regs, int entryexit)
  {
-Index: b/arch/s390/kernel/compat_wrapper.S
-===================================================================
---- a/arch/s390/kernel/compat_wrapper.S
-+++ b/arch/s390/kernel/compat_wrapper.S
+--- linux-2.6/arch/s390/kernel/compat_wrapper.S
++++ linux-2.6/arch/s390/kernel/compat_wrapper.S
 @@ -121,7 +121,7 @@ sys32_ptrace_wrapper:
  	lgfr	%r3,%r3			# long
  	llgtr	%r4,%r4			# long

linux-2.6-utrace-ptrace-compat-sparc64.patch:

Index: linux-2.6-utrace-ptrace-compat-sparc64.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-ptrace-compat-sparc64.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-ptrace-compat-sparc64.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-ptrace-compat-sparc64.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -7,14 +7,12 @@
 
 ---
 
- arch/sparc64/kernel/ptrace.c |  566 +++++++------------------------------------
- 1 file changed, 100 insertions(+), 466 deletions(-)
+ arch/sparc64/kernel/ptrace.c |  566 +++++++-----------------------------------
+ 1 files changed, 100 insertions(+), 466 deletions(-)
 
-Index: b/arch/sparc64/kernel/ptrace.c
-===================================================================
---- a/arch/sparc64/kernel/ptrace.c
-+++ b/arch/sparc64/kernel/ptrace.c
-@@ -667,484 +667,118 @@ void flush_ptrace_access(struct vm_area_
+--- linux-2.6/arch/sparc64/kernel/ptrace.c
++++ linux-2.6/arch/sparc64/kernel/ptrace.c
+@@ -671,484 +671,118 @@ void flush_ptrace_access(struct vm_area_
  	}
  }
  

linux-2.6-utrace-ptrace-compat.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.2 -r 1.3 linux-2.6-utrace-ptrace-compat.patch
Index: linux-2.6-utrace-ptrace-compat.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-ptrace-compat.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-ptrace-compat.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-ptrace-compat.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -12,31 +12,31 @@
 
 ---
 
- arch/i386/kernel/ptrace.c       |   40 
- arch/powerpc/kernel/ptrace.c    |  250 ++++
+ fs/proc/base.c                  |   40 +
+ arch/powerpc/kernel/ptrace.c    |  454 +++++----
  arch/powerpc/kernel/signal_32.c |   52 +
+ arch/powerpc/kernel/Makefile    |    2 
+ arch/powerpc/kernel/ptrace32.c  |  416 --------
  arch/powerpc/lib/sstep.c        |    3 
- arch/x86_64/ia32/ia32entry.S    |    2 
- arch/x86_64/ia32/ptrace32.c     |   56 -
- arch/x86_64/kernel/ptrace.c     |   46 
- fs/proc/base.c                  |   40 
- include/asm-x86_64/ptrace-abi.h |    3 
- include/asm-x86_64/tracehook.h  |    1 
- include/linux/ptrace.h          |  221 +++-
- include/linux/sched.h           |    4 
- init/Kconfig                    |   15 
- kernel/Makefile                 |    3 
- kernel/exit.c                   |   13 
+ arch/x86/ia32/ptrace32.c        |   57 +
+ arch/x86/ia32/ia32entry.S       |    2 
+ arch/x86/kernel/ptrace_64.c     |   46 +
+ arch/x86/kernel/ptrace_32.c     |   40 +
  kernel/fork.c                   |    2 
- kernel/ptrace.c                 | 2046 +++++++++++++++++++++++++++++++++++++---
+ kernel/exit.c                   |   13 
+ kernel/ptrace.c                 | 2061 +++++++++++++++++++++++++++++++++++++--
  kernel/sys_ni.c                 |    4 
- 18 files changed, 2627 insertions(+), 174 deletions(-)
+ kernel/Makefile                 |    3 
+ include/linux/sched.h           |    4 
+ include/linux/ptrace.h          |  222 +++-
+ include/asm-x86/ptrace-abi.h    |    6 
+ init/Kconfig                    |   15 
+ 19 files changed, 2650 insertions(+), 792 deletions(-)
+ delete arch/powerpc/kernel/ptrace32.c
 
-Index: b/fs/proc/base.c
-===================================================================
---- a/fs/proc/base.c
-+++ b/fs/proc/base.c
-@@ -148,6 +148,46 @@ static int get_nr_threads(struct task_st
+--- linux-2.6/fs/proc/base.c
++++ linux-2.6/fs/proc/base.c
+@@ -154,6 +154,46 @@ static int get_nr_threads(struct task_st
  	return count;
  }
  
@@ -63,7 +63,7 @@
 +		return -EPERM;
 +	smp_rmb();
 +	if (task->mm)
-+		dumpable = task->mm->dumpable;
++		dumpable = get_dumpable(task->mm);
 +	if (!dumpable && !capable(CAP_SYS_PTRACE))
 +		return -EPERM;
 +
@@ -83,221 +83,74 @@
  static int proc_cwd_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt)
  {
  	struct task_struct *task = get_proc_task(inode);
-Index: b/arch/i386/kernel/ptrace.c
-===================================================================
---- a/arch/i386/kernel/ptrace.c
-+++ b/arch/i386/kernel/ptrace.c
-@@ -736,6 +736,46 @@ const struct utrace_regset_view *utrace_
- 	return &utrace_i386_native;
+--- linux-2.6/arch/powerpc/kernel/ptrace.c
++++ linux-2.6/arch/powerpc/kernel/ptrace.c
+@@ -590,248 +590,320 @@ const struct utrace_regset_view *utrace_
  }
  
-+#ifdef CONFIG_PTRACE
-+static const struct ptrace_layout_segment i386_uarea[] = {
-+	{0, FRAME_SIZE*4, 0, 0},
-+	{FRAME_SIZE*4, offsetof(struct user, u_debugreg[0]), -1, 0},
-+	{offsetof(struct user, u_debugreg[0]),
-+	 offsetof(struct user, u_debugreg[8]), 4, 0},
-+	{0, 0, -1, 0}
-+};
-+
-+int arch_ptrace(long *req, struct task_struct *child,
-+		struct utrace_attached_engine *engine,
-+		unsigned long addr, unsigned long data, long *val)
-+{
-+	switch (*req) {
-+	case PTRACE_PEEKUSR:
-+		return ptrace_peekusr(child, engine, i386_uarea, addr, data);
-+	case PTRACE_POKEUSR:
-+		return ptrace_pokeusr(child, engine, i386_uarea, addr, data);
-+	case PTRACE_GETREGS:
-+		return ptrace_whole_regset(child, engine, data, 0, 0);
-+	case PTRACE_SETREGS:
-+		return ptrace_whole_regset(child, engine, data, 0, 1);
-+	case PTRACE_GETFPREGS:
-+		return ptrace_whole_regset(child, engine, data, 1, 0);
-+	case PTRACE_SETFPREGS:
-+		return ptrace_whole_regset(child, engine, data, 1, 1);
-+	case PTRACE_GETFPXREGS:
-+		return ptrace_whole_regset(child, engine, data, 2, 0);
-+	case PTRACE_SETFPXREGS:
-+		return ptrace_whole_regset(child, engine, data, 2, 1);
-+	case PTRACE_GET_THREAD_AREA:
-+	case PTRACE_SET_THREAD_AREA:
-+		return ptrace_onereg_access(child, engine,
-+					    utrace_native_view(current), 3,
-+					    addr, (void __user *)data,
-+					    *req == PTRACE_SET_THREAD_AREA);
-+	}
-+	return -ENOSYS;
-+}
-+#endif
  
- void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code)
++#ifdef CONFIG_PTRACE
+ /*
+  * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls,
+  * we mark them as obsolete now, they will be removed in a future version
+  */
+-static long arch_ptrace_old(struct task_struct *child, long request, long addr,
+-			    long data)
++static int arch_ptrace_old(long *request, struct task_struct *child,
++			   struct utrace_attached_engine *engine,
++			   unsigned long addr, unsigned long data, long *val)
  {
-Index: b/arch/x86_64/ia32/ptrace32.c
-===================================================================
---- a/arch/x86_64/ia32/ptrace32.c
-+++ b/arch/x86_64/ia32/ptrace32.c
-@@ -166,11 +166,6 @@ static int getreg32(struct task_struct *
- 
- #undef R32
- 
--asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data)
--{
--	return -ENOSYS;
--}
+-	int ret = -EPERM;
 -
- static int
- ia32_genregs_get(struct task_struct *target,
- 		 const struct utrace_regset *regset,
-@@ -600,3 +595,54 @@ const struct utrace_regset_view utrace_i
- 	.name = "i386", .e_machine = EM_386,
- 	.regsets = ia32_regsets, .n = ARRAY_SIZE(ia32_regsets)
- };
-+
-+
-+#ifdef CONFIG_PTRACE
-+/*
-+ * This matches the arch/i386/kernel/ptrace.c definitions.
-+ */
-+
-+static const struct ptrace_layout_segment ia32_uarea[] = {
-+	{0, sizeof(struct user_regs_struct32), 0, 0},
-+	{sizeof(struct user_regs_struct32),
-+	 offsetof(struct user32, u_debugreg[0]), -1, 0},
-+	{offsetof(struct user32, u_debugreg[0]),
-+	 offsetof(struct user32, u_debugreg[8]), 4, 0},
-+	{0, 0, -1, 0}
-+};
-+
-+int arch_compat_ptrace(compat_long_t *req, struct task_struct *child,
-+		       struct utrace_attached_engine *engine,
-+		       compat_ulong_t addr, compat_ulong_t data,
-+		       compat_long_t *val)
-+{
-+	switch (*req) {
-+	case PTRACE_PEEKUSR:
-+		return ptrace_compat_peekusr(child, engine, ia32_uarea,
-+					     addr, data);
-+	case PTRACE_POKEUSR:
-+		return ptrace_compat_pokeusr(child, engine, ia32_uarea,
-+					     addr, data);
-+	case PTRACE_GETREGS:
-+		return ptrace_whole_regset(child, engine, data, 0, 0);
-+	case PTRACE_SETREGS:
-+		return ptrace_whole_regset(child, engine, data, 0, 1);
-+	case PTRACE_GETFPREGS:
-+		return ptrace_whole_regset(child, engine, data, 1, 0);
-+	case PTRACE_SETFPREGS:
-+		return ptrace_whole_regset(child, engine, data, 1, 1);
-+	case PTRACE_GETFPXREGS:
-+		return ptrace_whole_regset(child, engine, data, 2, 0);
-+	case PTRACE_SETFPXREGS:
-+		return ptrace_whole_regset(child, engine, data, 2, 1);
-+	case PTRACE_GET_THREAD_AREA:
-+	case PTRACE_SET_THREAD_AREA:
[...2275 lines suppressed...]
+-	if (copied != sizeof(tmp))
+-		return -EIO;
+-	return put_user(tmp, (unsigned long __user *)data);
 +static u32
 +ptrace_report_exit(struct utrace_attached_engine *engine,
 +		   struct task_struct *tsk, long orig_code, long *code)
@@ -2757,18 +3441,22 @@
 +	END_CHECK;
 +
 +	return parent;
-+}
-+
+ }
+ 
+-int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
 +static int
 +ptrace_allow_access_process_vm(struct utrace_attached_engine *engine,
 +			       struct task_struct *target,
 +			       struct task_struct *caller)
-+{
+ {
+-	int copied;
 +	struct ptrace_state *state;
 +	int ours = 0;
 +
 +	START_CHECK;
-+
+ 
+-	copied = access_process_vm(tsk, addr, &data, sizeof(data), 1);
+-	return (copied == sizeof(data)) ? 0 : -EIO;
 +	state = get_ptrace_state(engine, target);
 +	if (likely(state != NULL)) {
 +		ours = (((engine->flags & UTRACE_ACTION_QUIESCE)
@@ -2783,7 +3471,7 @@
 +	END_CHECK;
 +
 +	return ours;
-+}
+ }
 +
 +
 +static const struct utrace_engine_ops ptrace_utrace_ops =
@@ -2802,11 +3490,9 @@
 +	.tracer_task = ptrace_tracer_task,
 +	.allow_access_process_vm = ptrace_allow_access_process_vm,
 +};
-Index: b/kernel/sys_ni.c
-===================================================================
---- a/kernel/sys_ni.c
-+++ b/kernel/sys_ni.c
-@@ -113,6 +113,10 @@ cond_syscall(sys_vm86);
+--- linux-2.6/kernel/sys_ni.c
++++ linux-2.6/kernel/sys_ni.c
+@@ -122,6 +122,10 @@ cond_syscall(sys_vm86);
  cond_syscall(compat_sys_ipc);
  cond_syscall(compat_sys_sysctl);
  
@@ -2817,32 +3503,28 @@
  /* arch-specific weak syscall entries */
  cond_syscall(sys_pciconfig_read);
  cond_syscall(sys_pciconfig_write);
-Index: b/kernel/Makefile
-===================================================================
---- a/kernel/Makefile
-+++ b/kernel/Makefile
+--- linux-2.6/kernel/Makefile
++++ linux-2.6/kernel/Makefile
 @@ -4,7 +4,7 @@
  
  obj-y     = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
  	    exit.o itimer.o time.o softirq.o resource.o \
--	    sysctl.o capability.o ptrace.o timer.o user.o \
-+	    sysctl.o capability.o timer.o user.o \
+-	    sysctl.o capability.o ptrace.o timer.o user.o user_namespace.o \
++	    sysctl.o capability.o timer.o user.o user_namespace.o \
  	    signal.o sys.o kmod.o workqueue.o pid.o \
  	    rcupdate.o extable.o params.o posix-timers.o \
  	    kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
-@@ -52,6 +52,7 @@ obj-$(CONFIG_UTS_NS) += utsname.o
- obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
+@@ -58,6 +58,7 @@ obj-$(CONFIG_TASK_DELAY_ACCT) += delayac
  obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
+ obj-$(CONFIG_MARKERS) += marker.o
  obj-$(CONFIG_UTRACE) += utrace.o
 +obj-$(CONFIG_PTRACE) += ptrace.o
  
  ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
  # According to Alan Modra <alan at linuxcare.com.au>, the -fno-omit-frame-pointer is
-Index: b/include/linux/sched.h
-===================================================================
---- a/include/linux/sched.h
-+++ b/include/linux/sched.h
-@@ -1036,6 +1036,10 @@ struct task_struct {
+--- linux-2.6/include/linux/sched.h
++++ linux-2.6/include/linux/sched.h
+@@ -1161,6 +1161,10 @@ struct task_struct {
  	atomic_t fs_excl;	/* holding fs exclusive resources */
  	struct rcu_head rcu;
  
@@ -2853,11 +3535,9 @@
  	/*
  	 * cache last used pipe for splice
  	 */
-Index: b/include/linux/ptrace.h
-===================================================================
---- a/include/linux/ptrace.h
-+++ b/include/linux/ptrace.h
-@@ -49,50 +49,197 @@
+--- linux-2.6/include/linux/ptrace.h
++++ linux-2.6/include/linux/ptrace.h
+@@ -49,49 +49,195 @@
  #include <asm/ptrace.h>
  
  #ifdef __KERNEL__
@@ -2907,8 +3587,9 @@
 -extern int ptrace_check_attach(struct task_struct *task, int kill);
 -extern int ptrace_request(struct task_struct *child, long request, long addr, long data);
  extern int ptrace_may_attach(struct task_struct *task);
- 
- 
+-extern int __ptrace_may_attach(struct task_struct *task);
++
++
 +#ifdef CONFIG_PTRACE
 +#include <asm/tracehook.h>
 +#include <linux/tracehook.h>
@@ -2964,7 +3645,7 @@
 +				struct utrace_attached_engine *engine,
 +				const struct utrace_regset_view *view,
 +				int setno, unsigned long regno,
-+				void __user *data, int write);
++				void __user *udata, void *kdata, int write);
 +
 +
 +/*
@@ -3005,7 +3686,7 @@
 +				    (unsigned long __user *)data, NULL, 0);
 +}
 +
-+/* Convenience wrapper for the common PTRACE_PEEKUSR implementation.  */
++/* Convenience wrapper for the common PTRACE_POKEUSR implementation.  */
 +static inline int ptrace_pokeusr(struct task_struct *child,
 +				 struct utrace_attached_engine *engine,
 +				 const struct ptrace_layout_segment layout[],
@@ -3087,40 +3768,27 @@
 +	return -ECHILD;
 +}
 +#endif	/* CONFIG_PTRACE */
-+
-+
- #ifndef force_successful_syscall_return
- /*
-  * System call handlers that, upon successful completion, need to return a
-Index: b/include/asm-x86_64/tracehook.h
-===================================================================
---- a/include/asm-x86_64/tracehook.h
-+++ b/include/asm-x86_64/tracehook.h
-@@ -15,6 +15,7 @@
- 
- #include <linux/sched.h>
- #include <asm/ptrace.h>
-+#include <asm/proto.h>
- 
- /*
-  * See linux/tracehook.h for the descriptions of what these need to do.
-Index: b/include/asm-x86_64/ptrace-abi.h
-===================================================================
---- a/include/asm-x86_64/ptrace-abi.h
-+++ b/include/asm-x86_64/ptrace-abi.h
-@@ -48,4 +48,7 @@
  
- #define PTRACE_ARCH_PRCTL	  30	/* arch_prctl for child */
+ int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data);
+ int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data);
+--- linux-2.6/include/asm-x86/ptrace-abi.h
++++ linux-2.6/include/asm-x86/ptrace-abi.h
+@@ -73,9 +73,9 @@
+ 
+ #ifdef __x86_64__
+ # define PTRACE_ARCH_PRCTL	  30
+-#else
+-# define PTRACE_SYSEMU		  31
+-# define PTRACE_SYSEMU_SINGLESTEP 32
+ #endif
  
 +#define PTRACE_SYSEMU		  31
 +#define PTRACE_SYSEMU_SINGLESTEP  32
 +
  #endif
-Index: b/init/Kconfig
-===================================================================
---- a/init/Kconfig
-+++ b/init/Kconfig
-@@ -597,10 +597,21 @@ endmenu
+--- linux-2.6/init/Kconfig
++++ linux-2.6/init/Kconfig
+@@ -765,10 +765,21 @@ config PREEMPT_NOTIFIERS
  
  menu "Process debugging support"
  

linux-2.6-utrace-regset-ia64.patch:

Index: linux-2.6-utrace-regset-ia64.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-regset-ia64.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-regset-ia64.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-regset-ia64.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -9,17 +9,15 @@
 
 ---
 
- arch/ia64/ia32/sys_ia32.c    |  472 +++++++++++++++++++++++++
- arch/ia64/kernel/ptrace.c    |  804 +++++++++++++++++++++++++++++++++++++++++++
- include/asm-ia64/elf.h       |   24 +
+ arch/ia64/ia32/sys_ia32.c    |  476 +++++++++++++++++++++++++
+ arch/ia64/kernel/ptrace.c    |  810 ++++++++++++++++++++++++++++++++++++++++++
  include/asm-ia64/tracehook.h |    7 
- 4 files changed, 1305 insertions(+), 2 deletions(-)
+ include/asm-ia64/elf.h       |   24 +
+ 4 files changed, 1315 insertions(+), 2 deletions(-)
 
-Index: b/arch/ia64/ia32/sys_ia32.c
-===================================================================
---- a/arch/ia64/ia32/sys_ia32.c
-+++ b/arch/ia64/ia32/sys_ia32.c
-@@ -44,6 +44,7 @@
+--- linux-2.6/arch/ia64/ia32/sys_ia32.c
++++ linux-2.6/arch/ia64/ia32/sys_ia32.c
+@@ -43,6 +43,7 @@
  #include <linux/eventpoll.h>
  #include <linux/personality.h>
  #include <linux/ptrace.h>
@@ -27,7 +25,15 @@
  #include <linux/stat.h>
  #include <linux/ipc.h>
  #include <linux/capability.h>
-@@ -1868,6 +1869,477 @@ sys32_ptrace (int request, pid_t pid, un
+@@ -50,6 +51,7 @@
+ #include <linux/vfs.h>
+ #include <linux/mman.h>
+ #include <linux/mutex.h>
++#include <linux/elf.h>
+ 
+ #include <asm/intrinsics.h>
+ #include <asm/types.h>
+@@ -1868,6 +1870,480 @@ sys32_ptrace (int request, pid_t pid, un
  }
  #endif
  
@@ -188,7 +194,7 @@
 +		end = (dst->pos - 7 * sizeof(int)) / sizeof(struct _fpreg_ia32);
 +		for (; start < end; start++)
 +			access_fpreg_ia32(start, (struct _fpreg_ia32 *)buf + start,
-+					pt, info->sw, tos, 0);
++					pt, info->sw, tos, 1);
 +		if (dst->count == 0)
 +			return;
 +	}
@@ -480,16 +486,19 @@
 + */
 +static const struct utrace_regset ia32_regsets[] = {
 +	{
++		.core_note_type = NT_PRSTATUS,
 +		.n = sizeof(struct user_regs_struct32)/4,
 +		.size = 4, .align = 4,
 +		.get = ia32_genregs_get, .set = ia32_genregs_set
 +	},
 +	{
++		.core_note_type = NT_PRFPREG,
 +		.n = sizeof(struct ia32_user_i387_struct) / 4,
 +		.size = 4, .align = 4,
 +		.get = ia32_fpregs_get, .set = ia32_fpregs_set
 +	},
 +	{
++		.core_note_type = NT_PRXFPREG,
 +		.n = sizeof(struct ia32_user_fxsr_struct) / 4,
 +		.size = 4, .align = 4,
 +		.get = ia32_fpxregs_get, .set = ia32_fpxregs_set
@@ -505,10 +514,8 @@
  typedef struct {
  	unsigned int	ss_sp;
  	unsigned int	ss_flags;
-Index: b/arch/ia64/kernel/ptrace.c
-===================================================================
---- a/arch/ia64/kernel/ptrace.c
-+++ b/arch/ia64/kernel/ptrace.c
+--- linux-2.6/arch/ia64/kernel/ptrace.c
++++ linux-2.6/arch/ia64/kernel/ptrace.c
 @@ -3,6 +3,9 @@
   *
   * Copyright (C) 1999-2005 Hewlett-Packard Co
@@ -519,23 +526,17 @@
   *
   * Derived from the x86 and Alpha versions.
   */
-@@ -18,13 +21,16 @@
+@@ -18,7 +21,10 @@
  #include <linux/security.h>
  #include <linux/audit.h>
  #include <linux/signal.h>
 +#include <linux/module.h>
++#include <linux/elf.h>
  
 +#include <asm/tracehook.h>
  #include <asm/pgtable.h>
  #include <asm/processor.h>
  #include <asm/ptrace_offsets.h>
- #include <asm/rse.h>
- #include <asm/system.h>
- #include <asm/uaccess.h>
-+#include <asm/elf.h>
- #include <asm/unwind.h>
- #ifdef CONFIG_PERFMON
- #include <asm/perfmon.h>
 @@ -548,6 +554,7 @@ ia64_sync_user_rbs (struct task_struct *
  	return 0;
  }
@@ -576,7 +577,7 @@
  static int
  access_uarea (struct task_struct *child, unsigned long addr,
  	      unsigned long *data, int write_access)
-@@ -1248,7 +1259,9 @@ ptrace_getregs (struct task_struct *chil
+@@ -1252,7 +1263,9 @@ ptrace_getregs (struct task_struct *chil
  	ret = retval ? -EIO : 0;
  	return ret;
  }
@@ -586,7 +587,7 @@
  static long
  ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
  {
-@@ -1394,6 +1407,7 @@ ptrace_setregs (struct task_struct *chil
+@@ -1398,6 +1411,7 @@ ptrace_setregs (struct task_struct *chil
  	ret = retval ? -EIO : 0;
  	return ret;
  }
@@ -594,7 +595,7 @@
  
  /*
   * Called by kernel/ptrace.c when detaching..
-@@ -1411,6 +1425,7 @@ ptrace_disable (struct task_struct *chil
+@@ -1415,6 +1429,7 @@ ptrace_disable (struct task_struct *chil
  	child_psr->tb = 0;
  }
  
@@ -602,7 +603,7 @@
  asmlinkage long
  sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
  {
-@@ -1598,6 +1613,7 @@ sys_ptrace (long request, pid_t pid, uns
+@@ -1601,6 +1616,7 @@ sys_ptrace (long request, pid_t pid, uns
  	unlock_kernel();
  	return ret;
  }
@@ -610,7 +611,7 @@
  
  /* "asmlinkage" so the input arguments are preserved... */
  
-@@ -1650,3 +1666,791 @@ syscall_trace_leave (long arg0, long arg
+@@ -1653,3 +1669,797 @@ syscall_trace_leave (long arg0, long arg
  		tracehook_report_syscall_step(&regs);
  	}
  }
@@ -650,35 +651,35 @@
 +
 +	pt = task_pt_regs(target);
 +	switch (addr) {
-+		case ELF_GR_OFFSET(1):
-+			ptr = &pt->r1;
-+			break;
-+		case ELF_GR_OFFSET(2):
-+		case ELF_GR_OFFSET(3):
-+			ptr = (void *)&pt->r2 + (addr - ELF_GR_OFFSET(2));
-+			break;
-+		case ELF_GR_OFFSET(4) ... ELF_GR_OFFSET(7):
-+			if (write_access) {
-+				/* read NaT bit first: */
-+				unsigned long dummy;
-+
-+				ret = unw_get_gr(info, addr/8, &dummy, &nat);
-+				if (ret < 0)
-+					return ret;
-+			}
-+			return unw_access_gr(info, addr/8, data, &nat, write_access);
-+		case ELF_GR_OFFSET(8) ... ELF_GR_OFFSET(11):
-+			ptr = (void *)&pt->r8 + addr - ELF_GR_OFFSET(8);
-+			break;
-+		case ELF_GR_OFFSET(12):
-+		case ELF_GR_OFFSET(13):
-+			ptr = (void *)&pt->r12 + addr - ELF_GR_OFFSET(12);
-+			break;
-+		case ELF_GR_OFFSET(14):
-+			ptr = &pt->r14;
-+			break;
-+		case ELF_GR_OFFSET(15):
-+			ptr = &pt->r15;
++	case ELF_GR_OFFSET(1):
++		ptr = &pt->r1;
++		break;
++	case ELF_GR_OFFSET(2):
++	case ELF_GR_OFFSET(3):
++		ptr = (void *)&pt->r2 + (addr - ELF_GR_OFFSET(2));
++		break;
++	case ELF_GR_OFFSET(4) ... ELF_GR_OFFSET(7):
++		if (write_access) {
++			/* read NaT bit first: */
++			unsigned long dummy;
++
++			ret = unw_get_gr(info, addr/8, &dummy, &nat);
++			if (ret < 0)
++				return ret;
++		}
++		return unw_access_gr(info, addr/8, data, &nat, write_access);
++	case ELF_GR_OFFSET(8) ... ELF_GR_OFFSET(11):
++		ptr = (void *)&pt->r8 + addr - ELF_GR_OFFSET(8);
++		break;
++	case ELF_GR_OFFSET(12):
++	case ELF_GR_OFFSET(13):
++		ptr = (void *)&pt->r12 + addr - ELF_GR_OFFSET(12);
++		break;
++	case ELF_GR_OFFSET(14):
++		ptr = &pt->r14;
++		break;
++	case ELF_GR_OFFSET(15):
++		ptr = &pt->r15;
 +	}
 +	if (write_access)
 +		*ptr = *data;
@@ -696,17 +697,17 @@
 +
 +	pt = task_pt_regs(target);
 +	switch (addr) {
-+		case ELF_BR_OFFSET(0):
-+			ptr = &pt->b0;
-+			break;
-+		case ELF_BR_OFFSET(1) ... ELF_BR_OFFSET(5):
-+			return unw_access_br(info, (addr - ELF_BR_OFFSET(0))/8,
-+					data, write_access);
-+		case ELF_BR_OFFSET(6):
-+			ptr = &pt->b6;
-+			break;
-+		case ELF_BR_OFFSET(7):
-+			ptr = &pt->b7;
++	case ELF_BR_OFFSET(0):
++		ptr = &pt->b0;
++		break;
++	case ELF_BR_OFFSET(1) ... ELF_BR_OFFSET(5):
++		return unw_access_br(info, (addr - ELF_BR_OFFSET(0))/8,
++				     data, write_access);
++	case ELF_BR_OFFSET(6):
++		ptr = &pt->b6;
++		break;
++	case ELF_BR_OFFSET(7):
++		ptr = &pt->b7;
 +	}
 +	if (write_access)
 +		*ptr = *data;
@@ -726,137 +727,141 @@
 +	pt = task_pt_regs(target);
 +	if (addr >= ELF_AR_RSC_OFFSET && addr <= ELF_AR_SSD_OFFSET) {
 +		switch (addr) {
-+			case ELF_AR_RSC_OFFSET:
-+				/* force PL3 */
-+				if (write_access)
-+					pt->ar_rsc = *data | (3 << 2);
-+				else
-+					*data = pt->ar_rsc;
-+				return 0;
-+			case ELF_AR_BSP_OFFSET:
-+				/*
-+				 * By convention, we use PT_AR_BSP to refer to
-+				 * the end of the user-level backing store.
-+				 * Use ia64_rse_skip_regs(PT_AR_BSP, -CFM.sof)
-+				 * to get the real value of ar.bsp at the time
-+				 * the kernel was entered.
-+				 *
-+				 * Furthermore, when changing the contents of
-+				 * PT_AR_BSP (or PT_CFM) we MUST copy any
-+				 * users-level stacked registers that are
-+				 * stored on the kernel stack back to
-+				 * user-space because otherwise, we might end
-+				 * up clobbering kernel stacked registers.
-+				 * Also, if this happens while the task is
-+				 * blocked in a system call, which convert the
-+				 * state such that the non-system-call exit
-+				 * path is used.  This ensures that the proper
-+				 * state will be picked up when resuming
-+				 * execution.  However, it *also* means that
-+				 * once we write PT_AR_BSP/PT_CFM, it won't be
-+				 * possible to modify the syscall arguments of
-+				 * the pending system call any longer.  This
-+				 * shouldn't be an issue because modifying
-+				 * PT_AR_BSP/PT_CFM generally implies that
-+				 * we're either abandoning the pending system
-+				 * call or that we defer it's re-execution
-+				 * (e.g., due to GDB doing an inferior
-+				 * function call).
-+				 */
-+				urbs_end = ia64_get_user_rbs_end(target, pt, &cfm);
-+				if (write_access) {
-+					if (*data != urbs_end) {
-+						if (ia64_sync_user_rbs(target, info->sw,
-+									pt->ar_bspstore,
-+									urbs_end) < 0)
-+							return -1;
-+						if (in_syscall(pt))
-+							convert_to_non_syscall(target,
-+									pt,
-+									cfm);
-+						/*
-+						 * Simulate user-level write
-+						 * of ar.bsp:
-+						 */
-+						pt->loadrs = 0;
-+						pt->ar_bspstore = *data;
-+					}
-+				} else
-+					*data = urbs_end;
-+				return 0;
-+			case ELF_AR_BSPSTORE_OFFSET: // ar_bsp_store
-+				ptr = &pt->ar_bspstore;
-+				break;
-+			case ELF_AR_RNAT_OFFSET:  // ar_rnat
-+				urbs_end = ia64_get_user_rbs_end(target, pt, NULL);
-+				rnat_addr = (long) ia64_rse_rnat_addr((long *)
-+						urbs_end);
-+				if (write_access)
-+					return ia64_poke(target, info->sw, urbs_end,
-+							rnat_addr, *data);
-+				else
-+					return ia64_peek(target, info->sw, urbs_end,
-+							rnat_addr, data);
-+			case ELF_AR_CCV_OFFSET:   // ar_ccv
-+				ptr = &pt->ar_ccv;
-+				break;
-+			case ELF_AR_UNAT_OFFSET:	// ar_unat
-+				ptr = &pt->ar_unat;
-+				break;
-+			case ELF_AR_FPSR_OFFSET:  // ar_fpsr
-+				ptr = &pt->ar_fpsr;
-+				break;
-+			case ELF_AR_PFS_OFFSET:  // ar_pfs
-+				ptr = &pt->ar_pfs;
-+				break;
-+			case ELF_AR_LC_OFFSET:   // ar_lc
-+				return unw_access_ar(info, UNW_AR_LC, data,
-+						write_access);
-+			case ELF_AR_EC_OFFSET:    // ar_ec
-+				return unw_access_ar(info, UNW_AR_EC, data,
-+						write_access);
-+			case ELF_AR_CSD_OFFSET:   // ar_csd
-+				ptr = &pt->ar_csd;
-+				break;
-+			case ELF_AR_SSD_OFFSET:   // ar_ssd
-+				ptr = &pt->ar_ssd;
++		case ELF_AR_RSC_OFFSET:
++			/* force PL3 */
++			if (write_access)
++				pt->ar_rsc = *data | (3 << 2);
++			else
++				*data = pt->ar_rsc;
++			return 0;
++		case ELF_AR_BSP_OFFSET:
++			/*
++			 * By convention, we use PT_AR_BSP to refer to
++			 * the end of the user-level backing store.
++			 * Use ia64_rse_skip_regs(PT_AR_BSP, -CFM.sof)
++			 * to get the real value of ar.bsp at the time
++			 * the kernel was entered.
++			 *
++			 * Furthermore, when changing the contents of
++			 * PT_AR_BSP (or PT_CFM) we MUST copy any
++			 * users-level stacked registers that are
++			 * stored on the kernel stack back to
++			 * user-space because otherwise, we might end
++			 * up clobbering kernel stacked registers.
++			 * Also, if this happens while the task is
++			 * blocked in a system call, which convert the
++			 * state such that the non-system-call exit
++			 * path is used.  This ensures that the proper
++			 * state will be picked up when resuming
++			 * execution.  However, it *also* means that
++			 * once we write PT_AR_BSP/PT_CFM, it won't be
++			 * possible to modify the syscall arguments of
++			 * the pending system call any longer.  This
++			 * shouldn't be an issue because modifying
++			 * PT_AR_BSP/PT_CFM generally implies that
++			 * we're either abandoning the pending system
++			 * call or that we defer it's re-execution
++			 * (e.g., due to GDB doing an inferior
++			 * function call).
++			 */
++			urbs_end = ia64_get_user_rbs_end(target, pt, &cfm);
++			if (write_access) {
++				if (*data != urbs_end) {
++					if (ia64_sync_user_rbs(target, info->sw,
++							       pt->ar_bspstore,
++							       urbs_end) < 0)
++						return -1;
++					if (in_syscall(pt))
++						convert_to_non_syscall(target,
++								       pt,
++								       cfm);
++					/*
++					 * Simulate user-level write
++					 * of ar.bsp:
++					 */
++					pt->loadrs = 0;
++					pt->ar_bspstore = *data;
++				}
++			} else
++				*data = urbs_end;
++			return 0;
++		case ELF_AR_BSPSTORE_OFFSET: // ar_bsp_store
++			ptr = &pt->ar_bspstore;
++			break;
++		case ELF_AR_RNAT_OFFSET:  // ar_rnat
++			urbs_end = ia64_get_user_rbs_end(target, pt, NULL);
++			rnat_addr = (long) ia64_rse_rnat_addr((long *)
++							      urbs_end);
++			if (write_access)
++				return ia64_poke(target, info->sw, urbs_end,
++						 rnat_addr, *data);
++			else
++				return ia64_peek(target, info->sw, urbs_end,
++						 rnat_addr, data);
++		case ELF_AR_CCV_OFFSET:   // ar_ccv
++			ptr = &pt->ar_ccv;
++			break;
++		case ELF_AR_UNAT_OFFSET:	// ar_unat
++			ptr = &pt->ar_unat;
++			break;
++		case ELF_AR_FPSR_OFFSET:  // ar_fpsr
++			ptr = &pt->ar_fpsr;
++			break;
++		case ELF_AR_PFS_OFFSET:  // ar_pfs
++			ptr = &pt->ar_pfs;
++			break;
++		case ELF_AR_LC_OFFSET:   // ar_lc
++			return unw_access_ar(info, UNW_AR_LC, data,
++					     write_access);
++		case ELF_AR_EC_OFFSET:    // ar_ec
++			return unw_access_ar(info, UNW_AR_EC, data,
++					     write_access);
++		case ELF_AR_CSD_OFFSET:   // ar_csd
++			ptr = &pt->ar_csd;
++			break;
++		case ELF_AR_SSD_OFFSET:   // ar_ssd
++			ptr = &pt->ar_ssd;
 +		}
 +	} else if (addr >= ELF_CR_IIP_OFFSET && addr <= ELF_CR_IPSR_OFFSET) {
 +		switch (addr) {
-+			case ELF_CR_IIP_OFFSET:
-+				ptr = &pt->cr_iip;
-+				break;
-+			case ELF_CFM_OFFSET:
-+				urbs_end = ia64_get_user_rbs_end(target, pt, &cfm);
-+				if (write_access) {
-+					if (((cfm ^ *data) & PFM_MASK) != 0) {
-+						if (ia64_sync_user_rbs(target, info->sw,
-+									pt->ar_bspstore,
-+									urbs_end) < 0)
-+							return -1;
-+						if (in_syscall(pt))
-+							convert_to_non_syscall(target,
-+									pt,
-+									cfm);
-+						pt->cr_ifs = ((pt->cr_ifs & ~PFM_MASK)
-+								| (*data & PFM_MASK));
-+					}
-+				} else
-+					*data = cfm;
-+				return 0;
-+			case ELF_CR_IPSR_OFFSET:
-+				if (write_access)
-+					pt->cr_ipsr = ((*data & IPSR_MASK)
-+							| (pt->cr_ipsr & ~IPSR_MASK));
-+				else
-+					*data = (pt->cr_ipsr & IPSR_MASK);
-+				return 0;
++		case ELF_CR_IIP_OFFSET:
++			ptr = &pt->cr_iip;
++			break;
++		case ELF_CFM_OFFSET:
++			urbs_end = ia64_get_user_rbs_end(target, pt, &cfm);
++			if (write_access) {
++				if (((cfm ^ *data) & PFM_MASK) != 0) {
++					if (ia64_sync_user_rbs(target, info->sw,
++							       pt->ar_bspstore,
++							       urbs_end) < 0)
++						return -1;
++					if (in_syscall(pt))
++						convert_to_non_syscall(target,
++								       pt,
++								       cfm);
++					pt->cr_ifs = ((pt->cr_ifs & ~PFM_MASK)
++						      | (*data & PFM_MASK));
++				}
++			} else
++				*data = cfm;
++			return 0;
++		case ELF_CR_IPSR_OFFSET:
++			if (write_access) {
++				unsigned long tmp = *data;
++				/* psr.ri==3 is a reserved value: SDM 2:25 */
++				if ((tmp & IA64_PSR_RI) == IA64_PSR_RI)
++					tmp &= ~IA64_PSR_RI;
++				pt->cr_ipsr = ((tmp & IPSR_MASK)
++					       | (pt->cr_ipsr & ~IPSR_MASK));
++			} else
++				*data = (pt->cr_ipsr & IPSR_MASK);
++			return 0;
 +		}
 +	} else if (addr == ELF_NAT_OFFSET)
-+			return access_nat_bits(target, pt, info,
-+					data, write_access);
++		return access_nat_bits(target, pt, info,
++				       data, write_access);
 +	else if (addr == ELF_PR_OFFSET)
-+			ptr = &pt->pr;
++		ptr = &pt->pr;
 +	else
 +		return -1;
 +
@@ -1370,12 +1375,14 @@
 +
 +static const struct utrace_regset native_regsets[] = {
 +	{
++		.core_note_type = NT_PRSTATUS,
 +		.n = ELF_NGREG,
 +		.size = sizeof(elf_greg_t), .align = sizeof(elf_greg_t),
 +		.get = gpregs_get, .set = gpregs_set,
 +		.writeback = gpregs_writeback
 +	},
 +	{
++		.core_note_type = NT_PRFPREG,
 +		.n = ELF_NFPREG,
 +		.size = sizeof(elf_fpreg_t), .align = sizeof(elf_fpreg_t),
 +		.get = fpregs_get, .set = fpregs_set, .active = fpregs_active
@@ -1402,10 +1409,8 @@
 +#endif
 +	return &utrace_ia64_native;
 +}
-Index: b/include/asm-ia64/tracehook.h
-===================================================================
---- a/include/asm-ia64/tracehook.h
-+++ b/include/asm-ia64/tracehook.h
+--- linux-2.6/include/asm-ia64/tracehook.h
++++ linux-2.6/include/asm-ia64/tracehook.h
 @@ -67,7 +67,10 @@ static inline int tracehook_single_step_
  
  static inline void tracehook_abort_syscall(struct pt_regs *regs)
@@ -1419,10 +1424,8 @@
  
 -#endif
 +#endif	/* asm/tracehook.h */
-Index: b/include/asm-ia64/elf.h
-===================================================================
---- a/include/asm-ia64/elf.h
-+++ b/include/asm-ia64/elf.h
+--- linux-2.6/include/asm-ia64/elf.h
++++ linux-2.6/include/asm-ia64/elf.h
 @@ -154,6 +154,30 @@ extern void ia64_init_addr_space (void);
  #define ELF_NGREG	128	/* we really need just 72 but let's leave some headroom... */
  #define ELF_NFPREG	128	/* f0 and f1 could be omitted, but so what... */

linux-2.6-utrace-regset-s390.patch:

Index: linux-2.6-utrace-regset-s390.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-regset-s390.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-regset-s390.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-regset-s390.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -9,24 +9,20 @@
 ---
 
  arch/s390/kernel/Makefile |    2 
- arch/s390/kernel/ptrace.c |  952 ++++++++++++++++++----------------------------
- 2 files changed, 390 insertions(+), 564 deletions(-)
+ arch/s390/kernel/ptrace.c |  958 +++++++++++++++++++--------------------------
+ 2 files changed, 409 insertions(+), 551 deletions(-)
 
-Index: b/arch/s390/kernel/Makefile
-===================================================================
---- a/arch/s390/kernel/Makefile
-+++ b/arch/s390/kernel/Makefile
+--- linux-2.6/arch/s390/kernel/Makefile
++++ linux-2.6/arch/s390/kernel/Makefile
 @@ -35,3 +35,5 @@ obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS
  # This is just to get the dependencies...
  #
  binfmt_elf32.o:	$(TOPDIR)/fs/binfmt_elf.c
 +
 +CFLAGS_ptrace.o		+= -DUTS_MACHINE='"$(UTS_MACHINE)"'
-Index: b/arch/s390/kernel/ptrace.c
-===================================================================
---- a/arch/s390/kernel/ptrace.c
-+++ b/arch/s390/kernel/ptrace.c
-@@ -30,6 +30,7 @@
+--- linux-2.6/arch/s390/kernel/ptrace.c
++++ linux-2.6/arch/s390/kernel/ptrace.c
+@@ -30,10 +30,12 @@
  #include <linux/errno.h>
  #include <linux/ptrace.h>
  #include <linux/tracehook.h>
@@ -34,15 +30,12 @@
  #include <linux/user.h>
  #include <linux/security.h>
  #include <linux/audit.h>
-@@ -42,6 +43,7 @@
- #include <asm/system.h>
- #include <asm/uaccess.h>
- #include <asm/unistd.h>
-+#include <asm/elf.h>
+ #include <linux/signal.h>
++#include <linux/elf.h>
  
- #ifdef CONFIG_COMPAT
- #include "compat_ptrace.h"
-@@ -116,640 +118,462 @@ tracehook_single_step_enabled(struct tas
+ #include <asm/segment.h>
+ #include <asm/page.h>
+@@ -116,628 +118,482 @@ tracehook_single_step_enabled(struct tas
  	return task->thread.per_info.single_step;
  }
  
@@ -170,13 +163,15 @@
 +		unsigned long pswmask = regs->psw.mask;
 +		ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
 +					   &pswmask, PT_PSWMASK, PT_PSWADDR);
-+		if (pswmask != PSW_MASK_MERGE(psw_user_bits, pswmask)
++		if (ret == 0 &&
 +#ifdef CONFIG_COMPAT
-+		    && pswmask != PSW_MASK_MERGE(psw_user32_bits, pswmask)
++		    pswmask != PSW_MASK_MERGE(psw_user32_bits, pswmask) &&
 +#endif
-+			)
++		    pswmask != PSW_MASK_MERGE(psw_user_bits, pswmask))
 +			/* Invalid psw mask. */
-+			return -EINVAL;
++			ret = -EINVAL;
++		if (ret)
++			return ret;
 +		regs->psw.mask = pswmask;
 +		FixPerRegisters(target);
 +	}
@@ -195,6 +190,8 @@
 +		ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
 +					   &regs->psw.addr, PT_PSWADDR,
 +					   PT_ACR0);
++		if (ret)
++			return ret;
 +#ifndef CONFIG_64BIT
 +		/* I'd like to reject addresses without the
 +		   high order bit but older gdb's rely on it */
@@ -276,6 +273,14 @@
 -#endif
 -		    data != PSW_MASK_MERGE(psw_user_bits, data))
 -			/* Invalid psw mask. */
+-			return -EINVAL;
+-#ifndef CONFIG_64BIT
+-		if (addr == (addr_t) &dummy->regs.psw.addr)
+-			/* I'd like to reject addresses without the
+-			   high order bit but older gdb's rely on it */
+-			data |= PSW_ADDR_AMODE;
+-#endif
+-		*(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data;
 +static int
 +fpregs_set(struct task_struct *target,
 +	    const struct utrace_regset *regset,
@@ -288,23 +293,13 @@
 +		save_fp_regs(&target->thread.fp_regs);
 +
 +	/* If setting FPC, must validate it first. */
-+	if (count > 0 && pos == 0) {
-+		unsigned long fpc;
++	if (count > 0 && pos < offsetof(s390_fp_regs, fprs)) {
++		u32 fpc[2] = { target->thread.fp_regs.fpc, 0 };
++		BUILD_BUG_ON(offsetof(s390_fp_regs, fprs) != sizeof(fpc));
 +		ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
 +					   &fpc, 0, sizeof(fpc));
 +		if (ret)
 +			return ret;
-+
-+		if ((fpc & ~((unsigned long) FPC_VALID_MASK
-+			     << (BITS_PER_LONG - 32))) != 0)
- 			return -EINVAL;
--#ifndef CONFIG_64BIT
--		if (addr == (addr_t) &dummy->regs.psw.addr)
--			/* I'd like to reject addresses without the
--			   high order bit but older gdb's rely on it */
--			data |= PSW_ADDR_AMODE;
--#endif
--		*(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data;
  
 -	} else if (addr < (addr_t) (&dummy->regs.orig_gpr2)) {
 -		/*
@@ -323,17 +318,16 @@
 -		else
 -#endif
 -		*(addr_t *)((addr_t) &child->thread.acrs + offset) = data;
-+		memcpy(&target->thread.fp_regs, &fpc, sizeof(fpc));
-+	}
++		if ((fpc[0] & ~FPC_VALID_MASK) != 0 || fpc[1] != 0)
++			return -EINVAL;
  
 -	} else if (addr == (addr_t) &dummy->regs.orig_gpr2) {
 -		/*
 -		 * orig_gpr2 is stored on the kernel stack
 -		 */
 -		task_pt_regs(child)->orig_gpr2 = data;
-+	if (ret == 0)
-+		ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
-+					   &target->thread.fp_regs, 0, -1);
++		target->thread.fp_regs.fpc = fpc[0];
++	}
  
 -	} else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) {
 -		/*
@@ -345,8 +339,9 @@
 -			return -EINVAL;
 -		offset = addr - (addr_t) &dummy->regs.fp_regs;
 -		*(addr_t *)((addr_t) &child->thread.fp_regs + offset) = data;
-+	if (ret == 0 && target == current)
-+		restore_fp_regs(&target->thread.fp_regs);
++	if (ret == 0 && count > 0)
++		ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
++					   target->thread.fp_regs.fprs, 0, -1);
  
 -	} else if (addr < (addr_t) (&dummy->regs.per_info + 1)) {
 -		/*
@@ -354,7 +349,9 @@
 -		 */
 -		offset = addr - (addr_t) &dummy->regs.per_info;
 -		*(addr_t *)((addr_t) &child->thread.per_info + offset) = data;
--
++	if (ret == 0 && target == current)
++		restore_fp_regs(&target->thread.fp_regs);
+ 
 -	}
 +	return ret;
 +}
@@ -378,20 +375,18 @@
 +	     unsigned int pos, unsigned int count,
 +	     const void *kbuf, const void __user *ubuf)
  {
--	unsigned long tmp;
 -	ptrace_area parea; 
 -	int copied, ret;
--
++	int ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
++				       &target->thread.per_info, 0, -1);
+ 
 -	switch (request) {
 -	case PTRACE_PEEKTEXT:
 -	case PTRACE_PEEKDATA:
 -		/* Remove high order bit from address (only for 31 bit). */
 -		addr &= PSW_ADDR_INSN;
 -		/* read word at location addr. */
--		copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
--		if (copied != sizeof(tmp))
--			return -EIO;
--		return put_user(tmp, (unsigned long __force __user *) data);
+-		return generic_ptrace_peekdata(child, addr, data);
 -
 -	case PTRACE_PEEKUSR:
 -		/* read the word at location addr in the USER area. */
@@ -402,10 +397,7 @@
 -		/* Remove high order bit from address (only for 31 bit). */
 -		addr &= PSW_ADDR_INSN;
 -		/* write the word at location addr. */
--		copied = access_process_vm(child, addr, &data, sizeof(data),1);
--		if (copied != sizeof(data))
--			return -EIO;
--		return 0;
+-		return generic_ptrace_pokedata(child, addr, data);
 -
 -	case PTRACE_POKEUSR:
 -		/* write the word at location addr in the USER area */
@@ -438,9 +430,6 @@
 -		return 0;
 -	}
 -	return ptrace_request(child, request, addr, data);
-+	int ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
-+				       &target->thread.per_info, 0, -1);
-+
 +	FixPerRegisters(target);
 +
 +	return ret;
@@ -478,11 +467,13 @@
 -		return -EIO;
 +static const struct utrace_regset native_regsets[] = {
 +	{
++		.core_note_type = NT_PRSTATUS,
 +		.size = sizeof(long), .align = sizeof(long),
 +		.n = sizeof(s390_regs) / sizeof(long),
 +		.get = genregs_get, .set = genregs_set
 +	},
 +	{
++		.core_note_type = NT_PRFPREG,
 +		.size = sizeof(long), .align = sizeof(long),
 +		.n = sizeof(s390_fp_regs) / sizeof(long),
 +		.get = fpregs_get, .set = fpregs_set
@@ -539,12 +530,13 @@
 +	int ret = 0;
 +
 +	/* Fake a 31 bit psw mask. */
-+	if (count > 0 && pos == PT_PSWMASK / 2) {
++	if (count > 0 && pos == offsetof(struct user_regs_struct32, psw.mask)) {
 +		u32 pswmask = PSW32_MASK_MERGE(psw32_user_bits,
 +					       (u32) (regs->psw.mask >> 32));
-+		ret = utrace_regset_copyout(&pos, &count, &kbuf, &ubuf,
-+					    &pswmask, PT_PSWMASK / 2,
-+					    PT_PSWADDR / 2);
++		ret = utrace_regset_copyout(
++			&pos, &count, &kbuf, &ubuf, &pswmask,
++			offsetof(struct user_regs_struct32, psw.mask),
++			offsetof(struct user_regs_struct32, psw.addr));
 +	}
  
 -	} else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) {
@@ -554,11 +546,13 @@
 -	        offset = addr - (addr_t) &dummy32->regs.fp_regs;
 -		tmp = *(__u32 *)((addr_t) &child->thread.fp_regs + offset);
 +	/* Fake a 31 bit psw address. */
-+	if (ret == 0 && count > 0 && pos == PT_PSWADDR / 2) {
++	if (ret == 0 && count > 0 &&
++	    pos == offsetof(struct user_regs_struct32, psw.addr)) {
 +		u32 pswaddr = (u32) regs->psw.addr | PSW32_ADDR_AMODE31;
-+		ret = utrace_regset_copyout(&pos, &count, &kbuf, &ubuf,
-+					    &pswaddr, PT_PSWADDR / 2,
-+					    PT_GPR0 / 2);
++		ret = utrace_regset_copyout(
++			&pos, &count, &kbuf, &ubuf, &pswaddr,
++			offsetof(struct user_regs_struct32, psw.addr),
++			offsetof(struct user_regs_struct32, gprs[0]));
 +	}
  
 -	} else if (addr < (addr_t) (&dummy32->regs.per_info + 1)) {
@@ -574,8 +568,11 @@
 -		    offset == (addr_t) &dummy_per32->lowcore.words.address)
 -			offset = offset*2 + 4;
 +	/* The GPRs are directly on the stack.  Just truncate them.  */
-+	while (ret == 0 && count > 0 && pos < PT_ACR0 / 2) {
-+		u32 value = regs->gprs[(pos - PT_GPR0 / 2) / sizeof(u32)];
++	while (ret == 0 && count > 0 &&
++	       pos < offsetof(struct user_regs_struct32, acrs[0])) {
++		unsigned int n =
++			pos - offsetof(struct user_regs_struct32, gprs[0]);
++		u32 value = regs->gprs[n / sizeof(u32)];
 +		if (kbuf) {
 +			*(u32 *) kbuf = value;
 +			kbuf += sizeof(u32);
@@ -593,14 +590,14 @@
 -	} else
 -		tmp = 0;
 +	/* The ACRs are kept in the thread_struct.  */
-+	if (ret == 0 && count > 0 && pos < PT_ACR0 / 2 + NUM_ACRS * ACR_SIZE) {
++	if (ret == 0 && count > 0 &&
++	    pos < offsetof(struct user_regs_struct32, acrs[NUM_ACRS])) {
 +		if (target == current)
 +			save_access_regs(target->thread.acrs);
-+
-+		ret = utrace_regset_copyout(&pos, &count, &kbuf, &ubuf,
-+					    target->thread.acrs,
-+					    PT_ACR0 / 2,
-+					    PT_ACR0 / 2 + NUM_ACRS * ACR_SIZE);
++		ret = utrace_regset_copyout(
++			&pos, &count, &kbuf, &ubuf, target->thread.acrs,
++			offsetof(struct user_regs_struct32, acrs[0]),
++			offsetof(struct user_regs_struct32, acrs[NUM_ACRS]));
 +	}
  
 -	return put_user(tmp, (__u32 __user *) data);
@@ -608,8 +605,7 @@
 +	if (count > 0) {
 +		if (kbuf)
 +			*(u32 *) kbuf = regs->orig_gpr2;
-+		else if (put_user((u32) regs->orig_gpr2,
-+				  (u32 __user *) ubuf))
++		else if (put_user((u32) regs->orig_gpr2, (u32 __user *) ubuf))
 +			return -EFAULT;
 +	}
 +
@@ -635,18 +631,19 @@
 +	int ret = 0;
 +
 +	/* Check for an invalid PSW mask.  */
-+	if (count > 0 && pos == PT_PSWMASK / 2) {
++	if (count > 0 && pos == offsetof(struct user_regs_struct32, psw.mask)) {
 +		u32 pswmask;
-+		ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
-+					   &pswmask, PT_PSWMASK / 2,
-+					   PT_PSWADDR / 2);
++		ret = utrace_regset_copyin(
++			&pos, &count, &kbuf, &ubuf, &pswmask,
++			offsetof(struct user_regs_struct32, psw.mask),
++			offsetof(struct user_regs_struct32, psw.addr));
 +		if (ret)
 +			return ret;
  
 -	if (!test_thread_flag(TIF_31BIT) ||
 -	    (addr & 3) || addr > sizeof(struct user32) - 3)
 -		return -EIO;
-+		if (pswmask != PSW_MASK_MERGE(psw_user32_bits, pswmask))
++		if (pswmask != PSW32_MASK_MERGE(psw32_user_bits, pswmask))
 +			/* Invalid psw mask. */
 +			return -EINVAL;
  
@@ -663,11 +660,12 @@
 -		 */
 -		if (addr == (addr_t) &dummy32->regs.psw.mask) {
 +	/* Build a 64 bit psw address from 31 bit address. */
-+	if (count > 0 && pos == PT_PSWADDR / 2) {
++	if (count > 0 && pos == offsetof(struct user_regs_struct32, psw.addr)) {
 +		u32 pswaddr;
-+		ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
-+					   &pswaddr, PT_PSWADDR / 2,
-+					   PT_GPR0 / 2);
++		ret = utrace_regset_copyin(
++			&pos, &count, &kbuf, &ubuf, &pswaddr,
++			offsetof(struct user_regs_struct32, psw.addr),
++			offsetof(struct user_regs_struct32, gprs[0]));
 +		if (ret == 0)
  			/* Build a 64 bit psw mask from 31 bit mask. */
 -			if (tmp != PSW32_MASK_MERGE(psw32_user_bits, tmp))
@@ -687,7 +685,10 @@
 +	}
 +
 +	/* The GPRs are directly onto the stack. */
-+	while (ret == 0 && count > 0 && pos < PT_ACR0 / 2) {
++	while (ret == 0 && count > 0 &&
++	       pos < offsetof(struct user_regs_struct32, acrs[0])) {
++		unsigned int n =
++			pos - offsetof(struct user_regs_struct32, gprs[0]);
 +		u32 value;
 +
 +		if (kbuf) {
@@ -712,7 +713,7 @@
 -		 * orig_gpr2 is stored on the kernel stack
 -		 */
 -		*(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4) = tmp;
-+		regs->gprs[(pos - PT_GPR0 / 2) / sizeof(u32)] = value;
++		regs->gprs[n / sizeof(u32)] = value;
 +	}
  
 -	} else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) {
@@ -726,16 +727,17 @@
 -	        offset = addr - (addr_t) &dummy32->regs.fp_regs;
 -		*(__u32 *)((addr_t) &child->thread.fp_regs + offset) = tmp;
 +	/* The ACRs are kept in the thread_struct.  */
-+	if (count > 0 && pos < PT_ORIGGPR2 / 2) {
-+		if (target == current
-+		    && (pos != PT_ACR0 / 2
-+			|| count < sizeof(target->thread.acrs)))
++	if (count > 0 &&
++	    pos < offsetof(struct user_regs_struct32, acrs[NUM_ACRS])) {
++		if (target == current &&
++		    (pos != offsetof(struct user_regs_struct32, acrs[0]) ||
++		     count < sizeof(target->thread.acrs)))
 +			save_access_regs(target->thread.acrs);
 +
-+		ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
-+					   target->thread.acrs,
-+					   PT_ACR0 / 2,
-+					   PT_ACR0 / 2 + NUM_ACRS * ACR_SIZE);
++		ret = utrace_regset_copyin(
++			&pos, &count, &kbuf, &ubuf, target->thread.acrs,
++			offsetof(struct user_regs_struct32, acrs[0]),
++			offsetof(struct user_regs_struct32, acrs[NUM_ACRS]));
  
 -	} else if (addr < (addr_t) (&dummy32->regs.per_info + 1)) {
 -		/*
@@ -968,7 +970,7 @@
 -		tracehook_disable_single_step(child);
 -		wake_up_process(child);
 -		return 0;
--
+ 
 -	case PTRACE_KILL:
 -		/*
 -		 * make the child exit.  Best I can do is send it a sigkill. 
@@ -996,21 +998,19 @@
 -		/* give it a chance to run. */
 -		wake_up_process(child);
 -		return 0;
--
--	case PTRACE_DETACH:
--		/* detach a process that was attached. */
--		return ptrace_detach(child, data);
- 
 +static const struct utrace_regset s390_compat_regsets[] = {
 +	{
++		.core_note_type = NT_PRSTATUS,
 +		.size = sizeof(u32), .align = sizeof(u32),
-+		.n = sizeof(s390_regs) / sizeof(long),
++		.n = offsetof(struct user_regs_struct32, fp_regs) / sizeof(u32),
 +		.get = s390_genregs_get, .set = s390_genregs_set
 +	},
 +	{
++		.core_note_type = NT_PRFPREG,
 +		.size = sizeof(u32), .align = sizeof(u32),
 +		.n = sizeof(s390_fp_regs) / sizeof(u32),
 +		.get = fpregs_get, .set = fpregs_set
++
 +	},
 +	{
 +		.size = sizeof(u32), .align = sizeof(u32),

linux-2.6-utrace-regset-sparc64.patch:

Index: linux-2.6-utrace-regset-sparc64.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-regset-sparc64.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-regset-sparc64.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-regset-sparc64.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -9,14 +9,12 @@
 ---
 
  arch/sparc64/kernel/Makefile  |    2 
- arch/sparc64/kernel/ptrace.c  |  631 +++++++++++++++++++++++++++++++++++++-----
+ arch/sparc64/kernel/ptrace.c  |  635 +++++++++++++++++++++++++++++++++++++----
  arch/sparc64/kernel/systbls.S |    4 
- 3 files changed, 568 insertions(+), 69 deletions(-)
+ 3 files changed, 572 insertions(+), 69 deletions(-)
 
-Index: b/arch/sparc64/kernel/Makefile
-===================================================================
---- a/arch/sparc64/kernel/Makefile
-+++ b/arch/sparc64/kernel/Makefile
+--- linux-2.6/arch/sparc64/kernel/Makefile
++++ linux-2.6/arch/sparc64/kernel/Makefile
 @@ -5,6 +5,8 @@
  EXTRA_AFLAGS := -ansi
  EXTRA_CFLAGS := -Werror
@@ -26,10 +24,8 @@
  extra-y		:= head.o init_task.o vmlinux.lds
  
  obj-y		:= process.o setup.o cpu.o idprom.o \
-Index: b/arch/sparc64/kernel/ptrace.c
-===================================================================
---- a/arch/sparc64/kernel/ptrace.c
-+++ b/arch/sparc64/kernel/ptrace.c
+--- linux-2.6/arch/sparc64/kernel/ptrace.c
++++ linux-2.6/arch/sparc64/kernel/ptrace.c
 @@ -1,6 +1,6 @@
 -/* ptrace.c: Sparc process tracing support.
 +/* ptrace.c: Sparc64 process tracing support.
@@ -39,7 +35,7 @@
   * Copyright (C) 1997 Jakub Jelinek (jj at sunsite.mff.cuni.cz)
   *
   * Based upon code written by Ross Biro, Linus Torvalds, Bob Manson,
-@@ -11,106 +11,603 @@
+@@ -11,106 +11,607 @@
   */
  
  #include <linux/kernel.h>
@@ -217,9 +213,8 @@
 +	}
 +
 +	return err;
- }
- 
--static inline void pt_succ_return(struct pt_regs *regs, unsigned long value)
++}
++
 +#define FPREG_F0	0
 +#define FPREG_FSR	32
 +#define FPREG_GSR	33
@@ -231,11 +226,7 @@
 +		      const struct utrace_regset *regset,
 +		      unsigned int pos, unsigned int count,
 +		      void *kbuf, void __user *ubuf)
- {
--	regs->u_regs[UREG_I0] = value;
--	regs->tstate &= ~(TSTATE_ICARRY | TSTATE_XCARRY);
--	regs->tpc = regs->tnpc;
--	regs->tnpc += 4;
++{
 +	struct thread_info *t = task_thread_info(target);
 +	int err;
 +
@@ -264,22 +255,16 @@
 +	return err;
  }
  
--static inline void
--pt_succ_return_linux(struct pt_regs *regs, unsigned long value, void __user *addr)
+-static inline void pt_succ_return(struct pt_regs *regs, unsigned long value)
 +static int fpregs_set(struct task_struct *target,
 +		      const struct utrace_regset *regset,
 +		      unsigned int pos, unsigned int count,
 +		      const void *kbuf, const void __user *ubuf)
  {
--	if (test_thread_flag(TIF_32BIT)) {
--		if (put_user(value, (unsigned int __user *) addr)) {
--			pt_error_return(regs, EFAULT);
--			return;
--		}
--	} else {
--		if (put_user(value, (long __user *) addr)) {
--			pt_error_return(regs, EFAULT);
--			return;
+-	regs->u_regs[UREG_I0] = value;
+-	regs->tstate &= ~(TSTATE_ICARRY | TSTATE_XCARRY);
+-	regs->tpc = regs->tnpc;
+-	regs->tnpc += 4;
 +	struct thread_info *t = task_thread_info(target);
 +	int err;
 +
@@ -306,15 +291,19 @@
 +	}
 +
 +	return err;
-+}
-+
+ }
+ 
+-static inline void
+-pt_succ_return_linux(struct pt_regs *regs, unsigned long value, void __user *addr)
 +static const struct utrace_regset native_regsets[] = {
 +	{
++		.core_note_type = NT_PRSTATUS,
 +		.n = SPARC64_NGREGS,
 +		.size = sizeof(long), .align = sizeof(long),
 +		.get = genregs_get, .set = genregs_set
 +	},
 +	{
++		.core_note_type = NT_PRFPREG,
 +		.n = SPARC64_NFPREGS,
 +		.size = sizeof(long), .align = sizeof(long),
 +		.get = fpregs_get, .set = fpregs_set
@@ -345,7 +334,16 @@
 +			 const struct utrace_regset *regset,
 +			 unsigned int pos, unsigned int count,
 +			 void *kbuf, void __user *ubuf)
-+{
+ {
+-	if (test_thread_flag(TIF_32BIT)) {
+-		if (put_user(value, (unsigned int __user *) addr)) {
+-			pt_error_return(regs, EFAULT);
+-			return;
+-		}
+-	} else {
+-		if (put_user(value, (long __user *) addr)) {
+-			pt_error_return(regs, EFAULT);
+-			return;
 +	struct pt_regs *regs = task_pt_regs(target);
 +
 +	while (count > 0 && pos < (GENREG32_L0 * 4)) {
@@ -669,11 +667,13 @@
 +
 +static const struct utrace_regset sparc32_regsets[] = {
 +	{
++		.core_note_type = NT_PRSTATUS,
 +		.n = SPARC32_NGREGS,
 +		.size = sizeof(u32), .align = sizeof(u32),
 +		.get = genregs32_get, .set = genregs32_set
 +	},
 +	{
++		.core_note_type = NT_PRFPREG,
 +		.n = SPARC32_NFPREGS,
 +		.size = sizeof(u32), .align = sizeof(u32),
 +		.get = fpregs32_get, .set = fpregs32_set
@@ -708,11 +708,9 @@
  /* To get the necessary page struct, access_process_vm() first calls
   * get_user_pages().  This has done a flush_dcache_page() on the
   * accessed page.  Then our caller (copy_{to,from}_user_page()) did
-Index: b/arch/sparc64/kernel/systbls.S
-===================================================================
---- a/arch/sparc64/kernel/systbls.S
-+++ b/arch/sparc64/kernel/systbls.S
-@@ -24,7 +24,7 @@ sys_call_table32:
+--- linux-2.6/arch/sparc64/kernel/systbls.S
++++ linux-2.6/arch/sparc64/kernel/systbls.S
+@@ -23,7 +23,7 @@ sys_call_table32:
  /*10*/  .word sys_unlink, sunos_execv, sys_chdir, sys32_chown16, sys32_mknod
  /*15*/	.word sys_chmod, sys32_lchown16, sparc_brk, sys32_perfctr, sys32_lseek
  /*20*/	.word sys_getpid, sys_capget, sys_capset, sys32_setuid16, sys32_getuid16
@@ -721,7 +719,7 @@
  /*30*/	.word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice
  	.word sys_chown, sys_sync, sys32_kill, compat_sys_newstat, sys32_sendfile
  /*40*/	.word compat_sys_newlstat, sys_dup, sys_pipe, compat_sys_times, sys_getuid
-@@ -168,7 +168,7 @@ sunos_sys_table:
+@@ -169,7 +169,7 @@ sunos_sys_table:
  	.word sys_chmod, sys32_lchown16, sunos_brk
  	.word sunos_nosys, sys32_lseek, sunos_getpid
  	.word sunos_nosys, sunos_nosys, sunos_nosys

linux-2.6-utrace-regset.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.2 -r 1.3 linux-2.6-utrace-regset.patch
Index: linux-2.6-utrace-regset.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-regset.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-regset.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-regset.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -11,1169 +11,939 @@
 
 ---
 
- arch/i386/kernel/i387.c             |  143 +++---
- arch/i386/kernel/ptrace.c           |  822 ++++++++++++++++++++----------------
- arch/powerpc/kernel/Makefile        |    4 
- arch/powerpc/kernel/ptrace-common.h |  145 ------
- arch/powerpc/kernel/ptrace.c        |  718 +++++++++++++++----------------
- arch/powerpc/kernel/ptrace32.c      |  443 -------------------
- arch/x86_64/ia32/fpu32.c            |   92 +++-
- arch/x86_64/ia32/ptrace32.c         |  721 ++++++++++++++++++++-----------
- arch/x86_64/kernel/ptrace.c         |  730 +++++++++++++++++++------------
- include/asm-i386/i387.h             |   13 
- include/asm-x86_64/fpu32.h          |    3 
- include/asm-x86_64/tracehook.h      |    8 
- include/linux/tracehook.h           |  244 ++++++++++
- kernel/ptrace.c                     |    8 
- 14 files changed, 2125 insertions(+), 1969 deletions(-)
- delete arch/powerpc/kernel/ptrace32.c
- delete arch/powerpc/kernel/ptrace-common.h
+ arch/powerpc/kernel/Makefile   |    2 
+ arch/powerpc/kernel/ptrace32.c |   20 -
+ arch/powerpc/kernel/ptrace.c   |  644 ++++++++++++++++++++++----------
+ arch/x86/ia32/ptrace32.c       |  721 +++++++++++++++++++++++-------------
+ arch/x86/ia32/fpu32.c          |   92 ++++-
+ arch/x86/kernel/ptrace_32.c    |  806 +++++++++++++++++++++++-----------------
+ arch/x86/kernel/i387_32.c      |  143 ++++---
+ arch/x86/kernel/ptrace_64.c    |  720 ++++++++++++++++++++++--------------
+ kernel/ptrace.c                |    9 
+ include/linux/tracehook.h      |  255 ++++++++++++-
+ include/asm-x86/fpu32.h        |    3 
+ include/asm-x86/i387_32.h      |   13 -
+ include/asm-x86/tracehook.h    |    8 
+ 13 files changed, 2228 insertions(+), 1208 deletions(-)
 
-Index: b/arch/i386/kernel/i387.c
-===================================================================
---- a/arch/i386/kernel/i387.c
-+++ b/arch/i386/kernel/i387.c
-@@ -222,14 +222,10 @@ void set_fpu_twd( struct task_struct *ts
-  * FXSR floating point environment conversions.
+--- linux-2.6/arch/powerpc/kernel/Makefile
++++ linux-2.6/arch/powerpc/kernel/Makefile
+@@ -10,6 +10,8 @@ CFLAGS_prom_init.o      += -fPIC
+ CFLAGS_btext.o		+= -fPIC
+ endif
+ 
++CFLAGS_ptrace.o		+= -DUTS_MACHINE='"$(UTS_MACHINE)"'
++
+ obj-y				:= semaphore.o cputable.o ptrace.o syscalls.o \
+ 				   irq.o align.o signal_32.o pmc.o vdso.o \
+ 				   init_task.o process.o systbl.o idle.o \
+--- linux-2.6/arch/powerpc/kernel/ptrace32.c
++++ linux-2.6/arch/powerpc/kernel/ptrace32.c
+@@ -35,10 +35,6 @@
+ #include <asm/system.h>
+ #include <asm/tracehook.h>
+ 
+-/*
+- * does not yet catch signals sent when the child dies.
+- * in exit.c or in signal.c.
+- */
+ 
+ /*
+  * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls,
+@@ -173,7 +169,7 @@ long compat_sys_ptrace(int request, int 
+ 
+ 		CHECK_FULL_REGS(child->thread.regs);
+ 		if (index < PT_FPR0) {
+-			tmp = ptrace_get_reg(child, index);
++			tmp = 0;/*ptrace_get_reg(child, index);*/
+ 		} else {
+ 			flush_fp_to_thread(child);
+ 			/*
+@@ -223,7 +219,7 @@ long compat_sys_ptrace(int request, int 
+ 			flush_fp_to_thread(child);
+ 			tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0];
+ 		} else { /* register within PT_REGS struct */
+-			tmp = ptrace_get_reg(child, numReg);
++/*			tmp = ptrace_get_reg(child, numReg);*/
+ 		} 
+ 		reg32bits = ((u32*)&tmp)[part];
+ 		ret = put_user(reg32bits, (u32 __user *)data);
+@@ -281,7 +277,7 @@ long compat_sys_ptrace(int request, int 
+ 
+ 		CHECK_FULL_REGS(child->thread.regs);
+ 		if (index < PT_FPR0) {
+-			ret = ptrace_put_reg(child, index, data);
++/*			ret = ptrace_put_reg(child, index, data);*/
+ 		} else {
+ 			flush_fp_to_thread(child);
+ 			/*
+@@ -319,12 +315,12 @@ long compat_sys_ptrace(int request, int 
+ 			break;
+ 		CHECK_FULL_REGS(child->thread.regs);
+ 		if (numReg < PT_FPR0) {
+-			unsigned long freg = ptrace_get_reg(child, numReg);
++			unsigned long freg = 0;/*ptrace_get_reg(child, numReg);*/
+ 			if (index % 2)
+ 				freg = (freg & ~0xfffffffful) | (data & 0xfffffffful);
+ 			else
+ 				freg = (freg & 0xfffffffful) | (data << 32);
+-			ret = ptrace_put_reg(child, numReg, freg);
++/*			ret = ptrace_put_reg(child, numReg, freg);*/
+ 		} else {
+ 			flush_fp_to_thread(child);
+ 			((unsigned int *)child->thread.regs)[index] = data;
+@@ -358,8 +354,8 @@ long compat_sys_ptrace(int request, int 
+ 		CHECK_FULL_REGS(child->thread.regs);
+ 		ret = 0;
+ 		for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
+-			ret |= __put_user(ptrace_get_reg(child, ui),
+-					  (unsigned int __user *) data);
++/*			ret |= __put_user(ptrace_get_reg(child, ui),
++					  (unsigned int __user *) data);*/
+ 			data += sizeof(int);
+ 		}
+ 		break;
+@@ -379,7 +375,7 @@ long compat_sys_ptrace(int request, int 
+ 			ret = __get_user(tmp, (unsigned int __user *) data);
+ 			if (ret)
+ 				break;
+-			ptrace_put_reg(child, ui, tmp);
++/*			ptrace_put_reg(child, ui, tmp);*/
+ 			data += sizeof(int);
+ 		}
+ 		break;
+--- linux-2.6/arch/powerpc/kernel/ptrace.c
++++ linux-2.6/arch/powerpc/kernel/ptrace.c
+@@ -27,6 +27,7 @@
+ #include <linux/signal.h>
+ #include <linux/seccomp.h>
+ #include <linux/audit.h>
++#include <linux/elf.h>
+ #ifdef CONFIG_PPC32
+ #include <linux/module.h>
+ #endif
+@@ -38,11 +39,6 @@
+ #include <asm/tracehook.h>
+ 
+ /*
+- * does not yet catch signals sent when the child dies.
+- * in exit.c or in signal.c.
+- */
+-
+-/*
+  * Set of msr bits that gdb can change on behalf of a process.
   */
+ #if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
+@@ -60,69 +56,120 @@
+ #define PT_MAX_PUT_REG	PT_CCR
+ #endif
  
--static int convert_fxsr_to_user( struct _fpstate __user *buf,
--					struct i387_fxsave_struct *fxsave )
-+static inline void
-+convert_fxsr_env_to_i387(unsigned long env[7],
-+			 struct i387_fxsave_struct *fxsave)
+-/*
+- * Get contents of register REGNO in task TASK.
+- */
+-unsigned long ptrace_get_reg(struct task_struct *task, int regno)
++static int
++genregs_get(struct task_struct *target,
++	    const struct utrace_regset *regset,
++	    unsigned int pos, unsigned int count,
++	    void *kbuf, void __user *ubuf)
  {
--	unsigned long env[7];
--	struct _fpreg __user *to;
--	struct _fpxreg *from;
--	int i;
--
- 	env[0] = (unsigned long)fxsave->cwd | 0xffff0000ul;
- 	env[1] = (unsigned long)fxsave->swd | 0xffff0000ul;
- 	env[2] = twd_fxsr_to_i387(fxsave);
-@@ -237,7 +233,17 @@ static int convert_fxsr_to_user( struct 
- 	env[4] = fxsave->fcs | ((unsigned long)fxsave->fop << 16);
- 	env[5] = fxsave->foo;
- 	env[6] = fxsave->fos;
-+}
-+
-+static int convert_fxsr_to_user(struct _fpstate __user *buf,
-+				struct i387_fxsave_struct *fxsave)
-+{
-+	unsigned long env[7];
-+	struct _fpreg __user *to;
-+	struct _fpxreg *from;
-+	int i;
+-	unsigned long tmp = 0;
++	unsigned long tmp;
[...5750 lines suppressed...]
--static inline int get_vrregs(unsigned long __user *data,
--			     struct task_struct *task)
--{
--	unsigned long regsize;
--
--	/* copy AltiVec registers VR[0] .. VR[31] */
--	regsize = 32 * sizeof(vector128);
--	if (copy_to_user(data, task->thread.vr, regsize))
--		return -EFAULT;
--	data += (regsize / sizeof(unsigned long));
--
--	/* copy VSCR */
--	regsize = 1 * sizeof(vector128);
--	if (copy_to_user(data, &task->thread.vscr, regsize))
--		return -EFAULT;
--	data += (regsize / sizeof(unsigned long));
--
--	/* copy VRSAVE */
--	if (put_user(task->thread.vrsave, (u32 __user *)data))
--		return -EFAULT;
--
--	return 0;
--}
--
--/*
-- * Write contents of AltiVec register state into task TASK.
-- */
--static inline int set_vrregs(struct task_struct *task,
--			     unsigned long __user *data)
--{
--	unsigned long regsize;
--
--	/* copy AltiVec registers VR[0] .. VR[31] */
--	regsize = 32 * sizeof(vector128);
--	if (copy_from_user(task->thread.vr, data, regsize))
--		return -EFAULT;
--	data += (regsize / sizeof(unsigned long));
--
--	/* copy VSCR */
--	regsize = 1 * sizeof(vector128);
--	if (copy_from_user(&task->thread.vscr, data, regsize))
--		return -EFAULT;
--	data += (regsize / sizeof(unsigned long));
--
--	/* copy VRSAVE */
--	if (get_user(task->thread.vrsave, (u32 __user *)data))
--		return -EFAULT;
--
--	return 0;
--}
--#endif
--
--static inline int ptrace_set_debugreg(struct task_struct *task,
--				      unsigned long addr, unsigned long data)
--{
--	/* We only support one DABR and no IABRS at the moment */
--	if (addr > 0)
--		return -EINVAL;
--
--	/* The bottom 3 bits are flags */
--	if ((data & ~0x7UL) >= TASK_SIZE)
--		return -EIO;
--
--	/* Ensure translation is on */
--	if (data && !(data & DABR_TRANSLATION))
--		return -EIO;
--
--	task->thread.dabr = data;
--	return 0;
--}
--
--#endif /* _PPC64_PTRACE_COMMON_H */
-Index: b/kernel/ptrace.c
-===================================================================
---- a/kernel/ptrace.c
-+++ b/kernel/ptrace.c
-@@ -96,12 +96,6 @@ int ptrace_detach(struct task_struct *ch
+ 	/* do the secure computing check first */
+--- linux-2.6/kernel/ptrace.c
++++ linux-2.6/kernel/ptrace.c
+@@ -100,13 +100,6 @@ int ptrace_detach(struct task_struct *ch
  	if (!valid_signal(data))
  		return -EIO;
  
 -	/* Architecture-specific hardware disable .. */
 -	ptrace_disable(child);
+-	clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
 -
 -	/* .. re-parent .. */
 -	child->exit_code = data;
@@ -4420,9 +3854,9 @@
  	return -ENOSYS;
  }
  
-@@ -209,9 +203,7 @@ struct task_struct *ptrace_get_task_stru
- 	return child;
- }
+@@ -218,12 +211,10 @@ struct task_struct *ptrace_get_task_stru
+ #define arch_ptrace_attach(child)	do { } while (0)
+ #endif
  
 -#ifndef __ARCH_SYS_PTRACE
  asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
@@ -4430,10 +3864,11 @@
  	return -ENOSYS;
  }
 -#endif /* __ARCH_SYS_PTRACE */
-Index: b/include/linux/tracehook.h
-===================================================================
---- a/include/linux/tracehook.h
-+++ b/include/linux/tracehook.h
+ 
+ int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
+ {
+--- linux-2.6/include/linux/tracehook.h
++++ linux-2.6/include/linux/tracehook.h
 @@ -52,10 +52,10 @@ struct pt_regs;
   * should be one that can be evaluated in modules, i.e. uses exported symbols.
   *
@@ -4449,7 +3884,7 @@
   * Enabling or disabling redundantly is harmless.
   *
   *	void tracehook_enable_block_step(struct task_struct *tsk);
-@@ -93,6 +93,242 @@ struct pt_regs;
+@@ -93,6 +93,253 @@ struct pt_regs;
   */
  
  
@@ -4489,6 +3924,17 @@
 +	unsigned int bias;	/* Bias from natural indexing.  */
 +
 +	/*
++	 * If nonzero, this gives the n_type field (NT_* value) of the
++	 * core file note in which this regset's data appears.
++	 * NT_PRSTATUS is a special case in that the regset data starts
++	 * at offsetof(struct elf_prstatus, pr_reg) into the note data;
++	 * that is part of the per-machine ELF formats userland knows
++	 * about.  In other cases, the core file note contains exactly
++	 * the whole regset (n*size) and nothing else.
++	 */
++	unsigned int core_note_type;
++
++	/*
 +	 * Return -%ENODEV if not available on the hardware found.
 +	 * Return %0 if no interesting state in this thread.
 +	 * Return >%0 number of @size units of interesting state.
@@ -4692,11 +4138,19 @@
  /*
   * Following are entry points from core code, where the user debugging
   * support can affect the normal behavior.  The locking situation is
-Index: b/include/asm-i386/i387.h
-===================================================================
---- a/include/asm-i386/i387.h
-+++ b/include/asm-i386/i387.h
-@@ -129,17 +129,12 @@ extern int save_i387( struct _fpstate __
+--- linux-2.6/include/asm-x86/fpu32.h
++++ linux-2.6/include/asm-x86/fpu32.h
+@@ -7,4 +7,7 @@ int restore_i387_ia32(struct task_struct
+ int save_i387_ia32(struct task_struct *tsk, struct _fpstate_ia32 __user *buf, 
+ 		   struct pt_regs *regs, int fsave);
+ 
++int get_fpregs32(struct user_i387_ia32_struct *, struct task_struct *);
++int set_fpregs32(struct task_struct *, const struct user_i387_ia32_struct *);
++
+ #endif
+--- linux-2.6/include/asm-x86/i387_32.h
++++ linux-2.6/include/asm-x86/i387_32.h
+@@ -130,17 +130,12 @@ extern int save_i387( struct _fpstate __
  extern int restore_i387( struct _fpstate __user *buf );
  
  /*
@@ -4718,25 +4172,11 @@
  
  /*
   * FPU state for core dumps...
-Index: b/include/asm-x86_64/fpu32.h
-===================================================================
---- a/include/asm-x86_64/fpu32.h
-+++ b/include/asm-x86_64/fpu32.h
-@@ -7,4 +7,7 @@ int restore_i387_ia32(struct task_struct
- int save_i387_ia32(struct task_struct *tsk, struct _fpstate_ia32 __user *buf, 
- 		   struct pt_regs *regs, int fsave);
+--- linux-2.6/include/asm-x86/tracehook.h
++++ linux-2.6/include/asm-x86/tracehook.h
+@@ -60,4 +60,12 @@ static inline void tracehook_abort_sysca
  
-+int get_fpregs32(struct user_i387_ia32_struct *, struct task_struct *);
-+int set_fpregs32(struct task_struct *, const struct user_i387_ia32_struct *);
-+
  #endif
-Index: b/include/asm-x86_64/tracehook.h
-===================================================================
---- a/include/asm-x86_64/tracehook.h
-+++ b/include/asm-x86_64/tracehook.h
-@@ -48,4 +48,12 @@ static inline void tracehook_abort_sysca
- 	regs->orig_rax = -1L;
- }
  
 +/*
 + * These are used directly by some of the regset code.

linux-2.6-utrace-tracehook-ia64.patch:

Index: linux-2.6-utrace-tracehook-ia64.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-tracehook-ia64.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-tracehook-ia64.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-tracehook-ia64.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -8,19 +8,17 @@
 
 ---
 
- arch/ia64/ia32/ia32_entry.S  |    2 -
+ arch/ia64/ia32/ia32_entry.S  |    2 +
  arch/ia64/ia32/sys_ia32.c    |   23 ++-----------
- arch/ia64/kernel/ptrace.c    |   39 +++++-----------------
- arch/ia64/kernel/signal.c    |    4 +-
- include/asm-ia64/tracehook.h |   73 +++++++++++++++++++++++++++++++++++++++++++
+ arch/ia64/kernel/ptrace.c    |   39 ++++++----------------
+ arch/ia64/kernel/signal.c    |    4 ++
+ include/asm-ia64/tracehook.h |   73 ++++++++++++++++++++++++++++++++++++++++++
  5 files changed, 91 insertions(+), 50 deletions(-)
  create include/asm-ia64/tracehook.h
 
-Index: b/arch/ia64/ia32/ia32_entry.S
-===================================================================
---- a/arch/ia64/ia32/ia32_entry.S
-+++ b/arch/ia64/ia32/ia32_entry.S
-@@ -236,7 +236,7 @@ ia32_syscall_table:
+--- linux-2.6/arch/ia64/ia32/ia32_entry.S
++++ linux-2.6/arch/ia64/ia32/ia32_entry.S
+@@ -199,7 +199,7 @@ ia32_syscall_table:
  	data8 sys_setuid	/* 16-bit version */
  	data8 sys_getuid	/* 16-bit version */
  	data8 compat_sys_stime    /* 25 */
@@ -29,10 +27,8 @@
  	data8 sys32_alarm
  	data8 sys_ni_syscall
  	data8 sys32_pause
-Index: b/arch/ia64/ia32/sys_ia32.c
-===================================================================
---- a/arch/ia64/ia32/sys_ia32.c
-+++ b/arch/ia64/ia32/sys_ia32.c
+--- linux-2.6/arch/ia64/ia32/sys_ia32.c
++++ linux-2.6/arch/ia64/ia32/sys_ia32.c
 @@ -1436,25 +1436,6 @@ sys32_waitpid (int pid, unsigned int *st
  	return compat_sys_wait4(pid, stat_addr, options, NULL);
  }
@@ -87,10 +83,8 @@
  
  typedef struct {
  	unsigned int	ss_sp;
-Index: b/arch/ia64/kernel/ptrace.c
-===================================================================
---- a/arch/ia64/kernel/ptrace.c
-+++ b/arch/ia64/kernel/ptrace.c
+--- linux-2.6/arch/ia64/kernel/ptrace.c
++++ linux-2.6/arch/ia64/kernel/ptrace.c
 @@ -12,6 +12,7 @@
  #include <linux/mm.h>
  #include <linux/errno.h>
@@ -99,7 +93,7 @@
  #include <linux/smp_lock.h>
  #include <linux/user.h>
  #include <linux/security.h>
-@@ -1598,28 +1599,6 @@ sys_ptrace (long request, pid_t pid, uns
+@@ -1601,28 +1602,6 @@ sys_ptrace (long request, pid_t pid, uns
  	return ret;
  }
  
@@ -128,7 +122,7 @@
  /* "asmlinkage" so the input arguments are preserved... */
  
  asmlinkage void
-@@ -1627,9 +1606,8 @@ syscall_trace_enter (long arg0, long arg
+@@ -1630,9 +1609,8 @@ syscall_trace_enter (long arg0, long arg
  		     long arg4, long arg5, long arg6, long arg7,
  		     struct pt_regs regs)
  {
@@ -140,7 +134,7 @@
  
  	if (unlikely(current->audit_context)) {
  		long syscall;
-@@ -1664,8 +1642,11 @@ syscall_trace_leave (long arg0, long arg
+@@ -1667,8 +1645,11 @@ syscall_trace_leave (long arg0, long arg
  		audit_syscall_exit(success, result);
  	}
  
@@ -156,10 +150,8 @@
 +		tracehook_report_syscall_step(&regs);
 +	}
  }
-Index: b/arch/ia64/kernel/signal.c
-===================================================================
---- a/arch/ia64/kernel/signal.c
-+++ b/arch/ia64/kernel/signal.c
+--- linux-2.6/arch/ia64/kernel/signal.c
++++ linux-2.6/arch/ia64/kernel/signal.c
 @@ -10,7 +10,7 @@
  #include <linux/errno.h>
  #include <linux/kernel.h>
@@ -169,7 +161,7 @@
  #include <linux/sched.h>
  #include <linux/signal.h>
  #include <linux/smp.h>
-@@ -471,6 +471,8 @@ handle_signal (unsigned long sig, struct
+@@ -421,6 +421,8 @@ handle_signal (unsigned long sig, struct
  		sigaddset(&current->blocked, sig);
  	recalc_sigpending();
  	spin_unlock_irq(&current->sighand->siglock);
@@ -178,10 +170,8 @@
  	return 1;
  }
  
-Index: b/include/asm-ia64/tracehook.h
-===================================================================
---- /dev/null
-+++ b/include/asm-ia64/tracehook.h
+--- linux-2.6/include/asm-ia64/tracehook.h
++++ linux-2.6/include/asm-ia64/tracehook.h
 @@ -0,0 +1,73 @@
 +/*
 + * Copyright (C)2006 Intel Co

linux-2.6-utrace-tracehook-s390.patch:

Index: linux-2.6-utrace-tracehook-s390.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-tracehook-s390.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-tracehook-s390.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-tracehook-s390.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -7,18 +7,16 @@
 
 ---
 
+ arch/s390/kernel/traps.c         |    6 ++--
  arch/s390/kernel/compat_signal.c |    5 ++-
- arch/s390/kernel/ptrace.c        |   62 +++++++++++++++++++++------------------
- arch/s390/kernel/signal.c        |    3 +
- arch/s390/kernel/traps.c         |    6 +--
+ arch/s390/kernel/ptrace.c        |   62 +++++++++++++++++++++-----------------
+ arch/s390/kernel/signal.c        |    3 ++
  include/asm-s390/tracehook.h     |   46 ++++++++++++++++++++++++++++
  5 files changed, 90 insertions(+), 32 deletions(-)
  create include/asm-s390/tracehook.h
 
-Index: b/arch/s390/kernel/traps.c
-===================================================================
---- a/arch/s390/kernel/traps.c
-+++ b/arch/s390/kernel/traps.c
+--- linux-2.6/arch/s390/kernel/traps.c
++++ linux-2.6/arch/s390/kernel/traps.c
 @@ -18,7 +18,7 @@
  #include <linux/kernel.h>
  #include <linux/string.h>
@@ -28,7 +26,7 @@
  #include <linux/timer.h>
  #include <linux/mm.h>
  #include <linux/smp.h>
-@@ -360,7 +360,7 @@ void __kprobes do_single_step(struct pt_
+@@ -340,7 +340,7 @@ void __kprobes do_single_step(struct pt_
  					SIGTRAP) == NOTIFY_STOP){
  		return;
  	}
@@ -37,7 +35,7 @@
  		force_sig(SIGTRAP, current);
  }
  
-@@ -461,7 +461,7 @@ static void illegal_op(struct pt_regs * 
+@@ -441,7 +441,7 @@ static void illegal_op(struct pt_regs * 
  		if (get_user(*((__u16 *) opcode), (__u16 __user *) location))
  			return;
  		if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) {
@@ -46,11 +44,9 @@
  				force_sig(SIGTRAP, current);
  			else
  				signal = SIGILL;
-Index: b/arch/s390/kernel/compat_signal.c
-===================================================================
---- a/arch/s390/kernel/compat_signal.c
-+++ b/arch/s390/kernel/compat_signal.c
-@@ -28,6 +28,7 @@
+--- linux-2.6/arch/s390/kernel/compat_signal.c
++++ linux-2.6/arch/s390/kernel/compat_signal.c
+@@ -27,6 +27,7 @@
  #include <asm/ucontext.h>
  #include <asm/uaccess.h>
  #include <asm/lowcore.h>
@@ -58,7 +54,7 @@
  #include "compat_linux.h"
  #include "compat_ptrace.h"
  
-@@ -579,7 +580,9 @@ handle_signal32(unsigned long sig, struc
+@@ -580,7 +581,9 @@ handle_signal32(unsigned long sig, struc
  			sigaddset(&current->blocked,sig);
  		recalc_sigpending();
  		spin_unlock_irq(&current->sighand->siglock);
@@ -69,10 +65,8 @@
  	return ret;
  }
 -
-Index: b/arch/s390/kernel/ptrace.c
-===================================================================
---- a/arch/s390/kernel/ptrace.c
-+++ b/arch/s390/kernel/ptrace.c
+--- linux-2.6/arch/s390/kernel/ptrace.c
++++ linux-2.6/arch/s390/kernel/ptrace.c
 @@ -29,6 +29,7 @@
  #include <linux/smp_lock.h>
  #include <linux/errno.h>
@@ -128,7 +122,7 @@
  }
  
  #ifndef CONFIG_64BIT
-@@ -593,6 +611,7 @@ do_ptrace_emu31(struct task_struct *chil
+@@ -586,6 +604,7 @@ do_ptrace_emu31(struct task_struct *chil
  			copied += sizeof(unsigned int);
  		}
  		return 0;
@@ -136,7 +130,7 @@
  	case PTRACE_GETEVENTMSG:
  		return put_user((__u32) child->ptrace_message,
  				(unsigned int __force __user *) data);
-@@ -658,7 +677,7 @@ do_ptrace(struct task_struct *child, lon
+@@ -651,7 +670,7 @@ do_ptrace(struct task_struct *child, lon
  			clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
  		child->exit_code = data;
  		/* make sure the single step bit is not set. */
@@ -145,7 +139,7 @@
  		wake_up_process(child);
  		return 0;
  
-@@ -672,7 +691,7 @@ do_ptrace(struct task_struct *child, lon
+@@ -665,7 +684,7 @@ do_ptrace(struct task_struct *child, lon
  			return 0;
  		child->exit_code = SIGKILL;
  		/* make sure the single step bit is not set. */
@@ -154,7 +148,7 @@
  		wake_up_process(child);
  		return 0;
  
-@@ -685,7 +704,7 @@ do_ptrace(struct task_struct *child, lon
+@@ -678,7 +697,7 @@ do_ptrace(struct task_struct *child, lon
  		if (data)
  			set_tsk_thread_flag(child, TIF_SINGLE_STEP);
  		else
@@ -163,7 +157,7 @@
  		/* give it a chance to run. */
  		wake_up_process(child);
  		return 0;
-@@ -738,30 +757,17 @@ syscall_trace(struct pt_regs *regs, int 
+@@ -726,30 +745,17 @@ syscall_trace(struct pt_regs *regs, int 
  	if (unlikely(current->audit_context) && entryexit)
  		audit_syscall_exit(AUDITSC_RESULT(regs->gprs[2]), regs->gprs[2]);
  
@@ -203,11 +197,9 @@
  	if (unlikely(current->audit_context) && !entryexit)
  		audit_syscall_entry(test_thread_flag(TIF_31BIT)?AUDIT_ARCH_S390:AUDIT_ARCH_S390X,
  				    regs->gprs[2], regs->orig_gpr2, regs->gprs[3],
-Index: b/arch/s390/kernel/signal.c
-===================================================================
---- a/arch/s390/kernel/signal.c
-+++ b/arch/s390/kernel/signal.c
-@@ -25,6 +25,7 @@
+--- linux-2.6/arch/s390/kernel/signal.c
++++ linux-2.6/arch/s390/kernel/signal.c
+@@ -24,6 +24,7 @@
  #include <linux/tty.h>
  #include <linux/personality.h>
  #include <linux/binfmts.h>
@@ -215,7 +207,7 @@
  #include <asm/ucontext.h>
  #include <asm/uaccess.h>
  #include <asm/lowcore.h>
-@@ -395,6 +396,8 @@ handle_signal(unsigned long sig, struct 
+@@ -396,6 +397,8 @@ handle_signal(unsigned long sig, struct 
  			sigaddset(&current->blocked,sig);
  		recalc_sigpending();
  		spin_unlock_irq(&current->sighand->siglock);
@@ -224,10 +216,8 @@
  	}
  
  	return ret;
-Index: b/include/asm-s390/tracehook.h
-===================================================================
---- /dev/null
-+++ b/include/asm-s390/tracehook.h
+--- linux-2.6/include/asm-s390/tracehook.h
++++ linux-2.6/include/asm-s390/tracehook.h
 @@ -0,0 +1,46 @@
 +/*
 + * Tracing hooks, s390/s390x support.

linux-2.6-utrace-tracehook-sparc64.patch:

Index: linux-2.6-utrace-tracehook-sparc64.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-tracehook-sparc64.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-tracehook-sparc64.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-tracehook-sparc64.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -7,18 +7,16 @@
 
 ---
 
- arch/sparc64/kernel/entry.S     |    6 ------
- arch/sparc64/kernel/ptrace.c    |   29 +++++++++--------------------
+ arch/sparc64/kernel/ptrace.c    |   29 +++++++++-------------------
  arch/sparc64/kernel/signal.c    |    2 ++
  arch/sparc64/kernel/signal32.c  |    2 ++
- include/asm-sparc64/tracehook.h |   40 ++++++++++++++++++++++++++++++++++++++++
+ arch/sparc64/kernel/entry.S     |    6 ------
+ include/asm-sparc64/tracehook.h |   40 +++++++++++++++++++++++++++++++++++++++
  5 files changed, 53 insertions(+), 26 deletions(-)
  create include/asm-sparc64/tracehook.h
 
-Index: b/arch/sparc64/kernel/ptrace.c
-===================================================================
---- a/arch/sparc64/kernel/ptrace.c
-+++ b/arch/sparc64/kernel/ptrace.c
+--- linux-2.6/arch/sparc64/kernel/ptrace.c
++++ linux-2.6/arch/sparc64/kernel/ptrace.c
 @@ -22,6 +22,7 @@
  #include <linux/seccomp.h>
  #include <linux/audit.h>
@@ -95,19 +93,17 @@
  	if (unlikely(current->audit_context) && !syscall_exit_p)
  		audit_syscall_entry((test_thread_flag(TIF_32BIT) ?
  				     AUDIT_ARCH_SPARC :
-Index: b/arch/sparc64/kernel/signal.c
-===================================================================
---- a/arch/sparc64/kernel/signal.c
-+++ b/arch/sparc64/kernel/signal.c
-@@ -23,6 +23,7 @@
- #include <linux/smp_lock.h>
+--- linux-2.6/arch/sparc64/kernel/signal.c
++++ linux-2.6/arch/sparc64/kernel/signal.c
+@@ -22,6 +22,7 @@
+ #include <linux/tty.h>
  #include <linux/binfmts.h>
  #include <linux/bitops.h>
 +#include <linux/tracehook.h>
  
  #include <asm/uaccess.h>
  #include <asm/ptrace.h>
-@@ -491,6 +492,7 @@ static inline void handle_signal(unsigne
+@@ -481,6 +482,7 @@ static inline void handle_signal(unsigne
  		sigaddset(&current->blocked,signr);
  	recalc_sigpending();
  	spin_unlock_irq(&current->sighand->siglock);
@@ -115,11 +111,9 @@
  }
  
  static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
-Index: b/arch/sparc64/kernel/signal32.c
-===================================================================
---- a/arch/sparc64/kernel/signal32.c
-+++ b/arch/sparc64/kernel/signal32.c
-@@ -21,6 +21,7 @@
+--- linux-2.6/arch/sparc64/kernel/signal32.c
++++ linux-2.6/arch/sparc64/kernel/signal32.c
+@@ -20,6 +20,7 @@
  #include <linux/binfmts.h>
  #include <linux/compat.h>
  #include <linux/bitops.h>
@@ -127,7 +121,7 @@
  
  #include <asm/uaccess.h>
  #include <asm/ptrace.h>
-@@ -1237,6 +1238,7 @@ static inline void handle_signal32(unsig
+@@ -1236,6 +1237,7 @@ static inline void handle_signal32(unsig
  		sigaddset(&current->blocked,signr);
  	recalc_sigpending();
  	spin_unlock_irq(&current->sighand->siglock);
@@ -135,10 +129,8 @@
  }
  
  static inline void syscall_restart32(unsigned long orig_i0, struct pt_regs *regs,
-Index: b/arch/sparc64/kernel/entry.S
-===================================================================
---- a/arch/sparc64/kernel/entry.S
-+++ b/arch/sparc64/kernel/entry.S
+--- linux-2.6/arch/sparc64/kernel/entry.S
++++ linux-2.6/arch/sparc64/kernel/entry.S
 @@ -1434,7 +1434,6 @@ execve_merge:
  
  	.globl	sys_pipe, sys_sigpause, sys_nis_syscall
@@ -159,10 +151,8 @@
  1:		ldx		[%curptr + TI_FLAGS], %l5
  		andcc		%l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0
  		be,pt		%icc, rtrap
-Index: b/include/asm-sparc64/tracehook.h
-===================================================================
---- /dev/null
-+++ b/include/asm-sparc64/tracehook.h
+--- linux-2.6/include/asm-sparc64/tracehook.h
++++ linux-2.6/include/asm-sparc64/tracehook.h
 @@ -0,0 +1,40 @@
 +/*
 + * Tracing hooks, SPARC64 CPU support

linux-2.6-utrace-tracehook-um.patch:

Index: linux-2.6-utrace-tracehook-um.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-tracehook-um.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-tracehook-um.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-tracehook-um.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -19,294 +19,30 @@
 
 ---
 
- arch/um/kernel/exec.c           |    1 
- arch/um/kernel/process.c        |    6 
- arch/um/kernel/ptrace.c         |  327 ++++------------------------------------
- arch/um/kernel/signal.c         |    5 
- arch/um/kernel/skas/syscall.c   |    4 
- arch/um/sys-i386/signal.c       |    4 
- include/asm-um/ptrace-generic.h |    3 
- include/asm-um/ptrace-i386.h    |    2 
- include/asm-um/ptrace-x86_64.h  |    2 
- include/asm-um/thread_info.h    |    3 
- include/asm-um/tracehook.h      |   57 ++++++
- 11 files changed, 106 insertions(+), 308 deletions(-)
+ arch/um/kernel/ptrace.c        |   55 ++++++++++++++-------------------------
+ arch/um/kernel/skas/syscall.c  |    2 -
+ arch/um/kernel/signal.c        |    5 +++-
+ arch/um/kernel/exec.c          |    1 -
+ arch/um/kernel/process.c       |    2 +
+ arch/um/sys-i386/signal.c      |    4 ---
+ include/asm-um/ptrace-x86_64.h |    2 +
+ include/asm-um/ptrace-i386.h   |    2 +
+ include/asm-um/tracehook.h     |   57 ++++++++++++++++++++++++++++++++++++++++
+ include/asm-um/thread_info.h   |    3 ++
+ 10 files changed, 89 insertions(+), 44 deletions(-)
  create include/asm-um/tracehook.h
 
-Index: b/arch/um/kernel/ptrace.c
-===================================================================
---- a/arch/um/kernel/ptrace.c
-+++ b/arch/um/kernel/ptrace.c
-@@ -3,261 +3,21 @@
-  * Licensed under the GPL
-  */
- 
--#include "linux/sched.h"
--#include "linux/mm.h"
--#include "linux/errno.h"
--#include "linux/smp_lock.h"
--#include "linux/security.h"
--#include "linux/ptrace.h"
--#include "linux/audit.h"
--#ifdef CONFIG_PROC_MM
--#include "linux/proc_mm.h"
--#endif
--#include "asm/ptrace.h"
--#include "asm/uaccess.h"
--#include "kern_util.h"
--#include "skas_ptrace.h"
--#include "sysdep/ptrace.h"
--#include "os.h"
--
--static inline void set_singlestepping(struct task_struct *child, int on)
--{
--        if (on)
--                child->ptrace |= PT_DTRACE;
--        else
--                child->ptrace &= ~PT_DTRACE;
--        child->thread.singlestep_syscall = 0;
--
--#ifdef SUBARCH_SET_SINGLESTEPPING
--        SUBARCH_SET_SINGLESTEPPING(child, on);
--#endif
--}
-+#include <linux/audit.h>
-+#include <linux/elf.h>
-+#include <linux/module.h>
-+#include <linux/ptrace.h>
-+#include <linux/tracehook.h>
- 
- /*
-  * Called by kernel/ptrace.c when detaching..
-  */
- void ptrace_disable(struct task_struct *child)
- { 
--        set_singlestepping(child,0);
--}
--
--extern int peek_user(struct task_struct * child, long addr, long data);
--extern int poke_user(struct task_struct * child, long addr, long data);
--
--long arch_ptrace(struct task_struct *child, long request, long addr, long data)
--{
--	int i, ret;
--	unsigned long __user *p = (void __user *)(unsigned long)data;
--
--	switch (request) {
--		/* when I and D space are separate, these will need to be fixed. */
--	case PTRACE_PEEKTEXT: /* read word at location addr. */ 
--	case PTRACE_PEEKDATA: {
--		unsigned long tmp;
--		int copied;
--
--		ret = -EIO;
--		copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
--		if (copied != sizeof(tmp))
--			break;
--		ret = put_user(tmp, p);
--		break;
--	}
--
--	/* read the word at location addr in the USER area. */
--        case PTRACE_PEEKUSR:
--                ret = peek_user(child, addr, data);
--                break;
--
--	/* when I and D space are separate, this will have to be fixed. */
--	case PTRACE_POKETEXT: /* write the word at location addr. */
--	case PTRACE_POKEDATA:
--		ret = -EIO;
--		if (access_process_vm(child, addr, &data, sizeof(data), 
--				      1) != sizeof(data))
--			break;
--		ret = 0;
--		break;
--
--	case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
--                ret = poke_user(child, addr, data);
--                break;
--
--	case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
--	case PTRACE_CONT: { /* restart after signal. */
--		ret = -EIO;
--		if (!valid_signal(data))
--			break;
--
--                set_singlestepping(child, 0);
--		if (request == PTRACE_SYSCALL) {
--			set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
--		}
--		else {
--			clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
--		}
--		child->exit_code = data;
--		wake_up_process(child);
--		ret = 0;
--		break;
--	}
--
--/*
-- * make the child exit.  Best I can do is send it a sigkill. 
-- * perhaps it should be put in the status that it wants to 
-- * exit.
-- */
--	case PTRACE_KILL: {
--		ret = 0;
--		if (child->exit_state == EXIT_ZOMBIE)	/* already dead */
--			break;
--
--                set_singlestepping(child, 0);
--		child->exit_code = SIGKILL;
--		wake_up_process(child);
--		break;
--	}
--
--	case PTRACE_SINGLESTEP: {  /* set the trap flag. */
--		ret = -EIO;
--		if (!valid_signal(data))
--			break;
--		clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
--                set_singlestepping(child, 1);
--		child->exit_code = data;
--		/* give it a chance to run. */
--		wake_up_process(child);
--		ret = 0;
--		break;
--	}
--
--	case PTRACE_DETACH:
--		/* detach a process that was attached. */
--		ret = ptrace_detach(child, data);
-- 		break;
--
--#ifdef PTRACE_GETREGS
--	case PTRACE_GETREGS: { /* Get all gp regs from the child. */
--		if (!access_ok(VERIFY_WRITE, p, MAX_REG_OFFSET)) {
--			ret = -EIO;
--			break;
--		}
--		for ( i = 0; i < MAX_REG_OFFSET; i += sizeof(long) ) {
--			__put_user(getreg(child, i), p);
--			p++;
--		}
--		ret = 0;
--		break;
--	}
--#endif
--#ifdef PTRACE_SETREGS
--	case PTRACE_SETREGS: { /* Set all gp regs in the child. */
--		unsigned long tmp = 0;
--		if (!access_ok(VERIFY_READ, p, MAX_REG_OFFSET)) {
--			ret = -EIO;
--			break;
--		}
--		for ( i = 0; i < MAX_REG_OFFSET; i += sizeof(long) ) {
--			__get_user(tmp, p);
--			putreg(child, i, tmp);
--			p++;
--		}
--		ret = 0;
--		break;
--	}
--#endif
--#ifdef PTRACE_GETFPREGS
--	case PTRACE_GETFPREGS: /* Get the child FPU state. */
--		ret = get_fpregs(data, child);
--		break;
--#endif
--#ifdef PTRACE_SETFPREGS
--	case PTRACE_SETFPREGS: /* Set the child FPU state. */
--	        ret = set_fpregs(data, child);
--		break;
--#endif
--#ifdef PTRACE_GETFPXREGS
--	case PTRACE_GETFPXREGS: /* Get the child FPU state. */
--		ret = get_fpxregs(data, child);
--		break;
--#endif
--#ifdef PTRACE_SETFPXREGS
--	case PTRACE_SETFPXREGS: /* Set the child FPU state. */
--		ret = set_fpxregs(data, child);
--		break;
--#endif
--	case PTRACE_GET_THREAD_AREA:
--		ret = ptrace_get_thread_area(child, addr,
--					     (struct user_desc __user *) data);
--		break;
--
--	case PTRACE_SET_THREAD_AREA:
--		ret = ptrace_set_thread_area(child, addr,
--					     (struct user_desc __user *) data);
--		break;
--
--	case PTRACE_FAULTINFO: {
--		/* Take the info from thread->arch->faultinfo,
--		 * but transfer max. sizeof(struct ptrace_faultinfo).
--		 * On i386, ptrace_faultinfo is smaller!
--		 */
--		ret = copy_to_user(p, &child->thread.arch.faultinfo,
--				   sizeof(struct ptrace_faultinfo));
--		if(ret)
--			break;
--		break;
--	}
--
--#ifdef PTRACE_LDT
--	case PTRACE_LDT: {
--		struct ptrace_ldt ldt;
--
--		if(copy_from_user(&ldt, p, sizeof(ldt))){
--			ret = -EIO;
--			break;
--		}
--
--		/* This one is confusing, so just punt and return -EIO for 
--		 * now
--		 */
--		ret = -EIO;
--		break;
--	}
--#endif
--#ifdef CONFIG_PROC_MM
--	case PTRACE_SWITCH_MM: {
--		struct mm_struct *old = child->mm;
--		struct mm_struct *new = proc_mm_get_mm(data);
--
--		if(IS_ERR(new)){
--			ret = PTR_ERR(new);
--			break;
--		}
--
--		atomic_inc(&new->mm_users);
--		child->mm = new;
--		child->active_mm = new;
--		mmput(old);
--		ret = 0;
--		break;
--	}
--#endif
--#ifdef PTRACE_ARCH_PRCTL
--        case PTRACE_ARCH_PRCTL:
--                /* XXX Calls ptrace on the host - needs some SMP thinking */
--                ret = arch_prctl_skas(child, data, (void *) addr);
--                break;
--#endif
--	default:
--		ret = ptrace_request(child, request, addr, data);
--		break;
--	}
--
--	return ret;
- }
+--- linux-2.6/arch/um/kernel/ptrace.c
++++ linux-2.6/arch/um/kernel/ptrace.c
+@@ -5,6 +5,7 @@
  
--void send_sigtrap(struct task_struct *tsk, union uml_pt_regs *regs,
--		  int error_code)
-+static void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
-+			 int error_code)
- {
- 	struct siginfo info;
- 
-@@ -266,56 +26,39 @@ void send_sigtrap(struct task_struct *ts
+ #include "linux/audit.h"
+ #include "linux/ptrace.h"
++#include "linux/tracehook.h"
+ #include "linux/sched.h"
+ #include "asm/uaccess.h"
+ #ifdef CONFIG_PROC_MM
+@@ -235,20 +236,18 @@ void send_sigtrap(struct task_struct *ts
  	info.si_code = TRAP_BRKPT;
  
  	/* User-mode eip? */
@@ -314,33 +50,28 @@
 +	info.si_addr = UPT_IS_USER(&regs->regs) ?
 +		(void __user *) UPT_IP(&regs->regs) : NULL;
  
- 	/* Send us the fakey SIGTRAP */
+ 	/* Send us the fake SIGTRAP */
  	force_sig_info(SIGTRAP, &info, tsk);
  }
  
--/* XXX Check PT_DTRACE vs TIF_SINGLESTEP for singlestepping check and
+-/*
+- * XXX Check PT_DTRACE vs TIF_SINGLESTEP for singlestepping check and
 - * PT_PTRACED vs TIF_SYSCALL_TRACE for syscall tracing check
-+/* notification of system call entry/exit
-+ * - triggered by current->work.syscall_trace
-  */
--void syscall_trace(union uml_pt_regs *regs, int entryexit)
-+void do_syscall_trace(struct pt_regs *regs, int entryexit)
+- */
+ void syscall_trace(struct uml_pt_regs *regs, int entryexit)
  {
 -	int is_singlestep = (current->ptrace & PT_DTRACE) && entryexit;
 -	int tracesysgood;
--
--	if (unlikely(current->audit_context)) {
--		if (!entryexit)
--			audit_syscall_entry(HOST_AUDIT_ARCH,
--					    UPT_SYSCALL_NR(regs),
--					    UPT_SYSCALL_ARG1(regs),
--					    UPT_SYSCALL_ARG2(regs),
--					    UPT_SYSCALL_ARG3(regs),
--					    UPT_SYSCALL_ARG4(regs));
--		else audit_syscall_exit(AUDITSC_RESULT(UPT_SYSCALL_RET(regs)),
--                                        UPT_SYSCALL_RET(regs));
--	}
--
++	/* do the secure computing check first */
++	if (!entryexit)
++		secure_computing(PT_REGS_SYSCALL_NR(regs));
+ 
+ 	if (unlikely(current->audit_context)) {
+ 		if (!entryexit)
+@@ -262,33 +261,19 @@ void syscall_trace(struct uml_pt_regs *r
+ 					UPT_SYSCALL_RET(regs));
+ 	}
+ 
 -	/* Fake a debug trap */
 -	if (is_singlestep)
 -		send_sigtrap(current, regs, 0);
@@ -351,37 +82,31 @@
 -	if (!(current->ptrace & PT_PTRACED))
 -		return;
 -
--	/* the 0x80 provides a way for the tracing parent to distinguish
--	   between a syscall stop and SIGTRAP delivery */
+-	/*
+-	 * the 0x80 provides a way for the tracing parent to distinguish
+-	 * between a syscall stop and SIGTRAP delivery
+-	 */
 -	tracesysgood = (current->ptrace & PT_TRACESYSGOOD);
 -	ptrace_notify(SIGTRAP | (tracesysgood ? 0x80 : 0));
 -
 -	if (entryexit) /* force do_signal() --> is_syscall() */
 -		set_thread_flag(TIF_SIGPENDING);
 -
--	/* this isn't the same as continuing with a signal, but it will do
+-	/*
+-	 * this isn't the same as continuing with a signal, but it will do
 -	 * for normal use.  strace only continues with a signal if the
 -	 * stopping signal is not SIGTRAP.  -brl
 -	 */
 -	if (current->exit_code) {
 -		send_sig(current->exit_code, current, 1);
 -		current->exit_code = 0;
--	}
-+	/* do the secure computing check first */
-+	if (!entryexit)
-+		secure_computing(PT_REGS_SYSCALL_NR(regs));
-+
-+	if (unlikely(current->audit_context) && entryexit)
-+		audit_syscall_exit(AUDITSC_RESULT(UPT_SYSCALL_RET(&regs->regs)),
-+				   UPT_SYSCALL_RET(&regs->regs));
-+
 +	if (test_thread_flag(TIF_SYSCALL_TRACE))
 +		tracehook_report_syscall(regs, entryexit);
 +
 +	if (test_thread_flag(TIF_SINGLESTEP) && entryexit) {
 +		send_sigtrap(current, regs, 0);	/* XXX */
 +		tracehook_report_syscall_step(regs);
-+	}
+ 	}
 +
 +	if (unlikely(current->audit_context) && !entryexit)
 +		audit_syscall_entry(HOST_AUDIT_ARCH,
@@ -391,11 +116,9 @@
 +				    UPT_SYSCALL_ARG3(&regs->regs),
 +				    UPT_SYSCALL_ARG4(&regs->regs));
  }
-Index: b/arch/um/kernel/skas/syscall.c
-===================================================================
---- a/arch/um/kernel/skas/syscall.c
-+++ b/arch/um/kernel/skas/syscall.c
-@@ -19,8 +19,6 @@ void handle_syscall(union uml_pt_regs *r
+--- linux-2.6/arch/um/kernel/skas/syscall.c
++++ linux-2.6/arch/um/kernel/skas/syscall.c
+@@ -15,8 +15,6 @@ void handle_syscall(struct uml_pt_regs *
  	long result;
  	int syscall;
  
@@ -404,26 +127,17 @@
  	current->thread.nsyscalls++;
  	nsyscalls++;
  
-@@ -38,6 +36,4 @@ void handle_syscall(union uml_pt_regs *r
- 	else result = EXECUTE_SYSCALL(syscall, regs);
+--- linux-2.6/arch/um/kernel/signal.c
++++ linux-2.6/arch/um/kernel/signal.c
+@@ -5,6 +5,7 @@
  
- 	REGS_SET_SYSCALL_RETURN(r->skas.regs, result);
--
--	syscall_trace(r, 1);
- }
-Index: b/arch/um/kernel/signal.c
-===================================================================
---- a/arch/um/kernel/signal.c
-+++ b/arch/um/kernel/signal.c
-@@ -14,6 +14,7 @@
- #include "linux/tty.h"
- #include "linux/binfmts.h"
+ #include "linux/module.h"
  #include "linux/ptrace.h"
 +#include "linux/tracehook.h"
+ #include "linux/sched.h"
+ #include "asm/siginfo.h"
  #include "asm/signal.h"
- #include "asm/uaccess.h"
- #include "asm/unistd.h"
-@@ -93,6 +94,8 @@ static int handle_signal(struct pt_regs 
+@@ -80,6 +81,8 @@ static int handle_signal(struct pt_regs 
  			sigaddset(&current->blocked, signr);
  		recalc_sigpending();
  		spin_unlock_irq(&current->sighand->siglock);
@@ -432,51 +146,39 @@
  	}
  
  	return err;
-@@ -148,7 +151,7 @@ static int kern_do_signal(struct pt_regs
+@@ -138,7 +141,7 @@ static int kern_do_signal(struct pt_regs
  	 * on the host.  The tracing thread will check this flag and
  	 * PTRACE_SYSCALL if necessary.
  	 */
--	if(current->ptrace & PT_DTRACE)
-+	if(test_thread_flag(TIF_SYSCALL_TRACE))
+-	if (current->ptrace & PT_DTRACE)
++	if (test_thread_flag(TIF_SYSCALL_TRACE))
  		current->thread.singlestep_syscall =
  			is_syscall(PT_REGS_IP(&current->thread.regs));
  
-Index: b/arch/um/kernel/exec.c
-===================================================================
---- a/arch/um/kernel/exec.c
-+++ b/arch/um/kernel/exec.c
-@@ -51,7 +51,6 @@ static long execve1(char *file, char __u
-         error = do_execve(file, argv, env, &current->thread.regs);
-         if (error == 0){
+--- linux-2.6/arch/um/kernel/exec.c
++++ linux-2.6/arch/um/kernel/exec.c
+@@ -61,7 +61,6 @@ static long execve1(char *file, char __u
+ 	error = do_execve(file, argv, env, &current->thread.regs);
+ 	if (error == 0) {
  		task_lock(current);
--                current->ptrace &= ~PT_DTRACE;
+-		current->ptrace &= ~PT_DTRACE;
  #ifdef SUBARCH_EXECVE1
  		SUBARCH_EXECVE1(&current->thread.regs.regs);
  #endif
-Index: b/arch/um/kernel/process.c
-===================================================================
---- a/arch/um/kernel/process.c
-+++ b/arch/um/kernel/process.c
-@@ -458,11 +458,11 @@ int singlestepping(void * t)
+--- linux-2.6/arch/um/kernel/process.c
++++ linux-2.6/arch/um/kernel/process.c
+@@ -435,7 +435,7 @@ int singlestepping(void * t)
  {
  	struct task_struct *task = t ? t : current;
  
 -	if ( ! (task->ptrace & PT_DTRACE) )
--		return(0);
 +	if (!test_thread_flag(TIF_SINGLESTEP))
-+		return 0;
+ 		return 0;
  
  	if (task->thread.singlestep_syscall)
--		return(1);
-+		return 1;
- 
- 	return 2;
- }
-Index: b/arch/um/sys-i386/signal.c
-===================================================================
---- a/arch/um/sys-i386/signal.c
-+++ b/arch/um/sys-i386/signal.c
-@@ -267,8 +267,6 @@ int setup_signal_stack_sc(unsigned long 
+--- linux-2.6/arch/um/sys-i386/signal.c
++++ linux-2.6/arch/um/sys-i386/signal.c
+@@ -378,8 +378,6 @@ int setup_signal_stack_sc(unsigned long 
  	PT_REGS_EDX(regs) = (unsigned long) 0;
  	PT_REGS_ECX(regs) = (unsigned long) 0;
  
@@ -485,7 +187,7 @@
  	return 0;
  
  err:
-@@ -324,8 +322,6 @@ int setup_signal_stack_si(unsigned long 
+@@ -435,8 +433,6 @@ int setup_signal_stack_si(unsigned long 
  	PT_REGS_EDX(regs) = (unsigned long) &frame->info;
  	PT_REGS_ECX(regs) = (unsigned long) &frame->uc;
  
@@ -494,10 +196,8 @@
  	return 0;
  
  err:
-Index: b/include/asm-um/ptrace-x86_64.h
-===================================================================
---- a/include/asm-um/ptrace-x86_64.h
-+++ b/include/asm-um/ptrace-x86_64.h
+--- linux-2.6/include/asm-um/ptrace-x86_64.h
++++ linux-2.6/include/asm-um/ptrace-x86_64.h
 @@ -14,6 +14,8 @@
  #define __FRAME_OFFSETS /* Needed to get the R* macros */
  #include "asm/ptrace-generic.h"
@@ -507,24 +207,8 @@
  #define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64
  
  /* Also defined in sysdep/ptrace.h, so may already be defined. */
-Index: b/include/asm-um/ptrace-generic.h
-===================================================================
---- a/include/asm-um/ptrace-generic.h
-+++ b/include/asm-um/ptrace-generic.h
-@@ -44,9 +44,6 @@ extern int set_fpxregs(unsigned long buf
- 
- extern void show_regs(struct pt_regs *regs);
- 
--extern void send_sigtrap(struct task_struct *tsk, union uml_pt_regs *regs,
--			 int error_code);
--
- extern int arch_copy_tls(struct task_struct *new);
- extern void clear_flushed_tls(struct task_struct *task);
- 
-Index: b/include/asm-um/ptrace-i386.h
-===================================================================
---- a/include/asm-um/ptrace-i386.h
-+++ b/include/asm-um/ptrace-i386.h
+--- linux-2.6/include/asm-um/ptrace-i386.h
++++ linux-2.6/include/asm-um/ptrace-i386.h
 @@ -6,6 +6,8 @@
  #ifndef __UM_PTRACE_I386_H
  #define __UM_PTRACE_I386_H
@@ -534,10 +218,8 @@
  #define HOST_AUDIT_ARCH AUDIT_ARCH_I386
  
  #include "linux/compiler.h"
-Index: b/include/asm-um/tracehook.h
-===================================================================
---- /dev/null
-+++ b/include/asm-um/tracehook.h
+--- linux-2.6/include/asm-um/tracehook.h
++++ linux-2.6/include/asm-um/tracehook.h
 @@ -0,0 +1,57 @@
 +/*
 + * Tracing hooks, i386 CPU support
@@ -596,11 +278,9 @@
 +
 +
 +#endif
-Index: b/include/asm-um/thread_info.h
-===================================================================
---- a/include/asm-um/thread_info.h
-+++ b/include/asm-um/thread_info.h
-@@ -69,6 +69,8 @@ static inline struct thread_info *curren
+--- linux-2.6/include/asm-um/thread_info.h
++++ linux-2.6/include/asm-um/thread_info.h
+@@ -82,6 +82,8 @@ static inline struct thread_info *curren
  #define TIF_MEMDIE	 	5
  #define TIF_SYSCALL_AUDIT	6
  #define TIF_RESTORE_SIGMASK	7
@@ -609,7 +289,7 @@
  
  #define _TIF_SYSCALL_TRACE	(1 << TIF_SYSCALL_TRACE)
  #define _TIF_SIGPENDING		(1 << TIF_SIGPENDING)
-@@ -77,5 +79,6 @@ static inline struct thread_info *curren
+@@ -90,5 +92,6 @@ static inline struct thread_info *curren
  #define _TIF_MEMDIE		(1 << TIF_MEMDIE)
  #define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
  #define _TIF_RESTORE_SIGMASK	(1 << TIF_RESTORE_SIGMASK)

linux-2.6-utrace-tracehook.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.2 -r 1.3 linux-2.6-utrace-tracehook.patch
Index: linux-2.6-utrace-tracehook.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-utrace-tracehook.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-tracehook.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-utrace-tracehook.patch	6 Mar 2008 13:59:25 -0000	1.3
@@ -33,87 +33,83 @@
 
 ---
 
- arch/alpha/kernel/asm-offsets.c     |    2 
- arch/alpha/kernel/entry.S           |    4 
- arch/arm/kernel/ptrace.c            |   17 -
- arch/arm26/kernel/ptrace.c          |   32 --
+ fs/binfmt_flat.c                    |    3 
+ fs/binfmt_som.c                     |    2 
+ fs/proc/base.c                      |   17 +
+ fs/proc/array.c                     |   10 +
+ fs/binfmt_elf_fdpic.c               |    7 -
+ fs/exec.c                           |   11 -
+ fs/binfmt_elf.c                     |   10 -
+ fs/binfmt_aout.c                    |    6 -
+ security/selinux/hooks.c            |   54 +++--
+ security/selinux/include/objsec.h   |    1 
+ arch/s390/kernel/compat_linux.c     |    3 
+ arch/s390/kernel/process.c          |    3 
  arch/frv/kernel/ptrace.c            |   15 -
- arch/i386/kernel/entry.S            |    7 
- arch/i386/kernel/process.c          |    3 
- arch/i386/kernel/ptrace.c           |  104 +--------
- arch/i386/kernel/signal.c           |   37 +--
- arch/i386/kernel/vm86.c             |    7 
- arch/i386/math-emu/fpu_entry.c      |    6 
- arch/ia64/kernel/asm-offsets.c      |    2 
- arch/ia64/kernel/fsys.S             |   16 -
- arch/ia64/kernel/mca.c              |    2 
- arch/mips/kernel/ptrace.c           |   21 -
+ arch/arm/kernel/ptrace.c            |   17 -
  arch/mips/kernel/sysirix.c          |    2 
+ arch/mips/kernel/ptrace.c           |   23 --
+ arch/powerpc/kernel/sys_ppc32.c     |    5 
+ arch/powerpc/kernel/ptrace32.c      |    7 +
+ arch/powerpc/kernel/ptrace.c        |   49 +---
+ arch/powerpc/kernel/signal.c        |    3 
  arch/powerpc/kernel/asm-offsets.c   |    2 
  arch/powerpc/kernel/process.c       |    5 
- arch/powerpc/kernel/ptrace-common.h |   16 -
- arch/powerpc/kernel/ptrace.c        |   74 +-----
- arch/powerpc/kernel/ptrace32.c      |   13 -
- arch/powerpc/kernel/signal_32.c     |    3 
- arch/powerpc/kernel/signal_64.c     |    3 
- arch/powerpc/kernel/sys_ppc32.c     |    5 
- arch/ppc/kernel/asm-offsets.c       |    2 
- arch/s390/kernel/compat_linux.c     |    3 
- arch/s390/kernel/process.c          |    3 
+ arch/x86/math-emu/fpu_entry.c       |    6 -
+ arch/x86/ia32/sys_ia32.c            |    5 
+ arch/x86/ia32/ptrace32.c            |    2 
+ arch/x86/ia32/ia32_aout.c           |    6 -
+ arch/x86/ia32/ia32_signal.c         |    7 -
+ arch/x86/ia32/ia32entry.S           |    4 
+ arch/x86/kernel/vm86_32.c           |    7 -
+ arch/x86/kernel/process_64.c        |    5 
+ arch/x86/kernel/process_32.c        |    3 
+ arch/x86/kernel/entry_32.S          |    7 -
+ arch/x86/kernel/signal_64.c         |   28 +-
+ arch/x86/kernel/entry_64.S          |    8 -
+ arch/x86/kernel/ptrace_32.c         |  103 ++-------
+ arch/x86/kernel/traps_64.c          |    8 -
+ arch/x86/kernel/ptrace_64.c         |   57 ++---
+ arch/x86/kernel/signal_32.c         |   37 +--
+ arch/x86/mm/fault_64.c              |    2 
+ arch/alpha/kernel/asm-offsets.c     |    2 
+ arch/alpha/kernel/entry.S           |    4 
  arch/sparc64/kernel/binfmt_aout32.c |    2 
  arch/sparc64/kernel/process.c       |    3 
  arch/sparc64/kernel/sys_sparc32.c   |    3 
- arch/x86_64/ia32/ia32_aout.c        |    6 
- arch/x86_64/ia32/ia32_signal.c      |    7 
- arch/x86_64/ia32/ia32entry.S        |    4 
- arch/x86_64/ia32/ptrace32.c         |    2 
- arch/x86_64/ia32/sys_ia32.c         |    5 
- arch/x86_64/kernel/entry.S          |    8 
- arch/x86_64/kernel/process.c        |    5 
- arch/x86_64/kernel/ptrace.c         |   57 +---
- arch/x86_64/kernel/signal.c         |   28 +-
- arch/x86_64/kernel/traps.c          |    8 
- arch/x86_64/mm/fault.c              |    4 
- drivers/connector/cn_proc.c         |    4 
- fs/binfmt_aout.c                    |    6 
- fs/binfmt_elf.c                     |    6 
- fs/binfmt_elf_fdpic.c               |    7 
- fs/binfmt_flat.c                    |    3 
- fs/binfmt_som.c                     |    2 
- fs/exec.c                           |   11 
- fs/proc/array.c                     |   12 -
- fs/proc/base.c                      |   17 -
- include/asm-i386/signal.h           |    4 
- include/asm-i386/thread_info.h      |    7 
- include/asm-i386/tracehook.h        |   52 ++++
- include/asm-powerpc/tracehook.h     |   74 ++++++
- include/asm-x86_64/thread_info.h    |    3 
- include/asm-x86_64/tracehook.h      |   51 ++++
- include/linux/init_task.h           |    3 
- include/linux/ptrace.h              |   18 -
- include/linux/sched.h               |   16 -
- include/linux/tracehook.h           |  415 ++++++++++++++++++++++++++++++++++++
- kernel/exit.c                       |  243 +++++----------------
- kernel/fork.c                       |   66 +----
- kernel/ptrace.c                     |  299 +------------------------
- kernel/signal.c                     |  211 +++---------------
- kernel/sys.c                        |    2 
- kernel/timer.c                      |    6 
+ arch/ppc/kernel/asm-offsets.c       |    2 
+ arch/ia64/kernel/mca.c              |    2 
+ arch/ia64/kernel/asm-offsets.c      |    2 
+ arch/ia64/kernel/fsys.S             |   16 +
+ kernel/exit.c                       |  238 +++++---------------
+ kernel/power/process.c              |   11 +
+ kernel/sched.c                      |    2 
+ kernel/ptrace.c                     |  307 +-------------------------
+ kernel/timer.c                      |    6 -
+ kernel/signal.c                     |  210 ++++--------------
+ kernel/acct.c                       |    2 
  kernel/tsacct.c                     |    2 
+ kernel/sys.c                        |    2 
+ kernel/fork.c                       |   67 ++----
+ include/linux/ptrace.h              |   18 --
+ include/linux/sched.h               |   16 -
+ include/linux/init_task.h           |    3 
+ include/linux/tracehook.h           |  414 +++++++++++++++++++++++++++++++++++
+ include/asm-powerpc/tracehook.h     |   49 ++++
+ include/asm-x86/thread_info_32.h    |    7 -
+ include/asm-x86/thread_info_64.h    |    3 
+ include/asm-x86/tracehook.h         |   63 +++++
+ include/asm-x86/signal.h            |    4 
+ drivers/connector/cn_proc.c         |    4 
  mm/nommu.c                          |    4 
- security/selinux/hooks.c            |   54 ++--
- security/selinux/include/objsec.h   |    1 
- 70 files changed, 934 insertions(+), 1213 deletions(-)
+ 69 files changed, 869 insertions(+), 1149 deletions(-)
  create include/linux/tracehook.h
- create include/asm-i386/tracehook.h
  create include/asm-powerpc/tracehook.h
- create include/asm-x86_64/tracehook.h
+ create include/asm-x86/tracehook.h
 
-Index: b/fs/binfmt_flat.c
-===================================================================
---- a/fs/binfmt_flat.c
-+++ b/fs/binfmt_flat.c
-@@ -914,9 +914,6 @@ static int load_flat_binary(struct linux
+--- linux-2.6/fs/binfmt_flat.c
++++ linux-2.6/fs/binfmt_flat.c
+@@ -920,9 +920,6 @@ static int load_flat_binary(struct linux
  	
  	start_thread(regs, start_addr, current->mm->start_stack);
  
@@ -123,10 +119,8 @@
  	return 0;
  }
  
-Index: b/fs/binfmt_som.c
-===================================================================
---- a/fs/binfmt_som.c
-+++ b/fs/binfmt_som.c
+--- linux-2.6/fs/binfmt_som.c
++++ linux-2.6/fs/binfmt_som.c
 @@ -285,8 +285,6 @@ load_som_binary(struct linux_binprm * bp
  	map_hpux_gateway_page(current,current->mm);
  
@@ -136,19 +130,17 @@
  	return 0;
  
  	/* error cleanup */
-Index: b/fs/proc/base.c
-===================================================================
---- a/fs/proc/base.c
-+++ b/fs/proc/base.c
-@@ -67,6 +67,7 @@
+--- linux-2.6/fs/proc/base.c
++++ linux-2.6/fs/proc/base.c
+@@ -68,6 +68,7 @@
  #include <linux/mount.h>
  #include <linux/security.h>
  #include <linux/ptrace.h>
 +#include <linux/tracehook.h>
- #include <linux/seccomp.h>
+ #include <linux/cgroup.h>
  #include <linux/cpuset.h>
  #include <linux/audit.h>
-@@ -189,13 +190,6 @@ static int proc_root_link(struct inode *
+@@ -195,13 +196,6 @@ static int proc_root_link(struct inode *
  	return result;
  }
  
@@ -159,10 +151,10 @@
[...3621 lines suppressed...]
-@@ -0,0 +1,74 @@
-+/*
-+ * Tracing hooks, PowerPC CPU support
-+ *
-+ * Copyright (C) 2006, 2007 Red Hat, Inc.  All rights reserved.
-+ *
-+ * This copyrighted material is made available to anyone wishing to use,
-+ * modify, copy, or redistribute it subject to the terms and conditions
-+ * of the GNU General Public License v.2.
-+ *
-+ * Red Hat Author: Roland McGrath.
-+ */
-+
-+#ifndef _ASM_TRACEHOOK_H
-+#define _ASM_TRACEHOOK_H	1
-+
-+#include <linux/sched.h>
-+#include <asm/ptrace.h>
-+
-+/*
-+ * See linux/tracehook.h for the descriptions of what these need to do.
-+ */
-+
-+#define ARCH_HAS_SINGLE_STEP	(1)
-+
-+static inline void tracehook_enable_single_step(struct task_struct *task)
-+{
-+	struct pt_regs *regs = task->thread.regs;
-+	if (regs != NULL) {
-+#if defined(CONFIG_PPC32) && (defined(CONFIG_40x) || defined(CONFIG_BOOKE))
-+		task->thread.dbcr0 = DBCR0_IDM | DBCR0_IC;
-+		regs->msr |= MSR_DE;
-+#else
-+		regs->msr |= MSR_SE;
-+#endif
-+	}
-+	set_tsk_thread_flag(task, TIF_SINGLESTEP);
-+}
-+
-+static inline void tracehook_disable_single_step(struct task_struct *task)
-+{
-+	struct pt_regs *regs = task->thread.regs;
-+	if (regs != NULL) {
-+#if defined(CONFIG_PPC32) && (defined(CONFIG_40x) || defined(CONFIG_BOOKE))
-+		task->thread.dbcr0 = 0;
-+		regs->msr &= ~MSR_DE;
-+#else
-+		regs->msr &= ~MSR_SE;
-+#endif
-+	}
-+	clear_tsk_thread_flag(task, TIF_SINGLESTEP);
-+}
-+
-+static inline int tracehook_single_step_enabled(struct task_struct *tsk)
-+{
-+	return test_tsk_thread_flag(tsk, TIF_SINGLESTEP);
-+}
-+
-+static inline void tracehook_enable_syscall_trace(struct task_struct *tsk)
-+{
-+	set_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
-+}
-+
-+static inline void tracehook_disable_syscall_trace(struct task_struct *tsk)
-+{
-+	clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
-+}
-+
-+static inline void tracehook_abort_syscall(struct pt_regs *regs)
-+{
-+	regs->orig_gpr3 = -1L;
-+}
-+
-+
-+#endif
-Index: b/include/asm-x86_64/tracehook.h
-===================================================================
---- /dev/null
-+++ b/include/asm-x86_64/tracehook.h
-@@ -0,0 +1,51 @@
+--- linux-2.6/include/asm-x86/thread_info_64.h
++++ linux-2.6/include/asm-x86/thread_info_64.h
+@@ -115,7 +115,7 @@ static inline struct thread_info *stack_
+ #define TIF_SECCOMP		8	/* secure computing */
+ #define TIF_RESTORE_SIGMASK	9	/* restore signal mask in do_signal */
+ #define TIF_MCE_NOTIFY		10	/* notify userspace of an MCE */
+-/* 16 free */
++#define TIF_FORCED_TF		16	/* true if TF in eflags artificially */
+ #define TIF_IA32		17	/* 32bit process */ 
+ #define TIF_FORK		18	/* ret_from_fork */
+ #define TIF_ABI_PENDING		19
+@@ -133,6 +133,7 @@ static inline struct thread_info *stack_
+ #define _TIF_SECCOMP		(1<<TIF_SECCOMP)
+ #define _TIF_RESTORE_SIGMASK	(1<<TIF_RESTORE_SIGMASK)
+ #define _TIF_MCE_NOTIFY		(1<<TIF_MCE_NOTIFY)
++#define _TIF_FORCED_TF		(1<<TIF_FORCED_TF)
+ #define _TIF_IA32		(1<<TIF_IA32)
+ #define _TIF_FORK		(1<<TIF_FORK)
+ #define _TIF_ABI_PENDING	(1<<TIF_ABI_PENDING)
+--- linux-2.6/include/asm-x86/tracehook.h
++++ linux-2.6/include/asm-x86/tracehook.h
+@@ -0,0 +1,63 @@
 +/*
-+ * Tracing hooks, x86-64 CPU support
++ * Tracing hooks, x86 CPU support
 + *
 + * Copyright (C) 2006, 2007 Red Hat, Inc.  All rights reserved.
 + *
@@ -4067,39 +3796,42 @@
 +	clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
 +}
 +
++#ifdef CONFIG_X86_64
++
 +#define tracehook_syscall_callno(regs)	(&(regs)->orig_rax)
 +#define tracehook_syscall_retval(regs)	(&(regs)->rax)
 +static inline void tracehook_abort_syscall(struct pt_regs *regs)
 +{
 +	regs->orig_rax = -1L;
 +}
++#else
++
++#define tracehook_syscall_callno(regs)	(&(regs)->orig_eax)
++#define tracehook_syscall_retval(regs)	(&(regs)->eax)
++static inline void tracehook_abort_syscall(struct pt_regs *regs)
++{
++	regs->orig_eax = -1;
++}
 +
 +#endif
-Index: b/include/asm-x86_64/thread_info.h
-===================================================================
---- a/include/asm-x86_64/thread_info.h
-+++ b/include/asm-x86_64/thread_info.h
-@@ -115,7 +115,7 @@ static inline struct thread_info *stack_
- #define TIF_SYSCALL_AUDIT	7	/* syscall auditing active */
- #define TIF_SECCOMP		8	/* secure computing */
- #define TIF_RESTORE_SIGMASK	9	/* restore signal mask in do_signal */
--/* 16 free */
-+#define TIF_FORCED_TF		16	/* true if TF in eflags artificially */
- #define TIF_IA32		17	/* 32bit process */ 
- #define TIF_FORK		18	/* ret_from_fork */
- #define TIF_ABI_PENDING		19
-@@ -133,6 +133,7 @@ static inline struct thread_info *stack_
- #define _TIF_SYSCALL_AUDIT	(1<<TIF_SYSCALL_AUDIT)
- #define _TIF_SECCOMP		(1<<TIF_SECCOMP)
- #define _TIF_RESTORE_SIGMASK	(1<<TIF_RESTORE_SIGMASK)
-+#define _TIF_FORCED_TF		(1<<TIF_FORCED_TF)
- #define _TIF_IA32		(1<<TIF_IA32)
- #define _TIF_FORK		(1<<TIF_FORK)
- #define _TIF_ABI_PENDING	(1<<TIF_ABI_PENDING)
-Index: b/drivers/connector/cn_proc.c
-===================================================================
---- a/drivers/connector/cn_proc.c
-+++ b/drivers/connector/cn_proc.c
++
++#endif
+--- linux-2.6/include/asm-x86/signal.h
++++ linux-2.6/include/asm-x86/signal.h
+@@ -247,10 +247,8 @@ struct pt_regs;
+ 
+ #define ptrace_signal_deliver(regs, cookie)		\
+ 	do {						\
+-		if (current->ptrace & PT_DTRACE) {	\
+-			current->ptrace &= ~PT_DTRACE;	\
++		if (test_and_clear_thread_flag(TIF_FORCED_TF)) \
+ 			(regs)->eflags &= ~TF_MASK;	\
+-		}					\
+ 	} while (0)
+ 
+ #else /* __i386__ */
+--- linux-2.6/drivers/connector/cn_proc.c
++++ linux-2.6/drivers/connector/cn_proc.c
 @@ -63,8 +63,8 @@ void proc_fork_connector(struct task_str
  	ktime_get_ts(&ts); /* get high res monotonic timestamp */
  	put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
@@ -4111,11 +3843,9 @@
  	ev->event_data.fork.child_pid = task->pid;
  	ev->event_data.fork.child_tgid = task->tgid;
  
-Index: b/mm/nommu.c
-===================================================================
---- a/mm/nommu.c
-+++ b/mm/nommu.c
-@@ -20,7 +20,7 @@
+--- linux-2.6/mm/nommu.c
++++ linux-2.6/mm/nommu.c
+@@ -21,7 +21,7 @@
  #include <linux/pagemap.h>
  #include <linux/slab.h>
  #include <linux/vmalloc.h>
@@ -4124,7 +3854,7 @@
  #include <linux/blkdev.h>
  #include <linux/backing-dev.h>
  #include <linux/mount.h>
-@@ -674,7 +674,7 @@ static unsigned long determine_vm_flags(
+@@ -706,7 +706,7 @@ static unsigned long determine_vm_flags(
  	 * it's being traced - otherwise breakpoints set in it may interfere
  	 * with another untraced process
  	 */

linux-2.6-wireless.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.2 -r 1.3 linux-2.6-wireless.patch
Index: linux-2.6-wireless.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-wireless.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-wireless.patch	24 Jul 2007 14:13:44 -0000	1.2
+++ linux-2.6-wireless.patch	6 Mar 2008 13:59:26 -0000	1.3
@@ -1,23814 +1,391 @@
---- linux-2.6.21.noarch/CREDITS.orig	2007-06-14 13:40:38.000000000 -0400
-+++ linux-2.6.21.noarch/CREDITS	2007-06-14 13:40:56.000000000 -0400
-@@ -317,6 +317,12 @@ S: 2322 37th Ave SW
- S: Seattle, Washington 98126-2010
- S: USA
- 
-+N: Johannes Berg
-+E: johannes at sipsolutions.net
-+W: http://johannes.sipsolutions.net/
-+P: 1024D/9AB78CA5 AD02 0176 4E29 C137 1DF6 08D2 FC44 CF86 9AB7 8CA5
-+D: powerpc & 802.11 hacker
-+
- N: Stephen R. van den Berg (AKA BuGless)
- E: berg at pool.informatik.rwth-aachen.de
- D: General kernel, gcc, and libc hacker
---- linux-2.6.21.noarch/lib/Makefile.orig	2007-06-14 13:54:21.000000000 -0400
-+++ linux-2.6.21.noarch/lib/Makefile	2007-06-14 13:41:27.000000000 -0400
-@@ -40,6 +40,7 @@ endif
- obj-$(CONFIG_BITREVERSE) += bitrev.o
- obj-$(CONFIG_CRC_CCITT)	+= crc-ccitt.o
- obj-$(CONFIG_CRC16)	+= crc16.o
-+obj-$(CONFIG_CRC_ITU_T)	+= crc-itu-t.o
- obj-$(CONFIG_CRC32)	+= crc32.o
- obj-$(CONFIG_LIBCRC32C)	+= libcrc32c.o
- obj-$(CONFIG_GENERIC_ALLOCATOR) += genalloc.o
---- linux-2.6.21.noarch/lib/Kconfig.orig	2007-06-14 13:54:21.000000000 -0400
-+++ linux-2.6.21.noarch/lib/Kconfig	2007-06-14 13:41:27.000000000 -0400
-@@ -23,6 +23,14 @@ config CRC16
- 	  the kernel tree does. Such modules that use library CRC16
- 	  functions require M here.
- 
-+config CRC_ITU_T
-+	tristate "CRC ITU-T V.41 functions"
-+	help
-+	  This option is provided for the case where no in-kernel-tree
-+	  modules require CRC ITU-T V.41 functions, but a module built outside
-+	  the kernel tree does. Such modules that use library CRC ITU-T V.41
-+	  functions require M here.
-+
- config CRC32
- 	tristate "CRC32 functions"
- 	default y
---- linux-2.6.21.noarch/lib/crc-itu-t.c.orig	2007-06-14 13:54:39.000000000 -0400
-+++ linux-2.6.21.noarch/lib/crc-itu-t.c	2007-06-14 13:41:27.000000000 -0400
-@@ -0,0 +1,69 @@
-+/*
-+ *      crc-itu-t.c
-+ *
-+ * This source code is licensed under the GNU General Public License,
-+ * Version 2. See the file COPYING for more details.
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/module.h>
-+#include <linux/crc-itu-t.h>
-+
-+/** CRC table for the CRC ITU-T V.41 0x0x1021 (x^16 + x^12 + x^15 + 1) */
-+const u16 crc_itu_t_table[256] = {
-+	0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,
-+	0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,
-+	0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6,
-+	0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de,
-+	0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485,
-+	0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d,
-+	0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4,
-+	0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc,
-+	0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823,
-+	0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b,
-+	0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12,
-+	0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a,
-+	0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41,
-+	0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49,
-+	0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70,
-+	0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78,
-+	0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f,
-+	0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067,
-+	0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e,
-+	0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256,
-+	0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d,
-+	0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
-+	0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c,
-+	0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634,
-+	0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab,
-+	0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3,
-+	0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a,
-+	0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92,
-+	0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9,
-+	0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1,
-+	0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8,
-+	0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0
-+};
-+
-+EXPORT_SYMBOL(crc_itu_t_table);
-+
-+/**
-+ * crc_itu_t - Compute the CRC-ITU-T for the data buffer
-+ *
-+ * @crc:     previous CRC value
-+ * @buffer:  data pointer
-+ * @len:     number of bytes in the buffer
-+ *
-+ * Returns the updated CRC value
-+ */
-+u16 crc_itu_t(u16 crc, const u8 *buffer, size_t len)
-+{
-+	while (len--)
-+		crc = crc_itu_t_byte(crc, *buffer++);
-+	return crc;
-+}
-+EXPORT_SYMBOL(crc_itu_t);
-+
-+MODULE_DESCRIPTION("CRC ITU-T V.41 calculations");
-+MODULE_LICENSE("GPL");
-+
---- linux-2.6.21.noarch/include/linux/nl80211.h.orig	2007-06-14 13:40:38.000000000 -0400
-+++ linux-2.6.21.noarch/include/linux/nl80211.h	2007-06-14 13:40:56.000000000 -0400
-@@ -0,0 +1,38 @@
-+#ifndef __LINUX_NL80211_H
-+#define __LINUX_NL80211_H
-+/*
-+ * 802.11 netlink interface public header
-+ *
-+ * Copyright 2006, 2007 Johannes Berg <johannes at sipsolutions.net>
-+ */
-+
-+/**
-+ * enum nl80211_iftype - (virtual) interface types
-+ * @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides
-+ * @NL80211_IFTYPE_ADHOC: independent BSS member
-+ * @NL80211_IFTYPE_STATION: managed BSS member
-+ * @NL80211_IFTYPE_AP: access point
-+ * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points
-+ * @NL80211_IFTYPE_WDS: wireless distribution interface
-+ * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames
-+ * @__NL80211_IFTYPE_AFTER_LAST: internal use
-+ *
-+ * These values are used with the NL80211_ATTR_IFTYPE
-+ * to set the type of an interface.
-+ *
-+ */
-+enum nl80211_iftype {
-+	NL80211_IFTYPE_UNSPECIFIED,
-+	NL80211_IFTYPE_ADHOC,
-+	NL80211_IFTYPE_STATION,
-+	NL80211_IFTYPE_AP,
-+	NL80211_IFTYPE_AP_VLAN,
-+	NL80211_IFTYPE_WDS,
-+	NL80211_IFTYPE_MONITOR,
-+
-+	/* keep last */
-+	__NL80211_IFTYPE_AFTER_LAST
-+};
-+#define NL80211_IFTYPE_MAX (__NL80211_IFTYPE_AFTER_LAST - 1)
-+
-+#endif /* __LINUX_NL80211_H */
---- linux-2.6.21.noarch/include/linux/ieee80211.h.orig	2007-06-14 13:40:38.000000000 -0400
-+++ linux-2.6.21.noarch/include/linux/ieee80211.h	2007-06-14 13:40:56.000000000 -0400
-@@ -0,0 +1,342 @@
-+/*
-+ * IEEE 802.11 defines
-+ *
-+ * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
-+ * <jkmaline at cc.hut.fi>
-+ * Copyright (c) 2002-2003, Jouni Malinen <jkmaline at cc.hut.fi>
-+ * Copyright (c) 2005, Devicescape Software, Inc.
-+ * Copyright (c) 2006, Michael Wu <flamingice at sourmilk.net>
-+ *
-+ * 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 IEEE80211_H
-+#define IEEE80211_H
-+
-+#include <linux/types.h>
-+
-+#define FCS_LEN 4
-+
-+#define IEEE80211_FCTL_VERS		0x0003
-+#define IEEE80211_FCTL_FTYPE		0x000c
-+#define IEEE80211_FCTL_STYPE		0x00f0
-+#define IEEE80211_FCTL_TODS		0x0100
-+#define IEEE80211_FCTL_FROMDS		0x0200
-+#define IEEE80211_FCTL_MOREFRAGS	0x0400
-+#define IEEE80211_FCTL_RETRY		0x0800
-+#define IEEE80211_FCTL_PM		0x1000
-+#define IEEE80211_FCTL_MOREDATA		0x2000
-+#define IEEE80211_FCTL_PROTECTED	0x4000
-+#define IEEE80211_FCTL_ORDER		0x8000
-+
[...23803 lines suppressed...]
+@@ -166,18 +166,23 @@ int p54_parse_eeprom(struct ieee80211_hw
+ 	struct p54_common *priv = dev->priv;
+ 	struct eeprom_pda_wrap *wrap = NULL;
+ 	struct pda_entry *entry;
+-	int i = 0;
+ 	unsigned int data_len, entry_len;
+ 	void *tmp;
+ 	int err;
++	u8 *end = (u8 *)eeprom + len;
+ 
+ 	wrap = (struct eeprom_pda_wrap *) eeprom;
+-	entry = (void *)wrap->data + wrap->len;
+-	i += 2;
+-	i += le16_to_cpu(entry->len)*2;
+-	while (i < len) {
++	entry = (void *)wrap->data + le16_to_cpu(wrap->len);
++
++	/* verify that at least the entry length/code fits */
++	while ((u8 *)entry <= end - sizeof(*entry)) {
+ 		entry_len = le16_to_cpu(entry->len);
+ 		data_len = ((entry_len - 1) << 1);
++
++		/* abort if entry exceeds whole structure */
++		if ((u8 *)entry + sizeof(*entry) + data_len > end)
++			break;
++
+ 		switch (le16_to_cpu(entry->code)) {
+ 		case PDR_MAC_ADDRESS:
+ 			SET_IEEE80211_PERM_ADDR(dev, entry->data);
+@@ -249,13 +254,12 @@ int p54_parse_eeprom(struct ieee80211_hw
+ 			priv->version = *(u8 *)(entry->data + 1);
+ 			break;
+ 		case PDR_END:
+-			i = len;
++			/* make it overrun */
++			entry_len = len;
+ 			break;
+ 		}
+ 
+ 		entry = (void *)entry + (entry_len + 1)*2;
+-		i += 2;
+-		i += entry_len*2;
+ 	}
  
--comment "Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support"
--	depends on NET_RADIO && PCI
- config PRISM54
- 	tristate 'Intersil Prism GT/Duette/Indigo PCI/Cardbus' 
--	depends on PCI && NET_RADIO && EXPERIMENTAL
-+	depends on PCI && EXPERIMENTAL && WLAN_80211
-+	select WIRELESS_EXT
- 	select FW_LOADER
- 	---help---
- 	  Enable PCI and Cardbus support for the following chipset based cards:
-@@ -523,7 +509,8 @@ config PRISM54
+ 	if (!priv->iq_autocal || !priv->output_limit || !priv->curve_data) {
+diff -up linux-2.6.24.noarch/drivers/net/wireless/b43legacy/main.c.orig linux-2.6.24.noarch/drivers/net/wireless/b43legacy/main.c
+--- linux-2.6.24.noarch/drivers/net/wireless/b43legacy/main.c.orig	2008-03-04 19:28:31.000000000 -0500
++++ linux-2.6.24.noarch/drivers/net/wireless/b43legacy/main.c	2008-03-04 19:30:56.000000000 -0500
+@@ -3829,7 +3829,7 @@ static void b43legacy_print_driverinfo(v
+ #ifdef CONFIG_B43LEGACY_DMA
+ 	feat_dma = "D";
+ #endif
+-	printk(KERN_INFO "Broadcom 43xx driver loaded "
++	printk(KERN_INFO "Broadcom 43xx-legacy driver loaded "
+ 	       "[ Features: %s%s%s%s%s, Firmware-ID: "
+ 	       B43legacy_SUPPORTED_FIRMWARE_ID " ]\n",
+ 	       feat_pci, feat_leds, feat_rfkill, feat_pio, feat_dma);
+diff -up linux-2.6.24.noarch/drivers/net/wireless/rndis_wlan.c.orig linux-2.6.24.noarch/drivers/net/wireless/rndis_wlan.c
+--- linux-2.6.24.noarch/drivers/net/wireless/rndis_wlan.c.orig	2008-03-04 19:28:37.000000000 -0500
++++ linux-2.6.24.noarch/drivers/net/wireless/rndis_wlan.c	2008-03-04 19:30:56.000000000 -0500
+@@ -260,7 +260,7 @@ struct NDIS_802_11_KEY {
+ 	__le32 KeyLength;
+ 	u8 Bssid[6];
+ 	u8 Padding[6];
+-	__le64 KeyRSC;
++	u8 KeyRSC[8];
+ 	u8 KeyMaterial[32];
+ } __attribute__((packed));
+ 
+@@ -1508,7 +1508,7 @@ static int rndis_iw_set_encode_ext(struc
+ 	struct usbnet *usbdev = dev->priv;
+ 	struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev);
+ 	struct NDIS_802_11_KEY ndis_key;
+-	int i, keyidx, ret;
++	int keyidx, ret;
+ 	u8 *addr;
+ 
+ 	keyidx = wrqu->encoding.flags & IW_ENCODE_INDEX;
+@@ -1543,9 +1543,7 @@ static int rndis_iw_set_encode_ext(struc
+ 	ndis_key.KeyIndex = cpu_to_le32(keyidx);
+ 
+ 	if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) {
+-		for (i = 0; i < 6; i++)
+-			ndis_key.KeyRSC |=
+-				cpu_to_le64(ext->rx_seq[i] << (i * 8));
++		memcpy(ndis_key.KeyRSC, ext->rx_seq, 6);
+ 		ndis_key.KeyIndex |= cpu_to_le32(1 << 29);
+ 	}
  
- config USB_ZD1201
- 	tristate "USB ZD1201 based Wireless device support"
--	depends on USB && NET_RADIO
-+	depends on USB && WLAN_80211
-+	select WIRELESS_EXT
- 	select FW_LOADER
- 	---help---
- 	  Say Y if you want to use wireless LAN adapters based on the ZyDAS
-@@ -542,11 +529,4 @@ source "drivers/net/wireless/hostap/Kcon
- source "drivers/net/wireless/bcm43xx/Kconfig"
- source "drivers/net/wireless/zd1211rw/Kconfig"
+diff -up linux-2.6.24.noarch/drivers/net/wireless/libertas/cmdresp.c.orig linux-2.6.24.noarch/drivers/net/wireless/libertas/cmdresp.c
+--- linux-2.6.24.noarch/drivers/net/wireless/libertas/cmdresp.c.orig	2008-03-04 19:28:31.000000000 -0500
++++ linux-2.6.24.noarch/drivers/net/wireless/libertas/cmdresp.c	2008-03-04 19:30:56.000000000 -0500
+@@ -562,9 +562,7 @@ int lbs_process_rx_command(struct lbs_pr
+ 	}
  
--# yes, this works even when no drivers are selected
--config NET_WIRELESS
--	bool
--	depends on NET_RADIO && (ISA || PCI || PPC_PMAC || PCMCIA)
--	default y
+ 	resp = (void *)priv->upld_buf;
 -
- endmenu
+-	curcmd = le16_to_cpu(resp->command);
 -
---- linux-2.6.21.noarch/drivers/net/wireless/bcm43xx/Kconfig.orig	2007-06-14 13:40:38.000000000 -0400
-+++ linux-2.6.21.noarch/drivers/net/wireless/bcm43xx/Kconfig	2007-06-14 13:40:57.000000000 -0400
-@@ -1,6 +1,7 @@
- config BCM43XX
- 	tristate "Broadcom BCM43xx wireless support"
--	depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && NET_RADIO && EXPERIMENTAL
-+	depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && WLAN_80211 && EXPERIMENTAL
-+	select WIRELESS_EXT
- 	select FW_LOADER
- 	select HW_RANDOM
- 	---help---
---- linux-2.6.21.noarch/drivers/net/wireless/hostap/Kconfig.orig	2007-06-14 13:40:38.000000000 -0400
-+++ linux-2.6.21.noarch/drivers/net/wireless/hostap/Kconfig	2007-06-14 13:40:57.000000000 -0400
-@@ -1,6 +1,7 @@
- config HOSTAP
- 	tristate "IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)"
--	depends on NET_RADIO
-+	depends on WLAN_80211
-+	select WIRELESS_EXT
- 	select IEEE80211
- 	select IEEE80211_CRYPT_WEP
- 	---help---
---- linux-2.6.21.noarch/Documentation/feature-removal-schedule.txt.orig	2007-06-14 13:40:38.000000000 -0400
-+++ linux-2.6.21.noarch/Documentation/feature-removal-schedule.txt	2007-06-14 13:40:57.000000000 -0400
-@@ -294,18 +294,6 @@ Who:	Richard Purdie <rpurdie at rpsys.net>
- 
- ---------------------------
++	curcmd = le16_to_cpu(priv->cur_cmd->cmdbuf->command);
+ 	respcmd = le16_to_cpu(resp->command);
+ 	result = le16_to_cpu(resp->result);
+ 
+@@ -572,9 +570,9 @@ int lbs_process_rx_command(struct lbs_pr
+ 		     respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies);
+ 	lbs_deb_hex(LBS_DEB_HOST, "CMD_RESP", (void *) resp, priv->upld_len);
+ 
+-	if (resp->seqnum != resp->seqnum) {
++	if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
+ 		lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
+-			    le16_to_cpu(resp->seqnum), le16_to_cpu(resp->seqnum));
++			    le16_to_cpu(resp->seqnum), le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum));
+ 		spin_unlock_irqrestore(&priv->driver_lock, flags);
+ 		ret = -1;
+ 		goto done;
+diff -up linux-2.6.24.noarch/drivers/ssb/driver_pcicore.c.orig linux-2.6.24.noarch/drivers/ssb/driver_pcicore.c
+--- linux-2.6.24.noarch/drivers/ssb/driver_pcicore.c.orig	2008-03-04 19:28:37.000000000 -0500
++++ linux-2.6.24.noarch/drivers/ssb/driver_pcicore.c	2008-03-04 19:30:56.000000000 -0500
+@@ -111,7 +111,10 @@ static void __init ssb_fixup_pcibridge(s
+ 
+ 	/* Enable PCI bridge bus mastering and memory space */
+ 	pci_set_master(dev);
+-	pcibios_enable_device(dev, ~0);
++	if (pcibios_enable_device(dev, ~0) < 0) {
++		ssb_printk(KERN_ERR "PCI: SSB bridge enable failed\n");
++		return;
++	}
  
--What:	Wireless extensions over netlink (CONFIG_NET_WIRELESS_RTNETLINK)
--When:	with the merge of wireless-dev, 2.6.22 or later
--Why:	The option/code is
--	 * not enabled on most kernels
--	 * not required by any userspace tools (except an experimental one,
--	   and even there only for some parts, others use ioctl)
--	 * pointless since wext is no longer evolving and the ioctl
--	   interface needs to be kept
--Who:	Johannes Berg <johannes at sipsolutions.net>
--
-----------------------------
--
- What:	i8xx_tco watchdog driver
- When:	in 2.6.22
- Why:	the i8xx_tco watchdog driver has been replaced by the iTCO_wdt
+ 	/* Enable PCI bridge BAR1 prefetch and burst */
+ 	pci_write_config_dword(dev, SSB_BAR1_CONTROL, 3);

linux-2.6-x86-tune-generic.patch:

Index: linux-2.6-x86-tune-generic.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-x86-tune-generic.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-x86-tune-generic.patch	24 Jan 2007 01:28:48 -0000	1.1
+++ linux-2.6-x86-tune-generic.patch	6 Mar 2008 13:59:26 -0000	1.2
@@ -1,5 +1,7 @@
---- linux-2.6.15/arch/i386/Makefile.cpu~	2006-01-09 11:39:04.000000000 -0500
-+++ linux-2.6.15/arch/i386/Makefile.cpu	2006-01-09 11:39:36.000000000 -0500
+* Optimise for today's CPUs.
+
+--- linux-2.6/arch/x86/Makefile_32.cpu	2006-01-09 11:39:04.000000000 -0500
++++ linux-2.6/arch/x86/Makefile_32.cpu	2006-01-09 11:39:36.000000000 -0500
 @@ -15,7 +15,7 @@ cflags-$(CONFIG_M486)		+= -march=i486
  cflags-$(CONFIG_M586)		+= -march=i586
  cflags-$(CONFIG_M586TSC)	+= -march=i586

nouveau-drm.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.2 -r 1.3 nouveau-drm.patch
Index: nouveau-drm.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/nouveau-drm.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- nouveau-drm.patch	24 Jul 2007 14:13:45 -0000	1.2
+++ nouveau-drm.patch	6 Mar 2008 13:59:26 -0000	1.3
@@ -1,71 +1,231 @@
+From 97feb40c0d41369a3235a192b3db7d472e65bea8 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied at redhat.com>
+Date: Fri, 29 Feb 2008 15:58:37 +1000
+Subject: [PATCH] nouveau: rebased master from git
+
+---
+ drivers/char/drm/Kconfig            |    7 +
+ drivers/char/drm/Makefile           |   12 +
+ drivers/char/drm/drmP.h             |    4 +-
+ drivers/char/drm/drm_bufs.c         |    5 +-
+ drivers/char/drm/drm_drv.c          |    4 +
+ drivers/char/drm/drm_irq.c          |    3 +-
+ drivers/char/drm/drm_pciids.h       |  262 ++++
+ drivers/char/drm/nouveau_buffer.c   |  293 +++++
+ drivers/char/drm/nouveau_dma.c      |  172 +++
+ drivers/char/drm/nouveau_dma.h      |   96 ++
+ drivers/char/drm/nouveau_drm.h      |  166 +++
+ drivers/char/drm/nouveau_drv.c      |  108 ++
+ drivers/char/drm/nouveau_drv.h      |  602 ++++++++++
+ drivers/char/drm/nouveau_fence.c    |  120 ++
+ drivers/char/drm/nouveau_fifo.c     |  590 ++++++++++
+ drivers/char/drm/nouveau_ioc32.c    |   72 ++
+ drivers/char/drm/nouveau_irq.c      |  477 ++++++++
+ drivers/char/drm/nouveau_mem.c      |  674 +++++++++++
+ drivers/char/drm/nouveau_notifier.c |  165 +++
+ drivers/char/drm/nouveau_object.c   | 1148 ++++++++++++++++++
+ drivers/char/drm/nouveau_reg.h      |  586 +++++++++
+ drivers/char/drm/nouveau_sgdma.c    |  341 ++++++
+ drivers/char/drm/nouveau_state.c    |  694 +++++++++++
+ drivers/char/drm/nouveau_swmthd.c   |  191 +++
+ drivers/char/drm/nouveau_swmthd.h   |   33 +
+ drivers/char/drm/nv04_fb.c          |   23 +
+ drivers/char/drm/nv04_fifo.c        |  138 +++
+ drivers/char/drm/nv04_graph.c       |  516 ++++++++
+ drivers/char/drm/nv04_instmem.c     |  159 +++
+ drivers/char/drm/nv04_mc.c          |   35 +
+ drivers/char/drm/nv04_timer.c       |   44 +
+ drivers/char/drm/nv10_fb.c          |   25 +
+ drivers/char/drm/nv10_fifo.c        |  169 +++
+ drivers/char/drm/nv10_graph.c       |  871 ++++++++++++++
+ drivers/char/drm/nv20_graph.c       |  889 ++++++++++++++
+ drivers/char/drm/nv40_fb.c          |   62 +
+ drivers/char/drm/nv40_fifo.c        |  199 ++++
+ drivers/char/drm/nv40_graph.c       | 2225 +++++++++++++++++++++++++++++++++++
+ drivers/char/drm/nv40_mc.c          |   38 +
+ drivers/char/drm/nv50_fifo.c        |  339 ++++++
+ drivers/char/drm/nv50_graph.c       |  363 ++++++
+ drivers/char/drm/nv50_instmem.c     |  323 +++++
+ drivers/char/drm/nv50_mc.c          |   43 +
+ 43 files changed, 13282 insertions(+), 4 deletions(-)
+ create mode 100644 drivers/char/drm/nouveau_buffer.c
+ create mode 100644 drivers/char/drm/nouveau_dma.c
+ create mode 100644 drivers/char/drm/nouveau_dma.h
+ create mode 100644 drivers/char/drm/nouveau_drm.h
+ create mode 100644 drivers/char/drm/nouveau_drv.c
+ create mode 100644 drivers/char/drm/nouveau_drv.h
+ create mode 100644 drivers/char/drm/nouveau_fence.c
+ create mode 100644 drivers/char/drm/nouveau_fifo.c
+ create mode 100644 drivers/char/drm/nouveau_ioc32.c
+ create mode 100644 drivers/char/drm/nouveau_irq.c
+ create mode 100644 drivers/char/drm/nouveau_mem.c
+ create mode 100644 drivers/char/drm/nouveau_notifier.c
+ create mode 100644 drivers/char/drm/nouveau_object.c
+ create mode 100644 drivers/char/drm/nouveau_reg.h
+ create mode 100644 drivers/char/drm/nouveau_sgdma.c
+ create mode 100644 drivers/char/drm/nouveau_state.c
+ create mode 100644 drivers/char/drm/nouveau_swmthd.c
+ create mode 100644 drivers/char/drm/nouveau_swmthd.h
+ create mode 100644 drivers/char/drm/nv04_fb.c
+ create mode 100644 drivers/char/drm/nv04_fifo.c
+ create mode 100644 drivers/char/drm/nv04_graph.c
+ create mode 100644 drivers/char/drm/nv04_instmem.c
+ create mode 100644 drivers/char/drm/nv04_mc.c
+ create mode 100644 drivers/char/drm/nv04_timer.c
+ create mode 100644 drivers/char/drm/nv10_fb.c
+ create mode 100644 drivers/char/drm/nv10_fifo.c
+ create mode 100644 drivers/char/drm/nv10_graph.c
+ create mode 100644 drivers/char/drm/nv20_graph.c
+ create mode 100644 drivers/char/drm/nv40_fb.c
+ create mode 100644 drivers/char/drm/nv40_fifo.c
+ create mode 100644 drivers/char/drm/nv40_graph.c
+ create mode 100644 drivers/char/drm/nv40_mc.c
+ create mode 100644 drivers/char/drm/nv50_fifo.c
+ create mode 100644 drivers/char/drm/nv50_graph.c
+ create mode 100644 drivers/char/drm/nv50_instmem.c
+ create mode 100644 drivers/char/drm/nv50_mc.c
+
 diff --git a/drivers/char/drm/Kconfig b/drivers/char/drm/Kconfig
-index ef833a1..065f499 100644
+index 610d6fd..6b98529 100644
 --- a/drivers/char/drm/Kconfig
 +++ b/drivers/char/drm/Kconfig
-@@ -106,3 +106,9 @@ config DRM_SAVAGE
+@@ -105,3 +105,10 @@ config DRM_SAVAGE
+ 	help
  	  Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
  	  chipset. If M is selected the module will be called savage.
- 
++
 +config DRM_NOUVEAU
 +	tristate "Nvidia video cards"
-+	depends on DRM && PCI
++	depends on DRM
 +	help
-+	  Choose this option if you want to enable nouveau reverse engineered
-+          driver for nvidia chipset. The module will be called nouveau.
++	  Choose this for nvidia open source 3d driver
++
 diff --git a/drivers/char/drm/Makefile b/drivers/char/drm/Makefile
-index 6915a05..20b79d5 100644
+index 85c4f9e..721548c 100644
 --- a/drivers/char/drm/Makefile
 +++ b/drivers/char/drm/Makefile
-@@ -14,6 +14,14 @@ mga-objs    := mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o
+@@ -15,6 +15,16 @@ mga-objs    := mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o
  i810-objs   := i810_drv.o i810_dma.o
  i830-objs   := i830_drv.o i830_dma.o i830_irq.o
- i915-objs   := i915_drv.o i915_dma.o i915_irq.o i915_mem.o
+ i915-objs   := i915_drv.o i915_dma.o i915_irq.o i915_mem.o i915_fence.o i915_buffer.o
 +nouveau-objs := nouveau_drv.o nouveau_state.o nouveau_fifo.o nouveau_mem.o \
-+                nouveau_object.o nouveau_irq.o \
++		nouveau_object.o nouveau_irq.o nouveau_notifier.o nouveau_swmthd.o \
++		nouveau_sgdma.o nouveau_dma.o nouveau_buffer.o nouveau_fence.o \
 +		nv04_timer.o \
-+		nv04_mc.o nv40_mc.o \
++		nv04_mc.o nv40_mc.o nv50_mc.o \
 +		nv04_fb.o nv10_fb.o nv40_fb.o \
-+		nv04_graph.o nv10_graph.o nv20_graph.o nv30_graph.o \
-+		nv40_graph.o
-+
++		nv04_fifo.o nv10_fifo.o nv40_fifo.o nv50_fifo.o \
++		nv04_graph.o nv10_graph.o nv20_graph.o \
++		nv40_graph.o nv50_graph.o \
++		nv04_instmem.o nv50_instmem.o
  radeon-objs := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o radeon_irq.o r300_cmdbuf.o
  sis-objs    := sis_drv.o sis_mm.o
  savage-objs := savage_drv.o savage_bci.o savage_state.o
-@@ -25,6 +33,7 @@ radeon-objs += radeon_ioc32.o
+@@ -26,6 +36,7 @@ radeon-objs += radeon_ioc32.o
  mga-objs    += mga_ioc32.o
  r128-objs   += r128_ioc32.o
  i915-objs   += i915_ioc32.o
-+nouveau-objs += nouveau_ioc32.o
++nouveau-objs   += nouveau_ioc32.o
  endif
  
  obj-$(CONFIG_DRM)	+= drm.o
-@@ -38,5 +47,6 @@ obj-$(CONFIG_DRM_I915)  += i915.o
+@@ -36,6 +47,7 @@ obj-$(CONFIG_DRM_MGA)	+= mga.o
+ obj-$(CONFIG_DRM_I810)	+= i810.o
+ obj-$(CONFIG_DRM_I830)	+= i830.o
+ obj-$(CONFIG_DRM_I915)  += i915.o
++obj-$(CONFIG_DRM_NOUVEAU)   += nouveau.o
  obj-$(CONFIG_DRM_SIS)   += sis.o
  obj-$(CONFIG_DRM_SAVAGE)+= savage.o
  obj-$(CONFIG_DRM_VIA)	+=via.o
-+obj-$(CONFIG_DRM_NOUVEAU) += nouveau.o
- 
- 
+diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
+index bd41621..a437ac2 100644
+--- a/drivers/char/drm/drmP.h
++++ b/drivers/char/drm/drmP.h
+@@ -1030,7 +1030,8 @@ extern unsigned long drm_get_resource_start(struct drm_device *dev,
+ 					    unsigned int resource);
+ extern unsigned long drm_get_resource_len(struct drm_device *dev,
+ 					  unsigned int resource);
+-
++struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
++					   drm_local_map_t *map);
+ 				/* DMA support (drm_dma.h) */
+ extern int drm_dma_setup(struct drm_device *dev);
+ extern void drm_dma_takedown(struct drm_device *dev);
+@@ -1042,6 +1043,7 @@ extern void drm_core_reclaim_buffers(struct drm_device *dev,
+ extern int drm_control(struct drm_device *dev, void *data,
+ 		       struct drm_file *file_priv);
+ extern irqreturn_t drm_irq_handler(DRM_IRQ_ARGS);
++extern int drm_irq_install(struct drm_device * dev);
+ extern int drm_irq_uninstall(struct drm_device *dev);
+ extern void drm_driver_irq_preinstall(struct drm_device *dev);
+ extern void drm_driver_irq_postinstall(struct drm_device *dev);
 diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c
-index a6828cc..f3da5c4 100644
+index 6da493f..f3aac97 100644
 --- a/drivers/char/drm/drm_bufs.c
 +++ b/drivers/char/drm/drm_bufs.c
-@@ -400,6 +400,7 @@ int drm_rmmap(drm_device_t *dev, drm_local_map_t *map)
+@@ -48,8 +48,8 @@ unsigned long drm_get_resource_len(struct drm_device *dev, unsigned int resource
+ }
+ EXPORT_SYMBOL(drm_get_resource_len);
+ 
[...13794 lines suppressed...]
++
++	/* Assume that praying isn't enough, check that we can re-read the
++	 * entire fake channel back from the PRAMIN BAR */
++	for (i = 0; i < c_size; i+=4) {
++		if (NV_READ(NV_RAMIN + i) != NV_RI32(i)) {
++			DRM_ERROR("Error reading back PRAMIN at 0x%08x\n", i);
++			return -EINVAL;
++		}
++	}
++
++	/* Global PRAMIN heap */
++	if (nouveau_mem_init_heap(&dev_priv->ramin_heap,
++				  c_size, dev_priv->ramin->size - c_size)) {
++		dev_priv->ramin_heap = NULL;
++		DRM_ERROR("Failed to init RAMIN heap\n");
++	}
++
++	/*XXX: incorrect, but needed to make hash func "work" */
++	dev_priv->ramht_offset = 0x10000;
++	dev_priv->ramht_bits   = 9;
++	dev_priv->ramht_size   = (1 << dev_priv->ramht_bits);
++	return 0;
++}
++
++void
++nv50_instmem_takedown(struct drm_device *dev)
++{
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++	nv50_instmem_priv *priv = dev_priv->Engine.instmem.priv;
++	struct nouveau_channel *chan = dev_priv->fifos[0];
++	int i;
++
++	DRM_DEBUG("\n");
++
++	if (!priv)
++		return;
++
++	/* Restore state from before init */
++	for (i = 0x1700; i <= 0x1710; i+=4)
++		NV_WRITE(i, priv->save1700[(i-0x1700)/4]);
++
++	nouveau_gpuobj_ref_del(dev, &priv->pramin_bar);
++	nouveau_gpuobj_ref_del(dev, &priv->pramin_pt);
++
++	/* Destroy dummy channel */
++	if (chan) {
++		nouveau_gpuobj_del(dev, &chan->vm_pd);
++		nouveau_gpuobj_ref_del(dev, &chan->ramfc);
++		nouveau_gpuobj_ref_del(dev, &chan->ramin);
++		nouveau_mem_takedown(&chan->ramin_heap);
++
++		dev_priv->fifos[0] = dev_priv->fifos[127] = NULL;
++		drm_free(chan, sizeof(*chan), DRM_MEM_DRIVER);
++	}
++
++	dev_priv->Engine.instmem.priv = NULL;
++	drm_free(priv, sizeof(*priv), DRM_MEM_DRIVER);
++}
++
++int
++nv50_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, uint32_t *sz)
++{
++	if (gpuobj->im_backing)
++		return -EINVAL;
++
++	*sz = (*sz + (NV50_INSTMEM_PAGE_SIZE-1)) & ~(NV50_INSTMEM_PAGE_SIZE-1);
++	if (*sz == 0)
++		return -EINVAL;
++
++	gpuobj->im_backing = nouveau_mem_alloc(dev, NV50_INSTMEM_PAGE_SIZE,
++					       *sz, NOUVEAU_MEM_FB,
++					       (struct drm_file *)-2);
++	if (!gpuobj->im_backing) {
++		DRM_ERROR("Couldn't allocate vram to back PRAMIN pages\n");
++		return -ENOMEM;
++	}
++
++	return 0;
++}
++
++void
++nv50_instmem_clear(struct drm_device *dev, struct nouveau_gpuobj *gpuobj)
++{
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++
++	if (gpuobj && gpuobj->im_backing) {
++		if (gpuobj->im_bound)
++			dev_priv->Engine.instmem.unbind(dev, gpuobj);
++		nouveau_mem_free(dev, gpuobj->im_backing);
++		gpuobj->im_backing = NULL;
++	}
++}
++
++int
++nv50_instmem_bind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj)
++{
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++	nv50_instmem_priv *priv = dev_priv->Engine.instmem.priv;
++	uint32_t pte, pte_end, vram;
++
++	if (!gpuobj->im_backing || !gpuobj->im_pramin || gpuobj->im_bound)
++		return -EINVAL;
++
++	DRM_DEBUG("st=0x%0llx sz=0x%0llx\n",
++		  gpuobj->im_pramin->start, gpuobj->im_pramin->size);
++
++	pte     = (gpuobj->im_pramin->start >> 12) << 3;
++	pte_end = ((gpuobj->im_pramin->size >> 12) << 3) + pte;
++	vram    = gpuobj->im_backing->start;
++
++	DRM_DEBUG("pramin=0x%llx, pte=%d, pte_end=%d\n",
++		  gpuobj->im_pramin->start, pte, pte_end);
++	DRM_DEBUG("first vram page: 0x%llx\n",
++		  gpuobj->im_backing->start);
++
++	while (pte < pte_end) {
++		INSTANCE_WR(priv->pramin_pt->gpuobj, (pte + 0)/4, vram | 1);
++		INSTANCE_WR(priv->pramin_pt->gpuobj, (pte + 4)/4, 0x00000000);
++
++		pte += 8;
++		vram += NV50_INSTMEM_PAGE_SIZE;
++	}
++
++	gpuobj->im_bound = 1;
++	return 0;
++}
++
++int
++nv50_instmem_unbind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj)
++{
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++	nv50_instmem_priv *priv = dev_priv->Engine.instmem.priv;
++	uint32_t pte, pte_end;
++
++	if (gpuobj->im_bound == 0)
++		return -EINVAL;
++
++	pte     = (gpuobj->im_pramin->start >> 12) << 3;
++	pte_end = ((gpuobj->im_pramin->size >> 12) << 3) + pte;
++	while (pte < pte_end) {
++		INSTANCE_WR(priv->pramin_pt->gpuobj, (pte + 0)/4, 0x00000009);
++		INSTANCE_WR(priv->pramin_pt->gpuobj, (pte + 4)/4, 0x00000000);
++		pte += 8;
++	}
++
++	gpuobj->im_bound = 0;
++	return 0;
++}
+diff --git a/drivers/char/drm/nv50_mc.c b/drivers/char/drm/nv50_mc.c
+new file mode 100644
+index 0000000..b111826
+--- /dev/null
++++ b/drivers/char/drm/nv50_mc.c
+@@ -0,0 +1,43 @@
++/*
++ * Copyright (C) 2007 Ben Skeggs.
++ * All Rights Reserved.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining
++ * a copy of this software and associated documentation files (the
++ * "Software"), to deal in the Software without restriction, including
++ * without limitation the rights to use, copy, modify, merge, publish,
++ * distribute, sublicense, and/or sell copies of the Software, and to
++ * permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the
++ * next paragraph) shall be included in all copies or substantial
++ * portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
++ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++ *
++ */
++
++#include "drmP.h"
++#include "drm.h"
++#include "nouveau_drv.h"
++
++int
++nv50_mc_init(struct drm_device *dev)
++{
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++
++	NV_WRITE(NV03_PMC_ENABLE, 0xFFFFFFFF);
++
++	return 0;
++}
++
++void nv50_mc_takedown(struct drm_device *dev)
++{
++}
+-- 
+1.5.3.7
+


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/sources,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- sources	18 Jan 2008 19:14:27 -0000	1.11
+++ sources	6 Mar 2008 13:59:26 -0000	1.12
@@ -1,4 +1,3 @@
-1b515f588078dfa7f4bab2634bd17e80  linux-2.6.21.tar.bz2
-b9c8734471a454806c77f040fcf9869b  patch-2.6.21.7.bz2
-0b7a1468bcd3353b77494cbf0e97d2e4  linux-2.6.21.7-xen-3.1.0.patch.bz2
+3f23ad4b69d0a552042d1ed0f4399857  linux-2.6.24.tar.bz2
+a4cc0fd5bda60e498246b6d69c873895  patch-2.6.25-rc4.bz2
 4aa57328d0802a063fa67dfc063da30e  xen-3.2.0.tar.gz

xen-build-id.patch:

Index: xen-build-id.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/xen-build-id.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xen-build-id.patch	29 Oct 2007 17:29:06 -0000	1.2
+++ xen-build-id.patch	6 Mar 2008 13:59:26 -0000	1.3
@@ -1,8 +1,20 @@
-Index: xen-3.1.0-rc7-7041b52471c3/Config.mk
-===================================================================
---- xen-3.1.0-rc7-7041b52471c3.orig/Config.mk
-+++ xen-3.1.0-rc7-7041b52471c3/Config.mk
-@@ -52,6 +52,12 @@ define cc-ver-check-closure
+diff -up xen-3.2.0/xen/Rules.mk.build-id xen-3.2.0/xen/Rules.mk
+--- xen-3.2.0/xen/Rules.mk.build-id	2008-01-16 18:34:59.000000000 +0000
++++ xen-3.2.0/xen/Rules.mk	2008-02-13 18:26:21.000000000 +0000
+@@ -84,6 +84,9 @@ CFLAGS   := $(strip $(CFLAGS) $(CFLAGS-y
+ AFLAGS   := $(strip $(AFLAGS) $(AFLAGS-y))
+ AFLAGS   += $(patsubst -std=gnu%,,$(CFLAGS))
+ 
++# Use --build-id when linking directly; normally the compiler would pass it.
++LDFLAGS_DIRECT += $(call ld-option,$(CC),--build-id,)
++
+ # LDFLAGS are only passed directly to $(LD)
+ LDFLAGS  := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
+ 
+diff -up xen-3.2.0/Config.mk.build-id xen-3.2.0/Config.mk
+--- xen-3.2.0/Config.mk.build-id	2008-01-16 18:34:59.000000000 +0000
++++ xen-3.2.0/Config.mk	2008-02-13 18:26:21.000000000 +0000
+@@ -57,6 +57,12 @@ define cc-ver-check-closure
      endif
  endef
  
@@ -15,17 +27,3 @@
  ifneq ($(debug),y)
  CFLAGS += -DNDEBUG
  else
-Index: xen-3.1.0-rc7-7041b52471c3/xen/Rules.mk
-===================================================================
---- xen-3.1.0-rc7-7041b52471c3.orig/xen/Rules.mk
-+++ xen-3.1.0-rc7-7041b52471c3/xen/Rules.mk
-@@ -72,6 +72,9 @@ CFLAGS   := $(strip $(CFLAGS) $(CFLAGS-y
- AFLAGS   := $(strip $(AFLAGS) $(AFLAGS-y))
- AFLAGS   += $(patsubst -std=gnu%,,$(CFLAGS))
- 
-+# Use --build-id when linking directly; normally the compiler would pass it.
-+LDFLAGS_DIRECT += $(call ld-option,$(CC),--build-id,)
-+
- # LDFLAGS are only passed directly to $(LD)
- LDFLAGS  := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
- 

xen-compile-fix.patch:

Index: xen-compile-fix.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/xen-compile-fix.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- xen-compile-fix.patch	13 Sep 2007 19:20:29 -0000	1.3
+++ xen-compile-fix.patch	6 Mar 2008 13:59:26 -0000	1.4
@@ -1,13 +1,12 @@
-Index: xen-3.1.0/xen/include/asm-x86/hvm/hvm.h
-===================================================================
---- xen-3.1.0/xen/include/asm-x86/hvm/hvm.h
-+++ xen-3.1.0/xen/include/asm-x86/hvm/hvm.h
-@@ -183,7 +183,7 @@ hvm_long_mode_enabled(struct vcpu *v)
-     return hvm_funcs.long_mode_enabled(v);
- }
+diff -up xen-3.2.0/xen/include/asm-x86/hvm/hvm.h.compile-fix xen-3.2.0/xen/include/asm-x86/hvm/hvm.h
+--- xen-3.2.0/xen/include/asm-x86/hvm/hvm.h.compile-fix	2008-02-13 18:21:43.000000000 +0000
++++ xen-3.2.0/xen/include/asm-x86/hvm/hvm.h	2008-02-13 18:25:14.000000000 +0000
+@@ -155,7 +155,7 @@ u64 hvm_get_guest_tsc(struct vcpu *v);
+ #define hvm_long_mode_enabled(v) \
+     ((v)->arch.hvm_vcpu.guest_efer & EFER_LMA)
  #else
 -#define hvm_long_mode_enabled(v) (v,0)
 +#define hvm_long_mode_enabled(v) 0
  #endif
  
-  static inline int
+ enum hvm_intblk

xen-syms-build-id.patch:

Index: xen-syms-build-id.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/xen-syms-build-id.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xen-syms-build-id.patch	29 Oct 2007 17:29:06 -0000	1.2
+++ xen-syms-build-id.patch	6 Mar 2008 13:59:26 -0000	1.3
@@ -1,7 +1,6 @@
 From: Eduardo Habkost <ehabkost at redhat.com>
 Subject: Add build-id section to xen-syms
 
-
 This needs some changes on xen.lds.S and to mkelf32. The linker script
 need a .notes section and a note phdr. mkelf32 needs to support a input
 file containing more than one phdr and ignore the note phdr.
@@ -10,12 +9,9 @@
 xen hypervisor image that boots doesn't have the build-id information,
 but the build-id section is a requirement of Fedora's find-debuginfo.sh.
 
-
----
-Index: xen-3.1.0-rc7-7041b52471c3/xen/arch/x86/boot/mkelf32.c
-===================================================================
---- xen-3.1.0-rc7-7041b52471c3.orig/xen/arch/x86/boot/mkelf32.c
-+++ xen-3.1.0-rc7-7041b52471c3/xen/arch/x86/boot/mkelf32.c
+diff -up xen-3.2.0/xen/arch/x86/boot/mkelf32.c.syms-build-id xen-3.2.0/xen/arch/x86/boot/mkelf32.c
+--- xen-3.2.0/xen/arch/x86/boot/mkelf32.c.syms-build-id	2008-01-16 18:34:59.000000000 +0000
++++ xen-3.2.0/xen/arch/x86/boot/mkelf32.c	2008-02-13 18:27:05.000000000 +0000
 @@ -229,10 +229,11 @@ int main(int argc, char **argv)
  {
      u64        final_exec_addr;
@@ -134,11 +130,10 @@
      /*
       * End the image on a page boundary. This gets round alignment bugs
       * in the boot- or chain-loader (e.g., kexec on the XenoBoot CD).
-Index: xen-3.1.0-rc7-7041b52471c3/xen/arch/x86/x86_32/xen.lds.S
-===================================================================
---- xen-3.1.0-rc7-7041b52471c3.orig/xen/arch/x86/x86_32/xen.lds.S
-+++ xen-3.1.0-rc7-7041b52471c3/xen/arch/x86/x86_32/xen.lds.S
-@@ -15,6 +15,7 @@ ENTRY(start)
+diff -up xen-3.2.0/xen/arch/x86/x86_64/xen.lds.S.syms-build-id xen-3.2.0/xen/arch/x86/x86_64/xen.lds.S
+--- xen-3.2.0/xen/arch/x86/x86_64/xen.lds.S.syms-build-id	2008-01-16 18:34:59.000000000 +0000
++++ xen-3.2.0/xen/arch/x86/x86_64/xen.lds.S	2008-02-13 18:27:05.000000000 +0000
+@@ -13,6 +13,7 @@ ENTRY(start)
  PHDRS
  {
    text PT_LOAD ;
@@ -146,17 +141,16 @@
  }
  SECTIONS
  {
-@@ -96,4 +97,5 @@ SECTIONS
+@@ -99,4 +100,5 @@ SECTIONS
    .stab.index 0 : { *(.stab.index) }
    .stab.indexstr 0 : { *(.stab.indexstr) }
    .comment 0 : { *(.comment) }
 +  .notes : { *(.note*) } :note
  }
-Index: xen-3.1.0-rc7-7041b52471c3/xen/arch/x86/x86_64/xen.lds.S
-===================================================================
---- xen-3.1.0-rc7-7041b52471c3.orig/xen/arch/x86/x86_64/xen.lds.S
-+++ xen-3.1.0-rc7-7041b52471c3/xen/arch/x86/x86_64/xen.lds.S
-@@ -13,6 +13,7 @@ ENTRY(start)
+diff -up xen-3.2.0/xen/arch/x86/x86_32/xen.lds.S.syms-build-id xen-3.2.0/xen/arch/x86/x86_32/xen.lds.S
+--- xen-3.2.0/xen/arch/x86/x86_32/xen.lds.S.syms-build-id	2008-01-16 18:34:59.000000000 +0000
++++ xen-3.2.0/xen/arch/x86/x86_32/xen.lds.S	2008-02-13 18:27:05.000000000 +0000
+@@ -15,6 +15,7 @@ ENTRY(start)
  PHDRS
  {
    text PT_LOAD ;
@@ -164,7 +158,7 @@
  }
  SECTIONS
  {
-@@ -94,4 +95,5 @@ SECTIONS
+@@ -101,4 +102,5 @@ SECTIONS
    .stab.index 0 : { *(.stab.index) }
    .stab.indexstr 0 : { *(.stab.indexstr) }
    .comment 0 : { *(.comment) }


--- config-olpc-generic DELETED ---


--- git-wireless-dev.patch DELETED ---


--- kernel-2.6.21.7-i686-xen.config DELETED ---


--- kernel-2.6.21.7-x86_64-xen.config DELETED ---


--- linux-2.6-2110_scsi-sd-printing.patch DELETED ---


--- linux-2.6-2111_sd-start-stop.patch DELETED ---


--- linux-2.6-2112_libata-suspend.patch DELETED ---


--- linux-2.6-2113_libata-spindown-compat.patch DELETED ---


--- linux-2.6-2114_libata-shutdown-warning.patch DELETED ---


--- linux-2.6-2115_libata-spindown-status.patch DELETED ---


--- linux-2.6-2116_libata-remove-spindown-compat.patch DELETED ---


--- linux-2.6-2117_sata-via-suspend.patch DELETED ---


--- linux-2.6-2118_scsi-constants.patch DELETED ---


--- linux-2.6-3w-9xxx-mem_len.patch DELETED ---


--- linux-2.6-PT_LOAD-align.patch DELETED ---


--- linux-2.6-acpi-boot-regression.patch DELETED ---


--- linux-2.6-acpi-config_pm-poweroff.patch DELETED ---


--- linux-2.6-acpi-dock-oops.patch DELETED ---


--- linux-2.6-acpi-keep-tsc-stable-when-lapic-timer-c2-ok-is-set.patch DELETED ---


--- linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch DELETED ---


--- linux-2.6-acpi-unblacklist-dell-gx240.patch DELETED ---


--- linux-2.6-amd-disabled-svm-detect-msr-1.patch DELETED ---


--- linux-2.6-amd-disabled-svm-detect.patch DELETED ---


--- linux-2.6-ata-call-check-dma-with-qc-prepared.patch DELETED ---


--- linux-2.6-ata-use-pio-for-non-16-byte-xfers.patch DELETED ---


--- linux-2.6-bcm43xx-pci-neuter.patch DELETED ---


--- linux-2.6-cell-spu-device-tree.patch DELETED ---


--- linux-2.6-cell-spufs-fixes.patch DELETED ---


--- linux-2.6-clockevents-fix-resume-logic.patch DELETED ---


--- linux-2.6-common-uevent.patch DELETED ---


--- linux-2.6-crap-sysfs-workaround.patch DELETED ---


--- linux-2.6-crash-driver-xen.patch DELETED ---


--- linux-2.6-debug-boot-delay.patch DELETED ---


--- linux-2.6-debug-extra-warnings.patch DELETED ---


--- linux-2.6-debug-must_check.patch DELETED ---


--- linux-2.6-debug-slab-backtrace.patch DELETED ---


--- linux-2.6-debug-sysfs-crash-debugging-xen.patch DELETED ---


--- linux-2.6-debug-sysfs-crash-debugging.patch DELETED ---


--- linux-2.6-defaults-nonmi.patch DELETED ---


--- linux-2.6-defaults-pci_no_msi_mmconf.patch DELETED ---


--- linux-2.6-defaults-unicode-vt.patch DELETED ---


--- linux-2.6-devmem-xen.patch DELETED ---


--- linux-2.6-disable-netback-checksum.patch DELETED ---


--- linux-2.6-dvb-spinlock.patch DELETED ---


--- linux-2.6-execshield-xen.patch DELETED ---


--- linux-2.6-firewire-be32-fix.patch DELETED ---


--- linux-2.6-firewire.patch DELETED ---


--- linux-2.6-fix-pmops-1.patch DELETED ---


--- linux-2.6-fix-pmops-2.patch DELETED ---


--- linux-2.6-fix-pmops-3.patch DELETED ---


--- linux-2.6-fix-pmops-4.patch DELETED ---


--- linux-2.6-gfs2-update.patch DELETED ---


--- linux-2.6-i82875-edac-pci-setup.patch DELETED ---


--- linux-2.6-i965gm-support.patch DELETED ---


--- linux-2.6-ibmvscsi-schizo.patch DELETED ---


--- linux-2.6-kvm-19.patch DELETED ---


--- linux-2.6-kvm-reinit-real-mode-tss.patch DELETED ---


--- linux-2.6-libata-atiixp-ids.patch DELETED ---


--- linux-2.6-libata-hpa.patch DELETED ---


--- linux-2.6-libata-ich8m-add-pciid.patch DELETED ---


--- linux-2.6-libata-ncq-blacklist-2.6.22-rc7.patch DELETED ---


--- linux-2.6-libata-pata-hpt3x2n-correct-revision-boundary.patch DELETED ---


--- linux-2.6-libata-pata-pcmcia-new-ident.patch DELETED ---


--- linux-2.6-libata-pata-sis-fix-timing.patch DELETED ---


--- linux-2.6-libata-pata_dma-param.patch DELETED ---


--- linux-2.6-libata-pata_it821x-partly-fix-dma.patch DELETED ---


--- linux-2.6-libata-sata_nv-adma.patch DELETED ---


--- linux-2.6-libata-sata_nv-wildcard-removal.patch DELETED ---


--- linux-2.6-libata-setxfer.patch DELETED ---


--- linux-2.6-libata_ali_max_dma_speed.patch DELETED ---


--- linux-2.6-libertas.diff DELETED ---


--- linux-2.6-mm-udf-fixes.patch DELETED ---


--- linux-2.6-modsign-core.patch DELETED ---


--- linux-2.6-modsign-crypto.patch DELETED ---


--- linux-2.6-modsign-include.patch DELETED ---


--- linux-2.6-modsign-ksign.patch DELETED ---


--- linux-2.6-modsign-mpilib.patch DELETED ---


--- linux-2.6-modsign-script.patch DELETED ---


--- linux-2.6-modsign-verify.patch DELETED ---


--- linux-2.6-module_version.patch DELETED ---


--- linux-2.6-mpc52xx-fec.patch DELETED ---


--- linux-2.6-mpc52xx-sdma.patch DELETED ---


--- linux-2.6-net-e1000-no-msi-warning.patch DELETED ---


--- linux-2.6-netdev-e1000e-01.patch DELETED ---


--- linux-2.6-netdev-e1000e-02.patch DELETED ---


--- linux-2.6-netdev-e1000e-03.patch DELETED ---


--- linux-2.6-netdev-e1000e-04.patch DELETED ---


--- linux-2.6-netdev-e1000e-05.patch DELETED ---


--- linux-2.6-netdev-e1000e-06.patch DELETED ---


--- linux-2.6-netdev-e1000e-07.patch DELETED ---


--- linux-2.6-netdev-e1000e-08.patch DELETED ---


--- linux-2.6-netdev-e1000e-09.patch DELETED ---


--- linux-2.6-netdev-e1000e-10.patch DELETED ---


--- linux-2.6-netdev-e1000e-backport.patch DELETED ---


--- linux-2.6-nfs-missing-braces.patch DELETED ---


--- linux-2.6-nfs-noreaddirplus.patch DELETED ---


--- linux-2.6-olpc-touchpad.diff DELETED ---


--- linux-2.6-ondemand-timer.patch DELETED ---


--- linux-2.6-oprofile-0.9.3.patch DELETED ---


--- linux-2.6-optimise-spinlock-debug.patch DELETED ---


--- linux-2.6-pmac-zilog.patch DELETED ---


--- linux-2.6-powermac-generic-suspend-1.patch DELETED ---


--- linux-2.6-powermac-generic-suspend-2.patch DELETED ---


--- linux-2.6-powermac-generic-suspend-3.patch DELETED ---


--- linux-2.6-powermac-generic-suspend-4.patch DELETED ---


--- linux-2.6-powerpc-reserve-initrd-1.patch DELETED ---


--- linux-2.6-powerpc-reserve-initrd-2.patch DELETED ---


--- linux-2.6-powerpc-slabalign.patch DELETED ---


--- linux-2.6-ppc-data-exception.patch DELETED ---


--- linux-2.6-proc-self-maps-fix.patch DELETED ---


--- linux-2.6-ps3-clear-spu-irq.patch DELETED ---


--- linux-2.6-ps3-device-init.patch DELETED ---


--- linux-2.6-ps3-ethernet-autoload.patch DELETED ---


--- linux-2.6-ps3-ethernet-modular.patch DELETED ---


--- linux-2.6-ps3-gelic-wireless.patch DELETED ---


--- linux-2.6-ps3-gelic.patch DELETED ---


--- linux-2.6-ps3-kexec.patch DELETED ---


--- linux-2.6-ps3-legacy-ioport.patch DELETED ---


--- linux-2.6-ps3-memory-probe.patch DELETED ---


--- linux-2.6-ps3-smp-boot.patch DELETED ---


--- linux-2.6-ps3-sound-autoload.patch DELETED ---


--- linux-2.6-ps3-sound.patch DELETED ---


--- linux-2.6-ps3-stable-patches.patch DELETED ---


--- linux-2.6-ps3-storage.patch DELETED ---


--- linux-2.6-ps3-system-bus-rework-2.patch DELETED ---


--- linux-2.6-ps3-system-bus-rework.patch DELETED ---


--- linux-2.6-ps3-usb-autoload.patch DELETED ---


--- linux-2.6-ps3-wrap-spu-runctl.patch DELETED ---


--- linux-2.6-ps3av-export-header.patch DELETED ---


--- linux-2.6-ps3fb-panic.patch DELETED ---


--- linux-2.6-raid-autorun.patch DELETED ---


--- linux-2.6-remove-unnecessary-cast-in-prefetch.patch DELETED ---


--- linux-2.6-scsi-bounce-isa.patch DELETED ---


--- linux-2.6-sha_alignment.patch DELETED ---


--- linux-2.6-softirq-printout-irq-trace-events.patch DELETED ---


--- linux-2.6-softlockup-disable.patch DELETED ---


--- linux-2.6-sumversion-limits-dot-h.patch DELETED ---


--- linux-2.6-suspend-ordering.patch DELETED ---


--- linux-2.6-sysfs-inode-allocator-oops.patch DELETED ---


--- linux-2.6-udf-2.6.22-rc2-1-udf_data_corruption.patch DELETED ---


--- linux-2.6-udf-2.6.22-rc4-1-udf_block_leak.patch DELETED ---


--- linux-2.6-uevent-ebus.patch DELETED ---


--- linux-2.6-uevent-macio.patch DELETED ---


--- linux-2.6-uevent-of_platform.patch DELETED ---


--- linux-2.6-unexport-symbols.patch DELETED ---


--- linux-2.6-usb-autosuspend-default-disable.patch DELETED ---


--- linux-2.6-use-build-id-ld-option.patch DELETED ---


--- linux-2.6-utrace-ptrace-compat-xen.patch DELETED ---


--- linux-2.6-utrace-recalc_sigpending_and_wake.patch DELETED ---


--- linux-2.6-utrace-sig_kernel-macros.patch DELETED ---


--- linux-2.6-utrace-tracehook-xen.patch DELETED ---


--- linux-2.6-vm-invalidate_mapping_pages-cond-resched.patch DELETED ---


--- linux-2.6-vm-silence-atomic-alloc-failures.patch DELETED ---


--- linux-2.6-wakeups-hdaps.patch DELETED ---


--- linux-2.6-x86-64-edac-support.patch DELETED ---


--- linux-2.6-x86-64_pmtrace.patch DELETED ---


--- linux-2.6-x86-dell-hpet.patch DELETED ---


--- linux-2.6-x86-dont-delete-cpu_devs-data.patch DELETED ---


--- linux-2.6-x86-fsc-interrupt-controller-quirk.patch DELETED ---


--- linux-2.6-x86-vga-vidfail.patch DELETED ---


--- linux-2.6-x86_64-silence-up-apic-errors-xen.patch DELETED ---


--- linux-2.6-x86_64-silence-up-apic-errors.patch DELETED ---


--- linux-2.6-xen-backwards-time.patch DELETED ---


--- linux-2.6-xen-blkfront-wait-add.patch DELETED ---


--- linux-2.6-xen-fix-irq-warn-mismerge.patch DELETED ---


--- linux-2.6-xen-irq_vector-uninitialize.patch DELETED ---


--- linux-2.6-xen-paravirt-nographics-pvfb-fix.patch DELETED ---


--- linux-2.6-xen-privcmd-use-nopfn.patch DELETED ---


--- linux-2.6-xen-sleazy-fpu-i386.patch DELETED ---


--- linux-2.6-xen-sleazy-fpu-x86_64.patch DELETED ---


--- linux-2.6.20.tar.bz2.sign DELETED ---




More information about the fedora-extras-commits mailing list