diff options
author | Subin K G <subin.kg@ti.com> | 2011-04-19 20:25:17 -0400 |
---|---|---|
committer | Paolo Pisati <paolo.pisati@canonical.com> | 2012-08-17 04:19:18 -0400 |
commit | 03e4442d3911661d468dec590e4813d7cb16a818 (patch) | |
tree | 7372f3f8c5aa620b086cf0eb05093a423b8b2688 /arch | |
parent | 968670f5313a355168f117f0f1a48ae8974eb1a0 (diff) |
iommu: store pid in iommu drivers private data
Store the pid of process who call the iommu open in it's private
data so at the time of release it can be used to send death notific-
ation instead of using current pid who calls the release.
Change-Id: I7008a593b19fe1cef16f82874ffd9ad1e17910a6
Signed-off-by: Subin K G <subin.kg@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-omap/dmm_user.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/dmm_user.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/dmm_user.c b/arch/arm/plat-omap/dmm_user.c index da4f41579c2..c099e038e1b 100644 --- a/arch/arm/plat-omap/dmm_user.c +++ b/arch/arm/plat-omap/dmm_user.c | |||
@@ -111,6 +111,7 @@ static int omap_dmm_open(struct inode *inode, struct file *filp) | |||
111 | INIT_LIST_HEAD(&iodmm->map_list); | 111 | INIT_LIST_HEAD(&iodmm->map_list); |
112 | 112 | ||
113 | iodmm->iovmm = obj; | 113 | iodmm->iovmm = obj; |
114 | iodmm->tgid = current->tgid; | ||
114 | obj->iommu = iommu_get(obj->name); | 115 | obj->iommu = iommu_get(obj->name); |
115 | filp->private_data = iodmm; | 116 | filp->private_data = iodmm; |
116 | 117 | ||
@@ -139,7 +140,7 @@ static int omap_dmm_release(struct inode *inode, struct file *filp) | |||
139 | */ | 140 | */ |
140 | if (!list_empty(&obj->map_list)) { | 141 | if (!list_empty(&obj->map_list)) { |
141 | iommu_notify_event(obj->iovmm->iommu, IOMMU_CLOSE, | 142 | iommu_notify_event(obj->iovmm->iommu, IOMMU_CLOSE, |
142 | NULL); | 143 | (void *)obj->tgid); |
143 | } | 144 | } |
144 | mutex_unlock(&obj->iovmm->dmm_map_lock); | 145 | mutex_unlock(&obj->iovmm->dmm_map_lock); |
145 | } else { | 146 | } else { |
diff --git a/arch/arm/plat-omap/include/plat/dmm_user.h b/arch/arm/plat-omap/include/plat/dmm_user.h index c231314810e..84a72f33d9f 100644 --- a/arch/arm/plat-omap/include/plat/dmm_user.h +++ b/arch/arm/plat-omap/include/plat/dmm_user.h | |||
@@ -89,6 +89,7 @@ struct iodmm_struct { | |||
89 | struct iovmm_device *iovmm; | 89 | struct iovmm_device *iovmm; |
90 | struct list_head map_list; | 90 | struct list_head map_list; |
91 | u32 pool_id; | 91 | u32 pool_id; |
92 | pid_t tgid; | ||
92 | }; | 93 | }; |
93 | 94 | ||
94 | struct iovmm_device { | 95 | struct iovmm_device { |