Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6839829pxv; Fri, 30 Jul 2021 03:49:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHofrFrFI7hsICSqS9q6zDNJKRPwlUyB++rqVNmJdaTq8twoGeZfz+qvztNJUqCZMZruvE X-Received: by 2002:a17:906:d105:: with SMTP id b5mr1976949ejz.340.1627642164138; Fri, 30 Jul 2021 03:49:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627642164; cv=none; d=google.com; s=arc-20160816; b=uGlzyOEsOEGsqD01r+fvSXP3KMG5uoKe5W3zKsGc8/tTxSLTEjdAmW2iUpcoKac9yZ dREdXj+sDTk32CHJs7jRbqlWKwzC8SND5mNyTy3QtzxnW4czYT8xoLME4A/+vSUqAo7q THITqRiICm6U0OQa3AKviXU5tM8dTvL9iPaTHJYwWVCQRisMWes21iwxPA5wisl18suF XiuuVWUjRsNViDVhxvA2TWueYozTYfHJLZkJGbkdNpp3wKh44yay/MjDKnt9wiolmZmC J5rs07+Hk/hrX4gKmTd3/lfKUvnMaxwZF65enKfWsAO5b81Nnyt1xH1CcHr/mbZM+Pus 2Gcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=En0tceELd8LDDRuVQ3jZmeibLFnwmW5aOuVKyN5CsJM=; b=iiAZX9ehuXDLu1BCuL4qPVEkH41m71m3WYp7DXzu374yAx7vLMVm/iX/cn9NG8kUhc ttHI628XMjhQAYH+9Cyb1elXclofxn6PQvaf0WbzI0V0aFnTrcsOAuJpLEsPUp4OXuUJ n1JhUHXI5XkpDEMJ4pklruIgQt5jKGnDD9Zw5mZ36jMEohyYq0SqRvYI22ri8uAYaWhi nTiH+VZLqmBURCX7Jx6pO66r3lR9tuvdGVBfrV/r25p0jdo1GsXRKKyvkJ+YL+rQc6qd +iN3XeVet/x64bgYAIKyLPXXIzg6LkyYtmbbCZpmI7EQ6NTrl2XcwMxxvb4RFUS37ny6 Q2RA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m25si1218535ejb.570.2021.07.30.03.48.59; Fri, 30 Jul 2021 03:49:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238521AbhG3Kri (ORCPT + 99 others); Fri, 30 Jul 2021 06:47:38 -0400 Received: from foss.arm.com ([217.140.110.172]:40302 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238487AbhG3Kri (ORCPT ); Fri, 30 Jul 2021 06:47:38 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6D1F31FB; Fri, 30 Jul 2021 03:47:33 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B93933F73D; Fri, 30 Jul 2021 03:47:32 -0700 (PDT) From: Valentin Schneider To: James Morse , linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Marc Zyngier Subject: Re: [PATCH 2/2] irqchip/gic-v3: Fix selection of partition domain for EPPIs In-Reply-To: <20210729172748.28841-3-james.morse@arm.com> References: <20210729172748.28841-1-james.morse@arm.com> <20210729172748.28841-3-james.morse@arm.com> Date: Fri, 30 Jul 2021 11:47:30 +0100 Message-ID: <87eebgkri5.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/07/21 17:27, James Morse wrote: > commit 5f51f803826e ("irqchip/gic-v3: Add EPPI range support") added > GIC_IRQ_TYPE_PARTITION support for EPPI to gic_irq_domain_translate(), > and commit 52085d3f2028 ("irqchip/gic-v3: Dynamically allocate PPI > partition descriptors") made the gic_data.ppi_descs array big enough for > EPPI, but neither gic_irq_domain_select() nor partition_domain_translate() > were updated. > > This means partitions are created by partition_create_desc() for the > EPPI range, but can't be registered as they will always match the root > domain and map to the summary interrupt. > > Update gic_irq_domain_select() to match PPI and EPPI. The fwspec for > PPI and EPPI both start from 0. Use gic_irq_domain_translate() to find > the hwirq from the fwspec, then convert this to a ppi index. > > Reported-by: Valentin Schneider > Signed-off-by: James Morse Tiny nit below, regardless: Reviewed-by: Valentin Schneider > @@ -1518,7 +1547,12 @@ static int partition_domain_translate(struct irq_domain *d, > if (WARN_ON(!np)) > return -EINVAL; > > - ret = partition_translate_id(gic_data.ppi_descs[fwspec->param[1]], > + ret = gic_irq_domain_translate(d, fwspec, &ppi_intid, type); This assigns @type for us, so the @type assignment at the tail of partition_domain_translate() becomes redundant. > + if (WARN_ON_ONCE(ret)) > + return 0; > + > + ppi_idx = __gic_get_ppi_index(ppi_intid); > + ret = partition_translate_id(gic_data.ppi_descs[ppi_idx], > of_node_to_fwnode(np)); > if (ret < 0) > return ret; > -- > 2.30.2