Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp828289rwi; Wed, 19 Oct 2022 03:34:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6b8OqHvrN45ImW9xiZq0QmdZeQ7QReurFl82hxA7M9w0puw8t1bCower3aLKhGOVbseDJY X-Received: by 2002:a05:6a00:16c4:b0:535:890:d52 with SMTP id l4-20020a056a0016c400b0053508900d52mr8000744pfc.9.1666175647967; Wed, 19 Oct 2022 03:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175647; cv=none; d=google.com; s=arc-20160816; b=D3aSTUyJpIu42oj7bBb7ZVPW5rQhzDJTfdbqqZ+bBftXajzrpnKJS6kid5VQiX2rhm y3GEUkAFO41t7eA7sbHttNw59SBQgEb7Znbqig0vYA+izy01pNCsP3zHzob1yiq2qx5p 3QVoETrsBLdxItX+HDs2PEQWNe0YEW5EkLKO0KSyVdwZpQaJ3oLXmRnq+7fMqOCVlL0Q P1YpCR8Jgw+LbGxXfrdkmjhsZJmueKenhwkWw57nbc2Qg7oehRP5A8nt6FeVn8cE2U9b qYe+7yx//UYQuIMSTDhDf6RRvdFnSV8oR566A9d3p6BvwiGfZjHEc8d6mtpyE9CMgiun 6y7A== 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=RKYmVoOchmqDjPbLRc0jtopCyHx3U+ufnzWlbpavwKE=; b=KBnfAEkRSoI46hbSx0VsHMU0MarJgBEkPV5Ez/Zcmn5WRkjz80HusoA08ARqxfxpow e8nL89Bh4e9J1IxJBW6cGRvZ8iFUpn3KD/GZe5q/f3MCO5qGuQzov54KI2YEZOuZ2aAD Jw8ngQ3muVN5Qh/IuftrfY6sp30/efMhn/dnP+VsYlpOTlu2dVh/atOd7nob9/Ch34yh 1JUfm5HrIfxn3EwK2fTKfWiaRR9lUIfXOkQ4jrwNdORMyg/wjzO3ZUrfZWLW8KTUvDvO OnT3WR4+sOG5uH5JUk8K0tDg4LGw7Q/g8HacH9TRF7yvYPU1rraCJc86BWMT08xktsu2 yRKQ== 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 r7-20020a056a00216700b0053e15843f1fsi17030932pff.131.2022.10.19.03.33.53; Wed, 19 Oct 2022 03:34:07 -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 S231963AbiJSKPz (ORCPT + 99 others); Wed, 19 Oct 2022 06:15:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232148AbiJSKO7 (ORCPT ); Wed, 19 Oct 2022 06:14:59 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A28F6786FD for ; Wed, 19 Oct 2022 02:56:28 -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 6D1C91063; Wed, 19 Oct 2022 02:28:56 -0700 (PDT) Received: from [10.57.68.61] (unknown [10.57.68.61]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D7D653F7D8; Wed, 19 Oct 2022 02:28:48 -0700 (PDT) Message-ID: Date: Wed, 19 Oct 2022 10:28:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [Question] Question about supporting sysreg only CoreSight ETMv4.4 on ACPI machines To: "Russell King (Oracle)" Cc: Xiongfeng Wang , yehaiyang2@hisilicon.com, wanghuiqiang , Linux Kernel Mailing List , "linux-arm-kernel@lists.infradead.org" , mark.rutland@arm.com, Catalin Marinas , Anshuman Khandual References: <6e85db13-a65f-d4c6-1b6b-660a94cb7060@huawei.com> <9fc5ab20-c7f0-a917-4938-403e3661109f@arm.com> From: Suzuki K Poulose In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,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 Hi Russell On 19/10/2022 09:46, Russell King (Oracle) wrote: > On Tue, Oct 18, 2022 at 10:18:08AM +0100, Suzuki Kuruppassery Poulose wrote: >> That is true. Unfortunately, supporting this requires us to move away from >> the AMBA framework (at least) for ETM4x devices. This is currently >> developed by Anshuman. We can share it as soon as this is complete. > > Can we not find a way to create AMBA devices from ACPI? > There is a way today and that is how the AMBA devices (including ETMv4) work. But, the problem is ETM with system register access are not AMBA devices. On a DT based system, they have different compatible and are created as platform devices. But on ACPI, there is a single HID (which makes sense, because they both are ETM devices). Now, if the instance has memory resource, we need to use the AMBA hook, but otherwise fall back to the platform device driver. And this is not reliable, depending on which driver gets to the scan hook first. Also, another reason behind moving away from AMBA, in general is: we need to explicitly add PIDs of all new CPU ETMs to the driver to be able to probe them successfully. This doesn't work very well for older kernels running on newer platforms. Even now the list of PIDs is not complete and that would go on forever. And the "party bag" of this change is the runtime power managment on ACPI platforms, that works out of the box for platform devices. Thanks Suzuki