* [patch 0/2] Sparse irq cleanup - Resend
@ 2011-01-21 16:12 Thomas Gleixner
2011-01-21 16:12 ` [patch 1/2] powerpc: Use ARCH_IRQ_INIT_FLAGS Thomas Gleixner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Gleixner @ 2011-01-21 16:12 UTC (permalink / raw)
To: linuxppc-dev
The following series cleans up the left overs of the old sparse irq
code.
Thanks,
tglx
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 1/2] powerpc: Use ARCH_IRQ_INIT_FLAGS
2011-01-21 16:12 [patch 0/2] Sparse irq cleanup - Resend Thomas Gleixner
@ 2011-01-21 16:12 ` Thomas Gleixner
2011-01-21 16:12 ` [patch 2/2] powerpc: Use new irq allocator Thomas Gleixner
2011-01-22 10:18 ` [patch 0/2] Sparse irq cleanup - Resend Benjamin Herrenschmidt
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2011-01-21 16:12 UTC (permalink / raw)
To: linuxppc-dev
Define the ARCH_IRQ_INIT_FLAGS instead of fixing it up in a loop.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/powerpc/include/asm/hw_irq.h | 2 ++
arch/powerpc/kernel/irq.c | 15 ---------------
2 files changed, 2 insertions(+), 15 deletions(-)
Index: linux-2.6-tip/arch/powerpc/include/asm/hw_irq.h
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/include/asm/hw_irq.h
+++ linux-2.6-tip/arch/powerpc/include/asm/hw_irq.h
@@ -141,6 +141,8 @@ static inline bool arch_irqs_disabled(vo
#endif /* CONFIG_PPC64 */
+#define ARCH_IRQ_INIT_FLAGS IRQ_NOREQUEST
+
/*
* interrupt-retrigger: should we handle this via lost interrupts and IPIs
* or should we not care like we do now ? --BenH.
Index: linux-2.6-tip/arch/powerpc/kernel/irq.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/kernel/irq.c
+++ linux-2.6-tip/arch/powerpc/kernel/irq.c
@@ -1074,21 +1074,6 @@ void irq_free_virt(unsigned int virq, un
int arch_early_irq_init(void)
{
- struct irq_desc *desc;
- int i;
-
- for (i = 0; i < NR_IRQS; i++) {
- desc = irq_to_desc(i);
- if (desc)
- desc->status |= IRQ_NOREQUEST;
- }
-
- return 0;
-}
-
-int arch_init_chip_data(struct irq_desc *desc, int node)
-{
- desc->status |= IRQ_NOREQUEST;
return 0;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 2/2] powerpc: Use new irq allocator
2011-01-21 16:12 [patch 0/2] Sparse irq cleanup - Resend Thomas Gleixner
2011-01-21 16:12 ` [patch 1/2] powerpc: Use ARCH_IRQ_INIT_FLAGS Thomas Gleixner
@ 2011-01-21 16:12 ` Thomas Gleixner
2011-01-22 10:18 ` [patch 0/2] Sparse irq cleanup - Resend Benjamin Herrenschmidt
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2011-01-21 16:12 UTC (permalink / raw)
To: linuxppc-dev
Use the new functions and free the descriptor when the virq is
destroyed.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/powerpc/kernel/irq.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
Index: linux-2.6-tip/arch/powerpc/kernel/irq.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/kernel/irq.c
+++ linux-2.6-tip/arch/powerpc/kernel/irq.c
@@ -678,16 +678,15 @@ void irq_set_virq_count(unsigned int cou
static int irq_setup_virq(struct irq_host *host, unsigned int virq,
irq_hw_number_t hwirq)
{
- struct irq_desc *desc;
+ int res;
- desc = irq_to_desc_alloc_node(virq, 0);
- if (!desc) {
+ res = irq_alloc_desc_at(virq, 0);
+ if (res != virq) {
pr_debug("irq: -> allocating desc failed\n");
goto error;
}
- /* Clear IRQ_NOREQUEST flag */
- desc->status &= ~IRQ_NOREQUEST;
+ irq_clear_status_flags(virq, IRQ_NOREQUEST);
/* map it */
smp_wmb();
@@ -696,11 +695,13 @@ static int irq_setup_virq(struct irq_hos
if (host->ops->map(host, virq, hwirq)) {
pr_debug("irq: -> mapping failed, freeing\n");
- goto error;
+ goto errdesc;
}
return 0;
+errdesc:
+ irq_free_descs(virq, 1);
error:
irq_free_virt(virq, 1);
return -1;
@@ -879,9 +880,9 @@ void irq_dispose_mapping(unsigned int vi
smp_mb();
irq_map[virq].hwirq = host->inval_irq;
- /* Set some flags */
- irq_to_desc(virq)->status |= IRQ_NOREQUEST;
+ irq_set_status_flags(virq, IRQ_NOREQUEST);
+ irq_free_descs(virq, 1);
/* Free it */
irq_free_virt(virq, 1);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 0/2] Sparse irq cleanup - Resend
2011-01-21 16:12 [patch 0/2] Sparse irq cleanup - Resend Thomas Gleixner
2011-01-21 16:12 ` [patch 1/2] powerpc: Use ARCH_IRQ_INIT_FLAGS Thomas Gleixner
2011-01-21 16:12 ` [patch 2/2] powerpc: Use new irq allocator Thomas Gleixner
@ 2011-01-22 10:18 ` Benjamin Herrenschmidt
2 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2011-01-22 10:18 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: linuxppc-dev
On Fri, 2011-01-21 at 16:12 +0000, Thomas Gleixner wrote:
> The following series cleans up the left overs of the old sparse irq
> code.
For some odd reason I forgot to put that in the last time around. I'll
try to remember to do so on monday before I go to LCA.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-22 10:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-21 16:12 [patch 0/2] Sparse irq cleanup - Resend Thomas Gleixner
2011-01-21 16:12 ` [patch 1/2] powerpc: Use ARCH_IRQ_INIT_FLAGS Thomas Gleixner
2011-01-21 16:12 ` [patch 2/2] powerpc: Use new irq allocator Thomas Gleixner
2011-01-22 10:18 ` [patch 0/2] Sparse irq cleanup - Resend Benjamin Herrenschmidt
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).