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
1d5b953d
Commit
1d5b953d
authored
Mar 26, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux-acpi.bkbits.net/linux-acpi-release-2.6.5
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
75a8032a
5f10ea14
Changes
29
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
537 additions
and
201 deletions
+537
-201
arch/i386/kernel/acpi/boot.c
arch/i386/kernel/acpi/boot.c
+11
-7
drivers/acpi/ec.c
drivers/acpi/ec.c
+2
-2
drivers/acpi/events/evgpe.c
drivers/acpi/events/evgpe.c
+5
-6
drivers/acpi/events/evgpeblk.c
drivers/acpi/events/evgpeblk.c
+209
-33
drivers/acpi/events/evmisc.c
drivers/acpi/events/evmisc.c
+22
-21
drivers/acpi/events/evxfevnt.c
drivers/acpi/events/evxfevnt.c
+19
-6
drivers/acpi/executer/excreate.c
drivers/acpi/executer/excreate.c
+14
-2
drivers/acpi/executer/exdump.c
drivers/acpi/executer/exdump.c
+1
-0
drivers/acpi/executer/exresnte.c
drivers/acpi/executer/exresnte.c
+3
-2
drivers/acpi/executer/exstoren.c
drivers/acpi/executer/exstoren.c
+1
-0
drivers/acpi/hardware/hwgpe.c
drivers/acpi/hardware/hwgpe.c
+57
-41
drivers/acpi/hardware/hwsleep.c
drivers/acpi/hardware/hwsleep.c
+17
-5
drivers/acpi/namespace/nsaccess.c
drivers/acpi/namespace/nsaccess.c
+9
-0
drivers/acpi/namespace/nsdump.c
drivers/acpi/namespace/nsdump.c
+1
-0
drivers/acpi/namespace/nseval.c
drivers/acpi/namespace/nseval.c
+9
-0
drivers/acpi/namespace/nssearch.c
drivers/acpi/namespace/nssearch.c
+6
-0
drivers/acpi/namespace/nsutils.c
drivers/acpi/namespace/nsutils.c
+1
-1
drivers/acpi/namespace/nsxfeval.c
drivers/acpi/namespace/nsxfeval.c
+17
-9
drivers/acpi/osl.c
drivers/acpi/osl.c
+21
-0
drivers/acpi/pci_link.c
drivers/acpi/pci_link.c
+13
-5
drivers/acpi/resources/rsaddr.c
drivers/acpi/resources/rsaddr.c
+7
-6
drivers/acpi/utilities/utglobal.c
drivers/acpi/utilities/utglobal.c
+24
-18
drivers/acpi/utilities/utmisc.c
drivers/acpi/utilities/utmisc.c
+2
-3
include/acpi/acconfig.h
include/acpi/acconfig.h
+1
-1
include/acpi/acglobal.h
include/acpi/acglobal.h
+2
-0
include/acpi/achware.h
include/acpi/achware.h
+2
-2
include/acpi/aclocal.h
include/acpi/aclocal.h
+7
-0
include/acpi/actypes.h
include/acpi/actypes.h
+53
-31
include/acpi/acutils.h
include/acpi/acutils.h
+1
-0
No files found.
arch/i386/kernel/acpi/boot.c
View file @
1d5b953d
...
...
@@ -277,7 +277,7 @@ acpi_parse_ioapic (
* Parse Interrupt Source Override for the ACPI SCI
*/
static
void
acpi_
parse_sci_int_src_ovr
(
u8
bus_irq
,
u16
polarity
,
u16
trigger
,
u32
global_irq
)
acpi_
sci_ioapic_setup
(
u32
gsi
,
u16
polarity
,
u16
trigger
)
{
if
(
trigger
==
0
)
/* compatible SCI trigger is level */
trigger
=
3
;
...
...
@@ -292,13 +292,18 @@ acpi_parse_sci_int_src_ovr(u8 bus_irq, u16 polarity, u16 trigger, u32 global_irq
if
(
acpi_sci_flags
.
polarity
)
polarity
=
acpi_sci_flags
.
polarity
;
mp_override_legacy_irq
(
bus_irq
,
polarity
,
trigger
,
global_irq
);
/*
* mp_config_acpi_legacy_irqs() already setup IRQs < 16
* If GSI is < 16, this will update its flags,
* else it will create a new mp_irqs[] entry.
*/
mp_override_legacy_irq
(
gsi
,
polarity
,
trigger
,
gsi
);
/*
* stash over-ride to indicate we've been here
* and for later update of acpi_fadt
*/
acpi_sci_override_gsi
=
g
lobal_irq
;
acpi_sci_override_gsi
=
g
si
;
return
;
}
...
...
@@ -315,9 +320,8 @@ acpi_parse_int_src_ovr (
acpi_table_print_madt_entry
(
header
);
if
(
intsrc
->
bus_irq
==
acpi_fadt
.
sci_int
)
{
acpi_parse_sci_int_src_ovr
(
intsrc
->
bus_irq
,
intsrc
->
flags
.
polarity
,
intsrc
->
flags
.
trigger
,
intsrc
->
global_irq
);
acpi_sci_ioapic_setup
(
intsrc
->
global_irq
,
intsrc
->
flags
.
polarity
,
intsrc
->
flags
.
trigger
);
return
0
;
}
...
...
@@ -660,7 +664,7 @@ acpi_parse_madt_ioapic_entries(void)
* pretend we got one so we can set the SCI flags.
*/
if
(
!
acpi_sci_override_gsi
)
acpi_
parse_sci_int_src_ovr
(
acpi_fadt
.
sci_int
,
0
,
0
,
acpi_fadt
.
sci_int
);
acpi_
sci_ioapic_setup
(
acpi_fadt
.
sci_int
,
0
,
0
);
count
=
acpi_table_parse_madt
(
ACPI_MADT_NMI_SRC
,
acpi_parse_nmi_src
,
NR_IRQ_VECTORS
);
if
(
count
<
0
)
{
...
...
drivers/acpi/ec.c
View file @
1d5b953d
...
...
@@ -719,7 +719,7 @@ acpi_ec_start (
* Install GPE handler
*/
status
=
acpi_install_gpe_handler
(
NULL
,
ec
->
gpe_bit
,
ACPI_
EVENT
_EDGE_TRIGGERED
,
&
acpi_ec_gpe_handler
,
ec
);
ACPI_
GPE
_EDGE_TRIGGERED
,
&
acpi_ec_gpe_handler
,
ec
);
if
(
ACPI_FAILURE
(
status
))
{
return_VALUE
(
-
ENODEV
);
}
...
...
@@ -803,7 +803,7 @@ acpi_ec_ecdt_probe (void)
* Install GPE handler
*/
status
=
acpi_install_gpe_handler
(
NULL
,
ec_ecdt
->
gpe_bit
,
ACPI_
EVENT
_EDGE_TRIGGERED
,
&
acpi_ec_gpe_handler
,
ACPI_
GPE
_EDGE_TRIGGERED
,
&
acpi_ec_gpe_handler
,
ec_ecdt
);
if
(
ACPI_FAILURE
(
status
))
{
goto
error
;
...
...
drivers/acpi/events/evgpe.c
View file @
1d5b953d
...
...
@@ -99,9 +99,8 @@ acpi_ev_get_gpe_event_info (
return
(
NULL
);
}
/*
* A Non-null gpe_device means this is a GPE Block Device.
*/
/* A Non-NULL gpe_device means this is a GPE Block Device */
obj_desc
=
acpi_ns_get_attached_object
((
struct
acpi_namespace_node
*
)
gpe_device
);
if
(
!
obj_desc
||
!
obj_desc
->
device
.
gpe_block
)
{
...
...
@@ -297,7 +296,7 @@ acpi_ev_asynch_execute_gpe_method (
}
}
if
(
local_gpe_event_info
.
flags
&
ACPI_EVENT
_LEVEL_TRIGGERED
)
{
if
(
(
local_gpe_event_info
.
flags
&
ACPI_GPE_XRUPT_TYPE_MASK
)
==
ACPI_GPE
_LEVEL_TRIGGERED
)
{
/*
* GPE is level-triggered, we clear the GPE status bit after handling
* the event.
...
...
@@ -346,7 +345,7 @@ acpi_ev_gpe_dispatch (
* If edge-triggered, clear the GPE status bit now. Note that
* level-triggered events are cleared after the GPE is serviced.
*/
if
(
gpe_event_info
->
flags
&
ACPI_EVENT
_EDGE_TRIGGERED
)
{
if
(
(
gpe_event_info
->
flags
&
ACPI_GPE_XRUPT_TYPE_MASK
)
==
ACPI_GPE
_EDGE_TRIGGERED
)
{
status
=
acpi_hw_clear_gpe
(
gpe_event_info
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_REPORT_ERROR
((
"acpi_ev_gpe_dispatch: Unable to clear GPE[%2X]
\n
"
,
...
...
@@ -369,7 +368,7 @@ acpi_ev_gpe_dispatch (
/* It is now safe to clear level-triggered events. */
if
(
gpe_event_info
->
flags
&
ACPI_EVENT
_LEVEL_TRIGGERED
)
{
if
(
(
gpe_event_info
->
flags
&
ACPI_GPE_XRUPT_TYPE_MASK
)
==
ACPI_GPE
_LEVEL_TRIGGERED
)
{
status
=
acpi_hw_clear_gpe
(
gpe_event_info
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_REPORT_ERROR
((
...
...
drivers/acpi/events/evgpeblk.c
View file @
1d5b953d
This diff is collapsed.
Click to expand it.
drivers/acpi/events/evmisc.c
View file @
1d5b953d
...
...
@@ -97,6 +97,20 @@ acpi_ev_is_notify_object (
*
******************************************************************************/
#ifdef ACPI_DEBUG_OUTPUT
static
const
char
*
acpi_notify_value_names
[]
=
{
"Bus Check"
,
"Device Check"
,
"Device Wake"
,
"Eject request"
,
"Device Check Light"
,
"Frequency Mismatch"
,
"Bus Mode Mismatch"
,
"Power Fault"
};
#endif
acpi_status
acpi_ev_queue_notify_request
(
struct
acpi_namespace_node
*
node
,
...
...
@@ -112,7 +126,7 @@ acpi_ev_queue_notify_request (
/*
* For value
1
(Ejection Request), some device method may need to be run.
* For value
3
(Ejection Request), some device method may need to be run.
* For value 2 (Device Wake) if _PRW exists, the _PS0 method may need to be run.
* For value 0x80 (Status Change) on the power button or sleep button,
* initiate soft-off or sleep operation?
...
...
@@ -120,26 +134,13 @@ acpi_ev_queue_notify_request (
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Dispatching Notify(%X) on node %p
\n
"
,
notify_value
,
node
));
switch
(
notify_value
)
{
case
0
:
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Notify value: Re-enumerate Devices
\n
"
));
break
;
case
1
:
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Notify value: Ejection Request
\n
"
));
break
;
case
2
:
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Notify value: Device Wake
\n
"
));
break
;
case
0x80
:
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Notify value: Status Change
\n
"
));
break
;
default:
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Unknown Notify Value: %X
\n
"
,
notify_value
));
break
;
if
(
notify_value
<=
7
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Notify value: %s
\n
"
,
acpi_notify_value_names
[
notify_value
]));
}
else
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"notify value: 0x2.2_x **Device Specific**
\n
"
,
notify_value
));
}
/*
...
...
drivers/acpi/events/evxfevnt.c
View file @
1d5b953d
...
...
@@ -247,16 +247,29 @@ acpi_enable_gpe (
goto
unlock_and_exit
;
}
/*
Enable the requested GPE number
*/
/*
Check for Wake vs Runtime GPE
*/
status
=
acpi_hw_enable_gpe
(
gpe_event_info
);
if
(
flags
&
ACPI_EVENT_WAKE_ENABLE
)
{
/* Ensure the requested wake GPE is disabled */
status
=
acpi_hw_disable_gpe
(
gpe_event_info
);
if
(
ACPI_FAILURE
(
status
))
{
goto
unlock_and_exit
;
}
if
(
flags
&
ACPI_EVENT_WAKE_ENABLE
)
{
/* Defer Enable of Wake GPE until sleep time */
acpi_hw_enable_gpe_for_wakeup
(
gpe_event_info
);
}
else
{
/* Enable the requested runtime GPE */
status
=
acpi_hw_enable_gpe
(
gpe_event_info
);
if
(
ACPI_FAILURE
(
status
))
{
goto
unlock_and_exit
;
}
}
unlock_and_exit:
if
(
flags
&
ACPI_NOT_ISR
)
{
...
...
drivers/acpi/executer/excreate.c
View file @
1d5b953d
...
...
@@ -84,14 +84,15 @@ acpi_ex_create_alias (
alias_node
=
(
struct
acpi_namespace_node
*
)
walk_state
->
operands
[
0
];
target_node
=
(
struct
acpi_namespace_node
*
)
walk_state
->
operands
[
1
];
if
(
target_node
->
type
==
ACPI_TYPE_LOCAL_ALIAS
)
{
if
((
target_node
->
type
==
ACPI_TYPE_LOCAL_ALIAS
)
||
(
target_node
->
type
==
ACPI_TYPE_LOCAL_METHOD_ALIAS
))
{
/*
* Dereference an existing alias so that we don't create a chain
* of aliases. With this code, we guarantee that an alias is
* always exactly one level of indirection away from the
* actual aliased name.
*/
target_node
=
(
struct
acpi_namespace_node
*
)
target_node
->
object
;
target_node
=
ACPI_CAST_PTR
(
struct
acpi_namespace_node
,
target_node
->
object
)
;
}
/*
...
...
@@ -117,6 +118,17 @@ acpi_ex_create_alias (
alias_node
->
object
=
ACPI_CAST_PTR
(
union
acpi_operand_object
,
target_node
);
break
;
case
ACPI_TYPE_METHOD
:
/*
* The new alias has the type ALIAS and points to the original
* NS node, not the object itself. This is because for these
* types, the object can change dynamically via a Store.
*/
alias_node
->
type
=
ACPI_TYPE_LOCAL_METHOD_ALIAS
;
alias_node
->
object
=
ACPI_CAST_PTR
(
union
acpi_operand_object
,
target_node
);
break
;
default:
/* Attach the original source object to the new Alias Node */
...
...
drivers/acpi/executer/exdump.c
View file @
1d5b953d
...
...
@@ -774,6 +774,7 @@ acpi_ex_dump_object_descriptor (
case
ACPI_TYPE_LOCAL_ALIAS
:
case
ACPI_TYPE_LOCAL_METHOD_ALIAS
:
case
ACPI_TYPE_LOCAL_EXTRA
:
case
ACPI_TYPE_LOCAL_DATA
:
default:
...
...
drivers/acpi/executer/exresnte.c
View file @
1d5b953d
...
...
@@ -108,10 +108,11 @@ acpi_ex_resolve_node_to_value (
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Entry=%p source_desc=%p [%s]
\n
"
,
node
,
source_desc
,
acpi_ut_get_type_name
(
entry_type
)));
if
(
entry_type
==
ACPI_TYPE_LOCAL_ALIAS
)
{
if
((
entry_type
==
ACPI_TYPE_LOCAL_ALIAS
)
||
(
entry_type
==
ACPI_TYPE_LOCAL_METHOD_ALIAS
))
{
/* There is always exactly one level of indirection */
node
=
(
struct
acpi_namespace_node
*
)
node
->
object
;
node
=
ACPI_CAST_PTR
(
struct
acpi_namespace_node
,
node
->
object
)
;
source_desc
=
acpi_ns_get_attached_object
(
node
);
entry_type
=
acpi_ns_get_type
((
acpi_handle
)
node
);
*
object_ptr
=
node
;
...
...
drivers/acpi/executer/exstoren.c
View file @
1d5b953d
...
...
@@ -138,6 +138,7 @@ acpi_ex_resolve_object (
case
ACPI_TYPE_LOCAL_ALIAS
:
case
ACPI_TYPE_LOCAL_METHOD_ALIAS
:
/*
* Aliases are resolved by acpi_ex_prep_operands
...
...
drivers/acpi/hardware/hwgpe.c
View file @
1d5b953d
...
...
@@ -53,9 +53,9 @@
*
* FUNCTION: acpi_hw_enable_gpe
*
* PARAMETERS: gpe_
number - The GPE
* PARAMETERS: gpe_
event_info - Info block for the GPE to be enabled
*
* RETURN:
None
* RETURN:
Status
*
* DESCRIPTION: Enable a single GPE.
*
...
...
@@ -95,7 +95,7 @@ acpi_hw_enable_gpe (
*
* FUNCTION: acpi_hw_enable_gpe_for_wakeup
*
* PARAMETERS: gpe_
number - The GPE
* PARAMETERS: gpe_
event_info - Info block for the GPE to be enabled
*
* RETURN: None
*
...
...
@@ -122,9 +122,11 @@ acpi_hw_enable_gpe_for_wakeup (
}
/*
* Set the bit so we will not disable this when sleeping
* Set the bit so we will not enable this GPE when sleeping (and disable
* it upon wake)
*/
gpe_register_info
->
wake_enable
|=
gpe_event_info
->
bit_mask
;
gpe_event_info
->
flags
|=
(
ACPI_GPE_TYPE_WAKE
|
ACPI_GPE_ENABLED
);
}
...
...
@@ -132,9 +134,9 @@ acpi_hw_enable_gpe_for_wakeup (
*
* FUNCTION: acpi_hw_disable_gpe
*
* PARAMETERS: gpe_
number - The GPE
* PARAMETERS: gpe_
event_info - Info block for the GPE to be disabled
*
* RETURN:
None
* RETURN:
Status
*
* DESCRIPTION: Disable a single GPE.
*
...
...
@@ -177,6 +179,8 @@ acpi_hw_disable_gpe (
return
(
status
);
}
/* Make sure this GPE is disabled for wake, also */
acpi_hw_disable_gpe_for_wakeup
(
gpe_event_info
);
return
(
AE_OK
);
}
...
...
@@ -186,7 +190,7 @@ acpi_hw_disable_gpe (
*
* FUNCTION: acpi_hw_disable_gpe_for_wakeup
*
* PARAMETERS: gpe_
number - The GPE
* PARAMETERS: gpe_
event_info - Info block for the GPE to be disabled
*
* RETURN: None
*
...
...
@@ -212,9 +216,8 @@ acpi_hw_disable_gpe_for_wakeup (
return
;
}
/*
* Clear the bit so we will disable this when sleeping
*/
/* Clear the bit so we will disable this when sleeping */
gpe_register_info
->
wake_enable
&=
~
(
gpe_event_info
->
bit_mask
);
}
...
...
@@ -223,11 +226,11 @@ acpi_hw_disable_gpe_for_wakeup (
*
* FUNCTION: acpi_hw_clear_gpe
*
* PARAMETERS: gpe_
number - The GPE
* PARAMETERS: gpe_
event_info - Info block for the GPE to be cleared
*
* RETURN:
None
* RETURN:
status_status
*
* DESCRIPTION: Clear a single GPE.
* DESCRIPTION: Clear
the status bit for
a single GPE.
*
******************************************************************************/
...
...
@@ -256,9 +259,10 @@ acpi_hw_clear_gpe (
*
* FUNCTION: acpi_hw_get_gpe_status
*
* PARAMETERS: gpe_number - The GPE
* PARAMETERS: gpe_event_info - Info block for the GPE to queried
* event_status - Where the GPE status is returned
*
* RETURN:
None
* RETURN:
Status
*
* DESCRIPTION: Return the status of a single GPE.
*
...
...
@@ -376,7 +380,7 @@ acpi_hw_disable_gpe_block (
*
* RETURN: Status
*
* DESCRIPTION: Clear all GPEs within a GPE block
* DESCRIPTION: Clear
status bits for
all GPEs within a GPE block
*
******************************************************************************/
...
...
@@ -392,7 +396,7 @@ acpi_hw_clear_gpe_block (
/* Examine each GPE Register within the block */
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
/* Clear all GPEs in this register */
/* Clear
status on
all GPEs in this register */
status
=
acpi_hw_low_level_write
(
8
,
0xFF
,
&
gpe_block
->
register_info
[
i
].
status_address
);
...
...
@@ -407,19 +411,20 @@ acpi_hw_clear_gpe_block (
/******************************************************************************
*
* FUNCTION: acpi_hw_
disable_non_wakeup_gpe_block
* FUNCTION: acpi_hw_
prepare_gpe_block_for_sleep
*
* PARAMETERS: gpe_xrupt_info - GPE Interrupt info
* gpe_block - Gpe Block info
*
* RETURN: Status
*
* DESCRIPTION: Disable all GPEs except wakeup GPEs in a GPE block
* DESCRIPTION: Disable all runtime GPEs and enable all wakeup GPEs -- within
* a single GPE block
*
******************************************************************************/
static
acpi_status
acpi_hw_
disable_non_wakeup_gpe_block
(
acpi_hw_
prepare_gpe_block_for_sleep
(
struct
acpi_gpe_xrupt_info
*
gpe_xrupt_info
,
struct
acpi_gpe_block_info
*
gpe_block
)
{
...
...
@@ -437,8 +442,11 @@ acpi_hw_disable_non_wakeup_gpe_block (
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
/*
* Read the enabled status of all GPEs. We
* Read the enabled
/disabled
status of all GPEs. We
* will be using it to restore all the GPEs later.
*
* NOTE: Wake GPEs are are ALL disabled at this time, so when we wake
* and restore this register, they will be automatically disabled.
*/
status
=
acpi_hw_low_level_read
(
8
,
&
in_value
,
&
gpe_register_info
->
enable_address
);
...
...
@@ -449,7 +457,8 @@ acpi_hw_disable_non_wakeup_gpe_block (
gpe_register_info
->
enable
=
(
u8
)
in_value
;
/*
* Disable all GPEs except wakeup GPEs.
* 1) Disable all runtime GPEs
* 2) Enable all wakeup GPEs
*/
status
=
acpi_hw_low_level_write
(
8
,
gpe_register_info
->
wake_enable
,
&
gpe_register_info
->
enable_address
);
...
...
@@ -457,6 +466,8 @@ acpi_hw_disable_non_wakeup_gpe_block (
return
(
status
);
}
/* Point to next GPE register */
gpe_register_info
++
;
}
...
...
@@ -466,22 +477,22 @@ acpi_hw_disable_non_wakeup_gpe_block (
/******************************************************************************
*
* FUNCTION: acpi_hw_
disable_non_wakeup_gpes
* FUNCTION: acpi_hw_
prepare_gpes_for_sleep
*
* PARAMETERS: None
*
* RETURN:
None
* RETURN:
Status
*
* DESCRIPTION: Disable all
non-wakeup GPEs
* DESCRIPTION: Disable all
runtime GPEs, enable all wake GPEs.
* Called with interrupts disabled. The interrupt handler also
* modifies gpe_register_info->Enable, so it should not be
* given the chance to run until after
non-wak
e GPEs are
* given the chance to run until after
the runtim
e GPEs are
* re-enabled.
*
******************************************************************************/
acpi_status
acpi_hw_
disable_non_wakeup_gpes
(
acpi_hw_
prepare_gpes_for_sleep
(
void
)
{
acpi_status
status
;
...
...
@@ -490,27 +501,27 @@ acpi_hw_disable_non_wakeup_gpes (
ACPI_FUNCTION_ENTRY
();
status
=
acpi_ev_walk_gpe_list
(
acpi_hw_disable_non_wakeup_gpe_block
);
status
=
acpi_ev_walk_gpe_list
(
acpi_hw_prepare_gpe_block_for_sleep
);
return
(
status
);
}
/******************************************************************************
*
* FUNCTION: acpi_hw_
enable_non_wakeup_gpe_block
* FUNCTION: acpi_hw_
restore_gpe_block_on_wake
*
* PARAMETERS: gpe_xrupt_info - GPE Interrupt info
* gpe_block - Gpe Block info
*
* RETURN: Status
*
* DESCRIPTION: Enable a single GPE.
* DESCRIPTION: Enable all runtime GPEs and disable all wake GPEs -- in one
* GPE block
*
******************************************************************************/
static
acpi_status
acpi_hw_
enable_non_wakeup_gpe_block
(
acpi_hw_
restore_gpe_block_on_wake
(
struct
acpi_gpe_xrupt_info
*
gpe_xrupt_info
,
struct
acpi_gpe_block_info
*
gpe_block
)
{
...
...
@@ -537,8 +548,12 @@ acpi_hw_enable_non_wakeup_gpe_block (
}
/*
* We previously stored the enabled status of all GPEs.
* Blast them back in.
* Restore the GPE Enable register, which will do the following:
*
* 1) Disable all wakeup GPEs
* 2) Enable all runtime GPEs
*
* (On sleep, we saved the enabled status of all GPEs)
*/
status
=
acpi_hw_low_level_write
(
8
,
gpe_register_info
->
enable
,
&
gpe_register_info
->
enable_address
);
...
...
@@ -546,28 +561,30 @@ acpi_hw_enable_non_wakeup_gpe_block (
return
(
status
);
}
/* Point to next GPE register */
gpe_register_info
++
;
}
return
(
AE_OK
);
}
/******************************************************************************
*
* FUNCTION: acpi_hw_
enable_non_wakeup_gpes
* FUNCTION: acpi_hw_
restore_gpes_on_wake
*
* PARAMETERS: None
*
* RETURN:
None
* RETURN:
Status
*
* DESCRIPTION: Enable all non-wakeup GPEs we previously enabled.
* DESCRIPTION: Enable all runtime GPEs and disable all wake GPEs -- in all
* GPE blocks
*
******************************************************************************/
acpi_status
acpi_hw_
enable_non_wakeup_gpes
(
acpi_hw_
restore_gpes_on_wake
(
void
)
{
acpi_status
status
;
...
...
@@ -576,7 +593,6 @@ acpi_hw_enable_non_wakeup_gpes (
ACPI_FUNCTION_ENTRY
();
status
=
acpi_ev_walk_gpe_list
(
acpi_hw_enable_non_wakeup_gpe_block
);
status
=
acpi_ev_walk_gpe_list
(
acpi_hw_restore_gpe_block_on_wake
);
return
(
status
);
}
drivers/acpi/hardware/hwsleep.c
View file @
1d5b953d
...
...
@@ -286,7 +286,11 @@ acpi_enter_sleep_state (
}
}
status
=
acpi_hw_disable_non_wakeup_gpes
();
/*
* 1) Disable all runtime GPEs
* 2) Enable all wakeup GPEs
*/
status
=
acpi_hw_prepare_gpes_for_sleep
();
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
...
...
@@ -415,7 +419,11 @@ acpi_enter_sleep_state_s4bios (
return_ACPI_STATUS
(
status
);
}
status
=
acpi_hw_disable_non_wakeup_gpes
();
/*
* 1) Disable all runtime GPEs
* 2) Enable all wakeup GPEs
*/
status
=
acpi_hw_prepare_gpes_for_sleep
();
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
...
...
@@ -528,10 +536,14 @@ acpi_leave_sleep_state (
if
(
ACPI_FAILURE
(
status
)
&&
status
!=
AE_NOT_FOUND
)
{
ACPI_REPORT_ERROR
((
"Method _WAK failed, %s
\n
"
,
acpi_format_exception
(
status
)));
}
/* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
/* _WAK returns stuff - do we want to look at it? */
status
=
acpi_hw_enable_non_wakeup_gpes
();
/*
* Restore the GPEs:
* 1) Disable all wakeup GPEs
* 2) Enable all runtime GPEs
*/
status
=
acpi_hw_restore_gpes_on_wake
();
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
...
...
drivers/acpi/namespace/nsaccess.c
View file @
1d5b953d
...
...
@@ -247,6 +247,14 @@ acpi_ns_root_initialize (void)
unlock_and_exit:
(
void
)
acpi_ut_release_mutex
(
ACPI_MTX_NAMESPACE
);
/* Save a handle to "_GPE", it is always present */
if
(
ACPI_SUCCESS
(
status
))
{
status
=
acpi_ns_get_node_by_path
(
"
\\
_GPE"
,
NULL
,
ACPI_NS_NO_UPSEARCH
,
&
acpi_gbl_fadt_gpe_device
);
}
return_ACPI_STATUS
(
status
);
}
...
...
@@ -577,6 +585,7 @@ acpi_ns_lookup (
if
((
num_segments
==
0
)
&&
(
type_to_check_for
!=
ACPI_TYPE_ANY
)
&&
(
type_to_check_for
!=
ACPI_TYPE_LOCAL_ALIAS
)
&&
(
type_to_check_for
!=
ACPI_TYPE_LOCAL_METHOD_ALIAS
)
&&
(
type_to_check_for
!=
ACPI_TYPE_LOCAL_SCOPE
)
&&
(
this_node
->
type
!=
ACPI_TYPE_ANY
)
&&
(
this_node
->
type
!=
type_to_check_for
))
{
...
...
drivers/acpi/namespace/nsdump.c
View file @
1d5b953d
...
...
@@ -351,6 +351,7 @@ acpi_ns_dump_one_object (
case
ACPI_TYPE_LOCAL_ALIAS
:
case
ACPI_TYPE_LOCAL_METHOD_ALIAS
:
acpi_os_printf
(
"Target %4.4s (%p)
\n
"
,
acpi_ut_get_node_name
(
obj_desc
),
obj_desc
);
break
;
...
...
drivers/acpi/namespace/nseval.c
View file @
1d5b953d
...
...
@@ -310,6 +310,15 @@ acpi_ns_evaluate_by_handle (
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
}
/*
* For a method alias, we must grab the actual method node
* so that proper scoping context will be established
* before execution.
*/
if
(
acpi_ns_get_type
(
node
)
==
ACPI_TYPE_LOCAL_METHOD_ALIAS
)
{
node
=
ACPI_CAST_PTR
(
struct
acpi_namespace_node
,
node
->
object
);
}
/*
* Two major cases here:
* 1) The object is an actual control method -- execute it.
...
...
drivers/acpi/namespace/nssearch.c
View file @
1d5b953d
...
...
@@ -113,6 +113,12 @@ acpi_ns_search_node (
/* Check for match against the name */
if
(
next_node
->
name
.
integer
==
target_name
)
{
/* Resolve a control method alias if any */
if
(
acpi_ns_get_type
(
next_node
)
==
ACPI_TYPE_LOCAL_METHOD_ALIAS
)
{
next_node
=
ACPI_CAST_PTR
(
struct
acpi_namespace_node
,
next_node
->
object
);
}
/*
* Found matching entry.
*/
...
...
drivers/acpi/namespace/nsutils.c
View file @
1d5b953d
...
...
@@ -256,7 +256,7 @@ acpi_ns_get_type (
if
(
!
node
)
{
ACPI_REPORT_WARNING
((
"ns_get_type: Null Node
ptr
"
));
ACPI_REPORT_WARNING
((
"ns_get_type: Null Node
input pointer
\n
"
));
return_VALUE
(
ACPI_TYPE_ANY
);
}
...
...
drivers/acpi/namespace/nsxfeval.c
View file @
1d5b953d
...
...
@@ -45,6 +45,7 @@
#include <acpi/acpi.h>
#include <acpi/acnamesp.h>
#include <acpi/acinterp.h>
#define _COMPONENT ACPI_NAMESPACE
...
...
@@ -149,11 +150,11 @@ acpi_evaluate_object_typed (
* FUNCTION: acpi_evaluate_object
*
* PARAMETERS: Handle - Object handle (optional)
*
*Pathname
- Object pathname (optional)
*
**external_params
- List of parameters to pass to method,
*
Pathname
- Object pathname (optional)
*
external_params
- List of parameters to pass to method,
* terminated by NULL. May be NULL
* if no parameters are being passed.
*
*return_buffer
- Where to put method's return value (if
*
return_buffer
- Where to put method's return value (if
* any). If NULL, no value is returned.
*
* RETURN: Status
...
...
@@ -172,6 +173,7 @@ acpi_evaluate_object (
struct
acpi_buffer
*
return_buffer
)
{
acpi_status
status
;
acpi_status
status2
;
union
acpi_operand_object
**
internal_params
=
NULL
;
union
acpi_operand_object
*
internal_return_obj
=
NULL
;
acpi_size
buffer_space_needed
;
...
...
@@ -321,14 +323,20 @@ acpi_evaluate_object (
}
}
/* Delete the return and parameter objects */
if
(
internal_return_obj
)
{
/*
* Delete the internal return object. NOTE: Interpreter
* must be locked to avoid race condition.
*/
status2
=
acpi_ex_enter_interpreter
();
if
(
ACPI_SUCCESS
(
status2
))
{
/*
* Delete the internal return object. (Or at least
* decrement the reference count by one)
*/
acpi_ut_remove_reference
(
internal_return_obj
);
acpi_ex_exit_interpreter
();
}
}
/*
...
...
drivers/acpi/osl.c
View file @
1d5b953d
...
...
@@ -1048,3 +1048,24 @@ acpi_serialize_setup(char *str)
__setup
(
"acpi_serialize"
,
acpi_serialize_setup
);
/*
* Wake and Run-Time GPES are expected to be separate.
* We disable wake-GPEs at run-time to prevent spurious
* interrupts.
*
* However, if a system exists that shares Wake and
* Run-time events on the same GPE this flag is available
* to tell Linux to keep the wake-time GPEs enabled at run-time.
*/
int
__init
acpi_wake_gpes_always_on_setup
(
char
*
str
)
{
printk
(
KERN_INFO
PREFIX
"wake GPEs not disabled
\n
"
);
acpi_gbl_leave_wake_gpes_disabled
=
FALSE
;
return
1
;
}
__setup
(
"acpi_wake_gpes_always_on"
,
acpi_wake_gpes_always_on_setup
);
drivers/acpi/pci_link.c
View file @
1d5b953d
...
...
@@ -72,6 +72,7 @@ struct acpi_pci_link_irq {
u8
edge_level
;
/* All IRQs */
u8
active_high_low
;
/* All IRQs */
u8
setonboot
;
u8
resource_type
;
u8
possible_count
;
u8
possible
[
ACPI_PCI_LINK_MAX_POSSIBLE
];
};
...
...
@@ -123,6 +124,7 @@ acpi_pci_link_check_possible (
}
link
->
irq
.
edge_level
=
p
->
edge_level
;
link
->
irq
.
active_high_low
=
p
->
active_high_low
;
link
->
irq
.
resource_type
=
ACPI_RSTYPE_IRQ
;
break
;
}
case
ACPI_RSTYPE_EXT_IRQ
:
...
...
@@ -143,6 +145,7 @@ acpi_pci_link_check_possible (
}
link
->
irq
.
edge_level
=
p
->
edge_level
;
link
->
irq
.
active_high_low
=
p
->
active_high_low
;
link
->
irq
.
resource_type
=
ACPI_RSTYPE_EXT_IRQ
;
break
;
}
default:
...
...
@@ -342,6 +345,10 @@ acpi_pci_link_set (
}
}
resource_type
=
link
->
irq
.
resource_type
;
if
(
resource_type
!=
ACPI_RSTYPE_IRQ
&&
resource_type
!=
ACPI_RSTYPE_EXT_IRQ
){
/* If IRQ<=15, first try with a "normal" IRQ descriptor. If that fails, try with
* an extended one */
if
(
irq
<=
15
)
{
...
...
@@ -349,6 +356,7 @@ acpi_pci_link_set (
}
else
{
resource_type
=
ACPI_RSTYPE_EXT_IRQ
;
}
}
retry_programming:
...
...
drivers/acpi/resources/rsaddr.c
View file @
1d5b953d
...
...
@@ -88,6 +88,7 @@ acpi_rs_address16_resource (
ACPI_FUNCTION_TRACE
(
"rs_address16_resource"
);
/*
* Point past the Descriptor to get the number of bytes consumed
*/
...
...
@@ -149,7 +150,7 @@ acpi_rs_address16_resource (
output_struct
->
data
.
address16
.
attribute
.
memory
.
read_write_attribute
=
(
u16
)
(
temp8
&
0x01
);
output_struct
->
data
.
address16
.
attribute
.
memory
.
cache_attribute
=
(
u16
)
((
temp8
>>
1
)
&
0x0
F
);
(
u16
)
((
temp8
>>
1
)
&
0x0
3
);
}
else
{
if
(
ACPI_IO_RANGE
==
output_struct
->
data
.
address16
.
resource_type
)
{
...
...
@@ -347,7 +348,7 @@ acpi_rs_address16_stream (
temp8
|=
(
linked_list
->
data
.
address16
.
attribute
.
memory
.
cache_attribute
&
0x0
F
)
<<
1
;
0x0
3
)
<<
1
;
}
else
if
(
ACPI_IO_RANGE
==
linked_list
->
data
.
address16
.
resource_type
)
{
temp8
=
(
u8
)
...
...
@@ -539,7 +540,7 @@ acpi_rs_address32_resource (
(
u16
)
(
temp8
&
0x01
);
output_struct
->
data
.
address32
.
attribute
.
memory
.
cache_attribute
=
(
u16
)
((
temp8
>>
1
)
&
0x0
F
);
(
u16
)
((
temp8
>>
1
)
&
0x0
3
);
}
else
{
if
(
ACPI_IO_RANGE
==
output_struct
->
data
.
address32
.
resource_type
)
{
...
...
@@ -735,7 +736,7 @@ acpi_rs_address32_stream (
temp8
|=
(
linked_list
->
data
.
address32
.
attribute
.
memory
.
cache_attribute
&
0x0
F
)
<<
1
;
0x0
3
)
<<
1
;
}
else
if
(
ACPI_IO_RANGE
==
linked_list
->
data
.
address32
.
resource_type
)
{
temp8
=
(
u8
)
...
...
@@ -926,7 +927,7 @@ acpi_rs_address64_resource (
(
u16
)
(
temp8
&
0x01
);
output_struct
->
data
.
address64
.
attribute
.
memory
.
cache_attribute
=
(
u16
)
((
temp8
>>
1
)
&
0x0
F
);
(
u16
)
((
temp8
>>
1
)
&
0x0
3
);
}
else
{
if
(
ACPI_IO_RANGE
==
output_struct
->
data
.
address64
.
resource_type
)
{
...
...
@@ -1124,7 +1125,7 @@ acpi_rs_address64_stream (
temp8
|=
(
linked_list
->
data
.
address64
.
attribute
.
memory
.
cache_attribute
&
0x0
F
)
<<
1
;
0x0
3
)
<<
1
;
}
else
if
(
ACPI_IO_RANGE
==
linked_list
->
data
.
address64
.
resource_type
)
{
temp8
=
(
u8
)
...
...
drivers/acpi/utilities/utglobal.c
View file @
1d5b953d
...
...
@@ -253,14 +253,15 @@ const u8 acpi_gbl_ns_properties[] =
ACPI_NS_NORMAL
,
/* 19 index_field */
ACPI_NS_NORMAL
,
/* 20 Reference */
ACPI_NS_NORMAL
,
/* 21 Alias */
ACPI_NS_NORMAL
,
/* 22 Notify */
ACPI_NS_NORMAL
,
/* 23 Address Handler */
ACPI_NS_NEWSCOPE
|
ACPI_NS_LOCAL
,
/* 24 Resource Desc */
ACPI_NS_NEWSCOPE
|
ACPI_NS_LOCAL
,
/* 25 Resource Field */
ACPI_NS_NEWSCOPE
,
/* 26 Scope */
ACPI_NS_NORMAL
,
/* 27 Extra */
ACPI_NS_NORMAL
,
/* 28 Data */
ACPI_NS_NORMAL
/* 29 Invalid */
ACPI_NS_NORMAL
,
/* 22 method_alias */
ACPI_NS_NORMAL
,
/* 23 Notify */
ACPI_NS_NORMAL
,
/* 24 Address Handler */
ACPI_NS_NEWSCOPE
|
ACPI_NS_LOCAL
,
/* 25 Resource Desc */
ACPI_NS_NEWSCOPE
|
ACPI_NS_LOCAL
,
/* 26 Resource Field */
ACPI_NS_NEWSCOPE
,
/* 27 Scope */
ACPI_NS_NORMAL
,
/* 28 Extra */
ACPI_NS_NORMAL
,
/* 29 Data */
ACPI_NS_NORMAL
/* 30 Invalid */
};
...
...
@@ -501,14 +502,15 @@ static const char *acpi_gbl_ns_type_names[] = /* printable nam
/* 19 */
"index_field"
,
/* 20 */
"Reference"
,
/* 21 */
"Alias"
,
/* 22 */
"Notify"
,
/* 23 */
"addr_handler"
,
/* 24 */
"resource_desc"
,
/* 25 */
"resource_fld"
,
/* 26 */
"Scope"
,
/* 27 */
"Extra"
,
/* 28 */
"Data"
,
/* 39 */
"Invalid"
/* 22 */
"method_alias"
,
/* 23 */
"Notify"
,
/* 24 */
"addr_handler"
,
/* 25 */
"resource_desc"
,
/* 26 */
"resource_fld"
,
/* 27 */
"Scope"
,
/* 28 */
"Extra"
,
/* 29 */
"Data"
,
/* 30 */
"Invalid"
};
...
...
@@ -556,7 +558,7 @@ char *
acpi_ut_get_node_name
(
void
*
object
)
{
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
=
(
struct
acpi_namespace_node
*
)
object
;
if
(
!
object
)
...
...
@@ -564,7 +566,10 @@ acpi_ut_get_node_name (
return
(
"NULL NODE"
);
}
node
=
(
struct
acpi_namespace_node
*
)
object
;
if
(
object
==
ACPI_ROOT_OBJECT
)
{
node
=
acpi_gbl_root_node
;
}
if
(
node
->
descriptor
!=
ACPI_DESC_TYPE_NAMED
)
{
...
...
@@ -782,6 +787,7 @@ acpi_ut_init_globals (
acpi_gbl_create_osi_method
=
TRUE
;
acpi_gbl_all_methods_serialized
=
FALSE
;
acpi_gbl_leave_wake_gpes_disabled
=
TRUE
;
/* Memory allocation and cache lists */
...
...
drivers/acpi/utilities/utmisc.c
View file @
1d5b953d
...
...
@@ -529,6 +529,7 @@ acpi_ut_strupr (
return
(
src_string
);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_mutex_initialize
...
...
@@ -562,10 +563,8 @@ acpi_ut_mutex_initialize (
}
}
status
=
acpi_os_create_lock
(
&
acpi_gbl_gpe_lock
);
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
status
);
}
...
...
include/acpi/acconfig.h
View file @
1d5b953d
...
...
@@ -64,7 +64,7 @@
/* Version string */
#define ACPI_CA_VERSION 0x200403
11
#define ACPI_CA_VERSION 0x200403
26
/* Maximum objects in the various object caches */
...
...
include/acpi/acglobal.h
View file @
1d5b953d
...
...
@@ -87,6 +87,7 @@ extern u32 acpi_gbl_nesting_level;
ACPI_EXTERN
u8
acpi_gbl_create_osi_method
;
ACPI_EXTERN
u8
acpi_gbl_all_methods_serialized
;
ACPI_EXTERN
u8
acpi_gbl_leave_wake_gpes_disabled
;
/*****************************************************************************
*
...
...
@@ -196,6 +197,7 @@ extern const char *acpi_gbl_valid_osi_strings[ACPI_
ACPI_EXTERN
struct
acpi_namespace_node
acpi_gbl_root_node_struct
;
ACPI_EXTERN
struct
acpi_namespace_node
*
acpi_gbl_root_node
;
ACPI_EXTERN
struct
acpi_namespace_node
*
acpi_gbl_fadt_gpe_device
;
extern
const
u8
acpi_gbl_ns_properties
[
NUM_NS_TYPES
];
extern
const
struct
acpi_predefined_names
acpi_gbl_pre_defined_names
[
NUM_PREDEFINED_NAMES
];
...
...
include/acpi/achware.h
View file @
1d5b953d
...
...
@@ -149,11 +149,11 @@ acpi_hw_get_gpe_status (
acpi_event_status
*
event_status
);
acpi_status
acpi_hw_
disable_non_wakeup_gpes
(
acpi_hw_
prepare_gpes_for_sleep
(
void
);
acpi_status
acpi_hw_
enable_non_wakeup_gpes
(
acpi_hw_
restore_gpes_on_wake
(
void
);
...
...
include/acpi/aclocal.h
View file @
1d5b953d
...
...
@@ -360,6 +360,13 @@ struct acpi_gpe_xrupt_info
};
struct
acpi_gpe_walk_info
{
struct
acpi_namespace_node
*
gpe_device
;
struct
acpi_gpe_block_info
*
gpe_block
;
};
typedef
acpi_status
(
*
ACPI_GPE_CALLBACK
)
(
struct
acpi_gpe_xrupt_info
*
gpe_xrupt_info
,
struct
acpi_gpe_block_info
*
gpe_block
);
...
...
include/acpi/actypes.h
View file @
1d5b953d
...
...
@@ -413,7 +413,7 @@ typedef u32 acpi_table_type;
* of the ACPI object_type() operator (See the ACPI Spec). Therefore,
* only add to the first group if the spec changes.
*
* Types must be kept in sync with the global acpi_ns_properties
*
NOTE:
Types must be kept in sync with the global acpi_ns_properties
* and acpi_ns_type_names arrays.
*/
typedef
u32
acpi_object_type
;
...
...
@@ -450,26 +450,27 @@ typedef u32 acpi_object_type;
#define ACPI_TYPE_LOCAL_INDEX_FIELD 0x13
#define ACPI_TYPE_LOCAL_REFERENCE 0x14
/* Arg#, Local#, Name, Debug, ref_of, Index */
#define ACPI_TYPE_LOCAL_ALIAS 0x15
#define ACPI_TYPE_LOCAL_NOTIFY 0x16
#define ACPI_TYPE_LOCAL_ADDRESS_HANDLER 0x17
#define ACPI_TYPE_LOCAL_RESOURCE 0x18
#define ACPI_TYPE_LOCAL_RESOURCE_FIELD 0x19
#define ACPI_TYPE_LOCAL_SCOPE 0x1A
/* 1 Name, multiple object_list Nodes */
#define ACPI_TYPE_LOCAL_METHOD_ALIAS 0x16
#define ACPI_TYPE_LOCAL_NOTIFY 0x17
#define ACPI_TYPE_LOCAL_ADDRESS_HANDLER 0x18
#define ACPI_TYPE_LOCAL_RESOURCE 0x19
#define ACPI_TYPE_LOCAL_RESOURCE_FIELD 0x1A
#define ACPI_TYPE_LOCAL_SCOPE 0x1B
/* 1 Name, multiple object_list Nodes */
#define ACPI_TYPE_NS_NODE_MAX 0x1
A
/* Last typecode used within a NS Node */
#define ACPI_TYPE_NS_NODE_MAX 0x1
B
/* Last typecode used within a NS Node */
/*
* These are special object types that never appear in
* a Namespace node, only in an union acpi_operand_object
*/
#define ACPI_TYPE_LOCAL_EXTRA 0x1
B
#define ACPI_TYPE_LOCAL_DATA 0x1
C
#define ACPI_TYPE_LOCAL_EXTRA 0x1
C
#define ACPI_TYPE_LOCAL_DATA 0x1
D
#define ACPI_TYPE_LOCAL_MAX 0x1
C
#define ACPI_TYPE_LOCAL_MAX 0x1
D
/* All types above here are invalid */
#define ACPI_TYPE_INVALID 0x1
D
#define ACPI_TYPE_INVALID 0x1
E
#define ACPI_TYPE_NOT_FOUND 0xFF
...
...
@@ -511,9 +512,8 @@ typedef u32 acpi_object_type;
#define ACPI_WRITE 1
#define ACPI_IO_MASK 1
/*
*
Acpi
Event Types: Fixed & General Purpose
* Event Types: Fixed & General Purpose
*/
typedef
u32
acpi_event_type
;
...
...
@@ -528,25 +528,8 @@ typedef u32 acpi_event_type;
#define ACPI_EVENT_MAX 4
#define ACPI_NUM_FIXED_EVENTS ACPI_EVENT_MAX + 1
#define ACPI_GPE_INVALID 0xFF
#define ACPI_GPE_MAX 0xFF
#define ACPI_NUM_GPE 256
#define ACPI_EVENT_LEVEL_TRIGGERED 1
#define ACPI_EVENT_EDGE_TRIGGERED 2
/*
* Flags for GPE and Lock interfaces
*/
#define ACPI_EVENT_WAKE_ENABLE 0x2
#define ACPI_EVENT_WAKE_DISABLE 0x2
#define ACPI_NOT_ISR 0x1
#define ACPI_ISR 0x0
/*
* acpi_event Status:
* Event Status - Per event
* -------------
* The encoding of acpi_event_status is illustrated below.
* Note that a set bit (1) indicates the property is TRUE
...
...
@@ -567,6 +550,45 @@ typedef u32 acpi_event_status;
#define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02
#define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04
/*
* General Purpose Events (GPE)
*/
#define ACPI_GPE_INVALID 0xFF
#define ACPI_GPE_MAX 0xFF
#define ACPI_NUM_GPE 256
/*
* GPE info flags - Per GPE
* +---------+-+-+-+
* |Bits 8:3 |2|1|0|
* +---------+-+-+-+
* | | | |
* | | | +- Edge or Level Triggered
* | | +--- Type: Wake or Runtime
* | +----- Enabled for wake?
* +--------<Reserved>
*/
#define ACPI_GPE_XRUPT_TYPE_MASK (u8) 1
#define ACPI_GPE_LEVEL_TRIGGERED (u8) 1
#define ACPI_GPE_EDGE_TRIGGERED (u8) 0
#define ACPI_GPE_TYPE_MASK (u8) 2
#define ACPI_GPE_TYPE_WAKE (u8) 2
#define ACPI_GPE_TYPE_RUNTIME (u8) 0
/* Default */
#define ACPI_GPE_ENABLE_MASK (u8) 4
#define ACPI_GPE_ENABLED (u8) 4
#define ACPI_GPE_DISABLED (u8) 0
/* Default */
/*
* Flags for GPE and Lock interfaces
*/
#define ACPI_EVENT_WAKE_ENABLE 0x2
#define ACPI_EVENT_WAKE_DISABLE 0x2
#define ACPI_NOT_ISR 0x1
#define ACPI_ISR 0x0
/* Notify types */
...
...
include/acpi/acutils.h
View file @
1d5b953d
...
...
@@ -471,6 +471,7 @@ acpi_ut_delete_internal_object_list (
#define METHOD_NAME__PRT "_PRT"
#define METHOD_NAME__CRS "_CRS"
#define METHOD_NAME__PRS "_PRS"
#define METHOD_NAME__PRW "_PRW"
acpi_status
...
...
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