Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
97d61b8e
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
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看板
提交
97d61b8e
编写于
1月 08, 2009
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bkl-removal' of
git://git.lwn.net/linux-2.6
* 'bkl-removal' of
git://git.lwn.net/linux-2.6
: RTC: Remove the BKL.
上级
1df2d017
048cd588
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
13 deletion
+4
-13
drivers/char/rtc.c
drivers/char/rtc.c
+4
-13
未找到文件。
drivers/char/rtc.c
浏览文件 @
97d61b8e
...
...
@@ -48,9 +48,10 @@
* CONFIG_HPET_EMULATE_RTC
* 1.12a Maciej W. Rozycki: Handle memory-mapped chips properly.
* 1.12ac Alan Cox: Allow read access to the day of week register
* 1.12b David John: Remove calls to the BKL.
*/
#define RTC_VERSION "1.12
ac
"
#define RTC_VERSION "1.12
b
"
/*
* Note that *all* calls to CMOS_READ and CMOS_WRITE are done with
...
...
@@ -73,7 +74,6 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/spinlock.h>
#include <linux/smp_lock.h>
#include <linux/sysctl.h>
#include <linux/wait.h>
#include <linux/bcd.h>
...
...
@@ -182,8 +182,8 @@ static int rtc_proc_open(struct inode *inode, struct file *file);
/*
* rtc_status is never changed by rtc_interrupt, and ioctl/open/close is
* protected by the
big kernel lock. However, ioctl can still disable the timer
* in rtc_status and then with del_timer after the interrupt has read
* protected by the
spin lock rtc_lock. However, ioctl can still disable the
*
timer
in rtc_status and then with del_timer after the interrupt has read
* rtc_status but before mod_timer is called, which would then reenable the
* timer (but you would need to have an awful timing before you'd trip on it)
*/
...
...
@@ -720,9 +720,7 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel)
static
long
rtc_ioctl
(
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
long
ret
;
lock_kernel
();
ret
=
rtc_do_ioctl
(
cmd
,
arg
,
0
);
unlock_kernel
();
return
ret
;
}
...
...
@@ -731,12 +729,8 @@ static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
* Also clear the previous interrupt data on an open, and clean
* up things on a close.
*/
/* We use rtc_lock to protect against concurrent opens. So the BKL is not
* needed here. Or anywhere else in this driver. */
static
int
rtc_open
(
struct
inode
*
inode
,
struct
file
*
file
)
{
lock_kernel
();
spin_lock_irq
(
&
rtc_lock
);
if
(
rtc_status
&
RTC_IS_OPEN
)
...
...
@@ -746,12 +740,10 @@ static int rtc_open(struct inode *inode, struct file *file)
rtc_irq_data
=
0
;
spin_unlock_irq
(
&
rtc_lock
);
unlock_kernel
();
return
0
;
out_busy:
spin_unlock_irq
(
&
rtc_lock
);
unlock_kernel
();
return
-
EBUSY
;
}
...
...
@@ -800,7 +792,6 @@ static int rtc_release(struct inode *inode, struct file *file)
}
#ifdef RTC_IRQ
/* Called without the kernel lock - fine */
static
unsigned
int
rtc_poll
(
struct
file
*
file
,
poll_table
*
wait
)
{
unsigned
long
l
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录