1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <asm/cpu-features.h>
6 #include <asm/mipsregs.h>
8 #define _UNIQUE_ENTRYHI(base, idx) \
9 (((base) + ((idx) << (PAGE_SHIFT + 1))) | \
10 (cpu_has_tlbinv ? MIPS_ENTRYHI_EHINV : 0))
11 #define UNIQUE_ENTRYHI(idx) _UNIQUE_ENTRYHI(CKSEG0, idx)
12 #define UNIQUE_GUEST_ENTRYHI(idx) _UNIQUE_ENTRYHI(CKSEG1, idx)
14 static inline unsigned int num_wired_entries(void)
16 unsigned int wired
= read_c0_wired();
19 wired
&= MIPSR6_WIRED_WIRED
;
24 #include <asm-generic/tlb.h>
26 #endif /* __ASM_TLB_H */