All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wang, Baojun" <wangbj@lzu.edu.cn>
To: linux-mips@linux-mips.org
Subject: irq hande default_startup qestion
Date: Thu, 12 Jun 2008 17:42:54 +0800	[thread overview]
Message-ID: <1213263774.31495.9.camel@localhost.dslab> (raw)

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

hi, list:

I have a question about default_startup() in kernel/irq/chip.c:

/*
 * default startup function
 */
static unsigned int default_startup(unsigned int irq)
{
        irq_desc[irq].chip->enable(irq);

        return 0;
}

By default, default_startup will call irq_chip->enable(), but some
drivers like i8259A, in arch/mips/kenrel/i8259.c:

static struct irq_chip i8259A_chip = {
        .name           = "XT-PIC",
        .mask           = disable_8259A_irq,
        .disable        = disable_8259A_irq,
        .unmask         = enable_8259A_irq,
        .mask_ack       = mask_and_ack_8259A,
#ifdef CONFIG_MIPS_MT_SMTC_IRQAFF
        .set_affinity   = plat_set_irq_affinity,
#endif /* CONFIG_MIPS_MT_SMTC_IRQAFF */
};

which don't initialize irq_chip->enable, in some (probably rare) case
when irq_chip->startup() get called, it will cause NULL pointer
reference. is it OK to change i8259A_chip (add .enable =
xxx_unmask, .disable = xxx_mask) or just change default_startup()
function? (irq_desc[irq].chip->unmask() or so?)

  Regards,
Wang

-- 
Wang, Baojun                                                Lanzhou University
Distributed & Embedded System Lab                      http://dslab.lzu.edu.cn
School of Information Science and Engeneering          wangbj@dslab.lzu.edu.cn
Tianshui South Road 222. Lanzhou 730000                             .P.R.China
Tel: +86-931-8912025                                      Fax: +86-931-8912022


[-- Attachment #2: 这是信件的数字签名部分 --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

                 reply	other threads:[~2008-06-12  9:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1213263774.31495.9.camel@localhost.dslab \
    --to=wangbj@lzu.edu.cn \
    --cc=linux-mips@linux-mips.org \
    --cc=wangbj@dslab.lzu.edu.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.