All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: nicolas.pitre@linaro.org, shreyas@linux.vnet.ibm.com,
	linux-kernel@vger.kernel.org, peterz@infradead.org,
	rafael@kernel.org, vincent.guittot@linaro.org
Subject: Re: [PATCH V6] irq: Track the interrupt timings
Date: Fri, 17 Jun 2016 15:46:36 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1606171545050.5839@nanos> (raw)
In-Reply-To: <1465935043-4844-1-git-send-email-daniel.lezcano@linaro.org>

On Tue, 14 Jun 2016, Daniel Lezcano wrote:
> +/**
> + * irqtiming_get_next - return the next irq timing
> + *
> + * @irq: a pointer to an integer representing the interrupt number
> + *
> + * This function allows to browse safely the interrupt descriptors in order
> + * to retrieve the interrupts timings. The parameter gives the interrupt
> + * number to begin with and will return the interrupt timings for the next
> + * allocated irq. This approach gives us the possibility to go through the
> + * different interrupts without having to handle the sparse irq.
> + *
> + * The function changes @irq to the next allocated irq + 1, it should be
> + * passed back again and again until NULL is returned. Usually this function
> + * is called the first time with @irq = 0.
> + *
> + * Returns a struct irq_timings, NULL if we reach the end of the interrupts
> + * list.
> + */
> +struct irq_timings *irq_timings_get_next(int *irq)
> +{
> +	struct irq_desc *desc;
> +	int next;
> +
> +again:
> +	/* Do a racy lookup of the next allocated irq */
> +	next = irq_get_next_irq(*irq);
> +	if (next >= nr_irqs)
> +		return NULL;
> +
> +	*irq = next + 1;
> +
> +	/*
> +	 * Now lookup the descriptor. It's RCU protected. This

Please mention in the function description above that this function
must be called inside of a rcu_read() locked section.

Thanks,

	tglx

  parent reply	other threads:[~2016-06-17 13:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 16:33 [PATCH V5] irq: Track the interrupt timings Daniel Lezcano
2016-06-14 17:46 ` Nicolas Pitre
2016-06-14 18:11   ` Thomas Gleixner
2016-06-14 19:52     ` Daniel Lezcano
2016-06-14 20:10     ` [PATCH V6] " Daniel Lezcano
2016-06-14 20:38       ` Nicolas Pitre
2016-06-17 13:46       ` Thomas Gleixner [this message]
2016-06-17 17:16         ` [PATCH V7] " Daniel Lezcano
2016-06-23  8:41           ` Thomas Gleixner
2016-06-23  9:39             ` Daniel Lezcano
2016-06-23 10:12               ` Thomas Gleixner
2016-06-23 13:12                 ` Daniel Lezcano

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=alpine.DEB.2.11.1606171545050.5839@nanos \
    --to=tglx@linutronix.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=shreyas@linux.vnet.ibm.com \
    --cc=vincent.guittot@linaro.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.