Skip to contentSkip to conversation

irqdomain: Delete irq_domain_add_linear()

PATCH Superseded Jiri Slaby (SUSE) 3 participants 4 messages Sep 1 – Sep 4

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqdomain: Delete irq_domain_add_linear()

7.3-rc1 is free of calls to irq_domain_add_linear(), so it can be deleted at last.

I used Gemini to update zh_CN/core-api/irq/irq-domain.rst too. Hopefully the result is correct -- I really cannot read/write Chinese ("CHINESE DOCUMENTATION" maintainers CCed).

Assisted-by LLM (Gemini) # zh_CN
Cc Thomas Gleixner <[email protected]>
Cc Radu Rendec <[email protected]>
Cc Alex Shi <[email protected]>
Cc Yanteng Si <[email protected]>
Cc Dongliang Mu <[email protected]>
---
 .../zh_CN/core-api/irq/irq-domain.rst          |  4 +---
 include/linux/irqdomain.h                      | 18 ------------------
 2 files changed, 1 insertion(+), 21 deletions(-)
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +1 -3
index aaefeda0e164..5ce16d2e6a0e 100644
@@ -90,9 +90,7 @@ irq_domain映射的类型
 映射的优点是固定时间查找IRQ号,而且irq_descs只分配给在用的IRQ。 缺点是该表
 必须尽可能大的hwirq号。
 
-irq_domain_add_linear()和irq_domain_create_linear()在功能上是等价的,
-除了第一个参数不同--前者接受一个Open Firmware特定的 'struct device_node' 而
-后者接受一个更通用的抽象 'struct fwnode_handle' 。
+irq_domain_create_linear() 接受一个通用的抽象 struct fwnode_handle 作为第一个参数。
 
 大多数驱动应该使用线性映射
 
include/linux/irqdomain.h +0 -18
index 73c25d40846c..3ba75a4ed3da 100644
@@ -752,24 +752,6 @@ static inline void msi_device_domain_free_wired(struct irq_domain *domain, unsig
 }
 #endif
 
-static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
-						       unsigned int size,
-						       const struct irq_domain_ops *ops,
-						       void *host_data)
-{
-	struct irq_domain_info info = {
-		.fwnode		= of_fwnode_handle(of_node),
-		.size		= size,
-		.hwirq_max	= size,
-		.ops		= ops,
-		.host_data	= host_data,
-	};
-	struct irq_domain *d;
-
-	d = irq_domain_instantiate(&info);
-	return IS_ERR(d) ? NULL : d;
-}
-
 #else /* CONFIG_IRQ_DOMAIN */
 static inline void irq_dispose_mapping(unsigned int virq) { }
 static inline struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode,
Signature · 1 line
2.55.0
reviewer
#1 lore raw
Quoted 24 lines · Jiri Slaby (SUSE)

7.3-rc1 is free of calls to irq_domain_add_linear(), so it can be deleted at last.

I used Gemini to update zh_CN/core-api/irq/irq-domain.rst too. Hopefully the result is correct -- I really cannot read/write Chinese ("CHINESE DOCUMENTATION" maintainers CCed).

Assisted-by LLM (Gemini) # zh_CN
Cc Thomas Gleixner <[email protected]>
Cc Radu Rendec <[email protected]>
Cc Alex Shi <[email protected]>
Cc Yanteng Si <[email protected]>
Cc Dongliang Mu <[email protected]>
---
  .../zh_CN/core-api/irq/irq-domain.rst          |  4 +---
  include/linux/irqdomain.h                      | 18 ------------------
  2 files changed, 1 insertion(+), 21 deletions(-)
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +0 -0
index aaefeda0e164..5ce16d2e6a0e 100644

Documentation/translations/zh_CN/core-api/irq/irq-domain.rst irq_domain映射的类型 · line 93

Quoted 7 lines
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +1 -3
@@ -90,9 +90,7 @@ irq_domain映射的类型
  映射的优点是固定时间查找IRQ号,而且irq_descs只分配给在用的IRQ。 缺点是该表
  必须尽可能大的hwirq号。
 
-irq_domain_add_linear()和irq_domain_create_linear()在功能上是等价的,
-除了第一个参数不同--前者接受一个Open Firmware特定的 'struct device_node' 而
-后者接受一个更通用的抽象 'struct fwnode_handle' 。
+irq_domain_create_linear() 接受一个通用的抽象 struct fwnode_handle 作为第一个参数。

From the context, I think we can directly delete the whole paragraph.

Dongliang Mu

Quoted 32 lines
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +0 -0
  大多数驱动应该使用线性映射
 
include/linux/irqdomain.h +0 -18
index 73c25d40846c..3ba75a4ed3da 100644
@@ -752,24 +752,6 @@ static inline void msi_device_domain_free_wired(struct irq_domain *domain, unsig
  }
  #endif
 
-static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
-						       unsigned int size,
-						       const struct irq_domain_ops *ops,
-						       void *host_data)
-{
-	struct irq_domain_info info = {
-		.fwnode		= of_fwnode_handle(of_node),
-		.size		= size,
-		.hwirq_max	= size,
-		.ops		= ops,
-		.host_data	= host_data,
-	};
-	struct irq_domain *d;
-
-	d = irq_domain_instantiate(&info);
-	return IS_ERR(d) ? NULL : d;
-}
-
  #else /* CONFIG_IRQ_DOMAIN */
  static inline void irq_dispose_mapping(unsigned int virq) { }
  static inline struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode,
maintainer
#2 lore raw
In reply to Jiri Slaby (SUSE)
Quoted 6 lines · Jiri Slaby

7.3-rc1 is free of calls to irq_domain_add_linear(), so it can be deleted at last.

I used Gemini to update zh_CN/core-api/irq/irq-domain.rst too. Hopefully the result is correct -- I really cannot read/write Chinese ("CHINESE DOCUMENTATION" maintainers CCed).

It's trivial enough to translate the whole paragraph with Gemini or google translate:

"irq_domain_add_linear() and irq_domain_create_linear() are
functionally equivalent, except for the first parameter: the former accepts an Open Firmware-specific 'struct device_node', while the latter accepts a more generic abstract 'struct fwnode_handle'."

which makes it obvious that it can be deleted completely, no?

Thanks,

tglx

author
#3 lore raw
Quoted 11 lines · Thomas Gleixner
Quoted 6 lines · Jiri Slaby

7.3-rc1 is free of calls to irq_domain_add_linear(), so it can be deleted at last.

I used Gemini to update zh_CN/core-api/irq/irq-domain.rst too. Hopefully the result is correct -- I really cannot read/write Chinese ("CHINESE DOCUMENTATION" maintainers CCed).

It's trivial enough to translate the whole paragraph with Gemini or google translate:

Quoted 6 lines

"irq_domain_add_linear() and irq_domain_create_linear() are
functionally equivalent, except for the first parameter: the former accepts an Open Firmware-specific 'struct device_node', while the latter accepts a more generic abstract 'struct fwnode_handle'."

which makes it obvious that it can be deleted completely, no?

Yes, that happened in v2.

Signature · 2 lines
js
suse labs