From: gengdongjiu <gengdongjiu@huawei.com>
To: Borislav Petkov <bp@suse.de>
Cc: <tbaicar@codeaurora.org>, <james.morse@arm.com>,
<will.deacon@arm.com>, <rjw@rjwysocki.net>, <lenb@kernel.org>,
<robert.moore@intel.com>, <lv.zheng@intel.com>,
<mark.rutland@arm.com>, <kristina.martsenko@arm.com>,
<mingo@kernel.org>, <punit.agrawal@arm.com>,
<stephen.boyd@linaro.org>, <kamensky@cisco.com>,
<prarit@redhat.com>, <shiju.jose@huawei.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-acpi@vger.kernel.org>,
<devel@acpica.org>, Wuquanming <wuquanming@huawei.com>,
Huangshaoyu <huangshaoyu@huawei.com>
Subject: Re: [PATCH v5 1/2] acpi: apei: remove the unused dead-code for SEA/NMI notification type
Date: Wed, 18 Oct 2017 11:04:28 +0800 [thread overview]
Message-ID: <642709ec-05d0-2ffd-0e2e-bcdd6b12281b@huawei.com> (raw)
In-Reply-To: <20171017164336.cedso3f35lpeam7f@pd.tnic>
Hi,Borislav
On 2017/10/18 0:43, Borislav Petkov wrote:
>> -}
>> -
> So GHES NMI notification method is x86-only AFAIK and HAVE_ACPI_APEI_NMI
> is selected only on x86. Why are you removing those guards? Does ARM
> have ACPI_HEST_NOTIFY_NMI notification type now too?
ARM does not have ACPI_HEST_NOTIFY_NMI notification, which should only used by x86.
In the code, I see those guards are never used. As you see, if the 'CONFIG_HAVE_ACPI_APEI_NMI'
does not defined in [1], it will print error info and goto [2], in the [2], it will return error,
then the probe for GHES NMI is failed. so those guards( ghes_nmi_add() and ghes_nmi_remove()) have no chance
to execute. so I redefine them to NULL for compiling[3].
static int ghes_probe(struct platform_device *ghes_dev)
{
struct acpi_hest_generic *generic;
struct ghes *ghes = NULL;
int rc = -EINVAL;
switch (generic->notify.type) {
...................
case ACPI_HEST_NOTIFY_NMI: [1]
if (!IS_ENABLED(CONFIG_HAVE_ACPI_APEI_NMI)) {
pr_warn(GHES_PFX "Generic hardware error source: %d notified via NMI interrupt is not supported!\n",
generic->header.source_id);
goto err;
}
..............
}
switch (generic->notify.type) {
...............
case ACPI_HEST_NOTIFY_NMI:
ghes_nmi_add(ghes);
break;
}
..........
err: [2]
if (ghes) {
ghes_fini(ghes);
kfree(ghes);
}
return rc;
}
[3]:
-static inline void ghes_nmi_add(struct ghes *ghes)
-{
- pr_err(GHES_PFX "ID: %d, trying to add NMI notification which is not supported!\n",
- ghes->generic->header.source_id);
- BUG();
-}
-
-static inline void ghes_nmi_remove(struct ghes *ghes)
-{
- pr_err(GHES_PFX "ID: %d, trying to remove NMI notification which is not supported!\n",
- ghes->generic->header.source_id);
- BUG();
-}
-
-static inline void ghes_nmi_init_cxt(void)
-{
-}
+static inline void ghes_nmi_add(struct ghes *ghes) { }
+static inline void ghes_nmi_remove(struct ghes *ghes) { }
+static inline void ghes_nmi_init_cxt(void) { }
next prev parent reply other threads:[~2017-10-18 3:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 8:02 Dongjiu Geng
2017-10-17 8:02 ` [PATCH v5 2/2] acpi: apei: Add SEI notification type support for ARMv8 Dongjiu Geng
2017-10-17 17:06 ` Borislav Petkov
2017-10-18 5:00 ` gengdongjiu
2017-10-18 9:06 ` Borislav Petkov
2017-10-18 9:17 ` gengdongjiu
2017-10-18 9:25 ` Borislav Petkov
2017-10-18 9:44 ` James Morse
2017-10-18 10:04 ` Borislav Petkov
2017-10-18 10:25 ` gengdongjiu
2017-10-18 10:21 ` gengdongjiu
2017-10-18 10:26 ` James Morse
2017-10-18 11:39 ` gengdongjiu
2017-10-17 14:06 ` [PATCH v5 1/2] acpi: apei: remove the unused dead-code for SEA/NMI notification type Tyler Baicar
2017-10-17 16:43 ` Borislav Petkov
2017-10-18 3:04 ` gengdongjiu [this message]
2017-10-18 10:17 ` Borislav Petkov
2017-10-18 12:27 ` gengdongjiu
2017-10-18 13:14 ` Borislav Petkov
2017-10-18 15:14 gengdongjiu
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=642709ec-05d0-2ffd-0e2e-bcdd6b12281b@huawei.com \
--to=gengdongjiu@huawei.com \
--cc=bp@suse.de \
--cc=devel@acpica.org \
--cc=huangshaoyu@huawei.com \
--cc=james.morse@arm.com \
--cc=kamensky@cisco.com \
--cc=kristina.martsenko@arm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=prarit@redhat.com \
--cc=punit.agrawal@arm.com \
--cc=rjw@rjwysocki.net \
--cc=robert.moore@intel.com \
--cc=shiju.jose@huawei.com \
--cc=stephen.boyd@linaro.org \
--cc=tbaicar@codeaurora.org \
--cc=will.deacon@arm.com \
--cc=wuquanming@huawei.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
all inboxes | Powered by JetHome®