Skip to contentSkip to conversation

#if 0 cpufreq.c:cpufreq_get()

PATCH In review Adrian Bunk 5 participants 7 messages Oct 24, 2007 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 #if 0 cpufreq.c:cpufreq_get()

cpufreq.c:cpufreq_get() no longer has any user.

---

 drivers/cpufreq/cpufreq.c |    2 ++
 1 file changed, 2 insertions(+)

099a5401a3c0322177866d4ba4e791825fe921d4

drivers/cpufreq/cpufreq.c +2 -0
index 5e626b1..d27c802 100644
@@ -1143,6 +1143,7 @@ static unsigned int __cpufreq_get(unsigned int cpu)
 	return (ret_freq);
 }
 
+#if 0
 /**
  * cpufreq_get - get the current CPU frequency (in kHz)
  * @cpu: CPU number
@@ -1170,6 +1171,7 @@ out:
 	return (ret_freq);
 }
 EXPORT_SYMBOL(cpufreq_get);
+#endif  /*  0  */
 
 
 /**
#1 lore raw
Quoted 1 line · Adrian Bunk

cpufreq.c:cpufreq_get() no longer has any user.

Your checking seems to be flawed.

drivers/video/sa1100fb.c:               cpufreq_get(smp_processor_id()));
drivers/video/sa1100fb.c:       pcd = get_pcd(var->pixclock, cpufreq_get(0));
Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
#2 lore raw
Quoted 7 lines · Russell King
Quoted 1 line · Adrian Bunk

cpufreq.c:cpufreq_get() no longer has any user.

Your checking seems to be flawed.

drivers/video/sa1100fb.c:               cpufreq_get(smp_processor_id()));
drivers/video/sa1100fb.c:       pcd = get_pcd(var->pixclock, cpufreq_get(0));

Thanks for spotting this.

My mistake was that I thought this was handled by the following without checking closer:

arch/arm/mach-sa1100/generic.c:unsigned int cpufreq_get(unsigned int cpu) arch/arm/mach-sa1100/generic.c:EXPORT_SYMBOL(cpufreq_get);

Quoted 1 line

Russell King

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#3 lore raw
In reply to Adrian Bunk
Quoted 2 lines · On Wed, 24 Oct 2007 18:23:12 +0200 Adrian Bunk <[email protected]> wrote:

cpufreq.c:cpufreq_get() no longer has any user.

it's... also a really bad/buggy interface... frquency is a per cpu property for one, and constantly changing (esp in a multi-core world) even depending on what other parts of the system are doing.

#4 lore raw
Quoted 9 lines · Arjan van de Ven
Quoted 2 lines · On Wed, 24 Oct 2007 18:23:12 +0200 Adrian Bunk <[email protected]> wrote:

cpufreq.c:cpufreq_get() no longer has any user.

it's... also a really bad/buggy interface... frquency is a per cpu property for one, and constantly changing (esp in a multi-core world) even depending on what other parts of the system are doing.

... and such an assumption which would make it impossible to use the LCD controller on StrongARM-11x0 processors.

This is precisely why we have CPUFREQ - so that hardware which needs to be re-timed when the CPU frequency changes can get notified of that event and take the appropriate action. It exists. It works.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
#5 lore raw
In reply to Arjan van de Ven
Quoted 8 lines · Arjan van de Ven
Quoted 2 lines · On Wed, 24 Oct 2007 18:23:12 +0200 Adrian Bunk <[email protected]> wrote:

cpufreq.c:cpufreq_get() no longer has any user.

it's... also a really bad/buggy interface... frquency is a per cpu property for one,

... which is why cpufreq_get() has one argument, the CPU id.

Dominik

#6 lore raw
In reply to Adrian Bunk
Quoted 3 lines · Adrian Bunk

cpufreq.c:cpufreq_get() no longer has any user.

ARM uses it.

drivers/pcmcia/sa11xx_base.c:   return sa1100_pcmcia_set_mecr(skt, cpufreq_get(0));
drivers/pcmcia/sa11xx_base.c:   unsigned int clock = cpufreq_get(0);
drivers/video/sa1100fb.c:               cpufreq_get(smp_processor_id()));
drivers/video/sa1100fb.c:       pcd = get_pcd(var->pixclock, cpufreq_get(0));

Dave

Signature · 1 line
http://www.codemonkey.org.uk