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
91dd6964
Commit
91dd6964
authored
May 28, 2010
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'acpi_enable' into release
parents
dc1544ea
b6dacf63
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
189 deletions
+24
-189
arch/x86/kernel/acpi/sleep.c
arch/x86/kernel/acpi/sleep.c
+0
-2
drivers/acpi/acpica/evxfevnt.c
drivers/acpi/acpica/evxfevnt.c
+21
-12
drivers/acpi/acpica/hwacpi.c
drivers/acpi/acpica/hwacpi.c
+1
-19
drivers/acpi/sleep.c
drivers/acpi/sleep.c
+2
-155
include/linux/acpi.h
include/linux/acpi.h
+0
-1
No files found.
arch/x86/kernel/acpi/sleep.c
View file @
91dd6964
...
@@ -162,8 +162,6 @@ static int __init acpi_sleep_setup(char *str)
...
@@ -162,8 +162,6 @@ static int __init acpi_sleep_setup(char *str)
#endif
#endif
if
(
strncmp
(
str
,
"old_ordering"
,
12
)
==
0
)
if
(
strncmp
(
str
,
"old_ordering"
,
12
)
==
0
)
acpi_old_suspend_ordering
();
acpi_old_suspend_ordering
();
if
(
strncmp
(
str
,
"sci_force_enable"
,
16
)
==
0
)
acpi_set_sci_en_on_resume
();
str
=
strchr
(
str
,
','
);
str
=
strchr
(
str
,
','
);
if
(
str
!=
NULL
)
if
(
str
!=
NULL
)
str
+=
strspn
(
str
,
",
\t
"
);
str
+=
strspn
(
str
,
",
\t
"
);
...
...
drivers/acpi/acpica/evxfevnt.c
View file @
91dd6964
...
@@ -69,7 +69,7 @@ acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
...
@@ -69,7 +69,7 @@ acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
acpi_status
acpi_enable
(
void
)
acpi_status
acpi_enable
(
void
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
acpi_enable
);
ACPI_FUNCTION_TRACE
(
acpi_enable
);
...
@@ -84,7 +84,9 @@ acpi_status acpi_enable(void)
...
@@ -84,7 +84,9 @@ acpi_status acpi_enable(void)
if
(
acpi_hw_get_mode
()
==
ACPI_SYS_MODE_ACPI
)
{
if
(
acpi_hw_get_mode
()
==
ACPI_SYS_MODE_ACPI
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INIT
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INIT
,
"System is already in ACPI mode
\n
"
));
"System is already in ACPI mode
\n
"
));
}
else
{
return_ACPI_STATUS
(
AE_OK
);
}
/* Transition to ACPI mode */
/* Transition to ACPI mode */
status
=
acpi_hw_set_mode
(
ACPI_SYS_MODE_ACPI
);
status
=
acpi_hw_set_mode
(
ACPI_SYS_MODE_ACPI
);
...
@@ -94,11 +96,18 @@ acpi_status acpi_enable(void)
...
@@ -94,11 +96,18 @@ acpi_status acpi_enable(void)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
/* Sanity check that transition succeeded */
if
(
acpi_hw_get_mode
()
!=
ACPI_SYS_MODE_ACPI
)
{
ACPI_ERROR
((
AE_INFO
,
"Hardware did not enter ACPI mode"
));
return_ACPI_STATUS
(
AE_NO_HARDWARE_RESPONSE
);
}
ACPI_DEBUG_PRINT
((
ACPI_DB_INIT
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INIT
,
"Transition to ACPI mode successful
\n
"
));
"Transition to ACPI mode successful
\n
"
));
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
AE_OK
);
}
}
ACPI_EXPORT_SYMBOL
(
acpi_enable
)
ACPI_EXPORT_SYMBOL
(
acpi_enable
)
...
...
drivers/acpi/acpica/hwacpi.c
View file @
91dd6964
...
@@ -63,7 +63,6 @@ acpi_status acpi_hw_set_mode(u32 mode)
...
@@ -63,7 +63,6 @@ acpi_status acpi_hw_set_mode(u32 mode)
{
{
acpi_status
status
;
acpi_status
status
;
u32
retry
;
ACPI_FUNCTION_TRACE
(
hw_set_mode
);
ACPI_FUNCTION_TRACE
(
hw_set_mode
);
...
@@ -125,24 +124,7 @@ acpi_status acpi_hw_set_mode(u32 mode)
...
@@ -125,24 +124,7 @@ acpi_status acpi_hw_set_mode(u32 mode)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
/*
* Some hardware takes a LONG time to switch modes. Give them 3 sec to
* do so, but allow faster systems to proceed more quickly.
*/
retry
=
3000
;
while
(
retry
)
{
if
(
acpi_hw_get_mode
()
==
mode
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Mode %X successfully enabled
\n
"
,
mode
));
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
}
acpi_os_stall
(
1000
);
retry
--
;
}
ACPI_ERROR
((
AE_INFO
,
"Hardware did not change modes"
));
return_ACPI_STATUS
(
AE_NO_HARDWARE_RESPONSE
);
}
}
/*******************************************************************************
/*******************************************************************************
...
...
drivers/acpi/sleep.c
View file @
91dd6964
...
@@ -80,22 +80,6 @@ static int acpi_sleep_prepare(u32 acpi_state)
...
@@ -80,22 +80,6 @@ static int acpi_sleep_prepare(u32 acpi_state)
#ifdef CONFIG_ACPI_SLEEP
#ifdef CONFIG_ACPI_SLEEP
static
u32
acpi_target_sleep_state
=
ACPI_STATE_S0
;
static
u32
acpi_target_sleep_state
=
ACPI_STATE_S0
;
/*
* According to the ACPI specification the BIOS should make sure that ACPI is
* enabled and SCI_EN bit is set on wake-up from S1 - S3 sleep states. Still,
* some BIOSes don't do that and therefore we use acpi_enable() to enable ACPI
* on such systems during resume. Unfortunately that doesn't help in
* particularly pathological cases in which SCI_EN has to be set directly on
* resume, although the specification states very clearly that this flag is
* owned by the hardware. The set_sci_en_on_resume variable will be set in such
* cases.
*/
static
bool
set_sci_en_on_resume
;
void
__init
acpi_set_sci_en_on_resume
(
void
)
{
set_sci_en_on_resume
=
true
;
}
/*
/*
* ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the
* ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the
...
@@ -253,11 +237,8 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
...
@@ -253,11 +237,8 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
break
;
break
;
}
}
/* If ACPI is not enabled by the BIOS, we need to enable it here. */
/* This violates the spec but is required for bug compatibility. */
if
(
set_sci_en_on_resume
)
acpi_write_bit_register
(
ACPI_BITREG_SCI_ENABLE
,
1
);
acpi_write_bit_register
(
ACPI_BITREG_SCI_ENABLE
,
1
);
else
acpi_enable
();
/* Reprogram control registers and execute _BFS */
/* Reprogram control registers and execute _BFS */
acpi_leave_sleep_state_prep
(
acpi_state
);
acpi_leave_sleep_state_prep
(
acpi_state
);
...
@@ -346,12 +327,6 @@ static int __init init_old_suspend_ordering(const struct dmi_system_id *d)
...
@@ -346,12 +327,6 @@ static int __init init_old_suspend_ordering(const struct dmi_system_id *d)
return
0
;
return
0
;
}
}
static
int
__init
init_set_sci_en_on_resume
(
const
struct
dmi_system_id
*
d
)
{
set_sci_en_on_resume
=
true
;
return
0
;
}
static
struct
dmi_system_id
__initdata
acpisleep_dmi_table
[]
=
{
static
struct
dmi_system_id
__initdata
acpisleep_dmi_table
[]
=
{
{
{
.
callback
=
init_old_suspend_ordering
,
.
callback
=
init_old_suspend_ordering
,
...
@@ -370,22 +345,6 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
...
@@ -370,22 +345,6 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
},
},
},
},
{
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Apple MacBook 1,1"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Apple Computer, Inc."
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"MacBook1,1"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Apple MacMini 1,1"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Apple Computer, Inc."
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Macmini1,1"
),
},
},
{
.
callback
=
init_old_suspend_ordering
,
.
callback
=
init_old_suspend_ordering
,
.
ident
=
"Asus Pundit P1-AH2 (M2N8L motherboard)"
,
.
ident
=
"Asus Pundit P1-AH2 (M2N8L motherboard)"
,
.
matches
=
{
.
matches
=
{
...
@@ -394,94 +353,6 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
...
@@ -394,94 +353,6 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
},
},
},
},
{
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Toshiba Satellite L300"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"TOSHIBA"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Satellite L300"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Hewlett-Packard HP G7000 Notebook PC"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Hewlett-Packard"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"HP G7000 Notebook PC"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Hewlett-Packard HP Pavilion dv3 Notebook PC"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Hewlett-Packard"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"HP Pavilion dv3 Notebook PC"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Hewlett-Packard Pavilion dv4"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Hewlett-Packard"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"HP Pavilion dv4"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Hewlett-Packard Pavilion dv7"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Hewlett-Packard"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"HP Pavilion dv7"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Hewlett-Packard Compaq Presario C700 Notebook PC"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Hewlett-Packard"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Compaq Presario C700 Notebook PC"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Hewlett-Packard Compaq Presario CQ40 Notebook PC"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Hewlett-Packard"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Compaq Presario CQ40 Notebook PC"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Lenovo ThinkPad T410"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"LENOVO"
),
DMI_MATCH
(
DMI_PRODUCT_VERSION
,
"ThinkPad T410"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Lenovo ThinkPad T510"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"LENOVO"
),
DMI_MATCH
(
DMI_PRODUCT_VERSION
,
"ThinkPad T510"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Lenovo ThinkPad W510"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"LENOVO"
),
DMI_MATCH
(
DMI_PRODUCT_VERSION
,
"ThinkPad W510"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Lenovo ThinkPad X201[s]"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"LENOVO"
),
DMI_MATCH
(
DMI_PRODUCT_VERSION
,
"ThinkPad X201"
),
},
},
{
.
callback
=
init_old_suspend_ordering
,
.
callback
=
init_old_suspend_ordering
,
.
ident
=
"Panasonic CF51-2L"
,
.
ident
=
"Panasonic CF51-2L"
,
.
matches
=
{
.
matches
=
{
...
@@ -490,30 +361,6 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
...
@@ -490,30 +361,6 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
DMI_MATCH
(
DMI_BOARD_NAME
,
"CF51-2L"
),
DMI_MATCH
(
DMI_BOARD_NAME
,
"CF51-2L"
),
},
},
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Dell Studio 1558"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Dell Inc."
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Studio 1558"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Dell Studio 1557"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Dell Inc."
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Studio 1557"
),
},
},
{
.
callback
=
init_set_sci_en_on_resume
,
.
ident
=
"Dell Studio 1555"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"Dell Inc."
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Studio 1555"
),
},
},
{},
{},
};
};
#endif
/* CONFIG_SUSPEND */
#endif
/* CONFIG_SUSPEND */
...
...
include/linux/acpi.h
View file @
91dd6964
...
@@ -251,7 +251,6 @@ int acpi_check_mem_region(resource_size_t start, resource_size_t n,
...
@@ -251,7 +251,6 @@ int acpi_check_mem_region(resource_size_t start, resource_size_t n,
void
__init
acpi_no_s4_hw_signature
(
void
);
void
__init
acpi_no_s4_hw_signature
(
void
);
void
__init
acpi_old_suspend_ordering
(
void
);
void
__init
acpi_old_suspend_ordering
(
void
);
void
__init
acpi_s4_no_nvs
(
void
);
void
__init
acpi_s4_no_nvs
(
void
);
void
__init
acpi_set_sci_en_on_resume
(
void
);
#endif
/* CONFIG_PM_SLEEP */
#endif
/* CONFIG_PM_SLEEP */
struct
acpi_osc_context
{
struct
acpi_osc_context
{
...
...
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