From patchwork Sat Sep 6 00:06:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Behan Webster X-Patchwork-Id: 36924 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f71.google.com (mail-qg0-f71.google.com [209.85.192.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3963B202A1 for ; Sat, 6 Sep 2014 00:08:33 +0000 (UTC) Received: by mail-qg0-f71.google.com with SMTP id a108sf4347633qge.6 for ; Fri, 05 Sep 2014 17:08:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:mime-version:cc:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=cGdDyStyOAPAq2nDphDZPF9KnI97Q1MxhwyZlWL2EE0=; b=UJNP8IopfFmOWftwXeHsWYLerhTnTbXNdOel+6iX9OeZYM/RBCUfMF0Vw7tezoNgjD Y9hTJ5tMYpb+/H7Rd7PlvbwiMMDNDajqoLGyVDNoSeQTpuGEejWRLUqVSn1vzTDw9Byj cSRpoqyHZMN4jCNiIio9pZ0JyWwOwH63VXgMqW4UMrKBE/rrsIwju2JEMGkU3v1xSTbf sVCzg9cvefcw5EYQuuc32Lu9YAFGe/ZHycaa+d3uqtqro64UNDPT/OWYzxRr1W/w+0Pb 2eDdPDKRFhEv5mIfV1ZRtEQMuq+uoNbXGz8T/9R41bwEXv962twGNraYUfa4R0iHJZeA 755w== X-Gm-Message-State: ALoCoQlE84v9P4KeCG7XD0BrgIAIco/lRoP2hNkE465RzzI2EPWOf+LhJvNRGwiQanFG/kRs4dYt X-Received: by 10.52.29.196 with SMTP id m4mr9018371vdh.4.1409962113063; Fri, 05 Sep 2014 17:08:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.168 with SMTP id p37ls1019647qgp.12.gmail; Fri, 05 Sep 2014 17:08:33 -0700 (PDT) X-Received: by 10.221.61.5 with SMTP id wu5mr13044377vcb.13.1409962112976; Fri, 05 Sep 2014 17:08:32 -0700 (PDT) Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [2607:f8b0:400c:c03::22e]) by mx.google.com with ESMTPS id 10si1584091vci.55.2014.09.05.17.08.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 17:08:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22e as permitted sender) client-ip=2607:f8b0:400c:c03::22e; Received: by mail-vc0-f174.google.com with SMTP id hy4so13141004vcb.19 for ; Fri, 05 Sep 2014 17:08:32 -0700 (PDT) X-Received: by 10.52.168.134 with SMTP id zw6mr3600317vdb.37.1409962112886; Fri, 05 Sep 2014 17:08:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp153638vcb; Fri, 5 Sep 2014 17:08:32 -0700 (PDT) X-Received: by 10.66.141.197 with SMTP id rq5mr26473268pab.124.1409962112056; Fri, 05 Sep 2014 17:08:32 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id jd8si6350436pbd.152.2014.09.05.17.08.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Sep 2014 17:08:32 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1XQ3XM-000866-MX; Sat, 06 Sep 2014 00:07:28 +0000 Received: from mail-pd0-x22c.google.com ([2607:f8b0:400e:c02::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XQ3X7-0007rb-5b for linux-arm-kernel@lists.infradead.org; Sat, 06 Sep 2014 00:07:13 +0000 Received: by mail-pd0-f172.google.com with SMTP id v10so4131939pde.17 for ; Fri, 05 Sep 2014 17:06:51 -0700 (PDT) X-Received: by 10.70.64.166 with SMTP id p6mr26727412pds.139.1409962011536; Fri, 05 Sep 2014 17:06:51 -0700 (PDT) Received: from galdor.websterwood.com (S0106dc9fdb80cffd.gv.shawcable.net. [96.50.97.138]) by mx.google.com with ESMTPSA id yx1sm2867621pab.5.2014.09.05.17.06.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Sep 2014 17:06:50 -0700 (PDT) From: behanw@converseincode.com To: a.ryabinin@samsung.com, anurag19aggarwal@gmail.com, charlebm@gmail.com, cl@linux-foundation.org, dave.long@linaro.org, k.khlebnikov@samsung.com, linux@arm.linux.org.uk, linyongting@gmail.com, Nikolay.Borisov@arm.com, tglx@linutronix.de, tj@kernel.org, u.kleine-koenig@pengutronix.de Subject: [PATCH v2 3/7] arm: LLVMLinux: Use current_stack_pointer for return_address Date: Fri, 5 Sep 2014 17:06:13 -0700 Message-Id: <1409961977-11762-4-git-send-email-behanw@converseincode.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409961977-11762-1-git-send-email-behanw@converseincode.com> References: <1409961977-11762-1-git-send-email-behanw@converseincode.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140905_170713_289387_9801B985 X-CRM114-Status: GOOD ( 11.22 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c02:0:0:0:22c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: rric@kernel.org, will.deacon@arm.com, linux-kernel@vger.kernel.org, rostedt@goodmis.org, rabin@rab.in, Dave.Martin@arm.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Original-Sender: behanw@converseincode.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22e as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@ Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Behan Webster Use the global current_stack_pointer to get the value of the stack pointer. This change supports being able to compile the kernel with both gcc and Clang. Signed-off-by: Behan Webster Signed-off-by: Mark Charlebois Reviewed-by: Jan-Simon Möller --- arch/arm/kernel/return_address.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c index fafedd8..5bceaef 100644 --- a/arch/arm/kernel/return_address.c +++ b/arch/arm/kernel/return_address.c @@ -39,13 +39,12 @@ void *return_address(unsigned int level) { struct return_address_data data; struct stackframe frame; - register unsigned long current_sp asm ("sp"); data.level = level + 2; data.addr = NULL; frame.fp = (unsigned long)__builtin_frame_address(0); - frame.sp = current_sp; + frame.sp = current_stack_pointer; frame.lr = (unsigned long)__builtin_return_address(0); frame.pc = (unsigned long)return_address;