Commit 3048a99e authored by David S. Miller's avatar David S. Miller

[SPARC64]: Ignore bit 63 of Hummingbird STICK when computing COMPARE register values.

parent c4f509d8
...@@ -342,14 +342,17 @@ static void __hbird_write_compare(unsigned long val) ...@@ -342,14 +342,17 @@ static void __hbird_write_compare(unsigned long val)
static void hbtick_init_tick(unsigned long offset) static void hbtick_init_tick(unsigned long offset)
{ {
unsigned long val;
tick_disable_protection(); tick_disable_protection();
__hbird_write_compare(__hbird_read_stick() + offset); val = __hbird_read_stick() & ~(1UL << 63);
__hbird_write_compare(val + offset);
} }
static unsigned long hbtick_get_tick(void) static unsigned long hbtick_get_tick(void)
{ {
return __hbird_read_stick(); return __hbird_read_stick() & ~(1UL << 63);
} }
static unsigned long hbtick_get_compare(void) static unsigned long hbtick_get_compare(void)
...@@ -363,6 +366,8 @@ static unsigned long hbtick_add_tick(unsigned long adj, unsigned long offset) ...@@ -363,6 +366,8 @@ static unsigned long hbtick_add_tick(unsigned long adj, unsigned long offset)
val = __hbird_read_stick() + adj; val = __hbird_read_stick() + adj;
__hbird_write_stick(val); __hbird_write_stick(val);
val &= ~(1UL << 63);
__hbird_write_compare(val + offset); __hbird_write_compare(val + offset);
return val; return val;
...@@ -372,6 +377,7 @@ static unsigned long hbtick_add_compare(unsigned long adj) ...@@ -372,6 +377,7 @@ static unsigned long hbtick_add_compare(unsigned long adj)
{ {
unsigned long val = __hbird_read_compare() + adj; unsigned long val = __hbird_read_compare() + adj;
val &= ~(1UL << 63);
__hbird_write_compare(val); __hbird_write_compare(val);
return val; return val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment