diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2009-07-02 19:32:07 +0900 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-09 16:06:39 -0500 |
commit | d56dd6cf031075bef985c831146691fdeec8af5c (patch) | |
tree | 53d56051c2a09096e239a34316c798b7a59649f8 /hw | |
parent | 329939776005fad213086e54b038ccd39054e2bc (diff) |
use constant IOPORTS_MASK instead of 0xffff.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/apb_pci.c | 12 | ||||
-rw-r--r-- | hw/isa_mmio.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/hw/apb_pci.c b/hw/apb_pci.c index 5c8ffee4b2..5f411aa02c 100644 --- a/hw/apb_pci.c +++ b/hw/apb_pci.c @@ -148,26 +148,26 @@ static CPUReadMemoryFunc *pci_apb_read[] = { static void pci_apb_iowriteb (void *opaque, target_phys_addr_t addr, uint32_t val) { - cpu_outb(NULL, addr & 0xffff, val); + cpu_outb(NULL, addr & IOPORTS_MASK, val); } static void pci_apb_iowritew (void *opaque, target_phys_addr_t addr, uint32_t val) { - cpu_outw(NULL, addr & 0xffff, val); + cpu_outw(NULL, addr & IOPORTS_MASK, val); } static void pci_apb_iowritel (void *opaque, target_phys_addr_t addr, uint32_t val) { - cpu_outl(NULL, addr & 0xffff, val); + cpu_outl(NULL, addr & IOPORTS_MASK, val); } static uint32_t pci_apb_ioreadb (void *opaque, target_phys_addr_t addr) { uint32_t val; - val = cpu_inb(NULL, addr & 0xffff); + val = cpu_inb(NULL, addr & IOPORTS_MASK); return val; } @@ -175,7 +175,7 @@ static uint32_t pci_apb_ioreadw (void *opaque, target_phys_addr_t addr) { uint32_t val; - val = cpu_inw(NULL, addr & 0xffff); + val = cpu_inw(NULL, addr & IOPORTS_MASK); return val; } @@ -183,7 +183,7 @@ static uint32_t pci_apb_ioreadl (void *opaque, target_phys_addr_t addr) { uint32_t val; - val = cpu_inl(NULL, addr & 0xffff); + val = cpu_inl(NULL, addr & IOPORTS_MASK); return val; } diff --git a/hw/isa_mmio.c b/hw/isa_mmio.c index 1d5e8dc34f..868c7b0cca 100644 --- a/hw/isa_mmio.c +++ b/hw/isa_mmio.c @@ -28,7 +28,7 @@ static void isa_mmio_writeb (void *opaque, target_phys_addr_t addr, uint32_t val) { - cpu_outb(NULL, addr & 0xffff, val); + cpu_outb(NULL, addr & IOPORTS_MASK, val); } static void isa_mmio_writew (void *opaque, target_phys_addr_t addr, @@ -37,7 +37,7 @@ static void isa_mmio_writew (void *opaque, target_phys_addr_t addr, #ifdef TARGET_WORDS_BIGENDIAN val = bswap16(val); #endif - cpu_outw(NULL, addr & 0xffff, val); + cpu_outw(NULL, addr & IOPORTS_MASK, val); } static void isa_mmio_writel (void *opaque, target_phys_addr_t addr, @@ -46,14 +46,14 @@ static void isa_mmio_writel (void *opaque, target_phys_addr_t addr, #ifdef TARGET_WORDS_BIGENDIAN val = bswap32(val); #endif - cpu_outl(NULL, addr & 0xffff, val); + cpu_outl(NULL, addr & IOPORTS_MASK, val); } static uint32_t isa_mmio_readb (void *opaque, target_phys_addr_t addr) { uint32_t val; - val = cpu_inb(NULL, addr & 0xffff); + val = cpu_inb(NULL, addr & IOPORTS_MASK); return val; } @@ -61,7 +61,7 @@ static uint32_t isa_mmio_readw (void *opaque, target_phys_addr_t addr) { uint32_t val; - val = cpu_inw(NULL, addr & 0xffff); + val = cpu_inw(NULL, addr & IOPORTS_MASK); #ifdef TARGET_WORDS_BIGENDIAN val = bswap16(val); #endif @@ -72,7 +72,7 @@ static uint32_t isa_mmio_readl (void *opaque, target_phys_addr_t addr) { uint32_t val; - val = cpu_inl(NULL, addr & 0xffff); + val = cpu_inl(NULL, addr & IOPORTS_MASK); #ifdef TARGET_WORDS_BIGENDIAN val = bswap32(val); #endif |