All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Joao Pinto <Joao.Pinto@synopsys.com>,
	Jingoo Han <jingoohan1@gmail.com>,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3] PCI: dwc: fix scheduling while atomic issues
Date: Thu, 13 Sep 2018 18:29:54 +0800	[thread overview]
Message-ID: <20180913182926.365d155b@xhacker.debian> (raw)
In-Reply-To: <20180913091534.GB32721@e107981-ln.cambridge.arm.com>

Hi Lorenzo,

On Thu, 13 Sep 2018 10:15:34 +0100 Lorenzo Pieralisi wrote:

> On Mon, Sep 10, 2018 at 04:57:22PM +0800, Jisheng Zhang wrote:
> > Hi all,
> > 
> > On Wed, 29 Aug 2018 11:04:08 +0800 Jisheng Zhang wrote:
> >   
> > > When programming inbound/outbound atu, we call usleep_range() after
> > > each checking PCIE_ATU_ENABLE bit. Unfortunately, the atu programming
> > > can be called in atomic context:
> > > 
> > > inbound atu programming could be called through
> > > pci_epc_write_header()  
> > >   =>dw_pcie_ep_write_header()
> > >     =>dw_pcie_prog_inbound_atu()    
> > > 
> > > outbound atu programming could be called through
> > > pci_bus_read_config_dword()  
> > >   =>dw_pcie_rd_conf()
> > >     =>dw_pcie_prog_outbound_atu()    
> > > 
> > > Fix this issue by calling mdelay() instead.  
> > 
> > Any comments about this patch?
> > 
> > Thanks,
> > Jisheng
> >   
> > > 
> > > Fixes: f8aed6ec624f ("PCI: dwc: designware: Add EP mode support")
> > > Fixes: d8bbeb39fbf3 ("PCI: designware: Wait for iATU enable")  
> 
> Can you split it into two patches and repost it please ? It will make
> everyone's life easier to backport it if there is need, I will apply
> then.

IIUC, the purpose of this split is to make the backport to stable easier. If
so, I realise that the Fixes tags were not enough, we missed:

Fixes: edd45e396829 ("PCI: dwc: designware: Move _unroll configurations to a
separate function")

I'm not sure how to handle this case. From another side, the issue to be
fixed is the same: call sleep in atomic context in the same driver, is it
better to use one patch?

As for stable tree, I could send out separate patches instead. What do you
think?

Thanks,
Jisheng

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Jisheng.Zhang@synaptics.com (Jisheng Zhang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] PCI: dwc: fix scheduling while atomic issues
Date: Thu, 13 Sep 2018 18:29:54 +0800	[thread overview]
Message-ID: <20180913182926.365d155b@xhacker.debian> (raw)
In-Reply-To: <20180913091534.GB32721@e107981-ln.cambridge.arm.com>

Hi Lorenzo,

On Thu, 13 Sep 2018 10:15:34 +0100 Lorenzo Pieralisi wrote:

> On Mon, Sep 10, 2018 at 04:57:22PM +0800, Jisheng Zhang wrote:
> > Hi all,
> > 
> > On Wed, 29 Aug 2018 11:04:08 +0800 Jisheng Zhang wrote:
> >   
> > > When programming inbound/outbound atu, we call usleep_range() after
> > > each checking PCIE_ATU_ENABLE bit. Unfortunately, the atu programming
> > > can be called in atomic context:
> > > 
> > > inbound atu programming could be called through
> > > pci_epc_write_header()  
> > >   =>dw_pcie_ep_write_header()
> > >     =>dw_pcie_prog_inbound_atu()    
> > > 
> > > outbound atu programming could be called through
> > > pci_bus_read_config_dword()  
> > >   =>dw_pcie_rd_conf()
> > >     =>dw_pcie_prog_outbound_atu()    
> > > 
> > > Fix this issue by calling mdelay() instead.  
> > 
> > Any comments about this patch?
> > 
> > Thanks,
> > Jisheng
> >   
> > > 
> > > Fixes: f8aed6ec624f ("PCI: dwc: designware: Add EP mode support")
> > > Fixes: d8bbeb39fbf3 ("PCI: designware: Wait for iATU enable")  
> 
> Can you split it into two patches and repost it please ? It will make
> everyone's life easier to backport it if there is need, I will apply
> then.

IIUC, the purpose of this split is to make the backport to stable easier. If
so, I realise that the Fixes tags were not enough, we missed:

Fixes: edd45e396829 ("PCI: dwc: designware: Move _unroll configurations to a
separate function")

I'm not sure how to handle this case. From another side, the issue to be
fixed is the same: call sleep in atomic context in the same driver, is it
better to use one patch?

As for stable tree, I could send out separate patches instead. What do you
think?

Thanks,
Jisheng

WARNING: multiple messages have this Message-ID (diff)
From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Jingoo Han <jingoohan1@gmail.com>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	Bjorn Helgaas <bhelgaas@google.com>, <linux-pci@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3] PCI: dwc: fix scheduling while atomic issues
Date: Thu, 13 Sep 2018 18:29:54 +0800	[thread overview]
Message-ID: <20180913182926.365d155b@xhacker.debian> (raw)
In-Reply-To: <20180913091534.GB32721@e107981-ln.cambridge.arm.com>

Hi Lorenzo,

On Thu, 13 Sep 2018 10:15:34 +0100 Lorenzo Pieralisi wrote:

> On Mon, Sep 10, 2018 at 04:57:22PM +0800, Jisheng Zhang wrote:
> > Hi all,
> > 
> > On Wed, 29 Aug 2018 11:04:08 +0800 Jisheng Zhang wrote:
> >   
> > > When programming inbound/outbound atu, we call usleep_range() after
> > > each checking PCIE_ATU_ENABLE bit. Unfortunately, the atu programming
> > > can be called in atomic context:
> > > 
> > > inbound atu programming could be called through
> > > pci_epc_write_header()  
> > >   =>dw_pcie_ep_write_header()
> > >     =>dw_pcie_prog_inbound_atu()    
> > > 
> > > outbound atu programming could be called through
> > > pci_bus_read_config_dword()  
> > >   =>dw_pcie_rd_conf()
> > >     =>dw_pcie_prog_outbound_atu()    
> > > 
> > > Fix this issue by calling mdelay() instead.  
> > 
> > Any comments about this patch?
> > 
> > Thanks,
> > Jisheng
> >   
> > > 
> > > Fixes: f8aed6ec624f ("PCI: dwc: designware: Add EP mode support")
> > > Fixes: d8bbeb39fbf3 ("PCI: designware: Wait for iATU enable")  
> 
> Can you split it into two patches and repost it please ? It will make
> everyone's life easier to backport it if there is need, I will apply
> then.

IIUC, the purpose of this split is to make the backport to stable easier. If
so, I realise that the Fixes tags were not enough, we missed:

Fixes: edd45e396829 ("PCI: dwc: designware: Move _unroll configurations to a
separate function")

I'm not sure how to handle this case. From another side, the issue to be
fixed is the same: call sleep in atomic context in the same driver, is it
better to use one patch?

As for stable tree, I could send out separate patches instead. What do you
think?

Thanks,
Jisheng

  reply	other threads:[~2018-09-13 10:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29  3:04 [PATCH v3] PCI: dwc: fix scheduling while atomic issues Jisheng Zhang
2018-08-29  3:04 ` Jisheng Zhang
2018-08-29  3:04 ` Jisheng Zhang
2018-09-10  8:57 ` Jisheng Zhang
2018-09-10  8:57   ` Jisheng Zhang
2018-09-10  8:57   ` Jisheng Zhang
2018-09-13  9:15   ` Lorenzo Pieralisi
2018-09-13  9:15     ` Lorenzo Pieralisi
2018-09-13 10:29     ` Jisheng Zhang [this message]
2018-09-13 10:29       ` Jisheng Zhang
2018-09-13 10:29       ` Jisheng Zhang
2018-09-13 10:49       ` Lorenzo Pieralisi
2018-09-13 10:49         ` Lorenzo Pieralisi
2018-09-13 10:49         ` Lorenzo Pieralisi
2018-09-13 15:05 ` Lorenzo Pieralisi
2018-09-13 15:05   ` Lorenzo Pieralisi
2018-09-13 15:05   ` Lorenzo Pieralisi
2018-09-20 21:37   ` Bjorn Helgaas
2018-09-20 21:37     ` Bjorn Helgaas

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=20180913182926.365d155b@xhacker.debian \
    --to=jisheng.zhang@synaptics.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=bhelgaas@google.com \
    --cc=jingoohan1@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.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.