Commit 788b66e3 authored by Mike Travis's avatar Mike Travis Committed by Borislav Petkov

drivers/misc/sgi-xp: Adjust references in UV kernel modules

Remove the define is_uv() is_uv_system and just use the latter as is.
This removes a conflict with a new symbol in the generated uv_mmrs.h
file (is_uv()).
Signed-off-by: default avatarMike Travis <mike.travis@hpe.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarDimitri Sivanich <dimitri.sivanich@hpe.com>
Reviewed-by: default avatarSteve Wahl <steve.wahl@hpe.com>
Link: https://lkml.kernel.org/r/20201005203929.148656-4-mike.travis@hpe.com
parent c4d98077
...@@ -17,11 +17,6 @@ ...@@ -17,11 +17,6 @@
#if defined CONFIG_X86_UV || defined CONFIG_IA64_SGI_UV #if defined CONFIG_X86_UV || defined CONFIG_IA64_SGI_UV
#include <asm/uv/uv.h> #include <asm/uv/uv.h>
#define is_uv() is_uv_system()
#endif
#ifndef is_uv
#define is_uv() 0
#endif #endif
#ifdef USE_DBUG_ON #ifdef USE_DBUG_ON
...@@ -79,7 +74,7 @@ ...@@ -79,7 +74,7 @@
#define XPC_MSG_SIZE(_payload_size) \ #define XPC_MSG_SIZE(_payload_size) \
ALIGN(XPC_MSG_HDR_MAX_SIZE + (_payload_size), \ ALIGN(XPC_MSG_HDR_MAX_SIZE + (_payload_size), \
is_uv() ? 64 : 128) is_uv_system() ? 64 : 128)
/* /*
......
...@@ -233,7 +233,7 @@ xp_init(void) ...@@ -233,7 +233,7 @@ xp_init(void)
for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++) for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++)
mutex_init(&xpc_registrations[ch_number].mutex); mutex_init(&xpc_registrations[ch_number].mutex);
if (is_uv()) if (is_uv_system())
ret = xp_init_uv(); ret = xp_init_uv();
else else
ret = 0; ret = 0;
...@@ -249,7 +249,7 @@ module_init(xp_init); ...@@ -249,7 +249,7 @@ module_init(xp_init);
static void __exit static void __exit
xp_exit(void) xp_exit(void)
{ {
if (is_uv()) if (is_uv_system())
xp_exit_uv(); xp_exit_uv();
} }
......
...@@ -148,7 +148,9 @@ xp_restrict_memprotect_uv(unsigned long phys_addr, unsigned long size) ...@@ -148,7 +148,9 @@ xp_restrict_memprotect_uv(unsigned long phys_addr, unsigned long size)
enum xp_retval enum xp_retval
xp_init_uv(void) xp_init_uv(void)
{ {
BUG_ON(!is_uv()); WARN_ON(!is_uv_system());
if (!is_uv_system())
return xpUnsupported;
xp_max_npartitions = XP_MAX_NPARTITIONS_UV; xp_max_npartitions = XP_MAX_NPARTITIONS_UV;
#ifdef CONFIG_X86 #ifdef CONFIG_X86
...@@ -168,5 +170,5 @@ xp_init_uv(void) ...@@ -168,5 +170,5 @@ xp_init_uv(void)
void void
xp_exit_uv(void) xp_exit_uv(void)
{ {
BUG_ON(!is_uv()); WARN_ON(!is_uv_system());
} }
...@@ -1043,7 +1043,7 @@ xpc_do_exit(enum xp_retval reason) ...@@ -1043,7 +1043,7 @@ xpc_do_exit(enum xp_retval reason)
xpc_teardown_partitions(); xpc_teardown_partitions();
if (is_uv()) if (is_uv_system())
xpc_exit_uv(); xpc_exit_uv();
} }
...@@ -1226,7 +1226,7 @@ xpc_init(void) ...@@ -1226,7 +1226,7 @@ xpc_init(void)
dev_set_name(xpc_part, "part"); dev_set_name(xpc_part, "part");
dev_set_name(xpc_chan, "chan"); dev_set_name(xpc_chan, "chan");
if (is_uv()) { if (is_uv_system()) {
ret = xpc_init_uv(); ret = xpc_init_uv();
} else { } else {
...@@ -1312,7 +1312,7 @@ xpc_init(void) ...@@ -1312,7 +1312,7 @@ xpc_init(void)
xpc_teardown_partitions(); xpc_teardown_partitions();
out_1: out_1:
if (is_uv()) if (is_uv_system())
xpc_exit_uv(); xpc_exit_uv();
return ret; return ret;
} }
......
...@@ -433,7 +433,7 @@ xpc_discovery(void) ...@@ -433,7 +433,7 @@ xpc_discovery(void)
*/ */
region_size = xp_region_size; region_size = xp_region_size;
if (is_uv()) if (is_uv_system())
max_regions = 256; max_regions = 256;
else { else {
max_regions = 64; max_regions = 64;
......
...@@ -515,7 +515,7 @@ xpnet_init(void) ...@@ -515,7 +515,7 @@ xpnet_init(void)
{ {
int result; int result;
if (!is_uv()) if (!is_uv_system())
return -ENODEV; return -ENODEV;
dev_info(xpnet, "registering network device %s\n", XPNET_DEVICE_NAME); dev_info(xpnet, "registering network device %s\n", XPNET_DEVICE_NAME);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment