From patchwork Fri Dec 29 21:23:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 758839 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp4672310wrw; Fri, 29 Dec 2023 13:31:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGn52rwwq8+5+Q9rjKiVhdrdZ5UX8KaN1zLZCQSk4kO45SmXwbdQpBobky9Nk0BGRSelp5 X-Received: by 2002:a05:620a:45a0:b0:781:37b7:edf0 with SMTP id bp32-20020a05620a45a000b0078137b7edf0mr13603680qkb.5.1703885478807; Fri, 29 Dec 2023 13:31:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703885478; cv=none; d=google.com; s=arc-20160816; b=wmxGbGuUKInICClAH297KsTV2mZ+OtnmlWVTXWseIlBSwFGNoin4DI2kzbGzYKFYtV iKuKeJo4HDB7HwK0YWLI5uFHIqIPS8Dg1WKp36EqQA2NcHhaQBGYFt6PelYnsvsR8jbG DsYQXDgf3J79MHg7XaKbko/tmg0J0ZHSQutjmv9fBMJDKRxNP756Xc1/IHvKNt7HVLNn B5GQ00lFq+v4hv32JcJ4PUUPi2Ry+vvAiVVwy53EQz4szjpugdrkt1/A2Y8BF4PZcU6I thk1trO+Q7T1qu5k+wnoCgSvxUf1DuODxyj7Cnme5bTht7RtHFDxnNR88Bc/cmpyXD5l bjqQ== 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:cc:to :from:dkim-signature; bh=2Y5DZJN4hv2XQe15PGcXdVWgl56bQTxp89hl5EeXrWM=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=U457VAFmhyYH6vIxYX3TgqfvLlO2j9lmg2f9nzCPUfdi8pkLtJXx5LU6mOKOjxxm3h caELA2r+1yJpI05IDwhj4xBwIzx4uHr3xkZQECg5oNhV7NBHM3I8DjJWzuEne7x8H2wh EeL4JykbZ5PJumxY7hIC6zOYLzsDrZItw4kFoxNs2po3WQisGhcrF8xY2xoiawPJzQxP m7n9Y1TgqfBgPhiMEFby2bM2ogsmdL696duj+8ZSeKtsagLSVY1lDyUNs7U2Lnuq6bmn WkVi6DginKSSEuhMU0F8O7R7OzRSphyl143wiS+dNpAK7zjYZh5q77Rebju2ZKWShaRs C/Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K6AnqXvh; 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 i14-20020a05620a248e00b0078137b394e3si15444727qkn.641.2023.12.29.13.31.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Dec 2023 13:31:18 -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=K6AnqXvh; 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 1rJKQJ-0000nW-47; Fri, 29 Dec 2023 16:29:43 -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 1rJKQD-0000AD-M0 for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:29:38 -0500 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJKQ8-0000R1-V4 for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:29:34 -0500 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3bbd6e37a9bso1280079b6e.0 for ; Fri, 29 Dec 2023 13:29:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703885371; x=1704490171; 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=2Y5DZJN4hv2XQe15PGcXdVWgl56bQTxp89hl5EeXrWM=; b=K6AnqXvh/GpqgphPu9NCTzz+qgBI9KQV244O0KPOO2RZfrcMAjoBz+ErtfgA6EjgdX hD/W7hKauLZbzJy7j+k/6fxX9AoUU521QTkimBIhs8OxW0WtwOei30J3h6S1fzeb53/7 r1xDAu8OGf2h98VF8YITqqGIrxyWtFM+sp4EmMIeIIricDTY9ph8RuY4qaLL8pAFYhcK SNsfyju62bYlD7+cO/jqJg8XMV8y1BrK/ElFIfpgG17gpcb2Xtu3h+XLtYNRaE44Ri4O dFnbyqbl7tFvvvv6LC0HSbX283QjkajQmJ7/c4UtBfd9vbNTQSTmWisEQd1qVK1mkfDO QhHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703885371; x=1704490171; 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=2Y5DZJN4hv2XQe15PGcXdVWgl56bQTxp89hl5EeXrWM=; b=luHO+1YQCgo+y3+9uEuuklqt8Z9oiCfvoWD4H9xHJlgSjgIh3ldZFo2oeg2ZK5nmlp DUxX86P/nxgo2p2nsWy9H53ywE+RsRsgqerWQNUmriVDRjiVlMmDWRUwK1OrVgcSmMiF GlfSn69EiUF35GVkVW3NygDXP2aS6E1ID9DCYYMTJS5iZqiEfomOWz8Qfp+OZRxJT0oS iPfu9HLCjzNVG23KLaOcekYwymtquu2D3SfFopd0+GUxnDesWY4uAFf+hz8T00RH672Z 7DO8y21IHXeJ9MtYPFNDXo2NbmixlmueaSzo1FuMemS6gUjt28fKpviS2oKacL73u2jx kywg== X-Gm-Message-State: AOJu0Yyph7foD7Zmhz/wRzpLJMyG5olJUEjPXSHQPZSU08WKXQ4C0qYo jXi1mXdy2zDrluKOsDPc94ATVVeduf3RkRK4eMRMC6xVp0CNxA== X-Received: by 2002:a05:6808:f0e:b0:3bb:ce11:5d3c with SMTP id m14-20020a0568080f0e00b003bbce115d3cmr4828044oiw.73.1703885371598; Fri, 29 Dec 2023 13:29:31 -0800 (PST) Received: from stoup.lan (203-217-28-32.perm.iinet.net.au. [203.217.28.32]) by smtp.gmail.com with ESMTPSA id bd33-20020a056a0027a100b006d9a96b7d0dsm11285396pfb.208.2023.12.29.13.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 13:29:31 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 67/71] system: Constify VMState Date: Sat, 30 Dec 2023 08:23:42 +1100 Message-Id: <20231229212346.147149-68-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231229212346.147149-1-richard.henderson@linaro.org> References: <20231229212346.147149-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::22e; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22e.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 Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id: <20231221031652.119827-68-richard.henderson@linaro.org> --- system/cpu-timers.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/system/cpu-timers.c b/system/cpu-timers.c index 7452d97b67..bdf3a41dcb 100644 --- a/system/cpu-timers.c +++ b/system/cpu-timers.c @@ -165,7 +165,7 @@ static const VMStateDescription icount_vmstate_warp_timer = { .version_id = 1, .minimum_version_id = 1, .needed = warp_timer_state_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_INT64(vm_clock_warp_start, TimersState), VMSTATE_TIMER_PTR(icount_warp_timer, TimersState), VMSTATE_END_OF_LIST() @@ -177,7 +177,7 @@ static const VMStateDescription icount_vmstate_adjust_timers = { .version_id = 1, .minimum_version_id = 1, .needed = adjust_timers_state_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_TIMER_PTR(icount_rt_timer, TimersState), VMSTATE_TIMER_PTR(icount_vm_timer, TimersState), VMSTATE_END_OF_LIST() @@ -189,7 +189,7 @@ static const VMStateDescription icount_vmstate_shift = { .version_id = 2, .minimum_version_id = 2, .needed = icount_shift_state_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_INT16(icount_time_shift, TimersState), VMSTATE_INT64(last_delta, TimersState), VMSTATE_END_OF_LIST() @@ -204,12 +204,12 @@ static const VMStateDescription icount_vmstate_timers = { .version_id = 1, .minimum_version_id = 1, .needed = icount_state_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_INT64(qemu_icount_bias, TimersState), VMSTATE_INT64(qemu_icount, TimersState), VMSTATE_END_OF_LIST() }, - .subsections = (const VMStateDescription * []) { + .subsections = (const VMStateDescription * const []) { &icount_vmstate_warp_timer, &icount_vmstate_adjust_timers, &icount_vmstate_shift, @@ -221,13 +221,13 @@ static const VMStateDescription vmstate_timers = { .name = "timer", .version_id = 2, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_INT64(cpu_ticks_offset, TimersState), VMSTATE_UNUSED(8), VMSTATE_INT64_V(cpu_clock_offset, TimersState, 2), VMSTATE_END_OF_LIST() }, - .subsections = (const VMStateDescription * []) { + .subsections = (const VMStateDescription * const []) { &icount_vmstate_timers, NULL }