target/hppa: Drop tlb_entry return from hppa_get_physical_address
The return-by-reference is never used. Reviewed-by: Helge Deller <deller@gmx.de> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
d8bc138125
commit
190d7fa572
@ -371,8 +371,7 @@ bool hppa_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
|
|||||||
void hppa_cpu_do_interrupt(CPUState *cpu);
|
void hppa_cpu_do_interrupt(CPUState *cpu);
|
||||||
bool hppa_cpu_exec_interrupt(CPUState *cpu, int int_req);
|
bool hppa_cpu_exec_interrupt(CPUState *cpu, int int_req);
|
||||||
int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx,
|
int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx,
|
||||||
int type, hwaddr *pphys, int *pprot,
|
int type, hwaddr *pphys, int *pprot);
|
||||||
HPPATLBEntry **tlb_entry);
|
|
||||||
void hppa_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr,
|
void hppa_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr,
|
||||||
vaddr addr, unsigned size,
|
vaddr addr, unsigned size,
|
||||||
MMUAccessType access_type,
|
MMUAccessType access_type,
|
||||||
|
@ -167,7 +167,7 @@ void hppa_cpu_do_interrupt(CPUState *cs)
|
|||||||
|
|
||||||
vaddr = hppa_form_gva_psw(old_psw, env->iasq_f, vaddr);
|
vaddr = hppa_form_gva_psw(old_psw, env->iasq_f, vaddr);
|
||||||
t = hppa_get_physical_address(env, vaddr, MMU_KERNEL_IDX,
|
t = hppa_get_physical_address(env, vaddr, MMU_KERNEL_IDX,
|
||||||
0, &paddr, &prot, NULL);
|
0, &paddr, &prot);
|
||||||
if (t >= 0) {
|
if (t >= 0) {
|
||||||
/* We can't re-load the instruction. */
|
/* We can't re-load the instruction. */
|
||||||
env->cr[CR_IIR] = 0;
|
env->cr[CR_IIR] = 0;
|
||||||
|
@ -197,18 +197,13 @@ static int match_prot_id64(CPUHPPAState *env, uint32_t access_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx,
|
int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx,
|
||||||
int type, hwaddr *pphys, int *pprot,
|
int type, hwaddr *pphys, int *pprot)
|
||||||
HPPATLBEntry **tlb_entry)
|
|
||||||
{
|
{
|
||||||
hwaddr phys;
|
hwaddr phys;
|
||||||
int prot, r_prot, w_prot, x_prot, priv;
|
int prot, r_prot, w_prot, x_prot, priv;
|
||||||
HPPATLBEntry *ent;
|
HPPATLBEntry *ent;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if (tlb_entry) {
|
|
||||||
*tlb_entry = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Virtual translation disabled. Map absolute to physical. */
|
/* Virtual translation disabled. Map absolute to physical. */
|
||||||
if (MMU_IDX_MMU_DISABLED(mmu_idx)) {
|
if (MMU_IDX_MMU_DISABLED(mmu_idx)) {
|
||||||
switch (mmu_idx) {
|
switch (mmu_idx) {
|
||||||
@ -238,10 +233,6 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx,
|
|||||||
goto egress;
|
goto egress;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tlb_entry) {
|
|
||||||
*tlb_entry = ent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We now know the physical address. */
|
/* We now know the physical address. */
|
||||||
phys = ent->pa + (addr - ent->itree.start);
|
phys = ent->pa + (addr - ent->itree.start);
|
||||||
|
|
||||||
@ -350,7 +341,7 @@ hwaddr hppa_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
|
|||||||
cpu->env.psw & PSW_W ? MMU_ABS_W_IDX : MMU_ABS_IDX);
|
cpu->env.psw & PSW_W ? MMU_ABS_W_IDX : MMU_ABS_IDX);
|
||||||
|
|
||||||
excp = hppa_get_physical_address(&cpu->env, addr, mmu_idx, 0,
|
excp = hppa_get_physical_address(&cpu->env, addr, mmu_idx, 0,
|
||||||
&phys, &prot, NULL);
|
&phys, &prot);
|
||||||
|
|
||||||
/* Since we're translating for debugging, the only error that is a
|
/* Since we're translating for debugging, the only error that is a
|
||||||
hard error is no translation at all. Otherwise, while a real cpu
|
hard error is no translation at all. Otherwise, while a real cpu
|
||||||
@ -432,7 +423,6 @@ bool hppa_cpu_tlb_fill(CPUState *cs, vaddr addr, int size,
|
|||||||
{
|
{
|
||||||
HPPACPU *cpu = HPPA_CPU(cs);
|
HPPACPU *cpu = HPPA_CPU(cs);
|
||||||
CPUHPPAState *env = &cpu->env;
|
CPUHPPAState *env = &cpu->env;
|
||||||
HPPATLBEntry *ent;
|
|
||||||
int prot, excp, a_prot;
|
int prot, excp, a_prot;
|
||||||
hwaddr phys;
|
hwaddr phys;
|
||||||
|
|
||||||
@ -448,8 +438,7 @@ bool hppa_cpu_tlb_fill(CPUState *cs, vaddr addr, int size,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
excp = hppa_get_physical_address(env, addr, mmu_idx,
|
excp = hppa_get_physical_address(env, addr, mmu_idx, a_prot, &phys, &prot);
|
||||||
a_prot, &phys, &prot, &ent);
|
|
||||||
if (unlikely(excp >= 0)) {
|
if (unlikely(excp >= 0)) {
|
||||||
if (probe) {
|
if (probe) {
|
||||||
return false;
|
return false;
|
||||||
@ -690,7 +679,7 @@ target_ulong HELPER(lpa)(CPUHPPAState *env, target_ulong addr)
|
|||||||
int prot, excp;
|
int prot, excp;
|
||||||
|
|
||||||
excp = hppa_get_physical_address(env, addr, MMU_KERNEL_IDX, 0,
|
excp = hppa_get_physical_address(env, addr, MMU_KERNEL_IDX, 0,
|
||||||
&phys, &prot, NULL);
|
&phys, &prot);
|
||||||
if (excp >= 0) {
|
if (excp >= 0) {
|
||||||
if (excp == EXCP_DTLB_MISS) {
|
if (excp == EXCP_DTLB_MISS) {
|
||||||
excp = EXCP_NA_DTLB_MISS;
|
excp = EXCP_NA_DTLB_MISS;
|
||||||
|
@ -334,8 +334,7 @@ target_ulong HELPER(probe)(CPUHPPAState *env, target_ulong addr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
mmu_idx = PRIV_P_TO_MMU_IDX(level, env->psw & PSW_P);
|
mmu_idx = PRIV_P_TO_MMU_IDX(level, env->psw & PSW_P);
|
||||||
excp = hppa_get_physical_address(env, addr, mmu_idx, 0, &phys,
|
excp = hppa_get_physical_address(env, addr, mmu_idx, 0, &phys, &prot);
|
||||||
&prot, NULL);
|
|
||||||
if (excp >= 0) {
|
if (excp >= 0) {
|
||||||
cpu_restore_state(env_cpu(env), GETPC());
|
cpu_restore_state(env_cpu(env), GETPC());
|
||||||
hppa_set_ior_and_isr(env, addr, MMU_IDX_MMU_DISABLED(mmu_idx));
|
hppa_set_ior_and_isr(env, addr, MMU_IDX_MMU_DISABLED(mmu_idx));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user