Damien Zammit, le jeu. 10 juil. 2025 10:14:13 +0000, a ecrit:
> We need to wait first for pending to clear before sending
> the IPI assert signal.  Likewise, if we always do it this
> way, we don't need to wait for pending to clear afterward
> because next time we will wait again anyway.  Deassert does
> not seem necessary according to Intel SDM Vol 3, which
> says an IPI is sent when ICR low is written.
> 
> NB: This is not the same code as for STARTUP or INIT IPIs.

Applied, thanks!

> ---
>  i386/i386/smp.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/i386/i386/smp.c b/i386/i386/smp.c
> index 4513b7f2..dc3a8ba5 100644
> --- a/i386/i386/smp.c
> +++ b/i386/i386/smp.c
> @@ -54,17 +54,11 @@ static void smp_send_ipi(unsigned logical_id, unsigned 
> vector)
>  
>      cpu_intr_save(&flags);
>  
> -    apic_send_ipi(NO_SHORTHAND, FIXED, LOGICAL, ASSERT, EDGE, vector, 
> logical_id);
> -
>      do {
>          cpu_pause();
>      } while(lapic->icr_low.delivery_status == SEND_PENDING);
>  
> -    apic_send_ipi(NO_SHORTHAND, FIXED, LOGICAL, DE_ASSERT, EDGE, vector, 
> logical_id);
> -
> -    do {
> -        cpu_pause();
> -    } while(lapic->icr_low.delivery_status == SEND_PENDING);
> +    apic_send_ipi(NO_SHORTHAND, FIXED, LOGICAL, ASSERT, EDGE, vector, 
> logical_id);
>  
>      cpu_intr_restore(flags);
>  }
> -- 
> 2.45.2

Reply via email to