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(-)
uv_partition_coherence_id is only used once. Just open code it in the
only user.
Signed-off-by: Christoph Hellwig <[email protected]>
---
arch/x86/include/asm/uv/bios.h | 1 -
arch/x86/platform/uv/uv_sysfs.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/uv/bios.h b/arch/x86/include/asm/uv/bios.h
index fc85dafa5e496..2fcc3ac12e76c 100644
--- a/arch/x86/include/asm/uv/bios.h
+++ b/arch/x86/include/asm/uv/bios.h
@@ -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 */
diff --git a/arch/x86/platform/uv/uv_sysfs.c b/arch/x86/platform/uv/uv_sysfs.c
index 62214731fea5e..266773e2fb379 100644
--- a/arch/x86/platform/uv/uv_sysfs.c
+++ b/arch/x86/platform/uv/uv_sysfs.c
@@ -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 =
--
2.26.2
Both functions are only used inside of bios_uv.c.
Signed-off-by: Christoph Hellwig <[email protected]>
---
arch/x86/include/asm/uv/bios.h | 6 ------
arch/x86/platform/uv/bios_uv.c | 9 ++++-----
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/arch/x86/include/asm/uv/bios.h b/arch/x86/include/asm/uv/bios.h
index 389174eaec794..fc85dafa5e496 100644
--- a/arch/x86/include/asm/uv/bios.h
+++ b/arch/x86/include/asm/uv/bios.h
@@ -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,
diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index c60255da5a6cd..ca287554e2342 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -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;
--
2.26.2
sn_coherency_id is only used by x2apic_uv_x.c, and uv_sysfs.c, both
of which can't be modular.
Signed-off-by: Christoph Hellwig <[email protected]>
---
arch/x86/platform/uv/bios_uv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index ca287554e2342..5d675c4f459b4 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -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;
--
2.26.2
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.
Signed-off-by: Christoph Hellwig <[email protected]>
---
arch/x86/platform/uv/bios_uv.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index 5d675c4f459b4..4494589a288ae 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -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)
{
--
2.26.2
is_uv_hubless is only used in x2apic_uv_x.c.
Signed-off-by: Christoph Hellwig <[email protected]>
---
arch/x86/include/asm/uv/uv.h | 2 --
arch/x86/kernel/apic/x2apic_uv_x.c | 3 +--
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h
index 45ea95ce79b46..ae587ce544f44 100644
--- a/arch/x86/include/asm/uv/uv.h
+++ b/arch/x86/include/asm/uv/uv.h
@@ -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 *
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index ad53b2abc859f..cb07a98771f9f 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -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);
--
2.26.2
This variable is only used inside x2apic_uv_x and not even declared
in a header.
Signed-off-by: Christoph Hellwig <[email protected]>
---
arch/x86/kernel/apic/x2apic_uv_x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index cb07a98771f9f..f1a0142e27319 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -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);
--
2.26.2
This variable is not used by modular code.
Signed-off-by: Christoph Hellwig <[email protected]>
---
arch/x86/kernel/apic/x2apic_uv_x.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 8cf0e24cf8835..10339ad02033a 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -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;
--
2.26.2
No users anywhere in the kernel tree.
Signed-off-by: Christoph Hellwig <[email protected]>
---
arch/x86/include/asm/uv/uv_hub.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 9eabd7e52fd15..60ca0afdeaf9f 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -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)
--
2.26.2
Merge two helpers only used by uv_send_IPI_one into the main function.
Signed-off-by: Christoph Hellwig <[email protected]>
---
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(-)
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index a998e65e6a584..8a25d95cdf200 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -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.
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index f1a0142e27319..3830538095e6a 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -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)
--
2.26.2
Neither this functions not the helpers used to implement it are used
anywhere in the kernel tree.
Signed-off-by: Christoph Hellwig <[email protected]>
---
arch/x86/include/asm/uv/uv_hub.h | 14 --------------
arch/x86/kernel/apic/x2apic_uv_x.c | 6 ------
2 files changed, 20 deletions(-)
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 8a25d95cdf200..9eabd7e52fd15 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -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
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 3830538095e6a..8cf0e24cf8835 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -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);
--
2.26.2
All of the macros are always defined to one. Remove them and the dead
code keyed off them.
Signed-off-by: Christoph Hellwig <[email protected]>
---
arch/x86/include/asm/uv/uv_hub.h | 19 -------------------
arch/x86/include/asm/uv/uv_mmrs.h | 7 -------
2 files changed, 26 deletions(-)
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 950cd1395d5dd..a998e65e6a584 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -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)
diff --git a/arch/x86/include/asm/uv/uv_mmrs.h b/arch/x86/include/asm/uv/uv_mmrs.h
index 62c79e26a59ac..9ee5ed6e8b348 100644
--- a/arch/x86/include/asm/uv/uv_mmrs.h
+++ b/arch/x86/include/asm/uv/uv_mmrs.h
@@ -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);
--
2.26.2
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.
Nacked-by: Dimitri Sivanich <[email protected]>
On Mon, May 04, 2020 at 07:15:16PM +0200, Christoph Hellwig wrote:
> 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(-)
> On May 5, 2020, at 9:25 AM, Dimitri Sivanich <[email protected]> wrote:
>
> 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?
> Nacked-by: Dimitri Sivanich <[email protected]>
>
>> On Mon, May 04, 2020 at 07:15:16PM +0200, Christoph Hellwig wrote:
>> 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(-)
Dimitri Sivanich <[email protected]> writes:
> 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.
> Nacked-by: Dimitri Sivanich <[email protected]>
I'm happy to add that tag when merging this cleanup.
Thanks,
tglx
On Wed, May 06, 2020 at 01:14:40AM +0200, Thomas Gleixner wrote:
> Dimitri Sivanich <[email protected]> writes:
> > 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.
>
> > 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.
--
Russ Anderson, SuperDome Flex Linux Kernel Group Manager
HPE - Hewlett Packard Enterprise (formerly SGI) [email protected]
On Wed, May 06, 2020 at 04:36:50PM -0500, Russ Anderson wrote:
> 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.
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.
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.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
arch/x86/kernel/apic/x2apic_uv_x.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 8cf0e24..10339ad 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -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;
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.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Not-acked-by: Dimitri Sivanich <[email protected]>
Cc: Russ Anderson <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
arch/x86/include/asm/uv/bios.h | 1 -
arch/x86/platform/uv/uv_sysfs.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/uv/bios.h b/arch/x86/include/asm/uv/bios.h
index fc85daf..2fcc3ac 100644
--- a/arch/x86/include/asm/uv/bios.h
+++ b/arch/x86/include/asm/uv/bios.h
@@ -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 */
diff --git a/arch/x86/platform/uv/uv_sysfs.c b/arch/x86/platform/uv/uv_sysfs.c
index 6221473..266773e 100644
--- a/arch/x86/platform/uv/uv_sysfs.c
+++ b/arch/x86/platform/uv/uv_sysfs.c
@@ -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 =
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.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Not-acked-by: Dimitri Sivanich <[email protected]>
Cc: Russ Anderson <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
arch/x86/kernel/apic/x2apic_uv_x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index cb07a98..f1a0142 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -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);
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.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Not-acked-by: Dimitri Sivanich <[email protected]>
Cc: Russ Anderson <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
arch/x86/include/asm/uv/uv_hub.h | 14 --------------
arch/x86/kernel/apic/x2apic_uv_x.c | 6 ------
2 files changed, 20 deletions(-)
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 8a25d95..9eabd7e 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -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
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 3830538..8cf0e24 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -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);
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.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Not-acked-by: Dimitri Sivanich <[email protected]>
Cc: Russ Anderson <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
arch/x86/include/asm/uv/uv.h | 2 --
arch/x86/kernel/apic/x2apic_uv_x.c | 3 +--
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h
index 45ea95c..ae587ce 100644
--- a/arch/x86/include/asm/uv/uv.h
+++ b/arch/x86/include/asm/uv/uv.h
@@ -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 *
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index ad53b2a..cb07a98 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -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);
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.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Not-acked-by: Dimitri Sivanich <[email protected]>
Cc: Russ Anderson <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
arch/x86/include/asm/uv/uv_hub.h | 19 -------------------
arch/x86/include/asm/uv/uv_mmrs.h | 7 -------
2 files changed, 26 deletions(-)
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 950cd13..a998e65 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -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)
diff --git a/arch/x86/include/asm/uv/uv_mmrs.h b/arch/x86/include/asm/uv/uv_mmrs.h
index 62c79e2..9ee5ed6 100644
--- a/arch/x86/include/asm/uv/uv_mmrs.h
+++ b/arch/x86/include/asm/uv/uv_mmrs.h
@@ -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);
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.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Not-acked-by: Dimitri Sivanich <[email protected]>
Cc: Russ Anderson <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
arch/x86/include/asm/uv/uv_hub.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 9eabd7e..60ca0af 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -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)
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.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Not-acked-by: Dimitri Sivanich <[email protected]>
Cc: Russ Anderson <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
arch/x86/platform/uv/bios_uv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index ca28755..5d675c4 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -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;
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.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Not-acked-by: Dimitri Sivanich <[email protected]>
Cc: Russ Anderson <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
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(-)
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index a998e65..8a25d95 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -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.
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index f1a0142..3830538 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -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)
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.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Not-acked-by: Dimitri Sivanich <[email protected]>
Cc: Russ Anderson <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
arch/x86/include/asm/uv/bios.h | 6 ------
arch/x86/platform/uv/bios_uv.c | 9 ++++-----
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/arch/x86/include/asm/uv/bios.h b/arch/x86/include/asm/uv/bios.h
index 389174e..fc85daf 100644
--- a/arch/x86/include/asm/uv/bios.h
+++ b/arch/x86/include/asm/uv/bios.h
@@ -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,
diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index c60255d..ca28755 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -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;
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.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Not-acked-by: Dimitri Sivanich <[email protected]>
Cc: Russ Anderson <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
arch/x86/platform/uv/bios_uv.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index 5d675c4..4494589 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -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)
{