[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/71] target/mips: Constify VMState in machine.c
From: |
Richard Henderson |
Subject: |
[PULL 12/71] target/mips: Constify VMState in machine.c |
Date: |
Sat, 30 Dec 2023 08:22:47 +1100 |
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-13-richard.henderson@linaro.org>
---
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;
}
-const VMStateInfo vmstate_info_fpr = {
+static const VMStateInfo vmstate_info_fpr = {
.name = "fpr",
.get = get_fpr,
.put = put_fpr,
@@ -56,21 +56,21 @@ const VMStateInfo vmstate_info_fpr = {
#define VMSTATE_FPR_ARRAY(_f, _s, _n) \
VMSTATE_FPR_ARRAY_V(_f, _s, _n, 0)
-static VMStateField vmstate_fpu_fields[] = {
+static const VMStateField vmstate_fpu_fields[] = {
VMSTATE_FPR_ARRAY(fpr, CPUMIPSFPUContext, 32),
VMSTATE_UINT32(fcr0, CPUMIPSFPUContext),
VMSTATE_UINT32(fcr31, CPUMIPSFPUContext),
VMSTATE_END_OF_LIST()
};
-const VMStateDescription vmstate_fpu = {
+static const VMStateDescription vmstate_fpu = {
.name = "cpu/fpu",
.version_id = 1,
.minimum_version_id = 1,
.fields = vmstate_fpu_fields
};
-const VMStateDescription vmstate_inactive_fpu = {
+static const VMStateDescription vmstate_inactive_fpu = {
.name = "cpu/inactive_fpu",
.version_id = 1,
.minimum_version_id = 1,
@@ -79,7 +79,7 @@ const VMStateDescription vmstate_inactive_fpu = {
/* TC state */
-static VMStateField vmstate_tc_fields[] = {
+static const VMStateField vmstate_tc_fields[] = {
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[] = {
VMSTATE_END_OF_LIST()
};
-const VMStateDescription vmstate_tc = {
+static const VMStateDescription vmstate_tc = {
.name = "cpu/tc",
.version_id = 2,
.minimum_version_id = 2,
.fields = vmstate_tc_fields
};
-const VMStateDescription vmstate_inactive_tc = {
+static const VMStateDescription vmstate_inactive_tc = {
.name = "cpu/inactive_tc",
.version_id = 2,
.minimum_version_id = 2,
@@ -119,11 +119,11 @@ const VMStateDescription vmstate_inactive_tc = {
/* MVP state */
-const VMStateDescription vmstate_mvp = {
+static const VMStateDescription vmstate_mvp = {
.name = "cpu/mvp",
.version_id = 1,
.minimum_version_id = 1,
- .fields = (VMStateField[]) {
+ .fields = (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;
}
-const VMStateInfo vmstate_info_tlb = {
+static const VMStateInfo vmstate_info_tlb = {
.name = "tlb_entry",
.get = get_tlb,
.put = put_tlb,
@@ -202,11 +202,11 @@ const VMStateInfo vmstate_info_tlb = {
#define VMSTATE_TLB_ARRAY(_f, _s, _n) \
VMSTATE_TLB_ARRAY_V(_f, _s, _n, 0)
-const VMStateDescription vmstate_tlb = {
+static const VMStateDescription vmstate_tlb = {
.name = "cpu/tlb",
.version_id = 2,
.minimum_version_id = 2,
- .fields = (VMStateField[]) {
+ .fields = (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 = {
.version_id = 21,
.minimum_version_id = 21,
.post_load = cpu_post_load,
- .fields = (VMStateField[]) {
+ .fields = (const VMStateField[]) {
/* Active TC */
VMSTATE_STRUCT(env.active_tc, MIPSCPU, 1, vmstate_tc, TCState),
--
2.34.1
- [PULL 03/71] target/arm: Constify hvf/hvf.c, (continued)
- [PULL 03/71] target/arm: Constify hvf/hvf.c, Richard Henderson, 2023/12/29
- [PULL 05/71] target/avr: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 04/71] target/alpha: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 06/71] target/cris: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 09/71] target/loongarch: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 07/71] target/hppa: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 08/71] target/i386: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 11/71] target/microblaze: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 10/71] target/m68k: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 13/71] target/openrisc: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 12/71] target/mips: Constify VMState in machine.c,
Richard Henderson <=
- [PULL 14/71] target/ppc: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 15/71] target/riscv: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 16/71] target/s390x: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 17/71] target/sparc: Constify VMState in machine.c, Richard Henderson, 2023/12/29
- [PULL 18/71] hw/arm: Constify VMState, Richard Henderson, 2023/12/29
- [PULL 19/71] hw/core: Constify VMState, Richard Henderson, 2023/12/29
- [PULL 20/71] hw/9pfs: Constify VMState, Richard Henderson, 2023/12/29
- [PULL 21/71] hw/acpi: Constify VMState, Richard Henderson, 2023/12/29
- [PULL 22/71] hw/adc: Constify VMState, Richard Henderson, 2023/12/29
- [PULL 26/71] hw/display: Constify VMState, Richard Henderson, 2023/12/29