ia64/xen-unstable

changeset 16710:533a8e6cebd0

x86: Fix PV PIT handler after previous changeset.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Jan 12 11:26:04 2008 +0000 (2008-01-12)
parents 9862217f3c34
children 9facc624a238
files xen/arch/x86/hvm/i8254.c
line diff
     1.1 --- a/xen/arch/x86/hvm/i8254.c	Sat Jan 12 11:13:57 2008 +0000
     1.2 +++ b/xen/arch/x86/hvm/i8254.c	Sat Jan 12 11:26:04 2008 +0000
     1.3 @@ -601,14 +601,20 @@ int pv_pit_handler(int port, int data, i
     1.4          .dir  = write ? IOREQ_WRITE : IOREQ_READ,
     1.5          .data = data
     1.6      };
     1.7 -    uint32_t val = data;
     1.8  
     1.9      if ( (current->domain->domain_id == 0) && dom0_pit_access(&ioreq) )
    1.10 +    {
    1.11          /* nothing to do */;
    1.12 -    else if ( port == 0x61 )
    1.13 -        handle_speaker_io(ioreq.dir, port, 1, &val);
    1.14 +    }
    1.15      else
    1.16 -        handle_pit_io(ioreq.dir, port, 1, &val);
    1.17 +    {
    1.18 +        uint32_t val = data;
    1.19 +        if ( port == 0x61 )
    1.20 +            handle_speaker_io(ioreq.dir, port, 1, &val);
    1.21 +        else
    1.22 +            handle_pit_io(ioreq.dir, port, 1, &val);
    1.23 +        ioreq.data = val;
    1.24 +    }
    1.25  
    1.26      return !write ? ioreq.data : 0;
    1.27  }