Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4507806imw; Tue, 19 Jul 2022 07:56:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s/TLwyxqrhC+3JvnuQZNGH5dEbUUBl1ZiFXJ1pS4QJ/lZ3q8tpJarp2iJb8s+HXBog4ALT X-Received: by 2002:a65:6b95:0:b0:408:9d1b:2e56 with SMTP id d21-20020a656b95000000b004089d1b2e56mr28663704pgw.381.1658242566822; Tue, 19 Jul 2022 07:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658242566; cv=none; d=google.com; s=arc-20160816; b=IwIApjHeJWOgouNVjxn84AAveGAl5ZgF/Ynvymh/edqiH9zLZLxH4H2AOxJY2IK8h5 bez4XEOucKxOvtSpaKuIslIMxyH85Nrf1sDK3Q+vMAXDwRYMOl8H4FPtMp4FuNFFDbKF /qLcbecw7TE4iwDUzeLI3QquZMMPX/IzEf4vZ+4VTBf7BJG73YY9VX4YGgfJZB1nDMIi n2XBu6gNJ86Q8kJJ5oEX77hbjXvoG2YFpZYn+RsjWCCTegtjM/hqUfUkVScbgiv6K3yZ FyrJZfr3GLW5vk5E4CyFpN5ESXFYSLQfYojjjrycdq4Alhhlrwb+1ZHsxFEzb9bwl784 K7cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=a1vMoluF70pMh4jw19x4c4lt4PiOF5KDaI8Mlj4/3HA=; b=VAQV+edL+ri1UzuBI2tU5dGC7MMGCEwZNm4x491URNUDY3D1FgahRnCSiHplMW/RQ5 IvIA2wBG5nMp6h/H+Is6Cn2hAKwFRgaWt/hY42Hgs39qKPs9ew7COmk+54jljEawgI7K cvLrZ9l2laFB7hiXPn4m41M5Kc2GbruDo0L8r8UYS+mEYETigcz11TkHVMWpBsKDdCWU b1w8T7ALt02T169fDs0CajGalKHhozgngnsJaGXt84I56AuEmplbkrI0ZxlkFOZ4C2DF FgDzV4i2ehLqE/QMWJHOlwiQxCN90aFauNPy2MNO+y+E4oY1fU0eBPnhe5tvztFBOE6b r/rA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 18-20020a631552000000b003fe22d6bdc4si19629655pgv.802.2022.07.19.07.55.51; Tue, 19 Jul 2022 07:56:06 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237895AbiGSOPT (ORCPT + 99 others); Tue, 19 Jul 2022 10:15:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236940AbiGSON7 (ORCPT ); Tue, 19 Jul 2022 10:13:59 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8F4E8599E1 for ; Tue, 19 Jul 2022 06:39:35 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CE352153B; Tue, 19 Jul 2022 06:39:35 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8F01D3F766; Tue, 19 Jul 2022 06:39:33 -0700 (PDT) Date: Tue, 19 Jul 2022 14:39:31 +0100 From: Sudeep Holla To: Saravana Kannan Cc: Marek Szyprowski , Sudeep Holla , 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 Subject: Re: [PATCH v4] amba: Remove deferred device addition Message-ID: <20220719133931.7dkcejvc6s4a7y4z@bogus> References: <20220705083934.3974140-1-saravanak@google.com> <7482d3af-4b02-4c1d-0386-b0a4ddf529da@samsung.com> <8a04332e-e7b1-8bc3-d569-5052427bcb13@samsung.com> <20220713145827.yxeoqj6vmkzhrrpv@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE 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 Mon, Jul 18, 2022 at 06:55:23PM -0700, Saravana Kannan wrote: > 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. > This patch(version v4, fails to apply on -next but the conflict is trivial and in the deleted code so I just retained your copy of all the functions) plus the below change fixes the issue I reported on Juno. I won't give you tested-by yet as you have plans to revert some things and I resolved the conflict here though trivial, I prefer to apply the patch as is with all associated changes and test once more. Thanks for digging this and fixing it. -- Regards, Sudeep