All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guo Ren <guoren@kernel.org>
To: Tobias Klauser <tklauser@distanz.ch>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] csky: remove unsued thread_saved_pc and *_segments functions/macros
Date: Thu, 13 Jun 2019 10:21:09 +0800	[thread overview]
Message-ID: <CAJF2gTTjMamzRO81MmRAkgwu+uF3nHsDiync13MWpsLZRLT7FQ@mail.gmail.com> (raw)
In-Reply-To: <20190612111611.13058-1-tklauser@distanz.ch>

Acked-by: Guo Ren <ren_guo@c-sky.com>

thread_saved_pc should be used in unwind stack and I'll give another
patch to optimize the unwind flow for csky.

On Wed, Jun 12, 2019 at 7:22 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 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 21e0bd5293dd..464575156f0f 100644
> --- a/arch/csky/include/asm/processor.h
> +++ b/arch/csky/include/asm/processor.h
> @@ -83,12 +83,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 e555740c0be5..adeb6b1bdb42 100644
> --- a/arch/csky/kernel/process.c
> +++ b/arch/csky/kernel/process.c
> @@ -24,16 +24,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.ksp;
> -
> -       return sw->r15;
> -}
> -
>  int copy_thread(unsigned long clone_flags,
>                 unsigned long usp,
>                 unsigned long kthread_arg,
> --
> 2.20.0
>

      reply	other threads:[~2019-06-13 16:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 11:16 [PATCH] csky: remove unsued thread_saved_pc and *_segments functions/macros Tobias Klauser
2019-06-13  2:21 ` Guo Ren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJF2gTTjMamzRO81MmRAkgwu+uF3nHsDiync13MWpsLZRLT7FQ@mail.gmail.com \
    --to=guoren@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tklauser@distanz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.