From nobody Thu Jan 11 14:35:23 2024 X-Original-To: dev-commits-src-branches@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 4T9nJW556Hz568R2; Thu, 11 Jan 2024 14:35:23 +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 4T9nJW3X0lz4XPG; Thu, 11 Jan 2024 14:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983723; 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=JnzHPzycgU63aZvCh7KHtOSeJMDM3Q+v36KjBdvCT9I=; b=tiqso8GVpfqfxyY6m66OvlTe3RFiGqL6Tsoebb5pQc4a2m68SXoZSqBxeNCkRbPKfnn0hO lN7EAYD6GCCoUE1eYxQoqhCutNA74k8S8VATijSguVd2cvNx6A9zcy9WN9mWlHfkvbQFDk m/zAf9tGOxm3qF6nsukEJp5GqYnJ0bKUIouz7jbNwAoMV1ubRVylkVzx+kQH0JTNx4xicK A3q8ZrKNZ0KcIOM3dTiOKLYKBwCXZAD5KzHzQKCbbnWBbF0F5ACPrPQdAaMi6E5t7BnscQ gJzKcjKXzECX+rb7f8nzKCAepsnZtM0yIsx0g8L7dsrtPMfgL4BH83hk3FY78A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983723; 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=JnzHPzycgU63aZvCh7KHtOSeJMDM3Q+v36KjBdvCT9I=; b=QEMkhgnN8x9NyynSPTo2V7mNlmcAllXXCxN4B/mCna+TytbbQ1+tYDp7yeLPrbqre1JEX2 XzhJy+oSCLgko1ePAj4UCi3pufndXvRvX6PEY/vWL/SROzcEdZvOJF+ZaVPj5Bq8ooEgXS eB2xKoM5lzDGTVnoQjranKcKqNmbmLLZ3o/ifIT9K5TjwKbqzvLKDjy+WacAaJU+4Vd3Is 9SwaExU8xPtyFxnaY1zfgbjJAdx3GqNd9d/xjw0G6AUwCzYp75uG0kMmXjO1Q5fRpNj6a8 879SXu4L4D51x9nSwoQLwHsWwIt+ti46CpaVv2wT/nWAPEGXiTiFXGSSAx2r6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983723; a=rsa-sha256; cv=none; b=DN3lInT5SlOOymL0vEupoLlOHV9hzW++/lkHyJa9/+3sGUW++xTuS82J6/SCXWSOqRUh56 G0rVjeIiwgUCodXmSU+8OTPY4ontsdIdyn+9SMXN5Sle81A2/OEsCFzSHTOlvWYJ/Qd1xJ 9cPIfEDjk2bnXnOF1RD0f6/uk6YGcjdMssSzfzQnEneArrrnLYjsHQUNp/+IQ98wgz07E9 n+40HYJWsO5LTFz/7tI5z1Ye0kuMNsc6gZQUQTYM5gcAfENgNrZGuXipKzf1kK7DHc40H0 kX/Y61l8fxqiWNXW7Snd0Hp4ik76C1QblDmaK/giw35tntI8zeKR0wCzs6SyuA== 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 4T9nJW2ZPwzMq1; Thu, 11 Jan 2024 14:35:23 +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 40BEZN0m025288; Thu, 11 Jan 2024 14:35:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEZNTS025285; Thu, 11 Jan 2024 14:35:23 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:35:23 GMT Message-Id: <202401111435.40BEZNTS025285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 337b2a037299 - stable/13 - identcpu: Let the hw.model be readable in capability mode List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 337b2a037299915af419723fc57d7d6d46bd5e1e Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=337b2a037299915af419723fc57d7d6d46bd5e1e commit 337b2a037299915af419723fc57d7d6d46bd5e1e Author: Mark Johnston AuthorDate: 2024-01-04 13:26:53 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:33:16 +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 (cherry picked from commit 0aba5dd2af57ea3ae90eb49d7745c4c5b6f0ab6b) --- 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 5e52645d39af..baae9ac360ad 100644 --- a/sys/arm/arm/identcpu-v6.c +++ b/sys/arm/arm/identcpu-v6.c @@ -56,7 +56,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, 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 c46747be1bd5..200841782f03 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -99,7 +99,7 @@ SYSCTL_PROC(_hw, HW_MACHINE, machine, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_hw_machine, "A", "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 bf676b8e08e1..d450044780a9 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 6a51c48ab604..92a88ede5f79 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, #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;