linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: error: 'const struct kimage' has no member named 'arch'
@ 2021-02-18 22:33 Lakshmi Ramasubramanian
  2021-02-19  0:07 ` Mimi Zohar
  0 siblings, 1 reply; 13+ messages in thread
From: Lakshmi Ramasubramanian @ 2021-02-18 22:33 UTC (permalink / raw)
  To: zohar, bauerman, robh, takahiro.akashi, gregkh, will, joe,
	catalin.marinas, mpe, sfr
  Cc: james.morse, sashal, benh, linux-integrity, linux-kernel,
	linux-arm-kernel, devicetree, linuxppc-dev

of_kexec_alloc_and_setup_fdt() defined in drivers/of/kexec.c builds
a new device tree object that includes architecture specific data
for kexec system call.  This should be defined only if the architecture
being built defines kexec architecture structure "struct kimage_arch".

Define a new boolean config OF_KEXEC that is enabled if
CONFIG_KEXEC_FILE and CONFIG_OF_FLATTREE are enabled, and
the architecture is arm64 or powerpc64.  Build drivers/of/kexec.c
if CONFIG_OF_KEXEC is enabled.

Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Fixes: 33488dc4d61f ("of: Add a common kexec FDT setup function")
Reported-by: kernel test robot <lkp@intel.com>
---
 drivers/of/Kconfig  | 6 ++++++
 drivers/of/Makefile | 7 +------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
index 18450437d5d5..f2e8fa54862a 100644
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -100,4 +100,10 @@ config OF_DMA_DEFAULT_COHERENT
 	# arches should select this if DMA is coherent by default for OF devices
 	bool
 
+config OF_KEXEC
+	bool
+	depends on KEXEC_FILE
+	depends on OF_FLATTREE
+	default y if ARM64 || PPC64
+
 endif # OF
diff --git a/drivers/of/Makefile b/drivers/of/Makefile
index c13b982084a3..287579dd1695 100644
--- a/drivers/of/Makefile
+++ b/drivers/of/Makefile
@@ -13,11 +13,6 @@ obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
 obj-$(CONFIG_OF_RESOLVE)  += resolver.o
 obj-$(CONFIG_OF_OVERLAY) += overlay.o
 obj-$(CONFIG_OF_NUMA) += of_numa.o
-
-ifdef CONFIG_KEXEC_FILE
-ifdef CONFIG_OF_FLATTREE
-obj-y	+= kexec.o
-endif
-endif
+obj-$(CONFIG_OF_KEXEC) += kexec.o
 
 obj-$(CONFIG_OF_UNITTEST) += unittest-data/
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-02-19 18:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 22:33 [PATCH] of: error: 'const struct kimage' has no member named 'arch' Lakshmi Ramasubramanian
2021-02-19  0:07 ` Mimi Zohar
2021-02-19  0:57   ` Lakshmi Ramasubramanian
2021-02-19  1:13     ` Thiago Jung Bauermann
2021-02-19  2:53       ` Lakshmi Ramasubramanian
2021-02-19 14:08         ` Thiago Jung Bauermann
2021-02-19 14:41           ` Mimi Zohar
2021-02-19 14:16         ` Rob Herring
2021-02-19 16:56           ` Lakshmi Ramasubramanian
2021-02-19 17:43             ` Rob Herring
2021-02-19 18:03               ` Mimi Zohar
2021-02-19 18:09                 ` Thiago Jung Bauermann
2021-02-19 18:43                   ` Lakshmi Ramasubramanian

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).