* [PATCH] arm: Test for CONFIG_USE_OF to handle the USE_OF=n/OF=y case
@ 2015-10-25 15:25 Geert Uytterhoeven
[not found] ` <1445786759-22005-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2015-10-25 15:25 UTC (permalink / raw)
To: Russell King, Rob Herring
Cc: devicetree, linux-arm-kernel, linux-kernel, Geert Uytterhoeven
Until commit 0166dc11be911213 ("of: make CONFIG_OF user selectable"),
CONFIG_OF=y implied CONFIG_USE_OF=y on ARM, as the former could solely
be enabled by being selected by the latter.
However, if the user now manually enables CONFIG_OF=y while
CONFIG_USE_OF=n:
arch/arm/kernel/devtree.c: In function 'setup_machine_fdt':
arch/arm/kernel/devtree.c:215:2: error: implicit declaration of function 'early_init_dt_verify' [-Werror=implicit-function-declaration]
if (!dt_phys || !early_init_dt_verify(phys_to_virt(dt_phys)))
^
arch/arm/kernel/devtree.c:218:2: error: implicit declaration of function 'of_flat_dt_match_machine' [-Werror=implicit-function-declaration]
mdesc = of_flat_dt_match_machine(mdesc_best, arch_get_next_mach);
^
arch/arm/kernel/devtree.c:218:8: warning: assignment makes pointer from integer without a cast
mdesc = of_flat_dt_match_machine(mdesc_best, arch_get_next_mach);
^
arch/arm/kernel/devtree.c:228:3: error: implicit declaration of function 'of_get_flat_dt_root' [-Werror=implicit-function-declaration]
dt_root = of_get_flat_dt_root();
^
arch/arm/kernel/devtree.c:229:3: error: implicit declaration of function 'of_get_flat_dt_prop' [-Werror=implicit-function-declaration]
prop = of_get_flat_dt_prop(dt_root, "compatible", &size);
^
arch/arm/kernel/devtree.c:229:8: warning: assignment makes pointer from integer without a cast
prop = of_get_flat_dt_prop(dt_root, "compatible", &size);
^
arch/arm/kernel/devtree.c:244:2: error: implicit declaration of function 'early_init_dt_scan_nodes' [-Werror=implicit-function-declaration]
early_init_dt_scan_nodes();
^
and
arch/arm/kernel/built-in.o: In function `setup_arch':
arch/arm/kernel/setup.c:940: undefined reference to `setup_machine_fdt'
arch/arm/kernel/setup.c:979: undefined reference to `arm_dt_init_cpu_maps'
Replace tests for CONFIG_OF by tests for CONFIG_USE_OF where appropriate
to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Cfr. http://kisskb.ellerman.id.au/kisskb/buildresult/12531538/
I only fixed the particular issue with the randconfig from the build
above. Are there more tests for CONFIG_OF that should be converted to
CONFIG_USE_OF?
---
arch/arm/include/asm/prom.h | 6 +++---
arch/arm/kernel/Makefile | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/include/asm/prom.h b/arch/arm/include/asm/prom.h
index cd94ef2ef283e14e..aac51015d18e27fb 100644
--- a/arch/arm/include/asm/prom.h
+++ b/arch/arm/include/asm/prom.h
@@ -11,12 +11,12 @@
#ifndef __ASMARM_PROM_H
#define __ASMARM_PROM_H
-#ifdef CONFIG_OF
+#ifdef CONFIG_USE_OF
extern const struct machine_desc *setup_machine_fdt(unsigned int dt_phys);
extern void __init arm_dt_init_cpu_maps(void);
-#else /* CONFIG_OF */
+#else /* CONFIG_USE_OF */
static inline const struct machine_desc *setup_machine_fdt(unsigned int dt_phys)
{
@@ -25,5 +25,5 @@ static inline const struct machine_desc *setup_machine_fdt(unsigned int dt_phys)
static inline void arm_dt_init_cpu_maps(void) { }
-#endif /* CONFIG_OF */
+#endif /* CONFIG_USE_OF */
#endif /* ASMARM_PROM_H */
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index af9e59bf3831b9fd..4f6014eee0fe65bd 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -58,7 +58,7 @@ obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
obj-$(CONFIG_KGDB) += kgdb.o patch.o
obj-$(CONFIG_ARM_UNWIND) += unwind.o
obj-$(CONFIG_HAVE_TCM) += tcm.o
-obj-$(CONFIG_OF) += devtree.o
+obj-$(CONFIG_USE_OF) += devtree.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
obj-$(CONFIG_SWP_EMULATE) += swp_emulate.o
CFLAGS_swp_emulate.o := -Wa,-march=armv7-a
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1445786759-22005-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>]
* Re: [PATCH] arm: Test for CONFIG_USE_OF to handle the USE_OF=n/OF=y case [not found] ` <1445786759-22005-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> @ 2015-10-26 0:45 ` Rob Herring [not found] ` <CAL_JsqKHozy_fKHuTokQobKHjF6Vay_mzYvP1TCU_sBjTrewBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Rob Herring @ 2015-10-26 0:45 UTC (permalink / raw) To: Geert Uytterhoeven, Arnd Bergmann Cc: Russell King, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Sun, Oct 25, 2015 at 10:25 AM, Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> wrote: > Until commit 0166dc11be911213 ("of: make CONFIG_OF user selectable"), > CONFIG_OF=y implied CONFIG_USE_OF=y on ARM, as the former could solely > be enabled by being selected by the latter. Arnd sent a similar fix[1] which I prefer. > However, if the user now manually enables CONFIG_OF=y while > CONFIG_USE_OF=n: > > arch/arm/kernel/devtree.c: In function 'setup_machine_fdt': > arch/arm/kernel/devtree.c:215:2: error: implicit declaration of function 'early_init_dt_verify' [-Werror=implicit-function-declaration] > if (!dt_phys || !early_init_dt_verify(phys_to_virt(dt_phys))) > ^ > arch/arm/kernel/devtree.c:218:2: error: implicit declaration of function 'of_flat_dt_match_machine' [-Werror=implicit-function-declaration] > mdesc = of_flat_dt_match_machine(mdesc_best, arch_get_next_mach); > ^ > arch/arm/kernel/devtree.c:218:8: warning: assignment makes pointer from integer without a cast > mdesc = of_flat_dt_match_machine(mdesc_best, arch_get_next_mach); > ^ > arch/arm/kernel/devtree.c:228:3: error: implicit declaration of function 'of_get_flat_dt_root' [-Werror=implicit-function-declaration] > dt_root = of_get_flat_dt_root(); > ^ > arch/arm/kernel/devtree.c:229:3: error: implicit declaration of function 'of_get_flat_dt_prop' [-Werror=implicit-function-declaration] > prop = of_get_flat_dt_prop(dt_root, "compatible", &size); > ^ > arch/arm/kernel/devtree.c:229:8: warning: assignment makes pointer from integer without a cast > prop = of_get_flat_dt_prop(dt_root, "compatible", &size); > ^ > arch/arm/kernel/devtree.c:244:2: error: implicit declaration of function 'early_init_dt_scan_nodes' [-Werror=implicit-function-declaration] > early_init_dt_scan_nodes(); > ^ > > and > > arch/arm/kernel/built-in.o: In function `setup_arch': > arch/arm/kernel/setup.c:940: undefined reference to `setup_machine_fdt' > arch/arm/kernel/setup.c:979: undefined reference to `arm_dt_init_cpu_maps' > > Replace tests for CONFIG_OF by tests for CONFIG_USE_OF where appropriate > to fix this. > > Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> > --- > Cfr. http://kisskb.ellerman.id.au/kisskb/buildresult/12531538/ > > I only fixed the particular issue with the randconfig from the build > above. Are there more tests for CONFIG_OF that should be converted to > CONFIG_USE_OF? I'd rather move toward removing USE_OF and having arches select if they use EARLY_FLATTREE. Rob [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-October/376484.html -- To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 3+ messages in thread
[parent not found: <CAL_JsqKHozy_fKHuTokQobKHjF6Vay_mzYvP1TCU_sBjTrewBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] arm: Test for CONFIG_USE_OF to handle the USE_OF=n/OF=y case [not found] ` <CAL_JsqKHozy_fKHuTokQobKHjF6Vay_mzYvP1TCU_sBjTrewBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2015-10-26 17:26 ` Geert Uytterhoeven 0 siblings, 0 replies; 3+ messages in thread From: Geert Uytterhoeven @ 2015-10-26 17:26 UTC (permalink / raw) To: Rob Herring Cc: Arnd Bergmann, Russell King, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Hi Rob, On Mon, Oct 26, 2015 at 1:45 AM, Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote: > On Sun, Oct 25, 2015 at 10:25 AM, Geert Uytterhoeven > <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> wrote: >> Until commit 0166dc11be911213 ("of: make CONFIG_OF user selectable"), >> CONFIG_OF=y implied CONFIG_USE_OF=y on ARM, as the former could solely >> be enabled by being selected by the latter. > > Arnd sent a similar fix[1] which I prefer. Fine for me. >> However, if the user now manually enables CONFIG_OF=y while >> CONFIG_USE_OF=n: >> >> arch/arm/kernel/devtree.c: In function 'setup_machine_fdt': >> arch/arm/kernel/devtree.c:215:2: error: implicit declaration of function 'early_init_dt_verify' [-Werror=implicit-function-declaration] >> if (!dt_phys || !early_init_dt_verify(phys_to_virt(dt_phys))) >> ^ >> arch/arm/kernel/devtree.c:218:2: error: implicit declaration of function 'of_flat_dt_match_machine' [-Werror=implicit-function-declaration] >> mdesc = of_flat_dt_match_machine(mdesc_best, arch_get_next_mach); >> ^ >> arch/arm/kernel/devtree.c:218:8: warning: assignment makes pointer from integer without a cast >> mdesc = of_flat_dt_match_machine(mdesc_best, arch_get_next_mach); >> ^ >> arch/arm/kernel/devtree.c:228:3: error: implicit declaration of function 'of_get_flat_dt_root' [-Werror=implicit-function-declaration] >> dt_root = of_get_flat_dt_root(); >> ^ >> arch/arm/kernel/devtree.c:229:3: error: implicit declaration of function 'of_get_flat_dt_prop' [-Werror=implicit-function-declaration] >> prop = of_get_flat_dt_prop(dt_root, "compatible", &size); >> ^ >> arch/arm/kernel/devtree.c:229:8: warning: assignment makes pointer from integer without a cast >> prop = of_get_flat_dt_prop(dt_root, "compatible", &size); >> ^ >> arch/arm/kernel/devtree.c:244:2: error: implicit declaration of function 'early_init_dt_scan_nodes' [-Werror=implicit-function-declaration] >> early_init_dt_scan_nodes(); >> ^ >> >> and >> >> arch/arm/kernel/built-in.o: In function `setup_arch': >> arch/arm/kernel/setup.c:940: undefined reference to `setup_machine_fdt' >> arch/arm/kernel/setup.c:979: undefined reference to `arm_dt_init_cpu_maps' >> >> Replace tests for CONFIG_OF by tests for CONFIG_USE_OF where appropriate >> to fix this. >> >> Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> >> --- >> Cfr. http://kisskb.ellerman.id.au/kisskb/buildresult/12531538/ >> >> I only fixed the particular issue with the randconfig from the build >> above. Are there more tests for CONFIG_OF that should be converted to >> CONFIG_USE_OF? > > I'd rather move toward removing USE_OF and having arches select if > they use EARLY_FLATTREE. > > Rob > > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-October/376484.html Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 3+ messages in thread
end of thread, other threads:[~2015-10-26 17:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-25 15:25 [PATCH] arm: Test for CONFIG_USE_OF to handle the USE_OF=n/OF=y case Geert Uytterhoeven
[not found] ` <1445786759-22005-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2015-10-26 0:45 ` Rob Herring
[not found] ` <CAL_JsqKHozy_fKHuTokQobKHjF6Vay_mzYvP1TCU_sBjTrewBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-26 17:26 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).