mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[IA64-SGI] sn2 mutex conversion
Migrate sn2 code to use mutex and completion events rather than semaphores. Signed-off-by: Jes Sorensen <[email protected]> Acked-by: Dean Nelson <[email protected]> Signed-off-by: Tony Luck <[email protected]>
This commit is contained in:
parent
ac354a899b
commit
f9e505a9a0
6 changed files with 43 additions and 44 deletions
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include <linux/cache.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <asm/sn/types.h>
|
||||
#include <asm/sn/bte.h>
|
||||
|
||||
|
|
@ -359,7 +360,7 @@ typedef void (*xpc_notify_func)(enum xpc_retval reason, partid_t partid,
|
|||
* the channel.
|
||||
*/
|
||||
struct xpc_registration {
|
||||
struct semaphore sema;
|
||||
struct mutex mutex;
|
||||
xpc_channel_func func; /* function to call */
|
||||
void *key; /* pointer to user's key */
|
||||
u16 nentries; /* #of msg entries in local msg queue */
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/sysctl.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/completion.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/sn/bte.h>
|
||||
|
|
@ -335,8 +337,7 @@ struct xpc_openclose_args {
|
|||
* and consumed by the intended recipient.
|
||||
*/
|
||||
struct xpc_notify {
|
||||
struct semaphore sema; /* notify semaphore */
|
||||
volatile u8 type; /* type of notification */
|
||||
volatile u8 type; /* type of notification */
|
||||
|
||||
/* the following two fields are only used if type == XPC_N_CALL */
|
||||
xpc_notify_func func; /* user's notify function */
|
||||
|
|
@ -465,8 +466,8 @@ struct xpc_channel {
|
|||
xpc_channel_func func; /* user's channel function */
|
||||
void *key; /* pointer to user's key */
|
||||
|
||||
struct semaphore msg_to_pull_sema; /* next msg to pull serialization */
|
||||
struct semaphore wdisconnect_sema; /* wait for channel disconnect */
|
||||
struct mutex msg_to_pull_mutex; /* next msg to pull serialization */
|
||||
struct completion wdisconnect_wait; /* wait for channel disconnect */
|
||||
|
||||
struct xpc_openclose_args *local_openclose_args; /* args passed on */
|
||||
/* opening or closing of channel */
|
||||
|
|
|
|||
Loading…
Reference in a new issue