From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26F7AC433EF for ; Tue, 9 Nov 2021 15:31:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02A7C61211 for ; Tue, 9 Nov 2021 15:31:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239211AbhKIPeP (ORCPT ); Tue, 9 Nov 2021 10:34:15 -0500 Received: from elvis.franken.de ([193.175.24.41]:39251 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239098AbhKIPeN (ORCPT ); Tue, 9 Nov 2021 10:34:13 -0500 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1mkT5p-00033f-02; Tue, 09 Nov 2021 16:31:25 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 251A8C2C38; Tue, 9 Nov 2021 16:29:54 +0100 (CET) Date: Tue, 9 Nov 2021 16:29:54 +0100 From: Thomas Bogendoerfer To: Randy Dunlap Cc: linux-kernel@vger.kernel.org, kernel test robot , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, linux-mips@vger.kernel.org, Paul Burton , Maxime Bizon , Ralf Baechle Subject: Re: [PATCH v2] mips: BCM63XX: ensure that CPU_SUPPORTS_32BIT_KERNEL is set Message-ID: <20211109152954.GC12535@alpha.franken.de> References: <20211106154911.26222-1-rdunlap@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211106154911.26222-1-rdunlap@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 06, 2021 at 08:49:11AM -0700, Randy Dunlap wrote: > Several header files need info on CONFIG_32BIT or CONFIG_64BIT, > but kconfig symbol BCM63XX does not provide that info. This leads > to many build errors, e.g.: > > arch/mips/include/asm/page.h:196:13: error: use of undeclared identifier 'CAC_BASE' > return x - PAGE_OFFSET + PHYS_OFFSET; > arch/mips/include/asm/mach-generic/spaces.h:91:23: note: expanded from macro 'PAGE_OFFSET' > #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET) > arch/mips/include/asm/io.h:134:28: error: use of undeclared identifier 'CAC_BASE' > return (void *)(address + PAGE_OFFSET - PHYS_OFFSET); > arch/mips/include/asm/mach-generic/spaces.h:91:23: note: expanded from macro 'PAGE_OFFSET' > #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET) > > arch/mips/include/asm/uaccess.h:82:10: error: use of undeclared identifier '__UA_LIMIT' > return (__UA_LIMIT & (addr | (addr + size) | __ua_size(size))) == 0; > > > Selecting the SYS_HAS_CPU_BMIPS* symbols causes SYS_HAS_CPU_BMIPS to be > set, which then selects CPU_SUPPORT_32BIT_KERNEL, which causes > CONFIG_32BIT to be set. (a bit more indirect than v1 [RFC].) > > Fixes: e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.") > Signed-off-by: Randy Dunlap > Reported-by: kernel test robot > Cc: Thomas Bogendoerfer > Cc: Florian Fainelli > Cc: bcm-kernel-feedback-list@broadcom.com > Cc: linux-mips@vger.kernel.org > Cc: Paul Burton > Cc: Maxime Bizon > Cc: Ralf Baechle > Suggested-by: Florian Fainelli > --- > v2: select 3 SYS_HAS_CPU_BMIPS* symbols that will cause > CPU_SUPPORTS_32BIT_KERNEL to be set (Florian) > > arch/mips/Kconfig | 3 +++ > 1 file changed, 3 insertions(+) > > --- linux-next-20211105.orig/arch/mips/Kconfig > +++ linux-next-20211105/arch/mips/Kconfig > @@ -332,6 +332,9 @@ config BCM63XX > select SYS_SUPPORTS_32BIT_KERNEL > select SYS_SUPPORTS_BIG_ENDIAN > select SYS_HAS_EARLY_PRINTK > + select SYS_HAS_CPU_BMIPS32_3300 > + select SYS_HAS_CPU_BMIPS4350 > + select SYS_HAS_CPU_BMIPS4380 > select SWAP_IO_SPACE > select GPIOLIB > select MIPS_L1_CACHE_SHIFT_4 applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]