* [2.6 patch] #if 0 cpufreq.c:cpufreq_get()
@ 2007-10-24 16:23 Adrian Bunk
2007-10-24 16:32 ` Russell King
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Adrian Bunk @ 2007-10-24 16:23 UTC (permalink / raw)
To: Thomas Gleixner, davej; +Cc: cpufreq, linux-kernel
cpufreq.c:cpufreq_get() no longer has any user.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
drivers/cpufreq/cpufreq.c | 2 ++
1 file changed, 2 insertions(+)
099a5401a3c0322177866d4ba4e791825fe921d4
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 5e626b1..d27c802 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -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 */
/**
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [2.6 patch] #if 0 cpufreq.c:cpufreq_get()
2007-10-24 16:23 [2.6 patch] #if 0 cpufreq.c:cpufreq_get() Adrian Bunk
@ 2007-10-24 16:32 ` Russell King
2007-10-24 16:46 ` Adrian Bunk
2007-10-24 16:38 ` Arjan van de Ven
2007-10-24 18:39 ` Dave Jones
2 siblings, 1 reply; 6+ messages in thread
From: Russell King @ 2007-10-24 16:32 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Thomas Gleixner, davej, cpufreq, linux-kernel
On Wed, Oct 24, 2007 at 06:23:12PM +0200, Adrian Bunk wrote:
> 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));
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] #if 0 cpufreq.c:cpufreq_get()
2007-10-24 16:32 ` Russell King
@ 2007-10-24 16:46 ` Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2007-10-24 16:46 UTC (permalink / raw)
To: Russell King; +Cc: Thomas Gleixner, davej, cpufreq, linux-kernel
On Wed, Oct 24, 2007 at 05:32:45PM +0100, Russell King wrote:
> On Wed, Oct 24, 2007 at 06:23:12PM +0200, Adrian Bunk wrote:
> > 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);
> Russell King
cu
Adrian
--
"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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] #if 0 cpufreq.c:cpufreq_get()
2007-10-24 16:23 [2.6 patch] #if 0 cpufreq.c:cpufreq_get() Adrian Bunk
2007-10-24 16:32 ` Russell King
@ 2007-10-24 16:38 ` Arjan van de Ven
2007-10-24 17:17 ` Russell King
2007-10-24 18:39 ` Dave Jones
2 siblings, 1 reply; 6+ messages in thread
From: Arjan van de Ven @ 2007-10-24 16:38 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Thomas Gleixner, davej, cpufreq, linux-kernel
On Wed, 24 Oct 2007 18:23:12 +0200
Adrian Bunk <bunk@kernel.org> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] #if 0 cpufreq.c:cpufreq_get()
2007-10-24 16:38 ` Arjan van de Ven
@ 2007-10-24 17:17 ` Russell King
0 siblings, 0 replies; 6+ messages in thread
From: Russell King @ 2007-10-24 17:17 UTC (permalink / raw)
To: Arjan van de Ven
Cc: Adrian Bunk, davej, Thomas Gleixner, linux-kernel, cpufreq
On Wed, Oct 24, 2007 at 09:38:39AM -0700, Arjan van de Ven wrote:
> On Wed, 24 Oct 2007 18:23:12 +0200
> Adrian Bunk <bunk@kernel.org> 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.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] #if 0 cpufreq.c:cpufreq_get()
2007-10-24 16:23 [2.6 patch] #if 0 cpufreq.c:cpufreq_get() Adrian Bunk
2007-10-24 16:32 ` Russell King
2007-10-24 16:38 ` Arjan van de Ven
@ 2007-10-24 18:39 ` Dave Jones
2 siblings, 0 replies; 6+ messages in thread
From: Dave Jones @ 2007-10-24 18:39 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Thomas Gleixner, davej, cpufreq, linux-kernel
On Wed, Oct 24, 2007 at 06:23:12PM +0200, Adrian Bunk wrote:
> cpufreq.c:cpufreq_get() no longer has any user.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
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
--
http://www.codemonkey.org.uk
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-24 18:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-24 16:23 [2.6 patch] #if 0 cpufreq.c:cpufreq_get() Adrian Bunk
2007-10-24 16:32 ` Russell King
2007-10-24 16:46 ` Adrian Bunk
2007-10-24 16:38 ` Arjan van de Ven
2007-10-24 17:17 ` Russell King
2007-10-24 18:39 ` Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox