linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/slb: Use a local to avoid multiple calls to get_slb_shadow()
@ 2015-08-13  7:11 Michael Ellerman
  2015-10-02  7:47 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2015-08-13  7:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: khandual

For no reason other than it looks ugly.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/mm/slb.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index 0c7115fd314b..515730e499fe 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -62,16 +62,16 @@ static inline void slb_shadow_update(unsigned long ea, int ssize,
 				     unsigned long flags,
 				     enum slb_index index)
 {
+	struct slb_shadow *p = get_slb_shadow();
+
 	/*
 	 * Clear the ESID first so the entry is not valid while we are
 	 * updating it.  No write barriers are needed here, provided
 	 * we only update the current CPU's SLB shadow buffer.
 	 */
-	get_slb_shadow()->save_area[index].esid = 0;
-	get_slb_shadow()->save_area[index].vsid =
-				cpu_to_be64(mk_vsid_data(ea, ssize, flags));
-	get_slb_shadow()->save_area[index].esid =
-				cpu_to_be64(mk_esid_data(ea, ssize, index));
+	p->save_area[index].esid = 0;
+	p->save_area[index].vsid = cpu_to_be64(mk_vsid_data(ea, ssize, flags));
+	p->save_area[index].esid = cpu_to_be64(mk_esid_data(ea, ssize, index));
 }
 
 static inline void slb_shadow_clear(enum slb_index index)
-- 
2.1.4

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

* Re: powerpc/slb: Use a local to avoid multiple calls to get_slb_shadow()
  2015-08-13  7:11 [PATCH] powerpc/slb: Use a local to avoid multiple calls to get_slb_shadow() Michael Ellerman
@ 2015-10-02  7:47 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2015-10-02  7:47 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: khandual

On Thu, 2015-13-08 at 07:11:18 UTC, Michael Ellerman wrote:
> For no reason other than it looks ugly.
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/26cd835ef8bdc9ca6db03374

cheers

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

end of thread, other threads:[~2015-10-02  7:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-13  7:11 [PATCH] powerpc/slb: Use a local to avoid multiple calls to get_slb_shadow() Michael Ellerman
2015-10-02  7:47 ` 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).