Re: [PATCH] MIPS: Limit MIPS_MT_SMP support by ISA reversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/7/23 15:35, Jiaxun Yang wrote:
MIPS MT ASE is only available on ISA between Release 1 and Release 5.
Add ISA level dependency to Kconfig to fix build.

Reported-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>

With this patch in place, I still get the second build failure.

In file included from <command-line>:
arch/mips/mm/init.c: In function 'mem_init':
././include/linux/compiler_types.h:397:45: error: call to '__compiletime_assert_437' declared with attribute error: BUILD_BUG_ON failed: IS_ENABLED(CONFIG_32BIT) && (_PFN_SHIFT > PAGE_SHIFT)
  397 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
      |                                             ^
././include/linux/compiler_types.h:378:25: note: in definition of macro '__compiletime_assert'
  378 |                         prefix ## suffix();                             \
      |                         ^~~~~~
././include/linux/compiler_types.h:397:9: note: in expansion of macro '_compiletime_assert'
  397 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
      |         ^~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
   39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
      |                                     ^~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
   50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
      |         ^~~~~~~~~~~~~~~~
arch/mips/mm/init.c:454:9: note: in expansion of macro 'BUILD_BUG_ON'
  454 |         BUILD_BUG_ON(IS_ENABLED(CONFIG_32BIT) && (_PFN_SHIFT > PAGE_SHIFT));

Also, MIPS_MT_SMP is disabled, CONFIG_TARGET_ISA_REV=0, and CPU_MIPSR{1,2,6}
is not set. Prior to "MIPS: generic: Enable all CPUs supported by virt board
in Kconfig", the configuration was

CONFIG_CPU_MIPS32_R1=y
CONFIG_CPU_MIPS32=y
CONFIG_CPU_MIPSR1=y
CONFIG_TARGET_ISA_REV=1
CONFIG_MIPS_MT_SMP=y

Ultimately it is not my decision to make what should be enabled with
mips:allmodconfig, but to me it looks like "MIPS: generic: Enable all CPUs
supported by virt board in Kconfig" doesn't enable but disable various
configurations.

Thanks,
Guenter

---
  arch/mips/Kconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 5e399a5ac3b3..ecc7a755fae6 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2194,7 +2194,8 @@ config CPU_R4K_CACHE_TLB
  config MIPS_MT_SMP
  	bool "MIPS MT SMP support (1 TC on each available VPE)"
  	default y
-	depends on SYS_SUPPORTS_MULTITHREADING && !CPU_MIPSR6 && !CPU_MICROMIPS
+	depends on TARGET_ISA_REV > 0 && TARGET_ISA_REV < 6
+	depends on SYS_SUPPORTS_MULTITHREADING && !CPU_MICROMIPS
  	select CPU_MIPSR2_IRQ_VI
  	select CPU_MIPSR2_IRQ_EI
  	select SYNC_R4K




[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux