lkml.org 
[lkml]   [1997]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subjectalloc_skb and GFP_DMA
Date
From

Hi,

I'm writing a device driver which requires recieve skbuffs to be DMA
capable. So I allocate buffers using the mode "GFP_ATOMIC | GFP_DMA".
Now it seems that this is "rejected" for no apparent reason other than
an oversight. Correct? Or is there a reason why I can't allocate
DMA-capable memory from an interrupt?

I'm working on 2.0.31-3 .

Below is a patch that I believe to do "the right thing"...

Roger.



--- linux/net/core/skbuff.c~ Tue May 27 11:37:54 1997
+++ linux/net/core/skbuff.c Tue Aug 12 20:55:57 1997
@@ -647,7 +647,7 @@
int len=size;
unsigned char *bptr;

- if (intr_count && priority!=GFP_ATOMIC)
+ if (intr_count && (priority & GFP_LEVEL_MASK) != GFP_ATOMIC)
{
static int count = 0;
if (++count < 5) {
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.039 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site