From b2653891a04fba37525b326f324a5937cd5ef703 Mon Sep 17 00:00:00 2001 From: cheloha Date: Sun, 2 Jul 2023 19:02:27 +0000 Subject: [PATCH] all platforms, kernel: remove __HAVE_CLOCKINTR symbol Every platform made the clockintr switch at least six months ago. The __HAVE_CLOCKINTR symbol is now redundant. Remove it. Prompted by claudio@. Link: https://marc.info/?l=openbsd-tech&m=168826181015032&w=2 "makes sense" mlarkin@ --- sys/arch/alpha/include/_types.h | 4 +--- sys/arch/amd64/include/_types.h | 4 +--- sys/arch/arm/include/_types.h | 4 +--- sys/arch/arm64/include/_types.h | 4 +--- sys/arch/hppa/include/_types.h | 4 +--- sys/arch/i386/i386/apm.c | 4 +--- sys/arch/i386/include/_types.h | 4 +--- sys/arch/loongson/dev/apm.c | 4 +--- sys/arch/m88k/include/_types.h | 4 +--- sys/arch/mips64/include/_types.h | 4 +--- sys/arch/powerpc/include/_types.h | 4 +--- sys/arch/powerpc64/include/_types.h | 4 +--- sys/arch/riscv64/include/_types.h | 4 +--- sys/arch/sh/include/_types.h | 4 +--- sys/arch/sparc64/include/_types.h | 4 +--- sys/ddb/db_command.c | 4 +--- sys/ddb/db_interface.h | 4 +--- sys/kern/kern_clockintr.c | 5 +---- sys/kern/kern_sysctl.c | 4 +--- sys/kern/subr_suspend.c | 5 ++--- 20 files changed, 21 insertions(+), 61 deletions(-) diff --git a/sys/arch/alpha/include/_types.h b/sys/arch/alpha/include/_types.h index 129259bf070..a2ff372b4dc 100644 --- a/sys/arch/alpha/include/_types.h +++ b/sys/arch/alpha/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.25 2022/12/10 15:02:29 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.26 2023/07/02 19:02:27 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,8 +35,6 @@ #ifndef _MACHINE__TYPES_H_ #define _MACHINE__TYPES_H_ -#define __HAVE_CLOCKINTR - #if defined(_KERNEL) typedef struct label_t { long val[10]; diff --git a/sys/arch/amd64/include/_types.h b/sys/arch/amd64/include/_types.h index a9445bb4d93..9856177da81 100644 --- a/sys/arch/amd64/include/_types.h +++ b/sys/arch/amd64/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.18 2022/11/08 17:34:13 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.19 2023/07/02 19:02:27 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,8 +35,6 @@ #ifndef _MACHINE__TYPES_H_ #define _MACHINE__TYPES_H_ -#define __HAVE_CLOCKINTR - /* * _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned * value for all data types (int, long, ...). The result is an diff --git a/sys/arch/arm/include/_types.h b/sys/arch/arm/include/_types.h index f107abc601c..71043162186 100644 --- a/sys/arch/arm/include/_types.h +++ b/sys/arch/arm/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.20 2023/01/17 02:27:14 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.21 2023/07/02 19:02:27 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,8 +35,6 @@ #ifndef _ARM__TYPES_H_ #define _ARM__TYPES_H_ -#define __HAVE_CLOCKINTR - #if defined(_KERNEL) typedef struct label_t { long val[11]; diff --git a/sys/arch/arm64/include/_types.h b/sys/arch/arm64/include/_types.h index 6d4c4aaa0fb..9661d1e2b20 100644 --- a/sys/arch/arm64/include/_types.h +++ b/sys/arch/arm64/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.5 2022/11/08 17:56:38 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.6 2023/07/02 19:02:27 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -34,8 +34,6 @@ #ifndef _MACHINE__TYPES_H_ #define _MACHINE__TYPES_H_ -#define __HAVE_CLOCKINTR - #if defined(_KERNEL) typedef struct label_t { long val[13]; diff --git a/sys/arch/hppa/include/_types.h b/sys/arch/hppa/include/_types.h index 80d46e03d95..1a7a8799fdb 100644 --- a/sys/arch/hppa/include/_types.h +++ b/sys/arch/hppa/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.27 2022/12/06 00:40:09 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.28 2023/07/02 19:02:27 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,8 +35,6 @@ #ifndef _MACHINE__TYPES_H_ #define _MACHINE__TYPES_H_ -#define __HAVE_CLOCKINTR - #if defined(_KERNEL) typedef struct label_t { long val[19]; diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c index 018185e8734..80abd4408f6 100644 --- a/sys/arch/i386/i386/apm.c +++ b/sys/arch/i386/i386/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.131 2023/06/22 13:18:02 claudio Exp $ */ +/* $OpenBSD: apm.c,v 1.132 2023/07/02 19:02:27 cheloha Exp $ */ /*- * Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved. @@ -265,10 +265,8 @@ apm_suspend(int state) rtcstart(); /* in i8254 mode, rtc is profclock */ inittodr(gettime()); -#ifdef __HAVE_CLOCKINTR clockintr_cpu_init(NULL); clockintr_trigger(); -#endif config_suspend_all(DVACT_RESUME); cold = 0; diff --git a/sys/arch/i386/include/_types.h b/sys/arch/i386/include/_types.h index 2ccf99a07c5..d879b02fee2 100644 --- a/sys/arch/i386/include/_types.h +++ b/sys/arch/i386/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.24 2022/12/06 01:56:44 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.25 2023/07/02 19:02:27 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,8 +35,6 @@ #ifndef _MACHINE__TYPES_H_ #define _MACHINE__TYPES_H_ -#define __HAVE_CLOCKINTR - /* * _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned * value for all data types (int, long, ...). The result is an diff --git a/sys/arch/loongson/dev/apm.c b/sys/arch/loongson/dev/apm.c index 984c2aeb75b..7ac620ab239 100644 --- a/sys/arch/loongson/dev/apm.c +++ b/sys/arch/loongson/dev/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.42 2023/02/10 14:34:16 visa Exp $ */ +/* $OpenBSD: apm.c,v 1.43 2023/07/02 19:02:28 cheloha Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -418,10 +418,8 @@ apm_suspend(int state) } inittodr(gettime()); /* Move the clock forward */ -#ifdef __HAVE_CLOCKINTR clockintr_cpu_init(NULL); clockintr_trigger(); -#endif config_suspend_all(DVACT_RESUME); diff --git a/sys/arch/m88k/include/_types.h b/sys/arch/m88k/include/_types.h index 5527be96aa6..a8a53df0bf4 100644 --- a/sys/arch/m88k/include/_types.h +++ b/sys/arch/m88k/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.19 2022/12/06 00:56:52 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.20 2023/07/02 19:02:28 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,8 +35,6 @@ #ifndef _M88K__TYPES_H_ #define _M88K__TYPES_H_ -#define __HAVE_CLOCKINTR - #if defined(_KERNEL) typedef struct label_t { long val[19]; diff --git a/sys/arch/mips64/include/_types.h b/sys/arch/mips64/include/_types.h index 535abead1de..87e43ebeefe 100644 --- a/sys/arch/mips64/include/_types.h +++ b/sys/arch/mips64/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.24 2022/11/19 16:23:48 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.25 2023/07/02 19:02:28 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,8 +35,6 @@ #ifndef _MIPS64__TYPES_H_ #define _MIPS64__TYPES_H_ -#define __HAVE_CLOCKINTR - /* * _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned * value for all data types (int, long, ...). The result is an diff --git a/sys/arch/powerpc/include/_types.h b/sys/arch/powerpc/include/_types.h index 1cfd400c153..001c5c7d37e 100644 --- a/sys/arch/powerpc/include/_types.h +++ b/sys/arch/powerpc/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.24 2022/11/29 00:58:05 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.25 2023/07/02 19:02:28 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,8 +35,6 @@ #ifndef _POWERPC__TYPES_H_ #define _POWERPC__TYPES_H_ -#define __HAVE_CLOCKINTR - #if defined(_KERNEL) typedef struct label_t { long val[25]; diff --git a/sys/arch/powerpc64/include/_types.h b/sys/arch/powerpc64/include/_types.h index 63fd7c9c63b..7306803d303 100644 --- a/sys/arch/powerpc64/include/_types.h +++ b/sys/arch/powerpc64/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.3 2022/11/29 01:04:44 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.4 2023/07/02 19:02:28 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -34,8 +34,6 @@ #ifndef _MACHINE__TYPES_H_ #define _MACHINE__TYPES_H_ -#define __HAVE_CLOCKINTR - #if defined(_KERNEL) typedef struct label_t { long val[22]; diff --git a/sys/arch/riscv64/include/_types.h b/sys/arch/riscv64/include/_types.h index 0704283275d..6a106c61ffc 100644 --- a/sys/arch/riscv64/include/_types.h +++ b/sys/arch/riscv64/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.4 2022/11/19 16:02:37 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.5 2023/07/02 19:02:28 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,8 +35,6 @@ #ifndef _MACHINE__TYPES_H_ #define _MACHINE__TYPES_H_ -#define __HAVE_CLOCKINTR - #if defined(_KERNEL) typedef struct label_t { long val[14]; diff --git a/sys/arch/sh/include/_types.h b/sys/arch/sh/include/_types.h index 7a75ef6de95..9308f2f3a46 100644 --- a/sys/arch/sh/include/_types.h +++ b/sys/arch/sh/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.21 2022/12/06 01:19:35 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.22 2023/07/02 19:02:28 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,8 +35,6 @@ #ifndef _SH__TYPES_H_ #define _SH__TYPES_H_ -#define __HAVE_CLOCKINTR - #if defined(_KERNEL) typedef struct label_t { long val[9]; diff --git a/sys/arch/sparc64/include/_types.h b/sys/arch/sparc64/include/_types.h index e3e37a5c357..fbf0e66d46c 100644 --- a/sys/arch/sparc64/include/_types.h +++ b/sys/arch/sparc64/include/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.24 2023/01/13 03:22:18 cheloha Exp $ */ +/* $OpenBSD: _types.h,v 1.25 2023/07/02 19:02:28 cheloha Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -35,8 +35,6 @@ #ifndef _MACHINE__TYPES_H_ #define _MACHINE__TYPES_H_ -#define __HAVE_CLOCKINTR - #if defined(_KERNEL) typedef struct label_t { long val[2]; diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 7b54a2bd5bc..fd2070b91e9 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.98 2023/03/08 04:43:07 guenther Exp $ */ +/* $OpenBSD: db_command.c,v 1.99 2023/07/02 19:02:27 cheloha Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -579,9 +579,7 @@ db_bcstats_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif const struct db_command db_show_all_cmds[] = { { "procs", db_show_all_procs, 0, NULL }, { "callout", db_show_callout, 0, NULL }, -#ifdef __HAVE_CLOCKINTR { "clockintr", db_show_all_clockintr, 0, NULL }, -#endif { "pools", db_show_all_pools, 0, NULL }, { "mounts", db_show_all_mounts, 0, NULL }, { "vnodes", db_show_all_vnodes, 0, NULL }, diff --git a/sys/ddb/db_interface.h b/sys/ddb/db_interface.h index fabc8fd1879..f9a20678340 100644 --- a/sys/ddb/db_interface.h +++ b/sys/ddb/db_interface.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.h,v 1.25 2022/11/05 19:29:45 cheloha Exp $ */ +/* $OpenBSD: db_interface.h,v 1.26 2023/07/02 19:02:27 cheloha Exp $ */ /* $NetBSD: db_interface.h,v 1.1 1996/02/05 01:57:03 christos Exp $ */ /* @@ -44,9 +44,7 @@ void db_kill_cmd(db_expr_t, int, db_expr_t, char *); void db_show_all_procs(db_expr_t, int, db_expr_t, char *); /* kern/kern_clockintr.c */ -#ifdef __HAVE_CLOCKINTR void db_show_all_clockintr(db_expr_t, int, db_expr_t, char *); -#endif /* kern/kern_timeout.c */ void db_show_callout(db_expr_t, int, db_expr_t, char *); diff --git a/sys/kern/kern_clockintr.c b/sys/kern/kern_clockintr.c index 187898caf07..ee66e4f4ac5 100644 --- a/sys/kern/kern_clockintr.c +++ b/sys/kern/kern_clockintr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clockintr.c,v 1.26 2023/07/02 00:55:18 cheloha Exp $ */ +/* $OpenBSD: kern_clockintr.c,v 1.27 2023/07/02 19:02:27 cheloha Exp $ */ /* * Copyright (c) 2003 Dale Rahn * Copyright (c) 2020 Mark Kettenis @@ -29,8 +29,6 @@ #include #include -#ifdef __HAVE_CLOCKINTR - /* * Protection for global variables in this file: * @@ -773,4 +771,3 @@ db_show_clockintr(const struct clockintr *cl, const char *state, u_int cpu) } #endif /* DDB */ -#endif /*__HAVE_CLOCKINTR */ diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index a2d2f2e06bc..2c79d238113 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.415 2023/05/21 12:47:54 claudio Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.416 2023/07/02 19:02:27 cheloha Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -430,11 +430,9 @@ kern_sysctl_dirs(int top_name, int *name, u_int namelen, case KERN_CPUSTATS: return (sysctl_cpustats(name, namelen, oldp, oldlenp, newp, newlen)); -#ifdef __HAVE_CLOCKINTR case KERN_CLOCKINTR: return sysctl_clockintr(name, namelen, oldp, oldlenp, newp, newlen); -#endif default: return (ENOTDIR); /* overloaded */ } diff --git a/sys/kern/subr_suspend.c b/sys/kern/subr_suspend.c index ad156f92ce3..833c918d9f0 100644 --- a/sys/kern/subr_suspend.c +++ b/sys/kern/subr_suspend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_suspend.c,v 1.14 2022/11/10 10:37:40 kettenis Exp $ */ +/* $OpenBSD: subr_suspend.c,v 1.15 2023/07/02 19:02:27 cheloha Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -165,10 +165,9 @@ fail_suspend: splx(s); inittodr(gettime()); -#ifdef __HAVE_CLOCKINTR clockintr_cpu_init(NULL); clockintr_trigger(); -#endif + sleep_resume(v); resume_randomness(rndbuf, rndbuflen); #ifdef MULTIPROCESSOR -- 2.20.1