public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH 8/12]  Add mapping table between irq and vector
Date: Fri, 13 Jul 2007 05:52:12 +0000	[thread overview]
Message-ID: <4697130C.8040801@jp.fujitsu.com> (raw)
In-Reply-To: <46417E7C.7030402@jp.fujitsu.com>

Luck, Tony wrote:
> I found why my machine sometimes crashes during boot with the
> vector domain patch applied.  The problem is a spurious interrupt
> that causes a wild pointer reference, and thus a crash.
> 
> The problem occurs because unused entries in the percpu vector_irq
> array are filled with VECTOR_IRQ_UNASSIGNED (-1).  When a
> spurious interrupt occurs ia64_handle_irq() calls:
> 
>  generic_handle_irq(local_vector_to_irq(vector))
> 
> and the  local_vector_to_irq(vector) part return -1, which is all bad.
> 
> If we initialize the unused entried to IA64_SPURIOUS_INT_VECTOR
> instead, then we get the orginal behaviour: a message is printed and
> the vector/irq is disabled.
> 
> As a bonus we can delete the VECTOR_IRQ_UNASSIGNED define
> altogether (which is all too easy to confuse with IRQ_VECTOR_UNASSIGNED).
> 
> So I applied this patch onto the end of your sequence (but you should
> merge it into patch8/12).

Hi Tony,

Thank you for your help.

After reviewing this patch, I'll test and repost vector domain patcheset
for 2.6.22.

Thanks,
Yasuaki Ishimatsu

> -Tony
> 
> diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
> index 91abd1b..ea19ccd 100644
> --- a/arch/ia64/kernel/irq_ia64.c
> +++ b/arch/ia64/kernel/irq_ia64.c
> @@ -47,7 +47,6 @@
>  #define IRQ_DEBUG	0
>  
>  #define IRQ_VECTOR_UNASSIGNED	(0)
> -#define VECTOR_IRQ_UNASSIGNED	(-1)
>  
>  #define IRQ_UNUSED		(0)
>  #define IRQ_USED		(1)
> @@ -83,7 +82,7 @@ struct irq_cfg irq_cfg[NR_IRQS] __read_mostly = {
>  };
>  
>  DEFINE_PER_CPU(int[IA64_NUM_VECTORS], vector_irq) = {
> -	[0 ... IA64_NUM_VECTORS - 1] = VECTOR_IRQ_UNASSIGNED
> +	[0 ... IA64_NUM_VECTORS - 1] = IA64_SPURIOUS_INT_VECTOR
>  };
>  
>  static cpumask_t vector_table[IA64_MAX_DEVICE_VECTORS] = {
> @@ -168,7 +167,7 @@ static void __clear_irq_vector(int irq)
>  	domain = irq_cfg[irq].domain;
>  	cpus_and(mask, irq_cfg[irq].domain, cpu_online_map);
>  	for_each_cpu_mask(cpu, mask)
> -		per_cpu(vector_irq, cpu)[vector] = VECTOR_IRQ_UNASSIGNED;
> +		per_cpu(vector_irq, cpu)[vector] = IA64_SPURIOUS_INT_VECTOR;
>  	irq_cfg[irq].vector = IRQ_VECTOR_UNASSIGNED;
>  	irq_cfg[irq].domain = CPU_MASK_NONE;
>  	irq_status[irq] = IRQ_UNUSED;
> @@ -238,7 +237,7 @@ void __setup_vector_irq(int cpu)
>  
>  	/* Clear vector_irq */
>  	for (vector = 0; vector < IA64_NUM_VECTORS; ++vector)
> -		per_cpu(vector_irq, cpu)[vector] = VECTOR_IRQ_UNASSIGNED;
> +		per_cpu(vector_irq, cpu)[vector] = IA64_SPURIOUS_INT_VECTOR;
>  	/* Mark the inuse vectors */
>  	for (irq = 0; irq < NR_IRQS; ++irq) {
>  		if (!cpu_isset(cpu, irq_cfg[irq].domain))
> 

      parent reply	other threads:[~2007-07-13  5:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-09  7:55 [PATCH 8/12] Add mapping table between irq and vector Ishimatsu Yasuaki
2007-07-12 22:18 ` Luck, Tony
2007-07-13  5:52 ` Yasuaki Ishimatsu [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=4697130C.8040801@jp.fujitsu.com \
    --to=isimatu.yasuaki@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