linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] csky: remove unusued thread_saved_pc and *_segments functions/macros
@ 2020-06-10 15:39 Tobias Klauser
  2020-06-13  8:42 ` Guo Ren
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Klauser @ 2020-06-10 15:39 UTC (permalink / raw)
  To: Guo Ren, Mao Han; +Cc: linux-csky, linux-kernel

These are used nowhere in the tree (except for some architectures which
define them for their own use) and were already removed for other
architectures in:

commit 6474924e2b5d ("arch: remove unused macro/function thread_saved_pc()")
commit c17c02040bf0 ("arch: remove unused *_segments() macros/functions")

Remove them from arch/csky as well.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 arch/csky/include/asm/processor.h |  6 ------
 arch/csky/kernel/process.c        | 10 ----------
 2 files changed, 16 deletions(-)

diff --git a/arch/csky/include/asm/processor.h b/arch/csky/include/asm/processor.h
index 24442d8e86f9..4800f6563abb 100644
--- a/arch/csky/include/asm/processor.h
+++ b/arch/csky/include/asm/processor.h
@@ -82,12 +82,6 @@ static inline void release_thread(struct task_struct *dead_task)
 
 extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
 
-#define copy_segments(tsk, mm)		do { } while (0)
-#define release_segments(mm)		do { } while (0)
-#define forget_segments()		do { } while (0)
-
-extern unsigned long thread_saved_pc(struct task_struct *tsk);
-
 unsigned long get_wchan(struct task_struct *p);
 
 #define KSTK_EIP(tsk)		(task_pt_regs(tsk)->pc)
diff --git a/arch/csky/kernel/process.c b/arch/csky/kernel/process.c
index 8b3fad062ab2..3da63cf0bfde 100644
--- a/arch/csky/kernel/process.c
+++ b/arch/csky/kernel/process.c
@@ -30,16 +30,6 @@ asmlinkage void ret_from_kernel_thread(void);
  */
 void flush_thread(void){}
 
-/*
- * Return saved PC from a blocked thread
- */
-unsigned long thread_saved_pc(struct task_struct *tsk)
-{
-	struct switch_stack *sw = (struct switch_stack *)tsk->thread.sp;
-
-	return sw->r15;
-}
-
 int copy_thread_tls(unsigned long clone_flags,
 		unsigned long usp,
 		unsigned long kthread_arg,
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] csky: remove unusued thread_saved_pc and *_segments functions/macros
  2020-06-10 15:39 [PATCH] csky: remove unusued thread_saved_pc and *_segments functions/macros Tobias Klauser
@ 2020-06-13  8:42 ` Guo Ren
  2020-06-15  8:43   ` Tobias Klauser
  0 siblings, 1 reply; 4+ messages in thread
From: Guo Ren @ 2020-06-13  8:42 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: Mao Han, linux-csky, Linux Kernel Mailing List

Acked-by: Guo Ren <guoren@kernel.org>

On Wed, Jun 10, 2020 at 11:45 PM Tobias Klauser <tklauser@distanz.ch> wrote:
>
> These are used nowhere in the tree (except for some architectures which
> define them for their own use) and were already removed for other
> architectures in:
>
> commit 6474924e2b5d ("arch: remove unused macro/function thread_saved_pc()")
> commit c17c02040bf0 ("arch: remove unused *_segments() macros/functions")
>
> Remove them from arch/csky as well.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
>  arch/csky/include/asm/processor.h |  6 ------
>  arch/csky/kernel/process.c        | 10 ----------
>  2 files changed, 16 deletions(-)
>
> diff --git a/arch/csky/include/asm/processor.h b/arch/csky/include/asm/processor.h
> index 24442d8e86f9..4800f6563abb 100644
> --- a/arch/csky/include/asm/processor.h
> +++ b/arch/csky/include/asm/processor.h
> @@ -82,12 +82,6 @@ static inline void release_thread(struct task_struct *dead_task)
>
>  extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
>
> -#define copy_segments(tsk, mm)         do { } while (0)
> -#define release_segments(mm)           do { } while (0)
> -#define forget_segments()              do { } while (0)
> -
> -extern unsigned long thread_saved_pc(struct task_struct *tsk);
> -
>  unsigned long get_wchan(struct task_struct *p);
>
>  #define KSTK_EIP(tsk)          (task_pt_regs(tsk)->pc)
> diff --git a/arch/csky/kernel/process.c b/arch/csky/kernel/process.c
> index 8b3fad062ab2..3da63cf0bfde 100644
> --- a/arch/csky/kernel/process.c
> +++ b/arch/csky/kernel/process.c
> @@ -30,16 +30,6 @@ asmlinkage void ret_from_kernel_thread(void);
>   */
>  void flush_thread(void){}
>
> -/*
> - * Return saved PC from a blocked thread
> - */
> -unsigned long thread_saved_pc(struct task_struct *tsk)
> -{
> -       struct switch_stack *sw = (struct switch_stack *)tsk->thread.sp;
> -
> -       return sw->r15;
> -}
> -
>  int copy_thread_tls(unsigned long clone_flags,
>                 unsigned long usp,
>                 unsigned long kthread_arg,
> --
> 2.27.0
>


-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] csky: remove unusued thread_saved_pc and *_segments functions/macros
  2020-06-13  8:42 ` Guo Ren
@ 2020-06-15  8:43   ` Tobias Klauser
  2020-06-17  6:54     ` Guo Ren
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Klauser @ 2020-06-15  8:43 UTC (permalink / raw)
  To: Guo Ren; +Cc: Mao Han, linux-csky, Linux Kernel Mailing List

On 2020-06-13 at 10:42:07 +0200, Guo Ren <guoren@kernel.org> wrote:
> Acked-by: Guo Ren <guoren@kernel.org>

Thanks for the Ack. Are you taking this patch through your own tree or
should I directly submit to someone else?

> On Wed, Jun 10, 2020 at 11:45 PM Tobias Klauser <tklauser@distanz.ch> wrote:
> >
> > These are used nowhere in the tree (except for some architectures which
> > define them for their own use) and were already removed for other
> > architectures in:
> >
> > commit 6474924e2b5d ("arch: remove unused macro/function thread_saved_pc()")
> > commit c17c02040bf0 ("arch: remove unused *_segments() macros/functions")
> >
> > Remove them from arch/csky as well.
> >
> > Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> > ---
> >  arch/csky/include/asm/processor.h |  6 ------
> >  arch/csky/kernel/process.c        | 10 ----------
> >  2 files changed, 16 deletions(-)
> >
> > diff --git a/arch/csky/include/asm/processor.h b/arch/csky/include/asm/processor.h
> > index 24442d8e86f9..4800f6563abb 100644
> > --- a/arch/csky/include/asm/processor.h
> > +++ b/arch/csky/include/asm/processor.h
> > @@ -82,12 +82,6 @@ static inline void release_thread(struct task_struct *dead_task)
> >
> >  extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
> >
> > -#define copy_segments(tsk, mm)         do { } while (0)
> > -#define release_segments(mm)           do { } while (0)
> > -#define forget_segments()              do { } while (0)
> > -
> > -extern unsigned long thread_saved_pc(struct task_struct *tsk);
> > -
> >  unsigned long get_wchan(struct task_struct *p);
> >
> >  #define KSTK_EIP(tsk)          (task_pt_regs(tsk)->pc)
> > diff --git a/arch/csky/kernel/process.c b/arch/csky/kernel/process.c
> > index 8b3fad062ab2..3da63cf0bfde 100644
> > --- a/arch/csky/kernel/process.c
> > +++ b/arch/csky/kernel/process.c
> > @@ -30,16 +30,6 @@ asmlinkage void ret_from_kernel_thread(void);
> >   */
> >  void flush_thread(void){}
> >
> > -/*
> > - * Return saved PC from a blocked thread
> > - */
> > -unsigned long thread_saved_pc(struct task_struct *tsk)
> > -{
> > -       struct switch_stack *sw = (struct switch_stack *)tsk->thread.sp;
> > -
> > -       return sw->r15;
> > -}
> > -
> >  int copy_thread_tls(unsigned long clone_flags,
> >                 unsigned long usp,
> >                 unsigned long kthread_arg,
> > --
> > 2.27.0
> >
> 
> 
> -- 
> Best Regards
>  Guo Ren
> 
> ML: https://lore.kernel.org/linux-csky/
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] csky: remove unusued thread_saved_pc and *_segments functions/macros
  2020-06-15  8:43   ` Tobias Klauser
@ 2020-06-17  6:54     ` Guo Ren
  0 siblings, 0 replies; 4+ messages in thread
From: Guo Ren @ 2020-06-17  6:54 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: Mao Han, linux-csky, Linux Kernel Mailing List

I can do it.

On Mon, Jun 15, 2020 at 4:43 PM Tobias Klauser <tklauser@distanz.ch> wrote:
>
> On 2020-06-13 at 10:42:07 +0200, Guo Ren <guoren@kernel.org> wrote:
> > Acked-by: Guo Ren <guoren@kernel.org>
>
> Thanks for the Ack. Are you taking this patch through your own tree or
> should I directly submit to someone else?
>
> > On Wed, Jun 10, 2020 at 11:45 PM Tobias Klauser <tklauser@distanz.ch> wrote:
> > >
> > > These are used nowhere in the tree (except for some architectures which
> > > define them for their own use) and were already removed for other
> > > architectures in:
> > >
> > > commit 6474924e2b5d ("arch: remove unused macro/function thread_saved_pc()")
> > > commit c17c02040bf0 ("arch: remove unused *_segments() macros/functions")
> > >
> > > Remove them from arch/csky as well.
> > >
> > > Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> > > ---
> > >  arch/csky/include/asm/processor.h |  6 ------
> > >  arch/csky/kernel/process.c        | 10 ----------
> > >  2 files changed, 16 deletions(-)
> > >
> > > diff --git a/arch/csky/include/asm/processor.h b/arch/csky/include/asm/processor.h
> > > index 24442d8e86f9..4800f6563abb 100644
> > > --- a/arch/csky/include/asm/processor.h
> > > +++ b/arch/csky/include/asm/processor.h
> > > @@ -82,12 +82,6 @@ static inline void release_thread(struct task_struct *dead_task)
> > >
> > >  extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
> > >
> > > -#define copy_segments(tsk, mm)         do { } while (0)
> > > -#define release_segments(mm)           do { } while (0)
> > > -#define forget_segments()              do { } while (0)
> > > -
> > > -extern unsigned long thread_saved_pc(struct task_struct *tsk);
> > > -
> > >  unsigned long get_wchan(struct task_struct *p);
> > >
> > >  #define KSTK_EIP(tsk)          (task_pt_regs(tsk)->pc)
> > > diff --git a/arch/csky/kernel/process.c b/arch/csky/kernel/process.c
> > > index 8b3fad062ab2..3da63cf0bfde 100644
> > > --- a/arch/csky/kernel/process.c
> > > +++ b/arch/csky/kernel/process.c
> > > @@ -30,16 +30,6 @@ asmlinkage void ret_from_kernel_thread(void);
> > >   */
> > >  void flush_thread(void){}
> > >
> > > -/*
> > > - * Return saved PC from a blocked thread
> > > - */
> > > -unsigned long thread_saved_pc(struct task_struct *tsk)
> > > -{
> > > -       struct switch_stack *sw = (struct switch_stack *)tsk->thread.sp;
> > > -
> > > -       return sw->r15;
> > > -}
> > > -
> > >  int copy_thread_tls(unsigned long clone_flags,
> > >                 unsigned long usp,
> > >                 unsigned long kthread_arg,
> > > --
> > > 2.27.0
> > >
> >
> >
> > --
> > Best Regards
> >  Guo Ren
> >
> > ML: https://lore.kernel.org/linux-csky/
> >



-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-17  6:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 15:39 [PATCH] csky: remove unusued thread_saved_pc and *_segments functions/macros Tobias Klauser
2020-06-13  8:42 ` Guo Ren
2020-06-15  8:43   ` Tobias Klauser
2020-06-17  6:54     ` Guo Ren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).