Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 2026 21:10:24 -0600
From:      Kyle Evans <kevans@FreeBSD.org>
To:        Mitchell Horne <mhorne@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, Konstantin Belousov <kib@freebsd.org>
Subject:   Re: git: 0d3652f67d24 - main - sched_shim: Drop the no-ifunc case
Message-ID:  <f5881db8-a755-49ca-aaf4-2f4b6a8d9a63@FreeBSD.org>
In-Reply-To: <6984c635.1e072.359146aa@gitrepo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

On 2/5/26 10:32, Mitchell Horne wrote:
> The branch main has been updated by mhorne:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=0d3652f67d246348e2c017205c6782caf4484449
> 
> commit 0d3652f67d246348e2c017205c6782caf4484449
> Author:     Mitchell Horne <mhorne@FreeBSD.org>
> AuthorDate: 2026-02-05 16:12:03 +0000
> Commit:     Mitchell Horne <mhorne@FreeBSD.org>
> CommitDate: 2026-02-05 16:32:16 +0000
> 
>      sched_shim: Drop the no-ifunc case
>      
>      Now all architectures support kernel ifunc resolvers. Therefore, the
>      alternate implementation can be removed.
>      
>      Reviewed by:    kib
>      Sponsored by:   The FreeBSD Foundation
>      Differential Revision:  https://reviews.freebsd.org/D55114
> ---
>   sys/kern/sched_shim.c | 8 --------
>   1 file changed, 8 deletions(-)
> 

Hi,

I'm trying to mentally reconcile the commit message with the diff... shouldn't we have kept the `DEFINE_IFUNC` version if all architectures now support ifunc resolvers?  To the naked eye it looks like we removed the ifunc bits instead of the non-ifunc bits.

Thanks,

Kyle Evans

> diff --git a/sys/kern/sched_shim.c b/sys/kern/sched_shim.c
> index 83e4412494d3..2b1dcecda433 100644
> --- a/sys/kern/sched_shim.c
> +++ b/sys/kern/sched_shim.c
> @@ -22,20 +22,12 @@
>   
>   const struct sched_instance *active_sched;
>   
> -#ifndef __DO_NOT_HAVE_SYS_IFUNCS
> -#define	__DEFINE_SHIM(__m, __r, __n, __p, __a)	\
> -	DEFINE_IFUNC(, __r, __n, __p)		\
> -	{					\
> -		return (active_sched->__m);	\
> -	}
> -#else
>   #define	__DEFINE_SHIM(__m, __r, __n, __p, __a)	\
>   	__r					\
>   	__n __p					\
>   	{					\
>   		return (active_sched->__m __a);	\
>   	}
> -#endif
>   #define	DEFINE_SHIM0(__m, __r, __n)	\
>       __DEFINE_SHIM(__m, __r, __n, (void), ())
>   #define	DEFINE_SHIM1(__m, __r, __n, __t1, __a1)	\
> 



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f5881db8-a755-49ca-aaf4-2f4b6a8d9a63>