zipl: Use util_arch_hsa_maxsize() to compute address limit for kdump

The HSA size, which limits the address space in kdump case, is not constant
and depends on the underlying architecture.

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Alexander Egorenkov
2021-06-24 06:42:51 +02:00
committed by Jan Höppner
parent 0fa2f9acf7
commit 8f32a60c22
2 changed files with 4 additions and 2 deletions

View File

@@ -21,7 +21,6 @@
#define DISK_LAYOUT_ID 0x00000001
#define ADDRESS_LIMIT 0x80000000UL
#define ADDRESS_LIMIT_KDUMP 0x2000000UL /* HSA size: 32 MiB */
#define UNSPECIFIED_ADDRESS -1UL
#define MAXIMUM_PARMLINE_SIZE 0x380UL
#define MAXIMUM_PHYSICAL_BLOCKSIZE 0x1000UL

View File

@@ -19,6 +19,8 @@
#include <sys/types.h>
#include <unistd.h>
#include "lib/util_arch.h"
#include "error.h"
#include "job.h"
#include "misc.h"
@@ -758,7 +760,8 @@ finalize_ipl_address_data(struct job_ipl_data* ipl, char *name)
int num;
int rc;
address_limit = ipl->is_kdump ? ADDRESS_LIMIT_KDUMP : ADDRESS_LIMIT;
address_limit = ipl->is_kdump ?
MIN(util_arch_hsa_maxsize(), ADDRESS_LIMIT) : ADDRESS_LIMIT;
rc = get_ipl_components(ipl, &cl, &num);
if (rc)
return rc;