From patchwork Thu Dec 21 03:15:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 756980 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp688295wrw; Wed, 20 Dec 2023 19:28:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7a5mesfGu1bF9OqPL4q5a4QjsLzGRhhuTpvpLeC94PLiMH1pFFywN5oz/UOUQl3gfCpAQ X-Received: by 2002:a05:620a:46aa:b0:77d:c7fe:76d8 with SMTP id bq42-20020a05620a46aa00b0077dc7fe76d8mr28396707qkb.11.1703129285589; Wed, 20 Dec 2023 19:28:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703129285; cv=none; d=google.com; s=arc-20160816; b=WkR+96kAgpubiNF5dLvyap2uglIaRtJfYGY+cXnL0guxA35jTefxfyvV8Upb43uAz9 B3pwjY01dWFop02BoG6vDmvQfEar9qIoX78JUDAiTay3vZmozT+I3IpUQj0bn+K8NswE XDafUVYaE05ULowAwtleK8rC2zNftyQ/fCSvNF474S19QnCok3zFlgpZnc1CutWYJTHN ch+8vv9l7C7GVmaHJPtwXqPhx/p8wkqENEhDOmo4xIHTDnX78yF3ejJb+SG0+9QlMOQj S1JuFgV61udn0Xe1Qu06Cc5TcxUYspBHMojAlMqQKNxbmk4bEZN82t988pU3rifBB/MF M/Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=bGO4SKx+78nJlz7T7KRC0paS7HeJqQ6oQsF4iEBtiBw=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=mopKGxGUZqFqi1lzAiqWl0Hqui4EAA8A6KQGqI07G/HnQ1U2wxihndYtEN/QtkkFET VYEEVC7F7ixIERVwkQ/IVMqD1Wd+hVDo1djdYTDJXex0S2KFcg+nDDNsHOBRAxO3FRXe SIfQfkIgSQdwI5v0KrwdYHmAujUfrUP7GOsp7met7QnZUfPah0JRiOWviBBMGJ1EEV3S O2F2lPYU4B4+SQlDqmZlrIhJIT/03x4O8dgxKNMwCs6GWow4/j//5VjjW0CcbLdWmtz6 T8O0CqFEZW3Q7mmv9Fsh7tintoaSI8iCOzJSxTx+qV9G5djrkJZgnBrd6r/XRkKjqWk3 mXYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pH760Loe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id oo14-20020a05620a530e00b0077d85d5ab03si1034896qkn.786.2023.12.20.19.28.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Dec 2023 19:28:05 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pH760Loe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rG9ZI-0007Sq-3L; Wed, 20 Dec 2023 22:17:52 -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 1rG9ZE-0007Mn-DL for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:17:49 -0500 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9ZC-0003km-Nz for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:17:47 -0500 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-42795ea3e35so2378751cf.2 for ; Wed, 20 Dec 2023 19:17:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703128666; x=1703733466; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bGO4SKx+78nJlz7T7KRC0paS7HeJqQ6oQsF4iEBtiBw=; b=pH760Loej2zNboLdixx1WYdAC+YbRacafLGWbUYsDyjbhMaOdeiUhUFfJdhr6YUits 8exnZTRHW/5DMmeCUlpalz3Yu1S/6JUdINfVbQuoD/po+w/INtGe6UH2Ffc58nP52tRw peAyxHuY/lOicmqqk1ym5SllC1FHm7ARbo3V+amegz70TctD5J0QKdFaNu4aPO0SlCQF Ltiql0L+/aLJvnpfOT5KO2g6KFt98dZjwk79IGyfpoYSnWKaTWfKPL6E9YwE+LE7yk7H 3n0zJsH3+rzRMIi2Nu1Miea2VKr3nii/dh2hyk6V9lO0ySJS8398RqppJqjjfTvYaBwL a7/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703128666; x=1703733466; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bGO4SKx+78nJlz7T7KRC0paS7HeJqQ6oQsF4iEBtiBw=; b=N7UNhFPLLZLYBBOirr+rujkLmdAlvLzg1BDeDmuqNQ6WknabnWIFpDWd3UUB27y6iy QNyrMxJOh+XSHjmswfdjqtQkOUGscGS65QcNl4KBMkhruyAz3SHzoP/YDJWbMhcWPW6i /SbmVwWa2eWwz0dLeQkZPDtXQyAPEzH2YgSVKIWn9WGXvLNXMTafTAU2GWPNJ8+DROmK l+4FP4IfkOFbvC25QJo5cgyIqGhPwvd3D/TLeUnV6PnblVX8tIey4eI6iRgCN3MTydK9 zK4nHbuPRcZW1GFm0SPBkpDp7PWwyhiZ+IcX0Nyh0BSMvVppMgKzuzs5eiaiY6iJLm8/ F80w== X-Gm-Message-State: AOJu0YwArPpZ/QFU/CVhSjVYnRsOhwVF5YVSFNKlniuM85Wbpzht1jjy AUqj416UMJjCD/l182UYtSqIbKRPjZZsh/H36CtROCGs X-Received: by 2002:a05:622a:138b:b0:423:9cce:296d with SMTP id o11-20020a05622a138b00b004239cce296dmr34237318qtk.37.1703128665743; Wed, 20 Dec 2023 19:17:45 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id n8-20020a05620a294800b0078116d55191sm360808qkp.130.2023.12.20.19.17.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:17:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 09/71] target/loongarch: Constify VMState in machine.c Date: Thu, 21 Dec 2023 14:15:50 +1100 Message-Id: <20231221031652.119827-10-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 Received-SPF: pass client-ip=2607:f8b0:4864:20::82b; envelope-from=richard.henderson@linaro.org; helo=mail-qt1-x82b.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Song Gao --- target/loongarch/machine.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/target/loongarch/machine.c b/target/loongarch/machine.c index 1c4e01d076..c7029fb9b4 100644 --- a/target/loongarch/machine.c +++ b/target/loongarch/machine.c @@ -14,7 +14,7 @@ static const VMStateDescription vmstate_fpu_reg = { .name = "fpu_reg", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(UD(0), VReg), VMSTATE_END_OF_LIST() } @@ -36,7 +36,7 @@ static const VMStateDescription vmstate_fpu = { .version_id = 1, .minimum_version_id = 1, .needed = fpu_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_FPU_REGS(env.fpr, LoongArchCPU, 0), VMSTATE_UINT32(env.fcsr0, LoongArchCPU), VMSTATE_BOOL_ARRAY(env.cf, LoongArchCPU, 8), @@ -48,7 +48,7 @@ static const VMStateDescription vmstate_lsxh_reg = { .name = "lsxh_reg", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(UD(1), VReg), VMSTATE_END_OF_LIST() } @@ -70,7 +70,7 @@ static const VMStateDescription vmstate_lsx = { .version_id = 1, .minimum_version_id = 1, .needed = lsx_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_LSXH_REGS(env.fpr, LoongArchCPU, 0), VMSTATE_END_OF_LIST() }, @@ -80,7 +80,7 @@ static const VMStateDescription vmstate_lasxh_reg = { .name = "lasxh_reg", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(UD(2), VReg), VMSTATE_UINT64(UD(3), VReg), VMSTATE_END_OF_LIST() @@ -103,7 +103,7 @@ static const VMStateDescription vmstate_lasx = { .version_id = 1, .minimum_version_id = 1, .needed = lasx_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_LASXH_REGS(env.fpr, LoongArchCPU, 0), VMSTATE_END_OF_LIST() }, @@ -114,7 +114,7 @@ const VMStateDescription vmstate_tlb = { .name = "cpu/tlb", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(tlb_misc, LoongArchTLB), VMSTATE_UINT64(tlb_entry0, LoongArchTLB), VMSTATE_UINT64(tlb_entry1, LoongArchTLB), @@ -127,7 +127,7 @@ const VMStateDescription vmstate_loongarch_cpu = { .name = "cpu", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINTTL_ARRAY(env.gpr, LoongArchCPU, 32), VMSTATE_UINTTL(env.pc, LoongArchCPU), @@ -193,7 +193,7 @@ const VMStateDescription vmstate_loongarch_cpu = { VMSTATE_END_OF_LIST() }, - .subsections = (const VMStateDescription*[]) { + .subsections = (const VMStateDescription * const []) { &vmstate_fpu, &vmstate_lsx, &vmstate_lasx,