Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3309471pxb; Mon, 25 Jan 2021 12:19:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeDFVJKdm7EVWH3CmufL0B7jpNYqRx3UYu1lOauWHXfkC3qYEq3OAyewl4PJiSdRzaOBrO X-Received: by 2002:a17:906:3a13:: with SMTP id z19mr1467877eje.317.1611605984397; Mon, 25 Jan 2021 12:19:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611605984; cv=none; d=google.com; s=arc-20160816; b=E5uFpm1uUUBitvaJPnj4wscPa0LAD08JxyBRdZTxJJ9U0BdDBFpKlMvJ69YxgoUPqY WgGbpTnJmG50Si3eaa1fBOR2rrriKH+JDlH2GFZRAsSbgtafulWL7ch3Zq0li1lqYkxl dCtkNqX6NH2tj6dToamj+c2J/rLOiZ1DItqP3klsthzJfKeKMpaTrF9M2qg8KifjmNR9 PjIpV3rasHs4aRdMj7g2eyf7JHA8Lg7vHrgw50mhd5yYU3ioTcT+wLWIm9anbtY3hWXg vTJwDQkgOQRLn1piY3eenExgzsZIDHOcL7aXsCg20EdwyU0sEwqhkzxtAgLWoL3fndjK JINg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=TRMRiMPnLqcdMCzeCpMY9I5j0GaNmNLOnRGXlUp7ZT8=; b=S+sIYAC7oHXY/kkU8n+fF0DU6eqnCUd9VvUK6ZnJeEYJNowXmapjOwYvZFioSBWA/Z wmKKT6bU8qbRxHx+by5ZUqh62+frixSStsTPFSSeZavudgNjYenoSPXzZ5BbsPGFQ1qQ PNbxeMNxARtDHxA1ojM4ikmgHZqHDdURdAkEqXx502+mW0UNQCoLuR8HhD4Cx5xrkuWE kI9KXLFYc/ozEtFVSdqa5+mB3ZrLOQTx1SXQk6aF+A9xEckyuC1lh+PSA9LZvpq7sUvs 6jemMMzVdFlhvImKfL+XYXonmRnYcGTmCL0Eyg3yUGPTjobHUdmWhji0+OQLV/+tBVun idUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=qVALf0uT; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc22si8341475edb.80.2021.01.25.12.19.19; Mon, 25 Jan 2021 12:19:44 -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; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=qVALf0uT; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731633AbhAYURd (ORCPT + 99 others); Mon, 25 Jan 2021 15:17:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732207AbhAYTvY (ORCPT ); Mon, 25 Jan 2021 14:51:24 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA229C061573; Mon, 25 Jan 2021 11:49:34 -0800 (PST) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id E968922ED8; Mon, 25 Jan 2021 20:49:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1611604173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TRMRiMPnLqcdMCzeCpMY9I5j0GaNmNLOnRGXlUp7ZT8=; b=qVALf0uTVCxJRs5Ek+hjUqnfIBgrqMb2y5kS5ewEe0dB0cM1IODnyCsbAtmptCCioyQNtl 3dARMjTSGXO8NauKzu8vlJT4ckMqPlywphyE8RqFAoQ8q02Iu3XppELd/IAT/zTVzPrIbl j6DWPzB+ZAl5Tz6Jfeysii8zyDqmRPA= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 25 Jan 2021 20:49:32 +0100 From: Michael Walle To: Geert Uytterhoeven Cc: Saravana Kannan , Lorenzo Pieralisi , Roy Zang , PCI , LKML , Minghuan Lian , Mingkai Hu , Greg Kroah-Hartman , Bjorn Helgaas , linuxppc-dev , linux-arm-kernel Subject: Re: [PATCH] PCI: dwc: layerscape: convert to builtin_platform_driver() In-Reply-To: References: <20210120105246.23218-1-michael@walle.cc> User-Agent: Roundcube Webmail/1.4.10 Message-ID: X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2021-01-21 12:01, schrieb Geert Uytterhoeven: > Hi Saravana, > > On Thu, Jan 21, 2021 at 1:05 AM Saravana Kannan > wrote: >> On Wed, Jan 20, 2021 at 3:53 PM Michael Walle >> wrote: >> > Am 2021-01-20 20:47, schrieb Saravana Kannan: >> > > On Wed, Jan 20, 2021 at 11:28 AM Michael Walle >> > > wrote: >> > >> >> > >> [RESEND, fat-fingered the buttons of my mail client and converted >> > >> all CCs to BCCs :(] >> > >> >> > >> Am 2021-01-20 20:02, schrieb Saravana Kannan: >> > >> > On Wed, Jan 20, 2021 at 6:24 AM Rob Herring wrote: >> > >> >> >> > >> >> On Wed, Jan 20, 2021 at 4:53 AM Michael Walle >> > >> >> wrote: >> > >> >> > >> > >> >> > fw_devlink will defer the probe until all suppliers are ready. We can't >> > >> >> > use builtin_platform_driver_probe() because it doesn't retry after probe >> > >> >> > deferral. Convert it to builtin_platform_driver(). >> > >> >> >> > >> >> If builtin_platform_driver_probe() doesn't work with fw_devlink, then >> > >> >> shouldn't it be fixed or removed? >> > >> > >> > >> > I was actually thinking about this too. The problem with fixing >> > >> > builtin_platform_driver_probe() to behave like >> > >> > builtin_platform_driver() is that these probe functions could be >> > >> > marked with __init. But there are also only 20 instances of >> > >> > builtin_platform_driver_probe() in the kernel: >> > >> > $ git grep ^builtin_platform_driver_probe | wc -l >> > >> > 20 >> > >> > >> > >> > So it might be easier to just fix them to not use >> > >> > builtin_platform_driver_probe(). >> > >> > >> > >> > Michael, >> > >> > >> > >> > Any chance you'd be willing to help me by converting all these to >> > >> > builtin_platform_driver() and delete builtin_platform_driver_probe()? >> > >> >> > >> If it just moving the probe function to the _driver struct and >> > >> remove the __init annotations. I could look into that. >> > > >> > > Yup. That's pretty much it AFAICT. >> > > >> > > builtin_platform_driver_probe() also makes sure the driver doesn't ask >> > > for async probe, etc. But I doubt anyone is actually setting async >> > > flags and still using builtin_platform_driver_probe(). >> > >> > Hasn't module_platform_driver_probe() the same problem? And there >> > are ~80 drivers which uses that. >> >> Yeah. The biggest problem with all of these is the __init markers. >> Maybe some familiar with coccinelle can help? > > And dropping them will increase memory usage. Although I do have the changes for the builtin_platform_driver_probe() ready, I don't think it makes much sense to send these unless we agree on the increased memory footprint. While there are just a few builtin_platform_driver_probe() and memory increase _might_ be negligible, there are many more module_platform_driver_probe(). -michael