[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 18/25] spapr: Populate ibm, associativity-lookup-array
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 18/25] spapr: Populate ibm, associativity-lookup-arrays correctly for non-NUMA |
Date: |
Thu, 3 Sep 2015 14:28:09 +1000 |
From: Bharata B Rao <address@hidden>
When NUMA isn't configured explicitly, assume node 0 is present for
the purpose of creating ibm,associativity-lookup-arrays property
under ibm,dynamic-reconfiguration-memory DT node. This ensures that
the associativity index property is correctly updated in ibm,dynamic-memory
for the LMB that is hotplugged.
Signed-off-by: Bharata B Rao <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 90caabe..a762d21 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -726,6 +726,7 @@ static int spapr_populate_drconf_memory(sPAPRMachineState
*spapr, void *fdt)
uint32_t nr_lmbs = machine->maxram_size/lmb_size - nr_rma_lmbs;
uint32_t nr_assigned_lmbs = machine->ram_size/lmb_size - nr_rma_lmbs;
uint32_t *int_buf, *cur_index, buf_len;
+ int nr_nodes = nb_numa_nodes ? nb_numa_nodes : 1;
/* Allocate enough buffer size to fit in ibm,dynamic-memory */
buf_len = nr_lmbs * SPAPR_DR_LMB_LIST_ENTRY_SIZE * sizeof(uint32_t) +
@@ -791,10 +792,10 @@ static int spapr_populate_drconf_memory(sPAPRMachineState
*spapr, void *fdt)
/* ibm,associativity-lookup-arrays */
cur_index = int_buf;
- int_buf[0] = cpu_to_be32(nb_numa_nodes);
+ int_buf[0] = cpu_to_be32(nr_nodes);
int_buf[1] = cpu_to_be32(4); /* Number of entries per associativity list */
cur_index += 2;
- for (i = 0; i < nb_numa_nodes; i++) {
+ for (i = 0; i < nr_nodes; i++) {
uint32_t associativity[] = {
cpu_to_be32(0x0),
cpu_to_be32(0x0),
--
2.4.3
- [Qemu-ppc] [PATCH 14/25] spapr: add dumpdtb support, (continued)
- [Qemu-ppc] [PATCH 14/25] spapr: add dumpdtb support, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 04/25] spapr: Add LMB DR connectors, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 22/25] spapr_rtas: Prevent QEMU crash during hotplug without a prior device_add, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 03/25] spapr: Initialize hotplug memory address space, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 07/25] spapr: Memory hotplug support, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 08/25] spapr: Don't allow memory hotplug to memory less nodes, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 09/25] spapr: Add /ibm,partition-name, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 17/25] spapr: Provide better error message when slots exceed max allowed, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 20/25] spapr: Support hotplug by specifying DRC count, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 16/25] spapr: Use QEMU limit for maximum CPUs number, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 18/25] spapr: Populate ibm, associativity-lookup-arrays correctly for non-NUMA,
David Gibson <=
- [Qemu-ppc] [PATCH 21/25] spapr: Move memory hotplug to RTAS_LOG_V6_HP_ID_DRC_COUNT type, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 23/25] sPAPR: Introduce rtas_ldq(), David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 24/25] pseries: define coldplugged devices as "configured", David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 15/25] ppc/spapr: Use qemu_log_mask() for hcall_dprintf(), David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 05/25] spapr: Support ibm, dynamic-reconfiguration-memory, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 19/25] spapr: Revert to address@hidden representation for non-hotplugged memory, David Gibson, 2015/09/03
- [Qemu-ppc] [PATCH 25/25] pseries: Update SLOF firmware image to qemu-slof-20150813, David Gibson, 2015/09/03