[Top] [All Lists]

Re: [PATCH] MIPS: Kconfig: Set default value for the "Kernel code model"

To: Markos Chandras <>
Subject: Re: [PATCH] MIPS: Kconfig: Set default value for the "Kernel code model"
From: Ralf Baechle <>
Date: Tue, 11 Jun 2013 17:41:29 +0200
Cc:, Michal Marek <>,
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Jun 11, 2013 at 10:52:16AM +0100, Markos Chandras wrote:

(Adding the kconfig maintainer and mailing list to cc.)

> Certain randconfigs may not select neither CONFIG_32BIT nor
> CONFIG_64BIT which can lead to build problems and to the following
> Kbuild warning:
> .config:154:warning: symbol value '' invalid for PHYSICAL_START
> Signed-off-by: Markos Chandras <>
> Acked-by: Steven J. Hill <>

Systems are supposed to set if they support 32 bit kernels and/or 64 bit
kernels in arch/mips/Kconfig.  The behaviour you're reporting happens
if the default system (which happens to be SGI_IP22) supports both
kernel models, that is SYS_SUPPORTS_32BIT_KERNEL and
SYS_SUPPORTS_64BIT_KERNEL are set.  Then "make randconfig" will generate
a .config with neiher CONFIG_32BIT nor CONFIG_64BIT set.

Just defaulting to CONFIG_32BIT as in your patch isn't really a good solution
because for some platforms 32 bit kernels, for others 64 bit kernels are
preferred so I tried to implement something like

        prompt "Kernel code model"
        default 32BIT if SYS_32BIT_KERNEL_PREFERRED
        default 64BIT if SYS_64BIT_KERNEL_PREFERRED

and have individual platforms set their preferred kernel variant.  And
I got more odd Kconfig behaviour, getting both choice values 32BIT and
64BIT set for some platforms.

Another variant that only uses a single auxilliary symbol,

        prompt "Kernel code model"
        default 32BIT if !SYS_64BIT_KERNEL_PREFERRED
        default 64BIT if SYS_64BIT_KERNEL_PREFERRED

still results in


So I'm not quite certain how to obtain the desired behaviour - but I appears
highly unobvious to buggy on kconfig's side.

Michal, can you shed some light?


<Prev in Thread] Current Thread [Next in Thread>