Message ID | 1415636045-24669-13-git-send-email-stefano.stabellini@eu.citrix.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBDWMDO7X3ICBB66KQORQKGQENX3ESNA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A5006218DE for <linaro@patches.linaro.org>; Mon, 10 Nov 2014 16:19:08 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id w7sf4260143lbi.8 for <linaro@patches.linaro.org>; Mon, 10 Nov 2014 08:19:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references: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; bh=UGp8L1E99XNV/chbayrlAI42hOfHMyn3sTaoquke+Rs=; b=Ul9CSpXocBqvIocGgUQxEG6JzdPqhbUiZfjTMpPLYeP9/v275OfAIeTwW4Wh6meeo2 PO+Uq4Om1OEdS7kOQMQ8gZ0nNvgOqua6jXMUE4hDAusa97IE8Xc2P00F6qb3k2BVBuba dr4Pruef8kB8x269LuCWFH+ViZw89h84ukt8a/Qoz9OaSoKVPQoKdBjxsyMFoJs6YFXX 1t9kj2A1c4aifa1hyQZ6PLbDO/GnjV5o3VsqbDDVbxJR+Tt9IAgWltNR/eswkLE/5gpV FN4cJ59IpfoUv63xEndDyu9jVOv9CJ6ecBtRFiCL+Scb8OGBzpdZGm5eKsKqdJUq88hv Whdw== X-Gm-Message-State: ALoCoQl7W6ISuZKPId/e5DFbEyOi+pg82XuAtDgBY3CZK9rb03CQt/HlZsbIzl6tC3/EytF3bAyz X-Received: by 10.152.7.73 with SMTP id h9mr741934laa.6.1415636347507; Mon, 10 Nov 2014 08:19:07 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.1 with SMTP id lk1ls476129lac.9.gmail; Mon, 10 Nov 2014 08:19:07 -0800 (PST) X-Received: by 10.152.36.137 with SMTP id q9mr30503078laj.63.1415636347061; Mon, 10 Nov 2014 08:19:07 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id u17si5805838laz.109.2014.11.10.08.19.07 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Nov 2014 08:19:07 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id q1so8030886lam.10 for <patchwork-forward@linaro.org>; Mon, 10 Nov 2014 08:19:07 -0800 (PST) X-Received: by 10.152.6.228 with SMTP id e4mr30263205laa.71.1415636346937; Mon, 10 Nov 2014 08:19:06 -0800 (PST) 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.112.184.201 with SMTP id ew9csp116788lbc; Mon, 10 Nov 2014 08:19:06 -0800 (PST) X-Received: by 10.70.130.174 with SMTP id of14mr33153631pdb.90.1415636345328; Mon, 10 Nov 2014 08:19:05 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ph6si1942707pdb.16.2014.11.10.08.18.43 for <multiple recipients>; Mon, 10 Nov 2014 08:19:05 -0800 (PST) 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 S1753590AbaKJQSN (ORCPT <rfc822;hongbo.zhang@linaro.org> + 25 others); Mon, 10 Nov 2014 11:18:13 -0500 Received: from smtp.citrix.com ([66.165.176.89]:10305 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753562AbaKJQSJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 10 Nov 2014 11:18:09 -0500 X-IronPort-AV: E=Sophos;i="5.07,353,1413244800"; d="scan'208";a="189800779" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Mon, 10 Nov 2014 11:18:00 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from <stefano.stabellini@eu.citrix.com>) id 1Xnrbe-0000Mx-6m; Mon, 10 Nov 2014 16:14:18 +0000 From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> To: <xen-devel@lists.xensource.com> CC: <konrad.wilk@oracle.com>, <Ian.Campbell@citrix.com>, <david.vrabel@citrix.com>, <linux-kernel@vger.kernel.org>, <Stefano.Stabellini@eu.citrix.com>, <linux-arm-kernel@lists.infradead.org>, <catalin.marinas@arm.com>, Stefano Stabellini <stefano.stabellini@eu.citrix.com> Subject: [PATCH v8 13/13] swiotlb-xen: remove BUG_ON in xen_bus_to_phys Date: Mon, 10 Nov 2014 16:14:05 +0000 Message-ID: <1415636045-24669-13-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <alpine.DEB.2.02.1411101607130.22875@kaball.uk.xensource.com> References: <alpine.DEB.2.02.1411101607130.22875@kaball.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> 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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) 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: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> Content-Type: text/plain |
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 498b654..153cf14 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -96,8 +96,6 @@ static inline phys_addr_t xen_bus_to_phys(dma_addr_t baddr) dma_addr_t dma = (dma_addr_t)pfn << PAGE_SHIFT; phys_addr_t paddr = dma; - BUG_ON(paddr != dma); /* truncation has occurred, should never happen */ - paddr |= baddr & ~PAGE_MASK; return paddr;
On x86 truncation cannot occur because config XEN depends on X86_64 || (X86_32 && X86_PAE). On ARM truncation can occur without CONFIG_ARM_LPAE, when the dma operation involves foreign grants. However in that case the physical address returned by xen_bus_to_phys is actually invalid (there is no mfn to pfn tracking for foreign grants on ARM) and it is not used. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- drivers/xen/swiotlb-xen.c | 2 -- 1 file changed, 2 deletions(-)