From patchwork Fri Jun 30 17:41:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 106762 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2614473qge; Fri, 30 Jun 2017 10:43:38 -0700 (PDT) X-Received: by 10.99.154.18 with SMTP id o18mr21935298pge.251.1498844618837; Fri, 30 Jun 2017 10:43:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498844618; cv=none; d=google.com; s=arc-20160816; b=FFTgTW7IJOYUe+AorjoZsQ6sWxB/qQF+zzRnpUAvHfa4gAvRwJtDowliUQqPC/9qmI x3VWqbudF02Bm3EVgFlBArpDQOQ7Yss13YFlqQodqyvmbZ27uk8kAmuQKq15d9lZcAxN ZnqbMdZi25bTb3kyyscqLlAleumI6BElYLPMiROPbb4rrFs4uLbTIuV3uZdvVbHH5tgc XURCCxZGc6NaQXVccj9MxoLGwATTwEn1VJz+MljbMoKuJNJ3F+ifyG597X1C7nlkY5vs Unoivt2ZMIGmqNWc/hODbPT4ARaRMPaf8z9zamVPntYCnlSbYkdO9ah8+uFujteMqhXa gJjQ== 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:arc-authentication-results; bh=CXQDoW7VxjFlQN2bFUHlbxUVb8/hzwdlNyS5tnTNtqI=; b=qe4L1yI8yEWjsJ881j8DhyHK+QmuCQcavlmgBaCYaAJl73AYFQWbMMzvmSav4k/wEX PkjkRRQCXyxCJnDIKvnQAOtHhYNM/3wGjfFs5eioKAaJNTYWY1lJcj+96jucCgwPWVcs XuEq+HCI7SK/ydU0l4viUamzRIc0IFgLzNduRVrsEyBXuuoZz7Bw4dvmFiXTgfWQMjJP nD5srAB05zL4zQmDy/euQhh9NYXR6WVlWFTdyZyeqfxt+8vD1hruXpBje1WeSeqrJSVS kvhlEdIoZUs7oy8X/BzNdLwYiFEI0KCA20ziUXDOvoN8bsxGD9gHyyM1+jiXbGIU3srZ CAcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=aVTlY2SL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u20si6075001pfl.243.2017.06.30.10.43.38; Fri, 30 Jun 2017 10:43:38 -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=@linaro.org header.b=aVTlY2SL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752621AbdF3RnL (ORCPT + 25 others); Fri, 30 Jun 2017 13:43:11 -0400 Received: from mail-io0-f171.google.com ([209.85.223.171]:35827 "EHLO mail-io0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751581AbdF3RmE (ORCPT ); Fri, 30 Jun 2017 13:42:04 -0400 Received: by mail-io0-f171.google.com with SMTP id h134so27984819iof.2 for ; Fri, 30 Jun 2017 10:42:04 -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=CXQDoW7VxjFlQN2bFUHlbxUVb8/hzwdlNyS5tnTNtqI=; b=aVTlY2SL9zwqIMAxdrF3VAVI8R1p+FxPnHM8aoMjxBLXi0SsXsVocYydHh5u8hFkru qjjHa6U0KFNBXECPKo10NI1LmDG0ZXA6g6mSmzs8/m0Bz5Y/XVHby7pB4/lmr3N6KLrS M0CvVOBoLpI5cpGRRI1CxmK5EurhAlVQwJ8mo= 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=CXQDoW7VxjFlQN2bFUHlbxUVb8/hzwdlNyS5tnTNtqI=; b=Rq0rjyspT6PwZJY6VTtkH4lghF5llB5Q/+zXxSIhqmilmKXN14jDJvRJ/PS9kkSG7v EjENy5rgw/zsCjPBXGhmiNWpzbiIHhgUQ8Dr652ruHUQ8/y1k1Zgfs9dmkZZFa1UYnel zVwGbC4ou6+43ei1x2ZUGiWF88ou2wD+/QYQR2j4OSDzHDKvXUqbGLhBFq+EbDJg7LJc 5CasU7B3oiGBusxX9FstnY5KS6LeZQuW4zVmYXqv8wPuSxabIJRcQgvMAkz2XLvb+aR2 63qHz+oz5YJhUtkOu8wb4OxKZP76Yh2gRi15din+2KDeO5ytJFG+UHtqJd4EAk9eU5uq fR6Q== X-Gm-Message-State: AKS2vOzc+wVo7CuPNdYieTM3UWM/RQzaWzEcSDePI+Ze5XSNe1bUDDbs DmG850dc5QnRhB+x X-Received: by 10.107.28.76 with SMTP id c73mr22306849ioc.142.1498844523903; Fri, 30 Jun 2017 10:42:03 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id d23sm4381451ioj.22.2017.06.30.10.42.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Jun 2017 10:42:03 -0700 (PDT) From: Mathieu Poirier To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/5] coresight: etb10: Remove useless conversion to LE Date: Fri, 30 Jun 2017 11:41:56 -0600 Message-Id: <1498844519-8845-3-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498844519-8845-1-git-send-email-mathieu.poirier@linaro.org> References: <1498844519-8845-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Internal CoreSight components are rendering trace data in little-endian format. As such there is no need to convert the data once more, hence removing the extra step. Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etb10.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c index d9c233135d6d..50f4846e6271 100644 --- a/drivers/hwtracing/coresight/coresight-etb10.c +++ b/drivers/hwtracing/coresight/coresight-etb10.c @@ -233,10 +233,8 @@ static void etb_dump_hw(struct etb_drvdata *drvdata) for (i = 0; i < depth; i++) { read_data = readl_relaxed(drvdata->base + ETB_RAM_READ_DATA_REG); - *buf_ptr++ = read_data >> 0; - *buf_ptr++ = read_data >> 8; - *buf_ptr++ = read_data >> 16; - *buf_ptr++ = read_data >> 24; + *(u32 *)buf_ptr = read_data; + buf_ptr += 4; } if (frame_off) { @@ -444,10 +442,8 @@ static void etb_update_buffer(struct coresight_device *csdev, buf_ptr = buf->data_pages[cur] + offset; read_data = readl_relaxed(drvdata->base + ETB_RAM_READ_DATA_REG); - *buf_ptr++ = read_data >> 0; - *buf_ptr++ = read_data >> 8; - *buf_ptr++ = read_data >> 16; - *buf_ptr++ = read_data >> 24; + *(u32 *)buf_ptr = read_data; + buf_ptr += 4; offset += 4; if (offset >= PAGE_SIZE) {