lkml.org 
[lkml]   [2015]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 2/7] lib: Add huge I/O map capability interfaces
On Mon, 26 Jan 2015 18:01:55 -0700 Toshi Kani <toshi.kani@hp.com> wrote:

> > > static int ioremap_pte_range(pmd_t *pmd, unsigned long addr,
> > > unsigned long end, phys_addr_t phys_addr, pgprot_t prot)
> > > {
> > > @@ -74,6 +112,12 @@ int ioremap_page_range(unsigned long addr,
> > > unsigned long start;
> > > unsigned long next;
> > > int err;
> > > + static int ioremap_huge_init_done;
> > > +
> > > + if (!ioremap_huge_init_done) {
> > > + ioremap_huge_init_done = 1;
> > > + ioremap_huge_init();
> > > + }
> >
> > Looks hacky. Why can't we just get the startup ordering correct? It
> > at least needs a comment which fully explains the situation.
>
> How about calling it from mm_init() after vmalloc_init()?
>
> void __init mm_init(void)
> :
> percpu_init_late();
> pgtable_init();
> vmalloc_init();
> + ioremap_huge_init();
> }

Sure, that would be better, assuming it can be made to work. Don't
forget to mark ioremap_huge_init() as __init.



\
 
 \ /
  Last update: 2015-01-27 23:01    [W:0.667 / U:1.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site