Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Mike Travis <mike.travis@hpe.com>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Reviewed-by: Dimitri 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.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Mike Travis and committed by
Ingo Molnar
9743cb68 0959f825

+6 -5
+1 -1
arch/x86/include/asm/uv/bios.h
··· 138 138 extern s64 uv_bios_reserved_page_pa(u64, u64 *, u64 *, u64 *); 139 139 extern int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus); 140 140 141 - extern void uv_bios_init(void); 141 + extern int uv_bios_init(void); 142 142 143 143 extern unsigned long sn_rtc_cycles_per_second; 144 144 extern int uv_type;
+5 -4
arch/x86/platform/uv/bios_uv.c
··· 184 184 } 185 185 EXPORT_SYMBOL_GPL(uv_bios_set_legacy_vga_target); 186 186 187 - void uv_bios_init(void) 187 + int uv_bios_init(void) 188 188 { 189 189 uv_systab = NULL; 190 190 if ((uv_systab_phys == EFI_INVALID_TABLE_ADDR) || 191 191 !uv_systab_phys || efi_runtime_disabled()) { 192 192 pr_crit("UV: UVsystab: missing\n"); 193 - return; 193 + return -EEXIST; 194 194 } 195 195 196 196 uv_systab = ioremap(uv_systab_phys, sizeof(struct uv_systab)); 197 197 if (!uv_systab || strncmp(uv_systab->signature, UV_SYSTAB_SIG, 4)) { 198 198 pr_err("UV: UVsystab: bad signature!\n"); 199 199 iounmap(uv_systab); 200 - return; 200 + return -EINVAL; 201 201 } 202 202 203 203 /* Starting with UV4 the UV systab size is variable */ ··· 208 208 uv_systab = ioremap(uv_systab_phys, size); 209 209 if (!uv_systab) { 210 210 pr_err("UV: UVsystab: ioremap(%d) failed!\n", size); 211 - return; 211 + return -EFAULT; 212 212 } 213 213 } 214 214 pr_info("UV: UVsystab: Revision:%x\n", uv_systab->revision); 215 + return 0; 215 216 }