* [PATCH v2] backports: add ktime_get_boot_ns() @ 2015-12-02 8:56 Johannes Berg 2015-12-02 9:03 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2015-12-02 8:56 UTC (permalink / raw) To: backports; +Cc: Johannes Berg From: Johannes Berg <johannes.berg@intel.com> This small helper inline was added in 3.17, we want to use it now so need to backport it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> --- backport/backport-include/linux/timekeeping.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backport/backport-include/linux/timekeeping.h b/backport/backport-include/linux/timekeeping.h index fe42e7170680..4d31580b8757 100644 --- a/backport/backport-include/linux/timekeeping.h +++ b/backport/backport-include/linux/timekeeping.h @@ -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) -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe backports" in ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] backports: add ktime_get_boot_ns() 2015-12-02 8:56 [PATCH v2] backports: add ktime_get_boot_ns() Johannes Berg @ 2015-12-02 9:03 ` Johannes Berg 2015-12-02 9:04 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2015-12-02 9:03 UTC (permalink / raw) To: backports On Wed, 2015-12-02 at 09:56 +0100, Johannes Berg wrote: > From: Johannes Berg <johannes.berg@intel.com> > > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] backports: add ktime_get_boot_ns() 2015-12-02 9:03 ` Johannes Berg @ 2015-12-02 9:04 ` Johannes Berg 2015-12-02 10:33 ` Arend van Spriel 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2015-12-02 9:04 UTC (permalink / raw) To: backports On Wed, 2015-12-02 at 10:03 +0100, Johannes Berg wrote: > On Wed, 2015-12-02 at 09:56 +0100, Johannes Berg wrote: > > From: Johannes Berg <johannes.berg@intel.com> > > > > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] backports: add ktime_get_boot_ns() 2015-12-02 9:04 ` Johannes Berg @ 2015-12-02 10:33 ` Arend van Spriel 2015-12-02 10:46 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Arend van Spriel @ 2015-12-02 10:33 UTC (permalink / raw) To: Johannes Berg, backports On 12/02/2015 10:04 AM, Johannes Berg wrote: > On Wed, 2015-12-02 at 10:03 +0100, Johannes Berg wrote: >> On Wed, 2015-12-02 at 09:56 +0100, Johannes Berg wrote: >>> From: Johannes Berg <johannes.berg@intel.com> >>> >>> 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. 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] backports: add ktime_get_boot_ns() 2015-12-02 10:33 ` Arend van Spriel @ 2015-12-02 10:46 ` Johannes Berg 2015-12-04 21:14 ` Hauke Mehrtens 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2015-12-02 10:46 UTC (permalink / raw) To: Arend van Spriel, backports On Wed, 2015-12-02 at 11:33 +0100, Arend van Spriel wrote: > > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] backports: add ktime_get_boot_ns() 2015-12-02 10:46 ` Johannes Berg @ 2015-12-04 21:14 ` Hauke Mehrtens 2015-12-04 21:25 ` Hauke Mehrtens 2015-12-07 12:51 ` Johannes Berg 0 siblings, 2 replies; 8+ messages in thread From: Hauke Mehrtens @ 2015-12-04 21:14 UTC (permalink / raw) To: Johannes Berg, Arend van Spriel, backports On 12/02/2015 11:46 AM, Johannes Berg wrote: > On Wed, 2015-12-02 at 11:33 +0100, Arend van Spriel wrote: >> >> 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 > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] backports: add ktime_get_boot_ns() 2015-12-04 21:14 ` Hauke Mehrtens @ 2015-12-04 21:25 ` Hauke Mehrtens 2015-12-07 12:51 ` Johannes Berg 1 sibling, 0 replies; 8+ messages in thread From: Hauke Mehrtens @ 2015-12-04 21:25 UTC (permalink / raw) To: Johannes Berg, Arend van Spriel, backports On 12/04/2015 10:14 PM, Hauke Mehrtens wrote: > On 12/02/2015 11:46 AM, Johannes Berg wrote: >> On Wed, 2015-12-02 at 11:33 +0100, Arend van Spriel wrote: >>> >>> 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 >> > 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$ > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] backports: add ktime_get_boot_ns() 2015-12-04 21:14 ` Hauke Mehrtens 2015-12-04 21:25 ` Hauke Mehrtens @ 2015-12-07 12:51 ` Johannes Berg 1 sibling, 0 replies; 8+ messages in thread From: Johannes Berg @ 2015-12-07 12:51 UTC (permalink / raw) To: Hauke Mehrtens, Arend van Spriel, backports On Fri, 2015-12-04 at 22:14 +0100, Hauke Mehrtens wrote: > > 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); > ^ > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-12-07 12:51 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-12-02 8:56 [PATCH v2] backports: add ktime_get_boot_ns() Johannes Berg 2015-12-02 9:03 ` Johannes Berg 2015-12-02 9:04 ` Johannes Berg 2015-12-02 10:33 ` Arend van Spriel 2015-12-02 10:46 ` Johannes Berg 2015-12-04 21:14 ` Hauke Mehrtens 2015-12-04 21:25 ` Hauke Mehrtens 2015-12-07 12:51 ` Johannes Berg
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.