target-ppc: Pass PowerPCCPU to cpu_ppc_hypercall
Adapt emulate_spapr_hypercall() accordingly. Needed for changing spapr_hypercall() argument type to PowerPCCPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
5c26a5b303
commit
1b14670a38
@ -576,8 +576,10 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr)
|
|||||||
return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
|
return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void emulate_spapr_hypercall(CPUPPCState *env)
|
static void emulate_spapr_hypercall(PowerPCCPU *cpu)
|
||||||
{
|
{
|
||||||
|
CPUPPCState *env = &cpu->env;
|
||||||
|
|
||||||
if (msr_pr) {
|
if (msr_pr) {
|
||||||
hcall_dprintf("Hypercall made with MSR[PR]=1\n");
|
hcall_dprintf("Hypercall made with MSR[PR]=1\n");
|
||||||
env->gpr[3] = H_PRIVILEGE;
|
env->gpr[3] = H_PRIVILEGE;
|
||||||
|
@ -2220,7 +2220,7 @@ static inline bool msr_is_64bit(CPUPPCState *env, target_ulong msr)
|
|||||||
return msr & (1ULL << MSR_SF);
|
return msr & (1ULL << MSR_SF);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void (*cpu_ppc_hypercall)(CPUPPCState *);
|
extern void (*cpu_ppc_hypercall)(PowerPCCPU *);
|
||||||
|
|
||||||
static inline bool cpu_has_work(CPUPPCState *env)
|
static inline bool cpu_has_work(CPUPPCState *env)
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* PowerPC Hypercall emulation */
|
/* PowerPC Hypercall emulation */
|
||||||
|
|
||||||
void (*cpu_ppc_hypercall)(CPUPPCState *);
|
void (*cpu_ppc_hypercall)(PowerPCCPU *);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Exception processing */
|
/* Exception processing */
|
||||||
@ -239,7 +239,7 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp)
|
|||||||
dump_syscall(env);
|
dump_syscall(env);
|
||||||
lev = env->error_code;
|
lev = env->error_code;
|
||||||
if ((lev == 1) && cpu_ppc_hypercall) {
|
if ((lev == 1) && cpu_ppc_hypercall) {
|
||||||
cpu_ppc_hypercall(env);
|
cpu_ppc_hypercall(cpu);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (lev == 1 || (lpes0 == 0 && lpes1 == 0)) {
|
if (lev == 1 || (lpes0 == 0 && lpes1 == 0)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user