Commit 02415f1c authored by Vasily Gorbik's avatar Vasily Gorbik Committed by Alexander Gordeev
Browse files

s390/boot: Rename physmem_alloc_top_down() to physmem_alloc_or_die()



The new name better reflects the function's behavior, emphasizing that
it will terminate execution if allocation fails.

Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
parent e70452c4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ void physmem_set_usable_limit(unsigned long limit);
void physmem_reserve(enum reserved_range_type type, unsigned long addr, unsigned long size);
void physmem_free(enum reserved_range_type type);
/* for continuous/multiple allocations per type */
unsigned long physmem_alloc_top_down(enum reserved_range_type type, unsigned long size,
unsigned long physmem_alloc_or_die(enum reserved_range_type type, unsigned long size,
				   unsigned long align);
/* for single allocations, 1 per type */
unsigned long physmem_alloc_range(enum reserved_range_type type, unsigned long size,
+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ void save_ipl_cert_comp_list(void)
		return;

	size = get_cert_comp_list_size();
	early_ipl_comp_list_addr = physmem_alloc_top_down(RR_CERT_COMP_LIST, size, sizeof(int));
	early_ipl_comp_list_addr = physmem_alloc_or_die(RR_CERT_COMP_LIST, size, sizeof(int));
	ipl_cert_list_addr = early_ipl_comp_list_addr + early_ipl_comp_list_size;

	copy_components_bootdata();
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ static unsigned long iterate_valid_positions(unsigned long size, unsigned long a
 * cannot have chains.
 *
 * On the other hand, "dynamic" or "repetitive" allocations are done via
 * physmem_alloc_top_down(). These allocations are tightly packed together
 * physmem_alloc_or_die(). These allocations are tightly packed together
 * top down from the end of online memory. physmem_alloc_pos represents
 * current position where those allocations start.
 *
+2 −2
Original line number Diff line number Diff line
@@ -343,7 +343,7 @@ unsigned long physmem_alloc_range(enum reserved_range_type type, unsigned long s
	return addr;
}

unsigned long physmem_alloc_top_down(enum reserved_range_type type, unsigned long size,
unsigned long physmem_alloc_or_die(enum reserved_range_type type, unsigned long size,
				   unsigned long align)
{
	struct reserved_range *range = &physmem_info.reserved[type];
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ static void rescue_initrd(unsigned long min, unsigned long max)
		return;
	old_addr = addr;
	physmem_free(RR_INITRD);
	addr = physmem_alloc_top_down(RR_INITRD, size, 0);
	addr = physmem_alloc_or_die(RR_INITRD, size, 0);
	memmove((void *)addr, (void *)old_addr, size);
}

Loading