mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>,
	bhelgaas@google.com, paul.gortmaker@windriver.com,
	robh@kernel.org, colin.king@canonical.com,
	linux-pci@vger.kernel.org
Cc: michal.simek@xilinx.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, rgummal@xilinx.com, arnd@arndb.de,
	Bharat Kumar Gogada <bharatku@xilinx.com>
Subject: Re: [PATCH 1/4] PCI: Xilinx NWL: Fix, do not check for legacy status in while loop
Date: Mon, 23 Jan 2017 18:23:17 +0000	[thread overview]
Message-ID: <ec10b089-acc5-7764-6346-9dc1869d05c7@arm.com> (raw)
In-Reply-To: <1484997072-19276-1-git-send-email-bharatku@xilinx.com>

On 21/01/17 11:11, Bharat Kumar Gogada wrote:
> - The legacy status register value for particular INTx becomes low
> only after DEASSERT_INTx is received.
> - Few End Points take time for sending DEASSERT_INTx, checking
> legacy status register in while loop causes invoking of EP
> handler continuosly until DEASSERT_INTx is received.
> 
> Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
> ---
>  drivers/pci/host/pcie-xilinx-nwl.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c
> index 43eaa4a..c8b5a33 100644
> --- a/drivers/pci/host/pcie-xilinx-nwl.c
> +++ b/drivers/pci/host/pcie-xilinx-nwl.c
> @@ -342,9 +342,10 @@ static void nwl_pcie_leg_handler(struct irq_desc *desc)
>  
>  	chained_irq_enter(chip, desc);
>  	pcie = irq_desc_get_handler_data(desc);
> +	status = nwl_bridge_readl(pcie, MSGF_LEG_STATUS) &
> +				  MSGF_LEG_SR_MASKALL;
>  
> -	while ((status = nwl_bridge_readl(pcie, MSGF_LEG_STATUS) &
> -				MSGF_LEG_SR_MASKALL) != 0) {
> +	if (status != 0) {
>  		for_each_set_bit(bit, &status, INTX_NUM) {
>  			virq = irq_find_mapping(pcie->legacy_irq_domain,
>  						bit + 1);
> 

But even if you only handle the interrupt once, it is still asserted,
right? You exit the low-level exception handler, only to take the
interrupt immediately again. So what is the gain here?

As an aside, please add a cover letter to your patch series. It is
immensely useful as a summary of what is being done, as well as an
anchor for the patches themselves.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  parent reply	other threads:[~2017-01-23 18:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-21 11:11 Bharat Kumar Gogada
2017-01-21 11:11 ` [PATCH 2/4] PCI: Xilinx NWL: Modifying irq chip for legacy interrupts Bharat Kumar Gogada
2017-01-23 18:37   ` Marc Zyngier
2017-01-24 10:19     ` Bharat Kumar Gogada
2017-01-21 11:11 ` [PATCH 3/4] PCI: Xilinx NWL: Modifying flow handler " Bharat Kumar Gogada
2017-01-23 18:38   ` Marc Zyngier
2017-01-24 10:25     ` Bharat Kumar Gogada
2017-01-21 11:11 ` [PATCH 4/4] PCI: Xilinx NWL: Fix, proc interrupts for legacy virtual irq shown as edge Bharat Kumar Gogada
2017-01-23 18:23 ` Marc Zyngier [this message]
2017-01-24 10:15   ` [PATCH 1/4] PCI: Xilinx NWL: Fix, do not check for legacy status in while loop Bharat Kumar Gogada
2017-01-24 11:07     ` Marc Zyngier
2017-01-24 14:00       ` Bharat Kumar Gogada

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=ec10b089-acc5-7764-6346-9dc1869d05c7@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=arnd@arndb.de \
    --cc=bharat.kumar.gogada@xilinx.com \
    --cc=bharatku@xilinx.com \
    --cc=bhelgaas@google.com \
    --cc=colin.king@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=rgummal@xilinx.com \
    --cc=robh@kernel.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

all inboxes | Powered by JetHome®