fpu.h (ee5db7e47faccd07a8a17f73afb30345f8331e61) fpu.h (842dfc11ea9a21f9825167c8a4f2834b205b0a79)
1/*
2 * Copyright (C) 2002 MontaVista Software Inc.
3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.

--- 131 unchanged lines hidden (view full) ---

140}
141
142static inline void lose_fpu(int save)
143{
144 preempt_disable();
145 if (is_msa_enabled()) {
146 if (save) {
147 save_msa(current);
1/*
2 * Copyright (C) 2002 MontaVista Software Inc.
3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.

--- 131 unchanged lines hidden (view full) ---

140}
141
142static inline void lose_fpu(int save)
143{
144 preempt_disable();
145 if (is_msa_enabled()) {
146 if (save) {
147 save_msa(current);
148 asm volatile("cfc1 %0, $31"
149 : "=r"(current->thread.fpu.fcr31));
148 current->thread.fpu.fcr31 =
149 read_32bit_cp1_register(CP1_STATUS);
150 }
151 disable_msa();
152 clear_thread_flag(TIF_USEDMSA);
153 } else if (is_fpu_owner()) {
154 if (save)
155 _save_fp(current);
156 __disable_fpu();
157 }

--- 44 unchanged lines hidden ---
150 }
151 disable_msa();
152 clear_thread_flag(TIF_USEDMSA);
153 } else if (is_fpu_owner()) {
154 if (save)
155 _save_fp(current);
156 __disable_fpu();
157 }

--- 44 unchanged lines hidden ---