* [PATCH] header: fix compile error on PowerPC (PPC_85xx)
@ 2017-10-01 19:38 Hauke Mehrtens
2017-10-02 12:39 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Hauke Mehrtens @ 2017-10-01 19:38 UTC (permalink / raw)
To: johannes; +Cc: backports, Hauke Mehrtens
Including linux/interrupt.h in linux/hrtimer.h causes this error message
on PowerPC builds on x86, ARM and MIPS it works:
CC [M] /backports-4.14-rc2-1/compat/main.o
In file included from /backports-4.14-rc2-1/backport-include/linux/printk.h:5:0,
from ./include/linux/kernel.h:13,
from /backports-4.14-rc2-1/backport-include/linux/kernel.h:3,
from ./include/linux/list.h:8,
from /backports-4.14-rc2-1/backport-include/linux/list.h:3,
from ./include/linux/module.h:9,
from /backports-4.14-rc2-1/backport-include/linux/module.h:3,
from /backports-4.14-rc2-1/compat/main.c:1:
./include/linux/ratelimit.h: In function 'ratelimit_state_exit':
./include/linux/ratelimit.h:62:11: error: dereferencing pointer to incomplete type 'struct task_struct'
current->comm, rs->missed);
^
./include/linux/printk.h:279:37: note: in definition of macro 'pr_warning'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^
./include/linux/ratelimit.h:61:3: note: in expansion of macro 'pr_warn'
pr_warn("%s: %d output lines suppressed due to ratelimiting\n",
^
The backport of the hrtimer_start() functions needs the
linux/interrupt.h because some parts are defined there. Fix this by
moving the hrtimer_start() backport to the linux/interrupt.h backport
header file.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/hrtimer.h | 17 -----------------
backport/backport-include/linux/interrupt.h | 17 ++++++++++++++++-
2 files changed, 16 insertions(+), 18 deletions(-)
delete mode 100644 backport/backport-include/linux/hrtimer.h
diff --git a/backport/backport-include/linux/hrtimer.h b/backport/backport-include/linux/hrtimer.h
deleted file mode 100644
index bdcf106e..00000000
--- a/backport/backport-include/linux/hrtimer.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _BP_HRTIMER_H
-#define _BP_HRTIMER_H
-#include <linux/version.h>
-#include_next <linux/hrtimer.h>
-#include <linux/interrupt.h>
-
-#if LINUX_VERSION_IS_LESS(4,10,0)
-static inline void backport_hrtimer_start(struct hrtimer *timer, s64 time,
- const enum hrtimer_mode mode)
-{
- ktime_t _time = { .tv64 = time };
- hrtimer_start(timer, _time, mode);
-}
-#define hrtimer_start LINUX_BACKPORT(hrtimer_start)
-#endif
-
-#endif /* _BP_HRTIMER_H */
diff --git a/backport/backport-include/linux/interrupt.h b/backport/backport-include/linux/interrupt.h
index 0e243ba8..ad3cbf66 100644
--- a/backport/backport-include/linux/interrupt.h
+++ b/backport/backport-include/linux/interrupt.h
@@ -1,2 +1,17 @@
-#include <linux/hrtimer.h>
+#ifndef _BP_LINUX_INTERRUPT_H
+#define _BP_LINUX_INTERRUPT_H
+#include <linux/version.h>
#include_next <linux/interrupt.h>
+#include <linux/ktime.h>
+
+#if LINUX_VERSION_IS_LESS(4,10,0)
+static inline void backport_hrtimer_start(struct hrtimer *timer, s64 time,
+ const enum hrtimer_mode mode)
+{
+ ktime_t _time = { .tv64 = time };
+ hrtimer_start(timer, _time, mode);
+}
+#define hrtimer_start LINUX_BACKPORT(hrtimer_start)
+#endif
+
+#endif /* _BP_LINUX_INTERRUPT_H */
--
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe backports" in
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] header: fix compile error on PowerPC (PPC_85xx)
2017-10-01 19:38 [PATCH] header: fix compile error on PowerPC (PPC_85xx) Hauke Mehrtens
@ 2017-10-02 12:39 ` Johannes Berg
2017-10-02 18:31 ` Hauke Mehrtens
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2017-10-02 12:39 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: backports
On Sun, 2017-10-01 at 21:38 +0200, Hauke Mehrtens wrote:
> Including linux/interrupt.h in linux/hrtimer.h causes this error
> message
> on PowerPC builds on x86, ARM and MIPS it works:
I think I also saw this on x86 on older kernel versions, and couldn't
really figure out what was causing it...
> The backport of the hrtimer_start() functions needs the
> linux/interrupt.h because some parts are defined there. Fix this by
> moving the hrtimer_start() backport to the linux/interrupt.h backport
> header file.
Does hrtimre.h always include interrupt.h, so that we get it in when
somebody includes just hrtimer.h?
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] header: fix compile error on PowerPC (PPC_85xx)
2017-10-02 12:39 ` Johannes Berg
@ 2017-10-02 18:31 ` Hauke Mehrtens
2017-10-05 6:49 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Hauke Mehrtens @ 2017-10-02 18:31 UTC (permalink / raw)
To: Johannes Berg; +Cc: backports
On 10/02/2017 02:39 PM, Johannes Berg wrote:
> On Sun, 2017-10-01 at 21:38 +0200, Hauke Mehrtens wrote:
>> Including linux/interrupt.h in linux/hrtimer.h causes this error
>> message
>> on PowerPC builds on x86, ARM and MIPS it works:
>
> I think I also saw this on x86 on older kernel versions, and couldn't
> really figure out what was causing it...
I haven't fully understood this issue, but the LEDE build bot found it
on multiple PowerPC based systems. With this patch applied it is
compiling on all targets.
I ran the build test script on the compat server and it was fine with
this patch applied for all kernel versions that worked before.
>> The backport of the hrtimer_start() functions needs the
>> linux/interrupt.h because some parts are defined there. Fix this by
>> moving the hrtimer_start() backport to the linux/interrupt.h backport
>> header file.
>
> Does hrtimre.h always include interrupt.h, so that we get it in when
> somebody includes just hrtimer.h?
I do not know, it is not included directly.
Hauke
--
To unsubscribe from this list: send the line "unsubscribe backports" in
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] header: fix compile error on PowerPC (PPC_85xx)
2017-10-02 18:31 ` Hauke Mehrtens
@ 2017-10-05 6:49 ` Johannes Berg
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2017-10-05 6:49 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: backports
On Mon, 2017-10-02 at 20:31 +0200, Hauke Mehrtens wrote:
> On 10/02/2017 02:39 PM, Johannes Berg wrote:
> > On Sun, 2017-10-01 at 21:38 +0200, Hauke Mehrtens wrote:
> > > Including linux/interrupt.h in linux/hrtimer.h causes this error
> > > message
> > > on PowerPC builds on x86, ARM and MIPS it works:
> >
> > I think I also saw this on x86 on older kernel versions, and
> > couldn't
> > really figure out what was causing it...
>
> I haven't fully understood this issue, but the LEDE build bot found
> it
> on multiple PowerPC based systems. With this patch applied it is
> compiling on all targets.
>
> I ran the build test script on the compat server and it was fine with
> this patch applied for all kernel versions that worked before.
Ok.
> > > The backport of the hrtimer_start() functions needs the
> > > linux/interrupt.h because some parts are defined there. Fix this
> > > by
> > > moving the hrtimer_start() backport to the linux/interrupt.h
> > > backport
> > > header file.
> >
> > Does hrtimre.h always include interrupt.h, so that we get it in
> > when
> > somebody includes just hrtimer.h?
>
> I do not know, it is not included directly.
I guess we'll find out :-)
I'll apply this.
thanks,
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-05 6:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-01 19:38 [PATCH] header: fix compile error on PowerPC (PPC_85xx) Hauke Mehrtens
2017-10-02 12:39 ` Johannes Berg
2017-10-02 18:31 ` Hauke Mehrtens
2017-10-05 6:49 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).