Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp3006346rdb; Tue, 29 Aug 2023 02:27:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtuUR1XOupWj0068csqfNNGqYVEODyXWH1EotJYV1cIwd3OlJEgAxAavpLRauHaggxcKY7 X-Received: by 2002:a17:903:244e:b0:1c0:8a05:f32e with SMTP id l14-20020a170903244e00b001c08a05f32emr3032213pls.23.1693301243864; Tue, 29 Aug 2023 02:27:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693301243; cv=none; d=google.com; s=arc-20160816; b=q4HPTmAUk79ECH7WJZ/s/pvzbVu5kYaiQb6di9stuIyfNQJtCSoxxLtFR7d73OXgXm GK3r8lq2z02PFA1GKEHrhUM94A+tOmxfrhzWxiUy6WsDAznHLKfrTC1sSHJD7EfIpQZx +kCi4SyDUUjlJNN9DJJqpKnzZihsSpzBEaZe8lL0o21fd1hfl4zGkLvodgmo8YW7zAiH /NkW9s0TXZ53cVCuWFh/BoX+Kn+cusqVoFALMAOsxbp+5sAK8cya0YfDFiAMoYJ0HYMQ tVzNI4hBC66Oa99uK8lQxOpBv3Myn8/K6dZRvmPVg7wrC+lzig5sl99caKw9JkX/VMCU sVjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=qL7uDDxMApFZR2GMe8310XBHYGIairhMeottdEkSwHI=; fh=4UkJObcddaDhy0sZx5243CFaszGQly1hkv5waE8mruk=; b=WpSOmviE5CYdaJjOeAhaYb82VxM5hge0Q3ppaNqMXsmIXWVrkusNJ2TDyDNbm0YYgq w331ecnEvMnrzGBB3VXHnxHV+og9p/ZPNNSz3j97/ywGvhpx47hklDv29NszATixxY2p XqrIZsmKihjOG9Ry/tz/IkeO2LSb3UTVohKRasI1WoyNI6VByU0DvSLJasjX4IqmyN3g Q/h0tztnVOhEYDSOE3vbX/REDnyHW3qfS/uAIdij57AUitfYDobvq1nlFGapeCwCmoD9 ZOGh38NviY/jarm4q976xGWBFfDz2hgWkDbYJJoh0HzFknofIx9tDVexrWOIrGV3NS3D O4wA== 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 t15-20020a1709027fcf00b001bb377f8c8bsi9004873plb.2.2023.08.29.02.26.48; Tue, 29 Aug 2023 02:27:23 -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 S233743AbjH2IoF (ORCPT + 99 others); Tue, 29 Aug 2023 04:44:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231556AbjH2IoC (ORCPT ); Tue, 29 Aug 2023 04:44:02 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 43286AD for ; Tue, 29 Aug 2023 01:44:00 -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 305C32F4; Tue, 29 Aug 2023 01:44:39 -0700 (PDT) Received: from [10.57.3.66] (unknown [10.57.3.66]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 093D43F64C; Tue, 29 Aug 2023 01:43:57 -0700 (PDT) Message-ID: <96d41d86-bfa2-f4d4-49ea-449c3471d036@arm.com> Date: Tue, 29 Aug 2023 09:43:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH V5 0/4] coresight: trbe: Enable ACPI based devices To: Will Deacon Cc: Anshuman Khandual , linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, kernel-team@android.com, Alexander Shishkin , coresight@lists.linaro.org, linux-kernel@vger.kernel.org, James Clark , Mike Leach , yangyicong@huawei.com, Mark Rutland , Sami Mujawar , Leo Yan References: <20230817055405.249630-1-anshuman.khandual@arm.com> <169237557557.1402587.14721093106016169238.b4-ty@kernel.org> <20230821112851.GC19469@willie-the-truck> <311d0ecf-dddf-dcf5-9545-3f8a51634a9a@arm.com> <20230828213537.GA27629@willie-the-truck> From: Suzuki K Poulose In-Reply-To: <20230828213537.GA27629@willie-the-truck> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,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 28/08/2023 22:35, Will Deacon wrote: > On Sun, Aug 27, 2023 at 11:11:16PM +0100, Suzuki K Poulose wrote: >> On 21/08/2023 12:28, Will Deacon wrote: >>> Hmm, the rationale behind your change to make the pdata allocation >>> per-device in ("coresight: trbe: Allocate platform data per device") >>> confuses me: with Anshuman's change to allocate the pdata using >>> devm_kzalloc(), there shouldn't be any connections for the coresight >>> core to trip over, should there? >> >> Anshuman's patch is working around the problem of "TRBE platform >> device with ACPI doesn't have a valid companion device" - this is a problem >> for the acpi_get_coresight_platform_data(). The work >> around is to move the "allocation" from coresight_get_platform_data() >> to the driver (given we don't need anything else from the ACPI except >> the IRQ). That doesn't change *how* it is allocated. >> Also please note that, the TRBE driver creates a TRBE coresight_device >> per-CPU and the platform data is shared by all of these devices, which >> the coresight core driver doesn't cope with. The other option is to >> move the releasing of these platform-data to the individual drivers, >> which is quite an invasive change. Or, make the core driver tolerate >> a NULL platform data, which is also again invasive. So the merged fix >> is correct and is still valid after this patch. > > Ah, ok, so the problem with TRBE isn't anything to do with its connections, > but simply because the pdata is shared? Correct, thats an issue outside of the ACPI support. With ACPI, the coresight_get_platform_data() can't cope with the TRBE with missing companion device, that is fixed by Anshuman's patch in this series. Also, please could you confirm the plan forward for merging this (next version of course) ? Cheers Suzuki > > Will