[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH stable-1.1 04/26] target-xtensa: extract TLB entry s
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH stable-1.1 04/26] target-xtensa: extract TLB entry setting method |
Date: |
Fri, 22 Jun 2012 19:33:08 -0500 |
From: Max Filippov <address@hidden>
Signed-off-by: Max Filippov <address@hidden>
Signed-off-by: Blue Swirl <address@hidden>
---
target-xtensa/cpu.h | 3 +++
target-xtensa/op_helper.c | 15 +++++++++++----
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/target-xtensa/cpu.h b/target-xtensa/cpu.h
index 6d0ea7c..6c590fe 100644
--- a/target-xtensa/cpu.h
+++ b/target-xtensa/cpu.h
@@ -370,6 +370,9 @@ void split_tlb_entry_spec_way(const CPUXtensaState *env,
uint32_t v, bool dtlb,
uint32_t *vpn, uint32_t wi, uint32_t *ei);
int xtensa_tlb_lookup(const CPUXtensaState *env, uint32_t addr, bool dtlb,
uint32_t *pwi, uint32_t *pei, uint8_t *pring);
+void xtensa_tlb_set_entry_mmu(const CPUXtensaState *env,
+ xtensa_tlb_entry *entry, bool dtlb,
+ unsigned wi, unsigned ei, uint32_t vpn, uint32_t pte);
void xtensa_tlb_set_entry(CPUXtensaState *env, bool dtlb,
unsigned wi, unsigned ei, uint32_t vpn, uint32_t pte);
int xtensa_get_physical_addr(CPUXtensaState *env,
diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c
index ce61157..663bb6d 100644
--- a/target-xtensa/op_helper.c
+++ b/target-xtensa/op_helper.c
@@ -655,6 +655,16 @@ uint32_t HELPER(ptlb)(uint32_t v, uint32_t dtlb)
}
}
+void xtensa_tlb_set_entry_mmu(const CPUXtensaState *env,
+ xtensa_tlb_entry *entry, bool dtlb,
+ unsigned wi, unsigned ei, uint32_t vpn, uint32_t pte)
+{
+ entry->vaddr = vpn;
+ entry->paddr = pte & xtensa_tlb_get_addr_mask(env, dtlb, wi);
+ entry->asid = (env->sregs[RASID] >> ((pte >> 1) & 0x18)) & 0xff;
+ entry->attr = pte & 0xf;
+}
+
void xtensa_tlb_set_entry(CPUXtensaState *env, bool dtlb,
unsigned wi, unsigned ei, uint32_t vpn, uint32_t pte)
{
@@ -665,10 +675,7 @@ void xtensa_tlb_set_entry(CPUXtensaState *env, bool dtlb,
if (entry->asid) {
tlb_flush_page(env, entry->vaddr);
}
- entry->vaddr = vpn;
- entry->paddr = pte & xtensa_tlb_get_addr_mask(env, dtlb, wi);
- entry->asid = (env->sregs[RASID] >> ((pte >> 1) & 0x18)) & 0xff;
- entry->attr = pte & 0xf;
+ xtensa_tlb_set_entry_mmu(env, entry, dtlb, wi, ei, vpn, pte);
tlb_flush_page(env, entry->vaddr);
} else {
qemu_log("%s %d, %d, %d trying to set immutable entry\n",
--
1.7.4.1
- [Qemu-devel] [PATCH stable-1.1 00/26] Initial tree and candidates for stable-1.1, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 01/26] virtio-blk: Fix geometry sector calculation, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 02/26] target-xtensa: flush TLB page for new MMU mapping, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 03/26] target-xtensa: update EXCVADDR in case of page table lookup, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 04/26] target-xtensa: extract TLB entry setting method,
Michael Roth <=
- [Qemu-devel] [PATCH stable-1.1 05/26] target-xtensa: update autorefill TLB entries conditionally, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 06/26] target-xtensa: control page table lookup explicitly, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 07/26] target-xtensa: add MMU pagewalking tests, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 08/26] exec: fix TB invalidation after breakpoint insertion/deletion, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 09/26] target-xtensa: fix CCOUNT for conditional branches, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 10/26] trace/simple.c: fix deprecated glib2 interface, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 11/26] configure: report missing libraries for virtfs, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 12/26] kvm/apic: correct short memset, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 13/26] kvm: i8254: Fix conversion of in-kernel to userspace state, Michael Roth, 2012/06/22
- [Qemu-devel] [PATCH stable-1.1 14/26] qcow2: Silence false warning, Michael Roth, 2012/06/22