qcacmn: assert on IPA SMMU map/unmap failures
The status of the IPA SMMU MAP/UNMAP operation is stored in the result field of the mem info structure that is passed to the IPA driver. Currently, this field is not checked for MAP/UNMAP failures; when IPA HW accesses such a buffer for which mapping is not correctly setup, it will lead to SMMU faults. Check the result and assert(on failures) to avoid such issues. Also, check if the physical address passed to the IPA driver is non zero value. Change-Id: Iec0702bdf4a07ea37e1213a33dc970028da654df CRs-Fixed: 2928744
Šī revīzija ir iekļauta:

revīziju iesūtīja
Madan Koyyalamudi

vecāks
28138b7558
revīzija
9f6ccf3fe6
@@ -106,11 +106,25 @@ static QDF_STATUS __dp_ipa_handle_buf_smmu_mapping(struct dp_soc *soc,
|
||||
qdf_nbuf_get_frag_paddr(nbuf, 0),
|
||||
size);
|
||||
|
||||
if (create)
|
||||
if (create) {
|
||||
/* Assert if PA is zero */
|
||||
qdf_assert_always(mem_map_table.pa);
|
||||
|
||||
ret = qdf_ipa_wdi_create_smmu_mapping(1, &mem_map_table);
|
||||
else
|
||||
} else {
|
||||
ret = qdf_ipa_wdi_release_smmu_mapping(1, &mem_map_table);
|
||||
}
|
||||
qdf_assert_always(!ret);
|
||||
|
||||
/* Return status of mapping/unmapping is stored in
|
||||
* mem_map_table.result field, assert if the result
|
||||
* is failure
|
||||
*/
|
||||
if (create)
|
||||
qdf_assert_always(!mem_map_table.result);
|
||||
else
|
||||
qdf_assert_always(mem_map_table.result >= mem_map_table.size);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user