From: Matthew Garrett <mjg@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: hpa@zytor.com, x86@kernel.org, matt.fleming@intel.com,
Matthew Garrett <mjg@redhat.com>
Subject: [PATCH] EFI: Only set regions uncacheable if they support it
Date: Thu, 15 Mar 2012 09:56:38 -0400 [thread overview]
Message-ID: <1331819798-1955-1-git-send-email-mjg@redhat.com> (raw)
The EFI memory region attributes field indicates whether the region can
be mapped with various cache attributes. Our current implementation always
marks regions uncacheable if they don't have the writeback support flag.
This causes us to mark some regions uncacheable even if they don't
indicate support for being uncacheable, triggering a clflush that may cause
an MCE. Ensure we only do this for regions which support it.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
arch/x86/platform/efi/efi.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 4cf9bd0..12f78e1 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -682,7 +682,8 @@ void __init efi_enter_virtual_mode(void)
continue;
}
- if (!(md->attribute & EFI_MEMORY_WB)) {
+ if (md->attribute & EFI_MEMORY_UC &&
+ !(md->attribute & EFI_MEMORY_WB)) {
addr = md->virt_addr;
npages = md->num_pages;
memrange_efi_to_native(&addr, &npages);
--
1.7.7.6
next reply other threads:[~2012-03-15 13:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 13:56 Matthew Garrett [this message]
2012-03-15 14:00 ` H. Peter Anvin
2012-03-15 14:07 ` Matthew Garrett
2012-03-15 14:17 ` H. Peter Anvin
2012-03-15 14:24 ` Matthew Garrett
2012-03-15 14:28 ` H. Peter Anvin
2012-03-15 14:33 ` Matthew Garrett
2012-03-15 14:36 ` H. Peter Anvin
2012-03-15 14:42 ` Matthew Garrett
2012-03-15 14:47 ` H. Peter Anvin
2012-03-15 14:54 ` Matthew Garrett
2012-03-15 14:51 ` Alan Cox
2012-03-15 14:54 ` Alan Cox
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=1331819798-1955-1-git-send-email-mjg@redhat.com \
--to=mjg@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®