From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 3/4] x86: add desc_equal() to compare GDT descriptors Date: Wed, 11 Jul 2012 15:21:01 -0400 Message-ID: <20120711192101.GA10062@phenom.dumpdata.com> References: <1341830348-15529-1-git-send-email-david.vrabel@citrix.com> <1341830348-15529-4-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1341830348-15529-4-git-send-email-david.vrabel@citrix.com> Sender: linux-kernel-owner@vger.kernel.org To: David Vrabel Cc: xen-devel@lists.xensource.com, x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org List-Id: xen-devel@lists.xenproject.org On Mon, Jul 09, 2012 at 11:39:07AM +0100, David Vrabel wrote: > From: David Vrabel > > Signed-off-by: David Vrabel Acked-by: Konrad Rzeszutek Wilk > --- > arch/x86/include/asm/desc.h | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h > index 8bf1c06..d26f059 100644 > --- a/arch/x86/include/asm/desc.h > +++ b/arch/x86/include/asm/desc.h > @@ -85,6 +85,12 @@ static inline int desc_empty(const void *ptr) > return !(desc[0] | desc[1]); > } > > +static inline bool desc_equal(const struct desc_struct *d1, > + const struct desc_struct *d2) > +{ > + return d1->a == d2->a && d1->b == d2->b; > +} > + > #ifdef CONFIG_PARAVIRT > #include > #else > -- > 1.7.2.5