From 36c1dcb2fa47b3fcab0a07b4bff10ed34a908ec8 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 9 Apr 2013 15:59:15 -0700 Subject: [PATCH] 3.0-stable patches added patches: ftrace-consistently-restore-trace-function-on-sysctl-enabling.patch powerpc-pseries_lpar_hpte_remove-fails-from-adjunct-partition-being-performed-before-the-andcond-test.patch --- ...re-trace-function-on-sysctl-enabling.patch | 40 ++++++++++++++++++ ...ng-performed-before-the-andcond-test.patch | 42 +++++++++++++++++++ queue-3.0/series | 2 + 3 files changed, 84 insertions(+) create mode 100644 queue-3.0/ftrace-consistently-restore-trace-function-on-sysctl-enabling.patch create mode 100644 queue-3.0/powerpc-pseries_lpar_hpte_remove-fails-from-adjunct-partition-being-performed-before-the-andcond-test.patch diff --git a/queue-3.0/ftrace-consistently-restore-trace-function-on-sysctl-enabling.patch b/queue-3.0/ftrace-consistently-restore-trace-function-on-sysctl-enabling.patch new file mode 100644 index 00000000000..be60d05c947 --- /dev/null +++ b/queue-3.0/ftrace-consistently-restore-trace-function-on-sysctl-enabling.patch @@ -0,0 +1,40 @@ +From 5000c418840b309251c5887f0b56503aae30f84c Mon Sep 17 00:00:00 2001 +From: Jan Kiszka +Date: Tue, 26 Mar 2013 17:53:03 +0100 +Subject: ftrace: Consistently restore trace function on sysctl enabling + +From: Jan Kiszka + +commit 5000c418840b309251c5887f0b56503aae30f84c upstream. + +If we reenable ftrace via syctl, we currently set ftrace_trace_function +based on the previous simplistic algorithm. This is inconsistent with +what update_ftrace_function does. So better call that helper instead. + +Link: http://lkml.kernel.org/r/5151D26F.1070702@siemens.com + +Signed-off-by: Jan Kiszka +Signed-off-by: Steven Rostedt +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/trace/ftrace.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +--- a/kernel/trace/ftrace.c ++++ b/kernel/trace/ftrace.c +@@ -3934,12 +3934,8 @@ ftrace_enable_sysctl(struct ctl_table *t + ftrace_startup_sysctl(); + + /* we are starting ftrace again */ +- if (ftrace_ops_list != &ftrace_list_end) { +- if (ftrace_ops_list->next == &ftrace_list_end) +- ftrace_trace_function = ftrace_ops_list->func; +- else +- ftrace_trace_function = ftrace_ops_list_func; +- } ++ if (ftrace_ops_list != &ftrace_list_end) ++ update_ftrace_function(); + + } else { + /* stopping ftrace calls (just send to ftrace_stub) */ diff --git a/queue-3.0/powerpc-pseries_lpar_hpte_remove-fails-from-adjunct-partition-being-performed-before-the-andcond-test.patch b/queue-3.0/powerpc-pseries_lpar_hpte_remove-fails-from-adjunct-partition-being-performed-before-the-andcond-test.patch new file mode 100644 index 00000000000..2d836fff98a --- /dev/null +++ b/queue-3.0/powerpc-pseries_lpar_hpte_remove-fails-from-adjunct-partition-being-performed-before-the-andcond-test.patch @@ -0,0 +1,42 @@ +From 9fb2640159f9d4f5a2a9d60e490482d4cbecafdb Mon Sep 17 00:00:00 2001 +From: Michael Wolf +Date: Fri, 5 Apr 2013 10:41:40 +0000 +Subject: powerpc: pSeries_lpar_hpte_remove fails from Adjunct partition being performed before the ANDCOND test + +From: Michael Wolf + +commit 9fb2640159f9d4f5a2a9d60e490482d4cbecafdb upstream. + +Some versions of pHyp will perform the adjunct partition test before the +ANDCOND test. The result of this is that H_RESOURCE can be returned and +cause the BUG_ON condition to occur. The HPTE is not removed. So add a +check for H_RESOURCE, it is ok if this HPTE is not removed as +pSeries_lpar_hpte_remove is looking for an HPTE to remove and not a +specific HPTE to remove. So it is ok to just move on to the next slot +and try again. + +Signed-off-by: Michael Wolf +Signed-off-by: Stephen Rothwell +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/pseries/lpar.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/arch/powerpc/platforms/pseries/lpar.c ++++ b/arch/powerpc/platforms/pseries/lpar.c +@@ -377,7 +377,13 @@ static long pSeries_lpar_hpte_remove(uns + (0x1UL << 4), &dummy1, &dummy2); + if (lpar_rc == H_SUCCESS) + return i; +- BUG_ON(lpar_rc != H_NOT_FOUND); ++ ++ /* ++ * The test for adjunct partition is performed before the ++ * ANDCOND test. H_RESOURCE may be returned, so we need to ++ * check for that as well. ++ */ ++ BUG_ON(lpar_rc != H_NOT_FOUND && lpar_rc != H_RESOURCE); + + slot_offset++; + slot_offset &= 0x7; diff --git a/queue-3.0/series b/queue-3.0/series index 3cb8ff07d4d..7b1bf00df93 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -7,3 +7,5 @@ ext4-fixup-64-bit-divides-in-3.0-stable-backport-of-upstream-fix.patch libata-use-integer-return-value-for-atapi_command_packet_set.patch libata-set-max-sector-to-65535-for-slimtype-dvd-a-ds8a8sh-drive.patch alpha-add-irongate_io-to-pci-bus-resources.patch +ftrace-consistently-restore-trace-function-on-sysctl-enabling.patch +powerpc-pseries_lpar_hpte_remove-fails-from-adjunct-partition-being-performed-before-the-andcond-test.patch -- 2.47.3