Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
72166c35
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
72166c35
编写于
2月 15, 2006
作者:
T
Tony Luck
浏览文件
操作
浏览文件
下载
差异文件
Pull fix-cpu-possible-map into release branch
上级
b05de01a
a6b14fa6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
63 addition
and
4 deletion
+63
-4
arch/ia64/kernel/acpi.c
arch/ia64/kernel/acpi.c
+56
-0
arch/ia64/kernel/setup.c
arch/ia64/kernel/setup.c
+4
-0
arch/ia64/kernel/smpboot.c
arch/ia64/kernel/smpboot.c
+1
-4
include/asm-ia64/acpi.h
include/asm-ia64/acpi.h
+2
-0
未找到文件。
arch/ia64/kernel/acpi.c
浏览文件 @
72166c35
...
...
@@ -761,6 +761,62 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid)
return
(
0
);
}
int
additional_cpus
__initdata
=
-
1
;
static
__init
int
setup_additional_cpus
(
char
*
s
)
{
if
(
s
)
additional_cpus
=
simple_strtol
(
s
,
NULL
,
0
);
return
0
;
}
early_param
(
"additional_cpus"
,
setup_additional_cpus
);
/*
* cpu_possible_map should be static, it cannot change as cpu's
* are onlined, or offlined. The reason is per-cpu data-structures
* are allocated by some modules at init time, and dont expect to
* do this dynamically on cpu arrival/departure.
* cpu_present_map on the other hand can change dynamically.
* In case when cpu_hotplug is not compiled, then we resort to current
* behaviour, which is cpu_possible == cpu_present.
* - Ashok Raj
*
* Three ways to find out the number of additional hotplug CPUs:
* - If the BIOS specified disabled CPUs in ACPI/mptables use that.
* - The user can overwrite it with additional_cpus=NUM
* - Otherwise don't reserve additional CPUs.
*/
__init
void
prefill_possible_map
(
void
)
{
int
i
;
int
possible
,
disabled_cpus
;
disabled_cpus
=
total_cpus
-
available_cpus
;
if
(
additional_cpus
==
-
1
)
{
if
(
disabled_cpus
>
0
)
{
possible
=
total_cpus
;
additional_cpus
=
disabled_cpus
;
}
else
{
possible
=
available_cpus
;
additional_cpus
=
0
;
}
}
else
{
possible
=
available_cpus
+
additional_cpus
;
}
if
(
possible
>
NR_CPUS
)
possible
=
NR_CPUS
;
printk
(
KERN_INFO
"SMP: Allowing %d CPUs, %d hotplug CPUs
\n
"
,
possible
,
max_t
(
int
,
additional_cpus
,
0
));
for
(
i
=
0
;
i
<
possible
;
i
++
)
cpu_set
(
i
,
cpu_possible_map
);
}
int
acpi_map_lsapic
(
acpi_handle
handle
,
int
*
pcpu
)
{
struct
acpi_buffer
buffer
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
};
...
...
arch/ia64/kernel/setup.c
浏览文件 @
72166c35
...
...
@@ -430,6 +430,7 @@ setup_arch (char **cmdline_p)
if
(
early_console_setup
(
*
cmdline_p
)
==
0
)
mark_bsp_online
();
parse_early_param
();
#ifdef CONFIG_ACPI
/* Initialize the ACPI boot-time table parser */
acpi_table_init
();
...
...
@@ -688,6 +689,9 @@ void
setup_per_cpu_areas
(
void
)
{
/* start_kernel() requires this... */
#ifdef CONFIG_ACPI_HOTPLUG_CPU
prefill_possible_map
();
#endif
}
/*
...
...
arch/ia64/kernel/smpboot.c
浏览文件 @
72166c35
...
...
@@ -129,7 +129,7 @@ DEFINE_PER_CPU(int, cpu_state);
/* Bitmasks of currently online, and possible CPUs */
cpumask_t
cpu_online_map
;
EXPORT_SYMBOL
(
cpu_online_map
);
cpumask_t
cpu_possible_map
;
cpumask_t
cpu_possible_map
=
CPU_MASK_NONE
;
EXPORT_SYMBOL
(
cpu_possible_map
);
cpumask_t
cpu_core_map
[
NR_CPUS
]
__cacheline_aligned
;
...
...
@@ -506,9 +506,6 @@ smp_build_cpu_map (void)
for
(
cpu
=
0
;
cpu
<
NR_CPUS
;
cpu
++
)
{
ia64_cpu_to_sapicid
[
cpu
]
=
-
1
;
#ifdef CONFIG_HOTPLUG_CPU
cpu_set
(
cpu
,
cpu_possible_map
);
#endif
}
ia64_cpu_to_sapicid
[
0
]
=
boot_cpu_id
;
...
...
include/asm-ia64/acpi.h
浏览文件 @
72166c35
...
...
@@ -106,6 +106,8 @@ extern unsigned int can_cpei_retarget(void);
extern
unsigned
int
is_cpu_cpei_target
(
unsigned
int
cpu
);
extern
void
set_cpei_target_cpu
(
unsigned
int
cpu
);
extern
unsigned
int
get_cpei_target_cpu
(
void
);
extern
void
prefill_possible_map
(
void
);
extern
int
additional_cpus
;
#ifdef CONFIG_ACPI_NUMA
/* Proximity bitmap length; _PXM is at most 255 (8 bit)*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录