*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
static int kbasep_mem_profile_seq_show(struct seq_file *sfile, void *data)
{
struct kbase_context *kctx = sfile->private;
static int kbasep_mem_profile_seq_show(struct seq_file *sfile, void *data)
{
struct kbase_context *kctx = sfile->private;
mutex_lock(&kctx->mem_profile_lock);
dev_dbg(kctx->kbdev->dev, "initialised: %d",
mutex_lock(&kctx->mem_profile_lock);
dev_dbg(kctx->kbdev->dev, "initialised: %d",
if (!debugfs_create_file("mem_profile", S_IRUGO,
kctx->kctx_dentry, kctx,
&kbasep_mem_profile_debugfs_fops)) {
err = -EAGAIN;
} else {
if (!debugfs_create_file("mem_profile", S_IRUGO,
kctx->kctx_dentry, kctx,
&kbasep_mem_profile_debugfs_fops)) {
err = -EAGAIN;
} else {
kfree(kctx->mem_profile_data);
kctx->mem_profile_data = data;
kctx->mem_profile_size = size;
}
dev_dbg(kctx->kbdev->dev, "returning: %d, initialised: %d",
kfree(kctx->mem_profile_data);
kctx->mem_profile_data = data;
kctx->mem_profile_size = size;
}
dev_dbg(kctx->kbdev->dev, "returning: %d, initialised: %d",
mutex_lock(&kctx->mem_profile_lock);
dev_dbg(kctx->kbdev->dev, "initialised: %d",
mutex_lock(&kctx->mem_profile_lock);
dev_dbg(kctx->kbdev->dev, "initialised: %d",