lkml.org 
[lkml]   [2021]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Kconfig-induced build errors: CONFIG_PAGE_OFFSET
From
Date
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

\
 
 \ /
  Last update: 2021-01-28 21:43    [W:0.065 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site