Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3644541pxb; Mon, 16 Nov 2020 22:47:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJynop8jfsgTQD8OLMyRv7ThAkwLI8Whvq3SNN35GZ2Fkf44KAClluiEhvF2aGzMjm8W4Nsy X-Received: by 2002:a17:906:178b:: with SMTP id t11mr9967826eje.152.1605595665073; Mon, 16 Nov 2020 22:47:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605595665; cv=none; d=google.com; s=arc-20160816; b=ncTx0BoOLGVd4leLT0lWDl9Kbrxse9dA6ooZiSMMFhMcVF24CIcgjxp49s5fEQWjT9 vJYC+7bhvtMyWWYXfXuqeRyHxLmsutYAlDWAknFMVt4JSngDbuCULyDz1HH9A8nllv5x k4hIKy/GBt94ts4UX2+bOAg6LB238Yj6b2EkydBFlWhWUQYN4t6UoAc12i7GSw/09zyx wtOeKuIpuc3lTPJ9zhY0ewF1hfaT2AeTfkciaHCFEN5oltPTj2Ahkn7cH4kVx59pUlZz wutoPw1euu+CvfFQ26ys9YxA7Xd/JSWJHMKeh+A8xomH9RKVb41Oes7DUOnenP2uxWVt kx5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=l3yf1pI4pPjb0fZV4RsUzFVg8mQ5TNCxKvXOTDa1kHo=; b=pvddCr3x/4xVM2EMcU0fF4Cs9KApU4KIv+LfdoPGmgn6+bEpdnMeA9j7Qo6mq2E2HD u6lY/xlyBrjRRNZcbWJ0ImwHIChNS1+4UdGIBMOMUU9gLOvokSKhWWgkXgT2mo1HKKzG WeSS5WW5h5aeDVs1ctLhkBahNs8lf0lG4/GxjMKeQYsDTRE6obiB7Iz3ranv9VxfPSCT LjyE5l7KSQYktfdVi/QTV9TNU2Zp26pEULCRDE2UrrcGZPAq7hD8kT8VIfOMp1Pf89Xm KayFfKBAHJ+JwoNCMdSsFm53ZbKLKPrIpS63yJ6SXrJDOcyQvTk777mQNLL2rSImGMnQ 9Nrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc4si12565083ejb.188.2020.11.16.22.47.21; Mon, 16 Nov 2020 22:47:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726200AbgKQGqF (ORCPT + 99 others); Tue, 17 Nov 2020 01:46:05 -0500 Received: from mga04.intel.com ([192.55.52.120]:29108 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725792AbgKQGqF (ORCPT ); Tue, 17 Nov 2020 01:46:05 -0500 IronPort-SDR: a1sVP0jDy3TdTmOGdRdiXw0E8SATfGe7gxDBsyChQzdkIg553EBdLiKeuBsCaXUFJtSpX4pVAu HYfFE96UGhxg== X-IronPort-AV: E=McAfee;i="6000,8403,9807"; a="168295858" X-IronPort-AV: E=Sophos;i="5.77,484,1596524400"; d="scan'208";a="168295858" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2020 22:46:04 -0800 IronPort-SDR: oPByFUcIR23Myifk+UBC6rKyN+Ak6PGMMeO1W0YSO+b61rD/oBl1lHFMcd4E634XG5VHfgfNRH NDylH3oPKxQw== X-IronPort-AV: E=Sophos;i="5.77,484,1596524400"; d="scan'208";a="310116791" Received: from gliakhov-mobl2.ger.corp.intel.com (HELO ubuntu) ([10.252.34.253]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2020 22:46:03 -0800 Date: Tue, 17 Nov 2020 07:45:54 +0100 From: Guennadi Liakhovetski To: Mathieu Poirier Cc: Arnaud POULIQUEN , "ohad@wizery.com" , "bjorn.andersson@linaro.org" , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 8/8] rpmsg: Turn name service into a stand alone driver Message-ID: <20201117064553.GA10837@ubuntu> References: <20201109175536.GD3395222@xps15> <20201111144942.GA6403@ubuntu> <20201112115115.GA11069@ubuntu> <945f377d-1975-552d-25b2-1dc25d3c3a46@st.com> <2d25d1aa-bd8a-f0db-7888-9f72edc9f687@st.com> <20201116151028.GA1519@ubuntu> <20201116224003.GC3892875@xps15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201116224003.GC3892875@xps15> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mathieu, On Mon, Nov 16, 2020 at 03:40:03PM -0700, Mathieu Poirier wrote: > On Mon, Nov 16, 2020 at 04:51:52PM +0100, Arnaud POULIQUEN wrote: [snip] > > Having said that, does this guarantee the probe, a good question! > > Maybe you or Mathieu have the answer, not me... > > I did a lot of probing, went deep in the bowels of the user mode helper > subsystem and looked at sys_load_module(). Especially at do_init_module() where > function do_one_initcall()[1] is called on mod->init, which happens to be > rpmsg_ns_init() where the name space driver is registered. I am confident we > can rely on this mechanism. Thanks for investigating and confirming that! So, we can be confident, that if the module is already loaded at the time when the NS device is registered, the probing happens synchronously. Now, as for how to actually load the module, I'd really propose to move rpmsg_ns_register_device() into the .c file and then the problem will be resolved automatically: as a symbol dependence the module will be loaded whenever another module, calling rpmsg_ns_register_device() is loaded. Thanks Guennadi