From patchwork Fri Sep 16 04:52:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 670679 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sb5xQ5SlQz9rxl for ; Fri, 16 Sep 2016 17:09:14 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3sb5xQ4fkXzDsfD for ; Fri, 16 Sep 2016 17:09:14 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sb2zp6htJzDsZM for ; Fri, 16 Sep 2016 14:56:06 +1000 (AEST) Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id u8G4qMSk028383; Thu, 15 Sep 2016 23:52:32 -0500 From: Benjamin Herrenschmidt To: skiboot@lists.ozlabs.org Date: Fri, 16 Sep 2016 14:52:11 +1000 Message-Id: <1474001535-16780-7-git-send-email-benh@kernel.crashing.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474001535-16780-1-git-send-email-benh@kernel.crashing.org> References: <1474001535-16780-1-git-send-email-benh@kernel.crashing.org> Subject: [Skiboot] [PATCH 07/11] xive: Don't try to EOI a masked source X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" It will just generate spurious powerbus traffic and ESB state changes. Signed-off-by: Benjamin Herrenschmidt --- hw/xive.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/xive.c b/hw/xive.c index 33c8fe2..69b5738 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -1563,9 +1563,21 @@ static void xive_source_eoi(struct irq_source *is, uint32_t isn) { struct xive_src *s = container_of(is, struct xive_src, is); uint32_t idx = isn - s->esb_base; + struct xive_ive *ive; void *mmio_base; uint64_t eoi_val; + /* Grab the IVE */ + ive = s->xive->ivt_base; + if (!ive) + return; + ive += GIRQ_TO_IDX(isn); + + /* If it's invalid or masked, don't do anything */ + if ((ive->w & IVE_MASKED) || !(ive->w & IVE_VALID)) + return; + + /* Grab MMIO control address for that ESB */ mmio_base = s->esb_mmio + (1ull << s->esb_shift) * idx; /* If the XIVE supports the new "store EOI facility, use it */