Re: git: 0d3652f67d24 - main - sched_shim: Drop the no-ifunc case
Date: Tue, 24 Feb 2026 03:10:24 UTC
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) \
>