[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190826092001.GA13476@lst.de>
Date: Mon, 26 Aug 2019 11:20:01 +0200
From: Christoph Hellwig <hch@....de>
To: Julien Grall <julien.grall@....com>
Cc: Christoph Hellwig <hch@....de>,
Stefano Stabellini <sstabellini@...nel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
xen-devel@...ts.xenproject.org, iommu@...ts.linux-foundation.org,
x86@...nel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [Xen-devel] [PATCH 01/11] xen/arm: use dma-noncoherent.h calls
for xen-swiotlb cache maintainance
On Mon, Aug 19, 2019 at 12:45:17PM +0100, Julien Grall wrote:
> On 8/16/19 2:00 PM, Christoph Hellwig wrote:
>> +static inline void xen_dma_map_page(struct device *hwdev, struct page *page,
>> + dma_addr_t dev_addr, unsigned long offset, size_t size,
>> + enum dma_data_direction dir, unsigned long attrs)
>> +{
>> + unsigned long page_pfn = page_to_xen_pfn(page);
>> + unsigned long dev_pfn = XEN_PFN_DOWN(dev_addr);
>> + unsigned long compound_pages =
>> + (1<<compound_order(page)) * XEN_PFN_PER_PAGE;
>> + bool local = (page_pfn <= dev_pfn) &&
>> + (dev_pfn - page_pfn < compound_pages);
>> +
>
> The Arm version as a comment here. Could we retain it?
I've added it in this patch, altough the rewrites later on mean it will
go away in favour of a new comment elsewhere anyway.
Powered by blists - more mailing lists