* [PATCH] powerpc/tm: Remove struct thread_info param from tm_reclaim_thread()
@ 2018-02-01 1:07 Cyril Bur
2018-02-01 4:46 ` Michael Ellerman
2018-07-24 13:59 ` Michael Ellerman
0 siblings, 2 replies; 4+ messages in thread
From: Cyril Bur @ 2018-02-01 1:07 UTC (permalink / raw)
To: linuxppc-dev; +Cc: gromero
tm_reclaim_thread() doesn't use the parameter anymore, both callers have
to bother getting it as they have no need for a struct thread_info
either.
Just remove it and adjust the callers.
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
---
arch/powerpc/kernel/process.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index bfdd783e3916..a47498da6562 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -853,8 +853,7 @@ static inline bool tm_enabled(struct task_struct *tsk)
return tsk && tsk->thread.regs && (tsk->thread.regs->msr & MSR_TM);
}
-static void tm_reclaim_thread(struct thread_struct *thr,
- struct thread_info *ti, uint8_t cause)
+static void tm_reclaim_thread(struct thread_struct *thr, uint8_t cause)
{
/*
* Use the current MSR TM suspended bit to track if we have
@@ -901,7 +900,7 @@ static void tm_reclaim_thread(struct thread_struct *thr,
void tm_reclaim_current(uint8_t cause)
{
tm_enable();
- tm_reclaim_thread(¤t->thread, current_thread_info(), cause);
+ tm_reclaim_thread(¤t->thread, cause);
}
static inline void tm_reclaim_task(struct task_struct *tsk)
@@ -932,7 +931,7 @@ static inline void tm_reclaim_task(struct task_struct *tsk)
thr->regs->ccr, thr->regs->msr,
thr->regs->trap);
- tm_reclaim_thread(thr, task_thread_info(tsk), TM_CAUSE_RESCHED);
+ tm_reclaim_thread(thr, TM_CAUSE_RESCHED);
TM_DEBUG("--- tm_reclaim on pid %d complete\n",
tsk->pid);
--
2.16.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/tm: Remove struct thread_info param from tm_reclaim_thread()
2018-02-01 1:07 [PATCH] powerpc/tm: Remove struct thread_info param from tm_reclaim_thread() Cyril Bur
@ 2018-02-01 4:46 ` Michael Ellerman
2018-02-01 23:34 ` Cyril Bur
2018-07-24 13:59 ` Michael Ellerman
1 sibling, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2018-02-01 4:46 UTC (permalink / raw)
To: Cyril Bur, linuxppc-dev; +Cc: gromero
Cyril Bur <cyrilbur@gmail.com> writes:
> tm_reclaim_thread() doesn't use the parameter anymore, both callers have
> to bother getting it as they have no need for a struct thread_info
> either.
In future please tell me why the parameter is unused and when it became
unused.
In this case it was previously used but the last usage was removed in:
dc3106690b20 ("powerpc: tm: Always use fp_state and vr_state to store live registers")
cheers
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index bfdd783e3916..a47498da6562 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -853,8 +853,7 @@ static inline bool tm_enabled(struct task_struct *tsk)
> return tsk && tsk->thread.regs && (tsk->thread.regs->msr & MSR_TM);
> }
>
> -static void tm_reclaim_thread(struct thread_struct *thr,
> - struct thread_info *ti, uint8_t cause)
> +static void tm_reclaim_thread(struct thread_struct *thr, uint8_t cause)
> {
> /*
> * Use the current MSR TM suspended bit to track if we have
> @@ -901,7 +900,7 @@ static void tm_reclaim_thread(struct thread_struct *thr,
> void tm_reclaim_current(uint8_t cause)
> {
> tm_enable();
> - tm_reclaim_thread(¤t->thread, current_thread_info(), cause);
> + tm_reclaim_thread(¤t->thread, cause);
> }
>
> static inline void tm_reclaim_task(struct task_struct *tsk)
> @@ -932,7 +931,7 @@ static inline void tm_reclaim_task(struct task_struct *tsk)
> thr->regs->ccr, thr->regs->msr,
> thr->regs->trap);
>
> - tm_reclaim_thread(thr, task_thread_info(tsk), TM_CAUSE_RESCHED);
> + tm_reclaim_thread(thr, TM_CAUSE_RESCHED);
>
> TM_DEBUG("--- tm_reclaim on pid %d complete\n",
> tsk->pid);
> --
> 2.16.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/tm: Remove struct thread_info param from tm_reclaim_thread()
2018-02-01 4:46 ` Michael Ellerman
@ 2018-02-01 23:34 ` Cyril Bur
0 siblings, 0 replies; 4+ messages in thread
From: Cyril Bur @ 2018-02-01 23:34 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev; +Cc: gromero
On Thu, 2018-02-01 at 15:46 +1100, Michael Ellerman wrote:
> Cyril Bur <cyrilbur@gmail.com> writes:
>
> > tm_reclaim_thread() doesn't use the parameter anymore, both callers have
> > to bother getting it as they have no need for a struct thread_info
> > either.
>
> In future please tell me why the parameter is unused and when it became
> unused.
>
Thanks, will do!
> In this case it was previously used but the last usage was removed in:
>
> dc3106690b20 ("powerpc: tm: Always use fp_state and vr_state to store live registers")
>
> cheers
>
> > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> > index bfdd783e3916..a47498da6562 100644
> > --- a/arch/powerpc/kernel/process.c
> > +++ b/arch/powerpc/kernel/process.c
> > @@ -853,8 +853,7 @@ static inline bool tm_enabled(struct task_struct *tsk)
> > return tsk && tsk->thread.regs && (tsk->thread.regs->msr & MSR_TM);
> > }
> >
> > -static void tm_reclaim_thread(struct thread_struct *thr,
> > - struct thread_info *ti, uint8_t cause)
> > +static void tm_reclaim_thread(struct thread_struct *thr, uint8_t cause)
> > {
> > /*
> > * Use the current MSR TM suspended bit to track if we have
> > @@ -901,7 +900,7 @@ static void tm_reclaim_thread(struct thread_struct *thr,
> > void tm_reclaim_current(uint8_t cause)
> > {
> > tm_enable();
> > - tm_reclaim_thread(¤t->thread, current_thread_info(), cause);
> > + tm_reclaim_thread(¤t->thread, cause);
> > }
> >
> > static inline void tm_reclaim_task(struct task_struct *tsk)
> > @@ -932,7 +931,7 @@ static inline void tm_reclaim_task(struct task_struct *tsk)
> > thr->regs->ccr, thr->regs->msr,
> > thr->regs->trap);
> >
> > - tm_reclaim_thread(thr, task_thread_info(tsk), TM_CAUSE_RESCHED);
> > + tm_reclaim_thread(thr, TM_CAUSE_RESCHED);
> >
> > TM_DEBUG("--- tm_reclaim on pid %d complete\n",
> > tsk->pid);
> > --
> > 2.16.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: powerpc/tm: Remove struct thread_info param from tm_reclaim_thread()
2018-02-01 1:07 [PATCH] powerpc/tm: Remove struct thread_info param from tm_reclaim_thread() Cyril Bur
2018-02-01 4:46 ` Michael Ellerman
@ 2018-07-24 13:59 ` Michael Ellerman
1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-07-24 13:59 UTC (permalink / raw)
To: Cyril Bur, linuxppc-dev; +Cc: gromero
On Thu, 2018-02-01 at 01:07:46 UTC, Cyril Bur wrote:
> tm_reclaim_thread() doesn't use the parameter anymore, both callers have
> to bother getting it as they have no need for a struct thread_info
> either.
>
> Just remove it and adjust the callers.
>
> Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/edd00b830731be468fd3caf7f9154d
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-24 13:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-01 1:07 [PATCH] powerpc/tm: Remove struct thread_info param from tm_reclaim_thread() Cyril Bur
2018-02-01 4:46 ` Michael Ellerman
2018-02-01 23:34 ` Cyril Bur
2018-07-24 13:59 ` Michael Ellerman
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).