Messages in this thread Patch in this message | | | Date | Fri, 30 Jul 1999 09:32:19 +0200 | From | Elena Nistal <> | Subject | APICs |
| |
Hi all, I am trying to get one of the two CPUs of my linux box isolated from interrupts. Sp I have made some changes in the io_apic.c and smp.c files of my linux-2.1.131 kernel. But when I make a 'cat /proc/interrupts' this is what it lists:
/*************/
CPU0 CPU1 0: 73310 90992 IO-APIC-edge timer 1: 1 1 IO-APIC-edge keyboard 2: 0 0 XT-PIC cascade 8: 1 0 IO-APIC-edge rtc 12: 471 351 IO-APIC-edge PS/2 Mouse 13: 1 0 XT-PIC fpu 16: 9848 0 IO-APIC-level aic7xxx, aic7xxx 20: 9289 0 IO-APIC-level Intel EtherExpress Pro 10/100 Ethernet 21: 2201 0 IO-APIC-level eni NMI: 0 IPI: 0 /*******************/
which means that edge trigger interruptions are arriving to CPU #1 (which is the one I am trying to isolate). I enclose the patch for io_apic.c and smp.c that I have made, to show you what I have done... could you please explain me why I do not get to isolate CPU #1 from edge-trigger interruptions??- Thank you in advance
/***************/ diff -u -r linux-2.1.131/arch/i386/kernel/io_apic.c linux-2.1.131.patched/arch/i386/kernel/io_apic.c --- linux-2.1.131/arch/i386/kernel/io_apic.c Wed Oct 7 01:44:00 1998 +++ linux-2.1.131.patched/arch/i386/kernel/io_apic.c Thu Jan 7 12:07:19
1999 @@ -594,7 +594,7 @@ if (irq_trigger(idx)) { entry.trigger = 1; entry.mask = 1; - entry.dest.logical.logical_dest = 0xff; + entry.dest.logical.logical_dest = 0x1; /* mpadmin patch */ }
irq = pin_2_irq(idx,pin); diff -u -r linux-2.1.131/arch/i386/kernel/smp.c linux-2.1.131.patched/arch/i386/kernel/smp.c --- linux-2.1.131/arch/i386/kernel/smp.c Mon Oct 5 22:19:44 1998 +++ linux-2.1.131.patched/arch/i386/kernel/smp.c Thu Jan 7 12:07:52 1999 @@ -648,6 +648,10 @@ value &= ~(1<<9); /* Enable focus processor (bit==0) */ value |= 0xff; /* Set spurious IRQ vector to 0xff */ apic_write(APIC_SPIV,value); + + value=apic_read(APIC_LDR); + value=(value&0xffffff) | (0x2<<24); + apic_write(APIC_LDR, value);
value = apic_read(APIC_TASKPRI); value &= ~APIC_TPRI_MASK; /* Set Task Priority to 'accept all' */ @@ -983,7 +987,7 @@ void __init smp_boot_cpus(void) { int i; - unsigned long cfg; + unsigned long cfg, l;
#ifdef CONFIG_MTRR /* Must be done before other processors booted */ @@ -1078,6 +1082,10 @@ */ setup_APIC_clock ();
+ l=apic_read(APIC_LDR); + l=(l&0xffffff) | (0x1<<24); + apic_write(APIC_LDR, l); + /* * Now scan the CPU present map and fire up the other CPUs. */ @@ -1795,6 +1803,10 @@ */
ack_APIC_irq (); + + printk("LOCAL APIC for CPU hard %d, id %d: LDR=0x%x DFR=0x%x\n", + hard_smp_processor_id(), smp_processor_id(), + apic_read(APIC_LDR), apic_read(APIC_DFR));
__restore_flags(flags); } /*****************************/
Looking forward to hearing from you.
Best Regards -- .............................................................................. Elena Nistal Telefonica I+D Servicios Avanzados en Red Emilio Vargas, 6 28043 Madrid (Spain) tel.:+34 913379915 fax: +34 913374491 e-mail:enistal@tid.es http://www.tid.es
- 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/
| |