From 17d5b062c9a2ce0f6c775e3b383aa43bd0a5c8c5 Mon Sep 17 00:00:00 2001 From: dfr Date: Fri, 5 Oct 2001 08:20:41 +0000 Subject: [PATCH] Add ia64_get_lid(). --- sys/ia64/include/ia64_cpu.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/ia64/include/ia64_cpu.h b/sys/ia64/include/ia64_cpu.h index 1a550af8a4c9..2fba3d19bdae 100644 --- a/sys/ia64/include/ia64_cpu.h +++ b/sys/ia64/include/ia64_cpu.h @@ -418,7 +418,7 @@ ia64_get_itc(void) } /* - * Read the value of ar.itm. + * Read the value of cr.itm. */ static __inline u_int64_t ia64_get_itm(void) @@ -429,7 +429,7 @@ ia64_get_itm(void) } /* - * Write the value of ar.itm. + * Write the value of cr.itm. */ static __inline void ia64_set_itm(u_int64_t v) @@ -438,7 +438,7 @@ ia64_set_itm(u_int64_t v) } /* - * Write the value of ar.itv. + * Write the value of cr.itv. */ static __inline void ia64_set_itv(u_int64_t v) @@ -446,6 +446,17 @@ ia64_set_itv(u_int64_t v) __asm __volatile("mov cr.itv=%0" :: "r" (v)); } +/* + * Read the value of cr.lid. + */ +static __inline u_int64_t +ia64_get_lid(void) +{ + u_int64_t result; + __asm __volatile("mov %0=cr.lid" : "=r" (result)); + return result; +} + /* * Write a region register. */