From patchwork Tue Nov 21 09:32:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 839948 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 ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yh0qy6vmsz9s5L for ; Tue, 21 Nov 2017 20:37:50 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yh0qy63M0zDsTv for ; Tue, 21 Nov 2017 20:37:50 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=benh@kernel.crashing.org; receiver=) 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 3yh0pc2MsMzDrVR for ; Tue, 21 Nov 2017 20:36:40 +1100 (AEDT) Received: from pasglop.au.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id vAL9Wa5K008691; Tue, 21 Nov 2017 03:32:54 -0600 From: Benjamin Herrenschmidt To: skiboot@lists.ozlabs.org Date: Tue, 21 Nov 2017 20:32:30 +1100 Message-Id: <20171121093231.28909-9-benh@kernel.crashing.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171121093231.28909-1-benh@kernel.crashing.org> References: <20171121093231.28909-1-benh@kernel.crashing.org> Subject: [Skiboot] [PATCH v2 09/10] xive: Don't bother cleaning up disabled EQs in reset X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 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" Additionally, warn if we find an enabled one that isn't one of the firmware built-in queues. Signed-off-by: Benjamin Herrenschmidt --- hw/xive.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/xive.c b/hw/xive.c index b48b168e..e6b233c9 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -4494,10 +4494,15 @@ static void xive_reset_one(struct xive *x) * we will incorrectly free the EQs that are reserved * for the physical CPUs */ - eq0 = *eq; - xive_cleanup_eq(&eq0); - xive_eqc_cache_update(x, x->block_id, - idx, 0, 4, &eq0, false, true); + if (eq->w0 & EQ_W0_VALID) { + if (!(eq->w0 & EQ_W0_FIRMWARE)) + xive_dbg(x, "EQ 0x%x:0x%x is valid at reset: %08x %08x\n", + x->block_id, idx, eq->w0, eq->w1); + eq0 = *eq; + xive_cleanup_eq(&eq0); + xive_eqc_cache_update(x, x->block_id, + idx, 0, 4, &eq0, false, true); + } if (eq->w0 & EQ_W0_FIRMWARE) eq_firmware = true; }