Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8db02010
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8db02010
编写于
10月 02, 2006
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MIPS] Fix wreckage after removal of tickadj; convert to GENERIC_TIME.
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
3f821640
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
4 addition
and
76 deletion
+4
-76
arch/mips/Kconfig
arch/mips/Kconfig
+4
-0
arch/mips/dec/time.c
arch/mips/dec/time.c
+0
-2
arch/mips/kernel/time.c
arch/mips/kernel/time.c
+0
-74
未找到文件。
arch/mips/Kconfig
浏览文件 @
8db02010
...
...
@@ -803,6 +803,10 @@ config GENERIC_CALIBRATE_DELAY
bool
default y
config GENERIC_TIME
bool
default y
config SCHED_NO_NO_OMIT_FRAME_POINTER
bool
default y
...
...
arch/mips/dec/time.c
浏览文件 @
8db02010
...
...
@@ -184,8 +184,6 @@ void __init dec_time_init(void)
CMOS_WRITE
(
RTC_REF_CLCK_32KHZ
|
(
16
-
__ffs
(
HZ
)),
RTC_REG_A
);
}
EXPORT_SYMBOL
(
do_settimeofday
);
void
__init
plat_timer_setup
(
struct
irqaction
*
irq
)
{
setup_irq
(
dec_interrupt
[
DEC_IRQ_RTC
],
irq
);
...
...
arch/mips/kernel/time.c
浏览文件 @
8db02010
...
...
@@ -149,80 +149,6 @@ void (*mips_timer_ack)(void);
unsigned
int
(
*
mips_hpt_read
)(
void
);
void
(
*
mips_hpt_init
)(
unsigned
int
);
/*
* This version of gettimeofday has microsecond resolution and better than
* microsecond precision on fast machines with cycle counter.
*/
void
do_gettimeofday
(
struct
timeval
*
tv
)
{
unsigned
long
seq
;
unsigned
long
usec
,
sec
;
unsigned
long
max_ntp_tick
;
do
{
seq
=
read_seqbegin
(
&
xtime_lock
);
usec
=
do_gettimeoffset
();
/*
* If time_adjust is negative then NTP is slowing the clock
* so make sure not to go into next possible interval.
* Better to lose some accuracy than have time go backwards..
*/
if
(
unlikely
(
time_adjust
<
0
))
{
max_ntp_tick
=
(
USEC_PER_SEC
/
HZ
)
-
tickadj
;
usec
=
min
(
usec
,
max_ntp_tick
);
}
sec
=
xtime
.
tv_sec
;
usec
+=
(
xtime
.
tv_nsec
/
1000
);
}
while
(
read_seqretry
(
&
xtime_lock
,
seq
));
while
(
usec
>=
1000000
)
{
usec
-=
1000000
;
sec
++
;
}
tv
->
tv_sec
=
sec
;
tv
->
tv_usec
=
usec
;
}
EXPORT_SYMBOL
(
do_gettimeofday
);
int
do_settimeofday
(
struct
timespec
*
tv
)
{
time_t
wtm_sec
,
sec
=
tv
->
tv_sec
;
long
wtm_nsec
,
nsec
=
tv
->
tv_nsec
;
if
((
unsigned
long
)
tv
->
tv_nsec
>=
NSEC_PER_SEC
)
return
-
EINVAL
;
write_seqlock_irq
(
&
xtime_lock
);
/*
* This is revolting. We need to set "xtime" correctly. However,
* the value in this location is the value at the most recent update
* of wall time. Discover what correction gettimeofday() would have
* made, and then undo it!
*/
nsec
-=
do_gettimeoffset
()
*
NSEC_PER_USEC
;
wtm_sec
=
wall_to_monotonic
.
tv_sec
+
(
xtime
.
tv_sec
-
sec
);
wtm_nsec
=
wall_to_monotonic
.
tv_nsec
+
(
xtime
.
tv_nsec
-
nsec
);
set_normalized_timespec
(
&
xtime
,
sec
,
nsec
);
set_normalized_timespec
(
&
wall_to_monotonic
,
wtm_sec
,
wtm_nsec
);
ntp_clear
();
write_sequnlock_irq
(
&
xtime_lock
);
clock_was_set
();
return
0
;
}
EXPORT_SYMBOL
(
do_settimeofday
);
/*
* Gettimeoffset routines. These routines returns the time duration
* since last timer interrupt in usecs.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录