From: Sean Anderson <sean.anderson@seco.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Lee Jones <lee.jones@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Marc Zyngier <maz@kernel.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Arnd Bergmann <arnd@arndb.de>, "Z.Q. Hou" <zhiqiang.hou@nxp.com>,
Biwen Li <biwen.li@nxp.com>
Subject: Re: [PATCH v4] irqchip/ls-extirq: fix invalid wait context by avoiding to use regmap
Date: Thu, 28 Jul 2022 12:31:50 -0400 [thread overview]
Message-ID: <97f030ca-fb8c-3ff1-0b8b-12571cf11249@seco.com> (raw)
In-Reply-To: <20220728161948.gzc7kekygrfdumq6@skbuf>
On 7/28/22 12:19 PM, Vladimir Oltean wrote:
> On Thu, Jul 28, 2022 at 11:43:40AM -0400, Sean Anderson wrote:
>> > All of this should be rewritten to use of_device_is_big_endian(), and
>> > reduce the whole thing to two cases (I don't think native endian makes
>> > much sense anyway). I also wonder what the result is if none of these
>> > properties is present...
>>
>> I think regmap_get_val_endian would be better here.
>
> It needs a struct device.
>
>> >> +
>> >> + priv->regmap = regmap_init_mmio(NULL, base, &extirq_regmap_config);
>>
>> It could also be done automatically if we pass the syscon dev instead of
>> NULL. The only downside is that some regmap error messages will use the
>> syscon device
>
> How do you get the struct device of the syscon?
Oh, interesting, we don't have a device in this driver.
>> > Finally, what is the actual benefit of using a regmap here? It seems
>> > like a very roundabout way of performing a RMW on a register whilst
>> > holding a lock... Passing NULL for a device to regmap_init_mmio() also
>> > seems to be an extremely rare idiom (only 5 cases in the tree), and
>> > this doesn't seem completely right to me.
>>
>> The benefit is that you don't have to write (yet another) set of
>> endian-converting read/write functions. The above (non-NULL) usage of
>> regmap_init would also address your criticism here.
>
> I don't have a particular attraction towards using regmap for a single
> register either, to be honest.
>
Yeah I suppose it's not a terrible burden here.
--Sean
next prev parent reply other threads:[~2022-07-28 16:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 14:42 Vladimir Oltean
2022-07-28 15:25 ` Sean Anderson
2022-07-28 15:28 ` Vladimir Oltean
2022-07-28 15:43 ` Sean Anderson
2022-07-28 16:19 ` Vladimir Oltean
2022-07-28 16:31 ` Sean Anderson [this message]
2022-07-28 17:32 ` Marc Zyngier
2022-08-18 14:13 ` Vladimir Oltean
2022-10-03 9:45 ` Vladimir Oltean
2022-10-03 15:28 ` Marc Zyngier
2022-10-04 7:52 ` Rasmus Villemoes
2022-10-03 15:35 ` [irqchip: irq/irqchip-fixes] irqchip/ls-extirq: Fix " irqchip-bot for Vladimir Oltean
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=97f030ca-fb8c-3ff1-0b8b-12571cf11249@seco.com \
--to=sean.anderson@seco.com \
--cc=arnd@arndb.de \
--cc=biwen.li@nxp.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
--cc=vladimir.oltean@nxp.com \
--cc=zhiqiang.hou@nxp.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®