Skip to content

Commit

Permalink
Revert "mm: fail GFP_DMA allocations when ZONE_DMA is not configured"
Browse files Browse the repository at this point in the history
This reverts commit a197b59.

As rmk says:
 "Commit a197b59 (mm: fail GFP_DMA allocations when ZONE_DMA is not
  configured) is causing regressions on ARM with various drivers which
  use GFP_DMA.

  The behaviour up until now has been to silently ignore that flag when
  CONFIG_ZONE_DMA is not enabled, and to allocate from the normal zone.
  However, as a result of the above commit, such allocations now fail
  which causes drivers to fail.  These are regressions compared to the
  previous kernel version."

so just revert it.

Requested-by: Russell King <linux@arm.linux.org.uk>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Jun 1, 2011
1 parent f0f52a9 commit 1fa7b6a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2247,10 +2247,6 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,

if (should_fail_alloc_page(gfp_mask, order))
return NULL;
#ifndef CONFIG_ZONE_DMA
if (WARN_ON_ONCE(gfp_mask & __GFP_DMA))
return NULL;
#endif

/*
* Check the zones suitable for the gfp_mask contain at least one
Expand Down

0 comments on commit 1fa7b6a

Please sign in to comment.