Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
d1badf8d
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看板
提交
d1badf8d
编写于
12月 31, 2013
作者:
R
Rafael J. Wysocki
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'acpi-pci-hotplug' into acpi-hotplug
Conflicts: include/acpi/acpi_bus.h
上级
caa73ea1
f244d8b6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
64 addition
and
8 deletion
+64
-8
drivers/acpi/bus.c
drivers/acpi/bus.c
+10
-0
drivers/gpu/drm/nouveau/nouveau_acpi.c
drivers/gpu/drm/nouveau/nouveau_acpi.c
+14
-2
drivers/gpu/drm/radeon/radeon_atpx_handler.c
drivers/gpu/drm/radeon/radeon_atpx_handler.c
+14
-2
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/acpiphp_glue.c
+23
-3
include/acpi/acpi_bus.h
include/acpi/acpi_bus.h
+3
-1
未找到文件。
drivers/acpi/bus.c
浏览文件 @
d1badf8d
...
...
@@ -149,6 +149,16 @@ int acpi_bus_get_private_data(acpi_handle handle, void **data)
}
EXPORT_SYMBOL
(
acpi_bus_get_private_data
);
void
acpi_bus_no_hotplug
(
acpi_handle
handle
)
{
struct
acpi_device
*
adev
=
NULL
;
acpi_bus_get_device
(
handle
,
&
adev
);
if
(
adev
)
adev
->
flags
.
no_hotplug
=
true
;
}
EXPORT_SYMBOL_GPL
(
acpi_bus_no_hotplug
);
static
void
acpi_print_osc_error
(
acpi_handle
handle
,
struct
acpi_osc_context
*
context
,
char
*
error
)
{
...
...
drivers/gpu/drm/nouveau/nouveau_acpi.c
浏览文件 @
d1badf8d
...
...
@@ -46,6 +46,7 @@ static struct nouveau_dsm_priv {
bool
dsm_detected
;
bool
optimus_detected
;
acpi_handle
dhandle
;
acpi_handle
other_handle
;
acpi_handle
rom_handle
;
}
nouveau_dsm_priv
;
...
...
@@ -255,9 +256,10 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev)
if
(
!
dhandle
)
return
false
;
if
(
!
acpi_has_method
(
dhandle
,
"_DSM"
))
if
(
!
acpi_has_method
(
dhandle
,
"_DSM"
))
{
nouveau_dsm_priv
.
other_handle
=
dhandle
;
return
false
;
}
if
(
nouveau_test_dsm
(
dhandle
,
nouveau_dsm
,
NOUVEAU_DSM_POWER
))
retval
|=
NOUVEAU_DSM_HAS_MUX
;
...
...
@@ -333,6 +335,16 @@ static bool nouveau_dsm_detect(void)
printk
(
KERN_INFO
"VGA switcheroo: detected DSM switching method %s handle
\n
"
,
acpi_method_name
);
nouveau_dsm_priv
.
dsm_detected
=
true
;
/*
* On some systems hotplug events are generated for the device
* being switched off when _DSM is executed. They cause ACPI
* hotplug to trigger and attempt to remove the device from
* the system, which causes it to break down. Prevent that from
* happening by setting the no_hotplug flag for the involved
* ACPI device objects.
*/
acpi_bus_no_hotplug
(
nouveau_dsm_priv
.
dhandle
);
acpi_bus_no_hotplug
(
nouveau_dsm_priv
.
other_handle
);
ret
=
true
;
}
...
...
drivers/gpu/drm/radeon/radeon_atpx_handler.c
浏览文件 @
d1badf8d
...
...
@@ -33,6 +33,7 @@ static struct radeon_atpx_priv {
bool
atpx_detected
;
/* handle for device - and atpx */
acpi_handle
dhandle
;
acpi_handle
other_handle
;
struct
radeon_atpx
atpx
;
}
radeon_atpx_priv
;
...
...
@@ -451,9 +452,10 @@ static bool radeon_atpx_pci_probe_handle(struct pci_dev *pdev)
return
false
;
status
=
acpi_get_handle
(
dhandle
,
"ATPX"
,
&
atpx_handle
);
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
{
radeon_atpx_priv
.
other_handle
=
dhandle
;
return
false
;
}
radeon_atpx_priv
.
dhandle
=
dhandle
;
radeon_atpx_priv
.
atpx
.
handle
=
atpx_handle
;
return
true
;
...
...
@@ -530,6 +532,16 @@ static bool radeon_atpx_detect(void)
printk
(
KERN_INFO
"VGA switcheroo: detected switching method %s handle
\n
"
,
acpi_method_name
);
radeon_atpx_priv
.
atpx_detected
=
true
;
/*
* On some systems hotplug events are generated for the device
* being switched off when ATPX is executed. They cause ACPI
* hotplug to trigger and attempt to remove the device from
* the system, which causes it to break down. Prevent that from
* happening by setting the no_hotplug flag for the involved
* ACPI device objects.
*/
acpi_bus_no_hotplug
(
radeon_atpx_priv
.
dhandle
);
acpi_bus_no_hotplug
(
radeon_atpx_priv
.
other_handle
);
return
true
;
}
return
false
;
...
...
drivers/pci/hotplug/acpiphp_glue.c
浏览文件 @
d1badf8d
...
...
@@ -645,6 +645,24 @@ static void disable_slot(struct acpiphp_slot *slot)
slot
->
flags
&=
(
~
SLOT_ENABLED
);
}
static
bool
acpiphp_no_hotplug
(
acpi_handle
handle
)
{
struct
acpi_device
*
adev
=
NULL
;
acpi_bus_get_device
(
handle
,
&
adev
);
return
adev
&&
adev
->
flags
.
no_hotplug
;
}
static
bool
slot_no_hotplug
(
struct
acpiphp_slot
*
slot
)
{
struct
acpiphp_func
*
func
;
list_for_each_entry
(
func
,
&
slot
->
funcs
,
sibling
)
if
(
acpiphp_no_hotplug
(
func_to_handle
(
func
)))
return
true
;
return
false
;
}
/**
* get_slot_status - get ACPI slot status
...
...
@@ -703,7 +721,8 @@ static void trim_stale_devices(struct pci_dev *dev)
unsigned
long
long
sta
;
status
=
acpi_evaluate_integer
(
handle
,
"_STA"
,
NULL
,
&
sta
);
alive
=
ACPI_SUCCESS
(
status
)
&&
sta
==
ACPI_STA_ALL
;
alive
=
(
ACPI_SUCCESS
(
status
)
&&
sta
==
ACPI_STA_ALL
)
||
acpiphp_no_hotplug
(
handle
);
}
if
(
!
alive
)
{
u32
v
;
...
...
@@ -743,8 +762,9 @@ static void acpiphp_check_bridge(struct acpiphp_bridge *bridge)
struct
pci_dev
*
dev
,
*
tmp
;
mutex_lock
(
&
slot
->
crit_sect
);
/* wake up all functions */
if
(
get_slot_status
(
slot
)
==
ACPI_STA_ALL
)
{
if
(
slot_no_hotplug
(
slot
))
{
;
/* do nothing */
}
else
if
(
get_slot_status
(
slot
)
==
ACPI_STA_ALL
)
{
/* remove stale devices if any */
list_for_each_entry_safe
(
dev
,
tmp
,
&
bus
->
devices
,
bus_list
)
...
...
include/acpi/acpi_bus.h
浏览文件 @
d1badf8d
...
...
@@ -163,7 +163,8 @@ struct acpi_device_flags {
u32
match_driver
:
1
;
u32
initialized
:
1
;
u32
visited
:
1
;
u32
reserved
:
25
;
u32
no_hotplug
:
1
;
u32
reserved
:
24
;
};
/* File System */
...
...
@@ -344,6 +345,7 @@ extern struct kobject *acpi_kobj;
extern
int
acpi_bus_generate_netlink_event
(
const
char
*
,
const
char
*
,
u8
,
int
);
void
acpi_bus_private_data_handler
(
acpi_handle
,
void
*
);
int
acpi_bus_get_private_data
(
acpi_handle
,
void
**
);
void
acpi_bus_no_hotplug
(
acpi_handle
handle
);
extern
int
acpi_notifier_call_chain
(
struct
acpi_device
*
,
u32
,
u32
);
extern
int
register_acpi_notifier
(
struct
notifier_block
*
);
extern
int
unregister_acpi_notifier
(
struct
notifier_block
*
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录