public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [RFC][PATCH 2/2] Implement platform_irq_to_vector() for SN
Date: Fri, 03 Aug 2007 05:26:51 +0000	[thread overview]
Message-ID: <1186118811.3985.59.camel@kane-linux> (raw)
In-Reply-To: <1186029046.3875.17.camel@kane-linux>

2007-08-02 (木) の 15:27 -0500 に Russ Anderson さんは書きました:
> Kenji Kaneshige wrote:
> > 
> > Implement platform_irq_to_vector() for SN platform.
> > 
> > Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
> > 
> > ---
> >  arch/ia64/sn/kernel/irq.c      |    5 +++++
> >  include/asm-ia64/machvec_sn2.h |    2 ++
> >  2 files changed, 7 insertions(+)
> > 
> > Index: linux-2.6.23-rc1/arch/ia64/sn/kernel/irq.c
> > =================================> > --- linux-2.6.23-rc1.orig/arch/ia64/sn/kernel/irq.c
> > +++ linux-2.6.23-rc1/arch/ia64/sn/kernel/irq.c
> > @@ -256,6 +256,11 @@ struct irq_chip irq_type_sn = {
> >  	.set_affinity	= sn_set_affinity_irq
> >  };
> >  
> > +ia64_vector sn_irq_to_vector(int irq)
> > +{
> > +	return (ia64_vector)irq;
> > +}
> > +
> >  unsigned int sn_local_vector_to_irq(u8 vector)
> >  {
> >  	return (CPU_VECTOR_TO_IRQ(smp_processor_id(), vector));
> 
> One thing to be aware of is ia64_vector is u8, which can hold
> a value from 0-255.  NR_IRQS is 1024.
> 
> So sn_irq_to_vector() will truncate any IRQ > 255.
> 

What about this:

ia64_vector sn_irq_to_vector(int irq)
{
	if (irq >= IA64_NUM_VECTORS)
		return 0;
	return (ia64_vector)irq;
}

Thanks,
Kenji Kaneshige



      parent reply	other threads:[~2007-08-03  5:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-02  4:30 [RFC][PATCH 2/2] Implement platform_irq_to_vector() for SN Kenji Kaneshige
2007-08-02 20:27 ` Russ Anderson
2007-08-03  5:26 ` Kenji Kaneshige [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1186118811.3985.59.camel@kane-linux \
    --to=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox