diff mbox

x86: don't needlessly globalize page table labels

Message ID 57B6D71C0200007800107486@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich Aug. 19, 2016, 7:53 a.m. UTC
Neither l1_identmap[] nor l3_identmap[] get referenced from outside
their defining source file; the latter didn't even have an extern
declaration for use from C sources.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
x86: don't needlessly globalize page table labels

Neither l1_identmap[] nor l3_identmap[] get referenced from outside
their defining source file; the latter didn't even have an extern
declaration for use from C sources.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/boot/x86_64.S
+++ b/xen/arch/x86/boot/x86_64.S
@@ -88,7 +88,7 @@ GLOBAL(__page_tables_start)
  * of physical memory. In any case the VGA hole should be mapped with type UC.
  * Uses 1x 4k page.
  */
-GLOBAL(l1_identmap)
+l1_identmap:
         pfn = 0
         .rept L1_PAGETABLE_ENTRIES
         /* VGA hole (0xa0000-0xc0000) should be mapped UC. */
@@ -143,7 +143,7 @@ l2_fixmap:
         .size l2_fixmap, . - l2_fixmap
 
 /* Identity map, covering the 4 l2_identmap tables.  Uses 1x 4k page. */
-GLOBAL(l3_identmap)
+l3_identmap:
         idx = 0
         .rept 4
         .quad sym_phys(l2_identmap) + (idx << PAGE_SHIFT) + __PAGE_HYPERVISOR
--- a/xen/include/asm-x86/page.h
+++ b/xen/include/asm-x86/page.h
@@ -291,8 +291,7 @@ extern l2_pgentry_t l2_xenmap[L2_PAGETAB
     l2_bootmap[L2_PAGETABLE_ENTRIES];
 extern l3_pgentry_t l3_bootmap[L3_PAGETABLE_ENTRIES];
 extern l2_pgentry_t l2_identmap[4*L2_PAGETABLE_ENTRIES];
-extern l1_pgentry_t l1_identmap[L1_PAGETABLE_ENTRIES],
-    l1_fixmap[L1_PAGETABLE_ENTRIES];
+extern l1_pgentry_t l1_fixmap[L1_PAGETABLE_ENTRIES];
 void paging_init(void);
 void efi_update_l4_pgtable(unsigned int l4idx, l4_pgentry_t);
 #endif /* !defined(__ASSEMBLY__) */

Comments

Andrew Cooper Aug. 19, 2016, 10:19 a.m. UTC | #1
On 19/08/16 08:53, Jan Beulich wrote:
> Neither l1_identmap[] nor l3_identmap[] get referenced from outside
> their defining source file; the latter didn't even have an extern
> declaration for use from C sources.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox

Patch

--- a/xen/arch/x86/boot/x86_64.S
+++ b/xen/arch/x86/boot/x86_64.S
@@ -88,7 +88,7 @@  GLOBAL(__page_tables_start)
  * of physical memory. In any case the VGA hole should be mapped with type UC.
  * Uses 1x 4k page.
  */
-GLOBAL(l1_identmap)
+l1_identmap:
         pfn = 0
         .rept L1_PAGETABLE_ENTRIES
         /* VGA hole (0xa0000-0xc0000) should be mapped UC. */
@@ -143,7 +143,7 @@  l2_fixmap:
         .size l2_fixmap, . - l2_fixmap
 
 /* Identity map, covering the 4 l2_identmap tables.  Uses 1x 4k page. */
-GLOBAL(l3_identmap)
+l3_identmap:
         idx = 0
         .rept 4
         .quad sym_phys(l2_identmap) + (idx << PAGE_SHIFT) + __PAGE_HYPERVISOR
--- a/xen/include/asm-x86/page.h
+++ b/xen/include/asm-x86/page.h
@@ -291,8 +291,7 @@  extern l2_pgentry_t l2_xenmap[L2_PAGETAB
     l2_bootmap[L2_PAGETABLE_ENTRIES];
 extern l3_pgentry_t l3_bootmap[L3_PAGETABLE_ENTRIES];
 extern l2_pgentry_t l2_identmap[4*L2_PAGETABLE_ENTRIES];
-extern l1_pgentry_t l1_identmap[L1_PAGETABLE_ENTRIES],
-    l1_fixmap[L1_PAGETABLE_ENTRIES];
+extern l1_pgentry_t l1_fixmap[L1_PAGETABLE_ENTRIES];
 void paging_init(void);
 void efi_update_l4_pgtable(unsigned int l4idx, l4_pgentry_t);
 #endif /* !defined(__ASSEMBLY__) */