[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/11] target/s390x/cpu_models: Use 'first_cpu' in s390_get_feat_b
|
From: |
Thomas Huth |
|
Subject: |
[PULL 05/11] target/s390x/cpu_models: Use 'first_cpu' in s390_get_feat_block() |
|
Date: |
Tue, 7 Nov 2023 19:32:22 +0100 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
We already have a global 'first_cpu' variable storing a pointer
to the first CPU, no need to use a static one.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231030093150.65297-1-philmd@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
target/s390x/cpu_models.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 4dead48650..540d445023 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -196,11 +196,7 @@ uint32_t s390_get_ibc_val(void)
void s390_get_feat_block(S390FeatType type, uint8_t *data)
{
- static S390CPU *cpu;
-
- if (!cpu) {
- cpu = S390_CPU(qemu_get_cpu(0));
- }
+ S390CPU *cpu = S390_CPU(first_cpu);
if (!cpu || !cpu->model) {
return;
--
2.41.0
- [PULL 00/11] s390x and MAINTAINERS updates, Thomas Huth, 2023/11/07
- [PULL 01/11] MAINTAINERS: Add the virtio-gpu documentation to the corresponding section, Thomas Huth, 2023/11/07
- [PULL 02/11] MAINTAINERS: Add artist.c to the hppa machine section, Thomas Huth, 2023/11/07
- [PULL 04/11] s390/sclp: fix SCLP facility map, Thomas Huth, 2023/11/07
- [PULL 05/11] target/s390x/cpu_models: Use 'first_cpu' in s390_get_feat_block(),
Thomas Huth <=
- [PULL 03/11] tests/avocado: Allow newer versions of tesseract in the nextcube test, Thomas Huth, 2023/11/07
- [PULL 06/11] target/s390x: Fix CLC corrupting cc_src, Thomas Huth, 2023/11/07
- [PULL 07/11] tests/tcg/s390x: Test CLC with inaccessible second operand, Thomas Huth, 2023/11/07
- [PULL 08/11] target/s390x: Fix LAALG not updating cc_src, Thomas Huth, 2023/11/07
- [PULL 10/11] tests/tcg/s390x: Test ADD LOGICAL WITH CARRY, Thomas Huth, 2023/11/07
- [PULL 09/11] tests/tcg/s390x: Test LAALG with negative cc_src, Thomas Huth, 2023/11/07
- [PULL 11/11] target/s390x/cpu topology: Fix ordering and creation of TLEs, Thomas Huth, 2023/11/07
- Re: [PULL 00/11] s390x and MAINTAINERS updates, Stefan Hajnoczi, 2023/11/08