Skip to contentSkip to conversation

linux-next: manual merge of the xen-tip tree with the arm-soc tree

PATCH Stephen Rothwell 3 participants 5 messages Dec 8, 2014 – Dec 23, 2014

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

Hi all,

Today's linux-next merge of the xen-tip tree got a conflict in arch/arm/include/asm/dma-mapping.h between commits a3a60f81ee6f ("dma-mapping: replace set_arch_dma_coherent_ops with arch_setup_dma_ops") and 4bb25789ed28 ("arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops") from the arm-soc tree and commit 3d5391ac6f5e ("arm: introduce is_device_dma_coherent") from the xen-tip tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

I also neede this merge fix patch:

From: Stephen Rothwell <[email protected]>
Date: Mon, 8 Dec 2014 18:46:59 +1100
Subject: [PATCH] arm: introduce is_device_dma_coherent merge fix

---
 arch/arm/mm/dma-mapping.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mm/dma-mapping.c +1 -0
index 09645f00bd17..43064cbe58f9 100644
@@ -2058,6 +2058,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
 	else
 		dma_ops = arm_get_dma_map_ops(coherent);
 
+	dev->archdata.dma_coherent = coherent;
 	set_dma_ops(dev, dma_ops);
 }
 
Signature · 44 lines
2.1.3

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au

diff --cc arch/arm/include/asm/dma-mapping.h
index 9410b7e548fc,e6e3446abdf6..000000000000
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@@ -121,13 -121,20 +121,19 @@@ static inline unsigned long dma_max_pfn
  }
  #define dma_max_pfn(dev) dma_max_pfn(dev)
  
 -static inline int set_arch_dma_coherent_ops(struct device *dev)
 -{
 -	dev->archdata.dma_coherent = true;
 -	set_dma_ops(dev, &arm_coherent_dma_ops);
 -	return 0;
 -}
 -#define set_arch_dma_coherent_ops(dev)	set_arch_dma_coherent_ops(dev)
 +#define arch_setup_dma_ops arch_setup_dma_ops
 +extern void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
 +			       struct iommu_ops *iommu, bool coherent);
 +
 +#define arch_teardown_dma_ops arch_teardown_dma_ops
 +extern void arch_teardown_dma_ops(struct device *dev);
  
+ /* do not use this function in a driver */
+ static inline bool is_device_dma_coherent(struct device *dev)
+ {
+ 	return dev->archdata.dma_coherent;
+ }
+ 
  static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
  {
  	unsigned int offset = paddr & ~PAGE_MASK;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141208/295ecdc6/attachment.sig>
#1 lore raw
Quoted 29 lines · Stephen Rothwell

Hi all,

Today's linux-next merge of the xen-tip tree got a conflict in arch/arm/include/asm/dma-mapping.h between commits a3a60f81ee6f ("dma-mapping: replace set_arch_dma_coherent_ops with arch_setup_dma_ops") and 4bb25789ed28 ("arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops") from the arm-soc tree and commit 3d5391ac6f5e ("arm: introduce is_device_dma_coherent") from the xen-tip tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

I also neede this merge fix patch:

From: Stephen Rothwell <[email protected]>
Date: Mon, 8 Dec 2014 18:46:59 +1100
Subject: [PATCH] arm: introduce is_device_dma_coherent merge fix

---
 arch/arm/mm/dma-mapping.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mm/dma-mapping.c +0 -0
index 09645f00bd17..43064cbe58f9 100644

arch/arm/mm/dma-mapping.c void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, · line 2063

Quoted 6 lines
arch/arm/mm/dma-mapping.c +1 -0
@@ -2058,6 +2058,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
 	else
 		dma_ops = arm_get_dma_map_ops(coherent);
 
+	dev->archdata.dma_coherent = coherent;
 	set_dma_ops(dev, dma_ops);
 }

Looks good to me.

Cheers,

Will

Quoted 38 lines
Signature · 5 lines
2.1.3

-- 
Cheers,
Stephen Rothwell                    [email protected]
arch/arm/include/asm/dma-mapping.h +6 -0
diff --cc arch/arm/include/asm/dma-mapping.h
index 9410b7e548fc,e6e3446abdf6..000000000000
@@@ -121,13 -121,20 +121,19 @@@ static inline unsigned long dma_max_pfn
  }
  #define dma_max_pfn(dev) dma_max_pfn(dev)
 
 -static inline int set_arch_dma_coherent_ops(struct device *dev)
 -{
 -	dev->archdata.dma_coherent = true;
 -	set_dma_ops(dev, &arm_coherent_dma_ops);
 -	return 0;
 -}
 -#define set_arch_dma_coherent_ops(dev)	set_arch_dma_coherent_ops(dev)
 +#define arch_setup_dma_ops arch_setup_dma_ops
 +extern void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
 +			       struct iommu_ops *iommu, bool coherent);
 +
 +#define arch_teardown_dma_ops arch_teardown_dma_ops
 +extern void arch_teardown_dma_ops(struct device *dev);
 
+ /* do not use this function in a driver */
+ static inline bool is_device_dma_coherent(struct device *dev)
+ {
+ 	return dev->archdata.dma_coherent;
+ }
+ 
  static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
  {
  	unsigned int offset = paddr & ~PAGE_MASK;
#2 lore raw

linux-next: missing merge fix patch for the merge of the xen-tip tree with the arm-soc tree

Hi Linus,

I have been carrying this merge fix patch for some time that is now needed in your tree:

From: Stephen Rothwell <[email protected]>
Date: Mon, 8 Dec 2014 18:46:59 +1100
Subject: [PATCH] arm: introduce is_device_dma_coherent merge fix

The merge of the (linux-next) xen-tip tree got a conflict in arch/arm/include/asm/dma-mapping.h between commits a3a60f81ee6f ("dma-mapping: replace set_arch_dma_coherent_ops with arch_setup_dma_ops") and 4bb25789ed28 ("arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops") from the arm-soc tree and commit 3d5391ac6f5e ("arm: introduce is_device_dma_coherent") from the xen-tip tree. It was fixed up, but also required this additional fix.

"Looks good to me"-by: Will Deacon <[email protected]>

---
 arch/arm/mm/dma-mapping.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mm/dma-mapping.c +1 -0
index 09645f00bd17..43064cbe58f9 100644
@@ -2058,6 +2058,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
 	else
 		dma_ops = arm_get_dma_map_ops(coherent);
 
+	dev->archdata.dma_coherent = coherent;
 	set_dma_ops(dev, dma_ops);
 }
 
Signature · 12 lines
2.1.3

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141223/6530ebe9/attachment.sig>
#3 lore raw

Re: linux-next: missing merge fix patch for the merge of the xen-tip tree with the arm-soc tree

Quoted 4 lines · Stephen Rothwell

Hi Linus,

I have been carrying this merge fix patch for some time that is now needed in your tree:

No, it's not. Look more closely.

My merge put the

        dev->archdata.dma_coherent = coherent;

line at the top of the function, like the way it was in the original commit.

Linus

#4 lore raw

Re: linux-next: missing merge fix patch for the merge of the xen-tip tree with the arm-soc tree

Hi Linus,

Quoted 7 lines · On Mon, 22 Dec 2014 20:09:50 -0800 Linus Torvalds…
Quoted 4 lines · Stephen Rothwell

Hi Linus,

I have been carrying this merge fix patch for some time that is now needed in your tree:

Quoted 7 lines

No, it's not. Look more closely.

My merge put the

        dev->archdata.dma_coherent = coherent;

line at the top of the function, like the way it was in the original commit.

Oops, sorry about that.

Signature · 9 lines
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141223/5d0da7e0/attachment-0001.sig>