Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
72274c9e
cloud-kernel
项目概览
openanolis
/
cloud-kernel
12 个月 前同步成功
通知
152
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,发现更多精彩内容 >>
提交
72274c9e
编写于
11月 08, 2005
作者:
R
Russell King
提交者:
Russell King
11月 08, 2005
浏览文件
操作
浏览文件
下载
差异文件
Merge with ARM SMP tree
上级
5285eb57
37ee16ae
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
91 addition
and
0 deletion
+91
-0
arch/arm/Kconfig
arch/arm/Kconfig
+10
-0
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-armv.S
+7
-0
arch/arm/kernel/irq.c
arch/arm/kernel/irq.c
+1
-0
arch/arm/kernel/smp.c
arch/arm/kernel/smp.c
+34
-0
include/asm-arm/hardirq.h
include/asm-arm/hardirq.h
+1
-0
include/asm-arm/smp.h
include/asm-arm/smp.h
+38
-0
未找到文件。
arch/arm/Kconfig
浏览文件 @
72274c9e
...
...
@@ -356,6 +356,16 @@ config HOTPLUG_CPU
Say Y here to experiment with turning CPUs off and on. CPUs
can be controlled through /sys/devices/system/cpu.
config LOCAL_TIMERS
bool "Use local timer interrupts"
depends on SMP && n
default y
help
Enable support for local timers on SMP platforms, rather then the
legacy IPI broadcast method. Local timers allows the system
accounting to be spread across the timer interval, preventing a
"thundering herd" at every timer tick.
config PREEMPT
bool "Preemptible Kernel (EXPERIMENTAL)"
depends on EXPERIMENTAL
...
...
arch/arm/kernel/entry-armv.S
浏览文件 @
72274c9e
...
...
@@ -47,6 +47,13 @@
movne
r0
,
sp
adrne
lr
,
1
b
bne
do_IPI
#ifdef CONFIG_LOCAL_TIMERS
test_for_ltirq
r0
,
r6
,
r5
,
lr
movne
r0
,
sp
adrne
lr
,
1
b
bne
do_local_timer
#endif
#endif
.
endm
...
...
arch/arm/kernel/irq.c
浏览文件 @
72274c9e
...
...
@@ -264,6 +264,7 @@ int show_interrupts(struct seq_file *p, void *v)
#endif
#ifdef CONFIG_SMP
show_ipi_list
(
p
);
show_local_irqs
(
p
);
#endif
seq_printf
(
p
,
"Err: %10lu
\n
"
,
irq_err_count
);
}
...
...
arch/arm/kernel/smp.c
浏览文件 @
72274c9e
...
...
@@ -184,6 +184,11 @@ int __cpuexit __cpu_disable(void)
*/
migrate_irqs
();
/*
* Stop the local timer for this CPU.
*/
local_timer_stop
(
cpu
);
/*
* Flush user cache and TLB mappings, and then remove this CPU
* from the vm mask set of all processes.
...
...
@@ -289,6 +294,11 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
*/
cpu_set
(
cpu
,
cpu_online_map
);
/*
* Setup local timer for this CPU.
*/
local_timer_setup
(
cpu
);
/*
* OK, it's off to the idle thread for us
*/
...
...
@@ -454,6 +464,18 @@ void show_ipi_list(struct seq_file *p)
seq_putc
(
p
,
'\n'
);
}
void
show_local_irqs
(
struct
seq_file
*
p
)
{
unsigned
int
cpu
;
seq_printf
(
p
,
"LOC: "
);
for_each_present_cpu
(
cpu
)
seq_printf
(
p
,
"%10u "
,
irq_stat
[
cpu
].
local_timer_irqs
);
seq_putc
(
p
,
'\n'
);
}
static
void
ipi_timer
(
struct
pt_regs
*
regs
)
{
int
user
=
user_mode
(
regs
);
...
...
@@ -464,6 +486,18 @@ static void ipi_timer(struct pt_regs *regs)
irq_exit
();
}
#ifdef CONFIG_LOCAL_TIMERS
asmlinkage
void
do_local_timer
(
struct
pt_regs
*
regs
)
{
int
cpu
=
smp_processor_id
();
if
(
local_timer_ack
())
{
irq_stat
[
cpu
].
local_timer_irqs
++
;
ipi_timer
(
regs
);
}
}
#endif
/*
* ipi_call_function - handle IPI from smp_call_function()
*
...
...
include/asm-arm/hardirq.h
浏览文件 @
72274c9e
...
...
@@ -8,6 +8,7 @@
typedef
struct
{
unsigned
int
__softirq_pending
;
unsigned
int
local_timer_irqs
;
}
____cacheline_aligned
irq_cpustat_t
;
#include <linux/irq_cpustat.h>
/* Standard mappings for irq_cpustat_t above */
...
...
include/asm-arm/smp.h
浏览文件 @
72274c9e
...
...
@@ -92,4 +92,42 @@ extern void platform_cpu_die(unsigned int cpu);
extern
int
platform_cpu_kill
(
unsigned
int
cpu
);
extern
void
platform_cpu_enable
(
unsigned
int
cpu
);
#ifdef CONFIG_LOCAL_TIMERS
/*
* Setup a local timer interrupt for a CPU.
*/
extern
void
local_timer_setup
(
unsigned
int
cpu
);
/*
* Stop a local timer interrupt.
*/
extern
void
local_timer_stop
(
unsigned
int
cpu
);
/*
* Platform provides this to acknowledge a local timer IRQ
*/
extern
int
local_timer_ack
(
void
);
#else
static
inline
void
local_timer_setup
(
unsigned
int
cpu
)
{
}
static
inline
void
local_timer_stop
(
unsigned
int
cpu
)
{
}
#endif
/*
* show local interrupt info
*/
extern
void
show_local_irqs
(
struct
seq_file
*
);
/*
* Called from assembly, this is the local timer IRQ handler
*/
asmlinkage
void
do_local_timer
(
struct
pt_regs
*
);
#endif
/* ifndef __ASM_ARM_SMP_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录