backports: add ktime_get_boot_ns()
PATCH v2 1/1 backports: add ktime_get_boot_ns()
From: Johannes Berg <[email protected]>
This small helper inline was added in 3.17, we want to use it now so need to backport it.
--- backport/backport-include/linux/timekeeping.h | 6 ++++++ 1 file changed, 6 insertions(+)
backport/backport-include/linux/timekeeping.h +6 -0
@@ -2,6 +2,7 @@#define __BACKPORT_TIMKEEPING_H#include <linux/version.h> #include <linux/types.h> +#include <linux/hrtimer.h> #if LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,17 ,0 )#include_next <linux/timekeeping.h>
@@ -15,6 +16,11 @@ static inline u64 ktime_get_ns(void) {return ktime_to_ns (ktime_get ()); } + +static inline u64 ktime_get_boot_ns (void ) +{ +return ktime_to_ns (ktime_get_boottime ()); +}#endif #if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,19 ,0 )
Signature · 4 lines
2.6.2 -- To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 5 lines · Johannes Berg
From: Johannes Berg <[email protected]>
This small helper inline was added in 3.17, we want to use it now so need to backport it.
And now I see that you'd already done this - sorry!
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 8 lines · Johannes Berg
Quoted 5 lines · Johannes Berg
From: Johannes Berg <[email protected]>
This small helper inline was added in 3.17, we want to use it now so need to backport it.
And now I see that you'd already done this - sorry!
No, you didn't - not the boot one...
But you did say that including hrtimer didn't work - it does for me, but if you need to change it then feel free.
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 7 lines · Johannes Berg
Quoted 6 lines · Johannes Berg
Quoted 5 lines · Johannes Berg
From: Johannes Berg <[email protected]>
This small helper inline was added in 3.17, we want to use it now so need to backport it.
Quoted 7 lines
Quoted 2 lines
And now I see that you'd already done this - sorry!
No, you didn't - not the boot one...
But you did say that including hrtimer didn't work - it does for me, but if you need to change it then feel free.
Got a feeling I missing a side of this story. Still got a feeling you need more coffee ;-)
Gr. AvS
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 4 lines · Arend van Spriel
Got a feeling I missing a side of this story. Still got a feeling you need more coffee ;-)
Yep! I don't drink coffee though, so I'll have to make do with something else ;-)
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 6 lines · Johannes Berg
Quoted 4 lines · Arend van Spriel
Got a feeling I missing a side of this story. Still got a feeling you need more coffee ;-)
Quoted 7 lines
Yep! I don't drink coffee though, so I'll have to make do with something else ;-)
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Hi Johannes,
I am getting this error with your patch on kernel 4.3:
hauke@hauke-desktop:~/compat-wireless/tmp$ ionice -c 3 nice -n 20 make V=99
CC [M] /home/hauke/compat-wireless/tmp/compat/main.o
In file included from include/linux/hrtimer.h:18:0,
from
/home/hauke/compat-wireless/tmp/backport-include/linux/timekeeping.h:5,
from include/linux/ktime.h:297,
from
/home/hauke/compat-wireless/tmp/backport-include/linux/ktime.h:3,
from include/linux/rcupdate.h:47,
from
/home/hauke/compat-wireless/tmp/backport-include/linux/rcupdate.h:3,
from include/linux/srcu.h:33,
from include/linux/notifier.h:15,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:812,
from include/linux/gfp.h:5,
from
/home/hauke/compat-wireless/tmp/backport-include/linux/gfp.h:3,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from
/home/hauke/compat-wireless/tmp/backport-include/linux/module.h:3,
from /home/hauke/compat-wireless/tmp/compat/main.c:1:
include/linux/rbtree.h: In function ‘rb_link_node_rcu’:
include/linux/rbtree.h:95:2: error: implicit declaration of function
‘rcu_assign_pointer’ [-Werror=implicit-function-declaration]
rcu_assign_pointer(*rb_link, node);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target
'/home/hauke/compat-wireless/tmp/compat/main.o' failed
make[6]: *** [/home/hauke/compat-wireless/tmp/compat/main.o] Error 1
scripts/Makefile.build:403: recipe for target
'/home/hauke/compat-wireless/tmp/compat' failed
make[5]: *** [/home/hauke/compat-wireless/tmp/compat] Error 2
Makefile:1378: recipe for target
'_module_/home/hauke/compat-wireless/tmp' failed
make[4]: *** [_module_/home/hauke/compat-wireless/tmp] Error 2
Makefile.build:6: recipe for target 'modules' failed
make[3]: *** [modules] Error 2
Makefile.real:88: recipe for target 'modules' failed
make[2]: *** [modules] Error 2
Makefile:40: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
Makefile:30: recipe for target 'default' failed
make: *** [default] Error 2
hauke@hauke-desktop:~/compat-wireless/tmp$ uname -a
Linux hauke-desktop 4.3.0+ #3 SMP Tue Nov 3 20:56:24 CET 2015 x86_64
GNU/Linux
hauke@hauke-desktop:~/compat-wireless/tmp$--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 60 lines · Hauke Mehrtens
Quoted 6 lines · Johannes Berg
Quoted 4 lines · Arend van Spriel
Got a feeling I missing a side of this story. Still got a feeling you need more coffee ;-)
Quoted 7 lines
Yep! I don't drink coffee though, so I'll have to make do with something else ;-)
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" inHi Johannes,
I am getting this error with your patch on kernel 4.3:
hauke@hauke-desktop:~/compat-wireless/tmp$ ionice -c 3 nice -n 20 make V=99 CC [M] /home/hauke/compat-wireless/tmp/compat/main.o In file included from include/linux/hrtimer.h:18:0, from /home/hauke/compat-wireless/tmp/backport-include/linux/timekeeping.h:5, from include/linux/ktime.h:297, from /home/hauke/compat-wireless/tmp/backport-include/linux/ktime.h:3, from include/linux/rcupdate.h:47, from /home/hauke/compat-wireless/tmp/backport-include/linux/rcupdate.h:3, from include/linux/srcu.h:33, from include/linux/notifier.h:15, from include/linux/memory_hotplug.h:6, from include/linux/mmzone.h:812, from include/linux/gfp.h:5, from /home/hauke/compat-wireless/tmp/backport-include/linux/gfp.h:3, from include/linux/kmod.h:22, from include/linux/module.h:13, from /home/hauke/compat-wireless/tmp/backport-include/linux/module.h:3, from /home/hauke/compat-wireless/tmp/compat/main.c:1: include/linux/rbtree.h: In function ‘rb_link_node_rcu’: include/linux/rbtree.h:95:2: error: implicit declaration of function ‘rcu_assign_pointer’ [-Werror=implicit-function-declaration] rcu_assign_pointer(*rb_link, node); ^ cc1: some warnings being treated as errors scripts/Makefile.build:258: recipe for target '/home/hauke/compat-wireless/tmp/compat/main.o' failed make[6]: *** [/home/hauke/compat-wireless/tmp/compat/main.o] Error 1 scripts/Makefile.build:403: recipe for target '/home/hauke/compat-wireless/tmp/compat' failed make[5]: *** [/home/hauke/compat-wireless/tmp/compat] Error 2 Makefile:1378: recipe for target '_module_/home/hauke/compat-wireless/tmp' failed make[4]: *** [_module_/home/hauke/compat-wireless/tmp] Error 2 Makefile.build:6: recipe for target 'modules' failed make[3]: *** [modules] Error 2 Makefile.real:88: recipe for target 'modules' failed make[2]: *** [modules] Error 2
Quoted 9 lines
Makefile:40: recipe for target 'modules' failed make[1]: *** [modules] Error 2 Makefile:30: recipe for target 'default' failed make: *** [default] Error 2 hauke@hauke-desktop:~/compat-wireless/tmp$ uname -a Linux hauke-desktop 4.3.0+ #3 SMP Tue Nov 3 20:56:24 CET 2015 x86_64 GNU/Linux hauke@hauke-desktop:~/compat-wireless/tmp$
On 3.10 I am gettng a different error message
hauke@hauke-desktop:~/compat-wireless/tmp$ ionice -c 3 nice -n 20 make
KLIB=/lib/modules/3.10.92-031092-generic V=99
CC [M] /home/hauke/compat-wireless/tmp/compat/main.o
In file included from
/home/hauke/compat-wireless/tmp/backport-include/linux/pm.h:3:0,
from
/usr/src/linux-headers-3.10.92-031092-generic/arch/x86/include/asm/apic.h:5,
from
/usr/src/linux-headers-3.10.92-031092-generic/arch/x86/include/asm/smp.h:13,
from include/linux/smp.h:38,
from include/linux/percpu.h:5,
from include/linux/hrtimer.h:23,
from
/home/hauke/compat-wireless/tmp/backport-include/linux/timekeeping.h:5,
from
/home/hauke/compat-wireless/tmp/backport-include/linux/ktime.h:4,
from include/linux/timer.h:5,
from include/linux/workqueue.h:8,
from
/home/hauke/compat-wireless/tmp/backport-include/linux/workqueue.h:3,
from include/linux/srcu.h:34,
from include/linux/notifier.h:15,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:771,
from include/linux/gfp.h:4,
from
/home/hauke/compat-wireless/tmp/backport-include/linux/gfp.h:3,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from
/home/hauke/compat-wireless/tmp/backport-include/linux/module.h:3,
from /home/hauke/compat-wireless/tmp/compat/main.c:1:
include/linux/pm.h:537:20: error: field ‘suspend_timer’ has incomplete type
struct timer_list suspend_timer;
^
include/linux/pm.h:539:21: error: field ‘work’ has incomplete type
struct work_struct work;
^
scripts/Makefile.build:308: recipe for target
'/home/hauke/compat-wireless/tmp/compat/main.o' failed
make[6]: *** [/home/hauke/compat-wireless/tmp/compat/main.o] Error 1
scripts/Makefile.build:455: recipe for target
'/home/hauke/compat-wireless/tmp/compat' failed
make[5]: *** [/home/hauke/compat-wireless/tmp/compat] Error 2
Makefile:1228: recipe for target
'_module_/home/hauke/compat-wireless/tmp' failed
make[4]: *** [_module_/home/hauke/compat-wireless/tmp] Error 2
Makefile.build:6: recipe for target 'modules' failed
make[3]: *** [modules] Error 2
Makefile.real:88: recipe for target 'modules' failed
make[2]: *** [modules] Error 2
Makefile:40: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
Makefile:30: recipe for target 'default' failed
make: *** [default] Error 2
hauke@hauke-desktop:~/compat-wireless/tmp$I tried to understand the first error but failed, do you know better what is wrong there?
Hauke
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 26 lines · Hauke Mehrtens
I am getting this error with your patch on kernel 4.3:hauke@hauke-desktop:~/compat-wireless/tmp$ ionice -c 3 nice -n 20 make V=99 CC [M] /home/hauke/compat-wireless/tmp/compat/main.o In file included from include/linux/hrtimer.h:18:0, from /home/hauke/compat-wireless/tmp/backport- include/linux/timekeeping.h:5, from include/linux/ktime.h:297, from /home/hauke/compat-wireless/tmp/backport-include/linux/ktime.h:3, from include/linux/rcupdate.h:47, from /home/hauke/compat-wireless/tmp/backport-include/linux/rcupdate.h:3, from include/linux/srcu.h:33, from include/linux/notifier.h:15, from include/linux/memory_hotplug.h:6, from include/linux/mmzone.h:812, from include/linux/gfp.h:5, from /home/hauke/compat-wireless/tmp/backport-include/linux/gfp.h:3, from include/linux/kmod.h:22, from include/linux/module.h:13, from
Quoted 9 lines
/home/hauke/compat-wireless/tmp/backport-include/linux/module.h:3, from /home/hauke/compat- wireless/tmp/compat/main.c:1: include/linux/rbtree.h: In function ‘rb_link_node_rcu’: include/linux/rbtree.h:95:2: error: implicit declaration of function ‘rcu_assign_pointer’ [-Werror=implicit-function-declaration] rcu_assign_pointer(*rb_link, node); ^
Strange. I got different but similarly strange warnings though, I'll send the patch I ended up using.
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in