[PATCH v2] bus: mhi: host: Allocate entire MHI control config once
Baochen Qiang
quic_bqiang at quicinc.com
Mon May 12 18:43:56 PDT 2025
On 5/13/2025 2:31 AM, Jeff Hugo wrote:
> On 4/27/2025 7:57 PM, Baochen Qiang wrote:
>>
>>
>> On 4/26/2025 1:04 AM, Jeff Hugo wrote:
>>> From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy at quicinc.com>
>>> int mhi_init_mmio(struct mhi_controller *mhi_cntrl)
>>> @@ -475,6 +497,7 @@ int mhi_init_mmio(struct mhi_controller *mhi_cntrl)
>>> struct mhi_event *mhi_event;
>>> void __iomem *base = mhi_cntrl->regs;
>>> struct device *dev = &mhi_cntrl->mhi_dev->dev;
>>> + dma_addr_t mhi_ctrl_limit = mhi_cntrl->ctrl_config_dma + mhi_cntrl-
>>> >ctrl_config_size - 1;
>>
>> but the range [ctrl_config_dma, mhi_ctrl_limit] could still be possbile to cross the 4GB
>> boundary, no?
>
> Its possible, yes. From a practical standpoint, that seems to be unlikely as the control
> area is not terribly large on supported platforms.
although unlikely, we need to handle it, right?
IMO a possible solution is that you allocate (2 * ctrl_config_size - 1) bytes and take
either the former half or the latter half, depending on which one does not cross the boundary.
More information about the ath11k
mailing list