]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
Add declarations for l?_table_offset() in unpaged environments
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 6 Jul 2017 15:45:32 +0000 (16:45 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 6 Jul 2017 15:52:18 +0000 (16:52 +0100)
This helps with writing code with reduced #ifdef'ary.  Remove stray externs
from other compatibility functions.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
arch/x86/include/arch/page.h
arch/x86/include/arch/pagetable.h

index 135cf60b6e58fae6abe9cb39e9e375a3276b87c7..fb49f0ae832ff17a81772d6dfeb04b77590450e4 100644 (file)
@@ -152,6 +152,11 @@ static inline unsigned int l4_table_offset(unsigned long linear)
 typedef unsigned long intpte_t;
 #define PRIpte "08lx"
 
+unsigned int l1_table_offset(unsigned long linear);
+unsigned int l2_table_offset(unsigned long linear);
+unsigned int l3_table_offset(unsigned long linear);
+unsigned int l4_table_offset(unsigned long linear);
+
 #endif
 
 #ifdef CONFIG_HVM
index 9af5f93db4ce5fb39b20943c0ac219e2d4888553..04988567c23bf9f145d6bb1051c6c5abeb1e2ac3 100644 (file)
@@ -29,10 +29,10 @@ static inline intpte_t pte_from_virt(const void *va, uint64_t flags)
 #else /* CONFIG_PAGING_LEVELS > 0 */
 
 /* Enough compatibility to compile in unpaged environments. */
-extern paddr_t pte_to_paddr(intpte_t pte);
-extern intpte_t pte_from_paddr(paddr_t paddr, uint64_t flags);
-extern intpte_t pte_from_gfn(unsigned long gfn, uint64_t flags);
-extern intpte_t pte_from_virt(const void *va, uint64_t flags);
+paddr_t pte_to_paddr(intpte_t pte);
+intpte_t pte_from_paddr(paddr_t paddr, uint64_t flags);
+intpte_t pte_from_gfn(unsigned long gfn, uint64_t flags);
+intpte_t pte_from_virt(const void *va, uint64_t flags);
 
 #endif