rpms/kernel/FC-5 linux-2.6-bcm43xx-periodic-work.patch, NONE, 1.1 kernel-2.6.spec, 1.2189, 1.2190 linux-2.6-lockdep-fixes.patch, 1.1, 1.2

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Sep 27 05:50:16 UTC 2006


Author: davej

Update of /cvs/dist/rpms/kernel/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv14853

Modified Files:
	kernel-2.6.spec linux-2.6-lockdep-fixes.patch 
Added Files:
	linux-2.6-bcm43xx-periodic-work.patch 
Log Message:
bring over some more fixes from devel/

linux-2.6-bcm43xx-periodic-work.patch:
 bcm43xx_main.c |   34 ++++++++++++++++------------------
 1 files changed, 16 insertions(+), 18 deletions(-)

--- NEW FILE linux-2.6-bcm43xx-periodic-work.patch ---
In 2.6.18-rc7, the section that prepares for preemptible periodic work
has two bugs. The first is due to an improper locking sequence that leads
to frozen systems. The second causes netdev watchdog timeouts. Both
are fixed.

Signed-off-by: Larry Finger <Larry.Finger at lwfinger.net>

Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -3182,39 +3182,37 @@ static void bcm43xx_periodic_work_handle
 		/* Periodic work will take a long time, so we want it to
 		 * be preemtible.
 		 */
-		bcm43xx_lock_irqonly(bcm, flags);
-		netif_stop_queue(bcm->net_dev);
+		mutex_lock(&bcm->mutex);
+		netif_tx_disable(bcm->net_dev);
+		spin_lock_irqsave(&bcm->irq_lock, flags);
+		bcm43xx_mac_suspend(bcm);
 		if (bcm43xx_using_pio(bcm))
 			bcm43xx_pio_freeze_txqueues(bcm);
 		savedirqs = bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL);
-		bcm43xx_unlock_irqonly(bcm, flags);
-		bcm43xx_lock_noirq(bcm);
+		spin_unlock_irqrestore(&bcm->irq_lock, flags);
 		bcm43xx_synchronize_irq(bcm);
 	} else {
 		/* Periodic work should take short time, so we want low
 		 * locking overhead.
 		 */
-		bcm43xx_lock_irqsafe(bcm, flags);
+		mutex_lock(&bcm->mutex);
+		spin_lock_irqsave(&bcm->irq_lock, flags);
 	}
 
 	do_periodic_work(bcm);
 
 	if (badness > BADNESS_LIMIT) {
-		bcm43xx_lock_irqonly(bcm, flags);
-		if (likely(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED)) {
-			tasklet_enable(&bcm->isr_tasklet);
-			bcm43xx_interrupt_enable(bcm, savedirqs);
-			if (bcm43xx_using_pio(bcm))
-				bcm43xx_pio_thaw_txqueues(bcm);
-		}
+		spin_lock_irqsave(&bcm->irq_lock, flags);
+		tasklet_enable(&bcm->isr_tasklet);
+		bcm43xx_interrupt_enable(bcm, savedirqs);
+		if (bcm43xx_using_pio(bcm))
+			bcm43xx_pio_thaw_txqueues(bcm);
+		bcm43xx_mac_enable(bcm);
 		netif_wake_queue(bcm->net_dev);
-		mmiowb();
-		bcm43xx_unlock_irqonly(bcm, flags);
-		bcm43xx_unlock_noirq(bcm);
-	} else {
-		mmiowb();
-		bcm43xx_unlock_irqsafe(bcm, flags);
 	}
+	mmiowb();
+	spin_unlock_irqrestore(&bcm->irq_lock, flags);
+	mutex_unlock(&bcm->mutex);
 }
 
 static void bcm43xx_periodic_tasks_delete(struct bcm43xx_private *bcm)





Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-5/kernel-2.6.spec,v
retrieving revision 1.2189
retrieving revision 1.2190
diff -u -r1.2189 -r1.2190
--- kernel-2.6.spec	22 Sep 2006 22:48:13 -0000	1.2189
+++ kernel-2.6.spec	27 Sep 2006 05:50:14 -0000	1.2190
@@ -337,6 +337,9 @@
 
 # core networking changes.
 
+# NIC driver fixes
+Patch1350: linux-2.6-bcm43xx-periodic-work.patch
+
 # Filesystem stuff.
 # Squashfs
 Patch1400: linux-2.6-squashfs.patch
@@ -841,6 +844,9 @@
 
 # core networking changes.
 
+# NIC driver fixes
+%patch1350 -p1
+
 # Filesystem patches.
 # Squashfs
 %patch1400 -p1
@@ -1537,6 +1543,11 @@
 %endif
 
 %changelog
+* Wed Sep 27 2006 Dave Jones <davej at redhat.com>
+- Enable serverworks IDE driver for x86-64.
+- More lockdep fixes.
+- Add periodic work fix for bcm43xx driver
+
 * Thu Sep 21 2006 Juan Quintela <quintela at redhat.com>
 - re-enable xen.
 - update xen:

linux-2.6-lockdep-fixes.patch:
 a/drivers/ieee1394/nodemgr.c                  |    9 ++--
 a/drivers/net/forcedeth.c                     |   31 ++++++++------
 a/fs/nfsd/nfsproc.c                           |    2 
 a/fs/nfsd/vfs.c                               |    8 +--
 a/include/linux/nfsd/nfsfh.h                  |   11 ++++-
 a/kernel/lockdep.c                            |   13 ++++++
 a/net/ipv6/tcp_ipv6.c                         |    2 
 linux-2.6.17-mm6/include/net/sock.h           |   33 ++++++++++++++-
 linux-2.6.17.noarch/drivers/char/rtc.c        |    5 +-
 linux-2.6.18-rc1/drivers/input/serio/libps2.c |    6 +-
 linux-2.6.18-rc1/include/linux/libps2.h       |   12 +++++
 linux-2.6.18-rc1/net/socket.c                 |    8 +++
 linux-2.6/mm/slab.c                           |   55 +++++++++++++++++++-------
 13 files changed, 146 insertions(+), 49 deletions(-)

Index: linux-2.6-lockdep-fixes.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-5/linux-2.6-lockdep-fixes.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-lockdep-fixes.patch	22 Sep 2006 22:46:11 -0000	1.1
+++ linux-2.6-lockdep-fixes.patch	27 Sep 2006 05:50:14 -0000	1.2
@@ -911,3 +911,202 @@
 new-bd_mutex-lockdep-annotation.patch
 nfsd-lockdep-annotation.patch
 
+Date: Wed, 13 Sep 2006 10:56:32 +0200
+From: Peter Zijlstra <pzijlstr at redhat.com>
+Subject: [RHEL5 PATCH] Slab fix alien cache lockdep warnings
+
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=203098
+
+This patch was not queued for .18 afaik,
+
+---
+From: Ravikiran G Thirumalai <kiran at scalex86.org>
+
+Place the alien array cache locks of on slab malloc slab caches on a
+seperate lockdep class.  This avoids false positives from lockdep
+
+Signed-off-by: Ravikiran Thirumalai <kiran at scalex86.org>
+Signed-off-by: Shai Fultheim <shai at scalex86.org>
+Cc: Thomas Gleixner <tglx at linutronix.de>
+Acked-by: Arjan van de Ven <arjan at linux.intel.com>
+Cc: Ingo Molnar <mingo at elte.hu>
+Cc: Pekka Enberg <penberg at cs.helsinki.fi>
+Cc: Christoph Lameter <clameter at engr.sgi.com>
+Signed-off-by: Andrew Morton <akpm at osdl.org>
+Signed-off-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
+---
+
+ mm/slab.c |   55 ++++++++++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 42 insertions(+), 13 deletions(-)
+
+Index: linux-2.6/mm/slab.c
+===================================================================
+--- linux-2.6.orig/mm/slab.c
++++ linux-2.6/mm/slab.c
+@@ -674,6 +674,8 @@ static struct kmem_cache cache_cache = {
+ #endif
+ };
+ 
++#define BAD_ALIEN_MAGIC 0x01020304ul
++
+ #ifdef CONFIG_LOCKDEP
+ 
+ /*
+@@ -682,29 +684,53 @@ static struct kmem_cache cache_cache = {
+  * The locking for this is tricky in that it nests within the locks
+  * of all other slabs in a few places; to deal with this special
+  * locking we put on-slab caches into a separate lock-class.
++ *
++ * We set lock class for alien array caches which are up during init.
++ * The lock annotation will be lost if all cpus of a node goes down and
++ * then comes back up during hotplug
+  */
+-static struct lock_class_key on_slab_key;
++static struct lock_class_key on_slab_l3_key;
++static struct lock_class_key on_slab_alc_key;
++
++static inline void init_lock_keys(void)
+ 
+-static inline void init_lock_keys(struct cache_sizes *s)
+ {
+ 	int q;
++	struct cache_sizes *s = malloc_sizes;
+ 
+-	for (q = 0; q < MAX_NUMNODES; q++) {
+-		if (!s->cs_cachep->nodelists[q] || OFF_SLAB(s->cs_cachep))
+-			continue;
+-		lockdep_set_class(&s->cs_cachep->nodelists[q]->list_lock,
+-				  &on_slab_key);
++	while (s->cs_size != ULONG_MAX) {
++		for_each_node(q) {
++			struct array_cache **alc;
++			int r;
++			struct kmem_list3 *l3 = s->cs_cachep->nodelists[q];
++			if (!l3 || OFF_SLAB(s->cs_cachep))
++				continue;
++			lockdep_set_class(&l3->list_lock, &on_slab_l3_key);
++			alc = l3->alien;
++			/*
++			 * FIXME: This check for BAD_ALIEN_MAGIC
++			 * should go away when common slab code is taught to
++			 * work even without alien caches.
++			 * Currently, non NUMA code returns BAD_ALIEN_MAGIC
++			 * for alloc_alien_cache,
++			 */
++			if (!alc || (unsigned long)alc == BAD_ALIEN_MAGIC)
++				continue;
++			for_each_node(r) {
++				if (alc[r])
++					lockdep_set_class(&alc[r]->lock,
++					     &on_slab_alc_key);
++			}
++		}
++		s++;
+ 	}
+ }
+-
+ #else
+-static inline void init_lock_keys(struct cache_sizes *s)
++static inline void init_lock_keys(void)
+ {
+ }
+ #endif
+ 
+-
+-
+ /* Guard access to the cache-chain. */
+ static DEFINE_MUTEX(cache_chain_mutex);
+ static struct list_head cache_chain;
+@@ -1092,7 +1118,7 @@ static inline int cache_free_alien(struc
+ 
+ static inline struct array_cache **alloc_alien_cache(int node, int limit)
+ {
+-	return (struct array_cache **) 0x01020304ul;
++	return (struct array_cache **)BAD_ALIEN_MAGIC;
+ }
+ 
+ static inline void free_alien_cache(struct array_cache **ac_ptr)
+@@ -1422,7 +1448,6 @@ void __init kmem_cache_init(void)
+ 					ARCH_KMALLOC_FLAGS|SLAB_PANIC,
+ 					NULL, NULL);
+ 		}
+-		init_lock_keys(sizes);
+ 
+ 		sizes->cs_dmacachep = kmem_cache_create(names->name_dma,
+ 					sizes->cs_size,
+@@ -1495,6 +1520,10 @@ void __init kmem_cache_init(void)
+ 		mutex_unlock(&cache_chain_mutex);
+ 	}
+ 
++	/* Annotate slab for lockdep -- annotate the malloc caches */
++	init_lock_keys();
++
++
+ 	/* Done! */
+ 	g_cpucache_up = FULL;
+ 
+
+From: Stefan Richter <stefanr at s5r6.in-berlin.de>
+
+nodemgr_update_pdrv grabbed an rw semaphore (as reader) which was already
+taken by its caller's caller, nodemgr_probe_ne (as reader too).  Reported by
+Miles Lane, call path pointed out by Arjan van de Ven.
+
+FIXME:
+Shouldn't we rather use class->sem there, not class->subsys.rwsem?
+
+Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
+Cc: Greg KH <greg at kroah.com>
+Signed-off-by: Andrew Morton <akpm at osdl.org>
+---
+
+ drivers/ieee1394/nodemgr.c |    9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+diff -puN drivers/ieee1394/nodemgr.c~ieee1394-nodemgr-fix-rwsem-recursion drivers/ieee1394/nodemgr.c
+--- a/drivers/ieee1394/nodemgr.c~ieee1394-nodemgr-fix-rwsem-recursion
++++ a/drivers/ieee1394/nodemgr.c
+@@ -1316,6 +1316,7 @@ static void nodemgr_node_scan(struct hos
+ }
+ 
+ 
++/* Caller needs to hold nodemgr_ud_class.subsys.rwsem as reader. */
+ static void nodemgr_suspend_ne(struct node_entry *ne)
+ {
+ 	struct class_device *cdev;
+@@ -1368,15 +1369,14 @@ static void nodemgr_resume_ne(struct nod
+ }
+ 
+ 
++/* Caller needs to hold nodemgr_ud_class.subsys.rwsem as reader. */
+ static void nodemgr_update_pdrv(struct node_entry *ne)
+ {
+ 	struct unit_directory *ud;
+ 	struct hpsb_protocol_driver *pdrv;
+-	struct class *class = &nodemgr_ud_class;
+ 	struct class_device *cdev;
+ 
+-	down_read(&class->subsys.rwsem);
+-	list_for_each_entry(cdev, &class->children, node) {
++	list_for_each_entry(cdev, &nodemgr_ud_class.children, node) {
+ 		ud = container_of(cdev, struct unit_directory, class_dev);
+ 		if (ud->ne != ne || !ud->device.driver)
+ 			continue;
+@@ -1389,7 +1389,6 @@ static void nodemgr_update_pdrv(struct n
+ 			up_write(&ud->device.bus->subsys.rwsem);
+ 		}
+ 	}
+-	up_read(&class->subsys.rwsem);
+ }
+ 
+ 
+@@ -1420,6 +1419,8 @@ static void nodemgr_irm_write_bc(struct 
+ }
+ 
+ 
++/* Caller needs to hold nodemgr_ud_class.subsys.rwsem as reader because the
++ * calls to nodemgr_update_pdrv() and nodemgr_suspend_ne() here require it. */
+ static void nodemgr_probe_ne(struct host_info *hi, struct node_entry *ne, int generation)
+ {
+ 	struct device *dev;
+_




More information about the fedora-cvs-commits mailing list