From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932176AbcE0AMs (ORCPT ); Thu, 26 May 2016 20:12:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:54587 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755162AbcE0AMr (ORCPT ); Thu, 26 May 2016 20:12:47 -0400 Date: Fri, 27 May 2016 02:12:43 +0200 From: "Luis R. Rodriguez" To: Wan Zongshun Cc: "Luis R. Rodriguez" , Oded Gabbay , Christian =?iso-8859-1?Q?K=F6nig?= , iommu@lists.linux-foundation.org, "Linux-Kernel@Vger. Kernel. Org" , Wan Zongshun Subject: Re: [RFT v2] iommu/amd: use subsys_initcall() on amdv2 iommu Message-ID: <20160527001243.GP11948@wotan.suse.de> References: <570BA694.8040900@amd.com> <570BAC2B.4090508@amd.com> <20160412220715.GL1990@wotan.suse.de> <20160418120350.GE1990@wotan.suse.de> <571591CC.40700@iommu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <571591CC.40700@iommu.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 19, 2016 at 10:02:52AM +0800, Wan Zongshun wrote: > > You have to take carefully to arrange the calling sequence for > iommuv1, iommuv2, kfd module, and drm like the following sequence : > v1 ->v2->kfd, drm. > > iommuv1 -- rootfs_initcall(fn) > IOMMUV2 -- device_initcall(fn) > kfd module -- late_initcall(fn) > drm -- late_initcall(fn) Thanks, it turns out this is not exactly enough, given as Joerg notes: -- 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. --- We have a theoretical race still possible between the kfd module and the drm driver. I'll reply to Joerg's e-mail with more feedback. Luis From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Luis R. Rodriguez" Subject: Re: [RFT v2] iommu/amd: use subsys_initcall() on amdv2 iommu Date: Fri, 27 May 2016 02:12:43 +0200 Message-ID: <20160527001243.GP11948@wotan.suse.de> References: <570BA694.8040900@amd.com> <570BAC2B.4090508@amd.com> <20160412220715.GL1990@wotan.suse.de> <20160418120350.GE1990@wotan.suse.de> <571591CC.40700@iommu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <571591CC.40700-6ukY98dZOFrYtjvyW6yDsg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Wan Zongshun Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, "Linux-Kernel@Vger. Kernel. Org" , Wan Zongshun , "Luis R. Rodriguez" , Christian =?iso-8859-1?Q?K=F6nig?= List-Id: iommu@lists.linux-foundation.org On Tue, Apr 19, 2016 at 10:02:52AM +0800, Wan Zongshun wrote: > > You have to take carefully to arrange the calling sequence for > iommuv1, iommuv2, kfd module, and drm like the following sequence : > v1 ->v2->kfd, drm. > > iommuv1 -- rootfs_initcall(fn) > IOMMUV2 -- device_initcall(fn) > kfd module -- late_initcall(fn) > drm -- late_initcall(fn) Thanks, it turns out this is not exactly enough, given as Joerg notes: -- 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. --- We have a theoretical race still possible between the kfd module and the drm driver. I'll reply to Joerg's e-mail with more feedback. Luis