powerpc: remove CONFIG_PCI_QSPAN
[linux/fpc-iii.git] / arch / csky / abiv1 / inc / abi / ckmmu.h
blob3a002017bebe09b002bdd14a2e1d45cf94fad3f2
1 /* SPDX-License-Identifier: GPL-2.0 */
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
4 #ifndef __ASM_CSKY_CKMMUV1_H
5 #define __ASM_CSKY_CKMMUV1_H
6 #include <abi/reg_ops.h>
8 static inline int read_mmu_index(void)
10 return cprcr("cpcr0");
13 static inline void write_mmu_index(int value)
15 cpwcr("cpcr0", value);
18 static inline int read_mmu_entrylo0(void)
20 return cprcr("cpcr2") << 6;
23 static inline int read_mmu_entrylo1(void)
25 return cprcr("cpcr3") << 6;
28 static inline void write_mmu_pagemask(int value)
30 cpwcr("cpcr6", value);
33 static inline int read_mmu_entryhi(void)
35 return cprcr("cpcr4");
38 static inline void write_mmu_entryhi(int value)
40 cpwcr("cpcr4", value);
44 * TLB operations.
46 static inline void tlb_probe(void)
48 cpwcr("cpcr8", 0x80000000);
51 static inline void tlb_read(void)
53 cpwcr("cpcr8", 0x40000000);
56 static inline void tlb_invalid_all(void)
58 cpwcr("cpcr8", 0x04000000);
61 static inline void tlb_invalid_indexed(void)
63 cpwcr("cpcr8", 0x02000000);
66 static inline void setup_pgd(unsigned long pgd, bool kernel)
68 cpwcr("cpcr29", pgd);
71 static inline unsigned long get_pgd(void)
73 return cprcr("cpcr29");
75 #endif /* __ASM_CSKY_CKMMUV1_H */