From: Greg Kroah-Hartman Date: Fri, 16 Aug 2013 23:08:39 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.0.92~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b335d4c9a1c1d40a389d47b94b19610d279a5425;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: xtensa-fix-linker-script-transformation-for-.text.unlikely.patch xtensa-replace-xtensa-specific-_f-data-text-by-_s-data-text.patch --- diff --git a/queue-3.4/series b/queue-3.4/series index 73f1d6c1936..fa73c407442 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -26,3 +26,5 @@ can-pcan_usb-fix-wrong-memcpy-bytes-length.patch genetlink-fix-family-dump-race.patch usb-add-two-quirky-touchscreen.patch usb-mos7720-fix-broken-control-requests.patch +xtensa-fix-linker-script-transformation-for-.text.unlikely.patch +xtensa-replace-xtensa-specific-_f-data-text-by-_s-data-text.patch diff --git a/queue-3.4/xtensa-fix-linker-script-transformation-for-.text.unlikely.patch b/queue-3.4/xtensa-fix-linker-script-transformation-for-.text.unlikely.patch new file mode 100644 index 00000000000..3c85588398d --- /dev/null +++ b/queue-3.4/xtensa-fix-linker-script-transformation-for-.text.unlikely.patch @@ -0,0 +1,40 @@ +From f6a03a12ecdbe0dd80a55f6df3b7206c5a403a49 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Mon, 17 Sep 2012 05:44:31 +0400 +Subject: xtensa: fix linker script transformation for .text.unlikely + +From: Max Filippov + +commit f6a03a12ecdbe0dd80a55f6df3b7206c5a403a49 upstream. + +Now that binutils generate *.unlikely sections which don't follow +documented (info as) literal section naming rules, section name +transformation script doesn't work well resulting in the following +errors at vmlinux link time: + + main.c:(.text.unlikely+0x3): dangerous relocation: l32r: literal + placed after use: .literal.unlikely + +Fix section name transformation script by adding specific rule for +.text.unlikely sections. + +Signed-off-by: Max Filippov +Signed-off-by: Chris Zankel +Cc: Geert Uytterhoeven +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + arch/xtensa/kernel/Makefile | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/xtensa/kernel/Makefile ++++ b/arch/xtensa/kernel/Makefile +@@ -24,6 +24,7 @@ obj-$(CONFIG_MODULES) += xtensa_ksyms.o + # Replicate rules in scripts/Makefile.build + + sed-y = -e 's/\*(\(\.[a-z]*it\|\.ref\|\)\.text)/*(\1.literal \1.text)/g' \ ++ -e 's/\.text\.unlikely/.literal.unlikely .text.unlikely/g' \ + -e 's/\*(\(\.text\.[a-z]*\))/*(\1.literal \1)/g' + + quiet_cmd__cpp_lds_S = LDS $@ diff --git a/queue-3.4/xtensa-replace-xtensa-specific-_f-data-text-by-_s-data-text.patch b/queue-3.4/xtensa-replace-xtensa-specific-_f-data-text-by-_s-data-text.patch new file mode 100644 index 00000000000..11da9922dda --- /dev/null +++ b/queue-3.4/xtensa-replace-xtensa-specific-_f-data-text-by-_s-data-text.patch @@ -0,0 +1,71 @@ +From 5e7b6ed8e9bf3c8e3bb579fd0aec64f6526f8c81 Mon Sep 17 00:00:00 2001 +From: Geert Uytterhoeven +Date: Wed, 20 Jun 2012 12:52:58 -0700 +Subject: xtensa: replace xtensa-specific _f{data,text} by _s{data,text} + +From: Geert Uytterhoeven + +commit 5e7b6ed8e9bf3c8e3bb579fd0aec64f6526f8c81 upstream. + +commit a2d063ac216c161 ("extable, core_kernel_data(): Make sure all archs +define _sdata") missed xtensa. Xtensa does have a start of data marker, +but calls it _fdata, causing + + kernel/built-in.o:(.text+0x964): undefined reference to `_sdata' + +_stext was already defined, but it was duplicated by _fdata. + +Signed-off-by: Geert Uytterhoeven +Cc: Steven Rostedt +Cc: Chris Zankel +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + arch/xtensa/kernel/vmlinux.lds.S | 3 +-- + arch/xtensa/mm/init.c | 6 +++--- + 2 files changed, 4 insertions(+), 5 deletions(-) + +--- a/arch/xtensa/kernel/vmlinux.lds.S ++++ b/arch/xtensa/kernel/vmlinux.lds.S +@@ -83,7 +83,6 @@ SECTIONS + + _text = .; + _stext = .; +- _ftext = .; + + .text : + { +@@ -112,7 +111,7 @@ SECTIONS + EXCEPTION_TABLE(16) + /* Data section */ + +- _fdata = .; ++ _sdata = .; + RW_DATA_SECTION(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE) + _edata = .; + +--- a/arch/xtensa/mm/init.c ++++ b/arch/xtensa/mm/init.c +@@ -29,7 +29,7 @@ + + /* References to section boundaries */ + +-extern char _ftext, _etext, _fdata, _edata, _rodata_end; ++extern char _stext, _etext, _sdata, _edata, _rodata_end; + extern char __init_begin, __init_end; + + /* +@@ -197,8 +197,8 @@ void __init mem_init(void) + reservedpages++; + } + +- codesize = (unsigned long) &_etext - (unsigned long) &_ftext; +- datasize = (unsigned long) &_edata - (unsigned long) &_fdata; ++ codesize = (unsigned long) &_etext - (unsigned long) &_stext; ++ datasize = (unsigned long) &_edata - (unsigned long) &_sdata; + initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; + + printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, "