[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>

authored by Daniel Walker and committed by Tony Luck 0245583a acffc84a

+5 -4
+5 -4
arch/ia64/sn/kernel/sn2/sn_hwperf.c
··· 33 #include <linux/smp_lock.h> 34 #include <linux/nodemask.h> 35 #include <linux/smp.h> 36 37 #include <asm/processor.h> 38 #include <asm/topology.h> ··· 51 static int sn_hwperf_obj_cnt = 0; 52 static nasid_t sn_hwperf_master_nasid = INVALID_NASID; 53 static int sn_hwperf_init(void); 54 - static DECLARE_MUTEX(sn_hwperf_init_mutex); 55 56 #define cnode_possible(n) ((n) < num_cnodes) 57 ··· 885 int e = 0; 886 887 /* single threaded, once-only initialization */ 888 - down(&sn_hwperf_init_mutex); 889 890 if (sn_hwperf_salheap) { 891 - up(&sn_hwperf_init_mutex); 892 return e; 893 } 894 ··· 937 sn_hwperf_salheap = NULL; 938 sn_hwperf_obj_cnt = 0; 939 } 940 - up(&sn_hwperf_init_mutex); 941 return e; 942 } 943
··· 33 #include <linux/smp_lock.h> 34 #include <linux/nodemask.h> 35 #include <linux/smp.h> 36 + #include <linux/mutex.h> 37 38 #include <asm/processor.h> 39 #include <asm/topology.h> ··· 50 static int sn_hwperf_obj_cnt = 0; 51 static nasid_t sn_hwperf_master_nasid = INVALID_NASID; 52 static int sn_hwperf_init(void); 53 + static DEFINE_MUTEX(sn_hwperf_init_mutex); 54 55 #define cnode_possible(n) ((n) < num_cnodes) 56 ··· 884 int e = 0; 885 886 /* single threaded, once-only initialization */ 887 + mutex_lock(&sn_hwperf_init_mutex); 888 889 if (sn_hwperf_salheap) { 890 + mutex_unlock(&sn_hwperf_init_mutex); 891 return e; 892 } 893 ··· 936 sn_hwperf_salheap = NULL; 937 sn_hwperf_obj_cnt = 0; 938 } 939 + mutex_unlock(&sn_hwperf_init_mutex); 940 return e; 941 } 942