lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20131106181740.c5e7e966a750909290ba1f94@canb.auug.org.au>
Date:	Wed, 6 Nov 2013 18:17:40 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Jeremy Fitzhardinge <jeremy@...p.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Stefano Stabellini <stefano.stabellini@...citrix.com>,
	Xen Devel <Xen-devel@...ts.xensource.com>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Santosh Shilimkar <santosh.shilimkar@...com>,
	Russell King <rmk@....linux.org.uk>,
	Stefano Stabellini <stefano.stabellini@...citrix.com>
Subject: linux-next: manual merge of the xen-tip tree with the arm tree

Hi all,

Today's linux-next merge of the xen-tip tree got a conflict in
arch/arm/include/asm/dma-mapping.h between commit 6a6a5c15d871 ("ARM:
7805/1: mm: change max*pfn to include the physical offset of memory")
from the arm tree and commit e24b7aa368a0 ("arm: make SWIOTLB available")
from the xen-tip tree.

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

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc arch/arm/include/asm/dma-mapping.h
index 863cd84eb1a2,8acfef48124a..000000000000
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@@ -87,13 -97,39 +98,46 @@@ static inline dma_addr_t virt_to_dma(st
  }
  #endif
  
+ static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
+ {
+ 	unsigned int offset = paddr & ~PAGE_MASK;
+ 	return pfn_to_dma(dev, __phys_to_pfn(paddr)) + offset;
+ }
+ 
+ static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
+ {
+ 	unsigned int offset = dev_addr & ~PAGE_MASK;
+ 	return __pfn_to_phys(dma_to_pfn(dev, dev_addr)) + offset;
+ }
+ 
+ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
+ {
+ 	u64 limit, mask;
+ 
+ 	if (!dev->dma_mask)
+ 		return 0;
+ 
+ 	mask = *dev->dma_mask;
+ 
+ 	limit = (mask + 1) & ~mask;
+ 	if (limit && size > limit)
+ 		return 0;
+ 
+ 	if ((addr | (addr + size - 1)) & ~mask)
+ 		return 0;
+ 
+ 	return 1;
+ }
+ 
+ static inline void dma_mark_clean(void *addr, size_t size) { }
+ 
 +/* The ARM override for dma_max_pfn() */
 +static inline unsigned long dma_max_pfn(struct device *dev)
 +{
 +	return PHYS_PFN_OFFSET + dma_to_pfn(dev, *dev->dma_mask);
 +}
 +#define dma_max_pfn(dev) dma_max_pfn(dev)
 +
  /*
   * DMA errors are defined by all-bits-set in the DMA address.
   */

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ