~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/kernel/r4k_switch.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * This file is subject to the terms and conditions of the GNU General Public
  3  * License.  See the file "COPYING" in the main directory of this archive
  4  * for more details.
  5  *
  6  * Copyright (C) 1994, 1995, 1996, 1998, 1999, 2002, 2003 Ralf Baechle
  7  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
  8  * Copyright (C) 1994, 1995, 1996, by Andreas Busse
  9  * Copyright (C) 1999 Silicon Graphics, Inc.
 10  * Copyright (C) 2000 MIPS Technologies, Inc.
 11  *    written by Carsten Langgaard, carstenl@mips.com
 12  */
 13 #include <asm/asm.h>
 14 #include <asm/cachectl.h>
 15 #include <asm/mipsregs.h>
 16 #include <asm/asm-offsets.h>
 17 #include <asm/regdef.h>
 18 #include <asm/stackframe.h>
 19 #include <asm/thread_info.h>
 20 
 21 #include <asm/asmmacro.h>
 22 
 23 /*
 24  * task_struct *resume(task_struct *prev, task_struct *next,
 25  *                     struct thread_info *next_ti)
 26  */
 27         .align  5
 28         LEAF(resume)
 29         mfc0    t1, CP0_STATUS
 30         LONG_S  t1, THREAD_STATUS(a0)
 31         cpu_save_nonscratch a0
 32         LONG_S  ra, THREAD_REG31(a0)
 33 
 34 #if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_SMP)
 35         PTR_LA  t8, __stack_chk_guard
 36         LONG_L  t9, TASK_STACK_CANARY(a1)
 37         LONG_S  t9, 0(t8)
 38 #endif
 39 
 40         /*
 41          * The order of restoring the registers takes care of the race
 42          * updating $28, $29 and kernelsp without disabling ints.
 43          */
 44         move    $28, a2
 45         cpu_restore_nonscratch a1
 46 
 47         PTR_ADDU        t0, $28, _THREAD_SIZE - 32
 48         set_saved_sp    t0, t1, t2
 49         mfc0    t1, CP0_STATUS          /* Do we really need this? */
 50         li      a3, 0xff01
 51         and     t1, a3
 52         LONG_L  a2, THREAD_STATUS(a1)
 53         nor     a3, $0, a3
 54         and     a2, a3
 55         or      a2, t1
 56         mtc0    a2, CP0_STATUS
 57         move    v0, a0
 58         jr      ra
 59         END(resume)

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php