From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:44241 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754907AbbHFXaE (ORCPT ); Thu, 6 Aug 2015 19:30:04 -0400 Subject: Patch "MIPS: kernel: smp-cps: Fix 64-bit compatibility errors due to pointer casting" has been added to the 4.1-stable tree To: markos.chandras@imgtec.com, gregkh@linuxfoundation.org, paul.burton@imgtec.com, ralf@linux-mips.org Cc: , From: Date: Thu, 06 Aug 2015 16:30:02 -0700 Message-ID: <1438903802168103@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled MIPS: kernel: smp-cps: Fix 64-bit compatibility errors due to pointer casting to the 4.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mips-kernel-smp-cps-fix-64-bit-compatibility-errors-due-to-pointer-casting.patch and it can be found in the queue-4.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From fd5ed3066bb2f47814fe53cdc56d11a678551ae1 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 1 Jul 2015 09:13:28 +0100 Subject: MIPS: kernel: smp-cps: Fix 64-bit compatibility errors due to pointer casting From: Markos Chandras commit fd5ed3066bb2f47814fe53cdc56d11a678551ae1 upstream. Commit 1d8f1f5a780a ("MIPS: smp-cps: hotplug support") added hotplug support in the SMP/CPS implementation but it introduced a few build problems on 64-bit kernels due to pointer being casted to and from 'int' C types. We fix this problem by using 'unsigned long' instead which should match the size of the pointers in 32/64-bit kernels. Finally, we fix the comment since the CM base address is loaded to v1($3) instead of v0. Fixes the following build problems: arch/mips/kernel/smp-cps.c: In function 'wait_for_sibling_halt': arch/mips/kernel/smp-cps.c:366:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] [...] arch/mips/kernel/smp-cps.c: In function 'cps_cpu_die': arch/mips/kernel/smp-cps.c:427:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] cc1: all warnings being treated as errors Fixes: 1d8f1f5a780a ("MIPS: smp-cps: hotplug support") Reviewed-by: Paul Burton Signed-off-by: Markos Chandras Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10586/ Signed-off-by: Ralf Baechle Signed-off-by: Greg Kroah-Hartman --- arch/mips/kernel/smp-cps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c @@ -133,7 +133,7 @@ static void __init cps_prepare_cpus(unsi /* * Patch the start of mips_cps_core_entry to provide: * - * v0 = CM base address + * v1 = CM base address * s0 = kseg0 CCA */ entry_code = (u32 *)&mips_cps_core_entry; @@ -369,7 +369,7 @@ void play_dead(void) static void wait_for_sibling_halt(void *ptr_cpu) { - unsigned cpu = (unsigned)ptr_cpu; + unsigned cpu = (unsigned long)ptr_cpu; unsigned vpe_id = cpu_vpe_id(&cpu_data[cpu]); unsigned halted; unsigned long flags; @@ -430,7 +430,7 @@ static void cps_cpu_die(unsigned int cpu */ err = smp_call_function_single(cpu_death_sibling, wait_for_sibling_halt, - (void *)cpu, 1); + (void *)(unsigned long)cpu, 1); if (err) panic("Failed to call remote sibling CPU\n"); } Patches currently in stable-queue which might be from markos.chandras@imgtec.com are queue-4.1/mips-kernel-cps-vec-replace-mips32r2-isa-level-with-mips64r2.patch queue-4.1/mips-kernel-cps-vec-use-ta0-ta3-pseudo-registers-for-64-bit.patch queue-4.1/revert-mips-kconfig-disable-smp-cps-for-64-bit.patch queue-4.1/mips-require-o32-fp64-support-for-mips64-with-o32-compat.patch queue-4.1/mips-fpu.h-allow-64-bit-fpu-on-a-64-bit-mips-r6-cpu.patch queue-4.1/mips-kernel-cps-vec-replace-la-macro-with-ptr_la.patch queue-4.1/mips-c-r4k-fix-cache-flushing-for-mt-cores.patch queue-4.1/mips-kernel-smp-cps-fix-64-bit-compatibility-errors-due-to-pointer-casting.patch queue-4.1/mips-kernel-cps-vec-replace-kseg0-with-ckseg0.patch queue-4.1/mips-fix-erroneous-jr-emulation-for-mips-r6.patch queue-4.1/mips-cps-vec-use-macros-for-various-arithmetics-and-memory-operations.patch