Messages in this thread | | | Date | Thu, 28 Nov 2019 17:00:26 +0000 | From | Qais Yousef <> | Subject | Re: [PATCH v2 12/14] torture: Replace cpu_up/down with device_online/offline |
| |
On 11/28/19 16:56, Qais Yousef wrote: > On 11/27/19 13:47, Paul E. McKenney wrote: > > On Mon, Nov 25, 2019 at 11:27:52AM +0000, Qais Yousef wrote: > > > The core device API performs extra housekeeping bits that are missing > > > from directly calling cpu_up/down. > > > > > > See commit a6717c01ddc2 ("powerpc/rtas: use device model APIs and > > > serialization during LPM") for an example description of what might go > > > wrong. > > > > > > This also prepares to make cpu_up/down a private interface for anything > > > but the cpu subsystem. > > > > > > Signed-off-by: Qais Yousef <qais.yousef@arm.com> > > > CC: Davidlohr Bueso <dave@stgolabs.net> > > > CC: "Paul E. McKenney" <paulmck@kernel.org> > > > CC: Josh Triplett <josh@joshtriplett.org> > > > CC: linux-kernel@vger.kernel.org > > > > Looks fine from an rcutorture viewpoint, but why not provide an API > > that pulled lock_device_hotplug() and unlock_device_hotplug() into the > > online/offline calls? > > I *think* the right way to do what you say is by doing lock_device_hotplug() > inside device_{online, offline}() - which affects all drivers not just the CPU. > > And even then, I think we need to refcount it so nested calls won't deadlock.
Forget that. I don't think nesting here makes actually any sense.
Thanks
-- Qais Yousef
| |