From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01698C433E0 for ; Mon, 25 Jan 2021 20:18:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7FC22255F for ; Mon, 25 Jan 2021 20:18:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726179AbhAYUSF (ORCPT ); Mon, 25 Jan 2021 15:18:05 -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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71CC3C433E0 for ; Mon, 25 Jan 2021 19:51:49 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BBF3E20684 for ; Mon, 25 Jan 2021 19:51:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BBF3E20684 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4DPgVV63G4zDqx2 for ; Tue, 26 Jan 2021 06:51:46 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=walle.cc (client-ip=2a01:4f8:151:8464::1:2; helo=ssl.serverraum.org; envelope-from=michael@walle.cc; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.a=rsa-sha256 header.s=mail2016061301 header.b=qVALf0uT; dkim-atps=neutral Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4DPgS8018fzDqxZ for ; Tue, 26 Jan 2021 06:49:43 +1100 (AEDT) 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 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roy Zang , Lorenzo Pieralisi , Saravana Kannan , PCI , LKML , Minghuan Lian , linux-arm-kernel , Greg Kroah-Hartman , Bjorn Helgaas , linuxppc-dev , Mingkai Hu Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3E0FC433E0 for ; Mon, 25 Jan 2021 19:51:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5F9B720684 for ; Mon, 25 Jan 2021 19:51:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F9B720684 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=laWS3F3WRP0E3vbBiLSTgsZHJipnmvm4vbA8/otlzr0=; b=jQrtj6QXAuFk+IWd6QSIGuvAv Qvh2UqdzZO/LEQRqGlZ9gZDdrPdJ2BeF7tojt+Kb2NEcbjv5s79gjp2gzz9iKGcXPeoe1rgyGk+XA JPKJCwvxLynAV4+IpYLa8cOOY3+abqeElNoPkMFp5NJu+FUC4jRKiR3mLoAIeMYvASXMSj1xq7t+S vl3n552tXIYGgew10PPVOCtCFBwW07N+YC8jYnVVzuXTI6014h3aCCwOz1LrLKLG3DrNhx/Luwa/i +2OZFRQ57Hjk28lQpPvzF8WnT8vAkSRHOLyCuE5u9hhiKUcgUnXXuzT/FBvoYbXC64yMFzki4d00P 1JMc5mtiw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l47rl-0006uN-C0; Mon, 25 Jan 2021 19:49:37 +0000 Received: from ssl.serverraum.org ([2a01:4f8:151:8464::1:2]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l47ri-0006tk-Hi for linux-arm-kernel@lists.infradead.org; Mon, 25 Jan 2021 19:49:35 +0000 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 Date: Mon, 25 Jan 2021 20:49:32 +0100 From: Michael Walle To: Geert Uytterhoeven 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210125_144934_716189_4B523D30 X-CRM114-Status: GOOD ( 25.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roy Zang , Lorenzo Pieralisi , Saravana Kannan , PCI , LKML , Minghuan Lian , linux-arm-kernel , Greg Kroah-Hartman , Bjorn Helgaas , linuxppc-dev , Mingkai Hu Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel