Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2777085rwb; Fri, 9 Dec 2022 06:17:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf75DcaomuTSnXqL9mBpFZQqByAAczKeBi93/oYXJd6rZiurnzCSD3vTTIMwRivTnlRLAO7L X-Received: by 2002:a17:903:40d1:b0:189:894a:a637 with SMTP id t17-20020a17090340d100b00189894aa637mr6478411pld.65.1670595437171; Fri, 09 Dec 2022 06:17:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670595437; cv=none; d=google.com; s=arc-20160816; b=PisbW8hEQXjoQbUWUm82l+v8oxQ3QFGY+DjgRhIyCsz+B2iTKo9N7ps6HSIISAIHCd fhel8HVXP5ceEV91wFY74N/kj6X7gX2TbjK3Hb3QxnzTfda2PyG14f5UgMRM9mC1Zw4m jxSTQ1zebBcjcSgAPloBuw/Gj+c1plMPknx30ocTsDy6pTaCOaIBpf/64xC56bGO9FQ+ DjQUdRlVYa+g/pp0S0uLSTHn2cd9PXq5mFkeIRzR7IkP/p9ukVedLLb8riGXAj6n0O7n kFlLPYfldPDX7rLP7n2SQaMExJG3RA4tjGCUk86yc3XHUty0qONEJ51GU12JEknPjYj0 XG6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hx9oSguu0EFl0P+a2HocVZ43pPDMXuJPdjEMGmJgOWs=; b=eC5YIFvyq6g3bLLvnT4g+gjTD4hf8XpVDi4YUSiaMnIk9YuyUOOAHiYLQ75/PDMzi8 jGndRYGrW0tV1gxbnRA9k9QG6us4972U/qtdDOX+QG0iASZ5YzPJIxV5sdlHBEcD6ZtQ TWQM0NUucUCnLdC+yW+ZCDzN+LAcU6PskLqiaKUFHgYoibwfvO+czKuRE0oPlUnl7p4k bEPboihGVMacKQ0660qumnI4u7/FwqJC6OO12k2sprKQy2jHZKesoytZifIx/QCrVhxy 3yCW/oQtfrmvePKrOlkVi0CSLBC9Vv8je4uEn55ByElp3IPDoN5eRz3GisAmpImmEh/v BuPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vBPCGJ3y; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jw22-20020a170903279600b001889d3b1c07si1481299plb.566.2022.12.09.06.17.05; Fri, 09 Dec 2022 06:17:17 -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=@kernel.org header.s=k20201202 header.b=vBPCGJ3y; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230193AbiLIOGc (ORCPT + 75 others); Fri, 9 Dec 2022 09:06:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229964AbiLIOFV (ORCPT ); Fri, 9 Dec 2022 09:05:21 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD1A176143; Fri, 9 Dec 2022 06:05:19 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 26115B8288B; Fri, 9 Dec 2022 14:05:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86F9DC432C7; Fri, 9 Dec 2022 14:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670594714; bh=VZG0mIrnpRYSLmP6v+aPSsXqssZN+JxVOB0YXZxJtgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vBPCGJ3ydqDKIQkyQiwvx3XBhQ8eYOJI6wjL7rjJduxKvPdzdS5X9EDTcy8k6PxC5 r2hMYtQ9BPJ38yd40f/xppo09a5tY54ooaCwgv7bHH17qds/lSpnelHcNAThBeuhz/ BrjSw3OEW9PtnBWPMuErakJhKSnTpv80Bhu0T8z2VQr2n8I3BcENT58IDq8oT3n6n1 tTRDCz/w4Ra6GZ99RJmFy8Jv1kiZqdKtmbldZW9z01mSQohFyIF2INRmpczT8jgrZz Z0gTo7WjVwGW5u9NI6AhHt2Jgp4Dh0CnSQTmD8OJ6yRG7UYz6t6F6Ux+of7yFXakxf EI6muweRqyVcg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p3e0J-0000SD-QA; Fri, 09 Dec 2022 15:05:31 +0100 From: Johan Hovold To: Marc Zyngier Cc: Thomas Gleixner , x86@kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v3 18/19] irqchip/mvebu-odmi: Use irq_domain_create_hierarchy() Date: Fri, 9 Dec 2022 15:01:49 +0100 Message-Id: <20221209140150.1453-19-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221209140150.1453-1-johan+linaro@kernel.org> References: <20221209140150.1453-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Signed-off-by: Johan Hovold --- drivers/irqchip/irq-mvebu-odmi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/irqchip/irq-mvebu-odmi.c b/drivers/irqchip/irq-mvebu-odmi.c index dc4145abdd6f..108091533e10 100644 --- a/drivers/irqchip/irq-mvebu-odmi.c +++ b/drivers/irqchip/irq-mvebu-odmi.c @@ -161,7 +161,7 @@ static struct msi_domain_info odmi_msi_domain_info = { static int __init mvebu_odmi_init(struct device_node *node, struct device_node *parent) { - struct irq_domain *inner_domain, *plat_domain; + struct irq_domain *parent_domain, *inner_domain, *plat_domain; int ret, i; if (of_property_read_u32(node, "marvell,odmi-frames", &odmis_count)) @@ -197,16 +197,17 @@ static int __init mvebu_odmi_init(struct device_node *node, } } - inner_domain = irq_domain_create_linear(of_node_to_fwnode(node), - odmis_count * NODMIS_PER_FRAME, - &odmi_domain_ops, NULL); + parent_domain = irq_find_host(parent); + + inner_domain = irq_domain_create_hierarchy(parent_domain, 0, + odmis_count * NODMIS_PER_FRAME, + of_node_to_fwnode(node), + &odmi_domain_ops, NULL); if (!inner_domain) { ret = -ENOMEM; goto err_unmap; } - inner_domain->parent = irq_find_host(parent); - plat_domain = platform_msi_create_irq_domain(of_node_to_fwnode(node), &odmi_msi_domain_info, inner_domain); -- 2.37.4