]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge branch 'pending-dma-streaming' (early part) into devel
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 4 Dec 2009 15:00:08 +0000 (15:00 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 4 Dec 2009 15:00:11 +0000 (15:00 +0000)
1  2 
arch/arm/include/asm/memory.h

index bc2ff8b281335d8d021586318f6fd7f7b63aaffe,9099ada9da0c7e74c5f5f7768cb26a87fd4cb0f9..5421d82a2572475667189fd1e93e07e19359de25
   * private definitions which should NOT be used outside memory.h
   * files.  Use virt_to_phys/phys_to_virt/__pa/__va instead.
   */
 +#ifndef __virt_to_phys
  #define __virt_to_phys(x)     ((x) - PAGE_OFFSET + PHYS_OFFSET)
  #define __phys_to_virt(x)     ((x) - PHYS_OFFSET + PAGE_OFFSET)
 +#endif
  
  /*
   * Convert a physical address to a Page Frame Number and back
  #define       __phys_to_pfn(paddr)    ((paddr) >> PAGE_SHIFT)
  #define       __pfn_to_phys(pfn)      ((pfn) << PAGE_SHIFT)
  
+ /*
+  * Convert a page to/from a physical address
+  */
+ #define page_to_phys(page)    (__pfn_to_phys(page_to_pfn(page)))
+ #define phys_to_page(phys)    (pfn_to_page(__phys_to_pfn(phys)))
  #ifndef __ASSEMBLY__
  
  /*
@@@ -196,7 -200,8 +202,8 @@@ static inline void *phys_to_virt(unsign
  #ifndef __virt_to_bus
  #define __virt_to_bus __virt_to_phys
  #define __bus_to_virt __phys_to_virt
- #define __pfn_to_bus(x)       ((x) << PAGE_SHIFT)
+ #define __pfn_to_bus(x)       __pfn_to_phys(x)
+ #define __bus_to_pfn(x)       __phys_to_pfn(x)
  #endif
  
  static inline __deprecated unsigned long virt_to_bus(void *x)
@@@ -294,11 -299,6 +301,6 @@@ static inline __deprecated void *bus_to
  
  #endif /* !CONFIG_DISCONTIGMEM */
  
- /*
-  * For BIO.  "will die".  Kill me when bio_to_phys() and bvec_to_phys() die.
-  */
- #define page_to_phys(page)    (page_to_pfn(page) << PAGE_SHIFT)
  /*
   * Optional coherency support.  Currently used only by selected
   * Intel XSC3-based systems.