powerpc/book3s64/radix: Make radix_mem_block_size 64bit
PATCH 1/1 powerpc/book3s64/radix: Make radix_mem_block_size 64bit
Similar to commit: 89c140bbaeee ("pseries: Fix 64 bit logical memory block panic") make sure we update different variables tracking lmb_size are updated to be 64 bit.
--- arch/powerpc/include/asm/book3s/64/mmu.h | 2 +- arch/powerpc/include/asm/drmem.h | 2 +- arch/powerpc/mm/book3s64/radix_pgtable.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/include/asm/book3s/64/mmu.h +1 -1
@@ -85,7 +85,7 @@ extern unsigned int mmu_base_pid;/* * memory block size used with radix translation. */ -extern unsigned int __ro_after_init radix_mem_block_size; +extern unsigned long __ro_after_init radix_mem_block_size;#define PRTB_SIZE_SHIFT (mmu_pid_bits + 4)#define PRTB_ENTRIES (1ul << mmu_pid_bits)
arch/powerpc/include/asm/drmem.h +1 -1
@@ -21,7 +21,7 @@ struct drmem_lmb {struct drmem_lmb_info {struct drmem_lmb *lmbs;int n_lmbs; -u32 lmb_size; +u64 lmb_size; };extern struct drmem_lmb_info *drmem_info;
arch/powerpc/mm/book3s64/radix_pgtable.c +1 -1
@@ -34,7 +34,7 @@unsigned int mmu_pid_bits;unsigned int mmu_base_pid; -unsigned int radix_mem_block_size__ro_after_init ; +unsigned long radix_mem_block_size__ro_after_init ;static __ref void *early_alloc_pgtable (unsigned long size,int nid,unsigned long region_start,unsigned long region_end)
Signature · 1 line
2.26.2
Michael Ellerman
reviewerQuoted 3 lines · Aneesh Kumar K.V
Similar to commit:
89c140bbaeee("pseries: Fix 64 bit logical memory block panic") make sure we update different variables trackinglmb_sizeare updated to be 64 bit.
That commit went to all stable releases, should this one also?
cheers
Quoted 41 lines
arch/powerpc/include/asm/book3s/64/mmu.h +1
-1@@ -85,7 +85,7 @@ extern unsigned int mmu_base_pid;/* * memory block size used with radix translation. */ -extern unsigned int __ro_after_init radix_mem_block_size; +extern unsigned long __ro_after_init radix_mem_block_size;#define PRTB_SIZE_SHIFT (mmu_pid_bits + 4)#define PRTB_ENTRIES (1ul << mmu_pid_bits)arch/powerpc/include/asm/drmem.h +1
-1@@ -21,7 +21,7 @@ struct drmem_lmb {struct drmem_lmb_info {struct drmem_lmb *lmbs;int n_lmbs; -u32 lmb_size; +u64 lmb_size; };extern struct drmem_lmb_info *drmem_info;arch/powerpc/mm/book3s64/radix_pgtable.c +1
-1@@ -34,7 +34,7 @@unsigned int mmu_pid_bits;unsigned int mmu_base_pid; -unsigned int radix_mem_block_size__ro_after_init ; +unsigned long radix_mem_block_size__ro_after_init ;static __ref void *early_alloc_pgtable (unsigned long size,int nid,unsigned long region_start,unsigned long region_end)Signature · 1 line
2.26.2
Quoted 7 lines · Michael Ellerman
Quoted 3 lines · Aneesh Kumar K.V
Similar to commit:
89c140bbaeee("pseries: Fix 64 bit logical memory block panic") make sure we update different variables trackinglmb_sizeare updated to be 64 bit.That commit went to all stable releases, should this one also?
radix_mem_block_size got added recently and it is not yet upstram. But the drmem_lmb_info change can be a stable candidate. We also need this
I will split this as two patches?
modified arch/powerpc/include/asm/drmem.h
@@ -67,7 +67,7 @@ struct of_drconf_cell_v2 {
#define DRCONF_MEM_RESERVED 0x00000080
#define DRCONF_MEM_HOTREMOVABLE 0x00000100
-static inline u32 drmem_lmb_size(void)
+static inline u64 drmem_lmb_size(void)
{
return drmem_info->lmb_size;
}
-aneesh
Michael Ellerman
reviewerQuoted 7 lines · Aneesh Kumar K.V
Quoted 5 lines · Michael Ellerman
Quoted 3 lines · Aneesh Kumar K.V
Similar to commit:
89c140bbaeee("pseries: Fix 64 bit logical memory block panic") make sure we update different variables trackinglmb_sizeare updated to be 64 bit.
Quoted 7 lines
Quoted 2 lines
That commit went to all stable releases, should this one also?
radix_mem_block_sizegot added recently and it is not yet upstram. But thedrmem_lmb_infochange can be a stable candidate. We also need thisI will split this as two patches?
Yes, sounds good.
cheers
Quoted 12 lines
modified
arch/powerpc/include/asm/drmem.h(quoted diff) +1
-2@@ -67,7 +67,7 @@ struct of_drconf_cell_v2 { #define DRCONF_MEM_RESERVED 0x00000080 #define DRCONF_MEM_HOTREMOVABLE 0x00000100 -static inline u32 drmem_lmb_size(void) +static inline u64 drmem_lmb_size(void) { return drmem_info->lmb_size; } -aneesh