On Thu, Jul 03, 2025 at 08:49:16PM +0000, Ruslan Bukin wrote:
> The branch main has been updated by br:
> 
> URL: 
> https://cgit.FreeBSD.org/src/commit/?id=906d7a4b521c19b2b1ae3ec844b5d4626f2fd529
> 
> commit 906d7a4b521c19b2b1ae3ec844b5d4626f2fd529
> Author:     Ruslan Bukin <b...@freebsd.org>
> AuthorDate: 2025-07-03 20:43:01 +0000
> Commit:     Ruslan Bukin <b...@freebsd.org>
> CommitDate: 2025-07-03 20:43:01 +0000
> 
>     hwt: fix !SMP build.
>     
>     Sponsored by:   UKRI
> ---
>  sys/dev/hwt/hwt_ioctl.c | 2 ++
>  sys/dev/hwt/hwt_vm.c    | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/sys/dev/hwt/hwt_ioctl.c b/sys/dev/hwt/hwt_ioctl.c
> index 04133838d292..592db4931bb4 100644
> --- a/sys/dev/hwt/hwt_ioctl.c
> +++ b/sys/dev/hwt/hwt_ioctl.c
> @@ -305,9 +305,11 @@ hwt_ioctl_alloc_mode_cpu(struct thread *td, struct 
> hwt_owner *ho,
>               return (error);
>  
>       CPU_FOREACH_ISSET(cpu_id, &cpu_map) {
> +#ifdef SMP
>               /* Ensure CPU is not halted. */
>               if (CPU_ISSET(cpu_id, &hlt_cpus_mask))
>                       return (ENXIO);
> +#endif
>  #if 0
>               /* TODO: Check if the owner have this cpu configured already. */
>               ctx = hwt_owner_lookup_ctx_by_cpu(ho, halloc->cpu);
> diff --git a/sys/dev/hwt/hwt_vm.c b/sys/dev/hwt/hwt_vm.c
> index a6799c30300d..6c55e218dcec 100644
> --- a/sys/dev/hwt/hwt_vm.c
> +++ b/sys/dev/hwt/hwt_vm.c
> @@ -213,9 +213,11 @@ hwt_vm_start_cpu_mode(struct hwt_context *ctx)
>       CPU_ZERO(&enable_cpus);
>  
>       CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) {
> +#ifdef SMP
>               /* Ensure CPU is not halted. */
>               if (CPU_ISSET(cpu_id, &hlt_cpus_mask))
>                       continue;
> +#endif
>  
>               hwt_backend_configure(ctx, cpu_id, cpu_id);
>  

This again raises a wonder: should we drop SMP option at all?

Reply via email to