From patchwork Mon Feb 25 17:54:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 159182 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp2300926jad; Mon, 25 Feb 2019 09:54:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IbZ4GJFDn1VUM23pd8ZxTmNkebYl2lNaCzPqVOqFFmF39WM7JsiVFDRb6IGXW9M6peoQvPD X-Received: by 2002:a62:6453:: with SMTP id y80mr21267844pfb.203.1551117258559; Mon, 25 Feb 2019 09:54:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551117258; cv=none; d=google.com; s=arc-20160816; b=Upha/ey9F5bz/NUBQ8gpyxysnfUv+JCJE5B4q89e8PC/lbW/swzGsYyHMoQrTt7B4V emR+Kub4bI6JlWqOWHv0dyoQL6mKiwLNzSmVfz/qJqqRfcqZLNhy4D2IOrd/rEywieoW TSK3k30xcC+/xBxwBfY372m8xs9fW4IefxmCFlgSPjJdSVg0EzrPDeKmzDUkZ89OVRvQ w+yxRT4Epo5JJYyA7bSdhhckCKYlYeGwzp5HTap+xPuFfJkRxtzica1NRYhUrV00Jn3p KzxAtZAiRrjYfkyq+SLKldGxojbM76QPPcf7vmYZjDvp03p0mEj71W9dZZ6xloVFvnap g0ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=gzq6vfQHzGWyeLb0TiRQKsKtzM247mh6zsfOdLM3MNQ=; b=K/En4wD2HZRUgUJ5VeSfdLzKK1bUsUIrWvi6gCeqoRLGDeweo9EtoNbPOlAxKr5P2E 6nh+Z6orgTKn0YydxFK4hhiLYJdNEYUgVHnJ16kN2S8jhJAe1xFKyQkG7oC/0gSJ8IVQ VagE1JQ0luytvuIo/GiLBswutQQct3tS7VRB6N23DeAKtpV2LlxGUamYk+aXXVM/XVFm 2qQo07LpMoM6+jKcOA/wVNyCSoU3CAwQEDP5Rl0y5TzcBwTxoNiEcGKG4pWai/WjPRrO jfOoYAAbjBm91yK/nLMpL7eq0JdqP+3VFcEfSQsqm4h5XN1mPBhFpVtqZ5moBv/oPELC +NMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rF9oQLhP; 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 f11si9695285plo.96.2019.02.25.09.54.18; Mon, 25 Feb 2019 09:54:18 -0800 (PST) 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=@linaro.org header.s=google header.b=rF9oQLhP; 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 S1728761AbfBYRyG (ORCPT + 32 others); Mon, 25 Feb 2019 12:54:06 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:39990 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726350AbfBYRyE (ORCPT ); Mon, 25 Feb 2019 12:54:04 -0500 Received: by mail-pl1-f194.google.com with SMTP id bj4so4824864plb.7 for ; Mon, 25 Feb 2019 09:54:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gzq6vfQHzGWyeLb0TiRQKsKtzM247mh6zsfOdLM3MNQ=; b=rF9oQLhP90GEfr0vq+e2lst76ilKM4iL70dyP4NE/mU02+65uDyhTG1zCQrQZ2zmkT NwZsYlRyyQOQlYc5s7mRl+QiCWLDmdlHlwMJoF/Pmf4oTcadKD92+IKQVvn2BMmtoZtv jU06q14WYfnx5nMPV5SxACUIkNyYjQzCtEYL0TIceTGKWA7KD00ZuHH/1emCl7K+6cVc OSc35Uv2lSqnsVIcoMC3imDQbKNwuCqRxq0Cq9O7q+p7yfqS6ViTvd25N/iS1zPcQGPl GJv/SYtdOaA15QUrX6ykUznfniHVpes/xoUixAuQizPV5C/svM/RSh9zoYk8iysbhGvv ia/A== 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:in-reply-to :references; bh=gzq6vfQHzGWyeLb0TiRQKsKtzM247mh6zsfOdLM3MNQ=; b=PedoB1bKbTjmj64UeGuK8ou7Ys4rH62prFM8y3c1BCcDGNrne4yUBqsoDeAKQHmbPz h8+mcTj+nl85bo/0BjYJ9UBgWvCfF3YTPWBH3kmTtkr9DMYJaFmHPlnbTtEtZJhN9Jmq ZE/GQ2djMhWkjleZy6b+WqNwawf/Lqi8745gn6WfdoOGS9+3z2dJ1l2VRORVyRYLyA0R cedTMXWbXSOEFUtlBdgaAVRSpoCA1uNOspyyMRTrANHYyNnWbt3TFYWWwcVv3K6AYlxm U3/YTa4SRiW+p0czW17XMJJKb7B/47eRHu79UguwNiNo/StMF1RpAsIFmsI/6pUKe002 2xlw== X-Gm-Message-State: AHQUAuapRouSDeNkTJgf1jFGT1iFS8GwYZKElnGyBWephXiUQGijZlCa pp9JPLz+pQmCUz8GtAawUwBphu91raw= X-Received: by 2002:a17:902:850a:: with SMTP id bj10mr21421508plb.91.1551117244186; Mon, 25 Feb 2019 09:54:04 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id v9sm15398997pfg.144.2019.02.25.09.54.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 09:54:03 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] coresight: etm4x: Add support to enable ETMv4.2 Date: Mon, 25 Feb 2019 10:54:01 -0700 Message-Id: <20190225175401.26467-2-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190225175401.26467-1-mathieu.poirier@linaro.org> References: <20190225175401.26467-1-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sai Prakash Ranjan 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 --- drivers/hwtracing/coresight/coresight-etm4x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 53e2fb6e86f6..fe76b176974a 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -55,7 +55,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: