It is not valid to use the acpica macros to try and remove functions they only work on prototypes. Instead just increase the scope of the
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org --- drivers/acpi/processor_idle.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 0ff1927..208503d 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -218,18 +218,16 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr,
#endif
-#ifdef CONFIG_PM_SLEEP -#if (!ACPI_REDUCED_HARDWARE) +#if IS_ENABLED(CONFIG_PM_SLEEP) && !IS_ENABLED(CONFIG_ACPI_REDUCED_HARDWARE) static u32 saved_bm_rld; -#endif
-ACPI_HW_DEPENDENT_RETURN_INT(int acpi_processor_suspend(void)) +int acpi_processor_suspend(void) { acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &saved_bm_rld); return 0; }
-ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_processor_resume(void)) +void acpi_processor_resume(void) { u32 resumed_bm_rld;
@@ -254,7 +252,13 @@ void acpi_processor_syscore_exit(void) { unregister_syscore_ops(&acpi_processor_syscore_ops); } -#endif /* CONFIG_PM_SLEEP */ + +#else + +void acpi_processor_syscore_init(void){} +void acpi_processor_syscore_exit(void){} + +#endif /* CONFIG_PM_SLEEP && !CONFIG_ACPI_REDUCED_HARDWARE */
#if defined(CONFIG_X86) static void tsc_check_state(int state)
We had a missing symbol so define this as NULL for arm as it is currenly unused on arm platform
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org --- arch/arm/include/asm/acpi.h | 2 +- drivers/acpi/plat/arm-core.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/acpi.h b/arch/arm/include/asm/acpi.h index 651a15c..5f9b142 100644 --- a/arch/arm/include/asm/acpi.h +++ b/arch/arm/include/asm/acpi.h @@ -105,7 +105,7 @@ extern struct acpi_arm_root acpi_arm_rsdp_info; void arm_acpi_reserve_memory(void);
/* Low-level suspend routine. */ -extern int acpi_suspend_lowlevel(void); +extern int (*acpi_suspend_lowlevel)(void);
extern void prefill_possible_map(void);
diff --git a/drivers/acpi/plat/arm-core.c b/drivers/acpi/plat/arm-core.c index 8031ec3..bb37efe 100644 --- a/drivers/acpi/plat/arm-core.c +++ b/drivers/acpi/plat/arm-core.c @@ -78,6 +78,12 @@ static u64 acpi_lapic_addr __initdata; struct acpi_arm_root acpi_arm_rsdp_info; /* info about RSDP from FDT */
/* + * This function pointer is needed to be defined but for now will be NULL + * on arm where sleep is handled differently than x86 + */ +int (*acpi_suspend_lowlevel)(void); + +/* * Boot-time Configuration */
Acked-by: Tomasz Nowicki tomasz.nowicki@linaro.org
On 27.11.2013 15:10, Graeme Gregory wrote:
We had a missing symbol so define this as NULL for arm as it is currenly unused on arm platform
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
arch/arm/include/asm/acpi.h | 2 +- drivers/acpi/plat/arm-core.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/acpi.h b/arch/arm/include/asm/acpi.h index 651a15c..5f9b142 100644 --- a/arch/arm/include/asm/acpi.h +++ b/arch/arm/include/asm/acpi.h @@ -105,7 +105,7 @@ extern struct acpi_arm_root acpi_arm_rsdp_info; void arm_acpi_reserve_memory(void);
/* Low-level suspend routine. */ -extern int acpi_suspend_lowlevel(void); +extern int (*acpi_suspend_lowlevel)(void);
extern void prefill_possible_map(void);
diff --git a/drivers/acpi/plat/arm-core.c b/drivers/acpi/plat/arm-core.c index 8031ec3..bb37efe 100644 --- a/drivers/acpi/plat/arm-core.c +++ b/drivers/acpi/plat/arm-core.c @@ -78,6 +78,12 @@ static u64 acpi_lapic_addr __initdata; struct acpi_arm_root acpi_arm_rsdp_info; /* info about RSDP from FDT */
/*
- This function pointer is needed to be defined but for now will be NULL
- on arm where sleep is handled differently than x86
- */
+int (*acpi_suspend_lowlevel)(void);
+/*
- Boot-time Configuration
*/
Hi Graeme,
On 27.11.2013 15:10, Graeme Gregory wrote:
It is not valid to use the acpica macros to try and remove functions they only work on prototypes. Instead just increase the scope of the
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
drivers/acpi/processor_idle.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 0ff1927..208503d 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -218,18 +218,16 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr,
#endif
-#ifdef CONFIG_PM_SLEEP -#if (!ACPI_REDUCED_HARDWARE) +#if IS_ENABLED(CONFIG_PM_SLEEP) && !IS_ENABLED(CONFIG_ACPI_REDUCED_HARDWARE) static u32 saved_bm_rld; -#endif
-ACPI_HW_DEPENDENT_RETURN_INT(int acpi_processor_suspend(void)) +int acpi_processor_suspend(void) { acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &saved_bm_rld); return 0; }
-ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_processor_resume(void)) +void acpi_processor_resume(void) { u32 resumed_bm_rld;
@@ -254,7 +252,13 @@ void acpi_processor_syscore_exit(void) { unregister_syscore_ops(&acpi_processor_syscore_ops); } -#endif /* CONFIG_PM_SLEEP */
+#else
+void acpi_processor_syscore_init(void){} +void acpi_processor_syscore_exit(void){}
+#endif /* CONFIG_PM_SLEEP && !CONFIG_ACPI_REDUCED_HARDWARE */
#if defined(CONFIG_X86) static void tsc_check_state(int state)
I think this is fixed by Al second version of Hardware Reduced patch set: [PATCH v2 2/6] ACPI: bus master reload not supported in reduced HW mode
Unless you just want to make it works for our three which has first patch version?
Tomasz
On Wed, Nov 27, 2013 at 04:35:19PM +0100, Tomasz Nowicki wrote:
Hi Graeme,
On 27.11.2013 15:10, Graeme Gregory wrote:
It is not valid to use the acpica macros to try and remove functions they only work on prototypes. Instead just increase the scope of the
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
drivers/acpi/processor_idle.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 0ff1927..208503d 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -218,18 +218,16 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr,
#endif
-#ifdef CONFIG_PM_SLEEP -#if (!ACPI_REDUCED_HARDWARE) +#if IS_ENABLED(CONFIG_PM_SLEEP) && !IS_ENABLED(CONFIG_ACPI_REDUCED_HARDWARE) static u32 saved_bm_rld; -#endif
-ACPI_HW_DEPENDENT_RETURN_INT(int acpi_processor_suspend(void)) +int acpi_processor_suspend(void) { acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &saved_bm_rld); return 0; }
-ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_processor_resume(void)) +void acpi_processor_resume(void) { u32 resumed_bm_rld;
@@ -254,7 +252,13 @@ void acpi_processor_syscore_exit(void) { unregister_syscore_ops(&acpi_processor_syscore_ops); } -#endif /* CONFIG_PM_SLEEP */
+#else
+void acpi_processor_syscore_init(void){} +void acpi_processor_syscore_exit(void){}
+#endif /* CONFIG_PM_SLEEP && !CONFIG_ACPI_REDUCED_HARDWARE */
#if defined(CONFIG_X86) static void tsc_check_state(int state)
I think this is fixed by Al second version of Hardware Reduced patch set: [PATCH v2 2/6] ACPI: bus master reload not supported in reduced HW mode
Unless you just want to make it works for our three which has first patch version?
I think Als second version is still broken as its missing the two above stubs which are needed for compile on armv7 due to CONFIG_PM_SLEEP code paths being exposed.
But this is a diff to our internal tree which has an older version!
Graeme
On 27.11.2013 16:49, Graeme Gregory wrote:
On Wed, Nov 27, 2013 at 04:35:19PM +0100, Tomasz Nowicki wrote:
Hi Graeme,
On 27.11.2013 15:10, Graeme Gregory wrote:
It is not valid to use the acpica macros to try and remove functions they only work on prototypes. Instead just increase the scope of the
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
drivers/acpi/processor_idle.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 0ff1927..208503d 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -218,18 +218,16 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr,
#endif
-#ifdef CONFIG_PM_SLEEP -#if (!ACPI_REDUCED_HARDWARE) +#if IS_ENABLED(CONFIG_PM_SLEEP) && !IS_ENABLED(CONFIG_ACPI_REDUCED_HARDWARE) static u32 saved_bm_rld; -#endif
-ACPI_HW_DEPENDENT_RETURN_INT(int acpi_processor_suspend(void)) +int acpi_processor_suspend(void) { acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &saved_bm_rld); return 0; }
-ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_processor_resume(void)) +void acpi_processor_resume(void) { u32 resumed_bm_rld;
@@ -254,7 +252,13 @@ void acpi_processor_syscore_exit(void) { unregister_syscore_ops(&acpi_processor_syscore_ops); } -#endif /* CONFIG_PM_SLEEP */
+#else
+void acpi_processor_syscore_init(void){} +void acpi_processor_syscore_exit(void){}
+#endif /* CONFIG_PM_SLEEP && !CONFIG_ACPI_REDUCED_HARDWARE */
#if defined(CONFIG_X86) static void tsc_check_state(int state)
I think this is fixed by Al second version of Hardware Reduced patch set: [PATCH v2 2/6] ACPI: bus master reload not supported in reduced HW mode
Unless you just want to make it works for our three which has first patch version?
I think Als second version is still broken as its missing the two above stubs which are needed for compile on armv7 due to CONFIG_PM_SLEEP code paths being exposed.
Yes, you're right.
But this is a diff to our internal tree which has an older version!
Acked-by: Tomasz Nowicki tomasz.nowicki@linaro.org