aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/ppc.c
diff options
context:
space:
mode:
authorSam Bobroff <sam.bobroff@au1.ibm.com>2017-08-09 15:38:56 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2017-09-08 09:30:55 +1000
commit2e886fb39168942ab03b91062e715946e4af8436 (patch)
tree570b2f6294fc9fe07aee21ed8f2dfc87240fcb52 /hw/ppc/ppc.c
parent81210c2009296261879af5d58a3a499815031765 (diff)
downloadqemu-2e886fb39168942ab03b91062e715946e4af8436.zip
qemu-2e886fb39168942ab03b91062e715946e4af8436.tar.gz
qemu-2e886fb39168942ab03b91062e715946e4af8436.tar.bz2
ppc: spapr: Make VCPU ID handling private to SPAPR
The concept of a VCPU ID that differs from the CPU's index (cpu->cpu_index) exists only within SPAPR machines so, move the functions ppc_get_vcpu_id() and ppc_get_cpu_by_vcpu_id() into spapr.c and rename them appropriately. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/ppc.c')
-rw-r--r--hw/ppc/ppc.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
index 4477d4a..f76886f 100644
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -1358,27 +1358,6 @@ void PPC_debug_write (void *opaque, uint32_t addr, uint32_t val)
}
}
-/* CPU device-tree ID helpers */
-int ppc_get_vcpu_id(PowerPCCPU *cpu)
-{
- return cpu->vcpu_id;
-}
-
-PowerPCCPU *ppc_get_cpu_by_vcpu_id(int vcpu_id)
-{
- CPUState *cs;
-
- CPU_FOREACH(cs) {
- PowerPCCPU *cpu = POWERPC_CPU(cs);
-
- if (cpu->vcpu_id == vcpu_id) {
- return cpu;
- }
- }
-
- return NULL;
-}
-
void ppc_cpu_parse_features(const char *cpu_model)
{
CPUClass *cc;