]> xenbits.xensource.com Git - people/pauldu/mini-os.git/commitdiff
x86/arch_mm.h: move p2m_chk_pfn to x86/mm.c
authorWei Liu <wei.liu2@citrix.com>
Fri, 12 Aug 2016 10:32:57 +0000 (11:32 +0100)
committerWei Liu <wei.liu2@citrix.com>
Fri, 12 Aug 2016 15:12:39 +0000 (16:12 +0100)
Making that function inlined won't buy us much and is causing error in
vtpm manager stubdom build.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
arch/x86/mm.c
include/x86/arch_mm.h

index 8fa3b4c794c58825d0387eeaeeb2323dc129559a..88a928dab4ae3d4ce1fa37eb0eb13f37d9847eb7 100644 (file)
@@ -608,6 +608,15 @@ static void clear_bootstrap(void)
         printk("Unable to unmap NULL page. rc=%d\n", rc);
 }
 
+void p2m_chk_pfn(unsigned long pfn)
+{
+    if ( (pfn >> L3_P2M_SHIFT) > 0 )
+    {
+        printk("Error: Too many pfns.\n");
+        do_exit();
+    }
+}
+
 void arch_init_p2m(unsigned long max_pfn)
 {
     unsigned long *l2_list = NULL, *l3_list;
index e5d9c57788f5febd2cba00ab608e38b2727e46f0..690a919d7bed6e456715a5b7b81d7eb794121873 100644 (file)
@@ -190,14 +190,9 @@ typedef unsigned long pgentry_t;
 #define L2_P2M_IDX(pfn) (((pfn) >> L1_P2M_SHIFT) & P2M_MASK)
 #define L3_P2M_IDX(pfn) (((pfn) >> L2_P2M_SHIFT) & P2M_MASK)
 #define INVALID_P2M_ENTRY (~0UL)
-static inline void p2m_chk_pfn(unsigned long pfn)
-{
-    if ( (pfn >> L3_P2M_SHIFT) > 0 )
-    {
-        printk("Error: Too many pfns.\n");
-        do_exit();
-    }
-}
+
+void p2m_chk_pfn(unsigned long pfn);
+
 static inline unsigned long p2m_pages(unsigned long pages)
 {
     return (pages + P2M_ENTRIES - 1) >> L1_P2M_SHIFT;