Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390: move ipl block and cmd line handling to early boot phase

To distinguish zfcpdump case and to be able to parse some of the kernel
command line arguments early (e.g. mem=) ipl block retrieval and command
line construction code is moved to the early boot phase.

"memory_end" is set up correctly respecting "mem=" and hsa_size in case
of the zfcpdump.

arch/s390/boot/string.c is introduced to provide string handling and
command line parsing functions to early boot phase code for the compressed
kernel image case.

Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Vasily Gorbik and committed by
Martin Schwidefsky
49698745 b09decfd

+355 -176
+2 -1
arch/s390/boot/Makefile
··· 27 27 28 28 CFLAGS_sclp_early_core.o += -I$(srctree)/drivers/s390/char 29 29 30 - obj-y := head.o als.o startup.o mem_detect.o ebcdic.o sclp_early_core.o mem.o 30 + obj-y := head.o als.o startup.o mem_detect.o ipl_parm.o string.o ebcdic.o 31 + obj-y += sclp_early_core.o mem.o ipl_vmparm.o cmdline.o ctype.o 31 32 targets := bzImage startup.a section_cmp.boot.data $(obj-y) 32 33 subdir- := compressed 33 34
+3
arch/s390/boot/boot.h
··· 4 4 5 5 void startup_kernel(void); 6 6 void detect_memory(void); 7 + void store_ipl_parmblock(void); 8 + void setup_boot_command_line(void); 9 + void setup_memory_end(void); 7 10 8 11 #endif /* BOOT_BOOT_H */
+2
arch/s390/boot/cmdline.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + #include "../../../lib/cmdline.c"
+2
arch/s390/boot/ctype.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + #include "../../../lib/ctype.c"
+173
arch/s390/boot/ipl_parm.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + #include <linux/init.h> 3 + #include <linux/ctype.h> 4 + #include <asm/ebcdic.h> 5 + #include <asm/sclp.h> 6 + #include <asm/sections.h> 7 + #include <asm/boot_data.h> 8 + #include "boot.h" 9 + 10 + char __bootdata(early_command_line)[COMMAND_LINE_SIZE]; 11 + struct ipl_parameter_block __bootdata(early_ipl_block); 12 + int __bootdata(early_ipl_block_valid); 13 + 14 + unsigned long __bootdata(memory_end); 15 + int __bootdata(memory_end_set); 16 + 17 + static inline int __diag308(unsigned long subcode, void *addr) 18 + { 19 + register unsigned long _addr asm("0") = (unsigned long)addr; 20 + register unsigned long _rc asm("1") = 0; 21 + unsigned long reg1, reg2; 22 + psw_t old = S390_lowcore.program_new_psw; 23 + 24 + asm volatile( 25 + " epsw %0,%1\n" 26 + " st %0,%[psw_pgm]\n" 27 + " st %1,%[psw_pgm]+4\n" 28 + " larl %0,1f\n" 29 + " stg %0,%[psw_pgm]+8\n" 30 + " diag %[addr],%[subcode],0x308\n" 31 + "1: nopr %%r7\n" 32 + : "=&d" (reg1), "=&a" (reg2), 33 + [psw_pgm] "=Q" (S390_lowcore.program_new_psw), 34 + [addr] "+d" (_addr), "+d" (_rc) 35 + : [subcode] "d" (subcode) 36 + : "cc", "memory"); 37 + S390_lowcore.program_new_psw = old; 38 + return _rc; 39 + } 40 + 41 + void store_ipl_parmblock(void) 42 + { 43 + int rc; 44 + 45 + rc = __diag308(DIAG308_STORE, &early_ipl_block); 46 + if (rc == DIAG308_RC_OK && 47 + early_ipl_block.hdr.version <= IPL_MAX_SUPPORTED_VERSION) 48 + early_ipl_block_valid = 1; 49 + } 50 + 51 + static size_t scpdata_length(const char *buf, size_t count) 52 + { 53 + while (count) { 54 + if (buf[count - 1] != '\0' && buf[count - 1] != ' ') 55 + break; 56 + count--; 57 + } 58 + return count; 59 + } 60 + 61 + static size_t ipl_block_get_ascii_scpdata(char *dest, size_t size, 62 + const struct ipl_parameter_block *ipb) 63 + { 64 + size_t count; 65 + size_t i; 66 + int has_lowercase; 67 + 68 + count = min(size - 1, scpdata_length(ipb->ipl_info.fcp.scp_data, 69 + ipb->ipl_info.fcp.scp_data_len)); 70 + if (!count) 71 + goto out; 72 + 73 + has_lowercase = 0; 74 + for (i = 0; i < count; i++) { 75 + if (!isascii(ipb->ipl_info.fcp.scp_data[i])) { 76 + count = 0; 77 + goto out; 78 + } 79 + if (!has_lowercase && islower(ipb->ipl_info.fcp.scp_data[i])) 80 + has_lowercase = 1; 81 + } 82 + 83 + if (has_lowercase) 84 + memcpy(dest, ipb->ipl_info.fcp.scp_data, count); 85 + else 86 + for (i = 0; i < count; i++) 87 + dest[i] = tolower(ipb->ipl_info.fcp.scp_data[i]); 88 + out: 89 + dest[count] = '\0'; 90 + return count; 91 + } 92 + 93 + static void append_ipl_block_parm(void) 94 + { 95 + char *parm, *delim; 96 + size_t len, rc = 0; 97 + 98 + len = strlen(early_command_line); 99 + 100 + delim = early_command_line + len; /* '\0' character position */ 101 + parm = early_command_line + len + 1; /* append right after '\0' */ 102 + 103 + switch (early_ipl_block.hdr.pbt) { 104 + case DIAG308_IPL_TYPE_CCW: 105 + rc = ipl_block_get_ascii_vmparm( 106 + parm, COMMAND_LINE_SIZE - len - 1, &early_ipl_block); 107 + break; 108 + case DIAG308_IPL_TYPE_FCP: 109 + rc = ipl_block_get_ascii_scpdata( 110 + parm, COMMAND_LINE_SIZE - len - 1, &early_ipl_block); 111 + break; 112 + } 113 + if (rc) { 114 + if (*parm == '=') 115 + memmove(early_command_line, parm + 1, rc); 116 + else 117 + *delim = ' '; /* replace '\0' with space */ 118 + } 119 + } 120 + 121 + static inline int has_ebcdic_char(const char *str) 122 + { 123 + int i; 124 + 125 + for (i = 0; str[i]; i++) 126 + if (str[i] & 0x80) 127 + return 1; 128 + return 0; 129 + } 130 + 131 + void setup_boot_command_line(void) 132 + { 133 + COMMAND_LINE[ARCH_COMMAND_LINE_SIZE - 1] = 0; 134 + /* convert arch command line to ascii if necessary */ 135 + if (has_ebcdic_char(COMMAND_LINE)) 136 + EBCASC(COMMAND_LINE, ARCH_COMMAND_LINE_SIZE); 137 + /* copy arch command line */ 138 + strcpy(early_command_line, strim(COMMAND_LINE)); 139 + 140 + /* append IPL PARM data to the boot command line */ 141 + if (early_ipl_block_valid) 142 + append_ipl_block_parm(); 143 + } 144 + 145 + static char command_line_buf[COMMAND_LINE_SIZE] __section(.data); 146 + static void parse_mem_opt(void) 147 + { 148 + char *args; 149 + char *param, *val; 150 + 151 + args = strcpy(command_line_buf, early_command_line); 152 + while (*args) { 153 + args = next_arg(args, &param, &val); 154 + 155 + if (!strcmp(param, "mem")) { 156 + memory_end = memparse(val, NULL); 157 + memory_end_set = 1; 158 + } 159 + } 160 + } 161 + 162 + void setup_memory_end(void) 163 + { 164 + parse_mem_opt(); 165 + #ifdef CONFIG_CRASH_DUMP 166 + if (!OLDMEM_BASE && early_ipl_block_valid && 167 + early_ipl_block.hdr.pbt == DIAG308_IPL_TYPE_FCP && 168 + early_ipl_block.ipl_info.fcp.opt == DIAG308_IPL_OPT_DUMP) { 169 + if (!sclp_early_get_hsa_size(&memory_end) && memory_end) 170 + memory_end_set = 1; 171 + } 172 + #endif 173 + }
+2
arch/s390/boot/ipl_vmparm.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + #include "../kernel/ipl_vmparm.c"
+3
arch/s390/boot/startup.c
··· 51 51 52 52 rescue_initrd(); 53 53 sclp_early_read_info(); 54 + store_ipl_parmblock(); 55 + setup_boot_command_line(); 56 + setup_memory_end(); 54 57 detect_memory(); 55 58 if (!IS_ENABLED(CONFIG_KERNEL_UNCOMPRESSED)) { 56 59 img = decompress_kernel();
+100
arch/s390/boot/string.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + #include <linux/ctype.h> 3 + #include <linux/kernel.h> 4 + #include "../lib/string.c" 5 + 6 + int strncmp(const char *cs, const char *ct, size_t count) 7 + { 8 + unsigned char c1, c2; 9 + 10 + while (count) { 11 + c1 = *cs++; 12 + c2 = *ct++; 13 + if (c1 != c2) 14 + return c1 < c2 ? -1 : 1; 15 + if (!c1) 16 + break; 17 + count--; 18 + } 19 + return 0; 20 + } 21 + 22 + char *skip_spaces(const char *str) 23 + { 24 + while (isspace(*str)) 25 + ++str; 26 + return (char *)str; 27 + } 28 + 29 + char *strim(char *s) 30 + { 31 + size_t size; 32 + char *end; 33 + 34 + size = strlen(s); 35 + if (!size) 36 + return s; 37 + 38 + end = s + size - 1; 39 + while (end >= s && isspace(*end)) 40 + end--; 41 + *(end + 1) = '\0'; 42 + 43 + return skip_spaces(s); 44 + } 45 + 46 + /* Works only for digits and letters, but small and fast */ 47 + #define TOLOWER(x) ((x) | 0x20) 48 + 49 + static unsigned int simple_guess_base(const char *cp) 50 + { 51 + if (cp[0] == '0') { 52 + if (TOLOWER(cp[1]) == 'x' && isxdigit(cp[2])) 53 + return 16; 54 + else 55 + return 8; 56 + } else { 57 + return 10; 58 + } 59 + } 60 + 61 + /** 62 + * simple_strtoull - convert a string to an unsigned long long 63 + * @cp: The start of the string 64 + * @endp: A pointer to the end of the parsed string will be placed here 65 + * @base: The number base to use 66 + */ 67 + 68 + unsigned long long simple_strtoull(const char *cp, char **endp, 69 + unsigned int base) 70 + { 71 + unsigned long long result = 0; 72 + 73 + if (!base) 74 + base = simple_guess_base(cp); 75 + 76 + if (base == 16 && cp[0] == '0' && TOLOWER(cp[1]) == 'x') 77 + cp += 2; 78 + 79 + while (isxdigit(*cp)) { 80 + unsigned int value; 81 + 82 + value = isdigit(*cp) ? *cp - '0' : TOLOWER(*cp) - 'a' + 10; 83 + if (value >= base) 84 + break; 85 + result = result * base + value; 86 + cp++; 87 + } 88 + if (endp) 89 + *endp = (char *)cp; 90 + 91 + return result; 92 + } 93 + 94 + long simple_strtol(const char *cp, char **endp, unsigned int base) 95 + { 96 + if (*cp == '-') 97 + return -simple_strtoull(cp + 1, endp, base); 98 + 99 + return simple_strtoull(cp, endp, base); 100 + }
+11
arch/s390/include/asm/boot_data.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _ASM_S390_BOOT_DATA_H 3 + 4 + #include <asm/setup.h> 5 + #include <asm/ipl.h> 6 + 7 + extern char early_command_line[COMMAND_LINE_SIZE]; 8 + extern struct ipl_parameter_block early_ipl_block; 9 + extern int early_ipl_block_valid; 10 + 11 + #endif /* _ASM_S390_BOOT_DATA_H */
+2 -2
arch/s390/include/asm/ipl.h
··· 89 89 90 90 extern void s390_reset_system(void); 91 91 extern void ipl_store_parameters(void); 92 - extern size_t append_ipl_vmparm(char *, size_t); 93 - extern size_t append_ipl_scpdata(char *, size_t); 92 + extern size_t ipl_block_get_ascii_vmparm(char *dest, size_t size, 93 + const struct ipl_parameter_block *ipb); 94 94 95 95 enum ipl_type { 96 96 IPL_TYPE_UNKNOWN = 1,
+1 -1
arch/s390/kernel/Makefile
··· 47 47 obj-y += sysinfo.o jump_label.o lgr.o os_info.o machine_kexec.o pgm_check.o 48 48 obj-y += runtime_instr.o cache.o fpu.o dumpstack.o guarded_storage.o sthyi.o 49 49 obj-y += entry.o reipl.o relocate_kernel.o kdebugfs.o alternative.o 50 - obj-y += nospec-branch.o 50 + obj-y += nospec-branch.o ipl_vmparm.o 51 51 52 52 extra-y += head64.o vmlinux.lds 53 53
+3 -44
arch/s390/kernel/early.c
··· 29 29 #include <asm/cpcmd.h> 30 30 #include <asm/sclp.h> 31 31 #include <asm/facility.h> 32 + #include <asm/boot_data.h> 32 33 #include "entry.h" 33 - 34 - static void __init setup_boot_command_line(void); 35 34 36 35 /* 37 36 * Initialize storage key for kernel pages ··· 283 284 } 284 285 early_param("cad", cad_setup); 285 286 286 - /* Set up boot command line */ 287 - static void __init append_to_cmdline(size_t (*ipl_data)(char *, size_t)) 288 - { 289 - char *parm, *delim; 290 - size_t rc, len; 291 - 292 - len = strlen(boot_command_line); 293 - 294 - delim = boot_command_line + len; /* '\0' character position */ 295 - parm = boot_command_line + len + 1; /* append right after '\0' */ 296 - 297 - rc = ipl_data(parm, COMMAND_LINE_SIZE - len - 1); 298 - if (rc) { 299 - if (*parm == '=') 300 - memmove(boot_command_line, parm + 1, rc); 301 - else 302 - *delim = ' '; /* replace '\0' with space */ 303 - } 304 - } 305 - 306 - static inline int has_ebcdic_char(const char *str) 307 - { 308 - int i; 309 - 310 - for (i = 0; str[i]; i++) 311 - if (str[i] & 0x80) 312 - return 1; 313 - return 0; 314 - } 315 - 287 + char __bootdata(early_command_line)[COMMAND_LINE_SIZE]; 316 288 static void __init setup_boot_command_line(void) 317 289 { 318 - COMMAND_LINE[ARCH_COMMAND_LINE_SIZE - 1] = 0; 319 - /* convert arch command line to ascii if necessary */ 320 - if (has_ebcdic_char(COMMAND_LINE)) 321 - EBCASC(COMMAND_LINE, ARCH_COMMAND_LINE_SIZE); 322 290 /* copy arch command line */ 323 - strlcpy(boot_command_line, strstrip(COMMAND_LINE), 324 - ARCH_COMMAND_LINE_SIZE); 325 - 326 - /* append IPL PARM data to the boot command line */ 327 - if (MACHINE_IS_VM) 328 - append_to_cmdline(append_ipl_vmparm); 329 - 330 - append_to_cmdline(append_ipl_scpdata); 291 + strlcpy(boot_command_line, early_command_line, ARCH_COMMAND_LINE_SIZE); 331 292 } 332 293 333 294 static void __init check_image_bootable(void)
+11 -106
arch/s390/kernel/ipl.c
··· 29 29 #include <asm/checksum.h> 30 30 #include <asm/debug.h> 31 31 #include <asm/os_info.h> 32 + #include <asm/sections.h> 33 + #include <asm/boot_data.h> 32 34 #include "entry.h" 33 35 34 36 #define IPL_PARM_BLOCK_VERSION 0 ··· 118 116 return NULL; 119 117 } 120 118 } 119 + 120 + struct ipl_parameter_block __bootdata(early_ipl_block); 121 + int __bootdata(early_ipl_block_valid); 121 122 122 123 static int ipl_block_valid; 123 124 static struct ipl_parameter_block ipl_block; ··· 267 262 268 263 static struct kobj_attribute sys_ipl_type_attr = __ATTR_RO(ipl_type); 269 264 270 - /* VM IPL PARM routines */ 271 - static size_t reipl_get_ascii_vmparm(char *dest, size_t size, 272 - const struct ipl_parameter_block *ipb) 273 - { 274 - int i; 275 - size_t len; 276 - char has_lowercase = 0; 277 - 278 - len = 0; 279 - if ((ipb->ipl_info.ccw.vm_flags & DIAG308_VM_FLAGS_VP_VALID) && 280 - (ipb->ipl_info.ccw.vm_parm_len > 0)) { 281 - 282 - len = min_t(size_t, size - 1, ipb->ipl_info.ccw.vm_parm_len); 283 - memcpy(dest, ipb->ipl_info.ccw.vm_parm, len); 284 - /* If at least one character is lowercase, we assume mixed 285 - * case; otherwise we convert everything to lowercase. 286 - */ 287 - for (i = 0; i < len; i++) 288 - if ((dest[i] > 0x80 && dest[i] < 0x8a) || /* a-i */ 289 - (dest[i] > 0x90 && dest[i] < 0x9a) || /* j-r */ 290 - (dest[i] > 0xa1 && dest[i] < 0xaa)) { /* s-z */ 291 - has_lowercase = 1; 292 - break; 293 - } 294 - if (!has_lowercase) 295 - EBC_TOLOWER(dest, len); 296 - EBCASC(dest, len); 297 - } 298 - dest[len] = 0; 299 - 300 - return len; 301 - } 302 - 303 - size_t append_ipl_vmparm(char *dest, size_t size) 304 - { 305 - size_t rc; 306 - 307 - rc = 0; 308 - if (ipl_block_valid && ipl_block.hdr.pbt == DIAG308_IPL_TYPE_CCW) 309 - rc = reipl_get_ascii_vmparm(dest, size, &ipl_block); 310 - else 311 - dest[0] = 0; 312 - return rc; 313 - } 314 - 315 265 static ssize_t ipl_vm_parm_show(struct kobject *kobj, 316 266 struct kobj_attribute *attr, char *page) 317 267 { 318 268 char parm[DIAG308_VMPARM_SIZE + 1] = {}; 319 269 320 - append_ipl_vmparm(parm, sizeof(parm)); 270 + if (ipl_block_valid && (ipl_block.hdr.pbt == DIAG308_IPL_TYPE_CCW)) 271 + ipl_block_get_ascii_vmparm(parm, sizeof(parm), &ipl_block); 321 272 return sprintf(page, "%s\n", parm); 322 273 } 323 - 324 - static size_t scpdata_length(const char* buf, size_t count) 325 - { 326 - while (count) { 327 - if (buf[count - 1] != '\0' && buf[count - 1] != ' ') 328 - break; 329 - count--; 330 - } 331 - return count; 332 - } 333 - 334 - static size_t reipl_append_ascii_scpdata(char *dest, size_t size, 335 - const struct ipl_parameter_block *ipb) 336 - { 337 - size_t count; 338 - size_t i; 339 - int has_lowercase; 340 - 341 - count = min(size - 1, scpdata_length(ipb->ipl_info.fcp.scp_data, 342 - ipb->ipl_info.fcp.scp_data_len)); 343 - if (!count) 344 - goto out; 345 - 346 - has_lowercase = 0; 347 - for (i = 0; i < count; i++) { 348 - if (!isascii(ipb->ipl_info.fcp.scp_data[i])) { 349 - count = 0; 350 - goto out; 351 - } 352 - if (!has_lowercase && islower(ipb->ipl_info.fcp.scp_data[i])) 353 - has_lowercase = 1; 354 - } 355 - 356 - if (has_lowercase) 357 - memcpy(dest, ipb->ipl_info.fcp.scp_data, count); 358 - else 359 - for (i = 0; i < count; i++) 360 - dest[i] = tolower(ipb->ipl_info.fcp.scp_data[i]); 361 - out: 362 - dest[count] = '\0'; 363 - return count; 364 - } 365 - 366 - size_t append_ipl_scpdata(char *dest, size_t len) 367 - { 368 - size_t rc; 369 - 370 - rc = 0; 371 - if (ipl_block_valid && ipl_block.hdr.pbt == DIAG308_IPL_TYPE_FCP) 372 - rc = reipl_append_ascii_scpdata(dest, len, &ipl_block); 373 - else 374 - dest[0] = 0; 375 - return rc; 376 - } 377 - 378 274 379 275 static struct kobj_attribute sys_ipl_vm_parm_attr = 380 276 __ATTR(parm, S_IRUGO, ipl_vm_parm_show, NULL); ··· 470 564 { 471 565 char vmparm[DIAG308_VMPARM_SIZE + 1] = {}; 472 566 473 - reipl_get_ascii_vmparm(vmparm, sizeof(vmparm), ipb); 567 + ipl_block_get_ascii_vmparm(vmparm, sizeof(vmparm), ipb); 474 568 return sprintf(page, "%s\n", vmparm); 475 569 } 476 570 ··· 1675 1769 1676 1770 void __init ipl_store_parameters(void) 1677 1771 { 1678 - int rc; 1679 - 1680 - rc = diag308(DIAG308_STORE, &ipl_block); 1681 - if (rc == DIAG308_RC_OK && ipl_block.hdr.version <= IPL_MAX_SUPPORTED_VERSION) 1772 + if (early_ipl_block_valid) { 1773 + memcpy(&ipl_block, &early_ipl_block, sizeof(ipl_block)); 1682 1774 ipl_block_valid = 1; 1775 + } 1683 1776 } 1684 1777 1685 1778 void s390_reset_system(void)
+36
arch/s390/kernel/ipl_vmparm.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + #include <asm/ebcdic.h> 3 + #include <asm/ipl.h> 4 + 5 + /* VM IPL PARM routines */ 6 + size_t ipl_block_get_ascii_vmparm(char *dest, size_t size, 7 + const struct ipl_parameter_block *ipb) 8 + { 9 + int i; 10 + size_t len; 11 + char has_lowercase = 0; 12 + 13 + len = 0; 14 + if ((ipb->ipl_info.ccw.vm_flags & DIAG308_VM_FLAGS_VP_VALID) && 15 + (ipb->ipl_info.ccw.vm_parm_len > 0)) { 16 + 17 + len = min_t(size_t, size - 1, ipb->ipl_info.ccw.vm_parm_len); 18 + memcpy(dest, ipb->ipl_info.ccw.vm_parm, len); 19 + /* If at least one character is lowercase, we assume mixed 20 + * case; otherwise we convert everything to lowercase. 21 + */ 22 + for (i = 0; i < len; i++) 23 + if ((dest[i] > 0x80 && dest[i] < 0x8a) || /* a-i */ 24 + (dest[i] > 0x90 && dest[i] < 0x9a) || /* j-r */ 25 + (dest[i] > 0xa1 && dest[i] < 0xaa)) { /* s-z */ 26 + has_lowercase = 1; 27 + break; 28 + } 29 + if (!has_lowercase) 30 + EBC_TOLOWER(dest, len); 31 + EBCASC(dest, len); 32 + } 33 + dest[len] = 0; 34 + 35 + return len; 36 + }
+4 -22
arch/s390/kernel/setup.c
··· 90 90 91 91 unsigned long int_hwcap = 0; 92 92 93 - int __initdata memory_end_set; 94 - unsigned long __initdata memory_end; 93 + int __bootdata(memory_end_set); 94 + unsigned long __bootdata(memory_end); 95 95 unsigned long __bootdata(max_physmem_end); 96 96 struct mem_detect_info __bootdata(mem_detect); 97 97 ··· 285 285 */ 286 286 void (*pm_power_off)(void) = machine_power_off; 287 287 EXPORT_SYMBOL_GPL(pm_power_off); 288 - 289 - static int __init early_parse_mem(char *p) 290 - { 291 - memory_end = memparse(p, &p); 292 - memory_end &= PAGE_MASK; 293 - memory_end_set = 1; 294 - return 0; 295 - } 296 - early_param("mem", early_parse_mem); 297 288 298 289 static int __init parse_vmalloc(char *arg) 299 290 { ··· 596 605 */ 597 606 static void reserve_memory_end(void) 598 607 { 599 - #ifdef CONFIG_CRASH_DUMP 600 - if (ipl_info.type == IPL_TYPE_FCP_DUMP && 601 - !OLDMEM_BASE && sclp.hsa_size) { 602 - memory_end = sclp.hsa_size; 603 - memory_end &= PAGE_MASK; 604 - memory_end_set = 1; 605 - } 606 - #endif 607 - if (!memory_end_set) 608 - return; 609 - memblock_reserve(memory_end, ULONG_MAX); 608 + if (memory_end_set) 609 + memblock_reserve(memory_end, ULONG_MAX); 610 610 } 611 611 612 612 /*