diff mbox

[1/2] drivers: Move iommu/ before gpu/ in Makefile

Message ID 1419246435-7050-2-git-send-email-oded.gabbay@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Oded Gabbay Dec. 22, 2014, 11:07 a.m. UTC
AMD GPU devices are dependent on AMD IOMMU controller functionality to allow
the GPU to access a process's virtual memory address space, without the need
for pinning the memory.

This patch changes the order in the drivers makefile, so iommu/ subsystem is
linked before gpu/ subsystem. That way, if the gpu and iommu drivers are
compiled inside the kernel image (not as modules), the correct order of device
loading is still maintained (iommu module is loaded before gpu module).

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
---
 drivers/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Oded Gabbay Dec. 23, 2014, 12:09 p.m. UTC | #1
Hello Linus,
Dave Airlie asked me to send this patch to you for review.
See link below for cover-letter for this patch that explains the background a 
bit more:
http://lists.freedesktop.org/archives/dri-devel/2014-December/074452.html

Thanks,
	Oded


On 12/22/2014 01:07 PM, Oded Gabbay wrote:
> AMD GPU devices are dependent on AMD IOMMU controller functionality to allow
> the GPU to access a process's virtual memory address space, without the need
> for pinning the memory.
>
> This patch changes the order in the drivers makefile, so iommu/ subsystem is
> linked before gpu/ subsystem. That way, if the gpu and iommu drivers are
> compiled inside the kernel image (not as modules), the correct order of device
> loading is still maintained (iommu module is loaded before gpu module).
>
> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
> ---
>   drivers/Makefile | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/Makefile b/drivers/Makefile
> index ebee555..106200f 100644
> --- a/drivers/Makefile
> +++ b/drivers/Makefile
> @@ -50,7 +50,10 @@ obj-$(CONFIG_RESET_CONTROLLER)	+= reset/
>   obj-y				+= tty/
>   obj-y				+= char/
>
> -# gpu/ comes after char for AGP vs DRM startup
> +# iommu/ comes before gpu as gpu are using iommu controllers
> +obj-$(CONFIG_IOMMU_SUPPORT)	+= iommu/
> +
> +# gpu/ comes after char for AGP vs DRM startup and after iommu
>   obj-y				+= gpu/
>
>   obj-$(CONFIG_CONNECTOR)		+= connector/
> @@ -141,7 +144,6 @@ obj-y				+= clk/
>
>   obj-$(CONFIG_MAILBOX)		+= mailbox/
>   obj-$(CONFIG_HWSPINLOCK)	+= hwspinlock/
> -obj-$(CONFIG_IOMMU_SUPPORT)	+= iommu/
>   obj-$(CONFIG_REMOTEPROC)	+= remoteproc/
>   obj-$(CONFIG_RPMSG)		+= rpmsg/
>
>
Linus Torvalds Dec. 26, 2014, 12:18 a.m. UTC | #2
On Tue, Dec 23, 2014 at 4:09 AM, Oded Gabbay <oded.gabbay@amd.com> wrote:
> Hello Linus,
> Dave Airlie asked me to send this patch to you for review.

I'm not entirely happy about the fix, since we generally *should*
order things by the different init-levels, but we've done the link
order thing before, and I guess it's acceptable as a band-aid, even if
it's not really how things are supposed to be done.

                      Linus
diff mbox

Patch

diff --git a/drivers/Makefile b/drivers/Makefile
index ebee555..106200f 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -50,7 +50,10 @@  obj-$(CONFIG_RESET_CONTROLLER)	+= reset/
 obj-y				+= tty/
 obj-y				+= char/
 
-# gpu/ comes after char for AGP vs DRM startup
+# iommu/ comes before gpu as gpu are using iommu controllers
+obj-$(CONFIG_IOMMU_SUPPORT)	+= iommu/
+
+# gpu/ comes after char for AGP vs DRM startup and after iommu
 obj-y				+= gpu/
 
 obj-$(CONFIG_CONNECTOR)		+= connector/
@@ -141,7 +144,6 @@  obj-y				+= clk/
 
 obj-$(CONFIG_MAILBOX)		+= mailbox/
 obj-$(CONFIG_HWSPINLOCK)	+= hwspinlock/
-obj-$(CONFIG_IOMMU_SUPPORT)	+= iommu/
 obj-$(CONFIG_REMOTEPROC)	+= remoteproc/
 obj-$(CONFIG_RPMSG)		+= rpmsg/