diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-02-28 14:46:05 -0500 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2012-03-15 21:17:59 -0400 |
commit | 74a622be3db2898251cb524d1edbeaea589f2723 (patch) | |
tree | d54a6960bedd0176d7ff1f7dc3092df42d1917bd /arch/ia64 | |
parent | 2ab516575f2f273b19d95140d02c54612201e80a (diff) |
ia64: vsyscall: Use seqcount instead of seqlock
The update of the vdso data happens under xtime_lock, so adding a
nested lock is pointless. Just use a seqcount to sync the readers.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/kernel/asm-offsets.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/fsys.S | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/fsyscall_gtod_data.h | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/time.c | 10 |
4 files changed, 7 insertions, 11 deletions
diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c index af5650169043..106aeb670e54 100644 --- a/arch/ia64/kernel/asm-offsets.c +++ b/arch/ia64/kernel/asm-offsets.c | |||
@@ -269,8 +269,8 @@ void foo(void) | |||
269 | BLANK(); | 269 | BLANK(); |
270 | 270 | ||
271 | /* used by fsys_gettimeofday in arch/ia64/kernel/fsys.S */ | 271 | /* used by fsys_gettimeofday in arch/ia64/kernel/fsys.S */ |
272 | DEFINE(IA64_GTOD_LOCK_OFFSET, | 272 | DEFINE(IA64_GTOD_SEQ_OFFSET, |
273 | offsetof (struct fsyscall_gtod_data_t, lock)); | 273 | offsetof (struct fsyscall_gtod_data_t, seq); |
274 | DEFINE(IA64_GTOD_WALL_TIME_OFFSET, | 274 | DEFINE(IA64_GTOD_WALL_TIME_OFFSET, |
275 | offsetof (struct fsyscall_gtod_data_t, wall_time)); | 275 | offsetof (struct fsyscall_gtod_data_t, wall_time)); |
276 | DEFINE(IA64_GTOD_MONO_TIME_OFFSET, | 276 | DEFINE(IA64_GTOD_MONO_TIME_OFFSET, |
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S index 331d42bda77a..fa77de7032b3 100644 --- a/arch/ia64/kernel/fsys.S +++ b/arch/ia64/kernel/fsys.S | |||
@@ -174,7 +174,7 @@ ENTRY(fsys_set_tid_address) | |||
174 | FSYS_RETURN | 174 | FSYS_RETURN |
175 | END(fsys_set_tid_address) | 175 | END(fsys_set_tid_address) |
176 | 176 | ||
177 | #if IA64_GTOD_LOCK_OFFSET !=0 | 177 | #if IA64_GTOD_SEQ_OFFSET !=0 |
178 | #error fsys_gettimeofday incompatible with changes to struct fsyscall_gtod_data_t | 178 | #error fsys_gettimeofday incompatible with changes to struct fsyscall_gtod_data_t |
179 | #endif | 179 | #endif |
180 | #if IA64_ITC_JITTER_OFFSET !=0 | 180 | #if IA64_ITC_JITTER_OFFSET !=0 |
diff --git a/arch/ia64/kernel/fsyscall_gtod_data.h b/arch/ia64/kernel/fsyscall_gtod_data.h index 57d2ee6c83e1..146b15b5fec3 100644 --- a/arch/ia64/kernel/fsyscall_gtod_data.h +++ b/arch/ia64/kernel/fsyscall_gtod_data.h | |||
@@ -6,7 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | struct fsyscall_gtod_data_t { | 8 | struct fsyscall_gtod_data_t { |
9 | seqlock_t lock; | 9 | seqcount_t seq; |
10 | struct timespec wall_time; | 10 | struct timespec wall_time; |
11 | struct timespec monotonic_time; | 11 | struct timespec monotonic_time; |
12 | cycle_t clk_mask; | 12 | cycle_t clk_mask; |
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 43920de425f1..8e991a0b5e35 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -35,9 +35,7 @@ | |||
35 | 35 | ||
36 | static cycle_t itc_get_cycles(struct clocksource *cs); | 36 | static cycle_t itc_get_cycles(struct clocksource *cs); |
37 | 37 | ||
38 | struct fsyscall_gtod_data_t fsyscall_gtod_data = { | 38 | struct fsyscall_gtod_data_t fsyscall_gtod_data; |
39 | .lock = __SEQLOCK_UNLOCKED(fsyscall_gtod_data.lock), | ||
40 | }; | ||
41 | 39 | ||
42 | struct itc_jitter_data_t itc_jitter_data; | 40 | struct itc_jitter_data_t itc_jitter_data; |
43 | 41 | ||
@@ -460,9 +458,7 @@ void update_vsyscall_tz(void) | |||
460 | void update_vsyscall(struct timespec *wall, struct timespec *wtm, | 458 | void update_vsyscall(struct timespec *wall, struct timespec *wtm, |
461 | struct clocksource *c, u32 mult) | 459 | struct clocksource *c, u32 mult) |
462 | { | 460 | { |
463 | unsigned long flags; | 461 | write_seqcount_begin(&fsyscall_gtod_data.seq); |
464 | |||
465 | write_seqlock_irqsave(&fsyscall_gtod_data.lock, flags); | ||
466 | 462 | ||
467 | /* copy fsyscall clock data */ | 463 | /* copy fsyscall clock data */ |
468 | fsyscall_gtod_data.clk_mask = c->mask; | 464 | fsyscall_gtod_data.clk_mask = c->mask; |
@@ -485,6 +481,6 @@ void update_vsyscall(struct timespec *wall, struct timespec *wtm, | |||
485 | fsyscall_gtod_data.monotonic_time.tv_sec++; | 481 | fsyscall_gtod_data.monotonic_time.tv_sec++; |
486 | } | 482 | } |
487 | 483 | ||
488 | write_sequnlock_irqrestore(&fsyscall_gtod_data.lock, flags); | 484 | write_seqcount_end(&fsyscall_gtod_data.seq); |
489 | } | 485 | } |
490 | 486 | ||