]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen/x86: add desc_equal() to compare GDT descriptors
authorDavid Vrabel <david.vrabel@citrix.com>
Mon, 9 Jul 2012 10:39:07 +0000 (11:39 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 19 Jul 2012 23:06:12 +0000 (19:06 -0400)
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>
arch/x86/xen/enlighten.c

index cf86ffd786cb404f258dd67210596fe774116f36..17929f1537a1049439388dea0652b8c380d166ee 100644 (file)
@@ -452,6 +452,12 @@ static void __init xen_load_gdt_boot(const struct desc_ptr *dtr)
                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,
                                unsigned int cpu, unsigned int i)
 {