Ralf Baechle
68c77d8a1e
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 <[email protected] >
2014-08-26 02:18:59 +02:00
Huacai Chen
ef2f826c8f
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 <[email protected] >
Cc: John Crispin <[email protected] >
Cc: Steven J. Hill <[email protected] >
Cc: Aurelien Jarno <[email protected] >
Cc: [email protected]
Cc: Fuxin Zhang <[email protected] >
Cc: Zhangjin Wu <[email protected] >
Patchwork: https://patchwork.linux-mips.org/patch/7189/
Signed-off-by: Ralf Baechle <[email protected] >
2014-07-30 21:47:17 +02:00
Jayachandran C
5649d37c2b
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 <[email protected] >
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/5413/
Signed-off-by: Ralf Baechle <[email protected] >
2013-06-13 17:46:41 +02:00
Jayachandran C
2c952e06e4
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 <[email protected] >
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/5411/
Signed-off-by: Ralf Baechle <[email protected] >
2013-06-13 17:46:41 +02:00
David Daney
4c7106c48a
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 <[email protected] >
To: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/1592/
Signed-off-by: Ralf Baechle <[email protected] >
2010-10-04 18:34:00 +01:00
Ralf Baechle
4483b15916
MIPS: Provide more elevant interface cu2_notifier for CP2 extensions.
...
Signed-off-by: Ralf Baechle <[email protected] >
Signed-off-by: David Daney <[email protected] >
Patchwork: https://patchwork.linux-mips.org/patch/1504/
2010-08-05 13:25:59 +01:00
Ralf Baechle
69f3a7de1f
MIPS: Modularize COP2 handling
...
Away with the daemons of ifdef; get ready for future COP2 users.
Signed-off-by: Ralf Baechle <[email protected] >
Patchwork: http://patchwork.linux-mips.org/patch/708/
2009-12-17 01:57:30 +00:00