aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2019-05-16 22:20:54 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2019-05-16 22:20:54 +0000
commit7c5a46a1bc4b705064ced073b0d86a3dc4717f94 (patch)
treef270bec2d6f75bd941cb0c59317a6fd173d0ce18
parent11f8f36fb9b2126dad9da6af6f6cc6200362b968 (diff)
downloadsrc-7c5a46a1bc4b705064ced073b0d86a3dc4717f94.tar.gz
src-7c5a46a1bc4b705064ced073b0d86a3dc4717f94.zip
Remove resolver_qual from DEFINE_IFUNC/DEFINE_UIFUNC macros.
In all practical situations, the resolver visibility is static. Requested by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: so (emaste) Differential revision: https://reviews.freebsd.org/D20281
Notes
Notes: svn path=/head/; revision=347895
-rw-r--r--lib/libc/amd64/sys/amd64_get_fsbase.c2
-rw-r--r--lib/libc/amd64/sys/amd64_get_gsbase.c2
-rw-r--r--lib/libc/amd64/sys/amd64_set_fsbase.c2
-rw-r--r--lib/libc/amd64/sys/amd64_set_gsbase.c2
-rw-r--r--lib/libc/x86/gen/getcontextx.c4
-rw-r--r--lib/libc/x86/sys/__vdso_gettc.c2
-rw-r--r--lib/libc/x86/sys/pkru.c4
-rw-r--r--sys/amd64/amd64/copyout.c32
-rw-r--r--sys/amd64/amd64/fpu.c4
-rw-r--r--sys/amd64/amd64/machdep.c11
-rw-r--r--sys/amd64/amd64/pmap.c26
-rw-r--r--sys/amd64/linux/linux_machdep.c10
-rw-r--r--sys/amd64/linux32/linux32_machdep.c10
-rw-r--r--sys/arm64/include/ifunc.h12
-rw-r--r--sys/cddl/dev/dtrace/amd64/dtrace_isa.c14
-rw-r--r--sys/dev/random/ivy.c2
-rw-r--r--sys/i386/i386/npx.c2
-rw-r--r--sys/i386/i386/pmap_base.c3
-rw-r--r--sys/x86/include/ifunc.h14
19 files changed, 76 insertions, 82 deletions
diff --git a/lib/libc/amd64/sys/amd64_get_fsbase.c b/lib/libc/amd64/sys/amd64_get_fsbase.c
index 65c885968132..2de99912daf2 100644
--- a/lib/libc/amd64/sys/amd64_get_fsbase.c
+++ b/lib/libc/amd64/sys/amd64_get_fsbase.c
@@ -57,7 +57,7 @@ amd64_get_fsbase_syscall(void **addr)
return (sysarch(AMD64_GET_FSBASE, addr));
}
-DEFINE_UIFUNC(, int, amd64_get_fsbase, (void **), static)
+DEFINE_UIFUNC(, int, amd64_get_fsbase, (void **))
{
if (__getosreldate() >= P_OSREL_WRFSBASE &&
diff --git a/lib/libc/amd64/sys/amd64_get_gsbase.c b/lib/libc/amd64/sys/amd64_get_gsbase.c
index 93a5b15d7448..0deac34c90d1 100644
--- a/lib/libc/amd64/sys/amd64_get_gsbase.c
+++ b/lib/libc/amd64/sys/amd64_get_gsbase.c
@@ -57,7 +57,7 @@ amd64_get_gsbase_syscall(void **addr)
return (sysarch(AMD64_GET_GSBASE, addr));
}
-DEFINE_UIFUNC(, int, amd64_get_gsbase, (void **), static)
+DEFINE_UIFUNC(, int, amd64_get_gsbase, (void **))
{
if (__getosreldate() >= P_OSREL_WRFSBASE &&
diff --git a/lib/libc/amd64/sys/amd64_set_fsbase.c b/lib/libc/amd64/sys/amd64_set_fsbase.c
index 5361d81db945..02ca9233d855 100644
--- a/lib/libc/amd64/sys/amd64_set_fsbase.c
+++ b/lib/libc/amd64/sys/amd64_set_fsbase.c
@@ -57,7 +57,7 @@ amd64_set_fsbase_syscall(void *addr)
return (sysarch(AMD64_SET_FSBASE, &addr));
}
-DEFINE_UIFUNC(, int, amd64_set_fsbase, (void *), static)
+DEFINE_UIFUNC(, int, amd64_set_fsbase, (void *))
{
if (__getosreldate() >= P_OSREL_WRFSBASE &&
diff --git a/lib/libc/amd64/sys/amd64_set_gsbase.c b/lib/libc/amd64/sys/amd64_set_gsbase.c
index 039c021aae7e..c4880c126ae9 100644
--- a/lib/libc/amd64/sys/amd64_set_gsbase.c
+++ b/lib/libc/amd64/sys/amd64_set_gsbase.c
@@ -57,7 +57,7 @@ amd64_set_gsbase_syscall(void *addr)
return (sysarch(AMD64_SET_GSBASE, &addr));
}
-DEFINE_UIFUNC(, int, amd64_set_gsbase, (void *), static)
+DEFINE_UIFUNC(, int, amd64_set_gsbase, (void *))
{
if (__getosreldate() >= P_OSREL_WRFSBASE &&
diff --git a/lib/libc/x86/gen/getcontextx.c b/lib/libc/x86/gen/getcontextx.c
index e9060bac44ad..056128a149ff 100644
--- a/lib/libc/x86/gen/getcontextx.c
+++ b/lib/libc/x86/gen/getcontextx.c
@@ -61,7 +61,7 @@ __getcontextx_size_xfpu(void)
return (sizeof(ucontext_t) + xstate_sz);
}
-DEFINE_UIFUNC(, int, __getcontextx_size, (void), static)
+DEFINE_UIFUNC(, int, __getcontextx_size, (void))
{
u_int p[4];
@@ -100,7 +100,7 @@ __fillcontextx2_noxfpu(char *ctx)
return (0);
}
-DEFINE_UIFUNC(, int, __fillcontextx2, (char *), static)
+DEFINE_UIFUNC(, int, __fillcontextx2, (char *))
{
return ((cpu_feature2 & CPUID2_OSXSAVE) != 0 ? __fillcontextx2_xfpu :
diff --git a/lib/libc/x86/sys/__vdso_gettc.c b/lib/libc/x86/sys/__vdso_gettc.c
index 0781e97e2ce5..7a958ca256da 100644
--- a/lib/libc/x86/sys/__vdso_gettc.c
+++ b/lib/libc/x86/sys/__vdso_gettc.c
@@ -72,7 +72,7 @@ rdtsc_mb_none(void)
{
}
-DEFINE_UIFUNC(static, void, rdtsc_mb, (void), static)
+DEFINE_UIFUNC(static, void, rdtsc_mb, (void))
{
u_int p[4];
/* Not a typo, string matches our do_cpuid() registers use. */
diff --git a/lib/libc/x86/sys/pkru.c b/lib/libc/x86/sys/pkru.c
index 6aa3cbf95767..28ce93389fd0 100644
--- a/lib/libc/x86/sys/pkru.c
+++ b/lib/libc/x86/sys/pkru.c
@@ -71,7 +71,7 @@ x86_pkru_get_perm_hw(u_int keyidx, int *access, int *modify)
return (0);
}
-DEFINE_UIFUNC(, int, x86_pkru_get_perm, (u_int, int *, int *), static)
+DEFINE_UIFUNC(, int, x86_pkru_get_perm, (u_int, int *, int *))
{
return ((cpu_stdext_feature2 & CPUID_STDEXT2_OSPKE) == 0 ?
@@ -106,7 +106,7 @@ x86_pkru_set_perm_hw(u_int keyidx, int access, int modify)
return (0);
}
-DEFINE_UIFUNC(, int, x86_pkru_set_perm, (u_int, int, int), static)
+DEFINE_UIFUNC(, int, x86_pkru_set_perm, (u_int, int, int))
{
return ((cpu_stdext_feature2 & CPUID_STDEXT2_OSPKE) == 0 ?
diff --git a/sys/amd64/amd64/copyout.c b/sys/amd64/amd64/copyout.c
index 59b7ad5c1307..d4464e2c39f9 100644
--- a/sys/amd64/amd64/copyout.c
+++ b/sys/amd64/amd64/copyout.c
@@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
int fubyte_nosmap(volatile const void *base);
int fubyte_smap(volatile const void *base);
-DEFINE_IFUNC(, int, fubyte, (volatile const void *), static)
+DEFINE_IFUNC(, int, fubyte, (volatile const void *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -50,7 +50,7 @@ DEFINE_IFUNC(, int, fubyte, (volatile const void *), static)
int fuword16_nosmap(volatile const void *base);
int fuword16_smap(volatile const void *base);
-DEFINE_IFUNC(, int, fuword16, (volatile const void *), static)
+DEFINE_IFUNC(, int, fuword16, (volatile const void *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -59,13 +59,13 @@ DEFINE_IFUNC(, int, fuword16, (volatile const void *), static)
int fueword_nosmap(volatile const void *base, long *val);
int fueword_smap(volatile const void *base, long *val);
-DEFINE_IFUNC(, int, fueword, (volatile const void *, long *), static)
+DEFINE_IFUNC(, int, fueword, (volatile const void *, long *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
fueword_smap : fueword_nosmap);
}
-DEFINE_IFUNC(, int, fueword64, (volatile const void *, int64_t *), static)
+DEFINE_IFUNC(, int, fueword64, (volatile const void *, int64_t *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -74,7 +74,7 @@ DEFINE_IFUNC(, int, fueword64, (volatile const void *, int64_t *), static)
int fueword32_nosmap(volatile const void *base, int32_t *val);
int fueword32_smap(volatile const void *base, int32_t *val);
-DEFINE_IFUNC(, int, fueword32, (volatile const void *, int32_t *), static)
+DEFINE_IFUNC(, int, fueword32, (volatile const void *, int32_t *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -83,7 +83,7 @@ DEFINE_IFUNC(, int, fueword32, (volatile const void *, int32_t *), static)
int subyte_nosmap(volatile void *base, int byte);
int subyte_smap(volatile void *base, int byte);
-DEFINE_IFUNC(, int, subyte, (volatile void *, int), static)
+DEFINE_IFUNC(, int, subyte, (volatile void *, int))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -92,7 +92,7 @@ DEFINE_IFUNC(, int, subyte, (volatile void *, int), static)
int suword16_nosmap(volatile void *base, int word);
int suword16_smap(volatile void *base, int word);
-DEFINE_IFUNC(, int, suword16, (volatile void *, int), static)
+DEFINE_IFUNC(, int, suword16, (volatile void *, int))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -101,7 +101,7 @@ DEFINE_IFUNC(, int, suword16, (volatile void *, int), static)
int suword32_nosmap(volatile void *base, int32_t word);
int suword32_smap(volatile void *base, int32_t word);
-DEFINE_IFUNC(, int, suword32, (volatile void *, int32_t), static)
+DEFINE_IFUNC(, int, suword32, (volatile void *, int32_t))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -110,13 +110,13 @@ DEFINE_IFUNC(, int, suword32, (volatile void *, int32_t), static)
int suword_nosmap(volatile void *base, long word);
int suword_smap(volatile void *base, long word);
-DEFINE_IFUNC(, int, suword, (volatile void *, long), static)
+DEFINE_IFUNC(, int, suword, (volatile void *, long))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
suword_smap : suword_nosmap);
}
-DEFINE_IFUNC(, int, suword64, (volatile void *, int64_t), static)
+DEFINE_IFUNC(, int, suword64, (volatile void *, int64_t))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -128,7 +128,7 @@ int casueword32_nosmap(volatile uint32_t *base, uint32_t oldval,
int casueword32_smap(volatile uint32_t *base, uint32_t oldval,
uint32_t *oldvalp, uint32_t newval);
DEFINE_IFUNC(, int, casueword32, (volatile uint32_t *, uint32_t, uint32_t *,
- uint32_t), static)
+ uint32_t))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -139,8 +139,7 @@ int casueword_nosmap(volatile u_long *p, u_long oldval, u_long *oldvalp,
u_long newval);
int casueword_smap(volatile u_long *p, u_long oldval, u_long *oldvalp,
u_long newval);
-DEFINE_IFUNC(, int, casueword, (volatile u_long *, u_long, u_long *, u_long),
- static)
+DEFINE_IFUNC(, int, casueword, (volatile u_long *, u_long, u_long *, u_long))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -151,8 +150,7 @@ int copyinstr_nosmap(const void *udaddr, void *kaddr, size_t len,
size_t *lencopied);
int copyinstr_smap(const void *udaddr, void *kaddr, size_t len,
size_t *lencopied);
-DEFINE_IFUNC(, int, copyinstr, (const void *, void *, size_t, size_t *),
- static)
+DEFINE_IFUNC(, int, copyinstr, (const void *, void *, size_t, size_t *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -163,7 +161,7 @@ int copyin_nosmap_std(const void *udaddr, void *kaddr, size_t len);
int copyin_smap_std(const void *udaddr, void *kaddr, size_t len);
int copyin_nosmap_erms(const void *udaddr, void *kaddr, size_t len);
int copyin_smap_erms(const void *udaddr, void *kaddr, size_t len);
-DEFINE_IFUNC(, int, copyin, (const void *, void *, size_t), static)
+DEFINE_IFUNC(, int, copyin, (const void *, void *, size_t))
{
switch (cpu_stdext_feature & (CPUID_STDEXT_SMAP | CPUID_STDEXT_ERMS)) {
@@ -183,7 +181,7 @@ int copyout_nosmap_std(const void *kaddr, void *udaddr, size_t len);
int copyout_smap_std(const void *kaddr, void *udaddr, size_t len);
int copyout_nosmap_erms(const void *kaddr, void *udaddr, size_t len);
int copyout_smap_erms(const void *kaddr, void *udaddr, size_t len);
-DEFINE_IFUNC(, int, copyout, (const void *, void *, size_t), static)
+DEFINE_IFUNC(, int, copyout, (const void *, void *, size_t))
{
switch (cpu_stdext_feature & (CPUID_STDEXT_SMAP | CPUID_STDEXT_ERMS)) {
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index 1bd7a33bac6d..dc97534a2e06 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -216,7 +216,7 @@ init_xsave(void)
TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave);
}
-DEFINE_IFUNC(, void, fpusave, (void *), static)
+DEFINE_IFUNC(, void, fpusave, (void *))
{
init_xsave();
@@ -226,7 +226,7 @@ DEFINE_IFUNC(, void, fpusave, (void *), static)
return (fpusave_fxsave);
}
-DEFINE_IFUNC(, void, fpurestore, (void *), static)
+DEFINE_IFUNC(, void, fpurestore, (void *))
{
init_xsave();
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 9162a7866c74..1cf09dc5cb71 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -2653,7 +2653,7 @@ set_pcb_flags_fsgsbase(struct pcb *pcb, const u_int flags)
}
}
-DEFINE_IFUNC(, void, set_pcb_flags, (struct pcb *, const u_int), static)
+DEFINE_IFUNC(, void, set_pcb_flags, (struct pcb *, const u_int))
{
return ((cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0 ?
@@ -2700,7 +2700,7 @@ outb_(u_short port, u_char data)
void *memset_std(void *buf, int c, size_t len);
void *memset_erms(void *buf, int c, size_t len);
-DEFINE_IFUNC(, void *, memset, (void *, int, size_t), static)
+DEFINE_IFUNC(, void *, memset, (void *, int, size_t))
{
return ((cpu_stdext_feature & CPUID_STDEXT_ERMS) != 0 ?
@@ -2712,7 +2712,7 @@ void *memmove_std(void * _Nonnull dst, const void * _Nonnull src,
void *memmove_erms(void * _Nonnull dst, const void * _Nonnull src,
size_t len);
DEFINE_IFUNC(, void *, memmove, (void * _Nonnull, const void * _Nonnull,
- size_t), static)
+ size_t))
{
return ((cpu_stdext_feature & CPUID_STDEXT_ERMS) != 0 ?
@@ -2723,8 +2723,7 @@ void *memcpy_std(void * _Nonnull dst, const void * _Nonnull src,
size_t len);
void *memcpy_erms(void * _Nonnull dst, const void * _Nonnull src,
size_t len);
-DEFINE_IFUNC(, void *, memcpy, (void * _Nonnull, const void * _Nonnull,size_t),
- static)
+DEFINE_IFUNC(, void *, memcpy, (void * _Nonnull, const void * _Nonnull,size_t))
{
return ((cpu_stdext_feature & CPUID_STDEXT_ERMS) != 0 ?
@@ -2733,7 +2732,7 @@ DEFINE_IFUNC(, void *, memcpy, (void * _Nonnull, const void * _Nonnull,size_t),
void pagezero_std(void *addr);
void pagezero_erms(void *addr);
-DEFINE_IFUNC(, void , pagezero, (void *), static)
+DEFINE_IFUNC(, void , pagezero, (void *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_ERMS) != 0 ?
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index a4e9790bbc09..7997a9f65dc7 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -512,7 +512,7 @@ SYSCTL_PROC(_vm_pmap, OID_AUTO, di_locked, CTLTYPE_INT | CTLFLAG_RDTUN |
static bool pmap_not_in_di_l(void);
static bool pmap_not_in_di_u(void);
-DEFINE_IFUNC(, bool, pmap_not_in_di, (void), static)
+DEFINE_IFUNC(, bool, pmap_not_in_di, (void))
{
return (pmap_di_locked() ? pmap_not_in_di_l : pmap_not_in_di_u);
@@ -953,28 +953,28 @@ pmap_delayed_invl_wait_u(vm_page_t m)
}
}
-DEFINE_IFUNC(, void, pmap_thread_init_invl_gen, (struct thread *), static)
+DEFINE_IFUNC(, void, pmap_thread_init_invl_gen, (struct thread *))
{
return (pmap_di_locked() ? pmap_thread_init_invl_gen_l :
pmap_thread_init_invl_gen_u);
}
-DEFINE_IFUNC(static, void, pmap_delayed_invl_start, (void), static)
+DEFINE_IFUNC(static, void, pmap_delayed_invl_start, (void))
{
return (pmap_di_locked() ? pmap_delayed_invl_start_l :
pmap_delayed_invl_start_u);
}
-DEFINE_IFUNC(static, void, pmap_delayed_invl_finish, (void), static)
+DEFINE_IFUNC(static, void, pmap_delayed_invl_finish, (void))
{
return (pmap_di_locked() ? pmap_delayed_invl_finish_l :
pmap_delayed_invl_finish_u);
}
-DEFINE_IFUNC(static, void, pmap_delayed_invl_wait, (vm_page_t), static)
+DEFINE_IFUNC(static, void, pmap_delayed_invl_wait, (vm_page_t))
{
return (pmap_di_locked() ? pmap_delayed_invl_wait_l :
@@ -2197,8 +2197,7 @@ pmap_invalidate_page_nopcid(pmap_t pmap, vm_offset_t va)
{
}
-DEFINE_IFUNC(static, void, pmap_invalidate_page_mode, (pmap_t, vm_offset_t),
- static)
+DEFINE_IFUNC(static, void, pmap_invalidate_page_mode, (pmap_t, vm_offset_t))
{
if (pmap_pcid_enabled)
@@ -2295,7 +2294,7 @@ pmap_invalidate_range_nopcid(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
}
DEFINE_IFUNC(static, void, pmap_invalidate_range_mode, (pmap_t, vm_offset_t,
- vm_offset_t), static)
+ vm_offset_t))
{
if (pmap_pcid_enabled)
@@ -2412,7 +2411,7 @@ pmap_invalidate_all_nopcid(pmap_t pmap)
invltlb();
}
-DEFINE_IFUNC(static, void, pmap_invalidate_all_mode, (pmap_t), static)
+DEFINE_IFUNC(static, void, pmap_invalidate_all_mode, (pmap_t))
{
if (pmap_pcid_enabled)
@@ -2691,7 +2690,7 @@ pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pd_entry_t pde)
}
DEFINE_IFUNC(, void, pmap_invalidate_cache_range,
- (vm_offset_t sva, vm_offset_t eva), static)
+ (vm_offset_t sva, vm_offset_t eva))
{
if ((cpu_feature & CPUID_SS) != 0)
@@ -8284,7 +8283,7 @@ pmap_activate_sw_nopcid_pti(struct thread *td, pmap_t pmap,
}
DEFINE_IFUNC(static, void, pmap_activate_sw_mode, (struct thread *, pmap_t,
- u_int), static)
+ u_int))
{
if (pmap_pcid_enabled && pti && invpcid_works)
@@ -8981,7 +8980,7 @@ pmap_large_map_wb_fence_nop(void)
{
}
-DEFINE_IFUNC(static, void, pmap_large_map_wb_fence, (void), static)
+DEFINE_IFUNC(static, void, pmap_large_map_wb_fence, (void))
{
if (cpu_vendor_id != CPU_VENDOR_INTEL)
@@ -9026,8 +9025,7 @@ pmap_large_map_flush_range_nop(vm_offset_t sva __unused, vm_size_t len __unused)
{
}
-DEFINE_IFUNC(static, void, pmap_large_map_flush_range, (vm_offset_t, vm_size_t),
- static)
+DEFINE_IFUNC(static, void, pmap_large_map_flush_range, (vm_offset_t, vm_size_t))
{
if ((cpu_stdext_feature & CPUID_STDEXT_CLWB) != 0)
diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c
index d52ad37a3469..7b3512bfe41a 100644
--- a/sys/amd64/linux/linux_machdep.c
+++ b/sys/amd64/linux/linux_machdep.c
@@ -284,7 +284,7 @@ linux_set_cloned_tls(struct thread *td, void *desc)
int futex_xchgl_nosmap(int oparg, uint32_t *uaddr, int *oldval);
int futex_xchgl_smap(int oparg, uint32_t *uaddr, int *oldval);
-DEFINE_IFUNC(, int, futex_xchgl, (int, uint32_t *, int *), static)
+DEFINE_IFUNC(, int, futex_xchgl, (int, uint32_t *, int *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -293,7 +293,7 @@ DEFINE_IFUNC(, int, futex_xchgl, (int, uint32_t *, int *), static)
int futex_addl_nosmap(int oparg, uint32_t *uaddr, int *oldval);
int futex_addl_smap(int oparg, uint32_t *uaddr, int *oldval);
-DEFINE_IFUNC(, int, futex_addl, (int, uint32_t *, int *), static)
+DEFINE_IFUNC(, int, futex_addl, (int, uint32_t *, int *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -302,7 +302,7 @@ DEFINE_IFUNC(, int, futex_addl, (int, uint32_t *, int *), static)
int futex_orl_nosmap(int oparg, uint32_t *uaddr, int *oldval);
int futex_orl_smap(int oparg, uint32_t *uaddr, int *oldval);
-DEFINE_IFUNC(, int, futex_orl, (int, uint32_t *, int *), static)
+DEFINE_IFUNC(, int, futex_orl, (int, uint32_t *, int *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -311,7 +311,7 @@ DEFINE_IFUNC(, int, futex_orl, (int, uint32_t *, int *), static)
int futex_andl_nosmap(int oparg, uint32_t *uaddr, int *oldval);
int futex_andl_smap(int oparg, uint32_t *uaddr, int *oldval);
-DEFINE_IFUNC(, int, futex_andl, (int, uint32_t *, int *), static)
+DEFINE_IFUNC(, int, futex_andl, (int, uint32_t *, int *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -320,7 +320,7 @@ DEFINE_IFUNC(, int, futex_andl, (int, uint32_t *, int *), static)
int futex_xorl_nosmap(int oparg, uint32_t *uaddr, int *oldval);
int futex_xorl_smap(int oparg, uint32_t *uaddr, int *oldval);
-DEFINE_IFUNC(, int, futex_xorl, (int, uint32_t *, int *), static)
+DEFINE_IFUNC(, int, futex_xorl, (int, uint32_t *, int *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c
index d6bb4eefd2f5..10cd7344a0a7 100644
--- a/sys/amd64/linux32/linux32_machdep.c
+++ b/sys/amd64/linux32/linux32_machdep.c
@@ -739,7 +739,7 @@ linux_set_thread_area(struct thread *td,
int futex_xchgl_nosmap(int oparg, uint32_t *uaddr, int *oldval);
int futex_xchgl_smap(int oparg, uint32_t *uaddr, int *oldval);
-DEFINE_IFUNC(, int, futex_xchgl, (int, uint32_t *, int *), static)
+DEFINE_IFUNC(, int, futex_xchgl, (int, uint32_t *, int *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -748,7 +748,7 @@ DEFINE_IFUNC(, int, futex_xchgl, (int, uint32_t *, int *), static)
int futex_addl_nosmap(int oparg, uint32_t *uaddr, int *oldval);
int futex_addl_smap(int oparg, uint32_t *uaddr, int *oldval);
-DEFINE_IFUNC(, int, futex_addl, (int, uint32_t *, int *), static)
+DEFINE_IFUNC(, int, futex_addl, (int, uint32_t *, int *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -757,7 +757,7 @@ DEFINE_IFUNC(, int, futex_addl, (int, uint32_t *, int *), static)
int futex_orl_nosmap(int oparg, uint32_t *uaddr, int *oldval);
int futex_orl_smap(int oparg, uint32_t *uaddr, int *oldval);
-DEFINE_IFUNC(, int, futex_orl, (int, uint32_t *, int *), static)
+DEFINE_IFUNC(, int, futex_orl, (int, uint32_t *, int *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -766,7 +766,7 @@ DEFINE_IFUNC(, int, futex_orl, (int, uint32_t *, int *), static)
int futex_andl_nosmap(int oparg, uint32_t *uaddr, int *oldval);
int futex_andl_smap(int oparg, uint32_t *uaddr, int *oldval);
-DEFINE_IFUNC(, int, futex_andl, (int, uint32_t *, int *), static)
+DEFINE_IFUNC(, int, futex_andl, (int, uint32_t *, int *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -775,7 +775,7 @@ DEFINE_IFUNC(, int, futex_andl, (int, uint32_t *, int *), static)
int futex_xorl_nosmap(int oparg, uint32_t *uaddr, int *oldval);
int futex_xorl_smap(int oparg, uint32_t *uaddr, int *oldval);
-DEFINE_IFUNC(, int, futex_xorl, (int, uint32_t *, int *), static)
+DEFINE_IFUNC(, int, futex_xorl, (int, uint32_t *, int *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
diff --git a/sys/arm64/include/ifunc.h b/sys/arm64/include/ifunc.h
index 2ce29154180b..cf89af7c7142 100644
--- a/sys/arm64/include/ifunc.h
+++ b/sys/arm64/include/ifunc.h
@@ -32,17 +32,17 @@
#ifndef __ARM64_IFUNC_H
#define __ARM64_IFUNC_H
-#define DEFINE_IFUNC(qual, ret_type, name, args, resolver_qual) \
- resolver_qual ret_type (*name##_resolver(void))args __used; \
+#define DEFINE_IFUNC(qual, ret_type, name, args) \
+ static ret_type (*name##_resolver(void))args __used; \
qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \
- resolver_qual ret_type (*name##_resolver(void))args
+ static ret_type (*name##_resolver(void))args
-#define DEFINE_UIFUNC(qual, ret_type, name, args, resolver_qual) \
- resolver_qual ret_type (*name##_resolver(uint64_t, uint64_t, \
+#define DEFINE_UIFUNC(qual, ret_type, name, args) \
+ static ret_type (*name##_resolver(uint64_t, uint64_t, \
uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, \
uint64_t))args __used; \
qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \
- resolver_qual ret_type (*name##_resolver(uint64_t _arg1 __unused, \
+ static ret_type (*name##_resolver(uint64_t _arg1 __unused, \
uint64_t _arg2 __unused, uint64_t _arg3 __unused, \
uint64_t _arg4 __unused, uint64_t _arg5 __unused, \
uint64_t _arg6 __unused, uint64_t _arg7 __unused, \
diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
index e8fa16184398..e5c6e226318e 100644
--- a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
+++ b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
@@ -671,7 +671,7 @@ dtrace_fuword64(void *uaddr)
*/
void dtrace_copy_nosmap(uintptr_t, uintptr_t, size_t);
void dtrace_copy_smap(uintptr_t, uintptr_t, size_t);
-DEFINE_IFUNC(, void, dtrace_copy, (uintptr_t, uintptr_t, size_t), static)
+DEFINE_IFUNC(, void, dtrace_copy, (uintptr_t, uintptr_t, size_t))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -681,7 +681,7 @@ DEFINE_IFUNC(, void, dtrace_copy, (uintptr_t, uintptr_t, size_t), static)
void dtrace_copystr_nosmap(uintptr_t, uintptr_t, size_t, volatile uint16_t *);
void dtrace_copystr_smap(uintptr_t, uintptr_t, size_t, volatile uint16_t *);
DEFINE_IFUNC(, void, dtrace_copystr, (uintptr_t, uintptr_t, size_t,
- volatile uint16_t *), static)
+ volatile uint16_t *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -690,7 +690,7 @@ DEFINE_IFUNC(, void, dtrace_copystr, (uintptr_t, uintptr_t, size_t,
uintptr_t dtrace_fulword_nosmap(void *);
uintptr_t dtrace_fulword_smap(void *);
-DEFINE_IFUNC(, uintptr_t, dtrace_fulword, (void *), static)
+DEFINE_IFUNC(, uintptr_t, dtrace_fulword, (void *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -699,7 +699,7 @@ DEFINE_IFUNC(, uintptr_t, dtrace_fulword, (void *), static)
uint8_t dtrace_fuword8_nocheck_nosmap(void *);
uint8_t dtrace_fuword8_nocheck_smap(void *);
-DEFINE_IFUNC(, uint8_t, dtrace_fuword8_nocheck, (void *), static)
+DEFINE_IFUNC(, uint8_t, dtrace_fuword8_nocheck, (void *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -708,7 +708,7 @@ DEFINE_IFUNC(, uint8_t, dtrace_fuword8_nocheck, (void *), static)
uint16_t dtrace_fuword16_nocheck_nosmap(void *);
uint16_t dtrace_fuword16_nocheck_smap(void *);
-DEFINE_IFUNC(, uint16_t, dtrace_fuword16_nocheck, (void *), static)
+DEFINE_IFUNC(, uint16_t, dtrace_fuword16_nocheck, (void *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -717,7 +717,7 @@ DEFINE_IFUNC(, uint16_t, dtrace_fuword16_nocheck, (void *), static)
uint32_t dtrace_fuword32_nocheck_nosmap(void *);
uint32_t dtrace_fuword32_nocheck_smap(void *);
-DEFINE_IFUNC(, uint32_t, dtrace_fuword32_nocheck, (void *), static)
+DEFINE_IFUNC(, uint32_t, dtrace_fuword32_nocheck, (void *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
@@ -726,7 +726,7 @@ DEFINE_IFUNC(, uint32_t, dtrace_fuword32_nocheck, (void *), static)
uint64_t dtrace_fuword64_nocheck_nosmap(void *);
uint64_t dtrace_fuword64_nocheck_smap(void *);
-DEFINE_IFUNC(, uint64_t, dtrace_fuword64_nocheck, (void *), static)
+DEFINE_IFUNC(, uint64_t, dtrace_fuword64_nocheck, (void *))
{
return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ?
diff --git a/sys/dev/random/ivy.c b/sys/dev/random/ivy.c
index a85cc1e8996f..9c641ddff024 100644
--- a/sys/dev/random/ivy.c
+++ b/sys/dev/random/ivy.c
@@ -104,7 +104,7 @@ x86_unimpl_store(u_long *buf __unused)
panic("%s called", __func__);
}
-DEFINE_IFUNC(static, int, x86_rng_store, (u_long *buf), static)
+DEFINE_IFUNC(static, int, x86_rng_store, (u_long *buf))
{
has_rdrand = (cpu_feature2 & CPUID2_RDRAND);
has_rdseed = (cpu_stdext_feature & CPUID_STDEXT_RDSEED);
diff --git a/sys/i386/i386/npx.c b/sys/i386/i386/npx.c
index d5ce4fe5513a..760d931d40e4 100644
--- a/sys/i386/i386/npx.c
+++ b/sys/i386/i386/npx.c
@@ -352,7 +352,7 @@ init_xsave(void)
TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave);
}
-DEFINE_IFUNC(, void, fpusave, (union savefpu *), static)
+DEFINE_IFUNC(, void, fpusave, (union savefpu *))
{
init_xsave();
diff --git a/sys/i386/i386/pmap_base.c b/sys/i386/i386/pmap_base.c
index 299ec9961f4c..3e9891e8ea93 100644
--- a/sys/i386/i386/pmap_base.c
+++ b/sys/i386/i386/pmap_base.c
@@ -288,8 +288,7 @@ pmap_flush_page(vm_page_t m)
pmap_methods_ptr->pm_flush_page(m);
}
-DEFINE_IFUNC(, void, pmap_invalidate_cache_range, (vm_offset_t, vm_offset_t),
- static)
+DEFINE_IFUNC(, void, pmap_invalidate_cache_range, (vm_offset_t, vm_offset_t))
{
if ((cpu_feature & CPUID_SS) != 0)
diff --git a/sys/x86/include/ifunc.h b/sys/x86/include/ifunc.h
index 38c82570770e..690d491d39b9 100644
--- a/sys/x86/include/ifunc.h
+++ b/sys/x86/include/ifunc.h
@@ -32,16 +32,16 @@
#ifndef __X86_IFUNC_H
#define __X86_IFUNC_H
-#define DEFINE_IFUNC(qual, ret_type, name, args, resolver_qual) \
- resolver_qual ret_type (*name##_resolver(void))args __used; \
+#define DEFINE_IFUNC(qual, ret_type, name, args) \
+ static ret_type (*name##_resolver(void))args __used; \
qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \
- resolver_qual ret_type (*name##_resolver(void))args
+ static ret_type (*name##_resolver(void))args
-#define DEFINE_UIFUNC(qual, ret_type, name, args, resolver_qual) \
- resolver_qual ret_type (*name##_resolver(uint32_t, uint32_t, \
- uint32_t, uint32_t))args __used; \
+#define DEFINE_UIFUNC(qual, ret_type, name, args) \
+ static ret_type (*name##_resolver(uint32_t, uint32_t, uint32_t, \
+ uint32_t))args __used; \
qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \
- resolver_qual ret_type (*name##_resolver( \
+ static ret_type (*name##_resolver( \
uint32_t cpu_feature __unused, \
uint32_t cpu_feature2 __unused, \
uint32_t cpu_stdext_feature __unused, \