Gitweb:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4c738480d21a190e3d99c7ce985ab9484f373a3c
Commit: 4c738480d21a190e3d99c7ce985ab9484f373a3c
Parent: e44a45ae7b7f7c7a4ebd6aa39b703bf2b97fe848
Author: Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Sun Jun 3 13:50:40 2007 -0700
Committer: Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Jun 4 13:25:09 2007 -0700
mtrr atomicity fix
Rafael gets this on an SMP box with kernel preemption enabled, during
hibernation and restore (100% of the time):
Enabling non-boot CPUs ...
BUG: using smp_processor_id() in preemptible [00000001] code: bash/4514
caller is mtrr_save_state+0x9/0x40
Cc: "Rafael J. Wysocki" <[EMAIL PROTECTED]>
Cc: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
arch/i386/kernel/cpu/mtrr/main.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c
index 1cf466d..7202b98 100644
--- a/arch/i386/kernel/cpu/mtrr/main.c
+++ b/arch/i386/kernel/cpu/mtrr/main.c
@@ -734,10 +734,13 @@ void mtrr_ap_init(void)
*/
void mtrr_save_state(void)
{
- if (smp_processor_id() == 0)
+ int cpu = get_cpu();
+
+ if (cpu == 0)
mtrr_save_fixed_ranges(NULL);
else
smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1);
+ put_cpu();
}
static int __init mtrr_init_finialize(void)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html