Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
a6c761e4
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看板
提交
a6c761e4
编写于
5月 19, 2015
作者:
T
Thomas Gleixner
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'irq/for-x86' into irq/core
Pull in the branch which can be consumed by x86 to build their changes on top.
上级
939ef668
0a4377de
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
51 addition
and
0 deletion
+51
-0
include/linux/irq.h
include/linux/irq.h
+6
-0
kernel/irq/chip.c
kernel/irq/chip.c
+14
-0
kernel/irq/manage.c
kernel/irq/manage.c
+31
-0
未找到文件。
include/linux/irq.h
浏览文件 @
a6c761e4
...
...
@@ -327,6 +327,7 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
* @irq_write_msi_msg: optional to write message content for MSI
* @irq_get_irqchip_state: return the internal state of an interrupt
* @irq_set_irqchip_state: set the internal state of a interrupt
* @irq_set_vcpu_affinity: optional to target a vCPU in a virtual machine
* @flags: chip specific flags
*/
struct
irq_chip
{
...
...
@@ -369,6 +370,8 @@ struct irq_chip {
int
(
*
irq_get_irqchip_state
)(
struct
irq_data
*
data
,
enum
irqchip_irq_state
which
,
bool
*
state
);
int
(
*
irq_set_irqchip_state
)(
struct
irq_data
*
data
,
enum
irqchip_irq_state
which
,
bool
state
);
int
(
*
irq_set_vcpu_affinity
)(
struct
irq_data
*
data
,
void
*
vcpu_info
);
unsigned
long
flags
;
};
...
...
@@ -422,6 +425,7 @@ extern void irq_cpu_online(void);
extern
void
irq_cpu_offline
(
void
);
extern
int
irq_set_affinity_locked
(
struct
irq_data
*
data
,
const
struct
cpumask
*
cpumask
,
bool
force
);
extern
int
irq_set_vcpu_affinity
(
unsigned
int
irq
,
void
*
vcpu_info
);
#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ)
void
irq_move_irq
(
struct
irq_data
*
data
);
...
...
@@ -469,6 +473,8 @@ extern int irq_chip_set_affinity_parent(struct irq_data *data,
const
struct
cpumask
*
dest
,
bool
force
);
extern
int
irq_chip_set_wake_parent
(
struct
irq_data
*
data
,
unsigned
int
on
);
extern
int
irq_chip_set_vcpu_affinity_parent
(
struct
irq_data
*
data
,
void
*
vcpu_info
);
#endif
/* Handling of unhandled and spurious interrupts: */
...
...
kernel/irq/chip.c
浏览文件 @
a6c761e4
...
...
@@ -977,6 +977,20 @@ int irq_chip_retrigger_hierarchy(struct irq_data *data)
return
-
ENOSYS
;
}
/**
* irq_chip_set_vcpu_affinity_parent - Set vcpu affinity on the parent interrupt
* @data: Pointer to interrupt specific data
* @dest: The vcpu affinity information
*/
int
irq_chip_set_vcpu_affinity_parent
(
struct
irq_data
*
data
,
void
*
vcpu_info
)
{
data
=
data
->
parent_data
;
if
(
data
->
chip
->
irq_set_vcpu_affinity
)
return
data
->
chip
->
irq_set_vcpu_affinity
(
data
,
vcpu_info
);
return
-
ENOSYS
;
}
/**
* irq_chip_set_wake_parent - Set/reset wake-up on the parent interrupt
* @data: Pointer to interrupt specific data
...
...
kernel/irq/manage.c
浏览文件 @
a6c761e4
...
...
@@ -256,6 +256,37 @@ int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
}
EXPORT_SYMBOL_GPL
(
irq_set_affinity_hint
);
/**
* irq_set_vcpu_affinity - Set vcpu affinity for the interrupt
* @irq: interrupt number to set affinity
* @vcpu_info: vCPU specific data
*
* This function uses the vCPU specific data to set the vCPU
* affinity for an irq. The vCPU specific data is passed from
* outside, such as KVM. One example code path is as below:
* KVM -> IOMMU -> irq_set_vcpu_affinity().
*/
int
irq_set_vcpu_affinity
(
unsigned
int
irq
,
void
*
vcpu_info
)
{
unsigned
long
flags
;
struct
irq_desc
*
desc
=
irq_get_desc_lock
(
irq
,
&
flags
,
0
);
struct
irq_data
*
data
;
struct
irq_chip
*
chip
;
int
ret
=
-
ENOSYS
;
if
(
!
desc
)
return
-
EINVAL
;
data
=
irq_desc_get_irq_data
(
desc
);
chip
=
irq_data_get_irq_chip
(
data
);
if
(
chip
&&
chip
->
irq_set_vcpu_affinity
)
ret
=
chip
->
irq_set_vcpu_affinity
(
data
,
vcpu_info
);
irq_put_desc_unlock
(
desc
,
flags
);
return
ret
;
}
EXPORT_SYMBOL_GPL
(
irq_set_vcpu_affinity
);
static
void
irq_affinity_notify
(
struct
work_struct
*
work
)
{
struct
irq_affinity_notify
*
notify
=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录