1. 19 Oct, 2011 1 commit
  2. 29 Sep, 2011 3 commits
  3. 21 Sep, 2011 5 commits
    • Konrad Rzeszutek Wilk's avatar
      xen/pciback: use mutex rather than spinlock in vpci backend · 74d33ded
      Konrad Rzeszutek Wilk authored
      Similar to the "xen/pciback: use mutex rather than spinlock in passthrough backend"
      this patch converts the vpci backend to use a mutex instead of
      a spinlock. Note that the code taking the lock won't ever get called
      from non-sleepable context
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      74d33ded
    • Konrad Rzeszutek Wilk's avatar
      xen/pciback: Use mutexes when working with Xenbus state transitions. · b1766b62
      Konrad Rzeszutek Wilk authored
      The caller that orchestrates the state changes is xenwatch_thread
      and it takes a mutex. In our processing of Xenbus states we can take
      the luxery of going to sleep on a mutex, so lets do that and
      also fix this bug:
      
      BUG: sleeping function called from invalid context at /linux/kernel/mutex.c:271
      in_atomic(): 1, irqs_disabled(): 0, pid: 32, name: xenwatch
      2 locks held by xenwatch/32:
       #0:  (xenwatch_mutex){......}, at: [<ffffffff813856ab>] xenwatch_thread+0x4b/0x180
       #1:  (&(&pdev->dev_lock)->rlock){......}, at: [<ffffffff8138f05b>] xen_pcibk_disconnect+0x1b/0x80
      Pid: 32, comm: xenwatch Not tainted 3.1.0-rc6-00015-g3ce340d #2
      Call Trace:
       [<ffffffff810892b2>] __might_sleep+0x102/0x130
       [<ffffffff8163b90f>] mutex_lock_nested+0x2f/0x50
       [<ffffffff81382c1c>] unbind_from_irq+0x2c/0x1b0
       [<ffffffff8110da66>] ? free_irq+0x56/0xb0
       [<ffffffff81382dbc>] unbind_from_irqhandler+0x1c/0x30
       [<ffffffff8138f06b>] xen_pcibk_disconnect+0x2b/0x80
       [<ffffffff81390348>] xen_pcibk_frontend_changed+0xe8/0x140
       [<ffffffff81387ac2>] xenbus_otherend_changed+0xd2/0x150
       [<ffffffff810895c1>] ? get_parent_ip+0x11/0x50
       [<ffffffff81387de0>] frontend_changed+0x10/0x20
       [<ffffffff81385712>] xenwatch_thread+0xb2/0x180
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      b1766b62
    • Jan Beulich's avatar
      xen/pciback: miscellaneous adjustments · 402c5e15
      Jan Beulich authored
      This is a minor bugfix and a set of small cleanups; as it is not clear
      whether this needs splitting into pieces (and if so, at what
      granularity), it is a single combined patch.
      - add a missing return statement to an error path in
        kill_domain_by_device()
      - use pci_is_enabled() rather than raw atomic_read()
      - remove a bogus attempt to zero-terminate an already zero-terminated
        string
      - #define DRV_NAME once uniformly in the shared local header
      - make DRIVER_ATTR() variables static
      - eliminate a pointless use of list_for_each_entry_safe()
      - add MODULE_ALIAS()
      - a little bit of constification
      - adjust a few messages
      - remove stray semicolons from inline function definitions
      Signed-off-by: default avatarJan Beulich <jbeulich@suse.com>
      [v1: Dropped the resource_size fix, altered the description]
      [v2: Fixed cleanpatch.pl comments]
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      402c5e15
    • Jan Beulich's avatar
      xen/pciback: use mutex rather than spinlock in passthrough backend · 04df3552
      Jan Beulich authored
      To accommodate the call to the callback function from
      __xen_pcibk_publish_pci_roots(), which so far dropped and the re-
      acquired the lock without checking that the list didn't actually
      change, convert the code to use a mutex instead (observing that the
      code taking the lock won't ever get called from non-sleepable
      context).
      
      As a result, drop the bogus use of list_for_each_entry_safe() and
      remove the inappropriate dropping of the lock.
      Signed-off-by: default avatarJan Beulich <jbeulich@suse.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      04df3552
    • Thomas Meyer's avatar
      xen/pciback: use resource_size() · 5fa99911
      Thomas Meyer authored
       Use resource_size function on resource object
       instead of explicit computation.
      
       The semantic patch that makes this output is available
       in scripts/coccinelle/api/resource_size.cocci.
      
       More information about semantic patching is available at
       http://coccinelle.lip6.fr/Signed-off-by: default avatarThomas Meyer <thomas@m3y3r.de>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      5fa99911
  4. 12 Sep, 2011 9 commits
  5. 11 Sep, 2011 22 commits