Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp996629yba; Thu, 4 Apr 2019 02:03:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbdzE64pe4fOBIMi3ZGkDao58Ep9VWPUunfLoAFoI8aY48m+6N61+o48MRX6spIfyCtDwo X-Received: by 2002:a65:5202:: with SMTP id o2mr4447271pgp.402.1554368580662; Thu, 04 Apr 2019 02:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554368580; cv=none; d=google.com; s=arc-20160816; b=D/ma5ODUjhgtBcQdyWRlkCSOkVELTRu5H5VeyvAoJlPDCrxPzOtc2WHIxeMxW83iqo vRMRkaV2S9UYG55+XRu5FXRVapS8qrdk/JWILtbHNwVyfF32wxtsGzOv0uBGILKyCoIe 4vBqroC4iqoYuzclAEZ+lhEJujz2s+5sVXueNvtmp3fE93em62GEgA6HpCsOPDk2i+hx 0eCV0b7r2wcJGOH7vkq24yujMxPfnsumzqyNJmhHcWEdIuexUkHzPLfwmtHjwr8yIucp PXa+e7Va18IcYqZOOFVSwb4skXoWV7uC/dz9sadr16Z0xQ31Owk8jQ3h9aTp89O1oa7H +AqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QK6j4X7Np55ywmM5BCRsus3xuG/I3kNHrJpAOM7mxUM=; b=b59ro5qa0oIUg/FYxHwroRFb3KANrQ/9v/aMJkJ4P72wYM3y34gVinFSWsTauuMEyt MInp4evGvA9Qi6wO5+otG+IaKyp1SdbdSg8pBETEYEGi9AGG0ALwYUqLufkOWmjX5gng R78hFZtHDQ43D/tInW+gBQarKFf2lXITwzJOFntV5U/rx2/dw3fYHjVqnadx4Y9a+p66 mwUvQAXOY9/MEsqo6bivt4wDCU+9aN3g6mudXrvloOEXoDohNyb/fpt1YC6mJGlSf9be 7CRwV3uUwvcrjCKTgO70ZvT0/dCH5aunKTlaCcfSUgrOFZgn3jfmVOj01tIVObbm9Uo+ INKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gNcuxn/8"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f22si15520131pgv.578.2019.04.04.02.02.45; Thu, 04 Apr 2019 02:03:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gNcuxn/8"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731575AbfDDJCM (ORCPT + 99 others); Thu, 4 Apr 2019 05:02:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:39486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731322AbfDDJCJ (ORCPT ); Thu, 4 Apr 2019 05:02:09 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 849482177E; Thu, 4 Apr 2019 09:02:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368529; bh=5E/jEthbeDTM0q5ZANa4ihrd6+mB2VaduR8DXkhfl2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gNcuxn/8yX3DZhM40rkL96YODRJnlFmNERAvsoEe74csmOMkQywo7OCiizBC/HUcy z66EKOQLKIW+S+vRRBGq3Ns5STgy5RX55gxyawKPUIXGn6wSdWjPPMLQB2cJMSpVBE o25t82At4haE+OyzT4MgmdNFAOMknY64PDSmf6As= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sai Prakash Ranjan , Suzuki K Poulose , Mathieu Poirier , Sasha Levin Subject: [PATCH 4.19 057/187] coresight: etm4x: Add support to enable ETMv4.2 Date: Thu, 4 Apr 2019 10:46:34 +0200 Message-Id: <20190404084605.767826102@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 5666dfd1d8a45a167f0d8b4ef47ea7f780b1f24a ] SDM845 has ETMv4.2 and can use the existing etm4x driver. But the current etm driver checks only for ETMv4.0 and errors out for other etm4x versions. This patch adds this missing support to enable SoC's with ETMv4x to use same driver by checking only the ETM architecture major version number. Without this change, we get below error during etm probe: / # dmesg | grep etm [ 6.660093] coresight-etm4x: probe of 7040000.etm failed with error -22 [ 6.666902] coresight-etm4x: probe of 7140000.etm failed with error -22 [ 6.673708] coresight-etm4x: probe of 7240000.etm failed with error -22 [ 6.680511] coresight-etm4x: probe of 7340000.etm failed with error -22 [ 6.687313] coresight-etm4x: probe of 7440000.etm failed with error -22 [ 6.694113] coresight-etm4x: probe of 7540000.etm failed with error -22 [ 6.700914] coresight-etm4x: probe of 7640000.etm failed with error -22 [ 6.707717] coresight-etm4x: probe of 7740000.etm failed with error -22 With this change, etm probe is successful: / # dmesg | grep etm [ 6.659198] coresight-etm4x 7040000.etm: CPU0: ETM v4.2 initialized [ 6.665848] coresight-etm4x 7140000.etm: CPU1: ETM v4.2 initialized [ 6.672493] coresight-etm4x 7240000.etm: CPU2: ETM v4.2 initialized [ 6.679129] coresight-etm4x 7340000.etm: CPU3: ETM v4.2 initialized [ 6.685770] coresight-etm4x 7440000.etm: CPU4: ETM v4.2 initialized [ 6.692403] coresight-etm4x 7540000.etm: CPU5: ETM v4.2 initialized [ 6.699024] coresight-etm4x 7640000.etm: CPU6: ETM v4.2 initialized [ 6.705646] coresight-etm4x 7740000.etm: CPU7: ETM v4.2 initialized Signed-off-by: Sai Prakash Ranjan Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/hwtracing/coresight/coresight-etm4x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 1d94ebec027b..2bce7cf0b0af 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -54,7 +54,8 @@ static void etm4_os_unlock(struct etmv4_drvdata *drvdata) static bool etm4_arch_supported(u8 arch) { - switch (arch) { + /* Mask out the minor version number */ + switch (arch & 0xf0) { case ETM_ARCH_V4: break; default: -- 2.19.1