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=-7.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 30CEBC433DF for ; Tue, 4 Aug 2020 00:48:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D0B62076C for ; Tue, 4 Aug 2020 00:48:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="cO691Y4B" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726398AbgHDAsu (ORCPT ); Mon, 3 Aug 2020 20:48:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726823AbgHDAsu (ORCPT ); Mon, 3 Aug 2020 20:48:50 -0400 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FA33C061756 for ; Mon, 3 Aug 2020 17:48:50 -0700 (PDT) Received: by mail-ot1-x341.google.com with SMTP id k12so12526519otr.1 for ; Mon, 03 Aug 2020 17:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H2vuZwapNF5SY96ImcvQKBxAdYTUIocJnP2+tFQw1Cs=; b=cO691Y4BMf4ps3AJh/Y/fA337JoELDzwQJZnF1XDKwLjD32hTFOYbYZ9CQBbVItKll EppsWEsMpVQ3lFu5Q41Furs4iceDP1gdbmLNgQDiUgrII72FXLUGGUel1U6Gl8scYeeb p+faUAZS1ku28ZXI2Cmuqo9tOhpJXdYBUH2jlRZYtWmPOnq//e3a2pLtZXL9FYrIMw+H pV4Y93xjjhgRSH7NerHJRHMWgkPJhIkr38ul1j99PyaADQAAUs/NC5LCJo4RbbYfCvri n2Rye4Mzd6ycNPnjC7Jq0+1sHKXow9Q8o+YqxGhD03snC9E4A1l+4/uqo66QQqpBhXB9 tDAg== 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=H2vuZwapNF5SY96ImcvQKBxAdYTUIocJnP2+tFQw1Cs=; b=B9kj3FnLLmoAsaKQacSEJ2ZrJ6pxYrQ9mJX8GsPKi46m8seB99TGgzAi0fz4bhkJfg 3Pzf30NauHGjddHY79sP8rRxacDDxkkPzZ1yp0wMLeuZMx6rckBpaCCCnfF8J/ST0K15 oFtBtKezk1aKxocfmtmTTNTDZ+nTeNvEHnMkttqcyErov3oCLi/mI5zOOkh5y7ruZY+R cAQ03+9HXUnVfEL5Ub7EOio4R+3pRrvnkDp3Lu2OO2OnMb3j37h9XF4VCaAkVBB45Hd5 G3w9eBq43DS5iqrE9CKQqU4OjCa+uvysH25gJMphNBJBkK9Vwycw2GQ9vXQsfOqsC/uj Znbw== X-Gm-Message-State: AOAM531HgxP6mR4VgubQ+DwGWRkGnRaWy7OI5+JeHWPXZ8pbBalFwL8t pbOn9xH8deBd5FwV5A+9/mDqByZyllzfJxnyVoFxqYZV X-Google-Smtp-Source: ABdhPJyn7E460ohTdt8DCEf76ua+Wb3lwAXOyx60eoAK03RiF2uxbAJwRo47dnCpYne0nL6Ya4O5Td1e9XaI/t7Xz2M= X-Received: by 2002:a05:6830:3196:: with SMTP id p22mr16791603ots.102.1596502129252; Mon, 03 Aug 2020 17:48:49 -0700 (PDT) MIME-Version: 1.0 References: <20200714080254.v3.1.Ie0d730120b232a86a4eac1e2909bcbec844d1766@changeid> In-Reply-To: From: John Stultz Date: Mon, 3 Aug 2020 17:48:38 -0700 Message-ID: Subject: Re: [PATCH v3] pinctrl: qcom: Handle broken/missing PDC dual edge IRQs on sc7180 To: Doug Anderson Cc: Linus Walleij , Rajendra Nayak , Maulik Shah , Marc Zyngier , Lina Iyer , Cheng-Yi Chiang , Stephen Boyd , Bjorn Andersson , Andy Gross , linux-arm-msm , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Todd Kjos , Amit Pundir Content-Type: text/plain; charset="UTF-8" Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Mon, Aug 3, 2020 at 2:58 PM Doug Anderson wrote: > > Hi, > > On Mon, Aug 3, 2020 at 2:06 PM John Stultz wrote: > > > > On Tue, Jul 14, 2020 at 8:08 AM Douglas Anderson wrote: > > > > > > Depending on how you look at it, you can either say that: > > > a) There is a PDC hardware issue (with the specific IP rev that exists > > > on sc7180) that causes the PDC not to work properly when configured > > > to handle dual edges. > > > b) The dual edge feature of the PDC hardware was only added in later > > > HW revisions and thus isn't in all hardware. > > > > > > Regardless of how you look at it, let's work around the lack of dual > > > edge support by only ever letting our parent see requests for single > > > edge interrupts on affected hardware. > > > > > > NOTE: it's possible that a driver requesting a dual edge interrupt > > > might get several edges coalesced into a single IRQ. For instance if > > > a line starts low and then goes high and low again, the driver that > > > requested the IRQ is not guaranteed to be called twice. However, it > > > is guaranteed that once the driver's interrupt handler starts running > > > its first instruction that any new edges coming in will cause the > > > interrupt to fire again. This is relatively commonplace for dual-edge > > > gpio interrupts (many gpio controllers require software to emulate > > > dual edge with single edge) so client drivers should be setup to > > > handle it. > > > > > > Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy") > > > Signed-off-by: Douglas Anderson > > > > Just as a heads up. I started seeing boot failures (crashes really > > early before we get serial output) with db845c when testing with the > > android-mainline tree that pulled v5.8 in. > > Even before earlycon? Ick. For me earlycon comes up way before > pinctrl and I thought that, by design, earlycon came up so dang early > that you could debug almost anything with it. > > To confirm, I could even drop into earlycon_kgdb (which starts later > than earlycon), then set a breakpoint on msm_pinctrl_probe() and I'd > hit my breakpoint. Enabling earlycon should be super easy these > days--just add the "earlycon" command line parameter and the kernel > seems to do the rest of the magic based on the "stdout-path". I guess > if your bootloader doesn't cooperate and leave the system in an OK > state then you'll be in bad shape, but otherwise it should be nice... > > NOTE: if you have earlycon and this is still causing crashes before > earlycon starts, the only things I can think of are side effects of > this patch. Could it have made your kernel just a little too big and > now you're overflowing some hard limit of the bootloader? Maybe > you're hitting a ccache bug and using some stale garbage (don't laugh, > this happened to me the other year)? Maybe there's a pointer bug and > this moves addresses just enough to make it cause havoc? > Sorry! False positive on this one. The android-mainline tree has serial drivers as modules, so earlycon doesn't help right off. I reworked the config so I could use earlycon and realized the trouble was with the new selected configs in this patch which need to also be selected in the GKI kernel. Apologies for the noise. thanks -john