mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
cputlb: Move tlb_lock to CPUTLBCommon
This is the first of several moves to reduce the size of the CPU_COMMON_TLB macro and improve some locality of refernce. Tested-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
a2e002ff79
commit
53d284554c
2 changed files with 38 additions and 27 deletions
|
@ -141,10 +141,21 @@ typedef struct CPUIOTLBEntry {
|
|||
MemTxAttrs attrs;
|
||||
} CPUIOTLBEntry;
|
||||
|
||||
/*
|
||||
* Data elements that are shared between all MMU modes.
|
||||
*/
|
||||
typedef struct CPUTLBCommon {
|
||||
/* lock serializes updates to tlb_table and tlb_v_table */
|
||||
QemuSpin lock;
|
||||
} CPUTLBCommon;
|
||||
|
||||
/*
|
||||
* The meaning of each of the MMU modes is defined in the target code.
|
||||
* Note that NB_MMU_MODES is not yet defined; we can only reference it
|
||||
* within preprocessor defines that will be expanded later.
|
||||
*/
|
||||
#define CPU_COMMON_TLB \
|
||||
/* The meaning of the MMU modes is defined in the target code. */ \
|
||||
/* tlb_lock serializes updates to tlb_table and tlb_v_table */ \
|
||||
QemuSpin tlb_lock; \
|
||||
CPUTLBCommon tlb_c; \
|
||||
CPUTLBEntry tlb_table[NB_MMU_MODES][CPU_TLB_SIZE]; \
|
||||
CPUTLBEntry tlb_v_table[NB_MMU_MODES][CPU_VTLB_SIZE]; \
|
||||
CPUIOTLBEntry iotlb[NB_MMU_MODES][CPU_TLB_SIZE]; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue