Skip to contentSkip to conversation

Re: [Fwd: Bug: 2.2.12 still hangs PPC after some PPP activity]

Fwd: Bug: 2.2.12 still hangs PPC after some PPP activity Geert Uytterhoeven 1 participant 1 message Sep 29, 1999 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi Lou,

Quoted 20 lines
Quoted 7 lines
Quoted 1 line

What might happen if a driver does:

point A

Quoted 3 lines

save_flags(old_flags);
cli();
restore_flags(old_flags);

point A2?

Quoted 10 lines
Quoted 3 lines

save_flags(new_flags);
cli();
restore_flags(new_flags);

point B

Quoted 2 lines

/* can't we be interupted here? Assume yes, if so */ restore_flags(old_flags);

point C

point A == point A2 == point B == point C

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

. . .Opinions??? Please clue me in anyway... this stuff's a kick! :-)

The interrupt mask register has the same contents at points A, B and C. Hence, if we could be interrupt a point A, we can be interrupt at points B and C. . . .

Looking in macserial.c's rs_write() function it can call transmit_chars(info) at point B which would seem to me to be able to be a point at which the interupt mask register could change. No? I have to admit I'm only now reading the various docs on kernel locks. So I just email'd you hoping you'd give me another hint ;-)

I don't know how the serial port hardware has to be programmed. But if transmit_chars() must be called with interrupts disabled, it's indeed a bug.

Greetings,

Geert

--
Geert Uytterhoeven ----------------- Sony Suprastructure Center Europe (SUPC-E) [email protected] ------------------- Sint Stevens Woluwestraat 55 Phone +32-2-7248648 Fax +32-2-7262686 ---------------- B-1130 Brussels, Belgium

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/