Skip to content

Commit 5f53d28

Browse files
kvaneeshmpe
authored andcommitted
powerpc/mm/hash: Rename KERNEL_REGION_ID to LINEAR_MAP_REGION_ID
The region actually point to linear map. Rename the #define to clarify thati. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent a092a03 commit 5f53d28

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

arch/powerpc/include/asm/book3s/64/hash.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
* Region IDs
9090
*/
9191
#define USER_REGION_ID 0
92-
#define KERNEL_REGION_ID 1
92+
#define LINEAR_MAP_REGION_ID 1
9393
#define VMALLOC_REGION_ID NON_LINEAR_REGION_ID(H_VMALLOC_START)
9494
#define IO_REGION_ID NON_LINEAR_REGION_ID(H_KERN_IO_START)
9595
#define VMEMMAP_REGION_ID NON_LINEAR_REGION_ID(H_VMEMMAP_START)
@@ -120,7 +120,7 @@ static inline int get_region_id(unsigned long ea)
120120
return USER_REGION_ID;
121121

122122
if (ea < H_KERN_VIRT_START)
123-
return KERNEL_REGION_ID;
123+
return LINEAR_MAP_REGION_ID;
124124

125125
VM_BUG_ON(id != 0xc);
126126
BUILD_BUG_ON(NON_LINEAR_REGION_ID(H_VMALLOC_START) != 2);

arch/powerpc/include/asm/book3s/64/mmu-hash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ static inline unsigned long get_kernel_context(unsigned long ea)
817817
* Depending on Kernel config, kernel region can have one context
818818
* or more.
819819
*/
820-
if (region_id == KERNEL_REGION_ID) {
820+
if (region_id == LINEAR_MAP_REGION_ID) {
821821
/*
822822
* We already verified ea to be not beyond the addr limit.
823823
*/

arch/powerpc/mm/copro_fault.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ int copro_calculate_slb(struct mm_struct *mm, u64 ea, struct copro_slb *slb)
129129
vsid = get_kernel_vsid(ea, mmu_kernel_ssize);
130130
vsidkey = SLB_VSID_KERNEL;
131131
break;
132-
case KERNEL_REGION_ID:
133-
pr_devel("%s: 0x%llx -- KERNEL_REGION_ID\n", __func__, ea);
132+
case LINEAR_MAP_REGION_ID:
133+
pr_devel("%s: 0x%llx -- LINEAR_MAP_REGION_ID\n", __func__, ea);
134134
psize = mmu_linear_psize;
135135
ssize = mmu_kernel_ssize;
136136
vsid = get_kernel_vsid(ea, mmu_kernel_ssize);

arch/powerpc/mm/slb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ static long slb_allocate_kernel(unsigned long ea, unsigned long id)
691691
unsigned long flags;
692692
int ssize;
693693

694-
if (id == KERNEL_REGION_ID) {
694+
if (id == LINEAR_MAP_REGION_ID) {
695695

696696
/* We only support upto MAX_PHYSMEM_BITS */
697697
if ((ea & EA_MASK) > (1UL << MAX_PHYSMEM_BITS))
@@ -790,7 +790,7 @@ long do_slb_fault(struct pt_regs *regs, unsigned long ea)
790790
* first class kernel code. But for performance it's probably nicer
791791
* if they go via fast_exception_return too.
792792
*/
793-
if (id >= KERNEL_REGION_ID) {
793+
if (id >= LINEAR_MAP_REGION_ID) {
794794
long err;
795795
#ifdef CONFIG_DEBUG_VM
796796
/* Catch recursive kernel SLB faults. */

arch/powerpc/platforms/cell/spu_base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static void __spu_kernel_slb(void *addr, struct copro_slb *slb)
224224
unsigned long ea = (unsigned long)addr;
225225
u64 llp;
226226

227-
if (get_region_id(ea) == KERNEL_REGION_ID)
227+
if (get_region_id(ea) == LINEAR_MAP_REGION_ID)
228228
llp = mmu_psize_defs[mmu_linear_psize].sllp;
229229
else
230230
llp = mmu_psize_defs[mmu_virtual_psize].sllp;

0 commit comments

Comments
 (0)