android_kernel_xiaomi_sm8350/arch/powerpc/kernel
Johannes Berg be9c94dd77 [POWERPC] Fix suspend states again
In commit 0fba3a1f39 (a very long time ago,
May 2006), I fixed a bug that caused powermacs to crash when you tried
entering standby/mem suspend states.

As I'm now getting more familiar with the suspend code I notice a few
more things:
 1. we previously misunderstood what pm_ops is for, it isn't supposed to be
    for doing platform dependent suspend/resume stuff that needs to be done
    for suspend to disk (as we currently try to use it!), it is instead for
    entering platform dependent suspend states ("standby", "mem").
 2. due to the first point, we never properly save FPU and altivec states
    when suspending to disk. It probably hasn't hurt yet because the process
    that writes the "disk" to /sys/power/state uses neither and its context
    is used.

This patch addresses these points as follows:
 1. remove all pm_ops from powermac, powermac suspend to ram isn't currently
    usable via /sys/power/state but is done via the PMU instead.
 2. move the code responsible for storing FPU/altivec state into
    save_processor_state and the set_context() call to restore_processor_state.
 3. add a call to kernel_enable_spe()

It may look like there is some code removal missing but that is
actually because the new suspend.h file overrides the ppc/suspend.h
one which was previously used.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-02 20:04:30 +10:00
..
vdso32
vdso64
align.c [POWERPC] Alignment exception uses __get/put_user_inatomic 2007-04-13 04:09:38 +10:00
asm-offsets.c [POWERPC] Save trap number in bad_stack 2007-04-24 22:06:59 +10:00
audit.c
binfmt_elf32.c
btext.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
compat_audit.c
cpu_setup_6xx.S
cpu_setup_pa6t.S [POWERPC] pasemi: Enable one more hid bit 2007-04-24 21:31:49 +10:00
cpu_setup_ppc970.S
cputable.c [POWERPC] pasemi: PA6T oprofile support 2007-04-24 21:31:51 +10:00
crash_dump.c
crash.c
dma_64.c
entry_32.S [POWERPC] Remove last_syscall 2007-03-22 22:52:58 +11:00
entry_64.S
firmware.c
fpu.S
head_4xx.S
head_8xx.S
head_32.S
head_44x.S [POWERPC] Revise PPC44x MMU code for arch/powerpc 2007-05-02 20:04:29 +10:00
head_64.S [POWERPC] Save trap number in bad_stack 2007-04-24 22:06:59 +10:00
head_booke.h
head_fsl_booke.S
ibmebus.c [POWERPC] ibmebus: change probe/remove interface from using loc-code to DT path 2007-04-13 06:12:42 +10:00
idle_6xx.S
idle_power4.S
idle.c [PATCH] sysctl: remove insert_at_head from register_sysctl 2007-02-14 08:09:59 -08:00
init_task.c
io.c
iomap.c
iommu.c Revert "[POWERPC] DMA 4GB boundary protection" 2007-04-26 19:48:15 +10:00
irq.c [POWERPC] Spinlock initializer cleanup 2007-04-30 11:02:06 +10:00
kprobes.c [POWERPC] kprobes: Eliminate sstep exception if instruction can be emulated 2007-04-24 21:31:58 +10:00
l2cr_6xx.S
legacy_serial.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
lparcfg.c [POWERPC] Replace if-then-else with a switch statement 2007-04-27 21:13:21 +10:00
lparmap.c
machine_kexec_32.c
machine_kexec_64.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
machine_kexec.c
Makefile [POWERPC] Fix suspend states again 2007-05-02 20:04:30 +10:00
misc_32.S [POWERPC] Remove _get_SP 2007-03-22 22:52:58 +11:00
misc_64.S
misc.S
module_32.c
module_64.c
nvram_64.c
of_device.c [POWERPC] Rename last get_property calls 2007-04-24 21:31:40 +10:00
of_platform.c Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
paca.c
pci_32.c [POWERPC] Fix STRICT_MM_TYPECHECKS 2007-05-02 20:04:30 +10:00
pci_64.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
pci_dn.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
pmc.c
ppc32.h
ppc_ksyms.c Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
proc_ppc64.c
process.c [POWERPC] Make tlb flush batch use lazy MMU mode 2007-04-13 04:09:38 +10:00
prom_init.c [POWERPC] Add correct interrupt property for pegasos ide 2007-04-13 04:00:25 +10:00
prom_parse.c [POWERPC] Uninline of_iomap function 2007-05-02 20:04:29 +10:00
prom.c [POWERPC] Remove old interface find_devices 2007-04-24 22:09:02 +10:00
ptrace32.c
ptrace-common.h
ptrace.c
rtas_flash.c
rtas_pci.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
rtas-proc.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
rtas-rtc.c
rtas.c [POWERPC] Remove old interface find_path_device 2007-04-24 22:08:59 +10:00
semaphore.c
setup_32.c [POWERPC] Fix breakage caused by 72486f1f8f 2007-04-13 03:55:16 +10:00
setup_64.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
setup-common.c [POWERPC] Generic check_legacy_ioport 2007-04-27 21:14:30 +10:00
setup.h
signal_32.c
signal_64.c
smp-tbsync.c
smp.c [POWERPC] Make tlb flush batch use lazy MMU mode 2007-04-13 04:09:38 +10:00
swsusp_32.S
swsusp.c [POWERPC] Fix suspend states again 2007-05-02 20:04:30 +10:00
sys_ppc32.c [POWERPC] Clean up unused ROUND_UP, NAME_OFFSET macros in arch/powerpc 2007-04-13 04:00:41 +10:00
syscalls.c
sysfs.c [POWERPC] Remove old interface find_path_device 2007-04-24 22:08:59 +10:00
systbl.S
tau_6xx.c
time.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
traps.c [POWERPC] Fix backwards ? : when printing machine type 2007-03-26 12:34:31 +10:00
udbg_16550.c [PATCH] constant should be long 2007-03-14 15:27:50 -07:00
udbg.c
vdso.c
vecemu.c
vector.S
vio.c [POWERPC] Remove old interface find_devices 2007-04-24 22:09:02 +10:00
vmlinux.lds.S