From patchwork Tue Nov 19 05:19:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 179674 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp160547ilf; Mon, 18 Nov 2019 21:40:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwK35PqVp9JiWqRTcknQCYOk4dkHrw38bRbd9bbiOHKDvtVGCZlbC++l0TyKa90WoQRI+hX X-Received: by 2002:a17:907:216e:: with SMTP id rl14mr32466560ejb.291.1574142004235; Mon, 18 Nov 2019 21:40:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574142004; cv=none; d=google.com; s=arc-20160816; b=yxKw6xGa+mdynH5jB4mDpTpMaoIMA4tSn66ffYtT0oeenn/zg03rBiGNhOLaAU5cRO h5cgqvJhyI/91cayaBpZlTEea512L+kKMLMWhrUl95ufsGk8ZNF4fJVclt1605iidoVb cGCvMPHUHOZEHANZUXkX2STF1EVxirFT+J6S4/8jrimg3BKJ9hkqllJkwR4VfoXN/XmW /lCM6/luCSnOtiVPKCbd7izK12OTdjYlj2SaUGbZi/rXWAjQA2xVRbEX2W7Tr5tA4Gt9 fawlFw0QR19FaVbcNqCP94au6/d/hsnAAtcrswdajHKxcWVF3WyVjDERYWTz8rYkPFX4 O8Vw== 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=HfyQRznqH2PRqMc6GjslCpP6ekKcnUgnRi/tEo+9F1o=; b=fvG2dyH5Oclu/YXFuXcRCGJoiTDQ9a9A4XgvkF8TJ4V+AQaJMdMkqqJWW/eT5WwZqd kF1s+nghOvsFLEHrEP8llkJujSOBdlEq68vXvp3+fIaOa8Z0rv4zshMQX9vJFVjwhHEf CtECbR5MjlFnSR/yejsTb1fRjtSZnKEc/0lqKpYdPk8/mjelnnwfXpJbpyem9Cvul3dN 5Bf59763P7JbL8t+2bPVGRstZ5Fpqa66KkDw6rK+CKX8qcGLpf4/aLmMSDLLZ3fFqsvM YK0cKxvP10gUyI8mlyKmBkK1Sq/9F8c3CwEhqqN8LZL3VPDZAuGLqB/LUyUola1N6CC4 y5xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1BScpzgQ; 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 b28si16247177edn.230.2019.11.18.21.40.04; Mon, 18 Nov 2019 21:40:04 -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=@kernel.org header.s=default header.b=1BScpzgQ; 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 S1730345AbfKSFkA (ORCPT + 26 others); Tue, 19 Nov 2019 00:40:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:34030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730047AbfKSFj6 (ORCPT ); Tue, 19 Nov 2019 00:39:58 -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 310B321783; Tue, 19 Nov 2019 05:39:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574141997; bh=gi0fFzVngAvPuitwbmsk2jTMbC43FgfYPfful1aETBg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1BScpzgQ7Hn6NiPYUobT4V0wmSpWSyuJfX5v3UDbVzGVWrNuw8EnPLp5z+FF7GK8B Y1oQ5T0EWPcDSvnFDvDQSzL4zPvG2aQSoTEeaUWmNN1JQTolzgt+yJprxX5rV+hk6C AN0OEBcLZF629I37kYuPzQpMTgmVF7LOL7xtZDH4= 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.19 350/422] coresight: tmc: Fix byte-address alignment for RRP Date: Tue, 19 Nov 2019 06:19:07 +0100 Message-Id: <20191119051421.693240152@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051400.261610025@linuxfoundation.org> References: <20191119051400.261610025@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 0549249f4b398..e31061308e19e 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c @@ -438,10 +438,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; }