Loading drivers/platform/msm/ipa/ipa_v3/ipa.c +6 −6 Original line number Diff line number Diff line Loading @@ -1935,7 +1935,7 @@ static int ipa3_q6_clean_q6_flt_tbls(enum ipa_ip_type ip, } retval = ipahal_flt_generate_empty_img(1, lcl_hdr_sz, lcl_hdr_sz, 0, &mem); 0, &mem, true); if (retval) { IPAERR("failed to generate flt single tbl empty img\n"); goto free_cmd_pyld; Loading Loading @@ -2042,7 +2042,7 @@ static int ipa3_q6_clean_q6_rt_tbls(enum ipa_ip_type ip, retval = ipahal_rt_generate_empty_img( modem_rt_index_hi - modem_rt_index_lo + 1, lcl_hdr_sz, lcl_hdr_sz, &mem); lcl_hdr_sz, lcl_hdr_sz, &mem, true); if (retval) { IPAERR("fail generate empty rt img\n"); return -ENOMEM; Loading Loading @@ -2514,7 +2514,7 @@ int _ipa_init_rt4_v3(void) rc = ipahal_rt_generate_empty_img(IPA_MEM_PART(v4_rt_num_index), IPA_MEM_PART(v4_rt_hash_size), IPA_MEM_PART(v4_rt_nhash_size), &mem); &mem, false); if (rc) { IPAERR("fail generate empty v4 rt img\n"); return rc; Loading Loading @@ -2581,7 +2581,7 @@ int _ipa_init_rt6_v3(void) rc = ipahal_rt_generate_empty_img(IPA_MEM_PART(v6_rt_num_index), IPA_MEM_PART(v6_rt_hash_size), IPA_MEM_PART(v6_rt_nhash_size), &mem); &mem, false); if (rc) { IPAERR("fail generate empty v6 rt img\n"); return rc; Loading Loading @@ -2642,7 +2642,7 @@ int _ipa_init_flt4_v3(void) rc = ipahal_flt_generate_empty_img(ipa3_ctx->ep_flt_num, IPA_MEM_PART(v4_flt_hash_size), IPA_MEM_PART(v4_flt_nhash_size), ipa3_ctx->ep_flt_bitmap, &mem); &mem, false); if (rc) { IPAERR("fail generate empty v4 flt img\n"); return rc; Loading Loading @@ -2702,7 +2702,7 @@ int _ipa_init_flt6_v3(void) rc = ipahal_flt_generate_empty_img(ipa3_ctx->ep_flt_num, IPA_MEM_PART(v6_flt_hash_size), IPA_MEM_PART(v6_flt_nhash_size), ipa3_ctx->ep_flt_bitmap, &mem); &mem, false); if (rc) { IPAERR("fail generate empty v6 flt img\n"); return rc; Loading drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c +12 −5 Original line number Diff line number Diff line /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -2553,16 +2553,19 @@ u32 ipahal_get_low_rule_id(void) * @hash_hdr_size: SRAM buf size of the hash tbls hdr. Used for space check * @nhash_hdr_size: SRAM buf size of the nhash tbls hdr. Used for space check * @mem: mem object that points to DMA mem representing the hdr structure * @atomic: should DMA allocation be executed with atomic flag */ int ipahal_rt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, u32 nhash_hdr_size, struct ipa_mem_buffer *mem) u32 nhash_hdr_size, struct ipa_mem_buffer *mem, bool atomic) { int i; u64 addr; struct ipahal_fltrt_obj *obj; int flag; IPAHAL_DBG("Entry\n"); flag = atomic ? GFP_ATOMIC : GFP_KERNEL; obj = &ipahal_fltrt_objs[ipahal_ctx->hw_type]; if (!tbls_num || !nhash_hdr_size || !mem) { Loading @@ -2589,7 +2592,7 @@ int ipahal_rt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, mem->size = tbls_num * obj->tbl_hdr_width; mem->base = dma_alloc_coherent(ipahal_ctx->ipa_pdev, mem->size, &mem->phys_base, GFP_KERNEL); &mem->phys_base, flag); if (!mem->base) { IPAHAL_ERR("fail to alloc DMA buff of size %d\n", mem->size); return -ENOMEM; Loading @@ -2615,18 +2618,22 @@ int ipahal_rt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, * should be: bit0->EP0, bit1->EP1 * If bitmap is zero -> create tbl without bitmap entry * @mem: mem object that points to DMA mem representing the hdr structure * @atomic: should DMA allocation be executed with atomic flag */ int ipahal_flt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, u32 nhash_hdr_size, u64 ep_bitmap, struct ipa_mem_buffer *mem) u32 nhash_hdr_size, u64 ep_bitmap, struct ipa_mem_buffer *mem, bool atomic) { int flt_spc; u64 flt_bitmap; int i; u64 addr; struct ipahal_fltrt_obj *obj; int flag; IPAHAL_DBG("Entry - ep_bitmap 0x%llx\n", ep_bitmap); flag = atomic ? GFP_ATOMIC : GFP_KERNEL; obj = &ipahal_fltrt_objs[ipahal_ctx->hw_type]; if (!tbls_num || !nhash_hdr_size || !mem) { Loading Loading @@ -2667,7 +2674,7 @@ int ipahal_flt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, if (ep_bitmap) mem->size += obj->tbl_hdr_width; mem->base = dma_alloc_coherent(ipahal_ctx->ipa_pdev, mem->size, &mem->phys_base, GFP_KERNEL); &mem->phys_base, flag); if (!mem->base) { IPAHAL_ERR("fail to alloc DMA buff of size %d\n", mem->size); return -ENOMEM; Loading drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.h +6 −3 Original line number Diff line number Diff line /* Copyright (c) 2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -171,9 +171,10 @@ u32 ipahal_get_low_rule_id(void); * @hash_hdr_size: SRAM buf size of the hash tbls hdr. Used for space check * @nhash_hdr_size: SRAM buf size of the nhash tbls hdr. Used for space check * @mem: mem object that points to DMA mem representing the hdr structure * @atomic: should DMA allocation be executed with atomic flag */ int ipahal_rt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, u32 nhash_hdr_size, struct ipa_mem_buffer *mem); u32 nhash_hdr_size, struct ipa_mem_buffer *mem, bool atomic); /* * ipahal_flt_generate_empty_img() - Generate empty filter image Loading @@ -185,9 +186,11 @@ int ipahal_rt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, * @ep_bitmap: Bitmap representing the EP that has flt tables. The format * should be: bit0->EP0, bit1->EP1 * @mem: mem object that points to DMA mem representing the hdr structure * @atomic: should DMA allocation be executed with atomic flag */ int ipahal_flt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, u32 nhash_hdr_size, u64 ep_bitmap, struct ipa_mem_buffer *mem); u32 nhash_hdr_size, u64 ep_bitmap, struct ipa_mem_buffer *mem, bool atomic); /* * ipahal_fltrt_allocate_hw_tbl_imgs() - Allocate tbl images DMA structures Loading Loading
drivers/platform/msm/ipa/ipa_v3/ipa.c +6 −6 Original line number Diff line number Diff line Loading @@ -1935,7 +1935,7 @@ static int ipa3_q6_clean_q6_flt_tbls(enum ipa_ip_type ip, } retval = ipahal_flt_generate_empty_img(1, lcl_hdr_sz, lcl_hdr_sz, 0, &mem); 0, &mem, true); if (retval) { IPAERR("failed to generate flt single tbl empty img\n"); goto free_cmd_pyld; Loading Loading @@ -2042,7 +2042,7 @@ static int ipa3_q6_clean_q6_rt_tbls(enum ipa_ip_type ip, retval = ipahal_rt_generate_empty_img( modem_rt_index_hi - modem_rt_index_lo + 1, lcl_hdr_sz, lcl_hdr_sz, &mem); lcl_hdr_sz, lcl_hdr_sz, &mem, true); if (retval) { IPAERR("fail generate empty rt img\n"); return -ENOMEM; Loading Loading @@ -2514,7 +2514,7 @@ int _ipa_init_rt4_v3(void) rc = ipahal_rt_generate_empty_img(IPA_MEM_PART(v4_rt_num_index), IPA_MEM_PART(v4_rt_hash_size), IPA_MEM_PART(v4_rt_nhash_size), &mem); &mem, false); if (rc) { IPAERR("fail generate empty v4 rt img\n"); return rc; Loading Loading @@ -2581,7 +2581,7 @@ int _ipa_init_rt6_v3(void) rc = ipahal_rt_generate_empty_img(IPA_MEM_PART(v6_rt_num_index), IPA_MEM_PART(v6_rt_hash_size), IPA_MEM_PART(v6_rt_nhash_size), &mem); &mem, false); if (rc) { IPAERR("fail generate empty v6 rt img\n"); return rc; Loading Loading @@ -2642,7 +2642,7 @@ int _ipa_init_flt4_v3(void) rc = ipahal_flt_generate_empty_img(ipa3_ctx->ep_flt_num, IPA_MEM_PART(v4_flt_hash_size), IPA_MEM_PART(v4_flt_nhash_size), ipa3_ctx->ep_flt_bitmap, &mem); &mem, false); if (rc) { IPAERR("fail generate empty v4 flt img\n"); return rc; Loading Loading @@ -2702,7 +2702,7 @@ int _ipa_init_flt6_v3(void) rc = ipahal_flt_generate_empty_img(ipa3_ctx->ep_flt_num, IPA_MEM_PART(v6_flt_hash_size), IPA_MEM_PART(v6_flt_nhash_size), ipa3_ctx->ep_flt_bitmap, &mem); &mem, false); if (rc) { IPAERR("fail generate empty v6 flt img\n"); return rc; Loading
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c +12 −5 Original line number Diff line number Diff line /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -2553,16 +2553,19 @@ u32 ipahal_get_low_rule_id(void) * @hash_hdr_size: SRAM buf size of the hash tbls hdr. Used for space check * @nhash_hdr_size: SRAM buf size of the nhash tbls hdr. Used for space check * @mem: mem object that points to DMA mem representing the hdr structure * @atomic: should DMA allocation be executed with atomic flag */ int ipahal_rt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, u32 nhash_hdr_size, struct ipa_mem_buffer *mem) u32 nhash_hdr_size, struct ipa_mem_buffer *mem, bool atomic) { int i; u64 addr; struct ipahal_fltrt_obj *obj; int flag; IPAHAL_DBG("Entry\n"); flag = atomic ? GFP_ATOMIC : GFP_KERNEL; obj = &ipahal_fltrt_objs[ipahal_ctx->hw_type]; if (!tbls_num || !nhash_hdr_size || !mem) { Loading @@ -2589,7 +2592,7 @@ int ipahal_rt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, mem->size = tbls_num * obj->tbl_hdr_width; mem->base = dma_alloc_coherent(ipahal_ctx->ipa_pdev, mem->size, &mem->phys_base, GFP_KERNEL); &mem->phys_base, flag); if (!mem->base) { IPAHAL_ERR("fail to alloc DMA buff of size %d\n", mem->size); return -ENOMEM; Loading @@ -2615,18 +2618,22 @@ int ipahal_rt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, * should be: bit0->EP0, bit1->EP1 * If bitmap is zero -> create tbl without bitmap entry * @mem: mem object that points to DMA mem representing the hdr structure * @atomic: should DMA allocation be executed with atomic flag */ int ipahal_flt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, u32 nhash_hdr_size, u64 ep_bitmap, struct ipa_mem_buffer *mem) u32 nhash_hdr_size, u64 ep_bitmap, struct ipa_mem_buffer *mem, bool atomic) { int flt_spc; u64 flt_bitmap; int i; u64 addr; struct ipahal_fltrt_obj *obj; int flag; IPAHAL_DBG("Entry - ep_bitmap 0x%llx\n", ep_bitmap); flag = atomic ? GFP_ATOMIC : GFP_KERNEL; obj = &ipahal_fltrt_objs[ipahal_ctx->hw_type]; if (!tbls_num || !nhash_hdr_size || !mem) { Loading Loading @@ -2667,7 +2674,7 @@ int ipahal_flt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, if (ep_bitmap) mem->size += obj->tbl_hdr_width; mem->base = dma_alloc_coherent(ipahal_ctx->ipa_pdev, mem->size, &mem->phys_base, GFP_KERNEL); &mem->phys_base, flag); if (!mem->base) { IPAHAL_ERR("fail to alloc DMA buff of size %d\n", mem->size); return -ENOMEM; Loading
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.h +6 −3 Original line number Diff line number Diff line /* Copyright (c) 2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -171,9 +171,10 @@ u32 ipahal_get_low_rule_id(void); * @hash_hdr_size: SRAM buf size of the hash tbls hdr. Used for space check * @nhash_hdr_size: SRAM buf size of the nhash tbls hdr. Used for space check * @mem: mem object that points to DMA mem representing the hdr structure * @atomic: should DMA allocation be executed with atomic flag */ int ipahal_rt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, u32 nhash_hdr_size, struct ipa_mem_buffer *mem); u32 nhash_hdr_size, struct ipa_mem_buffer *mem, bool atomic); /* * ipahal_flt_generate_empty_img() - Generate empty filter image Loading @@ -185,9 +186,11 @@ int ipahal_rt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, * @ep_bitmap: Bitmap representing the EP that has flt tables. The format * should be: bit0->EP0, bit1->EP1 * @mem: mem object that points to DMA mem representing the hdr structure * @atomic: should DMA allocation be executed with atomic flag */ int ipahal_flt_generate_empty_img(u32 tbls_num, u32 hash_hdr_size, u32 nhash_hdr_size, u64 ep_bitmap, struct ipa_mem_buffer *mem); u32 nhash_hdr_size, u64 ep_bitmap, struct ipa_mem_buffer *mem, bool atomic); /* * ipahal_fltrt_allocate_hw_tbl_imgs() - Allocate tbl images DMA structures Loading