Skip to content

Commit 9743cb6

Browse files
mike-travisIngo Molnar
authored andcommitted
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 <[email protected]> Reviewed-by: Steve Wahl <[email protected]> Reviewed-by: Dimitri Sivanich <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Hedi Berriche <[email protected]> Cc: Justin Ernst <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Russ Anderson <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 0959f82 commit 9743cb6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

arch/x86/include/asm/uv/bios.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ extern s64 uv_bios_change_memprotect(u64, u64, enum uv_memprotect);
138138
extern s64 uv_bios_reserved_page_pa(u64, u64 *, u64 *, u64 *);
139139
extern int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus);
140140

141-
extern void uv_bios_init(void);
141+
extern int uv_bios_init(void);
142142

143143
extern unsigned long sn_rtc_cycles_per_second;
144144
extern int uv_type;

arch/x86/platform/uv/bios_uv.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,20 +184,20 @@ int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus)
184184
}
185185
EXPORT_SYMBOL_GPL(uv_bios_set_legacy_vga_target);
186186

187-
void uv_bios_init(void)
187+
int uv_bios_init(void)
188188
{
189189
uv_systab = NULL;
190190
if ((uv_systab_phys == EFI_INVALID_TABLE_ADDR) ||
191191
!uv_systab_phys || efi_runtime_disabled()) {
192192
pr_crit("UV: UVsystab: missing\n");
193-
return;
193+
return -EEXIST;
194194
}
195195

196196
uv_systab = ioremap(uv_systab_phys, sizeof(struct uv_systab));
197197
if (!uv_systab || strncmp(uv_systab->signature, UV_SYSTAB_SIG, 4)) {
198198
pr_err("UV: UVsystab: bad signature!\n");
199199
iounmap(uv_systab);
200-
return;
200+
return -EINVAL;
201201
}
202202

203203
/* Starting with UV4 the UV systab size is variable */
@@ -208,8 +208,9 @@ void uv_bios_init(void)
208208
uv_systab = ioremap(uv_systab_phys, size);
209209
if (!uv_systab) {
210210
pr_err("UV: UVsystab: ioremap(%d) failed!\n", size);
211-
return;
211+
return -EFAULT;
212212
}
213213
}
214214
pr_info("UV: UVsystab: Revision:%x\n", uv_systab->revision);
215+
return 0;
215216
}

0 commit comments

Comments
 (0)