From patchwork Wed May 15 03:34:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gavin Shan X-Patchwork-Id: 243894 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 60C772C0252 for ; Wed, 15 May 2013 13:51:42 +1000 (EST) Received: from e8.ny.us.ibm.com (e8.ny.us.ibm.com [32.97.182.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e8.ny.us.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 6DFB62C011E for ; Wed, 15 May 2013 13:35:25 +1000 (EST) Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 14 May 2013 23:35:22 -0400 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e8.ny.us.ibm.com (192.168.1.108) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 14 May 2013 23:35:21 -0400 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 84F716E8048 for ; Tue, 14 May 2013 23:35:17 -0400 (EDT) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r4F3ZKNn306848 for ; Tue, 14 May 2013 23:35:20 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r4F3ZJcl007038 for ; Wed, 15 May 2013 00:35:20 -0300 Received: from shangw (shangw.cn.ibm.com [9.111.29.238]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r4F3Z5Za006241; Wed, 15 May 2013 00:35:18 -0300 Received: by shangw (Postfix, from userid 1000) id 59CB1302217; Wed, 15 May 2013 11:35:17 +0800 (CST) From: Gavin Shan To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 22/22] powerpc/eeh: Connect EEH error interrupt handle Date: Wed, 15 May 2013 11:34:58 +0800 Message-Id: <1368588898-16224-23-git-send-email-shangw@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1368588898-16224-1-git-send-email-shangw@linux.vnet.ibm.com> References: <1368588898-16224-1-git-send-email-shangw@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13051503-9360-0000-0000-0000122C63EB Cc: Gavin Shan X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The EEH error interrupts should have been exported by firmware through device tree. The OS already installed the interrupt handler (opal_interrupt()) for them. The patch checks if we have any existing EEH errors and wakes the kernel thread up to process that if possible. Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/opal.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index ade4463..75acc6d 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include "powernv.h" @@ -282,6 +284,10 @@ static irqreturn_t opal_interrupt(int irq, void *data) uint64_t events; opal_handle_interrupt(virq_to_hw(irq), &events); +#ifdef CONFIG_EEH + if (events & OPAL_EVENT_PCI_ERROR) + pci_err_event(); +#endif /* XXX TODO: Do something with the events */