>-----Original Message-----
>From: [email protected]
[mailto:linux-kernel-commits-
>[email protected]] On Behalf Of Mike Frysinger
>Sent: Friday, October 16, 2009 4:00 PM
>To: Zhang, Sonic
>Cc: [email protected];
[email protected]
>Subject: Re: [Linux-kernel-commits]
[7660]trunk/drivers/i2c/busses/i2c-bfin-twi.c: Fix bug[#5275]
>Cleari2c int state earlier and loop till no ints left
>
>On Fri, Oct 16, 2009 at 05:02, Zhang, Sonic wrote:
>> Write to XMT_DATA8 register should be done after INT_STAT is cleared.
>> So, as least one sync before XMIT_DATA8 is necessary.
>> I will do a bit clean up.
>>
>> Yes, a SSYNC_ATOMIC() macro is better for interrupt routine usage.
>
>Michael pointed out something not so obvious (at least to me) ...
>higher priority interrupts can still interrupt things, so
>SSYNC_ATOMIC() would only be usable if the irq handler were registered
>w/IRQF_DISABLED.  and people really hate when you use that flag.
>-mike

Besides that - you should also keep in mind that Linux uses DELAYED
DISABLE.
This means if you disable an IRQ - it's not disabled until it actually
triggered.
They use this concept, because interrupt enable/disable can take quite
long on some architecture.

-Michael 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to