public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zou Nan hai <nanhai.zou@intel.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>
Subject: [Patch1/2] fix wrong proc cpuinfo on x64
Date: 06 Nov 2007 15:25:39 +0800	[thread overview]
Message-ID: <1194333939.3046.36.camel@linux-znh> (raw)


in 2.6.24-rc1 kernel, 
The /proc/cpuinfo display is wrong.

One issue is every processor id appears to be 0.

That is because smp_store_cpu_info will set cpuinfo_x86->cpu_index
to cpu id then call identify_cpu
identify_cpu will call early_identify_cpu which set c->cpu_index back to
0.

This patch set cpu_index after identify_cpu to fix the issue.

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>

--- linux-2.6.24-rc1/arch/x86/kernel/smpboot_64.c	2007-10-29 22:03:05.000000000 -0400
+++ b/arch/x86/kernel/smpboot_64.c	2007-11-05 22:12:57.000000000 -0500
@@ -141,8 +141,8 @@ static void __cpuinit smp_store_cpu_info
 	struct cpuinfo_x86 *c = &cpu_data(id);
 
 	*c = boot_cpu_data;
-	c->cpu_index = id;
 	identify_cpu(c);
+	c->cpu_index = id;
 	print_cpu_info(c);
 }
 


             reply	other threads:[~2007-11-06  7:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-06  7:25 Zou Nan hai [this message]
2007-11-06 18:31 ` [Patch1/2] fix wrong proc cpuinfo on x64 Andreas Herrmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1194333939.3046.36.camel@linux-znh \
    --to=nanhai.zou@intel.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox