[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 6 of 6] x86: explicitly mark an __initdata variable as used


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Tim Deegan <tim@xxxxxxx>
  • Date: Thu, 5 Apr 2012 13:07:19 +0100
  • Delivery-date: Thu, 05 Apr 2012 12:11:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

# HG changeset patch
# User Tim Deegan <tim@xxxxxxx>
# Date 1333626954 -3600
# Node ID 5a2f5ab5128e4b13b3fd2dbcae1f084bc922584e
# Parent  5101e5ed24732919076d5285e55c7b53032749c2
x86: explicitly mark an __initdata variable as used.

This stops LLVM from replacing it with a different, auto-generated
variable as part of an optimization.  (The auto-generated variable
ends up in the normal data section, failing the check that this
file only contains __initdata vars).

Signed-off-by: Tim Deegan <tim@xxxxxxx>

diff -r 5101e5ed2473 -r 5a2f5ab5128e xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       Thu Apr 05 12:55:54 2012 +0100
+++ b/xen/arch/x86/domain_build.c       Thu Apr 05 12:55:54 2012 +0100
@@ -129,7 +129,7 @@ static struct page_info * __init alloc_c
     struct domain *d, unsigned long max_pages)
 {
     static unsigned int __initdata last_order = MAX_ORDER;
-    static unsigned int __initdata memflags = MEMF_no_dma;
+    static unsigned int __initdata __attribute__((used)) memflags = 
MEMF_no_dma;
     struct page_info *page;
     unsigned int order = get_order_from_pages(max_pages), free_order;
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.