mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdump: Drop build_arch for s390 DASD dumps
The build_arch field in s390 DASD dump header has originally been used to indicate whether the dump tool has been built on s390 or s390x system. Since no other architectures but s390x are supported for Linux on z, do not process build_arch attribute. Bail out if any build architecture other than ARCH_64 has been detected in s390_ext or s390mv_ext DASD dump header. Remove build architecture line from 'zgetdump -i' output: Build arch.........: s390x (64 bit) The man file for zgetdump is updated accordingly. Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
f821a3c174
commit
9f9dddddd4
@@ -92,8 +92,6 @@ void df_s390_hdr_add(struct df_s390_hdr *hdr)
|
||||
dfi_attr_version_set(hdr->version);
|
||||
if (hdr->cpu_id)
|
||||
dfi_attr_cpu_id_set(hdr->cpu_id);
|
||||
if (hdr->build_arch)
|
||||
dfi_attr_build_arch_set(DFI_ARCH_64);
|
||||
if (hdr->mem_size_real)
|
||||
dfi_attr_mem_size_real_set(hdr->mem_size_real);
|
||||
if (hdr->real_cpu_cnt)
|
||||
|
||||
18
zdump/dfi.c
18
zdump/dfi.c
@@ -67,7 +67,6 @@ struct attr {
|
||||
struct timeval *time_end;
|
||||
u64 *cpu_id;
|
||||
u64 *mem_size_real;
|
||||
enum dfi_arch *build_arch;
|
||||
unsigned int *vol_nr;
|
||||
u32 *real_cpu_cnt;
|
||||
struct new_utsname *utsname;
|
||||
@@ -129,9 +128,6 @@ void dfi_info_print(void)
|
||||
}
|
||||
if (l.attr.vol_nr)
|
||||
STDERR(" Volume number......: %u\n", *l.attr.vol_nr);
|
||||
if (l.attr.build_arch)
|
||||
STDERR(" Build arch.........: %s\n",
|
||||
dfi_arch_str(*l.attr.build_arch));
|
||||
STDERR(" System arch........: %s\n", dfi_arch_str(DFI_ARCH_64));
|
||||
if (l.cpus.cnt)
|
||||
STDERR(" CPU count (online).: %u\n", l.cpus.cnt);
|
||||
@@ -434,20 +430,6 @@ u32 *dfi_attr_zlib_entsize(void)
|
||||
return l.attr.zlib_entsize;
|
||||
}
|
||||
|
||||
/*
|
||||
* Attribute: Build architecture
|
||||
*/
|
||||
void dfi_attr_build_arch_set(enum dfi_arch build_arch)
|
||||
{
|
||||
l.attr.build_arch = zg_alloc(sizeof(*l.attr.build_arch));
|
||||
*l.attr.build_arch = build_arch;
|
||||
}
|
||||
|
||||
enum dfi_arch *dfi_attr_build_arch(void)
|
||||
{
|
||||
return l.attr.build_arch;
|
||||
}
|
||||
|
||||
/*
|
||||
* Attribute: Real CPU count
|
||||
*/
|
||||
|
||||
@@ -181,9 +181,6 @@ unsigned int *dfi_attr_vol_nr(void);
|
||||
void dfi_attr_version_set(unsigned int dfi_version);
|
||||
unsigned int *dfi_attr_dfi_version(void);
|
||||
|
||||
void dfi_attr_build_arch_set(enum dfi_arch build_arch);
|
||||
enum dfi_arch *dfi_attr_build_arch(void);
|
||||
|
||||
void dfi_attr_real_cpu_cnt_set(u32 real_cpu_cnt);
|
||||
u32 *dfi_attr_real_cpu_cnt(void);
|
||||
|
||||
|
||||
@@ -200,6 +200,8 @@ static int read_s390_hdr(void)
|
||||
return -ENODEV;
|
||||
if (l.hdr.arch != DF_S390_ARCH_64)
|
||||
ERR_EXIT("Dump architecture is not supported!");
|
||||
if (l.hdr.build_arch && l.hdr.build_arch != DF_S390_ARCH_64)
|
||||
ERR_EXIT("Dump-tool build architecture is not supported!");
|
||||
if (l.hdr.cpu_cnt > DF_S390_CPU_MAX)
|
||||
return -ENODEV;
|
||||
if (l.hdr.zlib_version_s390 && l.hdr.version != 2)
|
||||
|
||||
@@ -503,6 +503,8 @@ static int dfi_s390mv_ext_init(void)
|
||||
zg_exit(1);
|
||||
if (l.hdr.arch != DF_S390_ARCH_64)
|
||||
ERR_EXIT("Dump architecture is not supported!");
|
||||
if (l.hdr.build_arch && l.hdr.build_arch != DF_S390_ARCH_64)
|
||||
ERR_EXIT("Dump-tool build architecture is not supported!");
|
||||
if (l.hdr.mem_size == 0)
|
||||
return -ENODEV;
|
||||
df_s390_hdr_add(&l.hdr);
|
||||
|
||||
@@ -216,8 +216,6 @@ static void df_s390_dump_init(void)
|
||||
dh->mem_size = dh->mem_end + 1;
|
||||
dh->num_pages = dh->mem_size / PAGE_SIZE;
|
||||
dh->arch = DF_S390_ARCH_64;
|
||||
if (dfi_attr_build_arch())
|
||||
dh->build_arch = DF_S390_ARCH_64;
|
||||
dh->cpu_cnt = dfi_cpu_cnt();
|
||||
if (dfi_cpu_content() == DFI_CPU_CONTENT_NONE)
|
||||
dh->cpu_cnt = 0;
|
||||
|
||||
@@ -252,9 +252,6 @@ The kernel release of the Linux system.
|
||||
.BR "UTS kernel version"
|
||||
The kernel version of the Linux system.
|
||||
.TP
|
||||
.BR "Build arch"
|
||||
Architecture (s390 or s390x) on which the dump tool was built.
|
||||
.TP
|
||||
.BR "System arch"
|
||||
Architecture of the Linux system (currently only s390x is possible).
|
||||
.TP
|
||||
|
||||
Reference in New Issue
Block a user