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: [patch] Clean up CPE handler registration
Date: Tue, 07 Aug 2007 10:21:44 +0000	[thread overview]
Message-ID: <1186482104.3918.39.camel@kane-linux> (raw)
In-Reply-To: <200708031932.l73JWbcR143006281@clink.americas.sgi.com>

Hi,

I tested this patch on dig kernel and confirm the system boots
fine and CPE is also fine.

Thanks,
Kenji Kaneshige


2007-08-03 (金) の 14:32 -0500 に Russ Anderson さんは書きました:
> [patch] Clean up CPE handler registration
> 
> Use local_vector_to_irq() instead of looping through all NR_IRQS.
> This avoids registering the CPE handler on multiple irqs.  Only 
> register if the irq is valid.  If no valid irq is found, print an
> error message and set up polling.
> 
> This patch applies on top of Kenji Kaneshige's 
> "Implement platform_irq_to_vector() for SN" patch.
> 
> 
> Signed-off-by: Russ Anderson <rja@sgi.com>
> 
> ---
>  arch/ia64/kernel/mca.c |   34 +++++++++++++++++++---------------
>  1 file changed, 19 insertions(+), 15 deletions(-)
> 
> Index: test/arch/ia64/kernel/mca.c
> =================================> --- test.orig/arch/ia64/kernel/mca.c	2007-08-02 17:53:11.189258072 -0500
> +++ test/arch/ia64/kernel/mca.c	2007-08-03 13:55:19.481016222 -0500
> @@ -2018,22 +2018,26 @@ ia64_mca_late_init(void)
>  
>  		if (cpe_vector >= 0) {
>  			/* If platform supports CPEI, enable the irq. */
> -			cpe_poll_enabled = 0;
> -			for (irq = 0; irq < NR_IRQS; ++irq)
> -				if (irq_to_vector(irq) = cpe_vector) {
> -					desc = irq_desc + irq;
> -					desc->status |= IRQ_PER_CPU;
> -					setup_irq(irq, &mca_cpe_irqaction);
> -					ia64_cpe_irq = irq;
> -				}
> -			ia64_mca_register_cpev(cpe_vector);
> -			IA64_MCA_DEBUG("%s: CPEI/P setup and enabled.\n", __FUNCTION__);
> -		} else {
> -			/* If platform doesn't support CPEI, get the timer going. */
> -			if (cpe_poll_enabled) {
> -				ia64_mca_cpe_poll(0UL);
> -				IA64_MCA_DEBUG("%s: CPEP setup and enabled.\n", __FUNCTION__);
> +			irq = local_vector_to_irq(cpe_vector);
> +			if (irq > 0) {
> +				cpe_poll_enabled = 0;
> +				desc = irq_desc + irq;
> +				desc->status |= IRQ_PER_CPU;
> +				setup_irq(irq, &mca_cpe_irqaction);
> +				ia64_cpe_irq = irq;
> +				ia64_mca_register_cpev(cpe_vector);
> +				IA64_MCA_DEBUG("%s: CPEI/P setup and enabled.\n",
> +					__FUNCTION__);
> +				return 0;
>  			}
> +			printk(KERN_ERR "%s: Failed to find irq for CPE "
> +					"interrupt handler, vector %d\n",
> +					__FUNCTION__, cpe_vector);
> +		}
> +		/* If platform doesn't support CPEI, get the timer going. */
> +		if (cpe_poll_enabled) {
> +			ia64_mca_cpe_poll(0UL);
> +			IA64_MCA_DEBUG("%s: CPEP setup and enabled.\n", __FUNCTION__);
>  		}
>  	}
>  #endif


      reply	other threads:[~2007-08-07 10:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 19:32 [patch] Clean up CPE handler registration Russ Anderson
2007-08-07 10:21 ` 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=1186482104.3918.39.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