[Skiboot] [PATCH 07/15] psi: Remove psi->working

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Aug 9 16:38:11 AEST 2016


I was only ever set to true

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 hw/fsp/fsp.c  |  2 --
 hw/psi.c      | 14 +-------------
 include/psi.h |  1 -
 3 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index 26cad63..58219a0 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -1897,8 +1897,6 @@ static void fsp_update_links_states(struct fsp *fsp)
 	for (i = 0; i < fsp->iopath_count; i++) {
 		fiop = &fsp->iopath[i];
 		if (!fiop->psi)
-			continue;
-		if (!fiop->psi->working)
 			fiop->state = fsp_path_bad;
 		else if (fiop->psi->active) {
 			fsp->active_iopath = i;
diff --git a/hw/psi.c b/hw/psi.c
index 663b604..9f70c35 100644
--- a/hw/psi.c
+++ b/hw/psi.c
@@ -179,7 +179,7 @@ static void psi_link_poll(void *data __unused)
 		list_for_each(&psis, psi, list) {
 			u64 val;
 
-			if (psi->active || !psi->working)
+			if (psi->active)
 				continue;
 
 			val = in_be64(psi->regs + PSIHB_CR);
@@ -220,9 +220,6 @@ static void psi_link_poll(void *data __unused)
 
 void psi_enable_fsp_interrupt(struct psi *psi)
 {
-	if (!psi->working)
-		return;
-
 	/* Enable FSP interrupts in the GXHB */
 	lock(&psi_lock);
 	out_be64(psi->regs + PSIHB_CR,
@@ -350,9 +347,6 @@ static int64_t psi_p7_set_xive(struct irq_source *is, uint32_t isn __unused,
 	struct psi *psi = is->data;
 	uint64_t xivr;
 
-	if (!psi->working)
-		return OPAL_HARDWARE;
-
 	/* Populate the XIVR */
 	xivr  = (uint64_t)server << 40;
 	xivr |= (uint64_t)priority << 32;
@@ -369,9 +363,6 @@ static int64_t psi_p7_get_xive(struct irq_source *is, uint32_t isn __unused,
 	struct psi *psi = is->data;
 	uint64_t xivr;
 
-	if (!psi->working)
-		return OPAL_HARDWARE;
-
 	/* Read & decode the XIVR */
 	xivr = in_be64(psi->regs + PSIHB_XIVR);
 
@@ -917,7 +908,6 @@ static struct psi *psi_probe_p7(struct proc_chip *chip, u64 base)
 		psi = alloc_psi(base);
 		if (!psi)
 			return NULL;
-		psi->working = true;
 		rc = val >> 36;	/* Bits 0:1 = 0x00; 2:27 Bridge BAR... */
 		rc <<= 20;	/* ... corresponds to bits 18:43 of base addr */
 		psi->regs = (void *)rc;
@@ -944,7 +934,6 @@ static struct psi *psi_probe_p8(struct proc_chip *chip, u64 base)
 		psi = alloc_psi(base);
 		if (!psi)
 			return NULL;
-		psi->working = true;
 		psi->regs = (void *)(val & ~PSIHB_XSCOM_P8_HBBAR_EN);
 	} else
 		printf("PSI[0x%03x]: Working chip not found\n", chip->id);
@@ -975,7 +964,6 @@ static struct psi *psi_probe_p9(struct proc_chip *chip, u64 base)
 	psi = alloc_psi(base);
 	if (!psi)
 		return NULL;
-	psi->working = true;
 	psi->regs = (void *)(val & ~PSIHB_XSCOM_P9_HBBAR_EN);
 
 	psi->interrupt = xive_alloc_hw_irqs(psi->chip_id, P9_PSI_NUM_IRQS, 16);
diff --git a/include/psi.h b/include/psi.h
index 68e076c..24d4206 100644
--- a/include/psi.h
+++ b/include/psi.h
@@ -244,7 +244,6 @@ struct psi {
 	void			*esb_mmio;
 	unsigned int		chip_id;
 	unsigned int		interrupt;
-	bool			working;
 	bool			active;
 };
 
-- 
2.7.4



More information about the Skiboot mailing list