diff options
author | John M. Calandrino <jmc@jupiter-cs.cs.unc.edu> | 2007-02-19 15:48:07 -0500 |
---|---|---|
committer | John M. Calandrino <jmc@jupiter-cs.cs.unc.edu> | 2007-02-19 15:48:07 -0500 |
commit | 0df772d53bf0242e14b22ae18a8c04e50388c22a (patch) | |
tree | 70b22beba202c1447ee60b8eca3b95f3383615f1 | |
parent | c79f0bd758458f9b69548ec42789c503ac7c1130 (diff) |
Fixed code according to Bjoern's suggestions.
Renamed function in timer.c, removed personal EXTRAVERSION from Makefile,
changed some other small things. Aligned and staggered quanta are now
working properly, Use quanta=staggered as a boot option to get staggered
quanta, and no boot option (or quanta=aligned) to get aligned quanta. In
most cases, quantum alignments are even more precise now than they were
previously (less than 5 microseconds versus 10-20 microseconds).
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | arch/i386/kernel/apic.c | 10 | ||||
-rw-r--r-- | kernel/timer.c | 3 |
3 files changed, 7 insertions, 8 deletions
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 20 | 3 | SUBLEVEL = 20 |
4 | EXTRAVERSION = -jmc | 4 | EXTRAVERSION = |
5 | NAME = Homicidal Dwarf Hamster | 5 | NAME = Homicidal Dwarf Hamster |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 31be749513..0a050f7e75 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -1256,7 +1256,8 @@ void synchronize_quanta(void) | |||
1256 | udelay(1); | 1256 | udelay(1); |
1257 | } | 1257 | } |
1258 | __setup_APIC_LVTT(calibration_result); | 1258 | __setup_APIC_LVTT(calibration_result); |
1259 | enable_APIC_timer(); | 1259 | if (!stagger) |
1260 | enable_APIC_timer(); | ||
1260 | 1261 | ||
1261 | /* | 1262 | /* |
1262 | * Add necessary stagger for this CPU, if required. Do _not_ | 1263 | * Add necessary stagger for this CPU, if required. Do _not_ |
@@ -1268,7 +1269,6 @@ void synchronize_quanta(void) | |||
1268 | */ | 1269 | */ |
1269 | if (stagger) { | 1270 | if (stagger) { |
1270 | int stagger_us = cpu * stagger_interval; | 1271 | int stagger_us = cpu * stagger_interval; |
1271 | disable_APIC_timer(); | ||
1272 | udelay(stagger_us); | 1272 | udelay(stagger_us); |
1273 | __setup_APIC_LVTT(calibration_result); | 1273 | __setup_APIC_LVTT(calibration_result); |
1274 | enable_APIC_timer(); | 1274 | enable_APIC_timer(); |
@@ -1279,8 +1279,8 @@ void synchronize_quanta(void) | |||
1279 | /* | 1279 | /* |
1280 | * FIXME: wraparound issue prevents periodic re-synch. | 1280 | * FIXME: wraparound issue prevents periodic re-synch. |
1281 | */ | 1281 | */ |
1282 | // atomic_add(msecs_to_jiffies(WAIT_TO_SYNC), &qsync_time); | 1282 | /* atomic_add(msecs_to_jiffies(WAIT_TO_SYNC), &qsync_time); */ |
1283 | // atomic_inc(&barrier_use_count); | 1283 | /* atomic_inc(&barrier_use_count); */ |
1284 | } | 1284 | } |
1285 | } | 1285 | } |
1286 | 1286 | ||
@@ -1306,7 +1306,7 @@ inline void smp_local_timer_interrupt(void) | |||
1306 | * This won't always work, but we just want enough samples | 1306 | * This won't always work, but we just want enough samples |
1307 | * to figure out what's going on. | 1307 | * to figure out what's going on. |
1308 | */ | 1308 | */ |
1309 | offset = public_get_nsec_offset(); | 1309 | offset = get_nsec_offset(); |
1310 | if (jiffies % 10 == 0 && time_after(jiffies, | 1310 | if (jiffies % 10 == 0 && time_after(jiffies, |
1311 | (unsigned long)(INITIAL_JIFFIES + msecs_to_jiffies(WAIT_TO_SYNC)))) | 1311 | (unsigned long)(INITIAL_JIFFIES + msecs_to_jiffies(WAIT_TO_SYNC)))) |
1312 | TRACE("%d, %d: %lld\n", smp_processor_id(), jiffies, offset); | 1312 | TRACE("%d, %d: %lld\n", smp_processor_id(), jiffies, offset); |
diff --git a/kernel/timer.c b/kernel/timer.c index 1d42f52cad..532fdde9ba 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -743,7 +743,7 @@ static inline s64 __get_nsec_offset(void) | |||
743 | * timestamp without locking. (We can't lock and are only reading, | 743 | * timestamp without locking. (We can't lock and are only reading, |
744 | * so it can only hurt us, not others.) | 744 | * so it can only hurt us, not others.) |
745 | */ | 745 | */ |
746 | s64 public_get_nsec_offset(void) | 746 | s64 get_nsec_offset(void) |
747 | { | 747 | { |
748 | cycle_t cycle_now, cycle_delta; | 748 | cycle_t cycle_now, cycle_delta; |
749 | s64 ns_offset; | 749 | s64 ns_offset; |
@@ -759,7 +759,6 @@ s64 public_get_nsec_offset(void) | |||
759 | 759 | ||
760 | return ns_offset; | 760 | return ns_offset; |
761 | } | 761 | } |
762 | EXPORT_SYMBOL(public_get_nsec_offset); | ||
763 | 762 | ||
764 | /** | 763 | /** |
765 | * __get_realtime_clock_ts - Returns the time of day in a timespec | 764 | * __get_realtime_clock_ts - Returns the time of day in a timespec |