From: Greg Kroah-Hartman Date: Mon, 5 Jul 2010 17:07:28 +0000 (-0700) Subject: .27 patch for powerpc X-Git-Tag: v2.6.31.14~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e2f2d0c395f83a1e24f4a5ba290b6d7ae057bc8;p=thirdparty%2Fkernel%2Fstable-queue.git .27 patch for powerpc and refresh on a patch I forgot to remove the fuzz on. --- diff --git a/review-2.6.27/keys-return-more-accurate-error-codes.patch b/review-2.6.27/keys-return-more-accurate-error-codes.patch index 383962aa96e..6fd1f22b6c2 100644 --- a/review-2.6.27/keys-return-more-accurate-error-codes.patch +++ b/review-2.6.27/keys-return-more-accurate-error-codes.patch @@ -15,27 +15,31 @@ Signed-off-by: David Howells Signed-off-by: James Morris Signed-off-by: Greg Kroah-Hartman +--- + security/keys/process_keys.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c -@@ -508,7 +508,7 @@ try_again: +@@ -592,7 +592,7 @@ key_ref_t lookup_user_key(struct task_st - ret = install_thread_keyring(); + ret = install_thread_keyring(context); if (ret < 0) { - key = ERR_PTR(ret); + key_ref = ERR_PTR(ret); goto error; } - goto reget_creds; -@@ -526,7 +526,7 @@ try_again: + } +@@ -609,7 +609,7 @@ key_ref_t lookup_user_key(struct task_st - ret = install_process_keyring(); + ret = install_process_keyring(context); if (ret < 0) { - key = ERR_PTR(ret); + key_ref = ERR_PTR(ret); goto error; } - goto reget_creds; -@@ -585,7 +585,7 @@ try_again: + } +@@ -665,7 +665,7 @@ key_ref_t lookup_user_key(struct task_st case KEY_SPEC_GROUP_KEYRING: /* group keyrings are not yet supported */ diff --git a/review-2.6.27/powerpc-pseries-make-query_cpu_stopped-callable-outside-hotplug-cpu.patch b/review-2.6.27/powerpc-pseries-make-query_cpu_stopped-callable-outside-hotplug-cpu.patch new file mode 100644 index 00000000000..7464532cb3b --- /dev/null +++ b/review-2.6.27/powerpc-pseries-make-query_cpu_stopped-callable-outside-hotplug-cpu.patch @@ -0,0 +1,126 @@ +From f8b67691828321f5c85bb853283aa101ae673130 Mon Sep 17 00:00:00 2001 +From: Michael Neuling +Date: Wed, 28 Apr 2010 13:39:41 +0000 +Subject: powerpc/pseries: Make query_cpu_stopped callable outside hotplug cpu + +From: Michael Neuling + +commit f8b67691828321f5c85bb853283aa101ae673130 upstream. + +This moves query_cpu_stopped() out of the hotplug cpu code and into +smp.c so it can called in other places and renames it to +smp_query_cpu_stopped(). + +It also cleans up the return values by adding some #defines + +Signed-off-by: Michael Neuling +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/pseries/hotplug-cpu.c | 30 +++--------------------- + arch/powerpc/platforms/pseries/plpar_wrappers.h | 8 ++++++ + arch/powerpc/platforms/pseries/smp.c | 22 +++++++++++++++++ + 3 files changed, 34 insertions(+), 26 deletions(-) + +--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c ++++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c +@@ -66,30 +66,6 @@ static void pseries_mach_cpu_die(void) + for(;;); + } + +-static int qcss_tok; /* query-cpu-stopped-state token */ +- +-/* Get state of physical CPU. +- * Return codes: +- * 0 - The processor is in the RTAS stopped state +- * 1 - stop-self is in progress +- * 2 - The processor is not in the RTAS stopped state +- * -1 - Hardware Error +- * -2 - Hardware Busy, Try again later. +- */ +-static int query_cpu_stopped(unsigned int pcpu) +-{ +- int cpu_status, status; +- +- status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu); +- if (status != 0) { +- printk(KERN_ERR +- "RTAS query-cpu-stopped-state failed: %i\n", status); +- return status; +- } +- +- return cpu_status; +-} +- + static int pseries_cpu_disable(void) + { + int cpu = smp_processor_id(); +@@ -113,8 +89,9 @@ static void pseries_cpu_die(unsigned int + unsigned int pcpu = get_hard_smp_processor_id(cpu); + + for (tries = 0; tries < 25; tries++) { +- cpu_status = query_cpu_stopped(pcpu); +- if (cpu_status == 0 || cpu_status == -1) ++ cpu_status = smp_query_cpu_stopped(pcpu); ++ if (cpu_status == QCSS_STOPPED || ++ cpu_status == QCSS_HARDWARE_ERROR) + break; + msleep(200); + } +@@ -256,6 +233,7 @@ static int __init pseries_cpu_hotplug_in + { + struct device_node *np; + const char *typep; ++ int qcss_tok; + + for_each_node_by_name(np, "interrupt-controller") { + typep = of_get_property(np, "compatible", NULL); +--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h ++++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h +@@ -4,6 +4,14 @@ + #include + #include + ++/* Get state of physical CPU from query_cpu_stopped */ ++int smp_query_cpu_stopped(unsigned int pcpu); ++#define QCSS_STOPPED 0 ++#define QCSS_STOPPING 1 ++#define QCSS_NOT_STOPPED 2 ++#define QCSS_HARDWARE_ERROR -1 ++#define QCSS_HARDWARE_BUSY -2 ++ + static inline long poll_pending(void) + { + return plpar_hcall_norets(H_POLL_PENDING); +--- a/arch/powerpc/platforms/pseries/smp.c ++++ b/arch/powerpc/platforms/pseries/smp.c +@@ -59,6 +59,28 @@ static cpumask_t of_spin_map; + + extern void generic_secondary_smp_init(unsigned long); + ++/* Query where a cpu is now. Return codes #defined in plpar_wrappers.h */ ++int smp_query_cpu_stopped(unsigned int pcpu) ++{ ++ int cpu_status, status; ++ int qcss_tok = rtas_token("query-cpu-stopped-state"); ++ ++ if (qcss_tok == RTAS_UNKNOWN_SERVICE) { ++ printk(KERN_INFO "Firmware doesn't support " ++ "query-cpu-stopped-state\n"); ++ return QCSS_HARDWARE_ERROR; ++ } ++ ++ status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu); ++ if (status != 0) { ++ printk(KERN_ERR ++ "RTAS query-cpu-stopped-state failed: %i\n", status); ++ return status; ++ } ++ ++ return cpu_status; ++} ++ + /** + * smp_startup_cpu() - start the given cpu + * diff --git a/review-2.6.27/series b/review-2.6.27/series index 2511321066d..fc93145a45b 100644 --- a/review-2.6.27/series +++ b/review-2.6.27/series @@ -3,6 +3,7 @@ nfsd-don-t-report-compiled-out-versions-as-present.patch arcnet-limit-com20020-pci-id-matches-for-sohard-cards.patch powerpc-fix-handling-of-strncmp-with-zero-len.patch powerpc-pseries-only-call-start-cpu-when-a-cpu-is-stopped.patch +powerpc-pseries-make-query_cpu_stopped-callable-outside-hotplug-cpu.patch powerpc-oprofile-fix-potential-buffer-overrun-in-op_model_cell.c.patch md-raid1-fix-counting-of-write-targets.patch md-fix-read-balancing-in-raid1-and-raid10-on-drives-2tb.patch