diff options
| author | Ben Hutchings <[email protected]> | 2019-03-17 01:17:56 +0000 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2019-03-20 13:16:45 +0000 |
| commit | 8bc086899816214fbc6047c9c7e15fcab49552bf (patch) | |
| tree | 4b4bbe2ee9e08db4b28fb9c835fdf5b767f85baf /lib/string_helpers.c | |
| parent | powerpc/6xx: fix setup and use of SPRN_SPRG_PGDIR for hash32 (diff) | |
| download | kernel-8bc086899816214fbc6047c9c7e15fcab49552bf.tar.gz kernel-8bc086899816214fbc6047c9c7e15fcab49552bf.zip | |
powerpc/mm: Only define MAX_PHYSMEM_BITS in SPARSEMEM configurations
MAX_PHYSMEM_BITS only needs to be defined if CONFIG_SPARSEMEM is
enabled, and that was the case before commit 4ffe713b7587
("powerpc/mm: Increase the max addressable memory to 2PB").
On 32-bit systems, where CONFIG_SPARSEMEM is not enabled, we now
define it as 46. That is larger than the real number of physical
address bits, and breaks calculations in zsmalloc:
mm/zsmalloc.c:130:49: warning: right shift count is negative
MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS))
^~
...
mm/zsmalloc.c:253:21: error: variably modified 'size_class' at file scope
struct size_class *size_class[ZS_SIZE_CLASSES];
^~~~~~~~~~
Fixes: 4ffe713b7587 ("powerpc/mm: Increase the max addressable memory to 2PB")
Cc: [email protected] # v4.20+
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions
