Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1911082rwl; Sat, 8 Apr 2023 04:33:25 -0700 (PDT) X-Google-Smtp-Source: AKy350aUTKKu8DoeU3O5N42+uiAscESRqd9Aip51S6iWrIJ++oldDMF8g6vb48DRxqHBCAyVZthc X-Received: by 2002:a17:90b:4f4c:b0:246:5f9e:e4b7 with SMTP id pj12-20020a17090b4f4c00b002465f9ee4b7mr4918847pjb.44.1680953604938; Sat, 08 Apr 2023 04:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680953604; cv=none; d=google.com; s=arc-20160816; b=RGsHGjuJ2ZwmzyADJl9f1Rn8f3T+rvLvghLJFkcbEGOFEiIc/tN4jkJDUIlCOAK+0j +HJF9KnyRpz/1jIx6w4MOX5288vL0KFH4UvukJFs3wJRdRzjRSxaQYcDh+NkZF0+4Bps vRzRjQ5uP8ZcU/2N5XvxtkaK2ewcjUOx/CIcbEyGsTC+nRX7SqzSVHkQVEM0nQkds05y OfTyAA3seAbRRluekoX2GCfJjFvukEFs6d0OTr1dsHNZ7sDZofKUblgRE7VZO7F9s6DF eL0n9I2XQ0sh+23zWQsu+5T87b3F3m7fM+nRkoDeoSncdlPt3VtLaxdoH5l6M+vH3WqT QyHg== 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=6kgWak1i0mIV7qLJxTAwEXpDoMYPgTeJAnVbzOuIMqg=; b=J+JlUPZaNsKMlN9Q1E4WPps+UQM756rI/6JVZFHpaJ/7n+h7OivK6QSCafruHnGYmB ERgRe6/RIra6wP53k6PfUKB9P2PuMIGr0QKWmCe9VuZNvP5Bh9L5yMxWPDKz2poVokku P5aQV9skLMYJaZsBPpE5WLuEG8dxZqe/tGtIzjeIaOST+VdE66kK/rren1T8YsZwgSJK X65efFTtOTA3KgQRp4ESCwsUJWMxqbRSjecKWxjRF86BLQpXyshT21qm3AbvzxCwhZ8U pdZySY+KptSVumcthxn4MIPc4XnZUO4YQlZwiXkk45B0tyZnck/iZG3vZQMgfHoIrLpZ jzdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=XwgMiTJH; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f18-20020a170902ce9200b001a043389a7asi6214115plg.310.2023.04.08.04.33.13; Sat, 08 Apr 2023 04:33:24 -0700 (PDT) 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=XwgMiTJH; 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 S230247AbjDHKvE (ORCPT + 99 others); Sat, 8 Apr 2023 06:51:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229924AbjDHKue (ORCPT ); Sat, 8 Apr 2023 06:50:34 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22AFA11EA0 for ; Sat, 8 Apr 2023 03:49:38 -0700 (PDT) Date: Sat, 08 Apr 2023 10:45:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1680950722; 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=6kgWak1i0mIV7qLJxTAwEXpDoMYPgTeJAnVbzOuIMqg=; b=XwgMiTJHJlKOScPsgdnjyM5plyhNorCxjDMeCLQK61zlBTK2i8pMofZSTL3Umrz15GtgZs Y/CflIDm833JxfcOUEBMAjaiXmuPa6CiaCitPWpniNeP3WD+6QEurlSOMScly+tx7EK/zx 4ZTtiYthwRRF6/sIZJGYxDGLFsbvbzW8NkfmjocVMvA3x4iLK794zONbm773vFRFwsRWYT WK1liCeDJTg7k/XFP80Lyae0cLPp9Xmwh7CpWSDZNI1wuK0JviT0FY1Ic/4ZqQTH65hy5n OoVNLB2JvhW6wXrOm2QLuvUy4y2oIqv/cgtJX81qJylCXs3C7e4bsZgCvNvl7g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1680950722; 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=6kgWak1i0mIV7qLJxTAwEXpDoMYPgTeJAnVbzOuIMqg=; b=qbdG7j/rBIqgtWpeFcD5AgcPXC5qJ2FCEGKSWBc56nnLGFX+sCNDdvJ9DPrtuU4nieKph4 N3AX24Sd/x1NwWDA== From: "irqchip-bot for Marc Zyngier" 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: Drop support for board files Cc: Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230315130218.3212033-1-maz@kernel.org> References: <20230315130218.3212033-1-maz@kernel.org> MIME-Version: 1.0 Message-ID: <168095072174.404.8151744605918524188.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: dee234032e767b3d6823fe122517770757306f04 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/dee234032e767b3d6823fe122517770757306f04 Author: Marc Zyngier AuthorDate: Wed, 15 Mar 2023 13:02:18 Committer: Marc Zyngier CommitterDate: Sat, 08 Apr 2023 10:50:04 +01:00 irqchip/gic: Drop support for board files With the last non-OF, non-ACPI user of the GIC being removed in e73307b9ebc4 ("ARM: cns3xxx: remove entire platform"), we can finally drop the entry point and do some minor cleanup. We also make the driver depend on CONFIG_OF, which is required even when CONFIG_ACPI is selected. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230315130218.3212033-1-maz@kernel.org --- drivers/irqchip/Kconfig | 1 +- drivers/irqchip/irq-gic.c | 60 +------------------------------- include/linux/irqchip/arm-gic.h | 6 +--- 3 files changed, 4 insertions(+), 63 deletions(-) diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 7dc990e..b744fd9 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -7,6 +7,7 @@ config IRQCHIP config ARM_GIC bool + depends on OF select IRQ_DOMAIN_HIERARCHY select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 95e3d2a..412196a 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -1081,10 +1081,6 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq, return 0; } -static void gic_irq_domain_unmap(struct irq_domain *d, unsigned int irq) -{ -} - static int gic_irq_domain_translate(struct irq_domain *d, struct irq_fwspec *fwspec, unsigned long *hwirq, @@ -1167,11 +1163,6 @@ static const struct irq_domain_ops gic_irq_domain_hierarchy_ops = { .free = irq_domain_free_irqs_top, }; -static const struct irq_domain_ops gic_irq_domain_ops = { - .map = gic_irq_domain_map, - .unmap = gic_irq_domain_unmap, -}; - static int gic_init_bases(struct gic_chip_data *gic, struct fwnode_handle *handle) { @@ -1219,30 +1210,9 @@ static int gic_init_bases(struct gic_chip_data *gic, gic_irqs = 1020; gic->gic_irqs = gic_irqs; - if (handle) { /* DT/ACPI */ - gic->domain = irq_domain_create_linear(handle, gic_irqs, - &gic_irq_domain_hierarchy_ops, - gic); - } else { /* Legacy support */ - /* - * For primary GICs, skip over SGIs. - * No secondary GIC support whatsoever. - */ - int irq_base; - - gic_irqs -= 16; /* calculate # of irqs to allocate */ - - irq_base = irq_alloc_descs(16, 16, gic_irqs, - numa_node_id()); - if (irq_base < 0) { - WARN(1, "Cannot allocate irq_descs @ IRQ16, assuming pre-allocated\n"); - irq_base = 16; - } - - gic->domain = irq_domain_add_legacy(NULL, gic_irqs, irq_base, - 16, &gic_irq_domain_ops, gic); - } - + gic->domain = irq_domain_create_linear(handle, gic_irqs, + &gic_irq_domain_hierarchy_ops, + gic); if (WARN_ON(!gic->domain)) { ret = -ENODEV; goto error; @@ -1297,23 +1267,6 @@ static int __init __gic_init_bases(struct gic_chip_data *gic, return ret; } -void __init gic_init(void __iomem *dist_base, void __iomem *cpu_base) -{ - struct gic_chip_data *gic; - - /* - * Non-DT/ACPI systems won't run a hypervisor, so let's not - * bother with these... - */ - static_branch_disable(&supports_deactivate_key); - - gic = &gic_data[0]; - gic->raw_dist_base = dist_base; - gic->raw_cpu_base = cpu_base; - - __gic_init_bases(gic, NULL); -} - static void gic_teardown(struct gic_chip_data *gic) { if (WARN_ON(!gic)) @@ -1325,7 +1278,6 @@ static void gic_teardown(struct gic_chip_data *gic) iounmap(gic->raw_cpu_base); } -#ifdef CONFIG_OF static int gic_cnt __initdata; static bool gicv2_force_probe; @@ -1570,12 +1522,6 @@ IRQCHIP_DECLARE(cortex_a7_gic, "arm,cortex-a7-gic", gic_of_init); IRQCHIP_DECLARE(msm_8660_qgic, "qcom,msm-8660-qgic", gic_of_init); IRQCHIP_DECLARE(msm_qgic2, "qcom,msm-qgic2", gic_of_init); IRQCHIP_DECLARE(pl390, "arm,pl390", gic_of_init); -#else -int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq) -{ - return -ENOTSUPP; -} -#endif #ifdef CONFIG_ACPI static struct diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h index 5686711..2223f95 100644 --- a/include/linux/irqchip/arm-gic.h +++ b/include/linux/irqchip/arm-gic.h @@ -151,12 +151,6 @@ int gic_of_init(struct device_node *node, struct device_node *parent); */ int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq); -/* - * Legacy platforms not converted to DT yet must use this to init - * their GIC - */ -void gic_init(void __iomem *dist , void __iomem *cpu); - void gic_send_sgi(unsigned int cpu_id, unsigned int irq); int gic_get_cpu_id(unsigned int cpu); void gic_migrate_target(unsigned int new_cpu_id);