* [PATCH v2 08/21] of/fdt: consolidate built-in dtb section variables
2014-04-23 1:18 [PATCH v2 00/21] FDT clean-ups and libfdt support Rob Herring
@ 2014-04-23 1:18 ` Rob Herring
2014-04-23 14:22 ` [PATCH v2 00/21] FDT clean-ups and libfdt support Michal Simek
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2014-04-23 1:18 UTC (permalink / raw)
To: Grant Likely, linux-kernel, devicetree
Cc: Rob Herring, Chris Zankel, linux-xtensa, Ralf Baechle,
Max Filippov, linux-mips, linux, linux-metag
From: Rob Herring <robh@kernel.org>
Unify the various architectures __dtb_start and __dtb_end definitions
moving them into of_fdt.h.
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-metag@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux@lists.openrisc.net
Cc: linux-xtensa@linux-xtensa.org
---
v2: no change
arch/arc/include/asm/sections.h | 1 -
arch/metag/kernel/setup.c | 4 ----
arch/mips/include/asm/mips-boards/generic.h | 2 --
arch/mips/lantiq/prom.h | 2 --
arch/mips/netlogic/xlp/dt.c | 2 +-
arch/mips/ralink/of.c | 2 --
arch/openrisc/kernel/vmlinux.h | 2 --
arch/xtensa/kernel/setup.c | 1 -
include/linux/of_fdt.h | 3 +++
9 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/arch/arc/include/asm/sections.h b/arch/arc/include/asm/sections.h
index 764f1e3..09db952 100644
--- a/arch/arc/include/asm/sections.h
+++ b/arch/arc/include/asm/sections.h
@@ -12,6 +12,5 @@
#include <asm-generic/sections.h>
extern char __arc_dccm_base[];
-extern char __dtb_start[];
#endif
diff --git a/arch/metag/kernel/setup.c b/arch/metag/kernel/setup.c
index 129c7cd..31cf53d 100644
--- a/arch/metag/kernel/setup.c
+++ b/arch/metag/kernel/setup.c
@@ -105,10 +105,6 @@
extern char _heap_start[];
-#ifdef CONFIG_METAG_BUILTIN_DTB
-extern u32 __dtb_start[];
-#endif
-
#ifdef CONFIG_DA_CONSOLE
/* Our early channel based console driver */
extern struct console dash_console;
diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h
index b969491..c904c24 100644
--- a/arch/mips/include/asm/mips-boards/generic.h
+++ b/arch/mips/include/asm/mips-boards/generic.h
@@ -67,8 +67,6 @@
extern int mips_revision_sconid;
-extern char __dtb_start[];
-
#ifdef CONFIG_PCI
extern void mips_pcibios_init(void);
#else
diff --git a/arch/mips/lantiq/prom.h b/arch/mips/lantiq/prom.h
index 69a4c58..bfd2d58 100644
--- a/arch/mips/lantiq/prom.h
+++ b/arch/mips/lantiq/prom.h
@@ -26,6 +26,4 @@ struct ltq_soc_info {
extern void ltq_soc_detect(struct ltq_soc_info *i);
extern void ltq_soc_init(void);
-extern char __dtb_start[];
-
#endif
diff --git a/arch/mips/netlogic/xlp/dt.c b/arch/mips/netlogic/xlp/dt.c
index 7f9615a..bdde331 100644
--- a/arch/mips/netlogic/xlp/dt.c
+++ b/arch/mips/netlogic/xlp/dt.c
@@ -42,7 +42,7 @@
#include <asm/prom.h>
extern u32 __dtb_xlp_evp_begin[], __dtb_xlp_svp_begin[],
- __dtb_xlp_fvp_begin[], __dtb_xlp_gvp_begin[], __dtb_start[];
+ __dtb_xlp_fvp_begin[], __dtb_xlp_gvp_begin[];
static void *xlp_fdt_blob;
void __init *xlp_dt_init(void *fdtp)
diff --git a/arch/mips/ralink/of.c b/arch/mips/ralink/of.c
index 91d7060..2513952 100644
--- a/arch/mips/ralink/of.c
+++ b/arch/mips/ralink/of.c
@@ -28,8 +28,6 @@
__iomem void *rt_sysc_membase;
__iomem void *rt_memc_membase;
-extern char __dtb_start[];
-
__iomem void *plat_of_remap_node(const char *node)
{
struct resource res;
diff --git a/arch/openrisc/kernel/vmlinux.h b/arch/openrisc/kernel/vmlinux.h
index 70b9ce4..bbcdf21 100644
--- a/arch/openrisc/kernel/vmlinux.h
+++ b/arch/openrisc/kernel/vmlinux.h
@@ -5,6 +5,4 @@
extern char __initrd_start, __initrd_end;
#endif
-extern u32 __dtb_start[];
-
#endif
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 84fe931..89986e5 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -73,7 +73,6 @@ extern int initrd_below_start_ok;
#endif
#ifdef CONFIG_OF
-extern u32 __dtb_start[];
void *dtb_start = __dtb_start;
#endif
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index ddd7219..d4d0efe 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -80,6 +80,9 @@ extern int __initdata dt_root_addr_cells;
extern int __initdata dt_root_size_cells;
extern struct boot_param_header *initial_boot_params;
+extern char __dtb_start[];
+extern char __dtb_end[];
+
/* For scanning the flat device-tree at boot time */
extern char *find_flat_dt_string(u32 offset);
extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname,
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2 00/21] FDT clean-ups and libfdt support
2014-04-23 1:18 [PATCH v2 00/21] FDT clean-ups and libfdt support Rob Herring
2014-04-23 1:18 ` [PATCH v2 08/21] of/fdt: consolidate built-in dtb section variables Rob Herring
@ 2014-04-23 14:22 ` Michal Simek
2014-04-23 21:04 ` Max Filippov
[not found] ` <1398215901-25609-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
3 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2014-04-23 14:22 UTC (permalink / raw)
To: Rob Herring
Cc: Grant Likely, linux-kernel, devicetree, Rob Herring,
Aurelien Jacquiot, Benjamin Herrenschmidt, Chris Zankel,
H. Peter Anvin, Ingo Molnar, James Hogan, Jonas Bonn,
linux-arm-kernel, linux-c6x-dev, linux, linux-metag, linux-mips,
linuxppc-dev, linux-xtensa, Mark Salter, Max Filippov,
Paul Mackerras, Ralf Baechle, Russell King, Thomas Gleixner,
Vineet Gupta, x86
[-- Attachment #1: Type: text/plain, Size: 5051 bytes --]
On 04/23/2014 03:18 AM, Rob Herring wrote:
> From: Rob Herring <robh@kernel.org>
>
> This is a series of clean-ups of architecture FDT code and converts the
> core FDT code over to using libfdt functions. This is in preparation
> to add FDT based address translation parsing functions for early
> console support. This series removes direct access to FDT data from all
> arches except powerpc.
>
> The current MIPS lantiq and xlp DT code is buggy as built-in DTBs need
> to be copied out of init section. Patches 2 and 3 should be applied to
> 3.15.
>
> Changes in v2 are relatively minor. There was a bug in the unflattening
> code where walking up the tree was not being handled correctly (thanks
> to Michal Simek). I re-worked things a bit to avoid globally adding
> libfdt include paths.
>
> A branch is available here[1], and I plan to put into linux-next in a few
> days. Please test! I've compiled on arm, arm64, mips, microblaze, xtensa,
> and powerpc and booted on arm and arm64.
>
> Rob
>
> [1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git libfdt
>
> Rob Herring (21):
> mips: octeon: convert to use unflatten_and_copy_device_tree
> mips: lantiq: copy built-in DTB out of init section
> mips: xlp: copy built-in DTB out of init section
> mips: ralink: convert to use unflatten_and_copy_device_tree
> ARM: dt: use default early_init_dt_alloc_memory_arch
> c6x: convert fdt pointers to opaque pointers
> mips: convert fdt pointers to opaque pointers
> of/fdt: consolidate built-in dtb section variables
> of/fdt: remove some unneeded includes
> of/fdt: remove unused of_scan_flat_dt_by_path
> of/fdt: update of_get_flat_dt_prop in prep for libfdt
> of/fdt: Convert FDT functions to use libfdt
> of/fdt: use libfdt accessors for header data
> of/fdt: create common debugfs
> of/fdt: move memreserve and dtb memory reservations into core
> of/fdt: fix phys_addr_t related print size warnings
> of/fdt: introduce of_get_flat_dt_size
> powerpc: use libfdt accessors for header data
> x86: use FDT accessors for FDT blob header data
> of/fdt: convert initial_boot_params to opaque pointer
> of: push struct boot_param_header and defines into powerpc
>
> arch/arc/include/asm/sections.h | 1 -
> arch/arc/kernel/devtree.c | 2 +-
> arch/arm/include/asm/prom.h | 2 -
> arch/arm/kernel/devtree.c | 34 +--
> arch/arm/mach-exynos/exynos.c | 2 +-
> arch/arm/mach-vexpress/platsmp.c | 2 +-
> arch/arm/mm/init.c | 1 -
> arch/arm/plat-samsung/s5p-dev-mfc.c | 4 +-
> arch/arm64/mm/init.c | 21 --
> arch/c6x/kernel/setup.c | 4 +-
> arch/metag/kernel/setup.c | 4 -
> arch/microblaze/kernel/prom.c | 39 +--
> arch/mips/cavium-octeon/setup.c | 20 +-
> arch/mips/include/asm/mips-boards/generic.h | 4 -
> arch/mips/include/asm/prom.h | 6 +-
> arch/mips/kernel/prom.c | 2 +-
> arch/mips/lantiq/prom.c | 15 +-
> arch/mips/lantiq/prom.h | 2 -
> arch/mips/mti-sead3/sead3-setup.c | 8 +-
> arch/mips/netlogic/xlp/dt.c | 19 +-
> arch/mips/ralink/of.c | 29 +-
> arch/openrisc/kernel/vmlinux.h | 2 -
> arch/powerpc/include/asm/prom.h | 39 +++
> arch/powerpc/kernel/Makefile | 1 +
> arch/powerpc/kernel/epapr_paravirt.c | 2 +-
> arch/powerpc/kernel/fadump.c | 4 +-
> arch/powerpc/kernel/prom.c | 78 ++----
> arch/powerpc/kernel/rtas.c | 2 +-
> arch/powerpc/mm/hash_utils_64.c | 22 +-
> arch/powerpc/platforms/52xx/efika.c | 4 +-
> arch/powerpc/platforms/chrp/setup.c | 4 +-
> arch/powerpc/platforms/powernv/opal.c | 12 +-
> arch/powerpc/platforms/pseries/setup.c | 4 +-
> arch/x86/kernel/devicetree.c | 12 +-
> arch/xtensa/kernel/setup.c | 3 +-
> drivers/of/Kconfig | 1 +
> drivers/of/Makefile | 2 +
> drivers/of/fdt.c | 398 ++++++++++------------------
> drivers/of/of_reserved_mem.c | 4 +-
> include/linux/of_fdt.h | 63 +----
> 40 files changed, 280 insertions(+), 598 deletions(-)
>
For Microblaze and generic changes:
Tested-by: Michal Simek <monstr@monstr.eu>
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2 00/21] FDT clean-ups and libfdt support
2014-04-23 1:18 [PATCH v2 00/21] FDT clean-ups and libfdt support Rob Herring
2014-04-23 1:18 ` [PATCH v2 08/21] of/fdt: consolidate built-in dtb section variables Rob Herring
2014-04-23 14:22 ` [PATCH v2 00/21] FDT clean-ups and libfdt support Michal Simek
@ 2014-04-23 21:04 ` Max Filippov
[not found] ` <1398215901-25609-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
3 siblings, 0 replies; 5+ messages in thread
From: Max Filippov @ 2014-04-23 21:04 UTC (permalink / raw)
To: Rob Herring
Cc: linux-mips, Aurelien Jacquiot, Benjamin Herrenschmidt,
H. Peter Anvin, Paul Mackerras, linux, Rob Herring, Russell King,
linux-c6x-dev, x86, Ingo Molnar, Mark Salter, Grant Likely,
devicetree@vger.kernel.org, James Hogan,
linux-xtensa@linux-xtensa.org, Thomas Gleixner, linux-metag,
linux-arm-kernel, Chris Zankel, Michal Simek, Vineet Gupta, LKML,
Ralf Baechle, linuxp
On Wed, Apr 23, 2014 at 5:18 AM, Rob Herring <robherring2@gmail.com> wrote:
> From: Rob Herring <robh@kernel.org>
>
> This is a series of clean-ups of architecture FDT code and converts the
> core FDT code over to using libfdt functions. This is in preparation
> to add FDT based address translation parsing functions for early
> console support. This series removes direct access to FDT data from all
> arches except powerpc.
>
> The current MIPS lantiq and xlp DT code is buggy as built-in DTBs need
> to be copied out of init section. Patches 2 and 3 should be applied to
> 3.15.
>
> Changes in v2 are relatively minor. There was a bug in the unflattening
> code where walking up the tree was not being handled correctly (thanks
> to Michal Simek). I re-worked things a bit to avoid globally adding
> libfdt include paths.
>
> A branch is available here[1], and I plan to put into linux-next in a few
> days. Please test! I've compiled on arm, arm64, mips, microblaze, xtensa,
> and powerpc and booted on arm and arm64.
>
> Rob
>
> [1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git libfdt
For xtensa: Tested-by: Max Filippov <jcmvbkbc@gmail.com>
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <1398215901-25609-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH v2 00/21] FDT clean-ups and libfdt support
[not found] ` <1398215901-25609-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-04-29 14:00 ` Grant Likely
0 siblings, 0 replies; 5+ messages in thread
From: Grant Likely @ 2014-04-29 14:00 UTC (permalink / raw)
To: Rob Herring, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Rob Herring, Aurelien Jacquiot, Benjamin Herrenschmidt,
Chris Zankel, H. Peter Anvin, Ingo Molnar, James Hogan,
Jonas Bonn, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-c6x-dev-jPsnJVOj+W6hPH1hqNUYSQ,
linux-ZwoEplunGu2h2975yA52AaxOck334EZe,
linux-metag-u79uwXL29TY76Z2rM5mHXA,
linux-mips-6z/3iImG2C8G8FEW9MqTrA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw, Mark Salter, Max Filippov,
Michal Simek, Paul Mackerras, Ralf Baechle, Russell King,
Thomas Gleixner, Vineet Gupta, x86-DgEjT+Ai2ygdnm+yROfE0A
On Tue, 22 Apr 2014 20:18:00 -0500, Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>
> This is a series of clean-ups of architecture FDT code and converts the
> core FDT code over to using libfdt functions. This is in preparation
> to add FDT based address translation parsing functions for early
> console support. This series removes direct access to FDT data from all
> arches except powerpc.
>
> The current MIPS lantiq and xlp DT code is buggy as built-in DTBs need
> to be copied out of init section. Patches 2 and 3 should be applied to
> 3.15.
>
> Changes in v2 are relatively minor. There was a bug in the unflattening
> code where walking up the tree was not being handled correctly (thanks
> to Michal Simek). I re-worked things a bit to avoid globally adding
> libfdt include paths.
>
> A branch is available here[1], and I plan to put into linux-next in a few
> days. Please test! I've compiled on arm, arm64, mips, microblaze, xtensa,
> and powerpc and booted on arm and arm64.
This is pretty great work. I'll read through them again and I may have a
comment or two, but in general you can add my tested by tag:
Tested-by: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> 40 files changed, 280 insertions(+), 598 deletions(-)
I love the diffstat!
g.
--
To unsubscribe from this list: send the line "unsubscribe linux-metag" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread