diff options
author | Christian Limpach <Christian.Limpach@xensource.com> | 2007-01-12 14:30:49 +0000 |
---|---|---|
committer | Christian Limpach <Christian.Limpach@xensource.com> | 2007-01-12 14:30:49 +0000 |
commit | 432e7b62cb60b6f6f45e52b3db0268560d9b7cdb (patch) | |
tree | 5933250c7c05b423abff5ab16f19b70832820dbb /patches | |
parent | a25c73ef380731b0ab4347b854e81827cb6a6131 (diff) | |
download | xen-432e7b62cb60b6f6f45e52b3db0268560d9b7cdb.tar.gz xen-432e7b62cb60b6f6f45e52b3db0268560d9b7cdb.tar.bz2 xen-432e7b62cb60b6f6f45e52b3db0268560d9b7cdb.zip |
[linux] Update to linux-2.6.17.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
--HG--
rename : patches/linux-2.6.16.33/blktap-aio-16_03_06.patch => patches/linux-2.6.17/blktap-aio-16_03_06.patch
rename : patches/linux-2.6.16.33/fix-hz-suspend.patch => patches/linux-2.6.17/fix-hz-suspend.patch
rename : patches/linux-2.6.16.33/fix-ide-cd-pio-mode.patch => patches/linux-2.6.17/fix-ide-cd-pio-mode.patch
rename : patches/linux-2.6.16.33/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch => patches/linux-2.6.17/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch
rename : patches/linux-2.6.16.33/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch => patches/linux-2.6.17/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch
rename : patches/linux-2.6.16.33/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch => patches/linux-2.6.17/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch
rename : patches/linux-2.6.16.33/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch => patches/linux-2.6.17/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch
rename : patches/linux-2.6.16.33/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch => patches/linux-2.6.17/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch
rename : patches/linux-2.6.16.33/i386-mach-io-check-nmi.patch => patches/linux-2.6.17/i386-mach-io-check-nmi.patch
rename : patches/linux-2.6.16.33/ipv6-no-autoconf.patch => patches/linux-2.6.17/ipv6-no-autoconf.patch
rename : patches/linux-2.6.16.33/kasprintf.patch => patches/linux-2.6.17/kasprintf.patch
rename : patches/linux-2.6.16.33/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch => patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch
rename : patches/linux-2.6.16.33/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch => patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch
rename : patches/linux-2.6.16.33/net-csum.patch => patches/linux-2.6.17/net-csum.patch
rename : patches/linux-2.6.16.33/net-gso-0-base.patch => patches/linux-2.6.17/net-gso-0-base.patch
rename : patches/linux-2.6.16.33/net-gso-1-check-dodgy.patch => patches/linux-2.6.17/net-gso-1-check-dodgy.patch
rename : patches/linux-2.6.16.33/net-gso-2-checksum-fix.patch => patches/linux-2.6.17/net-gso-2-checksum-fix.patch
rename : patches/linux-2.6.16.33/net-gso-3-fix-errorcheck.patch => patches/linux-2.6.17/net-gso-3-fix-errorcheck.patch
rename : patches/linux-2.6.16.33/net-gso-4-kill-warnon.patch => patches/linux-2.6.17/net-gso-4-kill-warnon.patch
rename : patches/linux-2.6.16.33/net-gso-5-rcv-mss.patch => patches/linux-2.6.17/net-gso-5-rcv-mss.patch
rename : patches/linux-2.6.16.33/net-gso-6-linear-segmentation.patch => patches/linux-2.6.17/net-gso-6-linear-segmentation.patch
rename : patches/linux-2.6.16.33/pmd-shared.patch => patches/linux-2.6.17/pmd-shared.patch
rename : patches/linux-2.6.16.33/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch => patches/linux-2.6.17/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch
rename : patches/linux-2.6.16.33/series => patches/linux-2.6.17/series
rename : patches/linux-2.6.16.33/vsnprintf.patch => patches/linux-2.6.17/vsnprintf.patch
rename : patches/linux-2.6.16.33/x86-elfnote-as-preprocessor-macro.patch => patches/linux-2.6.17/x86-elfnote-as-preprocessor-macro.patch
rename : patches/linux-2.6.16.33/x86-increase-interrupt-vector-range.patch => patches/linux-2.6.17/x86-increase-interrupt-vector-range.patch
rename : patches/linux-2.6.16.33/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch => patches/linux-2.6.17/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
rename : patches/linux-2.6.16.33/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch => patches/linux-2.6.17/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
rename : patches/linux-2.6.16.33/xen-hotplug.patch => patches/linux-2.6.17/xen-hotplug.patch
rename : patches/linux-2.6.16.33/xenoprof-generic.patch => patches/linux-2.6.17/xenoprof-generic.patch
Diffstat (limited to 'patches')
-rw-r--r-- | patches/linux-2.6.16.33/device_bind.patch | 15 | ||||
-rw-r--r-- | patches/linux-2.6.16.33/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch | 47 | ||||
-rw-r--r-- | patches/linux-2.6.16.33/kasprintf.patch | 59 | ||||
-rw-r--r-- | patches/linux-2.6.16.33/pci-mmconfig-fix-from-2.6.17.patch | 292 | ||||
-rw-r--r-- | patches/linux-2.6.16.33/rcu_needs_cpu.patch | 35 | ||||
-rw-r--r-- | patches/linux-2.6.16.33/smp-alts.patch | 591 | ||||
-rw-r--r-- | patches/linux-2.6.16.33/tpm_plugin_2.6.17.patch | 1545 | ||||
-rw-r--r-- | patches/linux-2.6.17/blktap-aio-16_03_06.patch (renamed from patches/linux-2.6.16.33/blktap-aio-16_03_06.patch) | 56 | ||||
-rw-r--r-- | patches/linux-2.6.17/fix-hz-suspend.patch (renamed from patches/linux-2.6.16.33/fix-hz-suspend.patch) | 12 | ||||
-rw-r--r-- | patches/linux-2.6.17/fix-ide-cd-pio-mode.patch (renamed from patches/linux-2.6.16.33/fix-ide-cd-pio-mode.patch) | 6 | ||||
-rw-r--r-- | patches/linux-2.6.17/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch (renamed from patches/linux-2.6.16.33/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch) | 28 | ||||
-rw-r--r-- | patches/linux-2.6.17/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch (renamed from patches/linux-2.6.16.33/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch) | 44 | ||||
-rw-r--r-- | patches/linux-2.6.17/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch (renamed from patches/linux-2.6.16.33/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch) | 45 | ||||
-rw-r--r-- | patches/linux-2.6.17/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch (renamed from patches/linux-2.6.16.33/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch) | 40 | ||||
-rw-r--r-- | patches/linux-2.6.17/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch | 20 | ||||
-rw-r--r-- | patches/linux-2.6.17/i386-mach-io-check-nmi.patch (renamed from patches/linux-2.6.16.33/i386-mach-io-check-nmi.patch) | 14 | ||||
-rw-r--r-- | patches/linux-2.6.17/ipv6-no-autoconf.patch (renamed from patches/linux-2.6.16.33/ipv6-no-autoconf.patch) | 10 | ||||
-rw-r--r-- | patches/linux-2.6.17/kasprintf.patch | 42 | ||||
-rw-r--r-- | patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch (renamed from patches/linux-2.6.16.33/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch) | 34 | ||||
-rw-r--r-- | patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch (renamed from patches/linux-2.6.16.33/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch) | 30 | ||||
-rw-r--r-- | patches/linux-2.6.17/net-csum.patch (renamed from patches/linux-2.6.16.33/net-csum.patch) | 18 | ||||
-rw-r--r-- | patches/linux-2.6.17/net-gso-0-base.patch (renamed from patches/linux-2.6.16.33/net-gso-0-base.patch) | 696 | ||||
-rw-r--r-- | patches/linux-2.6.17/net-gso-1-check-dodgy.patch (renamed from patches/linux-2.6.16.33/net-gso-1-check-dodgy.patch) | 8 | ||||
-rw-r--r-- | patches/linux-2.6.17/net-gso-2-checksum-fix.patch (renamed from patches/linux-2.6.16.33/net-gso-2-checksum-fix.patch) | 200 | ||||
-rw-r--r-- | patches/linux-2.6.17/net-gso-3-fix-errorcheck.patch (renamed from patches/linux-2.6.16.33/net-gso-3-fix-errorcheck.patch) | 8 | ||||
-rw-r--r-- | patches/linux-2.6.17/net-gso-4-kill-warnon.patch (renamed from patches/linux-2.6.16.33/net-gso-4-kill-warnon.patch) | 10 | ||||
-rw-r--r-- | patches/linux-2.6.17/net-gso-5-rcv-mss.patch (renamed from patches/linux-2.6.16.33/net-gso-5-rcv-mss.patch) | 7 | ||||
-rw-r--r-- | patches/linux-2.6.17/net-gso-6-linear-segmentation.patch (renamed from patches/linux-2.6.16.33/net-gso-6-linear-segmentation.patch) | 11 | ||||
-rw-r--r-- | patches/linux-2.6.17/pmd-shared.patch (renamed from patches/linux-2.6.16.33/pmd-shared.patch) | 26 | ||||
-rw-r--r-- | patches/linux-2.6.17/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch (renamed from patches/linux-2.6.16.33/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch) | 10 | ||||
-rw-r--r-- | patches/linux-2.6.17/series (renamed from patches/linux-2.6.16.33/series) | 5 | ||||
-rw-r--r-- | patches/linux-2.6.17/vsnprintf.patch (renamed from patches/linux-2.6.16.33/vsnprintf.patch) | 36 | ||||
-rw-r--r-- | patches/linux-2.6.17/x86-elfnote-as-preprocessor-macro.patch (renamed from patches/linux-2.6.16.33/x86-elfnote-as-preprocessor-macro.patch) | 6 | ||||
-rw-r--r-- | patches/linux-2.6.17/x86-increase-interrupt-vector-range.patch (renamed from patches/linux-2.6.16.33/x86-increase-interrupt-vector-range.patch) | 42 | ||||
-rw-r--r-- | patches/linux-2.6.17/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch (renamed from patches/linux-2.6.16.33/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch) | 28 | ||||
-rw-r--r-- | patches/linux-2.6.17/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch (renamed from patches/linux-2.6.16.33/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch) | 18 | ||||
-rw-r--r-- | patches/linux-2.6.17/xen-hotplug.patch (renamed from patches/linux-2.6.16.33/xen-hotplug.patch) | 8 | ||||
-rw-r--r-- | patches/linux-2.6.17/xenoprof-generic.patch (renamed from patches/linux-2.6.16.33/xenoprof-generic.patch) | 60 |
38 files changed, 764 insertions, 3398 deletions
diff --git a/patches/linux-2.6.16.33/device_bind.patch b/patches/linux-2.6.16.33/device_bind.patch deleted file mode 100644 index 8cef71ecc1..0000000000 --- a/patches/linux-2.6.16.33/device_bind.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -pruN ../orig-linux-2.6.16.29/drivers/base/bus.c ./drivers/base/bus.c ---- ../orig-linux-2.6.16.29/drivers/base/bus.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./drivers/base/bus.c 2006-09-19 13:58:54.000000000 +0100 -@@ -188,6 +188,11 @@ static ssize_t driver_bind(struct device - up(&dev->sem); - if (dev->parent) - up(&dev->parent->sem); -+ -+ if (err > 0) /* success */ -+ err = count; -+ else if (err == 0) /* driver didn't accept device */ -+ err = -ENODEV; - } - put_device(dev); - put_bus(bus); diff --git a/patches/linux-2.6.16.33/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch b/patches/linux-2.6.16.33/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch deleted file mode 100644 index 199cabd4c9..0000000000 --- a/patches/linux-2.6.16.33/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit dbaab49f92ff6ae6255762a948375e4036cbdbd2 -Author: Vivek Goyal <vgoyal@in.ibm.com> -Date: Sat Oct 21 18:37:03 2006 +0200 - - [PATCH] x86-64: Overlapping program headers in physical addr space fix - - o A recent change to vmlinux.ld.S file broke kexec as now resulting vmlinux - program headers are overlapping in physical address space. - - o Now all the vsyscall related sections are placed after data and after - that mostly init data sections are placed. To avoid physical overlap - among phdrs, there are three possible solutions. - - Place vsyscall sections also in data phdrs instead of user - - move vsyscal sections after init data in bss. - - create another phdrs say data.init and move all the sections - after vsyscall into this new phdr. - - o This patch implements the third solution. - - Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> - Signed-off-by: Andi Kleen <ak@suse.de> - Cc: Magnus Damm <magnus@valinux.co.jp> - Cc: Andi Kleen <ak@suse.de> - Cc: "Eric W. Biederman" <ebiederm@xmission.com> - Signed-off-by: Andrew Morton <akpm@osdl.org> - -diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S -index b9df2ab..1283614 100644 ---- a/arch/x86_64/kernel/vmlinux.lds.S -+++ b/arch/x86_64/kernel/vmlinux.lds.S -@@ -17,6 +17,7 @@ PHDRS { - text PT_LOAD FLAGS(5); /* R_E */ - data PT_LOAD FLAGS(7); /* RWE */ - user PT_LOAD FLAGS(7); /* RWE */ -+ data.init PT_LOAD FLAGS(7); /* RWE */ - note PT_NOTE FLAGS(4); /* R__ */ - } - SECTIONS -@@ -131,7 +132,7 @@ SECTIONS - . = ALIGN(8192); /* init_task */ - .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { - *(.data.init_task) -- } :data -+ }:data.init - - . = ALIGN(4096); - .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { diff --git a/patches/linux-2.6.16.33/kasprintf.patch b/patches/linux-2.6.16.33/kasprintf.patch deleted file mode 100644 index 03e8c07ccf..0000000000 --- a/patches/linux-2.6.16.33/kasprintf.patch +++ /dev/null @@ -1,59 +0,0 @@ -commit e905914f96e11862b130dd229f73045dad9a34e8 -Author: Jeremy Fitzhardinge <jeremy@xensource.com> -Date: Sun Jun 25 05:49:17 2006 -0700 - - [PATCH] Implement kasprintf - - Implement kasprintf, a kernel version of asprintf. This allocates the - memory required for the formatted string, including the trailing '\0'. - Returns NULL on allocation failure. - - Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> - Signed-off-by: Chris Wright <chrisw@sous-sol.org> - Signed-off-by: Andrew Morton <akpm@osdl.org> - Signed-off-by: Linus Torvalds <torvalds@osdl.org> - -diff --git a/include/linux/kernel.h b/include/linux/kernel.h -index 8c21aaa..3c5e4c2 100644 ---- a/include/linux/kernel.h -+++ b/include/linux/kernel.h -@@ -117,6 +117,8 @@ extern int scnprintf(char * buf, size_t - __attribute__ ((format (printf, 3, 4))); - extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) - __attribute__ ((format (printf, 3, 0))); -+extern char *kasprintf(gfp_t gfp, const char *fmt, ...) -+ __attribute__ ((format (printf, 2, 3))); - - extern int sscanf(const char *, const char *, ...) - __attribute__ ((format (scanf, 2, 3))); -diff --git a/lib/vsprintf.c b/lib/vsprintf.c -index f595947..797428a 100644 ---- a/lib/vsprintf.c -+++ b/lib/vsprintf.c -@@ -849,3 +849,26 @@ int sscanf(const char * buf, const char - } - - EXPORT_SYMBOL(sscanf); -+ -+ -+/* Simplified asprintf. */ -+char *kasprintf(gfp_t gfp, const char *fmt, ...) -+{ -+ va_list ap; -+ unsigned int len; -+ char *p; -+ -+ va_start(ap, fmt); -+ len = vsnprintf(NULL, 0, fmt, ap); -+ va_end(ap); -+ -+ p = kmalloc(len+1, gfp); -+ if (!p) -+ return NULL; -+ va_start(ap, fmt); -+ vsnprintf(p, len+1, fmt, ap); -+ va_end(ap); -+ return p; -+} -+ -+EXPORT_SYMBOL(kasprintf); diff --git a/patches/linux-2.6.16.33/pci-mmconfig-fix-from-2.6.17.patch b/patches/linux-2.6.16.33/pci-mmconfig-fix-from-2.6.17.patch deleted file mode 100644 index e4b709362f..0000000000 --- a/patches/linux-2.6.16.33/pci-mmconfig-fix-from-2.6.17.patch +++ /dev/null @@ -1,292 +0,0 @@ -diff -pruN ../orig-linux-2.6.16.29/arch/i386/pci/mmconfig.c ./arch/i386/pci/mmconfig.c ---- ../orig-linux-2.6.16.29/arch/i386/pci/mmconfig.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/i386/pci/mmconfig.c 2006-09-21 09:35:27.000000000 +0100 -@@ -12,14 +12,22 @@ - #include <linux/pci.h> - #include <linux/init.h> - #include <linux/acpi.h> -+#include <asm/e820.h> - #include "pci.h" - -+/* aperture is up to 256MB but BIOS may reserve less */ -+#define MMCONFIG_APER_MIN (2 * 1024*1024) -+#define MMCONFIG_APER_MAX (256 * 1024*1024) -+ -+/* Assume systems with more busses have correct MCFG */ -+#define MAX_CHECK_BUS 16 -+ - #define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG)) - - /* The base address of the last MMCONFIG device accessed */ - static u32 mmcfg_last_accessed_device; - --static DECLARE_BITMAP(fallback_slots, 32); -+static DECLARE_BITMAP(fallback_slots, MAX_CHECK_BUS*32); - - /* - * Functions for accessing PCI configuration space with MMCONFIG accesses -@@ -29,8 +37,8 @@ static u32 get_base_addr(unsigned int se - int cfg_num = -1; - struct acpi_table_mcfg_config *cfg; - -- if (seg == 0 && bus == 0 && -- test_bit(PCI_SLOT(devfn), fallback_slots)) -+ if (seg == 0 && bus < MAX_CHECK_BUS && -+ test_bit(PCI_SLOT(devfn) + 32*bus, fallback_slots)) - return 0; - - while (1) { -@@ -74,8 +82,10 @@ static int pci_mmcfg_read(unsigned int s - unsigned long flags; - u32 base; - -- if (!value || (bus > 255) || (devfn > 255) || (reg > 4095)) -+ if ((bus > 255) || (devfn > 255) || (reg > 4095)) { -+ *value = -1; - return -EINVAL; -+ } - - base = get_base_addr(seg, bus, devfn); - if (!base) -@@ -146,30 +156,66 @@ static struct pci_raw_ops pci_mmcfg = { - Normally this can be expressed in the MCFG by not listing them - and assigning suitable _SEGs, but this isn't implemented in some BIOS. - Instead try to discover all devices on bus 0 that are unreachable using MM -- and fallback for them. -- We only do this for bus 0/seg 0 */ -+ and fallback for them. */ - static __init void unreachable_devices(void) - { -- int i; -+ int i, k; - unsigned long flags; - -- for (i = 0; i < 32; i++) { -- u32 val1; -- u32 addr; -+ for (k = 0; k < MAX_CHECK_BUS; k++) { -+ for (i = 0; i < 32; i++) { -+ u32 val1; -+ u32 addr; -+ -+ pci_conf1_read(0, k, PCI_DEVFN(i, 0), 0, 4, &val1); -+ if (val1 == 0xffffffff) -+ continue; -+ -+ /* Locking probably not needed, but safer */ -+ spin_lock_irqsave(&pci_config_lock, flags); -+ addr = get_base_addr(0, k, PCI_DEVFN(i, 0)); -+ if (addr != 0) -+ pci_exp_set_dev_base(addr, k, PCI_DEVFN(i, 0)); -+ if (addr == 0 || -+ readl((u32 __iomem *)mmcfg_virt_addr) != val1) { -+ set_bit(i, fallback_slots); -+ printk(KERN_NOTICE -+ "PCI: No mmconfig possible on %x:%x\n", k, i); -+ } -+ spin_unlock_irqrestore(&pci_config_lock, flags); -+ } -+ } -+} - -- pci_conf1_read(0, 0, PCI_DEVFN(i, 0), 0, 4, &val1); -- if (val1 == 0xffffffff) -+/* NB. Ripped from arch/i386/kernel/setup.c for this Xen bugfix patch. */ -+#ifdef CONFIG_XEN -+extern struct e820map machine_e820; -+#define e820 machine_e820 -+#endif -+static int __init -+e820_all_mapped(unsigned long s, unsigned long e, unsigned type) -+{ -+ u64 start = s; -+ u64 end = e; -+ int i; -+ for (i = 0; i < e820.nr_map; i++) { -+ struct e820entry *ei = &e820.map[i]; -+ if (type && ei->type != type) - continue; -- -- /* Locking probably not needed, but safer */ -- spin_lock_irqsave(&pci_config_lock, flags); -- addr = get_base_addr(0, 0, PCI_DEVFN(i, 0)); -- if (addr != 0) -- pci_exp_set_dev_base(addr, 0, PCI_DEVFN(i, 0)); -- if (addr == 0 || readl((u32 __iomem *)mmcfg_virt_addr) != val1) -- set_bit(i, fallback_slots); -- spin_unlock_irqrestore(&pci_config_lock, flags); -+ /* is the region (part) in overlap with the current region ?*/ -+ if (ei->addr >= end || ei->addr + ei->size <= start) -+ continue; -+ /* if the region is at the beginning of <start,end> we move -+ * start to the end of the region since it's ok until there -+ */ -+ if (ei->addr <= start) -+ start = ei->addr + ei->size; -+ /* if start is now at or beyond end, we're done, full -+ * coverage */ -+ if (start >= end) -+ return 1; /* we're done */ - } -+ return 0; - } - - static int __init pci_mmcfg_init(void) -@@ -183,6 +229,15 @@ static int __init pci_mmcfg_init(void) - (pci_mmcfg_config[0].base_address == 0)) - goto out; - -+ if (!e820_all_mapped(pci_mmcfg_config[0].base_address, -+ pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN, -+ E820_RESERVED)) { -+ printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n", -+ pci_mmcfg_config[0].base_address); -+ printk(KERN_ERR "PCI: Not using MMCONFIG.\n"); -+ goto out; -+ } -+ - printk(KERN_INFO "PCI: Using MMCONFIG\n"); - raw_pci_ops = &pci_mmcfg; - pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; -diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/pci/mmconfig.c ./arch/x86_64/pci/mmconfig.c ---- ../orig-linux-2.6.16.29/arch/x86_64/pci/mmconfig.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/x86_64/pci/mmconfig.c 2006-09-21 09:35:40.000000000 +0100 -@@ -9,11 +9,19 @@ - #include <linux/init.h> - #include <linux/acpi.h> - #include <linux/bitmap.h> -+#include <asm/e820.h> -+ - #include "pci.h" - --#define MMCONFIG_APER_SIZE (256*1024*1024) -+/* aperture is up to 256MB but BIOS may reserve less */ -+#define MMCONFIG_APER_MIN (2 * 1024*1024) -+#define MMCONFIG_APER_MAX (256 * 1024*1024) -+ -+/* Verify the first 16 busses. We assume that systems with more busses -+ get MCFG right. */ -+#define MAX_CHECK_BUS 16 - --static DECLARE_BITMAP(fallback_slots, 32); -+static DECLARE_BITMAP(fallback_slots, 32*MAX_CHECK_BUS); - - /* Static virtual mapping of the MMCONFIG aperture */ - struct mmcfg_virt { -@@ -55,7 +63,8 @@ static char __iomem *get_virt(unsigned i - static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) - { - char __iomem *addr; -- if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), &fallback_slots)) -+ if (seg == 0 && bus < MAX_CHECK_BUS && -+ test_bit(32*bus + PCI_SLOT(devfn), fallback_slots)) - return NULL; - addr = get_virt(seg, bus); - if (!addr) -@@ -69,8 +78,10 @@ static int pci_mmcfg_read(unsigned int s - char __iomem *addr; - - /* Why do we have this when nobody checks it. How about a BUG()!? -AK */ -- if (unlikely(!value || (bus > 255) || (devfn > 255) || (reg > 4095))) -+ if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { -+ *value = -1; - return -EINVAL; -+ } - - addr = pci_dev_base(seg, bus, devfn); - if (!addr) -@@ -129,23 +140,56 @@ static struct pci_raw_ops pci_mmcfg = { - Normally this can be expressed in the MCFG by not listing them - and assigning suitable _SEGs, but this isn't implemented in some BIOS. - Instead try to discover all devices on bus 0 that are unreachable using MM -- and fallback for them. -- We only do this for bus 0/seg 0 */ -+ and fallback for them. */ - static __init void unreachable_devices(void) - { -- int i; -- for (i = 0; i < 32; i++) { -- u32 val1; -- char __iomem *addr; -+ int i, k; -+ /* Use the max bus number from ACPI here? */ -+ for (k = 0; k < MAX_CHECK_BUS; k++) { -+ for (i = 0; i < 32; i++) { -+ u32 val1; -+ char __iomem *addr; -+ -+ pci_conf1_read(0, k, PCI_DEVFN(i,0), 0, 4, &val1); -+ if (val1 == 0xffffffff) -+ continue; -+ addr = pci_dev_base(0, k, PCI_DEVFN(i, 0)); -+ if (addr == NULL|| readl(addr) != val1) { -+ set_bit(i + 32*k, fallback_slots); -+ printk(KERN_NOTICE -+ "PCI: No mmconfig possible on device %x:%x\n", -+ k, i); -+ } -+ } -+ } -+} - -- pci_conf1_read(0, 0, PCI_DEVFN(i,0), 0, 4, &val1); -- if (val1 == 0xffffffff) -+/* NB. Ripped from arch/x86_64/kernel/e820.c for this Xen bugfix patch. */ -+#ifdef CONFIG_XEN -+extern struct e820map machine_e820; -+#define e820 machine_e820 -+#endif -+static int __init e820_all_mapped(unsigned long start, unsigned long end, unsigned type) -+{ -+ int i; -+ for (i = 0; i < e820.nr_map; i++) { -+ struct e820entry *ei = &e820.map[i]; -+ if (type && ei->type != type) - continue; -- addr = pci_dev_base(0, 0, PCI_DEVFN(i, 0)); -- if (addr == NULL|| readl(addr) != val1) { -- set_bit(i, &fallback_slots); -- } -+ /* is the region (part) in overlap with the current region ?*/ -+ if (ei->addr >= end || ei->addr + ei->size <= start) -+ continue; -+ -+ /* if the region is at the beginning of <start,end> we move -+ * start to the end of the region since it's ok until there -+ */ -+ if (ei->addr <= start) -+ start = ei->addr + ei->size; -+ /* if start is now at or beyond end, we're done, full coverage */ -+ if (start >= end) -+ return 1; /* we're done */ - } -+ return 0; - } - - static int __init pci_mmcfg_init(void) -@@ -161,6 +205,15 @@ static int __init pci_mmcfg_init(void) - (pci_mmcfg_config[0].base_address == 0)) - return 0; - -+ if (!e820_all_mapped(pci_mmcfg_config[0].base_address, -+ pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN, -+ E820_RESERVED)) { -+ printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n", -+ pci_mmcfg_config[0].base_address); -+ printk(KERN_ERR "PCI: Not using MMCONFIG.\n"); -+ return 0; -+ } -+ - /* RED-PEN i386 doesn't do _nocache right now */ - pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); - if (pci_mmcfg_virt == NULL) { -@@ -169,7 +222,8 @@ static int __init pci_mmcfg_init(void) - } - for (i = 0; i < pci_mmcfg_config_num; ++i) { - pci_mmcfg_virt[i].cfg = &pci_mmcfg_config[i]; -- pci_mmcfg_virt[i].virt = ioremap_nocache(pci_mmcfg_config[i].base_address, MMCONFIG_APER_SIZE); -+ pci_mmcfg_virt[i].virt = ioremap_nocache(pci_mmcfg_config[i].base_address, -+ MMCONFIG_APER_MAX); - if (!pci_mmcfg_virt[i].virt) { - printk("PCI: Cannot map mmconfig aperture for segment %d\n", - pci_mmcfg_config[i].pci_segment_group_number); diff --git a/patches/linux-2.6.16.33/rcu_needs_cpu.patch b/patches/linux-2.6.16.33/rcu_needs_cpu.patch deleted file mode 100644 index c8f3b79229..0000000000 --- a/patches/linux-2.6.16.33/rcu_needs_cpu.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -pruN ../orig-linux-2.6.16.29/include/linux/rcupdate.h ./include/linux/rcupdate.h ---- ../orig-linux-2.6.16.29/include/linux/rcupdate.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/linux/rcupdate.h 2006-09-19 14:05:39.000000000 +0100 -@@ -134,6 +134,7 @@ static inline void rcu_bh_qsctr_inc(int - } - - extern int rcu_pending(int cpu); -+extern int rcu_needs_cpu(int cpu); - - /** - * rcu_read_lock - mark the beginning of an RCU read-side critical section. -diff -pruN ../orig-linux-2.6.16.29/kernel/rcupdate.c ./kernel/rcupdate.c ---- ../orig-linux-2.6.16.29/kernel/rcupdate.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./kernel/rcupdate.c 2006-09-19 14:05:39.000000000 +0100 -@@ -485,6 +485,20 @@ int rcu_pending(int cpu) - __rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu)); - } - -+/* -+ * Check to see if any future RCU-related work will need to be done -+ * by the current CPU, even if none need be done immediately, returning -+ * 1 if so. This function is part of the RCU implementation; it is -not- -+ * an exported member of the RCU API. -+ */ -+int rcu_needs_cpu(int cpu) -+{ -+ struct rcu_data *rdp = &per_cpu(rcu_data, cpu); -+ struct rcu_data *rdp_bh = &per_cpu(rcu_bh_data, cpu); -+ -+ return (!!rdp->curlist || !!rdp_bh->curlist || rcu_pending(cpu)); -+} -+ - void rcu_check_callbacks(int cpu, int user) - { - if (user || diff --git a/patches/linux-2.6.16.33/smp-alts.patch b/patches/linux-2.6.16.33/smp-alts.patch deleted file mode 100644 index fbcd4a29ac..0000000000 --- a/patches/linux-2.6.16.33/smp-alts.patch +++ /dev/null @@ -1,591 +0,0 @@ -diff -pruN ../orig-linux-2.6.16.29/arch/i386/Kconfig ./arch/i386/Kconfig ---- ../orig-linux-2.6.16.29/arch/i386/Kconfig 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/i386/Kconfig 2006-09-19 14:05:48.000000000 +0100 -@@ -202,6 +202,19 @@ config SMP - - If you don't know what to do here, say N. - -+config SMP_ALTERNATIVES -+ bool "SMP alternatives support (EXPERIMENTAL)" -+ depends on SMP && EXPERIMENTAL -+ help -+ Try to reduce the overhead of running an SMP kernel on a uniprocessor -+ host slightly by replacing certain key instruction sequences -+ according to whether we currently have more than one CPU available. -+ This should provide a noticeable boost to performance when -+ running SMP kernels on UP machines, and have negligible impact -+ when running on an true SMP host. -+ -+ If unsure, say N. -+ - config NR_CPUS - int "Maximum number of CPUs (2-255)" - range 2 255 -diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/Makefile ./arch/i386/kernel/Makefile ---- ../orig-linux-2.6.16.29/arch/i386/kernel/Makefile 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/i386/kernel/Makefile 2006-09-19 14:05:48.000000000 +0100 -@@ -37,6 +37,7 @@ obj-$(CONFIG_EFI) += efi.o efi_stub.o - obj-$(CONFIG_DOUBLEFAULT) += doublefault.o - obj-$(CONFIG_VM86) += vm86.o - obj-$(CONFIG_EARLY_PRINTK) += early_printk.o -+obj-$(CONFIG_SMP_ALTERNATIVES) += smpalts.o - - EXTRA_AFLAGS := -traditional - -diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/smpalts.c ./arch/i386/kernel/smpalts.c ---- ../orig-linux-2.6.16.29/arch/i386/kernel/smpalts.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./arch/i386/kernel/smpalts.c 2006-09-19 14:05:48.000000000 +0100 -@@ -0,0 +1,85 @@ -+#include <linux/kernel.h> -+#include <asm/system.h> -+#include <asm/smp_alt.h> -+#include <asm/processor.h> -+#include <asm/string.h> -+ -+struct smp_replacement_record { -+ unsigned char targ_size; -+ unsigned char smp1_size; -+ unsigned char smp2_size; -+ unsigned char up_size; -+ unsigned char feature; -+ unsigned char data[0]; -+}; -+ -+struct smp_alternative_record { -+ void *targ_start; -+ struct smp_replacement_record *repl; -+}; -+ -+extern struct smp_alternative_record __start_smp_alternatives_table, -+ __stop_smp_alternatives_table; -+extern unsigned long __init_begin, __init_end; -+ -+void prepare_for_smp(void) -+{ -+ struct smp_alternative_record *r; -+ printk(KERN_INFO "Enabling SMP...\n"); -+ for (r = &__start_smp_alternatives_table; -+ r != &__stop_smp_alternatives_table; -+ r++) { -+ BUG_ON(r->repl->targ_size < r->repl->smp1_size); -+ BUG_ON(r->repl->targ_size < r->repl->smp2_size); -+ BUG_ON(r->repl->targ_size < r->repl->up_size); -+ if (system_state == SYSTEM_RUNNING && -+ r->targ_start >= (void *)&__init_begin && -+ r->targ_start < (void *)&__init_end) -+ continue; -+ if (r->repl->feature != (unsigned char)-1 && -+ boot_cpu_has(r->repl->feature)) { -+ memcpy(r->targ_start, -+ r->repl->data + r->repl->smp1_size, -+ r->repl->smp2_size); -+ memset(r->targ_start + r->repl->smp2_size, -+ 0x90, -+ r->repl->targ_size - r->repl->smp2_size); -+ } else { -+ memcpy(r->targ_start, -+ r->repl->data, -+ r->repl->smp1_size); -+ memset(r->targ_start + r->repl->smp1_size, -+ 0x90, -+ r->repl->targ_size - r->repl->smp1_size); -+ } -+ } -+ /* Paranoia */ -+ asm volatile ("jmp 1f\n1:"); -+ mb(); -+} -+ -+void unprepare_for_smp(void) -+{ -+ struct smp_alternative_record *r; -+ printk(KERN_INFO "Disabling SMP...\n"); -+ for (r = &__start_smp_alternatives_table; -+ r != &__stop_smp_alternatives_table; -+ r++) { -+ BUG_ON(r->repl->targ_size < r->repl->smp1_size); -+ BUG_ON(r->repl->targ_size < r->repl->smp2_size); -+ BUG_ON(r->repl->targ_size < r->repl->up_size); -+ if (system_state == SYSTEM_RUNNING && -+ r->targ_start >= (void *)&__init_begin && -+ r->targ_start < (void *)&__init_end) -+ continue; -+ memcpy(r->targ_start, -+ r->repl->data + r->repl->smp1_size + r->repl->smp2_size, -+ r->repl->up_size); -+ memset(r->targ_start + r->repl->up_size, -+ 0x90, -+ r->repl->targ_size - r->repl->up_size); -+ } -+ /* Paranoia */ -+ asm volatile ("jmp 1f\n1:"); -+ mb(); -+} -diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/smpboot.c ./arch/i386/kernel/smpboot.c ---- ../orig-linux-2.6.16.29/arch/i386/kernel/smpboot.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/i386/kernel/smpboot.c 2006-09-19 14:05:48.000000000 +0100 -@@ -1218,6 +1218,11 @@ static void __init smp_boot_cpus(unsigne - if (max_cpus <= cpucount+1) - continue; - -+#ifdef CONFIG_SMP_ALTERNATIVES -+ if (kicked == 1) -+ prepare_for_smp(); -+#endif -+ - if (((cpu = alloc_cpu_id()) <= 0) || do_boot_cpu(apicid, cpu)) - printk("CPU #%d not responding - cannot use it.\n", - apicid); -@@ -1396,6 +1401,11 @@ int __devinit __cpu_up(unsigned int cpu) - return -EIO; - } - -+#ifdef CONFIG_SMP_ALTERNATIVES -+ if (num_online_cpus() == 1) -+ prepare_for_smp(); -+#endif -+ - local_irq_enable(); - per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; - /* Unleash the CPU! */ -diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/vmlinux.lds.S ./arch/i386/kernel/vmlinux.lds.S ---- ../orig-linux-2.6.16.29/arch/i386/kernel/vmlinux.lds.S 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/i386/kernel/vmlinux.lds.S 2006-09-19 14:05:48.000000000 +0100 -@@ -34,6 +34,13 @@ SECTIONS - __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) } - __stop___ex_table = .; - -+ . = ALIGN(16); -+ __start_smp_alternatives_table = .; -+ __smp_alternatives : { *(__smp_alternatives) } -+ __stop_smp_alternatives_table = .; -+ -+ __smp_replacements : { *(__smp_replacements) } -+ - RODATA - - /* writeable */ -diff -pruN ../orig-linux-2.6.16.29/include/asm-i386/atomic.h ./include/asm-i386/atomic.h ---- ../orig-linux-2.6.16.29/include/asm-i386/atomic.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/asm-i386/atomic.h 2006-09-19 14:05:48.000000000 +0100 -@@ -4,18 +4,13 @@ - #include <linux/config.h> - #include <linux/compiler.h> - #include <asm/processor.h> -+#include <asm/smp_alt.h> - - /* - * Atomic operations that C can't guarantee us. Useful for - * resource counting etc.. - */ - --#ifdef CONFIG_SMP --#define LOCK "lock ; " --#else --#define LOCK "" --#endif -- - /* - * Make sure gcc doesn't try to be clever and move things around - * on us. We need to use _exactly_ the address the user gave us, -diff -pruN ../orig-linux-2.6.16.29/include/asm-i386/bitops.h ./include/asm-i386/bitops.h ---- ../orig-linux-2.6.16.29/include/asm-i386/bitops.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/asm-i386/bitops.h 2006-09-19 14:05:48.000000000 +0100 -@@ -7,6 +7,7 @@ - - #include <linux/config.h> - #include <linux/compiler.h> -+#include <asm/smp_alt.h> - - /* - * These have to be done with inline assembly: that way the bit-setting -@@ -16,12 +17,6 @@ - * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). - */ - --#ifdef CONFIG_SMP --#define LOCK_PREFIX "lock ; " --#else --#define LOCK_PREFIX "" --#endif -- - #define ADDR (*(volatile long *) addr) - - /** -@@ -41,7 +36,7 @@ - */ - static inline void set_bit(int nr, volatile unsigned long * addr) - { -- __asm__ __volatile__( LOCK_PREFIX -+ __asm__ __volatile__( LOCK - "btsl %1,%0" - :"+m" (ADDR) - :"Ir" (nr)); -@@ -76,7 +71,7 @@ static inline void __set_bit(int nr, vol - */ - static inline void clear_bit(int nr, volatile unsigned long * addr) - { -- __asm__ __volatile__( LOCK_PREFIX -+ __asm__ __volatile__( LOCK - "btrl %1,%0" - :"+m" (ADDR) - :"Ir" (nr)); -@@ -121,7 +116,7 @@ static inline void __change_bit(int nr, - */ - static inline void change_bit(int nr, volatile unsigned long * addr) - { -- __asm__ __volatile__( LOCK_PREFIX -+ __asm__ __volatile__( LOCK - "btcl %1,%0" - :"+m" (ADDR) - :"Ir" (nr)); -@@ -140,7 +135,7 @@ static inline int test_and_set_bit(int n - { - int oldbit; - -- __asm__ __volatile__( LOCK_PREFIX -+ __asm__ __volatile__( LOCK - "btsl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"+m" (ADDR) - :"Ir" (nr) : "memory"); -@@ -180,7 +175,7 @@ static inline int test_and_clear_bit(int - { - int oldbit; - -- __asm__ __volatile__( LOCK_PREFIX -+ __asm__ __volatile__( LOCK - "btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"+m" (ADDR) - :"Ir" (nr) : "memory"); -@@ -231,7 +226,7 @@ static inline int test_and_change_bit(in - { - int oldbit; - -- __asm__ __volatile__( LOCK_PREFIX -+ __asm__ __volatile__( LOCK - "btcl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"+m" (ADDR) - :"Ir" (nr) : "memory"); -diff -pruN ../orig-linux-2.6.16.29/include/asm-i386/futex.h ./include/asm-i386/futex.h ---- ../orig-linux-2.6.16.29/include/asm-i386/futex.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/asm-i386/futex.h 2006-09-19 14:05:48.000000000 +0100 -@@ -28,7 +28,7 @@ - "1: movl %2, %0\n\ - movl %0, %3\n" \ - insn "\n" \ --"2: " LOCK_PREFIX "cmpxchgl %3, %2\n\ -+"2: " LOCK "cmpxchgl %3, %2\n\ - jnz 1b\n\ - 3: .section .fixup,\"ax\"\n\ - 4: mov %5, %1\n\ -@@ -68,7 +68,7 @@ futex_atomic_op_inuser (int encoded_op, - #endif - switch (op) { - case FUTEX_OP_ADD: -- __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret, -+ __futex_atomic_op1(LOCK "xaddl %0, %2", ret, - oldval, uaddr, oparg); - break; - case FUTEX_OP_OR: -diff -pruN ../orig-linux-2.6.16.29/include/asm-i386/rwsem.h ./include/asm-i386/rwsem.h ---- ../orig-linux-2.6.16.29/include/asm-i386/rwsem.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/asm-i386/rwsem.h 2006-09-19 14:05:48.000000000 +0100 -@@ -40,6 +40,7 @@ - - #include <linux/list.h> - #include <linux/spinlock.h> -+#include <asm/smp_alt.h> - - struct rwsem_waiter; - -@@ -99,7 +100,7 @@ static inline void __down_read(struct rw - { - __asm__ __volatile__( - "# beginning down_read\n\t" --LOCK_PREFIX " incl (%%eax)\n\t" /* adds 0x00000001, returns the old value */ -+LOCK " incl (%%eax)\n\t" /* adds 0x00000001, returns the old value */ - " js 2f\n\t" /* jump if we weren't granted the lock */ - "1:\n\t" - LOCK_SECTION_START("") -@@ -130,7 +131,7 @@ static inline int __down_read_trylock(st - " movl %1,%2\n\t" - " addl %3,%2\n\t" - " jle 2f\n\t" --LOCK_PREFIX " cmpxchgl %2,%0\n\t" -+LOCK " cmpxchgl %2,%0\n\t" - " jnz 1b\n\t" - "2:\n\t" - "# ending __down_read_trylock\n\t" -@@ -150,7 +151,7 @@ static inline void __down_write(struct r - tmp = RWSEM_ACTIVE_WRITE_BIAS; - __asm__ __volatile__( - "# beginning down_write\n\t" --LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */ -+LOCK " xadd %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */ - " testl %%edx,%%edx\n\t" /* was the count 0 before? */ - " jnz 2f\n\t" /* jump if we weren't granted the lock */ - "1:\n\t" -@@ -188,7 +189,7 @@ static inline void __up_read(struct rw_s - __s32 tmp = -RWSEM_ACTIVE_READ_BIAS; - __asm__ __volatile__( - "# beginning __up_read\n\t" --LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */ -+LOCK " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */ - " js 2f\n\t" /* jump if the lock is being waited upon */ - "1:\n\t" - LOCK_SECTION_START("") -@@ -214,7 +215,7 @@ static inline void __up_write(struct rw_ - __asm__ __volatile__( - "# beginning __up_write\n\t" - " movl %2,%%edx\n\t" --LOCK_PREFIX " xaddl %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */ -+LOCK " xaddl %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */ - " jnz 2f\n\t" /* jump if the lock is being waited upon */ - "1:\n\t" - LOCK_SECTION_START("") -@@ -239,7 +240,7 @@ static inline void __downgrade_write(str - { - __asm__ __volatile__( - "# beginning __downgrade_write\n\t" --LOCK_PREFIX " addl %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 0xYYYY0001 */ -+LOCK " addl %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 0xYYYY0001 */ - " js 2f\n\t" /* jump if the lock is being waited upon */ - "1:\n\t" - LOCK_SECTION_START("") -@@ -263,7 +264,7 @@ LOCK_PREFIX " addl %2,(%%eax)\n\t" - static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem) - { - __asm__ __volatile__( --LOCK_PREFIX "addl %1,%0" -+LOCK "addl %1,%0" - : "=m"(sem->count) - : "ir"(delta), "m"(sem->count)); - } -@@ -276,7 +277,7 @@ static inline int rwsem_atomic_update(in - int tmp = delta; - - __asm__ __volatile__( --LOCK_PREFIX "xadd %0,(%2)" -+LOCK "xadd %0,(%2)" - : "+r"(tmp), "=m"(sem->count) - : "r"(sem), "m"(sem->count) - : "memory"); -diff -pruN ../orig-linux-2.6.16.29/include/asm-i386/smp_alt.h ./include/asm-i386/smp_alt.h ---- ../orig-linux-2.6.16.29/include/asm-i386/smp_alt.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/asm-i386/smp_alt.h 2006-09-19 14:05:48.000000000 +0100 -@@ -0,0 +1,32 @@ -+#ifndef __ASM_SMP_ALT_H__ -+#define __ASM_SMP_ALT_H__ -+ -+#include <linux/config.h> -+ -+#ifdef CONFIG_SMP -+#if defined(CONFIG_SMP_ALTERNATIVES) && !defined(MODULE) -+#define LOCK \ -+ "6677: nop\n" \ -+ ".section __smp_alternatives,\"a\"\n" \ -+ ".long 6677b\n" \ -+ ".long 6678f\n" \ -+ ".previous\n" \ -+ ".section __smp_replacements,\"a\"\n" \ -+ "6678: .byte 1\n" \ -+ ".byte 1\n" \ -+ ".byte 0\n" \ -+ ".byte 1\n" \ -+ ".byte -1\n" \ -+ "lock\n" \ -+ "nop\n" \ -+ ".previous\n" -+void prepare_for_smp(void); -+void unprepare_for_smp(void); -+#else -+#define LOCK "lock ; " -+#endif -+#else -+#define LOCK "" -+#endif -+ -+#endif /* __ASM_SMP_ALT_H__ */ -diff -pruN ../orig-linux-2.6.16.29/include/asm-i386/spinlock.h ./include/asm-i386/spinlock.h ---- ../orig-linux-2.6.16.29/include/asm-i386/spinlock.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/asm-i386/spinlock.h 2006-09-19 14:05:48.000000000 +0100 -@@ -6,6 +6,7 @@ - #include <asm/page.h> - #include <linux/config.h> - #include <linux/compiler.h> -+#include <asm/smp_alt.h> - - /* - * Your basic SMP spinlocks, allowing only a single CPU anywhere -@@ -23,7 +24,8 @@ - - #define __raw_spin_lock_string \ - "\n1:\t" \ -- "lock ; decb %0\n\t" \ -+ LOCK \ -+ "decb %0\n\t" \ - "jns 3f\n" \ - "2:\t" \ - "rep;nop\n\t" \ -@@ -34,7 +36,8 @@ - - #define __raw_spin_lock_string_flags \ - "\n1:\t" \ -- "lock ; decb %0\n\t" \ -+ LOCK \ -+ "decb %0\n\t" \ - "jns 4f\n\t" \ - "2:\t" \ - "testl $0x200, %1\n\t" \ -@@ -65,10 +68,34 @@ static inline void __raw_spin_lock_flags - static inline int __raw_spin_trylock(raw_spinlock_t *lock) - { - char oldval; -+#ifdef CONFIG_SMP_ALTERNATIVES - __asm__ __volatile__( -- "xchgb %b0,%1" -+ "1:movb %1,%b0\n" -+ "movb $0,%1\n" -+ "2:" -+ ".section __smp_alternatives,\"a\"\n" -+ ".long 1b\n" -+ ".long 3f\n" -+ ".previous\n" -+ ".section __smp_replacements,\"a\"\n" -+ "3: .byte 2b - 1b\n" -+ ".byte 5f-4f\n" -+ ".byte 0\n" -+ ".byte 6f-5f\n" -+ ".byte -1\n" -+ "4: xchgb %b0,%1\n" -+ "5: movb %1,%b0\n" -+ "movb $0,%1\n" -+ "6:\n" -+ ".previous\n" - :"=q" (oldval), "=m" (lock->slock) - :"0" (0) : "memory"); -+#else -+ __asm__ __volatile__( -+ "xchgb %b0,%1\n" -+ :"=q" (oldval), "=m" (lock->slock) -+ :"0" (0) : "memory"); -+#endif - return oldval > 0; - } - -@@ -178,12 +205,12 @@ static inline int __raw_write_trylock(ra - - static inline void __raw_read_unlock(raw_rwlock_t *rw) - { -- asm volatile("lock ; incl %0" :"=m" (rw->lock) : : "memory"); -+ asm volatile(LOCK "incl %0" :"=m" (rw->lock) : : "memory"); - } - - static inline void __raw_write_unlock(raw_rwlock_t *rw) - { -- asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ", %0" -+ asm volatile(LOCK "addl $" RW_LOCK_BIAS_STR ", %0" - : "=m" (rw->lock) : : "memory"); - } - -diff -pruN ../orig-linux-2.6.16.29/include/asm-i386/system.h ./include/asm-i386/system.h ---- ../orig-linux-2.6.16.29/include/asm-i386/system.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/asm-i386/system.h 2006-09-19 14:05:48.000000000 +0100 -@@ -5,7 +5,7 @@ - #include <linux/kernel.h> - #include <asm/segment.h> - #include <asm/cpufeature.h> --#include <linux/bitops.h> /* for LOCK_PREFIX */ -+#include <asm/smp_alt.h> - - #ifdef __KERNEL__ - -@@ -271,19 +271,19 @@ static inline unsigned long __cmpxchg(vo - unsigned long prev; - switch (size) { - case 1: -- __asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2" -+ __asm__ __volatile__(LOCK "cmpxchgb %b1,%2" - : "=a"(prev) - : "q"(new), "m"(*__xg(ptr)), "0"(old) - : "memory"); - return prev; - case 2: -- __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2" -+ __asm__ __volatile__(LOCK "cmpxchgw %w1,%2" - : "=a"(prev) - : "r"(new), "m"(*__xg(ptr)), "0"(old) - : "memory"); - return prev; - case 4: -- __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2" -+ __asm__ __volatile__(LOCK "cmpxchgl %1,%2" - : "=a"(prev) - : "r"(new), "m"(*__xg(ptr)), "0"(old) - : "memory"); -@@ -336,7 +336,7 @@ static inline unsigned long long __cmpxc - unsigned long long new) - { - unsigned long long prev; -- __asm__ __volatile__(LOCK_PREFIX "cmpxchg8b %3" -+ __asm__ __volatile__(LOCK "cmpxchg8b %3" - : "=A"(prev) - : "b"((unsigned long)new), - "c"((unsigned long)(new >> 32)), -@@ -503,11 +503,55 @@ struct alt_instr { - #endif - - #ifdef CONFIG_SMP -+#if defined(CONFIG_SMP_ALTERNATIVES) && !defined(MODULE) -+#define smp_alt_mb(instr) \ -+__asm__ __volatile__("6667:\nnop\nnop\nnop\nnop\nnop\nnop\n6668:\n" \ -+ ".section __smp_alternatives,\"a\"\n" \ -+ ".long 6667b\n" \ -+ ".long 6673f\n" \ -+ ".previous\n" \ -+ ".section __smp_replacements,\"a\"\n" \ -+ "6673:.byte 6668b-6667b\n" \ -+ ".byte 6670f-6669f\n" \ -+ ".byte 6671f-6670f\n" \ -+ ".byte 0\n" \ -+ ".byte %c0\n" \ -+ "6669:lock;addl $0,0(%%esp)\n" \ -+ "6670:" instr "\n" \ -+ "6671:\n" \ -+ ".previous\n" \ -+ : \ -+ : "i" (X86_FEATURE_XMM2) \ -+ : "memory") -+#define smp_rmb() smp_alt_mb("lfence") -+#define smp_mb() smp_alt_mb("mfence") -+#define set_mb(var, value) do { \ -+unsigned long __set_mb_temp; \ -+__asm__ __volatile__("6667:movl %1, %0\n6668:\n" \ -+ ".section __smp_alternatives,\"a\"\n" \ -+ ".long 6667b\n" \ -+ ".long 6673f\n" \ -+ ".previous\n" \ -+ ".section __smp_replacements,\"a\"\n" \ -+ "6673: .byte 6668b-6667b\n" \ -+ ".byte 6670f-6669f\n" \ -+ ".byte 0\n" \ -+ ".byte 6671f-6670f\n" \ -+ ".byte -1\n" \ -+ "6669: xchg %1, %0\n" \ -+ "6670:movl %1, %0\n" \ -+ "6671:\n" \ -+ ".previous\n" \ -+ : "=m" (var), "=r" (__set_mb_temp) \ -+ : "1" (value) \ -+ : "memory"); } while (0) -+#else - #define smp_mb() mb() - #define smp_rmb() rmb() -+#define set_mb(var, value) do { (void) xchg(&var, value); } while (0) -+#endif - #define smp_wmb() wmb() - #define smp_read_barrier_depends() read_barrier_depends() --#define set_mb(var, value) do { (void) xchg(&var, value); } while (0) - #else - #define smp_mb() barrier() - #define smp_rmb() barrier() diff --git a/patches/linux-2.6.16.33/tpm_plugin_2.6.17.patch b/patches/linux-2.6.16.33/tpm_plugin_2.6.17.patch deleted file mode 100644 index 71a22017b5..0000000000 --- a/patches/linux-2.6.16.33/tpm_plugin_2.6.17.patch +++ /dev/null @@ -1,1545 +0,0 @@ -diff -pruN ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_atmel.c ./drivers/char/tpm/tpm_atmel.c ---- ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_atmel.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./drivers/char/tpm/tpm_atmel.c 2006-09-19 14:05:52.000000000 +0100 -@@ -47,12 +47,12 @@ static int tpm_atml_recv(struct tpm_chip - return -EIO; - - for (i = 0; i < 6; i++) { -- status = ioread8(chip->vendor->iobase + 1); -+ status = ioread8(chip->vendor.iobase + 1); - if ((status & ATML_STATUS_DATA_AVAIL) == 0) { - dev_err(chip->dev, "error reading header\n"); - return -EIO; - } -- *buf++ = ioread8(chip->vendor->iobase); -+ *buf++ = ioread8(chip->vendor.iobase); - } - - /* size of the data received */ -@@ -63,7 +63,7 @@ static int tpm_atml_recv(struct tpm_chip - dev_err(chip->dev, - "Recv size(%d) less than available space\n", size); - for (; i < size; i++) { /* clear the waiting data anyway */ -- status = ioread8(chip->vendor->iobase + 1); -+ status = ioread8(chip->vendor.iobase + 1); - if ((status & ATML_STATUS_DATA_AVAIL) == 0) { - dev_err(chip->dev, "error reading data\n"); - return -EIO; -@@ -74,16 +74,16 @@ static int tpm_atml_recv(struct tpm_chip - - /* read all the data available */ - for (; i < size; i++) { -- status = ioread8(chip->vendor->iobase + 1); -+ status = ioread8(chip->vendor.iobase + 1); - if ((status & ATML_STATUS_DATA_AVAIL) == 0) { - dev_err(chip->dev, "error reading data\n"); - return -EIO; - } -- *buf++ = ioread8(chip->vendor->iobase); -+ *buf++ = ioread8(chip->vendor.iobase); - } - - /* make sure data available is gone */ -- status = ioread8(chip->vendor->iobase + 1); -+ status = ioread8(chip->vendor.iobase + 1); - - if (status & ATML_STATUS_DATA_AVAIL) { - dev_err(chip->dev, "data available is stuck\n"); -@@ -100,7 +100,7 @@ static int tpm_atml_send(struct tpm_chip - dev_dbg(chip->dev, "tpm_atml_send:\n"); - for (i = 0; i < count; i++) { - dev_dbg(chip->dev, "%d 0x%x(%d)\n", i, buf[i], buf[i]); -- iowrite8(buf[i], chip->vendor->iobase); -+ iowrite8(buf[i], chip->vendor.iobase); - } - - return count; -@@ -108,12 +108,12 @@ static int tpm_atml_send(struct tpm_chip - - static void tpm_atml_cancel(struct tpm_chip *chip) - { -- iowrite8(ATML_STATUS_ABORT, chip->vendor->iobase + 1); -+ iowrite8(ATML_STATUS_ABORT, chip->vendor.iobase + 1); - } - - static u8 tpm_atml_status(struct tpm_chip *chip) - { -- return ioread8(chip->vendor->iobase + 1); -+ return ioread8(chip->vendor.iobase + 1); - } - - static struct file_operations atmel_ops = { -@@ -140,7 +140,7 @@ static struct attribute* atmel_attrs[] = - - static struct attribute_group atmel_attr_grp = { .attrs = atmel_attrs }; - --static struct tpm_vendor_specific tpm_atmel = { -+static const struct tpm_vendor_specific tpm_atmel = { - .recv = tpm_atml_recv, - .send = tpm_atml_send, - .cancel = tpm_atml_cancel, -@@ -159,10 +159,10 @@ static void atml_plat_remove(void) - struct tpm_chip *chip = dev_get_drvdata(&pdev->dev); - - if (chip) { -- if (chip->vendor->have_region) -- atmel_release_region(chip->vendor->base, -- chip->vendor->region_size); -- atmel_put_base_addr(chip->vendor); -+ if (chip->vendor.have_region) -+ atmel_release_region(chip->vendor.base, -+ chip->vendor.region_size); -+ atmel_put_base_addr(chip->vendor.iobase); - tpm_remove_hardware(chip->dev); - platform_device_unregister(pdev); - } -@@ -179,18 +179,22 @@ static struct device_driver atml_drv = { - static int __init init_atmel(void) - { - int rc = 0; -+ void __iomem *iobase = NULL; -+ int have_region, region_size; -+ unsigned long base; -+ struct tpm_chip *chip; - - driver_register(&atml_drv); - -- if ((tpm_atmel.iobase = atmel_get_base_addr(&tpm_atmel)) == NULL) { -+ if ((iobase = atmel_get_base_addr(&base, ®ion_size)) == NULL) { - rc = -ENODEV; - goto err_unreg_drv; - } - -- tpm_atmel.have_region = -+ have_region = - (atmel_request_region -- (tpm_atmel.base, tpm_atmel.region_size, -- "tpm_atmel0") == NULL) ? 0 : 1; -+ (tpm_atmel.base, region_size, "tpm_atmel0") == NULL) ? 0 : 1; -+ - - if (IS_ERR - (pdev = -@@ -199,17 +203,25 @@ static int __init init_atmel(void) - goto err_rel_reg; - } - -- if ((rc = tpm_register_hardware(&pdev->dev, &tpm_atmel)) < 0) -+ if (!(chip = tpm_register_hardware(&pdev->dev, &tpm_atmel))) { -+ rc = -ENODEV; - goto err_unreg_dev; -+ } -+ -+ chip->vendor.iobase = iobase; -+ chip->vendor.base = base; -+ chip->vendor.have_region = have_region; -+ chip->vendor.region_size = region_size; -+ - return 0; - - err_unreg_dev: - platform_device_unregister(pdev); - err_rel_reg: -- atmel_put_base_addr(&tpm_atmel); -- if (tpm_atmel.have_region) -- atmel_release_region(tpm_atmel.base, -- tpm_atmel.region_size); -+ atmel_put_base_addr(iobase); -+ if (have_region) -+ atmel_release_region(base, -+ region_size); - err_unreg_drv: - driver_unregister(&atml_drv); - return rc; -diff -pruN ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_atmel.h ./drivers/char/tpm/tpm_atmel.h ---- ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_atmel.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./drivers/char/tpm/tpm_atmel.h 2006-09-19 14:05:52.000000000 +0100 -@@ -28,13 +28,12 @@ - #define atmel_request_region request_mem_region - #define atmel_release_region release_mem_region - --static inline void atmel_put_base_addr(struct tpm_vendor_specific -- *vendor) -+static inline void atmel_put_base_addr(void __iomem *iobase) - { -- iounmap(vendor->iobase); -+ iounmap(iobase); - } - --static void __iomem * atmel_get_base_addr(struct tpm_vendor_specific *vendor) -+static void __iomem * atmel_get_base_addr(unsigned long *base, int *region_size) - { - struct device_node *dn; - unsigned long address, size; -@@ -71,9 +70,9 @@ static void __iomem * atmel_get_base_add - else - size = reg[naddrc]; - -- vendor->base = address; -- vendor->region_size = size; -- return ioremap(vendor->base, vendor->region_size); -+ *base = address; -+ *region_size = size; -+ return ioremap(*base, *region_size); - } - #else - #define atmel_getb(chip, offset) inb(chip->vendor->base + offset) -@@ -106,14 +105,12 @@ static int atmel_verify_tpm11(void) - return 0; - } - --static inline void atmel_put_base_addr(struct tpm_vendor_specific -- *vendor) -+static inline void atmel_put_base_addr(void __iomem *iobase) - { - } - - /* Determine where to talk to device */ --static void __iomem * atmel_get_base_addr(struct tpm_vendor_specific -- *vendor) -+static void __iomem * atmel_get_base_addr(unsigned long *base, int *region_size) - { - int lo, hi; - -@@ -123,9 +120,9 @@ static void __iomem * atmel_get_base_add - lo = tpm_read_index(TPM_ADDR, TPM_ATMEL_BASE_ADDR_LO); - hi = tpm_read_index(TPM_ADDR, TPM_ATMEL_BASE_ADDR_HI); - -- vendor->base = (hi << 8) | lo; -- vendor->region_size = 2; -+ *base = (hi << 8) | lo; -+ *region_size = 2; - -- return ioport_map(vendor->base, vendor->region_size); -+ return ioport_map(*base, *region_size); - } - #endif -diff -pruN ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_bios.c ./drivers/char/tpm/tpm_bios.c ---- ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_bios.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./drivers/char/tpm/tpm_bios.c 2006-09-19 14:05:52.000000000 +0100 -@@ -29,6 +29,11 @@ - #define MAX_TEXT_EVENT 1000 /* Max event string length */ - #define ACPI_TCPA_SIG "TCPA" /* 0x41504354 /'TCPA' */ - -+enum bios_platform_class { -+ BIOS_CLIENT = 0x00, -+ BIOS_SERVER = 0x01, -+}; -+ - struct tpm_bios_log { - void *bios_event_log; - void *bios_event_log_end; -@@ -36,9 +41,18 @@ struct tpm_bios_log { - - struct acpi_tcpa { - struct acpi_table_header hdr; -- u16 reserved; -- u32 log_max_len __attribute__ ((packed)); -- u32 log_start_addr __attribute__ ((packed)); -+ u16 platform_class; -+ union { -+ struct client_hdr { -+ u32 log_max_len __attribute__ ((packed)); -+ u64 log_start_addr __attribute__ ((packed)); -+ } client; -+ struct server_hdr { -+ u16 reserved; -+ u64 log_max_len __attribute__ ((packed)); -+ u64 log_start_addr __attribute__ ((packed)); -+ } server; -+ }; - }; - - struct tcpa_event { -@@ -91,6 +105,12 @@ static const char* tcpa_event_type_strin - "Non-Host Info" - }; - -+struct tcpa_pc_event { -+ u32 event_id; -+ u32 event_size; -+ u8 event_data[0]; -+}; -+ - enum tcpa_pc_event_ids { - SMBIOS = 1, - BIS_CERT, -@@ -100,14 +120,15 @@ enum tcpa_pc_event_ids { - NVRAM, - OPTION_ROM_EXEC, - OPTION_ROM_CONFIG, -- OPTION_ROM_MICROCODE, -+ OPTION_ROM_MICROCODE = 10, - S_CRTM_VERSION, - S_CRTM_CONTENTS, - POST_CONTENTS, -+ HOST_TABLE_OF_DEVICES, - }; - - static const char* tcpa_pc_event_id_strings[] = { -- "" -+ "", - "SMBIOS", - "BIS Certificate", - "POST BIOS ", -@@ -116,10 +137,12 @@ static const char* tcpa_pc_event_id_stri - "NVRAM", - "Option ROM", - "Option ROM config", -- "Option ROM microcode", -+ "", -+ "Option ROM microcode ", - "S-CRTM Version", -- "S-CRTM Contents", -- "S-CRTM POST Contents", -+ "S-CRTM Contents ", -+ "POST Contents ", -+ "Table of Devices", - }; - - /* returns pointer to start of pos. entry of tcg log */ -@@ -191,7 +214,7 @@ static int get_event_name(char *dest, st - const char *name = ""; - char data[40] = ""; - int i, n_len = 0, d_len = 0; -- u32 event_id; -+ struct tcpa_pc_event *pc_event; - - switch(event->event_type) { - case PREBOOT: -@@ -220,31 +243,32 @@ static int get_event_name(char *dest, st - } - break; - case EVENT_TAG: -- event_id = be32_to_cpu(*((u32 *)event_entry)); -+ pc_event = (struct tcpa_pc_event *)event_entry; - - /* ToDo Row data -> Base64 */ - -- switch (event_id) { -+ switch (pc_event->event_id) { - case SMBIOS: - case BIS_CERT: - case CMOS: - case NVRAM: - case OPTION_ROM_EXEC: - case OPTION_ROM_CONFIG: -- case OPTION_ROM_MICROCODE: - case S_CRTM_VERSION: -- case S_CRTM_CONTENTS: -- case POST_CONTENTS: -- name = tcpa_pc_event_id_strings[event_id]; -+ name = tcpa_pc_event_id_strings[pc_event->event_id]; - n_len = strlen(name); - break; -+ /* hash data */ - case POST_BIOS_ROM: - case ESCD: -- name = tcpa_pc_event_id_strings[event_id]; -+ case OPTION_ROM_MICROCODE: -+ case S_CRTM_CONTENTS: -+ case POST_CONTENTS: -+ name = tcpa_pc_event_id_strings[pc_event->event_id]; - n_len = strlen(name); - for (i = 0; i < 20; i++) -- d_len += sprintf(data, "%02x", -- event_entry[8 + i]); -+ d_len += sprintf(&data[2*i], "%02x", -+ pc_event->event_data[i]); - break; - default: - break; -@@ -260,52 +284,13 @@ static int get_event_name(char *dest, st - - static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v) - { -+ struct tcpa_event *event = v; -+ char *data = v; -+ int i; - -- char *eventname; -- char data[4]; -- u32 help; -- int i, len; -- struct tcpa_event *event = (struct tcpa_event *) v; -- unsigned char *event_entry = -- (unsigned char *) (v + sizeof(struct tcpa_event)); -- -- eventname = kmalloc(MAX_TEXT_EVENT, GFP_KERNEL); -- if (!eventname) { -- printk(KERN_ERR "%s: ERROR - No Memory for event name\n ", -- __func__); -- return -ENOMEM; -- } -- -- /* 1st: PCR used is in little-endian format (4 bytes) */ -- help = le32_to_cpu(event->pcr_index); -- memcpy(data, &help, 4); -- for (i = 0; i < 4; i++) -- seq_putc(m, data[i]); -- -- /* 2nd: SHA1 (20 bytes) */ -- for (i = 0; i < 20; i++) -- seq_putc(m, event->pcr_value[i]); -- -- /* 3rd: event type identifier (4 bytes) */ -- help = le32_to_cpu(event->event_type); -- memcpy(data, &help, 4); -- for (i = 0; i < 4; i++) -+ for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++) - seq_putc(m, data[i]); - -- len = 0; -- -- len += get_event_name(eventname, event, event_entry); -- -- /* 4th: filename <= 255 + \'0' delimiter */ -- if (len > TCG_EVENT_NAME_LEN_MAX) -- len = TCG_EVENT_NAME_LEN_MAX; -- -- for (i = 0; i < len; i++) -- seq_putc(m, eventname[i]); -- -- /* 5th: delimiter */ -- seq_putc(m, '\0'); -- - return 0; - } - -@@ -353,6 +338,7 @@ static int tpm_ascii_bios_measurements_s - /* 4th: eventname <= max + \'0' delimiter */ - seq_printf(m, " %s\n", eventname); - -+ kfree(eventname); - return 0; - } - -@@ -376,6 +362,7 @@ static int read_log(struct tpm_bios_log - struct acpi_tcpa *buff; - acpi_status status; - struct acpi_table_header *virt; -+ u64 len, start; - - if (log->bios_event_log != NULL) { - printk(KERN_ERR -@@ -396,27 +383,37 @@ static int read_log(struct tpm_bios_log - return -EIO; - } - -- if (buff->log_max_len == 0) { -+ switch(buff->platform_class) { -+ case BIOS_SERVER: -+ len = buff->server.log_max_len; -+ start = buff->server.log_start_addr; -+ break; -+ case BIOS_CLIENT: -+ default: -+ len = buff->client.log_max_len; -+ start = buff->client.log_start_addr; -+ break; -+ } -+ if (!len) { - printk(KERN_ERR "%s: ERROR - TCPA log area empty\n", __func__); - return -EIO; - } - - /* malloc EventLog space */ -- log->bios_event_log = kmalloc(buff->log_max_len, GFP_KERNEL); -+ log->bios_event_log = kmalloc(len, GFP_KERNEL); - if (!log->bios_event_log) { -- printk -- ("%s: ERROR - Not enough Memory for BIOS measurements\n", -- __func__); -+ printk("%s: ERROR - Not enough Memory for BIOS measurements\n", -+ __func__); - return -ENOMEM; - } - -- log->bios_event_log_end = log->bios_event_log + buff->log_max_len; -+ log->bios_event_log_end = log->bios_event_log + len; - -- acpi_os_map_memory(buff->log_start_addr, buff->log_max_len, (void *) &virt); -+ acpi_os_map_memory(start, len, (void *) &virt); - -- memcpy(log->bios_event_log, virt, buff->log_max_len); -+ memcpy(log->bios_event_log, virt, len); - -- acpi_os_unmap_memory(virt, buff->log_max_len); -+ acpi_os_unmap_memory(virt, len); - return 0; - } - -diff -pruN ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_infineon.c ./drivers/char/tpm/tpm_infineon.c ---- ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_infineon.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./drivers/char/tpm/tpm_infineon.c 2006-09-19 14:05:52.000000000 +0100 -@@ -15,6 +15,7 @@ - * License. - */ - -+#include <linux/init.h> - #include <linux/pnp.h> - #include "tpm.h" - -@@ -104,7 +105,7 @@ static int empty_fifo(struct tpm_chip *c - - if (clear_wrfifo) { - for (i = 0; i < 4096; i++) { -- status = inb(chip->vendor->base + WRFIFO); -+ status = inb(chip->vendor.base + WRFIFO); - if (status == 0xff) { - if (check == 5) - break; -@@ -124,8 +125,8 @@ static int empty_fifo(struct tpm_chip *c - */ - i = 0; - do { -- status = inb(chip->vendor->base + RDFIFO); -- status = inb(chip->vendor->base + STAT); -+ status = inb(chip->vendor.base + RDFIFO); -+ status = inb(chip->vendor.base + STAT); - i++; - if (i == TPM_MAX_TRIES) - return -EIO; -@@ -138,7 +139,7 @@ static int wait(struct tpm_chip *chip, i - int status; - int i; - for (i = 0; i < TPM_MAX_TRIES; i++) { -- status = inb(chip->vendor->base + STAT); -+ status = inb(chip->vendor.base + STAT); - /* check the status-register if wait_for_bit is set */ - if (status & 1 << wait_for_bit) - break; -@@ -157,7 +158,7 @@ static int wait(struct tpm_chip *chip, i - static void wait_and_send(struct tpm_chip *chip, u8 sendbyte) - { - wait(chip, STAT_XFE); -- outb(sendbyte, chip->vendor->base + WRFIFO); -+ outb(sendbyte, chip->vendor.base + WRFIFO); - } - - /* Note: WTX means Waiting-Time-Extension. Whenever the TPM needs more -@@ -204,7 +205,7 @@ recv_begin: - ret = wait(chip, STAT_RDA); - if (ret) - return -EIO; -- buf[i] = inb(chip->vendor->base + RDFIFO); -+ buf[i] = inb(chip->vendor.base + RDFIFO); - } - - if (buf[0] != TPM_VL_VER) { -@@ -219,7 +220,7 @@ recv_begin: - - for (i = 0; i < size; i++) { - wait(chip, STAT_RDA); -- buf[i] = inb(chip->vendor->base + RDFIFO); -+ buf[i] = inb(chip->vendor.base + RDFIFO); - } - - if ((size == 0x6D00) && (buf[1] == 0x80)) { -@@ -268,7 +269,7 @@ static int tpm_inf_send(struct tpm_chip - u8 count_high, count_low, count_4, count_3, count_2, count_1; - - /* Disabling Reset, LP and IRQC */ -- outb(RESET_LP_IRQC_DISABLE, chip->vendor->base + CMD); -+ outb(RESET_LP_IRQC_DISABLE, chip->vendor.base + CMD); - - ret = empty_fifo(chip, 1); - if (ret) { -@@ -319,7 +320,7 @@ static void tpm_inf_cancel(struct tpm_ch - - static u8 tpm_inf_status(struct tpm_chip *chip) - { -- return inb(chip->vendor->base + STAT); -+ return inb(chip->vendor.base + STAT); - } - - static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL); -@@ -346,7 +347,7 @@ static struct file_operations inf_ops = - .release = tpm_release, - }; - --static struct tpm_vendor_specific tpm_inf = { -+static const struct tpm_vendor_specific tpm_inf = { - .recv = tpm_inf_recv, - .send = tpm_inf_send, - .cancel = tpm_inf_cancel, -@@ -375,6 +376,7 @@ static int __devinit tpm_inf_pnp_probe(s - int version[2]; - int productid[2]; - char chipname[20]; -+ struct tpm_chip *chip; - - /* read IO-ports through PnP */ - if (pnp_port_valid(dev, 0) && pnp_port_valid(dev, 1) && -@@ -395,14 +397,13 @@ static int __devinit tpm_inf_pnp_probe(s - goto err_last; - } - /* publish my base address and request region */ -- tpm_inf.base = TPM_INF_BASE; - if (request_region -- (tpm_inf.base, TPM_INF_PORT_LEN, "tpm_infineon0") == NULL) { -+ (TPM_INF_BASE, TPM_INF_PORT_LEN, "tpm_infineon0") == NULL) { - rc = -EINVAL; - goto err_last; - } -- if (request_region(TPM_INF_ADDR, TPM_INF_ADDR_LEN, -- "tpm_infineon0") == NULL) { -+ if (request_region -+ (TPM_INF_ADDR, TPM_INF_ADDR_LEN, "tpm_infineon0") == NULL) { - rc = -EINVAL; - goto err_last; - } -@@ -442,9 +443,9 @@ static int __devinit tpm_inf_pnp_probe(s - - /* configure TPM with IO-ports */ - outb(IOLIMH, TPM_INF_ADDR); -- outb(((tpm_inf.base >> 8) & 0xff), TPM_INF_DATA); -+ outb(((TPM_INF_BASE >> 8) & 0xff), TPM_INF_DATA); - outb(IOLIML, TPM_INF_ADDR); -- outb((tpm_inf.base & 0xff), TPM_INF_DATA); -+ outb((TPM_INF_BASE & 0xff), TPM_INF_DATA); - - /* control if IO-ports are set correctly */ - outb(IOLIMH, TPM_INF_ADDR); -@@ -452,10 +453,10 @@ static int __devinit tpm_inf_pnp_probe(s - outb(IOLIML, TPM_INF_ADDR); - iol = inb(TPM_INF_DATA); - -- if ((ioh << 8 | iol) != tpm_inf.base) { -+ if ((ioh << 8 | iol) != TPM_INF_BASE) { - dev_err(&dev->dev, -- "Could not set IO-ports to 0x%lx\n", -- tpm_inf.base); -+ "Could not set IO-ports to 0x%x\n", -+ TPM_INF_BASE); - rc = -EIO; - goto err_release_region; - } -@@ -466,15 +467,15 @@ static int __devinit tpm_inf_pnp_probe(s - outb(DISABLE_REGISTER_PAIR, TPM_INF_ADDR); - - /* disable RESET, LP and IRQC */ -- outb(RESET_LP_IRQC_DISABLE, tpm_inf.base + CMD); -+ outb(RESET_LP_IRQC_DISABLE, TPM_INF_BASE + CMD); - - /* Finally, we're done, print some infos */ - dev_info(&dev->dev, "TPM found: " - "config base 0x%x, " - "io base 0x%x, " -- "chip version %02x%02x, " -- "vendor id %x%x (Infineon), " -- "product id %02x%02x" -+ "chip version 0x%02x%02x, " -+ "vendor id 0x%x%x (Infineon), " -+ "product id 0x%02x%02x" - "%s\n", - TPM_INF_ADDR, - TPM_INF_BASE, -@@ -482,11 +483,10 @@ static int __devinit tpm_inf_pnp_probe(s - vendorid[0], vendorid[1], - productid[0], productid[1], chipname); - -- rc = tpm_register_hardware(&dev->dev, &tpm_inf); -- if (rc < 0) { -- rc = -ENODEV; -+ if (!(chip = tpm_register_hardware(&dev->dev, &tpm_inf))) { - goto err_release_region; - } -+ chip->vendor.base = TPM_INF_BASE; - return 0; - } else { - rc = -ENODEV; -@@ -494,7 +494,7 @@ static int __devinit tpm_inf_pnp_probe(s - } - - err_release_region: -- release_region(tpm_inf.base, TPM_INF_PORT_LEN); -+ release_region(TPM_INF_BASE, TPM_INF_PORT_LEN); - release_region(TPM_INF_ADDR, TPM_INF_ADDR_LEN); - - err_last: -@@ -506,7 +506,8 @@ static __devexit void tpm_inf_pnp_remove - struct tpm_chip *chip = pnp_get_drvdata(dev); - - if (chip) { -- release_region(chip->vendor->base, TPM_INF_PORT_LEN); -+ release_region(TPM_INF_BASE, TPM_INF_PORT_LEN); -+ release_region(TPM_INF_ADDR, TPM_INF_ADDR_LEN); - tpm_remove_hardware(chip->dev); - } - } -@@ -520,7 +521,7 @@ static struct pnp_driver tpm_inf_pnp = { - }, - .id_table = tpm_pnp_tbl, - .probe = tpm_inf_pnp_probe, -- .remove = tpm_inf_pnp_remove, -+ .remove = __devexit_p(tpm_inf_pnp_remove), - }; - - static int __init init_inf(void) -@@ -538,5 +539,5 @@ module_exit(cleanup_inf); - - MODULE_AUTHOR("Marcel Selhorst <selhorst@crypto.rub.de>"); - MODULE_DESCRIPTION("Driver for Infineon TPM SLD 9630 TT 1.1 / SLB 9635 TT 1.2"); --MODULE_VERSION("1.7"); -+MODULE_VERSION("1.8"); - MODULE_LICENSE("GPL"); -diff -pruN ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_nsc.c ./drivers/char/tpm/tpm_nsc.c ---- ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_nsc.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./drivers/char/tpm/tpm_nsc.c 2006-09-19 14:05:52.000000000 +0100 -@@ -71,7 +71,7 @@ static int wait_for_stat(struct tpm_chip - unsigned long stop; - - /* status immediately available check */ -- *data = inb(chip->vendor->base + NSC_STATUS); -+ *data = inb(chip->vendor.base + NSC_STATUS); - if ((*data & mask) == val) - return 0; - -@@ -79,7 +79,7 @@ static int wait_for_stat(struct tpm_chip - stop = jiffies + 10 * HZ; - do { - msleep(TPM_TIMEOUT); -- *data = inb(chip->vendor->base + 1); -+ *data = inb(chip->vendor.base + 1); - if ((*data & mask) == val) - return 0; - } -@@ -94,9 +94,9 @@ static int nsc_wait_for_ready(struct tpm - unsigned long stop; - - /* status immediately available check */ -- status = inb(chip->vendor->base + NSC_STATUS); -+ status = inb(chip->vendor.base + NSC_STATUS); - if (status & NSC_STATUS_OBF) -- status = inb(chip->vendor->base + NSC_DATA); -+ status = inb(chip->vendor.base + NSC_DATA); - if (status & NSC_STATUS_RDY) - return 0; - -@@ -104,9 +104,9 @@ static int nsc_wait_for_ready(struct tpm - stop = jiffies + 100; - do { - msleep(TPM_TIMEOUT); -- status = inb(chip->vendor->base + NSC_STATUS); -+ status = inb(chip->vendor.base + NSC_STATUS); - if (status & NSC_STATUS_OBF) -- status = inb(chip->vendor->base + NSC_DATA); -+ status = inb(chip->vendor.base + NSC_DATA); - if (status & NSC_STATUS_RDY) - return 0; - } -@@ -132,7 +132,7 @@ static int tpm_nsc_recv(struct tpm_chip - return -EIO; - } - if ((data = -- inb(chip->vendor->base + NSC_DATA)) != NSC_COMMAND_NORMAL) { -+ inb(chip->vendor.base + NSC_DATA)) != NSC_COMMAND_NORMAL) { - dev_err(chip->dev, "not in normal mode (0x%x)\n", - data); - return -EIO; -@@ -148,7 +148,7 @@ static int tpm_nsc_recv(struct tpm_chip - } - if (data & NSC_STATUS_F0) - break; -- *p = inb(chip->vendor->base + NSC_DATA); -+ *p = inb(chip->vendor.base + NSC_DATA); - } - - if ((data & NSC_STATUS_F0) == 0 && -@@ -156,7 +156,7 @@ static int tpm_nsc_recv(struct tpm_chip - dev_err(chip->dev, "F0 not set\n"); - return -EIO; - } -- if ((data = inb(chip->vendor->base + NSC_DATA)) != NSC_COMMAND_EOC) { -+ if ((data = inb(chip->vendor.base + NSC_DATA)) != NSC_COMMAND_EOC) { - dev_err(chip->dev, - "expected end of command(0x%x)\n", data); - return -EIO; -@@ -182,7 +182,7 @@ static int tpm_nsc_send(struct tpm_chip - * fix it. Not sure why this is needed, we followed the flow - * chart in the manual to the letter. - */ -- outb(NSC_COMMAND_CANCEL, chip->vendor->base + NSC_COMMAND); -+ outb(NSC_COMMAND_CANCEL, chip->vendor.base + NSC_COMMAND); - - if (nsc_wait_for_ready(chip) != 0) - return -EIO; -@@ -192,7 +192,7 @@ static int tpm_nsc_send(struct tpm_chip - return -EIO; - } - -- outb(NSC_COMMAND_NORMAL, chip->vendor->base + NSC_COMMAND); -+ outb(NSC_COMMAND_NORMAL, chip->vendor.base + NSC_COMMAND); - if (wait_for_stat(chip, NSC_STATUS_IBR, NSC_STATUS_IBR, &data) < 0) { - dev_err(chip->dev, "IBR timeout\n"); - return -EIO; -@@ -204,26 +204,26 @@ static int tpm_nsc_send(struct tpm_chip - "IBF timeout (while writing data)\n"); - return -EIO; - } -- outb(buf[i], chip->vendor->base + NSC_DATA); -+ outb(buf[i], chip->vendor.base + NSC_DATA); - } - - if (wait_for_stat(chip, NSC_STATUS_IBF, 0, &data) < 0) { - dev_err(chip->dev, "IBF timeout\n"); - return -EIO; - } -- outb(NSC_COMMAND_EOC, chip->vendor->base + NSC_COMMAND); -+ outb(NSC_COMMAND_EOC, chip->vendor.base + NSC_COMMAND); - - return count; - } - - static void tpm_nsc_cancel(struct tpm_chip *chip) - { -- outb(NSC_COMMAND_CANCEL, chip->vendor->base + NSC_COMMAND); -+ outb(NSC_COMMAND_CANCEL, chip->vendor.base + NSC_COMMAND); - } - - static u8 tpm_nsc_status(struct tpm_chip *chip) - { -- return inb(chip->vendor->base + NSC_STATUS); -+ return inb(chip->vendor.base + NSC_STATUS); - } - - static struct file_operations nsc_ops = { -@@ -250,7 +250,7 @@ static struct attribute * nsc_attrs[] = - - static struct attribute_group nsc_attr_grp = { .attrs = nsc_attrs }; - --static struct tpm_vendor_specific tpm_nsc = { -+static const struct tpm_vendor_specific tpm_nsc = { - .recv = tpm_nsc_recv, - .send = tpm_nsc_send, - .cancel = tpm_nsc_cancel, -@@ -268,7 +268,7 @@ static void __devexit tpm_nsc_remove(str - { - struct tpm_chip *chip = dev_get_drvdata(dev); - if ( chip ) { -- release_region(chip->vendor->base, 2); -+ release_region(chip->vendor.base, 2); - tpm_remove_hardware(chip->dev); - } - } -@@ -286,7 +286,8 @@ static int __init init_nsc(void) - int rc = 0; - int lo, hi; - int nscAddrBase = TPM_ADDR; -- -+ struct tpm_chip *chip; -+ unsigned long base; - - /* verify that it is a National part (SID) */ - if (tpm_read_index(TPM_ADDR, NSC_SID_INDEX) != 0xEF) { -@@ -300,7 +301,7 @@ static int __init init_nsc(void) - - hi = tpm_read_index(nscAddrBase, TPM_NSC_BASE0_HI); - lo = tpm_read_index(nscAddrBase, TPM_NSC_BASE0_LO); -- tpm_nsc.base = (hi<<8) | lo; -+ base = (hi<<8) | lo; - - /* enable the DPM module */ - tpm_write_index(nscAddrBase, NSC_LDC_INDEX, 0x01); -@@ -320,13 +321,15 @@ static int __init init_nsc(void) - if ((rc = platform_device_register(pdev)) < 0) - goto err_free_dev; - -- if (request_region(tpm_nsc.base, 2, "tpm_nsc0") == NULL ) { -+ if (request_region(base, 2, "tpm_nsc0") == NULL ) { - rc = -EBUSY; - goto err_unreg_dev; - } - -- if ((rc = tpm_register_hardware(&pdev->dev, &tpm_nsc)) < 0) -+ if (!(chip = tpm_register_hardware(&pdev->dev, &tpm_nsc))) { -+ rc = -ENODEV; - goto err_rel_reg; -+ } - - dev_dbg(&pdev->dev, "NSC TPM detected\n"); - dev_dbg(&pdev->dev, -@@ -361,10 +364,12 @@ static int __init init_nsc(void) - "NSC TPM revision %d\n", - tpm_read_index(nscAddrBase, 0x27) & 0x1F); - -+ chip->vendor.base = base; -+ - return 0; - - err_rel_reg: -- release_region(tpm_nsc.base, 2); -+ release_region(base, 2); - err_unreg_dev: - platform_device_unregister(pdev); - err_free_dev: -diff -pruN ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_tis.c ./drivers/char/tpm/tpm_tis.c ---- ../orig-linux-2.6.16.29/drivers/char/tpm/tpm_tis.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./drivers/char/tpm/tpm_tis.c 2006-09-19 14:05:52.000000000 +0100 -@@ -0,0 +1,665 @@ -+/* -+ * Copyright (C) 2005, 2006 IBM Corporation -+ * -+ * Authors: -+ * Leendert van Doorn <leendert@watson.ibm.com> -+ * Kylene Hall <kjhall@us.ibm.com> -+ * -+ * Device driver for TCG/TCPA TPM (trusted platform module). -+ * Specifications at www.trustedcomputinggroup.org -+ * -+ * This device driver implements the TPM interface as defined in -+ * the TCG TPM Interface Spec version 1.2, revision 1.0. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation, version 2 of the -+ * License. -+ */ -+#include <linux/init.h> -+#include <linux/module.h> -+#include <linux/moduleparam.h> -+#include <linux/pnp.h> -+#include <linux/interrupt.h> -+#include <linux/wait.h> -+#include "tpm.h" -+ -+#define TPM_HEADER_SIZE 10 -+ -+enum tis_access { -+ TPM_ACCESS_VALID = 0x80, -+ TPM_ACCESS_ACTIVE_LOCALITY = 0x20, -+ TPM_ACCESS_REQUEST_PENDING = 0x04, -+ TPM_ACCESS_REQUEST_USE = 0x02, -+}; -+ -+enum tis_status { -+ TPM_STS_VALID = 0x80, -+ TPM_STS_COMMAND_READY = 0x40, -+ TPM_STS_GO = 0x20, -+ TPM_STS_DATA_AVAIL = 0x10, -+ TPM_STS_DATA_EXPECT = 0x08, -+}; -+ -+enum tis_int_flags { -+ TPM_GLOBAL_INT_ENABLE = 0x80000000, -+ TPM_INTF_BURST_COUNT_STATIC = 0x100, -+ TPM_INTF_CMD_READY_INT = 0x080, -+ TPM_INTF_INT_EDGE_FALLING = 0x040, -+ TPM_INTF_INT_EDGE_RISING = 0x020, -+ TPM_INTF_INT_LEVEL_LOW = 0x010, -+ TPM_INTF_INT_LEVEL_HIGH = 0x008, -+ TPM_INTF_LOCALITY_CHANGE_INT = 0x004, -+ TPM_INTF_STS_VALID_INT = 0x002, -+ TPM_INTF_DATA_AVAIL_INT = 0x001, -+}; -+ -+enum tis_defaults { -+ TIS_MEM_BASE = 0xFED40000, -+ TIS_MEM_LEN = 0x5000, -+ TIS_SHORT_TIMEOUT = 750, /* ms */ -+ TIS_LONG_TIMEOUT = 2000, /* 2 sec */ -+}; -+ -+#define TPM_ACCESS(l) (0x0000 | ((l) << 12)) -+#define TPM_INT_ENABLE(l) (0x0008 | ((l) << 12)) -+#define TPM_INT_VECTOR(l) (0x000C | ((l) << 12)) -+#define TPM_INT_STATUS(l) (0x0010 | ((l) << 12)) -+#define TPM_INTF_CAPS(l) (0x0014 | ((l) << 12)) -+#define TPM_STS(l) (0x0018 | ((l) << 12)) -+#define TPM_DATA_FIFO(l) (0x0024 | ((l) << 12)) -+ -+#define TPM_DID_VID(l) (0x0F00 | ((l) << 12)) -+#define TPM_RID(l) (0x0F04 | ((l) << 12)) -+ -+static LIST_HEAD(tis_chips); -+static DEFINE_SPINLOCK(tis_lock); -+ -+static int check_locality(struct tpm_chip *chip, int l) -+{ -+ if ((ioread8(chip->vendor.iobase + TPM_ACCESS(l)) & -+ (TPM_ACCESS_ACTIVE_LOCALITY | TPM_ACCESS_VALID)) == -+ (TPM_ACCESS_ACTIVE_LOCALITY | TPM_ACCESS_VALID)) -+ return chip->vendor.locality = l; -+ -+ return -1; -+} -+ -+static void release_locality(struct tpm_chip *chip, int l, int force) -+{ -+ if (force || (ioread8(chip->vendor.iobase + TPM_ACCESS(l)) & -+ (TPM_ACCESS_REQUEST_PENDING | TPM_ACCESS_VALID)) == -+ (TPM_ACCESS_REQUEST_PENDING | TPM_ACCESS_VALID)) -+ iowrite8(TPM_ACCESS_ACTIVE_LOCALITY, -+ chip->vendor.iobase + TPM_ACCESS(l)); -+} -+ -+static int request_locality(struct tpm_chip *chip, int l) -+{ -+ unsigned long stop; -+ long rc; -+ -+ if (check_locality(chip, l) >= 0) -+ return l; -+ -+ iowrite8(TPM_ACCESS_REQUEST_USE, -+ chip->vendor.iobase + TPM_ACCESS(l)); -+ -+ if (chip->vendor.irq) { -+ rc = wait_event_interruptible_timeout(chip->vendor.int_queue, -+ (check_locality -+ (chip, l) >= 0), -+ chip->vendor.timeout_a); -+ if (rc > 0) -+ return l; -+ -+ } else { -+ /* wait for burstcount */ -+ stop = jiffies + chip->vendor.timeout_a; -+ do { -+ if (check_locality(chip, l) >= 0) -+ return l; -+ msleep(TPM_TIMEOUT); -+ } -+ while (time_before(jiffies, stop)); -+ } -+ return -1; -+} -+ -+static u8 tpm_tis_status(struct tpm_chip *chip) -+{ -+ return ioread8(chip->vendor.iobase + -+ TPM_STS(chip->vendor.locality)); -+} -+ -+static void tpm_tis_ready(struct tpm_chip *chip) -+{ -+ /* this causes the current command to be aborted */ -+ iowrite8(TPM_STS_COMMAND_READY, -+ chip->vendor.iobase + TPM_STS(chip->vendor.locality)); -+} -+ -+static int get_burstcount(struct tpm_chip *chip) -+{ -+ unsigned long stop; -+ int burstcnt; -+ -+ /* wait for burstcount */ -+ /* which timeout value, spec has 2 answers (c & d) */ -+ stop = jiffies + chip->vendor.timeout_d; -+ do { -+ burstcnt = ioread8(chip->vendor.iobase + -+ TPM_STS(chip->vendor.locality) + 1); -+ burstcnt += ioread8(chip->vendor.iobase + -+ TPM_STS(chip->vendor.locality) + -+ 2) << 8; -+ if (burstcnt) -+ return burstcnt; -+ msleep(TPM_TIMEOUT); -+ } while (time_before(jiffies, stop)); -+ return -EBUSY; -+} -+ -+static int wait_for_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout, -+ wait_queue_head_t *queue) -+{ -+ unsigned long stop; -+ long rc; -+ u8 status; -+ -+ /* check current status */ -+ status = tpm_tis_status(chip); -+ if ((status & mask) == mask) -+ return 0; -+ -+ if (chip->vendor.irq) { -+ rc = wait_event_interruptible_timeout(*queue, -+ ((tpm_tis_status -+ (chip) & mask) == -+ mask), timeout); -+ if (rc > 0) -+ return 0; -+ } else { -+ stop = jiffies + timeout; -+ do { -+ msleep(TPM_TIMEOUT); -+ status = tpm_tis_status(chip); -+ if ((status & mask) == mask) -+ return 0; -+ } while (time_before(jiffies, stop)); -+ } -+ return -ETIME; -+} -+ -+static int recv_data(struct tpm_chip *chip, u8 *buf, size_t count) -+{ -+ int size = 0, burstcnt; -+ while (size < count && -+ wait_for_stat(chip, -+ TPM_STS_DATA_AVAIL | TPM_STS_VALID, -+ chip->vendor.timeout_c, -+ &chip->vendor.read_queue) -+ == 0) { -+ burstcnt = get_burstcount(chip); -+ for (; burstcnt > 0 && size < count; burstcnt--) -+ buf[size++] = ioread8(chip->vendor.iobase + -+ TPM_DATA_FIFO(chip->vendor. -+ locality)); -+ } -+ return size; -+} -+ -+static int tpm_tis_recv(struct tpm_chip *chip, u8 *buf, size_t count) -+{ -+ int size = 0; -+ int expected, status; -+ -+ if (count < TPM_HEADER_SIZE) { -+ size = -EIO; -+ goto out; -+ } -+ -+ /* read first 10 bytes, including tag, paramsize, and result */ -+ if ((size = -+ recv_data(chip, buf, TPM_HEADER_SIZE)) < TPM_HEADER_SIZE) { -+ dev_err(chip->dev, "Unable to read header\n"); -+ goto out; -+ } -+ -+ expected = be32_to_cpu(*(__be32 *) (buf + 2)); -+ if (expected > count) { -+ size = -EIO; -+ goto out; -+ } -+ -+ if ((size += -+ recv_data(chip, &buf[TPM_HEADER_SIZE], -+ expected - TPM_HEADER_SIZE)) < expected) { -+ dev_err(chip->dev, "Unable to read remainder of result\n"); -+ size = -ETIME; -+ goto out; -+ } -+ -+ wait_for_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c, -+ &chip->vendor.int_queue); -+ status = tpm_tis_status(chip); -+ if (status & TPM_STS_DATA_AVAIL) { /* retry? */ -+ dev_err(chip->dev, "Error left over data\n"); -+ size = -EIO; -+ goto out; -+ } -+ -+out: -+ tpm_tis_ready(chip); -+ release_locality(chip, chip->vendor.locality, 0); -+ return size; -+} -+ -+/* -+ * If interrupts are used (signaled by an irq set in the vendor structure) -+ * tpm.c can skip polling for the data to be available as the interrupt is -+ * waited for here -+ */ -+static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len) -+{ -+ int rc, status, burstcnt; -+ size_t count = 0; -+ u32 ordinal; -+ -+ if (request_locality(chip, 0) < 0) -+ return -EBUSY; -+ -+ status = tpm_tis_status(chip); -+ if ((status & TPM_STS_COMMAND_READY) == 0) { -+ tpm_tis_ready(chip); -+ if (wait_for_stat -+ (chip, TPM_STS_COMMAND_READY, chip->vendor.timeout_b, -+ &chip->vendor.int_queue) < 0) { -+ rc = -ETIME; -+ goto out_err; -+ } -+ } -+ -+ while (count < len - 1) { -+ burstcnt = get_burstcount(chip); -+ for (; burstcnt > 0 && count < len - 1; burstcnt--) { -+ iowrite8(buf[count], chip->vendor.iobase + -+ TPM_DATA_FIFO(chip->vendor.locality)); -+ count++; -+ } -+ -+ wait_for_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c, -+ &chip->vendor.int_queue); -+ status = tpm_tis_status(chip); -+ if ((status & TPM_STS_DATA_EXPECT) == 0) { -+ rc = -EIO; -+ goto out_err; -+ } -+ } -+ -+ /* write last byte */ -+ iowrite8(buf[count], -+ chip->vendor.iobase + -+ TPM_DATA_FIFO(chip->vendor.locality)); -+ wait_for_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c, -+ &chip->vendor.int_queue); -+ status = tpm_tis_status(chip); -+ if ((status & TPM_STS_DATA_EXPECT) != 0) { -+ rc = -EIO; -+ goto out_err; -+ } -+ -+ /* go and do it */ -+ iowrite8(TPM_STS_GO, -+ chip->vendor.iobase + TPM_STS(chip->vendor.locality)); -+ -+ if (chip->vendor.irq) { -+ ordinal = be32_to_cpu(*((__be32 *) (buf + 6))); -+ if (wait_for_stat -+ (chip, TPM_STS_DATA_AVAIL | TPM_STS_VALID, -+ tpm_calc_ordinal_duration(chip, ordinal), -+ &chip->vendor.read_queue) < 0) { -+ rc = -ETIME; -+ goto out_err; -+ } -+ } -+ return len; -+out_err: -+ tpm_tis_ready(chip); -+ release_locality(chip, chip->vendor.locality, 0); -+ return rc; -+} -+ -+static struct file_operations tis_ops = { -+ .owner = THIS_MODULE, -+ .llseek = no_llseek, -+ .open = tpm_open, -+ .read = tpm_read, -+ .write = tpm_write, -+ .release = tpm_release, -+}; -+ -+static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL); -+static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL); -+static DEVICE_ATTR(enabled, S_IRUGO, tpm_show_enabled, NULL); -+static DEVICE_ATTR(active, S_IRUGO, tpm_show_active, NULL); -+static DEVICE_ATTR(owned, S_IRUGO, tpm_show_owned, NULL); -+static DEVICE_ATTR(temp_deactivated, S_IRUGO, tpm_show_temp_deactivated, -+ NULL); -+static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps_1_2, NULL); -+static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel); -+ -+static struct attribute *tis_attrs[] = { -+ &dev_attr_pubek.attr, -+ &dev_attr_pcrs.attr, -+ &dev_attr_enabled.attr, -+ &dev_attr_active.attr, -+ &dev_attr_owned.attr, -+ &dev_attr_temp_deactivated.attr, -+ &dev_attr_caps.attr, -+ &dev_attr_cancel.attr, NULL, -+}; -+ -+static struct attribute_group tis_attr_grp = { -+ .attrs = tis_attrs -+}; -+ -+static struct tpm_vendor_specific tpm_tis = { -+ .status = tpm_tis_status, -+ .recv = tpm_tis_recv, -+ .send = tpm_tis_send, -+ .cancel = tpm_tis_ready, -+ .req_complete_mask = TPM_STS_DATA_AVAIL | TPM_STS_VALID, -+ .req_complete_val = TPM_STS_DATA_AVAIL | TPM_STS_VALID, -+ .req_canceled = TPM_STS_COMMAND_READY, -+ .attr_group = &tis_attr_grp, -+ .miscdev = { -+ .fops = &tis_ops,}, -+}; -+ -+static irqreturn_t tis_int_probe(int irq, void *dev_id, struct pt_regs *regs) -+{ -+ struct tpm_chip *chip = (struct tpm_chip *) dev_id; -+ u32 interrupt; -+ -+ interrupt = ioread32(chip->vendor.iobase + -+ TPM_INT_STATUS(chip->vendor.locality)); -+ -+ if (interrupt == 0) -+ return IRQ_NONE; -+ -+ chip->vendor.irq = irq; -+ -+ /* Clear interrupts handled with TPM_EOI */ -+ iowrite32(interrupt, -+ chip->vendor.iobase + -+ TPM_INT_STATUS(chip->vendor.locality)); -+ return IRQ_HANDLED; -+} -+ -+static irqreturn_t tis_int_handler(int irq, void *dev_id, struct pt_regs *regs) -+{ -+ struct tpm_chip *chip = (struct tpm_chip *) dev_id; -+ u32 interrupt; -+ int i; -+ -+ interrupt = ioread32(chip->vendor.iobase + -+ TPM_INT_STATUS(chip->vendor.locality)); -+ -+ if (interrupt == 0) -+ return IRQ_NONE; -+ -+ if (interrupt & TPM_INTF_DATA_AVAIL_INT) -+ wake_up_interruptible(&chip->vendor.read_queue); -+ if (interrupt & TPM_INTF_LOCALITY_CHANGE_INT) -+ for (i = 0; i < 5; i++) -+ if (check_locality(chip, i) >= 0) -+ break; -+ if (interrupt & -+ (TPM_INTF_LOCALITY_CHANGE_INT | TPM_INTF_STS_VALID_INT | -+ TPM_INTF_CMD_READY_INT)) -+ wake_up_interruptible(&chip->vendor.int_queue); -+ -+ /* Clear interrupts handled with TPM_EOI */ -+ iowrite32(interrupt, -+ chip->vendor.iobase + -+ TPM_INT_STATUS(chip->vendor.locality)); -+ return IRQ_HANDLED; -+} -+ -+static int interrupts = 1; -+module_param(interrupts, bool, 0444); -+MODULE_PARM_DESC(interrupts, "Enable interrupts"); -+ -+static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev, -+ const struct pnp_device_id *pnp_id) -+{ -+ u32 vendor, intfcaps, intmask; -+ int rc, i; -+ unsigned long start, len; -+ struct tpm_chip *chip; -+ -+ start = pnp_mem_start(pnp_dev, 0); -+ len = pnp_mem_len(pnp_dev, 0); -+ -+ if (!start) -+ start = TIS_MEM_BASE; -+ if (!len) -+ len = TIS_MEM_LEN; -+ -+ if (!(chip = tpm_register_hardware(&pnp_dev->dev, &tpm_tis))) -+ return -ENODEV; -+ -+ chip->vendor.iobase = ioremap(start, len); -+ if (!chip->vendor.iobase) { -+ rc = -EIO; -+ goto out_err; -+ } -+ -+ vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); -+ -+ /* Default timeouts */ -+ chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT); -+ chip->vendor.timeout_b = msecs_to_jiffies(TIS_LONG_TIMEOUT); -+ chip->vendor.timeout_c = msecs_to_jiffies(TIS_SHORT_TIMEOUT); -+ chip->vendor.timeout_d = msecs_to_jiffies(TIS_SHORT_TIMEOUT); -+ -+ dev_info(&pnp_dev->dev, -+ "1.2 TPM (device-id 0x%X, rev-id %d)\n", -+ vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0))); -+ -+ /* Figure out the capabilities */ -+ intfcaps = -+ ioread32(chip->vendor.iobase + -+ TPM_INTF_CAPS(chip->vendor.locality)); -+ dev_dbg(&pnp_dev->dev, "TPM interface capabilities (0x%x):\n", -+ intfcaps); -+ if (intfcaps & TPM_INTF_BURST_COUNT_STATIC) -+ dev_dbg(&pnp_dev->dev, "\tBurst Count Static\n"); -+ if (intfcaps & TPM_INTF_CMD_READY_INT) -+ dev_dbg(&pnp_dev->dev, "\tCommand Ready Int Support\n"); -+ if (intfcaps & TPM_INTF_INT_EDGE_FALLING) -+ dev_dbg(&pnp_dev->dev, "\tInterrupt Edge Falling\n"); -+ if (intfcaps & TPM_INTF_INT_EDGE_RISING) -+ dev_dbg(&pnp_dev->dev, "\tInterrupt Edge Rising\n"); -+ if (intfcaps & TPM_INTF_INT_LEVEL_LOW) -+ dev_dbg(&pnp_dev->dev, "\tInterrupt Level Low\n"); -+ if (intfcaps & TPM_INTF_INT_LEVEL_HIGH) -+ dev_dbg(&pnp_dev->dev, "\tInterrupt Level High\n"); -+ if (intfcaps & TPM_INTF_LOCALITY_CHANGE_INT) -+ dev_dbg(&pnp_dev->dev, "\tLocality Change Int Support\n"); -+ if (intfcaps & TPM_INTF_STS_VALID_INT) -+ dev_dbg(&pnp_dev->dev, "\tSts Valid Int Support\n"); -+ if (intfcaps & TPM_INTF_DATA_AVAIL_INT) -+ dev_dbg(&pnp_dev->dev, "\tData Avail Int Support\n"); -+ -+ if (request_locality(chip, 0) != 0) { -+ rc = -ENODEV; -+ goto out_err; -+ } -+ -+ /* INTERRUPT Setup */ -+ init_waitqueue_head(&chip->vendor.read_queue); -+ init_waitqueue_head(&chip->vendor.int_queue); -+ -+ intmask = -+ ioread32(chip->vendor.iobase + -+ TPM_INT_ENABLE(chip->vendor.locality)); -+ -+ intmask |= TPM_INTF_CMD_READY_INT -+ | TPM_INTF_LOCALITY_CHANGE_INT | TPM_INTF_DATA_AVAIL_INT -+ | TPM_INTF_STS_VALID_INT; -+ -+ iowrite32(intmask, -+ chip->vendor.iobase + -+ TPM_INT_ENABLE(chip->vendor.locality)); -+ if (interrupts) { -+ chip->vendor.irq = -+ ioread8(chip->vendor.iobase + -+ TPM_INT_VECTOR(chip->vendor.locality)); -+ -+ for (i = 3; i < 16 && chip->vendor.irq == 0; i++) { -+ iowrite8(i, chip->vendor.iobase + -+ TPM_INT_VECTOR(chip->vendor.locality)); -+ if (request_irq -+ (i, tis_int_probe, SA_SHIRQ, -+ chip->vendor.miscdev.name, chip) != 0) { -+ dev_info(chip->dev, -+ "Unable to request irq: %d for probe\n", -+ i); -+ continue; -+ } -+ -+ /* Clear all existing */ -+ iowrite32(ioread32 -+ (chip->vendor.iobase + -+ TPM_INT_STATUS(chip->vendor.locality)), -+ chip->vendor.iobase + -+ TPM_INT_STATUS(chip->vendor.locality)); -+ -+ /* Turn on */ -+ iowrite32(intmask | TPM_GLOBAL_INT_ENABLE, -+ chip->vendor.iobase + -+ TPM_INT_ENABLE(chip->vendor.locality)); -+ -+ /* Generate Interrupts */ -+ tpm_gen_interrupt(chip); -+ -+ /* Turn off */ -+ iowrite32(intmask, -+ chip->vendor.iobase + -+ TPM_INT_ENABLE(chip->vendor.locality)); -+ free_irq(i, chip); -+ } -+ } -+ if (chip->vendor.irq) { -+ iowrite8(chip->vendor.irq, -+ chip->vendor.iobase + -+ TPM_INT_VECTOR(chip->vendor.locality)); -+ if (request_irq -+ (chip->vendor.irq, tis_int_handler, SA_SHIRQ, -+ chip->vendor.miscdev.name, chip) != 0) { -+ dev_info(chip->dev, -+ "Unable to request irq: %d for use\n", -+ chip->vendor.irq); -+ chip->vendor.irq = 0; -+ } else { -+ /* Clear all existing */ -+ iowrite32(ioread32 -+ (chip->vendor.iobase + -+ TPM_INT_STATUS(chip->vendor.locality)), -+ chip->vendor.iobase + -+ TPM_INT_STATUS(chip->vendor.locality)); -+ -+ /* Turn on */ -+ iowrite32(intmask | TPM_GLOBAL_INT_ENABLE, -+ chip->vendor.iobase + -+ TPM_INT_ENABLE(chip->vendor.locality)); -+ } -+ } -+ -+ INIT_LIST_HEAD(&chip->vendor.list); -+ spin_lock(&tis_lock); -+ list_add(&chip->vendor.list, &tis_chips); -+ spin_unlock(&tis_lock); -+ -+ tpm_get_timeouts(chip); -+ tpm_continue_selftest(chip); -+ -+ return 0; -+out_err: -+ if (chip->vendor.iobase) -+ iounmap(chip->vendor.iobase); -+ tpm_remove_hardware(chip->dev); -+ return rc; -+} -+ -+static int tpm_tis_pnp_suspend(struct pnp_dev *dev, pm_message_t msg) -+{ -+ return tpm_pm_suspend(&dev->dev, msg); -+} -+ -+static int tpm_tis_pnp_resume(struct pnp_dev *dev) -+{ -+ return tpm_pm_resume(&dev->dev); -+} -+ -+static struct pnp_device_id tpm_pnp_tbl[] __devinitdata = { -+ {"PNP0C31", 0}, /* TPM */ -+ {"ATM1200", 0}, /* Atmel */ -+ {"IFX0102", 0}, /* Infineon */ -+ {"BCM0101", 0}, /* Broadcom */ -+ {"NSC1200", 0}, /* National */ -+ /* Add new here */ -+ {"", 0}, /* User Specified */ -+ {"", 0} /* Terminator */ -+}; -+ -+static struct pnp_driver tis_pnp_driver = { -+ .name = "tpm_tis", -+ .id_table = tpm_pnp_tbl, -+ .probe = tpm_tis_pnp_init, -+ .suspend = tpm_tis_pnp_suspend, -+ .resume = tpm_tis_pnp_resume, -+}; -+ -+#define TIS_HID_USR_IDX sizeof(tpm_pnp_tbl)/sizeof(struct pnp_device_id) -2 -+module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id, -+ sizeof(tpm_pnp_tbl[TIS_HID_USR_IDX].id), 0444); -+MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe"); -+ -+static int __init init_tis(void) -+{ -+ return pnp_register_driver(&tis_pnp_driver); -+} -+ -+static void __exit cleanup_tis(void) -+{ -+ struct tpm_vendor_specific *i, *j; -+ struct tpm_chip *chip; -+ spin_lock(&tis_lock); -+ list_for_each_entry_safe(i, j, &tis_chips, list) { -+ chip = to_tpm_chip(i); -+ iowrite32(~TPM_GLOBAL_INT_ENABLE & -+ ioread32(chip->vendor.iobase + -+ TPM_INT_ENABLE(chip->vendor. -+ locality)), -+ chip->vendor.iobase + -+ TPM_INT_ENABLE(chip->vendor.locality)); -+ release_locality(chip, chip->vendor.locality, 1); -+ if (chip->vendor.irq) -+ free_irq(chip->vendor.irq, chip); -+ iounmap(i->iobase); -+ list_del(&i->list); -+ tpm_remove_hardware(chip->dev); -+ } -+ spin_unlock(&tis_lock); -+ pnp_unregister_driver(&tis_pnp_driver); -+} -+ -+module_init(init_tis); -+module_exit(cleanup_tis); -+MODULE_AUTHOR("Leendert van Doorn (leendert@watson.ibm.com)"); -+MODULE_DESCRIPTION("TPM Driver"); -+MODULE_VERSION("2.0"); -+MODULE_LICENSE("GPL"); diff --git a/patches/linux-2.6.16.33/blktap-aio-16_03_06.patch b/patches/linux-2.6.17/blktap-aio-16_03_06.patch index bf3e8d63f0..93602956c3 100644 --- a/patches/linux-2.6.16.33/blktap-aio-16_03_06.patch +++ b/patches/linux-2.6.17/blktap-aio-16_03_06.patch @@ -1,6 +1,6 @@ -diff -pruN ../orig-linux-2.6.16.29/fs/aio.c ./fs/aio.c ---- ../orig-linux-2.6.16.29/fs/aio.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./fs/aio.c 2006-09-19 13:58:49.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/fs/aio.c ./fs/aio.c +--- ../orig-linux-2.6.17/fs/aio.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./fs/aio.c 2007-01-08 15:13:31.000000000 +0000 @@ -34,6 +34,11 @@ #include <asm/uaccess.h> #include <asm/mmu_context.h> @@ -13,7 +13,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/aio.c ./fs/aio.c #if DEBUG > 1 #define dprintk printk #else -@@ -1016,6 +1021,10 @@ put_rq: +@@ -1015,6 +1020,10 @@ put_rq: if (waitqueue_active(&ctx->wait)) wake_up(&ctx->wait); @@ -24,7 +24,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/aio.c ./fs/aio.c if (ret) put_ioctx(ctx); -@@ -1025,6 +1034,8 @@ put_rq: +@@ -1024,6 +1033,8 @@ put_rq: /* aio_read_evt * Pull an event off of the ioctx's event ring. Returns the number of * events fetched (0 or 1 ;-) @@ -33,7 +33,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/aio.c ./fs/aio.c * FIXME: make this use cmpxchg. * TODO: make the ringbuffer user mmap()able (requires FIXME). */ -@@ -1047,13 +1058,18 @@ static int aio_read_evt(struct kioctx *i +@@ -1046,13 +1057,18 @@ static int aio_read_evt(struct kioctx *i head = ring->head % info->nr; if (head != ring->tail) { @@ -59,7 +59,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/aio.c ./fs/aio.c } spin_unlock(&info->ring_lock); -@@ -1236,9 +1252,78 @@ static void io_destroy(struct kioctx *io +@@ -1235,9 +1251,78 @@ static void io_destroy(struct kioctx *io aio_cancel_all(ioctx); wait_for_all_aios(ioctx); @@ -138,7 +138,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/aio.c ./fs/aio.c /* sys_io_setup: * Create an aio_context capable of receiving at least nr_events. * ctxp must not point to an aio_context that already exists, and -@@ -1251,18 +1336,30 @@ static void io_destroy(struct kioctx *io +@@ -1250,18 +1335,30 @@ static void io_destroy(struct kioctx *io * resources are available. May fail with -EFAULT if an invalid * pointer is passed for ctxp. Will fail with -ENOSYS if not * implemented. @@ -169,7 +169,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/aio.c ./fs/aio.c if (unlikely(ctx || nr_events == 0)) { pr_debug("EINVAL: io_setup: ctx %lu nr_events %u\n", ctx, nr_events); -@@ -1273,8 +1370,12 @@ asmlinkage long sys_io_setup(unsigned nr +@@ -1272,8 +1369,12 @@ asmlinkage long sys_io_setup(unsigned nr ret = PTR_ERR(ioctx); if (!IS_ERR(ioctx)) { ret = put_user(ioctx->user_id, ctxp); @@ -184,10 +184,10 @@ diff -pruN ../orig-linux-2.6.16.29/fs/aio.c ./fs/aio.c get_ioctx(ioctx); /* io_destroy() expects us to hold a ref */ io_destroy(ioctx); -diff -pruN ../orig-linux-2.6.16.29/fs/eventpoll.c ./fs/eventpoll.c ---- ../orig-linux-2.6.16.29/fs/eventpoll.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./fs/eventpoll.c 2006-09-19 13:58:49.000000000 +0100 -@@ -235,8 +235,6 @@ struct ep_pqueue { +diff -pruN ../orig-linux-2.6.17/fs/eventpoll.c ./fs/eventpoll.c +--- ../orig-linux-2.6.17/fs/eventpoll.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./fs/eventpoll.c 2007-01-08 15:13:31.000000000 +0000 +@@ -236,8 +236,6 @@ struct ep_pqueue { static void ep_poll_safewake_init(struct poll_safewake *psw); static void ep_poll_safewake(struct poll_safewake *psw, wait_queue_head_t *wq); @@ -196,7 +196,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/eventpoll.c ./fs/eventpoll.c static int ep_alloc(struct eventpoll **pep); static void ep_free(struct eventpoll *ep); static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd); -@@ -266,7 +264,7 @@ static int ep_events_transfer(struct eve +@@ -267,7 +265,7 @@ static int ep_events_transfer(struct eve static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events, int maxevents, long timeout); static int eventpollfs_delete_dentry(struct dentry *dentry); @@ -205,7 +205,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/eventpoll.c ./fs/eventpoll.c static struct super_block *eventpollfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data); -@@ -525,7 +523,7 @@ asmlinkage long sys_epoll_create(int siz +@@ -517,7 +515,7 @@ asmlinkage long sys_epoll_create(int siz * Creates all the items needed to setup an eventpoll file. That is, * a file structure, and inode and a free file descriptor. */ @@ -214,7 +214,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/eventpoll.c ./fs/eventpoll.c if (error) goto eexit_2; -@@ -710,8 +708,8 @@ eexit_1: +@@ -702,8 +700,8 @@ eexit_1: /* * Creates the file descriptor to be used by the epoll interface. */ @@ -225,7 +225,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/eventpoll.c ./fs/eventpoll.c { struct qstr this; char name[32]; -@@ -727,7 +725,7 @@ static int ep_getfd(int *efd, struct ino +@@ -719,7 +717,7 @@ static int ep_getfd(int *efd, struct ino goto eexit_1; /* Allocates an inode from the eventpoll file system */ @@ -234,7 +234,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/eventpoll.c ./fs/eventpoll.c error = PTR_ERR(inode); if (IS_ERR(inode)) goto eexit_2; -@@ -758,7 +756,7 @@ static int ep_getfd(int *efd, struct ino +@@ -750,7 +748,7 @@ static int ep_getfd(int *efd, struct ino file->f_pos = 0; file->f_flags = O_RDONLY; @@ -243,7 +243,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/eventpoll.c ./fs/eventpoll.c file->f_mode = FMODE_READ; file->f_version = 0; file->private_data = ep; -@@ -1574,7 +1572,7 @@ static int eventpollfs_delete_dentry(str +@@ -1566,7 +1564,7 @@ static int eventpollfs_delete_dentry(str } @@ -252,7 +252,7 @@ diff -pruN ../orig-linux-2.6.16.29/fs/eventpoll.c ./fs/eventpoll.c { int error = -ENOMEM; struct inode *inode = new_inode(eventpoll_mnt->mnt_sb); -@@ -1582,7 +1580,7 @@ static struct inode *ep_eventpoll_inode( +@@ -1574,7 +1572,7 @@ static struct inode *ep_eventpoll_inode( if (!inode) goto eexit_1; @@ -261,9 +261,9 @@ diff -pruN ../orig-linux-2.6.16.29/fs/eventpoll.c ./fs/eventpoll.c /* * Mark the inode dirty from the very beginning, -diff -pruN ../orig-linux-2.6.16.29/include/linux/aio.h ./include/linux/aio.h ---- ../orig-linux-2.6.16.29/include/linux/aio.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/linux/aio.h 2006-09-19 13:58:49.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/include/linux/aio.h ./include/linux/aio.h +--- ../orig-linux-2.6.17/include/linux/aio.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./include/linux/aio.h 2007-01-08 15:13:32.000000000 +0000 @@ -191,6 +191,11 @@ struct kioctx { struct aio_ring_info ring_info; @@ -276,13 +276,13 @@ diff -pruN ../orig-linux-2.6.16.29/include/linux/aio.h ./include/linux/aio.h }; /* prototypes */ -diff -pruN ../orig-linux-2.6.16.29/include/linux/eventpoll.h ./include/linux/eventpoll.h ---- ../orig-linux-2.6.16.29/include/linux/eventpoll.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/linux/eventpoll.h 2006-09-19 13:58:49.000000000 +0100 -@@ -86,6 +86,12 @@ static inline void eventpoll_release(str +diff -pruN ../orig-linux-2.6.17/include/linux/eventpoll.h ./include/linux/eventpoll.h +--- ../orig-linux-2.6.17/include/linux/eventpoll.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./include/linux/eventpoll.h 2007-01-08 15:13:32.000000000 +0000 +@@ -90,6 +90,12 @@ static inline void eventpoll_release(str + eventpoll_release_file(file); } - +/* + * called by aio code to create fd that can poll the aio event queueQ + */ diff --git a/patches/linux-2.6.16.33/fix-hz-suspend.patch b/patches/linux-2.6.17/fix-hz-suspend.patch index 2a964ccb8c..d06a658cd8 100644 --- a/patches/linux-2.6.16.33/fix-hz-suspend.patch +++ b/patches/linux-2.6.17/fix-hz-suspend.patch @@ -1,9 +1,9 @@ -diff -pruN ../orig-linux-2.6.16.29/kernel/timer.c ./kernel/timer.c ---- ../orig-linux-2.6.16.29/kernel/timer.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./kernel/timer.c 2006-09-19 13:58:58.000000000 +0100 -@@ -555,6 +555,22 @@ found: - } - spin_unlock(&base->t_base.lock); +diff -pruN ../orig-linux-2.6.17/kernel/timer.c ./kernel/timer.c +--- ../orig-linux-2.6.17/kernel/timer.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./kernel/timer.c 2007-01-08 15:14:52.000000000 +0000 +@@ -557,6 +557,22 @@ found: + if (time_before(expires, jiffies)) + return jiffies; + /* + * It can happen that other CPUs service timer IRQs and increment diff --git a/patches/linux-2.6.16.33/fix-ide-cd-pio-mode.patch b/patches/linux-2.6.17/fix-ide-cd-pio-mode.patch index 91e6cb5279..3f2ef6bec9 100644 --- a/patches/linux-2.6.16.33/fix-ide-cd-pio-mode.patch +++ b/patches/linux-2.6.17/fix-ide-cd-pio-mode.patch @@ -1,6 +1,6 @@ -diff -pruN ../orig-linux-2.6.16.29/drivers/ide/ide-lib.c ./drivers/ide/ide-lib.c ---- ../orig-linux-2.6.16.29/drivers/ide/ide-lib.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./drivers/ide/ide-lib.c 2006-09-19 13:59:03.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/drivers/ide/ide-lib.c ./drivers/ide/ide-lib.c +--- ../orig-linux-2.6.17/drivers/ide/ide-lib.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./drivers/ide/ide-lib.c 2007-01-08 15:15:41.000000000 +0000 @@ -410,10 +410,10 @@ void ide_toggle_bounce(ide_drive_t *driv { u64 addr = BLK_BOUNCE_HIGH; /* dma64_addr_t */ diff --git a/patches/linux-2.6.16.33/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch b/patches/linux-2.6.17/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch index 3e7c024b38..0c818c31c8 100644 --- a/patches/linux-2.6.16.33/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch +++ b/patches/linux-2.6.17/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch @@ -1,23 +1,6 @@ -From: Eric W. Biederman <ebiederm@xmission.com> -Date: Sun, 30 Jul 2006 10:03:20 +0000 (-0700) -Subject: [PATCH] machine_kexec.c: Fix the description of segment handling -X-Git-Tag: v2.6.18-rc4 -X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2a8a3d5b65e86ec1dfef7d268c64a909eab94af7 - -[PATCH] machine_kexec.c: Fix the description of segment handling - -One of my original comments in machine_kexec was unclear -and this should fix it. - -Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> -Cc: Andi Kleen <ak@muc.de> -Acked-by: Horms <horms@verge.net.au> -Signed-off-by: Andrew Morton <akpm@osdl.org> -Signed-off-by: Linus Torvalds <torvalds@osdl.org> ---- - ---- a/arch/i386/kernel/machine_kexec.c -+++ b/arch/i386/kernel/machine_kexec.c +diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c ./arch/i386/kernel/machine_kexec.c +--- ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000 ++++ ./arch/i386/kernel/machine_kexec.c 2007-01-08 15:12:20.000000000 +0000 @@ -189,14 +189,11 @@ NORET_TYPE void machine_kexec(struct kim memcpy((void *)reboot_code_buffer, relocate_new_kernel, relocate_new_kernel_size); @@ -38,8 +21,9 @@ Signed-off-by: Linus Torvalds <torvalds@osdl.org> * * I take advantage of this here by force loading the * segments, before I zap the gdt with an invalid value. ---- a/arch/x86_64/kernel/machine_kexec.c -+++ b/arch/x86_64/kernel/machine_kexec.c +diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64/kernel/machine_kexec.c +--- ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000 ++++ ./arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:12:20.000000000 +0000 @@ -207,14 +207,11 @@ NORET_TYPE void machine_kexec(struct kim __flush_tlb(); diff --git a/patches/linux-2.6.16.33/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch b/patches/linux-2.6.17/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch index 9d0b701ffb..13114cd4fe 100644 --- a/patches/linux-2.6.16.33/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch +++ b/patches/linux-2.6.17/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch @@ -1,19 +1,6 @@ -From: Tobias Klauser <tklauser@nuerscht.ch> -Date: Mon, 26 Jun 2006 16:57:34 +0000 (+0200) -Subject: Storage class should be first -X-Git-Tag: v2.6.18-rc1 -X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2efe55a9cec8418f0e0cde3dc3787a42fddc4411 - -Storage class should be first - -Storage class should be before const - -Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> -Signed-off-by: Adrian Bunk <bunk@stusta.de> ---- - ---- a/arch/i386/kernel/machine_kexec.c -+++ b/arch/i386/kernel/machine_kexec.c +diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c ./arch/i386/kernel/machine_kexec.c +--- ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/i386/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000 @@ -133,9 +133,9 @@ typedef asmlinkage NORET_TYPE void (*rel unsigned long start_address, unsigned int has_pae) ATTRIB_NORET; @@ -26,8 +13,9 @@ Signed-off-by: Adrian Bunk <bunk@stusta.de> /* * A architecture hook called to validate the ---- a/arch/powerpc/kernel/machine_kexec_32.c -+++ b/arch/powerpc/kernel/machine_kexec_32.c +diff -pruN ../orig-linux-2.6.17/arch/powerpc/kernel/machine_kexec_32.c ./arch/powerpc/kernel/machine_kexec_32.c +--- ../orig-linux-2.6.17/arch/powerpc/kernel/machine_kexec_32.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/powerpc/kernel/machine_kexec_32.c 2007-01-08 15:01:25.000000000 +0000 @@ -30,8 +30,8 @@ typedef NORET_TYPE void (*relocate_new_k */ void default_machine_kexec(struct kimage *image) @@ -39,8 +27,9 @@ Signed-off-by: Adrian Bunk <bunk@stusta.de> unsigned long page_list; unsigned long reboot_code_buffer, reboot_code_buffer_phys; relocate_new_kernel_t rnk; ---- a/arch/ppc/kernel/machine_kexec.c -+++ b/arch/ppc/kernel/machine_kexec.c +diff -pruN ../orig-linux-2.6.17/arch/ppc/kernel/machine_kexec.c ./arch/ppc/kernel/machine_kexec.c +--- ../orig-linux-2.6.17/arch/ppc/kernel/machine_kexec.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/ppc/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000 @@ -25,8 +25,8 @@ typedef NORET_TYPE void (*relocate_new_k unsigned long reboot_code_buffer, unsigned long start_address) ATTRIB_NORET; @@ -52,8 +41,9 @@ Signed-off-by: Adrian Bunk <bunk@stusta.de> void machine_shutdown(void) { ---- a/arch/s390/kernel/machine_kexec.c -+++ b/arch/s390/kernel/machine_kexec.c +diff -pruN ../orig-linux-2.6.17/arch/s390/kernel/machine_kexec.c ./arch/s390/kernel/machine_kexec.c +--- ../orig-linux-2.6.17/arch/s390/kernel/machine_kexec.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/s390/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000 @@ -27,8 +27,8 @@ static void kexec_halt_all_cpus(void *); typedef void (*relocate_kernel_t) (kimage_entry_t *, unsigned long); @@ -65,8 +55,9 @@ Signed-off-by: Adrian Bunk <bunk@stusta.de> int machine_kexec_prepare(struct kimage *image) ---- a/arch/sh/kernel/machine_kexec.c -+++ b/arch/sh/kernel/machine_kexec.c +diff -pruN ../orig-linux-2.6.17/arch/sh/kernel/machine_kexec.c ./arch/sh/kernel/machine_kexec.c +--- ../orig-linux-2.6.17/arch/sh/kernel/machine_kexec.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/sh/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000 @@ -25,8 +25,8 @@ typedef NORET_TYPE void (*relocate_new_k unsigned long start_address, unsigned long vbr_reg) ATTRIB_NORET; @@ -78,8 +69,9 @@ Signed-off-by: Adrian Bunk <bunk@stusta.de> extern void *gdb_vbr_vector; /* ---- a/arch/x86_64/kernel/machine_kexec.c -+++ b/arch/x86_64/kernel/machine_kexec.c +diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64/kernel/machine_kexec.c +--- ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000 @@ -149,8 +149,8 @@ typedef NORET_TYPE void (*relocate_new_k unsigned long start_address, unsigned long pgtable) ATTRIB_NORET; diff --git a/patches/linux-2.6.16.33/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch b/patches/linux-2.6.17/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch index f0650a1bb4..ea805a3612 100644 --- a/patches/linux-2.6.16.33/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch +++ b/patches/linux-2.6.17/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch @@ -1,26 +1,7 @@ -From: Magnus Damm <magnus@valinux.co.jp> -Date: Tue, 26 Sep 2006 08:52:38 +0000 (+0200) -Subject: [PATCH] i386: Avoid overwriting the current pgd (V4, i386) -X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3566561bfadffcb5dbc85d576be80c0dbf2cccc9 - -[PATCH] i386: Avoid overwriting the current pgd (V4, i386) - -kexec: Avoid overwriting the current pgd (V4, i386) - -This patch upgrades the i386-specific kexec code to avoid overwriting the -current pgd. Overwriting the current pgd is bad when CONFIG_CRASH_DUMP is used -to start a secondary kernel that dumps the memory of the previous kernel. - -The code introduces a new set of page tables. These tables are used to provide -an executable identity mapping without overwriting the current pgd. - -Signed-off-by: Magnus Damm <magnus@valinux.co.jp> -Signed-off-by: Andi Kleen <ak@suse.de> ---- - ---- a/arch/i386/kernel/machine_kexec.c -+++ b/arch/i386/kernel/machine_kexec.c -@@ -21,70 +21,13 @@ +diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c ./arch/i386/kernel/machine_kexec.c +--- ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c 2007-01-08 15:12:20.000000000 +0000 ++++ ./arch/i386/kernel/machine_kexec.c 2007-01-08 15:12:33.000000000 +0000 +@@ -20,70 +20,13 @@ #include <asm/system.h> #define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE))) @@ -97,7 +78,7 @@ Signed-off-by: Andi Kleen <ak@suse.de> static void set_idt(void *newidt, __u16 limit) { -@@ -128,16 +71,6 @@ static void load_segments(void) +@@ -127,16 +70,6 @@ static void load_segments(void) #undef __STR } @@ -114,7 +95,7 @@ Signed-off-by: Andi Kleen <ak@suse.de> /* * A architecture hook called to validate the * proposed image and prepare the control pages -@@ -170,25 +103,29 @@ void machine_kexec_cleanup(struct kimage +@@ -169,25 +102,29 @@ void machine_kexec_cleanup(struct kimage */ NORET_TYPE void machine_kexec(struct kimage *image) { @@ -159,7 +140,7 @@ Signed-off-by: Andi Kleen <ak@suse.de> /* The segment registers are funny things, they have both a * visible and an invisible part. Whenever the visible part is -@@ -207,8 +144,8 @@ NORET_TYPE void machine_kexec(struct kim +@@ -206,6 +143,6 @@ NORET_TYPE void machine_kexec(struct kim set_idt(phys_to_virt(0),0); /* now call it */ @@ -168,10 +149,9 @@ Signed-off-by: Andi Kleen <ak@suse.de> + relocate_kernel((unsigned long)image->head, (unsigned long)page_list, + image->start, cpu_has_pae); } - - /* crashkernel=size@addr specifies the location to reserve for ---- a/arch/i386/kernel/relocate_kernel.S -+++ b/arch/i386/kernel/relocate_kernel.S +diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/relocate_kernel.S ./arch/i386/kernel/relocate_kernel.S +--- ../orig-linux-2.6.17/arch/i386/kernel/relocate_kernel.S 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/i386/kernel/relocate_kernel.S 2007-01-08 15:12:33.000000000 +0000 @@ -7,16 +7,138 @@ */ @@ -357,8 +337,9 @@ Signed-off-by: Andi Kleen <ak@suse.de> - .globl relocate_new_kernel_size -relocate_new_kernel_size: - .long relocate_new_kernel_end - relocate_new_kernel ---- a/include/asm-i386/kexec.h -+++ b/include/asm-i386/kexec.h +diff -pruN ../orig-linux-2.6.17/include/asm-i386/kexec.h ./include/asm-i386/kexec.h +--- ../orig-linux-2.6.17/include/asm-i386/kexec.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./include/asm-i386/kexec.h 2007-01-08 15:12:33.000000000 +0000 @@ -1,6 +1,26 @@ #ifndef _I386_KEXEC_H #define _I386_KEXEC_H diff --git a/patches/linux-2.6.16.33/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch b/patches/linux-2.6.17/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch index 6e1f65fe9f..2cb8358cd4 100644 --- a/patches/linux-2.6.16.33/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch +++ b/patches/linux-2.6.17/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch @@ -1,26 +1,6 @@ -From: Magnus Damm <magnus@valinux.co.jp> -Date: Tue, 26 Sep 2006 08:52:38 +0000 (+0200) -Subject: [PATCH] Avoid overwriting the current pgd (V4, x86_64) -X-Git-Tag: v2.6.19-rc1 -X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f - -[PATCH] Avoid overwriting the current pgd (V4, x86_64) - -kexec: Avoid overwriting the current pgd (V4, x86_64) - -This patch upgrades the x86_64-specific kexec code to avoid overwriting the -current pgd. Overwriting the current pgd is bad when CONFIG_CRASH_DUMP is used -to start a secondary kernel that dumps the memory of the previous kernel. - -The code introduces a new set of page tables. These tables are used to provide -an executable identity mapping without overwriting the current pgd. - -Signed-off-by: Magnus Damm <magnus@valinux.co.jp> -Signed-off-by: Andi Kleen <ak@suse.de> ---- - ---- a/arch/x86_64/kernel/machine_kexec.c -+++ b/arch/x86_64/kernel/machine_kexec.c +diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64/kernel/machine_kexec.c +--- ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:12:20.000000000 +0000 ++++ ./arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:13:01.000000000 +0000 @@ -15,6 +15,15 @@ #include <asm/mmu_context.h> #include <asm/io.h> @@ -122,7 +102,7 @@ Signed-off-by: Andi Kleen <ak@suse.de> /* The segment registers are funny things, they have both a * visible and an invisible part. Whenever the visible part is -@@ -222,9 +224,10 @@ NORET_TYPE void machine_kexec(struct kim +@@ -222,7 +224,8 @@ NORET_TYPE void machine_kexec(struct kim */ set_gdt(phys_to_virt(0),0); set_idt(phys_to_virt(0),0); @@ -133,10 +113,9 @@ Signed-off-by: Andi Kleen <ak@suse.de> + relocate_kernel((unsigned long)image->head, (unsigned long)page_list, + image->start); } - - /* crashkernel=size@addr specifies the location to reserve for ---- a/arch/x86_64/kernel/relocate_kernel.S -+++ b/arch/x86_64/kernel/relocate_kernel.S +diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/relocate_kernel.S ./arch/x86_64/kernel/relocate_kernel.S +--- ../orig-linux-2.6.17/arch/x86_64/kernel/relocate_kernel.S 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/x86_64/kernel/relocate_kernel.S 2007-01-08 15:13:01.000000000 +0000 @@ -7,31 +7,169 @@ */ @@ -330,8 +309,9 @@ Signed-off-by: Andi Kleen <ak@suse.de> - .globl relocate_new_kernel_size -relocate_new_kernel_size: - .quad relocate_new_kernel_end - relocate_new_kernel ---- a/include/asm-x86_64/kexec.h -+++ b/include/asm-x86_64/kexec.h +diff -pruN ../orig-linux-2.6.17/include/asm-x86_64/kexec.h ./include/asm-x86_64/kexec.h +--- ../orig-linux-2.6.17/include/asm-x86_64/kexec.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./include/asm-x86_64/kexec.h 2007-01-08 15:13:01.000000000 +0000 @@ -1,6 +1,27 @@ #ifndef _X86_64_KEXEC_H #define _X86_64_KEXEC_H diff --git a/patches/linux-2.6.17/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch b/patches/linux-2.6.17/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch new file mode 100644 index 0000000000..73e3e7492d --- /dev/null +++ b/patches/linux-2.6.17/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch @@ -0,0 +1,20 @@ +diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/kernel/vmlinux.lds.S +--- ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S 2007-01-08 15:37:29.000000000 +0000 ++++ ./arch/x86_64/kernel/vmlinux.lds.S 2007-01-08 15:37:43.000000000 +0000 +@@ -18,6 +18,7 @@ PHDRS { + text PT_LOAD FLAGS(5); /* R_E */ + data PT_LOAD FLAGS(7); /* RWE */ + user PT_LOAD FLAGS(7); /* RWE */ ++ data.init PT_LOAD FLAGS(7); /* RWE */ + note PT_NOTE FLAGS(4); /* R__ */ + } + SECTIONS +@@ -123,7 +124,7 @@ SECTIONS + . = ALIGN(8192); /* init_task */ + .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { + *(.data.init_task) +- } :data ++ }:data.init + + . = ALIGN(4096); + .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { diff --git a/patches/linux-2.6.16.33/i386-mach-io-check-nmi.patch b/patches/linux-2.6.17/i386-mach-io-check-nmi.patch index bfcba3908a..24edbe31f5 100644 --- a/patches/linux-2.6.16.33/i386-mach-io-check-nmi.patch +++ b/patches/linux-2.6.17/i386-mach-io-check-nmi.patch @@ -1,7 +1,7 @@ -diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/traps.c ./arch/i386/kernel/traps.c ---- ../orig-linux-2.6.16.29/arch/i386/kernel/traps.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/i386/kernel/traps.c 2006-09-19 13:59:06.000000000 +0100 -@@ -567,18 +567,11 @@ static void mem_parity_error(unsigned ch +diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/traps.c ./arch/i386/kernel/traps.c +--- ../orig-linux-2.6.17/arch/i386/kernel/traps.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/i386/kernel/traps.c 2007-01-08 15:15:53.000000000 +0000 +@@ -607,18 +607,11 @@ static void mem_parity_error(unsigned ch static void io_check_error(unsigned char reason, struct pt_regs * regs) { @@ -21,9 +21,9 @@ diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/traps.c ./arch/i386/kernel/t } static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs) -diff -pruN ../orig-linux-2.6.16.29/include/asm-i386/mach-default/mach_traps.h ./include/asm-i386/mach-default/mach_traps.h ---- ../orig-linux-2.6.16.29/include/asm-i386/mach-default/mach_traps.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/asm-i386/mach-default/mach_traps.h 2006-09-19 13:59:06.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/include/asm-i386/mach-default/mach_traps.h ./include/asm-i386/mach-default/mach_traps.h +--- ../orig-linux-2.6.17/include/asm-i386/mach-default/mach_traps.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./include/asm-i386/mach-default/mach_traps.h 2007-01-08 15:15:53.000000000 +0000 @@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig outb(reason, 0x61); } diff --git a/patches/linux-2.6.16.33/ipv6-no-autoconf.patch b/patches/linux-2.6.17/ipv6-no-autoconf.patch index e0d1b8c681..a64f800d90 100644 --- a/patches/linux-2.6.16.33/ipv6-no-autoconf.patch +++ b/patches/linux-2.6.17/ipv6-no-autoconf.patch @@ -1,7 +1,7 @@ -diff -pruN ../orig-linux-2.6.16.29/net/ipv6/addrconf.c ./net/ipv6/addrconf.c ---- ../orig-linux-2.6.16.29/net/ipv6/addrconf.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./net/ipv6/addrconf.c 2006-09-19 13:59:11.000000000 +0100 -@@ -2471,6 +2471,7 @@ static void addrconf_dad_start(struct in +diff -pruN ../orig-linux-2.6.17/net/ipv6/addrconf.c ./net/ipv6/addrconf.c +--- ../orig-linux-2.6.17/net/ipv6/addrconf.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./net/ipv6/addrconf.c 2007-01-08 15:16:04.000000000 +0000 +@@ -2461,6 +2461,7 @@ static void addrconf_dad_start(struct in spin_lock_bh(&ifp->lock); if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) || @@ -9,7 +9,7 @@ diff -pruN ../orig-linux-2.6.16.29/net/ipv6/addrconf.c ./net/ipv6/addrconf.c !(ifp->flags&IFA_F_TENTATIVE)) { ifp->flags &= ~IFA_F_TENTATIVE; spin_unlock_bh(&ifp->lock); -@@ -2555,6 +2556,7 @@ static void addrconf_dad_completed(struc +@@ -2545,6 +2546,7 @@ static void addrconf_dad_completed(struc if (ifp->idev->cnf.forwarding == 0 && ifp->idev->cnf.rtr_solicits > 0 && (dev->flags&IFF_LOOPBACK) == 0 && diff --git a/patches/linux-2.6.17/kasprintf.patch b/patches/linux-2.6.17/kasprintf.patch new file mode 100644 index 0000000000..96c56990db --- /dev/null +++ b/patches/linux-2.6.17/kasprintf.patch @@ -0,0 +1,42 @@ +diff -pruN ../orig-linux-2.6.17/include/linux/kernel.h ./include/linux/kernel.h +--- ../orig-linux-2.6.17/include/linux/kernel.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./include/linux/kernel.h 2007-01-08 15:38:20.000000000 +0000 +@@ -114,6 +114,8 @@ extern int scnprintf(char * buf, size_t + __attribute__ ((format (printf, 3, 4))); + extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) + __attribute__ ((format (printf, 3, 0))); ++extern char *kasprintf(gfp_t gfp, const char *fmt, ...) ++ __attribute__ ((format (printf, 2, 3))); + + extern int sscanf(const char *, const char *, ...) + __attribute__ ((format (scanf, 2, 3))); +diff -pruN ../orig-linux-2.6.17/lib/vsprintf.c ./lib/vsprintf.c +--- ../orig-linux-2.6.17/lib/vsprintf.c 2007-01-08 15:38:07.000000000 +0000 ++++ ./lib/vsprintf.c 2007-01-08 15:38:20.000000000 +0000 +@@ -849,3 +849,26 @@ int sscanf(const char * buf, const char + } + + EXPORT_SYMBOL(sscanf); ++ ++ ++/* Simplified asprintf. */ ++char *kasprintf(gfp_t gfp, const char *fmt, ...) ++{ ++ va_list ap; ++ unsigned int len; ++ char *p; ++ ++ va_start(ap, fmt); ++ len = vsnprintf(NULL, 0, fmt, ap); ++ va_end(ap); ++ ++ p = kmalloc(len+1, gfp); ++ if (!p) ++ return NULL; ++ va_start(ap, fmt); ++ vsnprintf(p, len+1, fmt, ap); ++ va_end(ap); ++ return p; ++} ++ ++EXPORT_SYMBOL(kasprintf); diff --git a/patches/linux-2.6.16.33/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch b/patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch index a0c9518f48..e62fb53264 100644 --- a/patches/linux-2.6.16.33/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch +++ b/patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch @@ -1,26 +1,7 @@ -kexec: Move asm segment handling code to the assembly file (i386) - -This patch moves the idt, gdt, and segment handling code from machine_kexec.c -to relocate_kernel.S. The main reason behind this move is to avoid code -duplication in the Xen hypervisor. With this patch all code required to kexec -is put on the control page. - -On top of that this patch also counts as a cleanup - I think it is much -nicer to write assembly directly in assembly files than wrap inline assembly -in C functions for no apparent reason. - -Signed-off-by: Magnus Damm <magnus@valinux.co.jp> ---- - - Applies to 2.6.19-rc1. - - machine_kexec.c | 59 ----------------------------------------------------- - relocate_kernel.S | 58 +++++++++++++++++++++++++++++++++++++++++++++++----- - 2 files changed, 53 insertions(+), 64 deletions(-) - ---- 0002/arch/i386/kernel/machine_kexec.c -+++ work/arch/i386/kernel/machine_kexec.c 2006-10-05 15:49:08.000000000 +0900 -@@ -29,48 +29,6 @@ static u32 kexec_pmd1[1024] PAGE_ALIGNED +diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c ./arch/i386/kernel/machine_kexec.c +--- ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c 2007-01-08 15:12:33.000000000 +0000 ++++ ./arch/i386/kernel/machine_kexec.c 2007-01-08 15:12:46.000000000 +0000 +@@ -28,48 +28,6 @@ static u32 kexec_pmd1[1024] PAGE_ALIGNED static u32 kexec_pte0[1024] PAGE_ALIGNED; static u32 kexec_pte1[1024] PAGE_ALIGNED; @@ -69,7 +50,7 @@ Signed-off-by: Magnus Damm <magnus@valinux.co.jp> /* * A architecture hook called to validate the * proposed image and prepare the control pages -@@ -127,23 +85,6 @@ NORET_TYPE void machine_kexec(struct kim +@@ -126,23 +84,6 @@ NORET_TYPE void machine_kexec(struct kim page_list[PA_PTE_1] = __pa(kexec_pte1); page_list[VA_PTE_1] = (unsigned long)kexec_pte1; @@ -93,8 +74,9 @@ Signed-off-by: Magnus Damm <magnus@valinux.co.jp> relocate_kernel((unsigned long)image->head, (unsigned long)page_list, image->start, cpu_has_pae); } ---- 0002/arch/i386/kernel/relocate_kernel.S -+++ work/arch/i386/kernel/relocate_kernel.S 2006-10-05 16:03:21.000000000 +0900 +diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/relocate_kernel.S ./arch/i386/kernel/relocate_kernel.S +--- ../orig-linux-2.6.17/arch/i386/kernel/relocate_kernel.S 2007-01-08 15:12:33.000000000 +0000 ++++ ./arch/i386/kernel/relocate_kernel.S 2007-01-08 15:12:46.000000000 +0000 @@ -154,14 +154,45 @@ relocate_new_kernel: movl PTR(PA_PGD)(%ebp), %eax movl %eax, %cr3 diff --git a/patches/linux-2.6.16.33/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch b/patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch index 1cf613284f..81d84b55e1 100644 --- a/patches/linux-2.6.16.33/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch +++ b/patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch @@ -1,25 +1,6 @@ -kexec: Move asm segment handling code to the assembly file (x86_64) - -This patch moves the idt, gdt, and segment handling code from machine_kexec.c -to relocate_kernel.S. The main reason behind this move is to avoid code -duplication in the Xen hypervisor. With this patch all code required to kexec -is put on the control page. - -On top of that this patch also counts as a cleanup - I think it is much -nicer to write assembly directly in assembly files than wrap inline assembly -in C functions for no apparent reason. - -Signed-off-by: Magnus Damm <magnus@valinux.co.jp> ---- - - Applies to 2.6.19-rc1. - - machine_kexec.c | 58 ----------------------------------------------------- - relocate_kernel.S | 50 +++++++++++++++++++++++++++++++++++++++++---- - 2 files changed, 45 insertions(+), 63 deletions(-) - ---- 0002/arch/x86_64/kernel/machine_kexec.c -+++ work/arch/x86_64/kernel/machine_kexec.c 2006-10-05 16:15:49.000000000 +0900 +diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64/kernel/machine_kexec.c +--- ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:13:01.000000000 +0000 ++++ ./arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:13:18.000000000 +0000 @@ -112,47 +112,6 @@ static int init_pgtable(struct kimage *i return init_level4_page(image, level4p, 0, end_pfn << PAGE_SHIFT); } @@ -92,8 +73,9 @@ Signed-off-by: Magnus Damm <magnus@valinux.co.jp> relocate_kernel((unsigned long)image->head, (unsigned long)page_list, image->start); } ---- 0002/arch/x86_64/kernel/relocate_kernel.S -+++ work/arch/x86_64/kernel/relocate_kernel.S 2006-10-05 16:18:07.000000000 +0900 +diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/relocate_kernel.S ./arch/x86_64/kernel/relocate_kernel.S +--- ../orig-linux-2.6.17/arch/x86_64/kernel/relocate_kernel.S 2007-01-08 15:13:01.000000000 +0000 ++++ ./arch/x86_64/kernel/relocate_kernel.S 2007-01-08 15:13:18.000000000 +0000 @@ -159,13 +159,39 @@ relocate_new_kernel: movq PTR(PA_PGD)(%rsi), %r9 movq %r9, %cr3 diff --git a/patches/linux-2.6.16.33/net-csum.patch b/patches/linux-2.6.17/net-csum.patch index d5fb233077..342e2b65aa 100644 --- a/patches/linux-2.6.16.33/net-csum.patch +++ b/patches/linux-2.6.17/net-csum.patch @@ -1,6 +1,6 @@ -diff -pruN ../orig-linux-2.6.16.29/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c ---- ../orig-linux-2.6.16.29/net/ipv4/netfilter/ip_nat_proto_tcp.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c 2006-09-19 13:59:15.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c +--- ../orig-linux-2.6.17/net/ipv4/netfilter/ip_nat_proto_tcp.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c 2007-01-08 15:16:15.000000000 +0000 @@ -129,7 +129,12 @@ tcp_manip_pkt(struct sk_buff **pskb, if (hdrsize < sizeof(*hdr)) return 1; @@ -15,9 +15,9 @@ diff -pruN ../orig-linux-2.6.16.29/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/i ip_nat_cheat_check(oldport ^ 0xFFFF, newport, hdr->check)); -diff -pruN ../orig-linux-2.6.16.29/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c ---- ../orig-linux-2.6.16.29/net/ipv4/netfilter/ip_nat_proto_udp.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./net/ipv4/netfilter/ip_nat_proto_udp.c 2006-09-19 13:59:15.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c +--- ../orig-linux-2.6.17/net/ipv4/netfilter/ip_nat_proto_udp.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./net/ipv4/netfilter/ip_nat_proto_udp.c 2007-01-08 15:16:15.000000000 +0000 @@ -113,11 +113,17 @@ udp_manip_pkt(struct sk_buff **pskb, newport = tuple->dst.u.udp.port; portptr = &hdr->dest; @@ -38,9 +38,9 @@ diff -pruN ../orig-linux-2.6.16.29/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/i *portptr = newport; return 1; } -diff -pruN ../orig-linux-2.6.16.29/net/ipv4/xfrm4_output.c ./net/ipv4/xfrm4_output.c ---- ../orig-linux-2.6.16.29/net/ipv4/xfrm4_output.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./net/ipv4/xfrm4_output.c 2006-09-19 13:59:15.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/net/ipv4/xfrm4_output.c ./net/ipv4/xfrm4_output.c +--- ../orig-linux-2.6.17/net/ipv4/xfrm4_output.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./net/ipv4/xfrm4_output.c 2007-01-08 15:16:15.000000000 +0000 @@ -17,6 +17,8 @@ #include <net/xfrm.h> #include <net/icmp.h> diff --git a/patches/linux-2.6.16.33/net-gso-0-base.patch b/patches/linux-2.6.17/net-gso-0-base.patch index ce414f3326..eb04d8c27a 100644 --- a/patches/linux-2.6.16.33/net-gso-0-base.patch +++ b/patches/linux-2.6.17/net-gso-0-base.patch @@ -1,7 +1,7 @@ -Index: tmp-xxx/Documentation/networking/netdevices.txt +Index: tmp-linux-2.6.17/Documentation/networking/netdevices.txt =================================================================== ---- tmp-xxx.orig/Documentation/networking/netdevices.txt 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/Documentation/networking/netdevices.txt 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/Documentation/networking/netdevices.txt 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/Documentation/networking/netdevices.txt 2007-01-08 16:48:05.000000000 +0000 @@ -42,9 +42,9 @@ Context: nominally process, but don't sleep inside an rwlock @@ -29,25 +29,24 @@ Index: tmp-xxx/Documentation/networking/netdevices.txt Context: BHs disabled dev->poll: -Index: tmp-xxx/drivers/block/aoe/aoenet.c +Index: tmp-linux-2.6.17/drivers/block/aoe/aoenet.c =================================================================== ---- tmp-xxx.orig/drivers/block/aoe/aoenet.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/block/aoe/aoenet.c 2006-11-27 10:52:42.000000000 +0000 -@@ -95,9 +95,8 @@ - static struct sk_buff * - skb_check(struct sk_buff *skb) - { +--- tmp-linux-2.6.17.orig/drivers/block/aoe/aoenet.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/block/aoe/aoenet.c 2007-01-08 16:48:05.000000000 +0000 +@@ -116,8 +116,7 @@ + skb = skb_share_check(skb, GFP_ATOMIC); + if (skb == NULL) + return 0; - if (skb_is_nonlinear(skb)) - if ((skb = skb_share_check(skb, GFP_ATOMIC))) -- if (skb_linearize(skb, GFP_ATOMIC) < 0) { -+ if (skb_linearize(skb)) { - dev_kfree_skb(skb); - return NULL; - } -Index: tmp-xxx/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +- if (skb_linearize(skb, GFP_ATOMIC) < 0) ++ if (skb_linearize(skb) < 0) + goto exit; + if (!is_aoe_netif(ifp)) + goto exit; +Index: tmp-linux-2.6.17/drivers/infiniband/ulp/ipoib/ipoib_multicast.c =================================================================== ---- tmp-xxx.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2007-01-08 16:48:05.000000000 +0000 @@ -821,7 +821,8 @@ ipoib_mcast_stop_thread(dev, 0); @@ -68,11 +67,11 @@ Index: tmp-xxx/drivers/infiniband/ulp/ipoib/ipoib_multicast.c /* We have to cancel outside of the spinlock */ list_for_each_entry_safe(mcast, tmcast, &remove_list, list) { -Index: tmp-xxx/drivers/media/dvb/dvb-core/dvb_net.c +Index: tmp-linux-2.6.17/drivers/media/dvb/dvb-core/dvb_net.c =================================================================== ---- tmp-xxx.orig/drivers/media/dvb/dvb-core/dvb_net.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/media/dvb/dvb-core/dvb_net.c 2006-11-27 10:52:42.000000000 +0000 -@@ -1053,7 +1053,7 @@ +--- tmp-linux-2.6.17.orig/drivers/media/dvb/dvb-core/dvb_net.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/media/dvb/dvb-core/dvb_net.c 2007-01-08 16:48:05.000000000 +0000 +@@ -1052,7 +1052,7 @@ dvb_net_feed_stop(dev); priv->rx_mode = RX_MODE_UNI; @@ -81,7 +80,7 @@ Index: tmp-xxx/drivers/media/dvb/dvb-core/dvb_net.c if (dev->flags & IFF_PROMISC) { dprintk("%s: promiscuous mode\n", dev->name); -@@ -1078,7 +1078,7 @@ +@@ -1077,7 +1077,7 @@ } } @@ -90,11 +89,11 @@ Index: tmp-xxx/drivers/media/dvb/dvb-core/dvb_net.c dvb_net_feed_start(dev); } -Index: tmp-xxx/drivers/net/8139cp.c +Index: tmp-linux-2.6.17/drivers/net/8139cp.c =================================================================== ---- tmp-xxx.orig/drivers/net/8139cp.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/8139cp.c 2006-11-27 10:52:42.000000000 +0000 -@@ -794,7 +794,7 @@ +--- tmp-linux-2.6.17.orig/drivers/net/8139cp.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/8139cp.c 2007-01-08 16:48:05.000000000 +0000 +@@ -792,7 +792,7 @@ entry = cp->tx_head; eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0; if (dev->features & NETIF_F_TSO) @@ -103,11 +102,11 @@ Index: tmp-xxx/drivers/net/8139cp.c if (skb_shinfo(skb)->nr_frags == 0) { struct cp_desc *txd = &cp->tx_ring[entry]; -Index: tmp-xxx/drivers/net/bnx2.c +Index: tmp-linux-2.6.17/drivers/net/bnx2.c =================================================================== ---- tmp-xxx.orig/drivers/net/bnx2.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/bnx2.c 2006-11-27 10:52:42.000000000 +0000 -@@ -1593,7 +1593,7 @@ +--- tmp-linux-2.6.17.orig/drivers/net/bnx2.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/bnx2.c 2007-01-08 16:48:05.000000000 +0000 +@@ -1638,7 +1638,7 @@ skb = tx_buf->skb; #ifdef BCM_TSO /* partial BD completions possible with TSO packets */ @@ -116,7 +115,7 @@ Index: tmp-xxx/drivers/net/bnx2.c u16 last_idx, last_ring_idx; last_idx = sw_cons + -@@ -1948,7 +1948,7 @@ +@@ -2009,7 +2009,7 @@ return 1; } @@ -125,7 +124,7 @@ Index: tmp-xxx/drivers/net/bnx2.c * from set_multicast. */ static void -@@ -4403,7 +4403,7 @@ +@@ -4252,7 +4252,7 @@ } #endif @@ -134,7 +133,7 @@ Index: tmp-xxx/drivers/net/bnx2.c * hard_start_xmit is pseudo-lockless - a lock is only required when * the tx queue is full. This way, we get the benefit of lockless * operations most of the time without the complexities to handle -@@ -4441,7 +4441,7 @@ +@@ -4290,7 +4290,7 @@ (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16)); } #ifdef BCM_TSO @@ -143,11 +142,11 @@ Index: tmp-xxx/drivers/net/bnx2.c (skb->len > (bp->dev->mtu + ETH_HLEN))) { u32 tcp_opt_len, ip_tcp_len; -Index: tmp-xxx/drivers/net/bonding/bond_main.c +Index: tmp-linux-2.6.17/drivers/net/bonding/bond_main.c =================================================================== ---- tmp-xxx.orig/drivers/net/bonding/bond_main.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/bonding/bond_main.c 2006-11-27 10:52:42.000000000 +0000 -@@ -1145,8 +1145,7 @@ +--- tmp-linux-2.6.17.orig/drivers/net/bonding/bond_main.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/bonding/bond_main.c 2007-01-08 16:48:05.000000000 +0000 +@@ -1199,8 +1199,7 @@ } #define BOND_INTERSECT_FEATURES \ @@ -157,7 +156,7 @@ Index: tmp-xxx/drivers/net/bonding/bond_main.c /* * Compute the common dev->feature set available to all slaves. Some -@@ -1164,9 +1163,7 @@ +@@ -1218,9 +1217,7 @@ features &= (slave->dev->features & BOND_INTERSECT_FEATURES); if ((features & NETIF_F_SG) && @@ -168,7 +167,7 @@ Index: tmp-xxx/drivers/net/bonding/bond_main.c features &= ~NETIF_F_SG; /* -@@ -4147,7 +4144,7 @@ +@@ -4191,7 +4188,7 @@ */ bond_dev->features |= NETIF_F_VLAN_CHALLENGED; @@ -177,11 +176,11 @@ Index: tmp-xxx/drivers/net/bonding/bond_main.c * transmitting */ bond_dev->features |= NETIF_F_LLTX; -Index: tmp-xxx/drivers/net/chelsio/sge.c +Index: tmp-linux-2.6.17/drivers/net/chelsio/sge.c =================================================================== ---- tmp-xxx.orig/drivers/net/chelsio/sge.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/chelsio/sge.c 2006-11-27 10:52:42.000000000 +0000 -@@ -1419,7 +1419,7 @@ +--- tmp-linux-2.6.17.orig/drivers/net/chelsio/sge.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/chelsio/sge.c 2007-01-08 16:48:05.000000000 +0000 +@@ -1418,7 +1418,7 @@ struct cpl_tx_pkt *cpl; #ifdef NETIF_F_TSO @@ -190,7 +189,7 @@ Index: tmp-xxx/drivers/net/chelsio/sge.c int eth_type; struct cpl_tx_pkt_lso *hdr; -@@ -1434,7 +1434,7 @@ +@@ -1433,7 +1433,7 @@ hdr->ip_hdr_words = skb->nh.iph->ihl; hdr->tcp_hdr_words = skb->h.th->doff; hdr->eth_type_mss = htons(MK_ETH_TYPE_MSS(eth_type, @@ -199,11 +198,11 @@ Index: tmp-xxx/drivers/net/chelsio/sge.c hdr->len = htonl(skb->len - sizeof(*hdr)); cpl = (struct cpl_tx_pkt *)hdr; sge->stats.tx_lso_pkts++; -Index: tmp-xxx/drivers/net/e1000/e1000_main.c +Index: tmp-linux-2.6.17/drivers/net/e1000/e1000_main.c =================================================================== ---- tmp-xxx.orig/drivers/net/e1000/e1000_main.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/e1000/e1000_main.c 2006-11-27 10:52:42.000000000 +0000 -@@ -2526,7 +2526,7 @@ +--- tmp-linux-2.6.17.orig/drivers/net/e1000/e1000_main.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/e1000/e1000_main.c 2007-01-08 16:48:05.000000000 +0000 +@@ -2413,7 +2413,7 @@ uint8_t ipcss, ipcso, tucss, tucso, hdr_len; int err; @@ -212,7 +211,7 @@ Index: tmp-xxx/drivers/net/e1000/e1000_main.c if (skb_header_cloned(skb)) { err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); if (err) -@@ -2534,7 +2534,7 @@ +@@ -2421,7 +2421,7 @@ } hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); @@ -221,16 +220,16 @@ Index: tmp-xxx/drivers/net/e1000/e1000_main.c if (skb->protocol == ntohs(ETH_P_IP)) { skb->nh.iph->tot_len = 0; skb->nh.iph->check = 0; -@@ -2651,7 +2651,7 @@ +@@ -2538,7 +2538,7 @@ * tso gets written back prematurely before the data is fully - * DMAd to the controller */ + * DMA'd to the controller */ if (!skb->data_len && tx_ring->last_tx_tso && -- !skb_shinfo(skb)->tso_size) { -+ !skb_shinfo(skb)->gso_size) { +- !skb_shinfo(skb)->tso_size) { ++ !skb_shinfo(skb)->gso_size) { tx_ring->last_tx_tso = 0; size -= 4; } -@@ -2893,7 +2893,7 @@ +@@ -2776,7 +2776,7 @@ } #ifdef NETIF_F_TSO @@ -239,20 +238,20 @@ Index: tmp-xxx/drivers/net/e1000/e1000_main.c /* The controller does a simple calculation to * make sure there is enough room in the FIFO before * initiating the DMA for each buffer. The calc is: -@@ -2935,7 +2935,7 @@ +@@ -2826,7 +2826,7 @@ #ifdef NETIF_F_TSO /* Controller Erratum workaround */ if (!skb->data_len && tx_ring->last_tx_tso && -- !skb_shinfo(skb)->tso_size) -+ !skb_shinfo(skb)->gso_size) +- !skb_shinfo(skb)->tso_size) ++ !skb_shinfo(skb)->gso_size) count++; #endif -Index: tmp-xxx/drivers/net/forcedeth.c +Index: tmp-linux-2.6.17/drivers/net/forcedeth.c =================================================================== ---- tmp-xxx.orig/drivers/net/forcedeth.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/forcedeth.c 2006-11-27 10:52:42.000000000 +0000 -@@ -482,9 +482,9 @@ +--- tmp-linux-2.6.17.orig/drivers/net/forcedeth.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/forcedeth.c 2007-01-08 16:48:05.000000000 +0000 +@@ -533,9 +533,9 @@ * critical parts: * - rx is (pseudo-) lockless: it relies on the single-threading provided * by the arch code for interrupts. @@ -264,7 +263,7 @@ Index: tmp-xxx/drivers/net/forcedeth.c */ /* in dev: base, irq */ -@@ -1016,7 +1016,7 @@ +@@ -1213,7 +1213,7 @@ /* * nv_start_xmit: dev->hard_start_xmit function @@ -273,7 +272,7 @@ Index: tmp-xxx/drivers/net/forcedeth.c */ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) { -@@ -1105,8 +1105,8 @@ +@@ -1303,8 +1303,8 @@ np->tx_skbuff[nr] = skb; #ifdef NETIF_F_TSO @@ -284,7 +283,7 @@ Index: tmp-xxx/drivers/net/forcedeth.c else #endif tx_flags_extra = (skb->ip_summed == CHECKSUM_HW ? (NV_TX2_CHECKSUM_L3|NV_TX2_CHECKSUM_L4) : 0); -@@ -1203,7 +1203,7 @@ +@@ -1407,7 +1407,7 @@ /* * nv_tx_timeout: dev->tx_timeout function @@ -293,25 +292,25 @@ Index: tmp-xxx/drivers/net/forcedeth.c */ static void nv_tx_timeout(struct net_device *dev) { -@@ -1524,7 +1524,7 @@ +@@ -1737,7 +1737,7 @@ * Changing the MTU is a rare event, it shouldn't matter. */ - disable_irq(dev->irq); + nv_disable_irq(dev); - spin_lock_bh(&dev->xmit_lock); + netif_tx_lock_bh(dev); spin_lock(&np->lock); /* stop engines */ nv_stop_rx(dev); -@@ -1559,7 +1559,7 @@ +@@ -1768,7 +1768,7 @@ nv_start_rx(dev); nv_start_tx(dev); spin_unlock(&np->lock); - spin_unlock_bh(&dev->xmit_lock); + netif_tx_unlock_bh(dev); - enable_irq(dev->irq); + nv_enable_irq(dev); } return 0; -@@ -1594,7 +1594,7 @@ +@@ -1803,7 +1803,7 @@ memcpy(dev->dev_addr, macaddr->sa_data, ETH_ALEN); if (netif_running(dev)) { @@ -320,7 +319,7 @@ Index: tmp-xxx/drivers/net/forcedeth.c spin_lock_irq(&np->lock); /* stop rx engine */ -@@ -1606,7 +1606,7 @@ +@@ -1815,7 +1815,7 @@ /* restart rx engine */ nv_start_rx(dev); spin_unlock_irq(&np->lock); @@ -329,7 +328,7 @@ Index: tmp-xxx/drivers/net/forcedeth.c } else { nv_copy_mac_to_hw(dev); } -@@ -1615,7 +1615,7 @@ +@@ -1824,7 +1824,7 @@ /* * nv_set_multicast: dev->set_multicast function @@ -338,10 +337,10 @@ Index: tmp-xxx/drivers/net/forcedeth.c */ static void nv_set_multicast(struct net_device *dev) { -Index: tmp-xxx/drivers/net/hamradio/6pack.c +Index: tmp-linux-2.6.17/drivers/net/hamradio/6pack.c =================================================================== ---- tmp-xxx.orig/drivers/net/hamradio/6pack.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/hamradio/6pack.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/drivers/net/hamradio/6pack.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/hamradio/6pack.c 2007-01-08 16:48:05.000000000 +0000 @@ -308,9 +308,9 @@ { struct sockaddr_ax25 *sa = addr; @@ -366,10 +365,10 @@ Index: tmp-xxx/drivers/net/hamradio/6pack.c err = 0; break; -Index: tmp-xxx/drivers/net/hamradio/mkiss.c +Index: tmp-linux-2.6.17/drivers/net/hamradio/mkiss.c =================================================================== ---- tmp-xxx.orig/drivers/net/hamradio/mkiss.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/hamradio/mkiss.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/drivers/net/hamradio/mkiss.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/hamradio/mkiss.c 2007-01-08 16:48:05.000000000 +0000 @@ -357,9 +357,9 @@ { struct sockaddr_ax25 *sa = addr; @@ -394,10 +393,10 @@ Index: tmp-xxx/drivers/net/hamradio/mkiss.c err = 0; break; -Index: tmp-xxx/drivers/net/ifb.c +Index: tmp-linux-2.6.17/drivers/net/ifb.c =================================================================== ---- tmp-xxx.orig/drivers/net/ifb.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/ifb.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/drivers/net/ifb.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/ifb.c 2007-01-08 16:48:05.000000000 +0000 @@ -76,13 +76,13 @@ dp->st_task_enter++; if ((skb = skb_peek(&dp->tq)) == NULL) { @@ -436,10 +435,10 @@ Index: tmp-xxx/drivers/net/ifb.c } else { resched: dp->tasklet_pending = 1; -Index: tmp-xxx/drivers/net/irda/vlsi_ir.c +Index: tmp-linux-2.6.17/drivers/net/irda/vlsi_ir.c =================================================================== ---- tmp-xxx.orig/drivers/net/irda/vlsi_ir.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/irda/vlsi_ir.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/drivers/net/irda/vlsi_ir.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/irda/vlsi_ir.c 2007-01-08 16:48:05.000000000 +0000 @@ -959,7 +959,7 @@ || (now.tv_sec==ready.tv_sec && now.tv_usec>=ready.tv_usec)) break; @@ -449,11 +448,11 @@ Index: tmp-xxx/drivers/net/irda/vlsi_ir.c } } -Index: tmp-xxx/drivers/net/ixgb/ixgb_main.c +Index: tmp-linux-2.6.17/drivers/net/ixgb/ixgb_main.c =================================================================== ---- tmp-xxx.orig/drivers/net/ixgb/ixgb_main.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/ixgb/ixgb_main.c 2006-11-27 10:52:42.000000000 +0000 -@@ -1163,7 +1163,7 @@ +--- tmp-linux-2.6.17.orig/drivers/net/ixgb/ixgb_main.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/ixgb/ixgb_main.c 2007-01-08 16:48:05.000000000 +0000 +@@ -1168,7 +1168,7 @@ uint16_t ipcse, tucse, mss; int err; @@ -462,7 +461,7 @@ Index: tmp-xxx/drivers/net/ixgb/ixgb_main.c if (skb_header_cloned(skb)) { err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); if (err) -@@ -1171,7 +1171,7 @@ +@@ -1176,7 +1176,7 @@ } hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); @@ -471,10 +470,10 @@ Index: tmp-xxx/drivers/net/ixgb/ixgb_main.c skb->nh.iph->tot_len = 0; skb->nh.iph->check = 0; skb->h.th->check = ~csum_tcpudp_magic(skb->nh.iph->saddr, -Index: tmp-xxx/drivers/net/loopback.c +Index: tmp-linux-2.6.17/drivers/net/loopback.c =================================================================== ---- tmp-xxx.orig/drivers/net/loopback.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/loopback.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/drivers/net/loopback.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/loopback.c 2007-01-08 16:48:05.000000000 +0000 @@ -74,7 +74,7 @@ struct iphdr *iph = skb->nh.iph; struct tcphdr *th = (struct tcphdr*)(skb->nh.raw + (iph->ihl * 4)); @@ -493,24 +492,24 @@ Index: tmp-xxx/drivers/net/loopback.c BUG_ON(skb->protocol != htons(ETH_P_IP)); BUG_ON(skb->nh.iph->protocol != IPPROTO_TCP); -Index: tmp-xxx/drivers/net/mv643xx_eth.c +Index: tmp-linux-2.6.17/drivers/net/mv643xx_eth.c =================================================================== ---- tmp-xxx.orig/drivers/net/mv643xx_eth.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/mv643xx_eth.c 2006-11-27 10:52:42.000000000 +0000 -@@ -1107,7 +1107,7 @@ +--- tmp-linux-2.6.17.orig/drivers/net/mv643xx_eth.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/mv643xx_eth.c 2007-01-08 16:48:05.000000000 +0000 +@@ -1200,7 +1200,7 @@ + } - #ifdef MV643XX_CHECKSUM_OFFLOAD_TX if (has_tiny_unaligned_frags(skb)) { - if ((skb_linearize(skb, GFP_ATOMIC) != 0)) { + if (__skb_linearize(skb)) { stats->tx_dropped++; printk(KERN_DEBUG "%s: failed to linearize tiny " "unaligned fragment\n", dev->name); -Index: tmp-xxx/drivers/net/natsemi.c +Index: tmp-linux-2.6.17/drivers/net/natsemi.c =================================================================== ---- tmp-xxx.orig/drivers/net/natsemi.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/natsemi.c 2006-11-27 10:52:42.000000000 +0000 -@@ -323,12 +323,12 @@ +--- tmp-linux-2.6.17.orig/drivers/net/natsemi.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/natsemi.c 2007-01-08 16:48:05.000000000 +0000 +@@ -318,12 +318,12 @@ The rx process only runs in the interrupt handler. Access from outside the interrupt handler is only permitted after disable_irq(). @@ -525,10 +524,10 @@ Index: tmp-xxx/drivers/net/natsemi.c spin_lock_irq(&np->lock); IV. Notes -Index: tmp-xxx/drivers/net/r8169.c +Index: tmp-linux-2.6.17/drivers/net/r8169.c =================================================================== ---- tmp-xxx.orig/drivers/net/r8169.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/r8169.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/drivers/net/r8169.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/r8169.c 2007-01-08 16:48:05.000000000 +0000 @@ -2171,7 +2171,7 @@ static inline u32 rtl8169_tso_csum(struct sk_buff *skb, struct net_device *dev) { @@ -538,11 +537,11 @@ Index: tmp-xxx/drivers/net/r8169.c if (mss) return LargeSend | ((mss & MSSMask) << MSSShift); -Index: tmp-xxx/drivers/net/s2io.c +Index: tmp-linux-2.6.17/drivers/net/s2io.c =================================================================== ---- tmp-xxx.orig/drivers/net/s2io.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/s2io.c 2006-11-27 10:52:42.000000000 +0000 -@@ -3522,8 +3522,8 @@ +--- tmp-linux-2.6.17.orig/drivers/net/s2io.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/s2io.c 2007-01-08 16:48:05.000000000 +0000 +@@ -3564,8 +3564,8 @@ txdp->Control_1 = 0; txdp->Control_2 = 0; #ifdef NETIF_F_TSO @@ -553,7 +552,7 @@ Index: tmp-xxx/drivers/net/s2io.c txdp->Control_1 |= TXD_TCP_LSO_EN; txdp->Control_1 |= TXD_TCP_LSO_MSS(mss); } -@@ -3543,10 +3543,10 @@ +@@ -3585,10 +3585,10 @@ } frg_len = skb->len - skb->data_len; @@ -566,7 +565,7 @@ Index: tmp-xxx/drivers/net/s2io.c ufo_size &= ~7; txdp->Control_1 |= TXD_UFO_EN; txdp->Control_1 |= TXD_UFO_MSS(ufo_size); -@@ -3572,7 +3572,7 @@ +@@ -3614,7 +3614,7 @@ txdp->Host_Control = (unsigned long) skb; txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len); @@ -575,7 +574,7 @@ Index: tmp-xxx/drivers/net/s2io.c txdp->Control_1 |= TXD_UFO_EN; frg_cnt = skb_shinfo(skb)->nr_frags; -@@ -3587,12 +3587,12 @@ +@@ -3629,12 +3629,12 @@ (sp->pdev, frag->page, frag->page_offset, frag->size, PCI_DMA_TODEVICE); txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); @@ -590,7 +589,7 @@ Index: tmp-xxx/drivers/net/s2io.c frg_cnt++; /* as Txd0 was used for inband header */ tx_fifo = mac_control->tx_FIFO_start[queue]; -@@ -3606,7 +3606,7 @@ +@@ -3648,7 +3648,7 @@ if (mss) val64 |= TX_FIFO_SPECIAL_FUNC; #endif @@ -599,11 +598,11 @@ Index: tmp-xxx/drivers/net/s2io.c val64 |= TX_FIFO_SPECIAL_FUNC; writeq(val64, &tx_fifo->List_Control); -Index: tmp-xxx/drivers/net/sky2.c +Index: tmp-linux-2.6.17/drivers/net/sky2.c =================================================================== ---- tmp-xxx.orig/drivers/net/sky2.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/sky2.c 2006-11-27 10:52:42.000000000 +0000 -@@ -1141,7 +1141,7 @@ +--- tmp-linux-2.6.17.orig/drivers/net/sky2.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/sky2.c 2007-01-08 16:48:05.000000000 +0000 +@@ -1160,7 +1160,7 @@ count = sizeof(dma_addr_t) / sizeof(u32); count += skb_shinfo(skb)->nr_frags * count; @@ -612,7 +611,7 @@ Index: tmp-xxx/drivers/net/sky2.c ++count; if (skb->ip_summed == CHECKSUM_HW) -@@ -1213,7 +1213,7 @@ +@@ -1232,7 +1232,7 @@ } /* Check for TCP Segmentation Offload */ @@ -621,11 +620,20 @@ Index: tmp-xxx/drivers/net/sky2.c if (mss != 0) { /* just drop the packet if non-linear expansion fails */ if (skb_header_cloned(skb) && -Index: tmp-xxx/drivers/net/tg3.c +Index: tmp-linux-2.6.17/drivers/net/tg3.c =================================================================== ---- tmp-xxx.orig/drivers/net/tg3.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/tg3.c 2006-11-27 10:52:42.000000000 +0000 -@@ -3664,7 +3664,7 @@ +--- tmp-linux-2.6.17.orig/drivers/net/tg3.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/tg3.c 2007-01-08 16:48:53.000000000 +0000 +@@ -3743,7 +3743,7 @@ + #if TG3_TSO_SUPPORT != 0 + mss = 0; + if (skb->len > (tp->dev->mtu + ETH_HLEN) && +- (mss = skb_shinfo(skb)->tso_size) != 0) { ++ (mss = skb_shinfo(skb)->gso_size) != 0) { + int tcp_opt_len, ip_tcp_len; + + if (skb_header_cloned(skb) && +@@ -3871,7 +3871,7 @@ #if TG3_TSO_SUPPORT != 0 mss = 0; if (skb->len > (tp->dev->mtu + ETH_HLEN) && @@ -634,10 +642,10 @@ Index: tmp-xxx/drivers/net/tg3.c int tcp_opt_len, ip_tcp_len; if (skb_header_cloned(skb) && -Index: tmp-xxx/drivers/net/tulip/winbond-840.c +Index: tmp-linux-2.6.17/drivers/net/tulip/winbond-840.c =================================================================== ---- tmp-xxx.orig/drivers/net/tulip/winbond-840.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/tulip/winbond-840.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/drivers/net/tulip/winbond-840.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/tulip/winbond-840.c 2007-01-08 16:48:05.000000000 +0000 @@ -1605,11 +1605,11 @@ * - get_stats: * spin_lock_irq(np->lock), doesn't touch hw if not present @@ -666,10 +674,10 @@ Index: tmp-xxx/drivers/net/tulip/winbond-840.c np->stats.rx_missed_errors += ioread32(ioaddr + RxMissed) & 0xffff; -Index: tmp-xxx/drivers/net/typhoon.c +Index: tmp-linux-2.6.17/drivers/net/typhoon.c =================================================================== ---- tmp-xxx.orig/drivers/net/typhoon.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/typhoon.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/drivers/net/typhoon.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/typhoon.c 2007-01-08 16:48:05.000000000 +0000 @@ -340,7 +340,7 @@ #endif @@ -679,11 +687,11 @@ Index: tmp-xxx/drivers/net/typhoon.c #define TSO_NUM_DESCRIPTORS 2 #define TSO_OFFLOAD_ON TYPHOON_OFFLOAD_TCP_SEGMENT #else -Index: tmp-xxx/drivers/net/via-velocity.c +Index: tmp-linux-2.6.17/drivers/net/via-velocity.c =================================================================== ---- tmp-xxx.orig/drivers/net/via-velocity.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/via-velocity.c 2006-11-27 10:52:42.000000000 +0000 -@@ -1905,6 +1905,13 @@ +--- tmp-linux-2.6.17.orig/drivers/net/via-velocity.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/via-velocity.c 2007-01-08 16:48:05.000000000 +0000 +@@ -1899,6 +1899,13 @@ int pktlen = skb->len; @@ -697,7 +705,7 @@ Index: tmp-xxx/drivers/net/via-velocity.c spin_lock_irqsave(&vptr->lock, flags); index = vptr->td_curr[qnum]; -@@ -1920,8 +1927,6 @@ +@@ -1914,8 +1921,6 @@ */ if (pktlen < ETH_ZLEN) { /* Cannot occur until ZC support */ @@ -706,7 +714,7 @@ Index: tmp-xxx/drivers/net/via-velocity.c pktlen = ETH_ZLEN; memcpy(tdinfo->buf, skb->data, skb->len); memset(tdinfo->buf + skb->len, 0, ETH_ZLEN - skb->len); -@@ -1939,7 +1944,6 @@ +@@ -1933,7 +1938,6 @@ int nfrags = skb_shinfo(skb)->nr_frags; tdinfo->skb = skb; if (nfrags > 6) { @@ -714,11 +722,11 @@ Index: tmp-xxx/drivers/net/via-velocity.c memcpy(tdinfo->buf, skb->data, skb->len); tdinfo->skb_dma[0] = tdinfo->buf_dma; td_ptr->tdesc0.pktsize = -Index: tmp-xxx/drivers/net/wireless/orinoco.c +Index: tmp-linux-2.6.17/drivers/net/wireless/orinoco.c =================================================================== ---- tmp-xxx.orig/drivers/net/wireless/orinoco.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/net/wireless/orinoco.c 2006-11-27 10:52:42.000000000 +0000 -@@ -1835,7 +1835,9 @@ +--- tmp-linux-2.6.17.orig/drivers/net/wireless/orinoco.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/net/wireless/orinoco.c 2007-01-08 16:48:05.000000000 +0000 +@@ -1833,7 +1833,9 @@ /* Set promiscuity / multicast*/ priv->promiscuous = 0; priv->mc_count = 0; @@ -729,11 +737,11 @@ Index: tmp-xxx/drivers/net/wireless/orinoco.c return 0; } -Index: tmp-xxx/drivers/s390/net/qeth_eddp.c +Index: tmp-linux-2.6.17/drivers/s390/net/qeth_eddp.c =================================================================== ---- tmp-xxx.orig/drivers/s390/net/qeth_eddp.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/s390/net/qeth_eddp.c 2006-11-27 10:52:42.000000000 +0000 -@@ -421,7 +421,7 @@ +--- tmp-linux-2.6.17.orig/drivers/s390/net/qeth_eddp.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/s390/net/qeth_eddp.c 2007-01-08 16:48:05.000000000 +0000 +@@ -420,7 +420,7 @@ } tcph = eddp->skb->h.th; while (eddp->skb_offset < eddp->skb->len) { @@ -742,8 +750,8 @@ Index: tmp-xxx/drivers/s390/net/qeth_eddp.c (int)(eddp->skb->len - eddp->skb_offset)); /* prepare qdio hdr */ if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2){ -@@ -516,20 +516,20 @@ - +@@ -515,20 +515,20 @@ + QETH_DBF_TEXT(trace, 5, "eddpcanp"); /* can we put multiple skbs in one page? */ - skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->tso_size + hdr_len); @@ -768,11 +776,20 @@ Index: tmp-xxx/drivers/s390/net/qeth_eddp.c } static inline struct qeth_eddp_context * -Index: tmp-xxx/drivers/s390/net/qeth_main.c +Index: tmp-linux-2.6.17/drivers/s390/net/qeth_main.c =================================================================== ---- tmp-xxx.orig/drivers/s390/net/qeth_main.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/s390/net/qeth_main.c 2006-11-27 10:52:42.000000000 +0000 -@@ -4454,7 +4454,7 @@ +--- tmp-linux-2.6.17.orig/drivers/s390/net/qeth_main.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/s390/net/qeth_main.c 2007-01-08 16:48:05.000000000 +0000 +@@ -4417,7 +4417,7 @@ + struct qeth_eddp_context *ctx = NULL; + int tx_bytes = skb->len; + unsigned short nr_frags = skb_shinfo(skb)->nr_frags; +- unsigned short tso_size = skb_shinfo(skb)->tso_size; ++ unsigned short gso_size = skb_shinfo(skb)->gso_size; + int rc; + + QETH_DBF_TEXT(trace, 6, "sendpkt"); +@@ -4453,7 +4453,7 @@ queue = card->qdio.out_qs [qeth_get_priority_queue(card, skb, ipv, cast_type)]; @@ -781,19 +798,19 @@ Index: tmp-xxx/drivers/s390/net/qeth_main.c large_send = card->options.large_send; /*are we able to do TSO ? If so ,prepare and send it from here */ -@@ -4501,7 +4501,7 @@ +@@ -4500,7 +4500,7 @@ card->stats.tx_packets++; - card->stats.tx_bytes += skb->len; + card->stats.tx_bytes += tx_bytes; #ifdef CONFIG_QETH_PERF_STATS -- if (skb_shinfo(skb)->tso_size && -+ if (skb_shinfo(skb)->gso_size && +- if (tso_size && ++ if (gso_size && !(large_send == QETH_LARGE_SEND_NO)) { - card->perf_stats.large_send_bytes += skb->len; + card->perf_stats.large_send_bytes += tx_bytes; card->perf_stats.large_send_cnt++; -Index: tmp-xxx/drivers/s390/net/qeth_tso.h +Index: tmp-linux-2.6.17/drivers/s390/net/qeth_tso.h =================================================================== ---- tmp-xxx.orig/drivers/s390/net/qeth_tso.h 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/drivers/s390/net/qeth_tso.h 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/drivers/s390/net/qeth_tso.h 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/drivers/s390/net/qeth_tso.h 2007-01-08 16:48:05.000000000 +0000 @@ -51,7 +51,7 @@ hdr->ext.hdr_version = 1; hdr->ext.hdr_len = 28; @@ -803,10 +820,10 @@ Index: tmp-xxx/drivers/s390/net/qeth_tso.h hdr->ext.dg_hdr_len = (__u16)(iph->ihl*4 + tcph->doff*4); hdr->ext.payload_len = (__u16)(skb->len - hdr->ext.dg_hdr_len - sizeof(struct qeth_hdr_tso)); -Index: tmp-xxx/include/linux/ethtool.h +Index: tmp-linux-2.6.17/include/linux/ethtool.h =================================================================== ---- tmp-xxx.orig/include/linux/ethtool.h 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/include/linux/ethtool.h 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/include/linux/ethtool.h 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/include/linux/ethtool.h 2007-01-08 16:48:05.000000000 +0000 @@ -408,6 +408,8 @@ #define ETHTOOL_GPERMADDR 0x00000020 /* Get permanent hardware address */ #define ETHTOOL_GUFO 0x00000021 /* Get UFO enable (ethtool_value) */ @@ -816,21 +833,19 @@ Index: tmp-xxx/include/linux/ethtool.h /* compatibility with older code */ #define SPARC_ETH_GSET ETHTOOL_GSET -Index: tmp-xxx/include/linux/netdevice.h +Index: tmp-linux-2.6.17/include/linux/netdevice.h =================================================================== ---- tmp-xxx.orig/include/linux/netdevice.h 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/include/linux/netdevice.h 2006-11-27 10:52:42.000000000 +0000 -@@ -230,7 +230,8 @@ - __LINK_STATE_SCHED, - __LINK_STATE_NOCARRIER, +--- tmp-linux-2.6.17.orig/include/linux/netdevice.h 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/include/linux/netdevice.h 2007-01-08 16:48:05.000000000 +0000 +@@ -232,6 +232,7 @@ __LINK_STATE_RX_SCHED, -- __LINK_STATE_LINKWATCH_PENDING -+ __LINK_STATE_LINKWATCH_PENDING, + __LINK_STATE_LINKWATCH_PENDING, + __LINK_STATE_DORMANT, + __LINK_STATE_QDISC_RUNNING, }; -@@ -306,9 +307,17 @@ +@@ -307,9 +308,17 @@ #define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */ #define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ @@ -850,7 +865,7 @@ Index: tmp-xxx/include/linux/netdevice.h struct net_device *next_sched; -@@ -394,6 +403,9 @@ +@@ -398,6 +407,9 @@ struct list_head qdisc_list; unsigned long tx_queue_len; /* Max frames per queue allowed */ @@ -860,7 +875,7 @@ Index: tmp-xxx/include/linux/netdevice.h /* ingress path synchronizer */ spinlock_t ingress_lock; struct Qdisc *qdisc_ingress; -@@ -402,7 +414,7 @@ +@@ -406,7 +418,7 @@ * One part is mostly used on xmit path (device) */ /* hard_start_xmit synchronizer */ @@ -869,7 +884,7 @@ Index: tmp-xxx/include/linux/netdevice.h /* cpu id of processor entered to hard_start_xmit or -1, if nobody entered there. */ -@@ -527,6 +539,8 @@ +@@ -532,6 +544,8 @@ struct net_device *, struct packet_type *, struct net_device *); @@ -878,7 +893,7 @@ Index: tmp-xxx/include/linux/netdevice.h void *af_packet_priv; struct list_head list; }; -@@ -693,7 +707,8 @@ +@@ -679,7 +693,8 @@ extern int dev_set_mtu(struct net_device *, int); extern int dev_set_mac_address(struct net_device *, struct sockaddr *); @@ -888,7 +903,7 @@ Index: tmp-xxx/include/linux/netdevice.h extern void dev_init(void); -@@ -900,11 +915,43 @@ +@@ -889,11 +904,43 @@ clear_bit(__LINK_STATE_RX_SCHED, &dev->state); } @@ -934,7 +949,7 @@ Index: tmp-xxx/include/linux/netdevice.h } /* These functions live elsewhere (drivers/net/net_init.c, but related) */ -@@ -932,6 +979,7 @@ +@@ -921,6 +968,7 @@ extern int weight_p; extern int netdev_set_master(struct net_device *dev, struct net_device *master); extern int skb_checksum_help(struct sk_buff *skb, int inward); @@ -942,7 +957,7 @@ Index: tmp-xxx/include/linux/netdevice.h #ifdef CONFIG_BUG extern void netdev_rx_csum_fault(struct net_device *dev); #else -@@ -951,6 +999,18 @@ +@@ -940,6 +988,18 @@ extern void linkwatch_run_queue(void); @@ -961,10 +976,10 @@ Index: tmp-xxx/include/linux/netdevice.h #endif /* __KERNEL__ */ #endif /* _LINUX_DEV_H */ -Index: tmp-xxx/include/linux/skbuff.h +Index: tmp-linux-2.6.17/include/linux/skbuff.h =================================================================== ---- tmp-xxx.orig/include/linux/skbuff.h 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/include/linux/skbuff.h 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/include/linux/skbuff.h 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/include/linux/skbuff.h 2007-01-08 16:48:05.000000000 +0000 @@ -134,9 +134,10 @@ struct skb_shared_info { atomic_t dataref; @@ -994,7 +1009,7 @@ Index: tmp-xxx/include/linux/skbuff.h /** * struct sk_buff - socket buffer * @next: Next buffer in list -@@ -1148,18 +1157,34 @@ +@@ -1161,18 +1170,34 @@ return 0; } @@ -1033,7 +1048,7 @@ Index: tmp-xxx/include/linux/skbuff.h } /** -@@ -1254,6 +1279,7 @@ +@@ -1269,6 +1294,7 @@ struct sk_buff *skb1, const u32 len); extern void skb_release_data(struct sk_buff *skb); @@ -1041,10 +1056,10 @@ Index: tmp-xxx/include/linux/skbuff.h static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, int len, void *buffer) -Index: tmp-xxx/include/net/pkt_sched.h +Index: tmp-linux-2.6.17/include/net/pkt_sched.h =================================================================== ---- tmp-xxx.orig/include/net/pkt_sched.h 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/include/net/pkt_sched.h 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/include/net/pkt_sched.h 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/include/net/pkt_sched.h 2007-01-08 16:48:05.000000000 +0000 @@ -218,12 +218,13 @@ struct rtattr *tab); extern void qdisc_put_rtab(struct qdisc_rate_table *tab); @@ -1062,10 +1077,10 @@ Index: tmp-xxx/include/net/pkt_sched.h } extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, -Index: tmp-xxx/include/net/protocol.h +Index: tmp-linux-2.6.17/include/net/protocol.h =================================================================== ---- tmp-xxx.orig/include/net/protocol.h 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/include/net/protocol.h 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/include/net/protocol.h 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/include/net/protocol.h 2007-01-08 16:48:05.000000000 +0000 @@ -37,6 +37,8 @@ struct net_protocol { int (*handler)(struct sk_buff *skb); @@ -1075,11 +1090,11 @@ Index: tmp-xxx/include/net/protocol.h int no_policy; }; -Index: tmp-xxx/include/net/sock.h +Index: tmp-linux-2.6.17/include/net/sock.h =================================================================== ---- tmp-xxx.orig/include/net/sock.h 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/include/net/sock.h 2006-11-27 10:52:42.000000000 +0000 -@@ -1064,9 +1064,13 @@ +--- tmp-linux-2.6.17.orig/include/net/sock.h 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/include/net/sock.h 2007-01-08 16:48:05.000000000 +0000 +@@ -1032,9 +1032,13 @@ { __sk_dst_set(sk, dst); sk->sk_route_caps = dst->dev->features; @@ -1093,11 +1108,11 @@ Index: tmp-xxx/include/net/sock.h } } -Index: tmp-xxx/include/net/tcp.h +Index: tmp-linux-2.6.17/include/net/tcp.h =================================================================== ---- tmp-xxx.orig/include/net/tcp.h 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/include/net/tcp.h 2006-11-27 10:52:42.000000000 +0000 -@@ -552,13 +552,13 @@ +--- tmp-linux-2.6.17.orig/include/net/tcp.h 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/include/net/tcp.h 2007-01-08 16:48:05.000000000 +0000 +@@ -565,13 +565,13 @@ */ static inline int tcp_skb_pcount(const struct sk_buff *skb) { @@ -1113,7 +1128,7 @@ Index: tmp-xxx/include/net/tcp.h } static inline void tcp_dec_pcount_approx(__u32 *count, -@@ -1063,6 +1063,8 @@ +@@ -1076,6 +1076,8 @@ extern int tcp_v4_destroy_sock(struct sock *sk); @@ -1122,12 +1137,12 @@ Index: tmp-xxx/include/net/tcp.h #ifdef CONFIG_PROC_FS extern int tcp4_proc_init(void); extern void tcp4_proc_exit(void); -Index: tmp-xxx/net/atm/clip.c +Index: tmp-linux-2.6.17/net/atm/clip.c =================================================================== ---- tmp-xxx.orig/net/atm/clip.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/atm/clip.c 2006-11-27 10:52:42.000000000 +0000 -@@ -101,7 +101,7 @@ - printk(KERN_CRIT "!clip_vcc->entry (clip_vcc %p)\n",clip_vcc); +--- tmp-linux-2.6.17.orig/net/atm/clip.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/atm/clip.c 2007-01-08 16:48:05.000000000 +0000 +@@ -98,7 +98,7 @@ + printk(KERN_CRIT "!clip_vcc->entry (clip_vcc %p)\n", clip_vcc); return; } - spin_lock_bh(&entry->neigh->dev->xmit_lock); /* block clip_start_xmit() */ @@ -1135,20 +1150,20 @@ Index: tmp-xxx/net/atm/clip.c entry->neigh->used = jiffies; for (walk = &entry->vccs; *walk; walk = &(*walk)->next) if (*walk == clip_vcc) { -@@ -125,7 +125,7 @@ +@@ -122,7 +122,7 @@ printk(KERN_CRIT "ATMARP: unlink_clip_vcc failed (entry %p, vcc " - "0x%p)\n",entry,clip_vcc); - out: + "0x%p)\n", entry, clip_vcc); + out: - spin_unlock_bh(&entry->neigh->dev->xmit_lock); + netif_tx_unlock_bh(entry->neigh->dev); } /* The neighbour entry n->lock is held. */ -Index: tmp-xxx/net/bridge/br_device.c +Index: tmp-linux-2.6.17/net/bridge/br_device.c =================================================================== ---- tmp-xxx.orig/net/bridge/br_device.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/bridge/br_device.c 2006-11-27 10:52:42.000000000 +0000 -@@ -146,9 +146,9 @@ +--- tmp-linux-2.6.17.orig/net/bridge/br_device.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/bridge/br_device.c 2007-01-08 16:48:05.000000000 +0000 +@@ -145,9 +145,9 @@ struct net_bridge *br = netdev_priv(dev); if (data) @@ -1160,7 +1175,7 @@ Index: tmp-xxx/net/bridge/br_device.c br_features_recompute(br); return 0; -@@ -185,6 +185,6 @@ +@@ -184,6 +184,6 @@ dev->set_mac_address = br_set_mac_address; dev->priv_flags = IFF_EBRIDGE; @@ -1169,24 +1184,24 @@ Index: tmp-xxx/net/bridge/br_device.c + dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | + NETIF_F_TSO | NETIF_F_NO_CSUM | NETIF_F_GSO_ROBUST; } -Index: tmp-xxx/net/bridge/br_forward.c +Index: tmp-linux-2.6.17/net/bridge/br_forward.c =================================================================== ---- tmp-xxx.orig/net/bridge/br_forward.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/bridge/br_forward.c 2006-11-27 10:52:42.000000000 +0000 -@@ -32,7 +32,7 @@ +--- tmp-linux-2.6.17.orig/net/bridge/br_forward.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/bridge/br_forward.c 2007-01-08 16:48:05.000000000 +0000 +@@ -38,7 +38,7 @@ int br_dev_queue_push_xmit(struct sk_buff *skb) { /* drop mtu oversized packets except tso */ -- if (skb->len > skb->dev->mtu && !skb_shinfo(skb)->tso_size) -+ if (skb->len > skb->dev->mtu && !skb_shinfo(skb)->gso_size) +- if (packet_length(skb) > skb->dev->mtu && !skb_shinfo(skb)->tso_size) ++ if (packet_length(skb) > skb->dev->mtu && !skb_shinfo(skb)->gso_size) kfree_skb(skb); else { #ifdef CONFIG_BRIDGE_NETFILTER -Index: tmp-xxx/net/bridge/br_if.c +Index: tmp-linux-2.6.17/net/bridge/br_if.c =================================================================== ---- tmp-xxx.orig/net/bridge/br_if.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/bridge/br_if.c 2006-11-27 10:52:42.000000000 +0000 -@@ -385,17 +385,28 @@ +--- tmp-linux-2.6.17.orig/net/bridge/br_if.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/bridge/br_if.c 2007-01-08 16:48:05.000000000 +0000 +@@ -372,17 +372,28 @@ struct net_bridge_port *p; unsigned long features, checksum; @@ -1221,11 +1236,11 @@ Index: tmp-xxx/net/bridge/br_if.c } /* called with RTNL */ -Index: tmp-xxx/net/bridge/br_netfilter.c +Index: tmp-linux-2.6.17/net/bridge/br_netfilter.c =================================================================== ---- tmp-xxx.orig/net/bridge/br_netfilter.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/bridge/br_netfilter.c 2006-11-27 10:52:42.000000000 +0000 -@@ -743,7 +743,7 @@ +--- tmp-linux-2.6.17.orig/net/bridge/br_netfilter.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/bridge/br_netfilter.c 2007-01-08 16:48:05.000000000 +0000 +@@ -769,7 +769,7 @@ { if (skb->protocol == htons(ETH_P_IP) && skb->len > skb->dev->mtu && @@ -1234,19 +1249,19 @@ Index: tmp-xxx/net/bridge/br_netfilter.c return ip_fragment(skb, br_dev_queue_push_xmit); else return br_dev_queue_push_xmit(skb); -Index: tmp-xxx/net/core/dev.c +Index: tmp-linux-2.6.17/net/core/dev.c =================================================================== ---- tmp-xxx.orig/net/core/dev.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/core/dev.c 2006-11-27 10:57:31.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/core/dev.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/core/dev.c 2007-01-08 16:48:05.000000000 +0000 @@ -115,6 +115,7 @@ #include <net/iw_handler.h> - #endif /* CONFIG_NET_RADIO */ #include <asm/current.h> + #include <linux/audit.h> +#include <linux/err.h> /* * The list of packet types we will receive (as opposed to discard) -@@ -1032,7 +1033,7 @@ +@@ -1041,7 +1042,7 @@ * taps currently in use. */ @@ -1255,7 +1270,7 @@ Index: tmp-xxx/net/core/dev.c { struct packet_type *ptype; -@@ -1106,6 +1107,45 @@ +@@ -1179,6 +1180,45 @@ return ret; } @@ -1301,7 +1316,7 @@ Index: tmp-xxx/net/core/dev.c /* Take action when hardware reception checksum errors are detected. */ #ifdef CONFIG_BUG void netdev_rx_csum_fault(struct net_device *dev) -@@ -1142,76 +1182,107 @@ +@@ -1215,75 +1255,107 @@ #define illegal_highdma(dev, skb) (0) #endif @@ -1343,7 +1358,6 @@ Index: tmp-xxx/net/core/dev.c - atomic_set(&ninfo->dataref, 1); - ninfo->tso_size = skb_shinfo(skb)->tso_size; - ninfo->tso_segs = skb_shinfo(skb)->tso_segs; -- ninfo->ufo_size = skb_shinfo(skb)->ufo_size; - ninfo->nr_frags = 0; - ninfo->frag_list = NULL; - @@ -1466,7 +1480,7 @@ Index: tmp-xxx/net/core/dev.c } \ } -@@ -1247,9 +1318,13 @@ +@@ -1319,9 +1391,13 @@ struct Qdisc *q; int rc = -ENOMEM; @@ -1481,7 +1495,7 @@ Index: tmp-xxx/net/core/dev.c goto out_kfree_skb; /* Fragmented skb is linearized if device does not support SG, -@@ -1258,25 +1333,26 @@ +@@ -1330,25 +1406,26 @@ */ if (skb_shinfo(skb)->nr_frags && (!(dev->features & NETIF_F_SG) || illegal_highdma(dev, skb)) && @@ -1511,7 +1525,7 @@ Index: tmp-xxx/net/core/dev.c /* Updates of qdisc are serialized by queue_lock. * The struct Qdisc which is pointed to by qdisc is now a -@@ -1310,8 +1386,8 @@ +@@ -1382,8 +1459,8 @@ /* The device has no queue. Common case for software devices: loopback, all the sorts of tunnels... @@ -1522,7 +1536,7 @@ Index: tmp-xxx/net/core/dev.c counters.) However, it is possible, that they rely on protection made by us here. -@@ -1327,11 +1403,8 @@ +@@ -1399,11 +1476,8 @@ HARD_TX_LOCK(dev, cpu); if (!netif_queue_stopped(dev)) { @@ -1535,7 +1549,7 @@ Index: tmp-xxx/net/core/dev.c HARD_TX_UNLOCK(dev); goto out; } -@@ -1350,13 +1423,13 @@ +@@ -1422,13 +1496,13 @@ } rc = -ENETDOWN; @@ -1551,7 +1565,7 @@ Index: tmp-xxx/net/core/dev.c return rc; } -@@ -2671,7 +2744,7 @@ +@@ -2785,7 +2859,7 @@ BUG_ON(dev->reg_state != NETREG_UNINITIALIZED); spin_lock_init(&dev->queue_lock); @@ -1560,7 +1574,7 @@ Index: tmp-xxx/net/core/dev.c dev->xmit_lock_owner = -1; #ifdef CONFIG_NET_CLS_ACT spin_lock_init(&dev->ingress_lock); -@@ -2715,9 +2788,7 @@ +@@ -2829,9 +2903,7 @@ /* Fix illegal SG+CSUM combinations. */ if ((dev->features & NETIF_F_SG) && @@ -1571,7 +1585,7 @@ Index: tmp-xxx/net/core/dev.c printk("%s: Dropping NETIF_F_SG since no checksum feature.\n", dev->name); dev->features &= ~NETIF_F_SG; -@@ -3269,7 +3340,6 @@ +@@ -3371,7 +3443,6 @@ EXPORT_SYMBOL(__dev_get_by_index); EXPORT_SYMBOL(__dev_get_by_name); EXPORT_SYMBOL(__dev_remove_pack); @@ -1579,10 +1593,10 @@ Index: tmp-xxx/net/core/dev.c EXPORT_SYMBOL(dev_valid_name); EXPORT_SYMBOL(dev_add_pack); EXPORT_SYMBOL(dev_alloc_name); -Index: tmp-xxx/net/core/dev_mcast.c +Index: tmp-linux-2.6.17/net/core/dev_mcast.c =================================================================== ---- tmp-xxx.orig/net/core/dev_mcast.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/core/dev_mcast.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/core/dev_mcast.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/core/dev_mcast.c 2007-01-08 16:48:05.000000000 +0000 @@ -62,7 +62,7 @@ * Device mc lists are changed by bh at least if IPv6 is enabled, * so that it must be bh protected. @@ -1697,10 +1711,10 @@ Index: tmp-xxx/net/core/dev_mcast.c return 0; } -Index: tmp-xxx/net/core/ethtool.c +Index: tmp-linux-2.6.17/net/core/ethtool.c =================================================================== ---- tmp-xxx.orig/net/core/ethtool.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/core/ethtool.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/core/ethtool.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/core/ethtool.c 2007-01-08 16:48:05.000000000 +0000 @@ -30,7 +30,7 @@ u32 ethtool_op_get_tx_csum(struct net_device *dev) @@ -1730,7 +1744,7 @@ Index: tmp-xxx/net/core/ethtool.c if (!dev->ethtool_ops->get_tso) return -EOPNOTSUPP; -@@ -616,6 +614,29 @@ +@@ -615,6 +613,29 @@ return dev->ethtool_ops->set_ufo(dev, edata.data); } @@ -1760,7 +1774,7 @@ Index: tmp-xxx/net/core/ethtool.c static int ethtool_self_test(struct net_device *dev, char __user *useraddr) { struct ethtool_test test; -@@ -907,6 +928,12 @@ +@@ -906,6 +927,12 @@ case ETHTOOL_SUFO: rc = ethtool_set_ufo(dev, useraddr); break; @@ -1773,10 +1787,10 @@ Index: tmp-xxx/net/core/ethtool.c default: rc = -EOPNOTSUPP; } -Index: tmp-xxx/net/core/netpoll.c +Index: tmp-linux-2.6.17/net/core/netpoll.c =================================================================== ---- tmp-xxx.orig/net/core/netpoll.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/core/netpoll.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/core/netpoll.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/core/netpoll.c 2007-01-08 16:48:05.000000000 +0000 @@ -273,24 +273,21 @@ do { @@ -1805,33 +1819,33 @@ Index: tmp-xxx/net/core/netpoll.c /* success */ if(!status) { -Index: tmp-xxx/net/core/pktgen.c +Index: tmp-linux-2.6.17/net/core/pktgen.c =================================================================== ---- tmp-xxx.orig/net/core/pktgen.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/core/pktgen.c 2006-11-27 10:52:42.000000000 +0000 -@@ -2586,7 +2586,7 @@ +--- tmp-linux-2.6.17.orig/net/core/pktgen.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/core/pktgen.c 2007-01-08 16:48:05.000000000 +0000 +@@ -2897,7 +2897,7 @@ } } - + - spin_lock_bh(&odev->xmit_lock); + netif_tx_lock_bh(odev); if (!netif_queue_stopped(odev)) { atomic_inc(&(pkt_dev->skb->users)); -@@ -2631,7 +2631,7 @@ +@@ -2942,7 +2942,7 @@ pkt_dev->next_tx_ns = 0; - } + } - spin_unlock_bh(&odev->xmit_lock); + netif_tx_unlock_bh(odev); - + /* If pkt_dev->count is zero, then run forever */ if ((pkt_dev->count != 0) && (pkt_dev->sofar >= pkt_dev->count)) { -Index: tmp-xxx/net/core/skbuff.c +Index: tmp-linux-2.6.17/net/core/skbuff.c =================================================================== ---- tmp-xxx.orig/net/core/skbuff.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/core/skbuff.c 2006-11-27 10:58:31.000000000 +0000 -@@ -164,9 +164,9 @@ +--- tmp-linux-2.6.17.orig/net/core/skbuff.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/core/skbuff.c 2007-01-08 16:48:05.000000000 +0000 +@@ -172,9 +172,9 @@ shinfo = skb_shinfo(skb); atomic_set(&shinfo->dataref, 1); shinfo->nr_frags = 0; @@ -1844,35 +1858,33 @@ Index: tmp-xxx/net/core/skbuff.c shinfo->ip6_frag_id = 0; shinfo->frag_list = NULL; -@@ -230,9 +230,9 @@ +@@ -238,8 +238,9 @@ atomic_set(&(skb_shinfo(skb)->dataref), 1); skb_shinfo(skb)->nr_frags = 0; - skb_shinfo(skb)->tso_size = 0; - skb_shinfo(skb)->tso_segs = 0; -- skb_shinfo(skb)->ufo_size = 0; + skb_shinfo(skb)->gso_size = 0; + skb_shinfo(skb)->gso_segs = 0; + skb_shinfo(skb)->gso_type = 0; skb_shinfo(skb)->frag_list = NULL; out: return skb; -@@ -507,9 +507,9 @@ +@@ -527,8 +528,9 @@ new->tc_index = old->tc_index; #endif atomic_set(&new->users, 1); - skb_shinfo(new)->tso_size = skb_shinfo(old)->tso_size; - skb_shinfo(new)->tso_segs = skb_shinfo(old)->tso_segs; -- skb_shinfo(new)->ufo_size = skb_shinfo(old)->ufo_size; + skb_shinfo(new)->gso_size = skb_shinfo(old)->gso_size; + skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs; + skb_shinfo(new)->gso_type = skb_shinfo(old)->gso_type; } /** -@@ -1822,6 +1822,133 @@ - return 0; - } +@@ -1826,6 +1828,133 @@ + + EXPORT_SYMBOL_GPL(skb_pull_rcsum); +/** + * skb_segment - Perform protocol segmentation on skb. @@ -2004,10 +2016,10 @@ Index: tmp-xxx/net/core/skbuff.c void __init skb_init(void) { skbuff_head_cache = kmem_cache_create("skbuff_head_cache", -Index: tmp-xxx/net/decnet/dn_nsp_in.c +Index: tmp-linux-2.6.17/net/decnet/dn_nsp_in.c =================================================================== ---- tmp-xxx.orig/net/decnet/dn_nsp_in.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/decnet/dn_nsp_in.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/decnet/dn_nsp_in.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/decnet/dn_nsp_in.c 2007-01-08 16:48:05.000000000 +0000 @@ -801,8 +801,7 @@ * We linearize everything except data segments here. */ @@ -2018,10 +2030,10 @@ Index: tmp-xxx/net/decnet/dn_nsp_in.c goto free_out; } -Index: tmp-xxx/net/decnet/dn_route.c +Index: tmp-linux-2.6.17/net/decnet/dn_route.c =================================================================== ---- tmp-xxx.orig/net/decnet/dn_route.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/decnet/dn_route.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/decnet/dn_route.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/decnet/dn_route.c 2007-01-08 16:48:05.000000000 +0000 @@ -629,8 +629,7 @@ padlen); @@ -2032,10 +2044,10 @@ Index: tmp-xxx/net/decnet/dn_route.c goto dump_it; switch(flags & DN_RT_CNTL_MSK) { -Index: tmp-xxx/net/ipv4/af_inet.c +Index: tmp-linux-2.6.17/net/ipv4/af_inet.c =================================================================== ---- tmp-xxx.orig/net/ipv4/af_inet.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/ipv4/af_inet.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/ipv4/af_inet.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/ipv4/af_inet.c 2007-01-08 16:48:05.000000000 +0000 @@ -68,6 +68,7 @@ */ @@ -2044,7 +2056,7 @@ Index: tmp-xxx/net/ipv4/af_inet.c #include <linux/errno.h> #include <linux/types.h> #include <linux/socket.h> -@@ -1084,6 +1085,54 @@ +@@ -1096,6 +1097,54 @@ EXPORT_SYMBOL(inet_sk_rebuild_header); @@ -2099,7 +2111,7 @@ Index: tmp-xxx/net/ipv4/af_inet.c #ifdef CONFIG_IP_MULTICAST static struct net_protocol igmp_protocol = { .handler = igmp_rcv, -@@ -1093,6 +1142,7 @@ +@@ -1105,6 +1154,7 @@ static struct net_protocol tcp_protocol = { .handler = tcp_v4_rcv, .err_handler = tcp_v4_err, @@ -2107,7 +2119,7 @@ Index: tmp-xxx/net/ipv4/af_inet.c .no_policy = 1, }; -@@ -1138,6 +1188,7 @@ +@@ -1150,6 +1200,7 @@ static struct packet_type ip_packet_type = { .type = __constant_htons(ETH_P_IP), .func = ip_rcv, @@ -2115,10 +2127,10 @@ Index: tmp-xxx/net/ipv4/af_inet.c }; static int __init inet_init(void) -Index: tmp-xxx/net/ipv4/ip_output.c +Index: tmp-linux-2.6.17/net/ipv4/ip_output.c =================================================================== ---- tmp-xxx.orig/net/ipv4/ip_output.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/ipv4/ip_output.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/ipv4/ip_output.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/ipv4/ip_output.c 2007-01-08 16:48:05.000000000 +0000 @@ -210,8 +210,7 @@ return dst_output(skb); } @@ -2177,12 +2189,12 @@ Index: tmp-xxx/net/ipv4/ip_output.c len = size; else { -Index: tmp-xxx/net/ipv4/ipcomp.c +Index: tmp-linux-2.6.17/net/ipv4/ipcomp.c =================================================================== ---- tmp-xxx.orig/net/ipv4/ipcomp.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/ipv4/ipcomp.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/ipv4/ipcomp.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/ipv4/ipcomp.c 2007-01-08 16:48:05.000000000 +0000 @@ -84,7 +84,7 @@ - struct xfrm_decap_state *decap, struct sk_buff *skb) + static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb) { u8 nexthdr; - int err = 0; @@ -2215,19 +2227,19 @@ Index: tmp-xxx/net/ipv4/ipcomp.c err = ipcomp_compress(x, skb); iph = skb->nh.iph; -Index: tmp-xxx/net/ipv4/tcp.c +Index: tmp-linux-2.6.17/net/ipv4/tcp.c =================================================================== ---- tmp-xxx.orig/net/ipv4/tcp.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/ipv4/tcp.c 2006-11-27 10:52:42.000000000 +0000 -@@ -257,6 +257,7 @@ - #include <linux/fs.h> +--- tmp-linux-2.6.17.orig/net/ipv4/tcp.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/ipv4/tcp.c 2007-01-08 16:48:05.000000000 +0000 +@@ -258,6 +258,7 @@ #include <linux/random.h> #include <linux/bootmem.h> + #include <linux/cache.h> +#include <linux/err.h> #include <net/icmp.h> #include <net/tcp.h> -@@ -570,7 +571,7 @@ +@@ -571,7 +572,7 @@ skb->ip_summed = CHECKSUM_HW; tp->write_seq += copy; TCP_SKB_CB(skb)->end_seq += copy; @@ -2236,7 +2248,7 @@ Index: tmp-xxx/net/ipv4/tcp.c if (!copied) TCP_SKB_CB(skb)->flags &= ~TCPCB_FLAG_PSH; -@@ -621,14 +622,10 @@ +@@ -622,14 +623,10 @@ ssize_t res; struct sock *sk = sock->sk; @@ -2252,7 +2264,7 @@ Index: tmp-xxx/net/ipv4/tcp.c lock_sock(sk); TCP_CHECK_TIMER(sk); res = do_tcp_sendpages(sk, &page, offset, size, flags); -@@ -725,9 +722,7 @@ +@@ -726,9 +723,7 @@ /* * Check whether we can use HW checksum. */ @@ -2263,7 +2275,7 @@ Index: tmp-xxx/net/ipv4/tcp.c skb->ip_summed = CHECKSUM_HW; skb_entail(sk, tp, skb); -@@ -823,7 +818,7 @@ +@@ -824,7 +819,7 @@ tp->write_seq += copy; TCP_SKB_CB(skb)->end_seq += copy; @@ -2272,9 +2284,9 @@ Index: tmp-xxx/net/ipv4/tcp.c from += copy; copied += copy; -@@ -2026,6 +2021,71 @@ - } - +@@ -2071,6 +2066,71 @@ + EXPORT_SYMBOL(compat_tcp_getsockopt); + #endif +struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features) +{ @@ -2344,10 +2356,10 @@ Index: tmp-xxx/net/ipv4/tcp.c extern void __skb_cb_too_small_for_tcp(int, int); extern struct tcp_congestion_ops tcp_reno; -Index: tmp-xxx/net/ipv4/tcp_input.c +Index: tmp-linux-2.6.17/net/ipv4/tcp_input.c =================================================================== ---- tmp-xxx.orig/net/ipv4/tcp_input.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/ipv4/tcp_input.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/ipv4/tcp_input.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/ipv4/tcp_input.c 2007-01-08 16:48:05.000000000 +0000 @@ -1072,7 +1072,7 @@ else pkt_len = (end_seq - @@ -2357,11 +2369,11 @@ Index: tmp-xxx/net/ipv4/tcp_input.c break; pcount = tcp_skb_pcount(skb); } -Index: tmp-xxx/net/ipv4/tcp_output.c +Index: tmp-linux-2.6.17/net/ipv4/tcp_output.c =================================================================== ---- tmp-xxx.orig/net/ipv4/tcp_output.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/ipv4/tcp_output.c 2006-11-27 10:52:42.000000000 +0000 -@@ -497,15 +497,17 @@ +--- tmp-linux-2.6.17.orig/net/ipv4/tcp_output.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/ipv4/tcp_output.c 2007-01-08 16:48:05.000000000 +0000 +@@ -511,15 +511,17 @@ /* Avoid the costly divide in the normal * non-TSO case. */ @@ -2383,7 +2395,7 @@ Index: tmp-xxx/net/ipv4/tcp_output.c } } -@@ -850,7 +852,7 @@ +@@ -910,7 +912,7 @@ if (!tso_segs || (tso_segs > 1 && @@ -2392,7 +2404,7 @@ Index: tmp-xxx/net/ipv4/tcp_output.c tcp_set_skb_tso_segs(sk, skb, mss_now); tso_segs = tcp_skb_pcount(skb); } -@@ -1510,8 +1512,9 @@ +@@ -1720,8 +1722,9 @@ tp->snd_una == (TCP_SKB_CB(skb)->end_seq - 1)) { if (!pskb_trim(skb, 0)) { TCP_SKB_CB(skb)->seq = TCP_SKB_CB(skb)->end_seq - 1; @@ -2404,7 +2416,7 @@ Index: tmp-xxx/net/ipv4/tcp_output.c skb->ip_summed = CHECKSUM_NONE; skb->csum = 0; } -@@ -1716,8 +1719,9 @@ +@@ -1926,8 +1929,9 @@ skb->csum = 0; TCP_SKB_CB(skb)->flags = (TCPCB_FLAG_ACK | TCPCB_FLAG_FIN); TCP_SKB_CB(skb)->sacked = 0; @@ -2416,7 +2428,7 @@ Index: tmp-xxx/net/ipv4/tcp_output.c /* FIN eats a sequence byte, write_seq advanced by tcp_queue_skb(). */ TCP_SKB_CB(skb)->seq = tp->write_seq; -@@ -1749,8 +1753,9 @@ +@@ -1959,8 +1963,9 @@ skb->csum = 0; TCP_SKB_CB(skb)->flags = (TCPCB_FLAG_ACK | TCPCB_FLAG_RST); TCP_SKB_CB(skb)->sacked = 0; @@ -2428,7 +2440,7 @@ Index: tmp-xxx/net/ipv4/tcp_output.c /* Send it off. */ TCP_SKB_CB(skb)->seq = tcp_acceptable_seq(sk, tp); -@@ -1833,8 +1838,9 @@ +@@ -2043,8 +2048,9 @@ TCP_SKB_CB(skb)->seq = tcp_rsk(req)->snt_isn; TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq + 1; TCP_SKB_CB(skb)->sacked = 0; @@ -2440,7 +2452,7 @@ Index: tmp-xxx/net/ipv4/tcp_output.c th->seq = htonl(TCP_SKB_CB(skb)->seq); th->ack_seq = htonl(tcp_rsk(req)->rcv_isn + 1); if (req->rcv_wnd == 0) { /* ignored for retransmitted syns */ -@@ -1937,8 +1943,9 @@ +@@ -2148,8 +2154,9 @@ TCP_SKB_CB(buff)->flags = TCPCB_FLAG_SYN; TCP_ECN_send_syn(sk, tp, buff); TCP_SKB_CB(buff)->sacked = 0; @@ -2452,7 +2464,7 @@ Index: tmp-xxx/net/ipv4/tcp_output.c buff->csum = 0; TCP_SKB_CB(buff)->seq = tp->write_seq++; TCP_SKB_CB(buff)->end_seq = tp->write_seq; -@@ -2042,8 +2049,9 @@ +@@ -2253,8 +2260,9 @@ buff->csum = 0; TCP_SKB_CB(buff)->flags = TCPCB_FLAG_ACK; TCP_SKB_CB(buff)->sacked = 0; @@ -2464,7 +2476,7 @@ Index: tmp-xxx/net/ipv4/tcp_output.c /* Send it off, this clears delayed acks for us. */ TCP_SKB_CB(buff)->seq = TCP_SKB_CB(buff)->end_seq = tcp_acceptable_seq(sk, tp); -@@ -2078,8 +2086,9 @@ +@@ -2289,8 +2297,9 @@ skb->csum = 0; TCP_SKB_CB(skb)->flags = TCPCB_FLAG_ACK; TCP_SKB_CB(skb)->sacked = urgent; @@ -2476,10 +2488,10 @@ Index: tmp-xxx/net/ipv4/tcp_output.c /* Use a previous sequence. This should cause the other * end to send an ack. Don't queue or clone SKB, just -Index: tmp-xxx/net/ipv4/xfrm4_output.c +Index: tmp-linux-2.6.17/net/ipv4/xfrm4_output.c =================================================================== ---- tmp-xxx.orig/net/ipv4/xfrm4_output.c 2006-11-27 10:52:32.000000000 +0000 -+++ tmp-xxx/net/ipv4/xfrm4_output.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/ipv4/xfrm4_output.c 2007-01-08 16:48:05.000000000 +0000 ++++ tmp-linux-2.6.17/net/ipv4/xfrm4_output.c 2007-01-08 16:48:05.000000000 +0000 @@ -9,6 +9,8 @@ */ @@ -2565,10 +2577,10 @@ Index: tmp-xxx/net/ipv4/xfrm4_output.c int xfrm4_output(struct sk_buff *skb) { return NF_HOOK_COND(PF_INET, NF_IP_POST_ROUTING, skb, NULL, skb->dst->dev, -Index: tmp-xxx/net/ipv6/ip6_output.c +Index: tmp-linux-2.6.17/net/ipv6/ip6_output.c =================================================================== ---- tmp-xxx.orig/net/ipv6/ip6_output.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/ipv6/ip6_output.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/ipv6/ip6_output.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/ipv6/ip6_output.c 2007-01-08 16:48:05.000000000 +0000 @@ -147,7 +147,7 @@ int ip6_output(struct sk_buff *skb) @@ -2578,7 +2590,7 @@ Index: tmp-xxx/net/ipv6/ip6_output.c dst_allfrag(skb->dst)) return ip6_fragment(skb, ip6_output2); else -@@ -829,8 +829,9 @@ +@@ -830,8 +830,9 @@ struct frag_hdr fhdr; /* specify the length of each IP datagram fragment*/ @@ -2590,20 +2602,20 @@ Index: tmp-xxx/net/ipv6/ip6_output.c ipv6_select_ident(skb, &fhdr); skb_shinfo(skb)->ip6_frag_id = fhdr.identification; __skb_queue_tail(&sk->sk_write_queue, skb); -Index: tmp-xxx/net/ipv6/ipcomp6.c +Index: tmp-linux-2.6.17/net/ipv6/ipcomp6.c =================================================================== ---- tmp-xxx.orig/net/ipv6/ipcomp6.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/ipv6/ipcomp6.c 2006-11-27 10:52:42.000000000 +0000 -@@ -64,7 +64,7 @@ +--- tmp-linux-2.6.17.orig/net/ipv6/ipcomp6.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/ipv6/ipcomp6.c 2007-01-08 16:48:05.000000000 +0000 +@@ -65,7 +65,7 @@ - static int ipcomp6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) + static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) { - int err = 0; + int err = -ENOMEM; u8 nexthdr = 0; int hdr_len = skb->h.raw - skb->nh.raw; unsigned char *tmp_hdr = NULL; -@@ -75,11 +75,8 @@ +@@ -76,11 +76,8 @@ struct crypto_tfm *tfm; int cpu; @@ -2616,7 +2628,7 @@ Index: tmp-xxx/net/ipv6/ipcomp6.c skb->ip_summed = CHECKSUM_NONE; -@@ -158,10 +155,8 @@ +@@ -159,10 +156,8 @@ goto out_ok; } @@ -2628,10 +2640,10 @@ Index: tmp-xxx/net/ipv6/ipcomp6.c /* compression */ plen = skb->len - hdr_len; -Index: tmp-xxx/net/ipv6/xfrm6_output.c +Index: tmp-linux-2.6.17/net/ipv6/xfrm6_output.c =================================================================== ---- tmp-xxx.orig/net/ipv6/xfrm6_output.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/ipv6/xfrm6_output.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/ipv6/xfrm6_output.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/ipv6/xfrm6_output.c 2007-01-08 16:48:05.000000000 +0000 @@ -151,7 +151,7 @@ goto out_exit; } @@ -2692,10 +2704,10 @@ Index: tmp-xxx/net/ipv6/xfrm6_output.c int xfrm6_output(struct sk_buff *skb) { return NF_HOOK(PF_INET6, NF_IP6_POST_ROUTING, skb, NULL, skb->dst->dev, -Index: tmp-xxx/net/sched/sch_generic.c +Index: tmp-linux-2.6.17/net/sched/sch_generic.c =================================================================== ---- tmp-xxx.orig/net/sched/sch_generic.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/sched/sch_generic.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/sched/sch_generic.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/sched/sch_generic.c 2007-01-08 16:48:05.000000000 +0000 @@ -72,9 +72,9 @@ dev->queue_lock serializes queue accesses for this device AND dev->qdisc pointer itself. @@ -2810,7 +2822,7 @@ Index: tmp-xxx/net/sched/sch_generic.c if (dev->qdisc != &noop_qdisc) { if (netif_device_present(dev) && netif_running(dev) && -@@ -201,7 +213,7 @@ +@@ -203,7 +215,7 @@ dev_hold(dev); } } @@ -2819,7 +2831,7 @@ Index: tmp-xxx/net/sched/sch_generic.c dev_put(dev); } -@@ -225,17 +237,17 @@ +@@ -227,17 +239,17 @@ static void dev_watchdog_up(struct net_device *dev) { @@ -2835,13 +2847,13 @@ Index: tmp-xxx/net/sched/sch_generic.c - spin_lock_bh(&dev->xmit_lock); + netif_tx_lock_bh(dev); if (del_timer(&dev->watchdog_timer)) - __dev_put(dev); + dev_put(dev); - spin_unlock_bh(&dev->xmit_lock); + netif_tx_unlock_bh(dev); } void netif_carrier_on(struct net_device *dev) -@@ -577,10 +589,17 @@ +@@ -579,10 +591,17 @@ dev_watchdog_down(dev); @@ -2861,17 +2873,17 @@ Index: tmp-xxx/net/sched/sch_generic.c } void dev_init_scheduler(struct net_device *dev) -@@ -622,6 +641,5 @@ +@@ -624,6 +643,5 @@ EXPORT_SYMBOL(qdisc_alloc); EXPORT_SYMBOL(qdisc_destroy); EXPORT_SYMBOL(qdisc_reset); -EXPORT_SYMBOL(qdisc_restart); EXPORT_SYMBOL(qdisc_lock_tree); EXPORT_SYMBOL(qdisc_unlock_tree); -Index: tmp-xxx/net/sched/sch_teql.c +Index: tmp-linux-2.6.17/net/sched/sch_teql.c =================================================================== ---- tmp-xxx.orig/net/sched/sch_teql.c 2006-11-15 10:38:39.000000000 +0000 -+++ tmp-xxx/net/sched/sch_teql.c 2006-11-27 10:52:42.000000000 +0000 +--- tmp-linux-2.6.17.orig/net/sched/sch_teql.c 2006-06-18 02:49:35.000000000 +0100 ++++ tmp-linux-2.6.17/net/sched/sch_teql.c 2007-01-08 16:48:05.000000000 +0000 @@ -302,20 +302,17 @@ switch (teql_resolve(skb, skb_res, slave)) { diff --git a/patches/linux-2.6.16.33/net-gso-1-check-dodgy.patch b/patches/linux-2.6.17/net-gso-1-check-dodgy.patch index db2ea2321b..21ccb5987b 100644 --- a/patches/linux-2.6.16.33/net-gso-1-check-dodgy.patch +++ b/patches/linux-2.6.17/net-gso-1-check-dodgy.patch @@ -1,7 +1,7 @@ -diff -pruN ../orig-linux-2.6.16.29/net/ipv4/tcp.c ./net/ipv4/tcp.c ---- ../orig-linux-2.6.16.29/net/ipv4/tcp.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./net/ipv4/tcp.c 2006-09-19 13:59:42.000000000 +0100 -@@ -2042,13 +2042,19 @@ struct sk_buff *tcp_tso_segment(struct s +diff -pruN ../orig-linux-2.6.17/net/ipv4/tcp.c ./net/ipv4/tcp.c +--- ../orig-linux-2.6.17/net/ipv4/tcp.c 2007-01-08 15:21:15.000000000 +0000 ++++ ./net/ipv4/tcp.c 2007-01-08 15:24:49.000000000 +0000 +@@ -2087,13 +2087,19 @@ struct sk_buff *tcp_tso_segment(struct s if (!pskb_may_pull(skb, thlen)) goto out; diff --git a/patches/linux-2.6.16.33/net-gso-2-checksum-fix.patch b/patches/linux-2.6.17/net-gso-2-checksum-fix.patch index 430be5fbbf..db228e1546 100644 --- a/patches/linux-2.6.16.33/net-gso-2-checksum-fix.patch +++ b/patches/linux-2.6.17/net-gso-2-checksum-fix.patch @@ -1,7 +1,7 @@ -diff -pruN ../orig-linux-2.6.16.29/drivers/net/bnx2.c ./drivers/net/bnx2.c ---- ../orig-linux-2.6.16.29/drivers/net/bnx2.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./drivers/net/bnx2.c 2006-09-19 13:59:46.000000000 +0100 -@@ -1593,7 +1593,7 @@ bnx2_tx_int(struct bnx2 *bp) +diff -pruN ../orig-linux-2.6.17/drivers/net/bnx2.c ./drivers/net/bnx2.c +--- ../orig-linux-2.6.17/drivers/net/bnx2.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./drivers/net/bnx2.c 2007-01-08 15:25:03.000000000 +0000 +@@ -1638,7 +1638,7 @@ bnx2_tx_int(struct bnx2 *bp) skb = tx_buf->skb; #ifdef BCM_TSO /* partial BD completions possible with TSO packets */ @@ -10,10 +10,10 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/net/bnx2.c ./drivers/net/bnx2.c u16 last_idx, last_ring_idx; last_idx = sw_cons + -diff -pruN ../orig-linux-2.6.16.29/drivers/net/chelsio/sge.c ./drivers/net/chelsio/sge.c ---- ../orig-linux-2.6.16.29/drivers/net/chelsio/sge.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./drivers/net/chelsio/sge.c 2006-09-19 13:59:46.000000000 +0100 -@@ -1419,7 +1419,7 @@ int t1_start_xmit(struct sk_buff *skb, s +diff -pruN ../orig-linux-2.6.17/drivers/net/chelsio/sge.c ./drivers/net/chelsio/sge.c +--- ../orig-linux-2.6.17/drivers/net/chelsio/sge.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./drivers/net/chelsio/sge.c 2007-01-08 15:25:03.000000000 +0000 +@@ -1418,7 +1418,7 @@ int t1_start_xmit(struct sk_buff *skb, s struct cpl_tx_pkt *cpl; #ifdef NETIF_F_TSO @@ -22,10 +22,10 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/net/chelsio/sge.c ./drivers/net/chels int eth_type; struct cpl_tx_pkt_lso *hdr; -diff -pruN ../orig-linux-2.6.16.29/drivers/net/e1000/e1000_main.c ./drivers/net/e1000/e1000_main.c ---- ../orig-linux-2.6.16.29/drivers/net/e1000/e1000_main.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./drivers/net/e1000/e1000_main.c 2006-09-19 13:59:46.000000000 +0100 -@@ -2526,7 +2526,7 @@ e1000_tso(struct e1000_adapter *adapter, +diff -pruN ../orig-linux-2.6.17/drivers/net/e1000/e1000_main.c ./drivers/net/e1000/e1000_main.c +--- ../orig-linux-2.6.17/drivers/net/e1000/e1000_main.c 2007-01-08 15:22:36.000000000 +0000 ++++ ./drivers/net/e1000/e1000_main.c 2007-01-08 15:26:24.000000000 +0000 +@@ -2413,7 +2413,7 @@ e1000_tso(struct e1000_adapter *adapter, uint8_t ipcss, ipcso, tucss, tucso, hdr_len; int err; @@ -34,29 +34,29 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/net/e1000/e1000_main.c ./drivers/net/ if (skb_header_cloned(skb)) { err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); if (err) -@@ -2651,7 +2651,7 @@ e1000_tx_map(struct e1000_adapter *adapt +@@ -2538,7 +2538,7 @@ e1000_tx_map(struct e1000_adapter *adapt * tso gets written back prematurely before the data is fully - * DMAd to the controller */ + * DMA'd to the controller */ if (!skb->data_len && tx_ring->last_tx_tso && -- !skb_shinfo(skb)->gso_size) { +- !skb_shinfo(skb)->gso_size) { + !skb_is_gso(skb)) { tx_ring->last_tx_tso = 0; size -= 4; } -@@ -2934,8 +2934,7 @@ e1000_xmit_frame(struct sk_buff *skb, st +@@ -2825,8 +2825,7 @@ e1000_xmit_frame(struct sk_buff *skb, st #ifdef NETIF_F_TSO /* Controller Erratum workaround */ - if (!skb->data_len && tx_ring->last_tx_tso && -- !skb_shinfo(skb)->gso_size) +- !skb_shinfo(skb)->gso_size) + if (!skb->data_len && tx_ring->last_tx_tso && !skb_is_gso(skb)) count++; #endif -diff -pruN ../orig-linux-2.6.16.29/drivers/net/forcedeth.c ./drivers/net/forcedeth.c ---- ../orig-linux-2.6.16.29/drivers/net/forcedeth.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./drivers/net/forcedeth.c 2006-09-19 13:59:46.000000000 +0100 -@@ -1105,7 +1105,7 @@ static int nv_start_xmit(struct sk_buff +diff -pruN ../orig-linux-2.6.17/drivers/net/forcedeth.c ./drivers/net/forcedeth.c +--- ../orig-linux-2.6.17/drivers/net/forcedeth.c 2007-01-08 15:23:05.000000000 +0000 ++++ ./drivers/net/forcedeth.c 2007-01-08 15:25:03.000000000 +0000 +@@ -1303,7 +1303,7 @@ static int nv_start_xmit(struct sk_buff np->tx_skbuff[nr] = skb; #ifdef NETIF_F_TSO @@ -65,10 +65,10 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/net/forcedeth.c ./drivers/net/forcede tx_flags_extra = NV_TX2_TSO | (skb_shinfo(skb)->gso_size << NV_TX2_TSO_SHIFT); else #endif -diff -pruN ../orig-linux-2.6.16.29/drivers/net/ixgb/ixgb_main.c ./drivers/net/ixgb/ixgb_main.c ---- ../orig-linux-2.6.16.29/drivers/net/ixgb/ixgb_main.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./drivers/net/ixgb/ixgb_main.c 2006-09-19 13:59:46.000000000 +0100 -@@ -1163,7 +1163,7 @@ ixgb_tso(struct ixgb_adapter *adapter, s +diff -pruN ../orig-linux-2.6.17/drivers/net/ixgb/ixgb_main.c ./drivers/net/ixgb/ixgb_main.c +--- ../orig-linux-2.6.17/drivers/net/ixgb/ixgb_main.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./drivers/net/ixgb/ixgb_main.c 2007-01-08 15:25:03.000000000 +0000 +@@ -1168,7 +1168,7 @@ ixgb_tso(struct ixgb_adapter *adapter, s uint16_t ipcse, tucse, mss; int err; @@ -77,9 +77,9 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/net/ixgb/ixgb_main.c ./drivers/net/ix if (skb_header_cloned(skb)) { err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); if (err) -diff -pruN ../orig-linux-2.6.16.29/drivers/net/loopback.c ./drivers/net/loopback.c ---- ../orig-linux-2.6.16.29/drivers/net/loopback.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./drivers/net/loopback.c 2006-09-19 13:59:46.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/drivers/net/loopback.c ./drivers/net/loopback.c +--- ../orig-linux-2.6.17/drivers/net/loopback.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./drivers/net/loopback.c 2007-01-08 15:25:03.000000000 +0000 @@ -139,7 +139,7 @@ static int loopback_xmit(struct sk_buff #endif @@ -89,10 +89,10 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/net/loopback.c ./drivers/net/loopback BUG_ON(skb->protocol != htons(ETH_P_IP)); BUG_ON(skb->nh.iph->protocol != IPPROTO_TCP); -diff -pruN ../orig-linux-2.6.16.29/drivers/net/sky2.c ./drivers/net/sky2.c ---- ../orig-linux-2.6.16.29/drivers/net/sky2.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./drivers/net/sky2.c 2006-09-19 13:59:46.000000000 +0100 -@@ -1125,7 +1125,7 @@ static unsigned tx_le_req(const struct s +diff -pruN ../orig-linux-2.6.17/drivers/net/sky2.c ./drivers/net/sky2.c +--- ../orig-linux-2.6.17/drivers/net/sky2.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./drivers/net/sky2.c 2007-01-08 15:25:03.000000000 +0000 +@@ -1160,7 +1160,7 @@ static unsigned tx_le_req(const struct s count = sizeof(dma_addr_t) / sizeof(u32); count += skb_shinfo(skb)->nr_frags * count; @@ -101,9 +101,9 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/net/sky2.c ./drivers/net/sky2.c ++count; if (skb->ip_summed == CHECKSUM_HW) -diff -pruN ../orig-linux-2.6.16.29/drivers/net/typhoon.c ./drivers/net/typhoon.c ---- ../orig-linux-2.6.16.29/drivers/net/typhoon.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./drivers/net/typhoon.c 2006-09-19 13:59:46.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/drivers/net/typhoon.c ./drivers/net/typhoon.c +--- ../orig-linux-2.6.17/drivers/net/typhoon.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./drivers/net/typhoon.c 2007-01-08 15:25:03.000000000 +0000 @@ -805,7 +805,7 @@ typhoon_start_tx(struct sk_buff *skb, st * If problems develop with TSO, check this first. */ @@ -122,10 +122,18 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/net/typhoon.c ./drivers/net/typhoon.c first_txd->processFlags |= TYPHOON_TX_PF_TCP_SEGMENT; first_txd->numDesc++; -diff -pruN ../orig-linux-2.6.16.29/drivers/s390/net/qeth_main.c ./drivers/s390/net/qeth_main.c ---- ../orig-linux-2.6.16.29/drivers/s390/net/qeth_main.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./drivers/s390/net/qeth_main.c 2006-09-19 13:59:46.000000000 +0100 -@@ -4454,7 +4454,7 @@ qeth_send_packet(struct qeth_card *card, +diff -pruN ../orig-linux-2.6.17/drivers/s390/net/qeth_main.c ./drivers/s390/net/qeth_main.c +--- ../orig-linux-2.6.17/drivers/s390/net/qeth_main.c 2007-01-08 15:23:29.000000000 +0000 ++++ ./drivers/s390/net/qeth_main.c 2007-01-08 15:26:49.000000000 +0000 +@@ -4417,7 +4417,6 @@ qeth_send_packet(struct qeth_card *card, + struct qeth_eddp_context *ctx = NULL; + int tx_bytes = skb->len; + unsigned short nr_frags = skb_shinfo(skb)->nr_frags; +- unsigned short gso_size = skb_shinfo(skb)->gso_size; + int rc; + + QETH_DBF_TEXT(trace, 6, "sendpkt"); +@@ -4453,7 +4452,7 @@ qeth_send_packet(struct qeth_card *card, queue = card->qdio.out_qs [qeth_get_priority_queue(card, skb, ipv, cast_type)]; @@ -134,20 +142,20 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/s390/net/qeth_main.c ./drivers/s390/n large_send = card->options.large_send; /*are we able to do TSO ? If so ,prepare and send it from here */ -@@ -4501,8 +4501,7 @@ qeth_send_packet(struct qeth_card *card, +@@ -4500,8 +4499,7 @@ qeth_send_packet(struct qeth_card *card, card->stats.tx_packets++; - card->stats.tx_bytes += skb->len; + card->stats.tx_bytes += tx_bytes; #ifdef CONFIG_QETH_PERF_STATS -- if (skb_shinfo(skb)->gso_size && +- if (gso_size && - !(large_send == QETH_LARGE_SEND_NO)) { + if (skb_is_gso(skb) && !(large_send == QETH_LARGE_SEND_NO)) { - card->perf_stats.large_send_bytes += skb->len; + card->perf_stats.large_send_bytes += tx_bytes; card->perf_stats.large_send_cnt++; } -diff -pruN ../orig-linux-2.6.16.29/include/linux/netdevice.h ./include/linux/netdevice.h ---- ../orig-linux-2.6.16.29/include/linux/netdevice.h 2006-09-19 13:59:20.000000000 +0100 -+++ ./include/linux/netdevice.h 2006-09-19 13:59:46.000000000 +0100 -@@ -541,6 +541,7 @@ struct packet_type { +diff -pruN ../orig-linux-2.6.17/include/linux/netdevice.h ./include/linux/netdevice.h +--- ../orig-linux-2.6.17/include/linux/netdevice.h 2007-01-08 15:24:25.000000000 +0000 ++++ ./include/linux/netdevice.h 2007-01-08 15:25:03.000000000 +0000 +@@ -546,6 +546,7 @@ struct packet_type { struct net_device *); struct sk_buff *(*gso_segment)(struct sk_buff *skb, int features); @@ -155,7 +163,7 @@ diff -pruN ../orig-linux-2.6.16.29/include/linux/netdevice.h ./include/linux/net void *af_packet_priv; struct list_head list; }; -@@ -1001,14 +1002,15 @@ extern void linkwatch_run_queue(void); +@@ -990,14 +991,15 @@ extern void linkwatch_run_queue(void); static inline int skb_gso_ok(struct sk_buff *skb, int features) { @@ -174,10 +182,10 @@ diff -pruN ../orig-linux-2.6.16.29/include/linux/netdevice.h ./include/linux/net } #endif /* __KERNEL__ */ -diff -pruN ../orig-linux-2.6.16.29/include/linux/skbuff.h ./include/linux/skbuff.h ---- ../orig-linux-2.6.16.29/include/linux/skbuff.h 2006-09-19 13:59:20.000000000 +0100 -+++ ./include/linux/skbuff.h 2006-09-19 13:59:46.000000000 +0100 -@@ -1403,5 +1403,10 @@ static inline void nf_bridge_get(struct +diff -pruN ../orig-linux-2.6.17/include/linux/skbuff.h ./include/linux/skbuff.h +--- ../orig-linux-2.6.17/include/linux/skbuff.h 2007-01-08 15:16:27.000000000 +0000 ++++ ./include/linux/skbuff.h 2007-01-08 15:25:03.000000000 +0000 +@@ -1422,5 +1422,10 @@ static inline void nf_reset(struct sk_bu static inline void nf_reset(struct sk_buff *skb) {} #endif /* CONFIG_NETFILTER */ @@ -188,9 +196,9 @@ diff -pruN ../orig-linux-2.6.16.29/include/linux/skbuff.h ./include/linux/skbuff + #endif /* __KERNEL__ */ #endif /* _LINUX_SKBUFF_H */ -diff -pruN ../orig-linux-2.6.16.29/include/net/protocol.h ./include/net/protocol.h ---- ../orig-linux-2.6.16.29/include/net/protocol.h 2006-09-19 13:59:20.000000000 +0100 -+++ ./include/net/protocol.h 2006-09-19 13:59:46.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/include/net/protocol.h ./include/net/protocol.h +--- ../orig-linux-2.6.17/include/net/protocol.h 2007-01-08 15:16:27.000000000 +0000 ++++ ./include/net/protocol.h 2007-01-08 15:25:03.000000000 +0000 @@ -37,6 +37,7 @@ struct net_protocol { int (*handler)(struct sk_buff *skb); @@ -199,10 +207,10 @@ diff -pruN ../orig-linux-2.6.16.29/include/net/protocol.h ./include/net/protocol struct sk_buff *(*gso_segment)(struct sk_buff *skb, int features); int no_policy; -diff -pruN ../orig-linux-2.6.16.29/include/net/tcp.h ./include/net/tcp.h ---- ../orig-linux-2.6.16.29/include/net/tcp.h 2006-09-19 13:59:20.000000000 +0100 -+++ ./include/net/tcp.h 2006-09-19 13:59:46.000000000 +0100 -@@ -1063,6 +1063,7 @@ extern struct request_sock_ops tcp_reque +diff -pruN ../orig-linux-2.6.17/include/net/tcp.h ./include/net/tcp.h +--- ../orig-linux-2.6.17/include/net/tcp.h 2007-01-08 15:16:27.000000000 +0000 ++++ ./include/net/tcp.h 2007-01-08 15:25:03.000000000 +0000 +@@ -1076,6 +1076,7 @@ extern struct request_sock_ops tcp_reque extern int tcp_v4_destroy_sock(struct sock *sk); @@ -210,22 +218,22 @@ diff -pruN ../orig-linux-2.6.16.29/include/net/tcp.h ./include/net/tcp.h extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); #ifdef CONFIG_PROC_FS -diff -pruN ../orig-linux-2.6.16.29/net/bridge/br_forward.c ./net/bridge/br_forward.c ---- ../orig-linux-2.6.16.29/net/bridge/br_forward.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./net/bridge/br_forward.c 2006-09-19 13:59:46.000000000 +0100 -@@ -32,7 +32,7 @@ static inline int should_deliver(const s +diff -pruN ../orig-linux-2.6.17/net/bridge/br_forward.c ./net/bridge/br_forward.c +--- ../orig-linux-2.6.17/net/bridge/br_forward.c 2007-01-08 15:22:15.000000000 +0000 ++++ ./net/bridge/br_forward.c 2007-01-08 15:25:32.000000000 +0000 +@@ -38,7 +38,7 @@ static inline unsigned packet_length(con int br_dev_queue_push_xmit(struct sk_buff *skb) { /* drop mtu oversized packets except tso */ -- if (skb->len > skb->dev->mtu && !skb_shinfo(skb)->gso_size) -+ if (skb->len > skb->dev->mtu && !skb_is_gso(skb)) +- if (packet_length(skb) > skb->dev->mtu && !skb_shinfo(skb)->gso_size) ++ if (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb)) kfree_skb(skb); else { #ifdef CONFIG_BRIDGE_NETFILTER -diff -pruN ../orig-linux-2.6.16.29/net/bridge/br_netfilter.c ./net/bridge/br_netfilter.c ---- ../orig-linux-2.6.16.29/net/bridge/br_netfilter.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./net/bridge/br_netfilter.c 2006-09-19 13:59:46.000000000 +0100 -@@ -743,7 +743,7 @@ static int br_nf_dev_queue_xmit(struct s +diff -pruN ../orig-linux-2.6.17/net/bridge/br_netfilter.c ./net/bridge/br_netfilter.c +--- ../orig-linux-2.6.17/net/bridge/br_netfilter.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./net/bridge/br_netfilter.c 2007-01-08 15:25:03.000000000 +0000 +@@ -769,7 +769,7 @@ static int br_nf_dev_queue_xmit(struct s { if (skb->protocol == htons(ETH_P_IP) && skb->len > skb->dev->mtu && @@ -234,10 +242,10 @@ diff -pruN ../orig-linux-2.6.16.29/net/bridge/br_netfilter.c ./net/bridge/br_net return ip_fragment(skb, br_dev_queue_push_xmit); else return br_dev_queue_push_xmit(skb); -diff -pruN ../orig-linux-2.6.16.29/net/core/dev.c ./net/core/dev.c ---- ../orig-linux-2.6.16.29/net/core/dev.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./net/core/dev.c 2006-09-19 13:59:46.000000000 +0100 -@@ -1083,9 +1083,17 @@ int skb_checksum_help(struct sk_buff *sk +diff -pruN ../orig-linux-2.6.17/net/core/dev.c ./net/core/dev.c +--- ../orig-linux-2.6.17/net/core/dev.c 2007-01-08 15:20:44.000000000 +0000 ++++ ./net/core/dev.c 2007-01-08 15:25:03.000000000 +0000 +@@ -1156,9 +1156,17 @@ int skb_checksum_help(struct sk_buff *sk unsigned int csum; int ret = 0, offset = skb->h.raw - skb->data; @@ -258,7 +266,7 @@ diff -pruN ../orig-linux-2.6.16.29/net/core/dev.c ./net/core/dev.c } if (skb_cloned(skb)) { -@@ -1102,6 +1110,8 @@ int skb_checksum_help(struct sk_buff *sk +@@ -1175,6 +1183,8 @@ int skb_checksum_help(struct sk_buff *sk BUG_ON(skb->csum + 2 > offset); *(u16*)(skb->h.raw + skb->csum) = csum_fold(csum); @@ -267,7 +275,7 @@ diff -pruN ../orig-linux-2.6.16.29/net/core/dev.c ./net/core/dev.c skb->ip_summed = CHECKSUM_NONE; out: return ret; -@@ -1122,17 +1132,35 @@ struct sk_buff *skb_gso_segment(struct s +@@ -1195,17 +1205,35 @@ struct sk_buff *skb_gso_segment(struct s struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT); struct packet_type *ptype; int type = skb->protocol; @@ -304,10 +312,10 @@ diff -pruN ../orig-linux-2.6.16.29/net/core/dev.c ./net/core/dev.c segs = ptype->gso_segment(skb, features); break; } -diff -pruN ../orig-linux-2.6.16.29/net/ipv4/af_inet.c ./net/ipv4/af_inet.c ---- ../orig-linux-2.6.16.29/net/ipv4/af_inet.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./net/ipv4/af_inet.c 2006-09-19 13:59:46.000000000 +0100 -@@ -1085,6 +1085,40 @@ int inet_sk_rebuild_header(struct sock * +diff -pruN ../orig-linux-2.6.17/net/ipv4/af_inet.c ./net/ipv4/af_inet.c +--- ../orig-linux-2.6.17/net/ipv4/af_inet.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./net/ipv4/af_inet.c 2007-01-08 15:25:03.000000000 +0000 +@@ -1097,6 +1097,40 @@ int inet_sk_rebuild_header(struct sock * EXPORT_SYMBOL(inet_sk_rebuild_header); @@ -348,7 +356,7 @@ diff -pruN ../orig-linux-2.6.16.29/net/ipv4/af_inet.c ./net/ipv4/af_inet.c static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features) { struct sk_buff *segs = ERR_PTR(-EINVAL); -@@ -1142,6 +1176,7 @@ static struct net_protocol igmp_protocol +@@ -1154,6 +1188,7 @@ static struct net_protocol igmp_protocol static struct net_protocol tcp_protocol = { .handler = tcp_v4_rcv, .err_handler = tcp_v4_err, @@ -356,7 +364,7 @@ diff -pruN ../orig-linux-2.6.16.29/net/ipv4/af_inet.c ./net/ipv4/af_inet.c .gso_segment = tcp_tso_segment, .no_policy = 1, }; -@@ -1188,6 +1223,7 @@ static int ipv4_proc_init(void); +@@ -1200,6 +1235,7 @@ static int ipv4_proc_init(void); static struct packet_type ip_packet_type = { .type = __constant_htons(ETH_P_IP), .func = ip_rcv, @@ -364,9 +372,9 @@ diff -pruN ../orig-linux-2.6.16.29/net/ipv4/af_inet.c ./net/ipv4/af_inet.c .gso_segment = inet_gso_segment, }; -diff -pruN ../orig-linux-2.6.16.29/net/ipv4/ip_output.c ./net/ipv4/ip_output.c ---- ../orig-linux-2.6.16.29/net/ipv4/ip_output.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./net/ipv4/ip_output.c 2006-09-19 13:59:46.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/net/ipv4/ip_output.c ./net/ipv4/ip_output.c +--- ../orig-linux-2.6.17/net/ipv4/ip_output.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./net/ipv4/ip_output.c 2007-01-08 15:25:03.000000000 +0000 @@ -210,7 +210,7 @@ static inline int ip_finish_output(struc return dst_output(skb); } @@ -385,9 +393,9 @@ diff -pruN ../orig-linux-2.6.16.29/net/ipv4/ip_output.c ./net/ipv4/ip_output.c len = size; else { -diff -pruN ../orig-linux-2.6.16.29/net/ipv4/tcp_ipv4.c ./net/ipv4/tcp_ipv4.c ---- ../orig-linux-2.6.16.29/net/ipv4/tcp_ipv4.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./net/ipv4/tcp_ipv4.c 2006-09-19 13:59:46.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/net/ipv4/tcp_ipv4.c ./net/ipv4/tcp_ipv4.c +--- ../orig-linux-2.6.17/net/ipv4/tcp_ipv4.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./net/ipv4/tcp_ipv4.c 2007-01-08 15:25:03.000000000 +0000 @@ -495,6 +495,24 @@ void tcp_v4_send_check(struct sock *sk, } } @@ -413,9 +421,9 @@ diff -pruN ../orig-linux-2.6.16.29/net/ipv4/tcp_ipv4.c ./net/ipv4/tcp_ipv4.c /* * This routine will send an RST to the other tcp. * -diff -pruN ../orig-linux-2.6.16.29/net/ipv4/xfrm4_output.c ./net/ipv4/xfrm4_output.c ---- ../orig-linux-2.6.16.29/net/ipv4/xfrm4_output.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./net/ipv4/xfrm4_output.c 2006-09-19 13:59:46.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/net/ipv4/xfrm4_output.c ./net/ipv4/xfrm4_output.c +--- ../orig-linux-2.6.17/net/ipv4/xfrm4_output.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./net/ipv4/xfrm4_output.c 2007-01-08 15:25:03.000000000 +0000 @@ -195,7 +195,7 @@ static int xfrm4_output_finish(struct sk } #endif @@ -425,9 +433,9 @@ diff -pruN ../orig-linux-2.6.16.29/net/ipv4/xfrm4_output.c ./net/ipv4/xfrm4_outp return xfrm4_output_finish2(skb); skb->protocol = htons(ETH_P_IP); -diff -pruN ../orig-linux-2.6.16.29/net/ipv6/ip6_output.c ./net/ipv6/ip6_output.c ---- ../orig-linux-2.6.16.29/net/ipv6/ip6_output.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./net/ipv6/ip6_output.c 2006-09-19 13:59:46.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/net/ipv6/ip6_output.c ./net/ipv6/ip6_output.c +--- ../orig-linux-2.6.17/net/ipv6/ip6_output.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./net/ipv6/ip6_output.c 2007-01-08 15:25:03.000000000 +0000 @@ -147,7 +147,7 @@ static int ip6_output2(struct sk_buff *s int ip6_output(struct sk_buff *skb) @@ -437,9 +445,9 @@ diff -pruN ../orig-linux-2.6.16.29/net/ipv6/ip6_output.c ./net/ipv6/ip6_output.c dst_allfrag(skb->dst)) return ip6_fragment(skb, ip6_output2); else -diff -pruN ../orig-linux-2.6.16.29/net/ipv6/xfrm6_output.c ./net/ipv6/xfrm6_output.c ---- ../orig-linux-2.6.16.29/net/ipv6/xfrm6_output.c 2006-09-19 13:59:20.000000000 +0100 -+++ ./net/ipv6/xfrm6_output.c 2006-09-19 13:59:46.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/net/ipv6/xfrm6_output.c ./net/ipv6/xfrm6_output.c +--- ../orig-linux-2.6.17/net/ipv6/xfrm6_output.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./net/ipv6/xfrm6_output.c 2007-01-08 15:25:03.000000000 +0000 @@ -179,7 +179,7 @@ static int xfrm6_output_finish(struct sk { struct sk_buff *segs; diff --git a/patches/linux-2.6.16.33/net-gso-3-fix-errorcheck.patch b/patches/linux-2.6.17/net-gso-3-fix-errorcheck.patch index 0c373223d8..080fba449b 100644 --- a/patches/linux-2.6.16.33/net-gso-3-fix-errorcheck.patch +++ b/patches/linux-2.6.17/net-gso-3-fix-errorcheck.patch @@ -1,7 +1,7 @@ -diff -pruN ../orig-linux-2.6.16.29/include/linux/netdevice.h ./include/linux/netdevice.h ---- ../orig-linux-2.6.16.29/include/linux/netdevice.h 2006-09-19 13:59:46.000000000 +0100 -+++ ./include/linux/netdevice.h 2006-09-19 14:05:28.000000000 +0100 -@@ -930,10 +930,10 @@ static inline void netif_tx_lock_bh(stru +diff -pruN ../orig-linux-2.6.17/include/linux/netdevice.h ./include/linux/netdevice.h +--- ../orig-linux-2.6.17/include/linux/netdevice.h 2007-01-08 15:25:03.000000000 +0000 ++++ ./include/linux/netdevice.h 2007-01-08 15:27:08.000000000 +0000 +@@ -919,10 +919,10 @@ static inline void netif_tx_lock_bh(stru static inline int netif_tx_trylock(struct net_device *dev) { diff --git a/patches/linux-2.6.16.33/net-gso-4-kill-warnon.patch b/patches/linux-2.6.17/net-gso-4-kill-warnon.patch index 86cd7a2b47..f71eec2161 100644 --- a/patches/linux-2.6.16.33/net-gso-4-kill-warnon.patch +++ b/patches/linux-2.6.17/net-gso-4-kill-warnon.patch @@ -1,7 +1,7 @@ -diff -pruN ../orig-linux-2.6.16.29/net/core/dev.c ./net/core/dev.c ---- ../orig-linux-2.6.16.29/net/core/dev.c 2006-09-19 13:59:46.000000000 +0100 -+++ ./net/core/dev.c 2006-09-19 14:05:32.000000000 +0100 -@@ -1087,11 +1087,6 @@ int skb_checksum_help(struct sk_buff *sk +diff -pruN ../orig-linux-2.6.17/net/core/dev.c ./net/core/dev.c +--- ../orig-linux-2.6.17/net/core/dev.c 2007-01-08 15:25:03.000000000 +0000 ++++ ./net/core/dev.c 2007-01-08 15:27:22.000000000 +0000 +@@ -1160,11 +1160,6 @@ int skb_checksum_help(struct sk_buff *sk goto out_set_summed; if (unlikely(skb_shinfo(skb)->gso_size)) { @@ -13,7 +13,7 @@ diff -pruN ../orig-linux-2.6.16.29/net/core/dev.c ./net/core/dev.c /* Let GSO fix up the checksum. */ goto out_set_summed; } -@@ -1141,11 +1136,6 @@ struct sk_buff *skb_gso_segment(struct s +@@ -1214,11 +1209,6 @@ struct sk_buff *skb_gso_segment(struct s __skb_pull(skb, skb->mac_len); if (unlikely(skb->ip_summed != CHECKSUM_HW)) { diff --git a/patches/linux-2.6.16.33/net-gso-5-rcv-mss.patch b/patches/linux-2.6.17/net-gso-5-rcv-mss.patch index a711d0ee5f..d8bb430053 100644 --- a/patches/linux-2.6.16.33/net-gso-5-rcv-mss.patch +++ b/patches/linux-2.6.17/net-gso-5-rcv-mss.patch @@ -1,7 +1,6 @@ -diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c -index 104af5d..1fa1536 100644 ---- a/net/ipv4/tcp_input.c -+++ b/net/ipv4/tcp_input.c +diff -pruN ../orig-linux-2.6.17/net/ipv4/tcp_input.c ./net/ipv4/tcp_input.c +--- ../orig-linux-2.6.17/net/ipv4/tcp_input.c 2007-01-08 15:16:27.000000000 +0000 ++++ ./net/ipv4/tcp_input.c 2007-01-08 15:27:35.000000000 +0000 @@ -127,7 +127,7 @@ static void tcp_measure_rcv_mss(struct s /* skb->len may jitter because of SACKs, even if peer * sends good full-sized frames. diff --git a/patches/linux-2.6.16.33/net-gso-6-linear-segmentation.patch b/patches/linux-2.6.17/net-gso-6-linear-segmentation.patch index 5e615a14a7..6bc75fc790 100644 --- a/patches/linux-2.6.16.33/net-gso-6-linear-segmentation.patch +++ b/patches/linux-2.6.17/net-gso-6-linear-segmentation.patch @@ -1,7 +1,7 @@ -diff -Naru a/net/core/skbuff.c b/net/core/skbuff.c ---- a/net/core/skbuff.c 2006-12-14 09:32:04 -08:00 -+++ b/net/core/skbuff.c 2006-12-14 09:32:04 -08:00 -@@ -1946,7 +1946,7 @@ +diff -pruN ../orig-linux-2.6.17/net/core/skbuff.c ./net/core/skbuff.c +--- ../orig-linux-2.6.17/net/core/skbuff.c 2007-01-08 15:21:05.000000000 +0000 ++++ ./net/core/skbuff.c 2007-01-08 15:27:48.000000000 +0000 +@@ -1859,7 +1859,7 @@ struct sk_buff *skb_segment(struct sk_bu do { struct sk_buff *nskb; skb_frag_t *frag; @@ -10,7 +10,7 @@ diff -Naru a/net/core/skbuff.c b/net/core/skbuff.c int k; int size; -@@ -1957,11 +1957,10 @@ +@@ -1870,11 +1870,10 @@ struct sk_buff *skb_segment(struct sk_bu hsize = skb_headlen(skb) - offset; if (hsize < 0) hsize = 0; @@ -24,3 +24,4 @@ diff -Naru a/net/core/skbuff.c b/net/core/skbuff.c + nskb = alloc_skb(hsize + doffset + headroom, GFP_ATOMIC); if (unlikely(!nskb)) goto err; + diff --git a/patches/linux-2.6.16.33/pmd-shared.patch b/patches/linux-2.6.17/pmd-shared.patch index f8123a96ba..4764aa1768 100644 --- a/patches/linux-2.6.16.33/pmd-shared.patch +++ b/patches/linux-2.6.17/pmd-shared.patch @@ -1,7 +1,7 @@ -diff -pruN ../orig-linux-2.6.16.29/arch/i386/mm/pageattr.c ./arch/i386/mm/pageattr.c ---- ../orig-linux-2.6.16.29/arch/i386/mm/pageattr.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/i386/mm/pageattr.c 2006-09-19 14:05:35.000000000 +0100 -@@ -78,7 +78,7 @@ static void set_pmd_pte(pte_t *kpte, uns +diff -pruN ../orig-linux-2.6.17/arch/i386/mm/pageattr.c ./arch/i386/mm/pageattr.c +--- ../orig-linux-2.6.17/arch/i386/mm/pageattr.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/i386/mm/pageattr.c 2007-01-08 15:32:50.000000000 +0000 +@@ -85,7 +85,7 @@ static void set_pmd_pte(pte_t *kpte, uns unsigned long flags; set_pte_atomic(kpte, pte); /* change init_mm */ @@ -10,9 +10,9 @@ diff -pruN ../orig-linux-2.6.16.29/arch/i386/mm/pageattr.c ./arch/i386/mm/pageat return; spin_lock_irqsave(&pgd_lock, flags); -diff -pruN ../orig-linux-2.6.16.29/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c ---- ../orig-linux-2.6.16.29/arch/i386/mm/pgtable.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/i386/mm/pgtable.c 2006-09-19 14:05:35.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c +--- ../orig-linux-2.6.17/arch/i386/mm/pgtable.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/i386/mm/pgtable.c 2007-01-08 15:32:50.000000000 +0000 @@ -215,9 +215,10 @@ void pgd_ctor(void *pgd, kmem_cache_t *c spin_lock_irqsave(&pgd_lock, flags); } @@ -85,9 +85,9 @@ diff -pruN ../orig-linux-2.6.16.29/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable /* in the non-PAE case, free_pgtables() clears user pgd entries */ kmem_cache_free(pgd_cache, pgd); } -diff -pruN ../orig-linux-2.6.16.29/include/asm-i386/pgtable-2level-defs.h ./include/asm-i386/pgtable-2level-defs.h ---- ../orig-linux-2.6.16.29/include/asm-i386/pgtable-2level-defs.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/asm-i386/pgtable-2level-defs.h 2006-09-19 14:05:35.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/include/asm-i386/pgtable-2level-defs.h ./include/asm-i386/pgtable-2level-defs.h +--- ../orig-linux-2.6.17/include/asm-i386/pgtable-2level-defs.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./include/asm-i386/pgtable-2level-defs.h 2007-01-08 15:32:50.000000000 +0000 @@ -1,6 +1,8 @@ #ifndef _I386_PGTABLE_2LEVEL_DEFS_H #define _I386_PGTABLE_2LEVEL_DEFS_H @@ -97,9 +97,9 @@ diff -pruN ../orig-linux-2.6.16.29/include/asm-i386/pgtable-2level-defs.h ./incl /* * traditional i386 two-level paging structure: */ -diff -pruN ../orig-linux-2.6.16.29/include/asm-i386/pgtable-3level-defs.h ./include/asm-i386/pgtable-3level-defs.h ---- ../orig-linux-2.6.16.29/include/asm-i386/pgtable-3level-defs.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/asm-i386/pgtable-3level-defs.h 2006-09-19 14:05:35.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/include/asm-i386/pgtable-3level-defs.h ./include/asm-i386/pgtable-3level-defs.h +--- ../orig-linux-2.6.17/include/asm-i386/pgtable-3level-defs.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./include/asm-i386/pgtable-3level-defs.h 2007-01-08 15:32:50.000000000 +0000 @@ -1,6 +1,8 @@ #ifndef _I386_PGTABLE_3LEVEL_DEFS_H #define _I386_PGTABLE_3LEVEL_DEFS_H diff --git a/patches/linux-2.6.16.33/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch b/patches/linux-2.6.17/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch index 31788cc3bc..813b85b9ad 100644 --- a/patches/linux-2.6.16.33/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch +++ b/patches/linux-2.6.17/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch @@ -1,6 +1,6 @@ -diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/entry.S ./arch/i386/kernel/entry.S ---- ../orig-linux-2.6.16.29/arch/i386/kernel/entry.S 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/i386/kernel/entry.S 2006-09-19 14:05:44.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/entry.S ./arch/i386/kernel/entry.S +--- ../orig-linux-2.6.17/arch/i386/kernel/entry.S 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/i386/kernel/entry.S 2007-01-08 15:33:41.000000000 +0000 @@ -177,7 +177,7 @@ need_resched: # sysenter call handler stub @@ -10,7 +10,7 @@ diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/entry.S ./arch/i386/kernel/e sysenter_past_esp: sti pushl $(__USER_DS) -@@ -492,7 +492,7 @@ device_not_available_emulate: +@@ -496,7 +496,7 @@ device_not_available_emulate: * that sets up the real kernel stack. Check here, since we can't * allow the wrong stack to be used. * @@ -19,7 +19,7 @@ diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/entry.S ./arch/i386/kernel/e * already pushed 3 words if it hits on the sysenter instruction: * eflags, cs and eip. * -@@ -504,7 +504,7 @@ device_not_available_emulate: +@@ -508,7 +508,7 @@ device_not_available_emulate: cmpw $__KERNEL_CS,4(%esp); \ jne ok; \ label: \ diff --git a/patches/linux-2.6.16.33/series b/patches/linux-2.6.17/series index 8410fb3bde..07bbfe8397 100644 --- a/patches/linux-2.6.16.33/series +++ b/patches/linux-2.6.17/series @@ -5,7 +5,6 @@ linux-2.6.19-rc1-kexec-move_segment_code-i386.patch git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch blktap-aio-16_03_06.patch -device_bind.patch fix-hz-suspend.patch fix-ide-cd-pio-mode.patch i386-mach-io-check-nmi.patch @@ -18,12 +17,8 @@ net-gso-3-fix-errorcheck.patch net-gso-4-kill-warnon.patch net-gso-5-rcv-mss.patch net-gso-6-linear-segmentation.patch -pci-mmconfig-fix-from-2.6.17.patch pmd-shared.patch -rcu_needs_cpu.patch rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch -smp-alts.patch -tpm_plugin_2.6.17.patch x86-increase-interrupt-vector-range.patch xen-hotplug.patch xenoprof-generic.patch diff --git a/patches/linux-2.6.16.33/vsnprintf.patch b/patches/linux-2.6.17/vsnprintf.patch index 3e32773986..4d2cf24831 100644 --- a/patches/linux-2.6.16.33/vsnprintf.patch +++ b/patches/linux-2.6.17/vsnprintf.patch @@ -1,35 +1,7 @@ -commit f796937a062c7aeb44cd0e75e1586c8543634a7d -Author: Jeremy Fitzhardinge <jeremy@xensource.com> -Date: Sun Jun 25 05:49:17 2006 -0700 - - [PATCH] Fix bounds check in vsnprintf, to allow for a 0 size and NULL buffer - - This change allows callers to use a 0-byte buffer and a NULL buffer pointer - with vsnprintf, so it can be used to determine how large the resulting - formatted string will be. - - Previously the code effectively treated a size of 0 as a size of 4G (on - 32-bit systems), with other checks preventing it from actually trying to - emit the string - but the terminal \0 would still be written, which would - crash if the buffer is NULL. - - This change changes the boundary check so that 'end' points to the putative - location of the terminal '\0', which is only written if size > 0. - - vsnprintf still allows the buffer size to be set very large, to allow - unbounded buffer sizes (to implement sprintf, etc). - - [akpm@osdl.org: fix long-vs-longlong confusion] - Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> - Signed-off-by: Chris Wright <chrisw@sous-sol.org> - Signed-off-by: Andrew Morton <akpm@osdl.org> - Signed-off-by: Linus Torvalds <torvalds@osdl.org> - -diff --git a/lib/vsprintf.c b/lib/vsprintf.c -index b07db5c..f595947 100644 ---- a/lib/vsprintf.c -+++ b/lib/vsprintf.c -@@ -187,49 +187,49 @@ static char * number(char * buf, char * +diff -pruN ../orig-linux-2.6.17/lib/vsprintf.c ./lib/vsprintf.c +--- ../orig-linux-2.6.17/lib/vsprintf.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./lib/vsprintf.c 2007-01-08 15:38:07.000000000 +0000 +@@ -187,49 +187,49 @@ static char * number(char * buf, char * size -= precision; if (!(type&(ZEROPAD+LEFT))) { while(size-->0) { diff --git a/patches/linux-2.6.16.33/x86-elfnote-as-preprocessor-macro.patch b/patches/linux-2.6.17/x86-elfnote-as-preprocessor-macro.patch index 3dcae42ffd..caa9fb451f 100644 --- a/patches/linux-2.6.16.33/x86-elfnote-as-preprocessor-macro.patch +++ b/patches/linux-2.6.17/x86-elfnote-as-preprocessor-macro.patch @@ -1,6 +1,6 @@ -diff -pruN ../orig-linux-2.6.16.29/include/linux/elfnote.h ./include/linux/elfnote.h ---- ../orig-linux-2.6.16.29/include/linux/elfnote.h 2006-09-19 14:06:10.000000000 +0100 -+++ ./include/linux/elfnote.h 2006-09-19 14:06:20.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/include/linux/elfnote.h ./include/linux/elfnote.h +--- ../orig-linux-2.6.17/include/linux/elfnote.h 2007-01-08 15:37:15.000000000 +0000 ++++ ./include/linux/elfnote.h 2007-01-08 15:37:52.000000000 +0000 @@ -31,22 +31,24 @@ /* * Generate a structure with the same shape as Elf{32,64}_Nhdr (which diff --git a/patches/linux-2.6.16.33/x86-increase-interrupt-vector-range.patch b/patches/linux-2.6.17/x86-increase-interrupt-vector-range.patch index 0ac84e4aca..5d64cbb6b8 100644 --- a/patches/linux-2.6.16.33/x86-increase-interrupt-vector-range.patch +++ b/patches/linux-2.6.17/x86-increase-interrupt-vector-range.patch @@ -1,7 +1,7 @@ -diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/entry.S ./arch/i386/kernel/entry.S ---- ../orig-linux-2.6.16.29/arch/i386/kernel/entry.S 2006-09-19 14:05:44.000000000 +0100 -+++ ./arch/i386/kernel/entry.S 2006-09-19 14:05:56.000000000 +0100 -@@ -406,7 +406,7 @@ vector=0 +diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/entry.S ./arch/i386/kernel/entry.S +--- ../orig-linux-2.6.17/arch/i386/kernel/entry.S 2007-01-08 15:33:41.000000000 +0000 ++++ ./arch/i386/kernel/entry.S 2007-01-08 15:36:17.000000000 +0000 +@@ -410,7 +410,7 @@ vector=0 ENTRY(irq_entries_start) .rept NR_IRQS ALIGN @@ -10,7 +10,7 @@ diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/entry.S ./arch/i386/kernel/e jmp common_interrupt .data .long 1b -@@ -423,7 +423,7 @@ common_interrupt: +@@ -427,7 +427,7 @@ common_interrupt: #define BUILD_INTERRUPT(name, nr) \ ENTRY(name) \ @@ -19,9 +19,9 @@ diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/entry.S ./arch/i386/kernel/e SAVE_ALL \ movl %esp,%eax; \ call smp_/**/name; \ -diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/irq.c ./arch/i386/kernel/irq.c ---- ../orig-linux-2.6.16.29/arch/i386/kernel/irq.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/i386/kernel/irq.c 2006-09-19 14:05:56.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/irq.c ./arch/i386/kernel/irq.c +--- ../orig-linux-2.6.17/arch/i386/kernel/irq.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/i386/kernel/irq.c 2007-01-08 15:36:18.000000000 +0000 @@ -53,8 +53,8 @@ static union irq_ctx *softirq_ctx[NR_CPU */ fastcall unsigned int do_IRQ(struct pt_regs *regs) @@ -33,9 +33,9 @@ diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/irq.c ./arch/i386/kernel/irq #ifdef CONFIG_4KSTACKS union irq_ctx *curctx, *irqctx; u32 *isp; -diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/entry.S ./arch/x86_64/kernel/entry.S ---- ../orig-linux-2.6.16.29/arch/x86_64/kernel/entry.S 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/x86_64/kernel/entry.S 2006-09-19 14:05:56.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/entry.S ./arch/x86_64/kernel/entry.S +--- ../orig-linux-2.6.17/arch/x86_64/kernel/entry.S 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/x86_64/kernel/entry.S 2007-01-08 15:36:18.000000000 +0000 @@ -596,7 +596,7 @@ retint_kernel: */ .macro apicinterrupt num,func @@ -45,10 +45,10 @@ diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/entry.S ./arch/x86_64/kern CFI_ADJUST_CFA_OFFSET 8 interrupt \func jmp ret_from_intr -diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/irq.c ./arch/x86_64/kernel/irq.c ---- ../orig-linux-2.6.16.29/arch/x86_64/kernel/irq.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/x86_64/kernel/irq.c 2006-09-19 14:05:56.000000000 +0100 -@@ -96,8 +96,8 @@ skip: +diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/irq.c ./arch/x86_64/kernel/irq.c +--- ../orig-linux-2.6.17/arch/x86_64/kernel/irq.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/x86_64/kernel/irq.c 2007-01-08 15:36:18.000000000 +0000 +@@ -91,8 +91,8 @@ skip: */ asmlinkage unsigned int do_IRQ(struct pt_regs *regs) { @@ -59,9 +59,9 @@ diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/irq.c ./arch/x86_64/kernel exit_idle(); irq_enter(); -diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/smp.c ./arch/x86_64/kernel/smp.c ---- ../orig-linux-2.6.16.29/arch/x86_64/kernel/smp.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/x86_64/kernel/smp.c 2006-09-19 14:05:56.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/smp.c ./arch/x86_64/kernel/smp.c +--- ../orig-linux-2.6.17/arch/x86_64/kernel/smp.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/x86_64/kernel/smp.c 2007-01-08 15:36:18.000000000 +0000 @@ -135,10 +135,10 @@ asmlinkage void smp_invalidate_interrupt cpu = smp_processor_id(); @@ -75,9 +75,9 @@ diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/smp.c ./arch/x86_64/kernel f = &per_cpu(flush_state, sender); if (!cpu_isset(cpu, f->flush_cpumask)) -diff -pruN ../orig-linux-2.6.16.29/include/asm-x86_64/hw_irq.h ./include/asm-x86_64/hw_irq.h ---- ../orig-linux-2.6.16.29/include/asm-x86_64/hw_irq.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/asm-x86_64/hw_irq.h 2006-09-19 14:05:56.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/include/asm-x86_64/hw_irq.h ./include/asm-x86_64/hw_irq.h +--- ../orig-linux-2.6.17/include/asm-x86_64/hw_irq.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./include/asm-x86_64/hw_irq.h 2007-01-08 15:36:18.000000000 +0000 @@ -127,7 +127,7 @@ asmlinkage void IRQ_NAME(nr); \ __asm__( \ "\n.p2align\n" \ diff --git a/patches/linux-2.6.16.33/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch b/patches/linux-2.6.17/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch index 1047ee417c..63601d613f 100644 --- a/patches/linux-2.6.16.33/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch +++ b/patches/linux-2.6.17/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch @@ -1,7 +1,7 @@ -diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/vmlinux.lds.S ./arch/i386/kernel/vmlinux.lds.S ---- ../orig-linux-2.6.16.29/arch/i386/kernel/vmlinux.lds.S 2006-09-19 14:05:48.000000000 +0100 -+++ ./arch/i386/kernel/vmlinux.lds.S 2006-09-19 14:06:10.000000000 +0100 -@@ -12,6 +12,12 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386" +diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/vmlinux.lds.S ./arch/i386/kernel/vmlinux.lds.S +--- ../orig-linux-2.6.17/arch/i386/kernel/vmlinux.lds.S 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/i386/kernel/vmlinux.lds.S 2007-01-08 15:37:15.000000000 +0000 +@@ -13,6 +13,12 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386" OUTPUT_ARCH(i386) ENTRY(phys_startup_32) jiffies = jiffies_64; @@ -14,7 +14,7 @@ diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/vmlinux.lds.S ./arch/i386/ke SECTIONS { . = __KERNEL_START; -@@ -25,7 +31,7 @@ SECTIONS +@@ -26,7 +32,7 @@ SECTIONS KPROBES_TEXT *(.fixup) *(.gnu.warning) @@ -23,7 +23,7 @@ diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/vmlinux.lds.S ./arch/i386/ke _etext = .; /* End of text section */ -@@ -47,7 +53,7 @@ SECTIONS +@@ -41,7 +47,7 @@ SECTIONS .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */ *(.data) CONSTRUCTORS @@ -32,26 +32,26 @@ diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/vmlinux.lds.S ./arch/i386/ke . = ALIGN(4096); __nosave_begin = .; -@@ -154,4 +160,6 @@ SECTIONS +@@ -168,4 +174,6 @@ SECTIONS STABS_DEBUG DWARF_DEBUG + + NOTES } -diff -pruN ../orig-linux-2.6.16.29/include/asm-generic/vmlinux.lds.h ./include/asm-generic/vmlinux.lds.h ---- ../orig-linux-2.6.16.29/include/asm-generic/vmlinux.lds.h 2006-09-12 19:02:10.000000000 +0100 -+++ ./include/asm-generic/vmlinux.lds.h 2006-09-19 14:06:10.000000000 +0100 -@@ -152,3 +152,6 @@ +diff -pruN ../orig-linux-2.6.17/include/asm-generic/vmlinux.lds.h ./include/asm-generic/vmlinux.lds.h +--- ../orig-linux-2.6.17/include/asm-generic/vmlinux.lds.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./include/asm-generic/vmlinux.lds.h 2007-01-08 15:37:15.000000000 +0000 +@@ -166,3 +166,6 @@ .stab.index 0 : { *(.stab.index) } \ .stab.indexstr 0 : { *(.stab.indexstr) } \ .comment 0 : { *(.comment) } + +#define NOTES \ + .notes : { *(.note.*) } :note -diff -pruN ../orig-linux-2.6.16.29/include/linux/elfnote.h ./include/linux/elfnote.h ---- ../orig-linux-2.6.16.29/include/linux/elfnote.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/linux/elfnote.h 2006-09-19 14:06:10.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/include/linux/elfnote.h ./include/linux/elfnote.h +--- ../orig-linux-2.6.17/include/linux/elfnote.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./include/linux/elfnote.h 2007-01-08 15:37:15.000000000 +0000 @@ -0,0 +1,88 @@ +#ifndef _LINUX_ELFNOTE_H +#define _LINUX_ELFNOTE_H diff --git a/patches/linux-2.6.16.33/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch b/patches/linux-2.6.17/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch index 7e44d833b4..60e92deb8a 100644 --- a/patches/linux-2.6.16.33/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch +++ b/patches/linux-2.6.17/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch @@ -1,6 +1,6 @@ -diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/kernel/vmlinux.lds.S ---- ../orig-linux-2.6.16.29/arch/x86_64/kernel/vmlinux.lds.S 2006-09-12 19:02:10.000000000 +0100 -+++ ./arch/x86_64/kernel/vmlinux.lds.S 2006-09-19 14:06:15.000000000 +0100 +diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/kernel/vmlinux.lds.S +--- ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S 2006-06-18 02:49:35.000000000 +0100 ++++ ./arch/x86_64/kernel/vmlinux.lds.S 2007-01-08 15:37:29.000000000 +0000 @@ -14,6 +14,12 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86 OUTPUT_ARCH(i386:x86-64) ENTRY(phys_startup_64) @@ -14,7 +14,7 @@ diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_6 SECTIONS { . = __START_KERNEL; -@@ -26,7 +32,7 @@ SECTIONS +@@ -32,7 +38,7 @@ SECTIONS KPROBES_TEXT *(.fixup) *(.gnu.warning) @@ -23,7 +23,7 @@ diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_6 /* out-of-line lock text */ .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET) { *(.text.lock) } -@@ -43,17 +49,10 @@ SECTIONS +@@ -49,17 +55,10 @@ SECTIONS .data : AT(ADDR(.data) - LOAD_OFFSET) { *(.data) CONSTRUCTORS @@ -42,7 +42,7 @@ diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_6 . = ALIGN(PAGE_SIZE); . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { -@@ -75,7 +74,7 @@ SECTIONS +@@ -81,7 +80,7 @@ SECTIONS #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET) . = VSYSCALL_ADDR; @@ -51,7 +51,7 @@ diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_6 __vsyscall_0 = VSYSCALL_VIRT_ADDR; . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); -@@ -118,7 +117,7 @@ SECTIONS +@@ -124,7 +123,7 @@ SECTIONS . = ALIGN(8192); /* init_task */ .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { *(.data.init_task) @@ -60,7 +60,7 @@ diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_6 . = ALIGN(4096); .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { -@@ -188,6 +187,14 @@ SECTIONS +@@ -194,6 +193,14 @@ SECTIONS . = ALIGN(4096); __nosave_end = .; @@ -75,7 +75,7 @@ diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_6 _end = . ; /* Sections to be discarded */ -@@ -201,4 +208,6 @@ SECTIONS +@@ -207,4 +214,6 @@ SECTIONS STABS_DEBUG DWARF_DEBUG diff --git a/patches/linux-2.6.16.33/xen-hotplug.patch b/patches/linux-2.6.17/xen-hotplug.patch index 06abdda41b..4e0a8e7809 100644 --- a/patches/linux-2.6.16.33/xen-hotplug.patch +++ b/patches/linux-2.6.17/xen-hotplug.patch @@ -1,7 +1,7 @@ -diff -pruN ../orig-linux-2.6.16.29/fs/proc/proc_misc.c ./fs/proc/proc_misc.c ---- ../orig-linux-2.6.16.29/fs/proc/proc_misc.c 2006-09-12 19:02:10.000000000 +0100 -+++ ./fs/proc/proc_misc.c 2006-09-19 14:06:00.000000000 +0100 -@@ -433,7 +433,7 @@ static int show_stat(struct seq_file *p, +diff -pruN ../orig-linux-2.6.17/fs/proc/proc_misc.c ./fs/proc/proc_misc.c +--- ../orig-linux-2.6.17/fs/proc/proc_misc.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./fs/proc/proc_misc.c 2007-01-08 15:36:49.000000000 +0000 +@@ -467,7 +467,7 @@ static int show_stat(struct seq_file *p, (unsigned long long)cputime64_to_clock_t(irq), (unsigned long long)cputime64_to_clock_t(softirq), (unsigned long long)cputime64_to_clock_t(steal)); diff --git a/patches/linux-2.6.16.33/xenoprof-generic.patch b/patches/linux-2.6.17/xenoprof-generic.patch index 7783495f70..8dd9d0f5c0 100644 --- a/patches/linux-2.6.16.33/xenoprof-generic.patch +++ b/patches/linux-2.6.17/xenoprof-generic.patch @@ -1,6 +1,6 @@ -diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/buffer_sync.c ./drivers/oprofile/buffer_sync.c ---- ../orig-linux-2.6.16.29/drivers/oprofile/buffer_sync.c 2006-11-06 14:46:52.000000000 -0800 -+++ ./drivers/oprofile/buffer_sync.c 2006-11-06 15:16:52.000000000 -0800 +diff -pruN ../orig-linux-2.6.17/drivers/oprofile/buffer_sync.c ./drivers/oprofile/buffer_sync.c +--- ../orig-linux-2.6.17/drivers/oprofile/buffer_sync.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./drivers/oprofile/buffer_sync.c 2007-01-08 15:36:54.000000000 +0000 @@ -6,6 +6,10 @@ * * @author John Levon <levon@movementarian.org> @@ -168,9 +168,9 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/buffer_sync.c ./drivers/opro mark_done(cpu); up(&buffer_sem); -diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/cpu_buffer.c ./drivers/oprofile/cpu_buffer.c ---- ../orig-linux-2.6.16.29/drivers/oprofile/cpu_buffer.c 2006-11-06 14:46:52.000000000 -0800 -+++ ./drivers/oprofile/cpu_buffer.c 2006-11-06 14:47:55.000000000 -0800 +diff -pruN ../orig-linux-2.6.17/drivers/oprofile/cpu_buffer.c ./drivers/oprofile/cpu_buffer.c +--- ../orig-linux-2.6.17/drivers/oprofile/cpu_buffer.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./drivers/oprofile/cpu_buffer.c 2007-01-08 15:36:54.000000000 +0000 @@ -6,6 +6,10 @@ * * @author John Levon <levon@movementarian.org> @@ -191,7 +191,7 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/cpu_buffer.c ./drivers/oprof void free_cpu_buffers(void) { int i; -@@ -58,7 +64,7 @@ int alloc_cpu_buffers(void) +@@ -57,7 +63,7 @@ int alloc_cpu_buffers(void) goto fail; b->last_task = NULL; @@ -200,7 +200,7 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/cpu_buffer.c ./drivers/oprof b->tracing = 0; b->buffer_size = buffer_size; b->tail_pos = 0; -@@ -114,7 +120,7 @@ void cpu_buffer_reset(struct oprofile_cp +@@ -113,7 +119,7 @@ void cpu_buffer_reset(struct oprofile_cp * collected will populate the buffer with proper * values to initialize the buffer */ @@ -209,7 +209,7 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/cpu_buffer.c ./drivers/oprof cpu_buf->last_task = NULL; } -@@ -164,13 +170,13 @@ add_code(struct oprofile_cpu_buffer * bu +@@ -163,13 +169,13 @@ add_code(struct oprofile_cpu_buffer * bu * because of the head/tail separation of the writer and reader * of the CPU buffer. * @@ -227,7 +227,7 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/cpu_buffer.c ./drivers/oprof { struct task_struct * task; -@@ -181,18 +187,18 @@ static int log_sample(struct oprofile_cp +@@ -180,18 +186,18 @@ static int log_sample(struct oprofile_cp return 0; } @@ -253,7 +253,7 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/cpu_buffer.c ./drivers/oprof cpu_buf->last_task = task; add_code(cpu_buf, (unsigned long)task); } -@@ -269,6 +275,25 @@ void oprofile_add_trace(unsigned long pc +@@ -275,6 +281,25 @@ void oprofile_add_trace(unsigned long pc add_sample(cpu_buf, pc, 0); } @@ -279,9 +279,9 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/cpu_buffer.c ./drivers/oprof /* * This serves to avoid cpu buffer overflow, and makes sure * the task mortuary progresses -diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/cpu_buffer.h ./drivers/oprofile/cpu_buffer.h ---- ../orig-linux-2.6.16.29/drivers/oprofile/cpu_buffer.h 2006-11-06 14:46:52.000000000 -0800 -+++ ./drivers/oprofile/cpu_buffer.h 2006-11-06 14:47:55.000000000 -0800 +diff -pruN ../orig-linux-2.6.17/drivers/oprofile/cpu_buffer.h ./drivers/oprofile/cpu_buffer.h +--- ../orig-linux-2.6.17/drivers/oprofile/cpu_buffer.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./drivers/oprofile/cpu_buffer.h 2007-01-08 15:36:54.000000000 +0000 @@ -36,7 +36,7 @@ struct oprofile_cpu_buffer { volatile unsigned long tail_pos; unsigned long buffer_size; @@ -304,9 +304,9 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/cpu_buffer.h ./drivers/oprof +#define CPU_DOMAIN_SWITCH 4 #endif /* OPROFILE_CPU_BUFFER_H */ -diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/event_buffer.h ./drivers/oprofile/event_buffer.h ---- ../orig-linux-2.6.16.29/drivers/oprofile/event_buffer.h 2006-11-06 14:46:52.000000000 -0800 -+++ ./drivers/oprofile/event_buffer.h 2006-11-06 14:47:55.000000000 -0800 +diff -pruN ../orig-linux-2.6.17/drivers/oprofile/event_buffer.h ./drivers/oprofile/event_buffer.h +--- ../orig-linux-2.6.17/drivers/oprofile/event_buffer.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./drivers/oprofile/event_buffer.h 2007-01-08 15:36:54.000000000 +0000 @@ -29,15 +29,20 @@ void wake_up_buffer_waiter(void); #define CPU_SWITCH_CODE 2 #define COOKIE_SWITCH_CODE 3 @@ -329,9 +329,9 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/event_buffer.h ./drivers/opr /* add data to the event buffer */ void add_event_entry(unsigned long data); -diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/oprof.c ./drivers/oprofile/oprof.c ---- ../orig-linux-2.6.16.29/drivers/oprofile/oprof.c 2006-11-06 14:46:52.000000000 -0800 -+++ ./drivers/oprofile/oprof.c 2006-11-06 14:47:55.000000000 -0800 +diff -pruN ../orig-linux-2.6.17/drivers/oprofile/oprof.c ./drivers/oprofile/oprof.c +--- ../orig-linux-2.6.17/drivers/oprofile/oprof.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./drivers/oprofile/oprof.c 2007-01-08 15:36:54.000000000 +0000 @@ -5,6 +5,10 @@ * @remark Read the file COPYING * @@ -385,9 +385,9 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/oprof.c ./drivers/oprofile/o int oprofile_setup(void) { int err; -diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/oprof.h ./drivers/oprofile/oprof.h ---- ../orig-linux-2.6.16.29/drivers/oprofile/oprof.h 2006-11-06 14:46:52.000000000 -0800 -+++ ./drivers/oprofile/oprof.h 2006-11-06 14:47:55.000000000 -0800 +diff -pruN ../orig-linux-2.6.17/drivers/oprofile/oprof.h ./drivers/oprofile/oprof.h +--- ../orig-linux-2.6.17/drivers/oprofile/oprof.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./drivers/oprofile/oprof.h 2007-01-08 15:36:54.000000000 +0000 @@ -35,5 +35,8 @@ void oprofile_create_files(struct super_ void oprofile_timer_init(struct oprofile_operations * ops); @@ -397,9 +397,9 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/oprof.h ./drivers/oprofile/o +int oprofile_set_passive(int passive_domains[], unsigned int pdomains); #endif /* OPROF_H */ -diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/oprofile_files.c ./drivers/oprofile/oprofile_files.c ---- ../orig-linux-2.6.16.29/drivers/oprofile/oprofile_files.c 2006-11-06 14:46:52.000000000 -0800 -+++ ./drivers/oprofile/oprofile_files.c 2006-11-06 14:47:55.000000000 -0800 +diff -pruN ../orig-linux-2.6.17/drivers/oprofile/oprofile_files.c ./drivers/oprofile/oprofile_files.c +--- ../orig-linux-2.6.17/drivers/oprofile/oprofile_files.c 2006-06-18 02:49:35.000000000 +0100 ++++ ./drivers/oprofile/oprofile_files.c 2007-01-08 15:36:54.000000000 +0000 @@ -5,15 +5,21 @@ * @remark Read the file COPYING * @@ -627,9 +627,9 @@ diff -pruN ../orig-linux-2.6.16.29/drivers/oprofile/oprofile_files.c ./drivers/o oprofilefs_create_file(sb, root, "buffer", &event_buffer_fops); oprofilefs_create_ulong(sb, root, "buffer_size", &fs_buffer_size); oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed); -diff -pruN ../orig-linux-2.6.16.29/include/linux/oprofile.h ./include/linux/oprofile.h ---- ../orig-linux-2.6.16.29/include/linux/oprofile.h 2006-11-06 14:46:42.000000000 -0800 -+++ ./include/linux/oprofile.h 2006-11-06 14:47:55.000000000 -0800 +diff -pruN ../orig-linux-2.6.17/include/linux/oprofile.h ./include/linux/oprofile.h +--- ../orig-linux-2.6.17/include/linux/oprofile.h 2006-06-18 02:49:35.000000000 +0100 ++++ ./include/linux/oprofile.h 2007-01-08 15:36:54.000000000 +0000 @@ -16,6 +16,8 @@ #include <linux/types.h> #include <linux/spinlock.h> @@ -651,7 +651,7 @@ diff -pruN ../orig-linux-2.6.16.29/include/linux/oprofile.h ./include/linux/opro /* Do any necessary interrupt setup. Optional. */ int (*setup)(void); /* Do any necessary interrupt shutdown. Optional. */ -@@ -68,6 +75,8 @@ void oprofile_add_pc(unsigned long pc, i +@@ -78,6 +85,8 @@ void oprofile_add_pc(unsigned long pc, i /* add a backtrace entry, to be called from the ->backtrace callback */ void oprofile_add_trace(unsigned long eip); |