Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs

2018-03-02 Thread Herbert Xu
On Fri, Feb 23, 2018 at 11:33:07PM +0100, Sebastian Andrzej Siewior wrote: > I don't why we need take a single write lock and disable interrupts > while setting up debugfs. This is what what happens when we try anyway: > > |ccp :03:00.2: enabling device ( -> 0002) > |BUG: sleeping

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 Thread Gary R Hook
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

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 Thread Sebastian Andrzej Siewior
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?

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 Thread Greg Kroah-Hartman
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

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 Thread Gary R Hook
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

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 Thread Sebastian Andrzej Siewior
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

Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs

2018-02-27 Thread Gary R Hook
On 02/26/2018 02:35 AM, Sebastian Andrzej Siewior wrote: On 2018-02-25 21:04:27 [-0500], Hook, Gary wrote: On 2/23/2018 5:33 PM, Sebastian Andrzej Siewior wrote: I don't why we need take a single write lock and disable interrupts while setting up debugfs. This is what what happens when we try

Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs

2018-02-26 Thread Tom Lendacky
On 2/25/2018 8:04 PM, Hook, Gary wrote: > On 2/23/2018 5:33 PM, Sebastian Andrzej Siewior wrote: >> I don't why we need take a single write lock and disable interrupts >> while setting up debugfs. This is what what happens when we try anyway: > > There is more than one CCP on some processors. The

Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs

2018-02-26 Thread Sebastian Andrzej Siewior
On 2018-02-25 21:04:27 [-0500], Hook, Gary wrote: > On 2/23/2018 5:33 PM, Sebastian Andrzej Siewior wrote: > > I don't why we need take a single write lock and disable interrupts > > while setting up debugfs. This is what what happens when we try anyway: > > There is more than one CCP on some

Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs

2018-02-25 Thread Hook, Gary
On 2/23/2018 5:33 PM, Sebastian Andrzej Siewior wrote: I don't why we need take a single write lock and disable interrupts while setting up debugfs. This is what what happens when we try anyway: There is more than one CCP on some processors. The lock is intended to serialize attempts to

[PATCH] crypto/ccp: don't disable interrupts while setting up debugfs

2018-02-23 Thread Sebastian Andrzej Siewior
I don't why we need take a single write lock and disable interrupts while setting up debugfs. This is what what happens when we try anyway: |ccp :03:00.2: enabling device ( -> 0002) |BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:69 |in_atomic(): 1,