Skip to content

Commit

Permalink
arm: Rename reg parameter of handle_irq_target to irq
Browse files Browse the repository at this point in the history
Reflects better what this is about.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information
jan-kiszka committed Jun 26, 2016
1 parent 85783c0 commit d14d170
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hypervisor/arch/arm/gic-common.c
Expand Up @@ -104,15 +104,15 @@ restrict_bitmask_access(struct mmio_access *mmio, unsigned int reg_index,
* GICv2 uses 8bit values for each IRQ in the ITARGETRs registers
*/
static enum mmio_result handle_irq_target(struct mmio_access *mmio,
unsigned int reg)
unsigned int irq)
{
/*
* ITARGETSR contain one byte per IRQ, so the first one affected by this
* access corresponds to the reg index
*/
struct cell *cell = this_cell();
unsigned int i, cpu;
unsigned int spi = reg - 32;
unsigned int spi = irq - 32;
unsigned int offset;
u32 access_mask = 0;
u8 targets;
Expand All @@ -121,7 +121,7 @@ static enum mmio_result handle_irq_target(struct mmio_access *mmio,
* Let the guest freely access its SGIs and PPIs, which may be used to
* fill its CPU interface map.
*/
if (!is_spi(reg)) {
if (!is_spi(irq)) {
mmio_perform_access(gicd_base, mmio);
return MMIO_HANDLED;
}
Expand Down Expand Up @@ -162,7 +162,7 @@ static enum mmio_result handle_irq_target(struct mmio_access *mmio,
if (mmio->is_write) {
spin_lock(&dist_lock);
u32 itargetsr =
mmio_read32(gicd_base + GICD_ITARGETSR + reg + offset);
mmio_read32(gicd_base + GICD_ITARGETSR + irq + offset);
mmio->value &= access_mask;
/* Combine with external SPIs */
mmio->value |= (itargetsr & ~access_mask);
Expand Down

0 comments on commit d14d170

Please sign in to comment.