[3387] in linux-scsi channel archive
Re: Race in AHA1542 detection
daemon@ATHENA.MIT.EDU (Eric Youngdale)
Mon Feb 23 10:10:53 1998
Date: Mon, 23 Feb 1998 09:09:46 -0500 (EST)
From: Eric Youngdale <eric@andante.jic.com>
To: Keith Owens <kaos@ocs.com.au>
cc: linux-scsi@vger.rutgers.edu
In-Reply-To: <19980223125635.16146.qmail@mail.ocs.com.au>
First of all, I don't really know what the APIC patches were for.
Could someone explain this, and tell me when it went into the kernel?
Also, what does pirq=0 mean?
Nonetheless, the thing that confuses me is that the mailboxes are
set up before the interrupt handler is registered. Thus I cannot quite
see how things could get fouled up in this fashion, but until I know more
about what the APIC stuff is doing, I am flying blind.
Maybe I am reading the stuff below wrong, but it almost looks like
both processors are running the aha1542_detect() routine. If this is
true, it is almost certainly not correct.
-Eric
"The world was a library, and its books were the stones, leaves,
brooks, grass, and the birds of the earth. We learned to do what only
a student of nature ever learns, and that was to feel beauty."
Chief Luther Standing Bear - Teton Sioux
On Mon, 23 Feb 1998, Keith Owens wrote:
> 2.1.88, gcc 2.7.2.3, libc 5.4.38.
> SMP, ASUS P55T2D, dual P166, boot with pirq=0.
> AHA1542C, external box only, not powered on.
> ASUS SC-875, internal disks and CD-R.
> Small patch to scan for SC875 before 1542, I do not want the internal
> disks to change name when the external box is used.
>
> Ever since the IO-APIC patches were added to the kernel and it is
> booted with pirq=0, this message appears at boot time.
>
> aha1542.c: interrupt received, but no mail.
>
> The kernel trace below shows the 1542 interrupt being processed on cpu
> 1 while cpu 0 is still in aha1542_detect, it has not finished detected
> the card yet. The boot message seems to be harmless but I have not
> dared start any devices on the 1542, what other cli/io-apic races lurk
> in the 1542 code? Does this race need to be closed, say with a
> spinlock in the SCSI device structure?
>
> c01c1d27 setup_mailboxes +<13/e4> (6.31) cpu(0) pid(1)
> c01c1043 aha1542_out +<13/e0> (1.17) cpu(0) pid(1)
> c010cfa1 __global_save_flags +<d/40> (1.34) cpu(0) pid(1)
> c010ce23 __global_cli +<f/13c> (96.23) cpu(0) pid(1)
> c010cfe1 __global_restore_flags +<d/6c> (0.93) cpu(0) pid(1)
> c010cf5d __global_sti +<d/44> (45.28) cpu(0) pid(1)
> c010cfa1 __global_save_flags +<d/40> (1.36) cpu(0) pid(1)
> c010ce23 __global_cli +<f/13c> (2.99) cpu(0) pid(1)
> c010d5ae do_IRQ +<e/64> (2.77) cpu(1) pid(0)
> c01c250f aha1542_detect +<2a7/42c> (2.98) cpu(0) pid(1)
> c010d4ac do_ioapic_IRQ +<10/104> (2.62) cpu(1) pid(0)
> c010d700 request_irq +<10/8c> (2.67) cpu(0) pid(1)
> c0113afd ack_APIC_irq +<d/28> (52.23) cpu(1) pid(0)
> c012bd6f kmalloc_wrapper +<f/3c> (1.30) cpu(0) pid(1)
> c0128170 real_kmalloc +<10/188> (2.83) cpu(0) pid(1)
> c012bad4 alloc_addr +<10/100> (2.56) cpu(0) pid(1)
> c010d617 setup_x86_irq +<13/ec> (1.52) cpu(0) pid(1)
> c010cfa1 __global_save_flags +<d/40> (1.07) cpu(0) pid(1)
> c010ce23 __global_cli +<f/13c> (2.47) cpu(0) pid(1)
> c010c871 set_8259A_irq_mask +<d/44> (1.42) cpu(0) pid(1)
> c010c8b5 unmask_generic_irq +<d/48> (1.20) cpu(0) pid(1)
> c0113105 enable_IO_APIC_irq +<11/3c> (1.04) cpu(0) pid(1)
> c01130b5 io_apic_read +<d/24> (8.49) cpu(0) pid(1)
> c01130d9 io_apic_write +<d/28> (1.27) cpu(0) pid(1)
> c010cfe1 __global_restore_flags +<d/6c> (1.02) cpu(0) pid(1)
> c010ce23 __global_cli +<f/13c> (1.88) cpu(0) pid(1)
> c01c2551 aha1542_detect +<2e9/42c> (1.57) cpu(0) pid(1)
> c011972a request_dma +<e/50> (2.29) cpu(0) pid(1)
> c01c25a1 aha1542_detect +<339/42c> (4.72) cpu(0) pid(1)
> c01c2624 aha1542_detect +<3bc/42c> (0.87) cpu(0) pid(1)
> c010cfe1 __global_restore_flags +<d/6c> (0.95) cpu(0) pid(1)
> c010cf5d __global_sti +<d/44> (1.49) cpu(0) pid(1)
>
> **** Flags restored, cpu(0) is still in aha1542_detect and
> **** aha1542_intr_handle starts running on cpu(1).
>
> c01c262f aha1542_detect +<3c7/42c> (2.71) cpu(0) pid(1)
> c010d050 handle_IRQ_event +<10/60> (2.92) cpu(1) pid(0)
> c01c2634 aha1542_detect +<3cc/42c> (5.07) cpu(0) pid(1)
> c01c1437 aha1542_intr_handle +<13/2a8> (7.68) cpu(1) pid(0)
> c0120300 request_region +<10/8c> (6.15) cpu(0) pid(1)
> c010cfa1 __global_save_flags +<d/40> (3.10) cpu(1) pid(0)
> c0120293 find_gap +<13/70> (3.25) cpu(0) pid(1)
> c010ce23 __global_cli +<f/13c> (4.88) cpu(1) pid(0)
> c010cfa1 __global_save_flags +<d/40> (4.36) cpu(0) pid(1)
> c010cfe1 __global_restore_flags +<d/6c> (2.83) cpu(1) pid(0)
> c010ce23 __global_cli +<f/13c> (2.68) cpu(0) pid(1)
> c011ae8b printk +<13/184> (2.29) cpu(1) pid(0)
>
>