linux-mips
[Top] [All Lists]

Re: Strange initialization in arch/mips/kernel/smtc.c:1094?

To: Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: Strange initialization in arch/mips/kernel/smtc.c:1094?
From: "Kevin D. Kissell" <kevink@paralogos.com>
Date: Mon, 09 Feb 2009 05:57:28 -0600
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <200902092149.16573.rusty@rustcorp.com.au>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <200902092149.16573.rusty@rustcorp.com.au>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)
Rusty Russell wrote:
Latest Linus kernel, but it's been there a while:

static struct irqaction irq_ipi = {
        .handler        = ipi_interrupt,
        .flags          = IRQF_DISABLED,
        .name           = "SMTC_IPI",
        .flags          = IRQF_PERCPU
};

.flags is initialized twice: I'm amazed this even compiles.
I don't know where that came from. The very earliest versions of smtc.c didn't have a declaration initialization at all, but filled the fields in setup_cross_vpe_interrupts(). The IRQ was PERCPU since day one. The initial DISABLED state came later. I'm guessing someone added that hastily and didn't notice the pre-existing .flags definition. I'm curious as to which bit(s) are actually set.

         Regards,

         Kevin K.

<Prev in Thread] Current Thread [Next in Thread>