From patchwork Mon Feb 13 19:40:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 56508 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2537334wrn; Mon, 13 Feb 2023 11:43:00 -0800 (PST) X-Google-Smtp-Source: AK7set+lhSiSSLn7dteprOQwCYjQld/gQRR3hOSePzOKbj5PVUfKdAOH8gKkm5lFFn0k35/JFuG+ X-Received: by 2002:a17:906:fc08:b0:86d:7c2d:f65b with SMTP id ov8-20020a170906fc0800b0086d7c2df65bmr98369ejb.27.1676317380182; Mon, 13 Feb 2023 11:43:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676317380; cv=none; d=google.com; s=arc-20160816; b=TP6i1ZPVC+M7LZpcNx/WgFFOqk4daO7QVUvbGGb0CmHaXR0mfyEj0vCqnYlLynLnBw CFF0Tb3F/DNkKY5YaCX/b2int4LdL8AOj41TrFoYNFVflaoUGYGJgxD7qDew2ukZzygl QmEKnsU7ZaibdmTbRjqHTjG8AxgMzANARcBWTSPcQOjQEdlKlbmBSYwEIWysviEyAFej Di7KS6l/ynNeAqn+S3WwcypLFqSinly30wiD46QPAAzBx5Sk+By+ec9BWK64g660ZvpS qeSI2d64DdAEffXZtbfs2RqggBVvJ++EOmXzRRx6Bx1v1B3MLMv1DiTf/9PenN7uqoV8 aqWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=xO14wHwXOgLXvxWYFtIOhF7vSMZ9cOX/QwkmI9hSoE0=; b=XEnpy1jtIN/ZtbIjE32RVMWINvwfLK5zd5QqDAU/tetlnnFnsV9fzcmlplqsjWZTjl h6kXxZMvOAlOB9DozRK06T5j/sNqHR8sJ5Pl8IcbIUAGYJ3SidDn9CWIarW/Gj/4uzK1 3gq+CjoCXUfN0CwDYVzFxeFRu0j/r8EAsQK9BYncMRqFr9ieauHMaA5HHJ1ZZAmxwPv0 +cccWZMFSeycqRz947UcJS22tvqPLsxJ3TNxESbyTkUo5ScKCOSo5r+zsAsbHDkl7ky4 0YRyZ1ooj44B5a4QzswYomnQhZGUjlb51uHLZgKpZgnPQo5DLRIkD+lNywKjM5UPiRpD Hm4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="2BqSS/ZV"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 3-20020a170906028300b0088f97d5ede9si16510473ejf.67.2023.02.13.11.42.37; Mon, 13 Feb 2023 11:43:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="2BqSS/ZV"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231263AbjBMTks (ORCPT + 99 others); Mon, 13 Feb 2023 14:40:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbjBMTko (ORCPT ); Mon, 13 Feb 2023 14:40:44 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 048E946A2 for ; Mon, 13 Feb 2023 11:40:43 -0800 (PST) Date: Mon, 13 Feb 2023 19:40:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1676317241; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xO14wHwXOgLXvxWYFtIOhF7vSMZ9cOX/QwkmI9hSoE0=; b=2BqSS/ZVQh6nGSUbPn3XQCxIAqu271owkEht9fSCiCJWPeTfLk4Aku3IJso4mDIKpOIKvv JpUfHNpvKOa7u8HRQK6bdH7OJ4iOsRQ4HwUI37U7qQCgEi1AWe+70OaqNK9e309ybn16gV HrgqvgC5zD4IiU9r+alKI2euSE1KDSongrws9/faJQ8GVtQMqI/oACmgubaILecxOLFPzm +tU14KaweJUH2cNU0lb4E2NRo0cdEI17I86C+hzi5H1cy0jbaBHnlzOWoIxj/zlvddDBrZ alb3uJHoCEsqSzN7Z8EceRKxjKPNxItdIbsQ/A3AXQGHIOmr93paDtfLtfjsaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1676317241; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xO14wHwXOgLXvxWYFtIOhF7vSMZ9cOX/QwkmI9hSoE0=; b=gJ5zGxmAlJvBHln13P1mxGBgtMyQrdBJ+kFN2Np6hjo29I1+FRYxx+uSw7xTFTZY3vGvsW dqgvJbQfvOheBmCA== From: "irqchip-bot for Johan Hovold" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/gic-v3-its: Use irq_domain_create_hierarchy() Cc: "Hsin-Yi Wang" , "Mark-PK Tsai" , Johan Hovold , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230213104302.17307-17-johan+linaro@kernel.org> References: <20230213104302.17307-17-johan+linaro@kernel.org> MIME-Version: 1.0 Message-ID: <167631724131.4906.9954797080241580623.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757712482267730115?= X-GMAIL-MSGID: =?utf-8?q?1757746173415851041?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 1e46e040decede1723a5b11f0689942134c29d9a Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/1e46e040decede1723a5b11f0689942134c29d9a Author: Johan Hovold AuthorDate: Mon, 13 Feb 2023 11:42:58 +01:00 Committer: Marc Zyngier CommitterDate: Mon, 13 Feb 2023 19:31:25 irqchip/gic-v3-its: Use irq_domain_create_hierarchy() Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Note that the domain host_data was first set to the struct its_node during allocation only to immediately be overwritten with the struct msi_domain_info. Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-17-johan+linaro@kernel.org --- drivers/irqchip/irq-gic-v3-its.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 973ede0..5634d29 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -4909,18 +4909,19 @@ static int its_init_domain(struct fwnode_handle *handle, struct its_node *its) if (!info) return -ENOMEM; - inner_domain = irq_domain_create_tree(handle, &its_domain_ops, its); + info->ops = &its_msi_domain_ops; + info->data = its; + + inner_domain = irq_domain_create_hierarchy(its_parent, + its->msi_domain_flags, 0, + handle, &its_domain_ops, + info); if (!inner_domain) { kfree(info); return -ENOMEM; } - inner_domain->parent = its_parent; irq_domain_update_bus_token(inner_domain, DOMAIN_BUS_NEXUS); - inner_domain->flags |= its->msi_domain_flags; - info->ops = &its_msi_domain_ops; - info->data = its; - inner_domain->host_data = info; return 0; }