bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH 1/3] x86_64: split SET_KERNEL_SEGMENTS() for NCPU > 1


From: Samuel Thibault
Subject: Re: [PATCH 1/3] x86_64: split SET_KERNEL_SEGMENTS() for NCPU > 1
Date: Sat, 9 Mar 2024 18:43:14 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Luca Dariz, le sam. 09 mars 2024 15:02:42 +0100, a ecrit:
> This allows 32on64 to work again. Also, it's a clearer indication of a
> missing part.
> ---
>  x86_64/locore.S | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/x86_64/locore.S b/x86_64/locore.S
> index 806762bb..8f39a677 100644
> --- a/x86_64/locore.S
> +++ b/x86_64/locore.S
> @@ -163,17 +163,21 @@
>  #define POP_SEGMENTS_ISR(reg)
>  #endif
>  
> +#if NCPUS > 1
> +#define SET_KERNEL_SEGMENTS(reg)                \
> +     ud2             /* TODO: use swapgs or similar */
> +#else // NCPUS > 1
>  #ifdef USER32
>  #define SET_KERNEL_SEGMENTS(reg)            \
>       mov     %ss,reg /* switch to kernel segments */ ;\
>       mov     reg,%ds /* (same as kernel stack segment) */ ;\
>       mov     reg,%es                 ;\
>       mov     reg,%fs                 ;\
> -     mov     $(PERCPU_DS),reg        ;\
>       mov     reg,%gs
> -#else
> +#else // USER32
>  #define SET_KERNEL_SEGMENTS(reg)
> -#endif
> +#endif // USER32
> +#endif // NCPUS > 1
>  
>  /*
>   * Fault recovery.
> -- 
> 2.39.2
> 
> 

-- 
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]