From patchwork Tue May 3 17:33:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 67086 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp719831qge; Tue, 3 May 2016 10:36:56 -0700 (PDT) X-Received: by 10.66.246.71 with SMTP id xu7mr5329502pac.17.1462297015993; Tue, 03 May 2016 10:36:55 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id p126si227646pfb.228.2016.05.03.10.36.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 May 2016 10:36:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1axeEa-00053j-7r; Tue, 03 May 2016 17:35:44 +0000 Received: from mail-ig0-x22b.google.com ([2607:f8b0:4001:c05::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1axeDV-0002nT-Mz for linux-arm-kernel@lists.infradead.org; Tue, 03 May 2016 17:34:39 +0000 Received: by mail-ig0-x22b.google.com with SMTP id bi2so123068504igb.0 for ; Tue, 03 May 2016 10:34:17 -0700 (PDT) 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=K7c0f+4MvIZHx4kQNiLVsq9oFYjSkyl2o0u2iwdb5bo=; b=iJpnocESju9pOCceakU3d9rRWvjc//bc8By0hhUG0z0a7J4rGlmRGLK7JTPhUzh3gf hl4iG1IdyKCPPXAOTQv0Bm/OtJvsY9pHQK5fciURCE2RIDDJ1rLnj+wzXoc2JNa0Xshy P5Q8rQqV5KF86O3dmNISzBcoqhUwoVRxm3F00= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K7c0f+4MvIZHx4kQNiLVsq9oFYjSkyl2o0u2iwdb5bo=; b=cecDqvz5Xkjib0QajUWnSiNxt4fx4magzyqTlz680cG3P8vy4Hd3sdRoK2PNaPzddy x2uSuJBJ/hnvjY1+Ml4b5+HSviysfu8BCi9HAMyKe0+iBVJzyhbgp6CWBXlb6RKSHfSE rBpufKfsRHvsCgnSxS0nvBqiWlJokog8lh2p4LrvnzqW9/QeGOig3Dt71pntCEAxCYBN yPkLXUT/GlimdmnLup/IGNzgziftMzrJzIQCJYI+ntFp7Ovnf7U3GigE/hcFA3MEse5v Osx9iZEUHK1uszBeARbeWU7EgaC6ajRjxYjB3YBgBjDlaq15/cuEmT09O+yR229TkxfX J2Tw== X-Gm-Message-State: AOPr4FUcv7y6mKroDWKaQiXZzHr7oEIf/RUSVGvg2OzYcbJD8QWGzmJQBGOoFSKIfasMLmRg X-Received: by 10.50.154.162 with SMTP id vp2mr5049927igb.15.1462296856753; Tue, 03 May 2016 10:34:16 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id k33sm103957iod.44.2016.05.03.10.34.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 May 2016 10:34:15 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 07/27] coresight: etb10: fixing the right amount of words to read Date: Tue, 3 May 2016 11:33:41 -0600 Message-Id: <1462296841-12327-8-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1462296841-12327-1-git-send-email-mathieu.poirier@linaro.org> References: <1462296841-12327-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160503_103437_978564_211B80D1 X-CRM114-Status: GOOD ( 13.70 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:4001:c05:0:0:0:22b listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This patch rectifies the amount of words to read when the internal buffer is deemed bigger than the amount of space available in the perf ring buffer. The amount to read is set to the amount of space in the perf ring buffer rather than being subtracted by it. Reported-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etb10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c index 2461d5c8c157..b0d402dbfeae 100644 --- a/drivers/hwtracing/coresight/coresight-etb10.c +++ b/drivers/hwtracing/coresight/coresight-etb10.c @@ -440,7 +440,7 @@ static void etb_update_buffer(struct coresight_device *csdev, u32 mask = ~(ETB_FRAME_SIZE_WORDS - 1); /* The new read pointer must be frame size aligned */ - to_read -= handle->size & mask; + to_read = handle->size & mask; /* * Move the RAM read pointer up, keeping in mind that * everything is in frame size units.