Skip to content

Commit 2e416d1

Browse files
committed
Rebuild rocky8_10 with kernel-4.18.0-553.58.1.el8_10
Rebuild_History BUILDABLE Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50% Number of commits in upstream range v4.18~1..kernel-mainline: 553283 Number of commits in rpm: 59 Number of commits matched with upstream: 52 (88.14%) Number of commits in upstream but not in rpm: 553231 Number of commits NOT found in upstream: 7 (11.86%) Rebuilding Kernel on Branch rocky8_10_rebuild_kernel-4.18.0-553.58.1.el8_10 for kernel-4.18.0-553.58.1.el8_10 Clean Cherry Picks: 32 (61.54%) Empty Cherry Picks: 20 (38.46%) _______________________________ Full Details Located here: ciq/ciq_backports/kernel-4.18.0-553.58.1.el8_10/rebuild.details.txt Includes: * git commit header above * Empty Commits with upstream SHA * RPM ChangeLog Entries that could not be matched Individual Empty Commit failures contained in the same containing directory. The git message for empty commits will have the path for the failed commit. File names are the first 8 characters of the upstream SHA
1 parent 77874c7 commit 2e416d1

25 files changed

+1376
-1005
lines changed

Makefile.rhelver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RHEL_MINOR = 10
1212
#
1313
# Use this spot to avoid future merge conflicts.
1414
# Do not trim this comment.
15-
RHEL_RELEASE = 553.56.1
15+
RHEL_RELEASE = 553.58.1
1616

1717
#
1818
# ZSTREAM

arch/s390/include/asm/pci.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ struct zpci_dev {
123123
struct kref kref;
124124
struct hotplug_slot hotplug_slot;
125125

126+
struct mutex state_lock; /* protect state changes */
126127
enum zpci_state state;
127128
u32 fid; /* function ID, used by sclp */
128129
u32 fh; /* function handle, used by insn's */
@@ -146,7 +147,6 @@ struct zpci_dev {
146147
u8 reserved : 1;
147148
unsigned int devfn; /* DEVFN part of the RID*/
148149

149-
struct mutex lock;
150150
u8 pfip[CLP_PFIP_NR_SEGMENTS]; /* pci function internal path */
151151
u32 uid; /* user defined id */
152152
u8 util_str[CLP_UTIL_STR_LEN]; /* utility string */
@@ -182,6 +182,7 @@ struct zpci_dev {
182182
u64 dma_mask; /* DMA address space mask */
183183

184184
/* Function measurement block */
185+
struct mutex fmb_lock;
185186
struct zpci_fmb *fmb;
186187
u16 fmb_update; /* update interval */
187188
u16 fmb_length;

arch/s390/pci/pci.c

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
/* list of all detected zpci devices */
4343
static LIST_HEAD(zpci_list);
4444
static DEFINE_SPINLOCK(zpci_list_lock);
45+
static DEFINE_MUTEX(zpci_add_remove_lock);
4546

4647
static DECLARE_BITMAP(zpci_domain, ZPCI_DOMAIN_BITMAP_SIZE);
4748
static DEFINE_SPINLOCK(zpci_domain_lock);
@@ -67,6 +68,15 @@ EXPORT_SYMBOL_GPL(zpci_aipb);
6768
struct airq_iv *zpci_aif_sbv;
6869
EXPORT_SYMBOL_GPL(zpci_aif_sbv);
6970

71+
void zpci_zdev_put(struct zpci_dev *zdev)
72+
{
73+
if (!zdev)
74+
return;
75+
mutex_lock(&zpci_add_remove_lock);
76+
kref_put_lock(&zdev->kref, zpci_release_device, &zpci_list_lock);
77+
mutex_unlock(&zpci_add_remove_lock);
78+
}
79+
7080
struct zpci_dev *get_zdev_by_fid(u32 fid)
7181
{
7282
struct zpci_dev *tmp, *zdev = NULL;
@@ -808,12 +818,12 @@ EXPORT_SYMBOL_GPL(zpci_disable_device);
808818
* equivalent to its state during boot when first probing a driver.
809819
* Consequently after reset the PCI function requires re-initialization via the
810820
* common PCI code including re-enabling IRQs via pci_alloc_irq_vectors()
811-
* and enabling the function via e.g.pci_enablde_device_flags().The caller
821+
* and enabling the function via e.g. pci_enable_device_flags(). The caller
812822
* must guard against concurrent reset attempts.
813823
*
814824
* In most cases this function should not be called directly but through
815825
* pci_reset_function() or pci_reset_bus() which handle the save/restore and
816-
* locking.
826+
* locking - asserted by lockdep.
817827
*
818828
* Return: 0 on success and an error value otherwise
819829
*/
@@ -822,6 +832,7 @@ int zpci_hot_reset_device(struct zpci_dev *zdev)
822832
u8 status;
823833
int rc;
824834

835+
lockdep_assert_held(&zdev->state_lock);
825836
zpci_dbg(3, "rst fid:%x, fh:%x\n", zdev->fid, zdev->fh);
826837
if (zdev_enabled(zdev)) {
827838
/* Disables device access, DMAs and IRQs (reset state) */
@@ -885,7 +896,8 @@ struct zpci_dev *zpci_create_device(u32 fid, u32 fh, enum zpci_state state)
885896
goto error;
886897
zdev->state = state;
887898

888-
mutex_init(&zdev->lock);
899+
mutex_init(&zdev->state_lock);
900+
mutex_init(&zdev->fmb_lock);
889901
mutex_init(&zdev->kzdev_lock);
890902

891903
return zdev;
@@ -911,6 +923,7 @@ int zpci_add_device(struct zpci_dev *zdev)
911923
{
912924
int rc;
913925

926+
mutex_lock(&zpci_add_remove_lock);
914927
zpci_dbg(1, "add fid:%x, fh:%x, c:%d\n", zdev->fid, zdev->fh, zdev->state);
915928
rc = zpci_init_iommu(zdev);
916929
if (rc)
@@ -924,12 +937,14 @@ int zpci_add_device(struct zpci_dev *zdev)
924937
spin_lock(&zpci_list_lock);
925938
list_add_tail(&zdev->entry, &zpci_list);
926939
spin_unlock(&zpci_list_lock);
940+
mutex_unlock(&zpci_add_remove_lock);
927941
return 0;
928942

929943
error_destroy_iommu:
930944
zpci_destroy_iommu(zdev);
931945
error:
932946
zpci_dbg(0, "add fid:%x, rc:%d\n", zdev->fid, rc);
947+
mutex_unlock(&zpci_add_remove_lock);
933948
return rc;
934949
}
935950

@@ -946,23 +961,20 @@ bool zpci_is_device_configured(struct zpci_dev *zdev)
946961
* @zdev: the zpci_dev that was reserved
947962
*
948963
* Handle the case that a given zPCI function was reserved by another system.
949-
* After a call to this function the zpci_dev can not be found via
950-
* get_zdev_by_fid() anymore but may still be accessible via existing
951-
* references though it will not be functional anymore.
952964
*/
953965
void zpci_device_reserved(struct zpci_dev *zdev)
954966
{
955-
if (zdev->has_hp_slot)
956-
zpci_exit_slot(zdev);
957-
/*
958-
* Remove device from zpci_list as it is going away. This also
959-
* makes sure we ignore subsequent zPCI events for this device.
960-
*/
961-
spin_lock(&zpci_list_lock);
962-
list_del(&zdev->entry);
963-
spin_unlock(&zpci_list_lock);
967+
lockdep_assert_held(&zdev->state_lock);
968+
/* We may declare the device reserved multiple times */
969+
if (zdev->state == ZPCI_FN_STATE_RESERVED)
970+
return;
964971
zdev->state = ZPCI_FN_STATE_RESERVED;
965972
zpci_dbg(3, "rsv fid:%x\n", zdev->fid);
973+
/*
974+
* The underlying device is gone. Allow the zdev to be freed
975+
* as soon as all other references are gone by accounting for
976+
* the removal as a dropped reference.
977+
*/
966978
zpci_zdev_put(zdev);
967979
}
968980

@@ -997,6 +1009,10 @@ int zpci_deconfigure_device(struct zpci_dev *zdev)
9971009
{
9981010
int rc;
9991011

1012+
lockdep_assert_held(&zdev->state_lock);
1013+
if (zdev->state != ZPCI_FN_STATE_CONFIGURED)
1014+
return 0;
1015+
10001016
if (zdev->zbus->bus)
10011017
zpci_bus_remove_device(zdev, false);
10021018

@@ -1023,39 +1039,24 @@ int zpci_deconfigure_device(struct zpci_dev *zdev)
10231039
void zpci_release_device(struct kref *kref)
10241040
{
10251041
struct zpci_dev *zdev = container_of(kref, struct zpci_dev, kref);
1026-
int ret;
10271042

1028-
if (zdev->zbus->bus)
1029-
zpci_bus_remove_device(zdev, false);
1043+
lockdep_assert_held(&zpci_add_remove_lock);
1044+
WARN_ON(zdev->state != ZPCI_FN_STATE_RESERVED);
1045+
/*
1046+
* We already hold zpci_list_lock thanks to kref_put_lock().
1047+
* This makes sure no new reference can be taken from the list.
1048+
*/
1049+
list_del(&zdev->entry);
1050+
spin_unlock(&zpci_list_lock);
10301051

1031-
if (zdev->dma_table)
1032-
zpci_dma_exit_device(zdev);
1033-
if (zdev_enabled(zdev))
1034-
zpci_disable_device(zdev);
1052+
if (zdev->has_hp_slot)
1053+
zpci_exit_slot(zdev);
10351054

1036-
switch (zdev->state) {
1037-
case ZPCI_FN_STATE_CONFIGURED:
1038-
ret = sclp_pci_deconfigure(zdev->fid);
1039-
zpci_dbg(3, "deconf fid:%x, rc:%d\n", zdev->fid, ret);
1040-
fallthrough;
1041-
case ZPCI_FN_STATE_STANDBY:
1042-
if (zdev->has_hp_slot)
1043-
zpci_exit_slot(zdev);
1044-
spin_lock(&zpci_list_lock);
1045-
list_del(&zdev->entry);
1046-
spin_unlock(&zpci_list_lock);
1047-
zpci_dbg(3, "rsv fid:%x\n", zdev->fid);
1048-
fallthrough;
1049-
case ZPCI_FN_STATE_RESERVED:
1050-
if (zdev->has_resources)
1051-
zpci_cleanup_bus_resources(zdev);
1052-
zpci_bus_device_unregister(zdev);
1053-
zpci_destroy_iommu(zdev);
1054-
/* fallthrough */
1055-
default:
1056-
break;
1057-
}
1055+
if (zdev->has_resources)
1056+
zpci_cleanup_bus_resources(zdev);
10581057

1058+
zpci_bus_device_unregister(zdev);
1059+
zpci_destroy_iommu(zdev);
10591060
zpci_dbg(3, "rem fid:%x\n", zdev->fid);
10601061
kfree(zdev);
10611062
}

arch/s390/pci/pci_bus.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@ int zpci_bus_scan_device(struct zpci_dev *zdev);
1717
void zpci_bus_remove_device(struct zpci_dev *zdev, bool set_error);
1818

1919
void zpci_release_device(struct kref *kref);
20-
static inline void zpci_zdev_put(struct zpci_dev *zdev)
21-
{
22-
if (zdev)
23-
kref_put(&zdev->kref, zpci_release_device);
24-
}
20+
21+
void zpci_zdev_put(struct zpci_dev *zdev);
2522

2623
static inline void zpci_zdev_get(struct zpci_dev *zdev)
2724
{

arch/s390/pci/pci_debug.c

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

88-
mutex_lock(&zdev->lock);
88+
mutex_lock(&zdev->fmb_lock);
8989
if (!zdev->fmb) {
90-
mutex_unlock(&zdev->lock);
90+
mutex_unlock(&zdev->fmb_lock);
9191
seq_puts(m, "FMB statistics disabled\n");
9292
return 0;
9393
}
@@ -124,7 +124,7 @@ static int pci_perf_show(struct seq_file *m, void *v)
124124
}
125125

126126
pci_sw_counter_show(m);
127-
mutex_unlock(&zdev->lock);
127+
mutex_unlock(&zdev->fmb_lock);
128128
return 0;
129129
}
130130

@@ -142,7 +142,7 @@ static ssize_t pci_perf_seq_write(struct file *file, const char __user *ubuf,
142142
if (rc)
143143
return rc;
144144

145-
mutex_lock(&zdev->lock);
145+
mutex_lock(&zdev->fmb_lock);
146146
switch (val) {
147147
case 0:
148148
rc = zpci_fmb_disable_device(zdev);
@@ -151,7 +151,7 @@ static ssize_t pci_perf_seq_write(struct file *file, const char __user *ubuf,
151151
rc = zpci_fmb_enable_device(zdev);
152152
break;
153153
}
154-
mutex_unlock(&zdev->lock);
154+
mutex_unlock(&zdev->fmb_lock);
155155
return rc ? rc : count;
156156
}
157157

arch/s390/pci/pci_event.c

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ static void __zpci_event_error(struct zpci_ccdf_err *ccdf)
260260
zpci_err_hex(ccdf, sizeof(*ccdf));
261261

262262
if (zdev) {
263+
mutex_lock(&zdev->state_lock);
263264
zpci_update_fh(zdev, ccdf->fh);
264265
if (zdev->zbus->bus)
265266
pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn);
@@ -288,6 +289,8 @@ static void __zpci_event_error(struct zpci_ccdf_err *ccdf)
288289
}
289290
pci_dev_put(pdev);
290291
no_pdev:
292+
if (zdev)
293+
mutex_unlock(&zdev->state_lock);
291294
zpci_zdev_put(zdev);
292295
}
293296

@@ -314,6 +317,22 @@ static void zpci_event_hard_deconfigured(struct zpci_dev *zdev, u32 fh)
314317
zdev->state = ZPCI_FN_STATE_STANDBY;
315318
}
316319

320+
static void zpci_event_reappear(struct zpci_dev *zdev)
321+
{
322+
lockdep_assert_held(&zdev->state_lock);
323+
/*
324+
* The zdev is in the reserved state. This means that it was presumed to
325+
* go away but there are still undropped references. Now, the platform
326+
* announced its availability again. Bring back the lingering zdev
327+
* to standby. This is safe because we hold a temporary reference
328+
* now so that it won't go away. Account for the re-appearance of the
329+
* underlying device by incrementing the reference count.
330+
*/
331+
zdev->state = ZPCI_FN_STATE_STANDBY;
332+
zpci_zdev_get(zdev);
333+
zpci_dbg(1, "rea fid:%x, fh:%x\n", zdev->fid, zdev->fh);
334+
}
335+
317336
static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
318337
{
319338
struct zpci_dev *zdev = get_zdev_by_fid(ccdf->fid);
@@ -322,6 +341,10 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
322341

323342
zpci_dbg(3, "avl fid:%x, fh:%x, pec:%x\n",
324343
ccdf->fid, ccdf->fh, ccdf->pec);
344+
345+
if (existing_zdev)
346+
mutex_lock(&zdev->state_lock);
347+
325348
switch (ccdf->pec) {
326349
case 0x0301: /* Reserved|Standby -> Configured */
327350
if (!zdev) {
@@ -333,8 +356,10 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
333356
break;
334357
}
335358
} else {
359+
if (zdev->state == ZPCI_FN_STATE_RESERVED)
360+
zpci_event_reappear(zdev);
336361
/* the configuration request may be stale */
337-
if (zdev->state != ZPCI_FN_STATE_STANDBY)
362+
else if (zdev->state != ZPCI_FN_STATE_STANDBY)
338363
break;
339364
zdev->state = ZPCI_FN_STATE_CONFIGURED;
340365
}
@@ -350,6 +375,8 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
350375
break;
351376
}
352377
} else {
378+
if (zdev->state == ZPCI_FN_STATE_RESERVED)
379+
zpci_event_reappear(zdev);
353380
zpci_update_fh(zdev, ccdf->fh);
354381
}
355382
break;
@@ -390,8 +417,10 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
390417
default:
391418
break;
392419
}
393-
if (existing_zdev)
420+
if (existing_zdev) {
421+
mutex_unlock(&zdev->state_lock);
394422
zpci_zdev_put(zdev);
423+
}
395424
}
396425

397426
void zpci_event_availability(void *data)

0 commit comments

Comments
 (0)