From patchwork Tue Apr 6 22:44:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 12186165 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, INCLUDES_PULL_REQUEST,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCA9DC433B4 for ; Tue, 6 Apr 2021 22:46:48 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62A21613D3 for ; Tue, 6 Apr 2021 22:46:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62A21613D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=G05P4vW5INuZKVODuEmLDq8+5aSRgwPoOMBhfl/aWCk=; b=CpIS3jfvSe6MFBq7YcfzN05SQT jaAmuwn90dOFql9hH9kL9ocH1LX4AdKs119uVlLaLM2enwXDf4R43Iq/fYXOVtKxOSaSSvg91HdyX NksrjXZG+Kkxtm3vmmGD7/zXSVXQhwMp9Q3GNZEASNL8CE3EoNrlHU+CaRPTcr4lZp3osCKGlFcdV ys3hIRsN0W2avteMZhQhBpUDlyCuwq3z16o7yghOKDuCv+wdixYnpXbESp1cqSqHwHoyuiNDUdwey Bo0h8SlW53ZpyzQVlz4ImyCeS/enp5Bzv33GfALE7fwfWjpBaOxBGanuPVqxtRLeI36oyDJW8pyCs hrfF94Mw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lTuRD-003XrD-20; Tue, 06 Apr 2021 22:44:47 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lTuR8-003Xqk-9c for linux-arm-kernel@lists.infradead.org; Tue, 06 Apr 2021 22:44:44 +0000 Received: by mail-pj1-x102b.google.com with SMTP id x21-20020a17090a5315b029012c4a622e4aso270462pjh.2 for ; Tue, 06 Apr 2021 15:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ydQPVFsDk2iufZP8Pwk0+yoCaEl+JPOZbz8HSe06cBU=; b=P9dhD0CQtilqryljLatmB/B3ObijoycWGtgs6GE7UPvcFnjhZGJzwYmEiqz7raJjgv e3elELphv/6K2kjkXcQ6US60Zcrtid1gTZkepHhaA0Zar1hw0Tdx0iMtMQ37BaVfrjnK AwxsfU8tFep58TDdTO5+xeSXhbtIGcFIzwbg2TKnw8Nr306gHfA6N/FO/8QcdHabZUTu ihsamGKwAosVCRCXQbY82Nfh/rK4VGYIygCrvwWKNrjbH7+xirDc3n4rntItRY/eqXIa SmgamR4r+Kvvz+yP6/8MCeYreNXg5IowaX+pKGxLW64MIxsKbhtnIpGqi+pGoVwekSis V3TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ydQPVFsDk2iufZP8Pwk0+yoCaEl+JPOZbz8HSe06cBU=; b=pis4s6Ds7whPponWFd136xXHT53h5RyU64ajIjR6N56uIcq1n2fHEWMraKHNN4JNAZ G1m6nNpyZ8OPSv2E/a/Yn3X+nZBDEHtzv61tLYkV9bw17/xmJQTrG90Ct0vMIuQLhtU2 PIPe33/tHl0PubJ5Wniqvlbi4uLW6nm066bzryBVstAqa8b54oSrJuqycwSmqwUFA1tM 11cHkLLM2SeG+8fwbhg1i1bnf6xV8LMeij1ruUjF0Z+1Cz+AAsLWlivDZzViyug4xTpD Q8mhIGXMUT2wZTzHPVY3mgI/TcsfXTBMdgbTyMADVdpk7dgbDHar8Nno5zn5wT7Ve3nf Ukng== X-Gm-Message-State: AOAM530OrFlgF95pQCaIPsj2rxKNSMNpFzuZcVJ4S7u0nGlVEOp9e/Ms xtgFEpZP56zguh2UYjelaU97ig== X-Google-Smtp-Source: ABdhPJwtLtQX7kcsTyuHRf4E/4KZRByEV2n9JQaZBRjQwRoIlWTqjoo6FXFbxpOGb725pX7mCVT+HA== X-Received: by 2002:a17:90a:66c5:: with SMTP id z5mr392494pjl.172.1617749079098; Tue, 06 Apr 2021 15:44:39 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id g3sm18620914pfk.186.2021.04.06.15.44.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Apr 2021 15:44:38 -0700 (PDT) From: Mathieu Poirier To: maz@kernel.org Cc: suzuki.poulose@arm.com, anshuman.khandual@arm.com, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, coresight@lists.linaro.org Subject: [GIT PULL v2] coresight: Add support for ETE and TRBE Date: Tue, 6 Apr 2021 16:44:37 -0600 Message-Id: <20210406224437.330939-1-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210406_234442_538190_2C3623CD X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The following changes since commit a354a64d91eec3e0f8ef0eed575b480fd75b999c: KVM: arm64: Disable guest access to trace filter controls (2021-03-24 17:26:38 +0000) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git next-ETE-TRBE for you to fetch changes up to 4fb13790417a7bf726f3867a5d2b9723efde488b: dts: bindings: Document device tree bindings for Arm TRBE (2021-04-06 16:05:38 -0600) ---------------------------------------------------------------- Anshuman Khandual (5): arm64: Add TRBE definitions coresight: core: Add support for dedicated percpu sinks coresight: sink: Add TRBE driver Documentation: coresight: trbe: Sysfs ABI description Documentation: trace: Add documentation for TRBE Suzuki K Poulose (15): perf: aux: Add flags for the buffer format perf: aux: Add CoreSight PMU buffer formats arm64: Add support for trace synchronization barrier KVM: arm64: Handle access to TRFCR_EL1 KVM: arm64: Move SPE availability check to VCPU load arm64: KVM: Enable access to TRBE support for host coresight: etm4x: Move ETM to prohibited region for disable coresight: etm-perf: Allow an event to use different sinks coresight: Do not scan for graph if none is present coresight: etm4x: Add support for PE OS lock coresight: ete: Add support for ETE sysreg access coresight: ete: Add support for ETE tracing dts: bindings: Document device tree bindings for ETE coresight: etm-perf: Handle stale output handles dts: bindings: Document device tree bindings for Arm TRBE .../ABI/testing/sysfs-bus-coresight-devices-trbe | 14 + Documentation/devicetree/bindings/arm/ete.yaml | 75 ++ Documentation/devicetree/bindings/arm/trbe.yaml | 49 + Documentation/trace/coresight/coresight-trbe.rst | 38 + MAINTAINERS | 2 + arch/arm64/include/asm/barrier.h | 1 + arch/arm64/include/asm/el2_setup.h | 13 + arch/arm64/include/asm/kvm_arm.h | 2 + arch/arm64/include/asm/kvm_host.h | 8 + arch/arm64/include/asm/sysreg.h | 50 + arch/arm64/kernel/hyp-stub.S | 3 +- arch/arm64/kvm/arm.c | 2 + arch/arm64/kvm/debug.c | 35 +- arch/arm64/kvm/hyp/nvhe/debug-sr.c | 56 +- arch/arm64/kvm/hyp/nvhe/switch.c | 1 + arch/arm64/kvm/sys_regs.c | 1 + drivers/hwtracing/coresight/Kconfig | 24 +- drivers/hwtracing/coresight/Makefile | 1 + drivers/hwtracing/coresight/coresight-core.c | 29 +- drivers/hwtracing/coresight/coresight-etm-perf.c | 119 +- drivers/hwtracing/coresight/coresight-etm4x-core.c | 161 ++- .../hwtracing/coresight/coresight-etm4x-sysfs.c | 19 +- drivers/hwtracing/coresight/coresight-etm4x.h | 83 +- drivers/hwtracing/coresight/coresight-platform.c | 6 + drivers/hwtracing/coresight/coresight-priv.h | 3 + drivers/hwtracing/coresight/coresight-trbe.c | 1157 ++++++++++++++++++++ drivers/hwtracing/coresight/coresight-trbe.h | 152 +++ include/linux/coresight.h | 13 + include/uapi/linux/perf_event.h | 13 +- 29 files changed, 2053 insertions(+), 77 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-coresight-devices-trbe create mode 100644 Documentation/devicetree/bindings/arm/ete.yaml create mode 100644 Documentation/devicetree/bindings/arm/trbe.yaml create mode 100644 Documentation/trace/coresight/coresight-trbe.rst create mode 100644 drivers/hwtracing/coresight/coresight-trbe.c create mode 100644 drivers/hwtracing/coresight/coresight-trbe.h