From: "hasegawa-hitomi@fujitsu.com" <hasegawa-hitomi@fujitsu.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"soc@kernel.org" <soc@kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"sumit.garg@linaro.org" <sumit.garg@linaro.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"olof@lixom.net" <olof@lixom.net>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"will@kernel.org" <will@kernel.org>,
"jirislaby@kernel.org" <jirislaby@kernel.org>,
"jason.wessel@windriver.com" <jason.wessel@windriver.com>,
"daniel.thompson@linaro.org" <daniel.thompson@linaro.org>,
"dianders@chromium.org" <dianders@chromium.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kgdb-bugreport@lists.sourceforge.net"
<kgdb-bugreport@lists.sourceforge.net>,
"peterz@infradead.org" <peterz@infradead.org>
Subject: Re: [PATCH v3 1/1] soc: fujitsu: Add A64FX diagnostic interrupt driver
Date: Fri, 8 Apr 2022 10:32:15 +0000 [thread overview]
Message-ID: <OSZPR01MB7050ED8D47839EAC9B4FC5BFEBE49@OSZPR01MB7050.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <YkWVTEG5oFO82GPL@kroah.com>
Hi Greg,
> > Enable diagnostic interrupts for the A64FX.
> > This is done using a pseudo-NMI.
>
> I do not understand what this driver is, sorry. Can you please provide more
> information in the changelog text for what this is, who would use it, and how it will
> be interacted with.
I understand. I will add a description in the next version.
> > +config A64FX_DIAG
> > + bool "A64FX diag driver"
> > + depends on ARM64
>
> What about ACPI? Shouldn't this code depend on that?
Okey. I will make it dependent on ACPI.
> > + help
> > + Say Y here if you want to enable diag interrupt on A64FX.
>
> What is A64FX?
A64FX is a processor designed by Fujitsu.
For the sake of clarity, I will describe it as "Fujitsu A64FX".
> > + This driver uses pseudo-NMI if available.
>
> What does this mean?
This driver uses the pseudo-NMI feature to perform diagnostic interrupts
for A64FX. However, I felt that it was superfluous to give this explanation
here, so I will delete this sentence.
> > + If unsure, say N.
>
> No module? Why not?
request_nmi() is not EXPORT_SYMBOL. So this driver cannot be a module.
> > +// SPDX-License-Identifier: GPL-2.0-only
> > +/*
> > + * A64FX diag driver.
>
> No copyright information? Are you sure?
I will add copyright information.
> > +#define BMC_DIAG_INTERRUPT_STATUS_OFFSET (0x0044) #define
> > +BMC_INTERRUPT_STATUS_MASK ((1U) << 31)
>
> BIT()?
>
> > +#define BMC_DIAG_INTERRUPT_ENABLE_OFFSET (0x0040) #define
> > +BMC_INTERRUPT_ENABLE_MASK ((1U) << 31)
>
> BIT()?
Okey, I will use BIT().
> > +static irqreturn_t a64fx_diag_handler(int irq, void *dev_id) {
> > + handle_sysrq('c');
>
>
> Why is this calling this sysrq call? From an interrupt? Why?
>
> And you are hard-coding "c", are you sure?
As mentioned by Arnd, I only called panic () at first, but after receiving
his suggestion, I decided to call handle_sysrq ('c').
This driver only supports the function that causes a panic when receiving
a diagnostic interrupt from the outside, so "c" is coded.
Also, no data is added when a diagnostic interrupt is sent.
> > + if (mmsc & BMC_INTERRUPT_STATUS_MASK)
> > + writel(BMC_INTERRUPT_STATUS_MASK, (void
> *)diag_status_reg_addr);
>
> No need to wait for the write to complete?
>
> You shouldn't have to cast diag_status_reg_addr, right?
Due to the specifications of the machine, there is no problem even
if there is no write wait processing.
I will remove constant and (void *). Thank you for pointing out.
> > + enable_irq(priv->irq);
> > + priv->has_nmi = false;
> > + dev_info(dev, "registered for IRQ %d\n", priv->irq);
> > + } else {
> > + enable_nmi(priv->irq);
> > + priv->has_nmi = true;
> > + dev_info(dev, "registered for NMI %d\n", priv->irq);
>
> When drivers are successful, they are quiet. No need for the noise here.
I will remove the message for a successful NMI/IRQ registration.
Thank you.
Hitomi Hasegawa
prev parent reply other threads:[~2022-04-08 10:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 9:22 [PATCH v3 0/1] " Hitomi Hasegawa
2022-03-31 9:22 ` [PATCH v3 1/1] " Hitomi Hasegawa
[not found] ` <YkWVTEG5oFO82GPL@kroah.com>
2022-03-31 15:44 ` Arnd Bergmann
2022-04-08 13:32 ` Daniel Thompson
2022-04-08 14:17 ` Arnd Bergmann
[not found] ` <YlBE6hZHmLo9/wrU@kroah.com>
2022-04-08 14:49 ` Arnd Bergmann
2022-04-08 15:02 ` Daniel Thompson
2022-04-19 8:36 ` hasegawa-hitomi
2022-04-28 2:15 ` hasegawa-hitomi
2022-04-28 7:04 ` Arnd Bergmann
2022-04-08 10:32 ` hasegawa-hitomi [this message]
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=OSZPR01MB7050ED8D47839EAC9B4FC5BFEBE49@OSZPR01MB7050.jpnprd01.prod.outlook.com \
--to=hasegawa-hitomi@fujitsu.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=daniel.thompson@linaro.org \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jason.wessel@windriver.com \
--cc=jirislaby@kernel.org \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=olof@lixom.net \
--cc=peterz@infradead.org \
--cc=soc@kernel.org \
--cc=sumit.garg@linaro.org \
--cc=will@kernel.org \
/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®