Skip to contentSkip to conversation

drm: Fix support for PCI domains

PATCH In review Benjamin Herrenschmidt 5 participants 13 messages Aug 6, 2010 – Aug 13, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: Fix support for PCI domains

(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward compatible way along with a change to libdrm.

When the interface version is set to 1.4, we assume userspace understands domains and the world is at peace. We thus pass proper domain numbers instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with ignoring domains in the later case (well, except on alpha of course)

---
 drivers/gpu/drm/drm_ioctl.c |    1 +
 include/drm/drmP.h          |   18 +++++++++++++-----
 include/drm/drm_core.h      |    2 +-
 3 files changed, 15 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_ioctl.c +1 -0
index 9b9ff46..d7b2bd6 100644
@@ -322,6 +322,7 @@ int drm_setversion(struct drm_device *dev, void *data, struct drm_file *file_pri
 		if (sv->drm_di_minor >= 1) {
 			/*
 			 * Version 1.1 includes tying of DRM to specific device
+			 * Version 1.4 has proper PCI domain support
 			 */
 			drm_set_busid(dev, file_priv);
 		}
include/drm/drmP.h +13 -5
index c1b9871..6d4bad5 100644
@@ -1071,11 +1071,19 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
 	return ((dev->driver->driver_features & feature) ? 1 : 0);
 }
 
-#ifdef __alpha__
-#define drm_get_pci_domain(dev) dev->hose->index
-#else
-#define drm_get_pci_domain(dev) 0
-#endif
+static inline int drm_get_pci_domain(struct drm_device *dev)
+{
+#ifndef __alpha__
+	/* For historical reasons, drm_get_pci_domain() is busticated
+	 * on most archs and has to remain so for userspace interface
+	 * < 1.4, except on alpha which was right from the beginning
+	 */
+	if (dev->if_version < 0x10004)
+		return 0;
+#endif /* __alpha__ */
+
+	return pci_domain_nr(dev->pdev->bus);
+}
 
 #if __OS_HAS_AGP
 static inline int drm_core_has_AGP(struct drm_device *dev)
include/drm/drm_core.h +1 -1
index 3167390..4e75238 100644
@@ -27,7 +27,7 @@
 #define CORE_DATE		"20060810"
 
 #define DRM_IF_MAJOR	1
-#define DRM_IF_MINOR	3
+#define DRM_IF_MINOR	4
 
 #define CORE_MAJOR	1
 #define CORE_MINOR	1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Benjamin Herrenschmidt

(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward compatible way along with a change to libdrm.

Quoted 8 lines

When the interface version is set to 1.4, we assume userspace understands domains and the world is at peace. We thus pass proper domain numbers instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with ignoring domains in the later case (well, except on alpha of course)

Thanks for tackling this, Ben!

Signature · 14 lines
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
Reviewed-by on v1 1/1
#2 lore raw
In reply to Benjamin Herrenschmidt
Quoted 5 lines · Benjamin Herrenschmidt

(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward compatible way along with a change to libdrm.

Quoted 8 lines

When the interface version is set to 1.4, we assume userspace understands domains and the world is at peace. We thus pass proper domain numbers instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with ignoring domains in the later case (well, except on alpha of course)

Thanks for tackling this, Ben!

Signature · 2 lines
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer
#3 lore raw
In reply to Benjamin Herrenschmidt
Quoted 34 lines · Benjamin Herrenschmidt

(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward compatible way along with a change to libdrm.

When the interface version is set to 1.4, we assume userspace understands domains and the world is at peace. We thus pass proper domain numbers instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with ignoring domains in the later case (well, except on alpha of course)

---
 drivers/gpu/drm/drm_ioctl.c |    1 + include/drm/drmP.h          |   18 +++++++++++++----- include/drm/drm_core.h      |    2 +-

 3 files changed, 15 insertions(+), 6 deletions(-)
include/drm/drmP.h +2 -5
index c1b9871..6d4bad5 100644
@@ -1071,11 +1071,19 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
        return ((dev->driver->driver_features & feature) ? 1 : 0);
  }
 
-#ifdef __alpha__
-#define drm_get_pci_domain(dev) dev->hose->index
-#else
-#define drm_get_pci_domain(dev) 0
-#endif
+static inline int drm_get_pci_domain(struct drm_device *dev)
+{

include/drm/drmP.h static __inline__ int drm_core_check_feature(struct drm_device *dev, · line 1085

Quoted 10 lines
include/drm/drmP.h +10 -0
+#ifndef __alpha__
+       /* For historical reasons, drm_get_pci_domain() is busticated
+        * on most archs and has to remain so for userspace interface
+        * < 1.4, except on alpha which was right from the beginning
+        */
+       if (dev->if_version < 0x10004)
+               return 0;
+#endif /* __alpha__ */
+
+       return pci_domain_nr(dev->pdev->bus);

error: implicit declaration of function ‘pci_domain_nr’

on m68k without PCI.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

#4 lore raw
In reply to Benjamin Herrenschmidt
Quoted 34 lines · Benjamin Herrenschmidt

(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward compatible way along with a change to libdrm.

When the interface version is set to 1.4, we assume userspace understands domains and the world is at peace. We thus pass proper domain numbers instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with ignoring domains in the later case (well, except on alpha of course)

---
 drivers/gpu/drm/drm_ioctl.c |    1 + include/drm/drmP.h          |   18 +++++++++++++----- include/drm/drm_core.h      |    2 +-

 3 files changed, 15 insertions(+), 6 deletions(-)
include/drm/drmP.h +2 -5
index c1b9871..6d4bad5 100644
@@ -1071,11 +1071,19 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
        return ((dev->driver->driver_features & feature) ? 1 : 0);
  }
 
-#ifdef __alpha__
-#define drm_get_pci_domain(dev) dev->hose->index
-#else
-#define drm_get_pci_domain(dev) 0
-#endif
+static inline int drm_get_pci_domain(struct drm_device *dev)
+{

include/drm/drmP.h static __inline__ int drm_core_check_feature(struct drm_device *dev, · line 1085

Quoted 10 lines
include/drm/drmP.h +10 -0
+#ifndef __alpha__
+       /* For historical reasons, drm_get_pci_domain() is busticated
+        * on most archs and has to remain so for userspace interface
+        * < 1.4, except on alpha which was right from the beginning
+        */
+       if (dev->if_version < 0x10004)
+               return 0;
+#endif /* __alpha__ */
+
+       return pci_domain_nr(dev->pdev->bus);

error: implicit declaration of function ‘pci_domain_nr’

on m68k without PCI.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds

maintainer
#5 lore raw
Quoted 41 lines · Geert Uytterhoeven
Quoted 39 lines · Benjamin Herrenschmidt

(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward compatible way along with a change to libdrm.

When the interface version is set to 1.4, we assume userspace understands domains and the world is at peace. We thus pass proper domain numbers instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with ignoring domains in the later case (well, except on alpha of course)

---
 drivers/gpu/drm/drm_ioctl.c |    1 + include/drm/drmP.h          |   18 +++++++++++++----- include/drm/drm_core.h      |    2 +-

 3 files changed, 15 insertions(+), 6 deletions(-)
include/drm/drmP.h +7 -5
index c1b9871..6d4bad5 100644
@@ -1071,11 +1071,19 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
        return ((dev->driver->driver_features & feature) ? 1 : 0);
  }
 
-#ifdef __alpha__
-#define drm_get_pci_domain(dev) dev->hose->index
-#else
-#define drm_get_pci_domain(dev) 0
-#endif
+static inline int drm_get_pci_domain(struct drm_device *dev)
+{
+#ifndef __alpha__
+       /* For historical reasons, drm_get_pci_domain() is busticated
+        * on most archs and has to remain so for userspace interface
+        * < 1.4, except on alpha which was right from the beginning
+        */
Quoted 8 lines

include/drm/drmP.h static __inline__ int drm_core_check_feature(struct drm_device *dev, · line 1085

Quoted 5 lines
include/drm/drmP.h +5 -0
+       if (dev->if_version < 0x10004)
+               return 0;
+#endif /* __alpha__ */
+
+       return pci_domain_nr(dev->pdev->bus);

error: implicit declaration of function ‘pci_domain_nr’ on m68k without PCI.

I don't think I want to add an ifdef CONFIG_PCI into the drm layer for this, since we seem to be okay everywhere else,

lets ask jbarnes, not sure if its safe to just add this to the !CONFIG_PCI section of the linux/pci.h

Dave.

Quoted 2 lines

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
--

maintainer
#6 lore raw
In reply to Geert Uytterhoeven
Quoted 41 lines · Geert Uytterhoeven
Quoted 39 lines · Benjamin Herrenschmidt

(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward compatible way along with a change to libdrm.

When the interface version is set to 1.4, we assume userspace understands domains and the world is at peace. We thus pass proper domain numbers instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with ignoring domains in the later case (well, except on alpha of course)

---
 drivers/gpu/drm/drm_ioctl.c |    1 + include/drm/drmP.h          |   18 +++++++++++++----- include/drm/drm_core.h      |    2 +-

 3 files changed, 15 insertions(+), 6 deletions(-)
include/drm/drmP.h +7 -5
index c1b9871..6d4bad5 100644
@@ -1071,11 +1071,19 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
        return ((dev->driver->driver_features & feature) ? 1 : 0);
  }
 
-#ifdef __alpha__
-#define drm_get_pci_domain(dev) dev->hose->index
-#else
-#define drm_get_pci_domain(dev) 0
-#endif
+static inline int drm_get_pci_domain(struct drm_device *dev)
+{
+#ifndef __alpha__
+       /* For historical reasons, drm_get_pci_domain() is busticated
+        * on most archs and has to remain so for userspace interface
+        * < 1.4, except on alpha which was right from the beginning
+        */
Quoted 8 lines

include/drm/drmP.h static __inline__ int drm_core_check_feature(struct drm_device *dev, · line 1085

Quoted 5 lines
include/drm/drmP.h +5 -0
+       if (dev->if_version < 0x10004)
+               return 0;
+#endif /* __alpha__ */
+
+       return pci_domain_nr(dev->pdev->bus);

error: implicit declaration of function ‘pci_domain_nr’ on m68k without PCI.

I don't think I want to add an ifdef CONFIG_PCI into the drm layer for this, since we seem to be okay everywhere else,

lets ask jbarnes, not sure if its safe to just add this to the !CONFIG_PCI section of the linux/pci.h

Dave.

Quoted 2 lines
#7 lore raw
Quoted 52 lines · On Fri, 13 Aug 2010 09:33:35 +1000 Dave Airlie <[email protected]> wrote:
Quoted 41 lines · Geert Uytterhoeven
Quoted 39 lines · Benjamin Herrenschmidt

(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward compatible way along with a change to libdrm.

When the interface version is set to 1.4, we assume userspace understands domains and the world is at peace. We thus pass proper domain numbers instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with ignoring domains in the later case (well, except on alpha of course)

---
 drivers/gpu/drm/drm_ioctl.c |    1 + include/drm/drmP.h          |   18 +++++++++++++----- include/drm/drm_core.h      |    2 +-

 3 files changed, 15 insertions(+), 6 deletions(-)
include/drm/drmP.h +7 -5
index c1b9871..6d4bad5 100644
@@ -1071,11 +1071,19 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
        return ((dev->driver->driver_features & feature) ? 1 : 0);
  }
 
-#ifdef __alpha__
-#define drm_get_pci_domain(dev) dev->hose->index
-#else
-#define drm_get_pci_domain(dev) 0
-#endif
+static inline int drm_get_pci_domain(struct drm_device *dev)
+{
+#ifndef __alpha__
+       /* For historical reasons, drm_get_pci_domain() is busticated
+        * on most archs and has to remain so for userspace interface
+        * < 1.4, except on alpha which was right from the beginning
+        */
Quoted 8 lines

include/drm/drmP.h static __inline__ int drm_core_check_feature(struct drm_device *dev, · line 1085

Quoted 5 lines
include/drm/drmP.h +5 -0
+       if (dev->if_version < 0x10004)
+               return 0;
+#endif /* __alpha__ */
+
+       return pci_domain_nr(dev->pdev->bus);

error: implicit declaration of function ‘pci_domain_nr’ on m68k without PCI.

Quoted 5 lines

I don't think I want to add an ifdef CONFIG_PCI into the drm layer for this, since we seem to be okay everywhere else,

lets ask jbarnes, not sure if its safe to just add this to the !CONFIG_PCI section of the linux/pci.h

Hm, so pci_domain_nr should just return 0 on platforms where CONFIG_PCI_DOMAINS isn't set. I'd expect that to be the case when CONFIG_PCI=n... Maybe we just need to shuffle the definition around?

Signature · 13 lines
Jesse Barnes, Intel Open Source Technology Center

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
#8 lore raw
In reply to Dave Airlie
Quoted 52 lines · On Fri, 13 Aug 2010 09:33:35 +1000 Dave Airlie <[email protected]> wrote:
Quoted 41 lines · Geert Uytterhoeven
Quoted 39 lines · Benjamin Herrenschmidt

(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward compatible way along with a change to libdrm.

When the interface version is set to 1.4, we assume userspace understands domains and the world is at peace. We thus pass proper domain numbers instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with ignoring domains in the later case (well, except on alpha of course)

---
 drivers/gpu/drm/drm_ioctl.c |    1 + include/drm/drmP.h          |   18 +++++++++++++----- include/drm/drm_core.h      |    2 +-

 3 files changed, 15 insertions(+), 6 deletions(-)
include/drm/drmP.h +7 -5
index c1b9871..6d4bad5 100644
@@ -1071,11 +1071,19 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
        return ((dev->driver->driver_features & feature) ? 1 : 0);
  }
 
-#ifdef __alpha__
-#define drm_get_pci_domain(dev) dev->hose->index
-#else
-#define drm_get_pci_domain(dev) 0
-#endif
+static inline int drm_get_pci_domain(struct drm_device *dev)
+{
+#ifndef __alpha__
+       /* For historical reasons, drm_get_pci_domain() is busticated
+        * on most archs and has to remain so for userspace interface
+        * < 1.4, except on alpha which was right from the beginning
+        */
Quoted 8 lines

include/drm/drmP.h static __inline__ int drm_core_check_feature(struct drm_device *dev, · line 1085

Quoted 5 lines
include/drm/drmP.h +5 -0
+       if (dev->if_version < 0x10004)
+               return 0;
+#endif /* __alpha__ */
+
+       return pci_domain_nr(dev->pdev->bus);

error: implicit declaration of function ‘pci_domain_nr’ on m68k without PCI.

Quoted 5 lines

I don't think I want to add an ifdef CONFIG_PCI into the drm layer for this, since we seem to be okay everywhere else,

lets ask jbarnes, not sure if its safe to just add this to the !CONFIG_PCI section of the linux/pci.h

Hm, so pci_domain_nr should just return 0 on platforms where CONFIG_PCI_DOMAINS isn't set. I'd expect that to be the case when CONFIG_PCI=n... Maybe we just need to shuffle the definition around?

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
maintainer
#9 lore raw
Quoted 58 lines · Jesse Barnes
Quoted 55 lines · On Fri, 13 Aug 2010 09:33:35 +1000 Dave Airlie <[email protected]> wrote:
Quoted 41 lines · Geert Uytterhoeven
Quoted 39 lines · Benjamin Herrenschmidt

(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward compatible way along with a change to libdrm.

When the interface version is set to 1.4, we assume userspace understands domains and the world is at peace. We thus pass proper domain numbers instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with ignoring domains in the later case (well, except on alpha of course)

---
 drivers/gpu/drm/drm_ioctl.c |    1 + include/drm/drmP.h          |   18 +++++++++++++----- include/drm/drm_core.h      |    2 +-

 3 files changed, 15 insertions(+), 6 deletions(-)
include/drm/drmP.h +7 -5
index c1b9871..6d4bad5 100644
@@ -1071,11 +1071,19 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
        return ((dev->driver->driver_features & feature) ? 1 : 0);
  }
 
-#ifdef __alpha__
-#define drm_get_pci_domain(dev) dev->hose->index
-#else
-#define drm_get_pci_domain(dev) 0
-#endif
+static inline int drm_get_pci_domain(struct drm_device *dev)
+{
+#ifndef __alpha__
+       /* For historical reasons, drm_get_pci_domain() is busticated
+        * on most archs and has to remain so for userspace interface
+        * < 1.4, except on alpha which was right from the beginning
+        */
Quoted 8 lines

include/drm/drmP.h static __inline__ int drm_core_check_feature(struct drm_device *dev, · line 1085

Quoted 5 lines
include/drm/drmP.h +5 -0
+       if (dev->if_version < 0x10004)
+               return 0;
+#endif /* __alpha__ */
+
+       return pci_domain_nr(dev->pdev->bus);

error: implicit declaration of function ‘pci_domain_nr’ on m68k without PCI.

I don't think I want to add an ifdef CONFIG_PCI into the drm layer for this, since we seem to be okay everywhere else,

Quoted 6 lines
Quoted 2 lines

lets ask jbarnes, not sure if its safe to just add this to the !CONFIG_PCI section of the linux/pci.h

Hm, so pci_domain_nr should just return 0 on platforms where CONFIG_PCI_DOMAINS isn't set.  I'd expect that to be the case when CONFIG_PCI=n...  Maybe we just need to shuffle the definition around?

I suspect something like the attached would suffice.

Or maybe moving the CONFIG_PCI_DOMAINS checkout outside CONFIG_PCI.

Dave.

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev

--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

maintainer
#10 lore raw
In reply to Jesse Barnes
Quoted 58 lines · Jesse Barnes
Quoted 55 lines · On Fri, 13 Aug 2010 09:33:35 +1000 Dave Airlie <[email protected]> wrote:
Quoted 41 lines · Geert Uytterhoeven
Quoted 39 lines · Benjamin Herrenschmidt

(For some reason I thought that went in ages ago ...)

This fixes support for PCI domains in what should hopefully be a backward compatible way along with a change to libdrm.

When the interface version is set to 1.4, we assume userspace understands domains and the world is at peace. We thus pass proper domain numbers instead of 0 to userspace.

The newer libdrm will then try 1.4 first, and fallback to 1.1, along with ignoring domains in the later case (well, except on alpha of course)

---
 drivers/gpu/drm/drm_ioctl.c |    1 + include/drm/drmP.h          |   18 +++++++++++++----- include/drm/drm_core.h      |    2 +-

 3 files changed, 15 insertions(+), 6 deletions(-)
include/drm/drmP.h +7 -5
index c1b9871..6d4bad5 100644
@@ -1071,11 +1071,19 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
        return ((dev->driver->driver_features & feature) ? 1 : 0);
  }
 
-#ifdef __alpha__
-#define drm_get_pci_domain(dev) dev->hose->index
-#else
-#define drm_get_pci_domain(dev) 0
-#endif
+static inline int drm_get_pci_domain(struct drm_device *dev)
+{
+#ifndef __alpha__
+       /* For historical reasons, drm_get_pci_domain() is busticated
+        * on most archs and has to remain so for userspace interface
+        * < 1.4, except on alpha which was right from the beginning
+        */
Quoted 8 lines

include/drm/drmP.h static __inline__ int drm_core_check_feature(struct drm_device *dev, · line 1085

Quoted 5 lines
include/drm/drmP.h +5 -0
+       if (dev->if_version < 0x10004)
+               return 0;
+#endif /* __alpha__ */
+
+       return pci_domain_nr(dev->pdev->bus);

error: implicit declaration of function ‘pci_domain_nr’ on m68k without PCI.

I don't think I want to add an ifdef CONFIG_PCI into the drm layer for this, since we seem to be okay everywhere else,

Quoted 6 lines
Quoted 2 lines

lets ask jbarnes, not sure if its safe to just add this to the !CONFIG_PCI section of the linux/pci.h

Hm, so pci_domain_nr should just return 0 on platforms where CONFIG_PCI_DOMAINS isn't set.  I'd expect that to be the case when CONFIG_PCI=n...  Maybe we just need to shuffle the definition around?

I suspect something like the attached would suffice.

Or maybe moving the CONFIG_PCI_DOMAINS checkout outside CONFIG_PCI.

Dave.

#11 lore raw
Quoted 8 lines
Quoted 4 lines

Hm, so pci_domain_nr should just return 0 on platforms where CONFIG_PCI_DOMAINS isn't set.  I'd expect that to be the case when CONFIG_PCI=n...  Maybe we just need to shuffle the definition around?

I suspect something like the attached would suffice.

Or maybe moving the CONFIG_PCI_DOMAINS checkout outside CONFIG_PCI.

Yeah, that looks ok, and better than putting it in drm. I'll apply to my for-linus branch for the next PCI fixes pull.

Thanks,
Jesse

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

#12 lore raw
In reply to Dave Airlie
Quoted 8 lines
Quoted 4 lines

Hm, so pci_domain_nr should just return 0 on platforms where CONFIG_PCI_DOMAINS isn't set.  I'd expect that to be the case when CONFIG_PCI=n...  Maybe we just need to shuffle the definition around?

I suspect something like the attached would suffice.

Or maybe moving the CONFIG_PCI_DOMAINS checkout outside CONFIG_PCI.

Yeah, that looks ok, and better than putting it in drm. I'll apply to my for-linus branch for the next PCI fixes pull.

Thanks,
Jesse