Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
89650870
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
89650870
编写于
2月 27, 2010
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MIPS: i8259: Convert IRQ controller lock to raw spinlock.
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
598c5aba
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
16 deletion
+16
-16
arch/mips/include/asm/i8259.h
arch/mips/include/asm/i8259.h
+3
-3
arch/mips/kernel/i8259.c
arch/mips/kernel/i8259.c
+11
-11
arch/mips/loongson/lemote-2f/irq.c
arch/mips/loongson/lemote-2f/irq.c
+2
-2
未找到文件。
arch/mips/include/asm/i8259.h
浏览文件 @
89650870
...
...
@@ -35,7 +35,7 @@
#define SLAVE_ICW4_DEFAULT 0x01
#define PIC_ICW4_AEOI 2
extern
spinlock_t
i8259A_lock
;
extern
raw_
spinlock_t
i8259A_lock
;
extern
int
i8259A_irq_pending
(
unsigned
int
irq
);
extern
void
make_8259A_irq
(
unsigned
int
irq
);
...
...
@@ -51,7 +51,7 @@ static inline int i8259_irq(void)
{
int
irq
;
spin_lock
(
&
i8259A_lock
);
raw_
spin_lock
(
&
i8259A_lock
);
/* Perform an interrupt acknowledge cycle on controller 1. */
outb
(
0x0C
,
PIC_MASTER_CMD
);
/* prepare for poll */
...
...
@@ -78,7 +78,7 @@ static inline int i8259_irq(void)
irq
=
-
1
;
}
spin_unlock
(
&
i8259A_lock
);
raw_
spin_unlock
(
&
i8259A_lock
);
return
likely
(
irq
>=
0
)
?
irq
+
I8259A_IRQ_BASE
:
irq
;
}
...
...
arch/mips/kernel/i8259.c
浏览文件 @
89650870
...
...
@@ -29,7 +29,7 @@
*/
static
int
i8259A_auto_eoi
=
-
1
;
DEFINE_SPINLOCK
(
i8259A_lock
);
DEFINE_
RAW_
SPINLOCK
(
i8259A_lock
);
static
void
disable_8259A_irq
(
unsigned
int
irq
);
static
void
enable_8259A_irq
(
unsigned
int
irq
);
static
void
mask_and_ack_8259A
(
unsigned
int
irq
);
...
...
@@ -65,13 +65,13 @@ static void disable_8259A_irq(unsigned int irq)
irq
-=
I8259A_IRQ_BASE
;
mask
=
1
<<
irq
;
spin_lock_irqsave
(
&
i8259A_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
i8259A_lock
,
flags
);
cached_irq_mask
|=
mask
;
if
(
irq
&
8
)
outb
(
cached_slave_mask
,
PIC_SLAVE_IMR
);
else
outb
(
cached_master_mask
,
PIC_MASTER_IMR
);
spin_unlock_irqrestore
(
&
i8259A_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
i8259A_lock
,
flags
);
}
static
void
enable_8259A_irq
(
unsigned
int
irq
)
...
...
@@ -81,13 +81,13 @@ static void enable_8259A_irq(unsigned int irq)
irq
-=
I8259A_IRQ_BASE
;
mask
=
~
(
1
<<
irq
);
spin_lock_irqsave
(
&
i8259A_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
i8259A_lock
,
flags
);
cached_irq_mask
&=
mask
;
if
(
irq
&
8
)
outb
(
cached_slave_mask
,
PIC_SLAVE_IMR
);
else
outb
(
cached_master_mask
,
PIC_MASTER_IMR
);
spin_unlock_irqrestore
(
&
i8259A_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
i8259A_lock
,
flags
);
}
int
i8259A_irq_pending
(
unsigned
int
irq
)
...
...
@@ -98,12 +98,12 @@ int i8259A_irq_pending(unsigned int irq)
irq
-=
I8259A_IRQ_BASE
;
mask
=
1
<<
irq
;
spin_lock_irqsave
(
&
i8259A_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
i8259A_lock
,
flags
);
if
(
irq
<
8
)
ret
=
inb
(
PIC_MASTER_CMD
)
&
mask
;
else
ret
=
inb
(
PIC_SLAVE_CMD
)
&
(
mask
>>
8
);
spin_unlock_irqrestore
(
&
i8259A_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
i8259A_lock
,
flags
);
return
ret
;
}
...
...
@@ -151,7 +151,7 @@ static void mask_and_ack_8259A(unsigned int irq)
irq
-=
I8259A_IRQ_BASE
;
irqmask
=
1
<<
irq
;
spin_lock_irqsave
(
&
i8259A_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
i8259A_lock
,
flags
);
/*
* Lightweight spurious IRQ detection. We do not want
* to overdo spurious IRQ handling - it's usually a sign
...
...
@@ -183,7 +183,7 @@ static void mask_and_ack_8259A(unsigned int irq)
outb
(
0x60
+
irq
,
PIC_MASTER_CMD
);
/* 'Specific EOI to master */
}
smtc_im_ack_irq
(
irq
);
spin_unlock_irqrestore
(
&
i8259A_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
i8259A_lock
,
flags
);
return
;
spurious_8259A_irq:
...
...
@@ -264,7 +264,7 @@ static void init_8259A(int auto_eoi)
i8259A_auto_eoi
=
auto_eoi
;
spin_lock_irqsave
(
&
i8259A_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
i8259A_lock
,
flags
);
outb
(
0xff
,
PIC_MASTER_IMR
);
/* mask all of 8259A-1 */
outb
(
0xff
,
PIC_SLAVE_IMR
);
/* mask all of 8259A-2 */
...
...
@@ -298,7 +298,7 @@ static void init_8259A(int auto_eoi)
outb
(
cached_master_mask
,
PIC_MASTER_IMR
);
/* restore master IRQ mask */
outb
(
cached_slave_mask
,
PIC_SLAVE_IMR
);
/* restore slave IRQ mask */
spin_unlock_irqrestore
(
&
i8259A_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
i8259A_lock
,
flags
);
}
/*
...
...
arch/mips/loongson/lemote-2f/irq.c
浏览文件 @
89650870
...
...
@@ -38,7 +38,7 @@ int mach_i8259_irq(void)
irq
=
-
1
;
if
((
LOONGSON_INTISR
&
LOONGSON_INTEN
)
&
LOONGSON_INT_BIT_INT0
)
{
spin_lock
(
&
i8259A_lock
);
raw_
spin_lock
(
&
i8259A_lock
);
isr
=
inb
(
PIC_MASTER_CMD
)
&
~
inb
(
PIC_MASTER_IMR
)
&
~
(
1
<<
PIC_CASCADE_IR
);
if
(
!
isr
)
...
...
@@ -56,7 +56,7 @@ int mach_i8259_irq(void)
if
(
~
inb
(
PIC_MASTER_ISR
)
&
0x80
)
irq
=
-
1
;
}
spin_unlock
(
&
i8259A_lock
);
raw_
spin_unlock
(
&
i8259A_lock
);
}
return
irq
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录