Skip to contentSkip to conversation

new kernel diff

Linux-ia64 David Mosberger 1 participant 1 message Apr 20, 2000

lore
Share & tools
lore
#0 lore raw

OK, here is a new kernel updated. This one finally has the IDE irq problem solved. In the end, the real problem turned out to be due to edge-triggered interrupts and had nothing to do with IDE in particular. Anyhow, since this is fixed now, all the ugly debug printk are gone again.

This kernel has been booted on a Big Sur and should work fine on SMP as well (with the caveats that Walt mentioned ealier on). In fact, I used our SMP box to build kernels for the last couple of days and while there are some odd things going on, the system is surprisingl stable (no kernel crashes so far).

What's new with this patch:

- Walt's SMP fixes.

- Kevin's sigsuspend fix that makes ptrace() work better (at least for UP)

- Kevin's ptrace siginfo additions. This is needed to make hardware watchpoints work with gdb.

- Chuck's MCA INIT handler patch; as far as I can tell, INIT on Lion works now. This is really cool as it will help with post-mortem debugging of the kernel. Unfortunately Big Sur has no INIT switch...

- Asit's ivt serialization cleanups.

- the kernel now always gets PCI IRQ routing from the firmware/ACPI

- updated iosapic code to properly handle edge-level triggered interrupts; I also added IPI support to the UP kernel since that's the cleanest way to implement the irq resending that is sometimes required for edge-triggered irqs

- added DVloc hints in hand-coded assembly to avoid spurious DV warnings

- change Errata 10 workaround into an Itanium-permanent fix as there there are no plans to have this fixed for Itanium (not a big issue as it's not performance critical and has an easy workaround).

- Fix alternate tlb handlers to do the right thing for speculative accesses to the kernel regions. This is fixed for real now.

Caveat: this hasn't been tested on SoftSDV and it's likely that the iosapic code would need to be updated a bit to make SoftSDV work again, but I can't test that easily so I didn't do this. A patch would be welcome though.

This should be the last diff relative to 2.3.51 as with the irq problem out of the way, I want to sync up with Linus's latest kernel asap.

	--david
arch/ia64/Makefile +1 -0
diff -urN linux-davidm/arch/ia64/Makefile linux-2.3.51-lia/arch/ia64/Makefile
@@ -9,6 +9,7 @@
 #
 
 NM := $(CROSS_COMPILE)nm -B
+AWK := awk
 
 LINKFLAGS = -static -T arch/$(ARCH)/vmlinux.lds
 # next line is for HP compiler backend:
arch/ia64/config.in +1 -1
diff -urN linux-davidm/arch/ia64/config.in linux-2.3.51-lia/arch/ia64/config.in
@@ -4,6 +4,7 @@
 comment 'General setup'
 
 define_bool CONFIG_IA64 y
+define_bool CONFIG_ITANIUM y	# easy choice for now... ;-)
 
 choice 'IA-64 system type'					\
 	"Generic		CONFIG_IA64_GENERIC		\
@@ -23,7 +24,6 @@
 	bool '  Enable BigSur hacks' CONFIG_IA64_BIGSUR_HACKS y
 	bool '  Enable Lion hacks' CONFIG_IA64_LION_HACKS n
 	bool '  Emulate PAL/SAL/EFI firmware' CONFIG_IA64_FW_EMU n
-	bool '  Get PCI IRQ routing from firmware/ACPI'	CONFIG_IA64_IRQ_ACPI y
 	bool '  Enable IA64 Machine Check Abort' CONFIG_IA64_MCA n
 fi
 
arch/ia64/dig/iosapic.c +135 -313

550 lines not on this page · raw message

arch/ia64/dig/setup.c +3 -9
diff -urN linux-davidm/arch/ia64/dig/setup.c linux-2.3.51-lia/arch/ia64/dig/setup.c
@@ -47,17 +47,11 @@
 	unsigned int orig_x, orig_y, num_cols, num_rows, font_height;
 
 	/*
-	 * This assumes that the EFI partition is physical disk 1
-	 * partition 1 and the Linux root disk is physical disk 1
-	 * partition 2.
+	 * Default to /dev/sda2.  This assumes that the EFI partition
+	 * is physical disk 1 partition 1 and the Linux root disk is
+	 * physical disk 1 partition 2.
 	 */
-#ifdef CONFIG_IA64_LION_HACKS
-	/* default to /dev/sda2 on Lion... */
 	ROOT_DEV = to_kdev_t(0x0802);		/* default to second partition on first drive */
-#else
-	/* default to /dev/dha2 on BigSur... */
-	ROOT_DEV = to_kdev_t(0x0302);		/* default to second partition on first drive */
-#endif
 
 #ifdef CONFIG_SMP
 	init_smp_config();
arch/ia64/kernel/acpi.c +23 -15
diff -urN linux-davidm/arch/ia64/kernel/acpi.c linux-2.3.51-lia/arch/ia64/kernel/acpi.c
@@ -27,13 +27,12 @@
 #undef ACPI_DEBUG		/* Guess what this does? */
 
 #ifdef CONFIG_SMP
-extern unsigned long ipi_base_addr;
+extern struct smp_boot_data smp;
 #endif
 
 /* These are ugly but will be reclaimed by the kernel */
-int __initdata acpi_cpus = 0;	
-int __initdata acpi_apic_map[32];
-int __initdata cpu_cnt = 0;
+int __initdata available_cpus = 0;	
+int __initdata total_cpus = 0;
 
 void (*pm_idle) (void);
 
@@ -50,7 +49,7 @@
 	if ((lsapic->flags & LSAPIC_PRESENT) = 0) 
 		return;
 
-	printk("      CPU %d (%.04x:%.04x): ", cpu_cnt, lsapic->eid, lsapic->id);
+	printk("      CPU %d (%.04x:%.04x): ", total_cpus, lsapic->eid, lsapic->id);
 
 	if ((lsapic->flags & LSAPIC_ENABLED) = 0) {
 		printk("Disabled.\n");
@@ -62,11 +61,17 @@
 	
 	if (add) {
 		printk("Available.\n");
-		acpi_cpus++;
-		acpi_apic_map[cpu_cnt] = (lsapic->id << 8) | lsapic->eid;
+		available_cpus++;
+#ifdef CONFIG_SMP
+# if LARGE_CPU_ID_OK
+		smp.cpu_map[total_cpus] = (lsapic->id << 8) | lsapic->eid;
+# else
+		smp.cpu_map[total_cpus] = lsapic->id;
+# endif
+#endif
 	}
 	
-	cpu_cnt++;
+	total_cpus++;
 }
 
 /*
@@ -204,11 +209,11 @@
 {
 	char *p, *end;
 
-	memset(&acpi_apic_map, -1, sizeof(acpi_apic_map));
-
-#ifdef CONFIG_SMP
 	/* Base address of IPI Message Block */
 	ipi_base_addr = (unsigned long) ioremap(msapic->interrupt_block, 0);
+
+#ifdef CONFIG_SMP
+	memset(&smp, -1, sizeof(smp));
 #endif
 	
 	p = (char *) (msapic + 1);
@@ -253,7 +258,7 @@
 	}
 
 	/* Make bootup pretty */
-	printk("      %d CPUs available, %d CPUs total\n", acpi_cpus, cpu_cnt);
+	printk("      %d CPUs available, %d CPUs total\n", available_cpus, total_cpus);
 }
 
 int __init 
@@ -292,12 +297,15 @@
 			continue;
 
 		acpi_parse_msapic((acpi_sapic_t *) hdrp);
-	} /* while() */
+	}
 
-	if (acpi_cpus = 0) {
+#ifdef CONFIG_SMP
+	if (available_cpus = 0) {
 		printk("ACPI: Found 0 CPUS; assuming 1\n");
-		acpi_cpus = 1; /* We've got at least one of these, no? */
+		available_cpus = 1; /* We've got at least one of these, no? */
 	}
+	smp.cpu_count = available_cpus;
+#endif
 	return 1;
 }
 
arch/ia64/kernel/entry.S +39 -29

134 lines not on this page · raw message

arch/ia64/kernel/irq.c +0 -7
diff -urN linux-davidm/arch/ia64/kernel/irq.c linux-2.3.51-lia/arch/ia64/kernel/irq.c
@@ -582,9 +582,7 @@
 	if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
 		action = desc->action;
 		status &= ~IRQ_PENDING; /* we commit to handling */
-#ifdef CONFIG_SMP
 		status |= IRQ_INPROGRESS; /* we are handling it */
-#endif
 	}
 	desc->status = status;
 
@@ -616,9 +614,7 @@
 			break;
 		desc->status &= ~IRQ_PENDING;
 	}
-#ifdef CONFIG_SMP
 	desc->status &= ~IRQ_INPROGRESS;
-#endif
 out:
 	/*
 	 * The ->end() handler has to deal with interrupts which got
@@ -732,7 +728,6 @@
 	unsigned long val;
 	unsigned long delay;
 
-printk("probe_irq_on\n");
 	/* 
 	 * something may have generated an irq long ago and we want to
 	 * flush such a longstanding irq before considering it as spurious. 
@@ -860,7 +855,6 @@
 
 	if (nr_irqs > 1)
 		irq_found = -irq_found;
-printk("probe_irq_off=%d\n", irq_found);
 	return irq_found;
 }
 
@@ -872,7 +866,6 @@
 	struct irqaction *old, **p;
 	irq_desc_t *desc = irq_desc + irq;
 
-printk("setup_irq(irq=%u,type=%s)\n", irq, desc->handler->typename);
 	/*
 	 * Some drivers like serial.c use request_irq() heavily,
 	 * so we have to be careful not to interfere with a
arch/ia64/kernel/irq_ia64.c +25 -18

75 lines not on this page · raw message

arch/ia64/kernel/ivt.S +71 -259

501 lines not on this page · raw message

arch/ia64/kernel/mca.c +157 -54

345 lines not on this page · raw message

arch/ia64/kernel/mca_asm.S +91 -1

112 lines not on this page · raw message