Patch "LoongArch: Fix build error if CONFIG_SUSPEND is not set" has been added to the 6.2-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    LoongArch: Fix build error if CONFIG_SUSPEND is not set

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     loongarch-fix-build-error-if-config_suspend-is-not-s.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 436937ae5dfad39972dfd32f4660b0437200e0a0
Author: Huacai Chen <chenhuacai@xxxxxxxxxx>
Date:   Tue Apr 18 19:38:58 2023 +0800

    LoongArch: Fix build error if CONFIG_SUSPEND is not set
    
    [ Upstream commit 1cf62488f5e465b1cd814d19be238a4b7ad5be38 ]
    
    We can see the following build error on LoongArch if CONFIG_SUSPEND is
    not set:
    
      ld: drivers/acpi/sleep.o: in function 'acpi_pm_prepare':
      sleep.c:(.text+0x2b8): undefined reference to 'loongarch_wakeup_start'
    
    Here is the call trace:
    
      acpi_pm_prepare()
        __acpi_pm_prepare()
          acpi_sleep_prepare()
            acpi_get_wakeup_address()
              loongarch_wakeup_start()
    
    Root cause: loongarch_wakeup_start() is defined in arch/loongarch/power/
    suspend_asm.S which is only built under CONFIG_SUSPEND. In order to fix
    the build error, just let acpi_get_wakeup_address() return 0 if CONFIG_
    SUSPEND is not set.
    
    Fixes: 366bb35a8e48 ("LoongArch: Add suspend (ACPI S3) support")
    Reviewed-by: WANG Xuerui <git@xxxxxxxxxx>
    Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/all/11215033-fa3c-ecb1-2fc0-e9aeba47be9b@xxxxxxxxxxxxx/
    Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
    Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/loongarch/include/asm/acpi.h b/arch/loongarch/include/asm/acpi.h
index 4198753aa1d0f..976a810352c60 100644
--- a/arch/loongarch/include/asm/acpi.h
+++ b/arch/loongarch/include/asm/acpi.h
@@ -41,8 +41,11 @@ extern void loongarch_suspend_enter(void);
 
 static inline unsigned long acpi_get_wakeup_address(void)
 {
+#ifdef CONFIG_SUSPEND
 	extern void loongarch_wakeup_start(void);
 	return (unsigned long)loongarch_wakeup_start;
+#endif
+	return 0UL;
 }
 
 #endif /* _ASM_LOONGARCH_ACPI_H */



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux