linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/4] Fix CPU hotplug IRQ migration
Date: Mon, 25 Jul 2011 15:46:35 +0100	[thread overview]
Message-ID: <20110725144634.GC14955@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4E2D7D58.8080309@ti.com>

On Mon, Jul 25, 2011 at 07:57:36PM +0530, Santosh Shilimkar wrote:
> Will make you OMAP4 IRQ code available for this particular aspect and
> may be we can take it from there. There are two main problems I am
> seeing currently.
>
> 1)Which CPU gic_arch_extn_[mask/unmask] operate on?
> Can we assume that whichever CPU the call being executed
> should be the target CPU ? This might not be safe assumption
> though. For the extn, there is no other way to know the target
> CPU for mask/unmask of an IRQ

This goes back to the mistake that was made with the initial set of
GIC PPI patches.

You can't assume anything about which CPU the mask/unmask functions end
up running on.  Between code calling request_irq() and the relevant
unmask function being called, we can end up scheduling, either because
of a mutex being waited for or because of a preemption event.  That
means we can end up on a different CPU to that which we started out
on.

So, the only thing you can do is remember the CPU number which it was
last associated with - a simple 'unsigned int' should do in the
extensions data structures, one per IRQ.

However, my point is that doing this:

	gic_arch_extn.irq_set_affinity(d, cpumask_of(cpu), force);

and then:

	cpu = cpumask_first(affinity);

in the extensions code is a very long winded way of communicating a
single CPU number down into the IRQ extension code.

  reply	other threads:[~2011-07-25 14:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 15:14 [PATCH 0/4] Fix CPU hotplug IRQ migration Russell King - ARM Linux
2011-07-21 15:24 ` [PATCH 1/4] ARM: CPU hotplug: fix abuse of irqdesc->node Russell King - ARM Linux
2011-07-21 15:24 ` [PATCH 2/4] ARM: GIC: avoid routing interrupts to offline CPUs Russell King - ARM Linux
2011-07-21 15:25 ` [PATCH 3/4] ARM: CPU hotplug: pass in proper affinity mask on IRQ migration Russell King - ARM Linux
2011-07-25 12:38   ` Santosh Shilimkar
2011-07-25 13:06     ` Russell King - ARM Linux
2011-07-21 15:25 ` [PATCH 4/4] ARM: CPU hotplug: ensure we migrate all IRQs off a downed CPU Russell King - ARM Linux
2011-07-22  5:35 ` [PATCH 0/4] Fix CPU hotplug IRQ migration Santosh Shilimkar
2011-07-22  8:12   ` Russell King - ARM Linux
2011-07-22  8:22     ` Santosh Shilimkar
2011-07-22 17:14     ` Colin Cross
2011-07-25 13:04   ` Santosh Shilimkar
2011-07-25 13:23     ` Russell King - ARM Linux
2011-07-25 14:27       ` Santosh Shilimkar
2011-07-25 14:46         ` Russell King - ARM Linux [this message]
2011-07-25 15:03           ` Santosh Shilimkar
2011-07-22  8:50 ` Will Deacon

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=20110725144634.GC14955@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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).