From nobody Wed Dec 17 08:52:10 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F75125D207; Wed, 19 Mar 2025 09:32:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376772; cv=none; b=OIi2yiSxsXtwYd3E0+vuiYYOxDyI61kiR7FnPfQXw22/m+7WqoU1YYRv2V9CAleGWxTg9EVhliMnhBNoHMWUKP/RNoRDBf6SITTY5p8HlM6Jx4MkvTDUcgK7E/4Ij75ZfqUEY3tL2LB2RUQtrFciBJxXDCZp90qfUc1wVpH4Vn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376772; c=relaxed/simple; bh=K/R8g9zziIqCOE4/MMgWNVtoTA9qMBHKAn0Fn7NrtC8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rrzD9KtxFcOPyFiLmmR+XIoakXeWvCKRp5B0lugKKy+t1lf5baM/Lq6aeYPJbNipKFjZzQSeLtdv/KJYQ/YrDsuto61LwqiMExpH8C0fSw1d8nFBnZ3++SEPj+smA02nkmoUdCPbUGnWHRkUqB8WTmUUDzufI1vyfxyzDR3fxOA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A4apbBLG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A4apbBLG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AE62C4CEE9; Wed, 19 Mar 2025 09:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376772; bh=K/R8g9zziIqCOE4/MMgWNVtoTA9qMBHKAn0Fn7NrtC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A4apbBLGGm5DKjd+jiJh4zvU0miW5I2qnUr6l3TNOFZLKGxpTvu5FB+VOSK191CW7 BrAK8ZC7t0L1qtfPNOExO9bVkDG9wOvgD1LlJHf5uHsiNU7OZb05mvusU8reXaOb01 iInuXXvVF0IfDso4YI78Sv5IiyaTW9dT3nE1jHwK1VLBXoxZNkodWv5l4lzVLzXpIo lAYvoKkkwbmPLl1Igrz6HgsFRPkCmi5cZoKVcaypTxDgBv7rjTuZvT6t/13R9D7eiG u608rY57uEhzTZOzBBB/ZCpB5hszN9q+B0RMB2+z/D9jHZ+EGxN0TUDzhUSwJ/t1ST KtYAQ9ovSzM2A== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Alex Shi , Yanteng Si , Dongliang Mu , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH v2 40/57] irqdomain: Drop irq_domain_add_*() functions Date: Wed, 19 Mar 2025 10:29:33 +0100 Message-ID: <20250319092951.37667-41-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable irq_domain_add_*() functions are unused now, so drop them. Note: The Chinese docs are touched but unfinished. I cannot parse those. Signed-off-by: Jiri Slaby (SUSE) Cc: Alex Shi Cc: Yanteng Si Cc: Dongliang Mu Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org --- Documentation/core-api/irq/irq-domain.rst | 34 ++-------- .../zh_CN/core-api/irq/irq-domain.rst | 4 -- include/linux/irqdomain.h | 68 ------------------- kernel/irq/irqdomain.c | 27 -------- 4 files changed, 7 insertions(+), 126 deletions(-) diff --git a/Documentation/core-api/irq/irq-domain.rst b/Documentation/core= -api/irq/irq-domain.rst index 44f4ba5480df..e26ed303819d 100644 --- a/Documentation/core-api/irq/irq-domain.rst +++ b/Documentation/core-api/irq/irq-domain.rst @@ -92,7 +92,6 @@ Linear =20 :: =20 - irq_domain_add_linear() irq_domain_create_linear() =20 The linear reverse map maintains a fixed size table indexed by the @@ -105,11 +104,6 @@ map are fixed time lookup for IRQ numbers, and irq_des= cs are only allocated for in-use IRQs. The disadvantage is that the table must be as large as the largest possible hwirq number. =20 -irq_domain_add_linear() and irq_domain_create_linear() are functionally -equivalent, except for the first argument is different - the former -accepts an Open Firmware specific 'struct device_node', while the latter -accepts a more general abstraction 'struct fwnode_handle'. - The majority of drivers should use the linear map. =20 Tree @@ -117,7 +111,6 @@ Tree =20 :: =20 - irq_domain_add_tree() irq_domain_create_tree() =20 The irq_domain maintains a radix tree map from hwirq numbers to Linux @@ -129,11 +122,6 @@ since it doesn't need to allocate a table as large as = the largest hwirq number. The disadvantage is that hwirq to IRQ number lookup is dependent on how many entries are in the table. =20 -irq_domain_add_tree() and irq_domain_create_tree() are functionally -equivalent, except for the first argument is different - the former -accepts an Open Firmware specific 'struct device_node', while the latter -accepts a more general abstraction 'struct fwnode_handle'. - Very few drivers should need this mapping. =20 No Map @@ -159,8 +147,6 @@ Legacy =20 :: =20 - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy() =20 @@ -189,13 +175,13 @@ supported. For example, ISA controllers would use th= e legacy map for mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ numbers. =20 -Most users of legacy mappings should use irq_domain_add_simple() or -irq_domain_create_simple() which will use a legacy domain only if an IRQ r= ange -is supplied by the system and will otherwise use a linear domain mapping. -The semantics of this call are such that if an IRQ range is specified then -descriptors will be allocated on-the-fly for it, and if no range is -specified it will fall through to irq_domain_add_linear() or -irq_domain_create_linear() which means *no* irq descriptors will be alloca= ted. +Most users of legacy mappings should use irq_domain_create_simple() +which will use a legacy domain only if an IRQ range is supplied by the +system and will otherwise use a linear domain mapping. The semantics of +this call are such that if an IRQ range is specified then descriptors +will be allocated on-the-fly for it, and if no range is specified it +will fall through to irq_domain_create_linear() which means *no* irq +descriptors will be allocated. =20 A typical use case for simple domains is where an irqchip provider is supporting both dynamic and static IRQ assignments. @@ -206,12 +192,6 @@ that the driver using the simple domain call irq_creat= e_mapping() before any irq_find_mapping() since the latter will actually work for the static IRQ assignment case. =20 -irq_domain_add_simple() and irq_domain_create_simple() as well as -irq_domain_add_legacy() and irq_domain_create_legacy() are functionally -equivalent, except for the first argument is different - the former -accepts an Open Firmware specific 'struct device_node', while the latter -accepts a more general abstraction 'struct fwnode_handle'. - Hierarchy IRQ domain -------------------- =20 diff --git a/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst b= /Documentation/translations/zh_CN/core-api/irq/irq-domain.rst index ecb23cfbc9fc..913c3eda3f74 100644 --- a/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +++ b/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst @@ -83,7 +83,6 @@ irq_domain=E6=98=A0=E5=B0=84=E7=9A=84=E7=B1=BB=E5=9E=8B =20 :: =20 - irq_domain_add_linear() irq_domain_create_linear() =20 =E7=BA=BF=E6=80=A7=E5=8F=8D=E5=90=91=E6=98=A0=E5=B0=84=E7=BB=B4=E6=8A=A4= =E4=BA=86=E4=B8=80=E4=B8=AA=E5=9B=BA=E5=AE=9A=E5=A4=A7=E5=B0=8F=E7=9A=84=E8= =A1=A8=EF=BC=8C=E8=AF=A5=E8=A1=A8=E4=BB=A5hwirq=E5=8F=B7=E4=B8=BA=E7=B4=A2= =E5=BC=95=E3=80=82 =E5=BD=93=E4=B8=80=E4=B8=AAhwirq=E8=A2=AB=E6=98=A0=E5=B0= =84 @@ -104,7 +103,6 @@ irq_domain_add_linear()=E5=92=8Cirq_domain_create_linea= r()=E5=9C=A8=E5=8A=9F=E8=83=BD=E4=B8=8A=E6=98=AF=E7=AD=89=E4=BB=B7=E7=9A=84= =EF=BC=8C =20 :: =20 - irq_domain_add_tree() irq_domain_create_tree() =20 irq_domain=E7=BB=B4=E6=8A=A4=E7=9D=80=E4=BB=8Ehwirq=E5=8F=B7=E5=88=B0Linux= IRQ=E7=9A=84radix=E7=9A=84=E6=A0=91=E7=8A=B6=E6=98=A0=E5=B0=84=E3=80=82 = =E5=BD=93=E4=B8=80=E4=B8=AAhwirq=E8=A2=AB=E6=98=A0=E5=B0=84=E6=97=B6=EF=BC= =8C @@ -138,8 +136,6 @@ Linux IRQ=E5=8F=B7=E7=BC=96=E5=85=A5=E7=A1=AC=E4=BB=B6= =E6=9C=AC=E8=BA=AB=EF=BC=8C=E8=BF=99=E6=A0=B7=E5=B0=B1=E4=B8=8D=E9=9C=80=E8= =A6=81=E6=98=A0=E5=B0=84=E4=BA=86=E3=80=82 =E8=B0=83=E7=94=A8irq_create =20 :: =20 - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy() =20 diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 984d0188f9ec..bd02550df6e6 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -338,12 +338,6 @@ struct irq_domain *irq_domain_create_simple(struct fwn= ode_handle *fwnode, unsigned int first_irq, const struct irq_domain_ops *ops, void *host_data); -struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, - unsigned int size, - unsigned int first_irq, - irq_hw_number_t first_hwirq, - const struct irq_domain_ops *ops, - void *host_data); struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode, unsigned int size, unsigned int first_irq, @@ -396,40 +390,6 @@ static inline struct irq_domain *irq_find_host(struct = device_node *node) return d; } =20 -static inline struct irq_domain *irq_domain_add_simple(struct device_node = *of_node, - unsigned int size, - unsigned int first_irq, - const struct irq_domain_ops *ops, - void *host_data) -{ - return irq_domain_create_simple(of_fwnode_handle(of_node), size, first_ir= q, ops, host_data); -} - -/** - * irq_domain_add_linear() - Allocate and register a linear revmap irq_dom= ain. - * @of_node: pointer to interrupt controller's device tree node. - * @size: Number of interrupts in the domain. - * @ops: map/unmap domain callbacks - * @host_data: Controller private data pointer - */ -static inline struct irq_domain *irq_domain_add_linear(struct device_node = *of_node, - unsigned int size, - const struct irq_domain_ops *ops, - void *host_data) -{ - struct irq_domain_info info =3D { - .fwnode =3D of_fwnode_handle(of_node), - .size =3D size, - .hwirq_max =3D size, - .ops =3D ops, - .host_data =3D host_data, - }; - struct irq_domain *d; - - d =3D irq_domain_instantiate(&info); - return IS_ERR(d) ? NULL : d; -} - #ifdef CONFIG_IRQ_DOMAIN_NOMAP static inline struct irq_domain *irq_domain_create_nomap(struct fwnode_han= dle *fwnode, unsigned int max_irq, @@ -452,22 +412,6 @@ static inline struct irq_domain *irq_domain_create_nom= ap(struct fwnode_handle *f unsigned int irq_create_direct_mapping(struct irq_domain *domain); #endif =20 -static inline struct irq_domain *irq_domain_add_tree(struct device_node *o= f_node, - const struct irq_domain_ops *ops, - void *host_data) -{ - struct irq_domain_info info =3D { - .fwnode =3D of_fwnode_handle(of_node), - .hwirq_max =3D ~0U, - .ops =3D ops, - .host_data =3D host_data, - }; - struct irq_domain *d; - - d =3D irq_domain_instantiate(&info); - return IS_ERR(d) ? NULL : d; -} - static inline struct irq_domain *irq_domain_create_linear(struct fwnode_ha= ndle *fwnode, unsigned int size, const struct irq_domain_ops *ops, @@ -631,18 +575,6 @@ static inline struct irq_domain *irq_domain_create_hie= rarchy(struct irq_domain * return IS_ERR(d) ? NULL : d; } =20 -static inline struct irq_domain *irq_domain_add_hierarchy(struct irq_domai= n *parent, - unsigned int flags, - unsigned int size, - struct device_node *node, - const struct irq_domain_ops *ops, - void *host_data) -{ - return irq_domain_create_hierarchy(parent, flags, size, - of_fwnode_handle(node), - ops, host_data); -} - int __irq_domain_alloc_irqs(struct irq_domain *domain, int irq_base, unsigned int nr_irqs, int node, void *arg, bool realloc, diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index b5e111776285..5bb3d2bbe229 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -480,33 +480,6 @@ struct irq_domain *irq_domain_create_simple(struct fwn= ode_handle *fwnode, } EXPORT_SYMBOL_GPL(irq_domain_create_simple); =20 -/** - * irq_domain_add_legacy() - Allocate and register a legacy revmap irq_dom= ain. - * @of_node: pointer to interrupt controller's device tree node. - * @size: total number of irqs in legacy mapping - * @first_irq: first number of irq block assigned to the domain - * @first_hwirq: first hwirq number to use for the translation. Should nor= mally - * be '0', but a positive integer can be used if the effecti= ve - * hwirqs numbering does not begin at zero. - * @ops: map/unmap domain callbacks - * @host_data: Controller private data pointer - * - * Note: the map() callback will be called before this function returns - * for all legacy interrupts except 0 (which is always the invalid irq for - * a legacy controller). - */ -struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, - unsigned int size, - unsigned int first_irq, - irq_hw_number_t first_hwirq, - const struct irq_domain_ops *ops, - void *host_data) -{ - return irq_domain_create_legacy(of_fwnode_handle(of_node), size, - first_irq, first_hwirq, ops, host_data); -} -EXPORT_SYMBOL_GPL(irq_domain_add_legacy); - struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode, unsigned int size, unsigned int first_irq, --=20 2.49.0