[PATCH] powerpc: irq_data conversion

Lennert Buytenhek buytenh at wantstofly.org
Tue Feb 15 17:01:58 EST 2011


On Mon, Feb 14, 2011 at 11:07:15AM -0700, Grant Likely wrote:

> > This patch converts powerpc over to the new irq_data based irq_chip
> > functions, as was done earlier for ARM and some other architectures.
> > 
> > struct irq_data is described here:
> > 
> > 	http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ff7dcd44dd446db2c3e13bdedf2d52b8e0127f16
> > 
> > The new irq_chip functions are described here:
> > 
> > 	http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f8822657e799b02c55556c99a601261e207a299d
> > 
> > As I don't have powerpc hardware myself, this hasn't been well-tested
> > at all -- build and run-time testing would be much appreciated.
> 
> Apply warning:
> 
> /home/grant/hacking/linux-2.6/.git/rebase-apply/patch:3470: space before tab in indent.
>  	.irq_mask_ack	= uic_mask_ack_irq,
> warning: 1 line adds whitespace errors.

The original uic.c already had the space there, but yes, there's no
reason not to fix that while we're at it -- thanks.


> It seems to work fine on my ppc32 MPC5200 based Lite5200 board.
> 
> Got a build failure from my limited build farm:
> 
> 02/14 10:38:57 ERROR|base_utils:0106| [stderr] cc1: warnings being treated as errors 
> 02/14 10:38:57 ERROR|base_utils:0106| [stderr] /home/autotest/data/kernelcross/linux/arch/powerpc/platforms/pasemi/setup.c: In function 'pas_init_IRQ': 
> 02/14 10:38:57 ERROR|base_utils:0106| [stderr] /home/autotest/data/kernelcross/linux/arch/powerpc/platforms/pasemi/setup.c:243: error: passing argument 1 of 'mpic_unmask_irq' makes pointer from integer without a cast 
> 02/14 10:38:57 ERROR|base_utils:0106| [stderr] /home/autotest/data/kernelcross/linux/arch/powerpc/include/asm/mpic.h:470: note: expected 'struct irq_data *' but argument is of type 'int' 
> 02/14 10:38:57 ERROR|base_utils:0106| [stderr] /home/autotest/data/kernelcross/linux/arch/powerpc/platforms/pasemi/setup.c: In function 'pas_machine_check_handler': 
> 02/14 10:38:57 ERROR|base_utils:0106| [stderr] /home/autotest/data/kernelcross/linux/arch/powerpc/platforms/pasemi/setup.c:269: error: passing argument 1 of 'mpic_end_irq' makes pointer from integer without a cast 
> 02/14 10:38:57 ERROR|base_utils:0106| [stderr] /home/autotest/data/kernelcross/linux/arch/powerpc/include/asm/mpic.h:474: note: expected 'struct irq_data *' but argument is of type 'int' 
> 02/14 10:38:57 ERROR|base_utils:0106| [stderr] make[3]: *** [arch/powerpc/platforms/pasemi/setup.o] Error 1 

OK, that should be fixed by this:


diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index f372ec1..a6067b3 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -240,7 +240,7 @@ static __init void pas_init_IRQ(void)
 		nmi_virq = irq_create_mapping(NULL, *nmiprop);
 		mpic_irq_set_priority(nmi_virq, 15);
 		set_irq_type(nmi_virq, IRQ_TYPE_EDGE_RISING);
-		mpic_unmask_irq(nmi_virq);
+		mpic_unmask_irq(irq_get_irq_data(nmi_virq));
 	}
 
 	of_node_put(mpic_node);
@@ -266,7 +266,7 @@ static int pas_machine_check_handler(struct pt_regs *regs)
 	if (nmi_virq != NO_IRQ && mpic_get_mcirq() == nmi_virq) {
 		printk(KERN_ERR "NMI delivered\n");
 		debugger(regs);
-		mpic_end_irq(nmi_virq);
+		mpic_end_irq(irq_get_irq_data(nmi_virq));
 		goto out;
 	}
 

> I'm running it through the ozlabs build tester:
> 
> http://kisskb.ellerman.id.au/kisskb/branch/13/
> 
> Results should be available there sometime in the next 6-12 hours

Great, thanks.


thanks,
Lennert


More information about the Linuxppc-dev mailing list