Commit 9743cb68 authored by Mike Travis's avatar Mike Travis Committed by Ingo Molnar

x86/platform/uv: Add return code to UV BIOS Init function

Add a return code to the UV BIOS init function that indicates the
successful initialization of the kernel/BIOS callback interface.
Signed-off-by: default avatarMike Travis <mike.travis@hpe.com>
Reviewed-by: default avatarSteve Wahl <steve.wahl@hpe.com>
Reviewed-by: default avatarDimitri Sivanich <dimitri.sivanich@hpe.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Hedi Berriche <hedi.berriche@hpe.com>
Cc: Justin Ernst <justin.ernst@hpe.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <russ.anderson@hpe.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190910145839.895739629@stormcage.eag.rdlabs.hpecorp.netSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 0959f825
...@@ -138,7 +138,7 @@ extern s64 uv_bios_change_memprotect(u64, u64, enum uv_memprotect); ...@@ -138,7 +138,7 @@ extern s64 uv_bios_change_memprotect(u64, u64, enum uv_memprotect);
extern s64 uv_bios_reserved_page_pa(u64, u64 *, u64 *, u64 *); extern s64 uv_bios_reserved_page_pa(u64, u64 *, u64 *, u64 *);
extern int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus); extern int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus);
extern void uv_bios_init(void); extern int uv_bios_init(void);
extern unsigned long sn_rtc_cycles_per_second; extern unsigned long sn_rtc_cycles_per_second;
extern int uv_type; extern int uv_type;
......
...@@ -184,20 +184,20 @@ int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus) ...@@ -184,20 +184,20 @@ int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus)
} }
EXPORT_SYMBOL_GPL(uv_bios_set_legacy_vga_target); EXPORT_SYMBOL_GPL(uv_bios_set_legacy_vga_target);
void uv_bios_init(void) int uv_bios_init(void)
{ {
uv_systab = NULL; uv_systab = NULL;
if ((uv_systab_phys == EFI_INVALID_TABLE_ADDR) || if ((uv_systab_phys == EFI_INVALID_TABLE_ADDR) ||
!uv_systab_phys || efi_runtime_disabled()) { !uv_systab_phys || efi_runtime_disabled()) {
pr_crit("UV: UVsystab: missing\n"); pr_crit("UV: UVsystab: missing\n");
return; return -EEXIST;
} }
uv_systab = ioremap(uv_systab_phys, sizeof(struct uv_systab)); uv_systab = ioremap(uv_systab_phys, sizeof(struct uv_systab));
if (!uv_systab || strncmp(uv_systab->signature, UV_SYSTAB_SIG, 4)) { if (!uv_systab || strncmp(uv_systab->signature, UV_SYSTAB_SIG, 4)) {
pr_err("UV: UVsystab: bad signature!\n"); pr_err("UV: UVsystab: bad signature!\n");
iounmap(uv_systab); iounmap(uv_systab);
return; return -EINVAL;
} }
/* Starting with UV4 the UV systab size is variable */ /* Starting with UV4 the UV systab size is variable */
...@@ -208,8 +208,9 @@ void uv_bios_init(void) ...@@ -208,8 +208,9 @@ void uv_bios_init(void)
uv_systab = ioremap(uv_systab_phys, size); uv_systab = ioremap(uv_systab_phys, size);
if (!uv_systab) { if (!uv_systab) {
pr_err("UV: UVsystab: ioremap(%d) failed!\n", size); pr_err("UV: UVsystab: ioremap(%d) failed!\n", size);
return; return -EFAULT;
} }
} }
pr_info("UV: UVsystab: Revision:%x\n", uv_systab->revision); pr_info("UV: UVsystab: Revision:%x\n", uv_systab->revision);
return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment