Skip to content

Commit 0d48566

Browse files
Gerd Bayerhcahca
authored andcommitted
s390/pci: rename lock member in struct zpci_dev
Since this guards only the Function Measurement Block, rename from generic lock to fmb_lock in preparation to introduce another lock that guards the state member Signed-off-by: Gerd Bayer <[email protected]> Reviewed-by: Niklas Schnelle <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent 29f6fe1 commit 0d48566

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

arch/s390/include/asm/pci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ struct zpci_dev {
142142
u8 reserved : 2;
143143
unsigned int devfn; /* DEVFN part of the RID*/
144144

145-
struct mutex lock;
146145
u8 pfip[CLP_PFIP_NR_SEGMENTS]; /* pci function internal path */
147146
u32 uid; /* user defined id */
148147
u8 util_str[CLP_UTIL_STR_LEN]; /* utility string */
@@ -170,6 +169,7 @@ struct zpci_dev {
170169
u64 dma_mask; /* DMA address space mask */
171170

172171
/* Function measurement block */
172+
struct mutex fmb_lock;
173173
struct zpci_fmb *fmb;
174174
u16 fmb_update; /* update interval */
175175
u16 fmb_length;

arch/s390/pci/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ struct zpci_dev *zpci_create_device(u32 fid, u32 fh, enum zpci_state state)
806806
zdev->state = state;
807807

808808
kref_init(&zdev->kref);
809-
mutex_init(&zdev->lock);
809+
mutex_init(&zdev->fmb_lock);
810810
mutex_init(&zdev->kzdev_lock);
811811

812812
rc = zpci_init_iommu(zdev);

arch/s390/pci/pci_debug.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ static int pci_perf_show(struct seq_file *m, void *v)
9191
if (!zdev)
9292
return 0;
9393

94-
mutex_lock(&zdev->lock);
94+
mutex_lock(&zdev->fmb_lock);
9595
if (!zdev->fmb) {
96-
mutex_unlock(&zdev->lock);
96+
mutex_unlock(&zdev->fmb_lock);
9797
seq_puts(m, "FMB statistics disabled\n");
9898
return 0;
9999
}
@@ -130,7 +130,7 @@ static int pci_perf_show(struct seq_file *m, void *v)
130130
}
131131

132132
pci_sw_counter_show(m);
133-
mutex_unlock(&zdev->lock);
133+
mutex_unlock(&zdev->fmb_lock);
134134
return 0;
135135
}
136136

@@ -148,7 +148,7 @@ static ssize_t pci_perf_seq_write(struct file *file, const char __user *ubuf,
148148
if (rc)
149149
return rc;
150150

151-
mutex_lock(&zdev->lock);
151+
mutex_lock(&zdev->fmb_lock);
152152
switch (val) {
153153
case 0:
154154
rc = zpci_fmb_disable_device(zdev);
@@ -157,7 +157,7 @@ static ssize_t pci_perf_seq_write(struct file *file, const char __user *ubuf,
157157
rc = zpci_fmb_enable_device(zdev);
158158
break;
159159
}
160-
mutex_unlock(&zdev->lock);
160+
mutex_unlock(&zdev->fmb_lock);
161161
return rc ? rc : count;
162162
}
163163

0 commit comments

Comments
 (0)