lkml.org 
[lkml]   [2023]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v5 RESEND 14/17] mm/ioremap: Consider IOREMAP space in generic ioremap
    On 05/16/23 at 11:41pm, Christoph Hellwig wrote:
    > On Mon, May 15, 2023 at 05:08:45PM +0800, Baoquan He wrote:
    > > @@ -35,8 +35,13 @@ void __iomem *generic_ioremap_prot(phys_addr_t phys_addr, size_t size,
    > > if (!ioremap_allowed(phys_addr, size, pgprot_val(prot)))
    > > return NULL;
    > >
    > > +#ifdef IOREMAP_START
    > > + area = __get_vm_area_caller(size, VM_IOREMAP, IOREMAP_START,
    > > + IOREMAP_END, __builtin_return_address(0));
    > > +#else
    > > area = get_vm_area_caller(size, VM_IOREMAP,
    > > __builtin_return_address(0));
    > > +#endif
    >
    > I think this would be cleaner if we'd just always use
    > __get_vm_area_caller and at the top of the file add a:
    >
    > #ifndef IOREMAP_START
    > #define IOREMAP_START VMALLOC_START
    > #define IOREMAP_END VMALLOC_END
    > #endif
    >
    > Together with a little comment that ioremap often, but not always
    > uses the generic vmalloc area.

    Great idea, will do as suggested.

    \
     
     \ /
      Last update: 2023-05-20 05:30    [W:4.425 / U:0.152 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site