All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] CONFIG_NR_CPUS is too large
@ 2009-09-11 19:01 Stephen Sinclair
  2009-09-11 20:03 ` Jan Kiszka
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Sinclair @ 2009-09-11 19:01 UTC (permalink / raw)
  To: xenomai

Hello,

I am trying to install Xenomai.  After patching the kernel (I have
tried with 2.6.29.5 and 2.6.30.5), I get the following error message:


$ make
scripts/kconfig/conf -s arch/x86/Kconfig
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CC      arch/x86/kernel/asm-offsets.s
In file included from include/linux/sched.h:62,
                 from arch/x86/kernel/asm-offsets_64.c:8,
                 from arch/x86/kernel/asm-offsets.c:4:
include/linux/ipipe.h:76:2: error: #error "CONFIG_NR_CPUS is too
large, please lower it."
make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2


The CONFIG_NR_CPUS config variable is set to the default 64, but I
still get this error if I lower it to 4 or 2.  (This is a dual-core
machine, AMD X2.)

I tried commenting-out this error, just to see what would happen, but
I get an oops on boot.  Setting the boot flag earlyprintk=vga shows a
backtrace, and the crash happens immediately after
__ipipe_enable_irqdesc, which is in ipipe_virtualize_irq.

I don't know how to proceed from here, does anyone know why
CONFIG_NR_CPUS is triggering this error?

Thanks,
Steve


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-help] CONFIG_NR_CPUS is too large
  2009-09-11 19:01 [Xenomai-help] CONFIG_NR_CPUS is too large Stephen Sinclair
@ 2009-09-11 20:03 ` Jan Kiszka
  2009-09-17 17:41   ` Stephen Sinclair
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2009-09-11 20:03 UTC (permalink / raw)
  To: Stephen Sinclair; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]

Stephen Sinclair wrote:
> Hello,
> 
> I am trying to install Xenomai.  After patching the kernel (I have
> tried with 2.6.29.5 and 2.6.30.5), I get the following error message:
> 
> 
> $ make
> scripts/kconfig/conf -s arch/x86/Kconfig
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   SYMLINK include/asm -> include/asm-x86
>   CC      arch/x86/kernel/asm-offsets.s
> In file included from include/linux/sched.h:62,
>                  from arch/x86/kernel/asm-offsets_64.c:8,
>                  from arch/x86/kernel/asm-offsets.c:4:
> include/linux/ipipe.h:76:2: error: #error "CONFIG_NR_CPUS is too
> large, please lower it."
> make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
> make: *** [prepare0] Error 2
> 
> 
> The CONFIG_NR_CPUS config variable is set to the default 64, but I
> still get this error if I lower it to 4 or 2.  (This is a dual-core
> machine, AMD X2.)
> 
> I tried commenting-out this error, just to see what would happen, but
> I get an oops on boot.  Setting the boot flag earlyprintk=vga shows a
> backtrace, and the crash happens immediately after
> __ipipe_enable_irqdesc, which is in ipipe_virtualize_irq.
> 
> I don't know how to proceed from here, does anyone know why
> CONFIG_NR_CPUS is triggering this error?

Could you post the .config that fails to build?

Yeah, there is a limitation, normally 96 (IIRC). 2 or 4 CPUs is
definitely far below it.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-help] CONFIG_NR_CPUS is too large
  2009-09-11 20:03 ` Jan Kiszka
@ 2009-09-17 17:41   ` Stephen Sinclair
  2010-01-28 16:20     ` Brian Zenowich
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Sinclair @ 2009-09-17 17:41 UTC (permalink / raw)
  To: xenomai

On Fri, Sep 11, 2009 at 4:03 PM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
> Stephen Sinclair wrote:
>> Hello,
>>
>> I am trying to install Xenomai.  After patching the kernel (I have
>> tried with 2.6.29.5 and 2.6.30.5), I get the following error message:
>>
>>
>> $ make
>> scripts/kconfig/conf -s arch/x86/Kconfig
>>   CHK     include/linux/version.h
>>   CHK     include/linux/utsrelease.h
>>   SYMLINK include/asm -> include/asm-x86
>>   CC      arch/x86/kernel/asm-offsets.s
>> In file included from include/linux/sched.h:62,
>>                  from arch/x86/kernel/asm-offsets_64.c:8,
>>                  from arch/x86/kernel/asm-offsets.c:4:
>> include/linux/ipipe.h:76:2: error: #error "CONFIG_NR_CPUS is too
>> large, please lower it."
>> make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
>> make: *** [prepare0] Error 2
>>
>>
>> The CONFIG_NR_CPUS config variable is set to the default 64, but I
>> still get this error if I lower it to 4 or 2.  (This is a dual-core
>> machine, AMD X2.)
>>
>> I tried commenting-out this error, just to see what would happen, but
>> I get an oops on boot.  Setting the boot flag earlyprintk=vga shows a
>> backtrace, and the crash happens immediately after
>> __ipipe_enable_irqdesc, which is in ipipe_virtualize_irq.
>>
>> I don't know how to proceed from here, does anyone know why
>> CONFIG_NR_CPUS is triggering this error?
>
> Could you post the .config that fails to build?
>
> Yeah, there is a limitation, normally 96 (IIRC). 2 or 4 CPUs is
> definitely far below it.
>
> Jan

Hello,

I finally had the time to investigate more and traced back the error
to a variable related to the number of IRQs on the system.  I should
have previously mentioned that this is a 64-bit system by the way, so
I found several related #ifdefs in irq_vector.h and apicnum.h.

Anyways, I got the kernel to compile properly after disabling the flag
CONFIG_SPARSE_IRQ.  This made the CONFIG_NR_CPUS error go away, even
after setting it back to 64.  Also, it booted successfully, so I am on
to the next stage of my project.

Although, admittedly I have no idea what the potential consequences of
turning off CONFIG_SPARSE_IRQ could be.

thanks,
Steve


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-help] CONFIG_NR_CPUS is too large
  2009-09-17 17:41   ` Stephen Sinclair
@ 2010-01-28 16:20     ` Brian Zenowich
  2010-01-29 20:47       ` Philippe Gerum
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Zenowich @ 2010-01-28 16:20 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 978 bytes --]

Hello,

I am trying to install Xenomai on Ubuntu 9.10 Karmic (2.6.31 + Ubuntu
patches) for x86-32. The adeos-ipipe-2.6.31.8-x86-2.4-09.patch included
with xenomai-2.5.0 only had one failed chunk in process_32.c- and it
just an #ifndef CONFIG_IPIPE block, which seems irrelevant since
CONFIG_IPIPE *will* be defined.

I get the "CONFIG_NR_CPUS is too large, please lower it." error when
making the kernel. As others have found, lowering CONFIG_NR_CPUS has no
effect, and CONFIG_SPARSE_IRQ=n causes the "per_cpu__irq_stack_union"
error.

So, at this point I am stuck. Jan says "Removing this limitation is on
our agenda.", but is there any workaround in the meantime? Has anyone
managed to get Xenomai working by starting with the Ubuntu Karmic kernel
source? If so, how?

Config attached.

Thanks,

-- 
Brian Zenowich <bz@domain.hid>
Robotics Engineer @ Barrett Technology, Inc.
625 Mount Auburn Street, Cambridge, MA 02138, USA
Tel: 617-252-9000 x38
Web: http://www.barrett.com

[-- Attachment #2: .config --]
[-- Type: application/x-extension-config, Size: 113585 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-help] CONFIG_NR_CPUS is too large
  2010-01-28 16:20     ` Brian Zenowich
@ 2010-01-29 20:47       ` Philippe Gerum
  0 siblings, 0 replies; 5+ messages in thread
From: Philippe Gerum @ 2010-01-29 20:47 UTC (permalink / raw)
  To: Brian Zenowich; +Cc: xenomai

On Thu, 2010-01-28 at 11:20 -0500, Brian Zenowich wrote:
> Hello,
> 
> I am trying to install Xenomai on Ubuntu 9.10 Karmic (2.6.31 + Ubuntu
> patches) for x86-32. The adeos-ipipe-2.6.31.8-x86-2.4-09.patch included
> with xenomai-2.5.0 only had one failed chunk in process_32.c- and it
> just an #ifndef CONFIG_IPIPE block, which seems irrelevant since
> CONFIG_IPIPE *will* be defined.
> 
> I get the "CONFIG_NR_CPUS is too large, please lower it." error when
> making the kernel. As others have found, lowering CONFIG_NR_CPUS has no
> effect, and CONFIG_SPARSE_IRQ=n causes the "per_cpu__irq_stack_union"
> error.

This one is likely due to CONFIG_CC_STACKPROTECTOR. This is not yet
supported by Xenomai in 32bit mode (only 64 for now). Try disabling it;
that should work.

> 
> So, at this point I am stuck. Jan says "Removing this limitation is on
> our agenda.", but is there any workaround in the meantime? Has anyone
> managed to get Xenomai working by starting with the Ubuntu Karmic kernel
> source? If so, how?
> 
> Config attached.
> 
> Thanks,
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help


-- 
Philippe.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-01-29 20:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 19:01 [Xenomai-help] CONFIG_NR_CPUS is too large Stephen Sinclair
2009-09-11 20:03 ` Jan Kiszka
2009-09-17 17:41   ` Stephen Sinclair
2010-01-28 16:20     ` Brian Zenowich
2010-01-29 20:47       ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.