Re: [PATCH] Replace __get_free_page() + memset(0) with get_zeroed_page() calls.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux