• Pavel Pisa's avatar
    [PATCH] Linux 2.6.x VM86 interrupt emulation fixes · ad671423
    Pavel Pisa authored
    Patch solves VM86 interrupt emulation deadlock on SMP systems.  The VM86
    interrupt emulation has been heavily tested and works well on UP systems
    after last update, but it seems to deadlock when we have used it on SMP/HT
    boxes now.
    
    It seems, that disable_irq() cannot be called from interrupts, because it
    waits until disabled interrupt handler finishes
    (/kernel/irq/manage.c:synchronize_irq():while(IRQ_INPROGRESS);).  This
    blocks one CPU after another.  Solved by use disable_irq_nosync.
    
    There is the second problem.  If IRQ source is fast, it is possible, that
    interrupt is sometimes processed and re-enabled by the second CPU, before
    it is disabled by the first one, but negative IRQ disable depths are not
    allowed.  The spinlocking and disabling IRQs over call to
    disable_irq_nosync/enable_irq is the only solution found reliable till now.
    Signed-off-by: default avatarMichal Sojka <sojkam1@control.felk.cvut.cz>
    Signed-off-by: default avatarPavel Pisa <pisa@cmp.felk.cvut.cz>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    ad671423
vm86.c 20.9 KB