Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1444124
| From | Wan ZongShun <mcuos.com@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 |
| Date | 2016-07-15 11:50 +0200 |
| Message-ID | <rV7UR-5ff-5@gated-at.bofh.it> (permalink) |
| References | <rThlD-5X6-3@gated-at.bofh.it> <rUPlf-1Xp-7@gated-at.bofh.it> <rV3Hz-2Ms-3@gated-at.bofh.it> <rV5q1-3U6-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
2016-07-15 15:00 GMT+08:00 Arnd Bergmann <arnd@arndb.de>:
> On Friday, July 15, 2016 1:15:58 PM CEST Wan Zongshun wrote:
>>
>> Actually, I have two choice to implement this function:
>>
>> option1:
>>
>> void __exception_irq_entry aic_handle_irq(struct pt_regs *regs)
>> {
>> u32 hwirq;
>>
>> (void)readl(aic_base + REG_AIC_IPER);
>> hwirq = readl(aic_base + REG_AIC_ISNR);
>>
>> handle_IRQ((irq_find_mapping(aic_domain, hwirq)), regs);
>> }
>
> (side note: I think you want handle_domain_irq())
>
>> option2:
>>
>> void __exception_irq_entry aic_handle_irq(struct pt_regs *regs)
>> {
>> u32 hwirq;
>>
>> hwirq = readl(aic_base + REG_AIC_IPER);
>> hwirq <<= 2;
>>
>> handle_IRQ((irq_find_mapping(aic_domain, hwirq)), regs);
>> }
>>
>> Though the option2 do shift for hwirq, but it seems better than do io
>> operation by readl,so I prefer to option2, agree?
>
> That will only return an irq number that is a multiple of four, which
> seems wrong since the numbers are not that. Did you mean to write
>
> hwirq = ilog2(hwirq); ?
Sorry, my fault, I mean hwirq >>= 2, bit[7:2] indicates which irq is triggering.
so I have to do right shift 2 for IPER value.
>
> That assumes that REG_AIC_IPER contains a 32-bit value with one single
> bit set to indicate which IRQ was triggered.
>
> If the difference is only in performance, you could try measuring which
> of the two ends up being faster.
It seems hard to measure. I think Do IO operation should be slower
than shift 2. :)
>
> Arnd
--
---
Vincent Wan(Zongshun)
www.mcuos.com
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/10] ARM: NUC900: Add NUC970 SoC support Wan Zongshun <vw@iommu.org> - 2016-07-10 09:30 +0200
[PATCH v2 01/10] ARM: NUC900: Add nuc970 machine support Wan Zongshun <vw@iommu.org> - 2016-07-10 09:30 +0200
Re: [PATCH v2 01/10] ARM: NUC900: Add nuc970 machine support Arnd Bergmann <arnd@arndb.de> - 2016-07-11 00:10 +0200
Re: [PATCH v2 01/10] ARM: NUC900: Add nuc970 machine support Arnd Bergmann <arnd@arndb.de> - 2016-07-11 18:10 +0200
Re: [PATCH v2 01/10] ARM: NUC900: Add nuc970 machine support Wan Zongshun <vw@iommu.org> - 2016-07-12 06:40 +0200
Re: [PATCH v2 01/10] ARM: NUC900: Add nuc970 machine support Wan Zongshun <vw@iommu.org> - 2016-07-12 09:20 +0200
Re: [PATCH v2 01/10] ARM: NUC900: Add nuc970 machine support Arnd Bergmann <arnd@arndb.de> - 2016-07-12 10:30 +0200
[PATCH v2 03/10] Clocksource: add nuc970 clocksource driver Wan Zongshun <vw@iommu.org> - 2016-07-10 09:30 +0200
Re: [PATCH v2 03/10] Clocksource: add nuc970 clocksource driver Arnd Bergmann <arnd@arndb.de> - 2016-07-11 17:40 +0200
Re: [PATCH v2 03/10] Clocksource: add nuc970 clocksource driver Wan Zongshun <vw@iommu.org> - 2016-07-12 09:40 +0200
Re: [PATCH v2 03/10] Clocksource: add nuc970 clocksource driver Arnd Bergmann <arnd@arndb.de> - 2016-07-12 10:30 +0200
Re: [PATCH v2 03/10] Clocksource: add nuc970 clocksource driver Arnd Bergmann <arnd@arndb.de> - 2016-07-21 15:00 +0200
Re: [PATCH v2 03/10] Clocksource: add nuc970 clocksource driver Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-07-21 15:00 +0200
[PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Wan Zongshun <vw@iommu.org> - 2016-07-10 09:30 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-07-11 00:00 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Wan Zongshun <vw@iommu.org> - 2016-07-11 04:20 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Arnd Bergmann <arnd@arndb.de> - 2016-07-11 17:50 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Wan Zongshun <vw@iommu.org> - 2016-07-12 09:10 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Arnd Bergmann <arnd@arndb.de> - 2016-07-12 10:30 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Wan Zongshun <vw@iommu.org> - 2016-07-14 11:00 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Arnd Bergmann <arnd@arndb.de> - 2016-07-14 13:20 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Jason Cooper <jason@lakedaemon.net> - 2016-07-13 22:10 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Wan Zongshun <vw@iommu.org> - 2016-07-14 05:40 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Jason Cooper <jason@lakedaemon.net> - 2016-07-14 16:00 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Wan Zongshun <vw@iommu.org> - 2016-07-15 07:20 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Arnd Bergmann <arnd@arndb.de> - 2016-07-15 09:10 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Wan ZongShun <mcuos.com@gmail.com> - 2016-07-15 11:50 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Jason Cooper <jason@lakedaemon.net> - 2016-07-15 17:50 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Arnd Bergmann <arnd@arndb.de> - 2016-07-21 13:00 +0200
Re: [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Jason Cooper <jason@lakedaemon.net> - 2016-07-21 20:50 +0200
Re: [PATCH v2 04/10] clk: add Clock driver for nuc970 Michael Turquette <mturquette@baylibre.com> - 2016-07-12 00:20 +0200
csiph-web