|
|
Subject: [Kernel-janitors] [PATCH] fix SMP support in cdu535 cdrom driver - msg#00016
List: linux.kernel.janitors
Hi Jens,
Patch against 2.6.0-test6.
Even though cdu535 is polled, not interrupt driven, Matthew pointed
out[1] that is a good idea to fix SMP support on that bit, so that
people who wants to fix cdu31a don't get that wrong.
Move prepare_to_wait before enable_interrupts, so that if we enter
the interrupt handler (after enable_interrupts) on a different CPU
that's executing sony_sleep's poll version, "wait" is already on the
irq_wait list, which I think fixes the race that Matthew pointed out,
doesn't it?
CC'ing kernel-janitors since it also replaces yield for
schedule_timeout[2], as Matthew suggested.
Please consider applying.
Thanks,
Felipe
[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=106322465303649&w=2
[2]
http://lists.osdl.org/pipermail/kernel-janitors/2003-October/000173.html
--- linux-2.6.0-test6/drivers/cdrom/sonycd535.c.orig 2003-10-08
14:42:43.000000000 -0300
+++ linux-2.6.0-test6/drivers/cdrom/sonycd535.c 2003-10-08 16:00:09.000000000
-0300
@@ -342,13 +342,14 @@
sony_sleep(void)
{
if (sony535_irq_used <= 0) { /* poll */
- yield();
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(1);
} else { /* Interrupt driven */
DEFINE_WAIT(wait);
-
+
spin_lock_irq(&sonycd535_lock);
- enable_interrupts();
prepare_to_wait(&cdu535_irq_wait, &wait, TASK_INTERRUPTIBLE);
+ enable_interrupts();
spin_unlock_irq(&sonycd535_lock);
schedule();
finish_wait(&cdu535_irq_wait, &wait);
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@xxxxxxxxxxxxxx
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Half Off V1agra..................... [ iatkwvk bropbdi
Generic V i a g r a
.
Generic V i a g r a® for as low as $2.50 per 50mg dose
F R E E physician's consult
F R E E shipping to the privacy of your own home
Buy the Generic!
GSC-100
Both are
Sildenafil Citrate
V i a g r a ®
ANACIN ®
Both are
Acetaminaphen
TYLENOL ®
Generic Ibuprofen
Both are
Ibuprofen
ADVIL ®
The first generic form of Sildenafil Citrate (the generic name for V i a g r a®) is now available for mass marketing.
Visit our Web site for a complete explanation.
Buy Generic V i a g r a® Today
Features:
Costs over 50% less than V i a g r a®
F R E E Doctor Consultation
F R E E delivery in discrete, private package
100% Money Back Guarantee
Visit Our Website
100% Money Back Guarantee - The First Pharmaceutical to ever be guaranteed
vyqszb
pkumfuxvt
c z
mdtk w
qsxnb vjrwz jhxocly
le idw sbj
lbrps
Next Message by Date:
click to view message preview
[Kernel-janitors] [PATCH] fix SMP support in cdu535 cdrom driver
Hi Jens,
Patch against 2.6.0-test6.
Even though cdu535 is polled, not interrupt driven, Matthew pointed
out[1] that is a good idea to fix SMP support on that bit, so that
people who wants to fix cdu31a don't get that wrong.
Move prepare_to_wait before enable_interrupts, so that if we enter
the interrupt handler (after enable_interrupts) on a different CPU
that's executing sony_sleep's poll version, "wait" is already on the
irq_wait list, which I think fixes the race that Matthew pointed out,
doesn't it?
CC'ing kernel-janitors since it also replaces yield for
schedule_timeout[2], as Matthew suggested.
Please consider applying.
Thanks,
Felipe
[1]http://marc.theaimsgroup.com/?l=linux-kernel&m=106322465303649&w=2
[2]http://lists.osdl.org/pipermail/kernel-janitors/2003-October/000173.html
--- linux-2.6.0-test6/drivers/cdrom/sonycd535.c.orig 2003-10-08
14:42:43.000000000 -0300
+++ linux-2.6.0-test6/drivers/cdrom/sonycd535.c 2003-10-08 16:00:09.000000000
-0300
@@ -342,13 +342,14 @@
sony_sleep(void)
{
if (sony535_irq_used <= 0) { /* poll */
- yield();
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(1);
} else { /* Interrupt driven */
DEFINE_WAIT(wait);
-
+
spin_lock_irq(&sonycd535_lock);
- enable_interrupts();
prepare_to_wait(&cdu535_irq_wait, &wait, TASK_INTERRUPTIBLE);
+ enable_interrupts();
spin_unlock_irq(&sonycd535_lock);
schedule();
finish_wait(&cdu535_irq_wait, &wait);
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@xxxxxxxxxxxxxx
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Previous Message by Thread:
click to view message preview
Half Off V1agra..................... [ iatkwvk bropbdi
Generic V i a g r a
.
Generic V i a g r a® for as low as $2.50 per 50mg dose
F R E E physician's consult
F R E E shipping to the privacy of your own home
Buy the Generic!
GSC-100
Both are
Sildenafil Citrate
V i a g r a ®
ANACIN ®
Both are
Acetaminaphen
TYLENOL ®
Generic Ibuprofen
Both are
Ibuprofen
ADVIL ®
The first generic form of Sildenafil Citrate (the generic name for V i a g r a®) is now available for mass marketing.
Visit our Web site for a complete explanation.
Buy Generic V i a g r a® Today
Features:
Costs over 50% less than V i a g r a®
F R E E Doctor Consultation
F R E E delivery in discrete, private package
100% Money Back Guarantee
Visit Our Website
100% Money Back Guarantee - The First Pharmaceutical to ever be guaranteed
vyqszb
pkumfuxvt
c z
mdtk w
qsxnb vjrwz jhxocly
le idw sbj
lbrps
Next Message by Thread:
click to view message preview
[Kernel-janitors] [PATCH] fix SMP support in cdu535 cdrom driver
Hi Jens,
Patch against 2.6.0-test6.
Even though cdu535 is polled, not interrupt driven, Matthew pointed
out[1] that is a good idea to fix SMP support on that bit, so that
people who wants to fix cdu31a don't get that wrong.
Move prepare_to_wait before enable_interrupts, so that if we enter
the interrupt handler (after enable_interrupts) on a different CPU
that's executing sony_sleep's poll version, "wait" is already on the
irq_wait list, which I think fixes the race that Matthew pointed out,
doesn't it?
CC'ing kernel-janitors since it also replaces yield for
schedule_timeout[2], as Matthew suggested.
Please consider applying.
Thanks,
Felipe
[1]http://marc.theaimsgroup.com/?l=linux-kernel&m=106322465303649&w=2
[2]http://lists.osdl.org/pipermail/kernel-janitors/2003-October/000173.html
--- linux-2.6.0-test6/drivers/cdrom/sonycd535.c.orig 2003-10-08
14:42:43.000000000 -0300
+++ linux-2.6.0-test6/drivers/cdrom/sonycd535.c 2003-10-08 16:00:09.000000000
-0300
@@ -342,13 +342,14 @@
sony_sleep(void)
{
if (sony535_irq_used <= 0) { /* poll */
- yield();
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(1);
} else { /* Interrupt driven */
DEFINE_WAIT(wait);
-
+
spin_lock_irq(&sonycd535_lock);
- enable_interrupts();
prepare_to_wait(&cdu535_irq_wait, &wait, TASK_INTERRUPTIBLE);
+ enable_interrupts();
spin_unlock_irq(&sonycd535_lock);
schedule();
finish_wait(&cdu535_irq_wait, &wait);
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@xxxxxxxxxxxxxx
http://lists.osdl.org/mailman/listinfo/kernel-janitors
|
|