From 9999e48639b3cecb08ffb37358bcba3b48161b29 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 10 May 2024 08:50:17 +0000 Subject: [PATCH] add ax88772_rst --- kernel/arch/riscv/include/asm/current.h | 21 +++++++-------------- 1 files changed, 7 insertions(+), 14 deletions(-) diff --git a/kernel/arch/riscv/include/asm/current.h b/kernel/arch/riscv/include/asm/current.h index 2cf6336..1de233d 100644 --- a/kernel/arch/riscv/include/asm/current.h +++ b/kernel/arch/riscv/include/asm/current.h @@ -1,22 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Based on arm/arm64/include/asm/current.h * * Copyright (C) 2016 ARM * Copyright (C) 2017 SiFive - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ -#ifndef __ASM_CURRENT_H -#define __ASM_CURRENT_H +#ifndef _ASM_RISCV_CURRENT_H +#define _ASM_RISCV_CURRENT_H #include <linux/bug.h> #include <linux/compiler.h> @@ -24,6 +16,8 @@ #ifndef __ASSEMBLY__ struct task_struct; + +register struct task_struct *riscv_current_is_tp __asm__("tp"); /* * This only works because "struct thread_info" is at offset 0 from "struct @@ -34,12 +28,11 @@ */ static __always_inline struct task_struct *get_current(void) { - register struct task_struct *tp __asm__("tp"); - return tp; + return riscv_current_is_tp; } #define current get_current() #endif /* __ASSEMBLY__ */ -#endif /* __ASM_CURRENT_H */ +#endif /* _ASM_RISCV_CURRENT_H */ -- Gitblit v1.6.2