]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 20:38:24 +0000 (13:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 20:38:24 +0000 (13:38 -0700)
added patches:
arm-8425-1-kgdb-don-t-try-to-stop-the-machine-when-setting-breakpoints.patch
arm-8429-1-disable-gcc-sra-optimization.patch
arm-dts-fix-usb-pin-control-for-imx-rex-dts.patch
arm-dts-omap3-beagle-make-i2c3-ddc-and-tfp410-gpio-work-again.patch
arm-dts-omap5-uevm.dts-fix-i2c5-pinctrl-offsets.patch
arm-exynos-reset-little-cores-when-cpu-is-up.patch
arm-fix-thumb2-signal-handling-when-armv6-is-enabled.patch
hwmon-nct6775-swap-step_up_time-and-step_down_time-registers-for-most-chips.patch
perf-fix-aux-buffer-refcounting.patch
perf-header-fixup-reading-of-header_nrcpus-feature.patch
perf-hists-update-the-column-width-for-the-srcline-sort-key.patch
perf-stat-get-correct-cpu-id-for-print_aggr.patch
perf-tools-add-empty-build-files-for-architectures-lacking-them.patch
perf-tools-fix-copying-of-proc-kcore.patch
perf-x86-intel-fix-constraint-access.patch
sched-access-local-runqueue-directly-in-single_task_running.patch
toshiba_acpi-fix-hotkeys-registration-on-some-toshiba-models.patch
watchdog-sunxi-fix-activation-of-system-reset.patch
windfarm-decrement-client-count-when-unregistering.patch

20 files changed:
queue-4.1/arm-8425-1-kgdb-don-t-try-to-stop-the-machine-when-setting-breakpoints.patch [new file with mode: 0644]
queue-4.1/arm-8429-1-disable-gcc-sra-optimization.patch [new file with mode: 0644]
queue-4.1/arm-dts-fix-usb-pin-control-for-imx-rex-dts.patch [new file with mode: 0644]
queue-4.1/arm-dts-omap3-beagle-make-i2c3-ddc-and-tfp410-gpio-work-again.patch [new file with mode: 0644]
queue-4.1/arm-dts-omap5-uevm.dts-fix-i2c5-pinctrl-offsets.patch [new file with mode: 0644]
queue-4.1/arm-exynos-reset-little-cores-when-cpu-is-up.patch [new file with mode: 0644]
queue-4.1/arm-fix-thumb2-signal-handling-when-armv6-is-enabled.patch [new file with mode: 0644]
queue-4.1/hwmon-nct6775-swap-step_up_time-and-step_down_time-registers-for-most-chips.patch [new file with mode: 0644]
queue-4.1/perf-fix-aux-buffer-refcounting.patch [new file with mode: 0644]
queue-4.1/perf-header-fixup-reading-of-header_nrcpus-feature.patch [new file with mode: 0644]
queue-4.1/perf-hists-update-the-column-width-for-the-srcline-sort-key.patch [new file with mode: 0644]
queue-4.1/perf-stat-get-correct-cpu-id-for-print_aggr.patch [new file with mode: 0644]
queue-4.1/perf-tools-add-empty-build-files-for-architectures-lacking-them.patch [new file with mode: 0644]
queue-4.1/perf-tools-fix-copying-of-proc-kcore.patch [new file with mode: 0644]
queue-4.1/perf-x86-intel-fix-constraint-access.patch [new file with mode: 0644]
queue-4.1/sched-access-local-runqueue-directly-in-single_task_running.patch [new file with mode: 0644]
queue-4.1/series
queue-4.1/toshiba_acpi-fix-hotkeys-registration-on-some-toshiba-models.patch [new file with mode: 0644]
queue-4.1/watchdog-sunxi-fix-activation-of-system-reset.patch [new file with mode: 0644]
queue-4.1/windfarm-decrement-client-count-when-unregistering.patch [new file with mode: 0644]

diff --git a/queue-4.1/arm-8425-1-kgdb-don-t-try-to-stop-the-machine-when-setting-breakpoints.patch b/queue-4.1/arm-8425-1-kgdb-don-t-try-to-stop-the-machine-when-setting-breakpoints.patch
new file mode 100644 (file)
index 0000000..49656ab
--- /dev/null
@@ -0,0 +1,86 @@
+From 7ae85dc7687c7e7119053d83d02c560ea217b772 Mon Sep 17 00:00:00 2001
+From: Doug Anderson <armlinux@m.disordat.com>
+Date: Wed, 26 Aug 2015 18:26:49 +0100
+Subject: ARM: 8425/1: kgdb: Don't try to stop the machine when setting breakpoints
+
+From: Doug Anderson <armlinux@m.disordat.com>
+
+commit 7ae85dc7687c7e7119053d83d02c560ea217b772 upstream.
+
+In (23a4e40 arm: kgdb: Handle read-only text / modules) we moved to
+using patch_text() to set breakpoints so that we could handle the case
+when we had CONFIG_DEBUG_RODATA.  That patch used patch_text().
+Unfortunately, patch_text() assumes that we're not in atomic context
+when it runs since it needs to grab a mutex and also wait for other
+CPUs to stop (which it does with a completion).
+
+This would result in a stack crawl if you had
+CONFIG_DEBUG_ATOMIC_SLEEP and tried to set a breakpoint in kgdb.  The
+crawl looked something like:
+
+ BUG: scheduling while atomic: swapper/0/0/0x00010007
+ CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.2.0-rc7-00133-geb63b34 #1073
+ Hardware name: Rockchip (Device Tree)
+  (unwind_backtrace) from [<c00133d4>] (show_stack+0x20/0x24)
+  (show_stack) from [<c05400e8>] (dump_stack+0x84/0xb8)
+  (dump_stack) from [<c004913c>] (__schedule_bug+0x54/0x6c)
+  (__schedule_bug) from [<c054065c>] (__schedule+0x80/0x668)
+  (__schedule) from [<c0540cfc>] (schedule+0xb8/0xd4)
+  (schedule) from [<c0543a3c>] (schedule_timeout+0x2c/0x234)
+  (schedule_timeout) from [<c05417c0>] (wait_for_common+0xf4/0x188)
+  (wait_for_common) from [<c0541874>] (wait_for_completion+0x20/0x24)
+  (wait_for_completion) from [<c00a0104>] (__stop_cpus+0x58/0x70)
+  (__stop_cpus) from [<c00a0580>] (stop_cpus+0x3c/0x54)
+  (stop_cpus) from [<c00a06c4>] (__stop_machine+0xcc/0xe8)
+  (__stop_machine) from [<c00a0714>] (stop_machine+0x34/0x44)
+  (stop_machine) from [<c00173e8>] (patch_text+0x28/0x34)
+  (patch_text) from [<c001733c>] (kgdb_arch_set_breakpoint+0x40/0x4c)
+  (kgdb_arch_set_breakpoint) from [<c00a0d68>] (kgdb_validate_break_address+0x2c/0x60)
+  (kgdb_validate_break_address) from [<c00a0e90>] (dbg_set_sw_break+0x1c/0xdc)
+  (dbg_set_sw_break) from [<c00a2e88>] (gdb_serial_stub+0x9c4/0xba4)
+  (gdb_serial_stub) from [<c00a11cc>] (kgdb_cpu_enter+0x1f8/0x60c)
+  (kgdb_cpu_enter) from [<c00a18cc>] (kgdb_handle_exception+0x19c/0x1d0)
+  (kgdb_handle_exception) from [<c0016f7c>] (kgdb_compiled_brk_fn+0x30/0x3c)
+  (kgdb_compiled_brk_fn) from [<c00091a4>] (do_undefinstr+0x1a4/0x20c)
+  (do_undefinstr) from [<c001400c>] (__und_svc_finish+0x0/0x34)
+
+It turns out that when we're in kgdb all the CPUs are stopped anyway
+so there's no reason we should be calling patch_text().  We can
+instead directly call __patch_text() which assumes that CPUs have
+already been stopped.
+
+Fixes: 23a4e4050ba9 ("arm: kgdb: Handle read-only text / modules")
+Reported-by: Aapo Vienamo <avienamo@nvidia.com>
+Signed-off-by: Douglas Anderson <dianders@chromium.org>
+Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
+Acked-by: Kees Cook <keescook@chromium.org>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/kernel/kgdb.c |    8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/arch/arm/kernel/kgdb.c
++++ b/arch/arm/kernel/kgdb.c
+@@ -259,15 +259,17 @@ int kgdb_arch_set_breakpoint(struct kgdb
+       if (err)
+               return err;
+-      patch_text((void *)bpt->bpt_addr,
+-                 *(unsigned int *)arch_kgdb_ops.gdb_bpt_instr);
++      /* Machine is already stopped, so we can use __patch_text() directly */
++      __patch_text((void *)bpt->bpt_addr,
++                   *(unsigned int *)arch_kgdb_ops.gdb_bpt_instr);
+       return err;
+ }
+ int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
+ {
+-      patch_text((void *)bpt->bpt_addr, *(unsigned int *)bpt->saved_instr);
++      /* Machine is already stopped, so we can use __patch_text() directly */
++      __patch_text((void *)bpt->bpt_addr, *(unsigned int *)bpt->saved_instr);
+       return 0;
+ }
diff --git a/queue-4.1/arm-8429-1-disable-gcc-sra-optimization.patch b/queue-4.1/arm-8429-1-disable-gcc-sra-optimization.patch
new file mode 100644 (file)
index 0000000..d484c59
--- /dev/null
@@ -0,0 +1,84 @@
+From a077224fd35b2f7fbc93f14cf67074fc792fbac2 Mon Sep 17 00:00:00 2001
+From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+Date: Thu, 3 Sep 2015 13:24:40 +0100
+Subject: ARM: 8429/1: disable GCC SRA optimization
+
+From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+
+commit a077224fd35b2f7fbc93f14cf67074fc792fbac2 upstream.
+
+While working on the 32-bit ARM port of UEFI, I noticed a strange
+corruption in the kernel log. The following snprintf() statement
+(in drivers/firmware/efi/efi.c:efi_md_typeattr_format())
+
+       snprintf(pos, size, "|%3s|%2s|%2s|%2s|%3s|%2s|%2s|%2s|%2s]",
+
+was producing the following output in the log:
+
+       |    |   |   |   |    |WB|WT|WC|UC]
+       |    |   |   |   |    |WB|WT|WC|UC]
+       |    |   |   |   |    |WB|WT|WC|UC]
+       |RUN|   |   |   |    |WB|WT|WC|UC]*
+       |RUN|   |   |   |    |WB|WT|WC|UC]*
+       |    |   |   |   |    |WB|WT|WC|UC]
+       |RUN|   |   |   |    |WB|WT|WC|UC]*
+       |    |   |   |   |    |WB|WT|WC|UC]
+       |RUN|   |   |   |    |   |   |   |UC]
+       |RUN|   |   |   |    |   |   |   |UC]
+
+As it turns out, this is caused by incorrect code being emitted for
+the string() function in lib/vsprintf.c. The following code
+
+       if (!(spec.flags & LEFT)) {
+               while (len < spec.field_width--) {
+                       if (buf < end)
+                               *buf = ' ';
+                       ++buf;
+               }
+       }
+       for (i = 0; i < len; ++i) {
+               if (buf < end)
+                       *buf = *s;
+               ++buf; ++s;
+       }
+       while (len < spec.field_width--) {
+               if (buf < end)
+                       *buf = ' ';
+               ++buf;
+       }
+
+when called with len == 0, triggers an issue in the GCC SRA optimization
+pass (Scalar Replacement of Aggregates), which handles promotion of signed
+struct members incorrectly. This is a known but as yet unresolved issue.
+(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932). In this particular
+case, it is causing the second while loop to be executed erroneously a
+single time, causing the additional space characters to be printed.
+
+So disable the optimization by passing -fno-ipa-sra.
+
+Acked-by: Nicolas Pitre <nico@linaro.org>
+Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/Makefile |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
+@@ -50,6 +50,14 @@ AS          += -EL
+ LD            += -EL
+ endif
++#
++# The Scalar Replacement of Aggregates (SRA) optimization pass in GCC 4.9 and
++# later may result in code being generated that handles signed short and signed
++# char struct members incorrectly. So disable it.
++# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932)
++#
++KBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra)
++
+ # This selects which instruction set is used.
+ # Note that GCC does not numerically define an architecture version
+ # macro, but instead defines a whole series of macros which makes
diff --git a/queue-4.1/arm-dts-fix-usb-pin-control-for-imx-rex-dts.patch b/queue-4.1/arm-dts-fix-usb-pin-control-for-imx-rex-dts.patch
new file mode 100644 (file)
index 0000000..38060b7
--- /dev/null
@@ -0,0 +1,53 @@
+From 0af822110871400908d5b6f83a8908c45f881d8f Mon Sep 17 00:00:00 2001
+From: "Felipe F. Tonello" <eu@felipetonello.com>
+Date: Wed, 16 Sep 2015 18:40:32 +0100
+Subject: ARM: dts: fix usb pin control for imx-rex dts
+
+From: "Felipe F. Tonello" <eu@felipetonello.com>
+
+commit 0af822110871400908d5b6f83a8908c45f881d8f upstream.
+
+This fixes a duplicated pin control causing this error:
+
+imx6q-pinctrl 20e0000.iomuxc: pin MX6Q_PAD_GPIO_1 already
+requested by regulators:regulator@2; cannot claim for 2184000.usb
+imx6q-pinctrl 20e0000.iomuxc: pin-137 (2184000.usb) status -22
+imx6q-pinctrl 20e0000.iomuxc: could not request pin 137
+(MX6Q_PAD_GPIO_1) from group usbotggrp  on device 20e0000.iomuxc
+imx_usb 2184000.usb: Error applying setting, reverse things
+back
+imx6q-pinctrl 20e0000.iomuxc: pin MX6Q_PAD_EIM_D31 already
+requested by regulators:regulator@1; cannot claim for 2184200.usb
+imx6q-pinctrl 20e0000.iomuxc: pin-52 (2184200.usb) status -22
+imx6q-pinctrl 20e0000.iomuxc: could not request pin 52 (MX6Q_PAD_EIM_D31)
+from group usbh1grp  on device 20e0000.iomuxc
+imx_usb 2184200.usb: Error applying setting, reverse things
+back
+
+Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
+Fixes: e2047e33f2bd ("ARM: dts: add initial Rex Pro board support")
+Signed-off-by: Shawn Guo <shawnguo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/imx6qdl-rex.dtsi |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/arch/arm/boot/dts/imx6qdl-rex.dtsi
++++ b/arch/arm/boot/dts/imx6qdl-rex.dtsi
+@@ -35,7 +35,6 @@
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       pinctrl-names = "default";
+-                      pinctrl-0 = <&pinctrl_usbh1>;
+                       regulator-name = "usbh1_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+@@ -47,7 +46,6 @@
+                       compatible = "regulator-fixed";
+                       reg = <2>;
+                       pinctrl-names = "default";
+-                      pinctrl-0 = <&pinctrl_usbotg>;
+                       regulator-name = "usb_otg_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
diff --git a/queue-4.1/arm-dts-omap3-beagle-make-i2c3-ddc-and-tfp410-gpio-work-again.patch b/queue-4.1/arm-dts-omap3-beagle-make-i2c3-ddc-and-tfp410-gpio-work-again.patch
new file mode 100644 (file)
index 0000000..4cf989f
--- /dev/null
@@ -0,0 +1,40 @@
+From 3a2fa775bd1d0579113666c1a2e37654a34018a0 Mon Sep 17 00:00:00 2001
+From: Carl Frederik Werner <frederik@cfbw.eu>
+Date: Wed, 2 Sep 2015 10:07:57 +0900
+Subject: ARM: dts: omap3-beagle: make i2c3, ddc and tfp410 gpio work again
+
+From: Carl Frederik Werner <frederik@cfbw.eu>
+
+commit 3a2fa775bd1d0579113666c1a2e37654a34018a0 upstream.
+
+Let's fix pinmux address of gpio 170 used by tfp410 powerdown-gpio.
+
+According to the OMAP35x Technical Reference Manual
+  CONTROL_PADCONF_I2C3_SDA[15:0]  0x480021C4 mode0: i2c3_sda
+  CONTROL_PADCONF_I2C3_SDA[31:16] 0x480021C4 mode4: gpio_170
+the pinmux address of gpio 170 must be 0x480021C6.
+
+The former wrong address broke i2c3 (used by hdmi ddc), resulting in
+kernel message:
+  omap_i2c 48060000.i2c: controller timed out
+
+Fixes: 8cecf52befd7 ("ARM: omap3-beagle.dts: add display information")
+Signed-off-by: Carl Frederik Werner <frederik@cfbw.eu>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/omap3-beagle.dts |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/omap3-beagle.dts
++++ b/arch/arm/boot/dts/omap3-beagle.dts
+@@ -202,7 +202,7 @@
+       tfp410_pins: pinmux_tfp410_pins {
+               pinctrl-single,pins = <
+-                      0x194 (PIN_OUTPUT | MUX_MODE4)  /* hdq_sio.gpio_170 */
++                      0x196 (PIN_OUTPUT | MUX_MODE4)  /* hdq_sio.gpio_170 */
+               >;
+       };
diff --git a/queue-4.1/arm-dts-omap5-uevm.dts-fix-i2c5-pinctrl-offsets.patch b/queue-4.1/arm-dts-omap5-uevm.dts-fix-i2c5-pinctrl-offsets.patch
new file mode 100644 (file)
index 0000000..9836918
--- /dev/null
@@ -0,0 +1,35 @@
+From 1dbdad75074d16c3e3005180f81a01cdc04a7872 Mon Sep 17 00:00:00 2001
+From: Grazvydas Ignotas <notasas@gmail.com>
+Date: Wed, 16 Sep 2015 01:34:31 +0300
+Subject: ARM: dts: omap5-uevm.dts: fix i2c5 pinctrl offsets
+
+From: Grazvydas Ignotas <notasas@gmail.com>
+
+commit 1dbdad75074d16c3e3005180f81a01cdc04a7872 upstream.
+
+The i2c5 pinctrl offsets are wrong. If the bootloader doesn't set the
+pins up, communication with tca6424a doesn't work (controller timeouts)
+and it is not possible to enable HDMI.
+
+Fixes: 9be495c42609 ("ARM: dts: omap5-evm: Add I2c pinctrl data")
+Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/omap5-uevm.dts |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/boot/dts/omap5-uevm.dts
++++ b/arch/arm/boot/dts/omap5-uevm.dts
+@@ -174,8 +174,8 @@
+       i2c5_pins: pinmux_i2c5_pins {
+               pinctrl-single,pins = <
+-                      0x184 (PIN_INPUT | MUX_MODE0)           /* i2c5_scl */
+-                      0x186 (PIN_INPUT | MUX_MODE0)           /* i2c5_sda */
++                      0x186 (PIN_INPUT | MUX_MODE0)           /* i2c5_scl */
++                      0x188 (PIN_INPUT | MUX_MODE0)           /* i2c5_sda */
+               >;
+       };
diff --git a/queue-4.1/arm-exynos-reset-little-cores-when-cpu-is-up.patch b/queue-4.1/arm-exynos-reset-little-cores-when-cpu-is-up.patch
new file mode 100644 (file)
index 0000000..b23faa8
--- /dev/null
@@ -0,0 +1,97 @@
+From 833b5794e3303cc97a0d2d4ba97f26cc9d9b4b79 Mon Sep 17 00:00:00 2001
+From: Chanho Park <parkch98@gmail.com>
+Date: Tue, 1 Sep 2015 23:17:03 +0900
+Subject: ARM: EXYNOS: reset Little cores when cpu is up
+
+From: Chanho Park <parkch98@gmail.com>
+
+commit 833b5794e3303cc97a0d2d4ba97f26cc9d9b4b79 upstream.
+
+The cpu booting of exynos5422 has been still broken since we discussed
+it in last year[1]. This patch is inspired from Odroid XU3
+code (Actually, it was from samsung exynos vendor kernel)[2]. This weird
+reset code was founded exynos5420 octa cores series SoCs and only
+required for the first boot core is the Little core (Cortex A7).
+Some of the exynos5420 boards and all of the exynos5422 boards will require
+this code.
+
+There is two ways to check the little core is the first cpu. One is
+checking GPG2CON[1] GPIO value and the other is checking the cluster
+number of the first cpu. I selected the latter because it's more easier
+than the former.
+
+[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/350632.html
+[2] https://patchwork.kernel.org/patch/6782891/
+
+Cc: Kevin Hilman <khilman@kernel.org>
+Cc: Javier Martinez Canillas <javier@osg.samsung.com>
+Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+Tested-by: Kevin Hilman <khilman@linaro.org>
+Signed-off-by: Chanho Park <parkch98@gmail.com>
+[k.kozlowski: Adding stable for v4.1+, reformat comment]
+Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-exynos/mcpm-exynos.c |   27 ++++++++++++++++++++++++++-
+ arch/arm/mach-exynos/regs-pmu.h    |    6 ++++++
+ 2 files changed, 32 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/mach-exynos/mcpm-exynos.c
++++ b/arch/arm/mach-exynos/mcpm-exynos.c
+@@ -20,6 +20,7 @@
+ #include <asm/cputype.h>
+ #include <asm/cp15.h>
+ #include <asm/mcpm.h>
++#include <asm/smp_plat.h>
+ #include "regs-pmu.h"
+ #include "common.h"
+@@ -70,7 +71,31 @@ static int exynos_cpu_powerup(unsigned i
+               cluster >= EXYNOS5420_NR_CLUSTERS)
+               return -EINVAL;
+-      exynos_cpu_power_up(cpunr);
++      if (!exynos_cpu_power_state(cpunr)) {
++              exynos_cpu_power_up(cpunr);
++
++              /*
++               * This assumes the cluster number of the big cores(Cortex A15)
++               * is 0 and the Little cores(Cortex A7) is 1.
++               * When the system was booted from the Little core,
++               * they should be reset during power up cpu.
++               */
++              if (cluster &&
++                  cluster == MPIDR_AFFINITY_LEVEL(cpu_logical_map(0), 1)) {
++                      /*
++                       * Before we reset the Little cores, we should wait
++                       * the SPARE2 register is set to 1 because the init
++                       * codes of the iROM will set the register after
++                       * initialization.
++                       */
++                      while (!pmu_raw_readl(S5P_PMU_SPARE2))
++                              udelay(10);
++
++                      pmu_raw_writel(EXYNOS5420_KFC_CORE_RESET(cpu),
++                                      EXYNOS_SWRESET);
++              }
++      }
++
+       return 0;
+ }
+--- a/arch/arm/mach-exynos/regs-pmu.h
++++ b/arch/arm/mach-exynos/regs-pmu.h
+@@ -513,6 +513,12 @@ static inline unsigned int exynos_pmu_cp
+ #define SPREAD_ENABLE                                         0xF
+ #define SPREAD_USE_STANDWFI                                   0xF
++#define EXYNOS5420_KFC_CORE_RESET0                            BIT(8)
++#define EXYNOS5420_KFC_ETM_RESET0                             BIT(20)
++
++#define EXYNOS5420_KFC_CORE_RESET(_nr)                                \
++      ((EXYNOS5420_KFC_CORE_RESET0 | EXYNOS5420_KFC_ETM_RESET0) << (_nr))
++
+ #define EXYNOS5420_BB_CON1                                    0x0784
+ #define EXYNOS5420_BB_SEL_EN                                  BIT(31)
+ #define EXYNOS5420_BB_PMOS_EN                                 BIT(7)
diff --git a/queue-4.1/arm-fix-thumb2-signal-handling-when-armv6-is-enabled.patch b/queue-4.1/arm-fix-thumb2-signal-handling-when-armv6-is-enabled.patch
new file mode 100644 (file)
index 0000000..e27abef
--- /dev/null
@@ -0,0 +1,59 @@
+From 9b55613f42e8d40d5c9ccb8970bde6af4764b2ab Mon Sep 17 00:00:00 2001
+From: Russell King <rmk+kernel@arm.linux.org.uk>
+Date: Fri, 11 Sep 2015 16:44:02 +0100
+Subject: ARM: fix Thumb2 signal handling when ARMv6 is enabled
+
+From: Russell King <rmk+kernel@arm.linux.org.uk>
+
+commit 9b55613f42e8d40d5c9ccb8970bde6af4764b2ab upstream.
+
+When a kernel is built covering ARMv6 to ARMv7, we omit to clear the
+IT state when entering a signal handler.  This can cause the first
+few instructions to be conditionally executed depending on the parent
+context.
+
+In any case, the original test for >= ARMv7 is broken - ARMv6 can have
+Thumb-2 support as well, and an ARMv6T2 specific build would omit this
+code too.
+
+Relax the test back to ARMv6 or greater.  This results in us always
+clearing the IT state bits in the PSR, even on CPUs where these bits
+are reserved.  However, they're reserved for the IT state, so this
+should cause no harm.
+
+Fixes: d71e1352e240 ("Clear the IT state when invoking a Thumb-2 signal handler")
+Acked-by: Tony Lindgren <tony@atomide.com>
+Tested-by: H. Nikolaus Schaller <hns@goldelico.com>
+Tested-by: Grazvydas Ignotas <notasas@gmail.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/kernel/signal.c |   15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+--- a/arch/arm/kernel/signal.c
++++ b/arch/arm/kernel/signal.c
+@@ -343,12 +343,17 @@ setup_return(struct pt_regs *regs, struc
+                */
+               thumb = handler & 1;
+-#if __LINUX_ARM_ARCH__ >= 7
++#if __LINUX_ARM_ARCH__ >= 6
+               /*
+-               * Clear the If-Then Thumb-2 execution state
+-               * ARM spec requires this to be all 000s in ARM mode
+-               * Snapdragon S4/Krait misbehaves on a Thumb=>ARM
+-               * signal transition without this.
++               * Clear the If-Then Thumb-2 execution state.  ARM spec
++               * requires this to be all 000s in ARM mode.  Snapdragon
++               * S4/Krait misbehaves on a Thumb=>ARM signal transition
++               * without this.
++               *
++               * We must do this whenever we are running on a Thumb-2
++               * capable CPU, which includes ARMv6T2.  However, we elect
++               * to do this whenever we're on an ARMv6 or later CPU for
++               * simplicity.
+                */
+               cpsr &= ~PSR_IT_MASK;
+ #endif
diff --git a/queue-4.1/hwmon-nct6775-swap-step_up_time-and-step_down_time-registers-for-most-chips.patch b/queue-4.1/hwmon-nct6775-swap-step_up_time-and-step_down_time-registers-for-most-chips.patch
new file mode 100644 (file)
index 0000000..ac6cbe7
--- /dev/null
@@ -0,0 +1,67 @@
+From 728d29400488d54974d3317fe8a232b45fdb42ee Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Mon, 31 Aug 2015 16:13:47 -0700
+Subject: hwmon: (nct6775) Swap STEP_UP_TIME and STEP_DOWN_TIME registers for most chips
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit 728d29400488d54974d3317fe8a232b45fdb42ee upstream.
+
+The STEP_UP_TIME and STEP_DOWN_TIME registers are swapped for all chips but
+NCT6775.
+
+Reported-by: Grazvydas Ignotas <notasas@gmail.com>
+Reviewed-by: Jean Delvare <jdelvare@suse.de>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/nct6775.c |   16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+--- a/drivers/hwmon/nct6775.c
++++ b/drivers/hwmon/nct6775.c
+@@ -354,6 +354,10 @@ static const u16 NCT6775_REG_TEMP_CRIT[A
+ /* NCT6776 specific data */
++/* STEP_UP_TIME and STEP_DOWN_TIME regs are swapped for all chips but NCT6775 */
++#define NCT6776_REG_FAN_STEP_UP_TIME NCT6775_REG_FAN_STEP_DOWN_TIME
++#define NCT6776_REG_FAN_STEP_DOWN_TIME NCT6775_REG_FAN_STEP_UP_TIME
++
+ static const s8 NCT6776_ALARM_BITS[] = {
+       0, 1, 2, 3, 8, 21, 20, 16,      /* in0.. in7 */
+       17, -1, -1, -1, -1, -1, -1,     /* in8..in14 */
+@@ -3528,8 +3532,8 @@ static int nct6775_probe(struct platform
+               data->REG_FAN_PULSES = NCT6776_REG_FAN_PULSES;
+               data->FAN_PULSE_SHIFT = NCT6775_FAN_PULSE_SHIFT;
+               data->REG_FAN_TIME[0] = NCT6775_REG_FAN_STOP_TIME;
+-              data->REG_FAN_TIME[1] = NCT6775_REG_FAN_STEP_UP_TIME;
+-              data->REG_FAN_TIME[2] = NCT6775_REG_FAN_STEP_DOWN_TIME;
++              data->REG_FAN_TIME[1] = NCT6776_REG_FAN_STEP_UP_TIME;
++              data->REG_FAN_TIME[2] = NCT6776_REG_FAN_STEP_DOWN_TIME;
+               data->REG_TOLERANCE_H = NCT6776_REG_TOLERANCE_H;
+               data->REG_PWM[0] = NCT6775_REG_PWM;
+               data->REG_PWM[1] = NCT6775_REG_FAN_START_OUTPUT;
+@@ -3600,8 +3604,8 @@ static int nct6775_probe(struct platform
+               data->REG_FAN_PULSES = NCT6779_REG_FAN_PULSES;
+               data->FAN_PULSE_SHIFT = NCT6775_FAN_PULSE_SHIFT;
+               data->REG_FAN_TIME[0] = NCT6775_REG_FAN_STOP_TIME;
+-              data->REG_FAN_TIME[1] = NCT6775_REG_FAN_STEP_UP_TIME;
+-              data->REG_FAN_TIME[2] = NCT6775_REG_FAN_STEP_DOWN_TIME;
++              data->REG_FAN_TIME[1] = NCT6776_REG_FAN_STEP_UP_TIME;
++              data->REG_FAN_TIME[2] = NCT6776_REG_FAN_STEP_DOWN_TIME;
+               data->REG_TOLERANCE_H = NCT6776_REG_TOLERANCE_H;
+               data->REG_PWM[0] = NCT6775_REG_PWM;
+               data->REG_PWM[1] = NCT6775_REG_FAN_START_OUTPUT;
+@@ -3677,8 +3681,8 @@ static int nct6775_probe(struct platform
+               data->REG_FAN_PULSES = NCT6779_REG_FAN_PULSES;
+               data->FAN_PULSE_SHIFT = NCT6775_FAN_PULSE_SHIFT;
+               data->REG_FAN_TIME[0] = NCT6775_REG_FAN_STOP_TIME;
+-              data->REG_FAN_TIME[1] = NCT6775_REG_FAN_STEP_UP_TIME;
+-              data->REG_FAN_TIME[2] = NCT6775_REG_FAN_STEP_DOWN_TIME;
++              data->REG_FAN_TIME[1] = NCT6776_REG_FAN_STEP_UP_TIME;
++              data->REG_FAN_TIME[2] = NCT6776_REG_FAN_STEP_DOWN_TIME;
+               data->REG_TOLERANCE_H = NCT6776_REG_TOLERANCE_H;
+               data->REG_PWM[0] = NCT6775_REG_PWM;
+               data->REG_PWM[1] = NCT6775_REG_FAN_START_OUTPUT;
diff --git a/queue-4.1/perf-fix-aux-buffer-refcounting.patch b/queue-4.1/perf-fix-aux-buffer-refcounting.patch
new file mode 100644 (file)
index 0000000..26510cf
--- /dev/null
@@ -0,0 +1,141 @@
+From 57ffc5ca679f499f4704fd9b6a372916f59930ee Mon Sep 17 00:00:00 2001
+From: Peter Zijlstra <peterz@infradead.org>
+Date: Thu, 18 Jun 2015 12:32:49 +0200
+Subject: perf: Fix AUX buffer refcounting
+
+From: Peter Zijlstra <peterz@infradead.org>
+
+commit 57ffc5ca679f499f4704fd9b6a372916f59930ee upstream.
+
+Its currently possible to drop the last refcount to the aux buffer
+from NMI context, which results in the expected fireworks.
+
+The refcounting needs a bigger overhaul, but to cure the immediate
+problem, delay the freeing by using an irq_work.
+
+Reviewed-and-tested-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Reported-by: Vince Weaver <vincent.weaver@maine.edu>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Stephane Eranian <eranian@gmail.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Link: http://lkml.kernel.org/r/20150618103249.GK19282@twins.programming.kicks-ass.net
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/events/core.c        |    8 --------
+ kernel/events/internal.h    |   10 ++++++++++
+ kernel/events/ring_buffer.c |   27 +++++++++++++++++++++++++--
+ 3 files changed, 35 insertions(+), 10 deletions(-)
+
+--- a/kernel/events/core.c
++++ b/kernel/events/core.c
+@@ -4411,14 +4411,6 @@ static void ring_buffer_wakeup(struct pe
+       rcu_read_unlock();
+ }
+-static void rb_free_rcu(struct rcu_head *rcu_head)
+-{
+-      struct ring_buffer *rb;
+-
+-      rb = container_of(rcu_head, struct ring_buffer, rcu_head);
+-      rb_free(rb);
+-}
+-
+ struct ring_buffer *ring_buffer_get(struct perf_event *event)
+ {
+       struct ring_buffer *rb;
+--- a/kernel/events/internal.h
++++ b/kernel/events/internal.h
+@@ -11,6 +11,7 @@
+ struct ring_buffer {
+       atomic_t                        refcount;
+       struct rcu_head                 rcu_head;
++      struct irq_work                 irq_work;
+ #ifdef CONFIG_PERF_USE_VMALLOC
+       struct work_struct              work;
+       int                             page_order;     /* allocation order  */
+@@ -55,6 +56,15 @@ struct ring_buffer {
+ };
+ extern void rb_free(struct ring_buffer *rb);
++
++static inline void rb_free_rcu(struct rcu_head *rcu_head)
++{
++      struct ring_buffer *rb;
++
++      rb = container_of(rcu_head, struct ring_buffer, rcu_head);
++      rb_free(rb);
++}
++
+ extern struct ring_buffer *
+ rb_alloc(int nr_pages, long watermark, int cpu, int flags);
+ extern void perf_event_wakeup(struct perf_event *event);
+--- a/kernel/events/ring_buffer.c
++++ b/kernel/events/ring_buffer.c
+@@ -221,6 +221,8 @@ void perf_output_end(struct perf_output_
+       rcu_read_unlock();
+ }
++static void rb_irq_work(struct irq_work *work);
++
+ static void
+ ring_buffer_init(struct ring_buffer *rb, long watermark, int flags)
+ {
+@@ -241,6 +243,16 @@ ring_buffer_init(struct ring_buffer *rb,
+       INIT_LIST_HEAD(&rb->event_list);
+       spin_lock_init(&rb->event_lock);
++      init_irq_work(&rb->irq_work, rb_irq_work);
++}
++
++static void ring_buffer_put_async(struct ring_buffer *rb)
++{
++      if (!atomic_dec_and_test(&rb->refcount))
++              return;
++
++      rb->rcu_head.next = (void *)rb;
++      irq_work_queue(&rb->irq_work);
+ }
+ /*
+@@ -319,7 +331,7 @@ err_put:
+       rb_free_aux(rb);
+ err:
+-      ring_buffer_put(rb);
++      ring_buffer_put_async(rb);
+       handle->event = NULL;
+       return NULL;
+@@ -370,7 +382,7 @@ void perf_aux_output_end(struct perf_out
+       local_set(&rb->aux_nest, 0);
+       rb_free_aux(rb);
+-      ring_buffer_put(rb);
++      ring_buffer_put_async(rb);
+ }
+ /*
+@@ -559,7 +571,18 @@ static void __rb_free_aux(struct ring_bu
+ void rb_free_aux(struct ring_buffer *rb)
+ {
+       if (atomic_dec_and_test(&rb->aux_refcount))
++              irq_work_queue(&rb->irq_work);
++}
++
++static void rb_irq_work(struct irq_work *work)
++{
++      struct ring_buffer *rb = container_of(work, struct ring_buffer, irq_work);
++
++      if (!atomic_read(&rb->aux_refcount))
+               __rb_free_aux(rb);
++
++      if (rb->rcu_head.next == (void *)rb)
++              call_rcu(&rb->rcu_head, rb_free_rcu);
+ }
+ #ifndef CONFIG_PERF_USE_VMALLOC
diff --git a/queue-4.1/perf-header-fixup-reading-of-header_nrcpus-feature.patch b/queue-4.1/perf-header-fixup-reading-of-header_nrcpus-feature.patch
new file mode 100644 (file)
index 0000000..df12bf6
--- /dev/null
@@ -0,0 +1,83 @@
+From caa470475d9b59eeff093ae650800d34612c4379 Mon Sep 17 00:00:00 2001
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+Date: Fri, 11 Sep 2015 12:36:12 -0300
+Subject: perf header: Fixup reading of HEADER_NRCPUS feature
+
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+
+commit caa470475d9b59eeff093ae650800d34612c4379 upstream.
+
+The original patch introducing this header wrote the number of CPUs available
+and online in one order and then swapped those values when reading, fix it.
+
+Before:
+
+  # perf record usleep 1
+  # perf report --header-only | grep 'nrcpus \(online\|avail\)'
+  # nrcpus online : 4
+  # nrcpus avail : 4
+  # echo 0 > /sys/devices/system/cpu/cpu2/online
+  # perf record usleep 1
+  # perf report --header-only | grep 'nrcpus \(online\|avail\)'
+  # nrcpus online : 4
+  # nrcpus avail : 3
+  # echo 0 > /sys/devices/system/cpu/cpu1/online
+  # perf record usleep 1
+  # perf report --header-only | grep 'nrcpus \(online\|avail\)'
+  # nrcpus online : 4
+  # nrcpus avail : 2
+
+After the fix, bringing back the CPUs online:
+
+  # perf report --header-only | grep 'nrcpus \(online\|avail\)'
+  # nrcpus online : 2
+  # nrcpus avail : 4
+  # echo 1 > /sys/devices/system/cpu/cpu2/online
+  # perf record usleep 1
+  # perf report --header-only | grep 'nrcpus \(online\|avail\)'
+  # nrcpus online : 3
+  # nrcpus avail : 4
+  # echo 1 > /sys/devices/system/cpu/cpu1/online
+  # perf record usleep 1
+  # perf report --header-only | grep 'nrcpus \(online\|avail\)'
+  # nrcpus online : 4
+  # nrcpus avail : 4
+
+Acked-by: Namhyung Kim <namhyung@kernel.org>
+Cc: Adrian Hunter <adrian.hunter@intel.com>
+Cc: Borislav Petkov <bp@suse.de>
+Cc: David Ahern <dsahern@gmail.com>
+Cc: Frederic Weisbecker <fweisbec@gmail.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Kan Liang <kan.liang@intel.com>
+Cc: Stephane Eranian <eranian@google.com>
+Cc: Wang Nan <wangnan0@huawei.com>
+Fixes: fbe96f29ce4b ("perf tools: Make perf.data more self-descriptive (v8)")
+Link: http://lkml.kernel.org/r/20150911153323.GP23511@kernel.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/util/header.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/tools/perf/util/header.c
++++ b/tools/perf/util/header.c
+@@ -1426,7 +1426,7 @@ static int process_nrcpus(struct perf_fi
+       if (ph->needs_swap)
+               nr = bswap_32(nr);
+-      ph->env.nr_cpus_online = nr;
++      ph->env.nr_cpus_avail = nr;
+       ret = readn(fd, &nr, sizeof(nr));
+       if (ret != sizeof(nr))
+@@ -1435,7 +1435,7 @@ static int process_nrcpus(struct perf_fi
+       if (ph->needs_swap)
+               nr = bswap_32(nr);
+-      ph->env.nr_cpus_avail = nr;
++      ph->env.nr_cpus_online = nr;
+       return 0;
+ }
diff --git a/queue-4.1/perf-hists-update-the-column-width-for-the-srcline-sort-key.patch b/queue-4.1/perf-hists-update-the-column-width-for-the-srcline-sort-key.patch
new file mode 100644 (file)
index 0000000..bf1181f
--- /dev/null
@@ -0,0 +1,42 @@
+From e8e6d37e73e6b950c891c780745460b87f4755b6 Mon Sep 17 00:00:00 2001
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+Date: Mon, 10 Aug 2015 16:53:54 -0300
+Subject: perf hists: Update the column width for the "srcline" sort key
+
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+
+commit e8e6d37e73e6b950c891c780745460b87f4755b6 upstream.
+
+When we introduce a new sort key, we need to update the
+hists__calc_col_len() function accordingly, otherwise the width
+will be limited to strlen(header).
+
+We can't update it when obtaining a line value for a column (for
+instance, in sort__srcline_cmp()), because we reset it all when doing a
+resort (see hists__output_recalc_col_len()), so we need to, from what is
+in the hist_entry fields, set each of the column widths.
+
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Andi Kleen <andi@firstfloor.org>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Fixes: 409a8be61560 ("perf tools: Add sort by src line/number")
+Link: http://lkml.kernel.org/n/tip-jgbe0yx8v1gs89cslr93pvz2@git.kernel.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/util/hist.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/tools/perf/util/hist.c
++++ b/tools/perf/util/hist.c
+@@ -151,6 +151,9 @@ void hists__calc_col_len(struct hists *h
+       hists__new_col_len(hists, HISTC_LOCAL_WEIGHT, 12);
+       hists__new_col_len(hists, HISTC_GLOBAL_WEIGHT, 12);
++      if (h->srcline)
++              hists__new_col_len(hists, HISTC_SRCLINE, strlen(h->srcline));
++
+       if (h->transaction)
+               hists__new_col_len(hists, HISTC_TRANSACTION,
+                                  hist_entry__transaction_len());
diff --git a/queue-4.1/perf-stat-get-correct-cpu-id-for-print_aggr.patch b/queue-4.1/perf-stat-get-correct-cpu-id-for-print_aggr.patch
new file mode 100644 (file)
index 0000000..9c79239
--- /dev/null
@@ -0,0 +1,78 @@
+From 601083cffb7cabdcc55b8195d732f0f7028570fa Mon Sep 17 00:00:00 2001
+From: Kan Liang <kan.liang@intel.com>
+Date: Thu, 2 Jul 2015 03:08:43 -0400
+Subject: perf stat: Get correct cpu id for print_aggr
+
+From: Kan Liang <kan.liang@intel.com>
+
+commit 601083cffb7cabdcc55b8195d732f0f7028570fa upstream.
+
+print_aggr() fails to print per-core/per-socket statistics after commit
+582ec0829b3d ("perf stat: Fix per-socket output bug for uncore events")
+if events have differnt cpus. Because in print_aggr(), aggr_get_id needs
+index (not cpu id) to find core/pkg id. Also, evsel cpu maps should be
+used to get aggregated id.
+
+Here is an example:
+
+Counting events cycles,uncore_imc_0/cas_count_read/. (Uncore event has
+cpumask 0,18)
+
+  $ perf stat -e cycles,uncore_imc_0/cas_count_read/ -C0,18 --per-core sleep 2
+
+Without this patch, it failes to get CPU 18 result.
+
+   Performance counter stats for 'CPU(s) 0,18':
+
+  S0-C0           1            7526851      cycles
+  S0-C0           1               1.05 MiB  uncore_imc_0/cas_count_read/
+  S1-C0           0      <not counted>      cycles
+  S1-C0           0      <not counted> MiB  uncore_imc_0/cas_count_read/
+
+With this patch, it can get both CPU0 and CPU18 result.
+
+   Performance counter stats for 'CPU(s) 0,18':
+
+  S0-C0           1            6327768      cycles
+  S0-C0           1               0.47 MiB  uncore_imc_0/cas_count_read/
+  S1-C0           1             330228      cycles
+  S1-C0           1               0.29 MiB  uncore_imc_0/cas_count_read/
+
+Signed-off-by: Kan Liang <kan.liang@intel.com>
+Acked-by: Jiri Olsa <jolsa@kernel.org>
+Acked-by: Stephane Eranian <eranian@google.com>
+Cc: Adrian Hunter <adrian.hunter@intel.com>
+Cc: Andi Kleen <ak@linux.intel.com>
+Cc: David Ahern <dsahern@gmail.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Fixes: 582ec0829b3d ("perf stat: Fix per-socket output bug for uncore events")
+Link: http://lkml.kernel.org/r/1435820925-51091-1-git-send-email-kan.liang@intel.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/builtin-stat.c |    5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/tools/perf/builtin-stat.c
++++ b/tools/perf/builtin-stat.c
+@@ -1227,7 +1227,7 @@ static void abs_printout(int id, int nr,
+ static void print_aggr(char *prefix)
+ {
+       struct perf_evsel *counter;
+-      int cpu, cpu2, s, s2, id, nr;
++      int cpu, s, s2, id, nr;
+       double uval;
+       u64 ena, run, val;
+@@ -1240,8 +1240,7 @@ static void print_aggr(char *prefix)
+                       val = ena = run = 0;
+                       nr = 0;
+                       for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) {
+-                              cpu2 = perf_evsel__cpus(counter)->map[cpu];
+-                              s2 = aggr_get_id(evsel_list->cpus, cpu2);
++                              s2 = aggr_get_id(perf_evsel__cpus(counter), cpu);
+                               if (s2 != id)
+                                       continue;
+                               val += counter->counts->cpu[cpu].val;
diff --git a/queue-4.1/perf-tools-add-empty-build-files-for-architectures-lacking-them.patch b/queue-4.1/perf-tools-add-empty-build-files-for-architectures-lacking-them.patch
new file mode 100644 (file)
index 0000000..a074d62
--- /dev/null
@@ -0,0 +1,41 @@
+From 93df8a1ed6231727c5db94a80b1a6bd5ee67cec3 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Tue, 4 Aug 2015 17:10:27 +0100
+Subject: perf tools: Add empty Build files for architectures lacking them
+
+From: Ben Hutchings <ben@decadent.org.uk>
+
+commit 93df8a1ed6231727c5db94a80b1a6bd5ee67cec3 upstream.
+
+perf currently fails to build on MIPS as there is no
+tools/perf/arch/mips/Build file.  Adding an empty file fixes this as
+there are no MIPS-specific sources to build.
+
+It looks like the same is needed for Alpha and PA-RISC, though I
+haven't been able to test those.
+
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Fixes: 5e8c0fb6a957 ("perf build: Add arch x86 objects building")
+Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Link: http://lkml.kernel.org/r/1438704627.7315.2.camel@decadent.org.uk
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/arch/alpha/Build  |    1 +
+ tools/perf/arch/mips/Build   |    1 +
+ tools/perf/arch/parisc/Build |    1 +
+ 3 files changed, 3 insertions(+)
+
+--- /dev/null
++++ b/tools/perf/arch/alpha/Build
+@@ -0,0 +1 @@
++# empty
+--- /dev/null
++++ b/tools/perf/arch/mips/Build
+@@ -0,0 +1 @@
++# empty
+--- /dev/null
++++ b/tools/perf/arch/parisc/Build
+@@ -0,0 +1 @@
++# empty
diff --git a/queue-4.1/perf-tools-fix-copying-of-proc-kcore.patch b/queue-4.1/perf-tools-fix-copying-of-proc-kcore.patch
new file mode 100644 (file)
index 0000000..cc07fa9
--- /dev/null
@@ -0,0 +1,106 @@
+From b5cabbcbd157a4bf5a92dfc85134999a3b55342d Mon Sep 17 00:00:00 2001
+From: Adrian Hunter <adrian.hunter@intel.com>
+Date: Thu, 24 Sep 2015 13:05:22 +0300
+Subject: perf tools: Fix copying of /proc/kcore
+
+From: Adrian Hunter <adrian.hunter@intel.com>
+
+commit b5cabbcbd157a4bf5a92dfc85134999a3b55342d upstream.
+
+A copy of /proc/kcore containing the kernel text can be made to the
+buildid cache. e.g.
+
+       perf buildid-cache -v -k /proc/kcore
+
+To workaround objdump limitations, a copy is also made when annotating
+against /proc/kcore.
+
+The copying process stops working from libelf about v1.62 onwards (the
+problem was found with v1.63).
+
+The cause is that a call to gelf_getphdr() in kcore__add_phdr() fails
+because additional validation has been added to gelf_getphdr().
+
+The use of gelf_getphdr() is a misguided attempt to get default
+initialization of the Gelf_Phdr structure.  That should not be
+necessary because every member of the Gelf_Phdr structure is
+subsequently assigned.  So just remove the call to gelf_getphdr().
+
+Similarly, a call to gelf_getehdr() in gelf_kcore__init() can be
+removed also.
+
+Committer notes:
+
+Note to stable@kernel.org, from Adrian in the cover letter for this
+patchkit:
+
+The "Fix copying of /proc/kcore" problem goes back to v3.13 if you think
+it is important enough for stable.
+
+Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Link: http://lkml.kernel.org/r/1443089122-19082-3-git-send-email-adrian.hunter@intel.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/util/symbol-elf.c |   33 ++++++++++++---------------------
+ 1 file changed, 12 insertions(+), 21 deletions(-)
+
+--- a/tools/perf/util/symbol-elf.c
++++ b/tools/perf/util/symbol-elf.c
+@@ -1253,8 +1253,6 @@ out_close:
+ static int kcore__init(struct kcore *kcore, char *filename, int elfclass,
+                      bool temp)
+ {
+-      GElf_Ehdr *ehdr;
+-
+       kcore->elfclass = elfclass;
+       if (temp)
+@@ -1271,9 +1269,7 @@ static int kcore__init(struct kcore *kco
+       if (!gelf_newehdr(kcore->elf, elfclass))
+               goto out_end;
+-      ehdr = gelf_getehdr(kcore->elf, &kcore->ehdr);
+-      if (!ehdr)
+-              goto out_end;
++      memset(&kcore->ehdr, 0, sizeof(GElf_Ehdr));
+       return 0;
+@@ -1330,23 +1326,18 @@ static int kcore__copy_hdr(struct kcore
+ static int kcore__add_phdr(struct kcore *kcore, int idx, off_t offset,
+                          u64 addr, u64 len)
+ {
+-      GElf_Phdr gphdr;
+-      GElf_Phdr *phdr;
+-
+-      phdr = gelf_getphdr(kcore->elf, idx, &gphdr);
+-      if (!phdr)
+-              return -1;
+-
+-      phdr->p_type    = PT_LOAD;
+-      phdr->p_flags   = PF_R | PF_W | PF_X;
+-      phdr->p_offset  = offset;
+-      phdr->p_vaddr   = addr;
+-      phdr->p_paddr   = 0;
+-      phdr->p_filesz  = len;
+-      phdr->p_memsz   = len;
+-      phdr->p_align   = page_size;
++      GElf_Phdr phdr = {
++              .p_type         = PT_LOAD,
++              .p_flags        = PF_R | PF_W | PF_X,
++              .p_offset       = offset,
++              .p_vaddr        = addr,
++              .p_paddr        = 0,
++              .p_filesz       = len,
++              .p_memsz        = len,
++              .p_align        = page_size,
++      };
+-      if (!gelf_update_phdr(kcore->elf, idx, phdr))
++      if (!gelf_update_phdr(kcore->elf, idx, &phdr))
+               return -1;
+       return 0;
diff --git a/queue-4.1/perf-x86-intel-fix-constraint-access.patch b/queue-4.1/perf-x86-intel-fix-constraint-access.patch
new file mode 100644 (file)
index 0000000..880b010
--- /dev/null
@@ -0,0 +1,42 @@
+From ebfb4988f0378e2ac3b4a0aa1ea20d724293f392 Mon Sep 17 00:00:00 2001
+From: Peter Zijlstra <peterz@infradead.org>
+Date: Thu, 10 Sep 2015 11:58:27 +0200
+Subject: perf/x86/intel: Fix constraint access
+
+From: Peter Zijlstra <peterz@infradead.org>
+
+commit ebfb4988f0378e2ac3b4a0aa1ea20d724293f392 upstream.
+
+Sasha reported that we can get here with .idx==-1, and
+cpuc->event_constraints unallocated.
+
+Suggested-by: Stephane Eranian <eranian@google.com>
+Reported-by: Sasha Levin <sasha.levin@oracle.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Fixes: b371b5943178 ("perf/x86: Fix event/group validation")
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/cpu/perf_event_intel.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/cpu/perf_event_intel.c
++++ b/arch/x86/kernel/cpu/perf_event_intel.c
+@@ -2098,9 +2098,12 @@ static struct event_constraint *
+ intel_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
+                           struct perf_event *event)
+ {
+-      struct event_constraint *c1 = cpuc->event_constraint[idx];
++      struct event_constraint *c1 = NULL;
+       struct event_constraint *c2;
++      if (idx >= 0) /* fake does < 0 */
++              c1 = cpuc->event_constraint[idx];
++
+       /*
+        * first time only
+        * - static constraint: no change across incremental scheduling calls
diff --git a/queue-4.1/sched-access-local-runqueue-directly-in-single_task_running.patch b/queue-4.1/sched-access-local-runqueue-directly-in-single_task_running.patch
new file mode 100644 (file)
index 0000000..9ab6a38
--- /dev/null
@@ -0,0 +1,61 @@
+From 00cc1633816de8c95f337608a1ea64e228faf771 Mon Sep 17 00:00:00 2001
+From: Dominik Dingel <dingel@linux.vnet.ibm.com>
+Date: Fri, 18 Sep 2015 11:27:45 +0200
+Subject: sched: access local runqueue directly in single_task_running
+
+From: Dominik Dingel <dingel@linux.vnet.ibm.com>
+
+commit 00cc1633816de8c95f337608a1ea64e228faf771 upstream.
+
+Commit 2ee507c47293 ("sched: Add function single_task_running to let a task
+check if it is the only task running on a cpu") referenced the current
+runqueue with the smp_processor_id.  When CONFIG_DEBUG_PREEMPT is enabled,
+that is only allowed if preemption is disabled or the currrent task is
+bound to the local cpu (e.g. kernel worker).
+
+With commit f78195129963 ("kvm: add halt_poll_ns module parameter") KVM
+calls single_task_running. If CONFIG_DEBUG_PREEMPT is enabled that
+generates a lot of kernel messages.
+
+To avoid adding preemption in that cases, as it would limit the usefulness,
+we change single_task_running to access directly the cpu local runqueue.
+
+Cc: Tim Chen <tim.c.chen@linux.intel.com>
+Suggested-by: Peter Zijlstra <peterz@infradead.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Fixes: 2ee507c472939db4b146d545352b8a7c79ef47f8
+Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/sched/core.c |   15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -2358,13 +2358,20 @@ unsigned long nr_running(void)
+ /*
+  * Check if only the current task is running on the cpu.
++ *
++ * Caution: this function does not check that the caller has disabled
++ * preemption, thus the result might have a time-of-check-to-time-of-use
++ * race.  The caller is responsible to use it correctly, for example:
++ *
++ * - from a non-preemptable section (of course)
++ *
++ * - from a thread that is bound to a single CPU
++ *
++ * - in a loop with very short iterations (e.g. a polling loop)
+  */
+ bool single_task_running(void)
+ {
+-      if (cpu_rq(smp_processor_id())->nr_running == 1)
+-              return true;
+-      else
+-              return false;
++      return raw_rq()->nr_running == 1;
+ }
+ EXPORT_SYMBOL(single_task_running);
index 63c7a9e4b598816bad43ec86e5d67ec06fed4055..a852d77a0ff236c8739fa3cc7b347a708c1aaa51 100644 (file)
@@ -14,3 +14,22 @@ target-attach-extended_copy-local-i-o-descriptors-to-xcopy_pt_sess.patch
 iser-target-remove-command-with-state-istate_remove.patch
 iser-target-put-the-reference-on-commands-waiting-for-unsol-data.patch
 target-fix-v4.1-unit_attention-se_node_acl-device_list-null-pointer.patch
+toshiba_acpi-fix-hotkeys-registration-on-some-toshiba-models.patch
+perf-x86-intel-fix-constraint-access.patch
+perf-tools-fix-copying-of-proc-kcore.patch
+perf-hists-update-the-column-width-for-the-srcline-sort-key.patch
+perf-stat-get-correct-cpu-id-for-print_aggr.patch
+perf-tools-add-empty-build-files-for-architectures-lacking-them.patch
+perf-header-fixup-reading-of-header_nrcpus-feature.patch
+perf-fix-aux-buffer-refcounting.patch
+watchdog-sunxi-fix-activation-of-system-reset.patch
+sched-access-local-runqueue-directly-in-single_task_running.patch
+hwmon-nct6775-swap-step_up_time-and-step_down_time-registers-for-most-chips.patch
+arm-fix-thumb2-signal-handling-when-armv6-is-enabled.patch
+arm-8429-1-disable-gcc-sra-optimization.patch
+windfarm-decrement-client-count-when-unregistering.patch
+arm-8425-1-kgdb-don-t-try-to-stop-the-machine-when-setting-breakpoints.patch
+arm-dts-omap5-uevm.dts-fix-i2c5-pinctrl-offsets.patch
+arm-dts-omap3-beagle-make-i2c3-ddc-and-tfp410-gpio-work-again.patch
+arm-exynos-reset-little-cores-when-cpu-is-up.patch
+arm-dts-fix-usb-pin-control-for-imx-rex-dts.patch
diff --git a/queue-4.1/toshiba_acpi-fix-hotkeys-registration-on-some-toshiba-models.patch b/queue-4.1/toshiba_acpi-fix-hotkeys-registration-on-some-toshiba-models.patch
new file mode 100644 (file)
index 0000000..41e53e4
--- /dev/null
@@ -0,0 +1,49 @@
+From 53147b6cabee5e8d1997b5682fcc0c3b72ddf9c2 Mon Sep 17 00:00:00 2001
+From: Azael Avalos <coproscefalo@gmail.com>
+Date: Wed, 9 Sep 2015 11:25:45 -0600
+Subject: toshiba_acpi: Fix hotkeys registration on some toshiba models
+
+From: Azael Avalos <coproscefalo@gmail.com>
+
+commit 53147b6cabee5e8d1997b5682fcc0c3b72ddf9c2 upstream.
+
+Commit a2b3471b5b13 ("toshiba_acpi: Use the Hotkey Event Type function
+for keymap choosing") changed the *setup_keyboard function to query for
+the Hotkey Event Type to help choose the correct keymap, but turns out
+that here are certain Toshiba models out there not implementing this
+feature, and thus, failing to continue the input device registration and
+leaving such laptops without hotkey support.
+
+This patch changes such check, and instead of returning an error if
+the Hotkey Event Type is not present, we simply inform userspace about it,
+changing the message printed from err to notice, making the function
+responsible for registering the input device to continue.
+
+This issue was found on a Toshiba Portege Z30-B, but there might be
+some other models out there affected by this regression as well.
+
+Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
+Signed-off-by: Darren Hart <dvhart@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/platform/x86/toshiba_acpi.c |    8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+--- a/drivers/platform/x86/toshiba_acpi.c
++++ b/drivers/platform/x86/toshiba_acpi.c
+@@ -2525,11 +2525,9 @@ static int toshiba_acpi_setup_keyboard(s
+       if (error)
+               return error;
+-      error = toshiba_hotkey_event_type_get(dev, &events_type);
+-      if (error) {
+-              pr_err("Unable to query Hotkey Event Type\n");
+-              return error;
+-      }
++      if (toshiba_hotkey_event_type_get(dev, &events_type))
++              pr_notice("Unable to query Hotkey Event Type\n");
++
+       dev->hotkey_event_type = events_type;
+       dev->hotkey_dev = input_allocate_device();
diff --git a/queue-4.1/watchdog-sunxi-fix-activation-of-system-reset.patch b/queue-4.1/watchdog-sunxi-fix-activation-of-system-reset.patch
new file mode 100644 (file)
index 0000000..7a461fd
--- /dev/null
@@ -0,0 +1,37 @@
+From 0919e4445190da18496d31aac08b90828a47d45f Mon Sep 17 00:00:00 2001
+From: Francesco Lavra <francescolavra.fl@gmail.com>
+Date: Sat, 25 Jul 2015 08:25:18 +0200
+Subject: watchdog: sunxi: fix activation of system reset
+
+From: Francesco Lavra <francescolavra.fl@gmail.com>
+
+commit 0919e4445190da18496d31aac08b90828a47d45f upstream.
+
+Commit f2147de33470 ("watchdog: sunxi: support parameterized compatible
+strings") introduced a regression in sunxi_wdt_start(), by which
+the system reset function of the watchdog is not enabled upon
+starting the watchdog. As a result, the system is not reset when the
+watchdog expires. Fix it.
+
+Fixes: f2147de33470 ("watchdog: sunxi: support parameterized compatible strings")
+Signed-off-by: Francesco Lavra <francescolavra.fl@gmail.com>
+Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
+Reviewed-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/watchdog/sunxi_wdt.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/watchdog/sunxi_wdt.c
++++ b/drivers/watchdog/sunxi_wdt.c
+@@ -184,7 +184,7 @@ static int sunxi_wdt_start(struct watchd
+       /* Set system reset function */
+       reg = readl(wdt_base + regs->wdt_cfg);
+       reg &= ~(regs->wdt_reset_mask);
+-      reg |= ~(regs->wdt_reset_val);
++      reg |= regs->wdt_reset_val;
+       writel(reg, wdt_base + regs->wdt_cfg);
+       /* Enable watchdog */
diff --git a/queue-4.1/windfarm-decrement-client-count-when-unregistering.patch b/queue-4.1/windfarm-decrement-client-count-when-unregistering.patch
new file mode 100644 (file)
index 0000000..1991674
--- /dev/null
@@ -0,0 +1,34 @@
+From fe2b592173ff0274e70dc44d1d28c19bb995aa7c Mon Sep 17 00:00:00 2001
+From: Paul Bolle <pebolle@tiscali.nl>
+Date: Fri, 31 Jul 2015 14:08:58 +0200
+Subject: windfarm: decrement client count when unregistering
+
+From: Paul Bolle <pebolle@tiscali.nl>
+
+commit fe2b592173ff0274e70dc44d1d28c19bb995aa7c upstream.
+
+wf_unregister_client() increments the client count when a client
+unregisters. That is obviously incorrect. Decrement that client count
+instead.
+
+Fixes: 75722d3992f5 ("[PATCH] ppc64: Thermal control for SMU based machines")
+
+Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/macintosh/windfarm_core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/macintosh/windfarm_core.c
++++ b/drivers/macintosh/windfarm_core.c
+@@ -435,7 +435,7 @@ int wf_unregister_client(struct notifier
+ {
+       mutex_lock(&wf_lock);
+       blocking_notifier_chain_unregister(&wf_client_list, nb);
+-      wf_client_count++;
++      wf_client_count--;
+       if (wf_client_count == 0)
+               wf_stop_thread();
+       mutex_unlock(&wf_lock);