[PATCH] target/openrisc: Replace VMSTATE_UINTTL() -> VMSTATE_UINT32()

Philippe Mathieu-Daudé posted 1 patch 4 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250925004855.59084-1-philmd@linaro.org
Maintainers: Stafford Horne <shorne@gmail.com>
target/openrisc/machine.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] target/openrisc: Replace VMSTATE_UINTTL() -> VMSTATE_UINT32()
Posted by Philippe Mathieu-Daudé 4 months, 2 weeks ago
Both OpenRISCTLBEntry fields are of uint32_t type. Use the
appropriate VMSTATE_UINT32() macro.

There is no functional change (the migration stream is not
modified), because the OpenRISC targets are only built as 32-bit:

  $ git grep TARGET_LONG_BITS configs/targets/or1k-*
  configs/targets/or1k-linux-user.mak:5:TARGET_LONG_BITS=32
  configs/targets/or1k-softmmu.mak:5:TARGET_LONG_BITS=32

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/openrisc/machine.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/openrisc/machine.c b/target/openrisc/machine.c
index 081c706d02c..fa054e528bd 100644
--- a/target/openrisc/machine.c
+++ b/target/openrisc/machine.c
@@ -26,8 +26,8 @@ static const VMStateDescription vmstate_tlb_entry = {
     .version_id = 1,
     .minimum_version_id = 1,
     .fields = (const VMStateField[]) {
-        VMSTATE_UINTTL(mr, OpenRISCTLBEntry),
-        VMSTATE_UINTTL(tr, OpenRISCTLBEntry),
+        VMSTATE_UINT32(mr, OpenRISCTLBEntry),
+        VMSTATE_UINT32(tr, OpenRISCTLBEntry),
         VMSTATE_END_OF_LIST()
     }
 };
-- 
2.51.0


Re: [PATCH] target/openrisc: Replace VMSTATE_UINTTL() -> VMSTATE_UINT32()
Posted by Philippe Mathieu-Daudé 4 months ago
On 25/9/25 02:48, Philippe Mathieu-Daudé wrote:
> Both OpenRISCTLBEntry fields are of uint32_t type. Use the
> appropriate VMSTATE_UINT32() macro.
> 
> There is no functional change (the migration stream is not
> modified), because the OpenRISC targets are only built as 32-bit:
> 
>    $ git grep TARGET_LONG_BITS configs/targets/or1k-*
>    configs/targets/or1k-linux-user.mak:5:TARGET_LONG_BITS=32
>    configs/targets/or1k-softmmu.mak:5:TARGET_LONG_BITS=32
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/openrisc/machine.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Patch queued, thanks.

Re: [PATCH] target/openrisc: Replace VMSTATE_UINTTL() -> VMSTATE_UINT32()
Posted by Anton Johansson via 4 months ago
On 25/09/25, Philippe Mathieu-Daudé wrote:
> Both OpenRISCTLBEntry fields are of uint32_t type. Use the
> appropriate VMSTATE_UINT32() macro.
> 
> There is no functional change (the migration stream is not
> modified), because the OpenRISC targets are only built as 32-bit:
> 
>   $ git grep TARGET_LONG_BITS configs/targets/or1k-*
>   configs/targets/or1k-linux-user.mak:5:TARGET_LONG_BITS=32
>   configs/targets/or1k-softmmu.mak:5:TARGET_LONG_BITS=32
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  target/openrisc/machine.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/openrisc/machine.c b/target/openrisc/machine.c
> index 081c706d02c..fa054e528bd 100644
> --- a/target/openrisc/machine.c
> +++ b/target/openrisc/machine.c
> @@ -26,8 +26,8 @@ static const VMStateDescription vmstate_tlb_entry = {
>      .version_id = 1,
>      .minimum_version_id = 1,
>      .fields = (const VMStateField[]) {
> -        VMSTATE_UINTTL(mr, OpenRISCTLBEntry),
> -        VMSTATE_UINTTL(tr, OpenRISCTLBEntry),
> +        VMSTATE_UINT32(mr, OpenRISCTLBEntry),
> +        VMSTATE_UINT32(tr, OpenRISCTLBEntry),
>          VMSTATE_END_OF_LIST()
>      }
>  };
> -- 
> 2.51.0
> 

Reviewed-by: Anton Johansson <anjo@rev.ng>

Re: [PATCH] target/openrisc: Replace VMSTATE_UINTTL() -> VMSTATE_UINT32()
Posted by Philippe Mathieu-Daudé 4 months ago
ping

On 25/9/25 02:48, Philippe Mathieu-Daudé wrote:
> Both OpenRISCTLBEntry fields are of uint32_t type. Use the
> appropriate VMSTATE_UINT32() macro.
> 
> There is no functional change (the migration stream is not
> modified), because the OpenRISC targets are only built as 32-bit:
> 
>    $ git grep TARGET_LONG_BITS configs/targets/or1k-*
>    configs/targets/or1k-linux-user.mak:5:TARGET_LONG_BITS=32
>    configs/targets/or1k-softmmu.mak:5:TARGET_LONG_BITS=32
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/openrisc/machine.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/openrisc/machine.c b/target/openrisc/machine.c
> index 081c706d02c..fa054e528bd 100644
> --- a/target/openrisc/machine.c
> +++ b/target/openrisc/machine.c
> @@ -26,8 +26,8 @@ static const VMStateDescription vmstate_tlb_entry = {
>       .version_id = 1,
>       .minimum_version_id = 1,
>       .fields = (const VMStateField[]) {
> -        VMSTATE_UINTTL(mr, OpenRISCTLBEntry),
> -        VMSTATE_UINTTL(tr, OpenRISCTLBEntry),
> +        VMSTATE_UINT32(mr, OpenRISCTLBEntry),
> +        VMSTATE_UINT32(tr, OpenRISCTLBEntry),
>           VMSTATE_END_OF_LIST()
>       }
>   };