On !RT the header file get_irq_regs() gets pulled in via other header files. On
RT it does not and the build fails:
drivers/hv/vmbus_drv.c:975 implicit declaration of function ‘get_irq_regs’ [-Werror=implicit-function-declaration]
drivers/hv/hv.c:115 implicit declaration of function ‘get_irq_regs’ [-Werror=implicit-function-declaration]
Add the header file for get_irq_regs() in a common header so it used by
vmbus_drv.c by hv.c for their get_irq_regs() usage.
Reported-by: Bernhard Landauer <[email protected]>
Reported-by: Ralf Ramsauer <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
---
drivers/hv/hyperv_vmbus.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 72eaba3d50fc2..797f07918197c 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -31,6 +31,7 @@
#include <linux/atomic.h>
#include <linux/hyperv.h>
#include <linux/interrupt.h>
+#include <linux/irq.h>
#include "hv_trace.h"
--
2.18.0
On 2018-08-30 09:55:03 [+0200], To K. Y. Srinivasan wrote:
> On !RT the header file get_irq_regs() gets pulled in via other header files. On
> RT it does not and the build fails:
>
> drivers/hv/vmbus_drv.c:975 implicit declaration of function ‘get_irq_regs’ [-Werror=implicit-function-declaration]
> drivers/hv/hv.c:115 implicit declaration of function ‘get_irq_regs’ [-Werror=implicit-function-declaration]
>
> Add the header file for get_irq_regs() in a common header so it used by
> vmbus_drv.c by hv.c for their get_irq_regs() usage.
>
> Reported-by: Bernhard Landauer <[email protected]>
> Reported-by: Ralf Ramsauer <[email protected]>
> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
ping
> ---
> drivers/hv/hyperv_vmbus.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
> index 72eaba3d50fc2..797f07918197c 100644
> --- a/drivers/hv/hyperv_vmbus.h
> +++ b/drivers/hv/hyperv_vmbus.h
> @@ -31,6 +31,7 @@
> #include <linux/atomic.h>
> #include <linux/hyperv.h>
> #include <linux/interrupt.h>
> +#include <linux/irq.h>
>
> #include "hv_trace.h"
>
> --
> 2.18.0
>
> -----Original Message-----
> From: Sebastian Andrzej Siewior <[email protected]>
> Sent: Monday, September 10, 2018 7:07 AM
> To: KY Srinivasan <[email protected]>; Haiyang Zhang
> <[email protected]>; Stephen Hemminger
> <[email protected]>
> Cc: [email protected]; [email protected]; Steven
> Rostedt <[email protected]>; Bernhard Landauer
> <[email protected]>; Ralf Ramsauer <ralf.ramsauer@oth-
> regensburg.de>
> Subject: Re: [PATCH] Drivers: hv: vmbus: include header for get_irq_regs()
>
> On 2018-08-30 09:55:03 [+0200], To K. Y. Srinivasan wrote:
> > On !RT the header file get_irq_regs() gets pulled in via other header files.
> On
> > RT it does not and the build fails:
> >
> > drivers/hv/vmbus_drv.c:975 implicit declaration of function
> ‘get_irq_regs’ [-Werror=implicit-function-declaration]
> > drivers/hv/hv.c:115 implicit declaration of function ‘get_irq_regs’ [-
> Werror=implicit-function-declaration]
> >
> > Add the header file for get_irq_regs() in a common header so it used by
> > vmbus_drv.c by hv.c for their get_irq_regs() usage.
> >
> > Reported-by: Bernhard Landauer <[email protected]>
> > Reported-by: Ralf Ramsauer <[email protected]>
> > Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
>
> ping
It is in my queue; will submit it soon.
K. Y
>
> > ---
> > drivers/hv/hyperv_vmbus.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
> > index 72eaba3d50fc2..797f07918197c 100644
> > --- a/drivers/hv/hyperv_vmbus.h
> > +++ b/drivers/hv/hyperv_vmbus.h
> > @@ -31,6 +31,7 @@
> > #include <linux/atomic.h>
> > #include <linux/hyperv.h>
> > #include <linux/interrupt.h>
> > +#include <linux/irq.h>
> >
> > #include "hv_trace.h"
> >
> > --
> > 2.18.0
> >
On 2018-09-10 21:08:38 [+0000], KY Srinivasan wrote:
> It is in my queue; will submit it soon.
thank you for letting me know.
> K. Y
Sebastian
From Sebastian Andrzej Siewior Sent: Thursday, August 30, 2018 12:55 AM
>
> On !RT the header file get_irq_regs() gets pulled in via other header files. On
> RT it does not and the build fails:
>
> drivers/hv/vmbus_drv.c:975 implicit declaration of function ‘get_irq_regs’ [-
> Werror=implicit-function-declaration]
> drivers/hv/hv.c:115 implicit declaration of function ‘get_irq_regs’ [-Werror=implicit-
> function-declaration]
>
> Add the header file for get_irq_regs() in a common header so it used by
> vmbus_drv.c by hv.c for their get_irq_regs() usage.
>
get_irq_regs() is not used explicitly in either vmbus_drv.c or in hv.c. And I
couldn't make the line numbers in the errors above line up with anything
in the source code that might be implicitly using get_irq_regs(). Is it the
calls to add_interrupt_randomness()? Did you figure out
exactly what line of code is causing the compile error?
I'm wondering whether adding the #include of irq.h into hyperv_vmbus.h
is really the right solution. More correct might be to have the file where
get_irq_regs() is actually used to #include irq_regs.h.
Michael
On 2018-09-15 23:26:53 [+0000], Michael Kelley (EOSG) wrote:
> From Sebastian Andrzej Siewior Sent: Thursday, August 30, 2018 12:55 AM
> >
> > On !RT the header file get_irq_regs() gets pulled in via other header files. On
> > RT it does not and the build fails:
> >
> > drivers/hv/vmbus_drv.c:975 implicit declaration of function ‘get_irq_regs’ [-
> > Werror=implicit-function-declaration]
> > drivers/hv/hv.c:115 implicit declaration of function ‘get_irq_regs’ [-Werror=implicit-
> > function-declaration]
> >
> > Add the header file for get_irq_regs() in a common header so it used by
> > vmbus_drv.c by hv.c for their get_irq_regs() usage.
> >
>
> get_irq_regs() is not used explicitly in either vmbus_drv.c or in hv.c. And I
> couldn't make the line numbers in the errors above line up with anything
> in the source code that might be implicitly using get_irq_regs(). Is it the
> calls to add_interrupt_randomness()? Did you figure out
> exactly what line of code is causing the compile error?
The line mentioned in the patch, is correct. I just figured out that
function is added as part preempt-RT.
> I'm wondering whether adding the #include of irq.h into hyperv_vmbus.h
> is really the right solution. More correct might be to have the file where
> get_irq_regs() is actually used to #include irq_regs.h.
nah, leave it. I'm sorry, that I haven't seen it earlier. I will submit
a complete patch once I get there. It popped during a stable update so I
assumed it was something that came via stable but it actually was there
the whole time. Again, sorry for the noise.
> Michael
Sebastian