Skip to contentSkip to conversation

Kernel ll/sc emulation?

DISCUSSION H. J. Lu 5 participants 6 messages Jul 2, 2002 10 messages not in the archive MIPS

lore
Share & tools
lore

H. J. Lu

author
#10 lore raw
In reply to a message not in the archive
Quoted 8 lines · Eric Christopher
Quoted 4 lines

What do you meant by "it'll be emulated if it fails"? I didn't see any ll/sc emulation in the Linux mips kernel. If you use ll/sc on CPU which doesn't implement ll/sc, your binary will just dump core.

The kernel should trap and emulate the instruction at that point, at least as far as I've been told.

That is a news to me. I couldn't find it anywhere in the Linux mips kernel. Could someone point me to the right place in the Linux mips kernel source tree?

Thanks.

H.J.

#11 lore raw
Quoted 3 lines · H. J. Lu

That is a news to me. I couldn't find it anywhere in the Linux mips kernel. Could someone point me to the right place in the Linux mips kernel source tree?

See do_ri() in arch/mips/kernel/traps.c.

Signature · 3 lines
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email protected], PGP key available        +
author
#12 lore raw
Quoted 8 lines · Maciej W. Rozycki
Quoted 3 lines · H. J. Lu

That is a news to me. I couldn't find it anywhere in the Linux mips kernel. Could someone point me to the right place in the Linux mips kernel source tree?

See do_ri() in arch/mips/kernel/traps.c.

Great. What is the first working ll/sc emulation kernel version?

H.J.

#13 lore raw
In reply to H. J. Lu
Quoted 6 lines · H. J. Lu
Quoted 5 lines · Eric Christopher
Quoted 4 lines

What do you meant by "it'll be emulated if it fails"? I didn't see any ll/sc emulation in the Linux mips kernel. If you use ll/sc on CPU which doesn't implement ll/sc, your binary will just dump core.

Quoted 7 lines
Quoted 3 lines

The kernel should trap and emulate the instruction at that point, at least as far as I've been told.

That is a news to me. I couldn't find it anywhere in the Linux mips kernel. Could someone point me to the right place in the Linux mips kernel source tree?

grep -rI LLSC arch/mips/kernel

HTH,
Thiemo

#14 lore raw
In reply to H. J. Lu
Quoted 6 lines · H. J. Lu
Quoted 5 lines · Eric Christopher
Quoted 4 lines

What do you meant by "it'll be emulated if it fails"? I didn't see any ll/sc emulation in the Linux mips kernel. If you use ll/sc on CPU which doesn't implement ll/sc, your binary will just dump core.

Quoted 7 lines
Quoted 3 lines

The kernel should trap and emulate the instruction at that point, at least as far as I've been told.

That is a news to me. I couldn't find it anywhere in the Linux mips kernel. Could someone point me to the right place in the Linux mips kernel source tree?

Early 2.4; after 2.4.2 but before 2.4.9 or so.

Signature · 2 lines
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer
#15 lore raw
Quoted 1 line · Daniel Jacobowitz

Early 2.4; after 2.4.2 but before 2.4.9 or so.

The code is actually there quite a bit longer but by then it finally got fixed ...

Ralf