ARM: abstract atags parsing
PATCH 1/1 ARM: abstract atags parsing
Make atags parsing into a source file of its own, namely atags_parse.c. Also rename compat.c to atags_compat.c to make it clearer what it is about. Same for atags.c which is now atags_proc.c. Gather all the atags function declarations into a common atags.h, and the generic setup ones into setup.h.
This code movement will make it cleaner and easier to introduce support for device tree which is basically an alternative to atags. No functional changes are introduced by this patch.
arch/arm/kernel/Makefile +3 -3
@@ -13,11 +13,11 @@ CFLAGS_REMOVE_return_address.o = -pg # Object file lists. -obj-y := elf.o entry-armv.o entry-common.o irq.o \ +obj-y := atags_parse.o 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_DEPRECATED_PARAM_STRUCT) += atags_compat.o obj-$(CONFIG_LEDS) += leds.o obj-$(CONFIG_OC_ETM) += etm.o
@@ -35,7 +35,7 @@ obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o obj-$(CONFIG_KPROBES) += kprobes.o kprobes-decode.o -obj-$(CONFIG_ATAGS_PROC) += atags.o +obj-$(CONFIG_ATAGS_PROC) += atags_proc.o obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o obj-$(CONFIG_ARM_THUMBEE) += thumbee.o obj-$(CONFIG_KGDB) += kgdb.o
arch/arm/kernel/atags.c deleted +0 -83
83 lines not on this page · raw message
arch/arm/kernel/atags.h +3 -0
@@ -3,3 +3,6 @@ extern void save_atags(struct tag *tags);#else static inline void save_atags (struct tag *tags) { }#endif + +extern void convert_to_tag_list (struct tag *tags); +extern void atags_init (struct machine_desc *mdesc,char **cmdline_p);
arch/arm/kernel/atags_compat.c new file +219 -0
219 lines not on this page · raw message
arch/arm/kernel/atags_parse.c new file +205 -0
205 lines not on this page · raw message
arch/arm/kernel/atags_proc.c new file +83 -0
83 lines not on this page · raw message
arch/arm/kernel/compat.c deleted +0 -219
219 lines not on this page · raw message
arch/arm/kernel/compat.h deleted +0 -11
@@ -1,11 +0,0 @@ -/* -* linux/arch/arm/kernel/compat.h -* -* Copyright (C) 2001 Russell King -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -extern void convert_to_tag_list (struct tag *tags);
arch/arm/kernel/setup.c +12 -190
269 lines not on this page · raw message
arch/arm/kernel/setup.h new file +6 -0
@@ -0,0 +1,6 @@ +extern void arm_kernel_cmdline (const char *cmdline); +extern int arm_add_memory (unsigned long start,unsigned long size); +extern void arm_setup_ramdisk (int doload,int prompt,int image_start, +unsigned int rd_sz); + +
PATCH 1/1 ARM: abstract atags parsing
Quoted 3 lines · Nicolas Pitre
This code movement will make it cleaner and easier to introduce support for device tree which is basically an alternative to atags. No functional changes are introduced by this patch.
I don't see any point to this churn.
DT has yet to be shown to be useful on anything but the ARM evaluation boards, and that's one of the pre-conditions to it becoming acceptable (which has been pending for a few years now.)
PATCH 1/1 ARM: abstract atags parsing
Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Nicolas Pitre
This code movement will make it cleaner and easier to introduce support for device tree which is basically an alternative to atags. No functional changes are introduced by this patch.
I don't see any point to this churn.
I can carry it in test-devicetree branch until you become okay with it.
Quoted 3 lines
DT has yet to be shown to be useful on anything but the ARM evaluation boards, and that's one of the pre-conditions to it becoming acceptable (which has been pending for a few years now.)
I started working on ARM DT support in November/December 2009. Not even a year yet.
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
PATCH 1/1 ARM: abstract atags parsing
Quoted 9 lines · Grant Likely
Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Nicolas Pitre
This code movement will make it cleaner and easier to introduce support for device tree which is basically an alternative to atags. No functional changes are introduced by this patch.
I don't see any point to this churn.
Quoted 8 lines
I can carry it in test-devicetree branch until you become okay with it.
Quoted 3 lines
DT has yet to be shown to be useful on anything but the ARM evaluation boards, and that's one of the pre-conditions to it becoming acceptable (which has been pending for a few years now.)
I started working on ARM DT support in November/December 2009. Not even a year yet.
I don't believe you're the only one to be or have been working on it, but I've no direct references to other work and can't be bothered to go and find any.
PATCH 1/1 ARM: abstract atags parsing
Quoted 16 lines · Ben Dooks
Quoted 15 lines · Grant Likely
Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Nicolas Pitre
This code movement will make it cleaner and easier to introduce support for device tree which is basically an alternative to atags. No functional changes are introduced by this patch.
I don't see any point to this churn.
I can carry it in test-devicetree branch until you become okay with it.
Quoted 3 lines
DT has yet to be shown to be useful on anything but the ARM evaluation boards, and that's one of the pre-conditions to it becoming acceptable (which has been pending for a few years now.)
Quoted 6 lines
Quoted 2 lines
I started working on ARM DT support in November/December 2009. Not even a year yet.
I don't believe you're the only one to be or have been working on it, but I've no direct references to other work and can't be bothered to go and find any.
There was an attempt or two before I started working on it. Janboe Ye posted one version on May 27, 09, but it wasn't viable. Basically took the approach of duplicating the powerpc code instead of moving it to a common location and generalizing it.
Jeremy Kerr started hacking on it shortly after I began, and quite a few other engineers have started working on it since. The MIPS folks also have patches pending to add support, and I've also got x86 patches that may very well get merged in the next window.
g.
PATCH 1/1 ARM: abstract atags parsing
In reply to Grant LikelyQuoted 10 lines · Grant Likely
Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Nicolas Pitre
This code movement will make it cleaner and easier to introduce support for device tree which is basically an alternative to atags. No functional changes are introduced by this patch.
I don't see any point to this churn.
I can carry it in test-devicetree branch until you become okay with it.
That is probably the best course of action. I thought this was a nice cleanup that could stand on its own, but if RMK doesn't want it without a bigger reason (e.g. full DT implementation) then it is best if you carry it in your repository.
Nicolas