lkml.org 
[lkml]   [2006]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: 2.6.19-rc5-mm1 fails to compile with gcc 4.2
Date
On Sunday, 12. November 2006 09:22, Avi Kivity wrote:
> Bernhard Rosenkraenzer wrote:
> > drivers/kvm/kvm_main.c: In function 'kvm_dev_ioctl_run':
> > drivers/kvm/kvm_main.c:153: error: 'asm' operand has impossible
> > constraints drivers/kvm/kvm_main.c:158: error: 'asm' operand has
> > impossible constraints

The attached patch makes it compile (but I'm not 100% sure it's the right
thing to do, I'm not very experienced with gcc-style asm).
--- linux-2.6.18/drivers/kvm/kvm_main.c.ark 2006-11-12 14:40:09.000000000 +0100
+++ linux-2.6.18/drivers/kvm/kvm_main.c 2006-11-12 14:38:51.000000000 +0100
@@ -150,12 +150,12 @@

static void load_fs(u16 sel)
{
- asm ("mov %0, %%fs" : : "g"(sel));
+ asm ("mov %0, %%fs" : : "m"(sel));
}

static void load_gs(u16 sel)
{
- asm ("mov %0, %%gs" : : "g"(sel));
+ asm ("mov %0, %%gs" : : "m"(sel));
}

#ifndef load_ldt
\
 
 \ /
  Last update: 2006-11-12 14:47    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site