public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Qian Cai <cai@lca.pw>, torvalds@linux-foundation.org
Cc: daniel.diaz@linaro.org, tytso@mit.edu, catalin.marinas@arm.com,
	will@kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] random: fix a compilation error on arm64
Date: Thu, 6 Aug 2020 07:50:23 -0700	[thread overview]
Message-ID: <4edcf552-ef82-cdd2-3fda-38d42ebfecc7@roeck-us.net> (raw)
In-Reply-To: <20200806135836.31736-1-cai@lca.pw>

On 8/6/20 6:58 AM, Qian Cai wrote:
> linux-next failed to compile using this .config,
> https://gitlab.com/cailca/linux-mm/-/blob/master/arm64.config
> 
> arch/arm64/kernel/kaslr.c: In function 'kaslr_early_init':
> arch/arm64/kernel/kaslr.c:128:6: error: implicit declaration of function
> '__early_cpu_has_rndr'; did you mean '__early_pfn_to_nid'?
> [-Werror=implicit-function-declaration]
>   if (__early_cpu_has_rndr()) {
>       ^~~~~~~~~~~~~~~~~~~~
>       __early_pfn_to_nid
> arch/arm64/kernel/kaslr.c:131:7: error: implicit declaration of function
> '__arm64_rndr' [-Werror=implicit-function-declaration]
>    if (__arm64_rndr(&raw))
>        ^~~~~~~~~~~~
> cc1: some warnings being treated as errors
> 

This happens because ARCH_RANDOM is disabled. May be I am wrong, but I
would argue that __arm64_rndr() should not be called directly in the
first place. arch_get_random_seed_long_early() should be called instead.

Thanks,
Guenter

> Fixes: 585524081ecd ("random: random.h should include archrandom.h, not the other way around")
> Signed-off-by: Qian Cai <cai@lca.pw>
> ---
>  include/linux/random.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/linux/random.h b/include/linux/random.h
> index f45b8be3e3c4..da782c16c20c 100644
> --- a/include/linux/random.h
> +++ b/include/linux/random.h
> @@ -12,6 +12,8 @@
>  #include <linux/list.h>
>  #include <linux/once.h>
>  
> +#include <asm/archrandom.h>
> +
>  #include <uapi/linux/random.h>
>  
>  struct random_ready_callback {
> 


  reply	other threads:[~2020-08-06 16:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06 13:58 [PATCH] random: fix a compilation error on arm64 Qian Cai
2020-08-06 14:50 ` Guenter Roeck [this message]
2020-08-06 22:43   ` Qian Cai
2020-08-07  0:19     ` Guenter Roeck
2020-08-06 22:01 ` kernel test robot
2020-08-06 22:25 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4edcf552-ef82-cdd2-3fda-38d42ebfecc7@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=cai@lca.pw \
    --cc=catalin.marinas@arm.com \
    --cc=daniel.diaz@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox