public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ia64: Fix CPU freq displayed in /proc/cpuinfo
@ 2007-04-06 17:04 Venki Pallipadi
  2007-04-06 17:29 ` Luck, Tony
  2007-04-06 17:48 ` Venki Pallipadi
  0 siblings, 2 replies; 3+ messages in thread
From: Venki Pallipadi @ 2007-04-06 17:04 UTC (permalink / raw)
  To: linux-ia64



My patch: git commit•235ca2c20ac0b31a8eb39e2d599bcc3e9c9a10 introduced a bug
in IA64 cpuinfo output.

Patch changed the proc_freq from 1HZ resolution to 1KHz resolution, but left
format string unchanged at " %lu.%06lu". Below is the fix.

Thanks to Bjorn for catching this.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

Index: new/arch/ia64/kernel/setup.c
=================================--- new.orig/arch/ia64/kernel/setup.c	2007-04-02 09:42:37.000000000 -0700
+++ new/arch/ia64/kernel/setup.c	2007-04-06 08:31:23.000000000 -0700
@@ -639,7 +639,7 @@
 		   "features   : %s\n"
 		   "cpu number : %lu\n"
 		   "cpu regs   : %u\n"
-		   "cpu MHz    : %lu.%06lu\n"
+		   "cpu MHz    : %lu.%03lu\n"
 		   "itc MHz    : %lu.%06lu\n"
 		   "BogoMIPS   : %lu.%02lu\n",
 		   cpunum, c->vendor, c->family, c->model,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] ia64: Fix CPU freq displayed in /proc/cpuinfo
  2007-04-06 17:04 [PATCH] ia64: Fix CPU freq displayed in /proc/cpuinfo Venki Pallipadi
@ 2007-04-06 17:29 ` Luck, Tony
  2007-04-06 17:48 ` Venki Pallipadi
  1 sibling, 0 replies; 3+ messages in thread
From: Luck, Tony @ 2007-04-06 17:29 UTC (permalink / raw)
  To: linux-ia64


+		   "cpu MHz    : %lu.%03lu\n"
 		   "itc MHz    : %lu.%06lu\n"


Why did you cut the precision of cpu MHz back to 1Khz?  Is the
extra precision not-warranted, or is this just to be more like
other architectures?

Should we do the same for itc MHz to treat both evenly?

-Tony

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ia64: Fix CPU freq displayed in /proc/cpuinfo
  2007-04-06 17:04 [PATCH] ia64: Fix CPU freq displayed in /proc/cpuinfo Venki Pallipadi
  2007-04-06 17:29 ` Luck, Tony
@ 2007-04-06 17:48 ` Venki Pallipadi
  1 sibling, 0 replies; 3+ messages in thread
From: Venki Pallipadi @ 2007-04-06 17:48 UTC (permalink / raw)
  To: linux-ia64

On Fri, Apr 06, 2007 at 10:29:03AM -0700, Luck, Tony wrote:
> 
> +		   "cpu MHz    : %lu.%03lu\n"
>  		   "itc MHz    : %lu.%06lu\n"
> 
> 
> Why did you cut the precision of cpu MHz back to 1Khz?  Is the
> extra precision not-warranted, or is this just to be more like
> other architectures?

That is because we try to get this from cpufreq and cpufreq
has this info in kHz.
 
> Should we do the same for itc MHz to treat both evenly?

Not sure about this. I guess we can retain it the way it is as it is
something directly coming from hardware. CPU frequency in turn can come
cpufreq or acpi tables. ACPI table will reduce this further as it
always gives the info in MHz (on processors that has ACPI
based P-states support).

Thanks,
Venki

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-04-06 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-06 17:04 [PATCH] ia64: Fix CPU freq displayed in /proc/cpuinfo Venki Pallipadi
2007-04-06 17:29 ` Luck, Tony
2007-04-06 17:48 ` Venki Pallipadi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox