Skip to contentSkip to conversation

ACPI patch 2002-01-23

DISCUSSION Marc-Christian Petersen 2 participants 2 messages Jan 24, 2003 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

how should this ever compile? :)

acpi_ksyms.c:86: `acpi_enter_sleep_state_s4bios' undeclared here (not in a function)
acpi_ksyms.c:86: initializer element is not constant acpi_ksyms.c:86: (near initialization for `__ksymtab_acpi_enter_sleep_state_s4bios.value')
make[3]: *** [acpi_ksyms.o] Error 1

root@codeman:[/usr/src/ACPI] # grep "sleep_state_s4bios" * acpi-20030123-2.4.21-pre3.diff:+
acpi_enter_sleep_state_s4bios(); acpi-20030123-2.4.21-pre3.diff:+EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios);

ciao, Marc

-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld =Something 2 See!
http://www.vasoftware.com

#2 lore raw
In reply to a message not in the archive
Quoted 12 lines · Marc-Christian Petersen

Hi all,

how should this ever compile? :)

acpi_ksyms.c:86: `acpi_enter_sleep_state_s4bios' undeclared here (not in a function)
acpi_ksyms.c:86: initializer element is not constant acpi_ksyms.c:86: (near initialization for `__ksymtab_acpi_enter_sleep_state_s4bios.value')
make[3]: *** [acpi_ksyms.o] Error 1

Quoted 5 lines

root@codeman:[/usr/src/ACPI] # grep "sleep_state_s4bios" * acpi-20030123-2.4.21-pre3.diff:+
acpi_enter_sleep_state_s4bios(); acpi-20030123-2.4.21-pre3.diff:+EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios);

Consider this patch, courtesy of Sergio Visinoni, and cleaned

Cheers,

Signature · 4 lines
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.
 drivers/acpi/hardware/hwsleep.c |   46 ++++++++++++++++++++++++++++++++++++++++
 include/acpi/acpixf.h           |    4 +++
 2 files changed, 50 insertions(+)
drivers/acpi/hardware/hwsleep.c +46 -0
@@ -316,6 +316,52 @@
 	return_ACPI_STATUS (AE_OK);
 }
 
+
+/******************************************************************************
+ *
+ * FUNCTION:    acpi_enter_sleep_state_s4bios
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Perform a s4 bios request.
+ *              THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
+ *
+ ******************************************************************************/
+
+acpi_status
+acpi_enter_sleep_state_s4bios (
+	void)
+{
+	u32                     in_value;
+	acpi_status             status;
+
+
+	ACPI_FUNCTION_TRACE ("Acpi_enter_sleep_state_s4bios");
+
+
+	acpi_set_register (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_LOCK);
+	acpi_hw_clear_acpi_status();
+
+	acpi_hw_disable_non_wakeup_gpes();
+
+	ACPI_FLUSH_CPU_CACHE();
+
+	status = acpi_os_write_port (acpi_gbl_FADT->smi_cmd, (acpi_integer) acpi_gbl_FADT->S4bios_req, 8);
+
+	do {
+		acpi_os_stall(1000);
+		status = acpi_get_register (ACPI_BITREG_WAKE_STATUS, &in_value, ACPI_MTX_LOCK);
+		if (ACPI_FAILURE (status)) {
+			return_ACPI_STATUS (status);
+		}
+	} while (!in_value);
+
+	return_ACPI_STATUS (AE_OK);
+}
+
+
 /******************************************************************************
  *
  * FUNCTION:    acpi_leave_sleep_state
include/acpi/acpixf.h +4 -0
@@ -380,6 +380,10 @@
 	u8                              sleep_state);
 
 acpi_status
+acpi_enter_sleep_state_s4bios (
+	void);
+
+acpi_status
 acpi_leave_sleep_state (
 	u8                              sleep_state);