public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: David Daney <david.daney@cavium.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	<linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v7 3/5] irqdomain: Add irq_domain_{push,pop}_irq() functions.
Date: Tue, 15 Aug 2017 20:02:02 +0100	[thread overview]
Message-ID: <861socy7rp.fsf@arm.com> (raw)
In-Reply-To: <84b23b62-0813-34eb-5afc-da21597d218f@caviumnetworks.com> (David Daney's message of "Tue, 15 Aug 2017 11:00:19 -0700")

On Tue, Aug 15 2017 at 11:00:19 am BST, David Daney <ddaney@caviumnetworks.com> wrote:
> On 08/15/2017 06:50 AM, Marc Zyngier wrote:
>> Hi David,
>>
>> On 09/08/17 23:51, David Daney wrote:
> [...]
>>> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
>>> index f1f2514..629f770 100644
>>> --- a/kernel/irq/irqdomain.c
>>> +++ b/kernel/irq/irqdomain.c
>>> @@ -1448,6 +1448,184 @@ int __irq_domain_alloc_irqs(struct
> irq_domain *domain, int irq_base,
>>>   	return ret;
>>>   }
>>>   +/* The irq_data was moved, fix the revmap to refer to the new
>>> location */
>>> +static void irq_domain_fix_revmap(struct irq_data *d)
>>> +{
>>> +	void **slot;
>>> +
>>> +	if (d->hwirq < d->domain->revmap_size)
>>> +		return; /* Not using radix tree. */
>>> +
>>> +	/* Fix up the revmap. */
>>> +	mutex_lock(&revmap_trees_mutex);
>>> +	slot = radix_tree_lookup_slot(&d->domain->revmap_tree, d->hwirq);
>>> +	if (slot)
>>> +		radix_tree_replace_slot(&d->domain->revmap_tree, slot, d);
>>
>> radix_tree_replace_slot already deals with non-existing entries, so the
>> initial radix_tree_lookup_slot call is superfluous.
>
> This comment I don't understand.  To replace an element in the tree,
> you must know the slot.  I see no alternative to calling
> radix_tree_lookup_slot().  If I am mistaken, it would be helpful to
> know in a little more detail how you think it should be done.

Nah, you're right. I'm just grossly mistaken. Ignore this.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny.

  reply	other threads:[~2017-08-15 19:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09 22:51 [PATCH v7 0/5] genirq/gpio: Add driver for ThunderX and OCTEON-TX SoCs David Daney
2017-08-09 22:51 ` [PATCH v7 1/5] genirq: Export more irq_chip_*_parent() functions David Daney
2017-08-09 22:51 ` [PATCH v7 2/5] genirq: Add handle_fasteoi_{level,edge}_irq flow handlers David Daney
2017-08-14 10:25   ` Thomas Gleixner
2017-08-16 15:59     ` David Daney
2017-08-16 16:26       ` Thomas Gleixner
2017-08-09 22:51 ` [PATCH v7 3/5] irqdomain: Add irq_domain_{push,pop}_irq() functions David Daney
2017-08-15 13:50   ` Marc Zyngier
2017-08-15 18:00     ` David Daney
2017-08-15 19:02       ` Marc Zyngier [this message]
2017-08-09 22:51 ` [PATCH v7 4/5] gpio: Add gpio driver support for ThunderX and OCTEON-TX David Daney
2017-08-09 22:51 ` [PATCH v7 5/5] MAINTAINERS: Add entry for THUNDERX GPIO Driver David Daney

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=861socy7rp.fsf@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=david.daney@cavium.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=tglx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox