Re: [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area

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

 



Hi,


David Miller wrote:
From: Kristoffer Glembo <kristoffer@xxxxxxxxxxx>
Date: Wed, 18 Nov 2009 09:45:41 +0100

But I noticed that pci_map_single does not work in later kernels.
I guess it stopped working with the patch "sparc: Use
asm-generic/pci-dma-compat" since before the that the physical address
was obtained through virt_to_phys() and after that it goes through
page_to_phys(virt_to_page()) which does not work. Using
page_address(virt_to_page()) works but I understand that this does not
always evaluate properly.

"page_address(virt_to_page())" returns a virtual address, whereas
page_to_phys(virt_to_page()) returns a physical one.


Yeah, I meant virt_to_phys(page_address(virt_to_page())) ..


Using page_to_phys(virt_to_page()) results in an address lacking the
phys_base offset.

If it's not adding in phys_base, then it's not returning a legal
physical address.  Any idea why we don't add phys_base here?  I feel
like we've discussed this exactly recently, like in the past few
months.


We did yes. You said that mem_map is not offset at phys_base and then of
course we don't need to add it in page_to_phys. Is mem_map not offset
because typically sp_banks[].base_addr = 0? In our case we pass in one
sp_banks entry which has base_addr = 0x40000000.


Best regards,
Kristoffer



--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux