Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201694
b: refs/heads/master
c: 73a65b3
h: refs/heads/master
v: v3
  • Loading branch information
Uwe Kleine-König committed Jul 7, 2010
1 parent 7422001 commit 5014672
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d68fe7029ed2631363f6f37155586c0707b8dc0
refs/heads/master: 73a65b3f8587fa1c83768515ecc0bf6fa44ccdd1
6 changes: 6 additions & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/arm/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 0 additions & 7 deletions trunk/arch/arm/kernel/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 0 additions & 2 deletions trunk/arch/arm/kernel/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@
*/

extern void convert_to_tag_list(struct tag *tags);

extern void squash_mem_tags(struct tag *tag);
11 changes: 11 additions & 0 deletions trunk/arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 5014672

Please sign in to comment.