[Skiboot] [PATCH 03/12] psi: Add P9 support

Stewart Smith stewart at linux.vnet.ibm.com
Fri Jul 22 16:59:47 AEST 2016


Michael Neuling <mikey at neuling.org> writes:
> From: Benjamin Herrenschmidt <benh at kernel.crashing.org>
>
> This reworks interrupt handling a bit and adds support for XIVE
> based interrupts and the new sources available on POWER9.
>
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> Signed-off-by: Michael Neuling <mikey at neuling.org>

fails to boot on dual socked P8 fsp machine with:

[34418453602,7] IRQ: Registering 0010..0015 ops @0x3008d038 (data 0x30362880)
[34418473994,5] PSI[0x000]: Found PSI bridge [working=1, active=1]
[34418481962,5] PSI[0x001]: Working chip not found
[34418491714,7] IRQ: Registering 0010..0015 ops @0x3008d038 (data 0x30362c80)
[34418495585,3] register IRQ source overlap !
[34418497576,3]   new: 10..15 old: 10..15
[34418500081,0] Assert fail: core/interrupts.c:51:0
[34418504866,0] Aborting!
CPU 0870 Backtrace:
 S: 0000000033dc3a10 R: 0000000030013634   .backtrace+0x24
 S: 0000000033dc3a90 R: 000000003001871c   ._abort+0x4c
 S: 0000000033dc3b10 R: 0000000030018798   .assert_fail+0x34
 S: 0000000033dc3b90 R: 0000000030019ce0   .__register_irq_source+0xe8
 S: 0000000033dc3c20 R: 0000000030031e10   .psi_init+0x470
 S: 0000000033dc3e30 R: 00000000300143e4   .main_cpu_entry+0x43c
 S: 0000000033dc3f00 R: 000000003000259c   boot_entry+0x19c

the reason being, psi->chip being used before initialized.

The following fix should likely come in v2 of this patch :)

Not convinced there isn't another bug somewhere in this series... I had
a whole bunch of soft lockups on whatever kernel randomly booted by
default on the machine I was testing on.


diff --git a/hw/psi.c b/hw/psi.c
index 8c3a3d675fa8..0bd6191dfec8 100644
--- a/hw/psi.c
+++ b/hw/psi.c
@@ -942,7 +942,7 @@ static struct psi *psi_probe_p7(struct proc_chip *chip, u64 base)
 	} else
 		printf("PSI[0x%03x]: Working link not found\n", chip->id);
 
-	psi->interrupt = get_psi_interrupt(psi->chip_id);
+	psi->interrupt = get_psi_interrupt(chip->id);
 
 	return psi;
 }
@@ -967,7 +967,7 @@ static struct psi *psi_probe_p8(struct proc_chip *chip, u64 base)
 	} else
 		printf("PSI[0x%03x]: Working chip not found\n", chip->id);
 
-	psi->interrupt = get_psi_interrupt(psi->chip_id);
+	psi->interrupt = get_psi_interrupt(chip->id);
 
 	return psi;
 }
@@ -996,7 +996,7 @@ static struct psi *psi_probe_p9(struct proc_chip *chip, u64 base)
 	psi->working = true;
 	psi->regs = (void *)(val & ~PSIHB_XSCOM_P9_HBBAR_EN);
 
-	printf("PSI[0x%03x]: PSI MMIO at @%p\n", psi->chip_id, psi->regs);
+	printf("PSI[0x%03x]: PSI MMIO at @%p\n", chip->id, psi->regs);
 
 	psi->interrupt = xive_alloc_hw_irqs(psi->chip_id, P9_PSI_NUM_IRQS, 16);
 	return psi;


-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list