Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp356997rbb; Sat, 24 Feb 2024 03:48:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWbZqXNQTQpuDRs0YC+WgCR9ONGXfPChAIHpBDuIATw/bVCF2F4O3Uttw4Q+A6i11dx8ST9sOCBs2GCw91818wbgxHAUp1SqbblJpUWIw== X-Google-Smtp-Source: AGHT+IEG0GxWdpXcUVkCvBzPRFoFPgKJVy5Y7l2Ll5HIDD9nLQ0y60t914kx2dK//voX9qph00Mj X-Received: by 2002:a17:906:a850:b0:a3e:a3dc:45c9 with SMTP id dx16-20020a170906a85000b00a3ea3dc45c9mr1616879ejb.72.1708775337626; Sat, 24 Feb 2024 03:48:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708775337; cv=pass; d=google.com; s=arc-20160816; b=T2dv5mTqQdklrjl7xSRJTG1hDNGKeaOTIopP7eJtdn4BJiRrxXl4oy4ZcOo4BSAsip p71VTEQePwJesNRu5s+nqoMYXBFINCI4KxV0aRqIhj6kXv0a0dbkg9uY6MO+V3nigwI3 glVks7BYWM4Bxy3gVn8YWToxhCG3WWIGQNcNl+EqfQhlHa/BBuAj0b0aVgo8IEzykADx xIHk8jcvqYbD30b5EYS1zw894PhCHxuH3Y+6pZBSK8C6KG23t78gOBzf8hewcXtVBTmO IliIpw5qeBNPBCkjesGTvuzYplts8TdrnsvueBXPWMlfjQN2loMHnuON/f0z1M6Zb2Rw WNfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject; bh=ZofQnYw6j60LsYWFg5psrfReAiGogLUSlrkNKkUzXpE=; fh=syT1KEMniMGt5eX2KEl2c9/ynB6rWmxW/sK4vNcYJe8=; b=b38IF2Cy/GDtkgUdanv0yLgrNvKmO4DSPKbmGXgLjFS08YdK+yvTizfdGPXgEa5REq pODWg2XW764P+vw7FAPZub9EODl73im6tqhtmb+g1WKGxhRlh3IjQrtimVvd1JYuoHgB kK9bf0oz/nHqSPWWCgT0XzbBqxDdC1r5fkkAfs1SKVX325m50ehuWQ2GjWaWTdTCh5yw WT+iENPzm03L1EvcijmOjf7x/NxoHbDUc5ZGunObRoHl7bBPMMdjuvrjDneHdmoRRwK/ AhQaDpiD5Mxg25qNhYivf0QUC1pKiWZvV82PrR1cBlUVCzQb1bWBbJLxFsOK0r68lk3H flSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-79615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v17-20020a1709064e9100b00a3da6c9f514si454384eju.913.2024.02.24.03.48.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 03:48:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-79615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6083A1F230F4 for ; Sat, 24 Feb 2024 11:48:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 376FD376ED; Sat, 24 Feb 2024 11:47:40 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B69EB29431; Sat, 24 Feb 2024 11:47:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708775259; cv=none; b=m2CbEaA8yFYfaB/x3bR82QuCl3mcXMqYqDTIEJDxhTWkiSRG4sIJoKo2Te0ze50FCZkM51MxVZrkzDdE7JBN8rBQ9t4R73tU36WwM7nsn9kPptCqRvggvQzhF2Qaj7ZyFSv3MbA9669zVRSIoh3pR35BPkeCH7wHm/+SuKZnWAA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708775259; c=relaxed/simple; bh=9cqKCErocqPNNEG9BvS/09Xa2+C39jZH7JHgM7Zy5GA=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=pH9/gcaFdhcr0N+ZZpDwxy+f2VOT+8rmQ9NfwA6aQ/DdGBuO/FSysp3svFCHh5oTuYvlSXXtxLmuHAT95ueyXqEm6a1BGd7V//MTZfdrKAyMf2G+WU3J2+lFyK0Ars8kFocQ9Tn260f8PYXTJFDBF4rXdzvKbVz85nKpZSNHbaw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4ThlSp3ShJzNllG; Sat, 24 Feb 2024 19:46:02 +0800 (CST) Received: from dggpemm500002.china.huawei.com (unknown [7.185.36.229]) by mail.maildlp.com (Postfix) with ESMTPS id C97211400DD; Sat, 24 Feb 2024 19:47:28 +0800 (CST) Received: from [10.174.178.247] (10.174.178.247) by dggpemm500002.china.huawei.com (7.185.36.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sat, 24 Feb 2024 19:47:27 +0800 Subject: Re: [PATCH v3 4/7] dma-mapping: Add helpers for dma_range_map bounds To: Robin Murphy CC: Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Paul Walmsley , Palmer Dabbelt , Albert Ou , Lorenzo Pieralisi , Sudeep Holla , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Suravee Suthikulpanit , David Woodhouse , Lu Baolu , Niklas Schnelle , Matthew Rosato , Gerald Schaefer , Jean-Philippe Brucker , Rob Herring , Frank Rowand , Marek Szyprowski , Jason Gunthorpe , , , , , , Rob Herring , Christoph Hellwig , Jason Gunthorpe References: From: Hanjun Guo Message-ID: <6e837f8b-b855-99b6-6f73-721de97b3fa4@huawei.com> Date: Sat, 24 Feb 2024 19:47:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500002.china.huawei.com (7.185.36.229) On 2024/2/10 0:50, Robin Murphy wrote: > Several places want to compute the lower and/or upper bounds of a > dma_range_map, so let's factor that out into reusable helpers. > > Acked-by: Rob Herring > Reviewed-by: Christoph Hellwig > Reviewed-by: Jason Gunthorpe > Signed-off-by: Robin Murphy > --- > v2: fix warning for 32-bit builds > --- > arch/loongarch/kernel/dma.c | 9 ++------- > drivers/acpi/arm64/dma.c | 8 +------- > drivers/of/device.c | 11 ++--------- > include/linux/dma-direct.h | 18 ++++++++++++++++++ > 4 files changed, 23 insertions(+), 23 deletions(-) For the ARM64 code, Reviewed-by: Hanjun Guo Thanks Hanjun