x86/uv cleanups
Subsystems (2)
Hi x86 maintainers,
this series removes various exports and sniplets of dead code from the x86/uv code.
Diffstat:
8 files changed, 21 insertions(+), 111 deletions(-)
PATCH 1/11 x86/uv: Mark uv_bios_call and uv_bios_call_irqsave static
Both functions are only used inside of bios_uv.c.
--- arch/x86/include/asm/uv/bios.h | 6 ------ arch/x86/platform/uv/bios_uv.c | 9 ++++----- 2 files changed, 4 insertions(+), 11 deletions(-)
arch/x86/include/asm/uv/bios.h +0 -6
@@ -123,12 +123,6 @@ enum uv_memprotect {UV_MEMPROT_ALLOW_RW }; -/* -* bios calls have 6 parameters -*/ -extern s64 uv_bios_call (enum uv_bios_cmd ,u64 ,u64 ,u64 ,u64 ,u64 ); -extern s64 uv_bios_call_irqsave (enum uv_bios_cmd ,u64 ,u64 ,u64 ,u64 ,u64 ); -extern s64 uv_bios_get_sn_info (int ,int *,long *,long *,long *,long *);extern s64 uv_bios_freq_base (u64 ,u64 *); extern int uv_bios_mq_watchlist_alloc(unsigned long, unsigned int,
arch/x86/platform/uv/bios_uv.c +4 -5
@@ -45,7 +45,8 @@ static s64 __uv_bios_call(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,return ret; } -s64 uv_bios_call (enum uv_bios_cmd which,u64 a1,u64 a2,u64 a3,u64 a4,u64 a5) +static s64 uv_bios_call (enum uv_bios_cmd which,u64 a1,u64 a2,u64 a3,u64 a4, +u64 a5) {s64 ret;
@@ -57,10 +58,9 @@ s64 uv_bios_call(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3, u64 a4, u64 a5)return ret; } -EXPORT_SYMBOL_GPL (uv_bios_call); -s64 uv_bios_call_irqsave (enum uv_bios_cmd which,u64 a1,u64 a2,u64 a3, -u64 a4,u64 a5) +static s64 uv_bios_call_irqsave (enum uv_bios_cmd which,u64 a1,u64 a2,u64 a3, +u64 a4,u64 a5) {unsigned long bios_flags;s64 ret;
@@ -77,7 +77,6 @@ s64 uv_bios_call_irqsave(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,return ret; } -long sn_partition_id;EXPORT_SYMBOL_GPL (sn_partition_id);long sn_coherency_id;
Signature · 1 line
2.26.2
[tip: x86/platform] x86/platform/uv: Mark uv_bios_call() and uv_bios_call_irqsave() static
The following commit has been merged into the x86/platform branch of tip:
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 30ad8db3a2c2e0121202342c6c2a48fc28937056 Gitweb: https://git.kernel.org/tip/30ad8db3a2c2e0121202342c6c2a48fc28937056 Author: Christoph Hellwig <[email protected]> AuthorDate: Mon, 04 May 2020 19:15:17 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 07 May 2020 15:32:19 +02:00
x86/platform/uv: Mark uv_bios_call() and uv_bios_call_irqsave() static
Both functions are only used inside of bios_uv.c.
--- arch/x86/include/asm/uv/bios.h | 6 ------ arch/x86/platform/uv/bios_uv.c | 9 ++++----- 2 files changed, 4 insertions(+), 11 deletions(-)
arch/x86/include/asm/uv/bios.h +0 -6
@@ -123,12 +123,6 @@ enum uv_memprotect {UV_MEMPROT_ALLOW_RW }; -/* -* bios calls have 6 parameters -*/ -extern s64 uv_bios_call (enum uv_bios_cmd ,u64 ,u64 ,u64 ,u64 ,u64 ); -extern s64 uv_bios_call_irqsave (enum uv_bios_cmd ,u64 ,u64 ,u64 ,u64 ,u64 ); -extern s64 uv_bios_get_sn_info (int ,int *,long *,long *,long *,long *);extern s64 uv_bios_freq_base (u64 ,u64 *); extern int uv_bios_mq_watchlist_alloc(unsigned long, unsigned int,
arch/x86/platform/uv/bios_uv.c +4 -5
@@ -45,7 +45,8 @@ static s64 __uv_bios_call(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,return ret; } -s64 uv_bios_call (enum uv_bios_cmd which,u64 a1,u64 a2,u64 a3,u64 a4,u64 a5) +static s64 uv_bios_call (enum uv_bios_cmd which,u64 a1,u64 a2,u64 a3,u64 a4, +u64 a5) {s64 ret;
@@ -57,10 +58,9 @@ s64 uv_bios_call(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3, u64 a4, u64 a5)return ret; } -EXPORT_SYMBOL_GPL (uv_bios_call); -s64 uv_bios_call_irqsave (enum uv_bios_cmd which,u64 a1,u64 a2,u64 a3, -u64 a4,u64 a5) +static s64 uv_bios_call_irqsave (enum uv_bios_cmd which,u64 a1,u64 a2,u64 a3, +u64 a4,u64 a5) {unsigned long bios_flags;s64 ret;
@@ -77,7 +77,6 @@ s64 uv_bios_call_irqsave(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,return ret; } -long sn_partition_id;EXPORT_SYMBOL_GPL (sn_partition_id);long sn_coherency_id;
PATCH 2/11 x86/uv: Remove the uv_partition_coherence_id macro
In reply to Christoph Hellwiguv_partition_coherence_id is only used once. Just open code it in the only user.
--- arch/x86/include/asm/uv/bios.h | 1 - arch/x86/platform/uv/uv_sysfs.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
arch/x86/include/asm/uv/bios.h +0 -1
@@ -140,7 +140,6 @@ extern long sn_partition_id;extern long sn_coherency_id;extern long sn_region_size;extern long system_serial_number; -#define uv_partition_coherence_id () (sn_coherency_id)extern struct kobject *sgi_uv_kobj;/* /sys/firmware/sgi_uv */
arch/x86/platform/uv/uv_sysfs.c +1 -1
@@ -21,7 +21,7 @@ static ssize_t partition_id_show(struct kobject *kobj,static ssize_t coherence_id_show (struct kobject *kobj,struct kobj_attribute *attr,char *buf) { -return snprintf (buf,PAGE_SIZE ,"%ld\n" ,uv_partition_coherence_id ()); +return snprintf (buf,PAGE_SIZE ,"%ld\n" , sn_coherency_id); } static struct kobj_attribute partition_id_attr =
Signature · 1 line
2.26.2
[tip: x86/platform] x86/platform/uv: Remove the uv_partition_coherence_id() macro
The following commit has been merged into the x86/platform branch of tip:
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 32988cfd579f7912aeb9a66bf44ca4ce0fa860f1 Gitweb: https://git.kernel.org/tip/32988cfd579f7912aeb9a66bf44ca4ce0fa860f1 Author: Christoph Hellwig <[email protected]> AuthorDate: Mon, 04 May 2020 19:15:18 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 07 May 2020 15:32:19 +02:00
x86/platform/uv: Remove the uv_partition_coherence_id() macro
uv_partition_coherence_id() is only used once. Just open code it in the only user.
--- arch/x86/include/asm/uv/bios.h | 1 - arch/x86/platform/uv/uv_sysfs.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
arch/x86/include/asm/uv/bios.h +0 -1
@@ -140,7 +140,6 @@ extern long sn_partition_id;extern long sn_coherency_id;extern long sn_region_size;extern long system_serial_number; -#define uv_partition_coherence_id () (sn_coherency_id)extern struct kobject *sgi_uv_kobj;/* /sys/firmware/sgi_uv */
arch/x86/platform/uv/uv_sysfs.c +1 -1
@@ -21,7 +21,7 @@ static ssize_t partition_id_show(struct kobject *kobj,static ssize_t coherence_id_show (struct kobject *kobj,struct kobj_attribute *attr,char *buf) { -return snprintf (buf,PAGE_SIZE ,"%ld\n" ,uv_partition_coherence_id ()); +return snprintf (buf,PAGE_SIZE ,"%ld\n" , sn_coherency_id); } static struct kobj_attribute partition_id_attr =
PATCH 3/11 x86/uv: Unexport sn_coherency_id
In reply to Christoph Hellwigsn_coherency_id is only used by x2apic_uv_x.c, and uv_sysfs.c, both of which can't be modular.
--- arch/x86/platform/uv/bios_uv.c | 1 - 1 file changed, 1 deletion(-)
arch/x86/platform/uv/bios_uv.c +0 -1
@@ -80,7 +80,6 @@ static s64 uv_bios_call_irqsave(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,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;
Signature · 1 line
2.26.2
[tip: x86/platform] x86/platform/uv: Unexport sn_coherency_id
The following commit has been merged into the x86/platform branch of tip:
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 23e1a65f3c7eb7f3c3f6f6c26b89cdf3bcb128f6 Gitweb: https://git.kernel.org/tip/23e1a65f3c7eb7f3c3f6f6c26b89cdf3bcb128f6 Author: Christoph Hellwig <[email protected]> AuthorDate: Mon, 04 May 2020 19:15:19 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 07 May 2020 15:32:20 +02:00
x86/platform/uv: Unexport sn_coherency_id
sn_coherency_id is only used by x2apic_uv_x.c, and uv_sysfs.c, both of which can't be modular.
--- arch/x86/platform/uv/bios_uv.c | 1 - 1 file changed, 1 deletion(-)
arch/x86/platform/uv/bios_uv.c +0 -1
@@ -80,7 +80,6 @@ static s64 uv_bios_call_irqsave(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,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;
PATCH 4/11 x86/uv: Unexport symbols only used by x2apic_uv_x.c
In reply to Christoph Hellwiguv_bios_set_legacy_vga_target, uv_bios_freq_base, uv_bios_get_sn_info, uv_type, system_serial_number and sn_region_size are only used in x2apic_uv_x.c, which can't be modular.
--- arch/x86/platform/uv/bios_uv.c | 6 ------ 1 file changed, 6 deletions(-)
arch/x86/platform/uv/bios_uv.c +0 -6
@@ -83,10 +83,7 @@ long sn_coherency_id;long sn_region_size;EXPORT_SYMBOL_GPL (sn_region_size);long system_serial_number; -EXPORT_SYMBOL_GPL (system_serial_number);int uv_type; -EXPORT_SYMBOL_GPL (uv_type); -s64 uv_bios_get_sn_info (int fc,int *uvtype,long *partid,long *coher,long *region,long *ssn)
@@ -113,7 +110,6 @@ s64 uv_bios_get_sn_info(int fc, int *uvtype, long *partid, long *coher, *ssn = v1;return ret; } -EXPORT_SYMBOL_GPL (uv_bios_get_sn_info); int uv_bios_mq_watchlist_alloc(unsigned long addr, unsigned int mq_size,
@@ -164,7 +160,6 @@ s64 uv_bios_freq_base(u64 clock_type, u64 *ticks_per_second)return uv_bios_call (UV_BIOS_FREQ_BASE , clock_type, (u64 )ticks_per_second,0 ,0 ,0 ); } -EXPORT_SYMBOL_GPL (uv_bios_freq_base);/* * uv_bios_set_legacy_vga_target - Set Legacy VGA I/O Target
@@ -183,7 +178,6 @@ int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus)return uv_bios_call (UV_BIOS_SET_LEGACY_VGA_TARGET , (u64 )decode, (u64 )domain, (u64 )bus,0 ,0 ); } -EXPORT_SYMBOL_GPL (uv_bios_set_legacy_vga_target);int uv_bios_init (void ) {
Signature · 1 line
2.26.2
[tip: x86/platform] x86/platform/uv: Unexport symbols only used by x2apic_uv_x.c
The following commit has been merged into the x86/platform branch of tip:
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 2bd04b6fe4fc46f3a358b62deac4912e778f36a4 Gitweb: https://git.kernel.org/tip/2bd04b6fe4fc46f3a358b62deac4912e778f36a4 Author: Christoph Hellwig <[email protected]> AuthorDate: Mon, 04 May 2020 19:15:20 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 07 May 2020 15:32:20 +02:00
x86/platform/uv: Unexport symbols only used by x2apic_uv_x.c
uv_bios_set_legacy_vga_target, uv_bios_freq_base, uv_bios_get_sn_info, uv_type, system_serial_number and sn_region_size are only used in x2apic_uv_x.c, which can't be modular.
--- arch/x86/platform/uv/bios_uv.c | 6 ------ 1 file changed, 6 deletions(-)
arch/x86/platform/uv/bios_uv.c +0 -6
@@ -83,10 +83,7 @@ long sn_coherency_id;long sn_region_size;EXPORT_SYMBOL_GPL (sn_region_size);long system_serial_number; -EXPORT_SYMBOL_GPL (system_serial_number);int uv_type; -EXPORT_SYMBOL_GPL (uv_type); -s64 uv_bios_get_sn_info (int fc,int *uvtype,long *partid,long *coher,long *region,long *ssn)
@@ -113,7 +110,6 @@ s64 uv_bios_get_sn_info(int fc, int *uvtype, long *partid, long *coher, *ssn = v1;return ret; } -EXPORT_SYMBOL_GPL (uv_bios_get_sn_info); int uv_bios_mq_watchlist_alloc(unsigned long addr, unsigned int mq_size,
@@ -164,7 +160,6 @@ s64 uv_bios_freq_base(u64 clock_type, u64 *ticks_per_second)return uv_bios_call (UV_BIOS_FREQ_BASE , clock_type, (u64 )ticks_per_second,0 ,0 ,0 ); } -EXPORT_SYMBOL_GPL (uv_bios_freq_base);/* * uv_bios_set_legacy_vga_target - Set Legacy VGA I/O Target
@@ -183,7 +178,6 @@ int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus)return uv_bios_call (UV_BIOS_SET_LEGACY_VGA_TARGET , (u64 )decode, (u64 )domain, (u64 )bus,0 ,0 ); } -EXPORT_SYMBOL_GPL (uv_bios_set_legacy_vga_target);int uv_bios_init (void ) {
PATCH 5/11 x86/uv: Remove the UV*_HUB_IS_SUPPORTED macros
In reply to Christoph HellwigAll of the macros are always defined to one. Remove them and the dead code keyed off them.
--- arch/x86/include/asm/uv/uv_hub.h | 19 ------------------- arch/x86/include/asm/uv/uv_mmrs.h | 7 ------- 2 files changed, 26 deletions(-)
arch/x86/include/asm/uv/uv_hub.h +0 -19
@@ -244,51 +244,32 @@ static inline int uv_hub_info_check(int version)#define UV4_HUB_REVISION_BASE 7#define UV4A_HUB_REVISION_BASE 8/* UV4 (fixed) rev 2 */ -/* WARNING: UVx_HUB_IS_SUPPORTED defines are deprecated and will be removed */ static inline int is_uv1_hub (void ) { -#ifdef UV1_HUB_IS_SUPPORTED return is_uv_hubbed (uv (1 )); -#else -return 0 ; -#endif }static inline int is_uv2_hub (void ) { -#ifdef UV2_HUB_IS_SUPPORTED return is_uv_hubbed (uv (2 )); -#else -return 0 ; -#endif }static inline int is_uv3_hub (void ) { -#ifdef UV3_HUB_IS_SUPPORTED return is_uv_hubbed (uv (3 )); -#else -return 0 ; -#endif }/* First test "is UV4A", then "is UV4" */ static inline int is_uv4a_hub (void ) { -#ifdef UV4A_HUB_IS_SUPPORTED if (is_uv_hubbed (uv (4 )))return (uv_hub_info->hub_revision ==UV4A_HUB_REVISION_BASE ); -#endif return 0 ; }static inline int is_uv4_hub (void ) { -#ifdef UV4_HUB_IS_SUPPORTED return is_uv_hubbed (uv (4 )); -#else -return 0 ; -#endif }static inline int is_uvx_hub (void )
arch/x86/include/asm/uv/uv_mmrs.h +0 -7
@@ -99,13 +99,6 @@#define UV3_HUB_PART_NUMBER_X 0x4321#define UV4_HUB_PART_NUMBER 0x99a1 -/* Compat: Indicate which UV Hubs are supported. */ -#define UV1_HUB_IS_SUPPORTED 1 -#define UV2_HUB_IS_SUPPORTED 1 -#define UV3_HUB_IS_SUPPORTED 1 -#define UV4_HUB_IS_SUPPORTED 1 -#define UV4A_HUB_IS_SUPPORTED 1 -/* Error function to catch undefined references */ extern unsigned long uv_undefined (char *str);
Signature · 1 line
2.26.2
[tip: x86/platform] x86/platform/uv: Remove the UV*_HUB_IS_SUPPORTED macros
The following commit has been merged into the x86/platform branch of tip:
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: cc1991058705a9cc4fe51ab6c2116df17922ef82 Gitweb: https://git.kernel.org/tip/cc1991058705a9cc4fe51ab6c2116df17922ef82 Author: Christoph Hellwig <[email protected]> AuthorDate: Mon, 04 May 2020 19:15:21 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 07 May 2020 15:32:21 +02:00
x86/platform/uv: Remove the UV*_HUB_IS_SUPPORTED macros
All of the macros are always defined to one. Remove them and the dead code keyed off them.
--- arch/x86/include/asm/uv/uv_hub.h | 19 ------------------- arch/x86/include/asm/uv/uv_mmrs.h | 7 ------- 2 files changed, 26 deletions(-)
arch/x86/include/asm/uv/uv_hub.h +0 -19
@@ -244,51 +244,32 @@ static inline int uv_hub_info_check(int version)#define UV4_HUB_REVISION_BASE 7#define UV4A_HUB_REVISION_BASE 8/* UV4 (fixed) rev 2 */ -/* WARNING: UVx_HUB_IS_SUPPORTED defines are deprecated and will be removed */ static inline int is_uv1_hub (void ) { -#ifdef UV1_HUB_IS_SUPPORTED return is_uv_hubbed (uv (1 )); -#else -return 0 ; -#endif }static inline int is_uv2_hub (void ) { -#ifdef UV2_HUB_IS_SUPPORTED return is_uv_hubbed (uv (2 )); -#else -return 0 ; -#endif }static inline int is_uv3_hub (void ) { -#ifdef UV3_HUB_IS_SUPPORTED return is_uv_hubbed (uv (3 )); -#else -return 0 ; -#endif }/* First test "is UV4A", then "is UV4" */ static inline int is_uv4a_hub (void ) { -#ifdef UV4A_HUB_IS_SUPPORTED if (is_uv_hubbed (uv (4 )))return (uv_hub_info->hub_revision ==UV4A_HUB_REVISION_BASE ); -#endif return 0 ; }static inline int is_uv4_hub (void ) { -#ifdef UV4_HUB_IS_SUPPORTED return is_uv_hubbed (uv (4 )); -#else -return 0 ; -#endif }static inline int is_uvx_hub (void )
arch/x86/include/asm/uv/uv_mmrs.h +0 -7
@@ -99,13 +99,6 @@#define UV3_HUB_PART_NUMBER_X 0x4321#define UV4_HUB_PART_NUMBER 0x99a1 -/* Compat: Indicate which UV Hubs are supported. */ -#define UV1_HUB_IS_SUPPORTED 1 -#define UV2_HUB_IS_SUPPORTED 1 -#define UV3_HUB_IS_SUPPORTED 1 -#define UV4_HUB_IS_SUPPORTED 1 -#define UV4A_HUB_IS_SUPPORTED 1 -/* Error function to catch undefined references */ extern unsigned long uv_undefined (char *str);
PATCH 6/11 x86/uv: Mark is_uv_hubless static
In reply to Christoph Hellwigis_uv_hubless is only used in x2apic_uv_x.c.
--- arch/x86/include/asm/uv/uv.h | 2 -- arch/x86/kernel/apic/x2apic_uv_x.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-)
arch/x86/include/asm/uv/uv.h +0 -2
@@ -31,7 +31,6 @@ static inline bool is_early_uv_system(void) }extern int is_uv_system (void );extern int is_uv_hubbed (int uvtype); -extern int is_uv_hubless (int uvtype);extern void uv_cpu_init (void );extern void uv_nmi_init (void );extern void uv_system_init (void );
@@ -44,7 +43,6 @@ static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }static inline bool is_early_uv_system (void ) {return 0 ; }static inline int is_uv_system (void ) {return 0 ; }static inline int is_uv_hubbed (int uv) {return 0 ; } -static inline int is_uv_hubless (int uv) {return 0 ; }static inline void uv_cpu_init (void ) { }static inline void uv_system_init (void ) { } static inline const struct cpumask *
arch/x86/kernel/apic/x2apic_uv_x.c +1 -2
@@ -385,11 +385,10 @@ int is_uv_hubbed(int uvtype) }EXPORT_SYMBOL_GPL (is_uv_hubbed); -int is_uv_hubless (int uvtype) +static int is_uv_hubless (int uvtype) {return (uv_hubless_system & uvtype); } -EXPORT_SYMBOL_GPL (is_uv_hubless);void **__uv_hub_info_list;EXPORT_SYMBOL_GPL (__uv_hub_info_list);
Signature · 1 line
2.26.2
[tip: x86/platform] x86/platform/uv: Mark is_uv_hubless() static
The following commit has been merged into the x86/platform branch of tip:
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: e4dd8b8351264fb5bef30c0a77e4d171e0603d63 Gitweb: https://git.kernel.org/tip/e4dd8b8351264fb5bef30c0a77e4d171e0603d63 Author: Christoph Hellwig <[email protected]> AuthorDate: Mon, 04 May 2020 19:15:22 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 07 May 2020 15:32:21 +02:00
x86/platform/uv: Mark is_uv_hubless() static
is_uv_hubless() is only used in x2apic_uv_x.c.
--- arch/x86/include/asm/uv/uv.h | 2 -- arch/x86/kernel/apic/x2apic_uv_x.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-)
arch/x86/include/asm/uv/uv.h +0 -2
@@ -31,7 +31,6 @@ static inline bool is_early_uv_system(void) }extern int is_uv_system (void );extern int is_uv_hubbed (int uvtype); -extern int is_uv_hubless (int uvtype);extern void uv_cpu_init (void );extern void uv_nmi_init (void );extern void uv_system_init (void );
@@ -44,7 +43,6 @@ static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }static inline bool is_early_uv_system (void ) {return 0 ; }static inline int is_uv_system (void ) {return 0 ; }static inline int is_uv_hubbed (int uv) {return 0 ; } -static inline int is_uv_hubless (int uv) {return 0 ; }static inline void uv_cpu_init (void ) { }static inline void uv_system_init (void ) { } static inline const struct cpumask *
arch/x86/kernel/apic/x2apic_uv_x.c +1 -2
@@ -385,11 +385,10 @@ int is_uv_hubbed(int uvtype) }EXPORT_SYMBOL_GPL (is_uv_hubbed); -int is_uv_hubless (int uvtype) +static int is_uv_hubless (int uvtype) {return (uv_hubless_system & uvtype); } -EXPORT_SYMBOL_GPL (is_uv_hubless);void **__uv_hub_info_list;EXPORT_SYMBOL_GPL (__uv_hub_info_list);
PATCH 7/11 x86/uv: Mark uv_min_hub_revision_id static
In reply to Christoph HellwigThis variable is only used inside x2apic_uv_x and not even declared in a header.
--- arch/x86/kernel/apic/x2apic_uv_x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/kernel/apic/x2apic_uv_x.c +1 -2
@@ -48,8 +48,7 @@ static struct {unsigned int gnode_shift; } uv_cpuid; -int uv_min_hub_revision_id; -EXPORT_SYMBOL_GPL (uv_min_hub_revision_id); +static int uv_min_hub_revision_id;unsigned int uv_apicid_hibits;EXPORT_SYMBOL_GPL (uv_apicid_hibits);
Signature · 1 line
2.26.2
[tip: x86/platform] x86/platform/uv: Mark uv_min_hub_revision_id static
The following commit has been merged into the x86/platform branch of tip:
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 8263b059379c4a95fe0181db1e5a2e9c2229d929 Gitweb: https://git.kernel.org/tip/8263b059379c4a95fe0181db1e5a2e9c2229d929 Author: Christoph Hellwig <[email protected]> AuthorDate: Mon, 04 May 2020 19:15:23 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 07 May 2020 15:32:22 +02:00
x86/platform/uv: Mark uv_min_hub_revision_id static
This variable is only used inside x2apic_uv_x and not even declared in a header.
--- arch/x86/kernel/apic/x2apic_uv_x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/kernel/apic/x2apic_uv_x.c +1 -2
@@ -48,8 +48,7 @@ static struct {unsigned int gnode_shift; } uv_cpuid; -int uv_min_hub_revision_id; -EXPORT_SYMBOL_GPL (uv_min_hub_revision_id); +static int uv_min_hub_revision_id;unsigned int uv_apicid_hibits;EXPORT_SYMBOL_GPL (uv_apicid_hibits);
PATCH 8/11 x86/uv: Simplify uv_send_IPI_one
In reply to Christoph HellwigMerge two helpers only used by uv_send_IPI_one into the main function.
--- arch/x86/include/asm/uv/uv_hub.h | 20 -------------------- arch/x86/kernel/apic/x2apic_uv_x.c | 19 ++++++++++++++----- 2 files changed, 14 insertions(+), 25 deletions(-)
arch/x86/include/asm/uv/uv_hub.h +0 -20
@@ -837,26 +837,6 @@ static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value) }extern unsigned int uv_apicid_hibits; -static unsigned long uv_hub_ipi_value (int apicid,int vector,int mode) -{ - apicid |= uv_apicid_hibits; -return (1UL <<UVH_IPI_INT_SEND_SHFT ) | - ((apicid) <<UVH_IPI_INT_APIC_ID_SHFT ) | - (mode <<UVH_IPI_INT_DELIVERY_MODE_SHFT ) | - (vector <<UVH_IPI_INT_VECTOR_SHFT ); -} - -static inline void uv_hub_send_ipi (int pnode,int apicid,int vector) -{ -unsigned long val; -unsigned long dmode = dest_Fixed; - -if (vector ==NMI_VECTOR ) - dmode = dest_NMI; - - val =uv_hub_ipi_value (apicid, vector, dmode); -uv_write_global_mmr64 (pnode,UVH_IPI_INT , val); -}/* * Get the minimum revision number of the hub chips within the partition.
arch/x86/kernel/apic/x2apic_uv_x.c +14 -5
@@ -588,12 +588,21 @@ static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip)static void uv_send_IPI_one (int cpu,int vector) { -unsigned long apicid; -int pnode; +unsigned long apicid =per_cpu (x86_cpu_to_apicid, cpu); +int pnode =uv_apicid_to_pnode (apicid); +unsigned long dmode, val; + +if (vector ==NMI_VECTOR ) + dmode = dest_NMI; +else + dmode = dest_Fixed; - apicid =per_cpu (x86_cpu_to_apicid, cpu); - pnode =uv_apicid_to_pnode (apicid); -uv_hub_send_ipi (pnode, apicid, vector); + val = (1UL <<UVH_IPI_INT_SEND_SHFT ) | + ((apicid | uv_apicid_hibits) <<UVH_IPI_INT_APIC_ID_SHFT ) | + (dmode <<UVH_IPI_INT_DELIVERY_MODE_SHFT ) | + (vector <<UVH_IPI_INT_VECTOR_SHFT ); + +uv_write_global_mmr64 (pnode,UVH_IPI_INT , val); }static void uv_send_IPI_mask (const struct cpumask *mask,int vector)
Signature · 1 line
2.26.2
[tip: x86/platform] x86/platform/uv: Simplify uv_send_IPI_one()
The following commit has been merged into the x86/platform branch of tip:
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 8e77554580250f1185cffd8d3ac6a9b01de05d60 Gitweb: https://git.kernel.org/tip/8e77554580250f1185cffd8d3ac6a9b01de05d60 Author: Christoph Hellwig <[email protected]> AuthorDate: Mon, 04 May 2020 19:15:24 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 07 May 2020 15:32:22 +02:00
x86/platform/uv: Simplify uv_send_IPI_one()
Merge two helpers only used by uv_send_IPI_one() into the main function.
--- arch/x86/include/asm/uv/uv_hub.h | 20 -------------------- arch/x86/kernel/apic/x2apic_uv_x.c | 19 ++++++++++++++----- 2 files changed, 14 insertions(+), 25 deletions(-)
arch/x86/include/asm/uv/uv_hub.h +0 -20
@@ -837,26 +837,6 @@ static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value) }extern unsigned int uv_apicid_hibits; -static unsigned long uv_hub_ipi_value (int apicid,int vector,int mode) -{ - apicid |= uv_apicid_hibits; -return (1UL <<UVH_IPI_INT_SEND_SHFT ) | - ((apicid) <<UVH_IPI_INT_APIC_ID_SHFT ) | - (mode <<UVH_IPI_INT_DELIVERY_MODE_SHFT ) | - (vector <<UVH_IPI_INT_VECTOR_SHFT ); -} - -static inline void uv_hub_send_ipi (int pnode,int apicid,int vector) -{ -unsigned long val; -unsigned long dmode = dest_Fixed; - -if (vector ==NMI_VECTOR ) - dmode = dest_NMI; - - val =uv_hub_ipi_value (apicid, vector, dmode); -uv_write_global_mmr64 (pnode,UVH_IPI_INT , val); -}/* * Get the minimum revision number of the hub chips within the partition.
arch/x86/kernel/apic/x2apic_uv_x.c +14 -5
@@ -588,12 +588,21 @@ static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip)static void uv_send_IPI_one (int cpu,int vector) { -unsigned long apicid; -int pnode; +unsigned long apicid =per_cpu (x86_cpu_to_apicid, cpu); +int pnode =uv_apicid_to_pnode (apicid); +unsigned long dmode, val; + +if (vector ==NMI_VECTOR ) + dmode = dest_NMI; +else + dmode = dest_Fixed; - apicid =per_cpu (x86_cpu_to_apicid, cpu); - pnode =uv_apicid_to_pnode (apicid); -uv_hub_send_ipi (pnode, apicid, vector); + val = (1UL <<UVH_IPI_INT_SEND_SHFT ) | + ((apicid | uv_apicid_hibits) <<UVH_IPI_INT_APIC_ID_SHFT ) | + (dmode <<UVH_IPI_INT_DELIVERY_MODE_SHFT ) | + (vector <<UVH_IPI_INT_VECTOR_SHFT ); + +uv_write_global_mmr64 (pnode,UVH_IPI_INT , val); }static void uv_send_IPI_mask (const struct cpumask *mask,int vector)
PATCH 9/11 x86/uv: Remove _uv_hub_info_check
In reply to Christoph HellwigNeither this functions not the helpers used to implement it are used anywhere in the kernel tree.
--- arch/x86/include/asm/uv/uv_hub.h | 14 -------------- arch/x86/kernel/apic/x2apic_uv_x.c | 6 ------ 2 files changed, 20 deletions(-)
arch/x86/include/asm/uv/uv_hub.h +0 -14
@@ -219,20 +219,6 @@ static inline struct uv_hub_info_s *uv_cpu_hub_info(int cpu)return (struct uv_hub_info_s *)uv_cpu_info_per (cpu)->p_uv_hub_info; } -#define UV_HUB_INFO_VERSION 0x7150 -extern int uv_hub_info_version (void ); -static inline int uv_hub_info_check (int version) -{ -if (uv_hub_info_version () == version) -return 0 ; - -pr_crit ("UV: uv_hub_info version(%x) mismatch, expecting(%x)\n" , -uv_hub_info_version (), version); - -BUG ();/* Catastrophic - cannot continue on unknown UV system */ -} -#define _uv_hub_info_check () uv_hub_info_check(UV_HUB_INFO_VERSION) -/* * HUB revision ranges for each UV HUB architecture. * This is a software convention - NOT the hardware revision numbers in
arch/x86/kernel/apic/x2apic_uv_x.c +0 -6
@@ -415,12 +415,6 @@ static __initdata struct uv_gam_range_s *_gr_table;#define SOCK_EMPTY ((unsigned short)~0) -extern int uv_hub_info_version (void ) -{ -return UV_HUB_INFO_VERSION ; -} -EXPORT_SYMBOL (uv_hub_info_version); -/* Default UV memory block size is 2GB */ static unsigned long mem_block_size__initdata = (2UL <<30 );
Signature · 1 line
2.26.2
[tip: x86/platform] x86/platform/uv: Remove _uv_hub_info_check()
The following commit has been merged into the x86/platform branch of tip:
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: fbe1d37866d249b6936cf526592957725a941f95 Gitweb: https://git.kernel.org/tip/fbe1d37866d249b6936cf526592957725a941f95 Author: Christoph Hellwig <[email protected]> AuthorDate: Mon, 04 May 2020 19:15:25 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 07 May 2020 15:32:23 +02:00
x86/platform/uv: Remove _uv_hub_info_check()
Neither this functions nor the helpers used to implement it are used anywhere in the kernel tree.
--- arch/x86/include/asm/uv/uv_hub.h | 14 -------------- arch/x86/kernel/apic/x2apic_uv_x.c | 6 ------ 2 files changed, 20 deletions(-)
arch/x86/include/asm/uv/uv_hub.h +0 -14
@@ -219,20 +219,6 @@ static inline struct uv_hub_info_s *uv_cpu_hub_info(int cpu)return (struct uv_hub_info_s *)uv_cpu_info_per (cpu)->p_uv_hub_info; } -#define UV_HUB_INFO_VERSION 0x7150 -extern int uv_hub_info_version (void ); -static inline int uv_hub_info_check (int version) -{ -if (uv_hub_info_version () == version) -return 0 ; - -pr_crit ("UV: uv_hub_info version(%x) mismatch, expecting(%x)\n" , -uv_hub_info_version (), version); - -BUG ();/* Catastrophic - cannot continue on unknown UV system */ -} -#define _uv_hub_info_check () uv_hub_info_check(UV_HUB_INFO_VERSION) -/* * HUB revision ranges for each UV HUB architecture. * This is a software convention - NOT the hardware revision numbers in
arch/x86/kernel/apic/x2apic_uv_x.c +0 -6
@@ -415,12 +415,6 @@ static __initdata struct uv_gam_range_s *_gr_table;#define SOCK_EMPTY ((unsigned short)~0) -extern int uv_hub_info_version (void ) -{ -return UV_HUB_INFO_VERSION ; -} -EXPORT_SYMBOL (uv_hub_info_version); -/* Default UV memory block size is 2GB */ static unsigned long mem_block_size__initdata = (2UL <<30 );
PATCH 10/11 x86/uv: Unexport uv_apicid_hibits
In reply to Christoph HellwigThis variable is not used by modular code.
--- arch/x86/kernel/apic/x2apic_uv_x.c | 1 - 1 file changed, 1 deletion(-)
arch/x86/kernel/apic/x2apic_uv_x.c +0 -1
@@ -51,7 +51,6 @@ static struct {static int uv_min_hub_revision_id;unsigned int uv_apicid_hibits; -EXPORT_SYMBOL_GPL (uv_apicid_hibits);static struct apic apic_x2apic_uv_x;static struct uv_hub_info_s uv_hub_info_node0;
Signature · 1 line
2.26.2
[tip: x86/platform] x86/platform/uv: Unexport uv_apicid_hibits
The following commit has been merged into the x86/platform branch of tip:
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 479d6d904557b774c1bd5b0338d8111dd2b322ee Gitweb: https://git.kernel.org/tip/479d6d904557b774c1bd5b0338d8111dd2b322ee Author: Christoph Hellwig <[email protected]> AuthorDate: Mon, 04 May 2020 19:15:26 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 07 May 2020 15:32:23 +02:00
x86/platform/uv: Unexport uv_apicid_hibits
This variable is not used by modular code.
--- arch/x86/kernel/apic/x2apic_uv_x.c | 1 - 1 file changed, 1 deletion(-)
arch/x86/kernel/apic/x2apic_uv_x.c +0 -1
@@ -51,7 +51,6 @@ static struct {static int uv_min_hub_revision_id;unsigned int uv_apicid_hibits; -EXPORT_SYMBOL_GPL (uv_apicid_hibits);static struct apic apic_x2apic_uv_x;static struct uv_hub_info_s uv_hub_info_node0;
PATCH 11/11 x86/uv: Remove the unused _uv_cpu_blade_processor_id macro
In reply to Christoph HellwigNo users anywhere in the kernel tree.
--- arch/x86/include/asm/uv/uv_hub.h | 1 - 1 file changed, 1 deletion(-)
arch/x86/include/asm/uv/uv_hub.h +0 -1
@@ -659,7 +659,6 @@ static inline int uv_cpu_blade_processor_id(int cpu) {return uv_cpu_info_per (cpu)->blade_cpu_id; } -#define _uv_cpu_blade_processor_id 1/* indicate function available */ /* Blade number to Node number (UV1..UV4 is 1:1) */ static inline int uv_blade_to_node (int blade)
Signature · 1 line
2.26.2
[tip: x86/platform] x86/platform/uv: Remove the unused _uv_cpu_blade_processor_id() macro
The following commit has been merged into the x86/platform branch of tip:
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 2981cf836127c2d2d68399d456d2c22688d520b2 Gitweb: https://git.kernel.org/tip/2981cf836127c2d2d68399d456d2c22688d520b2 Author: Christoph Hellwig <[email protected]> AuthorDate: Mon, 04 May 2020 19:15:27 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 07 May 2020 15:32:23 +02:00
x86/platform/uv: Remove the unused _uv_cpu_blade_processor_id() macro
No users anywhere in the kernel tree.
--- arch/x86/include/asm/uv/uv_hub.h | 1 - 1 file changed, 1 deletion(-)
arch/x86/include/asm/uv/uv_hub.h +0 -1
@@ -659,7 +659,6 @@ static inline int uv_cpu_blade_processor_id(int cpu) {return uv_cpu_info_per (cpu)->blade_cpu_id; } -#define _uv_cpu_blade_processor_id 1/* indicate function available */ /* Blade number to Node number (UV1..UV4 is 1:1) */ static inline int uv_blade_to_node (int blade)
Yes, we do see a need to clean up old code where it exists, but we would like to assume this responsibility ourselves in order to ensure functional continuity with externally available open-sourced modules that our customers rely on. This code supports current Superdome Flex systems, as well as forthcoming platforms based on Intel Cooper Lake and Sapphire Rapids processors. Some cleanup is already being included as part of a forthcoming patchset in support of the upcoming Sapphire Rapids platform.
Quoted 8 lines · Christoph Hellwig
Hi x86 maintainers,
this series removes various exports and sniplets of dead code from the x86/uv code.
Diffstat:
8 files changed, 21 insertions(+), 111 deletions(-)
Quoted 12 lines · Dimitri Sivanich
Yes, we do see a need to clean up old code where it exists, but we would like to assume this responsibility ourselves in order to ensure functional continuity with externally available open-sourced modules that our customers rely on. This code supports current Superdome Flex systems, as well as forthcoming platforms based on Intel Cooper Lake and Sapphire Rapids processors. Some cleanup is already being included as part of a forthcoming patchset in support of the upcoming Sapphire Rapids platform.
What is “functional continuity”? How does unused code support anything?
Quoted 11 lines
Nacked-by Dimitri Sivanich <[email protected]>Quoted 9 lines · Christoph Hellwig
Hi x86 maintainers,
this series removes various exports and sniplets of dead code from the x86/uv code.
Diffstat:
8 files changed, 21 insertions(+), 111 deletions(-)
Quoted 7 lines · Dimitri Sivanich
Yes, we do see a need to clean up old code where it exists, but we would like to assume this responsibility ourselves in order to ensure functional continuity with externally available open-sourced modules that our customers rely on. This code supports current Superdome Flex systems, as well as forthcoming platforms based on Intel Cooper Lake and Sapphire Rapids processors. Some cleanup is already being included as part of a forthcoming patchset in support of the upcoming Sapphire Rapids platform.
That's a completely bogus argument.
1) You could have cleaned up that code long ago
2) The rule for code which is unused in the mainline kernel is that it can be removed during spring cleaning unless there is a compelling reason. I can't see one here.
3) Out of tree modules are not supported independent of the license. It's not our problem that you have code out of tree which you could have upstreamed long ago.
Look at the history of platform/uv code. All we see from you guys is:
- Drops of adding support for new platforms
- Occasional fixes when we managed to break UV or you found some bug in your precious code.
Quoted 1 line
Nacked-by Dimitri Sivanich <[email protected]>
I'm happy to add that tag when merging this cleanup.
Thanks,
tglx
Quoted 28 lines · Thomas Gleixner
Quoted 7 lines · Dimitri Sivanich
Yes, we do see a need to clean up old code where it exists, but we would like to assume this responsibility ourselves in order to ensure functional continuity with externally available open-sourced modules that our customers rely on. This code supports current Superdome Flex systems, as well as forthcoming platforms based on Intel Cooper Lake and Sapphire Rapids processors. Some cleanup is already being included as part of a forthcoming patchset in support of the upcoming Sapphire Rapids platform.
That's a completely bogus argument.
1) You could have cleaned up that code long ago
2) The rule for code which is unused in the mainline kernel is that it can be removed during spring cleaning unless there is a compelling reason. I can't see one here.
3) Out of tree modules are not supported independent of the license. It's not our problem that you have code out of tree which you could have upstreamed long ago.
Look at the history of platform/uv code. All we see from you guys is:
- Drops of adding support for new platforms
- Occasional fixes when we managed to break UV or you found some bug in your precious code.
Quoted 7 lines
Quoted 1 line
Nacked-by Dimitri Sivanich <[email protected]>I'm happy to add that tag when merging this cleanup.
Thanks,
tglx
Thomas (and all)
Sorry. We do need to do better.
In addition to Christoph's patches, we will soon be submitting additional clean up patches. Mike Travis is working on a patch to remove old SGI UV1 code. Dimitri Sivanich is working on a sgi_rtc cleanup patch. We are looking at additional cleanup that should have been done previously.
Steve Wahl will be involved on an ongoing basis, so you will see more from us.
Thanks.
Signature · 2 lines
Russ Anderson, SuperDome Flex Linux Kernel Group Manager HPE - Hewlett Packard Enterprise (formerly SGI) [email protected]
Quoted 5 lines · Russ Anderson
In addition to Christoph's patches, we will soon be submitting additional clean up patches. Mike Travis is working on a patch to remove old SGI UV1 code. Dimitri Sivanich is working on a
sgi_rtccleanup patch. We are looking at additional cleanup that should have been done previously.
If you plan to submit these very soon I'll happily defer this cleanup series a bit and can resubmit it on top of your changes.