提交 d92de65c 编写于 作者: S Shaohua Li 提交者: Linus Torvalds

[PATCH] variable overflow after hundreds round of hotplug CPU

I'm doing the cpu hotplug stress test and found a variable ('ready') is
overflow after several hundreds rounds of cpu hotplug.  Here is a fix.

Signed-off-by: Shaohua Li<shaohua.li@intel.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 a13db566
...@@ -299,7 +299,6 @@ is386: movl $2,%ecx # set MP ...@@ -299,7 +299,6 @@ is386: movl $2,%ecx # set MP
movl %eax,%cr0 movl %eax,%cr0
call check_x87 call check_x87
incb ready
lgdt cpu_gdt_descr lgdt cpu_gdt_descr
lidt idt_descr lidt idt_descr
ljmp $(__KERNEL_CS),$1f ljmp $(__KERNEL_CS),$1f
...@@ -317,7 +316,8 @@ is386: movl $2,%ecx # set MP ...@@ -317,7 +316,8 @@ is386: movl $2,%ecx # set MP
cld # gcc2 wants the direction flag cleared at all times cld # gcc2 wants the direction flag cleared at all times
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
movb ready, %cl movb ready, %cl
cmpb $1,%cl movb $1, ready
cmpb $0,%cl
je 1f # the first CPU calls start_kernel je 1f # the first CPU calls start_kernel
# all other CPUs call initialize_secondary # all other CPUs call initialize_secondary
call initialize_secondary call initialize_secondary
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册