Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91909
b: refs/heads/master
c: 2c2b94f
h: refs/heads/master
i:
  91907: 4624a8d
v: v3
  • Loading branch information
Dean Nelson authored and Tony Luck committed Apr 22, 2008
1 parent efe6c33 commit b7e9618
Show file tree
Hide file tree
Showing 8 changed files with 269 additions and 392 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35190506b1a18eda7df24b285fdcd94dec7800ef
refs/heads/master: 2c2b94f93f4732c3b9703ce62627e6187e7d6128
6 changes: 3 additions & 3 deletions trunk/drivers/misc/sgi-xp/xp.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ xp_bte_copy(u64 src, u64 vdst, u64 len, u64 mode, void *notification)

ret = bte_copy(src, pdst, len, mode, notification);
if ((ret != BTE_SUCCESS) && BTE_ERROR_RETRY(ret)) {
if (!in_interrupt()) {
if (!in_interrupt())
cond_resched();
}

ret = bte_copy(src, pdst, len, mode, notification);
}

Expand Down Expand Up @@ -255,7 +255,7 @@ enum xpc_retval {
/* 115: BTE end */
xpcBteSh2End = xpcBteSh2Start + BTEFAIL_SH2_ALL,

xpcUnknownReason /* 116: unknown reason -- must be last in list */
xpcUnknownReason /* 116: unknown reason - must be last in enum */
};

/*
Expand Down
41 changes: 20 additions & 21 deletions trunk/drivers/misc/sgi-xp/xp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@
#include "xp.h"

/*
* Target of nofault PIO read.
* The export of xp_nofault_PIOR needs to happen here since it is defined
* in drivers/misc/sgi-xp/xp_nofault.S. The target of the nofault read is
* defined here.
*/
EXPORT_SYMBOL_GPL(xp_nofault_PIOR);

u64 xp_nofault_PIOR_target;
EXPORT_SYMBOL_GPL(xp_nofault_PIOR_target);

/*
* xpc_registrations[] keeps track of xpc_connect()'s done by the kernel-level
* users of XPC.
*/
struct xpc_registration xpc_registrations[XPC_NCHANNELS];
EXPORT_SYMBOL_GPL(xpc_registrations);

/*
* Initialize the XPC interface to indicate that XPC isn't loaded.
Expand All @@ -52,6 +58,7 @@ struct xpc_interface xpc_interface = {
(void (*)(partid_t, int, void *))xpc_notloaded,
(enum xpc_retval(*)(partid_t, void *))xpc_notloaded
};
EXPORT_SYMBOL_GPL(xpc_interface);

/*
* XPC calls this when it (the XPC module) has been loaded.
Expand All @@ -74,6 +81,7 @@ xpc_set_interface(void (*connect) (int),
xpc_interface.received = received;
xpc_interface.partid_to_nasids = partid_to_nasids;
}
EXPORT_SYMBOL_GPL(xpc_set_interface);

/*
* XPC calls this when it (the XPC module) is being unloaded.
Expand All @@ -95,6 +103,7 @@ xpc_clear_interface(void)
xpc_interface.partid_to_nasids = (enum xpc_retval(*)(partid_t, void *))
xpc_notloaded;
}
EXPORT_SYMBOL_GPL(xpc_clear_interface);

/*
* Register for automatic establishment of a channel connection whenever
Expand Down Expand Up @@ -133,9 +142,8 @@ xpc_connect(int ch_number, xpc_channel_func func, void *key, u16 payload_size,

registration = &xpc_registrations[ch_number];

if (mutex_lock_interruptible(&registration->mutex) != 0) {
if (mutex_lock_interruptible(&registration->mutex) != 0)
return xpcInterrupted;
}

/* if XPC_CHANNEL_REGISTERED(ch_number) */
if (registration->func != NULL) {
Expand All @@ -157,6 +165,7 @@ xpc_connect(int ch_number, xpc_channel_func func, void *key, u16 payload_size,

return xpcSuccess;
}
EXPORT_SYMBOL_GPL(xpc_connect);

/*
* Remove the registration for automatic connection of the specified channel
Expand Down Expand Up @@ -207,6 +216,7 @@ xpc_disconnect(int ch_number)

return;
}
EXPORT_SYMBOL_GPL(xpc_disconnect);

int __init
xp_init(void)
Expand All @@ -215,9 +225,8 @@ xp_init(void)
u64 func_addr = *(u64 *)xp_nofault_PIOR;
u64 err_func_addr = *(u64 *)xp_error_PIOR;

if (!ia64_platform_is("sn2")) {
if (!ia64_platform_is("sn2"))
return -ENODEV;
}

/*
* Register a nofault code region which performs a cross-partition
Expand All @@ -228,25 +237,24 @@ xp_init(void)
* least some CPUs on Shubs <= v1.2, which unfortunately we have to
* work around).
*/
if ((ret = sn_register_nofault_code(func_addr, err_func_addr,
err_func_addr, 1, 1)) != 0) {
ret = sn_register_nofault_code(func_addr, err_func_addr, err_func_addr,
1, 1);
if (ret != 0) {
printk(KERN_ERR "XP: can't register nofault code, error=%d\n",
ret);
}
/*
* Setup the nofault PIO read target. (There is no special reason why
* SH_IPI_ACCESS was selected.)
*/
if (is_shub2()) {
if (is_shub2())
xp_nofault_PIOR_target = SH2_IPI_ACCESS0;
} else {
else
xp_nofault_PIOR_target = SH1_IPI_ACCESS;
}

/* initialize the connection registration mutex */
for (ch_number = 0; ch_number < XPC_NCHANNELS; ch_number++) {
for (ch_number = 0; ch_number < XPC_NCHANNELS; ch_number++)
mutex_init(&xpc_registrations[ch_number].mutex);
}

return 0;
}
Expand All @@ -269,12 +277,3 @@ module_exit(xp_exit);
MODULE_AUTHOR("Silicon Graphics, Inc.");
MODULE_DESCRIPTION("Cross Partition (XP) base");
MODULE_LICENSE("GPL");

EXPORT_SYMBOL(xp_nofault_PIOR);
EXPORT_SYMBOL(xp_nofault_PIOR_target);
EXPORT_SYMBOL(xpc_registrations);
EXPORT_SYMBOL(xpc_interface);
EXPORT_SYMBOL(xpc_clear_interface);
EXPORT_SYMBOL(xpc_set_interface);
EXPORT_SYMBOL(xpc_connect);
EXPORT_SYMBOL(xpc_disconnect);
Loading

0 comments on commit b7e9618

Please sign in to comment.