[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <6fa7260145ee24442a5ff2173c507d92e400fc58.1599719352.git.greentime.hu@sifive.com>
Date: Thu, 10 Sep 2020 16:12:05 +0800
From: Greentime Hu <greentime.hu@...ive.com>
To: greentime.hu@...ive.com, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org, aou@...s.berkeley.edu,
palmer@...belt.com, paul.walmsley@...ive.com
Cc: Nick Knight <nick.knight@...ive.com>,
Guo Ren <guoren@...ux.alibaba.com>,
Vincent Chen <vincent.chen@...ive.com>
Subject: [RFC PATCH v7 10/21] riscv: Add task switch support for vector
This patch adds task switch support for vector. It supports partial lazy
save and restore mechanism. It also supports all lengths of vlen.
[guoren@...ux.alibaba.com: First available porting to support vector
context switching]
[nick.knight@...ive.com: Rewrite vector.S to support dynamic vlen, xlen and
code refine]
[vincent.chen@...ive.co: Fix the might_sleep issue in vstate_save,
vstate_restore]
Signed-off-by: Nick Knight <nick.knight@...ive.com>
Signed-off-by: Greentime Hu <greentime.hu@...ive.com>
Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
Signed-off-by: Vincent Chen <vincent.chen@...ive.com>
---
arch/riscv/include/asm/switch_to.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/include/asm/switch_to.h b/arch/riscv/include/asm/switch_to.h
index 2afd0124701a..d33a86a48f0d 100644
--- a/arch/riscv/include/asm/switch_to.h
+++ b/arch/riscv/include/asm/switch_to.h
@@ -87,6 +87,7 @@ static inline void vstate_save(struct task_struct *task,
{
if ((regs->status & SR_VS) == SR_VS_DIRTY) {
struct __riscv_v_state *vstate = &(task->thread.vstate);
+
__vstate_save(vstate, vstate->datap);
__vstate_clean(regs);
}
--
2.28.0
Powered by blists - more mailing lists