summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2010-07-01 03:22:13 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2010-07-01 03:22:13 +0000
commitf744e648f0dd6c0b42ec3c86bb37f2845ede2704 (patch)
tree85284f51218421bf22c60288524074b939b72d9f /sys/arch
parentb2735ac78382db6f10e2c1a21582733693b825bb (diff)
mark acpi_savecpu with the gcc returns_twice attribute as suggested
by deraadt so the stack will be sane during suspend/resume with gcc4. Noticed on i386 due to the lack of general purpose registers compared to amd64. ok deraadt@ mlarkin@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/acpi_machdep.c4
-rw-r--r--sys/arch/i386/i386/acpi_machdep.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c
index 16637cbccd1..48230028268 100644
--- a/sys/arch/amd64/amd64/acpi_machdep.c
+++ b/sys/arch/amd64/amd64/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.37 2010/07/01 00:48:48 mlarkin Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.38 2010/07/01 03:22:12 jsg Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -57,7 +57,7 @@ extern u_char acpi_real_mode_resume[], acpi_resume_end[];
extern u_int32_t acpi_pdirpa;
extern paddr_t tramp_pdirpa;
-extern int acpi_savecpu(void);
+extern int acpi_savecpu(void) __returns_twice;
#define ACPI_BIOS_RSDP_WINDOW_BASE 0xe0000
#define ACPI_BIOS_RSDP_WINDOW_SIZE 0x20000
diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c
index 14e811e0ca3..7a6025d652d 100644
--- a/sys/arch/i386/i386/acpi_machdep.c
+++ b/sys/arch/i386/i386/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.31 2010/07/01 00:48:48 mlarkin Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.32 2010/07/01 03:22:12 jsg Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -62,7 +62,7 @@ int haveacpibutusingapm;
extern u_char acpi_real_mode_resume[], acpi_resume_end[];
-extern int acpi_savecpu(void);
+extern int acpi_savecpu(void) __returns_twice;
extern void intr_calculatemasks(void);
#define ACPI_BIOS_RSDP_WINDOW_BASE 0xe0000