Skip to content

Commit 788b66e

Browse files
mike-travissuryasaimadhu
authored andcommitted
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: Mike Travis <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Dimitri Sivanich <[email protected]> Reviewed-by: Steve Wahl <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent c4d9807 commit 788b66e

File tree

6 files changed

+12
-15
lines changed

6 files changed

+12
-15
lines changed

drivers/misc/sgi-xp/xp.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717

1818
#if defined CONFIG_X86_UV || defined CONFIG_IA64_SGI_UV
1919
#include <asm/uv/uv.h>
20-
#define is_uv() is_uv_system()
21-
#endif
22-
23-
#ifndef is_uv
24-
#define is_uv() 0
2520
#endif
2621

2722
#ifdef USE_DBUG_ON
@@ -79,7 +74,7 @@
7974

8075
#define XPC_MSG_SIZE(_payload_size) \
8176
ALIGN(XPC_MSG_HDR_MAX_SIZE + (_payload_size), \
82-
is_uv() ? 64 : 128)
77+
is_uv_system() ? 64 : 128)
8378

8479

8580
/*

drivers/misc/sgi-xp/xp_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ xp_init(void)
233233
for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++)
234234
mutex_init(&xpc_registrations[ch_number].mutex);
235235

236-
if (is_uv())
236+
if (is_uv_system())
237237
ret = xp_init_uv();
238238
else
239239
ret = 0;
@@ -249,7 +249,7 @@ module_init(xp_init);
249249
static void __exit
250250
xp_exit(void)
251251
{
252-
if (is_uv())
252+
if (is_uv_system())
253253
xp_exit_uv();
254254
}
255255

drivers/misc/sgi-xp/xp_uv.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ xp_restrict_memprotect_uv(unsigned long phys_addr, unsigned long size)
148148
enum xp_retval
149149
xp_init_uv(void)
150150
{
151-
BUG_ON(!is_uv());
151+
WARN_ON(!is_uv_system());
152+
if (!is_uv_system())
153+
return xpUnsupported;
152154

153155
xp_max_npartitions = XP_MAX_NPARTITIONS_UV;
154156
#ifdef CONFIG_X86
@@ -168,5 +170,5 @@ xp_init_uv(void)
168170
void
169171
xp_exit_uv(void)
170172
{
171-
BUG_ON(!is_uv());
173+
WARN_ON(!is_uv_system());
172174
}

drivers/misc/sgi-xp/xpc_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ xpc_do_exit(enum xp_retval reason)
10431043

10441044
xpc_teardown_partitions();
10451045

1046-
if (is_uv())
1046+
if (is_uv_system())
10471047
xpc_exit_uv();
10481048
}
10491049

@@ -1226,7 +1226,7 @@ xpc_init(void)
12261226
dev_set_name(xpc_part, "part");
12271227
dev_set_name(xpc_chan, "chan");
12281228

1229-
if (is_uv()) {
1229+
if (is_uv_system()) {
12301230
ret = xpc_init_uv();
12311231

12321232
} else {
@@ -1312,7 +1312,7 @@ xpc_init(void)
13121312

13131313
xpc_teardown_partitions();
13141314
out_1:
1315-
if (is_uv())
1315+
if (is_uv_system())
13161316
xpc_exit_uv();
13171317
return ret;
13181318
}

drivers/misc/sgi-xp/xpc_partition.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ xpc_discovery(void)
433433
*/
434434
region_size = xp_region_size;
435435

436-
if (is_uv())
436+
if (is_uv_system())
437437
max_regions = 256;
438438
else {
439439
max_regions = 64;

drivers/misc/sgi-xp/xpnet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ xpnet_init(void)
515515
{
516516
int result;
517517

518-
if (!is_uv())
518+
if (!is_uv_system())
519519
return -ENODEV;
520520

521521
dev_info(xpnet, "registering network device %s\n", XPNET_DEVICE_NAME);

0 commit comments

Comments
 (0)