From patchwork Wed May 7 11:41:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 29755 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f72.google.com (mail-qg0-f72.google.com [209.85.192.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DA1A520534 for ; Wed, 7 May 2014 11:42:35 +0000 (UTC) Received: by mail-qg0-f72.google.com with SMTP id q108sf1835165qgd.3 for ; Wed, 07 May 2014 04:42:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:in-reply-to :message-id:references:user-agent:mime-version:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type:content-transfer-encoding:content-id; bh=RLShYcoy2d+iuQ24u3fDNDebno2ltlHyF2UVJPOirPg=; b=beYW3rcXHCxIvsnF7cD2GDVQf2FEkkSp+iHlmOWlnRn3n4dBxdiCOoG99h5HFG0una uezJLesRn9HCAeJ62eh97W+fYUhP4UB4R6NYdIgPVFxB9v2btvchf4Oh8dNP07UGzL+e 9Zq2doRkntXn2kxyfMfV4WLoy9KUH35/jVRwNT1KGRpjLm0EikU/I4eVJnEanL5GYw1g WbVD8MOKztNfvd0a6H9bfkMMVMAjQy9q6fIhfOYAMASpp0CQgVKENDabKJVLhO15XQv4 q67JCEEO8DlGCYI4mtxKKsBgFCKtjFjq7Ecy+itl1BTEEsIzY3yqY9o2FLerGFxBJvTj zZhA== X-Gm-Message-State: ALoCoQkslX4L9L14ADtfbH3xhsRqfuJfvnD0nUM+dZ/OLxdc5iAyK7LVyQJ/m/XOHEPwMn4qT3Jn X-Received: by 10.236.135.208 with SMTP id u56mr340359yhi.49.1399462955581; Wed, 07 May 2014 04:42:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.146 with SMTP id 18ls3431154qgr.58.gmail; Wed, 07 May 2014 04:42:35 -0700 (PDT) X-Received: by 10.220.162.6 with SMTP id t6mr38845830vcx.12.1399462955452; Wed, 07 May 2014 04:42:35 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id kp14si2862192vcb.2.2014.05.07.04.42.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 May 2014 04:42:35 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hr9so1066848vcb.31 for ; Wed, 07 May 2014 04:42:35 -0700 (PDT) X-Received: by 10.58.116.175 with SMTP id jx15mr31925044veb.9.1399462955369; Wed, 07 May 2014 04:42:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp301291vcb; Wed, 7 May 2014 04:42:34 -0700 (PDT) X-Received: by 10.66.221.4 with SMTP id qa4mr18241325pac.138.1399462953692; Wed, 07 May 2014 04:42:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fm5si1155675pbc.464.2014.05.07.04.42.32; Wed, 07 May 2014 04:42:33 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932753AbaEGLmW (ORCPT + 27 others); Wed, 7 May 2014 07:42:22 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:4468 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932627AbaEGLmU (ORCPT ); Wed, 7 May 2014 07:42:20 -0400 X-IronPort-AV: E=Sophos;i="4.97,1002,1389744000"; d="scan'208";a="127656094" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 07 May 2014 11:42:19 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.3.181.6; Wed, 7 May 2014 07:42:18 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1Wi0Es-00012a-AG; Wed, 07 May 2014 12:42:18 +0100 Date: Wed, 7 May 2014 12:41:56 +0100 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Stefano Stabellini CC: David Vrabel , Julien Grall , , , , Ian Campbell , , Catalin Marinas Subject: Re: [PATCH] arm/xen: Remove definiition of virt_to_pfn in asm/xen/page.h In-Reply-To: Message-ID: References: <1397836474-10478-1-git-send-email-julien.grall@linaro.org> <535901F0.3010908@citrix.com> <53590845.1090405@linaro.org> <53591B8F.8070300@citrix.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Content-ID: On Fri, 25 Apr 2014, Stefano Stabellini wrote: > On Thu, 24 Apr 2014, David Vrabel wrote: > > On 24/04/14 13:49, Julien Grall wrote: > > > Hi David, > > > > > > On 04/24/2014 01:22 PM, David Vrabel wrote: > > >> On 18/04/14 16:54, Julien Grall wrote: > > >>> virt_to_pfn has been defined in asm/memory.h by the commit e26a9e0 "ARM: Better > > >>> virt_to_page() handling" > > >>> > > >>> This will result of a compilation warning when CONFIG_XEN is enabled. > > >>> > > >>> arch/arm/include/asm/xen/page.h:80:0: warning: "virt_to_pfn" redefined [enabled by default] > > >>> #define virt_to_pfn(v) (PFN_DOWN(__pa(v))) > > >>> ^ > > >>> In file included from arch/arm/include/asm/page.h:163:0, > > >>> from arch/arm/include/asm/xen/page.h:4, > > >>> from include/xen/page.h:4, > > >>> from arch/arm/xen/grant-table.c:33: > > >>> > > >>> The definition in memory.h is nearly the same (it directly expand PFN_DOWN), > > >>> so we can safely drop virt_to_pfn in xen include. > > >> > > >> > > >> This breaks the arm build for me. > > >> > > >> /local/davidvr/work/k.org/tip/drivers/block/xen-blkfront.c: In function > > >> ‘setup_blkring’: > > >> /local/davidvr/work/k.org/tip/drivers/block/xen-blkfront.c:1236:2: > > >> error: implicit declaration of function ‘virt_to_pfn’ > > >> [-Werror=implicit-function-declaration] > > >> err = xenbus_grant_ring(dev, virt_to_mfn(info->ring.sring)); > > >> ^ > > > > > > I don't have any issue to build the following branch with this patch on: > > > - v3.15-rc2 > > > - xentip master > > > - xentip for-linus-3.16 > > > > Applied to devel/for-linus-3.16. > > > > If something else turns up for 3.15 (and I remember) I'll take it for > > 3.15 instead. > > David, > thank you very much for taking the patch in my absence. > > Considering that the problem is affecting everybody enabling CONFIG_XEN > on ARM on v3.15, I don't think we can wait for the next merge window to > send this fix upstream. > Too many warnings for too many people. Unfortunately this commit breaks arm64 compilation, as virt_to_pfn has not been introduced to arm64/include/asm/memory.h. Has the patch been sent upstream yet? We need this additional change for arm64: Acked-by: Catalin Marinas diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index e94f945..993bce5 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -138,6 +138,7 @@ static inline void *phys_to_virt(phys_addr_t x) #define __pa(x) __virt_to_phys((unsigned long)(x)) #define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x))) #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) +#define virt_to_pfn(x) __phys_to_pfn(__virt_to_phys(x)) /* * virt_to_page(k) convert a _valid_ virtual address to struct page *