From nobody Wed Nov 27 00:45:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1703129041; cv=none; d=zohomail.com; s=zohoarc; b=GrZB1XQwbAq2vqSlYmcxpbDdHZgVgS0yhthI118Fevu8W95DolhyXIEncXegbCiB5D3s5w61+wjVhjDYJRc7fBBuvgtfkTgzYZNxjAj1vcSlkrW6gkRph5JZSrfzluZoRuB2niqzXRia4iOMxFchpozYUJzUkjTyNNvimBFvnmc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703129041; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+AFzh7chlq8L+JCC/XZfJPBd+42r5XtptQoNPZ9V4uc=; b=Nalx6jF0uoCbdkEBs22UfHBXmiLpH6hoWfOBUQC357vBfCP7zhosS6S2ULWxKdNrj4VTwPvKhK2/v4EvPOcQNVvb3evl0LqGL23VcKyMaKZ/Y5Cdmtb8mNrb7qjSNfArsTMiVIv4f14ZK3LUwPJJOqFvC++lcopeUOn5EiRGK+o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1703129041783397.27449602246145; Wed, 20 Dec 2023 19:24:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rG9ZR-0007Wy-IZ; Wed, 20 Dec 2023 22:18:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rG9ZQ-0007Uv-Ip for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:18:00 -0500 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9ZP-0003nq-0A for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:18:00 -0500 Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-7811dba1d5dso18163185a.3 for ; Wed, 20 Dec 2023 19:17:58 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id n8-20020a05620a294800b0078116d55191sm360808qkp.130.2023.12.20.19.17.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:17:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703128678; x=1703733478; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+AFzh7chlq8L+JCC/XZfJPBd+42r5XtptQoNPZ9V4uc=; b=hvhwipuv8pngnGVAev8AF/SjeC0h9+RO7wRA1mZwoT/NDV2VedFoMhsT9r7gDSitHR MzFcY1kOLlEuhERJFiBlbBanOWOyt/G0TJFzECxyuq5ZrnSf083scCJmtfHjhcSnOkgv JJfa++AVRyNa4LAFut0F0s+JwjYfK6ahfWehlZ8nbVCbPlx6R8vTUpuxg3IFwO8hLJ1n iRTqw8P7z4C4ZLP3qL2lB8KmFPmxF9gzwyEwQ9+D4jGFjt8ilKWv6XwhmsGRX1ElUYWp 0d8Z+2jS0gm+7E2gJdQvuF5YOzGqlYOqcMDLtcD3lTG7s1yeRRsx/w6vxU6mdYnIroLT KYCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703128678; x=1703733478; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+AFzh7chlq8L+JCC/XZfJPBd+42r5XtptQoNPZ9V4uc=; b=dFW+tIdnIC/6am+NViF6aORlmuuoLOfFXBMcT1pcQHhxhxYxQgb6kK9ECMIfLPLinR OwAda/bG7AFOPZ3DwJcGsyU3hWTkQNo0dFXMqqSzocAdSHf67CGsMVSAvXA0MMtgJYRQ u01j288yIkFdQVtjEhZHi0Rk1d6KwmU4EFeF+qAhAMQeOre3H76eLcXyJk4xLPPk8tPY rUnmARhuzmxrxMfHzYzr1ccH5znMqbSIlM0Utmql0wf8NVdv0AxGm+/8FBzB7JCXNipK fKgflch37yRq+nZRjQD/Gz3K7GSOBOo/lP26ygJ1zAKvMrpRH1Lb8lAv1DL9n46hARE4 d9vw== X-Gm-Message-State: AOJu0YzSyEXeQHg7Hbr1pcVNPtSyyaT29ZcRIJJS7Jrx4m6jLQqX6iEE XBkBEUKjEXoTW+MHRbUWTfbhUoCZDfF5IOSWXS0AlKUS X-Google-Smtp-Source: AGHT+IFe5PbfTe24bNTo7qB4WQWRPdlNT9f68vIdPprb1WhXiwIlaK4ve6q9+GkU6J189V901TQhJw== X-Received: by 2002:a05:620a:2989:b0:77e:fba4:3a41 with SMTP id r9-20020a05620a298900b0077efba43a41mr28793365qkp.151.1703128677849; Wed, 20 Dec 2023 19:17:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 12/71] target/mips: Constify VMState in machine.c Date: Thu, 21 Dec 2023 14:15:53 +1100 Message-Id: <20231221031652.119827-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231221031652.119827-1-richard.henderson@linaro.org> References: <20231221031652.119827-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::72c; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x72c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1703129042328100010 Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/mips/sysemu/machine.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/target/mips/sysemu/machine.c b/target/mips/sysemu/machine.c index 80d37f9c2f..218f4c3a67 100644 --- a/target/mips/sysemu/machine.c +++ b/target/mips/sysemu/machine.c @@ -44,7 +44,7 @@ static int put_fpr(QEMUFile *f, void *pv, size_t size, return 0; } =20 -const VMStateInfo vmstate_info_fpr =3D { +static const VMStateInfo vmstate_info_fpr =3D { .name =3D "fpr", .get =3D get_fpr, .put =3D put_fpr, @@ -56,21 +56,21 @@ const VMStateInfo vmstate_info_fpr =3D { #define VMSTATE_FPR_ARRAY(_f, _s, _n) \ VMSTATE_FPR_ARRAY_V(_f, _s, _n, 0) =20 -static VMStateField vmstate_fpu_fields[] =3D { +static const VMStateField vmstate_fpu_fields[] =3D { VMSTATE_FPR_ARRAY(fpr, CPUMIPSFPUContext, 32), VMSTATE_UINT32(fcr0, CPUMIPSFPUContext), VMSTATE_UINT32(fcr31, CPUMIPSFPUContext), VMSTATE_END_OF_LIST() }; =20 -const VMStateDescription vmstate_fpu =3D { +static const VMStateDescription vmstate_fpu =3D { .name =3D "cpu/fpu", .version_id =3D 1, .minimum_version_id =3D 1, .fields =3D vmstate_fpu_fields }; =20 -const VMStateDescription vmstate_inactive_fpu =3D { +static const VMStateDescription vmstate_inactive_fpu =3D { .name =3D "cpu/inactive_fpu", .version_id =3D 1, .minimum_version_id =3D 1, @@ -79,7 +79,7 @@ const VMStateDescription vmstate_inactive_fpu =3D { =20 /* TC state */ =20 -static VMStateField vmstate_tc_fields[] =3D { +static const VMStateField vmstate_tc_fields[] =3D { VMSTATE_UINTTL_ARRAY(gpr, TCState, 32), #if defined(TARGET_MIPS64) VMSTATE_UINT64_ARRAY(gpr_hi, TCState, 32), @@ -103,14 +103,14 @@ static VMStateField vmstate_tc_fields[] =3D { VMSTATE_END_OF_LIST() }; =20 -const VMStateDescription vmstate_tc =3D { +static const VMStateDescription vmstate_tc =3D { .name =3D "cpu/tc", .version_id =3D 2, .minimum_version_id =3D 2, .fields =3D vmstate_tc_fields }; =20 -const VMStateDescription vmstate_inactive_tc =3D { +static const VMStateDescription vmstate_inactive_tc =3D { .name =3D "cpu/inactive_tc", .version_id =3D 2, .minimum_version_id =3D 2, @@ -119,11 +119,11 @@ const VMStateDescription vmstate_inactive_tc =3D { =20 /* MVP state */ =20 -const VMStateDescription vmstate_mvp =3D { +static const VMStateDescription vmstate_mvp =3D { .name =3D "cpu/mvp", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_INT32(CP0_MVPControl, CPUMIPSMVPContext), VMSTATE_INT32(CP0_MVPConf0, CPUMIPSMVPContext), VMSTATE_INT32(CP0_MVPConf1, CPUMIPSMVPContext), @@ -190,7 +190,7 @@ static int put_tlb(QEMUFile *f, void *pv, size_t size, return 0; } =20 -const VMStateInfo vmstate_info_tlb =3D { +static const VMStateInfo vmstate_info_tlb =3D { .name =3D "tlb_entry", .get =3D get_tlb, .put =3D put_tlb, @@ -202,11 +202,11 @@ const VMStateInfo vmstate_info_tlb =3D { #define VMSTATE_TLB_ARRAY(_f, _s, _n) \ VMSTATE_TLB_ARRAY_V(_f, _s, _n, 0) =20 -const VMStateDescription vmstate_tlb =3D { +static const VMStateDescription vmstate_tlb =3D { .name =3D "cpu/tlb", .version_id =3D 2, .minimum_version_id =3D 2, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(nb_tlb, CPUMIPSTLBContext), VMSTATE_UINT32(tlb_in_use, CPUMIPSTLBContext), VMSTATE_TLB_ARRAY(mmu.r4k.tlb, CPUMIPSTLBContext, MIPS_TLB_MAX), @@ -221,7 +221,7 @@ const VMStateDescription vmstate_mips_cpu =3D { .version_id =3D 21, .minimum_version_id =3D 21, .post_load =3D cpu_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { /* Active TC */ VMSTATE_STRUCT(env.active_tc, MIPSCPU, 1, vmstate_tc, TCState), =20 --=20 2.34.1