From patchwork Fri May 23 16:48:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 4234241 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 602999F32B for ; Fri, 23 May 2014 16:48:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 77533203A9 for ; Fri, 23 May 2014 16:48:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9636420148 for ; Fri, 23 May 2014 16:48:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752283AbaEWQsb (ORCPT ); Fri, 23 May 2014 12:48:31 -0400 Received: from mail.skyhub.de ([78.46.96.112]:47378 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751605AbaEWQsa (ORCPT ); Fri, 23 May 2014 12:48:30 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1400863709; bh=+cvG1sMeEHE8qD4Myhr7IBNTEFxUuB8oTwuOmYRQW9Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=Xuh7d63cPg0CcUffJt49tE7iKsUh5sEJ7qmdtq J1n7qFQFu/uHSNgq1yJvA6HUqUzUAT7PnjOpEkLbJdrCxCxawLaObZ5/yaQPpm59Huz /Ghh/3Jdl9X123M2KTaGu3NPmB88TqJqOwOAQ1LFwxcgCY80AHlv/RgCzJ1M2nE/+c= Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LIjE0LLUtoMi; Fri, 23 May 2014 18:48:28 +0200 (CEST) Received: from liondog.tnic (p54AF43DC.dip0.t-ipconnect.de [84.175.67.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 4D1CD1DA258; Fri, 23 May 2014 18:48:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1400863708; bh=+cvG1sMeEHE8qD4Myhr7IBNTEFxUuB8oTwuOmYRQW9Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=MAft3BoRVXTnuQtx+2NiEwpolyQdEJIV2+gQkb iqgLzg8JUI+OwJKl5NOhzOVh+JrSgOvKlPMzCiL/OljfWzsDAVXjcNby7hNQSFcPqSV 3wLZC9hR9z082kdU+e6KP9oHSyhPuNkE6NBa79T1LjLak0WgeSdeXZruVMkp3agm9Y= Received: by liondog.tnic (Postfix, from userid 1000) id AC6071004B4; Fri, 23 May 2014 18:48:24 +0200 (CEST) Date: Fri, 23 May 2014 18:48:24 +0200 From: Borislav Petkov To: Tomasz Nowicki Cc: rjw@rjwysocki.net, lenb@kernel.org, tony.luck@intel.com, bp@suse.de, m.chehab@samsung.com, linux-edac@vger.kernel.org, x86@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org Subject: Re: [PATCH 4/7] acpi, apei, ghes: Factor out NMI error notification context. Message-ID: <20140523164824.GG21332@pd.tnic> References: <1397056476-9183-1-git-send-email-tomasz.nowicki@linaro.org> <1397056476-9183-5-git-send-email-tomasz.nowicki@linaro.org> <20140513194125.GD8760@pd.tnic> <537F39D7.6090309@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <537F39D7.6090309@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, May 23, 2014 at 02:06:47PM +0200, Tomasz Nowicki wrote: > I had that thoughts too. Looking at simple MCE calls, yes, it does > make sense to create corresponding arch-specific version and provide > logic as needed. I think that NMI is much more complicated.... How about this ontop of your patches. It builds here but it is not trivial for me to try it on !X86. Maybe you can test it quicker than me finding some other arch box first... :) Thanks. Index: b/arch/x86/include/asm/nmi.h =================================================================== --- a/arch/x86/include/asm/nmi.h 2014-05-23 17:17:08.192266007 +0200 +++ b/arch/x86/include/asm/nmi.h 2014-05-23 18:45:06.636178772 +0200 @@ -57,7 +57,7 @@ struct nmiaction { int __register_nmi_handler(unsigned int, struct nmiaction *); -void unregister_nmi_handler(unsigned int, const char *); +void unregister_nmi_handler(unsigned int type, const char *name); void stop_nmi(void); void restart_nmi(void); Index: b/drivers/acpi/apei/ghes.c =================================================================== --- a/drivers/acpi/apei/ghes.c 2014-05-23 17:17:27.680265685 +0200 +++ b/drivers/acpi/apei/ghes.c 2014-05-23 17:46:32.968236841 +0200 @@ -47,15 +47,13 @@ #include #include #include +#include #include #ifdef CONFIG_X86_MCE #include #endif #include -#ifdef CONFIG_ACPI_APEI_NMI -#include -#endif #include "apei-internal.h" Index: b/include/linux/nmi.h =================================================================== --- a/include/linux/nmi.h 2014-05-23 17:42:55.928240428 +0200 +++ b/include/linux/nmi.h 2014-05-23 18:44:41.244179192 +0200 @@ -53,4 +53,11 @@ extern int proc_dowatchdog(struct ctl_ta void __user *, size_t *, loff_t *); #endif +#ifdef CONFIG_ACPI_APEI_NMI +#include +#else +#define register_nmi_handler(t, fn, fg, n, init...) do { } while(0) +void unregister_nmi_handler(unsigned int type, const char *name) {} +#endif /* CONFIG_ACPI_APEI_NMI */ + #endif