Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1038738rdf; Wed, 22 Nov 2023 04:11:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGK12WAp3DQV++YeRRrtAU0O9a+hmih9XegaGq4ttPFD7d7osUWnC4NFPkaNtczUAX1BGOP X-Received: by 2002:a17:902:d2d1:b0:1ce:6198:108e with SMTP id n17-20020a170902d2d100b001ce6198108emr2477796plc.9.1700655091120; Wed, 22 Nov 2023 04:11:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700655091; cv=none; d=google.com; s=arc-20160816; b=uRuxaGf2KSNyDp4qOi+hlvJIzBNeh/DJaHbnZ9+b3Ab01eo/eMCKvw/M1CUc7jE8qX 2fBnc2fkyRwySLi5aIF5zEvwsvKmEGdXQLEgWtGzwLE0toD/Yj61s6SKgpJiQKIFJqo6 3U+6dPTHh6VeXGpEnwrsJILIa9Nwizrk9kdgVvR6FmxhvuzO6h0CUaJJFi44vHy3eUPI T5RN7ZTkUSUJu5LK1ZE0A42hOBJ3mk/KGVJzgfPztJKwTubvRHv4YZH8Ws6r0HCXxpI7 49pF8YrImqslElHiSnbLCZmKxba9M+9Wssn4Zw0DKF807jhsJRNlpx0SS8aJIR3Ricdd 13iw== 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=Za/yfYnImgjQKHl4rwKcvg4TD6djbUO4uHIFSPKxRbE=; fh=op1xfEHaZDFNWzkjDBx7WBscObNUxVWBI1om6hstbpA=; b=IcSZRzbXFCuPfegG0Ede3IWRM/XhZ4kESuvyOUN/oW8gWDpdU9smTfmcSaYN3dFevd 69HdBcu8sTLzbmUvd4Hv0t2Q6s/CzcozUZkuhPCIFAn5V3C/ur8AkLm9rr1OBXslAT9z SoIoyGloDCsZqeo8zXdpWZuL20aOaELpiRwB+3myk2Q/KKgiZZYnNBDllSoHHQG3c+2/ 3S2HdbG0XVBssPoMPj2jKa00XCXppJIsTpldquZnBsO+MVkxGlK2mhpiHr6Anr9tiMaF gyiFcMDyNKZWL2unIsW1HosXZNvstasdjBHIOLQIVjMGEzDXvzlluJ6VSldLBCvqJjeB lRJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id c14-20020a170903234e00b001cf552968fasi9109135plh.229.2023.11.22.04.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:11:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A8623807664D; Wed, 22 Nov 2023 04:10:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344007AbjKVMK3 (ORCPT + 99 others); Wed, 22 Nov 2023 07:10:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343932AbjKVMK2 (ORCPT ); Wed, 22 Nov 2023 07:10:28 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 90D6F1BB; Wed, 22 Nov 2023 04:10:24 -0800 (PST) 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 2D6391595; Wed, 22 Nov 2023 04:11:11 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BC93E3F7A6; Wed, 22 Nov 2023 04:10:22 -0800 (PST) Date: Wed, 22 Nov 2023 12:10:20 +0000 From: Sudeep Holla To: Anshuman Khandual Cc: James Clark , linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com, Lorenzo Pieralisi , Mike Leach , Maxime Coquelin , Alexandre Torgue , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH 4/7] coresight: tpiu: Move ACPI support from AMBA driver to platform driver Message-ID: References: <20231027072943.3418997-1-anshuman.khandual@arm.com> <20231027072943.3418997-5-anshuman.khandual@arm.com> <92d6a66d-3270-3378-2ab9-9214c004d5c7@arm.com> <268e1605-fe3f-4aa0-92e3-36ddfc8aacb3@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 04:10:42 -0800 (PST) On Wed, Nov 22, 2023 at 11:21:58AM +0000, Sudeep Holla wrote: > On Wed, Nov 22, 2023 at 12:32:33PM +0530, Anshuman Khandual wrote: [..] > > Although, AFAICT, have not seen these before - even on the defconfig. > > Just to work around this problem, there can be a common module_init() > > /module_exit() to register/unregister both AMBA and platform drivers, > > similar to etm4x_init()/etm4x_exit() setup in coresight-etm4x-core.c. > > Could this be the reason why I am seeing the below error why booting with > ACPI ? I wanted to check the tables before I comment but this discussion > made me think it could be the reason, hence posting this before I got time > to analyse it. > > | coresight-tmc-platform ARMHC97C:00: can't request region for resource [mem 0x20010000-0x20010fff] > | coresight-tmc-platform: probe of ARMHC97C:00 failed with error -16 > | coresight-tmc-platform ARMHC501:00: can't request region for resource [mem 0x20070000-0x20070fff] > | coresight-tmc-platform: probe of ARMHC501:00 failed with error -16 > Scratch that, it didn't help. This error I am seeing is not related to the issue reported here. I tried a hack below, it didn't help. Regards, Sudeep -->8 diff --git i/drivers/hwtracing/coresight/coresight-tpiu.c w/drivers/hwtracing/coresight/coresight-tpiu.c index ea8827d289ca..f6ba350b3777 100644 --- i/drivers/hwtracing/coresight/coresight-tpiu.c +++ w/drivers/hwtracing/coresight/coresight-tpiu.c @@ -254,8 +254,6 @@ static struct amba_driver tpiu_driver = { .id_table = tpiu_ids, }; -module_amba_driver(tpiu_driver); - static int tpiu_platform_probe(struct platform_device *pdev) { struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -297,7 +295,21 @@ static struct platform_driver tpiu_platform_driver = { .pm = &tpiu_dev_pm_ops, }, }; -module_platform_driver(tpiu_platform_driver); + +static int __init tpiu_init(void) +{ + amba_driver_register(&tpiu_driver); + platform_driver_register(&tpiu_platform_driver); + return 0; +} + +static void __exit tpiu_exit(void) +{ + amba_driver_unregister(&tpiu_driver); + platform_driver_unregister(&tpiu_platform_driver); +} +module_init(tpiu_init); +module_exit(tpiu_exit); MODULE_AUTHOR("Pratik Patel "); MODULE_AUTHOR("Mathieu Poirier ");