Skip to contentSkip to conversation

microblaze: dma-mapping: support debug_dma_mapping_error

PATCH In review Shuah Khan 2 participants 6 messages Oct 25, 2012 – Nov 15, 2012 Microblaze architecture

lore
Share & tools
lore

Shuah Khan

author
#0 lore raw

PATCH 1/1 microblaze: dma-mapping: support debug_dma_mapping_error

Add support for debug_dma_mapping_error() call to avoid warning from debug_dma_unmap() interface when it checks for mapping error checked status. Without this patch, device driver failed to check map error warning is generated.

---
 arch/microblaze/include/asm/dma-mapping.h |    1 +
 1 file changed, 1 insertion(+)
arch/microblaze/include/asm/dma-mapping.h +1 -0
index 01d2282..4451c7a 100644
@@ -114,6 +114,7 @@ static inline void __dma_sync(unsigned long paddr,
 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
 {
 	struct dma_map_ops *ops = get_dma_ops(dev);
+	debug_dma_mapping_error(dev, dma_addr);
 	if (ops->mapping_error)
 		return ops->mapping_error(dev, dma_addr);
 
Signature · 1 line
1.7.9.5
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Shuah Khan

Add support for debug_dma_mapping_error() call to avoid warning from debug_dma_unmap() interface when it checks for mapping error checked status. Without this patch, device driver failed to check map error warning is generated.

---
  arch/microblaze/include/asm/dma-mapping.h |    1 +
  1 file changed, 1 insertion(+)
arch/microblaze/include/asm/dma-mapping.h +0 -0
index 01d2282..4451c7a 100644

arch/microblaze/include/asm/dma-mapping.h static inline void __dma_sync(unsigned long paddr, · line 116

Quoted 3 lines
arch/microblaze/include/asm/dma-mapping.h +0 -0
@@ -114,6 +114,7 @@ static inline void __dma_sync(unsigned long paddr,
  static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
  {
  	struct dma_map_ops *ops = get_dma_ops(dev);

here should be empty line.

arch/microblaze/include/asm/dma-mapping.h static inline void __dma_sync(unsigned long paddr, · line 119

Quoted 3 lines
arch/microblaze/include/asm/dma-mapping.h +1 -0
+	debug_dma_mapping_error(dev, dma_addr);
  	if (ops->mapping_error)
  		return ops->mapping_error(dev, dma_addr);

Patch looks good to me. I was greping the latest mainline tree and I can't see reference to debug_dma_mapping_error. Can you tell me where this function is implemented.
I have also seen that you have sent several similar patches like this.

If you want to add it through any other tree here is my ACK:

I will definitely keep my eyes on it.

Thanks,
Michal

Signature · 4 lines
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
author
#2 lore raw
Quoted 31 lines · Michal Simek
Quoted 15 lines · Shuah Khan

Add support for debug_dma_mapping_error() call to avoid warning from debug_dma_unmap() interface when it checks for mapping error checked status. Without this patch, device driver failed to check map error warning is generated.

---
  arch/microblaze/include/asm/dma-mapping.h |    1 +
  1 file changed, 1 insertion(+)
arch/microblaze/include/asm/dma-mapping.h +0 -0
index 01d2282..4451c7a 100644

arch/microblaze/include/asm/dma-mapping.h static inline void __dma_sync(unsigned long paddr, · line 116

Quoted 3 lines
arch/microblaze/include/asm/dma-mapping.h +0 -0
@@ -114,6 +114,7 @@ static inline void __dma_sync(unsigned long paddr,
  static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
  {
  	struct dma_map_ops *ops = get_dma_ops(dev);

here should be empty line.

arch/microblaze/include/asm/dma-mapping.h static inline void __dma_sync(unsigned long paddr, · line 119

Quoted 3 lines
arch/microblaze/include/asm/dma-mapping.h +1 -0
+	debug_dma_mapping_error(dev, dma_addr);
  	if (ops->mapping_error)
  		return ops->mapping_error(dev, dma_addr);

Patch looks good to me. I was greping the latest mainline tree and I can't see reference to debug_dma_mapping_error. Can you tell me where this function is implemented.
I have also seen that you have sent several similar patches like this.

Quoted 5 lines

If you want to add it through any other tree here is my ACK:

I will definitely keep my eyes on it.

debug_dma_mapping_error() patch is in linux-next. I probably should send all of these patches marked explicitly for linux-next.

Thanks,
-- Shuah

author
#3 lore raw

PATCH v2 1/1 microblaze: dma-mapping: support debug_dma_mapping_error

Add support for debug_dma_mapping_error() call to avoid warning from debug_dma_unmap() interface when it checks for mapping error checked status. Without this patch, device driver failed to check map error warning is generated.

---
 arch/microblaze/include/asm/dma-mapping.h |    2 ++
 1 file changed, 2 insertions(+)
arch/microblaze/include/asm/dma-mapping.h +2 -0
index 01d2282..46460f1 100644
@@ -114,6 +114,8 @@ static inline void __dma_sync(unsigned long paddr,
 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
 {
 	struct dma_map_ops *ops = get_dma_ops(dev);
+
+	debug_dma_mapping_error(dev, dma_addr);
 	if (ops->mapping_error)
 		return ops->mapping_error(dev, dma_addr);
 
Signature · 1 line
1.7.9.5
author
#4 lore raw
Quoted 7 lines · Shuah Khan

Add support for debug_dma_mapping_error() call to avoid warning from debug_dma_unmap() interface when it checks for mapping error checked status. Without this patch, device driver failed to check map error warning is generated.

Marek,

This is for microblaze to go through your tree.

Thanks,
-- Shuah

Quoted 17 lines
---
 arch/microblaze/include/asm/dma-mapping.h |    2 ++
 1 file changed, 2 insertions(+)
arch/microblaze/include/asm/dma-mapping.h +2 -0
index 01d2282..46460f1 100644
@@ -114,6 +114,8 @@ static inline void __dma_sync(unsigned long paddr,
 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
 {
 	struct dma_map_ops *ops = get_dma_ops(dev);
+
+	debug_dma_mapping_error(dev, dma_addr);
 	if (ops->mapping_error)
 		return ops->mapping_error(dev, dma_addr);
 
maintainer
#5 lore raw
In reply to Shuah Khan
Quoted 32 lines · Shuah Khan
Quoted 31 lines · Michal Simek
Quoted 15 lines · Shuah Khan

Add support for debug_dma_mapping_error() call to avoid warning from debug_dma_unmap() interface when it checks for mapping error checked status. Without this patch, device driver failed to check map error warning is generated.

---
   arch/microblaze/include/asm/dma-mapping.h |    1 +
   1 file changed, 1 insertion(+)
arch/microblaze/include/asm/dma-mapping.h +0 -0
index 01d2282..4451c7a 100644

arch/microblaze/include/asm/dma-mapping.h static inline void __dma_sync(unsigned long paddr, · line 116

Quoted 3 lines
arch/microblaze/include/asm/dma-mapping.h +0 -0
@@ -114,6 +114,7 @@ static inline void __dma_sync(unsigned long paddr,
   static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
   {
   	struct dma_map_ops *ops = get_dma_ops(dev);

here should be empty line.

arch/microblaze/include/asm/dma-mapping.h static inline void __dma_sync(unsigned long paddr, · line 119

Quoted 3 lines
arch/microblaze/include/asm/dma-mapping.h +1 -0
+	debug_dma_mapping_error(dev, dma_addr);
   	if (ops->mapping_error)
   		return ops->mapping_error(dev, dma_addr);

Patch looks good to me. I was greping the latest mainline tree and I can't see reference to debug_dma_mapping_error. Can you tell me where this function is implemented.
I have also seen that you have sent several similar patches like this.

Quoted 8 lines
Quoted 5 lines

If you want to add it through any other tree here is my ACK:

I will definitely keep my eyes on it.

debug_dma_mapping_error() patch is in linux-next. I probably should send all of these patches marked explicitly for linux-next.

Ok. It means that this patch should be added to the tree which contains this patch. You can find it out through linux-next.

What it is interesting to me is that arm tree has it there but implementation is missing in Linus tree.

[linux-2.6.x]$ grep -rn "debug_dma_mapping_erro" arch/
arch/arm/include/asm/dma-mapping.h:94: debug_dma_mapping_error(dev, dma_addr);

Thanks,
Michal

Signature · 4 lines
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian