Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp717483imm; Fri, 5 Oct 2018 10:32:12 -0700 (PDT) X-Google-Smtp-Source: ACcGV63EiVpop8ACPmGbT8ihUFtTXkfQ+Io61tc0KoKx/VqRyfB638jfDMNx4EUCmuq6yv0dmbeU X-Received: by 2002:a17:902:a40e:: with SMTP id p14-v6mr12650980plq.338.1538760732438; Fri, 05 Oct 2018 10:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538760732; cv=none; d=google.com; s=arc-20160816; b=jJ4kTkCEF50M48r0aXmWsaUblSHT0CTMi6oqYpV6v7tkgS/YtqckXeFfi+hT5HUe73 13bcPNEFOG4wVCR+8PCT6aViruvxwoL4RUKpOqo22fWWuro5r32fzkaWtwfOAUH2WTIk w4MGTmsGp2HesSizn/CIqBKyUFM/9XxJNvw2ZjqJ8kSLVTB2Iw5vCKn2nFqGK04KyY6s QVj+aH17DNtZvW5dxazSHIwTelRDTOOiL5sPAh3NNfuqi6QjAyDvR2J2OS+sFCSB8Qna jE+8jot2kk0EyBM3k2XvD72o27gCbi3RypU/1KpCKMMKVo2Lcn3X6PVJaHuQH54L9TwL UPJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=H65W/3hcc1TnrqJw/SjQyn6dvcVfltVb821q5nupVvY=; b=TwAO4lRjVtOayf4TVoN1GNfGD+4i83phqFTnq4YptaWywmOd1C3nWjkyRtR5FbUYCW U88RF0vH6yavXl1x5vk5iWH1UIwfPBrwoq2EWrjm5+tWPIWbQWJNRyMzwpxHCupz0SvQ v1qpKKDQYbLN7Lsy6sD5OKNAaFwy9dQjVdizZyQxkL7dnPSzsleKkC3W7pYOQun2S9i0 4WpPmpK0R4A4lSjBZ9BiUug6WH09SS7IuW9VBSsnwe3HmcUeGEmA4Mhc3cVKcKrYd0q8 i6oKF7W94W7czQuHPi4hZ9KfFSGyW+uTd5VGfqehtNP4t0Rr36KpjvgdRrxoTujjKYMe KQaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fcDDUumB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q143-v6si4784396pgq.483.2018.10.05.10.31.56; Fri, 05 Oct 2018 10:32:12 -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=@kernel.org header.s=default header.b=fcDDUumB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728314AbeJFAba (ORCPT + 99 others); Fri, 5 Oct 2018 20:31:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:50914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727941AbeJFAba (ORCPT ); Fri, 5 Oct 2018 20:31:30 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 51763213A2; Fri, 5 Oct 2018 17:31:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538760707; bh=yjr3rJd5n7kwy89yTMmB1oPgrPRMWhCND6814p+FZUs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fcDDUumB+qUsKyf0KYt3azj1S4oq8+T96BrmhwuNVFLlnEMB9O8WOs2GjpT0hkoKU PGQErqzpAAUzEHKWCjzzQf7hoJGHYtc9UVUnoNyBtazFkO3gBXOo3wL1ZRjqNDCcvx U3shgFYeZ6jllzmhgzk79s5W5EHDUnaNfpL1msCA= Date: Fri, 5 Oct 2018 12:31:45 -0500 From: Bjorn Helgaas To: Keith Busch Cc: Linux PCI , Bjorn Helgaas , Benjamin Herrenschmidt , Sinan Kaya , Thomas Tai , poza@codeaurora.org, Lukas Wunner , Christoph Hellwig , Mika Westerberg , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/12] error handling and pciehp maintenance Message-ID: <20181005173145.GL120535@bhelgaas-glaptop.roam.corp.google.com> References: <20180918235848.26694-1-keith.busch@intel.com> <20181004214015.GK120535@bhelgaas-glaptop.roam.corp.google.com> <20181004221137.GB21834@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181004221137.GB21834@localhost.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+cc arm64 folks, LKML: This conversation is about this patch: https://lore.kernel.org/linux-pci/20180918235848.26694-3-keith.busch@intel.com which fixes some PCIe AER error injection bugs, but also makes the error injector dependent on DYNAMIC_FTRACE_WITH_REGS, which not all arches support. Note that this question is only about the error *injection* module used for testing. It doesn't affect AER support itself.] On Thu, Oct 04, 2018 at 04:11:37PM -0600, Keith Busch wrote: > On Thu, Oct 04, 2018 at 04:40:15PM -0500, Bjorn Helgaas wrote: > > On Tue, Sep 18, 2018 at 05:58:36PM -0600, Keith Busch wrote: > > > I ran into a lot of trouble testing error handling, and this series is > > > just trying to simplify some things. The first 4 fix up aer_inject, and > > > the rest are cleanup to make better use of kernel APIs. > > > > > > Keith Busch (12): > > > PCI: Set PCI bus accessors to noinline > > > PCI/AER: Covertly inject errors > > > PCI/AER: Reuse existing service device lookup > > > PCI/AER: Abstract AER interrupt handling > > > PCI/AER: Remove dead code > > > PCI/AER: Remove error source from aer struct > > > PCI/AER: Use kfifo for tracking events > > > PCI/AER: Use kfifo helper inserting locked elements > > > PCI/AER: Don't read upstream ports below fatal errors > > > PCI/AER: Use threaded IRQ for bottom half > > > PCI/AER: Use managed resource allocations > > > PCI/pciehp: Use device managed allocations > > > > > > drivers/pci/access.c | 4 +- > > > drivers/pci/hotplug/pciehp_core.c | 14 +- > > > drivers/pci/hotplug/pciehp_hpc.c | 48 ++---- > > > drivers/pci/pcie/Kconfig | 2 +- > > > drivers/pci/pcie/aer.c | 219 ++++++--------------------- > > > drivers/pci/pcie/aer_inject.c | 306 ++++++++++++++++++++------------------ > > > drivers/pci/pcie/portdrv.h | 4 - > > > drivers/pci/pcie/portdrv_core.c | 1 + > > > 8 files changed, 227 insertions(+), 371 deletions(-) > > > > Thanks a lot for doing this! I applied these to pci/hotplug for > > v4.20, except for "PCI/AER: Don't read upstream ports below fatal > > errors", which seems to be already there via another posting, and > > "PCI/pciehp: Use device managed allocations", which needs a few > > tweaks. > > Sounds good, and thanks for applying! > > In case this went unnoticed, patch 2's aer_inject using ftrace hooks > to pci config accessors is really cool and fixes several kernel crashes > I encountered, but it may not work on every architecture. I'm not sure > how widely aer_inject is used, so maybe there are no concerns with the > DYNAMIC_FTRACE_WITH_REGS dependency, but I just want to reemphasize that > dependency in case there are valid objections. Oh, indeed, I hadn't noticed this arch dependency. AFAICT, the new DYNAMIC_FTRACE_WITH_REGS dependency means aer_inject will work only on these arches: arm # if (!XIP_KERNEL) && !CPU_ENDIAN_BE32 && MMU powerpc # if PPC64 && CPU_LITTLE_ENDIAN riscv # ARCH_RV64I only s390 x86 Notably missing is arm64, which has DYNAMIC_FTRACE but not DYNAMIC_FTRACE_WITH_REGS. Bjorn