[PATCH 3/3 v3] powerpc/mpic: FSL MPIC error interrupt support.
Sethi Varun-B16395
B16395 at freescale.com
Sat Aug 4 05:32:31 EST 2012
> -----Original Message-----
> From: Kumar Gala [mailto:galak at kernel.crashing.org]
> Sent: Saturday, August 04, 2012 12:55 AM
> To: Sethi Varun-B16395
> Cc: linuxppc-dev at lists.ozlabs.org; Hamciuc Bogdan-BHAMCIU1
> Subject: Re: [PATCH 3/3 v3] powerpc/mpic: FSL MPIC error interrupt
> support.
>
>
> On Aug 3, 2012, at 1:52 PM, Sethi Varun-B16395 wrote:
>
> >
> >
> >> -----Original Message-----
> >> From: Kumar Gala [mailto:galak at kernel.crashing.org]
> >> Sent: Friday, August 03, 2012 6:49 PM
> >> To: Sethi Varun-B16395
> >> Cc: linuxppc-dev at lists.ozlabs.org; Hamciuc Bogdan-BHAMCIU1
> >> Subject: Re: [PATCH 3/3 v3] powerpc/mpic: FSL MPIC error interrupt
> >> support.
> >>> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> >>> index 7e32db7..2a0b632 100644
> >>> --- a/arch/powerpc/sysdev/mpic.c
> >>> +++ b/arch/powerpc/sysdev/mpic.c
> >>> @@ -1026,6 +1026,9 @@ static int mpic_host_map(struct irq_domain *h,
> >> unsigned int virq,
> >>> return 0;
> >>> }
> >>>
> >>> + if (mpic_map_error_int(mpic, virq, hw))
> >>> + return 0;
> >>> +
> >>> if (hw >= mpic->num_sources)
> >>> return -EINVAL;
> >>>
> >>> @@ -1085,7 +1088,16 @@ static int mpic_host_xlate(struct irq_domain
> >>> *h,
> >> struct device_node *ct,
> >>> */
> >>> switch (intspec[2]) {
> >>> case 0:
> >>> - case 1: /* no EISR/EIMR support for now, treat as shared IRQ
> >> */
> >>> + break;
> >>> + case 1:
> >>> + if (!mpic->err_int_config_done)
> >>> + break;
> >>> +
> >>
> >> Under what case would we call mpic_host_xlate and have not called
> >> mpic_init?
> >>
> > [Sethi Varun-B16395] Never, but we shouldn't translate the error
> > interrupt specifier If mpic_err_int_init failed.
>
> Isnt that true of a 1000 other things. If init failed we shouldn't even
> call map for other reasons. I don't think we need a special check here.
[Sethi Varun-B16395] There is no specific check to see if mpic_init failed.
In this particular case if we fail to register the error interrupt handler
we cannot use the error sub interrupts.
-Varun
More information about the Linuxppc-dev
mailing list