]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Oct 2012 15:57:51 +0000 (08:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Oct 2012 15:57:51 +0000 (08:57 -0700)
added patches:
i2c-piix4-fix-build-failure.patch
kbuild-do-not-package-boot-and-lib-in-make-tar-pkg.patch
kbuild-fix-gcc-x-syntax.patch
kbuild-make-fix-if_changed-when-command-contains-backslashes.patch
mn10300-only-add-mmem-funcs-to-kbuild_cflags-if-gcc-supports-it.patch
slab-fix-the-deadlock-issue-on-l3-alien-lock.patch

queue-3.6/i2c-piix4-fix-build-failure.patch [new file with mode: 0644]
queue-3.6/kbuild-do-not-package-boot-and-lib-in-make-tar-pkg.patch [new file with mode: 0644]
queue-3.6/kbuild-fix-gcc-x-syntax.patch [new file with mode: 0644]
queue-3.6/kbuild-make-fix-if_changed-when-command-contains-backslashes.patch [new file with mode: 0644]
queue-3.6/mn10300-only-add-mmem-funcs-to-kbuild_cflags-if-gcc-supports-it.patch [new file with mode: 0644]
queue-3.6/series [new file with mode: 0644]
queue-3.6/slab-fix-the-deadlock-issue-on-l3-alien-lock.patch [new file with mode: 0644]

diff --git a/queue-3.6/i2c-piix4-fix-build-failure.patch b/queue-3.6/i2c-piix4-fix-build-failure.patch
new file mode 100644 (file)
index 0000000..ac3c185
--- /dev/null
@@ -0,0 +1,29 @@
+From c415b303a704e5c5f766fc0404093910c36cc4ab Mon Sep 17 00:00:00 2001
+From: Daniel J Blueman <daniel@quora.org>
+Date: Fri, 5 Oct 2012 22:23:55 +0200
+Subject: i2c-piix4: Fix build failure
+
+From: Daniel J Blueman <daniel@quora.org>
+
+commit c415b303a704e5c5f766fc0404093910c36cc4ab upstream.
+
+Fix build failure in Intel PIIX4 I2C driver.
+
+Signed-off-by: Daniel J Blueman <daniel@quora.org>
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/i2c/busses/i2c-piix4.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/i2c/busses/i2c-piix4.c
++++ b/drivers/i2c/busses/i2c-piix4.c
+@@ -37,6 +37,7 @@
+ #include <linux/stddef.h>
+ #include <linux/ioport.h>
+ #include <linux/i2c.h>
++#include <linux/slab.h>
+ #include <linux/init.h>
+ #include <linux/dmi.h>
+ #include <linux/acpi.h>
diff --git a/queue-3.6/kbuild-do-not-package-boot-and-lib-in-make-tar-pkg.patch b/queue-3.6/kbuild-do-not-package-boot-and-lib-in-make-tar-pkg.patch
new file mode 100644 (file)
index 0000000..f63647a
--- /dev/null
@@ -0,0 +1,66 @@
+From fe04ddf7c2910362f3817c8156e41cbd6c0ee35d Mon Sep 17 00:00:00 2001
+From: Michal Marek <mmarek@suse.cz>
+Date: Tue, 25 Sep 2012 16:03:03 +0200
+Subject: kbuild: Do not package /boot and /lib in make tar-pkg
+
+From: Michal Marek <mmarek@suse.cz>
+
+commit fe04ddf7c2910362f3817c8156e41cbd6c0ee35d upstream.
+
+There were reports of users destroying their Fedora installs by a kernel
+tarball that replaces the /lib -> /usr/lib symlink. Let's remove the
+toplevel directories from the tarball to prevent this from happening.
+
+Reported-by: Andi Kleen <andi@firstfloor.org>
+Suggested-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Michal Marek <mmarek@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/Makefile        |    2 +-
+ scripts/Makefile.fwinst  |    4 ++--
+ scripts/package/buildtar |    2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -142,7 +142,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-a
+ KBUILD_CFLAGS += $(mflags-y)
+ KBUILD_AFLAGS += $(mflags-y)
+-archscripts: scripts_basic
++archscripts:
+       $(Q)$(MAKE) $(build)=arch/x86/tools relocs
+ ###
+--- a/scripts/Makefile.fwinst
++++ b/scripts/Makefile.fwinst
+@@ -27,7 +27,7 @@ endif
+ installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw))
+ installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all))
+-installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/./
++installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/.
+ # Workaround for make < 3.81, where .SECONDEXPANSION doesn't work.
+ PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs
+@@ -42,7 +42,7 @@ quiet_cmd_install = INSTALL $(subst $(sr
+ $(installed-fw-dirs):
+       $(call cmd,mkdir)
+-$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %)
++$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $$(dir $(INSTALL_FW_PATH)/%)
+       $(call cmd,install)
+ PHONY +=  __fw_install __fw_modinst FORCE
+--- a/scripts/package/buildtar
++++ b/scripts/package/buildtar
+@@ -109,7 +109,7 @@ esac
+       if tar --owner=root --group=root --help >/dev/null 2>&1; then
+               opts="--owner=root --group=root"
+       fi
+-      tar cf - . $opts | ${compress} > "${tarball}${file_ext}"
++      tar cf - boot/* lib/* $opts | ${compress} > "${tarball}${file_ext}"
+ )
+ echo "Tarball successfully created in ${tarball}${file_ext}"
diff --git a/queue-3.6/kbuild-fix-gcc-x-syntax.patch b/queue-3.6/kbuild-fix-gcc-x-syntax.patch
new file mode 100644 (file)
index 0000000..27e511c
--- /dev/null
@@ -0,0 +1,205 @@
+From b1e0d8b70fa31821ebca3965f2ef8619d7c5e316 Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Tue, 2 Oct 2012 16:42:36 +0200
+Subject: kbuild: Fix gcc -x syntax
+
+From: Jean Delvare <jdelvare@suse.de>
+
+commit b1e0d8b70fa31821ebca3965f2ef8619d7c5e316 upstream.
+
+The correct syntax for gcc -x is "gcc -x assembler", not
+"gcc -xassembler". Even though the latter happens to work, the former
+is what is documented in the manual page and thus what gcc wrappers
+such as icecream do expect.
+
+This isn't a cosmetic change. The missing space prevents icecream from
+recognizing compilation tasks it can't handle, leading to silent kernel
+miscompilations.
+
+Besides me, credits go to Michael Matz and Dirk Mueller for
+investigating the miscompilation issue and tracking it down to this
+incorrect -x parameter syntax.
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Acked-by: Ingo Molnar <mingo@kernel.org>
+Cc: Bernhard Walle <bernhard@bwalle.de>
+Cc: Michal Marek <mmarek@suse.cz>
+Cc: Ralf Baechle <ralf@linux-mips.org>
+Signed-off-by: Michal Marek <mmarek@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/Makefile                         |    2 +-
+ arch/mips/kernel/Makefile                  |    2 +-
+ arch/x86/Makefile                          |    2 +-
+ scripts/Kbuild.include                     |   12 ++++++------
+ scripts/gcc-version.sh                     |    6 +++---
+ scripts/gcc-x86_32-has-stack-protector.sh  |    2 +-
+ scripts/gcc-x86_64-has-stack-protector.sh  |    2 +-
+ scripts/kconfig/check.sh                   |    2 +-
+ scripts/kconfig/lxdialog/check-lxdialog.sh |    2 +-
+ tools/perf/Makefile                        |    2 +-
+ tools/power/cpupower/Makefile              |    2 +-
+ 11 files changed, 18 insertions(+), 18 deletions(-)
+
+--- a/arch/mips/Makefile
++++ b/arch/mips/Makefile
+@@ -225,7 +225,7 @@ KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(d
+ LDFLAGS                       += -m $(ld-emul)
+ ifdef CONFIG_MIPS
+-CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -xc /dev/null | \
++CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
+       egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
+       sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/")
+ ifdef CONFIG_64BIT
+--- a/arch/mips/kernel/Makefile
++++ b/arch/mips/kernel/Makefile
+@@ -104,7 +104,7 @@ obj-$(CONFIG_MIPS_MACHINE) += mips_machi
+ obj-$(CONFIG_OF)              += prom.o
+-CFLAGS_cpu-bugs64.o   = $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
++CFLAGS_cpu-bugs64.o   = $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/null -x c /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
+ obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -92,7 +92,7 @@ endif
+ ifdef CONFIG_X86_X32
+       x32_ld_ok := $(call try-run,\
+                       /bin/echo -e '1: .quad 1b' | \
+-                      $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" - && \
++                      $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" - && \
+                       $(OBJCOPY) -O elf32-x86-64 "$$TMP" "$$TMPO" && \
+                       $(LD) -m elf32_x86_64 "$$TMPO" -o "$$TMP",y,n)
+         ifeq ($(x32_ld_ok),y)
+--- a/scripts/Kbuild.include
++++ b/scripts/Kbuild.include
+@@ -98,24 +98,24 @@ try-run = $(shell set -e;          \
+ # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
+ as-option = $(call try-run,\
+-      $(CC) $(KBUILD_CFLAGS) $(1) -c -xassembler /dev/null -o "$$TMP",$(1),$(2))
++      $(CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(1),$(2))
+ # as-instr
+ # Usage: cflags-y += $(call as-instr,instr,option1,option2)
+ as-instr = $(call try-run,\
+-      printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3))
++      printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3))
+ # cc-option
+ # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
+ cc-option = $(call try-run,\
+-      $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
++      $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))
+ # cc-option-yn
+ # Usage: flag := $(call cc-option-yn,-march=winchip-c6)
+ cc-option-yn = $(call try-run,\
+-      $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
++      $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
+ # cc-option-align
+ # Prefix align with either -falign or -malign
+@@ -125,7 +125,7 @@ cc-option-align = $(subst -functions=0,,
+ # cc-disable-warning
+ # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
+ cc-disable-warning = $(call try-run,\
+-      $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -xc /dev/null -o "$$TMP",-Wno-$(strip $(1)))
++      $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
+ # cc-version
+ # Usage gcc-ver := $(call cc-version)
+@@ -143,7 +143,7 @@ cc-ifversion = $(shell [ $(call cc-versi
+ # cc-ldoption
+ # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
+ cc-ldoption = $(call try-run,\
+-      $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2))
++      $(CC) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2))
+ # ld-option
+ # Usage: LDFLAGS += $(call ld-option, -X)
+--- a/scripts/gcc-version.sh
++++ b/scripts/gcc-version.sh
+@@ -22,10 +22,10 @@ if [ ${#compiler} -eq 0 ]; then
+       exit 1
+ fi
+-MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1)
+-MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
++MAJOR=$(echo __GNUC__ | $compiler -E -x c - | tail -n 1)
++MINOR=$(echo __GNUC_MINOR__ | $compiler -E -x c - | tail -n 1)
+ if [ "x$with_patchlevel" != "x" ] ; then
+-      PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -xc - | tail -n 1)
++      PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -x c - | tail -n 1)
+       printf "%02d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL
+ else
+       printf "%02d%02d\\n" $MAJOR $MINOR
+--- a/scripts/gcc-x86_32-has-stack-protector.sh
++++ b/scripts/gcc-x86_32-has-stack-protector.sh
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+-echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
++echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
+ if [ "$?" -eq "0" ] ; then
+       echo y
+ else
+--- a/scripts/gcc-x86_64-has-stack-protector.sh
++++ b/scripts/gcc-x86_64-has-stack-protector.sh
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+-echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
++echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
+ if [ "$?" -eq "0" ] ; then
+       echo y
+ else
+--- a/scripts/kconfig/check.sh
++++ b/scripts/kconfig/check.sh
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ # Needed for systems without gettext
+-$* -xc -o /dev/null - > /dev/null 2>&1 << EOF
++$* -x c -o /dev/null - > /dev/null 2>&1 << EOF
+ #include <libintl.h>
+ int main()
+ {
+--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
+@@ -38,7 +38,7 @@ trap "rm -f $tmp" 0 1 2 3 15
+ # Check if we can link to ncurses
+ check() {
+-        $cc -xc - -o $tmp 2>/dev/null <<'EOF'
++        $cc -x c - -o $tmp 2>/dev/null <<'EOF'
+ #include CURSES_LOC
+ main() {}
+ EOF
+--- a/tools/perf/Makefile
++++ b/tools/perf/Makefile
+@@ -62,7 +62,7 @@ ifeq ($(ARCH),x86_64)
+       ARCH := x86
+       IS_X86_64 := 0
+       ifeq (, $(findstring m32,$(EXTRA_CFLAGS)))
+-              IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -xc - | tail -n 1)
++              IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -x c - | tail -n 1)
+       endif
+       ifeq (${IS_X86_64}, 1)
+               RAW_ARCH := x86_64
+--- a/tools/power/cpupower/Makefile
++++ b/tools/power/cpupower/Makefile
+@@ -111,7 +111,7 @@ GMO_FILES = ${shell for HLANG in ${LANGU
+ export CROSS CC AR STRIP RANLIB CFLAGS LDFLAGS LIB_OBJS
+ # check if compiler option is supported
+-cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
++cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -x c /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
+ # use '-Os' optimization if available, else use -O2
+ OPTIMIZATION := $(call cc-supports,-Os,-O2)
diff --git a/queue-3.6/kbuild-make-fix-if_changed-when-command-contains-backslashes.patch b/queue-3.6/kbuild-make-fix-if_changed-when-command-contains-backslashes.patch
new file mode 100644 (file)
index 0000000..18f7bcb
--- /dev/null
@@ -0,0 +1,43 @@
+From c353acba28fb3fa1fd05fd6b85a9fc7938330f9c Mon Sep 17 00:00:00 2001
+From: Sascha Hauer <s.hauer@pengutronix.de>
+Date: Thu, 4 Oct 2012 17:11:17 -0700
+Subject: kbuild: make: fix if_changed when command contains backslashes
+
+From: Sascha Hauer <s.hauer@pengutronix.de>
+
+commit c353acba28fb3fa1fd05fd6b85a9fc7938330f9c upstream.
+
+The call if_changed mechanism does not work when the command contains
+backslashes.  This basically is an issue with lzo and bzip2 compressed
+kernels.  The compressed binaries do not contain the uncompressed image
+size, so these use size_append to append the size.  This results in
+backslashes in the executed command.  With this if_changed always
+detects a change in the command and rebuilds the compressed image even
+if nothing has changed.
+
+Fix this by escaping backslashes in make-cmd
+
+Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
+Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: Bernhard Walle <bernhard@bwalle.de>
+Cc: Michal Marek <mmarek@suse.cz>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ scripts/Kbuild.include |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/scripts/Kbuild.include
++++ b/scripts/Kbuild.include
+@@ -209,7 +209,7 @@ endif
+ # >$< substitution to preserve $ when reloading .cmd file
+ # note: when using inline perl scripts [perl -e '...$$t=1;...']
+ # in $(cmd_xxx) double $$ your perl vars
+-make-cmd = $(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1)))))
++make-cmd = $(subst \\,\\\\,$(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1))))))
+ # Find any prerequisites that is newer than target or that does not exist.
+ # PHONY targets skipped in both cases.
diff --git a/queue-3.6/mn10300-only-add-mmem-funcs-to-kbuild_cflags-if-gcc-supports-it.patch b/queue-3.6/mn10300-only-add-mmem-funcs-to-kbuild_cflags-if-gcc-supports-it.patch
new file mode 100644 (file)
index 0000000..805fc67
--- /dev/null
@@ -0,0 +1,38 @@
+From 9957423f035c2071f6d1c5d2f095cdafbeb25ad7 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+Date: Thu, 4 Oct 2012 17:11:13 -0700
+Subject: mn10300: only add -mmem-funcs to KBUILD_CFLAGS if gcc supports it
+
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+
+commit 9957423f035c2071f6d1c5d2f095cdafbeb25ad7 upstream.
+
+It seems the current (gcc 4.6.3) no longer provides this so make it
+conditional.
+
+As reported by Tony before, the mn10300 architecture cross-compiles with
+gcc-4.6.3 if -mmem-funcs is not added to KBUILD_CFLAGS.
+
+Reported-by: Tony Breeds <tony@bakeyournoodle.com>
+Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Cc: David Howells <dhowells@redhat.com>
+Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mn10300/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/mn10300/Makefile
++++ b/arch/mn10300/Makefile
+@@ -26,7 +26,7 @@ CHECKFLAGS   +=
+ PROCESSOR     := unset
+ UNIT          := unset
+-KBUILD_CFLAGS += -mam33 -mmem-funcs -DCPU=AM33
++KBUILD_CFLAGS += -mam33 -DCPU=AM33 $(call cc-option,-mmem-funcs,)
+ KBUILD_AFLAGS += -mam33 -DCPU=AM33
+ ifeq ($(CONFIG_MN10300_CURRENT_IN_E2),y)
diff --git a/queue-3.6/series b/queue-3.6/series
new file mode 100644 (file)
index 0000000..23970e0
--- /dev/null
@@ -0,0 +1,6 @@
+mn10300-only-add-mmem-funcs-to-kbuild_cflags-if-gcc-supports-it.patch
+kbuild-make-fix-if_changed-when-command-contains-backslashes.patch
+kbuild-do-not-package-boot-and-lib-in-make-tar-pkg.patch
+kbuild-fix-gcc-x-syntax.patch
+i2c-piix4-fix-build-failure.patch
+slab-fix-the-deadlock-issue-on-l3-alien-lock.patch
diff --git a/queue-3.6/slab-fix-the-deadlock-issue-on-l3-alien-lock.patch b/queue-3.6/slab-fix-the-deadlock-issue-on-l3-alien-lock.patch
new file mode 100644 (file)
index 0000000..1edd7ee
--- /dev/null
@@ -0,0 +1,102 @@
+From 947ca1856a7e60aa6d20536785e6a42dff25aa6e Mon Sep 17 00:00:00 2001
+From: Michael Wang <wangyun@linux.vnet.ibm.com>
+Date: Wed, 5 Sep 2012 10:33:18 +0800
+Subject: slab: fix the DEADLOCK issue on l3 alien lock
+
+From: Michael Wang <wangyun@linux.vnet.ibm.com>
+
+commit 947ca1856a7e60aa6d20536785e6a42dff25aa6e upstream.
+
+DEADLOCK will be report while running a kernel with NUMA and LOCKDEP enabled,
+the process of this fake report is:
+
+          kmem_cache_free()    //free obj in cachep
+       -> cache_free_alien()   //acquire cachep's l3 alien lock
+       -> __drain_alien_cache()
+       -> free_block()
+       -> slab_destroy()
+       -> kmem_cache_free()    //free slab in cachep->slabp_cache
+       -> cache_free_alien()   //acquire cachep->slabp_cache's l3 alien lock
+
+Since the cachep and cachep->slabp_cache's l3 alien are in the same lock class,
+fake report generated.
+
+This should not happen since we already have init_lock_keys() which will
+reassign the lock class for both l3 list and l3 alien.
+
+However, init_lock_keys() was invoked at a wrong position which is before we
+invoke enable_cpucache() on each cache.
+
+Since until set slab_state to be FULL, we won't invoke enable_cpucache()
+on caches to build their l3 alien while creating them, so although we invoked
+init_lock_keys(), the l3 alien lock class won't change since we don't have
+them until invoked enable_cpucache() later.
+
+This patch will invoke init_lock_keys() after we done enable_cpucache()
+instead of before to avoid the fake DEADLOCK report.
+
+Michael traced the problem back to a commit in release 3.0.0:
+
+commit 30765b92ada267c5395fc788623cb15233276f5c
+Author: Peter Zijlstra <peterz@infradead.org>
+Date:   Thu Jul 28 23:22:56 2011 +0200
+
+    slab, lockdep: Annotate the locks before using them
+
+    Fernando found we hit the regular OFF_SLAB 'recursion' before we
+    annotate the locks, cure this.
+
+    The relevant portion of the stack-trace:
+
+    > [    0.000000]  [<c085e24f>] rt_spin_lock+0x50/0x56
+    > [    0.000000]  [<c04fb406>] __cache_free+0x43/0xc3
+    > [    0.000000]  [<c04fb23f>] kmem_cache_free+0x6c/0xdc
+    > [    0.000000]  [<c04fb2fe>] slab_destroy+0x4f/0x53
+    > [    0.000000]  [<c04fb396>] free_block+0x94/0xc1
+    > [    0.000000]  [<c04fc551>] do_tune_cpucache+0x10b/0x2bb
+    > [    0.000000]  [<c04fc8dc>] enable_cpucache+0x7b/0xa7
+    > [    0.000000]  [<c0bd9d3c>] kmem_cache_init_late+0x1f/0x61
+    > [    0.000000]  [<c0bba687>] start_kernel+0x24c/0x363
+    > [    0.000000]  [<c0bba0ba>] i386_start_kernel+0xa9/0xaf
+
+    Reported-by: Fernando Lopez-Lezcano <nando@ccrma.Stanford.EDU>
+    Acked-by: Pekka Enberg <penberg@kernel.org>
+    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
+    Link: http://lkml.kernel.org/r/1311888176.2617.379.camel@laptop
+    Signed-off-by: Ingo Molnar <mingo@elte.hu>
+
+The commit moved init_lock_keys() before we build up the alien, so we
+failed to reclass it.
+
+Acked-by: Christoph Lameter <cl@linux.com>
+Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
+Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
+Signed-off-by: Pekka Enberg <penberg@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/slab.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/mm/slab.c
++++ b/mm/slab.c
+@@ -1781,9 +1781,6 @@ void __init kmem_cache_init_late(void)
+       slab_state = UP;
+-      /* Annotate slab for lockdep -- annotate the malloc caches */
+-      init_lock_keys();
+-
+       /* 6) resize the head arrays to their final sizes */
+       mutex_lock(&slab_mutex);
+       list_for_each_entry(cachep, &slab_caches, list)
+@@ -1791,6 +1788,9 @@ void __init kmem_cache_init_late(void)
+                       BUG();
+       mutex_unlock(&slab_mutex);
++      /* Annotate slab for lockdep -- annotate the malloc caches */
++      init_lock_keys();
++
+       /* Done! */
+       slab_state = FULL;