All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Joao Pinto <Joao.Pinto@synopsys.com>,
	Vineet.Gupta1@synopsys.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org,
	CARLOS.PALMINHA@synopsys.com, Alexey.Brodkin@synopsys.com,
	robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org
Subject: Re: [PATCH v7 2/2] add new platform driver for PCI RC
Date: Tue, 2 Feb 2016 17:14:49 -0600	[thread overview]
Message-ID: <20160202231449.GA18009@localhost> (raw)
In-Reply-To: <8223655.W63T0XOVm1@wuerfel>

On Tue, Feb 02, 2016 at 09:25:25PM +0100, Arnd Bergmann wrote:
> On Monday 01 February 2016 18:07:45 Joao Pinto wrote:
> > +static void synopsys_pcie_establish_link(struct pcie_port *pp)
> > +{
> > +	int retries = 0;
> > +
> > +	/* check if the link is up or not */
> > +	for (retries = 0; retries < 10; retries++) {
> > +		if (dw_pcie_link_up(pp)) {
> > +			dev_info(pp->dev, "Link up\n");
> > +			return;
> > +		}
> > +		mdelay(100);
> > +	}
> > +}
> 
> That mdelay() needs to be an msleep(). You should never waste
> a whole second worth of CPU time in a driver.

There are six other copies of this code, and two of them (exynos and
spear) have the same problem.

Bjorn

WARNING: multiple messages have this Message-ID (diff)
From: helgaas@kernel.org (Bjorn Helgaas)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH v7 2/2] add new platform driver for PCI RC
Date: Tue, 2 Feb 2016 17:14:49 -0600	[thread overview]
Message-ID: <20160202231449.GA18009@localhost> (raw)
In-Reply-To: <8223655.W63T0XOVm1@wuerfel>

On Tue, Feb 02, 2016@09:25:25PM +0100, Arnd Bergmann wrote:
> On Monday 01 February 2016 18:07:45 Joao Pinto wrote:
> > +static void synopsys_pcie_establish_link(struct pcie_port *pp)
> > +{
> > +	int retries = 0;
> > +
> > +	/* check if the link is up or not */
> > +	for (retries = 0; retries < 10; retries++) {
> > +		if (dw_pcie_link_up(pp)) {
> > +			dev_info(pp->dev, "Link up\n");
> > +			return;
> > +		}
> > +		mdelay(100);
> > +	}
> > +}
> 
> That mdelay() needs to be an msleep(). You should never waste
> a whole second worth of CPU time in a driver.

There are six other copies of this code, and two of them (exynos and
spear) have the same problem.

Bjorn

  reply	other threads:[~2016-02-02 23:14 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 18:07 [PATCH v7 0/2] adding PCI support to AXS10x Joao Pinto
2016-02-01 18:07 ` Joao Pinto
2016-02-01 18:07 ` [PATCH v7 1/2] PCI support added to ARC Joao Pinto
2016-02-01 18:07   ` Joao Pinto
2016-02-02 10:48   ` Vineet Gupta
2016-02-02 10:48     ` Vineet Gupta
2016-02-01 18:07 ` [PATCH v7 2/2] add new platform driver for PCI RC Joao Pinto
2016-02-01 18:07   ` Joao Pinto
2016-02-02 17:12   ` Bjorn Helgaas
2016-02-02 17:12     ` Bjorn Helgaas
2016-02-02 20:25   ` Arnd Bergmann
2016-02-02 20:25     ` Arnd Bergmann
2016-02-02 23:14     ` Bjorn Helgaas [this message]
2016-02-02 23:14       ` Bjorn Helgaas
2016-02-02 23:27       ` Arnd Bergmann
2016-02-02 23:27         ` Arnd Bergmann
2016-02-03 18:05     ` Bjorn Helgaas
2016-02-03 18:05       ` Bjorn Helgaas
2016-02-03 18:12       ` Joao Pinto
2016-02-03 18:12         ` Joao Pinto
2016-02-03 18:38         ` Bjorn Helgaas
2016-02-03 18:38           ` Bjorn Helgaas
2016-02-03 21:01           ` Arnd Bergmann
2016-02-03 21:01             ` Arnd Bergmann
2016-02-04 11:10             ` Joao Pinto
2016-02-04 11:10               ` Joao Pinto
2016-02-04 13:12               ` Arnd Bergmann
2016-02-04 13:12                 ` Arnd Bergmann
2016-02-04 11:14           ` Joao Pinto
2016-02-04 11:14             ` Joao Pinto
2016-02-04 14:09             ` Joao Pinto
2016-02-04 14:09               ` Joao Pinto
2016-02-04 15:22               ` Arnd Bergmann
2016-02-04 15:22                 ` Arnd Bergmann
2016-02-02 17:14 ` [PATCH v7 0/2] adding PCI support to AXS10x Bjorn Helgaas
2016-02-02 17:14   ` Bjorn Helgaas
2016-02-02 17:17   ` Joao Pinto
2016-02-02 17:17     ` Joao Pinto
2016-02-02 17:24     ` Joao Pinto
2016-02-02 17:24       ` Joao Pinto

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=20160202231449.GA18009@localhost \
    --to=helgaas@kernel.org \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=CARLOS.PALMINHA@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=arnd@arndb.de \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@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 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.