From: Bjorn Helgaas <bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [PATCH] fix _MEM handling in Type Specific Flags
Date: Tue, 20 Jan 2004 17:20:09 -0700 [thread overview]
Message-ID: <200401201720.09609.bjorn.helgaas@hp.com> (raw)
This is against 2.6.1.
ACPI: Fix _MEM handling (it's only two bits, not four).
The memory attributes (_MEM) in Type Specific Flags are only two bits,
not four. See ACPI spec 2.0c, Table 6-28.
===== drivers/acpi/resources/rsaddr.c 1.15 vs edited =====
--- 1.15/drivers/acpi/resources/rsaddr.c Mon Oct 6 10:15:00 2003
+++ edited/drivers/acpi/resources/rsaddr.c Tue Nov 18 12:43:44 2003
@@ -149,7 +149,7 @@
output_struct->data.address16.attribute.memory.read_write_attribute =
(u16) (temp8 & 0x01);
output_struct->data.address16.attribute.memory.cache_attribute =
- (u16) ((temp8 >> 1) & 0x0F);
+ (u16) ((temp8 >> 1) & 0x03);
}
else {
if (ACPI_IO_RANGE == output_struct->data.address16.resource_type) {
@@ -347,7 +347,7 @@
temp8 |=
(linked_list->data.address16.attribute.memory.cache_attribute &
- 0x0F) << 1;
+ 0x03) << 1;
}
else if (ACPI_IO_RANGE == linked_list->data.address16.resource_type) {
temp8 = (u8)
@@ -539,7 +539,7 @@
(u16) (temp8 & 0x01);
output_struct->data.address32.attribute.memory.cache_attribute =
- (u16) ((temp8 >> 1) & 0x0F);
+ (u16) ((temp8 >> 1) & 0x03);
}
else {
if (ACPI_IO_RANGE == output_struct->data.address32.resource_type) {
@@ -735,7 +735,7 @@
temp8 |=
(linked_list->data.address32.attribute.memory.cache_attribute &
- 0x0F) << 1;
+ 0x03) << 1;
}
else if (ACPI_IO_RANGE == linked_list->data.address32.resource_type) {
temp8 = (u8)
@@ -926,7 +926,7 @@
(u16) (temp8 & 0x01);
output_struct->data.address64.attribute.memory.cache_attribute =
- (u16) ((temp8 >> 1) & 0x0F);
+ (u16) ((temp8 >> 1) & 0x03);
}
else {
if (ACPI_IO_RANGE == output_struct->data.address64.resource_type) {
@@ -1124,7 +1124,7 @@
temp8 |=
(linked_list->data.address64.attribute.memory.cache_attribute &
- 0x0F) << 1;
+ 0x03) << 1;
}
else if (ACPI_IO_RANGE == linked_list->data.address64.resource_type) {
temp8 = (u8)
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
reply other threads:[~2004-01-21 0:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200401201720.09609.bjorn.helgaas@hp.com \
--to=bjorn.helgaas-vxdhtt5mjny@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox