Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp953508ybk; Wed, 20 May 2020 16:47:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3kpCPIIMpA4OedJU6Oozui4HgwhabRuMdXN0L+A4HxGj/FlcWQ2vNX5PEN4FU8VpVI4PX X-Received: by 2002:a17:906:3605:: with SMTP id q5mr1191668ejb.363.1590018431696; Wed, 20 May 2020 16:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590018431; cv=none; d=google.com; s=arc-20160816; b=zVONk5wbwN4fz3R5eFaT25fwR96hm1tvn48mykpSaxSOQsjkThA8M5ko71yDmNWD2d fV+aqgm8SGayYeEngcWRZ/nkKtAkh4DxLMLSHanMHdzFcZWIxoB+Riwaq1sqrzLqKPnE H8uI9nHESvmf87w4y3qvTURF9MJTcPdyWqDx1cgT7sykaNPgmCTF1zCxWhW4rsOjiXs5 M/D64zq+q5lYpCIv1YDJrwmS3ZKWNVH011tfcaw5oLm/WYQvcs0sGR2q4lGq+dlGUIrZ VAU/1ZV2v//2kqW9Agt7BT4t+o8Jl6Ndg0hvn8aFYKv1bnHKDfCAprti5Tc4KhD5XzR7 nZjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=TJjkZ1CY9G3LuzG+2rVLZq7Eac3EKSyxvVmheb/wBlw=; b=wPzu9Zw63P0m4Z4BgpDrq3vGGtVRwgMATEoCZw6qfLm0lSpnemg9X2Cw4H8f/cVg9x FGSr4Mwnc9sLfvPuk3RYTSXiwuz2C6JPmaDrDk/4LtL9/J1vIymagpwNJPt6gq0QGiT+ VjYXNnkDdJW95YlC87dnVzWRJ9DrHgO9vCfV3WuR5dxrs7BYdk6YTZUfF8o4biE7mmKQ TqP2AvySqBRLJgF5soi0yZ+mGYr+aNfyWDZ2SWJLjhfTFL3nPRvSPAT5deD36v2PBmH/ 9FZptskCBfsRGx/jPFWKnmMigoxksIDk13Uht8MP4ZMjHyORWuBNSZ/I8SDhGmPd1UYk gYJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dTE+kbnC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sd10si2498891ejb.588.2020.05.20.16.46.49; Wed, 20 May 2020 16:47:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dTE+kbnC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728072AbgETXp1 (ORCPT + 99 others); Wed, 20 May 2020 19:45:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:36984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727030AbgETXpZ (ORCPT ); Wed, 20 May 2020 19:45:25 -0400 Received: from sstabellini-ThinkPad-T480s.hsd1.ca.comcast.net (c-67-164-102-47.hsd1.ca.comcast.net [67.164.102.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 98AEA208B8; Wed, 20 May 2020 23:45:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590018324; bh=68bz29KGiO4K1vLdUXFPavN9cfZPRxxaUFsbZLLeOQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dTE+kbnCMNQDzzVwFHnyCGj6ceXloekheSqEc/mfi4uXHnNX9YcX6KNuk+7Xjfu1e 4Ivslg+Y9YsbA3JPm/E/DYimCIufADyo/rByZJDKZvlNR4WU+bwFRttIiSiZLilf48 QwBlp0h7JbG+8wQ41SDtLC7LELN2RoJXH8oONqRI= From: Stefano Stabellini To: jgross@suse.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com Cc: sstabellini@kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, Stefano Stabellini Subject: [PATCH 07/10] swiotlb-xen: add struct device* parameter to is_xen_swiotlb_buffer Date: Wed, 20 May 2020 16:45:17 -0700 Message-Id: <20200520234520.22563-7-sstabellini@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefano Stabellini The parameter is unused in this patch. No functional changes. Signed-off-by: Stefano Stabellini --- drivers/xen/swiotlb-xen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index ef58f05ae445..c50448fd9b75 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -97,7 +97,7 @@ static inline int range_straddles_page_boundary(phys_addr_t p, size_t size) return 0; } -static int is_xen_swiotlb_buffer(dma_addr_t dma_addr) +static int is_xen_swiotlb_buffer(struct device *dev, dma_addr_t dma_addr) { unsigned long bfn = XEN_PFN_DOWN(dma_addr); unsigned long xen_pfn = bfn_to_local_pfn(bfn); @@ -428,7 +428,7 @@ static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, xen_dma_sync_for_cpu(hwdev, dev_addr, paddr, size, dir); /* NOTE: We use dev_addr here, not paddr! */ - if (is_xen_swiotlb_buffer(dev_addr)) + if (is_xen_swiotlb_buffer(hwdev, dev_addr)) swiotlb_tbl_unmap_single(hwdev, paddr, size, size, dir, attrs); } @@ -441,7 +441,7 @@ xen_swiotlb_sync_single_for_cpu(struct device *dev, dma_addr_t dma_addr, if (!dev_is_dma_coherent(dev)) xen_dma_sync_for_cpu(dev, dma_addr, paddr, size, dir); - if (is_xen_swiotlb_buffer(dma_addr)) + if (is_xen_swiotlb_buffer(dev, dma_addr)) swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_CPU); } @@ -451,7 +451,7 @@ xen_swiotlb_sync_single_for_device(struct device *dev, dma_addr_t dma_addr, { phys_addr_t paddr = xen_bus_to_phys(dev, dma_addr); - if (is_xen_swiotlb_buffer(dma_addr)) + if (is_xen_swiotlb_buffer(dev, dma_addr)) swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_DEVICE); if (!dev_is_dma_coherent(dev)) -- 2.17.1