From nobody Mon Dec 06 16:21:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9DC9A18B067D; Mon, 6 Dec 2021 16:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J77wr25mMz4srp; Mon, 6 Dec 2021 16:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 139656C52; Mon, 6 Dec 2021 16:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B6GLlOG070843; Mon, 6 Dec 2021 16:21:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B6GLl0s070842; Mon, 6 Dec 2021 16:21:47 GMT (envelope-from git) Date: Mon, 6 Dec 2021 16:21:47 GMT Message-Id: <202112061621.1B6GLl0s070842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f06f1d1fdb96 - main - x86: Deduplicate clock.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f06f1d1fdb969fa7a0a6eefa030d8536f365eb6e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638807708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ipNOgk5/IkP9Lu/UjP8w6pQ7A8h9zkbvSRqP2iIvWrQ=; b=NB8F6xkhTtHBqwqIL+ssP8JqyKzshzkJFdzj/v2K2uXDP3RLUwr4LK2Fj/iZVNQR1oqn6F ZEGWCC7BKRJS7hUV0LnyWdjnAOlLzU5U7+g7Vs4kFM4DYCcrNiRrYZNx6m2oGnAJdeY/Pw cIEDUI3k/0Ks2Zo9bFipPCy4/LCwN3M7cjVYXHxJymvR9a+7R9V4n8HDSqIF0lwaEk1hZ2 SsLucaXKCiAgnobQkATXScvFD00sYYkWb5oc66TreulZmzDn2x1KZoDj9R6wDaQ4qv7fIH hSY0/h5K/E3CFX5hSimtXfM6aSVDmSLQOwBDk8lUV6we7lNhAfG9YGOhmLxeNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638807708; a=rsa-sha256; cv=none; b=fKFTAsgsrN3R8h0yMCY10BtZrk4ub7IwPGTPyaV5+LJUw/NBlBFOwXov3prMKxC3DKgK1n QulQApnGCxe8+PzJCqqNSIm/MNmSd/xcCt2urwTR0nFrXh+iObLdcpzcD/NOf3wgrLFsPA AZ0mW0dYJTKDtZYCKXv+dkx5fEE61eGXrC4eE1OKHZWu5+AiaeFww6exfnzYPdj8ejtra6 zKKt70G/Qdixq9BZNajhu6iMbnzzO28Yh3bSTLlq3EdS20kSPW358DLzG2Th1tdljGV9ik rOk5MItgV0GavMdYA8PtLmuj9EYMgGAmBDX7FUaAluZfM6YDpuoxcCZJeVahVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f06f1d1fdb969fa7a0a6eefa030d8536f365eb6e commit f06f1d1fdb969fa7a0a6eefa030d8536f365eb6e Author: Mark Johnston AuthorDate: 2021-12-06 15:39:08 +0000 Commit: Mark Johnston CommitDate: 2021-12-06 15:39:08 +0000 x86: Deduplicate clock.h The headers were mostly identical on amd64 and i386. No functional change intended. Reviewed by: cperciva, mav, imp, kib, jhb MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33205 --- sys/amd64/include/clock.h | 45 ++------------------------------------------- sys/i386/include/clock.h | 42 ++---------------------------------------- sys/x86/include/clock.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 83 deletions(-) diff --git a/sys/amd64/include/clock.h b/sys/amd64/include/clock.h index 86a4541568ed..57233651aef3 100644 --- a/sys/amd64/include/clock.h +++ b/sys/amd64/include/clock.h @@ -1,46 +1,5 @@ -/*- - * Kernel interface to machine-dependent clock driver. - * Garrett Wollman, September 1994. - * This file is in the public domain. - * - * $FreeBSD$ - */ - -#ifndef _MACHINE_CLOCK_H_ -#define _MACHINE_CLOCK_H_ - -#ifdef _KERNEL -/* - * i386 to clock driver interface. - * XXX large parts of the driver and its interface are misplaced. - */ -extern int clkintr_pending; -extern u_int i8254_freq; -extern int i8254_max_count; -extern uint64_t tsc_freq; -extern int tsc_is_invariant; -extern int tsc_perf_stat; -#ifdef SMP -extern int smp_tsc; -#endif - -void i8254_init(void); -void i8254_delay(int); -void clock_init(void); - /* - * Driver to clock driver interface. + * This file is in the public domain. */ -void startrtclock(void); -void init_TSC(void); -void resume_TSC(void); - -#define HAS_TIMER_SPKR 1 -int timer_spkr_acquire(void); -int timer_spkr_release(void); -void timer_spkr_setfreq(int freq); - -#endif /* _KERNEL */ - -#endif /* !_MACHINE_CLOCK_H_ */ +#include diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h index 6f335bf05cfa..57233651aef3 100644 --- a/sys/i386/include/clock.h +++ b/sys/i386/include/clock.h @@ -1,43 +1,5 @@ -/*- - * Kernel interface to machine-dependent clock driver. - * Garrett Wollman, September 1994. - * This file is in the public domain. - * - * $FreeBSD$ - */ - -#ifndef _MACHINE_CLOCK_H_ -#define _MACHINE_CLOCK_H_ - -#ifdef _KERNEL -/* - * i386 to clock driver interface. - * XXX large parts of the driver and its interface are misplaced. - */ -extern int clkintr_pending; -extern u_int i8254_freq; -extern int i8254_max_count; -extern uint64_t tsc_freq; -extern int tsc_is_invariant; -extern int tsc_perf_stat; - -void i8254_init(void); -void i8254_delay(int); -void clock_init(void); - /* - * Driver to clock driver interface. + * This file is in the public domain. */ -void startrtclock(void); -void init_TSC(void); -void resume_TSC(void); - -#define HAS_TIMER_SPKR 1 -int timer_spkr_acquire(void); -int timer_spkr_release(void); -void timer_spkr_setfreq(int freq); - -#endif /* _KERNEL */ - -#endif /* !_MACHINE_CLOCK_H_ */ +#include diff --git a/sys/x86/include/clock.h b/sys/x86/include/clock.h new file mode 100644 index 000000000000..86a4541568ed --- /dev/null +++ b/sys/x86/include/clock.h @@ -0,0 +1,46 @@ +/*- + * Kernel interface to machine-dependent clock driver. + * Garrett Wollman, September 1994. + * This file is in the public domain. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_CLOCK_H_ +#define _MACHINE_CLOCK_H_ + +#ifdef _KERNEL +/* + * i386 to clock driver interface. + * XXX large parts of the driver and its interface are misplaced. + */ +extern int clkintr_pending; +extern u_int i8254_freq; +extern int i8254_max_count; +extern uint64_t tsc_freq; +extern int tsc_is_invariant; +extern int tsc_perf_stat; +#ifdef SMP +extern int smp_tsc; +#endif + +void i8254_init(void); +void i8254_delay(int); +void clock_init(void); + +/* + * Driver to clock driver interface. + */ + +void startrtclock(void); +void init_TSC(void); +void resume_TSC(void); + +#define HAS_TIMER_SPKR 1 +int timer_spkr_acquire(void); +int timer_spkr_release(void); +void timer_spkr_setfreq(int freq); + +#endif /* _KERNEL */ + +#endif /* !_MACHINE_CLOCK_H_ */