From 4e32dae2d1edb8d5e955de3c5368a9930f28e52b Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Tue, 5 May 2015 12:37:06 +0930 Subject: occ: Send self-interrupt to chip with active PSI We were previously asking the OCC of the current chip to generate the self interrupt. If Hostboot does not configure all the PSI Host Bridges, so if the current chip happens to have an unconfigured PSI HB, the chip will never see the interrupt. Instead grab a chip id from the list of configured PSIs, and ask the OCC on that chip to generate the self-interrupt. This adds a pointer to the chip's PSI in struct proc_chip so we can use the current chip's PSI if it is active without having to look through all of them. Signed-off-by: Joel Stanley Signed-off-by: Stewart Smith --- hw/psi.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hw/psi.c') diff --git a/hw/psi.c b/hw/psi.c index c0692a1..0a013b5 100644 --- a/hw/psi.c +++ b/hw/psi.c @@ -885,6 +885,8 @@ static bool psi_init_psihb(struct dt_node *psihb) psi->chip_id = chip->id; psi->interrupt = get_psi_interrupt(chip->id); + chip->psi = psi; + psi_create_mm_dtnode(psi); psi_register_interrupts(psi); psi_activate_phb(psi); @@ -905,6 +907,11 @@ void psi_fsp_link_in_use(struct psi *psi __unused) } } +struct psi *psi_find_functional_chip(void) +{ + return list_top(&psis, struct psi, list); +} + void psi_init(void) { struct dt_node *np; -- cgit v1.1