All of lore.kernel.org
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] bus: mvebu-mbus: Avoid setting an undefined window size
Date: Thu, 10 Apr 2014 08:53:46 +0200	[thread overview]
Message-ID: <20140410085346.784631f9@skate> (raw)
In-Reply-To: <20140409162040.GA19743@obsidianresearch.com>

Dear Jason Gunthorpe,

On Wed, 9 Apr 2014 10:20:40 -0600, Jason Gunthorpe wrote:

> > OK I just got it by adding two printk() in pci-mvebu.c. Both functions
> > mvebu_pcie_handle_iobase_change() and mvebu_pcie_handle_membase_change()
> > do pass a size which is in fact a mask (size - 1) and not the real size.
> > So the mbus is fed with an incorrect size which is off by one :
> 
> Yes, that is right. I tested my patch here and didn't see any problem,
> but I realize now that the mbus code is bailing early due to this:
> 
> kernel: mvebu_mbus: cannot add window '4:e8', conflicts with another window
> 
> Which I've never got around to fixing.. (whole other story there)
> 
> Your patch looks fine, and it obviously needs to be sequenced before
> mine. (Thomas/Jason C: how do you want to do this?)

What I can propose is that I accumulate in a branch all the patches
needed to solve the various PCIe/Mbus problems we've identified:

 * Your patch adding warnings to the mvebu-mbus driver
 * Willy's patch fixing the off-by-one on the size
 * Neil's patch fixing the MSI teardown function
 * My two patches fixing the rest of the MSI logic
 * And patches to come for the link problem, and the cutting of
   non-power-of-two BARs into power-of-two windows

This way, everybody will be able to test than in his specific
hardware situations, the patches are solving all the problems. Then I
can take care of formally submitting those patches to the relevant
maintainers, of course keeping the authorship as appropriate.

How does that sound?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Willy Tarreau <w@1wt.eu>, Neil Greatorex <neil@fatboyfat.co.uk>,
	linux-arm-kernel@lists.infradead.org,
	Matthew Minter <matthew_minter@xyratex.com>,
	linux-kernel@vger.kernel.org, Jason Cooper <jason@lakedaemon.net>
Subject: Re: [PATCH v2] bus: mvebu-mbus: Avoid setting an undefined window size
Date: Thu, 10 Apr 2014 08:53:46 +0200	[thread overview]
Message-ID: <20140410085346.784631f9@skate> (raw)
In-Reply-To: <20140409162040.GA19743@obsidianresearch.com>

Dear Jason Gunthorpe,

On Wed, 9 Apr 2014 10:20:40 -0600, Jason Gunthorpe wrote:

> > OK I just got it by adding two printk() in pci-mvebu.c. Both functions
> > mvebu_pcie_handle_iobase_change() and mvebu_pcie_handle_membase_change()
> > do pass a size which is in fact a mask (size - 1) and not the real size.
> > So the mbus is fed with an incorrect size which is off by one :
> 
> Yes, that is right. I tested my patch here and didn't see any problem,
> but I realize now that the mbus code is bailing early due to this:
> 
> kernel: mvebu_mbus: cannot add window '4:e8', conflicts with another window
> 
> Which I've never got around to fixing.. (whole other story there)
> 
> Your patch looks fine, and it obviously needs to be sequenced before
> mine. (Thomas/Jason C: how do you want to do this?)

What I can propose is that I accumulate in a branch all the patches
needed to solve the various PCIe/Mbus problems we've identified:

 * Your patch adding warnings to the mvebu-mbus driver
 * Willy's patch fixing the off-by-one on the size
 * Neil's patch fixing the MSI teardown function
 * My two patches fixing the rest of the MSI logic
 * And patches to come for the link problem, and the cutting of
   non-power-of-two BARs into power-of-two windows

This way, everybody will be able to test than in his specific
hardware situations, the patches are solving all the problems. Then I
can take care of formally submitting those patches to the relevant
maintainers, of course keeping the authorship as appropriate.

How does that sound?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2014-04-10  6:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08 23:44 [PATCH v2] bus: mvebu-mbus: Avoid setting an undefined window size Jason Gunthorpe
2014-04-08 23:44 ` Jason Gunthorpe
2014-04-09  6:11 ` Willy Tarreau
2014-04-09  6:11   ` Willy Tarreau
2014-04-09  7:12   ` Thomas Petazzoni
2014-04-09  7:12     ` Thomas Petazzoni
2014-04-09  7:47     ` Willy Tarreau
2014-04-09  7:47       ` Willy Tarreau
2014-04-09  7:53       ` Thomas Petazzoni
2014-04-09  7:53         ` Thomas Petazzoni
2014-04-09  7:56         ` Willy Tarreau
2014-04-09  7:56           ` Willy Tarreau
2014-04-09 16:30         ` Jason Gunthorpe
2014-04-09 16:30           ` Jason Gunthorpe
2014-04-09 16:20   ` Jason Gunthorpe
2014-04-09 16:20     ` Jason Gunthorpe
2014-04-10  6:35     ` Willy Tarreau
2014-04-10  6:35       ` Willy Tarreau
2014-04-10  6:53     ` Thomas Petazzoni [this message]
2014-04-10  6:53       ` Thomas Petazzoni
2014-04-10 11:59       ` Jason Cooper
2014-04-10 11:59         ` Jason Cooper

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=20140410085346.784631f9@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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.