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.8 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 941F2C2D0A3 for ; Mon, 26 Oct 2020 23:47:22 +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 4115720872 for ; Mon, 26 Oct 2020 23:47:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wGFee1nt"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="0SMOf1DB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4115720872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com 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-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8oMDFJxAXrHHjtCUj7XRyHwAZJz9myy7QMzhIC2QZrs=; b=wGFee1ntyVd3ol+5rm68kMS90 2Z13myaii9N48Xt42Kpu9lMpFLwHBxk24EW4fHfWZKkroJN8G+8+zB5xbSceQosdGcEIPtawJiFnP jWNr333XXXVRi/bUWSDYe+WV4vYY1N3+JJuQdji0VV8/MQeWQft0B5rmvYjwd/tVATkKBgztw6JdU b58XquZP6WIwKHVpeh4w8lGuwgKRcI4+6YNujKVQVH1zRqnMLxK4Co9atLZjRhRwshjUv/hONa6H9 spR6jssJ6Xxb/dTqdoZYEh0pG+Jb+Ifg3wv6YmnNFZ2kOMEWrLIadVWJCueittVtWaBfLTmuDNkG1 d81UiOX1A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXCBc-0007eX-1T; Mon, 26 Oct 2020 23:46:00 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXCBY-0007d9-MV for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 23:45:58 +0000 Received: by mail-pf1-x443.google.com with SMTP id w65so4270733pfd.3 for ; Mon, 26 Oct 2020 16:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=CEpRSfPNTBvlxfYwUVnXYQlXTvWMOmV50TdlaJw1/KM=; b=0SMOf1DBVnGfkBYKzhH2a0tJ+REpXkXynH4K1FkevO4XwOsdbUkx67P1TdxjmRFFi4 LRYeADD/+TG5cvbQ8AQVgAEJjxqRsOuyvQ0OJbeK5+P+e6MQqzqUIKNdjMZYSzgMDCZD 8edAwLsdoDn763JJSKRFFFjhStAohpC+RGJUEl7GScZzII7FCVA36BUrGlNfJaypKh76 E9B0j2acaeKPCe/r18hK6ezi+PEG7U0Xy34wvBgFxhs2Ubh2b/HmoPSctVSKwVKf4g+v xrxQy9/nrV7XkafX1N87z4jsZ+G3W3pp75b5wvgZCMEOWFq0h6CiAPHQBFECayg6YImW Mdzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=CEpRSfPNTBvlxfYwUVnXYQlXTvWMOmV50TdlaJw1/KM=; b=d7RkFqlVxXlzLxRZOT5I952ceEno/SvRTT/ZMPX/BziiLvrDBMfoxG13aVVYduYcqT UKEveL1YQ/tmcykxFXQYr4ghr2BAHnBWIW4uixdKyFrB2oj/BcGpCwsNg2oYHgsuHqPP UBdVyBrDL4bvj1HEmBKcTldv0AguJH1DbcpsT8cBZrkaiXFiUeMg6yoQvlWTimPKmn/A /8Xo7a1wfL3Z84K7ywqObr8uf47l3oCE4r4REh2+LneVLt4IEnUxTuF6vZLwaYLec35B PH056Gj4467FsFHYkzVpVITlXrW6nc2IVfXFioRwNeQGpU0gkeUak5FYIhNjsuo188mf oYdg== X-Gm-Message-State: AOAM530YC2QNGBSxyMVuKmvrCnNkn4ZCZOirJGqPjVaPwUZsQmztIuUZ o0cBiY5Jww0xqt7s2EOK60qGCg== X-Google-Smtp-Source: ABdhPJzOSOKqn3r6Vv7s50wlTif70FjRaXnKyAMdNoynVTsKPMFy/tAzUXWNhP3B1BlCZCSsjArYSw== X-Received: by 2002:a63:609:: with SMTP id 9mr6412492pgg.381.1603755954650; Mon, 26 Oct 2020 16:45:54 -0700 (PDT) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net. [71.197.186.152]) by smtp.gmail.com with ESMTPSA id w10sm13228085pjy.13.2020.10.26.16.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 16:45:53 -0700 (PDT) From: Kevin Hilman To: Marc Zyngier Subject: Re: [PATCH 0/2] irq-meson-gpio: make it possible to build as a module In-Reply-To: References: <20201020072532.949137-1-narmstrong@baylibre.com> <87v9eyo75s.wl-maz@kernel.org> <7ha6w9hsfm.fsf@baylibre.com> Date: Mon, 26 Oct 2020 16:45:53 -0700 Message-ID: <7hblgoft5a.fsf@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_194557_013579_C4CC53A8 X-CRM114-Status: GOOD ( 28.69 ) 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: linux-amlogic@lists.infradead.org, jbrunet@baylibre.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Marc Zyngier writes: > On 2020-10-26 16:18, Kevin Hilman wrote: >> Marc Zyngier writes: >> >>> On Tue, 20 Oct 2020 08:25:30 +0100, >>> Neil Armstrong wrote: >>>> >>>> In order to reduce the kernel Image size on multi-platform >>>> distributions, >>>> make it possible to build the Amlogic GPIO IRQ controller as a module >>>> by switching it to a platform driver. >>>> >>>> The second patch removes MESON_IRQ_GPIO selection from ARCH_MESON to >>>> allow >>>> building the driver as module. >>>> >>>> Neil Armstrong (2): >>>> irqchip: irq-meson-gpio: make it possible to build as a module >>>> arm64: meson: remove MESON_IRQ_GPIO selection >>>> >>>> arch/arm64/Kconfig.platforms | 1 - >>>> drivers/irqchip/Kconfig | 5 +- >>>> drivers/irqchip/irq-meson-gpio.c | 89 >>>> ++++++++++++++++++++------------ >>>> 3 files changed, 59 insertions(+), 36 deletions(-) >>> >>> I've tried this series on my vim3l with the this driver compiled as a >>> module, and lost the Ethernet interface in the process, as the phy >>> wasn't able to resolve its interrupt and things fail later on: >>> >>> [ 72.238291] meson8b-dwmac ff3f0000.ethernet eth1: no phy at addr -1 >>> [ 72.238917] meson8b-dwmac ff3f0000.ethernet eth1: stmmac_open: >>> Cannot attach to PHY (error: -19) >>> >>> This is a generic problem with making DT-based interrupt controllers >>> modular when not *all* the drivers can deal with probing deferral. >> >> Yes, but this series still keeps the default as built-in. >> >> If you build as a module, and you add `fw_devlink=on` to the kernel >> command-line, device-links will be created based on DT dependencies >> which will ensure the right module load order. > > It doesn't work here. I get the exact same error (well, with eth0 > instead > of eth1). In my experience, fw_devlink isn't reliable yet. Config on > request. > >> I've tested this series with `fw_devlink=on` on several Amlogic >> platforms and it works just fine, but since it requires the extra >> cmdline option, I think the default should remain built-in. >> >> So, I'd still like to see this series merged so that at least it's an >> option to enable this as a module. > > I have taken similar patches in 5.9 for other SoC families (qcomm, mtk), > and ended up reverting them in -rc2, because there is simply too much > breakage. Even keeping it as built in changes the init order, which > tons of drivers depend on. I proposed a middle-of-the-road approach > (modules can break, built-in stays the same) which Rob pushed back on. > > So either we fix fw_devlink to work for everything and be on by default, > or we keep the current setup. > >> Also, another reason to make it optional is that not all platforms need >> this feature at all, but right now we select it for all Amlogic SoCs. > > I understand that, but I don't want another episode of widespread > breakages, and this series definitely breaks things. Yeah, I understand there's potential breakage things if you enable build as a module, but that's not the default with this series so one would have to do that on purpose. If you don't manually enable as a module and leave the default as built-in (e.g. CONFIG_MESON_IRQ_GPIO=y) does it work for you? Using your .config, I used the default to built-in and this series booted fine for me on top of v5.10-rc1 on my VIM3L. Using your .config, I do see issues with this driver when explicity enabling as a module, and I'll debug those, but again, leaving it as built-in, it's working fine for me with your .config. I understand that even building as a built-in might change link order, but I'd be pretty surprised if just changing from OF_DECLARE to a built-in module made things break. If so, I can commit to helping find/fix any issues there. For that matter, I'm actively working on making all amlogic drivers modular (including clocks, pinctrl, reset, etc.) and I have it all working locally several SoCs, so I will also commit to actively help find/fix any issues this uncovers with ordering. My goal is to enable the *option* of building everything as modules (but leave them as built-in by default) so I can help debug any remaining fw_devlink issues. Kevin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel