Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
08f051e
Documentation
arch
alpha
arc
arm
arm64
blackfin
c6x
cris
frv
h8300
hexagon
ia64
m32r
m68k
metag
microblaze
mips
mn10300
nios2
openrisc
parisc
powerpc
riscv
configs
include
asm
Kbuild
asm-offsets.h
asm.h
atomic.h
barrier.h
bitops.h
bug.h
cache.h
cacheflush.h
cmpxchg.h
compat.h
csr.h
current.h
delay.h
dma-mapping.h
elf.h
hwcap.h
io.h
irq.h
irqflags.h
kprobes.h
linkage.h
mmu.h
mmu_context.h
page.h
pci.h
pgalloc.h
pgtable-32.h
pgtable-64.h
pgtable-bits.h
pgtable.h
processor.h
ptrace.h
sbi.h
smp.h
spinlock.h
spinlock_types.h
string.h
switch_to.h
syscall.h
thread_info.h
timex.h
tlb.h
tlbflush.h
uaccess.h
unistd.h
vdso.h
word-at-a-time.h
uapi
kernel
lib
mm
Kconfig
Makefile
s390
score
sh
sparc
tile
um
unicore32
x86
xtensa
.gitignore
Kconfig
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
arch
/
riscv
/
include
/
asm
/
tlbflush.h
Blame
Blame
Latest commit
History
History
66 lines (51 loc) · 1.76 KB
Breadcrumbs
linux
/
arch
/
riscv
/
include
/
asm
/
tlbflush.h
Top
File metadata and controls
Code
Blame
66 lines (51 loc) · 1.76 KB
Raw
/* * Copyright (C) 2009 Chen Liqin <liqin.chen@sunplusct.com> * Copyright (C) 2012 Regents of the University of California * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, version 2. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef _ASM_RISCV_TLBFLUSH_H #define _ASM_RISCV_TLBFLUSH_H #ifdef CONFIG_MMU #include <linux/mm_types.h> /* Flush entire local TLB */ static inline void local_flush_tlb_all(void) { __asm__ __volatile__ ("sfence.vma" : : : "memory"); } /* Flush one page from local TLB */ static inline void local_flush_tlb_page(unsigned long addr) { __asm__ __volatile__ ("sfence.vma %0" : : "r" (addr) : "memory"); } #ifndef CONFIG_SMP #define flush_tlb_all() local_flush_tlb_all() #define flush_tlb_page(vma, addr) local_flush_tlb_page(addr) #define flush_tlb_range(vma, start, end) local_flush_tlb_all() #else /* CONFIG_SMP */ #include <asm/sbi.h> #define flush_tlb_all() sbi_remote_sfence_vma(0, 0, -1) #define flush_tlb_page(vma, addr) flush_tlb_range(vma, addr, 0) #define flush_tlb_range(vma, start, end) \ sbi_remote_sfence_vma(0, start, (end) - (start)) #endif /* CONFIG_SMP */ /* Flush the TLB entries of the specified mm context */ static inline void flush_tlb_mm(struct mm_struct *mm) { flush_tlb_all(); } /* Flush a range of kernel pages */ static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end) { flush_tlb_all(); } #endif /* CONFIG_MMU */ #endif /* _ASM_RISCV_TLBFLUSH_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
You can’t perform that action at this time.