From patchwork Wed Aug 27 04:29:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Behan Webster X-Patchwork-Id: 36069 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f199.google.com (mail-ig0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2B60C20551 for ; Wed, 27 Aug 2014 04:30:21 +0000 (UTC) Received: by mail-ig0-f199.google.com with SMTP id l13sf24730137iga.10 for ; Tue, 26 Aug 2014 21:30:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=UDQMtM5hHqHWXZmhLcS65de4XpyJyDRQPynkvm89euQ=; b=QBjV6brTP/sxrb0UuAtHnjs94SDVqCHWpzkZtJhiOttWBmo9ihm/gKA189g62bBxdV OC9kWeMefwIXGDF7YDZef0Ia6Y5kdh3VZGid3fmfNJjunTrmRs3XMzG28HAFu05F4tMZ 85Xux2ZNQtfw6BOkM5BWulYAulcCAwTbOShx5J/O04x3esiJNGHYFOSEXTw3h47xnX/k AbulTukMa+oxqjaG5YD4IbWA47JvXA8rCuHxugjqN41GQQZQR6ILyYrxBC+X4ZAL2C/4 MNtpC8zXWGeLWeS3/rNElBEMAZme0vII4olukYmWV7N/Jo6GNLXTmFPfOavkkMnObTd1 Pdjw== X-Gm-Message-State: ALoCoQm1mXItl6S8l0LRMZixWfHNkyF1kVj6Ln5ao4f4jzvZsx35tYy0wuFls1j/CjUO7dtYM5QF X-Received: by 10.182.4.73 with SMTP id i9mr20892161obi.28.1409113820619; Tue, 26 Aug 2014 21:30:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.42.133 with SMTP id c5ls3035396qga.38.gmail; Tue, 26 Aug 2014 21:30:20 -0700 (PDT) X-Received: by 10.236.45.10 with SMTP id o10mr47887233yhb.49.1409113820540; Tue, 26 Aug 2014 21:30:20 -0700 (PDT) Received: from mail-yh0-x22a.google.com (mail-yh0-x22a.google.com [2607:f8b0:4002:c01::22a]) by mx.google.com with ESMTPS id f65si4297912yhd.13.2014.08.26.21.30.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Aug 2014 21:30:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:4002:c01::22a as permitted sender) client-ip=2607:f8b0:4002:c01::22a; Received: by mail-yh0-f42.google.com with SMTP id a41so12922117yho.15 for ; Tue, 26 Aug 2014 21:30:20 -0700 (PDT) X-Received: by 10.220.167.9 with SMTP id o9mr27079691vcy.8.1409113820450; Tue, 26 Aug 2014 21:30:20 -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 uj3csp27555vcb; Tue, 26 Aug 2014 21:30:19 -0700 (PDT) X-Received: by 10.68.111.161 with SMTP id ij1mr42622653pbb.40.1409113819570; Tue, 26 Aug 2014 21:30:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yk5si6975415pbc.183.2014.08.26.21.30.18 for ; Tue, 26 Aug 2014 21:30:19 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932777AbaH0EaA (ORCPT + 26 others); Wed, 27 Aug 2014 00:30:00 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:62157 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932621AbaH0E35 (ORCPT ); Wed, 27 Aug 2014 00:29:57 -0400 Received: by mail-pd0-f178.google.com with SMTP id w10so23646867pde.23 for ; Tue, 26 Aug 2014 21:29:56 -0700 (PDT) X-Received: by 10.66.90.229 with SMTP id bz5mr42111421pab.80.1409113796544; Tue, 26 Aug 2014 21:29:56 -0700 (PDT) Received: from galdor.websterwood.com (S0106dc9fdb80cffd.gv.shawcable.net. [96.50.97.138]) by mx.google.com with ESMTPSA id dn5sm5029335pbb.2.2014.08.26.21.29.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Aug 2014 21:29:55 -0700 (PDT) From: behanw@converseincode.com To: ard.biesheuvel@linaro.org, catalin.marinas@arm.com, cl@linux-foundation.org, jays.lee@samsung.com, k.khlebnikov@samsung.com, larry.bassel@linaro.org, olof@lixom.net, peterz@infradead.org, takahiro.akashi@linaro.org, tglx@linutronix.de, tj@kernel.org, will.deacon@arm.com Cc: christoffer.dall@linaro.org, kgene.kim@samsung.com, khilman@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sungjinn.chung@samsung.com, Behan Webster , Mark Charlebois Subject: [PATCH V2 6/6] arm64: LLVMLinux: Use global stack pointer in return_address() Date: Tue, 26 Aug 2014 21:29:34 -0700 Message-Id: <1409113774-3172-7-git-send-email-behanw@converseincode.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409113774-3172-1-git-send-email-behanw@converseincode.com> References: <20140826141608.GT23445@arm.com> <1409113774-3172-1-git-send-email-behanw@converseincode.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.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:4002:c01::22a 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Behan Webster The global register current_stack_pointer holds the current stack pointer. This change supports being able to compile the kernel with both gcc and clang. Author: Mark Charlebois Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster --- arch/arm64/kernel/return_address.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kernel/return_address.c b/arch/arm64/kernel/return_address.c index 89102a6..6c4fd28 100644 --- a/arch/arm64/kernel/return_address.c +++ b/arch/arm64/kernel/return_address.c @@ -36,13 +36,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.pc = (unsigned long)return_address; /* dummy */ walk_stackframe(&frame, save_return_addr, &data);