Skip to content

Commit

Permalink
iommu/amd: Remove IOMMUv2 pasid_state_list
Browse files Browse the repository at this point in the history
This list was only used for the task_exit notifier function.
Now that it is gone we can remove it.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Tested-by: Jay Cornwall <Jay.Cornwall@amd.com>
  • Loading branch information
Joerg Roedel committed May 26, 2014
1 parent a40d4c6 commit 9163b90
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions drivers/iommu/amd_iommu_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ struct fault {
static LIST_HEAD(state_list);
static spinlock_t state_lock;

/* List and lock for all pasid_states */
static LIST_HEAD(pasid_state_list);
static DEFINE_SPINLOCK(ps_lock);

static struct workqueue_struct *iommu_wq;

/*
Expand Down Expand Up @@ -171,25 +167,6 @@ static void put_device_state_wait(struct device_state *dev_state)
free_device_state(dev_state);
}

static void link_pasid_state(struct pasid_state *pasid_state)
{
spin_lock(&ps_lock);
list_add_tail(&pasid_state->list, &pasid_state_list);
spin_unlock(&ps_lock);
}

static void __unlink_pasid_state(struct pasid_state *pasid_state)
{
list_del(&pasid_state->list);
}

static void unlink_pasid_state(struct pasid_state *pasid_state)
{
spin_lock(&ps_lock);
__unlink_pasid_state(pasid_state);
spin_unlock(&ps_lock);
}

/* Must be called under dev_state->lock */
static struct pasid_state **__get_pasid_state_ptr(struct device_state *dev_state,
int pasid, bool alloc)
Expand Down Expand Up @@ -346,7 +323,6 @@ static void unbind_pasid(struct device_state *dev_state, int pasid)
if (pasid_state == NULL)
return;

unlink_pasid_state(pasid_state);
__unbind_pasid(pasid_state);
put_pasid_state_wait(pasid_state); /* Reference taken in this function */
}
Expand Down Expand Up @@ -689,8 +665,6 @@ int amd_iommu_bind_pasid(struct pci_dev *pdev, int pasid,
if (ret)
goto out_clear_state;

link_pasid_state(pasid_state);

return 0;

out_clear_state:
Expand Down

0 comments on commit 9163b90

Please sign in to comment.