mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
powerpc: Delete unused function delete_fdt_mem_rsv()
delete_fdt_mem_rsv() defined in "arch/powerpc/kexec/file_load.c" has been renamed to fdt_find_and_del_mem_rsv(), and moved to "drivers/of/kexec.c". Remove delete_fdt_mem_rsv() in "arch/powerpc/kexec/file_load.c". Co-developed-by: Prakhar Srivastava <prsriva@linux.microsoft.com> Signed-off-by: Prakhar Srivastava <prsriva@linux.microsoft.com> Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210221174930.27324-13-nramas@linux.microsoft.com
This commit is contained in:
parent
28db15d49c
commit
cd42f1db09
@ -115,7 +115,6 @@ char *setup_kdump_cmdline(struct kimage *image, char *cmdline,
|
||||
int setup_purgatory(struct kimage *image, const void *slave_code,
|
||||
const void *fdt, unsigned long kernel_load_addr,
|
||||
unsigned long fdt_load_addr);
|
||||
int delete_fdt_mem_rsv(void *fdt, unsigned long start, unsigned long size);
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
struct kexec_buf;
|
||||
|
@ -107,35 +107,3 @@ int setup_purgatory(struct kimage *image, const void *slave_code,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* delete_fdt_mem_rsv - delete memory reservation with given address and size
|
||||
*
|
||||
* Return: 0 on success, or negative errno on error.
|
||||
*/
|
||||
int delete_fdt_mem_rsv(void *fdt, unsigned long start, unsigned long size)
|
||||
{
|
||||
int i, ret, num_rsvs = fdt_num_mem_rsv(fdt);
|
||||
|
||||
for (i = 0; i < num_rsvs; i++) {
|
||||
uint64_t rsv_start, rsv_size;
|
||||
|
||||
ret = fdt_get_mem_rsv(fdt, i, &rsv_start, &rsv_size);
|
||||
if (ret) {
|
||||
pr_err("Malformed device tree.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (rsv_start == start && rsv_size == size) {
|
||||
ret = fdt_del_mem_rsv(fdt, i);
|
||||
if (ret) {
|
||||
pr_err("Error deleting device tree reservation.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -ENOENT;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user