From patchwork Fri Aug 25 23:42:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yabin Cui X-Patchwork-Id: 13366428 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 391E8C83F05 for ; Fri, 25 Aug 2023 23:42:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: Mime-Version:Date: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=Y6ngqKTqnR/ZrAW4e4kuo4MaE7xRoCdFXCIlBIrqbBc=; b=LIx iWRXAaU0nx7rdXjwnICHuJIVGSVvangolUEs2OPMZ/k67MGsjV0tXTOgHU8AS+deNYYjoOcv2i9Qc seNzqK1DAHCROmOLgrNSgc044lNpfvzylCi+VjhG0pwQU0n07Gt7So6v2we3/2szxk2WQ8tkVwLYy mGL0VyZkzFkjtOSF8WinhVr0qbsrJceNoSvq1gG/zwy4Bbe0Tq/9eazV3NBnq9MkDVPTunYtPcd1t SpazUQwCAKa7X/oBL8DP+WxKuajLfq31JkWvQ8uf96uEzhYSrk5MAuoKv+aYrWTVG2AwmMmN9aoOV 7Xk7KTFE8Aq6uEy7v+QKRS+gvUZtw3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZgRW-006BYq-0D; Fri, 25 Aug 2023 23:42:18 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZgRS-006BYV-3D for linux-arm-kernel@lists.infradead.org; Fri, 25 Aug 2023 23:42:16 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-583c49018c6so20811987b3.0 for ; Fri, 25 Aug 2023 16:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1693006928; x=1693611728; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=xTd0pTstiRhUDqJtUofYBE2z2kJSDJQFF7iReicbrQU=; b=w1XqNyk/ALuiHYSKx5SAcadeYRAt6KoXfOM7Okj4w1lIGsPMQkl6gB2f35knvkvSK7 Km7S7WJZQz4X5Erj6IqLtnwv6m29CmCNZzwM7HjnWGC7XRErP44Zfp8z2ofOdfTrfCSM j2TfEkeADl78CLBwEnLVGva2JM3XMLpz8SElwIsNnbYpj+4xD7O3ov88QJ6RjB1Xcnv5 fL8Hyc+sOgGBFYxmugAKuusuFpaeTcvrxgBho/Mw91KFvau9spK8Cpy3QlvUtIAUV4X3 0mkLx0Qm1TB9+M6B2nveUo4JAms6gzoyjDsR4gNnETsmb2Oft/K7SYMCgS/tPqPFmfY8 hgzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693006928; x=1693611728; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=xTd0pTstiRhUDqJtUofYBE2z2kJSDJQFF7iReicbrQU=; b=gZk1l1ZkLWdNIdlBuYAmgv4Q8bfGi7tqrAmoK9Az/23KsDnIjkgRTYxg0e2hM9WiQm yC79mg6jp9kxiXZW26CNVLEI+2xXZWVs9SSHyXNXwfDXCiphnt8oMPvmDcQMdC6sFvF3 k6a5wAxOdnXk1r9/gAUdyMzVBNI4u7JcCu6popMQl2nMbE8SvicsTz7zvIeJLH5NV5XA VS9MfNb73xtOthIe7d76nuLwxzpeLwA5GYZ4W1XvTJtjVi01sYyzKaHMsMpeCDXYEBkW olSc06m8AmRCXd2lfoVwP8o7YjbV0d9Cs9E+K5mgWFmHNsoTCGHLGKOXxIT4aZ+HSe1j 5M/Q== X-Gm-Message-State: AOJu0YyghX5peyLNr3xDypz3ytopAfKSSqnoOfsms70JMECpZCgNz/dh uaHnbjW/4pUfLxWtxdpu/HhluOvnrw== X-Google-Smtp-Source: AGHT+IFO9IwsKgSvW6JTlPKE1WHMEGqy2Fd3gU8oqRIPyjU7f91FtzhTIL0hbuq5iATjJo939fCjkcsy9Ls= X-Received: from yabinc-desktop.mtv.corp.google.com ([2620:15c:211:202:4739:860d:b144:6102]) (user=yabinc job=sendgmr) by 2002:a81:ae41:0:b0:565:9e73:f937 with SMTP id g1-20020a81ae41000000b005659e73f937mr503711ywk.4.1693006928162; Fri, 25 Aug 2023 16:42:08 -0700 (PDT) Date: Fri, 25 Aug 2023 16:42:04 -0700 Mime-Version: 1.0 X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog Message-ID: <20230825234204.1885083-1-yabinc@google.com> Subject: [PATCH] coresight: ete: Enable iomem access From: Yabin Cui To: Suzuki K Poulose , Mike Leach , James Clark , Leo Yan Cc: Alexander Shishkin , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yabin Cui X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230825_164215_037505_4134CDE2 X-CRM114-Status: GOOD ( 11.12 ) 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 On some devices, sysreg access to ETE may be disabled, while iomem access is still usable. Signed-off-by: Yabin Cui --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index 7e307022303a..de14aa55af63 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -1079,8 +1079,9 @@ static bool etm4_init_iomem_access(struct etmv4_drvdata *drvdata, * with MMIO. But we cannot touch the OSLK until we are * sure this is an ETM. So rely only on the TRCDEVARCH. */ - if ((devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETMv4x_ARCH) { - pr_warn_once("TRCDEVARCH doesn't match ETMv4 architecture\n"); + if ((devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETMv4x_ARCH && + (devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETE_ARCH) { + pr_warn_once("TRCDEVARCH doesn't match ETMv4/ETE architecture\n"); return false; }