From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756425AbXGRGZy (ORCPT ); Wed, 18 Jul 2007 02:25:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751311AbXGRGZq (ORCPT ); Wed, 18 Jul 2007 02:25:46 -0400 Received: from gate.crashing.org ([63.228.1.57]:54287 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751285AbXGRGZp (ORCPT ); Wed, 18 Jul 2007 02:25:45 -0400 Subject: [PATCH] vmalloc_32 should use GFP_KERNEL From: Benjamin Herrenschmidt To: Linux Kernel list Cc: linux-mm@kvack.org, Dave Airlie , Andrew Morton Content-Type: text/plain Date: Wed, 18 Jul 2007 16:25:34 +1000 Message-Id: <1184739934.25235.220.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org I've noticed lots of failures of vmalloc_32 on machines where it shouldn't have failed unless it was doing an atomic operation. Looking closely, I noticed that: #if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32) #define GFP_VMALLOC32 GFP_DMA32 #elif defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA) #define GFP_VMALLOC32 GFP_DMA #else #define GFP_VMALLOC32 GFP_KERNEL #endif Which seems to be incorrect, it should always -or- in the DMA flags on top of GFP_KERNEL, thus this patch. Signed-off-by: Benjamin Herrenschmidt --- This fixes frequent errors launchin X with the nouveau DRM for example. Index: linux-work/mm/vmalloc.c =================================================================== --- linux-work.orig/mm/vmalloc.c 2007-07-18 16:22:00.000000000 +1000 +++ linux-work/mm/vmalloc.c 2007-07-18 16:22:11.000000000 +1000 @@ -578,9 +578,9 @@ void *vmalloc_exec(unsigned long size) } #if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32) -#define GFP_VMALLOC32 GFP_DMA32 +#define GFP_VMALLOC32 GFP_DMA32 | GFP_KERNEL #elif defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA) -#define GFP_VMALLOC32 GFP_DMA +#define GFP_VMALLOC32 GFP_DMA | GFP_KERNEL #else #define GFP_VMALLOC32 GFP_KERNEL #endif From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: [PATCH] vmalloc_32 should use GFP_KERNEL From: Benjamin Herrenschmidt Content-Type: text/plain Date: Wed, 18 Jul 2007 16:25:34 +1000 Message-Id: <1184739934.25235.220.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Linux Kernel list Cc: linux-mm@kvack.org, Dave Airlie , Andrew Morton List-ID: I've noticed lots of failures of vmalloc_32 on machines where it shouldn't have failed unless it was doing an atomic operation. Looking closely, I noticed that: #if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32) #define GFP_VMALLOC32 GFP_DMA32 #elif defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA) #define GFP_VMALLOC32 GFP_DMA #else #define GFP_VMALLOC32 GFP_KERNEL #endif Which seems to be incorrect, it should always -or- in the DMA flags on top of GFP_KERNEL, thus this patch. Signed-off-by: Benjamin Herrenschmidt --- This fixes frequent errors launchin X with the nouveau DRM for example. Index: linux-work/mm/vmalloc.c =================================================================== --- linux-work.orig/mm/vmalloc.c 2007-07-18 16:22:00.000000000 +1000 +++ linux-work/mm/vmalloc.c 2007-07-18 16:22:11.000000000 +1000 @@ -578,9 +578,9 @@ void *vmalloc_exec(unsigned long size) } #if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32) -#define GFP_VMALLOC32 GFP_DMA32 +#define GFP_VMALLOC32 GFP_DMA32 | GFP_KERNEL #elif defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA) -#define GFP_VMALLOC32 GFP_DMA +#define GFP_VMALLOC32 GFP_DMA | GFP_KERNEL #else #define GFP_VMALLOC32 GFP_KERNEL #endif -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org