irqdomain: Cleanups and Documentation
Subsystems (144)
PATCH v2 27/57 irqdomain: net: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)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).
--- drivers/net/dsa/microchip/ksz_common.c | 5 +++-- drivers/net/dsa/microchip/ksz_ptp.c | 4 ++-- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/mv88e6xxx/global2.c | 6 ++++-- drivers/net/dsa/qca/ar9331.c | 4 ++-- drivers/net/dsa/realtek/rtl8365mb.c | 4 ++-- drivers/net/dsa/realtek/rtl8366rb.c | 6 ++---- drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c | 6 ++++-- drivers/net/usb/lan78xx.c | 9 ++++----- 9 files changed, 24 insertions(+), 22 deletions(-)
drivers/net/dsa/microchip/ksz_common.c +3 -2
@@ -2697,8 +2697,9 @@ static int ksz_irq_common_setup(struct ksz_device *dev, struct ksz_irq *kirq) kirq->dev = dev; kirq->masked = ~0 ; - kirq->domain =irq_domain_add_simple (dev->dev->of_node, kirq->nirqs,0 , - &ksz_irq_domain_ops, kirq); + kirq->domain =irq_domain_create_simple (of_fwnode_handle (dev->dev->of_node), + kirq->nirqs,0 , + &ksz_irq_domain_ops, kirq);if (!kirq->domain)return -ENOMEM ;
drivers/net/dsa/microchip/ksz_ptp.c +2 -2
@@ -1136,8 +1136,8 @@ int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p)init_completion (&port->tstamp_msg_comp); - ptpirq->domain =irq_domain_add_linear (dev->dev->of_node, ptpirq->nirqs, - &ksz_ptp_irq_domain_ops, ptpirq); + ptpirq->domain =irq_domain_create_linear (of_fwnode_handle (dev->dev->of_node), + ptpirq->nirqs, &ksz_ptp_irq_domain_ops, ptpirq);if (!ptpirq->domain)return -ENOMEM ;
drivers/net/dsa/mv88e6xxx/chip.c +1 -1
@@ -297,7 +297,7 @@ static int mv88e6xxx_g1_irq_setup_common(struct mv88e6xxx_chip *chip)u16 reg, mask; chip->g1_irq.nirqs = chip->info->g1_irqs; - chip->g1_irq.domain =irq_domain_add_simple ( + chip->g1_irq.domain =irq_domain_create_simple (NULL , chip->g1_irq.nirqs,0 , &mv88e6xxx_g1_irq_domain_ops, chip);if (!chip->g1_irq.domain)
drivers/net/dsa/mv88e6xxx/global2.c +4 -2
@@ -1154,8 +1154,10 @@ int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)if (err)return err; - chip->g2_irq.domain =irq_domain_add_simple ( - chip->dev->of_node,16 ,0 , &mv88e6xxx_g2_irq_domain_ops, chip); + chip->g2_irq.domain =irq_domain_create_simple (of_fwnode_handle (chip->dev->of_node), +16 ,0 , + &mv88e6xxx_g2_irq_domain_ops, + chip);if (!chip->g2_irq.domain)return -ENOMEM ;
drivers/net/dsa/qca/ar9331.c +2 -2
@@ -821,8 +821,8 @@ static int ar9331_sw_irq_init(struct ar9331_sw_priv *priv)return ret; } - priv->irqdomain =irq_domain_add_linear (np,1 , &ar9331_sw_irqdomain_ops, - priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (np),1 , + &ar9331_sw_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (dev,"failed to create IRQ domain\n" );return -EINVAL ;
drivers/net/dsa/realtek/rtl8365mb.c +2 -2
@@ -1719,8 +1719,8 @@ static int rtl8365mb_irq_setup(struct realtek_priv *priv) goto out_put_node; } - priv->irqdomain =irq_domain_add_linear (intc, priv->num_ports, - &rtl8365mb_irqdomain_ops, priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc), priv->num_ports, + &rtl8365mb_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (priv->dev,"failed to add irq domain\n" ); ret = -ENOMEM ;
drivers/net/dsa/realtek/rtl8366rb.c +2 -4
@@ -550,10 +550,8 @@ static int rtl8366rb_setup_cascaded_irq(struct realtek_priv *priv)dev_err (priv->dev,"unable to request irq: %d\n" , ret); goto out_put_node; } - priv->irqdomain =irq_domain_add_linear (intc, -RTL8366RB_NUM_INTERRUPT , - &rtl8366rb_irqdomain_ops, - priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc),RTL8366RB_NUM_INTERRUPT , + &rtl8366rb_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (priv->dev,"failed to create IRQ domain\n" ); ret = -EINVAL ;
drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c +4 -2
@@ -184,8 +184,10 @@ int txgbe_setup_misc_irq(struct txgbe *txgbe) goto skip_sp_irq; txgbe->misc.nirqs =1 ; - txgbe->misc.domain =irq_domain_add_simple (NULL , txgbe->misc.nirqs,0 , - &txgbe_misc_irq_domain_ops, txgbe); + txgbe->misc.domain =irq_domain_create_simple (NULL , txgbe->misc.nirqs, +0 , + &txgbe_misc_irq_domain_ops, + txgbe);if (!txgbe->misc.domain)return -ENOMEM ;
drivers/net/usb/lan78xx.c +4 -5
@@ -2456,14 +2456,11 @@ static struct irq_chip lan78xx_irqchip = {static int lan78xx_setup_irq_domain (struct lan78xx_net *dev) { -struct device_node *of_node;struct irq_domain *irqdomain;unsigned int irqmap =0 ;u32 buf;int ret =0 ; - of_node = dev->udev->dev.parent->of_node; -mutex_init (&dev->domain_data.irq_lock); ret =lan78xx_read_reg (dev,INT_EP_CTL , &buf);
@@ -2475,8 +2472,10 @@ static int lan78xx_setup_irq_domain(struct lan78xx_net *dev) dev->domain_data.irqchip = &lan78xx_irqchip; dev->domain_data.irq_handler = handle_simple_irq; - irqdomain =irq_domain_add_simple (of_node,MAX_INT_EP ,0 , - &chip_domain_ops, &dev->domain_data); + irqdomain =irq_domain_create_simple (of_fwnode_handle (dev->udev->dev.parent->of_node), +MAX_INT_EP ,0 , + &chip_domain_ops, + &dev->domain_data);if (irqdomain) {/* create mapping for PHY interrupt */ irqmap =irq_create_mapping (irqdomain,INT_EP_PHY );
Signature · 1 line
2.49.0
[tip: irq/cleanups] net: Switch to irq_domain_create_*()
The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 567b0a520912fc0f5fd036dca5daa0922b4c9697 Gitweb: https://git.kernel.org/tip/567b0a520912fc0f5fd036dca5daa0922b4c9697 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:20 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:06 +02:00
net: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/net/dsa/microchip/ksz_common.c | 5 +++-- drivers/net/dsa/microchip/ksz_ptp.c | 4 ++-- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/mv88e6xxx/global2.c | 6 ++++-- drivers/net/dsa/qca/ar9331.c | 4 ++-- drivers/net/dsa/realtek/rtl8365mb.c | 4 ++-- drivers/net/dsa/realtek/rtl8366rb.c | 6 ++---- drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c | 4 ++-- drivers/net/usb/lan78xx.c | 9 ++++----- 9 files changed, 22 insertions(+), 22 deletions(-)
drivers/net/dsa/microchip/ksz_common.c +3 -2
@@ -2697,8 +2697,9 @@ static int ksz_irq_common_setup(struct ksz_device *dev, struct ksz_irq *kirq) kirq->dev = dev; kirq->masked = ~0 ; - kirq->domain =irq_domain_add_simple (dev->dev->of_node, kirq->nirqs,0 , - &ksz_irq_domain_ops, kirq); + kirq->domain =irq_domain_create_simple (of_fwnode_handle (dev->dev->of_node), + kirq->nirqs,0 , + &ksz_irq_domain_ops, kirq);if (!kirq->domain)return -ENOMEM ;
drivers/net/dsa/microchip/ksz_ptp.c +2 -2
@@ -1136,8 +1136,8 @@ int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p)init_completion (&port->tstamp_msg_comp); - ptpirq->domain =irq_domain_add_linear (dev->dev->of_node, ptpirq->nirqs, - &ksz_ptp_irq_domain_ops, ptpirq); + ptpirq->domain =irq_domain_create_linear (of_fwnode_handle (dev->dev->of_node), + ptpirq->nirqs, &ksz_ptp_irq_domain_ops, ptpirq);if (!ptpirq->domain)return -ENOMEM ;
drivers/net/dsa/mv88e6xxx/chip.c +1 -1
@@ -297,7 +297,7 @@ static int mv88e6xxx_g1_irq_setup_common(struct mv88e6xxx_chip *chip)u16 reg, mask; chip->g1_irq.nirqs = chip->info->g1_irqs; - chip->g1_irq.domain =irq_domain_add_simple ( + chip->g1_irq.domain =irq_domain_create_simple (NULL , chip->g1_irq.nirqs,0 , &mv88e6xxx_g1_irq_domain_ops, chip);if (!chip->g1_irq.domain)
drivers/net/dsa/mv88e6xxx/global2.c +4 -2
@@ -1154,8 +1154,10 @@ int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)if (err)return err; - chip->g2_irq.domain =irq_domain_add_simple ( - chip->dev->of_node,16 ,0 , &mv88e6xxx_g2_irq_domain_ops, chip); + chip->g2_irq.domain =irq_domain_create_simple (of_fwnode_handle (chip->dev->of_node), +16 ,0 , + &mv88e6xxx_g2_irq_domain_ops, + chip);if (!chip->g2_irq.domain)return -ENOMEM ;
drivers/net/dsa/qca/ar9331.c +2 -2
@@ -821,8 +821,8 @@ static int ar9331_sw_irq_init(struct ar9331_sw_priv *priv)return ret; } - priv->irqdomain =irq_domain_add_linear (np,1 , &ar9331_sw_irqdomain_ops, - priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (np),1 , + &ar9331_sw_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (dev,"failed to create IRQ domain\n" );return -EINVAL ;
drivers/net/dsa/realtek/rtl8365mb.c +2 -2
@@ -1719,8 +1719,8 @@ static int rtl8365mb_irq_setup(struct realtek_priv *priv) goto out_put_node; } - priv->irqdomain =irq_domain_add_linear (intc, priv->num_ports, - &rtl8365mb_irqdomain_ops, priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc), priv->num_ports, + &rtl8365mb_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (priv->dev,"failed to add irq domain\n" ); ret = -ENOMEM ;
drivers/net/dsa/realtek/rtl8366rb.c +2 -4
@@ -550,10 +550,8 @@ static int rtl8366rb_setup_cascaded_irq(struct realtek_priv *priv)dev_err (priv->dev,"unable to request irq: %d\n" , ret); goto out_put_node; } - priv->irqdomain =irq_domain_add_linear (intc, -RTL8366RB_NUM_INTERRUPT , - &rtl8366rb_irqdomain_ops, - priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc),RTL8366RB_NUM_INTERRUPT , + &rtl8366rb_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (priv->dev,"failed to create IRQ domain\n" ); ret = -EINVAL ;
drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c +2 -2
@@ -184,8 +184,8 @@ int txgbe_setup_misc_irq(struct txgbe *txgbe) goto skip_sp_irq; txgbe->misc.nirqs =1 ; - txgbe->misc.domain =irq_domain_add_simple (NULL , txgbe->misc.nirqs,0 , - &txgbe_misc_irq_domain_ops, txgbe); + txgbe->misc.domain =irq_domain_create_simple (NULL , txgbe->misc.nirqs,0 , + &txgbe_misc_irq_domain_ops, txgbe);if (!txgbe->misc.domain)return -ENOMEM ;
drivers/net/usb/lan78xx.c +4 -5
@@ -2456,14 +2456,11 @@ static struct irq_chip lan78xx_irqchip = {static int lan78xx_setup_irq_domain (struct lan78xx_net *dev) { -struct device_node *of_node;struct irq_domain *irqdomain;unsigned int irqmap =0 ;u32 buf;int ret =0 ; - of_node = dev->udev->dev.parent->of_node; -mutex_init (&dev->domain_data.irq_lock); ret =lan78xx_read_reg (dev,INT_EP_CTL , &buf);
@@ -2475,8 +2472,10 @@ static int lan78xx_setup_irq_domain(struct lan78xx_net *dev) dev->domain_data.irqchip = &lan78xx_irqchip; dev->domain_data.irq_handler = handle_simple_irq; - irqdomain =irq_domain_add_simple (of_node,MAX_INT_EP ,0 , - &chip_domain_ops, &dev->domain_data); + irqdomain =irq_domain_create_simple (of_fwnode_handle (dev->udev->dev.parent->of_node), +MAX_INT_EP ,0 , + &chip_domain_ops, + &dev->domain_data);if (irqdomain) {/* create mapping for PHY interrupt */ irqmap =irq_create_mapping (irqdomain,INT_EP_PHY );
[tip: irq/cleanups] net: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 2f6ad9068689fcbe3c9b34549af76091cbf85da6 Gitweb: https://git.kernel.org/tip/2f6ad9068689fcbe3c9b34549af76091cbf85da6 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:20 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:23 +02:00
net: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/net/dsa/microchip/ksz_common.c | 5 +++-- drivers/net/dsa/microchip/ksz_ptp.c | 4 ++-- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/mv88e6xxx/global2.c | 6 ++++-- drivers/net/dsa/qca/ar9331.c | 4 ++-- drivers/net/dsa/realtek/rtl8365mb.c | 4 ++-- drivers/net/dsa/realtek/rtl8366rb.c | 6 ++---- drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c | 4 ++-- drivers/net/usb/lan78xx.c | 9 ++++----- 9 files changed, 22 insertions(+), 22 deletions(-)
drivers/net/dsa/microchip/ksz_common.c +3 -2
@@ -2697,8 +2697,9 @@ static int ksz_irq_common_setup(struct ksz_device *dev, struct ksz_irq *kirq) kirq->dev = dev; kirq->masked = ~0 ; - kirq->domain =irq_domain_add_simple (dev->dev->of_node, kirq->nirqs,0 , - &ksz_irq_domain_ops, kirq); + kirq->domain =irq_domain_create_simple (of_fwnode_handle (dev->dev->of_node), + kirq->nirqs,0 , + &ksz_irq_domain_ops, kirq);if (!kirq->domain)return -ENOMEM ;
drivers/net/dsa/microchip/ksz_ptp.c +2 -2
@@ -1136,8 +1136,8 @@ int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p)init_completion (&port->tstamp_msg_comp); - ptpirq->domain =irq_domain_add_linear (dev->dev->of_node, ptpirq->nirqs, - &ksz_ptp_irq_domain_ops, ptpirq); + ptpirq->domain =irq_domain_create_linear (of_fwnode_handle (dev->dev->of_node), + ptpirq->nirqs, &ksz_ptp_irq_domain_ops, ptpirq);if (!ptpirq->domain)return -ENOMEM ;
drivers/net/dsa/mv88e6xxx/chip.c +1 -1
@@ -297,7 +297,7 @@ static int mv88e6xxx_g1_irq_setup_common(struct mv88e6xxx_chip *chip)u16 reg, mask; chip->g1_irq.nirqs = chip->info->g1_irqs; - chip->g1_irq.domain =irq_domain_add_simple ( + chip->g1_irq.domain =irq_domain_create_simple (NULL , chip->g1_irq.nirqs,0 , &mv88e6xxx_g1_irq_domain_ops, chip);if (!chip->g1_irq.domain)
drivers/net/dsa/mv88e6xxx/global2.c +4 -2
@@ -1154,8 +1154,10 @@ int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)if (err)return err; - chip->g2_irq.domain =irq_domain_add_simple ( - chip->dev->of_node,16 ,0 , &mv88e6xxx_g2_irq_domain_ops, chip); + chip->g2_irq.domain =irq_domain_create_simple (of_fwnode_handle (chip->dev->of_node), +16 ,0 , + &mv88e6xxx_g2_irq_domain_ops, + chip);if (!chip->g2_irq.domain)return -ENOMEM ;
drivers/net/dsa/qca/ar9331.c +2 -2
@@ -821,8 +821,8 @@ static int ar9331_sw_irq_init(struct ar9331_sw_priv *priv)return ret; } - priv->irqdomain =irq_domain_add_linear (np,1 , &ar9331_sw_irqdomain_ops, - priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (np),1 , + &ar9331_sw_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (dev,"failed to create IRQ domain\n" );return -EINVAL ;
drivers/net/dsa/realtek/rtl8365mb.c +2 -2
@@ -1719,8 +1719,8 @@ static int rtl8365mb_irq_setup(struct realtek_priv *priv) goto out_put_node; } - priv->irqdomain =irq_domain_add_linear (intc, priv->num_ports, - &rtl8365mb_irqdomain_ops, priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc), priv->num_ports, + &rtl8365mb_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (priv->dev,"failed to add irq domain\n" ); ret = -ENOMEM ;
drivers/net/dsa/realtek/rtl8366rb.c +2 -4
@@ -550,10 +550,8 @@ static int rtl8366rb_setup_cascaded_irq(struct realtek_priv *priv)dev_err (priv->dev,"unable to request irq: %d\n" , ret); goto out_put_node; } - priv->irqdomain =irq_domain_add_linear (intc, -RTL8366RB_NUM_INTERRUPT , - &rtl8366rb_irqdomain_ops, - priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc),RTL8366RB_NUM_INTERRUPT , + &rtl8366rb_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (priv->dev,"failed to create IRQ domain\n" ); ret = -EINVAL ;
drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c +2 -2
@@ -184,8 +184,8 @@ int txgbe_setup_misc_irq(struct txgbe *txgbe) goto skip_sp_irq; txgbe->misc.nirqs =1 ; - txgbe->misc.domain =irq_domain_add_simple (NULL , txgbe->misc.nirqs,0 , - &txgbe_misc_irq_domain_ops, txgbe); + txgbe->misc.domain =irq_domain_create_simple (NULL , txgbe->misc.nirqs,0 , + &txgbe_misc_irq_domain_ops, txgbe);if (!txgbe->misc.domain)return -ENOMEM ;
drivers/net/usb/lan78xx.c +4 -5
@@ -2456,14 +2456,11 @@ static struct irq_chip lan78xx_irqchip = {static int lan78xx_setup_irq_domain (struct lan78xx_net *dev) { -struct device_node *of_node;struct irq_domain *irqdomain;unsigned int irqmap =0 ;u32 buf;int ret =0 ; - of_node = dev->udev->dev.parent->of_node; -mutex_init (&dev->domain_data.irq_lock); ret =lan78xx_read_reg (dev,INT_EP_CTL , &buf);
@@ -2475,8 +2472,10 @@ static int lan78xx_setup_irq_domain(struct lan78xx_net *dev) dev->domain_data.irqchip = &lan78xx_irqchip; dev->domain_data.irq_handler = handle_simple_irq; - irqdomain =irq_domain_add_simple (of_node,MAX_INT_EP ,0 , - &chip_domain_ops, &dev->domain_data); + irqdomain =irq_domain_create_simple (of_fwnode_handle (dev->udev->dev.parent->of_node), +MAX_INT_EP ,0 , + &chip_domain_ops, + &dev->domain_data);if (irqdomain) {/* create mapping for PHY interrupt */ irqmap =irq_create_mapping (irqdomain,INT_EP_PHY );
[tip: irq/cleanups] net: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 7803d23934b57bb24ef11f952be62348b70b4b88 Gitweb: https://git.kernel.org/tip/7803d23934b57bb24ef11f952be62348b70b4b88 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:20 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:39 +02:00
net: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/net/dsa/microchip/ksz_common.c | 5 +++-- drivers/net/dsa/microchip/ksz_ptp.c | 4 ++-- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/mv88e6xxx/global2.c | 6 ++++-- drivers/net/dsa/qca/ar9331.c | 4 ++-- drivers/net/dsa/realtek/rtl8365mb.c | 4 ++-- drivers/net/dsa/realtek/rtl8366rb.c | 6 ++---- drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c | 4 ++-- drivers/net/usb/lan78xx.c | 9 ++++----- 9 files changed, 22 insertions(+), 22 deletions(-)
drivers/net/dsa/microchip/ksz_common.c +3 -2
@@ -2697,8 +2697,9 @@ static int ksz_irq_common_setup(struct ksz_device *dev, struct ksz_irq *kirq) kirq->dev = dev; kirq->masked = ~0 ; - kirq->domain =irq_domain_add_simple (dev->dev->of_node, kirq->nirqs,0 , - &ksz_irq_domain_ops, kirq); + kirq->domain =irq_domain_create_simple (of_fwnode_handle (dev->dev->of_node), + kirq->nirqs,0 , + &ksz_irq_domain_ops, kirq);if (!kirq->domain)return -ENOMEM ;
drivers/net/dsa/microchip/ksz_ptp.c +2 -2
@@ -1136,8 +1136,8 @@ int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p)init_completion (&port->tstamp_msg_comp); - ptpirq->domain =irq_domain_add_linear (dev->dev->of_node, ptpirq->nirqs, - &ksz_ptp_irq_domain_ops, ptpirq); + ptpirq->domain =irq_domain_create_linear (of_fwnode_handle (dev->dev->of_node), + ptpirq->nirqs, &ksz_ptp_irq_domain_ops, ptpirq);if (!ptpirq->domain)return -ENOMEM ;
drivers/net/dsa/mv88e6xxx/chip.c +1 -1
@@ -297,7 +297,7 @@ static int mv88e6xxx_g1_irq_setup_common(struct mv88e6xxx_chip *chip)u16 reg, mask; chip->g1_irq.nirqs = chip->info->g1_irqs; - chip->g1_irq.domain =irq_domain_add_simple ( + chip->g1_irq.domain =irq_domain_create_simple (NULL , chip->g1_irq.nirqs,0 , &mv88e6xxx_g1_irq_domain_ops, chip);if (!chip->g1_irq.domain)
drivers/net/dsa/mv88e6xxx/global2.c +4 -2
@@ -1154,8 +1154,10 @@ int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)if (err)return err; - chip->g2_irq.domain =irq_domain_add_simple ( - chip->dev->of_node,16 ,0 , &mv88e6xxx_g2_irq_domain_ops, chip); + chip->g2_irq.domain =irq_domain_create_simple (of_fwnode_handle (chip->dev->of_node), +16 ,0 , + &mv88e6xxx_g2_irq_domain_ops, + chip);if (!chip->g2_irq.domain)return -ENOMEM ;
drivers/net/dsa/qca/ar9331.c +2 -2
@@ -821,8 +821,8 @@ static int ar9331_sw_irq_init(struct ar9331_sw_priv *priv)return ret; } - priv->irqdomain =irq_domain_add_linear (np,1 , &ar9331_sw_irqdomain_ops, - priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (np),1 , + &ar9331_sw_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (dev,"failed to create IRQ domain\n" );return -EINVAL ;
drivers/net/dsa/realtek/rtl8365mb.c +2 -2
@@ -1719,8 +1719,8 @@ static int rtl8365mb_irq_setup(struct realtek_priv *priv) goto out_put_node; } - priv->irqdomain =irq_domain_add_linear (intc, priv->num_ports, - &rtl8365mb_irqdomain_ops, priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc), priv->num_ports, + &rtl8365mb_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (priv->dev,"failed to add irq domain\n" ); ret = -ENOMEM ;
drivers/net/dsa/realtek/rtl8366rb.c +2 -4
@@ -550,10 +550,8 @@ static int rtl8366rb_setup_cascaded_irq(struct realtek_priv *priv)dev_err (priv->dev,"unable to request irq: %d\n" , ret); goto out_put_node; } - priv->irqdomain =irq_domain_add_linear (intc, -RTL8366RB_NUM_INTERRUPT , - &rtl8366rb_irqdomain_ops, - priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc),RTL8366RB_NUM_INTERRUPT , + &rtl8366rb_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (priv->dev,"failed to create IRQ domain\n" ); ret = -EINVAL ;
drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c +2 -2
@@ -184,8 +184,8 @@ int txgbe_setup_misc_irq(struct txgbe *txgbe) goto skip_sp_irq; txgbe->misc.nirqs =1 ; - txgbe->misc.domain =irq_domain_add_simple (NULL , txgbe->misc.nirqs,0 , - &txgbe_misc_irq_domain_ops, txgbe); + txgbe->misc.domain =irq_domain_create_simple (NULL , txgbe->misc.nirqs,0 , + &txgbe_misc_irq_domain_ops, txgbe);if (!txgbe->misc.domain)return -ENOMEM ;
drivers/net/usb/lan78xx.c +4 -5
@@ -2456,14 +2456,11 @@ static struct irq_chip lan78xx_irqchip = {static int lan78xx_setup_irq_domain (struct lan78xx_net *dev) { -struct device_node *of_node;struct irq_domain *irqdomain;unsigned int irqmap =0 ;u32 buf;int ret =0 ; - of_node = dev->udev->dev.parent->of_node; -mutex_init (&dev->domain_data.irq_lock); ret =lan78xx_read_reg (dev,INT_EP_CTL , &buf);
@@ -2475,8 +2472,10 @@ static int lan78xx_setup_irq_domain(struct lan78xx_net *dev) dev->domain_data.irqchip = &lan78xx_irqchip; dev->domain_data.irq_handler = handle_simple_irq; - irqdomain =irq_domain_add_simple (of_node,MAX_INT_EP ,0 , - &chip_domain_ops, &dev->domain_data); + irqdomain =irq_domain_create_simple (of_fwnode_handle (dev->udev->dev.parent->of_node), +MAX_INT_EP ,0 , + &chip_domain_ops, + &dev->domain_data);if (irqdomain) {/* create mapping for PHY interrupt */ irqmap =irq_create_mapping (irqdomain,INT_EP_PHY );
[tip: irq/cleanups] net: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: e0c27a82c27f7aef5db530da98f390b73d71b1e8 Gitweb: https://git.kernel.org/tip/e0c27a82c27f7aef5db530da98f390b73d71b1e8 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:20 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Fri, 16 May 2025 21:06:10 +02:00
net: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/net/dsa/microchip/ksz_common.c | 5 +++-- drivers/net/dsa/microchip/ksz_ptp.c | 4 ++-- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/mv88e6xxx/global2.c | 6 ++++-- drivers/net/dsa/qca/ar9331.c | 4 ++-- drivers/net/dsa/realtek/rtl8365mb.c | 4 ++-- drivers/net/dsa/realtek/rtl8366rb.c | 6 ++---- drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c | 4 ++-- drivers/net/usb/lan78xx.c | 9 ++++----- 9 files changed, 22 insertions(+), 22 deletions(-)
drivers/net/dsa/microchip/ksz_common.c +3 -2
@@ -2697,8 +2697,9 @@ static int ksz_irq_common_setup(struct ksz_device *dev, struct ksz_irq *kirq) kirq->dev = dev; kirq->masked = ~0 ; - kirq->domain =irq_domain_add_simple (dev->dev->of_node, kirq->nirqs,0 , - &ksz_irq_domain_ops, kirq); + kirq->domain =irq_domain_create_simple (of_fwnode_handle (dev->dev->of_node), + kirq->nirqs,0 , + &ksz_irq_domain_ops, kirq);if (!kirq->domain)return -ENOMEM ;
drivers/net/dsa/microchip/ksz_ptp.c +2 -2
@@ -1136,8 +1136,8 @@ int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p)init_completion (&port->tstamp_msg_comp); - ptpirq->domain =irq_domain_add_linear (dev->dev->of_node, ptpirq->nirqs, - &ksz_ptp_irq_domain_ops, ptpirq); + ptpirq->domain =irq_domain_create_linear (of_fwnode_handle (dev->dev->of_node), + ptpirq->nirqs, &ksz_ptp_irq_domain_ops, ptpirq);if (!ptpirq->domain)return -ENOMEM ;
drivers/net/dsa/mv88e6xxx/chip.c +1 -1
@@ -297,7 +297,7 @@ static int mv88e6xxx_g1_irq_setup_common(struct mv88e6xxx_chip *chip)u16 reg, mask; chip->g1_irq.nirqs = chip->info->g1_irqs; - chip->g1_irq.domain =irq_domain_add_simple ( + chip->g1_irq.domain =irq_domain_create_simple (NULL , chip->g1_irq.nirqs,0 , &mv88e6xxx_g1_irq_domain_ops, chip);if (!chip->g1_irq.domain)
drivers/net/dsa/mv88e6xxx/global2.c +4 -2
@@ -1154,8 +1154,10 @@ int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)if (err)return err; - chip->g2_irq.domain =irq_domain_add_simple ( - chip->dev->of_node,16 ,0 , &mv88e6xxx_g2_irq_domain_ops, chip); + chip->g2_irq.domain =irq_domain_create_simple (of_fwnode_handle (chip->dev->of_node), +16 ,0 , + &mv88e6xxx_g2_irq_domain_ops, + chip);if (!chip->g2_irq.domain)return -ENOMEM ;
drivers/net/dsa/qca/ar9331.c +2 -2
@@ -821,8 +821,8 @@ static int ar9331_sw_irq_init(struct ar9331_sw_priv *priv)return ret; } - priv->irqdomain =irq_domain_add_linear (np,1 , &ar9331_sw_irqdomain_ops, - priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (np),1 , + &ar9331_sw_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (dev,"failed to create IRQ domain\n" );return -EINVAL ;
drivers/net/dsa/realtek/rtl8365mb.c +2 -2
@@ -1719,8 +1719,8 @@ static int rtl8365mb_irq_setup(struct realtek_priv *priv) goto out_put_node; } - priv->irqdomain =irq_domain_add_linear (intc, priv->num_ports, - &rtl8365mb_irqdomain_ops, priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc), priv->num_ports, + &rtl8365mb_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (priv->dev,"failed to add irq domain\n" ); ret = -ENOMEM ;
drivers/net/dsa/realtek/rtl8366rb.c +2 -4
@@ -550,10 +550,8 @@ static int rtl8366rb_setup_cascaded_irq(struct realtek_priv *priv)dev_err (priv->dev,"unable to request irq: %d\n" , ret); goto out_put_node; } - priv->irqdomain =irq_domain_add_linear (intc, -RTL8366RB_NUM_INTERRUPT , - &rtl8366rb_irqdomain_ops, - priv); + priv->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc),RTL8366RB_NUM_INTERRUPT , + &rtl8366rb_irqdomain_ops, priv);if (!priv->irqdomain) {dev_err (priv->dev,"failed to create IRQ domain\n" ); ret = -EINVAL ;
drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c +2 -2
@@ -184,8 +184,8 @@ int txgbe_setup_misc_irq(struct txgbe *txgbe) goto skip_sp_irq; txgbe->misc.nirqs =1 ; - txgbe->misc.domain =irq_domain_add_simple (NULL , txgbe->misc.nirqs,0 , - &txgbe_misc_irq_domain_ops, txgbe); + txgbe->misc.domain =irq_domain_create_simple (NULL , txgbe->misc.nirqs,0 , + &txgbe_misc_irq_domain_ops, txgbe);if (!txgbe->misc.domain)return -ENOMEM ;
drivers/net/usb/lan78xx.c +4 -5
@@ -2456,14 +2456,11 @@ static struct irq_chip lan78xx_irqchip = {static int lan78xx_setup_irq_domain (struct lan78xx_net *dev) { -struct device_node *of_node;struct irq_domain *irqdomain;unsigned int irqmap =0 ;u32 buf;int ret =0 ; - of_node = dev->udev->dev.parent->of_node; -mutex_init (&dev->domain_data.irq_lock); ret =lan78xx_read_reg (dev,INT_EP_CTL , &buf);
@@ -2475,8 +2472,10 @@ static int lan78xx_setup_irq_domain(struct lan78xx_net *dev) dev->domain_data.irqchip = &lan78xx_irqchip; dev->domain_data.irq_handler = handle_simple_irq; - irqdomain =irq_domain_add_simple (of_node,MAX_INT_EP ,0 , - &chip_domain_ops, &dev->domain_data); + irqdomain =irq_domain_create_simple (of_fwnode_handle (dev->udev->dev.parent->of_node), +MAX_INT_EP ,0 , + &chip_domain_ops, + &dev->domain_data);if (irqdomain) {/* create mapping for PHY interrupt */ irqmap =irq_create_mapping (irqdomain,INT_EP_PHY );
PATCH v2 28/57 irqdomain: nios2: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
--- arch/nios2/kernel/irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/nios2/kernel/irq.c +2 -1
@@ -69,7 +69,8 @@ void __init init_IRQ(void)BUG_ON (!node); - domain =irq_domain_add_linear (node,NIOS2_CPU_NR_IRQS , &irq_ops,NULL ); + domain =irq_domain_create_linear (of_fwnode_handle (node), +NIOS2_CPU_NR_IRQS , &irq_ops,NULL );BUG_ON (!domain);irq_set_default_domain (domain);
Signature · 1 line
2.49.0
[tip: irq/cleanups] nios2: Switch to irq_domain_create_linear()
The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: dd16951ab4ab3ac265ca2d18d2aa0694dad453ec Gitweb: https://git.kernel.org/tip/dd16951ab4ab3ac265ca2d18d2aa0694dad453ec Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:21 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:06 +02:00
nios2: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
--- arch/nios2/kernel/irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/nios2/kernel/irq.c +2 -1
@@ -69,7 +69,8 @@ void __init init_IRQ(void)BUG_ON (!node); - domain =irq_domain_add_linear (node,NIOS2_CPU_NR_IRQS , &irq_ops,NULL ); + domain =irq_domain_create_linear (of_fwnode_handle (node), +NIOS2_CPU_NR_IRQS , &irq_ops,NULL );BUG_ON (!domain);irq_set_default_domain (domain);
[tip: irq/cleanups] nios2: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 6013f019b0cd0080fc4367ec5feeb0cfecae29eb Gitweb: https://git.kernel.org/tip/6013f019b0cd0080fc4367ec5feeb0cfecae29eb Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:21 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:23 +02:00
nios2: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
--- arch/nios2/kernel/irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/nios2/kernel/irq.c +2 -1
@@ -69,7 +69,8 @@ void __init init_IRQ(void)BUG_ON (!node); - domain =irq_domain_add_linear (node,NIOS2_CPU_NR_IRQS , &irq_ops,NULL ); + domain =irq_domain_create_linear (of_fwnode_handle (node), +NIOS2_CPU_NR_IRQS , &irq_ops,NULL );BUG_ON (!domain);irq_set_default_domain (domain);
[tip: irq/cleanups] nios2: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: c7d6eaae6009b89019225ccdfb550832caad8d86 Gitweb: https://git.kernel.org/tip/c7d6eaae6009b89019225ccdfb550832caad8d86 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:21 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:40 +02:00
nios2: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
--- arch/nios2/kernel/irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/nios2/kernel/irq.c +2 -1
@@ -69,7 +69,8 @@ void __init init_IRQ(void)BUG_ON (!node); - domain =irq_domain_add_linear (node,NIOS2_CPU_NR_IRQS , &irq_ops,NULL ); + domain =irq_domain_create_linear (of_fwnode_handle (node), +NIOS2_CPU_NR_IRQS , &irq_ops,NULL );BUG_ON (!domain);irq_set_default_domain (domain);
[tip: irq/cleanups] nios2: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: e9bf22564413c489275a01f184e90cc457669881 Gitweb: https://git.kernel.org/tip/e9bf22564413c489275a01f184e90cc457669881 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:21 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Fri, 16 May 2025 21:06:10 +02:00
nios2: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
--- arch/nios2/kernel/irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/nios2/kernel/irq.c +2 -1
@@ -69,7 +69,8 @@ void __init init_IRQ(void)BUG_ON (!node); - domain =irq_domain_add_linear (node,NIOS2_CPU_NR_IRQS , &irq_ops,NULL ); + domain =irq_domain_create_linear (of_fwnode_handle (node), +NIOS2_CPU_NR_IRQS , &irq_ops,NULL );BUG_ON (!domain);irq_set_default_domain (domain);
PATCH v2 29/57 irqdomain: pci: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
--- drivers/pci/controller/dwc/pci-dra7xx.c | 4 ++-- drivers/pci/controller/dwc/pci-keystone.c | 2 +- drivers/pci/controller/dwc/pcie-dw-rockchip.c | 4 ++-- drivers/pci/controller/dwc/pcie-uniphier.c | 2 +- .../pci/controller/mobiveil/pcie-mobiveil-host.c | 9 ++++----- drivers/pci/controller/pci-aardvark.c | 14 +++++--------- drivers/pci/controller/pci-ftpci100.c | 4 ++-- drivers/pci/controller/pci-mvebu.c | 6 +++--- drivers/pci/controller/pci-xgene-msi.c | 3 +-- drivers/pci/controller/pcie-altera-msi.c | 2 +- drivers/pci/controller/pcie-altera.c | 2 +- drivers/pci/controller/pcie-brcmstb.c | 2 +- drivers/pci/controller/pcie-iproc-msi.c | 4 ++-- drivers/pci/controller/pcie-mediatek-gen3.c | 9 +++++---- drivers/pci/controller/pcie-mediatek.c | 4 ++-- drivers/pci/controller/pcie-rockchip-host.c | 4 ++-- drivers/pci/controller/pcie-xilinx-cpm.c | 10 ++++------ drivers/pci/controller/pcie-xilinx-dma-pl.c | 12 ++++++------ drivers/pci/controller/pcie-xilinx-nwl.c | 9 +++------ drivers/pci/controller/pcie-xilinx.c | 5 ++--- drivers/pci/controller/plda/pcie-plda-host.c | 14 ++++++-------- 21 files changed, 56 insertions(+), 69 deletions(-)
drivers/pci/controller/dwc/pci-dra7xx.c +2 -2
@@ -359,8 +359,8 @@ static int dra7xx_pcie_init_irq_domain(struct dw_pcie_rp *pp)irq_set_chained_handler_and_data (pp->irq, dra7xx_pcie_msi_irq_handler, pp); - dra7xx->irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, pp); + dra7xx->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , &intx_domain_ops, pp);of_node_put (pcie_intc_node);if (!dra7xx->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/dwc/pci-keystone.c +1 -1
@@ -761,7 +761,7 @@ static int ks_pcie_config_intx_irq(struct keystone_pcie *ks_pcie) ks_pcie); } - intx_irq_domain =irq_domain_add_linear (intc_np,PCI_NUM_INTX , + intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (intc_np),PCI_NUM_INTX , &ks_pcie_intx_irq_domain_ops,NULL );if (!intx_irq_domain) {dev_err (dev,"Failed to add irq domain for INTX irqs\n" );
drivers/pci/controller/dwc/pcie-dw-rockchip.c +2 -2
@@ -144,8 +144,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)return -EINVAL ; } - rockchip->irq_domain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &intx_domain_ops, rockchip); + rockchip->irq_domain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &intx_domain_ops, rockchip);of_node_put (intc);if (!rockchip->irq_domain) {dev_err (dev,"failed to get a INTx IRQ domain\n" );
drivers/pci/controller/dwc/pcie-uniphier.c +1 -1
@@ -279,7 +279,7 @@ static int uniphier_pcie_config_intx_irq(struct dw_pcie_rp *pp) goto out_put_node; } - pcie->intx_irq_domain =irq_domain_add_linear (np_intc,PCI_NUM_INTX , + pcie->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (np_intc),PCI_NUM_INTX , &uniphier_intx_domain_ops, pp);if (!pcie->intx_irq_domain) {dev_err (pci->dev,"Failed to get INTx domain\n" );
drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +4 -5
@@ -439,8 +439,8 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)struct mobiveil_msi *msi = &pcie->rp.msi;mutex_init (&msi->lock); - msi->dev_domain =irq_domain_add_linear (NULL , msi->num_of_vectors, - &msi_domain_ops, pcie); + msi->dev_domain =irq_domain_create_linear (NULL , msi->num_of_vectors, + &msi_domain_ops, pcie);if (!msi->dev_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
@@ -461,12 +461,11 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)static int mobiveil_pcie_init_irq_domain (struct mobiveil_pcie *pcie) {struct device *dev = &pcie->pdev->dev; -struct device_node *node = dev->of_node;struct mobiveil_root_port *rp = &pcie->rp;/* setup INTx */ - rp->intx_domain =irq_domain_add_linear (node,PCI_NUM_INTX , - &intx_domain_ops, pcie); + rp->intx_domain =irq_domain_create_linear (of_fwnode_handle (dev->of_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);if (!rp->intx_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pci-aardvark.c +5 -9
@@ -1456,9 +1456,8 @@ static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)raw_spin_lock_init (&pcie->msi_irq_lock);mutex_init (&pcie->msi_used_lock); - pcie->msi_inner_domain = -irq_domain_add_linear (NULL ,MSI_IRQ_NUM , - &advk_msi_domain_ops, pcie); + pcie->msi_inner_domain =irq_domain_create_linear (NULL ,MSI_IRQ_NUM , + &advk_msi_domain_ops, pcie);if (!pcie->msi_inner_domain)return -ENOMEM ;
@@ -1508,9 +1507,8 @@ static int advk_pcie_init_irq_domain(struct advk_pcie *pcie) irq_chip->irq_mask = advk_pcie_irq_mask; irq_chip->irq_unmask = advk_pcie_irq_unmask; - pcie->irq_domain = -irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &advk_pcie_irq_domain_ops, pcie); + pcie->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &advk_pcie_irq_domain_ops, pcie);if (!pcie->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" ); ret = -ENOMEM ;
@@ -1549,9 +1547,7 @@ static const struct irq_domain_ops advk_pcie_rp_irq_domain_ops = {static int advk_pcie_init_rp_irq_domain (struct advk_pcie *pcie) { - pcie->rp_irq_domain =irq_domain_add_linear (NULL ,1 , - &advk_pcie_rp_irq_domain_ops, - pcie); + pcie->rp_irq_domain =irq_domain_create_linear (NULL ,1 , &advk_pcie_rp_irq_domain_ops, pcie);if (!pcie->rp_irq_domain) {dev_err (&pcie->pdev->dev,"Failed to add Root Port IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pci-ftpci100.c +2 -2
@@ -345,8 +345,8 @@ static int faraday_pci_setup_cascaded_irq(struct faraday_pci *p)return irq ?: -EINVAL ; } - p->irqdomain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &faraday_pci_irqdomain_ops, p); + p->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &faraday_pci_irqdomain_ops, p);of_node_put (intc);if (!p->irqdomain) {dev_err (p->dev,"failed to create Gemini PCI IRQ domain\n" );
drivers/pci/controller/pci-mvebu.c +3 -3
@@ -1078,9 +1078,9 @@ static int mvebu_pcie_init_irq_domain(struct mvebu_pcie_port *port)return -ENODEV ; } - port->intx_irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &mvebu_pcie_intx_irq_domain_ops, - port); + port->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , + &mvebu_pcie_intx_irq_domain_ops, port);of_node_put (pcie_intc_node);if (!port->intx_irq_domain) {dev_err (dev,"Failed to get INTx IRQ domain for %s\n" , port->name);
drivers/pci/controller/pci-xgene-msi.c +1 -2
@@ -242,8 +242,7 @@ static const struct irq_domain_ops msi_domain_ops = {static int xgene_allocate_domains (struct xgene_msi *msi) { - msi->inner_domain =irq_domain_add_linear (NULL ,NR_MSI_VEC , - &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL ,NR_MSI_VEC , &msi_domain_ops, msi);if (!msi->inner_domain)return -ENOMEM ;
drivers/pci/controller/pcie-altera-msi.c +1 -1
@@ -166,7 +166,7 @@ static int altera_allocate_domains(struct altera_msi *msi) {struct fwnode_handle *fwnode =of_fwnode_handle (msi->pdev->dev.of_node); - msi->inner_domain =irq_domain_add_linear (NULL , msi->num_of_vectors, + msi->inner_domain =irq_domain_create_linear (NULL , msi->num_of_vectors, &msi_domain_ops, msi);if (!msi->inner_domain) {dev_err (&msi->pdev->dev,"failed to create IRQ domain\n" );
drivers/pci/controller/pcie-altera.c +1 -1
@@ -855,7 +855,7 @@ static int altera_pcie_init_irq_domain(struct altera_pcie *pcie)struct device_node *node = dev->of_node;/* Setup INTx */ - pcie->irq_domain =irq_domain_add_linear (node,PCI_NUM_INTX , + pcie->irq_domain =irq_domain_create_linear (of_fwnode_handle (node),PCI_NUM_INTX , &intx_domain_ops, pcie);if (!pcie->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pcie-brcmstb.c +1 -1
@@ -584,7 +584,7 @@ static int brcm_allocate_domains(struct brcm_msi *msi)struct fwnode_handle *fwnode =of_fwnode_handle (msi->np);struct device *dev = msi->dev; - msi->inner_domain =irq_domain_add_linear (NULL , msi->nr, &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL , msi->nr, &msi_domain_ops, msi);if (!msi->inner_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pcie-iproc-msi.c +2 -2
@@ -446,8 +446,8 @@ static void iproc_msi_disable(struct iproc_msi *msi)static int iproc_msi_alloc_domains (struct device_node *node,struct iproc_msi *msi) { - msi->inner_domain =irq_domain_add_linear (NULL , msi->nr_msi_vecs, - &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL , msi->nr_msi_vecs, + &msi_domain_ops, msi);if (!msi->inner_domain)return -ENOMEM ;
drivers/pci/controller/pcie-mediatek-gen3.c +5 -4
@@ -745,8 +745,8 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)return -ENODEV ; } - pcie->intx_domain =irq_domain_add_linear (intc_node,PCI_NUM_INTX , - &intx_domain_ops, pcie); + pcie->intx_domain =irq_domain_create_linear (of_fwnode_handle (intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);if (!pcie->intx_domain) {dev_err (dev,"failed to create INTx IRQ domain\n" ); ret = -ENODEV ;
@@ -756,8 +756,9 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)/* Setup MSI */ mutex_init (&pcie->lock); - pcie->msi_bottom_domain =irq_domain_add_linear (node,PCIE_MSI_IRQS_NUM , - &mtk_msi_bottom_domain_ops, pcie); + pcie->msi_bottom_domain =irq_domain_create_linear (of_fwnode_handle (node), +PCIE_MSI_IRQS_NUM , + &mtk_msi_bottom_domain_ops, pcie);if (!pcie->msi_bottom_domain) {dev_err (dev,"failed to create MSI bottom domain\n" ); ret = -ENODEV ;
drivers/pci/controller/pcie-mediatek.c +2 -2
@@ -569,8 +569,8 @@ static int mtk_pcie_init_irq_domain(struct mtk_pcie_port *port,return -ENODEV ; } - port->irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);of_node_put (pcie_intc_node);if (!port->irq_domain) {dev_err (dev,"failed to get INTx IRQ domain\n" );
drivers/pci/controller/pcie-rockchip-host.c +2 -2
@@ -693,8 +693,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)return -EINVAL ; } - rockchip->irq_domain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &intx_domain_ops, rockchip); + rockchip->irq_domain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &intx_domain_ops, rockchip);of_node_put (intc);if (!rockchip->irq_domain) {dev_err (dev,"failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pcie-xilinx-cpm.c +4 -6
@@ -395,17 +395,15 @@ static int xilinx_cpm_pcie_init_irq_domain(struct xilinx_cpm_pcie *port)return -EINVAL ; } - port->cpm_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, - port); + port->cpm_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, port);if (!port->cpm_domain) goto out;irq_domain_update_bus_token (port->cpm_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, - port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) goto out;
drivers/pci/controller/pcie-xilinx-dma-pl.c +6 -6
@@ -472,8 +472,8 @@ static int xilinx_pl_dma_pcie_init_msi_irq_domain(struct pl_dma_pcie *port)int size =BITS_TO_LONGS (XILINX_NUM_MSI_IRQS ) *sizeof (long );struct fwnode_handle *fwnode =of_fwnode_handle (port->dev->of_node); - msi->dev_domain =irq_domain_add_linear (NULL ,XILINX_NUM_MSI_IRQS , - &dev_msi_domain_ops, port); + msi->dev_domain =irq_domain_create_linear (NULL ,XILINX_NUM_MSI_IRQS , + &dev_msi_domain_ops, port);if (!msi->dev_domain) goto out;
@@ -585,15 +585,15 @@ static int xilinx_pl_dma_pcie_init_irq_domain(struct pl_dma_pcie *port)return -EINVAL ; } - port->pldma_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, port); + port->pldma_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, port);if (!port->pldma_domain)return -ENOMEM ;irq_domain_update_bus_token (port->pldma_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pcie-xilinx-nwl.c +3 -6
@@ -498,8 +498,7 @@ static int nwl_pcie_init_msi_irq_domain(struct nwl_pcie *pcie)struct fwnode_handle *fwnode =of_fwnode_handle (dev->of_node);struct nwl_msi *msi = &pcie->msi; - msi->dev_domain =irq_domain_add_linear (NULL ,INT_PCI_MSI_NR , - &dev_msi_domain_ops, pcie); + msi->dev_domain =irq_domain_create_linear (NULL ,INT_PCI_MSI_NR , &dev_msi_domain_ops, pcie);if (!msi->dev_domain) {dev_err (dev,"failed to create dev IRQ domain\n" );return -ENOMEM ;
@@ -582,10 +581,8 @@ static int nwl_pcie_init_irq_domain(struct nwl_pcie *pcie)return -EINVAL ; } - pcie->intx_irq_domain =irq_domain_add_linear (intc_node, -PCI_NUM_INTX , - &intx_domain_ops, - pcie); + pcie->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);of_node_put (intc_node);if (!pcie->intx_irq_domain) {dev_err (dev,"failed to create IRQ domain\n" );
drivers/pci/controller/pcie-xilinx.c +2 -3
@@ -461,9 +461,8 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie *pcie)return -ENODEV ; } - pcie->leg_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, - pcie); + pcie->leg_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);of_node_put (pcie_intc_node);if (!pcie->leg_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/plda/pcie-plda-host.c +6 -8
@@ -155,8 +155,7 @@ static int plda_allocate_msi_domains(struct plda_pcie_rp *port)mutex_init (&port->msi.lock); - msi->dev_domain =irq_domain_add_linear (NULL , msi->num_vectors, - &msi_domain_ops, port); + msi->dev_domain =irq_domain_create_linear (NULL , msi->num_vectors, &msi_domain_ops, port);if (!msi->dev_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
@@ -393,10 +392,9 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)return -EINVAL ; } - port->event_domain =irq_domain_add_linear (pcie_intc_node, - port->num_events, - &plda_event_domain_ops, - port); + port->event_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), + port->num_events, &plda_event_domain_ops, + port);if (!port->event_domain) {dev_err (dev,"failed to get event domain\n" );of_node_put (pcie_intc_node);
@@ -405,8 +403,8 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)irq_domain_update_bus_token (port->event_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) {dev_err (dev,"failed to get an INTx IRQ domain\n" );of_node_put (pcie_intc_node);
Signature · 1 line
2.49.0
[tip: irq/cleanups] PCI: Switch to irq_domain_create_linear()
The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 2517f88d030ec60fd05edd8b063ff3e0f63a5823 Gitweb: https://git.kernel.org/tip/2517f88d030ec60fd05edd8b063ff3e0f63a5823 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:22 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:06 +02:00
PCI: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
[ tglx: Fix up subject prefix and convert the new instance in
dwc/pcie-amd-mdb.c ]
--- drivers/pci/controller/dwc/pci-dra7xx.c | 4 +-- drivers/pci/controller/dwc/pci-keystone.c | 2 +- drivers/pci/controller/dwc/pcie-amd-mdb.c | 8 +++--- drivers/pci/controller/dwc/pcie-dw-rockchip.c | 4 +-- drivers/pci/controller/dwc/pcie-uniphier.c | 2 +- drivers/pci/controller/mobiveil/pcie-mobiveil-host.c | 9 +++---- drivers/pci/controller/pci-aardvark.c | 14 +++-------- drivers/pci/controller/pci-ftpci100.c | 4 +-- drivers/pci/controller/pci-mvebu.c | 6 ++--- drivers/pci/controller/pci-xgene-msi.c | 3 +-- drivers/pci/controller/pcie-altera-msi.c | 2 +- drivers/pci/controller/pcie-altera.c | 2 +- drivers/pci/controller/pcie-brcmstb.c | 2 +- drivers/pci/controller/pcie-iproc-msi.c | 4 +-- drivers/pci/controller/pcie-mediatek-gen3.c | 9 +++---- drivers/pci/controller/pcie-mediatek.c | 4 +-- drivers/pci/controller/pcie-rockchip-host.c | 4 +-- drivers/pci/controller/pcie-xilinx-cpm.c | 10 +++----- drivers/pci/controller/pcie-xilinx-dma-pl.c | 12 ++++----- drivers/pci/controller/pcie-xilinx-nwl.c | 9 ++----- drivers/pci/controller/pcie-xilinx.c | 5 +--- drivers/pci/controller/plda/pcie-plda-host.c | 14 ++++------- 22 files changed, 60 insertions(+), 73 deletions(-)
drivers/pci/controller/dwc/pci-dra7xx.c +2 -2
@@ -359,8 +359,8 @@ static int dra7xx_pcie_init_irq_domain(struct dw_pcie_rp *pp)irq_set_chained_handler_and_data (pp->irq, dra7xx_pcie_msi_irq_handler, pp); - dra7xx->irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, pp); + dra7xx->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , &intx_domain_ops, pp);of_node_put (pcie_intc_node);if (!dra7xx->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/dwc/pci-keystone.c +1 -1
@@ -761,7 +761,7 @@ static int ks_pcie_config_intx_irq(struct keystone_pcie *ks_pcie) ks_pcie); } - intx_irq_domain =irq_domain_add_linear (intc_np,PCI_NUM_INTX , + intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (intc_np),PCI_NUM_INTX , &ks_pcie_intx_irq_domain_ops,NULL );if (!intx_irq_domain) {dev_err (dev,"Failed to add irq domain for INTX irqs\n" );
drivers/pci/controller/dwc/pcie-amd-mdb.c +4 -4
@@ -290,8 +290,8 @@ static int amd_mdb_pcie_init_irq_domains(struct amd_mdb_pcie *pcie,return -ENODEV ; } - pcie->mdb_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, pcie); + pcie->mdb_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, pcie);if (!pcie->mdb_domain) { err = -ENOMEM ;dev_err (dev,"Failed to add MDB domain\n" );
@@ -300,8 +300,8 @@ static int amd_mdb_pcie_init_irq_domains(struct amd_mdb_pcie *pcie,irq_domain_update_bus_token (pcie->mdb_domain,DOMAIN_BUS_NEXUS ); - pcie->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &amd_intx_domain_ops, pcie); + pcie->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , &amd_intx_domain_ops, pcie);if (!pcie->intx_domain) { err = -ENOMEM ;dev_err (dev,"Failed to add INTx domain\n" );
drivers/pci/controller/dwc/pcie-dw-rockchip.c +2 -2
@@ -144,8 +144,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)return -EINVAL ; } - rockchip->irq_domain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &intx_domain_ops, rockchip); + rockchip->irq_domain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &intx_domain_ops, rockchip);of_node_put (intc);if (!rockchip->irq_domain) {dev_err (dev,"failed to get a INTx IRQ domain\n" );
drivers/pci/controller/dwc/pcie-uniphier.c +1 -1
@@ -279,7 +279,7 @@ static int uniphier_pcie_config_intx_irq(struct dw_pcie_rp *pp) goto out_put_node; } - pcie->intx_irq_domain =irq_domain_add_linear (np_intc,PCI_NUM_INTX , + pcie->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (np_intc),PCI_NUM_INTX , &uniphier_intx_domain_ops, pp);if (!pcie->intx_irq_domain) {dev_err (pci->dev,"Failed to get INTx domain\n" );
drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +4 -5
@@ -439,8 +439,8 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)struct mobiveil_msi *msi = &pcie->rp.msi;mutex_init (&msi->lock); - msi->dev_domain =irq_domain_add_linear (NULL , msi->num_of_vectors, - &msi_domain_ops, pcie); + msi->dev_domain =irq_domain_create_linear (NULL , msi->num_of_vectors, + &msi_domain_ops, pcie);if (!msi->dev_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
@@ -461,12 +461,11 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)static int mobiveil_pcie_init_irq_domain (struct mobiveil_pcie *pcie) {struct device *dev = &pcie->pdev->dev; -struct device_node *node = dev->of_node;struct mobiveil_root_port *rp = &pcie->rp;/* setup INTx */ - rp->intx_domain =irq_domain_add_linear (node,PCI_NUM_INTX , - &intx_domain_ops, pcie); + rp->intx_domain =irq_domain_create_linear (of_fwnode_handle (dev->of_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);if (!rp->intx_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pci-aardvark.c +5 -9
@@ -1456,9 +1456,8 @@ static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)raw_spin_lock_init (&pcie->msi_irq_lock);mutex_init (&pcie->msi_used_lock); - pcie->msi_inner_domain = -irq_domain_add_linear (NULL ,MSI_IRQ_NUM , - &advk_msi_domain_ops, pcie); + pcie->msi_inner_domain =irq_domain_create_linear (NULL ,MSI_IRQ_NUM , + &advk_msi_domain_ops, pcie);if (!pcie->msi_inner_domain)return -ENOMEM ;
@@ -1508,9 +1507,8 @@ static int advk_pcie_init_irq_domain(struct advk_pcie *pcie) irq_chip->irq_mask = advk_pcie_irq_mask; irq_chip->irq_unmask = advk_pcie_irq_unmask; - pcie->irq_domain = -irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &advk_pcie_irq_domain_ops, pcie); + pcie->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &advk_pcie_irq_domain_ops, pcie);if (!pcie->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" ); ret = -ENOMEM ;
@@ -1549,9 +1547,7 @@ static const struct irq_domain_ops advk_pcie_rp_irq_domain_ops = {static int advk_pcie_init_rp_irq_domain (struct advk_pcie *pcie) { - pcie->rp_irq_domain =irq_domain_add_linear (NULL ,1 , - &advk_pcie_rp_irq_domain_ops, - pcie); + pcie->rp_irq_domain =irq_domain_create_linear (NULL ,1 , &advk_pcie_rp_irq_domain_ops, pcie);if (!pcie->rp_irq_domain) {dev_err (&pcie->pdev->dev,"Failed to add Root Port IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pci-ftpci100.c +2 -2
@@ -345,8 +345,8 @@ static int faraday_pci_setup_cascaded_irq(struct faraday_pci *p)return irq ?: -EINVAL ; } - p->irqdomain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &faraday_pci_irqdomain_ops, p); + p->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &faraday_pci_irqdomain_ops, p);of_node_put (intc);if (!p->irqdomain) {dev_err (p->dev,"failed to create Gemini PCI IRQ domain\n" );
drivers/pci/controller/pci-mvebu.c +3 -3
@@ -1078,9 +1078,9 @@ static int mvebu_pcie_init_irq_domain(struct mvebu_pcie_port *port)return -ENODEV ; } - port->intx_irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &mvebu_pcie_intx_irq_domain_ops, - port); + port->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , + &mvebu_pcie_intx_irq_domain_ops, port);of_node_put (pcie_intc_node);if (!port->intx_irq_domain) {dev_err (dev,"Failed to get INTx IRQ domain for %s\n" , port->name);
drivers/pci/controller/pci-xgene-msi.c +1 -2
@@ -242,8 +242,7 @@ static const struct irq_domain_ops msi_domain_ops = {static int xgene_allocate_domains (struct xgene_msi *msi) { - msi->inner_domain =irq_domain_add_linear (NULL ,NR_MSI_VEC , - &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL ,NR_MSI_VEC , &msi_domain_ops, msi);if (!msi->inner_domain)return -ENOMEM ;
drivers/pci/controller/pcie-altera-msi.c +1 -1
@@ -166,7 +166,7 @@ static int altera_allocate_domains(struct altera_msi *msi) {struct fwnode_handle *fwnode =of_fwnode_handle (msi->pdev->dev.of_node); - msi->inner_domain =irq_domain_add_linear (NULL , msi->num_of_vectors, + msi->inner_domain =irq_domain_create_linear (NULL , msi->num_of_vectors, &msi_domain_ops, msi);if (!msi->inner_domain) {dev_err (&msi->pdev->dev,"failed to create IRQ domain\n" );
drivers/pci/controller/pcie-altera.c +1 -1
@@ -855,7 +855,7 @@ static int altera_pcie_init_irq_domain(struct altera_pcie *pcie)struct device_node *node = dev->of_node;/* Setup INTx */ - pcie->irq_domain =irq_domain_add_linear (node,PCI_NUM_INTX , + pcie->irq_domain =irq_domain_create_linear (of_fwnode_handle (node),PCI_NUM_INTX , &intx_domain_ops, pcie);if (!pcie->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pcie-brcmstb.c +1 -1
@@ -584,7 +584,7 @@ static int brcm_allocate_domains(struct brcm_msi *msi)struct fwnode_handle *fwnode =of_fwnode_handle (msi->np);struct device *dev = msi->dev; - msi->inner_domain =irq_domain_add_linear (NULL , msi->nr, &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL , msi->nr, &msi_domain_ops, msi);if (!msi->inner_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pcie-iproc-msi.c +2 -2
@@ -446,8 +446,8 @@ static void iproc_msi_disable(struct iproc_msi *msi)static int iproc_msi_alloc_domains (struct device_node *node,struct iproc_msi *msi) { - msi->inner_domain =irq_domain_add_linear (NULL , msi->nr_msi_vecs, - &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL , msi->nr_msi_vecs, + &msi_domain_ops, msi);if (!msi->inner_domain)return -ENOMEM ;
drivers/pci/controller/pcie-mediatek-gen3.c +5 -4
@@ -745,8 +745,8 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)return -ENODEV ; } - pcie->intx_domain =irq_domain_add_linear (intc_node,PCI_NUM_INTX , - &intx_domain_ops, pcie); + pcie->intx_domain =irq_domain_create_linear (of_fwnode_handle (intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);if (!pcie->intx_domain) {dev_err (dev,"failed to create INTx IRQ domain\n" ); ret = -ENODEV ;
@@ -756,8 +756,9 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)/* Setup MSI */ mutex_init (&pcie->lock); - pcie->msi_bottom_domain =irq_domain_add_linear (node,PCIE_MSI_IRQS_NUM , - &mtk_msi_bottom_domain_ops, pcie); + pcie->msi_bottom_domain =irq_domain_create_linear (of_fwnode_handle (node), +PCIE_MSI_IRQS_NUM , + &mtk_msi_bottom_domain_ops, pcie);if (!pcie->msi_bottom_domain) {dev_err (dev,"failed to create MSI bottom domain\n" ); ret = -ENODEV ;
drivers/pci/controller/pcie-mediatek.c +2 -2
@@ -569,8 +569,8 @@ static int mtk_pcie_init_irq_domain(struct mtk_pcie_port *port,return -ENODEV ; } - port->irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);of_node_put (pcie_intc_node);if (!port->irq_domain) {dev_err (dev,"failed to get INTx IRQ domain\n" );
drivers/pci/controller/pcie-rockchip-host.c +2 -2
@@ -693,8 +693,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)return -EINVAL ; } - rockchip->irq_domain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &intx_domain_ops, rockchip); + rockchip->irq_domain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &intx_domain_ops, rockchip);of_node_put (intc);if (!rockchip->irq_domain) {dev_err (dev,"failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pcie-xilinx-cpm.c +4 -6
@@ -395,17 +395,15 @@ static int xilinx_cpm_pcie_init_irq_domain(struct xilinx_cpm_pcie *port)return -EINVAL ; } - port->cpm_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, - port); + port->cpm_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, port);if (!port->cpm_domain) goto out;irq_domain_update_bus_token (port->cpm_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, - port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) goto out;
drivers/pci/controller/pcie-xilinx-dma-pl.c +6 -6
@@ -472,8 +472,8 @@ static int xilinx_pl_dma_pcie_init_msi_irq_domain(struct pl_dma_pcie *port)int size =BITS_TO_LONGS (XILINX_NUM_MSI_IRQS ) *sizeof (long );struct fwnode_handle *fwnode =of_fwnode_handle (port->dev->of_node); - msi->dev_domain =irq_domain_add_linear (NULL ,XILINX_NUM_MSI_IRQS , - &dev_msi_domain_ops, port); + msi->dev_domain =irq_domain_create_linear (NULL ,XILINX_NUM_MSI_IRQS , + &dev_msi_domain_ops, port);if (!msi->dev_domain) goto out;
@@ -585,15 +585,15 @@ static int xilinx_pl_dma_pcie_init_irq_domain(struct pl_dma_pcie *port)return -EINVAL ; } - port->pldma_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, port); + port->pldma_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, port);if (!port->pldma_domain)return -ENOMEM ;irq_domain_update_bus_token (port->pldma_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pcie-xilinx-nwl.c +3 -6
@@ -498,8 +498,7 @@ static int nwl_pcie_init_msi_irq_domain(struct nwl_pcie *pcie)struct fwnode_handle *fwnode =of_fwnode_handle (dev->of_node);struct nwl_msi *msi = &pcie->msi; - msi->dev_domain =irq_domain_add_linear (NULL ,INT_PCI_MSI_NR , - &dev_msi_domain_ops, pcie); + msi->dev_domain =irq_domain_create_linear (NULL ,INT_PCI_MSI_NR , &dev_msi_domain_ops, pcie);if (!msi->dev_domain) {dev_err (dev,"failed to create dev IRQ domain\n" );return -ENOMEM ;
@@ -582,10 +581,8 @@ static int nwl_pcie_init_irq_domain(struct nwl_pcie *pcie)return -EINVAL ; } - pcie->intx_irq_domain =irq_domain_add_linear (intc_node, -PCI_NUM_INTX , - &intx_domain_ops, - pcie); + pcie->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);of_node_put (intc_node);if (!pcie->intx_irq_domain) {dev_err (dev,"failed to create IRQ domain\n" );
drivers/pci/controller/pcie-xilinx.c +2 -3
@@ -461,9 +461,8 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie *pcie)return -ENODEV ; } - pcie->leg_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, - pcie); + pcie->leg_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);of_node_put (pcie_intc_node);if (!pcie->leg_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/plda/pcie-plda-host.c +6 -8
@@ -155,8 +155,7 @@ static int plda_allocate_msi_domains(struct plda_pcie_rp *port)mutex_init (&port->msi.lock); - msi->dev_domain =irq_domain_add_linear (NULL , msi->num_vectors, - &msi_domain_ops, port); + msi->dev_domain =irq_domain_create_linear (NULL , msi->num_vectors, &msi_domain_ops, port);if (!msi->dev_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
@@ -393,10 +392,9 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)return -EINVAL ; } - port->event_domain =irq_domain_add_linear (pcie_intc_node, - port->num_events, - &plda_event_domain_ops, - port); + port->event_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), + port->num_events, &plda_event_domain_ops, + port);if (!port->event_domain) {dev_err (dev,"failed to get event domain\n" );of_node_put (pcie_intc_node);
@@ -405,8 +403,8 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)irq_domain_update_bus_token (port->event_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) {dev_err (dev,"failed to get an INTx IRQ domain\n" );of_node_put (pcie_intc_node);
[tip: irq/cleanups] PCI: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 04e899b33488fbc18c459ceff3a645c10f4d16c0 Gitweb: https://git.kernel.org/tip/04e899b33488fbc18c459ceff3a645c10f4d16c0 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:22 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:23 +02:00
PCI: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
[ tglx: Fix up subject prefix and convert the new instance in
dwc/pcie-amd-mdb.c ]
--- drivers/pci/controller/dwc/pci-dra7xx.c | 4 +-- drivers/pci/controller/dwc/pci-keystone.c | 2 +- drivers/pci/controller/dwc/pcie-amd-mdb.c | 8 +++--- drivers/pci/controller/dwc/pcie-dw-rockchip.c | 4 +-- drivers/pci/controller/dwc/pcie-uniphier.c | 2 +- drivers/pci/controller/mobiveil/pcie-mobiveil-host.c | 9 +++---- drivers/pci/controller/pci-aardvark.c | 14 +++-------- drivers/pci/controller/pci-ftpci100.c | 4 +-- drivers/pci/controller/pci-mvebu.c | 6 ++--- drivers/pci/controller/pci-xgene-msi.c | 3 +-- drivers/pci/controller/pcie-altera-msi.c | 2 +- drivers/pci/controller/pcie-altera.c | 2 +- drivers/pci/controller/pcie-brcmstb.c | 2 +- drivers/pci/controller/pcie-iproc-msi.c | 4 +-- drivers/pci/controller/pcie-mediatek-gen3.c | 9 +++---- drivers/pci/controller/pcie-mediatek.c | 4 +-- drivers/pci/controller/pcie-rockchip-host.c | 4 +-- drivers/pci/controller/pcie-xilinx-cpm.c | 10 +++----- drivers/pci/controller/pcie-xilinx-dma-pl.c | 12 ++++----- drivers/pci/controller/pcie-xilinx-nwl.c | 9 ++----- drivers/pci/controller/pcie-xilinx.c | 5 +--- drivers/pci/controller/plda/pcie-plda-host.c | 14 ++++------- 22 files changed, 60 insertions(+), 73 deletions(-)
drivers/pci/controller/dwc/pci-dra7xx.c +2 -2
@@ -359,8 +359,8 @@ static int dra7xx_pcie_init_irq_domain(struct dw_pcie_rp *pp)irq_set_chained_handler_and_data (pp->irq, dra7xx_pcie_msi_irq_handler, pp); - dra7xx->irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, pp); + dra7xx->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , &intx_domain_ops, pp);of_node_put (pcie_intc_node);if (!dra7xx->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/dwc/pci-keystone.c +1 -1
@@ -761,7 +761,7 @@ static int ks_pcie_config_intx_irq(struct keystone_pcie *ks_pcie) ks_pcie); } - intx_irq_domain =irq_domain_add_linear (intc_np,PCI_NUM_INTX , + intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (intc_np),PCI_NUM_INTX , &ks_pcie_intx_irq_domain_ops,NULL );if (!intx_irq_domain) {dev_err (dev,"Failed to add irq domain for INTX irqs\n" );
drivers/pci/controller/dwc/pcie-amd-mdb.c +4 -4
@@ -290,8 +290,8 @@ static int amd_mdb_pcie_init_irq_domains(struct amd_mdb_pcie *pcie,return -ENODEV ; } - pcie->mdb_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, pcie); + pcie->mdb_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, pcie);if (!pcie->mdb_domain) { err = -ENOMEM ;dev_err (dev,"Failed to add MDB domain\n" );
@@ -300,8 +300,8 @@ static int amd_mdb_pcie_init_irq_domains(struct amd_mdb_pcie *pcie,irq_domain_update_bus_token (pcie->mdb_domain,DOMAIN_BUS_NEXUS ); - pcie->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &amd_intx_domain_ops, pcie); + pcie->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , &amd_intx_domain_ops, pcie);if (!pcie->intx_domain) { err = -ENOMEM ;dev_err (dev,"Failed to add INTx domain\n" );
drivers/pci/controller/dwc/pcie-dw-rockchip.c +2 -2
@@ -144,8 +144,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)return -EINVAL ; } - rockchip->irq_domain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &intx_domain_ops, rockchip); + rockchip->irq_domain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &intx_domain_ops, rockchip);of_node_put (intc);if (!rockchip->irq_domain) {dev_err (dev,"failed to get a INTx IRQ domain\n" );
drivers/pci/controller/dwc/pcie-uniphier.c +1 -1
@@ -279,7 +279,7 @@ static int uniphier_pcie_config_intx_irq(struct dw_pcie_rp *pp) goto out_put_node; } - pcie->intx_irq_domain =irq_domain_add_linear (np_intc,PCI_NUM_INTX , + pcie->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (np_intc),PCI_NUM_INTX , &uniphier_intx_domain_ops, pp);if (!pcie->intx_irq_domain) {dev_err (pci->dev,"Failed to get INTx domain\n" );
drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +4 -5
@@ -439,8 +439,8 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)struct mobiveil_msi *msi = &pcie->rp.msi;mutex_init (&msi->lock); - msi->dev_domain =irq_domain_add_linear (NULL , msi->num_of_vectors, - &msi_domain_ops, pcie); + msi->dev_domain =irq_domain_create_linear (NULL , msi->num_of_vectors, + &msi_domain_ops, pcie);if (!msi->dev_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
@@ -461,12 +461,11 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)static int mobiveil_pcie_init_irq_domain (struct mobiveil_pcie *pcie) {struct device *dev = &pcie->pdev->dev; -struct device_node *node = dev->of_node;struct mobiveil_root_port *rp = &pcie->rp;/* setup INTx */ - rp->intx_domain =irq_domain_add_linear (node,PCI_NUM_INTX , - &intx_domain_ops, pcie); + rp->intx_domain =irq_domain_create_linear (of_fwnode_handle (dev->of_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);if (!rp->intx_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pci-aardvark.c +5 -9
@@ -1456,9 +1456,8 @@ static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)raw_spin_lock_init (&pcie->msi_irq_lock);mutex_init (&pcie->msi_used_lock); - pcie->msi_inner_domain = -irq_domain_add_linear (NULL ,MSI_IRQ_NUM , - &advk_msi_domain_ops, pcie); + pcie->msi_inner_domain =irq_domain_create_linear (NULL ,MSI_IRQ_NUM , + &advk_msi_domain_ops, pcie);if (!pcie->msi_inner_domain)return -ENOMEM ;
@@ -1508,9 +1507,8 @@ static int advk_pcie_init_irq_domain(struct advk_pcie *pcie) irq_chip->irq_mask = advk_pcie_irq_mask; irq_chip->irq_unmask = advk_pcie_irq_unmask; - pcie->irq_domain = -irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &advk_pcie_irq_domain_ops, pcie); + pcie->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &advk_pcie_irq_domain_ops, pcie);if (!pcie->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" ); ret = -ENOMEM ;
@@ -1549,9 +1547,7 @@ static const struct irq_domain_ops advk_pcie_rp_irq_domain_ops = {static int advk_pcie_init_rp_irq_domain (struct advk_pcie *pcie) { - pcie->rp_irq_domain =irq_domain_add_linear (NULL ,1 , - &advk_pcie_rp_irq_domain_ops, - pcie); + pcie->rp_irq_domain =irq_domain_create_linear (NULL ,1 , &advk_pcie_rp_irq_domain_ops, pcie);if (!pcie->rp_irq_domain) {dev_err (&pcie->pdev->dev,"Failed to add Root Port IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pci-ftpci100.c +2 -2
@@ -345,8 +345,8 @@ static int faraday_pci_setup_cascaded_irq(struct faraday_pci *p)return irq ?: -EINVAL ; } - p->irqdomain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &faraday_pci_irqdomain_ops, p); + p->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &faraday_pci_irqdomain_ops, p);of_node_put (intc);if (!p->irqdomain) {dev_err (p->dev,"failed to create Gemini PCI IRQ domain\n" );
drivers/pci/controller/pci-mvebu.c +3 -3
@@ -1078,9 +1078,9 @@ static int mvebu_pcie_init_irq_domain(struct mvebu_pcie_port *port)return -ENODEV ; } - port->intx_irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &mvebu_pcie_intx_irq_domain_ops, - port); + port->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , + &mvebu_pcie_intx_irq_domain_ops, port);of_node_put (pcie_intc_node);if (!port->intx_irq_domain) {dev_err (dev,"Failed to get INTx IRQ domain for %s\n" , port->name);
drivers/pci/controller/pci-xgene-msi.c +1 -2
@@ -242,8 +242,7 @@ static const struct irq_domain_ops msi_domain_ops = {static int xgene_allocate_domains (struct xgene_msi *msi) { - msi->inner_domain =irq_domain_add_linear (NULL ,NR_MSI_VEC , - &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL ,NR_MSI_VEC , &msi_domain_ops, msi);if (!msi->inner_domain)return -ENOMEM ;
drivers/pci/controller/pcie-altera-msi.c +1 -1
@@ -166,7 +166,7 @@ static int altera_allocate_domains(struct altera_msi *msi) {struct fwnode_handle *fwnode =of_fwnode_handle (msi->pdev->dev.of_node); - msi->inner_domain =irq_domain_add_linear (NULL , msi->num_of_vectors, + msi->inner_domain =irq_domain_create_linear (NULL , msi->num_of_vectors, &msi_domain_ops, msi);if (!msi->inner_domain) {dev_err (&msi->pdev->dev,"failed to create IRQ domain\n" );
drivers/pci/controller/pcie-altera.c +1 -1
@@ -855,7 +855,7 @@ static int altera_pcie_init_irq_domain(struct altera_pcie *pcie)struct device_node *node = dev->of_node;/* Setup INTx */ - pcie->irq_domain =irq_domain_add_linear (node,PCI_NUM_INTX , + pcie->irq_domain =irq_domain_create_linear (of_fwnode_handle (node),PCI_NUM_INTX , &intx_domain_ops, pcie);if (!pcie->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pcie-brcmstb.c +1 -1
@@ -584,7 +584,7 @@ static int brcm_allocate_domains(struct brcm_msi *msi)struct fwnode_handle *fwnode =of_fwnode_handle (msi->np);struct device *dev = msi->dev; - msi->inner_domain =irq_domain_add_linear (NULL , msi->nr, &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL , msi->nr, &msi_domain_ops, msi);if (!msi->inner_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pcie-iproc-msi.c +2 -2
@@ -446,8 +446,8 @@ static void iproc_msi_disable(struct iproc_msi *msi)static int iproc_msi_alloc_domains (struct device_node *node,struct iproc_msi *msi) { - msi->inner_domain =irq_domain_add_linear (NULL , msi->nr_msi_vecs, - &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL , msi->nr_msi_vecs, + &msi_domain_ops, msi);if (!msi->inner_domain)return -ENOMEM ;
drivers/pci/controller/pcie-mediatek-gen3.c +5 -4
@@ -745,8 +745,8 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)return -ENODEV ; } - pcie->intx_domain =irq_domain_add_linear (intc_node,PCI_NUM_INTX , - &intx_domain_ops, pcie); + pcie->intx_domain =irq_domain_create_linear (of_fwnode_handle (intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);if (!pcie->intx_domain) {dev_err (dev,"failed to create INTx IRQ domain\n" ); ret = -ENODEV ;
@@ -756,8 +756,9 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)/* Setup MSI */ mutex_init (&pcie->lock); - pcie->msi_bottom_domain =irq_domain_add_linear (node,PCIE_MSI_IRQS_NUM , - &mtk_msi_bottom_domain_ops, pcie); + pcie->msi_bottom_domain =irq_domain_create_linear (of_fwnode_handle (node), +PCIE_MSI_IRQS_NUM , + &mtk_msi_bottom_domain_ops, pcie);if (!pcie->msi_bottom_domain) {dev_err (dev,"failed to create MSI bottom domain\n" ); ret = -ENODEV ;
drivers/pci/controller/pcie-mediatek.c +2 -2
@@ -569,8 +569,8 @@ static int mtk_pcie_init_irq_domain(struct mtk_pcie_port *port,return -ENODEV ; } - port->irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);of_node_put (pcie_intc_node);if (!port->irq_domain) {dev_err (dev,"failed to get INTx IRQ domain\n" );
drivers/pci/controller/pcie-rockchip-host.c +2 -2
@@ -693,8 +693,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)return -EINVAL ; } - rockchip->irq_domain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &intx_domain_ops, rockchip); + rockchip->irq_domain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &intx_domain_ops, rockchip);of_node_put (intc);if (!rockchip->irq_domain) {dev_err (dev,"failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pcie-xilinx-cpm.c +4 -6
@@ -395,17 +395,15 @@ static int xilinx_cpm_pcie_init_irq_domain(struct xilinx_cpm_pcie *port)return -EINVAL ; } - port->cpm_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, - port); + port->cpm_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, port);if (!port->cpm_domain) goto out;irq_domain_update_bus_token (port->cpm_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, - port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) goto out;
drivers/pci/controller/pcie-xilinx-dma-pl.c +6 -6
@@ -472,8 +472,8 @@ static int xilinx_pl_dma_pcie_init_msi_irq_domain(struct pl_dma_pcie *port)int size =BITS_TO_LONGS (XILINX_NUM_MSI_IRQS ) *sizeof (long );struct fwnode_handle *fwnode =of_fwnode_handle (port->dev->of_node); - msi->dev_domain =irq_domain_add_linear (NULL ,XILINX_NUM_MSI_IRQS , - &dev_msi_domain_ops, port); + msi->dev_domain =irq_domain_create_linear (NULL ,XILINX_NUM_MSI_IRQS , + &dev_msi_domain_ops, port);if (!msi->dev_domain) goto out;
@@ -585,15 +585,15 @@ static int xilinx_pl_dma_pcie_init_irq_domain(struct pl_dma_pcie *port)return -EINVAL ; } - port->pldma_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, port); + port->pldma_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, port);if (!port->pldma_domain)return -ENOMEM ;irq_domain_update_bus_token (port->pldma_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pcie-xilinx-nwl.c +3 -6
@@ -498,8 +498,7 @@ static int nwl_pcie_init_msi_irq_domain(struct nwl_pcie *pcie)struct fwnode_handle *fwnode =of_fwnode_handle (dev->of_node);struct nwl_msi *msi = &pcie->msi; - msi->dev_domain =irq_domain_add_linear (NULL ,INT_PCI_MSI_NR , - &dev_msi_domain_ops, pcie); + msi->dev_domain =irq_domain_create_linear (NULL ,INT_PCI_MSI_NR , &dev_msi_domain_ops, pcie);if (!msi->dev_domain) {dev_err (dev,"failed to create dev IRQ domain\n" );return -ENOMEM ;
@@ -582,10 +581,8 @@ static int nwl_pcie_init_irq_domain(struct nwl_pcie *pcie)return -EINVAL ; } - pcie->intx_irq_domain =irq_domain_add_linear (intc_node, -PCI_NUM_INTX , - &intx_domain_ops, - pcie); + pcie->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);of_node_put (intc_node);if (!pcie->intx_irq_domain) {dev_err (dev,"failed to create IRQ domain\n" );
drivers/pci/controller/pcie-xilinx.c +2 -3
@@ -461,9 +461,8 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie *pcie)return -ENODEV ; } - pcie->leg_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, - pcie); + pcie->leg_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);of_node_put (pcie_intc_node);if (!pcie->leg_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/plda/pcie-plda-host.c +6 -8
@@ -155,8 +155,7 @@ static int plda_allocate_msi_domains(struct plda_pcie_rp *port)mutex_init (&port->msi.lock); - msi->dev_domain =irq_domain_add_linear (NULL , msi->num_vectors, - &msi_domain_ops, port); + msi->dev_domain =irq_domain_create_linear (NULL , msi->num_vectors, &msi_domain_ops, port);if (!msi->dev_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
@@ -393,10 +392,9 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)return -EINVAL ; } - port->event_domain =irq_domain_add_linear (pcie_intc_node, - port->num_events, - &plda_event_domain_ops, - port); + port->event_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), + port->num_events, &plda_event_domain_ops, + port);if (!port->event_domain) {dev_err (dev,"failed to get event domain\n" );of_node_put (pcie_intc_node);
@@ -405,8 +403,8 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)irq_domain_update_bus_token (port->event_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) {dev_err (dev,"failed to get an INTx IRQ domain\n" );of_node_put (pcie_intc_node);
[tip: irq/cleanups] PCI: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: bbc94e6f72f25af19540dd4cb1c81633656500ae Gitweb: https://git.kernel.org/tip/bbc94e6f72f25af19540dd4cb1c81633656500ae Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:22 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:40 +02:00
PCI: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
[ tglx: Fix up subject prefix and convert the new instance in
dwc/pcie-amd-mdb.c ]
--- drivers/pci/controller/dwc/pci-dra7xx.c | 4 +-- drivers/pci/controller/dwc/pci-keystone.c | 2 +- drivers/pci/controller/dwc/pcie-amd-mdb.c | 8 +++--- drivers/pci/controller/dwc/pcie-dw-rockchip.c | 4 +-- drivers/pci/controller/dwc/pcie-uniphier.c | 2 +- drivers/pci/controller/mobiveil/pcie-mobiveil-host.c | 9 +++---- drivers/pci/controller/pci-aardvark.c | 14 +++-------- drivers/pci/controller/pci-ftpci100.c | 4 +-- drivers/pci/controller/pci-mvebu.c | 6 ++--- drivers/pci/controller/pci-xgene-msi.c | 3 +-- drivers/pci/controller/pcie-altera-msi.c | 2 +- drivers/pci/controller/pcie-altera.c | 2 +- drivers/pci/controller/pcie-brcmstb.c | 2 +- drivers/pci/controller/pcie-iproc-msi.c | 4 +-- drivers/pci/controller/pcie-mediatek-gen3.c | 9 +++---- drivers/pci/controller/pcie-mediatek.c | 4 +-- drivers/pci/controller/pcie-rockchip-host.c | 4 +-- drivers/pci/controller/pcie-xilinx-cpm.c | 10 +++----- drivers/pci/controller/pcie-xilinx-dma-pl.c | 12 ++++----- drivers/pci/controller/pcie-xilinx-nwl.c | 9 ++----- drivers/pci/controller/pcie-xilinx.c | 5 +--- drivers/pci/controller/plda/pcie-plda-host.c | 14 ++++------- 22 files changed, 60 insertions(+), 73 deletions(-)
drivers/pci/controller/dwc/pci-dra7xx.c +2 -2
@@ -359,8 +359,8 @@ static int dra7xx_pcie_init_irq_domain(struct dw_pcie_rp *pp)irq_set_chained_handler_and_data (pp->irq, dra7xx_pcie_msi_irq_handler, pp); - dra7xx->irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, pp); + dra7xx->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , &intx_domain_ops, pp);of_node_put (pcie_intc_node);if (!dra7xx->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/dwc/pci-keystone.c +1 -1
@@ -761,7 +761,7 @@ static int ks_pcie_config_intx_irq(struct keystone_pcie *ks_pcie) ks_pcie); } - intx_irq_domain =irq_domain_add_linear (intc_np,PCI_NUM_INTX , + intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (intc_np),PCI_NUM_INTX , &ks_pcie_intx_irq_domain_ops,NULL );if (!intx_irq_domain) {dev_err (dev,"Failed to add irq domain for INTX irqs\n" );
drivers/pci/controller/dwc/pcie-amd-mdb.c +4 -4
@@ -290,8 +290,8 @@ static int amd_mdb_pcie_init_irq_domains(struct amd_mdb_pcie *pcie,return -ENODEV ; } - pcie->mdb_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, pcie); + pcie->mdb_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, pcie);if (!pcie->mdb_domain) { err = -ENOMEM ;dev_err (dev,"Failed to add MDB domain\n" );
@@ -300,8 +300,8 @@ static int amd_mdb_pcie_init_irq_domains(struct amd_mdb_pcie *pcie,irq_domain_update_bus_token (pcie->mdb_domain,DOMAIN_BUS_NEXUS ); - pcie->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &amd_intx_domain_ops, pcie); + pcie->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , &amd_intx_domain_ops, pcie);if (!pcie->intx_domain) { err = -ENOMEM ;dev_err (dev,"Failed to add INTx domain\n" );
drivers/pci/controller/dwc/pcie-dw-rockchip.c +2 -2
@@ -144,8 +144,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)return -EINVAL ; } - rockchip->irq_domain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &intx_domain_ops, rockchip); + rockchip->irq_domain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &intx_domain_ops, rockchip);of_node_put (intc);if (!rockchip->irq_domain) {dev_err (dev,"failed to get a INTx IRQ domain\n" );
drivers/pci/controller/dwc/pcie-uniphier.c +1 -1
@@ -279,7 +279,7 @@ static int uniphier_pcie_config_intx_irq(struct dw_pcie_rp *pp) goto out_put_node; } - pcie->intx_irq_domain =irq_domain_add_linear (np_intc,PCI_NUM_INTX , + pcie->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (np_intc),PCI_NUM_INTX , &uniphier_intx_domain_ops, pp);if (!pcie->intx_irq_domain) {dev_err (pci->dev,"Failed to get INTx domain\n" );
drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +4 -5
@@ -439,8 +439,8 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)struct mobiveil_msi *msi = &pcie->rp.msi;mutex_init (&msi->lock); - msi->dev_domain =irq_domain_add_linear (NULL , msi->num_of_vectors, - &msi_domain_ops, pcie); + msi->dev_domain =irq_domain_create_linear (NULL , msi->num_of_vectors, + &msi_domain_ops, pcie);if (!msi->dev_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
@@ -461,12 +461,11 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)static int mobiveil_pcie_init_irq_domain (struct mobiveil_pcie *pcie) {struct device *dev = &pcie->pdev->dev; -struct device_node *node = dev->of_node;struct mobiveil_root_port *rp = &pcie->rp;/* setup INTx */ - rp->intx_domain =irq_domain_add_linear (node,PCI_NUM_INTX , - &intx_domain_ops, pcie); + rp->intx_domain =irq_domain_create_linear (of_fwnode_handle (dev->of_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);if (!rp->intx_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pci-aardvark.c +5 -9
@@ -1456,9 +1456,8 @@ static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)raw_spin_lock_init (&pcie->msi_irq_lock);mutex_init (&pcie->msi_used_lock); - pcie->msi_inner_domain = -irq_domain_add_linear (NULL ,MSI_IRQ_NUM , - &advk_msi_domain_ops, pcie); + pcie->msi_inner_domain =irq_domain_create_linear (NULL ,MSI_IRQ_NUM , + &advk_msi_domain_ops, pcie);if (!pcie->msi_inner_domain)return -ENOMEM ;
@@ -1508,9 +1507,8 @@ static int advk_pcie_init_irq_domain(struct advk_pcie *pcie) irq_chip->irq_mask = advk_pcie_irq_mask; irq_chip->irq_unmask = advk_pcie_irq_unmask; - pcie->irq_domain = -irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &advk_pcie_irq_domain_ops, pcie); + pcie->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &advk_pcie_irq_domain_ops, pcie);if (!pcie->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" ); ret = -ENOMEM ;
@@ -1549,9 +1547,7 @@ static const struct irq_domain_ops advk_pcie_rp_irq_domain_ops = {static int advk_pcie_init_rp_irq_domain (struct advk_pcie *pcie) { - pcie->rp_irq_domain =irq_domain_add_linear (NULL ,1 , - &advk_pcie_rp_irq_domain_ops, - pcie); + pcie->rp_irq_domain =irq_domain_create_linear (NULL ,1 , &advk_pcie_rp_irq_domain_ops, pcie);if (!pcie->rp_irq_domain) {dev_err (&pcie->pdev->dev,"Failed to add Root Port IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pci-ftpci100.c +2 -2
@@ -345,8 +345,8 @@ static int faraday_pci_setup_cascaded_irq(struct faraday_pci *p)return irq ?: -EINVAL ; } - p->irqdomain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &faraday_pci_irqdomain_ops, p); + p->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &faraday_pci_irqdomain_ops, p);of_node_put (intc);if (!p->irqdomain) {dev_err (p->dev,"failed to create Gemini PCI IRQ domain\n" );
drivers/pci/controller/pci-mvebu.c +3 -3
@@ -1078,9 +1078,9 @@ static int mvebu_pcie_init_irq_domain(struct mvebu_pcie_port *port)return -ENODEV ; } - port->intx_irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &mvebu_pcie_intx_irq_domain_ops, - port); + port->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , + &mvebu_pcie_intx_irq_domain_ops, port);of_node_put (pcie_intc_node);if (!port->intx_irq_domain) {dev_err (dev,"Failed to get INTx IRQ domain for %s\n" , port->name);
drivers/pci/controller/pci-xgene-msi.c +1 -2
@@ -242,8 +242,7 @@ static const struct irq_domain_ops msi_domain_ops = {static int xgene_allocate_domains (struct xgene_msi *msi) { - msi->inner_domain =irq_domain_add_linear (NULL ,NR_MSI_VEC , - &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL ,NR_MSI_VEC , &msi_domain_ops, msi);if (!msi->inner_domain)return -ENOMEM ;
drivers/pci/controller/pcie-altera-msi.c +1 -1
@@ -166,7 +166,7 @@ static int altera_allocate_domains(struct altera_msi *msi) {struct fwnode_handle *fwnode =of_fwnode_handle (msi->pdev->dev.of_node); - msi->inner_domain =irq_domain_add_linear (NULL , msi->num_of_vectors, + msi->inner_domain =irq_domain_create_linear (NULL , msi->num_of_vectors, &msi_domain_ops, msi);if (!msi->inner_domain) {dev_err (&msi->pdev->dev,"failed to create IRQ domain\n" );
drivers/pci/controller/pcie-altera.c +1 -1
@@ -855,7 +855,7 @@ static int altera_pcie_init_irq_domain(struct altera_pcie *pcie)struct device_node *node = dev->of_node;/* Setup INTx */ - pcie->irq_domain =irq_domain_add_linear (node,PCI_NUM_INTX , + pcie->irq_domain =irq_domain_create_linear (of_fwnode_handle (node),PCI_NUM_INTX , &intx_domain_ops, pcie);if (!pcie->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pcie-brcmstb.c +1 -1
@@ -584,7 +584,7 @@ static int brcm_allocate_domains(struct brcm_msi *msi)struct fwnode_handle *fwnode =of_fwnode_handle (msi->np);struct device *dev = msi->dev; - msi->inner_domain =irq_domain_add_linear (NULL , msi->nr, &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL , msi->nr, &msi_domain_ops, msi);if (!msi->inner_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pcie-iproc-msi.c +2 -2
@@ -446,8 +446,8 @@ static void iproc_msi_disable(struct iproc_msi *msi)static int iproc_msi_alloc_domains (struct device_node *node,struct iproc_msi *msi) { - msi->inner_domain =irq_domain_add_linear (NULL , msi->nr_msi_vecs, - &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL , msi->nr_msi_vecs, + &msi_domain_ops, msi);if (!msi->inner_domain)return -ENOMEM ;
drivers/pci/controller/pcie-mediatek-gen3.c +5 -4
@@ -745,8 +745,8 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)return -ENODEV ; } - pcie->intx_domain =irq_domain_add_linear (intc_node,PCI_NUM_INTX , - &intx_domain_ops, pcie); + pcie->intx_domain =irq_domain_create_linear (of_fwnode_handle (intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);if (!pcie->intx_domain) {dev_err (dev,"failed to create INTx IRQ domain\n" ); ret = -ENODEV ;
@@ -756,8 +756,9 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)/* Setup MSI */ mutex_init (&pcie->lock); - pcie->msi_bottom_domain =irq_domain_add_linear (node,PCIE_MSI_IRQS_NUM , - &mtk_msi_bottom_domain_ops, pcie); + pcie->msi_bottom_domain =irq_domain_create_linear (of_fwnode_handle (node), +PCIE_MSI_IRQS_NUM , + &mtk_msi_bottom_domain_ops, pcie);if (!pcie->msi_bottom_domain) {dev_err (dev,"failed to create MSI bottom domain\n" ); ret = -ENODEV ;
drivers/pci/controller/pcie-mediatek.c +2 -2
@@ -569,8 +569,8 @@ static int mtk_pcie_init_irq_domain(struct mtk_pcie_port *port,return -ENODEV ; } - port->irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);of_node_put (pcie_intc_node);if (!port->irq_domain) {dev_err (dev,"failed to get INTx IRQ domain\n" );
drivers/pci/controller/pcie-rockchip-host.c +2 -2
@@ -693,8 +693,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)return -EINVAL ; } - rockchip->irq_domain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &intx_domain_ops, rockchip); + rockchip->irq_domain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &intx_domain_ops, rockchip);of_node_put (intc);if (!rockchip->irq_domain) {dev_err (dev,"failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pcie-xilinx-cpm.c +4 -6
@@ -395,17 +395,15 @@ static int xilinx_cpm_pcie_init_irq_domain(struct xilinx_cpm_pcie *port)return -EINVAL ; } - port->cpm_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, - port); + port->cpm_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, port);if (!port->cpm_domain) goto out;irq_domain_update_bus_token (port->cpm_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, - port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) goto out;
drivers/pci/controller/pcie-xilinx-dma-pl.c +6 -6
@@ -472,8 +472,8 @@ static int xilinx_pl_dma_pcie_init_msi_irq_domain(struct pl_dma_pcie *port)int size =BITS_TO_LONGS (XILINX_NUM_MSI_IRQS ) *sizeof (long );struct fwnode_handle *fwnode =of_fwnode_handle (port->dev->of_node); - msi->dev_domain =irq_domain_add_linear (NULL ,XILINX_NUM_MSI_IRQS , - &dev_msi_domain_ops, port); + msi->dev_domain =irq_domain_create_linear (NULL ,XILINX_NUM_MSI_IRQS , + &dev_msi_domain_ops, port);if (!msi->dev_domain) goto out;
@@ -585,15 +585,15 @@ static int xilinx_pl_dma_pcie_init_irq_domain(struct pl_dma_pcie *port)return -EINVAL ; } - port->pldma_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, port); + port->pldma_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, port);if (!port->pldma_domain)return -ENOMEM ;irq_domain_update_bus_token (port->pldma_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pcie-xilinx-nwl.c +3 -6
@@ -498,8 +498,7 @@ static int nwl_pcie_init_msi_irq_domain(struct nwl_pcie *pcie)struct fwnode_handle *fwnode =of_fwnode_handle (dev->of_node);struct nwl_msi *msi = &pcie->msi; - msi->dev_domain =irq_domain_add_linear (NULL ,INT_PCI_MSI_NR , - &dev_msi_domain_ops, pcie); + msi->dev_domain =irq_domain_create_linear (NULL ,INT_PCI_MSI_NR , &dev_msi_domain_ops, pcie);if (!msi->dev_domain) {dev_err (dev,"failed to create dev IRQ domain\n" );return -ENOMEM ;
@@ -582,10 +581,8 @@ static int nwl_pcie_init_irq_domain(struct nwl_pcie *pcie)return -EINVAL ; } - pcie->intx_irq_domain =irq_domain_add_linear (intc_node, -PCI_NUM_INTX , - &intx_domain_ops, - pcie); + pcie->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);of_node_put (intc_node);if (!pcie->intx_irq_domain) {dev_err (dev,"failed to create IRQ domain\n" );
drivers/pci/controller/pcie-xilinx.c +2 -3
@@ -461,9 +461,8 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie *pcie)return -ENODEV ; } - pcie->leg_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, - pcie); + pcie->leg_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);of_node_put (pcie_intc_node);if (!pcie->leg_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/plda/pcie-plda-host.c +6 -8
@@ -155,8 +155,7 @@ static int plda_allocate_msi_domains(struct plda_pcie_rp *port)mutex_init (&port->msi.lock); - msi->dev_domain =irq_domain_add_linear (NULL , msi->num_vectors, - &msi_domain_ops, port); + msi->dev_domain =irq_domain_create_linear (NULL , msi->num_vectors, &msi_domain_ops, port);if (!msi->dev_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
@@ -393,10 +392,9 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)return -EINVAL ; } - port->event_domain =irq_domain_add_linear (pcie_intc_node, - port->num_events, - &plda_event_domain_ops, - port); + port->event_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), + port->num_events, &plda_event_domain_ops, + port);if (!port->event_domain) {dev_err (dev,"failed to get event domain\n" );of_node_put (pcie_intc_node);
@@ -405,8 +403,8 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)irq_domain_update_bus_token (port->event_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) {dev_err (dev,"failed to get an INTx IRQ domain\n" );of_node_put (pcie_intc_node);
[tip: irq/cleanups] PCI: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 4b5e1d97154df4e0e2dabfc3e6bef68b87265a55 Gitweb: https://git.kernel.org/tip/4b5e1d97154df4e0e2dabfc3e6bef68b87265a55 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:22 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Fri, 16 May 2025 21:06:10 +02:00
PCI: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
[ tglx: Fix up subject prefix and convert the new instance in
dwc/pcie-amd-mdb.c ]
--- drivers/pci/controller/dwc/pci-dra7xx.c | 4 +-- drivers/pci/controller/dwc/pci-keystone.c | 2 +- drivers/pci/controller/dwc/pcie-amd-mdb.c | 8 +++--- drivers/pci/controller/dwc/pcie-dw-rockchip.c | 4 +-- drivers/pci/controller/dwc/pcie-uniphier.c | 2 +- drivers/pci/controller/mobiveil/pcie-mobiveil-host.c | 9 +++---- drivers/pci/controller/pci-aardvark.c | 14 +++-------- drivers/pci/controller/pci-ftpci100.c | 4 +-- drivers/pci/controller/pci-mvebu.c | 6 ++--- drivers/pci/controller/pcie-altera-msi.c | 2 +- drivers/pci/controller/pcie-altera.c | 2 +- drivers/pci/controller/pcie-brcmstb.c | 2 +- drivers/pci/controller/pcie-iproc-msi.c | 4 +-- drivers/pci/controller/pcie-mediatek-gen3.c | 9 +++---- drivers/pci/controller/pcie-mediatek.c | 4 +-- drivers/pci/controller/pcie-rockchip-host.c | 4 +-- drivers/pci/controller/pcie-xilinx-cpm.c | 10 +++----- drivers/pci/controller/pcie-xilinx-dma-pl.c | 12 ++++----- drivers/pci/controller/pcie-xilinx-nwl.c | 9 ++----- drivers/pci/controller/pcie-xilinx.c | 5 +--- drivers/pci/controller/plda/pcie-plda-host.c | 14 ++++------- 21 files changed, 59 insertions(+), 71 deletions(-)
drivers/pci/controller/dwc/pci-dra7xx.c +2 -2
@@ -359,8 +359,8 @@ static int dra7xx_pcie_init_irq_domain(struct dw_pcie_rp *pp)irq_set_chained_handler_and_data (pp->irq, dra7xx_pcie_msi_irq_handler, pp); - dra7xx->irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, pp); + dra7xx->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , &intx_domain_ops, pp);of_node_put (pcie_intc_node);if (!dra7xx->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/dwc/pci-keystone.c +1 -1
@@ -761,7 +761,7 @@ static int ks_pcie_config_intx_irq(struct keystone_pcie *ks_pcie) ks_pcie); } - intx_irq_domain =irq_domain_add_linear (intc_np,PCI_NUM_INTX , + intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (intc_np),PCI_NUM_INTX , &ks_pcie_intx_irq_domain_ops,NULL );if (!intx_irq_domain) {dev_err (dev,"Failed to add irq domain for INTX irqs\n" );
drivers/pci/controller/dwc/pcie-amd-mdb.c +4 -4
@@ -290,8 +290,8 @@ static int amd_mdb_pcie_init_irq_domains(struct amd_mdb_pcie *pcie,return -ENODEV ; } - pcie->mdb_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, pcie); + pcie->mdb_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, pcie);if (!pcie->mdb_domain) { err = -ENOMEM ;dev_err (dev,"Failed to add MDB domain\n" );
@@ -300,8 +300,8 @@ static int amd_mdb_pcie_init_irq_domains(struct amd_mdb_pcie *pcie,irq_domain_update_bus_token (pcie->mdb_domain,DOMAIN_BUS_NEXUS ); - pcie->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &amd_intx_domain_ops, pcie); + pcie->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , &amd_intx_domain_ops, pcie);if (!pcie->intx_domain) { err = -ENOMEM ;dev_err (dev,"Failed to add INTx domain\n" );
drivers/pci/controller/dwc/pcie-dw-rockchip.c +2 -2
@@ -144,8 +144,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)return -EINVAL ; } - rockchip->irq_domain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &intx_domain_ops, rockchip); + rockchip->irq_domain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &intx_domain_ops, rockchip);of_node_put (intc);if (!rockchip->irq_domain) {dev_err (dev,"failed to get a INTx IRQ domain\n" );
drivers/pci/controller/dwc/pcie-uniphier.c +1 -1
@@ -279,7 +279,7 @@ static int uniphier_pcie_config_intx_irq(struct dw_pcie_rp *pp) goto out_put_node; } - pcie->intx_irq_domain =irq_domain_add_linear (np_intc,PCI_NUM_INTX , + pcie->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (np_intc),PCI_NUM_INTX , &uniphier_intx_domain_ops, pp);if (!pcie->intx_irq_domain) {dev_err (pci->dev,"Failed to get INTx domain\n" );
drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +4 -5
@@ -439,8 +439,8 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)struct mobiveil_msi *msi = &pcie->rp.msi;mutex_init (&msi->lock); - msi->dev_domain =irq_domain_add_linear (NULL , msi->num_of_vectors, - &msi_domain_ops, pcie); + msi->dev_domain =irq_domain_create_linear (NULL , msi->num_of_vectors, + &msi_domain_ops, pcie);if (!msi->dev_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
@@ -461,12 +461,11 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)static int mobiveil_pcie_init_irq_domain (struct mobiveil_pcie *pcie) {struct device *dev = &pcie->pdev->dev; -struct device_node *node = dev->of_node;struct mobiveil_root_port *rp = &pcie->rp;/* setup INTx */ - rp->intx_domain =irq_domain_add_linear (node,PCI_NUM_INTX , - &intx_domain_ops, pcie); + rp->intx_domain =irq_domain_create_linear (of_fwnode_handle (dev->of_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);if (!rp->intx_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pci-aardvark.c +5 -9
@@ -1456,9 +1456,8 @@ static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)raw_spin_lock_init (&pcie->msi_irq_lock);mutex_init (&pcie->msi_used_lock); - pcie->msi_inner_domain = -irq_domain_add_linear (NULL ,MSI_IRQ_NUM , - &advk_msi_domain_ops, pcie); + pcie->msi_inner_domain =irq_domain_create_linear (NULL ,MSI_IRQ_NUM , + &advk_msi_domain_ops, pcie);if (!pcie->msi_inner_domain)return -ENOMEM ;
@@ -1508,9 +1507,8 @@ static int advk_pcie_init_irq_domain(struct advk_pcie *pcie) irq_chip->irq_mask = advk_pcie_irq_mask; irq_chip->irq_unmask = advk_pcie_irq_unmask; - pcie->irq_domain = -irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &advk_pcie_irq_domain_ops, pcie); + pcie->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &advk_pcie_irq_domain_ops, pcie);if (!pcie->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" ); ret = -ENOMEM ;
@@ -1549,9 +1547,7 @@ static const struct irq_domain_ops advk_pcie_rp_irq_domain_ops = {static int advk_pcie_init_rp_irq_domain (struct advk_pcie *pcie) { - pcie->rp_irq_domain =irq_domain_add_linear (NULL ,1 , - &advk_pcie_rp_irq_domain_ops, - pcie); + pcie->rp_irq_domain =irq_domain_create_linear (NULL ,1 , &advk_pcie_rp_irq_domain_ops, pcie);if (!pcie->rp_irq_domain) {dev_err (&pcie->pdev->dev,"Failed to add Root Port IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pci-ftpci100.c +2 -2
@@ -345,8 +345,8 @@ static int faraday_pci_setup_cascaded_irq(struct faraday_pci *p)return irq ?: -EINVAL ; } - p->irqdomain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &faraday_pci_irqdomain_ops, p); + p->irqdomain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &faraday_pci_irqdomain_ops, p);of_node_put (intc);if (!p->irqdomain) {dev_err (p->dev,"failed to create Gemini PCI IRQ domain\n" );
drivers/pci/controller/pci-mvebu.c +3 -3
@@ -1078,9 +1078,9 @@ static int mvebu_pcie_init_irq_domain(struct mvebu_pcie_port *port)return -ENODEV ; } - port->intx_irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &mvebu_pcie_intx_irq_domain_ops, - port); + port->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), +PCI_NUM_INTX , + &mvebu_pcie_intx_irq_domain_ops, port);of_node_put (pcie_intc_node);if (!port->intx_irq_domain) {dev_err (dev,"Failed to get INTx IRQ domain for %s\n" , port->name);
drivers/pci/controller/pcie-altera-msi.c +1 -1
@@ -166,7 +166,7 @@ static int altera_allocate_domains(struct altera_msi *msi) {struct fwnode_handle *fwnode =of_fwnode_handle (msi->pdev->dev.of_node); - msi->inner_domain =irq_domain_add_linear (NULL , msi->num_of_vectors, + msi->inner_domain =irq_domain_create_linear (NULL , msi->num_of_vectors, &msi_domain_ops, msi);if (!msi->inner_domain) {dev_err (&msi->pdev->dev,"failed to create IRQ domain\n" );
drivers/pci/controller/pcie-altera.c +1 -1
@@ -855,7 +855,7 @@ static int altera_pcie_init_irq_domain(struct altera_pcie *pcie)struct device_node *node = dev->of_node;/* Setup INTx */ - pcie->irq_domain =irq_domain_add_linear (node,PCI_NUM_INTX , + pcie->irq_domain =irq_domain_create_linear (of_fwnode_handle (node),PCI_NUM_INTX , &intx_domain_ops, pcie);if (!pcie->irq_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pcie-brcmstb.c +1 -1
@@ -584,7 +584,7 @@ static int brcm_allocate_domains(struct brcm_msi *msi)struct fwnode_handle *fwnode =of_fwnode_handle (msi->np);struct device *dev = msi->dev; - msi->inner_domain =irq_domain_add_linear (NULL , msi->nr, &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL , msi->nr, &msi_domain_ops, msi);if (!msi->inner_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pcie-iproc-msi.c +2 -2
@@ -446,8 +446,8 @@ static void iproc_msi_disable(struct iproc_msi *msi)static int iproc_msi_alloc_domains (struct device_node *node,struct iproc_msi *msi) { - msi->inner_domain =irq_domain_add_linear (NULL , msi->nr_msi_vecs, - &msi_domain_ops, msi); + msi->inner_domain =irq_domain_create_linear (NULL , msi->nr_msi_vecs, + &msi_domain_ops, msi);if (!msi->inner_domain)return -ENOMEM ;
drivers/pci/controller/pcie-mediatek-gen3.c +5 -4
@@ -745,8 +745,8 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)return -ENODEV ; } - pcie->intx_domain =irq_domain_add_linear (intc_node,PCI_NUM_INTX , - &intx_domain_ops, pcie); + pcie->intx_domain =irq_domain_create_linear (of_fwnode_handle (intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);if (!pcie->intx_domain) {dev_err (dev,"failed to create INTx IRQ domain\n" ); ret = -ENODEV ;
@@ -756,8 +756,9 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)/* Setup MSI */ mutex_init (&pcie->lock); - pcie->msi_bottom_domain =irq_domain_add_linear (node,PCIE_MSI_IRQS_NUM , - &mtk_msi_bottom_domain_ops, pcie); + pcie->msi_bottom_domain =irq_domain_create_linear (of_fwnode_handle (node), +PCIE_MSI_IRQS_NUM , + &mtk_msi_bottom_domain_ops, pcie);if (!pcie->msi_bottom_domain) {dev_err (dev,"failed to create MSI bottom domain\n" ); ret = -ENODEV ;
drivers/pci/controller/pcie-mediatek.c +2 -2
@@ -569,8 +569,8 @@ static int mtk_pcie_init_irq_domain(struct mtk_pcie_port *port,return -ENODEV ; } - port->irq_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->irq_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);of_node_put (pcie_intc_node);if (!port->irq_domain) {dev_err (dev,"failed to get INTx IRQ domain\n" );
drivers/pci/controller/pcie-rockchip-host.c +2 -2
@@ -693,8 +693,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)return -EINVAL ; } - rockchip->irq_domain =irq_domain_add_linear (intc,PCI_NUM_INTX , - &intx_domain_ops, rockchip); + rockchip->irq_domain =irq_domain_create_linear (of_fwnode_handle (intc),PCI_NUM_INTX , + &intx_domain_ops, rockchip);of_node_put (intc);if (!rockchip->irq_domain) {dev_err (dev,"failed to get a INTx IRQ domain\n" );
drivers/pci/controller/pcie-xilinx-cpm.c +4 -6
@@ -395,17 +395,15 @@ static int xilinx_cpm_pcie_init_irq_domain(struct xilinx_cpm_pcie *port)return -EINVAL ; } - port->cpm_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, - port); + port->cpm_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, port);if (!port->cpm_domain) goto out;irq_domain_update_bus_token (port->cpm_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, - port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) goto out;
drivers/pci/controller/pcie-xilinx-dma-pl.c +6 -6
@@ -472,8 +472,8 @@ static int xilinx_pl_dma_pcie_init_msi_irq_domain(struct pl_dma_pcie *port)int size =BITS_TO_LONGS (XILINX_NUM_MSI_IRQS ) *sizeof (long );struct fwnode_handle *fwnode =of_fwnode_handle (port->dev->of_node); - msi->dev_domain =irq_domain_add_linear (NULL ,XILINX_NUM_MSI_IRQS , - &dev_msi_domain_ops, port); + msi->dev_domain =irq_domain_create_linear (NULL ,XILINX_NUM_MSI_IRQS , + &dev_msi_domain_ops, port);if (!msi->dev_domain) goto out;
@@ -585,15 +585,15 @@ static int xilinx_pl_dma_pcie_init_irq_domain(struct pl_dma_pcie *port)return -EINVAL ; } - port->pldma_domain =irq_domain_add_linear (pcie_intc_node,32 , - &event_domain_ops, port); + port->pldma_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),32 , + &event_domain_ops, port);if (!port->pldma_domain)return -ENOMEM ;irq_domain_update_bus_token (port->pldma_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );return -ENOMEM ;
drivers/pci/controller/pcie-xilinx-nwl.c +3 -6
@@ -498,8 +498,7 @@ static int nwl_pcie_init_msi_irq_domain(struct nwl_pcie *pcie)struct fwnode_handle *fwnode =of_fwnode_handle (dev->of_node);struct nwl_msi *msi = &pcie->msi; - msi->dev_domain =irq_domain_add_linear (NULL ,INT_PCI_MSI_NR , - &dev_msi_domain_ops, pcie); + msi->dev_domain =irq_domain_create_linear (NULL ,INT_PCI_MSI_NR , &dev_msi_domain_ops, pcie);if (!msi->dev_domain) {dev_err (dev,"failed to create dev IRQ domain\n" );return -ENOMEM ;
@@ -582,10 +581,8 @@ static int nwl_pcie_init_irq_domain(struct nwl_pcie *pcie)return -EINVAL ; } - pcie->intx_irq_domain =irq_domain_add_linear (intc_node, -PCI_NUM_INTX , - &intx_domain_ops, - pcie); + pcie->intx_irq_domain =irq_domain_create_linear (of_fwnode_handle (intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);of_node_put (intc_node);if (!pcie->intx_irq_domain) {dev_err (dev,"failed to create IRQ domain\n" );
drivers/pci/controller/pcie-xilinx.c +2 -3
@@ -461,9 +461,8 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie *pcie)return -ENODEV ; } - pcie->leg_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, - pcie); + pcie->leg_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, pcie);of_node_put (pcie_intc_node);if (!pcie->leg_domain) {dev_err (dev,"Failed to get a INTx IRQ domain\n" );
drivers/pci/controller/plda/pcie-plda-host.c +6 -8
@@ -155,8 +155,7 @@ static int plda_allocate_msi_domains(struct plda_pcie_rp *port)mutex_init (&port->msi.lock); - msi->dev_domain =irq_domain_add_linear (NULL , msi->num_vectors, - &msi_domain_ops, port); + msi->dev_domain =irq_domain_create_linear (NULL , msi->num_vectors, &msi_domain_ops, port);if (!msi->dev_domain) {dev_err (dev,"failed to create IRQ domain\n" );return -ENOMEM ;
@@ -393,10 +392,9 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)return -EINVAL ; } - port->event_domain =irq_domain_add_linear (pcie_intc_node, - port->num_events, - &plda_event_domain_ops, - port); + port->event_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node), + port->num_events, &plda_event_domain_ops, + port);if (!port->event_domain) {dev_err (dev,"failed to get event domain\n" );of_node_put (pcie_intc_node);
@@ -405,8 +403,8 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)irq_domain_update_bus_token (port->event_domain,DOMAIN_BUS_NEXUS ); - port->intx_domain =irq_domain_add_linear (pcie_intc_node,PCI_NUM_INTX , - &intx_domain_ops, port); + port->intx_domain =irq_domain_create_linear (of_fwnode_handle (pcie_intc_node),PCI_NUM_INTX , + &intx_domain_ops, port);if (!port->intx_domain) {dev_err (dev,"failed to get an INTx IRQ domain\n" );of_node_put (pcie_intc_node);
PATCH v2 30/57 irqdomain: pinctrl: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)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).
--- drivers/pinctrl/mediatek/mtk-eint.c | 5 ++--- drivers/pinctrl/pinctrl-at91-pio4.c | 2 +- drivers/pinctrl/pinctrl-single.c | 9 +++++---- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 7 +++---- 4 files changed, 11 insertions(+), 12 deletions(-)
drivers/pinctrl/mediatek/mtk-eint.c +2 -3
@@ -508,9 +508,8 @@ int mtk_eint_do_init(struct mtk_eint *eint)if (!eint->dual_edge)return -ENOMEM ; - eint->domain =irq_domain_add_linear (eint->dev->of_node, - eint->hw->ap_num, - &irq_domain_simple_ops,NULL ); + eint->domain =irq_domain_create_linear (of_fwnode_handle (eint->dev->of_node), + eint->hw->ap_num, &irq_domain_simple_ops,NULL );if (!eint->domain)return -ENOMEM ;
drivers/pinctrl/pinctrl-at91-pio4.c +1 -1
@@ -1206,7 +1206,7 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)dev_dbg (dev,"bank %i: irq=%d\n" , i, ret); } - atmel_pioctrl->irq_domain =irq_domain_add_linear (dev->of_node, + atmel_pioctrl->irq_domain =irq_domain_create_linear (of_fwnode_handle (dev->of_node), atmel_pioctrl->gpio_chip->ngpio, &irq_domain_simple_ops,NULL );if (!atmel_pioctrl->irq_domain)
drivers/pinctrl/pinctrl-single.c +5 -4
@@ -1611,15 +1611,16 @@ static int pcs_irq_init_chained_handler(struct pcs_device *pcs,/* * We can use the register offset as the hardirq -* number as irq_domain_add_simple maps them lazily. +* number as irq_domain_create_simple maps them lazily. * This way we can easily support more than one * interrupt per function if needed. */ num_irqs = pcs->size; - pcs->domain =irq_domain_add_simple (np, num_irqs,0 , - &pcs_irqdomain_ops, - pcs_soc); + pcs->domain =irq_domain_create_simple (of_fwnode_handle (np), + num_irqs,0 , + &pcs_irqdomain_ops, + pcs_soc);if (!pcs->domain) {irq_set_chained_handler (pcs_soc->irq,NULL );return -EINVAL ;
drivers/pinctrl/sunxi/pinctrl-sunxi.c +3 -4
@@ -1646,10 +1646,9 @@ int sunxi_pinctrl_init_with_flags(struct platform_device *pdev, } } - pctl->domain =irq_domain_add_linear (node, - pctl->desc->irq_banks *IRQ_PER_BANK , - &sunxi_pinctrl_irq_domain_ops, - pctl); + pctl->domain =irq_domain_create_linear (of_fwnode_handle (node), + pctl->desc->irq_banks *IRQ_PER_BANK , + &sunxi_pinctrl_irq_domain_ops, pctl);if (!pctl->domain) {dev_err (&pdev->dev,"Couldn't register IRQ domain\n" ); ret = -ENOMEM ;
Signature · 1 line
2.49.0
Re: [PATCH v2 30/57] irqdomain: pinctrl: Switch to irq_domain_create_*()
Quoted 6 lines · Jiri Slaby (SUSE)
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_handleinstead of structdevice_node. Therefore,of_fwnode_handle()is added around the original parameter.
Quoted 6 lines
Note some of the users can likely use
dev->fwnodedirectly instead of indirectof_fwnode_handle(dev->of_node). Butdev->fwnodeis 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) <[email protected]>
I assume there are dependencies in the series, if this is something I should just apply to the pinctrl tree, tell me.
Yours,
Linus Walleij
[tip: irq/cleanups] pinctrl: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: bd7d1603347f36c16ca7f6df42cdb0f95c45ce02 Gitweb: https://git.kernel.org/tip/bd7d1603347f36c16ca7f6df42cdb0f95c45ce02 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:23 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:06 +02:00
pinctrl: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/pinctrl/mediatek/mtk-eint.c | 5 ++--- drivers/pinctrl/pinctrl-at91-pio4.c | 2 +- drivers/pinctrl/pinctrl-single.c | 9 +++++---- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 7 +++---- 4 files changed, 11 insertions(+), 12 deletions(-)
drivers/pinctrl/mediatek/mtk-eint.c +2 -3
@@ -565,9 +565,8 @@ int mtk_eint_do_init(struct mtk_eint *eint) goto err_eint; } - eint->domain =irq_domain_add_linear (eint->dev->of_node, - eint->hw->ap_num, - &irq_domain_simple_ops,NULL ); + eint->domain =irq_domain_create_linear (of_fwnode_handle (eint->dev->of_node), + eint->hw->ap_num, &irq_domain_simple_ops,NULL );if (!eint->domain) goto err_eint;
drivers/pinctrl/pinctrl-at91-pio4.c +1 -1
@@ -1206,7 +1206,7 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)dev_dbg (dev,"bank %i: irq=%d\n" , i, ret); } - atmel_pioctrl->irq_domain =irq_domain_add_linear (dev->of_node, + atmel_pioctrl->irq_domain =irq_domain_create_linear (of_fwnode_handle (dev->of_node), atmel_pioctrl->gpio_chip->ngpio, &irq_domain_simple_ops,NULL );if (!atmel_pioctrl->irq_domain)
drivers/pinctrl/pinctrl-single.c +5 -4
@@ -1611,15 +1611,16 @@ static int pcs_irq_init_chained_handler(struct pcs_device *pcs,/* * We can use the register offset as the hardirq -* number as irq_domain_add_simple maps them lazily. +* number as irq_domain_create_simple maps them lazily. * This way we can easily support more than one * interrupt per function if needed. */ num_irqs = pcs->size; - pcs->domain =irq_domain_add_simple (np, num_irqs,0 , - &pcs_irqdomain_ops, - pcs_soc); + pcs->domain =irq_domain_create_simple (of_fwnode_handle (np), + num_irqs,0 , + &pcs_irqdomain_ops, + pcs_soc);if (!pcs->domain) {irq_set_chained_handler (pcs_soc->irq,NULL );return -EINVAL ;
drivers/pinctrl/sunxi/pinctrl-sunxi.c +3 -4
@@ -1646,10 +1646,9 @@ int sunxi_pinctrl_init_with_flags(struct platform_device *pdev, } } - pctl->domain =irq_domain_add_linear (node, - pctl->desc->irq_banks *IRQ_PER_BANK , - &sunxi_pinctrl_irq_domain_ops, - pctl); + pctl->domain =irq_domain_create_linear (of_fwnode_handle (node), + pctl->desc->irq_banks *IRQ_PER_BANK , + &sunxi_pinctrl_irq_domain_ops, pctl);if (!pctl->domain) {dev_err (&pdev->dev,"Couldn't register IRQ domain\n" ); ret = -ENOMEM ;
[tip: irq/cleanups] pinctrl: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: ce02b44ff5de3b960652fa6d773a5fe160c19d42 Gitweb: https://git.kernel.org/tip/ce02b44ff5de3b960652fa6d773a5fe160c19d42 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:23 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:23 +02:00
pinctrl: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/pinctrl/mediatek/mtk-eint.c | 5 ++--- drivers/pinctrl/pinctrl-at91-pio4.c | 2 +- drivers/pinctrl/pinctrl-single.c | 9 +++++---- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 7 +++---- 4 files changed, 11 insertions(+), 12 deletions(-)
drivers/pinctrl/mediatek/mtk-eint.c +2 -3
@@ -565,9 +565,8 @@ int mtk_eint_do_init(struct mtk_eint *eint) goto err_eint; } - eint->domain =irq_domain_add_linear (eint->dev->of_node, - eint->hw->ap_num, - &irq_domain_simple_ops,NULL ); + eint->domain =irq_domain_create_linear (of_fwnode_handle (eint->dev->of_node), + eint->hw->ap_num, &irq_domain_simple_ops,NULL );if (!eint->domain) goto err_eint;
drivers/pinctrl/pinctrl-at91-pio4.c +1 -1
@@ -1206,7 +1206,7 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)dev_dbg (dev,"bank %i: irq=%d\n" , i, ret); } - atmel_pioctrl->irq_domain =irq_domain_add_linear (dev->of_node, + atmel_pioctrl->irq_domain =irq_domain_create_linear (of_fwnode_handle (dev->of_node), atmel_pioctrl->gpio_chip->ngpio, &irq_domain_simple_ops,NULL );if (!atmel_pioctrl->irq_domain)
drivers/pinctrl/pinctrl-single.c +5 -4
@@ -1611,15 +1611,16 @@ static int pcs_irq_init_chained_handler(struct pcs_device *pcs,/* * We can use the register offset as the hardirq -* number as irq_domain_add_simple maps them lazily. +* number as irq_domain_create_simple maps them lazily. * This way we can easily support more than one * interrupt per function if needed. */ num_irqs = pcs->size; - pcs->domain =irq_domain_add_simple (np, num_irqs,0 , - &pcs_irqdomain_ops, - pcs_soc); + pcs->domain =irq_domain_create_simple (of_fwnode_handle (np), + num_irqs,0 , + &pcs_irqdomain_ops, + pcs_soc);if (!pcs->domain) {irq_set_chained_handler (pcs_soc->irq,NULL );return -EINVAL ;
drivers/pinctrl/sunxi/pinctrl-sunxi.c +3 -4
@@ -1646,10 +1646,9 @@ int sunxi_pinctrl_init_with_flags(struct platform_device *pdev, } } - pctl->domain =irq_domain_add_linear (node, - pctl->desc->irq_banks *IRQ_PER_BANK , - &sunxi_pinctrl_irq_domain_ops, - pctl); + pctl->domain =irq_domain_create_linear (of_fwnode_handle (node), + pctl->desc->irq_banks *IRQ_PER_BANK , + &sunxi_pinctrl_irq_domain_ops, pctl);if (!pctl->domain) {dev_err (&pdev->dev,"Couldn't register IRQ domain\n" ); ret = -ENOMEM ;
[tip: irq/cleanups] pinctrl: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 1de046e6f09e5fec052e997e6e983d06814792e0 Gitweb: https://git.kernel.org/tip/1de046e6f09e5fec052e997e6e983d06814792e0 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:23 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:40 +02:00
pinctrl: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/pinctrl/mediatek/mtk-eint.c | 5 ++--- drivers/pinctrl/pinctrl-at91-pio4.c | 2 +- drivers/pinctrl/pinctrl-single.c | 9 +++++---- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 7 +++---- 4 files changed, 11 insertions(+), 12 deletions(-)
drivers/pinctrl/mediatek/mtk-eint.c +2 -3
@@ -565,9 +565,8 @@ int mtk_eint_do_init(struct mtk_eint *eint) goto err_eint; } - eint->domain =irq_domain_add_linear (eint->dev->of_node, - eint->hw->ap_num, - &irq_domain_simple_ops,NULL ); + eint->domain =irq_domain_create_linear (of_fwnode_handle (eint->dev->of_node), + eint->hw->ap_num, &irq_domain_simple_ops,NULL );if (!eint->domain) goto err_eint;
drivers/pinctrl/pinctrl-at91-pio4.c +1 -1
@@ -1206,7 +1206,7 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)dev_dbg (dev,"bank %i: irq=%d\n" , i, ret); } - atmel_pioctrl->irq_domain =irq_domain_add_linear (dev->of_node, + atmel_pioctrl->irq_domain =irq_domain_create_linear (of_fwnode_handle (dev->of_node), atmel_pioctrl->gpio_chip->ngpio, &irq_domain_simple_ops,NULL );if (!atmel_pioctrl->irq_domain)
drivers/pinctrl/pinctrl-single.c +5 -4
@@ -1611,15 +1611,16 @@ static int pcs_irq_init_chained_handler(struct pcs_device *pcs,/* * We can use the register offset as the hardirq -* number as irq_domain_add_simple maps them lazily. +* number as irq_domain_create_simple maps them lazily. * This way we can easily support more than one * interrupt per function if needed. */ num_irqs = pcs->size; - pcs->domain =irq_domain_add_simple (np, num_irqs,0 , - &pcs_irqdomain_ops, - pcs_soc); + pcs->domain =irq_domain_create_simple (of_fwnode_handle (np), + num_irqs,0 , + &pcs_irqdomain_ops, + pcs_soc);if (!pcs->domain) {irq_set_chained_handler (pcs_soc->irq,NULL );return -EINVAL ;
drivers/pinctrl/sunxi/pinctrl-sunxi.c +3 -4
@@ -1646,10 +1646,9 @@ int sunxi_pinctrl_init_with_flags(struct platform_device *pdev, } } - pctl->domain =irq_domain_add_linear (node, - pctl->desc->irq_banks *IRQ_PER_BANK , - &sunxi_pinctrl_irq_domain_ops, - pctl); + pctl->domain =irq_domain_create_linear (of_fwnode_handle (node), + pctl->desc->irq_banks *IRQ_PER_BANK , + &sunxi_pinctrl_irq_domain_ops, pctl);if (!pctl->domain) {dev_err (&pdev->dev,"Couldn't register IRQ domain\n" ); ret = -ENOMEM ;
[tip: irq/cleanups] pinctrl: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 219182fe2190ddaf6288bf24dd9a43d2c96316d2 Gitweb: https://git.kernel.org/tip/219182fe2190ddaf6288bf24dd9a43d2c96316d2 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:23 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Fri, 16 May 2025 21:06:11 +02:00
pinctrl: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/pinctrl/mediatek/mtk-eint.c | 5 ++--- drivers/pinctrl/pinctrl-at91-pio4.c | 2 +- drivers/pinctrl/pinctrl-single.c | 9 +++++---- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 7 +++---- 4 files changed, 11 insertions(+), 12 deletions(-)
drivers/pinctrl/mediatek/mtk-eint.c +2 -3
@@ -565,9 +565,8 @@ int mtk_eint_do_init(struct mtk_eint *eint) goto err_eint; } - eint->domain =irq_domain_add_linear (eint->dev->of_node, - eint->hw->ap_num, - &irq_domain_simple_ops,NULL ); + eint->domain =irq_domain_create_linear (of_fwnode_handle (eint->dev->of_node), + eint->hw->ap_num, &irq_domain_simple_ops,NULL );if (!eint->domain) goto err_eint;
drivers/pinctrl/pinctrl-at91-pio4.c +1 -1
@@ -1206,7 +1206,7 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)dev_dbg (dev,"bank %i: irq=%d\n" , i, ret); } - atmel_pioctrl->irq_domain =irq_domain_add_linear (dev->of_node, + atmel_pioctrl->irq_domain =irq_domain_create_linear (of_fwnode_handle (dev->of_node), atmel_pioctrl->gpio_chip->ngpio, &irq_domain_simple_ops,NULL );if (!atmel_pioctrl->irq_domain)
drivers/pinctrl/pinctrl-single.c +5 -4
@@ -1611,15 +1611,16 @@ static int pcs_irq_init_chained_handler(struct pcs_device *pcs,/* * We can use the register offset as the hardirq -* number as irq_domain_add_simple maps them lazily. +* number as irq_domain_create_simple maps them lazily. * This way we can easily support more than one * interrupt per function if needed. */ num_irqs = pcs->size; - pcs->domain =irq_domain_add_simple (np, num_irqs,0 , - &pcs_irqdomain_ops, - pcs_soc); + pcs->domain =irq_domain_create_simple (of_fwnode_handle (np), + num_irqs,0 , + &pcs_irqdomain_ops, + pcs_soc);if (!pcs->domain) {irq_set_chained_handler (pcs_soc->irq,NULL );return -EINVAL ;
drivers/pinctrl/sunxi/pinctrl-sunxi.c +3 -4
@@ -1646,10 +1646,9 @@ int sunxi_pinctrl_init_with_flags(struct platform_device *pdev, } } - pctl->domain =irq_domain_add_linear (node, - pctl->desc->irq_banks *IRQ_PER_BANK , - &sunxi_pinctrl_irq_domain_ops, - pctl); + pctl->domain =irq_domain_create_linear (of_fwnode_handle (node), + pctl->desc->irq_banks *IRQ_PER_BANK , + &sunxi_pinctrl_irq_domain_ops, pctl);if (!pctl->domain) {dev_err (&pdev->dev,"Couldn't register IRQ domain\n" ); ret = -ENOMEM ;
PATCH v2 31/57 irqdomain: platform/x86: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
--- drivers/platform/x86/asus-tf103c-dock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/asus-tf103c-dock.c +1 -1
@@ -856,7 +856,7 @@ static int tf103c_dock_probe(struct i2c_client *client)/* 5. Setup irqchip for touchpad IRQ pass-through */ dock->tp_irqchip.name =KBUILD_MODNAME ; - dock->tp_irq_domain =irq_domain_add_linear (NULL ,1 , &irq_domain_simple_ops,NULL ); + dock->tp_irq_domain =irq_domain_create_linear (NULL ,1 , &irq_domain_simple_ops,NULL );if (!dock->tp_irq_domain)return -ENOMEM ;
Signature · 1 line
2.49.0
Re: [PATCH v2 31/57] irqdomain: platform/x86: Switch to irq_domain_create_linear()
Quoted 11 lines · Jiri Slaby (SUSE)
irq_domain_add_linear()is going away as being obsolete now. Switch to the preferredirq_domain_create_linear(). That differs in the first
parameter: It takes more generic structfwnode_handleinstead of structdevice_node. Therefore,of_fwnode_handle()is added around the parameter.Note some of the users can likely use
dev->fwnodedirectly instead of indirectof_fwnode_handle(dev->of_node). Butdev->fwnodeis 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).
Quoted 6 lines
Signed-off-by Jiri Slaby (SUSE) <[email protected]>Cc Hans de Goede <[email protected]>Cc Corentin Chary <[email protected]>Cc "Luke D. Jones" <[email protected]>Cc "Ilpo Järvinen" <[email protected]>
I've applied this now to review-ilpo-next, but I had to remove lots of unnecessary details from the commit message as here the first arg is NULL.
I'd also prefer to not have long is of Ccs before --- line for changes like this (more understandable if it's some problem/fix related submission). Wouldn't they work also if Cc: lines are put below --- or is it that the tools fail to preserve that at some point?
Quoted 18 lines
--- drivers/platform/x86/asus-tf103c-dock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/platform/x86/asus-tf103c-dock.c +1
-1@@ -856,7 +856,7 @@ static int tf103c_dock_probe(struct i2c_client *client)/* 5. Setup irqchip for touchpad IRQ pass-through */ dock->tp_irqchip.name =KBUILD_MODNAME ; - dock->tp_irq_domain =irq_domain_add_linear (NULL ,1 , &irq_domain_simple_ops,NULL ); + dock->tp_irq_domain =irq_domain_create_linear (NULL ,1 , &irq_domain_simple_ops,NULL );if (!dock->tp_irq_domain)return -ENOMEM ;
Signature · 1 line
i.
PATCH v2 32/57 irqdomain: ppc: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)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).
--- arch/powerpc/platforms/44x/uic.c | 5 +++-- arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 3 ++- arch/powerpc/platforms/52xx/media5200.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 3 ++- arch/powerpc/platforms/8xx/pic.c | 3 ++- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 5 +++-- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 5 +++-- arch/powerpc/platforms/powermac/pic.c | 5 +++-- arch/powerpc/platforms/powernv/opal-irqchip.c | 3 ++- arch/powerpc/sysdev/cpm2_pic.c | 3 ++- arch/powerpc/sysdev/ehv_pic.c | 5 +++-- arch/powerpc/sysdev/fsl_msi.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 5 +++-- arch/powerpc/sysdev/i8259.c | 4 ++-- arch/powerpc/sysdev/ipic.c | 5 +++-- arch/powerpc/sysdev/mpic.c | 6 +++--- arch/powerpc/sysdev/tsi108_pci.c | 4 ++-- arch/powerpc/sysdev/xive/common.c | 2 +- 21 files changed, 45 insertions(+), 33 deletions(-)
arch/powerpc/platforms/44x/uic.c +3 -2
@@ -254,8 +254,9 @@ static struct uic * __init uic_init_one(struct device_node *node) } uic->dcrbase = *dcrreg; - uic->irqhost =irq_domain_add_linear (node,NR_UIC_INTS , &uic_host_ops, - uic); + uic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_UIC_INTS , &uic_host_ops, + uic);if (! uic->irqhost)return NULL ;/* FIXME: panic? */
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c +2 -1
@@ -188,7 +188,8 @@ mpc5121_ads_cpld_pic_init(void) cpld_pic_node =of_node_get (np); - cpld_pic_host =irq_domain_add_linear (np,16 , &cpld_pic_host_ops,NULL ); + cpld_pic_host =irq_domain_create_linear (of_fwnode_handle (np),16 , + &cpld_pic_host_ops,NULL );if (!cpld_pic_host) {printk (KERN_ERR "CPLD PIC: failed to allocate irq host!\n" ); goto end;
arch/powerpc/platforms/52xx/media5200.c +1 -1
@@ -168,7 +168,7 @@ static void __init media5200_init_irq(void)spin_lock_init (&media5200_irq.lock); - media5200_irq.irqhost =irq_domain_add_linear (fpga_np, + media5200_irq.irqhost =irq_domain_create_linear (of_fwnode_handle (fpga_np),MEDIA5200_NUM_IRQS , &media5200_irq_ops, &media5200_irq);if (!media5200_irq.irqhost) goto out;
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +2 -2
@@ -247,9 +247,9 @@ mpc52xx_gpt_irq_setup(struct mpc52xx_gpt_priv *gpt, struct device_node *node)if (!cascade_virq)return ; - gpt->irqhost =irq_domain_add_linear (node,1 , &mpc52xx_gpt_irq_ops, gpt); + gpt->irqhost =irq_domain_create_linear (of_fwnode_handle (node),1 , &mpc52xx_gpt_irq_ops, gpt);if (!gpt->irqhost) { -dev_err (gpt->dev,"irq_domain_add_linear() failed\n" ); +dev_err (gpt->dev,"irq_domain_create_linear() failed\n" );return ; }
arch/powerpc/platforms/52xx/mpc52xx_pic.c +1 -1
@@ -446,7 +446,7 @@ void __init mpc52xx_init_irq(void)* As last step, add an irq host to translate the real * hw irq information provided by the ofw to linux virq */ - mpc52xx_irqhost =irq_domain_add_linear (picnode, + mpc52xx_irqhost =irq_domain_create_linear (of_fwnode_handle (picnode), MPC52xx_IRQ_HIGHTESTHWIRQ, &mpc52xx_irqhost_ops,NULL );
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1 -1
@@ -278,7 +278,7 @@ void __init socrates_fpga_pic_init(struct device_node *pic)int i;/* Setup an irq_domain structure */ - socrates_fpga_pic_irq_host =irq_domain_add_linear (pic, + socrates_fpga_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (pic),SOCRATES_FPGA_NUM_IRQS , &socrates_fpga_pic_host_ops,NULL );if (socrates_fpga_pic_irq_host ==NULL ) {pr_err ("FPGA PIC: Unable to allocate host\n" );
arch/powerpc/platforms/8xx/cpm1-ic.c +2 -1
@@ -110,7 +110,8 @@ static int cpm_pic_probe(struct platform_device *pdev)out_be32 (&data->reg->cpic_cimr,0 ); - data->host =irq_domain_add_linear (dev->of_node,64 , &cpm_pic_host_ops, data); + data->host =irq_domain_create_linear (of_fwnode_handle (dev->of_node), +64 , &cpm_pic_host_ops, data);if (!data->host)return -ENODEV ;
arch/powerpc/platforms/8xx/pic.c +2 -1
@@ -146,7 +146,8 @@ void __init mpc8xx_pic_init(void)if (!siu_reg) goto out; - mpc8xx_pic_host =irq_domain_add_linear (np,64 , &mpc8xx_pic_host_ops,NULL ); + mpc8xx_pic_host =irq_domain_create_linear (of_fwnode_handle (np),64 , + &mpc8xx_pic_host_ops,NULL );if (!mpc8xx_pic_host)printk (KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n" );
arch/powerpc/platforms/embedded6xx/flipper-pic.c +3 -2
@@ -149,8 +149,9 @@ static struct irq_domain * __init flipper_pic_init(struct device_node *np)__flipper_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,FLIPPER_NR_IRQS , - &flipper_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +FLIPPER_NR_IRQS , + &flipper_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );return NULL ;
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +3 -2
@@ -175,8 +175,9 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)__hlwd_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,HLWD_NR_IRQS , - &hlwd_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +HLWD_NR_IRQS , + &hlwd_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );iounmap (io_base);
arch/powerpc/platforms/powermac/pic.c +3 -2
@@ -327,8 +327,9 @@ static void __init pmac_pic_probe_oldstyle(void)/* * Allocate an irq host */ - pmac_pic_host =irq_domain_add_linear (master, max_irqs, - &pmac_pic_host_ops,NULL ); + pmac_pic_host =irq_domain_create_linear (of_fwnode_handle (master), + max_irqs, + &pmac_pic_host_ops,NULL );BUG_ON (pmac_pic_host ==NULL );irq_set_default_domain (pmac_pic_host);
arch/powerpc/platforms/powernv/opal-irqchip.c +2 -1
@@ -191,7 +191,8 @@ int __init opal_event_init(void)* fall back to the legacy method (opal_event_request(...)) * anyway. */ dn =of_find_compatible_node (NULL ,NULL ,"ibm,opal-event" ); - opal_event_irqchip.domain =irq_domain_add_linear (dn,MAX_NUM_EVENTS , + opal_event_irqchip.domain =irq_domain_create_linear (of_fwnode_handle (dn), +MAX_NUM_EVENTS , &opal_event_domain_ops, &opal_event_irqchip);of_node_put (dn);if (!opal_event_irqchip.domain) {
arch/powerpc/sysdev/cpm2_pic.c +2 -1
@@ -259,7 +259,8 @@ void cpm2_pic_init(struct device_node *node)out_be32 (&cpm2_intctl->ic_scprrl,0x05309770 );/* create a legacy host */ - cpm2_pic_host =irq_domain_add_linear (node,64 , &cpm2_pic_host_ops,NULL ); + cpm2_pic_host =irq_domain_create_linear (of_fwnode_handle (node),64 , + &cpm2_pic_host_ops,NULL );if (cpm2_pic_host ==NULL ) {printk (KERN_ERR "CPM2 PIC: failed to allocate irq host!\n" );return ;
arch/powerpc/sysdev/ehv_pic.c +3 -2
@@ -269,8 +269,9 @@ void __init ehv_pic_init(void)return ; } - ehv_pic->irqhost =irq_domain_add_linear (np,NR_EHV_PIC_INTS , - &ehv_pic_host_ops, ehv_pic); + ehv_pic->irqhost =irq_domain_create_linear (of_fwnode_handle (np), +NR_EHV_PIC_INTS , + &ehv_pic_host_ops, ehv_pic);if (!ehv_pic->irqhost) {of_node_put (np);kfree (ehv_pic);
arch/powerpc/sysdev/fsl_msi.c +1 -1
@@ -412,7 +412,7 @@ static int fsl_of_msi_probe(struct platform_device *dev) }platform_set_drvdata (dev, msi); - msi->irqhost =irq_domain_add_linear (dev->dev.of_node, + msi->irqhost =irq_domain_create_linear (of_fwnode_handle (dev->dev.of_node),NR_MSI_IRQS_MAX , &fsl_msi_host_ops, msi);if (msi->irqhost ==NULL ) {
arch/powerpc/sysdev/ge/ge_pic.c +3 -2
@@ -214,8 +214,9 @@ void __init gef_pic_init(struct device_node *np) }/* Setup an irq_domain structure */ - gef_pic_irq_host =irq_domain_add_linear (np,GEF_PIC_NUM_IRQS , - &gef_pic_host_ops,NULL ); + gef_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (np), +GEF_PIC_NUM_IRQS , + &gef_pic_host_ops,NULL );if (gef_pic_irq_host ==NULL )return ;
arch/powerpc/sysdev/i8259.c +2 -2
@@ -260,8 +260,8 @@ void i8259_init(struct device_node *node, unsigned long intack_addr)raw_spin_unlock_irqrestore (&i8259_lock, flags);/* create a legacy host */ - i8259_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &i8259_host_ops,NULL ); + i8259_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &i8259_host_ops,NULL );if (i8259_host ==NULL ) {printk (KERN_ERR "i8259: failed to allocate irq host !\n" );return ;
arch/powerpc/sysdev/ipic.c +3 -2
@@ -711,8 +711,9 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)if (ipic ==NULL )return NULL ; - ipic->irqhost =irq_domain_add_linear (node,NR_IPIC_INTS , - &ipic_host_ops, ipic); + ipic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_IPIC_INTS , + &ipic_host_ops, ipic);if (ipic->irqhost ==NULL ) {kfree (ipic);return NULL ;
arch/powerpc/sysdev/mpic.c +3 -3
@@ -1483,9 +1483,9 @@ struct mpic * __init mpic_alloc(struct device_node *node, mpic->isu_shift =1 +__ilog2 (mpic->isu_size -1 ); mpic->isu_mask = (1 << mpic->isu_shift) -1 ; - mpic->irqhost =irq_domain_add_linear (mpic->node, - intvec_top, - &mpic_host_ops, mpic); + mpic->irqhost =irq_domain_create_linear (of_fwnode_handle (mpic->node), + intvec_top, + &mpic_host_ops, mpic);/* * FIXME: The code leaks the MPIC object and mappings here; this
arch/powerpc/sysdev/tsi108_pci.c +2 -2
@@ -404,8 +404,8 @@ void __init tsi108_pci_int_init(struct device_node *node) {DBG ("Tsi108_pci_int_init: initializing PCI interrupts\n" ); - pci_irq_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &pci_irq_domain_ops,NULL ); + pci_irq_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &pci_irq_domain_ops,NULL );if (pci_irq_host ==NULL ) {printk (KERN_ERR "pci_irq_host: failed to allocate irq domain!\n" );return ;
arch/powerpc/sysdev/xive/common.c +1 -1
@@ -1464,7 +1464,7 @@ static const struct irq_domain_ops xive_irq_domain_ops = {static void __init xive_init_host (struct device_node *np) { - xive_irq_domain =irq_domain_add_tree (np, &xive_irq_domain_ops,NULL ); + xive_irq_domain =irq_domain_create_tree (of_fwnode_handle (np), &xive_irq_domain_ops,NULL );if (WARN_ON (xive_irq_domain ==NULL ))return ;irq_set_default_domain (xive_irq_domain);
Signature · 1 line
2.49.0
Re: [PATCH v2 32/57] irqdomain: ppc: Switch to irq_domain_create_*()
Le 19/03/2025 à 10:29, Jiri Slaby (SUSE) a écrit :
Quoted 11 lines
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_handleinstead of structdevice_node. Therefore,of_fwnode_handle()is added around the original parameter.Note some of the users can likely use
dev->fwnodedirectly instead of indirectof_fwnode_handle(dev->of_node). Butdev->fwnodeis 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).
Quoted 9 lines
Signed-off-by Jiri Slaby (SUSE) <[email protected]>Cc Madhavan Srinivasan <[email protected]>Cc Michael Ellerman <[email protected]>Cc Nicholas Piggin <[email protected]>Cc Christophe Leroy <[email protected]>Cc Naveen N Rao <[email protected]>Cc Anatolij Gustschin <[email protected]>Cc Scott Wood <[email protected]>
Quoted 334 lines
--- arch/powerpc/platforms/44x/uic.c | 5 +++-- arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 3 ++- arch/powerpc/platforms/52xx/media5200.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 3 ++- arch/powerpc/platforms/8xx/pic.c | 3 ++- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 5 +++-- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 5 +++-- arch/powerpc/platforms/powermac/pic.c | 5 +++-- arch/powerpc/platforms/powernv/opal-irqchip.c | 3 ++- arch/powerpc/sysdev/cpm2_pic.c | 3 ++- arch/powerpc/sysdev/ehv_pic.c | 5 +++-- arch/powerpc/sysdev/fsl_msi.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 5 +++-- arch/powerpc/sysdev/i8259.c | 4 ++-- arch/powerpc/sysdev/ipic.c | 5 +++-- arch/powerpc/sysdev/mpic.c | 6 +++--- arch/powerpc/sysdev/tsi108_pci.c | 4 ++-- arch/powerpc/sysdev/xive/common.c | 2 +- 21 files changed, 45 insertions(+), 33 deletions(-)arch/powerpc/platforms/44x/uic.c +3
-2@@ -254,8 +254,9 @@ static struct uic * __init uic_init_one(struct device_node *node) } uic->dcrbase = *dcrreg; - uic->irqhost =irq_domain_add_linear (node,NR_UIC_INTS , &uic_host_ops, - uic); + uic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_UIC_INTS , &uic_host_ops, + uic);if (! uic->irqhost)return NULL ;/* FIXME: panic? */ arch/powerpc/platforms/512x/mpc5121_ads_cpld.c +2
-1@@ -188,7 +188,8 @@ mpc5121_ads_cpld_pic_init(void) cpld_pic_node =of_node_get (np); - cpld_pic_host =irq_domain_add_linear (np,16 , &cpld_pic_host_ops,NULL ); + cpld_pic_host =irq_domain_create_linear (of_fwnode_handle (np),16 , + &cpld_pic_host_ops,NULL );if (!cpld_pic_host) {printk (KERN_ERR "CPLD PIC: failed to allocate irq host!\n" ); goto end;arch/powerpc/platforms/52xx/media5200.c +1
-1@@ -168,7 +168,7 @@ static void __init media5200_init_irq(void)spin_lock_init (&media5200_irq.lock); - media5200_irq.irqhost =irq_domain_add_linear (fpga_np, + media5200_irq.irqhost =irq_domain_create_linear (of_fwnode_handle (fpga_np),MEDIA5200_NUM_IRQS , &media5200_irq_ops, &media5200_irq);if (!media5200_irq.irqhost) goto out;arch/powerpc/platforms/52xx/mpc52xx_gpt.c +2
-2@@ -247,9 +247,9 @@ mpc52xx_gpt_irq_setup(struct mpc52xx_gpt_priv *gpt, struct device_node *node)if (!cascade_virq)return ; - gpt->irqhost =irq_domain_add_linear (node,1 , &mpc52xx_gpt_irq_ops, gpt); + gpt->irqhost =irq_domain_create_linear (of_fwnode_handle (node),1 , &mpc52xx_gpt_irq_ops, gpt);if (!gpt->irqhost) { -dev_err (gpt->dev,"irq_domain_add_linear() failed\n" ); +dev_err (gpt->dev,"irq_domain_create_linear() failed\n" );return ; }arch/powerpc/platforms/52xx/mpc52xx_pic.c +1
-1@@ -446,7 +446,7 @@ void __init mpc52xx_init_irq(void)* As last step, add an irq host to translate the real * hw irq information provided by the ofw to linux virq */ - mpc52xx_irqhost =irq_domain_add_linear (picnode, + mpc52xx_irqhost =irq_domain_create_linear (of_fwnode_handle (picnode), MPC52xx_IRQ_HIGHTESTHWIRQ, &mpc52xx_irqhost_ops,NULL );arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1
-1@@ -278,7 +278,7 @@ void __init socrates_fpga_pic_init(struct device_node *pic)int i;/* Setup an irq_domain structure */ - socrates_fpga_pic_irq_host =irq_domain_add_linear (pic, + socrates_fpga_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (pic),SOCRATES_FPGA_NUM_IRQS , &socrates_fpga_pic_host_ops,NULL );if (socrates_fpga_pic_irq_host ==NULL ) {pr_err ("FPGA PIC: Unable to allocate host\n" );arch/powerpc/platforms/8xx/cpm1-ic.c +2
-1@@ -110,7 +110,8 @@ static int cpm_pic_probe(struct platform_device *pdev)out_be32 (&data->reg->cpic_cimr,0 ); - data->host =irq_domain_add_linear (dev->of_node,64 , &cpm_pic_host_ops, data); + data->host =irq_domain_create_linear (of_fwnode_handle (dev->of_node), +64 , &cpm_pic_host_ops, data);if (!data->host)return -ENODEV ;arch/powerpc/platforms/8xx/pic.c +2
-1@@ -146,7 +146,8 @@ void __init mpc8xx_pic_init(void)if (!siu_reg) goto out; - mpc8xx_pic_host =irq_domain_add_linear (np,64 , &mpc8xx_pic_host_ops,NULL ); + mpc8xx_pic_host =irq_domain_create_linear (of_fwnode_handle (np),64 , + &mpc8xx_pic_host_ops,NULL );if (!mpc8xx_pic_host)printk (KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n" );arch/powerpc/platforms/embedded6xx/flipper-pic.c +3
-2@@ -149,8 +149,9 @@ static struct irq_domain * __init flipper_pic_init(struct device_node *np)__flipper_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,FLIPPER_NR_IRQS , - &flipper_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +FLIPPER_NR_IRQS , + &flipper_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );return NULL ;arch/powerpc/platforms/embedded6xx/hlwd-pic.c +3
-2@@ -175,8 +175,9 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)__hlwd_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,HLWD_NR_IRQS , - &hlwd_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +HLWD_NR_IRQS , + &hlwd_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );iounmap (io_base);arch/powerpc/platforms/powermac/pic.c +3
-2@@ -327,8 +327,9 @@ static void __init pmac_pic_probe_oldstyle(void)/* * Allocate an irq host */ - pmac_pic_host =irq_domain_add_linear (master, max_irqs, - &pmac_pic_host_ops,NULL ); + pmac_pic_host =irq_domain_create_linear (of_fwnode_handle (master), + max_irqs, + &pmac_pic_host_ops,NULL );BUG_ON (pmac_pic_host ==NULL );irq_set_default_domain (pmac_pic_host);arch/powerpc/platforms/powernv/opal-irqchip.c +2
-1@@ -191,7 +191,8 @@ int __init opal_event_init(void)* fall back to the legacy method (opal_event_request(...)) * anyway. */ dn =of_find_compatible_node (NULL ,NULL ,"ibm,opal-event" ); - opal_event_irqchip.domain =irq_domain_add_linear (dn,MAX_NUM_EVENTS , + opal_event_irqchip.domain =irq_domain_create_linear (of_fwnode_handle (dn), +MAX_NUM_EVENTS , &opal_event_domain_ops, &opal_event_irqchip);of_node_put (dn);if (!opal_event_irqchip.domain) {arch/powerpc/sysdev/cpm2_pic.c +2
-1@@ -259,7 +259,8 @@ void cpm2_pic_init(struct device_node *node)out_be32 (&cpm2_intctl->ic_scprrl,0x05309770 );/* create a legacy host */ - cpm2_pic_host =irq_domain_add_linear (node,64 , &cpm2_pic_host_ops,NULL ); + cpm2_pic_host =irq_domain_create_linear (of_fwnode_handle (node),64 , + &cpm2_pic_host_ops,NULL );if (cpm2_pic_host ==NULL ) {printk (KERN_ERR "CPM2 PIC: failed to allocate irq host!\n" );return ;arch/powerpc/sysdev/ehv_pic.c +3
-2@@ -269,8 +269,9 @@ void __init ehv_pic_init(void)return ; } - ehv_pic->irqhost =irq_domain_add_linear (np,NR_EHV_PIC_INTS , - &ehv_pic_host_ops, ehv_pic); + ehv_pic->irqhost =irq_domain_create_linear (of_fwnode_handle (np), +NR_EHV_PIC_INTS , + &ehv_pic_host_ops, ehv_pic);if (!ehv_pic->irqhost) {of_node_put (np);kfree (ehv_pic);arch/powerpc/sysdev/fsl_msi.c +1
-1@@ -412,7 +412,7 @@ static int fsl_of_msi_probe(struct platform_device *dev) }platform_set_drvdata (dev, msi); - msi->irqhost =irq_domain_add_linear (dev->dev.of_node, + msi->irqhost =irq_domain_create_linear (of_fwnode_handle (dev->dev.of_node),NR_MSI_IRQS_MAX , &fsl_msi_host_ops, msi);if (msi->irqhost ==NULL ) {arch/powerpc/sysdev/ge/ge_pic.c +3
-2@@ -214,8 +214,9 @@ void __init gef_pic_init(struct device_node *np) }/* Setup an irq_domain structure */ - gef_pic_irq_host =irq_domain_add_linear (np,GEF_PIC_NUM_IRQS , - &gef_pic_host_ops,NULL ); + gef_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (np), +GEF_PIC_NUM_IRQS , + &gef_pic_host_ops,NULL );if (gef_pic_irq_host ==NULL )return ;arch/powerpc/sysdev/i8259.c +2
-2@@ -260,8 +260,8 @@ void i8259_init(struct device_node *node, unsigned long intack_addr)raw_spin_unlock_irqrestore (&i8259_lock, flags);/* create a legacy host */ - i8259_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &i8259_host_ops,NULL ); + i8259_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &i8259_host_ops,NULL );if (i8259_host ==NULL ) {printk (KERN_ERR "i8259: failed to allocate irq host !\n" );return ;arch/powerpc/sysdev/ipic.c +3
-2@@ -711,8 +711,9 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)if (ipic ==NULL )return NULL ; - ipic->irqhost =irq_domain_add_linear (node,NR_IPIC_INTS , - &ipic_host_ops, ipic); + ipic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_IPIC_INTS , + &ipic_host_ops, ipic);if (ipic->irqhost ==NULL ) {kfree (ipic);return NULL ;arch/powerpc/sysdev/mpic.c +3
-3@@ -1483,9 +1483,9 @@ struct mpic * __init mpic_alloc(struct device_node *node, mpic->isu_shift =1 +__ilog2 (mpic->isu_size -1 ); mpic->isu_mask = (1 << mpic->isu_shift) -1 ; - mpic->irqhost =irq_domain_add_linear (mpic->node, - intvec_top, - &mpic_host_ops, mpic); + mpic->irqhost =irq_domain_create_linear (of_fwnode_handle (mpic->node), + intvec_top, + &mpic_host_ops, mpic);/* * FIXME: The code leaks the MPIC object and mappings here; this arch/powerpc/sysdev/tsi108_pci.c +2
-2@@ -404,8 +404,8 @@ void __init tsi108_pci_int_init(struct device_node *node) {DBG ("Tsi108_pci_int_init: initializing PCI interrupts\n" ); - pci_irq_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &pci_irq_domain_ops,NULL ); + pci_irq_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &pci_irq_domain_ops,NULL );if (pci_irq_host ==NULL ) {printk (KERN_ERR "pci_irq_host: failed to allocate irq domain!\n" );return ;arch/powerpc/sysdev/xive/common.c +1
-1@@ -1464,7 +1464,7 @@ static const struct irq_domain_ops xive_irq_domain_ops = {static void __init xive_init_host (struct device_node *np) { - xive_irq_domain =irq_domain_add_tree (np, &xive_irq_domain_ops,NULL ); + xive_irq_domain =irq_domain_create_tree (of_fwnode_handle (np), &xive_irq_domain_ops,NULL );if (WARN_ON (xive_irq_domain ==NULL ))return ;irq_set_default_domain (xive_irq_domain);
[tip: irq/cleanups] powerpc: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 1cbd8856cd4b0c94248b867b2ac3fe510bbc3b6b Gitweb: https://git.kernel.org/tip/1cbd8856cd4b0c94248b867b2ac3fe510bbc3b6b Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:25 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:07 +02:00
powerpc: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- arch/powerpc/platforms/44x/uic.c | 5 +++-- arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 3 ++- arch/powerpc/platforms/52xx/media5200.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 3 ++- arch/powerpc/platforms/8xx/pic.c | 3 ++- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 5 +++-- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 5 +++-- arch/powerpc/platforms/powermac/pic.c | 5 +++-- arch/powerpc/platforms/powernv/opal-irqchip.c | 3 ++- arch/powerpc/sysdev/cpm2_pic.c | 3 ++- arch/powerpc/sysdev/ehv_pic.c | 5 +++-- arch/powerpc/sysdev/fsl_msi.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 5 +++-- arch/powerpc/sysdev/i8259.c | 4 ++-- arch/powerpc/sysdev/ipic.c | 5 +++-- arch/powerpc/sysdev/mpic.c | 6 +++--- arch/powerpc/sysdev/tsi108_pci.c | 4 ++-- arch/powerpc/sysdev/xive/common.c | 2 +- 21 files changed, 45 insertions(+), 33 deletions(-)
arch/powerpc/platforms/44x/uic.c +3 -2
@@ -254,8 +254,9 @@ static struct uic * __init uic_init_one(struct device_node *node) } uic->dcrbase = *dcrreg; - uic->irqhost =irq_domain_add_linear (node,NR_UIC_INTS , &uic_host_ops, - uic); + uic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_UIC_INTS , &uic_host_ops, + uic);if (! uic->irqhost)return NULL ;/* FIXME: panic? */
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c +2 -1
@@ -188,7 +188,8 @@ mpc5121_ads_cpld_pic_init(void) cpld_pic_node =of_node_get (np); - cpld_pic_host =irq_domain_add_linear (np,16 , &cpld_pic_host_ops,NULL ); + cpld_pic_host =irq_domain_create_linear (of_fwnode_handle (np),16 , + &cpld_pic_host_ops,NULL );if (!cpld_pic_host) {printk (KERN_ERR "CPLD PIC: failed to allocate irq host!\n" ); goto end;
arch/powerpc/platforms/52xx/media5200.c +1 -1
@@ -168,7 +168,7 @@ static void __init media5200_init_irq(void)spin_lock_init (&media5200_irq.lock); - media5200_irq.irqhost =irq_domain_add_linear (fpga_np, + media5200_irq.irqhost =irq_domain_create_linear (of_fwnode_handle (fpga_np),MEDIA5200_NUM_IRQS , &media5200_irq_ops, &media5200_irq);if (!media5200_irq.irqhost) goto out;
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +2 -2
@@ -247,9 +247,9 @@ mpc52xx_gpt_irq_setup(struct mpc52xx_gpt_priv *gpt, struct device_node *node)if (!cascade_virq)return ; - gpt->irqhost =irq_domain_add_linear (node,1 , &mpc52xx_gpt_irq_ops, gpt); + gpt->irqhost =irq_domain_create_linear (of_fwnode_handle (node),1 , &mpc52xx_gpt_irq_ops, gpt);if (!gpt->irqhost) { -dev_err (gpt->dev,"irq_domain_add_linear() failed\n" ); +dev_err (gpt->dev,"irq_domain_create_linear() failed\n" );return ; }
arch/powerpc/platforms/52xx/mpc52xx_pic.c +1 -1
@@ -446,7 +446,7 @@ void __init mpc52xx_init_irq(void)* As last step, add an irq host to translate the real * hw irq information provided by the ofw to linux virq */ - mpc52xx_irqhost =irq_domain_add_linear (picnode, + mpc52xx_irqhost =irq_domain_create_linear (of_fwnode_handle (picnode), MPC52xx_IRQ_HIGHTESTHWIRQ, &mpc52xx_irqhost_ops,NULL );
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1 -1
@@ -278,7 +278,7 @@ void __init socrates_fpga_pic_init(struct device_node *pic)int i;/* Setup an irq_domain structure */ - socrates_fpga_pic_irq_host =irq_domain_add_linear (pic, + socrates_fpga_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (pic),SOCRATES_FPGA_NUM_IRQS , &socrates_fpga_pic_host_ops,NULL );if (socrates_fpga_pic_irq_host ==NULL ) {pr_err ("FPGA PIC: Unable to allocate host\n" );
arch/powerpc/platforms/8xx/cpm1-ic.c +2 -1
@@ -110,7 +110,8 @@ static int cpm_pic_probe(struct platform_device *pdev)out_be32 (&data->reg->cpic_cimr,0 ); - data->host =irq_domain_add_linear (dev->of_node,64 , &cpm_pic_host_ops, data); + data->host =irq_domain_create_linear (of_fwnode_handle (dev->of_node), +64 , &cpm_pic_host_ops, data);if (!data->host)return -ENODEV ;
arch/powerpc/platforms/8xx/pic.c +2 -1
@@ -146,7 +146,8 @@ void __init mpc8xx_pic_init(void)if (!siu_reg) goto out; - mpc8xx_pic_host =irq_domain_add_linear (np,64 , &mpc8xx_pic_host_ops,NULL ); + mpc8xx_pic_host =irq_domain_create_linear (of_fwnode_handle (np),64 , + &mpc8xx_pic_host_ops,NULL );if (!mpc8xx_pic_host)printk (KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n" );
arch/powerpc/platforms/embedded6xx/flipper-pic.c +3 -2
@@ -149,8 +149,9 @@ static struct irq_domain * __init flipper_pic_init(struct device_node *np)__flipper_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,FLIPPER_NR_IRQS , - &flipper_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +FLIPPER_NR_IRQS , + &flipper_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );return NULL ;
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +3 -2
@@ -175,8 +175,9 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)__hlwd_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,HLWD_NR_IRQS , - &hlwd_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +HLWD_NR_IRQS , + &hlwd_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );iounmap (io_base);
arch/powerpc/platforms/powermac/pic.c +3 -2
@@ -327,8 +327,9 @@ static void __init pmac_pic_probe_oldstyle(void)/* * Allocate an irq host */ - pmac_pic_host =irq_domain_add_linear (master, max_irqs, - &pmac_pic_host_ops,NULL ); + pmac_pic_host =irq_domain_create_linear (of_fwnode_handle (master), + max_irqs, + &pmac_pic_host_ops,NULL );BUG_ON (pmac_pic_host ==NULL );irq_set_default_domain (pmac_pic_host);
arch/powerpc/platforms/powernv/opal-irqchip.c +2 -1
@@ -191,7 +191,8 @@ int __init opal_event_init(void)* fall back to the legacy method (opal_event_request(...)) * anyway. */ dn =of_find_compatible_node (NULL ,NULL ,"ibm,opal-event" ); - opal_event_irqchip.domain =irq_domain_add_linear (dn,MAX_NUM_EVENTS , + opal_event_irqchip.domain =irq_domain_create_linear (of_fwnode_handle (dn), +MAX_NUM_EVENTS , &opal_event_domain_ops, &opal_event_irqchip);of_node_put (dn);if (!opal_event_irqchip.domain) {
arch/powerpc/sysdev/cpm2_pic.c +2 -1
@@ -259,7 +259,8 @@ void cpm2_pic_init(struct device_node *node)out_be32 (&cpm2_intctl->ic_scprrl,0x05309770 );/* create a legacy host */ - cpm2_pic_host =irq_domain_add_linear (node,64 , &cpm2_pic_host_ops,NULL ); + cpm2_pic_host =irq_domain_create_linear (of_fwnode_handle (node),64 , + &cpm2_pic_host_ops,NULL );if (cpm2_pic_host ==NULL ) {printk (KERN_ERR "CPM2 PIC: failed to allocate irq host!\n" );return ;
arch/powerpc/sysdev/ehv_pic.c +3 -2
@@ -269,8 +269,9 @@ void __init ehv_pic_init(void)return ; } - ehv_pic->irqhost =irq_domain_add_linear (np,NR_EHV_PIC_INTS , - &ehv_pic_host_ops, ehv_pic); + ehv_pic->irqhost =irq_domain_create_linear (of_fwnode_handle (np), +NR_EHV_PIC_INTS , + &ehv_pic_host_ops, ehv_pic);if (!ehv_pic->irqhost) {of_node_put (np);kfree (ehv_pic);
arch/powerpc/sysdev/fsl_msi.c +1 -1
@@ -412,7 +412,7 @@ static int fsl_of_msi_probe(struct platform_device *dev) }platform_set_drvdata (dev, msi); - msi->irqhost =irq_domain_add_linear (dev->dev.of_node, + msi->irqhost =irq_domain_create_linear (of_fwnode_handle (dev->dev.of_node),NR_MSI_IRQS_MAX , &fsl_msi_host_ops, msi);if (msi->irqhost ==NULL ) {
arch/powerpc/sysdev/ge/ge_pic.c +3 -2
@@ -214,8 +214,9 @@ void __init gef_pic_init(struct device_node *np) }/* Setup an irq_domain structure */ - gef_pic_irq_host =irq_domain_add_linear (np,GEF_PIC_NUM_IRQS , - &gef_pic_host_ops,NULL ); + gef_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (np), +GEF_PIC_NUM_IRQS , + &gef_pic_host_ops,NULL );if (gef_pic_irq_host ==NULL )return ;
arch/powerpc/sysdev/i8259.c +2 -2
@@ -260,8 +260,8 @@ void i8259_init(struct device_node *node, unsigned long intack_addr)raw_spin_unlock_irqrestore (&i8259_lock, flags);/* create a legacy host */ - i8259_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &i8259_host_ops,NULL ); + i8259_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &i8259_host_ops,NULL );if (i8259_host ==NULL ) {printk (KERN_ERR "i8259: failed to allocate irq host !\n" );return ;
arch/powerpc/sysdev/ipic.c +3 -2
@@ -711,8 +711,9 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)if (ipic ==NULL )return NULL ; - ipic->irqhost =irq_domain_add_linear (node,NR_IPIC_INTS , - &ipic_host_ops, ipic); + ipic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_IPIC_INTS , + &ipic_host_ops, ipic);if (ipic->irqhost ==NULL ) {kfree (ipic);return NULL ;
arch/powerpc/sysdev/mpic.c +3 -3
@@ -1483,9 +1483,9 @@ struct mpic * __init mpic_alloc(struct device_node *node, mpic->isu_shift =1 +__ilog2 (mpic->isu_size -1 ); mpic->isu_mask = (1 << mpic->isu_shift) -1 ; - mpic->irqhost =irq_domain_add_linear (mpic->node, - intvec_top, - &mpic_host_ops, mpic); + mpic->irqhost =irq_domain_create_linear (of_fwnode_handle (mpic->node), + intvec_top, + &mpic_host_ops, mpic);/* * FIXME: The code leaks the MPIC object and mappings here; this
arch/powerpc/sysdev/tsi108_pci.c +2 -2
@@ -404,8 +404,8 @@ void __init tsi108_pci_int_init(struct device_node *node) {DBG ("Tsi108_pci_int_init: initializing PCI interrupts\n" ); - pci_irq_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &pci_irq_domain_ops,NULL ); + pci_irq_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &pci_irq_domain_ops,NULL );if (pci_irq_host ==NULL ) {printk (KERN_ERR "pci_irq_host: failed to allocate irq domain!\n" );return ;
arch/powerpc/sysdev/xive/common.c +1 -1
@@ -1464,7 +1464,7 @@ static const struct irq_domain_ops xive_irq_domain_ops = {static void __init xive_init_host (struct device_node *np) { - xive_irq_domain =irq_domain_add_tree (np, &xive_irq_domain_ops,NULL ); + xive_irq_domain =irq_domain_create_tree (of_fwnode_handle (np), &xive_irq_domain_ops,NULL );if (WARN_ON (xive_irq_domain ==NULL ))return ;irq_set_default_domain (xive_irq_domain);
[tip: irq/cleanups] powerpc: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 8b541d7e1655bf3ea95b742b1c9b7cd6f3f61b2f Gitweb: https://git.kernel.org/tip/8b541d7e1655bf3ea95b742b1c9b7cd6f3f61b2f Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:25 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:23 +02:00
powerpc: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- arch/powerpc/platforms/44x/uic.c | 5 +++-- arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 3 ++- arch/powerpc/platforms/52xx/media5200.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 3 ++- arch/powerpc/platforms/8xx/pic.c | 3 ++- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 5 +++-- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 5 +++-- arch/powerpc/platforms/powermac/pic.c | 5 +++-- arch/powerpc/platforms/powernv/opal-irqchip.c | 3 ++- arch/powerpc/sysdev/cpm2_pic.c | 3 ++- arch/powerpc/sysdev/ehv_pic.c | 5 +++-- arch/powerpc/sysdev/fsl_msi.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 5 +++-- arch/powerpc/sysdev/i8259.c | 4 ++-- arch/powerpc/sysdev/ipic.c | 5 +++-- arch/powerpc/sysdev/mpic.c | 6 +++--- arch/powerpc/sysdev/tsi108_pci.c | 4 ++-- arch/powerpc/sysdev/xive/common.c | 2 +- 21 files changed, 45 insertions(+), 33 deletions(-)
arch/powerpc/platforms/44x/uic.c +3 -2
@@ -254,8 +254,9 @@ static struct uic * __init uic_init_one(struct device_node *node) } uic->dcrbase = *dcrreg; - uic->irqhost =irq_domain_add_linear (node,NR_UIC_INTS , &uic_host_ops, - uic); + uic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_UIC_INTS , &uic_host_ops, + uic);if (! uic->irqhost)return NULL ;/* FIXME: panic? */
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c +2 -1
@@ -188,7 +188,8 @@ mpc5121_ads_cpld_pic_init(void) cpld_pic_node =of_node_get (np); - cpld_pic_host =irq_domain_add_linear (np,16 , &cpld_pic_host_ops,NULL ); + cpld_pic_host =irq_domain_create_linear (of_fwnode_handle (np),16 , + &cpld_pic_host_ops,NULL );if (!cpld_pic_host) {printk (KERN_ERR "CPLD PIC: failed to allocate irq host!\n" ); goto end;
arch/powerpc/platforms/52xx/media5200.c +1 -1
@@ -168,7 +168,7 @@ static void __init media5200_init_irq(void)spin_lock_init (&media5200_irq.lock); - media5200_irq.irqhost =irq_domain_add_linear (fpga_np, + media5200_irq.irqhost =irq_domain_create_linear (of_fwnode_handle (fpga_np),MEDIA5200_NUM_IRQS , &media5200_irq_ops, &media5200_irq);if (!media5200_irq.irqhost) goto out;
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +2 -2
@@ -247,9 +247,9 @@ mpc52xx_gpt_irq_setup(struct mpc52xx_gpt_priv *gpt, struct device_node *node)if (!cascade_virq)return ; - gpt->irqhost =irq_domain_add_linear (node,1 , &mpc52xx_gpt_irq_ops, gpt); + gpt->irqhost =irq_domain_create_linear (of_fwnode_handle (node),1 , &mpc52xx_gpt_irq_ops, gpt);if (!gpt->irqhost) { -dev_err (gpt->dev,"irq_domain_add_linear() failed\n" ); +dev_err (gpt->dev,"irq_domain_create_linear() failed\n" );return ; }
arch/powerpc/platforms/52xx/mpc52xx_pic.c +1 -1
@@ -446,7 +446,7 @@ void __init mpc52xx_init_irq(void)* As last step, add an irq host to translate the real * hw irq information provided by the ofw to linux virq */ - mpc52xx_irqhost =irq_domain_add_linear (picnode, + mpc52xx_irqhost =irq_domain_create_linear (of_fwnode_handle (picnode), MPC52xx_IRQ_HIGHTESTHWIRQ, &mpc52xx_irqhost_ops,NULL );
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1 -1
@@ -278,7 +278,7 @@ void __init socrates_fpga_pic_init(struct device_node *pic)int i;/* Setup an irq_domain structure */ - socrates_fpga_pic_irq_host =irq_domain_add_linear (pic, + socrates_fpga_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (pic),SOCRATES_FPGA_NUM_IRQS , &socrates_fpga_pic_host_ops,NULL );if (socrates_fpga_pic_irq_host ==NULL ) {pr_err ("FPGA PIC: Unable to allocate host\n" );
arch/powerpc/platforms/8xx/cpm1-ic.c +2 -1
@@ -110,7 +110,8 @@ static int cpm_pic_probe(struct platform_device *pdev)out_be32 (&data->reg->cpic_cimr,0 ); - data->host =irq_domain_add_linear (dev->of_node,64 , &cpm_pic_host_ops, data); + data->host =irq_domain_create_linear (of_fwnode_handle (dev->of_node), +64 , &cpm_pic_host_ops, data);if (!data->host)return -ENODEV ;
arch/powerpc/platforms/8xx/pic.c +2 -1
@@ -146,7 +146,8 @@ void __init mpc8xx_pic_init(void)if (!siu_reg) goto out; - mpc8xx_pic_host =irq_domain_add_linear (np,64 , &mpc8xx_pic_host_ops,NULL ); + mpc8xx_pic_host =irq_domain_create_linear (of_fwnode_handle (np),64 , + &mpc8xx_pic_host_ops,NULL );if (!mpc8xx_pic_host)printk (KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n" );
arch/powerpc/platforms/embedded6xx/flipper-pic.c +3 -2
@@ -149,8 +149,9 @@ static struct irq_domain * __init flipper_pic_init(struct device_node *np)__flipper_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,FLIPPER_NR_IRQS , - &flipper_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +FLIPPER_NR_IRQS , + &flipper_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );return NULL ;
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +3 -2
@@ -175,8 +175,9 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)__hlwd_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,HLWD_NR_IRQS , - &hlwd_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +HLWD_NR_IRQS , + &hlwd_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );iounmap (io_base);
arch/powerpc/platforms/powermac/pic.c +3 -2
@@ -327,8 +327,9 @@ static void __init pmac_pic_probe_oldstyle(void)/* * Allocate an irq host */ - pmac_pic_host =irq_domain_add_linear (master, max_irqs, - &pmac_pic_host_ops,NULL ); + pmac_pic_host =irq_domain_create_linear (of_fwnode_handle (master), + max_irqs, + &pmac_pic_host_ops,NULL );BUG_ON (pmac_pic_host ==NULL );irq_set_default_domain (pmac_pic_host);
arch/powerpc/platforms/powernv/opal-irqchip.c +2 -1
@@ -191,7 +191,8 @@ int __init opal_event_init(void)* fall back to the legacy method (opal_event_request(...)) * anyway. */ dn =of_find_compatible_node (NULL ,NULL ,"ibm,opal-event" ); - opal_event_irqchip.domain =irq_domain_add_linear (dn,MAX_NUM_EVENTS , + opal_event_irqchip.domain =irq_domain_create_linear (of_fwnode_handle (dn), +MAX_NUM_EVENTS , &opal_event_domain_ops, &opal_event_irqchip);of_node_put (dn);if (!opal_event_irqchip.domain) {
arch/powerpc/sysdev/cpm2_pic.c +2 -1
@@ -259,7 +259,8 @@ void cpm2_pic_init(struct device_node *node)out_be32 (&cpm2_intctl->ic_scprrl,0x05309770 );/* create a legacy host */ - cpm2_pic_host =irq_domain_add_linear (node,64 , &cpm2_pic_host_ops,NULL ); + cpm2_pic_host =irq_domain_create_linear (of_fwnode_handle (node),64 , + &cpm2_pic_host_ops,NULL );if (cpm2_pic_host ==NULL ) {printk (KERN_ERR "CPM2 PIC: failed to allocate irq host!\n" );return ;
arch/powerpc/sysdev/ehv_pic.c +3 -2
@@ -269,8 +269,9 @@ void __init ehv_pic_init(void)return ; } - ehv_pic->irqhost =irq_domain_add_linear (np,NR_EHV_PIC_INTS , - &ehv_pic_host_ops, ehv_pic); + ehv_pic->irqhost =irq_domain_create_linear (of_fwnode_handle (np), +NR_EHV_PIC_INTS , + &ehv_pic_host_ops, ehv_pic);if (!ehv_pic->irqhost) {of_node_put (np);kfree (ehv_pic);
arch/powerpc/sysdev/fsl_msi.c +1 -1
@@ -412,7 +412,7 @@ static int fsl_of_msi_probe(struct platform_device *dev) }platform_set_drvdata (dev, msi); - msi->irqhost =irq_domain_add_linear (dev->dev.of_node, + msi->irqhost =irq_domain_create_linear (of_fwnode_handle (dev->dev.of_node),NR_MSI_IRQS_MAX , &fsl_msi_host_ops, msi);if (msi->irqhost ==NULL ) {
arch/powerpc/sysdev/ge/ge_pic.c +3 -2
@@ -214,8 +214,9 @@ void __init gef_pic_init(struct device_node *np) }/* Setup an irq_domain structure */ - gef_pic_irq_host =irq_domain_add_linear (np,GEF_PIC_NUM_IRQS , - &gef_pic_host_ops,NULL ); + gef_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (np), +GEF_PIC_NUM_IRQS , + &gef_pic_host_ops,NULL );if (gef_pic_irq_host ==NULL )return ;
arch/powerpc/sysdev/i8259.c +2 -2
@@ -260,8 +260,8 @@ void i8259_init(struct device_node *node, unsigned long intack_addr)raw_spin_unlock_irqrestore (&i8259_lock, flags);/* create a legacy host */ - i8259_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &i8259_host_ops,NULL ); + i8259_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &i8259_host_ops,NULL );if (i8259_host ==NULL ) {printk (KERN_ERR "i8259: failed to allocate irq host !\n" );return ;
arch/powerpc/sysdev/ipic.c +3 -2
@@ -711,8 +711,9 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)if (ipic ==NULL )return NULL ; - ipic->irqhost =irq_domain_add_linear (node,NR_IPIC_INTS , - &ipic_host_ops, ipic); + ipic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_IPIC_INTS , + &ipic_host_ops, ipic);if (ipic->irqhost ==NULL ) {kfree (ipic);return NULL ;
arch/powerpc/sysdev/mpic.c +3 -3
@@ -1483,9 +1483,9 @@ struct mpic * __init mpic_alloc(struct device_node *node, mpic->isu_shift =1 +__ilog2 (mpic->isu_size -1 ); mpic->isu_mask = (1 << mpic->isu_shift) -1 ; - mpic->irqhost =irq_domain_add_linear (mpic->node, - intvec_top, - &mpic_host_ops, mpic); + mpic->irqhost =irq_domain_create_linear (of_fwnode_handle (mpic->node), + intvec_top, + &mpic_host_ops, mpic);/* * FIXME: The code leaks the MPIC object and mappings here; this
arch/powerpc/sysdev/tsi108_pci.c +2 -2
@@ -404,8 +404,8 @@ void __init tsi108_pci_int_init(struct device_node *node) {DBG ("Tsi108_pci_int_init: initializing PCI interrupts\n" ); - pci_irq_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &pci_irq_domain_ops,NULL ); + pci_irq_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &pci_irq_domain_ops,NULL );if (pci_irq_host ==NULL ) {printk (KERN_ERR "pci_irq_host: failed to allocate irq domain!\n" );return ;
arch/powerpc/sysdev/xive/common.c +1 -1
@@ -1464,7 +1464,7 @@ static const struct irq_domain_ops xive_irq_domain_ops = {static void __init xive_init_host (struct device_node *np) { - xive_irq_domain =irq_domain_add_tree (np, &xive_irq_domain_ops,NULL ); + xive_irq_domain =irq_domain_create_tree (of_fwnode_handle (np), &xive_irq_domain_ops,NULL );if (WARN_ON (xive_irq_domain ==NULL ))return ;irq_set_default_domain (xive_irq_domain);
[tip: irq/cleanups] powerpc: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 798c3754138bc746b70842dcdb3c03d3ce482e59 Gitweb: https://git.kernel.org/tip/798c3754138bc746b70842dcdb3c03d3ce482e59 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:25 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:40 +02:00
powerpc: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- arch/powerpc/platforms/44x/uic.c | 5 +++-- arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 3 ++- arch/powerpc/platforms/52xx/media5200.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 3 ++- arch/powerpc/platforms/8xx/pic.c | 3 ++- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 5 +++-- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 5 +++-- arch/powerpc/platforms/powermac/pic.c | 5 +++-- arch/powerpc/platforms/powernv/opal-irqchip.c | 3 ++- arch/powerpc/sysdev/cpm2_pic.c | 3 ++- arch/powerpc/sysdev/ehv_pic.c | 5 +++-- arch/powerpc/sysdev/fsl_msi.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 5 +++-- arch/powerpc/sysdev/i8259.c | 4 ++-- arch/powerpc/sysdev/ipic.c | 5 +++-- arch/powerpc/sysdev/mpic.c | 6 +++--- arch/powerpc/sysdev/tsi108_pci.c | 4 ++-- arch/powerpc/sysdev/xive/common.c | 2 +- 21 files changed, 45 insertions(+), 33 deletions(-)
arch/powerpc/platforms/44x/uic.c +3 -2
@@ -254,8 +254,9 @@ static struct uic * __init uic_init_one(struct device_node *node) } uic->dcrbase = *dcrreg; - uic->irqhost =irq_domain_add_linear (node,NR_UIC_INTS , &uic_host_ops, - uic); + uic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_UIC_INTS , &uic_host_ops, + uic);if (! uic->irqhost)return NULL ;/* FIXME: panic? */
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c +2 -1
@@ -188,7 +188,8 @@ mpc5121_ads_cpld_pic_init(void) cpld_pic_node =of_node_get (np); - cpld_pic_host =irq_domain_add_linear (np,16 , &cpld_pic_host_ops,NULL ); + cpld_pic_host =irq_domain_create_linear (of_fwnode_handle (np),16 , + &cpld_pic_host_ops,NULL );if (!cpld_pic_host) {printk (KERN_ERR "CPLD PIC: failed to allocate irq host!\n" ); goto end;
arch/powerpc/platforms/52xx/media5200.c +1 -1
@@ -168,7 +168,7 @@ static void __init media5200_init_irq(void)spin_lock_init (&media5200_irq.lock); - media5200_irq.irqhost =irq_domain_add_linear (fpga_np, + media5200_irq.irqhost =irq_domain_create_linear (of_fwnode_handle (fpga_np),MEDIA5200_NUM_IRQS , &media5200_irq_ops, &media5200_irq);if (!media5200_irq.irqhost) goto out;
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +2 -2
@@ -247,9 +247,9 @@ mpc52xx_gpt_irq_setup(struct mpc52xx_gpt_priv *gpt, struct device_node *node)if (!cascade_virq)return ; - gpt->irqhost =irq_domain_add_linear (node,1 , &mpc52xx_gpt_irq_ops, gpt); + gpt->irqhost =irq_domain_create_linear (of_fwnode_handle (node),1 , &mpc52xx_gpt_irq_ops, gpt);if (!gpt->irqhost) { -dev_err (gpt->dev,"irq_domain_add_linear() failed\n" ); +dev_err (gpt->dev,"irq_domain_create_linear() failed\n" );return ; }
arch/powerpc/platforms/52xx/mpc52xx_pic.c +1 -1
@@ -446,7 +446,7 @@ void __init mpc52xx_init_irq(void)* As last step, add an irq host to translate the real * hw irq information provided by the ofw to linux virq */ - mpc52xx_irqhost =irq_domain_add_linear (picnode, + mpc52xx_irqhost =irq_domain_create_linear (of_fwnode_handle (picnode), MPC52xx_IRQ_HIGHTESTHWIRQ, &mpc52xx_irqhost_ops,NULL );
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1 -1
@@ -278,7 +278,7 @@ void __init socrates_fpga_pic_init(struct device_node *pic)int i;/* Setup an irq_domain structure */ - socrates_fpga_pic_irq_host =irq_domain_add_linear (pic, + socrates_fpga_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (pic),SOCRATES_FPGA_NUM_IRQS , &socrates_fpga_pic_host_ops,NULL );if (socrates_fpga_pic_irq_host ==NULL ) {pr_err ("FPGA PIC: Unable to allocate host\n" );
arch/powerpc/platforms/8xx/cpm1-ic.c +2 -1
@@ -110,7 +110,8 @@ static int cpm_pic_probe(struct platform_device *pdev)out_be32 (&data->reg->cpic_cimr,0 ); - data->host =irq_domain_add_linear (dev->of_node,64 , &cpm_pic_host_ops, data); + data->host =irq_domain_create_linear (of_fwnode_handle (dev->of_node), +64 , &cpm_pic_host_ops, data);if (!data->host)return -ENODEV ;
arch/powerpc/platforms/8xx/pic.c +2 -1
@@ -146,7 +146,8 @@ void __init mpc8xx_pic_init(void)if (!siu_reg) goto out; - mpc8xx_pic_host =irq_domain_add_linear (np,64 , &mpc8xx_pic_host_ops,NULL ); + mpc8xx_pic_host =irq_domain_create_linear (of_fwnode_handle (np),64 , + &mpc8xx_pic_host_ops,NULL );if (!mpc8xx_pic_host)printk (KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n" );
arch/powerpc/platforms/embedded6xx/flipper-pic.c +3 -2
@@ -149,8 +149,9 @@ static struct irq_domain * __init flipper_pic_init(struct device_node *np)__flipper_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,FLIPPER_NR_IRQS , - &flipper_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +FLIPPER_NR_IRQS , + &flipper_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );return NULL ;
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +3 -2
@@ -175,8 +175,9 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)__hlwd_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,HLWD_NR_IRQS , - &hlwd_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +HLWD_NR_IRQS , + &hlwd_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );iounmap (io_base);
arch/powerpc/platforms/powermac/pic.c +3 -2
@@ -327,8 +327,9 @@ static void __init pmac_pic_probe_oldstyle(void)/* * Allocate an irq host */ - pmac_pic_host =irq_domain_add_linear (master, max_irqs, - &pmac_pic_host_ops,NULL ); + pmac_pic_host =irq_domain_create_linear (of_fwnode_handle (master), + max_irqs, + &pmac_pic_host_ops,NULL );BUG_ON (pmac_pic_host ==NULL );irq_set_default_domain (pmac_pic_host);
arch/powerpc/platforms/powernv/opal-irqchip.c +2 -1
@@ -191,7 +191,8 @@ int __init opal_event_init(void)* fall back to the legacy method (opal_event_request(...)) * anyway. */ dn =of_find_compatible_node (NULL ,NULL ,"ibm,opal-event" ); - opal_event_irqchip.domain =irq_domain_add_linear (dn,MAX_NUM_EVENTS , + opal_event_irqchip.domain =irq_domain_create_linear (of_fwnode_handle (dn), +MAX_NUM_EVENTS , &opal_event_domain_ops, &opal_event_irqchip);of_node_put (dn);if (!opal_event_irqchip.domain) {
arch/powerpc/sysdev/cpm2_pic.c +2 -1
@@ -259,7 +259,8 @@ void cpm2_pic_init(struct device_node *node)out_be32 (&cpm2_intctl->ic_scprrl,0x05309770 );/* create a legacy host */ - cpm2_pic_host =irq_domain_add_linear (node,64 , &cpm2_pic_host_ops,NULL ); + cpm2_pic_host =irq_domain_create_linear (of_fwnode_handle (node),64 , + &cpm2_pic_host_ops,NULL );if (cpm2_pic_host ==NULL ) {printk (KERN_ERR "CPM2 PIC: failed to allocate irq host!\n" );return ;
arch/powerpc/sysdev/ehv_pic.c +3 -2
@@ -269,8 +269,9 @@ void __init ehv_pic_init(void)return ; } - ehv_pic->irqhost =irq_domain_add_linear (np,NR_EHV_PIC_INTS , - &ehv_pic_host_ops, ehv_pic); + ehv_pic->irqhost =irq_domain_create_linear (of_fwnode_handle (np), +NR_EHV_PIC_INTS , + &ehv_pic_host_ops, ehv_pic);if (!ehv_pic->irqhost) {of_node_put (np);kfree (ehv_pic);
arch/powerpc/sysdev/fsl_msi.c +1 -1
@@ -412,7 +412,7 @@ static int fsl_of_msi_probe(struct platform_device *dev) }platform_set_drvdata (dev, msi); - msi->irqhost =irq_domain_add_linear (dev->dev.of_node, + msi->irqhost =irq_domain_create_linear (of_fwnode_handle (dev->dev.of_node),NR_MSI_IRQS_MAX , &fsl_msi_host_ops, msi);if (msi->irqhost ==NULL ) {
arch/powerpc/sysdev/ge/ge_pic.c +3 -2
@@ -214,8 +214,9 @@ void __init gef_pic_init(struct device_node *np) }/* Setup an irq_domain structure */ - gef_pic_irq_host =irq_domain_add_linear (np,GEF_PIC_NUM_IRQS , - &gef_pic_host_ops,NULL ); + gef_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (np), +GEF_PIC_NUM_IRQS , + &gef_pic_host_ops,NULL );if (gef_pic_irq_host ==NULL )return ;
arch/powerpc/sysdev/i8259.c +2 -2
@@ -260,8 +260,8 @@ void i8259_init(struct device_node *node, unsigned long intack_addr)raw_spin_unlock_irqrestore (&i8259_lock, flags);/* create a legacy host */ - i8259_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &i8259_host_ops,NULL ); + i8259_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &i8259_host_ops,NULL );if (i8259_host ==NULL ) {printk (KERN_ERR "i8259: failed to allocate irq host !\n" );return ;
arch/powerpc/sysdev/ipic.c +3 -2
@@ -711,8 +711,9 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)if (ipic ==NULL )return NULL ; - ipic->irqhost =irq_domain_add_linear (node,NR_IPIC_INTS , - &ipic_host_ops, ipic); + ipic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_IPIC_INTS , + &ipic_host_ops, ipic);if (ipic->irqhost ==NULL ) {kfree (ipic);return NULL ;
arch/powerpc/sysdev/mpic.c +3 -3
@@ -1483,9 +1483,9 @@ struct mpic * __init mpic_alloc(struct device_node *node, mpic->isu_shift =1 +__ilog2 (mpic->isu_size -1 ); mpic->isu_mask = (1 << mpic->isu_shift) -1 ; - mpic->irqhost =irq_domain_add_linear (mpic->node, - intvec_top, - &mpic_host_ops, mpic); + mpic->irqhost =irq_domain_create_linear (of_fwnode_handle (mpic->node), + intvec_top, + &mpic_host_ops, mpic);/* * FIXME: The code leaks the MPIC object and mappings here; this
arch/powerpc/sysdev/tsi108_pci.c +2 -2
@@ -404,8 +404,8 @@ void __init tsi108_pci_int_init(struct device_node *node) {DBG ("Tsi108_pci_int_init: initializing PCI interrupts\n" ); - pci_irq_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &pci_irq_domain_ops,NULL ); + pci_irq_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &pci_irq_domain_ops,NULL );if (pci_irq_host ==NULL ) {printk (KERN_ERR "pci_irq_host: failed to allocate irq domain!\n" );return ;
arch/powerpc/sysdev/xive/common.c +1 -1
@@ -1464,7 +1464,7 @@ static const struct irq_domain_ops xive_irq_domain_ops = {static void __init xive_init_host (struct device_node *np) { - xive_irq_domain =irq_domain_add_tree (np, &xive_irq_domain_ops,NULL ); + xive_irq_domain =irq_domain_create_tree (of_fwnode_handle (np), &xive_irq_domain_ops,NULL );if (WARN_ON (xive_irq_domain ==NULL ))return ;irq_set_default_domain (xive_irq_domain);
[tip: irq/cleanups] powerpc: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: bf9935e479399b6f261e0f592e85d17a5486192f Gitweb: https://git.kernel.org/tip/bf9935e479399b6f261e0f592e85d17a5486192f Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:25 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Fri, 16 May 2025 21:06:11 +02:00
powerpc: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- arch/powerpc/platforms/44x/uic.c | 5 +++-- arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 3 ++- arch/powerpc/platforms/52xx/media5200.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 3 ++- arch/powerpc/platforms/8xx/pic.c | 3 ++- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 5 +++-- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 5 +++-- arch/powerpc/platforms/powermac/pic.c | 5 +++-- arch/powerpc/platforms/powernv/opal-irqchip.c | 3 ++- arch/powerpc/sysdev/cpm2_pic.c | 3 ++- arch/powerpc/sysdev/ehv_pic.c | 5 +++-- arch/powerpc/sysdev/fsl_msi.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 5 +++-- arch/powerpc/sysdev/i8259.c | 4 ++-- arch/powerpc/sysdev/ipic.c | 5 +++-- arch/powerpc/sysdev/mpic.c | 6 +++--- arch/powerpc/sysdev/tsi108_pci.c | 4 ++-- arch/powerpc/sysdev/xive/common.c | 2 +- 21 files changed, 45 insertions(+), 33 deletions(-)
arch/powerpc/platforms/44x/uic.c +3 -2
@@ -254,8 +254,9 @@ static struct uic * __init uic_init_one(struct device_node *node) } uic->dcrbase = *dcrreg; - uic->irqhost =irq_domain_add_linear (node,NR_UIC_INTS , &uic_host_ops, - uic); + uic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_UIC_INTS , &uic_host_ops, + uic);if (! uic->irqhost)return NULL ;/* FIXME: panic? */
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c +2 -1
@@ -188,7 +188,8 @@ mpc5121_ads_cpld_pic_init(void) cpld_pic_node =of_node_get (np); - cpld_pic_host =irq_domain_add_linear (np,16 , &cpld_pic_host_ops,NULL ); + cpld_pic_host =irq_domain_create_linear (of_fwnode_handle (np),16 , + &cpld_pic_host_ops,NULL );if (!cpld_pic_host) {printk (KERN_ERR "CPLD PIC: failed to allocate irq host!\n" ); goto end;
arch/powerpc/platforms/52xx/media5200.c +1 -1
@@ -168,7 +168,7 @@ static void __init media5200_init_irq(void)spin_lock_init (&media5200_irq.lock); - media5200_irq.irqhost =irq_domain_add_linear (fpga_np, + media5200_irq.irqhost =irq_domain_create_linear (of_fwnode_handle (fpga_np),MEDIA5200_NUM_IRQS , &media5200_irq_ops, &media5200_irq);if (!media5200_irq.irqhost) goto out;
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +2 -2
@@ -247,9 +247,9 @@ mpc52xx_gpt_irq_setup(struct mpc52xx_gpt_priv *gpt, struct device_node *node)if (!cascade_virq)return ; - gpt->irqhost =irq_domain_add_linear (node,1 , &mpc52xx_gpt_irq_ops, gpt); + gpt->irqhost =irq_domain_create_linear (of_fwnode_handle (node),1 , &mpc52xx_gpt_irq_ops, gpt);if (!gpt->irqhost) { -dev_err (gpt->dev,"irq_domain_add_linear() failed\n" ); +dev_err (gpt->dev,"irq_domain_create_linear() failed\n" );return ; }
arch/powerpc/platforms/52xx/mpc52xx_pic.c +1 -1
@@ -446,7 +446,7 @@ void __init mpc52xx_init_irq(void)* As last step, add an irq host to translate the real * hw irq information provided by the ofw to linux virq */ - mpc52xx_irqhost =irq_domain_add_linear (picnode, + mpc52xx_irqhost =irq_domain_create_linear (of_fwnode_handle (picnode), MPC52xx_IRQ_HIGHTESTHWIRQ, &mpc52xx_irqhost_ops,NULL );
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1 -1
@@ -278,7 +278,7 @@ void __init socrates_fpga_pic_init(struct device_node *pic)int i;/* Setup an irq_domain structure */ - socrates_fpga_pic_irq_host =irq_domain_add_linear (pic, + socrates_fpga_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (pic),SOCRATES_FPGA_NUM_IRQS , &socrates_fpga_pic_host_ops,NULL );if (socrates_fpga_pic_irq_host ==NULL ) {pr_err ("FPGA PIC: Unable to allocate host\n" );
arch/powerpc/platforms/8xx/cpm1-ic.c +2 -1
@@ -110,7 +110,8 @@ static int cpm_pic_probe(struct platform_device *pdev)out_be32 (&data->reg->cpic_cimr,0 ); - data->host =irq_domain_add_linear (dev->of_node,64 , &cpm_pic_host_ops, data); + data->host =irq_domain_create_linear (of_fwnode_handle (dev->of_node), +64 , &cpm_pic_host_ops, data);if (!data->host)return -ENODEV ;
arch/powerpc/platforms/8xx/pic.c +2 -1
@@ -146,7 +146,8 @@ void __init mpc8xx_pic_init(void)if (!siu_reg) goto out; - mpc8xx_pic_host =irq_domain_add_linear (np,64 , &mpc8xx_pic_host_ops,NULL ); + mpc8xx_pic_host =irq_domain_create_linear (of_fwnode_handle (np),64 , + &mpc8xx_pic_host_ops,NULL );if (!mpc8xx_pic_host)printk (KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n" );
arch/powerpc/platforms/embedded6xx/flipper-pic.c +3 -2
@@ -149,8 +149,9 @@ static struct irq_domain * __init flipper_pic_init(struct device_node *np)__flipper_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,FLIPPER_NR_IRQS , - &flipper_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +FLIPPER_NR_IRQS , + &flipper_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );return NULL ;
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +3 -2
@@ -175,8 +175,9 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)__hlwd_quiesce (io_base); - irq_domain =irq_domain_add_linear (np,HLWD_NR_IRQS , - &hlwd_irq_domain_ops, io_base); + irq_domain =irq_domain_create_linear (of_fwnode_handle (np), +HLWD_NR_IRQS , + &hlwd_irq_domain_ops, io_base);if (!irq_domain) {pr_err ("failed to allocate irq_domain\n" );iounmap (io_base);
arch/powerpc/platforms/powermac/pic.c +3 -2
@@ -327,8 +327,9 @@ static void __init pmac_pic_probe_oldstyle(void)/* * Allocate an irq host */ - pmac_pic_host =irq_domain_add_linear (master, max_irqs, - &pmac_pic_host_ops,NULL ); + pmac_pic_host =irq_domain_create_linear (of_fwnode_handle (master), + max_irqs, + &pmac_pic_host_ops,NULL );BUG_ON (pmac_pic_host ==NULL );irq_set_default_domain (pmac_pic_host);
arch/powerpc/platforms/powernv/opal-irqchip.c +2 -1
@@ -191,7 +191,8 @@ int __init opal_event_init(void)* fall back to the legacy method (opal_event_request(...)) * anyway. */ dn =of_find_compatible_node (NULL ,NULL ,"ibm,opal-event" ); - opal_event_irqchip.domain =irq_domain_add_linear (dn,MAX_NUM_EVENTS , + opal_event_irqchip.domain =irq_domain_create_linear (of_fwnode_handle (dn), +MAX_NUM_EVENTS , &opal_event_domain_ops, &opal_event_irqchip);of_node_put (dn);if (!opal_event_irqchip.domain) {
arch/powerpc/sysdev/cpm2_pic.c +2 -1
@@ -259,7 +259,8 @@ void cpm2_pic_init(struct device_node *node)out_be32 (&cpm2_intctl->ic_scprrl,0x05309770 );/* create a legacy host */ - cpm2_pic_host =irq_domain_add_linear (node,64 , &cpm2_pic_host_ops,NULL ); + cpm2_pic_host =irq_domain_create_linear (of_fwnode_handle (node),64 , + &cpm2_pic_host_ops,NULL );if (cpm2_pic_host ==NULL ) {printk (KERN_ERR "CPM2 PIC: failed to allocate irq host!\n" );return ;
arch/powerpc/sysdev/ehv_pic.c +3 -2
@@ -269,8 +269,9 @@ void __init ehv_pic_init(void)return ; } - ehv_pic->irqhost =irq_domain_add_linear (np,NR_EHV_PIC_INTS , - &ehv_pic_host_ops, ehv_pic); + ehv_pic->irqhost =irq_domain_create_linear (of_fwnode_handle (np), +NR_EHV_PIC_INTS , + &ehv_pic_host_ops, ehv_pic);if (!ehv_pic->irqhost) {of_node_put (np);kfree (ehv_pic);
arch/powerpc/sysdev/fsl_msi.c +1 -1
@@ -412,7 +412,7 @@ static int fsl_of_msi_probe(struct platform_device *dev) }platform_set_drvdata (dev, msi); - msi->irqhost =irq_domain_add_linear (dev->dev.of_node, + msi->irqhost =irq_domain_create_linear (of_fwnode_handle (dev->dev.of_node),NR_MSI_IRQS_MAX , &fsl_msi_host_ops, msi);if (msi->irqhost ==NULL ) {
arch/powerpc/sysdev/ge/ge_pic.c +3 -2
@@ -214,8 +214,9 @@ void __init gef_pic_init(struct device_node *np) }/* Setup an irq_domain structure */ - gef_pic_irq_host =irq_domain_add_linear (np,GEF_PIC_NUM_IRQS , - &gef_pic_host_ops,NULL ); + gef_pic_irq_host =irq_domain_create_linear (of_fwnode_handle (np), +GEF_PIC_NUM_IRQS , + &gef_pic_host_ops,NULL );if (gef_pic_irq_host ==NULL )return ;
arch/powerpc/sysdev/i8259.c +2 -2
@@ -260,8 +260,8 @@ void i8259_init(struct device_node *node, unsigned long intack_addr)raw_spin_unlock_irqrestore (&i8259_lock, flags);/* create a legacy host */ - i8259_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &i8259_host_ops,NULL ); + i8259_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &i8259_host_ops,NULL );if (i8259_host ==NULL ) {printk (KERN_ERR "i8259: failed to allocate irq host !\n" );return ;
arch/powerpc/sysdev/ipic.c +3 -2
@@ -711,8 +711,9 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)if (ipic ==NULL )return NULL ; - ipic->irqhost =irq_domain_add_linear (node,NR_IPIC_INTS , - &ipic_host_ops, ipic); + ipic->irqhost =irq_domain_create_linear (of_fwnode_handle (node), +NR_IPIC_INTS , + &ipic_host_ops, ipic);if (ipic->irqhost ==NULL ) {kfree (ipic);return NULL ;
arch/powerpc/sysdev/mpic.c +3 -3
@@ -1483,9 +1483,9 @@ struct mpic * __init mpic_alloc(struct device_node *node, mpic->isu_shift =1 +__ilog2 (mpic->isu_size -1 ); mpic->isu_mask = (1 << mpic->isu_shift) -1 ; - mpic->irqhost =irq_domain_add_linear (mpic->node, - intvec_top, - &mpic_host_ops, mpic); + mpic->irqhost =irq_domain_create_linear (of_fwnode_handle (mpic->node), + intvec_top, + &mpic_host_ops, mpic);/* * FIXME: The code leaks the MPIC object and mappings here; this
arch/powerpc/sysdev/tsi108_pci.c +2 -2
@@ -404,8 +404,8 @@ void __init tsi108_pci_int_init(struct device_node *node) {DBG ("Tsi108_pci_int_init: initializing PCI interrupts\n" ); - pci_irq_host =irq_domain_add_legacy (node,NR_IRQS_LEGACY ,0 ,0 , - &pci_irq_domain_ops,NULL ); + pci_irq_host =irq_domain_create_legacy (of_fwnode_handle (node),NR_IRQS_LEGACY ,0 ,0 , + &pci_irq_domain_ops,NULL );if (pci_irq_host ==NULL ) {printk (KERN_ERR "pci_irq_host: failed to allocate irq domain!\n" );return ;
arch/powerpc/sysdev/xive/common.c +1 -1
@@ -1464,7 +1464,7 @@ static const struct irq_domain_ops xive_irq_domain_ops = {static void __init xive_init_host (struct device_node *np) { - xive_irq_domain =irq_domain_add_tree (np, &xive_irq_domain_ops,NULL ); + xive_irq_domain =irq_domain_create_tree (of_fwnode_handle (np), &xive_irq_domain_ops,NULL );if (WARN_ON (xive_irq_domain ==NULL ))return ;irq_set_default_domain (xive_irq_domain);
PATCH v2 33/57 irqdomain: sh: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)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).
--- 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(-)
arch/sh/boards/mach-se/7343/irq.c +3 -2
@@ -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 ;
arch/sh/boards/mach-se/7722/irq.c +1 -1
@@ -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" );
arch/sh/boards/mach-x3proto/gpio.c +1 -1
@@ -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;
drivers/sh/intc/irqdomain.c +2 -3
@@ -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); }
Signature · 1 line
2.49.0
[tip: irq/cleanups] sh: Switch to irq_domain_create_*()
The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: efab433e07f16f16f94aa9df32a31230be8edad3 Gitweb: https://git.kernel.org/tip/efab433e07f16f16f94aa9df32a31230be8edad3 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:26 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:07 +02:00
sh: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- 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(-)
arch/sh/boards/mach-se/7343/irq.c +3 -2
@@ -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 ;
arch/sh/boards/mach-se/7722/irq.c +1 -1
@@ -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" );
arch/sh/boards/mach-x3proto/gpio.c +1 -1
@@ -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;
drivers/sh/intc/irqdomain.c +2 -3
@@ -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); }
[tip: irq/cleanups] sh: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 2d50035e93f6adefe72755e57723adba34fcdf2b Gitweb: https://git.kernel.org/tip/2d50035e93f6adefe72755e57723adba34fcdf2b Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:26 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:23 +02:00
sh: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- 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(-)
arch/sh/boards/mach-se/7343/irq.c +3 -2
@@ -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 ;
arch/sh/boards/mach-se/7722/irq.c +1 -1
@@ -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" );
arch/sh/boards/mach-x3proto/gpio.c +1 -1
@@ -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;
drivers/sh/intc/irqdomain.c +2 -3
@@ -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); }
[tip: irq/cleanups] sh: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 2e38bfc2ca8c8d1796a5d1bf6cddfb88cf291334 Gitweb: https://git.kernel.org/tip/2e38bfc2ca8c8d1796a5d1bf6cddfb88cf291334 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:26 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:40 +02:00
sh: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- 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(-)
arch/sh/boards/mach-se/7343/irq.c +3 -2
@@ -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 ;
arch/sh/boards/mach-se/7722/irq.c +1 -1
@@ -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" );
arch/sh/boards/mach-x3proto/gpio.c +1 -1
@@ -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;
drivers/sh/intc/irqdomain.c +2 -3
@@ -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); }
[tip: irq/cleanups] sh: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: b625f934ba1c4c7feb026a484564b1f922f254c2 Gitweb: https://git.kernel.org/tip/b625f934ba1c4c7feb026a484564b1f922f254c2 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:26 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Fri, 16 May 2025 21:06:11 +02:00
sh: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- 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(-)
arch/sh/boards/mach-se/7343/irq.c +3 -2
@@ -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 ;
arch/sh/boards/mach-se/7722/irq.c +1 -1
@@ -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" );
arch/sh/boards/mach-x3proto/gpio.c +1 -1
@@ -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;
drivers/sh/intc/irqdomain.c +2 -3
@@ -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); }
PATCH v2 34/57 irqdomain: soc: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)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).
--- drivers/soc/dove/pmu.c | 4 ++-- drivers/soc/fsl/qe/qe_ic.c | 4 ++-- drivers/soc/qcom/smp2p.c | 2 +- drivers/soc/qcom/smsm.c | 2 +- drivers/soc/tegra/pmc.c | 5 +++-- 5 files changed, 9 insertions(+), 8 deletions(-)
drivers/soc/dove/pmu.c +2 -2
@@ -274,8 +274,8 @@ static int __init dove_init_pmu_irq(struct pmu_data *pmu, int irq)writel (0 , pmu->pmc_base +PMC_IRQ_MASK );writel (0 , pmu->pmc_base +PMC_IRQ_CAUSE ); - domain =irq_domain_add_linear (pmu->of_node,NR_PMU_IRQS , - &irq_generic_chip_ops,NULL ); + domain =irq_domain_create_linear (of_fwnode_handle (pmu->of_node),NR_PMU_IRQS , + &irq_generic_chip_ops,NULL );if (!domain) {pr_err ("%s: unable to add irq domain\n" , name);return -ENOMEM ;
drivers/soc/fsl/qe/qe_ic.c +2 -2
@@ -446,8 +446,8 @@ static int qe_ic_init(struct platform_device *pdev) high_handler =NULL ; } - qe_ic->irqhost =irq_domain_add_linear (node,NR_QE_IC_INTS , - &qe_ic_host_ops, qe_ic); + qe_ic->irqhost =irq_domain_create_linear (of_fwnode_handle (node),NR_QE_IC_INTS , + &qe_ic_host_ops, qe_ic);if (qe_ic->irqhost ==NULL ) {dev_err (dev,"failed to add irq domain\n" );return -ENODEV ;
drivers/soc/qcom/smp2p.c +1 -1
@@ -399,7 +399,7 @@ static int qcom_smp2p_inbound_entry(struct qcom_smp2p *smp2p,struct smp2p_entry *entry, struct device_node *node) { - entry->domain = irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry); + entry->domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &smp2p_irq_ops, entry);if (!entry->domain) {dev_err (smp2p->dev,"failed to add irq_domain\n" );return -ENOMEM ;
drivers/soc/qcom/smsm.c +1 -1
@@ -456,7 +456,7 @@ static int smsm_inbound_entry(struct qcom_smsm *smsm,return ret; } - entry->domain =irq_domain_add_linear (node,32 , &smsm_irq_ops, entry); + entry->domain =irq_domain_create_linear (of_fwnode_handle (node),32 , &smsm_irq_ops, entry);if (!entry->domain) {dev_err (smsm->dev,"failed to add irq_domain\n" );return -ENOMEM ;
drivers/soc/tegra/pmc.c +3 -2
@@ -2500,8 +2500,9 @@ static int tegra_pmc_irq_init(struct tegra_pmc *pmc) pmc->irq.irq_set_type = pmc->soc->irq_set_type; pmc->irq.irq_set_wake = pmc->soc->irq_set_wake; - pmc->domain =irq_domain_add_hierarchy (parent,0 ,96 , pmc->dev->of_node, - &tegra_pmc_irq_domain_ops, pmc); + pmc->domain =irq_domain_create_hierarchy (parent,0 ,96 , +of_fwnode_handle (pmc->dev->of_node), + &tegra_pmc_irq_domain_ops, pmc);if (!pmc->domain) {dev_err (pmc->dev,"failed to allocate domain\n" );return -ENOMEM ;
Signature · 1 line
2.49.0
Re: [PATCH v2 34/57] irqdomain: soc: Switch to irq_domain_create_*()
Le 19/03/2025 à 10:29, Jiri Slaby (SUSE) a écrit :
Quoted 11 lines
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_handleinstead of structdevice_node. Therefore,of_fwnode_handle()is added around the original parameter.Note some of the users can likely use
dev->fwnodedirectly instead of indirectof_fwnode_handle(dev->of_node). Butdev->fwnodeis 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).
Quoted 10 lines
Signed-off-by Jiri Slaby (SUSE) <[email protected]>Cc Andrew Lunn <[email protected]>Cc Sebastian Hesselbarth <[email protected]>Cc Gregory Clement <[email protected]>Cc Qiang Zhao <[email protected]>Cc Christophe Leroy <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Konrad Dybcio <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>
Quoted 80 lines
--- drivers/soc/dove/pmu.c | 4 ++-- drivers/soc/fsl/qe/qe_ic.c | 4 ++-- drivers/soc/qcom/smp2p.c | 2 +- drivers/soc/qcom/smsm.c | 2 +- drivers/soc/tegra/pmc.c | 5 +++-- 5 files changed, 9 insertions(+), 8 deletions(-)drivers/soc/dove/pmu.c +2
-2@@ -274,8 +274,8 @@ static int __init dove_init_pmu_irq(struct pmu_data *pmu, int irq)writel (0 , pmu->pmc_base +PMC_IRQ_MASK );writel (0 , pmu->pmc_base +PMC_IRQ_CAUSE ); - domain =irq_domain_add_linear (pmu->of_node,NR_PMU_IRQS , - &irq_generic_chip_ops,NULL ); + domain =irq_domain_create_linear (of_fwnode_handle (pmu->of_node),NR_PMU_IRQS , + &irq_generic_chip_ops,NULL );if (!domain) {pr_err ("%s: unable to add irq domain\n" , name);return -ENOMEM ;drivers/soc/fsl/qe/qe_ic.c +2
-2@@ -446,8 +446,8 @@ static int qe_ic_init(struct platform_device *pdev) high_handler =NULL ; } - qe_ic->irqhost =irq_domain_add_linear (node,NR_QE_IC_INTS , - &qe_ic_host_ops, qe_ic); + qe_ic->irqhost =irq_domain_create_linear (of_fwnode_handle (node),NR_QE_IC_INTS , + &qe_ic_host_ops, qe_ic);if (qe_ic->irqhost ==NULL ) {dev_err (dev,"failed to add irq domain\n" );return -ENODEV ;drivers/soc/qcom/smp2p.c +1
-1@@ -399,7 +399,7 @@ static int qcom_smp2p_inbound_entry(struct qcom_smp2p *smp2p,struct smp2p_entry *entry, struct device_node *node) { - entry->domain = irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry); + entry->domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &smp2p_irq_ops, entry);if (!entry->domain) {dev_err (smp2p->dev,"failed to add irq_domain\n" );return -ENOMEM ;drivers/soc/qcom/smsm.c +1
-1@@ -456,7 +456,7 @@ static int smsm_inbound_entry(struct qcom_smsm *smsm,return ret; } - entry->domain =irq_domain_add_linear (node,32 , &smsm_irq_ops, entry); + entry->domain =irq_domain_create_linear (of_fwnode_handle (node),32 , &smsm_irq_ops, entry);if (!entry->domain) {dev_err (smsm->dev,"failed to add irq_domain\n" );return -ENOMEM ;drivers/soc/tegra/pmc.c +3
-2@@ -2500,8 +2500,9 @@ static int tegra_pmc_irq_init(struct tegra_pmc *pmc) pmc->irq.irq_set_type = pmc->soc->irq_set_type; pmc->irq.irq_set_wake = pmc->soc->irq_set_wake; - pmc->domain =irq_domain_add_hierarchy (parent,0 ,96 , pmc->dev->of_node, - &tegra_pmc_irq_domain_ops, pmc); + pmc->domain =irq_domain_create_hierarchy (parent,0 ,96 , +of_fwnode_handle (pmc->dev->of_node), + &tegra_pmc_irq_domain_ops, pmc);if (!pmc->domain) {dev_err (pmc->dev,"failed to allocate domain\n" );return -ENOMEM ;
[tip: irq/cleanups] soc: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 8669b2840ef4a797bb38e248f1ab8d9c2b0d1d4f Gitweb: https://git.kernel.org/tip/8669b2840ef4a797bb38e248f1ab8d9c2b0d1d4f Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:27 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:07 +02:00
soc: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/soc/dove/pmu.c | 4 ++-- drivers/soc/fsl/qe/qe_ic.c | 4 ++-- drivers/soc/qcom/smp2p.c | 2 +- drivers/soc/qcom/smsm.c | 2 +- drivers/soc/tegra/pmc.c | 5 +++-- 5 files changed, 9 insertions(+), 8 deletions(-)
drivers/soc/dove/pmu.c +2 -2
@@ -274,8 +274,8 @@ static int __init dove_init_pmu_irq(struct pmu_data *pmu, int irq)writel (0 , pmu->pmc_base +PMC_IRQ_MASK );writel (0 , pmu->pmc_base +PMC_IRQ_CAUSE ); - domain =irq_domain_add_linear (pmu->of_node,NR_PMU_IRQS , - &irq_generic_chip_ops,NULL ); + domain =irq_domain_create_linear (of_fwnode_handle (pmu->of_node),NR_PMU_IRQS , + &irq_generic_chip_ops,NULL );if (!domain) {pr_err ("%s: unable to add irq domain\n" , name);return -ENOMEM ;
drivers/soc/fsl/qe/qe_ic.c +2 -2
@@ -446,8 +446,8 @@ static int qe_ic_init(struct platform_device *pdev) high_handler =NULL ; } - qe_ic->irqhost =irq_domain_add_linear (node,NR_QE_IC_INTS , - &qe_ic_host_ops, qe_ic); + qe_ic->irqhost =irq_domain_create_linear (of_fwnode_handle (node),NR_QE_IC_INTS , + &qe_ic_host_ops, qe_ic);if (qe_ic->irqhost ==NULL ) {dev_err (dev,"failed to add irq domain\n" );return -ENODEV ;
drivers/soc/qcom/smp2p.c +1 -1
@@ -399,7 +399,7 @@ static int qcom_smp2p_inbound_entry(struct qcom_smp2p *smp2p,struct smp2p_entry *entry, struct device_node *node) { - entry->domain = irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry); + entry->domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &smp2p_irq_ops, entry);if (!entry->domain) {dev_err (smp2p->dev,"failed to add irq_domain\n" );return -ENOMEM ;
drivers/soc/qcom/smsm.c +1 -1
@@ -456,7 +456,7 @@ static int smsm_inbound_entry(struct qcom_smsm *smsm,return ret; } - entry->domain =irq_domain_add_linear (node,32 , &smsm_irq_ops, entry); + entry->domain =irq_domain_create_linear (of_fwnode_handle (node),32 , &smsm_irq_ops, entry);if (!entry->domain) {dev_err (smsm->dev,"failed to add irq_domain\n" );return -ENOMEM ;
drivers/soc/tegra/pmc.c +3 -2
@@ -2500,8 +2500,9 @@ static int tegra_pmc_irq_init(struct tegra_pmc *pmc) pmc->irq.irq_set_type = pmc->soc->irq_set_type; pmc->irq.irq_set_wake = pmc->soc->irq_set_wake; - pmc->domain =irq_domain_add_hierarchy (parent,0 ,96 , pmc->dev->of_node, - &tegra_pmc_irq_domain_ops, pmc); + pmc->domain =irq_domain_create_hierarchy (parent,0 ,96 , +of_fwnode_handle (pmc->dev->of_node), + &tegra_pmc_irq_domain_ops, pmc);if (!pmc->domain) {dev_err (pmc->dev,"failed to allocate domain\n" );return -ENOMEM ;
[tip: irq/cleanups] soc: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 8dce8fc2eb28ab4fbf4a57646fe5eb3057cb1966 Gitweb: https://git.kernel.org/tip/8dce8fc2eb28ab4fbf4a57646fe5eb3057cb1966 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:27 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:23 +02:00
soc: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/soc/dove/pmu.c | 4 ++-- drivers/soc/fsl/qe/qe_ic.c | 4 ++-- drivers/soc/qcom/smp2p.c | 2 +- drivers/soc/qcom/smsm.c | 2 +- drivers/soc/tegra/pmc.c | 5 +++-- 5 files changed, 9 insertions(+), 8 deletions(-)
drivers/soc/dove/pmu.c +2 -2
@@ -274,8 +274,8 @@ static int __init dove_init_pmu_irq(struct pmu_data *pmu, int irq)writel (0 , pmu->pmc_base +PMC_IRQ_MASK );writel (0 , pmu->pmc_base +PMC_IRQ_CAUSE ); - domain =irq_domain_add_linear (pmu->of_node,NR_PMU_IRQS , - &irq_generic_chip_ops,NULL ); + domain =irq_domain_create_linear (of_fwnode_handle (pmu->of_node),NR_PMU_IRQS , + &irq_generic_chip_ops,NULL );if (!domain) {pr_err ("%s: unable to add irq domain\n" , name);return -ENOMEM ;
drivers/soc/fsl/qe/qe_ic.c +2 -2
@@ -446,8 +446,8 @@ static int qe_ic_init(struct platform_device *pdev) high_handler =NULL ; } - qe_ic->irqhost =irq_domain_add_linear (node,NR_QE_IC_INTS , - &qe_ic_host_ops, qe_ic); + qe_ic->irqhost =irq_domain_create_linear (of_fwnode_handle (node),NR_QE_IC_INTS , + &qe_ic_host_ops, qe_ic);if (qe_ic->irqhost ==NULL ) {dev_err (dev,"failed to add irq domain\n" );return -ENODEV ;
drivers/soc/qcom/smp2p.c +1 -1
@@ -399,7 +399,7 @@ static int qcom_smp2p_inbound_entry(struct qcom_smp2p *smp2p,struct smp2p_entry *entry, struct device_node *node) { - entry->domain = irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry); + entry->domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &smp2p_irq_ops, entry);if (!entry->domain) {dev_err (smp2p->dev,"failed to add irq_domain\n" );return -ENOMEM ;
drivers/soc/qcom/smsm.c +1 -1
@@ -456,7 +456,7 @@ static int smsm_inbound_entry(struct qcom_smsm *smsm,return ret; } - entry->domain =irq_domain_add_linear (node,32 , &smsm_irq_ops, entry); + entry->domain =irq_domain_create_linear (of_fwnode_handle (node),32 , &smsm_irq_ops, entry);if (!entry->domain) {dev_err (smsm->dev,"failed to add irq_domain\n" );return -ENOMEM ;
drivers/soc/tegra/pmc.c +3 -2
@@ -2500,8 +2500,9 @@ static int tegra_pmc_irq_init(struct tegra_pmc *pmc) pmc->irq.irq_set_type = pmc->soc->irq_set_type; pmc->irq.irq_set_wake = pmc->soc->irq_set_wake; - pmc->domain =irq_domain_add_hierarchy (parent,0 ,96 , pmc->dev->of_node, - &tegra_pmc_irq_domain_ops, pmc); + pmc->domain =irq_domain_create_hierarchy (parent,0 ,96 , +of_fwnode_handle (pmc->dev->of_node), + &tegra_pmc_irq_domain_ops, pmc);if (!pmc->domain) {dev_err (pmc->dev,"failed to allocate domain\n" );return -ENOMEM ;
[tip: irq/cleanups] soc: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 327da7eb6770337d1de81c971748536a59ea794a Gitweb: https://git.kernel.org/tip/327da7eb6770337d1de81c971748536a59ea794a Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:27 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:40 +02:00
soc: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/soc/dove/pmu.c | 4 ++-- drivers/soc/fsl/qe/qe_ic.c | 4 ++-- drivers/soc/qcom/smp2p.c | 2 +- drivers/soc/qcom/smsm.c | 2 +- drivers/soc/tegra/pmc.c | 5 +++-- 5 files changed, 9 insertions(+), 8 deletions(-)
drivers/soc/dove/pmu.c +2 -2
@@ -274,8 +274,8 @@ static int __init dove_init_pmu_irq(struct pmu_data *pmu, int irq)writel (0 , pmu->pmc_base +PMC_IRQ_MASK );writel (0 , pmu->pmc_base +PMC_IRQ_CAUSE ); - domain =irq_domain_add_linear (pmu->of_node,NR_PMU_IRQS , - &irq_generic_chip_ops,NULL ); + domain =irq_domain_create_linear (of_fwnode_handle (pmu->of_node),NR_PMU_IRQS , + &irq_generic_chip_ops,NULL );if (!domain) {pr_err ("%s: unable to add irq domain\n" , name);return -ENOMEM ;
drivers/soc/fsl/qe/qe_ic.c +2 -2
@@ -446,8 +446,8 @@ static int qe_ic_init(struct platform_device *pdev) high_handler =NULL ; } - qe_ic->irqhost =irq_domain_add_linear (node,NR_QE_IC_INTS , - &qe_ic_host_ops, qe_ic); + qe_ic->irqhost =irq_domain_create_linear (of_fwnode_handle (node),NR_QE_IC_INTS , + &qe_ic_host_ops, qe_ic);if (qe_ic->irqhost ==NULL ) {dev_err (dev,"failed to add irq domain\n" );return -ENODEV ;
drivers/soc/qcom/smp2p.c +1 -1
@@ -399,7 +399,7 @@ static int qcom_smp2p_inbound_entry(struct qcom_smp2p *smp2p,struct smp2p_entry *entry, struct device_node *node) { - entry->domain = irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry); + entry->domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &smp2p_irq_ops, entry);if (!entry->domain) {dev_err (smp2p->dev,"failed to add irq_domain\n" );return -ENOMEM ;
drivers/soc/qcom/smsm.c +1 -1
@@ -456,7 +456,7 @@ static int smsm_inbound_entry(struct qcom_smsm *smsm,return ret; } - entry->domain =irq_domain_add_linear (node,32 , &smsm_irq_ops, entry); + entry->domain =irq_domain_create_linear (of_fwnode_handle (node),32 , &smsm_irq_ops, entry);if (!entry->domain) {dev_err (smsm->dev,"failed to add irq_domain\n" );return -ENOMEM ;
drivers/soc/tegra/pmc.c +3 -2
@@ -2500,8 +2500,9 @@ static int tegra_pmc_irq_init(struct tegra_pmc *pmc) pmc->irq.irq_set_type = pmc->soc->irq_set_type; pmc->irq.irq_set_wake = pmc->soc->irq_set_wake; - pmc->domain =irq_domain_add_hierarchy (parent,0 ,96 , pmc->dev->of_node, - &tegra_pmc_irq_domain_ops, pmc); + pmc->domain =irq_domain_create_hierarchy (parent,0 ,96 , +of_fwnode_handle (pmc->dev->of_node), + &tegra_pmc_irq_domain_ops, pmc);if (!pmc->domain) {dev_err (pmc->dev,"failed to allocate domain\n" );return -ENOMEM ;
[tip: irq/cleanups] soc: Switch to irq_domain_create_*()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 6e4e30d70a91c04ccd563b3127486a736ddf0f3c Gitweb: https://git.kernel.org/tip/6e4e30d70a91c04ccd563b3127486a736ddf0f3c Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:27 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Fri, 16 May 2025 21:06:11 +02:00
soc: Switch to irq_domain_create_*()
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).
[ tglx: Fix up subject prefix ]
--- drivers/soc/dove/pmu.c | 4 ++-- drivers/soc/fsl/qe/qe_ic.c | 4 ++-- drivers/soc/qcom/smp2p.c | 2 +- drivers/soc/qcom/smsm.c | 2 +- drivers/soc/tegra/pmc.c | 5 +++-- 5 files changed, 9 insertions(+), 8 deletions(-)
drivers/soc/dove/pmu.c +2 -2
@@ -274,8 +274,8 @@ static int __init dove_init_pmu_irq(struct pmu_data *pmu, int irq)writel (0 , pmu->pmc_base +PMC_IRQ_MASK );writel (0 , pmu->pmc_base +PMC_IRQ_CAUSE ); - domain =irq_domain_add_linear (pmu->of_node,NR_PMU_IRQS , - &irq_generic_chip_ops,NULL ); + domain =irq_domain_create_linear (of_fwnode_handle (pmu->of_node),NR_PMU_IRQS , + &irq_generic_chip_ops,NULL );if (!domain) {pr_err ("%s: unable to add irq domain\n" , name);return -ENOMEM ;
drivers/soc/fsl/qe/qe_ic.c +2 -2
@@ -446,8 +446,8 @@ static int qe_ic_init(struct platform_device *pdev) high_handler =NULL ; } - qe_ic->irqhost =irq_domain_add_linear (node,NR_QE_IC_INTS , - &qe_ic_host_ops, qe_ic); + qe_ic->irqhost =irq_domain_create_linear (of_fwnode_handle (node),NR_QE_IC_INTS , + &qe_ic_host_ops, qe_ic);if (qe_ic->irqhost ==NULL ) {dev_err (dev,"failed to add irq domain\n" );return -ENODEV ;
drivers/soc/qcom/smp2p.c +1 -1
@@ -399,7 +399,7 @@ static int qcom_smp2p_inbound_entry(struct qcom_smp2p *smp2p,struct smp2p_entry *entry, struct device_node *node) { - entry->domain = irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry); + entry->domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &smp2p_irq_ops, entry);if (!entry->domain) {dev_err (smp2p->dev,"failed to add irq_domain\n" );return -ENOMEM ;
drivers/soc/qcom/smsm.c +1 -1
@@ -456,7 +456,7 @@ static int smsm_inbound_entry(struct qcom_smsm *smsm,return ret; } - entry->domain =irq_domain_add_linear (node,32 , &smsm_irq_ops, entry); + entry->domain =irq_domain_create_linear (of_fwnode_handle (node),32 , &smsm_irq_ops, entry);if (!entry->domain) {dev_err (smsm->dev,"failed to add irq_domain\n" );return -ENOMEM ;
drivers/soc/tegra/pmc.c +3 -2
@@ -2500,8 +2500,9 @@ static int tegra_pmc_irq_init(struct tegra_pmc *pmc) pmc->irq.irq_set_type = pmc->soc->irq_set_type; pmc->irq.irq_set_wake = pmc->soc->irq_set_wake; - pmc->domain =irq_domain_add_hierarchy (parent,0 ,96 , pmc->dev->of_node, - &tegra_pmc_irq_domain_ops, pmc); + pmc->domain =irq_domain_create_hierarchy (parent,0 ,96 , +of_fwnode_handle (pmc->dev->of_node), + &tegra_pmc_irq_domain_ops, pmc);if (!pmc->domain) {dev_err (pmc->dev,"failed to allocate domain\n" );return -ENOMEM ;
PATCH v2 35/57 irqdomain: sound: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
--- sound/soc/codecs/wcd937x.c | 2 +- sound/soc/codecs/wcd938x.c | 2 +- sound/soc/codecs/wcd939x.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/wcd937x.c +1 -1
@@ -2480,7 +2480,7 @@ static const struct irq_domain_ops wcd_domain_ops = {static int wcd937x_irq_init (struct wcd937x_priv *wcd,struct device *dev) { - wcd->virq =irq_domain_add_linear (NULL ,1 , &wcd_domain_ops,NULL ); + wcd->virq =irq_domain_create_linear (NULL ,1 , &wcd_domain_ops,NULL );if (!(wcd->virq)) {dev_err (dev,"%s: Failed to add IRQ domain\n" , __func__);return -EINVAL ;
sound/soc/codecs/wcd938x.c +1 -1
@@ -3025,7 +3025,7 @@ static const struct irq_domain_ops wcd_domain_ops = {static int wcd938x_irq_init (struct wcd938x_priv *wcd,struct device *dev) { - wcd->virq =irq_domain_add_linear (NULL ,1 , &wcd_domain_ops,NULL ); + wcd->virq =irq_domain_create_linear (NULL ,1 , &wcd_domain_ops,NULL );if (!(wcd->virq)) {dev_err (dev,"%s: Failed to add IRQ domain\n" , __func__);return -EINVAL ;
sound/soc/codecs/wcd939x.c +1 -1
@@ -2975,7 +2975,7 @@ static const struct irq_domain_ops wcd_domain_ops = {static int wcd939x_irq_init (struct wcd939x_priv *wcd,struct device *dev) { - wcd->virq =irq_domain_add_linear (NULL ,1 , &wcd_domain_ops,NULL ); + wcd->virq =irq_domain_create_linear (NULL ,1 , &wcd_domain_ops,NULL );if (!(wcd->virq)) {dev_err (dev,"%s: Failed to add IRQ domain\n" , __func__);return -EINVAL ;
Signature · 1 line
2.49.0
Mark Brown
maintainerRe: [PATCH v2 35/57] irqdomain: sound: Switch to irq_domain_create_linear()
Quoted 5 lines · Jiri Slaby (SUSE)
irq_domain_add_linear()is going away as being obsolete now. Switch to the preferredirq_domain_create_linear(). That differs in the first
parameter: It takes more generic structfwnode_handleinstead of structdevice_node. Therefore,of_fwnode_handle()is added around the parameter.
Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.
PATCH v2 36/57 irqdomain: spmi: Switch to irq_domain_create_tree()
In reply to Jiri Slaby (SUSE)irq_domain_add_tree() is going away as being obsolete now. Switch to the preferred irq_domain_create_tree(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
--- drivers/spmi/spmi-pmic-arb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spmi/spmi-pmic-arb.c +1 -1
@@ -1737,7 +1737,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,dev_dbg (&pdev->dev,"adding irq domain for bus %d\n" , bus_index); - bus->domain =irq_domain_add_tree (node, &pmic_arb_irq_domain_ops, bus); + bus->domain =irq_domain_create_tree (of_fwnode_handle (node), &pmic_arb_irq_domain_ops, bus);if (!bus->domain) {dev_err (&pdev->dev,"unable to create irq_domain\n" );return -ENOMEM ;
Signature · 1 line
2.49.0
Re: [PATCH v2 36/57] irqdomain: spmi: Switch to irq_domain_create_tree()
Quoting Jiri Slaby (SUSE) (2025-03-19 02:29:29)
Quoted 6 lines
irq_domain_add_tree()is going away as being obsolete now. Switch to the preferredirq_domain_create_tree(). That differs in the first
parameter: It takes more generic structfwnode_handleinstead of structdevice_node. Therefore,of_fwnode_handle()is added around the parameter.
Quoted 8 lines
Note some of the users can likely use
dev->fwnodedirectly instead of indirectof_fwnode_handle(dev->of_node). Butdev->fwnodeis 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) <[email protected]>Cc Stephen Boyd <[email protected]>---
Applied to spmi-next
PATCH v2 37/57 irqdomain: ssb: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
--- drivers/ssb/driver_gpio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/ssb/driver_gpio.c +4 -4
@@ -148,8 +148,8 @@ static int ssb_gpio_irq_chipco_domain_init(struct ssb_bus *bus)if (bus->bustype !=SSB_BUSTYPE_SSB )return 0 ; - bus->irq_domain =irq_domain_add_linear (NULL , chip->ngpio, - &irq_domain_simple_ops, chipco); + bus->irq_domain =irq_domain_create_linear (NULL , chip->ngpio, &irq_domain_simple_ops, + chipco);if (!bus->irq_domain) { err = -ENODEV ; goto err_irq_domain;
@@ -347,8 +347,8 @@ static int ssb_gpio_irq_extif_domain_init(struct ssb_bus *bus)if (bus->bustype !=SSB_BUSTYPE_SSB )return 0 ; - bus->irq_domain =irq_domain_add_linear (NULL , chip->ngpio, - &irq_domain_simple_ops, extif); + bus->irq_domain =irq_domain_create_linear (NULL , chip->ngpio, &irq_domain_simple_ops, + extif);if (!bus->irq_domain) { err = -ENODEV ; goto err_irq_domain;
Signature · 1 line
2.49.0
PATCH v2 38/57 irqdomain: thermal: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
--- drivers/thermal/qcom/lmh.c | 3 ++- drivers/thermal/tegra/soctherm.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/thermal/qcom/lmh.c +2 -1
@@ -209,7 +209,8 @@ static int lmh_probe(struct platform_device *pdev) } lmh_data->irq =platform_get_irq (pdev,0 ); - lmh_data->domain =irq_domain_add_linear (np,1 , &lmh_irq_ops, lmh_data); + lmh_data->domain =irq_domain_create_linear (of_fwnode_handle (np),1 , &lmh_irq_ops, + lmh_data);if (!lmh_data->domain) {dev_err (dev,"Error adding irq_domain\n" );return -EINVAL ;
drivers/thermal/tegra/soctherm.c +1 -1
@@ -1234,7 +1234,7 @@ static int soctherm_oc_int_init(struct device_node *np, int num_irqs) soc_irq_cdata.irq_chip.irq_set_type = soctherm_oc_irq_set_type; soc_irq_cdata.irq_chip.irq_set_wake =NULL ; - soc_irq_cdata.domain =irq_domain_add_linear (np, num_irqs, + soc_irq_cdata.domain =irq_domain_create_linear (of_fwnode_handle (np), num_irqs, &soctherm_oc_domain_ops, &soc_irq_cdata);
Signature · 1 line
2.49.0
[tip: irq/cleanups] thermal: Switch to irq_domain_create_linear()
The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 02ca56b022b20db9adf3ece846b6b103b829855e Gitweb: https://git.kernel.org/tip/02ca56b022b20db9adf3ece846b6b103b829855e Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:31 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:07 +02:00
thermal: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
[ tglx: Fixed up subject prefix ]
--- drivers/thermal/qcom/lmh.c | 3 ++- drivers/thermal/tegra/soctherm.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/thermal/qcom/lmh.c +2 -1
@@ -209,7 +209,8 @@ static int lmh_probe(struct platform_device *pdev) } lmh_data->irq =platform_get_irq (pdev,0 ); - lmh_data->domain =irq_domain_add_linear (np,1 , &lmh_irq_ops, lmh_data); + lmh_data->domain =irq_domain_create_linear (of_fwnode_handle (np),1 , &lmh_irq_ops, + lmh_data);if (!lmh_data->domain) {dev_err (dev,"Error adding irq_domain\n" );return -EINVAL ;
drivers/thermal/tegra/soctherm.c +1 -1
@@ -1234,7 +1234,7 @@ static int soctherm_oc_int_init(struct device_node *np, int num_irqs) soc_irq_cdata.irq_chip.irq_set_type = soctherm_oc_irq_set_type; soc_irq_cdata.irq_chip.irq_set_wake =NULL ; - soc_irq_cdata.domain =irq_domain_add_linear (np, num_irqs, + soc_irq_cdata.domain =irq_domain_create_linear (of_fwnode_handle (np), num_irqs, &soctherm_oc_domain_ops, &soc_irq_cdata);
[tip: irq/cleanups] thermal: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 04f60198608422bac71db63cee0d2a480e6015ba Gitweb: https://git.kernel.org/tip/04f60198608422bac71db63cee0d2a480e6015ba Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:31 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:24 +02:00
thermal: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
[ tglx: Fixed up subject prefix ]
--- drivers/thermal/qcom/lmh.c | 3 ++- drivers/thermal/tegra/soctherm.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/thermal/qcom/lmh.c +2 -1
@@ -209,7 +209,8 @@ static int lmh_probe(struct platform_device *pdev) } lmh_data->irq =platform_get_irq (pdev,0 ); - lmh_data->domain =irq_domain_add_linear (np,1 , &lmh_irq_ops, lmh_data); + lmh_data->domain =irq_domain_create_linear (of_fwnode_handle (np),1 , &lmh_irq_ops, + lmh_data);if (!lmh_data->domain) {dev_err (dev,"Error adding irq_domain\n" );return -EINVAL ;
drivers/thermal/tegra/soctherm.c +1 -1
@@ -1234,7 +1234,7 @@ static int soctherm_oc_int_init(struct device_node *np, int num_irqs) soc_irq_cdata.irq_chip.irq_set_type = soctherm_oc_irq_set_type; soc_irq_cdata.irq_chip.irq_set_wake =NULL ; - soc_irq_cdata.domain =irq_domain_add_linear (np, num_irqs, + soc_irq_cdata.domain =irq_domain_create_linear (of_fwnode_handle (np), num_irqs, &soctherm_oc_domain_ops, &soc_irq_cdata);
[tip: irq/cleanups] thermal: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: b17e8638c1e5aeb24d82b1a32a108cfa4b40f56f Gitweb: https://git.kernel.org/tip/b17e8638c1e5aeb24d82b1a32a108cfa4b40f56f Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:31 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:40 +02:00
thermal: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
[ tglx: Fixed up subject prefix ]
--- drivers/thermal/qcom/lmh.c | 3 ++- drivers/thermal/tegra/soctherm.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/thermal/qcom/lmh.c +2 -1
@@ -209,7 +209,8 @@ static int lmh_probe(struct platform_device *pdev) } lmh_data->irq =platform_get_irq (pdev,0 ); - lmh_data->domain =irq_domain_add_linear (np,1 , &lmh_irq_ops, lmh_data); + lmh_data->domain =irq_domain_create_linear (of_fwnode_handle (np),1 , &lmh_irq_ops, + lmh_data);if (!lmh_data->domain) {dev_err (dev,"Error adding irq_domain\n" );return -EINVAL ;
drivers/thermal/tegra/soctherm.c +1 -1
@@ -1234,7 +1234,7 @@ static int soctherm_oc_int_init(struct device_node *np, int num_irqs) soc_irq_cdata.irq_chip.irq_set_type = soctherm_oc_irq_set_type; soc_irq_cdata.irq_chip.irq_set_wake =NULL ; - soc_irq_cdata.domain =irq_domain_add_linear (np, num_irqs, + soc_irq_cdata.domain =irq_domain_create_linear (of_fwnode_handle (np), num_irqs, &soctherm_oc_domain_ops, &soc_irq_cdata);
[tip: irq/cleanups] thermal: Switch to irq_domain_create_linear()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 29dea335e3553ca285fc76177a7bbf942c6767a4 Gitweb: https://git.kernel.org/tip/29dea335e3553ca285fc76177a7bbf942c6767a4 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:31 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Fri, 16 May 2025 21:06:11 +02:00
thermal: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the 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).
[ tglx: Fixed up subject prefix ]
--- drivers/thermal/qcom/lmh.c | 3 ++- drivers/thermal/tegra/soctherm.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/thermal/qcom/lmh.c +2 -1
@@ -209,7 +209,8 @@ static int lmh_probe(struct platform_device *pdev) } lmh_data->irq =platform_get_irq (pdev,0 ); - lmh_data->domain =irq_domain_add_linear (np,1 , &lmh_irq_ops, lmh_data); + lmh_data->domain =irq_domain_create_linear (of_fwnode_handle (np),1 , &lmh_irq_ops, + lmh_data);if (!lmh_data->domain) {dev_err (dev,"Error adding irq_domain\n" );return -EINVAL ;
drivers/thermal/tegra/soctherm.c +1 -1
@@ -1234,7 +1234,7 @@ static int soctherm_oc_int_init(struct device_node *np, int num_irqs) soc_irq_cdata.irq_chip.irq_set_type = soctherm_oc_irq_set_type; soc_irq_cdata.irq_chip.irq_set_wake =NULL ; - soc_irq_cdata.domain =irq_domain_add_linear (np, num_irqs, + soc_irq_cdata.domain =irq_domain_create_linear (of_fwnode_handle (np), num_irqs, &soctherm_oc_domain_ops, &soc_irq_cdata);
PATCH v2 39/57 irqdomain: ppc: Switch irq_domain_add_nomap() to use fwnode
In reply to Jiri Slaby (SUSE)All irq_domain_add_*() functions are going away. PowerPC is the only user of irq_domain_add_nomap() and there is no irq_domain_create_nomap() complement.
Therefore, to align with the rest of kernel, rename irq_domain_add_nomap() to irq_domain_create_nomap() and accept fwnode_handle instead of device_node.
--- Documentation/core-api/irq/irq-domain.rst | 2 +- Documentation/translations/zh_CN/core-api/irq/irq-domain.rst | 2 +- arch/powerpc/platforms/powermac/smp.c | 2 +- arch/powerpc/platforms/ps3/interrupt.c | 2 +- include/linux/irqdomain.h | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-)
Documentation/core-api/irq/irq-domain.rst +1 -1
@@ -141,7 +141,7 @@ No Map :: - irq_domain_add_nomap() + irq_domain_create_nomap() The No Map mapping is to be used when the hwirq number is programmable in the hardware. In this case it is best to program the
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +1 -1
@@ -124,7 +124,7 @@ irq_domain_add_tree()和irq_domain_create_tree()在功能上是等价的,除 :: - irq_domain_add_nomap() + irq_domain_create_nomap() 当硬件中的hwirq号是可编程的时候,就可以采用无映射类型。 在这种情况下,最好将 Linux IRQ号编入硬件本身,这样就不需要映射了。 调用irq_create_direct_mapping()
arch/powerpc/platforms/powermac/smp.c +1 -1
@@ -190,7 +190,7 @@ static int __init psurge_secondary_ipi_init(void) {int rc = -ENOMEM ; - psurge_host =irq_domain_add_nomap (NULL , ~0 , &psurge_host_ops,NULL ); + psurge_host =irq_domain_create_nomap (NULL , ~0 , &psurge_host_ops,NULL );if (psurge_host) psurge_secondary_virq =irq_create_direct_mapping (psurge_host);
arch/powerpc/platforms/ps3/interrupt.c +1 -1
@@ -743,7 +743,7 @@ void __init ps3_init_IRQ(void)unsigned cpu;struct irq_domain *host; - host =irq_domain_add_nomap (NULL ,PS3_PLUG_MAX +1 , &ps3_host_ops,NULL ); + host =irq_domain_create_nomap (NULL ,PS3_PLUG_MAX +1 , &ps3_host_ops,NULL );irq_set_default_domain (host);for_each_possible_cpu (cpu) {
include/linux/irqdomain.h +2 -2
@@ -431,13 +431,13 @@ static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_no } #ifdef CONFIG_IRQ_DOMAIN_NOMAP -static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, +static inline struct irq_domain *irq_domain_create_nomap(struct fwnode_handle *fwnode, unsigned int max_irq, const struct irq_domain_ops *ops, void *host_data) { struct irq_domain_info info = { - .fwnode = of_fwnode_handle(of_node), + .fwnode = fwnode, .hwirq_max = max_irq, .direct_max = max_irq, .ops = ops,
Signature · 1 line
2.49.0
[tip: irq/cleanups] _PATCH_v2_39_57_irqdomain_ppc_Switch_irq_domain_add_nomap_to_use_fwnode
The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 86468022586e9712e62be8d6417d78e208a73198 Gitweb: https://git.kernel.org/tip/86468022586e9712e62be8d6417d78e208a73198 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:32 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:07 +02:00
_PATCH_v2_39_57_irqdomain_ppc_Switch_irq_domain_add_nomap_to_use_fwnode
All irq_domain_add_*() functions are going away. PowerPC is the only user of irq_domain_add_nomap() and there is no irq_domain_create_nomap() complement.
Therefore, to align with the rest of the kernel, rename irq_domain_add_nomap() to irq_domain_create_nomap() and accept a fwnode_handle instead of a device_node.
[ tglx: Fix up subject prefix ]
--- Documentation/core-api/irq/irq-domain.rst | 2 +- Documentation/translations/zh_CN/core-api/irq/irq-domain.rst | 2 +- arch/powerpc/platforms/powermac/smp.c | 2 +- arch/powerpc/platforms/ps3/interrupt.c | 2 +- include/linux/irqdomain.h | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-)
Documentation/core-api/irq/irq-domain.rst +1 -1
@@ -141,7 +141,7 @@ No Map :: - irq_domain_add_nomap() + irq_domain_create_nomap() The No Map mapping is to be used when the hwirq number is programmable in the hardware. In this case it is best to program the
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +1 -1
@@ -124,7 +124,7 @@ irq_domain_add_tree()和irq_domain_create_tree()在功能上是等价的,除� :: - irq_domain_add_nomap() + irq_domain_create_nomap() 当硬件中的hwirq号是可编程的时候,就可以采用无映射类型。 在这种情况下,最好将 Linux IRQ号编入硬件本身,这样就不需要映射了。 调用irq_create_direct_mapping()
arch/powerpc/platforms/powermac/smp.c +1 -1
@@ -190,7 +190,7 @@ static int __init psurge_secondary_ipi_init(void) {int rc = -ENOMEM ; - psurge_host =irq_domain_add_nomap (NULL , ~0 , &psurge_host_ops,NULL ); + psurge_host =irq_domain_create_nomap (NULL , ~0 , &psurge_host_ops,NULL );if (psurge_host) psurge_secondary_virq =irq_create_direct_mapping (psurge_host);
arch/powerpc/platforms/ps3/interrupt.c +1 -1
@@ -743,7 +743,7 @@ void __init ps3_init_IRQ(void)unsigned cpu;struct irq_domain *host; - host =irq_domain_add_nomap (NULL ,PS3_PLUG_MAX +1 , &ps3_host_ops,NULL ); + host =irq_domain_create_nomap (NULL ,PS3_PLUG_MAX +1 , &ps3_host_ops,NULL );irq_set_default_domain (host);for_each_possible_cpu (cpu) {
include/linux/irqdomain.h +2 -2
@@ -431,13 +431,13 @@ static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_no } #ifdef CONFIG_IRQ_DOMAIN_NOMAP -static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, +static inline struct irq_domain *irq_domain_create_nomap(struct fwnode_handle *fwnode, unsigned int max_irq, const struct irq_domain_ops *ops, void *host_data) { struct irq_domain_info info = { - .fwnode = of_fwnode_handle(of_node), + .fwnode = fwnode, .hwirq_max = max_irq, .direct_max = max_irq, .ops = ops,
[tip: irq/cleanups] _PATCH_v2_39_57_irqdomain_ppc_Switch_irq_domain_add_nomap_to_use_fwnode
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 2a56e7f16a7166605997103b3f108123c350d706 Gitweb: https://git.kernel.org/tip/2a56e7f16a7166605997103b3f108123c350d706 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:32 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:24 +02:00
_PATCH_v2_39_57_irqdomain_ppc_Switch_irq_domain_add_nomap_to_use_fwnode
All irq_domain_add_*() functions are going away. PowerPC is the only user of irq_domain_add_nomap() and there is no irq_domain_create_nomap() complement.
Therefore, to align with the rest of the kernel, rename irq_domain_add_nomap() to irq_domain_create_nomap() and accept a fwnode_handle instead of a device_node.
[ tglx: Fix up subject prefix ]
--- Documentation/core-api/irq/irq-domain.rst | 2 +- Documentation/translations/zh_CN/core-api/irq/irq-domain.rst | 2 +- arch/powerpc/platforms/powermac/smp.c | 2 +- arch/powerpc/platforms/ps3/interrupt.c | 2 +- include/linux/irqdomain.h | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-)
Documentation/core-api/irq/irq-domain.rst +1 -1
@@ -141,7 +141,7 @@ No Map :: - irq_domain_add_nomap() + irq_domain_create_nomap() The No Map mapping is to be used when the hwirq number is programmable in the hardware. In this case it is best to program the
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +1 -1
@@ -124,7 +124,7 @@ irq_domain_add_tree()和irq_domain_create_tree()在功能上是等价的,除� :: - irq_domain_add_nomap() + irq_domain_create_nomap() 当硬件中的hwirq号是可编程的时候,就可以采用无映射类型。 在这种情况下,最好将 Linux IRQ号编入硬件本身,这样就不需要映射了。 调用irq_create_direct_mapping()
arch/powerpc/platforms/powermac/smp.c +1 -1
@@ -190,7 +190,7 @@ static int __init psurge_secondary_ipi_init(void) {int rc = -ENOMEM ; - psurge_host =irq_domain_add_nomap (NULL , ~0 , &psurge_host_ops,NULL ); + psurge_host =irq_domain_create_nomap (NULL , ~0 , &psurge_host_ops,NULL );if (psurge_host) psurge_secondary_virq =irq_create_direct_mapping (psurge_host);
arch/powerpc/platforms/ps3/interrupt.c +1 -1
@@ -743,7 +743,7 @@ void __init ps3_init_IRQ(void)unsigned cpu;struct irq_domain *host; - host =irq_domain_add_nomap (NULL ,PS3_PLUG_MAX +1 , &ps3_host_ops,NULL ); + host =irq_domain_create_nomap (NULL ,PS3_PLUG_MAX +1 , &ps3_host_ops,NULL );irq_set_default_domain (host);for_each_possible_cpu (cpu) {
include/linux/irqdomain.h +2 -2
@@ -431,13 +431,13 @@ static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_no } #ifdef CONFIG_IRQ_DOMAIN_NOMAP -static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, +static inline struct irq_domain *irq_domain_create_nomap(struct fwnode_handle *fwnode, unsigned int max_irq, const struct irq_domain_ops *ops, void *host_data) { struct irq_domain_info info = { - .fwnode = of_fwnode_handle(of_node), + .fwnode = fwnode, .hwirq_max = max_irq, .direct_max = max_irq, .ops = ops,
[tip: irq/cleanups] _PATCH_v2_39_57_irqdomain_ppc_Switch_irq_domain_add_nomap_to_use_fwnode
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 2842da7b2b13c46327fe221a335e08efd35edba4 Gitweb: https://git.kernel.org/tip/2842da7b2b13c46327fe221a335e08efd35edba4 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:32 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:41 +02:00
_PATCH_v2_39_57_irqdomain_ppc_Switch_irq_domain_add_nomap_to_use_fwnode
All irq_domain_add_*() functions are going away. PowerPC is the only user of irq_domain_add_nomap() and there is no irq_domain_create_nomap() complement.
Therefore, to align with the rest of the kernel, rename irq_domain_add_nomap() to irq_domain_create_nomap() and accept a fwnode_handle instead of a device_node.
[ tglx: Fix up subject prefix ]
--- Documentation/core-api/irq/irq-domain.rst | 2 +- Documentation/translations/zh_CN/core-api/irq/irq-domain.rst | 2 +- arch/powerpc/platforms/powermac/smp.c | 2 +- arch/powerpc/platforms/ps3/interrupt.c | 2 +- include/linux/irqdomain.h | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-)
Documentation/core-api/irq/irq-domain.rst +1 -1
@@ -141,7 +141,7 @@ No Map :: - irq_domain_add_nomap() + irq_domain_create_nomap() The No Map mapping is to be used when the hwirq number is programmable in the hardware. In this case it is best to program the
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +1 -1
@@ -124,7 +124,7 @@ irq_domain_add_tree()和irq_domain_create_tree()在功能上是等价的,除� :: - irq_domain_add_nomap() + irq_domain_create_nomap() 当硬件中的hwirq号是可编程的时候,就可以采用无映射类型。 在这种情况下,最好将 Linux IRQ号编入硬件本身,这样就不需要映射了。 调用irq_create_direct_mapping()
arch/powerpc/platforms/powermac/smp.c +1 -1
@@ -190,7 +190,7 @@ static int __init psurge_secondary_ipi_init(void) {int rc = -ENOMEM ; - psurge_host =irq_domain_add_nomap (NULL , ~0 , &psurge_host_ops,NULL ); + psurge_host =irq_domain_create_nomap (NULL , ~0 , &psurge_host_ops,NULL );if (psurge_host) psurge_secondary_virq =irq_create_direct_mapping (psurge_host);
arch/powerpc/platforms/ps3/interrupt.c +1 -1
@@ -743,7 +743,7 @@ void __init ps3_init_IRQ(void)unsigned cpu;struct irq_domain *host; - host =irq_domain_add_nomap (NULL ,PS3_PLUG_MAX +1 , &ps3_host_ops,NULL ); + host =irq_domain_create_nomap (NULL ,PS3_PLUG_MAX +1 , &ps3_host_ops,NULL );irq_set_default_domain (host);for_each_possible_cpu (cpu) {
include/linux/irqdomain.h +2 -2
@@ -431,13 +431,13 @@ static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_no } #ifdef CONFIG_IRQ_DOMAIN_NOMAP -static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, +static inline struct irq_domain *irq_domain_create_nomap(struct fwnode_handle *fwnode, unsigned int max_irq, const struct irq_domain_ops *ops, void *host_data) { struct irq_domain_info info = { - .fwnode = of_fwnode_handle(of_node), + .fwnode = fwnode, .hwirq_max = max_irq, .direct_max = max_irq, .ops = ops,
[tip: irq/cleanups] powerpc: Switch irq_domain_add_nomap() to use fwnode
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 813da4f379e789c428d2e0a44730f852e090d47d Gitweb: https://git.kernel.org/tip/813da4f379e789c428d2e0a44730f852e090d47d Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:32 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Fri, 16 May 2025 21:06:11 +02:00
powerpc: Switch irq_domain_add_nomap() to use fwnode
All irq_domain_add_*() functions are going away. PowerPC is the only user of irq_domain_add_nomap() and there is no irq_domain_create_nomap() complement.
Therefore, to align with the rest of the kernel, rename irq_domain_add_nomap() to irq_domain_create_nomap() and accept a fwnode_handle instead of a device_node.
[ tglx: Fix up subject prefix ]
--- Documentation/core-api/irq/irq-domain.rst | 2 +- Documentation/translations/zh_CN/core-api/irq/irq-domain.rst | 2 +- arch/powerpc/platforms/powermac/smp.c | 2 +- arch/powerpc/platforms/ps3/interrupt.c | 2 +- include/linux/irqdomain.h | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-)
Documentation/core-api/irq/irq-domain.rst +1 -1
@@ -141,7 +141,7 @@ No Map :: - irq_domain_add_nomap() + irq_domain_create_nomap() The No Map mapping is to be used when the hwirq number is programmable in the hardware. In this case it is best to program the
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +1 -1
@@ -124,7 +124,7 @@ irq_domain_add_tree()和irq_domain_create_tree()在功能上是等价的,除� :: - irq_domain_add_nomap() + irq_domain_create_nomap() 当硬件中的hwirq号是可编程的时候,就可以采用无映射类型。 在这种情况下,最好将 Linux IRQ号编入硬件本身,这样就不需要映射了。 调用irq_create_direct_mapping()
arch/powerpc/platforms/powermac/smp.c +1 -1
@@ -190,7 +190,7 @@ static int __init psurge_secondary_ipi_init(void) {int rc = -ENOMEM ; - psurge_host =irq_domain_add_nomap (NULL , ~0 , &psurge_host_ops,NULL ); + psurge_host =irq_domain_create_nomap (NULL , ~0 , &psurge_host_ops,NULL );if (psurge_host) psurge_secondary_virq =irq_create_direct_mapping (psurge_host);
arch/powerpc/platforms/ps3/interrupt.c +1 -1
@@ -743,7 +743,7 @@ void __init ps3_init_IRQ(void)unsigned cpu;struct irq_domain *host; - host =irq_domain_add_nomap (NULL ,PS3_PLUG_MAX +1 , &ps3_host_ops,NULL ); + host =irq_domain_create_nomap (NULL ,PS3_PLUG_MAX +1 , &ps3_host_ops,NULL );irq_set_default_domain (host);for_each_possible_cpu (cpu) {
include/linux/irqdomain.h +2 -2
@@ -431,13 +431,13 @@ static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_no } #ifdef CONFIG_IRQ_DOMAIN_NOMAP -static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, +static inline struct irq_domain *irq_domain_create_nomap(struct fwnode_handle *fwnode, unsigned int max_irq, const struct irq_domain_ops *ops, void *host_data) { struct irq_domain_info info = { - .fwnode = of_fwnode_handle(of_node), + .fwnode = fwnode, .hwirq_max = max_irq, .direct_max = max_irq, .ops = ops,
PATCH v2 40/57 irqdomain: Drop irq_domain_add_*() functions
In reply to Jiri Slaby (SUSE)irq_domain_add_*() functions are unused now, so drop them.
Note: The Chinese docs are touched but unfinished. I cannot parse those.
--- 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(-)
Documentation/core-api/irq/irq-domain.rst +7 -27
@@ -92,7 +92,6 @@ Linear :: - irq_domain_add_linear() irq_domain_create_linear() 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_descs are only allocated for in-use IRQs. The disadvantage is that the table must be as large as the largest possible hwirq number. -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. Tree
@@ -117,7 +111,6 @@ Tree :: - irq_domain_add_tree() irq_domain_create_tree() 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. -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. No Map
@@ -159,8 +147,6 @@ Legacy :: - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy()
@@ -189,13 +175,13 @@ supported. For example, ISA controllers would use the legacy map for mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ numbers. -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 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_add_linear() or -irq_domain_create_linear() which means *no* irq descriptors will be allocated. +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. 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_create_mapping() before any irq_find_mapping() since the latter will actually work for the static IRQ assignment case. -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 --------------------
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +0 -4
@@ -83,7 +83,6 @@ irq_domain映射的类型 :: - irq_domain_add_linear() irq_domain_create_linear() 线性反向映射维护了一个固定大小的表,该表以hwirq号为索引。 当一个hwirq被映射
@@ -104,7 +103,6 @@ irq_domain_add_linear()和irq_domain_create_linear()在功能上是等价的, :: - irq_domain_add_tree() irq_domain_create_tree() irq_domain维护着从hwirq号到Linux IRQ的radix的树状映射。 当一个hwirq被映射时,
@@ -138,8 +136,6 @@ Linux IRQ号编入硬件本身,这样就不需要映射了。 调用irq_create :: - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy()
include/linux/irqdomain.h +0 -68
92 lines not on this page · raw message
kernel/irq/irqdomain.c +0 -27
@@ -480,33 +480,6 @@ struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode, }EXPORT_SYMBOL_GPL (irq_domain_create_simple); -/** -* irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain. -* @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 normally -* be '0', but a positive integer can be used if the effective -* 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,
Signature · 1 line
2.49.0
[tip: irq/cleanups] irqdomain: Drop irq_domain_add_*() functions
The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 41287841eeb3a4ef4bcec8bd61399f9cd76188e5 Gitweb: https://git.kernel.org/tip/41287841eeb3a4ef4bcec8bd61399f9cd76188e5 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:33 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:07 +02:00
irqdomain: Drop irq_domain_add_*() functions
Most irq_domain_add_*() functions are unused now, so drop them. The remaining ones are moved to the deprecated section and will be removed during the merge window after the patches in various trees have been merged.
Note: The Chinese docs are touched but unfinished. I cannot parse those.
[ tglx: Remove the leftover in irq-domain.rst and handle merge logistics ]
--- Documentation/core-api/irq/irq-domain.rst | 41 +--- Documentation/translations/zh_CN/core-api/irq/irq-domain.rst | 4 +- include/linux/irqdomain.h | 102 ++----- kernel/irq/irqdomain.c | 27 +-- 4 files changed, 44 insertions(+), 130 deletions(-)
Documentation/core-api/irq/irq-domain.rst +10 -31
@@ -42,10 +42,9 @@ irq_domain usage ================ An interrupt controller driver creates and registers an irq_domain by -calling one of the irq_domain_add_*() or irq_domain_create_*() functions -(each mapping method has a different allocator function, more on that later). -The function will return a pointer to the irq_domain on success. The caller -must provide the allocator function with an irq_domain_ops structure. +calling one of the irq_domain_create_*() functions. The function will +return a pointer to the irq_domain on success. The caller must provide the +allocator function with an irq_domain_ops structure. In most cases, the irq_domain will begin empty without any mappings between hwirq and IRQ numbers. Mappings are added to the irq_domain
@@ -92,7 +91,6 @@ Linear :: - irq_domain_add_linear() irq_domain_create_linear() The linear reverse map maintains a fixed size table indexed by the
@@ -105,11 +103,6 @@ map are fixed time lookup for IRQ numbers, and irq_descs are only allocated for in-use IRQs. The disadvantage is that the table must be as large as the largest possible hwirq number. -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. Tree
@@ -117,7 +110,6 @@ Tree :: - irq_domain_add_tree() irq_domain_create_tree() The irq_domain maintains a radix tree map from hwirq numbers to Linux
@@ -129,11 +121,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. -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. No Map
@@ -159,8 +146,6 @@ Legacy :: - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy()
@@ -189,13 +174,13 @@ supported. For example, ISA controllers would use the legacy map for mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ numbers. -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 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_add_linear() or -irq_domain_create_linear() which means *no* irq descriptors will be allocated. +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. A typical use case for simple domains is where an irqchip provider is supporting both dynamic and static IRQ assignments.
@@ -206,12 +191,6 @@ that the driver using the simple domain call irq_create_mapping() before any irq_find_mapping() since the latter will actually work for the static IRQ assignment case. -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 --------------------
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +0 -4
@@ -83,7 +83,6 @@ irq_domain映射的类型 :: - irq_domain_add_linear() irq_domain_create_linear() 线性反向映射维护了一个固定大小的表,该表以hwirq号为索引。 当一个hwirq被映射
@@ -104,7 +103,6 @@ irq_domain_add_linear()和irq_domain_create_linear()在功能上是等价的, :: - irq_domain_add_tree() irq_domain_create_tree() irq_domain维护着从hwirq号到Linux IRQ的radix的树状映射。 当一个hwirq被映射时,
@@ -138,8 +136,6 @@ Linux IRQ号编入硬件本身,这样就不需要映射了。 调用irq_create :: - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy()
include/linux/irqdomain.h +34 -68
132 lines not on this page · raw message
kernel/irq/irqdomain.c +0 -27
@@ -480,33 +480,6 @@ struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode, }EXPORT_SYMBOL_GPL (irq_domain_create_simple); -/** -* irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain. -* @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 normally -* be '0', but a positive integer can be used if the effective -* 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,
[tip: irq/cleanups] irqdomain: Drop irq_domain_add_*() functions
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 67199aebde7b16c78c0b33be40bb5c0e7662e217 Gitweb: https://git.kernel.org/tip/67199aebde7b16c78c0b33be40bb5c0e7662e217 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:33 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:24 +02:00
irqdomain: Drop irq_domain_add_*() functions
Most irq_domain_add_*() functions are unused now, so drop them. The remaining ones are moved to the deprecated section and will be removed during the merge window after the patches in various trees have been merged.
Note: The Chinese docs are touched but unfinished. I cannot parse those.
[ tglx: Remove the leftover in irq-domain.rst and handle merge logistics ]
--- Documentation/core-api/irq/irq-domain.rst | 41 +--- Documentation/translations/zh_CN/core-api/irq/irq-domain.rst | 4 +- include/linux/irqdomain.h | 102 ++----- kernel/irq/irqdomain.c | 27 +-- 4 files changed, 44 insertions(+), 130 deletions(-)
Documentation/core-api/irq/irq-domain.rst +10 -31
@@ -42,10 +42,9 @@ irq_domain usage ================ An interrupt controller driver creates and registers an irq_domain by -calling one of the irq_domain_add_*() or irq_domain_create_*() functions -(each mapping method has a different allocator function, more on that later). -The function will return a pointer to the irq_domain on success. The caller -must provide the allocator function with an irq_domain_ops structure. +calling one of the irq_domain_create_*() functions. The function will +return a pointer to the irq_domain on success. The caller must provide the +allocator function with an irq_domain_ops structure. In most cases, the irq_domain will begin empty without any mappings between hwirq and IRQ numbers. Mappings are added to the irq_domain
@@ -92,7 +91,6 @@ Linear :: - irq_domain_add_linear() irq_domain_create_linear() The linear reverse map maintains a fixed size table indexed by the
@@ -105,11 +103,6 @@ map are fixed time lookup for IRQ numbers, and irq_descs are only allocated for in-use IRQs. The disadvantage is that the table must be as large as the largest possible hwirq number. -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. Tree
@@ -117,7 +110,6 @@ Tree :: - irq_domain_add_tree() irq_domain_create_tree() The irq_domain maintains a radix tree map from hwirq numbers to Linux
@@ -129,11 +121,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. -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. No Map
@@ -159,8 +146,6 @@ Legacy :: - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy()
@@ -189,13 +174,13 @@ supported. For example, ISA controllers would use the legacy map for mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ numbers. -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 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_add_linear() or -irq_domain_create_linear() which means *no* irq descriptors will be allocated. +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. A typical use case for simple domains is where an irqchip provider is supporting both dynamic and static IRQ assignments.
@@ -206,12 +191,6 @@ that the driver using the simple domain call irq_create_mapping() before any irq_find_mapping() since the latter will actually work for the static IRQ assignment case. -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 --------------------
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +0 -4
@@ -83,7 +83,6 @@ irq_domain映射的类型 :: - irq_domain_add_linear() irq_domain_create_linear() 线性反向映射维护了一个固定大小的表,该表以hwirq号为索引。 当一个hwirq被映射
@@ -104,7 +103,6 @@ irq_domain_add_linear()和irq_domain_create_linear()在功能上是等价的, :: - irq_domain_add_tree() irq_domain_create_tree() irq_domain维护着从hwirq号到Linux IRQ的radix的树状映射。 当一个hwirq被映射时,
@@ -138,8 +136,6 @@ Linux IRQ号编入硬件本身,这样就不需要映射了。 调用irq_create :: - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy()
include/linux/irqdomain.h +34 -68
132 lines not on this page · raw message
kernel/irq/irqdomain.c +0 -27
@@ -480,33 +480,6 @@ struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode, }EXPORT_SYMBOL_GPL (irq_domain_create_simple); -/** -* irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain. -* @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 normally -* be '0', but a positive integer can be used if the effective -* 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,
[tip: irq/cleanups] irqdomain: Drop irq_domain_add_*() functions
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 769f0f0a511a5b1befc0ebd10ac5a07fd1c29bc7 Gitweb: https://git.kernel.org/tip/769f0f0a511a5b1befc0ebd10ac5a07fd1c29bc7 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:33 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:41 +02:00
irqdomain: Drop irq_domain_add_*() functions
Most irq_domain_add_*() functions are unused now, so drop them. The remaining ones are moved to the deprecated section and will be removed during the merge window after the patches in various trees have been merged.
Note: The Chinese docs are touched but unfinished. I cannot parse those.
[ tglx: Remove the leftover in irq-domain.rst and handle merge logistics ]
--- Documentation/core-api/irq/irq-domain.rst | 41 +--- Documentation/translations/zh_CN/core-api/irq/irq-domain.rst | 4 +- include/linux/irqdomain.h | 102 ++----- kernel/irq/irqdomain.c | 27 +-- 4 files changed, 44 insertions(+), 130 deletions(-)
Documentation/core-api/irq/irq-domain.rst +10 -31
@@ -42,10 +42,9 @@ irq_domain usage ================ An interrupt controller driver creates and registers an irq_domain by -calling one of the irq_domain_add_*() or irq_domain_create_*() functions -(each mapping method has a different allocator function, more on that later). -The function will return a pointer to the irq_domain on success. The caller -must provide the allocator function with an irq_domain_ops structure. +calling one of the irq_domain_create_*() functions. The function will +return a pointer to the irq_domain on success. The caller must provide the +allocator function with an irq_domain_ops structure. In most cases, the irq_domain will begin empty without any mappings between hwirq and IRQ numbers. Mappings are added to the irq_domain
@@ -92,7 +91,6 @@ Linear :: - irq_domain_add_linear() irq_domain_create_linear() The linear reverse map maintains a fixed size table indexed by the
@@ -105,11 +103,6 @@ map are fixed time lookup for IRQ numbers, and irq_descs are only allocated for in-use IRQs. The disadvantage is that the table must be as large as the largest possible hwirq number. -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. Tree
@@ -117,7 +110,6 @@ Tree :: - irq_domain_add_tree() irq_domain_create_tree() The irq_domain maintains a radix tree map from hwirq numbers to Linux
@@ -129,11 +121,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. -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. No Map
@@ -159,8 +146,6 @@ Legacy :: - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy()
@@ -189,13 +174,13 @@ supported. For example, ISA controllers would use the legacy map for mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ numbers. -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 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_add_linear() or -irq_domain_create_linear() which means *no* irq descriptors will be allocated. +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. A typical use case for simple domains is where an irqchip provider is supporting both dynamic and static IRQ assignments.
@@ -206,12 +191,6 @@ that the driver using the simple domain call irq_create_mapping() before any irq_find_mapping() since the latter will actually work for the static IRQ assignment case. -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 --------------------
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +0 -4
@@ -83,7 +83,6 @@ irq_domain映射的类型 :: - irq_domain_add_linear() irq_domain_create_linear() 线性反向映射维护了一个固定大小的表,该表以hwirq号为索引。 当一个hwirq被映射
@@ -104,7 +103,6 @@ irq_domain_add_linear()和irq_domain_create_linear()在功能上是等价的, :: - irq_domain_add_tree() irq_domain_create_tree() irq_domain维护着从hwirq号到Linux IRQ的radix的树状映射。 当一个hwirq被映射时,
@@ -138,8 +136,6 @@ Linux IRQ号编入硬件本身,这样就不需要映射了。 调用irq_create :: - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy()
include/linux/irqdomain.h +34 -68
132 lines not on this page · raw message
kernel/irq/irqdomain.c +0 -27
@@ -480,33 +480,6 @@ struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode, }EXPORT_SYMBOL_GPL (irq_domain_create_simple); -/** -* irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain. -* @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 normally -* be '0', but a positive integer can be used if the effective -* 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,
[tip: irq/cleanups] irqdomain: Drop irq_domain_add_*() functions
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 42b8b16fe56c206fde7fbae0116769d0addef4b7 Gitweb: https://git.kernel.org/tip/42b8b16fe56c206fde7fbae0116769d0addef4b7 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:33 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Fri, 16 May 2025 21:06:11 +02:00
irqdomain: Drop irq_domain_add_*() functions
Most irq_domain_add_*() functions are unused now, so drop them. The remaining ones are moved to the deprecated section and will be removed during the merge window after the patches in various trees have been merged.
Note: The Chinese docs are touched but unfinished. I cannot parse those.
[ tglx: Remove the leftover in irq-domain.rst and handle merge logistics ]
--- Documentation/core-api/irq/irq-domain.rst | 41 +--- Documentation/translations/zh_CN/core-api/irq/irq-domain.rst | 4 +- include/linux/irqdomain.h | 102 ++----- kernel/irq/irqdomain.c | 27 +-- 4 files changed, 44 insertions(+), 130 deletions(-)
Documentation/core-api/irq/irq-domain.rst +10 -31
@@ -42,10 +42,9 @@ irq_domain usage ================ An interrupt controller driver creates and registers an irq_domain by -calling one of the irq_domain_add_*() or irq_domain_create_*() functions -(each mapping method has a different allocator function, more on that later). -The function will return a pointer to the irq_domain on success. The caller -must provide the allocator function with an irq_domain_ops structure. +calling one of the irq_domain_create_*() functions. The function will +return a pointer to the irq_domain on success. The caller must provide the +allocator function with an irq_domain_ops structure. In most cases, the irq_domain will begin empty without any mappings between hwirq and IRQ numbers. Mappings are added to the irq_domain
@@ -92,7 +91,6 @@ Linear :: - irq_domain_add_linear() irq_domain_create_linear() The linear reverse map maintains a fixed size table indexed by the
@@ -105,11 +103,6 @@ map are fixed time lookup for IRQ numbers, and irq_descs are only allocated for in-use IRQs. The disadvantage is that the table must be as large as the largest possible hwirq number. -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. Tree
@@ -117,7 +110,6 @@ Tree :: - irq_domain_add_tree() irq_domain_create_tree() The irq_domain maintains a radix tree map from hwirq numbers to Linux
@@ -129,11 +121,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. -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. No Map
@@ -159,8 +146,6 @@ Legacy :: - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy()
@@ -189,13 +174,13 @@ supported. For example, ISA controllers would use the legacy map for mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ numbers. -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 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_add_linear() or -irq_domain_create_linear() which means *no* irq descriptors will be allocated. +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. A typical use case for simple domains is where an irqchip provider is supporting both dynamic and static IRQ assignments.
@@ -206,12 +191,6 @@ that the driver using the simple domain call irq_create_mapping() before any irq_find_mapping() since the latter will actually work for the static IRQ assignment case. -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 --------------------
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +0 -4
@@ -83,7 +83,6 @@ irq_domain映射的类型 :: - irq_domain_add_linear() irq_domain_create_linear() 线性反向映射维护了一个固定大小的表,该表以hwirq号为索引。 当一个hwirq被映射
@@ -104,7 +103,6 @@ irq_domain_add_linear()和irq_domain_create_linear()在功能上是等价的, :: - irq_domain_add_tree() irq_domain_create_tree() irq_domain维护着从hwirq号到Linux IRQ的radix的树状映射。 当一个hwirq被映射时,
@@ -138,8 +136,6 @@ Linux IRQ号编入硬件本身,这样就不需要映射了。 调用irq_create :: - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy()
include/linux/irqdomain.h +34 -68
132 lines not on this page · raw message
kernel/irq/irqdomain.c +0 -27
@@ -480,33 +480,6 @@ struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode, }EXPORT_SYMBOL_GPL (irq_domain_create_simple); -/** -* irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain. -* @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 normally -* be '0', but a positive integer can be used if the effective -* 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,
PATCH v2 41/57 irqdomain: ppc: Switch to irq_find_mapping()
In reply to Jiri Slaby (SUSE)irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping().
--- arch/powerpc/platforms/44x/uic.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 2 +- arch/powerpc/platforms/8xx/pic.c | 2 +- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 +- arch/powerpc/platforms/powermac/pic.c | 2 +- arch/powerpc/sysdev/cpm2_pic.c | 2 +- arch/powerpc/sysdev/ehv_pic.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 2 +- arch/powerpc/sysdev/ipic.c | 2 +- arch/powerpc/sysdev/mpic.c | 4 ++-- 14 files changed, 15 insertions(+), 15 deletions(-)
arch/powerpc/platforms/44x/uic.c +1 -1
@@ -328,5 +328,5 @@ unsigned int uic_get_irq(void) msr =mfdcr (primary_uic->dcrbase +UIC_MSR ); src =32 -ffs (msr); -return irq_linear_revmap (primary_uic->irqhost, src); +return irq_find_mapping (primary_uic->irqhost, src); }
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +1 -1
@@ -369,7 +369,7 @@ struct mpc52xx_gpt_priv *mpc52xx_gpt_from_irq(int irq)mutex_lock (&mpc52xx_gpt_list_mutex);list_for_each (pos, &mpc52xx_gpt_list) { gpt = container_of(pos, struct mpc52xx_gpt_priv, list); -if (gpt->irqhost && irq ==irq_linear_revmap (gpt->irqhost,0 )) { +if (gpt->irqhost && irq ==irq_find_mapping (gpt->irqhost,0 )) {mutex_unlock (&mpc52xx_gpt_list_mutex);return gpt; }
arch/powerpc/platforms/52xx/mpc52xx_pic.c +1 -1
@@ -515,5 +515,5 @@ unsigned int mpc52xx_get_irq(void)return 0 ; } -return irq_linear_revmap (mpc52xx_irqhost, irq); +return irq_find_mapping (mpc52xx_irqhost, irq); }
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1 -1
@@ -83,7 +83,7 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq)if (cause >> (i +16 ))break ; } -return irq_linear_revmap (socrates_fpga_pic_irq_host, +return irq_find_mapping (socrates_fpga_pic_irq_host, (irq_hw_number_t )i); }
arch/powerpc/platforms/8xx/cpm1-ic.c +1 -1
@@ -59,7 +59,7 @@ static int cpm_get_irq(struct irq_desc *desc) cpm_vec =in_be16 (&data->reg->cpic_civr); cpm_vec >>=11 ; -return irq_linear_revmap (data->host, cpm_vec); +return irq_find_mapping (data->host, cpm_vec); }static void cpm_cascade (struct irq_desc *desc)
arch/powerpc/platforms/8xx/pic.c +1 -1
@@ -80,7 +80,7 @@ unsigned int mpc8xx_get_irq(void)if (irq ==PIC_VEC_SPURRIOUS )return 0 ; -return irq_linear_revmap (mpc8xx_pic_host, irq); +return irq_find_mapping (mpc8xx_pic_host, irq); }
arch/powerpc/platforms/embedded6xx/flipper-pic.c +1 -1
@@ -173,7 +173,7 @@ unsigned int flipper_pic_get_irq(void)return 0 ;/* no more IRQs pending */ irq =__ffs (irq_status); -return irq_linear_revmap (flipper_irq_host, irq); +return irq_find_mapping (flipper_irq_host, irq); }/*
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +1 -1
@@ -190,7 +190,7 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)unsigned int hlwd_pic_get_irq (void ) {unsigned int hwirq =__hlwd_pic_get_irq (hlwd_irq_host); -return hwirq ?irq_linear_revmap (hlwd_irq_host, hwirq) :0 ; +return hwirq ?irq_find_mapping (hlwd_irq_host, hwirq) :0 ; }/*
arch/powerpc/platforms/powermac/pic.c +1 -1
@@ -250,7 +250,7 @@ static unsigned int pmac_pic_get_irq(void)raw_spin_unlock_irqrestore (&pmac_pic_lock, flags);if (unlikely (irq <0 ))return 0 ; -return irq_linear_revmap (pmac_pic_host, irq); +return irq_find_mapping (pmac_pic_host, irq); } static int pmac_pic_host_match(struct irq_domain *h, struct device_node *node,
arch/powerpc/sysdev/cpm2_pic.c +1 -1
@@ -207,7 +207,7 @@ unsigned int cpm2_get_irq(void)if (irq ==0 )return (-1 ); -return irq_linear_revmap (cpm2_pic_host, irq); +return irq_find_mapping (cpm2_pic_host, irq); } static int cpm2_pic_host_map(struct irq_domain *h, unsigned int virq,
arch/powerpc/sysdev/ehv_pic.c +1 -1
@@ -175,7 +175,7 @@ unsigned int ehv_pic_get_irq(void)* this will also setup revmap[] in the slow path for the first * time, next calls will always use fast path by indexing revmap */ -return irq_linear_revmap (global_ehv_pic->irqhost, irq); +return irq_find_mapping (global_ehv_pic->irqhost, irq); } static int ehv_pic_host_match(struct irq_domain *h, struct device_node *node,
arch/powerpc/sysdev/ge/ge_pic.c +1 -1
@@ -245,7 +245,7 @@ unsigned int gef_pic_get_irq(void)if (active & (0x1 << hwirq))break ; } - virq =irq_linear_revmap (gef_pic_irq_host, + virq =irq_find_mapping (gef_pic_irq_host, (irq_hw_number_t )hwirq); }
arch/powerpc/sysdev/ipic.c +1 -1
@@ -801,7 +801,7 @@ unsigned int ipic_get_irq(void)if (irq ==0 )/* 0 --> no irq is pending */ return 0 ; -return irq_linear_revmap (primary_ipic->irqhost, irq); +return irq_find_mapping (primary_ipic->irqhost, irq); }#ifdef CONFIG_SUSPEND
arch/powerpc/sysdev/mpic.c +2 -2
@@ -1785,7 +1785,7 @@ static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)return 0 ; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src); }unsigned int mpic_get_one_irq (struct mpic *mpic)
@@ -1823,7 +1823,7 @@ unsigned int mpic_get_coreint_irq(void) return 0; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src);#else return 0 ;#endif
Signature · 1 line
2.49.0
Re: [PATCH v2 41/57] irqdomain: ppc: Switch to irq_find_mapping()
Le 19/03/2025 à 10:29, Jiri Slaby (SUSE) a écrit :
Quoted 12 lines
irq_linear_revmap()is deprecated, so remove all its uses and supersede them by an identical call toirq_find_mapping().Signed-off-by Jiri Slaby (SUSE) <[email protected]>Cc Madhavan Srinivasan <[email protected]>Cc Michael Ellerman <[email protected]>Cc Nicholas Piggin <[email protected]>Cc Christophe Leroy <[email protected]>Cc Naveen N Rao <[email protected]>Cc Anatolij Gustschin <[email protected]>Cc Scott Wood <[email protected]>
Quoted 204 lines
--- arch/powerpc/platforms/44x/uic.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 2 +- arch/powerpc/platforms/8xx/pic.c | 2 +- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 +- arch/powerpc/platforms/powermac/pic.c | 2 +- arch/powerpc/sysdev/cpm2_pic.c | 2 +- arch/powerpc/sysdev/ehv_pic.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 2 +- arch/powerpc/sysdev/ipic.c | 2 +- arch/powerpc/sysdev/mpic.c | 4 ++-- 14 files changed, 15 insertions(+), 15 deletions(-)arch/powerpc/platforms/44x/uic.c +1
-1@@ -328,5 +328,5 @@ unsigned int uic_get_irq(void) msr =mfdcr (primary_uic->dcrbase +UIC_MSR ); src =32 -ffs (msr); -return irq_linear_revmap (primary_uic->irqhost, src); +return irq_find_mapping (primary_uic->irqhost, src); }arch/powerpc/platforms/52xx/mpc52xx_gpt.c +1
-1@@ -369,7 +369,7 @@ struct mpc52xx_gpt_priv *mpc52xx_gpt_from_irq(int irq)mutex_lock (&mpc52xx_gpt_list_mutex);list_for_each (pos, &mpc52xx_gpt_list) { gpt = container_of(pos, struct mpc52xx_gpt_priv, list); -if (gpt->irqhost && irq ==irq_linear_revmap (gpt->irqhost,0 )) { +if (gpt->irqhost && irq ==irq_find_mapping (gpt->irqhost,0 )) {mutex_unlock (&mpc52xx_gpt_list_mutex);return gpt; }arch/powerpc/platforms/52xx/mpc52xx_pic.c +1
-1@@ -515,5 +515,5 @@ unsigned int mpc52xx_get_irq(void)return 0 ; } -return irq_linear_revmap (mpc52xx_irqhost, irq); +return irq_find_mapping (mpc52xx_irqhost, irq); }arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1
-1@@ -83,7 +83,7 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq)if (cause >> (i +16 ))break ; } -return irq_linear_revmap (socrates_fpga_pic_irq_host, +return irq_find_mapping (socrates_fpga_pic_irq_host, (irq_hw_number_t )i); }arch/powerpc/platforms/8xx/cpm1-ic.c +1
-1@@ -59,7 +59,7 @@ static int cpm_get_irq(struct irq_desc *desc) cpm_vec =in_be16 (&data->reg->cpic_civr); cpm_vec >>=11 ; -return irq_linear_revmap (data->host, cpm_vec); +return irq_find_mapping (data->host, cpm_vec); }static void cpm_cascade (struct irq_desc *desc)arch/powerpc/platforms/8xx/pic.c +1
-1@@ -80,7 +80,7 @@ unsigned int mpc8xx_get_irq(void)if (irq ==PIC_VEC_SPURRIOUS )return 0 ; -return irq_linear_revmap (mpc8xx_pic_host, irq); +return irq_find_mapping (mpc8xx_pic_host, irq); }arch/powerpc/platforms/embedded6xx/flipper-pic.c +1
-1@@ -173,7 +173,7 @@ unsigned int flipper_pic_get_irq(void)return 0 ;/* no more IRQs pending */ irq =__ffs (irq_status); -return irq_linear_revmap (flipper_irq_host, irq); +return irq_find_mapping (flipper_irq_host, irq); }/* arch/powerpc/platforms/embedded6xx/hlwd-pic.c +1
-1@@ -190,7 +190,7 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)unsigned int hlwd_pic_get_irq (void ) {unsigned int hwirq =__hlwd_pic_get_irq (hlwd_irq_host); -return hwirq ?irq_linear_revmap (hlwd_irq_host, hwirq) :0 ; +return hwirq ?irq_find_mapping (hlwd_irq_host, hwirq) :0 ; }/* arch/powerpc/platforms/powermac/pic.c +1
-1@@ -250,7 +250,7 @@ static unsigned int pmac_pic_get_irq(void)raw_spin_unlock_irqrestore (&pmac_pic_lock, flags);if (unlikely (irq <0 ))return 0 ; -return irq_linear_revmap (pmac_pic_host, irq); +return irq_find_mapping (pmac_pic_host, irq); } static int pmac_pic_host_match(struct irq_domain *h, struct device_node *node,arch/powerpc/sysdev/cpm2_pic.c +1
-1@@ -207,7 +207,7 @@ unsigned int cpm2_get_irq(void)if (irq ==0 )return (-1 ); -return irq_linear_revmap (cpm2_pic_host, irq); +return irq_find_mapping (cpm2_pic_host, irq); } static int cpm2_pic_host_map(struct irq_domain *h, unsigned int virq,arch/powerpc/sysdev/ehv_pic.c +1
-1@@ -175,7 +175,7 @@ unsigned int ehv_pic_get_irq(void)* this will also setup revmap[] in the slow path for the first * time, next calls will always use fast path by indexing revmap */ -return irq_linear_revmap (global_ehv_pic->irqhost, irq); +return irq_find_mapping (global_ehv_pic->irqhost, irq); } static int ehv_pic_host_match(struct irq_domain *h, struct device_node *node,arch/powerpc/sysdev/ge/ge_pic.c +1
-1@@ -245,7 +245,7 @@ unsigned int gef_pic_get_irq(void)if (active & (0x1 << hwirq))break ; } - virq =irq_linear_revmap (gef_pic_irq_host, + virq =irq_find_mapping (gef_pic_irq_host, (irq_hw_number_t )hwirq); }arch/powerpc/sysdev/ipic.c +1
-1@@ -801,7 +801,7 @@ unsigned int ipic_get_irq(void)if (irq ==0 )/* 0 --> no irq is pending */ return 0 ; -return irq_linear_revmap (primary_ipic->irqhost, irq); +return irq_find_mapping (primary_ipic->irqhost, irq); }#ifdef CONFIG_SUSPEND arch/powerpc/sysdev/mpic.c +2
-2@@ -1785,7 +1785,7 @@ static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)return 0 ; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src); }unsigned int mpic_get_one_irq (struct mpic *mpic)@@ -1823,7 +1823,7 @@ unsigned int mpic_get_coreint_irq(void) return 0; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src);#else return 0 ;#endif
[tip: irq/cleanups] powerpc: Switch to irq_find_mapping()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 4f8f49bf45654dcd7890e97c9613bea016170aca Gitweb: https://git.kernel.org/tip/4f8f49bf45654dcd7890e97c9613bea016170aca Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:34 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:07 +02:00
powerpc: Switch to irq_find_mapping()
irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping().
[ tglx: Fix up subject prefix ]
--- arch/powerpc/platforms/44x/uic.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 2 +- arch/powerpc/platforms/8xx/pic.c | 2 +- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 +- arch/powerpc/platforms/powermac/pic.c | 2 +- arch/powerpc/sysdev/cpm2_pic.c | 2 +- arch/powerpc/sysdev/ehv_pic.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 2 +- arch/powerpc/sysdev/ipic.c | 2 +- arch/powerpc/sysdev/mpic.c | 4 ++-- 14 files changed, 15 insertions(+), 15 deletions(-)
arch/powerpc/platforms/44x/uic.c +1 -1
@@ -328,5 +328,5 @@ unsigned int uic_get_irq(void) msr =mfdcr (primary_uic->dcrbase +UIC_MSR ); src =32 -ffs (msr); -return irq_linear_revmap (primary_uic->irqhost, src); +return irq_find_mapping (primary_uic->irqhost, src); }
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +1 -1
@@ -369,7 +369,7 @@ struct mpc52xx_gpt_priv *mpc52xx_gpt_from_irq(int irq)mutex_lock (&mpc52xx_gpt_list_mutex);list_for_each (pos, &mpc52xx_gpt_list) { gpt = container_of(pos, struct mpc52xx_gpt_priv, list); -if (gpt->irqhost && irq ==irq_linear_revmap (gpt->irqhost,0 )) { +if (gpt->irqhost && irq ==irq_find_mapping (gpt->irqhost,0 )) {mutex_unlock (&mpc52xx_gpt_list_mutex);return gpt; }
arch/powerpc/platforms/52xx/mpc52xx_pic.c +1 -1
@@ -515,5 +515,5 @@ unsigned int mpc52xx_get_irq(void)return 0 ; } -return irq_linear_revmap (mpc52xx_irqhost, irq); +return irq_find_mapping (mpc52xx_irqhost, irq); }
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1 -1
@@ -83,7 +83,7 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq)if (cause >> (i +16 ))break ; } -return irq_linear_revmap (socrates_fpga_pic_irq_host, +return irq_find_mapping (socrates_fpga_pic_irq_host, (irq_hw_number_t )i); }
arch/powerpc/platforms/8xx/cpm1-ic.c +1 -1
@@ -59,7 +59,7 @@ static int cpm_get_irq(struct irq_desc *desc) cpm_vec =in_be16 (&data->reg->cpic_civr); cpm_vec >>=11 ; -return irq_linear_revmap (data->host, cpm_vec); +return irq_find_mapping (data->host, cpm_vec); }static void cpm_cascade (struct irq_desc *desc)
arch/powerpc/platforms/8xx/pic.c +1 -1
@@ -80,7 +80,7 @@ unsigned int mpc8xx_get_irq(void)if (irq ==PIC_VEC_SPURRIOUS )return 0 ; -return irq_linear_revmap (mpc8xx_pic_host, irq); +return irq_find_mapping (mpc8xx_pic_host, irq); }
arch/powerpc/platforms/embedded6xx/flipper-pic.c +1 -1
@@ -173,7 +173,7 @@ unsigned int flipper_pic_get_irq(void)return 0 ;/* no more IRQs pending */ irq =__ffs (irq_status); -return irq_linear_revmap (flipper_irq_host, irq); +return irq_find_mapping (flipper_irq_host, irq); }/*
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +1 -1
@@ -190,7 +190,7 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)unsigned int hlwd_pic_get_irq (void ) {unsigned int hwirq =__hlwd_pic_get_irq (hlwd_irq_host); -return hwirq ?irq_linear_revmap (hlwd_irq_host, hwirq) :0 ; +return hwirq ?irq_find_mapping (hlwd_irq_host, hwirq) :0 ; }/*
arch/powerpc/platforms/powermac/pic.c +1 -1
@@ -250,7 +250,7 @@ static unsigned int pmac_pic_get_irq(void)raw_spin_unlock_irqrestore (&pmac_pic_lock, flags);if (unlikely (irq <0 ))return 0 ; -return irq_linear_revmap (pmac_pic_host, irq); +return irq_find_mapping (pmac_pic_host, irq); } static int pmac_pic_host_match(struct irq_domain *h, struct device_node *node,
arch/powerpc/sysdev/cpm2_pic.c +1 -1
@@ -207,7 +207,7 @@ unsigned int cpm2_get_irq(void)if (irq ==0 )return (-1 ); -return irq_linear_revmap (cpm2_pic_host, irq); +return irq_find_mapping (cpm2_pic_host, irq); } static int cpm2_pic_host_map(struct irq_domain *h, unsigned int virq,
arch/powerpc/sysdev/ehv_pic.c +1 -1
@@ -175,7 +175,7 @@ unsigned int ehv_pic_get_irq(void)* this will also setup revmap[] in the slow path for the first * time, next calls will always use fast path by indexing revmap */ -return irq_linear_revmap (global_ehv_pic->irqhost, irq); +return irq_find_mapping (global_ehv_pic->irqhost, irq); } static int ehv_pic_host_match(struct irq_domain *h, struct device_node *node,
arch/powerpc/sysdev/ge/ge_pic.c +1 -1
@@ -245,7 +245,7 @@ unsigned int gef_pic_get_irq(void)if (active & (0x1 << hwirq))break ; } - virq =irq_linear_revmap (gef_pic_irq_host, + virq =irq_find_mapping (gef_pic_irq_host, (irq_hw_number_t )hwirq); }
arch/powerpc/sysdev/ipic.c +1 -1
@@ -801,7 +801,7 @@ unsigned int ipic_get_irq(void)if (irq ==0 )/* 0 --> no irq is pending */ return 0 ; -return irq_linear_revmap (primary_ipic->irqhost, irq); +return irq_find_mapping (primary_ipic->irqhost, irq); }#ifdef CONFIG_SUSPEND
arch/powerpc/sysdev/mpic.c +2 -2
@@ -1785,7 +1785,7 @@ static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)return 0 ; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src); }unsigned int mpic_get_one_irq (struct mpic *mpic)
@@ -1823,7 +1823,7 @@ unsigned int mpic_get_coreint_irq(void) return 0; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src);#else return 0 ;#endif
[tip: irq/cleanups] powerpc: Switch to irq_find_mapping()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: a57a38ebcd93045a664c295b51bd5d1e655ecacc Gitweb: https://git.kernel.org/tip/a57a38ebcd93045a664c295b51bd5d1e655ecacc Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:34 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:24 +02:00
powerpc: Switch to irq_find_mapping()
irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping().
[ tglx: Fix up subject prefix ]
--- arch/powerpc/platforms/44x/uic.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 2 +- arch/powerpc/platforms/8xx/pic.c | 2 +- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 +- arch/powerpc/platforms/powermac/pic.c | 2 +- arch/powerpc/sysdev/cpm2_pic.c | 2 +- arch/powerpc/sysdev/ehv_pic.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 2 +- arch/powerpc/sysdev/ipic.c | 2 +- arch/powerpc/sysdev/mpic.c | 4 ++-- 14 files changed, 15 insertions(+), 15 deletions(-)
arch/powerpc/platforms/44x/uic.c +1 -1
@@ -328,5 +328,5 @@ unsigned int uic_get_irq(void) msr =mfdcr (primary_uic->dcrbase +UIC_MSR ); src =32 -ffs (msr); -return irq_linear_revmap (primary_uic->irqhost, src); +return irq_find_mapping (primary_uic->irqhost, src); }
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +1 -1
@@ -369,7 +369,7 @@ struct mpc52xx_gpt_priv *mpc52xx_gpt_from_irq(int irq)mutex_lock (&mpc52xx_gpt_list_mutex);list_for_each (pos, &mpc52xx_gpt_list) { gpt = container_of(pos, struct mpc52xx_gpt_priv, list); -if (gpt->irqhost && irq ==irq_linear_revmap (gpt->irqhost,0 )) { +if (gpt->irqhost && irq ==irq_find_mapping (gpt->irqhost,0 )) {mutex_unlock (&mpc52xx_gpt_list_mutex);return gpt; }
arch/powerpc/platforms/52xx/mpc52xx_pic.c +1 -1
@@ -515,5 +515,5 @@ unsigned int mpc52xx_get_irq(void)return 0 ; } -return irq_linear_revmap (mpc52xx_irqhost, irq); +return irq_find_mapping (mpc52xx_irqhost, irq); }
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1 -1
@@ -83,7 +83,7 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq)if (cause >> (i +16 ))break ; } -return irq_linear_revmap (socrates_fpga_pic_irq_host, +return irq_find_mapping (socrates_fpga_pic_irq_host, (irq_hw_number_t )i); }
arch/powerpc/platforms/8xx/cpm1-ic.c +1 -1
@@ -59,7 +59,7 @@ static int cpm_get_irq(struct irq_desc *desc) cpm_vec =in_be16 (&data->reg->cpic_civr); cpm_vec >>=11 ; -return irq_linear_revmap (data->host, cpm_vec); +return irq_find_mapping (data->host, cpm_vec); }static void cpm_cascade (struct irq_desc *desc)
arch/powerpc/platforms/8xx/pic.c +1 -1
@@ -80,7 +80,7 @@ unsigned int mpc8xx_get_irq(void)if (irq ==PIC_VEC_SPURRIOUS )return 0 ; -return irq_linear_revmap (mpc8xx_pic_host, irq); +return irq_find_mapping (mpc8xx_pic_host, irq); }
arch/powerpc/platforms/embedded6xx/flipper-pic.c +1 -1
@@ -173,7 +173,7 @@ unsigned int flipper_pic_get_irq(void)return 0 ;/* no more IRQs pending */ irq =__ffs (irq_status); -return irq_linear_revmap (flipper_irq_host, irq); +return irq_find_mapping (flipper_irq_host, irq); }/*
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +1 -1
@@ -190,7 +190,7 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)unsigned int hlwd_pic_get_irq (void ) {unsigned int hwirq =__hlwd_pic_get_irq (hlwd_irq_host); -return hwirq ?irq_linear_revmap (hlwd_irq_host, hwirq) :0 ; +return hwirq ?irq_find_mapping (hlwd_irq_host, hwirq) :0 ; }/*
arch/powerpc/platforms/powermac/pic.c +1 -1
@@ -250,7 +250,7 @@ static unsigned int pmac_pic_get_irq(void)raw_spin_unlock_irqrestore (&pmac_pic_lock, flags);if (unlikely (irq <0 ))return 0 ; -return irq_linear_revmap (pmac_pic_host, irq); +return irq_find_mapping (pmac_pic_host, irq); } static int pmac_pic_host_match(struct irq_domain *h, struct device_node *node,
arch/powerpc/sysdev/cpm2_pic.c +1 -1
@@ -207,7 +207,7 @@ unsigned int cpm2_get_irq(void)if (irq ==0 )return (-1 ); -return irq_linear_revmap (cpm2_pic_host, irq); +return irq_find_mapping (cpm2_pic_host, irq); } static int cpm2_pic_host_map(struct irq_domain *h, unsigned int virq,
arch/powerpc/sysdev/ehv_pic.c +1 -1
@@ -175,7 +175,7 @@ unsigned int ehv_pic_get_irq(void)* this will also setup revmap[] in the slow path for the first * time, next calls will always use fast path by indexing revmap */ -return irq_linear_revmap (global_ehv_pic->irqhost, irq); +return irq_find_mapping (global_ehv_pic->irqhost, irq); } static int ehv_pic_host_match(struct irq_domain *h, struct device_node *node,
arch/powerpc/sysdev/ge/ge_pic.c +1 -1
@@ -245,7 +245,7 @@ unsigned int gef_pic_get_irq(void)if (active & (0x1 << hwirq))break ; } - virq =irq_linear_revmap (gef_pic_irq_host, + virq =irq_find_mapping (gef_pic_irq_host, (irq_hw_number_t )hwirq); }
arch/powerpc/sysdev/ipic.c +1 -1
@@ -801,7 +801,7 @@ unsigned int ipic_get_irq(void)if (irq ==0 )/* 0 --> no irq is pending */ return 0 ; -return irq_linear_revmap (primary_ipic->irqhost, irq); +return irq_find_mapping (primary_ipic->irqhost, irq); }#ifdef CONFIG_SUSPEND
arch/powerpc/sysdev/mpic.c +2 -2
@@ -1785,7 +1785,7 @@ static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)return 0 ; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src); }unsigned int mpic_get_one_irq (struct mpic *mpic)
@@ -1823,7 +1823,7 @@ unsigned int mpic_get_coreint_irq(void) return 0; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src);#else return 0 ;#endif
[tip: irq/cleanups] powerpc: Switch to irq_find_mapping()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 36a0d76d23f94fc00feb7262d6fdbd05087f99aa Gitweb: https://git.kernel.org/tip/36a0d76d23f94fc00feb7262d6fdbd05087f99aa Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:34 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:41 +02:00
powerpc: Switch to irq_find_mapping()
irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping().
[ tglx: Fix up subject prefix ]
--- arch/powerpc/platforms/44x/uic.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 2 +- arch/powerpc/platforms/8xx/pic.c | 2 +- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 +- arch/powerpc/platforms/powermac/pic.c | 2 +- arch/powerpc/sysdev/cpm2_pic.c | 2 +- arch/powerpc/sysdev/ehv_pic.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 2 +- arch/powerpc/sysdev/ipic.c | 2 +- arch/powerpc/sysdev/mpic.c | 4 ++-- 14 files changed, 15 insertions(+), 15 deletions(-)
arch/powerpc/platforms/44x/uic.c +1 -1
@@ -328,5 +328,5 @@ unsigned int uic_get_irq(void) msr =mfdcr (primary_uic->dcrbase +UIC_MSR ); src =32 -ffs (msr); -return irq_linear_revmap (primary_uic->irqhost, src); +return irq_find_mapping (primary_uic->irqhost, src); }
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +1 -1
@@ -369,7 +369,7 @@ struct mpc52xx_gpt_priv *mpc52xx_gpt_from_irq(int irq)mutex_lock (&mpc52xx_gpt_list_mutex);list_for_each (pos, &mpc52xx_gpt_list) { gpt = container_of(pos, struct mpc52xx_gpt_priv, list); -if (gpt->irqhost && irq ==irq_linear_revmap (gpt->irqhost,0 )) { +if (gpt->irqhost && irq ==irq_find_mapping (gpt->irqhost,0 )) {mutex_unlock (&mpc52xx_gpt_list_mutex);return gpt; }
arch/powerpc/platforms/52xx/mpc52xx_pic.c +1 -1
@@ -515,5 +515,5 @@ unsigned int mpc52xx_get_irq(void)return 0 ; } -return irq_linear_revmap (mpc52xx_irqhost, irq); +return irq_find_mapping (mpc52xx_irqhost, irq); }
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1 -1
@@ -83,7 +83,7 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq)if (cause >> (i +16 ))break ; } -return irq_linear_revmap (socrates_fpga_pic_irq_host, +return irq_find_mapping (socrates_fpga_pic_irq_host, (irq_hw_number_t )i); }
arch/powerpc/platforms/8xx/cpm1-ic.c +1 -1
@@ -59,7 +59,7 @@ static int cpm_get_irq(struct irq_desc *desc) cpm_vec =in_be16 (&data->reg->cpic_civr); cpm_vec >>=11 ; -return irq_linear_revmap (data->host, cpm_vec); +return irq_find_mapping (data->host, cpm_vec); }static void cpm_cascade (struct irq_desc *desc)
arch/powerpc/platforms/8xx/pic.c +1 -1
@@ -80,7 +80,7 @@ unsigned int mpc8xx_get_irq(void)if (irq ==PIC_VEC_SPURRIOUS )return 0 ; -return irq_linear_revmap (mpc8xx_pic_host, irq); +return irq_find_mapping (mpc8xx_pic_host, irq); }
arch/powerpc/platforms/embedded6xx/flipper-pic.c +1 -1
@@ -173,7 +173,7 @@ unsigned int flipper_pic_get_irq(void)return 0 ;/* no more IRQs pending */ irq =__ffs (irq_status); -return irq_linear_revmap (flipper_irq_host, irq); +return irq_find_mapping (flipper_irq_host, irq); }/*
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +1 -1
@@ -190,7 +190,7 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)unsigned int hlwd_pic_get_irq (void ) {unsigned int hwirq =__hlwd_pic_get_irq (hlwd_irq_host); -return hwirq ?irq_linear_revmap (hlwd_irq_host, hwirq) :0 ; +return hwirq ?irq_find_mapping (hlwd_irq_host, hwirq) :0 ; }/*
arch/powerpc/platforms/powermac/pic.c +1 -1
@@ -250,7 +250,7 @@ static unsigned int pmac_pic_get_irq(void)raw_spin_unlock_irqrestore (&pmac_pic_lock, flags);if (unlikely (irq <0 ))return 0 ; -return irq_linear_revmap (pmac_pic_host, irq); +return irq_find_mapping (pmac_pic_host, irq); } static int pmac_pic_host_match(struct irq_domain *h, struct device_node *node,
arch/powerpc/sysdev/cpm2_pic.c +1 -1
@@ -207,7 +207,7 @@ unsigned int cpm2_get_irq(void)if (irq ==0 )return (-1 ); -return irq_linear_revmap (cpm2_pic_host, irq); +return irq_find_mapping (cpm2_pic_host, irq); } static int cpm2_pic_host_map(struct irq_domain *h, unsigned int virq,
arch/powerpc/sysdev/ehv_pic.c +1 -1
@@ -175,7 +175,7 @@ unsigned int ehv_pic_get_irq(void)* this will also setup revmap[] in the slow path for the first * time, next calls will always use fast path by indexing revmap */ -return irq_linear_revmap (global_ehv_pic->irqhost, irq); +return irq_find_mapping (global_ehv_pic->irqhost, irq); } static int ehv_pic_host_match(struct irq_domain *h, struct device_node *node,
arch/powerpc/sysdev/ge/ge_pic.c +1 -1
@@ -245,7 +245,7 @@ unsigned int gef_pic_get_irq(void)if (active & (0x1 << hwirq))break ; } - virq =irq_linear_revmap (gef_pic_irq_host, + virq =irq_find_mapping (gef_pic_irq_host, (irq_hw_number_t )hwirq); }
arch/powerpc/sysdev/ipic.c +1 -1
@@ -801,7 +801,7 @@ unsigned int ipic_get_irq(void)if (irq ==0 )/* 0 --> no irq is pending */ return 0 ; -return irq_linear_revmap (primary_ipic->irqhost, irq); +return irq_find_mapping (primary_ipic->irqhost, irq); }#ifdef CONFIG_SUSPEND
arch/powerpc/sysdev/mpic.c +2 -2
@@ -1785,7 +1785,7 @@ static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)return 0 ; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src); }unsigned int mpic_get_one_irq (struct mpic *mpic)
@@ -1823,7 +1823,7 @@ unsigned int mpic_get_coreint_irq(void) return 0; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src);#else return 0 ;#endif
[tip: irq/cleanups] powerpc: Switch to irq_find_mapping()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 8035d9f2665e2de138007e2341d8b6d0e46c5606 Gitweb: https://git.kernel.org/tip/8035d9f2665e2de138007e2341d8b6d0e46c5606 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:34 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Fri, 16 May 2025 21:06:12 +02:00
powerpc: Switch to irq_find_mapping()
irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping().
[ tglx: Fix up subject prefix ]
--- arch/powerpc/platforms/44x/uic.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 2 +- arch/powerpc/platforms/8xx/pic.c | 2 +- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 +- arch/powerpc/platforms/powermac/pic.c | 2 +- arch/powerpc/sysdev/cpm2_pic.c | 2 +- arch/powerpc/sysdev/ehv_pic.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 2 +- arch/powerpc/sysdev/ipic.c | 2 +- arch/powerpc/sysdev/mpic.c | 4 ++-- 14 files changed, 15 insertions(+), 15 deletions(-)
arch/powerpc/platforms/44x/uic.c +1 -1
@@ -328,5 +328,5 @@ unsigned int uic_get_irq(void) msr =mfdcr (primary_uic->dcrbase +UIC_MSR ); src =32 -ffs (msr); -return irq_linear_revmap (primary_uic->irqhost, src); +return irq_find_mapping (primary_uic->irqhost, src); }
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +1 -1
@@ -369,7 +369,7 @@ struct mpc52xx_gpt_priv *mpc52xx_gpt_from_irq(int irq)mutex_lock (&mpc52xx_gpt_list_mutex);list_for_each (pos, &mpc52xx_gpt_list) { gpt = container_of(pos, struct mpc52xx_gpt_priv, list); -if (gpt->irqhost && irq ==irq_linear_revmap (gpt->irqhost,0 )) { +if (gpt->irqhost && irq ==irq_find_mapping (gpt->irqhost,0 )) {mutex_unlock (&mpc52xx_gpt_list_mutex);return gpt; }
arch/powerpc/platforms/52xx/mpc52xx_pic.c +1 -1
@@ -515,5 +515,5 @@ unsigned int mpc52xx_get_irq(void)return 0 ; } -return irq_linear_revmap (mpc52xx_irqhost, irq); +return irq_find_mapping (mpc52xx_irqhost, irq); }
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +1 -1
@@ -83,7 +83,7 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq)if (cause >> (i +16 ))break ; } -return irq_linear_revmap (socrates_fpga_pic_irq_host, +return irq_find_mapping (socrates_fpga_pic_irq_host, (irq_hw_number_t )i); }
arch/powerpc/platforms/8xx/cpm1-ic.c +1 -1
@@ -59,7 +59,7 @@ static int cpm_get_irq(struct irq_desc *desc) cpm_vec =in_be16 (&data->reg->cpic_civr); cpm_vec >>=11 ; -return irq_linear_revmap (data->host, cpm_vec); +return irq_find_mapping (data->host, cpm_vec); }static void cpm_cascade (struct irq_desc *desc)
arch/powerpc/platforms/8xx/pic.c +1 -1
@@ -80,7 +80,7 @@ unsigned int mpc8xx_get_irq(void)if (irq ==PIC_VEC_SPURRIOUS )return 0 ; -return irq_linear_revmap (mpc8xx_pic_host, irq); +return irq_find_mapping (mpc8xx_pic_host, irq); }
arch/powerpc/platforms/embedded6xx/flipper-pic.c +1 -1
@@ -173,7 +173,7 @@ unsigned int flipper_pic_get_irq(void)return 0 ;/* no more IRQs pending */ irq =__ffs (irq_status); -return irq_linear_revmap (flipper_irq_host, irq); +return irq_find_mapping (flipper_irq_host, irq); }/*
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +1 -1
@@ -190,7 +190,7 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)unsigned int hlwd_pic_get_irq (void ) {unsigned int hwirq =__hlwd_pic_get_irq (hlwd_irq_host); -return hwirq ?irq_linear_revmap (hlwd_irq_host, hwirq) :0 ; +return hwirq ?irq_find_mapping (hlwd_irq_host, hwirq) :0 ; }/*
arch/powerpc/platforms/powermac/pic.c +1 -1
@@ -250,7 +250,7 @@ static unsigned int pmac_pic_get_irq(void)raw_spin_unlock_irqrestore (&pmac_pic_lock, flags);if (unlikely (irq <0 ))return 0 ; -return irq_linear_revmap (pmac_pic_host, irq); +return irq_find_mapping (pmac_pic_host, irq); } static int pmac_pic_host_match(struct irq_domain *h, struct device_node *node,
arch/powerpc/sysdev/cpm2_pic.c +1 -1
@@ -207,7 +207,7 @@ unsigned int cpm2_get_irq(void)if (irq ==0 )return (-1 ); -return irq_linear_revmap (cpm2_pic_host, irq); +return irq_find_mapping (cpm2_pic_host, irq); } static int cpm2_pic_host_map(struct irq_domain *h, unsigned int virq,
arch/powerpc/sysdev/ehv_pic.c +1 -1
@@ -175,7 +175,7 @@ unsigned int ehv_pic_get_irq(void)* this will also setup revmap[] in the slow path for the first * time, next calls will always use fast path by indexing revmap */ -return irq_linear_revmap (global_ehv_pic->irqhost, irq); +return irq_find_mapping (global_ehv_pic->irqhost, irq); } static int ehv_pic_host_match(struct irq_domain *h, struct device_node *node,
arch/powerpc/sysdev/ge/ge_pic.c +1 -1
@@ -245,7 +245,7 @@ unsigned int gef_pic_get_irq(void)if (active & (0x1 << hwirq))break ; } - virq =irq_linear_revmap (gef_pic_irq_host, + virq =irq_find_mapping (gef_pic_irq_host, (irq_hw_number_t )hwirq); }
arch/powerpc/sysdev/ipic.c +1 -1
@@ -801,7 +801,7 @@ unsigned int ipic_get_irq(void)if (irq ==0 )/* 0 --> no irq is pending */ return 0 ; -return irq_linear_revmap (primary_ipic->irqhost, irq); +return irq_find_mapping (primary_ipic->irqhost, irq); }#ifdef CONFIG_SUSPEND
arch/powerpc/sysdev/mpic.c +2 -2
@@ -1785,7 +1785,7 @@ static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)return 0 ; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src); }unsigned int mpic_get_one_irq (struct mpic *mpic)
@@ -1823,7 +1823,7 @@ unsigned int mpic_get_coreint_irq(void) return 0; } -return irq_linear_revmap (mpic->irqhost, src); +return irq_find_mapping (mpic->irqhost, src);#else return 0 ;#endif
PATCH v2 42/57 irqdomain: sh: Switch to irq_find_mapping()
In reply to Jiri Slaby (SUSE)irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping().
--- 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(-)
arch/sh/boards/mach-se/7343/irq.c +1 -1
@@ -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);
arch/sh/boards/mach-se/7722/irq.c +1 -1
@@ -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);
Signature · 1 line
2.49.0
[tip: irq/cleanups] sh: Switch to irq_find_mapping()
The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: a1babe8d24478d3bd6802daec378d4817f092cda Gitweb: https://git.kernel.org/tip/a1babe8d24478d3bd6802daec378d4817f092cda Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:35 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 06 May 2025 14:59:08 +02:00
sh: Switch to irq_find_mapping()
irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping().
[ tglx: Fix up subject prefix ]
--- 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(-)
arch/sh/boards/mach-se/7343/irq.c +1 -1
@@ -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);
arch/sh/boards/mach-se/7722/irq.c +1 -1
@@ -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);
[tip: irq/cleanups] sh: Switch to irq_find_mapping()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: f2ff6a0df6e5e3ac26c052cbe0dea4f4f46fc5a7 Gitweb: https://git.kernel.org/tip/f2ff6a0df6e5e3ac26c052cbe0dea4f4f46fc5a7 Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:35 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 09:53:24 +02:00
sh: Switch to irq_find_mapping()
irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping().
[ tglx: Fix up subject prefix ]
--- 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(-)
arch/sh/boards/mach-se/7343/irq.c +1 -1
@@ -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);
arch/sh/boards/mach-se/7722/irq.c +1 -1
@@ -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);
[tip: irq/cleanups] sh: Switch to irq_find_mapping()
In reply to Jiri Slaby (SUSE)The following commit has been merged into the irq/cleanups branch of tip:
The following commit has been merged into the irq/cleanups branch of tip:
Commit-ID: 6bd9b88a4b7803acde27922e990ea873cd2c5d4e Gitweb: https://git.kernel.org/tip/6bd9b88a4b7803acde27922e990ea873cd2c5d4e Author: Jiri Slaby (SUSE) <[email protected]> AuthorDate: Wed, 19 Mar 2025 10:29:35 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 07 May 2025 15:39:41 +02:00
sh: Switch to irq_find_mapping()
irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping().
[ tglx: Fix up subject prefix ]
--- 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(-)
arch/sh/boards/mach-se/7343/irq.c +1 -1
@@ -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);
arch/sh/boards/mach-se/7722/irq.c +1 -1
@@ -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);