Patch "MIPS: kernel: smp-cps: Fix 64-bit compatibility errors due to pointer casting" has been added to the 4.1-stable tree
Subsystems (2)
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 <[email protected]> know about it.
Quoted 1 line
From
fd5ed3066bb2f47814fe53cdc56d11a678551ae1Mon Sep 17 00:00:00 2001
From: Markos Chandras <[email protected]>
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 <[email protected]>
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
Patchwork: https://patchwork.linux-mips.org/patch/10586/
--- arch/mips/kernel/smp-cps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/mips/kernel/smp-cps.c +3 -3
@@ -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 [email protected] 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