On 7/12/2024 3:04 AM, Miaoqing Pan wrote: > In case of firmware assert snapshot of firmware memory is essential for > debugging. Add firmware coredump collection support for PCI bus. > Collect RDDM and firmware paging dumps from MHI and pack them in TLV > format and also pack various memory shared during QMI phase in separate > TLVs. Add necessary header and share the dumps to user space using dev > coredump framework. Coredump collection is disabled by default and can > be enabled using menuconfig. Dump collected for a radio is 55 MB > approximately. > > The changeset is mostly copied from: > https://lore.kernel.org/all/20240325183414.4016663-1-quic_ssreeela@xxxxxxxxxxx/. > > Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-04358-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 > > Signed-off-by: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx> > --- > v2: fix implicit declaration of function 'vzalloc'. > v3: fix vmalloc-out-of-bounds and remove CONFIG_ATH11K_COREDUMP. ... > @@ -102,8 +102,10 @@ struct target_mem_chunk { > u32 prev_size; > u32 prev_type; > dma_addr_t paddr; > - u32 *vaddr; > - void __iomem *iaddr; > + union { > + u32 *vaddr; > + void __iomem *iaddr; > + } v; > }; replicating late-arriving v2 comments here: On 7/12/2024 2:38 AM, Miaoqing Pan wrote: > On 7/11/2024 12:20 AM, Kalle Valo wrote: >> Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx> writes: >> I feel that the QMI changes should be in a separat patch and explaining >> in detail what they are about. Didn't review those now as there's no >> explanation. > > Minor changes for updating 'iaddr' definition. IMO, don't need a > separate patch. Putting something into a union isn't minor. You should justify the reason for doing it and defend why it is safe to do it. And note that if you make it an anonymous union then most, if not all, of the code changes are unnecessary. /jeff