Commit 73a65b3f authored by Uwe Kleine-König's avatar Uwe Kleine-König

ARM: deprecate support for old way to pass kernel parameters

This was deprecated in 2001 and announced to live on for 5 years.

For now provide a kernel parameter for those who still need it.
Acked-by: default avatarEric Miao <eric.miao@canonical.com>
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
parent 8d68fe70
...@@ -1374,6 +1374,12 @@ config UACCESS_WITH_MEMCPY ...@@ -1374,6 +1374,12 @@ config UACCESS_WITH_MEMCPY
However, if the CPU data cache is using a write-allocate mode, However, if the CPU data cache is using a write-allocate mode,
this option is unlikely to provide any performance gain. this option is unlikely to provide any performance gain.
config DEPRECATED_PARAM_STRUCT
bool "Provide old way to pass kernel parameters"
help
This was deprecated in 2001 and announced to live on for 5 years.
Some old boot loaders still use this way.
endmenu endmenu
menu "Boot options" menu "Boot options"
......
...@@ -13,10 +13,12 @@ CFLAGS_REMOVE_return_address.o = -pg ...@@ -13,10 +13,12 @@ CFLAGS_REMOVE_return_address.o = -pg
# Object file lists. # Object file lists.
obj-y := compat.o elf.o entry-armv.o entry-common.o irq.o \ obj-y := elf.o entry-armv.o entry-common.o irq.o \
process.o ptrace.o return_address.o setup.o signal.o \ process.o ptrace.o return_address.o setup.o signal.o \
sys_arm.o stacktrace.o time.o traps.o sys_arm.o stacktrace.o time.o traps.o
obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += compat.o
obj-$(CONFIG_LEDS) += leds.o obj-$(CONFIG_LEDS) += leds.o
obj-$(CONFIG_OC_ETM) += etm.o obj-$(CONFIG_OC_ETM) += etm.o
......
...@@ -217,10 +217,3 @@ void __init convert_to_tag_list(struct tag *tags) ...@@ -217,10 +217,3 @@ void __init convert_to_tag_list(struct tag *tags)
struct param_struct *params = (struct param_struct *)tags; struct param_struct *params = (struct param_struct *)tags;
build_tag_list(params, &params->u2); build_tag_list(params, &params->u2);
} }
void __init squash_mem_tags(struct tag *tag)
{
for (; tag->hdr.size; tag = tag_next(tag))
if (tag->hdr.tag == ATAG_MEM)
tag->hdr.tag = ATAG_NONE;
}
...@@ -9,5 +9,3 @@ ...@@ -9,5 +9,3 @@
*/ */
extern void convert_to_tag_list(struct tag *tags); extern void convert_to_tag_list(struct tag *tags);
extern void squash_mem_tags(struct tag *tag);
...@@ -44,7 +44,9 @@ ...@@ -44,7 +44,9 @@
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/unwind.h> #include <asm/unwind.h>
#if defined(CONFIG_DEPRECATED_PARAM_STRUCT)
#include "compat.h" #include "compat.h"
#endif
#include "atags.h" #include "atags.h"
#include "tcm.h" #include "tcm.h"
...@@ -663,6 +665,13 @@ static int __init customize_machine(void) ...@@ -663,6 +665,13 @@ static int __init customize_machine(void)
} }
arch_initcall(customize_machine); arch_initcall(customize_machine);
static void __init squash_mem_tags(struct tag *tag)
{
for (; tag->hdr.size; tag = tag_next(tag))
if (tag->hdr.tag == ATAG_MEM)
tag->hdr.tag = ATAG_NONE;
}
void __init setup_arch(char **cmdline_p) void __init setup_arch(char **cmdline_p)
{ {
struct tag *tags = (struct tag *)&init_tags; struct tag *tags = (struct tag *)&init_tags;
...@@ -683,12 +692,14 @@ void __init setup_arch(char **cmdline_p) ...@@ -683,12 +692,14 @@ void __init setup_arch(char **cmdline_p)
else if (mdesc->boot_params) else if (mdesc->boot_params)
tags = phys_to_virt(mdesc->boot_params); tags = phys_to_virt(mdesc->boot_params);
#if defined(CONFIG_DEPRECATED_PARAM_STRUCT)
/* /*
* If we have the old style parameters, convert them to * If we have the old style parameters, convert them to
* a tag list. * a tag list.
*/ */
if (tags->hdr.tag != ATAG_CORE) if (tags->hdr.tag != ATAG_CORE)
convert_to_tag_list(tags); convert_to_tag_list(tags);
#endif
if (tags->hdr.tag != ATAG_CORE) if (tags->hdr.tag != ATAG_CORE)
tags = (struct tag *)&init_tags; tags = (struct tag *)&init_tags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment