Re: [PATCH 0/1] x86: fix remove cpu_pda table patch

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mike Travis
Date: Tuesday, April 29, 2008 - 11:53 am

Mike Travis wrote:
...

Ok, I think I found it.  In check_nmi_watchdog():


        for (cpu = 0; cpu < NR_CPUS; cpu++)
                prev_nmi_count[cpu] = cpu_pda(cpu)->__nmi_count;

As I mentioned it works fine on both of my systems so could you try it out?

Thanks!
Mike
--
Subject: [PATCH 1/1] x86: change check_nmi_watchdog to use nr_cpu_ids

  * Change function check_nmi_watchdog() to use nr_cpu_ids instead of NR_CPUS.

Based on:
	git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    +   sched-devel/latest  .../mingo/linux-2.6-sched-devel.git


Signed-off-by: Mike Travis <travis@sgi.com>
---
 arch/x86/kernel/nmi_64.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.sched.orig/arch/x86/kernel/nmi_64.c
+++ linux-2.6.sched/arch/x86/kernel/nmi_64.c
@@ -88,7 +88,7 @@ int __init check_nmi_watchdog(void)
 	if (!atomic_read(&nmi_active))
 		return 0;
 
-	prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL);
+	prev_nmi_count = kmalloc(nr_cpu_ids * sizeof(int), GFP_KERNEL);
 	if (!prev_nmi_count)
 		return -1;
 
@@ -99,7 +99,7 @@ int __init check_nmi_watchdog(void)
 		smp_call_function(nmi_cpu_busy, (void *)&endflag, 0, 0);
 #endif
 
-	for (cpu = 0; cpu < NR_CPUS; cpu++)
+	for (cpu = 0; cpu < nr_cpu_ids; cpu++)
 		prev_nmi_count[cpu] = cpu_pda(cpu)->__nmi_count;
 	local_irq_enable();
 	mdelay((20*1000)/nmi_hz); // wait 20 ticks
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/1] x86: fix remove cpu_pda table patch, Mike Travis, (Mon Apr 28, 2:09 pm)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Ingo Molnar, (Mon Apr 28, 2:45 pm)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Mike Travis, (Tue Apr 29, 9:07 am)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Mike Travis, (Tue Apr 29, 10:38 am)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Mike Travis, (Tue Apr 29, 11:53 am)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Ingo Molnar, (Tue Apr 29, 2:44 pm)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Ingo Molnar, (Tue Apr 29, 11:04 pm)
Re: [PATCH 0/1] x86: fix remove cpu_pda table patch, Mike Travis, (Wed Apr 30, 7:15 am)