linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
@ 2005-08-09 11:11 Yasunori Goto
  2005-08-09 15:05 ` Martin J. Bligh
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Yasunori Goto @ 2005-08-09 11:11 UTC (permalink / raw)
  To: linux-mm, Andrew Morton
  Cc: Martin J. Bligh, linux-ia64, Mike Kravetz, Luck, Tony

Hello.

I modified the patch which guarantees allocation of DMA area
at alloc_bootmem_low().

I tested this patch. Please apply.

The differences from previous one are ....
  - Confirmation that allocated area is really DMA area.
  - max_dma_physaddr() is defined for some architecture that
    all of memory is DMA area.

    (Note: Mike Kravez-san's code was defined by MACRO like this.
        #ifndef MAX_DMA_PHYSADDR
        #if MAX_DMA_ADDRESS == ~0UL
                :
                :
      However, MAX_DMA_ADDRESS is defined with cast "(unsigned long)"
      in some architecture like i386. And, preprocessor doesn't like 
      this cast in #IF sentence and displays error message as
      "missing binary operator befor token "long"".
      So, I changed it to static inline function.)

Thanks.

----------------------

This is a patch to guarantee that alloc_bootmem_low() allocate DMA area.

Current alloc_bootmem_low() is just specify "goal=0". And it is 
used for __alloc_bootmem_core() to decide which address is better.
However, there is no guarantee that __alloc_bootmem_core()
allocate DMA area when goal=0 is specified.
Even if there is no DMA'ble area in searching node, it allocates
higher address than MAX_DMA_ADDRESS.

__alloc_bootmem_core() is called by order of for_each_pgdat()
in __alloc_bootmem(). So, if first node (node_id = 0) has
DMA'ble area, no trouble will occur. However, our new Itanium2 server
can change which node has lower address. And panic really occurred on it.
The message was "bounce buffer is not DMA'ble" in swiothl_map_single().

To avoid this panic, following patch confirms allocated area, and retry
if it is not in DMA.
I tested this patch on my Tiger 4 and our new server.


Signed-off by Yasunori Goto <y-goto@jp.fujitsu.com>

-------------------------------------------------------------------
Index: bootmem/mm/bootmem.c
===================================================================
--- bootmem.orig/mm/bootmem.c	2005-08-09 15:50:06.000000000 +0900
+++ bootmem/mm/bootmem.c	2005-08-09 16:11:57.076880203 +0900
@@ -374,10 +374,25 @@ void * __init __alloc_bootmem (unsigned 
 	pg_data_t *pgdat = pgdat_list;
 	void *ptr;
 
-	for_each_pgdat(pgdat)
-		if ((ptr = __alloc_bootmem_core(pgdat->bdata, size,
-						align, goal)))
-			return(ptr);
+	for_each_pgdat(pgdat){
+
+		ptr = __alloc_bootmem_core(pgdat->bdata, size,
+					   align, goal);
+
+		if (!ptr)
+			continue;
+
+		if (goal < max_dma_physaddr() &&
+		    (unsigned long)ptr >= MAX_DMA_ADDRESS){
+			/* DMA area is required, but ptr is not DMA area.
+			   Trying other nodes */
+
+			free_bootmem_core(pgdat->bdata, virt_to_phys(ptr), size);
+			continue;
+		}
+
+		return(ptr);
+
+	}
 
 	/*
 	 * Whoops, we cannot satisfy the allocation request.
Index: bootmem/include/linux/bootmem.h
===================================================================
--- bootmem.orig/include/linux/bootmem.h	2005-08-09 15:50:06.000000000 +0900
+++ bootmem/include/linux/bootmem.h	2005-08-09 16:05:17.929424155 +0900
@@ -36,6 +36,15 @@ typedef struct bootmem_data {
 					 * up searching */
 } bootmem_data_t;
 
+static inline unsigned long max_dma_physaddr(void)
+{
+
+	if (MAX_DMA_ADDRESS == ~0UL)
+		return MAX_DMA_ADDRESS;
+	else
+		return __pa(MAX_DMA_ADDRESS);
+}
+
 extern unsigned long __init bootmem_bootmap_pages (unsigned long);
 extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend);
 extern void __init free_bootmem (unsigned long addr, unsigned long size);
@@ -43,11 +52,11 @@ extern void * __init __alloc_bootmem (un
 #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
 extern void __init reserve_bootmem (unsigned long addr, unsigned long size);
 #define alloc_bootmem(x) \
-	__alloc_bootmem((x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
+	__alloc_bootmem((x), SMP_CACHE_BYTES, max_dma_physaddr())
 #define alloc_bootmem_low(x) \
 	__alloc_bootmem((x), SMP_CACHE_BYTES, 0)
 #define alloc_bootmem_pages(x) \
-	__alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
+	__alloc_bootmem((x), PAGE_SIZE, max_dma_physaddr())
 #define alloc_bootmem_low_pages(x) \
 	__alloc_bootmem((x), PAGE_SIZE, 0)
 #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */
@@ -60,9 +69,9 @@ extern unsigned long __init free_all_boo
 extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal);
 #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
 #define alloc_bootmem_node(pgdat, x) \
-	__alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
+	__alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, max_dma_physaddr())
 #define alloc_bootmem_pages_node(pgdat, x) \
-	__alloc_bootmem_node((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
+	__alloc_bootmem_node((pgdat), (x), PAGE_SIZE, max_dma_physaddr())
 #define alloc_bootmem_low_pages_node(pgdat, x) \
 	__alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0)
 #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */

-- 
Yasunori Goto 

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-09 11:11 [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2 Yasunori Goto
@ 2005-08-09 15:05 ` Martin J. Bligh
  2005-08-09 21:15 ` Mike Kravetz
  2005-08-09 23:02 ` Peter Chubb
  2 siblings, 0 replies; 16+ messages in thread
From: Martin J. Bligh @ 2005-08-09 15:05 UTC (permalink / raw)
  To: Yasunori Goto, linux-mm, Andrew Morton
  Cc: linux-ia64, Mike Kravetz, Luck, Tony

This rev looks much better to me, at least. Thanks for fixing it up.

M.

> I modified the patch which guarantees allocation of DMA area
> at alloc_bootmem_low().
> 
> I tested this patch. Please apply.
> 
> The differences from previous one are ....
>   - Confirmation that allocated area is really DMA area.
>   - max_dma_physaddr() is defined for some architecture that
>     all of memory is DMA area.
> 
>     (Note: Mike Kravez-san's code was defined by MACRO like this.
>         #ifndef MAX_DMA_PHYSADDR
>         #if MAX_DMA_ADDRESS == ~0UL
>                 :
>                 :
>       However, MAX_DMA_ADDRESS is defined with cast "(unsigned long)"
>       in some architecture like i386. And, preprocessor doesn't like 
>       this cast in #IF sentence and displays error message as
>       "missing binary operator befor token "long"".
>       So, I changed it to static inline function.)
> 
> Thanks.
> 
> ----------------------
> 
> This is a patch to guarantee that alloc_bootmem_low() allocate DMA area.
> 
> Current alloc_bootmem_low() is just specify "goal=0". And it is 
> used for __alloc_bootmem_core() to decide which address is better.
> However, there is no guarantee that __alloc_bootmem_core()
> allocate DMA area when goal=0 is specified.
> Even if there is no DMA'ble area in searching node, it allocates
> higher address than MAX_DMA_ADDRESS.
> 
> __alloc_bootmem_core() is called by order of for_each_pgdat()
> in __alloc_bootmem(). So, if first node (node_id = 0) has
> DMA'ble area, no trouble will occur. However, our new Itanium2 server
> can change which node has lower address. And panic really occurred on it.
> The message was "bounce buffer is not DMA'ble" in swiothl_map_single().
> 
> To avoid this panic, following patch confirms allocated area, and retry
> if it is not in DMA.
> I tested this patch on my Tiger 4 and our new server.
> 
> 
> Signed-off by Yasunori Goto <y-goto@jp.fujitsu.com>
> 
> -------------------------------------------------------------------
> Index: bootmem/mm/bootmem.c
> ===================================================================
> --- bootmem.orig/mm/bootmem.c	2005-08-09 15:50:06.000000000 +0900
> +++ bootmem/mm/bootmem.c	2005-08-09 16:11:57.076880203 +0900
> @@ -374,10 +374,25 @@ void * __init __alloc_bootmem (unsigned 
>  	pg_data_t *pgdat = pgdat_list;
>  	void *ptr;
>  
> -	for_each_pgdat(pgdat)
> -		if ((ptr = __alloc_bootmem_core(pgdat->bdata, size,
> -						align, goal)))
> -			return(ptr);
> +	for_each_pgdat(pgdat){
> +
> +		ptr = __alloc_bootmem_core(pgdat->bdata, size,
> +					   align, goal);
> +
> +		if (!ptr)
> +			continue;
> +
> +		if (goal < max_dma_physaddr() &&
> +		    (unsigned long)ptr >= MAX_DMA_ADDRESS){
> +			/* DMA area is required, but ptr is not DMA area.
> +			   Trying other nodes */
> +
> +			free_bootmem_core(pgdat->bdata, virt_to_phys(ptr), size);
> +			continue;
> +		}
> +
> +		return(ptr);
> +
> +	}
>  
>  	/*
>  	 * Whoops, we cannot satisfy the allocation request.
> Index: bootmem/include/linux/bootmem.h
> ===================================================================
> --- bootmem.orig/include/linux/bootmem.h	2005-08-09 15:50:06.000000000 +0900
> +++ bootmem/include/linux/bootmem.h	2005-08-09 16:05:17.929424155 +0900
> @@ -36,6 +36,15 @@ typedef struct bootmem_data {
>  					 * up searching */
>  } bootmem_data_t;
>  
> +static inline unsigned long max_dma_physaddr(void)
> +{
> +
> +	if (MAX_DMA_ADDRESS == ~0UL)
> +		return MAX_DMA_ADDRESS;
> +	else
> +		return __pa(MAX_DMA_ADDRESS);
> +}
> +
>  extern unsigned long __init bootmem_bootmap_pages (unsigned long);
>  extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend);
>  extern void __init free_bootmem (unsigned long addr, unsigned long size);
> @@ -43,11 +52,11 @@ extern void * __init __alloc_bootmem (un
>  #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
>  extern void __init reserve_bootmem (unsigned long addr, unsigned long size);
>  #define alloc_bootmem(x) \
> -	__alloc_bootmem((x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
> +	__alloc_bootmem((x), SMP_CACHE_BYTES, max_dma_physaddr())
>  #define alloc_bootmem_low(x) \
>  	__alloc_bootmem((x), SMP_CACHE_BYTES, 0)
>  #define alloc_bootmem_pages(x) \
> -	__alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
> +	__alloc_bootmem((x), PAGE_SIZE, max_dma_physaddr())
>  #define alloc_bootmem_low_pages(x) \
>  	__alloc_bootmem((x), PAGE_SIZE, 0)
>  #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */
> @@ -60,9 +69,9 @@ extern unsigned long __init free_all_boo
>  extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal);
>  #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
>  #define alloc_bootmem_node(pgdat, x) \
> -	__alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
> +	__alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, max_dma_physaddr())
>  #define alloc_bootmem_pages_node(pgdat, x) \
> -	__alloc_bootmem_node((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
> +	__alloc_bootmem_node((pgdat), (x), PAGE_SIZE, max_dma_physaddr())
>  #define alloc_bootmem_low_pages_node(pgdat, x) \
>  	__alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0)
>  #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */
> 
> -- 
> Yasunori Goto 
> 
> --
> 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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
> 
> 


--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-09 11:11 [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2 Yasunori Goto
  2005-08-09 15:05 ` Martin J. Bligh
@ 2005-08-09 21:15 ` Mike Kravetz
  2005-08-10  3:06   ` Dave Hansen
  2005-08-11 20:46   ` Christoph Lameter
  2005-08-09 23:02 ` Peter Chubb
  2 siblings, 2 replies; 16+ messages in thread
From: Mike Kravetz @ 2005-08-09 21:15 UTC (permalink / raw)
  To: Yasunori Goto
  Cc: linux-mm, Andrew Morton, Martin J. Bligh, linux-ia64, Luck, Tony

On Tue, Aug 09, 2005 at 08:11:20PM +0900, Yasunori Goto wrote:
> I modified the patch which guarantees allocation of DMA area
> at alloc_bootmem_low().

Thanks!

I was going to replace more instances of __pa(MAX_DMA_ADDRESS) with
max_dma_physaddr().  However, when grepping for MAX_DMA_ADDRESS I
noticed instances of virt_to_phys(MAX_DMA_ADDRESS) as well.  Can
someone tell me what the differences are between __pa() and virt_to_phys().
I noticed that on some archs they are the same, but are different on
others.

-- 
Mike
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-09 11:11 [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2 Yasunori Goto
  2005-08-09 15:05 ` Martin J. Bligh
  2005-08-09 21:15 ` Mike Kravetz
@ 2005-08-09 23:02 ` Peter Chubb
  2005-08-10  6:10   ` Yasunori Goto
  2 siblings, 1 reply; 16+ messages in thread
From: Peter Chubb @ 2005-08-09 23:02 UTC (permalink / raw)
  To: Yasunori Goto
  Cc: linux-mm, Andrew Morton, Martin J. Bligh, linux-ia64,
	Mike Kravetz, Luck, Tony

>>>>> "Yasunori" == Yasunori Goto <y-goto@jp.fujitsu.com> writes:

Yasunori>     (Note: Mike Kravez-san's code was defined by MACRO like
Yasunori> this.  #ifndef MAX_DMA_PHYSADDR #if MAX_DMA_ADDRESS == ~0UL
Yasunori> : : However, MAX_DMA_ADDRESS is defined with cast "(unsigned
Yasunori> long)" in some architecture like i386. And, preprocessor
Yasunori> doesn't like this cast in #IF sentence and displays error
Yasunori> message as "missing binary operator befor token "long"".
Yasunori> So, I changed it to static inline function.)

Yasunori> +static inline unsigned long max_dma_physaddr(void) 
Yasunori> +{
Yasunori> + 
Yasunori> +  if (MAX_DMA_ADDRESS == ~0UL) 
Yasunori> +	return MAX_DMA_ADDRESS; 
Yasunori> +  else 
Yasunori> +	return __pa(MAX_DMA_ADDRESS); 
Yasunori> +} 

This code illustrates one of my pet coding-style hates:  there's no
need for the `else' as the return statement means it'll never be
reached.

	if (MAX_DMA_ADDRESS == ~0UL)
	    return MAX_DMA_ADDRESS;
	return __pa(MAX_DMA_ADDRESS);

is all that's needed.

--
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
The technical we do immediately,  the political takes *forever*
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-09 21:15 ` Mike Kravetz
@ 2005-08-10  3:06   ` Dave Hansen
  2005-08-10 16:23     ` Dave Hansen
  2005-08-11 20:46   ` Christoph Lameter
  1 sibling, 1 reply; 16+ messages in thread
From: Dave Hansen @ 2005-08-10  3:06 UTC (permalink / raw)
  To: Mike Kravetz
  Cc: Yasunori Goto, linux-mm, Andrew Morton, Martin J. Bligh,
	ia64 list, Luck, Tony

On Tue, 2005-08-09 at 14:15 -0700, Mike Kravetz wrote:
> On Tue, Aug 09, 2005 at 08:11:20PM +0900, Yasunori Goto wrote:
> > I modified the patch which guarantees allocation of DMA area
> > at alloc_bootmem_low().
> 
> I was going to replace more instances of __pa(MAX_DMA_ADDRESS) with
> max_dma_physaddr().  However, when grepping for MAX_DMA_ADDRESS I
> noticed instances of virt_to_phys(MAX_DMA_ADDRESS) as well.  Can
> someone tell me what the differences are between __pa() and virt_to_phys().

At least one is that virt_to_phys()'s argument is usually 'volatile'
while __pa() is not.  This, of course, varies from arch to arch. 

If somebody wants to go and rip __pa() out from all of the arches, I
won't be especially sorry :)

Actually, it would be nice to have one arch-generic version which is
just the usual (vaddr - PAGE_OFFSET).  That would probably take care of
80% of the individual implementations.

-- Dave

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-09 23:02 ` Peter Chubb
@ 2005-08-10  6:10   ` Yasunori Goto
  2005-08-18 19:52     ` Andrew Morton
  0 siblings, 1 reply; 16+ messages in thread
From: Yasunori Goto @ 2005-08-10  6:10 UTC (permalink / raw)
  To: Peter Chubb
  Cc: linux-mm, Andrew Morton, Martin J. Bligh, linux-ia64,
	Mike Kravetz, Luck, Tony

> Yasunori> +static inline unsigned long max_dma_physaddr(void) 
> Yasunori> +{
> Yasunori> + 
> Yasunori> +  if (MAX_DMA_ADDRESS == ~0UL) 
> Yasunori> +	return MAX_DMA_ADDRESS; 
> Yasunori> +  else 
> Yasunori> +	return __pa(MAX_DMA_ADDRESS); 
> Yasunori> +} 
> 
> This code illustrates one of my pet coding-style hates:  there's no
> need for the `else' as the return statement means it'll never be
> reached.
> 
> 	if (MAX_DMA_ADDRESS == ~0UL)
> 	    return MAX_DMA_ADDRESS;
> 	return __pa(MAX_DMA_ADDRESS);
> 
> is all that's needed.

Ok. I modified it.
Thanks for your comment.

Bye.

------------------------------------------------------

This is a patch to guarantee that alloc_bootmem_low() allocate DMA area.

Current alloc_bootmem_low() is just specify "goal=0". And it is 
used for __alloc_bootmem_core() to decide which address is better.
However, there is no guarantee that __alloc_bootmem_core()
allocate DMA area when goal=0 is specified.
Even if there is no DMA'ble area in searching node, it allocates
higher address than MAX_DMA_ADDRESS.

__alloc_bootmem_core() is called by order of for_each_pgdat()
in __alloc_bootmem(). So, if first node (node_id = 0) has
DMA'ble area, no trouble will occur. However, our new Itanium2 server
can change which node has lower address. And panic really occurred on it.
The message was "bounce buffer is not DMA'ble" in swiothl_map_single().

To avoid this panic, following patch confirm allocated area, and retry
if it is not in DMA.
I tested this patch on my Tiger 4 and our new server.


Signed-off by Yasunori Goto <y-goto@jp.fujitsu.com>

-------------------------------------------------------------------
Index: bootmem/mm/bootmem.c
===================================================================
--- bootmem.orig/mm/bootmem.c	2005-08-10 14:34:45.580239280 +0900
+++ bootmem/mm/bootmem.c	2005-08-10 14:34:49.021645488 +0900
@@ -374,10 +374,25 @@ void * __init __alloc_bootmem (unsigned 
 	pg_data_t *pgdat = pgdat_list;
 	void *ptr;
 
-	for_each_pgdat(pgdat)
-		if ((ptr = __alloc_bootmem_core(pgdat->bdata, size,
-						align, goal)))
-			return(ptr);
+	for_each_pgdat(pgdat){
+
+		ptr = __alloc_bootmem_core(pgdat->bdata, size,
+					   align, goal);
+
+		if (!ptr)
+			continue;
+
+		if (goal < max_dma_physaddr() &&
+		    (unsigned long)ptr >= MAX_DMA_ADDRESS){
+			/* DMA area is required, but ptr is not DMA area.
+			   Trying other nodes */
+			free_bootmem_core(pgdat->bdata, virt_to_phys(ptr), size);
+			continue;
+		}
+
+		return(ptr);
+
+	}
 
 	/*
 	 * Whoops, we cannot satisfy the allocation request.
Index: bootmem/include/linux/bootmem.h
===================================================================
--- bootmem.orig/include/linux/bootmem.h	2005-08-10 14:34:45.574379905 +0900
+++ bootmem/include/linux/bootmem.h	2005-08-10 14:35:28.569496566 +0900
@@ -36,6 +36,14 @@ typedef struct bootmem_data {
 					 * up searching */
 } bootmem_data_t;
 
+static inline unsigned long max_dma_physaddr(void)
+{
+
+	if (MAX_DMA_ADDRESS == ~0UL)
+		return MAX_DMA_ADDRESS;
+	return __pa(MAX_DMA_ADDRESS);
+}
+
 extern unsigned long __init bootmem_bootmap_pages (unsigned long);
 extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend);
 extern void __init free_bootmem (unsigned long addr, unsigned long size);
@@ -43,11 +51,11 @@ extern void * __init __alloc_bootmem (un
 #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
 extern void __init reserve_bootmem (unsigned long addr, unsigned long size);
 #define alloc_bootmem(x) \
-	__alloc_bootmem((x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
+	__alloc_bootmem((x), SMP_CACHE_BYTES, max_dma_physaddr())
 #define alloc_bootmem_low(x) \
 	__alloc_bootmem((x), SMP_CACHE_BYTES, 0)
 #define alloc_bootmem_pages(x) \
-	__alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
+	__alloc_bootmem((x), PAGE_SIZE, max_dma_physaddr())
 #define alloc_bootmem_low_pages(x) \
 	__alloc_bootmem((x), PAGE_SIZE, 0)
 #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */
@@ -60,9 +68,9 @@ extern unsigned long __init free_all_boo
 extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal);
 #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
 #define alloc_bootmem_node(pgdat, x) \
-	__alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
+	__alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, max_dma_physaddr())
 #define alloc_bootmem_pages_node(pgdat, x) \
-	__alloc_bootmem_node((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
+	__alloc_bootmem_node((pgdat), (x), PAGE_SIZE, max_dma_physaddr())
 #define alloc_bootmem_low_pages_node(pgdat, x) \
 	__alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0)
 #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */

-- 
Yasunori Goto 

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-10  3:06   ` Dave Hansen
@ 2005-08-10 16:23     ` Dave Hansen
  0 siblings, 0 replies; 16+ messages in thread
From: Dave Hansen @ 2005-08-10 16:23 UTC (permalink / raw)
  To: Mike Kravetz
  Cc: Yasunori Goto, linux-mm, Andrew Morton, Martin J. Bligh,
	ia64 list, Luck, Tony

On Tue, 2005-08-09 at 20:06 -0700, Dave Hansen wrote: 
> On Tue, 2005-08-09 at 14:15 -0700, Mike Kravetz wrote:
> > On Tue, Aug 09, 2005 at 08:11:20PM +0900, Yasunori Goto wrote:
> > > I modified the patch which guarantees allocation of DMA area
> > > at alloc_bootmem_low().
> > 
> > I was going to replace more instances of __pa(MAX_DMA_ADDRESS) with
> > max_dma_physaddr().  However, when grepping for MAX_DMA_ADDRESS I
> > noticed instances of virt_to_phys(MAX_DMA_ADDRESS) as well.  Can
> > someone tell me what the differences are between __pa() and virt_to_phys().

One more thing is the obvious: __pa() is always a macro, and
virt_to_phys() is sometimes a function.  __pa() can, therefore, be used
in assembly.

-- Dave

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-09 21:15 ` Mike Kravetz
  2005-08-10  3:06   ` Dave Hansen
@ 2005-08-11 20:46   ` Christoph Lameter
  2005-08-11 21:14     ` Mike Kravetz
  1 sibling, 1 reply; 16+ messages in thread
From: Christoph Lameter @ 2005-08-11 20:46 UTC (permalink / raw)
  To: Mike Kravetz
  Cc: Yasunori Goto, linux-mm, Andrew Morton, Martin J. Bligh,
	linux-ia64, Luck, Tony

On Tue, 9 Aug 2005, Mike Kravetz wrote:

> I was going to replace more instances of __pa(MAX_DMA_ADDRESS) with
> max_dma_physaddr().  However, when grepping for MAX_DMA_ADDRESS I
> noticed instances of virt_to_phys(MAX_DMA_ADDRESS) as well.  Can
> someone tell me what the differences are between __pa() and virt_to_phys().
> I noticed that on some archs they are the same, but are different on
> others.

On which arches do they differ?

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-11 20:46   ` Christoph Lameter
@ 2005-08-11 21:14     ` Mike Kravetz
  2005-08-11 22:37       ` Christoph Lameter
  0 siblings, 1 reply; 16+ messages in thread
From: Mike Kravetz @ 2005-08-11 21:14 UTC (permalink / raw)
  To: Christoph Lameter
  Cc: Yasunori Goto, linux-mm, Andrew Morton, Martin J. Bligh,
	linux-ia64, Luck, Tony

On Thu, Aug 11, 2005 at 01:46:22PM -0700, Christoph Lameter wrote:
> > I was going to replace more instances of __pa(MAX_DMA_ADDRESS) with
> > max_dma_physaddr().  However, when grepping for MAX_DMA_ADDRESS I
> > noticed instances of virt_to_phys(MAX_DMA_ADDRESS) as well.  Can
> > someone tell me what the differences are between __pa() and virt_to_phys().
> > I noticed that on some archs they are the same, but are different on
> > others.
> 
> On which arches do they differ?

In alphabetical order I first looked at alpha and things didn't look
the same in the '#ifndef USE_48_BIT_KSEG' case.  When I first looked
at this, I quit after looking at alpha.  However, I can't seem to easily
find other archs that differ.

-- 
Mike
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-11 21:14     ` Mike Kravetz
@ 2005-08-11 22:37       ` Christoph Lameter
  0 siblings, 0 replies; 16+ messages in thread
From: Christoph Lameter @ 2005-08-11 22:37 UTC (permalink / raw)
  To: Mike Kravetz
  Cc: Yasunori Goto, linux-mm, Andrew Morton, Martin J. Bligh,
	linux-ia64, Luck, Tony

On Thu, 11 Aug 2005, Mike Kravetz wrote:

> In alphabetical order I first looked at alpha and things didn't look the 
> same in the '#ifndef USE_48_BIT_KSEG' case.  When I first looked at 
> this, I quit after looking at alpha.  However, I can't seem to easily 
> find other archs that differ. -- Mike

Yes, the #ifndef USE_48_BIT_KSEG case is strange. Wonder what is going on 
there. Should _pa() not do the same?


--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-10  6:10   ` Yasunori Goto
@ 2005-08-18 19:52     ` Andrew Morton
  2005-08-18 21:39       ` Andi Kleen
                         ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Andrew Morton @ 2005-08-18 19:52 UTC (permalink / raw)
  To: Yasunori Goto; +Cc: peterc, linux-mm, mbligh, linux-ia64, kravetz, tony.luck

Yasunori Goto <y-goto@jp.fujitsu.com> wrote:
>
> This is a patch to guarantee that alloc_bootmem_low() allocate DMA area.
> 
>  Current alloc_bootmem_low() is just specify "goal=0". And it is 
>  used for __alloc_bootmem_core() to decide which address is better.
>  However, there is no guarantee that __alloc_bootmem_core()
>  allocate DMA area when goal=0 is specified.
>  Even if there is no DMA'ble area in searching node, it allocates
>  higher address than MAX_DMA_ADDRESS.
> 
>  __alloc_bootmem_core() is called by order of for_each_pgdat()
>  in __alloc_bootmem(). So, if first node (node_id = 0) has
>  DMA'ble area, no trouble will occur. However, our new Itanium2 server
>  can change which node has lower address. And panic really occurred on it.
>  The message was "bounce buffer is not DMA'ble" in swiothl_map_single().
> 
>  To avoid this panic, following patch confirm allocated area, and retry
>  if it is not in DMA.
>  I tested this patch on my Tiger 4 and our new server.

It kills my x86_64 box:

 PID hash table entries: 4096 (order: 12, 131072 bytes)
 time.c: Using 14.318180 MHz HPET timer.               
 time.c: Detected 3400.236 MHz processor.
 Console: colour VGA+ 80x25              
 Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
 Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)  
 bootmem alloc of 67108864 bytes failed!                          
 Kernel panic - not syncing: Out of memory

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.13-rc6-mm1
# Thu Aug 18 10:58:14 2005
#
CONFIG_X86_64=y
CONFIG_64BIT=y
CONFIG_X86=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_MMU=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_CMPXCHG=y
CONFIG_EARLY_PRINTK=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32

#
# General setup
#
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_HOTPLUG=y
CONFIG_KOBJECT_UEVENT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CPUSETS=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SHMEM=y
CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0
CONFIG_CC_ALIGN_LOOPS=0
CONFIG_CC_ALIGN_JUMPS=0
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y

#
# Processor type and features
#
# CONFIG_MK8 is not set
CONFIG_MPSC=y
# CONFIG_GENERIC_CPU is not set
CONFIG_X86_L1_CACHE_BYTES=128
CONFIG_X86_L1_CACHE_SHIFT=7
CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y
# CONFIG_MICROCODE is not set
CONFIG_X86_MSR=y
CONFIG_X86_CPUID=y
CONFIG_X86_HT=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_MTRR=y
CONFIG_SMP=y
CONFIG_SCHED_SMT=y
CONFIG_ATOMIC_TABLE_OPS=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_BKL=y
# CONFIG_K8_NUMA is not set
# CONFIG_NUMA_EMU is not set
# CONFIG_NUMA is not set
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
CONFIG_HAVE_DEC_LOCK=y
CONFIG_NR_CPUS=4
# CONFIG_HOTPLUG_CPU is not set
CONFIG_HPET_TIMER=y
CONFIG_X86_PM_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_GART_IOMMU=y
CONFIG_SWIOTLB=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_INTEL=y
CONFIG_PHYSICAL_START=0x100000
# CONFIG_KEXEC is not set
CONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_ISA_DMA_API=y
CONFIG_GENERIC_PENDING_IRQ=y

#
# Power management options
#
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
# CONFIG_SOFTWARE_SUSPEND is not set

#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_HOTKEY=m
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_ASUS=m
CONFIG_ACPI_IBM=m
CONFIG_ACPI_TOSHIBA=m
CONFIG_ACPI_BLACKLIST_YEAR=0
CONFIG_ACPI_DEBUG=y
CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
# CONFIG_ACPI_CONTAINER is not set

#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
# CONFIG_UNORDERED_IO is not set
# CONFIG_PCIEPORTBUS is not set
# CONFIG_PCI_MSI is not set
# CONFIG_PCI_LEGACY_PROC is not set
# CONFIG_PCI_DEBUG is not set

#
# PCCARD (PCMCIA/CardBus) support
#
CONFIG_PCCARD=m
# CONFIG_PCMCIA_DEBUG is not set
CONFIG_PCMCIA=m
CONFIG_PCMCIA_LOAD_CIS=y
CONFIG_PCMCIA_IOCTL=y
CONFIG_CARDBUS=y

#
# PC-card bridges
#
CONFIG_YENTA=m
# CONFIG_PD6729 is not set
# CONFIG_I82092 is not set
# CONFIG_TCIC is not set
CONFIG_PCCARD_NONSTATIC=m

#
# PCI Hotplug Support
#
# CONFIG_HOTPLUG_PCI is not set

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
CONFIG_IA32_EMULATION=y
CONFIG_IA32_AOUT=y
CONFIG_COMPAT=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_UID16=y

#
# Performance-monitoring counters support
#
# CONFIG_PERFCTR is not set

#
# Networking
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_TUNNEL is not set
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
CONFIG_TCP_CONG_ADVANCED=y

#
# TCP congestion control
#
CONFIG_TCP_CONG_BIC=y
CONFIG_TCP_CONG_WESTWOOD=m
CONFIG_TCP_CONG_HTCP=y
# CONFIG_TCP_CONG_HSTCP is not set
# CONFIG_TCP_CONG_HYBLA is not set
# CONFIG_TCP_CONG_VEGAS is not set
# CONFIG_TCP_CONG_SCALABLE is not set
CONFIG_IPV6=y
# CONFIG_IPV6_PRIVACY is not set
# CONFIG_INET6_AH is not set
# CONFIG_INET6_ESP is not set
# CONFIG_INET6_IPCOMP is not set
# CONFIG_INET6_TUNNEL is not set
# CONFIG_IPV6_TUNNEL is not set
# CONFIG_NETFILTER is not set

#
# DCCP Configuration (EXPERIMENTAL)
#
# CONFIG_IP_DCCP is not set

#
# SCTP Configuration (EXPERIMENTAL)
#
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_SCHED is not set
# CONFIG_NET_CLS_ROUTE is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NETFILTER_NETLINK is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_IEEE80211 is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
# CONFIG_DEBUG_DRIVER is not set

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set

#
# Parallel port support
#
# CONFIG_PARPORT is not set

#
# Plug and Play support
#
# CONFIG_PNP is not set

#
# Block devices
#
CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_SX8=m
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=m
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=2000000
CONFIG_LBD=y
# CONFIG_CDROM_PKTCDVD is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_ATA_OVER_ETH=m

#
# ATA/ATAPI/MFM/RLL support
#
# CONFIG_IDE is not set

#
# SCSI device support
#
CONFIG_SCSI=y
# CONFIG_SCSI_PROC_FS is not set

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
CONFIG_CHR_DEV_SG=y
# CONFIG_CHR_DEV_SCH is not set

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set

#
# SCSI Transport Attributes
#
CONFIG_SCSI_SPI_ATTRS=y
CONFIG_SCSI_FC_ATTRS=y
# CONFIG_SCSI_ISCSI_ATTRS is not set

#
# SCSI low-level drivers
#
CONFIG_BLK_DEV_3W_XXXX_RAID=y
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
CONFIG_SCSI_AIC79XX=y
CONFIG_AIC79XX_CMDS_PER_DEVICE=64
CONFIG_AIC79XX_RESET_DELAY_MS=1500
# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
CONFIG_AIC79XX_DEBUG_ENABLE=y
CONFIG_AIC79XX_DEBUG_MASK=0
CONFIG_AIC79XX_REG_PRETTY_PRINT=y
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
CONFIG_SCSI_SATA=y
# CONFIG_SCSI_ATA_ADMA is not set
# CONFIG_SCSI_SATA_AHCI is not set
# CONFIG_SCSI_SATA_SVW is not set
CONFIG_SCSI_ATA_PIIX=y
CONFIG_SCSI_SATA_NV=m
# CONFIG_SCSI_SATA_PROMISE is not set
# CONFIG_SCSI_SATA_QSTOR is not set
# CONFIG_SCSI_SATA_SX4 is not set
# CONFIG_SCSI_SATA_SIL is not set
# CONFIG_SCSI_SATA_SIS is not set
# CONFIG_SCSI_SATA_ULI is not set
CONFIG_SCSI_SATA_VIA=y
# CONFIG_SCSI_SATA_VITESSE is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
CONFIG_SCSI_QLA2XXX=y
# CONFIG_SCSI_QLA21XX is not set
# CONFIG_SCSI_QLA22XX is not set
# CONFIG_SCSI_QLA2300 is not set
# CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_QLA6312 is not set
# CONFIG_SCSI_QLA24XX is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_DEBUG is not set

#
# PCMCIA SCSI adapter support
#
# CONFIG_PCMCIA_FDOMAIN is not set
# CONFIG_PCMCIA_QLOGIC is not set
# CONFIG_PCMCIA_SYM53C500 is not set

#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set

#
# Fusion MPT device support
#
# CONFIG_FUSION is not set
# CONFIG_FUSION_SPI is not set
# CONFIG_FUSION_FC is not set

#
# IEEE 1394 (FireWire) support
#
# CONFIG_IEEE1394 is not set

#
# I2O device support
#
# CONFIG_I2O is not set

#
# Network device support
#
CONFIG_NETDEVICES=y
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set

#
# ARCnet devices
#
# CONFIG_ARCNET is not set

#
# PHY device support
#
# CONFIG_PHYLIB is not set

#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set

#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
CONFIG_AMD8111_ETH=y
# CONFIG_AMD8111E_NAPI is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
CONFIG_FORCEDETH=y
# CONFIG_DGRS is not set
# CONFIG_EEPRO100 is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
CONFIG_8139CP=m
CONFIG_8139TOO=m
# CONFIG_8139TOO_PIO is not set
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set
# CONFIG_8139_OLD_RX_RESET is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_VIA_RHINE is not set

#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
CONFIG_E1000=y
# CONFIG_E1000_NAPI is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SK98LIN is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2 is not set

#
# Ethernet (10000 Mbit)
#
# CONFIG_CHELSIO_T1 is not set
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set

#
# Token Ring devices
#
# CONFIG_TR is not set

#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set

#
# PCMCIA network device support
#
CONFIG_NET_PCMCIA=y
CONFIG_PCMCIA_3C589=m
CONFIG_PCMCIA_3C574=m
CONFIG_PCMCIA_FMVJ18X=m
CONFIG_PCMCIA_PCNET=m
CONFIG_PCMCIA_NMCLAN=m
CONFIG_PCMCIA_SMC91C92=m
CONFIG_PCMCIA_XIRC2PS=m
CONFIG_PCMCIA_AXNET=m

#
# Wan interfaces
#
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
CONFIG_NETCONSOLE=y
# CONFIG_KGDBOE is not set
CONFIG_NETPOLL=y
# CONFIG_NETPOLL_RX is not set
# CONFIG_NETPOLL_TRAP is not set
CONFIG_NET_POLL_CONTROLLER=y

#
# ISDN subsystem
#
# CONFIG_ISDN is not set

#
# Telephony Support
#
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_TSDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_CS is not set
CONFIG_SERIAL_8250_ACPI=y
CONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256

#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set

#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
CONFIG_HW_RANDOM=y
# CONFIG_NVRAM is not set
CONFIG_RTC=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set

#
# Ftape, the floppy tape device driver
#
CONFIG_AGP=y
CONFIG_AGP_AMD64=y
# CONFIG_AGP_INTEL is not set
# CONFIG_DRM is not set

#
# PCMCIA character devices
#
# CONFIG_SYNCLINK_CS is not set
# CONFIG_MWAVE is not set
CONFIG_RAW_DRIVER=y
CONFIG_HPET=y
# CONFIG_HPET_RTC_IRQ is not set
# CONFIG_HPET_MMAP is not set
CONFIG_MAX_RAW_DEVS=256
CONFIG_HANGCHECK_TIMER=y

#
# TPM devices
#
# CONFIG_TCG_TPM is not set

#
# I2C support
#
# CONFIG_I2C is not set

#
# Dallas's 1-wire bus
#
CONFIG_W1=m
CONFIG_W1_MATROX=m
# CONFIG_W1_DS9490 is not set
CONFIG_W1_THERM=m
# CONFIG_W1_SMEM is not set
# CONFIG_W1_DS2433 is not set

#
# Hardware Monitoring support
#
CONFIG_HWMON=y
# CONFIG_HWMON_VID is not set
# CONFIG_HWMON_DEBUG_CHIP is not set

#
# Misc devices
#
# CONFIG_IBM_ASM is not set

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set

#
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set

#
# Graphics support
#
# CONFIG_FB is not set
# CONFIG_VIDEO_SELECT is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y

#
# Speakup console speech
#
# CONFIG_SPEAKUP is not set

#
# Sound
#
CONFIG_SOUND=y

#
# Advanced Linux Sound Architecture
#
# CONFIG_SND is not set

#
# Open Sound System
#
CONFIG_SOUND_PRIME=y
# CONFIG_OBSOLETE_OSS_DRIVER is not set
# CONFIG_SOUND_FUSION is not set
CONFIG_SOUND_ICH=y
# CONFIG_SOUND_TRIDENT is not set
# CONFIG_SOUND_MSNDCLAS is not set
# CONFIG_SOUND_MSNDPIN is not set
# CONFIG_SOUND_OSS is not set

#
# USB support
#
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_SUSPEND is not set
# CONFIG_USB_OTG is not set

#
# USB Host Controller Drivers
#
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_SPLIT_ISO=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
# CONFIG_USB_ISP116X_HCD is not set
CONFIG_USB_OHCI_HCD=y
# CONFIG_USB_OHCI_BIG_ENDIAN is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=y
# CONFIG_USB_SL811_HCD is not set

#
# USB Device Class drivers
#
# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
CONFIG_USB_BLUETOOTH_TTY=m
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m

#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set

#
# USB Input Devices
#
CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT=y
# CONFIG_HID_FF is not set
# CONFIG_USB_HIDDEV is not set

#
# USB HID Boot Protocol drivers
#
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not set
# CONFIG_USB_AIPTEK is not set
# CONFIG_USB_WACOM is not set
# CONFIG_USB_ACECAD is not set
# CONFIG_USB_KBTAB is not set
# CONFIG_USB_POWERMATE is not set
# CONFIG_USB_MTOUCH is not set
# CONFIG_USB_ITMTOUCH is not set
# CONFIG_USB_EGALAX is not set
# CONFIG_USB_YEALINK is not set
# CONFIG_USB_XPAD is not set
# CONFIG_USB_ATI_REMOTE is not set
# CONFIG_USB_KEYSPAN_REMOTE is not set
# CONFIG_USB_APPLETOUCH is not set

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set

#
# USB Multimedia devices
#
# CONFIG_USB_DABUSB is not set

#
# Video4Linux support is needed for USB Multimedia device support
#

#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
CONFIG_USB_MON=y

#
# USB port drivers
#

#
# USB Serial Converter support
#
# CONFIG_USB_SERIAL is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_GOTEMP is not set
# CONFIG_USB_PHIDGETKIT is not set
# CONFIG_USB_PHIDGETSERVO is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TEST is not set

#
# USB DSL modem support
#

#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set

#
# MMC/SD Card support
#
# CONFIG_MMC is not set

#
# InfiniBand support
#
# CONFIG_INFINIBAND is not set

#
# SN Devices
#

#
# Distributed Lock Manager
#
# CONFIG_DLM is not set

#
# Firmware Drivers
#
# CONFIG_EDD is not set
CONFIG_DELL_RBU=m

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
# CONFIG_EXT2_FS_SECURITY is not set
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISER4_FS is not set
CONFIG_REISERFS_FS=y
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_REISERFS_FS_XATTR is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y

#
# XFS support
#
# CONFIG_XFS_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_INOTIFY=y
# CONFIG_QUOTA is not set
CONFIG_DNOTIFY=y
CONFIG_AUTOFS_FS=y
# CONFIG_AUTOFS4_FS is not set
# CONFIG_FUSE_FS is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_ZISOFS is not set
# CONFIG_UDF_FS is not set

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y
# CONFIG_TMPFS_XATTR is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y
# CONFIG_CONFIGFS_FS is not set
# CONFIG_RELAYFS_FS is not set

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_ASFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_NFSD_TCP=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
# CONFIG_9P_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y

#
# Native Language Support
#
CONFIG_NLS=m
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set

#
# Profiling support
#
CONFIG_PROFILING=y
CONFIG_OPROFILE=y

#
# Kernel hacking
#
# CONFIG_PRINTK_TIME is not set
CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_SCHEDSTATS is not set
CONFIG_DEBUG_SLAB=y
CONFIG_DEBUG_PREEMPT=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_SPINLOCK_SLEEP=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_INFO=y
# CONFIG_PAGE_OWNER is not set
# CONFIG_DEBUG_FS is not set
CONFIG_FRAME_POINTER=y
CONFIG_INIT_DEBUG=y
# CONFIG_IOMMU_DEBUG is not set
# CONFIG_KPROBES is not set
# CONFIG_KGDB is not set

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set

#
# Cryptographic options
#
# CONFIG_CRYPTO is not set

#
# Hardware crypto devices
#

#
# Library routines
#
# CONFIG_CRC_CCITT is not set
CONFIG_CRC32=y
# CONFIG_LIBCRC32C is not set

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-18 19:52     ` Andrew Morton
@ 2005-08-18 21:39       ` Andi Kleen
  2005-08-19  2:29         ` Yasunori Goto
  2005-08-19  1:26       ` Yasunori Goto
  2005-08-25  9:15       ` Yasunori Goto
  2 siblings, 1 reply; 16+ messages in thread
From: Andi Kleen @ 2005-08-18 21:39 UTC (permalink / raw)
  To: Andrew Morton; +Cc: peterc, linux-mm, mbligh, linux-ia64, kravetz, tony.luck

Andrew Morton <akpm@osdl.org> writes:
> > 
> >  To avoid this panic, following patch confirm allocated area, and retry
> >  if it is not in DMA.
> >  I tested this patch on my Tiger 4 and our new server.
> 
> It kills my x86_64 box:


Funny I ran into a similar problem recently. On a multi node x86-64
system when swiotlb is forced (normally those are AMD systems which
use the AMD hardware IOMMU) the bootmem_alloc in swiotlb.c would
allocate from the last node. Why? Because alloc_bootmem just
does for_each_pgdat() and tries each node and the pgdat list
starts with the highest node going down to the lowest.

I just changed the ordering of the pgdat list that made bootmem 
work again.

-Andi

Index: linux/mm/bootmem.c
===================================================================
--- linux.orig/mm/bootmem.c
+++ linux/mm/bootmem.c
@@ -61,9 +61,17 @@ static unsigned long __init init_bootmem
 {
 	bootmem_data_t *bdata = pgdat->bdata;
 	unsigned long mapsize = ((end - start)+7)/8;
+	static struct pglist_data *pgdat_last;
 
-	pgdat->pgdat_next = pgdat_list;
-	pgdat_list = pgdat;
+	pgdat->pgdat_next = NULL;
+	/* Add new nodes last so that bootmem always starts 
+	   searching in the first nodes, not the last ones */
+	if (pgdat_last)
+		pgdat_last->pgdat_next = pgdat;
+	else {
+		pgdat_list = pgdat; 	
+		pgdat_last = pgdat;
+	}
 
 	mapsize = ALIGN(mapsize, sizeof(long));
 	bdata->node_bootmem_map = phys_to_virt(mapstart << PAGE_SHIFT);
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-18 19:52     ` Andrew Morton
  2005-08-18 21:39       ` Andi Kleen
@ 2005-08-19  1:26       ` Yasunori Goto
  2005-08-25  9:15       ` Yasunori Goto
  2 siblings, 0 replies; 16+ messages in thread
From: Yasunori Goto @ 2005-08-19  1:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: peterc, linux-mm, mbligh, linux-ia64, kravetz, tony.luck

> >  To avoid this panic, following patch confirm allocated area, and retry
> >  if it is not in DMA.
> >  I tested this patch on my Tiger 4 and our new server.
> 
> It kills my x86_64 box:
> 
>  PID hash table entries: 4096 (order: 12, 131072 bytes)
>  time.c: Using 14.318180 MHz HPET timer.               
>  time.c: Detected 3400.236 MHz processor.
>  Console: colour VGA+ 80x25              
>  Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
>  Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)  
>  bootmem alloc of 67108864 bytes failed!                          
>  Kernel panic - not syncing: Out of memory

Thank you for your notification.

Unfortunately, I don't have x86_64 box. So, I can't trace its cause now.
I guess 67Mbyte allocation size might be trigger of its panic.
Hmm... :-(

Thanks.
-- 
Yasunori Goto 

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-18 21:39       ` Andi Kleen
@ 2005-08-19  2:29         ` Yasunori Goto
  2005-08-19  3:03           ` Andi Kleen
  0 siblings, 1 reply; 16+ messages in thread
From: Yasunori Goto @ 2005-08-19  2:29 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Andrew Morton, peterc, linux-mm, mbligh, linux-ia64, kravetz, tony.luck

Hi, Andi-san.

> Andrew Morton <akpm@osdl.org> writes:
> > > 
> > >  To avoid this panic, following patch confirm allocated area, and retry
> > >  if it is not in DMA.
> > >  I tested this patch on my Tiger 4 and our new server.
> > 
> > It kills my x86_64 box:
> 
> 
> Funny I ran into a similar problem recently. On a multi node x86-64
> system when swiotlb is forced (normally those are AMD systems which
> use the AMD hardware IOMMU) the bootmem_alloc in swiotlb.c would
> allocate from the last node. Why? Because alloc_bootmem just
> does for_each_pgdat() and tries each node and the pgdat list
> starts with the highest node going down to the lowest.
> 
> I just changed the ordering of the pgdat list that made bootmem 
> work again.

It was another candidate for modification indeed.
But, if new node is hot-added (I'm working for it),
pgdat list should be sorted by order of memory.
I suppose it is a bit messy.
At least, I think the order of pgdat link list must not depend on 
memory address.

To hot-add a node, it is better that pgdat link list is removed.
(Hot add code will set JUST node_online_map by it.)
I posted a patch to remove this link list 3 month ago.
http://marc.theaimsgroup.com/?l=linux-mm&m=111596924629564&w=2
http://marc.theaimsgroup.com/?l=linux-mm&m=111596953711780&w=2

Thanks for your comment. 
Bye.

> 
> Index: linux/mm/bootmem.c
> ===================================================================
> --- linux.orig/mm/bootmem.c
> +++ linux/mm/bootmem.c
> @@ -61,9 +61,17 @@ static unsigned long __init init_bootmem
>  {
>  	bootmem_data_t *bdata = pgdat->bdata;
>  	unsigned long mapsize = ((end - start)+7)/8;
> +	static struct pglist_data *pgdat_last;
>  
> -	pgdat->pgdat_next = pgdat_list;
> -	pgdat_list = pgdat;
> +	pgdat->pgdat_next = NULL;
> +	/* Add new nodes last so that bootmem always starts 
> +	   searching in the first nodes, not the last ones */
> +	if (pgdat_last)
> +		pgdat_last->pgdat_next = pgdat;
> +	else {
> +		pgdat_list = pgdat; 	
> +		pgdat_last = pgdat;
> +	}
>  
>  	mapsize = ALIGN(mapsize, sizeof(long));
>  	bdata->node_bootmem_map = phys_to_virt(mapstart << PAGE_SHIFT);

-- 
Yasunori Goto 

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-19  2:29         ` Yasunori Goto
@ 2005-08-19  3:03           ` Andi Kleen
  0 siblings, 0 replies; 16+ messages in thread
From: Andi Kleen @ 2005-08-19  3:03 UTC (permalink / raw)
  To: Yasunori Goto
  Cc: Andi Kleen, Andrew Morton, peterc, linux-mm, mbligh, linux-ia64,
	kravetz, tony.luck

On Fri, Aug 19, 2005 at 11:29:32AM +0900, Yasunori Goto wrote:
> To hot-add a node, it is better that pgdat link list is removed.
> (Hot add code will set JUST node_online_map by it.)
> I posted a patch to remove this link list 3 month ago.
> http://marc.theaimsgroup.com/?l=linux-mm&m=111596924629564&w=2
> http://marc.theaimsgroup.com/?l=linux-mm&m=111596953711780&w=2

Agreed that's a better solution than my patch, and should
fix that bug too.

-Andi
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.
  2005-08-18 19:52     ` Andrew Morton
  2005-08-18 21:39       ` Andi Kleen
  2005-08-19  1:26       ` Yasunori Goto
@ 2005-08-25  9:15       ` Yasunori Goto
  2 siblings, 0 replies; 16+ messages in thread
From: Yasunori Goto @ 2005-08-25  9:15 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, mbligh, kravetz, Andi Kleen

Hello. Andrew-san.

I could rent a x86_64 box, and tried this panic.
But, it hasn't occurred in my box.
Could you add following patch and retry with my previous one
to get more information?

Your .config didn't set CONFIG_NUMA, so kernel tried allocation
just one node which had all of memory.
And your console message displayed that required size was 67Mbytes.
Now, I guess that one function called alloc_bootmem_low() 
by size = 67Mbytes. But, it is impossible because x86_64's DMA area
size is just 16Mbytes. So, caller got "non DMA" area in spite of
its requirement in current code, but my patch refused it and panic was
occured.

I would like to make sure my assumption and would like to know
which function call it.

Thanks.


Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
---

 alloc_bootmem-goto/mm/bootmem.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -puN mm/bootmem.c~info mm/bootmem.c
--- alloc_bootmem/mm/bootmem.c~info	2005-08-24 20:30:57.000000000 +0900
+++ alloc_bootmem-goto/mm/bootmem.c	2005-08-24 20:38:12.000000000 +0900
@@ -410,7 +410,9 @@ void * __init __alloc_bootmem (unsigned 
 	/*
 	 * Whoops, we cannot satisfy the allocation request.
 	 */
-	printk(KERN_ALERT "bootmem alloc of %lu bytes failed!\n", size);
+	printk(KERN_ALERT "bootmem alloc of %lu bytes %s failed!\n",
+	       size, goal < max_dma_physaddr() ? "DMA" : "No DMA");
+	dump_stack();
 	panic("Out of memory");
 	return NULL;
 }
_

-- 
Yasunori Goto 

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2005-08-25  9:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-09 11:11 [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2 Yasunori Goto
2005-08-09 15:05 ` Martin J. Bligh
2005-08-09 21:15 ` Mike Kravetz
2005-08-10  3:06   ` Dave Hansen
2005-08-10 16:23     ` Dave Hansen
2005-08-11 20:46   ` Christoph Lameter
2005-08-11 21:14     ` Mike Kravetz
2005-08-11 22:37       ` Christoph Lameter
2005-08-09 23:02 ` Peter Chubb
2005-08-10  6:10   ` Yasunori Goto
2005-08-18 19:52     ` Andrew Morton
2005-08-18 21:39       ` Andi Kleen
2005-08-19  2:29         ` Yasunori Goto
2005-08-19  3:03           ` Andi Kleen
2005-08-19  1:26       ` Yasunori Goto
2005-08-25  9:15       ` Yasunori Goto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox