From nobody Fri Jun 09 17:21:27 2023 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 4Qd7Cq2xxfz4bb4c; Fri, 9 Jun 2023 17:21:27 +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 4Qd7Cq23TQz3s2D; Fri, 9 Jun 2023 17:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686331287; 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=xdGBSyDyOmvsquXvbU4l1WZTZT8Y9jTONhyqjNprjF0=; b=wK+im71Wxh0d/X4d/bd++t2cTxu1McZ+drJ0nhuoa6bWl3YALYESmBfckNusjdTURtYbaR r/pFECjZEniuk24MvlzU0wG60cTxc8fTDfXLOsrjr8NK7RP3BmwEJ+/X7pB8bAIvT8C/Q8 CUINrU2WzvTBdE99CEZ4BLE92OltG+4vsUUKVDLn8qSxxBbJ8enJ/kRZq8c/GW3BHnsD21 ov8n/yc4RLlhRgB/nTW9CU1O+P070xnD0Be388TdW5tznoWUCeATzNStHQnn8mG9B7P6C6 A+QsylX4DtWK7z7W53X40Y2JCRVG5uMsBp4M7qsVA754bdgLF/mUzNbCmDTg9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686331287; 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=xdGBSyDyOmvsquXvbU4l1WZTZT8Y9jTONhyqjNprjF0=; b=YAm5HzqlOC4v0nZN2o679q0LFDZy+gT/PgbVwbmbCfzmrXZyIxFkwf9+yzO10qcLNJdVVK rMsSPMmkJlxdrWezD5d/ZuFiW6zorCEgCVz8E/mSb6btGas67haCd4rca6DgIqCUvUsnai cmgdnpw8b0hS27y/jfjf/Hjzi6RUi/r2Vj4tJmchJmwMrzWIuav/DvkESKk3yCh9Ad+Yhk fPoEyOw4ZLjMqXfu2rrsCgxgvkcTfgT+Hs9biql8l8GYU8tmn1s0d1IquIwiI37h/MNoCC QvzFZGDExbv6uorr66AAgxDV6zQ9gXy3wn1XnusLGGme2JhcxnNKlMAx6uIV3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686331287; a=rsa-sha256; cv=none; b=CMMzSmAkIVukM46bXFkLgZNN6VLLNTQBmjvlAQxe83l7fvMsSqPL6eSjC6YD20lqwws/sO QbM0nKKQMjPH1ypjzAouuet+5aoTlI4DK6TC/RmpBNqzAs/BHVh/AxczJP3cGC4hA8FNaA K5tgf8+S0aVaoX6b806tigeDGBaINHw+Lt3i+RmP+Dw2VdcWZp3a+q/C0IGndwt2imENrm BDz674LqTjZdgiPMVVwhxaBKfm8rsma/fd0ULOCE7yf2dDTJsrJacsxhQKCSDw5dJ9xbzq 835nlR4LVfClgzzKPnpxOehFipVwh/jLZbEjvKJqImuj6zMHo5O0hxhQdZqjBQ== 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 4Qd7Cq0wsHzkKc; Fri, 9 Jun 2023 17:21:27 +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 359HLRWw019691; Fri, 9 Jun 2023 17:21:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 359HLRl0019690; Fri, 9 Jun 2023 17:21:27 GMT (envelope-from git) Date: Fri, 9 Jun 2023 17:21:27 GMT Message-Id: <202306091721.359HLRl0019690@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: bdfc441d41f5 - stable/13 - x86: Mark the CPU idle function table as const 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/stable/13 X-Git-Reftype: branch X-Git-Commit: bdfc441d41f5ceacf389ea347a85cd42d25f6388 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bdfc441d41f5ceacf389ea347a85cd42d25f6388 commit bdfc441d41f5ceacf389ea347a85cd42d25f6388 Author: Mark Johnston AuthorDate: 2023-06-02 17:22:32 +0000 Commit: Mark Johnston CommitDate: 2023-06-09 17:19:47 +0000 x86: Mark the CPU idle function table as const No functional change intended. MFC after: 1 week (cherry picked from commit 7266f5249848512b99d4dc78256af148f9df986e) --- sys/x86/x86/cpu_machdep.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c index 37db1e85a374..1d5f7e548dc1 100644 --- a/sys/x86/x86/cpu_machdep.c +++ b/sys/x86/x86/cpu_machdep.c @@ -724,9 +724,9 @@ cpu_idle_wakeup(int cpu) /* * Ordered by speed/power consumption. */ -static struct { +static const struct { void *id_fn; - char *id_name; + const char *id_name; int id_cpuid2_flag; } idle_tbl[] = { { .id_fn = cpu_idle_spin, .id_name = "spin" }, @@ -790,7 +790,8 @@ cpu_idle_selector(const char *new_idle_name) static int cpu_idle_sysctl(SYSCTL_HANDLER_ARGS) { - char buf[16], *p; + char buf[16]; + const char *p; int error, i; p = "unknown";