perf/x86: Remove task_ctx_size
A new kmem_cache method has replaced the kzalloc() to allocate the PMU specific data. The task_ctx_size is not required anymore. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/1593780569-62993-19-git-send-email-kan.liang@linux.intel.com
This commit is contained in:

committed by
Peter Zijlstra

parent
33cad28449
commit
5a09928d33
@@ -1243,15 +1243,13 @@ static void *alloc_task_ctx_data(struct pmu *pmu)
|
||||
if (pmu->task_ctx_cache)
|
||||
return kmem_cache_zalloc(pmu->task_ctx_cache, GFP_KERNEL);
|
||||
|
||||
return kzalloc(pmu->task_ctx_size, GFP_KERNEL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void free_task_ctx_data(struct pmu *pmu, void *task_ctx_data)
|
||||
{
|
||||
if (pmu->task_ctx_cache && task_ctx_data)
|
||||
kmem_cache_free(pmu->task_ctx_cache, task_ctx_data);
|
||||
else
|
||||
kfree(task_ctx_data);
|
||||
}
|
||||
|
||||
static void free_ctx(struct rcu_head *head)
|
||||
|
Reference in New Issue
Block a user