Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=941e492bdb1239d2ca8f5736cdfd3ff83d00cb90
Commit:     941e492bdb1239d2ca8f5736cdfd3ff83d00cb90
Parent:     83bad1d764b836a482b88e0a1f44d7a5c3e1fee0
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 6 01:36:42 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Feb 6 10:41:02 2008 -0800

    read_current_timer() cleanups
    
    - All implementations can be __devinit
    
    - The function prototypes were in asm/timex.h but they all must be the same,
      so create a single declaration in linux/timex.h.
    
    - uninline the sparc64 version to match the other architectures
    
    - Don't bother #defining ARCH_HAS_READ_CURRENT_TIMER to a particular value.
    
    [EMAIL PROTECTED]: fix build]
    Cc: "David S. Miller" <[EMAIL PROTECTED]>
    Cc: Haavard Skinnemoen <[EMAIL PROTECTED]>
    Cc: Thomas Gleixner <[EMAIL PROTECTED]>
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/avr32/lib/delay.c      |    4 +++-
 arch/sparc64/kernel/time.c  |    5 +++++
 arch/x86/lib/delay_32.c     |    4 +++-
 arch/x86/lib/delay_64.c     |    4 +++-
 include/asm-avr32/timex.h   |    3 +--
 include/asm-sparc64/timex.h |    6 +-----
 include/asm-x86/timex.h     |    3 +--
 include/linux/timex.h       |    2 ++
 init/calibrate.c            |    3 +--
 9 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/arch/avr32/lib/delay.c b/arch/avr32/lib/delay.c
index b3bc0b5..9aa8800 100644
--- a/arch/avr32/lib/delay.c
+++ b/arch/avr32/lib/delay.c
@@ -12,13 +12,15 @@
 
 #include <linux/delay.h>
 #include <linux/module.h>
+#include <linux/timex.h>
 #include <linux/param.h>
 #include <linux/types.h>
+#include <linux/init.h>
 
 #include <asm/processor.h>
 #include <asm/sysreg.h>
 
-int read_current_timer(unsigned long *timer_value)
+int __devinit read_current_timer(unsigned long *timer_value)
 {
        *timer_value = sysreg_read(COUNT);
        return 0;
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 4352ee4..d204f1a 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -1707,6 +1707,11 @@ static void __exit rtc_mini_exit(void)
        misc_deregister(&rtc_mini_dev);
 }
 
+int __devinit read_current_timer(unsigned long *timer_val)
+{
+       *timer_val = tick_ops->get_tick();
+       return 0;
+}
 
 module_init(rtc_mini_init);
 module_exit(rtc_mini_exit);
diff --git a/arch/x86/lib/delay_32.c b/arch/x86/lib/delay_32.c
index aad9d95..4535e6d 100644
--- a/arch/x86/lib/delay_32.c
+++ b/arch/x86/lib/delay_32.c
@@ -12,8 +12,10 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
+#include <linux/timex.h>
 #include <linux/preempt.h>
 #include <linux/delay.h>
+#include <linux/init.h>
 
 #include <asm/processor.h>
 #include <asm/delay.h>
@@ -63,7 +65,7 @@ void use_tsc_delay(void)
        delay_fn = delay_tsc;
 }
 
-int read_current_timer(unsigned long *timer_val)
+int __devinit read_current_timer(unsigned long *timer_val)
 {
        if (delay_fn == delay_tsc) {
                rdtscl(*timer_val);
diff --git a/arch/x86/lib/delay_64.c b/arch/x86/lib/delay_64.c
index 45cdd3f..bbc6105 100644
--- a/arch/x86/lib/delay_64.c
+++ b/arch/x86/lib/delay_64.c
@@ -10,8 +10,10 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
+#include <linux/timex.h>
 #include <linux/preempt.h>
 #include <linux/delay.h>
+#include <linux/init.h>
 
 #include <asm/delay.h>
 #include <asm/msr.h>
@@ -20,7 +22,7 @@
 #include <asm/smp.h>
 #endif
 
-int read_current_timer(unsigned long *timer_value)
+int __devinit read_current_timer(unsigned long *timer_value)
 {
        rdtscll(*timer_value);
        return 0;
diff --git a/include/asm-avr32/timex.h b/include/asm-avr32/timex.h
index 5e44ecb..187dcf3 100644
--- a/include/asm-avr32/timex.h
+++ b/include/asm-avr32/timex.h
@@ -34,7 +34,6 @@ static inline cycles_t get_cycles (void)
        return 0;
 }
 
-extern int read_current_timer(unsigned long *timer_value);
-#define ARCH_HAS_READ_CURRENT_TIMER    1
+#define ARCH_HAS_READ_CURRENT_TIMER
 
 #endif /* __ASM_AVR32_TIMEX_H */
diff --git a/include/asm-sparc64/timex.h b/include/asm-sparc64/timex.h
index 2a5e4eb..c622535 100644
--- a/include/asm-sparc64/timex.h
+++ b/include/asm-sparc64/timex.h
@@ -14,10 +14,6 @@
 typedef unsigned long cycles_t;
 #define get_cycles()   tick_ops->get_tick()
 
-#define ARCH_HAS_READ_CURRENT_TIMER    1
-#define read_current_timer(timer_val_p)        \
-({     *timer_val_p = tick_ops->get_tick();    \
-       0;                                      \
-})
+#define ARCH_HAS_READ_CURRENT_TIMER
 
 #endif
diff --git a/include/asm-x86/timex.h b/include/asm-x86/timex.h
index 27cfd6c..43e5a78 100644
--- a/include/asm-x86/timex.h
+++ b/include/asm-x86/timex.h
@@ -14,7 +14,6 @@
 #endif
 #define CLOCK_TICK_RATE        PIT_TICK_RATE
 
-extern int read_current_timer(unsigned long *timer_value);
-#define ARCH_HAS_READ_CURRENT_TIMER    1
+#define ARCH_HAS_READ_CURRENT_TIMER
 
 #endif
diff --git a/include/linux/timex.h b/include/linux/timex.h
index 24c6a2b..8ea3e71 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -244,6 +244,8 @@ extern int do_adjtimex(struct timex *);
 /* Don't use! Compatibility define for existing users. */
 #define tickadj        (500/HZ ? : 1)
 
+int read_current_timer(unsigned long *timer_val);
+
 #endif /* KERNEL */
 
 #endif /* LINUX_TIMEX_H */
diff --git a/init/calibrate.c b/init/calibrate.c
index 2d3d73b..1d87891 100644
--- a/init/calibrate.c
+++ b/init/calibrate.c
@@ -7,8 +7,7 @@
 #include <linux/jiffies.h>
 #include <linux/delay.h>
 #include <linux/init.h>
-
-#include <asm/timex.h>
+#include <linux/timex.h>
 
 unsigned long preset_lpj;
 static int __init lpj_setup(char *str)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to