From patchwork Tue Sep 12 04:56:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Neuling X-Patchwork-Id: 812690 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xrswB2xrGz9s8J for ; Tue, 12 Sep 2017 14:56:58 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xrswB1m4NzDqff for ; Tue, 12 Sep 2017 14:56:58 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xrsvb35CdzDqh9 for ; Tue, 12 Sep 2017 14:56:27 +1000 (AEST) Received: from localhost.localdomain (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 3xrsvb16nlz9s8J; Tue, 12 Sep 2017 14:56:27 +1000 (AEST) Received: by localhost.localdomain (Postfix, from userid 1000) id 19802EEA9EA; Tue, 12 Sep 2017 14:56:27 +1000 (AEST) From: Michael Neuling To: stewart@linux.vnet.ibm.com Date: Tue, 12 Sep 2017 14:56:15 +1000 Message-Id: <20170912045619.31386-2-mikey@neuling.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170912045619.31386-1-mikey@neuling.org> References: <20170912045619.31386-1-mikey@neuling.org> Subject: [Skiboot] [PATCH 2/6] phb4: Move nvram read of pci-eeh-mmio init X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: skiboot@lists.ozlabs.org, mikey@neuling.org MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Move nvram read to the PHB4 init code so that's it's only read once, rather than every time we go though PHB reset. Signed-off-by: Michael Neuling --- hw/phb4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/phb4.c b/hw/phb4.c index a40db68d2e..39e1204a8c 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -140,6 +140,7 @@ static void phb4_init_hw(struct phb4 *p, bool first_init); static bool verbose_eeh; static bool pci_tracing; +static bool pci_eeh_mmio; enum capi_dma_tvt { CAPI_DMA_TVT0, @@ -4169,7 +4170,7 @@ static void phb4_init_hw(struct phb4 *p, bool first_init) val |= PHB_CTRLR_IRQ_STORE_EOI; } - if (nvram_query_eq("pci-eeh-mmio", "disabled")) + if (!pci_eeh_mmio) val |= PHB_CTRLR_MMIO_EEH_DISABLE; out_be64(p->regs + PHB_CTRLR, val); @@ -4946,6 +4947,7 @@ void probe_phb4(void) prlog(PR_INFO, "PHB4: Verbose EEH enabled\n"); pci_tracing = nvram_query_eq("pci-tracing", "true"); + pci_eeh_mmio = !nvram_query_eq("pci-eeh-mmio", "disabled"); /* Look for PBCQ XSCOM nodes */ dt_for_each_compatible(dt_root, np, "ibm,power9-pbcq") phb4_probe_pbcq(np);