x86: fix get_mtrr() warning about smp_processor_id() with CONFIG_PREEMPT=y
authorYinghai Lu <yinghai@kernel.org>
Fri, 13 Mar 2009 19:46:07 +0000 (12:46 -0700)
committerIngo Molnar <mingo@elte.hu>
Sat, 14 Mar 2009 11:27:06 +0000 (12:27 +0100)
commit63516ef6d6a8379ee5c32463efc6a75f9da8a309
treec9096842aaa9d598b29c45c8c3ef71a301dfa8e7
parent3ff42da5048649503e343a32be37b14a6a4e8aaf
x86: fix get_mtrr() warning about smp_processor_id() with CONFIG_PREEMPT=y

Impact: fix debug warning

Jaswinder noticed that there is a warning about smp_processor_id()
in get_mtrr().

Fix it by wrapping the printout into a get/put_cpu() pair.

Reported-by: Jaswinder Singh Rajput <jaswinder@kernel.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <49BAB7FF.4030107@kernel.org>
[ changed to get/put_cpu(), cleaned up surrounding code a it. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/mtrr/generic.c