Skip to contentSkip to conversation

IRQ patch for Toshiba Char Driver in 2.5.34

PATCH In review James Blackwell 7 participants 10 messages Sep 9, 2002 – Sep 16, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IRQ patch for Toshiba Char Driver in 2.5.34

Somewhere around 2.5.31 the method for setting and clearing interrupts changed:

From- To-
save_flags(flags); local_irq_save(flags);
cli();

restore_flags(flags); local_irq_restore(flags);

Though bordering on trivial, including toshiba support with stock 2.5.34 fails to compile, which this patch seems to fix. This patch fixes this issue and has worked reliably for me under 2.5.31, though it is untested on 2.5.32 and 2.5.33 because I didn't manage to get those to work.

A note to those that are a bit rough on kernel patch newbies.... submitting a kernel patch for the very first time is a rather intimidating experience so please don't chew my head off unless its absolutely necessary.

Signature · 2 lines
GnuPG fingerprint AAE4 8C76 58DA 5902 761D  247A 8A55 DA73 0635 7400
James Blackwell  --  Director http://www.linuxguru.net
#1 lore raw
Quoted 3 lines · James Blackwell

A note to those that are a bit rough on kernel patch newbies.... submitting a kernel patch for the very first time is a rather intimidating experience so please don't chew my head off unless its absolutely necessary.

Show us the goods first ;)

Zwane

Signature · 1 line
function.linuxpower.ca
#2 lore raw
In reply to James Blackwell

You've just made the driver horribly racy on SMP or preempt systems..

Instead of a blind search and replace you have to find out the protected data and add a spinlock around it, also in the top-half of the kernel.

#3 lore raw

Hi!

Quoted 2 lines

You've just made the driver horribly racy on SMP or preempt systems..

Well, as long as toshiba does not make SMP notebooks, we are safe ;-).

Pavel

Signature · 2 lines
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
#4 lore raw
Quoted 6 lines · Pavel Machek

Hi!

Quoted 2 lines

You've just made the driver horribly racy on SMP or preempt systems..

Well, as long as toshiba does not make SMP notebooks, we are safe ;-).

... or preempt. Which doesn't really depend on Toshiba.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#5 lore raw
Quoted 10 lines · Vojtech Pavlik
Quoted 6 lines · Pavel Machek

Hi!

Quoted 2 lines

You've just made the driver horribly racy on SMP or preempt systems..

Well, as long as toshiba does not make SMP notebooks, we are safe ;-).

... or preempt. Which doesn't really depend on Toshiba.

Does that mean my very first kernel patch, insignificant as it is, is probably acceptable?

Should I resubmit it? I haven't tried 2.5.34 yet, and 2.5.33 had keyboard problems that prevented me from using it.

Signature · 2 lines
GnuPG fingerprint AAE4 8C76 58DA 5902 761D  247A 8A55 DA73 0635 7400
James Blackwell  --  Director http://www.linuxguru.net
#6 lore raw

Hi!

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

You've just made the driver horribly racy on SMP or preempt systems..

Well, as long as toshiba does not make SMP notebooks, we are safe ;-).

Quoted 8 lines
Quoted 2 lines

... or preempt. Which doesn't really depend on Toshiba.

Does that mean my very first kernel patch, insignificant as it is, is probably acceptable?

Should I resubmit it? I haven't tried 2.5.34 yet, and 2.5.33 had keyboard problems that prevented me from using it.

Perhaps adding #ifdef CONFIG_SMP #error Not SMP safe, #ifdef CONFIG_PREEMPT #error Not preempt safe and resubmitting is not such a bad idea.

It would be nice to make it preempt/smp safe, through. [SMP notebooks are not so unreasonable; think p4 hyperthreading].
Pavel

Signature · 2 lines
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
#7 lore raw
Quoted 2 lines · Pavel Machek

It would be nice to make it preempt/smp safe, through. [SMP notebooks are not so unreasonable; think p4 hyperthreading].

Current P4 notebooks aren't using xeon's to the best of my knowledge, though as such technology becomes more commonplace, it's not unviable for the future maybe.

Dave

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#8 lore raw
In reply to Pavel Machek
Quoted 2 lines · [email protected] said:

It would be nice to make it preempt/smp safe, through. [SMP notebooks are not so unreasonable; think p4 hyperthreading].

They are here. The code that is protected by cli() and friends does not run on any anything more fancy than a Pentium. As I recall nothing but mobile P90 in a Portage 610CT and a mobile P120 in a Tecra 700CDT/CDS.

JAB.

Signature · 2 lines
Jonathan A. Buzzard                 Email: [email protected]
Northumberland, United Kingdom.       Tel: +44(0)1661-832195
#9 lore raw

Hi!

Quoted 6 lines
Quoted 2 lines

It would be nice to make it preempt/smp safe, through. [SMP notebooks are not so unreasonable; think p4 hyperthreading].

They are here. The code that is protected by cli() and friends does not run on any anything more fancy than a Pentium. As I recall nothing but mobile P90 in a Portage 610CT and a mobile P120 in a Tecra 700CDT/CDS.

Its still not safe due to preempt.

Anyway #ifdef PREEMPT bug, and comment that this is never ever used on SMP might be enough.
Pavel

Signature · 2 lines
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.