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

[Xen-changelog] [xen master] x86: move alternative.c data fully into .init.*



commit eb2952b43a70ae485e297f826212b6b279ca0361
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Jun 30 16:01:03 2014 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Jun 30 16:01:03 2014 +0200

    x86: move alternative.c data fully into .init.*
    
    This wasn't done upon the initial addition of the file since the
    section processing needs some adjustment for this: We can't mark the
    two arrays needing relocations as either __initdata or __initconst, as
    both have the potential of creating section conflicts (with -fPIC the
    compiler may want to mark the section writable due to the necessary
    relocations, colliding with other __initconst uses, and if the compiler
    chooses to use the provided section name, __initdata on a constant
    object might collide with other __initdata uses). However, local data
    known to be referenced only by init code/data can also safely be moved
    into .init.*. Hence the respective logic is being tweaked such that it
    won't complain on non-empty .*.local sections.
    
    While at it also drop the non-local section names from
    SPECIAL_DATA_SECTIONS - they can't be safely converted.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/Rules.mk               |    3 ++-
 xen/arch/x86/Makefile      |    2 +-
 xen/arch/x86/alternative.c |    4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index b0d4634..b49f3c8 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -167,11 +167,12 @@ _clean_%/: FORCE
        $(CC) $(AFLAGS) -c $< -o $@
 
 SPECIAL_DATA_SECTIONS := rodata $(foreach n,1 2 4 8,rodata.str1.$(n)) \
-                        $(foreach r,rel rel.ro,data.$(r) data.$(r).local)
+                        $(foreach r,rel rel.ro,data.$(r).local)
 
 $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.init.o: %.o Makefile
        $(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | while read idx name 
sz rest; do \
                case "$$name" in \
+               .*.local) ;; \
                .text|.text.*|.data|.data.*|.bss) \
                        test $$sz != 0 || continue; \
                        echo "Error: size of $<:$$name is 0x$$sz" >&2; \
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 6c90b1b..c1e244d 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -7,7 +7,7 @@ subdir-y += oprofile
 
 subdir-$(x86_64) += x86_64
 
-obj-y += alternative.o
+obj-bin-y += alternative.init.o
 obj-y += apic.o
 obj-y += bitops.o
 obj-bin-y += bzimage.init.o
diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c
index e91fb87..2743792 100644
--- a/xen/arch/x86/alternative.c
+++ b/xen/arch/x86/alternative.c
@@ -39,7 +39,7 @@ static const unsigned char k8nops[] __initconst = {
     K8_NOP7,
     K8_NOP8
 };
-static const unsigned char * const k8_nops[ASM_NOP_MAX+1] /*__initconst*/ = {
+static const unsigned char * const k8_nops[ASM_NOP_MAX+1] = {
     NULL,
     k8nops,
     k8nops + 1,
@@ -63,7 +63,7 @@ static const unsigned char p6nops[] __initconst = {
     P6_NOP7,
     P6_NOP8
 };
-static const unsigned char * const p6_nops[ASM_NOP_MAX+1] /*__initconst*/ = {
+static const unsigned char * const p6_nops[ASM_NOP_MAX+1] = {
     NULL,
     p6nops,
     p6nops + 1,
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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