aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/sn
diff options
context:
space:
mode:
authorDaniel Walker <dwalker@mvista.com>2008-01-10 23:31:51 -0500
committerTony Luck <tony.luck@intel.com>2008-02-04 18:39:02 -0500
commit0245583ab454ba56131921e26ad966b56bcc0a5b (patch)
tree3d0e0ca3c98b5acb08182294c354212b05429ec4 /arch/ia64/sn
parentacffc84ad9c1c8a79b8c1d6b9f4f530f37cba9ab (diff)
[IA64] sn_hwperf semaphore to mutex
Really simple mutex style semaphore user. The new API is struct mutex which is what I've converted it to with this change. Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/sn')
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index ca882744d75..4b0d1538e7e 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -33,6 +33,7 @@
33#include <linux/smp_lock.h> 33#include <linux/smp_lock.h>
34#include <linux/nodemask.h> 34#include <linux/nodemask.h>
35#include <linux/smp.h> 35#include <linux/smp.h>
36#include <linux/mutex.h>
36 37
37#include <asm/processor.h> 38#include <asm/processor.h>
38#include <asm/topology.h> 39#include <asm/topology.h>
@@ -50,7 +51,7 @@ static void *sn_hwperf_salheap = NULL;
50static int sn_hwperf_obj_cnt = 0; 51static int sn_hwperf_obj_cnt = 0;
51static nasid_t sn_hwperf_master_nasid = INVALID_NASID; 52static nasid_t sn_hwperf_master_nasid = INVALID_NASID;
52static int sn_hwperf_init(void); 53static int sn_hwperf_init(void);
53static DECLARE_MUTEX(sn_hwperf_init_mutex); 54static DEFINE_MUTEX(sn_hwperf_init_mutex);
54 55
55#define cnode_possible(n) ((n) < num_cnodes) 56#define cnode_possible(n) ((n) < num_cnodes)
56 57
@@ -884,10 +885,10 @@ static int sn_hwperf_init(void)
884 int e = 0; 885 int e = 0;
885 886
886 /* single threaded, once-only initialization */ 887 /* single threaded, once-only initialization */
887 down(&sn_hwperf_init_mutex); 888 mutex_lock(&sn_hwperf_init_mutex);
888 889
889 if (sn_hwperf_salheap) { 890 if (sn_hwperf_salheap) {
890 up(&sn_hwperf_init_mutex); 891 mutex_unlock(&sn_hwperf_init_mutex);
891 return e; 892 return e;
892 } 893 }
893 894
@@ -936,7 +937,7 @@ out:
936 sn_hwperf_salheap = NULL; 937 sn_hwperf_salheap = NULL;
937 sn_hwperf_obj_cnt = 0; 938 sn_hwperf_obj_cnt = 0;
938 } 939 }
939 up(&sn_hwperf_init_mutex); 940 mutex_unlock(&sn_hwperf_init_mutex);
940 return e; 941 return e;
941} 942}
942 943