[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 28/33] spapr: Populate ibm, associativity-lookup-arrays
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 28/33] spapr: Populate ibm, associativity-lookup-arrays correctly for non-NUMA |
Date: |
Mon, 21 Sep 2015 11:06:23 +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 dd0e5c7..c3c5e0a 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -724,6 +724,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) +
@@ -789,10 +790,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] [PULL 02/33] spapr: Create pseries-2.5 machine, (continued)
- [Qemu-ppc] [PULL 02/33] spapr: Create pseries-2.5 machine, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 11/33] sPAPR: Introduce rtas_ldq(), David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 27/33] spapr: Provide better error message when slots exceed max allowed, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 12/33] pseries: define coldplugged devices as "configured", David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 24/33] spapr: Make hash table size a factor of maxram_size, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 21/33] spapr: Use QEMU limit for maximum CPUs number, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 15/33] spapr: Enable in-kernel H_SET_MODE handling, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 18/33] spapr: Initialize hotplug memory address space, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 31/33] spapr: Move memory hotplug to RTAS_LOG_V6_HP_ID_DRC_COUNT type, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 26/33] spapr: Don't allow memory hotplug to memory less nodes, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 28/33] spapr: Populate ibm, associativity-lookup-arrays correctly for non-NUMA,
David Gibson <=
- [Qemu-ppc] [PULL 20/33] spapr: Don't use QOM [*] syntax for DR connectors., David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 17/33] spapr_drc: don't allow 'empty' DRCs to be unisolated or allocated, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 32/33] spapr: Fix default NUMA node allocation for threads, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 33/33] ppc/spapr: Fix buffer overflow in spapr_populate_drconf_memory(), David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 25/33] spapr: Memory hotplug support, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 30/33] spapr: Support hotplug by specifying DRC count, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 29/33] spapr: Revert to address@hidden representation for non-hotplugged memory, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 19/33] spapr_drc: use RTAS return codes for methods called by RTAS, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 22/33] spapr: Add LMB DR connectors, David Gibson, 2015/09/20
- [Qemu-ppc] [PULL 23/33] spapr: Support ibm, dynamic-reconfiguration-memory, David Gibson, 2015/09/20