Skip to content

Commit

Permalink
msm: ipa3: always initialize struct ipahal_imm_cmd_register_write
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: onettboots <[email protected]>
  • Loading branch information
arter97 authored and onettboots committed Jan 6, 2024
1 parent 51f1ff9 commit af511ee
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions drivers/platform/msm/ipa/ipa_v3/ipa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/msm/ipa/ipa_v3/ipa_flt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions drivers/platform/msm/ipa/ipa_v3/ipa_nat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/msm/ipa/ipa_v3/ipa_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit af511ee

Please sign in to comment.