ia64/xen-unstable

changeset 14440:90d6fe6de04d

hvm vpic: Fix IRQ priority calculation in 8259 device model.
The priority shift should be a right-rotation, not a left-rotation.

From: Trolle Selander <trolle.selander@gmail.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Mar 16 16:19:35 2007 +0000 (2007-03-16)
parents 3a186e94f613
children f8ef8f466225
files xen/arch/x86/hvm/vpic.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vpic.c	Fri Mar 16 15:19:08 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/vpic.c	Fri Mar 16 16:19:35 2007 +0000
     1.3 @@ -54,8 +54,8 @@ static int vpic_get_priority(struct hvm_
     1.4      if ( mask == 0 )
     1.5          return VPIC_PRIO_NONE;
     1.6  
     1.7 -    /* prio = ffs(mask ROL vpic->priority_add); */
     1.8 -    asm ( "rol %%cl,%b1 ; bsf %1,%0"
     1.9 +    /* prio = ffs(mask ROR vpic->priority_add); */
    1.10 +    asm ( "ror %%cl,%b1 ; bsf %1,%0"
    1.11            : "=r" (prio) : "r" ((uint32_t)mask), "c" (vpic->priority_add) );
    1.12      return prio;
    1.13  }