summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a0f92f6)
raw | patch | inline | side by side (parent: a0f92f6)
author | Robert Tivy <rtivy@ti.com> | |
Thu, 7 Nov 2013 00:00:42 +0000 (16:00 -0800) | ||
committer | Robert Tivy <rtivy@ti.com> | |
Thu, 7 Nov 2013 00:00:42 +0000 (16:00 -0800) |
The global var 'num_physpages' was removed in Linux 3.11 mainline, and
was replaced by a function named get_num_physpages(). New code to handle
this is added conditionally.
was replaced by a function named get_num_physpages(). New code to handle
this is added conditionally.
src/cmem/module/cmemk.c | patch | blob | history |
index 2b8c9addf44d3c503ac5dad16dc225d4132a839a..c7c53592f60e18a1782caf3514c1d3d95c1f28d7 100644 (file)
--- a/src/cmem/module/cmemk.c
+++ b/src/cmem/module/cmemk.c
char **pool_table[MAX_POOLS];
char tmp_str[4];
void *virtp;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+ unsigned long num_physpages;
+#endif
banner();
block_avail_size[bi] = length;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+ num_physpages = get_num_physpages();
+#endif
+
/* attempt to determine the end of Linux kernel memory */
phys_end_kernel = virt_to_phys((void *)PAGE_OFFSET) +
(num_physpages << PAGE_SHIFT);