linux/arch
Mike Travis d18d00f5db x86: oprofile: remove NR_CPUS arrays in arch/x86/oprofile/nmi_int.c
Change the following arrays sized by NR_CPUS to be PERCPU variables:

	static struct op_msrs cpu_msrs[NR_CPUS];
	static unsigned long saved_lvtpc[NR_CPUS];

Also some minor complaints from checkpatch.pl fixed.

Based on:
	git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
	git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git

All changes were transparent except for:

 static void nmi_shutdown(void)
 {
+	struct op_msrs *msrs = &__get_cpu_var(cpu_msrs);
 	nmi_enabled = 0;
 	on_each_cpu(nmi_cpu_shutdown, NULL, 0, 1);
 	unregister_die_notifier(&profile_exceptions_nb);
-	model->shutdown(cpu_msrs);
+	model->shutdown(msrs);
 	free_msrs();
 }

The existing code passed a reference to cpu 0's instance of struct op_msrs
to model->shutdown, whilst the other functions are passed a reference to
<this cpu's> instance of a struct op_msrs.  This seemed to be a bug to me
even though as long as cpu 0 and <this cpu> are of the same type it would
have the same effect...?

Cc: Philippe Elie <phil.el@wanadoo.fr>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-19 19:44:58 +02:00
..
alpha Generic semaphore implementation 2008-04-17 10:42:34 -04:00
arm Generic semaphore implementation 2008-04-17 10:42:34 -04:00
avr32 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
blackfin Generic semaphore implementation 2008-04-17 10:42:34 -04:00
cris Generic semaphore implementation 2008-04-17 10:42:34 -04:00
frv Generic semaphore implementation 2008-04-17 10:42:34 -04:00
h8300 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
ia64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26 2008-04-18 18:02:35 -07:00
m32r Generic semaphore implementation 2008-04-17 10:42:34 -04:00
m68k Generic semaphore implementation 2008-04-17 10:42:34 -04:00
m68knommu Generic semaphore implementation 2008-04-17 10:42:34 -04:00
mips Generic semaphore implementation 2008-04-17 10:42:34 -04:00
mn10300 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
parisc Generic semaphore implementation 2008-04-17 10:42:34 -04:00
powerpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26 2008-04-18 18:02:35 -07:00
ppc Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26 2008-04-18 18:02:35 -07:00
sh Generic semaphore implementation 2008-04-17 10:42:34 -04:00
sparc Generic semaphore implementation 2008-04-17 10:42:34 -04:00
sparc64 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
um Generic semaphore implementation 2008-04-17 10:42:34 -04:00
v850 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
x86 x86: oprofile: remove NR_CPUS arrays in arch/x86/oprofile/nmi_int.c 2008-04-19 19:44:58 +02:00
xtensa Generic semaphore implementation 2008-04-17 10:42:34 -04:00
.gitignore
Kconfig Kprobes: indicate kretprobe support in Kconfig 2008-03-04 16:35:11 -08:00