diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-02 16:40:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-02 16:40:50 -0400 |
commit | bdfc7cbdeef8cadba0e5793079ac0130b8e2220c (patch) | |
tree | 82af0cae4898e259edcc6cbdad639087dc1189a8 /arch/mips/include/asm/switch_to.h | |
parent | 62d1a3ba5adc5653d43f6cd3a90758bb6ad5d5bd (diff) | |
parent | ade63aada79c61bcd5f51cbd310f237399892268 (diff) |
Merge branch 'mips-for-linux-next' of git://git.linux-mips.org/pub/scm/ralf/upstream-sfr
Pull MIPS updates from Ralf Baechle:
- Support for Imgtec's Aptiv family of MIPS cores.
- Improved detection of BCM47xx configurations.
- Fix hiberation for certain configurations.
- Add support for the Chinese Loongson 3 CPU, a MIPS64 R2 core and
systems.
- Detection and support for the MIPS P5600 core.
- A few more random fixes that didn't make 3.14.
- Support for the EVA Extended Virtual Addressing
- Switch Alchemy to the platform PATA driver
- Complete unification of Alchemy support
- Allow availability of I/O cache coherency to be runtime detected
- Improvments to multiprocessing support for Imgtec platforms
- A few microoptimizations
- Cleanups of FPU support
- Paul Gortmaker's fixes for the init stuff
- Support for seccomp
* 'mips-for-linux-next' of git://git.linux-mips.org/pub/scm/ralf/upstream-sfr: (165 commits)
MIPS: CPC: Use __raw_ memory access functions
MIPS: CM: use __raw_ memory access functions
MIPS: Fix warning when including smp-ops.h with CONFIG_SMP=n
MIPS: Malta: GIC IPIs may be used without MT
MIPS: smp-mt: Use common GIC IPI implementation
MIPS: smp-cmp: Remove incorrect core number probe
MIPS: Fix gigaton of warning building with microMIPS.
MIPS: Fix core number detection for MT cores
MIPS: MT: core_nvpes function to retrieve VPE count
MIPS: Provide empty mips_mt_set_cpuoptions when CONFIG_MIPS_MT=n
MIPS: Lasat: Replace del_timer by del_timer_sync
MIPS: Malta: Setup PM I/O region on boot
MIPS: Loongson: Add a Loongson-3 default config file
MIPS: Loongson 3: Add CPU hotplug support
MIPS: Loongson 3: Add Loongson-3 SMP support
MIPS: Loongson: Add Loongson-3 Kconfig options
MIPS: Loongson: Add swiotlb to support All-Memory DMA
MIPS: Loongson 3: Add serial port support
MIPS: Loongson 3: Add IRQ init and dispatch support
MIPS: Loongson 3: Add HT-linked PCI support
...
Diffstat (limited to 'arch/mips/include/asm/switch_to.h')
-rw-r--r-- | arch/mips/include/asm/switch_to.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/arch/mips/include/asm/switch_to.h b/arch/mips/include/asm/switch_to.h index 278d45a09728..495c1041a2cc 100644 --- a/arch/mips/include/asm/switch_to.h +++ b/arch/mips/include/asm/switch_to.h | |||
@@ -16,22 +16,29 @@ | |||
16 | #include <asm/watch.h> | 16 | #include <asm/watch.h> |
17 | #include <asm/dsp.h> | 17 | #include <asm/dsp.h> |
18 | #include <asm/cop2.h> | 18 | #include <asm/cop2.h> |
19 | #include <asm/msa.h> | ||
19 | 20 | ||
20 | struct task_struct; | 21 | struct task_struct; |
21 | 22 | ||
23 | enum { | ||
24 | FP_SAVE_NONE = 0, | ||
25 | FP_SAVE_VECTOR = -1, | ||
26 | FP_SAVE_SCALAR = 1, | ||
27 | }; | ||
28 | |||
22 | /** | 29 | /** |
23 | * resume - resume execution of a task | 30 | * resume - resume execution of a task |
24 | * @prev: The task previously executed. | 31 | * @prev: The task previously executed. |
25 | * @next: The task to begin executing. | 32 | * @next: The task to begin executing. |
26 | * @next_ti: task_thread_info(next). | 33 | * @next_ti: task_thread_info(next). |
27 | * @usedfpu: Non-zero if prev's FP context should be saved. | 34 | * @fp_save: Which, if any, FP context to save for prev. |
28 | * | 35 | * |
29 | * This function is used whilst scheduling to save the context of prev & load | 36 | * This function is used whilst scheduling to save the context of prev & load |
30 | * the context of next. Returns prev. | 37 | * the context of next. Returns prev. |
31 | */ | 38 | */ |
32 | extern asmlinkage struct task_struct *resume(struct task_struct *prev, | 39 | extern asmlinkage struct task_struct *resume(struct task_struct *prev, |
33 | struct task_struct *next, struct thread_info *next_ti, | 40 | struct task_struct *next, struct thread_info *next_ti, |
34 | u32 usedfpu); | 41 | s32 fp_save); |
35 | 42 | ||
36 | extern unsigned int ll_bit; | 43 | extern unsigned int ll_bit; |
37 | extern struct task_struct *ll_task; | 44 | extern struct task_struct *ll_task; |
@@ -75,7 +82,8 @@ do { \ | |||
75 | 82 | ||
76 | #define switch_to(prev, next, last) \ | 83 | #define switch_to(prev, next, last) \ |
77 | do { \ | 84 | do { \ |
78 | u32 __usedfpu, __c0_stat; \ | 85 | u32 __c0_stat; \ |
86 | s32 __fpsave = FP_SAVE_NONE; \ | ||
79 | __mips_mt_fpaff_switch_to(prev); \ | 87 | __mips_mt_fpaff_switch_to(prev); \ |
80 | if (cpu_has_dsp) \ | 88 | if (cpu_has_dsp) \ |
81 | __save_dsp(prev); \ | 89 | __save_dsp(prev); \ |
@@ -88,8 +96,12 @@ do { \ | |||
88 | write_c0_status(__c0_stat & ~ST0_CU2); \ | 96 | write_c0_status(__c0_stat & ~ST0_CU2); \ |
89 | } \ | 97 | } \ |
90 | __clear_software_ll_bit(); \ | 98 | __clear_software_ll_bit(); \ |
91 | __usedfpu = test_and_clear_tsk_thread_flag(prev, TIF_USEDFPU); \ | 99 | if (test_and_clear_tsk_thread_flag(prev, TIF_USEDFPU)) \ |
92 | (last) = resume(prev, next, task_thread_info(next), __usedfpu); \ | 100 | __fpsave = FP_SAVE_SCALAR; \ |
101 | if (test_and_clear_tsk_thread_flag(prev, TIF_USEDMSA)) \ | ||
102 | __fpsave = FP_SAVE_VECTOR; \ | ||
103 | (last) = resume(prev, next, task_thread_info(next), __fpsave); \ | ||
104 | disable_msa(); \ | ||
93 | } while (0) | 105 | } while (0) |
94 | 106 | ||
95 | #define finish_arch_switch(prev) \ | 107 | #define finish_arch_switch(prev) \ |