All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Julien Grall <julien.grall@arm.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Brian Woods <brian.woods@amd.com>
Subject: Re: [PATCH 3/5] pci: switch pci_conf_{read/write} to use pci_sbdf_t
Date: Tue, 28 May 2019 12:05:29 +0200	[thread overview]
Message-ID: <20190528100529.apc7rlpdzvgr3vzf@Air-de-Roger> (raw)
In-Reply-To: <5CECF68A0200007800232E9B@prv1-mh.provo.novell.com>

On Tue, May 28, 2019 at 02:51:22AM -0600, Jan Beulich wrote:
> >>> On 27.05.19 at 18:44, <roger.pau@citrix.com> wrote:
> > On Fri, May 24, 2019 at 04:01:23AM -0600, Jan Beulich wrote:
> >> >>> On 10.05.19 at 18:10, <roger.pau@citrix.com> wrote:
> >> > --- a/xen/include/xen/pci.h
> >> > +++ b/xen/include/xen/pci.h
> >> > @@ -58,6 +58,11 @@ typedef union {
> >> >      };
> >> >  } pci_sbdf_t;
> >> >  
> >> > +#define PCI_SBDF_T(s, b, d, f) \
> >> > +    ((pci_sbdf_t) { .seg = (s), .bus = (b), .dev = (d), .func = (f) })
> >> 
> >> I'd prefer if the _T suffix could be omitted. Afaics there's no use of the
> >> existing PCI_SBDF() anywhere in the tree, so this should be fine. For
> >> the 2nd macro below I can't easily tell whether the few existing used
> >> have all disappeared by now, but it seems likely.
> > 
> > I can see about dropping the _T suffix, but I think there's likely
> > some overlap between the introduction of PCI_SBDF_T and the last user
> > of the current PCI_SBDF helpers, so maybe it's fine to use the _T
> > suffix at first and have one final patch that removes it?
> 
> That would be an option if it can't be done in one go, sure.
> 
> >> Also I'm afraid initializers of this kind will break the build with old gcc.
> > 
> > I thought we dropped support for such old versions of gcc, is that not
> > the case?
> 
> No yet, as per ./README.

Right, so then I guess the only solution would be to use something
like:

#define PCI_SBDF_T(s, b, d, f) \
    ((pci_sbdf_t) { .sbdf = PCI_SBDF(s,b,d,f) })

And similarly for the other initializers. I guess then you would be
fine with using the _T suffix for those helpers and keeping the
current ones as-is?

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Julien Grall <julien.grall@arm.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Brian Woods <brian.woods@amd.com>
Subject: Re: [Xen-devel] [PATCH 3/5] pci: switch pci_conf_{read/write} to use pci_sbdf_t
Date: Tue, 28 May 2019 12:05:29 +0200	[thread overview]
Message-ID: <20190528100529.apc7rlpdzvgr3vzf@Air-de-Roger> (raw)
Message-ID: <20190528100529.l73QLBl5hZV9BH5tm7OFBjXSCXiIdNN759VUeVeqvf0@z> (raw)
In-Reply-To: <5CECF68A0200007800232E9B@prv1-mh.provo.novell.com>

On Tue, May 28, 2019 at 02:51:22AM -0600, Jan Beulich wrote:
> >>> On 27.05.19 at 18:44, <roger.pau@citrix.com> wrote:
> > On Fri, May 24, 2019 at 04:01:23AM -0600, Jan Beulich wrote:
> >> >>> On 10.05.19 at 18:10, <roger.pau@citrix.com> wrote:
> >> > --- a/xen/include/xen/pci.h
> >> > +++ b/xen/include/xen/pci.h
> >> > @@ -58,6 +58,11 @@ typedef union {
> >> >      };
> >> >  } pci_sbdf_t;
> >> >  
> >> > +#define PCI_SBDF_T(s, b, d, f) \
> >> > +    ((pci_sbdf_t) { .seg = (s), .bus = (b), .dev = (d), .func = (f) })
> >> 
> >> I'd prefer if the _T suffix could be omitted. Afaics there's no use of the
> >> existing PCI_SBDF() anywhere in the tree, so this should be fine. For
> >> the 2nd macro below I can't easily tell whether the few existing used
> >> have all disappeared by now, but it seems likely.
> > 
> > I can see about dropping the _T suffix, but I think there's likely
> > some overlap between the introduction of PCI_SBDF_T and the last user
> > of the current PCI_SBDF helpers, so maybe it's fine to use the _T
> > suffix at first and have one final patch that removes it?
> 
> That would be an option if it can't be done in one go, sure.
> 
> >> Also I'm afraid initializers of this kind will break the build with old gcc.
> > 
> > I thought we dropped support for such old versions of gcc, is that not
> > the case?
> 
> No yet, as per ./README.

Right, so then I guess the only solution would be to use something
like:

#define PCI_SBDF_T(s, b, d, f) \
    ((pci_sbdf_t) { .sbdf = PCI_SBDF(s,b,d,f) })

And similarly for the other initializers. I guess then you would be
fine with using the _T suffix for those helpers and keeping the
current ones as-is?

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-05-28 10:05 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 16:10 [PATCH 0/5] pci: expand usage of pci_sbdf_t Roger Pau Monne
2019-05-10 16:10 ` [Xen-devel] " Roger Pau Monne
2019-05-10 16:10 ` [PATCH 1/5] pci: use pci_sbdf_t in pci_dev Roger Pau Monne
2019-05-10 16:10   ` [Xen-devel] " Roger Pau Monne
2019-05-10 16:16   ` Andrew Cooper
2019-05-10 16:16     ` [Xen-devel] " Andrew Cooper
2019-05-13  6:25     ` Jan Beulich
2019-05-13  6:25       ` [Xen-devel] " Jan Beulich
2019-05-13  7:53       ` Roger Pau Monné
2019-05-13  7:53         ` [Xen-devel] " Roger Pau Monné
2019-05-23 15:29   ` Jan Beulich
2019-05-23 15:29     ` [Xen-devel] " Jan Beulich
2019-05-27 15:51     ` Roger Pau Monné
2019-05-27 15:51       ` [Xen-devel] " Roger Pau Monné
2019-05-10 16:10 ` [PATCH 2/5] pci: use function generation macros for pci_config_{write, read}<size> Roger Pau Monne
2019-05-10 16:10   ` [Xen-devel] " Roger Pau Monne
2019-05-24  9:10   ` Jan Beulich
2019-05-24  9:10     ` [Xen-devel] " Jan Beulich
2019-05-24  9:29   ` Andrew Cooper
2019-05-24  9:29     ` [Xen-devel] " Andrew Cooper
2019-05-27 16:08     ` Roger Pau Monné
2019-05-27 16:08       ` [Xen-devel] " Roger Pau Monné
2019-05-28  8:54       ` Jan Beulich
2019-05-28  8:54         ` [Xen-devel] " Jan Beulich
2019-05-10 16:10 ` [PATCH 3/5] pci: switch pci_conf_{read/write} to use pci_sbdf_t Roger Pau Monne
2019-05-10 16:10   ` [Xen-devel] " Roger Pau Monne
2019-05-24  9:40   ` Andrew Cooper
2019-05-24  9:40     ` [Xen-devel] " Andrew Cooper
2019-05-24 10:01   ` Jan Beulich
2019-05-24 10:01     ` [Xen-devel] " Jan Beulich
2019-05-27 16:44     ` Roger Pau Monné
2019-05-27 16:44       ` [Xen-devel] " Roger Pau Monné
2019-05-28  8:51       ` Jan Beulich
2019-05-28  8:51         ` [Xen-devel] " Jan Beulich
2019-05-28 10:05         ` Roger Pau Monné [this message]
2019-05-28 10:05           ` Roger Pau Monné
2019-05-28 10:38           ` Jan Beulich
2019-05-28 10:38             ` [Xen-devel] " Jan Beulich
2019-05-10 16:10 ` [PATCH 4/5] print: introduce a format specifier for pci_sbdf_t Roger Pau Monne
2019-05-10 16:10   ` [Xen-devel] " Roger Pau Monne
2019-05-24 10:36   ` Jan Beulich
2019-05-24 10:36     ` [Xen-devel] " Jan Beulich
2019-05-24 10:59     ` Andrew Cooper
2019-05-24 10:59       ` [Xen-devel] " Andrew Cooper
2019-05-24 11:16       ` Jan Beulich
2019-05-24 11:16         ` [Xen-devel] " Jan Beulich
2019-05-27 15:48     ` Roger Pau Monné
2019-05-27 15:48       ` [Xen-devel] " Roger Pau Monné
2019-05-27 15:58       ` Jan Beulich
2019-05-27 15:58         ` [Xen-devel] " Jan Beulich
2019-05-10 16:10 ` [PATCH 5/5] pci: switch PCI capabilities related functions to use pci_sbdf_t Roger Pau Monne
2019-05-10 16:10   ` [Xen-devel] " Roger Pau Monne
2019-05-24 10:52   ` Jan Beulich
2019-05-24 10:52     ` [Xen-devel] " Jan Beulich

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=20190528100529.apc7rlpdzvgr3vzf@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=brian.woods@amd.com \
    --cc=julien.grall@arm.com \
    --cc=kevin.tian@intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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.