Files
kernel_arpi/arch/powerpc/include/asm
Ben Hutchings 8bc0868998 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 4ffe713b75
("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: 4ffe713b75 ("powerpc/mm: Increase the max addressable memory to 2PB")
Cc: stable@vger.kernel.org # v4.20+
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-03-21 00:16:45 +11:00
..
2019-02-22 00:10:14 +11:00
2018-06-03 20:32:02 +10:00
2018-12-19 18:56:32 +11:00
2019-01-14 20:39:27 +11:00
2019-02-23 22:31:40 +11:00
2019-03-17 12:56:31 +09:00
2019-02-18 22:41:03 +11:00
2018-09-18 17:52:15 -05:00
2019-02-23 22:31:40 +11:00
2018-05-25 12:04:43 +10:00
2018-06-03 21:19:40 +10:00
2018-07-30 22:48:21 +10:00
2018-10-20 13:26:47 +11:00
2017-11-12 09:03:10 +11:00