]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2013 23:08:39 +0000 (16:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2013 23:08:39 +0000 (16:08 -0700)
added patches:
xtensa-fix-linker-script-transformation-for-.text.unlikely.patch
xtensa-replace-xtensa-specific-_f-data-text-by-_s-data-text.patch

queue-3.4/series
queue-3.4/xtensa-fix-linker-script-transformation-for-.text.unlikely.patch [new file with mode: 0644]
queue-3.4/xtensa-replace-xtensa-specific-_f-data-text-by-_s-data-text.patch [new file with mode: 0644]

index 73f1d6c19365195c5d937647c8fb773972f173c9..fa73c40744251454f9c215baa8cdd77d12a3bbe4 100644 (file)
@@ -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 (file)
index 0000000..3c85588
--- /dev/null
@@ -0,0 +1,40 @@
+From f6a03a12ecdbe0dd80a55f6df3b7206c5a403a49 Mon Sep 17 00:00:00 2001
+From: Max Filippov <jcmvbkbc@gmail.com>
+Date: Mon, 17 Sep 2012 05:44:31 +0400
+Subject: xtensa: fix linker script transformation for .text.unlikely
+
+From: Max Filippov <jcmvbkbc@gmail.com>
+
+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 <jcmvbkbc@gmail.com>
+Signed-off-by: Chris Zankel <chris@zankel.net>
+Cc: Geert Uytterhoeven <geert@linux-m68k.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..11da992
--- /dev/null
@@ -0,0 +1,71 @@
+From 5e7b6ed8e9bf3c8e3bb579fd0aec64f6526f8c81 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+Date: Wed, 20 Jun 2012 12:52:58 -0700
+Subject: xtensa: replace xtensa-specific _f{data,text} by _s{data,text}
+
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+
+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 <geert@linux-m68k.org>
+Cc: Steven Rostedt <rostedt@goodmis.org>
+Cc: Chris Zankel <chris@zankel.net>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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, "