Bug 202017
Summary: | CONFIG_ZSMALLOC=y causes build failure on 32-bit PowerPC | ||
---|---|---|---|
Product: | Memory Management | Reporter: | jason |
Component: | Slab Allocator | Assignee: | Andrew Morton (akpm) |
Status: | NEW --- | ||
Severity: | normal | CC: | erhard_f, rafaeldtinoco |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.20-rc7 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
Build log from 4.20-rc7
32-bit PowerPC config 64-bit PowerPC config 2nd build log build.log (G4 MDD, 5.0.0-rc4) kernel .config (G4 MDD, 5.0.0-rc4) |
Description
jason
2018-12-18 02:28:58 UTC
Created attachment 280063 [details]
32-bit PowerPC config
This is the .config I'm using.
Created attachment 280065 [details]
64-bit PowerPC config
This is the 64-bit PowerPC config I'm also using, which doesn't exhibit this problem.
I can't actually find the compiler error message in all this stuff! Please paste it in - we really don't need all the other info. My apologies. Apparently I didn't redirect stderr and so it was not captured. This represent the output of stderr. In file included from ./include/linux/cache.h:5:0, from ./include/linux/printk.h:9, from ./include/linux/kernel.h:14, from ./include/linux/list.h:9, from ./include/linux/module.h:9, from mm/zsmalloc.c:33: mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:253:32: note: in expansion of macro ‘ZS_SIZE_CLASSES’ struct size_class *size_class[ZS_SIZE_CLASSES]; ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:253:32: note: in expansion of macro ‘ZS_SIZE_CLASSES’ struct size_class *size_class[ZS_SIZE_CLASSES]; ^ mm/zsmalloc.c:253:21: error: variably modified ‘size_class’ at file scope struct size_class *size_class[ZS_SIZE_CLASSES]; ^ In file included from ./include/linux/kernel.h:10:0, from ./include/linux/list.h:9, from ./include/linux/module.h:9, from mm/zsmalloc.c:33: mm/zsmalloc.c: In function ‘get_size_class_index’: mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/linux/compiler.h:76:40: note: in definition of macro ‘likely’ # define likely(x) __builtin_expect(!!(x), 1) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:540:20: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ if (likely(size > ZS_MIN_ALLOC_SIZE)) ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/linux/compiler.h:76:40: note: in definition of macro ‘likely’ # define likely(x) __builtin_expect(!!(x), 1) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:540:20: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ if (likely(size > ZS_MIN_ALLOC_SIZE)) ^ In file included from ./include/linux/cache.h:5:0, from ./include/linux/printk.h:9, from ./include/linux/kernel.h:14, from ./include/linux/list.h:9, from ./include/linux/module.h:9, from mm/zsmalloc.c:33: mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:541:29: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ idx = DIV_ROUND_UP(size - ZS_MIN_ALLOC_SIZE, ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:541:29: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ idx = DIV_ROUND_UP(size - ZS_MIN_ALLOC_SIZE, ^ In file included from ./include/linux/list.h:9:0, from ./include/linux/module.h:9, from mm/zsmalloc.c:33: mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/linux/kernel.h:861:27: note: in definition of macro ‘__cmp’ #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ ./include/linux/kernel.h:937:27: note: in expansion of macro ‘__careful_cmp’ #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^ mm/zsmalloc.c:544:9: note: in expansion of macro ‘min_t’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ ./include/linux/kernel.h:116:22: note: in expansion of macro ‘__KERNEL_DIV_ROUND_UP’ #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:544:20: note: in expansion of macro ‘ZS_SIZE_CLASSES’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/linux/kernel.h:861:27: note: in definition of macro ‘__cmp’ #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ ./include/linux/kernel.h:937:27: note: in expansion of macro ‘__careful_cmp’ #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^ mm/zsmalloc.c:544:9: note: in expansion of macro ‘min_t’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ ./include/linux/kernel.h:116:22: note: in expansion of macro ‘__KERNEL_DIV_ROUND_UP’ #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:544:20: note: in expansion of macro ‘ZS_SIZE_CLASSES’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/linux/kernel.h:861:40: note: in definition of macro ‘__cmp’ #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ ./include/linux/kernel.h:937:27: note: in expansion of macro ‘__careful_cmp’ #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^ mm/zsmalloc.c:544:9: note: in expansion of macro ‘min_t’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ ./include/linux/kernel.h:116:22: note: in expansion of macro ‘__KERNEL_DIV_ROUND_UP’ #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:544:20: note: in expansion of macro ‘ZS_SIZE_CLASSES’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/linux/kernel.h:861:40: note: in definition of macro ‘__cmp’ #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ ./include/linux/kernel.h:937:27: note: in expansion of macro ‘__careful_cmp’ #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^ mm/zsmalloc.c:544:9: note: in expansion of macro ‘min_t’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ ./include/linux/kernel.h:116:22: note: in expansion of macro ‘__KERNEL_DIV_ROUND_UP’ #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:544:20: note: in expansion of macro ‘ZS_SIZE_CLASSES’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/linux/kernel.h:864:25: note: in definition of macro ‘__cmp_once’ typeof(x) unique_x = (x); \ ^ ./include/linux/kernel.h:937:27: note: in expansion of macro ‘__careful_cmp’ #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^ mm/zsmalloc.c:544:9: note: in expansion of macro ‘min_t’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ ./include/linux/kernel.h:116:22: note: in expansion of macro ‘__KERNEL_DIV_ROUND_UP’ #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:544:20: note: in expansion of macro ‘ZS_SIZE_CLASSES’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/linux/kernel.h:864:25: note: in definition of macro ‘__cmp_once’ typeof(x) unique_x = (x); \ ^ ./include/linux/kernel.h:937:27: note: in expansion of macro ‘__careful_cmp’ #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^ mm/zsmalloc.c:544:9: note: in expansion of macro ‘min_t’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ ./include/linux/kernel.h:116:22: note: in expansion of macro ‘__KERNEL_DIV_ROUND_UP’ #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:544:20: note: in expansion of macro ‘ZS_SIZE_CLASSES’ return min_t(int, ZS_SIZE_CLASSES - 1, idx); ^ In file included from ./arch/powerpc/include/asm/page.h:353:0, from ./arch/powerpc/include/asm/thread_info.h:29, from ./include/linux/thread_info.h:38, from ./include/asm-generic/preempt.h:5, from ./arch/powerpc/include/generated/asm/preempt.h:1, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from mm/zsmalloc.c:33: mm/zsmalloc.c: In function ‘obj_to_location’: mm/zsmalloc.c:863:26: warning: right shift count is negative [-Wshift-count-negative] *page = pfn_to_page(obj >> OBJ_INDEX_BITS); ^ ./include/asm-generic/memory_model.h:33:41: note: in definition of macro ‘__pfn_to_page’ #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET)) ^ mm/zsmalloc.c:863:10: note: in expansion of macro ‘pfn_to_page’ *page = pfn_to_page(obj >> OBJ_INDEX_BITS); ^ mm/zsmalloc.c:120:37: warning: left shift count is negative [-Wshift-count-negative] #define OBJ_INDEX_MASK ((_AC(1, UL) << OBJ_INDEX_BITS) - 1) ^ mm/zsmalloc.c:864:20: note: in expansion of macro ‘OBJ_INDEX_MASK’ *obj_idx = (obj & OBJ_INDEX_MASK); ^ mm/zsmalloc.c: In function ‘location_to_obj’: mm/zsmalloc.c:876:26: warning: left shift count is negative [-Wshift-count-negative] obj = page_to_pfn(page) << OBJ_INDEX_BITS; ^ mm/zsmalloc.c:120:37: warning: left shift count is negative [-Wshift-count-negative] #define OBJ_INDEX_MASK ((_AC(1, UL) << OBJ_INDEX_BITS) - 1) ^ mm/zsmalloc.c:877:19: note: in expansion of macro ‘OBJ_INDEX_MASK’ obj |= obj_idx & OBJ_INDEX_MASK; ^ In file included from ./include/linux/cache.h:5:0, from ./include/linux/printk.h:9, from ./include/linux/kernel.h:14, from ./include/linux/list.h:9, from ./include/linux/module.h:9, from mm/zsmalloc.c:33: mm/zsmalloc.c: In function ‘async_free_zspage’: mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:2151:18: note: in expansion of macro ‘ZS_SIZE_CLASSES’ for (i = 0; i < ZS_SIZE_CLASSES; i++) { ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:2151:18: note: in expansion of macro ‘ZS_SIZE_CLASSES’ for (i = 0; i < ZS_SIZE_CLASSES; i++) { ^ mm/zsmalloc.c: In function ‘zs_compact’: mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:2269:11: note: in expansion of macro ‘ZS_SIZE_CLASSES’ for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:2269:11: note: in expansion of macro ‘ZS_SIZE_CLASSES’ for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { ^ mm/zsmalloc.c: In function ‘zs_shrinker_count’: mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:2315:11: note: in expansion of macro ‘ZS_SIZE_CLASSES’ for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:2315:11: note: in expansion of macro ‘ZS_SIZE_CLASSES’ for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { ^ mm/zsmalloc.c: In function ‘zs_create_pool’: mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:2376:11: note: in expansion of macro ‘ZS_SIZE_CLASSES’ for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:2376:11: note: in expansion of macro ‘ZS_SIZE_CLASSES’ for (i = ZS_SIZE_CLASSES - 1; i >= 0; i--) { ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:127:28: note: in definition of macro ‘MAX’ #define MAX(a, b) ((a) >= (b) ? (a) : (b)) ^ mm/zsmalloc.c:2383:10: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ size = ZS_MIN_ALLOC_SIZE + i * ZS_SIZE_CLASS_DELTA; ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:127:40: note: in definition of macro ‘MAX’ #define MAX(a, b) ((a) >= (b) ? (a) : (b)) ^ mm/zsmalloc.c:2383:10: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ size = ZS_MIN_ALLOC_SIZE + i * ZS_SIZE_CLASS_DELTA; ^ In file included from ./include/linux/cache.h:5:0, from ./include/linux/printk.h:9, from ./include/linux/kernel.h:14, from ./include/linux/list.h:9, from ./include/linux/module.h:9, from mm/zsmalloc.c:33: mm/zsmalloc.c: In function ‘zs_destroy_pool’: mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:2473:18: note: in expansion of macro ‘ZS_SIZE_CLASSES’ for (i = 0; i < ZS_SIZE_CLASSES; i++) { ^ mm/zsmalloc.c:130:49: warning: right shift count is negative [-Wshift-count-negative] MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ ./include/uapi/linux/kernel.h:13:40: note: in definition of macro ‘__KERNEL_DIV_ROUND_UP’ #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ mm/zsmalloc.c:130:2: note: in expansion of macro ‘MAX’ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) ^ mm/zsmalloc.c:148:59: note: in expansion of macro ‘ZS_MIN_ALLOC_SIZE’ #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \ ^ mm/zsmalloc.c:2473:18: note: in expansion of macro ‘ZS_SIZE_CLASSES’ for (i = 0; i < ZS_SIZE_CLASSES; i++) { ^ scripts/Makefile.build:291: recipe for target 'mm/zsmalloc.o' failed make[1]: *** [mm/zsmalloc.o] Error 1 Makefile:1060: recipe for target 'mm' failed make: *** [mm] Error 2 Created attachment 280085 [details]
2nd build log
Adding 2nd build log that contains the full thing in case that's useful.
Please drop "[PATCH] mm/zsmalloc.c: Fix zsmalloc 32-bit PAE support" I'll have to revisit this patch to fix: - arm 32 - decide whether to use 36 or 40 bits for LPAE - x86 - CONFIG_X86_5LEVEL is broken on compilation - mips - to include headers for this arch - xtensa - to include headers for this arch - powerpc 32 - broken on compilation I'll send a v2 in a near future. For now, please drop it and sorry for the burden. Created attachment 280907 [details]
build.log (G4 MDD, 5.0.0-rc4)
Got hit by this bug too. Kernel 5.0.0-rc4, native build on a G4 MDD:
Portage 2.3.51 (python 3.6.5-final-0, default/linux/powerpc/ppc32/17.0/desktop/gnome/systemd, gcc-7.4.0, glibc-2.27-r6, 4.19.17-gentoo ppc)
=================================================================
System uname: Linux-4.19.17-gentoo-ppc-7455,_altivec_supported-with-gentoo-2.6
KiB Mem: 2056700 total, 21404 free
KiB Swap: 33816568 total, 33812984 free
Timestamp of repository gentoo: Fri, 01 Feb 2019 12:00:01 +0000
Head commit of repository gentoo: 01a2a1ab641a3b619ffe649538578409160fde53
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
distcc 3.2rc1 powerpc-unknown-linux-gnu [disabled]
app-shells/bash: 4.4_p23-r1::gentoo
dev-lang/perl: 5.26.2::gentoo
dev-lang/python: 2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake: 3.9.6::gentoo
dev-util/pkgconfig: 0.29.2::gentoo
sys-apps/baselayout: 2.6-r1::gentoo
sys-apps/sandbox: 2.13::gentoo
sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake: 1.16.1-r1::gentoo
sys-devel/binutils: 2.30-r4::gentoo
sys-devel/gcc: 7.4.0::gentoo
sys-devel/gcc-config: 2.0::gentoo
sys-devel/libtool: 2.4.6-r3::gentoo
sys-devel/make: 4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.27-r6::gentoo
Created attachment 280909 [details]
kernel .config (G4 MDD, 5.0.0-rc4)
CONFIG_ZSMALLOC=y|m builds again as of kernel 5.1.0 on my G4 MDD. Thanks to the people involved! Could the fix involved be backported to 5.0.x series? Would be nice as the G4 MDD can't boot 5.1.0 due to another kernel bug (bug #203125). |