mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 11:04:58 -06:00
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>
This commit is contained in:
parent
81210c2009
commit
2e886fb391
7 changed files with 41 additions and 51 deletions
|
@ -2514,23 +2514,5 @@ static inline bool lsw_reg_in_range(int start, int nregs, int rx)
|
|||
|
||||
void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUPPCState *env);
|
||||
|
||||
/**
|
||||
* ppc_get_vcpu_id:
|
||||
* @cs: a PowerPCCPU struct.
|
||||
*
|
||||
* Returns a device-tree ID for a CPU.
|
||||
*/
|
||||
int ppc_get_vcpu_id(PowerPCCPU *cpu);
|
||||
|
||||
/**
|
||||
* ppc_get_cpu_by_vcpu_id:
|
||||
* @vcpu_id: a VCPU ID
|
||||
*
|
||||
* Searches for a CPU by @vcpu_id.
|
||||
*
|
||||
* Returns: a PowerPCCPU struct
|
||||
*/
|
||||
PowerPCCPU *ppc_get_cpu_by_vcpu_id(int vcpu_id);
|
||||
|
||||
void ppc_maybe_bswap_register(CPUPPCState *env, uint8_t *mem_buf, int len);
|
||||
#endif /* PPC_CPU_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue