All of lore.kernel.org
 help / color / mirror / Atom feed
From: poza@codeaurora.org
To: Oza Pawandeep <oza.pawandeep@gmail.com>
Cc: Sinan Kaya <okaya@codeaurora.org>,
	Keith Busch <keith.busch@intel.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Linux PCI <linux-pci@vger.kernel.org>,
	linux-pci-owner@vger.kernel.org
Subject: Re: [PATCH 2/6] PCI/DPC: Leave interrupts enabled while handling event
Date: Tue, 30 Jan 2018 12:04:44 +0530	[thread overview]
Message-ID: <f0afb7badc99dcfc3b6818cc2356250d@codeaurora.org> (raw)
In-Reply-To: <CAK1A=4w-uDm+gau6WdwM=ZrgO=bWDtDKqwabxWxm2EZZb+YoKw@mail.gmail.com>

On 2018-01-30 11:59, Oza Pawandeep wrote:
> + Oza
> 
> On Tue, Jan 30, 2018 at 7:41 AM, Sinan Kaya <okaya@codeaurora.org> 
> wrote:
>> On 1/29/2018 4:31 PM, Keith Busch wrote:
>>> +     if (!work_busy(&dpc->work))
>>> +             schedule_work(&dpc->work);
>> 
>> Isn't there a race condition between the time that dpc_work() clears 
>> PCI_EXP_DPC_STATUS
>> register and when work actually completes by returning from 
>> dpc_work()?
>> 
>> If the interrupt arrives just in this window, this code will not 
>> schedule the work.
>> 
>> --
>> Sinan Kaya
>> Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
>> Technologies, Inc.
>> Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a 
>> Linux Foundation Collaborative Project.

besides, there is one more problem which I was debugging:
if RP doesnt support MSI, then legacy interrupts are not well handled 
and we get interrupt storm.
this is because;
PCI_EXP_DPC_STATUS_INTERRUPT is being cleared in deferred work.
which should get cleared in dpc_irq interrupt handler.
I will post a patch for this, but I see there are lot of changes being 
made in dpc and aer lately.

Bjorn: Can you please help to review my AER/DPC series of patches so 
that I do not have to keep rebasing and do manual merge ?

Regards,
Oza.

  reply	other threads:[~2018-01-30  6:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29 21:31 [PATCH 1/6] PCI/DPC: Defer all event handling to work queue Keith Busch
2018-01-29 21:31 ` [PATCH 2/6] PCI/DPC: Leave interrupts enabled while handling event Keith Busch
2018-01-30  2:11   ` Sinan Kaya
2018-01-30  6:29     ` Oza Pawandeep
2018-01-30  6:34       ` poza [this message]
2018-01-30  6:40         ` poza
2018-01-30 18:17         ` Keith Busch
2018-01-31  5:21           ` poza
2018-01-30 18:30         ` Bjorn Helgaas
2018-01-31  5:23           ` poza
2018-01-29 21:31 ` [PATCH 3/6] PCI/DPC: Remove rp_pio_status from dpc struct Keith Busch
2018-01-29 21:31 ` [PATCH 4/6] PCI/DPC: Cleanup declarations Keith Busch
2018-01-29 21:31 ` [PATCH 5/6] PCI/DPC: Enable ERR_COR Keith Busch
2018-01-29 21:31 ` [PATCH 6/6] PCI/DPC: Print AER status in DPC event handling Keith Busch

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=f0afb7badc99dcfc3b6818cc2356250d@codeaurora.org \
    --to=poza@codeaurora.org \
    --cc=bhelgaas@google.com \
    --cc=keith.busch@intel.com \
    --cc=linux-pci-owner@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=okaya@codeaurora.org \
    --cc=oza.pawandeep@gmail.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.