2020-01-16 14:32:26

by Guo Ren

[permalink] [raw]
Subject: [PATCH V2 2/4] riscv: Rename __switch_to_aux -> fpu

From: Guo Ren <[email protected]>

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 <[email protected]>
Cc: Anup Patel <[email protected]>
---
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 407bcc96a710..b9234e7178d0 100644
--- a/arch/riscv/include/asm/switch_to.h
+++ b/arch/riscv/include/asm/switch_to.h
@@ -44,7 +44,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;
@@ -60,7 +60,7 @@ extern bool has_fpu;
#define has_fpu 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 *,
@@ -71,7 +71,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)

--
2.17.0


2020-01-23 05:46:13

by Anup Patel

[permalink] [raw]
Subject: Re: [PATCH V2 2/4] riscv: Rename __switch_to_aux -> fpu

On Thu, Jan 16, 2020 at 8:01 PM <[email protected]> wrote:
>
> From: Guo Ren <[email protected]>
>
> 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 <[email protected]>
> Cc: Anup Patel <[email protected]>
> ---
> 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 407bcc96a710..b9234e7178d0 100644
> --- a/arch/riscv/include/asm/switch_to.h
> +++ b/arch/riscv/include/asm/switch_to.h
> @@ -44,7 +44,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;
> @@ -60,7 +60,7 @@ extern bool has_fpu;
> #define has_fpu 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 *,
> @@ -71,7 +71,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)
>
> --
> 2.17.0
>

LGTM.

Reviewed-by: Anup Patel <[email protected]>

Regards,
Anup