mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 19:19:57 +07:00
1fc439c813
Sparse emits two symbol not declared warnings for swsusp.c. The two functions, save_processor_state() and restore_processor_state() are declared already in suspend.h, so include it. Signed-off-by: Tobin C. Harding <me@tobin.cc> Reviewed-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
38 lines
860 B
C
38 lines
860 B
C
/*
|
|
* Common powerpc suspend code for 32 and 64 bits
|
|
*
|
|
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#include <linux/sched.h>
|
|
#include <linux/suspend.h>
|
|
#include <asm/current.h>
|
|
#include <asm/mmu_context.h>
|
|
#include <asm/switch_to.h>
|
|
|
|
void save_processor_state(void)
|
|
{
|
|
/*
|
|
* flush out all the special registers so we don't need
|
|
* to save them in the snapshot
|
|
*/
|
|
flush_all_to_thread(current);
|
|
|
|
#ifdef CONFIG_PPC64
|
|
hard_irq_disable();
|
|
#endif
|
|
|
|
}
|
|
|
|
void restore_processor_state(void)
|
|
{
|
|
#ifdef CONFIG_PPC32
|
|
switch_mmu_context(current->active_mm, current->active_mm, NULL);
|
|
#endif
|
|
}
|