From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH v5 1/6] iommu: add generic boot option iommu.dma_mode References: <20190409125308.18304-1-thunder.leizhen@huawei.com> <20190409125308.18304-2-thunder.leizhen@huawei.com> <20190412111649.GK4518@8bytes.org> From: "Leizhen (ThunderTown)" Message-ID: <5CBE7C51.8070002@huawei.com> Date: Tue, 23 Apr 2019 10:45:37 +0800 MIME-Version: 1.0 In-Reply-To: <20190412111649.GK4518@8bytes.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-doc-owner@vger.kernel.org List-Archive: List-Post: To: Joerg Roedel Cc: Jean-Philippe Brucker , John Garry , Robin Murphy , Will Deacon , Jonathan Corbet , linux-doc , Sebastian Ott , Gerald Schaefer , Martin Schwidefsky , Heiko Carstens , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Tony Luck , Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , David Woodhouse , iommu , linux-kernel , linux-s390 , linuxppc-dev , x86 , linux-ia64 , Hanjun Guo List-ID: On 2019/4/12 19:16, Joerg Roedel wrote: > On Tue, Apr 09, 2019 at 08:53:03PM +0800, Zhen Lei wrote: >> +static int __init iommu_dma_mode_setup(char *str) >> +{ >> + if (!str) >> + goto fail; >> + >> + if (!strncmp(str, "passthrough", 11)) >> + iommu_default_dma_mode = IOMMU_DMA_MODE_PASSTHROUGH; >> + else if (!strncmp(str, "lazy", 4)) >> + iommu_default_dma_mode = IOMMU_DMA_MODE_LAZY; >> + else if (!strncmp(str, "strict", 6)) >> + iommu_default_dma_mode = IOMMU_DMA_MODE_STRICT; >> + else >> + goto fail; >> + >> + pr_info("Force dma mode to be %d\n", iommu_default_dma_mode); > > Printing a number is not very desriptive or helpful to the user. Please > print the name of the mode instead. OK, thanks. I have given up adding iommu.dma_mode boot option according to Robin and Will's suggestion. So these codes will be removed in v6. > > > Regards, > > Joerg > > . > -- Thanks! BestRegards