mirror of https://github.com/xemu-project/xemu.git
ppc: simplify ppc_hash64_hpte_page_shift_noslb()
The segment page shift parameter is never used. Let's remove it. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
ae4de14cd3
commit
1f0252e66e
|
@ -83,12 +83,12 @@ static target_ulong h_enter(PowerPCCPU *cpu, sPAPRMachineState *spapr,
|
|||
target_ulong pte_index = args[1];
|
||||
target_ulong pteh = args[2];
|
||||
target_ulong ptel = args[3];
|
||||
unsigned apshift, spshift;
|
||||
unsigned apshift;
|
||||
target_ulong raddr;
|
||||
target_ulong index;
|
||||
uint64_t token;
|
||||
|
||||
apshift = ppc_hash64_hpte_page_shift_noslb(cpu, pteh, ptel, &spshift);
|
||||
apshift = ppc_hash64_hpte_page_shift_noslb(cpu, pteh, ptel);
|
||||
if (!apshift) {
|
||||
/* Bad page size encoding */
|
||||
return H_PARAMETER;
|
||||
|
|
|
@ -610,14 +610,12 @@ static unsigned hpte_page_shift(const struct ppc_one_seg_page_size *sps,
|
|||
}
|
||||
|
||||
unsigned ppc_hash64_hpte_page_shift_noslb(PowerPCCPU *cpu,
|
||||
uint64_t pte0, uint64_t pte1,
|
||||
unsigned *seg_page_shift)
|
||||
uint64_t pte0, uint64_t pte1)
|
||||
{
|
||||
CPUPPCState *env = &cpu->env;
|
||||
int i;
|
||||
|
||||
if (!(pte0 & HPTE64_V_LARGE)) {
|
||||
*seg_page_shift = 12;
|
||||
return 12;
|
||||
}
|
||||
|
||||
|
@ -635,12 +633,10 @@ unsigned ppc_hash64_hpte_page_shift_noslb(PowerPCCPU *cpu,
|
|||
|
||||
shift = hpte_page_shift(sps, pte0, pte1);
|
||||
if (shift) {
|
||||
*seg_page_shift = sps->page_shift;
|
||||
return shift;
|
||||
}
|
||||
}
|
||||
|
||||
*seg_page_shift = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,7 @@ void ppc_hash64_tlb_flush_hpte(PowerPCCPU *cpu,
|
|||
target_ulong pte_index,
|
||||
target_ulong pte0, target_ulong pte1);
|
||||
unsigned ppc_hash64_hpte_page_shift_noslb(PowerPCCPU *cpu,
|
||||
uint64_t pte0, uint64_t pte1,
|
||||
unsigned *seg_page_shift);
|
||||
uint64_t pte0, uint64_t pte1);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue