[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH gnumach] smp: Fix unable to enter kdb during boot
From: |
Samuel Thibault |
Subject: |
Re: [PATCH gnumach] smp: Fix unable to enter kdb during boot |
Date: |
Sun, 11 Feb 2024 11:36:20 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Damien Zammit, le dim. 11 févr. 2024 07:09:03 +0000, a ecrit:
> ---
> i386/i386at/kd.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
> index 984d62e3..486dea67 100644
> --- a/i386/i386at/kd.c
> +++ b/i386/i386at/kd.c
> @@ -458,6 +458,7 @@ kdopen(
> kdinit();
> }
> tp->t_state |= TS_CARR_ON;
> + unmask_irq(KBD_IRQ);
> simple_unlock_irq(o_pri, &tp->t_lock);
> return (char_open(dev, tp, flag, ior));
> }
> @@ -485,6 +486,7 @@ kdclose(dev_t dev, int flag)
> spl_t s;
> s = simple_lock_irq(&tp->t_lock);
> ttyclose(tp);
> + mask_irq(KBD_IRQ);
> simple_unlock_irq(s, &tp->t_lock);
> }
Then we'll have two places that mask/unmask the irq without
coordination, that can only bring issues. I'd say that the unmask should
rather be done by the place which actually sets up the irq, kdinit.
Concerning the mask, since kd_initialized is never set to false, I'd say
we don't need any, and we can thus drop it from kbdclose.
Samuel