[Kernelpatches-commits] mfasheh commits r4 - in trunk/mfasheh: . vendor vendor/RedHat vendor/RedHat/RHAS21 vendor/RedHat/RHAS21/ia64 vendor/SuSE

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon May 10 20:28:41 CDT 2004


Author: mfasheh
Date: 2004-05-10 19:28:39 -0500 (Mon, 10 May 2004)
New Revision: 4

Added:
   trunk/mfasheh/linux-2.4/
   trunk/mfasheh/linux-2.6/
   trunk/mfasheh/vendor/
   trunk/mfasheh/vendor/RedHat/
   trunk/mfasheh/vendor/RedHat/RHAS21/
   trunk/mfasheh/vendor/RedHat/RHAS21/ia32/
   trunk/mfasheh/vendor/RedHat/RHAS21/ia64/
   trunk/mfasheh/vendor/RedHat/RHAS21/ia64/linux-2.4.18-aio-semaphore-fix-1.patch
   trunk/mfasheh/vendor/RedHat/RHEL3/
   trunk/mfasheh/vendor/RedHat/RHEL4/
   trunk/mfasheh/vendor/SuSE/
   trunk/mfasheh/vendor/SuSE/SLES9/
Log:
* create my patch directories
* add a patch which fixes bug #3573678 on IA64.



Added: trunk/mfasheh/vendor/RedHat/RHAS21/ia64/linux-2.4.18-aio-semaphore-fix-1.patch
===================================================================
--- trunk/mfasheh/vendor/RedHat/RHAS21/ia64/linux-2.4.18-aio-semaphore-fix-1.patch	2004-04-23 23:40:19 UTC (rev 3)
+++ trunk/mfasheh/vendor/RedHat/RHAS21/ia64/linux-2.4.18-aio-semaphore-fix-1.patch	2004-05-11 00:28:39 UTC (rev 4)
@@ -0,0 +1,53 @@
+--- linux-2.4.18-e.43/arch/ia64/kernel/semaphore.c.orig	2004-04-23 17:04:49.000000000 -0700
++++ linux-2.4.18-e.43/arch/ia64/kernel/semaphore.c	2004-04-23 17:09:23.000000000 -0700
+@@ -46,6 +46,7 @@ __up (struct semaphore *sem)
+ static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
+ 
+ void __wtd_down(struct semaphore * sem, struct worktodo *wtd);
++void __wtd_down_from_wakeup(struct semaphore * sem, struct worktodo *wtd);
+ 
+ void __wtd_down_action(void *data)
+ {
+@@ -55,7 +56,7 @@ void __wtd_down_action(void *data)
+ 	wtd_pop(wtd);
+ 	sem = wtd->data;
+ 
+-	__wtd_down(sem, wtd);
++	__wtd_down_from_wakeup(sem, wtd);
+ }
+ 
+ void __wtd_down_waiter(wait_queue_t *wait)
+@@ -93,6 +94,33 @@ void __wtd_down(struct semaphore * sem, 
+ 	}
+ }
+ 
++/*
++ *  Same as __wtd_down, but sem->sleepers is not incremented when coming from a wakeup.
++ */
++void __wtd_down_from_wakeup(struct semaphore * sem, struct worktodo *wtd)
++{
++	int gotit;
++	int sleepers;
++
++	init_waitqueue_func_entry(&wtd->wait, __wtd_down_waiter);
++	wtd->data = sem;
++
++	spin_lock_irq(&semaphore_lock);
++	sleepers = sem->sleepers;
++	gotit = add_wait_queue_exclusive_cond(&sem->wait, &wtd->wait,
++			atomic_add_negative(sleepers - 1, &sem->count));
++	if (gotit)
++		sem->sleepers = 0;
++	else
++		sem->sleepers = 1;
++	spin_unlock_irq(&semaphore_lock);
++
++	if (gotit) {
++		wake_up(&sem->wait);
++		wtd_queue(wtd);
++	}
++}
++
+ /* Returns 0 if we acquired the semaphore, 1 if it was queued. */
+ int wtd_down(struct worktodo *wtd, struct semaphore *sem)
+ {



More information about the Kernelpatches-commits mailing list