--- /dev/null
+From 5000c418840b309251c5887f0b56503aae30f84c Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <jan.kiszka@siemens.com>
+Date: Tue, 26 Mar 2013 17:53:03 +0100
+Subject: ftrace: Consistently restore trace function on sysctl enabling
+
+From: Jan Kiszka <jan.kiszka@siemens.com>
+
+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 <jan.kiszka@siemens.com>
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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) */
--- /dev/null
+From 9fb2640159f9d4f5a2a9d60e490482d4cbecafdb Mon Sep 17 00:00:00 2001
+From: Michael Wolf <mjw@linux.vnet.ibm.com>
+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 <mjw@linux.vnet.ibm.com>
+
+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 <mjw@linux.vnet.ibm.com>
+Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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;
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