From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: mikey@neuling.org, mpe@ellerman.id.au
Subject: [RFC 2/8] powerpc/slb: Rename all the 'entry' occurrences to 'slot'
Date: Tue, 21 Jul 2015 12:28:40 +0530 [thread overview]
Message-ID: <1437461926-8908-2-git-send-email-khandual@linux.vnet.ibm.com> (raw)
In-Reply-To: <1437461926-8908-1-git-send-email-khandual@linux.vnet.ibm.com>
From: "khandual@linux.vnet.ibm.com" <khandual@linux.vnet.ibm.com>
These are essentially SLB individual slots what we are dealing with
in these functions. Usage of both 'entry' and 'slot' synonyms makes
it real confusing sometimes. This patch makes it uniform across the
file by replacing all those 'entry's with 'slot's.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
arch/powerpc/mm/slb.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index 62fafb3..3842a54 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -55,39 +55,39 @@ static inline unsigned long mk_vsid_data(unsigned long ea, int ssize,
static inline void slb_shadow_update(unsigned long ea, int ssize,
unsigned long flags,
- unsigned long entry)
+ unsigned long slot)
{
/*
- * Clear the ESID first so the entry is not valid while we are
+ * Clear the ESID first so the slot 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[entry].esid = 0;
- get_slb_shadow()->save_area[entry].vsid =
+ get_slb_shadow()->save_area[slot].esid = 0;
+ get_slb_shadow()->save_area[slot].vsid =
cpu_to_be64(mk_vsid_data(ea, ssize, flags));
- get_slb_shadow()->save_area[entry].esid =
- cpu_to_be64(mk_esid_data(ea, ssize, entry));
+ get_slb_shadow()->save_area[slot].esid =
+ cpu_to_be64(mk_esid_data(ea, ssize, slot));
}
-static inline void slb_shadow_clear(unsigned long entry)
+static inline void slb_shadow_clear(unsigned long slot)
{
- get_slb_shadow()->save_area[entry].esid = 0;
+ get_slb_shadow()->save_area[slot].esid = 0;
}
static inline void create_shadowed_slbe(unsigned long ea, int ssize,
unsigned long flags,
- unsigned long entry)
+ unsigned long slot)
{
/*
* Updating the shadow buffer before writing the SLB ensures
- * we don't get a stale entry here if we get preempted by PHYP
+ * we don't get a stale slot here if we get preempted by PHYP
* between these two statements.
*/
- slb_shadow_update(ea, ssize, flags, entry);
+ slb_shadow_update(ea, ssize, flags, slot);
asm volatile("slbmte %0,%1" :
: "r" (mk_vsid_data(ea, ssize, flags)),
- "r" (mk_esid_data(ea, ssize, entry))
+ "r" (mk_esid_data(ea, ssize, slot))
: "memory" );
}
@@ -109,7 +109,7 @@ static void __slb_flush_and_rebolt(void)
ksp_vsid_data = 0;
slb_shadow_clear(2);
} else {
- /* Update stack entry; others don't change */
+ /* Update stack slot; others don't change */
slb_shadow_update(get_paca()->kstack, mmu_kernel_ssize, lflags, 2);
ksp_vsid_data =
be64_to_cpu(get_slb_shadow()->save_area[2].vsid);
@@ -313,13 +313,12 @@ void slb_initialize(void)
asm volatile("slbmte %0,%0"::"r" (0) : "memory");
asm volatile("isync; slbia; isync":::"memory");
create_shadowed_slbe(PAGE_OFFSET, mmu_kernel_ssize, lflags, 0);
-
create_shadowed_slbe(VMALLOC_START, mmu_kernel_ssize, vflags, 1);
/* For the boot cpu, we're running on the stack in init_thread_union,
* which is in the first segment of the linear mapping, and also
* get_paca()->kstack hasn't been initialized yet.
- * For secondary cpus, we need to bolt the kernel stack entry now.
+ * For secondary cpus, we need to bolt the kernel stack slot now.
*/
slb_shadow_clear(2);
if (raw_smp_processor_id() != boot_cpuid &&
--
2.1.0
next prev parent reply other threads:[~2015-07-21 6:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 6:58 [RFC 1/8] powerpc/slb: Remove a duplicate extern variable Anshuman Khandual
2015-07-21 6:58 ` Anshuman Khandual [this message]
2015-07-21 9:46 ` [RFC, 2/8] powerpc/slb: Rename all the 'entry' occurrences to 'slot' Michael Ellerman
2015-07-21 11:23 ` [RFC,2/8] " Anshuman Khandual
2015-07-21 6:58 ` [RFC 3/8] powerpc/slb: Define macros for the bolted slots Anshuman Khandual
2015-07-22 9:32 ` Michael Ellerman
2015-07-21 6:58 ` [RFC 4/8] powerpc/slb: Add some helper functions to improve modularization Anshuman Khandual
2015-07-22 9:19 ` Michael Ellerman
2015-07-21 6:58 ` [RFC 5/8] powerpc/slb: Add documentation to runtime patching of SLB encoding Anshuman Khandual
2015-07-22 5:51 ` Michael Ellerman
2015-07-22 5:57 ` Gabriel Paubert
2015-07-22 9:01 ` Michael Ellerman
2015-07-22 12:17 ` Segher Boessenkool
2015-07-21 6:58 ` [RFC 6/8] powerpc/prom: Simplify the logic while fetching SLB size Anshuman Khandual
2015-07-21 10:21 ` [RFC, " Michael Ellerman
2015-07-21 11:24 ` Anshuman Khandual
2015-07-21 6:58 ` [RFC 7/8] powerpc/xmon: Drop 'valid' from the condition inside 'dump_segments' Anshuman Khandual
2015-07-21 10:00 ` [RFC, " Michael Ellerman
2015-07-21 11:45 ` Anshuman Khandual
2015-07-22 4:52 ` Michael Ellerman
2015-07-21 6:58 ` [RFC 8/8] powerpc/xmon: Add some more elements to the existing PACA dump list Anshuman Khandual
2015-07-21 10:08 ` [RFC, " Michael Ellerman
2015-07-21 11:48 ` Anshuman Khandual
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=1437461926-8908-2-git-send-email-khandual@linux.vnet.ibm.com \
--to=khandual@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
/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 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).