bk://linux-dj.bkbits.net/cpufreq davej@redhat.com|ChangeSet|20050315024906|28039 davej # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/14 23:41:43-08:00 akpm@bix.(none) # Merge bk://linux-dj.bkbits.net/cpufreq # into bix.(none):/usr/src/bk-cpufreq # # drivers/cpufreq/cpufreq.c # 2005/03/14 23:41:39-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/cpufreq/Kconfig # 2005/03/14 23:41:39-08:00 akpm@bix.(none) +0 -10 # Auto merged # # arch/i386/kernel/cpu/cpufreq/Kconfig # 2005/03/14 23:41:39-08:00 akpm@bix.(none) +0 -24 # Auto merged # # ChangeSet # 2005/03/14 21:49:06-05:00 davej@redhat.com # [CPUFREQ] Add warning comment about default governors. # # This comes up time and time again. Until its fixed, place this # comment in the Kconfig which should stem the flow of resubmissions. # # Signed-off-by: Rob Weryk # Signed-off-by: Dave Jones # # drivers/cpufreq/Kconfig # 2005/03/14 21:48:56-05:00 davej@redhat.com +4 -0 # [CPUFREQ] Add warning comment about default governors. # # This comes up time and time again. Until its fixed, place this # comment in the Kconfig which should stem the flow of resubmissions. # # Signed-off-by: Rob Weryk # Signed-off-by: Dave Jones # # ChangeSet # 2005/03/14 21:43:30-05:00 davej@redhat.com # [CPUFREQ] speedstep-smi: it works on at least one P4M # # The speedstep-smi driver actually works on >=1 notebook with a # Pentium 4-M CPU where all other cpufreq drivers fail. Therefore, # allow speedstep-smi on P4Ms again, but warn users of likely failure # # Signed-off-by: Dominik Brodowski # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/speedstep-smi.c # 2005/03/14 21:43:20-05:00 davej@redhat.com +3 -0 # [CPUFREQ] speedstep-smi: it works on at least one P4M # # The speedstep-smi driver actually works on >=1 notebook with a # Pentium 4-M CPU where all other cpufreq drivers fail. Therefore, # allow speedstep-smi on P4Ms again, but warn users of likely failure # # Signed-off-by: Dominik Brodowski # Signed-off-by: Dave Jones # # ChangeSet # 2005/03/14 21:42:13-05:00 davej@redhat.com # [CPUFREQ] ondemand: trivial clean-ups # # From: Eric Piel # # Trivial ondemand governor clean-ups: # - change from sampling_rate_in_HZ() to the official function # usecs_to_jiffies(). # - use for_each_online_cpu() to instead of using "if (cpu_online(i))" # # Signed-off-by: Eric Piel # Signed-off-by: Venkatesh Pallipadi # Signed-off-by: Dominik Brodowski # Signed-off-by: Dave Jones # # drivers/cpufreq/cpufreq_ondemand.c # 2005/03/14 21:42:03-05:00 davej@redhat.com +6 -8 # [CPUFREQ] ondemand: trivial clean-ups # # From: Eric Piel # # Trivial ondemand governor clean-ups: # - change from sampling_rate_in_HZ() to the official function # usecs_to_jiffies(). # - use for_each_online_cpu() to instead of using "if (cpu_online(i))" # # Signed-off-by: Eric Piel # Signed-off-by: Venkatesh Pallipadi # Signed-off-by: Dominik Brodowski # Signed-off-by: Dave Jones # # ChangeSet # 2005/03/14 21:41:23-05:00 davej@redhat.com # [CPUFREQ] core/x86: Kconfig cleanup # # From: Roman Zippel # # This properly indents the cpufreq menu. # Remove CPU_FREQ_TABLE as visible option and use select instead. # # Signed-off-by: Dave Jones # # drivers/cpufreq/Kconfig # 2005/03/14 21:41:13-05:00 davej@redhat.com +10 -10 # [CPUFREQ] core/x86: Kconfig cleanup # # From: Roman Zippel # # This properly indents the cpufreq menu. # Remove CPU_FREQ_TABLE as visible option and use select instead. # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/Kconfig # 2005/03/14 21:41:13-05:00 davej@redhat.com +24 -30 # [CPUFREQ] core/x86: Kconfig cleanup # # From: Roman Zippel # # This properly indents the cpufreq menu. # Remove CPU_FREQ_TABLE as visible option and use select instead. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/03/14 21:40:17-05:00 davej@redhat.com # [CPUFREQ] speedstep-centrino: Pentium 4 - M (HT) support # # The Pentium 4 - Ms (HT) with CPUID 0xF34 and 0xF41 seem to support # centrino-like enhanced speedstep; however, no "table" support is possible. # Therefore, put NULL entries into speedstep-centrino.c # # Signed-off-by: Dominik Brodowski # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c # 2005/03/14 21:37:57-05:00 davej@redhat.com +6 -0 # [CPUFREQ] speedstep-centrino: Pentium 4 - M (HT) support # # The Pentium 4 - Ms (HT) with CPUID 0xF34 and 0xF41 seem to support # centrino-like enhanced speedstep; however, no "table" support is possible. # Therefore, put NULL entries into speedstep-centrino.c # # Signed-off-by: Dominik Brodowski # Signed-off-by: Dave Jones # # ChangeSet # 2005/03/14 21:25:51-05:00 davej@delerium.kernelslacker.org # Merge delerium.kernelslacker.org:/mnt/data/src/bk/bk-linus # into delerium.kernelslacker.org:/mnt/data/src/bk/cpufreq # # drivers/cpufreq/cpufreq.c # 2005/03/14 21:25:45-05:00 davej@delerium.kernelslacker.org +0 -0 # Auto merged # # ChangeSet # 2005/03/01 22:12:24-08:00 akpm@bix.(none) # Merge bk://linux-dj.bkbits.net/cpufreq # into bix.(none):/usr/src/bk-cpufreq # # drivers/cpufreq/cpufreq.c # 2005/03/01 22:12:20-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2005/02/23 12:49:22-05:00 davej@redhat.com # [CPUFREQ] cpufreq-core: reduce warning messages. # # cpufreq core is printing out messages at KERN_WARNING level that the core # recovers from without intervention, and that the system administrator can # do nothing about. Patch below reduces the severity of these messages to # debug. # # Signed-off-by: Matt Domsch # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/cpufreq/cpufreq.c # 2005/02/23 12:49:13-05:00 davej@redhat.com +4 -4 # [CPUFREQ] cpufreq-core: reduce warning messages. # # cpufreq core is printing out messages at KERN_WARNING level that the core # recovers from without intervention, and that the system administrator can # do nothing about. Patch below reduces the severity of these messages to # debug. # # Signed-off-by: Matt Domsch # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # ChangeSet # 2005/01/27 19:16:17-05:00 davej@redhat.com # [CPUFREQ] powernow-k7: don't print khz element of FSB. # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/powernow-k7.c # 2005/01/27 19:16:08-05:00 davej@redhat.com +1 -1 # [CPUFREQ] powernow-k7: don't print khz element of FSB. # # Signed-off-by: Dave Jones # diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c --- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c 2005-03-15 23:52:47 -08:00 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c 2005-03-15 23:52:47 -08:00 @@ -592,7 +592,7 @@ printk(KERN_WARNING PFX "can not determine bus frequency\n"); return -EINVAL; } - dprintk("FSB: %3d.%03d MHz\n", fsb/1000, fsb%1000); + dprintk("FSB: %3dMHz\n", fsb/1000); if (dmi_check_system(powernow_dmi_table) || acpi_force) { printk (KERN_INFO PFX "PSB/PST known to be broken. Trying ACPI instead\n"); diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c 2005-03-15 23:52:48 -08:00 +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c 2005-03-15 23:52:48 -08:00 @@ -54,6 +54,8 @@ CPU_DOTHAN_A1, CPU_DOTHAN_A2, CPU_DOTHAN_B0, + CPU_MP4HT_D0, + CPU_MP4HT_E0, }; static const struct cpu_id cpu_ids[] = { @@ -61,6 +63,8 @@ [CPU_DOTHAN_A1] = { 6, 13, 1 }, [CPU_DOTHAN_A2] = { 6, 13, 2 }, [CPU_DOTHAN_B0] = { 6, 13, 6 }, + [CPU_MP4HT_D0] = {15, 3, 4 }, + [CPU_MP4HT_E0] = {15, 4, 1 }, }; #define N_IDS (sizeof(cpu_ids)/sizeof(cpu_ids[0])) @@ -226,6 +230,8 @@ { &cpu_ids[CPU_DOTHAN_A1], NULL, 0, NULL }, { &cpu_ids[CPU_DOTHAN_A2], NULL, 0, NULL }, { &cpu_ids[CPU_DOTHAN_B0], NULL, 0, NULL }, + { &cpu_ids[CPU_MP4HT_D0], NULL, 0, NULL }, + { &cpu_ids[CPU_MP4HT_E0], NULL, 0, NULL }, { NULL, } }; diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c --- a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c 2005-03-15 23:52:48 -08:00 +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c 2005-03-15 23:52:48 -08:00 @@ -357,6 +357,9 @@ case SPEEDSTEP_PROCESSOR_PIII_C: case SPEEDSTEP_PROCESSOR_PIII_C_EARLY: break; + case SPEEDSTEP_PROCESSOR_P4M: + printk(KERN_INFO "speedstep-smi: you're trying to use this cpufreq driver on a Pentium 4-based CPU. Most likely it will not work.\n"); + break; default: speedstep_processor = 0; } diff -Nru a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig --- a/drivers/cpufreq/Kconfig 2005-03-15 23:52:48 -08:00 +++ b/drivers/cpufreq/Kconfig 2005-03-15 23:52:48 -08:00 @@ -46,6 +46,10 @@ This will show detail CPU frequency translation table in sysfs file system +# Note that it is not currently possible to set the other governors (such as ondemand) +# as the default, since if they fail to initialise, cpufreq will be +# left in an undefined state. + choice prompt "Default CPUFreq governor" default CPU_FREQ_DEFAULT_GOV_USERSPACE if CPU_FREQ_SA1100 || CPU_FREQ_SA1110 diff -Nru a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c --- a/drivers/cpufreq/cpufreq.c 2005-03-15 23:52:47 -08:00 +++ b/drivers/cpufreq/cpufreq.c 2005-03-15 23:52:48 -08:00 @@ -258,7 +258,7 @@ (likely(cpufreq_cpu_data[freqs->cpu]->cur)) && (unlikely(freqs->old != cpufreq_cpu_data[freqs->cpu]->cur))) { - printk(KERN_WARNING "Warning: CPU frequency is %u, " + dprintk("Warning: CPU frequency is %u, " "cpufreq assumed %u kHz.\n", freqs->old, cpufreq_cpu_data[freqs->cpu]->cur); freqs->old = cpufreq_cpu_data[freqs->cpu]->cur; } @@ -814,7 +814,7 @@ { struct cpufreq_freqs freqs; - printk(KERN_WARNING "Warning: CPU frequency out of sync: cpufreq and timing " + dprintk("Warning: CPU frequency out of sync: cpufreq and timing " "core thinks of %u, is %u kHz.\n", old_freq, new_freq); freqs.cpu = cpu; @@ -922,8 +922,8 @@ if (unlikely(cur_freq != cpu_policy->cur)) { struct cpufreq_freqs freqs; - printk(KERN_WARNING "Warning: CPU frequency is %u, " - "cpufreq assumed %u kHz.\n", cur_freq, cpu_policy->cur); + dprintk("Warning: CPU frequency is %u, cpufreq assumed %u kHz.\n", + cur_freq, cpu_policy->cur); freqs.cpu = cpu; freqs.old = cpu_policy->cur; diff -Nru a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c --- a/drivers/cpufreq/cpufreq_ondemand.c 2005-03-15 23:52:48 -08:00 +++ b/drivers/cpufreq/cpufreq_ondemand.c 2005-03-15 23:52:48 -08:00 @@ -57,7 +57,6 @@ #define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000) #define DEF_SAMPLING_DOWN_FACTOR (10) #define TRANSITION_LATENCY_LIMIT (10 * 1000) -#define sampling_rate_in_HZ(x) (((x * HZ) < (1000 * 1000))?1:((x * HZ) / (1000 * 1000))) static void do_dbs_timer(void *data); @@ -281,7 +280,7 @@ /* Scale idle ticks by 100 and compare with up and down ticks */ idle_ticks *= 100; up_idle_ticks = (100 - dbs_tuners_ins.up_threshold) * - sampling_rate_in_HZ(dbs_tuners_ins.sampling_rate); + usecs_to_jiffies(dbs_tuners_ins.sampling_rate); if (idle_ticks < up_idle_ticks) { __cpufreq_driver_target(policy, policy->max, @@ -328,7 +327,7 @@ freq_down_sampling_rate = dbs_tuners_ins.sampling_rate * dbs_tuners_ins.sampling_down_factor; down_idle_ticks = (100 - dbs_tuners_ins.down_threshold) * - sampling_rate_in_HZ(freq_down_sampling_rate); + usecs_to_jiffies(freq_down_sampling_rate); if (idle_ticks > down_idle_ticks ) { freq_down_step = (5 * policy->max) / 100; @@ -348,11 +347,10 @@ { int i; down(&dbs_sem); - for (i = 0; i < NR_CPUS; i++) - if (cpu_online(i)) - dbs_check_cpu(i); + for_each_online_cpu(i) + dbs_check_cpu(i); schedule_delayed_work(&dbs_work, - sampling_rate_in_HZ(dbs_tuners_ins.sampling_rate)); + usecs_to_jiffies(dbs_tuners_ins.sampling_rate)); up(&dbs_sem); } @@ -360,7 +358,7 @@ { INIT_WORK(&dbs_work, do_dbs_timer, NULL); schedule_delayed_work(&dbs_work, - sampling_rate_in_HZ(dbs_tuners_ins.sampling_rate)); + usecs_to_jiffies(dbs_tuners_ins.sampling_rate)); return; }