From patchwork Fri Aug 25 23:39:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yabin Cui X-Patchwork-Id: 13366427 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 90231C83F04 for ; Fri, 25 Aug 2023 23:40:07 +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=MOjKb/uGOG+OTR/X+1FBAtmmfvPrhSWq5nf6biw0E9w=; b=f2K ktZqPXlT4hgTAOf/DN8b49ijX2cl8RAA5qN7cTzq4JoOg+MW+dWtIUrw8oxys4z6Njtmy76VcWXIz LNs+ylGvCKWBga4gCn14jwhq51SW+9+T3JIN0KvSeOXrTULybrVI2LCftF/6wsNWl8R4+fHX1dChK MhmR5x1tBOZzvVtI8f1lkBjhGv5/pJDhVVNpnqHCLdyKjZw5ke5x5GzU5Mpd1YopEJzaoIA5j+JcG pPPS2WWxkn3VJw4d0pGSsry5r0tp71cd+++2Pho0uFu1bBhK9OD0U9fr5BnJHG8qQLi4ITJ5b2SYW hS4IGlVCOPWCTs50MpH2xX5rMnoQotA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZgOy-006BQn-1i; Fri, 25 Aug 2023 23:39:40 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZgOv-006BQR-2D for linux-arm-kernel@lists.infradead.org; Fri, 25 Aug 2023 23:39:38 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-d74a012e6a6so1818550276.2 for ; Fri, 25 Aug 2023 16:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1693006774; x=1693611574; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=7aV7w0V21TeD8O9lx9J/kLPCQZ4fZ7EMNLpfS0Aue3E=; b=GVYu7ijOZ7ZT+xY+UPkvyjNQcuDD1KSsf0Qu+Id3NgMOO8BFowHFeZq/mWl44Sa8wg oRfsE086eMwryEq/fupeabtL3m8xfLrrB2oamvS/O5lvdr/ZEehM9K0SW+0iq6WgEjlM 38rtnLYRUSmhj4BKde8TvEHmbi3VnrhIc76AmWosAbFs12XsxLHmPIZbjAd3KOSEY942 U9ajPvEZ/SEJf0+59TMi4sfpQ9YP9vbWH8cEUIaiIR6EWRG3sIHD72TqhawvaGCvzEu8 NJmUhom8BLp6WoozJyr/s06CsxlsUlq9sxP4EhUe+IN5cpdOrVau/PD9RSAc3g55VfOw mdPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693006774; x=1693611574; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7aV7w0V21TeD8O9lx9J/kLPCQZ4fZ7EMNLpfS0Aue3E=; b=E8ee3Ce7j4bHqf2XWDfgWnWQ3AXs020+LBmBRs7iagfRs40JMkpYcmTdjkf6PU59WO UHOg0FX4OQSCl5iyv4hToR4CRCffdIJddki/2PwzjajsxG/C0U2wpSVQ9GaeHC4cDeMR iUmrnh7IsBeBcP16CiIB3tBjKHaEbwxRhXSsgDMM/ZMkD7+8K6Xr6/Hs1bZOS0YSbIU2 XPfvkpwCIjwUTnpNl19B3GZzsAQfdCIELrbItLgT9D9be7N1bOk2vTmlXC4wVzY49rwb Atd0B90X0vXhVLG3Ce7MwRwDnMLUvKuN+euT2tyr2Hp8izTClLlxPO0gBzoBkP3dxDUm yXqQ== X-Gm-Message-State: AOJu0Yw4L3M9ZyDaaRzIkyqfkaG1/CaojtU6uzGGrzLnm0dCoAVW3Rg5 wW2uzUnxwo7acrw4euLYf9brI0hBoA== X-Google-Smtp-Source: AGHT+IETlHmSjwJaM0AbmFP5PNi9j2E8KNwZHzi0fdSgcb/bfCO+qDMRXGD68g/LBc4tikN9NPbAK+0u8lE= X-Received: from yabinc-desktop.mtv.corp.google.com ([2620:15c:211:202:4739:860d:b144:6102]) (user=yabinc job=sendgmr) by 2002:a25:e757:0:b0:d0b:c67:de3b with SMTP id e84-20020a25e757000000b00d0b0c67de3bmr508497ybh.13.1693006774139; Fri, 25 Aug 2023 16:39:34 -0700 (PDT) Date: Fri, 25 Aug 2023 16:39:30 -0700 Mime-Version: 1.0 X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog Message-ID: <20230825233930.1875819-1-yabinc@google.com> Subject: [PATCH] coresight: tmc-etr: Don't fail probe when non-secure access is disabled 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_163937_745761_D93C361C X-CRM114-Status: GOOD ( 11.57 ) 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 Because the non-secure access can be enabled later on some devices. Signed-off-by: Yabin Cui --- drivers/hwtracing/coresight/coresight-tmc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c index c106d142e632..5ebfd12b627b 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-core.c +++ b/drivers/hwtracing/coresight/coresight-tmc-core.c @@ -370,7 +370,7 @@ static int tmc_etr_setup_caps(struct device *parent, u32 devid, void *dev_caps) struct tmc_drvdata *drvdata = dev_get_drvdata(parent); if (!tmc_etr_has_non_secure_access(drvdata)) - return -EACCES; + dev_warn(parent, "TMC ETR doesn't have non-secure access\n"); /* Set the unadvertised capabilities */ tmc_etr_init_caps(drvdata, (u32)(unsigned long)dev_caps);