projects/linux·commit 1fa7b6a2

Revert "mm: fail GFP_DMA allocations when ZONE_DMA is not configured"

1fa7b6a2 · Linus Torvalds <[email protected]> · 2011-06-02 06:11:24 +09:00

This reverts commit a197b59ae6e8bee56fcef37ea2482dc08414e2ac.

As rmk says:
 "Commit a197b59ae6e8 (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 <[email protected]>
Acked-by: Andrew Morton <[email protected]>
Cc: David Rientjes <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
1fa7b6a29c61358cc2ca6f64cef4aa0e1a7ca74c
Parents
f0f52a94

Changes

1 files changed · +0 −4

FileStatusAddDelContent
mm/page_alloc.cmodified+0−4View file

mm/page_alloc.c

View file
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a4e1db3..4e8985a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -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