From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751466AbdJOVwI (ORCPT ); Sun, 15 Oct 2017 17:52:08 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47698 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751030AbdJOVwG (ORCPT ); Sun, 15 Oct 2017 17:52:06 -0400 Subject: Re: [PATCH] powerpc/powernv: Enable reset_devices parameter to issue a PHB reset To: Benjamin Herrenschmidt , Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, paulus@samba.org, maurosr@linux.vnet.ibm.com References: <20171012222153.24905-1-gpiccoli@linux.vnet.ibm.com> <87fuantpdk.fsf@concordia.ellerman.id.au> <1507972420.25065.270.camel@kernel.crashing.org> From: "Guilherme G. Piccoli" Date: Sun, 15 Oct 2017 19:51:59 -0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1507972420.25065.270.camel@kernel.crashing.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17101521-0008-0000-0000-000002911B4F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007898; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000236; SDB=6.00931643; UDB=6.00469082; IPR=6.00711933; BA=6.00005639; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017553; XFM=3.00000015; UTC=2017-10-15 21:52:04 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101521-0009-0000-0000-000037047AA5 Message-Id: <98200d15-41f9-e376-b870-472f78971735@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-15_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710150317 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/14/2017 06:13 AM, Benjamin Herrenschmidt wrote: > No, he's saying this is useful for the developers when debugging the > kernel driver (or for asking users to "test" something as part of > debugging a driver problem). > > It's common to have various command line options affecting PCIe > behaviour. I don't see a fundamental problem with this one. Thanks Ben, very well explained. > > One could argue in fact that we should always PERST everything, the > main reason for not doing so is that on "normal" boot, OPAL has already > done it and it would slow the boot process down. > > My only objection here is the actual name of the argument. We've had a > number of pci options so far, it makes sense to make sure we still have > "pci" in the name. I just wanted to take advantage of the already existing argument, reset_devices. And..in fact, the PERST is a reset right? But if you prefer, we can change it - pci_force_reset? Suggestions are welcome. > > Also having the driver do a "reset" is not always simple, we don't > always have full control of PERST on a per-device basis. The patch > proposed will PERST top level PHBs which will propagate as hot reset > down switches, not 100% PERST but still useful. > Exactly, this reset happens on early arch stage of PCI initialization, not trivial to drivers perform it. Anyway, let me know if you want a V2 with improvements or to drop it..I still see use cases for this. Thanks, Guilherme > Cheers, > Ben. >