[PATCH] powerpc: irq_data conversion

Grant Likely grant.likely at secretlab.ca
Wed Feb 16 07:06:25 EST 2011


On Mon, Feb 14, 2011 at 11:01 PM, Lennert Buytenhek
<buytenh at wantstofly.org> wrote:
> 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.

Particularly when you're touching that particular line.  :-)

More errors with ppc64_defconfig:

02/15 12:55:39 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/sysdev/mpic.c: In
function 'mpic_from_ipi': 02/15 12:55:39 ERROR|base_utils:0106|
[stderr] /home/autotest/data/kernelcross/linux/arch/powerpc/sysdev/mpic.c:641:
error: 'struct irq_desc' has no member named 'chip_data' 02/15
12:55:39 ERROR|base_utils:0106| [stderr] make[2]: ***
[arch/powerpc/sysdev/mpic.o] Error 1


02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:
In function 'ps3_virq_setup':
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:205:
error: passing argument 1 of 'ps3_chip_mask' makes pointer from
integer without a cast
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:102:
note: expected 'struct irq_data *' but argument is of type 'unsigned
int'
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:
In function 'ps3_irq_plug_destroy':
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:299:
error: passing argument 1 of 'ps3_chip_mask' makes pointer from
integer without a cast
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:102:
note: expected 'struct irq_data *' but argument is of type 'unsigned
int'
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:
In function 'ps3_event_receive_port_destroy':
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:360:
error: passing argument 1 of 'ps3_chip_mask' makes pointer from
integer without a cast
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:102:
note: expected 'struct irq_data *' but argument is of type 'unsigned
int'
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:
In function 'ps3_io_irq_destroy':
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:495:
error: passing argument 1 of 'ps3_chip_mask' makes pointer from
integer without a cast
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:102:
note: expected 'struct irq_data *' but argument is of type 'unsigned
int'
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:
In function 'ps3_vuart_irq_destroy':
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:556:
error: passing argument 1 of 'ps3_chip_mask' makes pointer from
integer without a cast
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:102:
note: expected 'struct irq_data *' but argument is of type 'unsigned
int'
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:
In function 'ps3_spe_irq_destroy':
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:608:
error: passing argument 1 of 'ps3_chip_mask' makes pointer from
integer without a cast
02/15 12:55:58 ERROR|base_utils:0106| [stderr]
/home/autotest/data/kernelcross/linux/arch/powerpc/platforms/ps3/interrupt.c:102:
note: expected 'struct irq_data *' but argument is of type 'unsigned
int'
02/15 12:55:58 ERROR|base_utils:0106| [stderr] make[3]: ***
[arch/powerpc/platforms/ps3/interrupt.o] Error 1

Also running it through the ozlabs build tester again:

http://kisskb.ellerman.id.au/kisskb/branch/13/

Results should be available there sometime in the next 6-12 hours

g.

>
>
> 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
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.


More information about the Linuxppc-dev mailing list