Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp795608ybh; Wed, 15 Jul 2020 15:53:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAdXEOHGM0NZnvnR6pIt3B3ZxJ7DEsJRQSLKmyx+aDQ4+0avgdlVJe0C0RIQ1FW8uyeULh X-Received: by 2002:aa7:d4ca:: with SMTP id t10mr1821895edr.244.1594853586939; Wed, 15 Jul 2020 15:53:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594853586; cv=none; d=google.com; s=arc-20160816; b=JzfllmgkVH3FxWTWFuacb5CGblmcqDHClZfWbdM7YSCXDbOWSF5oymJKFhMzfypQWd 8BD1bbanPgX9U+9aVKSk9sDHZQ2t35x/nUTm9f2xODHU1IdOMzrDl1xqe926CW0wJA6g Rbxp6FCIjGxLXWGF+mrBmfX7rV084V9jY8EtJ+5tfxux8XrGw99UkPJ4KoG58M5ncX4d L+b6UWv4ae0W3pPmIKQAML2UYeAOBY4YIHCp/3lOYTxjseyyl9vsBlJ91G/NuiTaUVT+ J0MYMX2Jvs4qjaXmtUNrCUlc9JH6QE4IJvI63yb5S839ioGzxyvwWsbRtI6EqT+oC50c 5WlA== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=lYA9FeiwO+e585jDFgmHQZ3QYNnyFWffnxuzavIFunY=; b=uHD6NgZaQAjokEP0yGfxGvv9dmmSmAZYPo3EtMqdzPbuV7ju6yXKXBN/I2NNQdnR0I SSGQ3SD0tg8poXoWg2SqdCHIW63CWBvjOUgqqG3p8eEeULqthAhEVBxSZhRDoE3o6zjG ZTv+iu/G0Bn5Qm+a1GtirGFn3LNCSRuc2KT+Zh//9+nZNwr8EH3nq6/NFnL0JBwvq49u 8S0cCvnnA+WRCPpe/YXHKSDgYAynMU3uEQq2teRwxIrY8OM+36HzcUET6kF4/G+3d8sn KGYg+ycOMlpfn9G8BUhTJdMPTZ2/s5vG5RWuOP+tQAJt3H0NWxIsoaIY4+3WfTwhnunR Q1NQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r24si2096364edp.282.2020.07.15.15.52.43; Wed, 15 Jul 2020 15:53:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727062AbgGOWw3 (ORCPT + 99 others); Wed, 15 Jul 2020 18:52:29 -0400 Received: from kernel.crashing.org ([76.164.61.194]:37670 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbgGOWw3 (ORCPT ); Wed, 15 Jul 2020 18:52:29 -0400 Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 06FMnOHG014418 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 15 Jul 2020 17:49:27 -0500 Message-ID: <5d4b3a716f85017c17c52a85915fba9e19509e81.camel@kernel.crashing.org> Subject: Re: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86 From: Benjamin Herrenschmidt To: Bjorn Helgaas , David Laight Cc: "'Oliver O'Halloran'" , Arnd Bergmann , Keith Busch , Paul Mackerras , sparclinux , Toan Le , Greg Ungerer , Marek Vasut , Rob Herring , Lorenzo Pieralisi , Sagi Grimberg , Russell King , Ley Foon Tan , Christoph Hellwig , Geert Uytterhoeven , Kevin Hilman , linux-pci , Jakub Kicinski , Matt Turner , "linux-kernel-mentees@lists.linuxfoundation.org" , Guenter Roeck , Ray Jui , Jens Axboe , Ivan Kokshaysky , Shuah Khan , "bjorn@helgaas.com" , Boris Ostrovsky , Richard Henderson , Juergen Gross , Bjorn Helgaas , Thomas Bogendoerfer , Scott Branden , Jingoo Han , "Saheed O. Bolarinwa" , "linux-kernel@vger.kernel.org" , Philipp Zabel , Greg Kroah-Hartman , Gustavo Pimentel , linuxppc-dev , "David S. Miller" , Heiner Kallweit Date: Thu, 16 Jul 2020 08:49:21 +1000 In-Reply-To: <20200715221230.GA563957@bjorn-Precision-5520> References: <20200715221230.GA563957@bjorn-Precision-5520> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2020-07-15 at 17:12 -0500, Bjorn Helgaas wrote: > > I've 'played' with PCIe error handling - without much success. > > What might be useful is for a driver that has just read ~0u to > > be able to ask 'has there been an error signalled for this device?'. > > In many cases a driver will know that ~0 is not a valid value for the > register it's reading. But if ~0 *could* be valid, an interface like > you suggest could be useful. I don't think we have anything like that > today, but maybe we could. It would certainly be nice if the PCI core > noticed, logged, and cleared errors. We have some of that for AER, > but that's an optional feature, and support for the error bits in the > garden-variety PCI_STATUS register is pretty haphazard. As you note > below, this sort of SERR/PERR reporting is frequently hard-wired in > ways that takes it out of our purview. We do have pci_channel_state (via pci_channel_offline()) which covers the cases where the underlying error handling (such as EEH or unplug) results in the device being offlined though this tend to be asynchronous so it might take a few ~0's before you get it. It's typically used to break potentially infinite loops in some drivers. There is no interface to check whether *an* error happened though for the most cases it will be captured in the status register, which is harvested (and cleared ?) by some EDAC drivers iirc... All this lacks coordination, I agree. Cheers, Ben.