Axp-List Archive
Interrupts && Rawhide...

Subject: Interrupts && Rawhide...
From: Matthew Jacob (mjacob@feral.com)
Date: Sun Mar 11 11:42:52 2001


We had a problem in FreeBSD-alpha with not being able to dismiss interrupts
correctly at interrupt time (ithreads need to passivate interrupts w/o
actually talking to the hardware involved as they'll then get rescheduled and
run like all ithreads).

Compaq was helpful in suggesting a fix for this - which worked for FreeBSD.

I've now taken the same h/w (4-way 2-hose system) and I'd been having a
heckuva time getting 2.4.2 running on it- it would hang trying to access
something on the 2nd hose....Applying the following patches seems to have
helped but I haven't figured out yet why...

But I did notice that the fix for dismissing a pending interrupt when
disabling an IRQ is missing in Linux- might be of some use....

diff -u linux.orig/arch/alpha/kernel/core_mcpcia.c linux/arch/alpha/kernel/core_mcpcia.c
--- linux.orig/arch/alpha/kernel/core_mcpcia.c Wed Jun 21 22:30:59 2000
+++ linux/arch/alpha/kernel/core_mcpcia.c Sun Mar 11 10:14:02 2001
@@ -43,6 +43,8 @@
 # define DBG_CFG(args)
 #endif
 
+spinlock_t rawhide_confspace_lock = SPIN_LOCK_UNLOCKED;
+
 #define MCPCIA_MAX_HOSES 4
 
 /*
@@ -95,8 +97,10 @@
         unsigned long mid = MCPCIA_HOSE2MID(hose->index);
         unsigned int stat0, value, temp, cpu;
 
- cpu = smp_processor_id();
 
+ spin_lock(&rawhide_confspace_lock);
+
+ cpu = smp_processor_id();
         __save_and_cli(flags);
 
         DBG_CFG(("conf_read(addr=0x%lx, type1=%d, hose=%d)\n",
@@ -132,6 +136,7 @@
         DBG_CFG(("conf_read(): finished\n"));
 
         __restore_flags(flags);
+ spin_unlock(&rawhide_confspace_lock);
         return value;
 }
 
@@ -143,6 +148,7 @@
         unsigned long mid = MCPCIA_HOSE2MID(hose->index);
         unsigned int stat0, temp, cpu;
 
+ spin_lock(&rawhide_confspace_lock);
         cpu = smp_processor_id();
 
         __save_and_cli(flags); /* avoid getting hit by machine check */
@@ -168,6 +174,7 @@
 
         DBG_CFG(("conf_write(): finished\n"));
         __restore_flags(flags);
+ spin_unlock(&rawhide_confspace_lock);
 }
 
 static int
diff -u linux.orig/arch/alpha/kernel/sys_rawhide.c linux/arch/alpha/kernel/sys_rawhide.c
--- linux.orig/arch/alpha/kernel/sys_rawhide.c Fri Oct 27 10:55:01 2000
+++ linux/arch/alpha/kernel/sys_rawhide.c Sun Mar 11 10:11:37 2001
@@ -49,6 +49,7 @@
         *(vuip)MCPCIA_INT_MASK0(MCPCIA_HOSE2MID(hose)) = mask;
         mb();
         *(vuip)MCPCIA_INT_MASK0(MCPCIA_HOSE2MID(hose));
+
 }
 
 static inline void
@@ -80,6 +81,8 @@
         mask = cached_irq_masks[hose] &= ~(1 << irq);
         mask |= hose_irq_masks[hose];
         rawhide_update_irq_hw(hose, mask);
+ *(vuip)MCPCIA_INT_REQ(MCPCIA_HOSE2MID(hose)) = 1 << irq;
+ mb();
         spin_unlock(&rawhide_irq_lock);
 }
 

_______________________________________________
Axp-list mailing list
Axp-list@redhat.com
https://listman.redhat.com/mailman/listinfo/axp-list



This archive was generated by hypermail version 2a22 on Tue Apr 10 10:35:31 2001 PDT
Send any problems or questions about this archive to webmaster@alphalinux.org.