Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1520621

[PATCH] irqdomain: fix compiling when IRQ_DOMAIN unset

From Stefan Christ <contact@stefanchrist.eu>
Newsgroups linux.kernel
Subject [PATCH] irqdomain: fix compiling when IRQ_DOMAIN unset
Date 2016-11-13 17:30 +0100
Message-ID <sD5Pj-2Gi-19@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


When config option IRQ_DOMAIN is unset, compiling the file
'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c' fails:

      CC      drivers/gpu/drm/amd/amdgpu/amdgpu_irq.o
    drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c: In function ‘amdgpu_irq_dispatch’:
    drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:345:3: error: implicit declaration of
        function ‘irq_find_mapping’ [-Werror=implicit-function-declaration]
    drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c: In function ‘amdgpu_irq_add_domain’:
    drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:529:2: error: implicit declaration of
        function ‘irq_domain_add_linear’ [-Werror=implicit-function-declaration]
    drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c: In function ‘amdgpu_irq_remove_domain’:
    drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:550:3: error: implicit declaration of
        function ‘irq_domain_remove’ [-Werror=implicit-function-declaration]
    drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c: In function ‘amdgpu_irq_create_mapping’:
    drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:569:2: error: implicit declaration of
        function ‘irq_create_mapping’ [-Werror=implicit-function-declaration]

Adding the functions stubs in the header file so it compiles cleanly.
Maybe the drm driver 'amdgpu' should select the config option IRQ_DOMAIN
if it cannot work without it. But I don't know if that's necessary.

Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
---
 include/linux/irqdomain.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index ffb8460..1c79a0d 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -480,6 +480,24 @@ static inline bool irq_domain_is_ipi_single(struct irq_domain *domain)
 #endif	/* CONFIG_IRQ_DOMAIN_HIERARCHY */
 
 #else /* CONFIG_IRQ_DOMAIN */
+static inline int irq_find_mapping(struct irq_domain *host,
+				   irq_hw_number_t hwirq)
+{
+	return 0;
+}
+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)
+{
+	return NULL;
+}
+static inline void irq_domain_remove(struct irq_domain *host) { }
+static inline unsigned int irq_create_mapping(struct irq_domain *host,
+					      irq_hw_number_t hwirq)
+{
+	return 0;
+}
 static inline void irq_dispose_mapping(unsigned int virq) { }
 static inline void irq_domain_activate_irq(struct irq_data *data) { }
 static inline void irq_domain_deactivate_irq(struct irq_data *data) { }
-- 
2.7.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] irqdomain: fix compiling when IRQ_DOMAIN unset Stefan Christ <contact@stefanchrist.eu> - 2016-11-13 17:30 +0100
  Re: [PATCH] irqdomain: fix compiling when IRQ_DOMAIN unset Marc Zyngier <marc.zyngier@arm.com> - 2016-11-14 11:50 +0100

csiph-web