bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH gnumach] kd: Handle masking of keyboard interrupt in the driv


From: Samuel Thibault
Subject: Re: [PATCH gnumach] kd: Handle masking of keyboard interrupt in the driver
Date: Sun, 1 Oct 2023 10:44:16 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Damien Zammit, le dim. 01 oct. 2023 04:57:40 +0000, a ecrit:
> ---
>  i386/i386at/kd.h        | 1 +
>  i386/i386at/kd_event.c  | 7 +++++++
>  i386/i386at/model_dep.c | 2 --
>  3 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/i386/i386at/kd.h b/i386/i386at/kd.h
> index 3ee707b5..5bfabce2 100644
> --- a/i386/i386at/kd.h
> +++ b/i386/i386at/kd.h
> @@ -546,6 +546,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  #define K_PDN                0x1b,0x5b,0x55
>  #define K_INS                0x1b,0x5b,0x40
>  
> +#define KBD_IRQ              1
>  
>  /*
>   * This array maps scancodes to Ascii characters (or character
> diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
> index 25a0ef35..d4809084 100644
> --- a/i386/i386at/kd_event.c
> +++ b/i386/i386at/kd_event.c
> @@ -66,6 +66,11 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  #include <i386/pio.h>
>  #include <i386at/kd.h>
>  #include <i386at/kd_queue.h>
> +#ifdef APIC
> +# include <i386/apic.h>
> +#else
> +# include <i386/pic.h>
> +#endif
>  
>  #include "kd_event.h"
>  
> @@ -116,6 +121,7 @@ kbdopen(dev_t dev, int flags, io_req_t ior)
>       kdinit();
>       splx(o_pri);
>       kbdinit();
> +     unmask_irq(KBD_IRQ);
>  
>       return(0);
>  }
> @@ -134,6 +140,7 @@ kbdclose(
>  {
>       spl_t s = SPLKD();
>  
> +     mask_irq(KBD_IRQ);
>       kb_mode = KB_ASCII;
>       kdq_reset(&kbd_queue);
>       splx(s);
> diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
> index 97acfdd6..d835999d 100644
> --- a/i386/i386at/model_dep.c
> +++ b/i386/i386at/model_dep.c
> @@ -171,8 +171,6 @@ void machine_init(void)
>  
>  #if defined(APIC)
>  #warning FIXME: Rather unmask them from their respective drivers
> -     /* kd */
> -     unmask_irq(1);
>       /* com0 */
>       unmask_irq(4);
>       /* com1 */
> -- 
> 2.40.1
> 
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]