Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
f5ff0a28
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f5ff0a28
编写于
8月 13, 2007
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MIPS] Use generic NTP code for all MIPS platforms
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
4680576e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
38 deletion
+8
-38
arch/mips/Kconfig
arch/mips/Kconfig
+4
-0
arch/mips/kernel/time.c
arch/mips/kernel/time.c
+4
-20
arch/mips/sgi-ip27/ip27-timer.c
arch/mips/sgi-ip27/ip27-timer.c
+0
-18
未找到文件。
arch/mips/Kconfig
浏览文件 @
f5ff0a28
...
...
@@ -670,6 +670,10 @@ config GENERIC_TIME
bool
default y
config GENERIC_CMOS_UPDATE
bool
default y
config SCHED_NO_NO_OMIT_FRAME_POINTER
bool
default y
...
...
arch/mips/kernel/time.c
浏览文件 @
f5ff0a28
...
...
@@ -67,6 +67,10 @@ unsigned long (*rtc_mips_get_time)(void) = null_rtc_get_time;
int
(
*
rtc_mips_set_time
)(
unsigned
long
)
=
null_rtc_set_time
;
int
(
*
rtc_mips_set_mmss
)(
unsigned
long
);
int
update_persistent_clock
(
struct
timespec
now
)
{
return
rtc_mips_set_mmss
(
now
.
tv_sec
);
}
/* how many counter cycles in a jiffy */
static
unsigned
long
cycles_per_jiffy
__read_mostly
;
...
...
@@ -125,9 +129,6 @@ static void __init c0_hpt_timer_init(void)
int
(
*
mips_timer_state
)(
void
);
void
(
*
mips_timer_ack
)(
void
);
/* last time when xtime and rtc are sync'ed up */
static
long
last_rtc_update
;
/*
* local_timer_interrupt() does profiling and process accounting
* on a per-CPU basis.
...
...
@@ -159,23 +160,6 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
*/
do_timer
(
1
);
/*
* If we have an externally synchronized Linux clock, then update
* CMOS clock accordingly every ~11 minutes. rtc_mips_set_time() has to be
* called as close as possible to 500 ms before the new second starts.
*/
if
(
ntp_synced
()
&&
xtime
.
tv_sec
>
last_rtc_update
+
660
&&
(
xtime
.
tv_nsec
/
1000
)
>=
500000
-
((
unsigned
)
TICK_SIZE
)
/
2
&&
(
xtime
.
tv_nsec
/
1000
)
<=
500000
+
((
unsigned
)
TICK_SIZE
)
/
2
)
{
if
(
rtc_mips_set_mmss
(
xtime
.
tv_sec
)
==
0
)
{
last_rtc_update
=
xtime
.
tv_sec
;
}
else
{
/* do it again in 60 s */
last_rtc_update
=
xtime
.
tv_sec
-
600
;
}
}
write_sequnlock
(
&
xtime_lock
);
/*
...
...
arch/mips/sgi-ip27/ip27-timer.c
浏览文件 @
f5ff0a28
...
...
@@ -40,7 +40,6 @@
#define TICK_SIZE (tick_nsec / 1000)
static
unsigned
long
ct_cur
[
NR_CPUS
];
/* What counter should be at next timer irq */
static
long
last_rtc_update
;
/* Last time the rtc clock got updated */
#if 0
static int set_rtc_mmss(unsigned long nowtime)
...
...
@@ -113,23 +112,6 @@ void ip27_rt_timer_interrupt(void)
update_process_times
(
user_mode
(
get_irq_regs
()));
/*
* If we have an externally synchronized Linux clock, then update
* RTC clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
* called as close as possible to when a second starts.
*/
if
(
ntp_synced
()
&&
xtime
.
tv_sec
>
last_rtc_update
+
660
&&
(
xtime
.
tv_nsec
/
1000
)
>=
500000
-
((
unsigned
)
TICK_SIZE
)
/
2
&&
(
xtime
.
tv_nsec
/
1000
)
<=
500000
+
((
unsigned
)
TICK_SIZE
)
/
2
)
{
if
(
rtc_mips_set_time
(
xtime
.
tv_sec
)
==
0
)
{
last_rtc_update
=
xtime
.
tv_sec
;
}
else
{
last_rtc_update
=
xtime
.
tv_sec
-
600
;
/* do it again in 60 s */
}
}
write_sequnlock
(
&
xtime_lock
);
irq_exit
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录