Message ID | 8e02819b9f8220f64ca43c330192c20594903ba9.1636362169.git.greentime.hu@sifive.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | riscv: Add vector ISA support | expand |
On Tue, 09 Nov 2021 01:48:14 PST (-0800), greentime.hu@sifive.com wrote: > From: Guo Ren <ren_guo@c-sky.com> > > The name of __switch_to_aux is not clear and rename it with the > determine function: __switch_to_fpu. Next we could add other regs' > switch. > > Signed-off-by: Guo Ren <ren_guo@c-sky.com> > Signed-off-by: Guo Ren <guoren@linux.alibaba.com> > Reviewed-by: Anup Patel <anup@brainfault.org> > Reviewed-by: Greentime Hu <greentime.hu@sifive.com> > Signed-off-by: Greentime Hu <greentime.hu@sifive.com> > --- > arch/riscv/include/asm/switch_to.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/riscv/include/asm/switch_to.h b/arch/riscv/include/asm/switch_to.h > index 0a3f4f95c555..ec83770b3d98 100644 > --- a/arch/riscv/include/asm/switch_to.h > +++ b/arch/riscv/include/asm/switch_to.h > @@ -45,7 +45,7 @@ static inline void fstate_restore(struct task_struct *task, > } > } > > -static inline void __switch_to_aux(struct task_struct *prev, > +static inline void __switch_to_fpu(struct task_struct *prev, > struct task_struct *next) > { > struct pt_regs *regs; > @@ -65,7 +65,7 @@ static __always_inline bool has_fpu(void) > static __always_inline bool has_fpu(void) { return false; } > #define fstate_save(task, regs) do { } while (0) > #define fstate_restore(task, regs) do { } while (0) > -#define __switch_to_aux(__prev, __next) do { } while (0) > +#define __switch_to_fpu(__prev, __next) do { } while (0) > #endif > > extern struct task_struct *__switch_to(struct task_struct *, > @@ -76,7 +76,7 @@ do { \ > struct task_struct *__prev = (prev); \ > struct task_struct *__next = (next); \ > if (has_fpu()) \ > - __switch_to_aux(__prev, __next); \ > + __switch_to_fpu(__prev, __next); \ > ((last) = __switch_to(__prev, __next)); \ > } while (0) Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
diff --git a/arch/riscv/include/asm/switch_to.h b/arch/riscv/include/asm/switch_to.h index 0a3f4f95c555..ec83770b3d98 100644 --- a/arch/riscv/include/asm/switch_to.h +++ b/arch/riscv/include/asm/switch_to.h @@ -45,7 +45,7 @@ static inline void fstate_restore(struct task_struct *task, } } -static inline void __switch_to_aux(struct task_struct *prev, +static inline void __switch_to_fpu(struct task_struct *prev, struct task_struct *next) { struct pt_regs *regs; @@ -65,7 +65,7 @@ static __always_inline bool has_fpu(void) static __always_inline bool has_fpu(void) { return false; } #define fstate_save(task, regs) do { } while (0) #define fstate_restore(task, regs) do { } while (0) -#define __switch_to_aux(__prev, __next) do { } while (0) +#define __switch_to_fpu(__prev, __next) do { } while (0) #endif extern struct task_struct *__switch_to(struct task_struct *, @@ -76,7 +76,7 @@ do { \ struct task_struct *__prev = (prev); \ struct task_struct *__next = (next); \ if (has_fpu()) \ - __switch_to_aux(__prev, __next); \ + __switch_to_fpu(__prev, __next); \ ((last) = __switch_to(__prev, __next)); \ } while (0)