Re: spinlock recursion when running q800 emulation in qemu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 12, 2024 at 1:51 AM Michael Schmitz <schmitzmic@xxxxxxxxx> wrote:
On 11/03/24 21:35, Finn Thain wrote:
I think spin_lock() reduces to preempt_disable() on UP.
In include/linux/spinlock_api_up.h it says,

/*
  * In the UP-nondebug case there's no real locking going on, so the
  * only thing we have to do is to keep the preempt counts and irq
  * flags straight, to suppress compiler warnings of unused lock
  * variables, and to add the proper checker annotations:
  */

That's only true in the debug case - there, preempt_disable() is used
inside the spin loop. But m68k is one of the last CONFIG_PREEMPT_NONE
archs AFAIR, and preempt_disable() reduces to barrier() on those.

M68k does have experimental preempt support. I have been running
that for the last 5 months. Works fine most of the time, except for
the one BUG[1] that happens every 10 boots or so.

[1] https://lore.kernel.org/all/CAMuHMdUQ72KOPw5vxNfhjoTR-SsaELeKneBmyQPYEWa_o5OZZA@xxxxxxxxxxxxxx

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds





[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux