From: David Vrabel Date: Mon, 9 Jul 2012 10:39:07 +0000 (+0100) Subject: xen/x86: add desc_equal() to compare GDT descriptors X-Git-Tag: v2.6.39-400.9.0~488^2~2^2~9 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=dbdbdeab817089829c0250e8421b309c49cea7ec;p=users%2Fjedix%2Flinux-maple.git xen/x86: add desc_equal() to compare GDT descriptors Signed-off-by: David Vrabel [v1: Moving it to the Xen file] Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index cf86ffd786cb..17929f1537a1 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -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) {