Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
4a4cf779
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看板
提交
4a4cf779
编写于
11月 06, 2006
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MIPS] Make irq number allocator generally available for fixing EV64120.
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
325d08d1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
46 addition
and
25 deletion
+46
-25
arch/mips/kernel/irq.c
arch/mips/kernel/irq.c
+42
-0
arch/mips/sgi-ip27/ip27-irq.c
arch/mips/sgi-ip27/ip27-irq.c
+0
-23
arch/mips/sgi-ip27/ip27-timer.c
arch/mips/sgi-ip27/ip27-timer.c
+0
-2
include/asm-mips/irq.h
include/asm-mips/irq.h
+4
-0
未找到文件。
arch/mips/kernel/irq.c
浏览文件 @
4a4cf779
...
...
@@ -26,6 +26,48 @@
#include <asm/system.h>
#include <asm/uaccess.h>
static
unsigned
long
irq_map
[
NR_IRQS
/
BITS_PER_LONG
];
int
__devinit
allocate_irqno
(
void
)
{
int
irq
;
again:
irq
=
find_first_zero_bit
(
irq_map
,
NR_IRQS
);
if
(
irq
>=
NR_IRQS
)
return
-
ENOSPC
;
if
(
test_and_set_bit
(
irq
,
irq_map
))
goto
again
;
return
irq
;
}
EXPORT_SYMBOL_GPL
(
allocate_irqno
);
/*
* Allocate the 16 legacy interrupts for i8259 devices. This happens early
* in the kernel initialization so treating allocation failure as BUG() is
* ok.
*/
void
__init
alloc_legacy_irqno
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<=
16
;
i
++
)
BUG_ON
(
test_and_set_bit
(
i
,
irq_map
));
}
void
__devinit
free_irqno
(
unsigned
int
irq
)
{
smp_mb__before_clear_bit
();
clear_bit
(
irq
,
irq_map
);
smp_mb__after_clear_bit
();
}
EXPORT_SYMBOL_GPL
(
free_irqno
);
/*
* 'what should we do if we get a hw irq event on an illegal vector'.
* each architecture has to answer this themselves.
...
...
arch/mips/sgi-ip27/ip27-irq.c
浏览文件 @
4a4cf779
...
...
@@ -354,29 +354,6 @@ static struct irq_chip bridge_irq_type = {
.
end
=
end_bridge_irq
,
};
static
unsigned
long
irq_map
[
NR_IRQS
/
BITS_PER_LONG
];
int
allocate_irqno
(
void
)
{
int
irq
;
again:
irq
=
find_first_zero_bit
(
irq_map
,
NR_IRQS
);
if
(
irq
>=
NR_IRQS
)
return
-
ENOSPC
;
if
(
test_and_set_bit
(
irq
,
irq_map
))
goto
again
;
return
irq
;
}
void
free_irqno
(
unsigned
int
irq
)
{
clear_bit
(
irq
,
irq_map
);
}
void
__devinit
register_bridge_irq
(
unsigned
int
irq
)
{
irq_desc
[
irq
].
status
=
IRQ_DISABLED
;
...
...
arch/mips/sgi-ip27/ip27-timer.c
浏览文件 @
4a4cf779
...
...
@@ -214,8 +214,6 @@ static struct irqaction rt_irqaction = {
.
name
=
"timer"
};
extern
int
allocate_irqno
(
void
);
void
__init
plat_timer_setup
(
struct
irqaction
*
irq
)
{
int
irqno
=
allocate_irqno
();
...
...
include/asm-mips/irq.h
浏览文件 @
4a4cf779
...
...
@@ -74,4 +74,8 @@ extern int setup_irq_smtc(unsigned int irq, struct irqaction * new,
unsigned
long
hwmask
);
#endif
/* CONFIG_MIPS_MT_SMTC */
extern
int
allocate_irqno
(
void
);
extern
void
alloc_legacy_irqno
(
void
);
extern
void
free_irqno
(
unsigned
int
irq
);
#endif
/* _ASM_IRQ_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录