From patchwork Mon Aug 29 10:07:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 9303415 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 426E8601C0 for ; Mon, 29 Aug 2016 10:09:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32AC72847F for ; Mon, 29 Aug 2016 10:09:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27656286CB; Mon, 29 Aug 2016 10:09:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 19D942847F for ; Mon, 29 Aug 2016 10:09:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1beJTs-0003tn-6T; Mon, 29 Aug 2016 10:07:52 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1beJTn-0003ht-Ef for linux-arm-kernel@lists.infradead.org; Mon, 29 Aug 2016 10:07:49 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 2BD8043C6E; Mon, 29 Aug 2016 12:07:23 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id eDKbNMduCrIx; Mon, 29 Aug 2016 12:07:17 +0200 (CEST) Subject: Re: [PATCH] dmaengine: mv_xor: Add support for IO (PCIe) src/dst areas To: Thomas Petazzoni References: <201608241240.aEXnCS9C%fengguang.wu@intel.com> <20160824144314.18928e13@free-electrons.com> From: Stefan Roese Message-ID: <940069ae-25eb-9106-ac41-300e1730d833@denx.de> Date: Mon, 29 Aug 2016 12:07:16 +0200 MIME-Version: 1.0 In-Reply-To: <20160824144314.18928e13@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160829_030747_735165_52525658 X-CRM114-Status: GOOD ( 18.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kbuild test robot , Arnd Bergmann , Vinod Koul , Gregory CLEMENT , kbuild-all@01.org, dmaengine@vger.kernel.org, Marcin Wojtas , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 --- 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