lkml.org 
[lkml]   [2018]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH V6 07/33] csky: MMU and page table management
    On Thu, Sep 27, 2018 at 08:47:33AM -0700, Christoph Hellwig wrote:
    > > +static void *csky_dma_alloc_atomic(
    > > + struct device *dev,
    > > + size_t size,
    > > + dma_addr_t *dma_handle
    > > + )
    >
    > Can you please use normal kernel coding style? Closing brace on the
    > same line, either two tab indents for the arguments or align them to the
    > first argument:
    >
    > static void *csky_dma_alloc_atomic(struct device *dev, size_t size,
    > dma_addr_t *dma_handle)
    >
    > or:
    >
    > static void *csky_dma_alloc_atomic(struct device *dev, size_t size,
    > dma_addr_t *dma_handle)
    Ok.

    >
    > > + if (DMA_ATTR_NON_CONSISTENT & attrs)
    > > + BUG();
    >
    > Please don't bug on unknown attributs, they can be safely ignored.
    Ok.

    >
    > > +void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr,
    > > + size_t size, enum dma_data_direction dir)
    > > +{
    > > + struct page *page = pfn_to_page(paddr >> PAGE_SHIFT);
    > > + unsigned long offset = paddr & ~PAGE_MASK;
    > > + unsigned long vaddr;
    > > +
    > > + if (PageHighMem(page))
    > > + vaddr = (unsigned long) kmap_atomic(page);
    >
    > This isn't going to work as the size might be larger than PAGE_SIZE.
    Yes, you are right. I must fix it up. Thank you

    Best Regards
    Guo Ren

    \
     
     \ /
      Last update: 2018-09-28 15:10    [W:3.349 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site