From: Ralf Baechle <ralf@linux-mips.org>
To: "\"陈华才\"" <chenhc@lemote.com>
Cc: John Crispin <john@phrozen.org>,
"Steven J. Hill" <steven.hill@imgtec.com>,
Aurelien Jarno <aurelien@aurel32.net>,
linux-mips@linux-mips.org, Fuxin Zhang <zhangfx@lemote.com>,
Zhangjin Wu <wuzhangjin@gmail.com>,
Hongliang Tao <taohl@lemote.com>, Hua Yan <yanh@lemote.com>
Subject: Re: [PATCH V19 07/13] MIPS: Loongson 3: Add IRQ init and dispatch support
Date: Wed, 19 Mar 2014 17:49:36 +0100 [thread overview]
Message-ID: <20140319164936.GB4365@linux-mips.org> (raw)
In-Reply-To: <f863ed85ae872f0e3f7b00fb485ed457.squirrel@mail.lemote.com>
On Wed, Mar 19, 2014 at 11:05:34AM +0800, "陈华才" wrote:
> >> +{
> >> + unsigned int i, irq;
> >> + unsigned int ht_irq[] = {1, 3, 4, 5, 6, 7, 8, 12, 14, 15};
> >> +
> >> + irq = LOONGSON_HT1_INT_VECTOR(0);
> >> + LOONGSON_HT1_INT_VECTOR(0) = irq; /* Acknowledge the IRQs */
> >> +
> >> + for (i = 0; i < ARRAY_SIZE(ht_irq); i++) {
> >> + if (irq & (0x1 << ht_irq[i]))
> >> + do_IRQ(ht_irq[i]);
> >> + }
> >> +}
> >
> > Ouch.
> >
> > Initializing an array like this in C will generate code which at runtime
> > initializes the ht_irq[] array each time ht_irqdispatch is invoked
> > and slowing this function to a crawl.
> >
> > You want to make either move the definition of this array out of the
> > function body or make it "static const unsigned int ht_irq[] ..." to
> > avoid this.
> Since there are several patches have problem, and the first one is
> merged, I will send a V20 patchset without the first one ASAP.
Great. I'll then drop V19 from patchwork.
Thanks,
Ralf
next prev parent reply other threads:[~2014-03-19 16:49 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-16 8:01 [PATCH V19 00/13] MIPS: Add Loongson-3 based machines support Huacai Chen
2014-02-16 8:01 ` [PATCH V19 01/13] MIPS: Loongson: Rename PRID_IMP_LOONGSON1 and PRID_IMP_LOONGSON2 Huacai Chen
2014-03-18 12:13 ` Ralf Baechle
2014-02-16 8:01 ` [PATCH V19 02/13] MIPS: Loongson: Add basic Loongson-3 definition Huacai Chen
2014-03-18 14:04 ` Ralf Baechle
2014-03-19 1:14 ` "陈华才"
2014-02-16 8:01 ` [PATCH V19 03/13] MIPS: Loongson: Add basic Loongson-3 CPU support Huacai Chen
2014-03-18 14:05 ` Ralf Baechle
2014-02-16 8:01 ` [PATCH V19 04/13] MIPS: Loongson 3: Add Lemote-3A machtypes definition Huacai Chen
2014-02-16 8:01 ` [PATCH V19 05/13] MIPS: Loongson: Add UEFI-like firmware interface (LEFI) support Huacai Chen
2014-02-16 21:12 ` Aurelien Jarno
2014-02-17 5:15 ` "陈华才"
2014-02-16 8:01 ` [PATCH V19 06/13] MIPS: Loongson 3: Add HT-linked PCI support Huacai Chen
2014-02-16 8:01 ` [PATCH V19 07/13] MIPS: Loongson 3: Add IRQ init and dispatch support Huacai Chen
2014-03-18 14:59 ` Ralf Baechle
2014-03-19 3:05 ` "陈华才"
2014-03-19 16:49 ` Ralf Baechle [this message]
2014-02-16 8:01 ` [PATCH V19 08/13] MIPS: Loongson 3: Add serial port support Huacai Chen
2014-02-16 8:01 ` [PATCH V19 09/13] MIPS: Loongson: Add swiotlb to support All-Memory DMA Huacai Chen
2014-02-16 21:12 ` Aurelien Jarno
2014-02-17 5:41 ` "陈华才"
2014-02-19 21:39 ` Aurelien Jarno
2014-02-20 1:00 ` "陈华才"
2014-02-16 8:01 ` [PATCH V19 10/13] MIPS: Loongson: Add Loongson-3 Kconfig options Huacai Chen
2014-02-16 8:01 ` [PATCH V19 11/13] MIPS: Loongson 3: Add Loongson-3 SMP support Huacai Chen
2014-03-18 15:52 ` Ralf Baechle
2014-02-16 8:01 ` [PATCH V19 12/13] MIPS: Loongson 3: Add CPU hotplug support Huacai Chen
2014-03-18 17:20 ` Ralf Baechle
2014-02-16 8:01 ` [PATCH V19 13/13] MIPS: Loongson: Add a Loongson-3 default config file Huacai Chen
2014-02-16 22:26 ` [PATCH V19 00/13] MIPS: Add Loongson-3 based machines support Andreas Barth
2014-03-06 10:30 ` Andreas Barth
2014-03-06 13:22 ` Huacai Chen
[not found] ` <532076A7.1040606@phrozen.org>
2014-03-12 23:31 ` Andreas Barth
2014-03-12 17:21 ` Aurelien Jarno
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=20140319164936.GB4365@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=aurelien@aurel32.net \
--cc=chenhc@lemote.com \
--cc=john@phrozen.org \
--cc=linux-mips@linux-mips.org \
--cc=steven.hill@imgtec.com \
--cc=taohl@lemote.com \
--cc=wuzhangjin@gmail.com \
--cc=yanh@lemote.com \
--cc=zhangfx@lemote.com \
/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.