All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: "Shin'ichiro Kawasaki" <shinichiro.kawasaki@wdc.com>,
	platform-driver-x86@vger.kernel.org,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	linux-pci@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH RFC v2] platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe
Date: Fri, 15 Dec 2023 18:13:50 +0200	[thread overview]
Message-ID: <ZXx7PpJbfsYxDQzJ@smile.fi.intel.com> (raw)
In-Reply-To: <20231215154507.GB20902@wunner.de>

On Fri, Dec 15, 2023 at 04:45:07PM +0100, Lukas Wunner wrote:
> On Fri, Dec 15, 2023 at 05:37:01PM +0200, Andy Shevchenko wrote:
> > On Fri, Dec 15, 2023 at 08:52:10AM +0100, Lukas Wunner wrote:
> > > On Thu, Dec 14, 2023 at 06:38:41PM +0200, Andy Shevchenko wrote:
> > > > On Tue, Dec 12, 2023 at 08:47:46PM +0900, Shin'ichiro Kawasaki wrote:
> > > > > +/* Cache BAR0 of P2SB device from function 0 ot 7 */
> > > > > +#define NR_P2SB_RES_CACHE 8
> > > > 
> > > > This is fifth or so definition for the same, isn't it a good time to create
> > > > a treewide definition in pci.h?
> > > 
> > > This isn't something defined in the PCI spec but rather an x86-specific
> > > constant, so should preferrably live somewhere in arch/x86/include/asm/.
> > 
> > I'm not sure I am following both paragraphs.
> > 
> > > If you have a "maximum number of PCI functions per device" constant in mind
> > > then include/uapi/linux/pci.h might be a good fit.
> > 
> > This is indeed what I have had in mind, but why is this x86 specific?
> > I didn't get...
> 
> If you look at it from the angle that you want to cache the
> BAR of function 0 of the P2SB and of up to 7 additional functions,
> it's an x86 thing.
> 
> If you look at it from the angle "how many functions can a PCIe
> device have (absent ARI)", it's a PCIe thing.
> 
> It depends on the way you look at it. ;)

I look here from the PCI specification / similar thing perspective.

My angle here is "cache the BAR of function 0 of P2SB and of up to
as many as PCI specification dictates the device may have".

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2023-12-15 16:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 11:47 [PATCH RFC v2] platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe Shin'ichiro Kawasaki
2023-12-13 14:05 ` Andy Shevchenko
2023-12-14  0:55   ` Shinichiro Kawasaki
2023-12-14 14:13     ` Andy Shevchenko
2023-12-13 19:41 ` Bjorn Helgaas
2023-12-15  7:34   ` Shinichiro Kawasaki
2023-12-14 16:38 ` Andy Shevchenko
2023-12-15  7:33   ` Shinichiro Kawasaki
2023-12-15 15:42     ` Andy Shevchenko
2023-12-15  7:52   ` Lukas Wunner
2023-12-15 15:37     ` Andy Shevchenko
2023-12-15 15:45       ` Lukas Wunner
2023-12-15 16:13         ` Andy Shevchenko [this message]

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=ZXx7PpJbfsYxDQzJ@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=shinichiro.kawasaki@wdc.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.