[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] Question about arch/x86/xen/mmu.c
On 12/04/2014 10:30 PM, Jan-Simon Moeller wrote:
Hi !
My name is Jan-Simon Moeller and I'm looking into compiling the kernel with
LLVM/Clang (see llvm.linuxfoundation.org) .
Right now we face this issue when compiling with clang:
CC arch/x86/xen/mmu.o
arch/x86/xen/mmu.c:1343:18: error: fields must have a constant size:
'variable length array in structure' extension will never be
supported
DECLARE_BITMAP(mask, num_processors);
^
include/linux/types.h:10:16: note: expanded from macro 'DECLARE_BITMAP'
unsigned long name[BITS_TO_LONGS(bits)]
^
1 error generated.
Question to the experts: why can't we just use NR_CPUS and be done with it ?
NR_CPUS will be setup by CONFIG_NR_CPUS and thus static.
( e.g. arch/x86/configs/x86_64_defconfig:CONFIG_NR_CPUS=64 )
This would expand the structure on kernels configured for many cpus
(e.g. 4096) but running on a smaller machine dramatically.
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|