From: Shawn Lin <shawn.lin@rock-chips.com>
To: Marc Zyngier <marc.zyngier@arm.com>, Bjorn Helgaas <bhelgaas@google.com>
Cc: shawn.lin@rock-chips.com, linux-pci@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
Heiko Stuebner <heiko@sntech.de>,
Doug Anderson <dianders@chromium.org>,
Wenrui Li <wenrui.li@rock-chips.com>,
Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org,
Brian Norris <briannorris@chromium.org>
Subject: Re: [PATCH v4 2/2] PCI: Rockchip: Add Rockchip PCIe controller support
Date: Tue, 5 Jul 2016 10:08:08 +0800 [thread overview]
Message-ID: <dcb37af0-89c5-ec37-5ace-7e4df61724a5@rock-chips.com> (raw)
In-Reply-To: <577646D3.7040207@arm.com>
在 2016/7/1 18:32, Marc Zyngier 写道:
> On 01/07/16 02:24, Shawn Lin wrote:
>> This patch adds Rockchip PCIe controller support found
>> on RK3399 Soc platform.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>>
>> ---
>
> [...]
>
>> +static void rockchip_pcie_legacy_int_handler(struct irq_desc *desc)
>> +{
>> + struct irq_chip *chip = irq_desc_get_chip(desc);
>> + struct rockchip_pcie_port *port;
>> + u32 reg;
>> +
>> + chained_irq_enter(chip, desc);
>> + port = irq_desc_get_handler_data(desc);
>> +
>> + reg = pcie_read(port, PCIE_CLIENT_INT_STATUS);
>> + reg = (reg & ROCKCHIP_PCIE_RPIFR1_INTR_MASK) >>
>> + ROCKCHIP_PCIE_RPIFR1_INTR_SHIFT;
>> + if (reg)
>> + generic_handle_irq(irq_find_mapping(port->irq_domain,
>> + ffs(reg)));
>
> Can't you get multiple pending interrupts at the same time? Here, you
> seem to only process one interrupt at a time, which is going to be
> pretty inefficient.
>
Yup, will fix it, thanks.
> How about something like:
>
> while (reg) {
> int hwirq = ffs(reg);
> int irq;
>
> reg &= ~BIT(hwirq);
> irq = irq_find_mapping(port->irq_domain, hwirq);
> if (irq)
> generic_handle_irq(irq);
> }
>
>> + chained_irq_exit(chip, desc);
>> +}
>> +
>
> Thanks,
>
> M.
>
--
Best Regards
Shawn Lin
next prev parent reply other threads:[~2016-07-05 2:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 1:24 [PATCH v4 1/2] Documentation: bindings: add dt doc for Rockchip PCIe controller Shawn Lin
2016-07-01 1:24 ` [PATCH v4 2/2] PCI: Rockchip: Add Rockchip PCIe controller support Shawn Lin
2016-07-01 10:32 ` Marc Zyngier
2016-07-05 2:08 ` Shawn Lin [this message]
2016-07-01 13:01 ` [PATCH v4 1/2] Documentation: bindings: add dt doc for Rockchip PCIe controller Marc Zyngier
2016-07-02 2:25 ` Brian Norris
2016-07-02 9:20 ` Marc Zyngier
2016-07-05 2:07 ` Shawn Lin
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=dcb37af0-89c5-ec37-5ace-7e4df61724a5@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=briannorris@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=heiko@sntech.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=marc.zyngier@arm.com \
--cc=robh+dt@kernel.org \
--cc=wenrui.li@rock-chips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®