lkml.org 
[lkml]   [2007]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 18/23] clocksource: i386 update for new flags
Update i386 for new flags.

Signed-Off-By: Daniel Walker <dwalker@mvista.com>

---
arch/i386/kernel/hpet.c | 1 -
arch/i386/kernel/i8253.c | 1 +
arch/i386/kernel/tsc.c | 23 +++++++++++------------
arch/i386/kernel/vmitime.c | 2 +-
4 files changed, 13 insertions(+), 14 deletions(-)

Index: linux-2.6.19/arch/i386/kernel/hpet.c
===================================================================
--- linux-2.6.19.orig/arch/i386/kernel/hpet.c
+++ linux-2.6.19/arch/i386/kernel/hpet.c
@@ -287,7 +287,6 @@ static struct clocksource clocksource_hp
.read = read_hpet,
.mask = HPET_MASK,
.shift = HPET_SHIFT,
- .flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

static int __init init_hpet_clocksource(void)
Index: linux-2.6.19/arch/i386/kernel/i8253.c
===================================================================
--- linux-2.6.19.orig/arch/i386/kernel/i8253.c
+++ linux-2.6.19/arch/i386/kernel/i8253.c
@@ -183,6 +183,7 @@ static struct clocksource clocksource_pi
.rating = 110,
.read = pit_read,
.mask = CLOCKSOURCE_MASK(32),
+ .flags = CLOCKSOURCE_NOT_ATOMIC,
.mult = 0,
.shift = 20,
};
Index: linux-2.6.19/arch/i386/kernel/tsc.c
===================================================================
--- linux-2.6.19.orig/arch/i386/kernel/tsc.c
+++ linux-2.6.19/arch/i386/kernel/tsc.c
@@ -306,8 +306,7 @@ static struct clocksource clocksource_ts
.mask = CLOCKSOURCE_MASK(64),
.mult = 0, /* to be set */
.shift = 22,
- .flags = CLOCK_SOURCE_IS_CONTINUOUS |
- CLOCK_SOURCE_MUST_VERIFY,
+ .flags = CLOCKSOURCE_64BITS | CLOCKSOURCE_PM_AFFECTED,
};

/*
@@ -316,10 +315,8 @@ static struct clocksource clocksource_ts
void mark_tsc_unstable(void)
{
/* check to see if we should switch to the safe clocksource: */
- if (unlikely(!tsc_unstable && clocksource_tsc.rating != 0)) {
- clocksource_tsc.rating = 0;
- clocksource_rating_change(&clocksource_tsc);
- }
+ if (unlikely(!tsc_unstable))
+ clocksource_mark_unstable(&clocksource_tsc);

tsc_unstable = 1;
}
@@ -434,17 +431,19 @@ static int __init init_tsc_clocksource(v
/* check blacklist */
dmi_check_system(bad_tsc_dmi_table);

- if (unsynchronized_tsc()) /* mark unstable if unsynced */
+ if (unsynchronized_tsc()) { /* mark unstable if unsynced */
mark_tsc_unstable();
+ clocksource_tsc.flags |= CLOCKSOURCE_UNSTABLE;
+ }
check_geode_tsc_reliable();
current_tsc_khz = tsc_khz;
clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz,
clocksource_tsc.shift);
- /* lower the rating if we already know its unstable: */
- if (check_tsc_unstable()) {
- clocksource_tsc.rating = 0;
- clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS;
- }
+
+ /* flags as unstable if we already know its unstable: */
+ if (check_tsc_unstable())
+ clocksource_tsc.flags |= CLOCKSOURCE_UNSTABLE |
+ CLOCKSOURCE_NOT_CONTINUOUS;

init_timer(&verify_tsc_freq_timer);
verify_tsc_freq_timer.function = verify_tsc_freq;
Index: linux-2.6.19/arch/i386/kernel/vmitime.c
===================================================================
--- linux-2.6.19.orig/arch/i386/kernel/vmitime.c
+++ linux-2.6.19/arch/i386/kernel/vmitime.c
@@ -115,7 +115,7 @@ static struct clocksource clocksource_vm
.mask = CLOCKSOURCE_MASK(64),
.mult = 0, /* to be set */
.shift = 22,
- .flags = CLOCK_SOURCE_IS_CONTINUOUS,
+ .flags = CLOCKSOURCE_64BITS,
};


--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-31 04:45    [W:0.231 / U:0.456 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site