Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1988321pxa; Thu, 6 Aug 2020 23:24:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhle50OVBZ1QWvTxMHfbrskLokdPIObh0PBXDKfvih5qFvlVh86aEfahBJ85LOtsDmG71j X-Received: by 2002:a05:6402:1d92:: with SMTP id dk18mr7217131edb.206.1596781495519; Thu, 06 Aug 2020 23:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596781495; cv=none; d=google.com; s=arc-20160816; b=IAiPfJkKvkWaEypRC5ZQfgtW9AEv8mPkZOegTGhdwKRKCBSovClVzw41D+U8CHKFj4 TCSk9AkeAnQxGvoURNXR5U62Tx3uGT/YHk7M0QhvR+VrXIkM4eJO7UuPQh3/KNzUtCBs GUiggSDSD3LeI0r6Y91wd3DIjGdsis8jozCKIUveZ4mbjbi6Z+BAApmsZVuXeVIULCen EnCqINNBDy7dGI/tF6SosRa2K5odM9mc5JJmYCFyFb/K9cF0JYGgsGYHZ6QoTdljBj9p KnnA6rVKjv1PZEUNvLyyVb+pLJF4M2zXPxFZ7RXcJggkPvPpi36jFnA0cAO4rsp+gjqn kROg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kjYnZO75jW+/NGMWgfsZKGwoEpWRxfcQO49H3CEjGVo=; b=iV8LFFDS/4E7aVNf7JAurY6YSrfS0SrSwsVB3LUuRSP0WdyZuCedbc4R/ECCeavwQV JGC3YDfK0FLuvVb5R33gixHhKOhrD4S3ommbx5TZLfpTNHCd7g1/8MUqn6Vu7rplp1Ot qxdHh5NUb9UzBwbQ0GZWN1Msly01/14kZ/EvlmBkXsaVyAxJjwyLQ70AnzAnSgkruh4Z Bg2GJY+ocvzI0edR39krDBI3jcXuHrZkDwdr3Nbd8xV2i96/oDAdo+zdk0MfjmllR6Yh RsFlgotYlDLtEbYaEe8lAmk+ZCo6lENyN0NrllZ+qoOUaTg4ACMZkjfbXgXQoEx8TjyC 2s/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=tiw6O4XW; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t15si4340675edi.256.2020.08.06.23.24.21; Thu, 06 Aug 2020 23:24:55 -0700 (PDT) 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=@google.com header.s=20161025 header.b=tiw6O4XW; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726242AbgHGGXe (ORCPT + 99 others); Fri, 7 Aug 2020 02:23:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbgHGGX2 (ORCPT ); Fri, 7 Aug 2020 02:23:28 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 421D3C061574 for ; Thu, 6 Aug 2020 23:23:28 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id o5so421348pgb.2 for ; Thu, 06 Aug 2020 23:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kjYnZO75jW+/NGMWgfsZKGwoEpWRxfcQO49H3CEjGVo=; b=tiw6O4XWq6TLskF079PRNCB3yu6v54OlBOgQNGuZ5nyrw6dK8b52GuWCH2diP9RaNK QfjP+alu9EsDItQfbi3g8/yH4LN4C0ZtUTlwX0OKDw5v/Z4oth/8HMyVBfhtjaeKFkjM F1QCiL+IHiqg4jJ1xADzTqteLK62kx8j9FYoHk3sOjuLLcCwGKDjEmQw4kzejV1iou0B H3qhv3iLWMoyRWUaYk9aA0W9xQnr5JJl6ulIn8pEoF1irPSsXi8CKE5UXAkRgmx40LqA P7FFdXQazZv1sDUfwnqVmFXIfQ0ANa3JXGF54HlODMIh7ZVAeZAKLMB6WbDaEyau/7U+ +bfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kjYnZO75jW+/NGMWgfsZKGwoEpWRxfcQO49H3CEjGVo=; b=gq8s55sjT2qM8CrTYRwpN5A6GzRHmUKs0Hly7Ptj97jSvfQ0btt5ESd3eYl/1H104m N+1f9qjVqJ0k0asgL581RGKOqmj8kVwExPTdWKSIcy63u5/juqbIeZTnc4+NXdCYf+NQ O15O3RqLLakBqzU1YJCRvvA4W+kHN8cc4rCKqkfWwoRwO7wxc4s37mCZSINFLbD4bgBZ xeUpjGCzDX+s3YoDpYL1KRlbnkhqet971k6Js+Vigb5OHCWGnIAuXSsBMIG8YhGmGDuA zzyou7MhRlQL+y8LxFc6yKnI6I4sfCuIqGe/tCXan0wbD25gc+BlHJNaVS/naNzlhaZI 8XCw== X-Gm-Message-State: AOAM530xM5erC/ovETcoK48VlYexB2XFkYkiwUGm8bM+JtbiKAUxUN6d FHbo9ezcgz5Q6tJ9os0EVxLd3+h1dnDebPqHQeCoDQ== X-Received: by 2002:a65:6381:: with SMTP id h1mr10771109pgv.0.1596781407242; Thu, 06 Aug 2020 23:23:27 -0700 (PDT) MIME-Version: 1.0 References: <20200718000637.3632841-3-saravanak@google.com> <78ad0914-6173-f753-9eba-b7cbfbb51fd6@kali.org> <20200807004001.GF20825@builder.lan> <20200807013903.GG20825@builder.lan> <20200807055842.GP61202@yoga> In-Reply-To: <20200807055842.GP61202@yoga> From: Saravana Kannan Date: Thu, 6 Aug 2020 23:22:50 -0700 Message-ID: Subject: Re: [PATCH v3 2/4] irqchip/qcom-pdc: Switch to using IRQCHIP_PLATFORM_DRIVER helper macros To: Bjorn Andersson Cc: John Stultz , Steev Klimaszewski , Thomas Gleixner , Jason Cooper , Marc Zyngier , Matthias Brugger , Andy Gross , Android Kernel Team , lkml , linux-arm-kernel , "moderated list:ARM/Mediatek SoC support" , linux-arm-msm , Hanks Chen , CC Hwang , Loda Chou , Thierry Reding , Nicolas Saenz Julienne Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 6, 2020 at 10:58 PM Bjorn Andersson wrote: > > On Thu 06 Aug 19:48 PDT 2020, John Stultz wrote: > > > On Thu, Aug 6, 2020 at 6:42 PM Bjorn Andersson > > wrote: > > > On Thu 06 Aug 18:22 PDT 2020, John Stultz wrote: > > > > On Thu, Aug 6, 2020 at 5:43 PM Bjorn Andersson > > > > wrote: > > > > > On Wed 05 Aug 14:57 PDT 2020, John Stultz wrote: > > > > > > On Wed, Aug 5, 2020 at 2:47 PM Steev Klimaszewski wrote: > > > > > > > On 8/5/20 4:16 PM, Steev Klimaszewski wrote: > > > > > > > > On 8/5/20 3:19 PM, Saravana Kannan wrote: > > > > > > > >> On Wed, Aug 5, 2020 at 12:44 AM John Stultz wrote: > > > > > > > >>> > > > > > > > >>> So this is where I bashfully admit I didn't get a chance to try this > > > > > > > >>> patch series out, as I had success with a much older version of > > > > > > > >>> Saravana's macro magic. > > > > > > > >>> > > > > > > > >>> But unfortunately, now that this has landed in mainline, I'm seeing > > > > > > > >>> boot regressions on db845c. :( This is in the non-modular case, > > > > > > > >>> building the driver in. > > > > > > > >> Does that mean the modular version is working? Or you haven't tried > > > > > > > >> that yet? I'll wait for your reply before I try to fix it. I don't > > > > > > > >> have the hardware, but it should be easy to guess this issue looking > > > > > > > >> at the code delta. > > > > > > > > For what it's worth, I saw this too on the Lenovo C630 (started on -next > > > > > > > > around 20200727, but I didn't track it down as, well, there's less way > > > > > > > > to get debug output on the C630. > > > > > > > > > > > > > > > > In my testing, module or built-in doesn't matter, but reverting does > > > > > > > > allow me to boot again. > > > > > > > > > > > > > > > Actually - I spoke too soon - QCOM_PDC built-in with the commit reverted > > > > > > > boots, however, module (on the c630 at least) doesn't boot whether it's > > > > > > > a module or built-in. > > > > > > > > > > > > You may need to set deferred_probe_timeout=30 to give things a bit > > > > > > more grace time to load. > > > > > > > > > > With the risk of me reading more into this than what you're saying, > > > > > please don't upstream anything that depend this parameter to be > > > > > increased. > > > > > > > > > > Compiling any of these drivers as module should not require the user to > > > > > pass additional kernel command line parameters in order to get their > > > > > device to boot. > > > > > > > > So, ideally I agree, and Saravana's fw_devlink work should allow us to > > > > avoid it. But the reality is that it is already required (at least in > > > > configurations heavily using modules) to give more time for modules > > > > loaded to resolve missing dependencies after init begins (due to > > > > changes in the driver core to fail loading after init so that optional > > > > dt links aren't eternally looked for). This was seen when trying to > > > > enable the qualcom clk drivers to modules. > > > > > > > > > > So to clarify what you're saying, any system that boots successfully > > > with the default options is a sign of pure luck - regardless of being > > > builtin or modules. > > > > > > > > > And there you have my exact argument against the deferred timeout magic > > > going on in the driver core. But as you know people insist that it's > > > more important to be able to boot some defunct system from NFS than a > > > properly configured one reliably. > > > > I'd agree, but the NFS case was in use before, and when the original > > deferred timeout/optional link handling stuff landed no one complained > > they were broken by it (at least at the point where it landed). > > I did object when this was proposed and I've objected for the last two > years, because we keep adding more and more subsystems to follow this > broken behavior. > > > Only later when we started enabling more lower-level core drivers as > > modules did the shortened dependency resolution time start to bite > > folks. My attempt to set the default to be 30 seconds helped there, > > but caused trouble and delays for the NFS case, and "don't break > > existing users" seemed to rule, so I set the default timeout back to > > 0. > > > > I can't argue with that and I'm at loss on how to turn this around. > > > > > It doesn't seem necessary in this case, but I suggested it here as > > > > I've got it enabled by default in my AOSP builds so that the > > > > module-heavy configs for GKI boot properly (even if Saravana's > > > > fw_devlink work is disabled). > > > > > > > > > > With all due respect, that's your downstream kernel, the upstream kernel > > > should not rely on luck, out-of-tree patches or kernel parameters. > > > > I agree that would be preferred. But kernel parameters are often there > > for these sorts of cases where we can't always do the right thing. > > As for out-of-tree patches, broken things don't get fixed until > > out-of-tree patches are developed and upstreamed, and I know Saravana > > is doing exactly that, and I hope his fw_devlink work helps fix it so > > the module loading is not just a matter of luck. > > > > I don't agree with this, upstream should be functional in its default > configuration. Out-of-tree patches might be necessary to enable features > or get the most out of the hardware, but what we have upstream should > work. And no, this is not always the case, but we should at least aim > for this. > > > Also I think Thierry's comments in the other thread today are also > > good ideas for ways to better handle the optional dt link handling > > (rather than using a timeout). > > > > I'll take a look at that, but to repeat what I've said many times > before, for Qualcomm platforms there's pretty much no such thing as > optional links. Nicolas had suggested earlier that we could have a way to enable fw_devlink=on in DT under the "chosen" node. I liked that idea, but wasn't sure how easy it would be to convince DT maintainers to allow it. If that happens, we could just set that and not have to worry about these timeouts for QC platforms. Not sure how easy it is to update DT in a DB 845c though. But for cases where DT can't be updated, we'd still have the crappy timeout to plaster over the issue. Something like this or whatever sensible name that suggests that the dependencies in DT are reliable enough to use for probe ordering, deferred probe, etc. Then once that's there, we can turn on fw_devlink=on and that'd completely skip this timeout code path (and has a bunch of other benefits). chosen { linux,reliable-dt-dependencies; } Just some food for thought. Also, Thierry's idea would work, but it'll need changes to multiple drivers. Also, I don't think it'll work for drivers that'll need to ignore vs not ignore dependencies based on what board they are used in. It's still better than the blind timeout though. -Saravana