Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp955032ybk; Wed, 20 May 2020 16:50:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLKHEWE+PbQhB/1e1vFf4P46azS2fi9vGAKULFuzoxFZF67IlytmijrKbe+aDw9BfFphP8 X-Received: by 2002:a17:906:c01:: with SMTP id s1mr1352487ejf.370.1590018634330; Wed, 20 May 2020 16:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590018634; cv=none; d=google.com; s=arc-20160816; b=rm2V9TeH39KAXjpQWOFgtaVUJrUbueHbGcfWMiuZN31poD6OQZaqoKNp7+COwEF5Pl AELY/idpvXxfvOcofB9qb9w6NbHSdXTa88/mCQCJ0drsb6UZ7l5tBzfGSSHWNZkebNRF 3o9cdSm32VHWTpv0LWMZemA/Ucfz6Do+GxRkP5KgCxk9z/bzTWqbTCyHW0vXOBa0vN0C YfBOq6zgxwj9RIH81my9P+p5RCFmlY2wNG96FMyJYlf3SmtEEg3caJJVycanvu0MM1gI Ef0qXToZdS7HN/YuyKx1xv3Xij5VoaWX9wWImIho1lFUk/ic866MTj0KbHcCHgnJoi2M hsJQ== 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=y4d7bNmrr6FZDMzc9lOAiQWy/Etlp1DKBwXGcQ4D1rE=; b=ld37ZHtzz9lZsEZedA/pm/aQ1aeperK+hQ0VDZSE074pmk8GqWxZkow/gtnNhsLq48 LG+Dfv2yyi6EEe5rc9rc5uAhlQIu2PPXBmVLykEIQJxgVm3mzdGWVPBXfJkHvsljVuW+ wtXeHInbQQuh9tU4nVM9rc8n2CL01N41Vj3ytZEUQyPl0BesGPCgJa4MDGAKV2L+dHIc VjQt5iA5xtOoV+mOgqFbKhivEwE5h+JWWP0us2i0JkPALU2Hp9jslZUXaAw6+DjhrW63 q+YnIa8P029QyYj7Ky9x5u6Rv2/b3arDV0rNIRStxQfYwR9Tyzf0Fjky2jaZCW84pnh6 QT/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sBVUvkEn; 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 ks17si2503940ejb.366.2020.05.20.16.50.12; Wed, 20 May 2020 16:50:34 -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=sBVUvkEn; 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 S1726959AbgETXpX (ORCPT + 99 others); Wed, 20 May 2020 19:45:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:36902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbgETXpX (ORCPT ); Wed, 20 May 2020 19:45:23 -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 88F6120873; Wed, 20 May 2020 23:45:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590018322; bh=Vv+EdXpTbwnuZjYd1z0k52yCJtFShb1TwXsEeRgOU74=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sBVUvkEnVb5CTQSI2t90TDC/MfBITVXjrBOqmirzQIzAeJwdr1sVZyo9BaUXBQWb6 LLUhyQ43M/LP6uZtRnjF0h93Ma1z5Q2Gci6bg0La5Pw99Q96J4Tt/c0jbgFC2I1Iiz ES8P300ufpQlz2z+r0K7tnfeD8kqZ32GjZyT1K4U= 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 02/10] swiotlb-xen: remove start_dma_addr Date: Wed, 20 May 2020 16:45:12 -0700 Message-Id: <20200520234520.22563-2-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 It is not strictly needed. Call virt_to_phys on xen_io_tlb_start instead. It will be useful not to have a start_dma_addr around with the next patches. Signed-off-by: Stefano Stabellini --- drivers/xen/swiotlb-xen.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index a42129cba36e..b5e0492b07b9 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -52,8 +52,6 @@ static unsigned long xen_io_tlb_nslabs; * Quick lookup value of the bus address of the IOTLB. */ -static u64 start_dma_addr; - /* * Both of these functions should avoid XEN_PFN_PHYS because phys_addr_t * can be 32bit when dma_addr_t is 64bit leading to a loss in @@ -241,7 +239,6 @@ int __ref xen_swiotlb_init(int verbose, bool early) m_ret = XEN_SWIOTLB_EFIXUP; goto error; } - start_dma_addr = xen_virt_to_bus(xen_io_tlb_start); if (early) { if (swiotlb_init_with_tbl(xen_io_tlb_start, xen_io_tlb_nslabs, verbose)) @@ -389,7 +386,7 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, */ trace_swiotlb_bounced(dev, dev_addr, size, swiotlb_force); - map = swiotlb_tbl_map_single(dev, start_dma_addr, phys, + map = swiotlb_tbl_map_single(dev, virt_to_phys(xen_io_tlb_start), phys, size, size, dir, attrs); if (map == (phys_addr_t)DMA_MAPPING_ERROR) return DMA_MAPPING_ERROR; -- 2.17.1