• Tiezhu Yang's avatar
    LoongArch: Give a chance to build with !CONFIG_SMP · 5685d7fc
    Tiezhu Yang authored
    In the current code, SMP is selected in Kconfig for LoongArch, the users
    can not unset it, this is reasonable for a multi-processor machine. But
    as the help info of config SMP said, if you have a system with only one
    CPU, say N. On a uni-processor machine, the kernel will run faster if you
    say N here.
    
    Loongson-2K0500 is a single-core CPU for applications like industrial
    control, printing terminals, and BMC (Baseboard Management Controller),
    there are many development boards, products and solutions on the market,
    so it is better and necessary to give a chance to build with !CONFIG_SMP
    for a uni-processor machine.
    
    First of all, do not select SMP for config LOONGARCH in Kconfig to make
    it possible to unset CONFIG_SMP. Then, do some changes to fix warnings
    and errors if CONFIG_SMP is not set.
    
    (1) Define get_ipi_irq() only if CONFIG_SMP is set to fix the warning:
    arch/loongarch/kernel/irq.c:90:19: warning: 'get_ipi_irq' defined but not used [-Wunused-functi...
    5685d7fc
suspend.c 1.82 KB