All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Johan Hovold <johan+linaro@kernel.org>, Marc Zyngier <maz@kernel.org>
Cc: 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,
	Johan Hovold <johan+linaro@kernel.org>,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Subject: Re: [PATCH v4 07/19] irqdomain: Look for existing mapping only once
Date: Tue, 17 Jan 2023 22:34:07 +0100	[thread overview]
Message-ID: <87wn5kkfqo.ffs@tglx> (raw)
In-Reply-To: <20230116135044.14998-8-johan+linaro@kernel.org>

On Mon, Jan 16 2023 at 14:50, Johan Hovold wrote:
> Avoid looking for an existing mapping twice when creating a new mapping
> using irq_create_fwspec_mapping() by factoring out the actual allocation
> which is shared with irq_create_mapping_affinity().

This changelog is incomplete and it took me a while to figure out why
this is before the race fix.

The point is that you need __irq_create_mapping_affinity() later to fix
the shared mapping race. The double check avoidance is just a nice side
effect.

So please spell it out and make it clear that this needs to be
backported too, e.g. by adding:

The split out internal function will be used to fix a shared interrupt
mapping race. This change is therefore tagged with the same fixes tag.

Fixes: ....

>  
> +static unsigned int __irq_create_mapping_affinity(struct irq_domain *domain,
> +						  irq_hw_number_t hwirq,
> +						  const struct irq_affinity_desc *affinity)

Please rename to irq_create_mapping_affinity_locked() so it's clear what
this is about and what the calling convention is. A lockdep assert to
that effect would be nice too.

Thanks,

        tglx

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Johan Hovold <johan+linaro@kernel.org>, Marc Zyngier <maz@kernel.org>
Cc: 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,
	Johan Hovold <johan+linaro@kernel.org>,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Subject: Re: [PATCH v4 07/19] irqdomain: Look for existing mapping only once
Date: Tue, 17 Jan 2023 22:34:07 +0100	[thread overview]
Message-ID: <87wn5kkfqo.ffs@tglx> (raw)
In-Reply-To: <20230116135044.14998-8-johan+linaro@kernel.org>

On Mon, Jan 16 2023 at 14:50, Johan Hovold wrote:
> Avoid looking for an existing mapping twice when creating a new mapping
> using irq_create_fwspec_mapping() by factoring out the actual allocation
> which is shared with irq_create_mapping_affinity().

This changelog is incomplete and it took me a while to figure out why
this is before the race fix.

The point is that you need __irq_create_mapping_affinity() later to fix
the shared mapping race. The double check avoidance is just a nice side
effect.

So please spell it out and make it clear that this needs to be
backported too, e.g. by adding:

The split out internal function will be used to fix a shared interrupt
mapping race. This change is therefore tagged with the same fixes tag.

Fixes: ....

>  
> +static unsigned int __irq_create_mapping_affinity(struct irq_domain *domain,
> +						  irq_hw_number_t hwirq,
> +						  const struct irq_affinity_desc *affinity)

Please rename to irq_create_mapping_affinity_locked() so it's clear what
this is about and what the calling convention is. A lockdep assert to
that effect would be nice too.

Thanks,

        tglx

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-01-17 23:08 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 13:50 [PATCH v4 00/19] irqdomain: fix mapping race and clean up locking Johan Hovold
2023-01-16 13:50 ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 01/19] irqdomain: Drop bogus fwspec-mapping error handling Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-17 21:17   ` Thomas Gleixner
2023-01-17 21:17     ` Thomas Gleixner
2023-01-16 13:50 ` [PATCH v4 02/19] irqdomain: Drop dead domain-name assignment Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-17 21:18   ` Thomas Gleixner
2023-01-17 21:18     ` Thomas Gleixner
2023-01-16 13:50 ` [PATCH v4 03/19] irqdomain: Drop leftover brackets Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-17 21:19   ` Thomas Gleixner
2023-01-17 21:19     ` Thomas Gleixner
2023-01-18  9:05     ` Johan Hovold
2023-01-18  9:05       ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 04/19] irqdomain: Fix association race Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-17 21:20   ` Thomas Gleixner
2023-01-17 21:20     ` Thomas Gleixner
2023-01-16 13:50 ` [PATCH v4 05/19] irqdomain: Fix disassociation race Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 06/19] irqdomain: Drop revmap mutex Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-17 21:23   ` Thomas Gleixner
2023-01-17 21:23     ` Thomas Gleixner
2023-01-18  9:22     ` Johan Hovold
2023-01-18  9:22       ` Johan Hovold
2023-01-18 13:05       ` Thomas Gleixner
2023-01-18 13:05         ` Thomas Gleixner
2023-01-18 13:10         ` Johan Hovold
2023-01-18 13:10           ` Johan Hovold
2023-02-06 13:09           ` Thomas Gleixner
2023-02-06 13:09             ` Thomas Gleixner
2023-02-06 17:10             ` Johan Hovold
2023-02-06 17:10               ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 07/19] irqdomain: Look for existing mapping only once Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-17 21:34   ` Thomas Gleixner [this message]
2023-01-17 21:34     ` Thomas Gleixner
2023-01-18  9:26     ` Johan Hovold
2023-01-18  9:26       ` Johan Hovold
2023-02-09 13:00       ` Johan Hovold
2023-02-09 13:00         ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 08/19] irqdomain: Refactor __irq_domain_alloc_irqs() Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-17 21:34   ` Thomas Gleixner
2023-01-17 21:34     ` Thomas Gleixner
2023-01-18  9:30     ` Johan Hovold
2023-01-18  9:30       ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 09/19] irqdomain: Fix mapping-creation race Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-17 21:39   ` Thomas Gleixner
2023-01-17 21:39     ` Thomas Gleixner
2023-01-18  9:40     ` Johan Hovold
2023-01-18  9:40       ` Johan Hovold
2023-02-09 13:08       ` Johan Hovold
2023-02-09 13:08         ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 10/19] irqdomain: Clean up irq_domain_push/pop_irq() Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 11/19] x86/ioapic: Use irq_domain_create_hierarchy() Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-17 21:41   ` Thomas Gleixner
2023-01-17 21:41     ` Thomas Gleixner
2023-01-18 10:31     ` Johan Hovold
2023-01-18 10:31       ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 12/19] x86/apic: " Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 13/19] irqchip/alpine-msi: Use irq_domain_add_hierarchy() Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 14/19] irqchip/gic-v2m: Use irq_domain_create_hierarchy() Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 15/19] irqchip/gic-v3-its: " Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 16/19] irqchip/gic-v3-mbi: " Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 17/19] irqchip/loongson-pch-msi: " Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 18/19] irqchip/mvebu-odmi: " Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-16 13:50 ` [PATCH v4 19/19] irqdomain: Switch to per-domain locking Johan Hovold
2023-01-16 13:50   ` Johan Hovold
2023-01-17 21:50   ` Thomas Gleixner
2023-01-17 21:50     ` Thomas Gleixner
2023-01-18  9:51     ` Johan Hovold
2023-01-18  9:51       ` Johan Hovold
2023-01-18 13:09       ` Thomas Gleixner
2023-01-18 13:09         ` Thomas Gleixner

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=87wn5kkfqo.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=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=mark-pk.tsai@mediatek.com \
    --cc=maz@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --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 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.