Re: Problem with >1 page GFP_KERNEL kmalloc()

Gerard Roudier (groudier@club-internet.fr)
Mon, 31 Mar 1997 16:22:21 +0000 (GMT)


Sorry, for the wrong patch I've sent in my previous posting.
The following one is very probably what I wanted to write:

Gerard.

--- linux/mm/page_alloc.c.2.0.29 Fri Aug 16 21:07:08 1996
+++ linux/mm/page_alloc.c.dma_work_around Mon Mar 31 16:08:16 1997
@@ -210,8 +210,12 @@
cli();
if ((priority==GFP_ATOMIC) || nr_free_pages > reserved_pages) {
RMQUEUE(order, dma);
- restore_flags(flags);
- return 0;
+#ifdef CONFIG_ALLOC_DMA_WORK_AROUND
+ if (priority==GFP_ATOMIC || !dma) {
+ restore_flags(flags);
+ return 0;
+ }
+#endif
}
restore_flags(flags);
if (priority != GFP_BUFFER && try_to_free_page(priority, dma, 1))