From patchwork Sat Aug 10 04:49:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Yang X-Patchwork-Id: 266186 X-Patchwork-Delegate: michael@ellerman.id.au Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 8ED782C0216 for ; Sat, 10 Aug 2013 14:50:13 +1000 (EST) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe002.messaging.microsoft.com [216.32.181.182]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "MSIT Machine Auth CA 2" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 705B72C00BE for ; Sat, 10 Aug 2013 14:49:45 +1000 (EST) Received: from mail116-ch1-R.bigfish.com (10.43.68.229) by CH1EHSOBE010.bigfish.com (10.43.70.60) with Microsoft SMTP Server id 14.1.225.22; Sat, 10 Aug 2013 04:49:39 +0000 Received: from mail116-ch1 (localhost [127.0.0.1]) by mail116-ch1-R.bigfish.com (Postfix) with ESMTP id 5BA7E420132; Sat, 10 Aug 2013 04:49:39 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de098h8275bh1de097hz2dh2a8h668h839he5bhf0ah1239h1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1b5bh1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e1dh1e23h1fe8h1155h) Received: from mail116-ch1 (localhost.localdomain [127.0.0.1]) by mail116-ch1 (MessageSwitch) id 1376110177271570_8719; Sat, 10 Aug 2013 04:49:37 +0000 (UTC) Received: from CH1EHSMHS034.bigfish.com (snatpool2.int.messaging.microsoft.com [10.43.68.234]) by mail116-ch1.bigfish.com (Postfix) with ESMTP id 3D9A62A004C; Sat, 10 Aug 2013 04:49:37 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS034.bigfish.com (10.43.70.34) with Microsoft SMTP Server (TLS) id 14.16.227.3; Sat, 10 Aug 2013 04:49:37 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.3.136.1; Sat, 10 Aug 2013 04:49:35 +0000 Received: from perf2farm5.perfsim (perf2farm5.am.freescale.net [10.82.177.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r7A4nVSL027830; Fri, 9 Aug 2013 21:49:35 -0700 Received: from ra8135 by perf2farm5.perfsim with local (Exim 4.71) (envelope-from ) id 1V817L-0000uK-Mp; Fri, 09 Aug 2013 23:49:31 -0500 From: James Yang To: , Subject: [PATCH] powerpc/ppc64: remove __volatile__ in get_current() Date: Fri, 9 Aug 2013 23:49:22 -0500 Message-ID: <1376110162-3462-1-git-send-email-James.Yang@freescale.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.net X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: James Yang , linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Uses of get_current() that normally get optimized away still result in a load instruction of the current pointer in 64-bit because the inline asm uses __volatile__. This patch removes __volatile__ so that nop-ed uses of get_current() don't actually result in a load of the pointer. Signed-off-by: James Yang --- arch/powerpc/include/asm/current.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/current.h b/arch/powerpc/include/asm/current.h index e2c7f06..bb250c8 100644 --- a/arch/powerpc/include/asm/current.h +++ b/arch/powerpc/include/asm/current.h @@ -19,7 +19,7 @@ static inline struct task_struct *get_current(void) { struct task_struct *task; - __asm__ __volatile__("ld %0,%1(13)" + __asm__ ("ld %0,%1(13)" : "=r" (task) : "i" (offsetof(struct paca_struct, __current)));