On Sun, May 30, 2010 at 1:49 PM, Gleb Natapov <g...@redhat.com> wrote: > On Sun, May 30, 2010 at 12:56:26PM +0000, Blue Swirl wrote: >> >> Well, I'd like to get the test program also trigger it. Now I'm getting: >> >> apic: write: 00000350 = 00000000 >> >> apic: apic_reset_irq_delivered: old coalescing 0 >> >> apic: apic_local_deliver: vector 3 delivery mode 0 >> >> apic: apic_set_irq: coalescing 1 >> >> apic: apic_get_irq_delivered: returning coalescing 1 >> >> apic: apic_reset_irq_delivered: old coalescing 1 >> >> apic: apic_local_deliver: vector 3 delivery mode 0 >> >> apic: apic_set_irq: coalescing 0 >> >> apic: apic_get_irq_delivered: returning coalescing 0 >> >> apic: apic_reset_irq_delivered: old coalescing 0 >> >> apic: apic_local_deliver: vector 3 delivery mode 0 >> >> apic: apic_set_irq: coalescing 0 >> >> > So interrupt is _alway_ coalesced. If apic_get_irq_delivered() returns > 0 it means the interrupt was not delivered. > >> >> It looks like some other IRQs cause the coalescing, because also >> >> looking at RTC code, it seems it's not possible for RTC to raise the >> >> IRQ (except update IRQ, alarm etc.) without calling >> >> apic_reset_irq_delivered(). >> >> >> >> I've attached my test program. Compile: >> >> gcc -m32 -o coalescing coalescing.S -ffreestanding -nostdlib -Wl,-T >> >> coalescing.ld -g && objcopy -Obinary coalescing coalescing.bin >> >> >> >> Run: >> >> qemu -L . -bios coalescing.bin -no-hpet -rtc-td-hack >> >> >> > The application does not work for me. Looks like it fails to enter >> > protected mode. $pc jumps from 0x00000000fffffff0 to 0x00000000000f003e >> > and back. >> >> Strange. Here's a working binary. >> > Your binary works here too. What compiler are you using?
Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.3.2 (Debian 4.3.2-1.1)