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 Cc: behanw@converseincode.com, Dave.Martin@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, rabin@rab.in, rostedt@goodmis.org, rric@kernel.org, will.deacon@arm.com Subject: [PATCH v2 5/7] arm: LLVMLinux: Calculate current_thread_info from current_stack_pointer Date: Fri, 5 Sep 2014 17:06:15 -0700 [thread overview] Message-ID: <1409961977-11762-6-git-send-email-behanw@converseincode.com> (raw) In-Reply-To: <1409961977-11762-1-git-send-email-behanw@converseincode.com> From: Behan Webster <behanw@converseincode.com> 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 <behanw@converseincode.com> Signed-off-by: Mark Charlebois <charlebm@gmail.com> Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de> --- arch/arm/include/asm/thread_info.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index bb43515..b9dc3dc 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h @@ -112,8 +112,8 @@ static inline struct thread_info *current_thread_info(void) __attribute_const__; static inline struct thread_info *current_thread_info(void) { - register unsigned long sp asm ("sp"); - return (struct thread_info *)(sp & ~(THREAD_SIZE - 1)); + return (struct thread_info *) + (current_stack_pointer & ~(THREAD_SIZE - 1)); } #define thread_saved_pc(tsk) \ -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: behanw@converseincode.com (behanw at converseincode.com) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 5/7] arm: LLVMLinux: Calculate current_thread_info from current_stack_pointer Date: Fri, 5 Sep 2014 17:06:15 -0700 [thread overview] Message-ID: <1409961977-11762-6-git-send-email-behanw@converseincode.com> (raw) In-Reply-To: <1409961977-11762-1-git-send-email-behanw@converseincode.com> From: Behan Webster <behanw@converseincode.com> 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 <behanw@converseincode.com> Signed-off-by: Mark Charlebois <charlebm@gmail.com> Reviewed-by: Jan-Simon M?ller <dl9pf@gmx.de> --- arch/arm/include/asm/thread_info.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index bb43515..b9dc3dc 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h @@ -112,8 +112,8 @@ static inline struct thread_info *current_thread_info(void) __attribute_const__; static inline struct thread_info *current_thread_info(void) { - register unsigned long sp asm ("sp"); - return (struct thread_info *)(sp & ~(THREAD_SIZE - 1)); + return (struct thread_info *) + (current_stack_pointer & ~(THREAD_SIZE - 1)); } #define thread_saved_pc(tsk) \ -- 1.9.1
next prev parent reply other threads:[~2014-09-06 0:07 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-09-06 0:06 [PATCH v2 0/7] LLVMLinux: Patches to enable the kernel to be compiled with clang/LLVM behanw 2014-09-06 0:06 ` behanw at converseincode.com 2014-09-06 0:06 ` [PATCH v2 1/7] arm: LLVMLinux: Add global named register current_stack_pointer for ARM behanw 2014-09-06 0:06 ` behanw at converseincode.com 2014-09-06 0:06 ` [PATCH v2 2/7] arm: LLVMLinux: Use current_stack_pointer to calculate pt_regs address behanw 2014-09-06 0:06 ` behanw at converseincode.com 2014-09-06 0:06 ` [PATCH v2 3/7] arm: LLVMLinux: Use current_stack_pointer for return_address behanw 2014-09-06 0:06 ` behanw at converseincode.com 2014-09-06 0:06 ` [PATCH v2 4/7] arm: LLVMLinux: Use current_stack_pointer in save_stack_trace_tsk behanw 2014-09-06 0:06 ` behanw at converseincode.com 2014-09-06 0:06 ` behanw [this message] 2014-09-06 0:06 ` [PATCH v2 5/7] arm: LLVMLinux: Calculate current_thread_info from current_stack_pointer behanw at converseincode.com 2014-09-06 0:06 ` [PATCH v2 6/7] arm: LLVMLinux: Use current_stack_pointer in unwind_backtrace behanw 2014-09-06 0:06 ` behanw at converseincode.com 2014-09-06 0:06 ` [PATCH v2 7/7] arm: LLVMLinux: Use global stack register variable for percpu behanw 2014-09-06 0:06 ` behanw at converseincode.com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1409961977-11762-6-git-send-email-behanw@converseincode.com \ --to=behanw@converseincode.com \ --cc=Dave.Martin@arm.com \ --cc=Nikolay.Borisov@arm.com \ --cc=a.ryabinin@samsung.com \ --cc=anurag19aggarwal@gmail.com \ --cc=charlebm@gmail.com \ --cc=cl@linux-foundation.org \ --cc=dave.long@linaro.org \ --cc=k.khlebnikov@samsung.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=linyongting@gmail.com \ --cc=rabin@rab.in \ --cc=rostedt@goodmis.org \ --cc=rric@kernel.org \ --cc=tglx@linutronix.de \ --cc=tj@kernel.org \ --cc=u.kleine-koenig@pengutronix.de \ --cc=will.deacon@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.