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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 BF396C43460 for ; Thu, 8 Apr 2021 14:04:51 +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 4A85F6102A for ; Thu, 8 Apr 2021 14:04:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A85F6102A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.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:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DaXn4nrqwS4U5GEGpjBRE3lEIl3m141rGL19/EsHAM4=; b=IIkjzVRaDGNUS0juEh8jFxjgn BiZbRy1sdmorfadjkEIPdZhuTTR6JYI8ixprQYtjKtcaemEKFPA92HPPDG0hmeK5FPIt5nMFUAFnx sWbHpT6k5MV7TYnguJRA2BM0gmWJq9xY9udonYCKPZldRPoHh0AJ95xt2byZUU5UEPWS3s4Q304j1 E6zEnWxscx/uFu22uMLZFlnmltiwjhN0WkonIZNNfvBJpupHudVGWbpNrAvobS8KIWPbryfHF8n/N kJjlhqq0rAHlFTKcDcrxtwv+kzGaydiQtlQ7k9ZCMxapyPKOJIq8KP75sj1CmI1PwTrJ0MIYIb5a5 Jyy2jjSzA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUVFd-008DAy-KF; Thu, 08 Apr 2021 14:03:17 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUVFa-008DAT-9u for linux-arm-kernel@desiato.infradead.org; Thu, 08 Apr 2021 14:03:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Wzp1tqb4dw0EqSQlc3CrRhCH0JS21BToDDTLM5xPt88=; b=s+A7GqlN1HqhXwAtTPX2IjQ3j1 RxhMBRA3R7tKciW5COoAh9nZKfv+QCOrdQ53niSqSOeiHCARtsopYmEen0+q7yYOlcGd1+F/BILKy UvKQRjAR3igjcC4d6LwOYzLOroVSfzqLBzoqSGTg+B7P7u5cVXShRvF7LeX71ske9cKQq/jDXl38e /I9P+14ivQFhyUiLSHj4cWuAt5TWzLdKJQz9adqPxiSm9EzgQD/wPRCIJ2H27EEb6L0uOgTlod5s8 5+Az/0kceMN0W2WqMuzLRuoSLZMtTnBaLTkEMIlJBWGaZPWEmKr0kS2fDzMFe18KJaGjq82cAwkg/ au0srXCg==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lUVEs-00GIfu-Ns; Thu, 08 Apr 2021 14:02:38 +0000 Date: Thu, 8 Apr 2021 15:02:30 +0100 From: Christoph Hellwig To: Will Deacon Cc: "Isaac J. Manjarres" , pratikp@codeaurora.org, iommu@lists.linux-foundation.org, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH v4 09/15] iommu/io-pgtable-arm: Prepare PTE methods for handling multiple entries Message-ID: <20210408140230.GA3884124@infradead.org> References: <20210408045241.27316-1-isaacm@codeaurora.org> <20210408045241.27316-10-isaacm@codeaurora.org> <20210408135925.GC17998@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210408135925.GC17998@willie-the-truck> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html 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 On Thu, Apr 08, 2021 at 02:59:26PM +0100, Will Deacon wrote: > > -static void __arm_lpae_sync_pte(arm_lpae_iopte *ptep, > > +static void __arm_lpae_sync_pte(arm_lpae_iopte *ptep, int num_entries, > > struct io_pgtable_cfg *cfg) > > { > > dma_sync_single_for_device(cfg->iommu_dev, __arm_lpae_dma_addr(ptep), > > - sizeof(*ptep), DMA_TO_DEVICE); > > + sizeof(*ptep) * num_entries, DMA_TO_DEVICE); > > } > > Have you tested this with CONFIG_DMA_API_DEBUG=y? I _think_ it should be > ok as long as we don't attempt to sync across a page boundary, but it would > be good to give it a spin just to check. syncing over a page boundary is perfectly fine. It just needs to say in the bounds of the original mapping. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel