From patchwork Fri Dec 9 14:01:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 31763 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp795212wrr; Fri, 9 Dec 2022 06:07:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf4ECEJwZmXJ4JdZYvPr8H7UzhhTZTyjBPYbZePDq7fb4fetJsrE6MzosTe5+fueetUKeemN X-Received: by 2002:a05:6a21:108f:b0:9e:ae77:aad7 with SMTP id nl15-20020a056a21108f00b0009eae77aad7mr5640185pzb.29.1670594865633; Fri, 09 Dec 2022 06:07:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670594865; cv=none; d=google.com; s=arc-20160816; b=ss0QRd3czkAtk0/h87r4IQIK/rP+BszmlHHT9JSL0MJ6PHmnBuVaSJgXCEa35FlG2F NhKxbNLjGhW/O8drm375is2al+tjuqbgiqLKh/JTgJMk6e8YVeBg8U/PjQBpWwi2yHPA ivrNS5j3IGPQEEzP3+6nIPsZtVCMSL88FaOqVBKGqEBBaEzHleCB9Ih2EPoRsEdueMql E2zBnOsvzsuJVxNGAK5j8IUM+er5YKLnQOgUw1Ot5Uq5ukI1wxlETfCsbq2KGtNi2kxN TWut/hiEncfe23TONW6Sy0TBlz56QTl4OhhZh3D385CUY5H7K7i1VLDlkngFRqbaWWie 6WSA== 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=DWeG1268g6v4b8wuSax0W2FlWgBUonuvP/aVevr+xC0=; b=U2vs0B8DfBUPEf3j3uB0lpN9Xu0drkRzO96OdWCvsqzvk9kvK661E+Cl5AeOe7mqqY UfgcKVLCThcXxTGCEfJ2+J1/ViuOvg7S+QE91w+s5NM6t25/5d5m1U/XZWLDaes2Xw+x mXPtXgZC5IKToq09k6b3rjcTNH7qC/q/aaC5MCbxmZ5WQHO4T1aYEykjvEnELkpETIGd pYLFaSUgl0RuX+UAvN5/RPPPF7ZIUH59t6pPuT5W40ILs3NBpU3RfGavQ1WTHA0aJIlr LehvdDOaMQuO6qMS6c0oGFHHgxSNpPqAHeGPCkBV6+43VWQSfNKPAlySe4LK0H+2GeqC fCMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ek8MZqQK; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k62-20020a638441000000b004789f4ef89fsi1519687pgd.875.2022.12.09.06.07.30; Fri, 09 Dec 2022 06:07:45 -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=Ek8MZqQK; 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 S230018AbiLIOGZ (ORCPT + 99 others); Fri, 9 Dec 2022 09:06:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbiLIOFV (ORCPT ); Fri, 9 Dec 2022 09:05:21 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FA967720A; Fri, 9 Dec 2022 06:05:18 -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 sin.source.kernel.org (Postfix) with ESMTPS id 7090ACE289D; Fri, 9 Dec 2022 14:05:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 025F3C43332; Fri, 9 Dec 2022 14:05:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670594714; bh=6gyDnOh8vPJma4ZvWV3odrUEiz4K7dnpkJYUU+2k8Ko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ek8MZqQKLsJ2LM5eTC6LlMFwRDP9T77FoT9Unw5x0i8TZozYTJDlgE5dX9OYlJHLc fBVnwf6BIAwxVgSKs3qB/zWQdbukgQ/7haodw9cswsTecqC3DzFYWhW7tLKLKmnx9X eswae/iOsywzrd85JzubZr0kZ2YR0QLa86l8DW2Fgr3oKPcaT0cGd+5ySQy+4cPl8V o5tUk3iMxqfJtiQRguut9wsTvQ7ELUH1Nrw57f+xm8cUaNkekwQy+iHBJ22/vGAcaX +Hd1y9+od+wFDSIvXyPVRJHyaAESxqMRuf8lViOsI6sWcSWVTr/V1cqaedM+7FkvKv DfQIUSAXNMN0A== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p3e0J-0000Rv-8T; 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 12/19] x86/apic: Use irq_domain_create_hierarchy() Date: Fri, 9 Dec 2022 15:01:43 +0100 Message-Id: <20221209140150.1453-13-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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751745681672723067?= X-GMAIL-MSGID: =?utf-8?q?1751745681672723067?= 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 Reviewed-by: Philippe Mathieu-Daudé --- arch/x86/platform/uv/uv_irq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/platform/uv/uv_irq.c b/arch/x86/platform/uv/uv_irq.c index 1a536a187d74..ee21d6a36a80 100644 --- a/arch/x86/platform/uv/uv_irq.c +++ b/arch/x86/platform/uv/uv_irq.c @@ -166,10 +166,9 @@ static struct irq_domain *uv_get_irq_domain(void) if (!fn) goto out; - uv_domain = irq_domain_create_tree(fn, &uv_domain_ops, NULL); - if (uv_domain) - uv_domain->parent = x86_vector_domain; - else + uv_domain = irq_domain_create_hierarchy(x86_vector_domain, 0, 0, fn, + &uv_domain_ops, NULL); + if (!uv_domain) irq_domain_free_fwnode(fn); out: mutex_unlock(&uv_lock);