xref: /openbmc/qemu/include/hw/ppc/spapr_numa.h (revision fce8f7735fcea23056ff41be55e73eacbca31b5e)
11eee9950SDaniel Henrique Barboza /*
21eee9950SDaniel Henrique Barboza  * QEMU PowerPC pSeries Logical Partition NUMA associativity handling
31eee9950SDaniel Henrique Barboza  *
41eee9950SDaniel Henrique Barboza  * Copyright IBM Corp. 2020
51eee9950SDaniel Henrique Barboza  *
61eee9950SDaniel Henrique Barboza  * Authors:
71eee9950SDaniel Henrique Barboza  *  Daniel Henrique Barboza      <danielhb413@gmail.com>
81eee9950SDaniel Henrique Barboza  *
91eee9950SDaniel Henrique Barboza  * This work is licensed under the terms of the GNU GPL, version 2 or later.
101eee9950SDaniel Henrique Barboza  * See the COPYING file in the top-level directory.
111eee9950SDaniel Henrique Barboza  */
121eee9950SDaniel Henrique Barboza 
131eee9950SDaniel Henrique Barboza #ifndef HW_SPAPR_NUMA_H
141eee9950SDaniel Henrique Barboza #define HW_SPAPR_NUMA_H
151eee9950SDaniel Henrique Barboza 
16f1aa45ffSDaniel Henrique Barboza #include "hw/boards.h"
171eee9950SDaniel Henrique Barboza #include "hw/ppc/spapr.h"
181eee9950SDaniel Henrique Barboza 
19f1aa45ffSDaniel Henrique Barboza /*
20f1aa45ffSDaniel Henrique Barboza  * Having both SpaprMachineState and MachineState as arguments
21f1aa45ffSDaniel Henrique Barboza  * feels odd, but it will spare a MACHINE() call inside the
22f1aa45ffSDaniel Henrique Barboza  * function. spapr_machine_init() is the only caller for it, and
23f1aa45ffSDaniel Henrique Barboza  * it has both pointers resolved already.
24f1aa45ffSDaniel Henrique Barboza  */
25f1aa45ffSDaniel Henrique Barboza void spapr_numa_associativity_init(SpaprMachineState *spapr,
26f1aa45ffSDaniel Henrique Barboza                                    MachineState *machine);
27*5dab5abeSDaniel Henrique Barboza void spapr_numa_associativity_check(SpaprMachineState *spapr);
281eee9950SDaniel Henrique Barboza void spapr_numa_write_rtas_dt(SpaprMachineState *spapr, void *fdt, int rtas);
29f1aa45ffSDaniel Henrique Barboza void spapr_numa_write_associativity_dt(SpaprMachineState *spapr, void *fdt,
30f1aa45ffSDaniel Henrique Barboza                                        int offset, int nodeid);
318f86a408SDaniel Henrique Barboza int spapr_numa_fixup_cpu_dt(SpaprMachineState *spapr, void *fdt,
328f86a408SDaniel Henrique Barboza                             int offset, PowerPCCPU *cpu);
330ee52012SDaniel Henrique Barboza int spapr_numa_write_assoc_lookup_arrays(SpaprMachineState *spapr, void *fdt,
340ee52012SDaniel Henrique Barboza                                          int offset);
3566407069SDaniel Henrique Barboza unsigned int spapr_numa_initial_nvgpu_numa_id(MachineState *machine);
361eee9950SDaniel Henrique Barboza 
371eee9950SDaniel Henrique Barboza #endif /* HW_SPAPR_NUMA_H */
38