Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernels before 3.17 don't export ktime_divns() #2

Open
thomasjfox opened this issue Jul 26, 2017 · 3 comments
Open

kernels before 3.17 don't export ktime_divns() #2

thomasjfox opened this issue Jul 26, 2017 · 3 comments
Assignees

Comments

@thomasjfox
Copy link

Hi Karsten,

mISDN git HEAD (currently 2edcc9c) compiles fine with kernel 3.14.x.

Loading the mISDN_core module fails with "undefined symbol ktime_divns" though.

I've tracked it down: The EXPORT_SYMBOL_GPL in kernel/hrtimer.c (or kernel/time/hrtimer.c) was introduced in kernel 3.17 only with upstream commit 166afb64511eef08e13331b970c44fe91cea45ef ("ktime: Sanitize ktime_to_us/ms conversion")

Therefore I think all kernels before 3.17 need the Revert_693a012bf96b18b00ee4da2e027b11da11b1f9f4.patch file applied?

Personally I'll just patch my 3.14 kernel to add EXPORT_SYMBOL_GPL(ktime_divns),
that's what some -stable updates were doing anyway:
http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1189362.html

Cheers,
Thomas

@thomasjfox
Copy link
Author

Special case though: ktime_divns() is only defined as a function if BITS_PER_LONG is < 64.

Code from include/kernel/hrtimer.h:

#if BITS_PER_LONG < 64
extern u64 ktime_divns(const ktime_t kt, s64 div);
#else /* BITS_PER_LONG < 64 */
# define ktime_divns(kt, div)           (u64)((kt).tv64 / (div))
#endif

@kkeil
Copy link
Contributor

kkeil commented Jul 28, 2017

Yes I only tested compiling for some old kernels < 4.0 , not tried to load the modules.

@kkeil kkeil self-assigned this Jul 28, 2017
@thomasjfox
Copy link
Author

thomasjfox commented Jul 28, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants