Re: [PATCH] PCI: dwc: Modify the check about MSI DMA mask 32-bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Fri, Apr 08, 2022 at 02:32:46PM +0900, Wangseok Lee wrote:
> > --------- Original Message ---------
> > Sender : Christoph Hellwig <hch@xxxxxxxxxxxxx>
> > Date : 2022-04-08 14:06 (GMT+9)
> > Title : Re: [PATCH] PCI: dwc: Modify the check about MSI DMA mask 32-bit
> > 
> > On Fri, Apr 08, 2022 at 11:34:01AM +0900, Wangseok Lee wrote:
> >> Hi,
> >> 
> >> Could you please review this patch in the context of the following patch?
> >> 
> >> https://protect2.fireeye.com/v1/url?k=dff16c49-806a5556-dff0e706-000babdfecba-c817c3fb701d2897&q=1&e=5862d6bb-abdb-4e80-b515-8bc024accd0c&u=https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Flinux-pci%2Fpatch%2F20220328023009epcms2p309a5dfc2ff29d0a9945f65799963193c%40epcms2p
> > 
> > Isn't that the same (broken) patch?
> 
> yes, The same patch that was reviewing.
> I would like to continue reviewing the pcie-designware-host.c patch below.
> https://lore.kernel.org/all/20220328023009epcms2p309a5dfc2ff29d0a9945f65799963193c@epcms2p3/
> 
> Would you please instead provide call stack (full) details of the
> problem you are trying to fix ? You received feedback already on the
> information you provided - to understand where the problem is I would
> ask you please the full call stack leading to the failure (inclusive of
> kernel version, platform, firmware and whether you are using a vanilla
> kernel or out of tree patches on top - in which case we can't really
> help), it is impossible to comment further otherwise.
> 
> Thanks,
> Lorenzo

Take artpec-8 SoC using 64bit system as an example.
artpec-8 is currently upstreaming. 
However, I think the same phenomenon will occur 
in platform that uses other 64bit systems.

driver_init() ->
-> platform_dma_configure() / platform.c
  |-> of_dma_configure() 
     |-> of_dma_configure_id()
        :Here, set dma of 33+ address.
         dma_set_mask(0xf`ffff`ffff), bus_dma_limit(0xf`ffff`ffff)
-> artpec8_pcie_probe() / artpec-8 pcie driver code
  |-> dw_pcie_host_init() / pcie-designware-host.c
     |-> dma_set_mask(32)
         : Here, set the dma mask of 32 addresses.
     |-> dma_map_single_attrs() 
        |-> dma_map_page_attrs()
           |-> dma_direct_map_page()
              : Error return occurs here.
                dma address has 33+ address and 
                dma bus limit is 33+. 
                However, this is because the mask value 
                has 32 addresses.


Therefore, the dma_set_mask(32)(in dw_pcie_host_init())
was modified to be performed only when
the dev-dma_mask is not set larger than 32 bits.

Thank you.




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux