Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3999633imw; Mon, 18 Jul 2022 19:32:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1spoS2JrdD1PUH15m98Htftkm1Eke++D7zL1+jCebf4F9+iTuUftero1s9OTkskLigv+Kgs X-Received: by 2002:a17:907:9710:b0:72b:3271:c9f with SMTP id jg16-20020a170907971000b0072b32710c9fmr27638772ejc.91.1658197946395; Mon, 18 Jul 2022 19:32:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658197946; cv=none; d=google.com; s=arc-20160816; b=Wlp6qqy1pNXZOIwbF+vxqgdoQZ4fJWAVw/Cdq4RVWIgB0glYEmG7TbDepI5fWsJ6im Ld9H+vwfaOKz7x5Q/48zzGnU+F2lRewgiMGX14EzUzPDNNjnz9YrjePGiVbpnn9kl/Op 7g/H4dKm1FVz5gYvH7Sqc/02J/BAuGv3b72xjZ4O1a8Yl9MH4lilM4EJ3b0gE97ZPbiJ 58LZiXJkMdzGIgFHaRY3thL4epJ8MGgf/Uc5a296xkvErrGmPyaDVInwjx769Y6deRId mGKKTpaS49r4M6fIz+XofY2z8qB2gYBWBOpnaYqBtcjgh4tKZw0r7KcHPx7JJu+DZM3O JlWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=wuk/OrWyj29IoQDFQT7AD1mY7KZhXXM3ZlNUl93ihu4=; b=d0r9FiAGvdOQfAf+j4mu9OkYahZ7QW+Js1M4vEO3qSA09FsyN7ECEUzbPEl0prd7Ur QdeCur5vsjIdtGyWtd8yj2sVfhpXKvqDOehD5ltmb5qOFteT7dcC+F9Hd/ILvdFUAnjB XPM8ACJxLROdDYbfKwOfICxehqL+e/gBxR4wkh2Cfh+L3sVKFyXI3S+VGZtUP5ctfuSa t6okJ6pNDmyxHkubB+71UA/FCpUK/3i6hNZs/rWBAqSvtcD0iEoli6gYvbH2PwA9ZRug jdaF2/QI3STxWuB1lknIQvp3MAVZKTv18zxBPmcauHBfZpjzuS9Sj6e8NKWuWCrmdE60 ICLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="iikN/Axl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f15-20020a056402354f00b0043a90c70125si20590361edd.32.2022.07.18.19.32.01; Mon, 18 Jul 2022 19:32:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="iikN/Axl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234129AbiGSB4C (ORCPT + 99 others); Mon, 18 Jul 2022 21:56:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233487AbiGSB4A (ORCPT ); Mon, 18 Jul 2022 21:56:00 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C712D205D6 for ; Mon, 18 Jul 2022 18:55:59 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id 75so24126008ybf.4 for ; Mon, 18 Jul 2022 18:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wuk/OrWyj29IoQDFQT7AD1mY7KZhXXM3ZlNUl93ihu4=; b=iikN/Axlm8JDKbiz8Wd0AwK31mkN8xXj3UipQxeHvWF6bptpwYBpg9opf+F1o7jmmO gmfBxXwP+I31zeUJCewcvMNpYC7L+VwkdJppG4RHgKB9ahm1S5o2YM6qRppyAllk34qR fFhNv4LaUTkMfC6SRf0kBlqb6SJohO40vBhWjX1guyMNbDrVCSWQVGaWJDvDRBG1ud9R Zwn/NWGEroeLah+8aoUmkJAJ4pGN1Z9krFDF+WeEmHe3CcN3Z6bKHm5bypZguJL/Isa6 jEFyFqqItABbfYDX1IdD21fprB+NOeCfffD++NfxaaAQsnubj54Xazt04mztlfP4y326 8AIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wuk/OrWyj29IoQDFQT7AD1mY7KZhXXM3ZlNUl93ihu4=; b=FkRji2lvqHK0OaxMvPuYNwH9r2MxxH+taB4b5R0EEo9WnAL4GsMtii5YHONnrFBGja 2vb8DPT4/JaIUy+VbAQ6qs1EswesaEt4g7JXMsh9SZbR/5wT+2BclF085oWoxovXIM6t QWxxkq3oGICXUkC0I+wboQ4C1nILHIVM2EUNbvFiGT5rAmUabV/hZhVTmLUus87RHRpB 34ajC+l8HdXxgTtdGQa7tbSuf8A1dRhgfddmb8NiOa8uMaJb/dx3IgXXLyqfUF6QAU8i csRHpknflulBtUFCv9U8MfLlwHAsEa02g6Mfk75YbT3g/tN+1lR+y1aCevfiy+LImcNa s0/Q== X-Gm-Message-State: AJIora9zNAkHH3Tz83MZn+XLVheAdEjO+djIe4pktc2NGAgDtGuIs2lG B2C4mI8h8XRUwqE4rvd1X8YT5SvrturTubMiWLUTXg== X-Received: by 2002:a25:9947:0:b0:663:ec43:61eb with SMTP id n7-20020a259947000000b00663ec4361ebmr30337760ybo.115.1658195758889; Mon, 18 Jul 2022 18:55:58 -0700 (PDT) MIME-Version: 1.0 References: <20220705083934.3974140-1-saravanak@google.com> <7482d3af-4b02-4c1d-0386-b0a4ddf529da@samsung.com> <8a04332e-e7b1-8bc3-d569-5052427bcb13@samsung.com> <20220713145827.yxeoqj6vmkzhrrpv@bogus> In-Reply-To: <20220713145827.yxeoqj6vmkzhrrpv@bogus> From: Saravana Kannan Date: Mon, 18 Jul 2022 18:55:23 -0700 Message-ID: Subject: Re: [PATCH v4] amba: Remove deferred device addition To: Sudeep Holla Cc: Marek Szyprowski , Russell King , Philipp Zabel , Rob Herring , Ulf Hansson , John Stultz , Linus Walleij , Nicolas Saenz Julienne , Geert Uytterhoeven , Kefeng Wang , kernel-team@android.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 13, 2022 at 7:58 AM Sudeep Holla wrote: > > On Tue, Jul 12, 2022 at 12:38:33PM -0700, Saravana Kannan wrote: > > Sudeep, > > > > This makes me think the issue you are seeing is related to your > > hardware drivers. Can you look into those please? I'm leaning towards > > merging this amba clean up and adding delays (say 1ms) to your > > clock/power domain drivers to avoid the crash you are seeing. And then > > you can figure out the actual delays needed and update it. > > I haven't got a chance to debug the issue on Juno much further. One thing > about the platform is that we can't turn off the debug power domain that > most of the coresight devices share. > > One thing I also observed with -next+this patch is that with a little log > it can access the registers while adding first few devices and then crash > which doesn't align with platform behaviour as we can't turn off the domain > though we attached and turn on in amba_read_periphid and then turn off and > detach the power domain. Ideally if first device amba_read_periphid was > successful, it must be the case for all, but I see different behaviour. > > I need to check again to confirm if it is issue with platform power domain > driver. It is based on SCMI so there is some role played by the f/w as well. Yeah, this log timing based behavior is what makes me suspect it's not a problem with this patch itself. However, just to rule it out, can you try making this change on top of v4 and give it a shot? This is related to the issue Marek reported, but those are more about permanent probe failures. Not a crash. +++ b/drivers/amba/bus.c @@ -219,7 +219,7 @@ static int amba_match(struct device *dev, struct device_driver *drv) * none of the drivers match. */ if (ret) - return ret == -EPROBE_DEFER ? ret : 0; + return -EPROBE_DEFER; dev_set_uevent_suppress(dev, false); kobject_uevent(&dev->kobj, KOBJ_ADD); } -Saravana