On Tue, Aug 04, 2015 at 10:23:12AM +1200, Charles Manning wrote: > I am debugging an issue on the OMAP where the serial irq processing is > normally low (around 1%) but can sometimes rise to much higher (well > over 10%). > > This lead me to sniff around the locking.... > > I notice that in some drivers eg. omap-serial.c the whole interrupt > handling loop is locked via spin_lock(). > > However, other drivers such as serial-tegra.c use spin_lock_irqsave() > for a loop that pretty much has the same form. > > Why is it that they don't use the same locking strategy? What would be better? If something can be accessed from in interrupt, you have to use spin_lock_irqsave everywhere else for that same lock to properly protect the data. So it depends on the hardware implementation here, both are probably necessary because of that. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html