From patchwork Wed Nov 6 12:40:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 3147111 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F119E9F3C4 for ; Wed, 6 Nov 2013 12:42:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ABB0520524 for ; Wed, 6 Nov 2013 12:42:00 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58AE12041F for ; Wed, 6 Nov 2013 12:41:59 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve2Qh-0001Gi-Hu; Wed, 06 Nov 2013 12:41:51 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve2Qe-0006vC-DS; Wed, 06 Nov 2013 12:41:48 +0000 Received: from smtp02.citrix.com ([66.165.176.63]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve2Qb-0006u3-7o for linux-arm-kernel@lists.infradead.org; Wed, 06 Nov 2013 12:41:46 +0000 X-IronPort-AV: E=Sophos;i="4.93,647,1378857600"; d="scan'208";a="68571941" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 06 Nov 2013 12:41:21 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.2.342.4; Wed, 6 Nov 2013 07:41:20 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1Ve2QC-0003ye-F8; Wed, 06 Nov 2013 12:41:20 +0000 Date: Wed, 6 Nov 2013 12:40:04 +0000 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Olof Johansson Subject: Re: [PATCH v9 16/18] arm,arm64: do not always merge biovec if we are running on Xen In-Reply-To: Message-ID: References: <1382698313-13161-16-git-send-email-stefano.stabellini@eu.citrix.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-DLP: MIA2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131106_074145_398386_72DBA9D9 X-CRM114-Status: GOOD ( 15.05 ) X-Spam-Score: -2.6 (--) Cc: "xen-devel@lists.xensource.com" , Ian Campbell , konrad.wilk@oracle.com, Stefano Stabellini , "linux-kernel@vger.kernel.org" , Russell King , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 5 Nov 2013, Olof Johansson wrote: > Hi, > > On Fri, Oct 25, 2013 at 3:51 AM, Stefano Stabellini > wrote: > > This is similar to what it is done on X86: biovecs are prevented from merging > > otherwise every dma requests would be forced to bounce on the swiotlb buffer. > > > > Signed-off-by: Stefano Stabellini > > Acked-by: Catalin Marinas > > > This is spewing 800+ warnings on ape6evm_defconfig on ARM that doesn't > have CONFIG_BLOCK enabled, since struct bio_vec is protected by that > in include/linux/blk_types.h. I guess it could be argued that those > ifdefs could be removed, but still: > > ../../arch/arm/include/asm/io.h:378:24: warning: its scope is only > this definition or declaration, which is probably not what you want > [enabled by default] > In file included from ../../include/linux/scatterlist.h:10:0, > from ../../include/linux/dmaengine.h:27, > from ../../include/linux/skbuff.h:31, > from ../../include/crypto/algapi.h:18, > from ../../crypto/internal.h:16, > from ../../crypto/cipher.c:21: > ../../arch/arm/include/asm/io.h:378:24: warning: 'struct bio_vec' > declared inside parameter list [enabled by default] > const struct bio_vec *vec2); Thanks for letting me know. What about the following? commit 06fc174ce8da30f81b59c9d1d7680a2490525884 Author: Stefano Stabellini Date: Wed Nov 6 12:38:28 2013 +0000 arm,arm64/include/asm/io.h: define struct bio_vec Signed-off-by: Stefano Stabellini Acked-by: Olof Johansson diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index c45effc..3c597c2 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h @@ -374,6 +374,7 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr); #define BIOVEC_MERGEABLE(vec1, vec2) \ ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) +struct bio_vec; extern bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, const struct bio_vec *vec2); #define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index c163287b..757c87a 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h @@ -266,6 +266,7 @@ extern int devmem_is_allowed(unsigned long pfn); */ #define xlate_dev_kmem_ptr(p) p +struct bio_vec; extern bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, const struct bio_vec *vec2); #define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \