From 1525ed2b1b74abbe04db14ff89ce2fae44a64be7 Mon Sep 17 00:00:00 2001 From: Jayaprakash Madisetty Date: Wed, 23 Mar 2022 15:36:45 +0530 Subject: [PATCH] disp: msm: use vzalloc for large allocations Large allocations using kzalloc can lead to timeouts. This updates the allocation calls accordingly to use vzalloc to remove requirements on contiguous memory. Change-Id: Ica54483787509ed0e9283289fc9d523e8cde9238 Signed-off-by: Nilaan Gunabalachandran Signed-off-by: Jayaprakash Madisetty --- techpack/display/msm/sde_dbg_evtlog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/techpack/display/msm/sde_dbg_evtlog.c b/techpack/display/msm/sde_dbg_evtlog.c index f62aaf4ad151..59c8440e413d 100644 --- a/techpack/display/msm/sde_dbg_evtlog.c +++ b/techpack/display/msm/sde_dbg_evtlog.c @@ -220,7 +220,7 @@ struct sde_dbg_evtlog *sde_evtlog_init(void) { struct sde_dbg_evtlog *evtlog; - evtlog = kzalloc(sizeof(*evtlog), GFP_KERNEL); + evtlog = vzalloc(sizeof(*evtlog)); if (!evtlog) return ERR_PTR(-ENOMEM); @@ -240,7 +240,7 @@ struct sde_dbg_reglog *sde_reglog_init(void) { struct sde_dbg_reglog *reglog; - reglog = kzalloc(sizeof(*reglog), GFP_KERNEL); + reglog = vzalloc(sizeof(*reglog)); if (!reglog) return ERR_PTR(-ENOMEM); @@ -351,7 +351,7 @@ void sde_evtlog_destroy(struct sde_dbg_evtlog *evtlog) list_del(&filter_node->list); kfree(filter_node); } - kfree(evtlog); + vfree(evtlog); } void sde_reglog_destroy(struct sde_dbg_reglog *reglog) @@ -359,5 +359,5 @@ void sde_reglog_destroy(struct sde_dbg_reglog *reglog) if (!reglog) return; - kfree(reglog); + vfree(reglog); }