From patchwork Wed Mar 19 09:29:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 14022340 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 1582925522E; Wed, 19 Mar 2025 09:32:33 +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=1742376754; cv=none; b=ZgYJFpGkSKBnv6EvAhA0gW8nIBQsyKiCrk9SfIZ2/AU93MZoCmzhzE/OhHqr7vyM9kRiCSaeWU0pkTSdLyRvbNHCvxACNoBxcaD9ITysAds9knVE335iXa5o0ERrhohCnmvT5Te0MuZaSjanr0svdxMRM8Md+ccd65HzQYdzkCo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376754; c=relaxed/simple; bh=5Xh7etPCdWQRnh+9lDIdRBiCYs56zAWYuiuU1OYrZMk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lfVHa34zVQ6fuN5pHNzDIiksTa4jkYTUQQPpI/81ZLgt8gC3jiixRu72O4uxaKlJST1FY+H97VaWYqgo2Z8YcilasGJxJpY8Gk3JLAXPSnqkaudr99robr9BKvWqzgzwU4jOG46UYQ+ank6fy3JBRSjRBpHhqkbwCvLGeraDBcI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pM+oFrnm; 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="pM+oFrnm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEFACC4CEEF; Wed, 19 Mar 2025 09:32:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376753; bh=5Xh7etPCdWQRnh+9lDIdRBiCYs56zAWYuiuU1OYrZMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pM+oFrnm5vNszGzXPRsvJh2e4sgCNGnB65JPuUy7oFSjOG737Ai9D4FMHLKbctgYY 6ZyuUQ9aNVBoyrlidHfMC7vysupoHj4l/7Hpg1LfXSAcfWTFdbDlMyIpjtBW0E+Dzm YIIGaoIXG9aSU9GgEhReeRSp99odWhFjNKkSLHm2yt81ySbMiTebYG1H/pMkOQ+BL1 lRBJ0YAatNOLSJ5VE9jv5DIobc37rTtuVdezEy4RHZJZ3hrEa8vHkfdqetU+w98A4V 5YAD5CnraWc2BLMH3SdjU6ofLB5+WIYTA+dGXWtjbuwpIlLBNT9KKrlBVXca11gwtM LiqclYJ5buosQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org Subject: [PATCH v2 33/57] irqdomain: sh: Switch to irq_domain_create_*() Date: Wed, 19 Mar 2025 10:29:26 +0100 Message-ID: <20250319092951.37667-34-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-sh@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: linux-sh@vger.kernel.org --- arch/sh/boards/mach-se/7343/irq.c | 5 +++-- arch/sh/boards/mach-se/7722/irq.c | 2 +- arch/sh/boards/mach-x3proto/gpio.c | 2 +- drivers/sh/intc/irqdomain.c | 5 ++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/sh/boards/mach-se/7343/irq.c b/arch/sh/boards/mach-se/7343/irq.c index f9f3b14f70d5..8241bdedcc82 100644 --- a/arch/sh/boards/mach-se/7343/irq.c +++ b/arch/sh/boards/mach-se/7343/irq.c @@ -47,8 +47,9 @@ static void __init se7343_domain_init(void) { int i; - se7343_irq_domain = irq_domain_add_linear(NULL, SE7343_FPGA_IRQ_NR, - &irq_domain_simple_ops, NULL); + se7343_irq_domain = irq_domain_create_linear(NULL, SE7343_FPGA_IRQ_NR, + &irq_domain_simple_ops, + NULL); if (unlikely(!se7343_irq_domain)) { printk("Failed to get IRQ domain\n"); return; diff --git a/arch/sh/boards/mach-se/7722/irq.c b/arch/sh/boards/mach-se/7722/irq.c index efa96edd47dc..9a460a81907f 100644 --- a/arch/sh/boards/mach-se/7722/irq.c +++ b/arch/sh/boards/mach-se/7722/irq.c @@ -46,7 +46,7 @@ static void __init se7722_domain_init(void) { int i; - se7722_irq_domain = irq_domain_add_linear(NULL, SE7722_FPGA_IRQ_NR, + se7722_irq_domain = irq_domain_create_linear(NULL, SE7722_FPGA_IRQ_NR, &irq_domain_simple_ops, NULL); if (unlikely(!se7722_irq_domain)) { printk("Failed to get IRQ domain\n"); diff --git a/arch/sh/boards/mach-x3proto/gpio.c b/arch/sh/boards/mach-x3proto/gpio.c index f82d3a6a844a..c13d51b29702 100644 --- a/arch/sh/boards/mach-x3proto/gpio.c +++ b/arch/sh/boards/mach-x3proto/gpio.c @@ -108,7 +108,7 @@ int __init x3proto_gpio_setup(void) if (unlikely(ret)) goto err_gpio; - x3proto_irq_domain = irq_domain_add_linear(NULL, NR_BASEBOARD_GPIOS, + x3proto_irq_domain = irq_domain_create_linear(NULL, NR_BASEBOARD_GPIOS, &x3proto_gpio_irq_ops, NULL); if (unlikely(!x3proto_irq_domain)) goto err_irq; diff --git a/drivers/sh/intc/irqdomain.c b/drivers/sh/intc/irqdomain.c index 3968f1c3c5c3..ed7a570ffdf2 100644 --- a/drivers/sh/intc/irqdomain.c +++ b/drivers/sh/intc/irqdomain.c @@ -59,10 +59,9 @@ void __init intc_irq_domain_init(struct intc_desc_int *d, * tree penalty for linear cases with non-zero hwirq bases. */ if (irq_base == 0 && irq_end == (irq_base + hw->nr_vectors - 1)) - d->domain = irq_domain_add_linear(NULL, hw->nr_vectors, - &intc_evt_ops, NULL); + d->domain = irq_domain_create_linear(NULL, hw->nr_vectors, &intc_evt_ops, NULL); else - d->domain = irq_domain_add_tree(NULL, &intc_evt_ops, NULL); + d->domain = irq_domain_create_tree(NULL, &intc_evt_ops, NULL); BUG_ON(!d->domain); } From patchwork Wed Mar 19 09:29:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 14022341 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 C7FAF253F0D; Wed, 19 Mar 2025 09:32:57 +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=1742376777; cv=none; b=B1Ays9wpy3c85T2wnXDqUpRfd/SiAqrmIA76OlhD5/IjKaDPLla72PSS+PphhSDBC2Qm7LoTZOIZIhwlC1Webb0SN1e3OH0OZPQc+xICiMBZ1XbyRFiIvtzHbB3zBmRtsbvtcQ1klOF79BSMETggqNqkETI9e77DcxhGDU+grBw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376777; c=relaxed/simple; bh=gT6RvvOH9rE65zTzqqEWjqya5oBeXsEraVrUGC8winU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dJbFGuySBCerqYdV/jPjXm7/qC4fVZqY9TMzjEtYydGih/+5Z6QO7+/iLWzgDxH35q+O4TfQk+9oonqCXH3RZ+k8x5HoefdCDF4D4lvb/l+wlGQO59fKbmWnLcnAs0LAAYGnJNXSwK1whU53CoxfLb06KMc2FfcQ3YvMeunu+o4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=motJKL+7; 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="motJKL+7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D14DC4CEE9; Wed, 19 Mar 2025 09:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376777; bh=gT6RvvOH9rE65zTzqqEWjqya5oBeXsEraVrUGC8winU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=motJKL+7zOVGILPaWf+2KVIoWmMkzDTQR/ZLR1tVo+xmAhkqOxIP64q8ld3xayxK8 OAm4LsCiBs1TYIB72dm0TRr2xhMPAd2GTzhEOmGQD6W8AjLt3tJNEC6B18xRh3rgy/ 0jwOPhJYphYQ9D1NAXIoFtXwgwr+Sxc7Vh+SyGxImmdcHlk4Z8HENT9i/N+HvmBRAX rF6q2473FYGG4fOoTRfLrXvvgRKBdGJwvcmZl7jJCmxZeOwbJQKtyniu9TfHlZ2H7L uWUvGJ1VTKjcYjMSr3Vj52O/hFZ0lDPfQw0rk6RYYBfvx5FmNDQomAb73swnh9og65 eEKPSMjRMX5MQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org Subject: [PATCH v2 42/57] irqdomain: sh: Switch to irq_find_mapping() Date: Wed, 19 Mar 2025 10:29:35 +0100 Message-ID: <20250319092951.37667-43-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-sh@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). Signed-off-by: Jiri Slaby (SUSE) Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: linux-sh@vger.kernel.org --- arch/sh/boards/mach-se/7343/irq.c | 2 +- arch/sh/boards/mach-se/7722/irq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sh/boards/mach-se/7343/irq.c b/arch/sh/boards/mach-se/7343/irq.c index 8241bdedcc82..730c01b225bd 100644 --- a/arch/sh/boards/mach-se/7343/irq.c +++ b/arch/sh/boards/mach-se/7343/irq.c @@ -71,7 +71,7 @@ static void __init se7343_gc_init(void) struct irq_chip_type *ct; unsigned int irq_base; - irq_base = irq_linear_revmap(se7343_irq_domain, 0); + irq_base = irq_find_mapping(se7343_irq_domain, 0); gc = irq_alloc_generic_chip(DRV_NAME, 1, irq_base, se7343_irq_regs, handle_level_irq); diff --git a/arch/sh/boards/mach-se/7722/irq.c b/arch/sh/boards/mach-se/7722/irq.c index 9a460a81907f..49aa3a2b1b8f 100644 --- a/arch/sh/boards/mach-se/7722/irq.c +++ b/arch/sh/boards/mach-se/7722/irq.c @@ -69,7 +69,7 @@ static void __init se7722_gc_init(void) struct irq_chip_type *ct; unsigned int irq_base; - irq_base = irq_linear_revmap(se7722_irq_domain, 0); + irq_base = irq_find_mapping(se7722_irq_domain, 0); gc = irq_alloc_generic_chip(DRV_NAME, 1, irq_base, se7722_irq_regs, handle_level_irq);