Fixes build error with btrw instruction. xen-unstable/xen/include/asm/grant_table.h:57: Error: Incorrect register `%edx'' used with `w'' suffix Signed-off-by: Lin Ming <mlin@ss.pku.edu.cn> --- xen/include/asm-x86/grant_table.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xen/include/asm-x86/grant_table.h b/xen/include/asm-x86/grant_table.h index db8bfb4..9b5321b 100644 --- a/xen/include/asm-x86/grant_table.h +++ b/xen/include/asm-x86/grant_table.h @@ -54,7 +54,7 @@ static inline void gnttab_clear_flag(unsigned int nr, uint16_t *st) * Note that this cannot be clear_bit(), as the access must be * confined to the specified 2 bytes. */ - asm volatile ("lock btrw %1,%0" : "=m" (*st) : "Ir" (nr), "m" (*st)); + asm volatile ("lock btr %1,%0" : "=m" (*st) : "Ir" (nr), "m" (*st)); } /* Foreign mappings of HHVM-guest pages do not modify the type count. */ -- 1.7.2.5
>>> On 22.03.12 at 16:21, Lin Ming <mlin@ss.pku.edu.cn> wrote: > Fixes build error with btrw instruction. > > xen-unstable/xen/include/asm/grant_table.h:57: > Error: Incorrect register `%edx'' used with `w'' suffixWith what gcc?> Signed-off-by: Lin Ming <mlin@ss.pku.edu.cn> > --- > xen/include/asm-x86/grant_table.h | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/xen/include/asm-x86/grant_table.h > b/xen/include/asm-x86/grant_table.h > index db8bfb4..9b5321b 100644 > --- a/xen/include/asm-x86/grant_table.h > +++ b/xen/include/asm-x86/grant_table.h > @@ -54,7 +54,7 @@ static inline void gnttab_clear_flag(unsigned int nr, > uint16_t *st) > * Note that this cannot be clear_bit(), as the access must be > * confined to the specified 2 bytes. > */ > - asm volatile ("lock btrw %1,%0" : "=m" (*st) : "Ir" (nr), "m" (*st)); > + asm volatile ("lock btr %1,%0" : "=m" (*st) : "Ir" (nr), "m" (*st));That''s definitely not the right way to fix this - did you read the description of the change that introduced this? Nevertheless I admit that change wasn''t entirely correct, as it doesn''t really allow the compiler to pick a register (apparently it has been picking an immediate number for everyone else up to now). I shall send a proper fix soon. Jan> } > > /* Foreign mappings of HHVM-guest pages do not modify the type count. */
On Thu, Mar 22, 2012 at 11:41 PM, Jan Beulich <JBeulich@suse.com> wrote:>>>> On 22.03.12 at 16:21, Lin Ming <mlin@ss.pku.edu.cn> wrote: >> Fixes build error with btrw instruction. >> >> xen-unstable/xen/include/asm/grant_table.h:57: >> Error: Incorrect register `%edx'' used with `w'' suffix > > With what gcc?# gcc --version gcc (Debian 4.4.5-8) 4.4.5> >> Signed-off-by: Lin Ming <mlin@ss.pku.edu.cn> >> --- >> xen/include/asm-x86/grant_table.h | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/xen/include/asm-x86/grant_table.h >> b/xen/include/asm-x86/grant_table.h >> index db8bfb4..9b5321b 100644 >> --- a/xen/include/asm-x86/grant_table.h >> +++ b/xen/include/asm-x86/grant_table.h >> @@ -54,7 +54,7 @@ static inline void gnttab_clear_flag(unsigned int nr, >> uint16_t *st) >> * Note that this cannot be clear_bit(), as the access must be >> * confined to the specified 2 bytes. >> */ >> - asm volatile ("lock btrw %1,%0" : "=m" (*st) : "Ir" (nr), "m" (*st)); >> + asm volatile ("lock btr %1,%0" : "=m" (*st) : "Ir" (nr), "m" (*st)); > > That''s definitely not the right way to fix this - did you read the > description of the change that introduced this? Nevertheless I > admit that change wasn''t entirely correct, as it doesn''t really allow > the compiler to pick a register (apparently it has been picking an > immediate number for everyone else up to now). I shall send a > proper fix soon.I''d like to test it. Lin Ming
Possibly Parallel Threads
- [PATCH] libxl: fix rtc_timeoffset setting
- xenwatch: page allocation failure: order:4, mode:0x10c0d0 xen_netback:xenvif_alloc: Could not allocate netdev for vif16.0
- [LLVMdev] [BUG] Support unqualified btr, bts
- Bug#818525: xen: FTBFS: error: unterminated comment
- [PATCH 3/3] gnttab: cleanup