Message ID | 20230509103033.11285-2-andy.chiu@sifive.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Palmer Dabbelt |
Headers | show |
Series | riscv: Add vector ISA support | expand |
Context | Check | Description |
---|---|---|
conchuod/cover_letter | success | Series has a cover letter |
conchuod/tree_selection | success | Guessed tree name to be for-next at HEAD ac9a78681b92 |
conchuod/fixes_present | success | Fixes tag not required for -next series |
conchuod/maintainers_pattern | success | MAINTAINERS pattern errors before the patch: 6 and now 6 |
conchuod/verify_signedoff | success | Signed-off-by tag matches author and committer |
conchuod/kdoc | success | Errors and warnings before: 0 this patch: 0 |
conchuod/build_rv64_clang_allmodconfig | success | Errors and warnings before: 18 this patch: 18 |
conchuod/module_param | success | Was 0 now: 0 |
conchuod/build_rv64_gcc_allmodconfig | success | Errors and warnings before: 136 this patch: 136 |
conchuod/build_rv32_defconfig | success | Build OK |
conchuod/dtb_warn_rv64 | success | Errors and warnings before: 3 this patch: 3 |
conchuod/header_inline | success | No static functions without inline keyword in header files |
conchuod/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 24 lines checked |
conchuod/source_inline | success | Was 0 now: 0 |
conchuod/build_rv64_nommu_k210_defconfig | success | Build OK |
conchuod/verify_fixes | success | No Fixes tag |
conchuod/build_rv64_nommu_virt_defconfig | success | Build OK |
On Tue, 09 May 2023 03:30:10 PDT (-0700), andy.chiu@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> > Signed-off-by: Greentime Hu <greentime.hu@sifive.com> > Reviewed-by: Anup Patel <anup@brainfault.org> > Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com> > Signed-off-by: Andy Chiu <andy.chiu@sifive.com> > Tested-by: Heiko Stuebner <heiko.stuebner@vrull.eu> > Reviewed-by: Heiko Stuebner <heiko.stuebner@vrull.eu> > Reviewed-by: Conor Dooley <conor.dooley@microchip.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 60f8ca01d36e..4b96b13dee27 100644 > --- a/arch/riscv/include/asm/switch_to.h > +++ b/arch/riscv/include/asm/switch_to.h > @@ -46,7 +46,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; > @@ -66,7 +66,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 *, > @@ -77,7 +77,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>
On Fri, May 12, 2023 at 6:56 AM Palmer Dabbelt <palmer@dabbelt.com> wrote: > > On Tue, 09 May 2023 03:30:10 PDT (-0700), andy.chiu@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> > > Signed-off-by: Greentime Hu <greentime.hu@sifive.com> > > Reviewed-by: Anup Patel <anup@brainfault.org> > > Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com> > > Signed-off-by: Andy Chiu <andy.chiu@sifive.com> > > Tested-by: Heiko Stuebner <heiko.stuebner@vrull.eu> > > Reviewed-by: Heiko Stuebner <heiko.stuebner@vrull.eu> > > Reviewed-by: Conor Dooley <conor.dooley@microchip.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 60f8ca01d36e..4b96b13dee27 100644 > > --- a/arch/riscv/include/asm/switch_to.h > > +++ b/arch/riscv/include/asm/switch_to.h > > @@ -46,7 +46,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; > > @@ -66,7 +66,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 *, > > @@ -77,7 +77,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> I noticed that your R-b has been here for a while (at least since v13 where I started to handle this series). Do you want me to keep the original, or the last one? Thanks, Andy
diff --git a/arch/riscv/include/asm/switch_to.h b/arch/riscv/include/asm/switch_to.h index 60f8ca01d36e..4b96b13dee27 100644 --- a/arch/riscv/include/asm/switch_to.h +++ b/arch/riscv/include/asm/switch_to.h @@ -46,7 +46,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; @@ -66,7 +66,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 *, @@ -77,7 +77,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)