From: Thomas Gleixner <tglx@linutronix.de>
To: Caleb James DeLisle <cjd@cjdns.fr>, linux-mips@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
benjamin.larsson@genexis.eu
Subject: Re: [PATCH v1 3/8] irqchip: Add EcoNet EN751221 INTC
Date: Sat, 22 Mar 2025 09:20:50 +0100 [thread overview]
Message-ID: <87bjtt1nod.ffs@tglx> (raw)
In-Reply-To: <ce72abfe-e822-48d6-9fc7-3cf9faffdc76@cjdns.fr>
On Fri, Mar 21 2025 at 23:20, Caleb James DeLisle wrote:
> On 21/03/2025 21:26, Thomas Gleixner wrote:
>> Caleb!
>>
>> On Fri, Mar 21 2025 at 13:46, Caleb James DeLisle wrote:
>>> ---
>>> If CPU_MIPSR2_IRQ_EI / CPU_MIPSR2_IRQ_VI are enabled in the build, this
>>> device switches to sending all interrupts as vectored - which IRQ_MIPS_CPU
>>> is not prepared to handle. If anybody knows how to either disable this
>>> behavior, or handle vectored interrupts without ugly code that breaks
>>> cascading, please let me know and I will implement that and add
>>> MIPS_MT_SMP in a future patchset.
>> This must be addressed before this driver can be merged, but that's a
>> topic for the MIPS wizards and out of my area of expertise, except for
>> the obvious:
>>
>> For a start you can exclude this platform from being enabled in
>> Kconfig when the EI/VI muck is enabled. That's what 'depends on' is
>> for,
>
> Maybe my message was misleading everything has been tested and works correctly
> on multiple SoCs because ECONET_SOC_EN751221 does not select EI/VI. Answering
> this question will allow me to enable them, thus also getting
> MIPS_MT_SMP.
It does not select it, but it can be enabled independently or through
some other magic config knob, right? And if it gets enabled, then it
does not work, right?
> I could look at forbidding them in the driver, but I'm not sure that's
> appropriate as this seems like more of an SoC issue than an INTC
> issue. But I'll follow your guidance.
What's not appropriate? If it does not work, then it's very appropriate
to do
config ECONET
depends on !EI && !VI
on the principle of least surprise, no?
>> So this patch clearly should have been tagged with 'RFC'.
>
> Given the patchset works correctly in testing, does this comment
> stand?
Until the EI/VI issue is resolved so that it either works or cannot
happen.
>>> +static int econet_intc_map(struct irq_domain *d, u32 irq, irq_hw_number_t hwirq)
>>> +{
>>> + int ret;
>>> +
>>> + if (hwirq >= INTC_IRQ_COUNT) {
>>> + pr_err("%s: hwirq %lu out of range\n", __func__, hwirq);
>>> + return -EINVAL;
>>> + } else if (econet_intc_rai.shadow_interrupts[hwirq] == INTC_IS_SHADOW) {
>>> + pr_err("%s: can't map hwirq %lu, it is a shadow interrupt\n",
>>> + __func__, hwirq);
>> No newline
> If I understand correctly, you prefer:
> .....interrupt\n", __func__, hwirq);
> for a 96 char line?
You have 100 characters in drivers/irqchip/
>>> + .domain_ops = {
>>> + .xlate = irq_domain_xlate_onecell,
>>> + .map = econet_intc_map,
>> See documention.
> I suppose this is tab alignment, but I will in any case make a point
> of reading it all carefully.
Yes. The aligned tabular view is way simpler to read and parse. Reading
is based on pattern recognition. Irregular patterns disturb the reading
flow, which means the focus is shifted from understanding to decoding
the irregular pattern.
> In case of any doubt, I wasn't trying to sneak bad code past you.
I did not assume malice here at all.
Thanks,
tglx
next prev parent reply other threads:[~2025-03-22 8:20 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 13:46 [PATCH v1 0/8] Add EcoNet EN751221 MIPS platform support Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 1/8] dt-bindings: vendor-prefixes: Add EcoNet Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 2/8] dt-bindings: interrupt-controller: Add EcoNet EN751221 INTC Caleb James DeLisle
2025-03-21 15:52 ` Rob Herring (Arm)
2025-03-21 17:19 ` Caleb James DeLisle
2025-03-21 21:17 ` Rob Herring
2025-03-21 23:55 ` Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 3/8] irqchip: " Caleb James DeLisle
2025-03-21 20:26 ` Thomas Gleixner
2025-03-21 22:20 ` Caleb James DeLisle
2025-03-22 8:20 ` Thomas Gleixner [this message]
2025-03-23 3:06 ` Caleb James DeLisle
2025-03-23 17:56 ` Thomas Gleixner
2025-03-21 13:46 ` [PATCH v1 4/8] dt-bindings: timer: Add EcoNet HPT CPU Timer Caleb James DeLisle
2025-03-21 20:56 ` Krzysztof Kozlowski
2025-03-21 23:21 ` Caleb James DeLisle
2025-03-23 12:39 ` Krzysztof Kozlowski
2025-03-23 23:53 ` Caleb James DeLisle
2025-03-24 7:13 ` Krzysztof Kozlowski
2025-03-24 12:25 ` Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 5/8] clocksource/drivers: Add EcoNet Timer HPT driver Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 6/8] dt-bindings: mips: Add EcoNet platform binding Caleb James DeLisle
2025-03-21 20:57 ` Krzysztof Kozlowski
2025-03-21 13:46 ` [PATCH v1 7/8] mips: Add EcoNet MIPS platform support Caleb James DeLisle
2025-03-21 21:00 ` Krzysztof Kozlowski
2025-03-21 23:43 ` Caleb James DeLisle
2025-03-21 13:46 ` [PATCH v1 8/8] MAINTAINERS: Add EcoNet MIPS platform entry Caleb James DeLisle
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=87bjtt1nod.ffs@tglx \
--to=tglx@linutronix.de \
--cc=benjamin.larsson@genexis.eu \
--cc=cjd@cjdns.fr \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tsbogend@alpha.franken.de \
/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;
as well as URLs for NNTP newsgroup(s).