Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6dc0d7f6
Commit
6dc0d7f6
authored
May 14, 2003
by
David Mosberger
Committed by
David Mosberger
May 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: Fix more merge errors. Correct SN2 callbacks to also invoke the generic ia64
callbacks so last_nsec_offset gets updated, too.
parent
3efebf18
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
9 deletions
+40
-9
arch/ia64/kernel/time.c
arch/ia64/kernel/time.c
+35
-8
arch/ia64/sn/kernel/sn2/timer.c
arch/ia64/sn/kernel/sn2/timer.c
+3
-1
include/asm-ia64/timex.h
include/asm-ia64/timex.h
+2
-0
No files found.
arch/ia64/kernel/time.c
View file @
6dc0d7f6
...
...
@@ -26,10 +26,10 @@
#include <asm/system.h>
extern
unsigned
long
wall_jiffies
;
extern
unsigned
long
last_nsec_offset
;
static
unsigned
long
__
ia64_gettimeoffset
(
void
);
unsigned
long
last_nsec_offset
;
static
unsigned
long
ia64_gettimeoffset
(
void
);
unsigned
long
(
*
gettimeoffset
)(
void
)
=
&
__
ia64_gettimeoffset
;
unsigned
long
(
*
gettimeoffset
)(
void
)
=
&
ia64_gettimeoffset
;
u64
jiffies_64
=
INITIAL_JIFFIES
;
...
...
@@ -65,12 +65,38 @@ do_profile (unsigned long ip)
atomic_inc
((
atomic_t
*
)
&
prof_buffer
[
ip
]);
}
void
ia64_reset_wall_time
(
void
)
{
last_nsec_offset
=
0
;
}
/*
* Adjust for the fact that xtime has been advanced by delta_nsec (may be negative and/or
* larger than NSEC_PER_SEC.
*/
void
ia64_update_wall_time
(
long
delta_nsec
)
{
if
(
last_nsec_offset
>
0
)
{
unsigned
long
new
,
old
;
do
{
old
=
last_nsec_offset
;
if
(
old
>
delta_nsec
)
new
=
old
-
delta_nsec
;
else
new
=
0
;
}
while
(
cmpxchg
(
&
last_nsec_offset
,
old
,
new
)
!=
old
);
}
}
/*
* Return the number of nano-seconds that elapsed since the last update to jiffy. The
* xtime_lock must be at least read-locked when calling this routine.
*/
static
unsigned
long
__
ia64_gettimeoffset
(
void
)
unsigned
long
ia64_gettimeoffset
(
void
)
{
unsigned
long
elapsed_cycles
,
lost
=
jiffies
-
wall_jiffies
;
unsigned
long
now
,
last_tick
;
...
...
@@ -129,9 +155,7 @@ do_settimeofday (struct timeval *tv)
time_status
|=
STA_UNSYNC
;
time_maxerror
=
NTP_PHASE_LIMIT
;
time_esterror
=
NTP_PHASE_LIMIT
;
if
(
update_wall_time_hook
)
(
*
reset_wall_time_hook
)();
(
*
reset_wall_time_hook
)();
}
write_sequnlock_irq
(
&
xtime_lock
);
clock_was_set
();
...
...
@@ -345,6 +369,9 @@ static struct irqaction timer_irqaction = {
void
__init
time_init
(
void
)
{
update_wall_time_hook
=
ia64_update_wall_time
;
reset_wall_time_hook
=
ia64_reset_wall_time
;
register_percpu_irq
(
IA64_TIMER_VECTOR
,
&
timer_irqaction
);
efi_gettimeofday
(
&
xtime
);
ia64_init_itm
();
...
...
arch/ia64/sn/kernel/sn2/timer.c
View file @
6dc0d7f6
...
...
@@ -58,8 +58,9 @@ sn_gettimeoffset(void)
}
void
sn2_update_wall_time
(
void
)
void
sn2_update_wall_time
(
long
delta_nsec
)
{
ia64_update_wall_time
(
delta_nsec
);
rtc_offset
-=
min
(
rtc_offset
,
rtc_per_timer_tick
);
last_wall_rtc
=
GET_RTC_COUNTER
();
}
...
...
@@ -67,6 +68,7 @@ void sn2_update_wall_time(void)
void
sn2_reset_wall_time
(
void
)
{
ia64_reset_wall_time
();
rtc_offset
=
0
;
last_wall_rtc
=
GET_RTC_COUNTER
();
}
...
...
include/asm-ia64/timex.h
View file @
6dc0d7f6
...
...
@@ -26,5 +26,7 @@ get_cycles (void)
}
extern
unsigned
long
(
*
gettimeoffset
)(
void
);
extern
void
ia64_reset_wall_time
(
void
);
extern
void
ia64_update_wall_time
(
long
delta_nsec
);
#endif
/* _ASM_IA64_TIMEX_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment