Commit-ID:  2ad510dc372c2caac9aada9ff6dd10e787616e1d
Gitweb:     http://git.kernel.org/tip/2ad510dc372c2caac9aada9ff6dd10e787616e1d
Author:     Sai Praneeth <sai.praneeth.prak...@intel.com>
AuthorDate: Wed, 17 Feb 2016 12:36:06 +0000
Committer:  Ingo Molnar <mi...@kernel.org>
CommitDate: Mon, 22 Feb 2016 08:26:28 +0100

x86/efi: Only map kernel text for EFI mixed mode

The correct symbol to use when figuring out the size of the kernel
text is '_etext', not '_end' which is the symbol for the entire kernel
image includes data and debug sections.

Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prak...@intel.com>
Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Linus Torvalds <torva...@linux-foundation.org>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Ravi Shankar <ravi.v.shan...@intel.com>
Cc: Ricardo Neri <ricardo.n...@intel.com>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: linux-...@vger.kernel.org
Link: 
http://lkml.kernel.org/r/1455712566-16727-14-git-send-email-m...@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mi...@kernel.org>
---
 arch/x86/platform/efi/efi_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index 40d2f44..49e4dd4 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -275,7 +275,7 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, 
unsigned num_pages)
        efi_scratch.phys_stack = virt_to_phys(page_address(page));
        efi_scratch.phys_stack += PAGE_SIZE; /* stack grows down */
 
-       npages = (_end - _text) >> PAGE_SHIFT;
+       npages = (_etext - _text) >> PAGE_SHIFT;
        text = __pa(_text);
        pfn = text >> PAGE_SHIFT;
 

Reply via email to