Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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" <rjw@sisk.pl>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andrew Morton and committed by
Linus Torvalds
4c738480 e44a45ae

+4 -1
+4 -1
arch/i386/kernel/cpu/mtrr/main.c
··· 734 734 */ 735 735 void mtrr_save_state(void) 736 736 { 737 - if (smp_processor_id() == 0) 737 + int cpu = get_cpu(); 738 + 739 + if (cpu == 0) 738 740 mtrr_save_fixed_ranges(NULL); 739 741 else 740 742 smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1); 743 + put_cpu(); 741 744 } 742 745 743 746 static int __init mtrr_init_finialize(void)