* [PATCH] powerpc/book3s64/radix: Make radix_mem_block_size 64bit
@ 2020-08-06 8:14 Aneesh Kumar K.V
2020-08-06 12:34 ` Michael Ellerman
0 siblings, 1 reply; 4+ messages in thread
From: Aneesh Kumar K.V @ 2020-08-06 8:14 UTC (permalink / raw)
To: linuxppc-dev, mpe; +Cc: Aneesh Kumar K.V
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.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
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(-)
diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
index 55442d45c597..1a0c9d09950f 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu.h
@@ -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)
diff --git a/arch/powerpc/include/asm/drmem.h b/arch/powerpc/include/asm/drmem.h
index 17ccc6474ab6..07c158c5f939 100644
--- a/arch/powerpc/include/asm/drmem.h
+++ b/arch/powerpc/include/asm/drmem.h
@@ -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;
diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
index 28c784976bed..ca76d9d6372a 100644
--- a/arch/powerpc/mm/book3s64/radix_pgtable.c
+++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
@@ -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)
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/book3s64/radix: Make radix_mem_block_size 64bit
2020-08-06 8:14 [PATCH] powerpc/book3s64/radix: Make radix_mem_block_size 64bit Aneesh Kumar K.V
@ 2020-08-06 12:34 ` Michael Ellerman
2020-08-06 12:44 ` Aneesh Kumar K.V
0 siblings, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2020-08-06 12:34 UTC (permalink / raw)
To: Aneesh Kumar K.V, linuxppc-dev; +Cc: Aneesh Kumar K.V
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes:
> 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.
That commit went to all stable releases, should this one also?
cheers
> diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
> index 55442d45c597..1a0c9d09950f 100644
> --- a/arch/powerpc/include/asm/book3s/64/mmu.h
> +++ b/arch/powerpc/include/asm/book3s/64/mmu.h
> @@ -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)
> diff --git a/arch/powerpc/include/asm/drmem.h b/arch/powerpc/include/asm/drmem.h
> index 17ccc6474ab6..07c158c5f939 100644
> --- a/arch/powerpc/include/asm/drmem.h
> +++ b/arch/powerpc/include/asm/drmem.h
> @@ -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;
> diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
> index 28c784976bed..ca76d9d6372a 100644
> --- a/arch/powerpc/mm/book3s64/radix_pgtable.c
> +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
> @@ -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)
> --
> 2.26.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/book3s64/radix: Make radix_mem_block_size 64bit
2020-08-06 12:34 ` Michael Ellerman
@ 2020-08-06 12:44 ` Aneesh Kumar K.V
2020-08-07 1:11 ` Michael Ellerman
0 siblings, 1 reply; 4+ messages in thread
From: Aneesh Kumar K.V @ 2020-08-06 12:44 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev
Michael Ellerman <mpe@ellerman.id.au> writes:
> "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes:
>> 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.
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/book3s64/radix: Make radix_mem_block_size 64bit
2020-08-06 12:44 ` Aneesh Kumar K.V
@ 2020-08-07 1:11 ` Michael Ellerman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2020-08-07 1:11 UTC (permalink / raw)
To: Aneesh Kumar K.V, linuxppc-dev
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes:
> Michael Ellerman <mpe@ellerman.id.au> writes:
>
>> "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes:
>>> 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.
>>
>> 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?
Yes, sounds good.
cheers
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-07 1:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-06 8:14 [PATCH] powerpc/book3s64/radix: Make radix_mem_block_size 64bit Aneesh Kumar K.V
2020-08-06 12:34 ` Michael Ellerman
2020-08-06 12:44 ` Aneesh Kumar K.V
2020-08-07 1:11 ` 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).