All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: Robert Love <rml@tech9.net>
Cc: "Nakajima, Jun" <jun.nakajima@intel.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"'Dave Jones'" <davej@codemonkey.org.uk>,
	"'akpm@digeo.com'" <akpm@digeo.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"'chrisl@vmware.com'" <chrisl@vmware.com>,
	"'Martin J. Bligh'" <mbligh@aracnet.com>
Subject: Re: [PATCH] hyper-threading information in /proc/cpuinfo
Date: 25 Oct 2002 17:39:55 -0400	[thread overview]
Message-ID: <1035581995.1501.3906.camel@phantasy> (raw)
In-Reply-To: <1035581420.734.3873.camel@phantasy>

On Fri, 2002-10-25 at 17:30, Robert Love wrote:

> 	- wrap print in "if (cpu_has_ht) { ... }"   (Dave Jones)
> 	- remove initdata from phys_proc_id         (Jun Nakajima)
> 	- match field names in latest 2.4-ac        (Alan Cox)

missing this last bit, sorry..

	Robert Love

 cpu/proc.c |    7 +++++++
 smpboot.c  |    2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff -urN linux-2.5.44/arch/i386/kernel/cpu/proc.c linux/arch/i386/kernel/cpu/proc.c
--- linux-2.5.44/arch/i386/kernel/cpu/proc.c	2002-10-19 00:02:29.000000000 -0400
+++ linux/arch/i386/kernel/cpu/proc.c	2002-10-25 15:18:03.000000000 -0400
@@ -17,6 +17,7 @@
 	 * applications want to get the raw CPUID data, they should access
 	 * /dev/cpu/<cpu_nr>/cpuid instead.
 	 */
+	extern int phys_proc_id[NR_CPUS];
 	static char *x86_cap_flags[] = {
 		/* Intel-defined */
 	        "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
@@ -74,6 +75,12 @@
 	/* Cache size */
 	if (c->x86_cache_size >= 0)
 		seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
+#ifdef CONFIG_SMP
+	if (cpu_has_ht) {
+		seq_printf(m, "physical id\t: %d\n", phys_proc_id[n]);
+		seq_printf(m, "siblings\t: %d\n", smp_num_siblings);
+	}
+#endif
 	
 	/* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */
 	fpu_exception = c->hard_math && (ignore_irq13 || cpu_has_fpu);
diff -urN linux-2.5.44/arch/i386/kernel/smpboot.c linux/arch/i386/kernel/smpboot.c
--- linux-2.5.44/arch/i386/kernel/smpboot.c	2002-10-19 00:01:53.000000000 -0400
+++ linux/arch/i386/kernel/smpboot.c	2002-10-25 17:24:26.000000000 -0400
@@ -58,7 +58,7 @@
 
 /* Number of siblings per CPU package */
 int smp_num_siblings = 1;
-int __initdata phys_proc_id[NR_CPUS]; /* Package ID of each logical CPU */
+int phys_proc_id[NR_CPUS]; /* Package ID of each logical CPU */
 
 /* Bitmask of currently online CPUs */
 unsigned long cpu_online_map;


  reply	other threads:[~2002-10-25 21:33 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-25 20:38 [PATCH] How to get number of physical CPU in linux from user space? Nakajima, Jun
2002-10-25 21:30 ` [PATCH] hyper-threading information in /proc/cpuinfo Robert Love
2002-10-25 21:39   ` Robert Love [this message]
2002-10-26  0:01   ` Dave Jones
2002-10-26  0:04     ` Jeff Garzik
2002-10-26  0:12       ` Dave Jones
2002-10-26  0:16         ` Jeff Garzik
2002-10-26  0:33           ` Robert Love
  -- strict thread matches above, loose matches on Subject: below --
2002-10-25 21:50 Nakajima, Jun
2002-10-25 21:54 ` Robert Love
2002-10-25 22:19   ` chrisl
2002-10-25 22:14 ` Alan Cox
2002-10-25 22:06   ` Daniel Phillips
2002-10-25 22:10     ` Robert Love
2002-10-25 22:25       ` Jeff Garzik
2002-10-26  0:49   ` Rik van Riel
2002-10-26 15:45   ` Eric W. Biederman
2002-10-25 22:42 Nakajima, Jun
2002-10-25 22:57 ` Jeff Garzik
2002-10-25 23:21 ` David D. Hagood
2002-10-25 23:25   ` Robert Love
2002-10-25 23:45 ` David D. Hagood
2002-10-26  0:37   ` Robert Love
2002-10-25 23:51 ` Daniel Phillips
2002-10-25 23:24 Nakajima, Jun
2002-10-25 23:45 ` Jeff Garzik
2002-10-25 23:59 Nakajima, Jun
2002-10-26  0:43 ` J.A. Magallon
2002-10-26  0:47   ` J.A. Magallon
2002-10-26  2:51     ` Martin J. Bligh
2002-10-26 19:48   ` Rik van Riel
2002-10-28 18:53     ` chrisl
2002-10-28 21:54       ` J.A. Magallon
2002-10-26  0:26 Nakajima, Jun
2002-10-26  0:54 Nakajima, Jun
2002-10-26  1:58 Nakajima, Jun
2002-10-28 22:36 Nakajima, Jun

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=1035581995.1501.3906.camel@phantasy \
    --to=rml@tech9.net \
    --cc=akpm@digeo.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=chrisl@vmware.com \
    --cc=davej@codemonkey.org.uk \
    --cc=jun.nakajima@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.