瀏覽代碼

xen/x86: add desc_equal() to compare GDT descriptors

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
[v1: Moving it to the Xen file]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
David Vrabel 13 年之前
父節點
當前提交
59290362da
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      arch/x86/xen/enlighten.c

+ 6 - 0
arch/x86/xen/enlighten.c

@@ -539,6 +539,12 @@ static void __init xen_load_gdt_boot(const struct desc_ptr *dtr)
 		BUG();
 		BUG();
 }
 }
 
 
+static inline bool desc_equal(const struct desc_struct *d1,
+			      const struct desc_struct *d2)
+{
+	return d1->a == d2->a && d1->b == d2->b;
+}
+
 static void load_TLS_descriptor(struct thread_struct *t,
 static void load_TLS_descriptor(struct thread_struct *t,
 				unsigned int cpu, unsigned int i)
 				unsigned int cpu, unsigned int i)
 {
 {