* Re: [PATCHv10 3/3] powerpc/smp: Allow hole in paca_ptrs to accommodate boot_cpu
2023-12-27 2:41 ` [PATCHv10 3/3] powerpc/smp: Allow hole in paca_ptrs to accommodate boot_cpu Pingfan Liu
@ 2023-12-27 20:45 ` kernel test robot
2023-12-28 4:07 ` kernel test robot
1 sibling, 0 replies; 7+ messages in thread
From: kernel test robot @ 2023-12-27 20:45 UTC (permalink / raw)
To: Pingfan Liu, linuxppc-dev
Cc: Baoquan He, Pingfan Liu, llvm, kexec, Mahesh Salgaonkar,
Nicholas Piggin, Ming Lei, Sourabh Jain, oe-kbuild-all,
Hari Bathini, Wen Xiong
Hi Pingfan,
kernel test robot noticed the following build errors:
[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v6.7-rc7 next-20231222]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Pingfan-Liu/powerpc-kernel-Remove-check-on-paca_ptrs_size/20231227-104412
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link: https://lore.kernel.org/r/20231227024147.12485-1-kernelfans%40gmail.com
patch subject: [PATCHv10 3/3] powerpc/smp: Allow hole in paca_ptrs to accommodate boot_cpu
config: powerpc64-randconfig-001-20231227 (https://download.01.org/0day-ci/archive/20231228/202312280454.Et1Ovm5u-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231228/202312280454.Et1Ovm5u-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312280454.Et1Ovm5u-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
^
include/linux/minmax.h:56:40: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__is_constexpr((x) - (y)), \
^
include/linux/compiler.h:236:48: note: expanded from macro '__is_constexpr'
(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
>> arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:54: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/minmax.h:56:40: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__is_constexpr((x) - (y)), \
~~~~~~~~~~~~~~~~^~~~~~~~~
include/linux/compiler.h:236:48: note: expanded from macro '__is_constexpr'
(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
^
>> arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:58: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
^
include/linux/minmax.h:56:40: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__is_constexpr((x) - (y)), \
^
include/linux/compiler.h:236:48: note: expanded from macro '__is_constexpr'
(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
>> arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:54: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:58: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/minmax.h:56:40: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__is_constexpr((x) - (y)), \
~~~~~~~~~~~~~~~~^~~~~~~~~
include/linux/compiler.h:236:48: note: expanded from macro '__is_constexpr'
(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
^
>> arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
^
include/linux/minmax.h:57:13: note: expanded from macro '__careful_cmp'
__cmp(op, x, y), \
^
include/linux/minmax.h:46:27: note: expanded from macro '__cmp'
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
>> arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:54: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/minmax.h:57:13: note: expanded from macro '__careful_cmp'
__cmp(op, x, y), \
~~~~~~~~~~^~~~~
include/linux/minmax.h:46:27: note: expanded from macro '__cmp'
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
^
>> arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:58: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
^
include/linux/minmax.h:57:13: note: expanded from macro '__careful_cmp'
__cmp(op, x, y), \
^
include/linux/minmax.h:46:27: note: expanded from macro '__cmp'
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
>> arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:54: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:58: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/minmax.h:57:13: note: expanded from macro '__careful_cmp'
__cmp(op, x, y), \
~~~~~~~~~~^~~~~
include/linux/minmax.h:46:27: note: expanded from macro '__cmp'
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
^
>> arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
^
include/linux/minmax.h:57:13: note: expanded from macro '__careful_cmp'
__cmp(op, x, y), \
^
include/linux/minmax.h:46:51: note: expanded from macro '__cmp'
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
>> arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:54: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/minmax.h:57:13: note: expanded from macro '__careful_cmp'
__cmp(op, x, y), \
~~~~~~~~~~^~~~~
include/linux/minmax.h:46:51: note: expanded from macro '__cmp'
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
^
>> arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:58: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
^
include/linux/minmax.h:57:13: note: expanded from macro '__careful_cmp'
__cmp(op, x, y), \
^
include/linux/minmax.h:46:51: note: expanded from macro '__cmp'
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
>> arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:54: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:58: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/minmax.h:57:13: note: expanded from macro '__careful_cmp'
__cmp(op, x, y), \
~~~~~~~~~~^~~~~
include/linux/minmax.h:46:51: note: expanded from macro '__cmp'
#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y))
^
>> arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
^
include/linux/minmax.h:58:18: note: expanded from macro '__careful_cmp'
__cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
^
include/linux/minmax.h:49:9: note: expanded from macro '__cmp_once'
typeof(x) unique_x = (x); \
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
>> arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:54: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/minmax.h:58:18: note: expanded from macro '__careful_cmp'
__cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:49:9: note: expanded from macro '__cmp_once'
typeof(x) unique_x = (x); \
^
>> arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:58: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
^
include/linux/minmax.h:58:18: note: expanded from macro '__careful_cmp'
__cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
^
include/linux/minmax.h:49:9: note: expanded from macro '__cmp_once'
typeof(x) unique_x = (x); \
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
>> arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:54: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:58: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/minmax.h:58:18: note: expanded from macro '__careful_cmp'
__cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:49:9: note: expanded from macro '__cmp_once'
typeof(x) unique_x = (x); \
^
>> arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
^
include/linux/minmax.h:58:18: note: expanded from macro '__careful_cmp'
__cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
^
include/linux/minmax.h:49:24: note: expanded from macro '__cmp_once'
typeof(x) unique_x = (x); \
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
>> arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:54: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/minmax.h:58:18: note: expanded from macro '__careful_cmp'
__cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:49:24: note: expanded from macro '__cmp_once'
typeof(x) unique_x = (x); \
^
>> arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:58: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
^
include/linux/minmax.h:58:18: note: expanded from macro '__careful_cmp'
__cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
^
include/linux/minmax.h:49:24: note: expanded from macro '__cmp_once'
typeof(x) unique_x = (x); \
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
>> arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:54: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:58: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
include/linux/minmax.h:92:38: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(max, x, y)
~~~~~~~~~~~~~~~~~~~^~~~~
include/linux/minmax.h:58:18: note: expanded from macro '__careful_cmp'
__cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:49:24: note: expanded from macro '__cmp_once'
typeof(x) unique_x = (x); \
^
arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler.h:236:48: note: expanded from macro '__is_constexpr'
(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
^
include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^
include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:54: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:47: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler.h:236:48: note: expanded from macro '__is_constexpr'
(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
^
include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^~~~
arch/powerpc/kernel/paca.c:248:48: error: use of undeclared identifier 'threads_in_core'; did you mean 'cpu_thread_in_core'?
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
^~~~~~~~~~~~~~~
cpu_thread_in_core
include/linux/align.h:8:43: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
include/uapi/linux/const.h:31:70: note: expanded from macro '__ALIGN_KERNEL'
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
^
include/uapi/linux/const.h:32:58: note: expanded from macro '__ALIGN_KERNEL_MASK'
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
^
note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler.h:236:48: note: expanded from macro '__is_constexpr'
(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
^
include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^
include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^
arch/powerpc/include/asm/cputhreads.h:48:19: note: 'cpu_thread_in_core' declared here
static inline int cpu_thread_in_core(int cpu)
^
arch/powerpc/kernel/paca.c:248:26: warning: cast to smaller integer type 'typeof ((0 + 1))' (aka 'int') from 'int (*)(int)' [-Wpointer-to-int-cast]
cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:22: note: expanded from macro 'ALIGN'
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
^
vim +248 arch/powerpc/kernel/paca.c
242
243 void __init allocate_paca_ptrs(void)
244 {
245 unsigned int cnt;
246
247 /* paca_ptrs should be big enough to hold boot cpu */
> 248 cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
249 paca_last_cpu_num = cnt;
250 paca_ptrs_size = sizeof(struct paca_struct *) * cnt;
251 paca_ptrs = memblock_alloc_raw(paca_ptrs_size, SMP_CACHE_BYTES);
252 if (!paca_ptrs)
253 panic("Failed to allocate %d bytes for paca pointers\n",
254 paca_ptrs_size);
255
256 memset(paca_ptrs, 0x88, paca_ptrs_size);
257 }
258
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCHv10 3/3] powerpc/smp: Allow hole in paca_ptrs to accommodate boot_cpu
2023-12-27 2:41 ` [PATCHv10 3/3] powerpc/smp: Allow hole in paca_ptrs to accommodate boot_cpu Pingfan Liu
2023-12-27 20:45 ` kernel test robot
@ 2023-12-28 4:07 ` kernel test robot
1 sibling, 0 replies; 7+ messages in thread
From: kernel test robot @ 2023-12-28 4:07 UTC (permalink / raw)
To: Pingfan Liu, linuxppc-dev
Cc: Baoquan He, Pingfan Liu, kexec, Mahesh Salgaonkar,
Nicholas Piggin, Ming Lei, Sourabh Jain, oe-kbuild-all,
Hari Bathini, Wen Xiong
Hi Pingfan,
kernel test robot noticed the following build errors:
[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v6.7-rc7 next-20231222]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Pingfan-Liu/powerpc-kernel-Remove-check-on-paca_ptrs_size/20231227-104412
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link: https://lore.kernel.org/r/20231227024147.12485-1-kernelfans%40gmail.com
patch subject: [PATCHv10 3/3] powerpc/smp: Allow hole in paca_ptrs to accommodate boot_cpu
config: powerpc-microwatt_defconfig (https://download.01.org/0day-ci/archive/20231228/202312281100.39B8MAEU-lkp@intel.com/config)
compiler: powerpc64le-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231228/202312281100.39B8MAEU-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312281100.39B8MAEU-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/build_bug.h:5,
from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/smp.h:12,
from arch/powerpc/kernel/paca.c:6:
arch/powerpc/kernel/paca.c: In function 'allocate_paca_ptrs':
>> arch/powerpc/kernel/paca.c:248:55: error: 'threads_in_core' undeclared (first use in this function); did you mean 'threads_per_core'?
248 | cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
| ^~~~~~~~~~~~~~~
include/linux/compiler.h:236:55: note: in definition of macro '__is_constexpr'
236 | (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
| ^
include/linux/minmax.h:92:25: note: in expansion of macro '__careful_cmp'
92 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
arch/powerpc/kernel/paca.c:248:15: note: in expansion of macro 'max'
248 | cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
| ^~~
include/uapi/linux/const.h:31:41: note: in expansion of macro '__ALIGN_KERNEL_MASK'
31 | #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
| ^~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:33: note: in expansion of macro '__ALIGN_KERNEL'
8 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
arch/powerpc/kernel/paca.c:248:33: note: in expansion of macro 'ALIGN'
248 | cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
| ^~~~~
arch/powerpc/kernel/paca.c:248:55: note: each undeclared identifier is reported only once for each function it appears in
248 | cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
| ^~~~~~~~~~~~~~~
include/linux/compiler.h:236:55: note: in definition of macro '__is_constexpr'
236 | (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
| ^
include/linux/minmax.h:92:25: note: in expansion of macro '__careful_cmp'
92 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
arch/powerpc/kernel/paca.c:248:15: note: in expansion of macro 'max'
248 | cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
| ^~~
include/uapi/linux/const.h:31:41: note: in expansion of macro '__ALIGN_KERNEL_MASK'
31 | #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
| ^~~~~~~~~~~~~~~~~~~
include/linux/align.h:8:33: note: in expansion of macro '__ALIGN_KERNEL'
8 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
arch/powerpc/kernel/paca.c:248:33: note: in expansion of macro 'ALIGN'
248 | cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
| ^~~~~
include/linux/minmax.h:31:9: error: first argument to '__builtin_choose_expr' not a constant
31 | __builtin_choose_expr(__is_constexpr(is_signed_type(typeof(x))), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
51 | static_assert(__types_ok(x, y), \
| ^~~~~~~~~~~~~
include/linux/minmax.h:39:10: note: in expansion of macro '__is_signed'
39 | (__is_signed(x) == __is_signed(y) || \
| ^~~~~~~~~~~
include/linux/minmax.h:51:23: note: in expansion of macro '__types_ok'
51 | static_assert(__types_ok(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
58 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
| ^~~~~~~~~~
include/linux/minmax.h:92:25: note: in expansion of macro '__careful_cmp'
92 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
arch/powerpc/kernel/paca.c:248:15: note: in expansion of macro 'max'
248 | cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
| ^~~
include/linux/minmax.h:31:9: error: first argument to '__builtin_choose_expr' not a constant
31 | __builtin_choose_expr(__is_constexpr(is_signed_type(typeof(x))), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
51 | static_assert(__types_ok(x, y), \
| ^~~~~~~~~~~~~
include/linux/minmax.h:40:17: note: in expansion of macro '__is_signed'
40 | __is_signed((x) + 0) == __is_signed((y) + 0) || \
| ^~~~~~~~~~~
include/linux/minmax.h:51:23: note: in expansion of macro '__types_ok'
51 | static_assert(__types_ok(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
58 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
| ^~~~~~~~~~
include/linux/minmax.h:92:25: note: in expansion of macro '__careful_cmp'
92 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
arch/powerpc/kernel/paca.c:248:15: note: in expansion of macro 'max'
248 | cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
| ^~~
include/linux/minmax.h:31:9: error: first argument to '__builtin_choose_expr' not a constant
31 | __builtin_choose_expr(__is_constexpr(is_signed_type(typeof(x))), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
51 | static_assert(__types_ok(x, y), \
| ^~~~~~~~~~~~~
include/linux/minmax.h:36:53: note: in expansion of macro '__is_signed'
36 | (__builtin_choose_expr(__is_constexpr(x) && __is_signed(x), x, -1) >= 0)
vim +248 arch/powerpc/kernel/paca.c
242
243 void __init allocate_paca_ptrs(void)
244 {
245 unsigned int cnt;
246
247 /* paca_ptrs should be big enough to hold boot cpu */
> 248 cnt = max((unsigned int)ALIGN(boot_cpuid + 1, threads_in_core), nr_cpu_ids);
249 paca_last_cpu_num = cnt;
250 paca_ptrs_size = sizeof(struct paca_struct *) * cnt;
251 paca_ptrs = memblock_alloc_raw(paca_ptrs_size, SMP_CACHE_BYTES);
252 if (!paca_ptrs)
253 panic("Failed to allocate %d bytes for paca pointers\n",
254 paca_ptrs_size);
255
256 memset(paca_ptrs, 0x88, paca_ptrs_size);
257 }
258
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread