public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: linux-edac <linux-edac@vger.kernel.org>
Cc: Tony Luck <tony.luck@intel.com>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Toshimitsu Kani <toshi.kani@hpe.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/3] ACPI/GHES: Add an EDAC notifier chain
Date: Wed, 26 Jul 2017 10:48:26 +0200	[thread overview]
Message-ID: <20170726084827.11447-3-bp@alien8.de> (raw)
In-Reply-To: <20170726084827.11447-1-bp@alien8.de>

From: Borislav Petkov <bp@suse.de>

... so that GHES can dump memory errors into it and consumers like
ghes_edac can register.

Signed-off-by: Borislav Petkov <bp@suse.de>
---
 drivers/acpi/apei/ghes.c | 14 ++++++++++++++
 include/acpi/ghes.h      |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index d661d452b238..3f05f5ff3461 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -140,6 +140,20 @@ static atomic_t ghes_estatus_cache_alloced;
 
 static int ghes_panic_timeout __read_mostly = 30;
 
+static ATOMIC_NOTIFIER_HEAD(ghes_edac_chain);
+
+void ghes_register_edac_chain(struct notifier_block *nb)
+{
+	atomic_notifier_chain_register(&ghes_edac_chain, nb);
+}
+EXPORT_SYMBOL_GPL(ghes_register_edac_chain);
+
+void ghes_unregister_edac_chain(struct notifier_block *nb)
+{
+	atomic_notifier_chain_unregister(&ghes_edac_chain, nb);
+}
+EXPORT_SYMBOL_GPL(ghes_unregister_edac_chain);
+
 static int ghes_ioremap_init(void)
 {
 	ghes_ioremap_area = __get_vm_area(PAGE_SIZE * GHES_IOREMAP_PAGES,
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
index 9f26e01186ae..506b6a197738 100644
--- a/include/acpi/ghes.h
+++ b/include/acpi/ghes.h
@@ -76,6 +76,8 @@ static inline void ghes_edac_unregister(struct ghes *ghes)
 {
 }
 #endif
+void ghes_register_edac_chain(struct notifier_block *nb);
+void ghes_unregister_edac_chain(struct notifier_block *nb);
 
 static inline int acpi_hest_get_version(struct acpi_hest_generic_data *gdata)
 {
-- 
2.14.0.rc0

  parent reply	other threads:[~2017-07-26  8:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26  8:48 [PATCH 0/3] EDAC: Convert ghes_edac to a normal module Borislav Petkov
2017-07-26  8:48 ` [PATCH 1/3] EDAC: Add edac_pr_err/info macros Borislav Petkov
2017-07-26  8:48 ` Borislav Petkov [this message]
2017-07-26  8:48 ` [PATCH 3/3] EDAC, ghes: Make it a proper module Borislav Petkov
2017-07-26 10:24   ` Mauro Carvalho Chehab
2017-07-26 10:37     ` Borislav Petkov
2017-07-26 10:51       ` Mauro Carvalho Chehab
2017-07-26 17:27         ` Luck, Tony
2017-07-26 18:17           ` Mauro Carvalho Chehab
2017-07-26 19:24             ` Kani, Toshimitsu
2017-07-27  5:20               ` Borislav Petkov
2017-07-26 19:49     ` Kani, Toshimitsu
2017-07-28 18:50   ` Kani, Toshimitsu
2017-07-29  6:47     ` Borislav Petkov
2017-07-31 20:19       ` Kani, Toshimitsu
2017-08-01  9:46         ` Borislav Petkov
2017-08-02  0:19           ` Kani, Toshimitsu
2017-08-02  3:18             ` Borislav Petkov
2017-08-02 22:41               ` Kani, Toshimitsu
2017-07-27  5:54 ` [PATCH 0/3] EDAC: Convert ghes_edac to a normal module Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170726084827.11447-3-bp@alien8.de \
    --to=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=tony.luck@intel.com \
    --cc=toshi.kani@hpe.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox