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
nexedi
linux
Commits
2cc6e0e0
Commit
2cc6e0e0
authored
Nov 13, 2002
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: Make flush_tlb_mm() work for multi-threaded address-spaces on SMP machines.
parent
eb4e9b51
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
9 deletions
+38
-9
arch/ia64/kernel/smp.c
arch/ia64/kernel/smp.c
+12
-0
include/asm-ia64/tlbflush.h
include/asm-ia64/tlbflush.h
+26
-9
No files found.
arch/ia64/kernel/smp.c
View file @
2cc6e0e0
...
...
@@ -210,6 +210,18 @@ smp_flush_tlb_all (void)
local_flush_tlb_all
();
}
void
smp_flush_tlb_mm
(
struct
mm_struct
*
mm
)
{
local_flush_tlb_mm
(
mm
);
/* this happens for the common case of a single-threaded fork(): */
if
(
likely
(
mm
==
current
->
active_mm
&&
atomic_read
(
&
mm
->
mm_users
)
==
1
))
return
;
smp_call_function
((
void
(
*
)(
void
*
))
local_flush_tlb_mm
,
mm
,
1
,
1
);
}
/*
* Run a function on another CPU
* <func> The function to run. This must be fast and non-blocking.
...
...
include/asm-ia64/tlbflush.h
View file @
2cc6e0e0
...
...
@@ -26,25 +26,42 @@ extern void local_flush_tlb_all (void);
#ifdef CONFIG_SMP
extern
void
smp_flush_tlb_all
(
void
);
extern
void
smp_flush_tlb_mm
(
struct
mm_struct
*
mm
);
# define flush_tlb_all() smp_flush_tlb_all()
#else
# define flush_tlb_all() local_flush_tlb_all()
#endif
static
inline
void
local_flush_tlb_mm
(
struct
mm_struct
*
mm
)
{
if
(
mm
==
current
->
active_mm
)
{
get_new_mmu_context
(
mm
);
reload_context
(
mm
);
}
}
/*
* Flush a specified user mapping
* Flush a specified user mapping. This is called, e.g., as a result of fork() and
* exit(). fork() ends up here because the copy-on-write mechanism needs to write-protect
* the PTEs of the parent task.
*/
static
inline
void
flush_tlb_mm
(
struct
mm_struct
*
mm
)
{
if
(
mm
)
{
mm
->
context
=
0
;
if
(
mm
==
current
->
active_mm
)
{
/* This is called, e.g., as a result of exec(). */
get_new_mmu_context
(
mm
);
reload_context
(
mm
);
}
}
if
(
!
mm
)
return
;
mm
->
context
=
0
;
if
(
atomic_read
(
&
mm
->
mm_users
)
==
0
)
return
;
/* happens as a result of exit_mmap() */
#ifdef CONFIG_SMP
smp_flush_tlb_mm
(
mm
);
#else
local_flush_tlb_mm
(
mm
);
#endif
}
extern
void
flush_tlb_range
(
struct
vm_area_struct
*
vma
,
unsigned
long
start
,
unsigned
long
end
);
...
...
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