aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2006-06-26 03:25:15 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:21 -0400
commit7f9f303aa33c7acc7b4aa9ebea25cbd990bc707b (patch)
treeb5916e6b018356afdb5c8687e554a049532633bd /arch/i386
parent7d622d4794490cef933c20e4a6279e43e03fafad (diff)
[PATCH] generic-time: add macro to simplify/hide mask constants
Add a CLOCKSOURCE_MASK macro to simplify initializing the mask for a struct clocksource, and use it to replace literal mask constants in the various clocksource drivers. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Acked-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/hpet.c4
-rw-r--r--arch/i386/kernel/i8253.c2
-rw-r--r--arch/i386/kernel/tsc.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
index 23e7d2c5d253..c6737c35815d 100644
--- a/arch/i386/kernel/hpet.c
+++ b/arch/i386/kernel/hpet.c
@@ -6,7 +6,7 @@
6#include <asm/hpet.h> 6#include <asm/hpet.h>
7#include <asm/io.h> 7#include <asm/io.h>
8 8
9#define HPET_MASK 0xFFFFFFFF 9#define HPET_MASK CLOCKSOURCE_MASK(32)
10#define HPET_SHIFT 22 10#define HPET_SHIFT 22
11 11
12/* FSEC = 10^-15 NSEC = 10^-9 */ 12/* FSEC = 10^-15 NSEC = 10^-9 */
@@ -23,7 +23,7 @@ static struct clocksource clocksource_hpet = {
23 .name = "hpet", 23 .name = "hpet",
24 .rating = 250, 24 .rating = 250,
25 .read = read_hpet, 25 .read = read_hpet,
26 .mask = (cycle_t)HPET_MASK, 26 .mask = HPET_MASK,
27 .mult = 0, /* set below */ 27 .mult = 0, /* set below */
28 .shift = HPET_SHIFT, 28 .shift = HPET_SHIFT,
29 .is_continuous = 1, 29 .is_continuous = 1,
diff --git a/arch/i386/kernel/i8253.c b/arch/i386/kernel/i8253.c
index 5b13739a7ff4..38aa7f19f1d3 100644
--- a/arch/i386/kernel/i8253.c
+++ b/arch/i386/kernel/i8253.c
@@ -69,7 +69,7 @@ static struct clocksource clocksource_pit = {
69 .name = "pit", 69 .name = "pit",
70 .rating = 110, 70 .rating = 110,
71 .read = pit_read, 71 .read = pit_read,
72 .mask = (cycle_t)-1, 72 .mask = CLOCKSOURCE_MASK(64),
73 .mult = 0, 73 .mult = 0,
74 .shift = 20, 74 .shift = 20,
75}; 75};
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index 1c3c927755de..7e0d8dab2075 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -337,7 +337,7 @@ static struct clocksource clocksource_tsc = {
337 .name = "tsc", 337 .name = "tsc",
338 .rating = 300, 338 .rating = 300,
339 .read = read_tsc, 339 .read = read_tsc,
340 .mask = (cycle_t)-1, 340 .mask = CLOCKSOURCE_MASK(64),
341 .mult = 0, /* to be set */ 341 .mult = 0, /* to be set */
342 .shift = 22, 342 .shift = 22,
343 .update_callback = tsc_update_callback, 343 .update_callback = tsc_update_callback,