lkml.org 
[lkml]   [1998]   [Jan]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From(Linus Torvalds)
SubjectRe: 2.1.80pre[3-4] __get_free_pages patches
Date17 Jan 1998 06:24:48 GMT
In article <199801170554.AAA10548@alecto.harrell.com>,
Matthew Harrell  <mharrell@std.saic.com> wrote:
> 
>diff -urN linux/drivers/sound/soundcard.c.ori linux/drivers/sound/soundcard.c
>--- linux/drivers/sound/soundcard.c.ori	Sat Jan 17 01:00:44 1998
>+++ linux/drivers/sound/soundcard.c	Sat Jan 17 01:01:45 1998
>@@ -1100,7 +1100,7 @@
> 
> 		dmap->buffsize = PAGE_SIZE * (1 << sz);
> 
>-		if ((start_addr = (char *) __get_free_pages(GFP_ATOMIC, sz, MAX_DMA_ADDRESS)) == NULL)
>+		if ((start_addr = (char *) __get_free_pages(GFP_ATOMIC, sz)) == NULL)
> 			dmap->buffsize /= 2;
> 	}

This latter should do a 

	GFP_ATOMIC | GFP_DMA
to mark that it wants DMA'able memory. 

Essentially, the third argument to __get_free_pages() went away, and has
instead been replaced by setting the GFP_DMA bit in the first argument
if the third argument was non-zero (that's the same logic as the other
get_free_page() functions have used, and was made possible by a major
cleanup on how the argument is parsed). 

In _most_ cases the third argument used to be zero, in which case you
should just remove it. 

		Linus

\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2008