Skip to content

Commit

Permalink
phb4: Move nvram read of pci-eeh-mmio init
Browse files Browse the repository at this point in the history
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 <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
mikey authored and stewartsmith committed Sep 13, 2017
1 parent 2ba68c4 commit 906d25d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hw/phb4.c
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 906d25d

Please sign in to comment.