From: David S. Miller <davem@sunset.davemloft.net>
Date: Fri, 17 Feb 2006 00:22:26 +0000 (-0800)
Subject: [SPARC64]: Add GET_GL_GLOBAL() macro for SUN4V.
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4ff7ac417d4b628c23df3ae8301d17e29e6e8f16;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git

[SPARC64]: Add GET_GL_GLOBAL() macro for SUN4V.

So we can read the %gl register for debugging.

Signed-off-by: David S. Miller <davem@davemloft.net>
---

diff --git a/include/asm-sparc64/head.h b/include/asm-sparc64/head.h
index c4ac3e87aa50..67960a751f4d 100644
--- a/include/asm-sparc64/head.h
+++ b/include/asm-sparc64/head.h
@@ -8,6 +8,10 @@
 #define SET_GL(val)	\
 	.word	0xa1902000 | val
 
+	/* rdpr %gl, %gN */
+#define GET_GL_GLOBAL(N)	\
+	.word	0x81540000 | (N << 25)
+
 #define KERNBASE	0x400000
 
 #define	PTREGS_OFF	(STACK_BIAS + STACKFRAME_SZ)