mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-29 15:43:59 +08:00
irqchip/gic-v4.1: Don't use the VPE proxy if RVPEID is set
The infamous VPE proxy device isn't used with GICv4.1 because: - we can invalidate any LPI from the DirectLPI MMIO interface - the ITS and redistributors understand the life cycle of the doorbell, so we don't need to enable/disable it all the time So let's escape early from the proxy related functions. Signed-off-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Zenghui Yu <yuzenghui@huawei.com> Link: https://lore.kernel.org/r/20191224111055.11836-8-maz@kernel.org
This commit is contained in:
parent
64edfaa9a2
commit
0684c70465
@ -3212,7 +3212,7 @@ static const struct irq_domain_ops its_domain_ops = {
|
||||
/*
|
||||
* This is insane.
|
||||
*
|
||||
* If a GICv4 doesn't implement Direct LPIs (which is extremely
|
||||
* If a GICv4.0 doesn't implement Direct LPIs (which is extremely
|
||||
* likely), the only way to perform an invalidate is to use a fake
|
||||
* device to issue an INV command, implying that the LPI has first
|
||||
* been mapped to some event on that device. Since this is not exactly
|
||||
@ -3220,9 +3220,20 @@ static const struct irq_domain_ops its_domain_ops = {
|
||||
* only issue an UNMAP if we're short on available slots.
|
||||
*
|
||||
* Broken by design(tm).
|
||||
*
|
||||
* GICv4.1, on the other hand, mandates that we're able to invalidate
|
||||
* by writing to a MMIO register. It doesn't implement the whole of
|
||||
* DirectLPI, but that's good enough. And most of the time, we don't
|
||||
* even have to invalidate anything, as the redistributor can be told
|
||||
* whether to generate a doorbell or not (we thus leave it enabled,
|
||||
* always).
|
||||
*/
|
||||
static void its_vpe_db_proxy_unmap_locked(struct its_vpe *vpe)
|
||||
{
|
||||
/* GICv4.1 doesn't use a proxy, so nothing to do here */
|
||||
if (gic_rdists->has_rvpeid)
|
||||
return;
|
||||
|
||||
/* Already unmapped? */
|
||||
if (vpe->vpe_proxy_event == -1)
|
||||
return;
|
||||
@ -3245,6 +3256,10 @@ static void its_vpe_db_proxy_unmap_locked(struct its_vpe *vpe)
|
||||
|
||||
static void its_vpe_db_proxy_unmap(struct its_vpe *vpe)
|
||||
{
|
||||
/* GICv4.1 doesn't use a proxy, so nothing to do here */
|
||||
if (gic_rdists->has_rvpeid)
|
||||
return;
|
||||
|
||||
if (!gic_rdists->has_direct_lpi) {
|
||||
unsigned long flags;
|
||||
|
||||
@ -3256,6 +3271,10 @@ static void its_vpe_db_proxy_unmap(struct its_vpe *vpe)
|
||||
|
||||
static void its_vpe_db_proxy_map_locked(struct its_vpe *vpe)
|
||||
{
|
||||
/* GICv4.1 doesn't use a proxy, so nothing to do here */
|
||||
if (gic_rdists->has_rvpeid)
|
||||
return;
|
||||
|
||||
/* Already mapped? */
|
||||
if (vpe->vpe_proxy_event != -1)
|
||||
return;
|
||||
@ -3278,6 +3297,10 @@ static void its_vpe_db_proxy_move(struct its_vpe *vpe, int from, int to)
|
||||
unsigned long flags;
|
||||
struct its_collection *target_col;
|
||||
|
||||
/* GICv4.1 doesn't use a proxy, so nothing to do here */
|
||||
if (gic_rdists->has_rvpeid)
|
||||
return;
|
||||
|
||||
if (gic_rdists->has_direct_lpi) {
|
||||
void __iomem *rdbase;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user