From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v8 1/4] pci: add PCI_SBDF and PCI_SEG macros Date: Wed, 8 Jul 2015 13:27:58 -0400 Message-ID: <20150708172758.GA17261@l.oracle.com> References: <1435707242-24937-1-git-send-email-elena.ufimtseva@oracle.com> <1435707242-24937-2-git-send-email-elena.ufimtseva@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1435707242-24937-2-git-send-email-elena.ufimtseva@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: elena.ufimtseva@oracle.com Cc: kevin.tian@intel.com, tim@xen.org, xen-devel@lists.xen.org, jbeulich@suse.com, yang.z.zhang@intel.com, boris.ostrovsky@oracle.com List-Id: xen-devel@lists.xenproject.org On Tue, Jun 30, 2015 at 07:33:59PM -0400, elena.ufimtseva@oracle.com wrote: > From: Elena Ufimtseva > You usually say why you need this patch. Something as simple as: "In preperation for patch XXXX which will use it" is OK. > Signed-off-by: Elena Ufimtseva > --- > xen/include/xen/pci.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h > index 3908146..414106a 100644 > --- a/xen/include/xen/pci.h > +++ b/xen/include/xen/pci.h > @@ -33,6 +33,8 @@ > #define PCI_DEVFN2(bdf) ((bdf) & 0xff) > #define PCI_BDF(b,d,f) ((((b) & 0xff) << 8) | PCI_DEVFN(d,f)) > #define PCI_BDF2(b,df) ((((b) & 0xff) << 8) | ((df) & 0xff)) > +#define PCI_SBDF(s,b,d,f) ((((s) & 0xffff) << 16) | PCI_BDF(b,d,f)) > +#define PCI_SEG(sbdf) (((sbdf) >> 16) & 0xffff) > > struct pci_dev_info { > bool_t is_extfn; > -- > 2.1.3 >