Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
4b0ef3b1
Commit
4b0ef3b1
authored
Jun 28, 2005
by
Russell King
Committed by
Russell King
Jun 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ARM SMP: Add IPI support code for SMP TLB flushing
Signed-off-by:
Russell King
<
rmk+kernel@arm.linux.org.uk
>
parent
564c90aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
123 additions
and
0 deletions
+123
-0
arch/arm/kernel/smp.c
arch/arm/kernel/smp.c
+123
-0
No files found.
arch/arm/kernel/smp.c
View file @
4b0ef3b1
...
...
@@ -502,3 +502,126 @@ int __init setup_profiling_timer(unsigned int multiplier)
{
return
-
EINVAL
;
}
static
int
on_each_cpu_mask
(
void
(
*
func
)(
void
*
),
void
*
info
,
int
retry
,
int
wait
,
cpumask_t
mask
)
{
int
ret
=
0
;
preempt_disable
();
ret
=
smp_call_function_on_cpu
(
func
,
info
,
retry
,
wait
,
mask
);
if
(
cpu_isset
(
smp_processor_id
(),
mask
))
func
(
info
);
preempt_enable
();
return
ret
;
}
/**********************************************************************/
/*
* TLB operations
*/
struct
tlb_args
{
struct
vm_area_struct
*
ta_vma
;
unsigned
long
ta_start
;
unsigned
long
ta_end
;
};
static
inline
void
ipi_flush_tlb_all
(
void
*
ignored
)
{
local_flush_tlb_all
();
}
static
inline
void
ipi_flush_tlb_mm
(
void
*
arg
)
{
struct
mm_struct
*
mm
=
(
struct
mm_struct
*
)
arg
;
local_flush_tlb_mm
(
mm
);
}
static
inline
void
ipi_flush_tlb_page
(
void
*
arg
)
{
struct
tlb_args
*
ta
=
(
struct
tlb_args
*
)
arg
;
local_flush_tlb_page
(
ta
->
ta_vma
,
ta
->
ta_start
);
}
static
inline
void
ipi_flush_tlb_kernel_page
(
void
*
arg
)
{
struct
tlb_args
*
ta
=
(
struct
tlb_args
*
)
arg
;
local_flush_tlb_kernel_page
(
ta
->
ta_start
);
}
static
inline
void
ipi_flush_tlb_range
(
void
*
arg
)
{
struct
tlb_args
*
ta
=
(
struct
tlb_args
*
)
arg
;
local_flush_tlb_range
(
ta
->
ta_vma
,
ta
->
ta_start
,
ta
->
ta_end
);
}
static
inline
void
ipi_flush_tlb_kernel_range
(
void
*
arg
)
{
struct
tlb_args
*
ta
=
(
struct
tlb_args
*
)
arg
;
local_flush_tlb_kernel_range
(
ta
->
ta_start
,
ta
->
ta_end
);
}
void
flush_tlb_all
(
void
)
{
on_each_cpu
(
ipi_flush_tlb_all
,
NULL
,
1
,
1
);
}
void
flush_tlb_mm
(
struct
mm_struct
*
mm
)
{
cpumask_t
mask
=
mm
->
cpu_vm_mask
;
on_each_cpu_mask
(
ipi_flush_tlb_mm
,
mm
,
1
,
1
,
mask
);
}
void
flush_tlb_page
(
struct
vm_area_struct
*
vma
,
unsigned
long
uaddr
)
{
cpumask_t
mask
=
vma
->
vm_mm
->
cpu_vm_mask
;
struct
tlb_args
ta
;
ta
.
ta_vma
=
vma
;
ta
.
ta_start
=
uaddr
;
on_each_cpu_mask
(
ipi_flush_tlb_page
,
&
ta
,
1
,
1
,
mask
);
}
void
flush_tlb_kernel_page
(
unsigned
long
kaddr
)
{
struct
tlb_args
ta
;
ta
.
ta_start
=
kaddr
;
on_each_cpu
(
ipi_flush_tlb_kernel_page
,
&
ta
,
1
,
1
);
}
void
flush_tlb_range
(
struct
vm_area_struct
*
vma
,
unsigned
long
start
,
unsigned
long
end
)
{
cpumask_t
mask
=
vma
->
vm_mm
->
cpu_vm_mask
;
struct
tlb_args
ta
;
ta
.
ta_vma
=
vma
;
ta
.
ta_start
=
start
;
ta
.
ta_end
=
end
;
on_each_cpu_mask
(
ipi_flush_tlb_range
,
&
ta
,
1
,
1
,
mask
);
}
void
flush_tlb_kernel_range
(
unsigned
long
start
,
unsigned
long
end
)
{
struct
tlb_args
ta
;
ta
.
ta_start
=
start
;
ta
.
ta_end
=
end
;
on_each_cpu
(
ipi_flush_tlb_kernel_range
,
&
ta
,
1
,
1
);
}
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