Make getting node CPU data for PowerPC unsupported on other architectures. The function is also renamed as ppcNodeData to match other functions in PowerPC CPU driver. --- src/cpu/cpu_powerpc.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/cpu/cpu_powerpc.c b/src/cpu/cpu_powerpc.c index 832ec97..d5e9dd4 100644 --- a/src/cpu/cpu_powerpc.c +++ b/src/cpu/cpu_powerpc.c @@ -525,16 +525,6 @@ out: return ret; } -#if defined(__powerpc__) || \ - defined(__powerpc64__) -static uint32_t ppc_mfpvr(void) -{ - uint32_t pvr; - asm("mfpvr %0" - : "=r"(pvr)); - return pvr; -} -#endif static void PowerPCDataFree(union cpuData *data) @@ -545,8 +535,9 @@ PowerPCDataFree(union cpuData *data) VIR_FREE(data); } +#if defined(__powerpc__) || defined(__powerpc64__) static union cpuData * -PowerPCNodeData(void) +ppcNodeData(void) { union cpuData *data; @@ -555,13 +546,12 @@ PowerPCNodeData(void) return NULL; } -#if defined(__powerpc__) || \ - defined(__powerpc64__) - data->ppc.pvr = ppc_mfpvr(); -#endif + asm("mfpvr %0" + : "=r" (data->ppc.pvr)); return data; } +#endif static int PowerPCUpdate(virCPUDefPtr guest ATTRIBUTE_UNUSED, @@ -633,7 +623,11 @@ struct cpuArchDriver cpuDriverPowerPC = { .decode = PowerPCDecode, .encode = NULL, .free = PowerPCDataFree, - .nodeData = PowerPCNodeData, +#if defined(__powerpc__) || defined(__powerpc64__) + .nodeData = ppcNodeData, +#else + .nodeData = NULL, +#endif .guestData = NULL, .baseline = PowerPCBaseline, .update = PowerPCUpdate, -- 1.8.0.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list