From patchwork Tue Apr 9 12:33:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Covington X-Patchwork-Id: 2415301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id BB9BD3FC71 for ; Tue, 9 Apr 2013 12:52:43 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPXl4-0002uW-Kg; Tue, 09 Apr 2013 12:34:43 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPXkR-00018T-7d; Tue, 09 Apr 2013 12:34:03 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPXkO-000189-DU for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2013 12:34:01 +0000 X-IronPort-AV: E=Sophos;i="4.87,438,1363158000"; d="scan'208";a="37011008" Received: from pdmz-ns-snip_114_130.qualcomm.com (HELO mostmsg01.qualcomm.com) ([199.106.114.130]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Apr 2013 05:33:57 -0700 Received: from keeshans.qualcomm.com (pdmz-ns-snip_218_1.qualcomm.com [192.168.218.1]) by mostmsg01.qualcomm.com (Postfix) with ESMTPA id 959C510004D6; Tue, 9 Apr 2013 05:33:56 -0700 (PDT) From: Christopher Covington To: Will Deacon Subject: [PATCH v2] arm64: Fix task tracing Date: Tue, 9 Apr 2013 08:33:34 -0400 Message-Id: <1365510814-21343-1-git-send-email-cov@codeaurora.org> X-Mailer: git-send-email 1.8.2 In-Reply-To: <20130408153132.GQ17476@mudshark.cambridge.arm.com> References: <20130408153132.GQ17476@mudshark.cambridge.arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130409_083400_619564_9A1BF756 X-CRM114-Status: GOOD ( 10.34 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [199.106.114.251 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Catalin Marinas , Christopher Covington , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org For accurate accounting pass contextidr_thread_switch the prev task pointer, since cpu_switch_to has at that point changed the the stack pointer. Signed-off-by: Christopher Covington --- arch/arm64/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 0337cdb..a49b25a 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -315,7 +315,7 @@ struct task_struct *__switch_to(struct task_struct *prev, /* the actual thread switch */ last = cpu_switch_to(prev, next); - contextidr_thread_switch(next); + contextidr_thread_switch(prev); return last; }