summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Price <danielprice@google.com>2023-05-01 20:32:00 +0000
committerDaniel Price <danielprice@google.com>2023-05-01 20:32:00 +0000
commite6c725f81debef20fa8e0279ba46f576953d1e22 (patch)
treebe8b640226ccf12f084809791e97b610074a31c2
parentcf781e5aa0e9b0387085abc738f14c55a81d2bd8 (diff)
parent83cdfe7776253fc4c99364d199e9300d7365c8e4 (diff)
downloaddataipa-android-msm-eos-5.15-tm-wear-kr3-dr-eos.tar.gz
This updates our sources to CodeLinaro release AU_LINUX_ANDROID_LW.UM.2.1.R1.11.00.00.200.040 (LW.UM.2.1.r1-04000-SW5100.0), which corresponds to ChipCode LW 2.0 r00078.3a. Bug: 280095980 Change-Id: Idefc8768298c9cc6c6f27994a6d771354f34c5fb Signed-off-by: Daniel Price <danielprice@google.com>
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c37
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipa_rt.c4
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipa_utils.c4
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c1
4 files changed, 28 insertions, 18 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c b/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c
index a57e36d..6b74697 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c
@@ -587,7 +587,7 @@ static int __ipa_add_hdr(struct ipa_hdr_add *hdr, bool user,
memcpy(entry->hdr, hdr->hdr, hdr->hdr_len);
entry->hdr_len = hdr->hdr_len;
- strlcpy(entry->name, hdr->name, IPA_RESOURCE_NAME_MAX);
+ strscpy(entry->name, hdr->name, IPA_RESOURCE_NAME_MAX);
entry->is_partial = hdr->is_partial;
entry->type = hdr->type;
entry->is_eth2_ofst_valid = hdr->is_eth2_ofst_valid;
@@ -651,26 +651,35 @@ static int __ipa_add_hdr(struct ipa_hdr_add *hdr, bool user,
while (htbl->end + ipa_hdr_bin_sz[bin] > mem_size) {
if (entry->is_lcl) {
/* if header does not fit to SRAM table, place it in DDR */
+ IPADBG_LOW("SRAM header table was full allocting DDR header table! Requested: %d Left: %d name %s, end %d\n",
+ ipa_hdr_bin_sz[bin], mem_size - htbl->end, entry->name, htbl->end);
htbl = &ipa3_ctx->hdr_tbl[HDR_TBL_SYS];
mem_size = IPA_MEM_PART(apps_hdr_size_ddr);
entry->is_lcl = false;
- } else {
- /* check if DDR free list */
- if (list_empty(&htbl->head_free_offset_list[bin])) {
- IPAERR("No space in DDR header buffer! Requested: %d Left: %d name %s, end %d\n",
+ }
+
+ if (!entry->is_lcl && (htbl->end + ipa_hdr_bin_sz[bin] > mem_size)) {
+ IPAERR("No space in DDR header buffer! Requested: %d Left: %d name %s, end %d\n",
+ ipa_hdr_bin_sz[bin], mem_size - htbl->end, entry->name, htbl->end);
+ goto bad_hdr_len;
+ }
+
+ /* check if DDR free list */
+ if (list_empty(&htbl->head_free_offset_list[bin])) {
+ IPADBG_LOW("No free offset in DDR allocating new offset Requested: %d Left: %d name %s, end %d\n",
ipa_hdr_bin_sz[bin], mem_size - htbl->end, entry->name, htbl->end);
- goto bad_hdr_len;
- } else {
- /* get the first free slot */
- offset = list_first_entry(&htbl->head_free_offset_list[bin],
+ goto create_entry;
+ } else {
+ /* get the first free slot */
+ offset = list_first_entry(&htbl->head_free_offset_list[bin],
struct ipa_hdr_offset_entry, link);
- list_move(&offset->link, &htbl->head_offset_list[bin]);
- entry->offset_entry = offset;
- offset->ipacm_installed = user;
- goto free_list;
- }
+ list_move(&offset->link, &htbl->head_offset_list[bin]);
+ entry->offset_entry = offset;
+ offset->ipacm_installed = user;
+ goto free_list;
}
}
+create_entry:
offset = kmem_cache_zalloc(ipa3_ctx->hdr_offset_cache,
GFP_KERNEL);
if (!offset) {
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c b/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c
index f214423..b3dba33 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c
@@ -879,11 +879,11 @@ static struct ipa3_rt_tbl *__ipa_add_rt_tbl(enum ipa_ip_type ip,
}
}
if (i == IPA_RT_INDEX_BITMAP_SIZE) {
- IPAERR("not free RT tbl indices left\n");
+ IPAERR_RL("not free RT tbl indices left\n");
goto fail_rt_idx_alloc;
}
if (i > max_tbl_indx) {
- IPAERR("rt tbl index is above max\n");
+ IPAERR_RL("rt tbl index is above max\n");
goto fail_rt_idx_alloc;
}
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
index cf95db4..90a06da 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
@@ -10293,7 +10293,7 @@ void ipa3_counter_remove_hdl(int hdl)
offset = counter->hw_counter.start_id - 1;
if (offset >= 0 && (offset + counter->hw_counter.num_counters)
< IPA_FLT_RT_HW_COUNTER) {
- memset(&ipa3_ctx->flt_rt_counters.used_hw + offset,
+ memset(&ipa3_ctx->flt_rt_counters.used_hw[offset],
0, counter->hw_counter.num_counters * sizeof(bool));
} else {
IPAERR_RL("unexpected hdl %d\n", hdl);
@@ -10302,7 +10302,7 @@ void ipa3_counter_remove_hdl(int hdl)
offset = counter->sw_counter.start_id - 1 - IPA_FLT_RT_HW_COUNTER;
if (offset >= 0 && (offset + counter->sw_counter.num_counters)
< IPA_FLT_RT_SW_COUNTER) {
- memset(&ipa3_ctx->flt_rt_counters.used_sw + offset,
+ memset(&ipa3_ctx->flt_rt_counters.used_sw[offset],
0, counter->sw_counter.num_counters * sizeof(bool));
} else {
IPAERR_RL("unexpected hdl %d\n", hdl);
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c
index 55286b5..096f433 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c
@@ -1283,6 +1283,7 @@ static struct ipahal_fltrt_obj ipahal_fltrt_objs[IPA_HW_MAX] = {
[IPA_IS_FRAG] = 15,
[IPA_IS_PURE_ACK] = 0,
},
+ IPA3_0_HW_RULE_PREFETCH_BUF_SIZE,
},
};