Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1386216

Re: [RFT v2] iommu/amd: use subsys_initcall() on amdv2 iommu

From Joerg Roedel <joro@8bytes.org>
Newsgroups linux.kernel
Subject Re: [RFT v2] iommu/amd: use subsys_initcall() on amdv2 iommu
Date 2016-04-25 12:30 +0200
Message-ID <rrLWa-46w-33@gated-at.bofh.it> (permalink)
References (5 earlier) <rneFs-6vF-5@gated-at.bofh.it> <rpbaq-10N-9@gated-at.bofh.it> <rpbtM-1pm-3@gated-at.bofh.it> <rpbtM-1pm-1@gated-at.bofh.it> <rpga6-5po-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Apr 18, 2016 at 02:03:50PM +0200, Luis R. Rodriguez wrote:
> You said that with my patch you saw AMD IOMMUv2 kick off first,
> that was intentional as I thought that's what you needed. Can
> someone please describe the requirements?
> 
> Also what does drm use that you say has a conflict already? What
> drm code are we talking about exactly ?

The required order is:

	1. AMD IOMMUv1 (in-kernel only, initialized at boot time after PCI)
	2. AMD IOMMUv2 (in-kernel or as module, provides demand paging
			and uses v1 interfaces to talk to the IOMMU)
	3. AMD-KFD     (Implements compute offloading to the GPU and
			uses AMD IOMMUv2 functionality, also provides a
			symbol for the radeon driver)
	4. DRM with    (Checks if the symbol provided by AMD-KFD is
	   Radeon	available at init time and does the KFD
			initialization from there, because the GPU needs
			to be up first)

So AMD IOMMUv2 does not initialize (but it does load to have the symbols
available for drivers that optionally use its functionality) without the
AMD IOMMUv1 driver, as it can't access the IOMMU hardware then.

AMD-KFD does not load without AMD IOMMUv2 being loaded, as it depends on
its symbols. AMD-KFD on the other hand needs to be loaded before the
radeon driver (but this it not enforced by symbols), because otherwise
the radeon driver will not initialize the AMD-KFD driver.

When AMD-KFD is loaded and you load radeon then, you get the KFD
functionality in the kernel. Then you can move on to the fun getting the
userspace running and actually execute anything on the GPU. But thats
another story.

I know what you think, and I agree: It's a big mess :)

Regards,

	Joerg

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [RFT v2] iommu/amd: use subsys_initcall() on amdv2 iommu Oded Gabbay <oded.gabbay@gmail.com> - 2016-04-18 08:50 +0200
  Re: [RFT v2] iommu/amd: use subsys_initcall() on amdv2 iommu Oded Gabbay <oded.gabbay@gmail.com> - 2016-04-18 09:10 +0200
    Re: [RFT v2] iommu/amd: use subsys_initcall() on amdv2 iommu "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-04-18 14:10 +0200
      Re: [RFT v2] iommu/amd: use subsys_initcall() on amdv2 iommu Wan Zongshun <vw@iommu.org> - 2016-04-19 04:10 +0200
      Re: [RFT v2] iommu/amd: use subsys_initcall() on amdv2 iommu Joerg Roedel <joro@8bytes.org> - 2016-04-25 12:30 +0200

csiph-web