diff mbox

dmaengine: mv_xor: Add support for IO (PCIe) src/dst areas

Message ID 940069ae-25eb-9106-ac41-300e1730d833@denx.de (mailing list archive)
State New, archived
Headers show

Commit Message

Stefan Roese Aug. 29, 2016, 10:07 a.m. UTC
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

Comments

Thomas Petazzoni Aug. 29, 2016, 10:14 a.m. UTC | #1
Hello,

On Mon, 29 Aug 2016 12:07:16 +0200, Stefan Roese wrote:

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

Yes, I noticed.

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

Submitting as a separate patch is better IMO, it's touching a separate
driver. Just submit both in the same patch series, the kbuild test
robot will then only test building the XOR change with the MBus change
applied.

Thanks a lot!

Thomas
diff mbox

Patch

From ea845262a869fdb845f843378db3e7bec9301afc Mon Sep 17 00:00:00 2001
From: Stefan Roese <sr@denx.de>
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@denx.de>
---
 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