From: Hsin-Yi Wang <hsinyi@chromium.org>
To: Johan Hovold <johan+linaro@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, platform-driver-x86@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 00/19] irqdomain: fix mapping race and clean up locking
Date: Thu, 15 Dec 2022 17:31:24 +0800 [thread overview]
Message-ID: <CAJMQK-ht8_dvdCOQXfUMGGa6ZcPJSXf_AjDd0OLi79WF43NYGA@mail.gmail.com> (raw)
In-Reply-To: <20221209140150.1453-1-johan+linaro@kernel.org>
On Thu, Dec 15, 2022 at 5:22 PM Johan Hovold <johan+linaro@kernel.org> wrote:
>
> Parallel probing (e.g. due to asynchronous probing) of devices that
> share interrupts can currently result in two mappings for the same
> hardware interrupt to be created.
>
> This series fixes this mapping race and clean up the irqdomain locking
> so that in the end the global irq_domain_mutex is only used for managing
> the likewise global irq_domain_list, while domain operations (e.g.
> IRQ allocations) use per-domain (hierarchy) locking.
>
> Johan
>
>
> Changes in v2
> - split out redundant-lookup cleanup (1/4)
> - use a per-domain mutex to address mapping race (2/4)
> - move kernel-doc to exported function (2/4)
> - fix association race (3/4, new)
> - use per-domain mutex for associations (4/4, new)
>
> Changes in v3
> - drop dead and bogus code (1--3/19, new)
> - fix racy mapcount accesses (5/19, new)
> - drop revmap mutex (6/19, new)
> - use irq_domain_mutex to address mapping race (9/19)
> - clean up irq_domain_push/pop_irq() (10/19, new)
> - use irq_domain_create_hierarchy() to construct hierarchies
> (11--18/19, new)
> - switch to per-domain locking (19/19, new)
>
>
> Johan Hovold (19):
> irqdomain: Drop bogus fwspec-mapping error handling
> irqdomain: Drop dead domain-name assignment
> irqdomain: Drop leftover brackets
> irqdomain: Fix association race
> irqdomain: Fix disassociation race
> irqdomain: Drop revmap mutex
> irqdomain: Look for existing mapping only once
> irqdomain: Refactor __irq_domain_alloc_irqs()
> irqdomain: Fix mapping-creation race
> irqdomain: Clean up irq_domain_push/pop_irq()
> x86/ioapic: Use irq_domain_create_hierarchy()
> x86/apic: Use irq_domain_create_hierarchy()
> irqchip/alpine-msi: Use irq_domain_add_hierarchy()
> irqchip/gic-v2m: Use irq_domain_create_hierarchy()
> irqchip/gic-v3-its: Use irq_domain_create_hierarchy()
> irqchip/gic-v3-mbi: Use irq_domain_create_hierarchy()
> irqchip/loongson-pch-msi: Use irq_domain_create_hierarchy()
> irqchip/mvebu-odmi: Use irq_domain_create_hierarchy()
> irqdomain: Switch to per-domain locking
>
> arch/x86/kernel/apic/io_apic.c | 8 +-
> arch/x86/platform/uv/uv_irq.c | 7 +-
> drivers/irqchip/irq-alpine-msi.c | 8 +-
> drivers/irqchip/irq-gic-v2m.c | 5 +-
> drivers/irqchip/irq-gic-v3-its.c | 13 +-
> drivers/irqchip/irq-gic-v3-mbi.c | 5 +-
> drivers/irqchip/irq-loongson-pch-msi.c | 9 +-
> drivers/irqchip/irq-mvebu-odmi.c | 13 +-
> include/linux/irqdomain.h | 6 +-
> kernel/irq/irqdomain.c | 328 ++++++++++++++-----------
> 10 files changed, 220 insertions(+), 182 deletions(-)
>
> --
Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
The series solves a race issue when having non-populated 2nd source
components that share the same irq on ARM devices:
Previously we would see
[ 0.476357] irq: type mismatch, failed to map hwirq-11 for pinctrl@10005000!
and the component failed to probe.
> 2.37.4
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-12-15 9:32 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 14:01 [PATCH v3 00/19] irqdomain: fix mapping race and clean up locking Johan Hovold
2022-12-09 14:01 ` [PATCH v3 01/19] irqdomain: Drop bogus fwspec-mapping error handling Johan Hovold
2022-12-09 14:01 ` [PATCH v3 02/19] irqdomain: Drop dead domain-name assignment Johan Hovold
2022-12-09 14:01 ` [PATCH v3 03/19] irqdomain: Drop leftover brackets Johan Hovold
2022-12-12 22:44 ` Philippe Mathieu-Daudé
2022-12-09 14:01 ` [PATCH v3 04/19] irqdomain: Fix association race Johan Hovold
2022-12-09 14:01 ` [PATCH v3 05/19] irqdomain: Fix disassociation race Johan Hovold
2022-12-09 14:01 ` [PATCH v3 06/19] irqdomain: Drop revmap mutex Johan Hovold
2022-12-09 14:01 ` [PATCH v3 07/19] irqdomain: Look for existing mapping only once Johan Hovold
2022-12-09 14:01 ` [PATCH v3 08/19] irqdomain: Refactor __irq_domain_alloc_irqs() Johan Hovold
2022-12-09 14:01 ` [PATCH v3 09/19] irqdomain: Fix mapping-creation race Johan Hovold
2022-12-09 14:01 ` [PATCH v3 10/19] irqdomain: Clean up irq_domain_push/pop_irq() Johan Hovold
2022-12-12 22:32 ` Philippe Mathieu-Daudé
2022-12-09 14:01 ` [PATCH v3 11/19] x86/ioapic: Use irq_domain_create_hierarchy() Johan Hovold
2022-12-12 22:37 ` Philippe Mathieu-Daudé
2022-12-09 14:01 ` [PATCH v3 12/19] x86/apic: " Johan Hovold
2022-12-12 22:41 ` Philippe Mathieu-Daudé
2022-12-09 14:01 ` [PATCH v3 13/19] irqchip/alpine-msi: Use irq_domain_add_hierarchy() Johan Hovold
2022-12-12 22:41 ` Philippe Mathieu-Daudé
2022-12-09 14:01 ` [PATCH v3 14/19] irqchip/gic-v2m: Use irq_domain_create_hierarchy() Johan Hovold
2022-12-12 22:42 ` Philippe Mathieu-Daudé
2022-12-09 14:01 ` [PATCH v3 15/19] irqchip/gic-v3-its: " Johan Hovold
2022-12-09 14:01 ` [PATCH v3 16/19] irqchip/gic-v3-mbi: " Johan Hovold
2022-12-12 22:42 ` Philippe Mathieu-Daudé
2022-12-09 14:01 ` [PATCH v3 17/19] irqchip/loongson-pch-msi: " Johan Hovold
2022-12-12 22:36 ` Philippe Mathieu-Daudé
2022-12-09 14:01 ` [PATCH v3 18/19] irqchip/mvebu-odmi: " Johan Hovold
2022-12-12 22:37 ` Philippe Mathieu-Daudé
2022-12-09 14:01 ` [PATCH v3 19/19] irqdomain: Switch to per-domain locking Johan Hovold
2022-12-12 14:14 ` Thomas Gleixner
2022-12-12 14:29 ` Johan Hovold
2022-12-12 16:18 ` Thomas Gleixner
2023-01-11 18:28 ` Thomas Gleixner
2023-01-12 17:21 ` Johan Hovold
2022-12-09 15:51 ` [PATCH v3 00/19] irqdomain: fix mapping race and clean up locking Thomas Gleixner
2022-12-09 16:16 ` Johan Hovold
2022-12-09 19:53 ` Thomas Gleixner
2022-12-15 9:31 ` Hsin-Yi Wang [this message]
2023-01-16 13:53 ` Johan Hovold
2022-12-20 3:30 ` [PATCH v3 0/19] " Mark-PK Tsai
2023-01-16 13:55 ` Johan Hovold
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=CAJMQK-ht8_dvdCOQXfUMGGa6ZcPJSXf_AjDd0OLi79WF43NYGA@mail.gmail.com \
--to=hsinyi@chromium.org \
--cc=johan+linaro@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=maz@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).