From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?windows-1252?Q?J=FCrgen_Gro=DF?= Subject: Re: Question about arch/x86/xen/mmu.c Date: Fri, 05 Dec 2014 05:47:49 +0100 Message-ID: <548138F5.30405@suse.com> References: <1727998.ort8X4yb3k@aragorn.auenland.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xwko3-0003fq-Ji for xen-devel@lists.xenproject.org; Fri, 05 Dec 2014 04:47:51 +0000 In-Reply-To: <1727998.ort8X4yb3k@aragorn.auenland.lan> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan-Simon Moeller , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org 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