powerpc/slb: Use a local to avoid multiple calls to get_slb_shadow()
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 13 Aug 2015 07:11:18 +0000 (17:11 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 1 Oct 2015 06:52:01 +0000 (16:52 +1000)
For no reason other than it looks ugly.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/slb.c

index 0c7115fd314bba442718476a00a4c45a7b33f2d7..515730e499fe663b7dbe2ba00c759e06e916d59d 100644 (file)
@@ -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)