* Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs) [not found] ` <372b353d-017d-a72c-b750-9417f6265874@amd.com> @ 2018-02-27 17:33 ` Sebastian Andrzej Siewior 2018-02-27 17:45 ` Gary R Hook 2018-02-27 18:40 ` Greg Kroah-Hartman 0 siblings, 2 replies; 5+ messages in thread From: Sebastian Andrzej Siewior @ 2018-02-27 17:33 UTC (permalink / raw) To: Gary R Hook Cc: Hook, Gary, linux-crypto, Tom Lendacky, Herbert Xu, Greg Kroah-Hartman, linux-kernel On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote: > That issue remains unclear to me: Are probes of PCI devices guaranteed to be > serialized? Observations on my CCPs says that they occur in order, but I > don't know for certain that serialization is guaranteed. > > Is there a definitive statement on this somewhere that I just don't know > about? So the question if a driver can probe two devices simultaneously. I'm not sure. We have PROBE_PREFER_ASYNCHRONOUS which defers the probe to worker. However I have no idea if two of those worker can run at the same time. > I think a mutex would be just fine; I got this wrong, clearly. Let me work > up a patch using a mutex. I've sent one. Why not just ack it and be done with it? > Gary Sebastian ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs) 2018-02-27 17:33 ` Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs) Sebastian Andrzej Siewior @ 2018-02-27 17:45 ` Gary R Hook 2018-02-27 18:40 ` Greg Kroah-Hartman 1 sibling, 0 replies; 5+ messages in thread From: Gary R Hook @ 2018-02-27 17:45 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Hook, Gary, linux-crypto, Tom Lendacky, Herbert Xu, Greg Kroah-Hartman, linux-kernel On 02/27/2018 11:33 AM, Sebastian Andrzej Siewior wrote: > On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote: >> That issue remains unclear to me: Are probes of PCI devices guaranteed to be >> serialized? Observations on my CCPs says that they occur in order, but I >> don't know for certain that serialization is guaranteed. >> >> Is there a definitive statement on this somewhere that I just don't know >> about? > > So the question if a driver can probe two devices simultaneously. I'm > not sure. We have PROBE_PREFER_ASYNCHRONOUS which defers the probe to > worker. However I have no idea if two of those worker can run at the > same time. > >> I think a mutex would be just fine; I got this wrong, clearly. Let me work >> up a patch using a mutex. > > I've sent one. Why not just ack it and be done with it? > >> Gary > > Sebastian > Sorry, too much chaos right now. Of course. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs) 2018-02-27 17:33 ` Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs) Sebastian Andrzej Siewior 2018-02-27 17:45 ` Gary R Hook @ 2018-02-27 18:40 ` Greg Kroah-Hartman 2018-02-27 19:36 ` Sebastian Andrzej Siewior 1 sibling, 1 reply; 5+ messages in thread From: Greg Kroah-Hartman @ 2018-02-27 18:40 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Gary R Hook, Hook, Gary, linux-crypto, Tom Lendacky, Herbert Xu, linux-kernel On Tue, Feb 27, 2018 at 06:33:14PM +0100, Sebastian Andrzej Siewior wrote: > On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote: > > That issue remains unclear to me: Are probes of PCI devices guaranteed to be > > serialized? Observations on my CCPs says that they occur in order, but I > > don't know for certain that serialization is guaranteed. > > > > Is there a definitive statement on this somewhere that I just don't know > > about? The bus enforces this. > So the question if a driver can probe two devices simultaneously. Depends on the bus type. thanks, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs) 2018-02-27 18:40 ` Greg Kroah-Hartman @ 2018-02-27 19:36 ` Sebastian Andrzej Siewior 2018-02-27 20:11 ` Gary R Hook 0 siblings, 1 reply; 5+ messages in thread From: Sebastian Andrzej Siewior @ 2018-02-27 19:36 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Gary R Hook, Hook, Gary, linux-crypto, Tom Lendacky, Herbert Xu, linux-kernel On 2018-02-27 19:40:34 [+0100], Greg Kroah-Hartman wrote: > On Tue, Feb 27, 2018 at 06:33:14PM +0100, Sebastian Andrzej Siewior wrote: > > On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote: > > > That issue remains unclear to me: Are probes of PCI devices guaranteed to be > > > serialized? Observations on my CCPs says that they occur in order, but I > > > don't know for certain that serialization is guaranteed. > > > > > > Is there a definitive statement on this somewhere that I just don't know > > > about? > > The bus enforces this. > > > So the question if a driver can probe two devices simultaneously. > > Depends on the bus type. PCI > thanks, > > greg k-h Sebastian ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs) 2018-02-27 19:36 ` Sebastian Andrzej Siewior @ 2018-02-27 20:11 ` Gary R Hook 0 siblings, 0 replies; 5+ messages in thread From: Gary R Hook @ 2018-02-27 20:11 UTC (permalink / raw) To: Sebastian Andrzej Siewior, Greg Kroah-Hartman Cc: Hook, Gary, linux-crypto, Tom Lendacky, Herbert Xu, linux-kernel On 02/27/2018 01:36 PM, Sebastian Andrzej Siewior wrote: > On 2018-02-27 19:40:34 [+0100], Greg Kroah-Hartman wrote: >> On Tue, Feb 27, 2018 at 06:33:14PM +0100, Sebastian Andrzej Siewior wrote: >>> On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote: >>>> That issue remains unclear to me: Are probes of PCI devices guaranteed to be >>>> serialized? Observations on my CCPs says that they occur in order, but I >>>> don't know for certain that serialization is guaranteed. >>>> >>>> Is there a definitive statement on this somewhere that I just don't know >>>> about? >> >> The bus enforces this. >> >>> So the question if a driver can probe two devices simultaneously. >> >> Depends on the bus type. > > PCI So the question is whether or not PCI enforces serial activity within a domain. The CCPs are all on different buses, so that doesn't matter. I think we don't care in this situation, given that the CCP driver has minor requirements for locking. I just found it an interesting (albeit somewhat academic) question. Thanks, Gary ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-27 20:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180223223307.18882-1-bigeasy@linutronix.de>
[not found] ` <3f0e1a62-a7ea-6d0c-d305-67080803aefd@amd.com>
[not found] ` <20180226083508.th2m3xssp36lx3zh@linutronix.de>
[not found] ` <372b353d-017d-a72c-b750-9417f6265874@amd.com>
2018-02-27 17:33 ` Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs) Sebastian Andrzej Siewior
2018-02-27 17:45 ` Gary R Hook
2018-02-27 18:40 ` Greg Kroah-Hartman
2018-02-27 19:36 ` Sebastian Andrzej Siewior
2018-02-27 20:11 ` Gary R Hook
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox