Linux-kernel mailing list archive 1998-48,: [patch] 2.1.131, "noapic" boot option.

# [patch] 2.1.131, "noapic" boot option.

Tigran Aivazian (tigran@aivazian.demon.co.uk)
Thu, 3 Dec 1998 21:27:39 +0000 (GMT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Matthias Andree: "Re: aic7xxx Driver support faster than 20MB/sec?"
- Previous message: Matthias Andree: "Re: Re: IDE freeze for seconds"

Dear Alan,

This patch implements the "noapic" option that was mentioned on your web
pages, or at least what I assumed you meant by it.
The patch is against 2.1.131 and was tested on Dual PII/400 machine with a
single IO-APIC.

Namely, when "noapic" option is passed symmetric io mode is not entered and
all IRQs appear as "XT-PIC" in /proc/interrupts. The detection of the
IO-APIC is still there, it just isn't used - all is delivered to CPU0.
I think this level of skipping is sufficient because it is the symmetric
mode and the actual use of io apic (rather than detection) was reported as
problemmatic by some on this list (probably with some broken hardware).

Regards,
Tigran

diff -urN linux/arch/i386/kernel/io_apic.c linux-2.1.131.new/arch/i386/kernel/io_apic.c
--- linux/arch/i386/kernel/io_apic.c Tue Oct 6 23:44:00 1998
+++ linux-2.1.131.new/arch/i386/kernel/io_apic.c Thu Dec 3 19:56:01 1998
@@ -225,6 +225,13 @@
int pirq_entries [MAX_PIRQS];
int pirqs_enabled;
+void __init ioapic_setup(char *str, int *ints)
+{
+ extern int skip_ioapic_setup; /* defined in arch/i386/kernel/smp.c */
+
+ skip_ioapic_setup = 1;
+}
+
void __init ioapic_pirq_setup(char *str, int *ints)
{
int i, max;
diff -urN linux/arch/i386/kernel/smp.c linux-2.1.131.new/arch/i386/kernel/smp.c
--- linux/arch/i386/kernel/smp.c Mon Oct 5 20:19:44 1998
+++ linux-2.1.131.new/arch/i386/kernel/smp.c Thu Dec 3 20:01:52 1998
@@ -28,24 +28,17 @@
* Alan Cox : Added EBDA scanning
*/
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/timer.h>
-#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/kernel_stat.h>
#include <linux/delay.h>
#include <linux/mc146818rtc.h>
#include <asm/i82489.h>
-#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <asm/pgtable.h>
#include <asm/bitops.h>
#include <asm/pgtable.h>
-#include <asm/smp.h>
#include <asm/io.h>
#ifdef CONFIG_MTRR
@@ -159,6 +152,7 @@
int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { -1, };
int mp_current_pci_id = 0;
unsigned long mp_lapic_addr = 0;
+int skip_ioapic_setup = 0; /* 1 if "noapic" boot option passed */
/* #define SMP_DEBUG */
@@ -1170,7 +1164,8 @@
* Here we can be sure that there is an IO-APIC in the system. Let's
* go and set it up:
*/
- setup_IO_APIC();
+ if (!skip_ioapic_setup)
+ setup_IO_APIC();
smp_done:
}
diff -urN linux/init/main.c linux-2.1.131.new/init/main.c
--- linux/init/main.c Sun Nov 29 18:37:02 1998
+++ linux-2.1.131.new/init/main.c Thu Dec 3 19:53:49 1998
@@ -90,6 +90,7 @@
extern void smp_setup(char *str, int *ints);
#ifdef __i386__
extern void ioapic_pirq_setup(char *str, int *ints);
+extern void ioapic_setup(char *str, int *ints);
#endif
extern void no_scroll(char *str, int *ints);
extern void kbd_reset_setup(char *str, int *ints);
@@ -541,6 +542,7 @@
{ "nosmp", smp_setup },
{ "maxcpus=", smp_setup },
#ifdef __i386__
+ { "noapic", ioapic_setup },
{ "pirq=", ioapic_pirq_setup },
#endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Matthias Andree: "Re: aic7xxx Driver support faster than 20MB/sec?"
- Previous message: Matthias Andree: "Re: Re: IDE freeze for seconds"