Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1727992
| From | Baoquan He <bhe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 RESEND 1/2] x86/UV: Introduce a helper function to check UV system at earlier stage |
| Date | 2017-09-07 09:50 +0200 |
| Message-ID | <umZJy-5lZ-37@gated-at.bofh.it> (permalink) |
| References | <umZJw-5lZ-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The BIOS on SGI UV system will report a UV system table which describes
specific firmware capabilities available to the Linux kernel at runtime.
This UV system table only exists on SGI UV system. And it's detected
in efi_init() which is at very early stage.
So introduce a new helper function is_early_uv_system() to identify if
a system is UV system. Later we will use it to check if the running
system is UV system in mm KASLR code.
Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Mike Travis <travis@sgi.com>
---
arch/x86/include/asm/uv/uv.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h
index b5a32231abd8..93d7ad8763ba 100644
--- a/arch/x86/include/asm/uv/uv.h
+++ b/arch/x86/include/asm/uv/uv.h
@@ -18,6 +18,11 @@ extern void uv_nmi_init(void);
extern void uv_system_init(void);
extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
const struct flush_tlb_info *info);
+#include <linux/efi.h>
+static inline int is_early_uv_system(void)
+{
+ return !((efi.uv_systab == EFI_INVALID_TABLE_ADDR) || !efi.uv_systab);
+}
#else /* X86_UV */
@@ -30,6 +35,7 @@ static inline const struct cpumask *
uv_flush_tlb_others(const struct cpumask *cpumask,
const struct flush_tlb_info *info)
{ return cpumask; }
+static inline int is_early_uv_system(void) { return 0; }
#endif /* X86_UV */
--
2.5.5
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 RESEND 0/2] x86/mm/KASLR: Do not adapt the size of the direct mapping section for SGI UV system Baoquan He <bhe@redhat.com> - 2017-09-07 09:50 +0200 [PATCH v2 RESEND 2/2] x86/mm/KASLR: Do not adapt the size of the direct mapping section for SGI UV system Baoquan He <bhe@redhat.com> - 2017-09-07 09:50 +0200 [PATCH v2 RESEND 1/2] x86/UV: Introduce a helper function to check UV system at earlier stage Baoquan He <bhe@redhat.com> - 2017-09-07 09:50 +0200
csiph-web