Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp398181imm; Thu, 6 Sep 2018 04:22:57 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZCCI/A/TY4rYalVr1bUQuRwaIVYpGadt2BeGiAEYAXfdbpBXqcWTV1AIz/ijCddEv5XQUp X-Received: by 2002:a17:902:c8:: with SMTP id a66-v6mr2132791pla.269.1536232977835; Thu, 06 Sep 2018 04:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536232977; cv=none; d=google.com; s=arc-20160816; b=sQrq9gJ5CYeVVHigzjLOVAzE9rp9aj25zTHZr2cgSPoV4CZ/6kxrRgIlKlRk+4+zgG trVZrb6ZboXDBDrL+RucHlW6/mdJm3DVYz8dbN3edNOUZ3ZbaZ+myP9yslJflBx51mpO v8VwMwnhgydym9EDjyAJrcfiL74KHyhR0kYJKGbGNxu0UVcJsAl7b6KeRauZ6i2ziHhg vvdcxp3g61maRo52vhCTNXfovQSdshrrgakxvvEMahvrssheFX6REglWbblRAEgmWRlJ IKX+FFwLw3t26TWrhgGELWo+0nAHd56r54cxbY1Z7cZJCzwAZOH1hfM+JKUY4fzNRU85 J2OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2eljOF+eCw306ghmc1xQWd6eqlSwpdI+izZIbimFenc=; b=aW0CNf+TF3ZhWGLlUN1PA5birXUVsYwDDV54AMT0Verfcil1xZu9uRvNTtnZBVZx65 TN7+z8xQGbAK6R3hs/ZZGQa50ylIXgWX4ke+3BrepDlnJbFfLkYNHhj6Vii6+Ix55yNc F2zQSRJaUb5dLyi2SKe2tBi/PWzP+gs4X6eG0vEReNAC9lPf9VqDVO+LomC9HMielgz7 xlpm9ln6Xs7X1l6FEGnnuwwcPAzoobPFyRyRIRreOyDmtvTa1R3emCHwnD9DIbJnwvsp fy9hcAEHpBRNh2zG0/fxf/0mP3PyQqNUfQ3ZAbUidqBsm/kzjGus/i2SJWxerb4quh5G 3xaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11-v6si4544848pgg.222.2018.09.06.04.22.40; Thu, 06 Sep 2018 04:22:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728299AbeIFPfq (ORCPT + 99 others); Thu, 6 Sep 2018 11:35:46 -0400 Received: from bmailout2.hostsharing.net ([83.223.90.240]:41089 "EHLO bmailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728037AbeIFPfq (ORCPT ); Thu, 6 Sep 2018 11:35:46 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 247E92801FD34; Thu, 6 Sep 2018 13:00:50 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id CB0CF44FAB6; Thu, 6 Sep 2018 13:00:49 +0200 (CEST) Date: Thu, 6 Sep 2018 13:00:49 +0200 From: Lukas Wunner To: Mika Westerberg Cc: linux-kernel@vger.kernel.org, Andreas Noever , Michael Jamet , Yehezkel Bernat , Lu Baolu Subject: Re: [PATCH 2/2] thunderbolt: Initialize after IOMMUs Message-ID: <20180906110049.gfdhurvkvvdjw7zh@wunner.de> References: <20180903132012.23531-1-mika.westerberg@linux.intel.com> <20180903132012.23531-2-mika.westerberg@linux.intel.com> <20180905084746.xmckzskxzsdliz3e@wunner.de> <20180905094602.GH2283@lahna.fi.intel.com> <20180906081337.3mosfpfggfmoj633@wunner.de> <20180906103602.GV2283@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180906103602.GV2283@lahna.fi.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 06, 2018 at 01:36:02PM +0300, Mika Westerberg wrote: > On Thu, Sep 06, 2018 at 10:13:37AM +0200, Lukas Wunner wrote: > > So with this patch, you rely on the linker ordering nhi_init() after > > ir_dev_scope_init(), however to the best of my knowledge the link > > order is not guaranteed. > > What says that? Within the same initcall level, the ordering is determined by the Makefile AFAIK. Someone changes the Makefile, your dependency scheme falls apart. > > Looking at commit acb40d841257, which started this, I'm wondering > > why you did not simply export tbnet_init() and call it from the > > thunderbolt driver after the property stuff has been fully set up? > > After all, thunderbolt-net is useless without thunderbolt or am I > > missing something? Then you could revert back to module_init(). > > The same reason you don't call PCI driver functions from PCI core. It > makes absolutely zero sense. > > Thunderbolt is bus and provides driver API to drivers. We hopefully are > getting other service drivers (say SCSI over TBT) that are going to be > use the same interfaces. Then add a blocking notifier chain into which these service drivers can hook. Other buses have that as well. Thanks, Lukas