[PATCH v3 2/9] ipic: add new interrupts introduced by new chip

Li Yang-r58472 LeoLi at freescale.com
Thu Oct 18 14:09:09 EST 2007


> -----Original Message-----
> From: Kumar Gala [mailto:galak at kernel.crashing.org] 
> Sent: Wednesday, October 17, 2007 9:46 PM
> To: Li Yang-r58472
> Cc: paulus at samba.org; linuxppc-dev at ozlabs.org
> Subject: Re: [PATCH v3 2/9] ipic: add new interrupts 
> introduced by new chip
> 
> 
> On Oct 12, 2007, at 8:28 AM, Li Yang wrote:
> 
> > These interrupts are introduced by the latest Freescale SoC such as 
> > MPC837x.  The patch also adds comment to interrupts.
> >
> > Signed-off-by: Li Yang <leoli at freescale.com>
> > ---
> >  arch/powerpc/sysdev/ipic.c |  224 +++++++++++++++++++++++++++++++++
> > +----------
> >  arch/powerpc/sysdev/ipic.h |    7 +-
> >  include/asm-powerpc/ipic.h |   12 ++-
> >  3 files changed, 186 insertions(+), 57 deletions(-)
> >
> > diff --git a/arch/powerpc/sysdev/ipic.c 
> b/arch/powerpc/sysdev/ipic.c 
> > index 05a56e5..cd8590d 100644
> > --- a/arch/powerpc/sysdev/ipic.c
> > +++ b/arch/powerpc/sysdev/ipic.c
> > @@ -33,7 +33,31 @@ static struct ipic * primary_ipic;  static 
> > DEFINE_SPINLOCK(ipic_lock);
> >
> >  static struct ipic_info ipic_info[] = {
> > -	[9] = {
> > +	[1] = {	/* PEX1 CNT */
> 
> Remove the comments, they are not correct for all IPIC users 
> and thus misleading.

We had discussed about this.  The reason why I add these comments is
that IPIC register definition in our user manual only reference
interrupts by name rather than numbers.  It will greatly enhance the
readability of the code, so that we can check easily if the current code
fits IPIC definition of a specific chip.  Without comments the check
will be a disaster. :)
The comments are correct for all the in tree CPUs.  It should be kept
up-to-date easily when adding new CPUs.

- Leo



More information about the Linuxppc-dev mailing list