[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5 gnumach] linux: No need to init PIT timer twice
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 3/5 gnumach] linux: No need to init PIT timer twice |
Date: |
Wed, 1 Feb 2023 18:58:33 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Mmmm, I believe we do? linux_init() is called before
cpu_launch_first_thread(), and some Linux drivers may need the clock
ticking for their probing.
Note however that we don't plan to keep Linux drivers on the long run:
once rumpdisk is confirmed to be stable we'll just get rid of the Linux
drivers, so I'd say it's not worth trying to fix things here in the APIC
case.
Damien Zammit, le mer. 01 févr. 2023 10:05:58 +0000, a ecrit:
> ---
> linux/dev/arch/i386/kernel/irq.c | 12 ++----------
> linux/dev/init/main.c | 2 ++
> 2 files changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/linux/dev/arch/i386/kernel/irq.c
> b/linux/dev/arch/i386/kernel/irq.c
> index 67feea84..5f221da1 100644
> --- a/linux/dev/arch/i386/kernel/irq.c
> +++ b/linux/dev/arch/i386/kernel/irq.c
> @@ -421,7 +421,7 @@ reserve_mach_irqs (void)
> {
> unsigned int i;
>
> - for (i = 0; i < NINTR; i++)
> + for (i = 1; i < NINTR; i++)
> {
> if (ivect[i] != intnull)
> /* This dummy action does not specify SA_SHIRQ, so
> @@ -707,7 +707,6 @@ void
> init_IRQ (void)
> {
> char *p;
> - int latch = (CLKNUM + hz / 2) / hz;
>
> /*
> * Ensure interrupts are disabled.
> @@ -715,19 +714,12 @@ init_IRQ (void)
> (void) splhigh ();
>
> #ifndef APIC
> - /*
> - * Program counter 0 of 8253 to interrupt hz times per second.
> - */
> - outb_p (PIT_C0 | PIT_SQUAREMODE | PIT_READMODE, PITCTL_PORT);
> - outb_p (latch & 0xff, PITCTR0_PORT);
> - outb (latch >> 8, PITCTR0_PORT);
> -#endif
> -
> /*
> * Install our clock interrupt handler.
> */
> old_clock_handler = ivect[0];
> ivect[0] = linux_timer_intr;
> +#endif
>
> reserve_mach_irqs ();
>
> diff --git a/linux/dev/init/main.c b/linux/dev/init/main.c
> index 6d853957..207724f3 100644
> --- a/linux/dev/init/main.c
> +++ b/linux/dev/init/main.c
> @@ -160,7 +160,9 @@ linux_init (void)
> pcmcia_init ();
> #endif
>
> +#ifndef APIC
> restore_IRQ ();
> +#endif
>
> linux_auto_config = 0;
> }
> --
> 2.34.1
- Re: [PATCH 5/5 gnumach] linux: Skip probing IDE when 255 phys heads detected, (continued)
- [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Damien Zammit, 2023/02/01
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Almudena Garcia, 2023/02/01
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Samuel Thibault, 2023/02/01
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Almudena Garcia, 2023/02/02
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Damien Zammit, 2023/02/03
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Almudena Garcia, 2023/02/03
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Damien Zammit, 2023/02/03
- Re: [PATCH 2/5 gnumach] i386: Refactor int stacks to be per cpu for SMP, Samuel Thibault, 2023/02/04
[PATCH 3/5 gnumach] linux: No need to init PIT timer twice, Damien Zammit, 2023/02/01
- Re: [PATCH 3/5 gnumach] linux: No need to init PIT timer twice,
Samuel Thibault <=
Re: [PATCH 0/5 gnumach] Progress with SMP revisited, Almudena Garcia, 2023/02/01