From: haojian.zhuang@gmail.com (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/7] ARM: mmp: parse irq from DT
Date: Mon, 1 Aug 2011 22:42:04 +0800 [thread overview]
Message-ID: <CAN1soZwSiEojxC6uBAGYdUxJKPA2X+360ZsLEMyeUcBKdBn_SA@mail.gmail.com> (raw)
In-Reply-To: <20110801141036.GA21627@ponder.secretlab.ca>
On Mon, Aug 1, 2011 at 10:10 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Mon, Aug 01, 2011 at 10:47:06AM +0800, Haojian Zhuang wrote:
>> On Sat, Jul 30, 2011 at 12:36 AM, Grant Likely
>> <grant.likely@secretlab.ca> wrote:
>> >> diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
>> >> index ec8d65d..1c563c2 100644
>> >> --- a/arch/arm/mach-mmp/common.h
>> >> +++ b/arch/arm/mach-mmp/common.h
>> >> @@ -6,3 +6,4 @@ extern void timer_init(int irq);
>> >>
>> >> ?extern void __init icu_init_irq(void);
>> >> ?extern void __init mmp_map_io(void);
>> >> +extern void __init mmp_init_intc(void);
>> >> diff --git a/arch/arm/mach-mmp/include/mach/irqs.h b/arch/arm/mach-mmp/include/mach/irqs.h
>> >> index a09d328..65ec176 100644
>> >> --- a/arch/arm/mach-mmp/include/mach/irqs.h
>> >> +++ b/arch/arm/mach-mmp/include/mach/irqs.h
>> >> @@ -224,6 +224,6 @@
>> >>
>> >> ?#define IRQ_BOARD_START ? ? ? ? ? ? ? ? ? ? ?(IRQ_GPIO_START + IRQ_GPIO_NUM)
>> >>
>> >> -#define NR_IRQS ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(IRQ_BOARD_START)
>> >> +#define NR_IRQS ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?0
>> >
>> > Why is NR_IRQs getting changed? ?I think this will break
>> > !CONFIG_SPARSE_IRQS, and it shouldn't be necessary for this
>> > conversion.
>> >
>> If CONFIG_SPARSE_IRQ is enabled, arch_probe_nr_irqs() returns NR_IRQS in arm.
>> It results registering NR_IRQS in early_irq_init(). If NR_IRQS is 200,
>> 200 irqs are
>> registered in early_irq_init(). It's not my requirement. What I need
>> is registering irq
>> from DT.
>>
>> So I have to define NR_IRQS to 0. And CONFIG_SPARSE_IRQS is always enabled
>> in ARCH_MMP. So it's selected in Kconfig by default.
>
> My point is, that applying this patch will break anyone depending on
> non-DT mach-mmp support. ?I'm completely fine with you doing so, but
> you need to be extra careful that it is done in a bisectable way. ?At
> no point in the commit series should the kernel be unable to build a
> working mmp image.
>
> g.
>
>
Since .nr_irqs property is assigned in machine descriptor of brownstone.c or
ttc_dkb.c, nr_irqs equals to machine_desc->nr_irqs (arch/arm/kernel/irq.c).
Even NR_IRQS is defined as 0, machine_desc->nr_irqs can help us to
pre-allocate irq numbers while CONFIG_OF isn't defined.
So it's not an issue in ARCH_MMP. And I tested it that everything is well.
Thanks
Haojian
next prev parent reply other threads:[~2011-08-01 14:42 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 6:41 [PATCH v2 00/07] enable devicetree on arch-mmp Haojian Zhuang
2011-07-28 6:41 ` [PATCH v2 1/7] ARM: mmp: parse irq from DT Haojian Zhuang
2011-07-28 6:41 ` [PATCH v2 2/7] ARM: mmp: parse timer configuration " Haojian Zhuang
2011-07-28 6:41 ` [PATCH v2 3/7] ARM: mmp: support DT on both dkb and brownstone Haojian Zhuang
2011-07-28 6:41 ` [PATCH v2 4/7] tty: serial: support device tree in pxa Haojian Zhuang
2011-07-28 6:41 ` [PATCH v2 5/7] tty: serial: check ops before registering console Haojian Zhuang
2011-07-28 6:41 ` [PATCH v2 6/7] i2c: pxa: support i2c controller from DT Haojian Zhuang
2011-07-28 6:41 ` [PATCH v2 7/7] i2c: pxa: support to parse property Haojian Zhuang
2011-07-29 16:52 ` [PATCH v2 6/7] i2c: pxa: support i2c controller from DT Grant Likely
2011-07-29 16:55 ` Russell King - ARM Linux
2011-07-30 14:29 ` Mitch Bradley
2011-07-30 15:37 ` Russell King - ARM Linux
2011-07-31 0:38 ` Grant Likely
2011-07-29 16:45 ` [PATCH v2 4/7] tty: serial: support device tree in pxa Grant Likely
2011-07-29 16:49 ` Russell King - ARM Linux
2011-07-29 16:53 ` Grant Likely
2011-08-01 2:50 ` Haojian Zhuang
2011-08-01 8:27 ` Russell King - ARM Linux
2011-07-29 16:42 ` [PATCH v2 3/7] ARM: mmp: support DT on both dkb and brownstone Grant Likely
2011-08-01 2:48 ` Haojian Zhuang
2011-07-29 16:40 ` [PATCH v2 2/7] ARM: mmp: parse timer configuration from DT Grant Likely
2011-07-29 16:36 ` [PATCH v2 1/7] ARM: mmp: parse irq " Grant Likely
2011-08-01 2:47 ` Haojian Zhuang
2011-08-01 14:10 ` Grant Likely
2011-08-01 14:42 ` Haojian Zhuang [this message]
2011-08-01 14:43 ` Grant Likely
2011-08-01 8:26 ` Russell King - ARM Linux
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=CAN1soZwSiEojxC6uBAGYdUxJKPA2X+360ZsLEMyeUcBKdBn_SA@mail.gmail.com \
--to=haojian.zhuang@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).