diff mbox series

PM / wakeirq: fix compile error caused by missing srcu

Message ID 20180814023442.11488-1-yi.zhang@huawei.com (mailing list archive)
State Mainlined
Delegated to: Rafael Wysocki
Headers show
Series PM / wakeirq: fix compile error caused by missing srcu | expand

Commit Message

Zhang Yi Aug. 14, 2018, 2:34 a.m. UTC
Commit ea0212f40c6 ("power: auto select CONFIG_SRCU") convert rcu to
srcu in drivers/base/power/wakeup.c but forget to select CONFIG_SRCU
in Kconfig, which will lead to the following compile error if
CONFIG_SRCU was not selected by other Kconfig. This patch fix this
error by auto select CONFIG_SRCU when PM_SLEEP was enabled.

Compile error output:

drivers/built-in.o: In function `wakeup_source_remove':
(.text+0x3c6fc): undefined reference to `synchronize_srcu'
drivers/built-in.o: In function `pm_print_active_wakeup_sources':
(.text+0x3c7a8): undefined reference to `__srcu_read_lock'
drivers/built-in.o: In function `pm_print_active_wakeup_sources':
(.text+0x3c84c): undefined reference to `__srcu_read_unlock'
drivers/built-in.o: In function `device_wakeup_arm_wake_irqs':
(.text+0x3d1d8): undefined reference to `__srcu_read_lock'
drivers/built-in.o: In function `device_wakeup_arm_wake_irqs':
(.text+0x3d228): undefined reference to `__srcu_read_unlock'
drivers/built-in.o: In function `device_wakeup_disarm_wake_irqs':
(.text+0x3d24c): undefined reference to `__srcu_read_lock'
drivers/built-in.o: In function `device_wakeup_disarm_wake_irqs':
(.text+0x3d29c): undefined reference to `__srcu_read_unlock'
drivers/built-in.o:(.data+0x4158): undefined reference to `process_srcu'

Fixes: ea0212f40c6 ("power: auto select CONFIG_SRCU")
Cc: 4.2+ <stable@vger.kernel.org> # 4.2+
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
---
 kernel/power/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Rafael J. Wysocki Aug. 20, 2018, 9:05 a.m. UTC | #1
On Tuesday, August 14, 2018 4:34:42 AM CEST zhangyi (F) wrote:
> Commit ea0212f40c6 ("power: auto select CONFIG_SRCU") convert rcu to
> srcu in drivers/base/power/wakeup.c but forget to select CONFIG_SRCU
> in Kconfig, which will lead to the following compile error if
> CONFIG_SRCU was not selected by other Kconfig. This patch fix this
> error by auto select CONFIG_SRCU when PM_SLEEP was enabled.
> 
> Compile error output:
> 
> drivers/built-in.o: In function `wakeup_source_remove':
> (.text+0x3c6fc): undefined reference to `synchronize_srcu'
> drivers/built-in.o: In function `pm_print_active_wakeup_sources':
> (.text+0x3c7a8): undefined reference to `__srcu_read_lock'
> drivers/built-in.o: In function `pm_print_active_wakeup_sources':
> (.text+0x3c84c): undefined reference to `__srcu_read_unlock'
> drivers/built-in.o: In function `device_wakeup_arm_wake_irqs':
> (.text+0x3d1d8): undefined reference to `__srcu_read_lock'
> drivers/built-in.o: In function `device_wakeup_arm_wake_irqs':
> (.text+0x3d228): undefined reference to `__srcu_read_unlock'
> drivers/built-in.o: In function `device_wakeup_disarm_wake_irqs':
> (.text+0x3d24c): undefined reference to `__srcu_read_lock'
> drivers/built-in.o: In function `device_wakeup_disarm_wake_irqs':
> (.text+0x3d29c): undefined reference to `__srcu_read_unlock'
> drivers/built-in.o:(.data+0x4158): undefined reference to `process_srcu'
> 
> Fixes: ea0212f40c6 ("power: auto select CONFIG_SRCU")
> Cc: 4.2+ <stable@vger.kernel.org> # 4.2+
> Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
> ---
>  kernel/power/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> index e880ca22c5a5..3a6c2f87699e 100644
> --- a/kernel/power/Kconfig
> +++ b/kernel/power/Kconfig
> @@ -105,6 +105,7 @@ config PM_SLEEP
>  	def_bool y
>  	depends on SUSPEND || HIBERNATE_CALLBACKS
>  	select PM
> +	select SRCU
>  
>  config PM_SLEEP_SMP
>  	def_bool y
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index e880ca22c5a5..3a6c2f87699e 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -105,6 +105,7 @@  config PM_SLEEP
 	def_bool y
 	depends on SUSPEND || HIBERNATE_CALLBACKS
 	select PM
+	select SRCU
 
 config PM_SLEEP_SMP
 	def_bool y