Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset ef56a43 in mainline


Ignore:
Timestamp:
2019-04-06T06:55:42Z (22 months ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
fd67c9f
Parents:
29beac8
Message:

Do not send EOI to pic1 for the first 8 IRQs

Location:
kernel
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/arch/interrupt.h

    r29beac8 ref56a43  
    8686extern void (*disable_irqs_function)(uint16_t);
    8787extern void (*enable_irqs_function)(uint16_t);
    88 extern void (*eoi_function)(void);
     88extern void (*eoi_function)(unsigned int);
    8989extern const char *irqs_info;
    9090
  • kernel/arch/amd64/src/interrupt.c

    r29beac8 ref56a43  
    6060void (*disable_irqs_function)(uint16_t irqmask) = NULL;
    6161void (*enable_irqs_function)(uint16_t irqmask) = NULL;
    62 void (*eoi_function)(void) = NULL;
     62void (*eoi_function)(unsigned int) = NULL;
    6363const char *irqs_info = NULL;
    6464
     
    9191}
    9292
    93 static void trap_virtual_eoi(void)
     93static void trap_virtual_eoi(unsigned int irq)
    9494{
    9595        if (eoi_function)
    96                 eoi_function();
     96                eoi_function(irq);
    9797        else
    9898                panic("No eoi_function.");
     
    157157static void tlb_shootdown_ipi(unsigned int n, istate_t *istate)
    158158{
    159         trap_virtual_eoi();
     159        trap_virtual_eoi(0);
    160160        tlb_shootdown_ipi_recv();
    161161}
     
    184184                if (irq->preack) {
    185185                        /* Send EOI before processing the interrupt */
    186                         trap_virtual_eoi();
     186                        trap_virtual_eoi(inum);
    187187                        ack = true;
    188188                }
     
    200200
    201201        if (!ack)
    202                 trap_virtual_eoi();
     202                trap_virtual_eoi(inum);
    203203}
    204204
  • kernel/arch/ia32/include/arch/interrupt.h

    r29beac8 ref56a43  
    9090extern void (*disable_irqs_function)(uint16_t);
    9191extern void (*enable_irqs_function)(uint16_t);
    92 extern void (*eoi_function)(void);
     92extern void (*eoi_function)(unsigned int);
    9393extern const char *irqs_info;
    9494
  • kernel/arch/ia32/include/arch/smp/apic.h

    r29beac8 ref56a43  
    356356
    357357extern void l_apic_init(void);
    358 extern void l_apic_eoi(void);
     358extern void l_apic_eoi(unsigned int);
    359359extern int l_apic_send_custom_ipi(uint8_t, uint8_t);
    360360extern int l_apic_broadcast_custom_ipi(uint8_t);
  • kernel/arch/ia32/src/interrupt.c

    r29beac8 ref56a43  
    6363void (*disable_irqs_function)(uint16_t irqmask) = NULL;
    6464void (*enable_irqs_function)(uint16_t irqmask) = NULL;
    65 void (*eoi_function)(void) = NULL;
     65void (*eoi_function)(unsigned int) = NULL;
    6666const char *irqs_info = NULL;
    6767
     
    9090}
    9191
    92 static void trap_virtual_eoi(void)
     92static void trap_virtual_eoi(unsigned int inum)
    9393{
    9494        if (eoi_function)
    95                 eoi_function();
     95                eoi_function(inum);
    9696        else
    9797                panic("No eoi_function.");
     
    179179    istate_t *istate __attribute__((unused)))
    180180{
    181         trap_virtual_eoi();
     181        trap_virtual_eoi(0);
    182182        tlb_shootdown_ipi_recv();
    183183}
     
    204204                if (irq->preack) {
    205205                        /* Send EOI before processing the interrupt */
    206                         trap_virtual_eoi();
     206                        trap_virtual_eoi(inum);
    207207                        ack = true;
    208208                }
     
    219219
    220220        if (!ack)
    221                 trap_virtual_eoi();
     221                trap_virtual_eoi(inum);
    222222}
    223223
  • kernel/arch/ia32/src/smp/apic.c

    r29beac8 ref56a43  
    508508
    509509/** Local APIC End of Interrupt. */
    510 void l_apic_eoi(void)
     510void l_apic_eoi(unsigned int ignored)
    511511{
    512512        l_apic[EOI] = 0;
  • kernel/arch/mips32/src/mach/malta/malta.c

    r29beac8 ref56a43  
    9595#endif
    9696        }
    97         pic_eoi();
     97        pic_eoi(isa_irq);
    9898}
    9999
  • kernel/genarch/include/genarch/drivers/i8259/i8259.h

    r29beac8 ref56a43  
    5555extern void pic_enable_irqs(uint16_t);
    5656extern void pic_disable_irqs(uint16_t);
    57 extern void pic_eoi(void);
     57extern void pic_eoi(unsigned int);
    5858
    5959#endif
  • kernel/genarch/src/drivers/i8259/i8259.c

    r29beac8 ref56a43  
    112112}
    113113
    114 void pic_eoi(void)
     114void pic_eoi(unsigned int irq)
    115115{
     116        if (irq >= 8)
     117                pio_write_8(&saved_pic1->port1, PIC_OCW4 | PIC_OCW4_NSEOI);
    116118        pio_write_8(&saved_pic0->port1, PIC_OCW4 | PIC_OCW4_NSEOI);
    117         pio_write_8(&saved_pic1->port1, PIC_OCW4 | PIC_OCW4_NSEOI);
    118119}
    119120
Note: See TracChangeset for help on using the changeset viewer.