Merge branch 'v3.10/topic/misc' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / include / asm / memory.h
index 83138d2fb90d5f4d5aaa2c381569f59d7634d6ea..15e3f189ee039cbed4197565013ad58cceee24dc 100644 (file)
@@ -56,6 +56,8 @@
 #define TASK_SIZE_32           UL(0x100000000)
 #define TASK_SIZE              (test_thread_flag(TIF_32BIT) ? \
                                TASK_SIZE_32 : TASK_SIZE_64)
+#define TASK_SIZE_OF(tsk)      (test_tsk_thread_flag(tsk, TIF_32BIT) ? \
+                               TASK_SIZE_32 : TASK_SIZE_64)
 #else
 #define TASK_SIZE              TASK_SIZE_64
 #endif /* CONFIG_COMPAT */
@@ -132,6 +134,7 @@ static inline void *phys_to_virt(phys_addr_t x)
 #define __pa(x)                        __virt_to_phys((unsigned long)(x))
 #define __va(x)                        ((void *)__phys_to_virt((phys_addr_t)(x)))
 #define pfn_to_kaddr(pfn)      __va((pfn) << PAGE_SHIFT)
+#define virt_to_pfn(x)      __phys_to_pfn(__virt_to_phys(x))
 
 /*
  *  virt_to_page(k)    convert a _valid_ virtual address to struct page *