[PATCH v3] powerpc/kdump: Add support for crashkernel CMA reservation

Jiri Bohac jbohac at suse.cz
Thu Oct 30 01:03:06 AEDT 2025


On Fri, Oct 24, 2025 at 10:31:18PM +0530, Sourabh Jain wrote:
> +static int crash_exclude_mem_range_guarded(struct crash_mem **mem_ranges,
> +					   unsigned long long mstart,
> +					   unsigned long long mend)
> +{
> +	struct crash_mem *tmem = *mem_ranges;
> +
> +	/* Reallocate memory ranges if there is no space to split ranges */
> +	tmem = *mem_ranges;

repeated initialization

> +	if (tmem && (tmem->nr_ranges == tmem->max_nr_ranges)) {
> +		tmem = realloc_mem_ranges(mem_ranges);
> +		if (!tmem)
> +			return -ENOMEM;
> +	}
> +
> +	return crash_exclude_mem_range(tmem, crashk_res.start, crashk_res.end);

mstart and mend, not crashk_res.start and crashk_res.end

-- 
Jiri Bohac <jbohac at suse.cz>
SUSE Labs, Prague, Czechia



More information about the Linuxppc-dev mailing list