Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
4b0ef3b1
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4b0ef3b1
编写于
6月 28, 2005
作者:
R
Russell King
提交者:
Russell King
6月 28, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] ARM SMP: Add IPI support code for SMP TLB flushing
Signed-off-by:
N
Russell King
<
rmk+kernel@arm.linux.org.uk
>
上级
564c90aa
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
123 addition
and
0 deletion
+123
-0
arch/arm/kernel/smp.c
arch/arm/kernel/smp.c
+123
-0
未找到文件。
arch/arm/kernel/smp.c
浏览文件 @
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
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录