[PATCH 06/14] xfree86: bus: move macros from common PCI header to private file

Mark Kettenis mark.kettenis at xs4all.nl
Tue Jun 1 08:43:10 PDT 2010


> From: Tiago Vignatti <tiago.vignatti at nokia.com>
> Date: Tue,  1 Jun 2010 17:59:02 +0300
> 
> Only int10/helper_exec.c is using them.

I really, really don't see the point if this diff, and a lot of others
you're sending.  Yes, this is only used in the int10 module at this
moment.  But obviously Pci.h is the right place for these macros.  It
seems to me that you're just randomly shifting code around.  I don't
get the big picture, and your terse explanations don't give me any
insight.  So all I'm left with is the fear that this will break the
platform and/or drivers I care about.

>  hw/xfree86/int10/helper_exec.c  |    5 +++++
>  hw/xfree86/os-support/bus/Pci.h |    5 -----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
> index 8f47afe..55ab058 100644
> --- a/hw/xfree86/int10/helper_exec.c
> +++ b/hw/xfree86/int10/helper_exec.c
> @@ -462,6 +462,11 @@ Mem_wl(CARD32 addr, CARD32 val)
>  
>  static CARD32 PciCfg1Addr = 0;
>  
> +#define PCI_DOM_FROM_TAG(tag)  (((tag) >> 24) & (PCI_DOM_MASK))
> +#define PCI_BUS_FROM_TAG(tag)  (((tag) >> 16) & (PCI_DOMBUS_MASK))
> +#define PCI_DEV_FROM_TAG(tag)  (((tag) & 0x0000f800u) >> 11)
> +#define PCI_FUNC_FROM_TAG(tag) (((tag) & 0x00000700u) >> 8)
> +
>  #define PCI_OFFSET(x) ((x) & 0x000000ff)
>  #define PCI_TAG(x)    ((x) & 0x7fffff00)
>  
> diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
> index c22e5fc..c47c2b0 100644
> --- a/hw/xfree86/os-support/bus/Pci.h
> +++ b/hw/xfree86/os-support/bus/Pci.h
> @@ -133,11 +133,6 @@
>  
>  #define PCI_MAKE_BUS(d,b)    ((((d) & (PCI_DOM_MASK)) << 8) | ((b) & 0xffu))
>  
> -#define PCI_DOM_FROM_TAG(tag)  (((tag) >> 24) & (PCI_DOM_MASK))
> -#define PCI_BUS_FROM_TAG(tag)  (((tag) >> 16) & (PCI_DOMBUS_MASK))
> -#define PCI_DEV_FROM_TAG(tag)  (((tag) & 0x0000f800u) >> 11)
> -#define PCI_FUNC_FROM_TAG(tag) (((tag) & 0x00000700u) >> 8)
> -
>  #define PCI_DOM_FROM_BUS(bus)  (((bus) >> 8) & (PCI_DOM_MASK))
>  #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu)
>  #define PCI_TAG_NO_DOMAIN(tag) ((tag) & 0x00ffff00u)
> -- 
> 1.7.1.226.g770c5
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list