Skip to contentSkip to conversation

s390x/sclp: fixup highest CPU address

PATCH Applied Christian Borntraeger 3 participants 3 messages Dec 19, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390x/sclp: fixup highest CPU address

the highest cpu address is not the same as max_cpus. max_cpus counts from 1 while the cpu address starts at 0.

---
 hw/s390x/sclp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/sclp.c +1 -1
index 9be0cb80ad..21351ffffc 100644
@@ -67,7 +67,7 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb)
     prepare_cpu_entries(sclp, read_info->entries, &cpu_count);
     read_info->entries_cpu = cpu_to_be16(cpu_count);
     read_info->offset_cpu = cpu_to_be16(offsetof(ReadInfo, entries));
-    read_info->highest_cpu = cpu_to_be16(max_cpus);
+    read_info->highest_cpu = cpu_to_be16(max_cpus - 1);
 
     read_info->ibc_val = cpu_to_be32(s390_get_ibc_val());
 
Signature · 1 line
2.13.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Christian Borntraeger

the highest cpu address is not the same as max_cpus. max_cpus counts from 1 while the cpu address starts at 0.

---
 hw/s390x/sclp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/sclp.c +0 -0
index 9be0cb80ad..21351ffffc 100644

hw/s390x/sclp.c static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb) · line 73

Quoted 8 lines
hw/s390x/sclp.c +1 -1
@@ -67,7 +67,7 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb)
     prepare_cpu_entries(sclp, read_info->entries, &cpu_count);
     read_info->entries_cpu = cpu_to_be16(cpu_count);
     read_info->offset_cpu = cpu_to_be16(offsetof(ReadInfo, entries));
-    read_info->highest_cpu = cpu_to_be16(max_cpus);
+    read_info->highest_cpu = cpu_to_be16(max_cpus - 1);
 
     read_info->ibc_val = cpu_to_be32(s390_get_ibc_val());
 
Signature · 3 lines
Thanks,

David / dhildenb
#2 lore raw
In reply to Christian Borntraeger
Quoted 1 line · On Tue, 19 Dec 2017 09:28:07 +0100 Christian Borntraeger…

the highest cpu address is not the same as max_cpus. max_cpus

s/the/The/

Quoted 13 lines

counts from 1 while the cpu address starts at 0.

---
 hw/s390x/sclp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/sclp.c +0 -0
index 9be0cb80ad..21351ffffc 100644

hw/s390x/sclp.c static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb) · line 73

Quoted 8 lines
hw/s390x/sclp.c +1 -1
@@ -67,7 +67,7 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb)
     prepare_cpu_entries(sclp, read_info->entries, &cpu_count);
     read_info->entries_cpu = cpu_to_be16(cpu_count);
     read_info->offset_cpu = cpu_to_be16(offsetof(ReadInfo, entries));
-    read_info->highest_cpu = cpu_to_be16(max_cpus);
+    read_info->highest_cpu = cpu_to_be16(max_cpus - 1);
 
     read_info->ibc_val = cpu_to_be32(s390_get_ibc_val());
 

Thanks, applied.