Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
384bc8f0
Commit
384bc8f0
authored
Oct 14, 2006
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull bugzilla-5534 into test branch
parents
e0749be9
37605a69
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
34 deletions
+14
-34
drivers/acpi/events/evmisc.c
drivers/acpi/events/evmisc.c
+1
-13
drivers/acpi/osl.c
drivers/acpi/osl.c
+13
-21
No files found.
drivers/acpi/events/evmisc.c
View file @
384bc8f0
...
@@ -342,20 +342,8 @@ static u32 acpi_ev_global_lock_handler(void *context)
...
@@ -342,20 +342,8 @@ static u32 acpi_ev_global_lock_handler(void *context)
if
(
acquired
)
{
if
(
acquired
)
{
/* Got the lock, now wake all threads waiting for it */
/* Got the lock, now wake all threads waiting for it */
acpi_gbl_global_lock_acquired
=
TRUE
;
acpi_gbl_global_lock_acquired
=
TRUE
;
acpi_ev_global_lock_thread
(
context
);
/* 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
);
}
}
}
return
(
ACPI_INTERRUPT_HANDLED
);
return
(
ACPI_INTERRUPT_HANDLED
);
...
...
drivers/acpi/osl.c
View file @
384bc8f0
...
@@ -73,6 +73,7 @@ static unsigned int acpi_irq_irq;
...
@@ -73,6 +73,7 @@ static unsigned int acpi_irq_irq;
static
acpi_osd_handler
acpi_irq_handler
;
static
acpi_osd_handler
acpi_irq_handler
;
static
void
*
acpi_irq_context
;
static
void
*
acpi_irq_context
;
static
struct
workqueue_struct
*
kacpid_wq
;
static
struct
workqueue_struct
*
kacpid_wq
;
static
struct
workqueue_struct
*
kacpi_notify_wq
;
acpi_status
acpi_os_initialize
(
void
)
acpi_status
acpi_os_initialize
(
void
)
{
{
...
@@ -91,8 +92,9 @@ acpi_status acpi_os_initialize1(void)
...
@@ -91,8 +92,9 @@ acpi_status acpi_os_initialize1(void)
return
AE_NULL_ENTRY
;
return
AE_NULL_ENTRY
;
}
}
kacpid_wq
=
create_singlethread_workqueue
(
"kacpid"
);
kacpid_wq
=
create_singlethread_workqueue
(
"kacpid"
);
kacpi_notify_wq
=
create_singlethread_workqueue
(
"kacpi_notify"
);
BUG_ON
(
!
kacpid_wq
);
BUG_ON
(
!
kacpid_wq
);
BUG_ON
(
!
kacpi_notify_wq
);
return
AE_OK
;
return
AE_OK
;
}
}
...
@@ -104,6 +106,7 @@ acpi_status acpi_os_terminate(void)
...
@@ -104,6 +106,7 @@ acpi_status acpi_os_terminate(void)
}
}
destroy_workqueue
(
kacpid_wq
);
destroy_workqueue
(
kacpid_wq
);
destroy_workqueue
(
kacpi_notify_wq
);
return
AE_OK
;
return
AE_OK
;
}
}
...
@@ -566,10 +569,7 @@ void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */
...
@@ -566,10 +569,7 @@ void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */
static
void
acpi_os_execute_deferred
(
void
*
context
)
static
void
acpi_os_execute_deferred
(
void
*
context
)
{
{
struct
acpi_os_dpc
*
dpc
=
NULL
;
struct
acpi_os_dpc
*
dpc
=
(
struct
acpi_os_dpc
*
)
context
;
dpc
=
(
struct
acpi_os_dpc
*
)
context
;
if
(
!
dpc
)
{
if
(
!
dpc
)
{
printk
(
KERN_ERR
PREFIX
"Invalid (NULL) context
\n
"
);
printk
(
KERN_ERR
PREFIX
"Invalid (NULL) context
\n
"
);
return
;
return
;
...
@@ -604,14 +604,12 @@ acpi_status acpi_os_execute(acpi_execute_type type,
...
@@ -604,14 +604,12 @@ acpi_status acpi_os_execute(acpi_execute_type type,
struct
acpi_os_dpc
*
dpc
;
struct
acpi_os_dpc
*
dpc
;
struct
work_struct
*
task
;
struct
work_struct
*
task
;
ACPI_FUNCTION_TRACE
(
"os_queue_for_execution"
);
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Scheduling function [%p(%p)] for deferred execution.
\n
"
,
"Scheduling function [%p(%p)] for deferred execution.
\n
"
,
function
,
context
));
function
,
context
));
if
(
!
function
)
if
(
!
function
)
return
_ACPI_STATUS
(
AE_BAD_PARAMETER
)
;
return
AE_BAD_PARAMETER
;
/*
/*
* Allocate/initialize DPC structure. Note that this memory will be
* Allocate/initialize DPC structure. Note that this memory will be
...
@@ -624,26 +622,20 @@ acpi_status acpi_os_execute(acpi_execute_type type,
...
@@ -624,26 +622,20 @@ acpi_status acpi_os_execute(acpi_execute_type type,
* from the same memory.
* from the same memory.
*/
*/
dpc
=
dpc
=
kmalloc
(
sizeof
(
struct
acpi_os_dpc
)
+
kmalloc
(
sizeof
(
struct
acpi_os_dpc
)
+
sizeof
(
struct
work_struct
),
sizeof
(
struct
work_struct
),
GFP_ATOMIC
);
GFP_ATOMIC
);
if
(
!
dpc
)
if
(
!
dpc
)
return_ACPI_STATUS
(
AE_NO_MEMORY
);
return
AE_NO_MEMORY
;
dpc
->
function
=
function
;
dpc
->
function
=
function
;
dpc
->
context
=
context
;
dpc
->
context
=
context
;
task
=
(
void
*
)(
dpc
+
1
);
task
=
(
void
*
)(
dpc
+
1
);
INIT_WORK
(
task
,
acpi_os_execute_deferred
,
(
void
*
)
dpc
);
INIT_WORK
(
task
,
acpi_os_execute_deferred
,
(
void
*
)
dpc
);
if
(
!
queue_work
((
type
==
OSL_NOTIFY_HANDLER
)
?
if
(
!
queue_work
(
kacpid_wq
,
task
))
{
kacpi_notify_wq
:
kacpid_wq
,
task
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Call to queue_work() failed.
\n
"
));
kfree
(
dpc
);
status
=
AE_ERROR
;
status
=
AE_ERROR
;
kfree
(
dpc
);
}
}
return
status
;
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_os_execute
);
EXPORT_SYMBOL
(
acpi_os_execute
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment