From: tip-bot for Alex Thorlton <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: travis@sgi.com, peterz@infradead.org, ard.biesheuvel@linaro.org,
brgerst@gmail.com, luto@kernel.org, athorlton@sgi.com,
yamada.masahiro@socionext.com, tglx@linutronix.de, rja@sgi.com,
matt@codeblueprint.co.uk, sivanich@sgi.com, hpa@zytor.com,
torvalds@linux-foundation.org, jpoimboe@redhat.com,
linux-kernel@vger.kernel.org, bp@alien8.de, dvlasenk@redhat.com,
mingo@kernel.org
Subject: [tip:x86/urgent] x86/platform/UV: Fix support for EFI_OLD_MEMMAP after BIOS callback updates
Date: Thu, 20 Oct 2016 22:48:56 -0700 [thread overview]
Message-ID: <tip-caef78b6cdeddf4ad364f95910bba6b43b8eb9bf@git.kernel.org> (raw)
In-Reply-To: <1476928131-170101-1-git-send-email-athorlton@sgi.com>
Commit-ID: caef78b6cdeddf4ad364f95910bba6b43b8eb9bf
Gitweb: http://git.kernel.org/tip/caef78b6cdeddf4ad364f95910bba6b43b8eb9bf
Author: Alex Thorlton <athorlton@sgi.com>
AuthorDate: Wed, 19 Oct 2016 20:48:51 -0500
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 20 Oct 2016 08:47:58 +0200
x86/platform/UV: Fix support for EFI_OLD_MEMMAP after BIOS callback updates
Some time ago, we brought our UV BIOS callback code up to speed with the
new EFI memory mapping scheme, in commit:
d1be84a232e3 ("x86/uv: Update uv_bios_call() to use efi_call_virt_pointer()")
By leveraging some changes that I made to a few of the EFI runtime
callback mechanisms, in commit:
80e75596079f ("efi: Convert efi_call_virt() to efi_call_virt_pointer()")
This got everything running smoothly on UV, with the new EFI mapping
code. However, this left one, small loose end, in that EFI_OLD_MEMMAP
(a.k.a. efi=old_map) will no longer work on UV, on kernels that include
the aforementioned changes.
At the time this was not a major issue (in fact, it still really isn't),
but there's no reason that EFI_OLD_MEMMAP *shouldn't* work on our
systems. This commit adds a check into uv_bios_call(), to see if we have
the EFI_OLD_MEMMAP bit set in efi.flags. If it is set, we fall back to
using our old callback method, which uses efi_call() directly on the __va()
of our function pointer.
Signed-off-by: Alex Thorlton <athorlton@sgi.com>
Acked-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: <stable@vger.kernel.org> # v4.7 and later
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Mike Travis <travis@sgi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <rja@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1476928131-170101-1-git-send-email-athorlton@sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/platform/uv/bios_uv.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index b4d5e95..4a6a5a2 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -40,7 +40,15 @@ s64 uv_bios_call(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3, u64 a4, u64 a5)
*/
return BIOS_STATUS_UNIMPLEMENTED;
- ret = efi_call_virt_pointer(tab, function, (u64)which, a1, a2, a3, a4, a5);
+ /*
+ * If EFI_OLD_MEMMAP is set, we need to fall back to using our old EFI
+ * callback method, which uses efi_call() directly, with the kernel page tables:
+ */
+ if (unlikely(test_bit(EFI_OLD_MEMMAP, &efi.flags)))
+ ret = efi_call((void *)__va(tab->function), (u64)which, a1, a2, a3, a4, a5);
+ else
+ ret = efi_call_virt_pointer(tab, function, (u64)which, a1, a2, a3, a4, a5);
+
return ret;
}
EXPORT_SYMBOL_GPL(uv_bios_call);
next prev parent reply other threads:[~2016-10-21 5:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 1:48 [PATCH v2] x86/platform/UV: Fix support for EFI_OLD_MEMMAP after BIOS callback updates Alex Thorlton
2016-10-20 12:26 ` Matt Fleming
2016-10-21 5:48 ` tip-bot for Alex Thorlton [this message]
2016-10-25 6:46 ` [x86/platform/UV] 71854cb812: will-it-scale.per_thread_ops -2.3% regression kernel test robot
2016-10-25 6:46 ` [lkp] " kernel test robot
2016-10-25 10:57 ` Thomas Gleixner
2016-10-25 10:57 ` [lkp] " Thomas Gleixner
2016-10-27 1:55 ` Ye Xiaolong
2016-10-27 1:55 ` [lkp] " Ye Xiaolong
2016-10-27 22:37 ` Thomas Gleixner
2016-10-27 22:37 ` [lkp] " Thomas Gleixner
2016-10-31 5:41 ` Fengguang Wu
2016-10-31 5:41 ` [LKP] [lkp] " Fengguang Wu
2016-10-31 18:19 ` Thomas Gleixner
2016-10-31 18:19 ` [LKP] [lkp] " Thomas Gleixner
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=tip-caef78b6cdeddf4ad364f95910bba6b43b8eb9bf@git.kernel.org \
--to=tipbot@zytor.com \
--cc=ard.biesheuvel@linaro.org \
--cc=athorlton@sgi.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rja@sgi.com \
--cc=sivanich@sgi.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=travis@sgi.com \
--cc=yamada.masahiro@socionext.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.