mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: lkml <linux-kernel@vger.kernel.org>, Andrew Morton <akpm@osdl.org>
Cc: Pavel Machek <pavel@suse.cz>, Dominik Brodowski <linux@brodo.de>,
	dtor_core@ameritech.net
Subject: [PATCH] linux-2.6.5-rc2_cpukhz-fix_A1
Date: Wed, 24 Mar 2004 15:43:30 -0800	[thread overview]
Message-ID: <1080171809.5408.288.camel@cog.beaverton.ibm.com> (raw)

Andrew, All, 
	This small patch insures that cpu_khz is adjusted on cpufreq
notifications even when the tsc timesource is not in use. It fixes the
mostly cosmetic issue when using the ACPI PM timesource of /proc/cpuinfo
not being properly updated when cpu frequency was lowered. 

Changelog:
A0: Original release
A1: Whitespace fix suggested by pavel@suse.cz

Andrew: Please consider for inclusion into your tree for further
testing.

thanks
-john

diff -Nru a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c
--- a/arch/i386/kernel/timers/timer_tsc.c	Wed Mar 24 15:35:23 2004
+++ b/arch/i386/kernel/timers/timer_tsc.c	Wed Mar 24 15:35:23 2004
@@ -360,8 +360,9 @@
 		if (variable_tsc)
 			cpu_data[freq->cpu].loops_per_jiffy = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
 #ifndef CONFIG_SMP
-		if (use_tsc) {
+		if (cpu_khz)
 			cpu_khz = cpufreq_scale(cpu_khz_ref, ref_freq, freq->new);
+		if (use_tsc) {
 			if (variable_tsc) {
 				fast_gettimeoffset_quotient = cpufreq_scale(fast_gettimeoffset_ref, freq->new, ref_freq);
 				set_cyc2ns_scale(cpu_khz/1000);



                 reply	other threads:[~2004-03-24 23:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1080171809.5408.288.camel@cog.beaverton.ibm.com \
    --to=johnstul@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@brodo.de \
    --cc=pavel@suse.cz \
    /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

all inboxes | Powered by JetHome®