From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-6.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 2B6047D2F0 for ; Fri, 12 Apr 2019 11:17:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727057AbfDLLQx (ORCPT ); Fri, 12 Apr 2019 07:16:53 -0400 Received: from 8bytes.org ([81.169.241.247]:34386 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726682AbfDLLQx (ORCPT ); Fri, 12 Apr 2019 07:16:53 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 5249D21D; Fri, 12 Apr 2019 13:16:51 +0200 (CEST) Date: Fri, 12 Apr 2019 13:16:50 +0200 From: Joerg Roedel To: Zhen Lei 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 Subject: Re: [PATCH v5 1/6] iommu: add generic boot option iommu.dma_mode Message-ID: <20190412111649.GK4518@8bytes.org> References: <20190409125308.18304-1-thunder.leizhen@huawei.com> <20190409125308.18304-2-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190409125308.18304-2-thunder.leizhen@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org 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. Regards, Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Date: Fri, 12 Apr 2019 11:16:50 +0000 Subject: Re: [PATCH v5 1/6] iommu: add generic boot option iommu.dma_mode Message-Id: <20190412111649.GK4518@8bytes.org> List-Id: References: <20190409125308.18304-1-thunder.leizhen@huawei.com> <20190409125308.18304-2-thunder.leizhen@huawei.com> In-Reply-To: <20190409125308.18304-2-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Zhen Lei 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 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. Regards, Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH v5 1/6] iommu: add generic boot option iommu.dma_mode Date: Fri, 12 Apr 2019 13:16:50 +0200 Message-ID: <20190412111649.GK4518@8bytes.org> References: <20190409125308.18304-1-thunder.leizhen@huawei.com> <20190409125308.18304-2-thunder.leizhen@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190409125308.18304-2-thunder.leizhen@huawei.com> Sender: linux-kernel-owner@vger.kernel.org To: Zhen Lei 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 List-Id: iommu@lists.linux-foundation.org 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. Regards, Joerg 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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 58360C10F14 for ; Fri, 12 Apr 2019 11:16:55 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (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 2888E20643 for ; Fri, 12 Apr 2019 11:16:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2888E20643 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C0CE394B; Fri, 12 Apr 2019 11:16:54 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id AAB579D for ; Fri, 12 Apr 2019 11:16:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3DD0914D for ; Fri, 12 Apr 2019 11:16:53 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id 5249D21D; Fri, 12 Apr 2019 13:16:51 +0200 (CEST) Date: Fri, 12 Apr 2019 13:16:50 +0200 From: Joerg Roedel To: Zhen Lei Subject: Re: [PATCH v5 1/6] iommu: add generic boot option iommu.dma_mode Message-ID: <20190412111649.GK4518@8bytes.org> References: <20190409125308.18304-1-thunder.leizhen@huawei.com> <20190409125308.18304-2-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190409125308.18304-2-thunder.leizhen@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: linux-ia64 , Sebastian Ott , linux-doc , Benjamin Herrenschmidt , Hanjun Guo , Heiko Carstens , Paul Mackerras , "H . Peter Anvin" , linux-s390 , Jonathan Corbet , Jean-Philippe Brucker , Michael Ellerman , x86 , Ingo Molnar , Fenghua Yu , Will Deacon , linuxppc-dev , Borislav Petkov , Thomas Gleixner , Gerald Schaefer , Tony Luck , David Woodhouse , linux-kernel , iommu , Martin Schwidefsky , Robin Murphy X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org Message-ID: <20190412111650.Hjd-KKT4edQpmFdcdMJXFERG9lQ3QJfVtBqf4QIWVwQ@z> 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. Regards, Joerg _______________________________________________ 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 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable 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 C7D7FC10F0E for ; Fri, 12 Apr 2019 11:24:50 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 1A6B22082E for ; Fri, 12 Apr 2019 11:24:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A6B22082E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 44gbCM3SxhzDqTY for ; Fri, 12 Apr 2019 21:24:47 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=8bytes.org (client-ip=2a01:238:4383:600:38bc:a715:4b6d:a889; helo=theia.8bytes.org; envelope-from=joro@8bytes.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=8bytes.org X-Greylist: delayed 379 seconds by postgrey-1.36 at bilbo; Fri, 12 Apr 2019 21:23:18 AEST Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 44gb9f2HH2zDqSh for ; Fri, 12 Apr 2019 21:23:18 +1000 (AEST) Received: by theia.8bytes.org (Postfix, from userid 1000) id 5249D21D; Fri, 12 Apr 2019 13:16:51 +0200 (CEST) Date: Fri, 12 Apr 2019 13:16:50 +0200 From: Joerg Roedel To: Zhen Lei Subject: Re: [PATCH v5 1/6] iommu: add generic boot option iommu.dma_mode Message-ID: <20190412111649.GK4518@8bytes.org> References: <20190409125308.18304-1-thunder.leizhen@huawei.com> <20190409125308.18304-2-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190409125308.18304-2-thunder.leizhen@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ia64 , Sebastian Ott , linux-doc , Hanjun Guo , Heiko Carstens , Paul Mackerras , "H . Peter Anvin" , linux-s390 , Jonathan Corbet , Jean-Philippe Brucker , x86 , Ingo Molnar , Fenghua Yu , Will Deacon , John Garry , linuxppc-dev , Borislav Petkov , Thomas Gleixner , Gerald Schaefer , Tony Luck , David Woodhouse , linux-kernel , iommu , Martin Schwidefsky , Robin Murphy Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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. Regards, Joerg