lkml.org 
[lkml]   [2007]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Replace __get_free_page() + memset(0) with get_zeroed_page() calls.
    On Wed, 3 Jan 2007, Jiri Slaby wrote:

    > Robert P. J. Day wrote:
    > [...]
    > > index fd82411..b3932e5 100644
    > > --- a/include/asm-m68k/sun3_pgalloc.h
    > > +++ b/include/asm-m68k/sun3_pgalloc.h
    > > @@ -36,12 +36,11 @@ static inline void pte_free(struct page *page)
    > > static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
    > > unsigned long address)
    > > {
    > > - unsigned long page = __get_free_page(GFP_KERNEL|__GFP_REPEAT);
    > > + unsigned long page = get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
    > >
    > > if (!page)
    > > return NULL;
    > >
    > > - memset((void *)page, 0, PAGE_SIZE);
    > > return (pte_t *) (page);
    > > }
    >
    > perhaps simply
    > return (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);

    i thought about it, but figured i'd keep the change minimal and not
    get into any "editorializing."

    rday
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-01-03 16:05    [W:0.028 / U:0.408 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site