From nobody Sat Jan 11 00:00:29 2025 X-Original-To: dev-commits-src-main@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 4YVJZ56LNGz5kq4S; Sat, 11 Jan 2025 00:00:29 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YVJZ53Pw8z3xW9; Sat, 11 Jan 2025 00:00:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736553629; 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=pVkVPJJREqen5kwpJmjMz/566w0GG5WB1iZsjQ/X12U=; b=K1ul+KVkZT6XwoJj6MuA1w0YwKIbTuaCNDsKad0WyrsAuSXkXGwdU6RkVqubdFdOmBuxND fOKeotjnWrWXCG/S0Jq725ZYU5Vy+U9rE+zU1728EJ4jjJqzQUFzt5zqf4CAylMnBYTkYE srVbfZ7Enqp+vQjaWIWEp4gf+EqazS32ggg5N6Uct6tQ0RyXKgk1n8/Xub4jiyeXbhaiCx BzUUk2aPsxKxSH9yBtJW+xfwqsJ0DmPwBSv7A69KoEyN/6poREXU49fHNc7vxgQBbl3FhZ ySQsPtZasJTi6wsiv6IdSPCQBMkUt3i9iF9i8CGcnyZgshGFsS9Nri60wCpjhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736553629; 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=pVkVPJJREqen5kwpJmjMz/566w0GG5WB1iZsjQ/X12U=; b=nj9PUbpnjXNuas2TovJkU8niu1cs0ukXxguBd2NP+I955TBrJ8Kn1hgpS50ofAyLuXfk3S hRxbjS6jMKfgqmeKkhOMSNVilRhOEs4+g//Tv0bEM0C8cpgLcKQdMx8QJMVBnAQMHa5GRQ TAqnT/H7ghlusCXJgsxSl1bgD+AryGdIJyneLcpvJPiPbyvyaR0WFMCCArEdEjQFhgGkaD HIB2gsoMNCUmb9/TpynEi/YbtC1tFGMOeIUZfisdTqETIhdgbt23lsGBK1MdINIaMI6jrJ Iv3wA5kqPAMzUykvOiY56N3wCTP06MYEvfKPi5M5Up9wGQHvJccGF7sUcL8L6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736553629; a=rsa-sha256; cv=none; b=asDii+y5eCPok68QdYh7nWyuZNqZJ2+7o+TBmUU8Qw8n2qO3Za/QO3OSp3YkmTD/LCTkSQ uJrDDQwunnrpjjURRZpl57mHUoWuCUQ60Z3A5OpmiG2Gfr3tgB987PLOHmX+rNQJBETo1m VVw+oaLhr3GohlYV36klhuY0Xq1vb6qzOXLUWf204mkDviVn+q0leHFXFI5vYiONYWa2Eo rhHhfjxVLvILA4p3/u1KhjAyYWBBTNz2ts3E6CaD1rNlfGSrChR9HcebBkKP3BMBp9L28v sU4FwwXTqZ9C1Dvgb8JY0dmiyJG317MQEGLjTVLSsTcfzk1GOyY7y6ggYsMhOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YVJZ52xxMzb0s; Sat, 11 Jan 2025 00:00:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50B00TDU057149; Sat, 11 Jan 2025 00:00:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50B00T0p057146; Sat, 11 Jan 2025 00:00:29 GMT (envelope-from git) Date: Sat, 11 Jan 2025 00:00:29 GMT Message-Id: <202501110000.50B00T0p057146@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: b2b974f7ef4c - main - clock: Simplify subr_ticks and rename List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: b2b974f7ef4cddff251d0de69d8da13232b25e4d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b2b974f7ef4cddff251d0de69d8da13232b25e4d commit b2b974f7ef4cddff251d0de69d8da13232b25e4d Author: Mark Johnston AuthorDate: 2025-01-10 23:59:47 +0000 Commit: Mark Johnston CommitDate: 2025-01-10 23:59:47 +0000 clock: Simplify subr_ticks and rename - We can use builtin constants for the size of int and long to simplify definitions. - The file should have a .S prefix since we want to run it through the preprocessor, though apparently this happens anyway with .s... - Move ticks and ticksl from .data to .bss. Reported by: jrtc27 Reviewed by: jrtc27, kib, emaste Fixes: 6b82130e6c9a ("clock: Add a long ticks variable, ticksl") Differential Revision: https://reviews.freebsd.org/D48420 --- sys/conf/files | 2 +- sys/kern/{subr_ticks.s => subr_ticks.S} | 22 +++++++--------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index a630d9dd72bc..fc9108b5e10f 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3932,7 +3932,7 @@ kern/subr_stack.c optional ddb | stack | ktr kern/subr_stats.c optional stats kern/subr_taskqueue.c standard kern/subr_terminal.c optional vt -kern/subr_ticks.s standard +kern/subr_ticks.S standard kern/subr_trap.c standard kern/subr_turnstile.c standard kern/subr_uio.c standard diff --git a/sys/kern/subr_ticks.s b/sys/kern/subr_ticks.S similarity index 62% rename from sys/kern/subr_ticks.s rename to sys/kern/subr_ticks.S index 6565ba424137..52435b194c4f 100644 --- a/sys/kern/subr_ticks.s +++ b/sys/kern/subr_ticks.S @@ -16,29 +16,21 @@ GNU_PROPERTY_AARCH64_FEATURE_1_NOTE(GNU_PROPERTY_AARCH64_FEATURE_1_VAL) #endif -#ifdef _ILP32 -#define SIZEOF_TICKSL 4 -#define TICKSL_INIT .long 0 -#else -#define SIZEOF_TICKSL 8 -#define TICKSL_INIT .quad 0 -#endif - -#if defined(_ILP32) || __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #define TICKS_OFFSET 0 #else -#define TICKS_OFFSET 4 +#define TICKS_OFFSET (__SIZEOF_LONG__ - __SIZEOF_INT__) #endif - .data + .bss .global ticksl .type ticksl, %object - .align SIZEOF_TICKSL -ticksl: TICKSL_INIT - .size ticksl, SIZEOF_TICKSL + .align __SIZEOF_LONG__ +ticksl: .zero __SIZEOF_LONG__ + .size ticksl, __SIZEOF_LONG__ .global ticks .type ticks, %object ticks =ticksl + TICKS_OFFSET - .size ticks, 4 + .size ticks, __SIZEOF_INT__