@@ -93,7 +93,7 @@ static int cti_enable_hw(struct cti_drvdata *drvdata)
93
93
unsigned long flags ;
94
94
int rc = 0 ;
95
95
96
- spin_lock_irqsave (& drvdata -> spinlock , flags );
96
+ raw_spin_lock_irqsave (& drvdata -> spinlock , flags );
97
97
98
98
/* no need to do anything if enabled or unpowered*/
99
99
if (config -> hw_enabled || !config -> hw_powered )
@@ -108,15 +108,15 @@ static int cti_enable_hw(struct cti_drvdata *drvdata)
108
108
109
109
config -> hw_enabled = true;
110
110
drvdata -> config .enable_req_count ++ ;
111
- spin_unlock_irqrestore (& drvdata -> spinlock , flags );
111
+ raw_spin_unlock_irqrestore (& drvdata -> spinlock , flags );
112
112
return rc ;
113
113
114
114
cti_state_unchanged :
115
115
drvdata -> config .enable_req_count ++ ;
116
116
117
117
/* cannot enable due to error */
118
118
cti_err_not_enabled :
119
- spin_unlock_irqrestore (& drvdata -> spinlock , flags );
119
+ raw_spin_unlock_irqrestore (& drvdata -> spinlock , flags );
120
120
return rc ;
121
121
}
122
122
@@ -125,7 +125,7 @@ static void cti_cpuhp_enable_hw(struct cti_drvdata *drvdata)
125
125
{
126
126
struct cti_config * config = & drvdata -> config ;
127
127
128
- spin_lock (& drvdata -> spinlock );
128
+ raw_spin_lock (& drvdata -> spinlock );
129
129
config -> hw_powered = true;
130
130
131
131
/* no need to do anything if no enable request */
@@ -138,12 +138,12 @@ static void cti_cpuhp_enable_hw(struct cti_drvdata *drvdata)
138
138
139
139
cti_write_all_hw_regs (drvdata );
140
140
config -> hw_enabled = true;
141
- spin_unlock (& drvdata -> spinlock );
141
+ raw_spin_unlock (& drvdata -> spinlock );
142
142
return ;
143
143
144
144
/* did not re-enable due to no claim / no request */
145
145
cti_hp_not_enabled :
146
- spin_unlock (& drvdata -> spinlock );
146
+ raw_spin_unlock (& drvdata -> spinlock );
147
147
}
148
148
149
149
/* disable hardware */
@@ -153,7 +153,7 @@ static int cti_disable_hw(struct cti_drvdata *drvdata)
153
153
struct coresight_device * csdev = drvdata -> csdev ;
154
154
int ret = 0 ;
155
155
156
- spin_lock (& drvdata -> spinlock );
156
+ raw_spin_lock (& drvdata -> spinlock );
157
157
158
158
/* don't allow negative refcounts, return an error */
159
159
if (!drvdata -> config .enable_req_count ) {
@@ -177,12 +177,12 @@ static int cti_disable_hw(struct cti_drvdata *drvdata)
177
177
178
178
coresight_disclaim_device_unlocked (csdev );
179
179
CS_LOCK (drvdata -> base );
180
- spin_unlock (& drvdata -> spinlock );
180
+ raw_spin_unlock (& drvdata -> spinlock );
181
181
return ret ;
182
182
183
183
/* not disabled this call */
184
184
cti_not_disabled :
185
- spin_unlock (& drvdata -> spinlock );
185
+ raw_spin_unlock (& drvdata -> spinlock );
186
186
return ret ;
187
187
}
188
188
@@ -198,11 +198,11 @@ void cti_write_intack(struct device *dev, u32 ackval)
198
198
struct cti_drvdata * drvdata = dev_get_drvdata (dev -> parent );
199
199
struct cti_config * config = & drvdata -> config ;
200
200
201
- spin_lock (& drvdata -> spinlock );
201
+ raw_spin_lock (& drvdata -> spinlock );
202
202
/* write if enabled */
203
203
if (cti_active (config ))
204
204
cti_write_single_reg (drvdata , CTIINTACK , ackval );
205
- spin_unlock (& drvdata -> spinlock );
205
+ raw_spin_unlock (& drvdata -> spinlock );
206
206
}
207
207
208
208
/*
@@ -369,7 +369,7 @@ int cti_channel_trig_op(struct device *dev, enum cti_chan_op op,
369
369
reg_offset = (direction == CTI_TRIG_IN ? CTIINEN (trigger_idx ) :
370
370
CTIOUTEN (trigger_idx ));
371
371
372
- spin_lock (& drvdata -> spinlock );
372
+ raw_spin_lock (& drvdata -> spinlock );
373
373
374
374
/* read - modify write - the trigger / channel enable value */
375
375
reg_value = direction == CTI_TRIG_IN ? config -> ctiinen [trigger_idx ] :
@@ -388,7 +388,7 @@ int cti_channel_trig_op(struct device *dev, enum cti_chan_op op,
388
388
/* write through if enabled */
389
389
if (cti_active (config ))
390
390
cti_write_single_reg (drvdata , reg_offset , reg_value );
391
- spin_unlock (& drvdata -> spinlock );
391
+ raw_spin_unlock (& drvdata -> spinlock );
392
392
return 0 ;
393
393
}
394
394
@@ -406,7 +406,7 @@ int cti_channel_gate_op(struct device *dev, enum cti_chan_gate_op op,
406
406
407
407
chan_bitmask = BIT (channel_idx );
408
408
409
- spin_lock (& drvdata -> spinlock );
409
+ raw_spin_lock (& drvdata -> spinlock );
410
410
reg_value = config -> ctigate ;
411
411
switch (op ) {
412
412
case CTI_GATE_CHAN_ENABLE :
@@ -426,7 +426,7 @@ int cti_channel_gate_op(struct device *dev, enum cti_chan_gate_op op,
426
426
if (cti_active (config ))
427
427
cti_write_single_reg (drvdata , CTIGATE , reg_value );
428
428
}
429
- spin_unlock (& drvdata -> spinlock );
429
+ raw_spin_unlock (& drvdata -> spinlock );
430
430
return err ;
431
431
}
432
432
@@ -445,7 +445,7 @@ int cti_channel_setop(struct device *dev, enum cti_chan_set_op op,
445
445
446
446
chan_bitmask = BIT (channel_idx );
447
447
448
- spin_lock (& drvdata -> spinlock );
448
+ raw_spin_lock (& drvdata -> spinlock );
449
449
reg_value = config -> ctiappset ;
450
450
switch (op ) {
451
451
case CTI_CHAN_SET :
@@ -473,7 +473,7 @@ int cti_channel_setop(struct device *dev, enum cti_chan_set_op op,
473
473
474
474
if ((err == 0 ) && cti_active (config ))
475
475
cti_write_single_reg (drvdata , reg_offset , reg_value );
476
- spin_unlock (& drvdata -> spinlock );
476
+ raw_spin_unlock (& drvdata -> spinlock );
477
477
478
478
return err ;
479
479
}
@@ -676,7 +676,7 @@ static int cti_cpu_pm_notify(struct notifier_block *nb, unsigned long cmd,
676
676
if (WARN_ON_ONCE (drvdata -> ctidev .cpu != cpu ))
677
677
return NOTIFY_BAD ;
678
678
679
- spin_lock (& drvdata -> spinlock );
679
+ raw_spin_lock (& drvdata -> spinlock );
680
680
681
681
switch (cmd ) {
682
682
case CPU_PM_ENTER :
@@ -716,7 +716,7 @@ static int cti_cpu_pm_notify(struct notifier_block *nb, unsigned long cmd,
716
716
}
717
717
718
718
cti_notify_exit :
719
- spin_unlock (& drvdata -> spinlock );
719
+ raw_spin_unlock (& drvdata -> spinlock );
720
720
return notify_res ;
721
721
}
722
722
@@ -743,11 +743,11 @@ static int cti_dying_cpu(unsigned int cpu)
743
743
if (!drvdata )
744
744
return 0 ;
745
745
746
- spin_lock (& drvdata -> spinlock );
746
+ raw_spin_lock (& drvdata -> spinlock );
747
747
drvdata -> config .hw_powered = false;
748
748
if (drvdata -> config .hw_enabled )
749
749
coresight_disclaim_device (drvdata -> csdev );
750
- spin_unlock (& drvdata -> spinlock );
750
+ raw_spin_unlock (& drvdata -> spinlock );
751
751
return 0 ;
752
752
}
753
753
@@ -888,7 +888,7 @@ static int cti_probe(struct amba_device *adev, const struct amba_id *id)
888
888
drvdata -> ctidev .ctm_id = 0 ;
889
889
INIT_LIST_HEAD (& drvdata -> ctidev .trig_cons );
890
890
891
- spin_lock_init (& drvdata -> spinlock );
891
+ raw_spin_lock_init (& drvdata -> spinlock );
892
892
893
893
/* initialise CTI driver config values */
894
894
cti_set_default_config (dev , drvdata );
0 commit comments