mirror of
https://gitee.com/open-loongarch/linux-5.10.git
synced 2026-10-28 14:07:12 +08:00
26 lines
559 B
C
26 lines
559 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 2020 Loongson Technology Co., Ltd.
|
|
*/
|
|
#ifndef _ASM_BRANCH_H
|
|
#define _ASM_BRANCH_H
|
|
|
|
#include <asm/ptrace.h>
|
|
|
|
static inline unsigned long exception_era(struct pt_regs *regs)
|
|
{
|
|
return regs->csr_era;
|
|
}
|
|
|
|
static inline int compute_return_era(struct pt_regs *regs)
|
|
{
|
|
regs->csr_era += 4;
|
|
return 0;
|
|
}
|
|
|
|
#endif /* _ASM_BRANCH_H */
|