]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: deprecate support for old way to pass kernel parameters
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 19 Jan 2010 09:13:14 +0000 (10:13 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 7 Jul 2010 14:38:36 +0000 (16:38 +0200)
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: Eric Miao <eric.miao@canonical.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
arch/arm/Kconfig
arch/arm/kernel/Makefile
arch/arm/kernel/compat.c
arch/arm/kernel/compat.h
arch/arm/kernel/setup.c

index 1f254bd6c937ece2e6d6a6b1040d954cc923cd7a..a53ac6570b66700fca4d97d94dadd80bfb9017f9 100644 (file)
@@ -1374,6 +1374,12 @@ config UACCESS_WITH_MEMCPY
          However, if the CPU data cache is using a write-allocate mode,
          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
 
 menu "Boot options"
index 26d302c28e1318b4aa5db81a491fcd6a82b0e6fa..021f72d897990b93befdfa5e597ad5db6d21d4c9 100644 (file)
@@ -13,10 +13,12 @@ CFLAGS_REMOVE_return_address.o = -pg
 
 # 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 \
                   sys_arm.o stacktrace.o time.o traps.o
 
+obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += compat.o
+
 obj-$(CONFIG_LEDS)             += leds.o
 obj-$(CONFIG_OC_ETM)           += etm.o
 
index 0a1385442f4344548bf20c5c0b28090f743e12b3..925652318b8b5df4cb7dce4383b99cee2640285b 100644 (file)
@@ -217,10 +217,3 @@ void __init convert_to_tag_list(struct tag *tags)
        struct param_struct *params = (struct param_struct *)tags;
        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;
-}
index 27e61a68bd1c5693909a4ac0dbbdb00c6663b684..39264ab1b9c640cd81447f4a54ec1f19c118fede 100644 (file)
@@ -9,5 +9,3 @@
 */
 
 extern void convert_to_tag_list(struct tag *tags);
-
-extern void squash_mem_tags(struct tag *tag);
index 122d999bdc7ca0c8f690355a101f59f1ea8152f8..cbc6ddb1c9bde7204fd2e184ad0bcb80ffc69c31 100644 (file)
@@ -44,7 +44,9 @@
 #include <asm/traps.h>
 #include <asm/unwind.h>
 
+#if defined(CONFIG_DEPRECATED_PARAM_STRUCT)
 #include "compat.h"
+#endif
 #include "atags.h"
 #include "tcm.h"
 
@@ -663,6 +665,13 @@ static int __init customize_machine(void)
 }
 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)
 {
        struct tag *tags = (struct tag *)&init_tags;
@@ -683,12 +692,14 @@ void __init setup_arch(char **cmdline_p)
        else if (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
         * a tag list.
         */
        if (tags->hdr.tag != ATAG_CORE)
                convert_to_tag_list(tags);
+#endif
        if (tags->hdr.tag != ATAG_CORE)
                tags = (struct tag *)&init_tags;