Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
92072452
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
92072452
编写于
3月 28, 2012
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'common/intc-extension' into sh-latest
上级
d1000edd
b59f9f97
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
32 deletion
+25
-32
drivers/sh/intc/chip.c
drivers/sh/intc/chip.c
+8
-29
drivers/sh/intc/core.c
drivers/sh/intc/core.c
+9
-2
drivers/sh/intc/internals.h
drivers/sh/intc/internals.h
+8
-1
未找到文件。
drivers/sh/intc/chip.c
浏览文件 @
92072452
...
...
@@ -2,13 +2,14 @@
* IRQ chip definitions for INTC IRQs.
*
* Copyright (C) 2007, 2008 Magnus Damm
* Copyright (C) 2009
, 2010
Paul Mundt
* Copyright (C) 2009
- 2012
Paul Mundt
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/cpumask.h>
#include <linux/bsearch.h>
#include <linux/io.h>
#include "internals.h"
...
...
@@ -58,11 +59,6 @@ static void intc_disable(struct irq_data *data)
}
}
static
int
intc_set_wake
(
struct
irq_data
*
data
,
unsigned
int
on
)
{
return
0
;
/* allow wakeup, but setup hardware in intc_suspend() */
}
#ifdef CONFIG_SMP
/*
* This is held with the irq desc lock held, so we don't require any
...
...
@@ -78,7 +74,7 @@ static int intc_set_affinity(struct irq_data *data,
cpumask_copy
(
data
->
affinity
,
cpumask
);
return
0
;
return
IRQ_SET_MASK_OK_NOCOPY
;
}
#endif
...
...
@@ -122,28 +118,12 @@ static struct intc_handle_int *intc_find_irq(struct intc_handle_int *hp,
unsigned
int
nr_hp
,
unsigned
int
irq
)
{
int
i
;
/*
* this doesn't scale well, but...
*
* this function should only be used for cerain uncommon
* operations such as intc_set_priority() and intc_set_type()
* and in those rare cases performance doesn't matter that much.
* keeping the memory footprint low is more important.
*
* one rather simple way to speed this up and still keep the
* memory footprint down is to make sure the array is sorted
* and then perform a bisect to lookup the irq.
*/
for
(
i
=
0
;
i
<
nr_hp
;
i
++
)
{
if
((
hp
+
i
)
->
irq
!=
irq
)
continue
;
struct
intc_handle_int
key
;
return
hp
+
i
;
}
key
.
irq
=
irq
;
key
.
handle
=
0
;
return
NULL
;
return
bsearch
(
&
key
,
hp
,
nr_hp
,
sizeof
(
*
hp
),
intc_handle_int_cmp
)
;
}
int
intc_set_priority
(
unsigned
int
irq
,
unsigned
int
prio
)
...
...
@@ -223,10 +203,9 @@ struct irq_chip intc_irq_chip = {
.
irq_mask_ack
=
intc_mask_ack
,
.
irq_enable
=
intc_enable
,
.
irq_disable
=
intc_disable
,
.
irq_shutdown
=
intc_disable
,
.
irq_set_type
=
intc_set_type
,
.
irq_set_wake
=
intc_set_wake
,
#ifdef CONFIG_SMP
.
irq_set_affinity
=
intc_set_affinity
,
#endif
.
flags
=
IRQCHIP_SKIP_SET_WAKE
,
};
drivers/sh/intc/core.c
浏览文件 @
92072452
...
...
@@ -2,7 +2,7 @@
* Shared interrupt handling code for IPR and INTC2 types of IRQs.
*
* Copyright (C) 2007, 2008 Magnus Damm
* Copyright (C) 2009
, 2010
Paul Mundt
* Copyright (C) 2009
- 2012
Paul Mundt
*
* Based on intc2.c and ipr.c
*
...
...
@@ -31,11 +31,12 @@
#include <linux/spinlock.h>
#include <linux/radix-tree.h>
#include <linux/export.h>
#include <linux/sort.h>
#include "internals.h"
LIST_HEAD
(
intc_list
);
DEFINE_RAW_SPINLOCK
(
intc_big_lock
);
unsigned
int
nr_intc_controllers
;
static
unsigned
int
nr_intc_controllers
;
/*
* Default priority level
...
...
@@ -267,6 +268,9 @@ int __init register_intc_controller(struct intc_desc *desc)
k
+=
save_reg
(
d
,
k
,
hw
->
prio_regs
[
i
].
set_reg
,
smp
);
k
+=
save_reg
(
d
,
k
,
hw
->
prio_regs
[
i
].
clr_reg
,
smp
);
}
sort
(
d
->
prio
,
hw
->
nr_prio_regs
,
sizeof
(
*
d
->
prio
),
intc_handle_int_cmp
,
NULL
);
}
if
(
hw
->
sense_regs
)
{
...
...
@@ -277,6 +281,9 @@ int __init register_intc_controller(struct intc_desc *desc)
for
(
i
=
0
;
i
<
hw
->
nr_sense_regs
;
i
++
)
k
+=
save_reg
(
d
,
k
,
hw
->
sense_regs
[
i
].
reg
,
0
);
sort
(
d
->
sense
,
hw
->
nr_sense_regs
,
sizeof
(
*
d
->
sense
),
intc_handle_int_cmp
,
NULL
);
}
if
(
hw
->
subgroups
)
...
...
drivers/sh/intc/internals.h
浏览文件 @
92072452
...
...
@@ -108,6 +108,14 @@ static inline void activate_irq(int irq)
#endif
}
static
inline
int
intc_handle_int_cmp
(
const
void
*
a
,
const
void
*
b
)
{
const
struct
intc_handle_int
*
_a
=
a
;
const
struct
intc_handle_int
*
_b
=
b
;
return
_a
->
irq
-
_b
->
irq
;
}
/* access.c */
extern
unsigned
long
(
*
intc_reg_fns
[])(
unsigned
long
addr
,
unsigned
long
h
,
unsigned
long
data
);
...
...
@@ -157,7 +165,6 @@ void _intc_enable(struct irq_data *data, unsigned long handle);
/* core.c */
extern
struct
list_head
intc_list
;
extern
raw_spinlock_t
intc_big_lock
;
extern
unsigned
int
nr_intc_controllers
;
extern
struct
bus_type
intc_subsys
;
unsigned
int
intc_get_dfl_prio_level
(
void
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录