summaryrefslogtreecommitdiff
path: root/mali_kbase/context
diff options
context:
space:
mode:
authorJonglin Lee <jonglin@google.com>2021-07-21 19:45:57 +0000
committerJonglin Lee <jonglin@google.com>2021-07-21 19:45:57 +0000
commit9e6d1d7e88bae9f4be2ffbb20c9ac4655296c5d6 (patch)
treee51c0d47a79fe4f893564c242de494029e49e71f /mali_kbase/context
parent82f54be6e8081ecd34c36aa39b014c1a2484a462 (diff)
downloadgpu-9e6d1d7e88bae9f4be2ffbb20c9ac4655296c5d6.tar.gz
Revert "mali_kbase: platform: Add per-process and global sysfs n..."
Revert submission 1960415-dma-buf-sysfs Reason for revert: causing kbase KPs Reverted Changes: Ib1400afdb:mali_kbase: platform: Add sysfs nodes for imported... Id47feadaf:mali_kbase: platform: Add per-process and global s... I29da69e46:mali_kbase: platform: Add per-process and global a... Bug: 194313269 Change-Id: Ie601280db20e41ab01884552785feb9b0ac260a6 Signed-off-by: Jonglin Lee <jonglin@google.com>
Diffstat (limited to 'mali_kbase/context')
-rw-r--r--mali_kbase/context/mali_kbase_context.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/mali_kbase/context/mali_kbase_context.c b/mali_kbase/context/mali_kbase_context.c
index 3779b37..914f43e 100644
--- a/mali_kbase/context/mali_kbase_context.c
+++ b/mali_kbase/context/mali_kbase_context.c
@@ -32,48 +32,6 @@
#include <mmu/mali_kbase_mmu.h>
#include <context/mali_kbase_context_internal.h>
-#define to_kprcs(kobj) container_of(kobj, struct kbase_process, kobj)
-
-static void kbase_kprcs_release(struct kobject *kobj)
-{
- // Nothing to release
-}
-
-static ssize_t total_gpu_mem_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
-{
- struct kbase_process *kprcs = to_kprcs(kobj);
- if (WARN_ON(!kprcs))
- return 0;
-
- return sysfs_emit(buf, "%lu\n",
- (unsigned long) kprcs->total_gpu_pages << PAGE_SHIFT);
-}
-static struct kobj_attribute total_gpu_mem_attr = __ATTR_RO(total_gpu_mem);
-
-static ssize_t dma_buf_gpu_mem_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
-{
- struct kbase_process *kprcs = to_kprcs(kobj);
- if (WARN_ON(!kprcs))
- return 0;
-
- return sysfs_emit(buf, "%lu\n",
- (unsigned long) kprcs->dma_buf_pages << PAGE_SHIFT);
-}
-static struct kobj_attribute dma_buf_gpu_mem_attr = __ATTR_RO(dma_buf_gpu_mem);
-
-static struct attribute *kprcs_attrs[] = {
- &total_gpu_mem_attr.attr,
- &dma_buf_gpu_mem_attr.attr,
- NULL
-};
-ATTRIBUTE_GROUPS(kprcs);
-
-static struct kobj_type kprcs_ktype = {
- .release = kbase_kprcs_release,
- .sysfs_ops = &kobj_sysfs_ops,
- .default_groups = kprcs_groups,
-};
-
/**
* find_process_node - Used to traverse the process rb_tree to find if
* process exists already in process rb_tree.
@@ -142,10 +100,6 @@ static int kbase_insert_kctx_to_process(struct kbase_context *kctx)
kprcs->dma_buf_root = RB_ROOT;
kprcs->total_gpu_pages = 0;
kprcs->dma_buf_pages = 0;
- WARN_ON(kobject_init_and_add(
- &kprcs->kobj, &kprcs_ktype,
- kctx->kbdev->proc_sysfs_node,
- "%d", tgid));
while (*new) {
struct kbase_process *prcs_node;
@@ -284,8 +238,6 @@ static void kbase_remove_kctx_from_process(struct kbase_context *kctx)
*/
WARN_ON(kprcs->total_gpu_pages);
WARN_ON(!RB_EMPTY_ROOT(&kprcs->dma_buf_root));
- kobject_del(&kprcs->kobj);
- kobject_put(&kprcs->kobj);
kfree(kprcs);
}
}