From patchwork Fri Nov 22 10:27:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 179981 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp28221ilf; Fri, 22 Nov 2019 02:45:42 -0800 (PST) X-Google-Smtp-Source: APXvYqyA9aYPw5l9/egWCXuhhEy7PqrbxK3qbU6Y6S7hk2CL8k70TzcM3GhN5206VO/2QQbS5MsJ X-Received: by 2002:aa7:d0c1:: with SMTP id u1mr231407edo.27.1574419542136; Fri, 22 Nov 2019 02:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574419542; cv=none; d=google.com; s=arc-20160816; b=w8V6YlP10lFGLTD9CMZcRLcbJy+3tOQIgDDJqhVhkRKJRGmtcM91Nk7byGVNVK52KF YeNWpigwzE2us0gSLu6XUn8pgl1cQWhvMqly8asnZLxKHJe8B6u8M9EP0B/SQg1ZL8Vv dUA3LyjtUk0nN5pnYHtbvmxwb9/VQTAfZipzl8ofmWT1LGcQt6Wo2utCXFou6Qrz+yda ap952NcHOQY7WW3CLCD0SlzNMwoD38nhiUWJpdErwbXjsEL3QqTX9IkzuEU5ZyqJBA1k wzTdSkSFOkahH5IM1oo8UVe19A8NdoSZ06/3c/HZ65g8S9z4nJ8EHkKt6VaaB4tOCG2N Upjg== 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=fR5grtse5PNpdY8Mq7fjMKAWRdQEz9BfjGC/zSLvcaM=; b=f6JaH6tshbYJ88cZOD+viIs/kSUfdkWRRwHBeEgzJWbcy9HRcxV5KPECdZx1ln+3uC R10HtLQvkkOIOIv8cMg0K8+6jw7e0XVi7Jy94AAx1S01MgRhzPBXw8Vu1PHTLo+FmpVU dIvnr6HsHroin0l43f6TIOstBccyxxv6Y9vcaIJwa1+nDFdp73Rop+oSjy0a5H25HQe6 8jX8lIwpHq+FK2NRGVaXq/9Jm05weqAYNZAJRj7c3B33sCAqBnIESGDPJf/p5YnGrdti fP2da7upl6aVRzmKmj3NGug+B298OJ1gRZjCLAd5nQo/4bntYLbJQ9BRuz3/EXHoNlO/ UGZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TddfM8lq; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 z16si4406966edx.337.2019.11.22.02.45.41; Fri, 22 Nov 2019 02:45:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=TddfM8lq; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729486AbfKVKpk (ORCPT + 15 others); Fri, 22 Nov 2019 05:45:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:52148 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727593AbfKVKpj (ORCPT ); Fri, 22 Nov 2019 05:45:39 -0500 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 185342071C; Fri, 22 Nov 2019 10:45:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574419538; bh=C/p5ffkx9IEH3kI+wV1/WForkf/HV3MApMb1oJBFRpg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TddfM8lqTZN0X19SQHQJo9UcFLDMkvCZmOWVHr2nhgiUpqawGkTHioCtmL/SGkVUt PWAdmhsp3fzCxuRzO1gWL3vKCQCiHhNhPOkvuev5lBsKnXeAyhtV+dhN2nImhKHixI P5Sf9Pmsk7huGPmD2ZCCmiP79/okn4QNOk18WWZQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mathieu Poirier , Mike Leach , Leo Yan , Sasha Levin Subject: [PATCH 4.9 119/222] coresight: tmc: Fix byte-address alignment for RRP Date: Fri, 22 Nov 2019 11:27:39 +0100 Message-Id: <20191122100911.718972632@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100830.874290814@linuxfoundation.org> References: <20191122100830.874290814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Leo Yan [ Upstream commit e7753f3937610633a540f2be81be87531f96ff04 ] >From the comment in the code, it claims the requirement for byte-address alignment for RRP register: 'for 32-bit, 64-bit and 128-bit wide trace memory, the four LSBs must be 0s. For 256-bit wide trace memory, the five LSBs must be 0s'. This isn't consistent with the program, the program sets five LSBs as zeros for 32/64/128-bit wide trace memory and set six LSBs zeros for 256-bit wide trace memory. After checking with the CoreSight Trace Memory Controller technical reference manual (ARM DDI 0461B, section 3.3.4 RAM Read Pointer Register), it proves the comment is right and the program does wrong setting. This patch fixes byte-address alignment for RRP by following correct definition in the technical reference manual. Cc: Mathieu Poirier Cc: Mike Leach Signed-off-by: Leo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/hwtracing/coresight/coresight-tmc-etf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c index d6941ea24d8df..14df4e34c21cf 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c @@ -425,10 +425,10 @@ static void tmc_update_etf_buffer(struct coresight_device *csdev, case TMC_MEM_INTF_WIDTH_32BITS: case TMC_MEM_INTF_WIDTH_64BITS: case TMC_MEM_INTF_WIDTH_128BITS: - mask = GENMASK(31, 5); + mask = GENMASK(31, 4); break; case TMC_MEM_INTF_WIDTH_256BITS: - mask = GENMASK(31, 6); + mask = GENMASK(31, 5); break; }