Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8a13ecd7
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
8a13ecd7
编写于
10月 28, 2007
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MIPS] IP32: Fixes after interrupt renumbering.
And general untangling. Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
725d7b36
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
80 addition
and
52 deletion
+80
-52
arch/mips/sgi-ip32/ip32-irq.c
arch/mips/sgi-ip32/ip32-irq.c
+77
-51
include/asm-mips/ip32/ip32_ints.h
include/asm-mips/ip32/ip32_ints.h
+3
-1
未找到文件。
arch/mips/sgi-ip32/ip32-irq.c
浏览文件 @
8a13ecd7
...
...
@@ -40,13 +40,6 @@ static void inline flush_mace_bus(void)
mace
->
perif
.
ctrl
.
misc
;
}
#undef DEBUG_IRQ
#ifdef DEBUG_IRQ
#define DBG(x...) printk(x)
#else
#define DBG(x...)
#endif
/*
* O2 irq map
*
...
...
@@ -125,6 +118,7 @@ struct irqaction memerr_irq = {
.
mask
=
CPU_MASK_NONE
,
.
name
=
"CRIME memory error"
,
};
struct
irqaction
cpuerr_irq
=
{
.
handler
=
crime_cpuerr_intr
,
.
flags
=
IRQF_DISABLED
,
...
...
@@ -139,46 +133,70 @@ struct irqaction cpuerr_irq = {
static
uint64_t
crime_mask
;
static
void
enable_crim
e_irq
(
unsigned
int
irq
)
static
inline
void
crime_enabl
e_irq
(
unsigned
int
irq
)
{
crime_mask
|=
1
<<
(
irq
-
1
);
unsigned
int
bit
=
irq
-
CRIME_IRQ_BASE
;
crime_mask
|=
1
<<
bit
;
crime
->
imask
=
crime_mask
;
}
static
void
disable_crim
e_irq
(
unsigned
int
irq
)
static
inline
void
crime_disabl
e_irq
(
unsigned
int
irq
)
{
crime_mask
&=
~
(
1
<<
(
irq
-
1
));
unsigned
int
bit
=
irq
-
CRIME_IRQ_BASE
;
crime_mask
&=
~
(
1
<<
bit
);
crime
->
imask
=
crime_mask
;
flush_crime_bus
();
}
static
void
mask_and_ack_crime_irq
(
unsigned
int
irq
)
static
void
crime_level_mask_and_ack_irq
(
unsigned
int
irq
)
{
crime_disable_irq
(
irq
);
}
static
void
crime_level_end_irq
(
unsigned
int
irq
)
{
if
(
!
(
irq_desc
[
irq
].
status
&
(
IRQ_DISABLED
|
IRQ_INPROGRESS
)))
crime_enable_irq
(
irq
);
}
static
struct
irq_chip
crime_level_interrupt
=
{
.
name
=
"IP32 CRIME"
,
.
ack
=
crime_level_mask_and_ack_irq
,
.
mask
=
crime_disable_irq
,
.
mask_ack
=
crime_level_mask_and_ack_irq
,
.
unmask
=
crime_enable_irq
,
.
end
=
crime_level_end_irq
,
};
static
void
crime_edge_mask_and_ack_irq
(
unsigned
int
irq
)
{
unsigned
int
bit
=
irq
-
CRIME_IRQ_BASE
;
uint64_t
crime_int
;
/* Edge triggered interrupts must be cleared. */
if
((
irq
>=
CRIME_GBE0_IRQ
&&
irq
<=
CRIME_GBE3_IRQ
)
||
(
irq
>=
CRIME_RE_EMPTY_E_IRQ
&&
irq
<=
CRIME_RE_IDLE_E_IRQ
)
||
(
irq
>=
CRIME_SOFT0_IRQ
&&
irq
<=
CRIME_SOFT2_IRQ
))
{
uint64_t
crime_int
;
crime_int
=
crime
->
hard_int
;
crime_int
&=
~
(
1
<<
(
irq
-
1
));
crime
->
hard_int
=
crime_int
;
}
disable_crime_irq
(
irq
);
crime_int
=
crime
->
hard_int
;
crime_int
&=
~
(
1
<<
bit
);
crime
->
hard_int
=
crime_int
;
crime_disable_irq
(
irq
);
}
static
void
end_crime
_irq
(
unsigned
int
irq
)
static
void
crime_edge_end
_irq
(
unsigned
int
irq
)
{
if
(
!
(
irq_desc
[
irq
].
status
&
(
IRQ_DISABLED
|
IRQ_INPROGRESS
)))
enable_crim
e_irq
(
irq
);
crime_enabl
e_irq
(
irq
);
}
static
struct
irq_chip
ip32_crim
e_interrupt
=
{
.
name
=
"IP32 CRIME"
,
.
ack
=
mask_and_ack_crime
_irq
,
.
mask
=
disable_crim
e_irq
,
.
mask_ack
=
mask_and_ack_crime
_irq
,
.
unmask
=
enable_crim
e_irq
,
.
end
=
end_crime
_irq
,
static
struct
irq_chip
crime_edg
e_interrupt
=
{
.
name
=
"IP32 CRIME"
,
.
ack
=
crime_edge_mask_and_ack
_irq
,
.
mask
=
crime_disabl
e_irq
,
.
mask_ack
=
crime_edge_mask_and_ack
_irq
,
.
unmask
=
crime_enabl
e_irq
,
.
end
=
crime_edge_end
_irq
,
};
/*
...
...
@@ -265,7 +283,7 @@ static void enable_maceisa_irq(unsigned int irq)
{
unsigned
int
crime_int
=
0
;
DBG
(
"maceisa enable: %u
\n
"
,
irq
);
pr_debug
(
"maceisa enable: %u
\n
"
,
irq
);
switch
(
irq
)
{
case
MACEISA_AUDIO_SW_IRQ
...
MACEISA_AUDIO3_MERR_IRQ
:
...
...
@@ -278,7 +296,7 @@ static void enable_maceisa_irq(unsigned int irq)
crime_int
=
MACE_SUPERIO_INT
;
break
;
}
DBG
(
"crime_int %08x enabled
\n
"
,
crime_int
);
pr_debug
(
"crime_int %08x enabled
\n
"
,
crime_int
);
crime_mask
|=
crime_int
;
crime
->
imask
=
crime_mask
;
maceisa_mask
|=
1
<<
(
irq
-
33
);
...
...
@@ -290,11 +308,11 @@ static void disable_maceisa_irq(unsigned int irq)
unsigned
int
crime_int
=
0
;
maceisa_mask
&=
~
(
1
<<
(
irq
-
33
));
if
(
!
(
maceisa_mask
&
MACEISA_AUDIO_INT
))
if
(
!
(
maceisa_mask
&
MACEISA_AUDIO_INT
))
crime_int
|=
MACE_AUDIO_INT
;
if
(
!
(
maceisa_mask
&
MACEISA_MISC_INT
))
if
(
!
(
maceisa_mask
&
MACEISA_MISC_INT
))
crime_int
|=
MACE_MISC_INT
;
if
(
!
(
maceisa_mask
&
MACEISA_SUPERIO_INT
))
if
(
!
(
maceisa_mask
&
MACEISA_SUPERIO_INT
))
crime_int
|=
MACE_SUPERIO_INT
;
crime_mask
&=
~
crime_int
;
crime
->
imask
=
crime_mask
;
...
...
@@ -327,12 +345,12 @@ static void end_maceisa_irq(unsigned irq)
}
static
struct
irq_chip
ip32_maceisa_interrupt
=
{
.
name
=
"IP32 MACE ISA"
,
.
ack
=
mask_and_ack_maceisa_irq
,
.
mask
=
disable_maceisa_irq
,
.
mask_ack
=
mask_and_ack_maceisa_irq
,
.
unmask
=
enable_maceisa_irq
,
.
end
=
end_maceisa_irq
,
.
name
=
"IP32 MACE ISA"
,
.
ack
=
mask_and_ack_maceisa_irq
,
.
mask
=
disable_maceisa_irq
,
.
mask_ack
=
mask_and_ack_maceisa_irq
,
.
unmask
=
enable_maceisa_irq
,
.
end
=
end_maceisa_irq
,
};
/* This is used for regular non-ISA, non-PCI MACE interrupts. That means
...
...
@@ -411,7 +429,7 @@ static void ip32_irq0(void)
irq
=
__ffs
(
mace_int
&
maceisa_mask
)
+
MACEISA_AUDIO_SW_IRQ
;
}
DBG
(
"*irq %u*
\n
"
,
irq
);
pr_debug
(
"*irq %u*
\n
"
,
irq
);
do_IRQ
(
irq
);
}
...
...
@@ -472,23 +490,31 @@ void __init arch_init_irq(void)
mips_cpu_irq_init
();
for
(
irq
=
MIPS_CPU_IRQ_BASE
+
8
;
irq
<=
IP32_IRQ_MAX
;
irq
++
)
{
struct
irq_chip
*
chip
;
switch
(
irq
)
{
case
MACE_VID_IN1_IRQ
...
MACE_PCI_BRIDGE_IRQ
:
chip
=
&
ip32_mace_interrupt
;
set_irq_chip
(
irq
,
&
ip32_mace_interrupt
)
;
break
;
case
MACEPCI_SCSI0_IRQ
...
MACEPCI_SHARED2_IRQ
:
chip
=
&
ip32_macepci_interrupt
;
set_irq_chip
(
irq
,
&
ip32_macepci_interrupt
);
break
;
case
CRIME_GBE0_IRQ
...
CRIME_GBE3_IRQ
:
set_irq_chip
(
irq
,
&
crime_edge_interrupt
);
break
;
case
CRIME_CPUERR_IRQ
:
case
CRIME_MEMERR_IRQ
:
set_irq_chip
(
irq
,
&
crime_level_interrupt
);
break
;
case
CRIME_GBE0_IRQ
...
CRIME_VICE_IRQ
:
chip
=
&
ip32_crime_interrupt
;
case
CRIME_RE_EMPTY_E_IRQ
...
CRIME_RE_IDLE_E_IRQ
:
case
CRIME_SOFT0_IRQ
...
CRIME_SOFT2_IRQ
:
set_irq_chip
(
irq
,
&
crime_edge_interrupt
);
break
;
case
CRIME_VICE_IRQ
:
set_irq_chip
(
irq
,
&
crime_edge_interrupt
);
break
;
default:
chip
=
&
ip32_maceisa_interrupt
;
set_irq_chip
(
irq
,
&
ip32_maceisa_interrupt
);
break
;
}
set_irq_chip
(
irq
,
chip
);
}
setup_irq
(
CRIME_MEMERR_IRQ
,
&
memerr_irq
);
setup_irq
(
CRIME_CPUERR_IRQ
,
&
cpuerr_irq
);
...
...
include/asm-mips/ip32/ip32_ints.h
浏览文件 @
8a13ecd7
...
...
@@ -22,10 +22,12 @@ enum ip32_irq_no {
* CPU interrupts are 0 ... 7
*/
CRIME_IRQ_BASE
=
MIPS_CPU_IRQ_BASE
,
/*
* MACE
*/
MACE_VID_IN1_IRQ
=
MIPS_CPU_IRQ_BASE
+
8
,
MACE_VID_IN1_IRQ
=
CRIME_IRQ_BASE
,
MACE_VID_IN2_IRQ
,
MACE_VID_OUT_IRQ
,
MACE_ETHERNET_IRQ
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录