From patchwork Mon Feb 13 19:40:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 56521 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2537796wrn; Mon, 13 Feb 2023 11:44:15 -0800 (PST) X-Google-Smtp-Source: AK7set/17JU+/v6qawv8MkyNzTVaGjDD932v/VnnHJfnpOXWyTYMnYfPBcilLYYNukyAjvgY49a/ X-Received: by 2002:a17:906:dfc5:b0:88d:79df:7cfc with SMTP id jt5-20020a170906dfc500b0088d79df7cfcmr41932ejc.62.1676317455461; Mon, 13 Feb 2023 11:44:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676317455; cv=none; d=google.com; s=arc-20160816; b=QygS4nepAqYNMqI71NfudDG4zOeD0HDo0EbMP0Sbuxol5BaAtHkmPJ+96ZrdhasDkZ baC6OAp+0PKdx/tUtqfIWOpAKsRL6ZkysjoY2vdImnvv++vT/OiRRFhDt9W7XOoancOv Dh9W3xakrmiWc480OoysDW36sVTPCkrECEDI5Zc3UtahwJnK6kSkZbkCa/1XsmBTYZx2 j5c+tjcxBDm5M3fDzTMbd96jUrQVJhC3BJRpVMIcJ2C6wIna+XHifrgGa+oFVkh91yss 28xcVz45tAKq8+B3X7DfpC5I6g+Uy0uMWXholEQeHrHpvyAMGyeygs0si8iSOamReIi5 frnQ== 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=bMoSI9lBoZIk1jDphkMK/y9E/cpGLC8SwZdmQ+X+vUE=; b=N2MP6koqq8E+uKdrYwZztxd94cxxFLj1u9f9iq0jGxji+zj2FVcOmc+ktZf9p9kX0q o5oxQlvrxCzzkKVuyV4ZyrOFQl/65FCnq/EHb7hs/YpCBW18+t2l76aQ7K9KvH9v1tAQ Vbq4YpCA3Mg+DiuddT42mXXGiYxvful+uhFs/6iDTSmtgr8Aih3JRtW3FBAc2STFj7Yz 883BRhiIHoyuWAWyXF5vq7Yx05qw67lNrU2We0mfBI6dSzu+fwnpvfyAO7iSL5THxgr7 pP+pOY+gUAG5iSZYaMzSqtYYsfb7NwD4C94tB/FlZaJAEPVTRKk7BJagmi8pe7fedJ44 Nmog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="qbvd/oKo"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 mx13-20020a1709065a0d00b0088baf3b2a19si13265763ejc.495.2023.02.13.11.43.52; Mon, 13 Feb 2023 11:44:15 -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="qbvd/oKo"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S231350AbjBMTlC (ORCPT + 99 others); Mon, 13 Feb 2023 14:41:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231193AbjBMTkq (ORCPT ); Mon, 13 Feb 2023 14:40:46 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19C6640FD for ; Mon, 13 Feb 2023 11:40:45 -0800 (PST) Date: Mon, 13 Feb 2023 19:40:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1676317243; 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=bMoSI9lBoZIk1jDphkMK/y9E/cpGLC8SwZdmQ+X+vUE=; b=qbvd/oKosRCh8muKdQE7Hu9U2+Tm/IA64ut8B4KoZ3WRyfiD7dynHKAm97bJOxn9O7nzDK s7UtgmEJfVIxY+m9enICc3PJXsKje7ugivyjdqrjW1qOV3yVQK6wvHKcFinFosqr9uJ//a /z/1NAD0nldpd6wLvlYp3iy0hk8b+qoUzE9VPTqpvZu5eZkKAuPND+K3IEHEoIHmUEXaLy RLCnwf1aE11GStSz5Exkgp5RXUztH/Ye5yn5vQgRVo+8CZNQ2EAt/11HfGFI164/xZw1BK SC++lYJTetaZcm1glS7DC9pyKWJUtd/VXF0I0Wje00n9+ho+zb/Vz4L9vr9m9w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1676317243; 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=bMoSI9lBoZIk1jDphkMK/y9E/cpGLC8SwZdmQ+X+vUE=; b=5xfC302NkT77P2SSIbkBHYUtbBDSgbaStSJ6R2Cov2eYQ4VtWr+Bfww9m66kXGtr2SHwzi g9Zqf9PFPXKj6EBA== 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] x86/ioapic: Use irq_domain_create_hierarchy() Cc: philmd@linaro.org, "Hsin-Yi Wang" , "Mark-PK Tsai" , Johan Hovold , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230213104302.17307-13-johan+linaro@kernel.org> References: <20230213104302.17307-13-johan+linaro@kernel.org> MIME-Version: 1.0 Message-ID: <167631724340.4906.2367219782505743568.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?1757712454477863304?= X-GMAIL-MSGID: =?utf-8?q?1757746252188523840?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: bc1bc1b309b42ff3faea957df7ac9382366c5eef Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/bc1bc1b309b42ff3faea957df7ac9382366c5eef Author: Johan Hovold AuthorDate: Mon, 13 Feb 2023 11:42:54 +01:00 Committer: Marc Zyngier CommitterDate: Mon, 13 Feb 2023 19:31:24 x86/ioapic: 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. Reviewed-by: Philippe Mathieu-Daudé 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-13-johan+linaro@kernel.org --- arch/x86/kernel/apic/io_apic.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index a868b76..1f83b05 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -2364,9 +2364,8 @@ static int mp_irqdomain_create(int ioapic) return -ENODEV; } - ip->irqdomain = irq_domain_create_linear(fn, hwirqs, cfg->ops, - (void *)(long)ioapic); - + ip->irqdomain = irq_domain_create_hierarchy(parent, 0, hwirqs, fn, cfg->ops, + (void *)(long)ioapic); if (!ip->irqdomain) { /* Release fw handle if it was allocated above */ if (!cfg->dev) @@ -2374,8 +2373,6 @@ static int mp_irqdomain_create(int ioapic) return -ENOMEM; } - ip->irqdomain->parent = parent; - if (cfg->type == IOAPIC_DOMAIN_LEGACY || cfg->type == IOAPIC_DOMAIN_STRICT) ioapic_dynirq_base = max(ioapic_dynirq_base,