From b3749779d1c9ba4b5b1b81de3ddfa0da1b830138 Mon Sep 17 00:00:00 2001 From: Dan Streetman Date: Tue, 17 Feb 2015 15:38:52 -0500 Subject: update users of GET/SETFIELD() The last two patches updated GETFIELD() and SETFIELD() to no longer require the user to specify the mask and shift of a field, and to remove all _LSH defines and rename any _MASK defines. There are some places where the masks were used directly, where the caller needs to have the _MASK suffix removed. There are also two users of SETFIELD() where the field name still has the _MASK suffix because there is an existing macro with the base name. Change users of SETFIELD() to include the _MASK suffix where needed. Change direct users of any mask to remove the _MASK suffix. Signed-off-by: Dan Streetman Signed-off-by: Stewart Smith --- hw/p7ioc-phb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/p7ioc-phb.c') diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c index 99528f5..3f24767 100644 --- a/hw/p7ioc-phb.c +++ b/hw/p7ioc-phb.c @@ -1391,7 +1391,7 @@ static int64_t p7ioc_err_inject_mem32(struct p7ioc_phb *p, uint32_t pe_no, /* Specified address is out of range */ if (!a) { a = prefer; - m = PHB_PAPR_ERR_INJ_MASK_MMIO_MASK; + m = PHB_PAPR_ERR_INJ_MASK_MMIO; } else { m = mask; } @@ -1436,7 +1436,7 @@ static int64_t p7ioc_err_inject_io32(struct p7ioc_phb *p, uint32_t pe_no, /* Specified address is out of range */ if (!a) { a = prefer; - m = PHB_PAPR_ERR_INJ_MASK_IO_MASK; + m = PHB_PAPR_ERR_INJ_MASK_IO; } else { m = mask; } @@ -1467,7 +1467,7 @@ static int64_t p7ioc_err_inject_cfg(struct p7ioc_phb *p, uint32_t pe_no, base = GETFIELD(IODA_PELTM_BUS, p->peltm_cache[pe_no]); base &= (0xff - (((1 << (7 - v_bits)) - 1))); a = SETFIELD(PHB_PAPR_ERR_INJ_MASK_CFG, 0x0ul, base); - m = PHB_PAPR_ERR_INJ_MASK_CFG_MASK; + m = PHB_PAPR_ERR_INJ_MASK_CFG; bus_no = GETFIELD(PHB_PAPR_ERR_INJ_MASK_CFG, addr); bus_no &= (0xff - (((1 << (7 - v_bits)) - 1))); @@ -1498,7 +1498,7 @@ static int64_t p7ioc_err_inject_dma(struct p7ioc_phb *p, uint32_t pe_no, continue; addr = SETFIELD(PHB_PAPR_ERR_INJ_MASK_DMA, 0ul, index); - mask = PHB_PAPR_ERR_INJ_MASK_DMA_MASK; + mask = PHB_PAPR_ERR_INJ_MASK_DMA; break; } -- cgit v1.1