lkml.org 
[lkml]   [2014]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch v4 14/16] x86, irq: Introduce helper to check whether an IOAPIC has been registered
On Wed, 10 Sep 2014, Jiang Liu wrote:
> On 2014/9/9 20:37, Thomas Gleixner wrote:
> >> + ret = mp_ioapic_registered(gsi_base);
> >> + up_write(&acpi_ioapic_rwsem);
> >> +
> >> + return ret;
> >> +}
> >
> > So I assume that this is for a particular caller in the apci ioapic
> > hotplug code and that call site has its own serialization. Otherwise
> > the return value is not protected at all.
> >
> > Please add a Docbook comment to that function, and document the
> > locking rules as thats pretty non obvious.
> How about this comments about locking rules?
> /*
> * Locks related to IOAPIC hotplug
> * Hotplug side:
> * ->lock_device_hotplug() //device_hotplug_lock
> * ->acpi_ioapic_rwsem
> * ->ioapic_lock
> * Interrupt mapping side:
> * ->acpi_ioapic_rwsem
> * ->ioapic_mutex
> * ->ioapic_lock
> */

That looks asymetric. Why is the hotplug side not taking ioapic_mutex?

Thanks,

tglx


\
 
 \ /
  Last update: 2014-09-10 22:41    [W:0.058 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site