[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54114CA4.9030503@linux.intel.com>
Date: Thu, 11 Sep 2014 15:17:56 +0800
From: Jiang Liu <jiang.liu@...ux.intel.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Randy Dunlap <rdunlap@...radead.org>,
Yinghai Lu <yinghai@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Grant Likely <grant.likely@...aro.org>, x86@...nel.org,
Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
Prarit Bhargava <prarit@...hat.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Tony Luck <tony.luck@...el.com>,
Joerg Roedel <joro@...tes.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
linux-acpi@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
linux-pm@...r.kernel.org
Subject: Re: [Patch v4 14/16] x86, irq: Introduce helper to check whether
an IOAPIC has been registered
On 2014/9/11 4:08, Thomas Gleixner wrote:
> 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?
Hi Thomas,
We decide to protect system from IOAPIC hotplug in the ACPI
layer. For ACPI enumerated IOAPICs, ioapic_mutex is redundant and
it's used to protect MPPARSE, SFI, OF enumerated IOAPICs.
Regards!
Gerry
>
> Thanks,
>
> tglx
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists