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
d9b72fae
Commit
d9b72fae
authored
Sep 29, 2003
by
Len Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ACPI] CONFIG_ACPI_RELAXED_AML from 2.4
http://bugzilla.kernel.org/show_bug.cgi?id=1248
parent
461c312b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
drivers/acpi/Kconfig
drivers/acpi/Kconfig
+12
-0
drivers/acpi/executer/exfldio.c
drivers/acpi/executer/exfldio.c
+35
-1
No files found.
drivers/acpi/Kconfig
View file @
d9b72fae
...
...
@@ -281,5 +281,17 @@ config ACPI_EFI
depends on IA64
default y
config ACPI_RELAXED_AML
bool
depends on ACPI_INTERPRETER
depends on !IA64_SGI_SN
default n
help
If you say `Y' here, the ACPI interpreter will relax its checking
for valid AML and will ignore some AML mistakes, such as off-by-one
errors in region sizes. Some laptops may require this option. In
particular, many Toshiba laptops require this for correct operation
of the AC module.
endmenu
drivers/acpi/executer/exfldio.c
View file @
d9b72fae
...
...
@@ -139,7 +139,41 @@ acpi_ex_setup_region (
field_datum_byte_offset
,
obj_desc
->
common_field
.
access_byte_width
,
rgn_desc
->
region
.
node
->
name
.
ascii
,
rgn_desc
->
region
.
length
));
#ifdef CONFIG_ACPI_RELAXED_AML
{
/*
* Allow access to the field if it is within the region size
* rounded up to a multiple of the access byte width. This
* overcomes "off-by-one" programming errors in the AML often
* found in Toshiba laptops. These errors were allowed by
* the Microsoft ASL compiler.
*/
u32
rounded_length
=
ACPI_ROUND_UP
(
rgn_desc
->
region
.
length
,
obj_desc
->
common_field
.
access_byte_width
);
if
(
rounded_length
<
(
obj_desc
->
common_field
.
base_byte_offset
+
field_datum_byte_offset
+
obj_desc
->
common_field
.
access_byte_width
))
{
return_ACPI_STATUS
(
AE_AML_REGION_LIMIT
);
}
else
{
static
int
warn_once
=
1
;
if
(
warn_once
)
{
// Could also associate a flag with each field, and
// warn once for each field.
ACPI_REPORT_WARNING
((
"The ACPI AML in your computer contains errors, "
"please nag the manufacturer to correct it.
\n
"
));
ACPI_REPORT_WARNING
((
"Allowing relaxed access to fields; "
"turn on CONFIG_ACPI_DEBUG for details.
\n
"
));
warn_once
=
0
;
}
return_ACPI_STATUS
(
AE_OK
);
}
}
#else
return_ACPI_STATUS
(
AE_AML_REGION_LIMIT
);
#endif
}
return_ACPI_STATUS
(
AE_OK
);
...
...
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