[PATCH RESEND 31/62] init: rename initrd_below_start_ok to initramfs_below_start_ok

Askar Safin
2025-09-13T01:14:02Z

It refers to initramfs, not to initrd

Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/csky/kernel/setup.c | 2 +-
arch/mips/kernel/setup.c | 2 +-
arch/openrisc/kernel/setup.c | 2 +-
arch/parisc/mm/init.c | 2 +-
arch/xtensa/kernel/setup.c | 4 ++--
drivers/of/fdt.c | 2 +-
include/linux/initrd.h | 2 +-
init/do_mounts_initrd.c | 2 +-
init/initramfs.c | 2 +-
init/main.c | 2 +-
10 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/csky/kernel/setup.c b/arch/csky/kernel/setup.c
index ce128888462e..403a977b8c1f 100644
--- a/arch/csky/kernel/setup.c
+++ b/arch/csky/kernel/setup.c
@@ -40,7 +40,7 @@ static void __init setup_initrd(void)
pr_info("Initial ramdisk at: 0x%p (%lu bytes)\n",
(void *)(virt_external_initramfs_start), size);

- initrd_below_start_ok = 1;
+ initramfs_below_start_ok = 1;

return;

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index da11ae875539..aed454ebd751 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -225,7 +225,7 @@ static void __init finalize_initrd(void)
maybe_bswap_initrd();

memblock_reserve(__pa(virt_external_initramfs_start), size);
- initrd_below_start_ok = 1;
+ initramfs_below_start_ok = 1;

pr_info("Initial ramdisk at: 0x%lx (%lu bytes)\n",
virt_external_initramfs_start, size);
diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c
index f387dc57ec35..337a0381c452 100644
--- a/arch/openrisc/kernel/setup.c
+++ b/arch/openrisc/kernel/setup.c
@@ -246,7 +246,7 @@ void __init setup_arch(char **cmdline_p)
} else {
printk(KERN_INFO "Initial ramdisk at: 0x%p (%lu bytes)\n",
(void *)(virt_external_initramfs_start), virt_external_initramfs_end - virt_external_initramfs_start);
- initrd_below_start_ok = 1;
+ initramfs_below_start_ok = 1;
}
#endif

diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 74bfe9797589..af7a33c8bd31 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -308,7 +308,7 @@ static void __init setup_bootmem(void)
} else {
initrd_reserve = virt_external_initramfs_end - virt_external_initramfs_start;
}
- initrd_below_start_ok = 1;
+ initramfs_below_start_ok = 1;
printk(KERN_INFO "initrd: reserving %08lx-%08lx (mem_max %08lx)\n", __pa(virt_external_initramfs_start), __pa(virt_external_initramfs_start) + initrd_reserve, mem_max);

memblock_reserve(__pa(virt_external_initramfs_start), initrd_reserve);
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 2e9003be3e8c..b86367178bce 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -51,7 +51,7 @@
#ifdef CONFIG_BLK_DEV_INITRD
extern unsigned long virt_external_initramfs_start;
extern unsigned long virt_external_initramfs_end;
-extern int initrd_below_start_ok;
+extern int initramfs_below_start_ok;
#endif

#ifdef CONFIG_USE_OF
@@ -292,7 +292,7 @@ void __init setup_arch(char **cmdline_p)
#ifdef CONFIG_BLK_DEV_INITRD
if (virt_external_initramfs_start < virt_external_initramfs_end &&
!mem_reserve(__pa(virt_external_initramfs_start), __pa(virt_external_initramfs_end)))
- initrd_below_start_ok = 1;
+ initramfs_below_start_ok = 1;
else
virt_external_initramfs_start = 0;
#endif
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index baf8347e0314..127b37f211cb 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -767,7 +767,7 @@ static void __early_init_dt_declare_initrd(unsigned long start,
!(IS_ENABLED(CONFIG_RISCV) && IS_ENABLED(CONFIG_64BIT))) {
virt_external_initramfs_start = (unsigned long)__va(start);
virt_external_initramfs_end = (unsigned long)__va(end);
- initrd_below_start_ok = 1;
+ initramfs_below_start_ok = 1;
}
}

diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index f19efebe8221..364b603215ac 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -4,7 +4,7 @@
#define __LINUX_INITRD_H

/* 1 if it is not an error if virt_external_initramfs_start < memory_start */
-extern int initrd_below_start_ok;
+extern int initramfs_below_start_ok;

extern unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
extern void free_initrd_mem(unsigned long, unsigned long);
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index 535ce459ab94..d8b809ced11b 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -12,7 +12,7 @@

#include "do_mounts.h"

-int initrd_below_start_ok;
+int initramfs_below_start_ok;

static int __init early_initrdmem(char *p)
{
diff --git a/init/initramfs.c b/init/initramfs.c
index d2301cc6c470..a9c5d211665d 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -643,7 +643,7 @@ void __init reserve_initrd_mem(void)
/* Now convert initrd to virtual addresses */
virt_external_initramfs_start = (unsigned long)__va(phys_external_initramfs_start);
virt_external_initramfs_end = virt_external_initramfs_start + phys_external_initramfs_size;
- initrd_below_start_ok = 1;
+ initramfs_below_start_ok = 1;

return;
disable:
diff --git a/init/main.c b/init/main.c
index 5f4d860ab72a..58a7199c81f7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1047,7 +1047,7 @@ void start_kernel(void)
locking_selftest();

#ifdef CONFIG_BLK_DEV_INITRD
- if (virt_external_initramfs_start && !initrd_below_start_ok &&
+ if (virt_external_initramfs_start && !initramfs_below_start_ok &&
page_to_pfn(virt_to_page((void *)virt_external_initramfs_start)) < min_low_pfn) {
pr_crit("initrd overwritten (0x%08lx < 0x%08lx) - disabling it.\n",
page_to_pfn(virt_to_page((void *)virt_external_initramfs_start)),
--
2.47.2