Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
bd062e76
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
bd062e76
编写于
2月 07, 2011
作者:
T
Thomas Gleixner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
genirq: Move IRQ_AUTODETECT to internal state
No users outside of core Signed-off-by:
N
Thomas Gleixner
<
tglx@linutronix.de
>
上级
e6bea9c4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
21 deletion
+27
-21
include/linux/irq.h
include/linux/irq.h
+0
-1
kernel/irq/autoprobe.c
kernel/irq/autoprobe.c
+12
-17
kernel/irq/internals.h
kernel/irq/internals.h
+13
-2
kernel/irq/manage.c
kernel/irq/manage.c
+2
-1
未找到文件。
include/linux/irq.h
浏览文件 @
bd062e76
...
...
@@ -54,7 +54,6 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
#define IRQ_DISABLED 0x00000200
/* IRQ disabled - do not enter! */
#define IRQ_PENDING 0x00000400
/* IRQ pending - replay on enable */
#define IRQ_REPLAY 0x00000800
/* IRQ has been replayed but not acked yet */
#define IRQ_AUTODETECT 0x00001000
/* IRQ is being autodetected */
#define IRQ_WAITING 0x00002000
/* IRQ not yet seen - for autodetection */
#define IRQ_LEVEL 0x00004000
/* IRQ level triggered */
#define IRQ_MASKED 0x00008000
/* IRQ masked - shouldn't be seen again */
...
...
kernel/irq/autoprobe.c
浏览文件 @
bd062e76
...
...
@@ -32,7 +32,6 @@ unsigned long probe_irq_on(void)
{
struct
irq_desc
*
desc
;
unsigned
long
mask
=
0
;
unsigned
int
status
;
int
i
;
/*
...
...
@@ -76,7 +75,8 @@ unsigned long probe_irq_on(void)
for_each_irq_desc_reverse
(
i
,
desc
)
{
raw_spin_lock_irq
(
&
desc
->
lock
);
if
(
!
desc
->
action
&&
!
(
desc
->
status
&
IRQ_NOPROBE
))
{
desc
->
status
|=
IRQ_AUTODETECT
|
IRQ_WAITING
;
desc
->
istate
|=
IRQS_AUTODETECT
;
desc
->
status
|=
IRQ_WAITING
;
if
(
irq_startup
(
desc
))
desc
->
status
|=
IRQ_PENDING
;
}
...
...
@@ -93,12 +93,11 @@ unsigned long probe_irq_on(void)
*/
for_each_irq_desc
(
i
,
desc
)
{
raw_spin_lock_irq
(
&
desc
->
lock
);
status
=
desc
->
status
;
if
(
status
&
IRQ
_AUTODETECT
)
{
if
(
desc
->
istate
&
IRQS
_AUTODETECT
)
{
/* It triggered already - consider it spurious. */
if
(
!
(
status
&
IRQ_WAITING
))
{
desc
->
status
=
status
&
~
IRQ
_AUTODETECT
;
if
(
!
(
desc
->
status
&
IRQ_WAITING
))
{
desc
->
istate
&=
~
IRQS
_AUTODETECT
;
irq_shutdown
(
desc
);
}
else
if
(
i
<
32
)
...
...
@@ -125,19 +124,17 @@ EXPORT_SYMBOL(probe_irq_on);
*/
unsigned
int
probe_irq_mask
(
unsigned
long
val
)
{
unsigned
int
status
,
mask
=
0
;
unsigned
int
mask
=
0
;
struct
irq_desc
*
desc
;
int
i
;
for_each_irq_desc
(
i
,
desc
)
{
raw_spin_lock_irq
(
&
desc
->
lock
);
status
=
desc
->
status
;
if
(
status
&
IRQ_AUTODETECT
)
{
if
(
i
<
16
&&
!
(
status
&
IRQ_WAITING
))
if
(
desc
->
istate
&
IRQS_AUTODETECT
)
{
if
(
i
<
16
&&
!
(
desc
->
status
&
IRQ_WAITING
))
mask
|=
1
<<
i
;
desc
->
status
=
status
&
~
IRQ
_AUTODETECT
;
desc
->
istate
&=
~
IRQS
_AUTODETECT
;
irq_shutdown
(
desc
);
}
raw_spin_unlock_irq
(
&
desc
->
lock
);
...
...
@@ -169,19 +166,17 @@ int probe_irq_off(unsigned long val)
{
int
i
,
irq_found
=
0
,
nr_of_irqs
=
0
;
struct
irq_desc
*
desc
;
unsigned
int
status
;
for_each_irq_desc
(
i
,
desc
)
{
raw_spin_lock_irq
(
&
desc
->
lock
);
status
=
desc
->
status
;
if
(
status
&
IRQ
_AUTODETECT
)
{
if
(
!
(
status
&
IRQ_WAITING
))
{
if
(
desc
->
istate
&
IRQS
_AUTODETECT
)
{
if
(
!
(
desc
->
status
&
IRQ_WAITING
))
{
if
(
!
nr_of_irqs
)
irq_found
=
i
;
nr_of_irqs
++
;
}
desc
->
status
=
status
&
~
IRQ
_AUTODETECT
;
desc
->
istate
&=
~
IRQS
_AUTODETECT
;
irq_shutdown
(
desc
);
}
raw_spin_unlock_irq
(
&
desc
->
lock
);
...
...
kernel/irq/internals.h
浏览文件 @
bd062e76
...
...
@@ -33,6 +33,15 @@ enum {
IRQTF_AFFINITY
,
};
/*
* Bit masks for desc->state
*
* IRQS_AUTODETECT - autodetection in progress
*/
enum
{
IRQS_AUTODETECT
=
0x00000001
,
};
#define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data)
/* Set default functions for irq_chip structures: */
...
...
@@ -98,6 +107,7 @@ static inline void chip_bus_sync_unlock(struct irq_desc *desc)
#include <linux/kallsyms.h>
#define P(f) if (desc->status & f) printk("%14s set\n", #f)
#define PS(f) if (desc->istate & f) printk("%14s set\n", #f)
static
inline
void
print_irq_desc
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
{
...
...
@@ -117,7 +127,6 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
P
(
IRQ_DISABLED
);
P
(
IRQ_PENDING
);
P
(
IRQ_REPLAY
);
P
(
IRQ_AUTODETECT
);
P
(
IRQ_WAITING
);
P
(
IRQ_LEVEL
);
P
(
IRQ_MASKED
);
...
...
@@ -127,7 +136,9 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
P
(
IRQ_NOPROBE
);
P
(
IRQ_NOREQUEST
);
P
(
IRQ_NOAUTOEN
);
PS
(
IRQS_AUTODETECT
);
}
#undef P
#undef PS
kernel/irq/manage.c
浏览文件 @
bd062e76
...
...
@@ -897,8 +897,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
desc
->
status
|=
IRQ_PER_CPU
;
#endif
desc
->
status
&=
~
(
IRQ_
AUTODETECT
|
IRQ_
WAITING
|
IRQ_ONESHOT
|
desc
->
status
&=
~
(
IRQ_WAITING
|
IRQ_ONESHOT
|
IRQ_INPROGRESS
|
IRQ_SPURIOUS_DISABLED
);
desc
->
istate
&=
~
IRQS_AUTODETECT
;
if
(
new
->
flags
&
IRQF_ONESHOT
)
desc
->
status
|=
IRQ_ONESHOT
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录