linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mips: BCM63XX: ensure that CPU_SUPPORTS_32BIT_KERNEL is set
@ 2021-11-06 15:49 Randy Dunlap
  2021-11-06 19:34 ` Florian Fainelli
  2021-11-09 15:29 ` Thomas Bogendoerfer
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-11-06 15:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, kernel test robot, Thomas Bogendoerfer,
	Florian Fainelli, bcm-kernel-feedback-list, linux-mips,
	Paul Burton, Maxime Bizon, Ralf Baechle

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 <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: linux-mips@vger.kernel.org
Cc: Paul Burton <paulburton@kernel.org>
Cc: Maxime Bizon <mbizon@freebox.fr>
Cc: Ralf Baechle <ralf@linux-mips.org>
Suggested-by: Florian Fainelli <f.fainelli@gmail.com>
---
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] mips: BCM63XX: ensure that CPU_SUPPORTS_32BIT_KERNEL is set
  2021-11-06 15:49 [PATCH v2] mips: BCM63XX: ensure that CPU_SUPPORTS_32BIT_KERNEL is set Randy Dunlap
@ 2021-11-06 19:34 ` Florian Fainelli
  2021-11-09 15:29 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2021-11-06 19:34 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: kernel test robot, Thomas Bogendoerfer, bcm-kernel-feedback-list,
	linux-mips, Paul Burton, Maxime Bizon, Ralf Baechle

Le 06/11/2021 à 08:49, Randy Dunlap a écrit :
> 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 <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-mips@vger.kernel.org
> Cc: Paul Burton <paulburton@kernel.org>
> Cc: Maxime Bizon <mbizon@freebox.fr>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Suggested-by: Florian Fainelli <f.fainelli@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks Randy!
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] mips: BCM63XX: ensure that CPU_SUPPORTS_32BIT_KERNEL is set
  2021-11-06 15:49 [PATCH v2] mips: BCM63XX: ensure that CPU_SUPPORTS_32BIT_KERNEL is set Randy Dunlap
  2021-11-06 19:34 ` Florian Fainelli
@ 2021-11-09 15:29 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2021-11-09 15:29 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, kernel test robot, Florian Fainelli,
	bcm-kernel-feedback-list, linux-mips, Paul Burton, Maxime Bizon,
	Ralf Baechle

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 <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-mips@vger.kernel.org
> Cc: Paul Burton <paulburton@kernel.org>
> Cc: Maxime Bizon <mbizon@freebox.fr>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Suggested-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> 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 ]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-09 15:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-06 15:49 [PATCH v2] mips: BCM63XX: ensure that CPU_SUPPORTS_32BIT_KERNEL is set Randy Dunlap
2021-11-06 19:34 ` Florian Fainelli
2021-11-09 15:29 ` Thomas Bogendoerfer

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).