android_kernel_xiaomi_sm8350/include/asm-ia64
Rafael J. Wysocki 8a102eed9c [PATCH] PM: Fix SMP races in the freezer
Currently, to tell a task that it should go to the refrigerator, we set the
PF_FREEZE flag for it and send a fake signal to it.  Unfortunately there
are two SMP-related problems with this approach.  First, a task running on
another CPU may be updating its flags while the freezer attempts to set
PF_FREEZE for it and this may leave the task's flags in an inconsistent
state.  Second, there is a potential race between freeze_process() and
refrigerator() in which freeze_process() running on one CPU is reading a
task's PF_FREEZE flag while refrigerator() running on another CPU has just
set PF_FROZEN for the same task and attempts to reset PF_FREEZE for it.  If
the refrigerator wins the race, freeze_process() will state that PF_FREEZE
hasn't been set for the task and will set it unnecessarily, so the task
will go to the refrigerator once again after it's been thawed.

To solve first of these problems we need to stop using PF_FREEZE to tell
tasks that they should go to the refrigerator.  Instead, we can introduce a
special TIF_*** flag and use it for this purpose, since it is allowed to
change the other tasks' TIF_*** flags and there are special calls for it.

To avoid the freeze_process()-refrigerator() race we can make
freeze_process() to always check the task's PF_FROZEN flag after it's read
its "freeze" flag.  We should also make sure that refrigerator() will
always reset the task's "freeze" flag after it's set PF_FROZEN for it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Howells <dhowells@redhat.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13 09:05:49 -08:00
..
sn [IA64] fix possible XPC deadlock when disconnecting 2006-12-12 11:48:53 -08:00
a.out.h
acpi-ext.h
acpi.h [IA64] - Fix MAX_PXM_DOMAINS for systems with > 256 nodes 2006-04-20 10:16:11 -07:00
agp.h
asmmacro.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
atomic.h
auxvec.h
bitops.h [IA64] remove asm-ia64/bitops.h self-inclusion 2006-05-05 11:37:15 -07:00
break.h [IA64] enable trap code on slot 1 2006-12-12 12:00:55 -08:00
bug.h
bugs.h
byteorder.h
cache.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
cacheflush.h
checksum.h [IA64] implement csum_ipv6_magic for ia64. 2006-12-07 11:17:26 -08:00
compat.h
cpu.h
cputime.h
current.h
cyclone.h
delay.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
device.h ACPI: Change ACPI to use dev_archdata instead of firmware_data 2006-12-01 14:52:01 -08:00
div64.h
dma-mapping.h [PATCH] Pass struct dev pointer to dma_cache_sync() 2006-12-07 08:39:41 -08:00
dma.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
dmi.h
elf.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
emergency-restart.h
errno.h
esi.h [IA64] esi-support 2006-06-21 11:19:22 -07:00
fcntl.h
fpswa.h
fpu.h
futex.h [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
gcc_intrin.h
hardirq.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
hw_irq.h [PATCH] genirq: add ->retrigger() irq op to consolidate hw_irq_resend() 2006-06-29 10:26:23 -07:00
ia32.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ia64regs.h
ide.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
intel_intrin.h
intrinsics.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
io.h Altix: Add initial ACPI IO support 2006-12-01 14:36:57 -08:00
ioctl.h
ioctls.h
iosapic.h
ipcbuf.h
irq_regs.h IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
irq.h [PATCH] genirq ia64 cleanup 2006-07-03 15:26:58 -07:00
Kbuild [PATCH] cleanup asm/setup.h userspace visibility 2006-12-07 08:39:46 -08:00
kdebug.h [PATCH] Notify page fault call chain for ia64 2006-06-26 09:58:22 -07:00
kexec.h [IA64] IA64 Kexec/kdump 2006-12-07 09:51:35 -08:00
kmap_types.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
kprobes.h [IA64] enable trap code on slot 1 2006-12-12 12:00:55 -08:00
kregs.h
linkage.h
local.h
machvec_dig.h
machvec_hpsim.h
machvec_hpzx1_swiotlb.h
machvec_hpzx1.h
machvec_init.h
machvec_sn2.h [IA64] IA64 Kexec/kdump 2006-12-07 09:51:35 -08:00
machvec.h [IA64] IA64 Kexec/kdump 2006-12-07 09:51:35 -08:00
mc146818rtc.h
mca_asm.h [IA64] Make gp value point to Region 5 in mca handler 2006-09-26 14:13:03 -07:00
mca.h [IA64] Sanitize assembler code for ia64_sal_os_state 2006-06-21 14:44:26 -07:00
meminit.h [IA64] IA64 Kexec/kdump 2006-12-07 09:51:35 -08:00
mman.h [PATCH] IA64,sparc: local DoS with corrupted ELFs 2006-09-08 08:40:46 -07:00
mmu_context.h
mmu.h
mmzone.h
module.h [PATCH] Move compiler check for modules to ia64 only 2006-09-26 10:52:37 +02:00
msgbuf.h
mutex.h
namei.h
nodedata.h [PATCH] pgdat allocation and update for ia64 of memory hotplug: update pgdat address array 2006-06-27 17:32:37 -07:00
numa.h [PATCH] fix "cpu to node relationship fixup: map cpu to node" 2006-09-27 08:26:08 -07:00
page.h [IA64] Fix DISCONTIGMEM without VIRTUAL_MEM_MAP 2006-12-07 11:24:03 -08:00
pal.h [PATCH] Add support for type argument in PAL_GET_PSTATE 2006-12-07 11:21:55 -08:00
param.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
parport.h
patch.h
pci.h PCI: Use pci_generic_prep_mwi on ia64 2006-12-01 14:36:56 -08:00
percpu.h [PATCH] lockdep: add per_cpu_offset() 2006-07-03 15:27:00 -07:00
perfmon_default_smpl.h
perfmon.h
pgalloc.h [PATCH] numa node ids are int, page_to_nid and zone_to_nid should return int 2006-12-07 08:39:23 -08:00
pgtable.h [PATCH] Standardize pxx_page macros 2006-09-26 08:48:51 -07:00
poll.h
posix_types.h
processor.h [IA64] Move perfmon tables from thread_struct to pfm_context 2006-09-26 12:03:13 -07:00
ptrace_offsets.h
ptrace.h [PATCH] Add regs_return_value() helper 2006-10-02 07:57:16 -07:00
resource.h
rse.h
rwsem.h [PATCH] lockdep: remove RWSEM_DEBUG remnants 2006-07-03 15:27:01 -07:00
sal.h [IA64] move SAL_CACHE_FLUSH check later in boot 2006-10-31 14:32:10 -08:00
scatterlist.h
sections.h
segment.h
semaphore.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h [PATCH] irq-flags: IA64: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
smp.h Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-09-27 10:53:30 -07:00
socket.h [AF_UNIX]: Datagram getpeersec 2006-06-29 16:58:06 -07:00
sockios.h
sparsemem.h
spinlock_types.h
spinlock.h [PATCH] Directed yield: cpu_relax variants for spinlocks and rw-locks 2006-10-01 00:39:21 -07:00
stat.h
statfs.h
string.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
suspend.h
system.h [IA64] sparse cleanups 2006-08-02 16:03:44 -07:00
termbits.h [PATCH] tty: preparatory structures for termios revamp 2006-12-08 08:28:56 -08:00
termios.h
thread_info.h [PATCH] PM: Fix SMP races in the freezer 2006-12-13 09:05:49 -08:00
timex.h
tlb.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
tlbflush.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
topology.h [PATCH] sched: add option to serialize load balancing 2006-12-10 09:55:43 -08:00
types.h
uaccess.h [IA64] don't double >> PAGE_SHIFT pointer for /dev/kmem access 2006-10-26 14:57:06 -07:00
ucontext.h
unaligned.h
uncached.h
unistd.h [PATCH] rename the provided execve functions to kernel_execve 2006-10-02 07:57:23 -07:00
unwind.h
user.h
ustack.h [PATCH] Fix 'make headers_check' on ia64 2006-09-16 12:54:32 -07:00
vga.h [PATCH] vgacon: make VGA_MAP_MEM take size, remove extra use 2006-06-22 15:05:58 -07:00
xor.h