From: Thomas Gleixner <tglx@linutronix.de>
To: Stefan Eichenberger <eichest@gmail.com>
Cc: andrew@lunn.ch, gregory.clement@bootlin.com,
sebastian.hesselbarth@gmail.com,
shivamurthy.shastri@linutronix.de, anna-maria@linutronix.de,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] irqchip/irq-mvebu-icu: Fix irq_set_type for sei and nsr
Date: Thu, 23 Jan 2025 09:45:00 +0100 [thread overview]
Message-ID: <877c6lapgz.ffs@tglx> (raw)
In-Reply-To: <Z46AhYi3DN4TtBKM@eichest-laptop>
On Mon, Jan 20 2025 at 17:57, Stefan Eichenberger wrote:
> On Mon, Jan 20, 2025 at 09:45:43AM +0100, Thomas Gleixner wrote:
>> On Fri, Jan 17 2025 at 19:03, Stefan Eichenberger wrote:
>> > It seems that irq_chip_set_type_parent is not failing. By adding some
>> > debug messages to kernel/irq/manage.c I found that irqd_get_trigger_type
>> > returns IRQF_TRIGGER_RISING even though it should return
>> > IRQF_TRIGGER_HIGH according to the device tree. Maybe this was fixed
>> > between 6.10 and 6.12 but I need to analyze that again in more detail.
>>
>> The trigger type is fixed up in mvebu_icu_irq_domain_translate(), but
>> that should be the same with the new code in mvebu_icu_translate().
>>
>> Can you instrument mvebu_icu_translate() and validate that it is
>>
>> 1) Invoked at all
>>
>> 2) The type fixup is done:
>>
>> if (msi_data->subset_data->icu_group == ICU_GRP_SEI)
>> *type = IRQ_TYPE_EDGE_RISING;
>
> Thanks a lot for pointing me in the right direction. I think I found
> what is going on. My instrumentation showed that we still end up in that
> function but the translation does not work. I think the reason is that
> the msi_data conversion is wrong. The following patch would solve the
> issue:
>
> diff --git a/drivers/irqchip/irq-mvebu-icu.c b/drivers/irqchip/irq-mvebu-icu.c
> index b337f6c05f18..4eebed39880a 100644
> --- a/drivers/irqchip/irq-mvebu-icu.c
> +++ b/drivers/irqchip/irq-mvebu-icu.c
> @@ -68,7 +68,8 @@ static int mvebu_icu_translate(struct irq_domain *d, struct irq_fwspec *fwspec,
> unsigned long *hwirq, unsigned int *type)
> {
> unsigned int param_count = static_branch_unlikely(&legacy_bindings) ? 3 : 2;
> - struct mvebu_icu_msi_data *msi_data = d->host_data;
> + struct msi_domain_info *info = d->host_data;
> + struct mvebu_icu_msi_data *msi_data = info->chip_data;
> struct mvebu_icu *icu = msi_data->icu;
>
> /* Check the count of the parameters in dt */
>
> Do you agree with that fix? If so I will prepare a proper patch.
Duh, yes. What was I thinking?
Thanks,
tglx
prev parent reply other threads:[~2025-01-23 8:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 11:15 [PATCH v1] irqchip/irq-mvebu-icu: Fix irq_set_type for sei and nsr Stefan Eichenberger
2025-01-15 8:15 ` Thomas Gleixner
2025-01-16 17:12 ` Stefan Eichenberger
2025-01-16 21:05 ` Thomas Gleixner
2025-01-17 18:03 ` Stefan Eichenberger
2025-01-20 8:45 ` Thomas Gleixner
2025-01-20 16:57 ` Stefan Eichenberger
2025-01-23 8:45 ` Thomas Gleixner [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=877c6lapgz.ffs@tglx \
--to=tglx@linutronix.de \
--cc=andrew@lunn.ch \
--cc=anna-maria@linutronix.de \
--cc=eichest@gmail.com \
--cc=gregory.clement@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=shivamurthy.shastri@linutronix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.