forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/arch/arm/include/asm/cpuidle.h
....@@ -7,9 +7,11 @@
77 #ifdef CONFIG_CPU_IDLE
88 extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
99 struct cpuidle_driver *drv, int index);
10
+#define __cpuidle_method_section __used __section("__cpuidle_method_of_table")
1011 #else
1112 static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
1213 struct cpuidle_driver *drv, int index) { return -ENODEV; }
14
+#define __cpuidle_method_section __maybe_unused /* drop silently */
1315 #endif
1416
1517 /* Common ARM WFI state */
....@@ -42,8 +44,7 @@
4244
4345 #define CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops) \
4446 static const struct of_cpuidle_method __cpuidle_method_of_table_##name \
45
- __used __section(__cpuidle_method_of_table) \
46
- = { .method = _method, .ops = _ops }
47
+ __cpuidle_method_section = { .method = _method, .ops = _ops }
4748
4849 extern int arm_cpuidle_suspend(int index);
4950