FIXED: Patches to make 2.1.84 work on ALPHA..

Robert Thomas (rob@rpi.net.au)
Sat, 31 Jan 1998 22:58:36 +1100


Apologies, Eudora decided to do all the word-wrapping for me..

Here are some quick patches to fix some future incompatibilites and unable-to-
compile problems in 2.1.84 on alpha, as well as kernel changes in .84 that
weren't propogated to alpha..

--Rob
diff -u --recursive linux/arch/alpha/kernel/irq.c linux.alpha/arch/alpha/kernel/irq.c
--- linux/arch/alpha/kernel/irq.c Tue Jan 27 17:55:21 1998
+++ linux.alpha/arch/alpha/kernel/irq.c Sat Jan 31 19:49:55 1998
@@ -367,13 +367,14 @@
{
int i, len = 0;
struct irqaction * action;
+ int cpu = smp_processor_id();

for (i = 0; i < NR_IRQS; i++) {
action = irq_action[i];
if (!action)
continue;
len += sprintf(buf+len, "%2d: %10u %c %s",
- i, kstat.irqs[0][i],
+ i, kstat.irqs[cpu][i],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
@@ -523,6 +524,7 @@
printk("61=%02x, 461=%02x\n", inb(0x61), inb(0x461));
}

+unsigned int local_bh_count[NR_CPUS];
unsigned int local_irq_count[NR_CPUS];
atomic_t __alpha_bh_counter;

@@ -567,7 +569,7 @@
int cpu = smp_processor_id();

irq_enter(cpu, irq);
- kstat.irqs[0][irq] += 1;
+ kstat.irqs[cpu][irq] += 1;
if (!action) {
unexpected_irq(irq, regs);
} else {
@@ -590,7 +592,7 @@
}

irq_enter(cpu, irq);
- kstat.irqs[0][irq] += 1;
+ kstat.irqs[cpu][irq] += 1;
action = irq_action[irq];
/*
* For normal interrupts, we mask it out, and then ACK it.
diff -u --recursive linux/include/asm-alpha/hardirq.h linux.alpha/include/asm-alpha/hardirq.h
--- linux/include/asm-alpha/hardirq.h Mon Apr 14 23:28:18 1997
+++ linux.alpha/include/asm-alpha/hardirq.h Sat Jan 31 19:48:22 1998
@@ -4,7 +4,7 @@
#include <linux/tasks.h>

extern unsigned int local_irq_count[NR_CPUS];
-#define in_interrupt() (local_irq_count[smp_processor_id()] != 0)
+#define in_interrupt() (local_irq_count[smp_processor_id()] + local_bh_count[smp_processor_id()] != 0)

#ifndef __SMP__

diff -u --recursive linux/include/asm-alpha/softirq.h linux.alpha/include/asm-alpha/softirq.h
--- linux/include/asm-alpha/softirq.h Tue Jan 27 17:55:23 1998
+++ linux.alpha/include/asm-alpha/softirq.h Sat Jan 31 19:28:47 1998
@@ -6,6 +6,7 @@
* referenced at all outside of this file.
*/
extern atomic_t __alpha_bh_counter;
+extern unsigned int local_bh_count[NR_CPUS];

#define get_active_bhs() (bh_mask & bh_active)