Thread (19 messages) 19 messages, 3 authors, 2011-09-07

Re: Broken pci_block_user_cfg_access interface

From: Jan Kiszka <jan.kiszka@siemens.com>
Date: 2011-08-29 16:26:41
Also in: linux-scsi, lkml

On 2011-08-29 18:23, Michael S. Tsirkin wrote:
On Mon, Aug 29, 2011 at 06:14:39PM +0200, Jan Kiszka wrote:
quoted
On 2011-08-29 17:58, Michael S. Tsirkin wrote:
quoted
On Mon, Aug 29, 2011 at 05:42:16PM +0200, Jan Kiszka wrote:
quoted
I still don't get what prevents converting ipr to allow plain mutex
synchronization. My vision is:
 - push reset-on-error of ipr into workqueue (or threaded IRQ?)
 - require mutex synchronization for common config space access
Meaning pci_user_ read/write config?
And pci_dev_reset, yes.
quoted
quoted
    and the
   full reset cycle
 - only exception: INTx status/masking access
    => use pci_lock + test for reset_in_progress, skip operation if
       that is the case

That would allow to drop the whole block_user_cfg infrastructure.

Jan
We still need to block userspace access while INTx does
the status/masking access, right?
Yes, pci_lock would do that for us.
Well this means block_user_cfg is not going away,
this is what it really is: pci_lock + a bit to lock out userspace.
I does as we only end up with a mutex and pci_lock. No more hand-crafted
queuing/blocking/waking.

INTx masking is a bit special as it's the only thing that truly requires
atomic context. But that's something we should address generically anyway.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help