History log of /linux-master/arch/mips/include/asm/cop2.h
Revision Date Author Comments
# 95b8a5e0 20-Oct-2021 Thomas Bogendoerfer <tsbogend@alpha.franken.de>

MIPS: Remove NETLOGIC support

No (active) developer owns this hardware, so let's remove Linux support.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>


# 268a2d60 20-Oct-2019 Jiaxun Yang <jiaxun.yang@flygoat.com>

MIPS: Loongson64: Rename CPU TYPES

CPU_LOONGSON2 -> CPU_LOONGSON2EF
CPU_LOONGSON3 -> CPU_LOONGSON64

As newer loongson-2 products (2G/2H/2K1000) can share kernel
implementation with loongson-3 while 2E/2F are less similar with
other LOONGSON64 products.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: chenhc@lemote.com
Cc: paul.burton@mips.com


# b89f3068 25-Sep-2014 Paul Burton <paulburton@kernel.org>

MIPS: Prevent compiler warning from cop2_{save,restore}

The no-op cases of cop2_save & cop2_restore lead to the following
warnings being emitted during build with recent versions of gcc (tested
using gcc 4.8.3 from the Mentor Sourcery CodeBench 2014.05 toolchain):

In file included from ./arch/mips/include/asm/switch_to.h:18:0,
from kernel/sched/core.c:78:
kernel/sched/core.c: In function 'finish_task_switch':
include/asm-generic/current.h:6:45: warning: value computed is not used [-Wunused-value]
#define get_current() (current_thread_info()->task)
^
./arch/mips/include/asm/cop2.h:48:32: note: in definition of macro 'cop2_restore'
#define cop2_restore(r) do { (r); } while (0)
^
include/asm-generic/current.h:7:17: note: in expansion of macro 'get_current'
#define current get_current()
^
./arch/mips/include/asm/switch_to.h:114:16: note: in expansion of macro 'current'
cop2_restore(current); \
^
kernel/sched/core.c:2225:2: note: in expansion of macro 'finish_arch_switch'
finish_arch_switch(prev);
^

Avoid the warning by "using" the value by casting to void.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7880/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 68c77d8a 25-Aug-2014 Ralf Baechle <ralf@linux-mips.org>

MIPS: COP2: CPP macro safety fixes.

- Don't pass things to macros that couldn't be dereferences if that
macro was actually a function.
- Don't use empty function-like macros.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# ef2f826c 25-Jun-2014 Huacai Chen <chenhuacai@kernel.org>

MIPS: Loongson-3: Enable the COP2 usage

Loongson-3 has some specific instructions (MMI/SIMD) in coprocessor 2.
COP2 isn't independent because it share COP1 (FPU)'s registers. This
patch enable the COP2 usage so user-space programs can use the MMI/SIMD
instructions. When COP2 exception happens, we enable both COP1 (FPU)
and COP2, only in this way the fp context can be saved and restored
correctly.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: John Crispin <john@phrozen.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/7189/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 5649d37c 10-Jun-2013 Jayachandran C <c.jayachandran@gmail.com>

MIPS: Netlogic: COP2 save/restore code

Add COP2 register state structure and functions for Netlogic XLP. The
RX and TX buffers and status registers are to be saved. Since the
registers are 64-bit, do the implementation in inline assembly which
works on both 32-bit and 64-bit kernels.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Cc: ddaney.cavm@gmail.com
Patchwork: https://patchwork.linux-mips.org/patch/5413/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 2c952e06 10-Jun-2013 Jayachandran C <c.jayachandran@gmail.com>

MIPS: Move cop2 save/restore to switch_to()

Move the common code for saving and restoring platform specific COP2
registers to switch_to(). This will make supporting new platforms (like
Netlogic XLP) easier.

The platform specific COP2 definitions are to be specified in
asm/processor.h and in asm/cop2.h.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Cc: ddaney.cavm@gmail.com
Patchwork: https://patchwork.linux-mips.org/patch/5411/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 4c7106c4 23-Sep-2010 David Daney <ddaney@caviumnetworks.com>

MIPS: Don't place cu2 notifiers in __cpuinitdata

The notifiers may be called at any time, so the notifier_block cannot
be in init memory.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1592/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 4483b159 05-Aug-2010 Ralf Baechle <ralf@linux-mips.org>

MIPS: Provide more elevant interface cu2_notifier for CP2 extensions.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: https://patchwork.linux-mips.org/patch/1504/


# 69f3a7de 23-Nov-2009 Ralf Baechle <ralf@linux-mips.org>

MIPS: Modularize COP2 handling

Away with the daemons of ifdef; get ready for future COP2 users.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/708/