linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Atish Patra <atishp@atishpatra.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>
Subject: Re: Kconfig-induced build errors: CONFIG_PAGE_OFFSET
Date: Thu, 28 Jan 2021 12:40:42 -0800	[thread overview]
Message-ID: <e90a2745-7ca6-ce78-63c8-5aaf31602eab@infradead.org> (raw)
In-Reply-To: <CAOnJCUJc0-x-gmLAKxb9ULjOX1yBjxZvwi4=_0ETH-L7JtKhNw@mail.gmail.com>

On 1/28/21 12:07 PM, Atish Patra wrote:
> On Wed, Jan 27, 2021 at 7:18 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> Hi,
>>
>> I took a riscv-32 .config from kernel test robot (it was for a clang build)
>> and did a "make olddefconfig" (using gcc tools) and got build errors
>> due to this config item from arch/riscv/Kconfig;
>>
>>
>> config PAGE_OFFSET
>>         hex
>>         default 0xC0000000 if 32BIT && MAXPHYSMEM_1GB
>>         default 0x80000000 if 64BIT && !MMU
>>         default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
>>         default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
>>
>> PAGE_OFFSET is undefined for the case of 32BIT && MAXPHYSMEM_2GB.
> 
> Because, RV32 doesn't support 2GB physical memory yet.
> 
> The compilation errors can be fixed by not allowing MAXPHYSMEM_2GB for RV32 and
> MAXPHYSMEM_1GB for RV64. How about this ?
> 
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -253,8 +253,10 @@ choice
>         default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY
> 
>         config MAXPHYSMEM_1GB
> +               depends on 32BIT
>                 bool "1GiB"
>         config MAXPHYSMEM_2GB
> +               depends on 64BIT && CMODEL_MEDLOW
>                 bool "2GiB"
>         config MAXPHYSMEM_128GB
>                 depends on 64BIT && CMODEL_MEDANY
Looks good. Thanks.

Acked-by: Randy Dunlap <rdunlap@infradead.org>

-- 
~Randy


  reply	other threads:[~2021-01-28 20:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28  3:18 Kconfig-induced build errors: CONFIG_PAGE_OFFSET Randy Dunlap
2021-01-28 20:07 ` Atish Patra
2021-01-28 20:40   ` Randy Dunlap [this message]
     [not found] <CAMuHMdWb8We=-L3mrZi5dSc308rapqH8NyAq9OJU=Qo7YijGpw@mail.gmail.com>
2021-02-03  2:27 ` Palmer Dabbelt
2021-02-03  2:35   ` Palmer Dabbelt

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=e90a2745-7ca6-ce78-63c8-5aaf31602eab@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=atishp@atishpatra.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /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;
as well as URLs for NNTP newsgroup(s).