Commit:     5809f9d442e9dbb23859e2c37d8c47043f6b5cc9
Parent:     26054ed02bb20f5b2e02d92cb6f0be0e2b0196d5
Author:     Eric Dumazet <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 13 13:26:21 2007 +0100
Committer:  Andi Kleen <[EMAIL PROTECTED]>
CommitDate: Tue Feb 13 13:26:21 2007 +0100

    [PATCH] x86-64: get rid of ARCH_HAVE_XTIME_LOCK
    ARCH_HAVE_XTIME_LOCK is used by x86_64 arch .  This arch needs to place a
    read only copy of xtime_lock into vsyscall page.  This read only copy is
    named __xtime_lock, and xtime_lock is defined in
    arch/x86_64/kernel/ as an alias.  So the declaration of
    xtime_lock in kernel/timer.c was guarded by ARCH_HAVE_XTIME_LOCK define,
    defined to true on x86_64.
    We can get same result with _attribute__((weak)) in the declaration. linker
    should do the job.
    Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]>
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Cc: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
 include/asm-x86_64/vsyscall.h |    5 -----
 include/linux/time.h          |    2 +-
 kernel/timer.c                |    4 +---
 3 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h
index 05cb8dd..0c78471 100644
--- a/include/asm-x86_64/vsyscall.h
+++ b/include/asm-x86_64/vsyscall.h
@@ -56,11 +56,6 @@ extern struct vxtime_data vxtime;
 extern int vgetcpu_mode;
 extern struct timezone sys_tz;
 extern int sysctl_vsyscall;
-extern seqlock_t xtime_lock;
-extern int sysctl_vsyscall;
 #endif /* __KERNEL__ */
diff --git a/include/linux/time.h b/include/linux/time.h
index 55cee17..eceb1a5 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -90,7 +90,7 @@ static inline struct timespec timespec_sub(struct timespec 
 extern struct timespec xtime;
 extern struct timespec wall_to_monotonic;
-extern seqlock_t xtime_lock;
+extern seqlock_t xtime_lock __attribute__((weak));
 void timekeeping_init(void);
diff --git a/kernel/timer.c b/kernel/timer.c
index 8533c37..4902181 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1162,11 +1162,9 @@ static inline void calc_load(unsigned long ticks)
  * This read-write spinlock protects us from races in SMP while
  * playing with xtime and avenrun.
-__cacheline_aligned_in_smp DEFINE_SEQLOCK(xtime_lock);
+__attribute__((weak)) __cacheline_aligned_in_smp DEFINE_SEQLOCK(xtime_lock);
  * This function runs timers and the timer-tq in bottom half context.
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

Reply via email to