[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [kvm-unit-tests RFC 08/15] arm/arm64: ITS: enable LPIs at r
From: |
Eric Auger |
Subject: |
[Qemu-devel] [kvm-unit-tests RFC 08/15] arm/arm64: ITS: enable LPIs at re-distributor level |
Date: |
Mon, 5 Dec 2016 22:46:39 +0100 |
This helper function enables the signaling of LPIs by the
redistributor to the connected PE.
Signed-off-by: Eric Auger <address@hidden>
---
lib/arm/asm/gic-v3-its.h | 1 +
lib/arm/gic-v3-its.c | 15 +++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/lib/arm/asm/gic-v3-its.h b/lib/arm/asm/gic-v3-its.h
index 21054cb..3e36a2a 100644
--- a/lib/arm/asm/gic-v3-its.h
+++ b/lib/arm/asm/gic-v3-its.h
@@ -145,6 +145,7 @@ extern struct its_data its_data;
extern int its_parse_baser(int i, struct its_baser *baser);
extern void its_setup_baser(int i, struct its_baser *baser);
+extern void enable_lpi(u32 redist);
#endif /* !__ASSEMBLY__ */
diff --git a/lib/arm/gic-v3-its.c b/lib/arm/gic-v3-its.c
index f577d5f..7c768a5 100644
--- a/lib/arm/gic-v3-its.c
+++ b/lib/arm/gic-v3-its.c
@@ -171,3 +171,18 @@ void init_cmd_queue(void)
writeq(0, its_data.base + GITS_CWRITER);
writeq(0, its_data.base + GITS_CREADR);
}
+
+void enable_lpi(u32 redist)
+{
+ void *ptr;
+ u64 val;
+
+ if (redist >= gicv3_data.cpu_count)
+ report_abort("%s redist=%d >= cpu_count=%d\n",
+ __func__, redist, gicv3_data.cpu_count);
+
+ ptr = gicv3_data.redist_base[redist];
+ val = readl(ptr + GICR_CTLR);
+ val |= GICR_CTLR_ENABLE_LPIS;
+ writel(val, ptr + GICR_CTLR);
+}
--
2.5.5
- Re: [Qemu-devel] [kvm-unit-tests RFC 03/15] arm/arm64: ITS skeleton, (continued)
- [Qemu-devel] [kvm-unit-tests RFC 06/15] arm/arm64: ITS: Set the LPI config and pending tables, Eric Auger, 2016/12/05
- [Qemu-devel] [kvm-unit-tests RFC 07/15] arm/arm64: ITS: Init the command queue, Eric Auger, 2016/12/05
- [Qemu-devel] [kvm-unit-tests RFC 10/15] arm/arm64: ITS: its_enable_defaults, Eric Auger, 2016/12/05
- [Qemu-devel] [kvm-unit-tests RFC 09/15] arm/arm64: ITS: Parse the typer register, Eric Auger, 2016/12/05
- [Qemu-devel] [kvm-unit-tests RFC 08/15] arm/arm64: ITS: enable LPIs at re-distributor level,
Eric Auger <=
- [Qemu-devel] [kvm-unit-tests RFC 11/15] arm/arm64: ITS: create device, Eric Auger, 2016/12/05
- [Qemu-devel] [kvm-unit-tests RFC 12/15] arm/arm64: ITS: create collection, Eric Auger, 2016/12/05
- [Qemu-devel] [kvm-unit-tests RFC 13/15] arm/arm64: ITS: commands, Eric Auger, 2016/12/05
- [Qemu-devel] [kvm-unit-tests RFC 14/15] arm/arm64: gic: Generalize ipi_enable(), Eric Auger, 2016/12/05
- [Qemu-devel] [kvm-unit-tests RFC 15/15] arm/arm64: ITS test, Eric Auger, 2016/12/05
- Re: [Qemu-devel] [kvm-unit-tests RFC 00/15] arm/arm64: add ITS framework, Andrew Jones, 2016/12/06