Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
e8cad25b
Commit
e8cad25b
authored
Nov 22, 2019
by
Paul Walmsley
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'next/tlb-opt' into for-next
parents
9acfd6f5
6efb16b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
arch/riscv/mm/tlbflush.c
arch/riscv/mm/tlbflush.c
+23
-2
No files found.
arch/riscv/mm/tlbflush.c
View file @
e8cad25b
...
...
@@ -2,6 +2,7 @@
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/sched.h>
#include <asm/sbi.h>
void
flush_tlb_all
(
void
)
...
...
@@ -9,13 +10,33 @@ void flush_tlb_all(void)
sbi_remote_sfence_vma
(
NULL
,
0
,
-
1
);
}
/*
* This function must not be called with cmask being null.
* Kernel may panic if cmask is NULL.
*/
static
void
__sbi_tlb_flush_range
(
struct
cpumask
*
cmask
,
unsigned
long
start
,
unsigned
long
size
)
{
struct
cpumask
hmask
;
unsigned
int
cpuid
;
riscv_cpuid_to_hartid_mask
(
cmask
,
&
hmask
);
sbi_remote_sfence_vma
(
hmask
.
bits
,
start
,
size
);
if
(
cpumask_empty
(
cmask
))
return
;
cpuid
=
get_cpu
();
if
(
cpumask_any_but
(
cmask
,
cpuid
)
>=
nr_cpu_ids
)
{
/* local cpu is the only cpu present in cpumask */
if
(
size
<=
PAGE_SIZE
)
local_flush_tlb_page
(
start
);
else
local_flush_tlb_all
();
}
else
{
riscv_cpuid_to_hartid_mask
(
cmask
,
&
hmask
);
sbi_remote_sfence_vma
(
cpumask_bits
(
&
hmask
),
start
,
size
);
}
put_cpu
();
}
void
flush_tlb_mm
(
struct
mm_struct
*
mm
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment