From: Milton Miller <miltonm@bga.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Thomas Gleixner <tglx@linutronix.de>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 37/37] powerpc: make IRQ_NOREQUEST last to clear, first to set
Date: Thu, 12 May 2011 03:31:47 -0500 [thread overview]
Message-ID: <reply-grant-move-norequest@mdm.bga.com> (raw)
In-Reply-To: <BANLkTi=03Te6kqs8G48FJr6zmQVaP3N2Vw@mail.gmail.com>
On Wed, 11 May 2011 about 21:18:11 +0200, Grant Likely wrote:
> On Wed, May 11, 2011 at 7:30 AM, Milton Miller <miltonm@bga.com> wrote:
> > When allocating irqs, wait to clear the IRQ_NOREQUEST flag until the
> > host map hook has been called.
> >
> > When freeing irqs, set the IRQ_NOREQUEST flag before calling the host
> > unmap hook.
>
> A description describing why this change is being made would be
> appreciated here.
>
> g.
You are right. #insert <late addition to series but made cut>
When creating an irq, don't allow a concurent driver request until
we have caled map, which will likley call set_chip_and_handler to
change the irq_chip and its operations.
Similarly, when tearing down an IRQ, make sure no new uses come
along while we change the irq back to the nop chip and then reset
the descriptor to freed status.
If this is acceptable I'll let Ben update the changelog unless
he asks me to resend.
milton
>
> >
> > Signed-off-by: Milton Miller <miltonm@bga.com>
> > ---
> > arch/powerpc/kernel/irq.c | 14 +++++++-------
> > 1 files changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> > index 4368b5e..a24d37d 100644
> > --- a/arch/powerpc/kernel/irq.c
> > +++ b/arch/powerpc/kernel/irq.c
> > @@ -586,14 +586,14 @@ struct irq_host *irq_alloc_host(struct device_node *of_node,
> > irq_map[i].host = host;
> > smp_wmb();
> >
> > - /* Clear norequest flags */
> > - irq_clear_status_flags(i, IRQ_NOREQUEST);
> > -
> > /* Legacy flags are left to default at this point,
> > * one can then use irq_create_mapping() to
> > * explicitly change them
> > */
> > ops->map(host, i, i);
> > +
> > + /* Clear norequest flags */
> > + irq_clear_status_flags(i, IRQ_NOREQUEST);
> > }
> > break;
> > case IRQ_HOST_MAP_LINEAR:
> > @@ -664,8 +664,6 @@ static int irq_setup_virq(struct irq_host *host, unsigned int virq,
> > goto error;
> > }
> >
> > - irq_clear_status_flags(virq, IRQ_NOREQUEST);
> > -
> > /* map it */
> > smp_wmb();
> > irq_map[virq].hwirq = hwirq;
> > @@ -676,6 +674,8 @@ static int irq_setup_virq(struct irq_host *host, unsigned int virq,
> > goto errdesc;
> > }
> >
> > + irq_clear_status_flags(virq, IRQ_NOREQUEST);
> > +
> > return 0;
> >
> > errdesc:
> > @@ -819,6 +819,8 @@ void irq_dispose_mapping(unsigned int virq)
> > if (host->revmap_type == IRQ_HOST_MAP_LEGACY)
> > return;
> >
> > + irq_set_status_flags(virq, IRQ_NOREQUEST);
> > +
> > /* remove chip and handler */
> > irq_set_chip_and_handler(virq, NULL, NULL);
> >
> > @@ -848,8 +850,6 @@ void irq_dispose_mapping(unsigned int virq)
> > smp_mb();
> > irq_map[virq].hwirq = host->inval_irq;
> >
> > - irq_set_status_flags(virq, IRQ_NOREQUEST);
> > -
> > irq_free_descs(virq, 1);
> > /* Free it */
> > irq_free_virt(virq, 1);
> > --
> > 1.7.0.4
> >
> >
next prev parent reply other threads:[~2011-05-12 8:31 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 5:43 [PATCH 00/37] fix paca memory usage and NR_CPU loops, factor ipi and simplify irq code Milton Miller
2011-05-11 5:28 ` [PATCH 01/37] powerpc: fix memory corruption from unallocated slaves Milton Miller
2011-05-11 5:28 ` [PATCH 02/37] powerpc: don't search for paca in freed memory Milton Miller
2011-05-11 5:28 ` [PATCH 03/37] powerpc/kdump64: Don't reference freed memory as pacas Milton Miller
2011-05-11 5:28 ` [PATCH 04/37] powerpc/iseries: cleanup and fix secondary startup Milton Miller
2011-05-11 5:28 ` [PATCH 05/37] powerpc: Respect nr_cpu_ids when calling set_cpu_possible and set_cpu_present Milton Miller
2011-05-11 5:28 ` [PATCH 06/37] powerpc: use nr_cpu_ids in initial paca allocation Milton Miller
2011-05-11 5:28 ` [PATCH 07/37] powerpc: call no-longer static setup_nr_cpu_ids instead of replicating it Milton Miller
2011-05-11 5:28 ` [PATCH 08/37] powerpc: mpic: limit NR_CPUS loop to 32 bit Milton Miller
2011-05-11 5:29 ` [PATCH 09/37] powerpc: mpic: break cpumask abstraction earlier Milton Miller
2011-05-11 5:29 ` [PATCH 10/37] powerpc: remove call sites of MSG_ALL_BUT_SELF Milton Miller
2011-05-11 5:29 ` [PATCH 11/37] powerpc: remove checks for MSG_ALL and MSG_ALL_BUT_SELF Milton Miller
2011-05-11 5:29 ` [PATCH 12/37] linux/smp.h: remove unused MSG_ flags Milton Miller
2011-05-11 5:29 ` [PATCH 13/37] powerpc/mpic: simplify ipi cpu mask handling Milton Miller
2011-05-11 5:29 ` [PATCH 14/37] powerpc: remove powermac/pic.h Milton Miller
2011-05-11 5:29 ` [PATCH 15/37] powerpc: remove alloc_maybe_bootmem for zalloc version Milton Miller
2011-05-11 5:29 ` [PATCH 16/37] powerpc: remove stubbed beat smp support Milton Miller
2011-05-11 5:29 ` [PATCH 17/37] powerpc cell: use smp_request_message_ipi Milton Miller
2011-05-11 5:29 ` [PATCH 18/37] powerpc: move smp_ops_t from machdep.h to smp.h Milton Miller
2011-05-11 5:29 ` [PATCH 19/37] powerpc: consolidate ipi message mux and demux Milton Miller
2011-05-19 6:57 ` Benjamin Herrenschmidt
2011-05-19 6:58 ` Benjamin Herrenschmidt
2011-05-11 5:29 ` [PATCH 20/37] powerpc: add kconfig for muxed smp ipi support Milton Miller
2011-05-11 5:29 ` [PATCH 21/37] powerpc: use bytes instead of bitops in smp ipi multiplexing Milton Miller
2011-05-11 5:29 ` [PATCH 22/37] powerpc: xics: cleanup xics_host_map and ipi Milton Miller
2011-05-11 5:29 ` [PATCH 23/37] powerpc: radix trees are available before init_IRQ Milton Miller
2011-05-11 19:00 ` Grant Likely
2011-05-11 5:29 ` [PATCH 24/37] powerpc: return early if irq_host lookup type is wrong Milton Miller
2011-05-11 19:03 ` Grant Likely
2011-05-11 5:30 ` [PATCH 25/37] powerpc: remove trival irq_host_ops.unmap Milton Miller
2011-05-11 5:30 ` [PATCH 26/37] powerpc: remove i8259 irq_host_ops->unmap Milton Miller
2011-05-11 5:30 ` [PATCH 27/37] powerpc fsl_msi: don't abuse platform_data for driver_data Milton Miller
2011-05-11 19:05 ` Grant Likely
2011-05-11 5:30 ` [PATCH 28/37] powerpc: fsl_msi: use chip_data not handler_data Milton Miller
2011-05-11 5:30 ` [PATCH 29/37] powerpc: mpc5121_ads_cpld: remove use of NO_IRQ_IGNORE Milton Miller
2011-05-11 19:07 ` Grant Likely
2011-05-11 5:30 ` [PATCH 30/37] powerpc: mpc62xx_pic: fix get_irq handling of NO_IRQ Milton Miller
2011-05-11 19:08 ` Grant Likely
2011-05-11 5:30 ` [PATCH 31/37] powerpc: psurge: create a irq_host for secondary cpus Milton Miller
2011-05-11 5:30 ` [PATCH 32/37] powerpc: remove irq_host_ops->remap hook Milton Miller
2011-05-11 5:30 ` [PATCH 33/37] powerpc: spider-pic: get pic from chip_data instead of irq_map Milton Miller
2011-05-11 19:13 ` Grant Likely
2011-05-11 5:30 ` [PATCH 34/37] powerpc: axon_msi: validate msi irq via chip_data Milton Miller
2011-05-11 5:30 ` [PATCH 35/37] powerpc: add virq_is_host to reduce virq_to_host usage Milton Miller
2011-05-11 19:16 ` Grant Likely
2011-05-11 5:30 ` [PATCH 36/37] powerpc: remove virq_to_host Milton Miller
2011-05-11 19:17 ` Grant Likely
2011-05-11 5:30 ` [PATCH 37/37] powerpc: make IRQ_NOREQUEST last to clear, first to set Milton Miller
2011-05-11 19:18 ` Grant Likely
2011-05-12 8:31 ` Milton Miller [this message]
2011-05-11 19:40 ` [PATCH 00/37] fix paca memory usage and NR_CPU loops, factor ipi and simplify irq code Grant Likely
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=reply-grant-move-norequest@mdm.bga.com \
--to=miltonm@bga.com \
--cc=grant.likely@secretlab.ca \
--cc=linuxppc-dev@lists.ozlabs.org \
--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 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.