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
nexedi
linux
Commits
8270dc79
Commit
8270dc79
authored
Nov 12, 2002
by
Andy Grover
Browse files
Options
Browse Files
Download
Plain Diff
Merge groveronline.com:/root/bk/linux-2.5
into groveronline.com:/root/bk/linux-acpi
parents
8c339122
5329365a
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
359 additions
and
246 deletions
+359
-246
drivers/acpi/ac.c
drivers/acpi/ac.c
+7
-14
drivers/acpi/battery.c
drivers/acpi/battery.c
+7
-14
drivers/acpi/bus.c
drivers/acpi/bus.c
+1
-0
drivers/acpi/button.c
drivers/acpi/button.c
+9
-10
drivers/acpi/dispatcher/dsmethod.c
drivers/acpi/dispatcher/dsmethod.c
+2
-2
drivers/acpi/dispatcher/dswstate.c
drivers/acpi/dispatcher/dswstate.c
+3
-3
drivers/acpi/ec.c
drivers/acpi/ec.c
+14
-17
drivers/acpi/events/evevent.c
drivers/acpi/events/evevent.c
+4
-4
drivers/acpi/events/evmisc.c
drivers/acpi/events/evmisc.c
+2
-2
drivers/acpi/events/evxface.c
drivers/acpi/events/evxface.c
+2
-2
drivers/acpi/executer/exdump.c
drivers/acpi/executer/exdump.c
+2
-1
drivers/acpi/executer/exfield.c
drivers/acpi/executer/exfield.c
+111
-13
drivers/acpi/executer/exfldio.c
drivers/acpi/executer/exfldio.c
+25
-12
drivers/acpi/executer/exoparg1.c
drivers/acpi/executer/exoparg1.c
+14
-10
drivers/acpi/executer/exoparg2.c
drivers/acpi/executer/exoparg2.c
+4
-2
drivers/acpi/executer/exoparg3.c
drivers/acpi/executer/exoparg3.c
+4
-2
drivers/acpi/executer/exprep.c
drivers/acpi/executer/exprep.c
+7
-11
drivers/acpi/executer/exstore.c
drivers/acpi/executer/exstore.c
+3
-3
drivers/acpi/executer/exsystem.c
drivers/acpi/executer/exsystem.c
+5
-5
drivers/acpi/executer/exutils.c
drivers/acpi/executer/exutils.c
+2
-2
drivers/acpi/fan.c
drivers/acpi/fan.c
+10
-15
drivers/acpi/include/acconfig.h
drivers/acpi/include/acconfig.h
+6
-2
drivers/acpi/include/acdisasm.h
drivers/acpi/include/acdisasm.h
+4
-1
drivers/acpi/include/acevents.h
drivers/acpi/include/acevents.h
+2
-2
drivers/acpi/include/acinterp.h
drivers/acpi/include/acinterp.h
+4
-3
drivers/acpi/include/aclocal.h
drivers/acpi/include/aclocal.h
+2
-2
drivers/acpi/include/acpiosxf.h
drivers/acpi/include/acpiosxf.h
+1
-1
drivers/acpi/include/acpixf.h
drivers/acpi/include/acpixf.h
+1
-1
drivers/acpi/include/actypes.h
drivers/acpi/include/actypes.h
+2
-1
drivers/acpi/include/amlcode.h
drivers/acpi/include/amlcode.h
+3
-2
drivers/acpi/namespace/nsdump.c
drivers/acpi/namespace/nsdump.c
+2
-2
drivers/acpi/namespace/nsobject.c
drivers/acpi/namespace/nsobject.c
+25
-15
drivers/acpi/namespace/nsutils.c
drivers/acpi/namespace/nsutils.c
+7
-3
drivers/acpi/namespace/nsxfeval.c
drivers/acpi/namespace/nsxfeval.c
+12
-7
drivers/acpi/osl.c
drivers/acpi/osl.c
+2
-2
drivers/acpi/power.c
drivers/acpi/power.c
+4
-9
drivers/acpi/processor.c
drivers/acpi/processor.c
+10
-16
drivers/acpi/scan.c
drivers/acpi/scan.c
+2
-0
drivers/acpi/tables/tbconvrt.c
drivers/acpi/tables/tbconvrt.c
+13
-13
drivers/acpi/tables/tbxfroot.c
drivers/acpi/tables/tbxfroot.c
+7
-2
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+10
-16
drivers/acpi/utilities/utmisc.c
drivers/acpi/utilities/utmisc.c
+2
-2
No files found.
drivers/acpi/ac.c
View file @
8270dc79
...
...
@@ -159,12 +159,6 @@ acpi_ac_add_fs (
ACPI_FUNCTION_TRACE
(
"acpi_ac_add_fs"
);
if
(
!
acpi_ac_dir
)
{
acpi_ac_dir
=
proc_mkdir
(
ACPI_AC_CLASS
,
acpi_root_dir
);
if
(
!
acpi_ac_dir
)
return_VALUE
(
-
ENODEV
);
}
if
(
!
acpi_device_dir
(
device
))
{
acpi_device_dir
(
device
)
=
proc_mkdir
(
acpi_device_bid
(
device
),
acpi_ac_dir
);
...
...
@@ -194,9 +188,6 @@ acpi_ac_remove_fs (
{
ACPI_FUNCTION_TRACE
(
"acpi_ac_remove_fs"
);
if
(
!
acpi_ac_dir
)
return_VALUE
(
-
ENODEV
);
if
(
acpi_device_dir
(
device
))
remove_proc_entry
(
acpi_device_bid
(
device
),
acpi_ac_dir
);
...
...
@@ -330,6 +321,10 @@ acpi_ac_init (void)
ACPI_FUNCTION_TRACE
(
"acpi_ac_init"
);
acpi_ac_dir
=
proc_mkdir
(
ACPI_AC_CLASS
,
acpi_root_dir
);
if
(
!
acpi_ac_dir
)
return_VALUE
(
-
ENODEV
);
result
=
acpi_bus_register_driver
(
&
acpi_ac_driver
);
if
(
result
<
0
)
{
remove_proc_entry
(
ACPI_AC_CLASS
,
acpi_root_dir
);
...
...
@@ -343,13 +338,11 @@ acpi_ac_init (void)
void
__exit
acpi_ac_exit
(
void
)
{
int
result
=
0
;
ACPI_FUNCTION_TRACE
(
"acpi_ac_exit"
);
result
=
acpi_bus_unregister_driver
(
&
acpi_ac_driver
);
if
(
!
result
)
remove_proc_entry
(
ACPI_AC_CLASS
,
acpi_root_dir
);
acpi_bus_unregister_driver
(
&
acpi_ac_driver
);
remove_proc_entry
(
ACPI_AC_CLASS
,
acpi_root_dir
);
return_VOID
;
}
...
...
drivers/acpi/battery.c
View file @
8270dc79
...
...
@@ -615,12 +615,6 @@ acpi_battery_add_fs (
ACPI_FUNCTION_TRACE
(
"acpi_battery_add_fs"
);
if
(
!
acpi_battery_dir
)
{
acpi_battery_dir
=
proc_mkdir
(
ACPI_BATTERY_CLASS
,
acpi_root_dir
);
if
(
!
acpi_battery_dir
)
return_VALUE
(
-
ENODEV
);
}
if
(
!
acpi_device_dir
(
device
))
{
acpi_device_dir
(
device
)
=
proc_mkdir
(
acpi_device_bid
(
device
),
acpi_battery_dir
);
...
...
@@ -675,9 +669,6 @@ acpi_battery_remove_fs (
{
ACPI_FUNCTION_TRACE
(
"acpi_battery_remove_fs"
);
if
(
!
acpi_battery_dir
)
return_VALUE
(
-
ENODEV
);
if
(
acpi_device_dir
(
device
))
remove_proc_entry
(
acpi_device_bid
(
device
),
acpi_battery_dir
);
...
...
@@ -812,6 +803,10 @@ acpi_battery_init (void)
ACPI_FUNCTION_TRACE
(
"acpi_battery_init"
);
acpi_battery_dir
=
proc_mkdir
(
ACPI_BATTERY_CLASS
,
acpi_root_dir
);
if
(
!
acpi_battery_dir
)
return_VALUE
(
-
ENODEV
);
result
=
acpi_bus_register_driver
(
&
acpi_battery_driver
);
if
(
result
<
0
)
{
remove_proc_entry
(
ACPI_BATTERY_CLASS
,
acpi_root_dir
);
...
...
@@ -825,13 +820,11 @@ acpi_battery_init (void)
static
void
__exit
acpi_battery_exit
(
void
)
{
int
result
=
0
;
ACPI_FUNCTION_TRACE
(
"acpi_battery_exit"
);
result
=
acpi_bus_unregister_driver
(
&
acpi_battery_driver
);
if
(
!
result
)
remove_proc_entry
(
ACPI_BATTERY_CLASS
,
acpi_root_dir
);
acpi_bus_unregister_driver
(
&
acpi_battery_driver
);
remove_proc_entry
(
ACPI_BATTERY_CLASS
,
acpi_root_dir
);
return_VOID
;
}
...
...
drivers/acpi/bus.c
View file @
8270dc79
...
...
@@ -27,6 +27,7 @@
#include <linux/list.h>
#include <linux/sched.h>
#include <linux/pm.h>
#include <linux/device.h>
#include <linux/proc_fs.h>
#ifdef CONFIG_X86
#include <asm/mpspec.h>
...
...
drivers/acpi/button.c
View file @
8270dc79
...
...
@@ -141,12 +141,6 @@ acpi_button_add_fs (
button
=
acpi_driver_data
(
device
);
if
(
!
acpi_button_dir
)
{
acpi_button_dir
=
proc_mkdir
(
ACPI_BUTTON_CLASS
,
acpi_root_dir
);
if
(
!
acpi_button_dir
)
return_VALUE
(
-
ENODEV
);
}
switch
(
button
->
type
)
{
case
ACPI_BUTTON_TYPE_POWER
:
case
ACPI_BUTTON_TYPE_POWERF
:
...
...
@@ -190,9 +184,6 @@ acpi_button_remove_fs (
{
ACPI_FUNCTION_TRACE
(
"acpi_button_remove_fs"
);
if
(
!
acpi_button_dir
)
return_VALUE
(
-
ENODEV
);
if
(
acpi_device_dir
(
device
))
remove_proc_entry
(
acpi_device_bid
(
device
),
acpi_button_dir
);
...
...
@@ -446,9 +437,15 @@ acpi_button_init (void)
ACPI_FUNCTION_TRACE
(
"acpi_button_init"
);
acpi_button_dir
=
proc_mkdir
(
ACPI_BUTTON_CLASS
,
acpi_root_dir
);
if
(
!
acpi_button_dir
)
return_VALUE
(
-
ENODEV
);
result
=
acpi_bus_register_driver
(
&
acpi_button_driver
);
if
(
result
<
0
)
if
(
result
<
0
)
{
remove_proc_entry
(
ACPI_BUTTON_CLASS
,
acpi_root_dir
);
return_VALUE
(
-
ENODEV
);
}
return_VALUE
(
0
);
}
...
...
@@ -461,6 +458,8 @@ acpi_button_exit (void)
acpi_bus_unregister_driver
(
&
acpi_button_driver
);
remove_proc_entry
(
ACPI_BUTTON_CLASS
,
acpi_root_dir
);
return_VOID
;
}
...
...
drivers/acpi/dispatcher/dsmethod.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
* $Revision: 8
8
$
* $Revision: 8
9
$
*
*****************************************************************************/
...
...
@@ -216,7 +216,7 @@ acpi_ds_begin_method_execution (
* interpreter if we block
*/
status
=
acpi_ex_system_wait_semaphore
(
obj_desc
->
method
.
semaphore
,
WAIT_FOREVER
);
ACPI_
WAIT_FOREVER
);
}
/*
...
...
drivers/acpi/dispatcher/dswstate.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: dswstate - Dispatcher parse tree walk management routines
* $Revision:
69
$
* $Revision:
70
$
*
*****************************************************************************/
...
...
@@ -345,7 +345,7 @@ acpi_ds_result_push (
*
* RETURN: Status
*
* DESCRIPTION:
* DESCRIPTION:
Push an object onto the Walk_state result stack.
*
******************************************************************************/
...
...
@@ -381,7 +381,7 @@ acpi_ds_result_stack_push (
*
* RETURN: Status
*
* DESCRIPTION:
* DESCRIPTION:
Pop an object off of the Walk_state result stack.
*
******************************************************************************/
...
...
drivers/acpi/ec.c
View file @
8270dc79
...
...
@@ -477,12 +477,6 @@ acpi_ec_add_fs (
ACPI_FUNCTION_TRACE
(
"acpi_ec_add_fs"
);
if
(
!
acpi_ec_dir
)
{
acpi_ec_dir
=
proc_mkdir
(
ACPI_EC_CLASS
,
acpi_root_dir
);
if
(
!
acpi_ec_dir
)
return_VALUE
(
-
ENODEV
);
}
if
(
!
acpi_device_dir
(
device
))
{
acpi_device_dir
(
device
)
=
proc_mkdir
(
acpi_device_bid
(
device
),
acpi_ec_dir
);
...
...
@@ -508,12 +502,6 @@ acpi_ec_remove_fs (
{
ACPI_FUNCTION_TRACE
(
"acpi_ec_remove_fs"
);
if
(
!
acpi_ec_dir
)
return_VALUE
(
-
ENODEV
);
if
(
acpi_device_dir
(
device
))
remove_proc_entry
(
acpi_device_bid
(
device
),
acpi_ec_dir
);
return_VALUE
(
0
);
}
...
...
@@ -789,13 +777,24 @@ static int __init acpi_ec_init (void)
if
(
acpi_disabled
)
return_VALUE
(
0
);
acpi_ec_dir
=
proc_mkdir
(
ACPI_EC_CLASS
,
acpi_root_dir
);
if
(
!
acpi_ec_dir
)
return_VALUE
(
-
ENODEV
);
/* Now register the driver for the EC */
result
=
acpi_bus_register_driver
(
&
acpi_ec_driver
);
if
(
result
<
0
)
{
remove_proc_entry
(
ACPI_EC_CLASS
,
acpi_root_dir
);
return_VALUE
(
-
ENODEV
);
}
return_VALUE
(
result
);
}
subsys_initcall
(
acpi_ec_init
);
/* EC driver currently not unloadable */
#if 0
static void __exit
acpi_ec_ecdt_exit (void)
{
...
...
@@ -813,17 +812,15 @@ acpi_ec_ecdt_exit (void)
static void __exit
acpi_ec_exit (void)
{
int
result
=
0
;
ACPI_FUNCTION_TRACE("acpi_ec_exit");
result
=
acpi_bus_unregister_driver
(
&
acpi_ec_driver
);
if
(
!
result
)
remove_proc_entry
(
ACPI_EC_CLASS
,
acpi_root_dir
);
acpi_bus_unregister_driver(&acpi_ec_driver);
remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir);
acpi_ec_ecdt_exit();
return_VOID;
}
#endif /* 0 */
drivers/acpi/events/evevent.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: evevent - Fixed and General Purpose Even handling and dispatch
* $Revision: 9
5
$
* $Revision: 9
6
$
*
*****************************************************************************/
...
...
@@ -503,9 +503,9 @@ acpi_ev_gpe_initialize (void)
ACPI_REPORT_INFO
((
"GPE Block%d defined as GPE%d to GPE%d
\n
"
,
(
s32
)
gpe_block
,
acpi_gbl_gpe_block_info
[
gpe_block
].
block_base_number
,
acpi_gbl_gpe_block_info
[
gpe_block
].
block_base_number
+
((
acpi_gbl_gpe_block_info
[
gpe_block
].
register_count
*
8
)
-
1
)));
(
u32
)
acpi_gbl_gpe_block_info
[
gpe_block
].
block_base_number
,
(
u32
)
(
acpi_gbl_gpe_block_info
[
gpe_block
].
block_base_number
+
((
acpi_gbl_gpe_block_info
[
gpe_block
].
register_count
*
8
)
-
1
)))
)
;
}
}
...
...
drivers/acpi/events/evmisc.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: evmisc - Miscellaneous event manager support functions
* $Revision: 5
7
$
* $Revision: 5
8
$
*
*****************************************************************************/
...
...
@@ -433,7 +433,7 @@ acpi_ev_init_global_lock_handler (void)
acpi_status
acpi_ev_acquire_global_lock
(
u
32
timeout
)
u
16
timeout
)
{
acpi_status
status
=
AE_OK
;
u8
acquired
=
FALSE
;
...
...
drivers/acpi/events/evxface.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: evxface - External interfaces for ACPI events
* $Revision: 13
1
$
* $Revision: 13
2
$
*
*****************************************************************************/
...
...
@@ -612,7 +612,7 @@ acpi_remove_gpe_handler (
acpi_status
acpi_acquire_global_lock
(
u
32
timeout
,
u
16
timeout
,
u32
*
handle
)
{
acpi_status
status
;
...
...
drivers/acpi/executer/exdump.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: exdump - Interpreter debug output routines
* $Revision: 16
2
$
* $Revision: 16
3
$
*
*****************************************************************************/
...
...
@@ -590,6 +590,7 @@ acpi_ex_dump_object_descriptor (
acpi_ex_out_integer
(
"Length"
,
obj_desc
->
buffer
.
length
);
acpi_ex_out_pointer
(
"Pointer"
,
obj_desc
->
buffer
.
pointer
);
ACPI_DUMP_BUFFER
(
obj_desc
->
buffer
.
pointer
,
obj_desc
->
buffer
.
length
);
break
;
...
...
drivers/acpi/executer/exfield.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: exfield - ACPI AML (p-code) execution - field manipulation
* $Revision: 11
2
$
* $Revision: 11
3
$
*
*****************************************************************************/
...
...
@@ -27,6 +27,8 @@
#include "acpi.h"
#include "acdispat.h"
#include "acinterp.h"
#include "acevents.h"
#include "amlcode.h"
#define _COMPONENT ACPI_EXECUTER
...
...
@@ -82,6 +84,45 @@ acpi_ex_read_data_from_field (
}
}
}
else
if
((
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_LOCAL_REGION_FIELD
)
&&
(
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
ACPI_ADR_SPACE_SMBUS
))
{
/*
* This is an SMBus read. We must create a buffer to hold the data
* and directly access the region handler.
*/
buffer_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_BUFFER
);
if
(
!
buffer_desc
)
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
/* Create the actual read buffer */
buffer_desc
->
buffer
.
pointer
=
ACPI_MEM_CALLOCATE
(
ACPI_SMBUS_BUFFER_SIZE
);
if
(
!
buffer_desc
->
buffer
.
pointer
)
{
acpi_ut_remove_reference
(
buffer_desc
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
/* Complete the buffer object initialization */
buffer_desc
->
common
.
flags
=
AOPOBJ_DATA_VALID
;
buffer_desc
->
buffer
.
length
=
ACPI_SMBUS_BUFFER_SIZE
;
buffer
=
buffer_desc
->
buffer
.
pointer
;
/* Lock entire transaction if requested */
locked
=
acpi_ex_acquire_global_lock
(
obj_desc
->
common_field
.
field_flags
);
/*
* Perform the read.
* Note: Smbus protocol value is passed in upper 16-bits of Function
*/
status
=
acpi_ex_access_region
(
obj_desc
,
0
,
(
acpi_integer
*
)
buffer_desc
->
buffer
.
pointer
,
ACPI_READ
|
(
obj_desc
->
field
.
attribute
<<
16
));
acpi_ex_release_global_lock
(
locked
);
goto
exit
;
}
/*
* Allocate a buffer for the contents of the field.
...
...
@@ -138,17 +179,17 @@ acpi_ex_read_data_from_field (
obj_desc
->
common_field
.
start_field_bit_offset
,
obj_desc
->
common_field
.
base_byte_offset
));
/* Lock entire transaction if requested */
locked
=
acpi_ex_acquire_global_lock
(
obj_desc
->
common_field
.
field_flags
);
/* Read from the field */
status
=
acpi_ex_extract_from_field
(
obj_desc
,
buffer
,
length
);
/*
* Release global lock if we acquired it earlier
*/
acpi_ex_release_global_lock
(
locked
);
exit:
if
(
ACPI_FAILURE
(
status
))
{
acpi_ut_remove_reference
(
buffer_desc
);
}
...
...
@@ -176,7 +217,8 @@ acpi_ex_read_data_from_field (
acpi_status
acpi_ex_write_data_to_field
(
acpi_operand_object
*
source_desc
,
acpi_operand_object
*
obj_desc
)
acpi_operand_object
*
obj_desc
,
acpi_operand_object
**
result_desc
)
{
acpi_status
status
;
u32
length
;
...
...
@@ -184,6 +226,7 @@ acpi_ex_write_data_to_field (
void
*
buffer
;
void
*
new_buffer
;
u8
locked
;
acpi_operand_object
*
buffer_desc
;
ACPI_FUNCTION_TRACE_PTR
(
"Ex_write_data_to_field"
,
obj_desc
);
...
...
@@ -207,6 +250,64 @@ acpi_ex_write_data_to_field (
}
}
}
else
if
((
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_LOCAL_REGION_FIELD
)
&&
(
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
ACPI_ADR_SPACE_SMBUS
))
{
/*
* This is an SMBus write. We will bypass the entire field mechanism
* and handoff the buffer directly to the handler.
*
* Source must be a buffer of sufficient size (ACPI_SMBUS_BUFFER_SIZE).
*/
if
(
ACPI_GET_OBJECT_TYPE
(
source_desc
)
!=
ACPI_TYPE_BUFFER
)
{
ACPI_REPORT_ERROR
((
"SMBus write requires Buffer, found type %s
\n
"
,
acpi_ut_get_object_type_name
(
source_desc
)));
return_ACPI_STATUS
(
AE_AML_OPERAND_TYPE
);
}
if
(
source_desc
->
buffer
.
length
<
ACPI_SMBUS_BUFFER_SIZE
)
{
ACPI_REPORT_ERROR
((
"SMBus write requires Buffer of length %X, found length %X
\n
"
,
ACPI_SMBUS_BUFFER_SIZE
,
source_desc
->
buffer
.
length
));
return_ACPI_STATUS
(
AE_AML_BUFFER_LIMIT
);
}
buffer_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_BUFFER
);
if
(
!
buffer_desc
)
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
/* Create the actual read buffer */
buffer_desc
->
buffer
.
pointer
=
ACPI_MEM_CALLOCATE
(
ACPI_SMBUS_BUFFER_SIZE
);
if
(
!
buffer_desc
->
buffer
.
pointer
)
{
acpi_ut_remove_reference
(
buffer_desc
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
/* Complete the buffer object initialization */
buffer_desc
->
common
.
flags
=
AOPOBJ_DATA_VALID
;
buffer_desc
->
buffer
.
length
=
ACPI_SMBUS_BUFFER_SIZE
;
buffer
=
buffer_desc
->
buffer
.
pointer
;
ACPI_MEMCPY
(
buffer
,
source_desc
->
buffer
.
pointer
,
ACPI_SMBUS_BUFFER_SIZE
);
/* Lock entire transaction if requested */
locked
=
acpi_ex_acquire_global_lock
(
obj_desc
->
common_field
.
field_flags
);
/*
* Perform the write (returns status and perhaps data in the same buffer)
* Note: SMBus protocol type is passed in upper 16-bits of Function.
*/
status
=
acpi_ex_access_region
(
obj_desc
,
0
,
(
acpi_integer
*
)
buffer
,
ACPI_WRITE
|
(
obj_desc
->
field
.
attribute
<<
16
));
acpi_ex_release_global_lock
(
locked
);
*
result_desc
=
buffer_desc
;
return_ACPI_STATUS
(
status
);
}
/*
* Get a pointer to the data to be written
...
...
@@ -267,16 +368,13 @@ acpi_ex_write_data_to_field (
obj_desc
->
common_field
.
start_field_bit_offset
,
obj_desc
->
common_field
.
base_byte_offset
));
/* Lock entire transaction if requested */
locked
=
acpi_ex_acquire_global_lock
(
obj_desc
->
common_field
.
field_flags
);
/*
* Write to the field
*/
status
=
acpi_ex_insert_into_field
(
obj_desc
,
buffer
,
length
);
/* Write to the field */
/*
* Release global lock if we acquired it earlier
*/
status
=
acpi_ex_insert_into_field
(
obj_desc
,
buffer
,
length
);
acpi_ex_release_global_lock
(
locked
);
/* Free temporary buffer if we used one */
...
...
drivers/acpi/executer/exfldio.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: exfldio - Aml Field I/O
* $Revision:
89
$
* $Revision:
90
$
*
*****************************************************************************/
...
...
@@ -64,6 +64,8 @@ acpi_ex_setup_region (
rgn_desc
=
obj_desc
->
common_field
.
region_obj
;
/* We must have a valid region */
if
(
ACPI_GET_OBJECT_TYPE
(
rgn_desc
)
!=
ACPI_TYPE_REGION
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Needed Region, found type %X (%s)
\n
"
,
ACPI_GET_OBJECT_TYPE
(
rgn_desc
),
...
...
@@ -83,6 +85,12 @@ acpi_ex_setup_region (
}
}
if
(
rgn_desc
->
region
.
space_id
==
ACPI_ADR_SPACE_SMBUS
)
{
/* SMBus has a non-linear address space */
return_ACPI_STATUS
(
AE_OK
);
}
/*
* Validate the request. The entire request from the byte offset for a
* length of one field datum (access width) must fit within the region.
...
...
@@ -127,8 +135,10 @@ acpi_ex_setup_region (
* PARAMETERS: *Obj_desc - Field to be read
* Field_datum_byte_offset - Byte offset of this datum within the
* parent field
* *Value - Where to store value (must be 32 bits)
* Read_write - Read or Write flag
* *Value - Where to store value (must at least
* the size of acpi_integer)
* Function - Read or Write flag plus other region-
* dependent flags
*
* RETURN: Status
*
...
...
@@ -141,7 +151,7 @@ acpi_ex_access_region (
acpi_operand_object
*
obj_desc
,
u32
field_datum_byte_offset
,
acpi_integer
*
value
,
u32
read_write
)
u32
function
)
{
acpi_status
status
;
acpi_operand_object
*
rgn_desc
;
...
...
@@ -151,6 +161,15 @@ acpi_ex_access_region (
ACPI_FUNCTION_TRACE
(
"Ex_access_region"
);
/*
* Ensure that the region operands are fully evaluated and verify
* the validity of the request
*/
status
=
acpi_ex_setup_region
(
obj_desc
,
field_datum_byte_offset
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
/*
* The physical address of this field datum is:
*
...
...
@@ -163,7 +182,7 @@ acpi_ex_access_region (
+
obj_desc
->
common_field
.
base_byte_offset
+
field_datum_byte_offset
;
if
(
read_write
==
ACPI_READ
)
{
if
(
(
function
&
ACPI_IO_MASK
)
==
ACPI_READ
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
"[READ]"
));
}
else
{
...
...
@@ -181,7 +200,7 @@ acpi_ex_access_region (
/* Invoke the appropriate Address_space/Op_region handler */
status
=
acpi_ev_address_space_dispatch
(
rgn_desc
,
read_write
,
status
=
acpi_ev_address_space_dispatch
(
rgn_desc
,
function
,
address
,
ACPI_MUL_8
(
obj_desc
->
common_field
.
access_byte_width
),
value
);
if
(
ACPI_FAILURE
(
status
))
{
...
...
@@ -191,7 +210,6 @@ acpi_ex_access_region (
acpi_ut_get_region_name
(
rgn_desc
->
region
.
space_id
),
rgn_desc
->
region
.
space_id
));
}
else
if
(
status
==
AE_NOT_EXIST
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Region %s(%X) has no handler
\n
"
,
...
...
@@ -371,11 +389,6 @@ acpi_ex_field_datum_io (
* For simple Region_fields, we just directly access the owning
* Operation Region.
*/
status
=
acpi_ex_setup_region
(
obj_desc
,
field_datum_byte_offset
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
status
=
acpi_ex_access_region
(
obj_desc
,
field_datum_byte_offset
,
value
,
read_write
);
break
;
...
...
drivers/acpi/executer/exoparg1.c
View file @
8270dc79
...
...
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exoparg1 - AML execution - opcodes with 1 argument
* $Revision: 14
4
$
* $Revision: 14
5
$
*
*****************************************************************************/
...
...
@@ -389,14 +389,16 @@ acpi_ex_opcode_1A_1T_1R (
return_ACPI_STATUS
(
status
);
}
/*
* Normally, we would remove a reference on the Operand[0] parameter;
* But since it is being used as the internal return object
* (meaning we would normally increment it), the two cancel out,
* and we simply don't do anything.
*/
walk_state
->
result_obj
=
operand
[
0
];
walk_state
->
operands
[
0
]
=
NULL
;
/* Prevent deletion */
if
(
!
walk_state
->
result_obj
)
{
/*
* Normally, we would remove a reference on the Operand[0] parameter;
* But since it is being used as the internal return object
* (meaning we would normally increment it), the two cancel out,
* and we simply don't do anything.
*/
walk_state
->
result_obj
=
operand
[
0
];
walk_state
->
operands
[
0
]
=
NULL
;
/* Prevent deletion */
}
return_ACPI_STATUS
(
status
);
...
...
@@ -461,7 +463,9 @@ acpi_ex_opcode_1A_1T_1R (
cleanup:
walk_state
->
result_obj
=
return_desc
;
if
(
!
walk_state
->
result_obj
)
{
walk_state
->
result_obj
=
return_desc
;
}
/* Delete return object on error */
...
...
drivers/acpi/executer/exoparg2.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: exoparg2 - AML execution - opcodes with 2 arguments
* $Revision: 11
3
$
* $Revision: 11
4
$
*
*****************************************************************************/
...
...
@@ -490,7 +490,9 @@ acpi_ex_opcode_2A_1T_1R (
goto
cleanup
;
}
walk_state
->
result_obj
=
return_desc
;
if
(
!
walk_state
->
result_obj
)
{
walk_state
->
result_obj
=
return_desc
;
}
}
...
...
drivers/acpi/executer/exoparg3.c
View file @
8270dc79
...
...
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exoparg3 - AML execution - opcodes with 3 arguments
* $Revision: 1
4
$
* $Revision: 1
5
$
*
*****************************************************************************/
...
...
@@ -226,7 +226,9 @@ acpi_ex_opcode_3A_1T_1R (
/* Set the return object and exit */
walk_state
->
result_obj
=
return_desc
;
if
(
!
walk_state
->
result_obj
)
{
walk_state
->
result_obj
=
return_desc
;
}
return_ACPI_STATUS
(
status
);
}
...
...
drivers/acpi/executer/exprep.c
View file @
8270dc79
...
...
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exprep - ACPI AML (p-code) execution - field prep utilities
* $Revision: 12
0
$
* $Revision: 12
1
$
*
*****************************************************************************/
...
...
@@ -107,28 +107,24 @@ acpi_ex_decode_field_access (
break
;
case
AML_FIELD_ACCESS_BYTE
:
case
AML_FIELD_ACCESS_BUFFER
:
/* ACPI 2.0 (SMBus Buffer) */
byte_alignment
=
1
;
bit_length
=
8
;
bit_length
=
8
;
break
;
case
AML_FIELD_ACCESS_WORD
:
byte_alignment
=
2
;
bit_length
=
16
;
bit_length
=
16
;
break
;
case
AML_FIELD_ACCESS_DWORD
:
byte_alignment
=
4
;
bit_length
=
32
;
bit_length
=
32
;
break
;
case
AML_FIELD_ACCESS_QWORD
:
/* ACPI 2.0 */
case
AML_FIELD_ACCESS_QWORD
:
/* ACPI 2.0 */
byte_alignment
=
8
;
bit_length
=
64
;
break
;
case
AML_FIELD_ACCESS_BUFFER
:
/* ACPI 2.0 */
byte_alignment
=
8
;
bit_length
=
8
;
bit_length
=
64
;
break
;
default:
...
...
drivers/acpi/executer/exstore.c
View file @
8270dc79
...
...
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exstore - AML Interpreter object store support
* $Revision: 17
3
$
* $Revision: 17
4
$
*
*****************************************************************************/
...
...
@@ -81,7 +81,7 @@ acpi_ex_store (
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
dest_desc
)
==
ACPI_DESC_TYPE_NAMED
)
{
/*
* Dest is a namespace node,
* Storing an object into a Name
"container"
* Storing an object into a Name
d node.
*/
status
=
acpi_ex_store_object_to_node
(
source_desc
,
(
acpi_namespace_node
*
)
dest_desc
,
walk_state
);
...
...
@@ -435,7 +435,7 @@ acpi_ex_store_object_to_node (
/*
* For fields, copy the source data to the target field.
*/
status
=
acpi_ex_write_data_to_field
(
source_desc
,
target_desc
);
status
=
acpi_ex_write_data_to_field
(
source_desc
,
target_desc
,
&
walk_state
->
result_obj
);
break
;
...
...
drivers/acpi/executer/exsystem.c
View file @
8270dc79
...
...
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exsystem - Interface to OS services
* $Revision: 7
3
$
* $Revision: 7
4
$
*
*****************************************************************************/
...
...
@@ -51,7 +51,7 @@
acpi_status
acpi_ex_system_wait_semaphore
(
acpi_handle
semaphore
,
u
32
timeout
)
u
16
timeout
)
{
acpi_status
status
;
acpi_status
status2
;
...
...
@@ -201,12 +201,12 @@ acpi_ex_system_acquire_mutex (
* Support for the _GL_ Mutex object -- go get the global lock
*/
if
(
obj_desc
->
mutex
.
semaphore
==
acpi_gbl_global_lock_semaphore
)
{
status
=
acpi_ev_acquire_global_lock
((
u
32
)
time_desc
->
integer
.
value
);
status
=
acpi_ev_acquire_global_lock
((
u
16
)
time_desc
->
integer
.
value
);
return_ACPI_STATUS
(
status
);
}
status
=
acpi_ex_system_wait_semaphore
(
obj_desc
->
mutex
.
semaphore
,
(
u
32
)
time_desc
->
integer
.
value
);
(
u
16
)
time_desc
->
integer
.
value
);
return_ACPI_STATUS
(
status
);
}
...
...
@@ -312,7 +312,7 @@ acpi_ex_system_wait_event (
if
(
obj_desc
)
{
status
=
acpi_ex_system_wait_semaphore
(
obj_desc
->
event
.
semaphore
,
(
u
32
)
time_desc
->
integer
.
value
);
(
u
16
)
time_desc
->
integer
.
value
);
}
return_ACPI_STATUS
(
status
);
...
...
drivers/acpi/executer/exutils.c
View file @
8270dc79
...
...
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exutils - interpreter/scanner utilities
* $Revision: 10
5
$
* $Revision: 10
6
$
*
*****************************************************************************/
...
...
@@ -189,7 +189,7 @@ acpi_ex_acquire_global_lock (
if
(
field_flags
&
AML_FIELD_LOCK_RULE_MASK
)
{
/* We should attempt to get the lock, wait forever */
status
=
acpi_ev_acquire_global_lock
(
ACPI_
UINT32_MAX
);
status
=
acpi_ev_acquire_global_lock
(
ACPI_
WAIT_FOREVER
);
if
(
ACPI_SUCCESS
(
status
))
{
locked
=
TRUE
;
}
...
...
drivers/acpi/fan.c
View file @
8270dc79
...
...
@@ -151,12 +151,6 @@ acpi_fan_add_fs (
if
(
!
device
)
return_VALUE
(
-
EINVAL
);
if
(
!
acpi_fan_dir
)
{
acpi_fan_dir
=
proc_mkdir
(
ACPI_FAN_CLASS
,
acpi_root_dir
);
if
(
!
acpi_fan_dir
)
return_VALUE
(
-
ENODEV
);
}
if
(
!
acpi_device_dir
(
device
))
{
acpi_device_dir
(
device
)
=
proc_mkdir
(
acpi_device_bid
(
device
),
acpi_fan_dir
);
...
...
@@ -187,9 +181,6 @@ acpi_fan_remove_fs (
{
ACPI_FUNCTION_TRACE
(
"acpi_fan_remove_fs"
);
if
(
!
acpi_fan_dir
)
return_VALUE
(
-
ENODEV
);
if
(
acpi_device_dir
(
device
))
remove_proc_entry
(
acpi_device_bid
(
device
),
acpi_fan_dir
);
...
...
@@ -276,9 +267,15 @@ acpi_fan_init (void)
ACPI_FUNCTION_TRACE
(
"acpi_fan_init"
);
acpi_fan_dir
=
proc_mkdir
(
ACPI_FAN_CLASS
,
acpi_root_dir
);
if
(
!
acpi_fan_dir
)
return_VALUE
(
-
ENODEV
);
result
=
acpi_bus_register_driver
(
&
acpi_fan_driver
);
if
(
result
<
0
)
if
(
result
<
0
)
{
remove_proc_entry
(
ACPI_FAN_CLASS
,
acpi_root_dir
);
return_VALUE
(
-
ENODEV
);
}
return_VALUE
(
0
);
}
...
...
@@ -287,13 +284,11 @@ acpi_fan_init (void)
void
__exit
acpi_fan_exit
(
void
)
{
int
result
=
0
;
ACPI_FUNCTION_TRACE
(
"acpi_fan_exit"
);
result
=
acpi_bus_unregister_driver
(
&
acpi_fan_driver
);
if
(
!
result
)
remove_proc_entry
(
ACPI_FAN_CLASS
,
acpi_root_dir
);
acpi_bus_unregister_driver
(
&
acpi_fan_driver
);
remove_proc_entry
(
ACPI_FAN_CLASS
,
acpi_root_dir
);
return_VOID
;
}
...
...
drivers/acpi/include/acconfig.h
View file @
8270dc79
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
* $Revision: 11
5
$
* $Revision: 11
7
$
*
*****************************************************************************/
...
...
@@ -54,7 +54,7 @@
/* Version string */
#define ACPI_CA_VERSION 0x200211
0
1
#define ACPI_CA_VERSION 0x200211
1
1
/* Version of ACPI supported */
...
...
@@ -166,6 +166,10 @@
#define ACPI_RSDP_CHECKSUM_LENGTH 20
#define ACPI_RSDP_XCHECKSUM_LENGTH 36
/* SMBus bidirectional buffer size */
#define ACPI_SMBUS_BUFFER_SIZE 34
/******************************************************************************
*
...
...
drivers/acpi/include/acdisasm.h
View file @
8270dc79
/******************************************************************************
*
* Name: acdisasm.h - AML disassembler
* $Revision:
4
$
* $Revision:
5
$
*
*****************************************************************************/
...
...
@@ -239,6 +239,9 @@ void
acpi_dm_bit_list
(
u16
mask
);
void
acpi_dm_decode_attribute
(
u8
attribute
);
/*
* dmresrcl
...
...
drivers/acpi/include/acevents.h
View file @
8270dc79
/******************************************************************************
*
* Name: acevents.h - Event subcomponent prototypes and defines
* $Revision:
79
$
* $Revision:
80
$
*
*****************************************************************************/
...
...
@@ -63,7 +63,7 @@ acpi_ev_is_notify_object (
acpi_status
acpi_ev_acquire_global_lock
(
u
32
timeout
);
u
16
timeout
);
acpi_status
acpi_ev_release_global_lock
(
...
...
drivers/acpi/include/acinterp.h
View file @
8270dc79
/******************************************************************************
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
* $Revision: 14
0
$
* $Revision: 14
2
$
*
*****************************************************************************/
...
...
@@ -164,7 +164,8 @@ acpi_ex_read_data_from_field (
acpi_status
acpi_ex_write_data_to_field
(
acpi_operand_object
*
source_desc
,
acpi_operand_object
*
obj_desc
);
acpi_operand_object
*
obj_desc
,
acpi_operand_object
**
result_desc
);
/*
* exmisc - ACPI AML (p-code) execution - specific opcodes
...
...
@@ -377,7 +378,7 @@ acpi_ex_system_reset_event(
acpi_status
acpi_ex_system_wait_semaphore
(
acpi_handle
semaphore
,
u
32
timeout
);
u
16
timeout
);
/*
...
...
drivers/acpi/include/aclocal.h
View file @
8270dc79
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
* $Revision: 17
8
$
* $Revision: 17
9
$
*
*****************************************************************************/
...
...
@@ -27,7 +27,7 @@
#define __ACLOCAL_H__
#define
WAIT_FOREVER ((u32) -1)
#define
ACPI_WAIT_FOREVER 0xFFFF
/* u16, as per ACPI spec */
typedef
void
*
acpi_mutex
;
typedef
u32
ACPI_MUTEX_HANDLE
;
...
...
drivers/acpi/include/acpiosxf.h
View file @
8270dc79
...
...
@@ -117,7 +117,7 @@ acpi_status
acpi_os_wait_semaphore
(
acpi_handle
handle
,
u32
units
,
u
32
timeout
);
u
16
timeout
);
acpi_status
acpi_os_signal_semaphore
(
...
...
drivers/acpi/include/acpixf.h
View file @
8270dc79
...
...
@@ -281,7 +281,7 @@ acpi_install_gpe_handler (
acpi_status
acpi_acquire_global_lock
(
u
32
timeout
,
u
16
timeout
,
u32
*
handle
);
acpi_status
...
...
drivers/acpi/include/actypes.h
View file @
8270dc79
/******************************************************************************
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
* $Revision: 24
0
$
* $Revision: 24
1
$
*
*****************************************************************************/
...
...
@@ -499,6 +499,7 @@ typedef u32 acpi_object_type;
*/
#define ACPI_READ 0
#define ACPI_WRITE 1
#define ACPI_IO_MASK 1
/*
...
...
drivers/acpi/include/amlcode.h
View file @
8270dc79
...
...
@@ -3,7 +3,7 @@
* Name: amlcode.h - Definitions for AML, as included in "definition blocks"
* Declarations and definitions contained herein are derived
* directly from the ACPI specification.
* $Revision: 7
0
$
* $Revision: 7
1
$
*
*****************************************************************************/
...
...
@@ -462,7 +462,8 @@ typedef enum
AML_FIELD_ATTRIB_SMB_BYTE
=
0x06
,
AML_FIELD_ATTRIB_SMB_WORD
=
0x08
,
AML_FIELD_ATTRIB_SMB_BLOCK
=
0x0A
,
AML_FIELD_ATTRIB_SMB_CALL
=
0x0E
AML_FIELD_ATTRIB_SMB_WORD_CALL
=
0x0C
,
AML_FIELD_ATTRIB_SMB_BLOCK_CALL
=
0x0D
}
AML_ACCESS_ATTRIBUTE
;
...
...
drivers/acpi/namespace/nsdump.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
* $Revision: 14
5
$
* $Revision: 14
6
$
*
*****************************************************************************/
...
...
@@ -180,7 +180,7 @@ acpi_ns_dump_one_object (
/* Indent the object according to the level */
acpi_os_printf
(
"%2d%*s"
,
level
-
1
,
level
*
2
,
" "
);
acpi_os_printf
(
"%2d%*s"
,
(
u32
)
level
-
1
,
(
int
)
level
*
2
,
" "
);
/* Check the node type and name */
...
...
drivers/acpi/namespace/nsobject.c
View file @
8270dc79
...
...
@@ -2,7 +2,7 @@
*
* Module Name: nsobject - Utilities for objects attached to namespace
* table entries
* $Revision: 8
4
$
* $Revision: 8
5
$
*
******************************************************************************/
...
...
@@ -173,13 +173,13 @@ acpi_ns_attach_object (
*
* FUNCTION: Acpi_ns_detach_object
*
* PARAMETERS: Node - An
object whose Value will be delet
ed
* PARAMETERS: Node - An
node whose object will be detach
ed
*
* RETURN: None.
*
* DESCRIPTION: De
lete the Value associated with a namespace object. If the
*
Value is an allocated object, it is freed. Otherwise, the
* field is simply cleared.
* DESCRIPTION: De
tach/delete an object associated with a namespace node.
*
if the object is an allocated object, it is freed.
*
Otherwise, the
field is simply cleared.
*
******************************************************************************/
...
...
@@ -234,6 +234,8 @@ acpi_ns_detach_object (
* RETURN: Current value of the object field from the Node whose
* handle is passed
*
* DESCRIPTION: Obtain the object attached to a namespace node.
*
******************************************************************************/
acpi_operand_object
*
...
...
@@ -266,7 +268,9 @@ acpi_ns_get_attached_object (
* PARAMETERS: Node - Parent Node to be examined
*
* RETURN: Current value of the object field from the Node whose
* handle is passed
* handle is passed.
*
* DESCRIPTION: Obtain a secondary object associated with a namespace node.
*
******************************************************************************/
...
...
@@ -292,11 +296,13 @@ acpi_ns_get_secondary_object (
*
* FUNCTION: Acpi_ns_attach_data
*
* PARAMETERS:
* PARAMETERS: Node - Namespace node
* Handler - Handler to be associated with the data
* Data - Data to be attached
*
* RETURN: Status
*
* DESCRIPTION:
* DESCRIPTION:
Low-level attach data. Create and attach a Data object.
*
******************************************************************************/
...
...
@@ -311,7 +317,8 @@ acpi_ns_attach_data (
acpi_operand_object
*
data_desc
;
/* */
/* We only allow one attachment per handler */
prev_obj_desc
=
NULL
;
obj_desc
=
node
->
object
;
while
(
obj_desc
)
{
...
...
@@ -324,7 +331,6 @@ acpi_ns_attach_data (
obj_desc
=
obj_desc
->
common
.
next_object
;
}
/* Create an internal object for the data */
data_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_LOCAL_DATA
);
...
...
@@ -335,7 +341,6 @@ acpi_ns_attach_data (
data_desc
->
data
.
handler
=
handler
;
data_desc
->
data
.
pointer
=
data
;
/* Install the data object */
if
(
prev_obj_desc
)
{
...
...
@@ -353,11 +358,13 @@ acpi_ns_attach_data (
*
* FUNCTION: Acpi_ns_detach_data
*
* PARAMETERS:
* PARAMETERS: Node - Namespace node
* Handler - Handler associated with the data
*
* RETURN: Status
*
* DESCRIPTION:
* DESCRIPTION: Low-level detach data. Delete the data node, but the caller
* is responsible for the actual data.
*
******************************************************************************/
...
...
@@ -398,11 +405,14 @@ acpi_ns_detach_data (
*
* FUNCTION: Acpi_ns_get_attached_data
*
* PARAMETERS:
* PARAMETERS: Node - Namespace node
* Handler - Handler associated with the data
* Data - Where the data is returned
*
* RETURN: Status
*
* DESCRIPTION:
* DESCRIPTION: Low level interface to obtain data previously associated with
* a namespace node.
*
******************************************************************************/
...
...
drivers/acpi/namespace/nsutils.c
View file @
8270dc79
...
...
@@ -2,7 +2,7 @@
*
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
* parents and siblings and Scope manipulation
* $Revision: 11
5
$
* $Revision: 11
6
$
*
*****************************************************************************/
...
...
@@ -45,7 +45,7 @@
*
* RETURN: None
*
* DESCRIPTION: Print warning message
* DESCRIPTION: Print warning message
with full pathname
*
******************************************************************************/
...
...
@@ -61,12 +61,16 @@ acpi_ns_report_error (
char
*
name
;
/* Convert path to external format */
status
=
acpi_ns_externalize_name
(
ACPI_UINT32_MAX
,
internal_name
,
NULL
,
&
name
);
acpi_os_printf
(
"%8s-%04d: *** Error: Looking up "
,
module_name
,
line_number
);
if
(
name
)
{
/* Print target name */
if
(
ACPI_SUCCESS
(
status
))
{
acpi_os_printf
(
"[%s]"
,
name
);
}
else
{
...
...
drivers/acpi/namespace/nsxfeval.c
View file @
8270dc79
...
...
@@ -2,7 +2,7 @@
*
* Module Name: nsxfeval - Public interfaces to the ACPI subsystem
* ACPI Object evaluation interfaces
* $Revision:
3
$
* $Revision:
4
$
*
******************************************************************************/
...
...
@@ -570,11 +570,13 @@ acpi_get_devices (
*
* FUNCTION: Acpi_attach_data
*
* PARAMETERS:
* PARAMETERS: Obj_handle - Namespace node
* Handler - Handler for this attachment
* Data - Pointer to data to be attached
*
* RETURN: Status
*
* DESCRIPTION:
* DESCRIPTION:
Attach arbitrary data and handler to a namespace node.
*
******************************************************************************/
...
...
@@ -621,11 +623,12 @@ acpi_attach_data (
*
* FUNCTION: Acpi_detach_data
*
* PARAMETERS:
* PARAMETERS: Obj_handle - Namespace node handle
* Handler - Handler used in call to Acpi_attach_data
*
* RETURN: Status
*
* DESCRIPTION:
* DESCRIPTION:
Remove data that was previously attached to a node.
*
******************************************************************************/
...
...
@@ -670,11 +673,13 @@ acpi_detach_data (
*
* FUNCTION: Acpi_get_data
*
* PARAMETERS:
* PARAMETERS: Obj_handle - Namespace node
* Handler - Handler used in call to Attach_data
* Data - Where the data is returned
*
* RETURN: Status
*
* DESCRIPTION:
* DESCRIPTION:
Retrieve data that was previously attached to a namespace node.
*
******************************************************************************/
...
...
drivers/acpi/osl.c
View file @
8270dc79
...
...
@@ -702,7 +702,7 @@ acpi_status
acpi_os_wait_semaphore
(
acpi_handle
handle
,
u32
units
,
u
32
timeout
)
u
16
timeout
)
{
acpi_status
status
=
AE_OK
;
struct
semaphore
*
sem
=
(
struct
semaphore
*
)
handle
;
...
...
@@ -739,7 +739,7 @@ acpi_os_wait_semaphore(
* Wait Indefinitely:
* ------------------
*/
case
WAIT_FOREVER
:
case
ACPI_
WAIT_FOREVER
:
ret
=
down_interruptible
(
sem
);
if
(
ret
<
0
)
status
=
AE_ERROR
;
...
...
drivers/acpi/power.c
View file @
8270dc79
...
...
@@ -443,12 +443,6 @@ acpi_power_add_fs (
if
(
!
device
)
return_VALUE
(
-
EINVAL
);
if
(
!
acpi_power_dir
)
{
acpi_power_dir
=
proc_mkdir
(
ACPI_POWER_CLASS
,
acpi_root_dir
);
if
(
!
acpi_power_dir
)
return_VALUE
(
-
ENODEV
);
}
if
(
!
acpi_device_dir
(
device
))
{
acpi_device_dir
(
device
)
=
proc_mkdir
(
acpi_device_bid
(
device
),
acpi_power_dir
);
...
...
@@ -478,9 +472,6 @@ acpi_power_remove_fs (
{
ACPI_FUNCTION_TRACE
(
"acpi_power_remove_fs"
);
if
(
!
acpi_power_dir
)
return_VALUE
(
-
ENODEV
);
if
(
acpi_device_dir
(
device
))
remove_proc_entry
(
acpi_device_bid
(
device
),
acpi_power_dir
);
...
...
@@ -591,6 +582,10 @@ static int __init acpi_power_init (void)
INIT_LIST_HEAD
(
&
acpi_power_resource_list
);
acpi_power_dir
=
proc_mkdir
(
ACPI_POWER_CLASS
,
acpi_root_dir
);
if
(
!
acpi_power_dir
)
return_VALUE
(
-
ENODEV
);
result
=
acpi_bus_register_driver
(
&
acpi_power_driver
);
if
(
result
<
0
)
{
remove_proc_entry
(
ACPI_POWER_CLASS
,
acpi_root_dir
);
...
...
drivers/acpi/processor.c
View file @
8270dc79
...
...
@@ -2289,13 +2289,6 @@ acpi_processor_add_fs (
ACPI_FUNCTION_TRACE
(
"acpi_processor_add_fs"
);
if
(
!
acpi_processor_dir
)
{
acpi_processor_dir
=
proc_mkdir
(
ACPI_PROCESSOR_CLASS
,
acpi_root_dir
);
if
(
!
acpi_processor_dir
)
return_VALUE
(
-
ENODEV
);
}
if
(
!
acpi_device_dir
(
device
))
{
acpi_device_dir
(
device
)
=
proc_mkdir
(
acpi_device_bid
(
device
),
acpi_processor_dir
);
...
...
@@ -2378,9 +2371,6 @@ acpi_processor_remove_fs (
{
ACPI_FUNCTION_TRACE
(
"acpi_processor_remove_fs"
);
if
(
!
acpi_processor_dir
)
return_VALUE
(
-
ENODEV
);
if
(
acpi_device_dir
(
device
))
remove_proc_entry
(
acpi_device_bid
(
device
),
acpi_processor_dir
);
...
...
@@ -2640,9 +2630,15 @@ acpi_processor_init (void)
memset
(
&
processors
,
0
,
sizeof
(
processors
));
memset
(
&
errata
,
0
,
sizeof
(
errata
));
acpi_processor_dir
=
proc_mkdir
(
ACPI_PROCESSOR_CLASS
,
acpi_root_dir
);
if
(
!
acpi_processor_dir
)
return_VALUE
(
-
ENODEV
);
result
=
acpi_bus_register_driver
(
&
acpi_processor_driver
);
if
(
result
<
0
)
if
(
result
<
0
)
{
remove_proc_entry
(
ACPI_PROCESSOR_CLASS
,
acpi_root_dir
);
return_VALUE
(
-
ENODEV
);
}
return_VALUE
(
0
);
}
...
...
@@ -2651,13 +2647,11 @@ acpi_processor_init (void)
static
void
__exit
acpi_processor_exit
(
void
)
{
int
result
=
0
;
ACPI_FUNCTION_TRACE
(
"acpi_processor_exit"
);
result
=
acpi_bus_unregister_driver
(
&
acpi_processor_driver
);
if
(
!
result
)
remove_proc_entry
(
ACPI_PROCESSOR_CLASS
,
acpi_root_dir
);
acpi_bus_unregister_driver
(
&
acpi_processor_driver
);
remove_proc_entry
(
ACPI_PROCESSOR_CLASS
,
acpi_root_dir
);
return_VOID
;
}
...
...
drivers/acpi/scan.c
View file @
8270dc79
...
...
@@ -258,6 +258,8 @@ acpi_bus_driver_init (
return_VALUE
(
result
);
}
device
->
driver
=
driver
;
/*
* TBD - Configuration Management: Assign resources to device based
* upon possible configuration and currently allocated resources.
...
...
drivers/acpi/tables/tbconvrt.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: tbconvrt - ACPI Table conversion utilities
* $Revision: 4
4
$
* $Revision: 4
5
$
*
*****************************************************************************/
...
...
@@ -36,11 +36,13 @@
*
* FUNCTION: Acpi_tb_get_table_count
*
* PARAMETERS:
* PARAMETERS: RSDP - Pointer to the RSDP
* RSDT - Pointer to the RSDT/XSDT
*
* RETURN:
* RETURN:
The number of tables pointed to by the RSDT or XSDT.
*
* DESCRIPTION: Calculate the number of tables
* DESCRIPTION: Calculate the number of tables. Automatically handles either
* an RSDT or XSDT.
*
******************************************************************************/
...
...
@@ -80,9 +82,9 @@ acpi_tb_get_table_count (
*
* FUNCTION: Acpi_tb_convert_to_xsdt
*
* PARAMETERS:
* PARAMETERS:
Table_info - Info about the RSDT
*
* RETURN:
* RETURN:
Status
*
* DESCRIPTION: Convert an RSDT to an XSDT (internal common format)
*
...
...
@@ -311,13 +313,11 @@ acpi_tb_convert_fadt2 (
*
* RETURN: Status
*
* DESCRIPTION:
* Converts a BIOS supplied ACPI 1.0 FADT to an intermediate
* ACPI 2.0 FADT. If the BIOS supplied a 2.0 FADT then it is simply
* copied to the intermediate FADT. The ACPI CA software uses this
* intermediate FADT. Thus a significant amount of special #ifdef
* type codeing is saved. This intermediate FADT will need to be
* freed at some point.
* DESCRIPTION: Converts a BIOS supplied ACPI 1.0 FADT to a local
* ACPI 2.0 FADT. If the BIOS supplied a 2.0 FADT then it is simply
* copied to the local FADT. The ACPI CA software uses this
* local FADT. Thus a significant amount of special #ifdef
* type codeing is saved.
*
******************************************************************************/
...
...
drivers/acpi/tables/tbxfroot.c
View file @
8270dc79
/******************************************************************************
*
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
* $Revision: 6
4
$
* $Revision: 6
5
$
*
*****************************************************************************/
...
...
@@ -302,7 +302,8 @@ acpi_find_root_pointer (
status
=
acpi_tb_find_rsdp
(
&
table_info
,
flags
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"RSDP structure not found
\n
"
));
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"RSDP structure not found, %s Flags=%X
\n
"
,
acpi_format_exception
(
status
),
flags
));
return_ACPI_STATUS
(
AE_NO_ACPI_TABLES
);
}
...
...
@@ -406,6 +407,8 @@ acpi_tb_find_rsdp (
status
=
acpi_os_map_memory
((
u64
)
LO_RSDP_WINDOW_BASE
,
LO_RSDP_WINDOW_SIZE
,
(
void
**
)
&
table_ptr
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Could not map memory at %X for length %X
\n
"
,
LO_RSDP_WINDOW_BASE
,
LO_RSDP_WINDOW_SIZE
));
return_ACPI_STATUS
(
status
);
}
...
...
@@ -428,6 +431,8 @@ acpi_tb_find_rsdp (
status
=
acpi_os_map_memory
((
u64
)
HI_RSDP_WINDOW_BASE
,
HI_RSDP_WINDOW_SIZE
,
(
void
**
)
&
table_ptr
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Could not map memory at %X for length %X
\n
"
,
HI_RSDP_WINDOW_BASE
,
HI_RSDP_WINDOW_SIZE
));
return_ACPI_STATUS
(
status
);
}
...
...
drivers/acpi/thermal.c
View file @
8270dc79
...
...
@@ -1060,13 +1060,6 @@ acpi_thermal_add_fs (
ACPI_FUNCTION_TRACE
(
"acpi_thermal_add_fs"
);
if
(
!
acpi_thermal_dir
)
{
acpi_thermal_dir
=
proc_mkdir
(
ACPI_THERMAL_CLASS
,
acpi_root_dir
);
if
(
!
acpi_thermal_dir
)
return_VALUE
(
-
ENODEV
);
}
if
(
!
acpi_device_dir
(
device
))
{
acpi_device_dir
(
device
)
=
proc_mkdir
(
acpi_device_bid
(
device
),
acpi_thermal_dir
);
...
...
@@ -1147,9 +1140,6 @@ acpi_thermal_remove_fs (
{
ACPI_FUNCTION_TRACE
(
"acpi_thermal_remove_fs"
);
if
(
!
acpi_thermal_dir
)
return_VALUE
(
-
ENODEV
);
if
(
acpi_device_dir
(
device
))
remove_proc_entry
(
acpi_device_bid
(
device
),
acpi_thermal_dir
);
...
...
@@ -1351,9 +1341,15 @@ acpi_thermal_init (void)
ACPI_FUNCTION_TRACE
(
"acpi_thermal_init"
);
acpi_thermal_dir
=
proc_mkdir
(
ACPI_THERMAL_CLASS
,
acpi_root_dir
);
if
(
!
acpi_thermal_dir
)
return_VALUE
(
-
ENODEV
);
result
=
acpi_bus_register_driver
(
&
acpi_thermal_driver
);
if
(
result
<
0
)
if
(
result
<
0
)
{
remove_proc_entry
(
ACPI_THERMAL_CLASS
,
acpi_root_dir
);
return_VALUE
(
-
ENODEV
);
}
return_VALUE
(
0
);
}
...
...
@@ -1362,13 +1358,11 @@ acpi_thermal_init (void)
static
void
__exit
acpi_thermal_exit
(
void
)
{
int
result
=
0
;
ACPI_FUNCTION_TRACE
(
"acpi_thermal_exit"
);
result
=
acpi_bus_unregister_driver
(
&
acpi_thermal_driver
);
if
(
!
result
)
remove_proc_entry
(
ACPI_THERMAL_CLASS
,
acpi_root_dir
);
acpi_bus_unregister_driver
(
&
acpi_thermal_driver
);
remove_proc_entry
(
ACPI_THERMAL_CLASS
,
acpi_root_dir
);
return_VOID
;
}
...
...
drivers/acpi/utilities/utmisc.c
View file @
8270dc79
/*******************************************************************************
*
* Module Name: utmisc - common utility procedures
* $Revision: 8
5
$
* $Revision: 8
6
$
*
******************************************************************************/
...
...
@@ -685,7 +685,7 @@ acpi_ut_acquire_mutex (
this_thread_id
,
acpi_ut_get_mutex_name
(
mutex_id
)));
status
=
acpi_os_wait_semaphore
(
acpi_gbl_acpi_mutex_info
[
mutex_id
].
mutex
,
1
,
WAIT_FOREVER
);
1
,
ACPI_
WAIT_FOREVER
);
if
(
ACPI_SUCCESS
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_MUTEX
,
"Thread %X acquired Mutex [%s]
\n
"
,
this_thread_id
,
acpi_ut_get_mutex_name
(
mutex_id
)));
...
...
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