Skip to content

Commit 5186a6c

Browse files
Zenghui YuMarc Zyngier
authored andcommitted
irqchip/gic-v3-its: Rename VPENDBASER/VPROPBASER accessors
V{PEND,PROP}BASER registers are actually located in VLPI_base frame of the *redistributor*. Rename their accessors to reflect this fact. No functional changes. Signed-off-by: Zenghui Yu <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent b463532 commit 5186a6c

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

arch/arm/include/asm/arch_gicv3.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,16 +326,16 @@ static inline u64 __gic_readq_nonatomic(const volatile void __iomem *addr)
326326
#define gits_write_cwriter(v, c) __gic_writeq_nonatomic(v, c)
327327

328328
/*
329-
* GITS_VPROPBASER - hi and lo bits may be accessed independently.
329+
* GICR_VPROPBASER - hi and lo bits may be accessed independently.
330330
*/
331-
#define gits_read_vpropbaser(c) __gic_readq_nonatomic(c)
332-
#define gits_write_vpropbaser(v, c) __gic_writeq_nonatomic(v, c)
331+
#define gicr_read_vpropbaser(c) __gic_readq_nonatomic(c)
332+
#define gicr_write_vpropbaser(v, c) __gic_writeq_nonatomic(v, c)
333333

334334
/*
335-
* GITS_VPENDBASER - the Valid bit must be cleared before changing
335+
* GICR_VPENDBASER - the Valid bit must be cleared before changing
336336
* anything else.
337337
*/
338-
static inline void gits_write_vpendbaser(u64 val, void __iomem *addr)
338+
static inline void gicr_write_vpendbaser(u64 val, void __iomem *addr)
339339
{
340340
u32 tmp;
341341

@@ -352,7 +352,7 @@ static inline void gits_write_vpendbaser(u64 val, void __iomem *addr)
352352
__gic_writeq_nonatomic(val, addr);
353353
}
354354

355-
#define gits_read_vpendbaser(c) __gic_readq_nonatomic(c)
355+
#define gicr_read_vpendbaser(c) __gic_readq_nonatomic(c)
356356

357357
static inline bool gic_prio_masking_enabled(void)
358358
{

arch/arm64/include/asm/arch_gicv3.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ static inline u32 gic_read_rpr(void)
140140
#define gicr_write_pendbaser(v, c) writeq_relaxed(v, c)
141141
#define gicr_read_pendbaser(c) readq_relaxed(c)
142142

143-
#define gits_write_vpropbaser(v, c) writeq_relaxed(v, c)
144-
#define gits_read_vpropbaser(c) readq_relaxed(c)
143+
#define gicr_write_vpropbaser(v, c) writeq_relaxed(v, c)
144+
#define gicr_read_vpropbaser(c) readq_relaxed(c)
145145

146-
#define gits_write_vpendbaser(v, c) writeq_relaxed(v, c)
147-
#define gits_read_vpendbaser(c) readq_relaxed(c)
146+
#define gicr_write_vpendbaser(v, c) writeq_relaxed(v, c)
147+
#define gicr_read_vpendbaser(c) readq_relaxed(c)
148148

149149
static inline bool gic_prio_masking_enabled(void)
150150
{

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,7 +2429,7 @@ static u64 inherit_vpe_l1_table_from_rd(cpumask_t **mask)
24292429
* ours wrt CommonLPIAff. Let's use its own VPROPBASER.
24302430
* Make sure we don't write the Z bit in that case.
24312431
*/
2432-
val = gits_read_vpropbaser(base + SZ_128K + GICR_VPROPBASER);
2432+
val = gicr_read_vpropbaser(base + SZ_128K + GICR_VPROPBASER);
24332433
val &= ~GICR_VPROPBASER_4_1_Z;
24342434

24352435
gic_data_rdist()->vpe_l1_base = gic_data_rdist_cpu(cpu)->vpe_l1_base;
@@ -2452,7 +2452,7 @@ static bool allocate_vpe_l2_table(int cpu, u32 id)
24522452
if (!gic_rdists->has_rvpeid)
24532453
return true;
24542454

2455-
val = gits_read_vpropbaser(base + SZ_128K + GICR_VPROPBASER);
2455+
val = gicr_read_vpropbaser(base + SZ_128K + GICR_VPROPBASER);
24562456

24572457
esz = FIELD_GET(GICR_VPROPBASER_4_1_ENTRY_SIZE, val) + 1;
24582458
gpsz = FIELD_GET(GICR_VPROPBASER_4_1_PAGE_SIZE, val);
@@ -2524,8 +2524,8 @@ static int allocate_vpe_l1_table(void)
25242524
* effect of making sure no doorbell will be generated and we can
25252525
* then safely clear VPROPBASER.Valid.
25262526
*/
2527-
if (gits_read_vpendbaser(vlpi_base + GICR_VPENDBASER) & GICR_VPENDBASER_Valid)
2528-
gits_write_vpendbaser(GICR_VPENDBASER_PendingLast,
2527+
if (gicr_read_vpendbaser(vlpi_base + GICR_VPENDBASER) & GICR_VPENDBASER_Valid)
2528+
gicr_write_vpendbaser(GICR_VPENDBASER_PendingLast,
25292529
vlpi_base + GICR_VPENDBASER);
25302530

25312531
/*
@@ -2548,8 +2548,8 @@ static int allocate_vpe_l1_table(void)
25482548

25492549
/* First probe the page size */
25502550
val = FIELD_PREP(GICR_VPROPBASER_4_1_PAGE_SIZE, GIC_PAGE_SIZE_64K);
2551-
gits_write_vpropbaser(val, vlpi_base + GICR_VPROPBASER);
2552-
val = gits_read_vpropbaser(vlpi_base + GICR_VPROPBASER);
2551+
gicr_write_vpropbaser(val, vlpi_base + GICR_VPROPBASER);
2552+
val = gicr_read_vpropbaser(vlpi_base + GICR_VPROPBASER);
25532553
gpsz = FIELD_GET(GICR_VPROPBASER_4_1_PAGE_SIZE, val);
25542554
esz = FIELD_GET(GICR_VPROPBASER_4_1_ENTRY_SIZE, val);
25552555

@@ -2620,7 +2620,7 @@ static int allocate_vpe_l1_table(void)
26202620
val |= GICR_VPROPBASER_4_1_VALID;
26212621

26222622
out:
2623-
gits_write_vpropbaser(val, vlpi_base + GICR_VPROPBASER);
2623+
gicr_write_vpropbaser(val, vlpi_base + GICR_VPROPBASER);
26242624
cpumask_set_cpu(smp_processor_id(), gic_data_rdist()->vpe_table_mask);
26252625

26262626
pr_debug("CPU%d: VPROPBASER = %llx %*pbl\n",
@@ -2727,14 +2727,14 @@ static u64 its_clear_vpend_valid(void __iomem *vlpi_base, u64 clr, u64 set)
27272727
bool clean;
27282728
u64 val;
27292729

2730-
val = gits_read_vpendbaser(vlpi_base + GICR_VPENDBASER);
2730+
val = gicr_read_vpendbaser(vlpi_base + GICR_VPENDBASER);
27312731
val &= ~GICR_VPENDBASER_Valid;
27322732
val &= ~clr;
27332733
val |= set;
2734-
gits_write_vpendbaser(val, vlpi_base + GICR_VPENDBASER);
2734+
gicr_write_vpendbaser(val, vlpi_base + GICR_VPENDBASER);
27352735

27362736
do {
2737-
val = gits_read_vpendbaser(vlpi_base + GICR_VPENDBASER);
2737+
val = gicr_read_vpendbaser(vlpi_base + GICR_VPENDBASER);
27382738
clean = !(val & GICR_VPENDBASER_Dirty);
27392739
if (!clean) {
27402740
count--;
@@ -2849,7 +2849,7 @@ static void its_cpu_init_lpis(void)
28492849
val = (LPI_NRBITS - 1) & GICR_VPROPBASER_IDBITS_MASK;
28502850
pr_debug("GICv4: CPU%d: Init IDbits to 0x%llx for GICR_VPROPBASER\n",
28512851
smp_processor_id(), val);
2852-
gits_write_vpropbaser(val, vlpi_base + GICR_VPROPBASER);
2852+
gicr_write_vpropbaser(val, vlpi_base + GICR_VPROPBASER);
28532853

28542854
/*
28552855
* Also clear Valid bit of GICR_VPENDBASER, in case some
@@ -3523,7 +3523,7 @@ static void its_vpe_schedule(struct its_vpe *vpe)
35233523
val |= (LPI_NRBITS - 1) & GICR_VPROPBASER_IDBITS_MASK;
35243524
val |= GICR_VPROPBASER_RaWb;
35253525
val |= GICR_VPROPBASER_InnerShareable;
3526-
gits_write_vpropbaser(val, vlpi_base + GICR_VPROPBASER);
3526+
gicr_write_vpropbaser(val, vlpi_base + GICR_VPROPBASER);
35273527

35283528
val = virt_to_phys(page_address(vpe->vpt_page)) &
35293529
GENMASK_ULL(51, 16);
@@ -3541,7 +3541,7 @@ static void its_vpe_schedule(struct its_vpe *vpe)
35413541
val |= GICR_VPENDBASER_PendingLast;
35423542
val |= vpe->idai ? GICR_VPENDBASER_IDAI : 0;
35433543
val |= GICR_VPENDBASER_Valid;
3544-
gits_write_vpendbaser(val, vlpi_base + GICR_VPENDBASER);
3544+
gicr_write_vpendbaser(val, vlpi_base + GICR_VPENDBASER);
35453545
}
35463546

35473547
static void its_vpe_deschedule(struct its_vpe *vpe)
@@ -3741,7 +3741,7 @@ static void its_vpe_4_1_schedule(struct its_vpe *vpe,
37413741
val |= info->g1en ? GICR_VPENDBASER_4_1_VGRP1EN : 0;
37423742
val |= FIELD_PREP(GICR_VPENDBASER_4_1_VPEID, vpe->vpe_id);
37433743

3744-
gits_write_vpendbaser(val, vlpi_base + GICR_VPENDBASER);
3744+
gicr_write_vpendbaser(val, vlpi_base + GICR_VPENDBASER);
37453745
}
37463746

37473747
static void its_vpe_4_1_deschedule(struct its_vpe *vpe,

0 commit comments

Comments
 (0)