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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1263C433EF for ; Tue, 14 Dec 2021 17:50:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236645AbhLNRuv (ORCPT ); Tue, 14 Dec 2021 12:50:51 -0500 Received: from foss.arm.com ([217.140.110.172]:33824 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229812AbhLNRuu (ORCPT ); Tue, 14 Dec 2021 12:50:50 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A38B1D6E; Tue, 14 Dec 2021 09:50:47 -0800 (PST) Received: from [10.57.34.58] (unknown [10.57.34.58]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 862113F5A1; Tue, 14 Dec 2021 09:50:46 -0800 (PST) Message-ID: Date: Tue, 14 Dec 2021 17:50:41 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH v2 10/11] iommu/iova: Move flush queue code to iommu-dma Content-Language: en-GB To: John Garry , joro@8bytes.org, will@kernel.org Cc: linux-kernel@vger.kernel.org, willy@infradead.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org References: <0752bfc207b974e76eab7564058b5a7b9e8d5e6e.1639157090.git.robin.murphy@arm.com> From: Robin Murphy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-12-14 17:18, John Garry via iommu wrote: > On 10/12/2021 17:54, Robin Murphy wrote: >> +    iovad->fq_domain = fq_domain; >> +    iovad->fq = queue; >> + >> +    timer_setup(&iovad->fq_timer, fq_flush_timeout, 0); >> +    atomic_set(&iovad->fq_timer_on, 0); >> + >> +    return 0; >> +} >> + >> + > > nit: a single blank line is standard, I think Hmm, you're right - I've grown fond of leaving an extra little bit of breathing space between logically-independent sections of code, and for some reason I thought this file was already in that style, but indeed it isn't. Joerg - let me know if you feel strongly enough that you'd like me to change that. I'm going to have one last go at fixing tegra-drm, so I'm happy to send a v3 of the whole series later this week if there are any other minor tweaks too. Thanks for all the reviews! Robin. > > Cheers > >>   static inline size_t cookie_msi_granule(struct iommu_dma_cookie >> *cookie) >>   { > > > _______________________________________________ > iommu mailing list > iommu@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11E36C433F5 for ; Tue, 14 Dec 2021 17:50:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 93309817E4; Tue, 14 Dec 2021 17:50:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TATIYt4A0l31; Tue, 14 Dec 2021 17:50:52 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7C85B817B3; Tue, 14 Dec 2021 17:50:52 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4F10EC002F; Tue, 14 Dec 2021 17:50:52 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id A1156C0012 for ; Tue, 14 Dec 2021 17:50:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 81EAF60C0F for ; Tue, 14 Dec 2021 17:50:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VWOvMbYJM78L for ; Tue, 14 Dec 2021 17:50:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp3.osuosl.org (Postfix) with ESMTP id A01F660BC2 for ; Tue, 14 Dec 2021 17:50:48 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A38B1D6E; Tue, 14 Dec 2021 09:50:47 -0800 (PST) Received: from [10.57.34.58] (unknown [10.57.34.58]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 862113F5A1; Tue, 14 Dec 2021 09:50:46 -0800 (PST) Message-ID: Date: Tue, 14 Dec 2021 17:50:41 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH v2 10/11] iommu/iova: Move flush queue code to iommu-dma Content-Language: en-GB To: John Garry , joro@8bytes.org, will@kernel.org References: <0752bfc207b974e76eab7564058b5a7b9e8d5e6e.1639157090.git.robin.murphy@arm.com> From: Robin Murphy In-Reply-To: Cc: linux-mm@kvack.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, willy@infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" T24gMjAyMS0xMi0xNCAxNzoxOCwgSm9obiBHYXJyeSB2aWEgaW9tbXUgd3JvdGU6Cj4gT24gMTAv MTIvMjAyMSAxNzo1NCwgUm9iaW4gTXVycGh5IHdyb3RlOgo+PiArwqDCoMKgIGlvdmFkLT5mcV9k b21haW4gPSBmcV9kb21haW47Cj4+ICvCoMKgwqAgaW92YWQtPmZxID0gcXVldWU7Cj4+ICsKPj4g K8KgwqDCoCB0aW1lcl9zZXR1cCgmaW92YWQtPmZxX3RpbWVyLCBmcV9mbHVzaF90aW1lb3V0LCAw KTsKPj4gK8KgwqDCoCBhdG9taWNfc2V0KCZpb3ZhZC0+ZnFfdGltZXJfb24sIDApOwo+PiArCj4+ ICvCoMKgwqAgcmV0dXJuIDA7Cj4+ICt9Cj4+ICsKPj4gKwo+IAo+IG5pdDogYSBzaW5nbGUgYmxh bmsgbGluZSBpcyBzdGFuZGFyZCwgSSB0aGluawoKSG1tLCB5b3UncmUgcmlnaHQgLSBJJ3ZlIGdy b3duIGZvbmQgb2YgbGVhdmluZyBhbiBleHRyYSBsaXR0bGUgYml0IG9mIApicmVhdGhpbmcgc3Bh Y2UgYmV0d2VlbiBsb2dpY2FsbHktaW5kZXBlbmRlbnQgc2VjdGlvbnMgb2YgY29kZSwgYW5kIGZv ciAKc29tZSByZWFzb24gSSB0aG91Z2h0IHRoaXMgZmlsZSB3YXMgYWxyZWFkeSBpbiB0aGF0IHN0 eWxlLCBidXQgaW5kZWVkIGl0IAppc24ndC4KCkpvZXJnIC0gbGV0IG1lIGtub3cgaWYgeW91IGZl ZWwgc3Ryb25nbHkgZW5vdWdoIHRoYXQgeW91J2QgbGlrZSBtZS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