Commit 8518609deeacebafd71855f87cc411adb0c3be4e
Committed by
Adrian Bunk
1 parent
3a4fa0a25d
Exists in
master
and in
4 other branches
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 <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
mm/nommu.c
... | ... | @@ -175,7 +175,8 @@ |
175 | 175 | void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot) |
176 | 176 | { |
177 | 177 | /* |
178 | - * kmalloc doesn't like __GFP_HIGHMEM for some reason | |
178 | + * You can't specify __GFP_HIGHMEM with kmalloc() since kmalloc() | |
179 | + * returns only a logical address. | |
179 | 180 | */ |
180 | 181 | return kmalloc(size, (gfp_mask | __GFP_COMP) & ~__GFP_HIGHMEM); |
181 | 182 | } |