Re: [PATCH 5/6 gnumach] smp: Use HPET instead of pit one-shot that is unreliable

2024-02-05 Thread Samuel Thibault
ditto.

Damien Zammit, le lun. 05 févr. 2024 11:34:03 +, a ecrit:
> NB: Every x86 board that uses ACPI most likely has a HPET.
> We can roll back to PIT in the cases where its not present,
> but the PIT one shot code is definitely currently broken.
> ---
>  i386/i386/smp.c | 7 +++
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/i386/i386/smp.c b/i386/i386/smp.c
> index fb43ecb6..87f59913 100644
> --- a/i386/i386/smp.c
> +++ b/i386/i386/smp.c
> @@ -21,7 +21,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
>  #include 
> @@ -101,7 +100,7 @@ void smp_startup_cpu(unsigned apic_id, unsigned vector)
>  } while(lapic->icr_low.delivery_status == SEND_PENDING);
>  
>  /* Wait 10 msec */
> -pit_mdelay(10);
> +hpet_mdelay(10);
>  
>  /* Clear APIC errors */
>  lapic->error_status.r = 0;
> @@ -110,7 +109,7 @@ void smp_startup_cpu(unsigned apic_id, unsigned vector)
>  apic_send_ipi(NO_SHORTHAND, STARTUP, PHYSICAL, ASSERT, LEVEL, vector >> 
> 12, apic_id);
>  
>  /* Wait 200 usec */
> -pit_udelay(200);
> +hpet_udelay(200);
>  
>  /* Wait for delivery */
>  do {
> @@ -121,7 +120,7 @@ void smp_startup_cpu(unsigned apic_id, unsigned vector)
>  apic_send_ipi(NO_SHORTHAND, STARTUP, PHYSICAL, ASSERT, LEVEL, vector >> 
> 12, apic_id);
>  
>  /* Wait 200 usec */
> -pit_udelay(200);
> +hpet_udelay(200);
>  
>  /* Wait for delivery */
>  do {
> -- 
> 2.43.0
> 
> 
> 

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



[PATCH 5/6 gnumach] smp: Use HPET instead of pit one-shot that is unreliable

2024-02-05 Thread Damien Zammit
NB: Every x86 board that uses ACPI most likely has a HPET.
We can roll back to PIT in the cases where its not present,
but the PIT one shot code is definitely currently broken.
---
 i386/i386/smp.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/i386/i386/smp.c b/i386/i386/smp.c
index fb43ecb6..87f59913 100644
--- a/i386/i386/smp.c
+++ b/i386/i386/smp.c
@@ -21,7 +21,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -101,7 +100,7 @@ void smp_startup_cpu(unsigned apic_id, unsigned vector)
 } while(lapic->icr_low.delivery_status == SEND_PENDING);
 
 /* Wait 10 msec */
-pit_mdelay(10);
+hpet_mdelay(10);
 
 /* Clear APIC errors */
 lapic->error_status.r = 0;
@@ -110,7 +109,7 @@ void smp_startup_cpu(unsigned apic_id, unsigned vector)
 apic_send_ipi(NO_SHORTHAND, STARTUP, PHYSICAL, ASSERT, LEVEL, vector >> 
12, apic_id);
 
 /* Wait 200 usec */
-pit_udelay(200);
+hpet_udelay(200);
 
 /* Wait for delivery */
 do {
@@ -121,7 +120,7 @@ void smp_startup_cpu(unsigned apic_id, unsigned vector)
 apic_send_ipi(NO_SHORTHAND, STARTUP, PHYSICAL, ASSERT, LEVEL, vector >> 
12, apic_id);
 
 /* Wait 200 usec */
-pit_udelay(200);
+hpet_udelay(200);
 
 /* Wait for delivery */
 do {
-- 
2.43.0