Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4083265imm; Tue, 29 May 2018 21:42:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLWbGkZGuKJKftqwI9Rc3AJLRYu1eROB08byJFoVg4QhigAIBiil3OznkE42rB+dmb4TDkF X-Received: by 2002:a62:d905:: with SMTP id s5-v6mr1281851pfg.20.1527655341885; Tue, 29 May 2018 21:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527655341; cv=none; d=google.com; s=arc-20160816; b=f5XAY9ZDKzuP8MfAcU195ixwZmZz6pKHavSheGOoI1nidhoyeX1Mg+jPM5Ej2q4cC7 8aqDYWCQZBC5DlS9TatG7nKEh2rXyF6QHBy3S+Jem0c1CId3ze6nnuI+tXVsj5TGSzQk dajENW3LTP5LN7oXiw8EWLxQky4EHhB5JAwL9DH6aqCjxicrL6Q1KKlFyxOuFxSGvXn0 3kxLqkoJVOCNgKP2ozAPdkR1/HaBBOqUz96PZssuT/ztMOp8kcmkRcDx7T2YZV6hHAPd JBLWng8wUtm1FfRnyfm0H00o7iwpV266xuYqPgLbBPDf0GQlKWP/VON2bnwL9PL9vL5s SSgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=jZSobJvaaLIlXeo5qtaFSOPS4xnhukRGV1u189EH8jc=; b=qRsPA6xUAEgZps0sODo6WCPaNnQ0FTVm7yYFv18klZt7yM7KFb/aPuzVv6oyayxBMp iRsWxoRkgGu3Ib7Hdr1NEMZHL23TjEzOu4ks9UGx2gZxOwaMR1FAmBBH5cQq4f3aYaMr +xhw6yJqMkZ+Kl9WUTjT7tl8cqW+N4owq+IC6FYBsJUco1UbuScEzFqn1ADWAIYiX65X kD0/tJlAK084bSY5ryOQtsGCxgZW2LFI1oAxWtbGcyNqvrE1nKhxk5XFWunmpKFMVQv/ UQlgDWAcRFIWCIFnQRlyazoEMBtuAU8uWgqSgH2UZ7WCTbLL5sJUu5i9D5xmuJLSfpZD FxFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=oECLOxp+; dkim=pass header.i=@codeaurora.org header.s=default header.b=B2bQdG2C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 92-v6si33483327plc.452.2018.05.29.21.42.07; Tue, 29 May 2018 21:42:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=oECLOxp+; dkim=pass header.i=@codeaurora.org header.s=default header.b=B2bQdG2C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755129AbeE3Elj (ORCPT + 99 others); Wed, 30 May 2018 00:41:39 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53152 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750762AbeE3Elg (ORCPT ); Wed, 30 May 2018 00:41:36 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 44A8560795; Wed, 30 May 2018 04:41:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527655296; bh=BqgO614aPnTfmcB6MxUvQXgCgiFuNd20/gnglnN2lng=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=oECLOxp+80J6t4B3//m+By8Ok49QuIwh2Z1P1PGtrJBXXgVTxWqMeILlsbEk6IRit xVciI/CNS/paueqy2FEAB3rovCCCwzD5acM0jORpLWb0FRc/kWetXcaWoW+h1CRRk2 TYLZ1zuufGKbnNwLUdjxeM95UVsLEwFuk/mqFOaE= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.47.50.40] (unknown [156.39.10.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0554A6028C; Wed, 30 May 2018 04:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527655294; bh=BqgO614aPnTfmcB6MxUvQXgCgiFuNd20/gnglnN2lng=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=B2bQdG2CavjJvJxNca7eklLWKwim7+gpphaVhFd1JpX0+1TciPyGkiMA99bRvYimx /eGG4M8s3qOpz6IdtrOT+E43qhkqYIiGSS1/5WFIpU9yYxYDm5hLC1mw8T3hg/dnJD nHhbQeWOXCMfuMzkb3sI1bHvf8nBghTjnonUcNNY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0554A6028C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH] PCI: Add pci=safemode option To: Greg Kroah-Hartman Cc: linux-pci@vger.kernel.org, timur@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jonathan Corbet , Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Christoffer Dall , "Paul E. McKenney" , Marc Zyngier , Kai-Heng Feng , Thymo van Beers , Frederic Weisbecker , Konrad Rzeszutek Wilk , David Rientjes , "Rafael J. Wysocki" , Keith Busch , Dongdong Liu , Frederick Lawler , Oza Pawandeep , Gabriele Paoloni , "open list:DOCUMENTATION" , open list References: <1527650389-31575-1-git-send-email-okaya@codeaurora.org> <20180530043103.GA19734@kroah.com> From: Sinan Kaya Message-ID: <6c317ed8-cca3-8862-5f3b-12cf14e4d53b@codeaurora.org> Date: Tue, 29 May 2018 21:41:33 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180530043103.GA19734@kroah.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/29/2018 9:31 PM, Greg Kroah-Hartman wrote: > On Tue, May 29, 2018 at 11:19:41PM -0400, Sinan Kaya wrote: >> Adding pci=safemode kernel command line parameter to turn off all PCI >> Express service driver as well as all optional PCIe features such as LTR, >> Extended tags, Relaxed Ordering etc. >> >> Also setting MPS configuration to PCIE_BUS_SAFE so that MPS and MRRS can be >> reconfigured with by the kernel in case BIOS hands off a broken >> configuration. > > Why not fix the BIOS? That's what sane platforms do :) > >> >> Signed-off-by: Sinan Kaya >> --- >> Documentation/admin-guide/kernel-parameters.txt | 2 ++ >> drivers/pci/pci.c | 7 +++++++ >> drivers/pci/pci.h | 2 ++ >> drivers/pci/pcie/portdrv_core.c | 2 +- >> drivers/pci/probe.c | 6 ++++++ >> 5 files changed, 18 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt >> index 641ec9c..247adbb 100644 >> --- a/Documentation/admin-guide/kernel-parameters.txt >> +++ b/Documentation/admin-guide/kernel-parameters.txt >> @@ -3153,6 +3153,8 @@ >> noari do not use PCIe ARI. >> noats [PCIE, Intel-IOMMU, AMD-IOMMU] >> do not use PCIe ATS (and IOMMU device IOTLB). >> + safemode turns of all optinal PCI features. Useful >> + for bringup/troubleshooting. > > s/optinal/optional/ ? sure. > > And you should explain what exactly in PCI is "optional". Who defines > this and where is that list and what can go wrong if those options are > not enabled? Bjorn and I discussed the need for such a "safe" mode feature when you want to bring up PCI for a platform. You want to turn off everything as a starter and just stick to bare minimum. I can add a few words describing them. The goal of this option is to keep base PCI features with MSI only. Things like PME, AER, ASPM, Extended Tags, LTR, Relaxed Ordering, SRIOV are all considered optional. safemode is certainly not intended for production environments. I can taint the kernel as a suggestion. I defined minimum as just booting a device and to be able to do DMA traffic only with 0 optimization > > In looking at your patch, I can't determine that at all, so there's no > way that someone just looking at this sentence will be able to > understand. > > thanks, > > greg k-h > -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.