* [PATCH RESEND 01/62] init: remove deprecated "load_ramdisk" command line parameter, which does nothing
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-15 11:17 ` Christophe Leroy
2025-09-13 0:37 ` [PATCH RESEND 02/62] init: remove deprecated "prompt_ramdisk" " Askar Safin
` (67 subsequent siblings)
68 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is preparation for initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/admin-guide/kernel-parameters.txt | 2 --
arch/arm/configs/neponset_defconfig | 2 +-
init/do_mounts.c | 7 -------
3 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 747a55abf494..d3b05ce249ff 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3275,8 +3275,6 @@
If there are multiple matching configurations changing
the same attribute, the last one is used.
- load_ramdisk= [RAM] [Deprecated]
-
lockd.nlm_grace_period=P [NFS] Assign grace period.
Format: <integer>
diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig
index 2227f86100ad..16f7300239da 100644
--- a/arch/arm/configs/neponset_defconfig
+++ b/arch/arm/configs/neponset_defconfig
@@ -9,7 +9,7 @@ CONFIG_ASSABET_NEPONSET=y
CONFIG_ZBOOT_ROM_TEXT=0x80000
CONFIG_ZBOOT_ROM_BSS=0xc1000000
CONFIG_ZBOOT_ROM=y
-CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) load_ramdisk=1 prompt_ramdisk=0 mem=32M noinitrd initrd=0xc0800000,3M"
+CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) prompt_ramdisk=0 mem=32M noinitrd initrd=0xc0800000,3M"
CONFIG_FPE_NWFPE=y
CONFIG_PM=y
CONFIG_MODULES=y
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 6af29da8889e..0f2f44e6250c 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -34,13 +34,6 @@ static int root_wait;
dev_t ROOT_DEV;
-static int __init load_ramdisk(char *str)
-{
- pr_warn("ignoring the deprecated load_ramdisk= option\n");
- return 1;
-}
-__setup("load_ramdisk=", load_ramdisk);
-
static int __init readonly(char *str)
{
if (*str)
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 01/62] init: remove deprecated "load_ramdisk" command line parameter, which does nothing
2025-09-13 0:37 ` [PATCH RESEND 01/62] init: remove deprecated "load_ramdisk" command line parameter, which does nothing Askar Safin
@ 2025-09-15 11:17 ` Christophe Leroy
0 siblings, 0 replies; 95+ messages in thread
From: Christophe Leroy @ 2025-09-15 11:17 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Le 13/09/2025 à 02:37, Askar Safin a écrit :
> [Vous ne recevez pas souvent de courriers de safinaskar@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> This is preparation for initrd removal
Squash patch 1 and patch 2 together and say this is cleanup of two
options deprecated by commit c8376994c86c ("initrd: remove support for
multiple floppies") with the documentation by commit 6b99e6e6aa62
("Documentation/admin-guide: blockdev/ramdisk: remove use of "rdev"")
Christophe
>
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
> ---
> Documentation/admin-guide/kernel-parameters.txt | 2 --
> arch/arm/configs/neponset_defconfig | 2 +-
> init/do_mounts.c | 7 -------
> 3 files changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 747a55abf494..d3b05ce249ff 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -3275,8 +3275,6 @@
> If there are multiple matching configurations changing
> the same attribute, the last one is used.
>
> - load_ramdisk= [RAM] [Deprecated]
> -
> lockd.nlm_grace_period=P [NFS] Assign grace period.
> Format: <integer>
>
> diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig
> index 2227f86100ad..16f7300239da 100644
> --- a/arch/arm/configs/neponset_defconfig
> +++ b/arch/arm/configs/neponset_defconfig
> @@ -9,7 +9,7 @@ CONFIG_ASSABET_NEPONSET=y
> CONFIG_ZBOOT_ROM_TEXT=0x80000
> CONFIG_ZBOOT_ROM_BSS=0xc1000000
> CONFIG_ZBOOT_ROM=y
> -CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) load_ramdisk=1 prompt_ramdisk=0 mem=32M noinitrd initrd=0xc0800000,3M"
> +CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) prompt_ramdisk=0 mem=32M noinitrd initrd=0xc0800000,3M"
> CONFIG_FPE_NWFPE=y
> CONFIG_PM=y
> CONFIG_MODULES=y
> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index 6af29da8889e..0f2f44e6250c 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -34,13 +34,6 @@ static int root_wait;
>
> dev_t ROOT_DEV;
>
> -static int __init load_ramdisk(char *str)
> -{
> - pr_warn("ignoring the deprecated load_ramdisk= option\n");
> - return 1;
> -}
> -__setup("load_ramdisk=", load_ramdisk);
> -
> static int __init readonly(char *str)
> {
> if (*str)
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 02/62] init: remove deprecated "prompt_ramdisk" command line parameter, which does nothing
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 01/62] init: remove deprecated "load_ramdisk" command line parameter, which does nothing Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-15 11:16 ` Christophe Leroy
2025-09-13 0:37 ` [PATCH RESEND 03/62] init: sh, sparc, x86: remove unused constants RAMDISK_PROMPT_FLAG and RAMDISK_LOAD_FLAG Askar Safin
` (66 subsequent siblings)
68 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is preparation for initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/admin-guide/kernel-parameters.txt | 2 --
arch/arm/configs/neponset_defconfig | 2 +-
init/do_mounts_rd.c | 7 -------
3 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index d3b05ce249ff..f940c1184912 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5229,8 +5229,6 @@
Param: <number> - step/bucket size as a power of 2 for
statistical time based profiling.
- prompt_ramdisk= [RAM] [Deprecated]
-
prot_virt= [S390] enable hosting protected virtual machines
isolated from the hypervisor (if hardware supports
that). If enabled, the default kernel base address
diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig
index 16f7300239da..4d720001c12e 100644
--- a/arch/arm/configs/neponset_defconfig
+++ b/arch/arm/configs/neponset_defconfig
@@ -9,7 +9,7 @@ CONFIG_ASSABET_NEPONSET=y
CONFIG_ZBOOT_ROM_TEXT=0x80000
CONFIG_ZBOOT_ROM_BSS=0xc1000000
CONFIG_ZBOOT_ROM=y
-CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) prompt_ramdisk=0 mem=32M noinitrd initrd=0xc0800000,3M"
+CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) mem=32M noinitrd initrd=0xc0800000,3M"
CONFIG_FPE_NWFPE=y
CONFIG_PM=y
CONFIG_MODULES=y
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index ac021ae6e6fa..f7d53bc21e41 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -17,13 +17,6 @@
static struct file *in_file, *out_file;
static loff_t in_pos, out_pos;
-static int __init prompt_ramdisk(char *str)
-{
- pr_warn("ignoring the deprecated prompt_ramdisk= option\n");
- return 1;
-}
-__setup("prompt_ramdisk=", prompt_ramdisk);
-
int __initdata rd_image_start; /* starting block # of image */
static int __init ramdisk_start_setup(char *str)
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 02/62] init: remove deprecated "prompt_ramdisk" command line parameter, which does nothing
2025-09-13 0:37 ` [PATCH RESEND 02/62] init: remove deprecated "prompt_ramdisk" " Askar Safin
@ 2025-09-15 11:16 ` Christophe Leroy
0 siblings, 0 replies; 95+ messages in thread
From: Christophe Leroy @ 2025-09-15 11:16 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Le 13/09/2025 à 02:37, Askar Safin a écrit :
> [Vous ne recevez pas souvent de courriers de safinaskar@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> This is preparation for initrd removal
Squash patch 1 and patch 2 together and say this is cleanup of two
options deprecated by commit c8376994c86c ("initrd: remove support for
multiple floppies") with the documentation by commit 6b99e6e6aa62
("Documentation/admin-guide: blockdev/ramdisk: remove use of "rdev"")
Christophe
>
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
> ---
> Documentation/admin-guide/kernel-parameters.txt | 2 --
> arch/arm/configs/neponset_defconfig | 2 +-
> init/do_mounts_rd.c | 7 -------
> 3 files changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index d3b05ce249ff..f940c1184912 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -5229,8 +5229,6 @@
> Param: <number> - step/bucket size as a power of 2 for
> statistical time based profiling.
>
> - prompt_ramdisk= [RAM] [Deprecated]
> -
> prot_virt= [S390] enable hosting protected virtual machines
> isolated from the hypervisor (if hardware supports
> that). If enabled, the default kernel base address
> diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig
> index 16f7300239da..4d720001c12e 100644
> --- a/arch/arm/configs/neponset_defconfig
> +++ b/arch/arm/configs/neponset_defconfig
> @@ -9,7 +9,7 @@ CONFIG_ASSABET_NEPONSET=y
> CONFIG_ZBOOT_ROM_TEXT=0x80000
> CONFIG_ZBOOT_ROM_BSS=0xc1000000
> CONFIG_ZBOOT_ROM=y
> -CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) prompt_ramdisk=0 mem=32M noinitrd initrd=0xc0800000,3M"
> +CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) mem=32M noinitrd initrd=0xc0800000,3M"
> CONFIG_FPE_NWFPE=y
> CONFIG_PM=y
> CONFIG_MODULES=y
> diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
> index ac021ae6e6fa..f7d53bc21e41 100644
> --- a/init/do_mounts_rd.c
> +++ b/init/do_mounts_rd.c
> @@ -17,13 +17,6 @@
> static struct file *in_file, *out_file;
> static loff_t in_pos, out_pos;
>
> -static int __init prompt_ramdisk(char *str)
> -{
> - pr_warn("ignoring the deprecated prompt_ramdisk= option\n");
> - return 1;
> -}
> -__setup("prompt_ramdisk=", prompt_ramdisk);
> -
> int __initdata rd_image_start; /* starting block # of image */
>
> static int __init ramdisk_start_setup(char *str)
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 03/62] init: sh, sparc, x86: remove unused constants RAMDISK_PROMPT_FLAG and RAMDISK_LOAD_FLAG
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 01/62] init: remove deprecated "load_ramdisk" command line parameter, which does nothing Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 02/62] init: remove deprecated "prompt_ramdisk" " Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-15 11:19 ` Christophe Leroy
2025-09-13 0:37 ` [PATCH RESEND 04/62] init: x86, arm, sh, sparc: remove variable rd_image_start, which controls starting block number of initrd Askar Safin
` (65 subsequent siblings)
68 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches, stable+noautosel
They were used for initrd before c8376994c86.
c8376994c86c made them unused and forgot to remove them
Fixes: c8376994c86c ("initrd: remove support for multiple floppies")
Cc: <stable+noautosel@kernel.org> # because changes uapi headers
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/sh/kernel/setup.c | 2 --
arch/sparc/kernel/setup_32.c | 2 --
arch/sparc/kernel/setup_64.c | 2 --
arch/x86/include/uapi/asm/bootparam.h | 2 --
arch/x86/kernel/setup.c | 2 --
5 files changed, 10 deletions(-)
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 039a51291002..d66f098e9e9f 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -71,8 +71,6 @@ EXPORT_SYMBOL(sh_mv);
extern int root_mountflags;
#define RAMDISK_IMAGE_START_MASK 0x07FF
-#define RAMDISK_PROMPT_FLAG 0x8000
-#define RAMDISK_LOAD_FLAG 0x4000
static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c
index 704375c061e7..eb60be31127f 100644
--- a/arch/sparc/kernel/setup_32.c
+++ b/arch/sparc/kernel/setup_32.c
@@ -172,8 +172,6 @@ extern unsigned short root_flags;
extern unsigned short root_dev;
extern unsigned short ram_flags;
#define RAMDISK_IMAGE_START_MASK 0x07FF
-#define RAMDISK_PROMPT_FLAG 0x8000
-#define RAMDISK_LOAD_FLAG 0x4000
extern int root_mountflags;
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c
index 63615f5c99b4..f728f1b00aca 100644
--- a/arch/sparc/kernel/setup_64.c
+++ b/arch/sparc/kernel/setup_64.c
@@ -145,8 +145,6 @@ extern unsigned short root_flags;
extern unsigned short root_dev;
extern unsigned short ram_flags;
#define RAMDISK_IMAGE_START_MASK 0x07FF
-#define RAMDISK_PROMPT_FLAG 0x8000
-#define RAMDISK_LOAD_FLAG 0x4000
extern int root_mountflags;
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
index dafbf581c515..f53dd3f319ba 100644
--- a/arch/x86/include/uapi/asm/bootparam.h
+++ b/arch/x86/include/uapi/asm/bootparam.h
@@ -6,8 +6,6 @@
/* ram_size flags */
#define RAMDISK_IMAGE_START_MASK 0x07FF
-#define RAMDISK_PROMPT_FLAG 0x8000
-#define RAMDISK_LOAD_FLAG 0x4000
/* loadflags */
#define LOADED_HIGH (1<<0)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 1b2edd07a3e1..6409e766fb17 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -223,8 +223,6 @@ extern int root_mountflags;
unsigned long saved_video_mode;
#define RAMDISK_IMAGE_START_MASK 0x07FF
-#define RAMDISK_PROMPT_FLAG 0x8000
-#define RAMDISK_LOAD_FLAG 0x4000
static char __initdata command_line[COMMAND_LINE_SIZE];
#ifdef CONFIG_CMDLINE_BOOL
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 03/62] init: sh, sparc, x86: remove unused constants RAMDISK_PROMPT_FLAG and RAMDISK_LOAD_FLAG
2025-09-13 0:37 ` [PATCH RESEND 03/62] init: sh, sparc, x86: remove unused constants RAMDISK_PROMPT_FLAG and RAMDISK_LOAD_FLAG Askar Safin
@ 2025-09-15 11:19 ` Christophe Leroy
0 siblings, 0 replies; 95+ messages in thread
From: Christophe Leroy @ 2025-09-15 11:19 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches, stable+noautosel
Le 13/09/2025 à 02:37, Askar Safin a écrit :
> [Vous ne recevez pas souvent de courriers de safinaskar@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> They were used for initrd before c8376994c86.
>
> c8376994c86c made them unused and forgot to remove them
>
> Fixes: c8376994c86c ("initrd: remove support for multiple floppies")
> Cc: <stable+noautosel@kernel.org> # because changes uapi headers
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> arch/sh/kernel/setup.c | 2 --
> arch/sparc/kernel/setup_32.c | 2 --
> arch/sparc/kernel/setup_64.c | 2 --
> arch/x86/include/uapi/asm/bootparam.h | 2 --
> arch/x86/kernel/setup.c | 2 --
> 5 files changed, 10 deletions(-)
>
> diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
> index 039a51291002..d66f098e9e9f 100644
> --- a/arch/sh/kernel/setup.c
> +++ b/arch/sh/kernel/setup.c
> @@ -71,8 +71,6 @@ EXPORT_SYMBOL(sh_mv);
> extern int root_mountflags;
>
> #define RAMDISK_IMAGE_START_MASK 0x07FF
> -#define RAMDISK_PROMPT_FLAG 0x8000
> -#define RAMDISK_LOAD_FLAG 0x4000
>
> static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
>
> diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c
> index 704375c061e7..eb60be31127f 100644
> --- a/arch/sparc/kernel/setup_32.c
> +++ b/arch/sparc/kernel/setup_32.c
> @@ -172,8 +172,6 @@ extern unsigned short root_flags;
> extern unsigned short root_dev;
> extern unsigned short ram_flags;
> #define RAMDISK_IMAGE_START_MASK 0x07FF
> -#define RAMDISK_PROMPT_FLAG 0x8000
> -#define RAMDISK_LOAD_FLAG 0x4000
>
> extern int root_mountflags;
>
> diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c
> index 63615f5c99b4..f728f1b00aca 100644
> --- a/arch/sparc/kernel/setup_64.c
> +++ b/arch/sparc/kernel/setup_64.c
> @@ -145,8 +145,6 @@ extern unsigned short root_flags;
> extern unsigned short root_dev;
> extern unsigned short ram_flags;
> #define RAMDISK_IMAGE_START_MASK 0x07FF
> -#define RAMDISK_PROMPT_FLAG 0x8000
> -#define RAMDISK_LOAD_FLAG 0x4000
>
> extern int root_mountflags;
>
> diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
> index dafbf581c515..f53dd3f319ba 100644
> --- a/arch/x86/include/uapi/asm/bootparam.h
> +++ b/arch/x86/include/uapi/asm/bootparam.h
> @@ -6,8 +6,6 @@
>
> /* ram_size flags */
> #define RAMDISK_IMAGE_START_MASK 0x07FF
> -#define RAMDISK_PROMPT_FLAG 0x8000
> -#define RAMDISK_LOAD_FLAG 0x4000
>
> /* loadflags */
> #define LOADED_HIGH (1<<0)
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 1b2edd07a3e1..6409e766fb17 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -223,8 +223,6 @@ extern int root_mountflags;
> unsigned long saved_video_mode;
>
> #define RAMDISK_IMAGE_START_MASK 0x07FF
> -#define RAMDISK_PROMPT_FLAG 0x8000
> -#define RAMDISK_LOAD_FLAG 0x4000
>
> static char __initdata command_line[COMMAND_LINE_SIZE];
> #ifdef CONFIG_CMDLINE_BOOL
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 04/62] init: x86, arm, sh, sparc: remove variable rd_image_start, which controls starting block number of initrd
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (2 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 03/62] init: sh, sparc, x86: remove unused constants RAMDISK_PROMPT_FLAG and RAMDISK_LOAD_FLAG Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-15 11:43 ` Christophe Leroy
2025-09-13 0:37 ` [PATCH RESEND 05/62] init: remove "ramdisk_start" command line parameter, " Askar Safin
` (64 subsequent siblings)
68 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is preparation for initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/arch/x86/boot.rst | 4 ++--
arch/arm/kernel/atags_parse.c | 2 --
arch/sh/include/asm/setup.h | 1 -
arch/sh/kernel/head_32.S | 2 +-
arch/sh/kernel/setup.c | 9 +--------
arch/sparc/boot/piggyback.c | 4 ++--
arch/sparc/kernel/head_32.S | 4 ++--
arch/sparc/kernel/head_64.S | 6 ++++--
arch/sparc/kernel/setup_32.c | 5 -----
arch/sparc/kernel/setup_64.c | 5 -----
| 2 +-
arch/x86/include/uapi/asm/bootparam.h | 5 +----
arch/x86/kernel/setup.c | 5 -----
include/linux/initrd.h | 3 ---
init/do_mounts_rd.c | 8 +++-----
15 files changed, 17 insertions(+), 48 deletions(-)
diff --git a/Documentation/arch/x86/boot.rst b/Documentation/arch/x86/boot.rst
index 77e6163288db..118aa7b69667 100644
--- a/Documentation/arch/x86/boot.rst
+++ b/Documentation/arch/x86/boot.rst
@@ -189,7 +189,7 @@ Offset/Size Proto Name Meaning
01F1/1 ALL(1) setup_sects The size of the setup in sectors
01F2/2 ALL root_flags If set, the root is mounted readonly
01F4/4 2.04+(2) syssize The size of the 32-bit code in 16-byte paras
-01F8/2 ALL ram_size DO NOT USE - for bootsect.S use only
+01F8/2 ALL ram_size DO NOT USE - for bootsect.S use only - used to control initrd, which was removed from Linux in 2025
01FA/2 ALL vid_mode Video mode control
01FC/2 ALL root_dev Default root device number
01FE/2 ALL boot_flag 0xAA55 magic number
@@ -308,7 +308,7 @@ Offset/size: 0x1f8/2
Protocol: ALL
============ ===============
- This field is obsolete.
+ This field is obsolete. Used to control initrd, which was removed from Linux in 2025.
============ ===================
Field name: vid_mode
diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
index 4ec591bde3df..a3f0a4f84e04 100644
--- a/arch/arm/kernel/atags_parse.c
+++ b/arch/arm/kernel/atags_parse.c
@@ -90,8 +90,6 @@ __tagtable(ATAG_VIDEOTEXT, parse_tag_videotext);
#ifdef CONFIG_BLK_DEV_RAM
static int __init parse_tag_ramdisk(const struct tag *tag)
{
- rd_image_start = tag->u.ramdisk.start;
-
if (tag->u.ramdisk.size)
rd_size = tag->u.ramdisk.size;
diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h
index 84bb23a771f3..d1b97c5726e4 100644
--- a/arch/sh/include/asm/setup.h
+++ b/arch/sh/include/asm/setup.h
@@ -10,7 +10,6 @@
#define PARAM ((unsigned char *)empty_zero_page)
#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
-#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
#define INITRD_START (*(unsigned long *) (PARAM+0x010))
diff --git a/arch/sh/kernel/head_32.S b/arch/sh/kernel/head_32.S
index b603b7968b38..4382c0f058c8 100644
--- a/arch/sh/kernel/head_32.S
+++ b/arch/sh/kernel/head_32.S
@@ -28,7 +28,7 @@
.section .empty_zero_page, "aw"
ENTRY(empty_zero_page)
.long 1 /* MOUNT_ROOT_RDONLY */
- .long 0 /* RAMDISK_FLAGS */
+ .long 0 /* RAMDISK_FLAGS - used to control initrd, which was removed from Linux in 2025 */
.long 0x0200 /* ORIG_ROOT_DEV */
.long 1 /* LOADER_TYPE */
.long 0x00000000 /* INITRD_START */
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index d66f098e9e9f..50f1d39fe34f 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -70,8 +70,6 @@ EXPORT_SYMBOL(sh_mv);
extern int root_mountflags;
-#define RAMDISK_IMAGE_START_MASK 0x07FF
-
static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
static struct resource code_resource = {
@@ -273,19 +271,14 @@ void __init setup_arch(char **cmdline_p)
printk(KERN_NOTICE "Boot params:\n"
"... MOUNT_ROOT_RDONLY - %08lx\n"
- "... RAMDISK_FLAGS - %08lx\n"
"... ORIG_ROOT_DEV - %08lx\n"
"... LOADER_TYPE - %08lx\n"
"... INITRD_START - %08lx\n"
"... INITRD_SIZE - %08lx\n",
- MOUNT_ROOT_RDONLY, RAMDISK_FLAGS,
+ MOUNT_ROOT_RDONLY,
ORIG_ROOT_DEV, LOADER_TYPE,
INITRD_START, INITRD_SIZE);
-#ifdef CONFIG_BLK_DEV_RAM
- rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
-#endif
-
if (!MOUNT_ROOT_RDONLY)
root_mountflags &= ~MS_RDONLY;
setup_initial_init_mm(_text, _etext, _edata, _end);
diff --git a/arch/sparc/boot/piggyback.c b/arch/sparc/boot/piggyback.c
index 6d74064add0a..a9cc55254ff8 100644
--- a/arch/sparc/boot/piggyback.c
+++ b/arch/sparc/boot/piggyback.c
@@ -220,8 +220,8 @@ int main(int argc,char **argv)
/*
* root_flags = 0
- * root_dev = 1 (RAMDISK_MAJOR)
- * ram_flags = 0
+ * root_dev = 1 (1 used to mean RAMDISK_MAJOR, i. e. initrd, which was removed from Linux)
+ * ram_flags = 0 (used to control initrd, which was removed from Linux in 2025)
* sparc_ramdisk_image = "PAGE aligned address after _end")
* sparc_ramdisk_size = size of image
*/
diff --git a/arch/sparc/kernel/head_32.S b/arch/sparc/kernel/head_32.S
index 38345460d542..46f0e39b9037 100644
--- a/arch/sparc/kernel/head_32.S
+++ b/arch/sparc/kernel/head_32.S
@@ -65,7 +65,7 @@ empty_zero_page: .skip PAGE_SIZE
EXPORT_SYMBOL(empty_zero_page)
.global root_flags
- .global ram_flags
+ .global ram_flags /* used to control initrd, which was removed from Linux in 2025 */
.global root_dev
.global sparc_ramdisk_image
.global sparc_ramdisk_size
@@ -81,7 +81,7 @@ root_flags:
.half 1
root_dev:
.half 0
-ram_flags:
+ram_flags: /* used to control initrd, which was removed from Linux in 2025 */
.half 0
sparc_ramdisk_image:
.word 0
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S
index cf0549134234..4480c0532fe9 100644
--- a/arch/sparc/kernel/head_64.S
+++ b/arch/sparc/kernel/head_64.S
@@ -52,7 +52,9 @@ stext:
* Fields should be kept upward compatible and whenever any change is made,
* HdrS version should be incremented.
*/
- .global root_flags, ram_flags, root_dev
+ .global root_flags
+ .global ram_flags /* used to control initrd, which was removed from Linux in 2025 */
+ .global root_dev
.global sparc_ramdisk_image, sparc_ramdisk_size
.global sparc_ramdisk_image64
@@ -71,7 +73,7 @@ root_flags:
.half 1
root_dev:
.half 0
-ram_flags:
+ram_flags: /* used to control initrd, which was removed from Linux in 2025 */
.half 0
sparc_ramdisk_image:
.word 0
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c
index eb60be31127f..fb46fb3acf54 100644
--- a/arch/sparc/kernel/setup_32.c
+++ b/arch/sparc/kernel/setup_32.c
@@ -170,8 +170,6 @@ static void __init boot_flags_init(char *commands)
extern unsigned short root_flags;
extern unsigned short root_dev;
-extern unsigned short ram_flags;
-#define RAMDISK_IMAGE_START_MASK 0x07FF
extern int root_mountflags;
@@ -335,9 +333,6 @@ void __init setup_arch(char **cmdline_p)
if (!root_flags)
root_mountflags &= ~MS_RDONLY;
ROOT_DEV = old_decode_dev(root_dev);
-#ifdef CONFIG_BLK_DEV_RAM
- rd_image_start = ram_flags & RAMDISK_IMAGE_START_MASK;
-#endif
prom_setsync(prom_sync_me);
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c
index f728f1b00aca..79b56613c6d8 100644
--- a/arch/sparc/kernel/setup_64.c
+++ b/arch/sparc/kernel/setup_64.c
@@ -143,8 +143,6 @@ static void __init boot_flags_init(char *commands)
extern unsigned short root_flags;
extern unsigned short root_dev;
-extern unsigned short ram_flags;
-#define RAMDISK_IMAGE_START_MASK 0x07FF
extern int root_mountflags;
@@ -640,9 +638,6 @@ void __init setup_arch(char **cmdline_p)
if (!root_flags)
root_mountflags &= ~MS_RDONLY;
ROOT_DEV = old_decode_dev(root_dev);
-#ifdef CONFIG_BLK_DEV_RAM
- rd_image_start = ram_flags & RAMDISK_IMAGE_START_MASK;
-#endif
#ifdef CONFIG_IP_PNP
if (!ic_set_manually) {
--git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index 9bea5a1e2c52..0ced2e9f100e 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -235,7 +235,7 @@ hdr:
.byte setup_sects - 1
root_flags: .word ROOT_RDONLY
syssize: .long ZO__edata / 16
-ram_size: .word 0 /* Obsolete */
+ram_size: .word 0 /* Used to control initrd, which was removed from Linux in 2025 */
vid_mode: .word SVGA_MODE
root_dev: .word 0 /* Default to major/minor 0/0 */
boot_flag: .word 0xAA55
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
index f53dd3f319ba..bf56549f79bb 100644
--- a/arch/x86/include/uapi/asm/bootparam.h
+++ b/arch/x86/include/uapi/asm/bootparam.h
@@ -4,9 +4,6 @@
#include <asm/setup_data.h>
-/* ram_size flags */
-#define RAMDISK_IMAGE_START_MASK 0x07FF
-
/* loadflags */
#define LOADED_HIGH (1<<0)
#define KASLR_FLAG (1<<1)
@@ -37,7 +34,7 @@ struct setup_header {
__u8 setup_sects;
__u16 root_flags;
__u32 syssize;
- __u16 ram_size;
+ __u16 ram_size; /* used to control initrd, which was removed from Linux in 2025 */
__u16 vid_mode;
__u16 root_dev;
__u16 boot_flag;
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 6409e766fb17..797c3c9fc75e 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -222,8 +222,6 @@ extern int root_mountflags;
unsigned long saved_video_mode;
-#define RAMDISK_IMAGE_START_MASK 0x07FF
-
static char __initdata command_line[COMMAND_LINE_SIZE];
#ifdef CONFIG_CMDLINE_BOOL
char builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
@@ -541,9 +539,6 @@ static void __init parse_boot_params(void)
bootloader_version = bootloader_type & 0xf;
bootloader_version |= boot_params.hdr.ext_loader_ver << 4;
-#ifdef CONFIG_BLK_DEV_RAM
- rd_image_start = boot_params.hdr.ram_size & RAMDISK_IMAGE_START_MASK;
-#endif
#ifdef CONFIG_EFI
if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature,
EFI32_LOADER_SIGNATURE, 4)) {
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index f1a1f4c92ded..6320a9cb6686 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -5,9 +5,6 @@
#define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... */
-/* starting block # of image */
-extern int rd_image_start;
-
/* size of a single RAM disk */
extern unsigned long rd_size;
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index f7d53bc21e41..8e0a774a9c6f 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -17,11 +17,9 @@
static struct file *in_file, *out_file;
static loff_t in_pos, out_pos;
-int __initdata rd_image_start; /* starting block # of image */
-
static int __init ramdisk_start_setup(char *str)
{
- rd_image_start = simple_strtol(str,NULL,0);
+ /* will be removed in next commit */
return 1;
}
__setup("ramdisk_start=", ramdisk_start_setup);
@@ -60,7 +58,7 @@ identify_ramdisk_image(struct file *file, loff_t pos,
unsigned char *buf;
const char *compress_name;
unsigned long n;
- int start_block = rd_image_start;
+ int start_block = 0;
buf = kmalloc(size, GFP_KERNEL);
if (!buf)
@@ -196,7 +194,7 @@ int __init rd_load_image(char *from)
if (IS_ERR(in_file))
goto noclose_input;
- in_pos = rd_image_start * BLOCK_SIZE;
+ in_pos = 0;
nblocks = identify_ramdisk_image(in_file, in_pos, &decompressor);
if (nblocks < 0)
goto done;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 04/62] init: x86, arm, sh, sparc: remove variable rd_image_start, which controls starting block number of initrd
2025-09-13 0:37 ` [PATCH RESEND 04/62] init: x86, arm, sh, sparc: remove variable rd_image_start, which controls starting block number of initrd Askar Safin
@ 2025-09-15 11:43 ` Christophe Leroy
0 siblings, 0 replies; 95+ messages in thread
From: Christophe Leroy @ 2025-09-15 11:43 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Le 13/09/2025 à 02:37, Askar Safin a écrit :
> [Vous ne recevez pas souvent de courriers de safinaskar@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> This is preparation for initrd removal
>
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
> ---
> Documentation/arch/x86/boot.rst | 4 ++--
> arch/arm/kernel/atags_parse.c | 2 --
> arch/sh/include/asm/setup.h | 1 -
> arch/sh/kernel/head_32.S | 2 +-
> arch/sh/kernel/setup.c | 9 +--------
> arch/sparc/boot/piggyback.c | 4 ++--
> arch/sparc/kernel/head_32.S | 4 ++--
> arch/sparc/kernel/head_64.S | 6 ++++--
> arch/sparc/kernel/setup_32.c | 5 -----
> arch/sparc/kernel/setup_64.c | 5 -----
> arch/x86/boot/header.S | 2 +-
> arch/x86/include/uapi/asm/bootparam.h | 5 +----
> arch/x86/kernel/setup.c | 5 -----
> include/linux/initrd.h | 3 ---
> init/do_mounts_rd.c | 8 +++-----
> 15 files changed, 17 insertions(+), 48 deletions(-)
>
> diff --git a/Documentation/arch/x86/boot.rst b/Documentation/arch/x86/boot.rst
> index 77e6163288db..118aa7b69667 100644
> --- a/Documentation/arch/x86/boot.rst
> +++ b/Documentation/arch/x86/boot.rst
> @@ -189,7 +189,7 @@ Offset/Size Proto Name Meaning
> 01F1/1 ALL(1) setup_sects The size of the setup in sectors
> 01F2/2 ALL root_flags If set, the root is mounted readonly
> 01F4/4 2.04+(2) syssize The size of the 32-bit code in 16-byte paras
> -01F8/2 ALL ram_size DO NOT USE - for bootsect.S use only
> +01F8/2 ALL ram_size DO NOT USE - for bootsect.S use only - used to control initrd, which was removed from Linux in 2025
Is this change really needed/usefull. Here people can think it shall not
be used because it is removed in 2025. But it reality it was already
DO-NOT-USE 20 years old.
> 01FA/2 ALL vid_mode Video mode control
> 01FC/2 ALL root_dev Default root device number
> 01FE/2 ALL boot_flag 0xAA55 magic number
> @@ -308,7 +308,7 @@ Offset/size: 0x1f8/2
> Protocol: ALL
> ============ ===============
>
> - This field is obsolete.
> + This field is obsolete. Used to control initrd, which was removed from Linux in 2025.
Same comment, this field has been obsolete long before the removal of
initrd in 2025 so that new comment bring confusion.
>
> ============ ===================
> Field name: vid_mode
> diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
> index 4ec591bde3df..a3f0a4f84e04 100644
> --- a/arch/arm/kernel/atags_parse.c
> +++ b/arch/arm/kernel/atags_parse.c
> @@ -90,8 +90,6 @@ __tagtable(ATAG_VIDEOTEXT, parse_tag_videotext);
> #ifdef CONFIG_BLK_DEV_RAM
> static int __init parse_tag_ramdisk(const struct tag *tag)
> {
> - rd_image_start = tag->u.ramdisk.start;
> -
> if (tag->u.ramdisk.size)
> rd_size = tag->u.ramdisk.size;
>
> diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h
> index 84bb23a771f3..d1b97c5726e4 100644
> --- a/arch/sh/include/asm/setup.h
> +++ b/arch/sh/include/asm/setup.h
> @@ -10,7 +10,6 @@
> #define PARAM ((unsigned char *)empty_zero_page)
>
> #define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
> -#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
> #define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
> #define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
> #define INITRD_START (*(unsigned long *) (PARAM+0x010))
> diff --git a/arch/sh/kernel/head_32.S b/arch/sh/kernel/head_32.S
> index b603b7968b38..4382c0f058c8 100644
> --- a/arch/sh/kernel/head_32.S
> +++ b/arch/sh/kernel/head_32.S
> @@ -28,7 +28,7 @@
> .section .empty_zero_page, "aw"
> ENTRY(empty_zero_page)
> .long 1 /* MOUNT_ROOT_RDONLY */
> - .long 0 /* RAMDISK_FLAGS */
> + .long 0 /* RAMDISK_FLAGS - used to control initrd, which was removed from Linux in 2025 */
> .long 0x0200 /* ORIG_ROOT_DEV */
> .long 1 /* LOADER_TYPE */
> .long 0x00000000 /* INITRD_START */
> diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
> index d66f098e9e9f..50f1d39fe34f 100644
> --- a/arch/sh/kernel/setup.c
> +++ b/arch/sh/kernel/setup.c
> @@ -70,8 +70,6 @@ EXPORT_SYMBOL(sh_mv);
>
> extern int root_mountflags;
>
> -#define RAMDISK_IMAGE_START_MASK 0x07FF
> -
> static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
>
> static struct resource code_resource = {
> @@ -273,19 +271,14 @@ void __init setup_arch(char **cmdline_p)
>
> printk(KERN_NOTICE "Boot params:\n"
> "... MOUNT_ROOT_RDONLY - %08lx\n"
> - "... RAMDISK_FLAGS - %08lx\n"
> "... ORIG_ROOT_DEV - %08lx\n"
> "... LOADER_TYPE - %08lx\n"
> "... INITRD_START - %08lx\n"
> "... INITRD_SIZE - %08lx\n",
> - MOUNT_ROOT_RDONLY, RAMDISK_FLAGS,
> + MOUNT_ROOT_RDONLY,
> ORIG_ROOT_DEV, LOADER_TYPE,
> INITRD_START, INITRD_SIZE);
>
> -#ifdef CONFIG_BLK_DEV_RAM
> - rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
> -#endif
> -
> if (!MOUNT_ROOT_RDONLY)
> root_mountflags &= ~MS_RDONLY;
> setup_initial_init_mm(_text, _etext, _edata, _end);
> diff --git a/arch/sparc/boot/piggyback.c b/arch/sparc/boot/piggyback.c
> index 6d74064add0a..a9cc55254ff8 100644
> --- a/arch/sparc/boot/piggyback.c
> +++ b/arch/sparc/boot/piggyback.c
> @@ -220,8 +220,8 @@ int main(int argc,char **argv)
>
> /*
> * root_flags = 0
> - * root_dev = 1 (RAMDISK_MAJOR)
> - * ram_flags = 0
> + * root_dev = 1 (1 used to mean RAMDISK_MAJOR, i. e. initrd, which was removed from Linux)
At the end of your series RAMDISK_MAJOR still exists so this comment is
wrong.
> + * ram_flags = 0 (used to control initrd, which was removed from Linux in 2025)
> * sparc_ramdisk_image = "PAGE aligned address after _end")
> * sparc_ramdisk_size = size of image
> */
Shouldn't this block be droped entirely ?
> diff --git a/arch/sparc/kernel/head_32.S b/arch/sparc/kernel/head_32.S
> index 38345460d542..46f0e39b9037 100644
> --- a/arch/sparc/kernel/head_32.S
> +++ b/arch/sparc/kernel/head_32.S
> @@ -65,7 +65,7 @@ empty_zero_page: .skip PAGE_SIZE
> EXPORT_SYMBOL(empty_zero_page)
>
> .global root_flags
> - .global ram_flags
> + .global ram_flags /* used to control initrd, which was removed from Linux in 2025 */
Can we remove this line completely instead of adding a comment ?
> .global root_dev
> .global sparc_ramdisk_image
> .global sparc_ramdisk_size
> @@ -81,7 +81,7 @@ root_flags:
> .half 1
> root_dev:
> .half 0
> -ram_flags:
> +ram_flags: /* used to control initrd, which was removed from Linux in 2025 */
Same, why not remove this object completely ?
> .half 0
> sparc_ramdisk_image:
> .word 0
> diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S
> index cf0549134234..4480c0532fe9 100644
> --- a/arch/sparc/kernel/head_64.S
> +++ b/arch/sparc/kernel/head_64.S
> @@ -52,7 +52,9 @@ stext:
> * Fields should be kept upward compatible and whenever any change is made,
> * HdrS version should be incremented.
> */
> - .global root_flags, ram_flags, root_dev
> + .global root_flags
> + .global ram_flags /* used to control initrd, which was removed from Linux in 2025 */
Same, can you remove them ?
Such comments in the code are generaly pointless, you can recover
history with 'git log'.
> + .global root_dev
> .global sparc_ramdisk_image, sparc_ramdisk_size
> .global sparc_ramdisk_image64
>
> @@ -71,7 +73,7 @@ root_flags:
> .half 1
> root_dev:
> .half 0
> -ram_flags:
> +ram_flags: /* used to control initrd, which was removed from Linux in 2025 */
Same, remove.
> .half 0
> sparc_ramdisk_image:
> .word 0
> diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c
> index eb60be31127f..fb46fb3acf54 100644
> --- a/arch/sparc/kernel/setup_32.c
> +++ b/arch/sparc/kernel/setup_32.c
> @@ -170,8 +170,6 @@ static void __init boot_flags_init(char *commands)
>
> extern unsigned short root_flags;
> extern unsigned short root_dev;
> -extern unsigned short ram_flags;
> -#define RAMDISK_IMAGE_START_MASK 0x07FF
>
> extern int root_mountflags;
>
> @@ -335,9 +333,6 @@ void __init setup_arch(char **cmdline_p)
> if (!root_flags)
> root_mountflags &= ~MS_RDONLY;
> ROOT_DEV = old_decode_dev(root_dev);
> -#ifdef CONFIG_BLK_DEV_RAM
> - rd_image_start = ram_flags & RAMDISK_IMAGE_START_MASK;
> -#endif
>
> prom_setsync(prom_sync_me);
>
> diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c
> index f728f1b00aca..79b56613c6d8 100644
> --- a/arch/sparc/kernel/setup_64.c
> +++ b/arch/sparc/kernel/setup_64.c
> @@ -143,8 +143,6 @@ static void __init boot_flags_init(char *commands)
>
> extern unsigned short root_flags;
> extern unsigned short root_dev;
> -extern unsigned short ram_flags;
> -#define RAMDISK_IMAGE_START_MASK 0x07FF
>
> extern int root_mountflags;
>
> @@ -640,9 +638,6 @@ void __init setup_arch(char **cmdline_p)
> if (!root_flags)
> root_mountflags &= ~MS_RDONLY;
> ROOT_DEV = old_decode_dev(root_dev);
> -#ifdef CONFIG_BLK_DEV_RAM
> - rd_image_start = ram_flags & RAMDISK_IMAGE_START_MASK;
> -#endif
>
> #ifdef CONFIG_IP_PNP
> if (!ic_set_manually) {
> diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
> index 9bea5a1e2c52..0ced2e9f100e 100644
> --- a/arch/x86/boot/header.S
> +++ b/arch/x86/boot/header.S
> @@ -235,7 +235,7 @@ hdr:
> .byte setup_sects - 1
> root_flags: .word ROOT_RDONLY
> syssize: .long ZO__edata / 16
> -ram_size: .word 0 /* Obsolete */
> +ram_size: .word 0 /* Used to control initrd, which was removed from Linux in 2025 */
Same, just remove, or make 'reserved' if you need to keep the space.
> vid_mode: .word SVGA_MODE
> root_dev: .word 0 /* Default to major/minor 0/0 */
> boot_flag: .word 0xAA55
> diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
> index f53dd3f319ba..bf56549f79bb 100644
> --- a/arch/x86/include/uapi/asm/bootparam.h
> +++ b/arch/x86/include/uapi/asm/bootparam.h
> @@ -4,9 +4,6 @@
>
> #include <asm/setup_data.h>
>
> -/* ram_size flags */
> -#define RAMDISK_IMAGE_START_MASK 0x07FF
> -
> /* loadflags */
> #define LOADED_HIGH (1<<0)
> #define KASLR_FLAG (1<<1)
> @@ -37,7 +34,7 @@ struct setup_header {
> __u8 setup_sects;
> __u16 root_flags;
> __u32 syssize;
> - __u16 ram_size;
> + __u16 ram_size; /* used to control initrd, which was removed from Linux in 2025 */
Rename it to 'reserved'.
> __u16 vid_mode;
> __u16 root_dev;
> __u16 boot_flag;
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 6409e766fb17..797c3c9fc75e 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -222,8 +222,6 @@ extern int root_mountflags;
>
> unsigned long saved_video_mode;
>
> -#define RAMDISK_IMAGE_START_MASK 0x07FF
> -
> static char __initdata command_line[COMMAND_LINE_SIZE];
> #ifdef CONFIG_CMDLINE_BOOL
> char builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
> @@ -541,9 +539,6 @@ static void __init parse_boot_params(void)
> bootloader_version = bootloader_type & 0xf;
> bootloader_version |= boot_params.hdr.ext_loader_ver << 4;
>
> -#ifdef CONFIG_BLK_DEV_RAM
> - rd_image_start = boot_params.hdr.ram_size & RAMDISK_IMAGE_START_MASK;
> -#endif
> #ifdef CONFIG_EFI
> if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature,
> EFI32_LOADER_SIGNATURE, 4)) {
> diff --git a/include/linux/initrd.h b/include/linux/initrd.h
> index f1a1f4c92ded..6320a9cb6686 100644
> --- a/include/linux/initrd.h
> +++ b/include/linux/initrd.h
> @@ -5,9 +5,6 @@
>
> #define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... */
>
> -/* starting block # of image */
> -extern int rd_image_start;
> -
> /* size of a single RAM disk */
> extern unsigned long rd_size;
>
> diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
> index f7d53bc21e41..8e0a774a9c6f 100644
> --- a/init/do_mounts_rd.c
> +++ b/init/do_mounts_rd.c
> @@ -17,11 +17,9 @@
> static struct file *in_file, *out_file;
> static loff_t in_pos, out_pos;
>
> -int __initdata rd_image_start; /* starting block # of image */
Why do you need to change this really ? In any case this entire file
goes away in a later patch so you shouldn't bother to update that.
> -
> static int __init ramdisk_start_setup(char *str)
> {
> - rd_image_start = simple_strtol(str,NULL,0);
> + /* will be removed in next commit */
Useless comment, don't add such burden.
> return 1;
> }
> __setup("ramdisk_start=", ramdisk_start_setup);
> @@ -60,7 +58,7 @@ identify_ramdisk_image(struct file *file, loff_t pos,
> unsigned char *buf;
> const char *compress_name;
> unsigned long n;
> - int start_block = rd_image_start;
> + int start_block = 0;
Don't change, it is removed later.
>
> buf = kmalloc(size, GFP_KERNEL);
> if (!buf)
> @@ -196,7 +194,7 @@ int __init rd_load_image(char *from)
> if (IS_ERR(in_file))
> goto noclose_input;
>
> - in_pos = rd_image_start * BLOCK_SIZE;
> + in_pos = 0;
Same
> nblocks = identify_ramdisk_image(in_file, in_pos, &decompressor);
> if (nblocks < 0)
> goto done;
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 05/62] init: remove "ramdisk_start" command line parameter, which controls starting block number of initrd
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (3 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 04/62] init: x86, arm, sh, sparc: remove variable rd_image_start, which controls starting block number of initrd Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-15 11:48 ` Christophe Leroy
2025-09-13 0:37 ` [PATCH RESEND 06/62] arm: init: remove special logic for setting brd.rd_size Askar Safin
` (63 subsequent siblings)
68 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is preparation for initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/admin-guide/blockdev/ramdisk.rst | 3 +--
Documentation/admin-guide/kernel-parameters.txt | 2 --
init/do_mounts_rd.c | 7 -------
3 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/Documentation/admin-guide/blockdev/ramdisk.rst b/Documentation/admin-guide/blockdev/ramdisk.rst
index 9ce6101e8dd9..e57c61108dbc 100644
--- a/Documentation/admin-guide/blockdev/ramdisk.rst
+++ b/Documentation/admin-guide/blockdev/ramdisk.rst
@@ -74,12 +74,11 @@ arch/x86/boot/Makefile.
Some of the kernel command line boot options that may apply here are::
- ramdisk_start=N
ramdisk_size=M
If you make a boot disk that has LILO, then for the above, you would use::
- append = "ramdisk_start=N ramdisk_size=M"
+ append = "ramdisk_size=M"
4) An Example of Creating a Compressed RAM Disk
-----------------------------------------------
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index f940c1184912..07e8878f1e13 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5285,8 +5285,6 @@
ramdisk_size= [RAM] Sizes of RAM disks in kilobytes
See Documentation/admin-guide/blockdev/ramdisk.rst.
- ramdisk_start= [RAM] RAM disk image start address
-
random.trust_cpu=off
[KNL,EARLY] Disable trusting the use of the CPU's
random number generator (if available) to
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index 8e0a774a9c6f..864fa88d9f89 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -17,13 +17,6 @@
static struct file *in_file, *out_file;
static loff_t in_pos, out_pos;
-static int __init ramdisk_start_setup(char *str)
-{
- /* will be removed in next commit */
- return 1;
-}
-__setup("ramdisk_start=", ramdisk_start_setup);
-
static int __init crd_load(decompress_fn deco);
/*
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 05/62] init: remove "ramdisk_start" command line parameter, which controls starting block number of initrd
2025-09-13 0:37 ` [PATCH RESEND 05/62] init: remove "ramdisk_start" command line parameter, " Askar Safin
@ 2025-09-15 11:48 ` Christophe Leroy
0 siblings, 0 replies; 95+ messages in thread
From: Christophe Leroy @ 2025-09-15 11:48 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Have a simpler subject,
Le 13/09/2025 à 02:37, Askar Safin a écrit :
> [Vous ne recevez pas souvent de courriers de safinaskar@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> This is preparation for initrd removal
and make a more interesting message.
For me it would make more sense to remove ramdisk_start and ramdisk_size
at the same time.
Christophe
>
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
> ---
> Documentation/admin-guide/blockdev/ramdisk.rst | 3 +--
> Documentation/admin-guide/kernel-parameters.txt | 2 --
> init/do_mounts_rd.c | 7 -------
> 3 files changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/Documentation/admin-guide/blockdev/ramdisk.rst b/Documentation/admin-guide/blockdev/ramdisk.rst
> index 9ce6101e8dd9..e57c61108dbc 100644
> --- a/Documentation/admin-guide/blockdev/ramdisk.rst
> +++ b/Documentation/admin-guide/blockdev/ramdisk.rst
> @@ -74,12 +74,11 @@ arch/x86/boot/Makefile.
>
> Some of the kernel command line boot options that may apply here are::
>
> - ramdisk_start=N
> ramdisk_size=M
>
> If you make a boot disk that has LILO, then for the above, you would use::
>
> - append = "ramdisk_start=N ramdisk_size=M"
> + append = "ramdisk_size=M"
>
> 4) An Example of Creating a Compressed RAM Disk
> -----------------------------------------------
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index f940c1184912..07e8878f1e13 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -5285,8 +5285,6 @@
> ramdisk_size= [RAM] Sizes of RAM disks in kilobytes
> See Documentation/admin-guide/blockdev/ramdisk.rst.
>
> - ramdisk_start= [RAM] RAM disk image start address
> -
> random.trust_cpu=off
> [KNL,EARLY] Disable trusting the use of the CPU's
> random number generator (if available) to
> diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
> index 8e0a774a9c6f..864fa88d9f89 100644
> --- a/init/do_mounts_rd.c
> +++ b/init/do_mounts_rd.c
> @@ -17,13 +17,6 @@
> static struct file *in_file, *out_file;
> static loff_t in_pos, out_pos;
>
> -static int __init ramdisk_start_setup(char *str)
> -{
> - /* will be removed in next commit */
> - return 1;
> -}
> -__setup("ramdisk_start=", ramdisk_start_setup);
> -
> static int __init crd_load(decompress_fn deco);
>
> /*
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 06/62] arm: init: remove special logic for setting brd.rd_size
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (4 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 05/62] init: remove "ramdisk_start" command line parameter, " Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-15 11:53 ` Christophe Leroy
2025-09-15 11:57 ` Christophe Leroy
2025-09-13 0:37 ` [PATCH RESEND 07/62] arm: init: remove ATAG_RAMDISK Askar Safin
` (62 subsequent siblings)
68 siblings, 2 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
There is no any reason for having special mechanism
for setting ramdisk size.
Also this allows us to change rd_size variable to static
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/kernel/atags_parse.c | 12 ------------
drivers/block/brd.c | 8 ++++----
include/linux/initrd.h | 3 ---
3 files changed, 4 insertions(+), 19 deletions(-)
diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
index a3f0a4f84e04..615d9e83c9b5 100644
--- a/arch/arm/kernel/atags_parse.c
+++ b/arch/arm/kernel/atags_parse.c
@@ -87,18 +87,6 @@ static int __init parse_tag_videotext(const struct tag *tag)
__tagtable(ATAG_VIDEOTEXT, parse_tag_videotext);
#endif
-#ifdef CONFIG_BLK_DEV_RAM
-static int __init parse_tag_ramdisk(const struct tag *tag)
-{
- if (tag->u.ramdisk.size)
- rd_size = tag->u.ramdisk.size;
-
- return 0;
-}
-
-__tagtable(ATAG_RAMDISK, parse_tag_ramdisk);
-#endif
-
static int __init parse_tag_serialnr(const struct tag *tag)
{
system_serial_low = tag->u.serialnr.low;
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 0c2eabe14af3..72f02d2b8a99 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -27,6 +27,10 @@
#include <linux/uaccess.h>
+static unsigned long rd_size = CONFIG_BLK_DEV_RAM_SIZE;
+module_param(rd_size, ulong, 0444);
+MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes.");
+
/*
* Each block ramdisk device has a xarray brd_pages of pages that stores
* the pages containing the block device's contents.
@@ -209,10 +213,6 @@ static int rd_nr = CONFIG_BLK_DEV_RAM_COUNT;
module_param(rd_nr, int, 0444);
MODULE_PARM_DESC(rd_nr, "Maximum number of brd devices");
-unsigned long rd_size = CONFIG_BLK_DEV_RAM_SIZE;
-module_param(rd_size, ulong, 0444);
-MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes.");
-
static int max_part = 1;
module_param(max_part, int, 0444);
MODULE_PARM_DESC(max_part, "Num Minors to reserve between devices");
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index 6320a9cb6686..b42235c21444 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -5,9 +5,6 @@
#define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... */
-/* size of a single RAM disk */
-extern unsigned long rd_size;
-
/* 1 if it is not an error if initrd_start < memory_start */
extern int initrd_below_start_ok;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 06/62] arm: init: remove special logic for setting brd.rd_size
2025-09-13 0:37 ` [PATCH RESEND 06/62] arm: init: remove special logic for setting brd.rd_size Askar Safin
@ 2025-09-15 11:53 ` Christophe Leroy
2025-09-15 11:57 ` Christophe Leroy
1 sibling, 0 replies; 95+ messages in thread
From: Christophe Leroy @ 2025-09-15 11:53 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Le 13/09/2025 à 02:37, Askar Safin a écrit :
> [Vous ne recevez pas souvent de courriers de safinaskar@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> There is no any reason for having special mechanism
> for setting ramdisk size.
That's you opinion.
You should explain why.
>
> Also this allows us to change rd_size variable to static
>
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
> ---
> arch/arm/kernel/atags_parse.c | 12 ------------
> drivers/block/brd.c | 8 ++++----
> include/linux/initrd.h | 3 ---
What about:
arch/mips/kernel/setup.c:early_param("rd_size", rd_size_early);
Is it unrelated ?
> 3 files changed, 4 insertions(+), 19 deletions(-)
>
> diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
> index a3f0a4f84e04..615d9e83c9b5 100644
> --- a/arch/arm/kernel/atags_parse.c
> +++ b/arch/arm/kernel/atags_parse.c
> @@ -87,18 +87,6 @@ static int __init parse_tag_videotext(const struct tag *tag)
> __tagtable(ATAG_VIDEOTEXT, parse_tag_videotext);
> #endif
>
> -#ifdef CONFIG_BLK_DEV_RAM
> -static int __init parse_tag_ramdisk(const struct tag *tag)
> -{
> - if (tag->u.ramdisk.size)
> - rd_size = tag->u.ramdisk.size;
> -
> - return 0;
> -}
> -
> -__tagtable(ATAG_RAMDISK, parse_tag_ramdisk);
> -#endif
> -
> static int __init parse_tag_serialnr(const struct tag *tag)
> {
> system_serial_low = tag->u.serialnr.low;
> diff --git a/drivers/block/brd.c b/drivers/block/brd.c
> index 0c2eabe14af3..72f02d2b8a99 100644
> --- a/drivers/block/brd.c
> +++ b/drivers/block/brd.c
> @@ -27,6 +27,10 @@
>
> #include <linux/uaccess.h>
>
> +static unsigned long rd_size = CONFIG_BLK_DEV_RAM_SIZE;
> +module_param(rd_size, ulong, 0444);
> +MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes.");
> +
> /*
> * Each block ramdisk device has a xarray brd_pages of pages that stores
> * the pages containing the block device's contents.
> @@ -209,10 +213,6 @@ static int rd_nr = CONFIG_BLK_DEV_RAM_COUNT;
> module_param(rd_nr, int, 0444);
> MODULE_PARM_DESC(rd_nr, "Maximum number of brd devices");
>
> -unsigned long rd_size = CONFIG_BLK_DEV_RAM_SIZE;
> -module_param(rd_size, ulong, 0444);
> -MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes.");
> -
> static int max_part = 1;
> module_param(max_part, int, 0444);
> MODULE_PARM_DESC(max_part, "Num Minors to reserve between devices");
> diff --git a/include/linux/initrd.h b/include/linux/initrd.h
> index 6320a9cb6686..b42235c21444 100644
> --- a/include/linux/initrd.h
> +++ b/include/linux/initrd.h
> @@ -5,9 +5,6 @@
>
> #define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... */
>
> -/* size of a single RAM disk */
> -extern unsigned long rd_size;
> -
> /* 1 if it is not an error if initrd_start < memory_start */
> extern int initrd_below_start_ok;
>
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 06/62] arm: init: remove special logic for setting brd.rd_size
2025-09-13 0:37 ` [PATCH RESEND 06/62] arm: init: remove special logic for setting brd.rd_size Askar Safin
2025-09-15 11:53 ` Christophe Leroy
@ 2025-09-15 11:57 ` Christophe Leroy
1 sibling, 0 replies; 95+ messages in thread
From: Christophe Leroy @ 2025-09-15 11:57 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Le 13/09/2025 à 02:37, Askar Safin a écrit :
> [Vous ne recevez pas souvent de courriers de safinaskar@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> There is no any reason for having special mechanism
> for setting ramdisk size.
>
> Also this allows us to change rd_size variable to static
Can you squash patches 6 to 9 all together ?
>
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
> ---
> arch/arm/kernel/atags_parse.c | 12 ------------
> drivers/block/brd.c | 8 ++++----
> include/linux/initrd.h | 3 ---
> 3 files changed, 4 insertions(+), 19 deletions(-)
>
> diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
> index a3f0a4f84e04..615d9e83c9b5 100644
> --- a/arch/arm/kernel/atags_parse.c
> +++ b/arch/arm/kernel/atags_parse.c
> @@ -87,18 +87,6 @@ static int __init parse_tag_videotext(const struct tag *tag)
> __tagtable(ATAG_VIDEOTEXT, parse_tag_videotext);
> #endif
>
> -#ifdef CONFIG_BLK_DEV_RAM
> -static int __init parse_tag_ramdisk(const struct tag *tag)
> -{
> - if (tag->u.ramdisk.size)
> - rd_size = tag->u.ramdisk.size;
> -
> - return 0;
> -}
> -
> -__tagtable(ATAG_RAMDISK, parse_tag_ramdisk);
> -#endif
> -
> static int __init parse_tag_serialnr(const struct tag *tag)
> {
> system_serial_low = tag->u.serialnr.low;
> diff --git a/drivers/block/brd.c b/drivers/block/brd.c
> index 0c2eabe14af3..72f02d2b8a99 100644
> --- a/drivers/block/brd.c
> +++ b/drivers/block/brd.c
> @@ -27,6 +27,10 @@
>
> #include <linux/uaccess.h>
>
> +static unsigned long rd_size = CONFIG_BLK_DEV_RAM_SIZE;
> +module_param(rd_size, ulong, 0444);
> +MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes.");
> +
> /*
> * Each block ramdisk device has a xarray brd_pages of pages that stores
> * the pages containing the block device's contents.
> @@ -209,10 +213,6 @@ static int rd_nr = CONFIG_BLK_DEV_RAM_COUNT;
> module_param(rd_nr, int, 0444);
> MODULE_PARM_DESC(rd_nr, "Maximum number of brd devices");
>
> -unsigned long rd_size = CONFIG_BLK_DEV_RAM_SIZE;
> -module_param(rd_size, ulong, 0444);
> -MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes.");
> -
> static int max_part = 1;
> module_param(max_part, int, 0444);
> MODULE_PARM_DESC(max_part, "Num Minors to reserve between devices");
> diff --git a/include/linux/initrd.h b/include/linux/initrd.h
> index 6320a9cb6686..b42235c21444 100644
> --- a/include/linux/initrd.h
> +++ b/include/linux/initrd.h
> @@ -5,9 +5,6 @@
>
> #define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... */
>
> -/* size of a single RAM disk */
> -extern unsigned long rd_size;
> -
> /* 1 if it is not an error if initrd_start < memory_start */
> extern int initrd_below_start_ok;
>
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 07/62] arm: init: remove ATAG_RAMDISK
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (5 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 06/62] arm: init: remove special logic for setting brd.rd_size Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 08/62] arm: init: remove FLAG_RDLOAD and FLAG_RDPROMPT Askar Safin
` (61 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Previous commit removed last reference to ATAG_RAMDISK,
so let's remove it
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/Kconfig | 2 +-
arch/arm/include/uapi/asm/setup.h | 10 ----------
arch/arm/kernel/atags_compat.c | 8 --------
3 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b1f3df39ed40..afc161d76c5f 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1479,7 +1479,7 @@ config ARM_ATAG_DTB_COMPAT
depends on ARM_APPENDED_DTB
help
Some old bootloaders can't be updated to a DTB capable one, yet
- they provide ATAGs with memory configuration, the ramdisk address,
+ they provide ATAGs with memory configuration,
the kernel cmdline string, etc. Such information is dynamically
provided by the bootloader and can't always be stored in a static
DTB. To allow a device tree enabled kernel to be used with such
diff --git a/arch/arm/include/uapi/asm/setup.h b/arch/arm/include/uapi/asm/setup.h
index 8e50e034fec7..3a70890ce80f 100644
--- a/arch/arm/include/uapi/asm/setup.h
+++ b/arch/arm/include/uapi/asm/setup.h
@@ -59,15 +59,6 @@ struct tag_videotext {
__u16 video_points;
};
-/* describes how the ramdisk will be used in kernel */
-#define ATAG_RAMDISK 0x54410004
-
-struct tag_ramdisk {
- __u32 flags; /* bit 0 = load, bit 1 = prompt */
- __u32 size; /* decompressed ramdisk size in _kilo_ bytes */
- __u32 start; /* starting block of floppy-based RAM disk image */
-};
-
/* describes where the compressed ramdisk image lives (virtual address) */
/*
* this one accidentally used virtual addresses - as such,
@@ -150,7 +141,6 @@ struct tag {
struct tag_core core;
struct tag_mem32 mem;
struct tag_videotext videotext;
- struct tag_ramdisk ramdisk;
struct tag_initrd initrd;
struct tag_serialnr serialnr;
struct tag_revision revision;
diff --git a/arch/arm/kernel/atags_compat.c b/arch/arm/kernel/atags_compat.c
index 10da11c212cc..b9747061fa97 100644
--- a/arch/arm/kernel/atags_compat.c
+++ b/arch/arm/kernel/atags_compat.c
@@ -122,14 +122,6 @@ static void __init build_tag_list(struct param_struct *params, void *taglist)
tag->u.core.pagesize = params->u1.s.page_size;
tag->u.core.rootdev = params->u1.s.rootdev;
- tag = tag_next(tag);
- tag->hdr.tag = ATAG_RAMDISK;
- tag->hdr.size = tag_size(tag_ramdisk);
- tag->u.ramdisk.flags = (params->u1.s.flags & FLAG_RDLOAD ? 1 : 0) |
- (params->u1.s.flags & FLAG_RDPROMPT ? 2 : 0);
- tag->u.ramdisk.size = params->u1.s.ramdisk_size;
- tag->u.ramdisk.start = params->u1.s.rd_start;
-
tag = tag_next(tag);
tag->hdr.tag = ATAG_INITRD;
tag->hdr.size = tag_size(tag_initrd);
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 08/62] arm: init: remove FLAG_RDLOAD and FLAG_RDPROMPT
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (6 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 07/62] arm: init: remove ATAG_RAMDISK Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-15 11:54 ` Christophe Leroy
2025-09-13 0:37 ` [PATCH RESEND 09/62] arm: init: document rd_start (in param_struct) as obsolete Askar Safin
` (60 subsequent siblings)
68 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
They are unused since previous commit
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/arch/arm/setup.rst | 4 ++--
arch/arm/kernel/atags_compat.c | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/Documentation/arch/arm/setup.rst b/Documentation/arch/arm/setup.rst
index 8e12ef3fb9a7..be77d4b2aac1 100644
--- a/Documentation/arch/arm/setup.rst
+++ b/Documentation/arch/arm/setup.rst
@@ -35,8 +35,8 @@ below:
===== ========================
bit 0 1 = mount root read only
bit 1 unused
- bit 2 0 = load ramdisk
- bit 3 0 = prompt for ramdisk
+ bit 2 unused
+ bit 3 unused
===== ========================
rootdev
diff --git a/arch/arm/kernel/atags_compat.c b/arch/arm/kernel/atags_compat.c
index b9747061fa97..8d04edee3066 100644
--- a/arch/arm/kernel/atags_compat.c
+++ b/arch/arm/kernel/atags_compat.c
@@ -44,8 +44,6 @@ struct param_struct {
unsigned long ramdisk_size; /* 8 */
unsigned long flags; /* 12 */
#define FLAG_READONLY 1
-#define FLAG_RDLOAD 4
-#define FLAG_RDPROMPT 8
unsigned long rootdev; /* 16 */
unsigned long video_num_cols; /* 20 */
unsigned long video_num_rows; /* 24 */
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 08/62] arm: init: remove FLAG_RDLOAD and FLAG_RDPROMPT
2025-09-13 0:37 ` [PATCH RESEND 08/62] arm: init: remove FLAG_RDLOAD and FLAG_RDPROMPT Askar Safin
@ 2025-09-15 11:54 ` Christophe Leroy
0 siblings, 0 replies; 95+ messages in thread
From: Christophe Leroy @ 2025-09-15 11:54 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Le 13/09/2025 à 02:37, Askar Safin a écrit :
> [Vous ne recevez pas souvent de courriers de safinaskar@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> They are unused since previous commit
Since which commit ?
>
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
> ---
> Documentation/arch/arm/setup.rst | 4 ++--
> arch/arm/kernel/atags_compat.c | 2 --
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/arch/arm/setup.rst b/Documentation/arch/arm/setup.rst
> index 8e12ef3fb9a7..be77d4b2aac1 100644
> --- a/Documentation/arch/arm/setup.rst
> +++ b/Documentation/arch/arm/setup.rst
> @@ -35,8 +35,8 @@ below:
> ===== ========================
> bit 0 1 = mount root read only
> bit 1 unused
> - bit 2 0 = load ramdisk
> - bit 3 0 = prompt for ramdisk
> + bit 2 unused
> + bit 3 unused
> ===== ========================
>
> rootdev
> diff --git a/arch/arm/kernel/atags_compat.c b/arch/arm/kernel/atags_compat.c
> index b9747061fa97..8d04edee3066 100644
> --- a/arch/arm/kernel/atags_compat.c
> +++ b/arch/arm/kernel/atags_compat.c
> @@ -44,8 +44,6 @@ struct param_struct {
> unsigned long ramdisk_size; /* 8 */
> unsigned long flags; /* 12 */
> #define FLAG_READONLY 1
> -#define FLAG_RDLOAD 4
> -#define FLAG_RDPROMPT 8
> unsigned long rootdev; /* 16 */
> unsigned long video_num_cols; /* 20 */
> unsigned long video_num_rows; /* 24 */
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 09/62] arm: init: document rd_start (in param_struct) as obsolete
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (7 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 08/62] arm: init: remove FLAG_RDLOAD and FLAG_RDPROMPT Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 10/62] initrd: remove initrd (initial RAM disk) support Askar Safin
` (59 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
It is unused now
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/arch/arm/setup.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/arch/arm/setup.rst b/Documentation/arch/arm/setup.rst
index be77d4b2aac1..01257f30d489 100644
--- a/Documentation/arch/arm/setup.rst
+++ b/Documentation/arch/arm/setup.rst
@@ -86,7 +86,7 @@ below:
initial ramdisk.
rd_start
- Start address in sectors of the ramdisk image on a floppy disk.
+ This is now obsolete, and should not be used.
system_rev
system revision number.
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 10/62] initrd: remove initrd (initial RAM disk) support
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (8 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 09/62] arm: init: document rd_start (in param_struct) as obsolete Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 11/62] init, efi: remove "noinitrd" command line parameter Askar Safin
` (58 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Initrd was deprecated in 2020.
Initramfs and (non-initial) RAM disks still work.
Both built-in and bootloader-supplied initramfs still work.
Also remove Documentation/admin-guide/initrd.rst . It contains
paragraph about initramfs, but initramfs already covered in
Documentation/filesystems/ramfs-rootfs-initramfs.rst
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/admin-guide/devices.txt | 6 -
Documentation/admin-guide/index.rst | 1 -
Documentation/admin-guide/initrd.rst | 383 ------------------
Documentation/admin-guide/nfs/nfsroot.rst | 4 +-
Documentation/power/swsusp-dmcrypt.rst | 2 +-
fs/init.c | 14 -
include/linux/init_syscalls.h | 1 -
include/linux/initrd.h | 2 -
init/Kconfig | 2 +-
init/Makefile | 1 -
init/do_mounts.c | 6 +-
init/do_mounts.h | 22 -
init/do_mounts_initrd.c | 83 ----
init/do_mounts_rd.c | 318 ---------------
init/initramfs.c | 31 +-
.../ktest/examples/bootconfigs/tracing.bconf | 3 -
16 files changed, 6 insertions(+), 873 deletions(-)
delete mode 100644 Documentation/admin-guide/initrd.rst
delete mode 100644 init/do_mounts_rd.c
diff --git a/Documentation/admin-guide/devices.txt b/Documentation/admin-guide/devices.txt
index 94c98be1329a..27835389ca49 100644
--- a/Documentation/admin-guide/devices.txt
+++ b/Documentation/admin-guide/devices.txt
@@ -21,12 +21,6 @@
0 = /dev/ram0 First RAM disk
1 = /dev/ram1 Second RAM disk
...
- 250 = /dev/initrd Initial RAM disk
-
- Older kernels had /dev/ramdisk (1, 1) here.
- /dev/initrd refers to a RAM disk which was preloaded
- by the boot loader; newer kernels use /dev/ram0 for
- the initrd.
2 char Pseudo-TTY masters
0 = /dev/ptyp0 First PTY master
diff --git a/Documentation/admin-guide/index.rst b/Documentation/admin-guide/index.rst
index 259d79fbeb94..b3b2628ea515 100644
--- a/Documentation/admin-guide/index.rst
+++ b/Documentation/admin-guide/index.rst
@@ -51,7 +51,6 @@ Booting the kernel
bootconfig
kernel-parameters
efi-stub
- initrd
Tracking down and identifying problems
diff --git a/Documentation/admin-guide/initrd.rst b/Documentation/admin-guide/initrd.rst
deleted file mode 100644
index 67bbad8806e8..000000000000
--- a/Documentation/admin-guide/initrd.rst
+++ /dev/null
@@ -1,383 +0,0 @@
-Using the initial RAM disk (initrd)
-===================================
-
-Written 1996,2000 by Werner Almesberger <werner.almesberger@epfl.ch> and
-Hans Lermen <lermen@fgan.de>
-
-
-initrd provides the capability to load a RAM disk by the boot loader.
-This RAM disk can then be mounted as the root file system and programs
-can be run from it. Afterwards, a new root file system can be mounted
-from a different device. The previous root (from initrd) is then moved
-to a directory and can be subsequently unmounted.
-
-initrd is mainly designed to allow system startup to occur in two phases,
-where the kernel comes up with a minimum set of compiled-in drivers, and
-where additional modules are loaded from initrd.
-
-This document gives a brief overview of the use of initrd. A more detailed
-discussion of the boot process can be found in [#f1]_.
-
-
-Operation
----------
-
-When using initrd, the system typically boots as follows:
-
- 1) the boot loader loads the kernel and the initial RAM disk
- 2) the kernel converts initrd into a "normal" RAM disk and
- frees the memory used by initrd
- 3) if the root device is not ``/dev/ram0``, the old (deprecated)
- change_root procedure is followed. see the "Obsolete root change
- mechanism" section below.
- 4) root device is mounted. if it is ``/dev/ram0``, the initrd image is
- then mounted as root
- 5) /sbin/init is executed (this can be any valid executable, including
- shell scripts; it is run with uid 0 and can do basically everything
- init can do).
- 6) init mounts the "real" root file system
- 7) init places the root file system at the root directory using the
- pivot_root system call
- 8) init execs the ``/sbin/init`` on the new root filesystem, performing
- the usual boot sequence
- 9) the initrd file system is removed
-
-Note that changing the root directory does not involve unmounting it.
-It is therefore possible to leave processes running on initrd during that
-procedure. Also note that file systems mounted under initrd continue to
-be accessible.
-
-
-Boot command-line options
--------------------------
-
-initrd adds the following new options::
-
- initrd=<path> (e.g. LOADLIN)
-
- Loads the specified file as the initial RAM disk. When using LILO, you
- have to specify the RAM disk image file in /etc/lilo.conf, using the
- INITRD configuration variable.
-
- noinitrd
-
- initrd data is preserved but it is not converted to a RAM disk and
- the "normal" root file system is mounted. initrd data can be read
- from /dev/initrd. Note that the data in initrd can have any structure
- in this case and doesn't necessarily have to be a file system image.
- This option is used mainly for debugging.
-
- Note: /dev/initrd is read-only and it can only be used once. As soon
- as the last process has closed it, all data is freed and /dev/initrd
- can't be opened anymore.
-
- root=/dev/ram0
-
- initrd is mounted as root, and the normal boot procedure is followed,
- with the RAM disk mounted as root.
-
-Compressed cpio images
-----------------------
-
-Recent kernels have support for populating a ramdisk from a compressed cpio
-archive. On such systems, the creation of a ramdisk image doesn't need to
-involve special block devices or loopbacks; you merely create a directory on
-disk with the desired initrd content, cd to that directory, and run (as an
-example)::
-
- find . | cpio --quiet -H newc -o | gzip -9 -n > /boot/imagefile.img
-
-Examining the contents of an existing image file is just as simple::
-
- mkdir /tmp/imagefile
- cd /tmp/imagefile
- gzip -cd /boot/imagefile.img | cpio -imd --quiet
-
-Installation
-------------
-
-First, a directory for the initrd file system has to be created on the
-"normal" root file system, e.g.::
-
- # mkdir /initrd
-
-The name is not relevant. More details can be found on the
-:manpage:`pivot_root(2)` man page.
-
-If the root file system is created during the boot procedure (i.e. if
-you're building an install floppy), the root file system creation
-procedure should create the ``/initrd`` directory.
-
-If initrd will not be mounted in some cases, its content is still
-accessible if the following device has been created::
-
- # mknod /dev/initrd b 1 250
- # chmod 400 /dev/initrd
-
-Second, the kernel has to be compiled with RAM disk support and with
-support for the initial RAM disk enabled. Also, at least all components
-needed to execute programs from initrd (e.g. executable format and file
-system) must be compiled into the kernel.
-
-Third, you have to create the RAM disk image. This is done by creating a
-file system on a block device, copying files to it as needed, and then
-copying the content of the block device to the initrd file. With recent
-kernels, at least three types of devices are suitable for that:
-
- - a floppy disk (works everywhere but it's painfully slow)
- - a RAM disk (fast, but allocates physical memory)
- - a loopback device (the most elegant solution)
-
-We'll describe the loopback device method:
-
- 1) make sure loopback block devices are configured into the kernel
- 2) create an empty file system of the appropriate size, e.g.::
-
- # dd if=/dev/zero of=initrd bs=300k count=1
- # mke2fs -F -m0 initrd
-
- (if space is critical, you may want to use the Minix FS instead of Ext2)
- 3) mount the file system, e.g.::
-
- # mount -t ext2 -o loop initrd /mnt
-
- 4) create the console device::
-
- # mkdir /mnt/dev
- # mknod /mnt/dev/console c 5 1
-
- 5) copy all the files that are needed to properly use the initrd
- environment. Don't forget the most important file, ``/sbin/init``
-
- .. note:: ``/sbin/init`` permissions must include "x" (execute).
-
- 6) correct operation the initrd environment can frequently be tested
- even without rebooting with the command::
-
- # chroot /mnt /sbin/init
-
- This is of course limited to initrds that do not interfere with the
- general system state (e.g. by reconfiguring network interfaces,
- overwriting mounted devices, trying to start already running demons,
- etc. Note however that it is usually possible to use pivot_root in
- such a chroot'ed initrd environment.)
- 7) unmount the file system::
-
- # umount /mnt
-
- 8) the initrd is now in the file "initrd". Optionally, it can now be
- compressed::
-
- # gzip -9 initrd
-
-For experimenting with initrd, you may want to take a rescue floppy and
-only add a symbolic link from ``/sbin/init`` to ``/bin/sh``. Alternatively, you
-can try the experimental newlib environment [#f2]_ to create a small
-initrd.
-
-Finally, you have to boot the kernel and load initrd. Almost all Linux
-boot loaders support initrd. Since the boot process is still compatible
-with an older mechanism, the following boot command line parameters
-have to be given::
-
- root=/dev/ram0 rw
-
-(rw is only necessary if writing to the initrd file system.)
-
-With LOADLIN, you simply execute::
-
- LOADLIN <kernel> initrd=<disk_image>
-
-e.g.::
-
- LOADLIN C:\LINUX\BZIMAGE initrd=C:\LINUX\INITRD.GZ root=/dev/ram0 rw
-
-With LILO, you add the option ``INITRD=<path>`` to either the global section
-or to the section of the respective kernel in ``/etc/lilo.conf``, and pass
-the options using APPEND, e.g.::
-
- image = /bzImage
- initrd = /boot/initrd.gz
- append = "root=/dev/ram0 rw"
-
-and run ``/sbin/lilo``
-
-For other boot loaders, please refer to the respective documentation.
-
-Now you can boot and enjoy using initrd.
-
-
-Changing the root device
-------------------------
-
-When finished with its duties, init typically changes the root device
-and proceeds with starting the Linux system on the "real" root device.
-
-The procedure involves the following steps:
- - mounting the new root file system
- - turning it into the root file system
- - removing all accesses to the old (initrd) root file system
- - unmounting the initrd file system and de-allocating the RAM disk
-
-Mounting the new root file system is easy: it just needs to be mounted on
-a directory under the current root. Example::
-
- # mkdir /new-root
- # mount -o ro /dev/hda1 /new-root
-
-The root change is accomplished with the pivot_root system call, which
-is also available via the ``pivot_root`` utility (see :manpage:`pivot_root(8)`
-man page; ``pivot_root`` is distributed with util-linux version 2.10h or higher
-[#f3]_). ``pivot_root`` moves the current root to a directory under the new
-root, and puts the new root at its place. The directory for the old root
-must exist before calling ``pivot_root``. Example::
-
- # cd /new-root
- # mkdir initrd
- # pivot_root . initrd
-
-Now, the init process may still access the old root via its
-executable, shared libraries, standard input/output/error, and its
-current root directory. All these references are dropped by the
-following command::
-
- # exec chroot . what-follows <dev/console >dev/console 2>&1
-
-Where what-follows is a program under the new root, e.g. ``/sbin/init``
-If the new root file system will be used with udev and has no valid
-``/dev`` directory, udev must be initialized before invoking chroot in order
-to provide ``/dev/console``.
-
-Note: implementation details of pivot_root may change with time. In order
-to ensure compatibility, the following points should be observed:
-
- - before calling pivot_root, the current directory of the invoking
- process should point to the new root directory
- - use . as the first argument, and the _relative_ path of the directory
- for the old root as the second argument
- - a chroot program must be available under the old and the new root
- - chroot to the new root afterwards
- - use relative paths for dev/console in the exec command
-
-Now, the initrd can be unmounted and the memory allocated by the RAM
-disk can be freed::
-
- # umount /initrd
- # blockdev --flushbufs /dev/ram0
-
-It is also possible to use initrd with an NFS-mounted root, see the
-:manpage:`pivot_root(8)` man page for details.
-
-
-Usage scenarios
----------------
-
-The main motivation for implementing initrd was to allow for modular
-kernel configuration at system installation. The procedure would work
-as follows:
-
- 1) system boots from floppy or other media with a minimal kernel
- (e.g. support for RAM disks, initrd, a.out, and the Ext2 FS) and
- loads initrd
- 2) ``/sbin/init`` determines what is needed to (1) mount the "real" root FS
- (i.e. device type, device drivers, file system) and (2) the
- distribution media (e.g. CD-ROM, network, tape, ...). This can be
- done by asking the user, by auto-probing, or by using a hybrid
- approach.
- 3) ``/sbin/init`` loads the necessary kernel modules
- 4) ``/sbin/init`` creates and populates the root file system (this doesn't
- have to be a very usable system yet)
- 5) ``/sbin/init`` invokes ``pivot_root`` to change the root file system and
- execs - via chroot - a program that continues the installation
- 6) the boot loader is installed
- 7) the boot loader is configured to load an initrd with the set of
- modules that was used to bring up the system (e.g. ``/initrd`` can be
- modified, then unmounted, and finally, the image is written from
- ``/dev/ram0`` or ``/dev/rd/0`` to a file)
- 8) now the system is bootable and additional installation tasks can be
- performed
-
-The key role of initrd here is to re-use the configuration data during
-normal system operation without requiring the use of a bloated "generic"
-kernel or re-compiling or re-linking the kernel.
-
-A second scenario is for installations where Linux runs on systems with
-different hardware configurations in a single administrative domain. In
-such cases, it is desirable to generate only a small set of kernels
-(ideally only one) and to keep the system-specific part of configuration
-information as small as possible. In this case, a common initrd could be
-generated with all the necessary modules. Then, only ``/sbin/init`` or a file
-read by it would have to be different.
-
-A third scenario is more convenient recovery disks, because information
-like the location of the root FS partition doesn't have to be provided at
-boot time, but the system loaded from initrd can invoke a user-friendly
-dialog and it can also perform some sanity checks (or even some form of
-auto-detection).
-
-Last not least, CD-ROM distributors may use it for better installation
-from CD, e.g. by using a boot floppy and bootstrapping a bigger RAM disk
-via initrd from CD; or by booting via a loader like ``LOADLIN`` or directly
-from the CD-ROM, and loading the RAM disk from CD without need of
-floppies.
-
-
-Obsolete root change mechanism
-------------------------------
-
-The following mechanism was used before the introduction of pivot_root.
-Current kernels still support it, but you should _not_ rely on its
-continued availability.
-
-It works by mounting the "real" root device (i.e. the one set with rdev
-in the kernel image or with root=... at the boot command line) as the
-root file system when linuxrc exits. The initrd file system is then
-unmounted, or, if it is still busy, moved to a directory ``/initrd``, if
-such a directory exists on the new root file system.
-
-In order to use this mechanism, you do not have to specify the boot
-command options root, init, or rw. (If specified, they will affect
-the real root file system, not the initrd environment.)
-
-If /proc is mounted, the "real" root device can be changed from within
-linuxrc by writing the number of the new root FS device to the special
-file /proc/sys/kernel/real-root-dev, e.g.::
-
- # echo 0x301 >/proc/sys/kernel/real-root-dev
-
-Note that the mechanism is incompatible with NFS and similar file
-systems.
-
-This old, deprecated mechanism is commonly called ``change_root``, while
-the new, supported mechanism is called ``pivot_root``.
-
-
-Mixed change_root and pivot_root mechanism
-------------------------------------------
-
-In case you did not want to use ``root=/dev/ram0`` to trigger the pivot_root
-mechanism, you may create both ``/linuxrc`` and ``/sbin/init`` in your initrd
-image.
-
-``/linuxrc`` would contain only the following::
-
- #! /bin/sh
- mount -n -t proc proc /proc
- echo 0x0100 >/proc/sys/kernel/real-root-dev
- umount -n /proc
-
-Once linuxrc exited, the kernel would mount again your initrd as root,
-this time executing ``/sbin/init``. Again, it would be the duty of this init
-to build the right environment (maybe using the ``root= device`` passed on
-the cmdline) before the final execution of the real ``/sbin/init``.
-
-
-Resources
----------
-
-.. [#f1] Almesberger, Werner; "Booting Linux: The History and the Future"
- https://www.almesberger.net/cv/papers/ols2k-9.ps.gz
-.. [#f2] newlib package (experimental), with initrd example
- https://www.sourceware.org/newlib/
-.. [#f3] util-linux: Miscellaneous utilities for Linux
- https://www.kernel.org/pub/linux/utils/util-linux/
diff --git a/Documentation/admin-guide/nfs/nfsroot.rst b/Documentation/admin-guide/nfs/nfsroot.rst
index 135218f33394..60452bdfd454 100644
--- a/Documentation/admin-guide/nfs/nfsroot.rst
+++ b/Documentation/admin-guide/nfs/nfsroot.rst
@@ -18,8 +18,8 @@ Mounting the root filesystem via NFS (nfsroot)
In order to use a diskless system, such as an X-terminal or printer server for
example, it is necessary for the root filesystem to be present on a non-disk
device. This may be an initramfs (see
-Documentation/filesystems/ramfs-rootfs-initramfs.rst), a ramdisk (see
-Documentation/admin-guide/initrd.rst) or a filesystem mounted via NFS. The
+Documentation/filesystems/ramfs-rootfs-initramfs.rst)
+or a filesystem mounted via NFS. The
following text describes on how to use NFS for the root filesystem. For the rest
of this text 'client' means the diskless system, and 'server' means the NFS
server.
diff --git a/Documentation/power/swsusp-dmcrypt.rst b/Documentation/power/swsusp-dmcrypt.rst
index 426df59172cd..afb29a58fdf8 100644
--- a/Documentation/power/swsusp-dmcrypt.rst
+++ b/Documentation/power/swsusp-dmcrypt.rst
@@ -10,7 +10,7 @@ Some prerequisites:
You know how dm-crypt works. If not, visit the following web page:
http://www.saout.de/misc/dm-crypt/
You have read Documentation/power/swsusp.rst and understand it.
-You did read Documentation/admin-guide/initrd.rst and know how an initrd works.
+You did read Documentation/filesystems/ramfs-rootfs-initramfs.rst and know how an initrd works.
You know how to create or how to modify an initrd.
Now your system is properly set up, your disk is encrypted except for
diff --git a/fs/init.c b/fs/init.c
index eef5124885e3..dfa50474647c 100644
--- a/fs/init.c
+++ b/fs/init.c
@@ -27,20 +27,6 @@ int __init init_mount(const char *dev_name, const char *dir_name,
return ret;
}
-int __init init_umount(const char *name, int flags)
-{
- int lookup_flags = LOOKUP_MOUNTPOINT;
- struct path path;
- int ret;
-
- if (!(flags & UMOUNT_NOFOLLOW))
- lookup_flags |= LOOKUP_FOLLOW;
- ret = kern_path(name, lookup_flags, &path);
- if (ret)
- return ret;
- return path_umount(&path, flags);
-}
-
int __init init_chdir(const char *filename)
{
struct path path;
diff --git a/include/linux/init_syscalls.h b/include/linux/init_syscalls.h
index 92045d18cbfc..0bdbc458a881 100644
--- a/include/linux/init_syscalls.h
+++ b/include/linux/init_syscalls.h
@@ -2,7 +2,6 @@
int __init init_mount(const char *dev_name, const char *dir_name,
const char *type_page, unsigned long flags, void *data_page);
-int __init init_umount(const char *name, int flags);
int __init init_chdir(const char *filename);
int __init init_chroot(const char *filename);
int __init init_chown(const char *filename, uid_t user, gid_t group, int flags);
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index b42235c21444..cc389ef1a738 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -3,8 +3,6 @@
#ifndef __LINUX_INITRD_H
#define __LINUX_INITRD_H
-#define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... */
-
/* 1 if it is not an error if initrd_start < memory_start */
extern int initrd_below_start_ok;
diff --git a/init/Kconfig b/init/Kconfig
index e3eb63eadc87..0263c08960bc 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1441,7 +1441,7 @@ config BLK_DEV_INITRD
boot loader (loadlin or lilo) and that is mounted as root
before the normal boot procedure. It is typically used to
load modules needed to mount the "real" root file system,
- etc. See <file:Documentation/admin-guide/initrd.rst> for details.
+ etc. See <file:Documentation/filesystems/ramfs-rootfs-initramfs.rst> for details.
If RAM disk support (BLK_DEV_RAM) is also included, this
also enables initial RAM disk (initrd) support and adds
diff --git a/init/Makefile b/init/Makefile
index d6f75d8907e0..b020154b3d2a 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -17,7 +17,6 @@ obj-$(CONFIG_INITRAMFS_TEST) += initramfs_test.o
obj-y += init_task.o
mounts-y := do_mounts.o
-mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o
mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o
#
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 0f2f44e6250c..f0b1a83dbda4 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -452,7 +452,7 @@ static dev_t __init parse_root_device(char *root_device_name)
}
/*
- * Prepare the namespace - decide what/where to mount, load ramdisks, etc.
+ * Prepare the namespace - decide what/where to mount, etc.
*/
void __init prepare_namespace(void)
{
@@ -476,13 +476,9 @@ void __init prepare_namespace(void)
if (saved_root_name[0])
ROOT_DEV = parse_root_device(saved_root_name);
- if (initrd_load(saved_root_name))
- goto out;
-
if (root_wait)
wait_for_root(saved_root_name);
mount_root(saved_root_name);
-out:
devtmpfs_mount();
init_mount(".", "/", NULL, MS_MOVE, NULL);
init_chroot(".");
diff --git a/init/do_mounts.h b/init/do_mounts.h
index 6069ea3eb80d..6c7a535e71ce 100644
--- a/init/do_mounts.h
+++ b/init/do_mounts.h
@@ -22,28 +22,6 @@ static inline __init int create_dev(char *name, dev_t dev)
return init_mknod(name, S_IFBLK | 0600, new_encode_dev(dev));
}
-#ifdef CONFIG_BLK_DEV_RAM
-
-int __init rd_load_disk(int n);
-int __init rd_load_image(char *from);
-
-#else
-
-static inline int rd_load_disk(int n) { return 0; }
-static inline int rd_load_image(char *from) { return 0; }
-
-#endif
-
-#ifdef CONFIG_BLK_DEV_INITRD
-bool __init initrd_load(char *root_device_name);
-#else
-static inline bool initrd_load(char *root_device_name)
-{
- return false;
- }
-
-#endif
-
/* Ensure that async file closing finished to prevent spurious errors. */
static inline void init_flush_fput(void)
{
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index f6867bad0d78..308744254c08 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -69,86 +69,3 @@ static int __init early_initrd(char *p)
return early_initrdmem(p);
}
early_param("initrd", early_initrd);
-
-static int __init init_linuxrc(struct subprocess_info *info, struct cred *new)
-{
- ksys_unshare(CLONE_FS | CLONE_FILES);
- console_on_rootfs();
- /* move initrd over / and chdir/chroot in initrd root */
- init_chdir("/root");
- init_mount(".", "/", NULL, MS_MOVE, NULL);
- init_chroot(".");
- ksys_setsid();
- return 0;
-}
-
-static void __init handle_initrd(char *root_device_name)
-{
- struct subprocess_info *info;
- static char *argv[] = { "linuxrc", NULL, };
- extern char *envp_init[];
- int error;
-
- pr_warn("using deprecated initrd support, will be removed soon.\n");
-
- real_root_dev = new_encode_dev(ROOT_DEV);
- create_dev("/dev/root.old", Root_RAM0);
- /* mount initrd on rootfs' /root */
- mount_root_generic("/dev/root.old", root_device_name,
- root_mountflags & ~MS_RDONLY);
- init_mkdir("/old", 0700);
- init_chdir("/old");
-
- info = call_usermodehelper_setup("/linuxrc", argv, envp_init,
- GFP_KERNEL, init_linuxrc, NULL, NULL);
- if (!info)
- return;
- call_usermodehelper_exec(info, UMH_WAIT_PROC|UMH_FREEZABLE);
-
- /* move initrd to rootfs' /old */
- init_mount("..", ".", NULL, MS_MOVE, NULL);
- /* switch root and cwd back to / of rootfs */
- init_chroot("..");
-
- if (new_decode_dev(real_root_dev) == Root_RAM0) {
- init_chdir("/old");
- return;
- }
-
- init_chdir("/");
- ROOT_DEV = new_decode_dev(real_root_dev);
- mount_root(root_device_name);
-
- printk(KERN_NOTICE "Trying to move old root to /initrd ... ");
- error = init_mount("/old", "/root/initrd", NULL, MS_MOVE, NULL);
- if (!error)
- printk("okay\n");
- else {
- if (error == -ENOENT)
- printk("/initrd does not exist. Ignored.\n");
- else
- printk("failed\n");
- printk(KERN_NOTICE "Unmounting old root\n");
- init_umount("/old", MNT_DETACH);
- }
-}
-
-bool __init initrd_load(char *root_device_name)
-{
- if (mount_initrd) {
- create_dev("/dev/ram", Root_RAM0);
- /*
- * Load the initrd data into /dev/ram0. Execute it as initrd
- * unless /dev/ram0 is supposed to be our actual root device,
- * in that case the ram disk is just set up here, and gets
- * mounted in the normal path.
- */
- if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) {
- init_unlink("/initrd.image");
- handle_initrd(root_device_name);
- return true;
- }
- }
- init_unlink("/initrd.image");
- return false;
-}
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
deleted file mode 100644
index 864fa88d9f89..000000000000
--- a/init/do_mounts_rd.c
+++ /dev/null
@@ -1,318 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/kernel.h>
-#include <linux/fs.h>
-#include <linux/minix_fs.h>
-#include <linux/ext2_fs.h>
-#include <linux/romfs_fs.h>
-#include <uapi/linux/cramfs_fs.h>
-#include <linux/initrd.h>
-#include <linux/string.h>
-#include <linux/slab.h>
-
-#include "do_mounts.h"
-#include "../fs/squashfs/squashfs_fs.h"
-
-#include <linux/decompress/generic.h>
-
-static struct file *in_file, *out_file;
-static loff_t in_pos, out_pos;
-
-static int __init crd_load(decompress_fn deco);
-
-/*
- * This routine tries to find a RAM disk image to load, and returns the
- * number of blocks to read for a non-compressed image, 0 if the image
- * is a compressed image, and -1 if an image with the right magic
- * numbers could not be found.
- *
- * We currently check for the following magic numbers:
- * minix
- * ext2
- * romfs
- * cramfs
- * squashfs
- * gzip
- * bzip2
- * lzma
- * xz
- * lzo
- * lz4
- */
-static int __init
-identify_ramdisk_image(struct file *file, loff_t pos,
- decompress_fn *decompressor)
-{
- const int size = 512;
- struct minix_super_block *minixsb;
- struct romfs_super_block *romfsb;
- struct cramfs_super *cramfsb;
- struct squashfs_super_block *squashfsb;
- int nblocks = -1;
- unsigned char *buf;
- const char *compress_name;
- unsigned long n;
- int start_block = 0;
-
- buf = kmalloc(size, GFP_KERNEL);
- if (!buf)
- return -ENOMEM;
-
- minixsb = (struct minix_super_block *) buf;
- romfsb = (struct romfs_super_block *) buf;
- cramfsb = (struct cramfs_super *) buf;
- squashfsb = (struct squashfs_super_block *) buf;
- memset(buf, 0xe5, size);
-
- /*
- * Read block 0 to test for compressed kernel
- */
- pos = start_block * BLOCK_SIZE;
- kernel_read(file, buf, size, &pos);
-
- *decompressor = decompress_method(buf, size, &compress_name);
- if (compress_name) {
- printk(KERN_NOTICE "RAMDISK: %s image found at block %d\n",
- compress_name, start_block);
- if (!*decompressor)
- printk(KERN_EMERG
- "RAMDISK: %s decompressor not configured!\n",
- compress_name);
- nblocks = 0;
- goto done;
- }
-
- /* romfs is at block zero too */
- if (romfsb->word0 == ROMSB_WORD0 &&
- romfsb->word1 == ROMSB_WORD1) {
- printk(KERN_NOTICE
- "RAMDISK: romfs filesystem found at block %d\n",
- start_block);
- nblocks = (ntohl(romfsb->size)+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
- goto done;
- }
-
- if (cramfsb->magic == CRAMFS_MAGIC) {
- printk(KERN_NOTICE
- "RAMDISK: cramfs filesystem found at block %d\n",
- start_block);
- nblocks = (cramfsb->size + BLOCK_SIZE - 1) >> BLOCK_SIZE_BITS;
- goto done;
- }
-
- /* squashfs is at block zero too */
- if (le32_to_cpu(squashfsb->s_magic) == SQUASHFS_MAGIC) {
- printk(KERN_NOTICE
- "RAMDISK: squashfs filesystem found at block %d\n",
- start_block);
- nblocks = (le64_to_cpu(squashfsb->bytes_used) + BLOCK_SIZE - 1)
- >> BLOCK_SIZE_BITS;
- goto done;
- }
-
- /*
- * Read 512 bytes further to check if cramfs is padded
- */
- pos = start_block * BLOCK_SIZE + 0x200;
- kernel_read(file, buf, size, &pos);
-
- if (cramfsb->magic == CRAMFS_MAGIC) {
- printk(KERN_NOTICE
- "RAMDISK: cramfs filesystem found at block %d\n",
- start_block);
- nblocks = (cramfsb->size + BLOCK_SIZE - 1) >> BLOCK_SIZE_BITS;
- goto done;
- }
-
- /*
- * Read block 1 to test for minix and ext2 superblock
- */
- pos = (start_block + 1) * BLOCK_SIZE;
- kernel_read(file, buf, size, &pos);
-
- /* Try minix */
- if (minixsb->s_magic == MINIX_SUPER_MAGIC ||
- minixsb->s_magic == MINIX_SUPER_MAGIC2) {
- printk(KERN_NOTICE
- "RAMDISK: Minix filesystem found at block %d\n",
- start_block);
- nblocks = minixsb->s_nzones << minixsb->s_log_zone_size;
- goto done;
- }
-
- /* Try ext2 */
- n = ext2_image_size(buf);
- if (n) {
- printk(KERN_NOTICE
- "RAMDISK: ext2 filesystem found at block %d\n",
- start_block);
- nblocks = n;
- goto done;
- }
-
- printk(KERN_NOTICE
- "RAMDISK: Couldn't find valid RAM disk image starting at %d.\n",
- start_block);
-
-done:
- kfree(buf);
- return nblocks;
-}
-
-static unsigned long nr_blocks(struct file *file)
-{
- struct inode *inode = file->f_mapping->host;
-
- if (!S_ISBLK(inode->i_mode))
- return 0;
- return i_size_read(inode) >> 10;
-}
-
-int __init rd_load_image(char *from)
-{
- int res = 0;
- unsigned long rd_blocks, devblocks;
- int nblocks, i;
- char *buf = NULL;
- unsigned short rotate = 0;
- decompress_fn decompressor = NULL;
-#if !defined(CONFIG_S390)
- char rotator[4] = { '|' , '/' , '-' , '\\' };
-#endif
-
- out_file = filp_open("/dev/ram", O_RDWR, 0);
- if (IS_ERR(out_file))
- goto out;
-
- in_file = filp_open(from, O_RDONLY, 0);
- if (IS_ERR(in_file))
- goto noclose_input;
-
- in_pos = 0;
- nblocks = identify_ramdisk_image(in_file, in_pos, &decompressor);
- if (nblocks < 0)
- goto done;
-
- if (nblocks == 0) {
- if (crd_load(decompressor) == 0)
- goto successful_load;
- goto done;
- }
-
- /*
- * NOTE NOTE: nblocks is not actually blocks but
- * the number of kibibytes of data to load into a ramdisk.
- */
- rd_blocks = nr_blocks(out_file);
- if (nblocks > rd_blocks) {
- printk("RAMDISK: image too big! (%dKiB/%ldKiB)\n",
- nblocks, rd_blocks);
- goto done;
- }
-
- /*
- * OK, time to copy in the data
- */
- if (strcmp(from, "/initrd.image") == 0)
- devblocks = nblocks;
- else
- devblocks = nr_blocks(in_file);
-
- if (devblocks == 0) {
- printk(KERN_ERR "RAMDISK: could not determine device size\n");
- goto done;
- }
-
- buf = kmalloc(BLOCK_SIZE, GFP_KERNEL);
- if (!buf) {
- printk(KERN_ERR "RAMDISK: could not allocate buffer\n");
- goto done;
- }
-
- printk(KERN_NOTICE "RAMDISK: Loading %dKiB [%ld disk%s] into ram disk... ",
- nblocks, ((nblocks-1)/devblocks)+1, nblocks>devblocks ? "s" : "");
- for (i = 0; i < nblocks; i++) {
- if (i && (i % devblocks == 0)) {
- pr_cont("done disk #1.\n");
- rotate = 0;
- fput(in_file);
- break;
- }
- kernel_read(in_file, buf, BLOCK_SIZE, &in_pos);
- kernel_write(out_file, buf, BLOCK_SIZE, &out_pos);
-#if !defined(CONFIG_S390)
- if (!(i % 16)) {
- pr_cont("%c\b", rotator[rotate & 0x3]);
- rotate++;
- }
-#endif
- }
- pr_cont("done.\n");
-
-successful_load:
- res = 1;
-done:
- fput(in_file);
-noclose_input:
- fput(out_file);
-out:
- kfree(buf);
- init_unlink("/dev/ram");
- return res;
-}
-
-int __init rd_load_disk(int n)
-{
- create_dev("/dev/root", ROOT_DEV);
- create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n));
- return rd_load_image("/dev/root");
-}
-
-static int exit_code;
-static int decompress_error;
-
-static long __init compr_fill(void *buf, unsigned long len)
-{
- long r = kernel_read(in_file, buf, len, &in_pos);
- if (r < 0)
- printk(KERN_ERR "RAMDISK: error while reading compressed data");
- else if (r == 0)
- printk(KERN_ERR "RAMDISK: EOF while reading compressed data");
- return r;
-}
-
-static long __init compr_flush(void *window, unsigned long outcnt)
-{
- long written = kernel_write(out_file, window, outcnt, &out_pos);
- if (written != outcnt) {
- if (decompress_error == 0)
- printk(KERN_ERR
- "RAMDISK: incomplete write (%ld != %ld)\n",
- written, outcnt);
- decompress_error = 1;
- return -1;
- }
- return outcnt;
-}
-
-static void __init error(char *x)
-{
- printk(KERN_ERR "%s\n", x);
- exit_code = 1;
- decompress_error = 1;
-}
-
-static int __init crd_load(decompress_fn deco)
-{
- int result;
-
- if (!deco) {
- pr_emerg("Invalid ramdisk decompression routine. "
- "Select appropriate config option.\n");
- panic("Could not decompress initial ramdisk image.");
- }
-
- result = deco(NULL, 0, compr_fill, compr_flush, NULL, NULL, error);
- if (decompress_error)
- result = 1;
- return result;
-}
diff --git a/init/initramfs.c b/init/initramfs.c
index 097673b97784..850cb0de873e 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -692,28 +692,6 @@ static inline bool kexec_free_initrd(void)
}
#endif /* CONFIG_KEXEC_CORE */
-#ifdef CONFIG_BLK_DEV_RAM
-static void __init populate_initrd_image(char *err)
-{
- ssize_t written;
- struct file *file;
- loff_t pos = 0;
-
- printk(KERN_INFO "rootfs image is not initramfs (%s); looks like an initrd\n",
- err);
- file = filp_open("/initrd.image", O_WRONLY|O_CREAT|O_LARGEFILE, 0700);
- if (IS_ERR(file))
- return;
-
- written = xwrite(file, (char *)initrd_start, initrd_end - initrd_start,
- &pos);
- if (written != initrd_end - initrd_start)
- pr_err("/initrd.image: incomplete write (%zd != %ld)\n",
- written, initrd_end - initrd_start);
- fput(file);
-}
-#endif /* CONFIG_BLK_DEV_RAM */
-
static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
{
/* Load the built in initramfs */
@@ -724,18 +702,11 @@ static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
if (!initrd_start || IS_ENABLED(CONFIG_INITRAMFS_FORCE))
goto done;
- if (IS_ENABLED(CONFIG_BLK_DEV_RAM))
- printk(KERN_INFO "Trying to unpack rootfs image as initramfs...\n");
- else
- printk(KERN_INFO "Unpacking initramfs...\n");
+ printk(KERN_INFO "Unpacking initramfs...\n");
err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start);
if (err) {
-#ifdef CONFIG_BLK_DEV_RAM
- populate_initrd_image(err);
-#else
printk(KERN_EMERG "Initramfs unpacking failed: %s\n", err);
-#endif
}
done:
diff --git a/tools/testing/ktest/examples/bootconfigs/tracing.bconf b/tools/testing/ktest/examples/bootconfigs/tracing.bconf
index bf117c78115a..c81ee5e30d2d 100644
--- a/tools/testing/ktest/examples/bootconfigs/tracing.bconf
+++ b/tools/testing/ktest/examples/bootconfigs/tracing.bconf
@@ -16,9 +16,6 @@ ftrace {
myevent2 {
probes = "vfs_write $arg2 +0($arg2):ustring $arg3";
}
- myevent3 {
- probes = "initrd_load";
- }
enable
}
}
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 11/62] init, efi: remove "noinitrd" command line parameter
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (9 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 10/62] initrd: remove initrd (initial RAM disk) support Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 12/62] init: remove /proc/sys/kernel/real-root-dev Askar Safin
` (57 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
It was inconsistent before initrd removal: it mostly
controlled initrd only, but in EFI stub boot mode
it controlled both initrd and initramfs
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/admin-guide/kernel-parameters.txt | 3 ---
arch/arm/configs/collie_defconfig | 2 +-
arch/arm/configs/imx_v6_v7_defconfig | 2 +-
arch/arm/configs/neponset_defconfig | 2 +-
arch/arm/configs/spitz_defconfig | 2 +-
drivers/firmware/efi/libstub/efi-stub-helper.c | 5 +----
init/do_mounts_initrd.c | 9 ---------
7 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 07e8878f1e13..ad52e3d26014 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4271,9 +4271,6 @@
Note that this argument takes precedence over
the CONFIG_RCU_NOCB_CPU_DEFAULT_ALL option.
- noinitrd [RAM] Tells the kernel not to load any configured
- initial RAM disk.
-
nointremap [X86-64,Intel-IOMMU,EARLY] Do not enable interrupt
remapping.
[Deprecated - use intremap=off]
diff --git a/arch/arm/configs/collie_defconfig b/arch/arm/configs/collie_defconfig
index 578c6a4af620..00dc8ae22824 100644
--- a/arch/arm/configs/collie_defconfig
+++ b/arch/arm/configs/collie_defconfig
@@ -9,7 +9,7 @@ CONFIG_ARCH_MULTI_V4=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_SA1100=y
CONFIG_SA1100_COLLIE=y
-CONFIG_CMDLINE="noinitrd root=/dev/mtdblock2 rootfstype=jffs2 fbcon=rotate:1"
+CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 fbcon=rotate:1"
CONFIG_FPE_NWFPE=y
CONFIG_PM=y
# CONFIG_SWAP is not set
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index 9a57763a8d38..b53ae2c052fc 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -32,7 +32,7 @@ CONFIG_SMP=y
CONFIG_ARM_PSCI=y
CONFIG_HIGHMEM=y
CONFIG_ARCH_FORCE_MAX_ORDER=13
-CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
+CONFIG_CMDLINE="console=ttymxc0,115200"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig
index 4d720001c12e..a61eb27373a8 100644
--- a/arch/arm/configs/neponset_defconfig
+++ b/arch/arm/configs/neponset_defconfig
@@ -9,7 +9,7 @@ CONFIG_ASSABET_NEPONSET=y
CONFIG_ZBOOT_ROM_TEXT=0x80000
CONFIG_ZBOOT_ROM_BSS=0xc1000000
CONFIG_ZBOOT_ROM=y
-CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) mem=32M noinitrd initrd=0xc0800000,3M"
+CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) mem=32M initrd=0xc0800000,3M"
CONFIG_FPE_NWFPE=y
CONFIG_PM=y
CONFIG_MODULES=y
diff --git a/arch/arm/configs/spitz_defconfig b/arch/arm/configs/spitz_defconfig
index ac2a0f998c73..8582b6f2cf9d 100644
--- a/arch/arm/configs/spitz_defconfig
+++ b/arch/arm/configs/spitz_defconfig
@@ -10,7 +10,7 @@ CONFIG_ARCH_PXA=y
CONFIG_PXA_SHARPSL=y
CONFIG_MACH_AKITA=y
CONFIG_MACH_BORZOI=y
-CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 debug"
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 root=/dev/mtdblock2 rootfstype=jffs2 debug"
CONFIG_FPE_NWFPE=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c
index 7aa2f9ad2935..6d89bf941d57 100644
--- a/drivers/firmware/efi/libstub/efi-stub-helper.c
+++ b/drivers/firmware/efi/libstub/efi-stub-helper.c
@@ -21,7 +21,6 @@ bool efi_nochunk;
bool efi_nokaslr = !IS_ENABLED(CONFIG_RANDOMIZE_BASE);
bool efi_novamap;
-static bool efi_noinitrd;
static bool efi_nosoftreserve;
static bool efi_disable_pci_dma = IS_ENABLED(CONFIG_EFI_DISABLE_PCI_DMA);
@@ -75,8 +74,6 @@ efi_status_t efi_parse_options(char const *cmdline)
efi_nokaslr = true;
} else if (!strcmp(param, "quiet")) {
efi_loglevel = CONSOLE_LOGLEVEL_QUIET;
- } else if (!strcmp(param, "noinitrd")) {
- efi_noinitrd = true;
} else if (IS_ENABLED(CONFIG_X86_64) && !strcmp(param, "no5lvl")) {
efi_no5lvl = true;
} else if (IS_ENABLED(CONFIG_ARCH_HAS_MEM_ENCRYPT) &&
@@ -614,7 +611,7 @@ efi_status_t efi_load_initrd(efi_loaded_image_t *image,
efi_status_t status = EFI_SUCCESS;
struct linux_efi_initrd initrd, *tbl;
- if (!IS_ENABLED(CONFIG_BLK_DEV_INITRD) || efi_noinitrd)
+ if (!IS_ENABLED(CONFIG_BLK_DEV_INITRD))
return EFI_SUCCESS;
status = efi_load_initrd_dev_path(&initrd, hard_limit);
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index 308744254c08..bec1c5d684a3 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -15,7 +15,6 @@
unsigned long initrd_start, initrd_end;
int initrd_below_start_ok;
static unsigned int real_root_dev; /* do_proc_dointvec cannot handle kdev_t */
-static int __initdata mount_initrd = 1;
phys_addr_t phys_initrd_start __initdata;
unsigned long phys_initrd_size __initdata;
@@ -39,14 +38,6 @@ static __init int kernel_do_mounts_initrd_sysctls_init(void)
late_initcall(kernel_do_mounts_initrd_sysctls_init);
#endif /* CONFIG_SYSCTL */
-static int __init no_initrd(char *str)
-{
- mount_initrd = 0;
- return 1;
-}
-
-__setup("noinitrd", no_initrd);
-
static int __init early_initrdmem(char *p)
{
phys_addr_t start;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 12/62] init: remove /proc/sys/kernel/real-root-dev
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (10 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 11/62] init, efi: remove "noinitrd" command line parameter Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 13/62] ext2: remove ext2_image_size and associated code Askar Safin
` (56 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
It was used for initrd support, which was removed in previous
commits
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/admin-guide/sysctl/kernel.rst | 6 ------
include/uapi/linux/sysctl.h | 1 -
init/do_mounts_initrd.c | 20 --------------------
3 files changed, 27 deletions(-)
diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index 8b49eab937d0..cc958c228bc2 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -1215,12 +1215,6 @@ that support this feature.
== ===========================================================================
-real-root-dev
-=============
-
-See Documentation/admin-guide/initrd.rst.
-
-
reboot-cmd (SPARC only)
=======================
diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h
index 63d1464cb71c..1c7fe0f4dca4 100644
--- a/include/uapi/linux/sysctl.h
+++ b/include/uapi/linux/sysctl.h
@@ -92,7 +92,6 @@ enum
KERN_DOMAINNAME=8, /* string: domainname */
KERN_PANIC=15, /* int: panic timeout */
- KERN_REALROOTDEV=16, /* real root device to mount after initrd */
KERN_SPARC_REBOOT=21, /* reboot command on Sparc */
KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index bec1c5d684a3..d5264e9a52e0 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -14,30 +14,10 @@
unsigned long initrd_start, initrd_end;
int initrd_below_start_ok;
-static unsigned int real_root_dev; /* do_proc_dointvec cannot handle kdev_t */
phys_addr_t phys_initrd_start __initdata;
unsigned long phys_initrd_size __initdata;
-#ifdef CONFIG_SYSCTL
-static const struct ctl_table kern_do_mounts_initrd_table[] = {
- {
- .procname = "real-root-dev",
- .data = &real_root_dev,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec,
- },
-};
-
-static __init int kernel_do_mounts_initrd_sysctls_init(void)
-{
- register_sysctl_init("kernel", kern_do_mounts_initrd_table);
- return 0;
-}
-late_initcall(kernel_do_mounts_initrd_sysctls_init);
-#endif /* CONFIG_SYSCTL */
-
static int __init early_initrdmem(char *p)
{
phys_addr_t start;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 13/62] ext2: remove ext2_image_size and associated code
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (11 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 12/62] init: remove /proc/sys/kernel/real-root-dev Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-15 9:19 ` Jan Kara
2025-09-13 0:37 ` [PATCH RESEND 14/62] init: m68k, mips, powerpc, s390, sh: remove Root_RAM0 Askar Safin
` (55 subsequent siblings)
68 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
It is not used anymore
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
fs/ext2/ext2.h | 9 ---------
include/linux/ext2_fs.h | 13 -------------
2 files changed, 22 deletions(-)
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index cf97b76e9fd3..d623a14040d9 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -608,15 +608,6 @@ struct ext2_dir_entry_2 {
~EXT2_DIR_ROUND)
#define EXT2_MAX_REC_LEN ((1<<16)-1)
-static inline void verify_offsets(void)
-{
-#define A(x,y) BUILD_BUG_ON(x != offsetof(struct ext2_super_block, y));
- A(EXT2_SB_MAGIC_OFFSET, s_magic);
- A(EXT2_SB_BLOCKS_OFFSET, s_blocks_count);
- A(EXT2_SB_BSIZE_OFFSET, s_log_block_size);
-#undef A
-}
-
/*
* ext2 mount options
*/
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
index 1fef88569037..e5ebe6cdf06c 100644
--- a/include/linux/ext2_fs.h
+++ b/include/linux/ext2_fs.h
@@ -27,17 +27,4 @@
*/
#define EXT2_LINK_MAX 32000
-#define EXT2_SB_MAGIC_OFFSET 0x38
-#define EXT2_SB_BLOCKS_OFFSET 0x04
-#define EXT2_SB_BSIZE_OFFSET 0x18
-
-static inline u64 ext2_image_size(void *ext2_sb)
-{
- __u8 *p = ext2_sb;
- if (*(__le16 *)(p + EXT2_SB_MAGIC_OFFSET) != cpu_to_le16(EXT2_SUPER_MAGIC))
- return 0;
- return (u64)le32_to_cpup((__le32 *)(p + EXT2_SB_BLOCKS_OFFSET)) <<
- le32_to_cpup((__le32 *)(p + EXT2_SB_BSIZE_OFFSET));
-}
-
#endif /* _LINUX_EXT2_FS_H */
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 13/62] ext2: remove ext2_image_size and associated code
2025-09-13 0:37 ` [PATCH RESEND 13/62] ext2: remove ext2_image_size and associated code Askar Safin
@ 2025-09-15 9:19 ` Jan Kara
0 siblings, 0 replies; 95+ messages in thread
From: Jan Kara @ 2025-09-15 9:19 UTC (permalink / raw)
To: Askar Safin
Cc: linux-fsdevel, linux-kernel, Linus Torvalds, Greg Kroah-Hartman,
Christian Brauner, Al Viro, Jan Kara, Christoph Hellwig,
Jens Axboe, Andy Shevchenko, Aleksa Sarai, Thomas Weißschuh,
Julian Stecklina, Gao Xiang, Art Nikpal, Andrew Morton,
Eric Curtin, Alexander Graf, Rob Landley, Lennart Poettering,
linux-arch, linux-alpha, linux-snps-arc, linux-arm-kernel,
linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
linux-s390, linux-sh, sparclinux, linux-um, x86, Ingo Molnar,
linux-block, initramfs, linux-api, linux-doc, linux-efi,
linux-ext4, Theodore Y . Ts'o, linux-acpi, Michal Simek,
devicetree, Luis Chamberlain, Kees Cook, Thorsten Blum,
Heiko Carstens, patches
On Sat 13-09-25 00:37:52, Askar Safin wrote:
> It is not used anymore
>
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
Looks good.
Acked-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/ext2/ext2.h | 9 ---------
> include/linux/ext2_fs.h | 13 -------------
> 2 files changed, 22 deletions(-)
>
> diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
> index cf97b76e9fd3..d623a14040d9 100644
> --- a/fs/ext2/ext2.h
> +++ b/fs/ext2/ext2.h
> @@ -608,15 +608,6 @@ struct ext2_dir_entry_2 {
> ~EXT2_DIR_ROUND)
> #define EXT2_MAX_REC_LEN ((1<<16)-1)
>
> -static inline void verify_offsets(void)
> -{
> -#define A(x,y) BUILD_BUG_ON(x != offsetof(struct ext2_super_block, y));
> - A(EXT2_SB_MAGIC_OFFSET, s_magic);
> - A(EXT2_SB_BLOCKS_OFFSET, s_blocks_count);
> - A(EXT2_SB_BSIZE_OFFSET, s_log_block_size);
> -#undef A
> -}
> -
> /*
> * ext2 mount options
> */
> diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
> index 1fef88569037..e5ebe6cdf06c 100644
> --- a/include/linux/ext2_fs.h
> +++ b/include/linux/ext2_fs.h
> @@ -27,17 +27,4 @@
> */
> #define EXT2_LINK_MAX 32000
>
> -#define EXT2_SB_MAGIC_OFFSET 0x38
> -#define EXT2_SB_BLOCKS_OFFSET 0x04
> -#define EXT2_SB_BSIZE_OFFSET 0x18
> -
> -static inline u64 ext2_image_size(void *ext2_sb)
> -{
> - __u8 *p = ext2_sb;
> - if (*(__le16 *)(p + EXT2_SB_MAGIC_OFFSET) != cpu_to_le16(EXT2_SUPER_MAGIC))
> - return 0;
> - return (u64)le32_to_cpup((__le32 *)(p + EXT2_SB_BLOCKS_OFFSET)) <<
> - le32_to_cpup((__le32 *)(p + EXT2_SB_BSIZE_OFFSET));
> -}
> -
> #endif /* _LINUX_EXT2_FS_H */
> --
> 2.47.2
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 14/62] init: m68k, mips, powerpc, s390, sh: remove Root_RAM0
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (12 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 13/62] ext2: remove ext2_image_size and associated code Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 15/62] doc: modernize Documentation/admin-guide/blockdev/ramdisk.rst Askar Safin
` (54 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Root_RAM0 used to specify ramdisk as root device.
It means nothing now, so let's remove it
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/m68k/kernel/uboot.c | 1 -
arch/mips/kernel/setup.c | 1 -
arch/powerpc/kernel/setup-common.c | 11 ++++-------
arch/powerpc/platforms/powermac/setup.c | 4 +---
arch/s390/kernel/setup.c | 2 --
arch/sh/kernel/setup.c | 4 +---
include/linux/root_dev.h | 1 -
init/do_mounts.c | 2 --
8 files changed, 6 insertions(+), 20 deletions(-)
diff --git a/arch/m68k/kernel/uboot.c b/arch/m68k/kernel/uboot.c
index fa7c279ead5d..d278060a250c 100644
--- a/arch/m68k/kernel/uboot.c
+++ b/arch/m68k/kernel/uboot.c
@@ -83,7 +83,6 @@ static void __init parse_uboot_commandline(char *commandp, int size)
(uboot_initrd_end > uboot_initrd_start)) {
initrd_start = uboot_initrd_start;
initrd_end = uboot_initrd_end;
- ROOT_DEV = Root_RAM0;
pr_info("initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end);
}
#endif /* if defined(CONFIG_BLK_DEV_INITRD) */
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 11b9b6b63e19..a78e24873231 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -173,7 +173,6 @@ static unsigned long __init init_initrd(void)
goto disable;
}
- ROOT_DEV = Root_RAM0;
return PFN_UP(end);
disable:
initrd_start = 0;
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 68d47c53876c..97d330f3b8f1 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -363,17 +363,14 @@ void __init check_for_initrd(void)
DBG(" -> check_for_initrd() initrd_start=0x%lx initrd_end=0x%lx\n",
initrd_start, initrd_end);
- /* If we were passed an initrd, set the ROOT_DEV properly if the values
- * look sensible. If not, clear initrd reference.
+ /* If we were not passed an sensible initramfs, clear initramfs reference.
*/
- if (is_kernel_addr(initrd_start) && is_kernel_addr(initrd_end) &&
- initrd_end > initrd_start)
- ROOT_DEV = Root_RAM0;
- else
+ if (!(is_kernel_addr(initrd_start) && is_kernel_addr(initrd_end) &&
+ initrd_end > initrd_start))
initrd_start = initrd_end = 0;
if (initrd_start)
- pr_info("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end);
+ pr_info("Found initramfs at 0x%lx:0x%lx\n", initrd_start, initrd_end);
DBG(" <- check_for_initrd()\n");
#endif /* CONFIG_BLK_DEV_INITRD */
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index eb092f293113..237d8386a3f4 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -296,9 +296,7 @@ static void __init pmac_setup_arch(void)
#endif
#ifdef CONFIG_PPC32
#ifdef CONFIG_BLK_DEV_INITRD
- if (initrd_start)
- ROOT_DEV = Root_RAM0;
- else
+ if (!initrd_start)
#endif
ROOT_DEV = DEFAULT_ROOT_DEVICE;
#endif
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 7b529868789f..a4ce721b7fe8 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -923,8 +923,6 @@ void __init setup_arch(char **cmdline_p)
/* boot_command_line has been already set up in early.c */
*cmdline_p = boot_command_line;
- ROOT_DEV = Root_RAM0;
-
setup_initial_init_mm(_text, _etext, _edata, _end);
if (IS_ENABLED(CONFIG_EXPOLINE_AUTO))
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 50f1d39fe34f..c4312ee13db9 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -147,10 +147,8 @@ void __init check_for_initrd(void)
/*
* If we got this far in spite of the boot loader's best efforts
- * to the contrary, assume we actually have a valid initrd and
- * fix up the root dev.
+ * to the contrary, assume we actually have a valid initramfs.
*/
- ROOT_DEV = Root_RAM0;
/*
* Address sanitization
diff --git a/include/linux/root_dev.h b/include/linux/root_dev.h
index 847c9a06101b..e411533b90b7 100644
--- a/include/linux/root_dev.h
+++ b/include/linux/root_dev.h
@@ -10,7 +10,6 @@ enum {
Root_NFS = MKDEV(UNNAMED_MAJOR, 255),
Root_CIFS = MKDEV(UNNAMED_MAJOR, 254),
Root_Generic = MKDEV(UNNAMED_MAJOR, 253),
- Root_RAM0 = MKDEV(RAMDISK_MAJOR, 0),
};
extern dev_t ROOT_DEV;
diff --git a/init/do_mounts.c b/init/do_mounts.c
index f0b1a83dbda4..5c407ca54063 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -437,8 +437,6 @@ static dev_t __init parse_root_device(char *root_device_name)
return Root_NFS;
if (strcmp(root_device_name, "/dev/cifs") == 0)
return Root_CIFS;
- if (strcmp(root_device_name, "/dev/ram") == 0)
- return Root_RAM0;
error = early_lookup_bdev(root_device_name, &dev);
if (error) {
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 15/62] doc: modernize Documentation/admin-guide/blockdev/ramdisk.rst
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (13 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 14/62] init: m68k, mips, powerpc, s390, sh: remove Root_RAM0 Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 16/62] brd: remove "ramdisk_size" command line parameter Askar Safin
` (53 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Update it to reflect initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
.../admin-guide/blockdev/ramdisk.rst | 103 ++----------------
1 file changed, 7 insertions(+), 96 deletions(-)
diff --git a/Documentation/admin-guide/blockdev/ramdisk.rst b/Documentation/admin-guide/blockdev/ramdisk.rst
index e57c61108dbc..6289e085f18f 100644
--- a/Documentation/admin-guide/blockdev/ramdisk.rst
+++ b/Documentation/admin-guide/blockdev/ramdisk.rst
@@ -5,18 +5,14 @@ Using the RAM disk block device with Linux
.. Contents:
1) Overview
- 2) Kernel Command Line Parameters
- 3) Using "rdev"
- 4) An Example of Creating a Compressed RAM Disk
+ 2) Module parameters
1) Overview
-----------
-The RAM disk driver is a way to use main system memory as a block device. It
-is required for initrd, an initial filesystem used if you need to load modules
-in order to access the root filesystem (see Documentation/admin-guide/initrd.rst). It can
-also be used for a temporary filesystem for crypto work, since the contents
+The RAM disk driver is a way to use main system memory as a block device.
+It can also be used for a temporary filesystem for crypto work, since the contents
are erased on reboot.
The RAM disk dynamically grows as more space is required. It does this by using
@@ -30,109 +26,24 @@ and (re)build the kernel.
To use RAM disk support with your system, run './MAKEDEV ram' from the /dev
directory. RAM disks are all major number 1, and start with minor number 0
-for /dev/ram0, etc. If used, modern kernels use /dev/ram0 for an initrd.
-
-The new RAM disk also has the ability to load compressed RAM disk images,
-allowing one to squeeze more programs onto an average installation or
-rescue floppy disk.
+for /dev/ram0, etc.
-2) Parameters
----------------------------------
+2) Module parameters
+--------------------
-2a) Kernel Command Line Parameters
-
- ramdisk_size=N
+ rd_size=N
Size of the ramdisk.
This parameter tells the RAM disk driver to set up RAM disks of N k size. The
default is 4096 (4 MB).
-2b) Module parameters
-
rd_nr
/dev/ramX devices created.
max_part
Maximum partition number.
- rd_size
- See ramdisk_size.
-
-3) Using "rdev"
----------------
-
-"rdev" is an obsolete, deprecated, antiquated utility that could be used
-to set the boot device in a Linux kernel image.
-
-Instead of using rdev, just place the boot device information on the
-kernel command line and pass it to the kernel from the bootloader.
-
-You can also pass arguments to the kernel by setting FDARGS in
-arch/x86/boot/Makefile and specify in initrd image by setting FDINITRD in
-arch/x86/boot/Makefile.
-
-Some of the kernel command line boot options that may apply here are::
-
- ramdisk_size=M
-
-If you make a boot disk that has LILO, then for the above, you would use::
-
- append = "ramdisk_size=M"
-
-4) An Example of Creating a Compressed RAM Disk
------------------------------------------------
-
-To create a RAM disk image, you will need a spare block device to
-construct it on. This can be the RAM disk device itself, or an
-unused disk partition (such as an unmounted swap partition). For this
-example, we will use the RAM disk device, "/dev/ram0".
-
-Note: This technique should not be done on a machine with less than 8 MB
-of RAM. If using a spare disk partition instead of /dev/ram0, then this
-restriction does not apply.
-
-a) Decide on the RAM disk size that you want. Say 2 MB for this example.
- Create it by writing to the RAM disk device. (This step is not currently
- required, but may be in the future.) It is wise to zero out the
- area (esp. for disks) so that maximal compression is achieved for
- the unused blocks of the image that you are about to create::
-
- dd if=/dev/zero of=/dev/ram0 bs=1k count=2048
-
-b) Make a filesystem on it. Say ext2fs for this example::
-
- mke2fs -vm0 /dev/ram0 2048
-
-c) Mount it, copy the files you want to it (eg: /etc/* /dev/* ...)
- and unmount it again.
-
-d) Compress the contents of the RAM disk. The level of compression
- will be approximately 50% of the space used by the files. Unused
- space on the RAM disk will compress to almost nothing::
-
- dd if=/dev/ram0 bs=1k count=2048 | gzip -v9 > /tmp/ram_image.gz
-
-e) Put the kernel onto the floppy::
-
- dd if=zImage of=/dev/fd0 bs=1k
-
-f) Put the RAM disk image onto the floppy, after the kernel. Use an offset
- that is slightly larger than the kernel, so that you can put another
- (possibly larger) kernel onto the same floppy later without overlapping
- the RAM disk image. An offset of 400 kB for kernels about 350 kB in
- size would be reasonable. Make sure offset+size of ram_image.gz is
- not larger than the total space on your floppy (usually 1440 kB)::
-
- dd if=/tmp/ram_image.gz of=/dev/fd0 bs=1k seek=400
-
-g) Make sure that you have already specified the boot information in
- FDARGS and FDINITRD or that you use a bootloader to pass kernel
- command line boot options to the kernel.
-
-That is it. You now have your boot/root compressed RAM disk floppy. Some
-users may wish to combine steps (d) and (f) by using a pipe.
-
Paul Gortmaker 12/95
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 16/62] brd: remove "ramdisk_size" command line parameter
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (14 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 15/62] doc: modernize Documentation/admin-guide/blockdev/ramdisk.rst Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-15 11:48 ` Christophe Leroy
2025-09-13 0:37 ` [PATCH RESEND 17/62] doc: modernize Documentation/filesystems/ramfs-rootfs-initramfs.rst Askar Safin
` (52 subsequent siblings)
68 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
It was used mostly for initrd. It could be used only if
brd is built-in. Use "brd.rd_size" instead
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
.../admin-guide/kernel-parameters.txt | 3 ---
Documentation/arch/m68k/kernel-options.rst | 20 ++-----------------
arch/arm/configs/s3c6400_defconfig | 2 +-
drivers/block/brd.c | 10 ----------
4 files changed, 3 insertions(+), 32 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index ad52e3d26014..e862a7b1d2ec 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5279,9 +5279,6 @@
raid= [HW,RAID]
See Documentation/admin-guide/md.rst.
- ramdisk_size= [RAM] Sizes of RAM disks in kilobytes
- See Documentation/admin-guide/blockdev/ramdisk.rst.
-
random.trust_cpu=off
[KNL,EARLY] Disable trusting the use of the CPU's
random number generator (if available) to
diff --git a/Documentation/arch/m68k/kernel-options.rst b/Documentation/arch/m68k/kernel-options.rst
index 2008a20b4329..f6469ebeb2c7 100644
--- a/Documentation/arch/m68k/kernel-options.rst
+++ b/Documentation/arch/m68k/kernel-options.rst
@@ -215,27 +215,11 @@ Devices possible for Atari:
seconds.
-2.6) ramdisk_size=
-------------------
-
-:Syntax: ramdisk_size=<size>
-
-This option instructs the kernel to set up a ramdisk of the given
-size in KBytes. Do not use this option if the ramdisk contents are
-passed by bootstrap! In this case, the size is selected automatically
-and should not be overwritten.
-
-The only application is for root filesystems on floppy disks, that
-should be loaded into memory. To do that, select the corresponding
-size of the disk as ramdisk size, and set the root device to the disk
-drive (with "root=").
-
-
-2.7) swap=
+2.5) swap=
I can't find any sign of this option in 2.2.6.
-2.8) buff=
+2.6) buff=
-----------
I can't find any sign of this option in 2.2.6.
diff --git a/arch/arm/configs/s3c6400_defconfig b/arch/arm/configs/s3c6400_defconfig
index a37e6ac40825..23635d5b9322 100644
--- a/arch/arm/configs/s3c6400_defconfig
+++ b/arch/arm/configs/s3c6400_defconfig
@@ -4,7 +4,7 @@ CONFIG_ARCH_MULTI_V6=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_S3C64XX=y
CONFIG_MACH_WLF_CRAGG_6410=y
-CONFIG_CMDLINE="console=ttySAC0,115200 root=/dev/ram init=/linuxrc initrd=0x51000000,6M ramdisk_size=6144"
+CONFIG_CMDLINE="console=ttySAC0,115200 root=/dev/ram init=/linuxrc initrd=0x51000000,6M"
CONFIG_VFP=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 72f02d2b8a99..05c4325904d2 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -222,16 +222,6 @@ MODULE_LICENSE("GPL");
MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR);
MODULE_ALIAS("rd");
-#ifndef MODULE
-/* Legacy boot options - nonmodular */
-static int __init ramdisk_size(char *str)
-{
- rd_size = simple_strtol(str, NULL, 0);
- return 1;
-}
-__setup("ramdisk_size=", ramdisk_size);
-#endif
-
/*
* The device scheme is derived from loop.c. Keep them in synch where possible
* (should share code eventually).
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 16/62] brd: remove "ramdisk_size" command line parameter
2025-09-13 0:37 ` [PATCH RESEND 16/62] brd: remove "ramdisk_size" command line parameter Askar Safin
@ 2025-09-15 11:48 ` Christophe Leroy
0 siblings, 0 replies; 95+ messages in thread
From: Christophe Leroy @ 2025-09-15 11:48 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Le 13/09/2025 à 02:37, Askar Safin a écrit :
> [Vous ne recevez pas souvent de courriers de safinaskar@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> It was used mostly for initrd. It could be used only if
> brd is built-in. Use "brd.rd_size" instead
For me it would make more sense to remove ramdisk_start and ramdisk_size
at the same time.
>
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
> ---
> .../admin-guide/kernel-parameters.txt | 3 ---
> Documentation/arch/m68k/kernel-options.rst | 20 ++-----------------
> arch/arm/configs/s3c6400_defconfig | 2 +-
> drivers/block/brd.c | 10 ----------
> 4 files changed, 3 insertions(+), 32 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index ad52e3d26014..e862a7b1d2ec 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -5279,9 +5279,6 @@
> raid= [HW,RAID]
> See Documentation/admin-guide/md.rst.
>
> - ramdisk_size= [RAM] Sizes of RAM disks in kilobytes
> - See Documentation/admin-guide/blockdev/ramdisk.rst.
> -
> random.trust_cpu=off
> [KNL,EARLY] Disable trusting the use of the CPU's
> random number generator (if available) to
> diff --git a/Documentation/arch/m68k/kernel-options.rst b/Documentation/arch/m68k/kernel-options.rst
> index 2008a20b4329..f6469ebeb2c7 100644
> --- a/Documentation/arch/m68k/kernel-options.rst
> +++ b/Documentation/arch/m68k/kernel-options.rst
> @@ -215,27 +215,11 @@ Devices possible for Atari:
> seconds.
>
>
> -2.6) ramdisk_size=
> -------------------
> -
> -:Syntax: ramdisk_size=<size>
> -
> -This option instructs the kernel to set up a ramdisk of the given
> -size in KBytes. Do not use this option if the ramdisk contents are
> -passed by bootstrap! In this case, the size is selected automatically
> -and should not be overwritten.
> -
> -The only application is for root filesystems on floppy disks, that
> -should be loaded into memory. To do that, select the corresponding
> -size of the disk as ramdisk size, and set the root device to the disk
> -drive (with "root=").
> -
> -
> -2.7) swap=
> +2.5) swap=
>
> I can't find any sign of this option in 2.2.6.
>
> -2.8) buff=
> +2.6) buff=
> -----------
>
> I can't find any sign of this option in 2.2.6.
> diff --git a/arch/arm/configs/s3c6400_defconfig b/arch/arm/configs/s3c6400_defconfig
> index a37e6ac40825..23635d5b9322 100644
> --- a/arch/arm/configs/s3c6400_defconfig
> +++ b/arch/arm/configs/s3c6400_defconfig
> @@ -4,7 +4,7 @@ CONFIG_ARCH_MULTI_V6=y
> # CONFIG_ARCH_MULTI_V7 is not set
> CONFIG_ARCH_S3C64XX=y
> CONFIG_MACH_WLF_CRAGG_6410=y
> -CONFIG_CMDLINE="console=ttySAC0,115200 root=/dev/ram init=/linuxrc initrd=0x51000000,6M ramdisk_size=6144"
> +CONFIG_CMDLINE="console=ttySAC0,115200 root=/dev/ram init=/linuxrc initrd=0x51000000,6M"
> CONFIG_VFP=y
> CONFIG_MODULES=y
> CONFIG_MODULE_UNLOAD=y
> diff --git a/drivers/block/brd.c b/drivers/block/brd.c
> index 72f02d2b8a99..05c4325904d2 100644
> --- a/drivers/block/brd.c
> +++ b/drivers/block/brd.c
> @@ -222,16 +222,6 @@ MODULE_LICENSE("GPL");
> MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR);
> MODULE_ALIAS("rd");
>
> -#ifndef MODULE
> -/* Legacy boot options - nonmodular */
> -static int __init ramdisk_size(char *str)
> -{
> - rd_size = simple_strtol(str, NULL, 0);
> - return 1;
> -}
> -__setup("ramdisk_size=", ramdisk_size);
> -#endif
> -
> /*
> * The device scheme is derived from loop.c. Keep them in synch where possible
> * (should share code eventually).
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 17/62] doc: modernize Documentation/filesystems/ramfs-rootfs-initramfs.rst
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (15 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 16/62] brd: remove "ramdisk_size" command line parameter Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-15 21:05 ` Rob Landley
2025-09-13 0:37 ` [PATCH RESEND 18/62] doc: modernize Documentation/driver-api/early-userspace/early_userspace_support.rst Askar Safin
` (51 subsequent siblings)
68 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Update it to reflect initrd removal.
Also I specified that error reports should
go to linux-doc@vger.kernel.org , because
Rob Landley said that he keeps getting
reports about this document and is unable
to fix them
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
.../filesystems/ramfs-rootfs-initramfs.rst | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/Documentation/filesystems/ramfs-rootfs-initramfs.rst b/Documentation/filesystems/ramfs-rootfs-initramfs.rst
index fa4f81099cb4..38a9cf11f547 100644
--- a/Documentation/filesystems/ramfs-rootfs-initramfs.rst
+++ b/Documentation/filesystems/ramfs-rootfs-initramfs.rst
@@ -8,6 +8,8 @@ October 17, 2005
:Author: Rob Landley <rob@landley.net>
+Report errors in this document to <linux-doc@vger.kernel.org>
+
What is ramfs?
--------------
@@ -101,9 +103,9 @@ archive is extracted into it, the kernel will fall through to the older code
to locate and mount a root partition, then exec some variant of /sbin/init
out of that.
-All this differs from the old initrd in several ways:
+All this differs from the old initrd (removed in 2025) in several ways:
- - The old initrd was always a separate file, while the initramfs archive is
+ - The old initrd was always a separate file, while the initramfs archive can be
linked into the linux kernel image. (The directory ``linux-*/usr`` is
devoted to generating this archive during the build.)
@@ -137,7 +139,7 @@ Populating initramfs:
The 2.6 kernel build process always creates a gzipped cpio format initramfs
archive and links it into the resulting kernel binary. By default, this
-archive is empty (consuming 134 bytes on x86).
+archive is nearly empty (consuming 134 bytes on x86).
The config option CONFIG_INITRAMFS_SOURCE (in General Setup in menuconfig,
and living in usr/Kconfig) can be used to specify a source for the
@@ -222,15 +224,13 @@ use in place of the above config file::
External initramfs images:
--------------------------
-If the kernel has initrd support enabled, an external cpio.gz archive can also
-be passed into a 2.6 kernel in place of an initrd. In this case, the kernel
-will autodetect the type (initramfs, not initrd) and extract the external cpio
+If the kernel has CONFIG_BLK_DEV_INITRD enabled, an external cpio.gz archive can also
+be passed into a 2.6 kernel. In this case, the kernel will extract the external cpio
archive into rootfs before trying to run /init.
-This has the memory efficiency advantages of initramfs (no ramdisk block
-device) but the separate packaging of initrd (which is nice if you have
+This is nice if you have
non-GPL code you'd like to run from initramfs, without conflating it with
-the GPL licensed Linux kernel binary).
+the GPL licensed Linux kernel binary.
It can also be used to supplement the kernel's built-in initramfs image. The
files in the external archive will overwrite any conflicting files in
@@ -278,7 +278,7 @@ User Mode Linux, like so::
EOF
gcc -static hello.c -o init
echo init | cpio -o -H newc | gzip > test.cpio.gz
- # Testing external initramfs using the initrd loading mechanism.
+ # Testing external initramfs.
qemu -kernel /boot/vmlinuz -initrd test.cpio.gz /dev/zero
When debugging a normal root filesystem, it's nice to be able to boot with
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 17/62] doc: modernize Documentation/filesystems/ramfs-rootfs-initramfs.rst
2025-09-13 0:37 ` [PATCH RESEND 17/62] doc: modernize Documentation/filesystems/ramfs-rootfs-initramfs.rst Askar Safin
@ 2025-09-15 21:05 ` Rob Landley
0 siblings, 0 replies; 95+ messages in thread
From: Rob Landley @ 2025-09-15 21:05 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Lennart Poettering, linux-arch, linux-alpha, linux-snps-arc,
linux-arm-kernel, linux-csky, linux-hexagon, loongarch,
linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
On 9/12/25 19:37, Askar Safin wrote:
> Update it to reflect initrd removal.
>
> Also I specified that error reports should
> go to linux-doc@vger.kernel.org , because
> Rob Landley said that he keeps getting
> reports about this document and is unable
> to fix them
Do you think emailing a list I could forward stuff to will improve matters?
I find the community an elaborate bureaucracy unresponsive to hobbyists.
Documentation/process/submitting-patches.rst being a 934 line document
with a bibliography, plus a 24 step checklist not counting the a) b) c)
subsections are just symptoms. The real problem is following those is
not sufficient to navigate said bureaucracy.
> What is ramfs?
> --------------
>
> @@ -101,9 +103,9 @@ archive is extracted into it, the kernel will fall through to the older code
> to locate and mount a root partition, then exec some variant of /sbin/init
> out of that.
>
> -All this differs from the old initrd in several ways:
> +All this differs from the old initrd (removed in 2025) in several ways:
Why keep the section when you removed the old mechanism? You took away
their choices, you don't need to sell them on it.
(Unless you're trying to sell them on using a current linux kernel
rather than 2.6 or bsd or qnx or something. But if they _do_ remove 32
bit support, or stick a rust dependency in the base build, I suspect
that ship has sailed...)
> - - The old initrd was always a separate file, while the initramfs archive is
> + - The old initrd was always a separate file, while the initramfs archive can be
> linked into the linux kernel image. (The directory ``linux-*/usr`` is
> devoted to generating this archive during the build.)
>
> @@ -137,7 +139,7 @@ Populating initramfs:
>
> The 2.6 kernel build process always creates a gzipped cpio format initramfs
> archive and links it into the resulting kernel binary. By default, this
> -archive is empty (consuming 134 bytes on x86).
> +archive is nearly empty (consuming 134 bytes on x86).
Those two lines you just touched contradict each other.
For historical reference, commit c33df4eaaf41 in 2007 added a second
codepath to special case NOT having an initramfs, for some reason.
That's how static linked cpio in the kernel image and external initrd=
loaded cpio from the bootloader wound up having different behavior.
The init/noinitramfs.c file does init/mkdir("/dev") and
init_mknod("/dev/console") because calling the syscall_blah() functions
directly was considered icky so they created gratuitous wrappers to do
it for you instead, because that's cleaner somehow. (Presumably the same
logic as C++ having get and set methods that perform a simple assignment
and return a value. Because YOU can't be trusted to touch MY code.)
Note that ONLY init/noinitramfs.c creates /dev/console. You'd THINK the
logical thing to do would be to detect failure of the filp_open() in
console_on_rootfs() and do the mkdir/mknod there and retry (since that's
__init code too), but no...
My VERY vague recollection from back in the dark ages is if you didn't
specify any INITRAMFS_SOURCE in kconfig then gen_init_cpio got called
with no arguments and spit out a "usage" section that got interpreted as
scripts/gen_initramfs_list.sh output, back when the plumbing ignored
lines it didn't understand but there was an "example: a simple
initramfs" section in the usage with "dir /dev" and "nod /dev/console"
lines that created a cpio archive with /dev/console in it which would
get statically linked in as a "default", and code reached out and used
this because it was there without understanding WHY it was there. So it
initially worked by coincidence, and rather than make it explicit they
went "two codepaths, half the testing!" and thus...
Anyway, that's why the 130+ byte archive was there. It wasn't actually
empty, even when initramfs was disabled.
One of the "cleanups that didn't actually fix it" was
https://github.com/mpe/linux-fullhistory/commit/2bd3a997befc if you want
to dig into the history yourself. I wrote my docs in 2005 and that was
2010 so "somewhere in there"...
> -If the kernel has initrd support enabled, an external cpio.gz archive can also
> -be passed into a 2.6 kernel in place of an initrd. In this case, the kernel
> -will autodetect the type (initramfs, not initrd) and extract the external cpio
> +If the kernel has CONFIG_BLK_DEV_INITRD enabled, an external cpio.gz archive can also
You renamed that symbol, then even you use the old name here.
> +be passed into a 2.6 kernel. In this case, the kernel will extract the external cpio
> archive into rootfs before trying to run /init.
>
> -This has the memory efficiency advantages of initramfs (no ramdisk block
> -device) but the separate packaging of initrd (which is nice if you have
> +This is nice if you have
> non-GPL code you'd like to run from initramfs, without conflating it with
> -the GPL licensed Linux kernel binary).
> +the GPL licensed Linux kernel binary.
IANAL: Whether or not this qualifies as "mere aggregation" had yet to go
to court last I heard.
Which is basically why
https://hackmd.io/@starnight/Load_Firmware_Files_Later_in_Linux_Kernel
was so screwed up in the first place: the logical thing to do would be
put the firmware in a static initramfs and have the module
initialization happen after initramfs was populated... BUT LICENSING! We
must have a much more complicated implementation because license. I
believe I suggested passing said initramfs in via the initrd mechanism
so it remains a separate file until boot time, and was ignored. *shrug*
The usual...
> It can also be used to supplement the kernel's built-in initramfs image. The
> files in the external archive will overwrite any conflicting files in
> @@ -278,7 +278,7 @@ User Mode Linux, like so::
> EOF
> gcc -static hello.c -o init
> echo init | cpio -o -H newc | gzip > test.cpio.gz
> - # Testing external initramfs using the initrd loading mechanism.
> + # Testing external initramfs.
Does grub not still call it "initrd"?
> qemu -kernel /boot/vmlinuz -initrd test.cpio.gz /dev/zero
A) they added -hda so you don't have to give it a dummy /dev/zero anymore.
B) there's no longer a "qemu" defaulting to the current architecture,
you have to explicitly specify qemu-system-blah unless you create the
symlink yourself by hand. This was considered an "improvement" by IBM
bureaucrats. (Not a regression, a "feature". Oh well...)
C) to be honest I'd just point people at mkroot for examples these days,
but I'm biased. (It smells like me.)
Rob
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 18/62] doc: modernize Documentation/driver-api/early-userspace/early_userspace_support.rst
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (16 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 17/62] doc: modernize Documentation/filesystems/ramfs-rootfs-initramfs.rst Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 19/62] init: remove mentions of "ramdisk=" command line parameter Askar Safin
` (50 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Update it to reflect initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
.../early_userspace_support.rst | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/Documentation/driver-api/early-userspace/early_userspace_support.rst b/Documentation/driver-api/early-userspace/early_userspace_support.rst
index 61bdeac1bae5..0ca923c1007b 100644
--- a/Documentation/driver-api/early-userspace/early_userspace_support.rst
+++ b/Documentation/driver-api/early-userspace/early_userspace_support.rst
@@ -127,28 +127,22 @@ mailing list at https://www.zytor.com/mailman/listinfo/klibc
How does it work?
=================
-The kernel has currently 3 ways to mount the root filesystem:
+The kernel has currently 2 ways to mount the root filesystem:
a) all required device and filesystem drivers compiled into the kernel, no
- initrd. init/main.c:init() will call prepare_namespace() to mount the
+ initramfs. init/main.c:kernel_init_freeable() will call prepare_namespace() to mount the
final root filesystem, based on the root= option and optional init= to run
- some other init binary than listed at the end of init/main.c:init().
+ some other init binary than listed at the end of init/main.c:kernel_init().
-b) some device and filesystem drivers built as modules and stored in an
- initrd. The initrd must contain a binary '/linuxrc' which is supposed to
- load these driver modules. It is also possible to mount the final root
- filesystem via linuxrc and use the pivot_root syscall. The initrd is
- mounted and executed via prepare_namespace().
-
-c) using initramfs. The call to prepare_namespace() must be skipped.
+b) using initramfs. The call to prepare_namespace() must be skipped.
This means that a binary must do all the work. Said binary can be stored
into initramfs either via modifying usr/gen_init_cpio.c or via the new
- initrd format, an cpio archive. It must be called "/init". This binary
+ initramfs format, an cpio archive. It must be called "/init". This binary
is responsible to do all the things prepare_namespace() would do.
To maintain backwards compatibility, the /init binary will only run if it
comes via an initramfs cpio archive. If this is not the case,
- init/main.c:init() will run prepare_namespace() to mount the final root
+ init/main.c:kernel_init_freeable() will run prepare_namespace() to mount the final root
and exec one of the predefined init binaries.
Bryan O'Sullivan <bos@serpentine.com>
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 19/62] init: remove mentions of "ramdisk=" command line parameter
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (17 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 18/62] doc: modernize Documentation/driver-api/early-userspace/early_userspace_support.rst Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-13 0:37 ` [PATCH RESEND 20/62] doc: remove Documentation/power/swsusp-dmcrypt.rst Askar Safin
` (49 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
It is already removed
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/boot/dts/samsung/exynos4210-origen.dts | 2 +-
arch/arm/boot/dts/samsung/exynos4210-smdkv310.dts | 2 +-
arch/arm/boot/dts/samsung/exynos4412-smdk4412.dts | 2 +-
arch/arm/boot/dts/samsung/exynos5250-smdk5250.dts | 2 +-
arch/arm/configs/exynos_defconfig | 2 +-
arch/arm/configs/s5pv210_defconfig | 2 +-
drivers/block/Kconfig | 1 -
7 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/arch/arm/boot/dts/samsung/exynos4210-origen.dts b/arch/arm/boot/dts/samsung/exynos4210-origen.dts
index f1927ca15e08..4dcf794bd18b 100644
--- a/arch/arm/boot/dts/samsung/exynos4210-origen.dts
+++ b/arch/arm/boot/dts/samsung/exynos4210-origen.dts
@@ -36,7 +36,7 @@ aliases {
};
chosen {
- bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M init=/linuxrc";
+ bootargs = "root=/dev/ram0 rw initrd=0x41000000,8M init=/linuxrc";
stdout-path = "serial2:115200n8";
};
diff --git a/arch/arm/boot/dts/samsung/exynos4210-smdkv310.dts b/arch/arm/boot/dts/samsung/exynos4210-smdkv310.dts
index 18f4f494093b..4cdeddeff3fc 100644
--- a/arch/arm/boot/dts/samsung/exynos4210-smdkv310.dts
+++ b/arch/arm/boot/dts/samsung/exynos4210-smdkv310.dts
@@ -30,7 +30,7 @@ aliases {
};
chosen {
- bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M init=/linuxrc";
+ bootargs = "root=/dev/ram0 rw initrd=0x41000000,8M init=/linuxrc";
stdout-path = "serial1:115200n8";
};
diff --git a/arch/arm/boot/dts/samsung/exynos4412-smdk4412.dts b/arch/arm/boot/dts/samsung/exynos4412-smdk4412.dts
index c83fb250e664..4b18cc55d6ca 100644
--- a/arch/arm/boot/dts/samsung/exynos4412-smdk4412.dts
+++ b/arch/arm/boot/dts/samsung/exynos4412-smdk4412.dts
@@ -27,7 +27,7 @@ aliases {
};
chosen {
- bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M init=/linuxrc";
+ bootargs = "root=/dev/ram0 rw initrd=0x41000000,8M init=/linuxrc";
stdout-path = "serial1:115200n8";
};
diff --git a/arch/arm/boot/dts/samsung/exynos5250-smdk5250.dts b/arch/arm/boot/dts/samsung/exynos5250-smdk5250.dts
index bb623726ef1e..4164c7c2a3eb 100644
--- a/arch/arm/boot/dts/samsung/exynos5250-smdk5250.dts
+++ b/arch/arm/boot/dts/samsung/exynos5250-smdk5250.dts
@@ -27,7 +27,7 @@ memory@40000000 {
};
chosen {
- bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M init=/linuxrc";
+ bootargs = "root=/dev/ram0 rw initrd=0x41000000,8M init=/linuxrc";
stdout-path = "serial2:115200n8";
};
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index 6915c766923a..77d3521f55d4 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -15,7 +15,7 @@ CONFIG_HIGHMEM=y
CONFIG_SECCOMP=y
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
-CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M"
+CONFIG_CMDLINE="root=/dev/ram0 rw initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
diff --git a/arch/arm/configs/s5pv210_defconfig b/arch/arm/configs/s5pv210_defconfig
index 02121eec3658..8ec82d9b51e4 100644
--- a/arch/arm/configs/s5pv210_defconfig
+++ b/arch/arm/configs/s5pv210_defconfig
@@ -8,7 +8,7 @@ CONFIG_KALLSYMS_ALL=y
CONFIG_ARCH_S5PV210=y
CONFIG_VMSPLIT_2G=y
CONFIG_ARM_APPENDED_DTB=y
-CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc"
+CONFIG_CMDLINE="root=/dev/ram0 rw initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index df38fb364904..8cf06e40f61c 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -229,7 +229,6 @@ config BLK_DEV_RAM
store a copy of a minimal root file system off of a floppy into RAM
during the initial install of Linux.
- Note that the kernel command line option "ramdisk=XX" is now obsolete.
For details, read <file:Documentation/admin-guide/blockdev/ramdisk.rst>.
To compile this driver as a module, choose M here: the
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 20/62] doc: remove Documentation/power/swsusp-dmcrypt.rst
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (18 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 19/62] init: remove mentions of "ramdisk=" command line parameter Askar Safin
@ 2025-09-13 0:37 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 21/62] init: remove all mentions of root=/dev/ram* Askar Safin
` (48 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:37 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
It contains obsolete initrd and lilo based instructions
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/power/index.rst | 1 -
Documentation/power/swsusp-dmcrypt.rst | 140 ------------------
.../translations/zh_CN/power/index.rst | 1 -
3 files changed, 142 deletions(-)
delete mode 100644 Documentation/power/swsusp-dmcrypt.rst
diff --git a/Documentation/power/index.rst b/Documentation/power/index.rst
index a0f5244fb427..9f1758c92e48 100644
--- a/Documentation/power/index.rst
+++ b/Documentation/power/index.rst
@@ -22,7 +22,6 @@ Power Management
suspend-and-cpuhotplug
suspend-and-interrupts
swsusp-and-swap-files
- swsusp-dmcrypt
swsusp
video
tricks
diff --git a/Documentation/power/swsusp-dmcrypt.rst b/Documentation/power/swsusp-dmcrypt.rst
deleted file mode 100644
index afb29a58fdf8..000000000000
--- a/Documentation/power/swsusp-dmcrypt.rst
+++ /dev/null
@@ -1,140 +0,0 @@
-=======================================
-How to use dm-crypt and swsusp together
-=======================================
-
-Author: Andreas Steinmetz <ast@domdv.de>
-
-
-
-Some prerequisites:
-You know how dm-crypt works. If not, visit the following web page:
-http://www.saout.de/misc/dm-crypt/
-You have read Documentation/power/swsusp.rst and understand it.
-You did read Documentation/filesystems/ramfs-rootfs-initramfs.rst and know how an initrd works.
-You know how to create or how to modify an initrd.
-
-Now your system is properly set up, your disk is encrypted except for
-the swap device(s) and the boot partition which may contain a mini
-system for crypto setup and/or rescue purposes. You may even have
-an initrd that does your current crypto setup already.
-
-At this point you want to encrypt your swap, too. Still you want to
-be able to suspend using swsusp. This, however, means that you
-have to be able to either enter a passphrase or that you read
-the key(s) from an external device like a pcmcia flash disk
-or an usb stick prior to resume. So you need an initrd, that sets
-up dm-crypt and then asks swsusp to resume from the encrypted
-swap device.
-
-The most important thing is that you set up dm-crypt in such
-a way that the swap device you suspend to/resume from has
-always the same major/minor within the initrd as well as
-within your running system. The easiest way to achieve this is
-to always set up this swap device first with dmsetup, so that
-it will always look like the following::
-
- brw------- 1 root root 254, 0 Jul 28 13:37 /dev/mapper/swap0
-
-Now set up your kernel to use /dev/mapper/swap0 as the default
-resume partition, so your kernel .config contains::
-
- CONFIG_PM_STD_PARTITION="/dev/mapper/swap0"
-
-Prepare your boot loader to use the initrd you will create or
-modify. For lilo the simplest setup looks like the following
-lines::
-
- image=/boot/vmlinuz
- initrd=/boot/initrd.gz
- label=linux
- append="root=/dev/ram0 init=/linuxrc rw"
-
-Finally you need to create or modify your initrd. Lets assume
-you create an initrd that reads the required dm-crypt setup
-from a pcmcia flash disk card. The card is formatted with an ext2
-fs which resides on /dev/hde1 when the card is inserted. The
-card contains at least the encrypted swap setup in a file
-named "swapkey". /etc/fstab of your initrd contains something
-like the following::
-
- /dev/hda1 /mnt ext3 ro 0 0
- none /proc proc defaults,noatime,nodiratime 0 0
- none /sys sysfs defaults,noatime,nodiratime 0 0
-
-/dev/hda1 contains an unencrypted mini system that sets up all
-of your crypto devices, again by reading the setup from the
-pcmcia flash disk. What follows now is a /linuxrc for your
-initrd that allows you to resume from encrypted swap and that
-continues boot with your mini system on /dev/hda1 if resume
-does not happen::
-
- #!/bin/sh
- PATH=/sbin:/bin:/usr/sbin:/usr/bin
- mount /proc
- mount /sys
- mapped=0
- noresume=`grep -c noresume /proc/cmdline`
- if [ "$*" != "" ]
- then
- noresume=1
- fi
- dmesg -n 1
- /sbin/cardmgr -q
- for i in 1 2 3 4 5 6 7 8 9 0
- do
- if [ -f /proc/ide/hde/media ]
- then
- usleep 500000
- mount -t ext2 -o ro /dev/hde1 /mnt
- if [ -f /mnt/swapkey ]
- then
- dmsetup create swap0 /mnt/swapkey > /dev/null 2>&1 && mapped=1
- fi
- umount /mnt
- break
- fi
- usleep 500000
- done
- killproc /sbin/cardmgr
- dmesg -n 6
- if [ $mapped = 1 ]
- then
- if [ $noresume != 0 ]
- then
- mkswap /dev/mapper/swap0 > /dev/null 2>&1
- fi
- echo 254:0 > /sys/power/resume
- dmsetup remove swap0
- fi
- umount /sys
- mount /mnt
- umount /proc
- cd /mnt
- pivot_root . mnt
- mount /proc
- umount -l /mnt
- umount /proc
- exec chroot . /sbin/init $* < dev/console > dev/console 2>&1
-
-Please don't mind the weird loop above, busybox's msh doesn't know
-the let statement. Now, what is happening in the script?
-First we have to decide if we want to try to resume, or not.
-We will not resume if booting with "noresume" or any parameters
-for init like "single" or "emergency" as boot parameters.
-
-Then we need to set up dmcrypt with the setup data from the
-pcmcia flash disk. If this succeeds we need to reset the swap
-device if we don't want to resume. The line "echo 254:0 > /sys/power/resume"
-then attempts to resume from the first device mapper device.
-Note that it is important to set the device in /sys/power/resume,
-regardless if resuming or not, otherwise later suspend will fail.
-If resume starts, script execution terminates here.
-
-Otherwise we just remove the encrypted swap device and leave it to the
-mini system on /dev/hda1 to set the whole crypto up (it is up to
-you to modify this to your taste).
-
-What then follows is the well known process to change the root
-file system and continue booting from there. I prefer to unmount
-the initrd prior to continue booting but it is up to you to modify
-this.
diff --git a/Documentation/translations/zh_CN/power/index.rst b/Documentation/translations/zh_CN/power/index.rst
index bc54983ba515..4ee880e65107 100644
--- a/Documentation/translations/zh_CN/power/index.rst
+++ b/Documentation/translations/zh_CN/power/index.rst
@@ -32,7 +32,6 @@ TODOList:
* suspend-and-cpuhotplug
* suspend-and-interrupts
* swsusp-and-swap-files
- * swsusp-dmcrypt
* swsusp
* video
* tricks
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 21/62] init: remove all mentions of root=/dev/ram*
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (19 preceding siblings ...)
2025-09-13 0:37 ` [PATCH RESEND 20/62] doc: remove Documentation/power/swsusp-dmcrypt.rst Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-14 10:06 ` Krzysztof Kozlowski
2025-09-13 0:38 ` [PATCH RESEND 22/62] doc: remove obsolete mentions of pivot_root Askar Safin
` (47 subsequent siblings)
68 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Initrd support is removed, so root=/dev/ram* is never correct
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/admin-guide/kernel-parameters.txt | 3 +--
Documentation/arch/m68k/kernel-options.rst | 9 ++-------
arch/arm/boot/dts/arm/integratorap.dts | 2 +-
arch/arm/boot/dts/arm/integratorcp.dts | 2 +-
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-cmm.dts | 2 +-
.../boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dts | 2 +-
.../arm/boot/dts/aspeed/aspeed-bmc-facebook-minipack.dts | 2 +-
.../arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge100.dts | 2 +-
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge40.dts | 2 +-
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yamp.dts | 2 +-
.../boot/dts/aspeed/ast2600-facebook-netbmc-common.dtsi | 2 +-
arch/arm/boot/dts/hisilicon/hi3620-hi4511.dts | 2 +-
.../boot/dts/intel/ixp/intel-ixp42x-welltech-epbx100.dts | 2 +-
arch/arm/boot/dts/nspire/nspire-classic.dtsi | 2 +-
arch/arm/boot/dts/nspire/nspire-cx.dts | 2 +-
arch/arm/boot/dts/samsung/exynos4210-origen.dts | 2 +-
arch/arm/boot/dts/samsung/exynos4210-smdkv310.dts | 2 +-
arch/arm/boot/dts/samsung/exynos4412-smdk4412.dts | 2 +-
arch/arm/boot/dts/samsung/exynos5250-smdk5250.dts | 2 +-
arch/arm/boot/dts/st/ste-nomadik-nhk15.dts | 2 +-
arch/arm/boot/dts/st/ste-nomadik-s8815.dts | 2 +-
arch/arm/boot/dts/st/stm32429i-eval.dts | 2 +-
arch/arm/boot/dts/st/stm32746g-eval.dts | 2 +-
arch/arm/boot/dts/st/stm32f429-disco.dts | 2 +-
arch/arm/boot/dts/st/stm32f469-disco.dts | 2 +-
arch/arm/boot/dts/st/stm32f746-disco.dts | 2 +-
arch/arm/boot/dts/st/stm32f769-disco.dts | 2 +-
arch/arm/boot/dts/st/stm32h743i-disco.dts | 2 +-
arch/arm/boot/dts/st/stm32h743i-eval.dts | 2 +-
arch/arm/boot/dts/st/stm32h747i-disco.dts | 2 +-
arch/arm/boot/dts/st/stm32h750i-art-pi.dts | 2 +-
arch/arm/configs/assabet_defconfig | 2 +-
arch/arm/configs/at91_dt_defconfig | 2 +-
arch/arm/configs/exynos_defconfig | 2 +-
arch/arm/configs/lpc32xx_defconfig | 2 +-
arch/arm/configs/pxa_defconfig | 2 +-
arch/arm/configs/s3c6400_defconfig | 2 +-
arch/arm/configs/s5pv210_defconfig | 2 +-
arch/arm/configs/sama5_defconfig | 2 +-
arch/arm/configs/u8500_defconfig | 2 +-
arch/parisc/defpalo.conf | 2 +-
arch/s390/boot/ipl_parm.c | 2 +-
arch/xtensa/Kconfig | 2 +-
arch/xtensa/boot/dts/csp.dts | 2 +-
44 files changed, 45 insertions(+), 51 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index e862a7b1d2ec..a259f2bdba0f 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -6407,8 +6407,7 @@
Usually this is a block device specifier of some kind,
see the early_lookup_bdev comment in
block/early-lookup.c for details.
- Alternatively this can be "ram" for the legacy initial
- ramdisk, "nfs" and "cifs" for root on a network file
+ Alternatively this can be "nfs" and "cifs" for root on a network file
system, or "mtd" and "ubi" for mounting from raw flash.
rootdelay= [KNL] Delay (in seconds) to pause before attempting to
diff --git a/Documentation/arch/m68k/kernel-options.rst b/Documentation/arch/m68k/kernel-options.rst
index f6469ebeb2c7..a508ee8efa8b 100644
--- a/Documentation/arch/m68k/kernel-options.rst
+++ b/Documentation/arch/m68k/kernel-options.rst
@@ -73,7 +73,6 @@ hardcoded name to number mappings. The name must always be a
combination of two or three letters, followed by a decimal number.
Valid names are::
- /dev/ram: -> 0x0100 (initial ramdisk)
/dev/hda: -> 0x0300 (first IDE disk)
/dev/hdb: -> 0x0340 (second IDE disk)
/dev/sda: -> 0x0800 (first SCSI disk)
@@ -86,12 +85,8 @@ Valid names are::
The name must be followed by a decimal number, that stands for the
partition number. Internally, the value of the number is just
added to the device number mentioned in the table above. The
-exceptions are /dev/ram and /dev/fd, where /dev/ram refers to an
-initial ramdisk loaded by your bootstrap program (please consult the
-instructions for your bootstrap program to find out how to load an
-initial ramdisk). As of kernel version 2.0.18 you must specify
-/dev/ram as the root device if you want to boot from an initial
-ramdisk. For the floppy devices, /dev/fd, the number stands for the
+exception is /dev/fd.
+For the floppy devices, /dev/fd, the number stands for the
floppy drive number (there are no partitions on floppy disks). I.e.,
/dev/fd0 stands for the first drive, /dev/fd1 for the second, and so
on. Since the number is just added, you can also force the disk format
diff --git a/arch/arm/boot/dts/arm/integratorap.dts b/arch/arm/boot/dts/arm/integratorap.dts
index 9b6a1dbaf265..2e43a8291d40 100644
--- a/arch/arm/boot/dts/arm/integratorap.dts
+++ b/arch/arm/boot/dts/arm/integratorap.dts
@@ -53,7 +53,7 @@ aliases {
};
chosen {
- bootargs = "root=/dev/ram0 console=ttyAM0,38400n8 earlyprintk";
+ bootargs = "console=ttyAM0,38400n8 earlyprintk";
};
/* 24 MHz chrystal on the Integrator/AP development board */
diff --git a/arch/arm/boot/dts/arm/integratorcp.dts b/arch/arm/boot/dts/arm/integratorcp.dts
index 8ad1a8957ace..2ac140741752 100644
--- a/arch/arm/boot/dts/arm/integratorcp.dts
+++ b/arch/arm/boot/dts/arm/integratorcp.dts
@@ -11,7 +11,7 @@ / {
compatible = "arm,integrator-cp";
chosen {
- bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk";
+ bootargs = "console=ttyAMA0,38400n8 earlyprintk";
};
cpus {
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-cmm.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-cmm.dts
index 24153868cc00..f4ae167e89f0 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-cmm.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-cmm.dts
@@ -280,7 +280,7 @@ aliases {
chosen {
stdout-path = &uart1;
- bootargs = "console=ttyS1,9600n8 root=/dev/ram rw earlycon";
+ bootargs = "console=ttyS1,9600n8 rw earlycon";
};
ast-adc-hwmon {
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dts
index 60e875ac2461..d51ee3aaa461 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dts
@@ -10,7 +10,7 @@ / {
chosen {
stdout-path = &uart5;
- bootargs = "console=ttyS0,9600n8 root=/dev/ram rw";
+ bootargs = "console=ttyS0,9600n8 rw";
};
ast-adc-hwmon {
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minipack.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minipack.dts
index aafd1042b6e5..4233d0d857b8 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minipack.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minipack.dts
@@ -230,7 +230,7 @@ aliases {
chosen {
stdout-path = &uart1;
- bootargs = "debug console=ttyS1,9600n8 root=/dev/ram rw";
+ bootargs = "debug console=ttyS1,9600n8 rw";
};
};
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge100.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge100.dts
index 97cd11c3d9a5..23f9d1c690f8 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge100.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge100.dts
@@ -10,7 +10,7 @@ / {
chosen {
stdout-path = &uart3;
- bootargs = "console=ttyS2,9600n8 root=/dev/ram rw";
+ bootargs = "console=ttyS2,9600n8 rw";
};
ast-adc-hwmon {
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge40.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge40.dts
index 6624855d8ebd..e9b1b51f9f7a 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge40.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge40.dts
@@ -10,7 +10,7 @@ / {
chosen {
stdout-path = &uart3;
- bootargs = "console=ttyS2,9600n8 root=/dev/ram rw";
+ bootargs = "console=ttyS2,9600n8 rw";
};
ast-adc-hwmon {
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yamp.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yamp.dts
index 98fe0d6c8188..578ca0dc9647 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yamp.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yamp.dts
@@ -21,7 +21,7 @@ aliases {
chosen {
stdout-path = &uart5;
- bootargs = "console=ttyS0,9600n8 root=/dev/ram rw";
+ bootargs = "console=ttyS0,9600n8 rw";
};
};
diff --git a/arch/arm/boot/dts/aspeed/ast2600-facebook-netbmc-common.dtsi b/arch/arm/boot/dts/aspeed/ast2600-facebook-netbmc-common.dtsi
index 00e5887c926f..3dbf0cc70f48 100644
--- a/arch/arm/boot/dts/aspeed/ast2600-facebook-netbmc-common.dtsi
+++ b/arch/arm/boot/dts/aspeed/ast2600-facebook-netbmc-common.dtsi
@@ -12,7 +12,7 @@ aliases {
};
chosen {
- bootargs = "console=ttyS0,9600n8 root=/dev/ram rw vmalloc=640M";
+ bootargs = "console=ttyS0,9600n8 rw vmalloc=640M";
};
memory@80000000 {
diff --git a/arch/arm/boot/dts/hisilicon/hi3620-hi4511.dts b/arch/arm/boot/dts/hisilicon/hi3620-hi4511.dts
index f1c816a1d7cf..bbd62c6ad280 100644
--- a/arch/arm/boot/dts/hisilicon/hi3620-hi4511.dts
+++ b/arch/arm/boot/dts/hisilicon/hi3620-hi4511.dts
@@ -13,7 +13,7 @@ / {
compatible = "hisilicon,hi3620-hi4511";
chosen {
- bootargs = "root=/dev/ram0";
+ bootargs = "";
stdout-path = "serial0:115200n8";
};
diff --git a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-welltech-epbx100.dts b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-welltech-epbx100.dts
index c550c421b659..96105137a364 100644
--- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-welltech-epbx100.dts
+++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-welltech-epbx100.dts
@@ -20,7 +20,7 @@ memory@0 {
};
chosen {
- bootargs = "console=ttyS0,115200n8 root=/dev/ram0 initrd=0x00800000,9M";
+ bootargs = "console=ttyS0,115200n8 initrd=0x00800000,9M";
stdout-path = "uart0:115200n8";
};
diff --git a/arch/arm/boot/dts/nspire/nspire-classic.dtsi b/arch/arm/boot/dts/nspire/nspire-classic.dtsi
index 0ee53d3ecd54..224cf5921e26 100644
--- a/arch/arm/boot/dts/nspire/nspire-classic.dtsi
+++ b/arch/arm/boot/dts/nspire/nspire-classic.dtsi
@@ -81,6 +81,6 @@ panel_in: endpoint {
};
};
chosen {
- bootargs = "debug earlyprintk console=tty0 console=ttyS0,115200n8 root=/dev/ram0";
+ bootargs = "debug earlyprintk console=tty0 console=ttyS0,115200n8";
};
};
diff --git a/arch/arm/boot/dts/nspire/nspire-cx.dts b/arch/arm/boot/dts/nspire/nspire-cx.dts
index debeff0ec010..08155d15cca9 100644
--- a/arch/arm/boot/dts/nspire/nspire-cx.dts
+++ b/arch/arm/boot/dts/nspire/nspire-cx.dts
@@ -165,6 +165,6 @@ panel_in: endpoint {
};
};
chosen {
- bootargs = "debug earlyprintk console=tty0 console=ttyAMA0,115200n8 root=/dev/ram0";
+ bootargs = "debug earlyprintk console=tty0 console=ttyAMA0,115200n8";
};
};
diff --git a/arch/arm/boot/dts/samsung/exynos4210-origen.dts b/arch/arm/boot/dts/samsung/exynos4210-origen.dts
index 4dcf794bd18b..b714073143e7 100644
--- a/arch/arm/boot/dts/samsung/exynos4210-origen.dts
+++ b/arch/arm/boot/dts/samsung/exynos4210-origen.dts
@@ -36,7 +36,7 @@ aliases {
};
chosen {
- bootargs = "root=/dev/ram0 rw initrd=0x41000000,8M init=/linuxrc";
+ bootargs = "rw initrd=0x41000000,8M init=/linuxrc";
stdout-path = "serial2:115200n8";
};
diff --git a/arch/arm/boot/dts/samsung/exynos4210-smdkv310.dts b/arch/arm/boot/dts/samsung/exynos4210-smdkv310.dts
index 4cdeddeff3fc..2a3c2a4c0e90 100644
--- a/arch/arm/boot/dts/samsung/exynos4210-smdkv310.dts
+++ b/arch/arm/boot/dts/samsung/exynos4210-smdkv310.dts
@@ -30,7 +30,7 @@ aliases {
};
chosen {
- bootargs = "root=/dev/ram0 rw initrd=0x41000000,8M init=/linuxrc";
+ bootargs = "rw initrd=0x41000000,8M init=/linuxrc";
stdout-path = "serial1:115200n8";
};
diff --git a/arch/arm/boot/dts/samsung/exynos4412-smdk4412.dts b/arch/arm/boot/dts/samsung/exynos4412-smdk4412.dts
index 4b18cc55d6ca..920af4f91c75 100644
--- a/arch/arm/boot/dts/samsung/exynos4412-smdk4412.dts
+++ b/arch/arm/boot/dts/samsung/exynos4412-smdk4412.dts
@@ -27,7 +27,7 @@ aliases {
};
chosen {
- bootargs = "root=/dev/ram0 rw initrd=0x41000000,8M init=/linuxrc";
+ bootargs = "rw initrd=0x41000000,8M init=/linuxrc";
stdout-path = "serial1:115200n8";
};
diff --git a/arch/arm/boot/dts/samsung/exynos5250-smdk5250.dts b/arch/arm/boot/dts/samsung/exynos5250-smdk5250.dts
index 4164c7c2a3eb..e5cfff1ffad0 100644
--- a/arch/arm/boot/dts/samsung/exynos5250-smdk5250.dts
+++ b/arch/arm/boot/dts/samsung/exynos5250-smdk5250.dts
@@ -27,7 +27,7 @@ memory@40000000 {
};
chosen {
- bootargs = "root=/dev/ram0 rw initrd=0x41000000,8M init=/linuxrc";
+ bootargs = "rw initrd=0x41000000,8M init=/linuxrc";
stdout-path = "serial2:115200n8";
};
diff --git a/arch/arm/boot/dts/st/ste-nomadik-nhk15.dts b/arch/arm/boot/dts/st/ste-nomadik-nhk15.dts
index cdff33063d6f..8a22425cdb78 100644
--- a/arch/arm/boot/dts/st/ste-nomadik-nhk15.dts
+++ b/arch/arm/boot/dts/st/ste-nomadik-nhk15.dts
@@ -13,7 +13,7 @@ / {
compatible = "st,nomadik-nhk-15";
chosen {
- bootargs = "root=/dev/ram0 console=ttyAMA1,115200n8 earlyprintk";
+ bootargs = "console=ttyAMA1,115200n8 earlyprintk";
};
aliases {
diff --git a/arch/arm/boot/dts/st/ste-nomadik-s8815.dts b/arch/arm/boot/dts/st/ste-nomadik-s8815.dts
index c905c2643a12..7f418d8a2370 100644
--- a/arch/arm/boot/dts/st/ste-nomadik-s8815.dts
+++ b/arch/arm/boot/dts/st/ste-nomadik-s8815.dts
@@ -13,7 +13,7 @@ / {
compatible = "calaosystems,usb-s8815";
chosen {
- bootargs = "root=/dev/ram0 console=ttyAMA1,115200n8 earlyprintk";
+ bootargs = "console=ttyAMA1,115200n8 earlyprintk";
};
aliases {
diff --git a/arch/arm/boot/dts/st/stm32429i-eval.dts b/arch/arm/boot/dts/st/stm32429i-eval.dts
index afa417b34b25..7e8834af20c6 100644
--- a/arch/arm/boot/dts/st/stm32429i-eval.dts
+++ b/arch/arm/boot/dts/st/stm32429i-eval.dts
@@ -57,7 +57,7 @@ / {
compatible = "st,stm32429i-eval", "st,stm32f429";
chosen {
- bootargs = "root=/dev/ram";
+ bootargs = "";
stdout-path = "serial0:115200n8";
};
diff --git a/arch/arm/boot/dts/st/stm32746g-eval.dts b/arch/arm/boot/dts/st/stm32746g-eval.dts
index e9ac37b6eca0..43a52b26fdaa 100644
--- a/arch/arm/boot/dts/st/stm32746g-eval.dts
+++ b/arch/arm/boot/dts/st/stm32746g-eval.dts
@@ -51,7 +51,7 @@ / {
compatible = "st,stm32746g-eval", "st,stm32f746";
chosen {
- bootargs = "root=/dev/ram";
+ bootargs = "";
stdout-path = "serial0:115200n8";
};
diff --git a/arch/arm/boot/dts/st/stm32f429-disco.dts b/arch/arm/boot/dts/st/stm32f429-disco.dts
index a3cb4aabdd5a..68d822d79988 100644
--- a/arch/arm/boot/dts/st/stm32f429-disco.dts
+++ b/arch/arm/boot/dts/st/stm32f429-disco.dts
@@ -57,7 +57,7 @@ / {
compatible = "st,stm32f429i-disco", "st,stm32f429";
chosen {
- bootargs = "root=/dev/ram";
+ bootargs = "";
stdout-path = "serial0:115200n8";
};
diff --git a/arch/arm/boot/dts/st/stm32f469-disco.dts b/arch/arm/boot/dts/st/stm32f469-disco.dts
index 8a4f8ddd083d..31b4abbc608d 100644
--- a/arch/arm/boot/dts/st/stm32f469-disco.dts
+++ b/arch/arm/boot/dts/st/stm32f469-disco.dts
@@ -56,7 +56,7 @@ / {
compatible = "st,stm32f469i-disco", "st,stm32f469";
chosen {
- bootargs = "root=/dev/ram";
+ bootargs = "";
stdout-path = "serial0:115200n8";
};
diff --git a/arch/arm/boot/dts/st/stm32f746-disco.dts b/arch/arm/boot/dts/st/stm32f746-disco.dts
index b57dbdce2f40..3cb04547228e 100644
--- a/arch/arm/boot/dts/st/stm32f746-disco.dts
+++ b/arch/arm/boot/dts/st/stm32f746-disco.dts
@@ -52,7 +52,7 @@ / {
compatible = "st,stm32f746-disco", "st,stm32f746";
chosen {
- bootargs = "root=/dev/ram";
+ bootargs = "";
stdout-path = "serial0:115200n8";
};
diff --git a/arch/arm/boot/dts/st/stm32f769-disco.dts b/arch/arm/boot/dts/st/stm32f769-disco.dts
index 535cfdc4681c..13f96ee0b3de 100644
--- a/arch/arm/boot/dts/st/stm32f769-disco.dts
+++ b/arch/arm/boot/dts/st/stm32f769-disco.dts
@@ -51,7 +51,7 @@ / {
compatible = "st,stm32f769-disco", "st,stm32f769";
chosen {
- bootargs = "root=/dev/ram";
+ bootargs = "";
stdout-path = "serial0:115200n8";
};
diff --git a/arch/arm/boot/dts/st/stm32h743i-disco.dts b/arch/arm/boot/dts/st/stm32h743i-disco.dts
index 8451a54a9a08..8bdb24fcf0c7 100644
--- a/arch/arm/boot/dts/st/stm32h743i-disco.dts
+++ b/arch/arm/boot/dts/st/stm32h743i-disco.dts
@@ -49,7 +49,7 @@ / {
compatible = "st,stm32h743i-disco", "st,stm32h743";
chosen {
- bootargs = "root=/dev/ram";
+ bootargs = "";
stdout-path = "serial0:115200n8";
};
diff --git a/arch/arm/boot/dts/st/stm32h743i-eval.dts b/arch/arm/boot/dts/st/stm32h743i-eval.dts
index 4b0ced27b80e..c3de36d94acf 100644
--- a/arch/arm/boot/dts/st/stm32h743i-eval.dts
+++ b/arch/arm/boot/dts/st/stm32h743i-eval.dts
@@ -49,7 +49,7 @@ / {
compatible = "st,stm32h743i-eval", "st,stm32h743";
chosen {
- bootargs = "root=/dev/ram";
+ bootargs = "";
stdout-path = "serial0:115200n8";
};
diff --git a/arch/arm/boot/dts/st/stm32h747i-disco.dts b/arch/arm/boot/dts/st/stm32h747i-disco.dts
index 99f0255dae8e..a57341e2d95c 100644
--- a/arch/arm/boot/dts/st/stm32h747i-disco.dts
+++ b/arch/arm/boot/dts/st/stm32h747i-disco.dts
@@ -14,7 +14,7 @@ / {
compatible = "st,stm32h747i-disco", "st,stm32h747";
chosen {
- bootargs = "root=/dev/ram";
+ bootargs = "";
stdout-path = "serial0:115200n8";
};
diff --git a/arch/arm/boot/dts/st/stm32h750i-art-pi.dts b/arch/arm/boot/dts/st/stm32h750i-art-pi.dts
index 56c53e262da7..b4bd8315464c 100644
--- a/arch/arm/boot/dts/st/stm32h750i-art-pi.dts
+++ b/arch/arm/boot/dts/st/stm32h750i-art-pi.dts
@@ -54,7 +54,7 @@ / {
compatible = "st,stm32h750i-art-pi", "st,stm32h750";
chosen {
- bootargs = "root=/dev/ram";
+ bootargs = "";
stdout-path = "serial0:2000000n8";
};
diff --git a/arch/arm/configs/assabet_defconfig b/arch/arm/configs/assabet_defconfig
index 07ab9eaac4af..56fce6c08945 100644
--- a/arch/arm/configs/assabet_defconfig
+++ b/arch/arm/configs/assabet_defconfig
@@ -5,7 +5,7 @@ CONFIG_ARCH_MULTI_V4=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_SA1100=y
CONFIG_SA1100_ASSABET=y
-CONFIG_CMDLINE="mem=32M console=ttySA0,38400n8 initrd=0xc0800000,3M root=/dev/ram"
+CONFIG_CMDLINE="mem=32M console=ttySA0,38400n8 initrd=0xc0800000,3M"
CONFIG_FPE_NWFPE=y
CONFIG_PM=y
CONFIG_MODULES=y
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
index ff13e1ecf4bb..b53c7906d317 100644
--- a/arch/arm/configs/at91_dt_defconfig
+++ b/arch/arm/configs/at91_dt_defconfig
@@ -23,7 +23,7 @@ CONFIG_UACCESS_WITH_MEMCPY=y
# CONFIG_ATAGS is not set
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
-CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
+CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 rw"
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index 77d3521f55d4..02a903816baa 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -15,7 +15,7 @@ CONFIG_HIGHMEM=y
CONFIG_SECCOMP=y
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
-CONFIG_CMDLINE="root=/dev/ram0 rw initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M"
+CONFIG_CMDLINE="rw initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
diff --git a/arch/arm/configs/lpc32xx_defconfig b/arch/arm/configs/lpc32xx_defconfig
index 9afccd76446b..a98d1125b9aa 100644
--- a/arch/arm/configs/lpc32xx_defconfig
+++ b/arch/arm/configs/lpc32xx_defconfig
@@ -13,7 +13,7 @@ CONFIG_ARCH_LPC32XX=y
CONFIG_AEABI=y
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
-CONFIG_CMDLINE="console=ttyS0,115200n81 root=/dev/ram0"
+CONFIG_CMDLINE="console=ttyS0,115200n81"
CONFIG_CPU_IDLE=y
CONFIG_VFP=y
CONFIG_JUMP_LABEL=y
diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig
index 1a80602c1284..0c4b9389d4d6 100644
--- a/arch/arm/configs/pxa_defconfig
+++ b/arch/arm/configs/pxa_defconfig
@@ -22,7 +22,7 @@ CONFIG_MACH_AKITA=y
CONFIG_MACH_BORZOI=y
CONFIG_AEABI=y
CONFIG_ARCH_FORCE_MAX_ORDER=8
-CONFIG_CMDLINE="root=/dev/ram0 ro"
+CONFIG_CMDLINE="ro"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
diff --git a/arch/arm/configs/s3c6400_defconfig b/arch/arm/configs/s3c6400_defconfig
index 23635d5b9322..a5018ce274ec 100644
--- a/arch/arm/configs/s3c6400_defconfig
+++ b/arch/arm/configs/s3c6400_defconfig
@@ -4,7 +4,7 @@ CONFIG_ARCH_MULTI_V6=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_S3C64XX=y
CONFIG_MACH_WLF_CRAGG_6410=y
-CONFIG_CMDLINE="console=ttySAC0,115200 root=/dev/ram init=/linuxrc initrd=0x51000000,6M"
+CONFIG_CMDLINE="console=ttySAC0,115200 init=/linuxrc initrd=0x51000000,6M"
CONFIG_VFP=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/arm/configs/s5pv210_defconfig b/arch/arm/configs/s5pv210_defconfig
index 8ec82d9b51e4..485dd5174c62 100644
--- a/arch/arm/configs/s5pv210_defconfig
+++ b/arch/arm/configs/s5pv210_defconfig
@@ -8,7 +8,7 @@ CONFIG_KALLSYMS_ALL=y
CONFIG_ARCH_S5PV210=y
CONFIG_VMSPLIT_2G=y
CONFIG_ARM_APPENDED_DTB=y
-CONFIG_CMDLINE="root=/dev/ram0 rw initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc"
+CONFIG_CMDLINE="rw initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig
index 2cad045e1d8d..0463ff84c06c 100644
--- a/arch/arm/configs/sama5_defconfig
+++ b/arch/arm/configs/sama5_defconfig
@@ -14,7 +14,7 @@ CONFIG_SOC_SAMA5D4=y
# CONFIG_ATMEL_CLOCKSOURCE_PIT is not set
CONFIG_UACCESS_WITH_MEMCPY=y
# CONFIG_ATAGS is not set
-CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
+CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 rw"
CONFIG_VFP=y
CONFIG_NEON=y
CONFIG_KERNEL_MODE_NEON=y
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig
index 0f55815eecb3..510c760b0bc7 100644
--- a/arch/arm/configs/u8500_defconfig
+++ b/arch/arm/configs/u8500_defconfig
@@ -9,7 +9,7 @@ CONFIG_NR_CPUS=2
CONFIG_HIGHMEM=y
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
-CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA2,115200n8"
+CONFIG_CMDLINE="console=ttyAMA2,115200n8"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPUFREQ_DT=y
diff --git a/arch/parisc/defpalo.conf b/arch/parisc/defpalo.conf
index 208ff3b41487..86c9a132cb92 100644
--- a/arch/parisc/defpalo.conf
+++ b/arch/parisc/defpalo.conf
@@ -12,7 +12,7 @@
# If you want a root ramdisk, use the next 2 lines
# (Edit the ramdisk image name!!!!)
--ramdisk=ram-disk-image-file
---commandline=0/vmlinuz HOME=/ root=/dev/ram initrd=0/ramdisk panic_timeout=60 panic=-1
+--commandline=0/vmlinuz HOME=/ initrd=0/ramdisk panic_timeout=60 panic=-1
# If you want NFS root, use the following command line (Edit the HOSTNAME!!!)
#--commandline=0/vmlinuz HOME=/ root=/dev/nfs nfsroot=HOSTNAME ip=bootp
diff --git a/arch/s390/boot/ipl_parm.c b/arch/s390/boot/ipl_parm.c
index f584d7da29cb..47fc2a7ed551 100644
--- a/arch/s390/boot/ipl_parm.c
+++ b/arch/s390/boot/ipl_parm.c
@@ -18,7 +18,7 @@
struct parmarea parmarea __section(".parmarea") = {
.kernel_version = (unsigned long)kernel_version,
.max_command_line_size = COMMAND_LINE_SIZE,
- .command_line = "root=/dev/ram0 ro",
+ .command_line = "ro",
};
char __bootdata(early_command_line)[COMMAND_LINE_SIZE];
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index f2f9cd9cde50..e8e579160c6b 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -448,7 +448,7 @@ config CMDLINE_BOOL
config CMDLINE
string "Initial kernel command string"
depends on CMDLINE_BOOL
- default "console=ttyS0,38400 root=/dev/ram"
+ default "console=ttyS0,38400"
help
On some architectures (EBSA110 and CATS), there is currently no way
for the boot loader to pass arguments to the kernel. For these
diff --git a/arch/xtensa/boot/dts/csp.dts b/arch/xtensa/boot/dts/csp.dts
index 885495460f7e..c7e07dd0d7d0 100644
--- a/arch/xtensa/boot/dts/csp.dts
+++ b/arch/xtensa/boot/dts/csp.dts
@@ -8,7 +8,7 @@ / {
interrupt-parent = <&pic>;
chosen {
- bootargs = "earlycon=cdns,0xfd000000,115200 console=tty0 console=ttyPS0,115200 root=/dev/ram0 rw earlyprintk xilinx_uartps.rx_trigger_level=32 loglevel=8 nohz=off ignore_loglevel";
+ bootargs = "earlycon=cdns,0xfd000000,115200 console=tty0 console=ttyPS0,115200 rw earlyprintk xilinx_uartps.rx_trigger_level=32 loglevel=8 nohz=off ignore_loglevel";
};
memory@0 {
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 21/62] init: remove all mentions of root=/dev/ram*
2025-09-13 0:38 ` [PATCH RESEND 21/62] init: remove all mentions of root=/dev/ram* Askar Safin
@ 2025-09-14 10:06 ` Krzysztof Kozlowski
2025-09-14 20:13 ` Andrew Morton
0 siblings, 1 reply; 95+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-14 10:06 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
On 13/09/2025 02:38, Askar Safin wrote:
> Initrd support is removed, so root=/dev/ram* is never correct
For all your other patches (here is correct):
Please wrap commit message according to Linux coding style / submission
process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597
>
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
> ---
> Documentation/admin-guide/kernel-parameters.txt | 3 +--
> Documentation/arch/m68k/kernel-options.rst | 9 ++-------
> arch/arm/boot/dts/arm/integratorap.dts | 2 +-
> arch/arm/boot/dts/arm/integratorcp.dts | 2 +-
> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-cmm.dts | 2 +-
> .../boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dts | 2 +-
> .../arm/boot/dts/aspeed/aspeed-bmc-facebook-minipack.dts | 2 +-
> .../arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge100.dts | 2 +-
> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge40.dts | 2 +-
> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yamp.dts | 2 +-
> .../boot/dts/aspeed/ast2600-facebook-netbmc-common.dtsi | 2 +-
No, don't do that. DTS is always separate. Don't mix DTS into such huge
patchbom, either.
> arch/arm/boot/dts/hisilicon/hi3620-hi4511.dts | 2 +-
> .../boot/dts/intel/ixp/intel-ixp42x-welltech-epbx100.dts | 2 +-
> arch/arm/boot/dts/nspire/nspire-classic.dtsi | 2 +-
> arch/arm/boot/dts/nspire/nspire-cx.dts | 2 +-
> arch/arm/boot/dts/samsung/exynos4210-origen.dts | 2 +-
> arch/arm/boot/dts/samsung/exynos4210-smdkv310.dts | 2 +-
> arch/arm/boot/dts/samsung/exynos4412-smdk4412.dts | 2 +-
> arch/arm/boot/dts/samsung/exynos5250-smdk5250.dts | 2 +-
> arch/arm/boot/dts/st/ste-nomadik-nhk15.dts | 2 +-
> arch/arm/boot/dts/st/ste-nomadik-s8815.dts | 2 +-
> arch/arm/boot/dts/st/stm32429i-eval.dts | 2 +-
> arch/arm/boot/dts/st/stm32746g-eval.dts | 2 +-
> arch/arm/boot/dts/st/stm32f429-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32f469-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32f746-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32f769-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32h743i-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32h743i-eval.dts | 2 +-
> arch/arm/boot/dts/st/stm32h747i-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32h750i-art-pi.dts | 2 +-
> arch/arm/configs/assabet_defconfig | 2 +-
> arch/arm/configs/at91_dt_defconfig | 2 +-
> arch/arm/configs/exynos_defconfig | 2 +-
To me your patchset is way too big bomb, too difficult to review. You
touch too many subsystems in the same commits. In few cases I saw
dependency, in other cases like here - there is no dependency! So why
grouping independent things together? It only makes it difficult to review.
Anyway, combining here DTS is a no-go for me.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 21/62] init: remove all mentions of root=/dev/ram*
2025-09-14 10:06 ` Krzysztof Kozlowski
@ 2025-09-14 20:13 ` Andrew Morton
2025-09-15 4:41 ` Krzysztof Kozlowski
0 siblings, 1 reply; 95+ messages in thread
From: Andrew Morton @ 2025-09-14 20:13 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Askar Safin, linux-fsdevel, linux-kernel, Linus Torvalds,
Greg Kroah-Hartman, Christian Brauner, Al Viro, Jan Kara,
Christoph Hellwig, Jens Axboe, Andy Shevchenko, Aleksa Sarai,
Thomas Weißschuh, Julian Stecklina, Gao Xiang, Art Nikpal,
Eric Curtin, Alexander Graf, Rob Landley, Lennart Poettering,
linux-arch, linux-alpha, linux-snps-arc, linux-arm-kernel,
linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
linux-s390, linux-sh, sparclinux, linux-um, x86, Ingo Molnar,
linux-block, initramfs, linux-api, linux-doc, linux-efi,
linux-ext4, Theodore Y . Ts'o, linux-acpi, Michal Simek,
devicetree, Luis Chamberlain, Kees Cook, Thorsten Blum,
Heiko Carstens, patches
On Sun, 14 Sep 2025 12:06:24 +0200 Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > Documentation/admin-guide/kernel-parameters.txt | 3 +--
> > Documentation/arch/m68k/kernel-options.rst | 9 ++-------
> > arch/arm/boot/dts/arm/integratorap.dts | 2 +-
> > arch/arm/boot/dts/arm/integratorcp.dts | 2 +-
> > arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-cmm.dts | 2 +-
> > .../boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dts | 2 +-
> > .../arm/boot/dts/aspeed/aspeed-bmc-facebook-minipack.dts | 2 +-
> > .../arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge100.dts | 2 +-
> > arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge40.dts | 2 +-
> > arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yamp.dts | 2 +-
> > .../boot/dts/aspeed/ast2600-facebook-netbmc-common.dtsi | 2 +-
>
> No, don't do that. DTS is always separate.
Why can't DTS changes be carried in a different tree?
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 21/62] init: remove all mentions of root=/dev/ram*
2025-09-14 20:13 ` Andrew Morton
@ 2025-09-15 4:41 ` Krzysztof Kozlowski
0 siblings, 0 replies; 95+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-15 4:41 UTC (permalink / raw)
To: Andrew Morton
Cc: Askar Safin, linux-fsdevel, linux-kernel, Linus Torvalds,
Greg Kroah-Hartman, Christian Brauner, Al Viro, Jan Kara,
Christoph Hellwig, Jens Axboe, Andy Shevchenko, Aleksa Sarai,
Thomas Weißschuh, Julian Stecklina, Gao Xiang, Art Nikpal,
Eric Curtin, Alexander Graf, Rob Landley, Lennart Poettering,
linux-arch, linux-alpha, linux-snps-arc, linux-arm-kernel,
linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
linux-s390, linux-sh, sparclinux, linux-um, x86, Ingo Molnar,
linux-block, initramfs, linux-api, linux-doc, linux-efi,
linux-ext4, Theodore Y . Ts'o, linux-acpi, Michal Simek,
devicetree, Luis Chamberlain, Kees Cook, Thorsten Blum,
Heiko Carstens, patches
On 14/09/2025 22:13, Andrew Morton wrote:
> On Sun, 14 Sep 2025 12:06:24 +0200 Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
>>> Documentation/admin-guide/kernel-parameters.txt | 3 +--
>>> Documentation/arch/m68k/kernel-options.rst | 9 ++-------
>>> arch/arm/boot/dts/arm/integratorap.dts | 2 +-
>>> arch/arm/boot/dts/arm/integratorcp.dts | 2 +-
>>> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-cmm.dts | 2 +-
>>> .../boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dts | 2 +-
>>> .../arm/boot/dts/aspeed/aspeed-bmc-facebook-minipack.dts | 2 +-
>>> .../arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge100.dts | 2 +-
>>> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-wedge40.dts | 2 +-
>>> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yamp.dts | 2 +-
>>> .../boot/dts/aspeed/ast2600-facebook-netbmc-common.dtsi | 2 +-
>>
>> No, don't do that. DTS is always separate.
>
> Why can't DTS changes be carried in a different tree?
It must be carried in a different kernel tree and it must be ALWAYS a
separate commit. Embedding it in the middle of this patchset and in the
middle of some other commit breaks these two rules.
If you asked why it cannot be carried by VFS (or by any non-SoC tree in
general), it is because DTS is completely independent hardware
description, so by keeping it on separate tree we enforce that rule of
lack of dependency between DTS and any driver or core code.
If there is a dependency here, then it would be a NAK, because there
cannot be such - it would be a breach of contract for outside users (DTS
is shared with other, non-Linux projects).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 22/62] doc: remove obsolete mentions of pivot_root
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (20 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 21/62] init: remove all mentions of root=/dev/ram* Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 23/62] init: rename __initramfs_{start,size} to __builtin_initramfs_{start,size} Askar Safin
` (46 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
They refer to initrd, which was removed in previous commits
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/admin-guide/device-mapper/dm-init.rst | 4 ++--
Documentation/arch/arm/ixp4xx.rst | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/admin-guide/device-mapper/dm-init.rst b/Documentation/admin-guide/device-mapper/dm-init.rst
index 981d6a907699..586bb38d716b 100644
--- a/Documentation/admin-guide/device-mapper/dm-init.rst
+++ b/Documentation/admin-guide/device-mapper/dm-init.rst
@@ -5,8 +5,8 @@ Early creation of mapped devices
It is possible to configure a device-mapper device to act as the root device for
your system in two ways.
-The first is to build an initial ramdisk which boots to a minimal userspace
-which configures the device, then pivot_root(8) in to it.
+The first is to build initramfs which boots to a minimal userspace
+which configures the device, then switches to it.
The second is to create one or more device-mappers using the module parameter
"dm-mod.create=" through the kernel boot command line argument.
diff --git a/Documentation/arch/arm/ixp4xx.rst b/Documentation/arch/arm/ixp4xx.rst
index 17aafc610908..ac9cb28776c7 100644
--- a/Documentation/arch/arm/ixp4xx.rst
+++ b/Documentation/arch/arm/ixp4xx.rst
@@ -137,8 +137,8 @@ Intel IXDPG425 Development Platform
added. One issue with this board is that the mini-PCI slots only
have the 3.3v line connected, so you can't use a PCI to mini-PCI
adapter with an E100 card. So to NFS root you need to use either
- the CSR or a WiFi card and a ramdisk that BOOTPs and then does
- a pivot_root to NFS.
+ the CSR or a WiFi card and initramfs that BOOTPs and then switches
+ to NFS.
Motorola PrPMC1100 Processor Mezanine Card
http://www.fountainsys.com
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 23/62] init: rename __initramfs_{start,size} to __builtin_initramfs_{start,size}
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (21 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 22/62] doc: remove obsolete mentions of pivot_root Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 24/62] init: remove wrong comment Askar Safin
` (45 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Rename __initramfs_start to __builtin_initramfs_start and
__initramfs_size to __builtin_initramfs_size .
This is more clear
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/x86/tools/relocs.c | 2 +-
drivers/acpi/tables.c | 4 ++--
include/asm-generic/vmlinux.lds.h | 6 +++---
include/linux/initrd.h | 4 ++--
init/initramfs.c | 4 +---
usr/initramfs_data.S | 4 ++--
6 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
index 5778bc498415..4b4e556f1b52 100644
--- a/arch/x86/tools/relocs.c
+++ b/arch/x86/tools/relocs.c
@@ -87,7 +87,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {
"__(start|stop)_notes|"
"__end_rodata|"
"__end_rodata_aligned|"
- "__initramfs_start|"
+ "__builtin_initramfs_start|"
"(jiffies|jiffies_64)|"
#if ELF_BITS == 64
"__end_rodata_hpage_align|"
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index fa9bb8c8ce95..3160cb7dca00 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -429,8 +429,8 @@ void __init acpi_table_upgrade(void)
struct cpio_data file;
if (IS_ENABLED(CONFIG_ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD)) {
- data = __initramfs_start;
- size = __initramfs_size;
+ data = __builtin_initramfs_start;
+ size = __builtin_initramfs_size;
} else {
data = (void *)initrd_start;
size = initrd_end - initrd_start;
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index ae2d2359b79e..a6bd2ff46f7e 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -46,8 +46,8 @@
* [_sdata, _edata] is the data section
*
* Some of the included output section have their own set of constants.
- * Examples are: [__initramfs_start, __initramfs_end] for initramfs and
- * [__nosave_begin, __nosave_end] for the nosave data
+ * Examples are: [__builtin_initramfs_start, __builtin_initramfs_start + __builtin_initramfs_size]
+ * for initramfs and [__nosave_begin, __nosave_end] for the nosave data
*/
#include <asm-generic/codetag.lds.h>
@@ -969,7 +969,7 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
#ifdef CONFIG_BLK_DEV_INITRD
#define INIT_RAM_FS \
. = ALIGN(4); \
- __initramfs_start = .; \
+ __builtin_initramfs_start = .; \
KEEP(*(.init.ramfs)) \
. = ALIGN(8); \
KEEP(*(.init.ramfs.info))
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index cc389ef1a738..e49c7166dbb3 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -21,8 +21,8 @@ static inline void wait_for_initramfs(void) {}
extern phys_addr_t phys_initrd_start;
extern unsigned long phys_initrd_size;
-extern char __initramfs_start[];
-extern unsigned long __initramfs_size;
+extern char __builtin_initramfs_start[];
+extern unsigned long __builtin_initramfs_size;
void console_on_rootfs(void);
diff --git a/init/initramfs.c b/init/initramfs.c
index 850cb0de873e..2866d7a0afd7 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -597,8 +597,6 @@ static int __init initramfs_async_setup(char *str)
}
__setup("initramfs_async=", initramfs_async_setup);
-extern char __initramfs_start[];
-extern unsigned long __initramfs_size;
#include <linux/initrd.h>
#include <linux/kexec.h>
@@ -695,7 +693,7 @@ static inline bool kexec_free_initrd(void)
static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
{
/* Load the built in initramfs */
- char *err = unpack_to_rootfs(__initramfs_start, __initramfs_size);
+ char *err = unpack_to_rootfs(__builtin_initramfs_start, __builtin_initramfs_size);
if (err)
panic_show_mem("%s", err); /* Failed to decompress INTERNAL initramfs */
diff --git a/usr/initramfs_data.S b/usr/initramfs_data.S
index cd67edc38797..64ca648a80e2 100644
--- a/usr/initramfs_data.S
+++ b/usr/initramfs_data.S
@@ -27,8 +27,8 @@ __irf_start:
.incbin "usr/initramfs_inc_data"
__irf_end:
.section .init.ramfs.info,"a"
-.globl __initramfs_size
-__initramfs_size:
+.globl __builtin_initramfs_size
+__builtin_initramfs_size:
#ifdef CONFIG_64BIT
.quad __irf_end - __irf_start
#else
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 24/62] init: remove wrong comment
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (22 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 23/62] init: rename __initramfs_{start,size} to __builtin_initramfs_{start,size} Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 25/62] init: rename phys_initrd_{start,size} to phys_external_initramfs_{start,size} Askar Safin
` (44 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This comment is wrong. free_initrd_mem may be called
with crashk_end and initrd_end as arguments
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
include/linux/initrd.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index e49c7166dbb3..4080ba82d4c9 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -6,7 +6,6 @@
/* 1 if it is not an error if initrd_start < memory_start */
extern int initrd_below_start_ok;
-/* free_initrd_mem always gets called with the next two as arguments.. */
extern unsigned long initrd_start, initrd_end;
extern void free_initrd_mem(unsigned long, unsigned long);
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 25/62] init: rename phys_initrd_{start,size} to phys_external_initramfs_{start,size}
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (23 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 24/62] init: remove wrong comment Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 26/62] init: move phys_external_initramfs_{start,size} to init/initramfs.c Askar Safin
` (43 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Rename phys_initrd_start to phys_external_initramfs_start and
phys_initrd_size to phys_external_initramfs_size.
They refer to initramfs, not to initrd
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arc/mm/init.c | 8 ++++----
arch/arm/mm/init.c | 8 ++++----
arch/arm64/mm/init.c | 15 ++++++++-------
arch/x86/kernel/setup.c | 4 ++--
drivers/firmware/efi/efi.c | 6 +++---
drivers/of/fdt.c | 8 ++++----
include/linux/initrd.h | 4 ++--
init/do_mounts_initrd.c | 8 ++++----
init/initramfs.c | 10 +++++-----
9 files changed, 36 insertions(+), 35 deletions(-)
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
index a73cc94f806e..eb8a616a63c6 100644
--- a/arch/arc/mm/init.c
+++ b/arch/arc/mm/init.c
@@ -110,10 +110,10 @@ void __init setup_arch_memory(void)
__pa(_end) - CONFIG_LINUX_LINK_BASE);
#ifdef CONFIG_BLK_DEV_INITRD
- if (phys_initrd_size) {
- memblock_reserve(phys_initrd_start, phys_initrd_size);
- initrd_start = (unsigned long)__va(phys_initrd_start);
- initrd_end = initrd_start + phys_initrd_size;
+ if (phys_external_initramfs_size) {
+ memblock_reserve(phys_external_initramfs_start, phys_external_initramfs_size);
+ initrd_start = (unsigned long)__va(phys_external_initramfs_start);
+ initrd_end = initrd_start + phys_external_initramfs_size;
}
#endif
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 54bdca025c9f..93f8010b9115 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -55,8 +55,8 @@ static int __init parse_tag_initrd(const struct tag *tag)
{
pr_warn("ATAG_INITRD is deprecated; "
"please update your bootloader.\n");
- phys_initrd_start = __virt_to_phys(tag->u.initrd.start);
- phys_initrd_size = tag->u.initrd.size;
+ phys_external_initramfs_start = __virt_to_phys(tag->u.initrd.start);
+ phys_external_initramfs_size = tag->u.initrd.size;
return 0;
}
@@ -64,8 +64,8 @@ __tagtable(ATAG_INITRD, parse_tag_initrd);
static int __init parse_tag_initrd2(const struct tag *tag)
{
- phys_initrd_start = tag->u.initrd.start;
- phys_initrd_size = tag->u.initrd.size;
+ phys_external_initramfs_start = tag->u.initrd.start;
+ phys_external_initramfs_size = tag->u.initrd.size;
return 0;
}
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index ea84a61ed508..da517edcf824 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -246,14 +246,15 @@ void __init arm64_memblock_init(void)
memblock_add(__pa_symbol(_text), (u64)(_end - _text));
}
- if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && phys_initrd_size) {
+ if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && phys_external_initramfs_size) {
/*
* Add back the memory we just removed if it results in the
* initrd to become inaccessible via the linear mapping.
* Otherwise, this is a no-op
*/
- u64 base = phys_initrd_start & PAGE_MASK;
- u64 size = PAGE_ALIGN(phys_initrd_start + phys_initrd_size) - base;
+ u64 base = phys_external_initramfs_start & PAGE_MASK;
+ u64 size = PAGE_ALIGN(phys_external_initramfs_start +
+ phys_external_initramfs_size) - base;
/*
* We can only add back the initrd memory if we don't end up
@@ -267,7 +268,7 @@ void __init arm64_memblock_init(void)
base + size > memblock_start_of_DRAM() +
linear_region_size,
"initrd not fully accessible via the linear mapping -- please check your bootloader ...\n")) {
- phys_initrd_size = 0;
+ phys_external_initramfs_size = 0;
} else {
memblock_add(base, size);
memblock_clear_nomap(base, size);
@@ -280,10 +281,10 @@ void __init arm64_memblock_init(void)
* pagetables with memblock.
*/
memblock_reserve(__pa_symbol(_stext), _end - _stext);
- if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && phys_initrd_size) {
+ if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && phys_external_initramfs_size) {
/* the generic initrd code expects virtual addresses */
- initrd_start = __phys_to_virt(phys_initrd_start);
- initrd_end = initrd_start + phys_initrd_size;
+ initrd_start = __phys_to_virt(phys_external_initramfs_start);
+ initrd_end = initrd_start + phys_external_initramfs_size;
}
early_init_fdt_scan_reserved_mem();
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 797c3c9fc75e..e727c7a7f648 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -297,7 +297,7 @@ static u64 __init get_ramdisk_image(void)
ramdisk_image |= (u64)boot_params.ext_ramdisk_image << 32;
if (ramdisk_image == 0)
- ramdisk_image = phys_initrd_start;
+ ramdisk_image = phys_external_initramfs_start;
return ramdisk_image;
}
@@ -308,7 +308,7 @@ static u64 __init get_ramdisk_size(void)
ramdisk_size |= (u64)boot_params.ext_ramdisk_size << 32;
if (ramdisk_size == 0)
- ramdisk_size = phys_initrd_size;
+ ramdisk_size = phys_external_initramfs_size;
return ramdisk_size;
}
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 1ce428e2ac8a..7cab72da2ea9 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -808,13 +808,13 @@ int __init efi_config_parse_tables(const efi_config_table_t *config_tables,
}
if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) &&
- initrd != EFI_INVALID_TABLE_ADDR && phys_initrd_size == 0) {
+ initrd != EFI_INVALID_TABLE_ADDR && phys_external_initramfs_size == 0) {
struct linux_efi_initrd *tbl;
tbl = early_memremap(initrd, sizeof(*tbl));
if (tbl) {
- phys_initrd_start = tbl->base;
- phys_initrd_size = tbl->size;
+ phys_external_initramfs_start = tbl->base;
+ phys_external_initramfs_size = tbl->size;
early_memunmap(tbl, sizeof(*tbl));
}
}
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 0edd639898a6..9c4c9be948c5 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -760,8 +760,8 @@ static void __early_init_dt_declare_initrd(unsigned long start,
{
/*
* __va() is not yet available this early on some platforms. In that
- * case, the platform uses phys_initrd_start/phys_initrd_size instead
- * and does the VA conversion itself.
+ * case, the platform uses phys_external_initramfs_start/phys_external_initramfs_size
+ * instead and does the VA conversion itself.
*/
if (!IS_ENABLED(CONFIG_ARM64) &&
!(IS_ENABLED(CONFIG_RISCV) && IS_ENABLED(CONFIG_64BIT))) {
@@ -799,8 +799,8 @@ static void __init early_init_dt_check_for_initrd(unsigned long node)
return;
__early_init_dt_declare_initrd(start, end);
- phys_initrd_start = start;
- phys_initrd_size = end - start;
+ phys_external_initramfs_start = start;
+ phys_external_initramfs_size = end - start;
pr_debug("initrd_start=0x%llx initrd_end=0x%llx\n", start, end);
}
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index 4080ba82d4c9..23c08e88234c 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -17,8 +17,8 @@ static inline void __init reserve_initrd_mem(void) {}
static inline void wait_for_initramfs(void) {}
#endif
-extern phys_addr_t phys_initrd_start;
-extern unsigned long phys_initrd_size;
+extern phys_addr_t phys_external_initramfs_start;
+extern unsigned long phys_external_initramfs_size;
extern char __builtin_initramfs_start[];
extern unsigned long __builtin_initramfs_size;
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index d5264e9a52e0..444182a76999 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -15,8 +15,8 @@
unsigned long initrd_start, initrd_end;
int initrd_below_start_ok;
-phys_addr_t phys_initrd_start __initdata;
-unsigned long phys_initrd_size __initdata;
+phys_addr_t phys_external_initramfs_start __initdata;
+unsigned long phys_external_initramfs_size __initdata;
static int __init early_initrdmem(char *p)
{
@@ -28,8 +28,8 @@ static int __init early_initrdmem(char *p)
if (*endp == ',') {
size = memparse(endp + 1, NULL);
- phys_initrd_start = start;
- phys_initrd_size = size;
+ phys_external_initramfs_start = start;
+ phys_external_initramfs_size = size;
}
return 0;
}
diff --git a/init/initramfs.c b/init/initramfs.c
index 2866d7a0afd7..6abe0a3ca4ce 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -610,7 +610,7 @@ void __init reserve_initrd_mem(void)
/* Ignore the virtul address computed during device tree parsing */
initrd_start = initrd_end = 0;
- if (!phys_initrd_size)
+ if (!phys_external_initramfs_size)
return;
/*
* Round the memory region to page boundaries as per free_initrd_mem()
@@ -618,8 +618,8 @@ void __init reserve_initrd_mem(void)
* are in use, but more importantly, reserves the entire set of pages
* as we don't want these pages allocated for other purposes.
*/
- start = round_down(phys_initrd_start, PAGE_SIZE);
- size = phys_initrd_size + (phys_initrd_start - start);
+ start = round_down(phys_external_initramfs_start, PAGE_SIZE);
+ size = phys_external_initramfs_size + (phys_external_initramfs_start - start);
size = round_up(size, PAGE_SIZE);
if (!memblock_is_region_memory(start, size)) {
@@ -636,8 +636,8 @@ void __init reserve_initrd_mem(void)
memblock_reserve(start, size);
/* Now convert initrd to virtual addresses */
- initrd_start = (unsigned long)__va(phys_initrd_start);
- initrd_end = initrd_start + phys_initrd_size;
+ initrd_start = (unsigned long)__va(phys_external_initramfs_start);
+ initrd_end = initrd_start + phys_external_initramfs_size;
initrd_below_start_ok = 1;
return;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 26/62] init: move phys_external_initramfs_{start,size} to init/initramfs.c
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (24 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 25/62] init: rename phys_initrd_{start,size} to phys_external_initramfs_{start,size} Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 27/62] init: alpha: remove "extern unsigned long initrd_start, initrd_end" Askar Safin
` (42 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Move definitions of phys_external_initramfs_start and
phys_external_initramfs_size to init/initramfs.c
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/do_mounts_initrd.c | 3 ---
init/initramfs.c | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index 444182a76999..06be76aa602c 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -15,9 +15,6 @@
unsigned long initrd_start, initrd_end;
int initrd_below_start_ok;
-phys_addr_t phys_external_initramfs_start __initdata;
-unsigned long phys_external_initramfs_size __initdata;
-
static int __init early_initrdmem(char *p)
{
phys_addr_t start;
diff --git a/init/initramfs.c b/init/initramfs.c
index 6abe0a3ca4ce..5242d851e839 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -600,6 +600,9 @@ __setup("initramfs_async=", initramfs_async_setup);
#include <linux/initrd.h>
#include <linux/kexec.h>
+phys_addr_t phys_external_initramfs_start __initdata;
+unsigned long phys_external_initramfs_size __initdata;
+
static BIN_ATTR(initrd, 0440, sysfs_bin_attr_simple_read, NULL, 0);
void __init reserve_initrd_mem(void)
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 27/62] init: alpha: remove "extern unsigned long initrd_start, initrd_end"
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (25 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 26/62] init: move phys_external_initramfs_{start,size} to init/initramfs.c Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 28/62] init: alpha, arc, arm, arm64, csky, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, s390, sh, sparc, um, x86, xtensa: rename initrd_{start,end} to virt_external_initramfs_{start,end} Askar Safin
` (41 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
These variables already declared in <linux/initrd.h>, which is
included
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/alpha/kernel/core_irongate.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/alpha/kernel/core_irongate.c b/arch/alpha/kernel/core_irongate.c
index 05dc4c1b9074..3411564144ae 100644
--- a/arch/alpha/kernel/core_irongate.c
+++ b/arch/alpha/kernel/core_irongate.c
@@ -225,8 +225,6 @@ albacore_init_arch(void)
alpha_mv.min_mem_address = pci_mem;
if (memtop > pci_mem) {
#ifdef CONFIG_BLK_DEV_INITRD
- extern unsigned long initrd_start, initrd_end;
-
/* Move the initrd out of the way. */
if (initrd_end && __pa(initrd_end) > pci_mem) {
unsigned long size;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 28/62] init: alpha, arc, arm, arm64, csky, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, s390, sh, sparc, um, x86, xtensa: rename initrd_{start,end} to virt_external_initramfs_{start,end}
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (26 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 27/62] init: alpha: remove "extern unsigned long initrd_start, initrd_end" Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 5:48 ` Borislav Petkov
2025-09-16 3:09 ` Rob Herring
2025-09-13 0:38 ` [PATCH RESEND 29/62] init: move virt_external_initramfs_{start,end} to init/initramfs.c Askar Safin
` (40 subsequent siblings)
68 siblings, 2 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Rename initrd_start to virt_external_initramfs_start and
initrd_end to virt_external_initramfs_end.
They refer to initramfs, not to initrd
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/alpha/kernel/core_irongate.c | 6 ++--
arch/alpha/kernel/setup.c | 24 +++++++-------
arch/arc/mm/init.c | 4 +--
arch/arm/mm/init.c | 4 +--
arch/arm64/mm/init.c | 4 +--
arch/csky/kernel/setup.c | 16 ++++-----
arch/m68k/kernel/setup_mm.c | 6 ++--
arch/m68k/kernel/setup_no.c | 6 ++--
arch/m68k/kernel/uboot.c | 6 ++--
arch/microblaze/mm/init.c | 6 ++--
arch/mips/ath79/prom.c | 8 ++---
arch/mips/kernel/setup.c | 44 ++++++++++++-------------
arch/mips/sibyte/common/cfe.c | 22 ++++++-------
arch/nios2/kernel/setup.c | 10 +++---
arch/openrisc/kernel/setup.c | 14 ++++----
arch/parisc/kernel/pdt.c | 2 +-
arch/parisc/kernel/setup.c | 4 +--
arch/parisc/mm/init.c | 24 +++++++-------
arch/powerpc/kernel/prom.c | 14 ++++----
arch/powerpc/kernel/setup-common.c | 14 ++++----
arch/powerpc/platforms/powermac/setup.c | 2 +-
arch/s390/kernel/setup.c | 4 +--
arch/sh/kernel/setup.c | 8 ++---
arch/sparc/mm/init_32.c | 18 +++++-----
arch/sparc/mm/init_64.c | 14 ++++----
arch/um/kernel/initrd.c | 4 +--
arch/x86/kernel/cpu/microcode/core.c | 8 ++---
arch/x86/kernel/setup.c | 12 +++----
arch/xtensa/kernel/setup.c | 14 ++++----
drivers/acpi/tables.c | 4 +--
drivers/of/fdt.c | 4 +--
include/linux/initrd.h | 4 +--
init/do_mounts_initrd.c | 2 +-
init/initramfs.c | 40 +++++++++++-----------
init/main.c | 18 +++++-----
35 files changed, 197 insertions(+), 197 deletions(-)
diff --git a/arch/alpha/kernel/core_irongate.c b/arch/alpha/kernel/core_irongate.c
index 3411564144ae..5519bb8fc6f2 100644
--- a/arch/alpha/kernel/core_irongate.c
+++ b/arch/alpha/kernel/core_irongate.c
@@ -226,11 +226,11 @@ albacore_init_arch(void)
if (memtop > pci_mem) {
#ifdef CONFIG_BLK_DEV_INITRD
/* Move the initrd out of the way. */
- if (initrd_end && __pa(initrd_end) > pci_mem) {
+ if (virt_external_initramfs_end && __pa(virt_external_initramfs_end) > pci_mem) {
unsigned long size;
- size = initrd_end - initrd_start;
- memblock_free((void *)initrd_start, PAGE_ALIGN(size));
+ size = virt_external_initramfs_end - virt_external_initramfs_start;
+ memblock_free((void *)virt_external_initramfs_start, PAGE_ALIGN(size));
if (!move_initrd(pci_mem))
printk("irongate_init_arch: initrd too big "
"(%ldK)\ndisabling initrd\n",
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index bebdffafaee8..a344e71b2d2a 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -268,15 +268,15 @@ move_initrd(unsigned long mem_limit)
void *start;
unsigned long size;
- size = initrd_end - initrd_start;
+ size = virt_external_initramfs_end - virt_external_initramfs_start;
start = memblock_alloc(PAGE_ALIGN(size), PAGE_SIZE);
if (!start || __pa(start) + size > mem_limit) {
- initrd_start = initrd_end = 0;
+ virt_external_initramfs_start = virt_external_initramfs_end = 0;
return NULL;
}
- memmove(start, (void *)initrd_start, size);
- initrd_start = (unsigned long)start;
- initrd_end = initrd_start + size;
+ memmove(start, (void *)virt_external_initramfs_start, size);
+ virt_external_initramfs_start = (unsigned long)start;
+ virt_external_initramfs_end = virt_external_initramfs_start + size;
printk("initrd moved to %p\n", start);
return start;
}
@@ -347,20 +347,20 @@ setup_memory(void *kernel_end)
memblock_reserve(KERNEL_START_PHYS, kernel_size);
#ifdef CONFIG_BLK_DEV_INITRD
- initrd_start = INITRD_START;
- if (initrd_start) {
- initrd_end = initrd_start+INITRD_SIZE;
+ virt_external_initramfs_start = INITRD_START;
+ if (virt_external_initramfs_start) {
+ virt_external_initramfs_end = virt_external_initramfs_start+INITRD_SIZE;
printk("Initial ramdisk at: 0x%p (%lu bytes)\n",
- (void *) initrd_start, INITRD_SIZE);
+ (void *) virt_external_initramfs_start, INITRD_SIZE);
- if ((void *)initrd_end > phys_to_virt(PFN_PHYS(max_low_pfn))) {
+ if ((void *)virt_external_initramfs_end > phys_to_virt(PFN_PHYS(max_low_pfn))) {
if (!move_initrd(PFN_PHYS(max_low_pfn)))
printk("initrd extends beyond end of memory "
"(0x%08lx > 0x%p)\ndisabling initrd\n",
- initrd_end,
+ virt_external_initramfs_end,
phys_to_virt(PFN_PHYS(max_low_pfn)));
} else {
- memblock_reserve(virt_to_phys((void *)initrd_start),
+ memblock_reserve(virt_to_phys((void *)virt_external_initramfs_start),
INITRD_SIZE);
}
}
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
index eb8a616a63c6..1e098d7fc6af 100644
--- a/arch/arc/mm/init.c
+++ b/arch/arc/mm/init.c
@@ -112,8 +112,8 @@ void __init setup_arch_memory(void)
#ifdef CONFIG_BLK_DEV_INITRD
if (phys_external_initramfs_size) {
memblock_reserve(phys_external_initramfs_start, phys_external_initramfs_size);
- initrd_start = (unsigned long)__va(phys_external_initramfs_start);
- initrd_end = initrd_start + phys_external_initramfs_size;
+ virt_external_initramfs_start = (unsigned long)__va(phys_external_initramfs_start);
+ virt_external_initramfs_end = virt_external_initramfs_start + phys_external_initramfs_size;
}
#endif
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 93f8010b9115..4faeec51c522 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -439,9 +439,9 @@ void free_initmem(void)
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
- if (start == initrd_start)
+ if (start == virt_external_initramfs_start)
start = round_down(start, PAGE_SIZE);
- if (end == initrd_end)
+ if (end == virt_external_initramfs_end)
end = round_up(end, PAGE_SIZE);
poison_init_mem((void *)start, PAGE_ALIGN(end) - start);
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index da517edcf824..3414e48c8c82 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -283,8 +283,8 @@ void __init arm64_memblock_init(void)
memblock_reserve(__pa_symbol(_stext), _end - _stext);
if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && phys_external_initramfs_size) {
/* the generic initrd code expects virtual addresses */
- initrd_start = __phys_to_virt(phys_external_initramfs_start);
- initrd_end = initrd_start + phys_external_initramfs_size;
+ virt_external_initramfs_start = __phys_to_virt(phys_external_initramfs_start);
+ virt_external_initramfs_end = virt_external_initramfs_start + phys_external_initramfs_size;
}
early_init_fdt_scan_reserved_mem();
diff --git a/arch/csky/kernel/setup.c b/arch/csky/kernel/setup.c
index e0d6ca86ea8c..ce128888462e 100644
--- a/arch/csky/kernel/setup.c
+++ b/arch/csky/kernel/setup.c
@@ -17,35 +17,35 @@ static void __init setup_initrd(void)
{
unsigned long size;
- if (initrd_start >= initrd_end) {
+ if (virt_external_initramfs_start >= virt_external_initramfs_end) {
pr_err("initrd not found or empty");
goto disable;
}
- if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) {
+ if (__pa(virt_external_initramfs_end) > PFN_PHYS(max_low_pfn)) {
pr_err("initrd extends beyond end of memory");
goto disable;
}
- size = initrd_end - initrd_start;
+ size = virt_external_initramfs_end - virt_external_initramfs_start;
- if (memblock_is_region_reserved(__pa(initrd_start), size)) {
+ if (memblock_is_region_reserved(__pa(virt_external_initramfs_start), size)) {
pr_err("INITRD: 0x%08lx+0x%08lx overlaps in-use memory region",
- __pa(initrd_start), size);
+ __pa(virt_external_initramfs_start), size);
goto disable;
}
- memblock_reserve(__pa(initrd_start), size);
+ memblock_reserve(__pa(virt_external_initramfs_start), size);
pr_info("Initial ramdisk at: 0x%p (%lu bytes)\n",
- (void *)(initrd_start), size);
+ (void *)(virt_external_initramfs_start), size);
initrd_below_start_ok = 1;
return;
disable:
- initrd_start = initrd_end = 0;
+ virt_external_initramfs_start = virt_external_initramfs_end = 0;
pr_err(" - disabling initrd\n");
}
diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c
index c7e8de0d34bb..80f0544c1041 100644
--- a/arch/m68k/kernel/setup_mm.c
+++ b/arch/m68k/kernel/setup_mm.c
@@ -333,9 +333,9 @@ void __init setup_arch(char **cmdline_p)
paging_init();
if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && m68k_ramdisk.size) {
- initrd_start = (unsigned long)phys_to_virt(m68k_ramdisk.addr);
- initrd_end = initrd_start + m68k_ramdisk.size;
- pr_info("initrd: %08lx - %08lx\n", initrd_start, initrd_end);
+ virt_external_initramfs_start = (unsigned long)phys_to_virt(m68k_ramdisk.addr);
+ virt_external_initramfs_end = virt_external_initramfs_start + m68k_ramdisk.size;
+ pr_info("initrd: %08lx - %08lx\n", virt_external_initramfs_start, virt_external_initramfs_end);
}
#ifdef CONFIG_NATFEAT
diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c
index f724875b15cc..4d98e0063725 100644
--- a/arch/m68k/kernel/setup_no.c
+++ b/arch/m68k/kernel/setup_no.c
@@ -155,9 +155,9 @@ void __init setup_arch(char **cmdline_p)
max_pfn = max_low_pfn = PFN_DOWN(memory_end);
#if defined(CONFIG_UBOOT) && defined(CONFIG_BLK_DEV_INITRD)
- if ((initrd_start > 0) && (initrd_start < initrd_end) &&
- (initrd_end < memory_end))
- memblock_reserve(initrd_start, initrd_end - initrd_start);
+ if ((virt_external_initramfs_start > 0) && (virt_external_initramfs_start < virt_external_initramfs_end) &&
+ (virt_external_initramfs_end < memory_end))
+ memblock_reserve(virt_external_initramfs_start, virt_external_initramfs_end - virt_external_initramfs_start);
#endif /* if defined(CONFIG_BLK_DEV_INITRD) */
/*
diff --git a/arch/m68k/kernel/uboot.c b/arch/m68k/kernel/uboot.c
index d278060a250c..5fc831a0794a 100644
--- a/arch/m68k/kernel/uboot.c
+++ b/arch/m68k/kernel/uboot.c
@@ -81,9 +81,9 @@ static void __init parse_uboot_commandline(char *commandp, int size)
if (uboot_initrd_start && uboot_initrd_end &&
(uboot_initrd_end > uboot_initrd_start)) {
- initrd_start = uboot_initrd_start;
- initrd_end = uboot_initrd_end;
- pr_info("initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end);
+ virt_external_initramfs_start = uboot_initrd_start;
+ virt_external_initramfs_end = uboot_initrd_end;
+ pr_info("initrd at 0x%lx:0x%lx\n", virt_external_initramfs_start, virt_external_initramfs_end);
}
#endif /* if defined(CONFIG_BLK_DEV_INITRD) */
}
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 31d475cdb1c5..fabeca49c2c6 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -202,10 +202,10 @@ asmlinkage void __init mmu_init(void)
#if defined(CONFIG_BLK_DEV_INITRD)
/* Remove the init RAM disk from the available memory. */
- if (initrd_start) {
+ if (virt_external_initramfs_start) {
unsigned long size;
- size = initrd_end - initrd_start;
- memblock_reserve(__virt_to_phys(initrd_start), size);
+ size = virt_external_initramfs_end - virt_external_initramfs_start;
+ memblock_reserve(__virt_to_phys(virt_external_initramfs_start), size);
}
#endif /* CONFIG_BLK_DEV_INITRD */
diff --git a/arch/mips/ath79/prom.c b/arch/mips/ath79/prom.c
index cc6dc5600677..506dcada711b 100644
--- a/arch/mips/ath79/prom.c
+++ b/arch/mips/ath79/prom.c
@@ -25,10 +25,10 @@ void __init prom_init(void)
#ifdef CONFIG_BLK_DEV_INITRD
/* Read the initrd address from the firmware environment */
- initrd_start = fw_getenvl("initrd_start");
- if (initrd_start) {
- initrd_start = KSEG0ADDR(initrd_start);
- initrd_end = initrd_start + fw_getenvl("initrd_size");
+ virt_external_initramfs_start = fw_getenvl("initrd_start");
+ if (virt_external_initramfs_start) {
+ virt_external_initramfs_start = KSEG0ADDR(virt_external_initramfs_start);
+ virt_external_initramfs_end = virt_external_initramfs_start + fw_getenvl("initrd_size");
}
#endif
}
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index a78e24873231..da11ae875539 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -126,15 +126,15 @@ static int __init rd_start_early(char *p)
if (start < XKPHYS)
start = (int)start;
#endif
- initrd_start = start;
- initrd_end += start;
+ virt_external_initramfs_start = start;
+ virt_external_initramfs_end += start;
return 0;
}
early_param("rd_start", rd_start_early);
static int __init rd_size_early(char *p)
{
- initrd_end += memparse(p, &p);
+ virt_external_initramfs_end += memparse(p, &p);
return 0;
}
early_param("rd_size", rd_size_early);
@@ -146,13 +146,13 @@ static unsigned long __init init_initrd(void)
/*
* Board specific code or command line parser should have
- * already set up initrd_start and initrd_end. In these cases
+ * already set up virt_external_initramfs_start and virt_external_initramfs_end. In these cases
* perform sanity checks and use them if all looks good.
*/
- if (!initrd_start || initrd_end <= initrd_start)
+ if (!virt_external_initramfs_start || virt_external_initramfs_end <= virt_external_initramfs_start)
goto disable;
- if (initrd_start & ~PAGE_MASK) {
+ if (virt_external_initramfs_start & ~PAGE_MASK) {
pr_err("initrd start must be page aligned\n");
goto disable;
}
@@ -164,19 +164,19 @@ static unsigned long __init init_initrd(void)
* 32-bit. We need also to switch from KSEG0 to XKPHYS
* addresses now, so the code can now safely use __pa().
*/
- end = __pa(initrd_end);
- initrd_end = (unsigned long)__va(end);
- initrd_start = (unsigned long)__va(__pa(initrd_start));
+ end = __pa(virt_external_initramfs_end);
+ virt_external_initramfs_end = (unsigned long)__va(end);
+ virt_external_initramfs_start = (unsigned long)__va(__pa(virt_external_initramfs_start));
- if (initrd_start < PAGE_OFFSET) {
+ if (virt_external_initramfs_start < PAGE_OFFSET) {
pr_err("initrd start < PAGE_OFFSET\n");
goto disable;
}
return PFN_UP(end);
disable:
- initrd_start = 0;
- initrd_end = 0;
+ virt_external_initramfs_start = 0;
+ virt_external_initramfs_end = 0;
return 0;
}
@@ -189,21 +189,21 @@ static void __init maybe_bswap_initrd(void)
u64 buf;
/* Check for CPIO signature */
- if (!memcmp((void *)initrd_start, "070701", 6))
+ if (!memcmp((void *)virt_external_initramfs_start, "070701", 6))
return;
/* Check for compressed initrd */
- if (decompress_method((unsigned char *)initrd_start, 8, NULL))
+ if (decompress_method((unsigned char *)virt_external_initramfs_start, 8, NULL))
return;
/* Try again with a byte swapped header */
- buf = swab64p((u64 *)initrd_start);
+ buf = swab64p((u64 *)virt_external_initramfs_start);
if (!memcmp(&buf, "070701", 6) ||
decompress_method((unsigned char *)(&buf), 8, NULL)) {
unsigned long i;
pr_info("Byteswapped initrd detected\n");
- for (i = initrd_start; i < ALIGN(initrd_end, 8); i += 8)
+ for (i = virt_external_initramfs_start; i < ALIGN(virt_external_initramfs_end, 8); i += 8)
swab64s((u64 *)i);
}
#endif
@@ -211,29 +211,29 @@ static void __init maybe_bswap_initrd(void)
static void __init finalize_initrd(void)
{
- unsigned long size = initrd_end - initrd_start;
+ unsigned long size = virt_external_initramfs_end - virt_external_initramfs_start;
if (size == 0) {
printk(KERN_INFO "Initrd not found or empty");
goto disable;
}
- if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) {
+ if (__pa(virt_external_initramfs_end) > PFN_PHYS(max_low_pfn)) {
printk(KERN_ERR "Initrd extends beyond end of memory");
goto disable;
}
maybe_bswap_initrd();
- memblock_reserve(__pa(initrd_start), size);
+ memblock_reserve(__pa(virt_external_initramfs_start), size);
initrd_below_start_ok = 1;
pr_info("Initial ramdisk at: 0x%lx (%lu bytes)\n",
- initrd_start, size);
+ virt_external_initramfs_start, size);
return;
disable:
printk(KERN_CONT " - disabling initrd\n");
- initrd_start = 0;
- initrd_end = 0;
+ virt_external_initramfs_start = 0;
+ virt_external_initramfs_end = 0;
}
#else /* !CONFIG_BLK_DEV_INITRD */
diff --git a/arch/mips/sibyte/common/cfe.c b/arch/mips/sibyte/common/cfe.c
index 2cb90dbbe843..642b7d615594 100644
--- a/arch/mips/sibyte/common/cfe.c
+++ b/arch/mips/sibyte/common/cfe.c
@@ -38,7 +38,7 @@
int cfe_cons_handle;
#ifdef CONFIG_BLK_DEV_INITRD
-extern unsigned long initrd_start, initrd_end;
+extern unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
#endif
static void __noreturn cfe_linux_exit(void *arg)
@@ -86,9 +86,9 @@ static __init void prom_meminit(void)
unsigned long initrd_pstart;
unsigned long initrd_pend;
- initrd_pstart = CPHYSADDR(initrd_start);
- initrd_pend = CPHYSADDR(initrd_end);
- if (initrd_start &&
+ initrd_pstart = CPHYSADDR(virt_external_initramfs_start);
+ initrd_pend = CPHYSADDR(virt_external_initramfs_end);
+ if (virt_external_initramfs_start &&
((initrd_pstart > MAX_RAM_SIZE)
|| (initrd_pend > MAX_RAM_SIZE))) {
panic("initrd out of addressable memory");
@@ -105,7 +105,7 @@ static __init void prom_meminit(void)
* ramdisk
*/
#ifdef CONFIG_BLK_DEV_INITRD
- if (initrd_start) {
+ if (virt_external_initramfs_start) {
if ((initrd_pstart > addr) &&
(initrd_pstart < (addr + size))) {
memblock_add(addr,
@@ -139,7 +139,7 @@ static __init void prom_meminit(void)
}
}
#ifdef CONFIG_BLK_DEV_INITRD
- if (initrd_start) {
+ if (virt_external_initramfs_start) {
memblock_add(initrd_pstart, initrd_pend - initrd_pstart);
memblock_reserve(initrd_pstart, initrd_pend - initrd_pstart);
}
@@ -183,17 +183,17 @@ static int __init initrd_setup(char *str)
goto fail;
}
*(tmp-1) = '@';
- initrd_start = simple_strtoul(tmp, &endptr, 16);
+ virt_external_initramfs_start = simple_strtoul(tmp, &endptr, 16);
if (*endptr) {
goto fail;
}
- initrd_end = initrd_start + initrd_size;
- printk("Found initrd of %lx@%lx\n", initrd_size, initrd_start);
+ virt_external_initramfs_end = virt_external_initramfs_start + initrd_size;
+ printk("Found initrd of %lx@%lx\n", initrd_size, virt_external_initramfs_start);
return 1;
fail:
printk("Bad initrd argument. Disabling initrd\n");
- initrd_start = 0;
- initrd_end = 0;
+ virt_external_initramfs_start = 0;
+ virt_external_initramfs_end = 0;
return 1;
}
diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c
index 2a40150142c3..3cc44fa4931c 100644
--- a/arch/nios2/kernel/setup.c
+++ b/arch/nios2/kernel/setup.c
@@ -109,8 +109,8 @@ asmlinkage void __init nios2_boot_init(unsigned r4, unsigned r5, unsigned r6,
if (r4 == 0x534f494e) { /* r4 is magic NIOS */
#if defined(CONFIG_BLK_DEV_INITRD)
if (r5) { /* initramfs */
- initrd_start = r5;
- initrd_end = r6;
+ virt_external_initramfs_start = r5;
+ virt_external_initramfs_end = r6;
}
#endif /* CONFIG_BLK_DEV_INITRD */
dtb_passed = r6;
@@ -161,9 +161,9 @@ void __init setup_arch(char **cmdline_p)
memblock_reserve(__pa_symbol(_stext), _end - _stext);
#ifdef CONFIG_BLK_DEV_INITRD
- if (initrd_start) {
- memblock_reserve(virt_to_phys((void *)initrd_start),
- initrd_end - initrd_start);
+ if (virt_external_initramfs_start) {
+ memblock_reserve(virt_to_phys((void *)virt_external_initramfs_start),
+ virt_external_initramfs_end - virt_external_initramfs_start);
}
#endif /* CONFIG_BLK_DEV_INITRD */
diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c
index a9fb9cc6779e..f387dc57ec35 100644
--- a/arch/openrisc/kernel/setup.c
+++ b/arch/openrisc/kernel/setup.c
@@ -77,9 +77,9 @@ static void __init setup_memory(void)
#ifdef CONFIG_BLK_DEV_INITRD
/* Then reserve the initrd, if any */
- if (initrd_start && (initrd_end > initrd_start)) {
- unsigned long aligned_start = ALIGN_DOWN(initrd_start, PAGE_SIZE);
- unsigned long aligned_end = ALIGN(initrd_end, PAGE_SIZE);
+ if (virt_external_initramfs_start && (virt_external_initramfs_end > virt_external_initramfs_start)) {
+ unsigned long aligned_start = ALIGN_DOWN(virt_external_initramfs_start, PAGE_SIZE);
+ unsigned long aligned_end = ALIGN(virt_external_initramfs_end, PAGE_SIZE);
memblock_reserve(__pa(aligned_start), aligned_end - aligned_start);
}
@@ -239,13 +239,13 @@ void __init setup_arch(char **cmdline_p)
setup_initial_init_mm(_stext, _etext, _edata, _end);
#ifdef CONFIG_BLK_DEV_INITRD
- if (initrd_start == initrd_end) {
+ if (virt_external_initramfs_start == virt_external_initramfs_end) {
printk(KERN_INFO "Initial ramdisk not found\n");
- initrd_start = 0;
- initrd_end = 0;
+ virt_external_initramfs_start = 0;
+ virt_external_initramfs_end = 0;
} else {
printk(KERN_INFO "Initial ramdisk at: 0x%p (%lu bytes)\n",
- (void *)(initrd_start), initrd_end - initrd_start);
+ (void *)(virt_external_initramfs_start), virt_external_initramfs_end - virt_external_initramfs_start);
initrd_below_start_ok = 1;
}
#endif
diff --git a/arch/parisc/kernel/pdt.c b/arch/parisc/kernel/pdt.c
index b70b67adb855..3715a3b088a7 100644
--- a/arch/parisc/kernel/pdt.c
+++ b/arch/parisc/kernel/pdt.c
@@ -229,7 +229,7 @@ void __init pdc_pdt_init(void)
addr = pdt_entry[i] & PDT_ADDR_PHYS_MASK;
if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) &&
- addr >= initrd_start && addr < initrd_end)
+ addr >= virt_external_initramfs_start && addr < virt_external_initramfs_end)
pr_crit("CRITICAL: initrd possibly broken "
"due to bad memory!\n");
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index ace483b6f19a..41f45fa177d0 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -71,8 +71,8 @@ static void __init setup_cmdline(char **cmdline_p)
#ifdef CONFIG_BLK_DEV_INITRD
/* did palo pass us a ramdisk? */
if (boot_args[2] != 0) {
- initrd_start = (unsigned long)__va(boot_args[2]);
- initrd_end = (unsigned long)__va(boot_args[3]);
+ virt_external_initramfs_start = (unsigned long)__va(boot_args[2]);
+ virt_external_initramfs_end = (unsigned long)__va(boot_args[3]);
}
#endif
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 14270715d754..74bfe9797589 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -298,20 +298,20 @@ static void __init setup_bootmem(void)
#endif
#ifdef CONFIG_BLK_DEV_INITRD
- if (initrd_start) {
- printk(KERN_INFO "initrd: %08lx-%08lx\n", initrd_start, initrd_end);
- if (__pa(initrd_start) < mem_max) {
+ if (virt_external_initramfs_start) {
+ printk(KERN_INFO "initrd: %08lx-%08lx\n", virt_external_initramfs_start, virt_external_initramfs_end);
+ if (__pa(virt_external_initramfs_start) < mem_max) {
unsigned long initrd_reserve;
- if (__pa(initrd_end) > mem_max) {
- initrd_reserve = mem_max - __pa(initrd_start);
+ if (__pa(virt_external_initramfs_end) > mem_max) {
+ initrd_reserve = mem_max - __pa(virt_external_initramfs_start);
} else {
- initrd_reserve = initrd_end - initrd_start;
+ initrd_reserve = virt_external_initramfs_end - virt_external_initramfs_start;
}
initrd_below_start_ok = 1;
- printk(KERN_INFO "initrd: reserving %08lx-%08lx (mem_max %08lx)\n", __pa(initrd_start), __pa(initrd_start) + initrd_reserve, mem_max);
+ 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(initrd_start), initrd_reserve);
+ memblock_reserve(__pa(virt_external_initramfs_start), initrd_reserve);
}
}
#endif
@@ -633,10 +633,10 @@ static void __init pagetable_init(void)
}
#ifdef CONFIG_BLK_DEV_INITRD
- if (initrd_end && initrd_end > mem_limit) {
- printk(KERN_INFO "initrd: mapping %08lx-%08lx\n", initrd_start, initrd_end);
- map_pages(initrd_start, __pa(initrd_start),
- initrd_end - initrd_start, PAGE_KERNEL, 0);
+ if (virt_external_initramfs_end && virt_external_initramfs_end > mem_limit) {
+ printk(KERN_INFO "initrd: mapping %08lx-%08lx\n", virt_external_initramfs_start, virt_external_initramfs_end);
+ map_pages(virt_external_initramfs_start, __pa(virt_external_initramfs_start),
+ virt_external_initramfs_end - virt_external_initramfs_start, PAGE_KERNEL, 0);
}
#endif
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 9ed9dde7d231..b7858b0bd697 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -97,11 +97,11 @@ early_param("mem", early_parse_mem);
static inline int overlaps_initrd(unsigned long start, unsigned long size)
{
#ifdef CONFIG_BLK_DEV_INITRD
- if (!initrd_start)
+ if (!virt_external_initramfs_start)
return 0;
- return (start + size) > ALIGN_DOWN(initrd_start, PAGE_SIZE) &&
- start <= ALIGN(initrd_end, PAGE_SIZE);
+ return (start + size) > ALIGN_DOWN(virt_external_initramfs_start, PAGE_SIZE) &&
+ start <= ALIGN(virt_external_initramfs_end, PAGE_SIZE);
#else
return 0;
#endif
@@ -686,10 +686,10 @@ static void __init early_reserve_mem(void)
#ifdef CONFIG_BLK_DEV_INITRD
/* Then reserve the initrd, if any */
- if (initrd_start && (initrd_end > initrd_start)) {
- memblock_reserve(ALIGN_DOWN(__pa(initrd_start), PAGE_SIZE),
- ALIGN(initrd_end, PAGE_SIZE) -
- ALIGN_DOWN(initrd_start, PAGE_SIZE));
+ if (virt_external_initramfs_start && (virt_external_initramfs_end > virt_external_initramfs_start)) {
+ memblock_reserve(ALIGN_DOWN(__pa(virt_external_initramfs_start), PAGE_SIZE),
+ ALIGN(virt_external_initramfs_end, PAGE_SIZE) -
+ ALIGN_DOWN(virt_external_initramfs_start, PAGE_SIZE));
}
#endif /* CONFIG_BLK_DEV_INITRD */
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 97d330f3b8f1..eff369cba0e5 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -360,17 +360,17 @@ const struct seq_operations cpuinfo_op = {
void __init check_for_initrd(void)
{
#ifdef CONFIG_BLK_DEV_INITRD
- DBG(" -> check_for_initrd() initrd_start=0x%lx initrd_end=0x%lx\n",
- initrd_start, initrd_end);
+ DBG(" -> check_for_initrd() virt_external_initramfs_start=0x%lx virt_external_initramfs_end=0x%lx\n",
+ virt_external_initramfs_start, virt_external_initramfs_end);
/* If we were not passed an sensible initramfs, clear initramfs reference.
*/
- if (!(is_kernel_addr(initrd_start) && is_kernel_addr(initrd_end) &&
- initrd_end > initrd_start))
- initrd_start = initrd_end = 0;
+ if (!(is_kernel_addr(virt_external_initramfs_start) && is_kernel_addr(virt_external_initramfs_end) &&
+ virt_external_initramfs_end > virt_external_initramfs_start))
+ virt_external_initramfs_start = virt_external_initramfs_end = 0;
- if (initrd_start)
- pr_info("Found initramfs at 0x%lx:0x%lx\n", initrd_start, initrd_end);
+ if (virt_external_initramfs_start)
+ pr_info("Found initramfs at 0x%lx:0x%lx\n", virt_external_initramfs_start, virt_external_initramfs_end);
DBG(" <- check_for_initrd()\n");
#endif /* CONFIG_BLK_DEV_INITRD */
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 237d8386a3f4..4c3b9ed5428d 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -296,7 +296,7 @@ static void __init pmac_setup_arch(void)
#endif
#ifdef CONFIG_PPC32
#ifdef CONFIG_BLK_DEV_INITRD
- if (!initrd_start)
+ if (!virt_external_initramfs_start)
#endif
ROOT_DEV = DEFAULT_ROOT_DEVICE;
#endif
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index a4ce721b7fe8..9bdb6f6b893e 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -672,8 +672,8 @@ static void __init reserve_initrd(void)
if (!IS_ENABLED(CONFIG_BLK_DEV_INITRD) || !get_physmem_reserved(RR_INITRD, &addr, &size))
return;
- initrd_start = (unsigned long)__va(addr);
- initrd_end = initrd_start + size;
+ virt_external_initramfs_start = (unsigned long)__va(addr);
+ virt_external_initramfs_end = virt_external_initramfs_start + size;
memblock_reserve(addr, size);
}
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index c4312ee13db9..9ce9dc5b9e56 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -153,16 +153,16 @@ void __init check_for_initrd(void)
/*
* Address sanitization
*/
- initrd_start = (unsigned long)__va(start);
- initrd_end = initrd_start + INITRD_SIZE;
+ virt_external_initramfs_start = (unsigned long)__va(start);
+ virt_external_initramfs_end = virt_external_initramfs_start + INITRD_SIZE;
- memblock_reserve(__pa(initrd_start), INITRD_SIZE);
+ memblock_reserve(__pa(virt_external_initramfs_start), INITRD_SIZE);
return;
disable:
pr_info("initrd disabled\n");
- initrd_start = initrd_end = 0;
+ virt_external_initramfs_start = virt_external_initramfs_end = 0;
#endif
}
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
index fdc93dd12c3e..7b7722ff5232 100644
--- a/arch/sparc/mm/init_32.c
+++ b/arch/sparc/mm/init_32.c
@@ -109,20 +109,20 @@ static void __init find_ramdisk(unsigned long end_of_phys_memory)
if (sparc_ramdisk_image) {
if (sparc_ramdisk_image >= (unsigned long)&_end - 2 * PAGE_SIZE)
sparc_ramdisk_image -= KERNBASE;
- initrd_start = sparc_ramdisk_image + phys_base;
- initrd_end = initrd_start + sparc_ramdisk_size;
- if (initrd_end > end_of_phys_memory) {
+ virt_external_initramfs_start = sparc_ramdisk_image + phys_base;
+ virt_external_initramfs_end = virt_external_initramfs_start + sparc_ramdisk_size;
+ if (virt_external_initramfs_end > end_of_phys_memory) {
printk(KERN_CRIT "initrd extends beyond end of memory "
"(0x%016lx > 0x%016lx)\ndisabling initrd\n",
- initrd_end, end_of_phys_memory);
- initrd_start = 0;
+ virt_external_initramfs_end, end_of_phys_memory);
+ virt_external_initramfs_start = 0;
} else {
/* Reserve the initrd image area. */
- size = initrd_end - initrd_start;
- memblock_reserve(initrd_start, size);
+ size = virt_external_initramfs_end - virt_external_initramfs_start;
+ memblock_reserve(virt_external_initramfs_start, size);
- initrd_start = (initrd_start - phys_base) + PAGE_OFFSET;
- initrd_end = (initrd_end - phys_base) + PAGE_OFFSET;
+ virt_external_initramfs_start = (virt_external_initramfs_start - phys_base) + PAGE_OFFSET;
+ virt_external_initramfs_end = (virt_external_initramfs_end - phys_base) + PAGE_OFFSET;
}
}
#endif
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 7ed58bf3aaca..af249a654e79 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -901,13 +901,13 @@ static void __init find_ramdisk(unsigned long phys_base)
numadbg("Found ramdisk at physical address 0x%lx, size %u\n",
ramdisk_image, sparc_ramdisk_size);
- initrd_start = ramdisk_image;
- initrd_end = ramdisk_image + sparc_ramdisk_size;
+ virt_external_initramfs_start = ramdisk_image;
+ virt_external_initramfs_end = ramdisk_image + sparc_ramdisk_size;
- memblock_reserve(initrd_start, sparc_ramdisk_size);
+ memblock_reserve(virt_external_initramfs_start, sparc_ramdisk_size);
- initrd_start += PAGE_OFFSET;
- initrd_end += PAGE_OFFSET;
+ virt_external_initramfs_start += PAGE_OFFSET;
+ virt_external_initramfs_end += PAGE_OFFSET;
}
#endif
}
@@ -2485,8 +2485,8 @@ int page_in_phys_avail(unsigned long paddr)
if (paddr >= kern_base && paddr < (kern_base + kern_size))
return 1;
#ifdef CONFIG_BLK_DEV_INITRD
- if (paddr >= __pa(initrd_start) &&
- paddr < __pa(PAGE_ALIGN(initrd_end)))
+ if (paddr >= __pa(virt_external_initramfs_start) &&
+ paddr < __pa(PAGE_ALIGN(virt_external_initramfs_end)))
return 1;
#endif
diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c
index 99dba827461c..e6113192a6b6 100644
--- a/arch/um/kernel/initrd.c
+++ b/arch/um/kernel/initrd.c
@@ -27,8 +27,8 @@ int __init read_initrd(void)
if (!area)
return 0;
- initrd_start = (unsigned long) area;
- initrd_end = initrd_start + size;
+ virt_external_initramfs_start = (unsigned long) area;
+ virt_external_initramfs_end = virt_external_initramfs_start + size;
return 0;
}
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index b92e09a87c69..b8169f14d175 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -213,13 +213,13 @@ struct cpio_data __init find_microcode_in_initrd(const char *path)
#endif
/*
- * Fixup the start address: after reserve_initrd() runs, initrd_start
+ * Fixup the start address: after reserve_initrd() runs, virt_external_initramfs_start
* has the virtual address of the beginning of the initrd. It also
- * possibly relocates the ramdisk. In either case, initrd_start contains
+ * possibly relocates the ramdisk. In either case, virt_external_initramfs_start contains
* the updated address so use that instead.
*/
- if (initrd_start)
- start = initrd_start;
+ if (virt_external_initramfs_start)
+ start = virt_external_initramfs_start;
return find_cpio_data(path, (void *)start, size, NULL);
#else /* !CONFIG_BLK_DEV_INITRD */
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index e727c7a7f648..167b9ef12ebb 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -328,12 +328,12 @@ static void __init relocate_initrd(void)
panic("Cannot find place for new RAMDISK of size %lld\n",
ramdisk_size);
- initrd_start = relocated_ramdisk + PAGE_OFFSET;
- initrd_end = initrd_start + ramdisk_size;
+ virt_external_initramfs_start = relocated_ramdisk + PAGE_OFFSET;
+ virt_external_initramfs_end = virt_external_initramfs_start + ramdisk_size;
printk(KERN_INFO "Allocated new RAMDISK: [mem %#010llx-%#010llx]\n",
relocated_ramdisk, relocated_ramdisk + ramdisk_size - 1);
- ret = copy_from_early_mem((void *)initrd_start, ramdisk_image, ramdisk_size);
+ ret = copy_from_early_mem((void *)virt_external_initramfs_start, ramdisk_image, ramdisk_size);
if (ret)
panic("Copy RAMDISK failed\n");
@@ -368,7 +368,7 @@ static void __init reserve_initrd(void)
!ramdisk_image || !ramdisk_size)
return; /* No initrd provided by bootloader */
- initrd_start = 0;
+ virt_external_initramfs_start = 0;
printk(KERN_INFO "RAMDISK: [mem %#010llx-%#010llx]\n", ramdisk_image,
ramdisk_end - 1);
@@ -376,8 +376,8 @@ static void __init reserve_initrd(void)
if (pfn_range_is_mapped(PFN_DOWN(ramdisk_image),
PFN_DOWN(ramdisk_end))) {
/* All are mapped, easy case */
- initrd_start = ramdisk_image + PAGE_OFFSET;
- initrd_end = initrd_start + ramdisk_size;
+ virt_external_initramfs_start = ramdisk_image + PAGE_OFFSET;
+ virt_external_initramfs_end = virt_external_initramfs_start + ramdisk_size;
return;
}
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index f72e280363be..2e9003be3e8c 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -49,8 +49,8 @@
#include <asm/traps.h>
#ifdef CONFIG_BLK_DEV_INITRD
-extern unsigned long initrd_start;
-extern unsigned long initrd_end;
+extern unsigned long virt_external_initramfs_start;
+extern unsigned long virt_external_initramfs_end;
extern int initrd_below_start_ok;
#endif
@@ -106,8 +106,8 @@ static int __init parse_tag_initrd(const bp_tag_t* tag)
{
struct bp_meminfo *mi = (struct bp_meminfo *)(tag->data);
- initrd_start = (unsigned long)__va(mi->start);
- initrd_end = (unsigned long)__va(mi->end);
+ virt_external_initramfs_start = (unsigned long)__va(mi->start);
+ virt_external_initramfs_end = (unsigned long)__va(mi->end);
return 0;
}
@@ -290,11 +290,11 @@ void __init setup_arch(char **cmdline_p)
/* Reserve some memory regions */
#ifdef CONFIG_BLK_DEV_INITRD
- if (initrd_start < initrd_end &&
- !mem_reserve(__pa(initrd_start), __pa(initrd_end)))
+ 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;
else
- initrd_start = 0;
+ virt_external_initramfs_start = 0;
#endif
mem_reserve(__pa(_stext), __pa(_end));
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 3160cb7dca00..37ad99c10ac4 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -432,8 +432,8 @@ void __init acpi_table_upgrade(void)
data = __builtin_initramfs_start;
size = __builtin_initramfs_size;
} else {
- data = (void *)initrd_start;
- size = initrd_end - initrd_start;
+ data = (void *)virt_external_initramfs_start;
+ size = virt_external_initramfs_end - virt_external_initramfs_start;
}
if (data == NULL || size == 0)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 9c4c9be948c5..baf8347e0314 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -765,8 +765,8 @@ static void __early_init_dt_declare_initrd(unsigned long start,
*/
if (!IS_ENABLED(CONFIG_ARM64) &&
!(IS_ENABLED(CONFIG_RISCV) && IS_ENABLED(CONFIG_64BIT))) {
- initrd_start = (unsigned long)__va(start);
- initrd_end = (unsigned long)__va(end);
+ virt_external_initramfs_start = (unsigned long)__va(start);
+ virt_external_initramfs_end = (unsigned long)__va(end);
initrd_below_start_ok = 1;
}
}
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index 23c08e88234c..f19efebe8221 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -3,10 +3,10 @@
#ifndef __LINUX_INITRD_H
#define __LINUX_INITRD_H
-/* 1 if it is not an error if initrd_start < memory_start */
+/* 1 if it is not an error if virt_external_initramfs_start < memory_start */
extern int initrd_below_start_ok;
-extern unsigned long initrd_start, initrd_end;
+extern unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
extern void free_initrd_mem(unsigned long, unsigned long);
#ifdef CONFIG_BLK_DEV_INITRD
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index 06be76aa602c..8bdeb205a0cd 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -12,7 +12,7 @@
#include "do_mounts.h"
-unsigned long initrd_start, initrd_end;
+unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
int initrd_below_start_ok;
static int __init early_initrdmem(char *p)
diff --git a/init/initramfs.c b/init/initramfs.c
index 5242d851e839..9a221c713c60 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -611,7 +611,7 @@ void __init reserve_initrd_mem(void)
unsigned long size;
/* Ignore the virtul address computed during device tree parsing */
- initrd_start = initrd_end = 0;
+ virt_external_initramfs_start = virt_external_initramfs_end = 0;
if (!phys_external_initramfs_size)
return;
@@ -639,15 +639,15 @@ void __init reserve_initrd_mem(void)
memblock_reserve(start, size);
/* Now convert initrd to virtual addresses */
- initrd_start = (unsigned long)__va(phys_external_initramfs_start);
- initrd_end = initrd_start + phys_external_initramfs_size;
+ 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;
return;
disable:
pr_cont(" - disabling initrd\n");
- initrd_start = 0;
- initrd_end = 0;
+ virt_external_initramfs_start = 0;
+ virt_external_initramfs_end = 0;
}
void __weak __init free_initrd_mem(unsigned long start, unsigned long end)
@@ -673,17 +673,17 @@ static bool __init kexec_free_initrd(void)
* If the initrd region is overlapped with crashkernel reserved region,
* free only memory that is not part of crashkernel region.
*/
- if (initrd_start >= crashk_end || initrd_end <= crashk_start)
+ if (virt_external_initramfs_start >= crashk_end || virt_external_initramfs_end <= crashk_start)
return false;
/*
* Initialize initrd memory region since the kexec boot does not do.
*/
- memset((void *)initrd_start, 0, initrd_end - initrd_start);
- if (initrd_start < crashk_start)
- free_initrd_mem(initrd_start, crashk_start);
- if (initrd_end > crashk_end)
- free_initrd_mem(crashk_end, initrd_end);
+ memset((void *)virt_external_initramfs_start, 0, virt_external_initramfs_end - virt_external_initramfs_start);
+ if (virt_external_initramfs_start < crashk_start)
+ free_initrd_mem(virt_external_initramfs_start, crashk_start);
+ if (virt_external_initramfs_end > crashk_end)
+ free_initrd_mem(crashk_end, virt_external_initramfs_end);
return true;
}
#else
@@ -700,12 +700,12 @@ static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
if (err)
panic_show_mem("%s", err); /* Failed to decompress INTERNAL initramfs */
- if (!initrd_start || IS_ENABLED(CONFIG_INITRAMFS_FORCE))
+ if (!virt_external_initramfs_start || IS_ENABLED(CONFIG_INITRAMFS_FORCE))
goto done;
printk(KERN_INFO "Unpacking initramfs...\n");
- err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start);
+ err = unpack_to_rootfs((char *)virt_external_initramfs_start, virt_external_initramfs_end - virt_external_initramfs_start);
if (err) {
printk(KERN_EMERG "Initramfs unpacking failed: %s\n", err);
}
@@ -717,16 +717,16 @@ static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
* If the initrd region is overlapped with crashkernel reserved region,
* free only memory that is not part of crashkernel region.
*/
- if (!do_retain_initrd && initrd_start && !kexec_free_initrd()) {
- free_initrd_mem(initrd_start, initrd_end);
- } else if (do_retain_initrd && initrd_start) {
- bin_attr_initrd.size = initrd_end - initrd_start;
- bin_attr_initrd.private = (void *)initrd_start;
+ if (!do_retain_initrd && virt_external_initramfs_start && !kexec_free_initrd()) {
+ free_initrd_mem(virt_external_initramfs_start, virt_external_initramfs_end);
+ } else if (do_retain_initrd && virt_external_initramfs_start) {
+ bin_attr_initrd.size = virt_external_initramfs_end - virt_external_initramfs_start;
+ bin_attr_initrd.private = (void *)virt_external_initramfs_start;
if (sysfs_create_bin_file(firmware_kobj, &bin_attr_initrd))
pr_err("Failed to create initrd sysfs file");
}
- initrd_start = 0;
- initrd_end = 0;
+ virt_external_initramfs_start = 0;
+ virt_external_initramfs_end = 0;
init_flush_fput();
}
diff --git a/init/main.c b/init/main.c
index 0ee0ee7b7c2c..5f4d860ab72a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -271,10 +271,10 @@ static void * __init get_boot_config_from_initrd(size_t *_size)
u32 *hdr;
int i;
- if (!initrd_end)
+ if (!virt_external_initramfs_end)
return NULL;
- data = (char *)initrd_end - BOOTCONFIG_MAGIC_LEN;
+ data = (char *)virt_external_initramfs_end - BOOTCONFIG_MAGIC_LEN;
/*
* Since Grub may align the size of initrd to 4, we must
* check the preceding 3 bytes as well.
@@ -292,9 +292,9 @@ static void * __init get_boot_config_from_initrd(size_t *_size)
csum = le32_to_cpu(hdr[1]);
data = ((void *)hdr) - size;
- if ((unsigned long)data < initrd_start) {
+ if ((unsigned long)data < virt_external_initramfs_start) {
pr_err("bootconfig size %d is greater than initrd size %ld\n",
- size, initrd_end - initrd_start);
+ size, virt_external_initramfs_end - virt_external_initramfs_start);
return NULL;
}
@@ -304,7 +304,7 @@ static void * __init get_boot_config_from_initrd(size_t *_size)
}
/* Remove bootconfig from initramfs/initrd */
- initrd_end = (unsigned long)data;
+ virt_external_initramfs_end = (unsigned long)data;
if (_size)
*_size = size;
@@ -1047,12 +1047,12 @@ void start_kernel(void)
locking_selftest();
#ifdef CONFIG_BLK_DEV_INITRD
- if (initrd_start && !initrd_below_start_ok &&
- page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) {
+ if (virt_external_initramfs_start && !initrd_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 *)initrd_start)),
+ page_to_pfn(virt_to_page((void *)virt_external_initramfs_start)),
min_low_pfn);
- initrd_start = 0;
+ virt_external_initramfs_start = 0;
}
#endif
setup_per_cpu_pageset();
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 28/62] init: alpha, arc, arm, arm64, csky, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, s390, sh, sparc, um, x86, xtensa: rename initrd_{start,end} to virt_external_initramfs_{start,end}
2025-09-13 0:38 ` [PATCH RESEND 28/62] init: alpha, arc, arm, arm64, csky, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, s390, sh, sparc, um, x86, xtensa: rename initrd_{start,end} to virt_external_initramfs_{start,end} Askar Safin
@ 2025-09-13 5:48 ` Borislav Petkov
2025-09-13 5:59 ` Borislav Petkov
2025-09-16 3:09 ` Rob Herring
1 sibling, 1 reply; 95+ messages in thread
From: Borislav Petkov @ 2025-09-13 5:48 UTC (permalink / raw)
To: Askar Safin
Cc: linux-fsdevel, linux-kernel, Linus Torvalds, Greg Kroah-Hartman,
Christian Brauner, Al Viro, Jan Kara, Christoph Hellwig,
Jens Axboe, Andy Shevchenko, Aleksa Sarai, Thomas Weißschuh,
Julian Stecklina, Gao Xiang, Art Nikpal, Andrew Morton,
Eric Curtin, Alexander Graf, Rob Landley, Lennart Poettering,
linux-arch, linux-alpha, linux-snps-arc, linux-arm-kernel,
linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
linux-s390, linux-sh, sparclinux, linux-um, x86, Ingo Molnar,
linux-block, initramfs, linux-api, linux-doc, linux-efi,
linux-ext4, Theodore Y . Ts'o, linux-acpi, Michal Simek,
devicetree, Luis Chamberlain, Kees Cook, Thorsten Blum,
Heiko Carstens, patches
On Sat, Sep 13, 2025 at 12:38:07AM +0000, Askar Safin wrote:
> Rename initrd_start to virt_external_initramfs_start and
> initrd_end to virt_external_initramfs_end.
"virt" as in "virtualization"?
That's not confusing at all... :-\
And "external" means what?
> They refer to initramfs, not to initrd
Why not simply initramfs_{start,end} if they belong to it?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 28/62] init: alpha, arc, arm, arm64, csky, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, s390, sh, sparc, um, x86, xtensa: rename initrd_{start,end} to virt_external_initramfs_{start,end}
2025-09-13 5:48 ` Borislav Petkov
@ 2025-09-13 5:59 ` Borislav Petkov
0 siblings, 0 replies; 95+ messages in thread
From: Borislav Petkov @ 2025-09-13 5:59 UTC (permalink / raw)
To: Askar Safin
Cc: linux-fsdevel, linux-kernel, Linus Torvalds, Greg Kroah-Hartman,
Christian Brauner, Al Viro, Jan Kara, Christoph Hellwig,
Jens Axboe, Andy Shevchenko, Aleksa Sarai, Thomas Weißschuh,
Julian Stecklina, Gao Xiang, Art Nikpal, Andrew Morton,
Alexander Graf, Rob Landley, Lennart Poettering, linux-arch,
linux-alpha, linux-snps-arc, linux-arm-kernel, linux-csky,
linux-hexagon, loongarch, linux-m68k, linux-mips, linux-openrisc,
linux-parisc, linuxppc-dev, linux-riscv, linux-s390, linux-sh,
sparclinux, linux-um, x86, Ingo Molnar, linux-block, initramfs,
linux-api, linux-doc, linux-efi, linux-ext4,
Theodore Y . Ts'o, linux-acpi, Michal Simek, devicetree,
Luis Chamberlain, Kees Cook, Thorsten Blum, Heiko Carstens,
patches
On Sat, Sep 13, 2025 at 07:48:37AM +0200, Borislav Petkov wrote:
> On Sat, Sep 13, 2025 at 12:38:07AM +0000, Askar Safin wrote:
> > Rename initrd_start to virt_external_initramfs_start and
> > initrd_end to virt_external_initramfs_end.
>
> "virt" as in "virtualization"?
Ooh, now I see it - you have virtual and physical initramfs address things. We
usually call those "va" and "pa". So
initramfs_{va,pa}_{start,end}
perhaps...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 28/62] init: alpha, arc, arm, arm64, csky, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, s390, sh, sparc, um, x86, xtensa: rename initrd_{start,end} to virt_external_initramfs_{start,end}
2025-09-13 0:38 ` [PATCH RESEND 28/62] init: alpha, arc, arm, arm64, csky, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, s390, sh, sparc, um, x86, xtensa: rename initrd_{start,end} to virt_external_initramfs_{start,end} Askar Safin
2025-09-13 5:48 ` Borislav Petkov
@ 2025-09-16 3:09 ` Rob Herring
1 sibling, 0 replies; 95+ messages in thread
From: Rob Herring @ 2025-09-16 3:09 UTC (permalink / raw)
To: Askar Safin
Cc: linux-fsdevel, linux-kernel, Linus Torvalds, Greg Kroah-Hartman,
Christian Brauner, Al Viro, Jan Kara, Christoph Hellwig,
Jens Axboe, Andy Shevchenko, Aleksa Sarai, Thomas Weißschuh,
Julian Stecklina, Gao Xiang, Art Nikpal, Andrew Morton,
Eric Curtin, Alexander Graf, Rob Landley, Lennart Poettering,
linux-arch, linux-alpha, linux-snps-arc, linux-arm-kernel,
linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
linux-s390, linux-sh, sparclinux, linux-um, x86, Ingo Molnar,
linux-block, initramfs, linux-api, linux-doc, linux-efi,
linux-ext4, Theodore Y . Ts'o, linux-acpi, Michal Simek,
devicetree, Luis Chamberlain, Kees Cook, Thorsten Blum,
Heiko Carstens, patches
On Sat, Sep 13, 2025 at 12:38:07AM +0000, Askar Safin wrote:
> Rename initrd_start to virt_external_initramfs_start and
> initrd_end to virt_external_initramfs_end.
There's not really any point in listing every arch in the subject.
Rob
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 29/62] init: move virt_external_initramfs_{start,end} to init/initramfs.c
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (27 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 28/62] init: alpha, arc, arm, arm64, csky, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, s390, sh, sparc, um, x86, xtensa: rename initrd_{start,end} to virt_external_initramfs_{start,end} Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 30/62] doc: remove documentation for block device 4 0 Askar Safin
` (39 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Move definitions of virt_external_initramfs_start and
virt_external_initramfs_end to init/initramfs.c
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/do_mounts_initrd.c | 1 -
init/initramfs.c | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index 8bdeb205a0cd..535ce459ab94 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -12,7 +12,6 @@
#include "do_mounts.h"
-unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
int initrd_below_start_ok;
static int __init early_initrdmem(char *p)
diff --git a/init/initramfs.c b/init/initramfs.c
index 9a221c713c60..d2301cc6c470 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -600,6 +600,8 @@ __setup("initramfs_async=", initramfs_async_setup);
#include <linux/initrd.h>
#include <linux/kexec.h>
+unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
+
phys_addr_t phys_external_initramfs_start __initdata;
unsigned long phys_external_initramfs_size __initdata;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 30/62] doc: remove documentation for block device 4 0
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (28 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 29/62] init: move virt_external_initramfs_{start,end} to init/initramfs.c Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 31/62] init: rename initrd_below_start_ok to initramfs_below_start_ok Askar Safin
` (38 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
It doesn't work. I tested this both in system booted
using initramfs and in system booted from real root
device directly
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/admin-guide/devices.txt | 6 ------
1 file changed, 6 deletions(-)
diff --git a/Documentation/admin-guide/devices.txt b/Documentation/admin-guide/devices.txt
index 27835389ca49..6ce0940233a8 100644
--- a/Documentation/admin-guide/devices.txt
+++ b/Documentation/admin-guide/devices.txt
@@ -138,12 +138,6 @@
number for BSD PTY devices. As of Linux 2.1.115, this
is no longer supported. Use major numbers 2 and 3.
- 4 block Aliases for dynamically allocated major devices to be used
- when its not possible to create the real device nodes
- because the root filesystem is mounted read-only.
-
- 0 = /dev/root
-
5 char Alternate TTY devices
0 = /dev/tty Current TTY device
1 = /dev/console System console
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 31/62] init: rename initrd_below_start_ok to initramfs_below_start_ok
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (29 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 30/62] doc: remove documentation for block device 4 0 Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 32/62] init: move initramfs_below_start_ok to init/initramfs.c Askar Safin
` (37 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
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
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 32/62] init: move initramfs_below_start_ok to init/initramfs.c
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (30 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 31/62] init: rename initrd_below_start_ok to initramfs_below_start_ok Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 33/62] init: remove init/do_mounts_initrd.c Askar Safin
` (36 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/do_mounts_initrd.c | 2 --
init/initramfs.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index d8b809ced11b..509f912c0fce 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -12,8 +12,6 @@
#include "do_mounts.h"
-int initramfs_below_start_ok;
-
static int __init early_initrdmem(char *p)
{
phys_addr_t start;
diff --git a/init/initramfs.c b/init/initramfs.c
index a9c5d211665d..90096177a867 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -601,6 +601,7 @@ __setup("initramfs_async=", initramfs_async_setup);
#include <linux/kexec.h>
unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
+int initramfs_below_start_ok;
phys_addr_t phys_external_initramfs_start __initdata;
unsigned long phys_external_initramfs_size __initdata;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 33/62] init: remove init/do_mounts_initrd.c
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (31 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 32/62] init: move initramfs_below_start_ok to init/initramfs.c Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 34/62] init: inline create_dev into the only caller Askar Safin
` (35 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/Makefile | 1 -
init/do_mounts_initrd.c | 36 ------------------------------------
init/initramfs.c | 23 +++++++++++++++++++++++
3 files changed, 23 insertions(+), 37 deletions(-)
delete mode 100644 init/do_mounts_initrd.c
diff --git a/init/Makefile b/init/Makefile
index b020154b3d2a..09657c0274eb 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -17,7 +17,6 @@ obj-$(CONFIG_INITRAMFS_TEST) += initramfs_test.o
obj-y += init_task.o
mounts-y := do_mounts.o
-mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o
#
# UTS_VERSION
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
deleted file mode 100644
index 509f912c0fce..000000000000
--- a/init/do_mounts_initrd.c
+++ /dev/null
@@ -1,36 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/unistd.h>
-#include <linux/kernel.h>
-#include <linux/fs.h>
-#include <linux/minix_fs.h>
-#include <linux/romfs_fs.h>
-#include <linux/initrd.h>
-#include <linux/sched.h>
-#include <linux/freezer.h>
-#include <linux/kmod.h>
-#include <uapi/linux/mount.h>
-
-#include "do_mounts.h"
-
-static int __init early_initrdmem(char *p)
-{
- phys_addr_t start;
- unsigned long size;
- char *endp;
-
- start = memparse(p, &endp);
- if (*endp == ',') {
- size = memparse(endp + 1, NULL);
-
- phys_external_initramfs_start = start;
- phys_external_initramfs_size = size;
- }
- return 0;
-}
-early_param("initrdmem", early_initrdmem);
-
-static int __init early_initrd(char *p)
-{
- return early_initrdmem(p);
-}
-early_param("initrd", early_initrd);
diff --git a/init/initramfs.c b/init/initramfs.c
index 90096177a867..8ed352721a79 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -606,6 +606,29 @@ int initramfs_below_start_ok;
phys_addr_t phys_external_initramfs_start __initdata;
unsigned long phys_external_initramfs_size __initdata;
+static int __init early_initrdmem(char *p)
+{
+ phys_addr_t start;
+ unsigned long size;
+ char *endp;
+
+ start = memparse(p, &endp);
+ if (*endp == ',') {
+ size = memparse(endp + 1, NULL);
+
+ phys_external_initramfs_start = start;
+ phys_external_initramfs_size = size;
+ }
+ return 0;
+}
+early_param("initrdmem", early_initrdmem);
+
+static int __init early_initrd(char *p)
+{
+ return early_initrdmem(p);
+}
+early_param("initrd", early_initrd);
+
static BIN_ATTR(initrd, 0440, sysfs_bin_attr_simple_read, NULL, 0);
void __init reserve_initrd_mem(void)
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 34/62] init: inline create_dev into the only caller
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (32 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 33/62] init: remove init/do_mounts_initrd.c Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 35/62] init: make mount_root_generic static Askar Safin
` (34 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/do_mounts.c | 5 ++++-
init/do_mounts.h | 6 ------
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 5c407ca54063..60ba8a633d32 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -366,7 +366,10 @@ static int __init mount_nodev_root(char *root_device_name)
#ifdef CONFIG_BLOCK
static void __init mount_block_root(char *root_device_name)
{
- int err = create_dev("/dev/root", ROOT_DEV);
+ int err;
+
+ init_unlink("/dev/root");
+ err = init_mknod("/dev/root", S_IFBLK | 0600, new_encode_dev(ROOT_DEV));
if (err < 0)
pr_emerg("Failed to create /dev/root: %d\n", err);
diff --git a/init/do_mounts.h b/init/do_mounts.h
index 6c7a535e71ce..f3df9d697304 100644
--- a/init/do_mounts.h
+++ b/init/do_mounts.h
@@ -16,12 +16,6 @@ void mount_root_generic(char *name, char *pretty_name, int flags);
void mount_root(char *root_device_name);
extern int root_mountflags;
-static inline __init int create_dev(char *name, dev_t dev)
-{
- init_unlink(name);
- return init_mknod(name, S_IFBLK | 0600, new_encode_dev(dev));
-}
-
/* Ensure that async file closing finished to prevent spurious errors. */
static inline void init_flush_fput(void)
{
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 35/62] init: make mount_root_generic static
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (33 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 34/62] init: inline create_dev into the only caller Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 0:38 ` [PATCH RESEND 36/62] init: make mount_root static Askar Safin
` (33 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/do_mounts.c | 2 +-
init/do_mounts.h | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 60ba8a633d32..c722351c991f 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -174,7 +174,7 @@ static int __init do_mount_root(const char *name, const char *fs,
return ret;
}
-void __init mount_root_generic(char *name, char *pretty_name, int flags)
+static void __init mount_root_generic(char *name, char *pretty_name, int flags)
{
struct page *page = alloc_page(GFP_KERNEL);
char *fs_names = page_address(page);
diff --git a/init/do_mounts.h b/init/do_mounts.h
index f3df9d697304..f291c30f7407 100644
--- a/init/do_mounts.h
+++ b/init/do_mounts.h
@@ -12,7 +12,6 @@
#include <linux/task_work.h>
#include <linux/file.h>
-void mount_root_generic(char *name, char *pretty_name, int flags);
void mount_root(char *root_device_name);
extern int root_mountflags;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 36/62] init: make mount_root static
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (34 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 35/62] init: make mount_root_generic static Askar Safin
@ 2025-09-13 0:38 ` Askar Safin
2025-09-13 8:58 ` [PATCH RESEND 00/62] initrd: remove classic initrd support Julian Stecklina
` (32 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-13 0:38 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/do_mounts.c | 2 +-
init/do_mounts.h | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index c722351c991f..7ec5ee5a5c19 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -381,7 +381,7 @@ static inline void mount_block_root(char *root_device_name)
}
#endif /* CONFIG_BLOCK */
-void __init mount_root(char *root_device_name)
+static void __init mount_root(char *root_device_name)
{
switch (ROOT_DEV) {
case Root_NFS:
diff --git a/init/do_mounts.h b/init/do_mounts.h
index f291c30f7407..90422fb07c02 100644
--- a/init/do_mounts.h
+++ b/init/do_mounts.h
@@ -12,7 +12,6 @@
#include <linux/task_work.h>
#include <linux/file.h>
-void mount_root(char *root_device_name);
extern int root_mountflags;
/* Ensure that async file closing finished to prevent spurious errors. */
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (35 preceding siblings ...)
2025-09-13 0:38 ` [PATCH RESEND 36/62] init: make mount_root static Askar Safin
@ 2025-09-13 8:58 ` Julian Stecklina
2025-09-14 3:43 ` [PATCH RESEND 37/62] init: remove root_mountflags from init/do_mounts.h Askar Safin
` (31 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Julian Stecklina @ 2025-09-13 8:58 UTC (permalink / raw)
To: safinaskar@gmail.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: tytso@mit.edu, linux-csky@vger.kernel.org,
linux-arch@vger.kernel.org, rob@landley.net,
linux-snps-arc@lists.infradead.org, mzxreary@0pointer.de,
viro@zeniv.linux.org.uk, jack@suse.cz, linux-mips@vger.kernel.org,
axboe@kernel.dk, linux-riscv@lists.infradead.org, hch@lst.de,
thomas.weissschuh@linutronix.de, linux-block@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-openrisc@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-s390@vger.kernel.org,
x86@kernel.org, kees@kernel.org, linux-parisc@vger.kernel.org,
linux-api@vger.kernel.org, hsiangkao@linux.alibaba.com,
mcgrof@kernel.org, linux-efi@vger.kernel.org, cyphar@cyphar.com,
linuxppc-dev@lists.ozlabs.org, hca@linux.ibm.com,
linux-m68k@lists.linux-m68k.org, monstr@monstr.eu,
andy.shevchenko@gmail.com, graf@amazon.com, brauner@kernel.org,
gregkh@linuxfoundation.org, email2tema@gmail.com,
linux-sh@vger.kernel.org, sparclinux@vger.kernel.org,
ecurtin@redhat.com, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-hexagon@vger.kernel.org, linux-alpha@vger.kernel.org,
linux-um@lists.infradead.org, mingo@redhat.com,
loongarch@lists.linux.dev, initramfs@vger.kernel.org,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
linux-doc@vger.kernel.org, patches@lists.linux.dev,
thorsten.blum@linux.dev
On Sat, 2025-09-13 at 00:37 +0000, Askar Safin wrote:
> Intro
> ====
> This patchset removes classic initrd (initial RAM disk) support,
> which was deprecated in 2020.
> Initramfs still stays, and RAM disk itself (brd) still stays, too.
> init/do_mounts* and init/*initramfs* are listed in VFS entry in
> MAINTAINERS, so I think this patchset should go through VFS tree.
> This patchset touchs every subdirectory in arch/, so I tested it
> on 8 (!!!) archs in Qemu (see details below).
> Warning: this patchset renames CONFIG_BLK_DEV_INITRD (!!!) to CONFIG_INITRAMFS
> and CONFIG_RD_* to CONFIG_INITRAMFS_DECOMPRESS_* (for example,
> CONFIG_RD_GZIP to CONFIG_INITRAMFS_DECOMPRESS_GZIP).
> If you still use initrd, see below for workaround.
>
As the person who kicked this off by trying to get erofs support for initrds:
You have all my support for nuking so much legacy code! I'm all for removing
historical baggage even if it comes with slight inconveniences for fringe
usecase users (me!).
If this series goes through, I'll drink a beer to you!
Acked-by: Julian Stecklina <julian.stecklina@cyberus-technology.de>
>
> Also I renamed CONFIG_BLK_DEV_INITRD (which became total misnomer)
> to CONFIG_INITRAMFS. And CONFIG_RD_* to CONFIG_INITRAMFS_DECOMPRESS_*.
> This will break all configs out there (update your configs!).
This is beautiful. The original names were pretty misleading!
> Workaround
> ====
> If "retain_initrd" is passed to kernel, then initramfs/initrd,
> passed by bootloader, is retained and becomes available after boot
> as read-only magic file /sys/firmware/initrd [3].
This is pretty neat, because now you can use _all filesystems_ as initrds. :-D
This solves my original problem, albeit with a tiny shim initramfs. Nice!
Julian
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH RESEND 37/62] init: remove root_mountflags from init/do_mounts.h
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (36 preceding siblings ...)
2025-09-13 8:58 ` [PATCH RESEND 00/62] initrd: remove classic initrd support Julian Stecklina
@ 2025-09-14 3:43 ` Askar Safin
2025-09-14 3:50 ` [PATCH RESEND 38/62] init: remove most headers " Askar Safin
` (30 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:43 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
It is already declared in include/linux/kernel.h
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/do_mounts.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/init/do_mounts.h b/init/do_mounts.h
index 90422fb07c02..e225d594dd06 100644
--- a/init/do_mounts.h
+++ b/init/do_mounts.h
@@ -12,8 +12,6 @@
#include <linux/task_work.h>
#include <linux/file.h>
-extern int root_mountflags;
-
/* Ensure that async file closing finished to prevent spurious errors. */
static inline void init_flush_fput(void)
{
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 38/62] init: remove most headers from init/do_mounts.h
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (37 preceding siblings ...)
2025-09-14 3:43 ` [PATCH RESEND 37/62] init: remove root_mountflags from init/do_mounts.h Askar Safin
@ 2025-09-14 3:50 ` Askar Safin
2025-09-14 3:51 ` [PATCH RESEND 39/62] init: make console_on_rootfs static Askar Safin
` (29 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:50 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/do_mounts.c | 2 ++
init/do_mounts.h | 10 ----------
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 7ec5ee5a5c19..5b55d0035e03 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -5,12 +5,14 @@
#include <linux/fd.h>
#include <linux/tty.h>
#include <linux/suspend.h>
+#include <linux/blkdev.h>
#include <linux/root_dev.h>
#include <linux/security.h>
#include <linux/delay.h>
#include <linux/mount.h>
#include <linux/device.h>
#include <linux/init.h>
+#include <linux/init_syscalls.h>
#include <linux/fs.h>
#include <linux/initrd.h>
#include <linux/async.h>
diff --git a/init/do_mounts.h b/init/do_mounts.h
index e225d594dd06..53e60add795a 100644
--- a/init/do_mounts.h
+++ b/init/do_mounts.h
@@ -1,14 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
-#include <linux/kernel.h>
-#include <linux/blkdev.h>
-#include <linux/init.h>
-#include <linux/syscalls.h>
-#include <linux/unistd.h>
-#include <linux/slab.h>
-#include <linux/mount.h>
-#include <linux/major.h>
-#include <linux/root_dev.h>
-#include <linux/init_syscalls.h>
#include <linux/task_work.h>
#include <linux/file.h>
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 39/62] init: make console_on_rootfs static
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (38 preceding siblings ...)
2025-09-14 3:50 ` [PATCH RESEND 38/62] init: remove most headers " Askar Safin
@ 2025-09-14 3:51 ` Askar Safin
2025-09-14 3:51 ` [PATCH RESEND 40/62] init: rename free_initrd_mem to free_initramfs_mem Askar Safin
` (28 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:51 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
include/linux/initrd.h | 2 --
init/main.c | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index 364b603215ac..55239701c4e0 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -23,6 +23,4 @@ extern unsigned long phys_external_initramfs_size;
extern char __builtin_initramfs_start[];
extern unsigned long __builtin_initramfs_size;
-void console_on_rootfs(void);
-
#endif /* __LINUX_INITRD_H */
diff --git a/init/main.c b/init/main.c
index 58a7199c81f7..f119460bf8e1 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1533,7 +1533,7 @@ static int __ref kernel_init(void *unused)
}
/* Open /dev/console, for stdin/stdout/stderr, this should never fail */
-void __init console_on_rootfs(void)
+static void __init console_on_rootfs(void)
{
struct file *file = filp_open("/dev/console", O_RDWR, 0);
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 40/62] init: rename free_initrd_mem to free_initramfs_mem
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (39 preceding siblings ...)
2025-09-14 3:51 ` [PATCH RESEND 39/62] init: make console_on_rootfs static Askar Safin
@ 2025-09-14 3:51 ` Askar Safin
2025-09-14 3:52 ` [PATCH RESEND 41/62] init: rename reserve_initrd_mem to reserve_initramfs_mem Askar Safin
` (27 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:51 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/mm/init.c | 2 +-
arch/x86/mm/init.c | 2 +-
include/linux/initrd.h | 2 +-
init/initramfs.c | 10 +++++-----
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 4faeec51c522..290e9f9874c9 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -437,7 +437,7 @@ void free_initmem(void)
}
#ifdef CONFIG_BLK_DEV_INITRD
-void free_initrd_mem(unsigned long start, unsigned long end)
+void free_initramfs_mem(unsigned long start, unsigned long end)
{
if (start == virt_external_initramfs_start)
start = round_down(start, PAGE_SIZE);
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index bb57e93b4caf..c7ca996fb430 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -981,7 +981,7 @@ void __ref free_initmem(void)
}
#ifdef CONFIG_BLK_DEV_INITRD
-void __init free_initrd_mem(unsigned long start, unsigned long end)
+void __init free_initramfs_mem(unsigned long start, unsigned long end)
{
/*
* end could be not aligned, and We can not align that,
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index 55239701c4e0..b2a0128c3438 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -7,7 +7,7 @@
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);
+extern void free_initramfs_mem(unsigned long, unsigned long);
#ifdef CONFIG_BLK_DEV_INITRD
extern void __init reserve_initrd_mem(void);
diff --git a/init/initramfs.c b/init/initramfs.c
index 8ed352721a79..7a050e54ff1a 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -642,7 +642,7 @@ void __init reserve_initrd_mem(void)
if (!phys_external_initramfs_size)
return;
/*
- * Round the memory region to page boundaries as per free_initrd_mem()
+ * Round the memory region to page boundaries as per free_initramfs_mem()
* This allows us to detect whether the pages overlapping the initrd
* are in use, but more importantly, reserves the entire set of pages
* as we don't want these pages allocated for other purposes.
@@ -676,7 +676,7 @@ void __init reserve_initrd_mem(void)
virt_external_initramfs_end = 0;
}
-void __weak __init free_initrd_mem(unsigned long start, unsigned long end)
+void __weak __init free_initramfs_mem(unsigned long start, unsigned long end)
{
#ifdef CONFIG_ARCH_KEEP_MEMBLOCK
unsigned long aligned_start = ALIGN_DOWN(start, PAGE_SIZE);
@@ -707,9 +707,9 @@ static bool __init kexec_free_initrd(void)
*/
memset((void *)virt_external_initramfs_start, 0, virt_external_initramfs_end - virt_external_initramfs_start);
if (virt_external_initramfs_start < crashk_start)
- free_initrd_mem(virt_external_initramfs_start, crashk_start);
+ free_initramfs_mem(virt_external_initramfs_start, crashk_start);
if (virt_external_initramfs_end > crashk_end)
- free_initrd_mem(crashk_end, virt_external_initramfs_end);
+ free_initramfs_mem(crashk_end, virt_external_initramfs_end);
return true;
}
#else
@@ -744,7 +744,7 @@ static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
* free only memory that is not part of crashkernel region.
*/
if (!do_retain_initrd && virt_external_initramfs_start && !kexec_free_initrd()) {
- free_initrd_mem(virt_external_initramfs_start, virt_external_initramfs_end);
+ free_initramfs_mem(virt_external_initramfs_start, virt_external_initramfs_end);
} else if (do_retain_initrd && virt_external_initramfs_start) {
bin_attr_initrd.size = virt_external_initramfs_end - virt_external_initramfs_start;
bin_attr_initrd.private = (void *)virt_external_initramfs_start;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 41/62] init: rename reserve_initrd_mem to reserve_initramfs_mem
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (40 preceding siblings ...)
2025-09-14 3:51 ` [PATCH RESEND 40/62] init: rename free_initrd_mem to free_initramfs_mem Askar Safin
@ 2025-09-14 3:52 ` Askar Safin
2025-09-14 3:52 ` [PATCH RESEND 42/62] init: rename <linux/initrd.h> to <linux/initramfs.h> Askar Safin
` (26 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:52 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/mm/init.c | 2 +-
arch/loongarch/kernel/setup.c | 2 +-
arch/riscv/mm/init.c | 2 +-
include/linux/initrd.h | 4 ++--
init/initramfs.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 290e9f9874c9..a564cbc36d18 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -186,7 +186,7 @@ void __init arm_memblock_init(const struct machine_desc *mdesc)
/* Register the kernel text, kernel data and initrd with memblock. */
memblock_reserve(__pa(KERNEL_START), KERNEL_END - KERNEL_START);
- reserve_initrd_mem();
+ reserve_initramfs_mem();
arm_mm_memblock_reserve();
diff --git a/arch/loongarch/kernel/setup.c b/arch/loongarch/kernel/setup.c
index 075b79b2c1d3..226262f35dc1 100644
--- a/arch/loongarch/kernel/setup.c
+++ b/arch/loongarch/kernel/setup.c
@@ -602,7 +602,7 @@ void __init setup_arch(char **cmdline_p)
pagetable_init();
bootcmdline_init(cmdline_p);
parse_early_param();
- reserve_initrd_mem();
+ reserve_initramfs_mem();
platform_init();
arch_mem_init(cmdline_p);
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 15683ae13fa5..b1c4876dadae 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -295,7 +295,7 @@ static void __init setup_bootmem(void)
dma32_phys_limit = min(4UL * SZ_1G, (unsigned long)PFN_PHYS(max_low_pfn));
- reserve_initrd_mem();
+ reserve_initramfs_mem();
/*
* No allocation should be done before reserving the memory as defined
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index b2a0128c3438..51c473b6a973 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -10,10 +10,10 @@ extern unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
extern void free_initramfs_mem(unsigned long, unsigned long);
#ifdef CONFIG_BLK_DEV_INITRD
-extern void __init reserve_initrd_mem(void);
+extern void __init reserve_initramfs_mem(void);
extern void wait_for_initramfs(void);
#else
-static inline void __init reserve_initrd_mem(void) {}
+static inline void __init reserve_initramfs_mem(void) {}
static inline void wait_for_initramfs(void) {}
#endif
diff --git a/init/initramfs.c b/init/initramfs.c
index 7a050e54ff1a..a6c11260e62b 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -631,7 +631,7 @@ early_param("initrd", early_initrd);
static BIN_ATTR(initrd, 0440, sysfs_bin_attr_simple_read, NULL, 0);
-void __init reserve_initrd_mem(void)
+void __init reserve_initramfs_mem(void)
{
phys_addr_t start;
unsigned long size;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 42/62] init: rename <linux/initrd.h> to <linux/initramfs.h>
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (41 preceding siblings ...)
2025-09-14 3:52 ` [PATCH RESEND 41/62] init: rename reserve_initrd_mem to reserve_initramfs_mem Askar Safin
@ 2025-09-14 3:52 ` Askar Safin
2025-09-14 3:53 ` [PATCH RESEND 43/62] setsid: inline ksys_setsid into the only caller Askar Safin
` (25 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:52 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/alpha/kernel/core_irongate.c | 2 +-
arch/alpha/kernel/setup.c | 2 +-
arch/arc/mm/init.c | 2 +-
arch/arm/kernel/atags_parse.c | 2 +-
arch/arm/kernel/setup.c | 2 +-
arch/arm/mm/init.c | 2 +-
arch/arm64/kernel/setup.c | 2 +-
arch/arm64/mm/init.c | 2 +-
arch/csky/kernel/setup.c | 2 +-
arch/csky/mm/init.c | 2 +-
arch/loongarch/kernel/mem.c | 2 +-
arch/loongarch/kernel/setup.c | 2 +-
arch/m68k/kernel/setup_mm.c | 2 +-
arch/m68k/kernel/setup_no.c | 2 +-
arch/m68k/kernel/uboot.c | 2 +-
arch/microblaze/kernel/cpu/mb.c | 2 +-
arch/microblaze/kernel/setup.c | 2 +-
arch/microblaze/mm/init.c | 2 +-
arch/mips/ath79/prom.c | 2 +-
arch/mips/kernel/setup.c | 2 +-
arch/mips/mm/init.c | 2 +-
arch/mips/sibyte/swarm/setup.c | 2 +-
arch/nios2/kernel/setup.c | 2 +-
arch/openrisc/kernel/setup.c | 2 +-
arch/parisc/kernel/pdt.c | 2 +-
arch/parisc/kernel/setup.c | 2 +-
arch/parisc/mm/init.c | 2 +-
arch/powerpc/kernel/prom.c | 2 +-
arch/powerpc/kernel/prom_init.c | 2 +-
arch/powerpc/kernel/setup-common.c | 2 +-
arch/powerpc/kernel/setup_32.c | 2 +-
arch/powerpc/kernel/setup_64.c | 2 +-
arch/powerpc/mm/init_32.c | 2 +-
arch/powerpc/platforms/52xx/lite5200.c | 2 +-
arch/powerpc/platforms/83xx/km83xx.c | 2 +-
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 2 +-
arch/powerpc/platforms/chrp/setup.c | 2 +-
arch/powerpc/platforms/embedded6xx/linkstation.c | 2 +-
arch/powerpc/platforms/embedded6xx/storcenter.c | 2 +-
arch/powerpc/platforms/powermac/setup.c | 2 +-
arch/riscv/mm/init.c | 2 +-
arch/s390/kernel/setup.c | 2 +-
arch/s390/mm/init.c | 2 +-
arch/sh/kernel/setup.c | 2 +-
arch/sparc/kernel/setup_32.c | 2 +-
arch/sparc/kernel/setup_64.c | 2 +-
arch/sparc/mm/init_32.c | 2 +-
arch/sparc/mm/init_64.c | 2 +-
arch/um/kernel/initrd.c | 2 +-
arch/x86/kernel/cpu/microcode/amd.c | 2 +-
arch/x86/kernel/cpu/microcode/intel.c | 2 +-
arch/x86/kernel/cpu/microcode/internal.h | 2 +-
arch/x86/kernel/devicetree.c | 2 +-
arch/x86/kernel/setup.c | 2 +-
arch/x86/mm/init.c | 2 +-
arch/x86/mm/init_32.c | 2 +-
arch/x86/mm/init_64.c | 2 +-
drivers/acpi/tables.c | 2 +-
drivers/base/firmware_loader/main.c | 2 +-
drivers/block/brd.c | 2 +-
drivers/firmware/efi/efi.c | 2 +-
drivers/of/fdt.c | 2 +-
include/linux/{initrd.h => initramfs.h} | 6 +++---
init/do_mounts.c | 2 +-
init/initramfs.c | 2 +-
init/main.c | 2 +-
kernel/sysctl.c | 2 +-
kernel/umh.c | 2 +-
68 files changed, 70 insertions(+), 70 deletions(-)
rename include/linux/{initrd.h => initramfs.h} (89%)
diff --git a/arch/alpha/kernel/core_irongate.c b/arch/alpha/kernel/core_irongate.c
index 5519bb8fc6f2..83b799848b39 100644
--- a/arch/alpha/kernel/core_irongate.c
+++ b/arch/alpha/kernel/core_irongate.c
@@ -19,7 +19,7 @@
#include <linux/pci.h>
#include <linux/sched.h>
#include <linux/init.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/memblock.h>
#include <asm/ptrace.h>
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index a344e71b2d2a..809651206781 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -34,7 +34,7 @@
#include <linux/pci.h>
#include <linux/seq_file.h>
#include <linux/root_dev.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/eisa.h>
#include <linux/pfn.h>
#ifdef CONFIG_MAGIC_SYSRQ
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
index 1e098d7fc6af..00aaf1ed389f 100644
--- a/arch/arc/mm/init.c
+++ b/arch/arc/mm/init.c
@@ -7,7 +7,7 @@
#include <linux/mm.h>
#include <linux/memblock.h>
#ifdef CONFIG_BLK_DEV_INITRD
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#endif
#include <linux/of_fdt.h>
#include <linux/swap.h>
diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
index 615d9e83c9b5..2b49e0ddfa42 100644
--- a/arch/arm/kernel/atags_parse.c
+++ b/arch/arm/kernel/atags_parse.c
@@ -15,7 +15,7 @@
*/
#include <linux/init.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/root_dev.h>
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 0bfd66c7ada0..876039b24290 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -11,7 +11,7 @@
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/utsname.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/console.h>
#include <linux/seq_file.h>
#include <linux/screen_info.h>
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index a564cbc36d18..ae5921db626e 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -13,7 +13,7 @@
#include <linux/sched/task.h>
#include <linux/export.h>
#include <linux/nodemask.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/of_fdt.h>
#include <linux/highmem.h>
#include <linux/gfp.h>
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 77c7926a4df6..bddbb473ad88 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -12,7 +12,7 @@
#include <linux/stddef.h>
#include <linux/ioport.h>
#include <linux/delay.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/console.h>
#include <linux/cache.h>
#include <linux/screen_info.h>
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 3414e48c8c82..e50533faaece 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -14,7 +14,7 @@
#include <linux/cache.h>
#include <linux/mman.h>
#include <linux/nodemask.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/gfp.h>
#include <linux/math.h>
#include <linux/memblock.h>
diff --git a/arch/csky/kernel/setup.c b/arch/csky/kernel/setup.c
index 403a977b8c1f..9feca38d4c47 100644
--- a/arch/csky/kernel/setup.c
+++ b/arch/csky/kernel/setup.c
@@ -3,7 +3,7 @@
#include <linux/console.h>
#include <linux/memblock.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
#include <linux/start_kernel.h>
diff --git a/arch/csky/mm/init.c b/arch/csky/mm/init.c
index 573da66b2543..f2d1004fc6ae 100644
--- a/arch/csky/mm/init.c
+++ b/arch/csky/mm/init.c
@@ -19,7 +19,7 @@
#include <linux/swap.h>
#include <linux/proc_fs.h>
#include <linux/pfn.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <asm/setup.h>
#include <asm/cachectl.h>
diff --git a/arch/loongarch/kernel/mem.c b/arch/loongarch/kernel/mem.c
index aed901c57fb4..5ec4d18c9000 100644
--- a/arch/loongarch/kernel/mem.c
+++ b/arch/loongarch/kernel/mem.c
@@ -3,7 +3,7 @@
* Copyright (C) 2020-2022 Loongson Technology Corporation Limited
*/
#include <linux/efi.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/memblock.h>
#include <asm/bootinfo.h>
diff --git a/arch/loongarch/kernel/setup.c b/arch/loongarch/kernel/setup.c
index 226262f35dc1..5d0124cbe94b 100644
--- a/arch/loongarch/kernel/setup.c
+++ b/arch/loongarch/kernel/setup.c
@@ -17,7 +17,7 @@
#include <linux/efi.h>
#include <linux/export.h>
#include <linux/memblock.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/ioport.h>
#include <linux/kexec.h>
#include <linux/crash_dump.h>
diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c
index 80f0544c1041..b9c9b2e3a150 100644
--- a/arch/m68k/kernel/setup_mm.c
+++ b/arch/m68k/kernel/setup_mm.c
@@ -25,7 +25,7 @@
#include <linux/seq_file.h>
#include <linux/module.h>
#include <linux/nvram.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/random.h>
#include <asm/bootinfo.h>
diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c
index 4d98e0063725..6d3d5a299383 100644
--- a/arch/m68k/kernel/setup_no.c
+++ b/arch/m68k/kernel/setup_no.c
@@ -29,7 +29,7 @@
#include <linux/memblock.h>
#include <linux/seq_file.h>
#include <linux/init.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/root_dev.h>
#include <linux/rtc.h>
diff --git a/arch/m68k/kernel/uboot.c b/arch/m68k/kernel/uboot.c
index 5fc831a0794a..416e3f8f879d 100644
--- a/arch/m68k/kernel/uboot.c
+++ b/arch/m68k/kernel/uboot.c
@@ -18,7 +18,7 @@
#include <linux/memblock.h>
#include <linux/seq_file.h>
#include <linux/init.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/root_dev.h>
#include <linux/rtc.h>
diff --git a/arch/microblaze/kernel/cpu/mb.c b/arch/microblaze/kernel/cpu/mb.c
index 37cb2898216b..a5d2c564d4e5 100644
--- a/arch/microblaze/kernel/cpu/mb.c
+++ b/arch/microblaze/kernel/cpu/mb.c
@@ -13,7 +13,7 @@
#include <linux/string.h>
#include <linux/seq_file.h>
#include <linux/cpu.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/bug.h>
#include <asm/cpuinfo.h>
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
index f417333eccae..7f537307b71c 100644
--- a/arch/microblaze/kernel/setup.c
+++ b/arch/microblaze/kernel/setup.c
@@ -14,7 +14,7 @@
#include <linux/string.h>
#include <linux/seq_file.h>
#include <linux/cpu.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/console.h>
#include <linux/debugfs.h>
#include <linux/of_fdt.h>
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index fabeca49c2c6..f54d71160712 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -12,7 +12,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/mm.h> /* mem_init */
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/of_fdt.h>
#include <linux/pagemap.h>
#include <linux/pfn.h>
diff --git a/arch/mips/ath79/prom.c b/arch/mips/ath79/prom.c
index 506dcada711b..fcb45fe198a0 100644
--- a/arch/mips/ath79/prom.c
+++ b/arch/mips/ath79/prom.c
@@ -11,7 +11,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/string.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <asm/bootinfo.h>
#include <asm/addrspace.h>
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index aed454ebd751..47dc7eb99ef7 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -16,7 +16,7 @@
#include <linux/ioport.h>
#include <linux/export.h>
#include <linux/memblock.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/root_dev.h>
#include <linux/highmem.h>
#include <linux/console.h>
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index a673d3d68254..5b109c737547 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -30,7 +30,7 @@
#include <linux/hardirq.h>
#include <linux/gfp.h>
#include <linux/kcore.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/execmem.h>
#include <asm/bootinfo.h>
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c
index 38c90b5e8754..ff8b2d8ad7ab 100644
--- a/arch/mips/sibyte/swarm/setup.c
+++ b/arch/mips/sibyte/swarm/setup.c
@@ -15,7 +15,7 @@
#include <linux/kernel.h>
#include <linux/console.h>
#include <linux/screen_info.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <asm/irq.h>
#include <asm/io.h>
diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c
index 3cc44fa4931c..d3d60c42df46 100644
--- a/arch/nios2/kernel/setup.c
+++ b/arch/nios2/kernel/setup.c
@@ -17,7 +17,7 @@
#include <linux/sched/task.h>
#include <linux/console.h>
#include <linux/memblock.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/of_fdt.h>
#include <asm/mmu_context.h>
diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c
index 337a0381c452..27ae87c09b0e 100644
--- a/arch/openrisc/kernel/setup.c
+++ b/arch/openrisc/kernel/setup.c
@@ -29,7 +29,7 @@
#include <linux/memblock.h>
#include <linux/seq_file.h>
#include <linux/serial.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/of_fdt.h>
#include <linux/of.h>
#include <linux/device.h>
diff --git a/arch/parisc/kernel/pdt.c b/arch/parisc/kernel/pdt.c
index 3715a3b088a7..49982a48c92c 100644
--- a/arch/parisc/kernel/pdt.c
+++ b/arch/parisc/kernel/pdt.c
@@ -17,7 +17,7 @@
#include <linux/seq_file.h>
#include <linux/kthread.h>
#include <linux/proc_fs.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/pgtable.h>
#include <linux/mm.h>
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index 41f45fa177d0..1e403c26070d 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -13,7 +13,7 @@
*/
#include <linux/kernel.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/init.h>
#include <linux/console.h>
#include <linux/seq_file.h>
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index af7a33c8bd31..5843f4a46e93 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -18,7 +18,7 @@
#include <linux/gfp.h>
#include <linux/delay.h>
#include <linux/init.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/swap.h>
#include <linux/unistd.h>
#include <linux/nodemask.h> /* for node_online_map */
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index b7858b0bd697..a2a1896f9e46 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -19,7 +19,7 @@
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/delay.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/bitops.h>
#include <linux/export.h>
#include <linux/kexec.h>
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 827c958677f8..a0ac845eb504 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -24,7 +24,7 @@
#include <linux/pci.h>
#include <linux/proc_fs.h>
#include <linux/delay.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/bitops.h>
#include <linux/pgtable.h>
#include <linux/printk.h>
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index eff369cba0e5..53a416bc41ce 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -16,7 +16,7 @@
#include <linux/kernel.h>
#include <linux/reboot.h>
#include <linux/delay.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/platform_device.h>
#include <linux/printk.h>
#include <linux/seq_file.h>
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 5a1bf501fbe1..21d21b8291ef 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -10,7 +10,7 @@
#include <linux/kernel.h>
#include <linux/reboot.h>
#include <linux/delay.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/tty.h>
#include <linux/seq_file.h>
#include <linux/root_dev.h>
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 8fd7cbf3bd04..66c2d563c094 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -13,7 +13,7 @@
#include <linux/kernel.h>
#include <linux/reboot.h>
#include <linux/delay.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/seq_file.h>
#include <linux/ioport.h>
#include <linux/console.h>
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 4e71dfe7d026..f434e6dc1921 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -22,7 +22,7 @@
#include <linux/stddef.h>
#include <linux/init.h>
#include <linux/highmem.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/pagemap.h>
#include <linux/memblock.h>
#include <linux/gfp.h>
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 0a161d82a3a8..e4222658ec2d 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -17,7 +17,7 @@
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/root_dev.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <asm/time.h>
#include <asm/io.h>
#include <asm/machdep.h>
diff --git a/arch/powerpc/platforms/83xx/km83xx.c b/arch/powerpc/platforms/83xx/km83xx.c
index 2b5d187d9b62..b0426b35f9ed 100644
--- a/arch/powerpc/platforms/83xx/km83xx.c
+++ b/arch/powerpc/platforms/83xx/km83xx.c
@@ -19,7 +19,7 @@
#include <linux/delay.h>
#include <linux/seq_file.h>
#include <linux/root_dev.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index c19490cf6376..6b6c11931c1e 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -24,7 +24,7 @@
#include <linux/console.h>
#include <linux/delay.h>
#include <linux/seq_file.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/fsl_devices.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index c1bfa4c3444c..00a6663a0a88 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -30,7 +30,7 @@
#include <linux/console.h>
#include <linux/seq_file.h>
#include <linux/root_dev.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/timer.h>
#include <linux/of_address.h>
#include <linux/of_fdt.h>
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c
index 4012f206ec63..8e41d0fb0892 100644
--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -11,7 +11,7 @@
*/
#include <linux/kernel.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/of_platform.h>
#include <linux/seq_file.h>
diff --git a/arch/powerpc/platforms/embedded6xx/storcenter.c b/arch/powerpc/platforms/embedded6xx/storcenter.c
index e49880e8dab8..df458828eb22 100644
--- a/arch/powerpc/platforms/embedded6xx/storcenter.c
+++ b/arch/powerpc/platforms/embedded6xx/storcenter.c
@@ -13,7 +13,7 @@
#include <linux/kernel.h>
#include <linux/pci.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/of_platform.h>
#include <asm/time.h>
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 4c3b9ed5428d..ab0860868025 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -32,7 +32,7 @@
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/major.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/console.h>
#include <linux/pci.h>
#include <linux/adb.h>
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index b1c4876dadae..479a0861a93e 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -9,7 +9,7 @@
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/memblock.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/swap.h>
#include <linux/swiotlb.h>
#include <linux/sizes.h>
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 9bdb6f6b893e..7ce009c2599d 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -33,7 +33,7 @@
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/init.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/root_dev.h>
#include <linux/console.h>
#include <linux/kernel_stat.h>
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index e4953453d254..e6556f9f2be3 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -27,7 +27,7 @@
#include <linux/memory.h>
#include <linux/pfn.h>
#include <linux/poison.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/export.h>
#include <linux/cma.h>
#include <linux/gfp.h>
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 9ce9dc5b9e56..814866e35120 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -9,7 +9,7 @@
*/
#include <linux/ioport.h>
#include <linux/init.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/console.h>
#include <linux/root_dev.h>
#include <linux/utsname.h>
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c
index fb46fb3acf54..b3778d78bb78 100644
--- a/arch/sparc/kernel/setup_32.c
+++ b/arch/sparc/kernel/setup_32.c
@@ -14,7 +14,7 @@
#include <linux/unistd.h>
#include <linux/ptrace.h>
#include <linux/slab.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <asm/smp.h>
#include <linux/user.h>
#include <linux/delay.h>
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c
index 79b56613c6d8..02b16827b664 100644
--- a/arch/sparc/kernel/setup_64.c
+++ b/arch/sparc/kernel/setup_64.c
@@ -28,7 +28,7 @@
#include <linux/root_dev.h>
#include <linux/interrupt.h>
#include <linux/cpu.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/module.h>
#include <linux/start_kernel.h>
#include <linux/memblock.h>
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
index 7b7722ff5232..f04dd1d6f382 100644
--- a/arch/sparc/mm/init_32.c
+++ b/arch/sparc/mm/init_32.c
@@ -19,7 +19,7 @@
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/swap.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/init.h>
#include <linux/highmem.h>
#include <linux/memblock.h>
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index af249a654e79..b0fa82676e6f 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -14,7 +14,7 @@
#include <linux/memblock.h>
#include <linux/mm.h>
#include <linux/hugetlb.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/swap.h>
#include <linux/pagemap.h>
#include <linux/poison.h>
diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c
index e6113192a6b6..99edfbd78c00 100644
--- a/arch/um/kernel/initrd.c
+++ b/arch/um/kernel/initrd.c
@@ -5,7 +5,7 @@
#include <linux/init.h>
#include <linux/memblock.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <asm/types.h>
#include <init.h>
#include <os.h>
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index 514f63340880..0086e285d60c 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -26,7 +26,7 @@
#include <linux/bsearch.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/kernel.h>
#include <linux/pci.h>
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 371ca6eac00e..4bebf8b77542 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -14,7 +14,7 @@
#include <linux/earlycpio.h>
#include <linux/firmware.h>
#include <linux/uaccess.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/cpu.h>
diff --git a/arch/x86/kernel/cpu/microcode/internal.h b/arch/x86/kernel/cpu/microcode/internal.h
index 50a9702ae4e2..b4aec58af7e3 100644
--- a/arch/x86/kernel/cpu/microcode/internal.h
+++ b/arch/x86/kernel/cpu/microcode/internal.h
@@ -3,7 +3,7 @@
#define _X86_MICROCODE_INTERNAL_H
#include <linux/earlycpio.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <asm/cpu.h>
#include <asm/microcode.h>
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index dd8748c45529..3eb6dad99288 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -16,7 +16,7 @@
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/of_pci.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <asm/irqdomain.h>
#include <asm/hpet.h>
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 167b9ef12ebb..3b88d156ed39 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -14,7 +14,7 @@
#include <linux/hugetlb.h>
#include <linux/ima.h>
#include <linux/init_ohci1394_dma.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/iscsi_ibft.h>
#include <linux/memblock.h>
#include <linux/panic_notifier.h>
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index c7ca996fb430..b7c45004f999 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -1,5 +1,5 @@
#include <linux/gfp.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/ioport.h>
#include <linux/swap.h>
#include <linux/memblock.h>
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 8a34fff6ab2b..d075d4178d36 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -27,7 +27,7 @@
#include <linux/memblock.h>
#include <linux/proc_fs.h>
#include <linux/memory_hotplug.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/cpumask.h>
#include <linux/gfp.h>
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index b9426fce5f3e..34fcb5b8f386 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -19,7 +19,7 @@
#include <linux/swap.h>
#include <linux/smp.h>
#include <linux/init.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/pagemap.h>
#include <linux/memblock.h>
#include <linux/proc_fs.h>
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 37ad99c10ac4..4ecb6bf897fd 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -19,7 +19,7 @@
#include <linux/acpi.h>
#include <linux/memblock.h>
#include <linux/earlycpio.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/security.h>
#include <linux/kmemleak.h>
#include "internal.h"
diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c
index 6942c62fa59d..f32de7459e76 100644
--- a/drivers/base/firmware_loader/main.c
+++ b/drivers/base/firmware_loader/main.c
@@ -15,7 +15,7 @@
#include <linux/kernel_read_file.h>
#include <linux/module.h>
#include <linux/init.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/timer.h>
#include <linux/vmalloc.h>
#include <linux/interrupt.h>
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 05c4325904d2..a15b699d3a09 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -10,7 +10,7 @@
*/
#include <linux/init.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/major.h>
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 7cab72da2ea9..1dcaaea1dcfb 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -21,7 +21,7 @@
#include <linux/device.h>
#include <linux/efi.h>
#include <linux/of.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/io.h>
#include <linux/kexec.h>
#include <linux/platform_device.h>
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 127b37f211cb..2e73de8a1bbe 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -11,7 +11,7 @@
#include <linux/crash_dump.h>
#include <linux/crc32.h>
#include <linux/kernel.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/memblock.h>
#include <linux/mutex.h>
#include <linux/of.h>
diff --git a/include/linux/initrd.h b/include/linux/initramfs.h
similarity index 89%
rename from include/linux/initrd.h
rename to include/linux/initramfs.h
index 51c473b6a973..e9f523917a02 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initramfs.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __LINUX_INITRD_H
-#define __LINUX_INITRD_H
+#ifndef __LINUX_INITRAMFS_H
+#define __LINUX_INITRAMFS_H
/* 1 if it is not an error if virt_external_initramfs_start < memory_start */
extern int initramfs_below_start_ok;
@@ -23,4 +23,4 @@ extern unsigned long phys_external_initramfs_size;
extern char __builtin_initramfs_start[];
extern unsigned long __builtin_initramfs_size;
-#endif /* __LINUX_INITRD_H */
+#endif /* __LINUX_INITRAMFS_H */
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 5b55d0035e03..2df33c573d9c 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -14,7 +14,7 @@
#include <linux/init.h>
#include <linux/init_syscalls.h>
#include <linux/fs.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/async.h>
#include <linux/fs_struct.h>
#include <linux/slab.h>
diff --git a/init/initramfs.c b/init/initramfs.c
index a6c11260e62b..8b648b09247a 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -597,7 +597,7 @@ static int __init initramfs_async_setup(char *str)
}
__setup("initramfs_async=", initramfs_async_setup);
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/kexec.h>
unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
diff --git a/init/main.c b/init/main.c
index f119460bf8e1..5186233c64fd 100644
--- a/init/main.c
+++ b/init/main.c
@@ -26,7 +26,7 @@
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/init.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/memblock.h>
#include <linux/acpi.h>
#include <linux/bootconfig.h>
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index cb6196e3fa99..3bf92703332b 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -12,7 +12,7 @@
#include <linux/kobject.h>
#include <linux/highuid.h>
#include <linux/writeback.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/times.h>
#include <linux/limits.h>
#include <linux/syscalls.h>
diff --git a/kernel/umh.c b/kernel/umh.c
index b4da45a3a7cf..c58b3e8e9256 100644
--- a/kernel/umh.c
+++ b/kernel/umh.c
@@ -26,7 +26,7 @@
#include <linux/ptrace.h>
#include <linux/async.h>
#include <linux/uaccess.h>
-#include <linux/initrd.h>
+#include <linux/initramfs.h>
#include <linux/freezer.h>
#include <trace/events/module.h>
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 43/62] setsid: inline ksys_setsid into the only caller
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (42 preceding siblings ...)
2025-09-14 3:52 ` [PATCH RESEND 42/62] init: rename <linux/initrd.h> to <linux/initramfs.h> Askar Safin
@ 2025-09-14 3:53 ` Askar Safin
2025-09-14 3:54 ` [PATCH RESEND 44/62] doc: kernel-parameters: remove [RAM] from reserve_mem= Askar Safin
` (24 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:53 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
include/linux/syscalls.h | 1 -
kernel/sys.c | 7 +------
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 77f45e5d4413..75e9ee03d19b 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -1231,7 +1231,6 @@ int ksys_fchown(unsigned int fd, uid_t user, gid_t group);
ssize_t ksys_read(unsigned int fd, char __user *buf, size_t count);
void ksys_sync(void);
int ksys_unshare(unsigned long unshare_flags);
-int ksys_setsid(void);
int ksys_sync_file_range(int fd, loff_t offset, loff_t nbytes,
unsigned int flags);
ssize_t ksys_pread64(unsigned int fd, char __user *buf, size_t count,
diff --git a/kernel/sys.c b/kernel/sys.c
index 1e28b40053ce..66e1e2dfd585 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1265,7 +1265,7 @@ static void set_special_pids(struct pid **pids, struct pid *pid)
change_pid(pids, curr, PIDTYPE_PGID, pid);
}
-int ksys_setsid(void)
+SYSCALL_DEFINE0(setsid)
{
struct task_struct *group_leader = current->group_leader;
struct pid *sid = task_pid(group_leader);
@@ -1300,11 +1300,6 @@ int ksys_setsid(void)
return err;
}
-SYSCALL_DEFINE0(setsid)
-{
- return ksys_setsid();
-}
-
DECLARE_RWSEM(uts_sem);
#ifdef COMPAT_UTS_MACHINE
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 44/62] doc: kernel-parameters: remove [RAM] from reserve_mem=
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (43 preceding siblings ...)
2025-09-14 3:53 ` [PATCH RESEND 43/62] setsid: inline ksys_setsid into the only caller Askar Safin
@ 2025-09-14 3:54 ` Askar Safin
2025-09-14 3:54 ` [PATCH RESEND 45/62] doc: kernel-parameters: replace [RAM] with [INITRAMFS] Askar Safin
` (23 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:54 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This parameter has nothing to do with ramdisk
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
Documentation/admin-guide/kernel-parameters.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index a259f2bdba0f..0805d3ebc75a 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -6277,8 +6277,7 @@
them. If <base> is less than 0x10000, the region
is assumed to be I/O ports; otherwise it is memory.
- reserve_mem= [RAM]
- Format: nn[KMG]:<align>:<label>
+ reserve_mem= Format: nn[KMG]:<align>:<label>
Reserve physical memory and label it with a name that
other subsystems can use to access it. This is typically
used for systems that do not wipe the RAM, and this command
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 45/62] doc: kernel-parameters: replace [RAM] with [INITRAMFS]
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (44 preceding siblings ...)
2025-09-14 3:54 ` [PATCH RESEND 44/62] doc: kernel-parameters: remove [RAM] from reserve_mem= Askar Safin
@ 2025-09-14 3:54 ` Askar Safin
2025-09-14 3:55 ` [PATCH RESEND 46/62] init: edit docs for initramfs-related configs Askar Safin
` (22 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:54 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Also, do other initramfs-related edits, while we are here
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
.../admin-guide/kernel-parameters.rst | 4 ++--
.../admin-guide/kernel-parameters.txt | 20 +++++++++----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.rst b/Documentation/admin-guide/kernel-parameters.rst
index 39d0e7ff0965..22af6bbffc35 100644
--- a/Documentation/admin-guide/kernel-parameters.rst
+++ b/Documentation/admin-guide/kernel-parameters.rst
@@ -123,7 +123,7 @@ is applicable::
CMA Contiguous Memory Area support is enabled.
DRM Direct Rendering Management support is enabled.
DYNAMIC_DEBUG Build in debug messages and enable them at runtime
- EARLY Parameter processed too early to be embedded in initrd.
+ EARLY Parameter processed too early to be embedded in initramfs.
EDD BIOS Enhanced Disk Drive Services (EDD) is enabled
EFI EFI Partitioning (GPT) is enabled
EVM Extended Verification Module
@@ -134,6 +134,7 @@ is applicable::
HW Appropriate hardware is enabled.
HYPER_V HYPERV support is enabled.
IMA Integrity measurement architecture is enabled.
+ INITRAMFS Initramfs support is enabled.
IP_PNP IP DHCP, BOOTP, or RARP is enabled.
IPV6 IPv6 support is enabled.
ISAPNP ISA PnP code is enabled.
@@ -167,7 +168,6 @@ is applicable::
PPT Parallel port support is enabled.
PS2 Appropriate PS/2 support is enabled.
PV_OPS A paravirtualized kernel is enabled.
- RAM RAM disk support is enabled.
RDT Intel Resource Director Technology.
RISCV RISCV architecture is enabled.
S390 S390 architecture is enabled.
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 0805d3ebc75a..8e10abac4cc7 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -565,7 +565,7 @@
Format: integer
bootconfig [KNL,EARLY]
- Extended command line options can be added to an initrd
+ Extended command line options can be added to an initramfs
and this will cause the kernel to look for it.
See Documentation/admin-guide/bootconfig.rst
@@ -1005,7 +1005,7 @@
may be missing from the dump.
A standard crashkernel reservation, as described above,
- is still needed to hold the crash kernel and initrd.
+ is still needed to hold the crash kernel and initramfs.
This option increases the risk of a kdump failure: DMA
transfers configured by the first kernel may end up
@@ -2298,7 +2298,7 @@
initcall functions. Useful for debugging built-in
modules and initcalls.
- initramfs_async= [KNL]
+ initramfs_async= [INITRAMFS,KNL]
Format: <bool>
Default: 1
This parameter controls whether the initramfs
@@ -2310,10 +2310,10 @@
unpacking being completed before device_ and
late_ initcalls.
- initrd= [BOOT,EARLY] Specify the location of the initial ramdisk
+ initrd= [BOOT,EARLY,INITRAMFS,KNL] Same as initrdmem=
- initrdmem= [KNL,EARLY] Specify a physical address and size from which to
- load the initrd. If an initrd is compiled in or
+ initrdmem= [BOOT,EARLY,INITRAMFS,KNL] Specify a physical address and size from which to
+ load initramfs. If initramfs is compiled in or
specified in the bootparams, it takes priority over this
setting.
Format: ss[KMG],nn[KMG]
@@ -2749,7 +2749,7 @@
between unregistering the boot console and initializing
the real console.
- keepinitrd [HW,ARM] See retain_initrd.
+ keepinitrd [HW,ARM,INITRAMFS] See retain_initrd.
kernelcore= [KNL,X86,PPC,EARLY]
Format: nn[KMGTPE] | nn% | "mirror"
@@ -6129,8 +6129,8 @@
rdinit= [KNL]
Format: <full_path>
- Run specified binary instead of /init from the ramdisk,
- used for early userspace startup. See initrd.
+ Run specified binary instead of /init from initramfs,
+ used for early userspace startup.
rdrand= [X86,EARLY]
force - Override the decision by the kernel to hide the
@@ -6324,7 +6324,7 @@
Useful for devices that are detected asynchronously
(e.g. USB and MMC devices).
- retain_initrd [RAM] Keep initrd memory after extraction. After boot, it will
+ retain_initrd [INITRAMFS] Keep initramfs memory after extraction. After boot, it will
be accessible via /sys/firmware/initrd.
retbleed= [X86] Control mitigation of RETBleed (Arbitrary
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 46/62] init: edit docs for initramfs-related configs
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (45 preceding siblings ...)
2025-09-14 3:54 ` [PATCH RESEND 45/62] doc: kernel-parameters: replace [RAM] with [INITRAMFS] Askar Safin
@ 2025-09-14 3:55 ` Askar Safin
2025-09-14 3:55 ` [PATCH RESEND 47/62] init: fix typo: virtul => virtual Askar Safin
` (21 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:55 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
drivers/block/Kconfig | 7 ++-----
init/Kconfig | 18 +++++++-----------
usr/Kconfig | 42 +++++++++++++++++++++---------------------
3 files changed, 30 insertions(+), 37 deletions(-)
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 8cf06e40f61c..a268ac3dd304 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -225,9 +225,7 @@ config BLK_DEV_RAM
Saying Y here will allow you to use a portion of your RAM memory as
a block device, so that you can make file systems on it, read and
write to it and do all the other things that you can do with normal
- block devices (such as hard drives). It is usually used to load and
- store a copy of a minimal root file system off of a floppy into RAM
- during the initial install of Linux.
+ block devices (such as hard drives).
For details, read <file:Documentation/admin-guide/blockdev/ramdisk.rst>.
@@ -244,8 +242,7 @@ config BLK_DEV_RAM_COUNT
depends on BLK_DEV_RAM
help
The default value is 16 RAM disks. Change this if you know what you
- are doing. If you boot from a filesystem that needs to be extracted
- in memory, you will need at least one RAM disk (e.g. root on cramfs).
+ are doing.
config BLK_DEV_RAM_SIZE
int "Default RAM disk size (kbytes)"
diff --git a/init/Kconfig b/init/Kconfig
index 0263c08960bc..1c371dca7fd4 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1435,18 +1435,14 @@ config RELAY
If unsure, say N.
config BLK_DEV_INITRD
- bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
+ bool "Initial RAM filesystem (initramfs) support"
help
- The initial RAM filesystem is a ramfs which is loaded by the
- boot loader (loadlin or lilo) and that is mounted as root
+ The initial RAM filesystem is a ramfs or tmpfs which is loaded by the
+ boot loader and that is mounted as root
before the normal boot procedure. It is typically used to
load modules needed to mount the "real" root file system,
etc. See <file:Documentation/filesystems/ramfs-rootfs-initramfs.rst> for details.
- If RAM disk support (BLK_DEV_RAM) is also included, this
- also enables initial RAM disk (initrd) support and adds
- 15 Kbytes (more on some other architectures) to the kernel size.
-
If unsure say Y.
if BLK_DEV_INITRD
@@ -1485,8 +1481,8 @@ config BOOT_CONFIG_EMBED
depends on BOOT_CONFIG
help
Embed a bootconfig file given by BOOT_CONFIG_EMBED_FILE in the
- kernel. Usually, the bootconfig file is loaded with the initrd
- image. But if the system doesn't support initrd, this option will
+ kernel. Usually, the bootconfig file is loaded with the initramfs.
+ But if the system doesn't support initramfs, this option will
help you by embedding a bootconfig file while building the kernel.
If unsure, say N.
@@ -1496,8 +1492,8 @@ config BOOT_CONFIG_EMBED_FILE
depends on BOOT_CONFIG_EMBED
help
Specify a bootconfig file which will be embedded to the kernel.
- This bootconfig will be used if there is no initrd or no other
- bootconfig in the initrd.
+ This bootconfig will be used if there is no initramfs or no other
+ bootconfig in the initramfs.
config INITRAMFS_PRESERVE_MTIME
bool "Preserve cpio archive mtimes in initramfs"
diff --git a/usr/Kconfig b/usr/Kconfig
index 9279a2893ab0..8899353bd7d5 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -27,7 +27,7 @@ config INITRAMFS_FORCE
depends on CMDLINE_EXTEND || CMDLINE_FORCE
help
This option causes the kernel to ignore the initramfs image
- (or initrd image) passed to it by the bootloader. This is
+ passed to it by the bootloader. This is
analogous to CMDLINE_FORCE, which is found on some architectures,
and is useful if you cannot or don't want to change the image
your bootloader passes to the kernel.
@@ -53,59 +53,59 @@ config INITRAMFS_ROOT_GID
If you are not sure, leave it set to "0".
config RD_GZIP
- bool "Support initial ramdisk/ramfs compressed using gzip"
+ bool "Support initial ramfs compressed using gzip"
default y
select DECOMPRESS_GZIP
help
- Support loading of a gzip encoded initial ramdisk or cpio buffer.
+ Support loading of a gzip encoded initial ramfs.
If unsure, say Y.
config RD_BZIP2
- bool "Support initial ramdisk/ramfs compressed using bzip2"
+ bool "Support initial ramfs compressed using bzip2"
default y
select DECOMPRESS_BZIP2
help
- Support loading of a bzip2 encoded initial ramdisk or cpio buffer
+ Support loading of a bzip2 encoded initial ramfs.
If unsure, say N.
config RD_LZMA
- bool "Support initial ramdisk/ramfs compressed using LZMA"
+ bool "Support initial ramfs compressed using LZMA"
default y
select DECOMPRESS_LZMA
help
- Support loading of a LZMA encoded initial ramdisk or cpio buffer
+ Support loading of a LZMA encoded initial ramfs.
If unsure, say N.
config RD_XZ
- bool "Support initial ramdisk/ramfs compressed using XZ"
+ bool "Support initial ramfs compressed using XZ"
default y
select DECOMPRESS_XZ
help
- Support loading of a XZ encoded initial ramdisk or cpio buffer.
+ Support loading of a XZ encoded initial ramfs.
If unsure, say N.
config RD_LZO
- bool "Support initial ramdisk/ramfs compressed using LZO"
+ bool "Support initial ramfs compressed using LZO"
default y
select DECOMPRESS_LZO
help
- Support loading of a LZO encoded initial ramdisk or cpio buffer
+ Support loading of a LZO encoded initial ramfs.
If unsure, say N.
config RD_LZ4
- bool "Support initial ramdisk/ramfs compressed using LZ4"
+ bool "Support initial ramfs compressed using LZ4"
default y
select DECOMPRESS_LZ4
help
- Support loading of a LZ4 encoded initial ramdisk or cpio buffer
+ Support loading of a LZ4 encoded initial ramfs.
If unsure, say N.
config RD_ZSTD
- bool "Support initial ramdisk/ramfs compressed using ZSTD"
+ bool "Support initial ramfs compressed using ZSTD"
default y
select DECOMPRESS_ZSTD
help
- Support loading of a ZSTD encoded initial ramdisk or cpio buffer.
+ Support loading of a ZSTD encoded initial ramfs.
If unsure, say N.
choice
@@ -127,7 +127,7 @@ choice
boot.
Keep in mind that your build system needs to provide the appropriate
- compression tool to compress the generated initram cpio file for
+ compression tool to compress the generated initramfs cpio file for
embedding.
If in doubt, select 'None'
@@ -153,7 +153,7 @@ config INITRAMFS_COMPRESSION_BZIP2
booting.
If you choose this, keep in mind that you need to have the bzip2 tool
- available to be able to compress the initram.
+ available to be able to compress the initramfs.
config INITRAMFS_COMPRESSION_LZMA
bool "LZMA"
@@ -166,7 +166,7 @@ config INITRAMFS_COMPRESSION_LZMA
comparison to gzip.
If you choose this, keep in mind that you may need to install the xz
- or lzma tools to be able to compress the initram.
+ or lzma tools to be able to compress the initramfs.
config INITRAMFS_COMPRESSION_XZ
bool "XZ"
@@ -179,7 +179,7 @@ config INITRAMFS_COMPRESSION_XZ
slow.
If you choose this, keep in mind that you may need to install the xz
- tool to be able to compress the initram.
+ tool to be able to compress the initramfs.
config INITRAMFS_COMPRESSION_LZO
bool "LZO"
@@ -191,7 +191,7 @@ config INITRAMFS_COMPRESSION_LZO
is quite fast too.
If you choose this, keep in mind that you may need to install the lzop
- tool to be able to compress the initram.
+ tool to be able to compress the initramfs.
config INITRAMFS_COMPRESSION_LZ4
bool "LZ4"
@@ -213,7 +213,7 @@ config INITRAMFS_COMPRESSION_ZSTD
decompress around the same speed as LZO, but slower than LZ4.
If you choose this, keep in mind that you may need to install the zstd
- tool to be able to compress the initram.
+ tool to be able to compress the initramfs.
config INITRAMFS_COMPRESSION_NONE
bool "None"
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 47/62] init: fix typo: virtul => virtual
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (46 preceding siblings ...)
2025-09-14 3:55 ` [PATCH RESEND 46/62] init: edit docs for initramfs-related configs Askar Safin
@ 2025-09-14 3:55 ` Askar Safin
2025-09-14 3:56 ` [PATCH RESEND 48/62] init: fix comment Askar Safin
` (20 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:55 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Fix typo
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/initramfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/initramfs.c b/init/initramfs.c
index 8b648b09247a..cf19b7c0c358 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -636,7 +636,7 @@ void __init reserve_initramfs_mem(void)
phys_addr_t start;
unsigned long size;
- /* Ignore the virtul address computed during device tree parsing */
+ /* Ignore the virtual address computed during device tree parsing */
virt_external_initramfs_start = virt_external_initramfs_end = 0;
if (!phys_external_initramfs_size)
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 48/62] init: fix comment
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (47 preceding siblings ...)
2025-09-14 3:55 ` [PATCH RESEND 47/62] init: fix typo: virtul => virtual Askar Safin
@ 2025-09-14 3:56 ` Askar Safin
2025-09-14 3:57 ` [PATCH RESEND 49/62] init: rename ramdisk_execute_command to initramfs_execute_command Askar Safin
` (19 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:56 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Make #endif match #ifdef
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/initramfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/initramfs.c b/init/initramfs.c
index cf19b7c0c358..30e94ebf4902 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -717,7 +717,7 @@ static inline bool kexec_free_initrd(void)
{
return false;
}
-#endif /* CONFIG_KEXEC_CORE */
+#endif /* CONFIG_CRASH_RESERVE */
static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
{
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 49/62] init: rename ramdisk_execute_command to initramfs_execute_command
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (48 preceding siblings ...)
2025-09-14 3:56 ` [PATCH RESEND 48/62] init: fix comment Askar Safin
@ 2025-09-14 3:57 ` Askar Safin
2025-09-14 3:57 ` [PATCH RESEND 50/62] init: rename ramdisk_command_access to initramfs_command_access Askar Safin
` (18 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:57 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/main.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/init/main.c b/init/main.c
index 5186233c64fd..cbebd64f523c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -160,7 +160,7 @@ static size_t initargs_offs;
#endif
static char *execute_command;
-static char *ramdisk_execute_command = "/init";
+static char *initramfs_execute_command = "/init";
/*
* Used to generate warnings if static_key manipulation functions are used
@@ -609,7 +609,7 @@ static int __init rdinit_setup(char *str)
{
unsigned int i;
- ramdisk_execute_command = str;
+ initramfs_execute_command = str;
/* See "auto" comment in init_setup */
for (i = 1; i < MAX_INIT_ARGS; i++)
argv_init[i] = NULL;
@@ -1491,12 +1491,12 @@ static int __ref kernel_init(void *unused)
do_sysctl_args();
- if (ramdisk_execute_command) {
- ret = run_init_process(ramdisk_execute_command);
+ if (initramfs_execute_command) {
+ ret = run_init_process(initramfs_execute_command);
if (!ret)
return 0;
pr_err("Failed to execute %s (error %d)\n",
- ramdisk_execute_command, ret);
+ initramfs_execute_command, ret);
}
/*
@@ -1588,11 +1588,11 @@ static noinline void __init kernel_init_freeable(void)
* the work
*/
int ramdisk_command_access;
- ramdisk_command_access = init_eaccess(ramdisk_execute_command);
+ ramdisk_command_access = init_eaccess(initramfs_execute_command);
if (ramdisk_command_access != 0) {
pr_warn("check access for rdinit=%s failed: %i, ignoring\n",
- ramdisk_execute_command, ramdisk_command_access);
- ramdisk_execute_command = NULL;
+ initramfs_execute_command, ramdisk_command_access);
+ initramfs_execute_command = NULL;
prepare_namespace();
}
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 50/62] init: rename ramdisk_command_access to initramfs_command_access
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (49 preceding siblings ...)
2025-09-14 3:57 ` [PATCH RESEND 49/62] init: rename ramdisk_execute_command to initramfs_execute_command Askar Safin
@ 2025-09-14 3:57 ` Askar Safin
2025-09-14 3:58 ` [PATCH RESEND 51/62] init: rename get_boot_config_from_initrd to get_boot_config_from_initramfs Askar Safin
` (17 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:57 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/init/main.c b/init/main.c
index cbebd64f523c..a42f1f0fce84 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1587,11 +1587,11 @@ static noinline void __init kernel_init_freeable(void)
* check if there is an early userspace init. If yes, let it do all
* the work
*/
- int ramdisk_command_access;
- ramdisk_command_access = init_eaccess(initramfs_execute_command);
- if (ramdisk_command_access != 0) {
+ int initramfs_command_access;
+ initramfs_command_access = init_eaccess(initramfs_execute_command);
+ if (initramfs_command_access != 0) {
pr_warn("check access for rdinit=%s failed: %i, ignoring\n",
- initramfs_execute_command, ramdisk_command_access);
+ initramfs_execute_command, initramfs_command_access);
initramfs_execute_command = NULL;
prepare_namespace();
}
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 51/62] init: rename get_boot_config_from_initrd to get_boot_config_from_initramfs
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (50 preceding siblings ...)
2025-09-14 3:57 ` [PATCH RESEND 50/62] init: rename ramdisk_command_access to initramfs_command_access Askar Safin
@ 2025-09-14 3:58 ` Askar Safin
2025-09-14 3:58 ` [PATCH RESEND 52/62] init: rename do_retain_initrd to retain_initramfs Askar Safin
` (16 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:58 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/init/main.c b/init/main.c
index a42f1f0fce84..c535e0613df8 100644
--- a/init/main.c
+++ b/init/main.c
@@ -264,7 +264,7 @@ static int __init loglevel(char *str)
early_param("loglevel", loglevel);
#ifdef CONFIG_BLK_DEV_INITRD
-static void * __init get_boot_config_from_initrd(size_t *_size)
+static void * __init get_boot_config_from_initramfs(size_t *_size)
{
u32 size, csum;
char *data;
@@ -311,7 +311,7 @@ static void * __init get_boot_config_from_initrd(size_t *_size)
return data;
}
#else
-static void * __init get_boot_config_from_initrd(size_t *_size)
+static void * __init get_boot_config_from_initramfs(size_t *_size)
{
return NULL;
}
@@ -420,7 +420,7 @@ static void __init setup_boot_config(void)
char *err;
/* Cut out the bootconfig data even if we have no bootconfig option */
- data = get_boot_config_from_initrd(&size);
+ data = get_boot_config_from_initramfs(&size);
/* If there is no bootconfig in initrd, try embedded one. */
if (!data)
data = xbc_get_embedded_bootconfig(&size);
@@ -479,7 +479,7 @@ static void __init exit_boot_config(void)
static void __init setup_boot_config(void)
{
/* Remove bootconfig data from initrd */
- get_boot_config_from_initrd(NULL);
+ get_boot_config_from_initramfs(NULL);
}
static int __init warn_bootconfig(char *str)
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 52/62] init: rename do_retain_initrd to retain_initramfs
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (51 preceding siblings ...)
2025-09-14 3:58 ` [PATCH RESEND 51/62] init: rename get_boot_config_from_initrd to get_boot_config_from_initramfs Askar Safin
@ 2025-09-14 3:58 ` Askar Safin
2025-09-14 3:59 ` [PATCH RESEND 53/62] init: rename kexec_free_initrd to kexec_free_initramfs Askar Safin
` (15 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:58 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/initramfs.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/init/initramfs.c b/init/initramfs.c
index 30e94ebf4902..40c8e4b05886 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -570,13 +570,13 @@ char * __init unpack_to_rootfs(char *buf, unsigned long len)
return message;
}
-static int __initdata do_retain_initrd;
+static int __initdata retain_initramfs;
static int __init retain_initrd_param(char *str)
{
if (*str)
return 0;
- do_retain_initrd = 1;
+ retain_initramfs = 1;
return 1;
}
__setup("retain_initrd", retain_initrd_param);
@@ -584,7 +584,7 @@ __setup("retain_initrd", retain_initrd_param);
#ifdef CONFIG_ARCH_HAS_KEEPINITRD
static int __init keepinitrd_setup(char *__unused)
{
- do_retain_initrd = 1;
+ retain_initramfs = 1;
return 1;
}
__setup("keepinitrd", keepinitrd_setup);
@@ -743,9 +743,9 @@ static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
* If the initrd region is overlapped with crashkernel reserved region,
* free only memory that is not part of crashkernel region.
*/
- if (!do_retain_initrd && virt_external_initramfs_start && !kexec_free_initrd()) {
+ if (!retain_initramfs && virt_external_initramfs_start && !kexec_free_initrd()) {
free_initramfs_mem(virt_external_initramfs_start, virt_external_initramfs_end);
- } else if (do_retain_initrd && virt_external_initramfs_start) {
+ } else if (retain_initramfs && virt_external_initramfs_start) {
bin_attr_initrd.size = virt_external_initramfs_end - virt_external_initramfs_start;
bin_attr_initrd.private = (void *)virt_external_initramfs_start;
if (sysfs_create_bin_file(firmware_kobj, &bin_attr_initrd))
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 53/62] init: rename kexec_free_initrd to kexec_free_initramfs
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (52 preceding siblings ...)
2025-09-14 3:58 ` [PATCH RESEND 52/62] init: rename do_retain_initrd to retain_initramfs Askar Safin
@ 2025-09-14 3:59 ` Askar Safin
2025-09-14 4:00 ` [PATCH RESEND 54/62] init: arm, x86: deal with some references to initrd Askar Safin
` (14 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 3:59 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/initramfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/init/initramfs.c b/init/initramfs.c
index 40c8e4b05886..d52314b17c25 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -690,7 +690,7 @@ void __weak __init free_initramfs_mem(unsigned long start, unsigned long end)
}
#ifdef CONFIG_CRASH_RESERVE
-static bool __init kexec_free_initrd(void)
+static bool __init kexec_free_initramfs(void)
{
unsigned long crashk_start = (unsigned long)__va(crashk_res.start);
unsigned long crashk_end = (unsigned long)__va(crashk_res.end);
@@ -713,7 +713,7 @@ static bool __init kexec_free_initrd(void)
return true;
}
#else
-static inline bool kexec_free_initrd(void)
+static inline bool kexec_free_initramfs(void)
{
return false;
}
@@ -743,7 +743,7 @@ static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
* If the initrd region is overlapped with crashkernel reserved region,
* free only memory that is not part of crashkernel region.
*/
- if (!retain_initramfs && virt_external_initramfs_start && !kexec_free_initrd()) {
+ if (!retain_initramfs && virt_external_initramfs_start && !kexec_free_initramfs()) {
free_initramfs_mem(virt_external_initramfs_start, virt_external_initramfs_end);
} else if (retain_initramfs && virt_external_initramfs_start) {
bin_attr_initrd.size = virt_external_initramfs_end - virt_external_initramfs_start;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 54/62] init: arm, x86: deal with some references to initrd
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (53 preceding siblings ...)
2025-09-14 3:59 ` [PATCH RESEND 53/62] init: rename kexec_free_initrd to kexec_free_initramfs Askar Safin
@ 2025-09-14 4:00 ` Askar Safin
2025-09-14 4:00 ` [PATCH RESEND 55/62] init: rename CONFIG_BLK_DEV_INITRD to CONFIG_INITRAMFS Askar Safin
` (13 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 4:00 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
...in comments and printk
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/mm/init.c | 2 +-
arch/x86/kernel/setup.c | 10 +++++-----
arch/x86/mm/init.c | 2 +-
init/initramfs.c | 18 +++++++++---------
init/main.c | 12 ++++++------
5 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index ae5921db626e..04ba9b385e24 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -445,7 +445,7 @@ void free_initramfs_mem(unsigned long start, unsigned long end)
end = round_up(end, PAGE_SIZE);
poison_init_mem((void *)start, PAGE_ALIGN(end) - start);
- free_reserved_area((void *)start, (void *)end, -1, "initrd");
+ free_reserved_area((void *)start, (void *)end, -1, "initramfs");
}
#endif
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 3b88d156ed39..65670e0f59c0 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -325,19 +325,19 @@ static void __init relocate_initrd(void)
u64 relocated_ramdisk = memblock_phys_alloc_range(area_size, PAGE_SIZE, 0,
PFN_PHYS(max_pfn_mapped));
if (!relocated_ramdisk)
- panic("Cannot find place for new RAMDISK of size %lld\n",
+ panic("Cannot find place for new INITRAMFS of size %lld\n",
ramdisk_size);
virt_external_initramfs_start = relocated_ramdisk + PAGE_OFFSET;
virt_external_initramfs_end = virt_external_initramfs_start + ramdisk_size;
- printk(KERN_INFO "Allocated new RAMDISK: [mem %#010llx-%#010llx]\n",
+ printk(KERN_INFO "Allocated new INITRAMFS: [mem %#010llx-%#010llx]\n",
relocated_ramdisk, relocated_ramdisk + ramdisk_size - 1);
ret = copy_from_early_mem((void *)virt_external_initramfs_start, ramdisk_image, ramdisk_size);
if (ret)
- panic("Copy RAMDISK failed\n");
+ panic("Copy INITRAMFS failed\n");
- printk(KERN_INFO "Move RAMDISK from [mem %#010llx-%#010llx] to"
+ printk(KERN_INFO "Move INITRAMFS from [mem %#010llx-%#010llx] to"
" [mem %#010llx-%#010llx]\n",
ramdisk_image, ramdisk_image + ramdisk_size - 1,
relocated_ramdisk, relocated_ramdisk + ramdisk_size - 1);
@@ -370,7 +370,7 @@ static void __init reserve_initrd(void)
virt_external_initramfs_start = 0;
- printk(KERN_INFO "RAMDISK: [mem %#010llx-%#010llx]\n", ramdisk_image,
+ printk(KERN_INFO "INITRAMFS: [mem %#010llx-%#010llx]\n", ramdisk_image,
ramdisk_end - 1);
if (pfn_range_is_mapped(PFN_DOWN(ramdisk_image),
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index b7c45004f999..51b632f7fd21 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -992,7 +992,7 @@ void __init free_initramfs_mem(unsigned long start, unsigned long end)
* - relocate_initrd()
* So here We can do PAGE_ALIGN() safely to get partial page to be freed
*/
- free_init_pages("initrd", start, PAGE_ALIGN(end));
+ free_init_pages("initramfs", start, PAGE_ALIGN(end));
}
#endif
diff --git a/init/initramfs.c b/init/initramfs.c
index d52314b17c25..348cfcc4c95e 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -643,7 +643,7 @@ void __init reserve_initramfs_mem(void)
return;
/*
* Round the memory region to page boundaries as per free_initramfs_mem()
- * This allows us to detect whether the pages overlapping the initrd
+ * This allows us to detect whether the pages overlapping the initramfs
* are in use, but more importantly, reserves the entire set of pages
* as we don't want these pages allocated for other purposes.
*/
@@ -652,26 +652,26 @@ void __init reserve_initramfs_mem(void)
size = round_up(size, PAGE_SIZE);
if (!memblock_is_region_memory(start, size)) {
- pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region",
+ pr_err("INITRAMFS: 0x%08llx+0x%08lx is not a memory region",
(u64)start, size);
goto disable;
}
if (memblock_is_region_reserved(start, size)) {
- pr_err("INITRD: 0x%08llx+0x%08lx overlaps in-use memory region\n",
+ pr_err("INITRAMFS: 0x%08llx+0x%08lx overlaps in-use memory region\n",
(u64)start, size);
goto disable;
}
memblock_reserve(start, size);
- /* Now convert initrd to virtual addresses */
+ /* Now convert initramfs 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;
initramfs_below_start_ok = 1;
return;
disable:
- pr_cont(" - disabling initrd\n");
+ pr_cont(" - disabling initramfs\n");
virt_external_initramfs_start = 0;
virt_external_initramfs_end = 0;
}
@@ -686,7 +686,7 @@ void __weak __init free_initramfs_mem(unsigned long start, unsigned long end)
#endif
free_reserved_area((void *)start, (void *)end, POISON_FREE_INITMEM,
- "initrd");
+ "initramfs");
}
#ifdef CONFIG_CRASH_RESERVE
@@ -696,14 +696,14 @@ static bool __init kexec_free_initramfs(void)
unsigned long crashk_end = (unsigned long)__va(crashk_res.end);
/*
- * If the initrd region is overlapped with crashkernel reserved region,
+ * If the initramfs region is overlapped with crashkernel reserved region,
* free only memory that is not part of crashkernel region.
*/
if (virt_external_initramfs_start >= crashk_end || virt_external_initramfs_end <= crashk_start)
return false;
/*
- * Initialize initrd memory region since the kexec boot does not do.
+ * Initialize initramfs memory region since the kexec boot does not do.
*/
memset((void *)virt_external_initramfs_start, 0, virt_external_initramfs_end - virt_external_initramfs_start);
if (virt_external_initramfs_start < crashk_start)
@@ -740,7 +740,7 @@ static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
security_initramfs_populated();
/*
- * If the initrd region is overlapped with crashkernel reserved region,
+ * If the initramfs region is overlapped with crashkernel reserved region,
* free only memory that is not part of crashkernel region.
*/
if (!retain_initramfs && virt_external_initramfs_start && !kexec_free_initramfs()) {
diff --git a/init/main.c b/init/main.c
index c535e0613df8..4212efb33e77 100644
--- a/init/main.c
+++ b/init/main.c
@@ -276,7 +276,7 @@ static void * __init get_boot_config_from_initramfs(size_t *_size)
data = (char *)virt_external_initramfs_end - BOOTCONFIG_MAGIC_LEN;
/*
- * Since Grub may align the size of initrd to 4, we must
+ * Since Grub may align the size of initramfs to 4, we must
* check the preceding 3 bytes as well.
*/
for (i = 0; i < 4; i++) {
@@ -293,7 +293,7 @@ static void * __init get_boot_config_from_initramfs(size_t *_size)
data = ((void *)hdr) - size;
if ((unsigned long)data < virt_external_initramfs_start) {
- pr_err("bootconfig size %d is greater than initrd size %ld\n",
+ pr_err("bootconfig size %d is greater than initramfs size %ld\n",
size, virt_external_initramfs_end - virt_external_initramfs_start);
return NULL;
}
@@ -303,7 +303,7 @@ static void * __init get_boot_config_from_initramfs(size_t *_size)
return NULL;
}
- /* Remove bootconfig from initramfs/initrd */
+ /* Remove bootconfig from initramfs */
virt_external_initramfs_end = (unsigned long)data;
if (_size)
*_size = size;
@@ -421,7 +421,7 @@ static void __init setup_boot_config(void)
/* Cut out the bootconfig data even if we have no bootconfig option */
data = get_boot_config_from_initramfs(&size);
- /* If there is no bootconfig in initrd, try embedded one. */
+ /* If there is no bootconfig in initramfs, try embedded one. */
if (!data)
data = xbc_get_embedded_bootconfig(&size);
@@ -478,7 +478,7 @@ static void __init exit_boot_config(void)
static void __init setup_boot_config(void)
{
- /* Remove bootconfig data from initrd */
+ /* Remove bootconfig data from initramfs */
get_boot_config_from_initramfs(NULL);
}
@@ -1049,7 +1049,7 @@ void start_kernel(void)
#ifdef CONFIG_BLK_DEV_INITRD
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",
+ pr_crit("initramfs overwritten (0x%08lx < 0x%08lx) - disabling it.\n",
page_to_pfn(virt_to_page((void *)virt_external_initramfs_start)),
min_low_pfn);
virt_external_initramfs_start = 0;
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 55/62] init: rename CONFIG_BLK_DEV_INITRD to CONFIG_INITRAMFS
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (54 preceding siblings ...)
2025-09-14 4:00 ` [PATCH RESEND 54/62] init: arm, x86: deal with some references to initrd Askar Safin
@ 2025-09-14 4:00 ` Askar Safin
2025-09-14 4:01 ` [PATCH RESEND 56/62] init: rename CONFIG_RD_GZIP to CONFIG_INITRAMFS_DECOMPRESS_GZIP Askar Safin
` (12 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 4:00 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Initrd support was removed, and CONFIG_BLK_DEV_INITRD has nothing
to do with initrd or block devices.
Update your configs
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
.../filesystems/ramfs-rootfs-initramfs.rst | 2 +-
Documentation/security/ipe.rst | 2 +-
arch/alpha/kernel/core_irongate.c | 2 +-
arch/alpha/kernel/proto.h | 2 +-
arch/alpha/kernel/setup.c | 6 +++---
arch/arc/configs/axs101_defconfig | 2 +-
arch/arc/configs/axs103_defconfig | 2 +-
arch/arc/configs/axs103_smp_defconfig | 2 +-
arch/arc/configs/haps_hs_defconfig | 2 +-
arch/arc/configs/haps_hs_smp_defconfig | 2 +-
arch/arc/configs/hsdk_defconfig | 2 +-
arch/arc/configs/nsim_700_defconfig | 2 +-
arch/arc/configs/nsimosci_defconfig | 2 +-
arch/arc/configs/nsimosci_hs_defconfig | 2 +-
arch/arc/configs/nsimosci_hs_smp_defconfig | 2 +-
arch/arc/configs/tb10x_defconfig | 2 +-
arch/arc/configs/vdk_hs38_defconfig | 2 +-
arch/arc/configs/vdk_hs38_smp_defconfig | 2 +-
arch/arc/mm/init.c | 4 ++--
arch/arm/configs/aspeed_g4_defconfig | 2 +-
arch/arm/configs/aspeed_g5_defconfig | 2 +-
arch/arm/configs/assabet_defconfig | 2 +-
arch/arm/configs/at91_dt_defconfig | 2 +-
arch/arm/configs/axm55xx_defconfig | 2 +-
arch/arm/configs/bcm2835_defconfig | 2 +-
arch/arm/configs/clps711x_defconfig | 2 +-
arch/arm/configs/collie_defconfig | 2 +-
arch/arm/configs/davinci_all_defconfig | 2 +-
arch/arm/configs/exynos_defconfig | 2 +-
| 2 +-
arch/arm/configs/gemini_defconfig | 2 +-
arch/arm/configs/h3600_defconfig | 2 +-
arch/arm/configs/hisi_defconfig | 2 +-
arch/arm/configs/imx_v4_v5_defconfig | 2 +-
arch/arm/configs/imx_v6_v7_defconfig | 2 +-
arch/arm/configs/integrator_defconfig | 2 +-
arch/arm/configs/ixp4xx_defconfig | 2 +-
arch/arm/configs/keystone_defconfig | 2 +-
arch/arm/configs/lpc18xx_defconfig | 2 +-
arch/arm/configs/lpc32xx_defconfig | 2 +-
arch/arm/configs/milbeaut_m10v_defconfig | 2 +-
arch/arm/configs/multi_v4t_defconfig | 2 +-
arch/arm/configs/multi_v5_defconfig | 2 +-
arch/arm/configs/multi_v7_defconfig | 2 +-
arch/arm/configs/mvebu_v7_defconfig | 2 +-
arch/arm/configs/mxs_defconfig | 2 +-
arch/arm/configs/neponset_defconfig | 2 +-
arch/arm/configs/nhk8815_defconfig | 2 +-
arch/arm/configs/omap1_defconfig | 2 +-
arch/arm/configs/omap2plus_defconfig | 2 +-
arch/arm/configs/pxa910_defconfig | 2 +-
arch/arm/configs/pxa_defconfig | 2 +-
arch/arm/configs/qcom_defconfig | 2 +-
arch/arm/configs/rpc_defconfig | 2 +-
arch/arm/configs/s3c6400_defconfig | 2 +-
arch/arm/configs/s5pv210_defconfig | 2 +-
arch/arm/configs/sama5_defconfig | 2 +-
arch/arm/configs/sama7_defconfig | 2 +-
arch/arm/configs/shmobile_defconfig | 2 +-
arch/arm/configs/socfpga_defconfig | 2 +-
arch/arm/configs/spear13xx_defconfig | 2 +-
arch/arm/configs/spear3xx_defconfig | 2 +-
arch/arm/configs/spear6xx_defconfig | 2 +-
arch/arm/configs/stm32_defconfig | 2 +-
arch/arm/configs/sunxi_defconfig | 2 +-
arch/arm/configs/tegra_defconfig | 2 +-
arch/arm/configs/u8500_defconfig | 2 +-
arch/arm/configs/versatile_defconfig | 2 +-
arch/arm/configs/vexpress_defconfig | 2 +-
arch/arm/configs/vf610m4_defconfig | 2 +-
arch/arm/configs/vt8500_v6_v7_defconfig | 2 +-
arch/arm/configs/wpcm450_defconfig | 2 +-
arch/arm/mm/init.c | 4 ++--
arch/arm64/configs/defconfig | 2 +-
arch/arm64/mm/init.c | 4 ++--
arch/csky/kernel/setup.c | 4 ++--
arch/hexagon/configs/comet_defconfig | 2 +-
arch/loongarch/configs/loongson3_defconfig | 2 +-
arch/m68k/configs/amiga_defconfig | 2 +-
arch/m68k/configs/apollo_defconfig | 2 +-
arch/m68k/configs/atari_defconfig | 2 +-
arch/m68k/configs/bvme6000_defconfig | 2 +-
arch/m68k/configs/hp300_defconfig | 2 +-
arch/m68k/configs/mac_defconfig | 2 +-
arch/m68k/configs/multi_defconfig | 2 +-
arch/m68k/configs/mvme147_defconfig | 2 +-
arch/m68k/configs/mvme16x_defconfig | 2 +-
arch/m68k/configs/q40_defconfig | 2 +-
arch/m68k/configs/stmark2_defconfig | 2 +-
arch/m68k/configs/sun3_defconfig | 2 +-
arch/m68k/configs/sun3x_defconfig | 2 +-
arch/m68k/kernel/setup_mm.c | 4 ++--
arch/m68k/kernel/setup_no.c | 4 ++--
arch/m68k/kernel/uboot.c | 8 ++++----
arch/microblaze/mm/init.c | 4 ++--
arch/mips/ath79/prom.c | 2 +-
arch/mips/configs/ath25_defconfig | 2 +-
arch/mips/configs/ath79_defconfig | 2 +-
arch/mips/configs/bcm47xx_defconfig | 2 +-
arch/mips/configs/bigsur_defconfig | 2 +-
arch/mips/configs/bmips_be_defconfig | 2 +-
arch/mips/configs/bmips_stb_defconfig | 2 +-
arch/mips/configs/cavium_octeon_defconfig | 2 +-
arch/mips/configs/eyeq5_defconfig | 2 +-
arch/mips/configs/eyeq6_defconfig | 2 +-
arch/mips/configs/generic_defconfig | 2 +-
arch/mips/configs/gpr_defconfig | 2 +-
arch/mips/configs/lemote2f_defconfig | 2 +-
arch/mips/configs/loongson2k_defconfig | 2 +-
arch/mips/configs/loongson3_defconfig | 2 +-
arch/mips/configs/malta_defconfig | 2 +-
arch/mips/configs/mtx1_defconfig | 2 +-
arch/mips/configs/rb532_defconfig | 2 +-
arch/mips/configs/rbtx49xx_defconfig | 2 +-
arch/mips/configs/rt305x_defconfig | 2 +-
arch/mips/configs/sb1250_swarm_defconfig | 2 +-
arch/mips/configs/xway_defconfig | 2 +-
arch/mips/kernel/setup.c | 4 ++--
arch/mips/sibyte/common/cfe.c | 14 +++++++-------
arch/nios2/kernel/setup.c | 8 ++++----
arch/openrisc/configs/or1klitex_defconfig | 2 +-
arch/openrisc/configs/or1ksim_defconfig | 2 +-
arch/openrisc/configs/simple_smp_defconfig | 2 +-
arch/openrisc/configs/virt_defconfig | 2 +-
arch/openrisc/kernel/setup.c | 6 +++---
arch/openrisc/kernel/vmlinux.h | 2 +-
arch/parisc/boot/compressed/misc.c | 2 +-
arch/parisc/configs/generic-32bit_defconfig | 2 +-
arch/parisc/configs/generic-64bit_defconfig | 2 +-
arch/parisc/kernel/pdt.c | 2 +-
arch/parisc/kernel/setup.c | 2 +-
arch/parisc/mm/init.c | 4 ++--
arch/powerpc/configs/44x/akebono_defconfig | 2 +-
arch/powerpc/configs/44x/arches_defconfig | 2 +-
arch/powerpc/configs/44x/bamboo_defconfig | 2 +-
arch/powerpc/configs/44x/bluestone_defconfig | 2 +-
arch/powerpc/configs/44x/canyonlands_defconfig | 2 +-
arch/powerpc/configs/44x/ebony_defconfig | 2 +-
arch/powerpc/configs/44x/eiger_defconfig | 2 +-
arch/powerpc/configs/44x/fsp2_defconfig | 2 +-
arch/powerpc/configs/44x/icon_defconfig | 2 +-
arch/powerpc/configs/44x/iss476-smp_defconfig | 2 +-
arch/powerpc/configs/44x/katmai_defconfig | 2 +-
arch/powerpc/configs/44x/rainier_defconfig | 2 +-
arch/powerpc/configs/44x/redwood_defconfig | 2 +-
arch/powerpc/configs/44x/sam440ep_defconfig | 2 +-
arch/powerpc/configs/44x/sequoia_defconfig | 2 +-
arch/powerpc/configs/44x/taishan_defconfig | 2 +-
arch/powerpc/configs/44x/warp_defconfig | 2 +-
arch/powerpc/configs/52xx/cm5200_defconfig | 2 +-
arch/powerpc/configs/52xx/lite5200b_defconfig | 2 +-
arch/powerpc/configs/52xx/motionpro_defconfig | 2 +-
arch/powerpc/configs/52xx/tqm5200_defconfig | 2 +-
arch/powerpc/configs/83xx/asp8347_defconfig | 2 +-
arch/powerpc/configs/83xx/mpc8313_rdb_defconfig | 2 +-
arch/powerpc/configs/83xx/mpc8315_rdb_defconfig | 2 +-
arch/powerpc/configs/83xx/mpc832x_rdb_defconfig | 2 +-
arch/powerpc/configs/83xx/mpc834x_itx_defconfig | 2 +-
arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig | 2 +-
arch/powerpc/configs/83xx/mpc836x_rdk_defconfig | 2 +-
arch/powerpc/configs/83xx/mpc837x_rdb_defconfig | 2 +-
arch/powerpc/configs/85xx/ge_imp3a_defconfig | 2 +-
arch/powerpc/configs/85xx/ksi8560_defconfig | 2 +-
arch/powerpc/configs/85xx/socrates_defconfig | 2 +-
arch/powerpc/configs/85xx/stx_gp3_defconfig | 2 +-
arch/powerpc/configs/85xx/tqm8540_defconfig | 2 +-
arch/powerpc/configs/85xx/tqm8541_defconfig | 2 +-
arch/powerpc/configs/85xx/tqm8548_defconfig | 2 +-
arch/powerpc/configs/85xx/tqm8555_defconfig | 2 +-
arch/powerpc/configs/85xx/tqm8560_defconfig | 2 +-
arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 2 +-
arch/powerpc/configs/amigaone_defconfig | 2 +-
arch/powerpc/configs/cell_defconfig | 2 +-
arch/powerpc/configs/chrp32_defconfig | 2 +-
arch/powerpc/configs/fsl-emb-nonhw.config | 2 +-
arch/powerpc/configs/g5_defconfig | 2 +-
arch/powerpc/configs/gamecube_defconfig | 2 +-
arch/powerpc/configs/holly_defconfig | 2 +-
arch/powerpc/configs/linkstation_defconfig | 2 +-
arch/powerpc/configs/mgcoge_defconfig | 2 +-
arch/powerpc/configs/microwatt_defconfig | 2 +-
arch/powerpc/configs/mpc512x_defconfig | 2 +-
arch/powerpc/configs/mpc5200_defconfig | 2 +-
arch/powerpc/configs/mpc83xx_defconfig | 2 +-
arch/powerpc/configs/pasemi_defconfig | 2 +-
arch/powerpc/configs/pmac32_defconfig | 2 +-
arch/powerpc/configs/powernv_defconfig | 2 +-
arch/powerpc/configs/ppc44x_defconfig | 2 +-
arch/powerpc/configs/ppc64_defconfig | 2 +-
arch/powerpc/configs/ppc64e_defconfig | 2 +-
arch/powerpc/configs/ppc6xx_defconfig | 2 +-
arch/powerpc/configs/ps3_defconfig | 2 +-
arch/powerpc/configs/skiroot_defconfig | 2 +-
arch/powerpc/configs/wii_defconfig | 2 +-
arch/powerpc/kernel/prom.c | 6 +++---
arch/powerpc/kernel/prom_init.c | 4 ++--
arch/powerpc/kernel/setup-common.c | 4 ++--
arch/powerpc/platforms/powermac/setup.c | 2 +-
arch/riscv/configs/defconfig | 2 +-
arch/riscv/configs/nommu_k210_defconfig | 2 +-
arch/riscv/configs/nommu_virt_defconfig | 2 +-
arch/s390/boot/startup.c | 4 ++--
arch/s390/configs/zfcpdump_defconfig | 2 +-
arch/s390/kernel/setup.c | 2 +-
arch/sh/configs/apsh4a3a_defconfig | 2 +-
arch/sh/configs/apsh4ad0a_defconfig | 2 +-
arch/sh/configs/ecovec24-romimage_defconfig | 2 +-
arch/sh/configs/edosk7760_defconfig | 2 +-
arch/sh/configs/kfr2r09-romimage_defconfig | 2 +-
arch/sh/configs/kfr2r09_defconfig | 2 +-
arch/sh/configs/magicpanelr2_defconfig | 2 +-
arch/sh/configs/migor_defconfig | 2 +-
arch/sh/configs/rsk7201_defconfig | 2 +-
arch/sh/configs/rsk7203_defconfig | 2 +-
arch/sh/configs/sdk7786_defconfig | 2 +-
arch/sh/configs/se7206_defconfig | 2 +-
arch/sh/configs/se7705_defconfig | 2 +-
arch/sh/configs/se7722_defconfig | 2 +-
arch/sh/configs/se7751_defconfig | 2 +-
arch/sh/configs/secureedge5410_defconfig | 2 +-
arch/sh/configs/sh03_defconfig | 2 +-
arch/sh/configs/sh7757lcr_defconfig | 2 +-
arch/sh/configs/titan_defconfig | 2 +-
arch/sh/configs/ul2_defconfig | 2 +-
arch/sh/configs/urquell_defconfig | 2 +-
arch/sh/kernel/setup.c | 2 +-
arch/sparc/configs/sparc32_defconfig | 2 +-
arch/sparc/configs/sparc64_defconfig | 2 +-
arch/sparc/mm/init_32.c | 2 +-
arch/sparc/mm/init_64.c | 4 ++--
arch/um/kernel/Makefile | 2 +-
arch/x86/Kconfig | 2 +-
arch/x86/boot/startup/sme.c | 2 +-
arch/x86/configs/i386_defconfig | 2 +-
arch/x86/configs/x86_64_defconfig | 2 +-
arch/x86/kernel/cpu/microcode/core.c | 4 ++--
arch/x86/kernel/setup.c | 4 ++--
arch/x86/mm/init.c | 2 +-
arch/xtensa/configs/audio_kc705_defconfig | 2 +-
arch/xtensa/configs/cadence_csp_defconfig | 2 +-
arch/xtensa/configs/generic_kc705_defconfig | 2 +-
arch/xtensa/configs/nommu_kc705_defconfig | 2 +-
arch/xtensa/configs/smp_lx200_defconfig | 2 +-
arch/xtensa/configs/virt_defconfig | 2 +-
arch/xtensa/configs/xip_kc705_defconfig | 2 +-
arch/xtensa/kernel/setup.c | 8 ++++----
drivers/acpi/Kconfig | 2 +-
drivers/firmware/efi/efi.c | 2 +-
drivers/firmware/efi/libstub/efi-stub-helper.c | 2 +-
drivers/gpu/drm/ci/arm.config | 2 +-
drivers/gpu/drm/ci/arm64.config | 2 +-
drivers/gpu/drm/ci/x86_64.config | 2 +-
drivers/of/fdt.c | 2 +-
include/asm-generic/vmlinux.lds.h | 2 +-
include/linux/initramfs.h | 2 +-
init/.kunitconfig | 2 +-
init/Kconfig | 8 ++++----
init/Makefile | 4 ++--
init/main.c | 4 ++--
scripts/package/builddeb | 2 +-
tools/testing/selftests/bpf/config.aarch64 | 2 +-
tools/testing/selftests/bpf/config.ppc64el | 2 +-
tools/testing/selftests/bpf/config.riscv64 | 2 +-
tools/testing/selftests/bpf/config.s390x | 2 +-
tools/testing/selftests/kho/vmtest.sh | 2 +-
tools/testing/selftests/nolibc/Makefile.nolibc | 4 ++--
tools/testing/selftests/vsock/config | 2 +-
.../testing/selftests/wireguard/qemu/kernel.config | 2 +-
usr/Makefile | 2 +-
269 files changed, 311 insertions(+), 311 deletions(-)
diff --git a/Documentation/filesystems/ramfs-rootfs-initramfs.rst b/Documentation/filesystems/ramfs-rootfs-initramfs.rst
index 38a9cf11f547..8d85a353c7e6 100644
--- a/Documentation/filesystems/ramfs-rootfs-initramfs.rst
+++ b/Documentation/filesystems/ramfs-rootfs-initramfs.rst
@@ -224,7 +224,7 @@ use in place of the above config file::
External initramfs images:
--------------------------
-If the kernel has CONFIG_BLK_DEV_INITRD enabled, an external cpio.gz archive can also
+If the kernel has CONFIG_INITRAMFS enabled, an external cpio.gz archive can also
be passed into a 2.6 kernel. In this case, the kernel will extract the external cpio
archive into rootfs before trying to run /init.
diff --git a/Documentation/security/ipe.rst b/Documentation/security/ipe.rst
index 4a7d953abcdc..05d3eb2e6901 100644
--- a/Documentation/security/ipe.rst
+++ b/Documentation/security/ipe.rst
@@ -432,7 +432,7 @@ IPE has KUnit Tests for the policy parser. Recommended kunitconfig::
CONFIG_NET=y
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
- CONFIG_BLK_DEV_INITRD=y
+ CONFIG_INITRAMFS=y
CONFIG_SECURITY_IPE=y
CONFIG_IPE_PROP_DM_VERITY=y
diff --git a/arch/alpha/kernel/core_irongate.c b/arch/alpha/kernel/core_irongate.c
index 83b799848b39..24612c836225 100644
--- a/arch/alpha/kernel/core_irongate.c
+++ b/arch/alpha/kernel/core_irongate.c
@@ -224,7 +224,7 @@ albacore_init_arch(void)
IRONGATE0->pci_mem = pci_mem;
alpha_mv.min_mem_address = pci_mem;
if (memtop > pci_mem) {
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
/* Move the initrd out of the way. */
if (virt_external_initramfs_end && __pa(virt_external_initramfs_end) > pci_mem) {
unsigned long size;
diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h
index a8bc3ead776b..12bd14b6fc24 100644
--- a/arch/alpha/kernel/proto.h
+++ b/arch/alpha/kernel/proto.h
@@ -102,7 +102,7 @@ extern int boot_cpuid;
#ifdef CONFIG_VERBOSE_MCHECK
extern unsigned long alpha_verbose_mcheck;
#endif
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
extern void * __init move_initrd(unsigned long);
#endif
extern struct screen_info vgacon_screen_info;
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index 809651206781..8d8e4936809e 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -261,7 +261,7 @@ get_mem_size_limit(char *s)
return end >> PAGE_SHIFT; /* Return the PFN of the limit. */
}
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
void * __init
move_initrd(unsigned long mem_limit)
{
@@ -346,7 +346,7 @@ setup_memory(void *kernel_end)
kernel_size = virt_to_phys(kernel_end) - KERNEL_START_PHYS;
memblock_reserve(KERNEL_START_PHYS, kernel_size);
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
virt_external_initramfs_start = INITRD_START;
if (virt_external_initramfs_start) {
virt_external_initramfs_end = virt_external_initramfs_start+INITRD_SIZE;
@@ -364,7 +364,7 @@ setup_memory(void *kernel_end)
INITRD_SIZE);
}
}
-#endif /* CONFIG_BLK_DEV_INITRD */
+#endif /* CONFIG_INITRAMFS */
}
int page_is_ram(unsigned long pfn)
diff --git a/arch/arc/configs/axs101_defconfig b/arch/arc/configs/axs101_defconfig
index a7cd526dd7ca..a38d6c59fe02 100644
--- a/arch/arc/configs/axs101_defconfig
+++ b/arch/arc/configs/axs101_defconfig
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
# CONFIG_VM_EVENT_COUNTERS is not set
diff --git a/arch/arc/configs/axs103_defconfig b/arch/arc/configs/axs103_defconfig
index afa6a348f444..48eae5d99b21 100644
--- a/arch/arc/configs/axs103_defconfig
+++ b/arch/arc/configs/axs103_defconfig
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
# CONFIG_VM_EVENT_COUNTERS is not set
diff --git a/arch/arc/configs/axs103_smp_defconfig b/arch/arc/configs/axs103_smp_defconfig
index 2bfa6371953c..08f08c05683c 100644
--- a/arch/arc/configs/axs103_smp_defconfig
+++ b/arch/arc/configs/axs103_smp_defconfig
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
# CONFIG_VM_EVENT_COUNTERS is not set
diff --git a/arch/arc/configs/haps_hs_defconfig b/arch/arc/configs/haps_hs_defconfig
index 3a1577112078..4129d2396e81 100644
--- a/arch/arc/configs/haps_hs_defconfig
+++ b/arch/arc/configs/haps_hs_defconfig
@@ -10,7 +10,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
# CONFIG_COMPAT_BRK is not set
diff --git a/arch/arc/configs/haps_hs_smp_defconfig b/arch/arc/configs/haps_hs_smp_defconfig
index a3cf940b1f5b..bd3eaef66a38 100644
--- a/arch/arc/configs/haps_hs_smp_defconfig
+++ b/arch/arc/configs/haps_hs_smp_defconfig
@@ -10,7 +10,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
# CONFIG_VM_EVENT_COUNTERS is not set
diff --git a/arch/arc/configs/hsdk_defconfig b/arch/arc/configs/hsdk_defconfig
index 1558e8e87767..30e26d3fc18a 100644
--- a/arch/arc/configs/hsdk_defconfig
+++ b/arch/arc/configs/hsdk_defconfig
@@ -7,7 +7,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_BLK_DEV_RAM=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
diff --git a/arch/arc/configs/nsim_700_defconfig b/arch/arc/configs/nsim_700_defconfig
index f8b3235d9a65..8b455a18e01b 100644
--- a/arch/arc/configs/nsim_700_defconfig
+++ b/arch/arc/configs/nsim_700_defconfig
@@ -10,7 +10,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
diff --git a/arch/arc/configs/nsimosci_defconfig b/arch/arc/configs/nsimosci_defconfig
index ee45dc0877fb..1a54febb68ab 100644
--- a/arch/arc/configs/nsimosci_defconfig
+++ b/arch/arc/configs/nsimosci_defconfig
@@ -9,7 +9,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
diff --git a/arch/arc/configs/nsimosci_hs_defconfig b/arch/arc/configs/nsimosci_hs_defconfig
index e0a309970c20..2c471c5f6a3c 100644
--- a/arch/arc/configs/nsimosci_hs_defconfig
+++ b/arch/arc/configs/nsimosci_hs_defconfig
@@ -9,7 +9,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
diff --git a/arch/arc/configs/nsimosci_hs_smp_defconfig b/arch/arc/configs/nsimosci_hs_smp_defconfig
index 88325b8b49cf..ff48c997e14a 100644
--- a/arch/arc/configs/nsimosci_hs_smp_defconfig
+++ b/arch/arc/configs/nsimosci_hs_smp_defconfig
@@ -7,7 +7,7 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PERF_EVENTS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_KPROBES=y
diff --git a/arch/arc/configs/tb10x_defconfig b/arch/arc/configs/tb10x_defconfig
index 865fbc19ef03..26a06eb336df 100644
--- a/arch/arc/configs/tb10x_defconfig
+++ b/arch/arc/configs/tb10x_defconfig
@@ -9,7 +9,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_INITRAMFS_SOURCE="../tb10x-rootfs.cpio"
CONFIG_INITRAMFS_ROOT_UID=2100
CONFIG_INITRAMFS_ROOT_GID=501
diff --git a/arch/arc/configs/vdk_hs38_defconfig b/arch/arc/configs/vdk_hs38_defconfig
index 03d9ac20baa9..d02484817788 100644
--- a/arch/arc/configs/vdk_hs38_defconfig
+++ b/arch/arc/configs/vdk_hs38_defconfig
@@ -3,7 +3,7 @@
CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
# CONFIG_VM_EVENT_COUNTERS is not set
diff --git a/arch/arc/configs/vdk_hs38_smp_defconfig b/arch/arc/configs/vdk_hs38_smp_defconfig
index c09488992f13..56bc91b20e45 100644
--- a/arch/arc/configs/vdk_hs38_smp_defconfig
+++ b/arch/arc/configs/vdk_hs38_smp_defconfig
@@ -3,7 +3,7 @@
CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
# CONFIG_VM_EVENT_COUNTERS is not set
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
index 00aaf1ed389f..9ba01fe378b2 100644
--- a/arch/arc/mm/init.c
+++ b/arch/arc/mm/init.c
@@ -6,7 +6,7 @@
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/memblock.h>
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
#include <linux/initramfs.h>
#endif
#include <linux/of_fdt.h>
@@ -109,7 +109,7 @@ void __init setup_arch_memory(void)
memblock_reserve(CONFIG_LINUX_LINK_BASE,
__pa(_end) - CONFIG_LINUX_LINK_BASE);
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (phys_external_initramfs_size) {
memblock_reserve(phys_external_initramfs_start, phys_external_initramfs_size);
virt_external_initramfs_start = (unsigned long)__va(phys_external_initramfs_start);
diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig
index 28b724d59e7e..f2abada5036a 100644
--- a/arch/arm/configs/aspeed_g4_defconfig
+++ b/arch/arm/configs/aspeed_g4_defconfig
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_CGROUPS=y
CONFIG_NAMESPACES=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig
index 61cee1e7ebea..7098a09fefb8 100644
--- a/arch/arm/configs/aspeed_g5_defconfig
+++ b/arch/arm/configs/aspeed_g5_defconfig
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_CGROUPS=y
CONFIG_NAMESPACES=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/arm/configs/assabet_defconfig b/arch/arm/configs/assabet_defconfig
index 56fce6c08945..e579701d37b3 100644
--- a/arch/arm/configs/assabet_defconfig
+++ b/arch/arm/configs/assabet_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_ARCH_MULTI_V4=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_SA1100=y
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
index b53c7906d317..93204658ef5a 100644
--- a/arch/arm/configs/at91_dt_defconfig
+++ b/arch/arm/configs/at91_dt_defconfig
@@ -4,7 +4,7 @@ CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
diff --git a/arch/arm/configs/axm55xx_defconfig b/arch/arm/configs/axm55xx_defconfig
index 516689dc6cf1..dba5db27fd3a 100644
--- a/arch/arm/configs/axm55xx_defconfig
+++ b/arch/arm/configs/axm55xx_defconfig
@@ -20,7 +20,7 @@ CONFIG_NAMESPACES=y
# CONFIG_NET_NS is not set
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PROFILING=y
CONFIG_ARCH_AXXIA=y
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
index 27dc3bf6b124..58bb05fa46f7 100644
--- a/arch/arm/configs/bcm2835_defconfig
+++ b/arch/arm/configs/bcm2835_defconfig
@@ -15,7 +15,7 @@ CONFIG_CGROUP_PERF=y
CONFIG_NAMESPACES=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
diff --git a/arch/arm/configs/clps711x_defconfig b/arch/arm/configs/clps711x_defconfig
index 6fa3477e6b02..4d71d227361f 100644
--- a/arch/arm/configs/clps711x_defconfig
+++ b/arch/arm/configs/clps711x_defconfig
@@ -1,7 +1,7 @@
CONFIG_KERNEL_LZMA=y
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_RD_LZMA=y
CONFIG_EXPERT=y
CONFIG_JUMP_LABEL=y
diff --git a/arch/arm/configs/collie_defconfig b/arch/arm/configs/collie_defconfig
index 00dc8ae22824..6779f6e846ca 100644
--- a/arch/arm/configs/collie_defconfig
+++ b/arch/arm/configs/collie_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_EXPERT=y
CONFIG_BASE_SMALL=y
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
index e2ddaca0f89d..929ac8251fd1 100644
--- a/arch/arm/configs/davinci_all_defconfig
+++ b/arch/arm/configs/davinci_all_defconfig
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_CGROUPS=y
CONFIG_CHECKPOINT_RESTORE=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_ARCH_MULTIPLATFORM=y
CONFIG_ARCH_MULTI_V5=y
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index 02a903816baa..5ec8e4f9f92b 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -3,7 +3,7 @@ CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PERF_EVENTS=y
CONFIG_ARCH_EXYNOS=y
CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND=y
--git a/arch/arm/configs/footbridge_defconfig b/arch/arm/configs/footbridge_defconfig
index 5f6963687ee4..5df6c9c46aa2 100644
--- a/arch/arm/configs/footbridge_defconfig
+++ b/arch/arm/configs/footbridge_defconfig
@@ -1,7 +1,7 @@
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_HOTPLUG is not set
CONFIG_ARCH_MULTI_V4=y
diff --git a/arch/arm/configs/gemini_defconfig b/arch/arm/configs/gemini_defconfig
index 7b1daec630cb..a87bc109dead 100644
--- a/arch/arm/configs/gemini_defconfig
+++ b/arch/arm/configs/gemini_defconfig
@@ -6,7 +6,7 @@ CONFIG_PREEMPT=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_USER_NS=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KEXEC=y
CONFIG_ARCH_MULTI_V4=y
# CONFIG_ARCH_MULTI_V7 is not set
diff --git a/arch/arm/configs/h3600_defconfig b/arch/arm/configs/h3600_defconfig
index 4e272875c797..3c5f3ecf490c 100644
--- a/arch/arm/configs/h3600_defconfig
+++ b/arch/arm/configs/h3600_defconfig
@@ -3,7 +3,7 @@ CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_ARCH_MULTI_V4=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_SA1100=y
diff --git a/arch/arm/configs/hisi_defconfig b/arch/arm/configs/hisi_defconfig
index e19c1039fb93..fe18af17b7cc 100644
--- a/arch/arm/configs/hisi_defconfig
+++ b/arch/arm/configs/hisi_defconfig
@@ -1,7 +1,7 @@
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_RD_LZMA=y
CONFIG_ARCH_HISI=y
CONFIG_ARCH_HI3xxx=y
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig
index 875c8cdbada7..3c0a09cfe1f2 100644
--- a/arch/arm/configs/imx_v4_v5_defconfig
+++ b/arch/arm/configs/imx_v4_v5_defconfig
@@ -5,7 +5,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PROFILING=y
CONFIG_ARCH_MULTI_V4T=y
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index b53ae2c052fc..35b086ae7d0b 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -9,7 +9,7 @@ CONFIG_LOG_BUF_SHIFT=18
CONFIG_CGROUPS=y
CONFIG_CGROUP_BPF=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
CONFIG_KEXEC=y
diff --git a/arch/arm/configs/integrator_defconfig b/arch/arm/configs/integrator_defconfig
index 61711d4bbf74..8d2deb5b3175 100644
--- a/arch/arm/configs/integrator_defconfig
+++ b/arch/arm/configs/integrator_defconfig
@@ -5,7 +5,7 @@ CONFIG_PREEMPT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_ARCH_MULTI_V4T=y
CONFIG_ARCH_MULTI_V5=y
# CONFIG_ARCH_MULTI_V7 is not set
diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig
index 3cb995b9616a..7f20548ffff4 100644
--- a/arch/arm/configs/ixp4xx_defconfig
+++ b/arch/arm/configs/ixp4xx_defconfig
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_INITRAMFS_COMPRESSION_XZ=y
CONFIG_EXPERT=y
# CONFIG_ARCH_MULTI_V7 is not set
diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig
index c1291ca290b2..69b1aea5539a 100644
--- a/arch/arm/configs/keystone_defconfig
+++ b/arch/arm/configs/keystone_defconfig
@@ -10,7 +10,7 @@ CONFIG_CGROUP_SCHED=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_ELF_CORE is not set
CONFIG_BASE_SMALL=y
CONFIG_KALLSYMS_ALL=y
diff --git a/arch/arm/configs/lpc18xx_defconfig b/arch/arm/configs/lpc18xx_defconfig
index 2d489186e945..c8f7fa140225 100644
--- a/arch/arm/configs/lpc18xx_defconfig
+++ b/arch/arm/configs/lpc18xx_defconfig
@@ -1,6 +1,6 @@
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
diff --git a/arch/arm/configs/lpc32xx_defconfig b/arch/arm/configs/lpc32xx_defconfig
index a98d1125b9aa..bd1699e6d11d 100644
--- a/arch/arm/configs/lpc32xx_defconfig
+++ b/arch/arm/configs/lpc32xx_defconfig
@@ -5,7 +5,7 @@ CONFIG_PREEMPT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
# CONFIG_ARCH_MULTI_V7 is not set
diff --git a/arch/arm/configs/milbeaut_m10v_defconfig b/arch/arm/configs/milbeaut_m10v_defconfig
index a3be0b2ede09..048902c26337 100644
--- a/arch/arm/configs/milbeaut_m10v_defconfig
+++ b/arch/arm/configs/milbeaut_m10v_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
CONFIG_ARCH_MILBEAUT=y
diff --git a/arch/arm/configs/multi_v4t_defconfig b/arch/arm/configs/multi_v4t_defconfig
index 1a86dc305523..b6ca7445d9fe 100644
--- a/arch/arm/configs/multi_v4t_defconfig
+++ b/arch/arm/configs/multi_v4t_defconfig
@@ -1,7 +1,7 @@
CONFIG_KERNEL_LZMA=y
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_ARCH_MULTI_V4T=y
# CONFIG_ARCH_MULTI_V7 is not set
diff --git a/arch/arm/configs/multi_v5_defconfig b/arch/arm/configs/multi_v5_defconfig
index b523bc246c09..f268248cc108 100644
--- a/arch/arm/configs/multi_v5_defconfig
+++ b/arch/arm/configs/multi_v5_defconfig
@@ -4,7 +4,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_LOG_BUF_SHIFT=19
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PROFILING=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_ASPEED=y
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index f2822eeefb95..1f82b6f570c8 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
CONFIG_KEXEC=y
diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig
index 2d2a4dc8f379..65b0dae42f75 100644
--- a/arch/arm/configs/mvebu_v7_defconfig
+++ b/arch/arm/configs/mvebu_v7_defconfig
@@ -1,7 +1,7 @@
CONFIG_SYSVIPC=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
CONFIG_ARCH_MVEBU=y
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig
index 3b08c63b6de4..676bff953987 100644
--- a/arch/arm/configs/mxs_defconfig
+++ b/arch/arm/configs/mxs_defconfig
@@ -13,7 +13,7 @@ CONFIG_CGROUPS=y
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PERF_EVENTS=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_MXS=y
diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig
index a61eb27373a8..44cd383bb39f 100644
--- a/arch/arm/configs/neponset_defconfig
+++ b/arch/arm/configs/neponset_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_ARCH_MULTI_V4=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_SA1100=y
diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig
index ea28ed8991b4..67e40d8cdf95 100644
--- a/arch/arm/configs/nhk8815_defconfig
+++ b/arch/arm/configs/nhk8815_defconfig
@@ -6,7 +6,7 @@ CONFIG_PREEMPT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_ARCH_MULTI_V7 is not set
diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig
index 661e5d6894bd..4543660f033b 100644
--- a/arch/arm/configs/omap1_defconfig
+++ b/arch/arm/configs/omap1_defconfig
@@ -6,7 +6,7 @@ CONFIG_PREEMPT=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_ELF_CORE is not set
CONFIG_BASE_SMALL=y
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 939913ed9a73..440897931240 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -19,7 +19,7 @@ CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
CONFIG_NAMESPACES=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PROFILING=y
CONFIG_ARCH_MULTI_V6=y
diff --git a/arch/arm/configs/pxa910_defconfig b/arch/arm/configs/pxa910_defconfig
index 49b59c600ae1..c06346f20f22 100644
--- a/arch/arm/configs/pxa910_defconfig
+++ b/arch/arm/configs/pxa910_defconfig
@@ -3,7 +3,7 @@ CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_ARCH_MMP=y
CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.2.100:/nfsroot/ ip=192.168.2.101:192.168.2.100::255.255.255.0::eth0:on console=ttyS0,115200 mem=128M earlyprintk"
CONFIG_MODULES=y
diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig
index 0c4b9389d4d6..2e902618ae2b 100644
--- a/arch/arm/configs/pxa_defconfig
+++ b/arch/arm/configs/pxa_defconfig
@@ -9,7 +9,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=13
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
diff --git a/arch/arm/configs/qcom_defconfig b/arch/arm/configs/qcom_defconfig
index ec52ccece0ca..f527adaf3a8f 100644
--- a/arch/arm/configs/qcom_defconfig
+++ b/arch/arm/configs/qcom_defconfig
@@ -5,7 +5,7 @@ CONFIG_PREEMPT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
diff --git a/arch/arm/configs/rpc_defconfig b/arch/arm/configs/rpc_defconfig
index 24f1fa868230..4963d060df74 100644
--- a/arch/arm/configs/rpc_defconfig
+++ b/arch/arm/configs/rpc_defconfig
@@ -1,7 +1,7 @@
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_ARCH_MULTI_V4=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_RPC=y
diff --git a/arch/arm/configs/s3c6400_defconfig b/arch/arm/configs/s3c6400_defconfig
index a5018ce274ec..9935514bb22d 100644
--- a/arch/arm/configs/s3c6400_defconfig
+++ b/arch/arm/configs/s3c6400_defconfig
@@ -1,4 +1,4 @@
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_ARCH_MULTI_V6=y
# CONFIG_ARCH_MULTI_V7 is not set
diff --git a/arch/arm/configs/s5pv210_defconfig b/arch/arm/configs/s5pv210_defconfig
index 485dd5174c62..dc8fc5bc066b 100644
--- a/arch/arm/configs/s5pv210_defconfig
+++ b/arch/arm/configs/s5pv210_defconfig
@@ -3,7 +3,7 @@ CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_ARCH_S5PV210=y
CONFIG_VMSPLIT_2G=y
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig
index 0463ff84c06c..d7c361d0e473 100644
--- a/arch/arm/configs/sama5_defconfig
+++ b/arch/arm/configs/sama5_defconfig
@@ -4,7 +4,7 @@ CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KEXEC=y
CONFIG_ARCH_AT91=y
diff --git a/arch/arm/configs/sama7_defconfig b/arch/arm/configs/sama7_defconfig
index e14720a9a5ac..30bb54b4881f 100644
--- a/arch/arm/configs/sama7_defconfig
+++ b/arch/arm/configs/sama7_defconfig
@@ -6,7 +6,7 @@ CONFIG_LOG_BUF_SHIFT=16
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_NAMESPACES=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_FHANDLE is not set
# CONFIG_IO_URING is not set
diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
index e4cb33b2bcee..d5dde4e1572d 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -3,7 +3,7 @@ CONFIG_NO_HZ_IDLE=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_PERF_EVENTS=y
CONFIG_KEXEC=y
diff --git a/arch/arm/configs/socfpga_defconfig b/arch/arm/configs/socfpga_defconfig
index 294906c8f16e..b817aa2bd0f2 100644
--- a/arch/arm/configs/socfpga_defconfig
+++ b/arch/arm/configs/socfpga_defconfig
@@ -6,7 +6,7 @@ CONFIG_LOG_BUF_SHIFT=14
CONFIG_CGROUPS=y
CONFIG_CPUSETS=y
CONFIG_NAMESPACES=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PROFILING=y
CONFIG_ARCH_INTEL_SOCFPGA=y
diff --git a/arch/arm/configs/spear13xx_defconfig b/arch/arm/configs/spear13xx_defconfig
index a8f992fdb30d..c7e67ab6027e 100644
--- a/arch/arm/configs/spear13xx_defconfig
+++ b/arch/arm/configs/spear13xx_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PLAT_SPEAR=y
CONFIG_ARCH_SPEAR13XX=y
CONFIG_MACH_SPEAR1310=y
diff --git a/arch/arm/configs/spear3xx_defconfig b/arch/arm/configs/spear3xx_defconfig
index 8dc5a388759c..aa0643962e45 100644
--- a/arch/arm/configs/spear3xx_defconfig
+++ b/arch/arm/configs/spear3xx_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_PLAT_SPEAR=y
CONFIG_ARCH_SPEAR3XX=y
diff --git a/arch/arm/configs/spear6xx_defconfig b/arch/arm/configs/spear6xx_defconfig
index 4e9e1a6ff381..3a5998a00f2d 100644
--- a/arch/arm/configs/spear6xx_defconfig
+++ b/arch/arm/configs/spear6xx_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_PLAT_SPEAR=y
CONFIG_ARCH_SPEAR6XX=y
diff --git a/arch/arm/configs/stm32_defconfig b/arch/arm/configs/stm32_defconfig
index dcd9c316072e..00ab395b6241 100644
--- a/arch/arm/configs/stm32_defconfig
+++ b/arch/arm/configs/stm32_defconfig
@@ -2,7 +2,7 @@ CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_LOG_BUF_SHIFT=16
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
# CONFIG_UID16 is not set
diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig
index a83d29fed175..70efc9a5d229 100644
--- a/arch/arm/configs/sunxi_defconfig
+++ b/arch/arm/configs/sunxi_defconfig
@@ -1,7 +1,7 @@
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PERF_EVENTS=y
CONFIG_ARCH_SUNXI=y
CONFIG_SMP=y
diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig
index ba863b445417..29339c5f0522 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -11,7 +11,7 @@ CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_DEBUG=y
CONFIG_NAMESPACES=y
CONFIG_USER_NS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_ELF_CORE is not set
CONFIG_PERF_EVENTS=y
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig
index 510c760b0bc7..2baea78bf7ab 100644
--- a/arch/arm/configs/u8500_defconfig
+++ b/arch/arm/configs/u8500_defconfig
@@ -1,7 +1,7 @@
CONFIG_SYSVIPC=y
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_ARCH_U8500=y
CONFIG_SMP=y
diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig
index 849118cbbb44..72b63b446c3a 100644
--- a/arch/arm/configs/versatile_defconfig
+++ b/arch/arm/configs/versatile_defconfig
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_VERSATILE=y
CONFIG_AEABI=y
diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig
index cdb6065e04fd..5880a6780c30 100644
--- a/arch/arm/configs/vexpress_defconfig
+++ b/arch/arm/configs/vexpress_defconfig
@@ -11,7 +11,7 @@ CONFIG_CPUSETS=y
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PROFILING=y
CONFIG_ARCH_VEXPRESS=y
CONFIG_ARCH_VEXPRESS_TC2_PM=y
diff --git a/arch/arm/configs/vf610m4_defconfig b/arch/arm/configs/vf610m4_defconfig
index a5609cbfdfb3..b253d76e0d40 100644
--- a/arch/arm/configs/vf610m4_defconfig
+++ b/arch/arm/configs/vf610m4_defconfig
@@ -1,5 +1,5 @@
CONFIG_NAMESPACES=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
diff --git a/arch/arm/configs/vt8500_v6_v7_defconfig b/arch/arm/configs/vt8500_v6_v7_defconfig
index 41607a84abc8..3fcff0693f4c 100644
--- a/arch/arm/configs/vt8500_v6_v7_defconfig
+++ b/arch/arm/configs/vt8500_v6_v7_defconfig
@@ -1,6 +1,6 @@
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_ARCH_MULTI_V6=y
CONFIG_ARCH_WM8750=y
CONFIG_ARCH_WM8850=y
diff --git a/arch/arm/configs/wpcm450_defconfig b/arch/arm/configs/wpcm450_defconfig
index cd4b3e70ff68..0fce14de7dbf 100644
--- a/arch/arm/configs/wpcm450_defconfig
+++ b/arch/arm/configs/wpcm450_defconfig
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=19
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_PROFILING=y
# CONFIG_ARCH_MULTI_V7 is not set
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 04ba9b385e24..ae08a14ca429 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -50,7 +50,7 @@ unsigned long __init __clear_cr(unsigned long mask)
}
#endif
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
static int __init parse_tag_initrd(const struct tag *tag)
{
pr_warn("ATAG_INITRD is deprecated; "
@@ -436,7 +436,7 @@ void free_initmem(void)
free_initmem_default(-1);
}
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
void free_initramfs_mem(unsigned long start, unsigned long end)
{
if (start == virt_external_initramfs_start)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 58f87d09366c..baae6caf4401 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -27,7 +27,7 @@ CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_BPF=y
CONFIG_USER_NS=y
CONFIG_SCHED_AUTOGROUP=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
CONFIG_KEXEC=y
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index e50533faaece..db9b021e8947 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -246,7 +246,7 @@ void __init arm64_memblock_init(void)
memblock_add(__pa_symbol(_text), (u64)(_end - _text));
}
- if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && phys_external_initramfs_size) {
+ if (IS_ENABLED(CONFIG_INITRAMFS) && phys_external_initramfs_size) {
/*
* Add back the memory we just removed if it results in the
* initrd to become inaccessible via the linear mapping.
@@ -281,7 +281,7 @@ void __init arm64_memblock_init(void)
* pagetables with memblock.
*/
memblock_reserve(__pa_symbol(_stext), _end - _stext);
- if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && phys_external_initramfs_size) {
+ if (IS_ENABLED(CONFIG_INITRAMFS) && phys_external_initramfs_size) {
/* the generic initrd code expects virtual addresses */
virt_external_initramfs_start = __phys_to_virt(phys_external_initramfs_start);
virt_external_initramfs_end = virt_external_initramfs_start + phys_external_initramfs_size;
diff --git a/arch/csky/kernel/setup.c b/arch/csky/kernel/setup.c
index 9feca38d4c47..04583140fda8 100644
--- a/arch/csky/kernel/setup.c
+++ b/arch/csky/kernel/setup.c
@@ -12,7 +12,7 @@
#include <asm/mmu_context.h>
#include <asm/pgalloc.h>
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
static void __init setup_initrd(void)
{
unsigned long size;
@@ -79,7 +79,7 @@ static void __init csky_memblock_init(void)
max_low_pfn = min_low_pfn + sseg_size;
}
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
setup_initrd();
#endif
diff --git a/arch/hexagon/configs/comet_defconfig b/arch/hexagon/configs/comet_defconfig
index c6108f000288..9b05bbccc118 100644
--- a/arch/hexagon/configs/comet_defconfig
+++ b/arch/hexagon/configs/comet_defconfig
@@ -13,7 +13,7 @@ CONFIG_TASK_DELAY_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=18
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_VM_EVENT_COUNTERS is not set
# CONFIG_BLK_DEV_BSG is not set
diff --git a/arch/loongarch/configs/loongson3_defconfig b/arch/loongarch/configs/loongson3_defconfig
index 34eaee0384c9..184271a2df88 100644
--- a/arch/loongarch/configs/loongson3_defconfig
+++ b/arch/loongarch/configs/loongson3_defconfig
@@ -40,7 +40,7 @@ CONFIG_USER_NS=y
CONFIG_CHECKPOINT_RESTORE=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PERF_EVENTS=y
diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig
index 5171bb183967..1c2fe699ccfa 100644
--- a/arch/m68k/configs/amiga_defconfig
+++ b/arch/m68k/configs/amiga_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig
index 16f343ae48c6..81450d75a900 100644
--- a/arch/m68k/configs/apollo_defconfig
+++ b/arch/m68k/configs/apollo_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig
index c08788728ea9..0c315b683ad3 100644
--- a/arch/m68k/configs/atari_defconfig
+++ b/arch/m68k/configs/atari_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig
index 962497e7c53f..9dab3f18ba11 100644
--- a/arch/m68k/configs/bvme6000_defconfig
+++ b/arch/m68k/configs/bvme6000_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig
index ec28650189e4..64a445fd2d11 100644
--- a/arch/m68k/configs/hp300_defconfig
+++ b/arch/m68k/configs/hp300_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig
index 0afb3ad180de..f5d8e0c800b5 100644
--- a/arch/m68k/configs/mac_defconfig
+++ b/arch/m68k/configs/mac_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_defconfig
index b311e953995d..84fd59d68030 100644
--- a/arch/m68k/configs/multi_defconfig
+++ b/arch/m68k/configs/multi_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig
index f4e6224f137f..ef7423bfc3ab 100644
--- a/arch/m68k/configs/mvme147_defconfig
+++ b/arch/m68k/configs/mvme147_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig
index 498e167222f1..ae13dc57ba38 100644
--- a/arch/m68k/configs/mvme16x_defconfig
+++ b/arch/m68k/configs/mvme16x_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig
index 8c6b1eef8534..33cb51afc5ab 100644
--- a/arch/m68k/configs/q40_defconfig
+++ b/arch/m68k/configs/q40_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/configs/stmark2_defconfig b/arch/m68k/configs/stmark2_defconfig
index 7787a4dd7c3c..fe4df7b37541 100644
--- a/arch/m68k/configs/stmark2_defconfig
+++ b/arch/m68k/configs/stmark2_defconfig
@@ -3,7 +3,7 @@ CONFIG_DEFAULT_HOSTNAME="stmark2"
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_NAMESPACES=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_FHANDLE is not set
# CONFIG_AIO is not set
diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig
index c34648f299ef..ecc343a1ddf7 100644
--- a/arch/m68k/configs/sun3_defconfig
+++ b/arch/m68k/configs/sun3_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig
index 73810d14660f..48dbab7923ee 100644
--- a/arch/m68k/configs/sun3x_defconfig
+++ b/arch/m68k/configs/sun3x_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_BOOTINFO_PROC=y
diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c
index b9c9b2e3a150..458836f3a273 100644
--- a/arch/m68k/kernel/setup_mm.c
+++ b/arch/m68k/kernel/setup_mm.c
@@ -327,12 +327,12 @@ void __init setup_arch(char **cmdline_p)
panic("No configuration setup");
}
- if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && m68k_ramdisk.size)
+ if (IS_ENABLED(CONFIG_INITRAMFS) && m68k_ramdisk.size)
memblock_reserve(m68k_ramdisk.addr, m68k_ramdisk.size);
paging_init();
- if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && m68k_ramdisk.size) {
+ if (IS_ENABLED(CONFIG_INITRAMFS) && m68k_ramdisk.size) {
virt_external_initramfs_start = (unsigned long)phys_to_virt(m68k_ramdisk.addr);
virt_external_initramfs_end = virt_external_initramfs_start + m68k_ramdisk.size;
pr_info("initrd: %08lx - %08lx\n", virt_external_initramfs_start, virt_external_initramfs_end);
diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c
index 6d3d5a299383..68090c9b4e1f 100644
--- a/arch/m68k/kernel/setup_no.c
+++ b/arch/m68k/kernel/setup_no.c
@@ -154,11 +154,11 @@ void __init setup_arch(char **cmdline_p)
min_low_pfn = PFN_DOWN(memory_start);
max_pfn = max_low_pfn = PFN_DOWN(memory_end);
-#if defined(CONFIG_UBOOT) && defined(CONFIG_BLK_DEV_INITRD)
+#if defined(CONFIG_UBOOT) && defined(CONFIG_INITRAMFS)
if ((virt_external_initramfs_start > 0) && (virt_external_initramfs_start < virt_external_initramfs_end) &&
(virt_external_initramfs_end < memory_end))
memblock_reserve(virt_external_initramfs_start, virt_external_initramfs_end - virt_external_initramfs_start);
-#endif /* if defined(CONFIG_BLK_DEV_INITRD) */
+#endif /* if defined(CONFIG_INITRAMFS) */
/*
* Get kmalloc into gear.
diff --git a/arch/m68k/kernel/uboot.c b/arch/m68k/kernel/uboot.c
index 416e3f8f879d..43d7749867ed 100644
--- a/arch/m68k/kernel/uboot.c
+++ b/arch/m68k/kernel/uboot.c
@@ -64,9 +64,9 @@ static void __init parse_uboot_commandline(char *commandp, int size)
extern unsigned long _init_sp;
unsigned long *sp;
unsigned long uboot_cmd_start, uboot_cmd_end;
-#if defined(CONFIG_BLK_DEV_INITRD)
+#if defined(CONFIG_INITRAMFS)
unsigned long uboot_initrd_start, uboot_initrd_end;
-#endif /* if defined(CONFIG_BLK_DEV_INITRD) */
+#endif /* if defined(CONFIG_INITRAMFS) */
sp = (unsigned long *)_init_sp;
uboot_cmd_start = sp[4];
@@ -75,7 +75,7 @@ static void __init parse_uboot_commandline(char *commandp, int size)
if (uboot_cmd_start && uboot_cmd_end)
strscpy(commandp, (const char *)uboot_cmd_start, size);
-#if defined(CONFIG_BLK_DEV_INITRD)
+#if defined(CONFIG_INITRAMFS)
uboot_initrd_start = sp[2];
uboot_initrd_end = sp[3];
@@ -85,7 +85,7 @@ static void __init parse_uboot_commandline(char *commandp, int size)
virt_external_initramfs_end = uboot_initrd_end;
pr_info("initrd at 0x%lx:0x%lx\n", virt_external_initramfs_start, virt_external_initramfs_end);
}
-#endif /* if defined(CONFIG_BLK_DEV_INITRD) */
+#endif /* if defined(CONFIG_INITRAMFS) */
}
__init void process_uboot_commandline(char *commandp, int size)
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index f54d71160712..f6bc9d9a7f73 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -200,14 +200,14 @@ asmlinkage void __init mmu_init(void)
ksize = PAGE_ALIGN(((u32)_end - (u32)CONFIG_KERNEL_START));
memblock_reserve(kstart, ksize);
-#if defined(CONFIG_BLK_DEV_INITRD)
+#if defined(CONFIG_INITRAMFS)
/* Remove the init RAM disk from the available memory. */
if (virt_external_initramfs_start) {
unsigned long size;
size = virt_external_initramfs_end - virt_external_initramfs_start;
memblock_reserve(__virt_to_phys(virt_external_initramfs_start), size);
}
-#endif /* CONFIG_BLK_DEV_INITRD */
+#endif /* CONFIG_INITRAMFS */
/* Initialize the MMU hardware */
mmu_init_hw();
diff --git a/arch/mips/ath79/prom.c b/arch/mips/ath79/prom.c
index fcb45fe198a0..fe08038a1a70 100644
--- a/arch/mips/ath79/prom.c
+++ b/arch/mips/ath79/prom.c
@@ -23,7 +23,7 @@ void __init prom_init(void)
{
fw_init_cmdline();
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
/* Read the initrd address from the firmware environment */
virt_external_initramfs_start = fw_getenvl("initrd_start");
if (virt_external_initramfs_start) {
diff --git a/arch/mips/configs/ath25_defconfig b/arch/mips/configs/ath25_defconfig
index 1d939ba9738d..cb16a1f18db8 100644
--- a/arch/mips/configs/ath25_defconfig
+++ b/arch/mips/configs/ath25_defconfig
@@ -2,7 +2,7 @@
CONFIG_SYSVIPC=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_HIGH_RES_TIMERS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_XZ is not set
diff --git a/arch/mips/configs/ath79_defconfig b/arch/mips/configs/ath79_defconfig
index cba0b85c6707..014bb1107b86 100644
--- a/arch/mips/configs/ath79_defconfig
+++ b/arch/mips/configs/ath79_defconfig
@@ -1,7 +1,7 @@
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y
CONFIG_HIGH_RES_TIMERS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_GZIP is not set
# CONFIG_AIO is not set
# CONFIG_KALLSYMS is not set
diff --git a/arch/mips/configs/bcm47xx_defconfig b/arch/mips/configs/bcm47xx_defconfig
index f56e8db5da95..1eaf876e1be3 100644
--- a/arch/mips/configs/bcm47xx_defconfig
+++ b/arch/mips/configs/bcm47xx_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_HIGH_RES_TIMERS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
CONFIG_BCM47XX=y
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig
index 97d2cd997285..176d4d852830 100644
--- a/arch/mips/configs/bigsur_defconfig
+++ b/arch/mips/configs/bigsur_defconfig
@@ -15,7 +15,7 @@ CONFIG_LOG_BUF_SHIFT=16
CONFIG_NAMESPACES=y
CONFIG_USER_NS=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_SIBYTE_BIGSUR=y
CONFIG_64BIT=y
diff --git a/arch/mips/configs/bmips_be_defconfig b/arch/mips/configs/bmips_be_defconfig
index daef132d000b..c12696b028bf 100644
--- a/arch/mips/configs/bmips_be_defconfig
+++ b/arch/mips/configs/bmips_be_defconfig
@@ -1,7 +1,7 @@
# CONFIG_LOCALVERSION_AUTO is not set
# CONFIG_SWAP is not set
CONFIG_NO_HZ=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_VM_EVENT_COUNTERS is not set
# CONFIG_SLUB_DEBUG is not set
diff --git a/arch/mips/configs/bmips_stb_defconfig b/arch/mips/configs/bmips_stb_defconfig
index cd0dc37c3d84..ed4d4be772be 100644
--- a/arch/mips/configs/bmips_stb_defconfig
+++ b/arch/mips/configs/bmips_stb_defconfig
@@ -2,7 +2,7 @@
# CONFIG_SWAP is not set
CONFIG_NO_HZ=y
CONFIG_HZ=1000
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_VM_EVENT_COUNTERS is not set
# CONFIG_SLUB_DEBUG is not set
diff --git a/arch/mips/configs/cavium_octeon_defconfig b/arch/mips/configs/cavium_octeon_defconfig
index 3f50e1d78894..99299b10adf3 100644
--- a/arch/mips/configs/cavium_octeon_defconfig
+++ b/arch/mips/configs/cavium_octeon_defconfig
@@ -7,7 +7,7 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_CAVIUM_OCTEON_SOC=y
CONFIG_CAVIUM_CN63XXP1=y
diff --git a/arch/mips/configs/eyeq5_defconfig b/arch/mips/configs/eyeq5_defconfig
index 6688f56aba1c..051133d4665d 100644
--- a/arch/mips/configs/eyeq5_defconfig
+++ b/arch/mips/configs/eyeq5_defconfig
@@ -16,7 +16,7 @@ CONFIG_CGROUP_CPUACCT=y
CONFIG_NAMESPACES=y
CONFIG_USER_NS=y
CONFIG_SCHED_AUTOGROUP=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_EYEQ=y
CONFIG_FIT_IMAGE_FDT_EPM5=y
diff --git a/arch/mips/configs/eyeq6_defconfig b/arch/mips/configs/eyeq6_defconfig
index 0a00a201937b..732f0ed7fef5 100644
--- a/arch/mips/configs/eyeq6_defconfig
+++ b/arch/mips/configs/eyeq6_defconfig
@@ -17,7 +17,7 @@ CONFIG_CGROUP_CPUACCT=y
CONFIG_NAMESPACES=y
CONFIG_USER_NS=y
CONFIG_SCHED_AUTOGROUP=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_EYEQ=y
CONFIG_MACH_EYEQ6H=y
diff --git a/arch/mips/configs/generic_defconfig b/arch/mips/configs/generic_defconfig
index fa916407bdd4..05752c7edb43 100644
--- a/arch/mips/configs/generic_defconfig
+++ b/arch/mips/configs/generic_defconfig
@@ -13,7 +13,7 @@ CONFIG_CGROUP_CPUACCT=y
CONFIG_NAMESPACES=y
CONFIG_USER_NS=y
CONFIG_SCHED_AUTOGROUP=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_BPF_SYSCALL=y
CONFIG_USERFAULTFD=y
CONFIG_EXPERT=y
diff --git a/arch/mips/configs/gpr_defconfig b/arch/mips/configs/gpr_defconfig
index 437ef6dc0b4c..cc7c44059f0b 100644
--- a/arch/mips/configs/gpr_defconfig
+++ b/arch/mips/configs/gpr_defconfig
@@ -6,7 +6,7 @@ CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PROFILING=y
CONFIG_MIPS_ALCHEMY=y
diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemote2f_defconfig
index 5038a27d035f..9c94b66f6dc7 100644
--- a/arch/mips/configs/lemote2f_defconfig
+++ b/arch/mips/configs/lemote2f_defconfig
@@ -9,7 +9,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PROFILING=y
CONFIG_KEXEC=y
diff --git a/arch/mips/configs/loongson2k_defconfig b/arch/mips/configs/loongson2k_defconfig
index 0cc665d3ea34..9f4342894ed9 100644
--- a/arch/mips/configs/loongson2k_defconfig
+++ b/arch/mips/configs/loongson2k_defconfig
@@ -17,7 +17,7 @@ CONFIG_BLK_CGROUP=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SYSFS_DEPRECATED=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MACH_LOONGSON64=y
# CONFIG_CPU_LOONGSON3_CPUCFG_EMULATION is not set
diff --git a/arch/mips/configs/loongson3_defconfig b/arch/mips/configs/loongson3_defconfig
index 240efff37d98..51d67ac3ca94 100644
--- a/arch/mips/configs/loongson3_defconfig
+++ b/arch/mips/configs/loongson3_defconfig
@@ -25,7 +25,7 @@ CONFIG_NAMESPACES=y
CONFIG_USER_NS=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
CONFIG_KEXEC=y
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index 9fcbac829920..201295eff80e 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -4,7 +4,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_NAMESPACES=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_COMPAT_BRK is not set
CONFIG_MIPS_MALTA=y
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig
index 2707ab134639..0e7ab562059e 100644
--- a/arch/mips/configs/mtx1_defconfig
+++ b/arch/mips/configs/mtx1_defconfig
@@ -6,7 +6,7 @@ CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PROFILING=y
CONFIG_MIPS_ALCHEMY=y
diff --git a/arch/mips/configs/rb532_defconfig b/arch/mips/configs/rb532_defconfig
index 30d18b084cda..5e02919bb793 100644
--- a/arch/mips/configs/rb532_defconfig
+++ b/arch/mips/configs/rb532_defconfig
@@ -6,7 +6,7 @@ CONFIG_BSD_PROCESS_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_ELF_CORE is not set
# CONFIG_KALLSYMS is not set
diff --git a/arch/mips/configs/rbtx49xx_defconfig b/arch/mips/configs/rbtx49xx_defconfig
index 03a7bbe28a53..c446f389c0a2 100644
--- a/arch/mips/configs/rbtx49xx_defconfig
+++ b/arch/mips/configs/rbtx49xx_defconfig
@@ -4,7 +4,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_EPOLL is not set
CONFIG_MACH_TX49XX=y
diff --git a/arch/mips/configs/rt305x_defconfig b/arch/mips/configs/rt305x_defconfig
index 8f9701efef19..bf4dd5930876 100644
--- a/arch/mips/configs/rt305x_defconfig
+++ b/arch/mips/configs/rt305x_defconfig
@@ -2,7 +2,7 @@
CONFIG_SYSVIPC=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_HIGH_RES_TIMERS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_GZIP is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_AIO is not set
diff --git a/arch/mips/configs/sb1250_swarm_defconfig b/arch/mips/configs/sb1250_swarm_defconfig
index ae2afff00e01..576421f8b669 100644
--- a/arch/mips/configs/sb1250_swarm_defconfig
+++ b/arch/mips/configs/sb1250_swarm_defconfig
@@ -7,7 +7,7 @@ CONFIG_CPUSETS=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_NAMESPACES=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_COMPAT_BRK is not set
CONFIG_SIBYTE_SWARM=y
diff --git a/arch/mips/configs/xway_defconfig b/arch/mips/configs/xway_defconfig
index aae8497b6872..41d0d7d8cb6c 100644
--- a/arch/mips/configs/xway_defconfig
+++ b/arch/mips/configs/xway_defconfig
@@ -2,7 +2,7 @@
CONFIG_SYSVIPC=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_HIGH_RES_TIMERS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_GZIP is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_AIO is not set
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 47dc7eb99ef7..b47bc52db75b 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -115,7 +115,7 @@ void __init detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_add
/*
* Manage initrd
*/
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
static int __init rd_start_early(char *p)
{
@@ -236,7 +236,7 @@ static void __init finalize_initrd(void)
virt_external_initramfs_end = 0;
}
-#else /* !CONFIG_BLK_DEV_INITRD */
+#else /* !CONFIG_INITRAMFS */
static unsigned long __init init_initrd(void)
{
diff --git a/arch/mips/sibyte/common/cfe.c b/arch/mips/sibyte/common/cfe.c
index 642b7d615594..ee62bf0e0320 100644
--- a/arch/mips/sibyte/common/cfe.c
+++ b/arch/mips/sibyte/common/cfe.c
@@ -37,7 +37,7 @@
int cfe_cons_handle;
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
extern unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
#endif
@@ -82,7 +82,7 @@ static __init void prom_meminit(void)
int mem_flags = 0;
unsigned int idx;
int rd_flag;
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
unsigned long initrd_pstart;
unsigned long initrd_pend;
@@ -104,7 +104,7 @@ static __init void prom_meminit(void)
* See if this block contains (any portion of) the
* ramdisk
*/
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (virt_external_initramfs_start) {
if ((initrd_pstart > addr) &&
(initrd_pstart < (addr + size))) {
@@ -138,7 +138,7 @@ static __init void prom_meminit(void)
}
}
}
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (virt_external_initramfs_start) {
memblock_add(initrd_pstart, initrd_pend - initrd_pstart);
memblock_reserve(initrd_pstart, initrd_pend - initrd_pstart);
@@ -146,7 +146,7 @@ static __init void prom_meminit(void)
#endif
}
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
static int __init initrd_setup(char *str)
{
char rdarg[64];
@@ -266,7 +266,7 @@ void __init prom_init(void)
}
}
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
{
char *ptr;
/* Need to find out early whether we've got an initrd. So scan
@@ -285,7 +285,7 @@ void __init prom_init(void)
}
}
}
-#endif /* CONFIG_BLK_DEV_INITRD */
+#endif /* CONFIG_INITRAMFS */
/* Not sure this is needed, but it's the safe way. */
arcs_cmdline[COMMAND_LINE_SIZE-1] = 0;
diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c
index d3d60c42df46..d4f5aa29be4e 100644
--- a/arch/nios2/kernel/setup.c
+++ b/arch/nios2/kernel/setup.c
@@ -107,12 +107,12 @@ asmlinkage void __init nios2_boot_init(unsigned r4, unsigned r5, unsigned r6,
#if defined(CONFIG_NIOS2_PASS_CMDLINE)
if (r4 == 0x534f494e) { /* r4 is magic NIOS */
-#if defined(CONFIG_BLK_DEV_INITRD)
+#if defined(CONFIG_INITRAMFS)
if (r5) { /* initramfs */
virt_external_initramfs_start = r5;
virt_external_initramfs_end = r6;
}
-#endif /* CONFIG_BLK_DEV_INITRD */
+#endif /* CONFIG_INITRAMFS */
dtb_passed = r6;
if (r7)
@@ -160,12 +160,12 @@ void __init setup_arch(char **cmdline_p)
find_limits(&min_low_pfn, &max_low_pfn, &max_pfn);
memblock_reserve(__pa_symbol(_stext), _end - _stext);
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (virt_external_initramfs_start) {
memblock_reserve(virt_to_phys((void *)virt_external_initramfs_start),
virt_external_initramfs_end - virt_external_initramfs_start);
}
-#endif /* CONFIG_BLK_DEV_INITRD */
+#endif /* CONFIG_INITRAMFS */
early_init_fdt_reserve_self();
early_init_fdt_scan_reserved_mem();
diff --git a/arch/openrisc/configs/or1klitex_defconfig b/arch/openrisc/configs/or1klitex_defconfig
index 3e849d25838a..2a1daa87af49 100644
--- a/arch/openrisc/configs/or1klitex_defconfig
+++ b/arch/openrisc/configs/or1klitex_defconfig
@@ -3,7 +3,7 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_CGROUPS=y
CONFIG_NAMESPACES=y
CONFIG_USER_NS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SGETMASK_SYSCALL=y
CONFIG_EXPERT=y
diff --git a/arch/openrisc/configs/or1ksim_defconfig b/arch/openrisc/configs/or1ksim_defconfig
index 59fe33cefba2..96578bfb7159 100644
--- a/arch/openrisc/configs/or1ksim_defconfig
+++ b/arch/openrisc/configs/or1ksim_defconfig
@@ -1,6 +1,6 @@
CONFIG_NO_HZ=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_GZIP is not set
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
diff --git a/arch/openrisc/configs/simple_smp_defconfig b/arch/openrisc/configs/simple_smp_defconfig
index 6008e824d31c..f7c807b32d50 100644
--- a/arch/openrisc/configs/simple_smp_defconfig
+++ b/arch/openrisc/configs/simple_smp_defconfig
@@ -1,7 +1,7 @@
CONFIG_LOCALVERSION="-simple-smp"
CONFIG_NO_HZ=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
diff --git a/arch/openrisc/configs/virt_defconfig b/arch/openrisc/configs/virt_defconfig
index c1b69166c500..d542c69075bf 100644
--- a/arch/openrisc/configs/virt_defconfig
+++ b/arch/openrisc/configs/virt_defconfig
@@ -3,7 +3,7 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ_IDLE=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_OPENRISC_HAVE_INST_CMOV=y
CONFIG_OPENRISC_HAVE_INST_ROR=y
CONFIG_OPENRISC_HAVE_INST_RORI=y
diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c
index 27ae87c09b0e..82e586881c89 100644
--- a/arch/openrisc/kernel/setup.c
+++ b/arch/openrisc/kernel/setup.c
@@ -75,7 +75,7 @@ static void __init setup_memory(void)
*/
memblock_reserve(__pa(_stext), _end - _stext);
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
/* Then reserve the initrd, if any */
if (virt_external_initramfs_start && (virt_external_initramfs_end > virt_external_initramfs_start)) {
unsigned long aligned_start = ALIGN_DOWN(virt_external_initramfs_start, PAGE_SIZE);
@@ -83,7 +83,7 @@ static void __init setup_memory(void)
memblock_reserve(__pa(aligned_start), aligned_end - aligned_start);
}
-#endif /* CONFIG_BLK_DEV_INITRD */
+#endif /* CONFIG_INITRAMFS */
early_init_fdt_reserve_self();
early_init_fdt_scan_reserved_mem();
@@ -238,7 +238,7 @@ void __init setup_arch(char **cmdline_p)
/* process 1's initial memory region is the kernel code/data */
setup_initial_init_mm(_stext, _etext, _edata, _end);
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (virt_external_initramfs_start == virt_external_initramfs_end) {
printk(KERN_INFO "Initial ramdisk not found\n");
virt_external_initramfs_start = 0;
diff --git a/arch/openrisc/kernel/vmlinux.h b/arch/openrisc/kernel/vmlinux.h
index bdea46c617c7..25c70ee6b930 100644
--- a/arch/openrisc/kernel/vmlinux.h
+++ b/arch/openrisc/kernel/vmlinux.h
@@ -2,7 +2,7 @@
#ifndef __OPENRISC_VMLINUX_H_
#define __OPENRISC_VMLINUX_H_
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
extern char __initrd_start, __initrd_end;
#endif
diff --git a/arch/parisc/boot/compressed/misc.c b/arch/parisc/boot/compressed/misc.c
index 9c83bd06ef15..826daed4e8f3 100644
--- a/arch/parisc/boot/compressed/misc.c
+++ b/arch/parisc/boot/compressed/misc.c
@@ -323,7 +323,7 @@ asmlinkage unsigned long __visible decompress_kernel(unsigned int started_wide,
if (free_mem_end_ptr > ARTIFICIAL_LIMIT)
free_mem_end_ptr = ARTIFICIAL_LIMIT;
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
/* if we have ramdisk this is at end of memory */
if (rd_start && rd_start < free_mem_end_ptr)
free_mem_end_ptr = rd_start;
diff --git a/arch/parisc/configs/generic-32bit_defconfig b/arch/parisc/configs/generic-32bit_defconfig
index 94928d114d4c..5523ff05b932 100644
--- a/arch/parisc/configs/generic-32bit_defconfig
+++ b/arch/parisc/configs/generic-32bit_defconfig
@@ -9,7 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
CONFIG_CGROUPS=y
CONFIG_NAMESPACES=y
CONFIG_USER_NS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
CONFIG_PA7100LC=y
diff --git a/arch/parisc/configs/generic-64bit_defconfig b/arch/parisc/configs/generic-64bit_defconfig
index d8cd7f858b2a..f631be899c75 100644
--- a/arch/parisc/configs/generic-64bit_defconfig
+++ b/arch/parisc/configs/generic-64bit_defconfig
@@ -18,7 +18,7 @@ CONFIG_CGROUP_PIDS=y
CONFIG_CPUSETS=y
CONFIG_USER_NS=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SMP=y
CONFIG_HPPB=y
diff --git a/arch/parisc/kernel/pdt.c b/arch/parisc/kernel/pdt.c
index 49982a48c92c..b11352e8e149 100644
--- a/arch/parisc/kernel/pdt.c
+++ b/arch/parisc/kernel/pdt.c
@@ -228,7 +228,7 @@ void __init pdc_pdt_init(void)
report_mem_err(pdt_entry[i]);
addr = pdt_entry[i] & PDT_ADDR_PHYS_MASK;
- if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) &&
+ if (IS_ENABLED(CONFIG_INITRAMFS) &&
addr >= virt_external_initramfs_start && addr < virt_external_initramfs_end)
pr_crit("CRITICAL: initrd possibly broken "
"due to bad memory!\n");
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index 1e403c26070d..da4ffd7a5996 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -68,7 +68,7 @@ static void __init setup_cmdline(char **cmdline_p)
if (!strstr(p, "earlycon"))
strlcat(p, " earlycon=pdc", COMMAND_LINE_SIZE);
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
/* did palo pass us a ramdisk? */
if (boot_args[2] != 0) {
virt_external_initramfs_start = (unsigned long)__va(boot_args[2]);
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 5843f4a46e93..f6a4125e245e 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -297,7 +297,7 @@ static void __init setup_bootmem(void)
}
#endif
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (virt_external_initramfs_start) {
printk(KERN_INFO "initrd: %08lx-%08lx\n", virt_external_initramfs_start, virt_external_initramfs_end);
if (__pa(virt_external_initramfs_start) < mem_max) {
@@ -632,7 +632,7 @@ static void __init pagetable_init(void)
size, PAGE_KERNEL, 0);
}
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (virt_external_initramfs_end && virt_external_initramfs_end > mem_limit) {
printk(KERN_INFO "initrd: mapping %08lx-%08lx\n", virt_external_initramfs_start, virt_external_initramfs_end);
map_pages(virt_external_initramfs_start, __pa(virt_external_initramfs_start),
diff --git a/arch/powerpc/configs/44x/akebono_defconfig b/arch/powerpc/configs/44x/akebono_defconfig
index 1882eb2da354..db744569dc01 100644
--- a/arch/powerpc/configs/44x/akebono_defconfig
+++ b/arch/powerpc/configs/44x/akebono_defconfig
@@ -3,7 +3,7 @@ CONFIG_SMP=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_SLUB_CPU_PARTIAL is not set
diff --git a/arch/powerpc/configs/44x/arches_defconfig b/arch/powerpc/configs/44x/arches_defconfig
index 41d04e70d4fb..1732c9e22832 100644
--- a/arch/powerpc/configs/44x/arches_defconfig
+++ b/arch/powerpc/configs/44x/arches_defconfig
@@ -4,7 +4,7 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/44x/bamboo_defconfig b/arch/powerpc/configs/44x/bamboo_defconfig
index acbce718eaa8..b91d65645bd8 100644
--- a/arch/powerpc/configs/44x/bamboo_defconfig
+++ b/arch/powerpc/configs/44x/bamboo_defconfig
@@ -2,7 +2,7 @@ CONFIG_44x=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/44x/bluestone_defconfig b/arch/powerpc/configs/44x/bluestone_defconfig
index 37088f250c9e..bfa400e8e293 100644
--- a/arch/powerpc/configs/44x/bluestone_defconfig
+++ b/arch/powerpc/configs/44x/bluestone_defconfig
@@ -4,7 +4,7 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_PCI_QUIRKS is not set
# CONFIG_VM_EVENT_COUNTERS is not set
diff --git a/arch/powerpc/configs/44x/canyonlands_defconfig b/arch/powerpc/configs/44x/canyonlands_defconfig
index 61776ade572b..1c08d7a2a0e9 100644
--- a/arch/powerpc/configs/44x/canyonlands_defconfig
+++ b/arch/powerpc/configs/44x/canyonlands_defconfig
@@ -4,7 +4,7 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/44x/ebony_defconfig b/arch/powerpc/configs/44x/ebony_defconfig
index 93d2a4e64af9..55fc82c746da 100644
--- a/arch/powerpc/configs/44x/ebony_defconfig
+++ b/arch/powerpc/configs/44x/ebony_defconfig
@@ -2,7 +2,7 @@ CONFIG_44x=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/44x/eiger_defconfig b/arch/powerpc/configs/44x/eiger_defconfig
index 509300f400e2..19a1c889e371 100644
--- a/arch/powerpc/configs/44x/eiger_defconfig
+++ b/arch/powerpc/configs/44x/eiger_defconfig
@@ -4,7 +4,7 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/44x/fsp2_defconfig b/arch/powerpc/configs/44x/fsp2_defconfig
index 5492537f4c6c..696f63bbc56e 100644
--- a/arch/powerpc/configs/44x/fsp2_defconfig
+++ b/arch/powerpc/configs/44x/fsp2_defconfig
@@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
diff --git a/arch/powerpc/configs/44x/icon_defconfig b/arch/powerpc/configs/44x/icon_defconfig
index fb9a15573546..2b255183a043 100644
--- a/arch/powerpc/configs/44x/icon_defconfig
+++ b/arch/powerpc/configs/44x/icon_defconfig
@@ -2,7 +2,7 @@ CONFIG_44x=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/44x/iss476-smp_defconfig b/arch/powerpc/configs/44x/iss476-smp_defconfig
index 0f6380e1e612..b467075f615d 100644
--- a/arch/powerpc/configs/44x/iss476-smp_defconfig
+++ b/arch/powerpc/configs/44x/iss476-smp_defconfig
@@ -3,7 +3,7 @@ CONFIG_SMP=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
diff --git a/arch/powerpc/configs/44x/katmai_defconfig b/arch/powerpc/configs/44x/katmai_defconfig
index 1a0f1c3e0ee9..01ca50e54f78 100644
--- a/arch/powerpc/configs/44x/katmai_defconfig
+++ b/arch/powerpc/configs/44x/katmai_defconfig
@@ -2,7 +2,7 @@ CONFIG_44x=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/44x/rainier_defconfig b/arch/powerpc/configs/44x/rainier_defconfig
index 6dd67de06a0b..5e43c9cc19e0 100644
--- a/arch/powerpc/configs/44x/rainier_defconfig
+++ b/arch/powerpc/configs/44x/rainier_defconfig
@@ -2,7 +2,7 @@ CONFIG_44x=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/44x/redwood_defconfig b/arch/powerpc/configs/44x/redwood_defconfig
index e28d76416537..75d35213f171 100644
--- a/arch/powerpc/configs/44x/redwood_defconfig
+++ b/arch/powerpc/configs/44x/redwood_defconfig
@@ -4,7 +4,7 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/44x/sam440ep_defconfig b/arch/powerpc/configs/44x/sam440ep_defconfig
index 98221bda380d..b4bfbc3f9ed2 100644
--- a/arch/powerpc/configs/44x/sam440ep_defconfig
+++ b/arch/powerpc/configs/44x/sam440ep_defconfig
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_IKCONFIG=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/44x/sequoia_defconfig b/arch/powerpc/configs/44x/sequoia_defconfig
index b4984eab43eb..0f71035564eb 100644
--- a/arch/powerpc/configs/44x/sequoia_defconfig
+++ b/arch/powerpc/configs/44x/sequoia_defconfig
@@ -4,7 +4,7 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/44x/taishan_defconfig b/arch/powerpc/configs/44x/taishan_defconfig
index 3ea5932ab852..542711792c5c 100644
--- a/arch/powerpc/configs/44x/taishan_defconfig
+++ b/arch/powerpc/configs/44x/taishan_defconfig
@@ -2,7 +2,7 @@ CONFIG_44x=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/44x/warp_defconfig b/arch/powerpc/configs/44x/warp_defconfig
index 5757625469c4..8c014ef06789 100644
--- a/arch/powerpc/configs/44x/warp_defconfig
+++ b/arch/powerpc/configs/44x/warp_defconfig
@@ -5,7 +5,7 @@ CONFIG_SYSVIPC=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/52xx/cm5200_defconfig b/arch/powerpc/configs/52xx/cm5200_defconfig
index 2412a6bf7ee6..41004a375d20 100644
--- a/arch/powerpc/configs/52xx/cm5200_defconfig
+++ b/arch/powerpc/configs/52xx/cm5200_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
# CONFIG_EPOLL is not set
diff --git a/arch/powerpc/configs/52xx/lite5200b_defconfig b/arch/powerpc/configs/52xx/lite5200b_defconfig
index 7db479dcbc0c..ad7261b41c2c 100644
--- a/arch/powerpc/configs/52xx/lite5200b_defconfig
+++ b/arch/powerpc/configs/52xx/lite5200b_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
# CONFIG_EPOLL is not set
diff --git a/arch/powerpc/configs/52xx/motionpro_defconfig b/arch/powerpc/configs/52xx/motionpro_defconfig
index 6186ead1e105..0b8a6dc46cf7 100644
--- a/arch/powerpc/configs/52xx/motionpro_defconfig
+++ b/arch/powerpc/configs/52xx/motionpro_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
# CONFIG_EPOLL is not set
diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig b/arch/powerpc/configs/52xx/tqm5200_defconfig
index 688f703d8e22..c4e3705b1f22 100644
--- a/arch/powerpc/configs/52xx/tqm5200_defconfig
+++ b/arch/powerpc/configs/52xx/tqm5200_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_KALLSYMS is not set
# CONFIG_EPOLL is not set
CONFIG_EXPERT=y
diff --git a/arch/powerpc/configs/83xx/asp8347_defconfig b/arch/powerpc/configs/83xx/asp8347_defconfig
index 10192410b33c..2130a1edcc1a 100644
--- a/arch/powerpc/configs/83xx/asp8347_defconfig
+++ b/arch/powerpc/configs/83xx/asp8347_defconfig
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
index 16a42e2267fb..4d7a13903450 100644
--- a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
index 80d40ae668eb..673cdebbac42 100644
--- a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
index b99caba8724a..3ae1b474e546 100644
--- a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
index 11163052fdba..0dd939d938d7 100644
--- a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
index 312d39e4242c..33f4efeccb46 100644
--- a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig b/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
index 093df33f9455..6d000adec270 100644
--- a/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
+++ b/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
index ac27f99faab8..9d56002df3bc 100644
--- a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/85xx/ge_imp3a_defconfig b/arch/powerpc/configs/85xx/ge_imp3a_defconfig
index 7beb36a41d45..04a770fb145d 100644
--- a/arch/powerpc/configs/85xx/ge_imp3a_defconfig
+++ b/arch/powerpc/configs/85xx/ge_imp3a_defconfig
@@ -15,7 +15,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PERF_EVENTS=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/85xx/ksi8560_defconfig b/arch/powerpc/configs/85xx/ksi8560_defconfig
index 9cb211fb6d1e..db06a4c4b80c 100644
--- a/arch/powerpc/configs/85xx/ksi8560_defconfig
+++ b/arch/powerpc/configs/85xx/ksi8560_defconfig
@@ -1,7 +1,7 @@
CONFIG_PPC_85xx=y
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_PARTITION_ADVANCED=y
diff --git a/arch/powerpc/configs/85xx/socrates_defconfig b/arch/powerpc/configs/85xx/socrates_defconfig
index 7037a6d8018c..80f19738ac37 100644
--- a/arch/powerpc/configs/85xx/socrates_defconfig
+++ b/arch/powerpc/configs/85xx/socrates_defconfig
@@ -1,7 +1,7 @@
CONFIG_PPC_85xx=y
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=16
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
# CONFIG_EPOLL is not set
diff --git a/arch/powerpc/configs/85xx/stx_gp3_defconfig b/arch/powerpc/configs/85xx/stx_gp3_defconfig
index 0a42072fa23c..8d0ccfbb7109 100644
--- a/arch/powerpc/configs/85xx/stx_gp3_defconfig
+++ b/arch/powerpc/configs/85xx/stx_gp3_defconfig
@@ -1,7 +1,7 @@
CONFIG_PPC_85xx=y
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
diff --git a/arch/powerpc/configs/85xx/tqm8540_defconfig b/arch/powerpc/configs/85xx/tqm8540_defconfig
index bbf040aa1f9a..9c9c3b7c1147 100644
--- a/arch/powerpc/configs/85xx/tqm8540_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8540_defconfig
@@ -1,7 +1,7 @@
CONFIG_PPC_85xx=y
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
# CONFIG_EPOLL is not set
diff --git a/arch/powerpc/configs/85xx/tqm8541_defconfig b/arch/powerpc/configs/85xx/tqm8541_defconfig
index 523ad8dcfd9d..4acfa7cfb2fd 100644
--- a/arch/powerpc/configs/85xx/tqm8541_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8541_defconfig
@@ -1,7 +1,7 @@
CONFIG_PPC_85xx=y
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
# CONFIG_EPOLL is not set
diff --git a/arch/powerpc/configs/85xx/tqm8548_defconfig b/arch/powerpc/configs/85xx/tqm8548_defconfig
index afa1b9b633f8..7e4de11202bf 100644
--- a/arch/powerpc/configs/85xx/tqm8548_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8548_defconfig
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/85xx/tqm8555_defconfig b/arch/powerpc/configs/85xx/tqm8555_defconfig
index 0032ce1e8c9c..b3404fca620d 100644
--- a/arch/powerpc/configs/85xx/tqm8555_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8555_defconfig
@@ -1,7 +1,7 @@
CONFIG_PPC_85xx=y
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
# CONFIG_EPOLL is not set
diff --git a/arch/powerpc/configs/85xx/tqm8560_defconfig b/arch/powerpc/configs/85xx/tqm8560_defconfig
index a80b971f7d6e..61021a8406a8 100644
--- a/arch/powerpc/configs/85xx/tqm8560_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8560_defconfig
@@ -1,7 +1,7 @@
CONFIG_PPC_85xx=y
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
# CONFIG_EPOLL is not set
diff --git a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
index 488d03ae6d6c..0bab90e37f91 100644
--- a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
+++ b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
@@ -8,7 +8,7 @@ CONFIG_BSD_PROCESS_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/amigaone_defconfig b/arch/powerpc/configs/amigaone_defconfig
index 69ef3dc31c4b..6de6f83c7cc0 100644
--- a/arch/powerpc/configs/amigaone_defconfig
+++ b/arch/powerpc/configs/amigaone_defconfig
@@ -7,7 +7,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index 7a31b52e92e1..d32fc083b6fa 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -11,7 +11,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_CGROUPS=y
CONFIG_CPUSETS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
index b799c95480ae..5bac7324a1d4 100644
--- a/arch/powerpc/configs/chrp32_defconfig
+++ b/arch/powerpc/configs/chrp32_defconfig
@@ -7,7 +7,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/fsl-emb-nonhw.config b/arch/powerpc/configs/fsl-emb-nonhw.config
index 2f81bc2d819e..fd097b99398b 100644
--- a/arch/powerpc/configs/fsl-emb-nonhw.config
+++ b/arch/powerpc/configs/fsl-emb-nonhw.config
@@ -5,7 +5,7 @@ CONFIG_BEFS_FS=m
CONFIG_BFS_FS=m
CONFIG_BINFMT_MISC=m
# CONFIG_BLK_DEV_BSG is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM_SIZE=131072
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 428f17b45513..d6433a642f20 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -9,7 +9,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/gamecube_defconfig b/arch/powerpc/configs/gamecube_defconfig
index cdd99657b71b..387347db1782 100644
--- a/arch/powerpc/configs/gamecube_defconfig
+++ b/arch/powerpc/configs/gamecube_defconfig
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_ELF_CORE is not set
CONFIG_PERF_EVENTS=y
diff --git a/arch/powerpc/configs/holly_defconfig b/arch/powerpc/configs/holly_defconfig
index 271daff47d1d..bffc07caa44f 100644
--- a/arch/powerpc/configs/holly_defconfig
+++ b/arch/powerpc/configs/holly_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
# CONFIG_BLK_DEV_BSG is not set
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
index b564f9e33a0d..72df074540e4 100644
--- a/arch/powerpc/configs/linkstation_defconfig
+++ b/arch/powerpc/configs/linkstation_defconfig
@@ -5,7 +5,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/mgcoge_defconfig b/arch/powerpc/configs/mgcoge_defconfig
index f65001e7877f..1b782855c84a 100644
--- a/arch/powerpc/configs/mgcoge_defconfig
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -5,7 +5,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_GZIP is not set
CONFIG_KALLSYMS_ALL=y
# CONFIG_PCSPKR_PLATFORM is not set
diff --git a/arch/powerpc/configs/microwatt_defconfig b/arch/powerpc/configs/microwatt_defconfig
index a64fb1ef8c75..3094f90e2a03 100644
--- a/arch/powerpc/configs/microwatt_defconfig
+++ b/arch/powerpc/configs/microwatt_defconfig
@@ -5,7 +5,7 @@ CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_TICK_CPU_ACCOUNTING=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_CGROUPS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KALLSYMS_ALL=y
CONFIG_EXPERT=y
diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig
index d24457bc5791..c9a3820b2e60 100644
--- a/arch/powerpc/configs/mpc512x_defconfig
+++ b/arch/powerpc/configs/mpc512x_defconfig
@@ -2,7 +2,7 @@
CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_LOG_BUF_SHIFT=16
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig
index c0fe5e76604a..26d92dc6a4c8 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig
index a815d9e5e3e8..0a100a5dbf4b 100644
--- a/arch/powerpc/configs/mpc83xx_defconfig
+++ b/arch/powerpc/configs/mpc83xx_defconfig
@@ -1,6 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index 8bbf51b38480..b062c064213b 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_defconfig
@@ -5,7 +5,7 @@ CONFIG_NR_CPUS=2
CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PROFILING=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index ae45f70b29f0..6691765bb50b 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -7,7 +7,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/powernv_defconfig
index d06388b0f66e..ac8b6132f69c 100644
--- a/arch/powerpc/configs/powernv_defconfig
+++ b/arch/powerpc/configs/powernv_defconfig
@@ -25,7 +25,7 @@ CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_BPF=y
CONFIG_USER_NS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_BPF_SYSCALL=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig
index 41c930f74ed4..e1aee17ef7d6 100644
--- a/arch/powerpc/configs/ppc44x_defconfig
+++ b/arch/powerpc/configs/ppc44x_defconfig
@@ -2,7 +2,7 @@ CONFIG_44x=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index ce34597e9f3e..164a182f0d80 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -35,7 +35,7 @@ CONFIG_CGROUP_MISC=y
CONFIG_USER_NS=y
CONFIG_CHECKPOINT_RESTORE=y
CONFIG_SCHED_AUTOGROUP=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PROFILING=y
CONFIG_PPC64=y
CONFIG_NR_CPUS=2048
diff --git a/arch/powerpc/configs/ppc64e_defconfig b/arch/powerpc/configs/ppc64e_defconfig
index 90247b2a0ab0..c538beda73fa 100644
--- a/arch/powerpc/configs/ppc64e_defconfig
+++ b/arch/powerpc/configs/ppc64e_defconfig
@@ -11,7 +11,7 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUPS=y
CONFIG_CPUSETS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
index b082c1fae13c..ef322cfda4b9 100644
--- a/arch/powerpc/configs/ppc6xx_defconfig
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -15,7 +15,7 @@ CONFIG_CGROUP_SCHED=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_USER_NS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
CONFIG_KPROBES=y
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index 0b48d2b776c4..9899af6b73e1 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_defconfig
@@ -1,7 +1,7 @@
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_HIGH_RES_TIMERS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
# CONFIG_PERF_EVENTS is not set
diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
index 2b71a6dc399e..1611e15a72f3 100644
--- a/arch/powerpc/configs/skiroot_defconfig
+++ b/arch/powerpc/configs/skiroot_defconfig
@@ -9,7 +9,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=20
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
diff --git a/arch/powerpc/configs/wii_defconfig b/arch/powerpc/configs/wii_defconfig
index 7c714a19221e..a7339767da4e 100644
--- a/arch/powerpc/configs/wii_defconfig
+++ b/arch/powerpc/configs/wii_defconfig
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
# CONFIG_ELF_CORE is not set
CONFIG_PERF_EVENTS=y
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index a2a1896f9e46..a1851246eab9 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -96,7 +96,7 @@ early_param("mem", early_parse_mem);
*/
static inline int overlaps_initrd(unsigned long start, unsigned long size)
{
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (!virt_external_initramfs_start)
return 0;
@@ -684,14 +684,14 @@ static void __init early_reserve_mem(void)
/* Look for the new "reserved-regions" property in the DT */
early_reserve_mem_dt();
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
/* Then reserve the initrd, if any */
if (virt_external_initramfs_start && (virt_external_initramfs_end > virt_external_initramfs_start)) {
memblock_reserve(ALIGN_DOWN(__pa(virt_external_initramfs_start), PAGE_SIZE),
ALIGN(virt_external_initramfs_end, PAGE_SIZE) -
ALIGN_DOWN(virt_external_initramfs_start, PAGE_SIZE));
}
-#endif /* CONFIG_BLK_DEV_INITRD */
+#endif /* CONFIG_INITRAMFS */
if (!IS_ENABLED(CONFIG_PPC32))
return;
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index a0ac845eb504..f00a7639113c 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -3153,7 +3153,7 @@ static void __init prom_find_boot_cpu(void)
static void __init prom_check_initrd(unsigned long r3, unsigned long r4)
{
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (r3 && r4 && r4 != 0xdeadbeef) {
__be64 val;
@@ -3173,7 +3173,7 @@ static void __init prom_check_initrd(unsigned long r3, unsigned long r4)
prom_debug("initrd_start=0x%lx\n", prom_initrd_start);
prom_debug("initrd_end=0x%lx\n", prom_initrd_end);
}
-#endif /* CONFIG_BLK_DEV_INITRD */
+#endif /* CONFIG_INITRAMFS */
}
#ifdef CONFIG_PPC_SVM
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 53a416bc41ce..fe047ddc9ff4 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -359,7 +359,7 @@ const struct seq_operations cpuinfo_op = {
void __init check_for_initrd(void)
{
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
DBG(" -> check_for_initrd() virt_external_initramfs_start=0x%lx virt_external_initramfs_end=0x%lx\n",
virt_external_initramfs_start, virt_external_initramfs_end);
@@ -373,7 +373,7 @@ void __init check_for_initrd(void)
pr_info("Found initramfs at 0x%lx:0x%lx\n", virt_external_initramfs_start, virt_external_initramfs_end);
DBG(" <- check_for_initrd()\n");
-#endif /* CONFIG_BLK_DEV_INITRD */
+#endif /* CONFIG_INITRAMFS */
}
#ifdef CONFIG_SMP
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index ab0860868025..5d8c98eb02c3 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -295,7 +295,7 @@ static void __init pmac_setup_arch(void)
pmac_nvram_init();
#endif
#ifdef CONFIG_PPC32
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (!virt_external_initramfs_start)
#endif
ROOT_DEV = DEFAULT_ROOT_DEVICE;
diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 7b5eed17611a..b6709cf90720 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -20,7 +20,7 @@ CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_BPF=y
CONFIG_USER_NS=y
CONFIG_CHECKPOINT_RESTORE=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PROFILING=y
CONFIG_ARCH_ANDES=y
CONFIG_ARCH_MICROCHIP=y
diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig
index ee18d1e333f2..7824f13e84f3 100644
--- a/arch/riscv/configs/nommu_k210_defconfig
+++ b/arch/riscv/configs/nommu_k210_defconfig
@@ -1,6 +1,6 @@
# CONFIG_CPU_ISOLATION is not set
CONFIG_LOG_BUF_SHIFT=13
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
diff --git a/arch/riscv/configs/nommu_virt_defconfig b/arch/riscv/configs/nommu_virt_defconfig
index d4b03dc3c2c0..d777e4a774bd 100644
--- a/arch/riscv/configs/nommu_virt_defconfig
+++ b/arch/riscv/configs/nommu_virt_defconfig
@@ -1,6 +1,6 @@
# CONFIG_CPU_ISOLATION is not set
CONFIG_LOG_BUF_SHIFT=16
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c
index 93684a775716..c631955fb5a5 100644
--- a/arch/s390/boot/startup.c
+++ b/arch/s390/boot/startup.c
@@ -205,7 +205,7 @@ static void rescue_initrd(unsigned long min, unsigned long max)
{
unsigned long old_addr, addr, size;
- if (!IS_ENABLED(CONFIG_BLK_DEV_INITRD))
+ if (!IS_ENABLED(CONFIG_INITRAMFS))
return;
if (!get_physmem_reserved(RR_INITRD, &addr, &size))
return;
@@ -523,7 +523,7 @@ void startup_kernel(void)
* (if KASLR is off or failed).
*/
physmem_reserve(RR_DECOMPRESSOR, 0, safe_addr);
- if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && parmarea.initrd_size)
+ if (IS_ENABLED(CONFIG_INITRAMFS) && parmarea.initrd_size)
physmem_reserve(RR_INITRD, parmarea.initrd_start, parmarea.initrd_size);
oldmem_data.start = parmarea.oldmem_base;
oldmem_data.size = parmarea.oldmem_size;
diff --git a/arch/s390/configs/zfcpdump_defconfig b/arch/s390/configs/zfcpdump_defconfig
index ed0b137353ad..b7409974b9c2 100644
--- a/arch/s390/configs/zfcpdump_defconfig
+++ b/arch/s390/configs/zfcpdump_defconfig
@@ -7,7 +7,7 @@ CONFIG_BPF_SYSCALL=y
# CONFIG_TIME_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KEXEC=y
CONFIG_MARCH_Z13=y
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 7ce009c2599d..062b6b6762df 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -670,7 +670,7 @@ static void __init reserve_initrd(void)
{
unsigned long addr, size;
- if (!IS_ENABLED(CONFIG_BLK_DEV_INITRD) || !get_physmem_reserved(RR_INITRD, &addr, &size))
+ if (!IS_ENABLED(CONFIG_INITRAMFS) || !get_physmem_reserved(RR_INITRD, &addr, &size))
return;
virt_external_initramfs_start = (unsigned long)__va(addr);
virt_external_initramfs_end = virt_external_initramfs_start + size;
diff --git a/arch/sh/configs/apsh4a3a_defconfig b/arch/sh/configs/apsh4a3a_defconfig
index 9c2644443c4d..026c35567b23 100644
--- a/arch/sh/configs/apsh4a3a_defconfig
+++ b/arch/sh/configs/apsh4a3a_defconfig
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PROFILING=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/sh/configs/apsh4ad0a_defconfig b/arch/sh/configs/apsh4ad0a_defconfig
index 137573610ec4..10ec215729e6 100644
--- a/arch/sh/configs/apsh4ad0a_defconfig
+++ b/arch/sh/configs/apsh4ad0a_defconfig
@@ -12,7 +12,7 @@ CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_MEMCG=y
CONFIG_BLK_CGROUP=y
CONFIG_NAMESPACES=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
diff --git a/arch/sh/configs/ecovec24-romimage_defconfig b/arch/sh/configs/ecovec24-romimage_defconfig
index 13fec4338416..7ff9d8306d45 100644
--- a/arch/sh/configs/ecovec24-romimage_defconfig
+++ b/arch/sh/configs/ecovec24-romimage_defconfig
@@ -4,7 +4,7 @@ CONFIG_BSD_PROCESS_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_KALLSYMS is not set
# CONFIG_BLK_DEV_BSG is not set
CONFIG_CPU_SUBTYPE_SH7724=y
diff --git a/arch/sh/configs/edosk7760_defconfig b/arch/sh/configs/edosk7760_defconfig
index f427a95bcd21..e253d2cb1322 100644
--- a/arch/sh/configs/edosk7760_defconfig
+++ b/arch/sh/configs/edosk7760_defconfig
@@ -4,7 +4,7 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/sh/configs/kfr2r09-romimage_defconfig b/arch/sh/configs/kfr2r09-romimage_defconfig
index 88fbb65cb9f9..faca85dac22a 100644
--- a/arch/sh/configs/kfr2r09-romimage_defconfig
+++ b/arch/sh/configs/kfr2r09-romimage_defconfig
@@ -4,7 +4,7 @@ CONFIG_BSD_PROCESS_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_KALLSYMS is not set
# CONFIG_BLOCK is not set
CONFIG_CPU_SUBTYPE_SH7724=y
diff --git a/arch/sh/configs/kfr2r09_defconfig b/arch/sh/configs/kfr2r09_defconfig
index d80e83e7ec38..a80b76d12f10 100644
--- a/arch/sh/configs/kfr2r09_defconfig
+++ b/arch/sh/configs/kfr2r09_defconfig
@@ -4,7 +4,7 @@ CONFIG_BSD_PROCESS_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_KALLSYMS is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/sh/configs/magicpanelr2_defconfig b/arch/sh/configs/magicpanelr2_defconfig
index 93b9aa32dc7c..f2498f4f1950 100644
--- a/arch/sh/configs/magicpanelr2_defconfig
+++ b/arch/sh/configs/magicpanelr2_defconfig
@@ -5,7 +5,7 @@ CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_AUDIT=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_KALLSYMS_ALL=y
CONFIG_MODULES=y
diff --git a/arch/sh/configs/migor_defconfig b/arch/sh/configs/migor_defconfig
index 31dbd8888aaa..3b8449e4d3c4 100644
--- a/arch/sh/configs/migor_defconfig
+++ b/arch/sh/configs/migor_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_PROFILING=y
CONFIG_MODULES=y
diff --git a/arch/sh/configs/rsk7201_defconfig b/arch/sh/configs/rsk7201_defconfig
index 376e95fa77bc..525add70da17 100644
--- a/arch/sh/configs/rsk7201_defconfig
+++ b/arch/sh/configs/rsk7201_defconfig
@@ -8,7 +8,7 @@ CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_AIO is not set
CONFIG_SLUB=y
CONFIG_SLUB_TINY=y
diff --git a/arch/sh/configs/rsk7203_defconfig b/arch/sh/configs/rsk7203_defconfig
index 1d5fd67a3949..8936458242db 100644
--- a/arch/sh/configs/rsk7203_defconfig
+++ b/arch/sh/configs/rsk7203_defconfig
@@ -9,7 +9,7 @@ CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_SLUB=y
CONFIG_SLUB_TINY=y
diff --git a/arch/sh/configs/sdk7786_defconfig b/arch/sh/configs/sdk7786_defconfig
index 07894f13441e..dd0ef63a0064 100644
--- a/arch/sh/configs/sdk7786_defconfig
+++ b/arch/sh/configs/sdk7786_defconfig
@@ -26,7 +26,7 @@ CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_LZO=y
diff --git a/arch/sh/configs/se7206_defconfig b/arch/sh/configs/se7206_defconfig
index 64f9308ee586..2d9749464739 100644
--- a/arch/sh/configs/se7206_defconfig
+++ b/arch/sh/configs/se7206_defconfig
@@ -16,7 +16,7 @@ CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_UID16 is not set
CONFIG_KALLSYMS_ALL=y
# CONFIG_ELF_CORE is not set
diff --git a/arch/sh/configs/se7705_defconfig b/arch/sh/configs/se7705_defconfig
index 1752ddc2694a..7ff345525c74 100644
--- a/arch/sh/configs/se7705_defconfig
+++ b/arch/sh/configs/se7705_defconfig
@@ -1,6 +1,6 @@
# CONFIG_SWAP is not set
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
# CONFIG_KALLSYMS is not set
# CONFIG_HOTPLUG is not set
diff --git a/arch/sh/configs/se7722_defconfig b/arch/sh/configs/se7722_defconfig
index 5327a2f70980..0a0daf45aafa 100644
--- a/arch/sh/configs/se7722_defconfig
+++ b/arch/sh/configs/se7722_defconfig
@@ -3,7 +3,7 @@ CONFIG_BSD_PROCESS_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PROFILING=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/sh/configs/se7751_defconfig b/arch/sh/configs/se7751_defconfig
index 8b5fe4ec16bc..5e4d15c3e1f5 100644
--- a/arch/sh/configs/se7751_defconfig
+++ b/arch/sh/configs/se7751_defconfig
@@ -1,7 +1,7 @@
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
# CONFIG_HOTPLUG is not set
CONFIG_MODULES=y
diff --git a/arch/sh/configs/secureedge5410_defconfig b/arch/sh/configs/secureedge5410_defconfig
index 2f77b60e9540..37e3e304f944 100644
--- a/arch/sh/configs/secureedge5410_defconfig
+++ b/arch/sh/configs/secureedge5410_defconfig
@@ -1,6 +1,6 @@
# CONFIG_SWAP is not set
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_HOTPLUG is not set
# CONFIG_BLK_DEV_BSG is not set
CONFIG_CPU_SUBTYPE_SH7751R=y
diff --git a/arch/sh/configs/sh03_defconfig b/arch/sh/configs/sh03_defconfig
index 4d75c92cac10..375e0e9edb39 100644
--- a/arch/sh/configs/sh03_defconfig
+++ b/arch/sh/configs/sh03_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PROFILING=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/sh/configs/sh7757lcr_defconfig b/arch/sh/configs/sh7757lcr_defconfig
index 48a0f9beb116..710bf61ad328 100644
--- a/arch/sh/configs/sh7757lcr_defconfig
+++ b/arch/sh/configs/sh7757lcr_defconfig
@@ -7,7 +7,7 @@ CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/sh/configs/titan_defconfig b/arch/sh/configs/titan_defconfig
index 8ef72b8dbcd3..3da734d1ebc9 100644
--- a/arch/sh/configs/titan_defconfig
+++ b/arch/sh/configs/titan_defconfig
@@ -4,7 +4,7 @@ CONFIG_POSIX_MQUEUE=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/sh/configs/ul2_defconfig b/arch/sh/configs/ul2_defconfig
index 103b81ec1ffb..16425409e46a 100644
--- a/arch/sh/configs/ul2_defconfig
+++ b/arch/sh/configs/ul2_defconfig
@@ -3,7 +3,7 @@ CONFIG_BSD_PROCESS_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PROFILING=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/sh/configs/urquell_defconfig b/arch/sh/configs/urquell_defconfig
index 00ef62133b04..fbaf782169ce 100644
--- a/arch/sh/configs/urquell_defconfig
+++ b/arch/sh/configs/urquell_defconfig
@@ -16,7 +16,7 @@ CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_MEMCG=y
CONFIG_CGROUP_SCHED=y
CONFIG_RT_GROUP_SCHED=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PROFILING=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 814866e35120..7e58bd242582 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -112,7 +112,7 @@ early_param("mem", early_parse_mem);
void __init check_for_initrd(void)
{
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
unsigned long start, end;
/*
diff --git a/arch/sparc/configs/sparc32_defconfig b/arch/sparc/configs/sparc32_defconfig
index f6341b063b01..0a664c499b06 100644
--- a/arch/sparc/configs/sparc32_defconfig
+++ b/arch/sparc/configs/sparc32_defconfig
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSFS_DEPRECATED_V2=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig
index 7a7c4dec2925..9fbf5531a52f 100644
--- a/arch/sparc/configs/sparc64_defconfig
+++ b/arch/sparc/configs/sparc64_defconfig
@@ -3,7 +3,7 @@ CONFIG_64BIT=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=18
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_PERF_EVENTS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
index f04dd1d6f382..236d17b4bc78 100644
--- a/arch/sparc/mm/init_32.c
+++ b/arch/sparc/mm/init_32.c
@@ -100,7 +100,7 @@ static unsigned long calc_max_low_pfn(void)
static void __init find_ramdisk(unsigned long end_of_phys_memory)
{
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
unsigned long size;
/* Now have to check initial ramdisk, so that it won't pass
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index b0fa82676e6f..0680bec325eb 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -875,7 +875,7 @@ do { if (numa_debug) \
static void __init find_ramdisk(unsigned long phys_base)
{
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (sparc_ramdisk_image || sparc_ramdisk_image64) {
unsigned long ramdisk_image;
@@ -2484,7 +2484,7 @@ int page_in_phys_avail(unsigned long paddr)
}
if (paddr >= kern_base && paddr < (kern_base + kern_size))
return 1;
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (paddr >= __pa(virt_external_initramfs_start) &&
paddr < __pa(PAGE_ALIGN(virt_external_initramfs_end)))
return 1;
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index b8f4e9281599..1e8fbe509bfb 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -20,7 +20,7 @@ obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
um_arch.o umid.o kmsg_dump.o capflags.o skas/
obj-y += load_file.o
-obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
+obj-$(CONFIG_INITRAMFS) += initrd.o
obj-$(CONFIG_GPROF) += gprof_syms.o
obj-$(CONFIG_OF) += dtb.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 58d890fe2100..44805d01eff4 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1326,7 +1326,7 @@ config MICROCODE
config MICROCODE_INITRD32
def_bool y
- depends on MICROCODE && X86_32 && BLK_DEV_INITRD
+ depends on MICROCODE && X86_32 && INITRAMFS
config MICROCODE_LATE_LOADING
bool "Late microcode loading (DANGEROUS)"
diff --git a/arch/x86/boot/startup/sme.c b/arch/x86/boot/startup/sme.c
index 70ea1748c0a7..983bded31ebb 100644
--- a/arch/x86/boot/startup/sme.c
+++ b/arch/x86/boot/startup/sme.c
@@ -322,7 +322,7 @@ void __head sme_encrypt_kernel(struct boot_params *bp)
initrd_start = 0;
initrd_end = 0;
initrd_len = 0;
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
initrd_len = (unsigned long)bp->hdr.ramdisk_size |
((unsigned long)bp->ext_ramdisk_size << 32);
if (initrd_len) {
diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
index 79fa38ca954d..b345788090bb 100644
--- a/arch/x86/configs/i386_defconfig
+++ b/arch/x86/configs/i386_defconfig
@@ -24,7 +24,7 @@ CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_MISC=y
CONFIG_CGROUP_DEBUG=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
CONFIG_KEXEC=y
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 7d7310cdf8b0..8afc43c0742a 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -24,7 +24,7 @@ CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_MISC=y
CONFIG_CGROUP_DEBUG=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
CONFIG_KEXEC=y
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index b8169f14d175..a055e3bf0c1a 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -191,7 +191,7 @@ void load_ucode_ap(void)
struct cpio_data __init find_microcode_in_initrd(const char *path)
{
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
unsigned long start = 0;
size_t size;
@@ -222,7 +222,7 @@ struct cpio_data __init find_microcode_in_initrd(const char *path)
start = virt_external_initramfs_start;
return find_cpio_data(path, (void *)start, size, NULL);
-#else /* !CONFIG_BLK_DEV_INITRD */
+#else /* !CONFIG_INITRAMFS */
return (struct cpio_data){ NULL, 0, "" };
#endif
}
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 65670e0f59c0..dc1c1e5dc557 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -288,7 +288,7 @@ static void __init reserve_brk(void)
_brk_start = 0;
}
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
static u64 __init get_ramdisk_image(void)
{
@@ -393,7 +393,7 @@ static void __init early_reserve_initrd(void)
static void __init reserve_initrd(void)
{
}
-#endif /* CONFIG_BLK_DEV_INITRD */
+#endif /* CONFIG_INITRAMFS */
static void __init add_early_ima_buffer(u64 phys_addr)
{
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 51b632f7fd21..082faaf6e291 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -980,7 +980,7 @@ void __ref free_initmem(void)
&__init_begin, &__init_end);
}
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
void __init free_initramfs_mem(unsigned long start, unsigned long end)
{
/*
diff --git a/arch/xtensa/configs/audio_kc705_defconfig b/arch/xtensa/configs/audio_kc705_defconfig
index f2af1a32c9c7..41feb5a06616 100644
--- a/arch/xtensa/configs/audio_kc705_defconfig
+++ b/arch/xtensa/configs/audio_kc705_defconfig
@@ -14,7 +14,7 @@ CONFIG_MEMCG=y
CONFIG_NAMESPACES=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
diff --git a/arch/xtensa/configs/cadence_csp_defconfig b/arch/xtensa/configs/cadence_csp_defconfig
index 88ed5284e21c..788274247b03 100644
--- a/arch/xtensa/configs/cadence_csp_defconfig
+++ b/arch/xtensa/configs/cadence_csp_defconfig
@@ -12,7 +12,7 @@ CONFIG_CGROUP_DEBUG=y
CONFIG_NAMESPACES=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_INITRAMFS_SOURCE="$$KERNEL_INITRAMFS_SOURCE"
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
diff --git a/arch/xtensa/configs/generic_kc705_defconfig b/arch/xtensa/configs/generic_kc705_defconfig
index 4427907becca..30468c9e4407 100644
--- a/arch/xtensa/configs/generic_kc705_defconfig
+++ b/arch/xtensa/configs/generic_kc705_defconfig
@@ -14,7 +14,7 @@ CONFIG_MEMCG=y
CONFIG_NAMESPACES=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
diff --git a/arch/xtensa/configs/nommu_kc705_defconfig b/arch/xtensa/configs/nommu_kc705_defconfig
index 5828228522ba..5050b3e5e1be 100644
--- a/arch/xtensa/configs/nommu_kc705_defconfig
+++ b/arch/xtensa/configs/nommu_kc705_defconfig
@@ -14,7 +14,7 @@ CONFIG_MEMCG=y
CONFIG_NAMESPACES=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
diff --git a/arch/xtensa/configs/smp_lx200_defconfig b/arch/xtensa/configs/smp_lx200_defconfig
index 326966ca7831..197fedacad03 100644
--- a/arch/xtensa/configs/smp_lx200_defconfig
+++ b/arch/xtensa/configs/smp_lx200_defconfig
@@ -14,7 +14,7 @@ CONFIG_MEMCG=y
CONFIG_NAMESPACES=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
diff --git a/arch/xtensa/configs/virt_defconfig b/arch/xtensa/configs/virt_defconfig
index e37048985b47..56acfc8886c0 100644
--- a/arch/xtensa/configs/virt_defconfig
+++ b/arch/xtensa/configs/virt_defconfig
@@ -13,7 +13,7 @@ CONFIG_CGROUP_DEBUG=y
CONFIG_NAMESPACES=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PERF_EVENTS=y
diff --git a/arch/xtensa/configs/xip_kc705_defconfig b/arch/xtensa/configs/xip_kc705_defconfig
index ee47438f9b51..c151e1fc32bc 100644
--- a/arch/xtensa/configs/xip_kc705_defconfig
+++ b/arch/xtensa/configs/xip_kc705_defconfig
@@ -13,7 +13,7 @@ CONFIG_CGROUP_DEBUG=y
CONFIG_NAMESPACES=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index b86367178bce..e430e2680afa 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -48,7 +48,7 @@
#include <asm/timex.h>
#include <asm/traps.h>
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
extern unsigned long virt_external_initramfs_start;
extern unsigned long virt_external_initramfs_end;
extern int initramfs_below_start_ok;
@@ -100,7 +100,7 @@ static int __init parse_tag_mem(const bp_tag_t *tag)
__tagtable(BP_TAG_MEMORY, parse_tag_mem);
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
static int __init parse_tag_initrd(const bp_tag_t* tag)
{
@@ -114,7 +114,7 @@ static int __init parse_tag_initrd(const bp_tag_t* tag)
__tagtable(BP_TAG_INITRD, parse_tag_initrd);
-#endif /* CONFIG_BLK_DEV_INITRD */
+#endif /* CONFIG_INITRAMFS */
#ifdef CONFIG_USE_OF
@@ -289,7 +289,7 @@ void __init setup_arch(char **cmdline_p)
/* Reserve some memory regions */
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
if (virt_external_initramfs_start < virt_external_initramfs_end &&
!mem_reserve(__pa(virt_external_initramfs_start), __pa(virt_external_initramfs_end)))
initramfs_below_start_ok = 1;
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index b594780a57d7..5bb21236e1b1 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -374,7 +374,7 @@ config ARCH_HAS_ACPI_TABLE_UPGRADE
config ACPI_TABLE_UPGRADE
bool "Allow upgrading ACPI tables via initrd"
- depends on BLK_DEV_INITRD && ARCH_HAS_ACPI_TABLE_UPGRADE
+ depends on INITRAMFS && ARCH_HAS_ACPI_TABLE_UPGRADE
default y
help
This option provides functionality to upgrade arbitrary ACPI tables
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 1dcaaea1dcfb..cbe94aeca879 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -807,7 +807,7 @@ int __init efi_config_parse_tables(const efi_config_table_t *config_tables,
}
}
- if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) &&
+ if (IS_ENABLED(CONFIG_INITRAMFS) &&
initrd != EFI_INVALID_TABLE_ADDR && phys_external_initramfs_size == 0) {
struct linux_efi_initrd *tbl;
diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c
index 6d89bf941d57..32adbeab156b 100644
--- a/drivers/firmware/efi/libstub/efi-stub-helper.c
+++ b/drivers/firmware/efi/libstub/efi-stub-helper.c
@@ -611,7 +611,7 @@ efi_status_t efi_load_initrd(efi_loaded_image_t *image,
efi_status_t status = EFI_SUCCESS;
struct linux_efi_initrd initrd, *tbl;
- if (!IS_ENABLED(CONFIG_BLK_DEV_INITRD))
+ if (!IS_ENABLED(CONFIG_INITRAMFS))
return EFI_SUCCESS;
status = efi_load_initrd_dev_path(&initrd, hard_limit);
diff --git a/drivers/gpu/drm/ci/arm.config b/drivers/gpu/drm/ci/arm.config
index 411e814819a8..71e986de8fb7 100644
--- a/drivers/gpu/drm/ci/arm.config
+++ b/drivers/gpu/drm/ci/arm.config
@@ -8,7 +8,7 @@ CONFIG_ZRAM=y
CONFIG_ZSMALLOC_STAT=y
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
-CONFIG_BLK_DEV_INITRD=n
+CONFIG_INITRAMFS=n
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
CONFIG_DEVFREQ_GOV_POWERSAVE=y
diff --git a/drivers/gpu/drm/ci/arm64.config b/drivers/gpu/drm/ci/arm64.config
index fddfbd4d2493..488be9cade47 100644
--- a/drivers/gpu/drm/ci/arm64.config
+++ b/drivers/gpu/drm/ci/arm64.config
@@ -8,7 +8,7 @@ CONFIG_ZRAM=y
CONFIG_ZSMALLOC_STAT=y
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
-CONFIG_BLK_DEV_INITRD=n
+CONFIG_INITRAMFS=n
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
CONFIG_DEVFREQ_GOV_POWERSAVE=y
diff --git a/drivers/gpu/drm/ci/x86_64.config b/drivers/gpu/drm/ci/x86_64.config
index 8eaba388b141..147bab7801f1 100644
--- a/drivers/gpu/drm/ci/x86_64.config
+++ b/drivers/gpu/drm/ci/x86_64.config
@@ -13,7 +13,7 @@ CONFIG_OF=y
CONFIG_CROS_EC=y
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
-CONFIG_BLK_DEV_INITRD=n
+CONFIG_INITRAMFS=n
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
CONFIG_DEVFREQ_GOV_POWERSAVE=y
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 2e73de8a1bbe..13a38d18f559 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -781,7 +781,7 @@ static void __init early_init_dt_check_for_initrd(unsigned long node)
int len;
const __be32 *prop;
- if (!IS_ENABLED(CONFIG_BLK_DEV_INITRD))
+ if (!IS_ENABLED(CONFIG_INITRAMFS))
return;
pr_debug("Looking for initrd properties... ");
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index a6bd2ff46f7e..8268da2fe716 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -966,7 +966,7 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
BOUNDED_SECTION_POST_LABEL(.kunit_init_test_suites, \
__kunit_init_suites, _start, _end)
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
#define INIT_RAM_FS \
. = ALIGN(4); \
__builtin_initramfs_start = .; \
diff --git a/include/linux/initramfs.h b/include/linux/initramfs.h
index e9f523917a02..e5694c006b16 100644
--- a/include/linux/initramfs.h
+++ b/include/linux/initramfs.h
@@ -9,7 +9,7 @@ extern int initramfs_below_start_ok;
extern unsigned long virt_external_initramfs_start, virt_external_initramfs_end;
extern void free_initramfs_mem(unsigned long, unsigned long);
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
extern void __init reserve_initramfs_mem(void);
extern void wait_for_initramfs(void);
#else
diff --git a/init/.kunitconfig b/init/.kunitconfig
index acb906b1a5f9..ee36fbc94224 100644
--- a/init/.kunitconfig
+++ b/init/.kunitconfig
@@ -1,3 +1,3 @@
CONFIG_KUNIT=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_INITRAMFS_TEST=y
diff --git a/init/Kconfig b/init/Kconfig
index 1c371dca7fd4..0e8352f611b6 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1434,7 +1434,7 @@ config RELAY
If unsure, say N.
-config BLK_DEV_INITRD
+config INITRAMFS
bool "Initial RAM filesystem (initramfs) support"
help
The initial RAM filesystem is a ramfs or tmpfs which is loaded by the
@@ -1445,7 +1445,7 @@ config BLK_DEV_INITRD
If unsure say Y.
-if BLK_DEV_INITRD
+if INITRAMFS
source "usr/Kconfig"
@@ -1453,7 +1453,7 @@ endif
config BOOT_CONFIG
bool "Boot config support"
- select BLK_DEV_INITRD if !BOOT_CONFIG_EMBED
+ select INITRAMFS if !BOOT_CONFIG_EMBED
help
Extra boot config allows system admin to pass a config file as
complemental extension of kernel cmdline when booting.
@@ -1507,7 +1507,7 @@ config INITRAMFS_PRESERVE_MTIME
config INITRAMFS_TEST
bool "Test initramfs cpio archive extraction" if !KUNIT_ALL_TESTS
- depends on BLK_DEV_INITRD && KUNIT=y
+ depends on INITRAMFS && KUNIT=y
default KUNIT_ALL_TESTS
help
Build KUnit tests for initramfs. See Documentation/dev-tools/kunit
diff --git a/init/Makefile b/init/Makefile
index 09657c0274eb..6e5ca899b2a0 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -6,10 +6,10 @@
ccflags-y := -fno-function-sections -fno-data-sections
obj-y := main.o version.o mounts.o
-ifneq ($(CONFIG_BLK_DEV_INITRD),y)
+ifneq ($(CONFIG_INITRAMFS),y)
obj-y += noinitramfs.o
else
-obj-$(CONFIG_BLK_DEV_INITRD) += initramfs.o
+obj-$(CONFIG_INITRAMFS) += initramfs.o
endif
obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
obj-$(CONFIG_INITRAMFS_TEST) += initramfs_test.o
diff --git a/init/main.c b/init/main.c
index 4212efb33e77..f2ac451dc5ee 100644
--- a/init/main.c
+++ b/init/main.c
@@ -263,7 +263,7 @@ static int __init loglevel(char *str)
early_param("loglevel", loglevel);
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
static void * __init get_boot_config_from_initramfs(size_t *_size)
{
u32 size, csum;
@@ -1046,7 +1046,7 @@ void start_kernel(void)
*/
locking_selftest();
-#ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_INITRAMFS
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("initramfs overwritten (0x%08lx < 0x%08lx) - disabling it.\n",
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 3627ca227e5a..cb0e9cea223f 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -88,7 +88,7 @@ install_maint_scripts () {
export DEB_MAINT_PARAMS="\$*"
# Tell initramfs builder whether it's wanted
- export INITRD=$(if_enabled_echo CONFIG_BLK_DEV_INITRD Yes No)
+ export INITRD=$(if_enabled_echo CONFIG_INITRAMFS Yes No)
# run-parts will error out if one of its directory arguments does not
# exist, so filter the list of hook directories accordingly.
diff --git a/tools/testing/selftests/bpf/config.aarch64 b/tools/testing/selftests/bpf/config.aarch64
index e1495a4bbc99..0cae14af2e1a 100644
--- a/tools/testing/selftests/bpf/config.aarch64
+++ b/tools/testing/selftests/bpf/config.aarch64
@@ -6,7 +6,7 @@ CONFIG_AUDIT=y
CONFIG_BINFMT_MISC=y
CONFIG_BLK_CGROUP=y
CONFIG_BLK_DEV_BSGLIB=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_SD=y
diff --git a/tools/testing/selftests/bpf/config.ppc64el b/tools/testing/selftests/bpf/config.ppc64el
index 9acf389dc4ce..e04949103f02 100644
--- a/tools/testing/selftests/bpf/config.ppc64el
+++ b/tools/testing/selftests/bpf/config.ppc64el
@@ -1,7 +1,7 @@
CONFIG_ALTIVEC=y
CONFIG_AUDIT=y
CONFIG_BLK_CGROUP=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BONDING=y
CONFIG_BPF_JIT_ALWAYS_ON=y
diff --git a/tools/testing/selftests/bpf/config.riscv64 b/tools/testing/selftests/bpf/config.riscv64
index bb7043a80e1a..52b56ebe1f73 100644
--- a/tools/testing/selftests/bpf/config.riscv64
+++ b/tools/testing/selftests/bpf/config.riscv64
@@ -1,6 +1,6 @@
CONFIG_AUDIT=y
CONFIG_BLK_CGROUP=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BONDING=y
CONFIG_BPF_JIT_ALWAYS_ON=y
diff --git a/tools/testing/selftests/bpf/config.s390x b/tools/testing/selftests/bpf/config.s390x
index 26c3bc2ce11d..db8ff885d0c2 100644
--- a/tools/testing/selftests/bpf/config.s390x
+++ b/tools/testing/selftests/bpf/config.s390x
@@ -1,7 +1,7 @@
CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
CONFIG_AUDIT=y
CONFIG_BLK_CGROUP=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BONDING=y
diff --git a/tools/testing/selftests/kho/vmtest.sh b/tools/testing/selftests/kho/vmtest.sh
index ec70a17bd476..567e6936445d 100755
--- a/tools/testing/selftests/kho/vmtest.sh
+++ b/tools/testing/selftests/kho/vmtest.sh
@@ -58,7 +58,7 @@ function build_kernel() {
# enable initrd, KHO and KHO test in kernel configuration
tee "$kconfig" > "$kho_config" <<EOF
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_KEXEC_HANDOVER=y
CONFIG_TEST_KEXEC_HANDOVER=y
CONFIG_DEBUG_KERNEL=y
diff --git a/tools/testing/selftests/nolibc/Makefile.nolibc b/tools/testing/selftests/nolibc/Makefile.nolibc
index 0fb759ba992e..8d3e53406712 100644
--- a/tools/testing/selftests/nolibc/Makefile.nolibc
+++ b/tools/testing/selftests/nolibc/Makefile.nolibc
@@ -128,8 +128,8 @@ DEFCONFIG = $(DEFCONFIG_$(XARCH))
EXTRACONFIG_x32 = -e CONFIG_X86_X32_ABI
EXTRACONFIG_arm = -e CONFIG_NAMESPACES
EXTRACONFIG_armthumb = -e CONFIG_NAMESPACES
-EXTRACONFIG_m68k = -e CONFIG_BLK_DEV_INITRD
-EXTRACONFIG_sh4 = -e CONFIG_BLK_DEV_INITRD -e CONFIG_CMDLINE_FROM_BOOTLOADER
+EXTRACONFIG_m68k = -e CONFIG_INITRAMFS
+EXTRACONFIG_sh4 = -e CONFIG_INITRAMFS -e CONFIG_CMDLINE_FROM_BOOTLOADER
EXTRACONFIG = $(EXTRACONFIG_$(XARCH))
# optional tests to run (default = all)
diff --git a/tools/testing/selftests/vsock/config b/tools/testing/selftests/vsock/config
index 5f0a4f17dfc9..57159a38229f 100644
--- a/tools/testing/selftests/vsock/config
+++ b/tools/testing/selftests/vsock/config
@@ -1,4 +1,4 @@
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT=y
diff --git a/tools/testing/selftests/wireguard/qemu/kernel.config b/tools/testing/selftests/wireguard/qemu/kernel.config
index 0a5381717e9f..d53d786ffe7c 100644
--- a/tools/testing/selftests/wireguard/qemu/kernel.config
+++ b/tools/testing/selftests/wireguard/qemu/kernel.config
@@ -69,7 +69,7 @@ CONFIG_TMPFS=y
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15
CONFIG_LOG_BUF_SHIFT=18
CONFIG_PRINTK_TIME=y
-CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS=y
CONFIG_LEGACY_VSYSCALL_NONE=y
CONFIG_KERNEL_GZIP=y
CONFIG_PANIC_ON_OOPS=y
diff --git a/usr/Makefile b/usr/Makefile
index f1779496bca7..d0cd88c26fd5 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -12,7 +12,7 @@ compress-$(CONFIG_INITRAMFS_COMPRESSION_LZO) := lzo
compress-$(CONFIG_INITRAMFS_COMPRESSION_LZ4) := lz4
compress-$(CONFIG_INITRAMFS_COMPRESSION_ZSTD) := zstd
-obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o
+obj-$(CONFIG_INITRAMFS) := initramfs_data.o
$(obj)/initramfs_data.o: $(obj)/initramfs_inc_data
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 56/62] init: rename CONFIG_RD_GZIP to CONFIG_INITRAMFS_DECOMPRESS_GZIP
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (55 preceding siblings ...)
2025-09-14 4:00 ` [PATCH RESEND 55/62] init: rename CONFIG_BLK_DEV_INITRD to CONFIG_INITRAMFS Askar Safin
@ 2025-09-14 4:01 ` Askar Safin
2025-09-14 4:01 ` [PATCH RESEND 57/62] init: rename CONFIG_RD_BZIP2 to CONFIG_INITRAMFS_DECOMPRESS_BZIP2 Askar Safin
` (11 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 4:01 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Initrd support was removed,
and CONFIG_RD_GZIP has nothing to do with ramdisks.
Update your configs
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arc/configs/tb10x_defconfig | 2 +-
arch/arm/configs/sp7021_defconfig | 2 +-
arch/mips/configs/ath25_defconfig | 2 +-
arch/mips/configs/ath79_defconfig | 2 +-
arch/mips/configs/bmips_stb_defconfig | 2 +-
arch/mips/configs/rt305x_defconfig | 2 +-
arch/mips/configs/xway_defconfig | 2 +-
arch/openrisc/configs/or1ksim_defconfig | 2 +-
arch/openrisc/configs/simple_smp_defconfig | 2 +-
arch/powerpc/configs/mgcoge_defconfig | 2 +-
arch/powerpc/configs/skiroot_defconfig | 2 +-
arch/riscv/configs/nommu_k210_defconfig | 2 +-
usr/Kconfig | 4 ++--
13 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/arch/arc/configs/tb10x_defconfig b/arch/arc/configs/tb10x_defconfig
index 26a06eb336df..f177600a527a 100644
--- a/arch/arc/configs/tb10x_defconfig
+++ b/arch/arc/configs/tb10x_defconfig
@@ -13,7 +13,7 @@ CONFIG_INITRAMFS=y
CONFIG_INITRAMFS_SOURCE="../tb10x-rootfs.cpio"
CONFIG_INITRAMFS_ROOT_UID=2100
CONFIG_INITRAMFS_ROOT_GID=501
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
CONFIG_KALLSYMS_ALL=y
# CONFIG_AIO is not set
CONFIG_EXPERT=y
diff --git a/arch/arm/configs/sp7021_defconfig b/arch/arm/configs/sp7021_defconfig
index ec723401b440..30cfafc49ec9 100644
--- a/arch/arm/configs/sp7021_defconfig
+++ b/arch/arm/configs/sp7021_defconfig
@@ -5,7 +5,7 @@ CONFIG_PREEMPT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
diff --git a/arch/mips/configs/ath25_defconfig b/arch/mips/configs/ath25_defconfig
index cb16a1f18db8..58ae5f9726a0 100644
--- a/arch/mips/configs/ath25_defconfig
+++ b/arch/mips/configs/ath25_defconfig
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_HIGH_RES_TIMERS=y
CONFIG_INITRAMFS=y
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
diff --git a/arch/mips/configs/ath79_defconfig b/arch/mips/configs/ath79_defconfig
index 014bb1107b86..500b94dfc6c1 100644
--- a/arch/mips/configs/ath79_defconfig
+++ b/arch/mips/configs/ath79_defconfig
@@ -2,7 +2,7 @@
CONFIG_SYSVIPC=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_INITRAMFS=y
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_AIO is not set
# CONFIG_KALLSYMS is not set
CONFIG_EXPERT=y
diff --git a/arch/mips/configs/bmips_stb_defconfig b/arch/mips/configs/bmips_stb_defconfig
index ed4d4be772be..2217a3ca5b72 100644
--- a/arch/mips/configs/bmips_stb_defconfig
+++ b/arch/mips/configs/bmips_stb_defconfig
@@ -14,7 +14,7 @@ CONFIG_SMP=y
CONFIG_NR_CPUS=4
# CONFIG_SECCOMP is not set
CONFIG_MIPS_O32_FP64_SUPPORT=y
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
CONFIG_RD_XZ=y
diff --git a/arch/mips/configs/rt305x_defconfig b/arch/mips/configs/rt305x_defconfig
index bf4dd5930876..9102f9ebcf88 100644
--- a/arch/mips/configs/rt305x_defconfig
+++ b/arch/mips/configs/rt305x_defconfig
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_HIGH_RES_TIMERS=y
CONFIG_INITRAMFS=y
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_AIO is not set
CONFIG_KALLSYMS_ALL=y
diff --git a/arch/mips/configs/xway_defconfig b/arch/mips/configs/xway_defconfig
index 41d0d7d8cb6c..fa49183a4147 100644
--- a/arch/mips/configs/xway_defconfig
+++ b/arch/mips/configs/xway_defconfig
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_HIGH_RES_TIMERS=y
CONFIG_INITRAMFS=y
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_AIO is not set
CONFIG_KALLSYMS_ALL=y
diff --git a/arch/openrisc/configs/or1ksim_defconfig b/arch/openrisc/configs/or1ksim_defconfig
index 96578bfb7159..56ddb48f7955 100644
--- a/arch/openrisc/configs/or1ksim_defconfig
+++ b/arch/openrisc/configs/or1ksim_defconfig
@@ -1,7 +1,7 @@
CONFIG_NO_HZ=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_INITRAMFS=y
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
# CONFIG_EPOLL is not set
diff --git a/arch/openrisc/configs/simple_smp_defconfig b/arch/openrisc/configs/simple_smp_defconfig
index f7c807b32d50..e4aaaeaec7a8 100644
--- a/arch/openrisc/configs/simple_smp_defconfig
+++ b/arch/openrisc/configs/simple_smp_defconfig
@@ -2,7 +2,7 @@ CONFIG_LOCALVERSION="-simple-smp"
CONFIG_NO_HZ=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_INITRAMFS=y
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
diff --git a/arch/powerpc/configs/mgcoge_defconfig b/arch/powerpc/configs/mgcoge_defconfig
index 1b782855c84a..6d543b9f0bc6 100644
--- a/arch/powerpc/configs/mgcoge_defconfig
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_INITRAMFS=y
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
CONFIG_KALLSYMS_ALL=y
# CONFIG_PCSPKR_PLATFORM is not set
CONFIG_EXPERT=y
diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
index 1611e15a72f3..9a6ef1d8ca44 100644
--- a/arch/powerpc/configs/skiroot_defconfig
+++ b/arch/powerpc/configs/skiroot_defconfig
@@ -10,7 +10,7 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=20
CONFIG_INITRAMFS=y
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_LZO is not set
diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig
index 7824f13e84f3..a1fa77563bb8 100644
--- a/arch/riscv/configs/nommu_k210_defconfig
+++ b/arch/riscv/configs/nommu_k210_defconfig
@@ -1,7 +1,7 @@
# CONFIG_CPU_ISOLATION is not set
CONFIG_LOG_BUF_SHIFT=13
CONFIG_INITRAMFS=y
-# CONFIG_RD_GZIP is not set
+# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
diff --git a/usr/Kconfig b/usr/Kconfig
index 8899353bd7d5..cf3c7539e3dc 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -52,7 +52,7 @@ config INITRAMFS_ROOT_GID
If you are not sure, leave it set to "0".
-config RD_GZIP
+config INITRAMFS_DECOMPRESS_GZIP
bool "Support initial ramfs compressed using gzip"
default y
select DECOMPRESS_GZIP
@@ -134,7 +134,7 @@ choice
config INITRAMFS_COMPRESSION_GZIP
bool "Gzip"
- depends on RD_GZIP
+ depends on INITRAMFS_DECOMPRESS_GZIP
help
Use the old and well tested gzip compression algorithm. Gzip provides
a good balance between compression ratio and decompression speed and
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 57/62] init: rename CONFIG_RD_BZIP2 to CONFIG_INITRAMFS_DECOMPRESS_BZIP2
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (56 preceding siblings ...)
2025-09-14 4:01 ` [PATCH RESEND 56/62] init: rename CONFIG_RD_GZIP to CONFIG_INITRAMFS_DECOMPRESS_GZIP Askar Safin
@ 2025-09-14 4:01 ` Askar Safin
2025-09-14 4:02 ` [PATCH RESEND 58/62] init: rename CONFIG_RD_LZMA to CONFIG_INITRAMFS_DECOMPRESS_LZMA Askar Safin
` (10 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 4:01 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Initrd support was removed,
and CONFIG_RD_BZIP2 has nothing to do with ramdisks.
Update your configs
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/configs/aspeed_g4_defconfig | 2 +-
arch/arm/configs/aspeed_g5_defconfig | 2 +-
arch/arm/configs/lpc18xx_defconfig | 2 +-
arch/arm/configs/sp7021_defconfig | 2 +-
arch/arm/configs/vf610m4_defconfig | 2 +-
arch/mips/configs/ath25_defconfig | 2 +-
arch/mips/configs/bmips_stb_defconfig | 2 +-
arch/openrisc/configs/simple_smp_defconfig | 2 +-
arch/powerpc/configs/skiroot_defconfig | 2 +-
arch/riscv/configs/nommu_k210_defconfig | 2 +-
arch/riscv/configs/nommu_virt_defconfig | 2 +-
arch/sh/configs/sdk7786_defconfig | 2 +-
arch/xtensa/configs/cadence_csp_defconfig | 2 +-
arch/xtensa/configs/nommu_kc705_defconfig | 2 +-
usr/Kconfig | 4 ++--
15 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig
index f2abada5036a..af891a2b2d6c 100644
--- a/arch/arm/configs/aspeed_g4_defconfig
+++ b/arch/arm/configs/aspeed_g4_defconfig
@@ -9,7 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
CONFIG_CGROUPS=y
CONFIG_NAMESPACES=y
CONFIG_INITRAMFS=y
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_EXPERT=y
diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig
index 7098a09fefb8..a16aed0abcaa 100644
--- a/arch/arm/configs/aspeed_g5_defconfig
+++ b/arch/arm/configs/aspeed_g5_defconfig
@@ -9,7 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
CONFIG_CGROUPS=y
CONFIG_NAMESPACES=y
CONFIG_INITRAMFS=y
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_EXPERT=y
diff --git a/arch/arm/configs/lpc18xx_defconfig b/arch/arm/configs/lpc18xx_defconfig
index c8f7fa140225..abde171f1742 100644
--- a/arch/arm/configs/lpc18xx_defconfig
+++ b/arch/arm/configs/lpc18xx_defconfig
@@ -1,7 +1,7 @@
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_INITRAMFS=y
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
diff --git a/arch/arm/configs/sp7021_defconfig b/arch/arm/configs/sp7021_defconfig
index 30cfafc49ec9..4f5cd0d0511d 100644
--- a/arch/arm/configs/sp7021_defconfig
+++ b/arch/arm/configs/sp7021_defconfig
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
diff --git a/arch/arm/configs/vf610m4_defconfig b/arch/arm/configs/vf610m4_defconfig
index b253d76e0d40..9e6175467998 100644
--- a/arch/arm/configs/vf610m4_defconfig
+++ b/arch/arm/configs/vf610m4_defconfig
@@ -1,6 +1,6 @@
CONFIG_NAMESPACES=y
CONFIG_INITRAMFS=y
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/mips/configs/ath25_defconfig b/arch/mips/configs/ath25_defconfig
index 58ae5f9726a0..7c1ec18b0eeb 100644
--- a/arch/mips/configs/ath25_defconfig
+++ b/arch/mips/configs/ath25_defconfig
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/mips/configs/bmips_stb_defconfig b/arch/mips/configs/bmips_stb_defconfig
index 2217a3ca5b72..6ccb53279345 100644
--- a/arch/mips/configs/bmips_stb_defconfig
+++ b/arch/mips/configs/bmips_stb_defconfig
@@ -15,7 +15,7 @@ CONFIG_NR_CPUS=4
# CONFIG_SECCOMP is not set
CONFIG_MIPS_O32_FP64_SUPPORT=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZMA is not set
CONFIG_RD_XZ=y
# CONFIG_RD_LZO is not set
diff --git a/arch/openrisc/configs/simple_smp_defconfig b/arch/openrisc/configs/simple_smp_defconfig
index e4aaaeaec7a8..ba6f06c29fed 100644
--- a/arch/openrisc/configs/simple_smp_defconfig
+++ b/arch/openrisc/configs/simple_smp_defconfig
@@ -3,7 +3,7 @@ CONFIG_NO_HZ=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
index 9a6ef1d8ca44..a5b30aba9ac1 100644
--- a/arch/powerpc/configs/skiroot_defconfig
+++ b/arch/powerpc/configs/skiroot_defconfig
@@ -11,7 +11,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=20
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig
index a1fa77563bb8..bc0df803ecaa 100644
--- a/arch/riscv/configs/nommu_k210_defconfig
+++ b/arch/riscv/configs/nommu_k210_defconfig
@@ -2,7 +2,7 @@
CONFIG_LOG_BUF_SHIFT=13
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
diff --git a/arch/riscv/configs/nommu_virt_defconfig b/arch/riscv/configs/nommu_virt_defconfig
index d777e4a774bd..1291e21b7ce5 100644
--- a/arch/riscv/configs/nommu_virt_defconfig
+++ b/arch/riscv/configs/nommu_virt_defconfig
@@ -1,7 +1,7 @@
# CONFIG_CPU_ISOLATION is not set
CONFIG_LOG_BUF_SHIFT=16
CONFIG_INITRAMFS=y
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
diff --git a/arch/sh/configs/sdk7786_defconfig b/arch/sh/configs/sdk7786_defconfig
index dd0ef63a0064..2c339b2111fe 100644
--- a/arch/sh/configs/sdk7786_defconfig
+++ b/arch/sh/configs/sdk7786_defconfig
@@ -27,7 +27,7 @@ CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_INITRAMFS=y
-CONFIG_RD_BZIP2=y
+CONFIG_INITRAMFS_DECOMPRESS_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_LZO=y
# CONFIG_COMPAT_BRK is not set
diff --git a/arch/xtensa/configs/cadence_csp_defconfig b/arch/xtensa/configs/cadence_csp_defconfig
index 788274247b03..06d82e725e64 100644
--- a/arch/xtensa/configs/cadence_csp_defconfig
+++ b/arch/xtensa/configs/cadence_csp_defconfig
@@ -14,7 +14,7 @@ CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
CONFIG_INITRAMFS=y
CONFIG_INITRAMFS_SOURCE="$$KERNEL_INITRAMFS_SOURCE"
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
diff --git a/arch/xtensa/configs/nommu_kc705_defconfig b/arch/xtensa/configs/nommu_kc705_defconfig
index 5050b3e5e1be..cde2ae3ca4b1 100644
--- a/arch/xtensa/configs/nommu_kc705_defconfig
+++ b/arch/xtensa/configs/nommu_kc705_defconfig
@@ -15,7 +15,7 @@ CONFIG_NAMESPACES=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
CONFIG_INITRAMFS=y
-# CONFIG_RD_BZIP2 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
diff --git a/usr/Kconfig b/usr/Kconfig
index cf3c7539e3dc..325c2d95eb74 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -60,7 +60,7 @@ config INITRAMFS_DECOMPRESS_GZIP
Support loading of a gzip encoded initial ramfs.
If unsure, say Y.
-config RD_BZIP2
+config INITRAMFS_DECOMPRESS_BZIP2
bool "Support initial ramfs compressed using bzip2"
default y
select DECOMPRESS_BZIP2
@@ -144,7 +144,7 @@ config INITRAMFS_COMPRESSION_GZIP
config INITRAMFS_COMPRESSION_BZIP2
bool "Bzip2"
- depends on RD_BZIP2
+ depends on INITRAMFS_DECOMPRESS_BZIP2
help
It's compression ratio and speed is intermediate. Decompression speed
is slowest among the choices. The initramfs size is about 10% smaller
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 58/62] init: rename CONFIG_RD_LZMA to CONFIG_INITRAMFS_DECOMPRESS_LZMA
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (57 preceding siblings ...)
2025-09-14 4:01 ` [PATCH RESEND 57/62] init: rename CONFIG_RD_BZIP2 to CONFIG_INITRAMFS_DECOMPRESS_BZIP2 Askar Safin
@ 2025-09-14 4:02 ` Askar Safin
2025-09-14 4:03 ` [PATCH RESEND 59/62] init: rename CONFIG_RD_XZ to CONFIG_INITRAMFS_DECOMPRESS_XZ Askar Safin
` (9 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 4:02 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Initrd support was removed,
and CONFIG_RD_LZMA has nothing to do with ramdisks.
Update your configs
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/configs/clps711x_defconfig | 2 +-
arch/arm/configs/hisi_defconfig | 2 +-
arch/arm/configs/lpc18xx_defconfig | 2 +-
arch/arm/configs/sp7021_defconfig | 2 +-
arch/arm/configs/vf610m4_defconfig | 2 +-
arch/mips/configs/bmips_stb_defconfig | 2 +-
arch/openrisc/configs/simple_smp_defconfig | 2 +-
arch/powerpc/configs/44x/fsp2_defconfig | 2 +-
arch/powerpc/configs/skiroot_defconfig | 2 +-
arch/riscv/configs/nommu_k210_defconfig | 2 +-
arch/riscv/configs/nommu_virt_defconfig | 2 +-
arch/sh/configs/sdk7786_defconfig | 2 +-
arch/xtensa/configs/cadence_csp_defconfig | 2 +-
arch/xtensa/configs/nommu_kc705_defconfig | 2 +-
usr/Kconfig | 4 ++--
15 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/arm/configs/clps711x_defconfig b/arch/arm/configs/clps711x_defconfig
index 4d71d227361f..18ae5ee9d6c9 100644
--- a/arch/arm/configs/clps711x_defconfig
+++ b/arch/arm/configs/clps711x_defconfig
@@ -2,7 +2,7 @@ CONFIG_KERNEL_LZMA=y
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_INITRAMFS=y
-CONFIG_RD_LZMA=y
+CONFIG_INITRAMFS_DECOMPRESS_LZMA=y
CONFIG_EXPERT=y
CONFIG_JUMP_LABEL=y
CONFIG_PARTITION_ADVANCED=y
diff --git a/arch/arm/configs/hisi_defconfig b/arch/arm/configs/hisi_defconfig
index fe18af17b7cc..19816374a0d0 100644
--- a/arch/arm/configs/hisi_defconfig
+++ b/arch/arm/configs/hisi_defconfig
@@ -2,7 +2,7 @@ CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_INITRAMFS=y
-CONFIG_RD_LZMA=y
+CONFIG_INITRAMFS_DECOMPRESS_LZMA=y
CONFIG_ARCH_HISI=y
CONFIG_ARCH_HI3xxx=y
CONFIG_ARCH_HIP01=y
diff --git a/arch/arm/configs/lpc18xx_defconfig b/arch/arm/configs/lpc18xx_defconfig
index abde171f1742..b1d5d8e4d7fe 100644
--- a/arch/arm/configs/lpc18xx_defconfig
+++ b/arch/arm/configs/lpc18xx_defconfig
@@ -2,7 +2,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/arm/configs/sp7021_defconfig b/arch/arm/configs/sp7021_defconfig
index 4f5cd0d0511d..cfb20e693e1e 100644
--- a/arch/arm/configs/sp7021_defconfig
+++ b/arch/arm/configs/sp7021_defconfig
@@ -7,7 +7,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/arm/configs/vf610m4_defconfig b/arch/arm/configs/vf610m4_defconfig
index 9e6175467998..9b20db4bb8e6 100644
--- a/arch/arm/configs/vf610m4_defconfig
+++ b/arch/arm/configs/vf610m4_defconfig
@@ -1,7 +1,7 @@
CONFIG_NAMESPACES=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZ4 is not set
CONFIG_EXPERT=y
diff --git a/arch/mips/configs/bmips_stb_defconfig b/arch/mips/configs/bmips_stb_defconfig
index 6ccb53279345..300e67507a1f 100644
--- a/arch/mips/configs/bmips_stb_defconfig
+++ b/arch/mips/configs/bmips_stb_defconfig
@@ -16,7 +16,7 @@ CONFIG_NR_CPUS=4
CONFIG_MIPS_O32_FP64_SUPPORT=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
CONFIG_RD_XZ=y
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/openrisc/configs/simple_smp_defconfig b/arch/openrisc/configs/simple_smp_defconfig
index ba6f06c29fed..5e46664549ec 100644
--- a/arch/openrisc/configs/simple_smp_defconfig
+++ b/arch/openrisc/configs/simple_smp_defconfig
@@ -4,7 +4,7 @@ CONFIG_LOG_BUF_SHIFT=14
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/powerpc/configs/44x/fsp2_defconfig b/arch/powerpc/configs/44x/fsp2_defconfig
index 696f63bbc56e..038a261ebc20 100644
--- a/arch/powerpc/configs/44x/fsp2_defconfig
+++ b/arch/powerpc/configs/44x/fsp2_defconfig
@@ -9,7 +9,7 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_INITRAMFS=y
-# CONFIG_RD_LZMA is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
index a5b30aba9ac1..008a63a90330 100644
--- a/arch/powerpc/configs/skiroot_defconfig
+++ b/arch/powerpc/configs/skiroot_defconfig
@@ -12,7 +12,7 @@ CONFIG_LOG_BUF_SHIFT=20
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig
index bc0df803ecaa..282b889596a1 100644
--- a/arch/riscv/configs/nommu_k210_defconfig
+++ b/arch/riscv/configs/nommu_k210_defconfig
@@ -3,7 +3,7 @@ CONFIG_LOG_BUF_SHIFT=13
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/riscv/configs/nommu_virt_defconfig b/arch/riscv/configs/nommu_virt_defconfig
index 1291e21b7ce5..e9231eadcbad 100644
--- a/arch/riscv/configs/nommu_virt_defconfig
+++ b/arch/riscv/configs/nommu_virt_defconfig
@@ -2,7 +2,7 @@
CONFIG_LOG_BUF_SHIFT=16
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/sh/configs/sdk7786_defconfig b/arch/sh/configs/sdk7786_defconfig
index 2c339b2111fe..f19e9915e6de 100644
--- a/arch/sh/configs/sdk7786_defconfig
+++ b/arch/sh/configs/sdk7786_defconfig
@@ -28,7 +28,7 @@ CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_INITRAMFS=y
CONFIG_INITRAMFS_DECOMPRESS_BZIP2=y
-CONFIG_RD_LZMA=y
+CONFIG_INITRAMFS_DECOMPRESS_LZMA=y
CONFIG_RD_LZO=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
diff --git a/arch/xtensa/configs/cadence_csp_defconfig b/arch/xtensa/configs/cadence_csp_defconfig
index 06d82e725e64..6b38ba64a2aa 100644
--- a/arch/xtensa/configs/cadence_csp_defconfig
+++ b/arch/xtensa/configs/cadence_csp_defconfig
@@ -15,7 +15,7 @@ CONFIG_RELAY=y
CONFIG_INITRAMFS=y
CONFIG_INITRAMFS_SOURCE="$$KERNEL_INITRAMFS_SOURCE"
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/arch/xtensa/configs/nommu_kc705_defconfig b/arch/xtensa/configs/nommu_kc705_defconfig
index cde2ae3ca4b1..9b260f57e63f 100644
--- a/arch/xtensa/configs/nommu_kc705_defconfig
+++ b/arch/xtensa/configs/nommu_kc705_defconfig
@@ -16,7 +16,7 @@ CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
diff --git a/usr/Kconfig b/usr/Kconfig
index 325c2d95eb74..030c6a898d7a 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -68,7 +68,7 @@ config INITRAMFS_DECOMPRESS_BZIP2
Support loading of a bzip2 encoded initial ramfs.
If unsure, say N.
-config RD_LZMA
+config INITRAMFS_DECOMPRESS_LZMA
bool "Support initial ramfs compressed using LZMA"
default y
select DECOMPRESS_LZMA
@@ -157,7 +157,7 @@ config INITRAMFS_COMPRESSION_BZIP2
config INITRAMFS_COMPRESSION_LZMA
bool "LZMA"
- depends on RD_LZMA
+ depends on INITRAMFS_DECOMPRESS_LZMA
help
This algorithm's compression ratio is best but has a large dictionary
size which might cause issues in memory constrained systems.
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 59/62] init: rename CONFIG_RD_XZ to CONFIG_INITRAMFS_DECOMPRESS_XZ
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (58 preceding siblings ...)
2025-09-14 4:02 ` [PATCH RESEND 58/62] init: rename CONFIG_RD_LZMA to CONFIG_INITRAMFS_DECOMPRESS_LZMA Askar Safin
@ 2025-09-14 4:03 ` Askar Safin
2025-09-14 4:03 ` [PATCH RESEND 60/62] init: rename CONFIG_RD_LZO to CONFIG_INITRAMFS_DECOMPRESS_LZO Askar Safin
` (8 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 4:03 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Initrd support was removed,
and CONFIG_RD_XZ has nothing to do with ramdisks.
Update your configs
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/configs/lpc18xx_defconfig | 2 +-
arch/arm/configs/sp7021_defconfig | 2 +-
arch/arm/configs/vf610m4_defconfig | 2 +-
arch/mips/configs/ath25_defconfig | 2 +-
arch/mips/configs/bmips_stb_defconfig | 2 +-
arch/openrisc/configs/simple_smp_defconfig | 2 +-
arch/powerpc/configs/44x/fsp2_defconfig | 2 +-
arch/riscv/configs/nommu_k210_defconfig | 2 +-
arch/riscv/configs/nommu_virt_defconfig | 2 +-
arch/xtensa/configs/cadence_csp_defconfig | 2 +-
arch/xtensa/configs/nommu_kc705_defconfig | 2 +-
usr/Kconfig | 4 ++--
12 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/arch/arm/configs/lpc18xx_defconfig b/arch/arm/configs/lpc18xx_defconfig
index b1d5d8e4d7fe..816586530ff5 100644
--- a/arch/arm/configs/lpc18xx_defconfig
+++ b/arch/arm/configs/lpc18xx_defconfig
@@ -3,7 +3,7 @@ CONFIG_PREEMPT=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
-# CONFIG_RD_XZ is not set
+# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
diff --git a/arch/arm/configs/sp7021_defconfig b/arch/arm/configs/sp7021_defconfig
index cfb20e693e1e..2d9bbda67e85 100644
--- a/arch/arm/configs/sp7021_defconfig
+++ b/arch/arm/configs/sp7021_defconfig
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=14
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
-# CONFIG_RD_XZ is not set
+# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
diff --git a/arch/arm/configs/vf610m4_defconfig b/arch/arm/configs/vf610m4_defconfig
index 9b20db4bb8e6..7d457a196dfc 100644
--- a/arch/arm/configs/vf610m4_defconfig
+++ b/arch/arm/configs/vf610m4_defconfig
@@ -2,7 +2,7 @@ CONFIG_NAMESPACES=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
-# CONFIG_RD_XZ is not set
+# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_RD_LZ4 is not set
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
diff --git a/arch/mips/configs/ath25_defconfig b/arch/mips/configs/ath25_defconfig
index 7c1ec18b0eeb..e401b29ce706 100644
--- a/arch/mips/configs/ath25_defconfig
+++ b/arch/mips/configs/ath25_defconfig
@@ -5,7 +5,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_XZ is not set
+# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
diff --git a/arch/mips/configs/bmips_stb_defconfig b/arch/mips/configs/bmips_stb_defconfig
index 300e67507a1f..072bfdc87771 100644
--- a/arch/mips/configs/bmips_stb_defconfig
+++ b/arch/mips/configs/bmips_stb_defconfig
@@ -17,7 +17,7 @@ CONFIG_MIPS_O32_FP64_SUPPORT=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
-CONFIG_RD_XZ=y
+CONFIG_INITRAMFS_DECOMPRESS_XZ=y
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_PCI=y
diff --git a/arch/openrisc/configs/simple_smp_defconfig b/arch/openrisc/configs/simple_smp_defconfig
index 5e46664549ec..7080bdedea01 100644
--- a/arch/openrisc/configs/simple_smp_defconfig
+++ b/arch/openrisc/configs/simple_smp_defconfig
@@ -5,7 +5,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
-# CONFIG_RD_XZ is not set
+# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_EXPERT=y
diff --git a/arch/powerpc/configs/44x/fsp2_defconfig b/arch/powerpc/configs/44x/fsp2_defconfig
index 038a261ebc20..ffb345222649 100644
--- a/arch/powerpc/configs/44x/fsp2_defconfig
+++ b/arch/powerpc/configs/44x/fsp2_defconfig
@@ -10,7 +10,7 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
-# CONFIG_RD_XZ is not set
+# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_KALLSYMS_ALL=y
diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig
index 282b889596a1..10ffb9ea40bd 100644
--- a/arch/riscv/configs/nommu_k210_defconfig
+++ b/arch/riscv/configs/nommu_k210_defconfig
@@ -4,7 +4,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
-# CONFIG_RD_XZ is not set
+# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
# CONFIG_RD_ZSTD is not set
diff --git a/arch/riscv/configs/nommu_virt_defconfig b/arch/riscv/configs/nommu_virt_defconfig
index e9231eadcbad..9383e3445ead 100644
--- a/arch/riscv/configs/nommu_virt_defconfig
+++ b/arch/riscv/configs/nommu_virt_defconfig
@@ -3,7 +3,7 @@ CONFIG_LOG_BUF_SHIFT=16
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
-# CONFIG_RD_XZ is not set
+# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
diff --git a/arch/xtensa/configs/cadence_csp_defconfig b/arch/xtensa/configs/cadence_csp_defconfig
index 6b38ba64a2aa..f102ed913e9b 100644
--- a/arch/xtensa/configs/cadence_csp_defconfig
+++ b/arch/xtensa/configs/cadence_csp_defconfig
@@ -16,7 +16,7 @@ CONFIG_INITRAMFS=y
CONFIG_INITRAMFS_SOURCE="$$KERNEL_INITRAMFS_SOURCE"
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
-# CONFIG_RD_XZ is not set
+# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
diff --git a/arch/xtensa/configs/nommu_kc705_defconfig b/arch/xtensa/configs/nommu_kc705_defconfig
index 9b260f57e63f..d3916408eaf6 100644
--- a/arch/xtensa/configs/nommu_kc705_defconfig
+++ b/arch/xtensa/configs/nommu_kc705_defconfig
@@ -17,7 +17,7 @@ CONFIG_RELAY=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
-# CONFIG_RD_XZ is not set
+# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_EXPERT=y
diff --git a/usr/Kconfig b/usr/Kconfig
index 030c6a898d7a..69f95a5a1847 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -76,7 +76,7 @@ config INITRAMFS_DECOMPRESS_LZMA
Support loading of a LZMA encoded initial ramfs.
If unsure, say N.
-config RD_XZ
+config INITRAMFS_DECOMPRESS_XZ
bool "Support initial ramfs compressed using XZ"
default y
select DECOMPRESS_XZ
@@ -170,7 +170,7 @@ config INITRAMFS_COMPRESSION_LZMA
config INITRAMFS_COMPRESSION_XZ
bool "XZ"
- depends on RD_XZ
+ depends on INITRAMFS_DECOMPRESS_XZ
help
XZ uses the LZMA2 algorithm and has a large dictionary which may cause
problems on memory constrained systems. The initramfs size is about
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 60/62] init: rename CONFIG_RD_LZO to CONFIG_INITRAMFS_DECOMPRESS_LZO
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (59 preceding siblings ...)
2025-09-14 4:03 ` [PATCH RESEND 59/62] init: rename CONFIG_RD_XZ to CONFIG_INITRAMFS_DECOMPRESS_XZ Askar Safin
@ 2025-09-14 4:03 ` Askar Safin
2025-09-14 4:04 ` [PATCH RESEND 61/62] init: rename CONFIG_RD_LZ4 to CONFIG_INITRAMFS_DECOMPRESS_LZ4 Askar Safin
` (7 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 4:03 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Initrd support was removed,
and CONFIG_RD_LZO has nothing to do with ramdisks.
Update your configs
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/configs/aspeed_g4_defconfig | 2 +-
arch/arm/configs/aspeed_g5_defconfig | 2 +-
arch/arm/configs/lpc18xx_defconfig | 2 +-
arch/arm/configs/sp7021_defconfig | 2 +-
arch/mips/configs/ath25_defconfig | 2 +-
arch/mips/configs/bmips_stb_defconfig | 2 +-
arch/openrisc/configs/simple_smp_defconfig | 2 +-
arch/powerpc/configs/44x/fsp2_defconfig | 2 +-
arch/powerpc/configs/skiroot_defconfig | 2 +-
arch/riscv/configs/nommu_k210_defconfig | 2 +-
arch/riscv/configs/nommu_virt_defconfig | 2 +-
arch/sh/configs/sdk7786_defconfig | 2 +-
arch/xtensa/configs/cadence_csp_defconfig | 2 +-
arch/xtensa/configs/nommu_kc705_defconfig | 2 +-
usr/Kconfig | 4 ++--
15 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig
index af891a2b2d6c..2b22ce99e42d 100644
--- a/arch/arm/configs/aspeed_g4_defconfig
+++ b/arch/arm/configs/aspeed_g4_defconfig
@@ -10,7 +10,7 @@ CONFIG_CGROUPS=y
CONFIG_NAMESPACES=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_EXPERT=y
# CONFIG_UID16 is not set
diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig
index a16aed0abcaa..764fde3d416b 100644
--- a/arch/arm/configs/aspeed_g5_defconfig
+++ b/arch/arm/configs/aspeed_g5_defconfig
@@ -10,7 +10,7 @@ CONFIG_CGROUPS=y
CONFIG_NAMESPACES=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_EXPERT=y
# CONFIG_UID16 is not set
diff --git a/arch/arm/configs/lpc18xx_defconfig b/arch/arm/configs/lpc18xx_defconfig
index 816586530ff5..b14ebbe5b023 100644
--- a/arch/arm/configs/lpc18xx_defconfig
+++ b/arch/arm/configs/lpc18xx_defconfig
@@ -4,7 +4,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_UID16 is not set
diff --git a/arch/arm/configs/sp7021_defconfig b/arch/arm/configs/sp7021_defconfig
index 2d9bbda67e85..e65c94f24341 100644
--- a/arch/arm/configs/sp7021_defconfig
+++ b/arch/arm/configs/sp7021_defconfig
@@ -9,7 +9,7 @@ CONFIG_LOG_BUF_SHIFT=14
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_PERF_EVENTS=y
diff --git a/arch/mips/configs/ath25_defconfig b/arch/mips/configs/ath25_defconfig
index e401b29ce706..baf32dfe8295 100644
--- a/arch/mips/configs/ath25_defconfig
+++ b/arch/mips/configs/ath25_defconfig
@@ -6,7 +6,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_FHANDLE is not set
diff --git a/arch/mips/configs/bmips_stb_defconfig b/arch/mips/configs/bmips_stb_defconfig
index 072bfdc87771..44830de10527 100644
--- a/arch/mips/configs/bmips_stb_defconfig
+++ b/arch/mips/configs/bmips_stb_defconfig
@@ -18,7 +18,7 @@ CONFIG_MIPS_O32_FP64_SUPPORT=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
CONFIG_INITRAMFS_DECOMPRESS_XZ=y
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_PCI=y
CONFIG_PCI_MSI=y
diff --git a/arch/openrisc/configs/simple_smp_defconfig b/arch/openrisc/configs/simple_smp_defconfig
index 7080bdedea01..9f4bb9d940f0 100644
--- a/arch/openrisc/configs/simple_smp_defconfig
+++ b/arch/openrisc/configs/simple_smp_defconfig
@@ -6,7 +6,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
diff --git a/arch/powerpc/configs/44x/fsp2_defconfig b/arch/powerpc/configs/44x/fsp2_defconfig
index ffb345222649..e5e4f6721728 100644
--- a/arch/powerpc/configs/44x/fsp2_defconfig
+++ b/arch/powerpc/configs/44x/fsp2_defconfig
@@ -11,7 +11,7 @@ CONFIG_LOG_BUF_SHIFT=16
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_KALLSYMS_ALL=y
CONFIG_BPF_SYSCALL=y
diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
index 008a63a90330..fc1a718af17a 100644
--- a/arch/powerpc/configs/skiroot_defconfig
+++ b/arch/powerpc/configs/skiroot_defconfig
@@ -13,7 +13,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_GZIP is not set
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig
index 10ffb9ea40bd..7507045e9c4a 100644
--- a/arch/riscv/configs/nommu_k210_defconfig
+++ b/arch/riscv/configs/nommu_k210_defconfig
@@ -5,7 +5,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
# CONFIG_RD_ZSTD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
diff --git a/arch/riscv/configs/nommu_virt_defconfig b/arch/riscv/configs/nommu_virt_defconfig
index 9383e3445ead..afa79217f06e 100644
--- a/arch/riscv/configs/nommu_virt_defconfig
+++ b/arch/riscv/configs/nommu_virt_defconfig
@@ -4,7 +4,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
diff --git a/arch/sh/configs/sdk7786_defconfig b/arch/sh/configs/sdk7786_defconfig
index f19e9915e6de..7465ebf36df2 100644
--- a/arch/sh/configs/sdk7786_defconfig
+++ b/arch/sh/configs/sdk7786_defconfig
@@ -29,7 +29,7 @@ CONFIG_NET_NS=y
CONFIG_INITRAMFS=y
CONFIG_INITRAMFS_DECOMPRESS_BZIP2=y
CONFIG_INITRAMFS_DECOMPRESS_LZMA=y
-CONFIG_RD_LZO=y
+CONFIG_INITRAMFS_DECOMPRESS_LZO=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
CONFIG_KPROBES=y
diff --git a/arch/xtensa/configs/cadence_csp_defconfig b/arch/xtensa/configs/cadence_csp_defconfig
index f102ed913e9b..dad9383c6deb 100644
--- a/arch/xtensa/configs/cadence_csp_defconfig
+++ b/arch/xtensa/configs/cadence_csp_defconfig
@@ -17,7 +17,7 @@ CONFIG_INITRAMFS_SOURCE="$$KERNEL_INITRAMFS_SOURCE"
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
diff --git a/arch/xtensa/configs/nommu_kc705_defconfig b/arch/xtensa/configs/nommu_kc705_defconfig
index d3916408eaf6..0a0e94ae7b1c 100644
--- a/arch/xtensa/configs/nommu_kc705_defconfig
+++ b/arch/xtensa/configs/nommu_kc705_defconfig
@@ -18,7 +18,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
-# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
diff --git a/usr/Kconfig b/usr/Kconfig
index 69f95a5a1847..62c978018565 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -84,7 +84,7 @@ config INITRAMFS_DECOMPRESS_XZ
Support loading of a XZ encoded initial ramfs.
If unsure, say N.
-config RD_LZO
+config INITRAMFS_DECOMPRESS_LZO
bool "Support initial ramfs compressed using LZO"
default y
select DECOMPRESS_LZO
@@ -183,7 +183,7 @@ config INITRAMFS_COMPRESSION_XZ
config INITRAMFS_COMPRESSION_LZO
bool "LZO"
- depends on RD_LZO
+ depends on INITRAMFS_DECOMPRESS_LZO
help
Its compression ratio is the second poorest amongst the choices. The
kernel size is about 10% bigger than gzip. Despite that, its
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 61/62] init: rename CONFIG_RD_LZ4 to CONFIG_INITRAMFS_DECOMPRESS_LZ4
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (60 preceding siblings ...)
2025-09-14 4:03 ` [PATCH RESEND 60/62] init: rename CONFIG_RD_LZO to CONFIG_INITRAMFS_DECOMPRESS_LZO Askar Safin
@ 2025-09-14 4:04 ` Askar Safin
2025-09-14 4:04 ` [PATCH RESEND 62/62] init: rename CONFIG_RD_ZSTD to CONFIG_INITRAMFS_DECOMPRESS_ZSTD Askar Safin
` (6 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 4:04 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Initrd support was removed,
and CONFIG_RD_LZ4 has nothing to do with ramdisks.
Update your configs
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/arm/configs/aspeed_g4_defconfig | 2 +-
arch/arm/configs/aspeed_g5_defconfig | 2 +-
arch/arm/configs/lpc18xx_defconfig | 2 +-
arch/arm/configs/sp7021_defconfig | 2 +-
arch/arm/configs/vf610m4_defconfig | 2 +-
arch/mips/configs/ath25_defconfig | 2 +-
arch/mips/configs/bmips_stb_defconfig | 2 +-
arch/openrisc/configs/simple_smp_defconfig | 2 +-
arch/powerpc/configs/44x/fsp2_defconfig | 2 +-
arch/powerpc/configs/skiroot_defconfig | 2 +-
arch/riscv/configs/nommu_k210_defconfig | 2 +-
arch/riscv/configs/nommu_virt_defconfig | 2 +-
arch/xtensa/configs/cadence_csp_defconfig | 2 +-
arch/xtensa/configs/nommu_kc705_defconfig | 2 +-
usr/Kconfig | 4 ++--
15 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig
index 2b22ce99e42d..a65bdc6e6c2f 100644
--- a/arch/arm/configs/aspeed_g4_defconfig
+++ b/arch/arm/configs/aspeed_g4_defconfig
@@ -11,7 +11,7 @@ CONFIG_NAMESPACES=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_EXPERT=y
# CONFIG_UID16 is not set
# CONFIG_SYSFS_SYSCALL is not set
diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig
index 764fde3d416b..24954645c34f 100644
--- a/arch/arm/configs/aspeed_g5_defconfig
+++ b/arch/arm/configs/aspeed_g5_defconfig
@@ -11,7 +11,7 @@ CONFIG_NAMESPACES=y
CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_EXPERT=y
# CONFIG_UID16 is not set
# CONFIG_SYSFS_SYSCALL is not set
diff --git a/arch/arm/configs/lpc18xx_defconfig b/arch/arm/configs/lpc18xx_defconfig
index b14ebbe5b023..4dee6346a6a8 100644
--- a/arch/arm/configs/lpc18xx_defconfig
+++ b/arch/arm/configs/lpc18xx_defconfig
@@ -5,7 +5,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_UID16 is not set
CONFIG_BASE_SMALL=y
diff --git a/arch/arm/configs/sp7021_defconfig b/arch/arm/configs/sp7021_defconfig
index e65c94f24341..6b1166cbf478 100644
--- a/arch/arm/configs/sp7021_defconfig
+++ b/arch/arm/configs/sp7021_defconfig
@@ -10,7 +10,7 @@ CONFIG_LOG_BUF_SHIFT=14
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_PERF_EVENTS=y
CONFIG_ARCH_SUNPLUS=y
diff --git a/arch/arm/configs/vf610m4_defconfig b/arch/arm/configs/vf610m4_defconfig
index 7d457a196dfc..acec039e2f16 100644
--- a/arch/arm/configs/vf610m4_defconfig
+++ b/arch/arm/configs/vf610m4_defconfig
@@ -3,7 +3,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_MMU is not set
diff --git a/arch/mips/configs/ath25_defconfig b/arch/mips/configs/ath25_defconfig
index baf32dfe8295..5e84ee24e372 100644
--- a/arch/mips/configs/ath25_defconfig
+++ b/arch/mips/configs/ath25_defconfig
@@ -7,7 +7,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_FHANDLE is not set
# CONFIG_AIO is not set
diff --git a/arch/mips/configs/bmips_stb_defconfig b/arch/mips/configs/bmips_stb_defconfig
index 44830de10527..b5fb138bf237 100644
--- a/arch/mips/configs/bmips_stb_defconfig
+++ b/arch/mips/configs/bmips_stb_defconfig
@@ -19,7 +19,7 @@ CONFIG_MIPS_O32_FP64_SUPPORT=y
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
CONFIG_INITRAMFS_DECOMPRESS_XZ=y
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_PCI=y
CONFIG_PCI_MSI=y
CONFIG_PCIEASPM_POWERSAVE=y
diff --git a/arch/openrisc/configs/simple_smp_defconfig b/arch/openrisc/configs/simple_smp_defconfig
index 9f4bb9d940f0..5265f6f940a5 100644
--- a/arch/openrisc/configs/simple_smp_defconfig
+++ b/arch/openrisc/configs/simple_smp_defconfig
@@ -7,7 +7,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_EXPERT=y
# CONFIG_KALLSYMS is not set
# CONFIG_EPOLL is not set
diff --git a/arch/powerpc/configs/44x/fsp2_defconfig b/arch/powerpc/configs/44x/fsp2_defconfig
index e5e4f6721728..34486aa5155f 100644
--- a/arch/powerpc/configs/44x/fsp2_defconfig
+++ b/arch/powerpc/configs/44x/fsp2_defconfig
@@ -12,7 +12,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_KALLSYMS_ALL=y
CONFIG_BPF_SYSCALL=y
CONFIG_EXPERT=y
diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
index fc1a718af17a..d159882484f6 100644
--- a/arch/powerpc/configs/skiroot_defconfig
+++ b/arch/powerpc/configs/skiroot_defconfig
@@ -14,7 +14,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_BZIP2 is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
# CONFIG_SGETMASK_SYSCALL is not set
diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig
index 7507045e9c4a..6e961256a941 100644
--- a/arch/riscv/configs/nommu_k210_defconfig
+++ b/arch/riscv/configs/nommu_k210_defconfig
@@ -6,7 +6,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
# CONFIG_RD_ZSTD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_SYSFS_SYSCALL is not set
diff --git a/arch/riscv/configs/nommu_virt_defconfig b/arch/riscv/configs/nommu_virt_defconfig
index afa79217f06e..eb289c44dfc3 100644
--- a/arch/riscv/configs/nommu_virt_defconfig
+++ b/arch/riscv/configs/nommu_virt_defconfig
@@ -5,7 +5,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
# CONFIG_SYSFS_SYSCALL is not set
diff --git a/arch/xtensa/configs/cadence_csp_defconfig b/arch/xtensa/configs/cadence_csp_defconfig
index dad9383c6deb..26a4a9f3886a 100644
--- a/arch/xtensa/configs/cadence_csp_defconfig
+++ b/arch/xtensa/configs/cadence_csp_defconfig
@@ -18,7 +18,7 @@ CONFIG_INITRAMFS_SOURCE="$$KERNEL_INITRAMFS_SOURCE"
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
CONFIG_PROFILING=y
diff --git a/arch/xtensa/configs/nommu_kc705_defconfig b/arch/xtensa/configs/nommu_kc705_defconfig
index 0a0e94ae7b1c..988998806661 100644
--- a/arch/xtensa/configs/nommu_kc705_defconfig
+++ b/arch/xtensa/configs/nommu_kc705_defconfig
@@ -19,7 +19,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_LZMA is not set
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
-# CONFIG_RD_LZ4 is not set
+# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PERF_EVENTS=y
diff --git a/usr/Kconfig b/usr/Kconfig
index 62c978018565..3a891a0c9ef4 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -92,7 +92,7 @@ config INITRAMFS_DECOMPRESS_LZO
Support loading of a LZO encoded initial ramfs.
If unsure, say N.
-config RD_LZ4
+config INITRAMFS_DECOMPRESS_LZ4
bool "Support initial ramfs compressed using LZ4"
default y
select DECOMPRESS_LZ4
@@ -195,7 +195,7 @@ config INITRAMFS_COMPRESSION_LZO
config INITRAMFS_COMPRESSION_LZ4
bool "LZ4"
- depends on RD_LZ4
+ depends on INITRAMFS_DECOMPRESS_LZ4
help
It's compression ratio is the poorest amongst the choices. The kernel
size is about 15% bigger than gzip; however its decompression speed
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* [PATCH RESEND 62/62] init: rename CONFIG_RD_ZSTD to CONFIG_INITRAMFS_DECOMPRESS_ZSTD
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (61 preceding siblings ...)
2025-09-14 4:04 ` [PATCH RESEND 61/62] init: rename CONFIG_RD_LZ4 to CONFIG_INITRAMFS_DECOMPRESS_LZ4 Askar Safin
@ 2025-09-14 4:04 ` Askar Safin
2025-09-14 4:19 ` [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (5 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 4:04 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Initrd support was removed,
and CONFIG_RD_ZSTD has nothing to do with ramdisks.
Update your configs
Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
arch/riscv/configs/nommu_k210_defconfig | 2 +-
usr/Kconfig | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig
index 6e961256a941..68cae0496b54 100644
--- a/arch/riscv/configs/nommu_k210_defconfig
+++ b/arch/riscv/configs/nommu_k210_defconfig
@@ -7,7 +7,7 @@ CONFIG_INITRAMFS=y
# CONFIG_INITRAMFS_DECOMPRESS_XZ is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZO is not set
# CONFIG_INITRAMFS_DECOMPRESS_LZ4 is not set
-# CONFIG_RD_ZSTD is not set
+# CONFIG_INITRAMFS_DECOMPRESS_ZSTD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_SYSFS_SYSCALL is not set
# CONFIG_FHANDLE is not set
diff --git a/usr/Kconfig b/usr/Kconfig
index 3a891a0c9ef4..06e1c1474b68 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -100,7 +100,7 @@ config INITRAMFS_DECOMPRESS_LZ4
Support loading of a LZ4 encoded initial ramfs.
If unsure, say N.
-config RD_ZSTD
+config INITRAMFS_DECOMPRESS_ZSTD
bool "Support initial ramfs compressed using ZSTD"
default y
select DECOMPRESS_ZSTD
@@ -206,7 +206,7 @@ config INITRAMFS_COMPRESSION_LZ4
config INITRAMFS_COMPRESSION_ZSTD
bool "ZSTD"
- depends on RD_ZSTD
+ depends on INITRAMFS_DECOMPRESS_ZSTD
help
ZSTD is a compression algorithm targeting intermediate compression
with fast decompression speed. It will compress better than GZIP and
--
2.47.2
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (62 preceding siblings ...)
2025-09-14 4:04 ` [PATCH RESEND 62/62] init: rename CONFIG_RD_ZSTD to CONFIG_INITRAMFS_DECOMPRESS_ZSTD Askar Safin
@ 2025-09-14 4:19 ` Askar Safin
2025-09-14 10:08 ` Krzysztof Kozlowski
` (4 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-14 4:19 UTC (permalink / raw)
To: safinaskar
Cc: akpm, andy.shevchenko, axboe, brauner, cyphar, devicetree,
ecurtin, email2tema, graf, gregkh, hca, hch, hsiangkao, initramfs,
jack, julian.stecklina, kees, linux-acpi, linux-alpha, linux-api,
linux-arch, linux-arm-kernel, linux-block, linux-csky, linux-doc,
linux-efi, linux-ext4, linux-fsdevel, linux-hexagon, linux-kernel,
linux-m68k, linux-mips, linux-openrisc, linux-parisc, linux-riscv,
linux-s390, linux-sh, linux-snps-arc, linux-um, linuxppc-dev,
loongarch, mcgrof, mingo, monstr, mzxreary, patches, rob,
sparclinux, thomas.weissschuh, thorsten.blum, torvalds, tytso,
viro, x86
Gmail banned me after first bunch of letters.
Just now I sent remaining letters.
So now the patchset is ready for review
--
Askar Safin
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (63 preceding siblings ...)
2025-09-14 4:19 ` [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
@ 2025-09-14 10:08 ` Krzysztof Kozlowski
2025-09-15 13:34 ` Christian Brauner
` (3 subsequent siblings)
68 siblings, 0 replies; 95+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-14 10:08 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
On 13/09/2025 02:37, Askar Safin wrote:
> Intro
> ====
> This patchset removes classic initrd (initial RAM disk) support,
> which was deprecated in 2020.
> Initramfs still stays, and RAM disk itself (brd) still stays, too.
> init/do_mounts* and init/*initramfs* are listed in VFS entry in
> MAINTAINERS, so I think this patchset should go through VFS tree.
No, DTS cannot go via VFS directory, that's a clear NAK.
For all other arch changes, are you sure you have everywhere actual
dependency so it has to be combined together? Rather please look how to
split it into logical bisectsble chunks, where some cleanups could be
made independent.
> This patchset touchs every subdirectory in arch/, so I tested it
> on 8 (!!!) archs in Qemu (see details below).
> Warning: this patchset renames CONFIG_BLK_DEV_INITRD (!!!) to CONFIG_INITRAMFS
> and CONFIG_RD_* to CONFIG_INITRAMFS_DECOMPRESS_* (for example,
> CONFIG_RD_GZIP to CONFIG_INITRAMFS_DECOMPRESS_GZIP).
> If you still use initrd, see below for workaround.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (64 preceding siblings ...)
2025-09-14 10:08 ` Krzysztof Kozlowski
@ 2025-09-15 13:34 ` Christian Brauner
2025-09-16 1:04 ` Askar Safin
2025-09-16 17:08 ` Jessica Clarke
` (2 subsequent siblings)
68 siblings, 1 reply; 95+ messages in thread
From: Christian Brauner @ 2025-09-15 13:34 UTC (permalink / raw)
To: Askar Safin
Cc: linux-fsdevel, linux-kernel, Linus Torvalds, Greg Kroah-Hartman,
Al Viro, Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
On Sat, Sep 13, 2025 at 12:37:39AM +0000, Askar Safin wrote:
> Intro
> ====
> This patchset removes classic initrd (initial RAM disk) support,
> which was deprecated in 2020.
This is a good idea but the patchset does a bit too much and it's pretty
convoluted and mixes cleanups with the removal of initrd support and so
it's not that great to review let alone merge especially considering
that a revert might be needed.
Split it up into multiple patch series. Send a first series that
focusses only on removing the generic infrastructure keeping it as
contained as possible. Only do non-generic cleanups that are absolutely
essential for the removal. Then the cleanups can go in separate series
later.
As usual I'm happy to try to shed old code but I wouldn't be too
optimistic that we'll get away with this and if so it needs to be
surgical.
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-15 13:34 ` Christian Brauner
@ 2025-09-16 1:04 ` Askar Safin
0 siblings, 0 replies; 95+ messages in thread
From: Askar Safin @ 2025-09-16 1:04 UTC (permalink / raw)
To: Christian Brauner
Cc: linux-fsdevel, linux-kernel, Linus Torvalds, Greg Kroah-Hartman,
Al Viro, Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Alexander Graf, Rob Landley,
Lennart Poettering, linux-arch, linux-alpha, linux-snps-arc,
linux-arm-kernel, linux-csky, linux-hexagon, loongarch,
linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
On Mon, Sep 15, 2025 at 4:34 PM Christian Brauner <brauner@kernel.org> wrote:
> Split it up into multiple patch series. Send a first series that
> focusses only on removing the generic infrastructure keeping it as
> contained as possible. Only do non-generic cleanups that are absolutely
> essential for the removal. Then the cleanups can go in separate series
> later.
Ok, I will do this.
I will send a minimal patchset with arch/ changes kept to absolute minimum
or even absent. Nearly all of the changes will be in init/ and docs.
Hopefully it will pass via the VFS tree.
If it gets to kernel release, I will consider sending more patchsets.
--
Askar Safin
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (65 preceding siblings ...)
2025-09-15 13:34 ` Christian Brauner
@ 2025-09-16 17:08 ` Jessica Clarke
2025-09-18 15:28 ` Nicolas Schichan
2025-09-23 12:04 ` [PATCH RESEND 00/62] initrd: remove classic initrd support Christophe Leroy
68 siblings, 0 replies; 95+ messages in thread
From: Jessica Clarke @ 2025-09-16 17:08 UTC (permalink / raw)
To: Askar Safin
Cc: linux-fsdevel, linux-kernel, Linus Torvalds, Greg Kroah-Hartman,
Christian Brauner, Al Viro, Jan Kara, Christoph Hellwig,
Jens Axboe, Andy Shevchenko, Aleksa Sarai, Thomas Weißschuh,
Julian Stecklina, Gao Xiang, Art Nikpal, Andrew Morton,
Eric Curtin, Alexander Graf, Rob Landley, Lennart Poettering,
linux-arch, linux-alpha, linux-snps-arc, linux-arm-kernel,
linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
linux-s390, linux-sh, sparclinux, linux-um, x86, Ingo Molnar,
linux-block, initramfs, linux-api, linux-doc, linux-efi,
linux-ext4, Theodore Y . Ts'o, linux-acpi, Michal Simek,
devicetree, Luis Chamberlain, Kees Cook, Thorsten Blum,
Heiko Carstens, patches
On 13 Sep 2025, at 01:37, Askar Safin <safinaskar@gmail.com> wrote:
> [...]
> For example, I renamed the following global variables:
>
> __initramfs_start
> __initramfs_size
> [...]
>
> to:
>
> __builtin_initramfs_start
> __builtin_initramfs_size
I strongly suggest picking different names given __builtin_foo is the
naming scheme used for GNU C builtins/intrinsics. I leave you and
others to bikeshed that one.
Jessica
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (66 preceding siblings ...)
2025-09-16 17:08 ` Jessica Clarke
@ 2025-09-18 15:28 ` Nicolas Schichan
2025-09-18 19:58 ` Askar Safin
2025-09-23 12:04 ` [PATCH RESEND 00/62] initrd: remove classic initrd support Christophe Leroy
68 siblings, 1 reply; 95+ messages in thread
From: Nicolas Schichan @ 2025-09-18 15:28 UTC (permalink / raw)
To: safinaskar
Cc: akpm, andy.shevchenko, axboe, brauner, cyphar, devicetree,
ecurtin, email2tema, graf, gregkh, hca, hch, hsiangkao, initramfs,
jack, julian.stecklina, kees, linux-acpi, linux-alpha, linux-api,
linux-arch, linux-arm-kernel, linux-block, linux-csky, linux-doc,
linux-efi, linux-ext4, linux-fsdevel, linux-hexagon, linux-kernel,
linux-m68k, linux-mips, linux-openrisc, linux-parisc, linux-riscv,
linux-s390, linux-sh, linux-snps-arc, linux-um, linuxppc-dev,
loongarch, mcgrof, mingo, monstr, mzxreary, patches, rob,
sparclinux, thomas.weissschuh, thorsten.blum, torvalds, tytso,
viro, x86, nschichan
Hello,
> Intro
> ====
> This patchset removes classic initrd (initial RAM disk) support,
> which was deprecated in 2020.
This serie came a bit as a surprise, because even though the message
notifying of the initrd deprecation was added in July 2020, the message
was never displayed on our kernels.
When booting with root=/dev/ram0 in the kernel commandline,
handle_initrd() where the deprecation message resides is never called,
which is rather unfortunate (init/do_mounts_initrd.c):
if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) {
init_unlink("/initrd.image");
handle_initrd(root_device_name); // shows the deprecation msg
return true;
}
It is likely we are not the alone booting with that particular
configuration, so other people are probably going to be surprised when
initrd support is removed, because they never saw the deprecation
message.
We do depend on initrd support a lot on our embedded platforms (more
than a million devices with a yearlyish upgrade to the latest
kernel). If it eventually becomes removed this is going to impact us.
We use an initrd squashfs4 image, because coming from a time where
embedded flash devices were fragile, we avoid having the root
filesystem directly mounted (even when read only) on the flash
block/mtd device, and have the bootloader load the root filesystem as
an initrd.
We use a squashfs4 because we can mount it and keep it compressed. The
kernel would decompress data on demand in the page cache, and evict it
as needed.
Regards,
--
Nicolas Schichan
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-18 15:28 ` Nicolas Schichan
@ 2025-09-18 19:58 ` Askar Safin
2025-09-19 15:24 ` Nicolas Schichan
0 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-18 19:58 UTC (permalink / raw)
To: nschichan
Cc: akpm, andy.shevchenko, axboe, brauner, cyphar, devicetree,
ecurtin, email2tema, graf, gregkh, hca, hch, hsiangkao, initramfs,
jack, julian.stecklina, kees, linux-acpi, linux-alpha, linux-api,
linux-arch, linux-arm-kernel, linux-block, linux-csky, linux-doc,
linux-efi, linux-ext4, linux-fsdevel, linux-hexagon, linux-kernel,
linux-m68k, linux-mips, linux-openrisc, linux-parisc, linux-riscv,
linux-s390, linux-sh, linux-snps-arc, linux-um, linuxppc-dev,
loongarch, mcgrof, mingo, monstr, mzxreary, patches, rob,
safinaskar, sparclinux, thomas.weissschuh, thorsten.blum,
torvalds, tytso, viro, x86
> When booting with root=/dev/ram0 in the kernel commandline,
> handle_initrd() where the deprecation message resides is never called,
> which is rather unfortunate (init/do_mounts_initrd.c):
Yes, this is unfortunate.
I personally still think that initrd should be removed.
I suggest using workaround I described in cover letter.
Also, for unknown reasons I didn't get your letter in my inbox.
(Not even in spam folder.) I ocasionally found it on lore.kernel.org .
--
Askar Safin
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-18 19:58 ` Askar Safin
@ 2025-09-19 15:24 ` Nicolas Schichan
2025-09-20 3:54 ` Askar Safin
0 siblings, 1 reply; 95+ messages in thread
From: Nicolas Schichan @ 2025-09-19 15:24 UTC (permalink / raw)
To: Askar Safin
Cc: akpm, andy.shevchenko, axboe, brauner, cyphar, devicetree,
ecurtin, email2tema, graf, gregkh, hca, hch, hsiangkao, initramfs,
jack, julian.stecklina, kees, linux-acpi, linux-alpha, linux-api,
linux-arch, linux-arm-kernel, linux-block, linux-csky, linux-doc,
linux-efi, linux-ext4, linux-fsdevel, linux-hexagon, linux-kernel,
linux-m68k, linux-mips, linux-openrisc, linux-parisc, linux-riscv,
linux-s390, linux-sh, linux-snps-arc, linux-um, linuxppc-dev,
loongarch, mcgrof, mingo, monstr, mzxreary, patches, rob,
sparclinux, thomas.weissschuh, thorsten.blum, torvalds, tytso,
viro, x86
Hello,
> > When booting with root=/dev/ram0 in the kernel commandline,
> > handle_initrd() where the deprecation message resides is never called,
> > which is rather unfortunate (init/do_mounts_initrd.c):
> Yes, this is unfortunate.
>
> I personally still think that initrd should be removed.
Considering that the deprecation message didn't get displayed in some
configurations, maybe it's a bit early at the very least.
> I suggest using workaround I described in cover letter.
I'm not too keen on having an initramfs just to loop-mount
/sys/firmware/initrd, after all current kernels are able to handle the
use case just fine.
It looks like there is a lot of code calling into specific filesystems
so that the initrd code can guess the size of the file system before
copying into /dev/ram0, and I believe this is what causes the main
gripe against initrd today. What is wrong with just copying
/initrd.image using its actual size into /dev/ram0 instead of guessing
it with the help of filesystem specific code ?
> Also, for unknown reasons I didn't get your letter in my inbox.
> (Not even in spam folder.) I ocasionally found it on lore.kernel.org .
Sorry about that, When I used git-send-email yesterday to reply, the
SMTP server I used wasn't authenticated to google, so all gmail
recipients were dropped. Hopefully this work better today.
Regards,
--
Nicolas Schichan
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-19 15:24 ` Nicolas Schichan
@ 2025-09-20 3:54 ` Askar Safin
2025-09-22 14:28 ` Nicolas Schichan
0 siblings, 1 reply; 95+ messages in thread
From: Askar Safin @ 2025-09-20 3:54 UTC (permalink / raw)
To: Nicolas Schichan
Cc: akpm, andy.shevchenko, axboe, brauner, cyphar, devicetree,
ecurtin, email2tema, graf, gregkh, hca, hch, hsiangkao, initramfs,
jack, julian.stecklina, kees, linux-acpi, linux-alpha, linux-api,
linux-arch, linux-arm-kernel, linux-block, linux-csky, linux-doc,
linux-efi, linux-ext4, linux-fsdevel, linux-hexagon, linux-kernel,
linux-m68k, linux-mips, linux-openrisc, linux-parisc, linux-riscv,
linux-s390, linux-sh, linux-snps-arc, linux-um, linuxppc-dev,
loongarch, mcgrof, mingo, monstr, mzxreary, patches, rob,
sparclinux, thomas.weissschuh, thorsten.blum, torvalds, tytso,
viro, x86
On Fri, Sep 19, 2025 at 6:25 PM Nicolas Schichan <nschichan@freebox.fr> wrote:
> Considering that the deprecation message didn't get displayed in some
> configurations, maybe it's a bit early at the very least.
I changed my opinion.
Breaking users, who did not see a deprecation message at all,
is unfair.
I will send a patchset soon, which will remove initrd codepath,
which currently contains deprecation notice. And I will put
deprecation notice to
other codepath.
Then in September 2026 I will fully remove initrd.
> SMTP server I used wasn't authenticated to google, so all gmail
> recipients were dropped. Hopefully this work better today.
Yes, this time I got your email
--
Askar Safin
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-20 3:54 ` Askar Safin
@ 2025-09-22 14:28 ` Nicolas Schichan
2025-09-25 13:10 ` [PATCH-RFC] init: simplify initrd code (was Re: [PATCH RESEND 00/62] initrd: remove classic initrd support) nschichan
0 siblings, 1 reply; 95+ messages in thread
From: Nicolas Schichan @ 2025-09-22 14:28 UTC (permalink / raw)
To: Askar Safin
Cc: akpm, andy.shevchenko, axboe, brauner, cyphar, devicetree,
ecurtin, email2tema, graf, gregkh, hca, hch, hsiangkao, initramfs,
jack, julian.stecklina, kees, linux-acpi, linux-alpha, linux-api,
linux-arch, linux-arm-kernel, linux-block, linux-csky, linux-doc,
linux-efi, linux-ext4, linux-fsdevel, linux-hexagon, linux-kernel,
linux-m68k, linux-mips, linux-openrisc, linux-parisc, linux-riscv,
linux-s390, linux-sh, linux-snps-arc, linux-um, linuxppc-dev,
loongarch, mcgrof, mingo, monstr, mzxreary, patches, rob,
sparclinux, thomas.weissschuh, thorsten.blum, torvalds, tytso,
viro, x86
[resending to the lists and Cc, sorry I initially replied only to Askar]
On Sat, Sep 20, 2025 at 5:55 AM Askar Safin <safinaskar@gmail.com> wrote:
> On Fri, Sep 19, 2025 at 6:25 PM Nicolas Schichan <nschichan@freebox.fr> wrote:
> > Considering that the deprecation message didn't get displayed in some
> > configurations, maybe it's a bit early at the very least.
>
> I changed my opinion.
> Breaking users, who did not see a deprecation message at all,
> is unfair.
> I will send a patchset soon, which will remove initrd codepath,
> which currently contains deprecation notice. And I will put
> deprecation notice to
> other codepath.
Thanks
> Then in September 2026 I will fully remove initrd.
Is there a way to find some kind of middle ground here ?
I'm lead to believe that the main issue with the current code is that
it needs to parse the superblocks of the ramdisk image in order to get
the amount to data to copy into /dev/ram0.
It looks like it is partly because of the ramdisk_start= kernel
command line parameter which looks to be a remnant of the time it was
possible to boot on floppy disk on x86.
This kernel command line allows to look for a rootfs image at an
offset into the initrd data.
If we assume now that the rootfs image data starts at the beginning of
the initrd image and is the only part of the initrd image this would
indeed remove a lot of complexity.
Maybe it would be possible to remove the identify_ramdisk_image()
function and just copy the actual size of /initrd.image into
/dev/ram0. This would allow any file system to be used in an initrd
image (no just romfs, cramfs, minixfs, ext2fs and squashfs), and this
would simplify the code in init/do_mounts_rd.c greatly, with just the
function rd_load_image() and nr_blocks() remaining in this file.
I can send a patch for that but first I need to sort out my SMTP
issues from the other day.
Regards,
--
Nicolas Schichan
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH-RFC] init: simplify initrd code (was Re: [PATCH RESEND 00/62] initrd: remove classic initrd support).
2025-09-22 14:28 ` Nicolas Schichan
@ 2025-09-25 13:10 ` nschichan
0 siblings, 0 replies; 95+ messages in thread
From: nschichan @ 2025-09-25 13:10 UTC (permalink / raw)
To: nschichan
Cc: akpm, andy.shevchenko, axboe, brauner, cyphar, devicetree,
ecurtin, email2tema, graf, gregkh, hca, hch, hsiangkao, initramfs,
jack, julian.stecklina, kees, linux-acpi, linux-alpha, linux-api,
linux-arch, linux-arm-kernel, linux-block, linux-csky, linux-doc,
linux-efi, linux-ext4, linux-fsdevel, linux-hexagon, linux-kernel,
linux-m68k, linux-mips, linux-openrisc, linux-parisc, linux-riscv,
linux-s390, linux-sh, linux-snps-arc, linux-um, linuxppc-dev,
loongarch, mcgrof, mingo, monstr, mzxreary, patches, rob,
safinaskar, sparclinux, thomas.weissschuh, thorsten.blum,
torvalds, tytso, viro, x86
From: Nicolas Schichan <nschichan@freebox.fr>
- drop prompt_ramdisk and ramdisk_start kernel parameters
- drop compression support
- drop image autodetection, the whole /initrd.image content is now
copied into /dev/ram0
- remove rd_load_disk() which doesn't seem to be used anywhere.
There is now no more limitation on the type of initrd filesystem that
can be loaded since the code trying to guess the initrd filesystem
size is gone (the whole /initrd.image file is used).
A few global variables in do_mounts_rd.c are now put as local
variables in rd_load_image() since they do not need to be visible
outside this function.
---
Hello,
Hopefully my email config is now better and reaches gmail users
correctly.
The patch below could probably split in a few patches, but I think
this simplify the code greatly without removing the functionality we
depend on (and this allows now to use EROFS initrd images).
Coupled with keeping the function populate_initrd_image() in
init/initramfs.c, this will keep what we need from the initrd code.
This removes support of loading bzip/gz/xz/... compressed images as
well, not sure if many user depend on this feature anymore.
No signoff because I'm only seeking comments about those changes right
now.
init/do_mounts.h | 2 -
init/do_mounts_rd.c | 243 +-------------------------------------------
2 files changed, 4 insertions(+), 241 deletions(-)
diff --git a/init/do_mounts.h b/init/do_mounts.h
index 6069ea3eb80d..c0028ee3cff6 100644
--- a/init/do_mounts.h
+++ b/init/do_mounts.h
@@ -24,12 +24,10 @@ static inline __init int create_dev(char *name, dev_t dev)
#ifdef CONFIG_BLK_DEV_RAM
-int __init rd_load_disk(int n);
int __init rd_load_image(char *from);
#else
-static inline int rd_load_disk(int n) { return 0; }
static inline int rd_load_image(char *from) { return 0; }
#endif
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index ac021ae6e6fa..5a69ff43f5ee 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -14,173 +14,9 @@
#include <linux/decompress/generic.h>
-static struct file *in_file, *out_file;
-static loff_t in_pos, out_pos;
-
-static int __init prompt_ramdisk(char *str)
-{
- pr_warn("ignoring the deprecated prompt_ramdisk= option\n");
- return 1;
-}
-__setup("prompt_ramdisk=", prompt_ramdisk);
-
-int __initdata rd_image_start; /* starting block # of image */
-
-static int __init ramdisk_start_setup(char *str)
-{
- rd_image_start = simple_strtol(str,NULL,0);
- return 1;
-}
-__setup("ramdisk_start=", ramdisk_start_setup);
-
-static int __init crd_load(decompress_fn deco);
-
-/*
- * This routine tries to find a RAM disk image to load, and returns the
- * number of blocks to read for a non-compressed image, 0 if the image
- * is a compressed image, and -1 if an image with the right magic
- * numbers could not be found.
- *
- * We currently check for the following magic numbers:
- * minix
- * ext2
- * romfs
- * cramfs
- * squashfs
- * gzip
- * bzip2
- * lzma
- * xz
- * lzo
- * lz4
- */
-static int __init
-identify_ramdisk_image(struct file *file, loff_t pos,
- decompress_fn *decompressor)
-{
- const int size = 512;
- struct minix_super_block *minixsb;
- struct romfs_super_block *romfsb;
- struct cramfs_super *cramfsb;
- struct squashfs_super_block *squashfsb;
- int nblocks = -1;
- unsigned char *buf;
- const char *compress_name;
- unsigned long n;
- int start_block = rd_image_start;
-
- buf = kmalloc(size, GFP_KERNEL);
- if (!buf)
- return -ENOMEM;
-
- minixsb = (struct minix_super_block *) buf;
- romfsb = (struct romfs_super_block *) buf;
- cramfsb = (struct cramfs_super *) buf;
- squashfsb = (struct squashfs_super_block *) buf;
- memset(buf, 0xe5, size);
-
- /*
- * Read block 0 to test for compressed kernel
- */
- pos = start_block * BLOCK_SIZE;
- kernel_read(file, buf, size, &pos);
-
- *decompressor = decompress_method(buf, size, &compress_name);
- if (compress_name) {
- printk(KERN_NOTICE "RAMDISK: %s image found at block %d\n",
- compress_name, start_block);
- if (!*decompressor)
- printk(KERN_EMERG
- "RAMDISK: %s decompressor not configured!\n",
- compress_name);
- nblocks = 0;
- goto done;
- }
-
- /* romfs is at block zero too */
- if (romfsb->word0 == ROMSB_WORD0 &&
- romfsb->word1 == ROMSB_WORD1) {
- printk(KERN_NOTICE
- "RAMDISK: romfs filesystem found at block %d\n",
- start_block);
- nblocks = (ntohl(romfsb->size)+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
- goto done;
- }
-
- if (cramfsb->magic == CRAMFS_MAGIC) {
- printk(KERN_NOTICE
- "RAMDISK: cramfs filesystem found at block %d\n",
- start_block);
- nblocks = (cramfsb->size + BLOCK_SIZE - 1) >> BLOCK_SIZE_BITS;
- goto done;
- }
-
- /* squashfs is at block zero too */
- if (le32_to_cpu(squashfsb->s_magic) == SQUASHFS_MAGIC) {
- printk(KERN_NOTICE
- "RAMDISK: squashfs filesystem found at block %d\n",
- start_block);
- nblocks = (le64_to_cpu(squashfsb->bytes_used) + BLOCK_SIZE - 1)
- >> BLOCK_SIZE_BITS;
- goto done;
- }
-
- /*
- * Read 512 bytes further to check if cramfs is padded
- */
- pos = start_block * BLOCK_SIZE + 0x200;
- kernel_read(file, buf, size, &pos);
-
- if (cramfsb->magic == CRAMFS_MAGIC) {
- printk(KERN_NOTICE
- "RAMDISK: cramfs filesystem found at block %d\n",
- start_block);
- nblocks = (cramfsb->size + BLOCK_SIZE - 1) >> BLOCK_SIZE_BITS;
- goto done;
- }
-
- /*
- * Read block 1 to test for minix and ext2 superblock
- */
- pos = (start_block + 1) * BLOCK_SIZE;
- kernel_read(file, buf, size, &pos);
-
- /* Try minix */
- if (minixsb->s_magic == MINIX_SUPER_MAGIC ||
- minixsb->s_magic == MINIX_SUPER_MAGIC2) {
- printk(KERN_NOTICE
- "RAMDISK: Minix filesystem found at block %d\n",
- start_block);
- nblocks = minixsb->s_nzones << minixsb->s_log_zone_size;
- goto done;
- }
-
- /* Try ext2 */
- n = ext2_image_size(buf);
- if (n) {
- printk(KERN_NOTICE
- "RAMDISK: ext2 filesystem found at block %d\n",
- start_block);
- nblocks = n;
- goto done;
- }
-
- printk(KERN_NOTICE
- "RAMDISK: Couldn't find valid RAM disk image starting at %d.\n",
- start_block);
-
-done:
- kfree(buf);
- return nblocks;
-}
-
static unsigned long nr_blocks(struct file *file)
{
- struct inode *inode = file->f_mapping->host;
-
- if (!S_ISBLK(inode->i_mode))
- return 0;
- return i_size_read(inode) >> 10;
+ return i_size_read(file->f_mapping->host) >> 10;
}
int __init rd_load_image(char *from)
@@ -190,10 +26,11 @@ int __init rd_load_image(char *from)
int nblocks, i;
char *buf = NULL;
unsigned short rotate = 0;
- decompress_fn decompressor = NULL;
#if !defined(CONFIG_S390)
char rotator[4] = { '|' , '/' , '-' , '\\' };
#endif
+ struct file *in_file, *out_file;
+ loff_t in_pos = 0, out_pos = 0;
out_file = filp_open("/dev/ram", O_RDWR, 0);
if (IS_ERR(out_file))
@@ -203,17 +40,6 @@ int __init rd_load_image(char *from)
if (IS_ERR(in_file))
goto noclose_input;
- in_pos = rd_image_start * BLOCK_SIZE;
- nblocks = identify_ramdisk_image(in_file, in_pos, &decompressor);
- if (nblocks < 0)
- goto done;
-
- if (nblocks == 0) {
- if (crd_load(decompressor) == 0)
- goto successful_load;
- goto done;
- }
-
/*
* NOTE NOTE: nblocks is not actually blocks but
* the number of kibibytes of data to load into a ramdisk.
@@ -228,10 +54,7 @@ int __init rd_load_image(char *from)
/*
* OK, time to copy in the data
*/
- if (strcmp(from, "/initrd.image") == 0)
- devblocks = nblocks;
- else
- devblocks = nr_blocks(in_file);
+ nblocks = devblocks = nr_blocks(in_file);
if (devblocks == 0) {
printk(KERN_ERR "RAMDISK: could not determine device size\n");
@@ -264,7 +87,6 @@ int __init rd_load_image(char *from)
}
pr_cont("done.\n");
-successful_load:
res = 1;
done:
fput(in_file);
@@ -275,60 +97,3 @@ int __init rd_load_image(char *from)
init_unlink("/dev/ram");
return res;
}
-
-int __init rd_load_disk(int n)
-{
- create_dev("/dev/root", ROOT_DEV);
- create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n));
- return rd_load_image("/dev/root");
-}
-
-static int exit_code;
-static int decompress_error;
-
-static long __init compr_fill(void *buf, unsigned long len)
-{
- long r = kernel_read(in_file, buf, len, &in_pos);
- if (r < 0)
- printk(KERN_ERR "RAMDISK: error while reading compressed data");
- else if (r == 0)
- printk(KERN_ERR "RAMDISK: EOF while reading compressed data");
- return r;
-}
-
-static long __init compr_flush(void *window, unsigned long outcnt)
-{
- long written = kernel_write(out_file, window, outcnt, &out_pos);
- if (written != outcnt) {
- if (decompress_error == 0)
- printk(KERN_ERR
- "RAMDISK: incomplete write (%ld != %ld)\n",
- written, outcnt);
- decompress_error = 1;
- return -1;
- }
- return outcnt;
-}
-
-static void __init error(char *x)
-{
- printk(KERN_ERR "%s\n", x);
- exit_code = 1;
- decompress_error = 1;
-}
-
-static int __init crd_load(decompress_fn deco)
-{
- int result;
-
- if (!deco) {
- pr_emerg("Invalid ramdisk decompression routine. "
- "Select appropriate config option.\n");
- panic("Could not decompress initial ramdisk image.");
- }
-
- result = deco(NULL, 0, compr_fill, compr_flush, NULL, NULL, error);
- if (decompress_error)
- result = 1;
- return result;
-}
--
2.34.1
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-13 0:37 [PATCH RESEND 00/62] initrd: remove classic initrd support Askar Safin
` (67 preceding siblings ...)
2025-09-18 15:28 ` Nicolas Schichan
@ 2025-09-23 12:04 ` Christophe Leroy
2025-09-24 16:17 ` Alexander Patrakov
68 siblings, 1 reply; 95+ messages in thread
From: Christophe Leroy @ 2025-09-23 12:04 UTC (permalink / raw)
To: Askar Safin, linux-fsdevel, linux-kernel
Cc: Linus Torvalds, Greg Kroah-Hartman, Christian Brauner, Al Viro,
Jan Kara, Christoph Hellwig, Jens Axboe, Andy Shevchenko,
Aleksa Sarai, Thomas Weißschuh, Julian Stecklina, Gao Xiang,
Art Nikpal, Andrew Morton, Eric Curtin, Alexander Graf,
Rob Landley, Lennart Poettering, linux-arch, linux-alpha,
linux-snps-arc, linux-arm-kernel, linux-csky, linux-hexagon,
loongarch, linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
Le 13/09/2025 à 02:37, Askar Safin a écrit :
> [Vous ne recevez pas souvent de courriers de safinaskar@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> Intro
> ====
> This patchset removes classic initrd (initial RAM disk) support,
> which was deprecated in 2020.
> Initramfs still stays, and RAM disk itself (brd) still stays, too.
> init/do_mounts* and init/*initramfs* are listed in VFS entry in
> MAINTAINERS, so I think this patchset should go through VFS tree.
> This patchset touchs every subdirectory in arch/, so I tested it
> on 8 (!!!) archs in Qemu (see details below).
> Warning: this patchset renames CONFIG_BLK_DEV_INITRD (!!!) to CONFIG_INITRAMFS
> and CONFIG_RD_* to CONFIG_INITRAMFS_DECOMPRESS_* (for example,
> CONFIG_RD_GZIP to CONFIG_INITRAMFS_DECOMPRESS_GZIP).
> If you still use initrd, see below for workaround.
Apologise if my question looks stupid, but I'm using QEMU for various
tests, and the way QEMU is started is something like:
qemu-system-ppc -kernel ./vmlinux -cpu g4 -M mac99 -initrd
./qemu/rootfs.cpio.gz
I was therefore expecting (and fearing) it to fail with your series
applied, but surprisingly it still works.
Therefore is it really initrd you are removing or just some corner case
? If it is really initrd, then how does QEMU still work with that
-initrd parameter ?
Thanks
Christophe
>
> Details
> ====
> I not only removed initrd, I also removed a lot of code, which
> became dead, including a lot of code in arch/.
>
> Still I think the only two architectures I touched in non-trivial
> way are sh and 32-bit arm.
>
> Also I renamed some files, functions and variables (which became misnomers) to proper names,
> moved some code around, removed a lot of mentions of initrd
> in code and comments. Also I cleaned up some docs.
>
> For example, I renamed the following global variables:
>
> __initramfs_start
> __initramfs_size
> phys_initrd_start
> phys_initrd_size
> initrd_start
> initrd_end
>
> to:
>
> __builtin_initramfs_start
> __builtin_initramfs_size
> phys_external_initramfs_start
> phys_external_initramfs_size
> virt_external_initramfs_start
> virt_external_initramfs_end
>
> New names precisely capture meaning of these variables.
>
> Also I renamed CONFIG_BLK_DEV_INITRD (which became total misnomer)
> to CONFIG_INITRAMFS. And CONFIG_RD_* to CONFIG_INITRAMFS_DECOMPRESS_*.
> This will break all configs out there (update your configs!).
> Still I think this is okay,
> because config names never were part of stable API.
> Still, I don't have strong opinion here, so I can drop these renamings
> if needed.
>
> Other user-visible changes:
>
> - Removed kernel command line parameters "load_ramdisk" and
> "prompt_ramdisk", which did nothing and were deprecated
> - Removed kernel command line parameter "ramdisk_start",
> which was used for initrd only (not for initramfs)
> - Removed kernel command line parameter "noinitrd",
> which was inconsistent: it controlled initrd only
> (not initramfs), except for EFI boot, where it
> controlled both initramfs and initrd. EFI users
> still can disable initramfs simply by not passing it
> - Removed kernel command line parameter "ramdisk_size",
> which used for controlling ramdisk (brd), but only
> in non-modular mode. Use brd.rd_size instead, it
> always works
> - Removed /proc/sys/kernel/real-root-dev . It was used
> for initrd only
>
> This patchset is based on v6.17-rc5.
>
> Testing
> ====
> I tested my patchset on many architectures in Qemu using my Rust
> program, heavily based on mkroot [1].
>
> I used the following cross-compilers:
>
> aarch64-linux-musleabi
> armv4l-linux-musleabihf
> armv5l-linux-musleabihf
> armv7l-linux-musleabihf
> i486-linux-musl
> i686-linux-musl
> mips-linux-musl
> mips64-linux-musl
> mipsel-linux-musl
> powerpc-linux-musl
> powerpc64-linux-musl
> powerpc64le-linux-musl
> riscv32-linux-musl
> riscv64-linux-musl
> s390x-linux-musl
> sh4-linux-musl
> sh4eb-linux-musl
> x86_64-linux-musl
>
> taken from this directory [2].
>
> So, as you can see, there are 18 triplets, which correspond to 8 subdirs in arch/.
>
> And note that this list contains two archs (arm and sh) touched in non-trivial way.
>
> For every triplet I tested that:
> - Initramfs still works (both builtin and external)
> - Direct boot from disk still works
>
> Workaround
> ====
> If "retain_initrd" is passed to kernel, then initramfs/initrd,
> passed by bootloader, is retained and becomes available after boot
> as read-only magic file /sys/firmware/initrd [3].
>
> No copies are involved. I. e. /sys/firmware/initrd is simply
> a reference to original blob passed by bootloader.
>
> This works even if initrd/initramfs is not recognized by kernel
> in any way, i. e. even if it is not valid cpio archive, nor
> a fs image supported by classic initrd.
>
> This works both with my patchset and without it.
>
> This means that you can emulate classic initrd so:
> link builtin initramfs to kernel. In /init in this initramfs
> copy /sys/firmware/initrd to some file in / and loop-mount it.
>
> This is even better than classic initrd, because:
> - You can use fs not supported by classic initrd, for example erofs
> - One copy is involved (from /sys/firmware/initrd to some file in /)
> as opposed to two when using classic initrd
>
> Still, I don't recommend using this workaround, because
> I want everyone to migrate to proper modern initramfs.
> But still you can use this workaround if you want.
>
> Also: it is not possible to directly loop-mount
> /sys/firmware/initrd . Theoretically kernel can be changed
> to allow this (and/or to make it writable), but I think nobody needs this.
> And I don't want to implement this.
>
> P. S. When I sent this patchset first time, zoho mail banned me for
> too much email. So I resend this using gmail. The only change is
> email change, there are no other changes
>
> [1] https://github.com/landley/toybox/tree/master/mkroot
> [2] https://landley.net/toybox/downloads/binaries/toolchains/latest
> [3] https://lore.kernel.org/all/20231207235654.16622-1-graf@amazon.com/
>
> Askar Safin (62):
> init: remove deprecated "load_ramdisk" command line parameter, which
> does nothing
> init: remove deprecated "prompt_ramdisk" command line parameter, which
> does nothing
> init: sh, sparc, x86: remove unused constants RAMDISK_PROMPT_FLAG and
> RAMDISK_LOAD_FLAG
> init: x86, arm, sh, sparc: remove variable rd_image_start, which
> controls starting block number of initrd
> init: remove "ramdisk_start" command line parameter, which controls
> starting block number of initrd
> arm: init: remove special logic for setting brd.rd_size
> arm: init: remove ATAG_RAMDISK
> arm: init: remove FLAG_RDLOAD and FLAG_RDPROMPT
> arm: init: document rd_start (in param_struct) as obsolete
> initrd: remove initrd (initial RAM disk) support
> init, efi: remove "noinitrd" command line parameter
> init: remove /proc/sys/kernel/real-root-dev
> ext2: remove ext2_image_size and associated code
> init: m68k, mips, powerpc, s390, sh: remove Root_RAM0
> doc: modernize Documentation/admin-guide/blockdev/ramdisk.rst
> brd: remove "ramdisk_size" command line parameter
> doc: modernize Documentation/filesystems/ramfs-rootfs-initramfs.rst
> doc: modernize
> Documentation/driver-api/early-userspace/early_userspace_support.rst
> init: remove mentions of "ramdisk=" command line parameter
> doc: remove Documentation/power/swsusp-dmcrypt.rst
> init: remove all mentions of root=/dev/ram*
> doc: remove obsolete mentions of pivot_root
> init: rename __initramfs_{start,size} to
> __builtin_initramfs_{start,size}
> init: remove wrong comment
> init: rename phys_initrd_{start,size} to
> phys_external_initramfs_{start,size}
> init: move phys_external_initramfs_{start,size} to init/initramfs.c
> init: alpha: remove "extern unsigned long initrd_start, initrd_end"
> init: alpha, arc, arm, arm64, csky, m68k, microblaze, mips, nios2,
> openrisc, parisc, powerpc, s390, sh, sparc, um, x86, xtensa: rename
> initrd_{start,end} to virt_external_initramfs_{start,end}
> init: move virt_external_initramfs_{start,end} to init/initramfs.c
> doc: remove documentation for block device 4 0
> init: rename initrd_below_start_ok to initramfs_below_start_ok
> init: move initramfs_below_start_ok to init/initramfs.c
> init: remove init/do_mounts_initrd.c
> init: inline create_dev into the only caller
> init: make mount_root_generic static
> init: make mount_root static
> init: remove root_mountflags from init/do_mounts.h
> init: remove most headers from init/do_mounts.h
> init: make console_on_rootfs static
> init: rename free_initrd_mem to free_initramfs_mem
> init: rename reserve_initrd_mem to reserve_initramfs_mem
> init: rename <linux/initrd.h> to <linux/initramfs.h>
> setsid: inline ksys_setsid into the only caller
> doc: kernel-parameters: remove [RAM] from reserve_mem=
> doc: kernel-parameters: replace [RAM] with [INITRAMFS]
> init: edit docs for initramfs-related configs
> init: fix typo: virtul => virtual
> init: fix comment
> init: rename ramdisk_execute_command to initramfs_execute_command
> init: rename ramdisk_command_access to initramfs_command_access
> init: rename get_boot_config_from_initrd to
> get_boot_config_from_initramfs
> init: rename do_retain_initrd to retain_initramfs
> init: rename kexec_free_initrd to kexec_free_initramfs
> init: arm, x86: deal with some references to initrd
> init: rename CONFIG_BLK_DEV_INITRD to CONFIG_INITRAMFS
> init: rename CONFIG_RD_GZIP to CONFIG_INITRAMFS_DECOMPRESS_GZIP
> init: rename CONFIG_RD_BZIP2 to CONFIG_INITRAMFS_DECOMPRESS_BZIP2
> init: rename CONFIG_RD_LZMA to CONFIG_INITRAMFS_DECOMPRESS_LZMA
> init: rename CONFIG_RD_XZ to CONFIG_INITRAMFS_DECOMPRESS_XZ
> init: rename CONFIG_RD_LZO to CONFIG_INITRAMFS_DECOMPRESS_LZO
> init: rename CONFIG_RD_LZ4 to CONFIG_INITRAMFS_DECOMPRESS_LZ4
> init: rename CONFIG_RD_ZSTD to CONFIG_INITRAMFS_DECOMPRESS_ZSTD
>
> .../admin-guide/blockdev/ramdisk.rst | 104 +----
> .../admin-guide/device-mapper/dm-init.rst | 4 +-
> Documentation/admin-guide/devices.txt | 12 -
> Documentation/admin-guide/index.rst | 1 -
> Documentation/admin-guide/initrd.rst | 383 ------------------
> .../admin-guide/kernel-parameters.rst | 4 +-
> .../admin-guide/kernel-parameters.txt | 38 +-
> Documentation/admin-guide/nfs/nfsroot.rst | 4 +-
> Documentation/admin-guide/sysctl/kernel.rst | 6 -
> Documentation/arch/arm/ixp4xx.rst | 4 +-
> Documentation/arch/arm/setup.rst | 6 +-
> Documentation/arch/m68k/kernel-options.rst | 29 +-
> Documentation/arch/x86/boot.rst | 4 +-
> .../early_userspace_support.rst | 18 +-
> .../filesystems/ramfs-rootfs-initramfs.rst | 20 +-
> Documentation/power/index.rst | 1 -
> Documentation/power/swsusp-dmcrypt.rst | 140 -------
> Documentation/security/ipe.rst | 2 +-
> .../translations/zh_CN/power/index.rst | 1 -
> arch/alpha/kernel/core_irongate.c | 12 +-
> arch/alpha/kernel/proto.h | 2 +-
> arch/alpha/kernel/setup.c | 32 +-
> arch/arc/configs/axs101_defconfig | 2 +-
> arch/arc/configs/axs103_defconfig | 2 +-
> arch/arc/configs/axs103_smp_defconfig | 2 +-
> arch/arc/configs/haps_hs_defconfig | 2 +-
> arch/arc/configs/haps_hs_smp_defconfig | 2 +-
> arch/arc/configs/hsdk_defconfig | 2 +-
> arch/arc/configs/nsim_700_defconfig | 2 +-
> arch/arc/configs/nsimosci_defconfig | 2 +-
> arch/arc/configs/nsimosci_hs_defconfig | 2 +-
> arch/arc/configs/nsimosci_hs_smp_defconfig | 2 +-
> arch/arc/configs/tb10x_defconfig | 4 +-
> arch/arc/configs/vdk_hs38_defconfig | 2 +-
> arch/arc/configs/vdk_hs38_smp_defconfig | 2 +-
> arch/arc/mm/init.c | 14 +-
> arch/arm/Kconfig | 2 +-
> arch/arm/boot/dts/arm/integratorap.dts | 2 +-
> arch/arm/boot/dts/arm/integratorcp.dts | 2 +-
> .../dts/aspeed/aspeed-bmc-facebook-cmm.dts | 2 +-
> .../aspeed/aspeed-bmc-facebook-galaxy100.dts | 2 +-
> .../aspeed/aspeed-bmc-facebook-minipack.dts | 2 +-
> .../aspeed/aspeed-bmc-facebook-wedge100.dts | 2 +-
> .../aspeed/aspeed-bmc-facebook-wedge40.dts | 2 +-
> .../dts/aspeed/aspeed-bmc-facebook-yamp.dts | 2 +-
> .../ast2600-facebook-netbmc-common.dtsi | 2 +-
> arch/arm/boot/dts/hisilicon/hi3620-hi4511.dts | 2 +-
> .../ixp/intel-ixp42x-welltech-epbx100.dts | 2 +-
> arch/arm/boot/dts/nspire/nspire-classic.dtsi | 2 +-
> arch/arm/boot/dts/nspire/nspire-cx.dts | 2 +-
> .../boot/dts/samsung/exynos4210-origen.dts | 2 +-
> .../boot/dts/samsung/exynos4210-smdkv310.dts | 2 +-
> .../boot/dts/samsung/exynos4412-smdk4412.dts | 2 +-
> .../boot/dts/samsung/exynos5250-smdk5250.dts | 2 +-
> arch/arm/boot/dts/st/ste-nomadik-nhk15.dts | 2 +-
> arch/arm/boot/dts/st/ste-nomadik-s8815.dts | 2 +-
> arch/arm/boot/dts/st/stm32429i-eval.dts | 2 +-
> arch/arm/boot/dts/st/stm32746g-eval.dts | 2 +-
> arch/arm/boot/dts/st/stm32f429-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32f469-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32f746-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32f769-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32h743i-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32h743i-eval.dts | 2 +-
> arch/arm/boot/dts/st/stm32h747i-disco.dts | 2 +-
> arch/arm/boot/dts/st/stm32h750i-art-pi.dts | 2 +-
> arch/arm/configs/aspeed_g4_defconfig | 8 +-
> arch/arm/configs/aspeed_g5_defconfig | 8 +-
> arch/arm/configs/assabet_defconfig | 4 +-
> arch/arm/configs/at91_dt_defconfig | 4 +-
> arch/arm/configs/axm55xx_defconfig | 2 +-
> arch/arm/configs/bcm2835_defconfig | 2 +-
> arch/arm/configs/clps711x_defconfig | 4 +-
> arch/arm/configs/collie_defconfig | 4 +-
> arch/arm/configs/davinci_all_defconfig | 2 +-
> arch/arm/configs/exynos_defconfig | 4 +-
> arch/arm/configs/footbridge_defconfig | 2 +-
> arch/arm/configs/gemini_defconfig | 2 +-
> arch/arm/configs/h3600_defconfig | 2 +-
> arch/arm/configs/hisi_defconfig | 4 +-
> arch/arm/configs/imx_v4_v5_defconfig | 2 +-
> arch/arm/configs/imx_v6_v7_defconfig | 4 +-
> arch/arm/configs/integrator_defconfig | 2 +-
> arch/arm/configs/ixp4xx_defconfig | 2 +-
> arch/arm/configs/keystone_defconfig | 2 +-
> arch/arm/configs/lpc18xx_defconfig | 12 +-
> arch/arm/configs/lpc32xx_defconfig | 4 +-
> arch/arm/configs/milbeaut_m10v_defconfig | 2 +-
> arch/arm/configs/multi_v4t_defconfig | 2 +-
> arch/arm/configs/multi_v5_defconfig | 2 +-
> arch/arm/configs/multi_v7_defconfig | 2 +-
> arch/arm/configs/mvebu_v7_defconfig | 2 +-
> arch/arm/configs/mxs_defconfig | 2 +-
> arch/arm/configs/neponset_defconfig | 4 +-
> arch/arm/configs/nhk8815_defconfig | 2 +-
> arch/arm/configs/omap1_defconfig | 2 +-
> arch/arm/configs/omap2plus_defconfig | 2 +-
> arch/arm/configs/pxa910_defconfig | 2 +-
> arch/arm/configs/pxa_defconfig | 4 +-
> arch/arm/configs/qcom_defconfig | 2 +-
> arch/arm/configs/rpc_defconfig | 2 +-
> arch/arm/configs/s3c6400_defconfig | 4 +-
> arch/arm/configs/s5pv210_defconfig | 4 +-
> arch/arm/configs/sama5_defconfig | 4 +-
> arch/arm/configs/sama7_defconfig | 2 +-
> arch/arm/configs/shmobile_defconfig | 2 +-
> arch/arm/configs/socfpga_defconfig | 2 +-
> arch/arm/configs/sp7021_defconfig | 12 +-
> arch/arm/configs/spear13xx_defconfig | 2 +-
> arch/arm/configs/spear3xx_defconfig | 2 +-
> arch/arm/configs/spear6xx_defconfig | 2 +-
> arch/arm/configs/spitz_defconfig | 2 +-
> arch/arm/configs/stm32_defconfig | 2 +-
> arch/arm/configs/sunxi_defconfig | 2 +-
> arch/arm/configs/tegra_defconfig | 2 +-
> arch/arm/configs/u8500_defconfig | 4 +-
> arch/arm/configs/versatile_defconfig | 2 +-
> arch/arm/configs/vexpress_defconfig | 2 +-
> arch/arm/configs/vf610m4_defconfig | 10 +-
> arch/arm/configs/vt8500_v6_v7_defconfig | 2 +-
> arch/arm/configs/wpcm450_defconfig | 2 +-
> arch/arm/include/uapi/asm/setup.h | 10 -
> arch/arm/kernel/atags_compat.c | 10 -
> arch/arm/kernel/atags_parse.c | 16 +-
> arch/arm/kernel/setup.c | 2 +-
> arch/arm/mm/init.c | 24 +-
> arch/arm64/configs/defconfig | 2 +-
> arch/arm64/kernel/setup.c | 2 +-
> arch/arm64/mm/init.c | 17 +-
> arch/csky/kernel/setup.c | 24 +-
> arch/csky/mm/init.c | 2 +-
> arch/hexagon/configs/comet_defconfig | 2 +-
> arch/loongarch/configs/loongson3_defconfig | 2 +-
> arch/loongarch/kernel/mem.c | 2 +-
> arch/loongarch/kernel/setup.c | 4 +-
> arch/m68k/configs/amiga_defconfig | 2 +-
> arch/m68k/configs/apollo_defconfig | 2 +-
> arch/m68k/configs/atari_defconfig | 2 +-
> arch/m68k/configs/bvme6000_defconfig | 2 +-
> arch/m68k/configs/hp300_defconfig | 2 +-
> arch/m68k/configs/mac_defconfig | 2 +-
> arch/m68k/configs/multi_defconfig | 2 +-
> arch/m68k/configs/mvme147_defconfig | 2 +-
> arch/m68k/configs/mvme16x_defconfig | 2 +-
> arch/m68k/configs/q40_defconfig | 2 +-
> arch/m68k/configs/stmark2_defconfig | 2 +-
> arch/m68k/configs/sun3_defconfig | 2 +-
> arch/m68k/configs/sun3x_defconfig | 2 +-
> arch/m68k/kernel/setup_mm.c | 12 +-
> arch/m68k/kernel/setup_no.c | 12 +-
> arch/m68k/kernel/uboot.c | 17 +-
> arch/microblaze/kernel/cpu/mb.c | 2 +-
> arch/microblaze/kernel/setup.c | 2 +-
> arch/microblaze/mm/init.c | 12 +-
> arch/mips/ath79/prom.c | 12 +-
> arch/mips/configs/ath25_defconfig | 12 +-
> arch/mips/configs/ath79_defconfig | 4 +-
> arch/mips/configs/bcm47xx_defconfig | 2 +-
> arch/mips/configs/bigsur_defconfig | 2 +-
> arch/mips/configs/bmips_be_defconfig | 2 +-
> arch/mips/configs/bmips_stb_defconfig | 14 +-
> arch/mips/configs/cavium_octeon_defconfig | 2 +-
> arch/mips/configs/eyeq5_defconfig | 2 +-
> arch/mips/configs/eyeq6_defconfig | 2 +-
> arch/mips/configs/generic_defconfig | 2 +-
> arch/mips/configs/gpr_defconfig | 2 +-
> arch/mips/configs/lemote2f_defconfig | 2 +-
> arch/mips/configs/loongson2k_defconfig | 2 +-
> arch/mips/configs/loongson3_defconfig | 2 +-
> arch/mips/configs/malta_defconfig | 2 +-
> arch/mips/configs/mtx1_defconfig | 2 +-
> arch/mips/configs/rb532_defconfig | 2 +-
> arch/mips/configs/rbtx49xx_defconfig | 2 +-
> arch/mips/configs/rt305x_defconfig | 4 +-
> arch/mips/configs/sb1250_swarm_defconfig | 2 +-
> arch/mips/configs/xway_defconfig | 4 +-
> arch/mips/kernel/setup.c | 53 ++-
> arch/mips/mm/init.c | 2 +-
> arch/mips/sibyte/common/cfe.c | 36 +-
> arch/mips/sibyte/swarm/setup.c | 2 +-
> arch/nios2/kernel/setup.c | 20 +-
> arch/openrisc/configs/or1klitex_defconfig | 2 +-
> arch/openrisc/configs/or1ksim_defconfig | 4 +-
> arch/openrisc/configs/simple_smp_defconfig | 14 +-
> arch/openrisc/configs/virt_defconfig | 2 +-
> arch/openrisc/kernel/setup.c | 24 +-
> arch/openrisc/kernel/vmlinux.h | 2 +-
> arch/parisc/boot/compressed/misc.c | 2 +-
> arch/parisc/configs/generic-32bit_defconfig | 2 +-
> arch/parisc/configs/generic-64bit_defconfig | 2 +-
> arch/parisc/defpalo.conf | 2 +-
> arch/parisc/kernel/pdt.c | 6 +-
> arch/parisc/kernel/setup.c | 8 +-
> arch/parisc/mm/init.c | 32 +-
> arch/powerpc/configs/44x/akebono_defconfig | 2 +-
> arch/powerpc/configs/44x/arches_defconfig | 2 +-
> arch/powerpc/configs/44x/bamboo_defconfig | 2 +-
> arch/powerpc/configs/44x/bluestone_defconfig | 2 +-
> .../powerpc/configs/44x/canyonlands_defconfig | 2 +-
> arch/powerpc/configs/44x/ebony_defconfig | 2 +-
> arch/powerpc/configs/44x/eiger_defconfig | 2 +-
> arch/powerpc/configs/44x/fsp2_defconfig | 10 +-
> arch/powerpc/configs/44x/icon_defconfig | 2 +-
> arch/powerpc/configs/44x/iss476-smp_defconfig | 2 +-
> arch/powerpc/configs/44x/katmai_defconfig | 2 +-
> arch/powerpc/configs/44x/rainier_defconfig | 2 +-
> arch/powerpc/configs/44x/redwood_defconfig | 2 +-
> arch/powerpc/configs/44x/sam440ep_defconfig | 2 +-
> arch/powerpc/configs/44x/sequoia_defconfig | 2 +-
> arch/powerpc/configs/44x/taishan_defconfig | 2 +-
> arch/powerpc/configs/44x/warp_defconfig | 2 +-
> arch/powerpc/configs/52xx/cm5200_defconfig | 2 +-
> arch/powerpc/configs/52xx/lite5200b_defconfig | 2 +-
> arch/powerpc/configs/52xx/motionpro_defconfig | 2 +-
> arch/powerpc/configs/52xx/tqm5200_defconfig | 2 +-
> arch/powerpc/configs/83xx/asp8347_defconfig | 2 +-
> .../configs/83xx/mpc8313_rdb_defconfig | 2 +-
> .../configs/83xx/mpc8315_rdb_defconfig | 2 +-
> .../configs/83xx/mpc832x_rdb_defconfig | 2 +-
> .../configs/83xx/mpc834x_itx_defconfig | 2 +-
> .../configs/83xx/mpc834x_itxgp_defconfig | 2 +-
> .../configs/83xx/mpc836x_rdk_defconfig | 2 +-
> .../configs/83xx/mpc837x_rdb_defconfig | 2 +-
> arch/powerpc/configs/85xx/ge_imp3a_defconfig | 2 +-
> arch/powerpc/configs/85xx/ksi8560_defconfig | 2 +-
> arch/powerpc/configs/85xx/socrates_defconfig | 2 +-
> arch/powerpc/configs/85xx/stx_gp3_defconfig | 2 +-
> arch/powerpc/configs/85xx/tqm8540_defconfig | 2 +-
> arch/powerpc/configs/85xx/tqm8541_defconfig | 2 +-
> arch/powerpc/configs/85xx/tqm8548_defconfig | 2 +-
> arch/powerpc/configs/85xx/tqm8555_defconfig | 2 +-
> arch/powerpc/configs/85xx/tqm8560_defconfig | 2 +-
> .../configs/85xx/xes_mpc85xx_defconfig | 2 +-
> arch/powerpc/configs/amigaone_defconfig | 2 +-
> arch/powerpc/configs/cell_defconfig | 2 +-
> arch/powerpc/configs/chrp32_defconfig | 2 +-
> arch/powerpc/configs/fsl-emb-nonhw.config | 2 +-
> arch/powerpc/configs/g5_defconfig | 2 +-
> arch/powerpc/configs/gamecube_defconfig | 2 +-
> arch/powerpc/configs/holly_defconfig | 2 +-
> arch/powerpc/configs/linkstation_defconfig | 2 +-
> arch/powerpc/configs/mgcoge_defconfig | 4 +-
> arch/powerpc/configs/microwatt_defconfig | 2 +-
> arch/powerpc/configs/mpc512x_defconfig | 2 +-
> arch/powerpc/configs/mpc5200_defconfig | 2 +-
> arch/powerpc/configs/mpc83xx_defconfig | 2 +-
> arch/powerpc/configs/pasemi_defconfig | 2 +-
> arch/powerpc/configs/pmac32_defconfig | 2 +-
> arch/powerpc/configs/powernv_defconfig | 2 +-
> arch/powerpc/configs/ppc44x_defconfig | 2 +-
> arch/powerpc/configs/ppc64_defconfig | 2 +-
> arch/powerpc/configs/ppc64e_defconfig | 2 +-
> arch/powerpc/configs/ppc6xx_defconfig | 2 +-
> arch/powerpc/configs/ps3_defconfig | 2 +-
> arch/powerpc/configs/skiroot_defconfig | 12 +-
> arch/powerpc/configs/wii_defconfig | 2 +-
> arch/powerpc/kernel/prom.c | 22 +-
> arch/powerpc/kernel/prom_init.c | 6 +-
> arch/powerpc/kernel/setup-common.c | 25 +-
> arch/powerpc/kernel/setup_32.c | 2 +-
> arch/powerpc/kernel/setup_64.c | 2 +-
> arch/powerpc/mm/init_32.c | 2 +-
> arch/powerpc/platforms/52xx/lite5200.c | 2 +-
> arch/powerpc/platforms/83xx/km83xx.c | 2 +-
> arch/powerpc/platforms/85xx/mpc85xx_mds.c | 2 +-
> arch/powerpc/platforms/chrp/setup.c | 2 +-
> .../platforms/embedded6xx/linkstation.c | 2 +-
> .../platforms/embedded6xx/storcenter.c | 2 +-
> arch/powerpc/platforms/powermac/setup.c | 8 +-
> arch/riscv/configs/defconfig | 2 +-
> arch/riscv/configs/nommu_k210_defconfig | 16 +-
> arch/riscv/configs/nommu_virt_defconfig | 12 +-
> arch/riscv/mm/init.c | 4 +-
> arch/s390/boot/ipl_parm.c | 2 +-
> arch/s390/boot/startup.c | 4 +-
> arch/s390/configs/zfcpdump_defconfig | 2 +-
> arch/s390/kernel/setup.c | 10 +-
> arch/s390/mm/init.c | 2 +-
> arch/sh/configs/apsh4a3a_defconfig | 2 +-
> arch/sh/configs/apsh4ad0a_defconfig | 2 +-
> arch/sh/configs/ecovec24-romimage_defconfig | 2 +-
> arch/sh/configs/edosk7760_defconfig | 2 +-
> arch/sh/configs/kfr2r09-romimage_defconfig | 2 +-
> arch/sh/configs/kfr2r09_defconfig | 2 +-
> arch/sh/configs/magicpanelr2_defconfig | 2 +-
> arch/sh/configs/migor_defconfig | 2 +-
> arch/sh/configs/rsk7201_defconfig | 2 +-
> arch/sh/configs/rsk7203_defconfig | 2 +-
> arch/sh/configs/sdk7786_defconfig | 8 +-
> arch/sh/configs/se7206_defconfig | 2 +-
> arch/sh/configs/se7705_defconfig | 2 +-
> arch/sh/configs/se7722_defconfig | 2 +-
> arch/sh/configs/se7751_defconfig | 2 +-
> arch/sh/configs/secureedge5410_defconfig | 2 +-
> arch/sh/configs/sh03_defconfig | 2 +-
> arch/sh/configs/sh7757lcr_defconfig | 2 +-
> arch/sh/configs/titan_defconfig | 2 +-
> arch/sh/configs/ul2_defconfig | 2 +-
> arch/sh/configs/urquell_defconfig | 2 +-
> arch/sh/include/asm/setup.h | 1 -
> arch/sh/kernel/head_32.S | 2 +-
> arch/sh/kernel/setup.c | 27 +-
> arch/sparc/boot/piggyback.c | 4 +-
> arch/sparc/configs/sparc32_defconfig | 2 +-
> arch/sparc/configs/sparc64_defconfig | 2 +-
> arch/sparc/kernel/head_32.S | 4 +-
> arch/sparc/kernel/head_64.S | 6 +-
> arch/sparc/kernel/setup_32.c | 9 +-
> arch/sparc/kernel/setup_64.c | 9 +-
> arch/sparc/mm/init_32.c | 22 +-
> arch/sparc/mm/init_64.c | 20 +-
> arch/um/kernel/Makefile | 2 +-
> arch/um/kernel/initrd.c | 6 +-
> arch/x86/Kconfig | 2 +-
> arch/x86/boot/header.S | 2 +-
> arch/x86/boot/startup/sme.c | 2 +-
> arch/x86/configs/i386_defconfig | 2 +-
> arch/x86/configs/x86_64_defconfig | 2 +-
> arch/x86/include/uapi/asm/bootparam.h | 7 +-
> arch/x86/kernel/cpu/microcode/amd.c | 2 +-
> arch/x86/kernel/cpu/microcode/core.c | 12 +-
> arch/x86/kernel/cpu/microcode/intel.c | 2 +-
> arch/x86/kernel/cpu/microcode/internal.h | 2 +-
> arch/x86/kernel/devicetree.c | 2 +-
> arch/x86/kernel/setup.c | 39 +-
> arch/x86/mm/init.c | 8 +-
> arch/x86/mm/init_32.c | 2 +-
> arch/x86/mm/init_64.c | 2 +-
> arch/x86/tools/relocs.c | 2 +-
> arch/xtensa/Kconfig | 2 +-
> arch/xtensa/boot/dts/csp.dts | 2 +-
> arch/xtensa/configs/audio_kc705_defconfig | 2 +-
> arch/xtensa/configs/cadence_csp_defconfig | 12 +-
> arch/xtensa/configs/generic_kc705_defconfig | 2 +-
> arch/xtensa/configs/nommu_kc705_defconfig | 12 +-
> arch/xtensa/configs/smp_lx200_defconfig | 2 +-
> arch/xtensa/configs/virt_defconfig | 2 +-
> arch/xtensa/configs/xip_kc705_defconfig | 2 +-
> arch/xtensa/kernel/setup.c | 26 +-
> drivers/acpi/Kconfig | 2 +-
> drivers/acpi/tables.c | 10 +-
> drivers/base/firmware_loader/main.c | 2 +-
> drivers/block/Kconfig | 8 +-
> drivers/block/brd.c | 20 +-
> drivers/firmware/efi/efi.c | 10 +-
> .../firmware/efi/libstub/efi-stub-helper.c | 5 +-
> drivers/gpu/drm/ci/arm.config | 2 +-
> drivers/gpu/drm/ci/arm64.config | 2 +-
> drivers/gpu/drm/ci/x86_64.config | 2 +-
> drivers/of/fdt.c | 18 +-
> fs/ext2/ext2.h | 9 -
> fs/init.c | 14 -
> include/asm-generic/vmlinux.lds.h | 8 +-
> include/linux/ext2_fs.h | 13 -
> include/linux/init_syscalls.h | 1 -
> include/linux/initramfs.h | 26 ++
> include/linux/initrd.h | 37 --
> include/linux/root_dev.h | 1 -
> include/linux/syscalls.h | 1 -
> include/uapi/linux/sysctl.h | 1 -
> init/.kunitconfig | 2 +-
> init/Kconfig | 28 +-
> init/Makefile | 6 +-
> init/do_mounts.c | 28 +-
> init/do_mounts.h | 42 --
> init/do_mounts_initrd.c | 154 -------
> init/do_mounts_rd.c | 334 ---------------
> init/initramfs.c | 152 ++++---
> init/main.c | 66 +--
> kernel/sys.c | 7 +-
> kernel/sysctl.c | 2 +-
> kernel/umh.c | 2 +-
> scripts/package/builddeb | 2 +-
> .../ktest/examples/bootconfigs/tracing.bconf | 3 -
> tools/testing/selftests/bpf/config.aarch64 | 2 +-
> tools/testing/selftests/bpf/config.ppc64el | 2 +-
> tools/testing/selftests/bpf/config.riscv64 | 2 +-
> tools/testing/selftests/bpf/config.s390x | 2 +-
> tools/testing/selftests/kho/vmtest.sh | 2 +-
> .../testing/selftests/nolibc/Makefile.nolibc | 4 +-
> tools/testing/selftests/vsock/config | 2 +-
> .../selftests/wireguard/qemu/kernel.config | 2 +-
> usr/Kconfig | 70 ++--
> usr/Makefile | 2 +-
> usr/initramfs_data.S | 4 +-
> 385 files changed, 969 insertions(+), 2346 deletions(-)
> delete mode 100644 Documentation/admin-guide/initrd.rst
> delete mode 100644 Documentation/power/swsusp-dmcrypt.rst
> create mode 100644 include/linux/initramfs.h
> delete mode 100644 include/linux/initrd.h
> delete mode 100644 init/do_mounts_initrd.c
> delete mode 100644 init/do_mounts_rd.c
>
>
> base-commit: 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-23 12:04 ` [PATCH RESEND 00/62] initrd: remove classic initrd support Christophe Leroy
@ 2025-09-24 16:17 ` Alexander Patrakov
2025-09-24 19:20 ` Rob Landley
0 siblings, 1 reply; 95+ messages in thread
From: Alexander Patrakov @ 2025-09-24 16:17 UTC (permalink / raw)
To: Christophe Leroy
Cc: Askar Safin, linux-fsdevel, linux-kernel, Linus Torvalds,
Greg Kroah-Hartman, Christian Brauner, Al Viro, Jan Kara,
Christoph Hellwig, Jens Axboe, Andy Shevchenko, Aleksa Sarai,
Thomas Weißschuh, Julian Stecklina, Gao Xiang, Art Nikpal,
Andrew Morton, Eric Curtin, Alexander Graf, Rob Landley,
Lennart Poettering, linux-arch, linux-alpha, linux-snps-arc,
linux-arm-kernel, linux-csky, linux-hexagon, loongarch,
linux-m68k, linux-mips, linux-openrisc, linux-parisc,
linuxppc-dev, linux-riscv, linux-s390, linux-sh, sparclinux,
linux-um, x86, Ingo Molnar, linux-block, initramfs, linux-api,
linux-doc, linux-efi, linux-ext4, Theodore Y . Ts'o,
linux-acpi, Michal Simek, devicetree, Luis Chamberlain, Kees Cook,
Thorsten Blum, Heiko Carstens, patches
On Tue, Sep 23, 2025 at 8:22 PM Christophe Leroy
<christophe.leroy@csgroup.eu> wrote:
>
>
>
> Le 13/09/2025 à 02:37, Askar Safin a écrit :
> > [Vous ne recevez pas souvent de courriers de safinaskar@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
> >
> > Intro
> > ====
> > This patchset removes classic initrd (initial RAM disk) support,
> > which was deprecated in 2020.
> > Initramfs still stays, and RAM disk itself (brd) still stays, too.
> > init/do_mounts* and init/*initramfs* are listed in VFS entry in
> > MAINTAINERS, so I think this patchset should go through VFS tree.
> > This patchset touchs every subdirectory in arch/, so I tested it
> > on 8 (!!!) archs in Qemu (see details below).
> > Warning: this patchset renames CONFIG_BLK_DEV_INITRD (!!!) to CONFIG_INITRAMFS
> > and CONFIG_RD_* to CONFIG_INITRAMFS_DECOMPRESS_* (for example,
> > CONFIG_RD_GZIP to CONFIG_INITRAMFS_DECOMPRESS_GZIP).
> > If you still use initrd, see below for workaround.
>
> Apologise if my question looks stupid, but I'm using QEMU for various
> tests, and the way QEMU is started is something like:
>
> qemu-system-ppc -kernel ./vmlinux -cpu g4 -M mac99 -initrd
> ./qemu/rootfs.cpio.gz
>
> I was therefore expecting (and fearing) it to fail with your series
> applied, but surprisingly it still works.
>
> Therefore is it really initrd you are removing or just some corner case
> ? If it is really initrd, then how does QEMU still work with that
> -initrd parameter ?
The QEMU -initrd parameter is a misnomer. It can be used to pass an
initrd or an initramfs, and the kernel automatically figures out what
it is. What you are passing is an initramfs (a gzipped cpio archive
with all the files), which is a modern and supported use case.
--
Alexander Patrakov
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH RESEND 00/62] initrd: remove classic initrd support
2025-09-24 16:17 ` Alexander Patrakov
@ 2025-09-24 19:20 ` Rob Landley
0 siblings, 0 replies; 95+ messages in thread
From: Rob Landley @ 2025-09-24 19:20 UTC (permalink / raw)
To: Alexander Patrakov, Christophe Leroy
Cc: Askar Safin, linux-fsdevel, linux-kernel, Linus Torvalds,
Greg Kroah-Hartman, Christian Brauner, Al Viro, Jan Kara,
Christoph Hellwig, Jens Axboe, Andy Shevchenko, Aleksa Sarai,
Thomas Weißschuh, Julian Stecklina, Gao Xiang, Art Nikpal,
Andrew Morton, Eric Curtin, Alexander Graf, Lennart Poettering,
linux-arch, linux-alpha, linux-snps-arc, linux-arm-kernel,
linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
linux-s390, linux-sh, sparclinux, linux-um, x86, Ingo Molnar,
linux-block, initramfs, linux-api, linux-doc, linux-efi,
linux-ext4, Theodore Y . Ts'o, linux-acpi, Michal Simek,
devicetree, Luis Chamberlain, Kees Cook, Thorsten Blum,
Heiko Carstens, patches
On 9/24/25 11:17, Alexander Patrakov wrote:
>> Therefore is it really initrd you are removing or just some corner case
>> ? If it is really initrd, then how does QEMU still work with that
>> -initrd parameter ?
>
> The QEMU -initrd parameter is a misnomer. It can be used to pass an
> initrd or an initramfs, and the kernel automatically figures out what
> it is.
It's not a misnomer, initrams has always been able to make use of the
existing initrd loading mechanism to read images externally supplied by
the bootloader. It's what grub calls it too. I documented it in the
"External initramfs images" section of
https://kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
back in 2005. The mechanism itself is 30 years old
(Documentation/initrd.txt was written by Werner Almsberger in linux
1.3.73 from March 7, 1996, ala
https://github.com/mpe/linux-fullhistory/commit/afc106342783 ).
Since initrd contents could always be in a bunch of different
autodetected formats (and optionally compressed just like the kernel),
initramfs just hooked in to the staircase and said "if the format is
cpio, call this function to handle it". The patch series proposes
removing all the other formats, but not otherwise changing the existing
external image loader mechanism. (Personally I think removing the
architecture-specific hacks but leaving the generic support under init/
would probably have made more sense as a first step.)
The bootloader hands off an initrd image, initramfs is the boot-time
cpio extraction plumbing that's _init tagged and gets freed, and rootfs
is the persistent mounted instance of ramfs or tmpfs that's always there
and is analogous to the init task (PID 1) except for the mount tree.
(And is often overmounted so it's not visible, but it's still there. And
is NOT SPECIAL: overmounts aren't a new concept, nor is hiding them in
things like "df".)
There's a REASON my documentation file was called
ramfs-rootfs-initramfs.txt: the naming's always been a bit... layered.
(And yes, I have always spelled initmpfs with only one t.)
Rob
^ permalink raw reply [flat|nested] 95+ messages in thread