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
c7119d56
Commit
c7119d56
authored
Oct 15, 2015
by
Vineet Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARCv2: mm: THP: flush_pmd_tlb_range make SMP safe
Signed-off-by:
Vineet Gupta
<
vgupta@synopsys.com
>
parent
722fe8fd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
arch/arc/include/asm/tlbflush.h
arch/arc/include/asm/tlbflush.h
+5
-0
arch/arc/mm/tlb.c
arch/arc/mm/tlb.c
+25
-2
No files found.
arch/arc/include/asm/tlbflush.h
View file @
c7119d56
...
...
@@ -17,6 +17,8 @@ void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page);
void
local_flush_tlb_kernel_range
(
unsigned
long
start
,
unsigned
long
end
);
void
local_flush_tlb_range
(
struct
vm_area_struct
*
vma
,
unsigned
long
start
,
unsigned
long
end
);
void
local_flush_pmd_tlb_range
(
struct
vm_area_struct
*
vma
,
unsigned
long
start
,
unsigned
long
end
);
#ifndef CONFIG_SMP
#define flush_tlb_range(vma, s, e) local_flush_tlb_range(vma, s, e)
...
...
@@ -24,6 +26,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma,
#define flush_tlb_kernel_range(s, e) local_flush_tlb_kernel_range(s, e)
#define flush_tlb_all() local_flush_tlb_all()
#define flush_tlb_mm(mm) local_flush_tlb_mm(mm)
#define flush_pmd_tlb_range(vma, s, e) local_flush_pmd_tlb_range(vma, s, e)
#else
extern
void
flush_tlb_range
(
struct
vm_area_struct
*
vma
,
unsigned
long
start
,
unsigned
long
end
);
...
...
@@ -31,5 +34,7 @@ extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page);
extern
void
flush_tlb_kernel_range
(
unsigned
long
start
,
unsigned
long
end
);
extern
void
flush_tlb_all
(
void
);
extern
void
flush_tlb_mm
(
struct
mm_struct
*
mm
);
extern
void
flush_pmd_tlb_range
(
struct
vm_area_struct
*
vma
,
unsigned
long
start
,
unsigned
long
end
);
#endif
/* CONFIG_SMP */
#endif
arch/arc/mm/tlb.c
View file @
c7119d56
...
...
@@ -421,6 +421,15 @@ static inline void ipi_flush_tlb_range(void *arg)
local_flush_tlb_range
(
ta
->
ta_vma
,
ta
->
ta_start
,
ta
->
ta_end
);
}
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
static
inline
void
ipi_flush_pmd_tlb_range
(
void
*
arg
)
{
struct
tlb_args
*
ta
=
arg
;
local_flush_pmd_tlb_range
(
ta
->
ta_vma
,
ta
->
ta_start
,
ta
->
ta_end
);
}
#endif
static
inline
void
ipi_flush_tlb_kernel_range
(
void
*
arg
)
{
struct
tlb_args
*
ta
=
(
struct
tlb_args
*
)
arg
;
...
...
@@ -461,6 +470,20 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
on_each_cpu_mask
(
mm_cpumask
(
vma
->
vm_mm
),
ipi_flush_tlb_range
,
&
ta
,
1
);
}
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
void
flush_pmd_tlb_range
(
struct
vm_area_struct
*
vma
,
unsigned
long
start
,
unsigned
long
end
)
{
struct
tlb_args
ta
=
{
.
ta_vma
=
vma
,
.
ta_start
=
start
,
.
ta_end
=
end
};
on_each_cpu_mask
(
mm_cpumask
(
vma
->
vm_mm
),
ipi_flush_pmd_tlb_range
,
&
ta
,
1
);
}
#endif
void
flush_tlb_kernel_range
(
unsigned
long
start
,
unsigned
long
end
)
{
struct
tlb_args
ta
=
{
...
...
@@ -659,7 +682,7 @@ pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp)
return
pgtable
;
}
void
flush_pmd_tlb_range
(
struct
vm_area_struct
*
vma
,
unsigned
long
start
,
void
local_
flush_pmd_tlb_range
(
struct
vm_area_struct
*
vma
,
unsigned
long
start
,
unsigned
long
end
)
{
unsigned
int
cpu
;
...
...
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