Skip to contentSkip to conversation

mm: EXPORT_SYMBOL_GPL(find_vm_area);

PATCH In review Sakari Ailus 3 participants 5 messages Nov 11, 2015 – Jan 15, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: EXPORT_SYMBOL_GPL(find_vm_area);

find_vm_area() is needed in implementing the DMA mapping API as a module. Device specific IOMMUs with associated DMA mapping implementations should be buildable as modules.

---
 mm/vmalloc.c | 1 +
 1 file changed, 1 insertion(+)
mm/vmalloc.c +1 -0
index 2faaa29..d06db45 100644
@@ -1416,6 +1416,7 @@ struct vm_struct *find_vm_area(const void *addr)
 
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(find_vm_area);
 
 /**
  *	remove_vm_area  -  find and remove a continuous kernel virtual area
Signature · 7 lines
2.1.0.231.g7484e3b

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
maintainer
#1 lore raw

mm/vmalloc.c struct vm_struct *find_vm_area(const void *addr) · line 1419

Quoted 13 lines · On Wed, 11 Nov 2015 15:06:24 +0200 Sakari Ailus <[email protected]>…

find_vm_area() is needed in implementing the DMA mapping API as a module. Device specific IOMMUs with associated DMA mapping implementations should be buildable as modules.

...

mm/vmalloc.c +1 -0
@@ -1416,6 +1416,7 @@ struct vm_struct *find_vm_area(const void *addr)
 
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(find_vm_area);

Confused. Who is setting CONFIG_HAS_DMA=m?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw

Hi Andrew,

Quoted 12 lines · Andrew Morton
Quoted 10 lines · On Wed, 11 Nov 2015 15:06:24 +0200 Sakari Ailus <[email protected]>…

find_vm_area() is needed in implementing the DMA mapping API as a module. Device specific IOMMUs with associated DMA mapping implementations should be buildable as modules.

...

mm/vmalloc.c +0 -0
@@ -1416,6 +1416,7 @@ struct vm_struct *find_vm_area(const void *addr)
 
Quoted 6 lines

mm/vmalloc.c struct vm_struct *find_vm_area(const void *addr) · line 1419

Quoted 3 lines
mm/vmalloc.c +1 -0
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(find_vm_area);

Confused. Who is setting CONFIG_HAS_DMA=m?

Apologies for the late reply --- CONFIG_HAS_DMA isn't configured as a module, but some devices are not DMA coherent even on x86. The existing x86 DMA mapping implementation doesn't quite work for those at the moment, and nothing prevents using another one (and as a module, in which case this patch is required).

Signature · 10 lines
Kind regards,

Sakari Ailus
[email protected]

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
maintainer
#3 lore raw
Quoted 22 lines · On Mon, 11 Jan 2016 15:00:46 +0200 Sakari Ailus <[email protected]>…

Hi Andrew,

Quoted 12 lines · Andrew Morton
Quoted 10 lines · On Wed, 11 Nov 2015 15:06:24 +0200 Sakari Ailus <[email protected]>…

find_vm_area() is needed in implementing the DMA mapping API as a module. Device specific IOMMUs with associated DMA mapping implementations should be buildable as modules.

...

mm/vmalloc.c +0 -0
@@ -1416,6 +1416,7 @@ struct vm_struct *find_vm_area(const void *addr)
 
Quoted 6 lines

mm/vmalloc.c struct vm_struct *find_vm_area(const void *addr) · line 1419

Quoted 3 lines
mm/vmalloc.c +1 -0
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(find_vm_area);

Confused. Who is setting CONFIG_HAS_DMA=m?

Quoted 5 lines

Apologies for the late reply --- CONFIG_HAS_DMA isn't configured as a module, but some devices are not DMA coherent even on x86. The existing x86 DMA mapping implementation doesn't quite work for those at the moment, and nothing prevents using another one (and as a module, in which case this patch is required).

hm, if you say so.

Please resend the patch sometime along with a much much more detailed changelog? If at all appropriate please cc the x86 maintainers so they can understand why the current DMA mapping implementation is inappropriate for whatever this requirement is.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#4 lore raw
In reply to Sakari Ailus
Quoted 22 lines · Sakari Ailus

Hi Andrew,

Quoted 12 lines · Andrew Morton
Quoted 10 lines · On Wed, 11 Nov 2015 15:06:24 +0200 Sakari Ailus <[email protected]>…

find_vm_area() is needed in implementing the DMA mapping API as a module. Device specific IOMMUs with associated DMA mapping implementations should be buildable as modules.

...

mm/vmalloc.c +0 -0
@@ -1416,6 +1416,7 @@ struct vm_struct *find_vm_area(const void *addr)
 
Quoted 6 lines

mm/vmalloc.c struct vm_struct *find_vm_area(const void *addr) · line 1419

Quoted 3 lines
mm/vmalloc.c +1 -0
     return NULL;
 }
+EXPORT_SYMBOL_GPL(find_vm_area);

Confused. Who is setting CONFIG_HAS_DMA=m?

Quoted 5 lines

Apologies for the late reply --- CONFIG_HAS_DMA isn't configured as a module, but some devices are not DMA coherent even on x86. The existing x86 DMA mapping implementation doesn't quite work for those at the moment, and nothing prevents using another one (and as a module, in which case this patch is required).

Why not teach the DMA mapping api how to do cache management for such devices? Why would you need find_vm_area() exported?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>