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
Kirill Smelkov
linux
Commits
9aa5637c
Commit
9aa5637c
authored
Dec 14, 2002
by
Pavel Machek
Committed by
Linus Torvalds
Dec 14, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ACPI/S3: simplify assembly code a bit
Kill unused variable and simplify assembly portion a bit...
parent
c8dfe2bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
16 deletions
+4
-16
arch/i386/kernel/acpi.c
arch/i386/kernel/acpi.c
+4
-3
arch/i386/kernel/acpi_wakeup.S
arch/i386/kernel/acpi_wakeup.S
+0
-13
No files found.
arch/i386/kernel/acpi.c
View file @
9aa5637c
...
@@ -448,10 +448,11 @@ acpi_boot_init (
...
@@ -448,10 +448,11 @@ acpi_boot_init (
/* address in low memory of the wakeup routine. */
/* address in low memory of the wakeup routine. */
unsigned
long
acpi_wakeup_address
=
0
;
unsigned
long
acpi_wakeup_address
=
0
;
extern
char
wakeup_start
,
wakeup_end
;
extern
unsigned
long
FASTCALL
(
acpi_copy_wakeup_routine
(
unsigned
long
));
extern
unsigned
long
FASTCALL
(
acpi_copy_wakeup_routine
(
unsigned
long
));
static
void
init_low_mapping
(
pgd_t
*
pgd
,
int
pgd_
ofs
,
int
pgd_
limit
)
static
void
init_low_mapping
(
pgd_t
*
pgd
,
int
pgd_limit
)
{
{
int
pgd_ofs
=
0
;
int
pgd_ofs
=
0
;
...
@@ -473,7 +474,8 @@ int acpi_save_state_mem (void)
...
@@ -473,7 +474,8 @@ int acpi_save_state_mem (void)
panic
(
"S3 and PAE do not like each other for now."
);
panic
(
"S3 and PAE do not like each other for now."
);
return
1
;
return
1
;
#endif
#endif
init_low_mapping
(
swapper_pg_dir
,
0
,
USER_PTRS_PER_PGD
);
init_low_mapping
(
swapper_pg_dir
,
USER_PTRS_PER_PGD
);
memcpy
((
void
*
)
acpi_wakeup_address
,
&
wakeup_start
,
&
wakeup_end
-
&
wakeup_start
);
acpi_copy_wakeup_routine
(
acpi_wakeup_address
);
acpi_copy_wakeup_routine
(
acpi_wakeup_address
);
return
0
;
return
0
;
...
@@ -506,7 +508,6 @@ void acpi_restore_state_mem (void)
...
@@ -506,7 +508,6 @@ void acpi_restore_state_mem (void)
*/
*/
void
__init
acpi_reserve_bootmem
(
void
)
void
__init
acpi_reserve_bootmem
(
void
)
{
{
extern
char
wakeup_start
,
wakeup_end
;
acpi_wakeup_address
=
(
unsigned
long
)
alloc_bootmem_low
(
PAGE_SIZE
);
acpi_wakeup_address
=
(
unsigned
long
)
alloc_bootmem_low
(
PAGE_SIZE
);
if
((
&
wakeup_end
-
&
wakeup_start
)
>
PAGE_SIZE
)
if
((
&
wakeup_end
-
&
wakeup_start
)
>
PAGE_SIZE
)
printk
(
KERN_CRIT
"ACPI: Wakeup code way too big, will crash on attempt to suspend
\n
"
);
printk
(
KERN_CRIT
"ACPI: Wakeup code way too big, will crash on attempt to suspend
\n
"
);
...
...
arch/i386/kernel/acpi_wakeup.S
View file @
9aa5637c
...
@@ -239,20 +239,11 @@ bogus_magic2:
...
@@ -239,20 +239,11 @@ bogus_magic2:
#
#
ENTRY
(
acpi_copy_wakeup_routine
)
ENTRY
(
acpi_copy_wakeup_routine
)
pushl
%
esi
pushl
%
edi
sgdt
saved_gdt
sgdt
saved_gdt
sidt
saved_idt
sidt
saved_idt
sldt
saved_ldt
sldt
saved_ldt
str
saved_tss
str
saved_tss
movl
%
eax
,
%
edi
leal
wakeup_start
,
%
esi
movl
$
(
wakeup_end
-
wakeup_start
+
3
)
>>
2
,
%
ecx
rep
; movsl
movl
%
cr3
,
%
edx
movl
%
cr3
,
%
edx
movl
%
edx
,
real_save_cr3
-
wakeup_start
(%
eax
)
movl
%
edx
,
real_save_cr3
-
wakeup_start
(%
eax
)
movl
%
cr4
,
%
edx
movl
%
cr4
,
%
edx
...
@@ -265,10 +256,6 @@ ENTRY(acpi_copy_wakeup_routine)
...
@@ -265,10 +256,6 @@ ENTRY(acpi_copy_wakeup_routine)
movl
%
edx
,
video_mode
-
wakeup_start
(%
eax
)
movl
%
edx
,
video_mode
-
wakeup_start
(%
eax
)
movl
$
0x12345678
,
real_magic
-
wakeup_start
(%
eax
)
movl
$
0x12345678
,
real_magic
-
wakeup_start
(%
eax
)
movl
$
0x12345678
,
saved_magic
movl
$
0x12345678
,
saved_magic
#
restore
the
regs
we
used
popl
%
edi
popl
%
esi
ret
ret
.
data
.
data
...
...
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