clocksource: pass clocksource to read() callback
Pass clocksource pointer to the read() callback for clocksources. This allows us to share the callback between multiple instances. [hugh@veritas.com: fix powerpc build of clocksource pass clocksource mods] [akpm@linux-foundation.org: cleanup] Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
ff14ed5db6
commit
8e19608e8b
@@ -22,7 +22,7 @@
|
||||
|
||||
static struct txx9_tmr_reg __iomem *txx9_cs_tmrptr;
|
||||
|
||||
static cycle_t txx9_cs_read(void)
|
||||
static cycle_t txx9_cs_read(struct clocksource *cs)
|
||||
{
|
||||
return __raw_readl(&txx9_cs_tmrptr->trr);
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <asm/sibyte/sb1250.h>
|
||||
|
||||
static cycle_t bcm1480_hpt_read(void)
|
||||
static cycle_t bcm1480_hpt_read(struct clocksource *cs)
|
||||
{
|
||||
return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#include <asm/dec/ioasic.h>
|
||||
#include <asm/dec/ioasic_addrs.h>
|
||||
|
||||
static cycle_t dec_ioasic_hpt_read(void)
|
||||
static cycle_t dec_ioasic_hpt_read(struct clocksource *cs)
|
||||
{
|
||||
return ioasic_read(IO_REG_FCTR);
|
||||
}
|
||||
@@ -47,13 +47,13 @@ void __init dec_ioasic_clocksource_init(void)
|
||||
while (!ds1287_timer_state())
|
||||
;
|
||||
|
||||
start = dec_ioasic_hpt_read();
|
||||
start = dec_ioasic_hpt_read(&clocksource_dec);
|
||||
|
||||
while (i--)
|
||||
while (!ds1287_timer_state())
|
||||
;
|
||||
|
||||
end = dec_ioasic_hpt_read();
|
||||
end = dec_ioasic_hpt_read(&clocksource_dec);
|
||||
|
||||
freq = (end - start) * 10;
|
||||
printk(KERN_INFO "I/O ASIC clock frequency %dHz\n", freq);
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <asm/time.h>
|
||||
|
||||
static cycle_t c0_hpt_read(void)
|
||||
static cycle_t c0_hpt_read(struct clocksource *cs)
|
||||
{
|
||||
return read_c0_count();
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
* The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
|
||||
* again.
|
||||
*/
|
||||
static cycle_t sb1250_hpt_read(void)
|
||||
static cycle_t sb1250_hpt_read(struct clocksource *cs)
|
||||
{
|
||||
unsigned int count;
|
||||
|
||||
|
@@ -128,7 +128,7 @@ void __init setup_pit_timer(void)
|
||||
* to just read by itself. So use jiffies to emulate a free
|
||||
* running counter:
|
||||
*/
|
||||
static cycle_t pit_read(void)
|
||||
static cycle_t pit_read(struct clocksource *cs)
|
||||
{
|
||||
unsigned long flags;
|
||||
int count;
|
||||
|
Reference in New Issue
Block a user