From 68f48dbfeec85921e9fb4d012cf1b2dd2f8f50e5 Mon Sep 17 00:00:00 2001 From: Dave Hansen Date: Tue, 22 Sep 2026 21:23:44 -0700 Subject: [PATCH 15/75] x86/platform/uv: Stop fetching the unused BIOS SN info fields uv_bios_get_sn_info() returns six pieces of information about the partition. Three of them - uv_type, sn_region_size and system_serial_number - are stored in globals that nothing ever reads: - uv_type held the hub version from the BIOS partition info. Despite the name it has nothing to do with the "uv_type" sysfs file, which is served by uv_type_string() out of the UV archtype string. - sn_region_size and system_serial_number were read by the sgi-xp drivers, removed by commit dbf69afe320e ("misc: sgi-xp: Remove SGI XP drivers"). uv_bios_get_sn_info() already tests each output pointer for NULL, so pass NULL for the three unwanted ones and delete the globals, their declarations and the now-pointless sn_region_size export. sn_partition_id and sn_coherency_id stay: both are read by the uv_sysfs driver. No functional change intended. --- arch/x86/include/asm/uv/bios.h | 3 --- arch/x86/kernel/apic/x2apic_uv_x.c | 2 +- arch/x86/platform/uv/bios_uv.c | 4 ---- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/x86/include/asm/uv/bios.h b/arch/x86/include/asm/uv/bios.h index 5a7ea1dd195ce..91b20e10434d1 100644 --- a/arch/x86/include/asm/uv/bios.h +++ b/arch/x86/include/asm/uv/bios.h @@ -186,11 +186,8 @@ extern int uv_bios_init(void); extern unsigned long get_uv_systab_phys(bool msg); extern unsigned long sn_rtc_cycles_per_second; -extern int uv_type; extern long sn_partition_id; extern long sn_coherency_id; -extern long sn_region_size; -extern long system_serial_number; extern ssize_t uv_get_archtype(char *buf, int len); extern int uv_get_hubless_system(void); diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 9ec752a8a985a..e795e08b1fe4f 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -1465,7 +1465,7 @@ static void __init uv_system_init_hub(void) /* uv_num_possible_blades() is really the hub count: */ pr_info("UV: Found %d hubs, %d nodes, %d CPUs\n", uv_num_possible_blades(), num_possible_nodes(), num_possible_cpus()); - uv_bios_get_sn_info(0, &uv_type, &sn_partition_id, &sn_coherency_id, &sn_region_size, &system_serial_number); + uv_bios_get_sn_info(0, NULL, &sn_partition_id, &sn_coherency_id, NULL, NULL); uv_rtc_init(); /* diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c index f4ffeee0c2a8c..ee952428becdf 100644 --- a/arch/x86/platform/uv/bios_uv.c +++ b/arch/x86/platform/uv/bios_uv.c @@ -73,10 +73,6 @@ long sn_partition_id; EXPORT_SYMBOL_GPL(sn_partition_id); long sn_coherency_id; EXPORT_SYMBOL_GPL(sn_coherency_id); -long sn_region_size; -EXPORT_SYMBOL_GPL(sn_region_size); -long system_serial_number; -int uv_type; s64 uv_bios_get_sn_info(int fc, int *uvtype, long *partid, long *coher, long *region, long *ssn) -- 2.43.0