From patchwork Mon Jan 7 15:38:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 209975 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id ABC2F2C0090 for ; Tue, 8 Jan 2013 03:31:38 +1100 (EST) Received: from localhost ([::1]:52723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsEo4-0005fm-84 for incoming@patchwork.ozlabs.org; Mon, 07 Jan 2013 10:40:08 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsEnI-0004mf-9G for qemu-devel@nongnu.org; Mon, 07 Jan 2013 10:39:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsEnE-000799-Ry for qemu-devel@nongnu.org; Mon, 07 Jan 2013 10:39:20 -0500 Received: from cantor2.suse.de ([195.135.220.15]:39902 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsEnE-00078l-Ki; Mon, 07 Jan 2013 10:39:16 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 23EBAA51CB; Mon, 7 Jan 2013 16:39:16 +0100 (CET) From: Alexander Graf To: qemu-devel@nongnu.org Date: Mon, 7 Jan 2013 16:38:46 +0100 Message-Id: <1357573140-8877-18-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1357573140-8877-1-git-send-email-agraf@suse.de> References: <1357573140-8877-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Blue Swirl , Scott Wood , qemu-ppc@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PATCH 17/31] openpic/fsl: critical interrupts ignore mask before v4.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Scott Wood Signed-off-by: Scott Wood [agraf: make bool :1] Signed-off-by: Alexander Graf --- hw/openpic.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/openpic.c b/hw/openpic.c index 824b8fd..ac5027a 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -193,6 +193,7 @@ typedef struct IRQSource { int last_cpu; int output; /* IRQ level, e.g. OPENPIC_OUTPUT_INT */ int pending; /* TRUE if IRQ is pending */ + bool nomask:1; /* critical interrupts ignore mask on some FSL MPICs */ } IRQSource; #define IVPR_MASK_SHIFT 31 @@ -389,7 +390,7 @@ static void openpic_update_irq(OpenPICState *opp, int n_IRQ) DPRINTF("%s: IRQ %d is not pending\n", __func__, n_IRQ); return; } - if (src->ivpr & IVPR_MASK_MASK) { + if ((src->ivpr & IVPR_MASK_MASK) && !src->nomask) { /* Interrupt source is disabled */ DPRINTF("%s: IRQ %d is disabled\n", __func__, n_IRQ); return; @@ -529,6 +530,7 @@ static inline void write_IRQreg_idr(OpenPICState *opp, int n_IRQ, uint32_t val) } src->output = OPENPIC_OUTPUT_CINT; + src->nomask = true; src->destmask = 0; for (i = 0; i < opp->nb_cpus; i++) { @@ -540,6 +542,7 @@ static inline void write_IRQreg_idr(OpenPICState *opp, int n_IRQ, uint32_t val) } } else { src->output = OPENPIC_OUTPUT_INT; + src->nomask = false; src->destmask = src->idr & normal_mask; } } else {