Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Matthew Jacob <mjacob@feral.com>
To: axp-list@redhat.com
Subject: Interrupts && Rawhide...
Date: Sun, 11 Mar 2001 11:42:52 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.21.0103111126400.29879-100000@zeppo.feral.com> (raw)
In-Reply-To: <200102062014.AA08342@polaris.mro.cpqcorp.net>

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);
 }
 




           reply	other threads:[~2001-03-11 19:43 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200102062014.AA08342@polaris.mro.cpqcorp.net>]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox