--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -1587,6 +1587,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
+@@ -1566,6 +1566,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
The command-line arguments provided by the boot loader will be
appended to the the device tree bootargs property.
config CMDLINE
--- a/arch/arm/boot/compressed/atags_to_fdt.c
+++ b/arch/arm/boot/compressed/atags_to_fdt.c
-@@ -5,6 +5,8 @@
+@@ -6,6 +6,8 @@
#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND)
#define do_extend_cmdline 1
#else
#define do_extend_cmdline 0
#endif
-@@ -20,6 +22,7 @@ static int node_offset(void *fdt, const
+@@ -21,6 +23,7 @@ static int node_offset(void *fdt, const
return offset;
}
static int setprop(void *fdt, const char *node_path, const char *property,
void *val_array, int size)
{
-@@ -28,6 +31,7 @@ static int setprop(void *fdt, const char
+@@ -29,6 +32,7 @@ static int setprop(void *fdt, const char
return offset;
return fdt_setprop(fdt, offset, property, val_array, size);
}
static int setprop_string(void *fdt, const char *node_path,
const char *property, const char *string)
-@@ -38,6 +42,7 @@ static int setprop_string(void *fdt, con
+@@ -39,6 +43,7 @@ static int setprop_string(void *fdt, con
return fdt_setprop_string(fdt, offset, property, string);
}
static int setprop_cell(void *fdt, const char *node_path,
const char *property, uint32_t val)
{
-@@ -46,6 +51,7 @@ static int setprop_cell(void *fdt, const
+@@ -47,6 +52,7 @@ static int setprop_cell(void *fdt, const
return offset;
return fdt_setprop_cell(fdt, offset, property, val);
}
static const void *getprop(const void *fdt, const char *node_path,
const char *property, int *len)
-@@ -58,6 +64,7 @@ static const void *getprop(const void *f
+@@ -59,6 +65,7 @@ static const void *getprop(const void *f
return fdt_getprop(fdt, offset, property, len);
}
static uint32_t get_cell_size(const void *fdt)
{
int len;
-@@ -69,6 +76,74 @@ static uint32_t get_cell_size(const void
+@@ -70,6 +77,74 @@ static uint32_t get_cell_size(const void
return cell_size;
}
static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline)
{
char cmdline[COMMAND_LINE_SIZE];
-@@ -88,18 +163,28 @@ static void merge_fdt_bootargs(void *fdt
+@@ -89,18 +164,28 @@ static void merge_fdt_bootargs(void *fdt
/* and append the ATAG_CMDLINE */
if (fdt_cmdline) {
static void hex_str(char *out, uint32_t value)
{
uint32_t digit;
-@@ -117,6 +202,7 @@ static void hex_str(char *out, uint32_t
+@@ -118,6 +203,7 @@ static void hex_str(char *out, uint32_t
}
*out = '\0';
}
/*
* Convert and fold provided ATAGs into the provided FDT.
-@@ -131,9 +217,11 @@ int atags_to_fdt(void *atag_list, void *
+@@ -132,9 +218,11 @@ int atags_to_fdt(void *atag_list, void *
struct tag *atag = atag_list;
/* In the case of 64 bits memory size, need to reserve 2 cells for
* address and size for each bank */
/* make sure we've got an aligned pointer */
if ((u32)atag_list & 0x3)
-@@ -168,7 +256,9 @@ int atags_to_fdt(void *atag_list, void *
+@@ -169,7 +257,9 @@ int atags_to_fdt(void *atag_list, void *
else
setprop_string(fdt, "/chosen", "bootargs",
atag->u.cmdline.cmdline);
if (memcount >= sizeof(mem_reg_property)/4)
continue;
if (!atag->u.mem.size)
-@@ -212,6 +302,10 @@ int atags_to_fdt(void *atag_list, void *
+@@ -213,6 +303,10 @@ int atags_to_fdt(void *atag_list, void *
setprop(fdt, "/memory", "reg", mem_reg_property,
4 * memcount * memsize);
}
}
--- a/init/main.c
+++ b/init/main.c
-@@ -112,6 +112,10 @@
+@@ -111,6 +111,10 @@
#include <kunit/test.h>
+
static int kernel_init(void *);
- extern void init_IRQ(void);
-@@ -993,6 +997,18 @@ asmlinkage __visible void __init __no_sa
- page_alloc_init();
+ /*
+@@ -927,6 +931,18 @@ void start_kernel(void)
+ boot_cpu_hotplug_init();
pr_notice("Kernel command line: %s\n", saved_command_line);
+