Hi all,
After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
lib/math/div64.c: In function 'mul_u64_u64_div_u64':
lib/math/div64.c:202:6: error: implicit declaration of function 'ilog2' [-Werror=implicit-function-declaration]
202 | if (ilog2(a) + ilog2(b) > 62) {
| ^~~~~
Caused by commit
4ec993a18ff6 ("kernel.h: Split out mathematical helpers")
I have applied the following patch for today:
From: Stephen Rothwell <[email protected]>
Date: Thu, 29 Oct 2020 15:03:58 +1100
Subject: [PATCH] kernel.h: Split out mathematical helpers fix
Signed-off-by: Stephen Rothwell <[email protected]>
---
lib/math/div64.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/math/div64.c b/lib/math/div64.c
index dcc826c40ca1..064d68a5391a 100644
--- a/lib/math/div64.c
+++ b/lib/math/div64.c
@@ -22,6 +22,7 @@
#include <linux/export.h>
#include <linux/math.h>
#include <linux/math64.h>
+#include <linux/log2.h>
/* Not needed on 64bit architectures */
#if BITS_PER_LONG == 32
--
2.28.0
--
Cheers,
Stephen Rothwell
On Thu, Oct 29, 2020 at 03:08:09PM +1100, Stephen Rothwell wrote:
> After merging the akpm-current tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> lib/math/div64.c: In function 'mul_u64_u64_div_u64':
> lib/math/div64.c:202:6: error: implicit declaration of function 'ilog2' [-Werror=implicit-function-declaration]
> 202 | if (ilog2(a) + ilog2(b) > 62) {
> | ^~~~~
>
> Caused by commit
>
> 4ec993a18ff6 ("kernel.h: Split out mathematical helpers")
>
> I have applied the following patch for today:
Right, thanks! It seems x86 has this inclusion somewhere else and my patch
reveals this on PPC which has cleaner inclusion chain.
Andrew, can you attach this fix to your tree?
--
With Best Regards,
Andy Shevchenko
On Wed, Nov 4, 2020 at 9:05 PM Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> After merging the akpm-current tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> In file included from include/linux/numa.h:25,
> from include/linux/nodemask.h:96,
> from include/linux/mount.h:15,
> from fs/pnode.c:9:
> arch/powerpc/include/asm/sparsemem.h:17:16: error: unknown type name 'pgprot_t'
> 17 | int nid, pgprot_t prot);
> | ^~~~~~~~
>
> Caused by commit
>
> 45339c019cbc ("mm: fix phys_to_target_node() and memory_add_physaddr_to_nid() exports")
>
> I have reverted that commit for today (maybe I should not have added
> it :-().
Ugh, I'll check my cross-compile coverage.