Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
384bc8f0
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
7
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看板
提交
384bc8f0
编写于
10月 14, 2006
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull bugzilla-5534 into test branch
上级
e0749be9
37605a69
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
34 deletion
+14
-34
drivers/acpi/events/evmisc.c
drivers/acpi/events/evmisc.c
+1
-13
drivers/acpi/osl.c
drivers/acpi/osl.c
+13
-21
未找到文件。
drivers/acpi/events/evmisc.c
浏览文件 @
384bc8f0
...
...
@@ -342,20 +342,8 @@ static u32 acpi_ev_global_lock_handler(void *context)
if
(
acquired
)
{
/* Got the lock, now wake all threads waiting for it */
acpi_gbl_global_lock_acquired
=
TRUE
;
/* Run the Global Lock thread which will signal all waiting threads */
status
=
acpi_os_execute
(
OSL_GLOBAL_LOCK_HANDLER
,
acpi_ev_global_lock_thread
,
context
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"Could not queue Global Lock thread"
));
return
(
ACPI_INTERRUPT_NOT_HANDLED
);
}
acpi_ev_global_lock_thread
(
context
);
}
return
(
ACPI_INTERRUPT_HANDLED
);
...
...
drivers/acpi/osl.c
浏览文件 @
384bc8f0
...
...
@@ -73,6 +73,7 @@ static unsigned int acpi_irq_irq;
static
acpi_osd_handler
acpi_irq_handler
;
static
void
*
acpi_irq_context
;
static
struct
workqueue_struct
*
kacpid_wq
;
static
struct
workqueue_struct
*
kacpi_notify_wq
;
acpi_status
acpi_os_initialize
(
void
)
{
...
...
@@ -91,8 +92,9 @@ acpi_status acpi_os_initialize1(void)
return
AE_NULL_ENTRY
;
}
kacpid_wq
=
create_singlethread_workqueue
(
"kacpid"
);
kacpi_notify_wq
=
create_singlethread_workqueue
(
"kacpi_notify"
);
BUG_ON
(
!
kacpid_wq
);
BUG_ON
(
!
kacpi_notify_wq
);
return
AE_OK
;
}
...
...
@@ -104,6 +106,7 @@ acpi_status acpi_os_terminate(void)
}
destroy_workqueue
(
kacpid_wq
);
destroy_workqueue
(
kacpi_notify_wq
);
return
AE_OK
;
}
...
...
@@ -566,10 +569,7 @@ void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */
static
void
acpi_os_execute_deferred
(
void
*
context
)
{
struct
acpi_os_dpc
*
dpc
=
NULL
;
dpc
=
(
struct
acpi_os_dpc
*
)
context
;
struct
acpi_os_dpc
*
dpc
=
(
struct
acpi_os_dpc
*
)
context
;
if
(
!
dpc
)
{
printk
(
KERN_ERR
PREFIX
"Invalid (NULL) context
\n
"
);
return
;
...
...
@@ -604,14 +604,12 @@ acpi_status acpi_os_execute(acpi_execute_type type,
struct
acpi_os_dpc
*
dpc
;
struct
work_struct
*
task
;
ACPI_FUNCTION_TRACE
(
"os_queue_for_execution"
);
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Scheduling function [%p(%p)] for deferred execution.
\n
"
,
function
,
context
));
if
(
!
function
)
return
_ACPI_STATUS
(
AE_BAD_PARAMETER
)
;
return
AE_BAD_PARAMETER
;
/*
* Allocate/initialize DPC structure. Note that this memory will be
...
...
@@ -624,26 +622,20 @@ acpi_status acpi_os_execute(acpi_execute_type type,
* from the same memory.
*/
dpc
=
kmalloc
(
sizeof
(
struct
acpi_os_dpc
)
+
sizeof
(
struct
work_struct
),
GFP_ATOMIC
);
dpc
=
kmalloc
(
sizeof
(
struct
acpi_os_dpc
)
+
sizeof
(
struct
work_struct
),
GFP_ATOMIC
);
if
(
!
dpc
)
return_ACPI_STATUS
(
AE_NO_MEMORY
);
return
AE_NO_MEMORY
;
dpc
->
function
=
function
;
dpc
->
context
=
context
;
task
=
(
void
*
)(
dpc
+
1
);
INIT_WORK
(
task
,
acpi_os_execute_deferred
,
(
void
*
)
dpc
);
if
(
!
queue_work
(
kacpid_wq
,
task
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Call to queue_work() failed.
\n
"
));
kfree
(
dpc
);
if
(
!
queue_work
((
type
==
OSL_NOTIFY_HANDLER
)
?
kacpi_notify_wq
:
kacpid_wq
,
task
))
{
status
=
AE_ERROR
;
kfree
(
dpc
);
}
return_ACPI_STATUS
(
status
);
return
status
;
}
EXPORT_SYMBOL
(
acpi_os_execute
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录