From patchwork Tue Oct 29 02:11:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Niethe X-Patchwork-Id: 1185801 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472FTh6khCz9sPL for ; Tue, 29 Oct 2019 13:12:24 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FMiNq8NP"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 472FTh3XsmzDsNc for ; Tue, 29 Oct 2019 13:12:24 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::441; helo=mail-pf1-x441.google.com; envelope-from=jniethe5@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FMiNq8NP"; dkim-atps=neutral Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 472FT25L8zzDsFk for ; Tue, 29 Oct 2019 13:11:50 +1100 (AEDT) Received: by mail-pf1-x441.google.com with SMTP id b128so8383439pfa.1 for ; Mon, 28 Oct 2019 19:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jPyyMxIjbUfqVuqj+l052E7nVSTi72MhtvBCZgcpr2g=; b=FMiNq8NP+mk7eBHoWwUqI5MuWq5jyn2zibLCw/FOtfj+88BSt1N9faYSALTDRIWXdA +B5sbW4Lf6WILxw3B4VXfwnX15ZcMMpciUfBLK6XzZlDkWRsBPpjYGeYMBiTeZ6nsFul p6+gqJ3LGAe4nGLc7G/LU6R2der3utfDlImnwnDmFaWQM17ydvAnQNzjNefJjAziVO5/ bYVMmuSe2ZombBIktjxuSSASUE5qIxFQDLhBUpewZ/XdTIN+tCS5PvZmujOzPOuUvSW0 +8uHefa/jj9u4OWRt3Hi3nEncOzacuhrgKV+y/2G17x/LAGOWL+K1Ewil+eZeCdHfzsm bU/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jPyyMxIjbUfqVuqj+l052E7nVSTi72MhtvBCZgcpr2g=; b=FFD6u/oQjxR8/MBUF7ZkwhAIDLrBz7b71QO1Z+QpBH54qMJENd6T9igLKJWbuNXOmH XVo2onMUIltwE05H+OJMWu+pBNEfbIOa8/3/m9GjrgOhEwjHOtNVwml9uSSOLECsPXLs zOwsAwGzZTftsNSXDvK472qojDGV543ip3YJbaVej+VHFdyNyI0i3fwu/DeWSGPLMz32 7Pq0sLVJXX3iApm56LUzaUAg50ZYQ1yAJEc4bmqDFoojJv0X9WMkc08NKS0UP9W39j6d CJSjdsfkSMAQ2+mFW1/4hdl6A7S1BQhP4nxJ8MV0/5mbEbP5/yCPI0Hhb8JuZvFLx594 n7mg== X-Gm-Message-State: APjAAAXyUn36n2CmU5ZCgdbMXAJgwi2soaeV4Of/cSz6zqc3RntE7eWL kzEZvZgPP3zqtcdpWUdtaPqalbRq X-Google-Smtp-Source: APXvYqxNefUy/9hlJGFdLNmVGrFfu9CJk1YbmnyTx1u2hviRvIWOfUfu96xTrI+kSda/cX+NcXGomw== X-Received: by 2002:a62:5442:: with SMTP id i63mr23652300pfb.220.1572315106530; Mon, 28 Oct 2019 19:11:46 -0700 (PDT) Received: from sol.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id w14sm13710999pge.56.2019.10.28.19.11.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2019 19:11:45 -0700 (PDT) From: Jordan Niethe To: skiboot@lists.ozlabs.org Date: Tue, 29 Oct 2019 13:11:03 +1100 Message-Id: <20191029021106.29396-1-jniethe5@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Skiboot] [RFC PATCH v2 0/3] Changes to restoring buses after PCI reset X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" These are RFC patches for reworking how PCI buses are restored after performing a PCI fundamental reset on PHB4. The motivation for this: 1: Get rid delays in skiboot to stop holding up OPAL_PCI_RESET calls 2: Ensure slots with power controllers restore their state This version moves the machinery for restoring buses out from being specific to PHB4 and makes it apart of the generic PCIe slot. This was done as nothing was specific to PHB4 and it would potentially used by other PHBs/RCs in the future. For now however, the changes still only effect PHB4. Jordan Niethe (3): core/pci: Add functions for iterating PCI devices core/pcie-slot: Extend slot state machine to restore bus numbers core/pcie-slot: Restore slot power controller state core/pci-slot.c | 3 + core/pci.c | 44 +++++++++++ core/pcie-slot.c | 177 +++++++++++++++++++++++++++++++++++++++++++++ hw/phb4.c | 6 +- include/pci-slot.h | 15 ++++ include/pci.h | 7 ++ 6 files changed, 249 insertions(+), 3 deletions(-)