From: Robert P. J. Day Date: Fri, 19 Oct 2007 21:11:38 +0000 (+0200) Subject: Explain clearly why kmalloc() can't use __GFP_HIGHMEM. X-Git-Tag: v2.6.24-rc1~124^2~69 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8518609deeacebafd71855f87cc411adb0c3be4e;p=linux-2.6 Explain clearly why kmalloc() can't use __GFP_HIGHMEM. Fix the wishy-washy comment to clearly explain why kmalloc() can't use the __GFP_HIGHMEM zone modifier. Signed-off-by: Robert P. J. Day Signed-off-by: Adrian Bunk --- diff --git a/mm/nommu.c b/mm/nommu.c index 42fb84e9e8..8f09333f78 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -175,7 +175,8 @@ EXPORT_SYMBOL(vfree); void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot) { /* - * kmalloc doesn't like __GFP_HIGHMEM for some reason + * You can't specify __GFP_HIGHMEM with kmalloc() since kmalloc() + * returns only a logical address. */ return kmalloc(size, (gfp_mask | __GFP_COMP) & ~__GFP_HIGHMEM); }