Re: [PATCH ath-next 0/3] wifi: ath12k: Fix memory allocation and improve reserved memory handling
Rameshkumar Sundaram <[email protected]>
| Newsgroups | org.infradead.lists.ath12k,org.kernel.vger.linux-wireless |
|---|---|
| Message-ID | <[email protected]> |
On 6/11/2026 9:03 AM, Aaradhana Sahu wrote: > The current implementation relies on index-based device tree reserved > memory lookup. Different platform variants define reserved memory > regions in different orders and combinations, making the index-based > lookup fragile across platforms. > > Currently, the driver allocates the HOST_DDR_REGION_TYPE > starting from the base of the Q6 region, which overlaps the Q6 read-only > firmware section. This causes firmware assertions during QMI memory > allocation, as the firmware expects writable regions to be placed after the > read-only section. > > Address these issues by: > - switching to name-based reserved memory lookup to remove dependency on > device tree node ordering, > - refactoring QMI memory assignment logic to reduce code duplication and > improve maintainability, > - placing HOST_DDR and BDF regions after the Q6 read-only firmware section > using the bdf_addr_offset parameter. > > This series ensure correct reserved memory handling across different > platform variants, prevent overlapping memory allocations, and maintain > backward compatibility by reusing existing reserved memory region names > defined in device tree bindings. > > Overview: > - Patch [1/3] switches to name-based reserved memory lookup for platform > compatibility. > - Patch [2/3] refactors QMI memory assignment to eliminate code > duplication. > - Patch [3/3] fixes memory allocation to place HOST_DDR and BDF regions > after Q6 read-only section. > > Aaradhana Sahu (3): > wifi: ath12k: switch to name-based reserved memory lookup > wifi: ath12k: refactor QMI memory assignment > wifi: ath12k: allocate HOST_DDR and BDF regions after Q6 RO region > > drivers/net/wireless/ath/ath12k/ahb.c | 18 +-- > drivers/net/wireless/ath/ath12k/core.c | 25 ---- > drivers/net/wireless/ath/ath12k/core.h | 2 - > drivers/net/wireless/ath/ath12k/qmi.c | 168 ++++++++++--------------- > 4 files changed, 78 insertions(+), 135 deletions(-) > > Reviewed-by: Rameshkumar Sundaram <[email protected]>