linux-uconsole/drivers/net/ipa
Alex Elder faa8bf8451 net: ipa: don't assume SMEM is page-aligned
[ Upstream commit b8d4380365 ]

In ipa_smem_init(), a Qualcomm SMEM region is allocated (if needed)
and then its virtual address is fetched using qcom_smem_get().  The
physical address associated with that region is also fetched.

The physical address is adjusted so that it is page-aligned, and an
attempt is made to update the size of the region to compensate for
any non-zero adjustment.

But that adjustment isn't done properly.  The physical address is
aligned twice, and as a result the size is never actually adjusted.

Fix this by *not* aligning the "addr" local variable, and instead
making the "phys" local variable be the adjusted "addr" value.

Fixes: a0036bb413 ("net: ipa: define SMEM memory region for IPA")
Signed-off-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20220818134206.567618-1-elder@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-31 17:15:16 +02:00
..
gsi.c net: ipa: record proper RX transaction count 2022-05-25 09:17:57 +02:00
gsi.h
gsi_private.h
gsi_reg.h
gsi_trans.c
gsi_trans.h
ipa.h
ipa_clock.c
ipa_clock.h
ipa_cmd.c
ipa_cmd.h
ipa_data-sc7180.c
ipa_data-sdm845.c
ipa_data.h
ipa_endpoint.c net: ipa: fix page free in ipa_endpoint_replenish_one() 2022-06-09 10:21:29 +02:00
ipa_endpoint.h net: ipa: prevent concurrent replenish 2022-02-05 12:37:55 +01:00
ipa_gsi.c
ipa_gsi.h
ipa_interrupt.c
ipa_interrupt.h
ipa_main.c
ipa_mem.c net: ipa: don't assume SMEM is page-aligned 2022-08-31 17:15:16 +02:00
ipa_mem.h
ipa_modem.c
ipa_modem.h
ipa_qmi.c
ipa_qmi.h
ipa_qmi_msg.c
ipa_qmi_msg.h
ipa_reg.c
ipa_reg.h
ipa_smp2p.c
ipa_smp2p.h
ipa_table.c
ipa_table.h
ipa_uc.c
ipa_uc.h
ipa_version.h
Kconfig
Makefile