From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CB32C433B4 for ; Thu, 1 Apr 2021 16:50:28 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF1B46120D for ; Thu, 1 Apr 2021 16:50:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF1B46120D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=c9+wJ6ivV3KGGgADHpNORClz1mZGxN4njt5q3M1LVso=; b=MHFuh99aXDXYWtOqPXBkhIoSGq MUX6CjUbVBu3nkOM/XLFZpHNiSqMrcK5PVzyVyKUHsWPwIV+XyDAFCB+Mmx69YE5LBxNVsH6GuBEm S5qImV77u4/mx7TH7P/RIXH52ACipe0jVDyODwF5K+SeuDSwKwcxPxIC7YJV86vGrDQC2zLPi10QW eJJsEFFkp2SEUX9QyVIm+7a/ko//OIXMts6yT5/c9CrVxdlr6ClrlvbPhAf8ZlIQz0THqpaREphrZ DmX6hstVAXcEHc8Do1qQpqoLUns7Kj+fSrJROEJDhKkPtLqKNSV1v+zAs6+VFcVtku1Jrq82PakCP U6zDKuRg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lS0Uz-00ANlb-4s; Thu, 01 Apr 2021 16:48:49 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lS0Uk-00ANhU-1n for linux-arm-kernel@lists.infradead.org; Thu, 01 Apr 2021 16:48:37 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1EB056120D; Thu, 1 Apr 2021 16:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617295712; bh=OFqYUOwYn9oEx+PLsMwm+WXRPl6/QMh7r3jP3kWDjeg=; h=From:To:Cc:Subject:Date:From; b=sjGe147voYOBiPC4sk7lY4ivUJbnksurRIjTBS7L+Sy7dGICFTP6t2LkDu7gF9bHM M8nQ3SR/2xtPMWayGqaLqKE6RDpAPMgqPYG6hFeICSGQrp1SToxXCWQ6oNH3A2SD5q quODb64oPPfIVw599o9hwL1TCtMMVjxyLYCD91HQsq/LI48YS5jNmef/wTerloNrG3 pnEovL2rWq+SgI7eS7XNsei5ZJE6Ll6tzmDBp51PVFy7YwS+KqqYUMxVSykZl3kfFd jlWbdGNMOR6chnyMD9EmthP6snAfxGrm3mHQT2N+GrOTin/JS8LQz3Pqi4dUDDGzZy 9GP4PKGwBo4oA== From: Will Deacon To: iommu@lists.linux-foundation.org Cc: linux-arm-kernel@lists.infradead.org, Will Deacon , "Isaac J. Manjarres" , Pratik Patel , Robin Murphy , Lu Baolu Subject: [RFC PATCH 0/6] iommu_pgsize() improvements to help towards ->[un]map_pages() Date: Thu, 1 Apr 2021 17:47:32 +0100 Message-Id: <20210401164738.9513-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210401_174834_304735_DC449A41 X-CRM114-Status: UNSURE ( 8.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Isaac, I had a go at removing the loop you have in pgsize_bitmap() over at: https://lore.kernel.org/r/20210331030042.13348-4-isaacm@codeaurora.org and I ended up with this. It's _very_ lightly tested, but I thought it might be useful to you, especially if you're going to be adding support for '->map_pages' as well. Cheers, Will Cc: "Isaac J. Manjarres" Cc: Pratik Patel Cc: Robin Murphy Cc: Lu Baolu --->8 Isaac J. Manjarres (2): iommu/io-pgtable: Introduce unmap_pages() as a page table op iommu: Add an unmap_pages() op for IOMMU drivers Will Deacon (4): iommu: Use bitmap to calculate page size in iommu_pgsize() iommu: Split 'addr_merge' argument to iommu_pgsize() into separate parts iommu: Hook up '->unmap_pages' driver callback iommu: Accomodate larger pages in iommu_pgsize() 'count' calculation drivers/iommu/iommu.c | 87 +++++++++++++++++++++++++++----------- include/linux/io-pgtable.h | 4 ++ include/linux/iommu.h | 4 ++ 3 files changed, 70 insertions(+), 25 deletions(-) -- 2.31.0.291.g576ba9dcdaf-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel