summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/processor.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2022-11-20 11:29:39 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-11-20 11:29:39 -0300
commitb3c39b1a96a67a7e246d562f44d04ce6f9ef878f (patch)
tree6874debfde448db313bd7c53c3aca59687038c1f /arch/s390/include/asm/processor.h
parent63a3bf5e8d9e79ce456c8f73d4395a5a51d841b1 (diff)
parent77c51ba552a1c4f73228766e43ae37c4101b3758 (diff)
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes and check if libraries used that comes from other trees continue to work with tools/perf, such as tools/lib/bpf. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'arch/s390/include/asm/processor.h')
-rw-r--r--arch/s390/include/asm/processor.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index 87be3e855bf7..c907f747d2a0 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -199,7 +199,16 @@ unsigned long __get_wchan(struct task_struct *p);
/* Has task runtime instrumentation enabled ? */
#define is_ri_task(tsk) (!!(tsk)->thread.ri_cb)
-register unsigned long current_stack_pointer asm("r15");
+/* avoid using global register due to gcc bug in versions < 8.4 */
+#define current_stack_pointer (__current_stack_pointer())
+
+static __always_inline unsigned long __current_stack_pointer(void)
+{
+ unsigned long sp;
+
+ asm volatile("lgr %0,15" : "=d" (sp));
+ return sp;
+}
static __always_inline unsigned short stap(void)
{