Re: [PATCH] dmaengine: mv_xor: Add support for IO (PCIe) src/dst areas

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,

On 24.08.2016 14:43, Thomas Petazzoni wrote:
On Wed, 24 Aug 2016 10:23:02 +0200, Stefan Roese wrote:

All errors (new ones prefixed by >>):

   drivers/built-in.o: In function `set_param_ifnum':
ipmi_poweroff.c:(.text+0x10157c): undefined reference to `mvebu_mbus_get_io_win_info'
   drivers/built-in.o: In function `mv_xor_add_io_win':
   mv_xor.c:(.text+0x11039e): undefined reference to `mvebu_mbus_get_io_win_info'

Does it really make sense to compile this driver for all archs?
Or should I send a v2 of this patch that removes COMPILE_TEST for
this driver from Kconfig so that its only compiled for the
target platforms?

I'm not sure what's the exact policy, but I believe kernel maintainers
like when the compilation coverage is as wide as possible. The MBus
driver could provide some stub functions when not enabled? I don't know
if it's worth it, since indeed mv_xor is only ever going to be used on
ARM.

As you've probably already noticed, v2 of this patch with
COMPILE_TEST removed also did run into this linking problem -
for ARM64 in this case. So its perhaps best to provide this MBus
driver stub function. COMPILE_TEST could then be enabled again.

What do you think? Should I post a separate patch to the MBus
driver (also attached)? Or should I squash it into v3 of this
XOR DMA driver patch (with COMPILE_TEST added gain)?

Thanks,
Stefan
>From ea845262a869fdb845f843378db3e7bec9301afc Mon Sep 17 00:00:00 2001
From: Stefan Roese <sr@xxxxxxx>
Date: Mon, 29 Aug 2016 11:42:50 +0200
Subject: [PATCH] bus: mvebu-mbus: Provide stub function for
 mvebu_mbus_get_io_win_info()

This patch provides a stub function for mvebu_mbus_get_io_win_info(),
which will be used for all non-Orion (ARM32 MVEBU) platforms for
compile test coverage.

Signed-off-by: Stefan Roese <sr@xxxxxxx>
---
 include/linux/mbus.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/linux/mbus.h b/include/linux/mbus.h
index d610232..a884405 100644
--- a/include/linux/mbus.h
+++ b/include/linux/mbus.h
@@ -55,6 +55,8 @@ struct mbus_dram_target_info
 #ifdef CONFIG_PLAT_ORION
 extern const struct mbus_dram_target_info *mv_mbus_dram_info(void);
 extern const struct mbus_dram_target_info *mv_mbus_dram_info_nooverlap(void);
+int mvebu_mbus_get_io_win_info(phys_addr_t phyaddr, u32 *size, u8 *target,
+			       u8 *attr);
 #else
 static inline const struct mbus_dram_target_info *mv_mbus_dram_info(void)
 {
@@ -64,14 +66,17 @@ static inline const struct mbus_dram_target_info *mv_mbus_dram_info_nooverlap(vo
 {
 	return NULL;
 }
+static inline int mvebu_mbus_get_io_win_info(phys_addr_t phyaddr, u32 *size,
+					     u8 *target, u8 *attr)
+{
+	return 0;
+}
 #endif
 
 int mvebu_mbus_save_cpu_target(u32 __iomem *store_addr);
 void mvebu_mbus_get_pcie_mem_aperture(struct resource *res);
 void mvebu_mbus_get_pcie_io_aperture(struct resource *res);
 int mvebu_mbus_get_dram_win_info(phys_addr_t phyaddr, u8 *target, u8 *attr);
-int mvebu_mbus_get_io_win_info(phys_addr_t phyaddr, u32 *size, u8 *target,
-			       u8 *attr);
 int mvebu_mbus_add_window_remap_by_id(unsigned int target,
 				      unsigned int attribute,
 				      phys_addr_t base, size_t size,
-- 
2.9.3


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux