/
usr
/
src
/
linux-headers-5.15.0-190
/
arch
/
xtensa
/
include
/
asm
/
/usr/src/linux-headers-5.15.0-190/arch/xtensa/include/asm
mkdir
upload
Name
Size
Mode
Actions
asm-offsets.h
35
0644
edit
dl
rm
asm-uaccess.h
4180
0644
edit
dl
rm
asmmacro.h
4763
0644
edit
dl
rm
atomic.h
7301
0644
edit
dl
rm
barrier.h
594
0644
edit
dl
rm
bitops.h
5398
0644
edit
dl
rm
bootparam.h
1402
0644
edit
dl
rm
cache.h
1114
0644
edit
dl
rm
cacheasm.h
3856
0644
edit
dl
rm
cacheflush.h
5968
0644
edit
dl
rm
checksum.h
5893
0644
edit
dl
rm
cmpxchg.h
5684
0644
edit
dl
rm
coprocessor.h
4623
0644
edit
dl
rm
core.h
830
0644
edit
dl
rm
current.h
679
0644
edit
dl
rm
delay.h
1668
0644
edit
dl
rm
dma.h
1830
0644
edit
dl
rm
elf.h
5115
0644
edit
dl
rm
fixmap.h
1106
0644
edit
dl
rm
flat.h
440
0644
edit
dl
rm
ftrace.h
979
0644
edit
dl
rm
futex.h
3889
0644
edit
dl
rm
highmem.h
2167
0644
edit
dl
rm
hw_breakpoint.h
1597
0644
edit
dl
rm
initialize_mmu.h
5196
0644
edit
dl
rm
io.h
1959
0644
edit
dl
rm
irq.h
1127
0644
edit
dl
rm
irqflags.h
2069
0644
edit
dl
rm
jump_label.h
1655
0644
edit
dl
rm
kasan.h
859
0644
edit
dl
rm
Kbuild
230
0644
edit
dl
rm
kmem_layout.h
2790
0644
edit
dl
rm
linkage.h
154
0644
edit
dl
rm
mmu.h
462
0644
edit
dl
rm
mmu_context.h
3624
0644
edit
dl
rm
mxregs.h
1330
0644
edit
dl
rm
nommu_context.h
156
0644
edit
dl
rm
page.h
5793
0644
edit
dl
rm
pci-bridge.h
2170
0644
edit
dl
rm
pci.h
1302
0644
edit
dl
rm
perf_event.h
108
0644
edit
dl
rm
pgalloc.h
1405
0644
edit
dl
rm
pgtable.h
14470
0644
edit
dl
rm
platform.h
1528
0644
edit
dl
rm
processor.h
7705
0644
edit
dl
rm
ptrace.h
3321
0644
edit
dl
rm
regs.h
4017
0644
edit
dl
rm
seccomp.h
287
0644
edit
dl
rm
serial.h
443
0644
edit
dl
rm
shmparam.h
561
0644
edit
dl
rm
signal.h
502
0644
edit
dl
rm
smp.h
967
0644
edit
dl
rm
spinlock.h
472
0644
edit
dl
rm
spinlock_types.h
317
0644
edit
dl
rm
stackprotector.h
1140
0644
edit
dl
rm
stacktrace.h
1158
0644
edit
dl
rm
string.h
3385
0644
edit
dl
rm
switch_to.h
601
0644
edit
dl
rm
syscall.h
2140
0644
edit
dl
rm
sysmem.h
426
0644
edit
dl
rm
thread_info.h
3965
0644
edit
dl
rm
timex.h
1440
0644
edit
dl
rm
tlb.h
475
0644
edit
dl
rm
tlbflush.h
5620
0644
edit
dl
rm
traps.h
2779
0644
edit
dl
rm
uaccess.h
9375
0644
edit
dl
rm
ucontext.h
540
0644
edit
dl
rm
unistd.h
370
0644
edit
dl
rm
vectors.h
3276
0644
edit
dl
rm
vermagic.h
433
0644
edit
dl
rm
vmalloc.h
96
0644
edit
dl
rm
Edit:
/usr/src/linux-headers-5.15.0-190/arch/xtensa/include/asm/tlbflush.h
(5620B)
/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2001 - 2013 Tensilica Inc. */ #ifndef _XTENSA_TLBFLUSH_H #define _XTENSA_TLBFLUSH_H #include <linux/stringify.h> #include <asm/processor.h> #define DTLB_WAY_PGD 7 #define ITLB_ARF_WAYS 4 #define DTLB_ARF_WAYS 4 #define ITLB_HIT_BIT 3 #define DTLB_HIT_BIT 4 #ifndef __ASSEMBLY__ /* TLB flushing: * * - flush_tlb_all() flushes all processes TLB entries * - flush_tlb_mm(mm) flushes the specified mm context TLB entries * - flush_tlb_page(vma, page) flushes a single page * - flush_tlb_range(vma, vmaddr, end) flushes a range of pages */ void local_flush_tlb_all(void); void local_flush_tlb_mm(struct mm_struct *mm); void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page); void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); void local_flush_tlb_kernel_range(unsigned long start, unsigned long end); #ifdef CONFIG_SMP void flush_tlb_all(void); void flush_tlb_mm(struct mm_struct *); void flush_tlb_page(struct vm_area_struct *, unsigned long); void flush_tlb_range(struct vm_area_struct *, unsigned long, unsigned long); void flush_tlb_kernel_range(unsigned long start, unsigned long end); #else /* !CONFIG_SMP */ #define flush_tlb_all() local_flush_tlb_all() #define flush_tlb_mm(mm) local_flush_tlb_mm(mm) #define flush_tlb_page(vma, page) local_flush_tlb_page(vma, page) #define flush_tlb_range(vma, vmaddr, end) local_flush_tlb_range(vma, vmaddr, \ end) #define flush_tlb_kernel_range(start, end) local_flush_tlb_kernel_range(start, \ end) #endif /* CONFIG_SMP */ /* TLB operations. */ static inline unsigned long itlb_probe(unsigned long addr) { unsigned long tmp; __asm__ __volatile__("pitlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); return tmp; } static inline unsigned long dtlb_probe(unsigned long addr) { unsigned long tmp; __asm__ __volatile__("pdtlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); return tmp; } static inline void invalidate_itlb_entry (unsigned long probe) { __asm__ __volatile__("iitlb %0; isync\n\t" : : "a" (probe)); } static inline void invalidate_dtlb_entry (unsigned long probe) { __asm__ __volatile__("idtlb %0; dsync\n\t" : : "a" (probe)); } /* Use the .._no_isync functions with caution. Generally, these are * handy for bulk invalidates followed by a single 'isync'. The * caller must follow up with an 'isync', which can be relatively * expensive on some Xtensa implementations. */ static inline void invalidate_itlb_entry_no_isync (unsigned entry) { /* Caller must follow up with 'isync'. */ __asm__ __volatile__ ("iitlb %0\n" : : "a" (entry) ); } static inline void invalidate_dtlb_entry_no_isync (unsigned entry) { /* Caller must follow up with 'isync'. */ __asm__ __volatile__ ("idtlb %0\n" : : "a" (entry) ); } static inline void set_itlbcfg_register (unsigned long val) { __asm__ __volatile__("wsr %0, itlbcfg\n\t" "isync\n\t" : : "a" (val)); } static inline void set_dtlbcfg_register (unsigned long val) { __asm__ __volatile__("wsr %0, dtlbcfg; dsync\n\t" : : "a" (val)); } static inline void set_ptevaddr_register (unsigned long val) { __asm__ __volatile__(" wsr %0, ptevaddr; isync\n" : : "a" (val)); } static inline unsigned long read_ptevaddr_register (void) { unsigned long tmp; __asm__ __volatile__("rsr %0, ptevaddr\n\t" : "=a" (tmp)); return tmp; } static inline void write_dtlb_entry (pte_t entry, int way) { __asm__ __volatile__("wdtlb %1, %0; dsync\n\t" : : "r" (way), "r" (entry) ); } static inline void write_itlb_entry (pte_t entry, int way) { __asm__ __volatile__("witlb %1, %0; isync\n\t" : : "r" (way), "r" (entry) ); } static inline void invalidate_page_directory (void) { invalidate_dtlb_entry (DTLB_WAY_PGD); invalidate_dtlb_entry (DTLB_WAY_PGD+1); invalidate_dtlb_entry (DTLB_WAY_PGD+2); } static inline void invalidate_itlb_mapping (unsigned address) { unsigned long tlb_entry; if (((tlb_entry = itlb_probe(address)) & (1 << ITLB_HIT_BIT)) != 0) invalidate_itlb_entry(tlb_entry); } static inline void invalidate_dtlb_mapping (unsigned address) { unsigned long tlb_entry; if (((tlb_entry = dtlb_probe(address)) & (1 << DTLB_HIT_BIT)) != 0) invalidate_dtlb_entry(tlb_entry); } /* * DO NOT USE THESE FUNCTIONS. These instructions aren't part of the Xtensa * ISA and exist only for test purposes.. * You may find it helpful for MMU debugging, however. * * 'at' is the unmodified input register * 'as' is the output register, as follows (specific to the Linux config): * * as[31..12] contain the virtual address * as[11..08] are meaningless * as[07..00] contain the asid */ static inline unsigned long read_dtlb_virtual (int way) { unsigned long tmp; __asm__ __volatile__("rdtlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); return tmp; } static inline unsigned long read_dtlb_translation (int way) { unsigned long tmp; __asm__ __volatile__("rdtlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); return tmp; } static inline unsigned long read_itlb_virtual (int way) { unsigned long tmp; __asm__ __volatile__("ritlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); return tmp; } static inline unsigned long read_itlb_translation (int way) { unsigned long tmp; __asm__ __volatile__("ritlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); return tmp; } #endif /* __ASSEMBLY__ */ #endif /* _XTENSA_TLBFLUSH_H */
Save
cmd:
run