Skip to content

Commit 0a802dd

Browse files
committed
s390/ipl: Introduce sysfs attribute 'scp_data' for dump ipl
JIRA: https://issues.redhat.com/browse/RHEL-86670 commit 24bf80f Author: Alexander Egorenkov <[email protected]> Date: Fri May 10 12:41:28 2024 +0200 s390/ipl: Introduce sysfs attribute 'scp_data' for dump ipl This is analogous to the reipl's sysfs attribute named equally and enables tools such as s390-tools' dumpconf to pass additional kernel cmdline parameters to a stand-alone dumper such as zfcpdump (e.g. to enable debug output with 'dump_debug' parameter) or ngdump. Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Egorenkov <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent 740834b commit 0a802dd

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

arch/s390/kernel/ipl.c

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,11 @@ DEFINE_IPL_ATTR_RW(dump_fcp, br_lba, "%lld\n", "%lld\n",
15721572
DEFINE_IPL_ATTR_RW(dump_fcp, device, "0.0.%04llx\n", "0.0.%llx\n",
15731573
dump_block_fcp->fcp.devno);
15741574

1575+
DEFINE_IPL_ATTR_SCP_DATA_RW(dump_fcp, dump_block_fcp->hdr,
1576+
dump_block_fcp->fcp,
1577+
IPL_BP_FCP_LEN, IPL_BP0_FCP_LEN,
1578+
DIAG308_SCPDATA_SIZE);
1579+
15751580
static struct attribute *dump_fcp_attrs[] = {
15761581
&sys_dump_fcp_device_attr.attr,
15771582
&sys_dump_fcp_wwpn_attr.attr,
@@ -1581,9 +1586,15 @@ static struct attribute *dump_fcp_attrs[] = {
15811586
NULL,
15821587
};
15831588

1589+
static struct bin_attribute *dump_fcp_bin_attrs[] = {
1590+
&sys_dump_fcp_scp_data_attr,
1591+
NULL,
1592+
};
1593+
15841594
static struct attribute_group dump_fcp_attr_group = {
15851595
.name = IPL_FCP_STR,
15861596
.attrs = dump_fcp_attrs,
1597+
.bin_attrs = dump_fcp_bin_attrs,
15871598
};
15881599

15891600
/* NVME dump device attributes */
@@ -1596,6 +1607,11 @@ DEFINE_IPL_ATTR_RW(dump_nvme, bootprog, "%lld\n", "%llx\n",
15961607
DEFINE_IPL_ATTR_RW(dump_nvme, br_lba, "%lld\n", "%llx\n",
15971608
dump_block_nvme->nvme.br_lba);
15981609

1610+
DEFINE_IPL_ATTR_SCP_DATA_RW(dump_nvme, dump_block_nvme->hdr,
1611+
dump_block_nvme->nvme,
1612+
IPL_BP_NVME_LEN, IPL_BP0_NVME_LEN,
1613+
DIAG308_SCPDATA_SIZE);
1614+
15991615
static struct attribute *dump_nvme_attrs[] = {
16001616
&sys_dump_nvme_fid_attr.attr,
16011617
&sys_dump_nvme_nsid_attr.attr,
@@ -1604,9 +1620,15 @@ static struct attribute *dump_nvme_attrs[] = {
16041620
NULL,
16051621
};
16061622

1623+
static struct bin_attribute *dump_nvme_bin_attrs[] = {
1624+
&sys_dump_nvme_scp_data_attr,
1625+
NULL,
1626+
};
1627+
16071628
static struct attribute_group dump_nvme_attr_group = {
16081629
.name = IPL_NVME_STR,
16091630
.attrs = dump_nvme_attrs,
1631+
.bin_attrs = dump_nvme_bin_attrs,
16101632
};
16111633

16121634
/* ECKD dump device attributes */
@@ -1622,16 +1644,27 @@ static struct kobj_attribute sys_dump_eckd_br_chr_attr =
16221644
eckd_dump_br_chr_show,
16231645
eckd_dump_br_chr_store);
16241646

1647+
DEFINE_IPL_ATTR_SCP_DATA_RW(dump_eckd, dump_block_eckd->hdr,
1648+
dump_block_eckd->eckd,
1649+
IPL_BP_ECKD_LEN, IPL_BP0_ECKD_LEN,
1650+
DIAG308_SCPDATA_SIZE);
1651+
16251652
static struct attribute *dump_eckd_attrs[] = {
16261653
&sys_dump_eckd_device_attr.attr,
16271654
&sys_dump_eckd_bootprog_attr.attr,
16281655
&sys_dump_eckd_br_chr_attr.attr,
16291656
NULL,
16301657
};
16311658

1659+
static struct bin_attribute *dump_eckd_bin_attrs[] = {
1660+
&sys_dump_eckd_scp_data_attr,
1661+
NULL,
1662+
};
1663+
16321664
static struct attribute_group dump_eckd_attr_group = {
16331665
.name = IPL_ECKD_STR,
16341666
.attrs = dump_eckd_attrs,
1667+
.bin_attrs = dump_eckd_bin_attrs,
16351668
};
16361669

16371670
/* CCW dump device attributes */

0 commit comments

Comments
 (0)