/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 1994 - 2000, 2001, 2003 Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 2002, 2007 Maciej W. Rozycki * Copyright (C) 2001, 2012 MIPS Technologies, Inc. All rights reserved.
*/
#include <asm/asm.h>
#include <asm/asmmacro.h>
#include <asm/loongarch.h>
#include <asm/regdef.h>
#include <asm/fpregdef.h>
#include <asm/stackframe.h>
#include <asm/thread_info.h>
.section .cpuidle.text, "ax"
.align 5
SYM_FUNC_START(__arch_cpu_idle) /* start of idle interrupt region */
ori t0, zero, CSR_CRMD_IE /* idle instruction needs irq enabled */
csrxchg t0, t0, LOONGARCH_CSR_CRMD /* * If an interrupt lands here; between enabling interrupts above and * going idle on the next instruction, we must *NOT* go idle since the * interrupt could have set TIF_NEED_RESCHED or caused an timer to need * reprogramming. Fall through -- see handle_vint() below -- and have * the idle loop take care of things.
*/
idle 0 /* end of idle interrupt region */
idle_exit:
jr ra
SYM_FUNC_END(__arch_cpu_idle)
.previous
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.