From nobody Thu Jan 04 13:40:19 2024 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 4T5SQD4DZxz56Q5C; Thu, 4 Jan 2024 13:40:20 +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 4T5SQD05phz41g6; Thu, 4 Jan 2024 13:40:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704375620; 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=WXvhc5OgyFe8JLBaAIskoUDaa0J26RhqHFxOmX2G2GQ=; b=iA9L8wkYco1ytuB1OVXvk+DwnxdiICgBwYBqWc6NyfbywoyEk1PRs79egjweZBrasowGuK IFmsvUgLKcqjpnLAxAvqubuwv8V10/5CixhCcIHQy5uMcZ6Z2nhydhMsIXg8psYjRtw2X6 D5brc6sQ7ffDCoviGLxblBat/jafQCEg0yEJrwsPLekaTKVxVD1WMFat/B4kU3DMy7aP6z /uPA1uuG0PQlDR+AF/nin0ojKPiQYNsXh3SSIOrGN2g9rg23mmvis57Cy9+r36uwC7kD6e Cvo0CsIrJa/nmycITpo/NsaXyy1SmhP+5zaOu/Z68hWYuPdXboweT+SPfR0gZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704375620; 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=WXvhc5OgyFe8JLBaAIskoUDaa0J26RhqHFxOmX2G2GQ=; b=Y2Xf3Rj9nOZmvgPrqZmWo580WBIWmZ9rVcO7iSG8ZAP4NEy9QrEqtFldCLT+PYLQvFoW46 9k44AIjrygufJfNLLInYrzs1Evqu8QbAN7HT3ctI6p+dbhduwV9yWB1vdzjxJrUYTnX2Ue k07aNX0aPmwsxcHXUSfR0rJNExXim1oEudBe9c49GOOPmvqXF6vKW4VV9dMpdzPzHWWBIe BhL0xkPE37KLC199rZHVFB+b03Jp6CwVBwERE0pg+UvuaKh/TJtjlRjIjgJ9+gIP/aR/dd hCmqig0OYCrR5DSKCXBK59GuDouvSglpiPtVqf0a4p4AK6D810LQrQXklzP5Vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704375620; a=rsa-sha256; cv=none; b=XlEheGRiGp6aFHGK3KicF7vle1VoEiAgK+UIPiHBtPtSACpQIc7baVhpmurvd+Rox9t/Qn nw7NZDh0zgrcOiTG2ZANRVtiKJRClL2dA3zurbWJqKggUZC8SnTr907rUIbHz1aXkIX8cE /efFv7B05IieyTizoQ9TbHpeGXZztlMrzgtwYBCVZEaO20egXASmxVE9EN4w14FKyXWG1f WvZlgydXnuKd9nEM4yiYaLtzsxa3EXVMQthAY11WtVDTntetNPF6qw0X+UmLR0flVUUizM 4Zmq+RyhignvxU2skdlKiLoThI8lnpsT+07tvruQs7/UHRduUNb3p/LRcHHXog== 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 4T5SQC6FTpzFfQ; Thu, 4 Jan 2024 13:40:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 404DeJhX041928; Thu, 4 Jan 2024 13:40:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404DeJbG041925; Thu, 4 Jan 2024 13:40:19 GMT (envelope-from git) Date: Thu, 4 Jan 2024 13:40:19 GMT Message-Id: <202401041340.404DeJbG041925@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: 0aba5dd2af57 - main - identcpu: Let the hw.model be readable in capability mode 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 0aba5dd2af57ea3ae90eb49d7745c4c5b6f0ab6b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0aba5dd2af57ea3ae90eb49d7745c4c5b6f0ab6b commit 0aba5dd2af57ea3ae90eb49d7745c4c5b6f0ab6b Author: Mark Johnston AuthorDate: 2024-01-04 13:26:53 +0000 Commit: Mark Johnston CommitDate: 2024-01-04 13:39:53 +0000 identcpu: Let the hw.model be readable in capability mode On some platforms this static information can be derived directly from the CPU, and there doesn't seem much use in restricting it. Reviewed by: emaste, imp, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43281 --- sys/arm/arm/identcpu-v6.c | 2 +- sys/arm64/arm64/identcpu.c | 2 +- sys/powerpc/powerpc/cpu.c | 2 +- sys/x86/x86/identcpu.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm/arm/identcpu-v6.c b/sys/arm/arm/identcpu-v6.c index 567f576826ee..34663dfa51e6 100644 --- a/sys/arm/arm/identcpu-v6.c +++ b/sys/arm/arm/identcpu-v6.c @@ -55,7 +55,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD | CTLFLAG_CAPRD, machine, 0, "Machine class"); static char cpu_model[64]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, cpu_model, sizeof(cpu_model), "Machine model"); static char hw_buf[81]; diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index e7657e3aecf8..7cdcc9dfcb56 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -108,7 +108,7 @@ SYSCTL_PROC(_hw, HW_MACHINE, machine, CTLTYPE_STRING | CTLFLAG_RD | "Machine class"); static char cpu_model[64]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, cpu_model, sizeof(cpu_model), "Machine model"); #define MAX_CACHES 8 /* Maximum number of caches supported diff --git a/sys/powerpc/powerpc/cpu.c b/sys/powerpc/powerpc/cpu.c index 518623af9de4..19907e3973e7 100644 --- a/sys/powerpc/powerpc/cpu.c +++ b/sys/powerpc/powerpc/cpu.c @@ -239,7 +239,7 @@ static void cpu_6xx_print_cacheinfo(u_int, uint16_t); static int cpu_feature_bit(SYSCTL_HANDLER_ARGS); static char model[64]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, model, 0, ""); +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, model, 0, ""); static const struct cputab *cput; diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 7fa35bd50244..3163053a123f 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -158,7 +158,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD | CTLFLAG_CAPRD, #endif char cpu_model[128]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_MPSAFE, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, cpu_model, 0, "Machine model"); static int hw_clockrate;