Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
267b59f5
Commit
267b59f5
authored
May 29, 2002
by
Pavel Machek
Committed by
Linus Torvalds
May 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] suspend-to-ram: clean up according to Andy
Andy did not quite like the comments, please apply this.
parent
8085cd28
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
20 deletions
+10
-20
arch/i386/kernel/acpi.c
arch/i386/kernel/acpi.c
+7
-16
arch/i386/kernel/acpi_wakeup.S
arch/i386/kernel/acpi_wakeup.S
+2
-3
drivers/acpi/acpi_system.c
drivers/acpi/acpi_system.c
+1
-1
No files found.
arch/i386/kernel/acpi.c
View file @
267b59f5
...
...
@@ -625,23 +625,15 @@ void __init acpi_reserve_bootmem(void)
printk
(
KERN_DEBUG
"ACPI: have wakeup address 0x%8.8lx
\n
"
,
acpi_wakeup_address
);
}
void
do_suspend_lowlevel
(
int
resume
)
{
/*
* (KG): Since we affect stack here, we make this function as flat and easy
* as possible in order to not provoke gcc to use local variables on the stack.
* Note that on resume, all (expect nosave) variables will have the state from
* the time of writing (suspend_save_image) and the registers (including the
* stack pointer, but excluding the instruction pointer) will be loaded with
* the values saved at save_processor_context() time.
* FIXME: This function should really be written in assembly. Actually
* requirement is that it does not touch stack, because %esp will be
* wrong during resume before restore_processor_context(). Check
* assembly if you modify this.
*/
void
do_suspend_magic
(
int
resume
)
{
/* DANGER WILL ROBINSON!
*
* If this function is too difficult for gcc to optimize, it will crash and burn!
* see above.
*
* DO NOT TOUCH.
*/
if
(
!
resume
)
{
save_processor_context
();
acpi_save_register_state
((
unsigned
long
)
&&
acpi_sleep_done
);
...
...
@@ -650,7 +642,6 @@ void do_suspend_magic(int resume)
}
acpi_sleep_done:
restore_processor_context
();
printk
(
"CPU context restored...
\n
"
);
}
#endif
/*CONFIG_ACPI_SLEEP*/
...
...
arch/i386/kernel/acpi_wakeup.S
View file @
267b59f5
...
...
@@ -179,7 +179,7 @@ wakeup_pmode_return:
rep
lodsb
movw
$
0x0e00
+
'O'
,
%
ds
:
(
0xb8018
)
movl
%
cs
:
saved_magic
2
,
%
eax
movl
%
cs
:
saved_magic
,
%
eax
cmpl
$
0x12345678
,
%
eax
jne
bogus_magic
...
...
@@ -243,7 +243,7 @@ ENTRY(acpi_copy_wakeup_routine)
movl
saved_videomode
,
%
edx
movl
%
edx
,
video_mode
-
wakeup_start
(%
eax
)
movl
$
0x12345678
,
real_magic
-
wakeup_start
(%
eax
)
movl
$
0x12345678
,
saved_magic
2
movl
$
0x12345678
,
saved_magic
#
restore
the
regs
we
used
popl
%
edi
...
...
@@ -261,7 +261,6 @@ ENTRY(saved_eip) .long 0
ENTRY
(
saved_esp
)
.
long
0
ENTRY
(
saved_magic
)
.
long
0
ENTRY
(
saved_magic2
)
.
long
0
ALIGN
#
saved
registers
...
...
drivers/acpi/acpi_system.c
View file @
267b59f5
...
...
@@ -268,7 +268,7 @@ acpi_system_suspend(
case
ACPI_STATE_S2
:
case
ACPI_STATE_S3
:
do_suspend_
magic
(
0
);
do_suspend_
lowlevel
(
0
);
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment