[PATCH] enable i386 SMP kernel build without ioapic support

Andrey Panin (pazke@orbita1.ru)
Fri, 31 Jan 2003 11:34:45 +0300


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-20816-1044002413-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi all again,

this trivial patch (against 2.5.59) moves enable_NMI_through_LVT0()
function from i386/kernel/io_apic.c to i386/kernel/apic.c

This patch allows building SMP kernel without ioapic support included, as
needed for visws subarch.

Please consider applying.

Best regards.

-- 
Andrey Panin		| Embedded systems software developer
pazke@orbita1.ru	| PGP key: wwwkeys.pgp.net

--=_courier-20816-1044002413-0001-2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=patch-apic

diff -urN -X /usr/share/dontdiff linux-2.5.59.vanilla/arch/i386/kernel/apic.c linux-2.5.59/arch/i386/kernel/apic.c --- linux-2.5.59.vanilla/arch/i386/kernel/apic.c Wed Jan 15 20:37:20 2003 +++ linux-2.5.59/arch/i386/kernel/apic.c Sun Jan 19 18:43:10 2003 @@ -54,6 +54,18 @@ int prof_old_multiplier[NR_CPUS] = { 1, }; int prof_counter[NR_CPUS] = { 1, }; +void enable_NMI_through_LVT0 (void * dummy) +{ + unsigned int v, ver; + + ver = apic_read(APIC_LVR); + ver = GET_APIC_VERSION(ver); + v = APIC_DM_NMI; /* unmask and set to NMI */ + if (!APIC_INTEGRATED(ver)) /* 82489DX */ + v |= APIC_LVT_LEVEL_TRIGGER; + apic_write_around(APIC_LVT0, v); +} + int get_maxlvt(void) { unsigned int v, ver, maxlvt; diff -urN -X /usr/share/dontdiff linux-2.5.59.vanilla/arch/i386/kernel/io_apic.c linux-2.5.59/arch/i386/kernel/io_apic.c --- linux-2.5.59.vanilla/arch/i386/kernel/io_apic.c Mon Jan 27 18:24:59 2003 +++ linux-2.5.59/arch/i386/kernel/io_apic.c Sun Jan 19 18:43:10 2003 @@ -1499,18 +1499,6 @@ end_lapic_irq }; -void enable_NMI_through_LVT0 (void * dummy) -{ - unsigned int v, ver; - - ver = apic_read(APIC_LVR); - ver = GET_APIC_VERSION(ver); - v = APIC_DM_NMI; /* unmask and set to NMI */ - if (!APIC_INTEGRATED(ver)) /* 82489DX */ - v |= APIC_LVT_LEVEL_TRIGGER; - apic_write_around(APIC_LVT0, v); -} - static void setup_nmi (void) { /*

--=_courier-20816-1044002413-0001-2--