Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94055
b: refs/heads/master
c: 8cece85
h: refs/heads/master
i:
  94053: b929939
  94051: 24984ec
  94047: 9f690a8
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Apr 28, 2008
1 parent 3fafb08 commit a886779
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2309f9e6fe3f1de661eab9613f7903ab4420c753
refs/heads/master: 8cece85ec744bdc7ea0fc2d33f65b3f031c28468
17 changes: 5 additions & 12 deletions trunk/include/linux/gfp.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,29 +119,22 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags)

static inline enum zone_type gfp_zone(gfp_t flags)
{
int base = 0;

#ifdef CONFIG_NUMA
if (flags & __GFP_THISNODE)
base = MAX_NR_ZONES;
#endif

#ifdef CONFIG_ZONE_DMA
if (flags & __GFP_DMA)
return base + ZONE_DMA;
return ZONE_DMA;
#endif
#ifdef CONFIG_ZONE_DMA32
if (flags & __GFP_DMA32)
return base + ZONE_DMA32;
return ZONE_DMA32;
#endif
if ((flags & (__GFP_HIGHMEM | __GFP_MOVABLE)) ==
(__GFP_HIGHMEM | __GFP_MOVABLE))
return base + ZONE_MOVABLE;
return ZONE_MOVABLE;
#ifdef CONFIG_HIGHMEM
if (flags & __GFP_HIGHMEM)
return base + ZONE_HIGHMEM;
return ZONE_HIGHMEM;
#endif
return base + ZONE_NORMAL;
return ZONE_NORMAL;
}

/*
Expand Down

0 comments on commit a886779

Please sign in to comment.