From 90125c44ec3971840058a4d8792fab14b23976df Mon Sep 17 00:00:00 2001 From: Juhyung Park Date: Sat, 23 Sep 2023 03:25:35 +0900 Subject: [PATCH] msm: ipa3: always initialize struct ipahal_imm_cmd_register_write This fixes the following log flood: [ 23.222245] ------------[ cut here ]------------ [ 23.222247] WARNING: CPU: 5 PID: 1592 at techpack/dataipa/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c:317 ipa_imm_cmd_construct_register_write_v_4_0+0x120/0x1a8 [ 23.222248] CPU: 5 PID: 1592 Comm: kworker/u17:3 Tainted: G S W 5.10.186-arter97-r0-ga828ac1296ff #4 [ 23.222249] Hardware name: Qualcomm Technologies, Inc. Cape QRD with PM8010 (DT) [ 23.222250] Workqueue: ipa_power_mgmt ipa3_start_tag_process [ 23.222252] pstate: 22c00005 (nzCv daif +PAN +UAO +TCO BTYPE=--) [ 23.222253] pc : ipa_imm_cmd_construct_register_write_v_4_0+0x120/0x1a8 [ 23.222254] lr : ipa_imm_cmd_construct_register_write_v_4_0+0x118/0x1a8 [ 23.222255] sp : ffffff804ee4fc50 [ 23.222256] x29: ffffff804ee4fc50 x28: 0000000000000006 [ 23.222258] x27: 000000000000c5ba x26: ffffffefd72c3000 [ 23.222260] x25: ffffff8991de0208 x24: ffffff899a080800 [ 23.222262] x23: 0000000000000024 x22: 0000000000000021 [ 23.222264] x21: 0000000000000007 x20: ffffff804ee4fcc0 [ 23.222265] x19: ffffff899a080980 x18: ffffffffffffffff [ 23.222267] x17: 0000000000000000 x16: 00000000000000e8 [ 23.222269] x15: 0000000000000004 x14: ffffffefd6542340 [ 23.222271] x13: 000000000000ffff x12: 0000000000000003 [ 23.222273] x11: 00000000fffeffff x10: 00000000ffffffff [ 23.222275] x9 : 0000000000008300 x8 : ffffff8044040000 [ 23.222276] x7 : 5f6d6d695f617069 x6 : ffffffefd709db78 [ 23.222278] x5 : 0000000000000061 x4 : 0000000000000001 [ 23.222280] x3 : 0000000000000000 x2 : 0000000000000000 [ 23.222282] x1 : ffffffefd5b95dfa x0 : 0000000000000000 [ 23.222284] Call trace: [ 23.222286] ipa_imm_cmd_construct_register_write_v_4_0+0x120/0x1a8 [ 23.222287] ipahal_construct_imm_cmd+0xa0/0x158 [ 23.222289] ipa3_tag_generate_force_close_desc+0x80/0x204 [ 23.222291] ipa3_tag_aggr_force_close+0x64/0x12c [ 23.222292] ipa3_start_tag_process+0x14/0x54 [ 23.222293] process_one_work+0x1b8/0x458 [ 23.222295] worker_thread+0x2fc/0x77c [ 23.222296] kthread+0x138/0x2cc [ 23.222298] ret_from_fork+0x10/0x30 [ 23.222299] ---[ end trace bfe9f2f17049b046 ]--- Signed-off-by: Juhyung Park Signed-off-by: onettboots --- drivers/platform/msm/ipa/ipa_v3/ipa.c | 12 ++++++------ drivers/platform/msm/ipa/ipa_v3/ipa_flt.c | 2 +- drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c | 2 +- drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c | 2 +- drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c | 2 +- drivers/platform/msm/ipa/ipa_v3/ipa_nat.c | 6 +++--- drivers/platform/msm/ipa/ipa_v3/ipa_rt.c | 2 +- drivers/platform/msm/ipa/ipa_v3/ipa_utils.c | 4 ++-- drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa.c b/drivers/platform/msm/ipa/ipa_v3/ipa.c index 6b2bceeca64a..e2da69cf65da 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa.c @@ -3565,7 +3565,7 @@ static int ipa3_q6_clean_q6_flt_tbls(enum ipa_ip_type ip, u32 lcl_hdr_sz; struct ipa_mem_buffer mem; struct ipahal_reg_valmask valmask; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; int i; IPADBG("Entry\n"); @@ -3718,7 +3718,7 @@ static int ipa3_q6_clean_q6_rt_tbls(enum ipa_ip_type ip, u32 lcl_hdr_sz; struct ipa_mem_buffer mem; struct ipahal_reg_valmask valmask; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; int i; IPADBG("Entry\n"); @@ -3846,7 +3846,7 @@ static int ipa3_q6_clean_q6_tables(void) int num_cmds = 0; struct ipahal_reg_fltrt_hash_flush flush; struct ipahal_reg_valmask valmask; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; int i; IPADBG("Entry\n"); @@ -3969,11 +3969,11 @@ static int ipa3_q6_set_ex_path_to_apps(void) struct ipa3_desc *desc; int num_descs = 0; int index; - struct ipahal_imm_cmd_register_write reg_write; + struct ipahal_imm_cmd_register_write reg_write = { 0 }; struct ipahal_imm_cmd_pyld *cmd_pyld; int retval; struct ipahal_reg_valmask valmask; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; int i; desc = kcalloc(ipa3_ctx->ipa_num_pipes + 1, sizeof(struct ipa3_desc), @@ -4357,7 +4357,7 @@ int _ipa_init_hdr_v3_0(void) struct ipahal_imm_cmd_pyld *cmd_pyld[2]; struct ipahal_imm_cmd_dma_shared_mem dma_cmd = { 0 }; struct ipahal_reg_valmask valmask; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; int num_cmds = 0; int i; diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_flt.c b/drivers/platform/msm/ipa/ipa_v3/ipa_flt.c index 549fea8461bd..d8fbc1ea94b1 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_flt.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_flt.c @@ -501,7 +501,7 @@ int __ipa_commit_flt_v3(enum ipa_ip_type ip) u32 tbl_hdr_width; struct ipa3_flt_tbl *tbl; u16 entries; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; tbl_hdr_width = ipahal_get_hw_tbl_hdr_width(); memset(&alloc_params, 0, sizeof(alloc_params)); diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c b/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c index 71143d212235..77b02a6fb929 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c @@ -194,7 +194,7 @@ int __ipa_commit_hdr_v3_0(void) u32 proc_ctx_size; u32 proc_ctx_ofst; u32 proc_ctx_size_ddr; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; struct ipahal_reg_valmask valmask; memset(desc, 0, 3 * sizeof(struct ipa3_desc)); diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c b/drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c index 7af59e1a0fa8..e9a29ef8aac3 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c @@ -138,7 +138,7 @@ static void ipa_close_coal_frame(struct ipahal_imm_cmd_pyld **coal_cmd_pyld) { int i; struct ipahal_reg_valmask valmask; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; i = ipa3_get_ep_mapping(IPA_CLIENT_APPS_WAN_COAL_CONS); reg_write_coal_close.skip_pipeline_clear = false; diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c b/drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c index 571c5140dd81..47498e36a351 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c @@ -483,7 +483,7 @@ static int ipa_mpm_set_dma_mode(enum ipa_client_type src_pipe, enum ipa_client_type dst_pipe, bool reset) { struct ipahal_imm_cmd_pyld *cmd_pyld[IPA_MPM_NUM_OF_INIT_CMD_DESC]; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; struct ipahal_reg_valmask valmask; struct ipa3_desc desc[IPA_MPM_NUM_OF_INIT_CMD_DESC]; int i, num_cmd = 0, result = 0; diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_nat.c b/drivers/platform/msm/ipa/ipa_v3/ipa_nat.c index 627593c258c7..889a83a0e0e4 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_nat.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_nat.c @@ -1211,7 +1211,7 @@ static int ipa3_nat_send_init_cmd(struct ipahal_imm_cmd_ip_v4_nat_init *cmd, struct ipahal_imm_cmd_pyld *cmd_pyld[IPA_NAT_MAX_NUM_OF_INIT_CMD_DESC]; int i, num_cmd = 0, result; struct ipahal_reg_valmask valmask; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; IPADBG("\n"); @@ -1314,7 +1314,7 @@ static int ipa3_ipv6ct_send_init_cmd(struct ipahal_imm_cmd_ip_v6_ct_init *cmd) *cmd_pyld[IPA_IPV6CT_MAX_NUM_OF_INIT_CMD_DESC]; int i, num_cmd = 0, result; struct ipahal_reg_valmask valmask; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; IPADBG("\n"); @@ -1940,7 +1940,7 @@ int ipa3_table_dma_cmd( int result = 0; int i; struct ipahal_reg_valmask valmask; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; int max_dma_table_cmds = IPA_MAX_NUM_OF_TABLE_DMA_CMD_DESC; IPADBG("In\n"); diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c b/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c index d3266eba3177..3dbde82396a2 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c @@ -486,7 +486,7 @@ int __ipa_commit_rt_v3(enum ipa_ip_type ip) struct ipa3_rt_tbl_set *set; struct ipa3_rt_tbl *tbl; u32 tbl_hdr_width; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; tbl_hdr_width = ipahal_get_hw_tbl_hdr_width(); memset(desc, 0, sizeof(desc)); diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c index 8cec6306521a..0f43a27c7af5 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c @@ -6740,7 +6740,7 @@ int ipa3_tag_process(struct ipa3_desc desc[], int ep_idx; u32 retry_cnt = 0; struct ipahal_reg_valmask valmask; - struct ipahal_imm_cmd_register_write reg_write_coal_close; + struct ipahal_imm_cmd_register_write reg_write_coal_close = { 0 }; int req_num_tag_desc = REQUIRED_TAG_PROCESS_DESCRIPTORS; /** @@ -6971,7 +6971,7 @@ static int ipa3_tag_generate_force_close_desc(struct ipa3_desc desc[], struct ipa_ep_cfg_aggr ep_aggr; int desc_idx = 0; int res; - struct ipahal_imm_cmd_register_write reg_write_agg_close; + struct ipahal_imm_cmd_register_write reg_write_agg_close = {0}; struct ipahal_imm_cmd_pyld *cmd_pyld; struct ipahal_reg_valmask valmask; diff --git a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c index 4d261f862d97..fb2879813d33 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c @@ -848,7 +848,7 @@ struct ipahal_imm_cmd_pyld *ipahal_construct_nop_imm_cmd( enum ipahal_pipeline_clear_option pipline_clr_opt, bool is_atomic_ctx) { - struct ipahal_imm_cmd_register_write cmd; + struct ipahal_imm_cmd_register_write cmd = { 0 }; struct ipahal_imm_cmd_pyld *cmd_pyld; memset(&cmd, 0, sizeof(cmd));