[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/6 gnumach] i386/apic: Fix condition on non-BSP
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 6/6 gnumach] i386/apic: Fix condition on non-BSP |
Date: |
Mon, 9 Dec 2024 22:39:44 +0100 |
Applied, thanks!
Damien Zammit via Bug reports for the GNU Hurd, le lun. 09 déc. 2024 12:18:02
+0000, a ecrit:
> The condition was intended for non-BSP processors to
> disable timer, but apic_id != 0 means it could affect BSP
> if its apic id is non-zero. Fixes this bug.
>
> ---
> i386/i386/apic.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/i386/i386/apic.c b/i386/i386/apic.c
> index 41b33599..7ec8c49b 100644
> --- a/i386/i386/apic.c
> +++ b/i386/i386/apic.c
> @@ -326,14 +326,11 @@ void
> lapic_setup(void)
> {
> unsigned long flags;
> - int apic_id;
> volatile uint32_t dummy;
> int cpu = cpu_number_slow();
>
> cpu_intr_save(&flags);
>
> - apic_id = apic_get_cpu_apic_id(cpu);
> -
> /* Flat model */
> dummy = lapic->dest_format.r;
> lapic->dest_format.r = 0xffffffff;
> @@ -348,7 +345,7 @@ lapic_setup(void)
> lapic->lvt_lint1.r = dummy | LAPIC_DISABLE;
> dummy = lapic->lvt_performance_monitor.r;
> lapic->lvt_performance_monitor.r = dummy | LAPIC_DISABLE;
> - if (apic_id != 0)
> + if (cpu > 0)
> {
> dummy = lapic->lvt_timer.r;
> lapic->lvt_timer.r = dummy | LAPIC_DISABLE;
> --
> 2.45.2
>
>
>
--
Samuel
<s> cool, j'ai un rapport a rendre pour le 31 decembre a minuit...
-+- #ens-mim - bonne année ! -+-
- Re: [PATCH 1/6 gnumach] i386/cpuboot: Simplify for legibility, (continued)
- [PATCH 2/6 gnumach] i386/cpuboot: Dont use CPU_NUMBER_NO_STACK() early, Damien Zammit, 2024/12/09
- [PATCH 3/6 gnumach] i386/cpuboot: Write gs selector correctly, Damien Zammit, 2024/12/09
- [PATCH 4/6 gnumach] pmap: Separate temporary_mapping from set_page_dir, Damien Zammit, 2024/12/09
- [PATCH 5/6 gnumach] smp: Use logical destination not physical apic id, Damien Zammit, 2024/12/09
- [PATCH 6/6 gnumach] i386/apic: Fix condition on non-BSP, Damien Zammit, 2024/12/09
- Re: [PATCH 6/6 gnumach] i386/apic: Fix condition on non-BSP,
Samuel Thibault <=