Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: kernel/irq/irqdesc.c:206:2: error: array index in initializer exceeds array bounds

22 views
Skip to first unread message

Thomas Gleixner

unread,
Feb 28, 2016, 4:40:07 AM2/28/16
to
On Sun, 28 Feb 2016, kbuild test robot wrote:
> Hi Thomas,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 691429e13dfaf5b0994b07cc166db41bd608ee3d
> commit: 3795de236d67a05994a1a12759db9d4dd9ffc42c genirq: Distangle kernel/irq/handle.c
> date: 5 years ago
> config: m68k-alldefconfig (attached as .config)
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 3795de236d67a05994a1a12759db9d4dd9ffc42c
> # save the attached .config to linux build tree
> make.cross ARCH=m68k

Again. This commit is just moving code into seperate files without changing
the code. So it's not a new wreckage.

> All errors (new ones prefixed by >>):
>
> In file included from include/linux/irqnr.h:10:0,
> from include/linux/irq.h:22,
> from kernel/irq/irqdesc.c:10:
> arch/m68k/include/asm/irq.h:25:17: error: expected identifier or '(' before numeric constant
> #define NR_IRQS 0
> ^

NR_IRQS = 0 and CONFIG_SPARSE_IRQ=n is bogus. That alldefconfig of m68k is
broken. Cc'ed m68 folks

Thanks,

tglx

Geert Uytterhoeven

unread,
Feb 28, 2016, 5:00:09 AM2/28/16
to
No idea where this "alldefconfig" is coming from (it contains "2.6.36-rc5").
Is this an MMU=y allnoconfig?
It doesn't enable any platforms, which is not supported, and thus it isn't
known how many interrupts are needed.

BTW, I have a local fix to change NR_IRQS to 1 in that case, but that's
far from sufficient to build an MMU=y allnoconfig kernel.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Thomas Gleixner

unread,
Feb 28, 2016, 5:40:06 AM2/28/16
to
# make alldefconfig

That's one of the targets for 68k. And yes, it has MMU=y

> It doesn't enable any platforms, which is not supported, and thus it isn't
> known how many interrupts are needed.
>
> BTW, I have a local fix to change NR_IRQS to 1 in that case, but that's
> far from sufficient to build an MMU=y allnoconfig kernel.

Yeah. NR_IRQS=1 is lame.

Thanks,

tglx

Geert Uytterhoeven

unread,
Feb 28, 2016, 5:50:07 AM2/28/16
to
On Sun, Feb 28, 2016 at 11:33 AM, Thomas Gleixner <tg...@linutronix.de> wrote:
> On Sun, 28 Feb 2016, Geert Uytterhoeven wrote:
>> On Sun, Feb 28, 2016 at 10:32 AM, Thomas Gleixner <tg...@linutronix.de> wrote:
>> > On Sun, 28 Feb 2016, kbuild test robot wrote:
>> >> FYI, the error/warning still remains.
>> >>
>> >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> >> head: 691429e13dfaf5b0994b07cc166db41bd608ee3d
>> >> commit: 3795de236d67a05994a1a12759db9d4dd9ffc42c genirq: Distangle kernel/irq/handle.c
>> >> date: 5 years ago
>> >> config: m68k-alldefconfig (attached as .config)

>> > NR_IRQS = 0 and CONFIG_SPARSE_IRQ=n is bogus. That alldefconfig of m68k is
>> > broken. Cc'ed m68 folks
>>
>> No idea where this "alldefconfig" is coming from (it contains "2.6.36-rc5").
>> Is this an MMU=y allnoconfig?
>
> # make alldefconfig
>
> That's one of the targets for 68k. And yes, it has MMU=y

Doh, one is never too old to learn...

This is the first time someone ever complains to me about alldefconfig ;-)

Geert Uytterhoeven

unread,
Mar 8, 2016, 3:50:07 AM3/8/16
to
On Tue, Mar 8, 2016 at 9:38 AM, kbuild test robot
<fenggu...@intel.com> wrote:
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: e2857b8f11a289ed2b61d18d0665e05c1053c446
> commit: 3795de236d67a05994a1a12759db9d4dd9ffc42c genirq: Distangle kernel/irq/handle.c
> date: 5 years ago
> config: m68k-alldefconfig (attached as .config)
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 3795de236d67a05994a1a12759db9d4dd9ffc42c
> # save the attached .config to linux build tree
> make.cross ARCH=m68k
>
> All errors (new ones prefixed by >>):
>
> In file included from include/linux/irqnr.h:10:0,
> from include/linux/irq.h:22,
> from kernel/irq/irqdesc.c:10:
> arch/m68k/include/asm/irq.h:25:17: error: expected identifier or '(' before numeric constant
> #define NR_IRQS 0
> ^
> include/linux/irqnr.h:15:19: note: in expansion of macro 'NR_IRQS'
> #define nr_irqs NR_IRQS
> ^
> kernel/irq/irqdesc.c:36:5: note: in expansion of macro 'nr_irqs'
> int nr_irqs = NR_IRQS;
> ^
>>> kernel/irq/irqdesc.c:206:2: error: array index in initializer exceeds array bounds
> [0 ... NR_IRQS-1] = {
> ^

Same comment as before: thou shall not compile kernels for m68k without
selecting any platform support.

Thomas Gleixner

unread,
Mar 8, 2016, 4:20:06 AM3/8/16
to
On Tue, 8 Mar 2016, kbuild test robot wrote:

> Hi Thomas,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: e2857b8f11a289ed2b61d18d0665e05c1053c446
> commit: 3795de236d67a05994a1a12759db9d4dd9ffc42c genirq: Distangle kernel/irq/handle.c
> date: 5 years ago
> config: m68k-alldefconfig (attached as .config)
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 3795de236d67a05994a1a12759db9d4dd9ffc42c
> # save the attached .config to linux build tree
> make.cross ARCH=m68k
>
> All errors (new ones prefixed by >>):
>
> In file included from include/linux/irqnr.h:10:0,
> from include/linux/irq.h:22,
> from kernel/irq/irqdesc.c:10:
> arch/m68k/include/asm/irq.h:25:17: error: expected identifier or '(' before numeric constant
> #define NR_IRQS 0

As I explained before. That's not a genirq issue. It's broken in m68k and
Geert already knows about it.

Thanks,

tglx

Ingo Molnar

unread,
Mar 8, 2016, 4:30:06 AM3/8/16
to
That should be enforced at the Kconfig level.

Thanks,

Ingo

Geert Uytterhoeven

unread,
Mar 8, 2016, 5:20:10 AM3/8/16
to
Hi Ingo,

On Tue, Mar 8, 2016 at 10:21 AM, Ingo Molnar <mi...@kernel.org> wrote:
>> Same comment as before: thou shall not compile kernels for m68k without
>> selecting any platform support.
>
> That should be enforced at the Kconfig level.

I'm fully aware of that ;-)

Unfortunately it's not trivial.
How do you enforce that at least one option from a list of options is enabled?

M68k (with MMU) supports three distinct classes of machines:
1. Coldfire (with Coldfire MMU)
2. Sun-3 (with Sun-3 MMU)
3. Rest (with classic Motorola MMU)

Class 3 contains multiple machine types (cfr. top of arch/m68k/Kconfig.machine)
and at least one of them must be selected.
So far everything I tried conflicted with enforcing the 3 distinct classes.

For nommu, it's simpler, as you can typically support a single platform only,
due to the different platforms (usually) having RAM at different addresses.

Suggestions are welcome....

Thomas Gleixner

unread,
Mar 14, 2016, 4:00:06 AM3/14/16
to
Fenguang,

On Mon, 14 Mar 2016, kbuild test robot wrote:

> Hi Thomas,
>
> FYI, the error/warning still remains.

> make.cross ARCH=m68k

> arch/m68k/include/asm/irq.h:25:17: error: expected identifier or '(' before numeric constant
> #define NR_IRQS 0
> ^

Why do you insist on pestering me about that m86k problem? I explained you 3
times now, that it's not a genirq core issue.

Thanks,

tglx

Fengguang Wu

unread,
Mar 14, 2016, 7:00:05 AM3/14/16
to
Hi Thomas,
Sorry, I'll blacklist this error!

Thanks,
Fengguang
0 new messages