@@ -274,11 +274,11 @@ static void __init hip04gic_dist_init(void)
writel_gicd(0, GICD_CTLR);
type = readl_gicd(GICD_TYPER);
- nr_lines = 32 * ((type & GICD_TYPE_LINES) + 1);
+ nr_lines = 32 * ((type & GICD_TYPER_LINES) + 1);
gic_cpus = 16;
printk("GIC-HIP04: %d lines, %d cpu%s%s (IID %8.8x).\n",
nr_lines, gic_cpus, (gic_cpus == 1) ? "" : "s",
- (type & GICD_TYPE_SEC) ? ", secure" : "",
+ (type & GICD_TYPER_SEC) ? ", secure" : "",
readl_gicd(GICD_IIDR));
/* Default all global IRQs to level, active low */
@@ -260,11 +260,11 @@ static void __init gicv2_dist_init(void)
writel_gicd(0, GICD_CTLR);
type = readl_gicd(GICD_TYPER);
- nr_lines = 32 * ((type & GICD_TYPE_LINES) + 1);
- gic_cpus = 1 + ((type & GICD_TYPE_CPUS) >> 5);
+ nr_lines = 32 * ((type & GICD_TYPER_LINES) + 1);
+ gic_cpus = 1 + ((type & GICD_TYPER_CPUS) >> 5);
printk("GICv2: %d lines, %d cpu%s%s (IID %8.8x).\n",
nr_lines, gic_cpus, (gic_cpus == 1) ? "" : "s",
- (type & GICD_TYPE_SEC) ? ", secure" : "",
+ (type & GICD_TYPER_SEC) ? ", secure" : "",
readl_gicd(GICD_IIDR));
/* Default all global IRQs to level, active low */
@@ -574,7 +574,7 @@ static void __init gicv3_dist_init(void)
writel_relaxed(0, GICD + GICD_CTLR);
type = readl_relaxed(GICD + GICD_TYPER);
- nr_lines = 32 * ((type & GICD_TYPE_LINES) + 1);
+ nr_lines = 32 * ((type & GICD_TYPER_LINES) + 1);
printk("GICv3: %d lines, (IID %8.8x).\n",
nr_lines, readl_relaxed(GICD + GICD_IIDR));
@@ -192,7 +192,7 @@ static int vgic_v2_distr_mmio_read(struct vcpu *v, mmio_info_t *info,
if ( dabt.size != DABT_WORD ) goto bad_width;
/* No secure world support for guests. */
vgic_lock(v);
- typer = ((v->domain->max_vcpus - 1) << GICD_TYPE_CPUS_SHIFT)
+ typer = ( ((v->domain->max_vcpus - 1) << GICD_TYPER_CPUS_SHIFT) )
| DIV_ROUND_UP(v->domain->arch.vgic.nr_spis, 32);
vgic_unlock(v);
@@ -919,10 +919,10 @@ static int vgic_v3_distr_mmio_read(struct vcpu *v, mmio_info_t *info,
if ( dabt.size != DABT_WORD ) goto bad_width;
/* No secure world support for guests. */
- typer = ((ncpus - 1) << GICD_TYPE_CPUS_SHIFT |
+ typer = ((ncpus - 1) << GICD_TYPER_CPUS_SHIFT |
DIV_ROUND_UP(v->domain->arch.vgic.nr_spis, 32));
- typer |= (irq_bits - 1) << GICD_TYPE_ID_BITS_SHIFT;
+ typer |= (irq_bits - 1) << GICD_TYPER_ID_BITS_SHIFT;
*r = vgic_reg32_extract(typer, info);
@@ -98,10 +98,10 @@
/* Register bits */
#define GICD_CTL_ENABLE 0x1
-#define GICD_TYPE_LINES 0x01f
-#define GICD_TYPE_CPUS_SHIFT 5
-#define GICD_TYPE_CPUS 0x0e0
-#define GICD_TYPE_SEC 0x400
+#define GICD_TYPER_LINES 0x01f
+#define GICD_TYPER_CPUS_SHIFT 5
+#define GICD_TYPER_CPUS 0x0e0
+#define GICD_TYPER_SEC 0x400
#define GICC_CTL_ENABLE 0x1
#define GICC_CTL_EOI (0x1 << 9)
@@ -44,7 +44,7 @@
#define GICC_SRE_EL2_ENEL1 (1UL << 3)
/* Additional bits in GICD_TYPER defined by GICv3 */
-#define GICD_TYPE_ID_BITS_SHIFT 19
+#define GICD_TYPER_ID_BITS_SHIFT (19)
#define GICD_TYPER_LPIS_SUPPORTED (1U << 17)
#define GICD_CTLR_RWP (1UL << 31)