mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: geert@linux-m68k.org
Cc: atishp@atishpatra.org, rdunlap@infradead.org,
	linux-riscv@lists.infradead.org, aou@eecs.berkeley.edu,
	linux-kernel@vger.kernel.org,
	Paul Walmsley <paul.walmsley@sifive.com>
Subject: Re: Kconfig-induced build errors: CONFIG_PAGE_OFFSET
Date: Tue, 02 Feb 2021 18:27:42 -0800 (PST)	[thread overview]
Message-ID: <mhng-9b4a74fd-62d8-421f-8150-9147da7e39b2@penguin> (raw)
In-Reply-To: <CAMuHMdWb8We=-L3mrZi5dSc308rapqH8NyAq9OJU=Qo7YijGpw@mail.gmail.com>

On Fri, 29 Jan 2021 05:52:51 PST (-0800), geert@linux-m68k.org wrote:
> Hi Atish,
>
> On Thu, Jan 28, 2021 at 9:09 PM Atish Patra <atishp@atishpatra.org> wrote:
>> On Wed, Jan 27, 2021 at 7:18 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>> > 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
>
> Thanks, works fine on litex-vexriscv.
> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>

Atish: did I miss an actual patch?  I just see diff here.

       reply	other threads:[~2021-02-03  2:28 UTC|newest]

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

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=mhng-9b4a74fd-62d8-421f-8150-9147da7e39b2@penguin \
    --to=palmer@dabbelt.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=atishp@atishpatra.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=paul.walmsley@sifive.com \
    --cc=rdunlap@infradead.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

all inboxes | Powered by JetHome®