rpms/kernel-xen/devel linux-2.6-bcm43xx-resume.patch, NONE, 1.1 linux-2.6-bcm43xx.patch, NONE, 1.1 linux-2.6-block-reduce-stack.patch, NONE, 1.1 linux-2.6-debug-account-kmalloc.patch, NONE, 1.1 linux-2.6-debug-latency-tracing.patch, NONE, 1.1 linux-2.6-dm-sync-overrun.patch, NONE, 1.1 linux-2.6-edid-check.patch, NONE, 1.1 linux-2.6-ia64-spinlock-size.patch, NONE, 1.1 linux-2.6-kill-blk_attempt_merge.patch, NONE, 1.1 linux-2.6-posix-timers-sched_time-accumulation.patch, NONE, 1.1 linux-2.6-ppc-iseries-input-layer.patch, NONE, 1.1 linux-2.6-pwc-powerup-by-default.patch, NONE, 1.1 linux-2.6-serial-nrports.patch, NONE, 1.1 linux-2.6-smsc-ircc2-pnp.patch, NONE, 1.1 linux-2.6-softcursor-persistent-alloc.patch, NONE, 1.1 linux-2.6-softmac-git.patch, NONE, 1.1 linux-2.6-usbhid-wireless-security-lock.patch, NONE, 1.1 linux-2.6-vm-clear-unreclaimable.patch, NONE, 1.1 linux-2.6-vm-debug.patch, NONE, 1.1 linux-2.6-w1-hush-debug.patch, NONE, 1.1 linux-2.6-x86-hp-reboot.patch, NONE, 1.1 linux-2.6-x86_64-ati-apic-timer.pa! tch, NONE, 1.1 linux-2.6.14-xen-compile-fixes.patch, NONE, 1.1 linux-2.6.15-usb-find-interface.patch, NONE, 1.1 linux-2.6.15-usblp-fixes.patch, NONE, 1.1 linux-2.6.15.tar.bz2.sign, NONE, 1.1 .cvsignore, 1.6, 1.7 kernel-xen.spec, 1.23, 1.24 linux-2.6-acpi-thinkpad-c2c3.patch, 1.2, 1.3 linux-2.6-crash-xen.patch, 1.2, 1.3 linux-2.6-crashdump-common.patch, 1.2, 1.3 linux-2.6-debug-oops-pause.patch, 1.2, 1.3 linux-2.6-debug-spinlock-taint.patch, 1.2, 1.3 linux-2.6-execshield-xen.patch, 1.2, 1.3 linux-2.6-execshield.patch, 1.2, 1.3 linux-2.6-gcc41.patch, 1.2, 1.3 linux-2.6-ub.patch, 1.2, 1.3 linux-2.6-xen-merge.patch, 1.2, 1.3 linux-2.6-xen-no-tls-warn.patch, 1.2, 1.3 linux-2.6-xen-vdso-note.patch, 1.2, 1.3 linux-2.6.14-xen_remap_vma_flags.patch, 1.2, 1.3 sources, 1.6, 1.7 upstream, 1.3, 1.4 linux-2.6-acpi-acpica-20051202.patch, 1.2, NONE linux-2.6-apm-depends-fix.patch, 1.1, NONE linux-2.6-debug-spinlock-symbol.patch, 1.2, NONE linux-2.6-g5-thermal-overload.patch, 1.2, NONE linux-2.6-missing-exports.patch, 1.2, NONE linux-2.6-usb-s! uspend.patch,1.2,NONE linux-2.6.14-kauditd-suspend.patch,1.2,N! ONE linu

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Jan 9 20:42:22 UTC 2006


Author: sct

Update of /cvs/dist/rpms/kernel-xen/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv20340

Modified Files:
	.cvsignore kernel-xen.spec linux-2.6-acpi-thinkpad-c2c3.patch 
	linux-2.6-crash-xen.patch linux-2.6-crashdump-common.patch 
	linux-2.6-debug-oops-pause.patch 
	linux-2.6-debug-spinlock-taint.patch 
	linux-2.6-execshield-xen.patch linux-2.6-execshield.patch 
	linux-2.6-gcc41.patch linux-2.6-ub.patch 
	linux-2.6-xen-merge.patch linux-2.6-xen-no-tls-warn.patch 
	linux-2.6-xen-vdso-note.patch 
	linux-2.6.14-xen_remap_vma_flags.patch sources upstream 
Added Files:
	linux-2.6-bcm43xx-resume.patch linux-2.6-bcm43xx.patch 
	linux-2.6-block-reduce-stack.patch 
	linux-2.6-debug-account-kmalloc.patch 
	linux-2.6-debug-latency-tracing.patch 
	linux-2.6-dm-sync-overrun.patch linux-2.6-edid-check.patch 
	linux-2.6-ia64-spinlock-size.patch 
	linux-2.6-kill-blk_attempt_merge.patch 
	linux-2.6-posix-timers-sched_time-accumulation.patch 
	linux-2.6-ppc-iseries-input-layer.patch 
	linux-2.6-pwc-powerup-by-default.patch 
	linux-2.6-serial-nrports.patch linux-2.6-smsc-ircc2-pnp.patch 
	linux-2.6-softcursor-persistent-alloc.patch 
	linux-2.6-softmac-git.patch 
	linux-2.6-usbhid-wireless-security-lock.patch 
	linux-2.6-vm-clear-unreclaimable.patch 
	linux-2.6-vm-debug.patch linux-2.6-w1-hush-debug.patch 
	linux-2.6-x86-hp-reboot.patch 
	linux-2.6-x86_64-ati-apic-timer.patch 
	linux-2.6.14-xen-compile-fixes.patch 
	linux-2.6.15-usb-find-interface.patch 
	linux-2.6.15-usblp-fixes.patch linux-2.6.15.tar.bz2.sign 
Removed Files:
	linux-2.6-acpi-acpica-20051202.patch 
	linux-2.6-apm-depends-fix.patch 
	linux-2.6-debug-spinlock-symbol.patch 
	linux-2.6-g5-thermal-overload.patch 
	linux-2.6-missing-exports.patch linux-2.6-usb-suspend.patch 
	linux-2.6.14-kauditd-suspend.patch linux-2.6.14.tar.bz2.sign 
	patch-2.6.15-rc6-git1.bz2.sign patch-2.6.15-rc6.bz2.sign 
Log Message:
Rebase to:

  Rawhide kernel kernel-2.6.15-1.1826.2.9 from private-fc5-test2-branch
  Hypervisor from xen-unstable on 20060106
  linux-2.6-merge.hg xen upstream as of changeset 16985



linux-2.6-bcm43xx-resume.patch:
 bcm43xx.h      |   11 +++++++++--
 bcm43xx_main.c |    2 +-
 2 files changed, 10 insertions(+), 3 deletions(-)

--- NEW FILE linux-2.6-bcm43xx-resume.patch ---
--- linux-2.6.15/drivers/net/wireless/bcm43xx/bcm43xx_main.c~	2006-01-03 22:56:55.000000000 +0000
+++ linux-2.6.15/drivers/net/wireless/bcm43xx/bcm43xx_main.c	2006-01-03 23:00:15.000000000 +0000
@@ -4583,8 +4583,8 @@ static int bcm43xx_resume(struct pci_dev
 
 	netif_device_attach(net_dev);
 	
 	/*FIXME: This should be handled by softmac instead. */
-	queue_work(bcm->softmac->workqueue, &bcm->softmac->associnfo.work);
+	schedule_work(&bcm->softmac->associnfo.work);
 
 	dprintk(KERN_INFO PFX "Device resumed.\n");
 
--- linux-2.6.15/drivers/net/wireless/bcm43xx/bcm43xx.h.orig	2006-01-06 05:00:12.000000000 +0000
+++ linux-2.6.15/drivers/net/wireless/bcm43xx/bcm43xx.h	2006-01-06 14:07:38.000000000 +0000
@@ -648,7 +648,8 @@ struct bcm43xx_private {
 	    bad_frames_preempt:1,	/* Use "Bad Frames Preemption" (default off) */
 	    reg124_set_0x4:1,		/* Some variable to keep track of IRQ stuff. */
 	    powersaving:1,		/* TRUE if we are in PowerSaving mode. FALSE otherwise. */
-	    short_preamble:1;		/* TRUE, if short preamble is enabled. */
+	    short_preamble:1,		/* TRUE, if short preamble is enabled. */
+	    firmware_norelease:1;	/* Do not release the firmware. Used on suspend. */
 
 	struct bcm43xx_stats stats;
 
@@ -728,7 +729,13 @@ struct bcm43xx_private {
 	u16 security_offset;
 	struct bcm43xx_key key[54];
 	u8 default_key_idx;
-	
+
+	/* Firmware. */
+	const struct firmware *ucode;
+	const struct firmware *pcm;
+	const struct firmware *initvals0;
+	const struct firmware *initvals1;
+
 	/* Debugging stuff follows. */
 #ifdef BCM43xx_DEBUG
 	struct bcm43xx_dfsentry *dfsentry;

linux-2.6-bcm43xx.patch:
 Kconfig  |    8 ++++++++
 Makefile |    1 +
 2 files changed, 9 insertions(+)

--- NEW FILE linux-2.6-bcm43xx.patch ---
--- linux-2.6.14/drivers/net/wireless/Kconfig~	2005-12-30 23:41:54.000000000 +0000
+++ linux-2.6.14/drivers/net/wireless/Kconfig	2005-12-30 23:53:24.000000000 +0000
@@ -477,6 +477,14 @@ config PRISM54
 
 source "drivers/net/wireless/hostap/Kconfig"
 
+config BCM43XX
+       tristate "Broadcom BCM43xx wireless support"
+       depends on PCI && IEEE80211 && NET_RADIO && IEEE80211_SOFTMAC && EXPERIMENTAL
+	select FW_LOADER
+       ---help---
+	This is an experimental driver for the Broadcom 43xx wireless chip,
+	found in the Apple Airport Extreme and various other devices.
+
 # yes, this works even when no drivers are selected
 config NET_WIRELESS
 	bool
--- linux-2.6.14/drivers/net/wireless/Makefile~	2005-10-28 01:02:08.000000000 +0100
+++ linux-2.6.14/drivers/net/wireless/Makefile	2005-12-30 23:53:43.000000000 +0000
@@ -35,6 +35,7 @@ obj-$(CONFIG_PCMCIA_ATMEL)      += atmel
 obj-$(CONFIG_PRISM54)		+= prism54/
 
 obj-$(CONFIG_HOSTAP)		+= hostap/
+obj-$(CONFIG_BCM43XX)		+= bcm43xx/
 
 # 16-bit wireless PCMCIA client drivers
 obj-$(CONFIG_PCMCIA_RAYCS)	+= ray_cs.o

linux-2.6-block-reduce-stack.patch:
 ./include/linux/sched.h |    3 ++
 2/block/ll_rw_blk.c     |   53 +++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 55 insertions(+), 1 deletion(-)

--- NEW FILE linux-2.6-block-reduce-stack.patch ---

From: Neil Brown <neilb at suse.de>
To: device-mapper development <dm-devel at redhat.com>
Date: 	Mon, 7 Nov 2005 11:16:48 +1100
Message-ID: <17262.40176.342746.634262 at cse.unsw.edu.au>
Cc: Andrew Morton <akpm at osdl.org>, heiko.carstens at de.ibm.com,
        linux-kernel at vger.kernel.org, aherrman at de.ibm.com, bunk at stusta.de,
        cplk at itee.uq.edu.au
Subject: Re: [dm-devel] Re: [PATCH resubmit] do_mount: reduce stack consumption

For your consideration and testing (it works for me, but I'd like to
see it tested a bit more heavily in a variety of configurations).

NeilBrown

--
Reduce stack usage with stacked block devices

When stacked block devices are in-use (e.g. md or dm), the recursive
calls to generic_make_request can use up a lot of space, and we would
rather they didn't.

As generic_make_request is a void function, and as it is generally not
expected that it will have any effect immediately, it is safe to delay
any call to generic_make_request until there is sufficient stack space
available.

As ->bi_next is reserved for the driver to use, it can have no valid
value when generic_make_request is called, and as __make_request
implicitly assumes it will be NULL (ELEVATOR_BACK_MERGE fork of
switch) we can be certain that all callers set it to NULL.  We can
therefore safely use bi_next to link pending requests together,
providing we clear it before making the real call.

So, we choose to allow each thread to only be active in one
generic_make_request at a time.  If a subsequent (recursive) call is
made, the bio is linked into a per-thread list, and is handled when
the active call completes.

As the list of pending bios is per-thread, there are no locking issues
to worry about.

I say above that it is "safe to delay any call...".  There are,
however, some behaviours of a make_request_fn which would make it
unsafe.  These include any behaviour that assumes anything will have
changed after a recursive call to generic_make_request.

These could include:
 - waiting for that call to finish and call it's bi_end_io function.
   md use to sometimes do this (marking the superblock dirty before
   completing a write) but doesn't any more
 - inspecting the bio for fields that generic_make_request might
   change, such as bi_sector or bi_bdev.  It is hard to see a good
   reason for this, and I don't think anyone actually does it.
 - inspecing the queue to see if, e.g. it is 'full' yet.  Again, I
   think this is very unlikely to be useful, or to be done.

Signed-off-by: Neil Brown <neilb at cse.unsw.edu.au>
Signed-off-by: Neil Brown <neilb at suse.de>

### Diffstat output
 ./drivers/block/ll_rw_blk.c |   53 +++++++++++++++++++++++++++++++++++++++++++-
 ./include/linux/sched.h     |    3 ++
 2 files changed, 55 insertions(+), 1 deletion(-)

diff 1/block/ll_rw_blk.c~current~ 2/drivers/block/ll_rw_blk.c
--- 1/block/ll_rw_blk.c~current~	2005-11-07 10:01:36.000000000 +1100
+++ 2/block/ll_rw_blk.c	2005-11-07 10:33:47.000000000 +1100
@@ -2957,7 +2957,7 @@ static void handle_bad_sector(struct bio
  * bi_sector for remaps as it sees fit.  So the values of these fields
  * should NOT be depended on after the call to generic_make_request.
  */
-void generic_make_request(struct bio *bio)
+static inline void __generic_make_request(struct bio *bio)
 {
 	request_queue_t *q;
 	sector_t maxsector;
@@ -3038,6 +3038,57 @@ end_io:
 	} while (ret);
 }
 
+/*
+ * We only want one ->make_request_fn to be active at a time,
+ * else stack usage with stacked devices could be a problem.
+ * So use current->bio_{list,tail} to keep a list of requests
+ * submited by a make_request_fn function.
+ * current->bio_tail is also used as a flag to say if
+ * generic_make_request is currently active in this task or not.
+ * If it is NULL, then no make_request is active.  If it is non-NULL,
+ * then a make_request is active, and new requests should be added
+ * at the tail
+ */
+void generic_make_request(struct bio *bio)
+{
+	if (current->bio_tail) {
+		/* make_request is active */
+		*(current->bio_tail) = bio;
+		bio->bi_next = NULL;
+		current->bio_tail = &bio->bi_next;
+		return;
+	}
+	/* following loop may be a bit non-obvious, and so deserves some
+	 * explantion.
+	 * Before entering the loop, bio->bi_next is NULL (as all callers
+	 * ensure that) so we have a list with a single bio.
+	 * We pretend that we have just taken it off a longer list, so
+	 * we assign bio_list to the next (which is NULL) and bio_tail
+	 * to &bio_list, thus initialising the bio_list of new bios to be
+	 * added.  __generic_make_request may indeed add some more bios
+	 * through a recursive call to generic_make_request.  If it
+	 * did, we find a non-NULL value in bio_list and re-enter the loop
+	 * from the top.  In this case we really did just take the bio
+	 * of the top of the list (no pretending) and so fixup bio_list and
+	 * bio_tail or bi_next, and call into __generic_make_request again.
+	 *
+	 * The loop was structured like this to make only one call to
+	 * __generic_make_request (which is important as it is large and inlined)
+	 * and to keep the structure simple.
+	 */
+	BUG_ON(bio->bi_next);
+	do {
+		current->bio_list = bio->bi_next;
+		if (bio->bi_next == NULL)
+			current->bio_tail = &current->bio_list;
+		else
+			bio->bi_next = NULL;
+		__generic_make_request(bio);
+		bio = current->bio_list;
+	} while (bio);
+	current->bio_tail = NULL; /* deactivate */
+}
+
 EXPORT_SYMBOL(generic_make_request);
 
 /**

diff ./include/linux/sched.h~current~ ./include/linux/sched.h
--- ./include/linux/sched.h~current~	2005-11-07 10:01:36.000000000 +1100
+++ ./include/linux/sched.h	2005-11-07 10:02:23.000000000 +1100
@@ -829,6 +829,9 @@ struct task_struct {
 /* journalling filesystem info */
 	void *journal_info;
 
+/* stacked block device info */
+	struct bio *bio_list, **bio_tail;
+
 /* VM state */
 	struct reclaim_state *reclaim_state;
 



linux-2.6-debug-account-kmalloc.patch:
 linux-2.6.14/include/linux/slab.h   |   29 +++++
 linux-2.6.14/include/linux/string.h |    2 
 linux-2.6.14/mm/slab.c              |   36 -------
 tiny/fs/proc/proc_misc.c            |   21 ++++
 tiny/include/linux/slab.h           |   19 +++
 tiny/init/Kconfig                   |    7 +
 tiny/mm/Makefile                    |    1 
 tiny/mm/kmallocacct.c               |  182 ++++++++++++++++++++++++++++++++++++
 tiny/mm/slab.c                      |    8 +
 9 files changed, 265 insertions(+), 40 deletions(-)

--- NEW FILE linux-2.6-debug-account-kmalloc.patch ---

/proc/kmalloc allocation tracing


 tiny-mpm/fs/proc/proc_misc.c  |   21 ++++
 tiny-mpm/include/linux/slab.h |   19 ++++
 tiny-mpm/init/Kconfig         |    7 +
 tiny-mpm/mm/Makefile          |    2 
 tiny-mpm/mm/kmallocacct.c     |  182 ++++++++++++++++++++++++++++++++++++++++++
 tiny-mpm/mm/slab.c            |    7 +
 6 files changed, 237 insertions(+), 1 deletion(-)

Index: tiny/init/Kconfig
===================================================================
--- tiny.orig/init/Kconfig	2005-10-10 17:41:44.000000000 -0700
+++ tiny/init/Kconfig	2005-10-10 17:41:46.000000000 -0700
@@ -315,6 +315,13 @@ config BUG
           option for embedded systems with no facilities for reporting errors.
           Just say Y.
 
+config KMALLOC_ACCOUNTING
+	default n
+	bool "Enabled accounting of kmalloc/kfree allocations"
+	help
+	  This option records kmalloc and kfree activity and reports it via
+	  /proc/kmalloc.
+
 config BASE_FULL
 	default y
 	bool "Enable full-sized data structures for core" if EMBEDDED
Index: tiny/mm/slab.c
===================================================================
--- tiny.orig/mm/slab.c	2005-10-10 17:32:51.000000000 -0700
+++ tiny/mm/slab.c	2005-10-10 17:41:46.000000000 -0700
@@ -2911,6 +2911,8 @@ EXPORT_SYMBOL(kmalloc_node);
 void *__kmalloc(size_t size, unsigned int __nocast flags)
 {
 	kmem_cache_t *cachep;
+	struct cache_sizes *csizep = malloc_sizes;
+	void *a;
 
 	/* If you want to save a few bytes .text space: replace
 	 * __ with kmem_.
@@ -2920,7 +2921,9 @@ void *__kmalloc(size_t size, unsigned in
 	cachep = __find_general_cachep(size, flags);
 	if (unlikely(cachep == NULL))
 		return NULL;
-	return __cache_alloc(cachep, flags);
+	a = __cache_alloc(cachep, flags);
+	kmalloc_account(a, cachep->objsize, size);
+	return a;
 }
 EXPORT_SYMBOL(__kmalloc);
 
@@ -3020,6 +3023,8 @@ void kfree(const void *objp)
 	kmem_cache_t *c;
 	unsigned long flags;
 
+	kfree_account(objp, ksize(objp));
+
 	if (unlikely(!objp))
 		return;
 	local_irq_save(flags);
Index: tiny/mm/kmallocacct.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ tiny/mm/kmallocacct.c	2005-10-10 17:41:46.000000000 -0700
@@ -0,0 +1,182 @@
+#include	<linux/config.h>
+#include	<linux/seq_file.h>
+#include	<linux/kallsyms.h>
+
+struct kma_caller {
+	const void *caller;
+	int total, net, slack, allocs, frees;
+};
+
+struct kma_list {
+	int callerhash;
+	const void *address;
+};
+
+#define MAX_CALLER_TABLE 512
+#define MAX_ALLOC_TRACK 4096
+
+#define kma_hash(address, size) (((u32)address / (u32)size) % size)
+
+static struct kma_list kma_alloc[MAX_ALLOC_TRACK];
+static struct kma_caller kma_caller[MAX_CALLER_TABLE];
+
+static int kma_callers;
+static int kma_lost_callers, kma_lost_allocs, kma_unknown_frees;
+static int kma_total, kma_net, kma_slack, kma_allocs, kma_frees;
+static spinlock_t kma_lock = SPIN_LOCK_UNLOCKED;
+
+void __kmalloc_account(const void *caller, const void *addr, int size, int req)
+{
+	int i, hasha, hashc;
+	unsigned long flags;
+
+	spin_lock_irqsave(&kma_lock, flags);
+	if(req >= 0) /* kmalloc */
+	{
+		/* find callers slot */
+		hashc = kma_hash(caller, MAX_CALLER_TABLE);
+		for (i = 0; i < MAX_CALLER_TABLE; i++) {
+			if (!kma_caller[hashc].caller ||
+			    kma_caller[hashc].caller == caller)
+				break;
+			hashc = (hashc + 1) % MAX_CALLER_TABLE;
+		}
+
+		if (!kma_caller[hashc].caller)
+			kma_callers++;
+
+		if (i < MAX_CALLER_TABLE) {
+			/* update callers stats */
+			kma_caller[hashc].caller = caller;
+			kma_caller[hashc].total += size;
+			kma_caller[hashc].net += size;
+			kma_caller[hashc].slack += size - req;
+			kma_caller[hashc].allocs++;
+
+			/* add malloc to list */
+			hasha = kma_hash(addr, MAX_ALLOC_TRACK);
+			for (i = 0; i < MAX_ALLOC_TRACK; i++) {
+				if (!kma_alloc[hasha].callerhash)
+					break;
+				hasha = (hasha + 1) % MAX_ALLOC_TRACK;
+			}
+
+			if(i < MAX_ALLOC_TRACK) {
+				kma_alloc[hasha].callerhash = hashc;
+				kma_alloc[hasha].address = addr;
+			}
+			else
+				kma_lost_allocs++;
+		}
+		else {
+			kma_lost_callers++;
+			kma_lost_allocs++;
+		}
+
+		kma_total += size;
+		kma_net += size;
+		kma_slack += size - req;
+		kma_allocs++;
+	}
+	else { /* kfree */
+		hasha = kma_hash(addr, MAX_ALLOC_TRACK);
+		for (i = 0; i < MAX_ALLOC_TRACK ; i++) {
+			if (kma_alloc[hasha].address == addr)
+				break;
+			hasha = (hasha + 1) % MAX_ALLOC_TRACK;
+		}
+
+		if (i < MAX_ALLOC_TRACK) {
+			hashc = kma_alloc[hasha].callerhash;
+			kma_alloc[hasha].callerhash = 0;
+			kma_caller[hashc].net -= size;
+			kma_caller[hashc].frees++;
+		}
+		else
+			kma_unknown_frees++;
+
+		kma_net -= size;
+		kma_frees++;
+	}
+	spin_unlock_irqrestore(&kma_lock, flags);
+}
+
+static void *as_start(struct seq_file *m, loff_t *pos)
+{
+	int i;
+	loff_t n = *pos;
+
+	if (!n) {
+		seq_printf(m, "total bytes allocated: %8d\n", kma_total);
+		seq_printf(m, "slack bytes allocated: %8d\n", kma_slack);
+		seq_printf(m, "net bytes allocated:   %8d\n", kma_net);
+		seq_printf(m, "number of allocs:      %8d\n", kma_allocs);
+		seq_printf(m, "number of frees:       %8d\n", kma_frees);
+		seq_printf(m, "number of callers:     %8d\n", kma_callers);
+		seq_printf(m, "lost callers:          %8d\n",
+			   kma_lost_callers);
+		seq_printf(m, "lost allocs:           %8d\n",
+			   kma_lost_allocs);
+		seq_printf(m, "unknown frees:         %8d\n",
+			   kma_unknown_frees);
+		seq_puts(m, "\n   total    slack      net alloc/free  caller\n");
+	}
+
+	for (i = 0; i < MAX_CALLER_TABLE; i++) {
+		if(kma_caller[i].caller)
+			n--;
+		if(n < 0)
+			return (void *)(i+1);
+	}
+
+	return 0;
+}
+
+static void *as_next(struct seq_file *m, void *p, loff_t *pos)
+{
+	int n = (int)p-1, i;
+	++*pos;
+
+	for (i = n + 1; i < MAX_CALLER_TABLE; i++)
+		if(kma_caller[i].caller)
+			return (void *)(i+1);
+
+	return 0;
+}
+
+static void as_stop(struct seq_file *m, void *p)
+{
+}
+
+static int as_show(struct seq_file *m, void *p)
+{
+	int n = (int)p-1;
+	struct kma_caller *c;
+#ifdef CONFIG_KALLSYMS
+	char *modname;
+	const char *name;
+	unsigned long offset = 0, size;
+	char namebuf[128];
+
+	c = &kma_caller[n];
+	name = kallsyms_lookup((int)c->caller, &size, &offset, &modname,
+			       namebuf);
+	seq_printf(m, "%8d %8d %8d %5d/%-5d %s+0x%lx\n",
+		   c->total, c->slack, c->net, c->allocs, c->frees,
+		   name, offset);
+#else
+	c = &kma_caller[n];
+	seq_printf(m, "%8d %8d %8d %5d/%-5d %p\n",
+		   c->total, c->slack, c->net, c->allocs, c->frees, c->caller);
+#endif
+
+	return 0;
+}
+
+struct seq_operations kmalloc_account_op = {
+	.start	= as_start,
+	.next	= as_next,
+	.stop	= as_stop,
+	.show	= as_show,
+};
+
Index: tiny/mm/Makefile
===================================================================
--- tiny.orig/mm/Makefile	2005-10-10 17:30:45.000000000 -0700
+++ tiny/mm/Makefile	2005-10-10 17:41:46.000000000 -0700
@@ -12,6 +12,7 @@ obj-y			:= bootmem.o filemap.o mempool.o
 			   readahead.o slab.o swap.o truncate.o vmscan.o \
 			   prio_tree.o $(mmu-y)
 
+obj-$(CONFIG_KMALLOC_ACCOUNTING) += kmallocacct.o
 obj-$(CONFIG_SWAP)	+= page_io.o swap_state.o swapfile.o thrash.o
 obj-$(CONFIG_HUGETLBFS)	+= hugetlb.o
 obj-$(CONFIG_NUMA) 	+= mempolicy.o
Index: tiny/include/linux/slab.h
===================================================================
--- tiny.orig/include/linux/slab.h	2005-10-10 17:32:41.000000000 -0700
+++ tiny/include/linux/slab.h	2005-10-10 17:41:46.000000000 -0700
@@ -53,6 +53,23 @@ typedef struct kmem_cache_s kmem_cache_t
 #define SLAB_CTOR_ATOMIC	0x002UL		/* tell constructor it can't sleep */
 #define	SLAB_CTOR_VERIFY	0x004UL		/* tell constructor it's a verify call */
 
+#ifdef CONFIG_KMALLOC_ACCOUNTING
+void __kmalloc_account(const void *, const void *, int, int);
+
+static void inline kmalloc_account(const void *addr, int size, int req)
+{
+	__kmalloc_account(__builtin_return_address(0), addr, size, req);
+}
+
+static void inline kfree_account(const void *addr, int size)
+{
+	__kmalloc_account(__builtin_return_address(0), addr, size, -1);
+}
+#else
+#define kmalloc_account(a, b, c)
+#define kfree_account(a, b)
+#endif
+
 /* prototypes */
 extern void __init kmem_cache_init(void);
 
@@ -78,6 +95,7 @@ extern void *__kmalloc(size_t, unsigned 
 
 static inline void *kmalloc(size_t size, unsigned int __nocast flags)
 {
+#ifndef CONFIG_KMALLOC_ACCOUNTING
 	if (__builtin_constant_p(size)) {
 		int i = 0;
 #define CACHE(x) \
@@ -96,6 +114,7 @@ found:
 			malloc_sizes[i].cs_dmacachep :
 			malloc_sizes[i].cs_cachep, flags);
 	}
+#endif
 	return __kmalloc(size, flags);
 }
 
Index: tiny/fs/proc/proc_misc.c
===================================================================
--- tiny.orig/fs/proc/proc_misc.c	2005-10-10 17:30:45.000000000 -0700
+++ tiny/fs/proc/proc_misc.c	2005-10-10 17:41:46.000000000 -0700
@@ -337,6 +337,24 @@ static struct file_operations proc_slabi
 	.release	= seq_release,
 };
 
+#ifdef CONFIG_KMALLOC_ACCOUNTING
+
+extern struct seq_operations kmalloc_account_op;
+
+static int kmalloc_account_open(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &kmalloc_account_op);
+}
+
+static struct file_operations proc_kmalloc_account_operations = {
+	.open		= kmalloc_account_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= seq_release,
+};
+
+#endif
+
 static int show_stat(struct seq_file *p, void *v)
 {
 	int i;
@@ -601,6 +619,9 @@ void __init proc_misc_init(void)
 	create_seq_entry("stat", 0, &proc_stat_operations);
 	create_seq_entry("interrupts", 0, &proc_interrupts_operations);
 	create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations);
+#ifdef CONFIG_KMALLOC_ACCOUNTING
+	create_seq_entry("kmalloc",S_IRUGO,&proc_kmalloc_account_operations);
+#endif
 	create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations);
 	create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations);
 	create_seq_entry("zoneinfo",S_IRUGO, &proc_zoneinfo_file_operations);

--- linux-2.6.14/mm/slab.c~	2005-12-28 16:37:04.000000000 -0500
+++ linux-2.6.14/mm/slab.c	2005-12-28 16:37:14.000000000 -0500
@@ -3045,20 +3045,6 @@ void kmem_cache_free(kmem_cache_t *cache
 EXPORT_SYMBOL(kmem_cache_free);
 
 /**
- * kzalloc - allocate memory. The memory is set to zero.
- * @size: how many bytes of memory are required.
- * @flags: the type of memory to allocate.
- */
-void *kzalloc(size_t size, gfp_t flags)
-{
-	void *ret = kmalloc(size, flags);
-	if (ret)
-		memset(ret, 0, size);
-	return ret;
-}
-EXPORT_SYMBOL(kzalloc);
-
-/**
  * kfree - free previously allocated memory
  * @objp: pointer returned by kmalloc.
  *
--- linux-2.6.14/include/linux/slab.h~	2005-12-28 16:37:19.000000000 -0500
+++ linux-2.6.14/include/linux/slab.h	2005-12-28 16:38:51.000000000 -0500
@@ -118,7 +118,13 @@ found:
 	return __kmalloc(size, flags);
 }
 
-extern void *kzalloc(size_t, gfp_t);
+static inline void *kzalloc(size_t size, gfp_t flags)
+{
+	void *ret = kmalloc(size, flags);
+	if (ret)
+		memset(ret, 0, size);
+	return ret;
+}
 
 /**
  * kcalloc - allocate memory for an array. The memory is set to zero.

--- linux-2.6.14/include/linux/slab.h~	2005-12-28 19:04:06.000000000 -0500
+++ linux-2.6.14/include/linux/slab.h	2005-12-28 19:04:47.000000000 -0500
@@ -126,6 +126,27 @@ static inline void *kzalloc(size_t size,
 	return ret;
 }
 
+/*
+ * kstrdup - allocate space for and copy an existing string
+ *
+ * @s: the string to duplicate
+ * @gfp: the GFP mask used in the kmalloc() call when allocating memory
+ */
+static inline char *kstrdup(const char *s, gfp_t gfp)
+{
+	size_t len;
+	char *buf;
+
+	if (!s)
+		return NULL;
+
+	len = strlen(s) + 1;
+	buf = kmalloc(len, gfp);
+	if (buf)
+		memcpy(buf, s, len);
+	return buf;
+}
+
 /**
  * kcalloc - allocate memory for an array. The memory is set to zero.
  * @n: number of elements.
--- linux-2.6.14/mm/slab.c~	2005-12-28 19:04:54.000000000 -0500
+++ linux-2.6.14/mm/slab.c	2005-12-28 19:04:59.000000000 -0500
@@ -3669,25 +3669,3 @@ unsigned int ksize(const void *objp)
 	return obj_reallen(page_get_cache(virt_to_page(objp)));
 }
 
-
-/*
- * kstrdup - allocate space for and copy an existing string
- *
- * @s: the string to duplicate
- * @gfp: the GFP mask used in the kmalloc() call when allocating memory
- */
-char *kstrdup(const char *s, gfp_t gfp)
-{
-	size_t len;
-	char *buf;
-
-	if (!s)
-		return NULL;
-
-	len = strlen(s) + 1;
-	buf = kmalloc(len, gfp);
-	if (buf)
-		memcpy(buf, s, len);
-	return buf;
-}
-EXPORT_SYMBOL(kstrdup);

--- linux-2.6.14/include/linux/string.h~	2005-12-28 19:12:06.000000000 -0500
+++ linux-2.6.14/include/linux/string.h	2005-12-28 19:12:19.000000000 -0500
@@ -88,8 +88,6 @@ extern int memcmp(const void *,const voi
 extern void * memchr(const void *,int,__kernel_size_t);
 #endif
 
-extern char *kstrdup(const char *s, gfp_t gfp);
-
 #ifdef __cplusplus
 }
 #endif

linux-2.6-debug-latency-tracing.patch:
 kernel/latency.c                                          |    4 
 linux-2.6.14/include/asm-x86_64/unistd.h                  |    1 
 linux-2.6.14/kernel/latency.c                             |    2 
 linux-latency-tracing.q/Makefile                          |   10 
 linux-latency-tracing.q/arch/arm/boot/compressed/head.S   |   13 
 linux-latency-tracing.q/arch/arm/kernel/calls.S           |    6 
 linux-latency-tracing.q/arch/arm/kernel/entry-common.S    |  111 
 linux-latency-tracing.q/arch/arm/kernel/fiq.c             |    4 
 linux-latency-tracing.q/arch/arm/kernel/irq.c             |    4 
 linux-latency-tracing.q/arch/arm/kernel/traps.c           |    2 
 linux-latency-tracing.q/arch/arm/mm/copypage-v4mc.c       |    4 
 linux-latency-tracing.q/arch/arm/mm/copypage-xscale.c     |    4 
 linux-latency-tracing.q/arch/arm/mm/fault.c               |   14 
 linux-latency-tracing.q/arch/i386/Kconfig                 |    2 
 linux-latency-tracing.q/arch/i386/boot/compressed/misc.c  |    8 
 linux-latency-tracing.q/arch/i386/kernel/Makefile         |    1 
 linux-latency-tracing.q/arch/i386/kernel/entry.S          |   41 
 linux-latency-tracing.q/arch/i386/kernel/irq.c            |    8 
 linux-latency-tracing.q/arch/i386/kernel/mcount-wrapper.S |   27 
 linux-latency-tracing.q/arch/ppc/boot/Makefile            |    9 
 linux-latency-tracing.q/arch/ppc/kernel/entry.S           |   82 
 linux-latency-tracing.q/arch/x86_64/kernel/entry.S        |   48 
 linux-latency-tracing.q/arch/x86_64/kernel/vsyscall.c     |    2 
 linux-latency-tracing.q/fs/proc/proc_misc.c               |   17 
 linux-latency-tracing.q/include/asm-arm/pgalloc.h         |    4 
 linux-latency-tracing.q/include/asm-arm/timex.h           |   10 
 linux-latency-tracing.q/include/asm-arm/unistd.h          |    3 
 linux-latency-tracing.q/include/asm-i386/system.h         |    8 
 linux-latency-tracing.q/include/linux/interrupt.h         |   10 
 linux-latency-tracing.q/include/linux/latency_hist.h      |   32 
 linux-latency-tracing.q/include/linux/linkage.h           |    2 
 linux-latency-tracing.q/include/linux/preempt.h           |   20 
 linux-latency-tracing.q/include/linux/sched.h             |   86 
 linux-latency-tracing.q/init/main.c                       |    9 
 linux-latency-tracing.q/kernel/Makefile                   |    3 
 linux-latency-tracing.q/kernel/latency.c                  | 2390 ++++++++++++++
 linux-latency-tracing.q/kernel/latency_hist.c             |  267 +
 linux-latency-tracing.q/kernel/sched.c                    |  103 
 linux-latency-tracing.q/kernel/sysctl.c                   |   77 
 linux-latency-tracing.q/kernel/time.c                     |   19 
 linux-latency-tracing.q/lib/Kconfig.debug                 |  149 
 linux/arch/arm/boot/compressed/misc.c                     |    1 
 linux/arch/arm26/boot/compressed/misc.c                   |    1 
 linux/arch/i386/boot/compressed/misc.c                    |    1 
 linux/arch/ppc/boot/lib/Makefile                          |   48 
 linux/arch/x86_64/boot/compressed/misc.c                  |    1 
 linux/lib/inflate.c                                       |   44 
 linux/lib/zlib_inflate/inftrees.c                         |   45 
 48 files changed, 3655 insertions(+), 102 deletions(-)

--- NEW FILE linux-2.6-debug-latency-tracing.patch ---

this patch reduces the ~2500+ worst-case stack footprint of zlib to 
~500 bytes, by making the largest arrays static and by introducing a
spinlock to protect access to them.

Signed-off-by: Ingo Molnar <mingo at elte.hu>

 arch/arm/boot/compressed/misc.c    |    1 
 arch/arm26/boot/compressed/misc.c  |    1 
 arch/i386/boot/compressed/misc.c   |    1 
 arch/x86_64/boot/compressed/misc.c |    1 
 lib/inflate.c                      |   44 +++++++++++++++++++++++++++---------
 lib/zlib_inflate/inftrees.c        |   45 ++++++++++++++++++++++++++++---------
 6 files changed, 72 insertions(+), 21 deletions(-)

Index: linux/arch/arm/boot/compressed/misc.c
===================================================================
--- linux.orig/arch/arm/boot/compressed/misc.c
+++ linux/arch/arm/boot/compressed/misc.c
@@ -199,6 +199,7 @@ static ulg free_mem_ptr_end;
 
 #define HEAP_SIZE 0x2000
 
+#define ZLIB_INFLATE_NO_INFLATE_LOCK
 #include "../../../../lib/inflate.c"
 
 #ifndef STANDALONE_DEBUG
Index: linux/arch/arm26/boot/compressed/misc.c
===================================================================
--- linux.orig/arch/arm26/boot/compressed/misc.c
+++ linux/arch/arm26/boot/compressed/misc.c
@@ -184,6 +184,7 @@ static ulg free_mem_ptr_end;
 
 #define HEAP_SIZE 0x2000
 
+#define ZLIB_INFLATE_NO_INFLATE_LOCK
 #include "../../../../lib/inflate.c"
 
 #ifndef STANDALONE_DEBUG
Index: linux/arch/i386/boot/compressed/misc.c
===================================================================
--- linux.orig/arch/i386/boot/compressed/misc.c
+++ linux/arch/i386/boot/compressed/misc.c
@@ -125,6 +125,7 @@ static int lines, cols;
 static void * xquad_portio = NULL;
 #endif
 
+#define ZLIB_INFLATE_NO_INFLATE_LOCK
 #include "../../../../lib/inflate.c"
 
 static void *malloc(int size)
Index: linux/arch/x86_64/boot/compressed/misc.c
===================================================================
--- linux.orig/arch/x86_64/boot/compressed/misc.c
+++ linux/arch/x86_64/boot/compressed/misc.c
@@ -114,6 +114,7 @@ static char *vidmem = (char *)0xb8000;
 static int vidport;
 static int lines, cols;
 
+#define ZLIB_INFLATE_NO_INFLATE_LOCK
 #include "../../../../lib/inflate.c"
 
 static void *malloc(int size)
Index: linux/lib/inflate.c
===================================================================
--- linux.orig/lib/inflate.c
+++ linux/lib/inflate.c
@@ -141,6 +141,25 @@ struct huft {
   } v;
 };
 
+/*
+ * turn off the inflate_lock for the bootloader code, it is
+ * single-threaded and has no need for (nor access to) the
+ * kernel's locking primitives:
+ */
+#ifdef ZLIB_INFLATE_NO_INFLATE_LOCK
+# undef DEFINE_SPINLOCK
+# undef spin_lock
+# undef spin_unlock
+# define DEFINE_SPINLOCK(x)	int x
+# define spin_lock(x)		(void)(x)
+# define spin_unlock(x)		(void)(x)
+#endif
+
+/*
+ * lock protecting static variables of huft_build() and other inflate
+ * functions, to reduce their insane stack footprint.
+ */
+static DEFINE_SPINLOCK(inflate_lock);
 
 /* Function prototypes */
 STATIC int INIT huft_build OF((unsigned *, unsigned, unsigned, 
@@ -304,7 +323,7 @@ STATIC int INIT huft_build(
   register struct huft *q;      /* points to current table */
   struct huft r;                /* table entry for structure assignment */
   struct huft *u[BMAX];         /* table stack */
-  unsigned v[N_MAX];            /* values in order of bit length */
+  static unsigned v[N_MAX];     /* values in order of bit length */
   register int w;               /* bits before this table == (l * h) */
   unsigned x[BMAX+1];           /* bit offsets, then code stack */
   unsigned *xp;                 /* pointer into x */
@@ -705,7 +724,7 @@ STATIC int noinline INIT inflate_fixed(v
   struct huft *td;      /* distance code table */
   int bl;               /* lookup bits for tl */
   int bd;               /* lookup bits for td */
-  unsigned l[288];      /* length list for huft_build */
+  static unsigned l[288];      /* length list for huft_build */
 
 DEBG("<fix");
 
@@ -767,9 +786,9 @@ STATIC int noinline INIT inflate_dynamic
   unsigned nl;          /* number of literal/length codes */
   unsigned nd;          /* number of distance codes */
 #ifdef PKZIP_BUG_WORKAROUND
-  unsigned ll[288+32];  /* literal/length and distance code lengths */
+  static unsigned ll[288+32];  /* literal/length and distance code lengths */
 #else
-  unsigned ll[286+30];  /* literal/length and distance code lengths */
+  static unsigned ll[286+30];  /* literal/length and distance code lengths */
 #endif
   register ulg b;       /* bit buffer */
   register unsigned k;  /* number of bits in bit buffer */
@@ -940,6 +959,7 @@ STATIC int INIT inflate_block(
   unsigned t;           /* block type */
   register ulg b;       /* bit buffer */
   register unsigned k;  /* number of bits in bit buffer */
+  unsigned ret;         /* return code */
 
   DEBG("<blk");
 
@@ -965,17 +985,19 @@ STATIC int INIT inflate_block(
   bk = k;
 
   /* inflate that block type */
-  if (t == 2)
-    return inflate_dynamic();
-  if (t == 0)
-    return inflate_stored();
-  if (t == 1)
-    return inflate_fixed();
+  ret = 2;
+  spin_lock(&inflate_lock);
+  switch (t) {
+	case 2: ret = inflate_dynamic(); break;
+	case 0: ret = inflate_stored();  break;
+	case 1: ret = inflate_fixed();   break;
+  }
+  spin_unlock(&inflate_lock);
 
   DEBG(">");
 
   /* bad block type */
-  return 2;
+  return ret;
 
  underrun:
   return 4;			/* Input underrun */
Index: linux/lib/zlib_inflate/inftrees.c
===================================================================
--- linux.orig/lib/zlib_inflate/inftrees.c
+++ linux/lib/zlib_inflate/inftrees.c
@@ -4,11 +4,19 @@
  */
 
 #include <linux/zutil.h>
+#include <linux/spinlock.h>
 #include "inftrees.h"
 #include "infutil.h"
 
 static const char inflate_copyright[] __attribute_used__ =
    " inflate 1.1.3 Copyright 1995-1998 Mark Adler ";
+
+/*
+ * lock protecting static variables of huft_build() and other inflate
+ * functions, to reduce their insane stack footprint.
+ */
+static DEFINE_SPINLOCK(inflate_lock);
+
 /*
   If you use the zlib library in a product, an acknowledgment is welcome
   in the documentation of your product. If for some reason you cannot
@@ -107,7 +115,7 @@ static int huft_build(
 {
 
   uInt a;                       /* counter for codes of length k */
-  uInt c[BMAX+1];               /* bit length count table */
+  static uInt c[BMAX+1];        /* bit length count table */
   uInt f;                       /* i repeats in table every f entries */
   int g;                        /* maximum code length */
   int h;                        /* table level */
@@ -118,10 +126,10 @@ static int huft_build(
   uInt mask;                    /* (1 << w) - 1, to avoid cc -O bug on HP */
   register uInt *p;             /* pointer into c[], b[], or v[] */
   inflate_huft *q;              /* points to current table */
-  struct inflate_huft_s r;      /* table entry for structure assignment */
-  inflate_huft *u[BMAX];        /* table stack */
+  static struct inflate_huft_s r; /* table entry for structure assignment */
+  static inflate_huft *u[BMAX]; /* table stack */
[...4391 lines suppressed...]
+	depends on PREEMPT
+	help
+	  This option measures the time spent in preempt-off critical
+	  sections, with microsecond accuracy.
+
+	  The default measurement method is a maximum search, which is
+	  disabled by default and can be runtime (re-)started via:
+
+	      echo 0 > /proc/sys/kernel/preempt_max_latency
+
+	  (Note that kernel size and overhead increases with this option
+	  enabled. This option and the irqs-off timing option can be
+	  used together or separately.)
+
+config PREEMPT_OFF_HIST
+        bool "non-preemptible critical section latency histogram"
+        default n
+        depends on CRITICAL_PREEMPT_TIMING
+        help
+          This option logs all the non-preemptible critical section latency
+	  timing to a big histogram bucket, in the meanwhile, it also
+	  dummies up printk produced by non-preemptible critical section
+	  latency timing.
+
+          The non-preemptible critical section latency timing histogram can
+	  be viewed via:
+
+              cat /proc/latency_hist/preempt_off_latency/CPU*
+
+          (Note: * presents CPU ID.)
+
+config CRITICAL_IRQSOFF_TIMING
+	bool "Interrupts-off critical section latency timing"
+	default n
+	help
+	  This option measures the time spent in irqs-off critical
+	  sections, with microsecond accuracy.
+
+	  The default measurement method is a maximum search, which is
+	  disabled by default and can be runtime (re-)started via:
+
+	      echo 0 > /proc/sys/kernel/preempt_max_latency
+
+	  (Note that kernel size and overhead increases with this option
+	  enabled. This option and the preempt-off timing option can be
+	  used together or separately.)
+
+config INTERRUPT_OFF_HIST
+        bool "interrupts-off critical section latency histogram"
+        default n
+        depends on CRITICAL_IRQSOFF_TIMING
+        help
+          This option logs all the interrupts-off critical section latency
+          timing to a big histogram bucket, in the meanwhile, it also
+          dummies up printk produced by interrupts-off critical section
+          latency timing.
+
+          The interrupts-off critical section latency timing histogram can
+          be viewed via:
+
+              cat /proc/latency_hist/interrupt_off_latency/CPU*
+
+          (Note: * presents CPU ID.)
+
+config CRITICAL_TIMING
+	bool
+	default y
+	depends on CRITICAL_PREEMPT_TIMING || CRITICAL_IRQSOFF_TIMING
+
+config LATENCY_TIMING
+	bool
+	default y
+	depends on WAKEUP_TIMING || CRITICAL_TIMING
+
+config CRITICAL_LATENCY_HIST
+	bool
+	default y
+	depends on PREEMPT_OFF_HIST || INTERRUPT_OFF_HIST
+
+config LATENCY_HIST
+	bool
+	default y
+	depends on WAKEUP_LATENCY_HIST || CRITICAL_LATENCY_HIST
+
+config LATENCY_TRACE
+	bool "Latency tracing"
+	default n
+	depends on LATENCY_TIMING
+	help
+	  This option enables a kernel tracing mechanism that will track
+	  precise function-call granularity kernel execution during
+	  wakeup paths or critical sections.  When this option is enabled
+	  then the last maximum latency timing event's full trace can be
+	  found in /proc/latency_trace, in a human-readable (or rather as
+	  some would say, in a kernel-developer-readable) form.
+
+	  (Note that kernel size and overhead increases noticeably
+	  with this option enabled.)
+
+config MCOUNT
+	bool
+	depends on LATENCY_TRACE
+	default y
+
 config DEBUG_KOBJECT
 	bool "kobject debugging"
 	depends on DEBUG_KERNEL
@@ -176,9 +316,9 @@ config DEBUG_VM
 
 	  If unsure, say N.
 
-config FRAME_POINTER
+config USE_FRAME_POINTER
 	bool "Compile the kernel with frame pointers"
-	depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML)
+	depends on DEBUG_KERNEL && !MCOUNT && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML)
 	default y if DEBUG_INFO && UML
 	help
 	  If you say Y here the resulting kernel image will be slightly larger
@@ -186,6 +326,11 @@ config FRAME_POINTER
 	  some architectures or if you use external debuggers.
 	  If you don't debug the kernel, you can say N.
 
+config FRAME_POINTER
+	bool
+	depends on USE_FRAME_POINTER || MCOUNT
+	default y
+
 config RCU_TORTURE_TEST
 	tristate "torture tests for RCU"
 	depends on DEBUG_KERNEL
 init/main.c |    9 +++++++++
 1 files changed, 9 insertions(+)

Index: linux-latency-tracing.q/init/main.c
===================================================================
--- linux-latency-tracing.q.orig/init/main.c
+++ linux-latency-tracing.q/init/main.c
@@ -108,6 +108,8 @@ extern void tc_init(void);
 enum system_states system_state;
 EXPORT_SYMBOL(system_state);
 
+extern cycles_t preempt_max_latency;
+
 /*
  * Boot command-line arguments
  */
@@ -544,6 +546,13 @@ asmlinkage void __init start_kernel(void
 
 	acpi_early_init(); /* before LAPIC and SMP init */
 
+#ifdef CONFIG_LATENCY_TIMING
+	/*
+	 * Start tracing now - the bootup traces arent too interesting:
+	 */
+	preempt_max_latency = 1000;
+#endif
+
 	/* Do the rest non-__init'ed, we're now alive */
 	rest_init();
 }
 kernel/latency.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: linux-latency-tracing.q/kernel/latency.c
===================================================================
--- linux-latency-tracing.q.orig/kernel/latency.c
+++ linux-latency-tracing.q/kernel/latency.c
@@ -316,8 +316,8 @@ static void notrace printk_name(unsigned
 static unsigned long *worst_stack_bp;
 #endif
 static DEFINE_RAW_SPINLOCK(worst_stack_lock);
-unsigned long worst_stack_left = THREAD_SIZE;
-static unsigned long worst_stack_printed = THREAD_SIZE;
+unsigned long worst_stack_left = THREAD_SIZE/2;
+static unsigned long worst_stack_printed = THREAD_SIZE/2;
 static char worst_stack_comm[TASK_COMM_LEN+1];
 static int worst_stack_pid;
 static unsigned long worst_stack_sp;
--- linux-2.6.14/kernel/latency.c~	2005-12-29 21:03:11.000000000 -0500
+++ linux-2.6.14/kernel/latency.c	2005-12-29 21:03:51.000000000 -0500
@@ -24,6 +24,8 @@
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
 #include <asm/rtc.h>
+#include <asm/system.h>
+#include <asm/unistd.h>
 
 #ifndef CONFIG_PREEMPT_RT
 # define DEFINE_RAW_SPINLOCK		DEFINE_SPINLOCK
--- linux-2.6.14/include/asm-x86_64/unistd.h~	2005-12-29 21:12:32.000000000 -0500
+++ linux-2.6.14/include/asm-x86_64/unistd.h	2005-12-29 21:13:05.000000000 -0500
@@ -581,6 +581,7 @@ __SYSCALL(__NR_inotify_add_watch, sys_in
 __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
 
 #define __NR_syscall_max __NR_inotify_rm_watch
+#define NR_syscalls 256
 #ifndef __NO_STUBS
 
 /* user-visible error numbers are in the range -1 - -4095 */

linux-2.6-dm-sync-overrun.patch:
 dm-log.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-dm-sync-overrun.patch ---

--- linux-2.6.15/drivers/md/dm-log.c~	2006-01-09 14:09:53.000000000 -0500
+++ linux-2.6.15/drivers/md/dm-log.c	2006-01-09 14:10:03.000000000 -0500
@@ -573,7 +573,7 @@ static int core_get_resync_work(struct d
 					     lc->sync_search);
 		lc->sync_search = *region + 1;
 
-		if (*region == lc->region_count)
+		if (*region >= lc->region_count)
 			return 0;
 
 	} while (log_test_bit(lc->recovering_bits, *region));

linux-2.6-edid-check.patch:
 video.S |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

--- NEW FILE linux-2.6-edid-check.patch ---
--- linux-2.6.15/arch/i386/boot/video.S~	2006-01-06 01:26:06.000000000 -0500
+++ linux-2.6.15/arch/i386/boot/video.S	2006-01-06 01:28:40.000000000 -0500
@@ -1951,9 +1951,18 @@ store_edid:
 	stosl
 
 	movw	$0x4f15, %ax                    # do VBE/DDC
-	movw	$0x01, %bx
+	movw	$0x00, %bx                      # INSTALLATION CHECK / CAPABILITIES
 	movw	$0x00, %cx
-	movw    $0x00, %dx
+	movw	$0x00, %dx
+	movw	$0x140, %di
+	int		$0x10
+	cmpb	$0x01, %ah
+	je		no_edid
+
+	movw	$0x4f15, %ax                    # do VBE/DDC
+	movw	$0x01, %bx                      # READ_EDID
+	movw	$0x00, %cx
+	movw	$0x00, %dx
 	movw	$0x140, %di
 	int	$0x10
 
--- linux-2.6.15/arch/i386/boot/video.S~	2006-01-06 02:55:20.000000000 -0500
+++ linux-2.6.15/arch/i386/boot/video.S	2006-01-06 02:55:28.000000000 -0500
@@ -1966,6 +1966,7 @@ store_edid:
 	movw	$0x140, %di
 	int	$0x10
 
+no_edid:
 	popw	%di				# restore all registers
 	popw	%dx
 	popw	%cx

linux-2.6-ia64-spinlock-size.patch:
 arch/ia64/sn/include/xtalk/hubdev.h     |   16 ++++-
 arch/ia64/sn/kernel/io_init.c           |   92 ++++++++++++++++++--------------
 arch/ia64/sn/pci/pcibr/pcibr_dma.c      |   34 ++++++-----
 arch/ia64/sn/pci/pcibr/pcibr_provider.c |   20 +++---
 include/asm-ia64/sn/sn_sal.h            |    3 -
 5 files changed, 94 insertions(+), 71 deletions(-)

--- NEW FILE linux-2.6-ia64-spinlock-size.patch ---

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176827

Upstream status: Prarit submitted post 2.6.15

Patch to fix sn_flush_device_kernel & spinlock initialization

This patch separates the sn_flush_device_list struct into kernel and
common (both kernel and PROM accessible) structures.  As it was, if the
size of a spinlock_t changed (due to additional CONFIG options, etc.) the
sal call which populated the sn_flush_device_list structs would erroneously
write data (and cause memory corruption and/or a panic).

This patch does the following:

1.  Removes sn_flush_device_list and adds sn_flush_device_common and
sn_flush_device_kernel.

2.  Adds a new SAL call to populate a sn_flush_device_common struct per
device, not per widget as previously done.

3.  Correctly initializes each device's sn_flush_device_kernel spinlock_t
struct (before it was only doing each widget's first device).


diff -urNp fedora-orig/arch/ia64/sn/include/xtalk/hubdev.h fedora-work/arch/ia64/sn/include/xtalk/hubdev.h
--- fedora-orig/arch/ia64/sn/include/xtalk/hubdev.h	2006-01-03 10:36:41.000000000 -0500
+++ fedora-work/arch/ia64/sn/include/xtalk/hubdev.h	2006-01-03 10:37:21.000000000 -0500
@@ -26,11 +26,14 @@
 #define IIO_NUM_ITTES   7
 #define HUB_NUM_BIG_WINDOW      (IIO_NUM_ITTES - 1)
 
-struct sn_flush_device_list {
+/* This struct is shared between the PROM and the kernel.
+ * Changes to this struct will require corresponding changes to the kernel.
+ */
+struct sn_flush_device_common {
 	int sfdl_bus;
 	int sfdl_slot;
 	int sfdl_pin;
-	struct bar_list {
+	struct common_bar_list {
 		unsigned long start;
 		unsigned long end;
 	} sfdl_bar_list[6];
@@ -40,14 +43,19 @@ struct sn_flush_device_list {
 	uint32_t sfdl_persistent_busnum;
 	uint32_t sfdl_persistent_segment;
 	struct pcibus_info *sfdl_pcibus_info;
+};
+
+/* This struct is kernel only and is not used by the PROM */
+struct sn_flush_device_kernel {
 	spinlock_t sfdl_flush_lock;
+	struct sn_flush_device_common *common;
 };
 
 /*
- * **widget_p - Used as an array[wid_num][device] of sn_flush_device_list.
+ * **widget_p - Used as an array[wid_num][device] of sn_flush_device_kernel.
  */
 struct sn_flush_nasid_entry  {
-	struct sn_flush_device_list **widget_p; /* Used as a array of wid_num */
+	struct sn_flush_device_kernel **widget_p; // Used as an array of wid_num
 	uint64_t iio_itte[8];
 };
 
diff -urNp fedora-orig/arch/ia64/sn/kernel/io_init.c fedora-work/arch/ia64/sn/kernel/io_init.c
--- fedora-orig/arch/ia64/sn/kernel/io_init.c	2006-01-03 10:36:41.000000000 -0500
+++ fedora-work/arch/ia64/sn/kernel/io_init.c	2006-01-03 10:37:21.000000000 -0500
@@ -76,11 +76,12 @@ static struct sn_pcibus_provider sn_pci_
 };
 
 /*
- * Retrieve the DMA Flush List given nasid.  This list is needed 
- * to implement the WAR - Flush DMA data on PIO Reads.
+ * Retrieve the DMA Flush List given nasid, widget, and device.
+ * This list is needed to implement the WAR - Flush DMA data on PIO Reads.
  */
-static inline uint64_t
-sal_get_widget_dmaflush_list(u64 nasid, u64 widget_num, u64 address)
+static inline u64
+sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num,
+			     u64 address)
 {
 
 	struct ia64_sal_retval ret_stuff;
@@ -88,17 +89,17 @@ sal_get_widget_dmaflush_list(u64 nasid, 
 	ret_stuff.v0 = 0;
 
 	SAL_CALL_NOLOCK(ret_stuff,
-			(u64) SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST,
-			(u64) nasid, (u64) widget_num, (u64) address, 0, 0, 0,
-			0);
-	return ret_stuff.v0;
+			(u64) SN_SAL_IOIF_GET_DEVICE_DMAFLUSH_LIST,
+			(u64) nasid, (u64) widget_num,
+			(u64) device_num, (u64) address, 0, 0, 0);
+	return ret_stuff.status;
 
 }
 
 /*
  * Retrieve the hub device info structure for the given nasid.
  */
-static inline uint64_t sal_get_hubdev_info(u64 handle, u64 address)
+static inline u64 sal_get_hubdev_info(u64 handle, u64 address)
 {
 
 	struct ia64_sal_retval ret_stuff;
@@ -114,7 +115,7 @@ static inline uint64_t sal_get_hubdev_in
 /*
  * Retrieve the pci bus information given the bus number.
  */
-static inline uint64_t sal_get_pcibus_info(u64 segment, u64 busnum, u64 address)
+static inline u64 sal_get_pcibus_info(u64 segment, u64 busnum, u64 address)
 {
 
 	struct ia64_sal_retval ret_stuff;
@@ -130,7 +131,7 @@ static inline uint64_t sal_get_pcibus_in
 /*
  * Retrieve the pci device information given the bus and device|function number.
  */
-static inline uint64_t
+static inline u64
 sal_get_pcidev_info(u64 segment, u64 bus_number, u64 devfn, u64 pci_dev, 
 			u64 sn_irq_info)
 {
@@ -170,12 +171,12 @@ sn_pcidev_info_get(struct pci_dev *dev)
  */
 static void sn_fixup_ionodes(void)
 {
-
-	struct sn_flush_device_list *sn_flush_device_list;
+	struct sn_flush_device_kernel *sn_flush_device_kernel;
+	struct sn_flush_device_kernel *dev_entry;
 	struct hubdev_info *hubdev;
-	uint64_t status;
-	uint64_t nasid;
-	int i, widget;
+	u64 status;
+	u64 nasid;
+	int i, widget, device;
 
 	/*
 	 * Get SGI Specific HUB chipset information.
@@ -186,7 +187,7 @@ static void sn_fixup_ionodes(void)
 		nasid = cnodeid_to_nasid(i);
 		hubdev->max_segment_number = 0xffffffff;
 		hubdev->max_pcibus_number = 0xff;
-		status = sal_get_hubdev_info(nasid, (uint64_t) __pa(hubdev));
+		status = sal_get_hubdev_info(nasid, (u64) __pa(hubdev));
 		if (status)
 			continue;
 
@@ -213,38 +214,49 @@ static void sn_fixup_ionodes(void)
 
 		hubdev->hdi_flush_nasid_list.widget_p =
 		    kmalloc((HUB_WIDGET_ID_MAX + 1) *
-			    sizeof(struct sn_flush_device_list *), GFP_KERNEL);
-
+			    sizeof(struct sn_flush_device_kernel *),
+			    GFP_KERNEL);
 		memset(hubdev->hdi_flush_nasid_list.widget_p, 0x0,
 		       (HUB_WIDGET_ID_MAX + 1) *
-		       sizeof(struct sn_flush_device_list *));
+		       sizeof(struct sn_flush_device_kernel *));
 
 		for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) {
-			sn_flush_device_list = kmalloc(DEV_PER_WIDGET *
-						       sizeof(struct
-							      sn_flush_device_list),
-						       GFP_KERNEL);
-			memset(sn_flush_device_list, 0x0,
+			sn_flush_device_kernel = kmalloc(DEV_PER_WIDGET *
+						         sizeof(struct
+						        sn_flush_device_kernel),
+						        GFP_KERNEL);
+			if (!sn_flush_device_kernel)
+				BUG();
+			memset(sn_flush_device_kernel, 0x0,
 			       DEV_PER_WIDGET *
-			       sizeof(struct sn_flush_device_list));
+			       sizeof(struct sn_flush_device_kernel));
 
-			status =
-			    sal_get_widget_dmaflush_list(nasid, widget,
-							 (uint64_t)
-							 __pa
-							 (sn_flush_device_list));
-			if (status) {
-				kfree(sn_flush_device_list);
-				continue;
-			}
+			dev_entry = sn_flush_device_kernel;
+			for (device = 0; device < DEV_PER_WIDGET;
+			     device++,dev_entry++) {
+				dev_entry->common = kmalloc(sizeof(struct
+					      	        sn_flush_device_common),
+					                    GFP_KERNEL);
+				if (!dev_entry->common)
+					BUG();
+				memset(dev_entry->common, 0x0, sizeof(struct
+					     	       sn_flush_device_common));
+
+				status = sal_get_device_dmaflush_list(nasid,
+									widget,
+								       	device,
+						      (u64)(dev_entry->common));
+				if (status)
+					BUG();
 
-			spin_lock_init(&sn_flush_device_list->sfdl_flush_lock);
-			hubdev->hdi_flush_nasid_list.widget_p[widget] =
-			    sn_flush_device_list;
-		}
+				spin_lock_init(&dev_entry->sfdl_flush_lock);
+			}
 
+			if (sn_flush_device_kernel)
+				hubdev->hdi_flush_nasid_list.widget_p[widget] =
+						       sn_flush_device_kernel;
+	        }
 	}
-
 }
 
 /*
diff -urNp fedora-orig/arch/ia64/sn/pci/pcibr/pcibr_dma.c fedora-work/arch/ia64/sn/pci/pcibr/pcibr_dma.c
--- fedora-orig/arch/ia64/sn/pci/pcibr/pcibr_dma.c	2006-01-03 10:36:41.000000000 -0500
+++ fedora-work/arch/ia64/sn/pci/pcibr/pcibr_dma.c	2006-01-03 10:37:21.000000000 -0500
@@ -218,7 +218,9 @@ void sn_dma_flush(uint64_t addr)
 	uint64_t flags;
 	uint64_t itte;
 	struct hubdev_info *hubinfo;
-	volatile struct sn_flush_device_list *p;
+	volatile struct sn_flush_device_kernel *p;
+	volatile struct sn_flush_device_common *common;
+
 	struct sn_flush_nasid_entry *flush_nasid_list;
 
 	if (!sn_ioif_inited)
@@ -268,17 +270,17 @@ void sn_dma_flush(uint64_t addr)
 	p = &flush_nasid_list->widget_p[wid_num][0];
 
 	/* find a matching BAR */
-	for (i = 0; i < DEV_PER_WIDGET; i++) {
+	for (i = 0; i < DEV_PER_WIDGET; i++,p++) {
+		common = p->common;
 		for (j = 0; j < PCI_ROM_RESOURCE; j++) {
-			if (p->sfdl_bar_list[j].start == 0)
+			if (common->sfdl_bar_list[j].start == 0)
 				break;
-			if (addr >= p->sfdl_bar_list[j].start
-			    && addr <= p->sfdl_bar_list[j].end)
+			if (addr >= common->sfdl_bar_list[j].start
+			    && addr <= common->sfdl_bar_list[j].end)
 				break;
 		}
-		if (j < PCI_ROM_RESOURCE && p->sfdl_bar_list[j].start != 0)
+		if (j < PCI_ROM_RESOURCE && common->sfdl_bar_list[j].start != 0)
 			break;
-		p++;
 	}
 
 	/* if no matching BAR, return without doing anything. */
@@ -304,24 +306,24 @@ void sn_dma_flush(uint64_t addr)
 		if ((1 << XWIDGET_PART_REV_NUM_REV(revnum)) & PV907516) {
 			return;
 		} else {
-			pcireg_wrb_flush_get(p->sfdl_pcibus_info,
-					     (p->sfdl_slot - 1));
+			pcireg_wrb_flush_get(common->sfdl_pcibus_info,
+					     (common->sfdl_slot - 1));
 		}
 	} else {
-		spin_lock_irqsave(&((struct sn_flush_device_list *)p)->
-				  sfdl_flush_lock, flags);
-
-		*p->sfdl_flush_addr = 0;
+		spin_lock_irqsave((spinlock_t *)&p->sfdl_flush_lock,
+				  flags);
+		*common->sfdl_flush_addr = 0;
 
 		/* force an interrupt. */
-		*(volatile uint32_t *)(p->sfdl_force_int_addr) = 1;
+		*(volatile uint32_t *)(common->sfdl_force_int_addr) = 1;
 
 		/* wait for the interrupt to come back. */
-		while (*(p->sfdl_flush_addr) != 0x10f)
+		while (*(common->sfdl_flush_addr) != 0x10f)
 			cpu_relax();
 
 		/* okay, everything is synched up. */
-		spin_unlock_irqrestore((spinlock_t *)&p->sfdl_flush_lock, flags);
+		spin_unlock_irqrestore((spinlock_t *)&p->sfdl_flush_lock,
+				       flags);
 	}
 	return;
 }
diff -urNp fedora-orig/arch/ia64/sn/pci/pcibr/pcibr_provider.c fedora-work/arch/ia64/sn/pci/pcibr/pcibr_provider.c
--- fedora-orig/arch/ia64/sn/pci/pcibr/pcibr_provider.c	2006-01-03 10:36:41.000000000 -0500
+++ fedora-work/arch/ia64/sn/pci/pcibr/pcibr_provider.c	2006-01-03 10:37:21.000000000 -0500
@@ -92,7 +92,8 @@ pcibr_bus_fixup(struct pcibus_bussoft *p
 	cnodeid_t near_cnode;
 	struct hubdev_info *hubdev_info;
 	struct pcibus_info *soft;
-	struct sn_flush_device_list *sn_flush_device_list;
+	struct sn_flush_device_kernel *sn_flush_device_kernel;
+	struct sn_flush_device_common *common;
 
 	if (! IS_PCI_BRIDGE_ASIC(prom_bussoft->bs_asic_type)) {
 		return NULL;
@@ -137,20 +138,19 @@ pcibr_bus_fixup(struct pcibus_bussoft *p
 	hubdev_info = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo);
 
 	if (hubdev_info->hdi_flush_nasid_list.widget_p) {
-		sn_flush_device_list = hubdev_info->hdi_flush_nasid_list.
+		sn_flush_device_kernel = hubdev_info->hdi_flush_nasid_list.
 		    widget_p[(int)soft->pbi_buscommon.bs_xid];
-		if (sn_flush_device_list) {
+		if (sn_flush_device_kernel) {
 			for (j = 0; j < DEV_PER_WIDGET;
-			     j++, sn_flush_device_list++) {
-				if (sn_flush_device_list->sfdl_slot == -1)
+			     j++, sn_flush_device_kernel++) {
+				common = sn_flush_device_kernel->common;
+				if (common->sfdl_slot == -1)
 					continue;
-				if ((sn_flush_device_list->
-				     sfdl_persistent_segment ==
+				if ((common->sfdl_persistent_segment ==
 				     soft->pbi_buscommon.bs_persist_segment) &&
-				     (sn_flush_device_list->
-				     sfdl_persistent_busnum ==
+				     (common->sfdl_persistent_busnum ==
 				     soft->pbi_buscommon.bs_persist_busnum))
-					sn_flush_device_list->sfdl_pcibus_info =
+					common->sfdl_pcibus_info =
 					    soft;
 			}
 		}
diff -urNp fedora-orig/include/asm-ia64/sn/sn_sal.h fedora-work/include/asm-ia64/sn/sn_sal.h
--- fedora-orig/include/asm-ia64/sn/sn_sal.h	2006-01-03 10:36:41.000000000 -0500
+++ fedora-work/include/asm-ia64/sn/sn_sal.h	2006-01-03 10:37:21.000000000 -0500
@@ -75,7 +75,8 @@
 #define  SN_SAL_IOIF_GET_HUBDEV_INFO		   0x02000055
 #define  SN_SAL_IOIF_GET_PCIBUS_INFO		   0x02000056
 #define  SN_SAL_IOIF_GET_PCIDEV_INFO		   0x02000057
-#define  SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST	   0x02000058
+#define  SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST	   0x02000058	// deprecated
+#define  SN_SAL_IOIF_GET_DEVICE_DMAFLUSH_LIST	   0x0200005a
 
 #define SN_SAL_HUB_ERROR_INTERRUPT		   0x02000060
 #define SN_SAL_BTE_RECOVER			   0x02000061

linux-2.6-kill-blk_attempt_merge.patch:
 block/ll_rw_blk.c      |   24 ------------------------
 drivers/ide/ide-cd.c   |   10 ----------
 include/linux/blkdev.h |    1 -
 3 files changed, 35 deletions(-)

--- NEW FILE linux-2.6-kill-blk_attempt_merge.patch ---

On Fri, Jan 06 2006, Dave Jones wrote:
> Looks like some nice slab poison...
> 
> 		Dave
> 
> Oops: 0000 [#1]
> last sysfs file:
> /devices/pci0000:00/0000:00:1d.7/usb1/1-0:1.0/bAlternateSettingModules linked
> in: usb_storage ata_piix libata e1000 ohci1394 ieee1394 uhci_hcdsCPU:    0
> EIP:    0060:[<c01c312e>]    Not tainted VLI
> EFLAGS: 00010002   (2.6.15-1.1819_FC5)
> EIP is at rb_next+0x9/0x22
> eax: 6b6b6b6b   ebx: dfed01f8   ecx: c01bf65a   edx: 6b6b6b6b
> esi: c1991e98   edi: 00000202   ebp: dfed403c   esp: c03c1f14
> ds: 007b   es: 007b   ss: 0068
> Process swapper (pid: 0, threadinfo=c03c1000 task=c0327ba0)
> Stack: c01bf662 c01b5dfa dfed01f8 c01b85dc c040c284 00000004 c1991e98 c023c8ab
>        c1991e98 00000000 c040c284 00000000 c023d3a4 000194d0 00000000 dfed403c
>        c1991e98 c040c284 c1991e98 00000000 c0231f2d 000194d0 00000000 000194d0
> Call Trace:
>  [<c01bf662>] cfq_latter_request+0x8/0x14     [<c01b5dfa>] elv_latter_request+07
> [<c01b85dc>] blk_attempt_remerge+0x1d/0x3c     [<c023c8ab>] cdrom_start_read+0e
> [<c023d3a4>] ide_do_rw_cdrom+0xdd/0x14a     [<c0231f2d>] start_request+0x1b1/01
> [<c023220f>] ide_do_request+0x2a0/0x2fb     [<c023265e>] ide_intr+0xf3/0x11b
>  [<c023c1a7>] cdrom_read_intr+0x0/0x2a1     [<c013632a>] handle_IRQ_event+0x23/c
> [<c01363cd>] __do_IRQ+0x7a/0xcd     [<c01054d0>] do_IRQ+0x5c/0x77
>  =======================
>  [<c0103cea>] common_interrupt+0x1a/0x20     [<c0101120>] mwait_idle+0x1a/0x2e
>  [<c01010a3>] cpu_idle+0x38/0x4d     [<c0390635>] start_kernel+0x17a/0x17c
> Code: 85 c0 74 0b 8b 50 0c 85 d2 74 04 89 d0 eb f5 c3 8b 00 85 c0 74 0b 8b 50 0

The blk_attempt_remerge() is a bad interface to be honest, and it's hard
to get to work reliably because it's done too late. I think the best
option is just to kill it, this will cause problems with other io
schedulers as well.

I've merged this up for 2.6.16-rc inclusion, probably should go to
stabel as well.

---

[PATCH] Kill blk_attempt_remerge()

It's a bad interface, and it's always done too late. Remove it.

Signed-off-by: Jens Axboe <axboe at suse.de>

--- linux-2.6.15/block/ll_rw_blk.c~	2006-01-09 11:30:20.000000000 -0500
+++ linux-2.6.15/block/ll_rw_blk.c	2006-01-09 11:30:43.000000000 -0500
@@ -2609,30 +2609,6 @@ static inline int attempt_front_merge(re
 	return 0;
 }
 
-/**
- * blk_attempt_remerge  - attempt to remerge active head with next request
- * @q:    The &request_queue_t belonging to the device
- * @rq:   The head request (usually)
- *
- * Description:
- *    For head-active devices, the queue can easily be unplugged so quickly
- *    that proper merging is not done on the front request. This may hurt
- *    performance greatly for some devices. The block layer cannot safely
- *    do merging on that first request for these queues, but the driver can
- *    call this function and make it happen any way. Only the driver knows
- *    when it is safe to do so.
- **/
-void blk_attempt_remerge(request_queue_t *q, struct request *rq)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(q->queue_lock, flags);
-	attempt_back_merge(q, rq);
-	spin_unlock_irqrestore(q->queue_lock, flags);
-}
-
-EXPORT_SYMBOL(blk_attempt_remerge);
-
 static int __make_request(request_queue_t *q, struct bio *bio)
 {
 	struct request *req;
--- linux-2.6.15/drivers/ide/ide-cd.c~	2006-01-09 11:30:50.000000000 -0500
+++ linux-2.6.15/drivers/ide/ide-cd.c	2006-01-09 11:30:55.000000000 -0500
@@ -1338,8 +1338,6 @@ static ide_startstop_t cdrom_start_read 
 	if (cdrom_read_from_buffer(drive))
 		return ide_stopped;
 
-	blk_attempt_remerge(drive->queue, rq);
-
 	/* Clear the local sector buffer. */
 	info->nsectors_buffered = 0;
 
--- linux-2.6.15/include/linux/blkdev.h~	2006-01-09 11:31:17.000000000 -0500
+++ linux-2.6.15/include/linux/blkdev.h	2006-01-09 11:31:20.000000000 -0500
@@ -559,7 +559,6 @@ extern void register_disk(struct gendisk
 extern void generic_make_request(struct bio *bio);
 extern void blk_put_request(struct request *);
 extern void blk_end_sync_rq(struct request *rq);
-extern void blk_attempt_remerge(request_queue_t *, struct request *);
 extern struct request *blk_get_request(request_queue_t *, int, gfp_t);
 extern void blk_insert_request(request_queue_t *, struct request *, int, void *);
 extern void blk_requeue_request(request_queue_t *, struct request *);
--- linux-2.6.15/drivers/ide/ide-cd.c~	2006-01-09 11:44:09.000000000 -0500
+++ linux-2.6.15/drivers/ide/ide-cd.c	2006-01-09 11:44:18.000000000 -0500
@@ -1878,14 +1878,6 @@ static ide_startstop_t cdrom_start_write
 		return ide_stopped;
 	}
 
-	/*
-	 * for dvd-ram and such media, it's a really big deal to get
-	 * big writes all the time. so scour the queue and attempt to
-	 * remerge requests, often the plugging will not have had time
-	 * to do this properly
-	 */
-	blk_attempt_remerge(drive->queue, rq);
-
 	info->nsectors_buffered = 0;
 
 	/* use dma, if possible. we don't need to check more, since we

linux-2.6-posix-timers-sched_time-accumulation.patch:
 posix-cpu-timers.c |   13 +------------
 1 files changed, 1 insertion(+), 12 deletions(-)

--- NEW FILE linux-2.6-posix-timers-sched_time-accumulation.patch ---

Message-Id: <20060106.153648.27161028.davem at davemloft.net>
To: linux-kernel at vger.kernel.org
CC: roland at redhat.com, torvalds at osdl.org
Subject: [PATCH]: Fix posix-cpu-timers sched_time accumulation
From: "David S. Miller" <davem at davemloft.net>

I've spent the past 3 days digging into a glibc testsuite failure in
current CVS, specifically libc/rt/tst-cputimer1.c The thr1 and thr2
timers fire too early in the second pass of this test.  The second
pass is noteworthy because it makes use of intervals, whereas the
first pass does not.

All throughout the posix-cpu-timers.c code, the calculation of the
process sched_time sum is implemented roughly as:

	unsigned long long sum;

	sum = tsk->signal->sched_time;
	t = tsk;
	do {
		sum += t->sched_time;
		t = next_thread(t);
	} while (t != tsk);

In fact this is the exact scheme used by check_process_timers().

In the case of check_process_timers(), current->sched_time has just
been updated (via scheduler_tick(), which is invoked by
update_process_times(), which subsequently invokes
run_posix_cpu_timers()) So there is no special processing necessary
wrt. that.

In other contexts, we have to allot for the fact that tsk->sched_time
might be a bit out of date if we are current.  And the
posix-cpu-timers.c code uses current_sched_time() to deal with that.

Unfortunately it does so in an erroneous and inconsistent manner in
one spot which is what results in the early timer firing.

In cpu_clock_sample_group_locked(), it does this:

		cpu->sched = p->signal->sched_time;
		/* Add in each other live thread.  */
		while ((t = next_thread(t)) != p) {
			cpu->sched += t->sched_time;
		}
		if (p->tgid == current->tgid) {
			/*
			 * We're sampling ourselves, so include the
			 * cycles not yet banked.  We still omit
			 * other threads running on other CPUs,
			 * so the total can always be behind as
			 * much as max(nthreads-1,ncpus) * (NSEC_PER_SEC/HZ).
			 */
			cpu->sched += current_sched_time(current);
		} else {
			cpu->sched += p->sched_time;
		}

The problem is the "p->tgid == current->tgid" test.  If "p" is
not current, and the tgids are the same, we will add the process
t->sched_time twice into cpu->sched and omit "p"'s sched_time
which is very very very wrong.

posix-cpu-timers.c has a helper function, sched_ns(p) which takes care
of this, so my fix is to use that here instead of this special tgid
test.

The fact that current can be one of the sub-threads of "p" points out
that we could make things a little bit more accurate, perhaps by using
sched_ns() on every thread we process in these loops.  It also points
out that we don't use the most accurate value for threads in the group
actively running other cpus (and this is mentioned in the comment).

But that is a future enhancement, and this fix here definitely makes
sense.

Signed-off-by: David S. Miller <davem at davemloft.net>

diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index cae4f57..4c68edf 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -238,18 +238,7 @@ static int cpu_clock_sample_group_locked
 		while ((t = next_thread(t)) != p) {
 			cpu->sched += t->sched_time;
 		}
-		if (p->tgid == current->tgid) {
-			/*
-			 * We're sampling ourselves, so include the
-			 * cycles not yet banked.  We still omit
-			 * other threads running on other CPUs,
-			 * so the total can always be behind as
-			 * much as max(nthreads-1,ncpus) * (NSEC_PER_SEC/HZ).
-			 */
-			cpu->sched += current_sched_time(current);
-		} else {
-			cpu->sched += p->sched_time;
-		}
+		cpu->sched += sched_ns(p);
 		break;
 	}
 	return 0;


linux-2.6-ppc-iseries-input-layer.patch:
 Kconfig |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-ppc-iseries-input-layer.patch ---
iSeries has no keyboard, so it's valid to build a kernel with no input layer.
It seems a bit absurd to call one of these 'embedded'.

Signed-off-by: Dave Jones <davej at redhat.com>

--- linux-2.6.15/drivers/input/Kconfig~	2006-01-06 02:27:56.000000000 -0500
+++ linux-2.6.15/drivers/input/Kconfig	2006-01-06 02:28:08.000000000 -0500
@@ -5,7 +5,7 @@
 menu "Input device support"
 
 config INPUT
-	tristate "Generic input layer (needed for keyboard, mouse, ...)" if EMBEDDED
+	tristate "Generic input layer (needed for keyboard, mouse, ...)"
 	default y
 	---help---
 	  Say Y here if you have any input device (mouse, keyboard, tablet,

linux-2.6-pwc-powerup-by-default.patch:
 pwc-if.c |    6 ++++++
 1 files changed, 6 insertions(+)

--- NEW FILE linux-2.6-pwc-powerup-by-default.patch ---
--- linux-2.6.13/drivers/usb/media/pwc/pwc-if.c~	2005-09-28 18:59:49.000000000 -0400
+++ linux-2.6.13/drivers/usb/media/pwc/pwc-if.c	2005-09-28 19:09:08.000000000 -0400
@@ -1946,6 +1946,12 @@ static int usb_pwc_probe(struct usb_inte
 	if (hint < MAX_DEV_HINTS) 
 		device_hint[hint].pdev = pdev;
 
+	if (!power_save) {
+		i = pwc_camera_power(pdev, 1);
+		if (i < 0)
+			Info("Failed to power up the camera! (%d)\n", i);
+	}
+
 	Trace(TRACE_PROBE, "probe() function returning struct at 0x%p.\n", pdev);
 	usb_set_intfdata (intf, pdev);
 	return 0;

linux-2.6-serial-nrports.patch:
 Documentation/kernel-parameters.txt |    2 ++
 drivers/serial/8250.c               |   28 ++++++++++++++++++----------
 drivers/serial/Kconfig              |   10 ++++++++++
 3 files changed, 30 insertions(+), 10 deletions(-)

--- NEW FILE linux-2.6-serial-nrports.patch ---

Make the number of UARTs registered configurable.
Also add a nr_uarts module option to the 8250 code
to override this, up to a maximum of CONFIG_SERIAL_8250_NR_UARTS

This should appease people who complain about a proliferation
of /dev/ttyS & /sysfs nodes whilst at the same time allowing
a single kernel image to support the rarer occasions of
lots of devices.

Signed-off-by: Dave Jones <davej at redhat.com>

diff -urpN --exclude-from=/home/davej/.exclude vanilla/drivers/serial/8250.c serial/drivers/serial/8250.c
--- vanilla/drivers/serial/8250.c	2005-10-27 20:02:08.000000000 -0400
+++ serial/drivers/serial/8250.c	2005-12-07 20:00:16.000000000 -0500
@@ -53,6 +53,8 @@
  */
 static unsigned int share_irqs = SERIAL8250_SHARE_IRQS;
 
+static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS;
+
 /*
  * Debugging.
  */
@@ -2047,7 +2049,7 @@ static void __init serial8250_isa_init_p
 		return;
 	first = 0;
 
-	for (i = 0; i < UART_NR; i++) {
+	for (i = 0; i < nr_uarts; i++) {
 		struct uart_8250_port *up = &serial8250_ports[i];
 
 		up->port.line = i;
@@ -2066,7 +2068,7 @@ static void __init serial8250_isa_init_p
 	}
 
 	for (i = 0, up = serial8250_ports;
-	     i < ARRAY_SIZE(old_serial_port) && i < UART_NR;
+	     i < ARRAY_SIZE(old_serial_port) && i < nr_uarts;
 	     i++, up++) {
 		up->port.iobase   = old_serial_port[i].port;
 		up->port.irq      = irq_canonicalize(old_serial_port[i].irq);
@@ -2088,7 +2090,7 @@ serial8250_register_ports(struct uart_dr
 
 	serial8250_isa_init_ports();
 
-	for (i = 0; i < UART_NR; i++) {
+	for (i = 0; i < nr_uarts; i++) {
 		struct uart_8250_port *up = &serial8250_ports[i];
 
 		up->port.dev = dev;
@@ -2189,7 +2191,7 @@ static int serial8250_console_setup(stru
 	 * if so, search for the first available port that does have
 	 * console support.
 	 */
-	if (co->index >= UART_NR)
+	if (co->index >= nr_uarts)
 		co->index = 0;
 	port = &serial8250_ports[co->index].port;
 	if (!port->iobase && !port->membase)
@@ -2225,7 +2227,7 @@ static int __init find_port(struct uart_
 	int line;
 	struct uart_port *port;
 
-	for (line = 0; line < UART_NR; line++) {
+	for (line = 0; line < nr_uarts; line++) {
 		port = &serial8250_ports[line].port;
 		if (p->iotype == port->iotype &&
 		    p->iobase == port->iobase &&
@@ -2349,7 +2351,7 @@ static int __devexit serial8250_remove(s
 {
 	int i;
 
-	for (i = 0; i < UART_NR; i++) {
+	for (i = 0; i < nr_uarts; i++) {
 		struct uart_8250_port *up = &serial8250_ports[i];
 
 		if (up->port.dev == dev)
@@ -2421,7 +2423,7 @@ static struct uart_8250_port *serial8250
 	/*
 	 * First, find a port entry which matches.
 	 */
-	for (i = 0; i < UART_NR; i++)
+	for (i = 0; i < nr_uarts; i++)
 		if (uart_match_port(&serial8250_ports[i].port, port))
 			return &serial8250_ports[i];
 
@@ -2430,7 +2432,7 @@ static struct uart_8250_port *serial8250
 	 * free entry.  We look for one which hasn't been previously
 	 * used (indicated by zero iobase).
 	 */
-	for (i = 0; i < UART_NR; i++)
+	for (i = 0; i < nr_uarts; i++)
 		if (serial8250_ports[i].port.type == PORT_UNKNOWN &&
 		    serial8250_ports[i].port.iobase == 0)
 			return &serial8250_ports[i];
@@ -2439,7 +2441,7 @@ static struct uart_8250_port *serial8250
 	 * That also failed.  Last resort is to find any entry which
 	 * doesn't have a real port associated with it.
 	 */
-	for (i = 0; i < UART_NR; i++)
+	for (i = 0; i < nr_uarts; i++)
 		if (serial8250_ports[i].port.type == PORT_UNKNOWN)
 			return &serial8250_ports[i];
 
@@ -2524,8 +2526,11 @@ static int __init serial8250_init(void)
 {
 	int ret, i;
 
+	if (nr_uarts > UART_NR)
+		nr_uarts = UART_NR;
+
 	printk(KERN_INFO "Serial: 8250/16550 driver $Revision: 1.90 $ "
-		"%d ports, IRQ sharing %sabled\n", (int) UART_NR,
+		"%d ports, IRQ sharing %sabled\n", nr_uarts,
 		share_irqs ? "en" : "dis");
 
 	for (i = 0; i < NR_IRQS; i++)
@@ -2585,6 +2590,9 @@ module_param(share_irqs, uint, 0644);
 MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices"
 	" (unsafe)");
 
+module_param(nr_uarts, uint, 0644);
+MODULE_PARM_DESC(nr_uarts, "Maximum number of UARTs supported. (1-" __MODULE_STRING(CONFIG_SERIAL_8250_NR_UARTS) ")");
+
 #ifdef CONFIG_SERIAL_8250_RSA
 module_param_array(probe_rsa, ulong, &probe_rsa_count, 0444);
 MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA");
diff -urpN --exclude-from=/home/davej/.exclude vanilla/drivers/serial/Kconfig serial/drivers/serial/Kconfig
--- vanilla/drivers/serial/Kconfig	2005-10-27 20:02:08.000000000 -0400
+++ serial/drivers/serial/Kconfig	2005-12-07 19:24:11.000000000 -0500
@@ -95,6 +95,16 @@ config SERIAL_8250_NR_UARTS
 	  PCI enumeration and any ports that may be added at run-time
 	  via hot-plug, or any ISA multi-port serial cards.
 
+config SERIAL_8250_RUNTIME_UARTS
+	int "Number of 8250/16550 serial ports to register at runtime"
+	depends on SERIAL_8250
+	default "4"
+	help
+	  Set this to the maximum number of serial ports you want
+	  the kernel to register at boot time.  This can be overriden
+	  with the module parameter "nr_uarts", or boot-time parameter
+	  8250.nr_uarts
+
 config SERIAL_8250_EXTENDED
 	bool "Extended 8250/16550 serial driver options"
 	depends on SERIAL_8250
--- serial/Documentation/kernel-parameters.txt~	2005-12-07 20:16:18.000000000 -0500
+++ serial/Documentation/kernel-parameters.txt	2005-12-07 20:17:44.000000000 -0500
@@ -982,6 +982,8 @@ running once the system is up.
 
 	nowb		[ARM]
 
+	nr_uarts=	[SERIAL] maximum number of UARTs to be registered.
+
 	opl3=		[HW,OSS]
 			Format: <io>
 

linux-2.6-smsc-ircc2-pnp.patch:
 smsc-ircc2.c |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+)

--- NEW FILE linux-2.6-smsc-ircc2-pnp.patch ---

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=153970

--- linux-2.6.13/drivers/net/irda/smsc-ircc2.c~	2005-10-25 00:38:18.000000000 -0400
+++ linux-2.6.13/drivers/net/irda/smsc-ircc2.c	2005-10-25 00:43:03.000000000 -0400
@@ -54,6 +54,7 @@
 #include <linux/serial_reg.h>
 #include <linux/dma-mapping.h>
 #include <linux/platform_device.h>
+#include <linux/pnp.h>
 
 #include <asm/io.h>
 #include <asm/dma.h>
@@ -68,6 +69,7 @@
 #include "smsc-ircc2.h"
 #include "smsc-sio.h"
 
+static int pnp_registered_port;
 
 MODULE_AUTHOR("Daniele Peri <peri at csai.unipa.it>");
 MODULE_DESCRIPTION("SMC IrCC SIR/FIR controller driver");
@@ -325,6 +327,61 @@ static inline void register_bank(int iob
 }
 
 
+/* PNP probing */
+
+static const struct pnp_device_id smsc_ircc_pnp_table[] = {
+{
+	.id = "SMCf010",
+	.driver_data = 0
+},
+{ }
+};
+
+MODULE_DEVICE_TABLE(pnp, smsc_ircc_pnp_table);
+
+static int __devinit
+smsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *id)
+{
+	unsigned int firbase, sirbase;
+	u8 dma, irq;
+
+	if (pnp_port_valid(dev, 0) &&
+	   !(pnp_port_flags(dev, 0) & IORESOURCE_DISABLED))
+		sirbase = pnp_port_start(dev, 0);
+	else
+		return -EINVAL;
+
+	if (pnp_port_valid(dev, 1) &&
+	   !(pnp_port_flags(dev, 1) & IORESOURCE_DISABLED))
+		firbase = pnp_port_start(dev, 1);
+	else
+		return -EINVAL;
+
+	if (pnp_irq_valid(dev, 0) &&
+	   !(pnp_irq_flags(dev, 0) & IORESOURCE_DISABLED))
+		irq = pnp_irq(dev, 0);
+	else
+		return -EINVAL;
+
+	if (pnp_dma_valid(dev, 0) &&
+	   !(pnp_dma_flags(dev, 0) & IORESOURCE_DISABLED))
+		dma = pnp_dma(dev, 0);
+	else
+		return -EINVAL;
+
+	if (smsc_ircc_open(firbase, sirbase, dma, irq))
+		return -ENODEV;
+
+	return 0;
+}
+
+static struct pnp_driver smsc_ircc_pnp_driver = {
+	.name = "smsc-ircc2",
+	.id_table = smsc_ircc_pnp_table,
+	.probe = smsc_ircc_pnp_probe,
+};
+
+
 /*******************************************************************************
  *
  *
@@ -1741,6 +1798,8 @@ static void __exit smsc_ircc_cleanup(voi
 
 	IRDA_DEBUG(1, "%s\n", __FUNCTION__);
 
+	if (pnp_registered_port)
+		pnp_unregister_driver(&smsc_ircc_pnp_driver);
 	for (i = 0; i < 2; i++) {
 		if (dev_self[i])
 			smsc_ircc_close(dev_self[i]);
@@ -1998,8 +2057,16 @@ static int __init smsc_ircc_look_for_chi
 	struct smsc_chip_address *address;
 	char *type;
 	unsigned int cfg_base, found;
+	int r;
 
 	found = 0;
+
+	r = pnp_register_driver(&smsc_ircc_pnp_driver);
+	if (r >= 0) {
+		pnp_registered_port = 1;
+		found += r;
+	}
+
 	address = possible_addresses;
 
 	while (address->cfg_base) {

linux-2.6-softcursor-persistent-alloc.patch:
 softcursor.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

--- NEW FILE linux-2.6-softcursor-persistent-alloc.patch ---
--- linux-2.6.14/drivers/video/console/softcursor.c~	2005-12-28 18:40:08.000000000 -0500
+++ linux-2.6.14/drivers/video/console/softcursor.c	2005-12-28 18:45:50.000000000 -0500
@@ -23,7 +23,9 @@ int soft_cursor(struct fb_info *info, st
 	unsigned int buf_align = info->pixmap.buf_align - 1;
 	unsigned int i, size, dsize, s_pitch, d_pitch;
 	struct fb_image *image;
-	u8 *dst, *src;
+	u8 *dst;
+	static u8 *src=NULL;
+	static int allocsize=0;
 
 	if (info->state != FBINFO_STATE_RUNNING)
 		return 0;
@@ -31,9 +33,15 @@ int soft_cursor(struct fb_info *info, st
 	s_pitch = (cursor->image.width + 7) >> 3;
 	dsize = s_pitch * cursor->image.height;
 
-	src = kmalloc(dsize + sizeof(struct fb_image), GFP_ATOMIC);
-	if (!src)
-		return -ENOMEM;
+	if (dsize + sizeof(struct fb_image) != allocsize) {
+		if (src != NULL)
+			kfree(src);
+		allocsize = dsize + sizeof(struct fb_image);
+
+		src = kmalloc(allocsize, GFP_ATOMIC);
+		if (!src)
+			return -ENOMEM;
+	}
 
 	image = (struct fb_image *) (src + dsize);
 	*image = cursor->image;
@@ -61,7 +69,6 @@ int soft_cursor(struct fb_info *info, st
 	fb_pad_aligned_buffer(dst, d_pitch, src, s_pitch, image->height);
 	image->data = dst;
 	info->fbops->fb_imageblit(info, image);
-	kfree(src);
 	return 0;
 }
 

linux-2.6-softmac-git.patch:
 include/net/ieee80211.h                         |    6 
 include/net/ieee80211softmac.h                  |  266 +++++++++++++
 include/net/ieee80211softmac_wx.h               |   66 +++
 net/ieee80211/Kconfig                           |    1 
 net/ieee80211/Makefile                          |    1 
 net/ieee80211/ieee80211_crypt_wep.c             |   61 ++-
 net/ieee80211/ieee80211_module.c                |    2 
 net/ieee80211/ieee80211_rx.c                    |    4 
 net/ieee80211/ieee80211_tx.c                    |    2 
 net/ieee80211/ieee80211_wx.c                    |    2 
 net/ieee80211/softmac/Kconfig                   |   10 
 net/ieee80211/softmac/Makefile                  |    9 
 net/ieee80211/softmac/ieee80211softmac_assoc.c  |  356 ++++++++++++++++++
 net/ieee80211/softmac/ieee80211softmac_auth.c   |  348 +++++++++++++++++
 net/ieee80211/softmac/ieee80211softmac_event.c  |  135 ++++++
 net/ieee80211/softmac/ieee80211softmac_io.c     |  474 ++++++++++++++++++++++++
 net/ieee80211/softmac/ieee80211softmac_module.c |  436 ++++++++++++++++++++++
 net/ieee80211/softmac/ieee80211softmac_priv.h   |  211 ++++++++++
 net/ieee80211/softmac/ieee80211softmac_scan.c   |  216 ++++++++++
 net/ieee80211/softmac/ieee80211softmac_wx.c     |  390 +++++++++++++++++++
 20 files changed, 2971 insertions(+), 25 deletions(-)

--- NEW FILE linux-2.6-softmac-git.patch ---
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index cde2f4f..df05f46 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -363,8 +363,9 @@ enum ieee80211_reasoncode {
 #define IEEE80211_OFDM_SHIFT_MASK_A         4
 
 /* NOTE: This data is for statistical purposes; not all hardware provides this
- *       information for frames received.  Not setting these will not cause
- *       any adverse affects. */
+ *       information for frames received.
+ *       For ieee80211_rx_mgt, you need to set at least the 'len' parameter.
+ */
 struct ieee80211_rx_stats {
 	u32 mac_time;
 	s8 rssi;
@@ -1088,6 +1089,7 @@ extern int ieee80211_tx_frame(struct iee
 /* ieee80211_rx.c */
 extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 			struct ieee80211_rx_stats *rx_stats);
+/* make sure to set stats->len */
 extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
 			     struct ieee80211_hdr_4addr *header,
 			     struct ieee80211_rx_stats *stats);
diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h
new file mode 100644
index 0000000..7264bd8
--- /dev/null
+++ b/include/net/ieee80211softmac.h
@@ -0,0 +1,266 @@
+#ifndef IEEE80211SOFTMAC_H_
+#define IEEE80211SOFTMAC_H_
+
+#include <linux/kernel.h>
+#include <linux/spinlock.h>
+#include <linux/workqueue.h>
+#include <linux/list.h>
+#include <net/ieee80211.h>
+
+/* Once the API is considered more or less stable,
+ * this should be incremented on API incompatible changes.
+ */
+#define IEEE80211SOFTMAC_API	0
+
+#define IEEE80211SOFTMAC_MAX_RATES_LEN		8
+#define IEEE80211SOFTMAC_MAX_EX_RATES_LEN	255
+
+struct ieee80211softmac_ratesinfo {
+	u8 count;
+	u8 rates[IEEE80211SOFTMAC_MAX_RATES_LEN + IEEE80211SOFTMAC_MAX_EX_RATES_LEN];
+};
+
+/* internal structures */
+struct ieee80211softmac_network;
+struct ieee80211softmac_scaninfo;
+
+struct ieee80211softmac_essid {
+	u8 len;
+	char data[IW_ESSID_MAX_SIZE+1];
+};
+
+struct ieee80211softmac_wpa {
+	char *IE;
+	int IElen;
+	int IEbuflen;
+};
+
+/*
+ * Information about association
+ *
+ * Do we need a lock for this?
+ * We only ever use this structure inlined
+ * into our global struct. I've used its lock,
+ * but maybe we need a local one here?
+ */
+struct ieee80211softmac_assoc_info {
+	/*
+	 * This is the requested ESSID. It is written
+	 * only by the WX handlers.
+	 *
+	 */
+	struct ieee80211softmac_essid req_essid;
+	/*
+	 * the ESSID of the network we're currently
+	 * associated (or trying) to. This is
+	 * updated to the network's actual ESSID
+	 * even if the requested ESSID was 'ANY'
+	 */
+	struct ieee80211softmac_essid associate_essid;
+	
+	/* BSSID we're trying to associate to */
+	char bssid[ETH_ALEN];
+	
+	/* some flags.
+	 * static_essid is valid if the essid is constant,
+	 * this is for use by the wx handlers only.
+	 *
+	 * associating is true, if the network has been
+	 * auth'ed on and we are in the process of associating.
+	 *
+	 * bssvalid is true if we found a matching network
+	 * and saved it's BSSID into the bssid above.
+	 */
+	u8 static_essid:1,
+	   associating:1,
+	   bssvalid:1;
+
+	/* Scan retries remaining */
+	int scan_retry;
+
+	struct work_struct work;
+	struct work_struct timeout;
+};
+
+enum {
+	IEEE80211SOFTMAC_AUTH_OPEN_REQUEST	= 1,
+	IEEE80211SOFTMAC_AUTH_OPEN_RESPONSE	= 2,
+};
+
+enum {
+	IEEE80211SOFTMAC_AUTH_SHARED_REQUEST	= 1,
+	IEEE80211SOFTMAC_AUTH_SHARED_CHALLENGE = 2,
+	IEEE80211SOFTMAC_AUTH_SHARED_RESPONSE	= 3,
+	IEEE80211SOFTMAC_AUTH_SHARED_PASS	= 4,
+};
+
+/* We should make these tunable
+ * AUTH_TIMEOUT seems really long, but that's what it is in BSD */
+#define IEEE80211SOFTMAC_AUTH_TIMEOUT		(12 * HZ)
+#define IEEE80211SOFTMAC_AUTH_RETRY_LIMIT	5
+#define IEEE80211SOFTMAC_ASSOC_SCAN_RETRY_LIMIT	3
+
+struct ieee80211softmac_txrates {
+	/* The Bit-Rate to be used for multicast frames. */
+	u8 mcast_rate;
+	/* The Bit-Rate to be used for multicast fallback
+	 * (If the device supports fallback and hardware-retry)
+	 */
+	u8 mcast_fallback;
+	/* The Bit-Rate to be used for any other (normal) data packet. */
+	u8 default_rate;
+	/* The Bit-Rate to be used for default fallback
+	 * (If the device supports fallback and hardware-retry)
+	 */
+	u8 default_fallback;
+};
+
+/* Bits for txrates_change callback. */
+#define IEEE80211SOFTMAC_TXRATECHG_DEFAULT		(1 << 0) /* default_rate */
+#define IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK	(1 << 1) /* default_fallback */
+#define IEEE80211SOFTMAC_TXRATECHG_MCAST		(1 << 2) /* mcast_rate */
+#define IEEE80211SOFTMAC_TXRATECHG_MCAST_FBACK		(1 << 3) /* mcast_fallback */
+
+struct ieee80211softmac_device {
+	/* 802.11 structure for data stuff */
+	struct ieee80211_device *ieee;
+	struct net_device *dev;
+
+	/* only valid if associated, then holds the Association ID */
+	u16 association_id;
+	
+	/* the following methods are callbacks that the driver
+	 * using this framework has to assign
+	 */
+
+	/* always assign these */
+	void (*set_bssid_filter)(struct net_device *dev, const u8 *bssid);
+	void (*set_channel)(struct net_device *dev, u8 channel);
+
+	/* assign if you need it, informational only */
+	void (*link_change)(struct net_device *dev);
+
+	/* If the hardware can do scanning, assign _all_ three of these callbacks.
+	 * When the scan finishes, call ieee80211softmac_scan_finished().
+	 */
+	
+	/* when called, start_scan is guaranteed to not be called again
+	 * until you call ieee80211softmac_scan_finished.
+	 * Return 0 if scanning could start, error otherwise.
+	 * SOFTMAC AUTHORS: don't call this, use ieee80211softmac_start_scan */
+	int (*start_scan)(struct net_device *dev);
+	/* this should block until after ieee80211softmac_scan_finished was called
+	 * SOFTMAC AUTHORS: don't call this, use ieee80211softmac_wait_for_scan */
+	void (*wait_for_scan)(struct net_device *dev);
+	/* stop_scan aborts a scan, but is asynchronous.
+	 * if you want to wait for it too, use wait_for_scan
+	 * SOFTMAC AUTHORS: don't call this, use ieee80211softmac_stop_scan */
+	void (*stop_scan)(struct net_device *dev);
+
+	/* we'll need something about beacons here too, for AP or ad-hoc modes */
+
+	/* Transmission rates to be used by the driver.
+	 * The SoftMAC figures out the best possible rates.
+	 * The driver just needs to read them.
+	 */
+	struct ieee80211softmac_txrates txrates;
+	/* If the driver needs to do stuff on TX rate changes, assign this callback. */
+	void (*txrates_change)(struct net_device *dev,
+			       u32 changes, /* see IEEE80211SOFTMAC_TXRATECHG flags */
[...2780 lines suppressed...]
+			     struct iw_request_info *info,
+			     union iwreq_data *data,
+			     char *extra)
+{
+	struct ieee80211softmac_device *mac = ieee80211_priv(net_dev);
+	unsigned long flags;
+	int err = -EINVAL;
+
+	spin_lock_irqsave(&mac->lock, flags);
+	switch (mac->txrates.default_rate) {
+	case IEEE80211_CCK_RATE_1MB:
+		data->bitrate.value = 1000000;
+		break;
+	case IEEE80211_CCK_RATE_2MB:
+		data->bitrate.value = 2000000;
+		break;
+	case IEEE80211_CCK_RATE_5MB:
+		data->bitrate.value = 5500000;
+		break;
+	case IEEE80211_CCK_RATE_11MB:
+		data->bitrate.value = 11000000;
+		break;
+	case IEEE80211_OFDM_RATE_6MB:
+		data->bitrate.value = 6000000;
+		break;
+	case IEEE80211_OFDM_RATE_9MB:
+		data->bitrate.value = 9000000;
+		break;
+	case IEEE80211_OFDM_RATE_12MB:
+		data->bitrate.value = 12000000;
+		break;
+	case IEEE80211_OFDM_RATE_18MB:
+		data->bitrate.value = 18000000;
+		break;
+	case IEEE80211_OFDM_RATE_24MB:
+		data->bitrate.value = 24000000;
+		break;
+	case IEEE80211_OFDM_RATE_36MB:
+		data->bitrate.value = 36000000;
+		break;
+	case IEEE80211_OFDM_RATE_48MB:
+		data->bitrate.value = 48000000;
+		break;
+	case IEEE80211_OFDM_RATE_54MB:
+		data->bitrate.value = 54000000;
+		break;
+	default:
+		assert(0);
+		goto out_unlock;
+	}
+	err = 0;
+out_unlock:
+	spin_unlock_irqrestore(&mac->lock, flags);
+
+	return err;
+}
+EXPORT_SYMBOL_GPL(ieee80211softmac_wx_get_rate);
+
+int
+ieee80211softmac_wx_get_wap(struct net_device *net_dev,
+			    struct iw_request_info *info,
+			    union iwreq_data *data,
+			    char *extra)
+{
+	struct ieee80211softmac_device *mac = ieee80211_priv(net_dev);
+	int err = 0;
+	unsigned long flags;
+
+	spin_lock_irqsave(&mac->lock, flags);
+	if (mac->associnfo.bssvalid)
+		memcpy(data->ap_addr.sa_data, mac->associnfo.bssid, ETH_ALEN);
+	else
+		memset(data->ap_addr.sa_data, 0xff, ETH_ALEN);
+	data->ap_addr.sa_family = ARPHRD_ETHER;
+	spin_unlock_irqrestore(&mac->lock, flags);
+	return err;
+}
+EXPORT_SYMBOL_GPL(ieee80211softmac_wx_get_wap);
+
+int
+ieee80211softmac_wx_set_wap(struct net_device *net_dev,
+			    struct iw_request_info *info,
+			    union iwreq_data *data,
+			    char *extra)
+{
+	struct ieee80211softmac_device *mac = ieee80211_priv(net_dev);
+	static const unsigned char any[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+	static const unsigned char off[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+	unsigned long flags;
+
+	/* sanity check */
+	if (data->ap_addr.sa_family != ARPHRD_ETHER) {
+		return -EINVAL;
+	}
+
+	spin_lock_irqsave(&mac->lock, flags);
+	if (!memcmp(any, data->ap_addr.sa_data, ETH_ALEN) ||
+	    !memcmp(off, data->ap_addr.sa_data, ETH_ALEN)) {
+		schedule_work(&mac->associnfo.work);
+		goto out;
+        } else {
+		if (!memcmp(mac->associnfo.bssid, data->ap_addr.sa_data, ETH_ALEN)) {
+			if (mac->associnfo.associating || mac->associated) {
+			/* bssid unchanged and associated or associating - just return */
+				goto out;
+			}
+		} else {
+			/* copy new value in data->ap_addr.sa_data to bssid */
+			memcpy(mac->associnfo.bssid, data->ap_addr.sa_data, ETH_ALEN);
+		}	
+		/* queue associate if new bssid or (old one again and not associated) */
+		schedule_work(&mac->associnfo.work);
+        }
+
+out:
+	spin_unlock_irqrestore(&mac->lock, flags);
+	return 0;
+}
+EXPORT_SYMBOL_GPL(ieee80211softmac_wx_set_wap);
+
+int
+ieee80211softmac_wx_set_genie(struct net_device *dev,
+			      struct iw_request_info *info,
+			      union iwreq_data *wrqu,
+			      char *extra)
+{
+	struct ieee80211softmac_device *mac = ieee80211_priv(dev);
+	unsigned long flags;
+	int err = 0;
+	char *buf;
+	int i;
+	
+	spin_lock_irqsave(&mac->lock, flags);
+	/* bleh. shouldn't be locked for that kmalloc... */
+
+	if (wrqu->data.length) {
+		if ((wrqu->data.length < 2) || (extra[1]+2 != wrqu->data.length)) {
+			/* this is an IE, so the length must be
+			 * correct. Is it possible though that
+			 * more than one IE is passed in?
+			 */
+			err = -EINVAL;
+			goto out;
+		}
+		if (mac->wpa.IEbuflen <= wrqu->data.length) {
+			buf = kmalloc(wrqu->data.length, GFP_ATOMIC);
+			if (!buf) {
+				err = -ENOMEM;
+				goto out;
+			}
+			kfree(mac->wpa.IE);
+			mac->wpa.IE = buf;
+			mac->wpa.IEbuflen = wrqu->data.length;
+		}
+		memcpy(mac->wpa.IE, extra, wrqu->data.length);
+		dprintk(KERN_INFO PFX "generic IE set to ");
+		for (i=0;i<wrqu->data.length;i++)
+			dprintk("%.2x", mac->wpa.IE[i]);
+		dprintk("\n");
+		mac->wpa.IElen = wrqu->data.length;
+	} else {
+		kfree(mac->wpa.IE);
+		mac->wpa.IE = NULL;
+		mac->wpa.IElen = 0;
+		mac->wpa.IEbuflen = 0;
+	}
+
+ out:	
+	spin_unlock_irqrestore(&mac->lock, flags);
+	return err;
+}
+EXPORT_SYMBOL_GPL(ieee80211softmac_wx_set_genie);
+
+int
+ieee80211softmac_wx_get_genie(struct net_device *dev,
+			      struct iw_request_info *info,
+			      union iwreq_data *wrqu,
+			      char *extra)
+{
+	struct ieee80211softmac_device *mac = ieee80211_priv(dev);
+	unsigned long flags;
+	int err = 0;
+	int space = wrqu->data.length;
+	
+	spin_lock_irqsave(&mac->lock, flags);
+	
+	wrqu->data.length = 0;
+	
+	if (mac->wpa.IE && mac->wpa.IElen) {
+		wrqu->data.length = mac->wpa.IElen;
+		if (mac->wpa.IElen <= space)
+			memcpy(extra, mac->wpa.IE, mac->wpa.IElen);
+		else
+			err = -E2BIG;
+	}
+	spin_unlock_irqrestore(&mac->lock, flags);
+	return err;
+}
+EXPORT_SYMBOL_GPL(ieee80211softmac_wx_get_genie);
+

linux-2.6-usbhid-wireless-security-lock.patch:
 hid-core.c |    4 ++++
 1 files changed, 4 insertions(+)

--- NEW FILE linux-2.6-usbhid-wireless-security-lock.patch ---

bugzilla 147479

diff -ur linux-2.6.11.orig/drivers/usb/input/hid-core.c linux-2.6.11/drivers/usb/input/hid-core.c
--- linux-2.6.11.orig/drivers/usb/input/hid-core.c	2005-03-02 08:38:10.000000000 +0100
+++ linux-2.6.11/drivers/usb/input/hid-core.c	2005-07-24 19:25:35.000000000 +0200
@@ -1494,6 +1494,9 @@
 #define USB_VENDOR_ID_DELORME		0x1163
 #define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
 
+#define USB_VENDOR_ID_CYPRES		0x04b4
+#define USB_DEVICE_ID_SITECOM_WSL	0x7417
+
 static struct hid_blacklist {
 	__u16 idVendor;
 	__u16 idProduct;
@@ -1586,6 +1589,7 @@
 
 	{ USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE, HID_QUIRK_IGNORE },
 
+	{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_SITECOM_WSL, HID_QUIRK_IGNORE },
 	{ 0, 0 }
 };

linux-2.6-vm-clear-unreclaimable.patch:
 filemap.c    |    7 +++++++
 page_alloc.c |    6 ++++++
 2 files changed, 13 insertions(+)

--- NEW FILE linux-2.6-vm-clear-unreclaimable.patch ---
--- linux-2.6.14/mm/filemap.c~	2005-12-10 01:47:15.000000000 -0500
+++ linux-2.6.14/mm/filemap.c	2005-12-10 01:47:46.000000000 -0500
@@ -471,11 +471,18 @@ EXPORT_SYMBOL(unlock_page);
  */
 void end_page_writeback(struct page *page)
 {
+	struct zone *zone = page_zone(page);
 	if (!TestClearPageReclaim(page) || rotate_reclaimable_page(page)) {
 		if (!test_clear_page_writeback(page))
 			BUG();
 	}
 	smp_mb__after_clear_bit();
+	if (zone->all_unreclaimable) {
+		spin_lock(&zone->lock);
+		zone->all_unreclaimable = 0;
+		zone->pages_scanned = 0;
+		spin_unlock(&zone->lock);
+	}
 	wake_up_page(page, PG_writeback);
 }
 EXPORT_SYMBOL(end_page_writeback);
--- linux-2.6.14/mm/page_alloc.c~	2005-12-10 01:47:51.000000000 -0500
+++ linux-2.6.14/mm/page_alloc.c	2005-12-10 01:48:25.000000000 -0500
@@ -657,6 +657,12 @@ static void fastcall free_hot_cold_page(
 	pcp->count++;
 	if (pcp->count >= pcp->high)
 		pcp->count -= free_pages_bulk(zone, pcp->batch, &pcp->list, 0);
+	else if (zone->all_unreclaimable) {
+		spin_lock(&zone->lock);
+		zone->all_unreclaimable = 0;
+		zone->pages_scanned = 0;
+		spin_unlock(&zone->lock);
+	}
 	local_irq_restore(flags);
 	put_cpu();
 }

linux-2.6-vm-debug.patch:
 drivers/scsi/st.c |    1 +
 mm/rmap.c         |    7 +++++++
 2 files changed, 8 insertions(+)

--- NEW FILE linux-2.6-vm-debug.patch ---
--- linux-2.6.15/mm/rmap.c~	2006-01-03 08:53:32.000000000 -0500
+++ linux-2.6.15/mm/rmap.c	2006-01-03 08:58:19.000000000 -0500
@@ -484,6 +484,13 @@ void page_remove_rmap(struct page *page)
 	BUG_ON(PageReserved(page));
 
 	if (atomic_add_negative(-1, &page->_mapcount)) {
+		if (page_mapcount(page) < 0) {
+			printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page_mapcount(page));
+			printk (KERN_EMERG "  page->flags = %lx\n", page->flags);
+			printk (KERN_EMERG "  page->count = %x\n", page_count(page));
+			printk (KERN_EMERG "  page->mapping = %p\n", page->mapping);
+		}
+		
 		BUG_ON(page_mapcount(page) < 0);
 		/*
 		 * It would be tidy to reset the PageAnon mapping here,
--- linux-2.6.15/drivers/scsi/st.c~	2006-01-05 21:58:31.000000000 -0500
+++ linux-2.6.15/drivers/scsi/st.c	2006-01-05 21:59:31.000000000 -0500
@@ -4508,6 +4508,7 @@ static int sgl_unmap_user_pages(struct s
 	for (i=0; i < nr_pages; i++) {
 		struct page *page = sgl[i].page;
 
+		sgl[i].page = NULL;
 		if (dirtied)
 			SetPageDirty(page);
 		/* FIXME: cache flush missing for rw==READ


linux-2.6-w1-hush-debug.patch:
 w1.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE linux-2.6-w1-hush-debug.patch ---
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=167403

--- linux-2.6.13/drivers/w1/w1.c~	2005-09-28 06:09:13.000000000 -0400
+++ linux-2.6.13/drivers/w1/w1.c	2005-09-28 06:09:27.000000000 -0400
@@ -593,7 +593,7 @@ void w1_search(struct w1_master *dev, w1
 		 * Return 0 - device(s) present, 1 - no devices present.
 		 */
 		if (w1_reset_bus(dev)) {
-			dev_dbg(&dev->dev, "No devices present on the wire.\n");
+			//dev_dbg(&dev->dev, "No devices present on the wire.\n");
 			break;
 		}
 

linux-2.6-x86-hp-reboot.patch:
 reboot.c |    8 ++++++++
 1 files changed, 8 insertions(+)

--- NEW FILE linux-2.6-x86-hp-reboot.patch ---
--- linux-2.6.14/arch/i386/kernel/reboot.c~	2005-11-30 00:31:30.000000000 -0500
+++ linux-2.6.14/arch/i386/kernel/reboot.c	2005-11-30 00:32:23.000000000 -0500
@@ -111,6 +111,14 @@ static struct dmi_system_id __initdata r
 			DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
 		},
 	},
+	{	/* HP laptops have weird reboot issues */
+		.callback = set_bios_reboot,
+		.ident = "HP Laptop",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq"),
+		},
+	},
 	{ }
 };
 

linux-2.6-x86_64-ati-apic-timer.patch:
 io_apic.c |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

--- NEW FILE linux-2.6-x86_64-ati-apic-timer.patch ---

ATI's AMD64 chipsets appear to have the interesting "feature" that every 
timer tick causes an interrupt from both the APIC and the legacy PIC. 
The following patch checks if the northbridge matches the affected 
chipsets, and if so disables APIC pin 1. As an added bonus, it skips the 
acpi timer override since I haven't found one of these machines where 
it's needed and it's actively harmful on at least some of them. We've 
been shipping this patch in Ubuntu with no reported issues.

This is kernel bugzilla number 3927.

Signed-off-by: Matthew Garrett <mjg59 at srcf.ucam.og>

--- io_apic.c.orig	2005-09-20 21:43:42.000000000 +0100
+++ a/arch/x86_64/kernel/io_apic.c	2005-09-20 22:33:42.000000000 +0100
@@ -258,18 +259,24 @@ void __init check_ioapic(void) 
 			for (func = 0; func < 8; func++) { 
 				u32 class;
 				u32 vendor;
+				u16 product;
 				u8 type;
 				class = read_pci_config(num,slot,func,
 							PCI_CLASS_REVISION);
+
 				if (class == 0xffffffff)
 					break; 
 
-		       		if ((class >> 16) != PCI_CLASS_BRIDGE_PCI)
+		       		if ((class >> 16) != PCI_CLASS_BRIDGE_PCI && 
+				    (class >> 16) != PCI_CLASS_BRIDGE_HOST)
 					continue; 
 
 				vendor = read_pci_config(num, slot, func, 
 							 PCI_VENDOR_ID);
 				vendor &= 0xffff;
+				
+				product = read_pci_config_16(num, slot, func,
+							  PCI_DEVICE_ID);
 				switch (vendor) { 
 				case PCI_VENDOR_ID_VIA:
 #ifdef CONFIG_GART_IOMMU
@@ -292,8 +299,18 @@ void __init check_ioapic(void) 
 #endif
 					/* RED-PEN skip them on mptables too? */
 					return;
-				} 
 
+				case PCI_VENDOR_ID_ATI:
+					if (product==0x5950 || product==0x5951) {
+						printk(KERN_INFO "ATI board detected - disabling APIC pin 1\n");
+#ifdef CONFIG_ACPI
+						/* This seems to be wrong, too */
+						acpi_skip_timer_override = 1;
+#endif
+						disable_timer_pin_1 = 1;
+					}
+					return;
+				}
 				/* No multi-function device? */
 				type = read_pci_config_byte(num,slot,func,
 							    PCI_HEADER_TYPE);



linux-2.6.14-xen-compile-fixes.patch:
 netback/xenbus.c      |    8 ++++----
 xenbus/xenbus_probe.c |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

--- NEW FILE linux-2.6.14-xen-compile-fixes.patch ---
--- linux-2.6.14/drivers/xen/netback/xenbus.c.~1~	2006-01-09 10:50:45.000000000 -0500
+++ linux-2.6.14/drivers/xen/netback/xenbus.c	2006-01-09 10:54:58.000000000 -0500
@@ -129,12 +129,12 @@
 		return err;
 	}
 	else {
-		add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
+		add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size,
 			       &length, "script=%s", val);
 		kfree(val);
 	}
 
-	add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+	add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length,
 		       "vif=%s", netif->dev->name);
 
 	envp[i] = NULL;
@@ -181,7 +181,7 @@
 			return;
 		}
 
-		kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE);
+		kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE, NULL);
 
 		maybe_connect(be);
 	}
@@ -214,7 +214,7 @@
 		break;
 
 	case XenbusStateClosed:
-		kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
+		kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE, NULL);
 		device_unregister(&dev->dev);
 		break;
 
--- linux-2.6.14/drivers/xen/xenbus/xenbus_probe.c.~1~	2006-01-09 10:50:22.000000000 -0500
+++ linux-2.6.14/drivers/xen/xenbus/xenbus_probe.c	2006-01-09 10:59:20.000000000 -0500
@@ -232,7 +232,7 @@
 	.bus = {
 		.name  = "xen-backend",
 		.match = xenbus_match,
-		.uevent = xenbus_uevent_backend,
+		.hotplug = xenbus_uevent_backend,
 	},
 	.dev = {
 		.bus_id = "xen-backend",
@@ -257,13 +257,13 @@
 		return -ENODEV;
 
 	/* stuff we want to pass to /sbin/hotplug */
-	add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+	add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length,
 		       "XENBUS_TYPE=%s", xdev->devicetype);
 
-	add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+	add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length,
 		       "XENBUS_PATH=%s", xdev->nodename);
 
-	add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+	add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length,
 		       "XENBUS_BASE_PATH=%s", xenbus_backend.root);
 
 	/* terminate, set to next free slot, shrink available space */

linux-2.6.15-usb-find-interface.patch:
 usb.c |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

--- NEW FILE linux-2.6.15-usb-find-interface.patch ---
--- linux-2.6.15/drivers/usb/core/usb.c.orig	2006-01-03 03:21:10.000000000 +0000
+++ linux-2.6.15/drivers/usb/core/usb.c	2006-01-09 13:40:41.000000000 +0000
@@ -483,20 +483,23 @@ usb_match_id(struct usb_interface *inter
 	return NULL;
 }
 
+struct find_interface_arg {
+	int minor;
+	struct usb_interface *interface;
+};
 
 static int __find_interface(struct device * dev, void * data)
 {
-	struct usb_interface ** ret = (struct usb_interface **)data;
-	struct usb_interface * intf = *ret;
-	int *minor = (int *)data;
+	struct find_interface_arg *arg = data;
+	struct usb_interface *intf;
 
 	/* can't look at usb devices, only interfaces */
 	if (dev->driver == &usb_generic_driver)
 		return 0;
 
 	intf = to_usb_interface(dev);
-	if (intf->minor != -1 && intf->minor == *minor) {
-		*ret = intf;
+	if (intf->minor != -1 && intf->minor == arg->minor) {
+		arg->interface = intf;
 		return 1;
 	}
 	return 0;
@@ -513,12 +516,12 @@ static int __find_interface(struct devic
  */
 struct usb_interface *usb_find_interface(struct usb_driver *drv, int minor)
 {
-	struct usb_interface *intf = (struct usb_interface *)(long)minor;
-	int ret;
-
-	ret = driver_for_each_device(&drv->driver, NULL, &intf, __find_interface);
+	struct find_interface_arg argb;
 
-	return ret ? intf : NULL;
+	argb.minor = minor;
+	argb.interface = NULL;
+	driver_for_each_device(&drv->driver, NULL, &argb, __find_interface);
+	return argb.interface;
 }
 
 static int usb_device_match (struct device *dev, struct device_driver *drv)

linux-2.6.15-usblp-fixes.patch:
 usblp.c |   40 +++++++++++++++++++++++++++++-----------
 1 files changed, 29 insertions(+), 11 deletions(-)

--- NEW FILE linux-2.6.15-usblp-fixes.patch ---
diff -u b/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
--- b/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -438,7 +438,7 @@
  			       | (!usblp->wcomplete ? 0 : POLLOUT | POLLWRNORM);
 }
 
-static int usblp_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+static long usblp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
 	struct usblp *usblp = file->private_data;
 	int length, err, i;
@@ -838,7 +838,8 @@
 	.read =		usblp_read,
 	.write =	usblp_write,
 	.poll =		usblp_poll,
-	.ioctl =	usblp_ioctl,
+	.unlocked_ioctl =	usblp_ioctl,
+	.compat_ioctl =		usblp_ioctl,
 	.open =		usblp_open,
 	.release =	usblp_release,
 };
@@ -849,6 +850,20 @@
 	.minor_base =	USBLP_MINOR_BASE,
 };
 
+static ssize_t usblp_show_ieee1284_id(struct device *dev, struct device_attribute *attr, char *buf)
+{
+	struct usb_interface *intf = to_usb_interface(dev);
+	struct usblp *usblp = usb_get_intfdata (intf);
+
+	if (usblp->device_id_string[0] == 0 &&
+	    usblp->device_id_string[1] == 0)
+		return 0;
+
+	return sprintf(buf, "%s", usblp->device_id_string+2);
+}
+
+static DEVICE_ATTR(ieee1284_id, S_IRUGO, usblp_show_ieee1284_id, NULL);
+
 static int usblp_probe(struct usb_interface *intf,
 		       const struct usb_device_id *id)
 {
@@ -933,20 +948,12 @@
 
 	/* Retrieve and store the device ID string. */
 	usblp_cache_device_id_string(usblp);
+	device_create_file(&intf->dev, &dev_attr_ieee1284_id);
 
 #ifdef DEBUG
 	usblp_check_status(usblp, 0);
 #endif
 
-	info("usblp%d: USB %sdirectional printer dev %d "
-		"if %d alt %d proto %d vid 0x%4.4X pid 0x%4.4X",
-		usblp->minor, usblp->bidir ? "Bi" : "Uni", dev->devnum,
-		usblp->ifnum,
-		usblp->protocol[usblp->current_protocol].alt_setting,
-		usblp->current_protocol,
-		le16_to_cpu(usblp->dev->descriptor.idVendor),
-		le16_to_cpu(usblp->dev->descriptor.idProduct));
-
 	usb_set_intfdata (intf, usblp);
 
 	usblp->present = 1;
@@ -957,11 +964,20 @@
 		goto abort_intfdata;
 	}
 	usblp->minor = intf->minor;
+	info("usblp%d: USB %sdirectional printer dev %d "
+		"if %d alt %d proto %d vid 0x%4.4X pid 0x%4.4X",
+		usblp->minor, usblp->bidir ? "Bi" : "Uni", dev->devnum,
+		usblp->ifnum,
+		usblp->protocol[usblp->current_protocol].alt_setting,
+		usblp->current_protocol,
+		le16_to_cpu(usblp->dev->descriptor.idVendor),
+		le16_to_cpu(usblp->dev->descriptor.idProduct));
 
 	return 0;
 
 abort_intfdata:
 	usb_set_intfdata (intf, NULL);
+	device_remove_file(&intf->dev, &dev_attr_ieee1284_id);
 abort:
 	if (usblp) {
 		if (usblp->writebuf)
@@ -1156,6 +1172,8 @@
 		BUG ();
 	}
 
+	device_remove_file(&intf->dev, &dev_attr_ieee1284_id);
+
 	down (&usblp_sem);
 	down (&usblp->sem);
 	usblp->present = 0;


--- NEW FILE linux-2.6.15.tar.bz2.sign ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: See http://www.kernel.org/signature.html for info

iD8DBQBDuglHyGugalF9Dw4RAiIPAKCT5NvV2+aomkNCE3v8M2P10V7xdQCgjyeh
aDrnyZ0H/GvnVRLmUrUUbV8=
=lIis
-----END PGP SIGNATURE-----


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- .cvsignore	21 Dec 2005 15:04:47 -0000	1.6
+++ .cvsignore	9 Jan 2006 20:42:13 -0000	1.7
@@ -1,7 +1,6 @@
 kernel-2.6.*.config
 temp-*
-kernel-xen-2.6.14
-linux-2.6.14.tar.bz2
-xen-20051206.tar.bz2
-patch-2.6.15-rc6.bz2
-patch-2.6.15-rc6-git1.bz2
+kernel-xen-2.6.15
+linux-2.6.15.tar.bz2
+xen-20060106.tar.bz2
+bcm43xx-20060106.tar.bz2


Index: kernel-xen.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/kernel-xen.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- kernel-xen.spec	22 Dec 2005 10:42:20 -0000	1.23
+++ kernel-xen.spec	9 Jan 2006 20:42:13 -0000	1.24
@@ -17,7 +17,7 @@
 # that the kernel isn't the stock distribution kernel, for example by
 # adding some text to the end of the version number.
 #
-%define sublevel 14
+%define sublevel 15
 %define kversion 2.6.%{sublevel}
 %define rpmversion 2.6.%{sublevel}
 %define rhbsys  %([ -r /etc/beehive-root -o -n "%{?__beehive_build}" ] && echo || echo .`whoami`)
@@ -162,7 +162,7 @@
 Version: %{rpmversion}
 Release: %{release}
 ExclusiveArch: noarch i686
-#ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ia64 sparc sparc64 ppc64iseries
+#ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ia64 sparc sparc64 ppc64iseries s390 s390x
 ExclusiveOS: Linux
 Provides: kernel = %{version}
 Provides: kernel-drm = 4.3.0
@@ -186,12 +186,15 @@
 
 
 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{kversion}.tar.bz2
-Source1: xen-20051206.tar.bz2
+Source1: xen-20060106.tar.bz2
 Source2: Config.mk
 
 Source10: COPYING.modules
 Source11: genkey
 
+%define BCMVER 20060106
+Source13: ftp://ftp.berlios.de/pub/bcm43xx/snapshots/bcm43xx/bcm43xx-%{BCMVER}.tar.bz2
+
 Source20: kernel-%{kversion}-i586.config
 Source21: kernel-%{kversion}-i686.config
 Source22: kernel-%{kversion}-i686-smp.config
@@ -213,8 +216,8 @@
 #
 # Patches 0 through 100 are meant for core subsystem upgrades
 #
-Patch1: patch-2.6.15-rc6.bz2
-Patch2: patch-2.6.15-rc6-git1.bz2
+#Patch1: patch-2.6.16-git1.bz2
+#Patch2: patch-2.6.16-rc1-git1.bz2
 
 # Patches 100 through 500 are meant for architecture patches
 Patch100: linux-2.6-bzimage.patch
@@ -227,6 +230,8 @@
 Patch203: linux-2.6.14-intel-cache-build.patch
 Patch204: linux-2.6-x86_64-silence-up-apic-errors.patch
 Patch205: linux-2.6-x86_64-disable-hotplug-guessing.patch
+Patch206: linux-2.6-x86_64-ati-apic-timer.patch
+Patch207: linux-2.6-edid-check.patch
 
 # 300 - 399   ppc(64)
 Patch300: linux-2.6.15-default-powerpc.patch
@@ -245,20 +250,21 @@
 Patch314: linux-2.6-ppc-rtas-check.patch
 Patch315: linux-2.6-powerpc-parport.patch
 Patch316: linux-2.6-cell-iommu.patch
-Patch317: linux-2.6-g5-thermal-overload.patch
+Patch317: linux-2.6-ppc-iseries-input-layer.patch
 
 # 400 - 499   ia64
+Patch400: linux-2.6-ia64-spinlock-size.patch
+
 # 500 - 599   s390(x)
 # 600 - 699   sparc(64)
 
 # 700 - 799 Xen
 Patch700: linux-2.6-xen-merge.patch
-Patch701: linux-2.6-xen-no-tls-warn.patch
-Patch703: linux-2.6-xen-kprobes.patch
+Patch701: linux-2.6.14-xen-compile-fixes.patch
+Patch702: linux-2.6-xen-no-tls-warn.patch
 Patch704: linux-2.6.14-xen-guest-enable-char-devices.patch
 Patch705: linux-2.6.14-xen_net_read_mac_export.patch
 Patch706: linux-2.6.14-xen_remap_vma_flags.patch
-Patch707: linux-2.6.14-xen-license_dual_bsd_gpl.patch
 
 #
 # Patches 800 through 899 are reserved for bugfixes to the core system
@@ -271,14 +277,11 @@
 # Exec-shield.
 Patch810: linux-2.6-execshield.patch
 Patch811: linux-2.6-execshield-vdso.patch
-Patch812: linux-2.6-vdso-xen.patch
+#Patch812: linux-2.6-vdso-xen.patch
 Patch813: linux-2.6-execshield-xen.patch
 Patch814: linux-2.6-xen-vdso-note.patch
 Patch815: linux-2.6-write-protect-rodata.patch
 
-# kauditd thread prevents sleep
-Patch820: linux-2.6.14-kauditd-suspend.patch
-
 # Module signing infrastructure.
 Patch900: linux-2.6-modsign-core.patch
 Patch901: linux-2.6-modsign-crypto.patch
@@ -311,8 +314,11 @@
 Patch1025: linux-2.6-debug-sysfs-crash-debugging.patch
 Patch1026: linux-2.6-debug-no-quiet.patch
 Patch1027: linux-2.6-debug-slab-leak-detector.patch
-Patch1028: linux-2.6-debug-spinlock-symbol.patch
-Patch1029: linux-2.6-debug-oops-pause.patch
+Patch1028: linux-2.6-debug-oops-pause.patch
+Patch1029: linux-2.6-debug-account-kmalloc.patch
+Patch1030: linux-2.6-debug-latency-tracing.patch
+Patch1031: linux-2.6.15-usblp-fixes.patch
+Patch1032: linux-2.6.15-usb-find-interface.patch
 
 # Restrict /dev/mem usage.
 Patch1050: linux-2.6-devmem.patch
@@ -359,22 +365,26 @@
 Patch1650: linux-2.6-input-kill-stupid-messages.patch
 Patch1660: linux-2.6-input-usblegacy.patch
 Patch1670: linux-2.6-serial-tickle-nmi.patch
-Patch1680: linux-2.6-missing-exports.patch
+Patch1671: linux-2.6-serial-nrports.patch
 Patch1690: linux-2.6-radeon-backlight.patch
 Patch1700: linux-2.6-ide-tune-locking.patch
 Patch1710: linux-2.6-autofs-pathlookup.patch
 Patch1720: linux-2.6-selinux-hush.patch
 Patch1730: linux-2.6-ide-cd-shutup.patch
-Patch1740: linux-2.6-apm-depends-fix.patch
+Patch1740: linux-2.6-block-reduce-stack.patch
 Patch1750: linux-2.6-ub.patch
 Patch1760: linux-2.6-sata-enable-atapi-by-default.patch
 Patch1770: linux-2.6-valid-ether-addr.patch
 Patch1780: linux-2.6-firmware-loader-timeout.patch
-Patch1790: linux-2.6-usb-suspend.patch
-
-# ACPI patches.
-Patch1800: linux-2.6-acpi-thinkpad-c2c3.patch
-Patch1801: linux-2.6-acpi-acpica-20051202.patch
+Patch1790: linux-2.6-softcursor-persistent-alloc.patch
+Patch1800: linux-2.6-pwc-powerup-by-default.patch
+Patch1810: linux-2.6-smsc-ircc2-pnp.patch
+Patch1820: linux-2.6-usbhid-wireless-security-lock.patch
+Patch1830: linux-2.6-w1-hush-debug.patch
+Patch1840: linux-2.6-x86-hp-reboot.patch
+Patch1860: linux-2.6-posix-timers-sched_time-accumulation.patch
+Patch1870: linux-2.6-kill-blk_attempt_merge.patch
+Patch1880: linux-2.6-dm-sync-overrun.patch
 
 # Warn about usage of various obsolete functionality that may go away.
 Patch1900: linux-2.6-obsolete-idescsi-warning.patch
@@ -386,6 +396,16 @@
 # VM bits.
 Patch2000: linux-2.6-vm-oomkiller-debugging.patch
 Patch2001: linux-2.6-vm-silence-atomic-alloc-failures.patch
+Patch2002: linux-2.6-vm-debug.patch
+Patch2003: linux-2.6-vm-clear-unreclaimable.patch
+
+# ACPI patches.
+Patch2100: linux-2.6-acpi-thinkpad-c2c3.patch
+
+# Broadcom wireless driver
+Patch5000: linux-2.6-softmac-git.patch
+Patch5001: linux-2.6-bcm43xx.patch
+Patch5002: linux-2.6-bcm43xx-resume.patch
 
 #
 # 10000 to 20000 is for stuff that has to come last due to the
@@ -592,14 +612,15 @@
 else
   # We already have a vanilla dir.
   cd kernel-%{kversion}
-  rm -rf linux-%{kversion}
+  mv linux-%{kversion} deleteme
+  rm -rf deleteme &
 fi
 cp -rl vanilla linux-%{kversion}
 cd linux-%{kversion}
 
 # Update to latest upstream.
-%patch1 -p1
-%patch2 -p1
+#%patch1 -p1
+#%patch2 -p1
 
 #
 # Patches 10 through 100 are meant for core subsystem upgrades
@@ -633,6 +654,10 @@
 %patch204 -p1
 # Disable guessing of how many hotplug cpus to add.
 %patch205 -p1
+# ATI timer quirk.
+%patch206 -p1
+# Reboot thru bios on HP laptops.
+%patch207 -p1
 
 # 
 # ppc64
@@ -669,9 +694,13 @@
 %patch315 -p1
 # Handle new Cell boards with >512MiB RAM
 %patch316 -p1
-# Fix thermal overload on liquid-cooled G5s
+# No input layer on iseries
 %patch317 -p1
 
+# IA64
+# Altix: Fix sn_flush_device_kernel & spinlock initialization
+%patch400 -p1
+
 #
 # Xen
 #
@@ -679,11 +708,10 @@
 # Base Xen patch from linux-2.6-merge.hg
 %patch700 -p1
 %patch701 -p1
-%patch703 -p1
+%patch702 -p1
 %patch704 -p1
 %patch705 -p1
 %patch706 -p1
-%patch707 -p1
 %endif
 
 #
@@ -709,7 +737,7 @@
 
 # Xen exec-shield bits
 %if %{includexen}
-%patch812 -p1
+#%patch812 -p1
 %patch813 -p1
 %patch814 -p1
 %endif
@@ -717,9 +745,6 @@
 # Write protect rodata
 %patch815 -p1
 
-# kauditd thread prevents sleep
-%patch820 -p1
-
 #
 # GPG signed kernel modules
 #
@@ -758,8 +783,10 @@
 %patch1026 -p1
 %patch1027 -p1
 %patch1028 -p1
-%patch1029 -p1
-
+#%patch1029 -p1
+#%patch1030 -p1
+%patch1031 -p1
+%patch1032 -p1
 #
 # Make /dev/mem a need-to-know function 
 #
@@ -839,8 +866,8 @@
 %patch1660 -p1
 # Tickle the NMI whilst doing serial writes.
 %patch1670 -p1
-# Missing EXPORT_SYMBOL's
-%patch1680 -p1
+# Limit number of serial ports registered.
+%patch1671 -p1
 # Radeon on thinkpad backlight power-management goodness.
 %patch1690 -p1
 # Fix IDE locking bug.
@@ -851,7 +878,7 @@
 %patch1720 -p1
 # Silence noisy CD drive spew
 %patch1730 -p1
-# Fix APM dependancy
+# Reduce stack usage in block layer
 %patch1740 -p1
 # Enable USB storage,UB & libusual magick.
 %patch1750 -p1
@@ -861,14 +888,24 @@
 %patch1770 -p1
 # Increase timeout on firmware loader.
 %patch1780 -p1
-# Fix USB suspend with devices that have no suspend method
+# Use persistent allocation in softcursor
 %patch1790 -p1
-
-# ACPI patches.
-# Blacklist another 'No C2/C3 states' Thinkpad R40e BIOS.
+# Power up PWC driver by default.
 %patch1800 -p1
-# ACPICA update
-%patch1801 -p1
+# PNP support for smsc-ircc2
+%patch1810 -p1
+# don't mistake security lock as a mouse
+%patch1820 -p1
+# Silence debug messages in w1
+%patch1830 -p1
+# Reboot through BIOS on HP laptops.
+%patch1840 -p1
+# Fix posix-cpu-timers sched_time accumulation
+%patch1860 -p1
+# kill blk_attempt_merge
+%patch1870 -p1
+# dm: avoid ovvrun while syncing.
+%patch1880 -p1
 
 # Warn about obsolete functionality usage.
 %patch1900 -p1
@@ -883,12 +920,32 @@
 %patch2000 -p1
 # Silence GFP_ATOMIC failures.
 %patch2001 -p1
+# Try to trace some negative pagecount errors.
+%patch2002 -p1
+# VM oom killer tweaks.
+%patch2003 -p1
+
+# ACPI patches.
+# Blacklist another 'No C2/C3 states' Thinkpad R40e BIOS.
+%patch2100 -p1
 
 #
 # Patches 5000 to 6000 are reserved for new drivers that are about to
 # be merged upstream
 #
 
+# Broadcom BCM43xx wireless driver.
+
+# Extract snapshot tarballs and move them into place.
+tar xvfj %{SOURCE13}
+mv bcm43xx-%{BCMVER} drivers/net/wireless/bcm43xx
+
+# Import softmac code from git tree
+%patch5000 -p1
+# Patch Kconfig and Makefiles to merge bcm43xx 'properly'
+%patch5001 -p1
+# Fix the reassociate on resume code
+%patch5002 -p1
 
 #
 # final stuff
@@ -935,8 +992,7 @@
 perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -prep/" Makefile
 
 # get rid of unwanted files resulting from patch fuzz
-find . -name "*.orig" -exec rm -fv {} \; >/dev/null
-find . -name "*~" -exec rm -fv {} \; >/dev/null
+find . -name "*.orig" -o -name "*~" -exec rm -f {} \; >/dev/null &
 
 ###
 ### build
@@ -1023,9 +1079,9 @@
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/source
     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
     (cd $RPM_BUILD_ROOT/lib/modules/$KernelVer ; ln -s build source)
-	# dirs for additional modules per module-init-tools, kbuild/modules.txt
-	mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
-	mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
+    # dirs for additional modules per module-init-tools, kbuild/modules.txt
+    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
+    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
     # first copy everything
     cp --parents `find  -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build 
     cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
@@ -1045,8 +1101,6 @@
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*.o
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*/*.o
     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    cp -a drivers/media/dvb/frontends/*.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/drivers/media/dvb/frontends
-    cp -a drivers/media/dvb/dvb-core/*.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/drivers/media/dvb/dvb-core
     cd include
     cp -a acpi config linux math-emu media net pcmcia rxrpc scsi sound video asm asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
 %if %{buildxen}
@@ -1210,7 +1264,7 @@
 
 %post 
 [ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install %{KVERREL}
+/sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install %{KVERREL}
 
 %post devel
 if [ -x /usr/sbin/hardlink ] ; then
@@ -1221,7 +1275,7 @@
 
 %post smp
 [ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}smp
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --package kernel-smp --mkinitrd --depmod --install %{KVERREL}smp
+/sbin/new-kernel-pkg --package kernel-smp --mkinitrd --depmod --install %{KVERREL}smp
 
 %post smp-devel
 if [ -x /usr/sbin/hardlink ] ; then
@@ -1255,7 +1309,7 @@
 
 %post kdump
 [ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}-kdump
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --package kernel-kdump --mkinitrd --depmod --install %{KVERREL}kdump
+/sbin/new-kernel-pkg --package kernel-kdump --mkinitrd --depmod --install %{KVERREL}kdump
 
 %post kdump-devel
 if [ -x /usr/sbin/hardlink ] ; then
@@ -1266,11 +1320,11 @@
 
 %preun 
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}
+/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}
 
 %preun smp
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}smp
+/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}smp
 
 %preun hypervisor
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
@@ -1392,6 +1446,89 @@
 %endif
 
 %changelog
+* Mon Jan  9 2006 Dave Jones <davej at redhat.com>
+- Remove vm debug patch that triggers too easily right now.
+  (Needs fixing properly post test2).
+- kill blk_attempt_merge() which was horribly broken.
+- dm: avoid ovvrun while syncing.
+
+* Mon Jan  9 2006 David Woodhouse <dwmw2 at redhat.com>
+- Fix some usblp problems, add ieee1284_id to sysfs
+- update bcm43xx driver to version tested in -HEAD
+
+* Sat Jan  7 2006 Dave Jones <davej at redhat.com>
+- Silence some iseries build warnings.
+
+* Fri Jan  6 2006 Dave Jones <davej at redhat.com>
+- Branch CVS for test2.
+- Add timer quirk for ATI chipsets.
+- Reboot through BIOS on HP laptops.
+- Additional check in x86 edid parser.
+- power up pwc webcam by default
+- don't confuse wireless security lock as a mouse.
+- Hush some debug messages in w1 driver.
+- Disable input layer on iseries.
+- VM OOM killer tweaks.
+- Flip IO scheduler to 'AS' by default again.
+  (CFQ has slab corruption bugs right now).
+- Enable nvram driver for x86-64
+- Fix posix-cpu-timers sched_time accumulation.
+
+* Thu Jan  5 2006 Dave Jones <davej at redhat.com>
+- Try to debug some negative pagecount errors.
+
+* Tue Jan  3 2006 Dave Jones <davej at redhat.com>
+- Silence some gcc4.1 warnings.
+
+* Tue Jan  3 2006 David Woodhouse <dwmw2 at redhat.com>
+- Make bcm43xx quieter when dropping packets, and make it reassociate on 
+  resume
+
+* Tue Jan  3 2006 Dave Jones <davej at redhat.com>
+- Update to 2.6.15 final.
+- Altix: Fix sn_flush_device_kernel & spinlock initialization. (#176827)
+
+* Mon Jan 02 2006 David Woodhouse <dwmw2 at redhat.com>
+- Merge experimental Broadcom wireless driver
+
+* Sun Jan 01 2006 Dave Jones <davej at redhat.com>
+- 2.6.15-rc7-git6
+
+* Sat Dec 31 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc7-git5
+
+* Fri Dec 30 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc7-git4
+
+* Thu Dec 29 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc7-git3
+- Further cfq/ub spinlock fixing.
+
+* Wed Dec 28 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc7-git2
+- Reduce stack usage in block layer.
+- Limit number of serial ports registered at boot time.
+- Fix spinlock corruption in cfq with ub.
+
+* Tue Dec 27 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc7-git1
+
+* Sun Dec 25 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc7
+- bah humbug.
+
+* Sat Dec 24 2005 Dave Jones <davej at redhat.com>
+- Disable dumb yealink driver, which bound to any hid device.
+
+* Fri Dec 23 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc6-git4
+
+* Thu Dec 22 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc6-git3
+
+* Wed Dec 21 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc6-git2
+
 * Wed Dec 21 2005 Juan Quintela <quintela at trasno.org>
 - rebase to rawhide 1.7779.
 

linux-2.6-acpi-thinkpad-c2c3.patch:
 processor_idle.c |   67 +++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 51 insertions(+), 16 deletions(-)

Index: linux-2.6-acpi-thinkpad-c2c3.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-acpi-thinkpad-c2c3.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-acpi-thinkpad-c2c3.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-acpi-thinkpad-c2c3.patch	9 Jan 2006 20:42:13 -0000	1.3
@@ -1,16 +1,30 @@
-processor_idle.c vs Lindent resulted in something of a trainwreck
-with whitespace all over the place.  This diff rearranges teh
-processor_power_dmi_table to look like it did before that accident,
-and adds two additional BIOS's to the list as encountered by
-Fedora users.
 
 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=165590
 
-Signed-off-by: Dave Jones <davej at redhat.com>
 
---- linux-2.6.13/drivers/acpi/processor_idle.c~	2005-09-09 19:24:25.000000000 -0400
-+++ linux-2.6.13/drivers/acpi/processor_idle.c	2005-09-09 19:33:18.000000000 -0400
-@@ -94,22 +94,27 @@ static int set_max_cstate(struct dmi_sys
+From: Thomas Rosner <kernel-bugs at digital-trauma.de>
+
+This adds all known BIOS versions of IBM R40e Laptops to the C2/C3
+processor state blacklist and thus prevents them from crashing.  Fixes Bug
+#3549.
+
+Implementation is probably overly verbose, but DMI_MATCH seems to give us
+no choice.
+
+Signed-off-by: Thomas Rosner <kernel-bugs at digital-trauma.de>
+Cc: <linux-acpi at intel.com>
+Cc: "Brown, Len" <len.brown at intel.com>
+Cc: Dave Jones <davej at redhat.com>
+Signed-off-by: Andrew Morton <akpm at osdl.org>
+---
+
+ drivers/acpi/processor_idle.c |   67 ++++++++++++++++++++++++--------
+ 1 files changed, 51 insertions(+), 16 deletions(-)
+
+diff -puN drivers/acpi/processor_idle.c~acpi-disable-c2-c3-for-_all_-ibm-r40e-laptops-for-2613-bug-3549 drivers/acpi/processor_idle.c
+--- devel/drivers/acpi/processor_idle.c~acpi-disable-c2-c3-for-_all_-ibm-r40e-laptops-for-2613-bug-3549	2006-01-05 22:28:12.000000000 -0800
++++ devel-akpm/drivers/acpi/processor_idle.c	2006-01-05 22:28:12.000000000 -0800
+@@ -95,22 +95,57 @@ static int set_max_cstate(struct dmi_sys
  }
  
  static struct dmi_system_id __initdata processor_power_dmi_table[] = {
@@ -19,35 +33,70 @@
 -							 "IBM"),
 -					       DMI_MATCH(DMI_BIOS_VERSION,
 -							 "1SET60WW")},
-+	{ set_max_cstate, "IBM ThinkPad R40e", {
-+	 DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
-+	 DMI_MATCH(DMI_BIOS_VERSION, "1SET60WW")},
- 	 (void *)1},
-+	{ set_max_cstate, "IBM ThinkPad R40e", {
-+	 DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
-+	 DMI_MATCH(DMI_BIOS_VERSION,"1SET61WW")},
-+	 (void*)1},
-+	{ set_max_cstate, "IBM ThinkPad R40e", {
-+	 DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
-+	 DMI_MATCH(DMI_BIOS_VERSION,"1SET68WW") },
-+	 (void*)1},
-+
- 	{set_max_cstate, "Medion 41700", {
+-	 (void *)1},
+-	{set_max_cstate, "Medion 41700", {
 -					  DMI_MATCH(DMI_BIOS_VENDOR,
 -						    "Phoenix Technologies LTD"),
 -					  DMI_MATCH(DMI_BIOS_VERSION,
 -						    "R01-A1J")}, (void *)1},
-+	 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-+	 DMI_MATCH(DMI_BIOS_VERSION, "R01-A1J")},
-+	 (void *)1},
-+
- 	{set_max_cstate, "Clevo 5600D", {
+-	{set_max_cstate, "Clevo 5600D", {
 -					 DMI_MATCH(DMI_BIOS_VENDOR,
 -						   "Phoenix Technologies LTD"),
 -					 DMI_MATCH(DMI_BIOS_VERSION,
 -						   "SHE845M0.86C.0013.D.0302131307")},
-+	 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-+	 DMI_MATCH(DMI_BIOS_VERSION, "SHE845M0.86C.0013.D.0302131307")},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW")}, (void *)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET43WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET45WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET47WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET50WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET52WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET55WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET56WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET59WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET61WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET62WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET64WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET65WW") }, (void*)1},
++	{ set_max_cstate, "IBM ThinkPad R40e", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"1SET68WW") }, (void*)1},
++	{ set_max_cstate, "Medion 41700", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"R01-A1J")}, (void *)1},
++	{ set_max_cstate, "Clevo 5600D", {
++	  DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
++	  DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")},
  	 (void *)2},
  	{},
  };
+_
+

linux-2.6-crash-xen.patch:
 init-xen.c |    2 ++
 1 files changed, 2 insertions(+)

Index: linux-2.6-crash-xen.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-crash-xen.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-crash-xen.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-crash-xen.patch	9 Jan 2006 20:42:13 -0000	1.3
@@ -6,8 +6,8 @@
 
 diff --git a/arch/i386/xen/mm/init.c b/arch/i386/xen/mm/init.c
 index 4c8c7ac..caf4afd 100644
---- a/arch/i386/xen/mm/init.c
-+++ b/arch/i386/xen/mm/init.c
+--- a/arch/i386/mm/init-xen.c
++++ b/arch/i386/mm/init-xen.c
 @@ -281,6 +281,8 @@ int page_is_ram(unsigned long pagenr)
  
  #endif

linux-2.6-crashdump-common.patch:
 linux-2.6.12/Documentation/sysrq.txt         |    8 
 linux-2.6.12/arch/i386/kernel/nmi.c          |    1 
 linux-2.6.12/arch/i386/kernel/traps.c        |    3 
 linux-2.6.12/arch/i386/mm/init.c             |   47 +++++
 linux-2.6.12/arch/i386/mm/pgtable.c          |    3 
 linux-2.6.12/arch/ia64/kernel/process.c      |   30 ++-
 linux-2.6.12/arch/ia64/kernel/traps.c        |    6 
 linux-2.6.12/arch/ia64/mm/contig.c           |    3 
 linux-2.6.12/arch/ia64/mm/discontig.c        |    3 
 linux-2.6.12/arch/ia64/mm/init.c             |   90 +++++++++
 linux-2.6.12/arch/powerpc/kernel/process.c   |    1 
 linux-2.6.12/arch/powerpc/kernel/traps.c     |    3 
 linux-2.6.12/arch/powerpc/mm/mem.c           |   29 +++
 linux-2.6.12/arch/s390/kernel/traps.c        |    6 
 linux-2.6.12/arch/x86_64/kernel/process.c    |    2 
 linux-2.6.12/arch/x86_64/kernel/traps.c      |    6 
 linux-2.6.12/arch/x86_64/mm/init.c           |   32 +++
 linux-2.6.12/drivers/char/sysrq.c            |    2 
 linux-2.6.12/include/asm-generic/crashdump.h |   47 +++++
 linux-2.6.12/include/asm-i386/crashdump.h    |  123 +++++++++++++
 linux-2.6.12/include/asm-i386/kmap_types.h   |    4 
 linux-2.6.12/include/asm-ia64/crashdump.h    |   72 +++++++
 linux-2.6.12/include/asm-powerpc/crashdump.h |   61 ++++++
 linux-2.6.12/include/asm-x86_64/crashdump.h  |   86 +++++++++
 linux-2.6.12/include/linux/kernel.h          |   18 +
 linux-2.6.12/kernel/Makefile                 |    2 
 linux-2.6.12/kernel/dump.c                   |  246 +++++++++++++++++++++++++++
 linux-2.6.12/kernel/panic.c                  |    4 
 linux-2.6.12/kernel/printk.c                 |   20 ++
 linux-2.6.12/kernel/sched.c                  |    2 
 linux-2.6.13/arch/x86_64/mm/fault.c          |    1 
 linux-2.6.13/drivers/char/sysrq.c            |    5 
 32 files changed, 952 insertions(+), 14 deletions(-)

Index: linux-2.6-crashdump-common.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-crashdump-common.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-crashdump-common.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-crashdump-common.patch	9 Jan 2006 20:42:13 -0000	1.3
@@ -1,23 +1,5 @@
 --- linux-2.6.12/drivers/char/sysrq.c.orig	2005-08-18 12:40:07.000000000 -0400
 +++ linux-2.6.12/drivers/char/sysrq.c	2005-08-18 14:29:25.000000000 -0400
-@@ -125,6 +125,17 @@
- 	.enable_mask	= SYSRQ_ENABLE_BOOT,
- };
- 
-+/* crash sysrq handler */
-+static void sysrq_handle_crash(int key, struct pt_regs *pt_regs,
-+			       struct tty_struct *tty) {
-+	*( (char *) 0) = 0;
-+}
-+static struct sysrq_key_op sysrq_crash_op = {
-+	.handler =       sysrq_handle_crash,
-+	.help_msg =      "Crash",
-+	.action_msg =    "Crashing the kernel by request",
-+};
-+
- static void sysrq_handle_sync(int key, struct pt_regs *pt_regs,
- 			      struct tty_struct *tty) 
- {
 @@ -289,7 +300,7 @@
  		 it is handled specially on the sparc
  		 and will never arrive */
@@ -257,14 +239,15 @@
 +#endif /* _ASM_X86_64_CRASHDUMP_H */
 --- linux-2.6.12/include/asm-i386/kmap_types.h.orig	2005-06-17 15:48:29.000000000 -0400
 +++ linux-2.6.12/include/asm-i386/kmap_types.h	2005-08-18 14:23:59.000000000 -0400
-@@ -23,7 +23,9 @@
+@@ -23,8 +23,10 @@
  D(10)	KM_IRQ1,
  D(11)	KM_SOFTIRQ0,
  D(12)	KM_SOFTIRQ1,
--D(13)	KM_TYPE_NR
-+D(13)	KM_CRASHDUMP,
-+D(14)	KM_UNUSED,
-+D(15)	KM_TYPE_NR
+ D(13)	KM_SWIOTLB,
+-D(14)	KM_TYPE_NR
++D(14)	KM_CRASHDUMP,
++D(15)	KM_UNUSED,
++D(16)	KM_TYPE_NR
  };
  
  #undef D

linux-2.6-debug-oops-pause.patch:
 traps.c |    9 +++++++++
 1 files changed, 9 insertions(+)

Index: linux-2.6-debug-oops-pause.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-debug-oops-pause.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-debug-oops-pause.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-debug-oops-pause.patch	9 Jan 2006 20:42:13 -0000	1.3
@@ -6,9 +6,9 @@
 
 (Wow, I'm really getting desperate for better debug data).
 
---- linux-2.6.14/arch/i386/kernel/traps.c~	2005-12-16 03:00:16.000000000 -0500
-+++ linux-2.6.14/arch/i386/kernel/traps.c	2005-12-16 03:07:12.000000000 -0500
-@@ -271,6 +271,15 @@ void show_registers(struct pt_regs *regs
+--- vanilla/arch/i386/kernel/traps.c	2006-01-02 22:21:10.000000000 -0500
++++ linux-2.6.15/arch/i386/kernel/traps.c	2006-01-04 23:42:46.000000000 -0500
+@@ -256,6 +271,15 @@ void show_registers(struct pt_regs *regs
  		}
  	}
  	printk("\n");
@@ -17,7 +17,7 @@
 +		for (i=120;i>0;i--) {
 +			mdelay(1000);
 +			touch_nmi_watchdog();
-+			printk("Continuing in %d seconds\r", i);
++			printk("Continuing in %d seconds. \r", i);
 +		}
 +		printk("\n");
 +	}

linux-2.6-debug-spinlock-taint.patch:
 spinlock_debug.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

Index: linux-2.6-debug-spinlock-taint.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-debug-spinlock-taint.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-debug-spinlock-taint.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-debug-spinlock-taint.patch	9 Jan 2006 20:42:13 -0000	1.3
@@ -1,62 +1,64 @@
 Print info about tainting in the spinlock debug printks.
 
---- linux-2.6.13/lib/spinlock_debug.c~	2005-09-12 20:10:31.000000000 -0400
-+++ linux-2.6.13/lib/spinlock_debug.c	2005-09-12 20:13:57.000000000 -0400
-@@ -19,8 +19,8 @@ static void spin_bug(spinlock_t *lock, c
+--- linux-2.6.14/lib/spinlock_debug.c~	2005-12-21 11:42:59.000000000 -0500
++++ linux-2.6.14/lib/spinlock_debug.c	2005-12-21 11:44:12.000000000 -0500
+@@ -19,9 +19,9 @@ static void spin_bug(spinlock_t *lock, c
  	if (xchg(&print_once, 0)) {
  		if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT)
  			owner = lock->owner;
 -		printk("BUG: spinlock %s on CPU#%d, %s/%d\n",
--			msg, smp_processor_id(), current->comm, current->pid);
 +		printk("BUG: spinlock %s on CPU#%d, %s/%d (%s)\n",
-+			msg, smp_processor_id(), current->comm, current->pid, print_tainted());
+ 			msg, raw_smp_processor_id(),
+-			current->comm, current->pid);
++			current->comm, current->pid, print_tainted());
  		printk(" lock: %p, .magic: %08x, .owner: %s/%d, .owner_cpu: %d\n",
  			lock, lock->magic,
  			owner ? owner->comm : "<none>",
-@@ -77,9 +77,9 @@ static void __spin_lock_debug(spinlock_t
+@@ -78,9 +78,9 @@ static void __spin_lock_debug(spinlock_t
  		/* lockup suspected: */
  		if (print_once) {
  			print_once = 0;
 -			printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p\n",
 +			printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p (%s)\n",
- 				smp_processor_id(), current->comm, current->pid,
--					lock);
-+					lock, print_tainted());
+ 				raw_smp_processor_id(), current->comm,
+-				current->pid, lock);
++				current->pid, lock, print_tainted());
  			dump_stack();
  		}
  	}
-@@ -119,8 +119,8 @@ static void rwlock_bug(rwlock_t *lock, c
+@@ -120,9 +120,9 @@ static void rwlock_bug(rwlock_t *lock, c
  	static long print_once = 1;
  
  	if (xchg(&print_once, 0)) {
 -		printk("BUG: rwlock %s on CPU#%d, %s/%d, %p\n", msg,
--			smp_processor_id(), current->comm, current->pid, lock);
 +		printk("BUG: rwlock %s on CPU#%d, %s/%d, %p (%s)\n", msg,
-+			smp_processor_id(), current->comm, current->pid, lock, print_tainted());
+ 			raw_smp_processor_id(), current->comm,
+-			current->pid, lock);
++			current->pid, lock, print_tainted());
  		dump_stack();
  #ifdef CONFIG_SMP
  		/*
-@@ -147,9 +147,9 @@ static void __read_lock_debug(rwlock_t *
+@@ -149,9 +149,9 @@ static void __read_lock_debug(rwlock_t *
  		/* lockup suspected: */
  		if (print_once) {
  			print_once = 0;
 -			printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p\n",
 +			printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p (%s)\n",
- 				smp_processor_id(), current->comm, current->pid,
--					lock);
-+					lock, print_tainted());
+ 				raw_smp_processor_id(), current->comm,
+-				current->pid, lock);
++				current->pid, lock, print_tainted());
  			dump_stack();
  		}
  	}
-@@ -219,9 +219,9 @@ static void __write_lock_debug(rwlock_t 
+@@ -221,9 +221,9 @@ static void __write_lock_debug(rwlock_t 
  		/* lockup suspected: */
  		if (print_once) {
  			print_once = 0;
 -			printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p\n",
 +			printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p (%s)\n",
- 				smp_processor_id(), current->comm, current->pid,
--					lock);
-+					lock, print_tainted());
+ 				raw_smp_processor_id(), current->comm,
+-				current->pid, lock);
++				current->pid, lock, print_tainted());
  			dump_stack();
  		}
  	}

linux-2.6-execshield-xen.patch:
 arch/i386/kernel/entry-xen.S         |    8 ++-
 arch/i386/kernel/process-xen.c       |   58 +++++++++++++++++++++
 arch/i386/kernel/smp-xen.c           |    2 
 arch/i386/kernel/traps-xen.c         |   93 +++++++++++++++++++++++++++++++++--
 arch/i386/mm/init-xen.c              |   11 +++-
 linux-2.6.14/include/asm-i386/desc.h |    5 +
 6 files changed, 170 insertions(+), 7 deletions(-)

Index: linux-2.6-execshield-xen.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-execshield-xen.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-execshield-xen.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-execshield-xen.patch	9 Jan 2006 20:42:13 -0000	1.3
@@ -13,8 +13,8 @@
 
 diff --git a/arch/i386/xen/kernel/entry.S b/arch/i386/xen/kernel/entry.S
 index 8e71c50..ced2bb8 100644
---- a/arch/i386/xen/kernel/entry.S
-+++ b/arch/i386/xen/kernel/entry.S
+--- a/arch/i386/kernel/entry-xen.S
++++ b/arch/i386/kernel/entry-xen.S
 @@ -233,8 +233,12 @@ sysenter_past_esp:
  	pushl %ebp
  	pushfl
@@ -32,8 +32,8 @@
   * Careful about security.
 diff --git a/arch/i386/xen/kernel/process.c b/arch/i386/xen/kernel/process.c
 index 55be738..dbd41a1 100644
---- a/arch/i386/xen/kernel/process.c
-+++ b/arch/i386/xen/kernel/process.c
+--- a/arch/i386/kernel/process-xen.c
++++ b/arch/i386/kernel/process-xen.c
 @@ -543,6 +543,8 @@ struct task_struct fastcall * __switch_t
  #if 0 /* lazy fpu sanity check */
  	else BUG_ON(!(read_cr0() & 8));
@@ -105,8 +105,8 @@
 +
 diff --git a/arch/i386/xen/kernel/smp.c b/arch/i386/xen/kernel/smp.c
 index 855e088..230200c 100644
---- a/arch/i386/xen/kernel/smp.c
-+++ b/arch/i386/xen/kernel/smp.c
+--- a/arch/i386/kernel/smp-xen.c
++++ b/arch/i386/kernel/smp-xen.c
 @@ -277,6 +277,8 @@ irqreturn_t smp_invalidate_interrupt(int
  	unsigned long cpu;
  
@@ -118,8 +118,8 @@
  		goto out;
 diff --git a/arch/i386/xen/kernel/traps.c b/arch/i386/xen/kernel/traps.c
 index 0f7199b..878c084 100644
---- a/arch/i386/xen/kernel/traps.c
-+++ b/arch/i386/xen/kernel/traps.c
+--- a/arch/i386/kernel/traps-xen.c
++++ b/arch/i386/kernel/traps-xen.c
 @@ -459,11 +459,89 @@ DO_ERROR_INFO(17, SIGBUS, "alignment che
  #ifdef CONFIG_X86_MCE
  DO_ERROR(18, SIGBUS, "machine check", machine_check)
@@ -238,8 +238,8 @@
  		goto gp_in_vm86;
 diff --git a/arch/i386/xen/mm/init.c b/arch/i386/xen/mm/init.c
 index f243508..4c8c7ac 100644
---- a/arch/i386/xen/mm/init.c
-+++ b/arch/i386/xen/mm/init.c
+--- a/arch/i386/mm/init-xen.c
++++ b/arch/i386/mm/init-xen.c
 @@ -274,7 +274,10 @@ int page_is_ram(unsigned long pagenr)
  #else /* CONFIG_XEN */
  
@@ -280,65 +280,19 @@
  
  	pagetable_init();
  
-diff --git a/include/asm-i386/mach-xen/asm/desc.h b/include/asm-i386/mach-xen/asm/desc.h
-index 864ace7..019fc22 100644
---- a/include/asm-i386/mach-xen/asm/desc.h
-+++ b/include/asm-i386/mach-xen/asm/desc.h
-@@ -159,6 +159,20 @@ static inline unsigned long get_desc_bas
- 	return base;
+--- linux-2.6.14/include/asm-i386/desc.h~	2006-01-06 17:09:44.000000000 -0500
++++ linux-2.6.14/include/asm-i386/desc.h	2006-01-06 17:22:41.000000000 -0500
+@@ -210,8 +210,13 @@
+ 	desc->b = (limit & 0xf0000) | 0x00c0fb00;
  }
  
-+static inline void set_user_cs(struct desc_struct *desc, unsigned long limit)
-+{
-+	limit = (limit - 1) / PAGE_SIZE;
-+	desc->a = limit & 0xffff;
-+	desc->b = (limit & 0xf0000) | 0x00c0fb00;
-+}
-+
++#ifndef CONFIG_X86_XEN
+ #define load_user_cs_desc(cpu, mm) \
+     	per_cpu(cpu_gdt_table, (cpu))[GDT_ENTRY_DEFAULT_USER_CS] = (mm)->context.user_cs
++#else
 +#define load_user_cs_desc(cpu, mm) \
-+	HYPERVISOR_update_descriptor(virt_to_machine(&get_cpu_gdt_table(cpu)[GDT_ENTRY_DEFAULT_USER_CS]), (u64)(mm)->context.user_cs.a | ((u64)(mm)->context.user_cs.b) << 32); 
-+
-+extern void arch_add_exec_range(struct mm_struct *mm, unsigned long limit);
-+extern void arch_remove_exec_range(struct mm_struct *mm, unsigned long limit);
-+extern void arch_flush_exec_range(struct mm_struct *mm);
-+
- #endif /* !__ASSEMBLY__ */
++	HYPERVISOR_update_descriptor(virt_to_machine(&get_cpu_gdt_table(cpu)[GDT_ENTRY_DEFAULT_USER_CS]), (u64)(mm)->context.user_cs.a | ((u64)(mm)->context.user_cs.b) << 32);
++#endif
  
- #endif
-diff --git a/include/asm-i386/mach-xen/asm/mmu.h b/include/asm-i386/mach-xen/asm/mmu.h
-index c646692..b103653 100644
---- a/include/asm-i386/mach-xen/asm/mmu.h
-+++ b/include/asm-i386/mach-xen/asm/mmu.h
-@@ -12,6 +12,8 @@ typedef struct { 
- 	int size;
- 	struct semaphore sem;
- 	void *ldt;
-+	struct desc_struct user_cs;
-+	unsigned long exec_limit;
- 	void *vdso;
- } mm_context_t;
- 
-diff --git a/include/asm-i386/mach-xen/asm/processor.h b/include/asm-i386/mach-xen/asm/processor.h
-index 070ff44..5b7ca04 100644
---- a/include/asm-i386/mach-xen/asm/processor.h
-+++ b/include/asm-i386/mach-xen/asm/processor.h
-@@ -332,6 +332,9 @@ extern int bootloader_type;
-  */
- #define TASK_UNMAPPED_BASE	(PAGE_ALIGN(TASK_SIZE / 3))
- 
-+#define __HAVE_ARCH_ALIGN_STACK
-+extern unsigned long arch_align_stack(unsigned long sp);
-+
- #define HAVE_ARCH_PICK_MMAP_LAYOUT
- 
- /*
-@@ -513,6 +516,9 @@ static inline void load_esp0(struct tss_
- 	regs->xcs = __USER_CS;					\
- 	regs->eip = new_eip;					\
- 	regs->esp = new_esp;					\
-+	preempt_disable();					\
-+	load_user_cs_desc(smp_processor_id(), current->mm);	\
-+	preempt_enable();					\
- } while (0)
- 
- /*
+ extern void arch_add_exec_range(struct mm_struct *mm, unsigned long limit);
+ extern void arch_remove_exec_range(struct mm_struct *mm, unsigned long limit);

linux-2.6-execshield.patch:
 linux-2.6.13-a/arch/x86_64/ia32/ia32_binfmt.c  |    4 
 linux-2.6.13-a/arch/x86_64/kernel/process.c    |    6 -
 linux-2.6.13-a/arch/x86_64/kernel/setup64.c    |   25 -----
 linux-2.6.13-a/include/asm-x86_64/pgtable.h    |    2 
 linux-2.6.13/mm/fremap.c                       |   16 +--
 linux-2.6.14/fs/proc/base.c                    |    2 
 linux-810/arch/i386/kernel/asm-offsets.c       |    1 
 linux-810/arch/i386/kernel/entry.S             |    8 +
 linux-810/arch/i386/kernel/process.c           |   59 ++++++++++++
 linux-810/arch/i386/kernel/signal.c            |    4 
 linux-810/arch/i386/kernel/smp.c               |    3 
 linux-810/arch/i386/kernel/sysenter.c          |   55 +++++++++++
 linux-810/arch/i386/kernel/traps.c             |   93 ++++++++++++++++++-
 linux-810/arch/i386/kernel/vsyscall-sysenter.S |    6 -
 linux-810/arch/i386/kernel/vsyscall.lds.S      |    4 
 linux-810/arch/i386/mm/init.c                  |    6 +
 linux-810/arch/i386/mm/mmap.c                  |    6 -
 linux-810/arch/ia64/ia32/binfmt_elf32.c        |    2 
 linux-810/arch/x86_64/ia32/ia32_binfmt.c       |    2 
 linux-810/arch/x86_64/kernel/process.c         |    7 -
 linux-810/arch/x86_64/mm/Makefile              |    2 
 linux-810/arch/x86_64/mm/fault.c               |    2 
 linux-810/arch/x86_64/mm/mmap.c                |   95 +++++++++++++++++++
 linux-810/drivers/char/random.c                |    7 +
 linux-810/fs/binfmt_elf.c                      |  120 ++++++++++++++++++++-----
 linux-810/fs/proc/array.c                      |    8 +
 linux-810/fs/proc/base.c                       |    4 
 linux-810/fs/proc/task_mmu.c                   |   25 ++++-
 linux-810/include/asm-i386/desc.h              |   14 ++
 linux-810/include/asm-i386/elf.h               |   42 +++++---
 linux-810/include/asm-i386/mmu.h               |    6 +
 linux-810/include/asm-i386/pgalloc.h           |    1 
 linux-810/include/asm-i386/processor.h         |    8 +
 linux-810/include/asm-i386/thread_info.h       |    1 
 linux-810/include/asm-ia64/pgalloc.h           |    4 
 linux-810/include/asm-powerpc/pgalloc.h        |    5 +
 linux-810/include/asm-ppc/pgalloc.h            |    5 +
 linux-810/include/asm-s390/pgalloc.h           |    4 
 linux-810/include/asm-sparc/pgalloc.h          |    4 
 linux-810/include/asm-sparc64/pgalloc.h        |    4 
 linux-810/include/asm-x86_64/pgalloc.h         |    7 +
 linux-810/include/asm-x86_64/processor.h       |    5 +
 linux-810/include/linux/mm.h                   |    9 +
 linux-810/include/linux/resource.h             |    5 -
 linux-810/include/linux/sched.h                |    9 +
 linux-810/include/linux/sysctl.h               |    3 
 linux-810/kernel/signal.c                      |   38 +++++++
 linux-810/kernel/sysctl.c                      |   39 ++++++++
 linux-810/mm/mmap.c                            |  105 ++++++++++++++++++++-
 linux-810/mm/mprotect.c                        |    5 -
 linux-810/mm/mremap.c                          |    4 
 linux-813/arch/i386/kernel/cpu/common.c        |    7 +
 52 files changed, 781 insertions(+), 127 deletions(-)

Index: linux-2.6-execshield.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-execshield.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-execshield.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-execshield.patch	9 Jan 2006 20:42:13 -0000	1.3
@@ -1837,3 +1837,14 @@
  extern void paging_init(void);
  extern void clear_kernel_mapping(unsigned long addr, unsigned long size);
  
+--- linux-2.6.14/fs/proc/base.c~	2005-12-29 19:25:42.000000000 -0500
++++ linux-2.6.14/fs/proc/base.c	2005-12-29 19:26:20.000000000 -0500
+@@ -200,7 +200,7 @@ static struct pid_entry tgid_base_stuff[
+ 	E(PROC_TGID_EXE,       "exe",     S_IFLNK|S_IRWXUGO),
+ 	E(PROC_TGID_MOUNTS,    "mounts",  S_IFREG|S_IRUGO),
+ #ifdef CONFIG_MMU
+-	E(PROC_TGID_SMAPS,     "smaps",   S_IFREG|S_IRUGO),
++	E(PROC_TGID_SMAPS,     "smaps",   S_IFREG|S_IRUSR),
+ #endif
+ #ifdef CONFIG_SECURITY
+ 	E(PROC_TGID_ATTR,      "attr",    S_IFDIR|S_IRUGO|S_IXUGO),

linux-2.6-gcc41.patch:
 linux-2.6.14/include/asm-x86_64/apic.h        |    2 
 linux-2.6.14/include/asm-x86_64/mpspec.h      |    2 
 linux-2.6/drivers/isdn/act2000/capi.h         |   88 +++++++++---------
 linux-2.6/drivers/isdn/hisax/hisax.h          |   20 ++--
 linux-2.6/drivers/isdn/hisax/hisax_fcpcipnp.h |   18 +--
 linux-2.6/drivers/net/3c527.h                 |   50 +++++-----
 linux-2.6/drivers/net/irda/vlsi_ir.h          |    4 
 linux-2.6/drivers/net/wan/sdla.c              |    6 -
 linux-2.6/fs/afs/volume.h                     |    4 
 linux-2.6/include/asm-i386/mpspec_def.h       |    4 
 linux-2.6/include/linux/atalk.h               |   18 +--
 linux-2.6/include/linux/cycx_x25.h            |   66 ++++++-------
 linux-2.6/include/linux/if_frad.h             |   12 +-
 linux-2.6/include/linux/isdnif.h              |   70 +++++++-------
 linux-2.6/include/linux/ncp.h                 |  126 +++++++++++++-------------
 linux-2.6/include/linux/sdla.h                |   64 ++++++-------
 linux-2.6/include/linux/wavefront.h           |   34 +++----
 linux-2.6/include/net/dn_dev.h                |   80 ++++++++--------
 linux-2.6/include/net/dn_nsp.h                |   74 +++++++--------
 linux-2.6/include/sound/wavefront.h           |   34 +++----
 20 files changed, 387 insertions(+), 389 deletions(-)

Index: linux-2.6-gcc41.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-gcc41.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-gcc41.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-gcc41.patch	9 Jan 2006 20:42:13 -0000	1.3
@@ -12,37 +12,7 @@
  };
  
  /* List of Bus Type string values, Intel MP Spec. */
---- linux-2.6.14/include/asm-i386/mpspec_def.h~	2005-12-06 23:06:23.000000000 -0500
-+++ linux-2.6.14/include/asm-i386/mpspec_def.h	2005-12-06 23:06:29.000000000 -0500
-@@ -75,7 +75,7 @@ struct mpc_config_bus
- {
- 	unsigned char mpc_type;
- 	unsigned char mpc_busid;
--	unsigned char mpc_bustype[6] __attribute((packed));
-+	unsigned char mpc_bustype[6];
- };
- 
- /* List of Bus Type string values, Intel MP Spec. */
-
-__get_unaligned creates a typeof the var its passed, and writes to it,
-which on gcc4.1, spits out the following error:
 
-drivers/char/vc_screen.c: In function 'vcs_write':
-drivers/char/vc_screen.c:422: error: assignment of read-only variable 'val'
-
-Signed-off-by: Dave Jones <davej at redhat.com>
-
---- linux-2.6.14/drivers/char/vc_screen.c~	2005-12-06 23:20:03.000000000 -0500
-+++ linux-2.6.14/drivers/char/vc_screen.c	2005-12-06 23:21:35.000000000 -0500
-@@ -419,7 +419,7 @@ vcs_write(struct file *file, const char 
- 			while (this_round > 1) {
- 				unsigned short w;
- 
--				w = get_unaligned(((const unsigned short *)con_buf0));
-+				w = get_unaligned(((unsigned short *)con_buf0));
- 				vcs_scr_writew(vc, w, org++);
- 				con_buf0 += 2;
- 				this_round -= 2;
 
 Prevent a zillion 'value computed is not used' warnings.
 
@@ -57,3 +27,1293 @@
  }
  
  static __inline unsigned int apic_read(unsigned long reg)
+
+
+Since version 4.1 the gcc is warning about ignored attributes. This patch is
+using the equivalent attribute on the struct instead of on each of the
+structure or union members.
+
+GCC Manual:
+  "Specifying Attributes of Types
+
+   packed
+    This attribute, attached to struct or union type definition, specifies
+    that
+    each member of the structure or union is placed to minimize the memory
+    required. When attached to an enum definition, it indicates that the
+    smallest integral type should be used.
+
+    Specifying this attribute for struct and union types is equivalent to
+    specifying the packed attribute on each of the structure or union
+    members."
+
+Signed-off-by: Jan Blunck <jblunck at suse.de>
+
+--8JPrznbw0YAQ/KXy
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: attachment; filename="eliminate-packed-warnings-2.diff"
+
+ drivers/isdn/hisax/hisax.h          |   20 ++---
+ drivers/isdn/hisax/hisax_fcpcipnp.h |   18 ++---
+ drivers/net/3c527.h                 |   50 +++++++-------
+ drivers/net/irda/vlsi_ir.h          |    4 -
+ drivers/net/wan/sdla.c              |    6 -
+ include/asm-i386/mpspec_def.h       |    4 -
+ include/linux/atalk.h               |   18 ++---
+ include/linux/cycx_x25.h            |   66 +++++++++---------
+ include/linux/if_frad.h             |   12 +--
+ include/linux/isdnif.h              |   70 ++++++++++----------
+ include/linux/ncp.h                 |  126 ++++++++++++++++++------------------
+ include/linux/sdla.h                |   64 +++++++++---------
+ include/linux/wavefront.h           |   34 ++++-----
+ include/net/dn_dev.h                |   80 +++++++++++-----------
+ include/net/dn_nsp.h                |   74 ++++++++++-----------
+ include/sound/wavefront.h           |   34 ++++-----
+ 16 files changed, 340 insertions(+), 340 deletions(-)
+
+Index: linux-2.6/include/asm-i386/mpspec_def.h
+===================================================================
+--- linux-2.6.orig/include/asm-i386/mpspec_def.h
++++ linux-2.6/include/asm-i386/mpspec_def.h
+@@ -75,8 +75,8 @@ struct mpc_config_bus
+ {
+ 	unsigned char mpc_type;
+ 	unsigned char mpc_busid;
+-	unsigned char mpc_bustype[6] __attribute((packed));
+-};
++	unsigned char mpc_bustype[6];
++} __attribute((packed));
+ 
+ /* List of Bus Type string values, Intel MP Spec. */
+ #define BUSTYPE_EISA	"EISA"
+Index: linux-2.6/include/linux/if_frad.h
+===================================================================
+--- linux-2.6.orig/include/linux/if_frad.h
++++ linux-2.6/include/linux/if_frad.h
+@@ -131,17 +131,17 @@ struct frad_conf 
+ /* these are the fields of an RFC 1490 header */
+ struct frhdr
+ {
+-   unsigned char  control	__attribute__((packed));
++   unsigned char  control;
+ 
+    /* for IP packets, this can be the NLPID */
+-   unsigned char  pad		__attribute__((packed)); 
++   unsigned char  pad;
+ 
+-   unsigned char  NLPID		__attribute__((packed));
+-   unsigned char  OUI[3]	__attribute__((packed));
+-   unsigned short PID		__attribute__((packed));
++   unsigned char  NLPID;
++   unsigned char  OUI[3];
++   unsigned short PID;
+ 
+ #define IP_NLPID pad 
+-};
++} __attribute__((packed));
+ 
+ /* see RFC 1490 for the definition of the following */
+ #define FRAD_I_UI		0x03
+Index: linux-2.6/include/linux/isdnif.h
+===================================================================
+--- linux-2.6.orig/include/linux/isdnif.h
++++ linux-2.6/include/linux/isdnif.h
+@@ -282,43 +282,43 @@ typedef struct setup_parm {
+ 
+ typedef struct T30_s {
+ 	/* session parameters */
+-	__u8 resolution		__attribute__ ((packed));
+-	__u8 rate		__attribute__ ((packed));
+-	__u8 width		__attribute__ ((packed));
+-	__u8 length		__attribute__ ((packed));
+-	__u8 compression	__attribute__ ((packed));
+-	__u8 ecm		__attribute__ ((packed));
+-	__u8 binary		__attribute__ ((packed));
+-	__u8 scantime		__attribute__ ((packed));
+-	__u8 id[FAXIDLEN]	__attribute__ ((packed));
++	__u8 resolution;
++	__u8 rate		;
++	__u8 width		;
++	__u8 length		;
++	__u8 compression	;
++	__u8 ecm		;
++	__u8 binary		;
++	__u8 scantime		;
++	__u8 id[FAXIDLEN]	;
+ 	/* additional parameters */
+-	__u8 phase		__attribute__ ((packed));
+-	__u8 direction		__attribute__ ((packed));
+-	__u8 code		__attribute__ ((packed));
+-	__u8 badlin		__attribute__ ((packed));
+-	__u8 badmul		__attribute__ ((packed));
+-	__u8 bor		__attribute__ ((packed));
+-	__u8 fet		__attribute__ ((packed));
+-	__u8 pollid[FAXIDLEN]	__attribute__ ((packed));
+-	__u8 cq			__attribute__ ((packed));
+-	__u8 cr			__attribute__ ((packed));
+-	__u8 ctcrty		__attribute__ ((packed));
+-	__u8 minsp		__attribute__ ((packed));
+-	__u8 phcto		__attribute__ ((packed));
+-	__u8 rel		__attribute__ ((packed));
+-	__u8 nbc		__attribute__ ((packed));
++	__u8 phase;
++	__u8 direction;
++	__u8 code;
++	__u8 badlin;
++	__u8 badmul;
++	__u8 bor;
++	__u8 fet;
++	__u8 pollid[FAXIDLEN];
++	__u8 cq;
++	__u8 cr;
++	__u8 ctcrty;
++	__u8 minsp;
++	__u8 phcto;
++	__u8 rel;
++	__u8 nbc;
+ 	/* remote station parameters */
+-	__u8 r_resolution	__attribute__ ((packed));
+-	__u8 r_rate		__attribute__ ((packed));
+-	__u8 r_width		__attribute__ ((packed));
+-	__u8 r_length		__attribute__ ((packed));
+-	__u8 r_compression	__attribute__ ((packed));
+-	__u8 r_ecm		__attribute__ ((packed));
+-	__u8 r_binary		__attribute__ ((packed));
+-	__u8 r_scantime		__attribute__ ((packed));
+-	__u8 r_id[FAXIDLEN]	__attribute__ ((packed));
+-	__u8 r_code		__attribute__ ((packed));
+-} T30_s;
++	__u8 r_resolution;
++	__u8 r_rate;
++	__u8 r_width;
++	__u8 r_length;
++	__u8 r_compression;
++	__u8 r_ecm;
++	__u8 r_binary;
++	__u8 r_scantime;
++	__u8 r_id[FAXIDLEN];
++	__u8 r_code;
++} __attribute__((packed)) T30_s;
+ 
+ #define ISDN_TTY_FAX_CONN_IN	0
+ #define ISDN_TTY_FAX_CONN_OUT	1
+Index: linux-2.6/include/linux/ncp.h
+===================================================================
+--- linux-2.6.orig/include/linux/ncp.h
++++ linux-2.6/include/linux/ncp.h
+@@ -20,29 +20,29 @@
+ #define NCP_DEALLOC_SLOT_REQUEST (0x5555)
+ 
+ struct ncp_request_header {
+-	__u16 type __attribute__((packed));
+-	__u8 sequence __attribute__((packed));
+-	__u8 conn_low __attribute__((packed));
+-	__u8 task __attribute__((packed));
+-	__u8 conn_high __attribute__((packed));
+-	__u8 function __attribute__((packed));
+-	__u8 data[0] __attribute__((packed));
+-};
++	__u16 type;
++	__u8 sequence;
++	__u8 conn_low;
++	__u8 task;
++	__u8 conn_high;
++	__u8 function;
++	__u8 data[0];
++} __attribute__((packed));
+ 
+ #define NCP_REPLY                (0x3333)
+ #define NCP_WATCHDOG		 (0x3E3E)
+ #define NCP_POSITIVE_ACK         (0x9999)
+ 
+ struct ncp_reply_header {
+-	__u16 type __attribute__((packed));
+-	__u8 sequence __attribute__((packed));
+-	__u8 conn_low __attribute__((packed));
+-	__u8 task __attribute__((packed));
+-	__u8 conn_high __attribute__((packed));
+-	__u8 completion_code __attribute__((packed));
+-	__u8 connection_state __attribute__((packed));
+-	__u8 data[0] __attribute__((packed));
+-};
++	__u16 type;
++	__u8 sequence;
++	__u8 conn_low;
++	__u8 task;
++	__u8 conn_high;
++	__u8 completion_code;
++	__u8 connection_state;
++	__u8 data[0];
++} __attribute__((packed));
+ 
+ #define NCP_VOLNAME_LEN (16)
+ #define NCP_NUMBER_OF_VOLUMES (256)
+@@ -128,37 +128,37 @@ struct nw_nfs_info {
+ };
+ 
+ struct nw_info_struct {
+-	__u32 spaceAlloc __attribute__((packed));
+-	__le32 attributes __attribute__((packed));
+-	__u16 flags __attribute__((packed));
+-	__le32 dataStreamSize __attribute__((packed));
+-	__le32 totalStreamSize __attribute__((packed));
+-	__u16 numberOfStreams __attribute__((packed));
+-	__le16 creationTime __attribute__((packed));
+-	__le16 creationDate __attribute__((packed));
+-	__u32 creatorID __attribute__((packed));
+-	__le16 modifyTime __attribute__((packed));
+-	__le16 modifyDate __attribute__((packed));
+-	__u32 modifierID __attribute__((packed));
+-	__le16 lastAccessDate __attribute__((packed));
+-	__u16 archiveTime __attribute__((packed));
+-	__u16 archiveDate __attribute__((packed));
+-	__u32 archiverID __attribute__((packed));
+-	__u16 inheritedRightsMask __attribute__((packed));
+-	__le32 dirEntNum __attribute__((packed));
+-	__le32 DosDirNum __attribute__((packed));
+-	__u32 volNumber __attribute__((packed));
+-	__u32 EADataSize __attribute__((packed));
+-	__u32 EAKeyCount __attribute__((packed));
+-	__u32 EAKeySize __attribute__((packed));
+-	__u32 NSCreator __attribute__((packed));
+-	__u8 nameLen __attribute__((packed));
+-	__u8 entryName[256] __attribute__((packed));
++	__u32 spaceAlloc;
++	__le32 attributes;
++	__u16 flags;
++	__le32 dataStreamSize;
++	__le32 totalStreamSize;
++	__u16 numberOfStreams;
++	__le16 creationTime;
++	__le16 creationDate;
++	__u32 creatorID;
++	__le16 modifyTime;
++	__le16 modifyDate;
++	__u32 modifierID;
++	__le16 lastAccessDate;
++	__u16 archiveTime;
++	__u16 archiveDate;
++	__u32 archiverID;
++	__u16 inheritedRightsMask;
++	__le32 dirEntNum;
++	__le32 DosDirNum;
++	__u32 volNumber;
++	__u32 EADataSize;
++	__u32 EAKeyCount;
++	__u32 EAKeySize;
++	__u32 NSCreator;
++	__u8 nameLen;
++	__u8 entryName[256];
+ 	/* libncp may depend on there being nothing after entryName */
+ #ifdef __KERNEL__
+ 	struct nw_nfs_info nfs;
+ #endif
+-};
++} __attribute__((packed));
+ 
+ /* modify mask - use with MODIFY_DOS_INFO structure */
+ #define DM_ATTRIBUTES		  (cpu_to_le32(0x02))
+@@ -176,26 +176,26 @@ struct nw_info_struct {
+ #define DM_MAXIMUM_SPACE	  (cpu_to_le32(0x2000))
+ 
+ struct nw_modify_dos_info {
+-	__le32 attributes __attribute__((packed));
+-	__le16 creationDate __attribute__((packed));
+-	__le16 creationTime __attribute__((packed));
+-	__u32 creatorID __attribute__((packed));
+-	__le16 modifyDate __attribute__((packed));
+-	__le16 modifyTime __attribute__((packed));
+-	__u32 modifierID __attribute__((packed));
+-	__u16 archiveDate __attribute__((packed));
+-	__u16 archiveTime __attribute__((packed));
+-	__u32 archiverID __attribute__((packed));
+-	__le16 lastAccessDate __attribute__((packed));
+-	__u16 inheritanceGrantMask __attribute__((packed));
+-	__u16 inheritanceRevokeMask __attribute__((packed));
+-	__u32 maximumSpace __attribute__((packed));
+-};
++	__le32 attributes;
++	__le16 creationDate;
++	__le16 creationTime;
++	__u32 creatorID;
++	__le16 modifyDate;
++	__le16 modifyTime;
++	__u32 modifierID;
++	__u16 archiveDate;
++	__u16 archiveTime;
++	__u32 archiverID;
++	__le16 lastAccessDate;
++	__u16 inheritanceGrantMask;
++	__u16 inheritanceRevokeMask;
++	__u32 maximumSpace;
++} __attribute__((packed));
+ 
+ struct nw_search_sequence {
+-	__u8 volNumber __attribute__((packed));
+-	__u32 dirBase __attribute__((packed));
+-	__u32 sequence __attribute__((packed));
+-};
++	__u8 volNumber;
++	__u32 dirBase;
++	__u32 sequence;
++} __attribute__((packed));
+ 
+ #endif				/* _LINUX_NCP_H */
+Index: linux-2.6/drivers/isdn/hisax/hisax.h
+===================================================================
+--- linux-2.6.orig/drivers/isdn/hisax/hisax.h
++++ linux-2.6/drivers/isdn/hisax/hisax.h
+@@ -396,17 +396,17 @@ struct isar_hw {
+ 
+ struct hdlc_stat_reg {
+ #ifdef __BIG_ENDIAN
+-	u_char fill __attribute__((packed));
+-	u_char mode __attribute__((packed));
+-	u_char xml  __attribute__((packed));
+-	u_char cmd  __attribute__((packed));
+-#else
+-	u_char cmd  __attribute__((packed));
+-	u_char xml  __attribute__((packed));
+-	u_char mode __attribute__((packed));
+-	u_char fill __attribute__((packed));
++	u_char fill;
++	u_char mode;
++	u_char xml;
++	u_char cmd;
++#else
++	u_char cmd;
++	u_char xml;
++	u_char mode;
++	u_char fill;
+ #endif
+-};
++} __attribute__((packed));
+ 
+ struct hdlc_hw {
+ 	union {
+Index: linux-2.6/drivers/isdn/hisax/hisax_fcpcipnp.h
+===================================================================
+--- linux-2.6.orig/drivers/isdn/hisax/hisax_fcpcipnp.h
++++ linux-2.6/drivers/isdn/hisax/hisax_fcpcipnp.h
+@@ -12,17 +12,17 @@ enum {
+ 
+ struct hdlc_stat_reg {
+ #ifdef __BIG_ENDIAN
+-	u_char fill __attribute__((packed));
+-	u_char mode __attribute__((packed));
+-	u_char xml  __attribute__((packed));
+-	u_char cmd  __attribute__((packed));
++	u_char fill;
++	u_char mode;
++	u_char xml;
++	u_char cmd;
+ #else
+-	u_char cmd  __attribute__((packed));
+-	u_char xml  __attribute__((packed));
+-	u_char mode __attribute__((packed));
+-	u_char fill __attribute__((packed));
++	u_char cmd;
++	u_char xml;
++	u_char mode;
++	u_char fill;
+ #endif
+-};
++} __attribute__((packed));
+ 
+ struct fritz_bcs {
+ 	struct hisax_b_if b_if;
+Index: linux-2.6/drivers/net/3c527.h
+===================================================================
+--- linux-2.6.orig/drivers/net/3c527.h
++++ linux-2.6/drivers/net/3c527.h
+@@ -32,43 +32,43 @@
+ 
+ struct mc32_mailbox
+ {
+-	u16	mbox __attribute((packed));
+-	u16	data[1] __attribute((packed));
+-};
++	u16	mbox;
++	u16	data[1];
++} __attribute((packed));
+ 
+ struct skb_header
+ {
+-	u8	status __attribute((packed));
+-	u8	control __attribute((packed));
+-	u16	next __attribute((packed));	/* Do not change! */
+-	u16	length __attribute((packed));
+-	u32	data __attribute((packed));
+-};
++	u8	status;
++	u8	control;
++	u16	next;	/* Do not change! */
++	u16	length;
++	u32	data;
++} __attribute((packed));
+ 
+ struct mc32_stats
+ {
+ 	/* RX Errors */
+-	u32     rx_crc_errors       __attribute((packed)); 	
+-	u32     rx_alignment_errors  __attribute((packed)); 	
+-	u32     rx_overrun_errors    __attribute((packed));
+-	u32     rx_tooshort_errors  __attribute((packed));
+-	u32     rx_toolong_errors   __attribute((packed));
+-	u32     rx_outofresource_errors  __attribute((packed)); 
++	u32     rx_crc_errors;
++	u32     rx_alignment_errors;
++	u32     rx_overrun_errors;
++	u32     rx_tooshort_errors;
++	u32     rx_toolong_errors;
++	u32     rx_outofresource_errors;
+ 
+-	u32     rx_discarded   __attribute((packed));  /* via card pattern match filter */ 
++	u32     rx_discarded;  /* via card pattern match filter */
+ 
+ 	/* TX Errors */
+-	u32     tx_max_collisions __attribute((packed)); 
+-	u32     tx_carrier_errors __attribute((packed)); 
+-	u32     tx_underrun_errors __attribute((packed)); 
+-	u32     tx_cts_errors     __attribute((packed)); 
+-	u32     tx_timeout_errors __attribute((packed)) ;
++	u32     tx_max_collisions;
++	u32     tx_carrier_errors;
++	u32     tx_underrun_errors;
++	u32     tx_cts_errors;
++	u32     tx_timeout_errors;
+ 	
+ 	/* various cruft */
+-	u32     dataA[6] __attribute((packed));   
+-        u16	dataB[5] __attribute((packed));   
+-  	u32     dataC[14] __attribute((packed)); 	
+-};
++	u32     dataA[6];
++        u16	dataB[5];
++  	u32     dataC[14];
++} __attribute((packed));
+ 
+ #define STATUS_MASK	0x0F
+ #define COMPLETED	(1<<7)
+Index: linux-2.6/drivers/net/irda/vlsi_ir.h
+===================================================================
+--- linux-2.6.orig/drivers/net/irda/vlsi_ir.h
++++ linux-2.6/drivers/net/irda/vlsi_ir.h
+@@ -577,8 +577,8 @@ struct ring_descr_hw {
+ 		struct {
+ 			u8		addr_res[3];
+ 			volatile u8	status;		/* descriptor status */
+-		} rd_s __attribute__((packed));
+-	} rd_u __attribute((packed));
++		} __attribute__((packed)) rd_s;
++	} __attribute((packed)) rd_u;
+ } __attribute__ ((packed));
+ 
+ #define rd_addr		rd_u.addr
+Index: linux-2.6/include/linux/atalk.h
+===================================================================
+--- linux-2.6.orig/include/linux/atalk.h
++++ linux-2.6/include/linux/atalk.h
+@@ -155,15 +155,15 @@ struct elapaarp {
+ #define AARP_REQUEST			1
+ #define AARP_REPLY			2
+ #define AARP_PROBE			3
+-	__u8	hw_src[ETH_ALEN]	__attribute__ ((packed));
+-	__u8	pa_src_zero		__attribute__ ((packed));
+-	__be16	pa_src_net		__attribute__ ((packed));
+-	__u8	pa_src_node		__attribute__ ((packed));
+-	__u8	hw_dst[ETH_ALEN]	__attribute__ ((packed));
+-	__u8	pa_dst_zero		__attribute__ ((packed));
+-	__be16	pa_dst_net		__attribute__ ((packed));
+-	__u8	pa_dst_node		__attribute__ ((packed));	
+-};
++	__u8	hw_src[ETH_ALEN];
++	__u8	pa_src_zero;
++	__be16	pa_src_net;
++	__u8	pa_src_node;
++	__u8	hw_dst[ETH_ALEN];
++	__u8	pa_dst_zero;
++	__be16	pa_dst_net;
++	__u8	pa_dst_node;
++} __attribute__ ((packed));
+ 
+ static __inline__ struct elapaarp *aarp_hdr(struct sk_buff *skb)
+ {
+Index: linux-2.6/include/linux/cycx_x25.h
+===================================================================
+--- linux-2.6.orig/include/linux/cycx_x25.h
++++ linux-2.6/include/linux/cycx_x25.h
+@@ -38,11 +38,11 @@ extern unsigned int cycx_debug;
+ /* Data Structures */
+ /* X.25 Command Block. */
+ struct cycx_x25_cmd {
+-	u16 command PACKED;
+-	u16 link    PACKED; /* values: 0 or 1 */
+-	u16 len     PACKED; /* values: 0 thru 0x205 (517) */
+-	u32 buf     PACKED;
+-};
++	u16 command;
++	u16 link;	/* values: 0 or 1 */
++	u16 len;	/* values: 0 thru 0x205 (517) */
++	u32 buf;
++} PACKED;
+ 
+ /* Defines for the 'command' field. */
+ #define X25_CONNECT_REQUEST             0x4401
+@@ -92,34 +92,34 @@ struct cycx_x25_cmd {
+  *	@flags - see dosx25.doc, in portuguese, for details
+  */
+ struct cycx_x25_config {
+-	u8  link	PACKED;
+-	u8  speed	PACKED;
+-	u8  clock	PACKED;
+-	u8  n2		PACKED;
+-	u8  n2win	PACKED;
+-	u8  n3win	PACKED;
+-	u8  nvc		PACKED;
+-	u8  pktlen	PACKED;
+-	u8  locaddr	PACKED;
+-	u8  remaddr	PACKED;
+-	u16 t1		PACKED;
+-	u16 t2		PACKED;
+-	u8  t21		PACKED;
+-	u8  npvc	PACKED;
+-	u8  t23		PACKED;
+-	u8  flags	PACKED;
+-};
++	u8  link;
++	u8  speed;
++	u8  clock;
++	u8  n2;
++	u8  n2win;
++	u8  n3win;
++	u8  nvc;
++	u8  pktlen;
++	u8  locaddr;
++	u8  remaddr;
++	u16 t1;
++	u16 t2;
++	u8  t21;
++	u8  npvc;
++	u8  t23;
++	u8  flags;
++} PACKED;
+ 
+ struct cycx_x25_stats {
+-	u16 rx_crc_errors	PACKED;
+-	u16 rx_over_errors	PACKED;
+-	u16 n2_tx_frames 	PACKED;
+-	u16 n2_rx_frames 	PACKED;
+-	u16 tx_timeouts 	PACKED;
+-	u16 rx_timeouts 	PACKED;
+-	u16 n3_tx_packets 	PACKED;
+-	u16 n3_rx_packets 	PACKED;
+-	u16 tx_aborts	 	PACKED;
+-	u16 rx_aborts	 	PACKED;
+-};
++	u16 rx_crc_errors;
++	u16 rx_over_errors;
++	u16 n2_tx_frames;
++	u16 n2_rx_frames;
++	u16 tx_timeouts;
++	u16 rx_timeouts;
++	u16 n3_tx_packets;
++	u16 n3_rx_packets;
++	u16 tx_aborts;
++	u16 rx_aborts;
++} PACKED;
+ #endif	/* _CYCX_X25_H */
+Index: linux-2.6/include/linux/sdla.h
+===================================================================
+--- linux-2.6.orig/include/linux/sdla.h
++++ linux-2.6/include/linux/sdla.h
+@@ -293,46 +293,46 @@ void sdla(void *cfg_info, char *dev, str
+ #define SDLA_S508_INTEN			0x10
+ 
+ struct sdla_cmd {
+-   char  opp_flag		__attribute__((packed));
+-   char  cmd			__attribute__((packed));
+-   short length			__attribute__((packed));
+-   char  retval			__attribute__((packed));
+-   short dlci			__attribute__((packed));
+-   char  flags			__attribute__((packed));
+-   short rxlost_int		__attribute__((packed));
+-   long  rxlost_app		__attribute__((packed));
+-   char  reserve[2]		__attribute__((packed));
+-   char  data[SDLA_MAX_DATA]	__attribute__((packed));	/* transfer data buffer */
+-};
++   char  opp_flag;
++   char  cmd;
++   short length;
++   char  retval;
++   short dlci;
++   char  flags;
++   short rxlost_int;
++   long  rxlost_app;
++   char  reserve[2];
++   char  data[SDLA_MAX_DATA];	/* transfer data buffer */
++} __attribute__((packed));
+ 
+ struct intr_info {
+-   char  flags		__attribute__((packed));
+-   short txlen		__attribute__((packed));
+-   char  irq		__attribute__((packed));
+-   char  flags2		__attribute__((packed));
+-   short timeout	__attribute__((packed));
+-};
++   char  flags;
++   short txlen;
++   char  irq;
++   char  flags2;
++   short timeout;
++} __attribute__((packed));
+ 
+ /* found in the 508's control window at RXBUF_INFO */
+ struct buf_info {
+-   unsigned short rse_num	__attribute__((packed));
+-   unsigned long  rse_base	__attribute__((packed));
+-   unsigned long  rse_next	__attribute__((packed));
+-   unsigned long  buf_base	__attribute__((packed));
+-   unsigned short reserved	__attribute__((packed));
+-   unsigned long  buf_top	__attribute__((packed));
+-};
++   unsigned short rse_num;
++   unsigned long  rse_base;
++   unsigned long  rse_next;
++   unsigned long  buf_base;
++   unsigned short reserved;
++   unsigned long  buf_top;
++} __attribute__((packed));
+ 
+ /* structure pointed to by rse_base in RXBUF_INFO struct */
+ struct buf_entry {
+-   char  opp_flag	__attribute__((packed));
+-   short length		__attribute__((packed));
+-   short dlci		__attribute__((packed));
+-   char  flags		__attribute__((packed));
+-   short timestamp	__attribute__((packed));
+-   short reserved[2]	__attribute__((packed));
+-   long  buf_addr	__attribute__((packed));
+-};
++   char  opp_flag;
++   short length;
++   short dlci;
++   char  flags;
++   short timestamp;
++   short reserved[2];
++   long  buf_addr;
++} __attribute__((packed));
+ 
+ #endif
+ 
+Index: linux-2.6/include/linux/wavefront.h
+===================================================================
+--- linux-2.6.orig/include/linux/wavefront.h
++++ linux-2.6/include/linux/wavefront.h
+@@ -434,22 +434,22 @@ typedef struct wf_multisample {
+ } wavefront_multisample;
+ 
+ typedef struct wf_alias {
+-    INT16 OriginalSample __attribute__ ((packed));
++    INT16 OriginalSample;
+ 
+-    struct wf_sample_offset sampleStartOffset __attribute__ ((packed));
+-    struct wf_sample_offset loopStartOffset __attribute__ ((packed));
+-    struct wf_sample_offset sampleEndOffset __attribute__ ((packed));
+-    struct wf_sample_offset loopEndOffset __attribute__ ((packed));
+-
+-    INT16  FrequencyBias __attribute__ ((packed));
+-
+-    UCHAR8 SampleResolution:2  __attribute__ ((packed));
+-    UCHAR8 Unused1:1  __attribute__ ((packed));
+-    UCHAR8 Loop:1 __attribute__ ((packed));
+-    UCHAR8 Bidirectional:1  __attribute__ ((packed));
+-    UCHAR8 Unused2:1 __attribute__ ((packed));
+-    UCHAR8 Reverse:1 __attribute__ ((packed));
+-    UCHAR8 Unused3:1 __attribute__ ((packed)); 
++    struct wf_sample_offset sampleStartOffset;
++    struct wf_sample_offset loopStartOffset;
++    struct wf_sample_offset sampleEndOffset;
++    struct wf_sample_offset loopEndOffset;
++
++    INT16  FrequencyBias;
++
++    UCHAR8 SampleResolution:2;
++    UCHAR8 Unused1:1;
++    UCHAR8 Loop:1;
++    UCHAR8 Bidirectional:1;
++    UCHAR8 Unused2:1;
++    UCHAR8 Reverse:1;
++    UCHAR8 Unused3:1;
+     
+     /* This structure is meant to be padded only to 16 bits on their
+        original. Of course, whoever wrote their documentation didn't
+@@ -460,8 +460,8 @@ typedef struct wf_alias {
+        standard 16->32 bit issues.
+     */
+ 
+-    UCHAR8 sixteen_bit_padding __attribute__ ((packed));
+-} wavefront_alias;
++    UCHAR8 sixteen_bit_padding;
++} __attribute__((packed)) wavefront_alias;
+ 
+ typedef struct wf_drum {
+     UCHAR8 PatchNumber;
+Index: linux-2.6/include/net/dn_dev.h
+===================================================================
+--- linux-2.6.orig/include/net/dn_dev.h
++++ linux-2.6/include/net/dn_dev.h
+@@ -99,57 +99,57 @@ struct dn_dev {
+ 
+ struct dn_short_packet
+ {
+-	unsigned char   msgflg          __attribute__((packed));
+-        unsigned short  dstnode         __attribute__((packed));
+-        unsigned short  srcnode         __attribute__((packed));
+-        unsigned char   forward         __attribute__((packed));
+-};
++	unsigned char   msgflg;
++        unsigned short  dstnode;
++        unsigned short  srcnode;
++        unsigned char   forward;
++} __attribute__((packed));
+ 
+ struct dn_long_packet
+ {
+-	unsigned char   msgflg          __attribute__((packed));
+-        unsigned char   d_area          __attribute__((packed));
+-        unsigned char   d_subarea       __attribute__((packed));
+-        unsigned char   d_id[6]         __attribute__((packed));
+-        unsigned char   s_area          __attribute__((packed));
+-        unsigned char   s_subarea       __attribute__((packed));
+-        unsigned char   s_id[6]         __attribute__((packed));
+-        unsigned char   nl2             __attribute__((packed));
+-        unsigned char   visit_ct        __attribute__((packed));
+-        unsigned char   s_class         __attribute__((packed));
+-        unsigned char   pt              __attribute__((packed));
+-};
++	unsigned char   msgflg;
++        unsigned char   d_area;
++        unsigned char   d_subarea;
++        unsigned char   d_id[6];
++        unsigned char   s_area;
++        unsigned char   s_subarea;
++        unsigned char   s_id[6];
++        unsigned char   nl2;
++        unsigned char   visit_ct;
++        unsigned char   s_class;
++        unsigned char   pt;
++} __attribute__((packed));
+ 
+ /*------------------------- DRP - Routing messages ---------------------*/
+ 
+ struct endnode_hello_message
+ {
+-	unsigned char   msgflg          __attribute__((packed));
+-        unsigned char   tiver[3]        __attribute__((packed));
+-        unsigned char   id[6]           __attribute__((packed));
+-        unsigned char   iinfo           __attribute__((packed));
+-        unsigned short  blksize         __attribute__((packed));
+-        unsigned char   area            __attribute__((packed));
+-        unsigned char   seed[8]         __attribute__((packed));
+-        unsigned char   neighbor[6]     __attribute__((packed));
+-        unsigned short  timer           __attribute__((packed));
+-        unsigned char   mpd             __attribute__((packed));
+-        unsigned char   datalen         __attribute__((packed));
+-        unsigned char   data[2]         __attribute__((packed));
+-};
++	unsigned char   msgflg;
++        unsigned char   tiver[3];
++        unsigned char   id[6];
++        unsigned char   iinfo;
++        unsigned short  blksize;
++        unsigned char   area;
++        unsigned char   seed[8];
++        unsigned char   neighbor[6];
++        unsigned short  timer;
++        unsigned char   mpd;
++        unsigned char   datalen;
++        unsigned char   data[2];
++} __attribute__((packed));
+ 
+ struct rtnode_hello_message
+ {
+-	unsigned char   msgflg          __attribute__((packed));
+-        unsigned char   tiver[3]        __attribute__((packed));
+-        unsigned char   id[6]           __attribute__((packed));
+-        unsigned char   iinfo           __attribute__((packed));
+-        unsigned short  blksize         __attribute__((packed));
+-        unsigned char   priority        __attribute__((packed));
+-        unsigned char   area            __attribute__((packed));
+-        unsigned short  timer           __attribute__((packed));
+-        unsigned char   mpd             __attribute__((packed));
+-};
++	unsigned char   msgflg;
++        unsigned char   tiver[3];
++        unsigned char   id[6];
++        unsigned char   iinfo;
++        unsigned short  blksize;
++        unsigned char   priority;
++        unsigned char   area;
++        unsigned short  timer;
++        unsigned char   mpd;
++} __attribute__((packed));
+ 
+ 
+ extern void dn_dev_init(void);
+Index: linux-2.6/drivers/net/wan/sdla.c
+===================================================================
+--- linux-2.6.orig/drivers/net/wan/sdla.c
++++ linux-2.6/drivers/net/wan/sdla.c
+@@ -329,9 +329,9 @@ static int sdla_cpuspeed(struct net_devi
+ 
+ struct _dlci_stat 
+ {
+-	short dlci		__attribute__((packed));
+-	char  flags		__attribute__((packed));
+-};
++	short dlci;
++	char  flags;
++} __attribute__((packed));
+ 
+ struct _frad_stat 
+ {
+Index: linux-2.6/include/net/dn_nsp.h
+===================================================================
+--- linux-2.6.orig/include/net/dn_nsp.h
++++ linux-2.6/include/net/dn_nsp.h
+@@ -72,78 +72,78 @@ extern struct sk_buff *dn_alloc_send_skb
+ 
+ struct nsp_data_seg_msg
+ {
+-	unsigned char   msgflg          __attribute__((packed));
+-	unsigned short  dstaddr         __attribute__((packed));
+-	unsigned short  srcaddr         __attribute__((packed));
+-};
++	unsigned char   msgflg;
++	unsigned short  dstaddr;
++	unsigned short  srcaddr;
++} __attribute__((packed));
+ 
+ struct nsp_data_opt_msg
+ {
+-	unsigned short  acknum          __attribute__((packed));
+-	unsigned short  segnum          __attribute__((packed));
+-	unsigned short  lsflgs          __attribute__((packed));
+-};
++	unsigned short  acknum;
++	unsigned short  segnum;
++	unsigned short  lsflgs;
++} __attribute__((packed));
+ 
+ struct nsp_data_opt_msg1
+ {
+-	unsigned short  acknum          __attribute__((packed));
+-	unsigned short  segnum          __attribute__((packed));
+-};
++	unsigned short  acknum;
++	unsigned short  segnum;
++} __attribute__((packed));
+ 
+ 
+ /* Acknowledgment Message (data/other data)                             */
+ struct nsp_data_ack_msg
+ {
+-	unsigned char   msgflg          __attribute__((packed));
+-	unsigned short  dstaddr         __attribute__((packed));
+-	unsigned short  srcaddr         __attribute__((packed));
+-	unsigned short  acknum          __attribute__((packed));
+-};
++	unsigned char   msgflg;
++	unsigned short  dstaddr;
++	unsigned short  srcaddr;
++	unsigned short  acknum;
++} __attribute__((packed));
+ 
+ /* Connect Acknowledgment Message */
+ struct  nsp_conn_ack_msg
+ {
+-	unsigned char   msgflg          __attribute__((packed));
+-	unsigned short  dstaddr         __attribute__((packed));
+-};
++	unsigned char   msgflg;
++	unsigned short  dstaddr;
++} __attribute__((packed));
+ 
+ 
+ /* Connect Initiate/Retransmit Initiate/Connect Confirm */
+ struct  nsp_conn_init_msg
+ {
+-	unsigned char   msgflg          __attribute__((packed));
++	unsigned char   msgflg;
+ #define NSP_CI      0x18            /* Connect Initiate     */
+ #define NSP_RCI     0x68            /* Retrans. Conn Init   */
+-	unsigned short  dstaddr         __attribute__((packed));
+-        unsigned short  srcaddr         __attribute__((packed));
+-        unsigned char   services        __attribute__((packed));
++	unsigned short  dstaddr;
++        unsigned short  srcaddr;
++        unsigned char   services;
+ #define NSP_FC_NONE   0x00            /* Flow Control None    */
+ #define NSP_FC_SRC    0x04            /* Seg Req. Count       */
+ #define NSP_FC_SCMC   0x08            /* Sess. Control Mess   */
+ #define NSP_FC_MASK   0x0c            /* FC type mask         */
+-	unsigned char   info            __attribute__((packed));
+-        unsigned short  segsize         __attribute__((packed));
+-};
++	unsigned char   info;
++        unsigned short  segsize;
++} __attribute__((packed));
+ 
+ /* Disconnect Initiate/Disconnect Confirm */
+ struct  nsp_disconn_init_msg
+ {
+-	unsigned char   msgflg          __attribute__((packed));
+-        unsigned short  dstaddr         __attribute__((packed));
+-        unsigned short  srcaddr         __attribute__((packed));
+-        unsigned short  reason          __attribute__((packed));
+-};
++	unsigned char   msgflg;
++        unsigned short  dstaddr;
++        unsigned short  srcaddr;
++        unsigned short  reason;
++} __attribute__((packed));
+ 
+ 
+ 
+ struct  srcobj_fmt
+ {
+-	char            format          __attribute__((packed));
+-        unsigned char   task            __attribute__((packed));
+-        unsigned short  grpcode         __attribute__((packed));
+-        unsigned short  usrcode         __attribute__((packed));
+-        char            dlen            __attribute__((packed));
+-};
++	char            format;
++        unsigned char   task;
++        unsigned short  grpcode;
++        unsigned short  usrcode;
++        char            dlen;
++} __attribute__((packed));
+ 
+ /*
+  * A collection of functions for manipulating the sequence
+Index: linux-2.6/include/sound/wavefront.h
+===================================================================
+--- linux-2.6.orig/include/sound/wavefront.h
++++ linux-2.6/include/sound/wavefront.h
+@@ -454,22 +454,22 @@ typedef struct wf_multisample {
+ } wavefront_multisample;
+ 
+ typedef struct wf_alias {
+-    s16 OriginalSample __attribute__ ((packed));
++    s16 OriginalSample;
+ 
+-    struct wf_sample_offset sampleStartOffset __attribute__ ((packed));
+-    struct wf_sample_offset loopStartOffset __attribute__ ((packed));
+-    struct wf_sample_offset sampleEndOffset __attribute__ ((packed));
+-    struct wf_sample_offset loopEndOffset __attribute__ ((packed));
+-
+-    s16  FrequencyBias __attribute__ ((packed));
+-
+-    u8 SampleResolution:2  __attribute__ ((packed));
+-    u8 Unused1:1  __attribute__ ((packed));
+-    u8 Loop:1 __attribute__ ((packed));
+-    u8 Bidirectional:1  __attribute__ ((packed));
+-    u8 Unused2:1 __attribute__ ((packed));
+-    u8 Reverse:1 __attribute__ ((packed));
+-    u8 Unused3:1 __attribute__ ((packed)); 
++    struct wf_sample_offset sampleStartOffset;
++    struct wf_sample_offset loopStartOffset;
++    struct wf_sample_offset sampleEndOffset;
++    struct wf_sample_offset loopEndOffset;
++
++    s16  FrequencyBias;
++
++    u8 SampleResolution:2;
++    u8 Unused1:1;
++    u8 Loop:1;
++    u8 Bidirectional:1;
++    u8 Unused2:1;
++    u8 Reverse:1;
++    u8 Unused3:1;
+     
+     /* This structure is meant to be padded only to 16 bits on their
+        original. Of course, whoever wrote their documentation didn't
+@@ -480,8 +480,8 @@ typedef struct wf_alias {
+        standard 16->32 bit issues.
+     */
+ 
+-    u8 sixteen_bit_padding __attribute__ ((packed));
+-} wavefront_alias;
++    u8 sixteen_bit_padding;
++} __attribute__((packed)) wavefront_alias;
+ 
+ typedef struct wf_drum {
+     u8 PatchNumber;
+
+
+Remove the unnecessary __attribute__ ((packed)) since the enum itself is
+packed and not the location of it in the structure.
+
+Signed-off-by: Jan Blunck <jblunck at suse.de>
+
+ fs/afs/volume.h |    4 +---
+ 1 files changed, 1 insertion(+), 3 deletions(-)
+
+Index: linux-2.6/fs/afs/volume.h
+===================================================================
+--- linux-2.6.orig/fs/afs/volume.h
++++ linux-2.6/fs/afs/volume.h
+@@ -18,8 +18,6 @@
+ #include "kafsasyncd.h"
+ #include "cache.h"
+ 
+-#define __packed __attribute__((packed))
+-
+ typedef enum {
+ 	AFS_VLUPD_SLEEP,		/* sleeping waiting for update timer to fire */
+ 	AFS_VLUPD_PENDING,		/* on pending queue */
+@@ -115,7 +113,7 @@ struct afs_volume
+ 	struct cachefs_cookie	*cache;		/* caching cookie */
+ #endif
+ 	afs_volid_t		vid;		/* volume ID */
+-	afs_voltype_t __packed	type;		/* type of volume */
++	afs_voltype_t		type;		/* type of volume */
+ 	char			type_force;	/* force volume type (suppress R/O -> R/W) */
+ 	unsigned short		nservers;	/* number of server slots filled */
+ 	unsigned short		rjservers;	/* number of servers discarded due to -ENOMEDIUM */
+
+
+The CAPI message structs itself should be packed and not the location of
+single fields in the structure.
+
+Signed-off-by: Jan Blunck <jblunck at suse.de>
+
+ drivers/isdn/act2000/capi.h |   88 ++++++++++++++++++++++----------------------
+ 1 files changed, 44 insertions(+), 44 deletions(-)
+
+Index: linux-2.6/drivers/isdn/act2000/capi.h
+===================================================================
+--- linux-2.6.orig/drivers/isdn/act2000/capi.h
++++ linux-2.6/drivers/isdn/act2000/capi.h
+@@ -78,29 +78,29 @@ typedef union  actcapi_infoel {         
+ typedef struct actcapi_msn {
+ 	__u8 eaz;
+ 	__u8 len;                            /* Length of MSN                */
+-	__u8 msn[15] __attribute__ ((packed));
+-} actcapi_msn;
++	__u8 msn[15];
++}  __attribute__((packed)) actcapi_msn;
+ 
+ typedef struct actcapi_dlpd {
+ 	__u8 len;                            /* Length of structure          */
+-	__u16 dlen __attribute__ ((packed)); /* Data Length                  */
+-	__u8 laa __attribute__ ((packed));   /* Link Address A               */
++	__u16 dlen;                          /* Data Length                  */
++	__u8 laa;                            /* Link Address A               */
+ 	__u8 lab;                            /* Link Address B               */
+ 	__u8 modulo;                         /* Modulo Mode                  */
+ 	__u8 win;                            /* Window size                  */
+ 	__u8 xid[100];                       /* XID Information              */
+-} actcapi_dlpd;
++} __attribute__((packed)) actcapi_dlpd;
+ 
+ typedef struct actcapi_ncpd {
+ 	__u8   len;                          /* Length of structure          */
+-	__u16  lic __attribute__ ((packed));
+-	__u16  hic __attribute__ ((packed));
+-	__u16  ltc __attribute__ ((packed));
+-	__u16  htc __attribute__ ((packed));
+-	__u16  loc __attribute__ ((packed));
+-	__u16  hoc __attribute__ ((packed));
+-	__u8   modulo __attribute__ ((packed));
+-} actcapi_ncpd;
++	__u16  lic;
++	__u16  hic;
++	__u16  ltc;
++	__u16  htc;
++	__u16  loc;
++	__u16  hoc;
++	__u8   modulo;
++} __attribute__((packed)) actcapi_ncpd;
+ #define actcapi_ncpi actcapi_ncpd
+ 
+ /*
+@@ -168,19 +168,19 @@ typedef struct actcapi_msg {
+ 			__u16 manuf_msg;
+ 			__u16 controller;
+ 			actcapi_msn msnmap;
+-		} manufacturer_req_msn;
++		} __attribute ((packed)) manufacturer_req_msn;
+ 		/* TODO: TraceInit-req/conf/ind/resp and
+ 		 *       TraceDump-req/conf/ind/resp
+ 		 */
+ 		struct connect_req {
+ 			__u8  controller;
+ 			__u8  bchan;
+-			__u32 infomask __attribute__ ((packed));
++			__u32 infomask;
+ 			__u8  si1;
+ 			__u8  si2;
+ 			__u8  eaz;
+ 			actcapi_addr addr;
+-		} connect_req;
++		} __attribute__ ((packed)) connect_req;
+ 		struct connect_conf {
+ 			__u16 plci;
+ 			__u16 info;
+@@ -192,7 +192,7 @@ typedef struct actcapi_msg {
+ 			__u8  si2;
+ 			__u8  eaz;
+ 			actcapi_addr addr;
+-		} connect_ind;
++		} __attribute__ ((packed)) connect_ind;
+ 		struct connect_resp {
+ 			__u16 plci;
+ 			__u8  rejectcause;
+@@ -200,14 +200,14 @@ typedef struct actcapi_msg {
+ 		struct connect_active_ind {
+ 			__u16 plci;
+ 			actcapi_addr addr;
+-		} connect_active_ind;
++		} __attribute__ ((packed)) connect_active_ind;
+ 		struct connect_active_resp {
+ 			__u16 plci;
+ 		} connect_active_resp;
+ 		struct connect_b3_req {
+ 			__u16 plci;
+ 			actcapi_ncpi ncpi;
+-		} connect_b3_req;
++		} __attribute__ ((packed)) connect_b3_req;
+ 		struct connect_b3_conf {
+ 			__u16 plci;
+ 			__u16 ncci;
+@@ -217,12 +217,12 @@ typedef struct actcapi_msg {
+ 			__u16 ncci;
+ 			__u16 plci;
+ 			actcapi_ncpi ncpi;
+-		} connect_b3_ind;
++		} __attribute__ ((packed)) connect_b3_ind;
+ 		struct connect_b3_resp {
+ 			__u16 ncci;
+ 			__u8  rejectcause;
+-			actcapi_ncpi ncpi __attribute__ ((packed));
+-		} connect_b3_resp;
++			actcapi_ncpi ncpi;
++		} __attribute__ ((packed)) connect_b3_resp;
+ 		struct disconnect_req {
+ 			__u16 plci;
+ 			__u8  cause;
+@@ -241,14 +241,14 @@ typedef struct actcapi_msg {
+ 		struct connect_b3_active_ind {
+ 			__u16 ncci;
+ 			actcapi_ncpi ncpi;
+-		} connect_b3_active_ind;
++		} __attribute__ ((packed)) connect_b3_active_ind;
+ 		struct connect_b3_active_resp {
+ 			__u16 ncci;
+ 		} connect_b3_active_resp;
+ 		struct disconnect_b3_req {
+ 			__u16 ncci;
+ 			actcapi_ncpi ncpi;
+-		} disconnect_b3_req;
++		} __attribute__ ((packed)) disconnect_b3_req;
+ 		struct disconnect_b3_conf {
+ 			__u16 ncci;
+ 			__u16 info;
+@@ -257,7 +257,7 @@ typedef struct actcapi_msg {
+ 			__u16 ncci;
+ 			__u16 info;
+ 			actcapi_ncpi ncpi;
+-		} disconnect_b3_ind;
++		} __attribute__ ((packed)) disconnect_b3_ind;
+ 		struct disconnect_b3_resp {
+ 			__u16 ncci;
+ 		} disconnect_b3_resp;
+@@ -265,7 +265,7 @@ typedef struct actcapi_msg {
+ 			__u16 plci;
+ 			actcapi_infonr nr;
+ 			actcapi_infoel el;
+-		} info_ind;
++		} __attribute__ ((packed)) info_ind;
+ 		struct info_resp {
+ 			__u16 plci;
+ 		} info_resp;
+@@ -279,8 +279,8 @@ typedef struct actcapi_msg {
+ 		struct select_b2_protocol_req {
+ 			__u16 plci;
+ 			__u8  protocol;
+-			actcapi_dlpd dlpd __attribute__ ((packed));
+-		} select_b2_protocol_req;
++			actcapi_dlpd dlpd;
++		} __attribute__ ((packed)) select_b2_protocol_req;
+ 		struct select_b2_protocol_conf {
+ 			__u16 plci;
+ 			__u16 info;
+@@ -288,47 +288,47 @@ typedef struct actcapi_msg {
+ 		struct select_b3_protocol_req {
+ 			__u16 plci;
+ 			__u8  protocol;
+-			actcapi_ncpd ncpd __attribute__ ((packed));
+-		} select_b3_protocol_req;
++			actcapi_ncpd ncpd;
++		} __attribute__ ((packed)) select_b3_protocol_req;
+ 		struct select_b3_protocol_conf {
+ 			__u16 plci;
+ 			__u16 info;
+ 		} select_b3_protocol_conf;
+ 		struct listen_req {
+ 			__u8  controller;
+-			__u32 infomask __attribute__ ((packed));  
+-			__u16 eazmask __attribute__ ((packed));
+-			__u16 simask __attribute__ ((packed));
+-		} listen_req;
++			__u32 infomask;
++			__u16 eazmask;
++			__u16 simask;
++		} __attribute__ ((packed)) listen_req;
+ 		struct listen_conf {
+ 			__u8  controller;
+-			__u16 info __attribute__ ((packed));
+-		} listen_conf;
++			__u16 info;
++		} __attribute__ ((packed)) listen_conf;
+ 		struct data_b3_req {
+ 			__u16 fakencci;
+ 			__u16 datalen;
+ 			__u32 unused;
+ 			__u8  blocknr;
+-			__u16 flags __attribute__ ((packed));
+-		} data_b3_req;
++			__u16 flags;
++		} __attribute ((packed)) data_b3_req;
+ 		struct data_b3_ind {
+ 			__u16 fakencci;
+ 			__u16 datalen;
+ 			__u32 unused;
+ 			__u8  blocknr;
+-			__u16 flags __attribute__ ((packed));
+-		} data_b3_ind;
++			__u16 flags;
++		} __attribute__ ((packed)) data_b3_ind;
+ 		struct data_b3_resp {
+ 			__u16 ncci;
+ 			__u8  blocknr;
+-		} data_b3_resp;
++		} __attribute__ ((packed)) data_b3_resp;
+ 		struct data_b3_conf {
+ 			__u16 ncci;
+ 			__u8  blocknr;
+-			__u16 info __attribute__ ((packed));
+-		} data_b3_conf;
++			__u16 info;
++		} __attribute__ ((packed)) data_b3_conf;
+ 	} msg;
+-} actcapi_msg;
++} __attribute__ ((packed)) actcapi_msg;
+ 
+ extern __inline__ unsigned short
+ actcapi_nextsmsg(act2000_card *card)
+
+

linux-2.6-ub.patch:
 drivers/block/ub.c                                            |  482 +++++++---
 linux-2.6.14-1.1674_FC5-ub/drivers/block/Kconfig              |    3 
 linux-2.6.14-1.1674_FC5-ub/drivers/block/ub.c                 |   23 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Kconfig        |   14 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Makefile       |    4 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/libusual.c     |  266 +++++
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/protocol.h     |   14 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/transport.h    |   31 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/unusual_devs.h |   24 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.c          |  123 --
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.h          |   31 
 linux-2.6.14-1.1674_FC5-ub/include/linux/usb_usual.h          |  123 ++
 linux-2.6.14/drivers/usb/Makefile                             |    1 
 13 files changed, 828 insertions(+), 311 deletions(-)

Index: linux-2.6-ub.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-ub.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-ub.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-ub.patch	9 Jan 2006 20:42:13 -0000	1.3
@@ -1633,3 +1633,253 @@
  			cmd->state = UB_CMDST_DONE;
  			ub_cmdtr_state(sc, cmd);
 
+
+On Fri, 9 Dec 2005 13:55:21 -0500, Dave Jones <davej at redhat.com> wrote:
+
+>  > > [311578.273186] BUG: spinlock bad magic on CPU#1, pdflush/30788 (Not tainted)
+>[...]
+>  > > [311578.499972] RIP: 0010:[<ffffffff8021f8bd>] <ffffffff8021f8bd>{spin_bug+138}
+>  > > [311578.798449] Call Trace:<ffffffff8021fbdb>{_raw_spin_lock+25} <ffffffff802174a4>{cfq_exit_single_io_context+85}
+>  > > [311578.828782]        <ffffffff80217527>{cfq_exit_io_context+33} <ffffffff8020d07d>{exit_io_context+137}
+>  > > [311578.856762]        <ffffffff8013f937>{do_exit+183} <ffffffff80152c90>{keventd_create_kthread+0}
+>  > > [311578.883192]        <ffffffff80110c25>{child_rip+15} <ffffffff80152c90>{keventd_create_kthread+0}
+>  > > [311578.909852]        <ffffffff80152d86>{kthread+0} <ffffffff80110c16>{child_rip+0}
+
+> Hmm, I may have also been experimenting at the time with Pete Zaitcev's
+> ub driver. Pete, could ub have been doing something bad here?
+
+Yes, this is ub's fault. I thought that blk_cleanup_queue frees the queue,
+but this is not the case. In recent kernels, it only decrements its refcount.
+If CFQ is around, it keeps the queue pinned and uses the queue's spinlock.
+But when ub calls blk_init_queue(), it passes a spinlock located in its data
+structure (ub_dev), which corresponds to a device. The ub_dev is refcounted
+and freed when the device is disconnected or closed. As you can see, this
+leaves the queue's spinlock pointer dangling.
+
+The code was taken from Carmel, and it used to work fine for a long time.
+I suspect now that Carmel is vulnerable, if it's hot-removed while open.
+Maybe Jeff wants to look into it.
+
+The usb-storage is immune to this problem, because SCSI passes NULL to
+blk_init_queue.
+
+Schedulers other than CFQ use their own spinlocks, so they do not hit
+this problem.
+
+The attached patch works around this issue by using spinlocks which are
+static to the ub module. Thus, it places ub into the same group as floppy.
+This is not ideal, in case someone manages to remove the module yet have
+queues remaining... But I am reluctant to copy what scsi_request_fn is
+doing. After all, ub is supposed to be simpler.
+
+Any comments before I send this to Greg?
+
+With Christmas cheers,
+-- Pete
+
+--- linux-2.6.15-rc6-git4-gregkh/drivers/block/ub.c	2005-12-28 13:40:36.000000000 -0800
++++ linux-2.6.15-rc7-lem/drivers/block/ub.c	2005-12-26 15:02:35.000000000 -0800
+@@ -355,7 +355,7 @@ struct ub_lun {
+  * The USB device instance.
+  */
+ struct ub_dev {
+-	spinlock_t lock;
++	spinlock_t *lock;
+ 	atomic_t poison;		/* The USB device is disconnected */
+ 	int openc;			/* protected by ub_lock! */
+ 					/* kref is too implicit for our taste */
+@@ -452,6 +452,10 @@ MODULE_DEVICE_TABLE(usb, ub_usb_ids);
+ #define UB_MAX_HOSTS  26
+ static char ub_hostv[UB_MAX_HOSTS];
+ 
++#define UB_QLOCK_NUM 5
++static spinlock_t ub_qlockv[UB_QLOCK_NUM];
++static int ub_qlock_next = 0;
++
+ static DEFINE_SPINLOCK(ub_lock);	/* Locks globals and ->openc */
+ 
+ /*
+@@ -531,7 +535,7 @@ static ssize_t ub_diag_show(struct devic
+ 		return 0;
+ 
+ 	cnt = 0;
+-	spin_lock_irqsave(&sc->lock, flags);
++	spin_lock_irqsave(sc->lock, flags);
+ 
+ 	cnt += sprintf(page + cnt,
+ 	    "poison %d reset %d\n",
+@@ -579,7 +583,7 @@ static ssize_t ub_diag_show(struct devic
+ 		if (++nc == SCMD_TRACE_SZ) nc = 0;
+ 	}
+ 
+-	spin_unlock_irqrestore(&sc->lock, flags);
++	spin_unlock_irqrestore(sc->lock, flags);
+ 	return cnt;
+ }
+ 
+@@ -627,6 +631,24 @@ static void ub_id_put(int id)
+ }
+ 
+ /*
++ * This is necessitated by the fact that blk_cleanup_queue does not
++ * necesserily destroy the queue. Instead, it may merely decrease q->refcnt.
++ * Since our blk_init_queue() passes a spinlock common with ub_dev,
++ * we have life time issues when ub_cleanup frees ub_dev.
++ */
++static spinlock_t *ub_next_lock(void)
++{
++	unsigned long flags;
++	spinlock_t *ret;
++
++	spin_lock_irqsave(&ub_lock, flags);
++	ret = &ub_qlockv[ub_qlock_next];
++	ub_qlock_next = (ub_qlock_next + 1) % UB_QLOCK_NUM;
++	spin_unlock_irqrestore(&ub_lock, flags);
++	return ret;
++}
++
++/*
+  * Downcount for deallocation. This rides on two assumptions:
+  *  - once something is poisoned, its refcount cannot grow
+  *  - opens cannot happen at this time (del_gendisk was done)
+@@ -1083,9 +1105,9 @@ static void ub_urb_timeout(unsigned long
+ 	struct ub_dev *sc = (struct ub_dev *) arg;
+ 	unsigned long flags;
+ 
+-	spin_lock_irqsave(&sc->lock, flags);
++	spin_lock_irqsave(sc->lock, flags);
+ 	usb_unlink_urb(&sc->work_urb);
+-	spin_unlock_irqrestore(&sc->lock, flags);
++	spin_unlock_irqrestore(sc->lock, flags);
+ }
+ 
+ /*
+@@ -1108,10 +1130,10 @@ static void ub_scsi_action(unsigned long
+ 	struct ub_dev *sc = (struct ub_dev *) _dev;
+ 	unsigned long flags;
+ 
+-	spin_lock_irqsave(&sc->lock, flags);
++	spin_lock_irqsave(sc->lock, flags);
+ 	del_timer(&sc->work_timer);
+ 	ub_scsi_dispatch(sc);
+-	spin_unlock_irqrestore(&sc->lock, flags);
++	spin_unlock_irqrestore(sc->lock, flags);
+ }
+ 
+ static void ub_scsi_dispatch(struct ub_dev *sc)
+@@ -1754,7 +1776,7 @@ static void ub_reset_task(void *arg)
+ 	 * queues of resets or anything. We do need a spinlock though,
+ 	 * to interact with block layer.
+ 	 */
+-	spin_lock_irqsave(&sc->lock, flags);
++	spin_lock_irqsave(sc->lock, flags);
+ 	sc->reset = 0;
+ 	tasklet_schedule(&sc->tasklet);
+ 	list_for_each(p, &sc->luns) {
+@@ -1762,7 +1784,7 @@ static void ub_reset_task(void *arg)
+ 		blk_start_queue(lun->disk->queue);
+ 	}
+ 	wake_up(&sc->reset_wait);
+-	spin_unlock_irqrestore(&sc->lock, flags);
++	spin_unlock_irqrestore(sc->lock, flags);
+ }
+ 
+ /*
+@@ -1990,11 +2012,11 @@ static int ub_sync_tur(struct ub_dev *sc
+ 	cmd->done = ub_probe_done;
+ 	cmd->back = &compl;
+ 
+-	spin_lock_irqsave(&sc->lock, flags);
++	spin_lock_irqsave(sc->lock, flags);
+ 	cmd->tag = sc->tagcnt++;
+ 
+ 	rc = ub_submit_scsi(sc, cmd);
+-	spin_unlock_irqrestore(&sc->lock, flags);
++	spin_unlock_irqrestore(sc->lock, flags);
+ 
+ 	if (rc != 0) {
+ 		printk("ub: testing ready: submit error (%d)\n", rc); /* P3 */
+@@ -2052,11 +2074,11 @@ static int ub_sync_read_cap(struct ub_de
+ 	cmd->done = ub_probe_done;
+ 	cmd->back = &compl;
+ 
+-	spin_lock_irqsave(&sc->lock, flags);
++	spin_lock_irqsave(sc->lock, flags);
+ 	cmd->tag = sc->tagcnt++;
+ 
+ 	rc = ub_submit_scsi(sc, cmd);
+-	spin_unlock_irqrestore(&sc->lock, flags);
++	spin_unlock_irqrestore(sc->lock, flags);
+ 
+ 	if (rc != 0) {
+ 		printk("ub: reading capacity: submit error (%d)\n", rc); /* P3 */
+@@ -2333,7 +2355,7 @@ static int ub_probe(struct usb_interface
+ 	if ((sc = kmalloc(sizeof(struct ub_dev), GFP_KERNEL)) == NULL)
+ 		goto err_core;
+ 	memset(sc, 0, sizeof(struct ub_dev));
+-	spin_lock_init(&sc->lock);
++	sc->lock = ub_next_lock();
+ 	INIT_LIST_HEAD(&sc->luns);
+ 	usb_init_urb(&sc->work_urb);
+ 	tasklet_init(&sc->tasklet, ub_scsi_action, (unsigned long)sc);
+@@ -2483,7 +2505,7 @@ static int ub_probe_lun(struct ub_dev *s
+ 	disk->driverfs_dev = &sc->intf->dev;
+ 
+ 	rc = -ENOMEM;
+-	if ((q = blk_init_queue(ub_request_fn, &sc->lock)) == NULL)
++	if ((q = blk_init_queue(ub_request_fn, sc->lock)) == NULL)
+ 		goto err_blkqinit;
+ 
+ 	disk->queue = q;
+@@ -2554,7 +2576,7 @@ static void ub_disconnect(struct usb_int
+ 	 * and the whole queue drains. So, we just use this code to
+ 	 * print warnings.
+ 	 */
+-	spin_lock_irqsave(&sc->lock, flags);
++	spin_lock_irqsave(sc->lock, flags);
+ 	{
+ 		struct ub_scsi_cmd *cmd;
+ 		int cnt = 0;
+@@ -2571,7 +2593,7 @@ static void ub_disconnect(struct usb_int
+ 			    "%d was queued after shutdown\n", sc->name, cnt);
+ 		}
+ 	}
+-	spin_unlock_irqrestore(&sc->lock, flags);
++	spin_unlock_irqrestore(sc->lock, flags);
+ 
+ 	/*
+ 	 * Unregister the upper layer.
+@@ -2590,19 +2612,15 @@ static void ub_disconnect(struct usb_int
+ 	}
+ 
+ 	/*
+-	 * Taking a lock on a structure which is about to be freed
+-	 * is very nonsensual. Here it is largely a way to do a debug freeze,
+-	 * and a bracket which shows where the nonsensual code segment ends.
+-	 *
+ 	 * Testing for -EINPROGRESS is always a bug, so we are bending
+ 	 * the rules a little.
+ 	 */
+-	spin_lock_irqsave(&sc->lock, flags);
++	spin_lock_irqsave(sc->lock, flags);
+ 	if (sc->work_urb.status == -EINPROGRESS) {	/* janitors: ignore */
+ 		printk(KERN_WARNING "%s: "
+ 		    "URB is active after disconnect\n", sc->name);
+ 	}
+-	spin_unlock_irqrestore(&sc->lock, flags);
++	spin_unlock_irqrestore(sc->lock, flags);
+ 
+ 	/*
+ 	 * There is virtually no chance that other CPU runs times so long
+@@ -2636,6 +2655,10 @@ static struct usb_driver ub_driver = {
+ static int __init ub_init(void)
+ {
+ 	int rc;
++	int i;
++
++	for (i = 0; i < UB_QLOCK_NUM; i++)
++		spin_lock_init(&ub_qlockv[i]);
+ 
+ 	if ((rc = register_blkdev(UB_MAJOR, DRV_NAME)) != 0)
+ 		goto err_regblkdev;
+

linux-2.6-xen-merge.patch:
 arch/i386/Kconfig                              |   76 
 arch/i386/Makefile                             |   18 
 arch/i386/boot-xen/Makefile                    |   24 
 arch/i386/kernel/Makefile                      |   26 
 arch/i386/kernel/acpi/Makefile                 |    4 
 arch/i386/kernel/acpi/boot-xen.c               | 1160 ++++++++++
 arch/i386/kernel/apic-xen.c                    |   89 
 arch/i386/kernel/cpu/Makefile                  |    5 
 arch/i386/kernel/cpu/common-xen.c              |  655 ++++++
 arch/i386/kernel/cpu/cpufreq/Kconfig           |    2 
 arch/i386/kernel/cpu/mtrr/Makefile             |    7 
 arch/i386/kernel/cpu/mtrr/main-xen.c           |  187 +
 arch/i386/kernel/early_printk-xen.c            |    2 
 arch/i386/kernel/entry-xen.S                   |  838 +++++++
 arch/i386/kernel/fixup.c                       |   95 
 arch/i386/kernel/head-xen.S                    |  169 +
 arch/i386/kernel/init_task-xen.c               |   49 
 arch/i386/kernel/io_apic-xen.c                 | 2725 +++++++++++++++++++++++++
 arch/i386/kernel/ioport-xen.c                  |  121 +
 arch/i386/kernel/irq-xen.c                     |  306 ++
 arch/i386/kernel/ldt-xen.c                     |  262 ++
 arch/i386/kernel/microcode-xen.c               |  163 +
 arch/i386/kernel/mpparse-xen.c                 | 1167 ++++++++++
 arch/i386/kernel/pci-dma-xen.c                 |  302 ++
 arch/i386/kernel/process-xen.c                 |  839 +++++++
 arch/i386/kernel/quirks-xen.c                  |   49 
 arch/i386/kernel/setup-xen.c                   | 1868 +++++++++++++++++
 arch/i386/kernel/smp-xen.c                     |  617 +++++
 arch/i386/kernel/smpalts.c                     |   85 
 arch/i386/kernel/smpboot.c                     |   10 
 arch/i386/kernel/swiotlb.c                     |  671 ++++++
 arch/i386/kernel/time-xen.c                    |  942 ++++++++
 arch/i386/kernel/traps-xen.c                   | 1063 +++++++++
 arch/i386/kernel/vmlinux.lds.S                 |    7 
 arch/i386/kernel/vsyscall-note-xen.S           |   32 
 arch/i386/mach-xen/Makefile                    |    7 
 arch/i386/mach-xen/setup.c                     |   37 
 arch/i386/mm/Makefile                          |    8 
 arch/i386/mm/fault-xen.c                       |  628 +++++
 arch/i386/mm/highmem-xen.c                     |  123 +
 arch/i386/mm/hypervisor.c                      |  459 ++++
 arch/i386/mm/init-xen.c                        |  833 +++++++
 arch/i386/mm/ioremap-xen.c                     |  493 ++++
 arch/i386/mm/pgtable-xen.c                     |  597 +++++
 arch/i386/pci/Makefile                         |    5 
 arch/i386/pci/i386-xen.c                       |  295 ++
 arch/i386/pci/irq-xen.c                        | 1193 ++++++++++
 arch/i386/power/Makefile                       |    4 
 arch/um/kernel/physmem.c                       |    4 
 arch/x86_64/Kconfig                            |   40 
 arch/x86_64/Makefile                           |   16 
 arch/x86_64/ia32/Makefile                      |   18 
 arch/x86_64/ia32/ia32entry-xen.S               |  676 ++++++
 arch/x86_64/ia32/syscall32-xen.c               |  128 +
 arch/x86_64/ia32/syscall32_syscall-xen.S       |   28 
 arch/x86_64/ia32/vsyscall-int80.S              |   57 
 arch/x86_64/ia32/vsyscall-sigreturn.S          |    2 
 arch/x86_64/kernel/Makefile                    |   21 
 arch/x86_64/kernel/acpi/Makefile               |    2 
 arch/x86_64/kernel/apic-xen.c                  |  198 +
 arch/x86_64/kernel/e820-xen.c                  |  721 ++++++
 arch/x86_64/kernel/early_printk-xen.c          |  308 ++
 arch/x86_64/kernel/entry-xen.S                 | 1135 ++++++++++
 arch/x86_64/kernel/genapic-xen.c               |  135 +
 arch/x86_64/kernel/genapic_xen.c               |  162 +
 arch/x86_64/kernel/head-xen.S                  |  292 ++
 arch/x86_64/kernel/head64-xen.c                |  127 +
 arch/x86_64/kernel/io_apic-xen.c               | 2115 +++++++++++++++++++
 arch/x86_64/kernel/ioport-xen.c                |   57 
 arch/x86_64/kernel/irq-xen.c                   |  158 +
 arch/x86_64/kernel/ldt-xen.c                   |  273 ++
 arch/x86_64/kernel/mpparse-xen.c               | 1000 +++++++++
 arch/x86_64/kernel/pci-dma.c                   |    4 
 arch/x86_64/kernel/pci-gart.c                  |   11 
 arch/x86_64/kernel/pci-nommu-xen.c             |   95 
 arch/x86_64/kernel/process-xen.c               |  775 +++++++
 arch/x86_64/kernel/setup-xen.c                 | 1548 ++++++++++++++
 arch/x86_64/kernel/setup64-xen.c               |  349 +++
 arch/x86_64/kernel/signal-xen.c                |  513 ++++
 arch/x86_64/kernel/smp-xen.c                   |  590 +++++
 arch/x86_64/kernel/traps-xen.c                 |  967 ++++++++
 arch/x86_64/kernel/vsyscall-xen.c              |  241 ++
 arch/x86_64/kernel/x8664_ksyms-xen.c           |  204 +
 arch/x86_64/kernel/xen_entry.S                 |   41 
 arch/x86_64/mm/Makefile                        |   10 
 arch/x86_64/mm/fault-xen.c                     |  594 +++++
 arch/x86_64/mm/init-xen.c                      |  974 ++++++++
 arch/x86_64/mm/pageattr-xen.c                  |  380 +++
 arch/x86_64/pci/Makefile                       |    8 
 drivers/Kconfig                                |   11 
 drivers/Makefile                               |    1 
 drivers/acpi/Kconfig                           |    2 
 drivers/acpi/tables.c                          |    7 
 drivers/char/mem.c                             |    6 
 drivers/char/tpm/Kconfig                       |   14 
 drivers/char/tpm/Makefile                      |    1 
 drivers/char/tpm/tpm.c                         |   48 
 drivers/char/tpm/tpm.h                         |   13 
 drivers/char/tpm/tpm_atmel.c                   |  102 
 drivers/char/tpm/tpm_nsc.c                     |  149 -
 drivers/char/tpm/tpm_xen.c                     |  525 ++++
 drivers/char/tty_io.c                          |    7 
 drivers/firmware/Kconfig                       |    2 
 drivers/ide/legacy/hd.c                        |    2 
 drivers/pci/Kconfig                            |    1 
 drivers/video/fbmon.c                          |    2 
 drivers/xen/Kconfig                            |  175 +
 drivers/xen/Makefile                           |   20 
 drivers/xen/balloon/Makefile                   |    2 
 drivers/xen/balloon/balloon.c                  |  565 +++++
 drivers/xen/blkback/Makefile                   |    2 
 drivers/xen/blkback/blkback.c                  |  590 +++++
 drivers/xen/blkback/common.h                   |  131 +
 drivers/xen/blkback/interface.c                |  164 +
 drivers/xen/blkback/vbd.c                      |  103 
 drivers/xen/blkback/xenbus.c                   |  425 +++
 drivers/xen/blkfront/Kconfig                   |    6 
 drivers/xen/blkfront/Makefile                  |    5 
 drivers/xen/blkfront/blkfront.c                |  842 +++++++
 drivers/xen/blkfront/block.h                   |  166 +
 drivers/xen/blkfront/vbd.c                     |  323 ++
 drivers/xen/blktap/Makefile                    |    3 
 drivers/xen/blktap/blktap.c                    |  910 ++++++++
 drivers/xen/blktap/common.h                    |  118 +
 drivers/xen/blktap/interface.c                 |  146 +
 drivers/xen/blktap/xenbus.c                    |  234 ++
 drivers/xen/char/Makefile                      |    2 
 drivers/xen/char/mem.c                         |  157 +
 drivers/xen/console/Makefile                   |    2 
 drivers/xen/console/console.c                  |  688 ++++++
 drivers/xen/console/xencons_ring.c             |  125 +
 drivers/xen/core/Makefile                      |    9 
 drivers/xen/core/evtchn.c                      |  820 +++++++
 drivers/xen/core/gnttab.c                      |  480 ++++
 drivers/xen/core/reboot.c                      |  436 ++++
 drivers/xen/core/skbuff.c                      |  143 +
 drivers/xen/core/smpboot.c                     |  439 ++++
 drivers/xen/core/xen_proc.c                    |   29 
 drivers/xen/evtchn/Makefile                    |    2 
 drivers/xen/evtchn/evtchn.c                    |  459 ++++
 drivers/xen/net_driver_util.c                  |   67 
 drivers/xen/netback/Makefile                   |    2 
 drivers/xen/netback/common.h                   |  118 +
 drivers/xen/netback/interface.c                |  320 ++
 drivers/xen/netback/loopback.c                 |  189 +
 drivers/xen/netback/netback.c                  |  824 +++++++
 drivers/xen/netback/xenbus.c                   |  327 +++
 drivers/xen/netfront/Kconfig                   |    6 
 drivers/xen/netfront/Makefile                  |    4 
 drivers/xen/netfront/netfront.c                | 1492 +++++++++++++
 drivers/xen/privcmd/Makefile                   |    2 
 drivers/xen/privcmd/privcmd.c                  |  274 ++
 drivers/xen/tpmback/Makefile                   |    4 
 drivers/xen/tpmback/common.h                   |  102 
 drivers/xen/tpmback/interface.c                |  200 +
 drivers/xen/tpmback/tpmback.c                  | 1109 ++++++++++
 drivers/xen/tpmback/xenbus.c                   |  329 +++
 drivers/xen/tpmfront/Makefile                  |    2 
 drivers/xen/tpmfront/tpmfront.c                |  732 ++++++
 drivers/xen/tpmfront/tpmfront.h                |   48 
 drivers/xen/util.c                             |   75 
 drivers/xen/xenbus/Makefile                    |    8 
 drivers/xen/xenbus/xenbus_client.c             |  243 ++
 drivers/xen/xenbus/xenbus_comms.c              |  203 +
 drivers/xen/xenbus/xenbus_comms.h              |   50 
 drivers/xen/xenbus/xenbus_dev.c                |  241 ++
 drivers/xen/xenbus/xenbus_probe.c              | 1014 +++++++++
 drivers/xen/xenbus/xenbus_xs.c                 |  823 +++++++
 fs/Kconfig                                     |    1 
 include/asm-i386/agp.h                         |   15 
 include/asm-i386/atomic.h                      |    7 
 include/asm-i386/bitops.h                      |   19 
 include/asm-i386/desc.h                        |   57 
 include/asm-i386/dma-mapping.h                 |   97 
 include/asm-i386/fixmap.h                      |   20 
 include/asm-i386/floppy.h                      |   43 
 include/asm-i386/futex.h                       |    4 
 include/asm-i386/highmem.h                     |    5 
 include/asm-i386/hw_irq.h                      |    4 
 include/asm-i386/hypercall.h                   |  319 ++
 include/asm-i386/hypervisor.h                  |  180 +
 include/asm-i386/io.h                          |   39 
 include/asm-i386/kmap_types.h                  |    3 
 include/asm-i386/mach-default/mach_dma_map.h   |   80 
 include/asm-i386/mach-default/mach_fixmap.h    |   15 
 include/asm-i386/mach-default/mach_io.h        |   35 
 include/asm-i386/mach-default/mach_mmu.h       |   18 
 include/asm-i386/mach-default/mach_mode.h      |    7 
 include/asm-i386/mach-default/mach_page.h      |   28 
 include/asm-i386/mach-default/mach_pgtable.h   |   45 
 include/asm-i386/mach-default/mach_processor.h |   53 
 include/asm-i386/mach-default/mach_seg.h       |   25 
 include/asm-i386/mach-default/mach_setup.h     |   50 
 include/asm-i386/mach-default/mach_system.h    |   74 
 include/asm-i386/mach-default/mach_tlbflush.h  |   59 
 include/asm-i386/mach-xen/irq_vectors.h        |  125 +
 include/asm-i386/mach-xen/mach_dma_map.h       |   47 
 include/asm-i386/mach-xen/mach_fixmap.h        |   15 
 include/asm-i386/mach-xen/mach_io.h            |   50 
 include/asm-i386/mach-xen/mach_mmu.h           |   48 
 include/asm-i386/mach-xen/mach_mode.h          |    7 
 include/asm-i386/mach-xen/mach_page.h          |  154 +
 include/asm-i386/mach-xen/mach_pgtable.h       |  154 +
 include/asm-i386/mach-xen/mach_processor.h     |   61 
 include/asm-i386/mach-xen/mach_seg.h           |    9 
 include/asm-i386/mach-xen/mach_setup.h         |   11 
 include/asm-i386/mach-xen/mach_system.h        |  138 +
 include/asm-i386/mach-xen/mach_tlbflush.h      |   10 
 include/asm-i386/mach-xen/setup_arch_post.h    |   40 
 include/asm-i386/mach-xen/setup_arch_pre.h     |    5 
 include/asm-i386/mmu.h                         |    6 
 include/asm-i386/mmu_context.h                 |   17 
 include/asm-i386/page.h                        |   14 
 include/asm-i386/pci.h                         |   31 
 include/asm-i386/pgalloc.h                     |   31 
 include/asm-i386/pgtable-2level.h              |   12 
 include/asm-i386/pgtable-3level.h              |   35 
 include/asm-i386/pgtable.h                     |   22 
 include/asm-i386/processor.h                   |   48 
 include/asm-i386/ptrace.h                      |    5 
 include/asm-i386/rwsem.h                       |   17 
 include/asm-i386/scatterlist.h                 |    9 
 include/asm-i386/segment.h                     |   27 
 include/asm-i386/setup.h                       |   45 
 include/asm-i386/smp.h                         |    5 
 include/asm-i386/smp_alt.h                     |   32 
 include/asm-i386/spinlock.h                    |   43 
 include/asm-i386/swiotlb.h                     |   59 
 include/asm-i386/synch_bitops.h                |  142 +
 include/asm-i386/system.h                      |  125 -
 include/asm-i386/tlbflush.h                    |   55 
 include/asm-i386/vga.h                         |    2 
 include/asm-um/page.h                          |    2 
 include/asm-x86_64/arch_hooks.h                |   31 
 include/asm-x86_64/bootsetup.h                 |   10 
 include/asm-x86_64/desc.h                      |   40 
 include/asm-x86_64/dma-mapping.h               |  106 
 include/asm-x86_64/fixmap.h                    |   21 
 include/asm-x86_64/floppy.h                    |   45 
 include/asm-x86_64/hw_irq.h                    |   14 
 include/asm-x86_64/hypercall.h                 |  320 ++
 include/asm-x86_64/hypervisor.h                |    2 
 include/asm-x86_64/io.h                        |   47 
 include/asm-x86_64/ipi.h                       |    8 
 include/asm-x86_64/irq.h                       |   39 
 include/asm-x86_64/mach-xen/asm/page.h         |  257 ++
 include/asm-x86_64/mach-xen/asm/param.h        |   23 
 include/asm-x86_64/mach-xen/asm/pci.h          |  177 +
 include/asm-x86_64/mach-xen/asm/pgalloc.h      |  198 +
 include/asm-x86_64/mach-xen/asm/pgtable.h      |  590 +++++
 include/asm-x86_64/mach-xen/asm/processor.h    |  505 ++++
 include/asm-x86_64/mach-xen/asm/ptrace.h       |  125 +
 include/asm-x86_64/mach-xen/asm/segment.h      |   46 
 include/asm-x86_64/mach-xen/asm/smp.h          |  150 +
 include/asm-x86_64/mach-xen/asm/system.h       |  411 +++
 include/asm-x86_64/mach-xen/asm/timer.h        |   67 
 include/asm-x86_64/mach-xen/asm/tlbflush.h     |  104 
 include/asm-x86_64/mach-xen/asm/vga.h          |   20 
 include/asm-x86_64/mach-xen/asm/xor.h          |  328 +++
 include/asm-x86_64/mach-xen/mach_time.h        |  122 +
 include/asm-x86_64/mach-xen/mach_timer.h       |   48 
 include/asm-x86_64/mach-xen/setup_arch_post.h  |   47 
 include/asm-x86_64/mach-xen/setup_arch_pre.h   |    5 
 include/asm-x86_64/mmu.h                       |   13 
 include/asm-x86_64/mmu_context.h               |  102 
 include/asm-x86_64/swiotlb.h                   |   18 
 include/asm-x86_64/synch_bitops.h              |    1 
 include/linux/gfp.h                            |    6 
 include/linux/highmem.h                        |    6 
 include/linux/irq.h                            |    3 
 include/linux/mm.h                             |   10 
 include/linux/skbuff.h                         |   13 
 include/xen/balloon.h                          |   70 
 include/xen/driver_util.h                      |   26 
 include/xen/evtchn.h                           |  123 +
 include/xen/foreign_page.h                     |   40 
 include/xen/gnttab.h                           |   98 
 include/xen/interface/acm.h                    |  181 +
 include/xen/interface/acm_ops.h                |   96 
 include/xen/interface/arch-ia64.h              |  279 ++
 include/xen/interface/arch-x86_32.h            |  152 +
 include/xen/interface/arch-x86_64.h            |  221 ++
 include/xen/interface/dom0_ops.h               |  482 ++++
 include/xen/interface/event_channel.h          |  203 +
 include/xen/interface/grant_table.h            |  306 ++
 include/xen/interface/hvm/hvm_info_table.h     |   24 
 include/xen/interface/hvm/ioreq.h              |   90 
 include/xen/interface/hvm/vmx_assist.h         |   97 
 include/xen/interface/io/blkif.h               |   85 
 include/xen/interface/io/console.h             |   33 
 include/xen/interface/io/netif.h               |   76 
 include/xen/interface/io/ring.h                |  270 ++
 include/xen/interface/io/tpmif.h               |   56 
 include/xen/interface/io/vmx_vlapic.h          |   58 
 include/xen/interface/io/vmx_vpic.h            |   85 
 include/xen/interface/io/xenbus.h              |   44 
 include/xen/interface/io/xs_wire.h             |   97 
 include/xen/interface/memory.h                 |  101 
 include/xen/interface/physdev.h                |   70 
 include/xen/interface/sched.h                  |   60 
 include/xen/interface/sched_ctl.h              |   68 
 include/xen/interface/trace.h                  |   90 
 include/xen/interface/vcpu.h                   |   64 
 include/xen/interface/version.h                |   52 
 include/xen/interface/xen.h                    |  441 ++++
 include/xen/net_driver_util.h                  |   56 
 include/xen/public/evtchn.h                    |   98 
 include/xen/public/privcmd.h                   |   91 
 include/xen/public/xenstored.h                 |   89 
 include/xen/tpmfe.h                            |   33 
 include/xen/xen_proc.h                         |   23 
 include/xen/xenbus.h                           |  252 ++
 include/xen/xencons.h                          |   14 
 kernel/Kconfig.preempt                         |    1 
 kernel/irq/manage.c                            |   84 
 lib/Kconfig.debug                              |    2 
 lib/Makefile                                   |    2 
 mm/Kconfig                                     |    3 
 mm/highmem.c                                   |   11 
 mm/memory.c                                    |  118 +
 mm/mmap.c                                      |    4 
 mm/page_alloc.c                                |    6 
 net/core/dev.c                                 |   50 
 net/core/skbuff.c                              |   41 
 scripts/Makefile.xen                           |   14 
 325 files changed, 64267 insertions(+), 717 deletions(-)

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.2 -r 1.3 linux-2.6-xen-merge.patch
Index: linux-2.6-xen-merge.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-xen-merge.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-xen-merge.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-xen-merge.patch	9 Jan 2006 20:42:13 -0000	1.3
@@ -1,1335 +1,1077 @@
-diff -r 87ac3e73eed6 -r 941223fe6f81 arch/i386/Kconfig
---- a/arch/i386/Kconfig	Mon Dec  5 00:09:38 2005 +0800
-+++ b/arch/i386/Kconfig	Tue Dec 13 11:17:14 2005 -0500
-@@ -57,6 +57,14 @@
- 	bool "PC-compatible"
- 	help
- 	  Choose this option if your computer is a standard PC or compatible.
-+
-+config X86_XEN
-+	bool "Xen-compatible"
-+	select X86_UP_APIC if !SMP && XEN_PRIVILEGED_GUEST
-+	select X86_UP_IOAPIC if !SMP && XEN_PRIVILEGED_GUEST
-+	help
-+	  Choose this option is you plan to run this kernel on top of Xen
-+	  Hypervisor.
- 
- config X86_ELAN
- 	bool "AMD Elan"
-@@ -159,6 +167,7 @@
+--- ./fs/Kconfig.xenmerge	2006-01-06 16:03:15.000000000 -0500
++++ ./fs/Kconfig	2006-01-06 16:04:34.000000000 -0500
+@@ -811,6 +811,7 @@
+ config HUGETLBFS
+ 	bool "HugeTLB file system support"
+ 	depends X86 || IA64 || PPC64 || SPARC64 || SUPERH || BROKEN
++	depends !XEN
  
- config HPET_TIMER
- 	bool "HPET Timer Support"
-+	depends on !X86_XEN
- 	help
- 	  This enables the use of the HPET for the kernel's internal timer.
- 	  HPET is the next generation timer replacing legacy 8254s.
-@@ -202,6 +211,19 @@
+ config HUGETLB_PAGE
+ 	def_bool HUGETLBFS
+--- ./drivers/char/mem.c.xenmerge	2006-01-06 16:03:14.000000000 -0500
++++ ./drivers/char/mem.c	2006-01-06 16:04:32.000000000 -0500
+@@ -103,6 +103,7 @@
+ }
+ #endif
  
- 	  If you don't know what to do here, say N.
++#ifndef ARCH_HAS_DEV_MEM
+ /*
+  * This funcion reads the *physical* memory. The f_pos points directly to the 
+  * memory location. 
+@@ -227,6 +228,7 @@
+ 	*ppos += written;
+ 	return written;
+ }
++#endif
  
-+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
-@@ -218,7 +240,7 @@
+ static int mmap_mem(struct file * file, struct vm_area_struct * vma)
+ {
+@@ -758,6 +760,7 @@
+ #define open_kmem	open_mem
+ #define open_oldmem	open_mem
  
- config SCHED_SMT
- 	bool "SMT (Hyperthreading) scheduler support"
--	depends on SMP
-+	depends on SMP && !X86_XEN
- 	default off
- 	help
- 	  SMT scheduler support improves the CPU scheduler's decision making
-@@ -230,7 +252,7 @@
++#ifndef ARCH_HAS_DEV_MEM
+ static struct file_operations mem_fops = {
+ 	.llseek		= memory_lseek,
+ 	.read		= read_mem,
+@@ -765,6 +768,9 @@
+ 	.mmap		= mmap_mem,
+ 	.open		= open_mem,
+ };
++#else
++extern struct file_operations mem_fops;
++#endif
  
- config X86_UP_APIC
- 	bool "Local APIC support on uniprocessors"
--	depends on !SMP && !(X86_VISWS || X86_VOYAGER)
-+	depends on !SMP && !(X86_VISWS || X86_VOYAGER || XEN_UNPRIVILEGED_GUEST)
- 	help
- 	  A local APIC (Advanced Programmable Interrupt Controller) is an
- 	  integrated interrupt controller in the CPU. If you have a single-CPU
-@@ -255,22 +277,27 @@
+ static struct file_operations kmem_fops = {
+ 	.llseek		= memory_lseek,
+--- ./drivers/char/tpm/tpm_nsc.c.xenmerge	2006-01-06 16:03:14.000000000 -0500
++++ ./drivers/char/tpm/tpm_nsc.c	2006-01-06 16:04:32.000000000 -0500
+@@ -19,7 +19,6 @@
+  * 
+  */
  
- config X86_LOCAL_APIC
- 	bool
--	depends on X86_UP_APIC || ((X86_VISWS || SMP) && !X86_VOYAGER)
-+	depends on X86_UP_APIC || ((X86_VISWS || SMP) && !(X86_VOYAGER || XEN_UNPRIVILEGED_GUEST))
- 	default y
+-#include <linux/platform_device.h>
+ #include "tpm.h"
  
- config X86_IO_APIC
- 	bool
--	depends on X86_UP_IOAPIC || (SMP && !(X86_VISWS || X86_VOYAGER))
-+	depends on X86_UP_IOAPIC || (SMP && !(X86_VISWS || X86_VOYAGER || XEN_UNPRIVILEGED_GUEST))
- 	default y
+ /* National definitions */
+@@ -245,7 +244,7 @@
+ 	&dev_attr_pcrs.attr,
+ 	&dev_attr_caps.attr,
+ 	&dev_attr_cancel.attr,
+-	NULL,
++	0,
+ };
  
- config X86_VISWS_APIC
- 	bool
- 	depends on X86_VISWS
-+	default y
-+
-+config X86_TSC
-+	bool
-+	depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1) && !X86_NUMAQ && !X86_XEN
- 	default y
+ static struct attribute_group nsc_attr_grp = { .attrs = nsc_attrs };
+@@ -262,93 +261,55 @@
+ 	.miscdev = { .fops = &nsc_ops, },
+ };
  
- config X86_MCE
- 	bool "Machine Check Exception"
--	depends on !X86_VOYAGER
-+	depends on !(X86_VOYAGER || X86_XEN)
- 	---help---
- 	  Machine Check Exception support allows the processor to notify the
- 	  kernel if it detects a problem (e.g. overheating, component failure).
-@@ -360,6 +387,7 @@
+-static struct platform_device *pdev = NULL;
+-
+-static void __devexit tpm_nsc_remove(struct device *dev)
+-{
+-	struct tpm_chip *chip = dev_get_drvdata(dev);
+-	if ( chip ) {
+-		release_region(chip->vendor->base, 2);
+-		tpm_remove_hardware(chip->dev);
+-	}
+-}
+-
+-static struct device_driver nsc_drv = {
+-	.name = "tpm_nsc",
+-	.bus = &platform_bus_type,
+-	.owner = THIS_MODULE,
+-	.suspend = tpm_pm_suspend,
+-	.resume = tpm_pm_resume,
+-};
+-
+-static int __init init_nsc(void)
++static int __devinit tpm_nsc_init(struct pci_dev *pci_dev,
++				  const struct pci_device_id *pci_id)
+ {
+ 	int rc = 0;
+ 	int lo, hi;
+ 	int nscAddrBase = TPM_ADDR;
  
- config MICROCODE
- 	tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support"
-+	depends on !XEN_UNPRIVILEGED_GUEST
- 	---help---
- 	  If you say Y here and also to "/dev file system support" in the
- 	  'File systems' section, you will be able to update the microcode on
-@@ -377,6 +405,7 @@
  
[...125541 lines suppressed...]
-+					const char **, unsigned int));
++#define IOCTL_EVTCHN_BIND_UNBOUND_PORT			\
++	_IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port))
++struct ioctl_evtchn_bind_unbound_port {
++	unsigned int remote_domain;
++};
 +
++/*
++ * Unbind previously allocated @port.
++ */
++#define IOCTL_EVTCHN_UNBIND				\
++	_IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind))
++struct ioctl_evtchn_unbind {
++	unsigned int port;
++};
 +
-+/**
-+ * Advertise in the store a change of the given driver to the given new_state.
-+ * Perform the change inside the given transaction xbt.  xbt may be NULL, in
-+ * which case this is performed inside its own transaction.  Return 0 on
-+ * success, or -errno on error.  On error, the device will switch to
-+ * XenbusStateClosing, and the error will be saved in the store.
++/*
++ * Unbind previously allocated @port.
 + */
-+int xenbus_switch_state(struct xenbus_device *dev,
-+			struct xenbus_transaction *xbt,
-+			XenbusState new_state);
++#define IOCTL_EVTCHN_NOTIFY				\
++	_IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify))
++struct ioctl_evtchn_notify {
++	unsigned int port;
++};
 +
++/* Clear and reinitialise the event buffer. Clear error condition. */
++#define IOCTL_EVTCHN_RESET				\
++	_IOC(_IOC_NONE, 'E', 5, 0)
 +
-+/**
-+ * Grant access to the given ring_mfn to the peer of the given device.  Return
-+ * 0 on success, or -errno on error.  On error, the device will switch to
-+ * XenbusStateClosing, and the error will be saved in the store.
++#endif /* __LINUX_PUBLIC_EVTCHN_H__ */
++
++/*
++ * Local variables:
++ *  c-file-style: "linux"
++ *  indent-tabs-mode: t
++ *  c-indent-level: 8
++ *  c-basic-offset: 8
++ *  tab-width: 8
++ * End:
++ */
+--- /dev/null	2006-01-06 04:48:52.917188312 -0500
++++ ./include/xen/public/privcmd.h	2006-01-06 16:04:35.000000000 -0500
+@@ -0,0 +1,91 @@
++/******************************************************************************
++ * privcmd.h
++ * 
++ * Interface to /proc/xen/privcmd.
++ * 
++ * Copyright (c) 2003-2005, K A Fraser
++ * 
++ * This file may be distributed separately from the Linux kernel, or
++ * incorporated into other software packages, subject to the following license:
++ * 
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this source file (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use, copy, modify,
++ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
++ * and to permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ * 
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ * 
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
 + */
-+int xenbus_grant_ring(struct xenbus_device *dev, unsigned long ring_mfn);
 +
++#ifndef __LINUX_PUBLIC_PRIVCMD_H__
++#define __LINUX_PUBLIC_PRIVCMD_H__
 +
-+/**
-+ * Allocate an event channel for the given xenbus_device, assigning the newly
-+ * created local port to *port.  Return 0 on success, or -errno on error.  On
-+ * error, the device will switch to XenbusStateClosing, and the error will be
-+ * saved in the store.
-+ */
-+int xenbus_alloc_evtchn(struct xenbus_device *dev, int *port);
++#ifndef __user
++#define __user
++#endif
 +
++typedef struct privcmd_hypercall
++{
++	unsigned long op;
++	unsigned long arg[5];
++} privcmd_hypercall_t;
 +
-+/**
-+ * Return the state of the driver rooted at the given store path, or
-+ * XenbusStateClosed if no state can be read.
-+ */
-+XenbusState xenbus_read_driver_state(const char *path);
++typedef struct privcmd_mmap_entry {
++	unsigned long va;
++	unsigned long mfn;
++	unsigned long npages;
++} privcmd_mmap_entry_t; 
 +
++typedef struct privcmd_mmap {
++	int num;
++	domid_t dom; /* target domain */
++	privcmd_mmap_entry_t __user *entry;
++} privcmd_mmap_t; 
 +
-+/***
-+ * Report the given negative errno into the store, along with the given
-+ * formatted message.
-+ */
-+void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt,
-+		      ...);
++typedef struct privcmd_mmapbatch {
++	int num;     /* number of pages to populate */
++	domid_t dom; /* target domain */
++	unsigned long addr;  /* virtual address */
++	unsigned long __user *arr; /* array of mfns - top nibble set on err */
++} privcmd_mmapbatch_t; 
 +
++typedef struct privcmd_blkmsg
++{
++	unsigned long op;
++	void         *buf;
++	int           buf_size;
++} privcmd_blkmsg_t;
 +
-+/***
-+ * Equivalent to xenbus_dev_error(dev, err, fmt, args), followed by
-+ * xenbus_switch_state(dev, NULL, XenbusStateClosing) to schedule an orderly
-+ * closedown of this driver and its peer.
++/*
++ * @cmd: IOCTL_PRIVCMD_HYPERCALL
++ * @arg: &privcmd_hypercall_t
++ * Return: Value returned from execution of the specified hypercall.
 + */
-+void xenbus_dev_fatal(struct xenbus_device *dev, int err, const char *fmt,
-+		      ...);
-+
++#define IOCTL_PRIVCMD_HYPERCALL					\
++	_IOC(_IOC_NONE, 'P', 0, sizeof(privcmd_hypercall_t))
++#define IOCTL_PRIVCMD_MMAP					\
++	_IOC(_IOC_NONE, 'P', 2, sizeof(privcmd_mmap_t))
++#define IOCTL_PRIVCMD_MMAPBATCH					\
++	_IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
 +
-+#endif /* _ASM_XEN_XENBUS_H */
++#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
 +
 +/*
 + * Local variables:
@@ -71842,21 +68431,14 @@
 + *  tab-width: 8
 + * End:
 + */
-diff -r 87ac3e73eed6 -r 941223fe6f81 include/asm-xen/xencons.h
---- /dev/null	Thu Jan  1 00:00:00 1970 +0000
-+++ b/include/asm-xen/xencons.h	Tue Dec 13 11:17:14 2005 -0500
-@@ -0,0 +1,14 @@
-+#ifndef __ASM_XENCONS_H__
-+#define __ASM_XENCONS_H__
-+
-+void xencons_force_flush(void);
-+void xencons_resume(void);
-+
-+/* Interrupt work hooks. Receive data, or kick data out. */
-+void xencons_rx(char *buf, unsigned len, struct pt_regs *regs);
-+void xencons_tx(void);
-+
-+int xencons_ring_init(void);
-+int xencons_ring_send(const char *data, unsigned len);
-+
-+#endif /* __ASM_XENCONS_H__ */
+--- ./include/asm-um/page.h.xenmerge	2006-01-06 16:03:16.000000000 -0500
++++ ./include/asm-um/page.h	2006-01-06 16:04:34.000000000 -0500
+@@ -118,7 +118,7 @@
+ extern struct page *arch_validate(struct page *page, gfp_t mask, int order);
+ #define HAVE_ARCH_VALIDATE
+ 
+-extern void arch_free_page(struct page *page, int order);
++extern int arch_free_page(struct page *page, int order);
+ #define HAVE_ARCH_FREE_PAGE
+ 
+ #include <asm-generic/page.h>

linux-2.6-xen-no-tls-warn.patch:
 fixup.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-xen-no-tls-warn.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-xen-no-tls-warn.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-xen-no-tls-warn.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-xen-no-tls-warn.patch	9 Jan 2006 20:42:18 -0000	1.3
@@ -1,7 +1,5 @@
-diff --git a/arch/i386/xen/kernel/fixup.c b/arch/i386/xen/kernel/fixup.c
-index ccfb39d..26a5a18 100644
---- a/arch/i386/xen/kernel/fixup.c
-+++ b/arch/i386/xen/kernel/fixup.c
+--- linux-2.6.14/arch/i386/kernel/fixup.c~	2006-01-06 16:10:00.000000000 -0500
++++ linux-2.6.14/arch/i386/kernel/fixup.c	2006-01-06 16:13:01.000000000 -0500
 @@ -39,7 +39,7 @@
  
  fastcall void do_fixup_4gb_segment(struct pt_regs *regs, long error_code)

linux-2.6-xen-vdso-note.patch:
 vsyscall-note-xen.S |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-xen-vdso-note.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6-xen-vdso-note.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-xen-vdso-note.patch	21 Dec 2005 11:24:51 -0000	1.2
+++ linux-2.6-xen-vdso-note.patch	9 Jan 2006 20:42:18 -0000	1.3
@@ -1,76 +1,9 @@
-Supply the Xen vdso to user land for "nosegneg" optimisations w/ glibc.
-
-From:  <>
-
-
----
-
- arch/i386/xen/kernel/Makefile        |    2 +-
- arch/xen/i386/kernel/vsyscall-note.S |   32 ++++++++++++++++++++++++++++++++
- include/asm-i386/mach-xen/asm/page.h |    2 ++
- 3 files changed, 35 insertions(+), 1 deletions(-)
-
-diff --git a/arch/i386/xen/kernel/Makefile b/arch/i386/xen/kernel/Makefile
-index 20c0129..8e0dc81 100644
---- a/arch/i386/xen/kernel/Makefile
-+++ b/arch/i386/xen/kernel/Makefile
-@@ -86,7 +86,7 @@ $(obj)/vsyscall-syms.o: $(src)/vsyscall.
- 	$(call if_changed,syscall)
+--- linux-2.6.14/arch/i386/kernel/vsyscall-note-xen.S~	2006-01-06 17:26:37.000000000 -0500
++++ linux-2.6.14/arch/i386/kernel/vsyscall-note-xen.S	2006-01-06 17:32:11.000000000 -0500
+@@ -28,5 +28,5 @@
+ #define NOTE_KERNELCAP_END ASM_ELF_NOTE_END
  
- c-link	:=
--s-link	:= vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o vsyscall.lds.o
-+s-link	:= vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o vsyscall.lds.o vsyscall-note.o
- 
- $(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-obj-m) $(c-link)) $(patsubst %.o,$(obj)/%.S,$(s-obj-y) $(s-link)):
- 	@ln -fsn $(srctree)/arch/i386/kernel/$(notdir $@) $@
-diff --git a/arch/xen/i386/kernel/vsyscall-note.S b/arch/xen/i386/kernel/vsyscall-note.S
-new file mode 100644
-index 0000000..f404784
---- /dev/null
-+++ b/arch/xen/i386/kernel/vsyscall-note.S
-@@ -0,0 +1,32 @@
-+/*
-+ * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
-+ * Here we can supply some information useful to userland.
-+ * First we get the vanilla i386 note that supplies the kernel version info.
-+ */
-+
-+#include "../../../i386/kernel/vsyscall-note.S"
-+
-+/*
-+ * Now we add a special note telling glibc's dynamic linker a fake hardware
-+ * flavor that it will use to choose the search path for libraries in the
-+ * same way it uses real hardware capabilities like "mmx".
-+ * We supply "nosegneg" as the fake capability, to indicate that we
-+ * do not like negative offsets in instructions using segment overrides,
-+ * since we implement those inefficiently.  This makes it possible to
-+ * install libraries optimized to avoid those access patterns in someplace
-+ * like /lib/i686/tls/nosegneg.  Note that an /etc/ld.so.conf.d/file
-+ * corresponding to the bits here is needed to make ldconfig work right.
-+ * It should contain:
-+ *	hwcap 0 nosegneg
-+ * to match the mapping of bit to name that we give here.
-+ */
-+#define NOTE_KERNELCAP_BEGIN(ncaps, mask) \
-+	ASM_ELF_NOTE_BEGIN(".note.kernelcap", "a", "GNU", 2) \
-+	.long ncaps, mask
-+#define NOTE_KERNELCAP(bit, name) \
-+	.byte bit; .asciz name
-+#define NOTE_KERNELCAP_END ASM_ELF_NOTE_END
-+
-+NOTE_KERNELCAP_BEGIN(1, 1)
+ NOTE_KERNELCAP_BEGIN(1, 1)
+-NOTE_KERNELCAP(1, "nosegneg")  /* Change 1 back to 0 when glibc is fixed! */
 +NOTE_KERNELCAP(0, "nosegneg")
-+NOTE_KERNELCAP_END
-diff --git a/include/asm-i386/mach-xen/asm/page.h b/include/asm-i386/mach-xen/asm/page.h
-index 21f8300..9acaa52 100644
---- a/include/asm-i386/mach-xen/asm/page.h
-+++ b/include/asm-i386/mach-xen/asm/page.h
-@@ -268,6 +268,8 @@ extern int page_is_ram(unsigned long pag
- #define virt_to_mfn(v)		(pfn_to_mfn(__pa(v) >> PAGE_SHIFT))
- #define mfn_to_virt(m)		(__va(mfn_to_pfn(m) << PAGE_SHIFT))
- 
-+#define __HAVE_ARCH_GATE_AREA 1
-+
- #endif /* __KERNEL__ */
- 
- #include <asm-generic/page.h>
+ NOTE_KERNELCAP_END

linux-2.6.14-xen_remap_vma_flags.patch:
 ioremap-xen.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.14-xen_remap_vma_flags.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/linux-2.6.14-xen_remap_vma_flags.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6.14-xen_remap_vma_flags.patch	21 Dec 2005 11:24:55 -0000	1.2
+++ linux-2.6.14-xen_remap_vma_flags.patch	9 Jan 2006 20:42:18 -0000	1.3
@@ -1,6 +1,6 @@
-diff -uNp linux-2.6.14/arch/i386/xen/mm/ioremap.c.orig linux-2.6.14/arch/i386/xen/mm/ioremap.c
---- linux-2.6.14/arch/i386/xen/mm/ioremap.c.orig	2005-12-20 20:08:14.000000000 +0100
-+++ linux-2.6.14/arch/i386/xen/mm/ioremap.c	2005-12-20 20:09:10.000000000 +0100
+diff -uNp linux-2.6.14/arch/i386/mm/ioremap-xen.c.orig linux-2.6.14/arch/i386/mm/ioremap-xen.c
+--- linux-2.6.14/arch/i386/mm/ioremap-xen.c.orig	2005-12-20 20:08:14.000000000 +0100
++++ linux-2.6.14/arch/i386/mm/ioremap-xen.c	2005-12-20 20:09:10.000000000 +0100
 @@ -118,7 +118,7 @@ int direct_remap_pfn_range(struct vm_are
  			   domid_t  domid)
  {


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/sources,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- sources	21 Dec 2005 15:04:57 -0000	1.6
+++ sources	9 Jan 2006 20:42:18 -0000	1.7
@@ -1,4 +1,3 @@
-66d02cbd723876c6d69846a067875a22  linux-2.6.14.tar.bz2
-04385c8abed5541c0710b15393b79020  xen-20051206.tar.bz2
-9c1d46fca842361a84e499e851c7548e  patch-2.6.15-rc6.bz2
-69f8999146103a293b1e1c085713f1aa  patch-2.6.15-rc6-git1.bz2
+cdf95e00f5111e31f78e1d97304d9522  linux-2.6.15.tar.bz2
+2f072f3527bb24f37b46f4622a4404fe  xen-20060106.tar.bz2
+1e8dda938d8fb06863d7276b79d6e544  bcm43xx-20060106.tar.bz2


Index: upstream
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/upstream,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- upstream	21 Dec 2005 15:04:57 -0000	1.3
+++ upstream	9 Jan 2006 20:42:18 -0000	1.4
@@ -1,3 +1 @@
-linux-2.6.14.tar.bz2
-patch-2.6.15-rc6.bz2
-patch-2.6.15-rc6-git1.bz2
+linux-2.6.15.tar.bz2


--- linux-2.6-acpi-acpica-20051202.patch DELETED ---


--- linux-2.6-apm-depends-fix.patch DELETED ---


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


--- linux-2.6-g5-thermal-overload.patch DELETED ---


--- linux-2.6-missing-exports.patch DELETED ---


--- linux-2.6-usb-suspend.patch DELETED ---


--- linux-2.6.14-kauditd-suspend.patch DELETED ---


--- linux-2.6.14.tar.bz2.sign DELETED ---


--- patch-2.6.15-rc6-git1.bz2.sign DELETED ---


--- patch-2.6.15-rc6.bz2.sign DELETED ---




More information about the fedora-cvs-commits mailing list